var Me=Object.defineProperty;var ue=t=>{throw TypeError(t)};var Ye=(t,e,r)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var $=(t,e,r)=>Ye(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{aP as Ie,g as we,z as Le,A as xe,aQ as _e,B as q,ao as me,w as M,m as Y,M as C,aR as pe,b as Be,ab as Ce,ad as He,aS as ge,ai as F,k as Te,aT as se,ar as ie,ay as Pe,aU as ve,aV as Ve,aW as ye,aX as We,aY as qe,aZ as Z,a_ as G,a$ as be,b0 as ze,b1 as Re,az as Se,ag as $e,aw as ae,v as K,n as je,ae as Ue,b2 as j,E as Je,l as Qe,b3 as Xe,b4 as Ze,a6 as Ge,a3 as Ke,b5 as et,b6 as ne,x as tt,C as Ae,ax as rt,o as st,b7 as fe,q as U,b8 as it,av as at,b9 as nt,al as ft,p as ht,af as ot,ba as lt,a as ct}from"./CvjSAYrz.js";import{d as dt}from"./BsvCUYx-.js";function ut(t){let e=0,r=me(0),a;return()=>{Ie()&&(we(r),Le(()=>(e===0&&(a=xe(()=>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,T,L,g,R,w,m,S,x,N,H,P,V,A,ee,o,De,Ne,Oe,he,Q,X,oe;class gt{constructor(e,r,a,h){c(this,o);$(this,"parent");$(this,"is_pending",!1);$(this,"transform_error");c(this,E);c(this,z,Y?M:null);c(this,T);c(this,L);c(this,g);c(this,R,null);c(this,w,null);c(this,m,null);c(this,S,null);c(this,x,0);c(this,N,0);c(this,H,!1);c(this,P,new Set);c(this,V,new Set);c(this,A,null);c(this,ee,ut(()=>(n(this,A,me(s(this,x))),()=>{n(this,A,null)})));var i;n(this,E,e),n(this,T,r),n(this,L,f=>{var u=C;u.b=this,u.f|=pe,a(f)}),this.parent=C.b,this.transform_error=h??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),n(this,g,Be(()=>{if(Y){const f=s(this,z);Ce();const u=f.data===He;if(f.data.startsWith(ge)){const d=JSON.parse(f.data.slice(ge.length));p(this,o,Ne).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)),Y&&n(this,E,M)}defer_effect(e){qe(e,s(this,P),s(this,V))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(this,T).pending}update_pending_count(e){p(this,o,oe).call(this,e),n(this,x,s(this,x)+e),!(!s(this,A)||s(this,H))&&(n(this,H,!0),q(()=>{n(this,H,!1),s(this,A)&&$e(s(this,A),s(this,x))}))}get_effect_pending(){return s(this,ee).call(this),we(s(this,A))}error(e){var r=s(this,T).onerror;let a=s(this,T).failed;if(!r&&!a)throw e;s(this,R)&&(ae(s(this,R)),n(this,R,null)),s(this,w)&&(ae(s(this,w)),n(this,w,null)),s(this,m)&&(ae(s(this,m)),n(this,m,null)),Y&&(K(s(this,z)),je(),K(Ue()));var h=!1,i=!1;const f=()=>{if(h){Ze();return}h=!0,i&&Xe(),s(this,m)!==null&&ie(s(this,m),()=>{n(this,m,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){j(d,s(this,g)&&s(this,g).parent)}a&&n(this,m,p(this,o,X).call(this,()=>{se.ensure();try{return F(()=>{var d=C;d.b=this,d.f|=pe,a(s(this,E),()=>l,()=>f)})}catch(d){return j(d,s(this,g).parent),null}}))};q(()=>{var l;try{l=this.transform_error(e)}catch(d){j(d,s(this,g)&&s(this,g).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(u,d=>j(d,s(this,g)&&s(this,g).parent)):u(l)})}}E=new WeakMap,z=new WeakMap,T=new WeakMap,L=new WeakMap,g=new WeakMap,R=new WeakMap,w=new WeakMap,m=new WeakMap,S=new WeakMap,x=new WeakMap,N=new WeakMap,H=new WeakMap,P=new WeakMap,V=new WeakMap,A=new WeakMap,ee=new WeakMap,o=new WeakSet,De=function(){try{n(this,R,F(()=>s(this,L).call(this,s(this,E))))}catch(e){this.error(e)}},Ne=function(e){const r=s(this,T).failed;r&&n(this,m,F(()=>{r(s(this,E),()=>e,()=>()=>{})}))},Oe=function(){const e=s(this,T).pending;e&&(this.is_pending=!0,n(this,w,F(()=>e(s(this,E)))),q(()=>{var r=n(this,S,document.createDocumentFragment()),a=Te();r.append(a),n(this,R,p(this,o,X).call(this,()=>(se.ensure(),F(()=>s(this,L).call(this,a))))),s(this,N)===0&&(s(this,E).before(r),n(this,S,null),ie(s(this,w),()=>{n(this,w,null)}),p(this,o,Q).call(this))}))},he=function(){try{if(this.is_pending=this.has_pending_snippet(),n(this,N,0),n(this,x,0),n(this,R,F(()=>{s(this,L).call(this,s(this,E))})),s(this,N)>0){var e=n(this,S,document.createDocumentFragment());Pe(s(this,R),e);const r=s(this,T).pending;n(this,w,F(()=>r(s(this,E))))}else p(this,o,Q).call(this)}catch(r){this.error(r)}},Q=function(){this.is_pending=!1;for(const e of s(this,P))ve(e,Ve),ye(e);for(const e of s(this,V))ve(e,We),ye(e);s(this,P).clear(),s(this,V).clear()},X=function(e){var r=C,a=Re,h=Se;Z(s(this,g)),G(s(this,g)),be(s(this,g).ctx);try{return e()}catch(i){return ze(i),null}finally{Z(r),G(a),be(h)}},oe=function(e){var r;if(!this.has_pending_snippet()){this.parent&&p(r=this.parent,o,oe).call(r,e);return}n(this,N,s(this,N)+e),s(this,N)===0&&(p(this,o,Q).call(this),s(this,w)&&ie(s(this,w),()=>{n(this,w,null)}),s(this,S)&&(s(this,E).before(s(this,S)),n(this,S,null)))};const vt=["touchstart","touchmove"];function yt(t){return vt.includes(t)}const I=Symbol("events"),ke=new Set,le=new Set;function bt(t,e,r,a={}){function h(i){if(a.capture||ce.call(e,i),!i.cancelBubble)return et(()=>r==null?void 0:r.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?q(()=>{e.addEventListener(t,h,a)}):e.addEventListener(t,h,a),h}function Rt(t,e,r,a,h){var i={capture:a,passive:h},f=bt(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ke(()=>{e.removeEventListener(t,f,i)})}function St(t,e,r){(e[I]??(e[I]={}))[t]=r}function At(t){for(var e=0;e{throw k});throw D}}finally{t[I]=e,delete t.currentTarget,G(B),Z(W)}}}function Dt(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 Et(t,e){return Fe(t,e)}function Nt(t,e){ne(),e.intro=e.intro??!1;const r=e.target,a=Y,h=M;try{for(var i=tt(r);i&&(i.nodeType!==Ae||i.data!==rt);)i=st(i);if(!i)throw fe;U(!0),K(i);const f=Fe(t,{...e,anchor:i});return U(!1),f}catch(f){if(f instanceof Error&&f.message.split(` `).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),U(!1),Et(t,e)}finally{U(a),K(h)}}const J=new Map;function Fe(t,{target:e,anchor:r,props:a={},events:h,context:i,intro:f=!0,transformError:u}){ne();var l=void 0,d=nt(()=>{var B=r??e.appendChild(Te());pt(B,{pending:()=>{}},v=>{ht({});var _=Se;if(i&&(_.c=i),h&&(a.$$events=h),Y&&dt(v,null),l=t(v,a)||{},Y&&(C.nodes.end=M,M===null||M.nodeType!==Ae||M.data!==ot))throw lt(),fe;ct()},u);var W=new Set,D=v=>{for(var _=0;_{var O;for(var v of W)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),B!==r&&((O=B.parentNode)==null||O.removeChild(B))}});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,At as d,Rt as e,Nt as h,Et as m,Dt as s,Ot as u};