mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-12 22:42:10 +02:00
3 lines
8 KiB
JavaScript
3 lines
8 KiB
JavaScript
|
|
var Me=Object.defineProperty;var ue=t=>{throw TypeError(t)};var ke=(t,e,r)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>ke(t,typeof e!="symbol"?e+"":e,r),re=(t,e,r)=>e.has(t)||ue("Cannot "+r);var s=(t,e,r)=>(re(t,e,"read from private field"),r?r.call(t):e.get(t)),c=(t,e,r)=>e.has(t)?ue("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),n=(t,e,r,a)=>(re(t,e,"write to private field"),a?a.call(t,r):e.set(t,r),r),p=(t,e,r)=>(re(t,e,"access private method"),r);import{aQ as Ie,g as Te,X as Le,v as Ve,aR as _e,Y as q,ao as we,U as M,N as k,o as B,aS as pe,b as xe,ab as Be,ad as Ce,aT as ge,ai as Y,J as me,aU as se,ar as ie,ay as He,aV as ve,aW as We,aX as ye,aY as Pe,aZ as qe,a_ as G,a$ as Z,b0 as be,b1 as ze,b2 as Re,az as Se,ag as Ue,aw as ae,T as K,n as $e,ae as je,b3 as $,E as Je,M as Qe,b4 as Xe,b5 as Ge,F as Ze,b6 as Ke,G as et,b7 as ne,V as tt,O as Ne,ax as rt,Q as st,b8 as fe,R as j,b9 as it,av as at,ba as nt,al as ft,p as ht,af as ot,bb as lt,a as ct}from"./CpWkWWOo.js";import{d as dt}from"./CHOnp4oo.js";function ut(t){let e=0,r=we(0),a;return()=>{Ie()&&(Te(r),Le(()=>(e===0&&(a=Ve(()=>t(()=>_e(r)))),e+=1,()=>{q(()=>{e-=1,e===0&&(a==null||a(),a=void 0,_e(r))})})))}}var _t=Je|Qe;function pt(t,e,r,a){new gt(t,e,r,a)}var E,z,m,L,g,R,T,w,S,V,A,C,H,W,N,ee,o,De,Ae,Oe,he,Q,X,oe;class gt{constructor(e,r,a,h){c(this,o);U(this,"parent");U(this,"is_pending",!1);U(this,"transform_error");c(this,E);c(this,z,k?M:null);c(this,m);c(this,L);c(this,g);c(this,R,null);c(this,T,null);c(this,w,null);c(this,S,null);c(this,V,0);c(this,A,0);c(this,C,!1);c(this,H,new Set);c(this,W,new Set);c(this,N,null);c(this,ee,ut(()=>(n(this,N,we(s(this,V))),()=>{n(this,N,null)})));var i;n(this,E,e),n(this,m,r),n(this,L,f=>{var u=B;u.b=this,u.f|=pe,a(f)}),this.parent=B.b,this.transform_error=h??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),n(this,g,xe(()=>{if(k){const f=s(this,z);Be();const u=f.data===Ce;if(f.data.startsWith(ge)){const d=JSON.parse(f.data.slice(ge.length));p(this,o,Ae).call(this,d)}else u?p(this,o,Oe).call(this):p(this,o,De).call(this)}else p(this,o,he).call(this)},_t)),k&&n(this,E,M)}defer_effect(e){qe(e,s(this,H),s(this,W))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(this,m).pending}update_pending_count(e){p(this,o,oe).call(this,e),n(this,V,s(this,V)+e),!(!s(this,N)||s(this,C))&&(n(this,C,!0),q(()=>{n(this,C,!1),s(this,N)&&Ue(s(this,N),s(this,V))}))}get_effect_pending(){return s(this,ee).call(this),Te(s(this,N))}error(e){var r=s(this,m).onerror;let a=s(this,m).failed;if(!r&&!a)throw e;s(this,R)&&(ae(s(this,R)),n(this,R,null)),s(this,T)&&(ae(s(this,T)),n(this,T,null)),s(this,w)&&(ae(s(this,w)),n(this,w,null)),k&&(K(s(this,z)),$e(),K(je()));var h=!1,i=!1;const f=()=>{if(h){Ge();return}h=!0,i&&Xe(),s(this,w)!==null&&ie(s(this,w),()=>{n(this,w,null)}),p(this,o,X).call(this,()=>{se.ensure(),p(this,o,he).call(this)})},u=l=>{try{i=!0,r==null||r(l,f),i=!1}catch(d){$(d,s(this,g)&&s(this,g).parent)}a&&n(this,w,p(this,o,X).call(this,()=>{se.ensure();try{return Y(()=>{var d=B;d.b=this,d.f|=pe,a(s(this,E),()=>l,()=>f)})}catch(d){return $(d,s(this,g).parent),null}}))};q(()=>{var l;try{l=this.transform_error(e)}catch(d){$(d,s(this,g)&&s(this,g).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(u,d=>$(d,s(this,g)&&s(this,g).parent)):u(l)})}}E=new WeakMap,z=new WeakMap,m=new WeakMap,L=new WeakMap,g=new WeakMap,R=new WeakMap,T=new WeakMap,w=new WeakMap,S=new WeakMap,V=new WeakMap,A=new WeakMap,C=new WeakMap,H=new WeakMap,W=new WeakMap,N=new WeakMap,ee=new WeakMap,o=new WeakSet,De=function(){try{n(this,R,Y(()=>s(this,L).call(this,s(this,E))))}catch(e){this.error(e)}},Ae=function(e){const r=s(this,m).failed;r&&n(this,w,Y(()=>{r(s(this,E),()=>e,()=>()=>{})}))},Oe=function(){const e=s(this,m).pending;e&&(this.is_pending=!0,n(this,T,Y(()=>e(s(this,E)))),q(()=>{var r=n(this,S,document.createDocumentFragment()),a=me();r.append(a),n(this,R,p(this,o,X).call(this,()=>(se.ens
|
||
|
|
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw f;return f!==fe&&console.warn("Failed to hydrate: ",f),e.recover===!1&&it(),ne(),at(r),j(!1),Et(t,e)}finally{j(a),K(h)}}const J=new Map;function Ye(t,{target:e,anchor:r,props:a={},events:h,context:i,intro:f=!0,transformError:u}){ne();var l=void 0,d=nt(()=>{var x=r??e.appendChild(me());pt(x,{pending:()=>{}},v=>{ht({});var _=Se;if(i&&(_.c=i),h&&(a.$$events=h),k&&dt(v,null),l=t(v,a)||{},k&&(B.nodes.end=M,M===null||M.nodeType!==Ne||M.data!==ot))throw lt(),fe;ct()},u);var P=new Set,D=v=>{for(var _=0;_<v.length;_++){var y=v[_];if(!P.has(y)){P.add(y);var O=yt(y);for(const te of[e,document]){var b=J.get(te);b===void 0&&(b=new Map,J.set(te,b));var F=b.get(y);F===void 0?(te.addEventListener(y,ce,{passive:O}),b.set(y,1)):b.set(y,F+1)}}}};return D(ft(Fe)),le.add(D),()=>{var O;for(var v of P)for(const b of[e,document]){var _=J.get(b),y=_.get(v);--y==0?(b.removeEventListener(v,ce),_.delete(v),_.size===0&&J.delete(b)):_.set(v,y)}le.delete(D),x!==r&&((O=x.parentNode)==null||O.removeChild(x))}});return de.set(l,d),l}let de=new WeakMap;function Ot(t,e){const r=de.get(t);return r?(de.delete(t),r(e)):Promise.resolve()}export{St as a,Nt as d,Rt as e,At as h,Et as m,Dt as s,Ot as u};
|