{"version":3,"file":"Preloader.4QeZMW3b.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/SSx3HORaubrY5GVvCtTE/IrkANL0bugzmBMf9eHDB/Preloader.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useState}from\"react\";/**\n * Der Wert lebt nur so lange wie das aktuelle Browser-Dokument.\n *\n * Framer-interne Navigation: bleibt erhalten -> kein weiterer Preloader\n * Neuer Tab / Reload / direkter Aufruf: wird zurückgesetzt -> Preloader läuft\n */let hasPreloaderPlayed=false;// Dauer bis zum Ausblenden und Dauer der Ausblendanimation in Millisekunden.\nconst DISPLAY_DURATION=2600;const EXIT_DURATION=600;export function withPreloader(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isVisible,setIsVisible]=useState(!hasPreloaderPlayed);const[isExiting,setIsExiting]=useState(false);useEffect(()=>{// Bei einem Framer-internen Seitenwechsel sofort ausblenden.\nif(hasPreloaderPlayed){setIsVisible(false);return;}hasPreloaderPlayed=true;const prefersReducedMotion=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;const previousOverflow=document.body.style.overflow;document.body.style.overflow=\"hidden\";const exitDelay=prefersReducedMotion?100:DISPLAY_DURATION;const exitLength=prefersReducedMotion?0:EXIT_DURATION;const exitTimer=window.setTimeout(()=>{setIsExiting(true);},exitDelay);const hideTimer=window.setTimeout(()=>{setIsVisible(false);document.body.style.overflow=previousOverflow;},exitDelay+exitLength);return()=>{window.clearTimeout(exitTimer);window.clearTimeout(hideTimer);document.body.style.overflow=previousOverflow;};},[]);if(!isVisible)return null;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,initial:{opacity:1,scale:1},animate:{opacity:isExiting?0:1,scale:isExiting?1.015:1},transition:{duration:EXIT_DURATION/1e3,ease:[.76,0,.24,1]},style:{...props.style,position:\"fixed\",inset:0,width:\"100vw\",height:\"100dvh\",zIndex:2147483647,pointerEvents:\"auto\"}});});}\nexport const __FramerMetadata__ = {\"exports\":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