import{E as b,h as y,F as k,G as g,H as P,I as T,J as p,K as w,M as _,O as A,P as R,u as L,q as N,S as $}from"./DaFfdZrU.js";import{B as q}from"./Eu2KjOz7.js";function F(e,n,i=!1){y&&k();var l=new q(e),o=i?g:0;function s(t,r){if(y){const v=P(e)===T;if(t===v){var u=p();w(u),l.anchor=u,_(!1),l.ensure(t,r),_(!0);return}}l.ensure(t,r)}b(()=>{var t=!1;n((r,u=!0)=>{t=!0,s(u,r)}),t||s(!1,null)},o)}function m(e,n){return e===n||e?.[$]===n}function j(e={},n,i,l){return A(()=>{var o,s;return R(()=>{o=s,s=[],L(()=>{e!==i(...s)&&(n(e,...s),o&&m(i(...o),e)&&n(null,...o))})}),()=>{N(()=>{s&&m(i(...s),e)&&n(null,...s)})}}),e}const B="modulepreload",C=function(e,n){return new URL(e,n).href},S={},x=function(n,i,l){let o=Promise.resolve();if(i&&i.length>0){let v=function(a){return Promise.all(a.map(f=>Promise.resolve(f).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const t=document.getElementsByTagName("link"),r=document.querySelector("meta[property=csp-nonce]"),u=r?.nonce||r?.getAttribute("nonce");o=v(i.map(a=>{if(a=C(a,l),a in S)return;S[a]=!0;const f=a.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(l)for(let d=t.length-1;d>=0;d--){const E=t[d];if(E.href===a&&(!f||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${h}`))return;const c=document.createElement("link");if(c.rel=f?"stylesheet":B,f||(c.as="script"),c.crossOrigin="",c.href=a,u&&c.setAttribute("nonce",u),document.head.appendChild(c),f)return new Promise((d,E)=>{c.addEventListener("load",d),c.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${a}`)))})}))}function s(t){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t}return o.then(t=>{for(const r of t||[])r.status==="rejected"&&s(r.reason);return n().catch(s)})};export{x as _,j as b,F as i};
