{"version":3,"file":"Random_Count.DsNfoaRF.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/ss6gKSJc8PZHm0jynO9o/lvjRouZGTM2TWPlnPocP/Random_Count.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,startTransition,useRef}from\"react\";import{useInView}from\"framer-motion\";export const withFakeViewCount400=Component=>{return props=>{const[viewCount,setViewCount]=useState(400)// Initial view count\n;const ref=useRef();const inView=useInView(ref);useEffect(()=>{if(!inView)return;const updateViewCount=()=>{startTransition(()=>setViewCount(prev=>{const change=Math.floor(Math.random()*3)-1// Randomly -1, 0, or +1\n    ;const newCount=prev+change;return Math.min(Math.max(newCount,413),420)// Clamp to range 400–415\n    ;}));};const interval=setInterval(updateViewCount,Math.random()*500+1e3)// Update every 3-6 seconds\n;return()=>clearInterval(interval)// Cleanup on unmount\n;},[inView]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,text:viewCount.toString()});};};export const withFakeViewCount5000=Component=>{return props=>{const[viewCount,setViewCount]=useState(5143)// Initial view count\n;const ref=useRef();const inView=useInView(ref);useEffect(()=>{if(!inView)return;const updateViewCount=()=>{startTransition(()=>setViewCount(prev=>{const change=Math.floor(Math.random()*3)-1// Randomly -1, 0, or +1\n    ;const newCount=prev+change;return Math.min(Math.max(newCount,5e3),5200)// Clamp to range 400–415\n    ;}));};const interval=setInterval(updateViewCount,Math.random()*100+500)// Update every 3-6 seconds\n;return()=>clearInterval(interval)// Cleanup on unmount\n;},[inView]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,text:viewCount.toString()});};};\nexport const __FramerMetadata__ = {\"exports\":{\"withFakeViewCount400\":{\"type\":\"reactHoc\",\"name\":\"withFakeViewCount400\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFakeViewCount5000\":{\"type\":\"reactHoc\",\"name\":\"withFakeViewCount5000\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Random_Count.map"],"mappings":"0HAA6I,MAAa,EAAqB,GAAmB,GAAO,CAAC,GAAK,CAAC,EAAU,EAAa,CAACA,EAAS,KAC1O,EAAIC,IAAe,EAAO,EAAU,GAI9B,OAJmC,MAAc,CAAC,GAAG,CAAC,EAAO,OAAO,IAAM,MAAoB,CAAC,MAAoB,EAAa,GAAM,CAAC,IAAM,EAAO,KAAK,MAAM,KAAK,SAAS,GAAG,EAClL,EAAS,EAAK,EAAO,OAAO,KAAK,IAAI,KAAK,IAAI,EAAS,KAAK,IACjE,GAAI,EAAO,EAAS,YAAY,EAAgB,KAAK,SAAS,IAAI,KACvE,UAAU,cAAc,EACvB,EAAC,CAAC,EAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,KAAK,EAAU,WAAW,CAAG,EAAgB,EAAsB,GAAmB,GAAO,CAAC,GAAK,CAAC,EAAU,EAAa,CAACD,EAAS,MAChM,EAAIC,IAAe,EAAO,EAAU,GAI9B,OAJmC,MAAc,CAAC,GAAG,CAAC,EAAO,OAAO,IAAM,MAAoB,CAAC,MAAoB,EAAa,GAAM,CAAC,IAAM,EAAO,KAAK,MAAM,KAAK,SAAS,GAAG,EAClL,EAAS,EAAK,EAAO,OAAO,KAAK,IAAI,KAAK,IAAI,EAAS,KAAK,KACjE,GAAI,EAAO,EAAS,YAAY,EAAgB,KAAK,SAAS,IAAI,KACvE,UAAU,cAAc,EACvB,EAAC,CAAC,EAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,KAAK,EAAU,WAAW,CAAG"}