Files
michaelschiemer/public/assets/js/styles-BakdR78l.js
Michael Schiemer 55a330b223 Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
2025-08-11 20:13:26 +02:00

2 lines
31 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var e,t=Object.defineProperty;class n{static log(...e){this._write("log","[LOG]",e)}static warn(...e){this._write("warn","[WARN]",e)}static info(...e){this._write("info","[INFO]",e)}static error(...e){this._write("error","[ERROR]",e)}static _write(e,t,n){if(!this.enabled)return;const i=`${t} [${(new Date).toLocaleTimeString("de-DE")}] ${n.map(e=>{if(e instanceof Error)return`${e.name}: ${e.message}\n${e.stack||""}`;if("object"==typeof e&&null!==e)try{return JSON.stringify(e)}catch(t){return"[Circular Object]"}return e}).join(" ")}`;if(console[e],l&&"function"==typeof l.log)try{l.log(i)}catch(o){}}}((e,n,i)=>{n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i})(n,"symbol"!=typeof(e="enabled")?e+"":e,!0);const i=new Map;let o=!1,s=!1;performance.now();const r=document.createElement("div");r.style.position="fixed",r.style.bottom="0",r.style.left="0",r.style.font="12px monospace",r.style.color="#0f0",r.style.background="rgba(0,0,0,0.75)",r.style.padding="0.25rem 0.5rem",r.style.zIndex="9999",r.style.pointerEvents="none",r.style.display="none";const a=`<div style="width:${Math.min(0,100)}%;height:4px;background:#0f0;margin-top:4px;"></div>`;r.innerHTML+=a,r.style.lineHeight="1.4",document.body.appendChild(r);const l=new class{constructor({fps:e=!0}={}){this.fpsEnabled=e,this.fps=0,this.frameCount=0,this.lastTime=performance.now(),this.visible=!1,this.taskTimings=new Map,this.logs=[],this.container=document.createElement("div"),this.container.style.position="fixed",this.container.style.bottom="0",this.container.style.left="0",this.container.style.font="12px Consolas, monospace",this.container.style.color="#0f0",this.container.style.background="rgba(0,0,0,0.75)",this.container.style.padding="0.5rem",this.container.style.zIndex="9999",this.container.style.pointerEvents="none",this.container.style.lineHeight="1.4",this.container.style.whiteSpace="pre",this.container.style.display="none",document.body.appendChild(this.container),window.addEventListener("keydown",e=>{"§"===e.key&&(this.visible=!this.visible,this.container.style.display=this.visible?"block":"none")})}log(e){const t=(new Date).toLocaleTimeString();this.logs.push(`[${t}] ${e}`),this.logs.length>5&&this.logs.shift()}update(e=new Map){this.frameCount++;const t=performance.now();if(t-this.lastTime>=1e3){this.fps=this.frameCount,this.frameCount=0,this.lastTime=t;const n=[];for(const[e,t]of this.taskTimings.entries())n.push(`${e}: ${t.toFixed(2)}ms`);const i=Math.min(2*this.fps,100),o=this.logs.slice().reverse().join("\n");this.container.innerHTML=`\nFPS: ${this.fps} | Tasks: ${e.size}\n${n.join("\n")}\n<div style="width:${i}%;height:4px;background:#0f0;margin-top:4px;"></div>\n${o?"\nLogs:\n"+o:""}\n `}}trackTask(e,t){const n=performance.now();t();const i=performance.now()-n;this.taskTimings.set(e,i)}};function c(e,t,r={}){i.set(e,t),r.autoStart&&!o&&function(){if(o)return;function e(){for(const[e,o]of i)try{s?l.trackTask(e,o):o()}catch(t){n.warn("[Frameloop] Fehler in Task:",t)}s&&l.update(i),requestAnimationFrame(e)}o=!0,requestAnimationFrame(e)}()}function d(e){i.delete(e)}window.addEventListener("keydown",e=>{"§"===e.key&&(s=!s,r.style.display=s?"block":"none")});let u="example-module",h=null,p=null;const f=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){n.info("[example-module] destroy"),h&&(window.removeEventListener("resize",h),h=null),d(u),p&&"function"==typeof p.cleanup&&p.cleanup(),p=null},init:function(e={},t=null){n.info("[example-module] init"),p=t,p&&(p.register("windowSize",{width:window.innerWidth,height:window.innerHeight}),p.register("scrollPosition",{x:0,y:0}),p.register("isVisible",!0)),h=()=>{const e={width:window.innerWidth,height:window.innerHeight};n.info("Fenstergröße geändert:",e),p&&p.set("windowSize",e)},window.addEventListener("resize",h),c(u,()=>{const e=window.scrollY,t=window.scrollX;if(p){const n=p.get("scrollPosition");n.x===t&&n.y===e||p.set("scrollPosition",{x:t,y:e})}},{autoStart:!0})}},Symbol.toStringTag,{value:"Module"}));let m,g="inertia-scroll",y=0,b=window.scrollY,w=!1,v=.9,S=.2;function M(){w=!0,clearTimeout(m),m=setTimeout(()=>{w=!1},50)}const E=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){window.removeEventListener("scroll",M),d(g),y=0,b=window.scrollY,w=!1,clearTimeout(m);const e=document.documentElement;delete e.dataset.scrollState,delete e.dataset.scrollDirection,delete e.dataset.scrollSpeed},init:function(e={}){v="number"==typeof e.damping?e.damping:.9,S="number"==typeof e.minVelocity?contig.minVelocity:.1,window.addEventListener("scroll",M,{passive:!0}),c(g,()=>{const e=document.documentElement,t=window.scrollY,n=t-b,i=n>0?"down":n<0?"up":"none",o=Math.abs(n);!w&&Math.abs(y)>S?(window.scrollTo(0,t+y),y*=v,e.dataset.scrollState="inertia"):w?(y=n,b=t,e.dataset.scrollState="active"):delete e.dataset.scrollState,e.dataset.scrollDirection=i,e.dataset.scrollSpeed=o.toFixed(2)},{autoStart:!0})}},Symbol.toStringTag,{value:"Module"})),$=new Map,k={add(e,t,n,{module:i="global",options:o=!1}={}){e.addEventListener(t,n,o),$.has(i)||$.set(i,[]),$.get(i).push([e,t,n,o])},removeModule(e){const t=$.get(e);t&&(t.forEach(([e,t,n,i])=>{e.removeEventListener(t,n,i)}),$.delete(e))},clearAll(){for(const[e,t]of $.entries())t.forEach(([e,t,n,i])=>{e.removeEventListener(t,n,i)});$.clear()},debug(){}};function x(e,t,n,i=import.meta,o=!1){var s;const r="string"==typeof i?i:(null==(s=i.url)?void 0:s.split("/").slice(-2,-1)[0])||"unknown";return k.add(e,t,n,{module:r,options:o}),()=>{k.removeModule(r)}}class _{constructor({content:e="",className:t="",onClose:n=null}={}){this.onClose=n,this.dialog=document.createElement("dialog"),this.dialog.className=t,this.dialog.innerHTML=`\n <form method="dialog" class="${t}-content">\n ${e}\n <button class="${t}-close" value="close">×</button>\n </form>\n `,x(this.dialog,"click",e=>{!e.target.closest(t+"-content")&&this.close()}),x(this.dialog,"cancel",e=>{e.preventDefault(),this.close()})}open(){var e,t;document.body.appendChild(this.dialog),(null==(t=(e=this.dialog).showModal)?void 0:t.call(e))||this.dialog.setAttribute("open",""),document.documentElement.dataset[`${this.dialog.className}Open`]="true"}close(){var e,t,n;(null==(t=(e=this.dialog).close)?void 0:t.call(e))||this.dialog.removeAttribute("open"),this.dialog.remove(),delete document.documentElement.dataset[`${this.dialog.className}Open`],null==(n=this.onClose)||n.call(this)}}const j={modal:class extends _{constructor(e){super({...e,className:"modal"})}}},O={open(e,t={}){const i=j[e];if(!i)return n.warn(`[UIManager] Unknown type: ${e}`),null;const o=new i(t);return o.open(),o},close(e){(null==e?void 0:e.close)&&e.close()}};function A(e){const t=e.target.closest("[data-lightbox]");t&&"IMG"===t.tagName&&(e.preventDefault(),O.open("lightbox",{content:`<img src="${t.src}" alt="${t.alt||""}" />`}))}const z=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){n.info("[lightbox-trigger] destroy")},init:function(){n.info("[lightbox-trigger] init"),x(document,"click",A)}},Symbol.toStringTag,{value:"Module"}));const L=Object.freeze(Object.defineProperty({__proto__:null,init:function(e={}){n.log("Noise Toggle Init",e);const{selector:t=".noise-overlay",toggleKey:i="g",className:o="grainy",enableTransition:s=!0}=e,r=document.body,a=document.querySelector(t);if(!a)return;function l(){s?a.classList.toggle("hidden",!r.classList.contains(o)):a.style.display=r.classList.contains(o)?"block":"none"}l(),document.addEventListener("keydown",e=>{var t;e.key.toLowerCase()!==i||e.ctrlKey||e.metaKey||e.altKey||(t=e.target,["input","textarea"].includes(t.tagName.toLowerCase()))||(r.classList.toggle(o),l())})}},Symbol.toStringTag,{value:"Module"}));const T=Object.freeze(Object.defineProperty({__proto__:null,init:function(e={}){n.info("Parallax init");const t={selector:"[data-parallax]",speedAttr:"data-parallax-speed",defaultSpeed:.5,...e},i=document.querySelectorAll(t.selector);c("parallax",function(){const e=window.scrollY;i.forEach(n=>{const i=parseFloat(n.getAttribute(t.speedAttr))||t.defaultSpeed,o=e*i;n.style.transform=`translateY(${o}px)`})},{autoStart:!0})}},Symbol.toStringTag,{value:"Module"}));class P{constructor(){this.modules=new Map,this.dependents=new Map,this.initialized=new Set,this.initializing=new Set,this.initializationOrder=[]}register(e){this.modules.has(e.name)?n.warn(`[DependencyManager] Module '${e.name}' already registered`):this.validateDefinition(e)&&(this.modules.set(e.name,e),e.dependencies.forEach(t=>{this.dependents.has(t.name)||this.dependents.set(t.name,[]),this.dependents.get(t.name).push(e.name)}),n.info(`[DependencyManager] Registered '${e.name}' v${e.version}`))}calculateInitializationOrder(){const e=new Set,t=new Set,i=[],o=n=>{if(t.has(n))throw new Error(`Circular dependency detected involving '${n}'`);if(e.has(n))return;const s=this.modules.get(n);s&&(t.add(n),s.dependencies.forEach(e=>{e.optional&&!this.modules.has(e.name)||o(e.name)}),t.delete(n),e.add(n),i.push(n))};return Array.from(this.modules.entries()).sort(([,e],[,t])=>(t.priority||0)-(e.priority||0)).map(([e])=>e).forEach(t=>{e.has(t)||o(t)}),this.initializationOrder=i,n.info(`[DependencyManager] Initialization order: ${i.join(" → ")}`),i}checkDependencies(e){const t=this.modules.get(e);if(!t)return{satisfied:!1,missing:[],reason:`Module '${e}' not registered`};const n=[],i=[];return t.dependencies.forEach(e=>{this.modules.get(e.name)?this.initialized.has(e.name)||e.optional||n.push(`${e.name} (not initialized)`):e.optional?i.push(e.name):n.push(e.name)}),{satisfied:0===n.length,missing:n,optional:i,reason:n.length>0?`Missing: ${n.join(", ")}`:"OK"}}markInitialized(e){this.initialized.add(e),this.initializing.delete(e),n.info(`[DependencyManager] '${e}' initialized`)}markInitializing(e){this.initializing.add(e)}getDependents(e){return this.dependents.get(e)||[]}getModule(e){return this.modules.get(e)}isReadyToInitialize(e){if(this.initialized.has(e)||this.initializing.has(e))return!1;return this.checkDependencies(e).satisfied}getStatus(){const e=this.modules.size,t=this.initialized.size,n=this.initializing.size;return{total:e,initialized:t,initializing:n,pending:e-t-n,modules:{initialized:Array.from(this.initialized),initializing:Array.from(this.initializing),pending:Array.from(this.modules.keys()).filter(e=>!this.initialized.has(e)&&!this.initializing.has(e))}}}validateDefinition(e){if(!e.name||"string"!=typeof e.name)return n.error("[DependencyManager] Module name is required and must be string"),!1;if(!e.version||"string"!=typeof e.version)return n.error(`[DependencyManager] Version is required for module '${e.name}'`),!1;if(!Array.isArray(e.dependencies))return n.error(`[DependencyManager] Dependencies must be array for module '${e.name}'`),!1;for(const t of e.dependencies)if(!t.name||"string"!=typeof t.name)return n.error(`[DependencyManager] Invalid dependency in module '${e.name}': missing name`),!1;return!0}reset(){this.modules.clear(),this.dependents.clear(),this.initialized.clear(),this.initializing.clear(),this.initializationOrder=[],n.info("[DependencyManager] Reset complete")}static createDefinition(e,t){const n={name:e,version:t,dependencies:[],provides:[],priority:0},i={depends(e,t="*",i=!1){return n.dependencies.push({name:e,version:t,optional:i}),this},provides(...e){return n.provides.push(...e),this},priority(e){return n.priority=e,this},build:()=>n};return Object.setPrototypeOf(i,n),Object.keys(n).forEach(e=>{e in i||Object.defineProperty(i,e,{get:()=>n[e],set(t){n[e]=t},enumerable:!0,configurable:!0})}),i}}const C=new P;"undefined"!=typeof window&&(window.dependencyManager=C,window.depStatus=()=>C.getStatus());const D=P.createDefinition("scroll-dependent","1.0.0").depends("example-module","1.0.0").depends("scrollfx","1.0.0",!0).provides("scroll-coordination").priority(10);let R=null,I=null;const q=Object.freeze(Object.defineProperty({__proto__:null,definition:D,destroy:function(){n.info("[scroll-dependent] destroy"),R&&I&&(I.unsubscribe(R),R=null),I&&"function"==typeof I.cleanup&&I.cleanup(),I=null},init:function(e={},t=null){n.info("[scroll-dependent] init"),I=t,I&&(I.register("isScrolling",!1),I.register("scrollDirection","none"),R=I.subscribe("example-module.scrollPosition",(e,t)=>{if(t.y!==e.y){const i=e.y>t.y?"down":"up";I.set("scrollDirection",i),I.set("isScrolling",!0),setTimeout(()=>{I&&I.set("isScrolling",!1)},150),n.info(`[scroll-dependent] Scroll ${i}: ${e.y}`)}}))}},Symbol.toStringTag,{value:"Module"}));const N=Object.freeze(Object.defineProperty({__proto__:null,init:function(e={}){const t=document.querySelectorAll("[data-scroll-loop]");t.forEach(e=>{if("translate"===(e.dataset.scrollType||"translate")&&1===e.children.length){const t=e.firstElementChild.cloneNode(!0);t.setAttribute("aria-hidden","true"),e.appendChild(t)}}),c("scroll-loop",()=>{const n=window.scrollY,i=window.scrollX;t.forEach(t=>{const o=parseFloat(t.dataset.scrollSpeed||e.speed||.2),s=t.dataset.scrollAxis||"y",r=t.dataset.scrollType||"translate",a="true"===t.dataset.loopPause,l=parseFloat(t.dataset.loopOffset||0),c=parseFloat(t.dataset.loopLimit||0),d="x"===s?i:n;if(c&&d>c)return;if(a&&(t.matches(":hover")||t.matches(":active")))return;const u=(d+l)*o;switch(r){case"translate":{const e=-u%("x"===s?t.offsetWidth:t.offsetHeight),n="x"===s?`translateX(${e}px)`:`translateY(${e}px)`;t.style.transform=n;break}case"rotate":{const e=u%360;t.style.transform=`rotate(${e}deg)`;break}case"background":{const e=u%100;t.style.backgroundPosition="x"===s?`${e}% center`:`center ${e}%`;break}case"scale":{const e=1+.1*Math.sin(.01*u);t.style.transform=`scale(${e.toFixed(3)})`;break}}})},{autoStart:!0})}},Symbol.toStringTag,{value:"Module"})),F={onEnter(e,t){t.classList.add("active"),document.body.dataset.activeScrollStep=e,n.info(`[ScrollStep] Enter: ${e}`),1===e&&n.info("Intro sichtbar"),2===e&&n.info("Chart aktiviert"),3===e&&n.info("Zitat eingeblendet")},onLeave(e,t){t.classList.remove("active"),t.style.transitionDelay="",n.info(`[ScrollStep] Leave: ${e}`),document.body.dataset.activeScrollStep===String(e)&&delete document.body.dataset.activeScrollStep,1===e&&n.info("Intro ausgeblendet"),2===e&&n.info("Chart deaktiviert"),3===e&&n.info("Zitat ausgeblendet")}};const H=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){d("scroll-timeline")},init:function(e={}){n.info("ScrollTimeline init");const t={attribute:"data-scroll-step",triggerPoint:.4,once:!0,...e},i=Array.from(document.querySelectorAll(`[${t.attribute}]`)).map(e=>({el:e,index:parseInt(e.getAttribute(t.attribute),10),active:!1}));c("scroll-timeline",function(){const e=window.innerHeight*t.triggerPoint;i.forEach(i=>{var o,s;const r=i.el.getBoundingClientRect(),a=r.top<e&&r.bottom>0;a&&!i.active&&(i.active=!0,i.el.classList.add("active"),n.log(`➡️ ENTER step ${i.index}`),null==(o=F.onEnter)||o.call(F,i.index,i.el)),!a&&i.active&&(i.active=!1,i.el.classList.remove("active"),n.log(`⬅️ LEAVE step ${i.index}`),t.once||null==(s=F.onLeave)||s.call(F,i.index,i.el))})},{autoStart:!0})}},Symbol.toStringTag,{value:"Module"}));const V=new class{constructor(){this.triggers=new Set,this.viewportHeight=window.innerHeight,this._loop=this._loop.bind(this),window.addEventListener("resize",()=>{this.viewportHeight=window.innerHeight}),requestAnimationFrame(this._loop)}register(e){this.triggers.add(e)}unregister(e){this.triggers.delete(e)}clear(){this.triggers.clear()}_loop(){this.triggers.forEach(e=>{e.update(this.viewportHeight)}),requestAnimationFrame(this._loop)}};class B{constructor(e){if(this.element=this.resolveElement(e.element),this.target=e.target?this.element.querySelector(e.target):this.element,e.target&&!this.target)throw new Error(`Target selector '${e.target}' not found inside element '${e.element}'.`);this.start=e.start||"top 80%",this.end=e.end||"bottom 20%",this.scrub=e.scrub||!1,this.onEnter=e.onEnter||null,this.onLeave=e.onLeave||null,this.onUpdate=e.onUpdate||null,this._wasVisible=!1,this._progress=0}resolveElement(e){if("string"==typeof e){const t=document.querySelectorAll(e);if(1===t.length)return t[0];throw new Error(`Selector '${e}' matched ${t.length} elements, expected exactly 1.`)}return e}getScrollProgress(e){const t=this.element.getBoundingClientRect(),n=this.parsePosition(this.start,e),i=this.parsePosition(this.end,e)-n,o=t.top-n;return 1-Math.min(Math.max(o/i,0),1)}parsePosition(e,t){const[n,i]=e.split(" ");return("top"===n?0:t)-t*(parseFloat(i)/100)}update(e){const t=this.element.getBoundingClientRect(),n=t.bottom>0&&t.top<e;if(n&&!this._wasVisible&&(this._wasVisible=!0,this.onEnter&&this.onEnter(this.target)),!n&&this._wasVisible&&(this._wasVisible=!1,this.onLeave&&this.onLeave(this.target)),this.scrub&&n){const t=this.getScrollProgress(e);this.onUpdate&&this.onUpdate(this.target,t)}}}const W=Object.freeze(Object.defineProperty({__proto__:null,createTrigger:function(e){const t="string"==typeof e.element?document.querySelectorAll(e.element):[e.element],n=[];return t.forEach(t=>{const i=new B({...e,element:t});V.register(i),n.push(i)}),1===n.length?n[0]:n},init:function(e={}){const{selector:t=".fade-in-on-scroll, .zoom-in, .fade-out, .fade",offset:n=.85,baseDelay:i=.05,once:o=!0}=e,s=Array.from(document.querySelectorAll(t)).map(e=>({el:e,triggered:!1}));requestAnimationFrame(function e(){const t=window.innerHeight*n;s.forEach((e,n)=>{if(e.triggered&&o)return;e.el.getBoundingClientRect().top<t?(e.el.style.transitionDelay=n*i+"s",e.el.classList.add("visible","entered"),e.el.classList.remove("fade-out"),e.triggered=!0):o||(e.el.classList.remove("visible","entered"),e.triggered=!1)}),requestAnimationFrame(e)})}},Symbol.toStringTag,{value:"Module"}));let U=null,Y=null;const K=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){var e;e="sidebar",Array.isArray(e)&&e.forEach(e=>{k.removeModule(e)})},init:function(){document.getElementById("sidebar-menu");const e=document.getElementById("menu-toggle"),t=document.getElementById("sidebar"),n=document.querySelector(".backdrop"),i=document.querySelector("footer"),o=document.querySelector("header a");x(e,"click",e=>{t.classList.toggle("show"),t.classList.contains("show")?(n.classList.add("visible"),i.setAttribute("inert","true"),o.setAttribute("inert","true")):(n.classList.remove("visible"),i.removeAttribute("inert"),o.removeAttribute("inert"))}),U=e=>{"Escape"===e.key&&t.classList.contains("show")&&(t.classList.remove("show"),n.classList.remove("visible"))},x(document,"keydown",U),Y=e=>{t.classList.remove("show"),n.classList.remove("visible"),i.removeAttribute("inert"),o.removeAttribute("inert")},x(n,"click",Y)}},Symbol.toStringTag,{value:"Module"})),G=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let X="sticky-fade",Z=[],J=window.scrollY,Q=new WeakMap,ee={direction:!1,reset:!1};const te=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){d(X),Z.forEach(e=>{e.style.opacity="",e.style.transform="",e.classList.remove("visible"),delete e.dataset.scrollDir}),Z=[],Q=new WeakMap},init:function(e={}){Z=Array.from(document.querySelectorAll("[data-sticky-fade]")),0!==Z.length&&(ee.direction=e.direction??!1,ee.reset=e.reset??!1,c(X,()=>{const e=window.scrollY,t=e>J?"down":e<J?"up":"none";J=e;const n=window.innerHeight;Z.forEach(e=>{const i=e.getBoundingClientRect(),o=1-Math.min(Math.max(i.top/n,0),1);if(e.style.opacity=o.toFixed(3),e.style.transform=`translateY(${20*(1-o)}px)`,ee.direction&&(e.dataset.scrollDir=t),ee.reset){const t=o>=1,n=Q.get(e)||!1;t&&!n?(e.classList.add("visible"),Q.set(e,!0)):!t&&n&&(e.classList.remove("visible"),Q.set(e,!1))}})},{autoStart:!0}))}},Symbol.toStringTag,{value:"Module"}));const ne=Object.freeze(Object.defineProperty({__proto__:null,destroy:function(){d("sticky-steps")},init:function(e={}){n.info("StickySteps init");const t={containerSelector:"[data-sticky-container]",stepSelector:"[data-sticky-step]",activeClass:"is-sticky-active",datasetKey:"activeStickyStep",...e};document.querySelectorAll(t.containerSelector).forEach(e=>{const n=e.querySelectorAll(t.stepSelector),i=e.offsetTop;c(`sticky-steps-${e.dataset.moduleId||Math.random()}`,function(){const o=window.scrollY,s=e.offsetHeight;n.forEach((r,a)=>{const l=i+a*(s/n.length),c=i+(a+1)*(s/n.length),d=o>=l&&o<c;r.classList.toggle(t.activeClass,d),d&&(e.dataset[t.datasetKey]=a)})},{autoStart:!0})})}},Symbol.toStringTag,{value:"Module"}));const ie=Object.freeze(Object.defineProperty({__proto__:null,init:function(){}},Symbol.toStringTag,{value:"Module"})),oe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),se={noise:{selector:".noise-overlay",toggleKey:"g",className:"grainy",enableTransition:!0},"shortcut-handler.js":{debug:!1},scrollfx:{selector:".fade-in-on-scroll, .zoom-in",offset:.8,baseDelay:.075,once:!0},"scroll-timeline":{attribute:"data-scroll-step",triggerPoint:.4,once:!1},"smooth-scroll":{speed:.2}};const re=new class{constructor(){this.crashedModules=new Set,this.recoveryAttempts=new Map,this.maxRecoveryAttempts=3,this.recoveryDelay=1e3}wrapModule(e,t){return e&&"object"==typeof e?new Proxy(e,{get:(e,n,i)=>{const o=e[n];if("function"!=typeof o)return o;const s=Object.getOwnPropertyDescriptor(e,n);return s&&!s.configurable?o:(...i)=>{try{const s=o.apply(e,i);return s&&"function"==typeof s.catch?s.catch(e=>(this.handleModuleError(e,t,n,i),this.getRecoveryValue(t,n))):s}catch(s){return this.handleModuleError(s,t,n,i),this.getRecoveryValue(t,n)}}},getOwnPropertyDescriptor:(e,t)=>{const n=Object.getOwnPropertyDescriptor(e,t);return n&&n.configurable,n},has:(e,t)=>t in e,ownKeys:e=>Object.getOwnPropertyNames(e)}):(n.warn(`[ErrorBoundary] Cannot wrap non-object module: ${t}`),e)}handleModuleError(e,t,i,o){const s=`${t}.${i}`;n.error(`[ErrorBoundary] Module ${t} crashed in ${i}():`,e),this.crashedModules.add(t);const r=this.recoveryAttempts.get(s)||0;this.recoveryAttempts.set(s,r+1),window.dispatchEvent(new CustomEvent("module-error",{detail:{moduleName:t,method:i,error:e.message,args:o,attempts:r+1}})),r<this.maxRecoveryAttempts?this.scheduleRecovery(t,i,o):(n.error(`[ErrorBoundary] Module ${t} exceeded recovery attempts. Marking as permanently failed.`),this.markModuleAsPermanentlyFailed(t))}scheduleRecovery(e,t,i){setTimeout(()=>{try{n.info(`[ErrorBoundary] Attempting recovery for ${e}.${t}()`)}catch(i){n.error(`[ErrorBoundary] Recovery failed for ${e}.${t}():`,i)}},this.recoveryDelay)}getRecoveryValue(e,t){switch(t){case"init":case"destroy":case"update":case"render":return Promise.resolve();case"getData":case"getConfig":return{};case"isEnabled":case"isActive":return!1;default:return}}markModuleAsPermanentlyFailed(e){window.dispatchEvent(new CustomEvent("module-permanent-failure",{detail:{moduleName:e}}))}getHealthStatus(){return{totalCrashedModules:this.crashedModules.size,crashedModules:Array.from(this.crashedModules),recoveryAttempts:Object.fromEntries(this.recoveryAttempts),timestamp:(new Date).toISOString()}}resetModule(e){this.crashedModules.delete(e);for(const[t]of this.recoveryAttempts)t.startsWith(`${e}.`)&&this.recoveryAttempts.delete(t);n.info(`[ErrorBoundary] Reset error tracking for module: ${e}`)}reset(){this.crashedModules.clear(),this.recoveryAttempts.clear(),n.info("[ErrorBoundary] Reset all error tracking")}};window.addEventListener("error",e=>{n.error("[Global] Unhandled error:",e.error||e.message)}),window.addEventListener("unhandledrejection",e=>{n.error("[Global] Unhandled promise rejection:",e.reason)});const ae=new class{constructor(){this.state=new Map,this.subscribers=new Map,this.stateOwners=new Map,this.defaultValues=new Map,this.currentModule="unknown",this.subscriptionCounter=0}setContext(e){this.currentModule=e}register(e,t,i=this.currentModule){this.state.has(e)?n.warn(`[StateManager] State key '${e}' already registered by ${this.stateOwners.get(e)}`):(this.state.set(e,t),this.defaultValues.set(e,t),this.stateOwners.set(e,i),this.subscribers.set(e,[]),n.info(`[StateManager] Registered '${e}' (owner: ${i})`))}get(e){if(this.state.has(e))return this.state.get(e);n.warn(`[StateManager] Unknown state key: '${e}'`)}set(e,t,i=!1){if(!this.state.has(e))return n.warn(`[StateManager] Cannot set unknown state key: '${e}'`),!1;const o=this.stateOwners.get(e);if(!i&&o!==this.currentModule)return n.warn(`[StateManager] Module '${this.currentModule}' cannot modify '${e}' (owned by ${o})`),!1;const s=this.state.get(e);return s===t||(this.state.set(e,t),this.notifySubscribers(e,t,s),n.info(`[StateManager] Updated '${e}' by ${this.currentModule}`)),!0}subscribe(e,t,i=this.currentModule){if(!this.state.has(e))return n.warn(`[StateManager] Cannot subscribe to unknown state key: '${e}'`),null;const o=`${i}_${++this.subscriptionCounter}`,s={id:o,callback:t,subscriber:i};return this.subscribers.has(e)||this.subscribers.set(e,[]),this.subscribers.get(e).push(s),n.info(`[StateManager] Subscribed '${i}' to '${e}'`),o}unsubscribe(e){for(const[t,i]of this.subscribers.entries()){const o=i.findIndex(t=>t.id===e);if(-1!==o){const e=i[o];return i.splice(o,1),void n.info(`[StateManager] Unsubscribed '${e.subscriber}' from '${t}'`)}}n.warn(`[StateManager] Subscription ID not found: ${e}`)}notifySubscribers(e,t,i){(this.subscribers.get(e)||[]).forEach(o=>{try{o.callback(t,i,e)}catch(s){n.error(`[StateManager] Error in subscriber '${o.subscriber}' for '${e}':`,s)}})}reset(e){if(!this.state.has(e))return n.warn(`[StateManager] Cannot reset unknown state key: '${e}'`),!1;const t=this.defaultValues.get(e);return this.set(e,t,!0)}clearModuleSubscriptions(e){let t=0;for(const[n,i]of this.subscribers.entries()){const o=i.filter(t=>t.subscriber!==e);t+=i.length-o.length,this.subscribers.set(n,o)}t>0&&n.info(`[StateManager] Cleared ${t} subscriptions for module '${e}'`)}getSnapshot(){const e={state:Object.fromEntries(this.state),owners:Object.fromEntries(this.stateOwners),subscriptions:{}};for(const[t,n]of this.subscribers.entries())e.subscriptions[t]=n.map(e=>({id:e.id,subscriber:e.subscriber}));return e}resetAll(){this.state.clear(),this.subscribers.clear(),this.stateOwners.clear(),this.defaultValues.clear(),this.subscriptionCounter=0,n.info("[StateManager] Reset complete")}createScope(e){return{register:(t,n)=>(this.setContext(e),this.register(t,n,e)),get:e=>this.get(e),set:(t,n)=>(this.setContext(e),this.set(t,n)),subscribe:(t,n)=>(this.setContext(e),this.subscribe(t,n,e)),unsubscribe:e=>this.unsubscribe(e),reset:e=>this.reset(e),cleanup:()=>this.clearModuleSubscriptions(e)}}};"undefined"!=typeof window&&(window.stateManager=ae,window.stateSnapshot=()=>ae.getSnapshot());const le=new Map;async function ce(){await async function(){var e;let t;t="undefined"!=typeof global&&(null==(e=global.importMeta)?void 0:e.glob)?global.importMeta.glob("./*/index.js",{eager:!0}):Object.assign({"./example-module/index.js":f,"./inertia-scroll/index.js":E,"./lightbox-trigger/index.js":z,"./noise/index.js":L,"./parallax/index.js":T,"./scroll-dependent/index.js":q,"./scroll-loop/index.js":N,"./scroll-timeline/index.js":H,"./scrollfx/index.js":W,"./sidebar/index.js":K,"./smooth-scroll/index.js":G,"./sticky-fade/index.js":te,"./sticky-steps/index.js":ne,"./ui/index.js":ie,"./wheel-boost/index.js":oe});const i=new Set(Array.from(document.querySelectorAll("[data-module]")).map(e=>e.dataset.module).filter(Boolean)),o=new Set(i),s=0===o.size;Object.entries(t).forEach(([e,t])=>{const i=e.split("/").slice(-2,-1)[0];if(s||o.has(i))if("object"==typeof t.definition)C.register(t.definition);else{const e={name:i,version:"1.0.0",dependencies:[],provides:[],priority:0};C.register(e)}else n.info(`⏭️ [Module] Skipping unused module: ${i}`)});const r=C.calculateInitializationOrder();for(const l of r){if(!s&&!o.has(l)){n.info(`⏭️ [Module] Skipped (not used in DOM): ${l}`);continue}const e=Object.keys(t).find(e=>e.split("/").slice(-2,-1)[0]===l);if(!e){n.warn(`⛔ [Module] No implementation found for: ${l}`);continue}const i=t[e],r=se[l]||{},c=C.checkDependencies(l);if(c.satisfied)if("function"==typeof i.init)try{C.markInitializing(l);const e=ae.createScope(l),t=re.wrapModule(i,l);await t.init(r,e),C.markInitialized(l),le.set(l,{mod:t,config:r,state:e,original:i}),n.info(`✅ [Module] Initialized: ${l}`)}catch(a){n.error(`❌ [Module] Failed to initialize ${l}:`,a),le.set(l,{mod:null,config:r,error:a,original:i})}else n.warn(`⛔ [Module] No init() in ${l}`);else n.error(`❌ [Module] Cannot initialize ${l}: ${c.reason}`),le.set(l,{mod:null,config:r,error:new Error(c.reason),original:i})}s&&n.info("⚠️ [Module] No data-module usage detected, fallback to full init mode")}(),function(){const e=document.querySelectorAll("video[data-src]"),t=window.innerWidth,n=(navigator.connection||{}).effectiveType||"4g";e.forEach(e=>{const i=e.dataset.src;let o="480";o="2g"===n||"slow-2g"===n?"480":"3g"===n?t>=1200?"720":"480":t>=1200?"1080":t>=800?"720":"480";const s=`${i}-${o}.webm`,r=document.createElement("video");r.autoplay=!0,r.loop=!0,r.muted=!0,r.playsInline=!0,r.poster=e.getAttribute("poster")||"",r.setAttribute("width",e.getAttribute("width")||"100%");const a=document.createElement("source");a.src=s,a.type="video/webm",r.appendChild(a),e.replaceWith(r)})}()}"undefined"!=typeof window&&(window.moduleHealth=function(){const e={total:le.size,active:0,failed:0,modules:{},errorBoundary:re.getHealthStatus()};for(const[t,{mod:n,error:i}]of le.entries())i?(e.failed++,e.modules[t]={status:"failed",error:i.message}):n?(e.active++,e.modules[t]={status:"active"}):e.modules[t]={status:"unknown"};return e});const de={};function ue(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:i,onRegistered:o,onRegisteredSW:s,onRegisterError:r}=e;let a,l;return l=async function(){if("serviceWorker"in navigator){if(a=await function(e,t){let n=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(null==i?void 0:i.nonce)||(null==i?void 0:i.getAttribute("nonce"));n=e(t.map(e=>{if((e=function(e){return"/"+e}(e))in de)return;de[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script"),i.crossOrigin="",i.href=e,o&&i.setAttribute("nonce",o),document.head.appendChild(i),t?new Promise((t,n)=>{i.addEventListener("load",t),i.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function i(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return n.then(t=>{for(const e of t||[])"rejected"===e.status&&i(e.reason);return e().catch(i)})}(async()=>{const{Workbox:e}=await import("./vendor-DMXp7Fa7.js");return{Workbox:e}},[]).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{null==r||r(e)}),!a)return;a.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),a.addEventListener("installed",e=>{e.isUpdate||null==i||i()}),a.register({immediate:t}).then(e=>{s?s("/sw.js",e):null==o||o(e)}).catch(e=>{null==r||r(e)})}}(),async(e=!0)=>{await l}}const he=ue({onNeedRefresh(){confirm("🔄 Neue Version verfügbar. Seite neu laden?")&&he(!0)},onOfflineReady(){n.info("📦 Offline-Inhalte sind bereit.")}});ue({onRegistered(e){n.info("Service Worker registriert:",e)},onRegisterError(e){n.error("Service Worker Fehler:",e)}}),document.addEventListener("DOMContentLoaded",()=>{ce()});