{"version":3,"file":"DynamicViewportHeight.fgWSOEr6.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/44qk0qKVME3V7032zHwI/3ciytcldZDvPzfc9XbZ3/DynamicViewportHeight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";/**\n * @framerDisableUnlink\n */export function withDynamicViewportHeight(Component){return props=>{const[dvh,setDvh]=useState(\"100vh\");useEffect(()=>{const updateDvh=()=>{const vh=window.innerHeight*.01;document.documentElement.style.setProperty(\"--dvh\",`${vh}px`);setDvh(`${window.innerHeight}px`);};updateDvh();window.addEventListener(\"resize\",updateDvh);return()=>window.removeEventListener(\"resize\",updateDvh);},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,height:dvh}});};}export function withSmallViewportHeight(Component){return props=>{const[svh,setSvh]=useState(\"100vh\");useEffect(()=>{const setInitialSvh=()=>{const vh=window.innerHeight*.01;document.documentElement.style.setProperty(\"--svh\",`${vh}px`);setSvh(`${window.innerHeight}px`);};setInitialSvh();// We're not adding any resize listeners to keep it static\n},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,height:svh}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSmallViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withSmallViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDynamicViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withDynamicViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicViewportHeight.map"],"mappings":"kIAE4d,SAAgB,EAAwB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAI,GAAQA,EAAS,QAAQ,CAC3jB,OAD4jB,MAAc,MAAyB,CAAC,IAAM,EAAG,EAAO,YAAY,IAAI,SAAS,gBAAgB,MAAM,YAAY,QAAQ,GAAG,EAAG,IAAI,CAAC,EAAO,GAAG,EAAO,YAAY,IAAI,IAAkB,EACzvB,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,EAAI,CAAC,CAAC,uBAH3C,IAAsC"}