import{ac as ie,v as Q,U as oe,a8 as Z,q as le,ad as q,V as N,k as l,h as _,a0 as m,ae as U,d as ue,b as Y,af as fe,ag as z,P as y,O as R,ah as I,N as C,R as ce,ai as G,aj as de,ak as J,al as he,am as _e,aa as k,an as L,ao as X,ap as pe,aq as ee,m as te,ar as ve,M as P,i as A,as as ge,g as me,at as D,E as ye,au as Ee,av as Te,aw as be,ax as we,B as Ne,ay as Re,az as Ae,aA as S,aB as Se,aC as De,aD as Me,aE as Oe,aF as ke,aG as Le,aH as $,aI as F,H as xe,aJ as Ie,aK as H,j as M,aL as Ce,aM as Pe,aN as Fe,aO as He,p as Ve,aP as Be,aQ as We,a as Ye}from"./C2ft-gVq.js";function $e(t){let e=0,r=Z(0),s;return()=>{ie()&&(Q(r),oe(()=>(e===0&&(s=le(()=>t(()=>q(r)))),e+=1,()=>{N(()=>{e-=1,e===0&&(s?.(),s=void 0,q(r))})})))}}var je=ye|Ee;function qe(t,e,r,s){new Ue(t,e,r,s)}class Ue{parent;is_pending=!1;transform_error;#t;#v=_?l:null;#s;#u;#e;#a=null;#r=null;#n=null;#i=null;#f=0;#l=0;#c=!1;#d=new Set;#h=new Set;#o=null;#y=$e(()=>(this.#o=Z(this.#f),()=>{this.#o=null}));constructor(e,r,s,a){this.#t=e,this.#s=r,this.#u=n=>{var i=m;i.b=this,i.f|=U,s(n)},this.parent=m.b,this.transform_error=a??this.parent?.transform_error??(n=>n),this.#e=ue(()=>{if(_){const n=this.#v;Y();const i=n.data===fe;if(n.data.startsWith(z)){const o=JSON.parse(n.data.slice(z.length));this.#T(o)}else i?this.#b():this.#E()}else this.#g()},je),_&&(this.#t=l)}#E(){try{this.#a=y(()=>this.#u(this.#t))}catch(e){this.error(e)}}#T(e){const r=this.#s.failed;r&&(this.#n=y(()=>{r(this.#t,()=>e,()=>()=>{})}))}#b(){const e=this.#s.pending;e&&(this.is_pending=!0,this.#r=y(()=>e(this.#t)),N(()=>{var r=this.#i=document.createDocumentFragment(),s=R();r.append(s),this.#a=this.#p(()=>(I.ensure(),y(()=>this.#u(s)))),this.#l===0&&(this.#t.before(r),this.#i=null,C(this.#r,()=>{this.#r=null}),this.#_())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#f=0,this.#a=y(()=>{this.#u(this.#t)}),this.#l>0){var e=this.#i=document.createDocumentFragment();ce(this.#a,e);const r=this.#s.pending;this.#r=y(()=>r(this.#t))}else this.#_()}catch(r){this.error(r)}}#_(){this.is_pending=!1;for(const e of this.#d)G(e,de),J(e);for(const e of this.#h)G(e,he),J(e);this.#d.clear(),this.#h.clear()}defer_effect(e){_e(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#p(e){var r=m,s=ee,a=te;k(this.#e),L(this.#e),X(this.#e.ctx);try{return e()}catch(n){return pe(n),null}finally{k(r),L(s),X(a)}}#m(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(e);return}this.#l+=e,this.#l===0&&(this.#_(),this.#r&&C(this.#r,()=>{this.#r=null}),this.#i&&(this.#t.before(this.#i),this.#i=null))}update_pending_count(e){this.#m(e),this.#f+=e,!(!this.#o||this.#c)&&(this.#c=!0,N(()=>{this.#c=!1,this.#o&&ve(this.#o,this.#f)}))}get_effect_pending(){return this.#y(),Q(this.#o)}error(e){var r=this.#s.onerror;let s=this.#s.failed;if(!r&&!s)throw e;this.#a&&(P(this.#a),this.#a=null),this.#r&&(P(this.#r),this.#r=null),this.#n&&(P(this.#n),this.#n=null),_&&(A(this.#v),ge(),A(me()));var a=!1,n=!1;const i=()=>{if(a){be();return}a=!0,n&&Te(),this.#n!==null&&C(this.#n,()=>{this.#n=null}),this.#p(()=>{I.ensure(),this.#g()})},f=o=>{try{n=!0,r?.(o,i),n=!1}catch(u){D(u,this.#e&&this.#e.parent)}s&&(this.#n=this.#p(()=>{I.ensure();try{return y(()=>{var u=m;u.b=this,u.f|=U,s(this.#t,()=>o,()=>i)})}catch(u){return D(u,this.#e.parent),null}}))};N(()=>{var o;try{o=this.transform_error(e)}catch(u){D(u,this.#e&&this.#e.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(f,u=>D(u,this.#e&&this.#e.parent)):f(o)})}}function st(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ze=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function at(t){return ze.includes(t)}const Ge={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function it(t){return t=t.toLowerCase(),Ge[t]??t}const Je=["touchstart","touchmove"];function Xe(t){return Je.includes(t)}const Ke=["textarea","script","style","title"];function ot(t){return Ke.includes(t)}const w=Symbol("events"),re=new Set,V=new Set;function ne(t,e,r,s={}){function a(n){if(s.capture||B.call(e,n),!n.cancelBubble)return we(()=>r?.call(this,n))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?N(()=>{e.addEventListener(t,a,s)}):e.addEventListener(t,a,s),a}function lt(t,e,r,s={}){var a=ne(e,t,r,s);return()=>{t.removeEventListener(e,a,s)}}function ut(t,e,r,s,a){var n={capture:s,passive:a},i=ne(t,e,r,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Re(()=>{e.removeEventListener(t,i,n)})}function ft(t,e,r){(e[w]??={})[t]=r}function ct(t){for(var e=0;e{throw p});throw g}}finally{t[w]=e,delete t.currentTarget,L(E),k(b)}}}const Qe=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Ze(t){return Qe?.createHTML(t)??t}function se(t){var e=Ae("template");return e.innerHTML=Ze(t.replaceAll("","")),e.content}function v(t,e){var r=m;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function dt(t,e){var r=(e&De)!==0,s=(e&Me)!==0,a,n=!t.startsWith("");return()=>{if(_)return v(l,null),l;a===void 0&&(a=se(n?t:""+t),r||(a=S(a)));var i=s||Se?document.importNode(a,!0):a.cloneNode(!0);if(r){var f=S(i),o=i.lastChild;v(f,o)}else v(i,i);return i}}function et(t,e,r="svg"){var s=!t.startsWith(""),a=`<${r}>${s?t:""+t}`,n;return()=>{if(_)return v(l,null),l;if(!n){var i=se(a),f=S(i);n=S(f)}var o=n.cloneNode(!0);return v(o,o),o}}function ht(t,e){return et(t,e,"svg")}function _t(t=""){if(!_){var e=R(t+"");return v(e,e),e}var r=l;return r.nodeType!==ke?(r.before(r=R()),A(r)):Le(r),v(r,r),r}function pt(){if(_)return v(l,null),l;var t=document.createDocumentFragment(),e=document.createComment(""),r=R();return t.append(e,r),v(e,r),t}function vt(t,e){if(_){var r=m;((r.f&Oe)===0||r.nodes.end===null)&&(r.nodes.end=l),Y();return}t!==null&&t.before(e)}function gt(){if(_&&l&&l.nodeType===$&&l.textContent?.startsWith("$")){const t=l.textContent.substring(1);return Y(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function mt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=`${r}`)}function tt(t,e){return ae(t,e)}function yt(t,e){F(),e.intro=e.intro??!1;const r=e.target,s=_,a=l;try{for(var n=S(r);n&&(n.nodeType!==$||n.data!==xe);)n=Ie(n);if(!n)throw H;M(!0),A(n);const i=ae(t,{...e,anchor:n});return M(!1),i}catch(i){if(i instanceof Error&&i.message.split(` `).some(f=>f.startsWith("https://svelte.dev/e/")))throw i;return i!==H&&console.warn("Failed to hydrate: ",i),e.recover===!1&&Ce(),F(),Pe(r),M(!1),tt(t,e)}finally{M(s),A(a)}}const O=new Map;function ae(t,{target:e,anchor:r,props:s={},events:a,context:n,intro:i=!0,transformError:f}){F();var o=void 0,u=Fe(()=>{var E=r??e.appendChild(R());qe(E,{pending:()=>{}},d=>{Ve({});var c=te;if(n&&(c.c=n),a&&(s.$$events=a),_&&v(d,null),o=t(d,s)||{},_&&(m.nodes.end=l,l===null||l.nodeType!==$||l.data!==Be))throw We(),H;Ye()},f);var b=new Set,g=d=>{for(var c=0;c{for(var d of b)for(const p of[e,document]){var c=O.get(p),h=c.get(d);--h==0?(p.removeEventListener(d,B),c.delete(d),c.size===0&&O.delete(p)):c.set(d,h)}V.delete(g),E!==r&&E.parentNode?.removeChild(E)}});return W.set(o,u),o}let W=new WeakMap;function Et(t,e){const r=W.get(t);return r?(W.delete(t),r(e)):Promise.resolve()}const rt="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(rt);export{vt as a,ft as b,pt as c,ct as d,ut as e,dt as f,v as g,yt as h,ot as i,ht as j,$e as k,st as l,tt as m,ne as n,lt as o,gt as p,it as q,at as r,mt as s,_t as t,Et as u};