var e={},t=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const t=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");s=r.map(r=>{if((r=function(e){return"/static/"+e}(r))in e)return;e[r]=!0;const o=r.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(n)for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.href===r&&(!o||"stylesheet"===n.rel))return}else if(document.querySelector(`link[href="${r}"]${s}`))return;const l=document.createElement("link");return l.rel=o?"stylesheet":"modulepreload",o||(l.as="script"),l.crossOrigin="",l.href=r,a&&l.setAttribute("nonce",a),document.head.appendChild(l),o?new Promise((e,t)=>{l.addEventListener("load",e),l.addEventListener("error",()=>t(new Error(`Unable to preload CSS for ${r}`)))}):void 0}),o=Promise.all(s.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))}var s;function l(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(const t of e||[])"rejected"===t.status&&l(t.reason);return t().catch(l)})};export{t};