{"version":3,"file":"withMobileExplorerDialogKeys.C3v8wc6v.mjs","names":["React.useRef","__esmMin","window","init_npm_react_18_3_1","init_ssg_sandbox_shims","ce","init_jsx_runtime","J","de","withMobileDockSafeArea","Component","props","init_withMobileDockSafeArea","withMobileExplorerDialogKeys","previousFocusRef","openedUrl","departing","active","closeButton","onKeyDown","event","close","onNavigate","target","anchor","destination","trigger","init_withMobileExplorerDialogKeys"],"sources":["https:/framerusercontent.com/modules/pGUnRQVG5myUbymR9Ntr/5n9VSIR3XCANQuI4u9Vn/withMobileDockSafeArea.js","https:/framerusercontent.com/modules/oDEuZZ8ACDWr3EYAd1bO/9DAMQNQ6Q6GPyXfMDIiW/withMobileExplorerDialogKeys.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";export function withMobileDockSafeArea(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,paddingBottom:\"calc(10px + env(safe-area-inset-bottom))\",background:\"rgb(23,25,22)\",borderTop:\"1px solid rgba(191,165,116,.267)\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withMobileDockSafeArea\":{\"type\":\"reactHoc\",\"name\":\"withMobileDockSafeArea\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./withMobileDockSafeArea.map","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";export function withMobileExplorerDialogKeys(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const previousFocusRef=React.useRef(null);React.useEffect(()=>{if(typeof document===\"undefined\"||typeof window===\"undefined\")return;const openedUrl=window.location.pathname+window.location.search;let departing=false;const active=document.activeElement;previousFocusRef.current=active instanceof HTMLElement?active:null;const closeButton=document.getElementById(\"laroze-mobile-explorer-close\");if(closeButton instanceof HTMLElement){closeButton.focus({preventScroll:true});}const onKeyDown=event=>{if(event.key!==\"Escape\")return;const close=document.getElementById(\"laroze-mobile-explorer-close\");if(close instanceof HTMLElement){close.click();}};const onNavigate=event=>{const target=event.target;if(!(target instanceof Element)||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey)return;const anchor=target.closest(\"a[href]\");if(!anchor||!anchor.closest(\"nav\")||anchor.target===\"_blank\"||anchor.hasAttribute(\"download\"))return;const close=document.getElementById(\"laroze-mobile-explorer-close\");if(!(close instanceof HTMLElement))return;const destination=new URL(anchor.href,window.location.href);if(destination.origin!==window.location.origin)return;departing=destination.pathname+destination.search!==openedUrl;window.setTimeout(()=>{if(close.isConnected)close.click();},0);};document.addEventListener(\"click\",onNavigate);window.addEventListener(\"keydown\",onKeyDown);return()=>{document.removeEventListener(\"click\",onNavigate);window.removeEventListener(\"keydown\",onKeyDown);if(departing||openedUrl!==window.location.pathname+window.location.search)return;const trigger=document.getElementById(\"laroze-mobile-explorer-trigger\");if(trigger instanceof HTMLElement){trigger.focus({preventScroll:true});return;}if(previousFocusRef.current&&document.contains(previousFocusRef.current)){previousFocusRef.current.focus({preventScroll:true});}};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withMobileExplorerDialogKeys\":{\"type\":\"reactHoc\",\"name\":\"withMobileExplorerDialogKeys\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./withMobileExplorerDialogKeys.map"],"mappings":"A,yIAAuE,SAAgBS,EAAuB,EAAU,CAAC,MAAoB,iBAAkB,EAAM,IAA2B,gBAAKC,EAAU,CAAK,MAAI,GAAGC,EAAM,MAAM,CAAC,GAAGA,EAAM,MAAM,cAAc,2CAA2C,WAAW,gBAAgB,UAAU,kCAAkC,CAAC,CAAC,CAAG,CAAE,C,4CCAvT,SAAgBE,EAA6B,EAAU,CAAC,MAAoB,iBAAkB,EAAM,IAAM,CAAC,IAAMC,EAAiBd,EAAa,IAAI,EAAsxD,OAApxDK,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