{"version":3,"file":"LoadingScreen.0N5RJ2ud.mjs","names":["useState","useEffect","_jsx","_jsxs","_Fragment","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","l","_e","p","c","init_jsx_runtime","ce","isPhone","PHONE_QUERY","seenThisVisit","hasPlayed","SEEN_KEY","markSeen","markSkipped","LoadingScreen","Component","props","skip","phase","setPhase","holdTimer","exitTimer","EXIT_DURATION","HOLD_DURATION","EarlyTags","HeroAfterIntro","HeroAfterIntroSoft","usePearButtonStyle","s","PEAR_BTN_CSS","addClass","extra","HeroAfterIntroButton","PearButton","EARLY_CHECK","EARLY_HIDE","init_LoadingScreen"],"sources":["https:/framerusercontent.com/modules/iH2AmxGodvjapDs4KNtY/kzdhjIUNLHW3Kac02gRQ/LoadingScreen.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const HOLD_DURATION=2.5// seconds before exit starts\n;const EXIT_DURATION=.8// seconds for the slide-up exit\n;const SEEN_KEY=\"pear-intro-seen\";// 11-25 v2: phones skip the intro. On a phone the Rive intro took 4-6.7 s to\n// download and draw, so people saw a blank mint screen. Same width as the\n// Framer Phone breakpoint (below 810 px). Desktop and laptop are unchanged.\nconst PHONE_QUERY=\"(max-width: 809.98px)\";function isPhone(){try{return window.matchMedia(PHONE_QUERY).matches;}catch{return false;}}// The intro plays once per visit. A visit lasts as long as the browser tab\n// stays open: after the intro has played once, coming back to Home (by link,\n// logo, back button or reload) skips it. Closing the tab and opening the\n// site again starts a new visit, so it plays once more.\n//\n// hasPlayed covers in-site navigation; sessionStorage covers full page loads.\n// On a full page load the inline script below runs before the first paint\n// and marks the page, so the CSS hides the server-rendered intro right away\n// instead of flashing it before the code takes over. The same mark makes\n// the hero (HeroAfterIntro below) show at once rather than wait for an\n// intro that is not playing.\nlet hasPlayed=false;function seenThisVisit(){if(hasPlayed)return true;if(isPhone())return true;try{return window.sessionStorage.getItem(SEEN_KEY)===\"1\";}catch{return false;}}function markSeen(){hasPlayed=true;try{window.sessionStorage.setItem(SEEN_KEY,\"1\");}catch{}}const EARLY_CHECK=`try{if(sessionStorage.getItem(\"${SEEN_KEY}\")===\"1\"||matchMedia(\"${PHONE_QUERY}\").matches)document.documentElement.setAttribute(\"data-pear-intro-seen\",\"\")}catch(e){}`;const EARLY_HIDE=`html[data-pear-intro-seen] .pear-intro{display:none!important}html[data-pear-intro-seen] .pear-hero{opacity:1!important;transform:none!important;filter:none!important}html[data-pear-intro-seen] .pear-hero-soft{opacity:.8!important}`;function markSkipped(){try{document.documentElement.setAttribute(\"data-pear-intro-seen\",\"\");}catch{}}const EarlyTags=()=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"script\",{dangerouslySetInnerHTML:{__html:EARLY_CHECK}}),/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:EARLY_HIDE}})]});export function LoadingScreen(Component){return function(props){const[skip]=useState(hasPlayed);const[phase,setPhase]=useState(skip?\"gone\":\"visible\");useEffect(()=>{if(skip){markSkipped();return;}if(seenThisVisit()){hasPlayed=true;markSkipped();setPhase(\"gone\");return;}markSeen();const holdTimer=setTimeout(()=>{setPhase(\"exiting\");const exitTimer=setTimeout(()=>{setPhase(\"gone\");},EXIT_DURATION*1e3);return()=>clearTimeout(exitTimer);},HOLD_DURATION*1e3);return()=>{clearTimeout(holdTimer);};},[]);if(phase===\"gone\")return /*#__PURE__*/_jsx(EarlyTags,{});return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(EarlyTags,{}),/*#__PURE__*/_jsx(Component,{...props,className:props.className?`${props.className} pear-intro`:\"pear-intro\",style:{...props.style,opacity:1},animate:{y:phase===\"exiting\"?\"-100%\":\"0%\"},transition:phase===\"exiting\"?{duration:EXIT_DURATION,ease:[.76,0,.24,1]}:{duration:0}})]});};}// Put on the hero layers whose entrance waits for the intro (heading,\n// subtitle, button). When the intro is skipped they show straight away\n// instead of waiting out the intro's delay on a blank hero.\nexport function HeroAfterIntro(Component){return function(props){return /*#__PURE__*/_jsx(Component,{...props,className:props.className?`${props.className} pear-hero`:\"pear-hero\"});};}// Same as HeroAfterIntro for a layer that rests at 80% opacity (the\n// \"Join the waitlist\" button label).\nexport function HeroAfterIntroSoft(Component){return function(props){return /*#__PURE__*/_jsx(Component,{...props,className:props.className?`${props.className} pear-hero pear-hero-soft`:\"pear-hero pear-hero-soft\"});};}// 11-27: \"Begin Search\" pill buttons (Home hero, /company-2 Blurb).\n// Hover (mouse only): the arrow circle (the button's last child) eases out\n// 14px, so the pill grows longer. Press/tap: the whole pill dips to 96%.\n// Uses the CSS `scale` property, which stacks with (and isn't overridden by)\n// the hero's transform rules. A no-op touchstart listener makes :active fire\n// on iOS.\nconst PEAR_BTN_CSS=\".pear-btn{scale:1;transition:scale .18s cubic-bezier(.22,1,.36,1)}\"+\".pear-btn>:last-child{transition:margin-left .35s cubic-bezier(.22,1,.36,1)}\"+\"@media (hover:hover){.pear-btn:hover>:last-child{margin-left:14px}}\"+\".pear-btn:active{scale:.96}\";function usePearButtonStyle(){useEffect(()=>{if(typeof document===\"undefined\")return;if(document.getElementById(\"pear-btn-css\"))return;const s=document.createElement(\"style\");s.id=\"pear-btn-css\";s.textContent=PEAR_BTN_CSS;document.head.appendChild(s);document.addEventListener(\"touchstart\",()=>{},{passive:true});},[]);}function addClass(props,extra){return props.className?`${props.className} ${extra}`:extra;}// HeroAfterIntro + the button behaviour (Home hero \"Begin Search\").\nexport function HeroAfterIntroButton(Component){return function(props){usePearButtonStyle();return /*#__PURE__*/_jsx(Component,{...props,className:addClass(props,\"pear-hero pear-btn\")});};}// Button behaviour only (other \"Begin Search\" pills, e.g. /company-2).\nexport function PearButton(Component){return function(props){usePearButtonStyle();return /*#__PURE__*/_jsx(Component,{...props,className:addClass(props,\"pear-btn\")});};}\nexport const __FramerMetadata__ = {\"exports\":{\"HeroAfterIntroSoft\":{\"type\":\"reactHoc\",\"name\":\"HeroAfterIntroSoft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HeroAfterIntroButton\":{\"type\":\"reactHoc\",\"name\":\"HeroAfterIntroButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HeroAfterIntro\":{\"type\":\"reactHoc\",\"name\":\"HeroAfterIntro\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"LoadingScreen\":{\"type\":\"reactHoc\",\"name\":\"LoadingScreen\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PearButton\":{\"type\":\"reactHoc\",\"name\":\"PearButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoadingScreen.map"],"mappings":"A,qJAK0C,SAASe,GAAS,CAAC,GAAG,CAAC,OAAOP,EAAO,WAAWQ,CAAW,CAAC,CAAC,OAAQ,MAAM,CAAC,MAAO,EAAM,CAAC,CAWhH,SAASC,GAAe,CAA0B,GAAtBC,GAAyBH,EAAQ,EAAE,MAAO,GAAK,GAAG,CAAC,OAAOP,EAAO,eAAe,QAAQW,CAAQ,IAAI,GAAI,MAAM,CAAC,MAAO,EAAM,CAAC,CAAC,SAASC,GAAU,CAACF,EAAU,GAAK,GAAG,CAACV,EAAO,eAAe,QAAQW,EAAS,GAAG,CAAE,MAAM,CAAC,CAAC,CAAqb,SAASE,GAAa,CAAC,GAAG,CAAC,SAAS,gBAAgB,aAAa,uBAAuB,EAAE,CAAE,MAAM,CAAC,CAAC,CAAoN,SAAgBC,EAAcC,EAAU,CAAC,OAAO,SAASC,EAAM,CAAC,GAAK,CAACC,GAAMzB,EAASkB,CAAS,EAAO,CAACQ,EAAMC,GAAU3B,EAASyB,EAAK,OAAO,SAAS,EAA0Z,OAAxZxB,MAAc,CAAC,GAAGwB,EAAK,CAACJ,EAAY,EAAE,MAAO,CAAC,GAAGJ,EAAc,EAAE,CAACC,EAAU,GAAKG,EAAY,EAAEM,EAAS,MAAM,EAAE,MAAO,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