const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/mermaid.core.BEB2s8mj.js","_astro/preload-helper.B8mdA2x2.js"])))=>i.map(i=>d[i]); import{_ as L}from"./preload-helper.B8mdA2x2.js";const v=new Set,u=new WeakSet;let g=!0,y,p=!1;function A(e){p||(p=!0,g??=!1,y??="hover",S(),T(),C(),O())}function S(){for(const e of["touchstart","mousedown"])document.body.addEventListener(e,t=>{l(t.target,"tap")&&f(t.target.href,{ignoreSlowConnection:!0})},{passive:!0})}function T(){let e;document.body.addEventListener("focusin",a=>{l(a.target,"hover")&&t(a)},{passive:!0}),document.body.addEventListener("focusout",r,{passive:!0}),h(()=>{for(const a of document.getElementsByTagName("a"))u.has(a)||l(a,"hover")&&(u.add(a),a.addEventListener("mouseenter",t,{passive:!0}),a.addEventListener("mouseleave",r,{passive:!0}))});function t(a){const i=a.target.href;e&&clearTimeout(e),e=setTimeout(()=>{f(i)},80)}function r(){e&&(clearTimeout(e),e=0)}}function C(){let e;h(()=>{for(const t of document.getElementsByTagName("a"))u.has(t)||l(t,"viewport")&&(u.add(t),e??=M(),e.observe(t))})}function M(){const e=new WeakMap;return new IntersectionObserver((t,r)=>{for(const a of t){const i=a.target,n=e.get(i);a.isIntersecting?(n&&clearTimeout(n),e.set(i,setTimeout(()=>{r.unobserve(i),e.delete(i),f(i.href)},300))):n&&(clearTimeout(n),e.delete(i))}})}function O(){h(()=>{for(const e of document.getElementsByTagName("a"))l(e,"load")&&f(e.href)})}function f(e,t){e=e.replace(/#.*/,"");const r=t?.ignoreSlowConnection??!1;if(P(e,r))if(v.add(e),document.createElement("link").relList?.supports?.("prefetch")&&t?.with!=="fetch"){const a=document.createElement("link");a.rel="prefetch",a.setAttribute("href",e),document.head.append(a)}else fetch(e,{priority:"low"})}function P(e,t){if(!navigator.onLine||!t&&k())return!1;try{const r=new URL(e,location.href);return location.origin===r.origin&&(location.pathname!==r.pathname||location.search!==r.search)&&!v.has(e)}catch{}return!1}function l(e,t){if(e?.tagName!=="A")return!1;const r=e.dataset.astroPrefetch;return r==="false"?!1:t==="tap"&&(r!=null||g)&&k()?!0:r==null&&g||r===""?t===y:r===t}function k(){if("connection"in navigator){const e=navigator.connection;return e.saveData||/2g/.test(e.effectiveType)}return!1}function h(e){e();let t=!1;document.addEventListener("astro:page-load",()=>{if(!t){t=!0;return}e()})}const b=()=>document.querySelectorAll("pre.mermaid").length>0;b()?(console.log("[astro-mermaid] Mermaid diagrams detected, loading mermaid.js..."),L(()=>import("./mermaid.core.BEB2s8mj.js").then(e=>e.bC),__vite__mapDeps([0,1])).then(async({default:e})=>{const t=[{name:"logos",loader:"() => fetch('https://unpkg.com/@iconify-json/logos@1/icons.json').then(res => res.json())"}];if(t&&t.length>0){console.log("[astro-mermaid] Registering",t.length,"icon packs");const n=t.map(s=>({name:s.name,loader:new Function("return "+s.loader)()}));await e.registerIconPacks(n)}const r={startOnLoad:!1,theme:"forest"},a={light:"default",dark:"dark"};async function i(){console.log("[astro-mermaid] Initializing mermaid diagrams...");const n=document.querySelectorAll("pre.mermaid");if(console.log("[astro-mermaid] Found",n.length,"mermaid diagrams"),n.length===0)return;let s=r.theme;{const o=document.documentElement.getAttribute("data-theme"),c=document.body.getAttribute("data-theme");s=a[o||c]||r.theme,console.log("[astro-mermaid] Using theme:",s,"from",o?"html":"body")}e.initialize({...r,theme:s,gitGraph:{mainBranchName:"main",showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0}});for(const o of n){if(o.hasAttribute("data-processed"))continue;o.hasAttribute("data-diagram")||o.setAttribute("data-diagram",o.textContent||"");const c=o.getAttribute("data-diagram")||"",d="mermaid-"+Math.random().toString(36).slice(2,11);console.log("[astro-mermaid] Rendering diagram:",d);try{const m=document.getElementById(d);m&&m.remove();const{svg:E}=await e.render(d,c);o.innerHTML=E,o.setAttribute("data-processed","true"),console.log("[astro-mermaid] Successfully rendered diagram:",d)}catch(m){console.error("[astro-mermaid] Mermaid rendering error for diagram:",d,m),o.innerHTML=`