@pie-players/pie-section-player 1.0.0-beta.1 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import{t as Ol}from"./attribute-coercion-b93b482c.js";import{r as Ll}from"./tool-host-contract-fae1c415.js";import{i as Nl}from"./provider-4c704118.js";if(typeof window<"u"){var Kn,Un;((Kn=(Un=window).__svelte??(Un.__svelte={})).v??(Kn.v=new Set)).add("5")}var Me={},U=Symbol("uninitialized"),mi=Array.isArray,Pl=Array.prototype.indexOf,en=Array.prototype.includes,Ar=Array.from,gr=Object.keys,Ke=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,zl=Object.getOwnPropertyDescriptors,Il=Object.prototype,Tl=Array.prototype,wi=Object.getPrototypeOf,Gn=Object.isExtensible,Rl=()=>{};function Dl(t){for(var e=0;e<t.length;e++)t[e]()}function yi(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function Ue(t){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(t)}function Hl(t,e){if(Ue(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ue(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vl(t){var e=Hl(t,"string");return Ue(e)=="symbol"?e:e+""}function D(t,e,r){return(e=Vl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=1024,St=2048,de=4096,wn=8192,Bl=16384,yn=32768,Yn=1<<25,bn=65536,Ae=1<<19,ql=1<<20,He=1<<25,Zn=1<<21,Fl=1<<22,mr=1<<23,Ve=Symbol("$state"),bi=Symbol("component"),_i=Symbol("legacy props"),Kl=Symbol(""),rn=Symbol("attributes"),nn=Symbol("class"),ln=Symbol("style"),vr=Symbol("text"),Be=Symbol("form reset"),Xe=new class extends Error{constructor(...t){super(...t),D(this,"name","StaleReactionError"),D(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ul=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Gl(){console.warn("https://svelte.dev/e/derived_inert")}function Cr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Yl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var O=!1;function qt(t){O=t}var L;function it(t){if(t===null)throw Cr(),Me;return L=t}function Or(){return it(Tt(L))}function ct(t){if(O){if(Tt(L)!==null)throw Cr(),Me;L=t}}function Zl(t=1){if(O){for(var e=t,r=L;e--;)r=Tt(r);L=r}}function wr(t=!0){for(var e=0,r=L;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(e===0)return r;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var i=Tt(r);t&&r.remove(),r=i}}function $i(t){if(!t||t.nodeType!==8)throw Cr(),Me;return t.data}function ki(t){return t===this.v}function Ql(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function xi(t){return!Ql(t,this.v)}function Xl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Jl(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function to(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ro(t){throw new Error("https://svelte.dev/e/effect_orphan")}function no(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function io(){throw new Error("https://svelte.dev/e/hydration_failed")}function lo(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function oo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function so(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ao(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function uo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ce=!1,Lr=!1,B=null;function Se(t){B=t}function Mi(t,e=!1,r){B={p:B,i:!1,c:null,e:null,s:t,x:null,r:j,l:Lr&&!e?{s:null,u:null,$:[]}:null}}function Si(t){var e=B,r=e.e;if(r!==null){e.e=null;for(var n of r)Yi(n)}return t!==void 0&&(e.x=t),e.i=!0,B=e.p,_n(t)}function _n(t={}){return Ke(t,bi,{value:!0}),t}function Je(){return!Lr||B!==null&&B.l===null}var ae=[];function Ei(){var t=ae;ae=[],Dl(t)}function zt(t){if(ae.length===0&&!qe){var e=ae;queueMicrotask(()=>{e===ae&&Ei()})}ae.push(t)}function fo(){for(;ae.length>0;)Ei()}var co=~(St|de|pt);function q(t,e){t.f=t.f&co|e}function $n(t){(t.f&512)!==0||t.deps===null?q(t,pt):q(t,de)}function Wi(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),q(t,pt)}var Qn=!1;function ji(){Qn||(Qn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Be]?.()})},{capture:!0}))}function Oe(t){var e=C,r=j;gt(null),It(null);try{return t()}finally{gt(e),It(r)}}function ho(t,e,r,n=r){t.addEventListener(e,()=>Oe(r));const i=t[Be];i?t[Be]=()=>{i(),n(!0)}:t[Be]=()=>n(!0),ji()}function vo(t,e,r,n){const i=Je()?Ge:kn;var l=t.filter(d=>!d.settled),o=e.map(i);if(r.length===0&&l.length===0){n(o);return}var a=j,u=po(),c=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(d=>d.promise)):null;function h(d){if((a.f&16384)===0){u();try{n([...o,...d])}catch(y){Pt(y,a)}yr()}}var p=Ai();if(r.length===0){c.then(()=>h([])).finally(p);return}function v(){Promise.all(r.map(d=>go(d))).then(h).catch(d=>Pt(d,a)).finally(p)}c?c.then(()=>{u(),v(),yr()}):v()}function po(){var t=j,e=C,r=B,n=x;return function(i=!0){It(t),gt(e),Se(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function yr(t=!0){It(null),gt(null),Se(null),t&&x?.deactivate()}function Ai(){var t=j,e=t.b,r=x,n=!!e?.is_rendered();return e?.update_pending_count(1,r),r.increment(n,t),()=>{e?.update_pending_count(-1,r),r.decrement(n,t)}}function Ge(t){var e=2|St;return j!==null&&(j.f|=Ae),{ctx:B,deps:null,effects:null,equals:ki,f:e,fn:t,reactions:null,rv:0,v:U,wv:0,parent:j,ac:null}}var Te=Symbol("obsolete");function go(t,e,r){let n=j;n===null&&Xl();var i=void 0,l=pe(U),o=!C,a=new Set;return Oo(()=>{var u=j,c=yi();i=c.promise;try{Promise.resolve(t()).then(c.resolve,d=>{d!==Xe&&c.reject(d)}).finally(yr)}catch(d){c.reject(d),yr()}var h=x;if(o){if((u.f&32768)!==0)var p=Ai();if(n.b?.is_rendered())h.async_deriveds.get(u)?.reject(Te);else for(const d of a.values())d.reject(Te);a.add(c),h.async_deriveds.set(u,c)}const v=(d,y=void 0)=>{p?.(),a.delete(c),y!==Te&&(h.activate(),y?(l.f|=mr,We(l,y)):(l.f&8388608&&(l.f^=mr),We(l,d)),h.deactivate())};c.promise.then(v,d=>v(null,d||"unknown"))}),Gi(()=>{for(const u of a)u.reject(Te)}),new Promise(u=>{function c(h){function p(){h===i?u(l):c(i)}h.then(p,p)}c(i)})}function Gt(t){const e=Ge(t);return el(e),e}function kn(t){const e=Ge(t);return e.equals=xi,e}function mo(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)et(e[r])}}function xn(t){var e,r=j,n=t.parent;if(!Ut&&n!==null&&t.v!==U&&(n.f&24576)!==0)return Gl(),t.v;It(n);try{mo(t),e=ll(t)}finally{It(r)}return e}function Ci(t){var e=xn(t);if(!t.equals(e)&&(t.wv=nl(),(!x?.is_fork||t.deps===null)&&(x!==null?(x.capture(t,e,!0),br?.capture(t,e,!0)):t.v=e,t.deps===null))){q(t,pt);return}Ut||(tt!==null?(Wn()||x?.is_fork)&&tt.set(t,e):$n(t))}function wo(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&Oe(()=>{e.ac.abort(Xe),e.ac=null}),e.fn!==null&&(e.teardown=Rl),Ze(e,0),An(e))}function Oi(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&je(e)}function Li(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mn(t,e){Li(t,e),e.add(t)}function k(t,e,r){Li(t,e),e.set(t,r)}function W(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function _(t,e,r){return t.set(W(t,e),r),r}function s(t,e){return t.get(W(t,e))}var Ni,on=null,ye=null,x=null,br=null,tt=null,sn=null,qe=!1,Dr=!1,Ye=null,_r=null,Pi=0,yo=1,an=new WeakMap,ce=new WeakMap,ke=new WeakMap,$r=new WeakMap,lr=new WeakMap,be=new WeakMap,oe=new WeakMap,Re=new WeakMap,Ot=new WeakMap,Xn=new WeakMap,Ee=new WeakMap,Ft=new WeakMap,Qt=new WeakMap,Hr=new WeakMap,or=new WeakMap,K=new WeakSet,ge=class zi{constructor(){Mn(this,K),D(this,"id",yo++),k(this,an,!1),D(this,"linked",!0),k(this,ce,null),k(this,ke,null),D(this,"async_deriveds",new Map),D(this,"current",new Map),D(this,"previous",new Map),k(this,$r,new Set),k(this,lr,new Set),k(this,be,0),k(this,oe,new Map),k(this,Re,null),k(this,Ot,[]),k(this,Xn,[]),k(this,Ee,new Set),k(this,Ft,new Set),k(this,Qt,new Map),k(this,Hr,new Set),D(this,"is_fork",!1),k(this,or,!1),ye===null?on=ye=this:(_(ke,ye,this),_(ce,this,ye)),ye=this}skip_effect(e){s(Qt,this).has(e)||s(Qt,this).set(e,{d:[],m:[]}),s(Hr,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=s(Qt,this).get(e);if(n){s(Qt,this).delete(e);for(var i of n.d)q(i,St),r(i);for(i of n.m)q(i,de),r(i)}s(Hr,this).add(e)}capture(e,r,n=!1){e.v!==U&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),tt?.set(e,r)),this.is_fork||(e.v=r)}activate(){x=this}deactivate(){x=null,tt=null}flush(){try{Dr=!0,x=this,W(K,this,kr).call(this)}finally{Pi=0,sn=null,Ye=null,_r=null,Dr=!1,x=null,tt=null,Nt.clear()}}discard(){for(const e of s(lr,this))e(this);s(lr,this).clear();for(const e of this.async_deriveds.values())e.reject(Te);W(K,this,xr).call(this),s(Re,this)?.resolve()}register_created_effect(e){s(Xn,this).push(e)}increment(e,r){if(_(be,this,s(be,this)+1),e){let n=s(oe,this).get(r)??0;s(oe,this).set(r,n+1)}}decrement(e,r){if(_(be,this,s(be,this)-1),e){let n=s(oe,this).get(r)??0;n===1?s(oe,this).delete(r):s(oe,this).set(r,n-1)}s(or,this)||(_(or,this,!0),zt(()=>{_(or,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)s(Ee,this).add(n);for(const n of r)s(Ft,this).add(n);e.clear(),r.clear()}oncommit(e){s($r,this).add(e)}ondiscard(e){s(lr,this).add(e)}settled(){return(s(Re,this)??_(Re,this,yi())).promise}static ensure(){if(x===null){const e=x=new zi;!Dr&&!qe&&zt(()=>{s(an,e)||e.flush()})}return x}apply(){if(!Ce||!this.is_fork&&s(ce,this)===null&&s(ke,this)===null){tt=null;return}tt=new Map;for(const[r,[n]]of this.current)tt.set(r,n);for(let r=on;r!==null;r=s(ke,r))if(!(r===this||r.is_fork)){var e=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){e=!0;break}}if(!e)for(const[n,i]of r.previous)tt.has(n)||tt.set(n,i)}}schedule(e){if(sn=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(Ot,this).push(e)}};Ni=ge;function Jn(){if(this.is_fork)return!0;for(const r of s(oe,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(s(Qt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function bo(){var t=[];for(const i of s(Ot,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,r=!1;e.parent!==null;){e=e.parent;var n=e.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}e.f^=pt}}r||t.push(e)}return _(Ot,this,[]),t}function kr(){_(an,this,!0);for(const o of s(Ee,this))s(Ft,this).delete(o),q(o,St),this.schedule(o);for(const o of s(Ft,this))q(o,de),this.schedule(o);this.apply();for(var t=Ye=[],e=[],r=_r=[];s(Ot,this).length>0;){Pi++>1e3&&(W(K,this,xr).call(this),xo());for(const o of W(K,this,bo).call(this))try{W(K,this,_o).call(this,o,t,e)}catch(a){throw Ri(o),W(K,this,Jn).call(this)||this.discard(),a}}if(x=null,r.length>0){var n=Ni.ensure();for(const o of r)n.schedule(o)}if(Ye=null,_r=null,W(K,this,Jn).call(this)){W(K,this,sr).call(this,e),W(K,this,sr).call(this,t);for(const[o,a]of s(Qt,this))Ti(o,a);r.length>0&&W(K,x,kr).call(x);return}const i=W(K,this,$o).call(this);if(i){W(K,this,sr).call(this,e),W(K,this,sr).call(this,t),W(K,i,ko).call(i,this);return}s(Ee,this).clear(),s(Ft,this).clear();for(const o of s($r,this))o(this);s($r,this).clear(),br=this,ti(e),ti(t),br=null,s(Re,this)?.resolve();var l=x;if(s(be,this)===0&&(s(Ot,this).length===0||l!==null)&&W(K,this,xr).call(this),s(Ot,this).length>0)if(l!==null){for(const o of s(Ot,this))s(Ot,l).push(o);_(Ot,this,[])}else l=this;l!==null&&(Nt.clear(),W(K,l,kr).call(l))}function _o(t,e,r){t.f^=pt;for(var n=t.first;n!==null;){var i=n.f,l=(i&96)!==0;if(!(l&&(i&1024)!==0||(i&8192)!==0||s(Qt,this).has(n))&&n.fn!==null){l?n.f^=pt:(i&4)!==0?e.push(n):Ce&&(i&16777224)!==0?r.push(n):tr(n)&&(i&16&&s(Ft,this).add(n),je(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var a=n.next;if(a!==null){n=a;break}n=n.parent}}}function $o(){for(var t=s(ce,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=s(ce,t)}return null}function ko(t){for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(s(Ee,t),s(Ft,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)e(o);else{var l=o;i&4194320&&!this.async_deriveds.has(l)&&(s(Ft,this).delete(l),q(l,St),this.schedule(l))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),W(K,t,xr).call(t),x=this,W(K,this,kr).call(this)}function sr(t){for(var e=0;e<t.length;e+=1)Wi(t[e],s(Ee,this),s(Ft,this))}function xr(){if(this.linked){var t=s(ce,this),e=s(ke,this);t===null?on=e:_(ke,t,e),e===null?ye=t:_(ce,e,t),this.linked=!1}}function Mr(t){var e=qe;qe=!0;try{var r;for(t&&(x!==null&&!x.is_fork&&x.flush(),r=t());;){if(fo(),x===null)return r;x.flush()}}finally{qe=e}}function xo(){try{no()}catch(t){Pt(t,sn)}}var Ct=null;function ti(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&tr(n)&&(Ct=new Set,je(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Xi(n),Ct?.size>0)){Nt.clear();for(const i of Ct){if((i.f&24576)!==0)continue;const l=[i];let o=i.parent;for(;o!==null;)Ct.has(o)&&(Ct.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const u=l[a];!(u.f&24576)&&je(u)}}Ct.clear()}}Ct=null}}function Ii(t){x.schedule(t)}function Ti(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),q(t,pt);for(var r=t.first;r!==null;)Ti(r,e),r=r.next}}function Ri(t){q(t,pt);for(var e=t.first;e!==null;)Ri(e),e=e.next}var Sr=new Set,Nt=new Map,Di=!1;function pe(t,e){return{f:0,v:t,reactions:null,equals:ki,rv:0,wv:0}}function H(t,e){const r=pe(t,e);return el(r),r}function Hi(t,e=!1,r=!0){const n=pe(t);if(e||(n.equals=xi),Lr&&r&&B!==null&&B.l!==null){var i;((i=B.l).s??(i.s=[])).push(n)}return n}function S(t,e,r=!1){return C!==null&&(!_t||C.f&131072)&&Je()&&C.f&4325394&&(kt===null||!kt.has(t))&&ao(),We(t,r?Xt(e):e,_r)}var se=null,un=0;function We(t,e,r=null){if(!t.equals(e)){Ut?Nt.set(t,e):Nt.has(t)||Nt.set(t,t.v);var n=ge.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&xn(i),tt===null&&$n(i)}t.wv=nl(),se=null,un=0,Vi(t,St,r),se=null,Je()&&j!==null&&j.f&1024&&!(j.f&96)&&(ht===null?zo([t]):ht.push(t)),!n.is_fork&&Sr.size>0&&!Di&&Mo()}return e}function Mo(){Di=!1;for(const t of Sr){t.f&1024&&q(t,de);let e;try{e=tr(t)}catch{e=!0}e&&je(t)}Sr.clear()}function So(t,e=1){var r=f(t),n=e===1?r++:r--;return S(t,r),n}function Fe(t){S(t,t.v+1)}function Vi(t,e,r){var n=t.reactions;if(n!==null){var i=Je(),l=n.length;if(un+=l,un>1e5&&se===null&&(se=new Set),se!==null){if(se.has(t))return;se.add(t)}for(var o=0;o<l;o++){var a=n[o],u=a.f;if(!(!i&&a===j)){var c=(u&St)===0;if(c&&q(a,e),(u&131072)!==0)Sr.add(a);else if((u&2)!==0){var h=a;tt?.delete(h),Vi(h,de,r)}else if(c){var p=a;u&16&&Ct!==null&&Ct.add(p),r!==null?r.push(p):Ii(p)}}}}}function Xt(t){if(typeof t!="object"||t===null||Ve in t||bi in t)return t;const e=wi(t);if(e!==Il&&e!==Tl)return t;var r=new Map,n=mi(t),i=H(0),l=null,o=he,a=u=>{if(he===o)return u();var c=C,h=he;gt(null),li(o);var p=u();return gt(c),li(h),p};return n&&r.set("length",H(t.length,l)),new Proxy(t,{defineProperty(u,c,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&oo();var p=r.get(c);return p===void 0?a(()=>{var v=H(h.value,l);return r.set(c,v),v}):S(p,h.value,!0),!0},deleteProperty(u,c){var h=r.get(c);if(h===void 0){if(c in u){const p=a(()=>H(U,l));r.set(c,p),Fe(i)}}else S(h,U),Fe(i);return!0},get(u,c,h){if(c===Ve)return t;var p=r.get(c),v=c in u;if(p===void 0&&(!v||fe(u,c)?.writable)&&(p=a(()=>H(Xt(v?u[c]:U),l)),r.set(c,p)),p!==void 0){var d=f(p);return d===U?void 0:d}return Reflect.get(u,c,h)},getOwnPropertyDescriptor(u,c){this.has?.(u,c);var h=Reflect.getOwnPropertyDescriptor(u,c),p=r.get(c);if(p!==void 0){var v=f(p);if(v===U)return;if(h&&"value"in h)h.value=v;else return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,c){if(c===Ve)return!0;var h=r.get(c),p=h!==void 0&&h.v!==U||Reflect.has(u,c);return(h!==void 0||j!==null&&(!p||fe(u,c)?.writable))&&(h===void 0&&(h=a(()=>H(p?Xt(u[c]):U,l)),r.set(c,h)),f(h)===U)?!1:p},set(u,c,h,p){var v=r.get(c),d=c in u;if(n&&c==="length")for(var y=h;y<v.v;y+=1){var M=r.get(y+"");M!==void 0?S(M,U):y in u&&(M=a(()=>H(U,l)),r.set(y+"",M))}if(v===void 0)(!d||fe(u,c)?.writable)&&(v=a(()=>H(void 0,l)),S(v,Xt(h)),r.set(c,v));else{d=v.v!==U;var m=a(()=>Xt(h));S(v,m)}var b=Reflect.getOwnPropertyDescriptor(u,c);if(b?.set&&b.set.call(p,h),!d){if(n&&typeof c=="string"){var V=r.get("length"),I=Number(c);Number.isInteger(I)&&I>=V.v&&S(V,I+1)}Fe(i)}return!0},ownKeys(u){f(i);var c=Reflect.ownKeys(u).filter(v=>{var d=r.get(v);return d===void 0||d.v!==U});for(var[h,p]of r)p.v!==U&&!(h in u)&&c.push(h);return c},setPrototypeOf(){so()}})}var ei,Bi,qi,Fi;function fn(){if(ei===void 0){ei=window,Bi=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;qi=fe(e,"firstChild").get,Fi=fe(e,"nextSibling").get,Gn(t)&&(t[nn]=void 0,t[rn]=null,t[ln]=void 0,t.__e=void 0),Gn(r)&&(r[vr]=void 0)}}function vt(t=""){return document.createTextNode(t)}function st(t){return qi.call(t)}function Tt(t){return Fi.call(t)}function Bt(t,e){if(!O)return st(t);var r=st(L);if(r===null)r=L.appendChild(vt());else if(e&&r.nodeType!==3){var n=vt();return r?.before(n),it(n),n}return e&&En(r),it(r),r}function Vr(t,e=!1){if(!O){var r=st(t);return r instanceof Comment&&r.data===""?Tt(r):r}if(e){if(L?.nodeType!==3){var n=vt();return L?.before(n),it(n),n}En(L)}return L}function ri(t,e=!1){if(!O)return st(t);var r=Bt(t,e);return ct(t),r}function yt(t,e=1,r=!1){let n=O?L:t;for(var i;e--;)i=n,n=Tt(n);if(!O)return n;if(r){if(n?.nodeType!==3){var l=vt();return n===null?i?.after(l):n.before(l),it(l),l}En(n)}return it(n),n}function Ki(t){t.textContent=""}function Ui(){return!Ce||Ct!==null?!1:(j.f&yn)!==0}function Sn(t,e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function En(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function Eo(t){var e=j;if(e===null)return C.f|=mr,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;Pt(t,e)}function Pt(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw t}}function Wo(t){j===null&&(C===null&&ro(t),eo()),Ut&&to(t)}function jo(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Rt(t,e){var r=j;r!==null&&r.f&8192&&(t|=wn);var n={ctx:B,deps:null,nodes:null,f:t|St|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(n);var i=n;if((t&4)!==0)Ye!==null?Ye.push(n):ge.ensure().schedule(n);else if(e!==null){try{je(n)}catch(o){throw et(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=bn))}if(i!==null&&(i.parent=r,r!==null&&jo(i,r),C!==null&&(C.f&2)!==0&&(t&64)===0)){var l=C;(l.effects??(l.effects=[])).push(i)}return n}function Wn(){return C!==null&&!_t}function Gi(t){const e=Rt(8,null);return q(e,pt),e.teardown=t,e}function ni(t){Wo("$effect");var e=j.f;if(!C&&(e&32)!==0&&B!==null&&!B.i){var r=B;(r.e??(r.e=[])).push(t)}else return Yi(t)}function Yi(t){return Rt(4|ql,t)}function Ao(t){ge.ensure();const e=Rt(64|Ae,t);return()=>{et(e)}}function Co(t){ge.ensure();const e=Rt(64|Ae,t);return(r={})=>new Promise(n=>{r.outro?me(e,()=>{et(e),n(void 0)}):(et(e),n(void 0))})}function Zi(t){return Rt(4,t)}function Oo(t){return Rt(Fl|Ae,t)}function Nr(t,e=0){return Rt(8|e,t)}function Ht(t,e=[],r=[],n=[]){vo(n,e,r,i=>{Rt(8,()=>{t(...i.map(f))})})}function jn(t,e=0){return Rt(16|e,t)}function dt(t){return Rt(32|Ae,t)}function Qi(t){var e=t.teardown;if(e!==null){const r=Ut,n=C;ii(!0),gt(null);try{e.call(null)}catch(i){Pt(i,t.parent)}finally{ii(r),gt(n)}}}function An(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Oe(()=>{i.abort(Xe)});var n=r.next;(r.f&64)!==0?r.parent=null:et(r,e),r=n}}function Lo(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&et(e),e=r}}function et(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(No(t.nodes.start,t.nodes.end),r=!0),t.f|=Yn,An(t,e&&!r),Ze(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)l.stop();Qi(t),t.f^=Yn,t.f|=Bl;var i=t.parent;i!==null&&i.first!==null&&Xi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function No(t,e){for(;t!==null;){var r=t===e?null:Tt(t);t.remove(),t=r}}function Xi(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function me(t,e,r=!0){var n=[];t.f|=256,Ji(t,n,!0);var i=()=>{r&&et(t),e&&e()},l=n.length;if(l>0){var o=()=>--l||i();for(var a of n)a.out(o)}else i()}function Ji(t,e,r){if((t.f&8192)===0){t.f^=wn;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var l=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;Ji(i,e,o?r:!1)}i=l}}}function Er(t){t.f&=-257,tl(t,!0)}function tl(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=wn,!(t.f&1024)&&(q(t,St),ge.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;tl(r,i?e:!1),r=n}var l=t.nodes&&t.nodes.t;if(l!==null)for(const o of l)(o.is_global||e)&&o.in()}}function Cn(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Tt(r);e.append(r),r=i}}var Po=null,pr=!1,Ut=!1;function ii(t){Ut=t}var C=null,_t=!1;function gt(t){C=t}var j=null;function It(t){j=t}var kt=null;function el(t){C!==null&&(C.f&2097152||C.f&2)&&(kt??(kt=new Set)).add(t)}var nt=null,ot=0,ht=null;function zo(t){ht=t}var rl=1,ue=0,he=ue;function li(t){he=t}function nl(){return++rl}function tr(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var l=r[i];if(tr(l)&&Ci(l),l.wv>t.wv)return!0}e&512&&tt===null&&q(t,pt)}return!1}function il(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!Ce&&kt!==null&&kt.has(t)))for(var i=0;i<n.length;i++){var l=n[i];(l.f&2)!==0?il(l,e,!1):e===l&&(r?q(l,St):l.f&1024&&q(l,de),Ii(l))}}function ll(t){var e=nt,r=ot,n=ht,i=C,l=kt,o=B,a=_t,u=he,c=t.f;nt=null,ot=0,ht=null,C=(c&96)===0?t:null,kt=null,Se(t.ctx),_t=!1,he=++ue,t.ac!==null&&(Oe(()=>{t.ac.abort(Xe)}),t.ac=null);try{t.f|=Zn;var h=t.fn,p=h();t.f|=yn;var v=oi(t);if(Je()&&ht!==null&&!_t&&v!==null&&(t.f&6146)===0)for(var d=0;d<ht.length;d++)il(ht[d],t);if(i!==null&&i!==t){if(ue++,i.deps!==null)for(let y=0;y<r;y+=1)i.deps[y].rv=ue;if(e!==null)for(const y of e)y.rv=ue;ht!==null&&(n===null?n=ht:n.push(...ht))}return t.f&8388608&&(t.f^=mr),p}catch(y){return oi(t),Eo(y)}finally{t.f^=Zn,nt=e,ot=r,ht=n,C=i,kt=l,Se(o),_t=a,he=u}}function oi(t){var e=t.deps,r=x?.is_fork;if(nt!==null){var n;if(r||Ze(t,ot),e!==null&&ot>0)for(e.length=ot+nt.length,n=0;n<nt.length;n++)e[ot+n]=nt[n];else t.deps=e=nt;if(Wn()&&(t.f&512)!==0)for(n=ot;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&ot<e.length&&(Ze(t,ot),e.length=ot);return e}function Io(t,e){let r=e.reactions;if(r!==null){var n=Pl.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&2)!==0&&(nt===null||!en.call(nt,e))){var l=e;l.f&512&&(l.f^=512),l.v!==U&&$n(l),l.ac!==null&&Oe(()=>{l.ac.abort(Xe),l.ac=null,q(l,St)}),wo(l),Ze(l,0)}}function Ze(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Io(t,r[n])}function je(t){var e=t.f;if((e&16384)===0){q(t,pt);var r=j,n=pr;j=t,pr=(e&96)===0;try{(e&16777232)!==0?Lo(t):An(t),Qi(t);var i=ll(t);t.teardown=typeof i=="function"?i:null,t.wv=rl}finally{pr=n,j=r}}}async function To(){if(Ce)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),Mr()}function f(t){var e=(t.f&2)!==0;if(Po?.add(t),C!==null&&!_t&&!(j!==null&&(j.f&16384)!==0)&&(kt===null||!kt.has(t))){var r=C.deps;if((C.f&2097152)!==0)t.rv<ue&&(t.rv=ue,nt===null&&r!==null&&r[ot]===t?ot++:nt===null?nt=[t]:nt.push(t));else{var n;(n=C).deps??(n.deps=[]),en.call(C.deps,t)||C.deps.push(t);var i=t.reactions;i===null?t.reactions=[C]:en.call(i,C)||i.push(C)}}if(Ut&&Nt.has(t))return Nt.get(t);if(e){var l=t;if(Ut){var o=l.v;return(!(l.f&1024)&&l.reactions!==null||sl(l))&&(o=xn(l)),Nt.set(l,o),o}var a=(l.f&512)===0&&!_t&&C!==null&&(pr||(C.f&512)!==0),u=(l.f&yn)===0;tr(l)&&(a&&(l.f|=512),Ci(l)),a&&!u&&(Oi(l),ol(l))}if(tt?.has(t))return tt.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function ol(t){if(t.f|=512,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&2&&!(e.f&512)&&(Oi(e),ol(e))}function sl(t){if(t.v===U)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Nt.has(e)||(e.f&2)!==0&&sl(e))return!0;return!1}function Pr(t){var e=_t;try{return _t=!0,t()}finally{_t=e}}var xe=Symbol("events"),al=new Set,cn=new Set;function Ro(t,e,r,n={}){function i(l){if(n.capture||hn.call(e,l),!l.cancelBubble)return Oe(()=>r?.call(this,l))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,zt(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function Do(t,e,r,n,i){var l={capture:n,passive:i},o=Ro(t,e,r,l);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Gi(()=>{o.__removed=!0,e.removeEventListener(t,o,l)})}function re(t,e,r){(e[xe]??(e[xe]={}))[t]=r}function Ho(t){for(var e=0;e<t.length;e++)al.add(t[e]);for(var r of cn)r(t)}var Br=null,qr=!1;function hn(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],l=i[0]||t.target;Br=t,qr||(qr=!0,setTimeout(()=>{qr=!1,Br=null}));var o=0,a=Br===t&&t[xe];if(a){var u=i.indexOf(a);if(u!==-1&&(e===document||e===window)){t[xe]=e;return}var c=i.indexOf(e);if(c===-1)return;u<=c&&(o=u)}if(l=i[o]||t.target,l!==e){Ke(t,"currentTarget",{configurable:!0,get(){return l||r}});var h=C,p=j;gt(null),It(null);try{for(var v,d=[];l!==null&&l!==e;){try{var y=l[xe]?.[n];y!=null&&(!l.disabled||t.target===l)&&y.call(l,t)}catch(M){v?d.push(M):v=M}if(t.cancelBubble)break;o++,l=o<i.length?i[o]:null}if(v){for(let M of d)queueMicrotask(()=>{throw M});throw v}}finally{t[xe]=e,delete t.currentTarget,gt(h),It(p)}}}var Vo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Bo(t){return Vo?.createHTML(t)??t}function ul(t){var e=Sn("template");return e.innerHTML=Bo(t.replaceAll("<!>","<!---->")),e.content}function Kt(t,e){var r=j;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function fl(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,l=!t.startsWith("<!>");return()=>{if(O)return Kt(L,null),L;i===void 0&&(i=ul(l?t:"<!>"+t),r||(i=st(i)));var o=n||Bi?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=st(o),u=o.lastChild;Kt(a,u)}else Kt(o,o);return o}}function qo(t,e,r="svg"){var n=!t.startsWith("<!>"),i=(e&1)!==0,l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(O)return Kt(L,null),L;if(!o){var a=st(ul(l));if(i)for(o=document.createDocumentFragment();st(a);)o.appendChild(st(a));else o=st(a)}var u=o.cloneNode(!0);if(i){var c=st(u),h=u.lastChild;Kt(c,h)}else Kt(u,u);return u}}function Et(t,e){return qo(t,e,"svg")}function Fr(){if(O)return Kt(L,null),L;var t=document.createDocumentFragment(),e=document.createComment(""),r=vt();return t.append(e,r),Kt(e,r),t}function Q(t,e){if(O){var r=j;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=L),Or();return}t!==null&&t.before(e)}var Fo=["touchstart","touchmove"];function Ko(t){return Fo.includes(t)}function Uo(t){let e=0,r=pe(0),n;return()=>{Wn()&&(f(r),Nr(()=>(e===0&&(n=Pr(()=>t(()=>Fe(r)))),e+=1,()=>{zt(()=>{e-=1,e===0&&(n?.(),n=void 0,Fe(r))})})))}}var Go=bn|Ae;function Yo(t,e,r,n){new Zo(t,e,r,n)}var xt=new WeakMap,vn=new WeakMap,Lt=new WeakMap,Qe=new WeakMap,at=new WeakMap,Mt=new WeakMap,ut=new WeakMap,$t=new WeakMap,Jt=new WeakMap,_e=new WeakMap,ve=new WeakMap,ar=new WeakMap,pn=new WeakMap,dn=new WeakMap,ne=new WeakMap,si=new WeakMap,G=new WeakSet,Zo=class{constructor(t,e,r,n){Mn(this,G),D(this,"parent",void 0),D(this,"is_pending",!1),D(this,"transform_error",void 0),k(this,xt,void 0),k(this,vn,O?L:null),k(this,Lt,void 0),k(this,Qe,void 0),k(this,at,void 0),k(this,Mt,null),k(this,ut,null),k(this,$t,null),k(this,Jt,null),k(this,_e,0),k(this,ve,0),k(this,ar,!1),k(this,pn,new Set),k(this,dn,new Set),k(this,ne,null),k(this,si,Uo(()=>(_(ne,this,pe(s(_e,this))),()=>{_(ne,this,null)}))),_(xt,this,t),_(Lt,this,e),_(Qe,this,i=>{var l=j;l.b=this,l.f|=128,r(i)}),this.parent=j.b,this.transform_error=n??this.parent?.transform_error??(i=>i),_(at,this,jn(()=>{if(O){const i=s(vn,this);Or();const l=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));W(G,this,Xo).call(this,o)}else l?W(G,this,Jo).call(this):W(G,this,Qo).call(this)}else W(G,this,hl).call(this)},Go)),O&&_(xt,this,L)}defer_effect(t){Wi(t,s(pn,this),s(dn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(Lt,this).pending}update_pending_count(t,e){W(G,this,vl).call(this,t,e),_(_e,this,s(_e,this)+t),s(ne,this)&&!s(ar,this)&&(_(ar,this,!0),zt(()=>{_(ar,this,!1),s(ne,this)&&We(s(ne,this),s(_e,this))}))}get_effect_pending(){return s(si,this).call(this),f(s(ne,this))}error(t){if(!s(Lt,this).onerror&&!s(Lt,this).failed)throw t;x?.is_fork?(s(Mt,this)&&x.skip_effect(s(Mt,this)),s(ut,this)&&x.skip_effect(s(ut,this)),s($t,this)&&x.skip_effect(s($t,this)),x.oncommit(()=>{W(G,this,ai).call(this,t)})):W(G,this,ai).call(this,t)}};function Qo(){try{_(Mt,this,dt(()=>s(Qe,this).call(this,s(xt,this))))}catch(t){this.error(t)}}function Xo(t){const e=s(Lt,this).failed,{reset:r,invoke_onerror:n}=W(G,this,cl).call(this,t);zt(n),e&&_($t,this,dt(()=>{e(s(xt,this),()=>t,()=>r)}))}function cl(t){var e=!1,r=!1;const n=()=>{if(e){Yl();return}e=!0,r&&uo(),s($t,this)!==null&&me(s($t,this),()=>{_($t,this,null)}),W(G,this,On).call(this,()=>{W(G,this,hl).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,s(Lt,this).onerror?.(t,n),r=!1}catch(i){Pt(i,s(at,this)&&s(at,this).parent)}}}}function Jo(){const t=s(Lt,this).pending;t&&(this.is_pending=!0,_(ut,this,dt(()=>t(s(xt,this)))),zt(()=>{var e=_(Jt,this,document.createDocumentFragment()),r=vt(),n=!1;if(e.append(r),_(Mt,this,W(G,this,On).call(this,()=>{try{return dt(()=>s(Qe,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(l){Pt(l,s(at,this).parent)}return null}})),s(Mt,this)===null){_(Jt,this,null),n&&W(G,this,Wr).call(this,x);return}s(ve,this)===0&&(s(xt,this).before(e),_(Jt,this,null),me(s(ut,this),()=>{_(ut,this,null)}),W(G,this,Wr).call(this,x))}))}function hl(){try{if(this.is_pending=this.has_pending_snippet(),_(ve,this,0),_(_e,this,0),_(Mt,this,dt(()=>{s(Qe,this).call(this,s(xt,this))})),s(ve,this)>0){var t=_(Jt,this,document.createDocumentFragment());Cn(s(Mt,this),t);const e=s(Lt,this).pending;_(ut,this,dt(()=>e(s(xt,this))))}else W(G,this,Wr).call(this,x)}catch(e){this.error(e)}}function Wr(t){this.is_pending=!1,t.transfer_effects(s(pn,this),s(dn,this))}function On(t){var e=j,r=C,n=B;It(s(at,this)),gt(s(at,this)),Se(s(at,this).ctx);try{return ge.ensure(),t()}finally{It(e),gt(r),Se(n)}}function vl(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;W(G,r=this.parent,vl).call(r,t,e)}return}_(ve,this,s(ve,this)+t),s(ve,this)===0&&(W(G,this,Wr).call(this,e),s(ut,this)&&me(s(ut,this),()=>{_(ut,this,null)}),s(Jt,this)&&(s(xt,this).before(s(Jt,this)),_(Jt,this,null)))}function ai(t){s(Mt,this)&&(et(s(Mt,this)),_(Mt,this,null)),s(ut,this)&&(et(s(ut,this)),_(ut,this,null)),s($t,this)&&(et(s($t,this)),_($t,this,null)),O&&(it(s(vn,this)),Zl(),it(wr()));let e=s(Lt,this).failed;const r=n=>{const{reset:i,invoke_onerror:l}=W(G,this,cl).call(this,n);l(),e&&_($t,this,W(G,this,On).call(this,()=>{try{return dt(()=>{var o=j;o.b=this,o.f|=128,e(s(xt,this),()=>n,()=>i)})}catch(o){return Pt(o,s(at,this).parent),null}}))};zt(()=>{var n;try{n=this.transform_error(t)}catch(i){Pt(i,s(at,this)&&s(at,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>Pt(i,s(at,this)&&s(at,this).parent)):r(n)})}function ui(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[vr]??(t[vr]=t.nodeValue))&&(t[vr]=r,t.nodeValue=`${r}`)}function pl(t,e){return dl(t,e)}function ts(t,e){fn(),e.intro=e.intro??!1;const r=e.target,n=O,i=L;try{for(var l=st(r);l&&(l.nodeType!==8||l.data!=="[");)l=Tt(l);if(!l)throw Me;qt(!0),it(l);const o=dl(t,{...e,anchor:l});return qt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Me&&console.warn("Failed to hydrate: ",o),e.recover===!1&&io(),fn(),Ki(r),qt(!1),pl(t,e)}finally{qt(n),it(i)}}var ur=new Map;function dl(t,{target:e,anchor:r,props:n={},events:i,context:l,intro:o=!0,transformError:a}){fn();var u=void 0,c=Co(()=>{var h=r??e.appendChild(vt());Yo(h,{pending:()=>{}},d=>{Mi({});var y=B;if(l&&(y.c=l),i&&(n.$$events=i),O&&Kt(d,null),u=t(d,n)||_n(),O&&(j.nodes.end=L,L===null||L.nodeType!==8||L.data!=="]"))throw Cr(),Me;Si()},a);var p=new Set,v=d=>{for(var y=0;y<d.length;y++){var M=d[y];if(!p.has(M)){p.add(M);var m=Ko(M);for(const I of[e,document]){var b=ur.get(I);b===void 0&&(b=new Map,ur.set(I,b));var V=b.get(M);V===void 0?(I.addEventListener(M,hn,{passive:m}),b.set(M,1)):b.set(M,V+1)}}}};return v(Ar(al)),cn.add(v),()=>{for(var d of p)for(const m of[e,document]){var y=ur.get(m),M=y.get(d);--M==0?(m.removeEventListener(d,hn),y.delete(d),y.size===0&&ur.delete(m)):y.set(d,M)}cn.delete(v),h!==r&&h.parentNode?.removeChild(h)}});return gn.set(u,c),u}var gn=new WeakMap;function es(t,e){const r=gn.get(t);return r?(gn.delete(t),r(e)):Promise.resolve()}var Vt=new WeakMap,Yt=new WeakMap,bt=new WeakMap,Pe=new WeakMap,Kr=new WeakMap,Ur=new WeakMap,fi=new WeakMap,rs=class{constructor(t,e=!0){D(this,"anchor",void 0),k(this,Vt,new Map),k(this,Yt,new Map),k(this,bt,new Map),k(this,Pe,new Set),k(this,Kr,!0),k(this,Ur,r=>{if(s(Vt,this).has(r)){var n=s(Vt,this).get(r),i=s(Yt,this).get(n);if(i)Er(i),s(Pe,this).delete(n);else{var l=s(bt,this).get(n);l&&(Er(l.effect),s(Yt,this).set(n,l.effect),s(bt,this).delete(n),l.fragment.lastChild.remove(),this.anchor.before(l.fragment),i=l.effect)}for(const[o,a]of s(Vt,this)){if(s(Vt,this).delete(o),o===r)break;const u=s(bt,this).get(a);u&&(et(u.effect),s(bt,this).delete(a))}for(const[o,a]of s(Yt,this)){if(o===n||s(Pe,this).has(o))continue;const u=()=>{if(Array.from(s(Vt,this).values()).includes(o)){var c=document.createDocumentFragment();Cn(a,c),c.append(vt()),s(bt,this).set(o,{effect:a,fragment:c})}else et(a);s(Pe,this).delete(o),s(Yt,this).delete(o)};s(Kr,this)||!i?(s(Pe,this).add(o),me(a,u,!1)):u()}}}),k(this,fi,r=>{s(Vt,this).delete(r);const n=Array.from(s(Vt,this).values());for(const[i,l]of s(bt,this))n.includes(i)||(et(l.effect),s(bt,this).delete(i))}),this.anchor=t,_(Kr,this,e)}ensure(t,e){var r=x,n=Ui();if(e&&!s(Yt,this).has(t)&&!s(bt,this).has(t))if(n){var i=document.createDocumentFragment(),l=vt();i.append(l),s(bt,this).set(t,{effect:dt(()=>e(l)),fragment:i})}else s(Yt,this).set(t,dt(()=>e(this.anchor)));if(s(Vt,this).set(r,t),n){for(const[o,a]of s(Yt,this))o===t?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of s(bt,this))o===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(s(Ur,this)),r.ondiscard(s(fi,this))}else O&&(this.anchor=L),s(Ur,this).call(this,r)}};function ze(t,e,r=!1){var n;O&&(n=L,Or());var i=new rs(t),l=r?bn:0;function o(a,u){if(O){var c=$i(n);if(a!==parseInt(c.substring(1))){var h=wr();it(h),i.anchor=h,qt(!1),i.ensure(a,u),qt(!0);return}}i.ensure(a,u)}jn(()=>{var a=!1;e((u,c=0)=>{a=!0,o(c,u)}),a||o(-1,null)},l)}function fr(t,e){return e}function ns(t,e,r){for(var n=[],i=e.length,l,o=e.length,a=0;a<i;a++){let p=e[a];me(p,()=>{if(l){if(l.pending.delete(p),l.done.add(p),l.pending.size===0){var v=t.outrogroups;mn(t,Ar(l.done)),v.delete(l),v.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=n.length===0&&r!==null&&t.pending.size===0;if(u){var c=r,h=c.parentNode;Ki(h),h.append(c),t.items.clear()}mn(t,e,!u)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function mn(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const o of t.pending.values())for(const a of o)n.add(t.items.get(a).e)}for(var i=0;i<e.length;i++){var l=e[i];n?.has(l)?(l.f|=He,Cn(l,document.createDocumentFragment())):et(e[i],r)}}var cr;function ie(t,e,r,n,i,l=null){var o=t,a=new Map;if((e&4)!==0){var u=t;o=O?it(st(u)):u.appendChild(vt())}O&&Or();var c=null,h=kn(()=>{var b=r();return mi(b)?b:b==null?[]:Ar(b)}),p,v=new Map,d=!0;function y(b){!(m.effect.f&16384)&&(m.pending.delete(b),m.fallback=c,is(m,p,o,e,n),c!==null&&(p.length===0?(c.f&33554432)===0?Er(c):(c.f^=He,De(c,null,o)):me(c,()=>{c=null})))}function M(b){m.pending.delete(b)}var m={effect:jn(()=>{p=f(h);var b=p.length;let V=!1;O&&$i(o)==="[!"!=(b===0)&&(o=wr(),it(o),qt(!1),V=!0);for(var I=new Set,N=x,X=Ui(),Y=0;Y<b;Y+=1){O&&L.nodeType===8&&L.data==="]"&&(o=L,V=!0,qt(!1));var Z=p[Y],J=n(Z,Y),rt=d?null:a.get(J);rt?(rt.v&&We(rt.v,Z),rt.i&&We(rt.i,Y),X&&N.unskip_effect(rt.e)):(rt=ls(a,d?o:cr??(cr=vt()),Z,J,Y,i,e,r),d||(rt.e.f|=He),a.set(J,rt)),I.add(J)}if(b===0&&l&&!c&&(d?c=dt(()=>l(o)):(c=dt(()=>l(cr??(cr=vt()))),c.f|=He)),b>I.size&&Jl("","",""),O&&b>0&&it(wr()),!d)if(v.set(N,I),X){for(const[R,zr]of a)I.has(R)||N.skip_effect(zr.e);N.oncommit(y),N.ondiscard(M)}else y(N);V&&qt(!0),f(h)}),flags:e,items:a,pending:v,outrogroups:null,fallback:c};d=!1,O&&(o=L)}function Ie(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function is(t,e,r,n,i){var l=(n&8)!==0,o=e.length,a=t.items,u=Ie(t.effect.first),c,h=null,p,v=[],d=[],y,M,m,b;if(l)for(b=0;b<o;b+=1)y=e[b],M=i(y,b),m=a.get(M).e,!(m.f&33554432)&&(m.nodes?.a?.measure(),(p??(p=new Set)).add(m));for(b=0;b<o;b+=1){if(y=e[b],M=i(y,b),m=a.get(M).e,t.outrogroups!==null)for(const R of t.outrogroups)R.pending.delete(m),R.done.delete(m);if(m.f&8192&&(Er(m),l&&(m.nodes?.a?.unfix(),(p??(p=new Set)).delete(m))),(m.f&33554432)!==0)if(m.f^=He,m===u)De(m,null,r);else{var V=h?h.next:u;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Zt(t,h,m),Zt(t,m,V),De(m,V,r),h=m,v=[],d=[],u=Ie(h.next);continue}if(m!==u){if(c!==void 0&&c.has(m)){if(v.length<d.length){var I=d[0],N;h=I.prev;var X=v[0],Y=v[v.length-1];for(N=0;N<v.length;N+=1)De(v[N],I,r);for(N=0;N<d.length;N+=1)c.delete(d[N]);Zt(t,X.prev,Y.next),Zt(t,h,X),Zt(t,Y,I),u=I,h=Y,b-=1,v=[],d=[]}else c.delete(m),De(m,u,r),Zt(t,m.prev,m.next),Zt(t,m,h===null?t.effect.first:h.next),Zt(t,h,m),h=m;continue}for(v=[],d=[];u!==null&&u!==m;)(c??(c=new Set)).add(u),d.push(u),u=Ie(u.next);if(u===null)continue}!(m.f&33554432)&&v.push(m),h=m,u=Ie(m.next)}if(t.outrogroups!==null){for(const R of t.outrogroups)R.pending.size===0&&(mn(t,Ar(R.done)),t.outrogroups?.delete(R));t.outrogroups.size===0&&(t.outrogroups=null)}if(u!==null||c!==void 0){var Z=[];if(c!==void 0)for(m of c)!(m.f&8192)&&Z.push(m);for(;u!==null;)!(u.f&8192)&&u!==t.fallback&&Z.push(u),u=Ie(u.next);var J=Z.length;if(J>0){var rt=(n&4)!==0&&o===0?r:null;if(l){for(b=0;b<J;b+=1)Z[b].nodes?.a?.measure();for(b=0;b<J;b+=1)Z[b].nodes?.a?.fix()}ns(t,Z,rt)}}l&&zt(()=>{if(p!==void 0)for(m of p)m.nodes?.a?.apply()})}function ls(t,e,r,n,i,l,o,a){var u=(o&1)!==0?(o&16)===0?Hi(r,!1,!1):pe(r):null,c=(o&2)!==0?pe(i):null;return{v:u,i:c,e:dt(()=>(l(e,u??r,c??i,a),()=>{t.delete(n)}))}}function De(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,l=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var o=Tt(n);if(l.before(n),n===i)return;n=o}}function Zt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function os(t,e){Zi(()=>{t=j?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=Sn("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var ci=[...`
3
- \r\f \v\uFEFF`];function ss(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var l=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+l;(o===0||ci.includes(n[o-1]))&&(a===n.length||ci.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function hi(t,e=!1){var r=e?" !important;":";",n="";for(var i of Object.keys(t)){var l=t[i];l!=null&&l!==""&&(n+=" "+i+": "+l+r)}return n}function Gr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function as(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var l=!1,o=0,a=!1,u=[];n&&u.push(...Object.keys(n).map(Gr)),i&&u.push(...Object.keys(i).map(Gr));var c=0,h=-1;const M=t.length;for(var p=0;p<M;p++){var v=t[p];if(a?v==="/"&&t[p-1]==="*"&&(a=!1):l?l===v&&(l=!1):v==="/"&&t[p+1]==="*"?a=!0:v==='"'||v==="'"?l=v:v==="("?o++:v===")"&&o--,!a&&l===!1&&o===0){if(v===":"&&h===-1)h=p;else if(v===";"||p===M-1){if(h!==-1){var d=Gr(t.substring(c,h).trim());if(!u.includes(d)){v!==";"&&p++;var y=t.substring(c,p).trim();r+=" "+y+";"}}c=p+1,h=-1}}}}return n&&(r+=hi(n)),i&&(r+=hi(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function vi(t,e,r,n,i,l){var o=t[nn];if(O||o!==r||o===void 0){var a=ss(r,n,l);(!O||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[nn]=r}else if(l&&i!==l)for(var u in l){var c=!!l[u];(i==null||c!==!!i[u])&&t.classList.toggle(u,c)}return l}function Yr(t,e={},r,n){for(var i in r){var l=r[i];e[i]!==l&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,l,n))}}function us(t,e,r,n){var i=t[ln];if(O||i!==e){var l=as(e,n);(!O||l!==t.getAttribute("style"))&&(l==null?t.removeAttribute("style"):t.style.cssText=l),t[ln]=e}else n&&(Array.isArray(n)?(Yr(t,r?.[0],n[0]),Yr(t,r?.[1],n[1],"important")):Yr(t,r,n));return n}var fs=Symbol("is custom element"),cs=Symbol("is html"),hs=Ul?"link":"LINK";function vs(t){if(O){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;A(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;A(t,"checked",null),t.checked=i}}};t[Be]=r,zt(r),ji()}}function A(t,e,r,n){var i=ps(t);O&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===hs)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Kl]=r),r==null?t.removeAttribute(e):typeof r!="string"&&ds(t).has(e)?t[e]=r:t.setAttribute(e,r))}function ps(t){return t[rn]??(t[rn]={[fs]:t.nodeName.includes("-"),[cs]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var pi=new Map;function ds(t){var e=t.getAttribute("is")||t.nodeName,r=pi.get(e);if(r)return r;pi.set(e,r=new Set);for(var n,i=t,l=Element.prototype;l!==i;){n=zl(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=wi(i)}return r}function gs(t,e,r=e){var n=new WeakSet;ho(t,"input",async i=>{var l=i?t.defaultValue:t.value;if(l=Zr(t)?Qr(l):l,r(l),x!==null&&n.add(x),await To(),l!==(l=e())){var o=t.selectionStart,a=t.selectionEnd,u=t.value.length;if(t.value=l??"",a!==null){var c=t.value.length;o===a&&a===u&&c>u?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(O&&t.defaultValue!==t.value||Pr(e)==null&&t.value)&&(r(Zr(t)?Qr(t.value):t.value),x!==null&&n.add(x)),Nr(()=>{var i=e();if(t===document.activeElement){var l=Ce?br:x;if(n.has(l))return}Zr(t)&&i===Qr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Zr(t){var e=t.type;return e==="number"||e==="range"}function Qr(t){return t===""?null:+t}var gl,$e=new WeakMap,jr=new WeakMap,Xr=new WeakMap,di=new WeakSet,ml=class{constructor(t){Mn(this,di),k(this,$e,new WeakMap),k(this,jr,void 0),k(this,Xr,void 0),_(Xr,this,t)}observe(t,e){var r=s($e,this).get(t)||new Set;return r.add(e),s($e,this).set(t,r),W(di,this,ms).call(this).observe(t,s(Xr,this)),()=>{var n=s($e,this).get(t);n.delete(e),n.size===0&&(s($e,this).delete(t),s(jr,this).unobserve(t))}}};gl=ml;function ms(){return s(jr,this)??_(jr,this,new ResizeObserver(t=>{for(var e of t){gl.entries.set(e.target,e);for(var r of s($e,this).get(e.target)||[])r(e)}}))}D(ml,"entries",new WeakMap);function Jr(t,e){return t===e||t?.[Ve]===e}function tn(t=_n(),e,r,n){var i=B.r,l=j;return Zi(()=>{var o,a;return Nr(()=>{o=a,a=n?.()||[],Pr(()=>{Jr(r(...a),t)||(e(t,...a),o&&Jr(r(...o),t)&&e(null,...o))})}),()=>{let u=l;for(;u!==i&&u.parent!==null&&u.parent.f&33554432;)u=u.parent;const c=()=>{a&&Jr(r(...a),t)&&e(null,...a)},h=u.teardown;u.teardown=()=>{c(),h?.()}}}),t}var hr=!1;function ws(t){var e=hr;try{return hr=!1,[t(),hr]}finally{hr=e}}function gi(t,e,r,n){var i=!Lr||(r&2)!==0,l=(r&8)!==0,o=(r&16)!==0,a=n,u=!0,c=void 0,h=()=>o&&i?(c??(c=Ge(n)),f(c)):(u&&(u=!1,a=o?Pr(n):n),a);let p;if(l){var v=Ve in t||_i in t;p=fe(t,e)?.set??(v&&e in t?N=>t[e]=N:void 0)}var d,y=!1;l?[d,y]=ws(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=h(),p&&(i&&lo(e),p(d)));var M;if(i?M=()=>{var N=t[e];return N===void 0?h():(u=!0,N)}:M=()=>{var N=t[e];return N!==void 0&&(a=void 0),N===void 0?a:N},i&&(r&4)===0)return M;if(p){var m=t.$$legacy;return(function(N,X){return arguments.length>0?((!i||!X||m||y)&&p(X?M():N),N):M()})}var b=!1,V=((r&1)!==0?Ge:kn)(()=>(b=!1,M()));l&&f(V);var I=j;return(function(N,X){if(arguments.length>0){const Y=X?f(V):i&&l?Xt(N):N;return S(V,Y),b=!0,a!==void 0&&(a=Y),N}return Ut&&b||(I.f&16384)!==0?V.v:f(V)})}function ys(t){return new bs(t)}var le=new WeakMap,At=new WeakMap,bs=class{constructor(t){k(this,le,void 0),k(this,At,void 0);var e=new Map,r=(i,l)=>{var o=Hi(l,!1,!1);return e.set(i,o),o};const n=new Proxy({...t.props||{},$$events:{}},{get(i,l){return f(e.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===_i?!0:(f(e.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return S(e.get(l)??r(l,o),o),Reflect.set(i,l,o)}});_(At,this,(t.hydrate?ts:pl)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Mr(),_(le,this,n.$$events);for(const i of Object.keys(s(At,this)))i==="$set"||i==="$destroy"||i==="$on"||Ke(this,i,{get(){return s(At,this)[i]},set(l){s(At,this)[i]=l},enumerable:!0});s(At,this).$set=i=>{Object.assign(n,i)},s(At,this).$destroy=()=>{es(s(At,this))}}$set(t){s(At,this).$set(t)}$on(t,e){s(le,this)[t]=s(le,this)[t]||[];const r=(...n)=>e.call(this,...n);return s(le,this)[t].push(r),()=>{s(le,this)[t]=s(le,this)[t].filter(n=>n!==r)}}$destroy(){s(At,this).$destroy()}},wl;typeof HTMLElement=="function"&&(wl=class extends HTMLElement{constructor(t,e,r){super(),D(this,"$$ctor",void 0),D(this,"$$s",void 0),D(this,"$$c",void 0),D(this,"$$cn",!1),D(this,"$$d",{}),D(this,"$$r",!1),D(this,"$$p_d",{}),D(this,"$$l",{}),D(this,"$$l_u",new Map),D(this,"$$me",void 0),D(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const l=Sn("slot");n!=="default"&&(l.name=n),Q(i,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=_s(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=dr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ys({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Ao(()=>{Nr(()=>{this.$$r=!0;for(const n of gr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=dr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const l=this.$$c.$on(n,i);this.$$l_u.set(i,l)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=dr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return gr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function dr(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function _s(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function $s(t,e,r,n,i,l){let o=class extends wl{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return gr(e).map(a=>(e[a].attribute||a).toLowerCase())}};return gr(e).forEach(a=>{Ke(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=dr(a,u,e),this.$$d[a]=u;var c=this.$$c;c&&(fe(c,a)?.get?c[a]=u:c.$set({[a]:u}))}})}),n.forEach(a=>{Ke(o.prototype,a,{get(){return this.$$c?.[a]}})}),l&&(o=l(o)),t.element=o,o}var ks=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'),xs=Et('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'),Ms=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'),Ss=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'),Es=fl('<button type="button"><span class="pie-tool-graph__tool-icon svelte-v3lao1" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-v3lao1"> </span></button>'),Ws=Et('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),js=Et('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),As=Et('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),Cs=Et('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),Os=Et('<line class="pie-tool-graph__user-line svelte-v3lao1"></line>'),Ls=Et('<circle r="2" role="button" tabindex="0"></circle>'),Ns=Et('<line class="pie-tool-graph__temp-line svelte-v3lao1"></line>'),Ps=fl('<div class="pie-tool-graph svelte-v3lao1" role="dialog" tabindex="-1"><div class="pie-tool-graph__toolbar svelte-v3lao1"><div class="pie-tool-graph__tool-buttons svelte-v3lao1"></div> <div class="pie-tool-graph__transparency-control svelte-v3lao1"><label for="grid-opacity" class="svelte-v3lao1"> </label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" class="svelte-v3lao1"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-v3lao1" role="img" tabindex="0"><svg class="pie-tool-graph__canvas svelte-v3lao1" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!><circle r="3" class="pie-tool-graph__keyboard-cursor svelte-v3lao1"></circle></svg></div></div>'),zs={hash:"svelte-v3lao1",code:`.pie-tool-graph.svelte-v3lao1 {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
1
+ import{t as Ll}from"./attribute-coercion-b93b482c.js";import{r as Nl}from"./tool-host-contract-fae1c415.js";import{i as Pl}from"./provider-4c704118.js";if(typeof window<"u"){var Yn,Gn;((Yn=(Gn=window).__svelte??(Gn.__svelte={})).v??(Yn.v=new Set)).add("5")}var te={},Y=Symbol("uninitialized"),wi=Array.isArray,zl=Array.prototype.indexOf,wr=Array.prototype.includes,Cr=Array.from,yr=Object.keys,Ye=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,Il=Object.getOwnPropertyDescriptors,Tl=Object.prototype,Rl=Array.prototype,yi=Object.getPrototypeOf,Zn=Object.isExtensible,Dl=()=>{};function Hl(t){for(var e=0;e<t.length;e++)t[e]()}function _i(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function Ge(t){"@babel/helpers - typeof";return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(t)}function Fl(t,e){if(Ge(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ge(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bl(t){var e=Fl(t,"string");return Ge(e)=="symbol"?e:e+""}function H(t,e,r){return(e=Bl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=1024,St=2048,we=4096,yn=8192,bi=16384,_n=32768,rn=1<<25,bn=65536,Oe=1<<19,ql=1<<20,Be=1<<25,Xn=1<<21,Vl=1<<22,_r=1<<23,qe=Symbol("$state"),$i=Symbol("component"),ki=Symbol("legacy props"),Kl=Symbol(""),nn=Symbol("attributes"),ln=Symbol("class"),on=Symbol("style"),gr=Symbol("text"),Ve=Symbol("form reset"),er=new class extends Error{constructor(...t){super(...t),H(this,"name","StaleReactionError"),H(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ul=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Yl(){console.warn("https://svelte.dev/e/derived_inert")}function Or(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Gl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var O=!1;function qt(t){O=t}var L;function lt(t){if(t===null)throw Or(),te;return L=t}function Lr(){return lt(Tt(L))}function ct(t){if(O){if(Tt(L)!==null)throw Or(),te;L=t}}function Zl(t=1){if(O){for(var e=t,r=L;e--;)r=Tt(r);L=r}}function br(t=!0){for(var e=0,r=L;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(e===0)return r;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var i=Tt(r);t&&r.remove(),r=i}}function $n(t){if(!t||t.nodeType!==8)throw Or(),te;return t.data}function xi(t){return t===this.v}function Xl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Mi(t){return!Xl(t,this.v)}function Jl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ql(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function to(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ro(t){throw new Error("https://svelte.dev/e/effect_orphan")}function no(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function io(){throw new Error("https://svelte.dev/e/hydration_failed")}function lo(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function oo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function so(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ao(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function uo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Le=!1,Nr=!1,q=null;function We(t){q=t}function Si(t,e=!1,r){q={p:q,i:!1,c:null,e:null,s:t,x:null,r:j,l:Nr&&!e?{s:null,u:null,$:[]}:null}}function Ei(t){var e=q,r=e.e;if(r!==null){e.e=null;for(var n of r)Zi(n)}return t!==void 0&&(e.x=t),e.i=!0,q=e.p,kn(t)}function kn(t={}){return Ye(t,$i,{value:!0}),t}function rr(){return!Nr||q!==null&&q.l===null}var ue=[];function Wi(){var t=ue;ue=[],Hl(t)}function zt(t){if(ue.length===0&&!Ke){var e=ue;queueMicrotask(()=>{e===ue&&Wi()})}ue.push(t)}function fo(){for(;ue.length>0;)Wi()}var co=~(St|we|pt);function V(t,e){t.f=t.f&co|e}function xn(t){(t.f&512)!==0||t.deps===null?V(t,pt):V(t,we)}function ji(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),V(t,pt)}var Jn=!1;function Ai(){Jn||(Jn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Ve]?.()})},{capture:!0}))}function Ne(t){var e=C,r=j;gt(null),It(null);try{return t()}finally{gt(e),It(r)}}function ho(t,e,r,n=r){t.addEventListener(e,()=>Ne(r));const i=t[Ve];i?t[Ve]=()=>{i(),n(!0)}:t[Ve]=()=>n(!0),Ai()}function vo(t,e,r,n){const i=rr()?Ze:Mn;var l=t.filter(g=>!g.settled),o=e.map(i);if(r.length===0&&l.length===0){n(o);return}var a=j,u=po(),c=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(g=>g.promise)):null;function h(g){if((a.f&16384)===0){u();try{n([...o,...g])}catch(y){Pt(y,a)}$r()}}var p=Ci();if(r.length===0){c.then(()=>h([])).finally(p);return}function v(){Promise.all(r.map(g=>go(g))).then(h).catch(g=>Pt(g,a)).finally(p)}c?c.then(()=>{if((a.f&16384)!==0){p();return}u(),v(),$r()}):v()}function po(){var t=j,e=C,r=q,n=E;return function(i=!0){It(t),gt(e),We(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function $r(t=!0){It(null),gt(null),We(null),t&&E?.deactivate()}function Ci(){var t=j,e=t.b,r=E,n=!!e?.is_rendered();return e?.update_pending_count(1,r),r.increment(n,t),()=>{e?.update_pending_count(-1,r),r.decrement(n,t)}}function Ze(t){var e=2|St;return j!==null&&(j.f|=Oe),{ctx:q,deps:null,effects:null,equals:xi,f:e,fn:t,reactions:null,rv:0,v:Y,wv:0,parent:j,ac:null}}var De=Symbol("obsolete");function go(t,e,r){let n=j;n===null&&Jl();var i=void 0,l=me(Y),o=!C,a=new Set;return Oo(()=>{var u=j,c=_i();i=c.promise;try{Promise.resolve(t()).then(c.resolve,g=>{g!==er&&c.reject(g)}).finally($r)}catch(g){c.reject(g),$r()}var h=E;if(o){if((u.f&32768)!==0)var p=Ci();if(n.b?.is_rendered())h.async_deriveds.get(u)?.reject(De);else for(const g of a.values())g.reject(De);a.add(c),h.async_deriveds.set(u,c)}const v=(g,y=void 0)=>{p?.(),a.delete(c),y!==De&&(h.activate(),y?(l.f|=_r,Ae(l,y)):(l.f&8388608&&(l.f^=_r),Ae(l,g)),h.deactivate())};c.promise.then(v,g=>v(null,g||"unknown"))}),Gi(()=>{for(const u of a)u.reject(De)}),new Promise(u=>{function c(h){function p(){h===i?u(l):c(i)}h.then(p,p)}c(i)})}function Yt(t){const e=Ze(t);return rl(e),e}function Mn(t){const e=Ze(t);return e.equals=Mi,e}function mo(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)et(e[r])}}function Sn(t){var e,r=j,n=t.parent;if(!Ut&&n!==null&&t.v!==Y&&(n.f&24576)!==0)return Yl(),t.v;It(n);try{mo(t),e=ol(t)}finally{It(r)}return e}function Oi(t){var e=Sn(t);if(!t.equals(e)&&(t.wv=il(),(!E?.is_fork||t.deps===null)&&(E!==null?(E.capture(t,e,!0),he?.capture(t,e,!0)):t.v=e,t.deps===null))){V(t,pt);return}Ut||(tt!==null?(An()||E?.is_fork)&&tt.set(t,e):xn(t))}function wo(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&Ne(()=>{e.ac.abort(er),e.ac=null}),e.fn!==null&&(e.teardown=Dl),Qe(e,0),On(e))}function Li(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&Ce(e)}function Ni(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function En(t,e){Ni(t,e),e.add(t)}function M(t,e,r){Ni(t,e),e.set(t,r)}function $(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function _(t,e,r){return t.set($(t,e),r),r}function s(t,e){return t.get($(t,e))}var Pi,sn=null,$e=null,E=null,he=null,tt=null,an=null,Ke=!1,Hr=!1,Xe=null,kr=null,zi=0,yo=1,un=new WeakMap,ve=new WeakMap,Se=new WeakMap,xr=new WeakMap,ar=new WeakMap,ke=new WeakMap,se=new WeakMap,He=new WeakMap,Ot=new WeakMap,Qn=new WeakMap,je=new WeakMap,Vt=new WeakMap,Xt=new WeakMap,Fr=new WeakMap,ur=new WeakMap,U=new WeakSet,ye=class Ii{constructor(){En(this,U),H(this,"id",yo++),M(this,un,!1),H(this,"linked",!0),M(this,ve,null),M(this,Se,null),H(this,"async_deriveds",new Map),H(this,"current",new Map),H(this,"previous",new Map),M(this,xr,new Set),M(this,ar,new Set),M(this,ke,0),M(this,se,new Map),M(this,He,null),M(this,Ot,[]),M(this,Qn,[]),M(this,je,new Set),M(this,Vt,new Set),M(this,Xt,new Map),M(this,Fr,new Set),H(this,"is_fork",!1),M(this,ur,!1),$e===null?sn=$e=this:(_(Se,$e,this),_(ve,this,$e)),$e=this}skip_effect(e){s(Xt,this).has(e)||s(Xt,this).set(e,{d:[],m:[]}),s(Fr,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=s(Xt,this).get(e);if(n){s(Xt,this).delete(e);for(var i of n.d)V(i,St),r(i);for(i of n.m)V(i,we),r(i)}s(Fr,this).add(e)}capture(e,r,n=!1){e.v!==Y&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),tt?.set(e,r)),this.is_fork||(e.v=r)}activate(){E=this}deactivate(){E=null,tt=null}flush(){try{Hr=!0,E=this,$(U,this,Mr).call(this)}finally{zi=0,an=null,Xe=null,kr=null,Hr=!1,E=null,tt=null,Nt.clear()}}discard(){for(const e of s(ar,this))e(this);s(ar,this).clear();for(const e of this.async_deriveds.values())e.reject(De);$(U,this,Sr).call(this),s(He,this)?.resolve()}register_created_effect(e){s(Qn,this).push(e)}increment(e,r){if(_(ke,this,s(ke,this)+1),e){let n=s(se,this).get(r)??0;s(se,this).set(r,n+1)}}decrement(e,r){if(_(ke,this,s(ke,this)-1),e){let n=s(se,this).get(r)??0;n===1?s(se,this).delete(r):s(se,this).set(r,n-1)}s(ur,this)||(_(ur,this,!0),zt(()=>{_(ur,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)s(je,this).add(n);for(const n of r)s(Vt,this).add(n);e.clear(),r.clear()}oncommit(e){s(xr,this).add(e)}ondiscard(e){s(ar,this).add(e)}settled(){return(s(He,this)??_(He,this,_i())).promise}static ensure(){if(E===null){const e=E=new Ii;!Hr&&!Ke&&zt(()=>{s(un,e)||e.flush()})}return E}apply(){if(!Le||!this.is_fork&&s(ve,this)===null&&s(Se,this)===null){tt=null;return}tt=new Map;for(const[r,[n]]of this.current)tt.set(r,n);for(let r=sn;r!==null;r=s(Se,r))if(!(r===this||r.is_fork)){var e=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){e=!0;break}}if(!e)for(const[n,i]of r.previous)tt.has(n)||tt.set(n,i)}}schedule(e){if(an=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(Ot,this).push(e)}};Pi=ye;function ti(){if(this.is_fork)return!0;for(const r of s(se,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(s(Xt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function _o(){var t=[];for(const i of s(Ot,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,r=!1;e.parent!==null;){e=e.parent;var n=e.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}e.f^=pt}}r||t.push(e)}return _(Ot,this,[]),t}function Mr(){_(un,this,!0);for(const o of s(je,this))s(Vt,this).delete(o),V(o,St),this.schedule(o);for(const o of s(Vt,this))V(o,we),this.schedule(o);this.apply();for(var t=Xe=[],e=[],r=kr=[];s(Ot,this).length>0;){zi++>1e3&&($(U,this,Sr).call(this),xo());for(const o of $(U,this,_o).call(this))try{$(U,this,bo).call(this,o,t,e)}catch(a){throw Di(o),$(U,this,ti).call(this)||this.discard(),a}}if(E=null,r.length>0){var n=Pi.ensure();for(const o of r)n.schedule(o)}if(Xe=null,kr=null,$(U,this,ti).call(this)){$(U,this,fr).call(this,e),$(U,this,fr).call(this,t);for(const[o,a]of s(Xt,this))Ri(o,a);r.length>0&&$(U,E,Mr).call(E);return}const i=$(U,this,$o).call(this);if(i){$(U,this,fr).call(this,e),$(U,this,fr).call(this,t),$(U,i,ko).call(i,this);return}s(je,this).clear(),s(Vt,this).clear();for(const o of s(xr,this))o(this);s(xr,this).clear(),he=this,ei(e),ei(t),he=null,s(He,this)?.resolve();var l=E;if(s(ke,this)===0&&(s(Ot,this).length===0||l!==null)&&$(U,this,Sr).call(this),s(Ot,this).length>0)if(l!==null){for(const o of s(Ot,this))s(Ot,l).push(o);_(Ot,this,[])}else l=this;l!==null&&(Nt.clear(),$(U,l,Mr).call(l))}function bo(t,e,r){t.f^=pt;for(var n=t.first;n!==null;){var i=n.f,l=(i&96)!==0;if(!(l&&(i&1024)!==0||(i&8192)!==0||s(Xt,this).has(n))&&n.fn!==null){l?n.f^=pt:(i&4)!==0?e.push(n):Le&&(i&16777224)!==0?r.push(n):nr(n)&&(i&16&&s(Vt,this).add(n),Ce(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var a=n.next;if(a!==null){n=a;break}n=n.parent}}}function $o(){for(var t=s(ve,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=s(ve,t)}return null}function ko(t){for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(s(je,t),s(Vt,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)e(o);else{var l=o;i&4194320&&!this.async_deriveds.has(l)&&(s(Vt,this).delete(l),V(l,St),this.schedule(l))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),$(U,t,Sr).call(t),E=this,$(U,this,Mr).call(this)}function fr(t){for(var e=0;e<t.length;e+=1)ji(t[e],s(je,this),s(Vt,this))}function Sr(){if(this.linked){var t=s(ve,this),e=s(Se,this);t===null?sn=e:_(Se,t,e),e===null?$e=t:_(ve,e,t),this.linked=!1}}function Je(t){var e=Ke,r=he;he=null,Ke=!0;try{var n;for(t&&(Je(),n=t());;){if(fo(),E===null)return n;E.flush()}}finally{Ke=e,he=r}}function xo(){try{no()}catch(t){Pt(t,an)}}var Ct=null;function ei(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&nr(n)&&(Ct=new Set,Ce(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Qi(n),Ct?.size>0)){Nt.clear();for(const i of Ct){if((i.f&24576)!==0)continue;const l=[i];let o=i.parent;for(;o!==null;)Ct.has(o)&&(Ct.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const u=l[a];!(u.f&24576)&&Ce(u)}}Ct.clear()}}Ct=null}}function Ti(t){E.schedule(t)}function Ri(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),V(t,pt);for(var r=t.first;r!==null;)Ri(r,e),r=r.next}}function Di(t){V(t,pt);for(var e=t.first;e!==null;)Di(e),e=e.next}var Er=new Set,Nt=new Map,Hi=!1;function me(t,e){return{f:0,v:t,reactions:null,equals:xi,rv:0,wv:0}}function F(t,e){const r=me(t,e);return rl(r),r}function Fi(t,e=!1,r=!0){const n=me(t);if(e||(n.equals=Mi),Nr&&r&&q!==null&&q.l!==null){var i;((i=q.l).s??(i.s=[])).push(n)}return n}function S(t,e,r=!1){return C!==null&&(!bt||C.f&131072)&&rr()&&C.f&4325394&&(kt===null||!kt.has(t))&&ao(),Ae(t,r?Jt(e):e,kr)}var ae=null,fn=0;function Ae(t,e,r=null){if(!t.equals(e)){Ut?Nt.set(t,e):Nt.has(t)||Nt.set(t,t.v);var n=ye.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&Sn(i),tt===null&&xn(i)}t.wv=il(),ae=null,fn=0,Bi(t,St,r),ae=null,rr()&&j!==null&&j.f&1024&&!(j.f&96)&&(ht===null?zo([t]):ht.push(t)),!n.is_fork&&Er.size>0&&!Hi&&Mo()}return e}function Mo(){Hi=!1;for(const t of Er){t.f&1024&&V(t,we);let e;try{e=nr(t)}catch{e=!0}e&&Ce(t)}Er.clear()}function So(t,e=1){var r=f(t),n=e===1?r++:r--;return S(t,r),n}function Ue(t){S(t,t.v+1)}function Bi(t,e,r){var n=t.reactions;if(n!==null){var i=rr(),l=n.length;if(fn+=l,fn>1e5&&ae===null&&(ae=new Set),ae!==null){if(ae.has(t))return;ae.add(t)}for(var o=0;o<l;o++){var a=n[o],u=a.f;if(!(!i&&a===j)){var c=(u&St)===0;if(c&&V(a,e),(u&131072)!==0)Er.add(a);else if((u&2)!==0){var h=a;tt?.delete(h),Bi(h,we,r)}else if(c){var p=a;u&16&&Ct!==null&&Ct.add(p),r!==null?r.push(p):Ti(p)}}}}}function Jt(t){if(typeof t!="object"||t===null||qe in t||$i in t)return t;const e=yi(t);if(e!==Tl&&e!==Rl)return t;var r=new Map,n=wi(t),i=F(0),l=null,o=pe,a=u=>{if(pe===o)return u();var c=C,h=pe;gt(null),oi(o);var p=u();return gt(c),oi(h),p};return n&&r.set("length",F(t.length,l)),new Proxy(t,{defineProperty(u,c,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&oo();var p=r.get(c);return p===void 0?a(()=>{var v=F(h.value,l);return r.set(c,v),v}):S(p,h.value,!0),!0},deleteProperty(u,c){var h=r.get(c);if(h===void 0){if(c in u){const p=a(()=>F(Y,l));r.set(c,p),Ue(i)}}else S(h,Y),Ue(i);return!0},get(u,c,h){if(c===qe)return t;var p=r.get(c),v=c in u;if(p===void 0&&(!v||ce(u,c)?.writable)&&(p=a(()=>F(Jt(v?u[c]:Y),l)),r.set(c,p)),p!==void 0){var g=f(p);return g===Y?void 0:g}return Reflect.get(u,c,h)},getOwnPropertyDescriptor(u,c){this.has?.(u,c);var h=Reflect.getOwnPropertyDescriptor(u,c),p=r.get(c);if(p!==void 0){var v=f(p);if(v===Y)return;if(h&&"value"in h)h.value=v;else return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,c){if(c===qe)return!0;var h=r.get(c),p=h!==void 0&&h.v!==Y||Reflect.has(u,c);return(h!==void 0||j!==null&&(!p||ce(u,c)?.writable))&&(h===void 0&&(h=a(()=>F(p?Jt(u[c]):Y,l)),r.set(c,h)),f(h)===Y)?!1:p},set(u,c,h,p){var v=r.get(c),g=c in u;if(n&&c==="length")for(var y=h;y<v.v;y+=1){var k=r.get(y+"");k!==void 0?S(k,Y):y in u&&(k=a(()=>F(Y,l)),r.set(y+"",k))}if(v===void 0)(!g||ce(u,c)?.writable)&&(v=a(()=>F(void 0,l)),S(v,Jt(h)),r.set(c,v));else{g=v.v!==Y;var m=a(()=>Jt(h));S(v,m)}var b=Reflect.getOwnPropertyDescriptor(u,c);if(b?.set&&b.set.call(p,h),!g){if(n&&typeof c=="string"){var B=r.get("length"),I=Number(c);Number.isInteger(I)&&I>=B.v&&S(B,I+1)}Ue(i)}return!0},ownKeys(u){f(i);var c=Reflect.ownKeys(u).filter(v=>{var g=r.get(v);return g===void 0||g.v!==Y});for(var[h,p]of r)p.v!==Y&&!(h in u)&&c.push(h);return c},setPrototypeOf(){so()}})}var ri,qi,Vi,Ki;function cn(){if(ri===void 0){ri=window,qi=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Vi=ce(e,"firstChild").get,Ki=ce(e,"nextSibling").get,Zn(t)&&(t[ln]=void 0,t[nn]=null,t[on]=void 0,t.__e=void 0),Zn(r)&&(r[gr]=void 0)}}function vt(t=""){return document.createTextNode(t)}function at(t){return Vi.call(t)}function Tt(t){return Ki.call(t)}function Bt(t,e){if(!O)return at(t);var r=at(L);if(r===null)r=L.appendChild(vt());else if(e&&r.nodeType!==3){var n=vt();return r?.before(n),lt(n),n}return e&&jn(r),lt(r),r}function Br(t,e=!1){if(!O){var r=at(t);return r instanceof Comment&&r.data===""?Tt(r):r}if(e){if(L?.nodeType!==3){var n=vt();return L?.before(n),lt(n),n}jn(L)}return L}function ni(t,e=!1){if(!O)return at(t);var r=Bt(t,e);return ct(t),r}function yt(t,e=1,r=!1){let n=O?L:t;for(var i;e--;)i=n,n=Tt(n);if(!O)return n;if(r){if(n?.nodeType!==3){var l=vt();return n===null?i?.after(l):n.before(l),lt(l),l}jn(n)}return lt(n),n}function Ui(t){t.textContent=""}function Yi(){return!Le||Ct!==null?!1:(j.f&_n)!==0}function Wn(t,e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function jn(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function Eo(t){var e=j;if(e===null)return C.f|=_r,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;Pt(t,e)}function Pt(t,e){if(t===te)throw t;if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw t}}function Wo(t){j===null&&(C===null&&ro(t),eo()),Ut&&to(t)}function jo(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Rt(t,e){var r=j;r!==null&&r.f&8192&&(t|=yn);var n={ctx:q,deps:null,nodes:null,f:t|St|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};E?.register_created_effect(n);var i=n;if((t&4)!==0)Xe!==null?Xe.push(n):ye.ensure().schedule(n);else if(e!==null){try{Ce(n)}catch(o){throw et(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=bn))}if(i!==null&&(i.parent=r,r!==null&&jo(i,r),C!==null&&(C.f&2)!==0&&(t&64)===0)){var l=C;(l.effects??(l.effects=[])).push(i)}return n}function An(){return C!==null&&!bt}function Gi(t){const e=Rt(8,null);return V(e,pt),e.teardown=t,e}function ii(t){Wo("$effect");var e=j.f;if(!C&&(e&32)!==0&&q!==null&&!q.i){var r=q;(r.e??(r.e=[])).push(t)}else return Zi(t)}function Zi(t){return Rt(4|ql,t)}function Ao(t){ye.ensure();const e=Rt(64|Oe,t);return()=>{et(e)}}function Co(t){ye.ensure();const e=Rt(64|Oe,t);return(r={})=>new Promise(n=>{r.outro?_e(e,()=>{et(e),n(void 0)}):(et(e),n(void 0))})}function Xi(t){return Rt(4,t)}function Oo(t){return Rt(Vl|Oe,t)}function Pr(t,e=0){return Rt(8|e,t)}function Ht(t,e=[],r=[],n=[]){vo(n,e,r,i=>{Rt(8,()=>{t(...i.map(f))})})}function Cn(t,e=0){return Rt(16|e,t)}function dt(t){return Rt(32|Oe,t)}function Ji(t){var e=t.teardown;if(e!==null){const r=Ut,n=C;li(!0),gt(null);try{e.call(null)}catch(i){Pt(i,t.parent)}finally{li(r),gt(n)}}}function On(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Ne(()=>{i.abort(er)});var n=r.next;(r.f&64)!==0?r.parent=null:et(r,e),r=n}}function Lo(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&et(e),e=r}}function et(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(No(t.nodes.start,t.nodes.end),r=!0),t.f|=rn,On(t,e&&!r),Qe(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)l.stop();Ji(t),t.f^=rn,t.f|=bi;var i=t.parent;i!==null&&i.first!==null&&Qi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function No(t,e){for(;t!==null;){var r=t===e?null:Tt(t);t.remove(),t=r}}function Qi(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function _e(t,e,r=!0){var n=[];t.f|=256,tl(t,n,!0);var i=()=>{r&&et(t),e&&e()},l=n.length;if(l>0){var o=()=>--l||i();for(var a of n)a.out(o)}else i()}function tl(t,e,r){if((t.f&8192)===0){t.f^=yn;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var l=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;tl(i,e,o?r:!1)}i=l}}}function Wr(t){t.f&=-257,el(t,!0)}function el(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=yn,!(t.f&1024)&&(V(t,St),ye.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;el(r,i?e:!1),r=n}var l=t.nodes&&t.nodes.t;if(l!==null)for(const o of l)(o.is_global||e)&&o.in()}}function Ln(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Tt(r);e.append(r),r=i}}var Po=null,Ut=!1;function li(t){Ut=t}var C=null,bt=!1;function gt(t){C=t}var j=null;function It(t){j=t}var kt=null;function rl(t){C!==null&&(C.f&2097152||C.f&2)&&(kt??(kt=new Set)).add(t)}var nt=null,st=0,ht=null;function zo(t){ht=t}var nl=1,fe=0,pe=fe;function oi(t){pe=t}function il(){return++nl}function nr(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var l=r[i];if(nr(l)&&Oi(l),l.wv>t.wv)return!0}e&512&&tt===null&&V(t,pt)}return!1}function ll(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!Le&&kt!==null&&kt.has(t)))for(var i=0;i<n.length;i++){var l=n[i];(l.f&2)!==0?ll(l,e,!1):e===l&&(r?V(l,St):l.f&1024&&V(l,we),Ti(l))}}function ol(t){var e=nt,r=st,n=ht,i=C,l=kt,o=q,a=bt,u=pe,c=t.f;nt=null,st=0,ht=null,C=(c&96)===0?t:null,kt=null,We(t.ctx),bt=!1,pe=++fe,t.ac!==null&&(Ne(()=>{t.ac.abort(er)}),t.ac=null);try{t.f|=Xn;var h=t.fn,p=h();t.f|=_n;var v=si(t);if(rr()&&ht!==null&&!bt&&v!==null&&(t.f&6146)===0)for(var g=0;g<ht.length;g++)ll(ht[g],t);if(i!==null&&i!==t){if(fe++,i.deps!==null)for(let y=0;y<r;y+=1)i.deps[y].rv=fe;if(e!==null)for(const y of e)y.rv=fe;ht!==null&&(n===null?n=ht:n.push(...ht))}return t.f&8388608&&(t.f^=_r),p}catch(y){return si(t),Eo(y)}finally{t.f^=Xn,nt=e,st=r,ht=n,C=i,kt=l,We(o),bt=a,pe=u}}function si(t){var e=t.deps,r=E?.is_fork;if(nt!==null){var n;if(r||Qe(t,st),e!==null&&st>0)for(e.length=st+nt.length,n=0;n<nt.length;n++)e[st+n]=nt[n];else t.deps=e=nt;if(An()&&(t.f&512)!==0)for(n=st;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&st<e.length&&(Qe(t,st),e.length=st);return e}function Io(t,e){let r=e.reactions;if(r!==null){var n=zl.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&2)!==0&&(nt===null||!wr.call(nt,e))){var l=e;l.f&512&&(l.f^=512),l.v!==Y&&xn(l),l.ac!==null&&Ne(()=>{l.ac.abort(er),l.ac=null,V(l,St)}),wo(l),Qe(l,0)}}function Qe(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Io(t,r[n])}function Ce(t){var e=t.f;if((e&16384)===0){V(t,pt);var r=j;j=t;try{(e&16777232)!==0?Lo(t):On(t),Ji(t);var n=ol(t);t.teardown=typeof n=="function"?n:null,t.wv=nl}finally{j=r}}}async function To(){if(Le)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),Je()}function f(t){var e=(t.f&2)!==0;if(Po?.add(t),C!==null&&!bt&&!(j!==null&&(j.f&16384)!==0)&&(kt===null||!kt.has(t))){var r=C.deps;if((C.f&2097152)!==0)t.rv<fe&&(t.rv=fe,nt===null&&r!==null&&r[st]===t?st++:nt===null?nt=[t]:nt.push(t));else{var n;(n=C).deps??(n.deps=[]),wr.call(C.deps,t)||C.deps.push(t);var i=t.reactions;i===null?t.reactions=[C]:wr.call(i,C)||i.push(C)}}if(Ut&&Nt.has(t))return Nt.get(t);if(e){var l=t;if(Ut){var o=l.v;return(!(l.f&1024)&&l.reactions!==null||al(l))&&(o=Sn(l)),Nt.set(l,o),o}var a=(l.f&512)===0&&!bt&&C!==null&&(C.f&512)!==0,u=(l.f&_n)===0;nr(l)&&(a&&(l.f|=512),Oi(l)),a&&!u&&(Li(l),sl(l))}if(tt?.has(t))return tt.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function sl(t){if(t.f|=512,t.deps!==null)for(const r of t.deps){var e=r.reactions;e===null?r.reactions=[t]:wr.call(e,t)||e.push(t),r.f&2&&!(r.f&512)&&(Li(r),sl(r))}}function al(t){if(t.v===Y)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Nt.has(e)||(e.f&2)!==0&&al(e))return!0;return!1}function zr(t){var e=bt;try{return bt=!0,t()}finally{bt=e}}var Ee=Symbol("events"),ul=new Set,hn=new Set;function Ro(t,e,r,n={}){function i(l){if(n.capture||vn.call(e,l),!l.cancelBubble)return Ne(()=>r?.call(this,l))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,zt(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function Do(t,e,r,n,i){var l={capture:n,passive:i},o=Ro(t,e,r,l);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Gi(()=>{o.__removed=!0,e.removeEventListener(t,o,l)})}function ne(t,e,r){(e[Ee]??(e[Ee]={}))[t]=r}function Ho(t){for(var e=0;e<t.length;e++)ul.add(t[e]);for(var r of hn)r(t)}var qr=null,Vr=!1;function vn(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],l=i[0]||t.target;qr=t,Vr||(Vr=!0,setTimeout(()=>{Vr=!1,qr=null}));var o=0,a=qr===t&&t[Ee];if(a){var u=i.indexOf(a);if(u!==-1&&(e===document||e===window)){t[Ee]=e;return}var c=i.indexOf(e);if(c===-1)return;u<=c&&(o=u)}if(l=i[o]||t.target,l!==e){Ye(t,"currentTarget",{configurable:!0,get(){return l||r}});var h=C,p=j;gt(null),It(null);try{for(var v,g=[];l!==null&&l!==e;){try{var y=l[Ee]?.[n];y!=null&&(!l.disabled||t.target===l)&&y.call(l,t)}catch(k){v?g.push(k):v=k}if(t.cancelBubble)break;o++,l=o<i.length?i[o]:null}if(v){for(let k of g)queueMicrotask(()=>{throw k});throw v}}finally{t[Ee]=e,delete t.currentTarget,gt(h),It(p)}}}var Fo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Bo(t){return Fo?.createHTML(t)??t}function fl(t){var e=Wn("template");return e.innerHTML=Bo(t.replaceAll("<!>","<!---->")),e.content}function Kt(t,e){var r=j;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function cl(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,l=!t.startsWith("<!>");return()=>{if(O)return Kt(L,null),L;i===void 0&&(i=fl(l?t:"<!>"+t),r||(i=at(i)));var o=n||qi?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=at(o),u=o.lastChild;Kt(a,u)}else Kt(o,o);return o}}function qo(t,e,r="svg"){var n=!t.startsWith("<!>"),i=(e&1)!==0,l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(O)return Kt(L,null),L;if(!o){var a=at(fl(l));if(i)for(o=document.createDocumentFragment();at(a);)o.appendChild(at(a));else o=at(a)}var u=o.cloneNode(!0);if(i){var c=at(u),h=u.lastChild;Kt(c,h)}else Kt(u,u);return u}}function Et(t,e){return qo(t,e,"svg")}function Kr(){if(O)return Kt(L,null),L;var t=document.createDocumentFragment(),e=document.createComment(""),r=vt();return t.append(e,r),Kt(e,r),t}function X(t,e){if(O){var r=j;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=L),Lr();return}t!==null&&t.before(e)}var Vo=["touchstart","touchmove"];function Ko(t){return Vo.includes(t)}function Uo(t){let e=0,r=me(0),n;return()=>{An()&&(f(r),Pr(()=>(e===0&&(n=zr(()=>t(()=>Ue(r)))),e+=1,()=>{zt(()=>{e-=1,e===0&&(n?.(),n=void 0,Ue(r))})})))}}var Yo=bn|Oe;function Go(t,e,r,n){new Zo(t,e,r,n)}var xt=new WeakMap,pn=new WeakMap,Lt=new WeakMap,tr=new WeakMap,it=new WeakMap,Mt=new WeakMap,ut=new WeakMap,$t=new WeakMap,Qt=new WeakMap,xe=new WeakMap,de=new WeakMap,cr=new WeakMap,dn=new WeakMap,gn=new WeakMap,ie=new WeakMap,ai=new WeakMap,R=new WeakSet,Zo=class{constructor(t,e,r,n){En(this,R),H(this,"parent",void 0),H(this,"is_pending",!1),H(this,"transform_error",void 0),M(this,xt,void 0),M(this,pn,O?L:null),M(this,Lt,void 0),M(this,tr,void 0),M(this,it,void 0),M(this,Mt,null),M(this,ut,null),M(this,$t,null),M(this,Qt,null),M(this,xe,0),M(this,de,0),M(this,cr,!1),M(this,dn,new Set),M(this,gn,new Set),M(this,ie,null),M(this,ai,Uo(()=>(_(ie,this,me(s(xe,this))),()=>{_(ie,this,null)}))),_(xt,this,t),_(Lt,this,e),_(tr,this,i=>{var l=j;l.b=this,l.f|=128,r(i)}),this.parent=j.b,this.transform_error=n??this.parent?.transform_error??(i=>i),_(it,this,Cn(()=>{if(O){const i=$n(s(pn,this));Lr();const l=i==="[!";if(i.startsWith("[?")){const o=JSON.parse(i.slice(2));$(R,this,Jo).call(this,o)}else l?$(R,this,Qo).call(this):$(R,this,Xo).call(this)}else $(R,this,vl).call(this)},Yo)),O&&_(xt,this,L)}defer_effect(t){ji(t,s(dn,this),s(gn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(Lt,this).pending}update_pending_count(t,e){$(R,this,pl).call(this,t,e),_(xe,this,s(xe,this)+t),s(ie,this)&&!s(cr,this)&&(_(cr,this,!0),zt(()=>{_(cr,this,!1),s(ie,this)&&Ae(s(ie,this),s(xe,this))}))}get_effect_pending(){return s(ai,this).call(this),f(s(ie,this))}error(t){if(t===te||!s(Lt,this).onerror&&!s(Lt,this).failed)throw t;E?.is_fork?(s(Mt,this)&&E.skip_effect(s(Mt,this)),s(ut,this)&&E.skip_effect(s(ut,this)),s($t,this)&&E.skip_effect(s($t,this)),E.oncommit(()=>{$(R,this,ge).call(this)||$(R,this,ui).call(this,t)})):$(R,this,ui).call(this,t)}};function Xo(){try{_(Mt,this,dt(()=>s(tr,this).call(this,s(xt,this))))}catch(t){this.error(t)}}function Jo(t){const e=s(Lt,this).failed,{reset:r,invoke_onerror:n}=$(R,this,hl).call(this,t);zt(n),e&&_($t,this,dt(()=>{e(s(xt,this),()=>t,()=>r)}))}function hl(t){var e=!1,r=!1;const n=()=>{if(!$(R,this,ge).call(this)){if(e){Gl();return}e=!0,r&&uo(),s($t,this)!==null&&_e(s($t,this),()=>{_($t,this,null)}),$(R,this,Nn).call(this,()=>{$(R,this,vl).call(this)})}};return{reset:n,invoke_onerror:()=>{if(!$(R,this,ge).call(this))try{r=!0,s(Lt,this).onerror?.(t,n),r=!1}catch(i){Pt(i,s(it,this)&&s(it,this).parent)}}}}function ge(){return(s(it,this).f&(bi|rn))!==0}function Qo(){const t=s(Lt,this).pending;t&&(this.is_pending=!0,_(ut,this,dt(()=>t(s(xt,this)))),zt(()=>{if(!$(R,this,ge).call(this)){var e=_(Qt,this,document.createDocumentFragment()),r=vt(),n=!1;if(e.append(r),_(Mt,this,$(R,this,Nn).call(this,()=>{try{return dt(()=>s(tr,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(l){Pt(l,s(it,this).parent)}return null}})),s(Mt,this)===null){_(Qt,this,null),n&&$(R,this,jr).call(this,E);return}s(de,this)===0&&(s(xt,this).before(e),_(Qt,this,null),_e(s(ut,this),()=>{_(ut,this,null)}),$(R,this,jr).call(this,E))}}))}function vl(){try{if(this.is_pending=this.has_pending_snippet(),_(de,this,0),_(xe,this,0),_(Mt,this,dt(()=>{s(tr,this).call(this,s(xt,this))})),s(de,this)>0){var t=_(Qt,this,document.createDocumentFragment());Ln(s(Mt,this),t);const e=s(Lt,this).pending;_(ut,this,dt(()=>e(s(xt,this))))}else $(R,this,jr).call(this,E)}catch(e){this.error(e)}}function jr(t){this.is_pending=!1,t.transfer_effects(s(dn,this),s(gn,this))}function Nn(t){var e=j,r=C,n=q;It(s(it,this)),gt(s(it,this)),We(s(it,this).ctx);try{return ye.ensure(),t()}finally{It(e),gt(r),We(n)}}function pl(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;$(R,r=this.parent,pl).call(r,t,e)}return}_(de,this,s(de,this)+t),s(de,this)===0&&($(R,this,jr).call(this,e),s(ut,this)&&_e(s(ut,this),()=>{_(ut,this,null)}),s(Qt,this)&&(s(xt,this).before(s(Qt,this)),_(Qt,this,null)))}function ui(t){s(Mt,this)&&(et(s(Mt,this)),_(Mt,this,null)),s(ut,this)&&(et(s(ut,this)),_(ut,this,null)),s($t,this)&&(et(s($t,this)),_($t,this,null)),O&&(lt(s(pn,this)),Zl(),lt(br()));let e=s(Lt,this).failed;const r=n=>{if($(R,this,ge).call(this))return;const{reset:i,invoke_onerror:l}=$(R,this,hl).call(this,n);l(),e&&!$(R,this,ge).call(this)&&_($t,this,$(R,this,Nn).call(this,()=>{try{return dt(()=>{var o=j;o.b=this,o.f|=128,e(s(xt,this),()=>n,()=>i)})}catch(o){return Pt(o,s(it,this).parent),null}}))};zt(()=>{if(!$(R,this,ge).call(this)){var n;try{n=this.transform_error(t)}catch(i){Pt(i,s(it,this)&&s(it,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>Pt(i,s(it,this)&&s(it,this).parent)):r(n)}})}function fi(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[gr]??(t[gr]=t.nodeValue))&&(t[gr]=r,t.nodeValue=`${r}`)}function dl(t,e){return gl(t,e)}function ts(t,e){cn(),e.intro=e.intro??!1;const r=e.target,n=O,i=L;try{for(var l=at(r);l&&(l.nodeType!==8||l.data!=="[");)l=Tt(l);if(!l)throw te;qt(!0),lt(l);const o=gl(t,{...e,anchor:l});return qt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==te&&console.warn("Failed to hydrate: ",o),e.recover===!1&&io(),cn(),Ui(r),qt(!1),dl(t,e)}finally{qt(n),lt(i)}}var hr=new Map;function gl(t,{target:e,anchor:r,props:n={},events:i,context:l,intro:o=!0,transformError:a}){cn();var u=void 0,c=Co(()=>{var h=r??e.appendChild(vt());Go(h,{pending:()=>{}},g=>{Si({});var y=q;if(l&&(y.c=l),i&&(n.$$events=i),O&&Kt(g,null),u=t(g,n)||kn(),O&&(j.nodes.end=L,L===null||L.nodeType!==8||L.data!=="]"))throw Or(),te;Ei()},a);var p=new Set,v=g=>{for(var y=0;y<g.length;y++){var k=g[y];if(!p.has(k)){p.add(k);var m=Ko(k);for(const I of[e,document]){var b=hr.get(I);b===void 0&&(b=new Map,hr.set(I,b));var B=b.get(k);B===void 0?(I.addEventListener(k,vn,{passive:m}),b.set(k,1)):b.set(k,B+1)}}}};return v(Cr(ul)),hn.add(v),()=>{for(var g of p)for(const m of[e,document]){var y=hr.get(m),k=y.get(g);--k==0?(m.removeEventListener(g,vn),y.delete(g),y.size===0&&hr.delete(m)):y.set(g,k)}hn.delete(v),h!==r&&h.parentNode?.removeChild(h)}});return mn.set(u,c),u}var mn=new WeakMap;function es(t,e){const r=mn.get(t);return r?(mn.delete(t),r(e)):Promise.resolve()}var Ft=new WeakMap,Gt=new WeakMap,_t=new WeakMap,Ie=new WeakMap,Ur=new WeakMap,Yr=new WeakMap,ci=new WeakMap,rs=class{constructor(t,e=!0){H(this,"anchor",void 0),M(this,Ft,new Map),M(this,Gt,new Map),M(this,_t,new Map),M(this,Ie,new Set),M(this,Ur,!0),M(this,Yr,r=>{if(s(Ft,this).has(r)){var n=s(Ft,this).get(r),i=s(Gt,this).get(n);if(i)Wr(i),s(Ie,this).delete(n);else{var l=s(_t,this).get(n);l&&(Wr(l.effect),s(Gt,this).set(n,l.effect),s(_t,this).delete(n),l.fragment.lastChild.remove(),this.anchor.before(l.fragment),i=l.effect)}for(const[o,a]of s(Ft,this)){if(s(Ft,this).delete(o),o===r)break;const u=s(_t,this).get(a);u&&(et(u.effect),s(_t,this).delete(a))}for(const[o,a]of s(Gt,this)){if(o===n||s(Ie,this).has(o))continue;const u=()=>{if(Array.from(s(Ft,this).values()).includes(o)){var c=document.createDocumentFragment();Ln(a,c),c.append(vt()),s(_t,this).set(o,{effect:a,fragment:c})}else et(a);s(Ie,this).delete(o),s(Gt,this).delete(o)};s(Ur,this)||!i?(s(Ie,this).add(o),_e(a,u,!1)):u()}}}),M(this,ci,r=>{s(Ft,this).delete(r);const n=Array.from(s(Ft,this).values());for(const[i,l]of s(_t,this))n.includes(i)||(et(l.effect),s(_t,this).delete(i))}),this.anchor=t,_(Ur,this,e)}ensure(t,e){var r=E,n=Yi();if(e&&!s(Gt,this).has(t)&&!s(_t,this).has(t))if(n){var i=document.createDocumentFragment(),l=vt();i.append(l),s(_t,this).set(t,{effect:dt(()=>e(l)),fragment:i})}else s(Gt,this).set(t,dt(()=>e(this.anchor)));if(s(Ft,this).set(r,t),n){for(const[o,a]of s(Gt,this))o===t?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of s(_t,this))o===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(s(Yr,this)),r.ondiscard(s(ci,this))}else O&&(this.anchor=L),s(Yr,this).call(this,r)}};function Te(t,e,r=!1){var n;O&&(n=L,Lr());var i=new rs(t),l=r?bn:0;function o(a,u){if(O){var c=$n(n);if(a!==parseInt(c.substring(1))){var h=br();lt(h),i.anchor=h,qt(!1),i.ensure(a,u),qt(!0);return}}i.ensure(a,u)}Cn(()=>{var a=!1;e((u,c=0)=>{a=!0,o(c,u)}),a||o(-1,null)},l)}function vr(t,e){return e}function ns(t,e,r){for(var n=[],i=e.length,l,o=e.length,a=0;a<i;a++){let p=e[a];_e(p,()=>{if(l){if(l.pending.delete(p),l.done.add(p),l.pending.size===0){var v=t.outrogroups;wn(t,Cr(l.done)),v.delete(l),v.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=n.length===0&&r!==null&&t.pending.size===0;if(u){var c=r,h=c.parentNode;Ui(h),h.append(c),t.items.clear()}wn(t,e,!u)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function wn(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const o of t.pending.values())for(const a of o)n.add(t.items.get(a).e)}for(var i=0;i<e.length;i++){var l=e[i];n?.has(l)?(l.f|=Be,Ln(l,document.createDocumentFragment())):et(e[i],r)}}var pr;function le(t,e,r,n,i,l=null){var o=t,a=new Map;if((e&4)!==0){var u=t;o=O?lt(at(u)):u.appendChild(vt())}O&&Lr();var c=null,h=Mn(()=>{var m=r();return wi(m)?m:m==null?[]:Cr(m)}),p=new Map,v=!0;function g(m){if((k.effect.f&16384)===0){k.pending.delete(m);var b=f(h);k.fallback=c,is(k,b,o,e,n),c!==null&&(b.length===0?(c.f&33554432)===0?Wr(c):(c.f^=Be,Fe(c,null,o)):_e(c,()=>{c=null}))}}function y(m){k.pending.delete(m)}var k={effect:Cn(()=>{var m=f(h),b=m.length;let B=!1;O&&$n(o)==="[!"!=(b===0)&&(o=br(),lt(o),qt(!1),B=!0);for(var I=new Set,N=E,J=Yi(),G=0;G<b;G+=1){O&&L.nodeType===8&&L.data==="]"&&(o=L,B=!0,qt(!1));var Z=m[G],Q=n(Z,G),rt=v?null:a.get(Q);rt?(rt.v&&Ae(rt.v,Z),rt.i&&Ae(rt.i,G),J&&N.unskip_effect(rt.e)):(rt=ls(a,v?o:pr??(pr=vt()),Z,Q,G,i,e,r),v||(rt.e.f|=Be),a.set(Q,rt)),I.add(Q)}if(b===0&&l&&!c&&(v?c=dt(()=>l(o)):(c=dt(()=>l(pr??(pr=vt()))),c.f|=Be)),b>I.size&&Ql("","",""),O&&b>0&&lt(br()),!v)if(p.set(N,I),J){for(const[D,Ir]of a)I.has(D)||N.skip_effect(Ir.e);N.oncommit(g),N.ondiscard(y)}else g(N);B&&qt(!0),f(h)}),flags:e,items:a,pending:p,outrogroups:null,fallback:c};v=!1,O&&(o=L)}function Re(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function is(t,e,r,n,i){var l=(n&8)!==0,o=e.length,a=t.items,u=Re(t.effect.first),c,h=null,p,v=[],g=[],y,k,m,b;if(l)for(b=0;b<o;b+=1)y=e[b],k=i(y,b),m=a.get(k).e,!(m.f&33554432)&&(m.nodes?.a?.measure(),(p??(p=new Set)).add(m));for(b=0;b<o;b+=1){if(y=e[b],k=i(y,b),m=a.get(k).e,t.outrogroups!==null)for(const D of t.outrogroups)D.pending.delete(m),D.done.delete(m);if(m.f&8192&&(Wr(m),l&&(m.nodes?.a?.unfix(),(p??(p=new Set)).delete(m))),(m.f&33554432)!==0)if(m.f^=Be,m===u)Fe(m,null,r);else{var B=h?h.next:u;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Zt(t,h,m),Zt(t,m,B),Fe(m,B,r),h=m,v=[],g=[],u=Re(h.next);continue}if(m!==u){if(c!==void 0&&c.has(m)){if(v.length<g.length){var I=g[0],N;h=I.prev;var J=v[0],G=v[v.length-1];for(N=0;N<v.length;N+=1)Fe(v[N],I,r);for(N=0;N<g.length;N+=1)c.delete(g[N]);Zt(t,J.prev,G.next),Zt(t,h,J),Zt(t,G,I),u=I,h=G,b-=1,v=[],g=[]}else c.delete(m),Fe(m,u,r),Zt(t,m.prev,m.next),Zt(t,m,h===null?t.effect.first:h.next),Zt(t,h,m),h=m;continue}for(v=[],g=[];u!==null&&u!==m;)(c??(c=new Set)).add(u),g.push(u),u=Re(u.next);if(u===null)continue}!(m.f&33554432)&&v.push(m),h=m,u=Re(m.next)}if(t.outrogroups!==null){for(const D of t.outrogroups)D.pending.size===0&&(wn(t,Cr(D.done)),t.outrogroups?.delete(D));t.outrogroups.size===0&&(t.outrogroups=null)}if(u!==null||c!==void 0){var Z=[];if(c!==void 0)for(m of c)!(m.f&8192)&&Z.push(m);for(;u!==null;)!(u.f&8192)&&u!==t.fallback&&Z.push(u),u=Re(u.next);var Q=Z.length;if(Q>0){var rt=(n&4)!==0&&o===0?r:null;if(l){for(b=0;b<Q;b+=1)Z[b].nodes?.a?.measure();for(b=0;b<Q;b+=1)Z[b].nodes?.a?.fix()}ns(t,Z,rt)}}l&&zt(()=>{if(p!==void 0)for(m of p)m.nodes?.a?.apply()})}function ls(t,e,r,n,i,l,o,a){var u=(o&1)!==0?(o&16)===0?Fi(r,!1,!1):me(r):null,c=(o&2)!==0?me(i):null;return{v:u,i:c,e:dt(()=>(l(e,u??r,c??i,a),()=>{t.delete(n)}))}}function Fe(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,l=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var o=Tt(n);if(l.before(n),n===i)return;n=o}}function Zt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function os(t,e){Xi(()=>{t=j?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=Wn("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var hi=[...`
3
+ \r\f \v\uFEFF`];function ss(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var l=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+l;(o===0||hi.includes(n[o-1]))&&(a===n.length||hi.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function vi(t,e=!1){var r=e?" !important;":";",n="";for(var i of Object.keys(t)){var l=t[i];l!=null&&l!==""&&(n+=" "+i+": "+l+r)}return n}function Gr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function as(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var l=!1,o=0,a=!1,u=[];n&&u.push(...Object.keys(n).map(Gr)),i&&u.push(...Object.keys(i).map(Gr));var c=0,h=-1;const k=t.length;for(var p=0;p<k;p++){var v=t[p];if(a?v==="/"&&t[p-1]==="*"&&(a=!1):l?l===v&&(l=!1):v==="/"&&t[p+1]==="*"?a=!0:v==='"'||v==="'"?l=v:v==="("?o++:v===")"&&o--,!a&&l===!1&&o===0){if(v===":"&&h===-1)h=p;else if(v===";"||p===k-1){if(h!==-1){var g=Gr(t.substring(c,h).trim());if(!u.includes(g)){v!==";"&&p++;var y=t.substring(c,p).trim();r+=" "+y+";"}}c=p+1,h=-1}}}}return n&&(r+=vi(n)),i&&(r+=vi(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function pi(t,e,r,n,i,l){var o=t[ln];if(O||o!==r||o===void 0){var a=ss(r,n,l);(!O||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[ln]=r}else if(l&&i!==l)for(var u in l){var c=!!l[u];(i==null||c!==!!i[u])&&t.classList.toggle(u,c)}return l}function Zr(t,e={},r,n){for(var i in r){var l=r[i];e[i]!==l&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,l,n))}}function us(t,e,r,n){var i=t[on];if(O||i!==e){var l=as(e,n);(!O||l!==t.getAttribute("style"))&&(l==null?t.removeAttribute("style"):t.style.cssText=l),t[on]=e}else n&&(Array.isArray(n)?(Zr(t,r?.[0],n[0]),Zr(t,r?.[1],n[1],"important")):Zr(t,r,n));return n}var fs=Symbol("is custom element"),cs=Symbol("is html"),hs=Ul?"link":"LINK";function vs(t){if(O){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;A(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;A(t,"checked",null),t.checked=i}}};t[Ve]=r,zt(r),Ai()}}function A(t,e,r,n){var i=ps(t);O&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===hs)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Kl]=r),r==null?t.removeAttribute(e):typeof r!="string"&&ds(t).has(e)?t[e]=r:t.setAttribute(e,r))}function ps(t){return t[nn]??(t[nn]={[fs]:t.nodeName.includes("-"),[cs]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var di=new Map;function ds(t){var e=t.getAttribute("is")||t.nodeName,r=di.get(e);if(r)return r;di.set(e,r=new Set);for(var n,i=t,l=Element.prototype;l!==i;){n=Il(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=yi(i)}return r}function gs(t,e,r=e){var n=new WeakSet;ho(t,"input",async i=>{var l=i?t.defaultValue:t.value;if(l=Xr(t)?Jr(l):l,r(l),E!==null&&n.add(E),await To(),l!==(l=e())){var o=t.selectionStart,a=t.selectionEnd,u=t.value.length;if(t.value=l??"",a!==null){var c=t.value.length;o===a&&a===u&&c>u?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(O&&t.defaultValue!==t.value||zr(e)==null&&t.value)&&(r(Xr(t)?Jr(t.value):t.value),E!==null&&n.add(E)),Pr(()=>{var i=e();if(t===document.activeElement){var l=Le?he:E;if(n.has(l))return}Xr(t)&&i===Jr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Xr(t){var e=t.type;return e==="number"||e==="range"}function Jr(t){return t===""?null:+t}var ml,Me=new WeakMap,Ar=new WeakMap,Qr=new WeakMap,gi=new WeakSet,wl=class{constructor(t){En(this,gi),M(this,Me,new WeakMap),M(this,Ar,void 0),M(this,Qr,void 0),_(Qr,this,t)}observe(t,e){var r=s(Me,this).get(t)||new Set;return r.add(e),s(Me,this).set(t,r),$(gi,this,ms).call(this).observe(t,s(Qr,this)),()=>{var n=s(Me,this).get(t);n.delete(e),n.size===0&&(s(Me,this).delete(t),s(Ar,this).unobserve(t))}}};ml=wl;function ms(){return s(Ar,this)??_(Ar,this,new ResizeObserver(t=>{for(var e of t){ml.entries.set(e.target,e);for(var r of s(Me,this).get(e.target)||[])r(e)}}))}H(wl,"entries",new WeakMap);function tn(t,e){return t===e||t?.[qe]===e}function en(t=kn(),e,r,n){var i=q.r,l=j;return Xi(()=>{var o,a;return Pr(()=>{o=a,a=n?.()||[],zr(()=>{tn(r(...a),t)||(e(t,...a),o&&tn(r(...o),t)&&e(null,...o))})}),()=>{let u=l;for(;u!==i&&u.parent!==null&&u.parent.f&33554432;)u=u.parent;const c=()=>{a&&tn(r(...a),t)&&e(null,...a)},h=u.teardown;u.teardown=()=>{c(),h?.()}}}),t}var dr=!1;function ws(t){var e=dr;try{return dr=!1,[t(),dr]}finally{dr=e}}function mi(t,e,r,n){var i=!Nr||(r&2)!==0,l=(r&8)!==0,o=(r&16)!==0,a=n,u=!0,c=void 0,h=()=>o&&i?(c??(c=Ze(n)),f(c)):(u&&(u=!1,a=o?zr(n):n),a);let p;if(l){var v=qe in t||ki in t;p=ce(t,e)?.set??(v&&e in t?N=>t[e]=N:void 0)}var g,y=!1;l?[g,y]=ws(()=>t[e]):g=t[e],g===void 0&&n!==void 0&&(g=h(),p&&(i&&lo(e),p(g)));var k;if(i?k=()=>{var N=t[e];return N===void 0?h():(u=!0,N)}:k=()=>{var N=t[e];return N!==void 0&&(a=void 0),N===void 0?a:N},i&&(r&4)===0)return k;if(p){var m=t.$$legacy;return(function(N,J){return arguments.length>0?((!i||!J||m||y)&&p(J?k():N),N):k()})}var b=!1,B=((r&1)!==0?Ze:Mn)(()=>(b=!1,k()));l&&f(B);var I=j;return(function(N,J){if(arguments.length>0){const G=J?f(B):i&&l?Jt(N):N;return S(B,G),b=!0,a!==void 0&&(a=G),N}return Ut&&b||(I.f&16384)!==0?B.v:f(B)})}function ys(t){return new _s(t)}var oe=new WeakMap,At=new WeakMap,_s=class{constructor(t){M(this,oe,void 0),M(this,At,void 0);var e=new Map,r=(i,l)=>{var o=Fi(l,!1,!1);return e.set(i,o),o};const n=new Proxy({...t.props||{},$$events:{}},{get(i,l){return f(e.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===ki?!0:(f(e.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return S(e.get(l)??r(l,o),o),Reflect.set(i,l,o)}});_(At,this,(t.hydrate?ts:dl)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Je(),_(oe,this,n.$$events);for(const i of Object.keys(s(At,this)))i==="$set"||i==="$destroy"||i==="$on"||Ye(this,i,{get(){return s(At,this)[i]},set(l){s(At,this)[i]=l},enumerable:!0});s(At,this).$set=i=>{Object.assign(n,i)},s(At,this).$destroy=()=>{es(s(At,this))}}$set(t){s(At,this).$set(t)}$on(t,e){s(oe,this)[t]=s(oe,this)[t]||[];const r=(...n)=>e.call(this,...n);return s(oe,this)[t].push(r),()=>{s(oe,this)[t]=s(oe,this)[t].filter(n=>n!==r)}}$destroy(){s(At,this).$destroy()}},yl;typeof HTMLElement=="function"&&(yl=class extends HTMLElement{constructor(t,e,r){super(),H(this,"$$ctor",void 0),H(this,"$$s",void 0),H(this,"$$c",void 0),H(this,"$$cn",!1),H(this,"$$d",{}),H(this,"$$r",!1),H(this,"$$p_d",{}),H(this,"$$l",{}),H(this,"$$l_u",new Map),H(this,"$$me",void 0),H(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const l=Wn("slot");n!=="default"&&(l.name=n),X(i,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=bs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=mr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ys({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Ao(()=>{Pr(()=>{this.$$r=!0;for(const n of yr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=mr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const l=this.$$c.$on(n,i);this.$$l_u.set(i,l)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=mr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return yr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function mr(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function bs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function $s(t,e,r,n,i,l){let o=class extends yl{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return yr(e).map(a=>(e[a].attribute||a).toLowerCase())}};return yr(e).forEach(a=>{Ye(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=mr(a,u,e),this.$$d[a]=u;var c=this.$$c;c&&(ce(c,a)?.get?c[a]=u:c.$set({[a]:u}))}})}),n.forEach(a=>{Ye(o.prototype,a,{get(){return this.$$c?.[a]}})}),l&&(o=l(o)),t.element=o,o}var ks=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'),xs=Et('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'),Ms=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'),Ss=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'),Es=cl('<button type="button"><span class="pie-tool-graph__tool-icon svelte-v3lao1" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-v3lao1"> </span></button>'),Ws=Et('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),js=Et('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),As=Et('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),Cs=Et('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),Os=Et('<line class="pie-tool-graph__user-line svelte-v3lao1"></line>'),Ls=Et('<circle r="2" role="button" tabindex="0"></circle>'),Ns=Et('<line class="pie-tool-graph__temp-line svelte-v3lao1"></line>'),Ps=cl('<div class="pie-tool-graph svelte-v3lao1" role="dialog" tabindex="-1"><div class="pie-tool-graph__toolbar svelte-v3lao1"><div class="pie-tool-graph__tool-buttons svelte-v3lao1"></div> <div class="pie-tool-graph__transparency-control svelte-v3lao1"><label for="grid-opacity" class="svelte-v3lao1"> </label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" class="svelte-v3lao1"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-v3lao1" role="img" tabindex="0"><svg class="pie-tool-graph__canvas svelte-v3lao1" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!><circle r="3" class="pie-tool-graph__keyboard-cursor svelte-v3lao1"></circle></svg></div></div>'),zs={hash:"svelte-v3lao1",code:`.pie-tool-graph.svelte-v3lao1 {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
4
4
 
5
5
  /* Toolbar */.pie-tool-graph__toolbar.svelte-v3lao1 {padding:8px;background:var(--pie-primary-light, #5a7fa3); /* Lighter teal-like color */display:flex;gap:16px;align-items:center;flex-wrap:wrap;}.pie-tool-graph__tool-buttons.svelte-v3lao1 {display:flex;gap:4px;flex:1;}.pie-tool-graph__tool-button.svelte-v3lao1 {flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 12px;background:color-mix(in srgb, var(--pie-white, #fff) 20%, transparent);border:2px solid transparent;border-radius:4px;cursor:pointer;color:var(--pie-white, #fff);font-size:12px;transition:all 0.2s;}.pie-tool-graph__tool-button.svelte-v3lao1:hover {background:color-mix(in srgb, var(--pie-white, #fff) 30%, transparent);}.pie-tool-graph__tool-button.pie-tool-graph__tool-button--active.svelte-v3lao1 {background:var(--pie-background, #fff);color:var(--pie-primary-dark, #2c3e50);border-color:var(--pie-primary-dark, #2c3e50);}.pie-tool-graph__tool-icon.svelte-v3lao1 {width:20px;height:20px;display:flex;align-items:center;justify-content:center;}.pie-tool-graph__tool-label.svelte-v3lao1 {font-size:11px;font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 {display:flex;align-items:center;gap:8px;color:var(--pie-white, #fff);font-size:12px;padding-left:8px;}.pie-tool-graph__transparency-control.svelte-v3lao1 label:where(.svelte-v3lao1) {font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 input[type='range']:where(.svelte-v3lao1) {width:100px;cursor:pointer;}
6
6
 
@@ -8,4 +8,4 @@ import{t as Ol}from"./attribute-coercion-b93b482c.js";import{r as Ll}from"./tool
8
8
 
9
9
  /* Grid lines */.pie-tool-graph__grid-line.svelte-v3lao1 {stroke:var(--pie-border-dark, #666);vector-effect:non-scaling-stroke;}.pie-tool-graph__grid-line--major.svelte-v3lao1 {stroke:var(--pie-border-dark, #333);stroke-width:0.75;}.pie-tool-graph__grid-line--minor.svelte-v3lao1 {stroke:var(--pie-border-light, #ccc);stroke-width:0.5;}
10
10
 
11
- /* User drawing styles */.pie-tool-graph__user-point.svelte-v3lao1 {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-v3lao1 {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-v3lao1 {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-v3lao1 {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}.pie-tool-graph__keyboard-cursor.svelte-v3lao1 {display:none;fill:none;pointer-events:none;stroke:var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));stroke-width:2;vector-effect:non-scaling-stroke;}.pie-tool-graph__canvas-wrapper.svelte-v3lao1:focus-visible .pie-tool-graph__keyboard-cursor:where(.svelte-v3lao1) {display:inline;}`};function Is(t,e){Mi(e,!0),os(t,zs);let r=gi(e,"visible",7,!1),n=gi(e,"toolId",7,"graph"),i=H(void 0),l=H(void 0),o=H(void 0),a=H("selector"),u=H(Xt([])),c=H(Xt([])),h=H(1),p=H(1),v=H(null),d=H(null),y=H(null),M=H(null);const m=5,b=5,V=100/m,I=V/b,N={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};let X=H(0),Y=H(0),Z=Gt(()=>{if(f(Y)<=0||f(X)<=0)return 100;const g=f(Y)/100,w=f(X)/g;return Math.max(100,w)}),J=Gt(()=>{const g=f(M)??{x:f(Z)/2,y:50};return{x:Ln(g.x,f(Z)),y:Ln(g.y,100)}}),rt=H(null);const R=Gt(()=>Nl(f(rt))),zr=Gt(()=>[{name:"selector",label:f(R).t("tools.graph.modeSelector"),title:f(R).t("tools.graph.modeSelectorHint")},{name:"point",label:f(R).t("tools.graph.modePoint"),title:f(R).t("tools.graph.modePointHint")},{name:"line",label:f(R).t("tools.graph.modeLine"),title:f(R).t("tools.graph.modeLineHint")},{name:"delete",label:f(R).t("tools.graph.modeDelete"),title:f(R).t("tools.graph.modeDeleteHint")}]);ni(()=>{if(f(l))return Ll(f(l),g=>{S(rt,g,!0)})});function Ir(){return So(h)}function er(g){if(g!==null)return f(u).find(w=>w.id===g)}function Ln(g,w){const z=Math.floor(w/I);return Math.max(0,Math.min(z,Math.round(g/I)))*I}function Nn(g){if(!f(o))return null;const w=f(o).createSVGPoint();w.x=g.clientX,w.y=g.clientY;const z=f(o).getScreenCTM();if(!z)return null;try{const T=w.matrixTransform(z.inverse());return T.y=Math.max(0,Math.min(100,T.y)),T.x=Math.max(0,Math.min(f(Z),T.x)),{x:T.x,y:T.y}}catch(T){return console.error("Error transforming point:",T),null}}function Pn(g,w=5){const z=w*w;let T=null,mt=1/0;for(const Wt of f(u)){const nr=Wt.x-g.x,we=Wt.y-g.y,jt=nr*nr+we*we;jt<mt&&jt<z&&(mt=jt,T=Wt)}return T}function yl(g){return g===f(v)||g===f(d)}function zn(g){S(u,f(u).filter(w=>w.id!==g),!0),S(c,f(c).filter(w=>w.p1Id!==g&&w.p2Id!==g),!0)}function In(g,w){g!==w&&(f(c).some(z=>z.p1Id===g&&z.p2Id===w||z.p1Id===w&&z.p2Id===g)||S(c,[...f(c),{id:Ir(),p1Id:g,p2Id:w}],!0))}function bl(g){if(f(a)==="delete"){zn(g);return}if(f(a)==="line"){if(f(v)===null){S(v,g,!0);return}In(f(v),g),S(v,null),S(y,null)}}let rr=Gt(()=>{const g={majorVertical:[],majorHorizontal:[],minorVertical:[],minorHorizontal:[]},w=f(Z);for(let T=0;T<=m;T++){const mt=T*V;if(g.majorHorizontal.push(mt),T<m)for(let Wt=1;Wt<b;Wt++)g.minorHorizontal.push(mt+Wt*I)}let z=0;for(;z<=w;){if(g.majorVertical.push(z),z<w)for(let T=1;T<b;T++){const mt=z+T*I;if(mt<=w)g.minorVertical.push(mt);else break}z+=V}return g});function _l(g){S(a,g,!0),S(v,null),S(d,null),S(y,null)}function $l(g){const w=Nn(g);w&&Tn(w)}function kl(g){if(g.target!==g.currentTarget)return;const w=N[g.key];w?(g.preventDefault(),S(M,{x:f(J).x+w[0]*I,y:f(J).y+w[1]*I},!0),f(v)!==null&&S(y,f(J),!0)):(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),Tn(f(J)))}function Tn(g){const w=Pn(g,I);switch(f(a)){case"point":S(u,[...f(u),{id:Ir(),x:g.x,y:g.y}],!0);break;case"line":const z=w??{id:Ir(),x:g.x,y:g.y};w||S(u,[...f(u),z],!0),f(v)===null?S(v,z.id,!0):(In(f(v),z.id),S(v,null),S(y,null));break;case"delete":const T=Pn(g,2);T&&zn(T.id);break;case"selector":S(v,null),S(y,null)}}function xl(g,w){f(a)==="selector"&&(S(d,g,!0),w.target.setPointerCapture(w.pointerId))}function Ml(g){const w=Nn(g);if(w&&(S(y,w,!0),f(d)!==null&&f(a)==="selector")){const z=er(f(d));z&&(z.x=w.x,z.y=w.y)}}function Rn(g){f(d)!==null&&(g.target?.hasPointerCapture(g.pointerId)&&g.target.releasePointerCapture(g.pointerId),S(d,null)),(f(a)!=="line"||f(v)===null)&&S(y,null)}let Le=null;ni(()=>{if(f(i))return Le||(Le=new ResizeObserver(g=>{const{width:w,height:z}=g[0].contentRect;(Math.abs(f(X)-w)>.1||Math.abs(f(Y)-z)>.1)&&(S(X,w,!0),S(Y,z,!0))})),Le.observe(f(i)),()=>{Le&&Le.disconnect()}});var Sl={get visible(){return r()},set visible(g=!1){r(g),Mr()},get toolId(){return n()},set toolId(g="graph"){n(g),Mr()}},Dn=Fr(),El=Vr(Dn),Wl=g=>{var w=Ps(),z=Bt(w),T=Bt(z);ie(T,21,()=>f(zr),P=>P.name,(P,E)=>{var $=Es();let lt;var F=Bt($),wt=Bt(F),Dt=ft=>{Q(ft,ks())},Ne=ft=>{Q(ft,xs())},ee=ft=>{Q(ft,Ms())},Al=ft=>{Q(ft,Ss())};ze(wt,ft=>{f(E).name==="selector"?ft(Dt):f(E).name==="point"?ft(Ne,1):f(E).name==="line"?ft(ee,2):f(E).name==="delete"&&ft(Al,3)}),ct(F);var Cl=ri(yt(F,2),!0);ct($),Ht(()=>{lt=vi($,1,"pie-tool-graph__tool-button svelte-v3lao1",null,lt,{"pie-tool-graph__tool-button--active":f(a)===f(E).name}),A($,"title",f(E).title),A($,"aria-label",f(E).title),A($,"aria-pressed",f(a)===f(E).name),ui(Cl,f(E).label)}),re("click",$,()=>_l(f(E).name)),Q(P,$)}),ct(T);var mt=yt(T,2),Wt=Bt(mt),nr=ri(Wt,!0),we=yt(Wt,2);vs(we),ct(mt),ct(z);var jt=yt(z,2),te=Bt(jt),ir=Bt(te),Hn=Bt(ir);ie(Hn,17,()=>f(rr).minorHorizontal,fr,(P,E)=>{var $=Ws();Ht(()=>{A($,"y1",f(E)),A($,"x2",f(Z)),A($,"y2",f(E))}),Q(P,$)});var Vn=yt(Hn);ie(Vn,17,()=>f(rr).majorHorizontal,fr,(P,E)=>{var $=js();Ht(()=>{A($,"y1",f(E)),A($,"x2",f(Z)),A($,"y2",f(E))}),Q(P,$)});var Bn=yt(Vn);ie(Bn,17,()=>f(rr).minorVertical,fr,(P,E)=>{var $=As();Ht(()=>{A($,"x1",f(E)),A($,"x2",f(E))}),Q(P,$)}),ie(yt(Bn),17,()=>f(rr).majorVertical,fr,(P,E)=>{var $=Cs();Ht(()=>{A($,"x1",f(E)),A($,"x2",f(E))}),Q(P,$)}),ct(ir);var Tr=yt(ir);ie(Tr,21,()=>f(c),P=>P.id,(P,E)=>{const $=Gt(()=>er(f(E).p1Id)),lt=Gt(()=>er(f(E).p2Id));var F=Fr(),wt=Vr(F),Dt=Ne=>{var ee=Os();Ht(()=>{A(ee,"x1",f($).x),A(ee,"y1",f($).y),A(ee,"x2",f(lt).x),A(ee,"y2",f(lt).y)}),Q(Ne,ee)};ze(wt,Ne=>{f($)&&f(lt)&&Ne(Dt)}),Q(P,F)}),ct(Tr);var Rr=yt(Tr);ie(Rr,21,()=>f(u),P=>P.id,(P,E)=>{var $=Ls();let lt;Ht((F,wt)=>{A($,"cx",f(E).x),A($,"cy",f(E).y),lt=vi($,0,"pie-tool-graph__user-point svelte-v3lao1",null,lt,{"pie-tool-graph__user-point--highlight":F}),A($,"data-id",f(E).id),A($,"aria-label",wt)},[()=>yl(f(E).id),()=>f(R).t("tools.graph.pointA11y",{id:f(E).id})]),re("pointerdown",$,F=>{F.stopPropagation(),xl(f(E).id,F)}),re("keydown",$,F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),bl(f(E).id))}),Q(P,$)}),ct(Rr);var qn=yt(Rr),jl=P=>{const E=Gt(()=>er(f(v)));var $=Fr(),lt=Vr($),F=wt=>{var Dt=Ns();Ht(()=>{A(Dt,"x1",f(E).x),A(Dt,"y1",f(E).y),A(Dt,"x2",f(y).x),A(Dt,"y2",f(y).y)}),Q(wt,Dt)};ze(lt,wt=>{f(E)&&wt(F)}),Q(P,$)};ze(qn,P=>{f(v)&&f(y)&&P(jl)});var Fn=yt(qn);ct(te),tn(te,P=>S(o,P),()=>f(o)),ct(jt),tn(jt,P=>S(i,P),()=>f(i)),ct(w),tn(w,P=>S(l,P),()=>f(l)),Ht((P,E,$,lt,F,wt)=>{A(w,"lang",P),A(w,"dir",E),A(w,"aria-label",$),A(w,"data-pie-tool-id",n()),ui(nr,lt),A(we,"aria-label",F),A(jt,"aria-label",wt),A(te,"viewBox",`0 0 ${f(Z)??""} 100`),us(ir,`opacity: ${f(p)??""}`),A(Fn,"cx",f(J).x),A(Fn,"cy",f(J).y),w.dir=w.dir},[()=>f(R).getLocale(),()=>f(R).getDirection?.()??"ltr",()=>f(R).t("tools.graph.toolA11y"),()=>f(R).t("tools.graph.grid"),()=>f(R).t("tools.graph.gridOpacityA11y"),()=>f(R).t("tools.graph.canvasA11y")]),gs(we,()=>f(p),P=>S(p,P)),re("click",jt,$l),re("keydown",jt,kl),re("pointermove",te,Ml),re("pointerup",te,Rn),Do("pointerleave",te,Rn),Q(g,w)};return ze(El,g=>{r()&&g(Wl)}),Q(t,Dn),Si(Sl)}Ho(["click","keydown","pointermove","pointerup","pointerdown"]);Ts("pie-tool-graph",$s(Is,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},Ol));function Ts(t,e){customElements.get(t)||customElements.define(t,e)}export{Is as default};
11
+ /* User drawing styles */.pie-tool-graph__user-point.svelte-v3lao1 {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-v3lao1 {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-v3lao1 {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-v3lao1 {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}.pie-tool-graph__keyboard-cursor.svelte-v3lao1 {display:none;fill:none;pointer-events:none;stroke:var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));stroke-width:2;vector-effect:non-scaling-stroke;}.pie-tool-graph__canvas-wrapper.svelte-v3lao1:focus-visible .pie-tool-graph__keyboard-cursor:where(.svelte-v3lao1) {display:inline;}`};function Is(t,e){Si(e,!0),os(t,zs);let r=mi(e,"visible",7,!1),n=mi(e,"toolId",7,"graph"),i=F(void 0),l=F(void 0),o=F(void 0),a=F("selector"),u=F(Jt([])),c=F(Jt([])),h=F(1),p=F(1),v=F(null),g=F(null),y=F(null),k=F(null);const m=5,b=5,B=100/m,I=B/b,N={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};let J=F(0),G=F(0),Z=Yt(()=>{if(f(G)<=0||f(J)<=0)return 100;const d=f(G)/100,w=f(J)/d;return Math.max(100,w)}),Q=Yt(()=>{const d=f(k)??{x:f(Z)/2,y:50};return{x:Pn(d.x,f(Z)),y:Pn(d.y,100)}}),rt=F(null);const D=Yt(()=>Pl(f(rt))),Ir=Yt(()=>[{name:"selector",label:f(D).t("tools.graph.modeSelector"),title:f(D).t("tools.graph.modeSelectorHint")},{name:"point",label:f(D).t("tools.graph.modePoint"),title:f(D).t("tools.graph.modePointHint")},{name:"line",label:f(D).t("tools.graph.modeLine"),title:f(D).t("tools.graph.modeLineHint")},{name:"delete",label:f(D).t("tools.graph.modeDelete"),title:f(D).t("tools.graph.modeDeleteHint")}]);ii(()=>{if(f(l))return Nl(f(l),d=>{S(rt,d,!0)})});function Tr(){return So(h)}function ir(d){if(d!==null)return f(u).find(w=>w.id===d)}function Pn(d,w){const z=Math.floor(w/I);return Math.max(0,Math.min(z,Math.round(d/I)))*I}function zn(d){if(!f(o))return null;const w=f(o).createSVGPoint();w.x=d.clientX,w.y=d.clientY;const z=f(o).getScreenCTM();if(!z)return null;try{const T=w.matrixTransform(z.inverse());return T.y=Math.max(0,Math.min(100,T.y)),T.x=Math.max(0,Math.min(f(Z),T.x)),{x:T.x,y:T.y}}catch(T){return console.error("Error transforming point:",T),null}}function In(d,w=5){const z=w*w;let T=null,mt=1/0;for(const Wt of f(u)){const or=Wt.x-d.x,be=Wt.y-d.y,jt=or*or+be*be;jt<mt&&jt<z&&(mt=jt,T=Wt)}return T}function _l(d){return d===f(v)||d===f(g)}function Tn(d){S(u,f(u).filter(w=>w.id!==d),!0),S(c,f(c).filter(w=>w.p1Id!==d&&w.p2Id!==d),!0)}function Rn(d,w){d!==w&&(f(c).some(z=>z.p1Id===d&&z.p2Id===w||z.p1Id===w&&z.p2Id===d)||S(c,[...f(c),{id:Tr(),p1Id:d,p2Id:w}],!0))}function bl(d){if(f(a)==="delete"){Tn(d);return}if(f(a)==="line"){if(f(v)===null){S(v,d,!0);return}Rn(f(v),d),S(v,null),S(y,null)}}let lr=Yt(()=>{const d={majorVertical:[],majorHorizontal:[],minorVertical:[],minorHorizontal:[]},w=f(Z);for(let T=0;T<=m;T++){const mt=T*B;if(d.majorHorizontal.push(mt),T<m)for(let Wt=1;Wt<b;Wt++)d.minorHorizontal.push(mt+Wt*I)}let z=0;for(;z<=w;){if(d.majorVertical.push(z),z<w)for(let T=1;T<b;T++){const mt=z+T*I;if(mt<=w)d.minorVertical.push(mt);else break}z+=B}return d});function $l(d){S(a,d,!0),S(v,null),S(g,null),S(y,null)}function kl(d){const w=zn(d);w&&Dn(w)}function xl(d){if(d.target!==d.currentTarget)return;const w=N[d.key];w?(d.preventDefault(),S(k,{x:f(Q).x+w[0]*I,y:f(Q).y+w[1]*I},!0),f(v)!==null&&S(y,f(Q),!0)):(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Dn(f(Q)))}function Dn(d){const w=In(d,I);switch(f(a)){case"point":S(u,[...f(u),{id:Tr(),x:d.x,y:d.y}],!0);break;case"line":const z=w??{id:Tr(),x:d.x,y:d.y};w||S(u,[...f(u),z],!0),f(v)===null?S(v,z.id,!0):(Rn(f(v),z.id),S(v,null),S(y,null));break;case"delete":const T=In(d,2);T&&Tn(T.id);break;case"selector":S(v,null),S(y,null)}}function Ml(d,w){f(a)==="selector"&&(S(g,d,!0),w.target.setPointerCapture(w.pointerId))}function Sl(d){const w=zn(d);if(w&&(S(y,w,!0),f(g)!==null&&f(a)==="selector")){const z=ir(f(g));z&&(z.x=w.x,z.y=w.y)}}function Hn(d){f(g)!==null&&(d.target?.hasPointerCapture(d.pointerId)&&d.target.releasePointerCapture(d.pointerId),S(g,null)),(f(a)!=="line"||f(v)===null)&&S(y,null)}let Pe=null;ii(()=>{if(f(i))return Pe||(Pe=new ResizeObserver(d=>{const{width:w,height:z}=d[0].contentRect;(Math.abs(f(J)-w)>.1||Math.abs(f(G)-z)>.1)&&(S(J,w,!0),S(G,z,!0))})),Pe.observe(f(i)),()=>{Pe&&Pe.disconnect()}});var El={get visible(){return r()},set visible(d=!1){r(d),Je()},get toolId(){return n()},set toolId(d="graph"){n(d),Je()}},Fn=Kr(),Wl=Br(Fn),jl=d=>{var w=Ps(),z=Bt(w),T=Bt(z);le(T,21,()=>f(Ir),P=>P.name,(P,W)=>{var x=Es();let ot;var K=Bt(x),wt=Bt(K),Dt=ft=>{X(ft,ks())},ze=ft=>{X(ft,xs())},re=ft=>{X(ft,Ms())},Cl=ft=>{X(ft,Ss())};Te(wt,ft=>{f(W).name==="selector"?ft(Dt):f(W).name==="point"?ft(ze,1):f(W).name==="line"?ft(re,2):f(W).name==="delete"&&ft(Cl,3)}),ct(K);var Ol=ni(yt(K,2),!0);ct(x),Ht(()=>{ot=pi(x,1,"pie-tool-graph__tool-button svelte-v3lao1",null,ot,{"pie-tool-graph__tool-button--active":f(a)===f(W).name}),A(x,"title",f(W).title),A(x,"aria-label",f(W).title),A(x,"aria-pressed",f(a)===f(W).name),fi(Ol,f(W).label)}),ne("click",x,()=>$l(f(W).name)),X(P,x)}),ct(T);var mt=yt(T,2),Wt=Bt(mt),or=ni(Wt,!0),be=yt(Wt,2);vs(be),ct(mt),ct(z);var jt=yt(z,2),ee=Bt(jt),sr=Bt(ee),Bn=Bt(sr);le(Bn,17,()=>f(lr).minorHorizontal,vr,(P,W)=>{var x=Ws();Ht(()=>{A(x,"y1",f(W)),A(x,"x2",f(Z)),A(x,"y2",f(W))}),X(P,x)});var qn=yt(Bn);le(qn,17,()=>f(lr).majorHorizontal,vr,(P,W)=>{var x=js();Ht(()=>{A(x,"y1",f(W)),A(x,"x2",f(Z)),A(x,"y2",f(W))}),X(P,x)});var Vn=yt(qn);le(Vn,17,()=>f(lr).minorVertical,vr,(P,W)=>{var x=As();Ht(()=>{A(x,"x1",f(W)),A(x,"x2",f(W))}),X(P,x)}),le(yt(Vn),17,()=>f(lr).majorVertical,vr,(P,W)=>{var x=Cs();Ht(()=>{A(x,"x1",f(W)),A(x,"x2",f(W))}),X(P,x)}),ct(sr);var Rr=yt(sr);le(Rr,21,()=>f(c),P=>P.id,(P,W)=>{const x=Yt(()=>ir(f(W).p1Id)),ot=Yt(()=>ir(f(W).p2Id));var K=Kr(),wt=Br(K),Dt=ze=>{var re=Os();Ht(()=>{A(re,"x1",f(x).x),A(re,"y1",f(x).y),A(re,"x2",f(ot).x),A(re,"y2",f(ot).y)}),X(ze,re)};Te(wt,ze=>{f(x)&&f(ot)&&ze(Dt)}),X(P,K)}),ct(Rr);var Dr=yt(Rr);le(Dr,21,()=>f(u),P=>P.id,(P,W)=>{var x=Ls();let ot;Ht((K,wt)=>{A(x,"cx",f(W).x),A(x,"cy",f(W).y),ot=pi(x,0,"pie-tool-graph__user-point svelte-v3lao1",null,ot,{"pie-tool-graph__user-point--highlight":K}),A(x,"data-id",f(W).id),A(x,"aria-label",wt)},[()=>_l(f(W).id),()=>f(D).t("tools.graph.pointA11y",{id:f(W).id})]),ne("pointerdown",x,K=>{K.stopPropagation(),Ml(f(W).id,K)}),ne("keydown",x,K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),bl(f(W).id))}),X(P,x)}),ct(Dr);var Kn=yt(Dr),Al=P=>{const W=Yt(()=>ir(f(v)));var x=Kr(),ot=Br(x),K=wt=>{var Dt=Ns();Ht(()=>{A(Dt,"x1",f(W).x),A(Dt,"y1",f(W).y),A(Dt,"x2",f(y).x),A(Dt,"y2",f(y).y)}),X(wt,Dt)};Te(ot,wt=>{f(W)&&wt(K)}),X(P,x)};Te(Kn,P=>{f(v)&&f(y)&&P(Al)});var Un=yt(Kn);ct(ee),en(ee,P=>S(o,P),()=>f(o)),ct(jt),en(jt,P=>S(i,P),()=>f(i)),ct(w),en(w,P=>S(l,P),()=>f(l)),Ht((P,W,x,ot,K,wt)=>{A(w,"lang",P),A(w,"dir",W),A(w,"aria-label",x),A(w,"data-pie-tool-id",n()),fi(or,ot),A(be,"aria-label",K),A(jt,"aria-label",wt),A(ee,"viewBox",`0 0 ${f(Z)??""} 100`),us(sr,`opacity: ${f(p)??""}`),A(Un,"cx",f(Q).x),A(Un,"cy",f(Q).y),w.dir=w.dir},[()=>f(D).getLocale(),()=>f(D).getDirection?.()??"ltr",()=>f(D).t("tools.graph.toolA11y"),()=>f(D).t("tools.graph.grid"),()=>f(D).t("tools.graph.gridOpacityA11y"),()=>f(D).t("tools.graph.canvasA11y")]),gs(be,()=>f(p),P=>S(p,P)),ne("click",jt,kl),ne("keydown",jt,xl),ne("pointermove",ee,Sl),ne("pointerup",ee,Hn),Do("pointerleave",ee,Hn),X(d,w)};return Te(Wl,d=>{r()&&d(jl)}),X(t,Fn),Ei(El)}Ho(["click","keydown","pointermove","pointerup","pointerdown"]);Ts("pie-tool-graph",$s(Is,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},Ll));function Ts(t,e){customElements.get(t)||customElements.define(t,e)}export{Is as default};