2 lines
3.8 KiB
JavaScript
2 lines
3.8 KiB
JavaScript
var H=Object.defineProperty;var y=r=>{throw TypeError(r)};var I=(r,e,t)=>e in r?H(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var P=(r,e,t)=>I(r,typeof e!="symbol"?e+"":e,t),L=(r,e,t)=>e.has(r)||y("Cannot "+t);var s=(r,e,t)=>(L(r,e,"read from private field"),t?t.call(r):e.get(r)),v=(r,e,t)=>e.has(r)?y("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),C=(r,e,t,n)=>(L(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);import{a3 as D,a4 as N,a5 as T,a6 as O,Q as F,a7 as j,i as R,J as $,a8 as q,a9 as U,l as Y,j as J,L as M,aa as Q,ab as W,H as z,n as G,s as K,o as x}from"./Dexp9pM5.js";var u,d,h,b,k,w,A;class V{constructor(e,t=!0){P(this,"anchor");v(this,u,new Map);v(this,d,new Map);v(this,h,new Map);v(this,b,new Set);v(this,k,!0);v(this,w,()=>{var e=D;if(s(this,u).has(e)){var t=s(this,u).get(e),n=s(this,d).get(t);if(n)N(n),s(this,b).delete(t);else{var f=s(this,h).get(t);f&&(s(this,d).set(t,f.effect),s(this,h).delete(t),f.fragment.lastChild.remove(),this.anchor.before(f.fragment),n=f.effect)}for(const[c,a]of s(this,u)){if(s(this,u).delete(c),c===e)break;const i=s(this,h).get(a);i&&(T(i.effect),s(this,h).delete(a))}for(const[c,a]of s(this,d)){if(c===t||s(this,b).has(c))continue;const i=()=>{if(Array.from(s(this,u).values()).includes(c)){var m=document.createDocumentFragment();q(a,m),m.append(F()),s(this,h).set(c,{effect:a,fragment:m})}else T(a);s(this,b).delete(c),s(this,d).delete(c)};s(this,k)||!n?(s(this,b).add(c),O(a,i,!1)):i()}}});v(this,A,e=>{s(this,u).delete(e);const t=Array.from(s(this,u).values());for(const[n,f]of s(this,h))t.includes(n)||(T(f.effect),s(this,h).delete(n))});this.anchor=e,C(this,k,t)}ensure(e,t){var n=D,f=U();if(t&&!s(this,d).has(e)&&!s(this,h).has(e))if(f){var c=document.createDocumentFragment(),a=F();c.append(a),s(this,h).set(e,{effect:j(()=>t(a)),fragment:c})}else s(this,d).set(e,j(()=>t(this.anchor)));if(s(this,u).set(n,e),f){for(const[i,o]of s(this,d))i===e?n.unskip_effect(o):n.skip_effect(o);for(const[i,o]of s(this,h))i===e?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(s(this,w)),n.ondiscard(s(this,A))}else R&&(this.anchor=$),s(this,w).call(this)}}u=new WeakMap,d=new WeakMap,h=new WeakMap,b=new WeakMap,k=new WeakMap,w=new WeakMap,A=new WeakMap;function se(r,e,t=!1){R&&J();var n=new V(r),f=t?M:0;function c(a,i){if(R){const l=Q(r);var o;if(l===W?o=0:l===z?o=!1:o=parseInt(l.substring(1)),a!==o){var m=G();K(m),n.anchor=m,x(!1),n.ensure(a,i),x(!0);return}}n.ensure(a,i)}Y(()=>{var a=!1;e((i,o=0)=>{a=!0,c(o,i)}),a||c(!1,null)},f)}const X="modulepreload",Z=function(r,e){return new URL(r,e).href},B={},re=function(e,t,n){let f=Promise.resolve();if(t&&t.length>0){let a=function(l){return Promise.all(l.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const i=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),m=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));f=a(t.map(l=>{if(l=Z(l,n),l in B)return;B[l]=!0;const p=l.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(n)for(let E=i.length-1;E>=0;E--){const S=i[E];if(S.href===l&&(!p||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${g}`))return;const _=document.createElement("link");if(_.rel=p?"stylesheet":X,p||(_.as="script"),_.crossOrigin="",_.href=l,m&&_.setAttribute("nonce",m),document.head.appendChild(_),p)return new Promise((E,S)=>{_.addEventListener("load",E),_.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${l}`)))})}))}function c(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return f.then(a=>{for(const i of a||[])i.status==="rejected"&&c(i.reason);return e().catch(c)})};export{V as B,re as _,se as i};
|