PageSourceSearch

https://gearment.com/assets/CountUp-CnpdfpF7.js

js gearment.com collected 2026-10-02 06:18:24 UTC 12,665 bytes, 2 lines download raw bytes

vendor: 5,321 bytes, line 1
1import{g as z,r as U,j as G}from"./jsx-runtime-DpCiThIL.js";var I={},j=function(){return j=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++)for(var e in t=arguments[n])Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r},j.apply(this,arguments)},L=function(){function r(t,n,i){var e=this;this.endVal=n,this.options=i,this.version="2.8.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(a){e.startTime||(e.startTime=a);var o=a-e.startTime;e.remaining=e.duration-o,e.useEasing?e.countDown?e.frameVal=e.startVal-e.easingFn(o,0,e.startVal-e.endVal,e.duration):e.frameVal=e.easingFn(o,e.startVal,e.endVal-e.startVal,e.duration):e.frameVal=e.startVal+(e.endVal-e.startVal)*(o/e.duration);var s=e.countDown?e.frameVal<e.endVal:e.frameVal>e.endVal;e.frameVal=s?e.endVal:e.frameVal,e.frameVal=Number(e.frameVal.toFixed(e.options.decimalPlaces)),e.printValue(e.frameVal),o<e.duration?e.rAF=requestAnimationFrame(e.count):e.finalEndVal!==null?e.update(e.finalEndVal):e.options.onCompleteCallback&&e.options.onCompleteCallback()},this.formatNumber=function(a){var o,s,u,l,c=a<0?"-":"";o=Math.abs(a).toFixed(e.options.decimalPlaces);var h=(o+="").split(".");if(s=h[0],u=h.length>1?e.options.decimal+h[1]:"",e.options.useGrouping){l="";for(var g=3,b=0,p=0,m=s.length;p<m;++p)e.options.useIndianSeparators&&p===4&&(g=2,b=1),p!==0&&b%g==0&&(l=e.options.separator+l),b++,l=s[m-p-1]+l;s=l}return e.options.numerals&&e.options.numerals.length&&(s=s.replace(/[0-9]/g,function(d){return e.options.numerals[+d]}),u=u.replace(/[0-9]/g,function(d){return e.options.numerals[+d]})),c+e.options.prefix+s+u+e.options.suffix},this.easeOutExpo=function(a,o,s,u){return s*(1-Math.pow(2,-10*a/u))*1024/1023+o},this.options=j(j({},this.defaults),i),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,this.options.separator===""&&(this.options.useGrouping=!1),this.el=typeof t=="string"?document.getElementById(t):t,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.enableScrollSpy&&(this.error?console.error(this.error,t):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push(function(){return e.handleScroll(e)}),window.onscroll=function(){window.onScrollFns.forEach(function(a){return a()})},this.handleScroll(this)))}return r.prototype.handleScroll=function(t){if(t&&window&&!t.once){var n=window.innerHeight+window.scrollY,i=t.el.getBoundingClientRect(),e=i.top+window.pageYOffset,a=i.top+i.height+window.pageYOffset;a<n&&a>window.scrollY&&t.paused?(t.paused=!1,setTimeout(function(){return t.start()},t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>a||e>n)&&!t.paused&&t.reset()}},r.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var n=t-this.startVal;if(Math.abs(n)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var i=this.countDown?1:-1;this.endVal=t+i*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;this.finalEndVal!==null?this.useEasing=!1:this.useEasing=this.options.useEasing},r.prototype.start=function(t){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},r.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},r.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)},r.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal==null&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},r.prototype.printValue=function(t){var n;if(this.el){var i=this.formattingFn(t);!((n=this.options.plugin)===null||n===void 0)&&n.render?this.options.plugin.render(this.el,i):this.el.tagName==="INPUT"?this.el.value=i:this.el.tagName==="text"||this.el.tagName==="tspan"?this.el.textContent=i:this.el.
1innerHTML=i}},r.prototype.ensureNumber=function(t){return typeof t=="number"&&!isNaN(t)},r.prototype.validateValue=function(t){var n=Number(t);return this.ensureNumber(n)?n:(this.error="[CountUp] invalid start or end value: ".concat(t),null)},r.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},r}();const q=Object.freeze(Object.defineProperty({__proto__:null,CountUp:L},Symbol.toStringTag,{value:"Module"})),Y=z(q);Object.defineProperty(I,"__esModule",{value:!0});var f=U,$=Y;function k(r,t){var n=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var i,e,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(r)).next,t!==0)for(;!(u=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);u=!0);}catch(c){l=!0,e=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw e}}return s}}function _(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),n.push.apply(n,i)}return n}function x(r){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_(Object(n),!0).forEach(function(i){B(r,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(n,i))})}return r}function H(r,t){if(typeof r!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var i=n.call(r,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function W(r){var t=H(r,"string");return typeof t=="symbol"?t:String(t)}function B(r,t,n){return t=W(t),t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function D(){return D=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},D.apply(this,arguments)}function K(r,t){if(r==null)return{};var n={},i=Object.keys(r),e,a;for(a=0;a<i.length;a++)e=i[a],!(t.indexOf(e)>=0)&&(n[e]=r[e]);return n}function N(r,t){if(r==null)return{};var n=K(r,t),i,e;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(e=0;e<a.length;e++)i=a[e],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(r,i)&&(n[i]=r[i])}return n}function J(r,t){return Q(r)||k(r,t)||X(r,t)||Z()}function Q(r){if(Array.isArray(r))return r}function X(r,t){if(r){if(typeof r=="string")return T(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set")return Array.from(r);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(r,t)}}function T(r,t){(t==null||t>r.length)&&(t=r.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=r[n];return i}function Z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?f.useLayoutEffect:f.useEffect;function y(r){var t=f.useRef(r);return tt(function(){t.current=r}),f.useCallback(function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];return t.current.apply(void 0,i)},[])}var et=function(t,n){var i=n.decimal,e=n.decimals,a=n.duration,o=n.easingFn,s=n.end,u=n.formattingFn,l=n.numerals,c=n.prefix,h=n.separator,g=n.start,b=n.suffix,p=n.useEasing,m=n.useGrouping,d=n.useIndianSeparators,S=n.enableScrollSpy,v=n.scrollSpyDelay,O=n.scrollSpyOnce,w=n.plugin;return new $.CountUp(t,s,{startVal:g,duration:a,decimal:i,decimalPlaces:e,easingFn:o,formattingFn:u,numerals:l,separator:h,prefix:c,suffix:b,plugin:w,useEasing:p,useIndianSeparators:d,useGrouping:m,enableScrollSpy:S,scrollSpyDelay:v,scrollSpyOnce:O})},nt=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],rt={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},M=function(t){var n=Object.fromEntries(Object.entries(t).filter(function(V){var P=J(V,2),C=P[1];return C!==void 0})),i=f.useMemo(function(){return x(x({},rt),n)},[t]),e=i.ref,a=i.startOnMount,o=i.enableReinitialize,s=i.delay,u=i.onEnd,l=i.onStart,c=i.onPauseResume,h=i.onReset,g=i.onUpdate,b=N(i,nt),p=f.useRef(),m=f.useRef(),d=f.useRef(!1),S=y(function(){return et(typeof e=="string"?e:e.current,b)}),v=y(function(V){var P=p.current;if(P&&!V)return P;var C=S();return p.current=C,C}),O=y(function(){var V=function(){return v(!0).start(function(){u==null||u({pauseResume:w,reset:E,start:F,update:R})})};s&&s>0?m.current=setTimeout(V,s*1e3):V(),l==null||l({pauseResume:w,reset:E,update:R})}),w=y(function(){v().pauseResume(),c==null||c({reset:E,start:F,update:R})}),E=y(function(){v().el&&(m.current&&clearTimeout(m.current),v().reset(),h==null||h({pauseResume:w,start:F,update:R}))}),R=y(function(V){v().update(V),g==null||g({pauseResume:w,reset:E,start:F})}),F=y(function(){E(),O()}),A=y(function(V){a&&(V&&E(),O())});return f.useEffect(function(){d.current?o&&A(!0):(d.current=!0,A())},[o,d,A,s,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.formattingFn]),f.useEffect(function(){return function(){E()}},[E]),{start:F,pauseResume:w,reset:E,update:R,getCountUp:v}},it=["className","redraw","containerProps","children","style"],at=function(t){var n=t.className,i=t.redraw,e=t.containerProps,a=t.children,o=t.style,s=N(t,it),u=f.useRef(null),l=f.useRef(!1),c=M(x(x({},s),{},{ref:u,startOnMount:typeof a!="function"||t.delay===0,enableReinitialize:!1})),h=c.start,g=c.reset,b=c.update,p=c.pauseResume,m=c.getCountUp,d=y(function(){h()}),S=y(function(w){t.preserveValue||g(),b(w)}),v=y(function(){if(typeof t.children=="function"&&!(u.current instanceof Element)){console.error(`Couldn't find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.`);return}m()});f.useEffect(function(){v()},[v]),f.useEffect(function(){l.current&&S(t.end)},[t.end,S]);var O=i&&t;return f.useEffect(function(){i&&l.current&&d()},[d,i,O]),f.useEffect(function(){!i&&l.current&&d()},[d,i,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.className,t.formattingFn]),f.useEffect(function(){l.current=!0},[]),typeof a=="function"?a({countUpRef:u,start:h,reset:g,update:b,pauseResume:p,getCountUp:m}):f.createElement("span",D({className:n,ref:u,style:o},e),typeof t.start<"u"?m().formattingFn(t.start):"")};I.default=at;var st=I.useCountUp=M;function ut({targetNumber:r,duration:t,setStartCounting:n}){const i=U.useRef(null),{start:e}=st({ref:i,start:0,end:r,duration:t/1e3,onStart:()=>{n&&n(!0)}});return U.useEffect(()=>{const a=new IntersectionObserver(o=>{o[0].isIntersecting&&(e(),a.unobserve(i.current))},{threshold:.1});return i.current&&a.observe(i.current),()=>{i.current&&a.unobserve(i.current)}},[]),G.jsx("div",{className:"inline-flex",ref:i})}export{ut as C};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.