{"version":3,"file":"AnimatedCounter.DXvQAk3K.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/g3x1rEXo5BQHeDTvE2CY/VrX0MdXXRbY4QgixD4UJ/iysBjrv98.js","https:/framerusercontent.com/modules/sIxZFVxIOBdfeANYhkj2/lGu9VayhxpYD2v9lbKlh/AnimatedCounter.js"],"sourcesContent":["// Generated by Framer (6aa4fc0)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Figtree-600\",\"GF;Figtree-900\",\"GF;Figtree-900italic\",\"GF;Figtree-600italic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Figtree\",openType:true,source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/figtree/v7/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_ehR15bwkEU4HTy.woff2\",weight:\"600\"},{family:\"Figtree\",openType:true,source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/figtree/v7/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_fWR15bwkEU4HTy.woff2\",weight:\"900\"},{family:\"Figtree\",openType:true,source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/figtree/v7/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3Ax8ayEA25WTybO8.woff2\",weight:\"900\"},{family:\"Figtree\",openType:true,source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/figtree/v7/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A2gayEA25WTybO8.woff2\",weight:\"600\"}]}];export const css=['.framer-YGSbd .framer-styles-preset-3ubip:not(.rich-text-wrapper), .framer-YGSbd .framer-styles-preset-3ubip.rich-text-wrapper h4 { --framer-font-family: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-family-bold: \"Figtree\", sans-serif; --framer-font-family-bold-italic: \"Figtree\", sans-serif; --framer-font-family-italic: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv09\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv11\\' on; --framer-font-size: 24px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 900; --framer-font-weight-bold-italic: 900; --framer-font-weight-italic: 600; --framer-letter-spacing: -0.5px; --framer-line-height: 140%; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: var(--token-b60bb860-2f15-4147-b317-e108888b3643, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1199px) and (min-width: 768px) { .framer-YGSbd .framer-styles-preset-3ubip:not(.rich-text-wrapper), .framer-YGSbd .framer-styles-preset-3ubip.rich-text-wrapper h4 { --framer-font-family: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-family-bold: \"Figtree\", sans-serif; --framer-font-family-bold-italic: \"Figtree\", sans-serif; --framer-font-family-italic: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv09\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv11\\' on; --framer-font-size: 22px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 900; --framer-font-weight-bold-italic: 900; --framer-font-weight-italic: 600; --framer-letter-spacing: -0.5px; --framer-line-height: 140%; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: var(--token-b60bb860-2f15-4147-b317-e108888b3643, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 767px) and (min-width: 0px) { .framer-YGSbd .framer-styles-preset-3ubip:not(.rich-text-wrapper), .framer-YGSbd .framer-styles-preset-3ubip.rich-text-wrapper h4 { --framer-font-family: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-family-bold: \"Figtree\", sans-serif; --framer-font-family-bold-italic: \"Figtree\", sans-serif; --framer-font-family-italic: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv09\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv11\\' on; --framer-font-size: 20px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 900; --framer-font-weight-bold-italic: 900; --framer-font-weight-italic: 600; --framer-letter-spacing: -0.5px; --framer-line-height: 140%; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: var(--token-b60bb860-2f15-4147-b317-e108888b3643, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-YGSbd\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","/*\n * Animated Counter by framer.today\n * v1.0.1\n *\n * hi@framer.today\n * _joerl on 𝕏\n *\n * Full terms here ↴\n * https://framer.today/license\n *\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{animate,motion,useInView}from\"framer-motion\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerDisableUnlink\n */export default function AnimatedCounter(props){const{from,to,duration,decimalPlaces,decimalSeparator,font:{fontFamily,fontWeight,fontSize,lineHeight,letterSpacing,textAlign},color,playOnLoad,once,animationType}=props;const ref=useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ariaLabel=`Counter ends at ${to}`;// Pass 'once' to useInView\nconst isInView=useInView(ref,{once});const[hasAnimated,setHasAnimated]=useState(false);const[displayValue,setDisplayValue]=useState(()=>formatNumber(from));function formatNumber(value){let formattedNumber=value.toFixed(decimalPlaces).replace(\".\",decimalSeparator);return formattedNumber;}useEffect(()=>{// Determine if animation should play\nif(!isCanvas&&(playOnLoad||isInView)&&!hasAnimated){const animationControl=animate(from,to,{duration,ease:animationType===\"smooth\"?\"easeInOut\":\"linear\",onUpdate:latest=>{setDisplayValue(formatNumber(latest));},onComplete:()=>{if(once){setHasAnimated(true);}}});return()=>animationControl.stop();}},[from,to,duration,decimalPlaces,decimalSeparator,playOnLoad,isInView,animationType,once,hasAnimated]);return /*#__PURE__*/_jsx(motion.div,{ref:ref,initial:{opacity:isCanvas?1:0},whileInView:{opacity:1},style:{fontFamily,fontWeight,fontSize,lineHeight,letterSpacing,textAlign,color,fontVariantNumeric:\"tabular-nums\",userSelect:\"none\"},\"aria-label\":ariaLabel,children:isCanvas?formatNumber(to):displayValue});}AnimatedCounter.defaultProps={from:0,to:24,duration:5,decimalPlaces:0,decimalSeparator:\".\",font:{fontFamily:\"Manrope\",fontWeight:\"400\",fontSize:40,lineHeight:\"1.5em\",letterSpacing:\"normal\",textAlign:\"left\"},color:\"#FFF\",playOnLoad:true,once:true,animationType:\"smooth\"};addPropertyControls(AnimatedCounter,{from:{type:ControlType.Number,title:\"From\",defaultValue:0,min:0,step:.1,displayStepper:true},to:{type:ControlType.Number,title:\"To\",defaultValue:16,min:0,step:.1,displayStepper:true},animationType:{type:ControlType.Enum,title:\"Animation Type\",defaultValue:\"smooth\",options:[\"smooth\",\"linear\"],optionTitles:[\"Smooth\",\"Linear\"]},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2.5,min:0,step:.1,displayStepper:true},decimalPlaces:{type:ControlType.Number,displayStepper:true,title:\"Decimal Places\",defaultValue:0,min:0,max:2,step:1},decimalSeparator:{type:ControlType.Enum,title:\"↳ Separator\",defaultValue:\".\",options:[\".\",\",\"],optionTitles:[\".\",\",\"],hidden:({decimalPlaces})=>decimalPlaces===0},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontFamily:\"Manrope\",fontWeight:\"400\",fontSize:64,lineHeight:\"1.5em\",letterSpacing:\"Medium\",textAlign:\"left\"},displayFontSize:true,displayTextAlignment:false,defaultFontType:\"monospace\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFF\"},once:{type:ControlType.Boolean,title:\"Once\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},playOnLoad:{type:ControlType.Boolean,title:\"Play on Load\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",description:`\n        \n        *from framer.today*\n [License](https://framer.today/license)\n    `}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedCounter.map"],"mappings":"4RAC8B,GAAU,UAAU,CAAC,iBAAiB,iBAAiB,uBAAuB,uBAAuB,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,UAAU,SAAS,GAAK,OAAO,SAAS,MAAM,SAAS,IAAI,4FAA4F,OAAO,MAAM,CAAC,CAAC,OAAO,UAAU,SAAS,GAAK,OAAO,SAAS,MAAM,SAAS,IAAI,4FAA4F,OAAO,MAAM,CAAC,CAAC,OAAO,UAAU,SAAS,GAAK,OAAO,SAAS,MAAM,SAAS,IAAI,+FAA+F,OAAO,MAAM,CAAC,CAAC,OAAO,UAAU,SAAS,GAAK,OAAO,SAAS,MAAM,SAAS,IAAI,+FAA+F,OAAO,MAAM,CAAC,CAAC,CAAC,CAAc,EAAI,CAAC,moCAA6oC,yrCAAmsC,srCAAgsC,CAAc,EAAU,kBCWx6I,SAAwB,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