{"version":3,"file":"UseViewportHeight.uzdWofKb.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","init_npm_react_18_3_1","window","oe","c","init_jsx_runtime","ce","init_ssg_sandbox_shims","init_framer_Duogf4LG","DataObserverContext","useViewportHeight","lastScale","setVH","vh","handleViewport","currentScale","withuseViewportHeight","C","props","init_UseViewportHeight"],"sources":["https:/framerusercontent.com/modules/AiMW9qHOqqhcxwUD8mkF/ZyXnGxhgMzfHF02nDpWf/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\":{\"withuseViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withuseViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useViewportHeight\":{\"type\":\"override\",\"name\":\"useViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UseViewportHeight.map"],"mappings":"A,wLAAwE,SAAgBY,GAAmB,CAGqO,OAHpOJ,MAAc,CAAC,IAAIK,EAAUT,EAAO,gBAAgB,OAAO,EAAQU,MAAU,CAAC,IAAMC,EAAGX,EAAO,YAAY,SAAS,gBAAgB,MAAM,YAAY,eAAe,GAAGW,EAAG,GAAG,CAAE,EAE3R,GAF6RD,EAAM,EACnSV,EAAO,iBAAiB,oBAAoBU,CAAK,EAC9CV,EAAO,eAAe,CAAC,IAAMY,MAAmB,CAAC,IAAMC,EAAab,EAAO,eAAe,MAC1Fa,IAAeJ,IAAW,EAAUI,EAAaH,EAAM,EAAG,EAAkE,OAAhEV,EAAO,eAAe,iBAAiB,SAASY,CAAc,MAAY,CAACZ,EAAO,oBAAoB,oBAAoBU,CAAK,EAAEV,EAAO,gBAAgB,oBAAoB,SAASY,CAAc,CAAE,CAAE,CAAC,UAAU,CAACZ,EAAO,oBAAoB,oBAAoBU,CAAK,CAAE,CAAE,EAAE,CAAC,CAAC,EAAQ,CAAC,MAAM,CAAC,OAAO,oBAAoB,UAAU,QAAQ,CAAC,CAAE,CAAoJ,SAAgBI,EAAsB,EAAE,CAAC,MAAO,KAAQb,EAA+BL,CAAuC,EAASC,EAAKkB,EAAE,CAAC,GAAGC,EAAM,GAAGR,EAAkBQ,CAAK,CAAC,CAAC,EAAI,C,8CAAC,EAAsB,YAAY,mB"}