import{aF as x,p as A,k as H,a5 as I,b as R,aG as T,q as M,az as C,P as y,O as E,T as D,G as p,aH as F,aI as W,aJ as q,M as h,a7 as v,aK as B,aL as G,aM as $,h as f,F as l,aN as U,e as j,aO as z,g as J,aP as K}from"./TwTPH6iZ.js";function ae(e){let r=0,t=I(0),s;return()=>{x()&&(A(t),H(()=>(r===0&&(s=R(()=>e(()=>T(t)))),r+=1,()=>{M(()=>{r-=1,r===0&&(s?.(),s=void 0,T(t))})})))}}const N=Symbol("events"),V=new Set,X=new Set;function O(e,r,t,s={}){function n(a){if(s.capture||Q.call(r,a),!a.cancelBubble)return F(()=>t?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?M(()=>{r.addEventListener(e,n,s)}):r.addEventListener(e,n,s),n}function ne(e,r,t,s={}){var n=O(r,e,t,s);return()=>{e.removeEventListener(r,n,s)}}function se(e,r,t,s,n){var a={capture:s,passive:n},i=O(e,r,t,a);(r===document.body||r===window||r===document||r instanceof HTMLMediaElement)&&W(()=>{r.removeEventListener(e,i,a)})}function ie(e,r,t){(r[N]??={})[e]=t}function oe(e){for(var r=0;r<e.length;r++)V.add(e[r]);for(var t of X)t(e)}let L=null;function Q(e){var r=this,t=r.ownerDocument,s=e.type,n=e.composedPath?.()||[],a=n[0]||e.target;L=e;var i=0,c=L===e&&e.__root;if(c){var o=n.indexOf(c);if(o!==-1&&(r===document||r===window)){e.__root=r;return}var m=n.indexOf(r);if(m===-1)return;o<=m&&(i=o)}if(a=n[i]||e.target,a!==r){C(e,"currentTarget",{configurable:!0,get(){return a||t}});var S=D,k=p;y(null),E(null);try{for(var d,b=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var w=a[N]?.[s];w!=null&&(!a.disabled||e.target===a)&&w.call(a,e)}catch(_){d?b.push(_):d=_}if(e.cancelBubble||g===r||g===null)break;a=g}if(d){for(let _ of b)queueMicrotask(()=>{throw _});throw d}}finally{e.__root=r,delete e.currentTarget,y(S),E(k)}}}const Y=globalThis?.window?.trustedTypes?.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Z(e){return Y?.createHTML(e)??e}function P(e,r=!1){var t=q("template");return e=e.replaceAll("<!>","<!---->"),t.innerHTML=r?Z(e):e,t.content}function u(e,r){var t=p;t.nodes===null&&(t.nodes={start:e,end:r,a:null,t:null})}function ue(e,r){var t=(r&G)!==0,s=(r&$)!==0,n,a=!e.startsWith("<!>");return()=>{if(f)return u(l,null),l;n===void 0&&(n=P(a?e:"<!>"+e,!0),t||(n=v(n)));var i=s||B?document.importNode(n,!0):n.cloneNode(!0);if(t){var c=v(i),o=i.lastChild;u(c,o)}else u(i,i);return i}}function ee(e,r,t="svg"){var s=!e.startsWith("<!>"),n=`<${t}>${s?e:"<!>"+e}</${t}>`,a;return()=>{if(f)return u(l,null),l;if(!a){var i=P(n,!0),c=v(i);a=v(c)}var o=a.cloneNode(!0);return u(o,o),o}}function le(e,r){return ee(e,r,"svg")}function ce(e=""){if(!f){var r=h(e+"");return u(r,r),r}var t=l;return t.nodeType!==z?(t.before(t=h()),J(t)):K(t),u(t,t),t}function fe(){if(f)return u(l,null),l;var e=document.createDocumentFragment(),r=document.createComment(""),t=h();return e.append(r,t),u(r,t),e}function de(e,r){if(f){var t=p;((t.f&U)===0||t.nodes.end===null)&&(t.nodes.end=l),j();return}e!==null&&e.before(r)}const re="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(re);export{de as a,V as b,ae as c,u as d,fe as e,ue as f,ie as g,Q as h,oe as i,O as j,le as k,se as l,ne as o,X as r,ce as t};
