{"version":3,"file":"NumberCounter.7kMKB0B3.mjs","names":["useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/zHpmmtRBBhS2UuxgvAiD/nyokQgxbMZn1GIg8Pl1e/aoAoMgPow.js","https:/framerusercontent.com/modules/xnWBGabHv8mabXLp6tDB/aoC0726nNJ9plPRyksxP/NumberCounter.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 19 9.22 C 19 3.73 14.74 0 10 0 C 5.31 0 1 3.65 1 9.28 C 0.4 9.62 0 10.26 0 11 L 0 13 C 0 14.1 0.9 15 2 15 L 3 15 L 3 8.9 C 3 5.03 6.13 1.9 10 1.9 C 13.87 1.9 17 5.03 17 8.9 L 17 16 L 9 16 L 9 18 L 17 18 C 18.1 18 19 17.1 19 16 L 19 14.78 C 19.59 14.47 20 13.86 20 13.14 L 20 10.84 C 20 10.14 19.59 9.53 19 9.22 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"18px\" id=\"v4QT6k7J1\" transform=\"translate(2 3)\" width=\"20px\"/><path d=\"M 1 2 C 1.552 2 2 1.552 2 1 C 2 0.448 1.552 0 1 0 C 0.448 0 0 0.448 0 1 C 0 1.552 0.448 2 1 2 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"2px\" id=\"fQaGjMQe6\" transform=\"translate(8 12)\" width=\"2px\"/><path d=\"M 1 2 C 1.552 2 2 1.552 2 1 C 2 0.448 1.552 0 1 0 C 0.448 0 0 0.448 0 1 C 0 1.552 0.448 2 1 2 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"2px\" id=\"GM6NJl7Yf\" transform=\"translate(14 12)\" width=\"2px\"/><path d=\"M 11.995 5.03 C 11.515 2.18 9.035 0 6.045 0 C 3.015 0 -0.245 2.51 0.015 6.45 C 2.485 5.44 4.345 3.24 4.875 0.56 C 6.185 3.19 8.875 5 11.995 5.03 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"6.449999999999999px\" id=\"SePYjguDi\" transform=\"translate(6.005 6)\" width=\"11.994598113829927px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,K5AAorpEW:fill??props.K5AAorpEW??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,K5AAorpEW,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-4jAZ4\",className),layoutId:layoutId,ref:ref,style:{\"--esondr\":K5AAorpEW,...style}});});const css=[`.framer-4jAZ4 { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--esondr); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"K5AAorpEW\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Support Agent\",\"color\":{\"type\":\"variable\",\"value\":\"esondr\"},\"set\":{\"localId\":\"vectorSet/DnLsXE00W\",\"id\":\"DnLsXE00W\",\"moduleId\":\"JIScivAkNLgXrcOUxHXD\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-4jAZ4\");Icon.displayName=\"Support Agent\";export default Icon;addPropertyControls(Icon,{K5AAorpEW:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"true\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerImmutableVariables\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"Support Agent\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"esondr\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/DnLsXE00W\\\",\\\"id\\\":\\\"DnLsXE00W\\\",\\\"moduleId\\\":\\\"JIScivAkNLgXrcOUxHXD\\\"}}\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\",\"framerVariables\":\"{\\\"K5AAorpEW\\\":\\\"fill\\\"}\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Number Counter component that animates from start to end value with customizable options\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,useRef,useMemo,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";const easingMap={linear:[0,0,1,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],bounce:[.68,-.55,.265,1.55]};/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Counter(props){const{startValue=0,endValue=100,duration=2,delay=0,decimals=0,easing=\"easeOut\",font,textAlign=\"left\",color=\"#000000\",autoStart=true,loop=false,resetOnReEntry=false,prefix=\"\",suffix=\"\",separator=\",\"}=props;const[currentValue,setCurrentValue]=useState(startValue);const[hasStarted,setHasStarted]=useState(false);const animationRef=useRef();const startTimeRef=useRef();const containerRef=useRef(null);const isStatic=useIsStaticRenderer();const isInView=useInView(containerRef,{once:!resetOnReEntry,margin:\"0px 0px -10% 0px\"});const formatNumber=useMemo(()=>{return value=>{const fixed=value.toFixed(decimals);if(separator&&Math.abs(value)>=1e3){const parts=fixed.split(\".\");parts[0]=parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g,separator);return parts.join(\".\");}return fixed;};},[decimals,separator]);const easeValue=useMemo(()=>{return t=>{const[x1,y1,x2,y2]=easingMap[easing];if(easing===\"linear\")return t;if(easing===\"bounce\"){if(t<1/2.75){return 7.5625*t*t;}else if(t<2/2.75){return 7.5625*(t-=1.5/2.75)*t+.75;}else if(t<2.5/2.75){return 7.5625*(t-=2.25/2.75)*t+.9375;}else{return 7.5625*(t-=2.625/2.75)*t+.984375;}}// Cubic bezier approximation\nreturn 3*(1-t)*(1-t)*t*y1+3*(1-t)*t*t*y2+t*t*t;};},[easing]);const animate=useMemo(()=>{return timestamp=>{if(!startTimeRef.current){startTimeRef.current=timestamp+delay*1e3;}const elapsed=timestamp-startTimeRef.current;const progress=Math.min(elapsed/(duration*1e3),1);if(progress>=0){const easedProgress=easeValue(progress);const newValue=startValue+(endValue-startValue)*easedProgress;startTransition(()=>{setCurrentValue(newValue);});if(progress<1){animationRef.current=requestAnimationFrame(animate);}else if(loop){// Reset for loop\nstartTimeRef.current=undefined;startTransition(()=>{setCurrentValue(startValue);});setTimeout(()=>{animationRef.current=requestAnimationFrame(animate);},100);}}else{animationRef.current=requestAnimationFrame(animate);}};},[startValue,endValue,duration,delay,easing,loop,easeValue]);const startAnimation=useMemo(()=>{return()=>{if(animationRef.current){cancelAnimationFrame(animationRef.current);}startTimeRef.current=undefined;startTransition(()=>{setCurrentValue(startValue);setHasStarted(true);});animationRef.current=requestAnimationFrame(animate);};},[animate,startValue]);// Handle auto-start and in-view animation\nuseEffect(()=>{if(isStatic){setCurrentValue(endValue);return;}if(autoStart&&isInView&&(!hasStarted||resetOnReEntry)){startAnimation();}else if(!autoStart&&isInView&&(!hasStarted||resetOnReEntry)){startAnimation();}return()=>{if(animationRef.current){cancelAnimationFrame(animationRef.current);}};},[autoStart,isInView,hasStarted,resetOnReEntry,startAnimation,isStatic,endValue]);// Reset when not in view and resetOnReEntry is true\nuseEffect(()=>{if(!isInView&&resetOnReEntry&&hasStarted){if(animationRef.current){cancelAnimationFrame(animationRef.current);}startTransition(()=>{setCurrentValue(startValue);setHasStarted(false);});startTimeRef.current=undefined;}},[isInView,resetOnReEntry,hasStarted,startValue]);const displayValue=formatNumber(currentValue);const fullText=`${prefix}${displayValue}${suffix}`;return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"max-content\",minWidth:\"max-content\",...props.style},children:/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",textAlign,color,width:\"max-content\",...font},children:fullText})});}addPropertyControls(Counter,{startValue:{type:ControlType.Number,title:\"Start Value\",defaultValue:0,step:1},endValue:{type:ControlType.Number,title:\"End Value\",defaultValue:100,step:1},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2,min:.1,max:10,step:.1,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:5,step:.1,unit:\"s\"},decimals:{type:ControlType.Number,title:\"Decimals\",defaultValue:0,min:0,max:4,step:1,displayStepper:true},easing:{type:ControlType.Enum,title:\"Easing\",options:[\"linear\",\"easeIn\",\"easeOut\",\"easeInOut\",\"bounce\"],optionTitles:[\"Linear\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Bounce\"],defaultValue:\"easeOut\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"32px\",variant:\"Bold\",letterSpacing:\"-0.03em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},autoStart:{type:ControlType.Boolean,title:\"Auto Start\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},resetOnReEntry:{type:ControlType.Boolean,title:\"Reset on Re-entry\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\",placeholder:\"$\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"\",placeholder:\"%\"},separator:{type:ControlType.String,title:\"Thousands Separator\",defaultValue:\",\",placeholder:\",\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Counter\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NumberCounter.map"],"mappings":"uTAC2C,IAAsE,IAA4B,CAAoC,EAAK,s1CAA81C,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,MAAI,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAI,CAAC,EAAG,CAAO,GAAU,CAAC,OAAK,SAAO,KAAG,QAAM,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAM,EAAM,WAAW,eAAe,EAUx1D,EAAK,EAVm3D,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,GAAG,GAAW,EAAS,EAAM,CAAC,OAAoB,EAAK,EAAI,CAAC,GAAG,EAAU,UAAU,EAAG,eAAe,EAAU,CAAU,WAAa,MAAI,MAAM,CAAC,WAAW,EAAU,GAAG,EAAM,CAAC,CAAC,EAAG,CAAW,CAAC,iCAAi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