const h="modulepreload",y=function(s,c){return new URL(s,c).href},m={},g=function(s,c,l){let e=Promise.resolve();if(c&&c.length>0){const n=document.getElementsByTagName("link"),r=document.querySelector("meta[property=csp-nonce]"),f=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));e=Promise.allSettled(c.map(o=>{if(o=y(o,l),o in m)return;m[o]=!0;const d=o.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(l)for(let u=n.length-1;u>=0;u--){const a=n[u];if(a.href===o&&(!d||a.rel==="stylesheet"))return}else if(document.querySelector('link[href="'.concat(o,'"]').concat(p)))return;const i=document.createElement("link");if(i.rel=d?"stylesheet":h,d||(i.as="script"),i.crossOrigin="",i.href=o,f&&i.setAttribute("nonce",f),document.head.appendChild(i),d)return new Promise((u,a)=>{i.addEventListener("load",u),i.addEventListener("error",()=>a(new Error("Unable to preload CSS for ".concat(o))))})}))}function t(n){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=n,window.dispatchEvent(r),!r.defaultPrevented)throw n}return e.then(n=>{for(const r of n||[])r.status==="rejected"&&t(r.reason);return s().catch(t)})};(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))l(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const n of t.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&l(n)}).observe(document,{childList:!0,subtree:!0});function c(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 l(e){if(e.ep)return;e.ep=!0;const t=c(e);fetch(e.href,t)}})();export{g as _};
