{"version":3,"file":"DynamicViewportHeight.BybNHSCK.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/rWn0Stx2C1K44bzXWOGX/f0yHXE88XQEjF8yBezZg/DynamicViewportHeight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";/**\n * Usage: apply to a layer that already uses `vh` heights in canvas styles.\n * Converts `height`, `minHeight`, and `maxHeight` from `vh` to `dvh` while preserving the numeric value.\n */export const withDynamicViewportHeight=props=>{const style=props?.style??{};const toDvh=value=>{if(typeof value!==\"string\")return value;const trimmed=value.trim();if(!trimmed.endsWith(\"vh\")||trimmed.endsWith(\"dvh\")||trimmed.endsWith(\"svh\")||trimmed.endsWith(\"lvh\")){return value;}return trimmed.replace(/vh$/i,\"dvh\");};const nextHeight=toDvh(style.height);const nextMinHeight=toDvh(style.minHeight);const nextMaxHeight=toDvh(style.maxHeight);const changed=nextHeight!==style.height||nextMinHeight!==style.minHeight||nextMaxHeight!==style.maxHeight;if(!changed)return props;return{...props,style:{...style,height:nextHeight,minHeight:nextMinHeight,maxHeight:nextMaxHeight}};};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withwithDynamicViewportHeight(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...withDynamicViewportHeight(props)});};}withwithDynamicViewportHeight.displayName=\"withDynamicViewportHeight\";\nexport const __FramerMetadata__ = {\"exports\":{\"withwithDynamicViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withwithDynamicViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDynamicViewportHeight\":{\"type\":\"override\",\"name\":\"withDynamicViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicViewportHeight.map"],"mappings":"mKAGyzB,SAAgB,EAA8B,EAAE,CAAC,MAAO,KAAQ,EAA+BA,CAAuC,EAASC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAA0B,CAAK,CAAC,CAAC,EAAI,mBAHv9B,IAG2rB,IAAmF,EAAxyB,EAA0B,GAAO,CAAC,IAAM,EAAM,GAAO,OAAO,CAAC,EAAQ,EAAM,GAAO,CAAC,GAAG,OAAO,GAAQ,SAAS,OAAO,EAAM,IAAM,EAAQ,EAAM,KAAK,EAAuH,MAAlH,CAAC,EAAQ,SAAS,IAAI,GAAG,EAAQ,SAAS,KAAK,GAAG,EAAQ,SAAS,KAAK,GAAG,EAAQ,SAAS,KAAK,EAAU,EAAc,EAAQ,QAAQ,OAAO,KAAK,CAAE,EAAQ,EAAW,EAAM,EAAM,MAAM,EAAQ,EAAc,EAAM,EAAM,SAAS,EAAQ,EAAc,EAAM,EAAM,SAAS,EAAqI,OAArH,IAAa,EAAM,QAAQ,IAAgB,EAAM,WAAW,IAAgB,EAAM,UAAyC,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,OAAO,EAAW,UAAU,EAAc,UAAU,CAAa,CAAC,EAAxG,CAA0G,EAA8V,EAA8B,YAAY"}