{"version":3,"file":"TypeOut.CDsoaAnt.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/RaVidHBxJ9eUiMtd0xcl/O3Vdx1J9hrI03C5lkbgC/TypeOut.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useState}from\"react\";import{useInView}from\"framer-motion\";const message=\"5,000+\",speed=80// raise this number to type slower\n;export function withTypeOut(Component){return props=>{const ref=useRef(null);const isInView=useInView(ref);const[part,setPart]=useState(\"\");const[index,setIndex]=useState(0);useEffect(()=>{let timeout;if(isInView&&index<message.length){timeout=setTimeout(()=>{setPart(prev=>prev+message[index]);setIndex(index+1);},speed);}return()=>clearTimeout(timeout);},[index,isInView]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:part});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTypeOut\":{\"type\":\"reactHoc\",\"name\":\"withTypeOut\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TypeOut.map"],"mappings":"8PACC,SAAgB,EAAY,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAO,EAAS,EAAU,EAAI,CAAM,CAAC,EAAK,GAASC,EAAS,GAAG,CAAM,CAAC,EAAM,GAAUA,EAAS,EAAE,CAA0M,OAAzM,MAAc,CAAC,IAAI,EAAkI,OAAvH,GAAU,EAAM,IAAgB,EAAQ,eAAe,CAAC,EAAQ,GAAM,EAAK,EAAQ,GAAO,CAAC,EAAS,EAAM,EAAE,EAAG,EAAM,MAAY,aAAa,EAAQ,EAAG,CAAC,EAAM,EAAS,CAAC,CAAqB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,KAAK,EAAK,CAAC,uBAD7Y,IAA6C,IAAqC,CAAM,EAAQ,SAAS,EAAM"}