관리-도구
편집 파일: preload-helper.73eeda98.js
const y="modulepreload",_=function(a,l){return new URL(a,l).href},h={},v=function(l,c,u){let f=Promise.resolve();if(c&&c.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),d=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=Promise.allSettled(c.map(n=>{if(n=_(n,u),n in h)return;h[n]=!0;const o=n.endsWith(".css"),p=o?'[rel="stylesheet"]':"";if(!!u)for(let s=r.length-1;s>=0;s--){const i=r[s];if(i.href===n&&(!o||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const t=document.createElement("link");if(t.rel=o?"stylesheet":y,o||(t.as="script"),t.crossOrigin="",t.href=n,d&&t.setAttribute("nonce",d),document.head.appendChild(t),o)return new Promise((s,i)=>{t.addEventListener("load",s),t.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${n}`)))})}))}function m(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return f.then(r=>{for(const e of r||[])e.status==="rejected"&&m(e.reason);return l().catch(m)})};export{v as _};