{"version":3,"file":"UsePageVisibility.BUrk7F_5.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/V9ryrjN5Am9WM1dJeyyJ/GzHgU466IQmt8g4qOKj8/UsePageVisibility.js"],"sourcesContent":["import{useState,useEffect}from\"react\";export const isBrowser=()=>typeof document===\"object\";export function usePageVisibility(){if(!isBrowser())return;const[isVisible,setIsVisible]=useState(!document.hidden);useEffect(()=>{const onVisibilityChange=()=>setIsVisible(!document.hidden);document.addEventListener(\"visibilitychange\",onVisibilityChange,false);return()=>{document.removeEventListener(\"visibilitychange\",onVisibilityChange);};},[]);return isVisible;}\nexport const __FramerMetadata__ = {\"exports\":{\"isBrowser\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePageVisibility\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UsePageVisibility.map"],"mappings":"2GAA4F,SAAgB,GAAmB,CAAC,GAAG,CAAC,EAAU,EAAE,OAAO,GAAK,CAAC,EAAU,GAAcA,EAAS,CAAC,SAAS,MAAM,EAA2O,OAAzO,MAAc,CAAC,IAAM,MAAuB,EAAa,CAAC,SAAS,MAAM,EAAyE,OAAvE,SAAS,iBAAiB,mBAAmB,EAAmB,EAAK,MAAY,CAAC,SAAS,oBAAoB,mBAAmB,CAAkB,CAAE,CAAE,EAAE,CAAC,CAAC,EAAS,CAAU,mBAAra,EAAc,MAAc,OAAO,UAAW"}