UNPKG

@luigi-project/container

Version:

Javascript library enabling creation of microfrontends

1 lines 85.9 kB
"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");let e=!1;e=!0;const t={},n=Symbol(),r=Symbol("filename"),i="http://www.w3.org/1999/xhtml",s=globalThis.process?.env?.NODE_ENV;var o=s&&!s.toLowerCase().startsWith("prod"),a=Array.isArray,l=Array.prototype.indexOf,c=Array.prototype.includes,u=Array.from,d=Object.keys,f=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyDescriptors,_=Object.prototype,v=Array.prototype,m=Object.getPrototypeOf,g=Object.isExtensible;const E=()=>{};function w(e){return e()}function T(e){for(var t=0;t<e.length;t++)e[t]()}function S(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const y=16,b=32,C=64,R=512,A=1024,O=2048,I=4096,$=8192,U=16384,k=32768,N=1<<25,L=65536,D=1<<17,P=1<<19,x=65536,M=1<<21,Q=1<<22,H=1<<23,W=Symbol("$state"),j=Symbol("legacy props"),G=Symbol(""),B=Symbol("proxy path"),V=Symbol("attributes"),q=Symbol("class"),F=Symbol("style"),K=Symbol("text"),z=Symbol("hmr anchor"),X=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},J=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Z(e){if(o){const t=new Error(`lifecycle_outside_component\n\`${e}(...)\` can only be used during component initialisation\nhttps://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Y="font-weight: bold",ee="font-weight: normal";function te(e){o?console.warn(`%c[svelte] hydration_mismatch\n%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}\nhttps://svelte.dev/e/hydration_mismatch`,Y,ee):console.warn("https://svelte.dev/e/hydration_mismatch")}function ne(e){o?console.warn(`%c[svelte] state_proxy_equality_mismatch\n%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results\nhttps://svelte.dev/e/state_proxy_equality_mismatch`,Y,ee):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}let re,ie=!1;function se(e){ie=e}function oe(e){if(null===e)throw te(),t;return re=e}function ae(){return oe(qt(re))}function le(e=!0){for(var t=0,n=re;;){if(8===n.nodeType){var r=n.data;if("]"===r){if(0===t)return n;t-=1}else("["===r||"[!"===r||"["===r[0]&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=qt(n);e&&n.remove(),n=i}}function ce(e){return e===this.v}function ue(e){return t=e,n=this.v,!(t!=t?n==n:t!==n||null!==t&&"object"==typeof t||"function"==typeof t);var t,n}function de(e,t){return e.label=t,fe(e.v,t),e}function fe(e,t){return e?.[B]?.(t),e}function he(e){const t=new Error,n=function(){const e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=(new Error).stack;if(Error.stackTraceLimit=e,!t)return[];const n=t.split("\n"),r=[];for(let e=0;e<n.length;e++){const t=n[e],i=t.replaceAll("\\","/");if("Error"!==t.trim()){if(t.includes("validate_each_keys"))return[];i.includes("svelte/src/internal")||i.includes("node_modules/.vite")||r.push(t)}}return r}();return 0===n.length?null:(n.unshift("\n"),f(t,"stack",{value:n.join("\n")}),f(t,"name",{value:e}),t)}function pe(e,t){if(!o)throw new Error("invariant(...) was not guarded by if (DEV)");e||function(e){if(o){const t=new Error(`invariant_violation\nAn invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${e}"\nhttps://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/invariant_violation")}(t)}let _e=null;function ve(e){_e=e}let me=null;function ge(e){me=e}let Ee=null;function we(e){Ee=e}function Te(t,n=!1,r){_e={p:_e,i:!1,c:null,e:null,s:t,x:null,r:Cn,l:e&&!n?{s:null,u:null,$:[]}:null},o&&(_e.function=r,Ee=r)}function Se(e){var t=_e,n=t.e;if(null!==n)for(var r of(t.e=null,n))nn(r);return void 0!==e&&(t.x=e),t.i=!0,_e=t.p,o&&(Ee=_e?.function??null),e??{}}function ye(){return!e||null!==_e&&null===_e.l}let be=[];function Ce(){var e=be;be=[],T(e)}function Re(e){if(0===be.length&&!Be){var t=be;queueMicrotask(()=>{t===be&&Ce()})}be.push(e)}function Ae(){for(;be.length>0;)Ce()}const Oe=new WeakMap;function Ie(e){var t=Cn;if(null===t)return Sn.f|=H,e;if(o&&e instanceof Error&&!Oe.has(e)&&Oe.set(e,function(e,t){const n=h(e,"message");if(n&&!n.configurable)return;var i=Ht?" ":"\t",s=`\n${i}in ${t.fn?.name||"<unknown>"}`,o=t.ctx;for(;null!==o;)s+=`\n${i}in ${o.function?.[r].split("/").pop()}`,o=o.p;return{message:e.message+`\n${s}\n`,stack:e.stack?.split("\n").filter(e=>!e.includes("svelte/src/internal")).join("\n")}}(e,t)),0===(t.f&k)&&!(4&t.f))throw o&&!t.parent&&e instanceof Error&&Ue(e),e;$e(e,t)}function $e(e,t){for(;null!==t;){if(128&t.f){if(0===(t.f&k))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw o&&e instanceof Error&&Ue(e),e}function Ue(e){const t=Oe.get(e);t&&(f(e,"message",{value:t.message}),f(e,"stack",{value:t.stack}))}const ke=-7169;function Ne(e,t){e.f=e.f&ke|t}function Le(e){0!==(e.f&R)||null===e.deps?Ne(e,A):Ne(e,I)}function De(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&x)&&(t.f^=x,De(t.deps))}function Pe(e,t,n){0!==(e.f&O)?t.add(e):0!==(e.f&I)&&n.add(e),De(e.deps),Ne(e,A)}let xe=!1;let Me=null,Qe=null,He=null,We=null,je=null,Ge=null,Be=!1,Ve=!1,qe=null,Fe=null;var Ke=0,ze=new Set;let Xe=1;class Je{id=Xe++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#r=new Set;#i=new Set;#s=new Set;#o=0;#a=new Map;#l=null;#c=[];#u=[];#d=new Set;#f=new Set;#h=new Map;#p=new Set;is_fork=!1;#_=!1;#v(){if(this.is_fork)return!0;for(const n of this.#a.keys()){for(var e=n,t=!1;null!==e.parent;){if(this.#h.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#h.has(e)||this.#h.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#h.get(e);if(n){for(var r of(this.#h.delete(e),n.d))Ne(r,O),t(r);for(r of n.m)Ne(r,I),t(r)}this.#p.add(e)}#m(){if(this.#e=!0,Ke++>1e3&&(this.#g(),function(){if(o){var e=new Map;for(const n of He.current.keys())for(const[r,i]of n.updated??[]){var t=e.get(r);t||(t={error:i.error,count:0},e.set(r,t)),t.count+=i.count}for(const t of e.values())t.error&&console.error(t.error)}try{!function(){if(o){const e=new Error("effect_update_depth_exceeded\nMaximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state\nhttps://svelte.dev/e/effect_update_depth_exceeded");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){o&&f(e,"stack",{value:""}),$e(e,Ge)}}()),o)for(const e of this.current.keys())ze.add(e);if(!this.#v()){for(const e of this.#d)this.#f.delete(e),Ne(e,O),this.schedule(e);for(const e of this.#f)Ne(e,I),this.schedule(e)}const e=this.#c;this.#c=[],this.apply();var t=qe=[],n=[],r=Fe=[];for(const r of e)try{this.#E(r,t,n)}catch(e){throw st(r),e}if(He=null,r.length>0){var i=Je.ensure();for(const e of r)i.schedule(e)}if(qe=null,Fe=null,this.#v()){this.#w(n),this.#w(t);for(const[e,t]of this.#h)it(e,t);return void(r.length>0&&He.#m())}const s=this.#T();if(s)s.#S(this);else{this.#d.clear(),this.#f.clear();for(const e of this.#r)e(this);this.#r.clear(),We=this,et(n),et(t),We=null,this.#l?.resolve();var a=He;if(this.linked&&0===this.#o&&this.#g(),this.#c.length>0){null===a&&(a=this,this.#y());const e=a;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}null!==a&&a.#m()}}#E(e,t,n){e.f^=A;for(var r=e.first;null!==r;){var i=r.f,s=!!(96&i);if(!(s&&0!==(i&A)||0!==(i&$)||this.#h.has(r))&&null!==r.fn){s?r.f^=A:4&i?t.push(r):Pn(r)&&(0!==(i&y)&&this.#f.add(r),Wn(r));var o=r.first;if(null!==o){r=o;continue}}for(;null!==r;){var a=r.next;if(null!==a){r=a;break}r=r.parent}}}#T(){for(var e=this.#t;null!==e;){if(!e.is_fork)for(const[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e;e=e.#t}return null}#S(e){for(const[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(const[t,n]of e.async_deriveds){const e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}const t=e=>{var n=e.reactions;if(null!==n)for(const e of n){var r=e.f;if(2&r)t(e);else{var i=e;4194320&r&&!this.async_deriveds.has(i)&&(this.#f.delete(i),Ne(i,O),this.schedule(i))}}};for(const e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#g(),He=this,this.#m()}#w(e){for(var t=0;t<e.length;t+=1)Pe(e[t],this.#d,this.#f)}capture(e,t,r=!1){e.v===n||this.previous.has(e)||this.previous.set(e,e.v),0===(e.f&H)&&(this.current.set(e,[t,r]),je?.set(e,t)),this.is_fork||(e.v=t)}activate(){He=this}deactivate(){He=null,je=null}flush(){try{o&&ze.clear(),Ve=!0,He=this,this.#m()}finally{if(Ke=0,Ge=null,qe=null,Fe=null,Ve=!1,He=null,je=null,St.clear(),o)for(const e of ze)e.updated=null}}discard(){for(const e of this.#i)e(this);this.#i.clear(),this.#s.clear(),this.#g()}register_created_effect(e){this.#u.push(e)}#b(){this.#g();for(let u=Me;null!==u;u=u.#n){var e=u.id<this.id,t=[];for(const[r,[i,s]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(!e||i===n)continue;u.current.set(r,[i,s])}t.push(r)}if(e)for(const[e,t]of this.async_deriveds){const n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve)}if(u.#e){var r=[...u.current.keys()].filter(e=>!this.current.has(e));if(0===r.length)e&&u.discard();else if(t.length>0){if(o&&pe(0===u.#c.length,"Batch has scheduled roots"),e)for(const e of this.#p)u.unskip_effect(e,e=>{4194320&e.f?u.schedule(e):u.#w([e])});u.activate();var i=new Set,s=new Map;for(var a of t)tt(a,r,i,s);s=new Map;var l=[...u.current.keys()].filter(e=>!this.current.has(e)||this.current.get(e)[0]!==e.v);if(l.length>0)for(const e of this.#u)155648&e.f||!nt(e,l,s)||(4194320&e.f?(Ne(e,O),u.schedule(e)):u.#d.add(e));if(u.#c.length>0){for(var c of(u.apply(),u.#c))u.#E(c,[],[]);u.#c=[]}u.deactivate()}}}}increment(e,t){if(this.#o+=1,e){let e=this.#a.get(t)??0;this.#a.set(t,e+1)}}decrement(e,t){if(this.#o-=1,e){let e=this.#a.get(t)??0;1===e?this.#a.delete(t):this.#a.set(t,e-1)}this.#_||(this.#_=!0,Re(()=>{this.#_=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(const t of e)this.#d.add(t);for(const e of t)this.#f.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}on_fork_commit(e){this.#s.add(e)}run_fork_commit_callbacks(){for(const e of this.#s)e(this);this.#s.clear()}settled(){return(this.#l??=S()).promise}static ensure(){if(null===He){const e=He=new Je;e.#y(),Ve||Be||Re(()=>{e.#e||e.flush()})}return He}apply(){je=null}schedule(e){if(Ge=e,e.b?.is_pending&&16777228&e.f&&0===(e.f&k))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===qe||t!==Cn||null!==Sn&&2&Sn.f))return;if(96&n){if(0===(n&A))return;t.f^=A}}this.#c.push(t)}}#y(){null===Qe?Me=Qe=this:(Qe.#n=this,this.#t=Qe),Qe=this}#g(){var e=this.#t,t=this.#n;null===e?Me=t:e.#n=t,null===t?Qe=e:t.#t=e,this.linked=!1}}function Ze(e){var t=Be;Be=!0;try{var n;for(e&&(null===He||He.is_fork||He.flush(),n=e());;){if(Ae(),null===He)return n;He.flush()}}finally{Be=t}}let Ye=null;function et(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&Pn(r)&&(Ye=new Set,Wn(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&fn(r),Ye?.size>0)){St.clear();for(const e of Ye){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)Ye.has(n)&&(Ye.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||Wn(n)}}Ye.clear()}}Ye=null}}function tt(e,t,n,r){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const i of e.reactions){const e=i.f;2&e?tt(i,t,n,r):4194320&e&&0===(e&O)&&nt(i,t,r)&&(Ne(i,O),rt(i))}}function nt(e,t,n){const r=n.get(e);if(void 0!==r)return r;if(null!==e.deps)for(const r of e.deps){if(c.call(t,r))return!0;if(2&r.f&&nt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function rt(e){He.schedule(e)}function it(e,t){if(0===(e.f&b)||0===(e.f&A)){0!==(e.f&O)?t.d.push(e):0!==(e.f&I)&&t.m.push(e),Ne(e,A);for(var n=e.first;null!==n;)it(n,t),n=n.next}}function st(e){Ne(e,A);for(var t=e.first;null!==t;)st(t),t=t.next}class ot{parent;is_pending=!1;transform_error;#C;#R=ie?re:null;#A;#O;#I;#$=null;#U=null;#k=null;#N=null;#L=0;#D=0;#P=!1;#d=new Set;#f=new Set;#x=null;#M=function(e){let t,n=0,r=Ct(0);return o&&de(r,"createSubscriber version"),()=>{Yt()&&(jn(r),sn(()=>(0===n&&(t=Vn(()=>e(()=>kt(r)))),n+=1,()=>{Re(()=>{n-=1,0===n&&(t?.(),t=void 0,kt(r))})})))}}(()=>(this.#x=Ct(this.#L),o&&de(this.#x,"$effect.pending()"),()=>{this.#x=null}));constructor(e,t,n,r){this.#C=e,this.#A=t,this.#O=e=>{var t=Cn;t.b=this,t.f|=128,n(e)},this.parent=Cn.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#I=an(()=>{if(ie){const e=this.#R;ae();const t="[!"===e.data;if(e.data.startsWith("[?")){const t=JSON.parse(e.data.slice(2));this.#Q(t)}else t?this.#H():this.#W()}else this.#j()},589824),ie&&(this.#C=re)}#W(){try{this.#$=ln(()=>this.#O(this.#C))}catch(e){this.error(e)}}#Q(e){const t=this.#A.failed;t&&(this.#k=ln(()=>{t(this.#C,()=>e,()=>()=>{})}))}#H(){const e=this.#A.pending;e&&(this.is_pending=!0,this.#U=ln(()=>e(this.#C)),Re(()=>{var e=this.#N=document.createDocumentFragment(),t=Bt();e.append(t),this.#$=this.#G(()=>ln(()=>this.#O(t))),0===this.#D&&(this.#C.before(e),this.#N=null,hn(this.#U,()=>{this.#U=null}),this.#B(He))}))}#j(){try{if(this.is_pending=this.has_pending_snippet(),this.#D=0,this.#L=0,this.#$=ln(()=>{this.#O(this.#C)}),this.#D>0){var e=this.#N=document.createDocumentFragment();mn(this.#$,e);const t=this.#A.pending;this.#U=ln(()=>t(this.#C))}else this.#B(He)}catch(e){this.error(e)}}#B(e){this.is_pending=!1,e.transfer_effects(this.#d,this.#f)}defer_effect(e){Pe(e,this.#d,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#A.pending}#G(e){var t=Cn,n=Sn,r=_e;Rn(this.#I),bn(this.#I),ve(this.#I.ctx);try{return Je.ensure(),e()}catch(e){return Ie(e),null}finally{Rn(t),bn(n),ve(r)}}#V(e,t){this.has_pending_snippet()?(this.#D+=e,0===this.#D&&(this.#B(t),this.#U&&hn(this.#U,()=>{this.#U=null}),this.#N&&(this.#C.before(this.#N),this.#N=null))):this.parent&&this.parent.#V(e,t)}update_pending_count(e,t){this.#V(e,t),this.#L+=e,this.#x&&!this.#P&&(this.#P=!0,Re(()=>{this.#P=!1,this.#x&&$t(this.#x,this.#L)}))}get_effect_pending(){return this.#M(),jn(this.#x)}error(e){if(!this.#A.onerror&&!this.#A.failed)throw e;He?.is_fork?(this.#$&&He.skip_effect(this.#$),this.#U&&He.skip_effect(this.#U),this.#k&&He.skip_effect(this.#k),He.on_fork_commit(()=>{this.#q(e)})):this.#q(e)}#q(e){this.#$&&(dn(this.#$),this.#$=null),this.#U&&(dn(this.#U),this.#U=null),this.#k&&(dn(this.#k),this.#k=null),ie&&(oe(this.#R),function(e=1){if(ie){for(var t=e,n=re;t--;)n=qt(n);re=n}}(),oe(le()));var t=this.#A.onerror;let n=this.#A.failed;var r=!1,i=!1;const s=()=>{r?o?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",Y,ee):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,i&&function(){if(o){const e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#k&&hn(this.#k,()=>{this.#k=null}),this.#G(()=>{this.#j()}))},a=e=>{try{i=!0,t?.(e,s),i=!1}catch(e){$e(e,this.#I&&this.#I.parent)}n&&(this.#k=this.#G(()=>{try{return ln(()=>{var t=Cn;t.b=this,t.f|=128,n(this.#C,()=>e,()=>s)})}catch(e){return $e(e,this.#I.parent),null}}))};Re(()=>{var t;try{t=this.transform_error(e)}catch(e){return void $e(e,this.#I&&this.#I.parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(a,e=>$e(e,this.#I&&this.#I.parent)):a(t)})}}function at(e,t,r,i){const s=ye()?ht:_t;var a=e.filter(e=>!e.settled);if(0!==r.length||0!==a.length){var l=Cn,c=function(){var e=Cn,t=Sn,n=_e,r=He;if(o)var i=me;return function(s=!0){Rn(e),bn(t),ve(n),s&&0===(e.f&U)&&(r?.activate(),r?.apply()),o&&(dt(null),ge(i))}}(),u=1===a.length?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null,d=ct();0!==r.length?u?u.then(()=>{c(),h(),lt()}):h():u.then(()=>f(t.map(s))).finally(d)}else i(t.map(s));function f(e){if(0===(l.f&U)){c();try{i(e)}catch(e){$e(e,l)}lt()}}function h(){Promise.all(r.map(e=>function(e,t,r){let i=Cn;null===i&&function(){if(o){const e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/async_derived_orphan")}();var s=void 0,a=Ct(n);o&&(a.label=t??e.toString());var l=!Sn,c=new Set;(function(e){Zt(4718592,e)})(()=>{var t=Cn;o&&(ut={effect:t,effect_deps:new Set,warned:!1});var n=S();s=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==X&&n.reject(e)}).finally(lt)}catch(e){n.reject(e),lt()}if(o){if(ut){if(null!==t.deps)for(let e=0;e<In;e+=1)ut.effect_deps.add(t.deps[e]);if(null!==On)for(let e=0;e<On.length;e+=1)ut.effect_deps.add(On[e])}ut=null}var u=He;if(l){if(0!==(t.f&k))var d=ct();if(i.b.is_rendered())u.async_deriveds.get(t)?.reject(pt);else for(const e of c.values())e.reject(pt);c.add(n),u.async_deriveds.set(t,n)}const f=(e,i=void 0)=>{o&&(ut=null),d?.(),c.delete(n),i!==pt&&(u.activate(),i?(a.f|=H,$t(a,i)):(0!==(a.f&H)&&(a.f^=H),$t(a,e),o&&void 0!==r&&(ft.add(a),setTimeout(()=>{ft.has(a)&&0===(t.f&U)&&(!function(e,t){o?console.warn(`%c[svelte] await_waterfall\n%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app\nhttps://svelte.dev/e/await_waterfall`,Y,ee):console.warn("https://svelte.dev/e/await_waterfall")}(a.label,r),ft.delete(a))}))),u.deactivate())};n.promise.then(f,e=>f(null,e||"unknown"))}),en(()=>{for(const e of c)e.reject(pt)}),o&&(a.f|=Q);return new Promise(e=>{function t(n){function r(){n===s?e(a):t(s)}n.then(r,r)}t(s)})}(e))).then(e=>f([...t.map(s),...e])).catch(e=>$e(e,l)).finally(d)}}function lt(e=!0){Rn(null),bn(null),ve(null),e&&He?.deactivate(),o&&(dt(null),ge(null))}function ct(){var e=Cn,t=e.b,n=He,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}let ut=null;function dt(e){ut=e}const ft=new Set;function ht(e){null!==Cn&&(Cn.f|=P);const t={ctx:_e,deps:null,effects:null,equals:ce,f:2050,fn:e,reactions:null,rv:0,v:n,wv:0,parent:Cn,ac:null};return t}const pt=Symbol("obsolete");function _t(e){const t=ht(e);return t.equals=ue,t}function vt(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)dn(t[n])}}let mt=[];function gt(e){var t,n=Cn,r=e.parent;if(!wn&&null!==r&&24576&r.f)return o?console.warn("%c[svelte] derived_inert\n%cReading a derived belonging to a now-destroyed effect may result in stale values\nhttps://svelte.dev/e/derived_inert",Y,ee):console.warn("https://svelte.dev/e/derived_inert"),e.v;if(Rn(r),o){let r=Tt;yt(new Set);try{c.call(mt,e)&&function(){if(o){const e=new Error("derived_references_self\nA derived value cannot reference itself recursively\nhttps://svelte.dev/e/derived_references_self");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/derived_references_self")}(),mt.push(e),e.f&=-65537,vt(e),t=Mn(e)}finally{Rn(n),yt(r),mt.pop()}}else try{e.f&=-65537,vt(e),t=Mn(e)}finally{Rn(n)}return t}function Et(e){var t=gt(e);e.equals(t)||(e.wv=Dn(),He?.is_fork&&null!==e.deps||(null!==He?(He.capture(e,t,!0),We?.capture(e,t,!0)):e.v=t,null!==e.deps))?wn||(null!==je?(Yt()||He?.is_fork)&&je.set(e,t):Le(e)):Ne(e,A)}function wt(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&Wn(t)}let Tt=new Set;const St=new Map;function yt(e){Tt=e}let bt=!1;function Ct(e,t){var n={f:0,v:e,reactions:null,equals:ce,rv:0,wv:0};return n}function Rt(e,t){const n=Ct(e);var r;return r=n,null!==Sn&&(null===An?An=[r]:An.push(r)),n}function At(t,n=!1,r=!0){const i=Ct(t);return n||(i.equals=ue),e&&r&&null!==_e&&null!==_e.l&&(_e.l.s??=[]).push(i),i}function Ot(e,t){return It(e,Vn(()=>jn(e))),t}function It(e,t,n=!1){null===Sn||yn&&0===(Sn.f&D)||!ye()||!(4325394&Sn.f)||null!==An&&c.call(An,e)||function(){if(o){const e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/state_unsafe_mutation")}();let r=n?Dt(t):t;return o&&fe(r,e.label),$t(e,r,Fe)}function $t(e,t,n=null){if(!e.equals(t)){St.set(e,wn?t:e.v);var r=Je.ensure();if(r.capture(e,t),o){if(null!==Cn){e.updated??=new Map;const t=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:t}),t>5){const t=he("updated at");if(null!==t){let n=e.updated.get(t.stack);n||(n={error:t,count:0},e.updated.set(t.stack,n)),n.count++}}}null!==Cn&&(e.set_during_effect=!0)}if(2&e.f){const t=e;0!==(e.f&O)&&gt(t),null===je&&Le(t)}e.wv=Dn(),Nt(e,O,n),!ye()||null===Cn||0===(Cn.f&A)||96&Cn.f||(null===$n?function(e){$n=e}([e]):$n.push(e)),!r.is_fork&&Tt.size>0&&!bt&&Ut()}return t}function Ut(){bt=!1;for(const e of Tt){let t;0!==(e.f&A)&&Ne(e,I);try{t=Pn(e)}catch{t=!0}t&&Wn(e)}Tt.clear()}function kt(e){It(e,e.v+1)}function Nt(e,t,n){var r=e.reactions;if(null!==r)for(var i=ye(),s=r.length,o=0;o<s;o++){var a=r[o],l=a.f;if(i||a!==Cn){var c=0===(l&O);if(c&&Ne(a,t),0!==(l&D))Tt.add(a);else if(2&l){var u=a;je?.delete(u),0===(l&x)&&(l&R&&(null===Cn||0===(Cn.f&M))&&(a.f|=x),Nt(u,I,n))}else if(c){var d=a;0!==(l&y)&&null!==Ye&&Ye.add(d),null!==n?n.push(d):rt(d)}}}}const Lt=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Dt(e){if("object"!=typeof e||null===e||W in e)return e;const t=m(e);if(t!==_&&t!==v)return e;var r=new Map,i=a(e),s=Rt(0),l=Nn,c=e=>{if(Nn===l)return e();var t=Sn,n=Nn;bn(null),Ln(l);var r=e();return bn(t),Ln(n),r};i&&(r.set("length",Rt(e.length)),o&&(e=new Proxy(e,{get(e,t,n){var r=Reflect.get(e,t,n);return Mt.has(t)?function(...e){bt=!0;var t=r.apply(this,e);return Ut(),t}:r}})));var u="";let d=!1;function f(e){if(!d){d=!0,de(s,`${u=e} version`);for(const[e,t]of r)de(t,Pt(u,e));d=!1}}return new Proxy(e,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){if(o){const e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=r.get(t);return void 0===i?c(()=>{var e=Rt(n.value);return r.set(t,e),o&&"string"==typeof t&&de(e,Pt(u,t)),e}):It(i,n.value,!0),!0},deleteProperty(e,t){var i=r.get(t);if(void 0===i){if(t in e){const e=c(()=>Rt(n));r.set(t,e),kt(s),o&&de(e,Pt(u,t))}}else It(i,n),kt(s);return!0},get(t,i,s){if(i===W)return e;if(o&&i===B)return f;var a=r.get(i),l=i in t;if(void 0!==a||l&&!h(t,i)?.writable||(a=c(()=>{var e=Rt(Dt(l?t[i]:n));return o&&de(e,Pt(u,i)),e}),r.set(i,a)),void 0!==a){var d=jn(a);return d===n?void 0:d}return Reflect.get(t,i,s)},getOwnPropertyDescriptor(e,t){var i=Reflect.getOwnPropertyDescriptor(e,t);if(i&&"value"in i){var s=r.get(t);s&&(i.value=jn(s))}else if(void 0===i){var o=r.get(t),a=o?.v;if(void 0!==o&&a!==n)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return i},has(e,t){if(t===W)return!0;var i=r.get(t),s=void 0!==i&&i.v!==n||Reflect.has(e,t);if((void 0!==i||null!==Cn&&(!s||h(e,t)?.writable))&&(void 0===i&&(i=c(()=>{var r=Rt(s?Dt(e[t]):n);return o&&de(r,Pt(u,t)),r}),r.set(t,i)),jn(i)===n))return!1;return s},set(e,t,a,l){var d=r.get(t),f=t in e;if(i&&"length"===t)for(var p=a;p<d.v;p+=1){var _=r.get(p+"");void 0!==_?It(_,n):p in e&&(_=c(()=>Rt(n)),r.set(p+"",_),o&&de(_,Pt(u,p)))}void 0===d?f&&!h(e,t)?.writable||(d=c(()=>Rt(void 0)),o&&de(d,Pt(u,t)),It(d,Dt(a)),r.set(t,d)):(f=d.v!==n,It(d,c(()=>Dt(a))));var v=Reflect.getOwnPropertyDescriptor(e,t);if(v?.set&&v.set.call(l,a),!f){if(i&&"string"==typeof t){var m=r.get("length"),g=Number(t);Number.isInteger(g)&&g>=m.v&&It(m,g+1)}kt(s)}return!0},ownKeys(e){jn(s);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return void 0===t||t.v!==n});for(var[i,o]of r)o.v===n||i in e||t.push(i);return t},setPrototypeOf(){!function(){if(o){const e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function Pt(e,t){return"symbol"==typeof t?`${e}[Symbol(${t.description??""})]`:Lt.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function xt(e){try{if(null!==e&&"object"==typeof e&&W in e)return e[W]}catch{}return e}const Mt=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);var Qt,Ht,Wt,jt;function Gt(){if(void 0===Qt){Qt=window,Ht=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Wt=h(t,"firstChild").get,jt=h(t,"nextSibling").get,g(e)&&(e[q]=void 0,e[V]=null,e[F]=void 0,e.__e=void 0),g(n)&&(n[K]=void 0),o&&(e.__svelte_meta=null,function(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:n,lastIndexOf:r,includes:i}=e;e.indexOf=function(e,t){const r=n.call(this,e,t);if(-1===r)for(let n=t??0;n<this.length;n+=1)if(xt(this[n])===e){ne("array.indexOf(...)");break}return r},e.lastIndexOf=function(e,t){const n=r.call(this,e,t??this.length-1);if(-1===n)for(let n=0;n<=(t??this.length-1);n+=1)if(xt(this[n])===e){ne("array.lastIndexOf(...)");break}return n},e.includes=function(e,t){const n=i.call(this,e,t);if(!n)for(let t=0;t<this.length;t+=1)if(xt(this[t])===e){ne("array.includes(...)");break}return n},Array.__svelte_cleanup=()=>{e.indexOf=n,e.lastIndexOf=r,e.includes=i}}())}}function Bt(e=""){return document.createTextNode(e)}function Vt(e){return Wt.call(e)}function qt(e){return jt.call(e)}function Ft(e,t=!1){if(!ie){var n=Vt(e);return n instanceof Comment&&""===n.data?qt(n):n}if(t){if(3!==re?.nodeType){var r=Bt();return re?.before(r),oe(r),r}zt(re)}return re}function Kt(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??i,e,r)}function zt(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;null!==t&&3===t.nodeType;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Xt(e){var t=Sn,n=Cn;bn(null),Rn(null);try{return e()}finally{bn(t),Rn(n)}}function Jt(e){null===Cn&&(null===Sn&&function(e){if(o){const t=new Error(`effect_orphan\n\`${e}\` can only be used inside an effect (e.g. during component initialisation)\nhttps://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/effect_orphan")}(e),function(){if(o){const e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),wn&&function(e){if(o){const t=new Error(`effect_in_teardown\n\`${e}\` cannot be used inside an effect cleanup function\nhttps://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/effect_in_teardown")}(e)}function Zt(e,t){var n=Cn;if(o)for(;null!==n&&0!==(n.f&D);)n=n.parent;null!==n&&0!==(n.f&$)&&(e|=$);var r={ctx:_e,deps:null,nodes:null,f:e|O|R,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};o&&(r.component_function=Ee),He?.register_created_effect(r);var i=r;if(4&e)null!==qe?qe.push(r):Je.ensure().schedule(r);else if(null!==t){try{Wn(r)}catch(i){throw dn(r),i}null===i.deps&&null===i.teardown&&null===i.nodes&&i.first===i.last&&0===(i.f&P)&&(i=i.first,0!==(e&y)&&0!==(e&L)&&null!==i&&(i.f|=L))}if(null!==i&&(i.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(i,n),null!==Sn&&2&Sn.f&&0===(e&C))){var s=Sn;(s.effects??=[]).push(i)}return r}function Yt(){return null!==Sn&&!yn}function en(e){const t=Zt(8,null);return Ne(t,A),t.teardown=e,t}function tn(e){Jt("$effect"),o&&f(e,"name",{value:"$effect"});var t=Cn.f;if(!(!Sn&&0!==(t&b)&&0===(t&k)))return nn(e);var n=_e;(n.e??=[]).push(e)}function nn(e){return Zt(1048580,e)}function rn(e){return Zt(4,e)}function sn(e,t=0){return Zt(8|t,e)}function on(e,t=[],n=[],r=[]){at(r,t,n,t=>{Zt(8,()=>e(...t.map(jn)))})}function an(e,t=0){var n=Zt(y|t,e);return o&&(n.dev_stack=me),n}function ln(e){return Zt(524320,e)}function cn(e){var t=e.teardown;if(null!==t){const e=wn,n=Sn;Tn(!0),bn(null);try{t.call(null)}finally{Tn(e),bn(n)}}}function un(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Xt(()=>{e.abort(X)});var r=n.next;0!==(n.f&C)?n.parent=null:dn(n,t),n=r}}function dn(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(!function(e,t){for(;null!==e;){var n=e===t?null:qt(e);e.remove(),e=n}}(e.nodes.start,e.nodes.end),n=!0),Ne(e,N),un(e,t&&!n),Hn(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)e.stop();cn(e),e.f^=N,e.f|=U;var i=e.parent;null!==i&&null!==i.first&&fn(e),o&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function fn(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function hn(e,t,n=!0){var r=[];pn(e,r,!0);var i=()=>{n&&dn(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function pn(e,t,n){if(0===(e.f&$)){e.f^=$;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;null!==i;){var s=i.next;if(0===(i.f&C))pn(i,t,!!(0!==(i.f&L)||0!==(i.f&b)&&0!==(e.f&y))&&n);i=s}}}function _n(e){vn(e,!0)}function vn(e,t){if(0!==(e.f&$)){e.f^=$,0===(e.f&A)&&(Ne(e,O),Je.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;vn(n,!!(0!==(n.f&L)||0!==(n.f&b))&&t),n=r}var i=e.nodes&&e.nodes.t;if(null!==i)for(const e of i)(e.is_global||t)&&e.in()}}function mn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:qt(n);t.append(n),n=i}}let gn=null,En=!1,wn=!1;function Tn(e){wn=e}let Sn=null,yn=!1;function bn(e){Sn=e}let Cn=null;function Rn(e){Cn=e}let An=null;let On=null,In=0,$n=null;let Un=1,kn=0,Nn=kn;function Ln(e){Nn=e}function Dn(){return++Un}function Pn(e){var t=e.f;if(0!==(t&O))return!0;if(2&t&&(e.f&=-65537),0!==(t&I)){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Pn(s)&&Et(s),s.wv>e.wv)return!0}0!==(t&R)&&null===je&&Ne(e,A)}return!1}function xn(e,t,n=!0){var r=e.reactions;if(null!==r&&(null===An||!c.call(An,e)))for(var i=0;i<r.length;i++){var s=r[i];2&s.f?xn(s,t,!1):t===s&&(n?Ne(s,O):0!==(s.f&A)&&Ne(s,I),rt(s))}}function Mn(e){var t=On,n=In,r=$n,i=Sn,s=An,o=_e,a=yn,l=Nn,c=e.f;On=null,In=0,$n=null,Sn=96&c?null:e,An=null,ve(e.ctx),yn=!1,Nn=++kn,null!==e.ac&&(Xt(()=>{e.ac.abort(X)}),e.ac=null);try{e.f|=M;var u=(0,e.fn)();e.f|=k;var d=e.deps,f=He?.is_fork;if(null!==On){var h;if(f||Hn(e,In),null!==d&&In>0)for(d.length=In+On.length,h=0;h<On.length;h++)d[In+h]=On[h];else e.deps=d=On;if(Yt()&&0!==(e.f&R))for(h=In;h<d.length;h++)(d[h].reactions??=[]).push(e)}else!f&&null!==d&&In<d.length&&(Hn(e,In),d.length=In);if(ye()&&null!==$n&&!yn&&null!==d&&!(6146&e.f))for(h=0;h<$n.length;h++)xn($n[h],e);if(null!==i&&i!==e){if(kn++,null!==i.deps)for(let e=0;e<n;e+=1)i.deps[e].rv=kn;if(null!==t)for(const e of t)e.rv=kn;null!==$n&&(null===r?r=$n:r.push(...$n))}return 0!==(e.f&H)&&(e.f^=H),u}catch(e){return Ie(e)}finally{e.f^=M,On=t,In=n,$n=r,Sn=i,An=s,ve(o),yn=a,Nn=l}}function Qn(e,t){let r=t.reactions;if(null!==r){var i=l.call(r,e);if(-1!==i){var s=r.length-1;0===s?r=t.reactions=null:(r[i]=r[s],r.pop())}}if(null===r&&2&t.f&&(null===On||!c.call(On,t))){var o=t;0!==(o.f&R)&&(o.f^=R,o.f&=-65537),o.v!==n&&Le(o),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(X),t.teardown=E,t.ac=null,Hn(t,0),un(t))}(o),Hn(o,0)}}function Hn(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)Qn(e,n[r])}function Wn(e){var t=e.f;if(0===(t&U)){Ne(e,A);var n=Cn,r=En;if(Cn=e,En=!0,o){var i=Ee;we(e.component_function);var s=me;ge(e.dev_stack??me)}try{16777232&t?function(e){for(var t=e.first;null!==t;){var n=t.next;0===(t.f&b)&&dn(t),t=n}}(e):un(e),cn(e);var a=Mn(e);e.teardown="function"==typeof a?a:null,e.wv=Un}finally{En=r,Cn=n,o&&(we(i),ge(s))}}}function jn(e){var t,n=!!(2&e.f);if((gn?.add(e),null!==Sn&&!yn)&&!(null!==Cn&&0!==(Cn.f&U)||null!==An&&c.call(An,e))){var r=Sn.deps;if(0!==(Sn.f&M))e.rv<kn&&(e.rv=kn,null===On&&null!==r&&r[In]===e?In++:null===On?On=[e]:On.push(e));else{(Sn.deps??=[]).push(e);var i=e.reactions;null===i?e.reactions=[Sn]:c.call(i,Sn)||i.push(Sn)}}if(o){if(!yn&&ut&&!ut.warned&&0===(ut.effect.f&M)&&!ut.effect_deps.has(e)){ut.warned=!0,t=e.label,o?console.warn(`%c[svelte] await_reactivity_loss\n%cDetected reactivity loss when reading \`${t}\`. This happens when state is read in an async function after an earlier \`await\`\nhttps://svelte.dev/e/await_reactivity_loss`,Y,ee):console.warn("https://svelte.dev/e/await_reactivity_loss");var s=he("traced at");s&&console.warn(s)}ft.delete(e)}if(wn&&St.has(e))return St.get(e);if(n){var a=e;if(wn){var l=a.v;return(0===(a.f&A)&&null!==a.reactions||Bn(a))&&(l=gt(a)),St.set(a,l),l}var u=0===(a.f&R)&&!yn&&null!==Sn&&(En||0!==(Sn.f&R)),d=0===(a.f&k);Pn(a)&&(u&&(a.f|=R),Et(a)),u&&!d&&(wt(a),Gn(a))}if(je?.has(e))return je.get(e);if(0!==(e.f&H))throw e.v;return e.v}function Gn(e){if(e.f|=R,null!==e.deps)for(const t of e.deps)(t.reactions??=[]).push(e),2&t.f&&0===(t.f&R)&&(wt(t),Gn(t))}function Bn(e){if(e.v===n)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(St.has(t))return!0;if(2&t.f&&Bn(t))return!0}return!1}function Vn(e){var t=yn;try{return yn=!0,e()}finally{yn=t}}function qn(e){if("object"==typeof e&&e&&!(e instanceof EventTarget))if(W in e)Fn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];"object"==typeof n&&n&&W in n&&Fn(n)}}function Fn(e,t=new Set){if(!("object"!=typeof e||null===e||e instanceof EventTarget||t.has(e))){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Fn(e[n],t)}catch(e){}const n=m(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const t=p(n);for(let n in t){const r=t[n].get;if(r)try{r.call(e)}catch(e){}}}}}const Kn=Symbol("events"),zn=new Set,Xn=new Set;let Jn=null;function Zn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Jn=e;var o=0,a=Jn===e&&e[Kn];if(a){var l=i.indexOf(a);if(-1!==l&&(t===document||t===window))return void(e[Kn]=t);var c=i.indexOf(t);if(-1===c)return;l<=c&&(o=l)}if((s=i[o]||e.target)!==t){f(e,"currentTarget",{configurable:!0,get:()=>s||n});var u=Sn,d=Cn;bn(null),Rn(null);try{for(var h,p=[];null!==s;){var _=s.assignedSlot||s.parentNode||s.host||null;try{var v=s[Kn]?.[r];null==v||s.disabled&&e.target!==s||v.call(s,e)}catch(e){h?p.push(e):h=e}if(e.cancelBubble||_===t||null===_)break;s=_}if(h){for(let e of p)queueMicrotask(()=>{throw e});throw h}}finally{e[Kn]=t,delete e.currentTarget,bn(u),Rn(d)}}}const Yn=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function er(e){var t=Kt("template");return t.innerHTML=function(e){return Yn?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function tr(e,t){var n=Cn;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function nr(e,t){var n,r=!!(1&t),i=!!(2&t),s=!e.startsWith("<!>");return()=>{if(ie)return tr(re,null),re;void 0===n&&(n=er(s?e:"<!>"+e),r||(n=Vt(n)));var t=i||Ht?document.importNode(n,!0):n.cloneNode(!0);r?tr(Vt(t),t.lastChild):tr(t,t);return t}}function rr(e,t){if(ie){var n=Cn;return 0!==(n.f&k)&&null!==n.nodes.end||(n.nodes.end=re),void ae()}null!==e&&e.before(t)}const ir=["touchstart","touchmove"];function sr(e){return ir.includes(e)}function or(e,t){return cr(e,t)}function ar(e,n){Gt(),n.intro=n.intro??!1;const r=n.target,i=ie,s=re;try{for(var a=Vt(r);a&&(8!==a.nodeType||"["!==a.data);)a=qt(a);if(!a)throw t;se(!0),oe(a);const i=cr(e,{...n,anchor:a});return se(!1),i}catch(i){if(i instanceof Error&&i.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw i;return i!==t&&console.warn("Failed to hydrate: ",i),!1===n.recover&&function(){if(o){const e=new Error("hydration_failed\nFailed to hydrate the application\nhttps://svelte.dev/e/hydration_failed");throw e.name="Svelte error",e}throw new Error("https://svelte.dev/e/hydration_failed")}(),Gt(),r.textContent="",se(!1),or(e,n)}finally{se(i),oe(s)}}const lr=new Map;function cr(e,{target:n,anchor:r,props:i={},events:s,context:o,intro:a=!0,transformError:l}){Gt();var c=void 0,d=function(e){Je.ensure();const t=Zt(524352,e);return(e={})=>new Promise(n=>{e.outro?hn(t,()=>{dn(t),n(void 0)}):(dn(t),n(void 0))})}(()=>{var a=r??n.appendChild(Bt());!function(e,t,n,r){new ot(e,t,n,r)}(a,{pending:()=>{}},n=>{if(Te({}),o&&(_e.c=o),s&&(i.$$events=s),ie&&tr(n,null),c=e(n,i)||{},ie&&(Cn.nodes.end=re,null===re||8!==re.nodeType||"]"!==re.data))throw te(),t;Se()},l);var d=new Set,f=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!d.has(r)){d.add(r);var i=sr(r);for(const e of[n,document]){var s=lr.get(e);void 0===s&&(s=new Map,lr.set(e,s));var o=s.get(r);void 0===o?(e.addEventListener(r,Zn,{passive:i}),s.set(r,1)):s.set(r,o+1)}}}};return f(u(zn)),Xn.add(f),()=>{for(var e of d)for(const r of[n,document]){var t=lr.get(r),i=t.get(e);0==--i?(r.removeEventListener(e,Zn),t.delete(e),0===t.size&&lr.delete(r)):t.set(e,i)}Xn.delete(f),a!==r&&a.parentNode?.removeChild(a)}});return ur.set(c,d),c}let ur=new WeakMap;function dr(e,t){const n=ur.get(e);return n?(ur.delete(e),n(t)):(o&&(W in e?o?console.warn("%c[svelte] state_proxy_unmount\n%cTried to unmount a state proxy, rather than a component\nhttps://svelte.dev/e/state_proxy_unmount",Y,ee):console.warn("https://svelte.dev/e/state_proxy_unmount"):o?console.warn("%c[svelte] lifecycle_double_unmount\n%cTried to unmount a component that was not mounted\nhttps://svelte.dev/e/lifecycle_double_unmount",Y,ee):console.warn("https://svelte.dev/e/lifecycle_double_unmount")),Promise.resolve())}class fr{anchor;#F=new Map;#K=new Map;#z=new Map;#X=new Set;#J=!0;constructor(e,t=!0){this.anchor=e,this.#J=t}#b=e=>{if(this.#F.has(e)){var t=this.#F.get(e),n=this.#K.get(t);if(n)_n(n),this.#X.delete(t);else{var r=this.#z.get(t);r&&(this.#K.set(t,r.effect),this.#z.delete(t),o&&(r.fragment.lastChild[z]=this.anchor),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of this.#F){if(this.#F.delete(t),t===e)break;const r=this.#z.get(n);r&&(dn(r.effect),this.#z.delete(n))}for(const[e,r]of this.#K){if(e===t||this.#X.has(e))continue;const i=()=>{if(Array.from(this.#F.values()).includes(e)){var t=document.createDocumentFragment();mn(r,t),t.append(Bt()),this.#z.set(e,{effect:r,fragment:t})}else dn(r);this.#X.delete(e),this.#K.delete(e)};this.#J||!n?(this.#X.add(e),hn(r,i,!1)):i()}}};#Z=e=>{this.#F.delete(e);const t=Array.from(this.#F.values());for(const[e,n]of this.#z)t.includes(e)||(dn(n.effect),this.#z.delete(e))};ensure(e,t){var n=He;!t||this.#K.has(e)||this.#z.has(e)||this.#K.set(e,ln(()=>t(this.anchor)));this.#F.set(n,e),ie&&(this.anchor=re),this.#b(n)}}if(o){function si(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(void 0!==t)return t;!function(e){if(o){const t=new Error(`rune_outside_svelte\nThe \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files\nhttps://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/rune_outside_svelte")}(e)},set:e=>{t=e}})}}si("$state"),si("$effect"),si("$derived"),si("$inspect"),si("$props"),si("$bindable")}function hr(t){var n,r;null===_e&&Z("onMount"),e&&null!==_e.l?(n=_e,r=n.l,r.u??={a:[],b:[],m:[]}).m.push(t):tn(()=>{const e=Vn(t);if("function"==typeof e)return e})}var pr=new Map;function _r(e,n,r=!1){var i;ie&&(i=re,ae());var s=new fr(e);function o(e,n){if(ie){var r=function(e){if(!e||8!==e.nodeType)throw te(),t;return e.data}(i);if(e!==parseInt(r.substring(1))){var o=le();return oe(o),s.anchor=o,se(!1),s.ensure(e,n),void se(!0)}}s.ensure(e,n)}an(()=>{var e=!1;n((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},r?L:0)}function vr(e,t){rn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const e=Kt("style");e.id=t.hash,e.textContent=t.code,r.appendChild(e),o&&function(e,t){var n=pr.get(e);n||(n=new Set,pr.set(e,n)),n.add(t)}(t.hash,e)}})}function mr(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=mr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gr(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=mr(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}const Er=[..." \t\n\r\f \v\ufeff"];function wr(e,t,n,r,i,s){var o=e[q];if(ie||o!==n||void 0===o){var a=function(e,t,n){var r=null==e?"":""+e;if(t&&(r=r?r+" "+t:t),n)for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;0!==o&&!Er.includes(r[o-1])||a!==r.length&&!Er.includes(r[a])?o=a:r=(0===o?"":r.substring(0,o))+r.substring(a+1)}return""===r?null:r}(n,r,s);ie&&a===e.getAttribute("class")||(null==a?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[q]=n}else if(s&&i!==s)for(var l in s){var c=!!s[l];null!=i&&c===!!i[l]||e.classList.toggle(l,c)}return s}const Tr=Symbol("is custom element"),Sr=Symbol("is html"),yr=J?"link":"LINK";function br(e,t,n,r){var s=function(e){return e[V]??={[Tr]:e.nodeName.includes("-"),[Sr]:e.namespaceURI===i}}(e);ie&&(s[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===yr)?r||function(e,t,n){if(!o)return;if("srcset"===t&&function(e,t){var n=Ar(e.srcset),r=Ar(t);return r.length===n.length&&r.every(([e,t],r)=>t===n[r][1]&&(Rr(n[r][0],e)||Rr(e,n[r][0])))}(e,n))return;if(Rr(e.getAttribute(t)??"",n))return;!function(e,t,n){o?console.warn(`%c[svelte] hydration_attribute_changed\n%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${n}\`, will be ignored in favour of the server value\nhttps://svelte.dev/e/hydration_attribute_changed`,Y,ee):console.warn("https://svelte.dev/e/hydration_attribute_changed")}(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(n))}(e,t,n??""):s[t]!==(s[t]=n)&&("loading"===t&&(e[G]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&function(e){var t,n=e.getAttribute("is")||e.nodeName,r=Cr.get(n);if(r)return r;Cr.set(n,r=[]);var i=e,s=Element.prototype;for(;s!==i;){for(var o in t=p(i))t[o].set&&"innerHTML"!==o&&"textContent"!==o&&"innerText"!==o&&r.push(o);i=m(i)}return r}(e).includes(t)?e[t]=n:e.setAttribute(t,n))}var Cr=new Map;function Rr(e,t){return e===t||new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Ar(e){return e.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Or(e,t,n){var r=h(e,t);r&&r.set&&(e[t]=n,en(()=>{e[t]=null}))}function Ir(e,t){return e===t||e?.[W]===t}function $r(e={},t,n,r){var i=_e.r,s=Cn;return rn(()=>{var o,a;return sn(()=>{o=a,a=r?.()||[],Vn(()=>{Ir(n(...a),e)||(t(e,...a),o&&Ir(n(...o),e)&&t(null,...o))})}),()=>{let r=s;for(;r!==i&&null!==r.parent&&r.parent.f&N;)r=r.parent;const o=r.teardown;r.teardown=()=>{a&&Ir(n(...a),e)&&t(null,...a),o?.()}}}),e}function Ur(e=!1){const t=_e,n=t.l.u;if(!n)return;let r=()=>qn(t.s);if(e){let e=0,n={};const i=ht(()=>{let r=!1;const i=t.s;for(const e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>jn(i)}var i;n.b.length&&(i=()=>{kr(t,r),T(n.b)},Jt("$effect.pre"),o&&f(i,"name",{value:"$effect.pre"}),Zt(1048584,i)),tn(()=>{const e=Vn(()=>n.m.map(w));return()=>{for(const t of e)"function"==typeof t&&t()}}),n.a.length&&tn(()=>{kr(t,r),T(n.a)})}function kr(e,t){if(e.l.s)for(const t of e.l.s)jn(t);t()}function Nr(t,n,r,i){var s=!e||!!(2&r),a=!!(8&r),l=!!(16&r),c=i,u=!0,d=void 0,f=()=>l&&s?(d??=ht(i),jn(d)):(u&&(u=!1,c=l?Vn(i):i),c);let p;if(a){var _=W in t||j in t;p=h(t,n)?.set??(_&&n in t?e=>t[n]=e:void 0)}var v,m,g=!1;if(a?[v,g]=function(e){var t=xe;try{return xe=!1,[e(),xe]}finally{xe=t}}(()=>t[n]):v=t[n],void 0===v&&void 0!==i&&(v=f(),p&&(s&&function(e){if(o){const t=new Error(`props_invalid_value\nCannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value\nhttps://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/props_invalid_value")}(n),p(v))),m=s?()=>{var e=t[n];return void 0===e?f():(u=!0,e)}:()=>{var e=t[n];return void 0!==e&&(c=void 0),void 0===e?c:e},s&&!(4&r))return m;if(p){var E=t.$$legacy;return function(e,t){return arguments.length>0?(s&&t&&!E&&!g||p(t?m():e),e):m()}}var w=!1,T=(1&r?ht:_t)(()=>(w=!1,m()));o&&(T.label=n),a&&jn(T);var S=Cn;return function(e,t){if(arguments.length>0){const n=t?jn(T):s&&a?Dt(e):e;return It(T,n),w=!0,void 0!==c&&(c=n),e}return wn&&w||0!==(S.f&U)?T.v:jn(T)}}class Lr{#Y;#ee;constructor(e){var t=new Map,n=(e,n)=>{var r=At(n,!1,!1);return t.set(e,r),r};const r=new Proxy({...e.props||{},$$events:{}},{get:(e,r)=>jn(t.get(r)??n(r,Reflect.get(e,r))),has:(e,r)=>r===j||(jn(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r)),set:(e,r,i)=>(It(t.get(r)??n(r,i),i),Reflect.set(e,r,i))});this.#ee=(e.hydrate?ar:or)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),e?.props?.$$host&&!1!==e.sync||Ze(),this.#Y=r.$$events;for(const e of Object.keys(this.#ee))"$set"!==e&&"$destroy"!==e&&"$on"!==e&&f(this,e,{get(){return this.#ee[e]},set(t){this.#ee[e]=t},enumerable:!0});this.#ee.$set=e=>{Object.assign(r,e)},this.#ee.$destroy=()=>{dr(this.#ee)}}$set(e){this.#ee.$set(e)}$on(e,t){this.#Y[e]=this.#Y[e]||[];const n=(...e)=>t.call(this,...e);return this.#Y[e].push(n),()=>{this.#Y[e]=this.#Y[e].filter(e=>e!==n)}}$destroy(){this.#ee.$destroy()}}let Dr;function Pr(e,t,n,r){const i=n[e]?.type;if(t="Boolean"===i&&"boolean"!=typeof t?null!=t:t,!r||!n[e])return t;if("toAttribute"===r)switch(i){case"Object":case"Array":return null==t?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return null==t?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return null!=t?+t:t}}function xr(e,t,n,r,i,s){let o=class extends Dr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return d(t).map(e=>(t[e].attribute||e).toLowerCase())}};return d(t).forEach(e=>{f(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Pr(e,n,t),this.$$d[e]=n;var r=this.$$c;if(r){var i=h(r,e)?.get;i?r[e]=n:r.$set({[e]:n})}}})}),r.forEach(e=>{f(o.prototype,e,{get(){return this.$$c?.[e]}})}),s&&(o=s(o)),e.element=o,o}var Mr;"function"==typeof HTMLElement&&(Dr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function t(e){return t=>{const n=Kt("slot");"default"!==e&&(n.name=e),rr(t,n)}}const n={},r=function(e){const t={};return e.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}(this);for(const i of this.$$s)i in r&&("default"!==i||this.$$d.children?n[i]=t(i):(this.$$d.children=t(i),n.default=!0));for(const s of this.attributes){const o=this.$$g_p(s.name);o in this.$$d||(this.$$d[o]=Pr(o,s.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)a in this.$$d||void 0===this[a]||(this.$$d[a]=this[a],delete this[a]);this.$$c=(e={component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}},new Lr(e)),this.$$me=function(e){Je.ensure();const t=Zt(524352,e);return()=>{dn(t)}}(()=>{sn(()=>{this.$$r=!0;for(const e of d(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];const t=Pr(e,this.$$d[e],this.$$p_d,"toAttribute");null==t?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(const l in this.$$l)for(const c of this.$$l[l]){const u=this.$$c.$on(l,c);this.$$l_u.set(c,u)}this.$$l={}}var e}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Pr(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return d(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}}),function(e){e.CUSTOM_MESSAGE="custom",e.GET_CONTEXT="luigi.get-context",e.SEND_CONTEXT_HANDSHAKE="luigi.init",e.CONTEXT_RECEIVED