(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))c(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const r of t.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&c(r)}).observe(document,{childList:!0,subtree:!0});function o(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function c(e){if(e.ep)return;e.ep=!0;const t=o(e);fetch(e.href,t)}})();const y="modulepreload",x=function(n,a){return new URL(n,a).href},g={},E=function(a,o,c){let e=Promise.resolve();if(o&&o.length>0){let f=function(i){return Promise.all(i.map(l=>Promise.resolve(l).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const r=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),u=s?.nonce||s?.getAttribute("nonce");e=f(o.map(i=>{if(i=x(i,c),i in g)return;g[i]=!0;const l=i.endsWith(".css"),p=l?'[rel="stylesheet"]':"";if(c)for(let m=r.length-1;m>=0;m--){const b=r[m];if(b.href===i&&(!l||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${p}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":y,l||(d.as="script"),d.crossOrigin="",d.href=i,u&&d.setAttribute("nonce",u),document.head.appendChild(d),l)return new Promise((m,b)=>{d.addEventListener("load",m),d.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${i}`)))})}))}function t(r){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r}return e.then(r=>{for(const s of r||[])s.status==="rejected"&&t(s.reason);return a().catch(t)})},w={"entry-loaded":10,"app-import-start":20,"app-imported":30,"custom-element-defined":40,connected:50,"first-updated":60,rendered:70,"boot-failed":100};function h(n,a){if(typeof window>"u")return;const o=window.__FASED_CONTROL_UI_BOOT=window.__FASED_CONTROL_UI_BOOT??{},c=w[o.stage]??0;w[n]<c&&o.stage!=="boot-failed"||(o.stage=n,o.detail=a??"",o.updatedAt=Date.now(),typeof o.mark=="function"&&o.mark(n,a),typeof window.dispatchEvent=="function"&&typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("fased-control-ui-boot",{detail:{stage:n,detail:a??""}})))}function v(n){const a=n instanceof Error?n.stack??n.message:String(n);h("boot-failed",a||"Unknown dashboard boot error.");const o=document.querySelector("fased-app");if(!o)return;o.innerHTML="";const c=document.createElement("style");c.textContent=`
    body {
      margin: 0;
      background: #080e1a;
      color: #e2e8f0;
      font-family: system-ui, -apple-system, sans-serif;
    }
    .boot-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      box-sizing: border-box;
    }
    .boot-card {
      width: 100%;
      max-width: 560px;
      background: #0f1929;
      border: 1px solid rgba(248, 113, 113, 0.28);
      border-radius: 16px;
      padding: 32px;
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    }
    .boot-title {
      margin: 0 0 8px;
      font-size: 22px;
      font-weight: 700;
      color: #f0f4ff;
    }
    .boot-desc {
      margin: 0 0 18px;
      color: #9aa5bf;
      line-height: 1.6;
    }
    .boot-error {
      max-height: 180px;
      overflow: auto;
      white-space: pre-wrap;
      word-break: break-word;
      background: #060d1a;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      padding: 12px;
      color: #fca5a5;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
    }
    .boot-button {
      margin-top: 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 10px;
      background: #1d4ed8;
      color: white;
      padding: 10px 14px;
      font-weight: 650;
      cursor: pointer;
    }
  `;const e=document.createElement("div");e.className="boot-page";const t=document.createElement("section");t.className="boot-card";const r=document.createElement("h1");r.className="boot-title",r.textContent="Dashboard bundle could not load";const s=document.createElement("p");s.className="boot-desc",s.textContent="The gateway page loaded, but the browser could not start the dashboard bundle. Reload first. If it keeps happening after an update, clear this site's browser data and sign in again.";const u=document.createElement("div");u.className="boot-error",u.textContent=a||"Unknown dashboard boot error.";const f=document.createElement("button");f.className="boot-button",f.textContent="Reload",f.addEventListener("click",()=>window.location.reload()),t.append(r,s,u,f),e.append(t),o.append(c,e)}h("entry-loaded");h("app-import-start");E(()=>import("./app-wpJSg6bV.js").then(n=>n.a6),[],import.meta.url).then(()=>h("app-imported")).catch(v);export{E as _,h as m};
//# sourceMappingURL=index-BScPU8W0.js.map
