{"version":3,"file":"ReadTime.Bdu_WiLH.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/md43LXjdF7JDQ7DoPvOo/iYeXqt3qcF1qeXZPbLMs/ReadTime.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";/**\n * @framerDisableUnlink\n */export function withReadingTime(Component){return props=>{const[readingTime,setReadingTime]=useState(\"Read time: ...\");const[isClient,setIsClient]=useState(false);useEffect(()=>{setIsClient(true);},[]);useEffect(()=>{if(!isClient)return;const calculateReadingTime=()=>{// Get all text content from the page\nconst textContent=document.body.innerText||document.body.textContent||\"\";// Remove extra whitespace and split into words\nconst words=textContent.replace(/\\s+/g,\" \").trim().split(\" \").filter(word=>word.length>0);// Calculate reading time (average 200 words per minute)\nconst wordsPerMinute=200;const minutes=Math.ceil(words.length/wordsPerMinute);return`Read time: ${minutes} min`;};// Small delay to ensure content is fully loaded\nconst timer=setTimeout(()=>{const time=calculateReadingTime();setReadingTime(time);},100);return()=>clearTimeout(timer);},[isClient]);return /*#__PURE__*/_jsx(Component,{...props,text:readingTime});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withReadingTime\":{\"type\":\"reactHoc\",\"name\":\"withReadingTime\",\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReadTime.map"],"mappings":"mKAEG,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAY,GAAgBA,EAAS,iBAAiB,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAI/B,OAJgC,MAAc,CAAC,EAAY,GAAK,EAAG,EAAE,CAAC,CAAC,MAAc,CAAC,GAAG,CAAC,EAAS,OAAO,IAAM,MAAyB,CAE/Q,IAAM,GADY,SAAS,KAAK,WAAW,SAAS,KAAK,aAAa,IAC9C,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,OAAO,GAAM,EAAK,OAAO,EAAE,CACX,MAAM,cAA7C,KAAK,KAAK,EAAM,OAAlC,IAAwD,CAA6B,OACpG,EAAM,eAAe,CAAC,IAAM,EAAK,GAAsB,CAAC,EAAe,EAAK,EAAG,IAAI,CAAC,UAAU,aAAa,EAAM,EAAG,CAAC,EAAS,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,EAAY,CAAC,mBAN1J,IAAsC"}