{"version":3,"file":"RandomFloat.GZ8AGOgF.mjs","names":["useState","useRef","useRef","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/TdY17W22HM7PVJX1SO94/B8dWebwBKiG1vvnnZQYR/Countdown.js","https:/framerusercontent.com/modules/ZUkL0h0lThFjAW0gtFWY/MAgxlHCfoEiP30j1Xhep/RandomFloat.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Animated counter\n *\n * Counts from `from` to `to`, starting slow and accelerating.\n * The acceleration is controlled by an ease-in power curve —\n * higher \"Acceleration\" values make the start slower and the\n * finish snappier.\n *\n * Text is always centered inside the component's frame —\n * resize the frame in Framer and the number stays centered\n * both horizontally and vertically.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Counter(props){const{from,to,duration,acceleration,font,color,useCommas,decimals}=props;const[value,setValue]=useState(from);const rafRef=useRef(null);const startRef=useRef(null);useEffect(()=>{setValue(from);startRef.current=null;function tick(timestamp){if(startRef.current===null)startRef.current=timestamp;const elapsed=timestamp-startRef.current;const t=Math.min(elapsed/(duration*1e3),1);// Ease-in power curve: slow start, fast finish.\n// acceleration = 1 -> linear, higher = more pronounced ramp-up\nconst eased=Math.pow(t,acceleration);const current=from+(to-from)*eased;setValue(current);if(t<1){rafRef.current=requestAnimationFrame(tick);}else{setValue(to);}}rafRef.current=requestAnimationFrame(tick);return()=>{if(rafRef.current)cancelAnimationFrame(rafRef.current);};},[from,to,duration,acceleration]);const rounded=Number(value.toFixed(decimals));const display=useCommas?rounded.toLocaleString(undefined,{minimumFractionDigits:decimals,maximumFractionDigits:decimals}):rounded.toFixed(decimals);// `font` comes from ControlType.Font (with controls: \"extended\")\n// and is an object like { fontFamily, fontWeight, fontStyle, ... }\n// We spread it directly into the style so Framer injects the\n// correct @font-face / font loading logic on every breakpoint.\nconst fontStyle=font||{};return(// position: absolute + inset: 0 centers reliably no matter how\n// the parent Frame sizes itself (Fit / Fill / Fixed) — with\n// height: 100% + flex alone, a Frame set to \"Fit\" can collapse\n// to the text's own height and break vertical centering.\n/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\"},children:/*#__PURE__*/_jsx(\"span\",{style:{...fontStyle,// Neutralize the font's own line-height/leading so the\n// glyphs sit visually centered instead of shifted up\n// inside their line box.\nlineHeight:fontStyle.lineHeight??1,color,whiteSpace:\"nowrap\"},children:display})}));}Counter.defaultProps={from:0,to:12,duration:2,acceleration:3,font:{fontFamily:\"Bebas Neue Cyrillic\",fontWeight:400,fontSize:67,letterSpacing:0,lineHeight:\"1.2em\"},color:\"#FFFFFF\",useCommas:false,decimals:0};addPropertyControls(Counter,{from:{type:ControlType.Number,title:\"From\",defaultValue:0,step:1},to:{type:ControlType.Number,title:\"To\",defaultValue:12,step:1},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2,min:.1,max:20,step:.1,unit:\"s\"},acceleration:{type:ControlType.Number,title:\"Acceleration\",defaultValue:3,min:1,max:8,step:.1,description:\"1 = linear, higher = slower start / faster finish\"},decimals:{type:ControlType.Number,title:\"Decimals\",defaultValue:0,min:0,max:4,step:1},useCommas:{type:ControlType.Boolean,title:\"Thousands sep.\",defaultValue:false},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontFamily:\"Bebas Neue Cyrillic\",fontWeight:400,fontSize:67}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Counter\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Countdown.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useMemo,useRef}from\"react\";import{ControlType,useIsStaticRenderer}from\"framer\";import{useInView,useMotionValue,useReducedMotion}from\"framer-motion\";function clamp(value,min,max){return Math.min(Math.max(value,min),max);}function createSeededRandom(seed){let state=(seed||1)>>>0;return()=>{state+=1831565813;let t=state;t=Math.imul(t^t>>>15,t|1);t^=t+Math.imul(t^t>>>7,t|61);return((t^t>>>14)>>>0)/4294967296;};}function resolveSpeedFactor(style,smoothness){if(style===\"linear\")return 1;if(style===\"easeOut\")return .9;if(style===\"custom\"){const s=clamp(smoothness,0,1);return .75+s*.5;}return .85;}export function withRandomFloat(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{enableMotion=true,xAmplitude=24,yAmplitude=20,rotationAmplitude=5,minDuration=2.5,maxDuration=5.5,randomSeed=1,easingStyle=\"easeInOut\",smoothness=.6}=props;const localRef=useRef(null);const animationFrameRef=useRef(null);const prefersReducedMotion=useReducedMotion();const isStaticRenderer=useIsStaticRenderer();const x=useMotionValue(0);const y=useMotionValue(0);const rotate=useMotionValue(0);const setRefs=useCallback(node=>{localRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref&&\"current\"in ref){ref.current=node;}},[ref]);const inView=useInView(localRef,{margin:\"100px\"});const random=useMemo(()=>createSeededRandom(Math.floor(randomSeed)),[randomSeed]);const speedFactor=useMemo(()=>resolveSpeedFactor(easingStyle,smoothness),[easingStyle,smoothness]);const minT=Math.max(.1,Math.min(minDuration,maxDuration));const maxT=Math.max(minT,Math.max(minDuration,maxDuration));const shouldAnimate=enableMotion&&!prefersReducedMotion&&!isStaticRenderer&&inView;useEffect(()=>{if(!shouldAnimate){if(animationFrameRef.current!==null&&typeof window!==\"undefined\"){window.cancelAnimationFrame(animationFrameRef.current);animationFrameRef.current=null;}x.set(0);y.set(0);rotate.set(0);return;}if(typeof window===\"undefined\")return;const basePeriod=minT+random()*(maxT-minT);const period=Math.max(.1,basePeriod/Math.max(.1,speedFactor));const omega=Math.PI*2/period;const xPhaseA=random()*Math.PI*2;const xPhaseB=random()*Math.PI*2;const yPhaseA=random()*Math.PI*2;const yPhaseB=random()*Math.PI*2;const rPhaseA=random()*Math.PI*2;const rPhaseB=random()*Math.PI*2;const smooth=clamp(smoothness,0,1);const primaryWeight=.72+smooth*.2;const secondaryWeight=1-primaryWeight;const startTime=window.performance.now();const tick=now=>{const t=(now-startTime)/1e3;const xValue=xAmplitude*(primaryWeight*Math.sin(omega*t+xPhaseA)+secondaryWeight*Math.sin(omega*1.73*t+xPhaseB));const yValue=yAmplitude*(primaryWeight*Math.sin(omega*1.31*t+yPhaseA)+secondaryWeight*Math.sin(omega*2.07*t+yPhaseB));const rotateValue=rotationAmplitude*(primaryWeight*Math.sin(omega*.92*t+rPhaseA)+secondaryWeight*Math.sin(omega*1.61*t+rPhaseB));x.set(xValue);y.set(yValue);rotate.set(rotateValue);animationFrameRef.current=window.requestAnimationFrame(tick);};animationFrameRef.current=window.requestAnimationFrame(tick);return()=>{if(animationFrameRef.current!==null){window.cancelAnimationFrame(animationFrameRef.current);animationFrameRef.current=null;}};},[maxT,minT,random,rotate,rotationAmplitude,shouldAnimate,smoothness,speedFactor,x,xAmplitude,y,yAmplitude]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,animate:props.animate,style:{...props.style,x,y,rotate}});});}withRandomFloat.propertyControls={enableMotion:{type:ControlType.Boolean,title:\"Enable Motion\",defaultValue:true},xAmplitude:{type:ControlType.Number,title:\"X Amplitude\",defaultValue:24,min:0,max:300,unit:\"px\",step:1},yAmplitude:{type:ControlType.Number,title:\"Y Amplitude\",defaultValue:20,min:0,max:300,unit:\"px\",step:1},rotationAmplitude:{type:ControlType.Number,title:\"Rotation\",defaultValue:5,min:0,max:45,unit:\"deg\",step:.5},minDuration:{type:ControlType.Number,title:\"Min Duration\",defaultValue:2.5,min:.1,max:20,unit:\"s\",step:.1},maxDuration:{type:ControlType.Number,title:\"Max Duration\",defaultValue:5.5,min:.1,max:30,unit:\"s\",step:.1},randomSeed:{type:ControlType.Number,title:\"Random Seed\",defaultValue:1,min:1,max:9999,step:1,displayStepper:true},easingStyle:{type:ControlType.Enum,title:\"Easing\",defaultValue:\"easeInOut\",options:[\"easeInOut\",\"easeOut\",\"linear\",\"custom\"],optionTitles:[\"Ease InOut\",\"Ease Out\",\"Linear\",\"Custom\"]},smoothness:{type:ControlType.Number,title:\"Smoothness\",defaultValue:.6,min:0,max:1,step:.01}};\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomFloat\":{\"type\":\"reactHoc\",\"name\":\"withRandomFloat\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RandomFloat.map"],"mappings":"kSAcG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,OAAK,KAAG,WAAS,eAAa,OAAK,QAAM,YAAU,YAAU,EAAW,CAAC,EAAM,GAAUA,EAAS,CAAI,EAAQ,EAAOC,EAAO,IAAI,EAAQ,EAASA,EAAO,IAAI,EAAE,MAAc,CAAC,EAAS,CAAI,EAAE,EAAS,QAAQ,KAAK,SAAS,EAAK,EAAU,CAAI,EAAS,UAAU,OAAK,EAAS,QAAQ,GAAU,IAAM,EAAQ,EAAU,EAAS,QAAc,EAAE,KAAK,IAAI,GAAS,EAAS,KAAK,CAAC,EAE7Z,EAAe,IAAE,EAAoB,EAAQ,GAAM,EAAG,GAAM,EAAM,EAAS,CAAO,EAAK,EAAE,EAAG,EAAO,QAAQ,sBAAsB,CAAI,EAAQ,EAAS,CAAE,CAAG,CAA4C,MAA3C,GAAO,QAAQ,sBAAsB,CAAI,MAAY,CAAI,EAAO,SAAQ,qBAAqB,EAAO,OAAO,CAAE,CAAE,EAAE,CAAC,EAAK,EAAG,EAAS,CAAY,CAAC,EAAE,IAAM,EAAQ,OAAO,EAAM,QAAQ,CAAQ,CAAC,EAAQ,EAAQ,EAAU,EAAQ,eAAe,IAAA,GAAU,CAAC,sBAAsB,EAAS,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