Files
jnss-web/_app/immutable/chunks/C-if0coG.js

3 lines
4.4 KiB
JavaScript

import{H as $,t as L,n as M,I as U,i as j,J as S,K as V,e as u,h as c,k as b,M as J,N as K,O as D,Q,b as _,R as g,p as R,a as q,q as x,T as v,U as C,V as X,W as Y,f as B,m as Z,X as z,d as w,Y as E,Z as G,_ as ee,$ as H,a0 as te,a1 as se,a2 as ie,a3 as ne,a4 as re,a5 as N,a6 as ae,a7 as he,a8 as oe,a9 as k,aa as y,ab as fe,ac as le,ad as de,ae as _e,af as ue,ag as ce,ah as pe,ai as ge}from"./DOzgGktT.js";import{a as ve,r as I,h as m,i as ye,b as me}from"./Gwsnd5Wd.js";function be(i){let e=0,t=M(0),n;return()=>{$()&&(L(t),U(()=>(e===0&&(n=j(()=>i(()=>S(t)))),e+=1,()=>{V(()=>{e-=1,e===0&&(n?.(),n=void 0,S(t))})})))}}var Ee=se|ie|ne;function Te(i,e,t){new Re(i,e,t)}class Re{parent;#s=!1;#t;#g=c?u:null;#n;#d;#r;#i=null;#e=null;#a=null;#h=null;#o=null;#_=0;#f=0;#u=!1;#l=null;#m=be(()=>(this.#l=M(this.#_),()=>{this.#l=null}));constructor(e,t,n){this.#t=e,this.#n=t,this.#d=n,this.parent=b.b,this.#s=!!this.#n.pending,this.#r=J(()=>{if(b.b=this,c){const s=this.#g;K(),s.nodeType===D&&s.data===Q?this.#E():this.#b()}else{var o=this.#v();try{this.#i=_(()=>n(o))}catch(s){this.error(s)}this.#f>0?this.#p():this.#s=!1}return()=>{this.#o?.remove()}},Ee),c&&(this.#t=u)}#b(){try{this.#i=_(()=>this.#d(this.#t))}catch(e){this.error(e)}this.#s=!1}#E(){const e=this.#n.pending;e&&(this.#e=_(()=>e(this.#t)),g.enqueue(()=>{var t=this.#v();this.#i=this.#c(()=>(g.ensure(),_(()=>this.#d(t)))),this.#f>0?this.#p():(R(this.#e,()=>{this.#e=null}),this.#s=!1)}))}#v(){var e=this.#t;return this.#s&&(this.#o=q(),this.#t.before(this.#o),e=this.#o),e}is_pending(){return this.#s||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#c(e){var t=b,n=Y,o=B;x(this.#r),v(this.#r),C(this.#r.ctx);try{return e()}catch(s){return X(s),null}finally{x(t),v(n),C(o)}}#p(){const e=this.#n.pending;this.#i!==null&&(this.#h=document.createDocumentFragment(),this.#h.append(this.#o),Z(this.#i,this.#h)),this.#e===null&&(this.#e=_(()=>e(this.#t)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#s=!1,this.#e&&R(this.#e,()=>{this.#e=null}),this.#h&&(this.#t.before(this.#h),this.#h=null))}update_pending_count(e){this.#y(e),this.#_+=e,this.#l&&z(this.#l,this.#_)}get_effect_pending(){return this.#m(),L(this.#l)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(this.#u||!t&&!n)throw e;this.#i&&(w(this.#i),this.#i=null),this.#e&&(w(this.#e),this.#e=null),this.#a&&(w(this.#a),this.#a=null),c&&(E(this.#g),G(),E(ee()));var o=!1,s=!1;const a=()=>{if(o){re();return}o=!0,s&&te(),g.ensure(),this.#_=0,this.#a!==null&&R(this.#a,()=>{this.#a=null}),this.#s=this.has_pending_snippet(),this.#i=this.#c(()=>(this.#u=!1,_(()=>this.#d(this.#t)))),this.#f>0?this.#p():this.#s=!1};var f=Y;try{v(null),s=!0,t?.(e,a),s=!1}catch(l){H(l,this.#r&&this.#r.parent)}finally{v(f)}n&&V(()=>{this.#a=this.#c(()=>{g.ensure(),this.#u=!0;try{return _(()=>{n(this.#t,()=>e,()=>a)})}catch(l){return H(l,this.#r.parent),null}finally{this.#u=!1}})})}}function Ae(i,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(i.__t??=i.nodeValue)&&(i.__t=t,i.nodeValue=t+"")}function we(i,e){return P(i,e)}function De(i,e){N(),e.intro=e.intro??!1;const t=e.target,n=c,o=u;try{for(var s=ae(t);s&&(s.nodeType!==D||s.data!==he);)s=oe(s);if(!s)throw k;y(!0),E(s);const a=P(i,{...e,anchor:s});return y(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
`).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==k&&console.warn("Failed to hydrate: ",a),e.recover===!1&&fe(),N(),le(t),y(!1),we(i,e)}finally{y(n),E(o)}}const p=new Map;function P(i,{target:e,anchor:t,props:n={},events:o,context:s,intro:a=!0}){N();var f=new Set,l=d=>{for(var h=0;h<d.length;h++){var r=d[h];if(!f.has(r)){f.add(r);var O=ye(r);e.addEventListener(r,m,{passive:O});var F=p.get(r);F===void 0?(document.addEventListener(r,m,{passive:O}),p.set(r,1)):p.set(r,F+1)}}};l(de(ve)),I.add(l);var T=void 0,W=_e(()=>{var d=t??e.appendChild(q());return Te(d,{pending:()=>{}},h=>{if(s){ue({});var r=B;r.c=s}if(o&&(n.$$events=o),c&&me(h,null),T=i(h,n)||{},c&&(b.nodes.end=u,u===null||u.nodeType!==D||u.data!==ce))throw pe(),k;s&&ge()}),()=>{for(var h of f){e.removeEventListener(h,m);var r=p.get(h);--r===0?(document.removeEventListener(h,m),p.delete(h)):p.set(h,r)}I.delete(l),d!==t&&d.parentNode?.removeChild(d)}});return A.set(T,W),T}let A=new WeakMap;function Oe(i,e){const t=A.get(i);return t?(A.delete(i),t(e)):Promise.resolve()}export{De as h,we as m,Ae as s,Oe as u};