Files
mermaid-live-editor/_app/immutable/chunks/B04ZTNXm.js
T
2025-02-14 08:18:07 +00:00

2 lines
2.2 KiB
JavaScript

import{b as k,h as m,k as w,E as A,a9 as N,aa as P,s as I,ab as E,ac as g,c as p,V as S,U as L,f as U,n as R,_ as C,ad as $,N as q,ae as B,z as D,af as O,ag as x}from"./BmNgevel.js";function H(e,n,s=!1){m&&w();var t=e,a=null,i=null,l=L,r=s?A:0,_=!1;const o=(b,f=!0)=>{_=!0,c(f,b)},c=(b,f)=>{if(l===(l=b))return;let u=!1;if(m){const d=t.data===N;!!l===d&&(t=P(),I(t),E(!1),u=!0)}l?(a?g(a):f&&(a=p(()=>f(t))),i&&S(i,()=>{i=null})):(i?g(i):f&&(i=p(()=>f(t))),a&&S(a,()=>{a=null})),u&&E(!0)};k(()=>{_=!1,n(o),_||c(null,null)},r),m&&(t=U)}let v=!1,y=Symbol();function V(e,n,s){const t=s[n]??(s[n]={store:null,source:C(void 0),unsubscribe:R});if(t.store!==e&&!(y in s))if(t.unsubscribe(),t.store=e??null,e==null)t.source.v=void 0,t.unsubscribe=R;else{var a=!0;t.unsubscribe=$(e,i=>{a?t.source.v=i:q(t.source,i)}),a=!1}return e&&y in s?B(e):D(t.source)}function W(){const e={};function n(){O(()=>{for(var s in e)e[s].unsubscribe();x(e,y,{enumerable:!1,value:!0})})}return[e,n]}function Y(e,n,s){return e.set(s),n}function Z(e){var n=v;try{return v=!1,[e(),v]}finally{v=n}}const F="modulepreload",j=function(e,n){return new URL(e,n).href},T={},G=function(n,s,t){let a=Promise.resolve();if(s&&s.length>0){const l=document.getElementsByTagName("link"),r=document.querySelector("meta[property=csp-nonce]"),_=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));a=Promise.allSettled(s.map(o=>{if(o=j(o,t),o in T)return;T[o]=!0;const c=o.endsWith(".css"),b=c?'[rel="stylesheet"]':"";if(!!t)for(let d=l.length-1;d>=0;d--){const h=l[d];if(h.href===o&&(!c||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${b}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":F,c||(u.as="script"),u.crossOrigin="",u.href=o,_&&u.setAttribute("nonce",_),document.head.appendChild(u),c)return new Promise((d,h)=>{u.addEventListener("load",d),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})}))}function i(l){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=l,window.dispatchEvent(r),!r.defaultPrevented)throw l}return a.then(l=>{for(const r of l||[])r.status==="rejected"&&i(r.reason);return n().catch(i)})};export{G as _,V as a,Y as b,Z as c,H as i,W as s};