{"version":3,"file":"DynamicViewport.DG262RH7.mjs","names":[],"sources":["https:/framerusercontent.com/modules/dcQwWi5wezq6jhQQaArA/df7D3coeYT3SIJg2shEh/DynamicViewport.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withDynamicViewportHeight(Component){return props=>{useEffect(()=>{const setVh=()=>{const vh=window.innerHeight*.01;document.documentElement.style.setProperty(\"--vh\",`${vh}px`);};// Set on mount\nsetVh();// Debounce via requestAnimationFrame on resize only\nlet rafId;const handleResize=()=>{cancelAnimationFrame(rafId);rafId=requestAnimationFrame(setVh);};window.addEventListener(\"resize\",handleResize);return()=>{window.removeEventListener(\"resize\",handleResize);cancelAnimationFrame(rafId);};},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,height:\"calc(var(--vh, 1vh) * 100)\",transition:\"height 0.3s ease\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDynamicViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withDynamicViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicViewport.map"],"mappings":"2HAAwE,SAAgB,EAA0B,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAC,IAAM,MAAU,CAAC,IAAM,EAAG,EAAO,YAAY,IAAI,SAAS,gBAAgB,MAAM,YAAY,OAAO,GAAG,EAAG,GAAG,CAAE,EACzQ,EAAM,EACN,IAAI,EAAY,MAAiB,CAAC,qBAAqB,CAAK,EAAE,EAAM,sBAAsB,CAAK,CAAE,EAAiD,OAA/C,EAAO,iBAAiB,SAAS,CAAY,MAAY,CAAC,EAAO,oBAAoB,SAAS,CAAY,EAAE,qBAAqB,CAAK,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,6BAA6B,WAAW,kBAAkB,CAAC,CAAC,EAAI,qBAFnV,IAA6B"}