{"version":3,"file":"CountUp.1xTEGA0e.mjs","names":["useRef","useState","useLayoutEffect","useEffect","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","le","_e","p","c","init_jsx_runtime","ce","de","addPropertyControls","RenderTarget","init_framer_Bf4_tcb2","ControlType","CountUp","props","ref","started","n","setN","value","isCanvas","useIsoLayoutEffect","io","entry","t0","tick","t","duration","fmt","prefix","x","suffix","base","fontFamily","init_CountUp"],"sources":["https:/framerusercontent.com/modules/YhbecTLGx9Eo6nqVtKSg/fjSAv2PP70CEFPzI10tH/CountUp.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useLayoutEffect,useRef,useState}from\"react\";const useIsoLayoutEffect=typeof window!==\"undefined\"?useLayoutEffect:useEffect;/**\n * Counts up to a number when it scrolls into view. Server HTML keeps the final value for SEO.\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CountUp(props){const{value=750,prefix=\"\",suffix=\"+\",duration=1.6,fontSize=38,color=\"#ffffff\",fontFamily=\"Bebas Neue\",fontWeight=400}=props;const ref=useRef(null);const started=useRef(false);const[n,setN]=useState(value);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useIsoLayoutEffect(()=>{if(isCanvas||!ref.current)return;if(window.matchMedia&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;setN(0);const io=new IntersectionObserver(([entry])=>{if(!entry.isIntersecting||started.current)return;started.current=true;io.disconnect();const t0=performance.now();const tick=t=>{const p=Math.min(1,(t-t0)/(duration*1e3));setN(Math.round(value*(1-Math.pow(1-p,3))));if(p<1)requestAnimationFrame(tick);};requestAnimationFrame(tick);},{threshold:.4});io.observe(ref.current);return()=>io.disconnect();},[value,duration,isCanvas]);const fmt=x=>prefix+x.toLocaleString(\"en-US\")+suffix;const base={gridArea:\"1 / 1\",whiteSpace:\"nowrap\"};return /*#__PURE__*/_jsxs(\"p\",{ref:ref,style:{margin:0,display:\"inline-grid\",fontFamily:`\"${fontFamily}\", sans-serif`,fontWeight,fontSize,lineHeight:1,color,textTransform:\"uppercase\",fontVariantNumeric:\"tabular-nums\"},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{...base,visibility:\"hidden\"},children:fmt(value)}),/*#__PURE__*/_jsx(\"span\",{style:base,children:fmt(n)})]});}addPropertyControls(CountUp,{value:{type:ControlType.Number,title:\"Value\",defaultValue:750,min:0,max:1e6,step:1},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"+\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.6,min:.2,max:5,step:.1},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:38,min:8,max:200,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ffffff\"},fontFamily:{type:ControlType.String,title:\"Font\",defaultValue:\"Bebas Neue\"},fontWeight:{type:ControlType.Number,title:\"Weight\",defaultValue:400,min:100,max:900,step:100}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CountUp\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountUp.map"],"mappings":"A,4NAIG,SAAwBmB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,IAAI,SAAO,GAAG,SAAO,IAAI,WAAS,IAAI,WAAS,GAAG,QAAM,UAAU,aAAW,aAAa,aAAW,KAAKC,EAAYC,EAAIrB,EAAO,IAAI,EAAQsB,EAAQtB,EAAO,EAAK,EAAO,CAACuB,EAAEC,GAAMvB,EAASwB,CAAK,EAAQC,EAASV,EAAa,QAAQ,IAAIA,EAAa,OAAOW,MAAuB,CAAkC,GAA9BD,GAAU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