@botfabrik/engine-webclient 4.104.11 → 4.104.14
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.
- package/dist/client/assets/{index-DWF4Zt6l.js → index-e3onwuZD.js} +35 -35
- package/dist/client/assets/{index-DWF4Zt6l.js.map → index-e3onwuZD.js.map} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/embed/bundle.js +1 -1
- package/dist/extractLocale.js +26 -11
- package/dist/extractLocale.test.js +59 -14
- package/package.json +5 -7
package/dist/client/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<meta name="theme-color" content="#000000" />
|
|
14
14
|
<meta name="google" content="notranslate" />
|
|
15
15
|
<title>Bubble Chat Client</title>
|
|
16
|
-
<script type="module" crossorigin src="./assets/index-
|
|
16
|
+
<script type="module" crossorigin src="./assets/index-e3onwuZD.js"></script>
|
|
17
17
|
<link rel="stylesheet" crossorigin href="./assets/index-CzbajDSP.css">
|
|
18
18
|
</head>
|
|
19
19
|
|
package/dist/embed/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";const He=!1;var _n=Array.isArray,pn=Array.prototype.indexOf,wn=Array.from,gn=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,mn=Object.getOwnPropertyDescriptors,bn=Object.prototype,yn=Array.prototype,gt=Object.getPrototypeOf,mt=Object.isExtensible;function En(e){for(var t=0;t<e.length;t++)e[t]()}function bt(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const m=2,Ye=4,Ge=8,kn=1<<24,W=16,H=32,$=64,Te=128,P=512,y=1024,C=2048,Y=4096,U=8192,G=16384,Ke=32768,le=65536,yt=1<<17,Ve=1<<18,fe=1<<19,xn=1<<20,ee=32768,Ze=1<<21,Je=1<<22,Q=1<<23,Ce=Symbol("$state"),Sn=Symbol("legacy props"),Tn=Symbol(""),ue=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Cn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function On(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Rn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function In(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Dn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ln(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Nn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Mn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Un=1,zn=4,jn=8,qn=16,Bn=1,Wn=2,E=Symbol(),Hn="http://www.w3.org/1999/xhtml";function Yn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Et(e){return e===this.v}function Gn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Kn(e){return!Gn(e,this.v)}let Vn=!1,R=null;function ce(e){R=e}function Oe(e,t=!1,n){R={p:R,i:!1,c:null,e:null,s:e,x:null,l:null}}function Ae(e){var t=R,n=t.e;if(n!==null){t.e=null;for(var r of n)Ft(r)}return t.i=!0,R=t.p,{}}function kt(){return!0}let de=[];function Zn(){var e=de;de=[],En(e)}function Qe(e){if(de.length===0){var t=de;queueMicrotask(()=>{t===de&&Zn()})}de.push(e)}function xt(e){var t=_;if(t===null)return v.f|=Q,e;if((t.f&Ke)===0){if((t.f&Te)===0)throw e;t.b.error(e)}else he(e,t)}function he(e,t){for(;t!==null;){if((t.f&Te)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Re=new Set;let w=null,L=null,z=[],Xe=null,$e=!1;class j{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#l=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(t){z=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#o(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#a(n.effects),this.#a(n.render_effects),this.#a(n.block_effects)):(w=null,St(n.render_effects),St(n.effects),this.#l?.resolve()),L=null}#o(t,n){t.f^=y;for(var r=t.first;r!==null;){var i=r.f,s=(i&(H|$))!==0,o=s&&(i&y)!==0,l=o||(i&U)!==0||this.skipped_effects.has(r);if((r.f&Te)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&r.fn!==null){s?r.f^=y:(i&Ye)!==0?n.effects.push(r):ke(r)&&((r.f&W)!==0&&n.block_effects.push(r),xe(r));var a=r.first;if(a!==null){r=a;continue}}var f=r.parent;for(r=r.next;r===null&&f!==null;)f===n.effect&&(this.#a(n.effects),this.#a(n.render_effects),this.#a(n.block_effects),n=n.parent),r=f.next,f=f.parent}}#a(t){for(const n of t)((n.f&C)!==0?this.#s:this.#i).push(n),this.#f(n.deps),k(n,y)}#f(t){if(t!==null)for(const n of t)(n.f&m)===0||(n.f&ee)===0||(n.f^=ee,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,t.v),L?.set(t,t.v))}activate(){w=this,this.apply()}deactivate(){w===this&&(w=null,L=null)}flush(){if(this.activate(),z.length>0){if(Jn(),w!==null&&w!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#u(){if(this.#n===0){for(const t of this.#e)t();this.#e.clear()}this.#r===0&&this.#c()}#c(){if(Re.size>1){this.previous.clear();var t=L,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of Re){if(s===this){n=!1;continue}const o=[];for(const[a,f]of this.current){if(s.current.has(a))if(n&&f!==s.current.get(a))s.current.set(a,f);else continue;o.push(a)}if(o.length===0)continue;const l=[...s.current.keys()].filter(a=>!this.current.has(a));if(l.length>0){var i=z;z=[];const a=new Set,f=new Map;for(const c of o)Tt(c,l,a,f);if(z.length>0){w=s,s.apply();for(const c of z)s.#o(c,r);s.deactivate()}z=i}}w=null,L=t}this.committed=!0,Re.delete(this)}increment(t){this.#r+=1,t&&(this.#n+=1)}decrement(t){this.#r-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#s)k(t,C),te(t);for(const t of this.#i)k(t,Y),te(t);this.#s=[],this.#i=[],this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#l??=bt()).promise}static ensure(){if(w===null){const t=w=new j;Re.add(w),j.enqueue(()=>{w===t&&t.flush()})}return w}static enqueue(t){Qe(t)}apply(){}}function Jn(){var e=re;$e=!0;var t=null;try{var n=0;for(Fe(!0);z.length>0;){var r=j.ensure();if(n++>1e3){var i,s;Qn()}r.process(z),X.clear()}}finally{$e=!1,Fe(e),Xe=null}}function Qn(){try{Dn()}catch(e){he(e,Xe)}}let K=null;function St(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(G|U))===0&&ke(r)&&(K=new Set,xe(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?jt(r):r.fn=null),K?.size>0)){X.clear();for(const i of K){if((i.f&(G|U))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)K.has(o)&&(K.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(G|U))===0&&xe(a)}}K.clear()}}K=null}}function Tt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&m)!==0?Tt(i,t,n,r):(s&(Je|W))!==0&&(s&C)===0&&Ct(i,t,r)&&(k(i,C),te(i))}}function Ct(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if((i.f&m)!==0&&Ct(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function te(e){for(var t=Xe=e;t.parent!==null;){t=t.parent;var n=t.f;if($e&&t===_&&(n&W)!==0&&(n&Ve)===0)return;if((n&($|H))!==0){if((n&y)===0)return;t.f^=y}}z.push(t)}function Xn(e){let t=0,n=De(0),r;return()=>{be()&&(T(n),mr(()=>(t===0&&(r=st(()=>e(()=>me(n)))),t+=1,()=>{Qe(()=>{t-=1,t===0&&(r?.(),r=void 0,me(n))})})))}}var $n=le|fe|Te;function er(e,t,n){new tr(e,t,n)}class tr{parent;#e=!1;#t;#r=null;#n;#l;#s;#i=null;#o=null;#a=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#m=Xn(()=>(this.#h=De(this.#c),()=>{this.#h=null}));constructor(t,n,r){this.#t=t,this.#n=n,this.#l=r,this.parent=_.b,this.#e=!!this.#n.pending,this.#s=it(()=>{_.b=this;{var i=this.#w();try{this.#i=Z(()=>r(i))}catch(s){this.error(s)}this.#d>0?this.#p():this.#e=!1}return()=>{this.#u?.remove()}},$n)}#b(){try{this.#i=Z(()=>this.#l(this.#t))}catch(t){this.error(t)}this.#e=!1}#y(){const t=this.#n.pending;t&&(this.#o=Z(()=>t(this.#t)),j.enqueue(()=>{var n=this.#w();this.#i=this.#_(()=>(j.ensure(),Z(()=>this.#l(n)))),this.#d>0?this.#p():(ye(this.#o,()=>{this.#o=null}),this.#e=!1)}))}#w(){var t=this.#t;return this.#e&&(this.#u=ve(),this.#t.before(this.#u),t=this.#u),t}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#_(t){var n=_,r=v,i=R;B(this.#s),O(this.#s),ce(this.#s.ctx);try{return t()}catch(s){return xt(s),null}finally{B(n),O(r),ce(i)}}#p(){const t=this.#n.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Wt(this.#i,this.#f)),this.#o===null&&(this.#o=Z(()=>t(this.#t)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#d+=t,this.#d===0&&(this.#e=!1,this.#o&&ye(this.#o,()=>{this.#o=null}),this.#f&&(this.#t.before(this.#f),this.#f=null))}update_pending_count(t){this.#g(t),this.#c+=t,this.#h&&Le(this.#h,this.#c)}get_effect_pending(){return this.#m(),T(this.#h)}error(t){var n=this.#n.onerror;let r=this.#n.failed;if(this.#v||!n&&!r)throw t;this.#i&&(I(this.#i),this.#i=null),this.#o&&(I(this.#o),this.#o=null),this.#a&&(I(this.#a),this.#a=null);var i=!1,s=!1;const o=()=>{if(i){Yn();return}i=!0,s&&Fn(),j.ensure(),this.#c=0,this.#a!==null&&ye(this.#a,()=>{this.#a=null}),this.#e=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,Z(()=>this.#l(this.#t)))),this.#d>0?this.#p():this.#e=!1};var l=v;try{O(null),s=!0,n?.(t,o),s=!1}catch(a){he(a,this.#s&&this.#s.parent)}finally{O(l)}r&&Qe(()=>{this.#a=this.#_(()=>{j.ensure(),this.#v=!0;try{return Z(()=>{r(this.#t,()=>t,()=>o)})}catch(a){return he(a,this.#s.parent),null}finally{this.#v=!1}})})}}function nr(e,t,n,r){const i=et;if(n.length===0&&e.length===0){r(t.map(i));return}var s=w,o=_,l=rr();function a(){Promise.all(n.map(f=>ir(f))).then(f=>{l();try{r([...t.map(i),...f])}catch(c){(o.f&G)===0&&he(c,o)}s?.deactivate(),Ie()}).catch(f=>{he(f,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return a()}finally{s?.deactivate(),Ie()}}):a()}function rr(){var e=_,t=v,n=R,r=w;return function(s=!0){B(e),O(t),ce(n),s&&r?.activate()}}function Ie(){B(null),O(null),ce(null)}function et(e){var t=m|C,n=v!==null&&(v.f&m)!==0?v:null;return _!==null&&(_.f|=fe),{ctx:R,deps:null,effects:null,equals:Et,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??_,ac:null}}function ir(e,t){let n=_;n===null&&On();var r=n.b,i=void 0,s=De(E),o=!v,l=new Map;return gr(()=>{var a=bt();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{f===w&&f.committed&&f.deactivate(),Ie()})}catch(u){a.reject(u),Ie()}var f=w;if(o){var c=!r.is_pending();r.update_pending_count(1),f.increment(c),l.get(f)?.reject(ue),l.delete(f),l.set(f,a)}const h=(u,d=void 0)=>{if(f.activate(),d)d!==ue&&(s.f|=Q,Le(s,d));else{(s.f&Q)!==0&&(s.f^=Q),Le(s,u);for(const[g,b]of l){if(l.delete(g),g===f)break;b.reject(ue)}}o&&(r.update_pending_count(-1),f.decrement(c))};a.promise.then(h,u=>h(null,u||"unknown"))}),vr(()=>{for(const a of l.values())a.reject(ue)}),new Promise(a=>{function f(c){function h(){c===i?a(s):f(i)}c.then(h,h)}f(i)})}function sr(e){const t=et(e);return t.equals=Kn,t}function Ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)I(t[n])}}function or(e){for(var t=e.parent;t!==null;){if((t.f&m)===0)return(t.f&G)===0?t:null;t=t.parent}return null}function tt(e){var t,n=_;B(or(e));try{e.f&=~ee,Ot(e),t=Zt(e)}finally{B(n)}return t}function At(e){var t=tt(e);if(e.equals(t)||(w?.is_fork||(e.v=t),e.wv=Kt()),!ie)if(L!==null)(be()||w?.is_fork)&&L.set(e,t);else{var n=(e.f&P)===0?Y:y;k(e,n)}}let nt=new Set;const X=new Map;let Rt=!1;function De(e,t){var n={f:0,v:e,reactions:null,equals:Et,rv:0,wv:0};return n}function M(e,t){const n=De(e);return kr(n),n}function F(e,t,n=!1){v!==null&&(!q||(v.f&yt)!==0)&&kt()&&(v.f&(m|W|Je|yt))!==0&&!J?.includes(e)&&Mn();let r=n?ne(t):t;return Le(e,r)}function Le(e,t){if(!e.equals(t)){var n=e.v;ie?X.set(e,t):X.set(e,n),e.v=t;var r=j.ensure();r.capture(e,n),(e.f&m)!==0&&((e.f&C)!==0&&tt(e),k(e,(e.f&P)!==0?y:Y)),e.wv=Kt(),It(e,C),_!==null&&(_.f&y)!==0&&(_.f&(H|$))===0&&(N===null?xr([e]):N.push(e)),!r.is_fork&&nt.size>0&&!Rt&&ar()}return t}function ar(){Rt=!1;var e=re;Fe(!0);const t=Array.from(nt);try{for(const n of t)(n.f&y)!==0&&k(n,Y),ke(n)&&xe(n)}finally{Fe(e)}nt.clear()}function me(e){F(e,e.v+1)}function It(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,l=(o&C)===0;if(l&&k(s,t),(o&m)!==0){var a=s;L?.delete(a),(o&ee)===0&&(o&P&&(s.f|=ee),It(a,Y))}else l&&((o&W)!==0&&K!==null&&K.add(s),te(s))}}function ne(e){if(typeof e!="object"||e===null||Ce in e)return e;const t=gt(e);if(t!==bn&&t!==yn)return e;var n=new Map,r=_n(e),i=M(0),s=se,o=l=>{if(se===s)return l();var a=v,f=se;O(null),Gt(s);var c=l();return O(a),Gt(f),c};return r&&n.set("length",M(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Nn();var c=n.get(a);return c===void 0?c=o(()=>{var h=M(f.value);return n.set(a,h),h}):F(c,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const c=o(()=>M(E));n.set(a,c),me(i)}}else F(f,E),me(i);return!0},get(l,a,f){if(a===Ce)return e;var c=n.get(a),h=a in l;if(c===void 0&&(!h||ae(l,a)?.writable)&&(c=o(()=>{var d=ne(h?l[a]:E),g=M(d);return g}),n.set(a,c)),c!==void 0){var u=T(c);return u===E?void 0:u}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var c=n.get(a);c&&(f.value=T(c))}else if(f===void 0){var h=n.get(a),u=h?.v;if(h!==void 0&&u!==E)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(l,a){if(a===Ce)return!0;var f=n.get(a),c=f!==void 0&&f.v!==E||Reflect.has(l,a);if(f!==void 0||_!==null&&(!c||ae(l,a)?.writable)){f===void 0&&(f=o(()=>{var u=c?ne(l[a]):E,d=M(u);return d}),n.set(a,f));var h=T(f);if(h===E)return!1}return c},set(l,a,f,c){var h=n.get(a),u=a in l;if(r&&a==="length")for(var d=f;d<h.v;d+=1){var g=n.get(d+"");g!==void 0?F(g,E):d in l&&(g=o(()=>M(E)),n.set(d+"",g))}if(h===void 0)(!u||ae(l,a)?.writable)&&(h=o(()=>M(void 0)),F(h,ne(f)),n.set(a,h));else{u=h.v!==E;var b=o(()=>ne(f));F(h,b)}var x=Reflect.getOwnPropertyDescriptor(l,a);if(x?.set&&x.set.call(c,f),!u){if(r&&typeof a=="string"){var ge=n.get("length"),p=Number(a);Number.isInteger(p)&&p>=ge.v&&F(ge,p+1)}me(i)}return!0},ownKeys(l){T(i);var a=Reflect.ownKeys(l).filter(h=>{var u=n.get(h);return u===void 0||u.v!==E});for(var[f,c]of n)c.v!==E&&!(f in l)&&a.push(f);return a},setPrototypeOf(){Pn()}})}var Dt,Lt,Nt,Pt;function lr(){if(Dt===void 0){Dt=window,Lt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Nt=ae(t,"firstChild").get,Pt=ae(t,"nextSibling").get,mt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),mt(n)&&(n.__t=void 0)}}function ve(e=""){return document.createTextNode(e)}function Ne(e){return Nt.call(e)}function Pe(e){return Pt.call(e)}function rt(e,t){return Ne(e)}function fr(e,t=!1){{var n=Ne(e);return n instanceof Comment&&n.data===""?Pe(n):n}}function ur(e,t=1,n=!1){let r=e;for(;t--;)r=Pe(r);return r}function cr(){return!1}function Mt(e){var t=v,n=_;O(null),B(null);try{return e()}finally{O(t),B(n)}}function dr(e){_===null&&(v===null&&In(),Rn()),ie&&An()}function hr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function V(e,t,n){var r=_;r!==null&&(r.f&U)!==0&&(e|=U);var i={ctx:R,deps:null,nodes:null,f:e|C|P,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{xe(i),i.f|=Ke}catch(l){throw I(i),l}else t!==null&&te(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&fe)===0&&(s=s.first,(e&W)!==0&&(e&le)!==0&&s!==null&&(s.f|=le)),s!==null&&(s.parent=r,r!==null&&hr(s,r),v!==null&&(v.f&m)!==0&&(e&$)===0)){var o=v;(o.effects??=[]).push(s)}return i}function be(){return v!==null&&!q}function vr(e){const t=V(Ge,null,!1);return k(t,y),t.teardown=e,t}function _r(e){dr();var t=_.f,n=!v&&(t&H)!==0&&(t&Ke)===0;if(n){var r=R;(r.e??=[]).push(e)}else return Ft(e)}function Ft(e){return V(Ye|xn,e,!1)}function pr(e){j.ensure();const t=V($|fe,e,!0);return(n={})=>new Promise(r=>{n.outro?ye(t,()=>{I(t),r(void 0)}):(I(t),r(void 0))})}function wr(e){return V(Ye,e,!1)}function gr(e){return V(Je|fe,e,!0)}function mr(e,t=0){return V(Ge|t,e,!0)}function Me(e,t=[],n=[],r=[]){nr(r,t,n,i=>{V(Ge,()=>e(...i.map(T)),!0)})}function it(e,t=0){var n=V(W|t,e,!0);return n}function Z(e){return V(H|fe,e,!0)}function Ut(e){var t=e.teardown;if(t!==null){const n=ie,r=v;Ht(!0),O(null);try{t.call(null)}finally{Ht(n),O(r)}}}function zt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Mt(()=>{i.abort(ue)});var r=n.next;(n.f&$)!==0?n.parent=null:I(n,t),n=r}}function br(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&H)===0&&I(t),t=n}}function I(e,t=!0){var n=!1;(t||(e.f&Ve)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(yr(e.nodes.start,e.nodes.end),n=!0),zt(e,t&&!n),Ue(e,0),k(e,G);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Ut(e);var i=e.parent;i!==null&&i.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function yr(e,t){for(;e!==null;){var n=e===t?null:Pe(e);e.remove(),e=n}}function jt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ye(e,t,n=!0){var r=[];qt(e,r,!0);var i=()=>{n&&I(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var l of r)l.out(o)}else i()}function qt(e,t,n){if((e.f&U)===0){e.f^=U;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&le)!==0||(i.f&H)!==0&&(e.f&W)!==0;qt(i,t,o?n:!1),i=s}}}function Er(e){Bt(e,!0)}function Bt(e,t){if((e.f&U)!==0){e.f^=U,(e.f&y)===0&&(k(e,C),te(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&le)!==0||(n.f&H)!==0;Bt(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Wt(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Pe(n);t.append(n),n=i}}let re=!1;function Fe(e){re=e}let ie=!1;function Ht(e){ie=e}let v=null,q=!1;function O(e){v=e}let _=null;function B(e){_=e}let J=null;function kr(e){v!==null&&(J===null?J=[e]:J.push(e))}let S=null,D=0,N=null;function xr(e){N=e}let Yt=1,Ee=0,se=Ee;function Gt(e){se=e}function Kt(){return++Yt}function ke(e){var t=e.f;if((t&C)!==0)return!0;if(t&m&&(e.f&=~ee),(t&Y)!==0){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i];if(ke(s)&&At(s),s.wv>e.wv)return!0}(t&P)!==0&&L===null&&k(e,y)}return!1}function Vt(e,t,n=!0){var r=e.reactions;if(r!==null&&!J?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];(s.f&m)!==0?Vt(s,t,!1):t===s&&(n?k(s,C):(s.f&y)!==0&&k(s,Y),te(s))}}function Zt(e){var t=S,n=D,r=N,i=v,s=J,o=R,l=q,a=se,f=e.f;S=null,D=0,N=null,v=(f&(H|$))===0?e:null,J=null,ce(e.ctx),q=!1,se=++Ee,e.ac!==null&&(Mt(()=>{e.ac.abort(ue)}),e.ac=null);try{e.f|=Ze;var c=e.fn,h=c(),u=e.deps;if(S!==null){var d;if(Ue(e,D),u!==null&&D>0)for(u.length=D+S.length,d=0;d<S.length;d++)u[D+d]=S[d];else e.deps=u=S;if(be()&&(e.f&P)!==0)for(d=D;d<u.length;d++)(u[d].reactions??=[]).push(e)}else u!==null&&D<u.length&&(Ue(e,D),u.length=D);if(kt()&&N!==null&&!q&&u!==null&&(e.f&(m|Y|C))===0)for(d=0;d<N.length;d++)Vt(N[d],e);return i!==null&&i!==e&&(Ee++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&Q)!==0&&(e.f^=Q),h}catch(g){return xt(g)}finally{e.f^=Ze,S=t,D=n,N=r,v=i,J=s,ce(o),q=l,se=a}}function Sr(e,t){let n=t.reactions;if(n!==null){var r=pn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(t.f&m)!==0&&(S===null||!S.includes(t))&&(k(t,Y),(t.f&P)!==0&&(t.f^=P,t.f&=~ee),Ot(t),Ue(t,0))}function Ue(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Sr(e,n[r])}function xe(e){var t=e.f;if((t&G)===0){k(e,y);var n=_,r=re;_=e,re=!0;try{(t&(W|kn))!==0?br(e):zt(e),Ut(e);var i=Zt(e);e.teardown=typeof i=="function"?i:null,e.wv=Yt;var s;He&&Vn&&(e.f&C)!==0&&e.deps}finally{re=r,_=n}}}function T(e){var t=e.f,n=(t&m)!==0;if(v!==null&&!q){var r=_!==null&&(_.f&G)!==0;if(!r&&!J?.includes(e)){var i=v.deps;if((v.f&Ze)!==0)e.rv<Ee&&(e.rv=Ee,S===null&&i!==null&&i[D]===e?D++:S===null?S=[e]:S.includes(e)||S.push(e));else{(v.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[v]:s.includes(v)||s.push(v)}}}if(ie){if(X.has(e))return X.get(e);if(n){var o=e,l=o.v;return((o.f&y)===0&&o.reactions!==null||Qt(o))&&(l=tt(o)),X.set(o,l),l}}else n&&(!L?.has(e)||w?.is_fork&&!be())&&(o=e,ke(o)&&At(o),re&&be()&&(o.f&P)===0&&Jt(o));if(L?.has(e))return L.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function Jt(e){if(e.deps!==null){e.f^=P;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&m)!==0&&(t.f&P)===0&&Jt(t)}}function Qt(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(X.has(t)||(t.f&m)!==0&&Qt(t))return!0;return!1}function st(e){var t=q;try{return q=!0,e()}finally{q=t}}const Tr=-7169;function k(e,t){e.f=e.f&Tr|t}const Cr=["touchstart","touchmove"];function Or(e){return Cr.includes(e)}const Xt=new Set,ot=new Set;function Ar(e){for(var t=0;t<e.length;t++)Xt.add(e[t]);for(var n of ot)n(e)}let $t=null;function ze(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;$t=e;var o=0,l=$t===e&&e.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(o=a)}if(s=i[o]||e.target,s!==t){gn(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=v,h=_;O(null),B(null);try{for(var u,d=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+r];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(x){u?d.push(x):u=x}if(e.cancelBubble||g===t||g===null)break;s=g}if(u){for(let x of d)queueMicrotask(()=>{throw x});throw u}}finally{e.__root=t,delete e.currentTarget,O(c),B(h)}}}function Rr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function at(e,t){var n=_;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Se(e,t){var n=(t&Bn)!==0,r=(t&Wn)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Rr(s?e:"<!>"+e),n||(i=Ne(i)));var o=r||Lt?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Ne(o),a=o.lastChild;at(l,a)}else at(o,o);return o}}function Ir(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ve();return e.append(t,n),at(t,n),e}function _e(e,t){e!==null&&e.before(t)}function Dr(e,t){return Lr(e,t)}const pe=new Map;function Lr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0}){lr();var l=new Set,a=h=>{for(var u=0;u<h.length;u++){var d=h[u];if(!l.has(d)){l.add(d);var g=Or(d);t.addEventListener(d,ze,{passive:g});var b=pe.get(d);b===void 0?(document.addEventListener(d,ze,{passive:g}),pe.set(d,1)):pe.set(d,b+1)}}};a(wn(Xt)),ot.add(a);var f=void 0,c=pr(()=>{var h=n??t.appendChild(ve());return er(h,{pending:()=>{}},u=>{if(s){Oe({});var d=R;d.c=s}i&&(r.$$events=i),f=e(u,r)||{},s&&Ae()}),()=>{for(var u of l){t.removeEventListener(u,ze);var d=pe.get(u);--d===0?(document.removeEventListener(u,ze),pe.delete(u)):pe.set(u,d)}ot.delete(a),h!==n&&h.parentNode?.removeChild(h)}});return Nr.set(f,c),f}let Nr=new WeakMap;class Pr{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#l=!0;constructor(t,n=!0){this.anchor=t,this.#l=n}#s=()=>{var t=w;if(this.#e.has(t)){var n=this.#e.get(t),r=this.#t.get(n);if(r)Er(r),this.#n.delete(n);else{var i=this.#r.get(n);i&&(this.#t.set(n,i.effect),this.#r.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#r.get(o);l&&(I(l.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===n||this.#n.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();Wt(o,f),f.append(ve()),this.#r.set(s,{effect:o,fragment:f})}else I(o);this.#n.delete(s),this.#t.delete(s)};this.#l||!r?(this.#n.add(s),ye(o,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#r)n.includes(r)||(I(i.effect),this.#r.delete(r))};ensure(t,n){var r=w,i=cr();if(n&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),o=ve();s.append(o),this.#r.set(t,{effect:Z(()=>n(o)),fragment:s})}else this.#t.set(t,Z(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[l,a]of this.#t)l===t?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[l,a]of this.#r)l===t?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(this.#s),r.ondiscard(this.#i)}else this.#s()}}function Mr(e,t,n=!1){var r=new Pr(e),i=n?le:0;function s(o,l){r.ensure(o,l)}it(()=>{var o=!1;t((l,a=!0)=>{o=!0,s(a,l)}),o||s(!1,null)},i)}function Fr(e,t){var n;n=document.head.appendChild(ve());try{it(()=>t(n),Ve)}finally{}}function lt(e,t){wr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const en=[...`
|
|
1
|
+
(function(){"use strict";const He=!1;var _n=Array.isArray,pn=Array.prototype.indexOf,wn=Array.from,gn=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,mn=Object.getOwnPropertyDescriptors,bn=Object.prototype,yn=Array.prototype,gt=Object.getPrototypeOf,mt=Object.isExtensible;function En(e){for(var t=0;t<e.length;t++)e[t]()}function bt(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const m=2,Ye=4,Ge=8,kn=1<<24,H=16,Y=32,$=64,Te=128,P=512,y=1024,C=2048,U=4096,z=8192,G=16384,Ke=32768,le=65536,yt=1<<17,Ve=1<<18,fe=1<<19,xn=1<<20,ee=32768,Ze=1<<21,Je=1<<22,Q=1<<23,Ce=Symbol("$state"),Sn=Symbol("legacy props"),Tn=Symbol(""),ue=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Cn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function On(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Rn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function In(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Dn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ln(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Nn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Mn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Un=1,zn=4,jn=8,qn=16,Bn=1,Wn=2,E=Symbol(),Hn="http://www.w3.org/1999/xhtml";function Yn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Et(e){return e===this.v}function Gn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Kn(e){return!Gn(e,this.v)}let Vn=!1,R=null;function ce(e){R=e}function Oe(e,t=!1,n){R={p:R,i:!1,c:null,e:null,s:e,x:null,l:null}}function Ae(e){var t=R,n=t.e;if(n!==null){t.e=null;for(var r of n)Ft(r)}return t.i=!0,R=t.p,{}}function kt(){return!0}let de=[];function Zn(){var e=de;de=[],En(e)}function Qe(e){if(de.length===0){var t=de;queueMicrotask(()=>{t===de&&Zn()})}de.push(e)}function xt(e){var t=_;if(t===null)return v.f|=Q,e;if((t.f&Ke)===0){if((t.f&Te)===0)throw e;t.b.error(e)}else he(e,t)}function he(e,t){for(;t!==null;){if((t.f&Te)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Re=new Set;let w=null,L=null,j=[],Xe=null,$e=!1;class q{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#l=null;#s=new Set;#i=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(t){j=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[]};for(const r of t)this.#o(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#a(n.effects),this.#a(n.render_effects)):(w=null,St(n.render_effects),St(n.effects),this.#l?.resolve()),L=null}#o(t,n){t.f^=y;for(var r=t.first;r!==null;){var i=r.f,s=(i&(Y|$))!==0,o=s&&(i&y)!==0,l=o||(i&z)!==0||this.skipped_effects.has(r);if((r.f&Te)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[]}),!l&&r.fn!==null){s?r.f^=y:(i&Ye)!==0?n.effects.push(r):ke(r)&&((r.f&H)!==0&&this.#s.add(r),xe(r));var a=r.first;if(a!==null){r=a;continue}}var f=r.parent;for(r=r.next;r===null&&f!==null;)f===n.effect&&(this.#a(n.effects),this.#a(n.render_effects),n=n.parent),r=f.next,f=f.parent}}#a(t){for(const n of t)(n.f&C)!==0?this.#s.add(n):(n.f&U)!==0&&this.#i.add(n),this.#f(n.deps),k(n,y)}#f(t){if(t!==null)for(const n of t)(n.f&m)===0||(n.f&ee)===0||(n.f^=ee,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,t.v),L?.set(t,t.v))}activate(){w=this,this.apply()}deactivate(){w===this&&(w=null,L=null)}flush(){if(this.activate(),j.length>0){if(Jn(),w!==null&&w!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#u(){if(this.#n===0){for(const t of this.#e)t();this.#e.clear()}this.#r===0&&this.#c()}#c(){if(Re.size>1){this.previous.clear();var t=L,n=!0,r={parent:null,effect:null,effects:[],render_effects:[]};for(const s of Re){if(s===this){n=!1;continue}const o=[];for(const[a,f]of this.current){if(s.current.has(a))if(n&&f!==s.current.get(a))s.current.set(a,f);else continue;o.push(a)}if(o.length===0)continue;const l=[...s.current.keys()].filter(a=>!this.current.has(a));if(l.length>0){var i=j;j=[];const a=new Set,f=new Map;for(const c of o)Tt(c,l,a,f);if(j.length>0){w=s,s.apply();for(const c of j)s.#o(c,r);s.deactivate()}j=i}}w=null,L=t}this.committed=!0,Re.delete(this)}increment(t){this.#r+=1,t&&(this.#n+=1)}decrement(t){this.#r-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#s)this.#i.delete(t),k(t,C),te(t);for(const t of this.#i)k(t,U),te(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#l??=bt()).promise}static ensure(){if(w===null){const t=w=new q;Re.add(w),q.enqueue(()=>{w===t&&t.flush()})}return w}static enqueue(t){Qe(t)}apply(){}}function Jn(){var e=re;$e=!0;var t=null;try{var n=0;for(Fe(!0);j.length>0;){var r=q.ensure();if(n++>1e3){var i,s;Qn()}r.process(j),X.clear()}}finally{$e=!1,Fe(e),Xe=null}}function Qn(){try{Dn()}catch(e){he(e,Xe)}}let K=null;function St(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(G|z))===0&&ke(r)&&(K=new Set,xe(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?jt(r):r.fn=null),K?.size>0)){X.clear();for(const i of K){if((i.f&(G|z))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)K.has(o)&&(K.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(G|z))===0&&xe(a)}}K.clear()}}K=null}}function Tt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&m)!==0?Tt(i,t,n,r):(s&(Je|H))!==0&&(s&C)===0&&Ct(i,t,r)&&(k(i,C),te(i))}}function Ct(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if((i.f&m)!==0&&Ct(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function te(e){for(var t=Xe=e;t.parent!==null;){t=t.parent;var n=t.f;if($e&&t===_&&(n&H)!==0&&(n&Ve)===0)return;if((n&($|Y))!==0){if((n&y)===0)return;t.f^=y}}j.push(t)}function Xn(e){let t=0,n=De(0),r;return()=>{be()&&(T(n),mr(()=>(t===0&&(r=st(()=>e(()=>me(n)))),t+=1,()=>{Qe(()=>{t-=1,t===0&&(r?.(),r=void 0,me(n))})})))}}var $n=le|fe|Te;function er(e,t,n){new tr(e,t,n)}class tr{parent;#e=!1;#t;#r=null;#n;#l;#s;#i=null;#o=null;#a=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#m=Xn(()=>(this.#h=De(this.#c),()=>{this.#h=null}));constructor(t,n,r){this.#t=t,this.#n=n,this.#l=r,this.parent=_.b,this.#e=!!this.#n.pending,this.#s=it(()=>{_.b=this;{var i=this.#w();try{this.#i=Z(()=>r(i))}catch(s){this.error(s)}this.#d>0?this.#p():this.#e=!1}return()=>{this.#u?.remove()}},$n)}#b(){try{this.#i=Z(()=>this.#l(this.#t))}catch(t){this.error(t)}this.#e=!1}#y(){const t=this.#n.pending;t&&(this.#o=Z(()=>t(this.#t)),q.enqueue(()=>{var n=this.#w();this.#i=this.#_(()=>(q.ensure(),Z(()=>this.#l(n)))),this.#d>0?this.#p():(ye(this.#o,()=>{this.#o=null}),this.#e=!1)}))}#w(){var t=this.#t;return this.#e&&(this.#u=ve(),this.#t.before(this.#u),t=this.#u),t}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#_(t){var n=_,r=v,i=R;W(this.#s),O(this.#s),ce(this.#s.ctx);try{return t()}catch(s){return xt(s),null}finally{W(n),O(r),ce(i)}}#p(){const t=this.#n.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Wt(this.#i,this.#f)),this.#o===null&&(this.#o=Z(()=>t(this.#t)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#d+=t,this.#d===0&&(this.#e=!1,this.#o&&ye(this.#o,()=>{this.#o=null}),this.#f&&(this.#t.before(this.#f),this.#f=null))}update_pending_count(t){this.#g(t),this.#c+=t,this.#h&&Le(this.#h,this.#c)}get_effect_pending(){return this.#m(),T(this.#h)}error(t){var n=this.#n.onerror;let r=this.#n.failed;if(this.#v||!n&&!r)throw t;this.#i&&(I(this.#i),this.#i=null),this.#o&&(I(this.#o),this.#o=null),this.#a&&(I(this.#a),this.#a=null);var i=!1,s=!1;const o=()=>{if(i){Yn();return}i=!0,s&&Fn(),q.ensure(),this.#c=0,this.#a!==null&&ye(this.#a,()=>{this.#a=null}),this.#e=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,Z(()=>this.#l(this.#t)))),this.#d>0?this.#p():this.#e=!1};var l=v;try{O(null),s=!0,n?.(t,o),s=!1}catch(a){he(a,this.#s&&this.#s.parent)}finally{O(l)}r&&Qe(()=>{this.#a=this.#_(()=>{q.ensure(),this.#v=!0;try{return Z(()=>{r(this.#t,()=>t,()=>o)})}catch(a){return he(a,this.#s.parent),null}finally{this.#v=!1}})})}}function nr(e,t,n,r){const i=et;if(n.length===0&&e.length===0){r(t.map(i));return}var s=w,o=_,l=rr();function a(){Promise.all(n.map(f=>ir(f))).then(f=>{l();try{r([...t.map(i),...f])}catch(c){(o.f&G)===0&&he(c,o)}s?.deactivate(),Ie()}).catch(f=>{he(f,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return a()}finally{s?.deactivate(),Ie()}}):a()}function rr(){var e=_,t=v,n=R,r=w;return function(s=!0){W(e),O(t),ce(n),s&&r?.activate()}}function Ie(){W(null),O(null),ce(null)}function et(e){var t=m|C,n=v!==null&&(v.f&m)!==0?v:null;return _!==null&&(_.f|=fe),{ctx:R,deps:null,effects:null,equals:Et,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??_,ac:null}}function ir(e,t){let n=_;n===null&&On();var r=n.b,i=void 0,s=De(E),o=!v,l=new Map;return gr(()=>{var a=bt();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{f===w&&f.committed&&f.deactivate(),Ie()})}catch(u){a.reject(u),Ie()}var f=w;if(o){var c=!r.is_pending();r.update_pending_count(1),f.increment(c),l.get(f)?.reject(ue),l.delete(f),l.set(f,a)}const h=(u,d=void 0)=>{if(f.activate(),d)d!==ue&&(s.f|=Q,Le(s,d));else{(s.f&Q)!==0&&(s.f^=Q),Le(s,u);for(const[g,b]of l){if(l.delete(g),g===f)break;b.reject(ue)}}o&&(r.update_pending_count(-1),f.decrement(c))};a.promise.then(h,u=>h(null,u||"unknown"))}),vr(()=>{for(const a of l.values())a.reject(ue)}),new Promise(a=>{function f(c){function h(){c===i?a(s):f(i)}c.then(h,h)}f(i)})}function sr(e){const t=et(e);return t.equals=Kn,t}function Ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)I(t[n])}}function or(e){for(var t=e.parent;t!==null;){if((t.f&m)===0)return(t.f&G)===0?t:null;t=t.parent}return null}function tt(e){var t,n=_;W(or(e));try{e.f&=~ee,Ot(e),t=Zt(e)}finally{W(n)}return t}function At(e){var t=tt(e);if(e.equals(t)||(w?.is_fork||(e.v=t),e.wv=Kt()),!ie)if(L!==null)(be()||w?.is_fork)&&L.set(e,t);else{var n=(e.f&P)===0?U:y;k(e,n)}}let nt=new Set;const X=new Map;let Rt=!1;function De(e,t){var n={f:0,v:e,reactions:null,equals:Et,rv:0,wv:0};return n}function M(e,t){const n=De(e);return kr(n),n}function F(e,t,n=!1){v!==null&&(!B||(v.f&yt)!==0)&&kt()&&(v.f&(m|H|Je|yt))!==0&&!J?.includes(e)&&Mn();let r=n?ne(t):t;return Le(e,r)}function Le(e,t){if(!e.equals(t)){var n=e.v;ie?X.set(e,t):X.set(e,n),e.v=t;var r=q.ensure();r.capture(e,n),(e.f&m)!==0&&((e.f&C)!==0&&tt(e),k(e,(e.f&P)!==0?y:U)),e.wv=Kt(),It(e,C),_!==null&&(_.f&y)!==0&&(_.f&(Y|$))===0&&(N===null?xr([e]):N.push(e)),!r.is_fork&&nt.size>0&&!Rt&&ar()}return t}function ar(){Rt=!1;var e=re;Fe(!0);const t=Array.from(nt);try{for(const n of t)(n.f&y)!==0&&k(n,U),ke(n)&&xe(n)}finally{Fe(e)}nt.clear()}function me(e){F(e,e.v+1)}function It(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,l=(o&C)===0;if(l&&k(s,t),(o&m)!==0){var a=s;L?.delete(a),(o&ee)===0&&(o&P&&(s.f|=ee),It(a,U))}else l&&((o&H)!==0&&K!==null&&K.add(s),te(s))}}function ne(e){if(typeof e!="object"||e===null||Ce in e)return e;const t=gt(e);if(t!==bn&&t!==yn)return e;var n=new Map,r=_n(e),i=M(0),s=se,o=l=>{if(se===s)return l();var a=v,f=se;O(null),Gt(s);var c=l();return O(a),Gt(f),c};return r&&n.set("length",M(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Nn();var c=n.get(a);return c===void 0?c=o(()=>{var h=M(f.value);return n.set(a,h),h}):F(c,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const c=o(()=>M(E));n.set(a,c),me(i)}}else F(f,E),me(i);return!0},get(l,a,f){if(a===Ce)return e;var c=n.get(a),h=a in l;if(c===void 0&&(!h||ae(l,a)?.writable)&&(c=o(()=>{var d=ne(h?l[a]:E),g=M(d);return g}),n.set(a,c)),c!==void 0){var u=T(c);return u===E?void 0:u}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var c=n.get(a);c&&(f.value=T(c))}else if(f===void 0){var h=n.get(a),u=h?.v;if(h!==void 0&&u!==E)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(l,a){if(a===Ce)return!0;var f=n.get(a),c=f!==void 0&&f.v!==E||Reflect.has(l,a);if(f!==void 0||_!==null&&(!c||ae(l,a)?.writable)){f===void 0&&(f=o(()=>{var u=c?ne(l[a]):E,d=M(u);return d}),n.set(a,f));var h=T(f);if(h===E)return!1}return c},set(l,a,f,c){var h=n.get(a),u=a in l;if(r&&a==="length")for(var d=f;d<h.v;d+=1){var g=n.get(d+"");g!==void 0?F(g,E):d in l&&(g=o(()=>M(E)),n.set(d+"",g))}if(h===void 0)(!u||ae(l,a)?.writable)&&(h=o(()=>M(void 0)),F(h,ne(f)),n.set(a,h));else{u=h.v!==E;var b=o(()=>ne(f));F(h,b)}var x=Reflect.getOwnPropertyDescriptor(l,a);if(x?.set&&x.set.call(c,f),!u){if(r&&typeof a=="string"){var ge=n.get("length"),p=Number(a);Number.isInteger(p)&&p>=ge.v&&F(ge,p+1)}me(i)}return!0},ownKeys(l){T(i);var a=Reflect.ownKeys(l).filter(h=>{var u=n.get(h);return u===void 0||u.v!==E});for(var[f,c]of n)c.v!==E&&!(f in l)&&a.push(f);return a},setPrototypeOf(){Pn()}})}var Dt,Lt,Nt,Pt;function lr(){if(Dt===void 0){Dt=window,Lt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Nt=ae(t,"firstChild").get,Pt=ae(t,"nextSibling").get,mt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),mt(n)&&(n.__t=void 0)}}function ve(e=""){return document.createTextNode(e)}function Ne(e){return Nt.call(e)}function Pe(e){return Pt.call(e)}function rt(e,t){return Ne(e)}function fr(e,t=!1){{var n=Ne(e);return n instanceof Comment&&n.data===""?Pe(n):n}}function ur(e,t=1,n=!1){let r=e;for(;t--;)r=Pe(r);return r}function cr(){return!1}function Mt(e){var t=v,n=_;O(null),W(null);try{return e()}finally{O(t),W(n)}}function dr(e){_===null&&(v===null&&In(),Rn()),ie&&An()}function hr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function V(e,t,n){var r=_;r!==null&&(r.f&z)!==0&&(e|=z);var i={ctx:R,deps:null,nodes:null,f:e|C|P,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{xe(i),i.f|=Ke}catch(l){throw I(i),l}else t!==null&&te(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&fe)===0&&(s=s.first,(e&H)!==0&&(e&le)!==0&&s!==null&&(s.f|=le)),s!==null&&(s.parent=r,r!==null&&hr(s,r),v!==null&&(v.f&m)!==0&&(e&$)===0)){var o=v;(o.effects??=[]).push(s)}return i}function be(){return v!==null&&!B}function vr(e){const t=V(Ge,null,!1);return k(t,y),t.teardown=e,t}function _r(e){dr();var t=_.f,n=!v&&(t&Y)!==0&&(t&Ke)===0;if(n){var r=R;(r.e??=[]).push(e)}else return Ft(e)}function Ft(e){return V(Ye|xn,e,!1)}function pr(e){q.ensure();const t=V($|fe,e,!0);return(n={})=>new Promise(r=>{n.outro?ye(t,()=>{I(t),r(void 0)}):(I(t),r(void 0))})}function wr(e){return V(Ye,e,!1)}function gr(e){return V(Je|fe,e,!0)}function mr(e,t=0){return V(Ge|t,e,!0)}function Me(e,t=[],n=[],r=[]){nr(r,t,n,i=>{V(Ge,()=>e(...i.map(T)),!0)})}function it(e,t=0){var n=V(H|t,e,!0);return n}function Z(e){return V(Y|fe,e,!0)}function Ut(e){var t=e.teardown;if(t!==null){const n=ie,r=v;Ht(!0),O(null);try{t.call(null)}finally{Ht(n),O(r)}}}function zt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Mt(()=>{i.abort(ue)});var r=n.next;(n.f&$)!==0?n.parent=null:I(n,t),n=r}}function br(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Y)===0&&I(t),t=n}}function I(e,t=!0){var n=!1;(t||(e.f&Ve)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(yr(e.nodes.start,e.nodes.end),n=!0),zt(e,t&&!n),Ue(e,0),k(e,G);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Ut(e);var i=e.parent;i!==null&&i.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function yr(e,t){for(;e!==null;){var n=e===t?null:Pe(e);e.remove(),e=n}}function jt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ye(e,t,n=!0){var r=[];qt(e,r,!0);var i=()=>{n&&I(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var l of r)l.out(o)}else i()}function qt(e,t,n){if((e.f&z)===0){e.f^=z;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&le)!==0||(i.f&Y)!==0&&(e.f&H)!==0;qt(i,t,o?n:!1),i=s}}}function Er(e){Bt(e,!0)}function Bt(e,t){if((e.f&z)!==0){e.f^=z,(e.f&y)===0&&(k(e,C),te(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&le)!==0||(n.f&Y)!==0;Bt(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Wt(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Pe(n);t.append(n),n=i}}let re=!1;function Fe(e){re=e}let ie=!1;function Ht(e){ie=e}let v=null,B=!1;function O(e){v=e}let _=null;function W(e){_=e}let J=null;function kr(e){v!==null&&(J===null?J=[e]:J.push(e))}let S=null,D=0,N=null;function xr(e){N=e}let Yt=1,Ee=0,se=Ee;function Gt(e){se=e}function Kt(){return++Yt}function ke(e){var t=e.f;if((t&C)!==0)return!0;if(t&m&&(e.f&=~ee),(t&U)!==0){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i];if(ke(s)&&At(s),s.wv>e.wv)return!0}(t&P)!==0&&L===null&&k(e,y)}return!1}function Vt(e,t,n=!0){var r=e.reactions;if(r!==null&&!J?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];(s.f&m)!==0?Vt(s,t,!1):t===s&&(n?k(s,C):(s.f&y)!==0&&k(s,U),te(s))}}function Zt(e){var t=S,n=D,r=N,i=v,s=J,o=R,l=B,a=se,f=e.f;S=null,D=0,N=null,v=(f&(Y|$))===0?e:null,J=null,ce(e.ctx),B=!1,se=++Ee,e.ac!==null&&(Mt(()=>{e.ac.abort(ue)}),e.ac=null);try{e.f|=Ze;var c=e.fn,h=c(),u=e.deps;if(S!==null){var d;if(Ue(e,D),u!==null&&D>0)for(u.length=D+S.length,d=0;d<S.length;d++)u[D+d]=S[d];else e.deps=u=S;if(be()&&(e.f&P)!==0)for(d=D;d<u.length;d++)(u[d].reactions??=[]).push(e)}else u!==null&&D<u.length&&(Ue(e,D),u.length=D);if(kt()&&N!==null&&!B&&u!==null&&(e.f&(m|U|C))===0)for(d=0;d<N.length;d++)Vt(N[d],e);return i!==null&&i!==e&&(Ee++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&Q)!==0&&(e.f^=Q),h}catch(g){return xt(g)}finally{e.f^=Ze,S=t,D=n,N=r,v=i,J=s,ce(o),B=l,se=a}}function Sr(e,t){let n=t.reactions;if(n!==null){var r=pn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(t.f&m)!==0&&(S===null||!S.includes(t))&&(k(t,U),(t.f&P)!==0&&(t.f^=P,t.f&=~ee),Ot(t),Ue(t,0))}function Ue(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Sr(e,n[r])}function xe(e){var t=e.f;if((t&G)===0){k(e,y);var n=_,r=re;_=e,re=!0;try{(t&(H|kn))!==0?br(e):zt(e),Ut(e);var i=Zt(e);e.teardown=typeof i=="function"?i:null,e.wv=Yt;var s;He&&Vn&&(e.f&C)!==0&&e.deps}finally{re=r,_=n}}}function T(e){var t=e.f,n=(t&m)!==0;if(v!==null&&!B){var r=_!==null&&(_.f&G)!==0;if(!r&&!J?.includes(e)){var i=v.deps;if((v.f&Ze)!==0)e.rv<Ee&&(e.rv=Ee,S===null&&i!==null&&i[D]===e?D++:S===null?S=[e]:S.includes(e)||S.push(e));else{(v.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[v]:s.includes(v)||s.push(v)}}}if(ie){if(X.has(e))return X.get(e);if(n){var o=e,l=o.v;return((o.f&y)===0&&o.reactions!==null||Qt(o))&&(l=tt(o)),X.set(o,l),l}}else n&&(!L?.has(e)||w?.is_fork&&!be())&&(o=e,ke(o)&&At(o),re&&be()&&(o.f&P)===0&&Jt(o));if(L?.has(e))return L.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function Jt(e){if(e.deps!==null){e.f^=P;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&m)!==0&&(t.f&P)===0&&Jt(t)}}function Qt(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(X.has(t)||(t.f&m)!==0&&Qt(t))return!0;return!1}function st(e){var t=B;try{return B=!0,e()}finally{B=t}}const Tr=-7169;function k(e,t){e.f=e.f&Tr|t}const Cr=["touchstart","touchmove"];function Or(e){return Cr.includes(e)}const Xt=new Set,ot=new Set;function Ar(e){for(var t=0;t<e.length;t++)Xt.add(e[t]);for(var n of ot)n(e)}let $t=null;function ze(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;$t=e;var o=0,l=$t===e&&e.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(o=a)}if(s=i[o]||e.target,s!==t){gn(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=v,h=_;O(null),W(null);try{for(var u,d=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+r];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(x){u?d.push(x):u=x}if(e.cancelBubble||g===t||g===null)break;s=g}if(u){for(let x of d)queueMicrotask(()=>{throw x});throw u}}finally{e.__root=t,delete e.currentTarget,O(c),W(h)}}}function Rr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function at(e,t){var n=_;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Se(e,t){var n=(t&Bn)!==0,r=(t&Wn)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Rr(s?e:"<!>"+e),n||(i=Ne(i)));var o=r||Lt?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Ne(o),a=o.lastChild;at(l,a)}else at(o,o);return o}}function Ir(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ve();return e.append(t,n),at(t,n),e}function _e(e,t){e!==null&&e.before(t)}function Dr(e,t){return Lr(e,t)}const pe=new Map;function Lr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0}){lr();var l=new Set,a=h=>{for(var u=0;u<h.length;u++){var d=h[u];if(!l.has(d)){l.add(d);var g=Or(d);t.addEventListener(d,ze,{passive:g});var b=pe.get(d);b===void 0?(document.addEventListener(d,ze,{passive:g}),pe.set(d,1)):pe.set(d,b+1)}}};a(wn(Xt)),ot.add(a);var f=void 0,c=pr(()=>{var h=n??t.appendChild(ve());return er(h,{pending:()=>{}},u=>{if(s){Oe({});var d=R;d.c=s}i&&(r.$$events=i),f=e(u,r)||{},s&&Ae()}),()=>{for(var u of l){t.removeEventListener(u,ze);var d=pe.get(u);--d===0?(document.removeEventListener(u,ze),pe.delete(u)):pe.set(u,d)}ot.delete(a),h!==n&&h.parentNode?.removeChild(h)}});return Nr.set(f,c),f}let Nr=new WeakMap;class Pr{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#l=!0;constructor(t,n=!0){this.anchor=t,this.#l=n}#s=()=>{var t=w;if(this.#e.has(t)){var n=this.#e.get(t),r=this.#t.get(n);if(r)Er(r),this.#n.delete(n);else{var i=this.#r.get(n);i&&(this.#t.set(n,i.effect),this.#r.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#r.get(o);l&&(I(l.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===n||this.#n.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();Wt(o,f),f.append(ve()),this.#r.set(s,{effect:o,fragment:f})}else I(o);this.#n.delete(s),this.#t.delete(s)};this.#l||!r?(this.#n.add(s),ye(o,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#r)n.includes(r)||(I(i.effect),this.#r.delete(r))};ensure(t,n){var r=w,i=cr();if(n&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),o=ve();s.append(o),this.#r.set(t,{effect:Z(()=>n(o)),fragment:s})}else this.#t.set(t,Z(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[l,a]of this.#t)l===t?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[l,a]of this.#r)l===t?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(this.#s),r.ondiscard(this.#i)}else this.#s()}}function Mr(e,t,n=!1){var r=new Pr(e),i=n?le:0;function s(o,l){r.ensure(o,l)}it(()=>{var o=!1;t((l,a=!0)=>{o=!0,s(a,l)}),o||s(!1,null)},i)}function Fr(e,t){var n;n=document.head.appendChild(ve());try{it(()=>t(n),Ve)}finally{}}function lt(e,t){wr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const en=[...`
|
|
2
2
|
\r\f \v\uFEFF`];function Ur(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in 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 l=o+s;(o===0||en.includes(r[o-1]))&&(l===r.length||en.includes(r[l]))?r=(o===0?"":r.substring(0,o))+r.substring(l+1):o=l}}return r===""?null:r}function tn(e,t,n,r,i,s){var o=e.__className;if(o!==n||o===void 0){var l=Ur(n,r,s);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(s&&i!==s)for(var a in s){var f=!!s[a];(i==null||f!==!!i[a])&&e.classList.toggle(a,f)}return s}const zr=Symbol("is custom element"),jr=Symbol("is html");function we(e,t,n,r){var i=qr(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Tn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Br(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function qr(e){return e.__attributes??={[zr]:e.nodeName.includes("-"),[jr]:e.namespaceURI===Hn}}var nn=new Map;function Br(e){var t=e.getAttribute("is")||e.nodeName,n=nn.get(t);if(n)return n;nn.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=mn(i);for(var o in r)r[o].set&&n.push(o);i=gt(i)}return n}let je=!1;function Wr(e){var t=je;try{return je=!1,[e(),je]}finally{je=t}}function ft(e,t,n,r){var i=(n&jn)!==0,s=(n&qn)!==0,o=r,l=!0,a=()=>(l&&(l=!1,o=s?st(r):r),o),f;if(i){var c=Ce in e||Sn in e;f=ae(e,t)?.set??(c&&t in e?p=>e[t]=p:void 0)}var h,u=!1;i?[h,u]=Wr(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=a(),f&&(Ln(),f(h)));var d;if(d=()=>{var p=e[t];return p===void 0?a():(l=!0,p)},(n&zn)===0)return d;if(f){var g=e.$$legacy;return(function(p,A){return arguments.length>0?((!A||g||u)&&f(A?d():p),p):d()})}var b=!1,x=((n&Un)!==0?et:sr)(()=>(b=!1,d()));i&&T(x);var ge=_;return(function(p,A){if(arguments.length>0){const oe=A?T(x):i?ne(p):p;return F(x,oe),b=!0,o!==void 0&&(o=oe),p}return ie&&b||(ge.f&G)!==0?x.v:T(x)})}function rn(e){R===null&&Cn(),_r(()=>{const t=st(e);if(typeof t=="function")return t})}const Hr="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Hr);var Yr=Se('<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>'),Gr=Se(`<p class="svelte-yhk8rr">Please make sure that the script tag has 'id="chatbot"' and the attribute
|
|
3
3
|
'data-server' with the full qualified URL to the chatbot-server.</p> <pre class="svelte-yhk8rr">
|
|
4
4
|
<code class="svelte-yhk8rr">
|
package/dist/extractLocale.js
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
import { parse } from 'accept-language-parser';
|
|
2
1
|
const extractLocale = (parsedUrlQuery, acceptLanguage = '') => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
// 1️⃣ Query parameter has highest priority
|
|
3
|
+
const langParam = parsedUrlQuery['lang'];
|
|
4
|
+
if (typeof langParam === 'string') {
|
|
5
|
+
return langParam;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
// 2️⃣ Parse the Accept-Language header
|
|
8
|
+
const entries = acceptLanguage
|
|
9
|
+
.split(',')
|
|
10
|
+
.map((part) => {
|
|
11
|
+
const [tag, qPart] = part.trim().split(';');
|
|
12
|
+
const q = qPart ? Number(qPart.split('=')[1]) : 1;
|
|
13
|
+
return { tag, q };
|
|
14
|
+
})
|
|
15
|
+
.filter((e) => e.tag && !Number.isNaN(e.q))
|
|
16
|
+
.sort((a, b) => b.q - a.q);
|
|
17
|
+
// 3️⃣ Select the best valid locale
|
|
18
|
+
for (const { tag } of entries) {
|
|
19
|
+
if (!tag)
|
|
20
|
+
continue;
|
|
21
|
+
try {
|
|
22
|
+
const locale = new Intl.Locale(tag);
|
|
23
|
+
// Match previous output format: de_CH instead of de-CH
|
|
24
|
+
return locale.language + (locale.region ? '_' + locale.region : '');
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Invalid locale tag -> ignore and continue
|
|
13
28
|
}
|
|
14
29
|
}
|
|
15
|
-
return
|
|
30
|
+
return undefined;
|
|
16
31
|
};
|
|
17
32
|
export default extractLocale;
|
|
@@ -1,20 +1,65 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import extractLocale from './extractLocale.js';
|
|
3
|
-
describe('
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
describe('extractLocale', () => {
|
|
4
|
+
describe('query parameter priority', () => {
|
|
5
|
+
it('should prioritize lang query parameter over Accept-Language header', () => {
|
|
6
|
+
expect(extractLocale({ lang: 'fr' }, 'de-CH,en-US;q=0.8')).toBe('fr');
|
|
7
|
+
});
|
|
8
|
+
it('should use header when lang parameter is missing', () => {
|
|
9
|
+
expect(extractLocale({}, 'de-CH')).toBe('de_CH');
|
|
10
|
+
});
|
|
11
|
+
it('should use header when lang parameter is not a string', () => {
|
|
12
|
+
expect(extractLocale({ lang: ['en', 'de'] }, 'de-CH')).toBe('de_CH');
|
|
13
|
+
});
|
|
6
14
|
});
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
describe('Accept-Language header parsing', () => {
|
|
16
|
+
it('should return undefined for undefined header', () => {
|
|
17
|
+
expect(extractLocale({}, undefined)).toBe(undefined);
|
|
18
|
+
});
|
|
19
|
+
it('should return undefined for empty header', () => {
|
|
20
|
+
expect(extractLocale({}, '')).toBe(undefined);
|
|
21
|
+
});
|
|
22
|
+
it('should parse single locale without region', () => {
|
|
23
|
+
expect(extractLocale({}, 'de')).toBe('de');
|
|
24
|
+
});
|
|
25
|
+
it('should parse single locale with region', () => {
|
|
26
|
+
expect(extractLocale({}, 'de-CH')).toBe('de_CH');
|
|
27
|
+
});
|
|
28
|
+
it('should parse multiple locales and return highest quality', () => {
|
|
29
|
+
expect(extractLocale({}, 'de-CH,de;q=0.8,en-US;q=0.6,en;q=0.4')).toBe('de_CH');
|
|
30
|
+
});
|
|
31
|
+
it('should respect quality values and select highest', () => {
|
|
32
|
+
expect(extractLocale({}, 'de;q=0.5,en-US;q=0.9,fr;q=0.7')).toBe('en_US');
|
|
33
|
+
});
|
|
34
|
+
it('should handle locales with equal quality (first wins)', () => {
|
|
35
|
+
expect(extractLocale({}, 'de-CH;q=0.8,en-US;q=0.8')).toBe('de_CH');
|
|
36
|
+
});
|
|
37
|
+
it('should skip invalid locale tags and try next', () => {
|
|
38
|
+
expect(extractLocale({}, '123-invalid,de-CH,en')).toBe('de_CH');
|
|
39
|
+
});
|
|
40
|
+
it('should handle whitespace in header', () => {
|
|
41
|
+
expect(extractLocale({}, ' de-CH , en-US ; q=0.8 ')).toBe('de_CH');
|
|
42
|
+
});
|
|
43
|
+
it('should handle missing quality value (defaults to 1)', () => {
|
|
44
|
+
expect(extractLocale({}, 'de-CH,en-US;q=0.9')).toBe('de_CH');
|
|
45
|
+
});
|
|
46
|
+
it('should handle malformed quality values', () => {
|
|
47
|
+
expect(extractLocale({}, 'de-CH;q=invalid,en-US')).toBe('en_US');
|
|
48
|
+
});
|
|
49
|
+
it('should return undefined when all locales are invalid', () => {
|
|
50
|
+
expect(extractLocale({}, '123-456,!invalid!')).toBe(undefined);
|
|
51
|
+
});
|
|
9
52
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
53
|
+
describe('locale format conversion', () => {
|
|
54
|
+
it('should convert hyphen to underscore in region codes', () => {
|
|
55
|
+
expect(extractLocale({}, 'en-GB')).toBe('en_GB');
|
|
56
|
+
expect(extractLocale({}, 'fr-CA')).toBe('fr_CA');
|
|
57
|
+
expect(extractLocale({}, 'pt-BR')).toBe('pt_BR');
|
|
58
|
+
});
|
|
59
|
+
it('should handle locale without region', () => {
|
|
60
|
+
expect(extractLocale({}, 'en')).toBe('en');
|
|
61
|
+
expect(extractLocale({}, 'de')).toBe('de');
|
|
62
|
+
expect(extractLocale({}, 'fr')).toBe('fr');
|
|
63
|
+
});
|
|
19
64
|
});
|
|
20
65
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.104.
|
|
3
|
+
"version": "4.104.14",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,19 +31,17 @@
|
|
|
31
31
|
"dev:embed": "tsx --watch ./run-embed-local.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@botfabrik/engine-domain": "^4.104.
|
|
35
|
-
"@botfabrik/engine-transcript-export": "^4.104.
|
|
36
|
-
"@botfabrik/engine-utils": "^4.104.
|
|
34
|
+
"@botfabrik/engine-domain": "^4.104.14",
|
|
35
|
+
"@botfabrik/engine-transcript-export": "^4.104.14",
|
|
36
|
+
"@botfabrik/engine-utils": "^4.104.14",
|
|
37
37
|
"@google-cloud/speech": "^7.2.1",
|
|
38
38
|
"@node-saml/passport-saml": "^5.1.0",
|
|
39
|
-
"accept-language-parser": "^1.5.0",
|
|
40
39
|
"express": "^5.2.1",
|
|
41
40
|
"flat": "^6.0.1",
|
|
42
41
|
"jose": "^6.1.3",
|
|
43
42
|
"passport": "^0.7.0"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
|
-
"@types/accept-language-parser": "^1.5.8",
|
|
47
45
|
"@types/express": "^5.0.6",
|
|
48
46
|
"@types/jsonwebtoken": "^9.0.10",
|
|
49
47
|
"@types/serve-static": "^2.2.0",
|
|
@@ -52,5 +50,5 @@
|
|
|
52
50
|
"tsx": "^4.21.0",
|
|
53
51
|
"typescript": "5.9.3"
|
|
54
52
|
},
|
|
55
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "0f4143ee7d5558c4b1089844682dcec91b0bb1b6"
|
|
56
54
|
}
|