{"version":3,"file":"AnimatedCounter.CI2RN5Kb.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/f2RmbdWHtceXVKnAMgNZ/xb8dkV4DeIKJT95wdKd2/VCTHvseb6.js","https:/framerusercontent.com/modules/sIxZFVxIOBdfeANYhkj2/lGu9VayhxpYD2v9lbKlh/AnimatedCounter.js"],"sourcesContent":["// Generated by Framer (3d4fa65)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Figtree-regular\",\"Inter-Bold\",\"Inter-BoldItalic\",\"Inter-Italic\"]);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_d_QF5bwkEU4HTy.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/DpPBYI0sL4fYLgAkX8KXOPVt7c.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/4RAEQdEOrcnDkhHiiCbJOw92Lk.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/1K3W8DizY3v4emK8Mb08YHxTbs.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/tUSCtfYVM1I1IchuyCwz9gDdQ.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/VgYFWiwsAC5OYxAycRXXvhze58.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/DXD0Q7LSl7HEvDzucnyLnGBHM.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/GIryZETIX4IFypco5pYZONKhJIo.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/H89BbHkbHDzlxZzxi8uPzTsp90.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/u6gJwDuwB143kpNK1T1MDKDWkMc.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/43sJ6MfOPh1LCJt46OvyDuSbA6o.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/wccHG0r4gBDAIRhfHiOlq6oEkqw.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/WZ367JPwf9bRW6LdTHN8rXgSjw.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/QxmhnWTzLtyjIiZcfaLIJ8EFBXU.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/2A4Xx7CngadFGlVV4xrO06OBHY.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/CfMzU8w2e7tHgF4T4rATMPuWosA.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/867QObYax8ANsfX4TGEVU9YiCM.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/Oyn2ZbENFdnW7mt2Lzjk1h9Zb9k.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/cdAe8hgZ1cMyLu9g005pAW3xMo.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/DOfvtmE1UplCq161m6Hj8CSQYg.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/vFzuJY0c65av44uhEKB6vyjFMg.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/tKtBcDnBMevsEEJKdNGhhkLzYo.woff2\",weight:\"400\"}]}];export const css=['.framer-Nmf8D .framer-styles-preset-13p03f7:not(.rich-text-wrapper), .framer-Nmf8D .framer-styles-preset-13p03f7.rich-text-wrapper p { --framer-font-family: \"Figtree\", \"Figtree Placeholder\", sans-serif; --framer-font-family-bold: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv09\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv11\\' on; --framer-font-size: 14px; --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: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: 0em; --framer-line-height: 150%; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: var(--token-17fc5ccc-9bfc-4869-a5d1-d670a42ae502, #3b3b3b); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-Nmf8D\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"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\":{\"framerContract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