{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/udXMhlfT8A0oQ9Y3P6Wv/mjtabXHBEteHevhWth8o/AnimatedCounter.js"],
  "sourcesContent": ["/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ import{jsx as _jsx}from\"react/jsx-runtime\";import{animate,motion,useInView,useMotionValue,useTransform}from\"framer-motion\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function AnimatedCounter({from,to,duration,fontFamily,fontSize,color,fontWeight}){const count=useMotionValue(from);const rounded=useTransform(count,latest=>{return Math.round(latest);});const ref=useRef(null);const inView=useInView(ref);// while in view animate the count\nuseEffect(()=>{if(inView){animate(count,to,{duration});}},[count,inView,to,duration]);return /*#__PURE__*/ _jsx(motion.span,{ref:ref,style:{fontFamily,fontSize,color,fontWeight},children:rounded});}AnimatedCounter.defaultProps={from:0,to:15,duration:2.5,fontFamily:\"Arial\",fontSize:24,color:\"#000000\",weight:400};addPropertyControls(AnimatedCounter,{from:{type:ControlType.Number,title:\"From\",defaultValue:0,min:0,step:1},to:{type:ControlType.Number,title:\"To\",defaultValue:15,min:0,step:1},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2.5,min:0,step:.1,displayStepper:true},fontFamily:{type:ControlType.String,title:\"Font Family\",defaultValue:\"Arial\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:24,min:12,max:120,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},fontWeight:{type:ControlType.Number,title:\"Weight\",defaultValue:400}});export default AnimatedCounter;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedCounter.map"],
  "mappings": "mJAAAA,IAGuN,SAASC,EAAgB,CAAC,KAAAC,EAAK,GAAAC,EAAG,S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["init_ssg_sandbox_shims", "AnimatedCounter", "from", "to", "duration", "fontFamily", "fontSize", "color", "fontWeight", "count", "useMotionValue", "rounded", "useTransform", "latest", "ref", "pe", "inView", "useInView", "ue", "animate", "p", "motion", "addPropertyControls", "ControlType", "AnimatedCounter_default"]
}
