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