{"version":3,"file":"UseViewportHeight.D2swcKFu.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","oe","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","init_npm_react_18_3_1","init_framer_Bf4_tcb2","DataObserverContext","useViewportHeight","lastScale","setVH","vh","handleViewport","currentScale","withuseViewportHeight","C","props","init_UseViewportHeight"],"sources":["https:/framerusercontent.com/modules/UXSDGpRmAO9NWkVCOlfB/lCdARGtPRmBjEHG9xXuk/UseViewportHeight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function useViewportHeight(){useEffect(()=>{let lastScale=window.visualViewport?.scale||1;const setVH=()=>{const vh=window.innerHeight;document.documentElement.style.setProperty(\"--app-height\",`${vh}px`);};setVH();// keep your original\nwindow.addEventListener(\"orientationchange\",setVH);// ✅ ONLY react to actual zoom changes\nif(window.visualViewport){const handleViewport=()=>{const currentScale=window.visualViewport.scale;// 👉 ONLY update if zoom level changed\nif(currentScale!==lastScale){lastScale=currentScale;setVH();}};window.visualViewport.addEventListener(\"resize\",handleViewport);return()=>{window.removeEventListener(\"orientationchange\",setVH);window.visualViewport?.removeEventListener(\"resize\",handleViewport);};}return()=>{window.removeEventListener(\"orientationchange\",setVH);};},[]);return{style:{height:\"var(--app-height)\",minHeight:\"100svh\"}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withuseViewportHeight(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...useViewportHeight(props)});};}withuseViewportHeight.displayName=\"useViewportHeight\";\nexport const __FramerMetadata__ = {\"exports\":{\"useViewportHeight\":{\"type\":\"override\",\"name\":\"useViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withuseViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withuseViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UseViewportHeight.map"],"mappings":"A,wLAAwE,SAAgBY,GAAmB,CAGqO,OAHpOJ,MAAc,CAAC,IAAIK,EAAUR,EAAO,gBAAgB,OAAO,EAAQS,MAAU,CAAC,IAAMC,EAAGV,EAAO,YAAY,SAAS,gBAAgB,MAAM,YAAY,eAAe,GAAGU,EAAG,GAAG,CAAE,EAE3R,GAF6RD,EAAM,EACnST,EAAO,iBAAiB,oBAAoBS,CAAK,EAC9CT,EAAO,eAAe,CAAC,IAAMW,MAAmB,CAAC,IAAMC,EAAaZ,EAAO,eAAe,MAC1FY,IAAeJ,IAAW,EAAUI,EAAaH,EAAM,EAAG,EAAkE,OAAhET,EAAO,eAAe,iBAAiB,SAASW,CAAc,MAAY,CAACX,EAAO,oBAAoB,oBAAoBS,CAAK,EAAET,EAAO,gBAAgB,oBAAoB,SAASW,CAAc,CAAE,CAAE,CAAC,UAAU,CAACX,EAAO,oBAAoB,oBAAoBS,CAAK,CAAE,CAAE,EAAE,CAAC,CAAC,EAAQ,CAAC,MAAM,CAAC,OAAO,oBAAoB,UAAU,QAAQ,CAAC,CAAE,CAAoJ,SAAgBI,EAAsB,EAAE,CAAC,MAAO,KAAQf,EAA+BH,CAAuC,EAASC,EAAKkB,EAAE,CAAC,GAAGC,EAAM,GAAGR,EAAkBQ,CAAK,CAAC,CAAC,EAAI,C,8CAAC,EAAsB,YAAY,mB"}