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A;AACA;AACA;AACA;;AAEA,mBAAmB,+CAAO;;AAE1B;AACA;AACA;AACA,CAAC","sources":["webpack://virdis-webpage/./node_modules/countup.js/dist/countUp.min.js","webpack://virdis-webpage/webpack/bootstrap","webpack://virdis-webpage/webpack/runtime/define property getters","webpack://virdis-webpage/webpack/runtime/hasOwnProperty shorthand","webpack://virdis-webpage/webpack/runtime/make namespace object","webpack://virdis-webpage/./src/js/countup.js"],"sourcesContent":["var t=function(){return t=Object.assign||function(t){for(var i,n=1,s=arguments.length;na.endVal;a.frameVal=n?a.endVal:a.frameVal,a.frameVal=Number(a.frameVal.toFixed(a.options.decimalPlaces)),a.printValue(a.frameVal),i1?a.options.decimal+r[1]:\"\",a.options.useGrouping){e=\"\";for(var l=3,h=0,u=0,p=n.length;uwindow.scrollY&&t.paused?(t.paused=!1,setTimeout((function(){return t.start()}),t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>a||s>i)&&!t.paused&&t.reset()}},i.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var n=this.countDown?1:-1;this.endVal=t+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},i.prototype.start=function(t){this.error||(t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},i.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},i.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},i.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},i.prototype.printValue=function(t){var i;if(this.el){var n=this.formattingFn(t);if(null===(i=this.options.plugin)||void 0===i?void 0:i.render)this.options.plugin.render(this.el,n);else if(\"INPUT\"===this.el.tagName)this.el.value=n;else\"text\"===this.el.tagName||\"tspan\"===this.el.tagName?this.el.textContent=n:this.el.innerHTML=n}},i.prototype.ensureNumber=function(t){return\"number\"==typeof t&&!isNaN(t)},i.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error=\"[CountUp] invalid start or end value: \".concat(t),null)},i.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},i}();export{i as CountUp};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import {CountUp} from \"countup.js\";\n\nfunction isFloat(value) {\n\treturn !!(typeof value === 'number' &&\n\t\t!Number.isNaN(value) &&\n\t\t!Number.isInteger(value));\n}\n\nlet tags = [\n\t[\"metricubi\", 11.25],\n\t[\"giunti\", 135],\n\t[\"strutture\", 800],\n\t[\"altezza\", 155],\n\t[\"ponte\", 250],\n\t[\"anni\", 50, {prefix: \"+\"}],\n\t[\"progetti\", 4500, {prefix: \"+\"}],\n\t[\"soddisfazione\", 100, {suffix: \"%\"}]\n];\n\n\nconst options = {\n\tenableScrollSpy: true,\n\tscrollSpyDelay: 250,\n\tuseGrouping: true,\n\tduration: 3,\n\tdecimal: \",\",\n};\n\ntags.forEach(element => {\n\n\tlet customOptions = Object.assign({}, options)\n\n\t// Check if value it's float\n\tif (isFloat(element[1])) {\n\t\tcustomOptions.decimalPlaces = 2;\n\t}\n\n\t// Check if any custom options have been specified\n\tif (typeof element[2] === 'object' &&\n\t\t!Array.isArray(element[2]) &&\n\t\telement[2] !== null) {\n\t\tcustomOptions = Object.assign(customOptions, element[2])\n\t}\n\n\tlet countUp = new CountUp(element[0], element[1], customOptions);\n\n\tif (!countUp.error) {\n\t\tcountUp.start();\n\t}\n});\n"],"names":[],"sourceRoot":""}