{"version":3,"file":"PageHeroFill.IgPOTFYf.mjs","names":["React.useMemo","React.useLayoutEffect","React.useEffect","__esmMin","pe","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","le","ce","init_framer_CcflMUCW","addPropertyControls","ControlType","sanitizeId","safe","rawId","findCommonAncestor","a","b","ancestors","current","collectHeroAncestors","result","hero","stopExclusive","PageHeroFill","props","markerId","heroId","nav","footer","heroAncestors","originalHeroSizing","styleTag","NAVY","originalStyles","applyNavy","element","ancestor","updateTabletSizing","width","navHeight","footerHeight","minHeight","resizeObserver","inlineStyle","style","init_PageHeroFill","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/0pvvgppsQTXII2xDfxyC/oNjWJPhJ8A3v4ipFh6IV/PageHeroFill.js"],"sourcesContent":["// User request: Create ONLY new code component PageHeroFill.tsx for /sign-up, /readers, /check-your-inbox to apply page-local navy background (#0B2346) and tablet hero grow behavior between nav/footer without shared layout changes; use heroId prop, SSR-safe runtime styling, scoped :has() selectors, ancestor background application, resize/ResizeObserver handling, and full cleanup.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const NAVY=\"#0B2346\";function sanitizeId(rawId){const trimmed=rawId.trim();const safe=trimmed.replace(/[^a-zA-Z0-9\\-_:.]/g,\"-\");return safe.length>0?safe:\"page-hero-fill\";}function findCommonAncestor(a,b){if(!a||!b)return null;const ancestors=new Set;let current=a;while(current){ancestors.add(current);current=current.parentElement;}current=b;while(current){if(ancestors.has(current))return current;current=current.parentElement;}return null;}function collectHeroAncestors(hero,stopExclusive){const result=[];let current=hero.parentElement;while(current&&current!==stopExclusive){result.push(current);current=current.parentElement;}return result;}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function PageHeroFill(props){const{heroId,style}=props;const markerId=React.useMemo(()=>sanitizeId(heroId),[heroId]);const useIsoLayoutEffect=typeof window!==\"undefined\"?React.useLayoutEffect:React.useEffect;useIsoLayoutEffect(()=>{if(typeof window===\"undefined\")return;if(typeof document===\"undefined\")return;const hero=document.getElementById(markerId);if(!hero)return;const nav=document.querySelector(\"nav\");const footer=document.querySelector(\"footer\");const sharedRoot=findCommonAncestor(nav,footer);const heroAncestors=collectHeroAncestors(hero,sharedRoot);const originalHeroSizing={minHeight:hero.style.minHeight,height:hero.style.height,flexGrow:hero.style.flexGrow};const styleTag=document.createElement(\"style\");styleTag.setAttribute(\"data-page-hero-fill-style\",markerId);styleTag.textContent=`\nhtml:has(#${markerId}),\nbody:has(#${markerId}) {\n    background-color: ${NAVY} !important;\n}\n`;document.head.appendChild(styleTag);const originalStyles=new Map;const applyNavy=element=>{if(!originalStyles.has(element)){originalStyles.set(element,element.getAttribute(\"style\"));}element.style.backgroundColor=NAVY;};heroAncestors.forEach(ancestor=>{if(ancestor===nav||ancestor===footer)return;if(nav&&ancestor.contains(nav)||footer&&ancestor.contains(footer))return;applyNavy(ancestor);});if(!originalStyles.has(hero)){originalStyles.set(hero,hero.getAttribute(\"style\"));}const updateTabletSizing=()=>{const width=window.innerWidth;if(width>=810&&width<1200){const navHeight=nav?.getBoundingClientRect().height??0;const footerHeight=footer?.getBoundingClientRect().height??0;const minHeight=Math.max(0,window.innerHeight-navHeight-footerHeight);hero.style.minHeight=`${minHeight}px`;hero.style.height=\"auto\";hero.style.flexGrow=\"1\";}else{hero.style.minHeight=originalHeroSizing.minHeight;hero.style.height=originalHeroSizing.height;hero.style.flexGrow=originalHeroSizing.flexGrow;}};updateTabletSizing();window.addEventListener(\"resize\",updateTabletSizing);const resizeObserver=typeof ResizeObserver!==\"undefined\"?new ResizeObserver(()=>{updateTabletSizing();}):null;if(resizeObserver&&nav)resizeObserver.observe(nav);if(resizeObserver&&footer)resizeObserver.observe(footer);return()=>{window.removeEventListener(\"resize\",updateTabletSizing);resizeObserver?.disconnect();for(const[element,inlineStyle]of originalStyles.entries()){if(inlineStyle===null){element.removeAttribute(\"style\");}else{element.setAttribute(\"style\",inlineStyle);}}if(styleTag.parentNode){styleTag.parentNode.removeChild(styleTag);}};},[markerId]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",width:0,height:0,minHeight:0,flexGrow:0,padding:0,margin:0,pointerEvents:\"none\",overflow:\"hidden\",...style}});}addPropertyControls(PageHeroFill,{heroId:{type:ControlType.String,title:\"Hero ID\",defaultValue:\"page-hero-fill\"},style:{type:ControlType.Object,title:\"Style\",controls:{},defaultValue:{}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageHeroFill\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageHeroFill.map"],"mappings":"A,4LACgJ,SAASa,EAAW,EAAM,CAA4B,IAAMC,EAAnBC,EAAM,KAAwB,CAAC,CAAC,QAAQ,qBAAqB,GAAG,EAAE,OAAOD,EAAK,OAAO,EAAEA,EAAK,gBAAiB,CAAC,SAASE,EAAmB,EAAE,EAAE,CAAC,GAAG,CAACC,GAAG,CAACC,EAAE,OAAO,KAAK,IAAMC,kBAAU,IAAI,IAAQC,EAAQH,EAAE,KAAMG,GAASD,EAAU,IAAIC,CAAO,EAAE,EAAQA,EAAQ,cAAyB,IAAV,EAAQF,EAAQE,GAAQ,CAAC,GAAGD,EAAU,IAAIC,CAAO,EAAE,OAAOA,EAAQ,EAAQA,EAAQ,aAAc,CAAC,OAAO,IAAK,CAAC,SAASC,EAAqB,EAAK,EAAc,CAAC,IAAMC,EAAO,CAAC,EAAMF,EAAQG,EAAK,cAAc,KAAMH,GAASA,IAAUI,GAAeF,EAAO,KAAKF,CAAO,EAAE,EAAQA,EAAQ,cAAe,OAAOE,CAAO,CAG/vB,SAAwBG,EAAa,EAAM,CAAC,GAAK,CAAC,SAAO,SAAOC,EAAYC,EAAS3B,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