-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathmodulepreload-polyfill-Cp76Uzro.chunk.mjs
More file actions
2 lines (2 loc) · 1.84 KB
/
modulepreload-polyfill-Cp76Uzro.chunk.mjs
File metadata and controls
2 lines (2 loc) · 1.84 KB
1
2
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 r=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),f=n?.nonce||n?.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=r.length-1;u>=0;u--){const a=r[u];if(a.href===o&&(!d||a.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${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 ${o}`)))})}))}function t(r){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=r,window.dispatchEvent(n),!n.defaultPrevented)throw r}return e.then(r=>{for(const n of r||[])n.status==="rejected"&&t(n.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 r of t.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).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 _};
//# sourceMappingURL=modulepreload-polyfill-Cp76Uzro.chunk.mjs.map