@botfabrik/engine-webclient 4.121.5 → 4.122.0
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/README.md +13 -4
- package/dist/client/assets/{index-Dwmr7EiL.js → index-u0WiQbPl.js} +24 -24
- package/dist/client/assets/{index-Dwmr7EiL.js.map → index-u0WiQbPl.js.map} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/createSessionInfo.js +25 -10
- package/dist/createSessionInfo.test.js +3 -2
- package/dist/embed/bundle.js +1 -1
- package/dist/types.d.ts +26 -3
- package/package.json +4 -4
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-u0WiQbPl.js"></script>
|
|
17
17
|
<link rel="stylesheet" crossorigin href="./assets/index-Q0uFG8V2.css">
|
|
18
18
|
</head>
|
|
19
19
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { CLIENT_TYPE } from './constants.js';
|
|
2
|
-
const
|
|
2
|
+
const createSessionInfo = (socket, clientName, environment, sessionInfo, userId, locale, querystrings, authenticatedUser, props) => async () => {
|
|
3
|
+
const headers = socket.request.headers;
|
|
4
|
+
const ip = extractIpFromSocket(socket);
|
|
3
5
|
const client = {
|
|
4
6
|
...sessionInfo.client,
|
|
5
7
|
name: clientName,
|
|
6
8
|
type: CLIENT_TYPE,
|
|
7
9
|
payload: {
|
|
8
10
|
...sessionInfo.client.payload,
|
|
9
|
-
referrer: decodeURIComponent(querystrings['referrer'] ||
|
|
11
|
+
referrer: decodeURIComponent(querystrings['referrer'] ||
|
|
12
|
+
headers['referer'] ||
|
|
13
|
+
'unknown'),
|
|
10
14
|
querystrings,
|
|
11
15
|
},
|
|
12
16
|
};
|
|
@@ -29,17 +33,17 @@ const createSessionInfoBase = async (userId, querystrings, headers, clientName,
|
|
|
29
33
|
locale,
|
|
30
34
|
};
|
|
31
35
|
const contexts = sessionInfo.contexts;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
if (props.enrichUserInfo) {
|
|
37
|
+
const userInfos = await props.enrichUserInfo({
|
|
38
|
+
user,
|
|
39
|
+
querystrings,
|
|
40
|
+
headers,
|
|
41
|
+
ip,
|
|
42
|
+
});
|
|
43
|
+
user = { ...user, ...userInfos };
|
|
36
44
|
}
|
|
37
45
|
return { client, user, contexts, environment };
|
|
38
46
|
};
|
|
39
|
-
const createSessionInfo = (socket, clientName, environment, sessionInfo, userId, locale, querystrings, authenticatedUser, props) => async () => {
|
|
40
|
-
const request = socket.request;
|
|
41
|
-
return await createSessionInfoBase(userId, querystrings, request.headers, clientName, environment, sessionInfo, locale, authenticatedUser, props);
|
|
42
|
-
};
|
|
43
47
|
const guestNamesFromEMail = (email) => {
|
|
44
48
|
try {
|
|
45
49
|
const namePart = email?.split('@')[0];
|
|
@@ -61,4 +65,15 @@ const capitalize = (s) => {
|
|
|
61
65
|
return '';
|
|
62
66
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
63
67
|
};
|
|
68
|
+
const extractIpFromSocket = (socket) => {
|
|
69
|
+
const headers = socket.handshake.headers;
|
|
70
|
+
const forwarded = headers['x-forwarded-for'];
|
|
71
|
+
if (typeof forwarded === 'string') {
|
|
72
|
+
return forwarded.split(',')[0]?.trim();
|
|
73
|
+
}
|
|
74
|
+
if (Array.isArray(forwarded) && forwarded.length > 0) {
|
|
75
|
+
return forwarded[0];
|
|
76
|
+
}
|
|
77
|
+
return socket.handshake.address;
|
|
78
|
+
};
|
|
64
79
|
export default createSessionInfo;
|
|
@@ -22,6 +22,7 @@ describe('create session info', () => {
|
|
|
22
22
|
},
|
|
23
23
|
handshake: {
|
|
24
24
|
query: querystrings,
|
|
25
|
+
headers,
|
|
25
26
|
},
|
|
26
27
|
};
|
|
27
28
|
const webClientProps = {
|
|
@@ -54,7 +55,7 @@ describe('create session info', () => {
|
|
|
54
55
|
expect(sessionInfo.user.payload).toStrictEqual({});
|
|
55
56
|
});
|
|
56
57
|
it('with enhanced user data', async () => {
|
|
57
|
-
const
|
|
58
|
+
const enrichUserInfo = async () => {
|
|
58
59
|
const userProfile = {
|
|
59
60
|
username: 'hans.muster',
|
|
60
61
|
domain: 'PRIMARY',
|
|
@@ -69,7 +70,7 @@ describe('create session info', () => {
|
|
|
69
70
|
};
|
|
70
71
|
const props = {
|
|
71
72
|
...webClientProps,
|
|
72
|
-
|
|
73
|
+
enrichUserInfo,
|
|
73
74
|
};
|
|
74
75
|
const sessionInfo = await createSessionInfo(socket, 'my-client', 'TEST', defaultSessionInfo, 'my-user-id', 'de_DE', {}, undefined, props)();
|
|
75
76
|
expect(sessionInfo.user.id).toBe('hans.muster@PRIMARY');
|
package/dist/embed/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=Array.isArray,r=Array.prototype.indexOf,i=Array.prototype.includes,a=Array.from,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,l=Object.prototype,u=Array.prototype,d=Object.getPrototypeOf,f=Object.isExtensible,p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var g=1024,_=2048,v=4096,y=8192,ee=16384,te=32768,ne=1<<25,re=65536,ie=1<<18,ae=1<<19,oe=1<<20,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ce(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function we(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Te(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ee(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function De(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Oe(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function ke(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ae(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var je={},b=Symbol(`uninitialized`),Me=`http://www.w3.org/1999/xhtml`;function Ne(){console.warn(`https://svelte.dev/e/derived_inert`)}function Pe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Fe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var x=!1;function Ie(e){x=e}var S;function C(e){if(e===null)throw Pe(),je;return S=e}function Le(){return C(L(S))}function Re(e){if(x){if(L(S)!==null)throw Pe(),je;S=e}}function ze(e=1){if(x){for(var t=e,n=S;t--;)n=L(n);S=n}}function Be(e=!0){for(var t=0,n=S;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=L(n);e&&n.remove(),n=i}}function Ve(e){if(!e||e.nodeType!==8)throw Pe(),je;return e.data}function He(e){return e===this.v}function Ue(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function We(e){return!Ue(e,this.v)}var w=!1,Ge=!1,T=null;function Ke(e){T=e}function qe(e,t=!1,n){T={p:T,i:!1,c:null,e:null,s:e,x:null,r:G,l:Ge&&!t?{s:null,u:null,$:[]}:null}}function Je(e){var t=T,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,T=t.p,e??{}}function Ye(){return!Ge||T!==null&&T.l===null}var Xe=[];function Ze(){var e=Xe;Xe=[],m(e)}function Qe(e){if(Xe.length===0&&!dt){var t=Xe;queueMicrotask(()=>{t===Xe&&Ze()})}Xe.push(e)}function $e(e){var t=G;if(t===null)return H.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;E(e,t)}function E(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var et=~(_|v|g);function D(e,t){e.f=e.f&et|t}function tt(e){e.f&512||e.deps===null?D(e,g):D(e,v)}function nt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,nt(t.deps))}function rt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),nt(e.deps),D(e,g)}var it=!1,at=!1;function ot(e){var t=at;try{return at=!1,[e(),at]}finally{at=t}}var st=null,ct=null,O=null,lt=null,k=null,ut=null,dt=!1,ft=!1,A=null,pt=null,mt=0,ht=1,gt=class e{id=ht++;#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;#a=new Set;#o=0;#s=new Map;#c=null;#l=[];#u=[];#d=new Set;#f=new Set;#p=new Map;#m=new Set;is_fork=!1;#h=!1;#g(){if(this.is_fork)return!0;for(let n of this.#s.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#p.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#p.has(e)||this.#p.set(e,{d:[],m:[]}),this.#m.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#p.get(e);if(n){this.#p.delete(e);for(var r of n.d)D(r,_),t(r);for(r of n.m)D(r,v),t(r)}this.#m.add(e)}#_(){if(this.#e=!0,mt++>1e3&&(this.#w(),_t()),!this.#g()){for(let e of this.#d)this.#f.delete(e),D(e,_),this.schedule(e);for(let e of this.#f)D(e,v),this.schedule(e)}let t=this.#l;this.#l=[],this.apply();var n=A=[],r=[],i=pt=[];for(let e of t)try{this.#v(e,n,r)}catch(t){throw Ct(e),t}if(O=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(A=null,pt=null,this.#g()){this.#x(r),this.#x(n);for(let[e,t]of this.#p)St(e,t);i.length>0&&O.#_();return}let o=this.#y();if(o){o.#b(this);return}this.#d.clear(),this.#f.clear();for(let e of this.#r)e(this);this.#r.clear(),lt=this,vt(r),vt(n),lt=null,this.#c?.resolve();var s=O;if(this.linked&&this.#o===0&&this.#w(),w&&!this.linked&&(this.#S(),O=s),this.#l.length>0){s===null&&(s=this,this.#C());let e=s;e.#l.push(...this.#l.filter(t=>!e.#l.includes(t)))}s!==null&&s.#_()}#v(e,t,n){e.f^=g;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#p.has(r))&&r.fn!==null){a?r.f^=g:i&4?t.push(r):w&&i&16777224?n.push(r):Rn(r)&&(i&16&&this.#f.add(r),Un(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[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(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#f.delete(i),D(i,_),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#w(),O=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)rt(e[t],this.#d,this.#f)}capture(e,t,n=!1){e.v!==b&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),k?.set(e,t)),this.is_fork||(e.v=t)}activate(){O=this}deactivate(){O=null,k=null}flush(){try{ft=!0,O=this,this.#_()}finally{mt=0,ut=null,A=null,pt=null,ft=!1,O=null,k=null,M.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear(),this.#a.clear(),this.#w()}register_created_effect(e){this.#u.push(e)}#S(){this.#w();for(let l=st;l!==null;l=l.#n){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=l.async_deriveds.get(e);n&&t.promise.then(n.resolve)}if(l.#e){var r=[...l.current.keys()].filter(e=>!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#m)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#x([e])});l.activate();var i=new Set,a=new Map;for(var o of t)yt(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e.v:!0);if(s.length>0)for(let e of this.#u)!(e.f&155648)&&bt(e,s,a)&&(e.f&4194320?(D(e,_),l.schedule(e)):l.#d.add(e));if(l.#l.length>0){l.apply();for(var c of l.#l)l.#v(c,[],[]);l.#l=[]}l.deactivate()}}}}increment(e,t){if(this.#o+=1,e){let e=this.#s.get(t)??0;this.#s.set(t,e+1)}}decrement(e,t){if(--this.#o,e){let e=this.#s.get(t)??0;e===1?this.#s.delete(t):this.#s.set(t,e-1)}this.#h||(this.#h=!0,Qe(()=>{this.#h=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#d.add(t);for(let 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.#a.add(e)}run_fork_commit_callbacks(){for(let e of this.#a)e(this);this.#a.clear()}settled(){return(this.#c??=h()).promise}static ensure(){if(O===null){let t=O=new e;t.#C(),!ft&&!dt&&Qe(()=>{t.#e||t.flush()})}return O}apply(){if(!w||!this.is_fork&&this.#t===null&&this.#n===null){k=null;return}k=new Map;for(let[e,[t]]of this.current)k.set(e,t);for(let t=st;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)k.has(e)||k.set(e,n)}}schedule(e){if(ut=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(A!==null&&t===G&&(w||(H===null||!(H.f&2))&&!it))return;if(n&96){if(!(n&1024))return;t.f^=g}}this.#l.push(t)}#C(){ct===null?st=ct=this:(ct.#n=this,this.#t=ct),ct=this}#w(){var e=this.#t,t=this.#n;e===null?st=t:e.#n=t,t===null?ct=e:t.#t=e,this.linked=!1}};function _t(){try{Te()}catch(e){E(e,ut)}}var j=null;function vt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Rn(r)&&(j=new Set,Un(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&wn(r),j?.size>0)){M.clear();for(let e of j){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)j.has(n)&&(j.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Un(n)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?yt(i,t,n,r):e&4194320&&!(e&2048)&&bt(i,t,r)&&(D(i,_),xt(i))}}function bt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(i.call(t,r))return!0;if(r.f&2&&bt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function xt(e){O.schedule(e)}function St(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),D(e,g);for(var n=e.first;n!==null;)St(n,t),n=n.next}}function Ct(e){D(e,g);for(var t=e.first;t!==null;)Ct(t),t=t.next}function wt(e){let t=0,n=Ut(0),r;return()=>{un()&&($(n),_n(()=>(t===0&&(r=Kn(()=>e(()=>Kt(n)))),t+=1,()=>{Qe(()=>{--t,t===0&&(r?.(),r=void 0,Kt(n))})})))}}var Tt=re|ae;function Et(e,t,n,r){new Dt(e,t,n,r)}var Dt=class{parent;is_pending=!1;transform_error;#e;#t=x?S:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=wt(()=>(this.#m=Ut(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=G;t.b=this,t.f|=128,n(e)},this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=yn(()=>{if(x){let e=this.#t;Le();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Tt),x&&(this.#e=S)}#g(){try{this.#a=z(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=z(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=z(()=>e(this.#e)),Qe(()=>{var e=this.#c=document.createDocumentFragment(),t=I();e.append(t),this.#a=this.#x(()=>z(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Tn(this.#o,()=>{this.#o=null}),this.#b(O))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=z(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();kn(this.#a,e);let t=this.#n.pending;this.#o=z(()=>t(this.#e))}else this.#b(O)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){rt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=G,n=H,r=T;K(this.#i),W(this.#i),Ke(this.#i.ctx);try{return gt.ensure(),e()}catch(e){return $e(e),null}finally{K(t),W(n),Ke(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Tn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Qe(()=>{this.#d=!1,this.#m&&Wt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),$(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;O?.is_fork?(this.#a&&O.skip_effect(this.#a),this.#o&&O.skip_effect(this.#o),this.#s&&O.skip_effect(this.#s),O.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(B(this.#a),null),this.#o&&=(B(this.#o),null),this.#s&&=(B(this.#s),null),x&&(C(this.#t),ze(),C(Be()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Fe();return}r=!0,i&&Ae(),this.#s!==null&&Tn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){E(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return z(()=>{var t=G;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return E(e,this.#i.parent),null}}))};Qe(()=>{var t;try{t=this.transform_error(e)}catch(e){E(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>E(e,this.#i&&this.#i.parent)):o(t)})}};function Ot(e,t,n,r){let i=Ye()?Mt:Ft;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=G,s=kt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){if(!(o.f&16384)){s();try{r(e)}catch(e){E(e,o)}At()}}var u=jt();if(n.length===0){c.then(()=>l(t.map(i))).finally(u);return}function d(){Promise.all(n.map(e=>Pt(e))).then(e=>l([...t.map(i),...e])).catch(e=>E(e,o)).finally(u)}c?c.then(()=>{s(),d(),At()}):d()}function kt(){var e=G,t=H,n=T,r=O;return function(i=!0){K(e),W(t),Ke(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function At(e=!0){K(null),W(null),Ke(null),e&&O?.deactivate()}function jt(){var e=G,t=e.b,n=O,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)}}function Mt(e){var t=2|_;return G!==null&&(G.f|=ae),{ctx:T,deps:null,effects:null,equals:He,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:G,ac:null}}var Nt=Symbol(`obsolete`);function Pt(e,t,n){let r=G;r===null&&xe();var i=void 0,a=Ut(b),o=!H,s=new Set;return gn(()=>{var t=G,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(At)}catch(e){n.reject(e),At()}var c=O;if(o){if(t.f&32768)var l=jt();if(r.b.is_rendered())c.async_deriveds.get(t)?.reject(Nt);else for(let e of s.values())e.reject(Nt);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Nt&&(c.activate(),t?(a.f|=ue,Wt(a,t)):(a.f&8388608&&(a.f^=ue),Wt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of s)e.reject(Nt)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function Ft(e){let t=Mt(e);return t.equals=We,t}function It(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function Lt(e){var t,n=G,r=e.parent;if(!V&&r!==null&&e.v!==b&&r.f&24576)return Ne(),e.v;K(r);try{e.f&=~se,It(e),t=Bn(e)}finally{K(n)}return t}function Rt(e){var t=Lt(e);if(!e.equals(t)&&(e.wv=Ln(),(!O?.is_fork||e.deps===null)&&(O===null?e.v=t:(O.capture(e,t,!0),lt?.capture(e,t,!0)),e.deps===null))){D(e,g);return}V||(k===null?tt(e):(un()||O?.is_fork)&&k.set(e,t))}function zt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=p),t.ac=null,Hn(t,0),xn(t))}function Bt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Un(t)}var Vt=new Set,M=new Map,Ht=!1;function Ut(e,t){return{f:0,v:e,reactions:null,equals:He,rv:0,wv:0}}function N(e,t){let n=Ut(e,t);return Nn(n),n}function P(e,t,n=!1){return H!==null&&(!U||H.f&131072)&&Ye()&&H.f&4325394&&(q===null||!i.call(q,e))&&ke(),Wt(e,n?F(t):t,pt)}function Wt(e,t,n=null){if(!e.equals(t)){M.set(e,V?t:e.v);var r=gt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Lt(t),k===null&&tt(t)}e.wv=Ln(),qt(e,_,n),Ye()&&G!==null&&G.f&1024&&!(G.f&96)&&(X===null?Pn([e]):X.push(e)),!r.is_fork&&Vt.size>0&&!Ht&&Gt()}return t}function Gt(){Ht=!1;for(let e of Vt){e.f&1024&&D(e,v);let t;try{t=Rn(e)}catch{t=!0}t&&Un(e)}Vt.clear()}function Kt(e){P(e,e.v+1)}function qt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Ye(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&_)===0;if(l&&D(s,t),c&131072)Vt.add(s);else if(c&2){var u=s;k?.delete(u),c&65536||(c&512&&(G===null||!(G.f&2097152))&&(s.f|=se),qt(u,v,n))}else if(l){var d=s;c&16&&j!==null&&j.add(d),n===null?xt(d):n.push(d)}}}}function F(e){if(typeof e!=`object`||!e||de in e)return e;let t=d(e);if(t!==l&&t!==u)return e;var r=new Map,i=n(e),a=N(0),o=null,c=Q,f=e=>{if(Q===c)return e();var t=H,n=Q;W(null),In(c);var r=e();return W(t),In(n),r};return i&&r.set(`length`,N(e.length,o)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&De();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,o);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(b,o));r.set(t,e),Kt(a)}}else P(n,b),Kt(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||s(t,n)?.writable)&&(a=f(()=>N(F(c?t[n]:b),o)),r.set(n,a)),a!==void 0){var l=$(a);return l===b?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=$(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==b)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==b||Reflect.has(e,t);return(n!==void 0||G!==null&&(!i||s(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?F(e[t]):b,o)),r.set(t,n)),$(n)===b)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(b,o)),r.set(d+``,p)):P(p,b)}if(l===void 0)(!u||s(e,t)?.writable)&&(l=f(()=>N(void 0,o)),P(l,F(n)),r.set(t,l));else{u=l.v!==b;var m=f(()=>F(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}Kt(a)}return!0},ownKeys(e){$(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==b});for(var[n,i]of r)i.v!==b&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Oe()}})}var Jt,Yt,Xt,Zt;function Qt(){if(Jt===void 0){Jt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xt=s(t,`firstChild`).get,Zt=s(t,`nextSibling`).get,f(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),f(n)&&(n[_e]=void 0)}}function I(e=``){return document.createTextNode(e)}function $t(e){return Xt.call(e)}function L(e){return Zt.call(e)}function en(e,t){if(!x)return $t(e);var n=$t(S);if(n===null)n=S.appendChild(I());else if(t&&n.nodeType!==3){var r=I();return n?.before(r),C(r),r}return t&&on(n),C(n),n}function tn(e,t=!1){if(!x){var n=$t(e);return n instanceof Comment&&n.data===``?L(n):n}if(t){if(S?.nodeType!==3){var r=I();return S?.before(r),C(r),r}on(S)}return S}function nn(e,t=1,n=!1){let r=x?S:e;for(var i;t--;)i=r,r=L(r);if(!x)return r;if(n){if(r?.nodeType!==3){var a=I();return r===null?i?.after(a):r.before(a),C(a),a}on(r)}return C(r),r}function rn(){return!w||j!==null?!1:(G.f&te)!==0}function an(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function on(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function sn(e){var t=H,n=G;W(null),K(null);try{return e()}finally{W(t),K(n)}}function cn(e){G===null&&(H===null&&we(e),Ce()),V&&Se(e)}function ln(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function R(e,t){var n=G;n!==null&&n.f&8192&&(e|=y);var r={ctx:T,deps:null,nodes:null,f:e|_|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};O?.register_created_effect(r);var i=r;if(e&4)A===null?gt.ensure().schedule(r):A.push(r);else if(t!==null){try{Un(r)}catch(e){throw B(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=re))}if(i!==null&&(i.parent=n,n!==null&&ln(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function un(){return H!==null&&!U}function dn(e){let t=R(8,null);return D(t,g),t.teardown=e,t}function fn(e){cn(`$effect`);var t=G.f;if(!H&&t&32&&!(t&32768)){var n=T;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return R(4|oe,e)}function mn(e){gt.ensure();let t=R(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Tn(t,()=>{B(t),n(void 0)}):(B(t),n(void 0))})}function hn(e){return R(4,e)}function gn(e){return R(le|ae,e)}function _n(e,t=0){return R(8|t,e)}function vn(e,t=[],n=[],r=[]){Ot(r,t,n,t=>{R(8,()=>e(...t.map($)))})}function yn(e,t=0){return R(16|t,e)}function z(e){return R(32|ae,e)}function bn(e){var t=e.teardown;if(t!==null){let e=V,n=H;Mn(!0),W(null);try{t.call(null)}finally{Mn(e),W(n)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&sn(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:B(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||B(t),t=n}}function B(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Cn(e.nodes.start,e.nodes.end),n=!0),D(e,ne),xn(e,t&&!n),Hn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=ne,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&wn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Cn(e,t){for(;e!==null;){var n=e===t?null:L(e);e.remove(),e=n}}function wn(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 Tn(e,t,n=!0){var r=[];En(e,r,!0);var i=()=>{n&&B(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function En(e,t,n){if(!(e.f&8192)){e.f^=y;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;En(i,t,o?n:!1)}i=a}}}function Dn(e){On(e,!0)}function On(e,t){if(e.f&8192){e.f^=y,e.f&1024||(D(e,_),gt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;On(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function kn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:L(n);t.append(n),n=i}}var An=null,jn=!1,V=!1;function Mn(e){V=e}var H=null,U=!1;function W(e){H=e}var G=null;function K(e){G=e}var q=null;function Nn(e){H!==null&&(!w||H.f&2)&&(q===null?q=[e]:q.push(e))}var J=null,Y=0,X=null;function Pn(e){X=e}var Fn=1,Z=0,Q=Z;function In(e){Q=e}function Ln(){return++Fn}function Rn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Rn(a)&&Rt(a),a.wv>e.wv)return!0}t&512&&k===null&&D(e,g)}return!1}function zn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!w&&q!==null&&i.call(q,e)))for(var a=0;a<r.length;a++){var o=r[a];o.f&2?zn(o,t,!1):t===o&&(n?D(o,_):o.f&1024&&D(o,v),xt(o))}}function Bn(e){var t=J,n=Y,r=X,i=H,a=q,o=T,s=U,c=Q,l=e.f;J=null,Y=0,X=null,H=l&96?null:e,q=null,Ke(e.ctx),U=!1,Q=++Z,e.ac!==null&&(sn(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=te;var f=e.deps,p=O?.is_fork;if(J!==null){var m;if(p||Hn(e,Y),f!==null&&Y>0)for(f.length=Y+J.length,m=0;m<J.length;m++)f[Y+m]=J[m];else e.deps=f=J;if(un()&&e.f&512)for(m=Y;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Y<f.length&&(Hn(e,Y),f.length=Y);if(Ye()&&X!==null&&!U&&f!==null&&!(e.f&6146))for(m=0;m<X.length;m++)zn(X[m],e);if(i!==null&&i!==e){if(Z++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Z;if(t!==null)for(let e of t)e.rv=Z;X!==null&&(r===null?r=X:r.push(...X))}return e.f&8388608&&(e.f^=ue),d}catch(e){return $e(e)}finally{e.f^=ce,J=t,Y=n,X=r,H=i,q=a,Ke(o),U=s,Q=c}}function Vn(e,t){let n=t.reactions;if(n!==null){var a=r.call(n,e);if(a!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[a]=n[o],n.pop())}}if(n===null&&t.f&2&&(J===null||!i.call(J,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~se),s.v!==b&&tt(s),zt(s),Hn(s,0)}}function Hn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Vn(e,n[r])}function Un(e){var t=e.f;if(!(t&16384)){D(e,g);var n=G,r=jn;G=e,jn=!0;try{t&16777232?Sn(e):xn(e),bn(e);var i=Bn(e);e.teardown=typeof i==`function`?i:null,e.wv=Fn}finally{jn=r,G=n}}}function $(e){var t=(e.f&2)!=0;if(An?.add(e),H!==null&&!U&&!(G!==null&&G.f&16384)&&(q===null||!i.call(q,e))){var n=H.deps;if(H.f&2097152)e.rv<Z&&(e.rv=Z,J===null&&n!==null&&n[Y]===e?Y++:J===null?J=[e]:J.push(e));else{(H.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[H]:i.call(r,H)||r.push(H)}}if(V&&M.has(e))return M.get(e);if(t){var a=e;if(V){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||Gn(a))&&(o=Lt(a)),M.set(a,o),o}var s=(a.f&512)==0&&!U&&H!==null&&(jn||(H.f&512)!=0),c=(a.f&te)===0;Rn(a)&&(s&&(a.f|=512),Rt(a)),s&&!c&&(Bt(a),Wn(a))}if(k?.has(e))return k.get(e);if(e.f&8388608)throw e.v;return e.v}function Wn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Bt(t),Wn(t))}function Gn(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(M.has(t)||t.f&2&&Gn(t))return!0;return!1}function Kn(e){var t=U;try{return U=!0,e()}finally{U=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var qn=[`touchstart`,`touchmove`];function Jn(e){return qn.includes(e)}var Yn=Symbol(`events`),Xn=new Set,Zn=new Set;function Qn(e,t,n){(t[Yn]??={})[e]=n}function $n(e){for(var t=0;t<e.length;t++)Xn.add(e[t]);for(var n of Zn)n(e)}var er=null;function tr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;er=e;var s=0,c=er===e&&e[Yn];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Yn]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(a=i[s]||e.target,a!==t){o(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=H,f=G;W(null),K(null);try{for(var p,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[Yn]?.[r];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble||h===t||h===null)break;a=h}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Yn]=t,delete e.currentTarget,W(d),K(f)}}}var nr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function rr(e){return nr?.createHTML(e)??e}function ir(e){var t=an(`template`);return t.innerHTML=rr(e.replaceAll(`<!>`,`<!---->`)),t.content}function ar(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function or(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(x)return ar(S,null),S;i===void 0&&(i=ir(a?e:`<!>`+e),n||(i=$t(i)));var t=r||Yt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=$t(t),s=t.lastChild;ar(o,s)}else ar(t,t);return t}}function sr(){if(x)return ar(S,null),S;var e=document.createDocumentFragment(),t=document.createComment(``),n=I();return e.append(t,n),ar(t,n),e}function cr(e,t){if(x){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=S),Le();return}e!==null&&e.before(t)}function lr(e,t){return dr(e,t)}var ur=new Map;function dr(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:c}){Qt();var l=void 0,u=mn(()=>{var s=n??t.appendChild(I());Et(s,{pending:()=>{}},t=>{qe({});var n=T;if(o&&(n.c=o),i&&(r.$$events=i),x&&ar(t,null),l=e(t,r)||{},x&&(G.nodes.end=S,S===null||S.nodeType!==8||S.data!==`]`))throw Pe(),je;Je()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Jn(r);for(let e of[t,document]){var a=ur.get(e);a===void 0&&(a=new Map,ur.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,tr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(a(Xn)),Zn.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=ur.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,tr),r.delete(e),r.size===0&&ur.delete(n)):r.set(e,i)}Zn.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return fr.set(l,u),l}var fr=new WeakMap,pr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Dn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(B(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();kn(r,t),t.append(I()),this.#n.set(e,{effect:r,fragment:t})}else B(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Tn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(B(n.effect),this.#n.delete(e))};ensure(e,t){var n=O,r=rn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=I();i.append(a),this.#n.set(e,{effect:z(()=>t(a)),fragment:i})}else this.#t.set(e,z(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else x&&(this.anchor=S),this.#a(n)}};function mr(e,t,n=!1){var r;x&&(r=S,Le());var i=new pr(e),a=n?re:0;function o(e,t){if(x){var n=Ve(r);if(e!==parseInt(n.substring(1))){var a=Be();C(a),i.anchor=a,Ie(!1),i.ensure(e,t),Ie(!0);return}}i.ensure(e,t)}yn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function hr(e,t){let n=null,r=x;var i;if(x){n=S;for(var a=$t(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=L(a);if(a===null)Ie(!1);else{var o=L(a);a.remove(),C(o)}}x||(i=document.head.appendChild(I()));try{yn(()=>{var e=z(()=>t(i));e.f|=ie})}finally{r&&(Ie(!0),C(n))}}function gr(e,t){hn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=an(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var _r=[...`
|
|
1
|
+
(function(){var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=Array.isArray,r=Array.prototype.indexOf,i=Array.prototype.includes,a=Array.from,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,l=Object.prototype,u=Array.prototype,d=Object.getPrototypeOf,f=Object.isExtensible,p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var g=1024,_=2048,v=4096,y=8192,ee=16384,te=32768,ne=1<<25,re=65536,ie=1<<18,ae=1<<19,oe=1<<20,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ce(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function we(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Te(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ee(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function De(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Oe(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function ke(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ae(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var je={},b=Symbol(`uninitialized`),Me=`http://www.w3.org/1999/xhtml`;function Ne(){console.warn(`https://svelte.dev/e/derived_inert`)}function Pe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Fe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var x=!1;function Ie(e){x=e}var S;function C(e){if(e===null)throw Pe(),je;return S=e}function Le(){return C(L(S))}function Re(e){if(x){if(L(S)!==null)throw Pe(),je;S=e}}function ze(e=1){if(x){for(var t=e,n=S;t--;)n=L(n);S=n}}function Be(e=!0){for(var t=0,n=S;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=L(n);e&&n.remove(),n=i}}function Ve(e){if(!e||e.nodeType!==8)throw Pe(),je;return e.data}function He(e){return e===this.v}function Ue(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function We(e){return!Ue(e,this.v)}var w=!1,Ge=!1,T=null;function Ke(e){T=e}function qe(e,t=!1,n){T={p:T,i:!1,c:null,e:null,s:e,x:null,r:G,l:Ge&&!t?{s:null,u:null,$:[]}:null}}function Je(e){var t=T,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,T=t.p,e??{}}function Ye(){return!Ge||T!==null&&T.l===null}var Xe=[];function Ze(){var e=Xe;Xe=[],m(e)}function Qe(e){if(Xe.length===0&&!dt){var t=Xe;queueMicrotask(()=>{t===Xe&&Ze()})}Xe.push(e)}function $e(e){var t=G;if(t===null)return H.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;E(e,t)}function E(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var et=~(_|v|g);function D(e,t){e.f=e.f&et|t}function tt(e){e.f&512||e.deps===null?D(e,g):D(e,v)}function nt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,nt(t.deps))}function rt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),nt(e.deps),D(e,g)}var it=!1,at=!1;function ot(e){var t=at;try{return at=!1,[e(),at]}finally{at=t}}var st=null,ct=null,O=null,lt=null,k=null,ut=null,dt=!1,ft=!1,A=null,pt=null,mt=0,ht=1,gt=class e{id=ht++;#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;#a=new Set;#o=0;#s=new Map;#c=null;#l=[];#u=[];#d=new Set;#f=new Set;#p=new Map;#m=new Set;is_fork=!1;#h=!1;#g(){if(this.is_fork)return!0;for(let n of this.#s.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#p.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#p.has(e)||this.#p.set(e,{d:[],m:[]}),this.#m.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#p.get(e);if(n){this.#p.delete(e);for(var r of n.d)D(r,_),t(r);for(r of n.m)D(r,v),t(r)}this.#m.add(e)}#_(){if(this.#e=!0,mt++>1e3&&(this.#w(),_t()),!this.#g()){for(let e of this.#d)this.#f.delete(e),D(e,_),this.schedule(e);for(let e of this.#f)D(e,v),this.schedule(e)}let t=this.#l;this.#l=[],this.apply();var n=A=[],r=[],i=pt=[];for(let e of t)try{this.#v(e,n,r)}catch(t){throw Ct(e),t}if(O=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(A=null,pt=null,this.#g()){this.#x(r),this.#x(n);for(let[e,t]of this.#p)St(e,t);i.length>0&&O.#_();return}let o=this.#y();if(o){o.#b(this);return}this.#d.clear(),this.#f.clear();for(let e of this.#r)e(this);this.#r.clear(),lt=this,vt(r),vt(n),lt=null,this.#c?.resolve();var s=O;if(this.linked&&this.#o===0&&this.#w(),w&&!this.linked&&(this.#S(),O=s),this.#l.length>0){s===null&&(s=this,this.#C());let e=s;e.#l.push(...this.#l.filter(t=>!e.#l.includes(t)))}s!==null&&s.#_()}#v(e,t,n){e.f^=g;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#p.has(r))&&r.fn!==null){a?r.f^=g:i&4?t.push(r):w&&i&16777224?n.push(r):Rn(r)&&(i&16&&this.#f.add(r),Un(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[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(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#f.delete(i),D(i,_),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#w(),O=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)rt(e[t],this.#d,this.#f)}capture(e,t,n=!1){e.v!==b&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),k?.set(e,t)),this.is_fork||(e.v=t)}activate(){O=this}deactivate(){O=null,k=null}flush(){try{ft=!0,O=this,this.#_()}finally{mt=0,ut=null,A=null,pt=null,ft=!1,O=null,k=null,M.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear(),this.#a.clear(),this.#w()}register_created_effect(e){this.#u.push(e)}#S(){this.#w();for(let l=st;l!==null;l=l.#n){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=l.async_deriveds.get(e);n&&t.promise.then(n.resolve)}if(l.#e){var r=[...l.current.keys()].filter(e=>!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#m)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#x([e])});l.activate();var i=new Set,a=new Map;for(var o of t)yt(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e.v:!0);if(s.length>0)for(let e of this.#u)!(e.f&155648)&&bt(e,s,a)&&(e.f&4194320?(D(e,_),l.schedule(e)):l.#d.add(e));if(l.#l.length>0&&!l.#h){l.apply();for(var c of l.#l)l.#v(c,[],[]);l.#l=[]}l.deactivate()}}}}increment(e,t){if(this.#o+=1,e){let e=this.#s.get(t)??0;this.#s.set(t,e+1)}}decrement(e,t){if(--this.#o,e){let e=this.#s.get(t)??0;e===1?this.#s.delete(t):this.#s.set(t,e-1)}this.#h||(this.#h=!0,Qe(()=>{this.#h=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#d.add(t);for(let 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.#a.add(e)}run_fork_commit_callbacks(){for(let e of this.#a)e(this);this.#a.clear()}settled(){return(this.#c??=h()).promise}static ensure(){if(O===null){let t=O=new e;t.#C(),!ft&&!dt&&Qe(()=>{t.#e||t.flush()})}return O}apply(){if(!w||!this.is_fork&&this.#t===null&&this.#n===null){k=null;return}k=new Map;for(let[e,[t]]of this.current)k.set(e,t);for(let t=st;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)k.has(e)||k.set(e,n)}}schedule(e){if(ut=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(A!==null&&t===G&&(w||(H===null||!(H.f&2))&&!it))return;if(n&96){if(!(n&1024))return;t.f^=g}}this.#l.push(t)}#C(){ct===null?st=ct=this:(ct.#n=this,this.#t=ct),ct=this}#w(){var e=this.#t,t=this.#n;e===null?st=t:e.#n=t,t===null?ct=e:t.#t=e,this.linked=!1}};function _t(){try{Te()}catch(e){E(e,ut)}}var j=null;function vt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Rn(r)&&(j=new Set,Un(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&wn(r),j?.size>0)){M.clear();for(let e of j){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)j.has(n)&&(j.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Un(n)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?yt(i,t,n,r):e&4194320&&!(e&2048)&&bt(i,t,r)&&(D(i,_),xt(i))}}function bt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(i.call(t,r))return!0;if(r.f&2&&bt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function xt(e){O.schedule(e)}function St(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),D(e,g);for(var n=e.first;n!==null;)St(n,t),n=n.next}}function Ct(e){D(e,g);for(var t=e.first;t!==null;)Ct(t),t=t.next}function wt(e){let t=0,n=Ut(0),r;return()=>{un()&&($(n),_n(()=>(t===0&&(r=Kn(()=>e(()=>Kt(n)))),t+=1,()=>{Qe(()=>{--t,t===0&&(r?.(),r=void 0,Kt(n))})})))}}var Tt=re|ae;function Et(e,t,n,r){new Dt(e,t,n,r)}var Dt=class{parent;is_pending=!1;transform_error;#e;#t=x?S:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=wt(()=>(this.#m=Ut(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=G;t.b=this,t.f|=128,n(e)},this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=yn(()=>{if(x){let e=this.#t;Le();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Tt),x&&(this.#e=S)}#g(){try{this.#a=z(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=z(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=z(()=>e(this.#e)),Qe(()=>{var e=this.#c=document.createDocumentFragment(),t=I();e.append(t),this.#a=this.#x(()=>z(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Tn(this.#o,()=>{this.#o=null}),this.#b(O))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=z(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();kn(this.#a,e);let t=this.#n.pending;this.#o=z(()=>t(this.#e))}else this.#b(O)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){rt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=G,n=H,r=T;K(this.#i),W(this.#i),Ke(this.#i.ctx);try{return gt.ensure(),e()}catch(e){return $e(e),null}finally{K(t),W(n),Ke(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Tn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Qe(()=>{this.#d=!1,this.#m&&Wt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),$(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;O?.is_fork?(this.#a&&O.skip_effect(this.#a),this.#o&&O.skip_effect(this.#o),this.#s&&O.skip_effect(this.#s),O.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(B(this.#a),null),this.#o&&=(B(this.#o),null),this.#s&&=(B(this.#s),null),x&&(C(this.#t),ze(),C(Be()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Fe();return}r=!0,i&&Ae(),this.#s!==null&&Tn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){E(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return z(()=>{var t=G;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return E(e,this.#i.parent),null}}))};Qe(()=>{var t;try{t=this.transform_error(e)}catch(e){E(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>E(e,this.#i&&this.#i.parent)):o(t)})}};function Ot(e,t,n,r){let i=Ye()?Mt:Ft;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=G,s=kt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){if(!(o.f&16384)){s();try{r(e)}catch(e){E(e,o)}At()}}var u=jt();if(n.length===0){c.then(()=>l(t.map(i))).finally(u);return}function d(){Promise.all(n.map(e=>Pt(e))).then(e=>l([...t.map(i),...e])).catch(e=>E(e,o)).finally(u)}c?c.then(()=>{s(),d(),At()}):d()}function kt(){var e=G,t=H,n=T,r=O;return function(i=!0){K(e),W(t),Ke(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function At(e=!0){K(null),W(null),Ke(null),e&&O?.deactivate()}function jt(){var e=G,t=e.b,n=O,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)}}function Mt(e){var t=2|_;return G!==null&&(G.f|=ae),{ctx:T,deps:null,effects:null,equals:He,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:G,ac:null}}var Nt=Symbol(`obsolete`);function Pt(e,t,n){let r=G;r===null&&xe();var i=void 0,a=Ut(b),o=!H,s=new Set;return gn(()=>{var t=G,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(At)}catch(e){n.reject(e),At()}var c=O;if(o){if(t.f&32768)var l=jt();if(r.b.is_rendered())c.async_deriveds.get(t)?.reject(Nt);else for(let e of s.values())e.reject(Nt);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Nt&&(c.activate(),t?(a.f|=ue,Wt(a,t)):(a.f&8388608&&(a.f^=ue),Wt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of s)e.reject(Nt)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function Ft(e){let t=Mt(e);return t.equals=We,t}function It(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function Lt(e){var t,n=G,r=e.parent;if(!V&&r!==null&&e.v!==b&&r.f&24576)return Ne(),e.v;K(r);try{e.f&=~se,It(e),t=Bn(e)}finally{K(n)}return t}function Rt(e){var t=Lt(e);if(!e.equals(t)&&(e.wv=Ln(),(!O?.is_fork||e.deps===null)&&(O===null?e.v=t:(O.capture(e,t,!0),lt?.capture(e,t,!0)),e.deps===null))){D(e,g);return}V||(k===null?tt(e):(un()||O?.is_fork)&&k.set(e,t))}function zt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=p),t.ac=null,Hn(t,0),xn(t))}function Bt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Un(t)}var Vt=new Set,M=new Map,Ht=!1;function Ut(e,t){return{f:0,v:e,reactions:null,equals:He,rv:0,wv:0}}function N(e,t){let n=Ut(e,t);return Nn(n),n}function P(e,t,n=!1){return H!==null&&(!U||H.f&131072)&&Ye()&&H.f&4325394&&(q===null||!i.call(q,e))&&ke(),Wt(e,n?F(t):t,pt)}function Wt(e,t,n=null){if(!e.equals(t)){M.set(e,V?t:e.v);var r=gt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Lt(t),k===null&&tt(t)}e.wv=Ln(),qt(e,_,n),Ye()&&G!==null&&G.f&1024&&!(G.f&96)&&(X===null?Pn([e]):X.push(e)),!r.is_fork&&Vt.size>0&&!Ht&&Gt()}return t}function Gt(){Ht=!1;for(let e of Vt){e.f&1024&&D(e,v);let t;try{t=Rn(e)}catch{t=!0}t&&Un(e)}Vt.clear()}function Kt(e){P(e,e.v+1)}function qt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Ye(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&_)===0;if(l&&D(s,t),c&131072)Vt.add(s);else if(c&2){var u=s;k?.delete(u),c&65536||(c&512&&(G===null||!(G.f&2097152))&&(s.f|=se),qt(u,v,n))}else if(l){var d=s;c&16&&j!==null&&j.add(d),n===null?xt(d):n.push(d)}}}}function F(e){if(typeof e!=`object`||!e||de in e)return e;let t=d(e);if(t!==l&&t!==u)return e;var r=new Map,i=n(e),a=N(0),o=null,c=Q,f=e=>{if(Q===c)return e();var t=H,n=Q;W(null),In(c);var r=e();return W(t),In(n),r};return i&&r.set(`length`,N(e.length,o)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&De();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,o);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(b,o));r.set(t,e),Kt(a)}}else P(n,b),Kt(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||s(t,n)?.writable)&&(a=f(()=>N(F(c?t[n]:b),o)),r.set(n,a)),a!==void 0){var l=$(a);return l===b?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=$(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==b)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==b||Reflect.has(e,t);return(n!==void 0||G!==null&&(!i||s(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?F(e[t]):b,o)),r.set(t,n)),$(n)===b)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(b,o)),r.set(d+``,p)):P(p,b)}if(l===void 0)(!u||s(e,t)?.writable)&&(l=f(()=>N(void 0,o)),P(l,F(n)),r.set(t,l));else{u=l.v!==b;var m=f(()=>F(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}Kt(a)}return!0},ownKeys(e){$(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==b});for(var[n,i]of r)i.v!==b&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Oe()}})}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var Jt,Yt,Xt,Zt;function Qt(){if(Jt===void 0){Jt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xt=s(t,`firstChild`).get,Zt=s(t,`nextSibling`).get,f(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),f(n)&&(n[_e]=void 0)}}function I(e=``){return document.createTextNode(e)}function $t(e){return Xt.call(e)}function L(e){return Zt.call(e)}function en(e,t){if(!x)return $t(e);var n=$t(S);if(n===null)n=S.appendChild(I());else if(t&&n.nodeType!==3){var r=I();return n?.before(r),C(r),r}return t&&on(n),C(n),n}function tn(e,t=!1){if(!x){var n=$t(e);return n instanceof Comment&&n.data===``?L(n):n}if(t){if(S?.nodeType!==3){var r=I();return S?.before(r),C(r),r}on(S)}return S}function nn(e,t=1,n=!1){let r=x?S:e;for(var i;t--;)i=r,r=L(r);if(!x)return r;if(n){if(r?.nodeType!==3){var a=I();return r===null?i?.after(a):r.before(a),C(a),a}on(r)}return C(r),r}function rn(){return!w||j!==null?!1:(G.f&te)!==0}function an(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function on(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function sn(e){var t=H,n=G;W(null),K(null);try{return e()}finally{W(t),K(n)}}function cn(e){G===null&&(H===null&&we(e),Ce()),V&&Se(e)}function ln(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function R(e,t){var n=G;n!==null&&n.f&8192&&(e|=y);var r={ctx:T,deps:null,nodes:null,f:e|_|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};O?.register_created_effect(r);var i=r;if(e&4)A===null?gt.ensure().schedule(r):A.push(r);else if(t!==null){try{Un(r)}catch(e){throw B(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=re))}if(i!==null&&(i.parent=n,n!==null&&ln(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function un(){return H!==null&&!U}function dn(e){let t=R(8,null);return D(t,g),t.teardown=e,t}function fn(e){cn(`$effect`);var t=G.f;if(!H&&t&32&&!(t&32768)){var n=T;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return R(4|oe,e)}function mn(e){gt.ensure();let t=R(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Tn(t,()=>{B(t),n(void 0)}):(B(t),n(void 0))})}function hn(e){return R(4,e)}function gn(e){return R(le|ae,e)}function _n(e,t=0){return R(8|t,e)}function vn(e,t=[],n=[],r=[]){Ot(r,t,n,t=>{R(8,()=>e(...t.map($)))})}function yn(e,t=0){return R(16|t,e)}function z(e){return R(32|ae,e)}function bn(e){var t=e.teardown;if(t!==null){let e=V,n=H;Mn(!0),W(null);try{t.call(null)}finally{Mn(e),W(n)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&sn(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:B(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||B(t),t=n}}function B(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Cn(e.nodes.start,e.nodes.end),n=!0),D(e,ne),xn(e,t&&!n),Hn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=ne,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&wn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Cn(e,t){for(;e!==null;){var n=e===t?null:L(e);e.remove(),e=n}}function wn(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 Tn(e,t,n=!0){var r=[];En(e,r,!0);var i=()=>{n&&B(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function En(e,t,n){if(!(e.f&8192)){e.f^=y;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;En(i,t,o?n:!1)}i=a}}}function Dn(e){On(e,!0)}function On(e,t){if(e.f&8192){e.f^=y,e.f&1024||(D(e,_),gt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;On(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function kn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:L(n);t.append(n),n=i}}var An=null,jn=!1,V=!1;function Mn(e){V=e}var H=null,U=!1;function W(e){H=e}var G=null;function K(e){G=e}var q=null;function Nn(e){H!==null&&(!w||H.f&2)&&(q===null?q=[e]:q.push(e))}var J=null,Y=0,X=null;function Pn(e){X=e}var Fn=1,Z=0,Q=Z;function In(e){Q=e}function Ln(){return++Fn}function Rn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Rn(a)&&Rt(a),a.wv>e.wv)return!0}t&512&&k===null&&D(e,g)}return!1}function zn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!w&&q!==null&&i.call(q,e)))for(var a=0;a<r.length;a++){var o=r[a];o.f&2?zn(o,t,!1):t===o&&(n?D(o,_):o.f&1024&&D(o,v),xt(o))}}function Bn(e){var t=J,n=Y,r=X,i=H,a=q,o=T,s=U,c=Q,l=e.f;J=null,Y=0,X=null,H=l&96?null:e,q=null,Ke(e.ctx),U=!1,Q=++Z,e.ac!==null&&(sn(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=te;var f=e.deps,p=O?.is_fork;if(J!==null){var m;if(p||Hn(e,Y),f!==null&&Y>0)for(f.length=Y+J.length,m=0;m<J.length;m++)f[Y+m]=J[m];else e.deps=f=J;if(un()&&e.f&512)for(m=Y;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Y<f.length&&(Hn(e,Y),f.length=Y);if(Ye()&&X!==null&&!U&&f!==null&&!(e.f&6146))for(m=0;m<X.length;m++)zn(X[m],e);if(i!==null&&i!==e){if(Z++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Z;if(t!==null)for(let e of t)e.rv=Z;X!==null&&(r===null?r=X:r.push(...X))}return e.f&8388608&&(e.f^=ue),d}catch(e){return $e(e)}finally{e.f^=ce,J=t,Y=n,X=r,H=i,q=a,Ke(o),U=s,Q=c}}function Vn(e,t){let n=t.reactions;if(n!==null){var a=r.call(n,e);if(a!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[a]=n[o],n.pop())}}if(n===null&&t.f&2&&(J===null||!i.call(J,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~se),s.v!==b&&tt(s),zt(s),Hn(s,0)}}function Hn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Vn(e,n[r])}function Un(e){var t=e.f;if(!(t&16384)){D(e,g);var n=G,r=jn;G=e,jn=!0;try{t&16777232?Sn(e):xn(e),bn(e);var i=Bn(e);e.teardown=typeof i==`function`?i:null,e.wv=Fn}finally{jn=r,G=n}}}function $(e){var t=(e.f&2)!=0;if(An?.add(e),H!==null&&!U&&!(G!==null&&G.f&16384)&&(q===null||!i.call(q,e))){var n=H.deps;if(H.f&2097152)e.rv<Z&&(e.rv=Z,J===null&&n!==null&&n[Y]===e?Y++:J===null?J=[e]:J.push(e));else{H.deps??=[],i.call(H.deps,e)||H.deps.push(e);var r=e.reactions;r===null?e.reactions=[H]:i.call(r,H)||r.push(H)}}if(V&&M.has(e))return M.get(e);if(t){var a=e;if(V){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||Gn(a))&&(o=Lt(a)),M.set(a,o),o}var s=(a.f&512)==0&&!U&&H!==null&&(jn||(H.f&512)!=0),c=(a.f&te)===0;Rn(a)&&(s&&(a.f|=512),Rt(a)),s&&!c&&(Bt(a),Wn(a))}if(k?.has(e))return k.get(e);if(e.f&8388608)throw e.v;return e.v}function Wn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Bt(t),Wn(t))}function Gn(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(M.has(t)||t.f&2&&Gn(t))return!0;return!1}function Kn(e){var t=U;try{return U=!0,e()}finally{U=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var qn=[`touchstart`,`touchmove`];function Jn(e){return qn.includes(e)}var Yn=Symbol(`events`),Xn=new Set,Zn=new Set;function Qn(e,t,n){(t[Yn]??={})[e]=n}function $n(e){for(var t=0;t<e.length;t++)Xn.add(e[t]);for(var n of Zn)n(e)}var er=null;function tr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;er=e;var s=0,c=er===e&&e[Yn];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Yn]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(a=i[s]||e.target,a!==t){o(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=H,f=G;W(null),K(null);try{for(var p,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[Yn]?.[r];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble||h===t||h===null)break;a=h}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Yn]=t,delete e.currentTarget,W(d),K(f)}}}var nr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function rr(e){return nr?.createHTML(e)??e}function ir(e){var t=an(`template`);return t.innerHTML=rr(e.replaceAll(`<!>`,`<!---->`)),t.content}function ar(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function or(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(x)return ar(S,null),S;i===void 0&&(i=ir(a?e:`<!>`+e),n||(i=$t(i)));var t=r||Yt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=$t(t),s=t.lastChild;ar(o,s)}else ar(t,t);return t}}function sr(){if(x)return ar(S,null),S;var e=document.createDocumentFragment(),t=document.createComment(``),n=I();return e.append(t,n),ar(t,n),e}function cr(e,t){if(x){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=S),Le();return}e!==null&&e.before(t)}function lr(e,t){return dr(e,t)}var ur=new Map;function dr(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:c}){Qt();var l=void 0,u=mn(()=>{var s=n??t.appendChild(I());Et(s,{pending:()=>{}},t=>{qe({});var n=T;if(o&&(n.c=o),i&&(r.$$events=i),x&&ar(t,null),l=e(t,r)||{},x&&(G.nodes.end=S,S===null||S.nodeType!==8||S.data!==`]`))throw Pe(),je;Je()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Jn(r);for(let e of[t,document]){var a=ur.get(e);a===void 0&&(a=new Map,ur.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,tr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(a(Xn)),Zn.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=ur.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,tr),r.delete(e),r.size===0&&ur.delete(n)):r.set(e,i)}Zn.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return fr.set(l,u),l}var fr=new WeakMap,pr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Dn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(B(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();kn(r,t),t.append(I()),this.#n.set(e,{effect:r,fragment:t})}else B(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Tn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(B(n.effect),this.#n.delete(e))};ensure(e,t){var n=O,r=rn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=I();i.append(a),this.#n.set(e,{effect:z(()=>t(a)),fragment:i})}else this.#t.set(e,z(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else x&&(this.anchor=S),this.#a(n)}};function mr(e,t,n=!1){var r;x&&(r=S,Le());var i=new pr(e),a=n?re:0;function o(e,t){if(x){var n=Ve(r);if(e!==parseInt(n.substring(1))){var a=Be();C(a),i.anchor=a,Ie(!1),i.ensure(e,t),Ie(!0);return}}i.ensure(e,t)}yn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function hr(e,t){let n=null,r=x;var i;if(x){n=S;for(var a=$t(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=L(a);if(a===null)Ie(!1);else{var o=L(a);a.remove(),C(o)}}x||(i=document.head.appendChild(I()));try{yn(()=>{var e=z(()=>t(i));e.f|=ie})}finally{r&&(Ie(!0),C(n))}}function gr(e,t){hn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=an(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var _r=[...`
|
|
2
2
|
\r\f\xA0\v`];function vr(e,t,n){var r=e==null?``:``+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 a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||_r.includes(r[o-1]))&&(s===r.length||_r.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function yr(e,t,n,r,i,a){var o=e[he];if(x||o!==n||o===void 0){var s=vr(n,r,a);(!x||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var br=Symbol(`is custom element`),xr=Symbol(`is html`),Sr=ye?`link`:`LINK`;function Cr(e,t,n,r){var i=wr(e);x&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Sr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Er(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function wr(e){return e[me]??={[br]:e.nodeName.includes(`-`),[xr]:e.namespaceURI===Me}}var Tr=new Map;function Er(e){var t=e.getAttribute(`is`)||e.nodeName,n=Tr.get(t);if(n)return n;Tr.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=c(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=d(i)}return n}function Dr(e,t,n,r){var i=!Ge||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>o&&i?(u??=Mt(r),$(u)):(l&&(l=!1,c=o?Kn(r):r),c);let f;if(a){var p=de in e||fe in e;f=s(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=ot(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Ee(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?Mt:Ft)(()=>(v=!1,g()));a&&$(y);var ee=G;return(function(e,t){if(arguments.length>0){let n=t?$(y):i&&a?F(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return V&&v||ee.f&16384?y.v:$(y)})}function Or(e){T===null&&be(`onMount`),Ge&&T.l!==null?kr(T).m.push(e):fn(()=>{let t=Kn(e);if(typeof t==`function`)return t})}function kr(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var Ar=or(`<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>`),jr=or(`<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> <p class="svelte-yhk8rr">Optional: Use 'data-expand-at-start' to control if the chat window should open automatically.
|
|
4
4
|
Possible values: 'all', 'desktop', 'mobile'</p> <pre class="svelte-yhk8rr">
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Action, SessionInfoUser } from '@botfabrik/engine-domain';
|
|
2
|
+
import { IncomingHttpHeaders } from 'node:http';
|
|
3
|
+
import { ParsedUrlQuery } from 'node:querystring';
|
|
2
4
|
export type SessionInfoClientPayload = {
|
|
3
5
|
querystrings: any;
|
|
4
6
|
referrer: string;
|
|
@@ -10,9 +12,26 @@ export type ConversationRating = {
|
|
|
10
12
|
};
|
|
11
13
|
export type SessionInfoUserPayload = object;
|
|
12
14
|
export type WebclientMiddlewareState = object;
|
|
13
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Callback to enrich the user's session info with additional data from an external source.
|
|
17
|
+
*
|
|
18
|
+
* Called during session initialization with the current user, query strings, and HTTP headers.
|
|
19
|
+
* The returned partial object is merged into the existing user info.
|
|
20
|
+
*
|
|
21
|
+
* @param props.user - The current session user object built from authentication and query parameters.
|
|
22
|
+
* @param props.querystrings - The parsed query string parameters from the client URL.
|
|
23
|
+
* @param props.headers - The incoming HTTP request headers.
|
|
24
|
+
* @param props.ip - The client's IP address, extracted from the socket connection.
|
|
25
|
+
* @returns A promise resolving to a partial user info object whose properties will be merged into the session user.
|
|
26
|
+
*/
|
|
27
|
+
export type EnrichUserInfo = (props: {
|
|
28
|
+
user: SessionInfoUser<SessionInfoUserPayload>;
|
|
29
|
+
querystrings: ParsedUrlQuery;
|
|
30
|
+
headers: IncomingHttpHeaders;
|
|
31
|
+
ip: string | undefined;
|
|
32
|
+
}) => Promise<Partial<SessionInfoUser<SessionInfoUserPayload>>>;
|
|
14
33
|
export type RequestSessionRecordQuery = (params: {
|
|
15
|
-
querystrings:
|
|
34
|
+
querystrings: ParsedUrlQuery;
|
|
16
35
|
sessionId: string;
|
|
17
36
|
}) => Promise<Record<string, unknown>>;
|
|
18
37
|
export type MenuItemType = 'link' | 'action';
|
|
@@ -87,7 +106,11 @@ export type Auth = {
|
|
|
87
106
|
};
|
|
88
107
|
export interface WebClientProps {
|
|
89
108
|
getStartedAction?: Action;
|
|
90
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Optional callback to enrich the user's session info with additional data.
|
|
111
|
+
* See {@link EnrichUserInfo} for details.
|
|
112
|
+
*/
|
|
113
|
+
enrichUserInfo?: EnrichUserInfo;
|
|
91
114
|
requestSessionRecordQuery?: RequestSessionRecordQuery;
|
|
92
115
|
speech?: SpeechToTextProps | undefined;
|
|
93
116
|
expandChatWindowAtStart?: Devices;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.122.0",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"cors": "^2.8.6",
|
|
41
41
|
"express": "^5.2.1",
|
|
42
42
|
"flat": "^6.0.1",
|
|
43
|
-
"helmet": "^8.
|
|
43
|
+
"helmet": "^8.2.0",
|
|
44
44
|
"jose": "^6.2.3",
|
|
45
45
|
"passport": "^0.7.0",
|
|
46
46
|
"socket.io": "^4.8.3"
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@types/supertest": "^7.2.0",
|
|
53
53
|
"@types/ua-parser-js": "^0.7.39",
|
|
54
54
|
"supertest": "^7.2.2",
|
|
55
|
-
"tsx": "^4.22.
|
|
55
|
+
"tsx": "^4.22.3",
|
|
56
56
|
"typescript": "6.0.3"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "a44d1eec77571e783f80f244474873f286a3e83b"
|
|
59
59
|
}
|