3 lines
7.8 KiB
JavaScript
3 lines
7.8 KiB
JavaScript
var Oe=Object.defineProperty;var ce=t=>{throw TypeError(t)};var ke=(t,e,r)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var j=(t,e,r)=>ke(t,typeof e!="symbol"?e+"":e,r),re=(t,e,r)=>e.has(t)||ce("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)?ce("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),a=(t,e,r,n)=>(re(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),p=(t,e,r)=>(re(t,e,"access private method"),r);import{N as Fe,C as be,O as Le,g as Me,P as de,Q as V,S as me,e as L,h as M,n as Y,U as ue,i as Ce,v as He,V as Ie,W as _e,b as F,c as Ee,p as se,a as pe,m as Ye,X as xe,Y as Z,Z as G,_ as ge,$ as Pe,a0 as Ve,a1 as we,f as Te,a2 as We,d as ie,x as K,a3 as Be,a4 as $e,a5 as q,E as je,a6 as qe,a7 as ze,a8 as Je,a9 as Ue,aa as Qe,ab as Xe,ac as ne,o as Ze,ad as Se,ae as Ge,af as Ke,ag as ae,ah as z,ai as et,aj as tt,ak as rt,al as st,H as it,am as nt,an as at,J as ft}from"./QnfpkG_Q.js";import{b as ht}from"./VCsPq5MH.js";function ot(t){let e=0,r=me(0),n;return()=>{Fe()&&(be(r),Le(()=>(e===0&&(n=Me(()=>t(()=>de(r)))),e+=1,()=>{V(()=>{e-=1,e===0&&(n==null||n(),n=void 0,de(r))})})))}}var lt=je|qe;function ct(t,e,r,n){new dt(t,e,r,n)}var m,W,T,C,g,S,E,w,N,H,D,x,B,$,R,ee,o,Ne,Re,Ae,fe,Q,X,he;class dt{constructor(e,r,n,h){c(this,o);j(this,"parent");j(this,"is_pending",!1);j(this,"transform_error");c(this,m);c(this,W,M?L:null);c(this,T);c(this,C);c(this,g);c(this,S,null);c(this,E,null);c(this,w,null);c(this,N,null);c(this,H,0);c(this,D,0);c(this,x,!1);c(this,B,new Set);c(this,$,new Set);c(this,R,null);c(this,ee,ot(()=>(a(this,R,me(s(this,H))),()=>{a(this,R,null)})));var i;a(this,m,e),a(this,T,r),a(this,C,f=>{var u=Y;u.b=this,u.f|=ue,n(f)}),this.parent=Y.b,this.transform_error=h??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),a(this,g,Ce(()=>{if(M){const f=s(this,W);He();const u=f.data===Ie;if(f.data.startsWith(_e)){const d=JSON.parse(f.data.slice(_e.length));p(this,o,Re).call(this,d)}else u?p(this,o,Ae).call(this):p(this,o,Ne).call(this)}else p(this,o,fe).call(this)},lt)),M&&a(this,m,L)}defer_effect(e){xe(e,s(this,B),s(this,$))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(this,T).pending}update_pending_count(e,r){p(this,o,he).call(this,e,r),a(this,H,s(this,H)+e),!(!s(this,R)||s(this,x))&&(a(this,x,!0),V(()=>{a(this,x,!1),s(this,R)&&We(s(this,R),s(this,H))}))}get_effect_pending(){return s(this,ee).call(this),be(s(this,R))}error(e){var r=s(this,T).onerror;let n=s(this,T).failed;if(!r&&!n)throw e;s(this,S)&&(ie(s(this,S)),a(this,S,null)),s(this,E)&&(ie(s(this,E)),a(this,E,null)),s(this,w)&&(ie(s(this,w)),a(this,w,null)),M&&(K(s(this,W)),Be(),K($e()));var h=!1,i=!1;const f=()=>{if(h){Je();return}h=!0,i&&ze(),s(this,w)!==null&&se(s(this,w),()=>{a(this,w,null)}),p(this,o,X).call(this,()=>{p(this,o,fe).call(this)})},u=l=>{try{i=!0,r==null||r(l,f),i=!1}catch(d){q(d,s(this,g)&&s(this,g).parent)}n&&a(this,w,p(this,o,X).call(this,()=>{try{return F(()=>{var d=Y;d.b=this,d.f|=ue,n(s(this,m),()=>l,()=>f)})}catch(d){return q(d,s(this,g).parent),null}}))};V(()=>{var l;try{l=this.transform_error(e)}catch(d){q(d,s(this,g)&&s(this,g).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(u,d=>q(d,s(this,g)&&s(this,g).parent)):u(l)})}}m=new WeakMap,W=new WeakMap,T=new WeakMap,C=new WeakMap,g=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakMap,N=new WeakMap,H=new WeakMap,D=new WeakMap,x=new WeakMap,B=new WeakMap,$=new WeakMap,R=new WeakMap,ee=new WeakMap,o=new WeakSet,Ne=function(){try{a(this,S,F(()=>s(this,C).call(this,s(this,m))))}catch(e){this.error(e)}},Re=function(e){const r=s(this,T).failed;r&&a(this,w,F(()=>{r(s(this,m),()=>e,()=>()=>{})}))},Ae=function(){const e=s(this,T).pending;e&&(this.is_pending=!0,a(this,E,F(()=>e(s(this,m)))),V(()=>{var r=a(this,N,document.createDocumentFragment()),n=Ee();r.append(n),a(this,S,p(this,o,X).call(this,()=>F(()=>s(this,C).call(this,n)))),s(this,D)===0&&(s(this,m).before(r),a(this,N,null),se(s(this,E),()=>{a(this,E,null)}),p(this,o,Q).call(this,pe))}))},fe=function(){try{if(this.is_pending=this.has_pending_snippet(),a(this,D,0),a(this,H,0),a(this,S,F(()=>{s(this,C).call(this,s(this,m))})),s(this,D)>0){var e=a(this,N,document.createDocumentFragment());Ye(s(this,S),e);const r=s(this,T).pending;a(this,E,F(()=>r(s(this,m))))}else p(this,o,Q).call(this,pe)}catch(r){this.error(r)}},Q=function(e){this.is_pending=!1,e.transfer_effects(s(this,B),s(this,$))},X=function(e){var r=Y,n=we,h=Te;Z(s(this,g)),G(s(this,g)),ge(s(this,g).ctx);try{return Pe.ensure(),e()}catch(i){return Ve(i),null}finally{Z(r),G(n),ge(h)}},he=function(e,r){var n;if(!this.has_pending_snippet()){this.parent&&p(n=this.parent,o,he).call(n,e,r);return}a(this,D,s(this,D)+e),s(this,D)===0&&(p(this,o,Q).call(this,r),s(this,E)&&se(s(this,E),()=>{a(this,E,null)}),s(this,N)&&(s(this,m).before(s(this,N)),a(this,N,null)))};const ut=["touchstart","touchmove"];function _t(t){return ut.includes(t)}const J=Symbol("events"),pt=new Set,ve=new Set;function gt(t,e,r,n={}){function h(i){if(n.capture||oe.call(e,i),!i.cancelBubble)return Qe(()=>r==null?void 0:r.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?V(()=>{e.addEventListener(t,h,n)}):e.addEventListener(t,h,n),h}function Et(t,e,r,n,h){var i={capture:n,passive:h},f=gt(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ue(()=>{e.removeEventListener(t,f,i)})}let ye=null;function oe(t){var O,b;var e=this,r=e.ownerDocument,n=t.type,h=((O=t.composedPath)==null?void 0:O.call(t))||[],i=h[0]||t.target;ye=t;var f=0,u=ye===t&&t[J];if(u){var l=h.indexOf(u);if(l!==-1&&(e===document||e===window)){t[J]=e;return}var d=h.indexOf(e);if(d===-1)return;l<=d&&(f=l)}if(i=h[f]||t.target,i!==e){Xe(t,"currentTarget",{configurable:!0,get(){return i||r}});var I=we,P=Y;G(null),Z(null);try{for(var A,v=[];i!==null;){var _=i.assignedSlot||i.parentNode||i.host||null;try{var y=(b=i[J])==null?void 0:b[n];y!=null&&(!i.disabled||t.target===i)&&y.call(i,t)}catch(k){A?v.push(k):A=k}if(t.cancelBubble||_===e||_===null)break;i=_}if(A){for(let k of v)queueMicrotask(()=>{throw k});throw A}}finally{t[J]=e,delete t.currentTarget,G(I),Z(P)}}}function wt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=`${r}`)}function vt(t,e){return De(t,e)}function Tt(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=M,h=L;try{for(var i=Ze(r);i&&(i.nodeType!==Se||i.data!==Ge);)i=Ke(i);if(!i)throw ae;z(!0),K(i);const f=De(t,{...e,anchor:i});return z(!1),f}catch(f){if(f instanceof Error&&f.message.split(`
|
|
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw f;return f!==ae&&console.warn("Failed to hydrate: ",f),e.recover===!1&&et(),ne(),tt(r),z(!1),vt(t,e)}finally{z(n),K(h)}}const U=new Map;function De(t,{target:e,anchor:r,props:n={},events:h,context:i,intro:f=!0,transformError:u}){ne();var l=void 0,d=rt(()=>{var I=r??e.appendChild(Ee());ct(I,{pending:()=>{}},v=>{it({});var _=Te;if(i&&(_.c=i),h&&(n.$$events=h),M&&ht(v,null),l=t(v,n)||{},M&&(Y.nodes.end=L,L===null||L.nodeType!==Se||L.data!==nt))throw at(),ae;ft()},u);var P=new Set,A=v=>{for(var _=0;_<v.length;_++){var y=v[_];if(!P.has(y)){P.add(y);var O=_t(y);for(const te of[e,document]){var b=U.get(te);b===void 0&&(b=new Map,U.set(te,b));var k=b.get(y);k===void 0?(te.addEventListener(y,oe,{passive:O}),b.set(y,1)):b.set(y,k+1)}}}};return A(st(pt)),ve.add(A),()=>{var O;for(var v of P)for(const b of[e,document]){var _=U.get(b),y=_.get(v);--y==0?(b.removeEventListener(v,oe),_.delete(v),_.size===0&&U.delete(b)):_.set(v,y)}ve.delete(A),I!==r&&((O=I.parentNode)==null||O.removeChild(I))}});return le.set(l,d),l}let le=new WeakMap;function St(t,e){const r=le.get(t);return r?(le.delete(t),r(e)):Promise.resolve()}export{Et as e,Tt as h,vt as m,wt as s,St as u};
|