akpm-knowledge-base-chat 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CDN/akb-chat.js +4304 -0
  2. package/README.md +21 -0
  3. package/package.json +34 -0
@@ -0,0 +1,4304 @@
1
+ /* Version: 1.0.2 */
2
+ var ks = Object.defineProperty;
3
+ var Pn = (e) => {
4
+ throw TypeError(e);
5
+ };
6
+ var Es = (e, t, n) => t in e ? ks(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
7
+ var R = (e, t, n) => Es(e, typeof t != "symbol" ? t + "" : t, n), Rn = (e, t, n) => t.has(e) || Pn("Cannot " + n);
8
+ var z = (e, t, n) => (Rn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Vt = (e, t, n) => t.has(e) ? Pn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Bt = (e, t, n, s) => (Rn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
9
+ const Ts = "5";
10
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ts);
11
+ const pn = 1, _n = 2, ar = 4, Is = 8, Ss = 16, Cs = 1, As = 2, ur = 4, Os = 8, Ns = 16, Fs = 4, Ms = 1, Ps = 2, cr = "[", gn = "[!", yn = "]", Fe = {}, U = Symbol();
12
+ function Rs(e) {
13
+ return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
14
+ }
15
+ const js = [
16
+ "beforeinput",
17
+ "click",
18
+ "change",
19
+ "dblclick",
20
+ "contextmenu",
21
+ "focusin",
22
+ "focusout",
23
+ "input",
24
+ "keydown",
25
+ "keyup",
26
+ "mousedown",
27
+ "mousemove",
28
+ "mouseout",
29
+ "mouseover",
30
+ "mouseup",
31
+ "pointerdown",
32
+ "pointermove",
33
+ "pointerout",
34
+ "pointerover",
35
+ "pointerup",
36
+ "touchend",
37
+ "touchmove",
38
+ "touchstart"
39
+ ];
40
+ function Ls(e) {
41
+ return js.includes(e);
42
+ }
43
+ const Ds = {
44
+ // no `class: 'className'` because we handle that separately
45
+ formnovalidate: "formNoValidate",
46
+ ismap: "isMap",
47
+ nomodule: "noModule",
48
+ playsinline: "playsInline",
49
+ readonly: "readOnly",
50
+ defaultvalue: "defaultValue",
51
+ defaultchecked: "defaultChecked",
52
+ srcobject: "srcObject"
53
+ };
54
+ function zs(e) {
55
+ return e = e.toLowerCase(), Ds[e] ?? e;
56
+ }
57
+ const Us = ["touchstart", "touchmove"];
58
+ function Hs(e) {
59
+ return Us.includes(e);
60
+ }
61
+ const Jt = !1;
62
+ var Ct = Array.isArray, qs = Array.prototype.indexOf, mn = Array.from, _t = Object.keys, gt = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, fr = Object.getOwnPropertyDescriptors, Vs = Object.prototype, Bs = Array.prototype, bn = Object.getPrototypeOf;
63
+ function Gs(e) {
64
+ return typeof e == "function";
65
+ }
66
+ const We = () => {
67
+ };
68
+ function Zs(e) {
69
+ return e();
70
+ }
71
+ function yt(e) {
72
+ for (var t = 0; t < e.length; t++)
73
+ e[t]();
74
+ }
75
+ const Z = 2, dr = 4, At = 8, Ot = 16, ue = 32, Ie = 64, mt = 128, Se = 256, bt = 512, L = 1024, pe = 2048, Ce = 4096, ne = 8192, ze = 16384, hr = 32768, Nt = 65536, Ws = 1 << 17, Ys = 1 << 19, vr = 1 << 20, Ee = Symbol("$state"), pr = Symbol("legacy props"), Ks = Symbol("");
76
+ function _r(e) {
77
+ return e === this.v;
78
+ }
79
+ function Js(e, t) {
80
+ return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
81
+ }
82
+ function wn(e) {
83
+ return !Js(e, this.v);
84
+ }
85
+ function Qs(e) {
86
+ throw new Error("https://svelte.dev/e/effect_in_teardown");
87
+ }
88
+ function Xs() {
89
+ throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
90
+ }
91
+ function ei(e) {
92
+ throw new Error("https://svelte.dev/e/effect_orphan");
93
+ }
94
+ function ti() {
95
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
96
+ }
97
+ function ni() {
98
+ throw new Error("https://svelte.dev/e/hydration_failed");
99
+ }
100
+ function ri(e) {
101
+ throw new Error("https://svelte.dev/e/props_invalid_value");
102
+ }
103
+ function si() {
104
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
105
+ }
106
+ function ii() {
107
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
108
+ }
109
+ function oi() {
110
+ throw new Error("https://svelte.dev/e/state_unsafe_local_read");
111
+ }
112
+ function li() {
113
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
114
+ }
115
+ let Ue = !1, ai = !1;
116
+ function ui() {
117
+ Ue = !0;
118
+ }
119
+ function H(e, t) {
120
+ var n = {
121
+ f: 0,
122
+ // TODO ideally we could skip this altogether, but it causes type errors
123
+ v: e,
124
+ reactions: null,
125
+ equals: _r,
126
+ rv: 0,
127
+ wv: 0
128
+ };
129
+ return n;
130
+ }
131
+ function ge(e) {
132
+ return /* @__PURE__ */ gr(H(e));
133
+ }
134
+ // @__NO_SIDE_EFFECTS__
135
+ function Ft(e, t = !1) {
136
+ var s;
137
+ const n = H(e);
138
+ return t || (n.equals = wn), Ue && C !== null && C.l !== null && ((s = C.l).s ?? (s.s = [])).push(n), n;
139
+ }
140
+ function at(e, t = !1) {
141
+ return /* @__PURE__ */ gr(/* @__PURE__ */ Ft(e, t));
142
+ }
143
+ // @__NO_SIDE_EFFECTS__
144
+ function gr(e) {
145
+ return A !== null && A.f & Z && (re === null ? xi([e]) : re.push(e)), e;
146
+ }
147
+ function Gt(e, t) {
148
+ return k(
149
+ e,
150
+ ae(() => y(e))
151
+ ), t;
152
+ }
153
+ function k(e, t) {
154
+ return A !== null && !me && it() && A.f & (Z | Ot) && // If the source was created locally within the current derived, then
155
+ // we allow the mutation.
156
+ (re === null || !re.includes(e)) && li(), Qt(e, t);
157
+ }
158
+ function Qt(e, t) {
159
+ return e.equals(t) || (e.v, e.v = t, e.wv = jr(), yr(e, pe), it() && E !== null && E.f & L && !(E.f & (ue | Ie)) && (ce === null ? $i([e]) : ce.push(e))), t;
160
+ }
161
+ function yr(e, t) {
162
+ var n = e.reactions;
163
+ if (n !== null)
164
+ for (var s = it(), r = n.length, i = 0; i < r; i++) {
165
+ var o = n[i], l = o.f;
166
+ l & pe || !s && o === E || (te(o, t), l & (L | Se) && (l & Z ? yr(
167
+ /** @type {Derived} */
168
+ o,
169
+ Ce
170
+ ) : Dt(
171
+ /** @type {Effect} */
172
+ o
173
+ )));
174
+ }
175
+ }
176
+ function Mt(e) {
177
+ console.warn("https://svelte.dev/e/hydration_mismatch");
178
+ }
179
+ let I = !1;
180
+ function he(e) {
181
+ I = e;
182
+ }
183
+ let S;
184
+ function K(e) {
185
+ if (e === null)
186
+ throw Mt(), Fe;
187
+ return S = e;
188
+ }
189
+ function Re() {
190
+ return K(
191
+ /** @type {TemplateNode} */
192
+ /* @__PURE__ */ _e(S)
193
+ );
194
+ }
195
+ function F(e) {
196
+ if (I) {
197
+ if (/* @__PURE__ */ _e(S) !== null)
198
+ throw Mt(), Fe;
199
+ S = e;
200
+ }
201
+ }
202
+ function Xt() {
203
+ for (var e = 0, t = S; ; ) {
204
+ if (t.nodeType === 8) {
205
+ var n = (
206
+ /** @type {Comment} */
207
+ t.data
208
+ );
209
+ if (n === yn) {
210
+ if (e === 0) return t;
211
+ e -= 1;
212
+ } else (n === cr || n === gn) && (e += 1);
213
+ }
214
+ var s = (
215
+ /** @type {TemplateNode} */
216
+ /* @__PURE__ */ _e(t)
217
+ );
218
+ t.remove(), t = s;
219
+ }
220
+ }
221
+ function N(e, t = null, n) {
222
+ if (typeof e != "object" || e === null || Ee in e)
223
+ return e;
224
+ const s = bn(e);
225
+ if (s !== Vs && s !== Bs)
226
+ return e;
227
+ var r = /* @__PURE__ */ new Map(), i = Ct(e), o = H(0);
228
+ i && r.set("length", H(
229
+ /** @type {any[]} */
230
+ e.length
231
+ ));
232
+ var l;
233
+ return new Proxy(
234
+ /** @type {any} */
235
+ e,
236
+ {
237
+ defineProperty(a, u, c) {
238
+ (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && si();
239
+ var f = r.get(u);
240
+ return f === void 0 ? (f = H(c.value), r.set(u, f)) : k(f, N(c.value, l)), !0;
241
+ },
242
+ deleteProperty(a, u) {
243
+ var c = r.get(u);
244
+ if (c === void 0)
245
+ u in a && r.set(u, H(U));
246
+ else {
247
+ if (i && typeof u == "string") {
248
+ var f = (
249
+ /** @type {Source<number>} */
250
+ r.get("length")
251
+ ), d = Number(u);
252
+ Number.isInteger(d) && d < f.v && k(f, d);
253
+ }
254
+ k(c, U), jn(o);
255
+ }
256
+ return !0;
257
+ },
258
+ get(a, u, c) {
259
+ var v;
260
+ if (u === Ee)
261
+ return e;
262
+ var f = r.get(u), d = u in a;
263
+ if (f === void 0 && (!d || (v = ke(a, u)) != null && v.writable) && (f = H(N(d ? a[u] : U, l)), r.set(u, f)), f !== void 0) {
264
+ var h = y(f);
265
+ return h === U ? void 0 : h;
266
+ }
267
+ return Reflect.get(a, u, c);
268
+ },
269
+ getOwnPropertyDescriptor(a, u) {
270
+ var c = Reflect.getOwnPropertyDescriptor(a, u);
271
+ if (c && "value" in c) {
272
+ var f = r.get(u);
273
+ f && (c.value = y(f));
274
+ } else if (c === void 0) {
275
+ var d = r.get(u), h = d == null ? void 0 : d.v;
276
+ if (d !== void 0 && h !== U)
277
+ return {
278
+ enumerable: !0,
279
+ configurable: !0,
280
+ value: h,
281
+ writable: !0
282
+ };
283
+ }
284
+ return c;
285
+ },
286
+ has(a, u) {
287
+ var h;
288
+ if (u === Ee)
289
+ return !0;
290
+ var c = r.get(u), f = c !== void 0 && c.v !== U || Reflect.has(a, u);
291
+ if (c !== void 0 || E !== null && (!f || (h = ke(a, u)) != null && h.writable)) {
292
+ c === void 0 && (c = H(f ? N(a[u], l) : U), r.set(u, c));
293
+ var d = y(c);
294
+ if (d === U)
295
+ return !1;
296
+ }
297
+ return f;
298
+ },
299
+ set(a, u, c, f) {
300
+ var b;
301
+ var d = r.get(u), h = u in a;
302
+ if (i && u === "length")
303
+ for (var v = c; v < /** @type {Source<number>} */
304
+ d.v; v += 1) {
305
+ var p = r.get(v + "");
306
+ p !== void 0 ? k(p, U) : v in a && (p = H(U), r.set(v + "", p));
307
+ }
308
+ d === void 0 ? (!h || (b = ke(a, u)) != null && b.writable) && (d = H(void 0), k(d, N(c, l)), r.set(u, d)) : (h = d.v !== U, k(d, N(c, l)));
309
+ var m = Reflect.getOwnPropertyDescriptor(a, u);
310
+ if (m != null && m.set && m.set.call(f, c), !h) {
311
+ if (i && typeof u == "string") {
312
+ var _ = (
313
+ /** @type {Source<number>} */
314
+ r.get("length")
315
+ ), g = Number(u);
316
+ Number.isInteger(g) && g >= _.v && k(_, g + 1);
317
+ }
318
+ jn(o);
319
+ }
320
+ return !0;
321
+ },
322
+ ownKeys(a) {
323
+ y(o);
324
+ var u = Reflect.ownKeys(a).filter((d) => {
325
+ var h = r.get(d);
326
+ return h === void 0 || h.v !== U;
327
+ });
328
+ for (var [c, f] of r)
329
+ f.v !== U && !(c in a) && u.push(c);
330
+ return u;
331
+ },
332
+ setPrototypeOf() {
333
+ ii();
334
+ }
335
+ }
336
+ );
337
+ }
338
+ function jn(e, t = 1) {
339
+ k(e, e.v + t);
340
+ }
341
+ var Ln, mr, br;
342
+ function en() {
343
+ if (Ln === void 0) {
344
+ Ln = window;
345
+ var e = Element.prototype, t = Node.prototype;
346
+ mr = ke(t, "firstChild").get, br = ke(t, "nextSibling").get, e.__click = void 0, e.__className = "", e.__attributes = null, e.__styles = null, e.__e = void 0, Text.prototype.__t = void 0;
347
+ }
348
+ }
349
+ function je(e = "") {
350
+ return document.createTextNode(e);
351
+ }
352
+ // @__NO_SIDE_EFFECTS__
353
+ function G(e) {
354
+ return mr.call(e);
355
+ }
356
+ // @__NO_SIDE_EFFECTS__
357
+ function _e(e) {
358
+ return br.call(e);
359
+ }
360
+ function P(e, t) {
361
+ if (!I)
362
+ return /* @__PURE__ */ G(e);
363
+ var n = (
364
+ /** @type {TemplateNode} */
365
+ /* @__PURE__ */ G(S)
366
+ );
367
+ if (n === null)
368
+ n = S.appendChild(je());
369
+ else if (t && n.nodeType !== 3) {
370
+ var s = je();
371
+ return n == null || n.before(s), K(s), s;
372
+ }
373
+ return K(n), n;
374
+ }
375
+ function tn(e, t) {
376
+ if (!I) {
377
+ var n = (
378
+ /** @type {DocumentFragment} */
379
+ /* @__PURE__ */ G(
380
+ /** @type {Node} */
381
+ e
382
+ )
383
+ );
384
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ _e(n) : n;
385
+ }
386
+ return S;
387
+ }
388
+ function ee(e, t = 1, n = !1) {
389
+ let s = I ? S : e;
390
+ for (var r; t--; )
391
+ r = s, s = /** @type {TemplateNode} */
392
+ /* @__PURE__ */ _e(s);
393
+ if (!I)
394
+ return s;
395
+ var i = s == null ? void 0 : s.nodeType;
396
+ if (n && i !== 3) {
397
+ var o = je();
398
+ return s === null ? r == null || r.after(o) : s.before(o), K(o), o;
399
+ }
400
+ return K(s), /** @type {TemplateNode} */
401
+ s;
402
+ }
403
+ function wr(e) {
404
+ e.textContent = "";
405
+ }
406
+ // @__NO_SIDE_EFFECTS__
407
+ function Qe(e) {
408
+ var t = Z | pe;
409
+ E === null ? t |= Se : E.f |= vr;
410
+ var n = A !== null && A.f & Z ? (
411
+ /** @type {Derived} */
412
+ A
413
+ ) : null;
414
+ const s = {
415
+ children: null,
416
+ ctx: C,
417
+ deps: null,
418
+ equals: _r,
419
+ f: t,
420
+ fn: e,
421
+ reactions: null,
422
+ rv: 0,
423
+ v: (
424
+ /** @type {V} */
425
+ null
426
+ ),
427
+ wv: 0,
428
+ parent: n ?? E
429
+ };
430
+ return n !== null && (n.children ?? (n.children = [])).push(s), s;
431
+ }
432
+ // @__NO_SIDE_EFFECTS__
433
+ function xr(e) {
434
+ const t = /* @__PURE__ */ Qe(e);
435
+ return t.equals = wn, t;
436
+ }
437
+ function $r(e) {
438
+ var t = e.children;
439
+ if (t !== null) {
440
+ e.children = null;
441
+ for (var n = 0; n < t.length; n += 1) {
442
+ var s = t[n];
443
+ s.f & Z ? xn(
444
+ /** @type {Derived} */
445
+ s
446
+ ) : oe(
447
+ /** @type {Effect} */
448
+ s
449
+ );
450
+ }
451
+ }
452
+ }
453
+ function ci(e) {
454
+ for (var t = e.parent; t !== null; ) {
455
+ if (!(t.f & Z))
456
+ return (
457
+ /** @type {Effect} */
458
+ t
459
+ );
460
+ t = t.parent;
461
+ }
462
+ return null;
463
+ }
464
+ function kr(e) {
465
+ var t, n = E;
466
+ Q(ci(e));
467
+ try {
468
+ $r(e), t = Dr(e);
469
+ } finally {
470
+ Q(n);
471
+ }
472
+ return t;
473
+ }
474
+ function Er(e) {
475
+ var t = kr(e), n = ($e || e.f & Se) && e.deps !== null ? Ce : L;
476
+ te(e, n), e.equals(t) || (e.v = t, e.wv = jr());
477
+ }
478
+ function xn(e) {
479
+ $r(e), nt(e, 0), te(e, ze), e.v = e.children = e.deps = e.ctx = e.reactions = null;
480
+ }
481
+ function Tr(e) {
482
+ E === null && A === null && ei(), A !== null && A.f & Se && Xs(), En && Qs();
483
+ }
484
+ function fi(e, t) {
485
+ var n = t.last;
486
+ n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
487
+ }
488
+ function He(e, t, n, s = !0) {
489
+ var r = (e & Ie) !== 0, i = E, o = {
490
+ ctx: C,
491
+ deps: null,
492
+ deriveds: null,
493
+ nodes_start: null,
494
+ nodes_end: null,
495
+ f: e | pe,
496
+ first: null,
497
+ fn: t,
498
+ last: null,
499
+ next: null,
500
+ parent: r ? null : i,
501
+ prev: null,
502
+ teardown: null,
503
+ transitions: null,
504
+ wv: 0
505
+ };
506
+ if (n) {
507
+ var l = Me;
508
+ try {
509
+ Dn(!0), Lt(o), o.f |= hr;
510
+ } catch (c) {
511
+ throw oe(o), c;
512
+ } finally {
513
+ Dn(l);
514
+ }
515
+ } else t !== null && Dt(o);
516
+ var a = n && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & (vr | mt)) === 0;
517
+ if (!a && !r && s && (i !== null && fi(o, i), A !== null && A.f & Z)) {
518
+ var u = (
519
+ /** @type {Derived} */
520
+ A
521
+ );
522
+ (u.children ?? (u.children = [])).push(o);
523
+ }
524
+ return o;
525
+ }
526
+ function Xe(e) {
527
+ Tr();
528
+ var t = E !== null && (E.f & ue) !== 0 && C !== null && !C.m;
529
+ if (t) {
530
+ var n = (
531
+ /** @type {ComponentContext} */
532
+ C
533
+ );
534
+ (n.e ?? (n.e = [])).push({
535
+ fn: e,
536
+ effect: E,
537
+ reaction: A
538
+ });
539
+ } else {
540
+ var s = Pt(e);
541
+ return s;
542
+ }
543
+ }
544
+ function di(e) {
545
+ return Tr(), qe(e);
546
+ }
547
+ function hi(e) {
548
+ const t = He(Ie, e, !0);
549
+ return () => {
550
+ oe(t);
551
+ };
552
+ }
553
+ function vi(e) {
554
+ const t = He(Ie, e, !0);
555
+ return (n = {}) => new Promise((s) => {
556
+ n.outro ? xt(t, () => {
557
+ oe(t), s(void 0);
558
+ }) : (oe(t), s(void 0));
559
+ });
560
+ }
561
+ function Pt(e) {
562
+ return He(dr, e, !1);
563
+ }
564
+ function pi(e, t) {
565
+ var n = (
566
+ /** @type {ComponentContextLegacy} */
567
+ C
568
+ ), s = { effect: null, ran: !1 };
569
+ n.l.r1.push(s), s.effect = qe(() => {
570
+ e(), !s.ran && (s.ran = !0, k(n.l.r2, !0), ae(t));
571
+ });
572
+ }
573
+ function _i() {
574
+ var e = (
575
+ /** @type {ComponentContextLegacy} */
576
+ C
577
+ );
578
+ qe(() => {
579
+ if (y(e.l.r2)) {
580
+ for (var t of e.l.r1) {
581
+ var n = t.effect;
582
+ n.f & L && te(n, Ce), Be(n) && Lt(n), t.ran = !1;
583
+ }
584
+ e.l.r2.v = !1;
585
+ }
586
+ });
587
+ }
588
+ function qe(e) {
589
+ return He(At, e, !0);
590
+ }
591
+ function wt(e, t = [], n = Qe) {
592
+ const s = t.map(n);
593
+ return Rt(() => e(...s.map(y)));
594
+ }
595
+ function Rt(e, t = 0) {
596
+ return He(At | Ot | t, e, !0);
597
+ }
598
+ function Le(e, t = !0) {
599
+ return He(At | ue, e, !0, t);
600
+ }
601
+ function Ir(e) {
602
+ var t = e.teardown;
603
+ if (t !== null) {
604
+ const n = En, s = A;
605
+ zn(!0), le(null);
606
+ try {
607
+ t.call(null);
608
+ } finally {
609
+ zn(n), le(s);
610
+ }
611
+ }
612
+ }
613
+ function Sr(e) {
614
+ var t = e.deriveds;
615
+ if (t !== null) {
616
+ e.deriveds = null;
617
+ for (var n = 0; n < t.length; n += 1)
618
+ xn(t[n]);
619
+ }
620
+ }
621
+ function Cr(e, t = !1) {
622
+ var n = e.first;
623
+ for (e.first = e.last = null; n !== null; ) {
624
+ var s = n.next;
625
+ oe(n, t), n = s;
626
+ }
627
+ }
628
+ function gi(e) {
629
+ for (var t = e.first; t !== null; ) {
630
+ var n = t.next;
631
+ t.f & ue || oe(t), t = n;
632
+ }
633
+ }
634
+ function oe(e, t = !0) {
635
+ var n = !1;
636
+ if ((t || e.f & Ys) && e.nodes_start !== null) {
637
+ for (var s = e.nodes_start, r = e.nodes_end; s !== null; ) {
638
+ var i = s === r ? null : (
639
+ /** @type {TemplateNode} */
640
+ /* @__PURE__ */ _e(s)
641
+ );
642
+ s.remove(), s = i;
643
+ }
644
+ n = !0;
645
+ }
646
+ Cr(e, t && !n), Sr(e), nt(e, 0), te(e, ze);
647
+ var o = e.transitions;
648
+ if (o !== null)
649
+ for (const a of o)
650
+ a.stop();
651
+ Ir(e);
652
+ var l = e.parent;
653
+ l !== null && l.first !== null && Ar(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
654
+ }
655
+ function Ar(e) {
656
+ var t = e.parent, n = e.prev, s = e.next;
657
+ n !== null && (n.next = s), s !== null && (s.prev = n), t !== null && (t.first === e && (t.first = s), t.last === e && (t.last = n));
658
+ }
659
+ function xt(e, t) {
660
+ var n = [];
661
+ $n(e, n, !0), Or(n, () => {
662
+ oe(e), t && t();
663
+ });
664
+ }
665
+ function Or(e, t) {
666
+ var n = e.length;
667
+ if (n > 0) {
668
+ var s = () => --n || t();
669
+ for (var r of e)
670
+ r.out(s);
671
+ } else
672
+ t();
673
+ }
674
+ function $n(e, t, n) {
675
+ if (!(e.f & ne)) {
676
+ if (e.f ^= ne, e.transitions !== null)
677
+ for (const o of e.transitions)
678
+ (o.is_global || n) && t.push(o);
679
+ for (var s = e.first; s !== null; ) {
680
+ var r = s.next, i = (s.f & Nt) !== 0 || (s.f & ue) !== 0;
681
+ $n(s, t, i ? n : !1), s = r;
682
+ }
683
+ }
684
+ }
685
+ function $t(e) {
686
+ Nr(e, !0);
687
+ }
688
+ function Nr(e, t) {
689
+ if (e.f & ne) {
690
+ e.f ^= ne, e.f & L || (e.f ^= L), Be(e) && (te(e, pe), Dt(e));
691
+ for (var n = e.first; n !== null; ) {
692
+ var s = n.next, r = (n.f & Nt) !== 0 || (n.f & ue) !== 0;
693
+ Nr(n, r ? t : !1), n = s;
694
+ }
695
+ if (e.transitions !== null)
696
+ for (const i of e.transitions)
697
+ (i.is_global || t) && i.in();
698
+ }
699
+ }
700
+ const yi = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
701
+ let kt = !1, Et = !1, nn = [], rn = [];
702
+ function Fr() {
703
+ kt = !1;
704
+ const e = nn.slice();
705
+ nn = [], yt(e);
706
+ }
707
+ function Mr() {
708
+ Et = !1;
709
+ const e = rn.slice();
710
+ rn = [], yt(e);
711
+ }
712
+ function Ve(e) {
713
+ kt || (kt = !0, queueMicrotask(Fr)), nn.push(e);
714
+ }
715
+ function mi(e) {
716
+ Et || (Et = !0, yi(Mr)), rn.push(e);
717
+ }
718
+ function bi() {
719
+ kt && Fr(), Et && Mr();
720
+ }
721
+ function kn(e) {
722
+ throw new Error("https://svelte.dev/e/lifecycle_outside_component");
723
+ }
724
+ const Pr = 0, wi = 1;
725
+ let ft = !1, dt = Pr, et = !1, tt = null, Me = !1, En = !1;
726
+ function Dn(e) {
727
+ Me = e;
728
+ }
729
+ function zn(e) {
730
+ En = e;
731
+ }
732
+ let xe = [], Pe = 0;
733
+ let A = null, me = !1;
734
+ function le(e) {
735
+ A = e;
736
+ }
737
+ let E = null;
738
+ function Q(e) {
739
+ E = e;
740
+ }
741
+ let re = null;
742
+ function xi(e) {
743
+ re = e;
744
+ }
745
+ let q = null, B = 0, ce = null;
746
+ function $i(e) {
747
+ ce = e;
748
+ }
749
+ let Rr = 1, Tt = 0, $e = !1, C = null;
750
+ function jr() {
751
+ return ++Rr;
752
+ }
753
+ function it() {
754
+ return !Ue || C !== null && C.l === null;
755
+ }
756
+ function Be(e) {
757
+ var u;
758
+ var t = e.f;
759
+ if (t & pe)
760
+ return !0;
761
+ if (t & Ce) {
762
+ var n = e.deps, s = (t & Se) !== 0;
763
+ if (n !== null) {
764
+ var r, i, o = (t & bt) !== 0, l = s && E !== null && !$e, a = n.length;
765
+ if (o || l) {
766
+ for (r = 0; r < a; r++)
767
+ i = n[r], (o || !((u = i == null ? void 0 : i.reactions) != null && u.includes(e))) && (i.reactions ?? (i.reactions = [])).push(e);
768
+ o && (e.f ^= bt);
769
+ }
770
+ for (r = 0; r < a; r++)
771
+ if (i = n[r], Be(
772
+ /** @type {Derived} */
773
+ i
774
+ ) && Er(
775
+ /** @type {Derived} */
776
+ i
777
+ ), i.wv > e.wv)
778
+ return !0;
779
+ }
780
+ (!s || E !== null && !$e) && te(e, L);
781
+ }
782
+ return !1;
783
+ }
784
+ function ki(e, t) {
785
+ for (var n = t; n !== null; ) {
786
+ if (n.f & mt)
787
+ try {
788
+ n.fn(e);
789
+ return;
790
+ } catch {
791
+ n.f ^= mt;
792
+ }
793
+ n = n.parent;
794
+ }
795
+ throw ft = !1, e;
796
+ }
797
+ function Ei(e) {
798
+ return (e.f & ze) === 0 && (e.parent === null || (e.parent.f & mt) === 0);
799
+ }
800
+ function jt(e, t, n, s) {
801
+ if (ft) {
802
+ if (n === null && (ft = !1), Ei(t))
803
+ throw e;
804
+ return;
805
+ }
806
+ n !== null && (ft = !0);
807
+ {
808
+ ki(e, t);
809
+ return;
810
+ }
811
+ }
812
+ function Lr(e, t, n = 0) {
813
+ var s = e.reactions;
814
+ if (s !== null)
815
+ for (var r = 0; r < s.length; r++) {
816
+ var i = s[r];
817
+ i.f & Z ? Lr(
818
+ /** @type {Derived} */
819
+ i,
820
+ t,
821
+ n + 1
822
+ ) : t === i && (n === 0 ? te(i, pe) : i.f & L && te(i, Ce), Dt(
823
+ /** @type {Effect} */
824
+ i
825
+ ));
826
+ }
827
+ }
828
+ function Dr(e) {
829
+ var h;
830
+ var t = q, n = B, s = ce, r = A, i = $e, o = re, l = C, a = me, u = e.f;
831
+ q = /** @type {null | Value[]} */
832
+ null, B = 0, ce = null, A = u & (ue | Ie) ? null : e, $e = !Me && (u & Se) !== 0, re = null, C = e.ctx, me = !1, Tt++;
833
+ try {
834
+ var c = (
835
+ /** @type {Function} */
836
+ (0, e.fn)()
837
+ ), f = e.deps;
838
+ if (q !== null) {
839
+ var d;
840
+ if (nt(e, B), f !== null && B > 0)
841
+ for (f.length = B + q.length, d = 0; d < q.length; d++)
842
+ f[B + d] = q[d];
843
+ else
844
+ e.deps = f = q;
845
+ if (!$e)
846
+ for (d = B; d < f.length; d++)
847
+ ((h = f[d]).reactions ?? (h.reactions = [])).push(e);
848
+ } else f !== null && B < f.length && (nt(e, B), f.length = B);
849
+ if (it() && ce !== null && !(e.f & (Z | Ce | pe)))
850
+ for (d = 0; d < /** @type {Source[]} */
851
+ ce.length; d++)
852
+ Lr(
853
+ ce[d],
854
+ /** @type {Effect} */
855
+ e
856
+ );
857
+ return r !== null && Tt++, c;
858
+ } finally {
859
+ q = t, B = n, ce = s, A = r, $e = i, re = o, C = l, me = a;
860
+ }
861
+ }
862
+ function Ti(e, t) {
863
+ let n = t.reactions;
864
+ if (n !== null) {
865
+ var s = qs.call(n, e);
866
+ if (s !== -1) {
867
+ var r = n.length - 1;
868
+ r === 0 ? n = t.reactions = null : (n[s] = n[r], n.pop());
869
+ }
870
+ }
871
+ n === null && t.f & Z && // Destroying a child effect while updating a parent effect can cause a dependency to appear
872
+ // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
873
+ // allows us to skip the expensive work of disconnecting and immediately reconnecting it
874
+ (q === null || !q.includes(t)) && (te(t, Ce), t.f & (Se | bt) || (t.f ^= bt), nt(
875
+ /** @type {Derived} **/
876
+ t,
877
+ 0
878
+ ));
879
+ }
880
+ function nt(e, t) {
881
+ var n = e.deps;
882
+ if (n !== null)
883
+ for (var s = t; s < n.length; s++)
884
+ Ti(e, n[s]);
885
+ }
886
+ function Lt(e) {
887
+ var t = e.f;
888
+ if (!(t & ze)) {
889
+ te(e, L);
890
+ var n = E, s = C;
891
+ E = e;
892
+ try {
893
+ t & Ot ? gi(e) : Cr(e), Sr(e), Ir(e);
894
+ var r = Dr(e);
895
+ e.teardown = typeof r == "function" ? r : null, e.wv = Rr;
896
+ var i = e.deps, o;
897
+ Jt && ai && e.f & pe;
898
+ } catch (l) {
899
+ jt(l, e, n, s || e.ctx);
900
+ } finally {
901
+ E = n;
902
+ }
903
+ }
904
+ }
905
+ function zr() {
906
+ if (Pe > 1e3) {
907
+ Pe = 0;
908
+ try {
909
+ ti();
910
+ } catch (e) {
911
+ if (tt !== null)
912
+ jt(e, tt, null);
913
+ else
914
+ throw e;
915
+ }
916
+ }
917
+ Pe++;
918
+ }
919
+ function Ur(e) {
920
+ var t = e.length;
921
+ if (t !== 0) {
922
+ zr();
923
+ var n = Me;
924
+ Me = !0;
925
+ try {
926
+ for (var s = 0; s < t; s++) {
927
+ var r = e[s];
928
+ r.f & L || (r.f ^= L);
929
+ var i = [];
930
+ Hr(r, i), Ii(i);
931
+ }
932
+ } finally {
933
+ Me = n;
934
+ }
935
+ }
936
+ }
937
+ function Ii(e) {
938
+ var t = e.length;
939
+ if (t !== 0)
940
+ for (var n = 0; n < t; n++) {
941
+ var s = e[n];
942
+ if (!(s.f & (ze | ne)))
943
+ try {
944
+ Be(s) && (Lt(s), s.deps === null && s.first === null && s.nodes_start === null && (s.teardown === null ? Ar(s) : s.fn = null));
945
+ } catch (r) {
946
+ jt(r, s, null, s.ctx);
947
+ }
948
+ }
949
+ }
950
+ function Si() {
951
+ if (et = !1, Pe > 1001)
952
+ return;
953
+ const e = xe;
954
+ xe = [], Ur(e), et || (Pe = 0, tt = null);
955
+ }
956
+ function Dt(e) {
957
+ dt === Pr && (et || (et = !0, queueMicrotask(Si))), tt = e;
958
+ for (var t = e; t.parent !== null; ) {
959
+ t = t.parent;
960
+ var n = t.f;
961
+ if (n & (Ie | ue)) {
962
+ if (!(n & L)) return;
963
+ t.f ^= L;
964
+ }
965
+ }
966
+ xe.push(t);
967
+ }
968
+ function Hr(e, t) {
969
+ var n = e.first, s = [];
970
+ e: for (; n !== null; ) {
971
+ var r = n.f, i = (r & ue) !== 0, o = i && (r & L) !== 0, l = n.next;
972
+ if (!o && !(r & ne))
973
+ if (r & At) {
974
+ if (i)
975
+ n.f ^= L;
976
+ else
977
+ try {
978
+ Be(n) && Lt(n);
979
+ } catch (f) {
980
+ jt(f, n, null, n.ctx);
981
+ }
982
+ var a = n.first;
983
+ if (a !== null) {
984
+ n = a;
985
+ continue;
986
+ }
987
+ } else r & dr && s.push(n);
988
+ if (l === null) {
989
+ let f = n.parent;
990
+ for (; f !== null; ) {
991
+ if (e === f)
992
+ break e;
993
+ var u = f.next;
994
+ if (u !== null) {
995
+ n = u;
996
+ continue e;
997
+ }
998
+ f = f.parent;
999
+ }
1000
+ }
1001
+ n = l;
1002
+ }
1003
+ for (var c = 0; c < s.length; c++)
1004
+ a = s[c], t.push(a), Hr(a, t);
1005
+ }
1006
+ function V(e) {
1007
+ var t = dt, n = xe;
1008
+ try {
1009
+ zr();
1010
+ const r = [];
1011
+ dt = wi, xe = r, et = !1, Ur(n);
1012
+ var s = e == null ? void 0 : e();
1013
+ return bi(), (xe.length > 0 || r.length > 0) && V(), Pe = 0, tt = null, s;
1014
+ } finally {
1015
+ dt = t, xe = n;
1016
+ }
1017
+ }
1018
+ async function Ci() {
1019
+ await Promise.resolve(), V();
1020
+ }
1021
+ function y(e) {
1022
+ var c;
1023
+ var t = e.f, n = (t & Z) !== 0;
1024
+ if (n && t & ze) {
1025
+ var s = kr(
1026
+ /** @type {Derived} */
1027
+ e
1028
+ );
1029
+ return xn(
1030
+ /** @type {Derived} */
1031
+ e
1032
+ ), s;
1033
+ }
1034
+ if (A !== null && !me) {
1035
+ re !== null && re.includes(e) && oi();
1036
+ var r = A.deps;
1037
+ e.rv < Tt && (e.rv = Tt, q === null && r !== null && r[B] === e ? B++ : q === null ? q = [e] : q.push(e));
1038
+ } else if (n && /** @type {Derived} */
1039
+ e.deps === null)
1040
+ for (var i = (
1041
+ /** @type {Derived} */
1042
+ e
1043
+ ), o = i.parent, l = i; o !== null; )
1044
+ if (o.f & Z) {
1045
+ var a = (
1046
+ /** @type {Derived} */
1047
+ o
1048
+ );
1049
+ l = a, o = a.parent;
1050
+ } else {
1051
+ var u = (
1052
+ /** @type {Effect} */
1053
+ o
1054
+ );
1055
+ (c = u.deriveds) != null && c.includes(l) || (u.deriveds ?? (u.deriveds = [])).push(l);
1056
+ break;
1057
+ }
1058
+ return n && (i = /** @type {Derived} */
1059
+ e, Be(i) && Er(i)), e.v;
1060
+ }
1061
+ function ae(e) {
1062
+ var t = me;
1063
+ try {
1064
+ return me = !0, e();
1065
+ } finally {
1066
+ me = t;
1067
+ }
1068
+ }
1069
+ const Ai = -7169;
1070
+ function te(e, t) {
1071
+ e.f = e.f & Ai | t;
1072
+ }
1073
+ function sn(e, t = 1) {
1074
+ var n = y(e), s = t === 1 ? n++ : n--;
1075
+ return k(e, n), s;
1076
+ }
1077
+ function be(e, t = !1, n) {
1078
+ C = {
1079
+ p: C,
1080
+ c: null,
1081
+ e: null,
1082
+ m: !1,
1083
+ s: e,
1084
+ x: null,
1085
+ l: null
1086
+ }, Ue && !t && (C.l = {
1087
+ s: null,
1088
+ u: null,
1089
+ r1: [],
1090
+ r2: H(!1)
1091
+ });
1092
+ }
1093
+ function we(e) {
1094
+ const t = C;
1095
+ if (t !== null) {
1096
+ e !== void 0 && (t.x = e);
1097
+ const o = t.e;
1098
+ if (o !== null) {
1099
+ var n = E, s = A;
1100
+ t.e = null;
1101
+ try {
1102
+ for (var r = 0; r < o.length; r++) {
1103
+ var i = o[r];
1104
+ Q(i.effect), le(i.reaction), Pt(i.fn);
1105
+ }
1106
+ } finally {
1107
+ Q(n), le(s);
1108
+ }
1109
+ }
1110
+ C = t.p, t.m = !0;
1111
+ }
1112
+ return e || /** @type {T} */
1113
+ {};
1114
+ }
1115
+ function qr(e) {
1116
+ if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
1117
+ if (Ee in e)
1118
+ on(e);
1119
+ else if (!Array.isArray(e))
1120
+ for (let t in e) {
1121
+ const n = e[t];
1122
+ typeof n == "object" && n && Ee in n && on(n);
1123
+ }
1124
+ }
1125
+ }
1126
+ function on(e, t = /* @__PURE__ */ new Set()) {
1127
+ if (typeof e == "object" && e !== null && // We don't want to traverse DOM elements
1128
+ !(e instanceof EventTarget) && !t.has(e)) {
1129
+ t.add(e), e instanceof Date && e.getTime();
1130
+ for (let s in e)
1131
+ try {
1132
+ on(e[s], t);
1133
+ } catch {
1134
+ }
1135
+ const n = bn(e);
1136
+ if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
1137
+ const s = fr(n);
1138
+ for (let r in s) {
1139
+ const i = s[r].get;
1140
+ if (i)
1141
+ try {
1142
+ i.call(e);
1143
+ } catch {
1144
+ }
1145
+ }
1146
+ }
1147
+ }
1148
+ }
1149
+ function Oi(e, t) {
1150
+ if (t) {
1151
+ const n = document.body;
1152
+ e.autofocus = !0, Ve(() => {
1153
+ document.activeElement === n && e.focus();
1154
+ });
1155
+ }
1156
+ }
1157
+ let Un = !1;
1158
+ function Vr() {
1159
+ Un || (Un = !0, document.addEventListener(
1160
+ "reset",
1161
+ (e) => {
1162
+ Promise.resolve().then(() => {
1163
+ var t;
1164
+ if (!e.defaultPrevented)
1165
+ for (
1166
+ const n of
1167
+ /**@type {HTMLFormElement} */
1168
+ e.target.elements
1169
+ )
1170
+ (t = n.__on_r) == null || t.call(n);
1171
+ });
1172
+ },
1173
+ // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
1174
+ { capture: !0 }
1175
+ ));
1176
+ }
1177
+ function Br(e) {
1178
+ var t = A, n = E;
1179
+ le(null), Q(null);
1180
+ try {
1181
+ return e();
1182
+ } finally {
1183
+ le(t), Q(n);
1184
+ }
1185
+ }
1186
+ function Ni(e, t, n, s = n) {
1187
+ e.addEventListener(t, () => Br(n));
1188
+ const r = e.__on_r;
1189
+ r ? e.__on_r = () => {
1190
+ r(), s(!0);
1191
+ } : e.__on_r = () => s(!0), Vr();
1192
+ }
1193
+ const Gr = /* @__PURE__ */ new Set(), ln = /* @__PURE__ */ new Set();
1194
+ function Fi(e, t, n, s) {
1195
+ function r(i) {
1196
+ if (s.capture || Je.call(t, i), !i.cancelBubble)
1197
+ return Br(() => n.call(this, i));
1198
+ }
1199
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Ve(() => {
1200
+ t.addEventListener(e, r, s);
1201
+ }) : t.addEventListener(e, r, s), r;
1202
+ }
1203
+ function ot(e) {
1204
+ for (var t = 0; t < e.length; t++)
1205
+ Gr.add(e[t]);
1206
+ for (var n of ln)
1207
+ n(e);
1208
+ }
1209
+ function Je(e) {
1210
+ var g;
1211
+ var t = this, n = (
1212
+ /** @type {Node} */
1213
+ t.ownerDocument
1214
+ ), s = e.type, r = ((g = e.composedPath) == null ? void 0 : g.call(e)) || [], i = (
1215
+ /** @type {null | Element} */
1216
+ r[0] || e.target
1217
+ ), o = 0, l = e.__root;
1218
+ if (l) {
1219
+ var a = r.indexOf(l);
1220
+ if (a !== -1 && (t === document || t === /** @type {any} */
1221
+ window)) {
1222
+ e.__root = t;
1223
+ return;
1224
+ }
1225
+ var u = r.indexOf(t);
1226
+ if (u === -1)
1227
+ return;
1228
+ a <= u && (o = a);
1229
+ }
1230
+ if (i = /** @type {Element} */
1231
+ r[o] || e.target, i !== t) {
1232
+ gt(e, "currentTarget", {
1233
+ configurable: !0,
1234
+ get() {
1235
+ return i || n;
1236
+ }
1237
+ });
1238
+ var c = A, f = E;
1239
+ le(null), Q(null);
1240
+ try {
1241
+ for (var d, h = []; i !== null; ) {
1242
+ var v = i.assignedSlot || i.parentNode || /** @type {any} */
1243
+ i.host || null;
1244
+ try {
1245
+ var p = i["__" + s];
1246
+ if (p !== void 0 && !/** @type {any} */
1247
+ i.disabled)
1248
+ if (Ct(p)) {
1249
+ var [m, ..._] = p;
1250
+ m.apply(i, [e, ..._]);
1251
+ } else
1252
+ p.call(i, e);
1253
+ } catch (b) {
1254
+ d ? h.push(b) : d = b;
1255
+ }
1256
+ if (e.cancelBubble || v === t || v === null)
1257
+ break;
1258
+ i = v;
1259
+ }
1260
+ if (d) {
1261
+ for (let b of h)
1262
+ queueMicrotask(() => {
1263
+ throw b;
1264
+ });
1265
+ throw d;
1266
+ }
1267
+ } finally {
1268
+ e.__root = t, delete e.currentTarget, le(c), Q(f);
1269
+ }
1270
+ }
1271
+ }
1272
+ function Tn(e) {
1273
+ var t = document.createElement("template");
1274
+ return t.innerHTML = e, t.content;
1275
+ }
1276
+ function se(e, t) {
1277
+ var n = (
1278
+ /** @type {Effect} */
1279
+ E
1280
+ );
1281
+ n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
1282
+ }
1283
+ // @__NO_SIDE_EFFECTS__
1284
+ function X(e, t) {
1285
+ var n = (t & Ms) !== 0, s = (t & Ps) !== 0, r, i = !e.startsWith("<!>");
1286
+ return () => {
1287
+ if (I)
1288
+ return se(S, null), S;
1289
+ r === void 0 && (r = Tn(i ? e : "<!>" + e), n || (r = /** @type {Node} */
1290
+ /* @__PURE__ */ G(r)));
1291
+ var o = (
1292
+ /** @type {TemplateNode} */
1293
+ s ? document.importNode(r, !0) : r.cloneNode(!0)
1294
+ );
1295
+ if (n) {
1296
+ var l = (
1297
+ /** @type {TemplateNode} */
1298
+ /* @__PURE__ */ G(o)
1299
+ ), a = (
1300
+ /** @type {TemplateNode} */
1301
+ o.lastChild
1302
+ );
1303
+ se(l, a);
1304
+ } else
1305
+ se(o, o);
1306
+ return o;
1307
+ };
1308
+ }
1309
+ // @__NO_SIDE_EFFECTS__
1310
+ function Mi(e, t, n = "svg") {
1311
+ var s = !e.startsWith("<!>"), r = `<${n}>${s ? e : "<!>" + e}</${n}>`, i;
1312
+ return () => {
1313
+ if (I)
1314
+ return se(S, null), S;
1315
+ if (!i) {
1316
+ var o = (
1317
+ /** @type {DocumentFragment} */
1318
+ Tn(r)
1319
+ ), l = (
1320
+ /** @type {Element} */
1321
+ /* @__PURE__ */ G(o)
1322
+ );
1323
+ i = /** @type {Element} */
1324
+ /* @__PURE__ */ G(l);
1325
+ }
1326
+ var a = (
1327
+ /** @type {TemplateNode} */
1328
+ i.cloneNode(!0)
1329
+ );
1330
+ return se(a, a), a;
1331
+ };
1332
+ }
1333
+ function Hn() {
1334
+ if (I)
1335
+ return se(S, null), S;
1336
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = je();
1337
+ return e.append(t, n), se(t, n), e;
1338
+ }
1339
+ function j(e, t) {
1340
+ if (I) {
1341
+ E.nodes_end = S, Re();
1342
+ return;
1343
+ }
1344
+ e !== null && e.before(
1345
+ /** @type {Node} */
1346
+ t
1347
+ );
1348
+ }
1349
+ let an = !0;
1350
+ function Zr(e, t) {
1351
+ var n = t == null ? "" : typeof t == "object" ? t + "" : t;
1352
+ n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n == null ? "" : n + "");
1353
+ }
1354
+ function Wr(e, t) {
1355
+ return Yr(e, t);
1356
+ }
1357
+ function Pi(e, t) {
1358
+ en(), t.intro = t.intro ?? !1;
1359
+ const n = t.target, s = I, r = S;
1360
+ try {
1361
+ for (var i = (
1362
+ /** @type {TemplateNode} */
1363
+ /* @__PURE__ */ G(n)
1364
+ ); i && (i.nodeType !== 8 || /** @type {Comment} */
1365
+ i.data !== cr); )
1366
+ i = /** @type {TemplateNode} */
1367
+ /* @__PURE__ */ _e(i);
1368
+ if (!i)
1369
+ throw Fe;
1370
+ he(!0), K(
1371
+ /** @type {Comment} */
1372
+ i
1373
+ ), Re();
1374
+ const o = Yr(e, { ...t, anchor: i });
1375
+ if (S === null || S.nodeType !== 8 || /** @type {Comment} */
1376
+ S.data !== yn)
1377
+ throw Mt(), Fe;
1378
+ return he(!1), /** @type {Exports} */
1379
+ o;
1380
+ } catch (o) {
1381
+ if (o === Fe)
1382
+ return t.recover === !1 && ni(), en(), wr(n), he(!1), Wr(e, t);
1383
+ throw o;
1384
+ } finally {
1385
+ he(s), K(r);
1386
+ }
1387
+ }
1388
+ const Oe = /* @__PURE__ */ new Map();
1389
+ function Yr(e, { target: t, anchor: n, props: s = {}, events: r, context: i, intro: o = !0 }) {
1390
+ en();
1391
+ var l = /* @__PURE__ */ new Set(), a = (f) => {
1392
+ for (var d = 0; d < f.length; d++) {
1393
+ var h = f[d];
1394
+ if (!l.has(h)) {
1395
+ l.add(h);
1396
+ var v = Hs(h);
1397
+ t.addEventListener(h, Je, { passive: v });
1398
+ var p = Oe.get(h);
1399
+ p === void 0 ? (document.addEventListener(h, Je, { passive: v }), Oe.set(h, 1)) : Oe.set(h, p + 1);
1400
+ }
1401
+ }
1402
+ };
1403
+ a(mn(Gr)), ln.add(a);
1404
+ var u = void 0, c = vi(() => {
1405
+ var f = n ?? t.appendChild(je());
1406
+ return Le(() => {
1407
+ if (i) {
1408
+ be({});
1409
+ var d = (
1410
+ /** @type {ComponentContext} */
1411
+ C
1412
+ );
1413
+ d.c = i;
1414
+ }
1415
+ r && (s.$$events = r), I && se(
1416
+ /** @type {TemplateNode} */
1417
+ f,
1418
+ null
1419
+ ), an = o, u = e(f, s) || {}, an = !0, I && (E.nodes_end = S), i && we();
1420
+ }), () => {
1421
+ var v;
1422
+ for (var d of l) {
1423
+ t.removeEventListener(d, Je);
1424
+ var h = (
1425
+ /** @type {number} */
1426
+ Oe.get(d)
1427
+ );
1428
+ --h === 0 ? (document.removeEventListener(d, Je), Oe.delete(d)) : Oe.set(d, h);
1429
+ }
1430
+ ln.delete(a), f !== n && ((v = f.parentNode) == null || v.removeChild(f));
1431
+ };
1432
+ });
1433
+ return un.set(u, c), u;
1434
+ }
1435
+ let un = /* @__PURE__ */ new WeakMap();
1436
+ function Ri(e, t) {
1437
+ const n = un.get(e);
1438
+ return n ? (un.delete(e), n(t)) : Promise.resolve();
1439
+ }
1440
+ function rt(e, t, n = !1) {
1441
+ I && Re();
1442
+ var s = e, r = null, i = null, o = U, l = n ? Nt : 0, a = !1;
1443
+ const u = (f, d = !0) => {
1444
+ a = !0, c(d, f);
1445
+ }, c = (f, d) => {
1446
+ if (o === (o = f)) return;
1447
+ let h = !1;
1448
+ if (I) {
1449
+ const v = (
1450
+ /** @type {Comment} */
1451
+ s.data === gn
1452
+ );
1453
+ !!o === v && (s = Xt(), K(s), he(!1), h = !0);
1454
+ }
1455
+ o ? (r ? $t(r) : d && (r = Le(() => d(s))), i && xt(i, () => {
1456
+ i = null;
1457
+ })) : (i ? $t(i) : d && (i = Le(() => d(s))), r && xt(r, () => {
1458
+ r = null;
1459
+ })), h && he(!0);
1460
+ };
1461
+ Rt(() => {
1462
+ a = !1, t(u), a || c(null, null);
1463
+ }, l), I && (s = S);
1464
+ }
1465
+ function Kr(e, t) {
1466
+ return t;
1467
+ }
1468
+ function ji(e, t, n, s) {
1469
+ for (var r = [], i = t.length, o = 0; o < i; o++)
1470
+ $n(t[o].e, r, !0);
1471
+ var l = i > 0 && r.length === 0 && n !== null;
1472
+ if (l) {
1473
+ var a = (
1474
+ /** @type {Element} */
1475
+ /** @type {Element} */
1476
+ n.parentNode
1477
+ );
1478
+ wr(a), a.append(
1479
+ /** @type {Element} */
1480
+ n
1481
+ ), s.clear(), ye(e, t[0].prev, t[i - 1].next);
1482
+ }
1483
+ Or(r, () => {
1484
+ for (var u = 0; u < i; u++) {
1485
+ var c = t[u];
1486
+ l || (s.delete(c.k), ye(e, c.prev, c.next)), oe(c.e, !l);
1487
+ }
1488
+ });
1489
+ }
1490
+ function Jr(e, t, n, s, r, i = null) {
1491
+ var o = e, l = { flags: t, items: /* @__PURE__ */ new Map(), first: null }, a = (t & ar) !== 0;
1492
+ if (a) {
1493
+ var u = (
1494
+ /** @type {Element} */
1495
+ e
1496
+ );
1497
+ o = I ? K(
1498
+ /** @type {Comment | Text} */
1499
+ /* @__PURE__ */ G(u)
1500
+ ) : u.appendChild(je());
1501
+ }
1502
+ I && Re();
1503
+ var c = null, f = !1, d = /* @__PURE__ */ xr(() => {
1504
+ var h = n();
1505
+ return Ct(h) ? h : h == null ? [] : mn(h);
1506
+ });
1507
+ Rt(() => {
1508
+ var h = y(d), v = h.length;
1509
+ if (f && v === 0)
1510
+ return;
1511
+ f = v === 0;
1512
+ let p = !1;
1513
+ if (I) {
1514
+ var m = (
1515
+ /** @type {Comment} */
1516
+ o.data === gn
1517
+ );
1518
+ m !== (v === 0) && (o = Xt(), K(o), he(!1), p = !0);
1519
+ }
1520
+ if (I) {
1521
+ for (var _ = null, g, b = 0; b < v; b++) {
1522
+ if (S.nodeType === 8 && /** @type {Comment} */
1523
+ S.data === yn) {
1524
+ o = /** @type {Comment} */
1525
+ S, p = !0, he(!1);
1526
+ break;
1527
+ }
1528
+ var x = h[b], $ = s(x, b);
1529
+ g = Qr(
1530
+ S,
1531
+ l,
1532
+ _,
1533
+ null,
1534
+ x,
1535
+ $,
1536
+ b,
1537
+ r,
1538
+ t
1539
+ ), l.items.set($, g), _ = g;
1540
+ }
1541
+ v > 0 && K(Xt());
1542
+ }
1543
+ if (!I) {
1544
+ var w = (
1545
+ /** @type {Effect} */
1546
+ A
1547
+ );
1548
+ Li(
1549
+ h,
1550
+ l,
1551
+ o,
1552
+ r,
1553
+ t,
1554
+ (w.f & ne) !== 0,
1555
+ s
1556
+ );
1557
+ }
1558
+ i !== null && (v === 0 ? c ? $t(c) : c = Le(() => i(o)) : c !== null && xt(c, () => {
1559
+ c = null;
1560
+ })), p && he(!0), y(d);
1561
+ }), I && (o = S);
1562
+ }
1563
+ function Li(e, t, n, s, r, i, o, l) {
1564
+ var An, On, Nn, Fn;
1565
+ var a = (r & Is) !== 0, u = (r & (pn | _n)) !== 0, c = e.length, f = t.items, d = t.first, h = d, v, p = null, m, _ = [], g = [], b, x, $, w;
1566
+ if (a)
1567
+ for (w = 0; w < c; w += 1)
1568
+ b = e[w], x = o(b, w), $ = f.get(x), $ !== void 0 && ((An = $.a) == null || An.measure(), (m ?? (m = /* @__PURE__ */ new Set())).add($));
1569
+ for (w = 0; w < c; w += 1) {
1570
+ if (b = e[w], x = o(b, w), $ = f.get(x), $ === void 0) {
1571
+ var M = h ? (
1572
+ /** @type {TemplateNode} */
1573
+ h.e.nodes_start
1574
+ ) : n;
1575
+ p = Qr(
1576
+ M,
1577
+ t,
1578
+ p,
1579
+ p === null ? t.first : p.next,
1580
+ b,
1581
+ x,
1582
+ w,
1583
+ s,
1584
+ r
1585
+ ), f.set(x, p), _ = [], g = [], h = p.next;
1586
+ continue;
1587
+ }
1588
+ if (u && Di($, b, w, r), $.e.f & ne && ($t($.e), a && ((On = $.a) == null || On.unfix(), (m ?? (m = /* @__PURE__ */ new Set())).delete($))), $ !== h) {
1589
+ if (v !== void 0 && v.has($)) {
1590
+ if (_.length < g.length) {
1591
+ var T = g[0], O;
1592
+ p = T.prev;
1593
+ var D = _[0], Ht = _[_.length - 1];
1594
+ for (O = 0; O < _.length; O += 1)
1595
+ qn(_[O], T, n);
1596
+ for (O = 0; O < g.length; O += 1)
1597
+ v.delete(g[O]);
1598
+ ye(t, D.prev, Ht.next), ye(t, p, D), ye(t, Ht, T), h = T, p = Ht, w -= 1, _ = [], g = [];
1599
+ } else
1600
+ v.delete($), qn($, h, n), ye(t, $.prev, $.next), ye(t, $, p === null ? t.first : p.next), ye(t, p, $), p = $;
1601
+ continue;
1602
+ }
1603
+ for (_ = [], g = []; h !== null && h.k !== x; )
1604
+ (i || !(h.e.f & ne)) && (v ?? (v = /* @__PURE__ */ new Set())).add(h), g.push(h), h = h.next;
1605
+ if (h === null)
1606
+ continue;
1607
+ $ = h;
1608
+ }
1609
+ _.push($), p = $, h = $.next;
1610
+ }
1611
+ if (h !== null || v !== void 0) {
1612
+ for (var Ze = v === void 0 ? [] : mn(v); h !== null; )
1613
+ (i || !(h.e.f & ne)) && Ze.push(h), h = h.next;
1614
+ var qt = Ze.length;
1615
+ if (qt > 0) {
1616
+ var $s = r & ar && c === 0 ? n : null;
1617
+ if (a) {
1618
+ for (w = 0; w < qt; w += 1)
1619
+ (Nn = Ze[w].a) == null || Nn.measure();
1620
+ for (w = 0; w < qt; w += 1)
1621
+ (Fn = Ze[w].a) == null || Fn.fix();
1622
+ }
1623
+ ji(t, Ze, $s, f);
1624
+ }
1625
+ }
1626
+ a && Ve(() => {
1627
+ var Mn;
1628
+ if (m !== void 0)
1629
+ for ($ of m)
1630
+ (Mn = $.a) == null || Mn.apply();
1631
+ }), E.first = t.first && t.first.e, E.last = p && p.e;
1632
+ }
1633
+ function Di(e, t, n, s) {
1634
+ s & pn && Qt(e.v, t), s & _n ? Qt(
1635
+ /** @type {Value<number>} */
1636
+ e.i,
1637
+ n
1638
+ ) : e.i = n;
1639
+ }
1640
+ function Qr(e, t, n, s, r, i, o, l, a, u) {
1641
+ var c = (a & pn) !== 0, f = (a & Ss) === 0, d = c ? f ? /* @__PURE__ */ Ft(r) : H(r) : r, h = a & _n ? H(o) : o, v = {
1642
+ i: h,
1643
+ v: d,
1644
+ k: i,
1645
+ a: null,
1646
+ // @ts-expect-error
1647
+ e: null,
1648
+ prev: n,
1649
+ next: s
1650
+ };
1651
+ try {
1652
+ return v.e = Le(() => l(e, d, h), I), v.e.prev = n && n.e, v.e.next = s && s.e, n === null ? t.first = v : (n.next = v, n.e.next = v.e), s !== null && (s.prev = v, s.e.prev = v.e), v;
1653
+ } finally {
1654
+ }
1655
+ }
1656
+ function qn(e, t, n) {
1657
+ for (var s = e.next ? (
1658
+ /** @type {TemplateNode} */
1659
+ e.next.e.nodes_start
1660
+ ) : n, r = t ? (
1661
+ /** @type {TemplateNode} */
1662
+ t.e.nodes_start
1663
+ ) : n, i = (
1664
+ /** @type {TemplateNode} */
1665
+ e.e.nodes_start
1666
+ ); i !== s; ) {
1667
+ var o = (
1668
+ /** @type {TemplateNode} */
1669
+ /* @__PURE__ */ _e(i)
1670
+ );
1671
+ r.before(i), i = o;
1672
+ }
1673
+ }
1674
+ function ye(e, t, n) {
1675
+ t === null ? e.first = n : (t.next = n, t.e.next = n && n.e), n !== null && (n.prev = t, n.e.prev = t && t.e);
1676
+ }
1677
+ function zi(e, t, n, s, r) {
1678
+ var i = e, o = "", l;
1679
+ Rt(() => {
1680
+ if (o === (o = t() ?? "")) {
1681
+ I && Re();
1682
+ return;
1683
+ }
1684
+ l !== void 0 && (oe(l), l = void 0), o !== "" && (l = Le(() => {
1685
+ if (I) {
1686
+ S.data;
1687
+ for (var a = Re(), u = a; a !== null && (a.nodeType !== 8 || /** @type {Comment} */
1688
+ a.data !== ""); )
1689
+ u = a, a = /** @type {TemplateNode} */
1690
+ /* @__PURE__ */ _e(a);
1691
+ if (a === null)
1692
+ throw Mt(), Fe;
1693
+ se(S, u), i = K(a);
1694
+ return;
1695
+ }
1696
+ var c = o + "";
1697
+ c = `<svg>${c}</svg>`;
1698
+ var f = Tn(c);
1699
+ for (f = /** @type {Element} */
1700
+ /* @__PURE__ */ G(f), se(
1701
+ /** @type {TemplateNode} */
1702
+ /* @__PURE__ */ G(f),
1703
+ /** @type {TemplateNode} */
1704
+ f.lastChild
1705
+ ); /* @__PURE__ */ G(f); )
1706
+ i.before(
1707
+ /** @type {Node} */
1708
+ /* @__PURE__ */ G(f)
1709
+ );
1710
+ }));
1711
+ });
1712
+ }
1713
+ function lt(e, t) {
1714
+ Ve(() => {
1715
+ var n = e.getRootNode(), s = (
1716
+ /** @type {ShadowRoot} */
1717
+ n.host ? (
1718
+ /** @type {ShadowRoot} */
1719
+ n
1720
+ ) : (
1721
+ /** @type {Document} */
1722
+ n.head ?? /** @type {Document} */
1723
+ n.ownerDocument.head
1724
+ )
1725
+ );
1726
+ if (!s.querySelector("#" + t.hash)) {
1727
+ const r = document.createElement("style");
1728
+ r.id = t.hash, r.textContent = t.code, s.appendChild(r);
1729
+ }
1730
+ });
1731
+ }
1732
+ function Xr(e) {
1733
+ var t, n, s = "";
1734
+ if (typeof e == "string" || typeof e == "number") s += e;
1735
+ else if (typeof e == "object") if (Array.isArray(e)) {
1736
+ var r = e.length;
1737
+ for (t = 0; t < r; t++) e[t] && (n = Xr(e[t])) && (s && (s += " "), s += n);
1738
+ } else for (n in e) e[n] && (s && (s += " "), s += n);
1739
+ return s;
1740
+ }
1741
+ function Ui() {
1742
+ for (var e, t, n = 0, s = "", r = arguments.length; n < r; n++) (e = arguments[n]) && (t = Xr(e)) && (s && (s += " "), s += t);
1743
+ return s;
1744
+ }
1745
+ function es(e) {
1746
+ return typeof e == "object" ? Ui(e) : e ?? "";
1747
+ }
1748
+ function Hi(e) {
1749
+ if (I) {
1750
+ var t = !1, n = () => {
1751
+ if (!t) {
1752
+ if (t = !0, e.hasAttribute("value")) {
1753
+ var s = e.value;
1754
+ It(e, "value", null), e.value = s;
1755
+ }
1756
+ if (e.hasAttribute("checked")) {
1757
+ var r = e.checked;
1758
+ It(e, "checked", null), e.checked = r;
1759
+ }
1760
+ }
1761
+ };
1762
+ e.__on_r = n, mi(n), Vr();
1763
+ }
1764
+ }
1765
+ function qi(e, t) {
1766
+ t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
1767
+ }
1768
+ function It(e, t, n, s) {
1769
+ var r = e.__attributes ?? (e.__attributes = {});
1770
+ I && (r[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || r[t] !== (r[t] = n) && (t === "style" && "__styles" in e && (e.__styles = {}), t === "loading" && (e[Ks] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ts(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
1771
+ }
1772
+ function Vn(e, t, n, s, r = !1, i = !1, o = !1) {
1773
+ var l = t || {}, a = e.tagName === "OPTION";
1774
+ for (var u in t)
1775
+ u in n || (n[u] = null);
1776
+ n.class && (n.class = es(n.class));
1777
+ var c = ts(e), f = (
1778
+ /** @type {Record<string, unknown>} **/
1779
+ e.__attributes ?? (e.__attributes = {})
1780
+ );
1781
+ for (const _ in n) {
1782
+ let g = n[_];
1783
+ if (a && _ === "value" && g == null) {
1784
+ e.value = e.__value = "", l[_] = g;
1785
+ continue;
1786
+ }
1787
+ var d = l[_];
1788
+ if (g !== d) {
1789
+ l[_] = g;
1790
+ var h = _[0] + _[1];
1791
+ if (h !== "$$") {
1792
+ if (h === "on") {
1793
+ const b = {}, x = "$$" + _;
1794
+ let $ = _.slice(2);
1795
+ var v = Ls($);
1796
+ if (Rs($) && ($ = $.slice(0, -7), b.capture = !0), !v && d) {
1797
+ if (g != null) continue;
1798
+ e.removeEventListener($, l[x], b), l[x] = null;
1799
+ }
1800
+ if (g != null)
1801
+ if (v)
1802
+ e[`__${$}`] = g, ot([$]);
1803
+ else {
1804
+ let w = function(M) {
1805
+ l[_].call(this, M);
1806
+ };
1807
+ l[x] = Fi($, e, w, b);
1808
+ }
1809
+ else v && (e[`__${$}`] = void 0);
1810
+ } else if (_ === "style" && g != null)
1811
+ e.style.cssText = g + "";
1812
+ else if (_ === "autofocus")
1813
+ Oi(
1814
+ /** @type {HTMLElement} */
1815
+ e,
1816
+ !!g
1817
+ );
1818
+ else if (_ === "__value" || _ === "value" && g != null)
1819
+ e.value = e[_] = e.__value = g;
1820
+ else if (_ === "selected" && a)
1821
+ qi(
1822
+ /** @type {HTMLOptionElement} */
1823
+ e,
1824
+ g
1825
+ );
1826
+ else {
1827
+ var p = _;
1828
+ r || (p = zs(p));
1829
+ var m = p === "defaultValue" || p === "defaultChecked";
1830
+ if (g == null && !i && !m)
1831
+ if (f[_] = null, p === "value" || p === "checked") {
1832
+ let b = (
1833
+ /** @type {HTMLInputElement} */
1834
+ e
1835
+ );
1836
+ if (p === "value") {
1837
+ let x = b.defaultValue;
1838
+ b.removeAttribute(p), b.defaultValue = x;
1839
+ } else {
1840
+ let x = b.defaultChecked;
1841
+ b.removeAttribute(p), b.defaultChecked = x;
1842
+ }
1843
+ } else
1844
+ e.removeAttribute(_);
1845
+ else m || c.includes(p) && (i || typeof g != "string") ? e[p] = g : typeof g != "function" && (I && (p === "src" || p === "href" || p === "srcset") || It(e, p, g));
1846
+ }
1847
+ _ === "style" && "__styles" in e && (e.__styles = {});
1848
+ }
1849
+ }
1850
+ }
1851
+ return l;
1852
+ }
1853
+ var Bn = /* @__PURE__ */ new Map();
1854
+ function ts(e) {
1855
+ var t = Bn.get(e.nodeName);
1856
+ if (t) return t;
1857
+ Bn.set(e.nodeName, t = []);
1858
+ for (var n, s = e, r = Element.prototype; r !== s; ) {
1859
+ n = fr(s);
1860
+ for (var i in n)
1861
+ n[i].set && t.push(i);
1862
+ s = bn(s);
1863
+ }
1864
+ return t;
1865
+ }
1866
+ function Vi(e, t, n) {
1867
+ var s = e.__className, r = Bi(t, n);
1868
+ I && e.className === r ? e.__className = r : (s !== r || I && e.className !== r) && (e.className = r, e.__className = r);
1869
+ }
1870
+ function Bi(e, t) {
1871
+ return (e ?? "") + (" " + t);
1872
+ }
1873
+ const Gi = () => performance.now(), de = {
1874
+ // don't access requestAnimationFrame eagerly outside method
1875
+ // this allows basic testing of user code without JSDOM
1876
+ // bunder will eval and remove ternary when the user's app is built
1877
+ tick: (
1878
+ /** @param {any} _ */
1879
+ (e) => requestAnimationFrame(e)
1880
+ ),
1881
+ now: () => Gi(),
1882
+ tasks: /* @__PURE__ */ new Set()
1883
+ };
1884
+ function ns() {
1885
+ const e = de.now();
1886
+ de.tasks.forEach((t) => {
1887
+ t.c(e) || (de.tasks.delete(t), t.f());
1888
+ }), de.tasks.size !== 0 && de.tick(ns);
1889
+ }
1890
+ function Zi(e) {
1891
+ let t;
1892
+ return de.tasks.size === 0 && de.tick(ns), {
1893
+ promise: new Promise((n) => {
1894
+ de.tasks.add(t = { c: e, f: n });
1895
+ }),
1896
+ abort() {
1897
+ de.tasks.delete(t);
1898
+ }
1899
+ };
1900
+ }
1901
+ function ut(e, t) {
1902
+ e.dispatchEvent(new CustomEvent(t));
1903
+ }
1904
+ function Wi(e) {
1905
+ if (e === "float") return "cssFloat";
1906
+ if (e === "offset") return "cssOffset";
1907
+ if (e.startsWith("--")) return e;
1908
+ const t = e.split("-");
1909
+ return t.length === 1 ? t[0] : t[0] + t.slice(1).map(
1910
+ /** @param {any} word */
1911
+ (n) => n[0].toUpperCase() + n.slice(1)
1912
+ ).join("");
1913
+ }
1914
+ function Gn(e) {
1915
+ const t = {}, n = e.split(";");
1916
+ for (const s of n) {
1917
+ const [r, i] = s.split(":");
1918
+ if (!r || i === void 0) break;
1919
+ const o = Wi(r.trim());
1920
+ t[o] = i.trim();
1921
+ }
1922
+ return t;
1923
+ }
1924
+ const Yi = (e) => e;
1925
+ function rs(e, t, n, s) {
1926
+ var r = (e & Fs) !== 0, i = "both", o, l = t.inert, a = t.style.overflow, u, c;
1927
+ function f() {
1928
+ var m = A, _ = E;
1929
+ le(null), Q(null);
1930
+ try {
1931
+ return o ?? (o = n()(t, (s == null ? void 0 : s()) ?? /** @type {P} */
1932
+ {}, {
1933
+ direction: i
1934
+ }));
1935
+ } finally {
1936
+ le(m), Q(_);
1937
+ }
1938
+ }
1939
+ var d = {
1940
+ is_global: r,
1941
+ in() {
1942
+ t.inert = l, ut(t, "introstart"), u = cn(t, f(), c, 1, () => {
1943
+ ut(t, "introend"), u == null || u.abort(), u = o = void 0, t.style.overflow = a;
1944
+ });
1945
+ },
1946
+ out(m) {
1947
+ t.inert = !0, ut(t, "outrostart"), c = cn(t, f(), u, 0, () => {
1948
+ ut(t, "outroend"), m == null || m();
1949
+ });
1950
+ },
1951
+ stop: () => {
1952
+ u == null || u.abort(), c == null || c.abort();
1953
+ }
1954
+ }, h = (
1955
+ /** @type {Effect} */
1956
+ E
1957
+ );
1958
+ if ((h.transitions ?? (h.transitions = [])).push(d), an) {
1959
+ var v = r;
1960
+ if (!v) {
1961
+ for (var p = (
1962
+ /** @type {Effect | null} */
1963
+ h.parent
1964
+ ); p && p.f & Nt; )
1965
+ for (; (p = p.parent) && !(p.f & Ot); )
1966
+ ;
1967
+ v = !p || (p.f & hr) !== 0;
1968
+ }
1969
+ v && Pt(() => {
1970
+ ae(() => d.in());
1971
+ });
1972
+ }
1973
+ }
1974
+ function cn(e, t, n, s, r) {
1975
+ var i = s === 1;
1976
+ if (Gs(t)) {
1977
+ var o, l = !1;
1978
+ return Ve(() => {
1979
+ if (!l) {
1980
+ var m = t({ direction: i ? "in" : "out" });
1981
+ o = cn(e, m, n, s, r);
1982
+ }
1983
+ }), {
1984
+ abort: () => {
1985
+ l = !0, o == null || o.abort();
1986
+ },
1987
+ deactivate: () => o.deactivate(),
1988
+ reset: () => o.reset(),
1989
+ t: () => o.t()
1990
+ };
1991
+ }
1992
+ if (n == null || n.deactivate(), !(t != null && t.duration))
1993
+ return r(), {
1994
+ abort: We,
1995
+ deactivate: We,
1996
+ reset: We,
1997
+ t: () => s
1998
+ };
1999
+ const { delay: a = 0, css: u, tick: c, easing: f = Yi } = t;
2000
+ var d = [];
2001
+ if (i && n === void 0 && (c && c(0, 1), u)) {
2002
+ var h = Gn(u(0, 1));
2003
+ d.push(h, h);
2004
+ }
2005
+ var v = () => 1 - s, p = e.animate(d, { duration: a });
2006
+ return p.onfinish = () => {
2007
+ var m = (n == null ? void 0 : n.t()) ?? 1 - s;
2008
+ n == null || n.abort();
2009
+ var _ = s - m, g = (
2010
+ /** @type {number} */
2011
+ t.duration * Math.abs(_)
2012
+ ), b = [];
2013
+ if (g > 0) {
2014
+ var x = !1;
2015
+ if (u)
2016
+ for (var $ = Math.ceil(g / 16.666666666666668), w = 0; w <= $; w += 1) {
2017
+ var M = m + _ * f(w / $), T = Gn(u(M, 1 - M));
2018
+ b.push(T), x || (x = T.overflow === "hidden");
2019
+ }
2020
+ x && (e.style.overflow = "hidden"), v = () => {
2021
+ var O = (
2022
+ /** @type {number} */
2023
+ /** @type {globalThis.Animation} */
2024
+ p.currentTime
2025
+ );
2026
+ return m + _ * f(O / g);
2027
+ }, c && Zi(() => {
2028
+ if (p.playState !== "running") return !1;
2029
+ var O = v();
2030
+ return c(O, 1 - O), !0;
2031
+ });
2032
+ }
2033
+ p = e.animate(b, { duration: g, fill: "forwards" }), p.onfinish = () => {
2034
+ v = () => s, c == null || c(s, 1 - s), r();
2035
+ };
2036
+ }, {
2037
+ abort: () => {
2038
+ p && (p.cancel(), p.effect = null, p.onfinish = We);
2039
+ },
2040
+ deactivate: () => {
2041
+ r = We;
2042
+ },
2043
+ reset: () => {
2044
+ s === 0 && (c == null || c(1, 0));
2045
+ },
2046
+ t: () => v()
2047
+ };
2048
+ }
2049
+ function Ki(e, t, n = t) {
2050
+ var s = it();
2051
+ Ni(e, "input", (r) => {
2052
+ var i = r ? e.defaultValue : e.value;
2053
+ if (i = Zt(e) ? Wt(i) : i, n(i), s && i !== (i = t())) {
2054
+ var o = e.selectionStart, l = e.selectionEnd;
2055
+ e.value = i ?? "", l !== null && (e.selectionStart = o, e.selectionEnd = Math.min(l, e.value.length));
2056
+ }
2057
+ }), // If we are hydrating and the value has since changed,
2058
+ // then use the updated value from the input instead.
2059
+ (I && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
2060
+ // TODO Svelte 6: remove input.value check and set to empty string?
2061
+ ae(t) == null && e.value) && n(Zt(e) ? Wt(e.value) : e.value), qe(() => {
2062
+ var r = t();
2063
+ Zt(e) && r === Wt(e.value) || e.type === "date" && !r && !e.value || r !== e.value && (e.value = r ?? "");
2064
+ });
2065
+ }
2066
+ function Zt(e) {
2067
+ var t = e.type;
2068
+ return t === "number" || t === "range";
2069
+ }
2070
+ function Wt(e) {
2071
+ return e === "" ? null : +e;
2072
+ }
2073
+ function Zn(e, t) {
2074
+ return e === t || (e == null ? void 0 : e[Ee]) === t;
2075
+ }
2076
+ function Ji(e = {}, t, n, s) {
2077
+ return Pt(() => {
2078
+ var r, i;
2079
+ return qe(() => {
2080
+ r = i, i = [], ae(() => {
2081
+ e !== n(...i) && (t(e, ...i), r && Zn(n(...r), e) && t(null, ...r));
2082
+ });
2083
+ }), () => {
2084
+ Ve(() => {
2085
+ i && Zn(n(...i), e) && t(null, ...i);
2086
+ });
2087
+ };
2088
+ }), e;
2089
+ }
2090
+ function Qi(e = !1) {
2091
+ const t = (
2092
+ /** @type {ComponentContextLegacy} */
2093
+ C
2094
+ ), n = t.l.u;
2095
+ if (!n) return;
2096
+ let s = () => qr(t.s);
2097
+ if (e) {
2098
+ let r = 0, i = (
2099
+ /** @type {Record<string, any>} */
2100
+ {}
2101
+ );
2102
+ const o = /* @__PURE__ */ Qe(() => {
2103
+ let l = !1;
2104
+ const a = t.s;
2105
+ for (const u in a)
2106
+ a[u] !== i[u] && (i[u] = a[u], l = !0);
2107
+ return l && r++, r;
2108
+ });
2109
+ s = () => y(o);
2110
+ }
2111
+ n.b.length && di(() => {
2112
+ Wn(t, s), yt(n.b);
2113
+ }), Xe(() => {
2114
+ const r = ae(() => n.m.map(Zs));
2115
+ return () => {
2116
+ for (const i of r)
2117
+ typeof i == "function" && i();
2118
+ };
2119
+ }), n.a.length && Xe(() => {
2120
+ Wn(t, s), yt(n.a);
2121
+ });
2122
+ }
2123
+ function Wn(e, t) {
2124
+ if (e.l.s)
2125
+ for (const n of e.l.s) y(n);
2126
+ t();
2127
+ }
2128
+ function ss(e) {
2129
+ C === null && kn(), Ue && C.l !== null ? no(C).m.push(e) : Xe(() => {
2130
+ const t = ae(e);
2131
+ if (typeof t == "function") return (
2132
+ /** @type {() => void} */
2133
+ t
2134
+ );
2135
+ });
2136
+ }
2137
+ function Xi(e) {
2138
+ C === null && kn(), ss(() => () => ae(e));
2139
+ }
2140
+ function eo(e, t, { bubbles: n = !1, cancelable: s = !1 } = {}) {
2141
+ return new CustomEvent(e, { detail: t, bubbles: n, cancelable: s });
2142
+ }
2143
+ function to() {
2144
+ const e = C;
2145
+ return e === null && kn(), (t, n, s) => {
2146
+ var i;
2147
+ const r = (
2148
+ /** @type {Record<string, Function | Function[]>} */
2149
+ (i = e.s.$$events) == null ? void 0 : i[
2150
+ /** @type {any} */
2151
+ t
2152
+ ]
2153
+ );
2154
+ if (r) {
2155
+ const o = Ct(r) ? r.slice() : [r], l = eo(
2156
+ /** @type {string} */
2157
+ t,
2158
+ n,
2159
+ s
2160
+ );
2161
+ for (const a of o)
2162
+ a.call(e.x, l);
2163
+ return !l.defaultPrevented;
2164
+ }
2165
+ return !0;
2166
+ };
2167
+ }
2168
+ function no(e) {
2169
+ var t = (
2170
+ /** @type {ComponentContextLegacy} */
2171
+ e.l
2172
+ );
2173
+ return t.u ?? (t.u = { a: [], b: [], m: [] });
2174
+ }
2175
+ let ct = !1;
2176
+ function ro(e) {
2177
+ var t = ct;
2178
+ try {
2179
+ return ct = !1, [e(), ct];
2180
+ } finally {
2181
+ ct = t;
2182
+ }
2183
+ }
2184
+ const so = {
2185
+ get(e, t) {
2186
+ if (!e.exclude.includes(t))
2187
+ return y(e.version), t in e.special ? e.special[t]() : e.props[t];
2188
+ },
2189
+ set(e, t, n) {
2190
+ return t in e.special || (e.special[t] = J(
2191
+ {
2192
+ get [t]() {
2193
+ return e.props[t];
2194
+ }
2195
+ },
2196
+ /** @type {string} */
2197
+ t,
2198
+ ur
2199
+ )), e.special[t](n), sn(e.version), !0;
2200
+ },
2201
+ getOwnPropertyDescriptor(e, t) {
2202
+ if (!e.exclude.includes(t) && t in e.props)
2203
+ return {
2204
+ enumerable: !0,
2205
+ configurable: !0,
2206
+ value: e.props[t]
2207
+ };
2208
+ },
2209
+ deleteProperty(e, t) {
2210
+ return e.exclude.includes(t) || (e.exclude.push(t), sn(e.version)), !0;
2211
+ },
2212
+ has(e, t) {
2213
+ return e.exclude.includes(t) ? !1 : t in e.props;
2214
+ },
2215
+ ownKeys(e) {
2216
+ return Reflect.ownKeys(e.props).filter((t) => !e.exclude.includes(t));
2217
+ }
2218
+ };
2219
+ function io(e, t) {
2220
+ return new Proxy({ props: e, exclude: t, special: {}, version: H(0) }, so);
2221
+ }
2222
+ function Yn(e) {
2223
+ for (var t = E, n = E; t !== null && !(t.f & (ue | Ie)); )
2224
+ t = t.parent;
2225
+ try {
2226
+ return Q(t), e();
2227
+ } finally {
2228
+ Q(n);
2229
+ }
2230
+ }
2231
+ function J(e, t, n, s) {
2232
+ var M;
2233
+ var r = (n & Cs) !== 0, i = !Ue || (n & As) !== 0, o = (n & Os) !== 0, l = (n & Ns) !== 0, a = !1, u;
2234
+ o ? [u, a] = ro(() => (
2235
+ /** @type {V} */
2236
+ e[t]
2237
+ )) : u = /** @type {V} */
2238
+ e[t];
2239
+ var c = Ee in e || pr in e, f = o && (((M = ke(e, t)) == null ? void 0 : M.set) ?? (c && t in e && ((T) => e[t] = T))) || void 0, d = (
2240
+ /** @type {V} */
2241
+ s
2242
+ ), h = !0, v = !1, p = () => (v = !0, h && (h = !1, l ? d = ae(
2243
+ /** @type {() => V} */
2244
+ s
2245
+ ) : d = /** @type {V} */
2246
+ s), d);
2247
+ u === void 0 && s !== void 0 && (f && i && ri(), u = p(), f && f(u));
2248
+ var m;
2249
+ if (i)
2250
+ m = () => {
2251
+ var T = (
2252
+ /** @type {V} */
2253
+ e[t]
2254
+ );
2255
+ return T === void 0 ? p() : (h = !0, v = !1, T);
2256
+ };
2257
+ else {
2258
+ var _ = Yn(
2259
+ () => (r ? Qe : xr)(() => (
2260
+ /** @type {V} */
2261
+ e[t]
2262
+ ))
2263
+ );
2264
+ _.f |= Ws, m = () => {
2265
+ var T = y(_);
2266
+ return T !== void 0 && (d = /** @type {V} */
2267
+ void 0), T === void 0 ? d : T;
2268
+ };
2269
+ }
2270
+ if (!(n & ur))
2271
+ return m;
2272
+ if (f) {
2273
+ var g = e.$$legacy;
2274
+ return function(T, O) {
2275
+ return arguments.length > 0 ? ((!i || !O || g || a) && f(O ? m() : T), T) : m();
2276
+ };
2277
+ }
2278
+ var b = !1, x = !1, $ = /* @__PURE__ */ Ft(u), w = Yn(
2279
+ () => /* @__PURE__ */ Qe(() => {
2280
+ var T = m(), O = y($);
2281
+ return b ? (b = !1, x = !0, O) : (x = !1, $.v = T);
2282
+ })
2283
+ );
2284
+ return r || (w.equals = wn), function(T, O) {
2285
+ if (arguments.length > 0) {
2286
+ const D = O ? y(w) : i && o ? N(T) : T;
2287
+ return w.equals(D) || (b = !0, k($, D), v && d !== void 0 && (d = D), ae(() => y(w))), T;
2288
+ }
2289
+ return y(w);
2290
+ };
2291
+ }
2292
+ function oo(e) {
2293
+ return new lo(e);
2294
+ }
2295
+ var fe, Y;
2296
+ class lo {
2297
+ /**
2298
+ * @param {ComponentConstructorOptions & {
2299
+ * component: any;
2300
+ * }} options
2301
+ */
2302
+ constructor(t) {
2303
+ /** @type {any} */
2304
+ Vt(this, fe);
2305
+ /** @type {Record<string, any>} */
2306
+ Vt(this, Y);
2307
+ var i;
2308
+ var n = /* @__PURE__ */ new Map(), s = (o, l) => {
2309
+ var a = /* @__PURE__ */ Ft(l);
2310
+ return n.set(o, a), a;
2311
+ };
2312
+ const r = new Proxy(
2313
+ { ...t.props || {}, $$events: {} },
2314
+ {
2315
+ get(o, l) {
2316
+ return y(n.get(l) ?? s(l, Reflect.get(o, l)));
2317
+ },
2318
+ has(o, l) {
2319
+ return l === pr ? !0 : (y(n.get(l) ?? s(l, Reflect.get(o, l))), Reflect.has(o, l));
2320
+ },
2321
+ set(o, l, a) {
2322
+ return k(n.get(l) ?? s(l, a), a), Reflect.set(o, l, a);
2323
+ }
2324
+ }
2325
+ );
2326
+ Bt(this, Y, (t.hydrate ? Pi : Wr)(t.component, {
2327
+ target: t.target,
2328
+ anchor: t.anchor,
2329
+ props: r,
2330
+ context: t.context,
2331
+ intro: t.intro ?? !1,
2332
+ recover: t.recover
2333
+ })), (!((i = t == null ? void 0 : t.props) != null && i.$$host) || t.sync === !1) && V(), Bt(this, fe, r.$$events);
2334
+ for (const o of Object.keys(z(this, Y)))
2335
+ o === "$set" || o === "$destroy" || o === "$on" || gt(this, o, {
2336
+ get() {
2337
+ return z(this, Y)[o];
2338
+ },
2339
+ /** @param {any} value */
2340
+ set(l) {
2341
+ z(this, Y)[o] = l;
2342
+ },
2343
+ enumerable: !0
2344
+ });
2345
+ z(this, Y).$set = /** @param {Record<string, any>} next */
2346
+ (o) => {
2347
+ Object.assign(r, o);
2348
+ }, z(this, Y).$destroy = () => {
2349
+ Ri(z(this, Y));
2350
+ };
2351
+ }
2352
+ /** @param {Record<string, any>} props */
2353
+ $set(t) {
2354
+ z(this, Y).$set(t);
2355
+ }
2356
+ /**
2357
+ * @param {string} event
2358
+ * @param {(...args: any[]) => any} callback
2359
+ * @returns {any}
2360
+ */
2361
+ $on(t, n) {
2362
+ z(this, fe)[t] = z(this, fe)[t] || [];
2363
+ const s = (...r) => n.call(this, ...r);
2364
+ return z(this, fe)[t].push(s), () => {
2365
+ z(this, fe)[t] = z(this, fe)[t].filter(
2366
+ /** @param {any} fn */
2367
+ (r) => r !== s
2368
+ );
2369
+ };
2370
+ }
2371
+ $destroy() {
2372
+ z(this, Y).$destroy();
2373
+ }
2374
+ }
2375
+ fe = new WeakMap(), Y = new WeakMap();
2376
+ let is;
2377
+ typeof HTMLElement == "function" && (is = class extends HTMLElement {
2378
+ /**
2379
+ * @param {*} $$componentCtor
2380
+ * @param {*} $$slots
2381
+ * @param {*} use_shadow_dom
2382
+ */
2383
+ constructor(t, n, s) {
2384
+ super();
2385
+ /** The Svelte component constructor */
2386
+ R(this, "$$ctor");
2387
+ /** Slots */
2388
+ R(this, "$$s");
2389
+ /** @type {any} The Svelte component instance */
2390
+ R(this, "$$c");
2391
+ /** Whether or not the custom element is connected */
2392
+ R(this, "$$cn", !1);
2393
+ /** @type {Record<string, any>} Component props data */
2394
+ R(this, "$$d", {});
2395
+ /** `true` if currently in the process of reflecting component props back to attributes */
2396
+ R(this, "$$r", !1);
2397
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
2398
+ R(this, "$$p_d", {});
2399
+ /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
2400
+ R(this, "$$l", {});
2401
+ /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
2402
+ R(this, "$$l_u", /* @__PURE__ */ new Map());
2403
+ /** @type {any} The managed render effect for reflecting attributes */
2404
+ R(this, "$$me");
2405
+ this.$$ctor = t, this.$$s = n, s && this.attachShadow({ mode: "open" });
2406
+ }
2407
+ /**
2408
+ * @param {string} type
2409
+ * @param {EventListenerOrEventListenerObject} listener
2410
+ * @param {boolean | AddEventListenerOptions} [options]
2411
+ */
2412
+ addEventListener(t, n, s) {
2413
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
2414
+ const r = this.$$c.$on(t, n);
2415
+ this.$$l_u.set(n, r);
2416
+ }
2417
+ super.addEventListener(t, n, s);
2418
+ }
2419
+ /**
2420
+ * @param {string} type
2421
+ * @param {EventListenerOrEventListenerObject} listener
2422
+ * @param {boolean | AddEventListenerOptions} [options]
2423
+ */
2424
+ removeEventListener(t, n, s) {
2425
+ if (super.removeEventListener(t, n, s), this.$$c) {
2426
+ const r = this.$$l_u.get(n);
2427
+ r && (r(), this.$$l_u.delete(n));
2428
+ }
2429
+ }
2430
+ async connectedCallback() {
2431
+ if (this.$$cn = !0, !this.$$c) {
2432
+ let t = function(r) {
2433
+ return (i) => {
2434
+ const o = document.createElement("slot");
2435
+ r !== "default" && (o.name = r), j(i, o);
2436
+ };
2437
+ };
2438
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
2439
+ return;
2440
+ const n = {}, s = ao(this);
2441
+ for (const r of this.$$s)
2442
+ r in s && (r === "default" && !this.$$d.children ? (this.$$d.children = t(r), n.default = !0) : n[r] = t(r));
2443
+ for (const r of this.attributes) {
2444
+ const i = this.$$g_p(r.name);
2445
+ i in this.$$d || (this.$$d[i] = ht(i, r.value, this.$$p_d, "toProp"));
2446
+ }
2447
+ for (const r in this.$$p_d)
2448
+ !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
2449
+ this.$$c = oo({
2450
+ component: this.$$ctor,
2451
+ target: this.shadowRoot || this,
2452
+ props: {
2453
+ ...this.$$d,
2454
+ $$slots: n,
2455
+ $$host: this
2456
+ }
2457
+ }), this.$$me = hi(() => {
2458
+ qe(() => {
2459
+ var r;
2460
+ this.$$r = !0;
2461
+ for (const i of _t(this.$$c)) {
2462
+ if (!((r = this.$$p_d[i]) != null && r.reflect)) continue;
2463
+ this.$$d[i] = this.$$c[i];
2464
+ const o = ht(
2465
+ i,
2466
+ this.$$d[i],
2467
+ this.$$p_d,
2468
+ "toAttribute"
2469
+ );
2470
+ o == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, o);
2471
+ }
2472
+ this.$$r = !1;
2473
+ });
2474
+ });
2475
+ for (const r in this.$$l)
2476
+ for (const i of this.$$l[r]) {
2477
+ const o = this.$$c.$on(r, i);
2478
+ this.$$l_u.set(i, o);
2479
+ }
2480
+ this.$$l = {};
2481
+ }
2482
+ }
2483
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
2484
+ // and setting attributes through setAttribute etc, this is helpful
2485
+ /**
2486
+ * @param {string} attr
2487
+ * @param {string} _oldValue
2488
+ * @param {string} newValue
2489
+ */
2490
+ attributeChangedCallback(t, n, s) {
2491
+ var r;
2492
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = ht(t, s, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [t]: this.$$d[t] }));
2493
+ }
2494
+ disconnectedCallback() {
2495
+ this.$$cn = !1, Promise.resolve().then(() => {
2496
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2497
+ });
2498
+ }
2499
+ /**
2500
+ * @param {string} attribute_name
2501
+ */
2502
+ $$g_p(t) {
2503
+ return _t(this.$$p_d).find(
2504
+ (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
2505
+ ) || t;
2506
+ }
2507
+ });
2508
+ function ht(e, t, n, s) {
2509
+ var i;
2510
+ const r = (i = n[e]) == null ? void 0 : i.type;
2511
+ if (t = r === "Boolean" && typeof t != "boolean" ? t != null : t, !s || !n[e])
2512
+ return t;
2513
+ if (s === "toAttribute")
2514
+ switch (r) {
2515
+ case "Object":
2516
+ case "Array":
2517
+ return t == null ? null : JSON.stringify(t);
2518
+ case "Boolean":
2519
+ return t ? "" : null;
2520
+ case "Number":
2521
+ return t ?? null;
2522
+ default:
2523
+ return t;
2524
+ }
2525
+ else
2526
+ switch (r) {
2527
+ case "Object":
2528
+ case "Array":
2529
+ return t && JSON.parse(t);
2530
+ case "Boolean":
2531
+ return t;
2532
+ case "Number":
2533
+ return t != null ? +t : t;
2534
+ default:
2535
+ return t;
2536
+ }
2537
+ }
2538
+ function ao(e) {
2539
+ const t = {};
2540
+ return e.childNodes.forEach((n) => {
2541
+ t[
2542
+ /** @type {Element} node */
2543
+ n.slot || "default"
2544
+ ] = !0;
2545
+ }), t;
2546
+ }
2547
+ function Ae(e, t, n, s, r, i) {
2548
+ let o = class extends is {
2549
+ constructor() {
2550
+ super(e, n, r), this.$$p_d = t;
2551
+ }
2552
+ static get observedAttributes() {
2553
+ return _t(t).map(
2554
+ (l) => (t[l].attribute || l).toLowerCase()
2555
+ );
2556
+ }
2557
+ };
2558
+ return _t(t).forEach((l) => {
2559
+ gt(o.prototype, l, {
2560
+ get() {
2561
+ return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2562
+ },
2563
+ set(a) {
2564
+ var f;
2565
+ a = ht(l, a, t), this.$$d[l] = a;
2566
+ var u = this.$$c;
2567
+ if (u) {
2568
+ var c = (f = ke(u, l)) == null ? void 0 : f.get;
2569
+ c ? u[l] = a : u.$set({ [l]: a });
2570
+ }
2571
+ }
2572
+ });
2573
+ }), s.forEach((l) => {
2574
+ gt(o.prototype, l, {
2575
+ get() {
2576
+ var a;
2577
+ return (a = this.$$c) == null ? void 0 : a[l];
2578
+ }
2579
+ });
2580
+ }), e.element = /** @type {any} */
2581
+ o, o;
2582
+ }
2583
+ function os(e) {
2584
+ const t = e - 1;
2585
+ return t * t * t + 1;
2586
+ }
2587
+ function Kn(e) {
2588
+ const t = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
2589
+ return t ? [parseFloat(t[1]), t[2] || "px"] : [
2590
+ /** @type {number} */
2591
+ e,
2592
+ "px"
2593
+ ];
2594
+ }
2595
+ function uo(e, { delay: t = 0, duration: n = 400, easing: s = os, x: r = 0, y: i = 0, opacity: o = 0 } = {}) {
2596
+ const l = getComputedStyle(e), a = +l.opacity, u = l.transform === "none" ? "" : l.transform, c = a * (1 - o), [f, d] = Kn(r), [h, v] = Kn(i);
2597
+ return {
2598
+ delay: t,
2599
+ duration: n,
2600
+ easing: s,
2601
+ css: (p, m) => `
2602
+ transform: ${u} translate(${(1 - p) * f}${d}, ${(1 - p) * h}${v});
2603
+ opacity: ${a - c * m}`
2604
+ };
2605
+ }
2606
+ function co(e, { delay: t = 0, duration: n = 400, easing: s = os, axis: r = "y" } = {}) {
2607
+ const i = getComputedStyle(e), o = +i.opacity, l = r === "y" ? "height" : "width", a = parseFloat(i[l]), u = r === "y" ? ["top", "bottom"] : ["left", "right"], c = u.map(
2608
+ (_) => (
2609
+ /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
2610
+ `${_[0].toUpperCase()}${_.slice(1)}`
2611
+ )
2612
+ ), f = parseFloat(i[`padding${c[0]}`]), d = parseFloat(i[`padding${c[1]}`]), h = parseFloat(i[`margin${c[0]}`]), v = parseFloat(i[`margin${c[1]}`]), p = parseFloat(
2613
+ i[`border${c[0]}Width`]
2614
+ ), m = parseFloat(
2615
+ i[`border${c[1]}Width`]
2616
+ );
2617
+ return {
2618
+ delay: t,
2619
+ duration: n,
2620
+ easing: s,
2621
+ css: (_) => `overflow: hidden;opacity: ${Math.min(_ * 20, 1) * o};${l}: ${_ * a}px;padding-${u[0]}: ${_ * f}px;padding-${u[1]}: ${_ * d}px;margin-${u[0]}: ${_ * h}px;margin-${u[1]}: ${_ * v}px;border-${u[0]}-width: ${_ * p}px;border-${u[1]}-width: ${_ * m}px;min-${l}: 0`
2622
+ };
2623
+ }
2624
+ class ie {
2625
+ constructor(t, n, s) {
2626
+ R(this, "timeStamp");
2627
+ R(this, "sentByUser");
2628
+ R(this, "content");
2629
+ this.timeStamp = t, this.sentByUser = n, this.content = s;
2630
+ }
2631
+ toJson() {
2632
+ return {
2633
+ timeStamp: this.timeStamp,
2634
+ sentByUser: this.sentByUser,
2635
+ content: this.content
2636
+ };
2637
+ }
2638
+ static fromJson(t) {
2639
+ return new ie(t.timeStamp, t.sentByUser, t.content);
2640
+ }
2641
+ static firstMessage() {
2642
+ return new ie(0, !1, "Ciao, sono Ainstein, come posso aiutarti?");
2643
+ }
2644
+ }
2645
+ class ve {
2646
+ constructor(t, n, s, r = "New chat", i = []) {
2647
+ R(this, "_id");
2648
+ R(this, "companyId");
2649
+ R(this, "userId");
2650
+ R(this, "title");
2651
+ R(this, "messages");
2652
+ this._id = t, this.companyId = n, this.userId = s, this.title = r, this.messages = i;
2653
+ }
2654
+ toJson() {
2655
+ return {
2656
+ _id: this._id,
2657
+ companyId: this.companyId,
2658
+ userId: this.userId,
2659
+ title: this.title,
2660
+ messages: this.messages
2661
+ };
2662
+ }
2663
+ static fromJson(t) {
2664
+ return new ve(t._id, t.companyId, t.userId, t.title, t.messages);
2665
+ }
2666
+ static emptyChat(t) {
2667
+ return new ve("", "", t, "New chat", [ie.firstMessage()]);
2668
+ }
2669
+ }
2670
+ ui();
2671
+ const ls = /^[a-z0-9]+(-[a-z0-9]+)*$/, zt = (e, t, n, s = "") => {
2672
+ const r = e.split(":");
2673
+ if (e.slice(0, 1) === "@") {
2674
+ if (r.length < 2 || r.length > 3)
2675
+ return null;
2676
+ s = r.shift().slice(1);
2677
+ }
2678
+ if (r.length > 3 || !r.length)
2679
+ return null;
2680
+ if (r.length > 1) {
2681
+ const l = r.pop(), a = r.pop(), u = {
2682
+ // Allow provider without '@': "provider:prefix:name"
2683
+ provider: r.length > 0 ? r[0] : s,
2684
+ prefix: a,
2685
+ name: l
2686
+ };
2687
+ return t && !vt(u) ? null : u;
2688
+ }
2689
+ const i = r[0], o = i.split("-");
2690
+ if (o.length > 1) {
2691
+ const l = {
2692
+ provider: s,
2693
+ prefix: o.shift(),
2694
+ name: o.join("-")
2695
+ };
2696
+ return t && !vt(l) ? null : l;
2697
+ }
2698
+ if (n && s === "") {
2699
+ const l = {
2700
+ provider: s,
2701
+ prefix: "",
2702
+ name: i
2703
+ };
2704
+ return t && !vt(l, n) ? null : l;
2705
+ }
2706
+ return null;
2707
+ }, vt = (e, t) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
2708
+ // Check name: cannot be empty
2709
+ ((t && e.prefix === "" || e.prefix) && e.name) : !1, as = Object.freeze(
2710
+ {
2711
+ left: 0,
2712
+ top: 0,
2713
+ width: 16,
2714
+ height: 16
2715
+ }
2716
+ ), St = Object.freeze({
2717
+ rotate: 0,
2718
+ vFlip: !1,
2719
+ hFlip: !1
2720
+ }), Ut = Object.freeze({
2721
+ ...as,
2722
+ ...St
2723
+ }), fn = Object.freeze({
2724
+ ...Ut,
2725
+ body: "",
2726
+ hidden: !1
2727
+ });
2728
+ function fo(e, t) {
2729
+ const n = {};
2730
+ !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
2731
+ const s = ((e.rotate || 0) + (t.rotate || 0)) % 4;
2732
+ return s && (n.rotate = s), n;
2733
+ }
2734
+ function Jn(e, t) {
2735
+ const n = fo(e, t);
2736
+ for (const s in fn)
2737
+ s in St ? s in e && !(s in n) && (n[s] = St[s]) : s in t ? n[s] = t[s] : s in e && (n[s] = e[s]);
2738
+ return n;
2739
+ }
2740
+ function ho(e, t) {
2741
+ const n = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
2742
+ function i(o) {
2743
+ if (n[o])
2744
+ return r[o] = [];
2745
+ if (!(o in r)) {
2746
+ r[o] = null;
2747
+ const l = s[o] && s[o].parent, a = l && i(l);
2748
+ a && (r[o] = [l].concat(a));
2749
+ }
2750
+ return r[o];
2751
+ }
2752
+ return Object.keys(n).concat(Object.keys(s)).forEach(i), r;
2753
+ }
2754
+ function vo(e, t, n) {
2755
+ const s = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null);
2756
+ let i = {};
2757
+ function o(l) {
2758
+ i = Jn(
2759
+ s[l] || r[l],
2760
+ i
2761
+ );
2762
+ }
2763
+ return o(t), n.forEach(o), Jn(e, i);
2764
+ }
2765
+ function us(e, t) {
2766
+ const n = [];
2767
+ if (typeof e != "object" || typeof e.icons != "object")
2768
+ return n;
2769
+ e.not_found instanceof Array && e.not_found.forEach((r) => {
2770
+ t(r, null), n.push(r);
2771
+ });
2772
+ const s = ho(e);
2773
+ for (const r in s) {
2774
+ const i = s[r];
2775
+ i && (t(r, vo(e, r, i)), n.push(r));
2776
+ }
2777
+ return n;
2778
+ }
2779
+ const po = {
2780
+ provider: "",
2781
+ aliases: {},
2782
+ not_found: {},
2783
+ ...as
2784
+ };
2785
+ function Yt(e, t) {
2786
+ for (const n in t)
2787
+ if (n in e && typeof e[n] != typeof t[n])
2788
+ return !1;
2789
+ return !0;
2790
+ }
2791
+ function cs(e) {
2792
+ if (typeof e != "object" || e === null)
2793
+ return null;
2794
+ const t = e;
2795
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !Yt(e, po))
2796
+ return null;
2797
+ const n = t.icons;
2798
+ for (const r in n) {
2799
+ const i = n[r];
2800
+ if (
2801
+ // Name cannot be empty
2802
+ !r || // Must have body
2803
+ typeof i.body != "string" || // Check other props
2804
+ !Yt(
2805
+ i,
2806
+ fn
2807
+ )
2808
+ )
2809
+ return null;
2810
+ }
2811
+ const s = t.aliases || /* @__PURE__ */ Object.create(null);
2812
+ for (const r in s) {
2813
+ const i = s[r], o = i.parent;
2814
+ if (
2815
+ // Name cannot be empty
2816
+ !r || // Parent must be set and point to existing icon
2817
+ typeof o != "string" || !n[o] && !s[o] || // Check other props
2818
+ !Yt(
2819
+ i,
2820
+ fn
2821
+ )
2822
+ )
2823
+ return null;
2824
+ }
2825
+ return t;
2826
+ }
2827
+ const Qn = /* @__PURE__ */ Object.create(null);
2828
+ function _o(e, t) {
2829
+ return {
2830
+ provider: e,
2831
+ prefix: t,
2832
+ icons: /* @__PURE__ */ Object.create(null),
2833
+ missing: /* @__PURE__ */ new Set()
2834
+ };
2835
+ }
2836
+ function De(e, t) {
2837
+ const n = Qn[e] || (Qn[e] = /* @__PURE__ */ Object.create(null));
2838
+ return n[t] || (n[t] = _o(e, t));
2839
+ }
2840
+ function fs(e, t) {
2841
+ return cs(t) ? us(t, (n, s) => {
2842
+ s ? e.icons[n] = s : e.missing.add(n);
2843
+ }) : [];
2844
+ }
2845
+ function go(e, t, n) {
2846
+ try {
2847
+ if (typeof n.body == "string")
2848
+ return e.icons[t] = { ...n }, !0;
2849
+ } catch {
2850
+ }
2851
+ return !1;
2852
+ }
2853
+ let st = !1;
2854
+ function ds(e) {
2855
+ return typeof e == "boolean" && (st = e), st;
2856
+ }
2857
+ function yo(e) {
2858
+ const t = typeof e == "string" ? zt(e, !0, st) : e;
2859
+ if (t) {
2860
+ const n = De(t.provider, t.prefix), s = t.name;
2861
+ return n.icons[s] || (n.missing.has(s) ? null : void 0);
2862
+ }
2863
+ }
2864
+ function mo(e, t) {
2865
+ const n = zt(e, !0, st);
2866
+ if (!n)
2867
+ return !1;
2868
+ const s = De(n.provider, n.prefix);
2869
+ return t ? go(s, n.name, t) : (s.missing.add(n.name), !0);
2870
+ }
2871
+ function bo(e, t) {
2872
+ if (typeof e != "object")
2873
+ return !1;
2874
+ if (typeof t != "string" && (t = e.provider || ""), st && !t && !e.prefix) {
2875
+ let r = !1;
2876
+ return cs(e) && (e.prefix = "", us(e, (i, o) => {
2877
+ mo(i, o) && (r = !0);
2878
+ })), r;
2879
+ }
2880
+ const n = e.prefix;
2881
+ if (!vt({
2882
+ provider: t,
2883
+ prefix: n,
2884
+ name: "a"
2885
+ }))
2886
+ return !1;
2887
+ const s = De(t, n);
2888
+ return !!fs(s, e);
2889
+ }
2890
+ const hs = Object.freeze({
2891
+ width: null,
2892
+ height: null
2893
+ }), vs = Object.freeze({
2894
+ // Dimensions
2895
+ ...hs,
2896
+ // Transformations
2897
+ ...St
2898
+ }), wo = /(-?[0-9.]*[0-9]+[0-9.]*)/g, xo = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2899
+ function Xn(e, t, n) {
2900
+ if (t === 1)
2901
+ return e;
2902
+ if (n = n || 100, typeof e == "number")
2903
+ return Math.ceil(e * t * n) / n;
2904
+ if (typeof e != "string")
2905
+ return e;
2906
+ const s = e.split(wo);
2907
+ if (s === null || !s.length)
2908
+ return e;
2909
+ const r = [];
2910
+ let i = s.shift(), o = xo.test(i);
2911
+ for (; ; ) {
2912
+ if (o) {
2913
+ const l = parseFloat(i);
2914
+ isNaN(l) ? r.push(i) : r.push(Math.ceil(l * t * n) / n);
2915
+ } else
2916
+ r.push(i);
2917
+ if (i = s.shift(), i === void 0)
2918
+ return r.join("");
2919
+ o = !o;
2920
+ }
2921
+ }
2922
+ function $o(e, t = "defs") {
2923
+ let n = "";
2924
+ const s = e.indexOf("<" + t);
2925
+ for (; s >= 0; ) {
2926
+ const r = e.indexOf(">", s), i = e.indexOf("</" + t);
2927
+ if (r === -1 || i === -1)
2928
+ break;
2929
+ const o = e.indexOf(">", i);
2930
+ if (o === -1)
2931
+ break;
2932
+ n += e.slice(r + 1, i).trim(), e = e.slice(0, s).trim() + e.slice(o + 1);
2933
+ }
2934
+ return {
2935
+ defs: n,
2936
+ content: e
2937
+ };
2938
+ }
2939
+ function ko(e, t) {
2940
+ return e ? "<defs>" + e + "</defs>" + t : t;
2941
+ }
2942
+ function Eo(e, t, n) {
2943
+ const s = $o(e);
2944
+ return ko(s.defs, t + s.content + n);
2945
+ }
2946
+ const To = (e) => e === "unset" || e === "undefined" || e === "none";
2947
+ function Io(e, t) {
2948
+ const n = {
2949
+ ...Ut,
2950
+ ...e
2951
+ }, s = {
2952
+ ...vs,
2953
+ ...t
2954
+ }, r = {
2955
+ left: n.left,
2956
+ top: n.top,
2957
+ width: n.width,
2958
+ height: n.height
2959
+ };
2960
+ let i = n.body;
2961
+ [n, s].forEach((p) => {
2962
+ const m = [], _ = p.hFlip, g = p.vFlip;
2963
+ let b = p.rotate;
2964
+ _ ? g ? b += 2 : (m.push(
2965
+ "translate(" + (r.width + r.left).toString() + " " + (0 - r.top).toString() + ")"
2966
+ ), m.push("scale(-1 1)"), r.top = r.left = 0) : g && (m.push(
2967
+ "translate(" + (0 - r.left).toString() + " " + (r.height + r.top).toString() + ")"
2968
+ ), m.push("scale(1 -1)"), r.top = r.left = 0);
2969
+ let x;
2970
+ switch (b < 0 && (b -= Math.floor(b / 4) * 4), b = b % 4, b) {
2971
+ case 1:
2972
+ x = r.height / 2 + r.top, m.unshift(
2973
+ "rotate(90 " + x.toString() + " " + x.toString() + ")"
2974
+ );
2975
+ break;
2976
+ case 2:
2977
+ m.unshift(
2978
+ "rotate(180 " + (r.width / 2 + r.left).toString() + " " + (r.height / 2 + r.top).toString() + ")"
2979
+ );
2980
+ break;
2981
+ case 3:
2982
+ x = r.width / 2 + r.left, m.unshift(
2983
+ "rotate(-90 " + x.toString() + " " + x.toString() + ")"
2984
+ );
2985
+ break;
2986
+ }
2987
+ b % 2 === 1 && (r.left !== r.top && (x = r.left, r.left = r.top, r.top = x), r.width !== r.height && (x = r.width, r.width = r.height, r.height = x)), m.length && (i = Eo(
2988
+ i,
2989
+ '<g transform="' + m.join(" ") + '">',
2990
+ "</g>"
2991
+ ));
2992
+ });
2993
+ const o = s.width, l = s.height, a = r.width, u = r.height;
2994
+ let c, f;
2995
+ o === null ? (f = l === null ? "1em" : l === "auto" ? u : l, c = Xn(f, a / u)) : (c = o === "auto" ? a : o, f = l === null ? Xn(c, u / a) : l === "auto" ? u : l);
2996
+ const d = {}, h = (p, m) => {
2997
+ To(m) || (d[p] = m.toString());
2998
+ };
2999
+ h("width", c), h("height", f);
3000
+ const v = [r.left, r.top, a, u];
3001
+ return d.viewBox = v.join(" "), {
3002
+ attributes: d,
3003
+ viewBox: v,
3004
+ body: i
3005
+ };
3006
+ }
3007
+ const So = /\sid="(\S+)"/g, Co = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
3008
+ let Ao = 0;
3009
+ function Oo(e, t = Co) {
3010
+ const n = [];
3011
+ let s;
3012
+ for (; s = So.exec(e); )
3013
+ n.push(s[1]);
3014
+ if (!n.length)
3015
+ return e;
3016
+ const r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
3017
+ return n.forEach((i) => {
3018
+ const o = typeof t == "function" ? t(i) : t + (Ao++).toString(), l = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3019
+ e = e.replace(
3020
+ // Allowed characters before id: [#;"]
3021
+ // Allowed characters after id: [)"], .[a-z]
3022
+ new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"),
3023
+ "$1" + o + r + "$3"
3024
+ );
3025
+ }), e = e.replace(new RegExp(r, "g"), ""), e;
3026
+ }
3027
+ const dn = /* @__PURE__ */ Object.create(null);
3028
+ function No(e, t) {
3029
+ dn[e] = t;
3030
+ }
3031
+ function hn(e) {
3032
+ return dn[e] || dn[""];
3033
+ }
3034
+ function In(e) {
3035
+ let t;
3036
+ if (typeof e.resources == "string")
3037
+ t = [e.resources];
3038
+ else if (t = e.resources, !(t instanceof Array) || !t.length)
3039
+ return null;
3040
+ return {
3041
+ // API hosts
3042
+ resources: t,
3043
+ // Root path
3044
+ path: e.path || "/",
3045
+ // URL length limit
3046
+ maxURL: e.maxURL || 500,
3047
+ // Timeout before next host is used.
3048
+ rotate: e.rotate || 750,
3049
+ // Timeout before failing query.
3050
+ timeout: e.timeout || 5e3,
3051
+ // Randomise default API end point.
3052
+ random: e.random === !0,
3053
+ // Start index
3054
+ index: e.index || 0,
3055
+ // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
3056
+ dataAfterTimeout: e.dataAfterTimeout !== !1
3057
+ };
3058
+ }
3059
+ const Sn = /* @__PURE__ */ Object.create(null), Ye = [
3060
+ "https://api.simplesvg.com",
3061
+ "https://api.unisvg.com"
3062
+ ], pt = [];
3063
+ for (; Ye.length > 0; )
3064
+ Ye.length === 1 || Math.random() > 0.5 ? pt.push(Ye.shift()) : pt.push(Ye.pop());
3065
+ Sn[""] = In({
3066
+ resources: ["https://api.iconify.design"].concat(pt)
3067
+ });
3068
+ function Fo(e, t) {
3069
+ const n = In(t);
3070
+ return n === null ? !1 : (Sn[e] = n, !0);
3071
+ }
3072
+ function Cn(e) {
3073
+ return Sn[e];
3074
+ }
3075
+ const Mo = () => {
3076
+ let e;
3077
+ try {
3078
+ if (e = fetch, typeof e == "function")
3079
+ return e;
3080
+ } catch {
3081
+ }
3082
+ };
3083
+ let er = Mo();
3084
+ function Po(e, t) {
3085
+ const n = Cn(e);
3086
+ if (!n)
3087
+ return 0;
3088
+ let s;
3089
+ if (!n.maxURL)
3090
+ s = 0;
3091
+ else {
3092
+ let r = 0;
3093
+ n.resources.forEach((o) => {
3094
+ r = Math.max(r, o.length);
3095
+ });
3096
+ const i = t + ".json?icons=";
3097
+ s = n.maxURL - r - n.path.length - i.length;
3098
+ }
3099
+ return s;
3100
+ }
3101
+ function Ro(e) {
3102
+ return e === 404;
3103
+ }
3104
+ const jo = (e, t, n) => {
3105
+ const s = [], r = Po(e, t), i = "icons";
3106
+ let o = {
3107
+ type: i,
3108
+ provider: e,
3109
+ prefix: t,
3110
+ icons: []
3111
+ }, l = 0;
3112
+ return n.forEach((a, u) => {
3113
+ l += a.length + 1, l >= r && u > 0 && (s.push(o), o = {
3114
+ type: i,
3115
+ provider: e,
3116
+ prefix: t,
3117
+ icons: []
3118
+ }, l = a.length), o.icons.push(a);
3119
+ }), s.push(o), s;
3120
+ };
3121
+ function Lo(e) {
3122
+ if (typeof e == "string") {
3123
+ const t = Cn(e);
3124
+ if (t)
3125
+ return t.path;
3126
+ }
3127
+ return "/";
3128
+ }
3129
+ const Do = (e, t, n) => {
3130
+ if (!er) {
3131
+ n("abort", 424);
3132
+ return;
3133
+ }
3134
+ let s = Lo(t.provider);
3135
+ switch (t.type) {
3136
+ case "icons": {
3137
+ const i = t.prefix, l = t.icons.join(","), a = new URLSearchParams({
3138
+ icons: l
3139
+ });
3140
+ s += i + ".json?" + a.toString();
3141
+ break;
3142
+ }
3143
+ case "custom": {
3144
+ const i = t.uri;
3145
+ s += i.slice(0, 1) === "/" ? i.slice(1) : i;
3146
+ break;
3147
+ }
3148
+ default:
3149
+ n("abort", 400);
3150
+ return;
3151
+ }
3152
+ let r = 503;
3153
+ er(e + s).then((i) => {
3154
+ const o = i.status;
3155
+ if (o !== 200) {
3156
+ setTimeout(() => {
3157
+ n(Ro(o) ? "abort" : "next", o);
3158
+ });
3159
+ return;
3160
+ }
3161
+ return r = 501, i.json();
3162
+ }).then((i) => {
3163
+ if (typeof i != "object" || i === null) {
3164
+ setTimeout(() => {
3165
+ i === 404 ? n("abort", i) : n("next", r);
3166
+ });
3167
+ return;
3168
+ }
3169
+ setTimeout(() => {
3170
+ n("success", i);
3171
+ });
3172
+ }).catch(() => {
3173
+ n("next", r);
3174
+ });
3175
+ }, zo = {
3176
+ prepare: jo,
3177
+ send: Do
3178
+ };
3179
+ function Uo(e) {
3180
+ const t = {
3181
+ loaded: [],
3182
+ missing: [],
3183
+ pending: []
3184
+ }, n = /* @__PURE__ */ Object.create(null);
3185
+ e.sort((r, i) => r.provider !== i.provider ? r.provider.localeCompare(i.provider) : r.prefix !== i.prefix ? r.prefix.localeCompare(i.prefix) : r.name.localeCompare(i.name));
3186
+ let s = {
3187
+ provider: "",
3188
+ prefix: "",
3189
+ name: ""
3190
+ };
3191
+ return e.forEach((r) => {
3192
+ if (s.name === r.name && s.prefix === r.prefix && s.provider === r.provider)
3193
+ return;
3194
+ s = r;
3195
+ const i = r.provider, o = r.prefix, l = r.name, a = n[i] || (n[i] = /* @__PURE__ */ Object.create(null)), u = a[o] || (a[o] = De(i, o));
3196
+ let c;
3197
+ l in u.icons ? c = t.loaded : o === "" || u.missing.has(l) ? c = t.missing : c = t.pending;
3198
+ const f = {
3199
+ provider: i,
3200
+ prefix: o,
3201
+ name: l
3202
+ };
3203
+ c.push(f);
3204
+ }), t;
3205
+ }
3206
+ function ps(e, t) {
3207
+ e.forEach((n) => {
3208
+ const s = n.loaderCallbacks;
3209
+ s && (n.loaderCallbacks = s.filter((r) => r.id !== t));
3210
+ });
3211
+ }
3212
+ function Ho(e) {
3213
+ e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
3214
+ e.pendingCallbacksFlag = !1;
3215
+ const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
3216
+ if (!t.length)
3217
+ return;
3218
+ let n = !1;
3219
+ const s = e.provider, r = e.prefix;
3220
+ t.forEach((i) => {
3221
+ const o = i.icons, l = o.pending.length;
3222
+ o.pending = o.pending.filter((a) => {
3223
+ if (a.prefix !== r)
3224
+ return !0;
3225
+ const u = a.name;
3226
+ if (e.icons[u])
3227
+ o.loaded.push({
3228
+ provider: s,
3229
+ prefix: r,
3230
+ name: u
3231
+ });
3232
+ else if (e.missing.has(u))
3233
+ o.missing.push({
3234
+ provider: s,
3235
+ prefix: r,
3236
+ name: u
3237
+ });
3238
+ else
3239
+ return n = !0, !0;
3240
+ return !1;
3241
+ }), o.pending.length !== l && (n || ps([e], i.id), i.callback(
3242
+ o.loaded.slice(0),
3243
+ o.missing.slice(0),
3244
+ o.pending.slice(0),
3245
+ i.abort
3246
+ ));
3247
+ });
3248
+ }));
3249
+ }
3250
+ let qo = 0;
3251
+ function Vo(e, t, n) {
3252
+ const s = qo++, r = ps.bind(null, n, s);
3253
+ if (!t.pending.length)
3254
+ return r;
3255
+ const i = {
3256
+ id: s,
3257
+ icons: t,
3258
+ callback: e,
3259
+ abort: r
3260
+ };
3261
+ return n.forEach((o) => {
3262
+ (o.loaderCallbacks || (o.loaderCallbacks = [])).push(i);
3263
+ }), r;
3264
+ }
3265
+ function Bo(e, t = !0, n = !1) {
3266
+ const s = [];
3267
+ return e.forEach((r) => {
3268
+ const i = typeof r == "string" ? zt(r, t, n) : r;
3269
+ i && s.push(i);
3270
+ }), s;
3271
+ }
3272
+ var Go = {
3273
+ resources: [],
3274
+ index: 0,
3275
+ timeout: 2e3,
3276
+ rotate: 750,
3277
+ random: !1,
3278
+ dataAfterTimeout: !1
3279
+ };
3280
+ function Zo(e, t, n, s) {
3281
+ const r = e.resources.length, i = e.random ? Math.floor(Math.random() * r) : e.index;
3282
+ let o;
3283
+ if (e.random) {
3284
+ let w = e.resources.slice(0);
3285
+ for (o = []; w.length > 1; ) {
3286
+ const M = Math.floor(Math.random() * w.length);
3287
+ o.push(w[M]), w = w.slice(0, M).concat(w.slice(M + 1));
3288
+ }
3289
+ o = o.concat(w);
3290
+ } else
3291
+ o = e.resources.slice(i).concat(e.resources.slice(0, i));
3292
+ const l = Date.now();
3293
+ let a = "pending", u = 0, c, f = null, d = [], h = [];
3294
+ typeof s == "function" && h.push(s);
3295
+ function v() {
3296
+ f && (clearTimeout(f), f = null);
3297
+ }
3298
+ function p() {
3299
+ a === "pending" && (a = "aborted"), v(), d.forEach((w) => {
3300
+ w.status === "pending" && (w.status = "aborted");
3301
+ }), d = [];
3302
+ }
3303
+ function m(w, M) {
3304
+ M && (h = []), typeof w == "function" && h.push(w);
3305
+ }
3306
+ function _() {
3307
+ return {
3308
+ startTime: l,
3309
+ payload: t,
3310
+ status: a,
3311
+ queriesSent: u,
3312
+ queriesPending: d.length,
3313
+ subscribe: m,
3314
+ abort: p
3315
+ };
3316
+ }
3317
+ function g() {
3318
+ a = "failed", h.forEach((w) => {
3319
+ w(void 0, c);
3320
+ });
3321
+ }
3322
+ function b() {
3323
+ d.forEach((w) => {
3324
+ w.status === "pending" && (w.status = "aborted");
3325
+ }), d = [];
3326
+ }
3327
+ function x(w, M, T) {
3328
+ const O = M !== "success";
3329
+ switch (d = d.filter((D) => D !== w), a) {
3330
+ case "pending":
3331
+ break;
3332
+ case "failed":
3333
+ if (O || !e.dataAfterTimeout)
3334
+ return;
3335
+ break;
3336
+ default:
3337
+ return;
3338
+ }
3339
+ if (M === "abort") {
3340
+ c = T, g();
3341
+ return;
3342
+ }
3343
+ if (O) {
3344
+ c = T, d.length || (o.length ? $() : g());
3345
+ return;
3346
+ }
3347
+ if (v(), b(), !e.random) {
3348
+ const D = e.resources.indexOf(w.resource);
3349
+ D !== -1 && D !== e.index && (e.index = D);
3350
+ }
3351
+ a = "completed", h.forEach((D) => {
3352
+ D(T);
3353
+ });
3354
+ }
3355
+ function $() {
3356
+ if (a !== "pending")
3357
+ return;
3358
+ v();
3359
+ const w = o.shift();
3360
+ if (w === void 0) {
3361
+ if (d.length) {
3362
+ f = setTimeout(() => {
3363
+ v(), a === "pending" && (b(), g());
3364
+ }, e.timeout);
3365
+ return;
3366
+ }
3367
+ g();
3368
+ return;
3369
+ }
3370
+ const M = {
3371
+ status: "pending",
3372
+ resource: w,
3373
+ callback: (T, O) => {
3374
+ x(M, T, O);
3375
+ }
3376
+ };
3377
+ d.push(M), u++, f = setTimeout($, e.rotate), n(w, t, M.callback);
3378
+ }
3379
+ return setTimeout($), _;
3380
+ }
3381
+ function _s(e) {
3382
+ const t = {
3383
+ ...Go,
3384
+ ...e
3385
+ };
3386
+ let n = [];
3387
+ function s() {
3388
+ n = n.filter((l) => l().status === "pending");
3389
+ }
3390
+ function r(l, a, u) {
3391
+ const c = Zo(
3392
+ t,
3393
+ l,
3394
+ a,
3395
+ (f, d) => {
3396
+ s(), u && u(f, d);
3397
+ }
3398
+ );
3399
+ return n.push(c), c;
3400
+ }
3401
+ function i(l) {
3402
+ return n.find((a) => l(a)) || null;
3403
+ }
3404
+ return {
3405
+ query: r,
3406
+ find: i,
3407
+ setIndex: (l) => {
3408
+ t.index = l;
3409
+ },
3410
+ getIndex: () => t.index,
3411
+ cleanup: s
3412
+ };
3413
+ }
3414
+ function tr() {
3415
+ }
3416
+ const Kt = /* @__PURE__ */ Object.create(null);
3417
+ function Wo(e) {
3418
+ if (!Kt[e]) {
3419
+ const t = Cn(e);
3420
+ if (!t)
3421
+ return;
3422
+ const n = _s(t), s = {
3423
+ config: t,
3424
+ redundancy: n
3425
+ };
3426
+ Kt[e] = s;
3427
+ }
3428
+ return Kt[e];
3429
+ }
3430
+ function Yo(e, t, n) {
3431
+ let s, r;
3432
+ if (typeof e == "string") {
3433
+ const i = hn(e);
3434
+ if (!i)
3435
+ return n(void 0, 424), tr;
3436
+ r = i.send;
3437
+ const o = Wo(e);
3438
+ o && (s = o.redundancy);
3439
+ } else {
3440
+ const i = In(e);
3441
+ if (i) {
3442
+ s = _s(i);
3443
+ const o = e.resources ? e.resources[0] : "", l = hn(o);
3444
+ l && (r = l.send);
3445
+ }
3446
+ }
3447
+ return !s || !r ? (n(void 0, 424), tr) : s.query(t, r, n)().abort;
3448
+ }
3449
+ function nr() {
3450
+ }
3451
+ function Ko(e) {
3452
+ e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
3453
+ e.iconsLoaderFlag = !1, Ho(e);
3454
+ }));
3455
+ }
3456
+ function Jo(e) {
3457
+ const t = [], n = [];
3458
+ return e.forEach((s) => {
3459
+ (s.match(ls) ? t : n).push(s);
3460
+ }), {
3461
+ valid: t,
3462
+ invalid: n
3463
+ };
3464
+ }
3465
+ function Ke(e, t, n) {
3466
+ function s() {
3467
+ const r = e.pendingIcons;
3468
+ t.forEach((i) => {
3469
+ r && r.delete(i), e.icons[i] || e.missing.add(i);
3470
+ });
3471
+ }
3472
+ if (n && typeof n == "object")
3473
+ try {
3474
+ if (!fs(e, n).length) {
3475
+ s();
3476
+ return;
3477
+ }
3478
+ } catch (r) {
3479
+ console.error(r);
3480
+ }
3481
+ s(), Ko(e);
3482
+ }
3483
+ function rr(e, t) {
3484
+ e instanceof Promise ? e.then((n) => {
3485
+ t(n);
3486
+ }).catch(() => {
3487
+ t(null);
3488
+ }) : t(e);
3489
+ }
3490
+ function Qo(e, t) {
3491
+ e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
3492
+ e.iconsQueueFlag = !1;
3493
+ const { provider: n, prefix: s } = e, r = e.iconsToLoad;
3494
+ if (delete e.iconsToLoad, !r || !r.length)
3495
+ return;
3496
+ const i = e.loadIcon;
3497
+ if (e.loadIcons && (r.length > 1 || !i)) {
3498
+ rr(
3499
+ e.loadIcons(r, s, n),
3500
+ (c) => {
3501
+ Ke(e, r, c);
3502
+ }
3503
+ );
3504
+ return;
3505
+ }
3506
+ if (i) {
3507
+ r.forEach((c) => {
3508
+ const f = i(c, s, n);
3509
+ rr(f, (d) => {
3510
+ const h = d ? {
3511
+ prefix: s,
3512
+ icons: {
3513
+ [c]: d
3514
+ }
3515
+ } : null;
3516
+ Ke(e, [c], h);
3517
+ });
3518
+ });
3519
+ return;
3520
+ }
3521
+ const { valid: o, invalid: l } = Jo(r);
3522
+ if (l.length && Ke(e, l, null), !o.length)
3523
+ return;
3524
+ const a = s.match(ls) ? hn(n) : null;
3525
+ if (!a) {
3526
+ Ke(e, o, null);
3527
+ return;
3528
+ }
3529
+ a.prepare(n, s, o).forEach((c) => {
3530
+ Yo(n, c, (f) => {
3531
+ Ke(e, c.icons, f);
3532
+ });
3533
+ });
3534
+ }));
3535
+ }
3536
+ const Xo = (e, t) => {
3537
+ const n = Bo(e, !0, ds()), s = Uo(n);
3538
+ if (!s.pending.length) {
3539
+ let a = !0;
3540
+ return t && setTimeout(() => {
3541
+ a && t(
3542
+ s.loaded,
3543
+ s.missing,
3544
+ s.pending,
3545
+ nr
3546
+ );
3547
+ }), () => {
3548
+ a = !1;
3549
+ };
3550
+ }
3551
+ const r = /* @__PURE__ */ Object.create(null), i = [];
3552
+ let o, l;
3553
+ return s.pending.forEach((a) => {
3554
+ const { provider: u, prefix: c } = a;
3555
+ if (c === l && u === o)
3556
+ return;
3557
+ o = u, l = c, i.push(De(u, c));
3558
+ const f = r[u] || (r[u] = /* @__PURE__ */ Object.create(null));
3559
+ f[c] || (f[c] = []);
3560
+ }), s.pending.forEach((a) => {
3561
+ const { provider: u, prefix: c, name: f } = a, d = De(u, c), h = d.pendingIcons || (d.pendingIcons = /* @__PURE__ */ new Set());
3562
+ h.has(f) || (h.add(f), r[u][c].push(f));
3563
+ }), i.forEach((a) => {
3564
+ const u = r[a.provider][a.prefix];
3565
+ u.length && Qo(a, u);
3566
+ }), t ? Vo(t, s, i) : nr;
3567
+ };
3568
+ function el(e, t) {
3569
+ const n = {
3570
+ ...e
3571
+ };
3572
+ for (const s in t) {
3573
+ const r = t[s], i = typeof r;
3574
+ s in hs ? (r === null || r && (i === "string" || i === "number")) && (n[s] = r) : i === typeof n[s] && (n[s] = s === "rotate" ? r % 4 : r);
3575
+ }
3576
+ return n;
3577
+ }
3578
+ const tl = /[\s,]+/;
3579
+ function nl(e, t) {
3580
+ t.split(tl).forEach((n) => {
3581
+ switch (n.trim()) {
3582
+ case "horizontal":
3583
+ e.hFlip = !0;
3584
+ break;
3585
+ case "vertical":
3586
+ e.vFlip = !0;
3587
+ break;
3588
+ }
3589
+ });
3590
+ }
3591
+ function rl(e, t = 0) {
3592
+ const n = e.replace(/^-?[0-9.]*/, "");
3593
+ function s(r) {
3594
+ for (; r < 0; )
3595
+ r += 4;
3596
+ return r % 4;
3597
+ }
3598
+ if (n === "") {
3599
+ const r = parseInt(e);
3600
+ return isNaN(r) ? 0 : s(r);
3601
+ } else if (n !== e) {
3602
+ let r = 0;
3603
+ switch (n) {
3604
+ case "%":
3605
+ r = 25;
3606
+ break;
3607
+ case "deg":
3608
+ r = 90;
3609
+ }
3610
+ if (r) {
3611
+ let i = parseFloat(e.slice(0, e.length - n.length));
3612
+ return isNaN(i) ? 0 : (i = i / r, i % 1 === 0 ? s(i) : 0);
3613
+ }
3614
+ }
3615
+ return t;
3616
+ }
3617
+ function sl(e, t) {
3618
+ let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
3619
+ for (const s in t)
3620
+ n += " " + s + '="' + t[s] + '"';
3621
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
3622
+ }
3623
+ function il(e) {
3624
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
3625
+ }
3626
+ function ol(e) {
3627
+ return "data:image/svg+xml," + il(e);
3628
+ }
3629
+ function ll(e) {
3630
+ return 'url("' + ol(e) + '")';
3631
+ }
3632
+ const sr = {
3633
+ ...vs,
3634
+ inline: !1
3635
+ }, al = {
3636
+ xmlns: "http://www.w3.org/2000/svg",
3637
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
3638
+ "aria-hidden": !0,
3639
+ role: "img"
3640
+ }, ul = {
3641
+ display: "inline-block"
3642
+ }, vn = {
3643
+ "background-color": "currentColor"
3644
+ }, gs = {
3645
+ "background-color": "transparent"
3646
+ }, ir = {
3647
+ image: "var(--svg)",
3648
+ repeat: "no-repeat",
3649
+ size: "100% 100%"
3650
+ }, or = {
3651
+ "-webkit-mask": vn,
3652
+ mask: vn,
3653
+ background: gs
3654
+ };
3655
+ for (const e in or) {
3656
+ const t = or[e];
3657
+ for (const n in ir)
3658
+ t[e + "-" + n] = ir[n];
3659
+ }
3660
+ function cl(e) {
3661
+ return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3662
+ }
3663
+ function fl(e, t) {
3664
+ const n = el(sr, t), s = t.mode || "svg", r = s === "svg" ? { ...al } : {};
3665
+ e.body.indexOf("xlink:") === -1 && delete r["xmlns:xlink"];
3666
+ let i = typeof t.style == "string" ? t.style : "";
3667
+ for (let _ in t) {
3668
+ const g = t[_];
3669
+ if (g !== void 0)
3670
+ switch (_) {
3671
+ case "icon":
3672
+ case "style":
3673
+ case "onLoad":
3674
+ case "mode":
3675
+ case "ssr":
3676
+ break;
3677
+ case "inline":
3678
+ case "hFlip":
3679
+ case "vFlip":
3680
+ n[_] = g === !0 || g === "true" || g === 1;
3681
+ break;
3682
+ case "flip":
3683
+ typeof g == "string" && nl(n, g);
3684
+ break;
3685
+ case "color":
3686
+ i = i + (i.length > 0 && i.trim().slice(-1) !== ";" ? ";" : "") + "color: " + g + "; ";
3687
+ break;
3688
+ case "rotate":
3689
+ typeof g == "string" ? n[_] = rl(g) : typeof g == "number" && (n[_] = g);
3690
+ break;
3691
+ case "ariaHidden":
3692
+ case "aria-hidden":
3693
+ g !== !0 && g !== "true" && delete r["aria-hidden"];
3694
+ break;
3695
+ default:
3696
+ if (_.slice(0, 3) === "on:")
3697
+ break;
3698
+ sr[_] === void 0 && (r[_] = g);
3699
+ }
3700
+ }
3701
+ const o = Io(e, n), l = o.attributes;
3702
+ if (n.inline && (i = "vertical-align: -0.125em; " + i), s === "svg") {
3703
+ Object.assign(r, l), i !== "" && (r.style = i);
3704
+ let _ = 0, g = t.id;
3705
+ return typeof g == "string" && (g = g.replace(/-/g, "_")), {
3706
+ svg: !0,
3707
+ attributes: r,
3708
+ body: Oo(o.body, g ? () => g + "ID" + _++ : "iconifySvelte")
3709
+ };
3710
+ }
3711
+ const { body: a, width: u, height: c } = e, f = s === "mask" || (s === "bg" ? !1 : a.indexOf("currentColor") !== -1), d = sl(a, {
3712
+ ...l,
3713
+ width: u + "",
3714
+ height: c + ""
3715
+ }), v = {
3716
+ "--svg": ll(d)
3717
+ }, p = (_) => {
3718
+ const g = l[_];
3719
+ g && (v[_] = cl(g));
3720
+ };
3721
+ p("width"), p("height"), Object.assign(v, ul, f ? vn : gs);
3722
+ let m = "";
3723
+ for (const _ in v)
3724
+ m += _ + ": " + v[_] + ";";
3725
+ return r.style = m + i, {
3726
+ svg: !1,
3727
+ attributes: r
3728
+ };
3729
+ }
3730
+ ds(!0);
3731
+ No("", zo);
3732
+ if (typeof document < "u" && typeof window < "u") {
3733
+ const e = window;
3734
+ if (e.IconifyPreload !== void 0) {
3735
+ const t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
3736
+ typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((s) => {
3737
+ try {
3738
+ // Check if item is an object and not null/array
3739
+ (typeof s != "object" || s === null || s instanceof Array || // Check for 'icons' and 'prefix'
3740
+ typeof s.icons != "object" || typeof s.prefix != "string" || // Add icon set
3741
+ !bo(s)) && console.error(n);
3742
+ } catch {
3743
+ console.error(n);
3744
+ }
3745
+ });
3746
+ }
3747
+ if (e.IconifyProviders !== void 0) {
3748
+ const t = e.IconifyProviders;
3749
+ if (typeof t == "object" && t !== null)
3750
+ for (let n in t) {
3751
+ const s = "IconifyProviders[" + n + "] is invalid.";
3752
+ try {
3753
+ const r = t[n];
3754
+ if (typeof r != "object" || !r || r.resources === void 0)
3755
+ continue;
3756
+ Fo(n, r) || console.error(s);
3757
+ } catch {
3758
+ console.error(s);
3759
+ }
3760
+ }
3761
+ }
3762
+ }
3763
+ function dl(e, t, n, s, r) {
3764
+ function i() {
3765
+ t.loading && (t.loading.abort(), t.loading = null);
3766
+ }
3767
+ if (typeof e == "object" && e !== null && typeof e.body == "string")
3768
+ return t.name = "", i(), { data: { ...Ut, ...e } };
3769
+ let o;
3770
+ if (typeof e != "string" || (o = zt(e, !1, !0)) === null)
3771
+ return i(), null;
3772
+ const l = yo(o);
3773
+ if (!l)
3774
+ return n && (!t.loading || t.loading.name !== e) && (i(), t.name = "", t.loading = {
3775
+ name: e,
3776
+ abort: Xo([o], s)
3777
+ }), null;
3778
+ i(), t.name !== e && (t.name = e, r && !t.destroyed && r(e));
3779
+ const a = ["iconify"];
3780
+ return o.prefix !== "" && a.push("iconify--" + o.prefix), o.provider !== "" && a.push("iconify--" + o.provider), { data: l, classes: a };
3781
+ }
3782
+ function lr(e, t) {
3783
+ return e ? fl({
3784
+ ...Ut,
3785
+ ...e
3786
+ }, t) : null;
3787
+ }
3788
+ var hl = /* @__PURE__ */ Mi("<svg><!></svg>"), vl = /* @__PURE__ */ X("<span></span>");
3789
+ function Te(e, t) {
3790
+ const n = io(t, [
3791
+ "children",
3792
+ "$$slots",
3793
+ "$$events",
3794
+ "$$legacy",
3795
+ "$$host"
3796
+ ]);
3797
+ be(t, !1);
3798
+ const s = at({
3799
+ // Last icon name
3800
+ name: "",
3801
+ // Loading status
3802
+ loading: null,
3803
+ // Destroyed status
3804
+ destroyed: !1
3805
+ });
3806
+ let r = at(!1), i = at(0), o = at();
3807
+ const l = (d) => {
3808
+ typeof n.onLoad == "function" && n.onLoad(d), to()("load", { icon: d });
3809
+ };
3810
+ function a() {
3811
+ sn(i);
3812
+ }
3813
+ ss(() => {
3814
+ k(r, !0);
3815
+ }), Xi(() => {
3816
+ Gt(s, y(s).destroyed = !0), y(s).loading && (y(s).loading.abort(), Gt(s, y(s).loading = null));
3817
+ }), pi(
3818
+ () => (y(i), qr(n), y(r), y(s), y(o), lr),
3819
+ () => {
3820
+ y(i);
3821
+ const d = !!n.ssr || y(r), h = dl(n.icon, y(s), d, a, l);
3822
+ k(o, h ? lr(h.data, n) : null), y(o) && h.classes && Gt(o, y(o).attributes.class = (typeof n.class == "string" ? n.class + " " : "") + h.classes.join(" "));
3823
+ }
3824
+ ), _i(), Qi();
3825
+ var u = Hn(), c = tn(u);
3826
+ {
3827
+ var f = (d) => {
3828
+ var h = Hn(), v = tn(h);
3829
+ {
3830
+ var p = (_) => {
3831
+ var g = hl();
3832
+ let b;
3833
+ var x = P(g);
3834
+ zi(x, () => y(o).body), F(g), wt(() => b = Vn(g, b, { ...y(o).attributes }, void 0, !0)), j(_, g);
3835
+ }, m = (_) => {
3836
+ var g = vl();
3837
+ let b;
3838
+ wt(() => b = Vn(g, b, { ...y(o).attributes })), j(_, g);
3839
+ };
3840
+ rt(v, (_) => {
3841
+ y(o).svg ? _(p) : _(m, !1);
3842
+ });
3843
+ }
3844
+ j(d, h);
3845
+ };
3846
+ rt(c, (d) => {
3847
+ y(o) && d(f);
3848
+ });
3849
+ }
3850
+ j(e, u), we();
3851
+ }
3852
+ Ae(Te, {}, [], [], !0);
3853
+ const pl = (e, t) => {
3854
+ t(new ve("", "", "", "New Chat", [ie.firstMessage()]));
3855
+ };
3856
+ var _l = (e, t) => t(!t()), gl = (e, t, n) => {
3857
+ t() ? (t(!1), setTimeout(
3858
+ () => {
3859
+ n(!1);
3860
+ },
3861
+ 450
3862
+ )) : n(!1);
3863
+ }, yl = /* @__PURE__ */ X('<header class="svelte-ee1blh"><section class="svelte-ee1blh"><div><h1 class="svelte-ee1blh">Chat</h1></div> <div class="buttons svelte-ee1blh"><button class="new-chat svelte-ee1blh"><!></button> <button class="history-button svelte-ee1blh"><!></button> <button class="close-button svelte-ee1blh"><!></button></div></section></header>');
3864
+ const ml = {
3865
+ hash: "svelte-ee1blh",
3866
+ code: "header.svelte-ee1blh {display:flex;justify-content:center;align-items:center;height:50px;border-radius:30px 30px 0 0;}h1.svelte-ee1blh {font-size:1.5rem;color:#fff;}section.svelte-ee1blh {display:flex;justify-content:space-between;align-items:center;width:100%;padding:10px;}.buttons.svelte-ee1blh {display:flex;gap:10px;}button.svelte-ee1blh {display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:30px;transition:200ms;}.new-chat.svelte-ee1blh {width:35px;height:35px;background:#295dcf;color:white;padding:0;}.new-chat.svelte-ee1blh:hover {background:#1e3a8a;}.history-button.svelte-ee1blh {width:35px;height:35px;background:#295dcf;color:white;font-weight:bold;font-size:14px;}.history-button.svelte-ee1blh:hover {background:#1e3a8a;}.close-button.svelte-ee1blh {width:35px;height:35px;background:#295dcf;color:white;}.close-button.svelte-ee1blh:hover {background:red;}"
3867
+ };
3868
+ function ys(e, t) {
3869
+ be(t, !0), lt(e, ml);
3870
+ let n = J(t, "show", 15, !1), s = J(t, "showHistory", 15), r = J(t, "actChat", 15);
3871
+ var i = yl(), o = P(i), l = ee(P(o), 2), a = P(l);
3872
+ a.__click = [pl, r];
3873
+ var u = P(a);
3874
+ Te(u, {
3875
+ icon: "ic:round-plus",
3876
+ width: "25px",
3877
+ height: "25px"
3878
+ }), F(a);
3879
+ var c = ee(a, 2);
3880
+ c.__click = [_l, s];
3881
+ var f = P(c);
3882
+ Te(f, {
3883
+ icon: "heroicons:chat-bubble-left-right-solid",
3884
+ width: "25px",
3885
+ height: "25px"
3886
+ }), F(c);
3887
+ var d = ee(c, 2);
3888
+ d.__click = [gl, s, n];
3889
+ var h = P(d);
3890
+ return Te(h, {
3891
+ icon: "gg:close",
3892
+ width: "20px",
3893
+ height: "20px"
3894
+ }), F(d), F(l), F(o), F(i), j(e, i), we({
3895
+ get show() {
3896
+ return n();
3897
+ },
3898
+ set show(v = !1) {
3899
+ n(v), V();
3900
+ },
3901
+ get showHistory() {
3902
+ return s();
3903
+ },
3904
+ set showHistory(v) {
3905
+ s(v), V();
3906
+ },
3907
+ get actChat() {
3908
+ return r();
3909
+ },
3910
+ set actChat(v) {
3911
+ r(v), V();
3912
+ }
3913
+ });
3914
+ }
3915
+ ot(["click"]);
3916
+ Ae(ys, { show: {}, showHistory: {}, actChat: {} }, [], [], !0);
3917
+ var bl = (e, t) => {
3918
+ e.key === "Enter" && t();
3919
+ }, wl = /* @__PURE__ */ X('<div class="input svelte-1xtazuc"><input type="text" placeholder="Type your message here" class="svelte-1xtazuc"> <button class="svelte-1xtazuc"><!></button></div>');
3920
+ const xl = {
3921
+ hash: "svelte-1xtazuc",
3922
+ code: ".input.svelte-1xtazuc {display:flex;justify-content:center;align-items:center;padding:10px;background:#f0f0f0;border-radius:15px;margin:10px;}input.svelte-1xtazuc {width:100%;padding:10px;border:none;border-radius:10px;margin-right:10px;}input.svelte-1xtazuc:focus {outline:none;}button.svelte-1xtazuc {display:flex;justify-content:center;align-items:center;background:#295dcf;border:none;color:white;font-size:1rem;cursor:pointer;border-radius:30px;padding:5px 5px 5px 8px;transition:200ms;}button.svelte-1xtazuc:hover {background:#1e4aa8;}"
3923
+ };
3924
+ function ms(e, t) {
3925
+ be(t, !0), lt(e, xl);
3926
+ let n = J(t, "sendMessage", 7), s = ge("");
3927
+ const r = () => {
3928
+ n()(y(s)), k(s, "");
3929
+ };
3930
+ var i = wl(), o = P(i);
3931
+ Hi(o), o.__keyup = [bl, r];
3932
+ var l = ee(o, 2);
3933
+ l.__click = r;
3934
+ var a = P(l);
3935
+ return Te(a, {
3936
+ icon: "material-symbols:send-rounded",
3937
+ width: "25px",
3938
+ height: "25px"
3939
+ }), F(l), F(i), Ki(o, () => y(s), (u) => k(s, u)), j(e, i), we({
3940
+ get sendMessage() {
3941
+ return n();
3942
+ },
3943
+ set sendMessage(u) {
3944
+ n(u), V();
3945
+ }
3946
+ });
3947
+ }
3948
+ ot(["keyup", "click"]);
3949
+ Ae(ms, { sendMessage: {} }, [], [], !0);
3950
+ var $l = /* @__PURE__ */ X('<div><div class="message-content svelte-1rltd31"><p class="svelte-1rltd31"> </p></div></div>'), kl = /* @__PURE__ */ X('<div class="loading svelte-1rltd31"><!></div>'), El = /* @__PURE__ */ X('<div class="chat-body svelte-1rltd31"><div class="placeholder svelte-1rltd31"></div> <!> <!></div>');
3951
+ const Tl = {
3952
+ hash: "svelte-1rltd31",
3953
+ code: `.placeholder.svelte-1rltd31 {height:100%;}.chat-body.svelte-1rltd31 {display:flex;flex-direction:column;gap:10px;overflow-y:auto;height:100%;padding:10px;}.chat-body.svelte-1rltd31::-webkit-scrollbar {width:8px;}.chat-body.svelte-1rltd31::-webkit-scrollbar-track {background:rgba(255, 255, 255, 0.2); /* Sfondo semi-trasparente */border-radius:10px;}.chat-body.svelte-1rltd31::-webkit-scrollbar-thumb {background:rgba(\r
3954
+ 255,\r
3955
+ 255,\r
3956
+ 255,\r
3957
+ 0.5\r
3958
+ ); /* Colore del "pollice" della scrollbar */border-radius:10px;transition:0.3s;}.chat-body.svelte-1rltd31::-webkit-scrollbar-thumb:hover {background:rgba(255, 255, 255, 0.8); /* Più visibile quando hoverata */}.message-sent.svelte-1rltd31 {display:flex;background:#c8d9ff;border-radius:10px;border-bottom-right-radius:0;width:80%;margin-left:auto;}.message-received.svelte-1rltd31 {background:white;border-radius:10px;border-bottom-left-radius:0;width:80%;}.message-content.svelte-1rltd31 {padding:10px;font-size:15px;}p.svelte-1rltd31 {margin:5px 0;}.loading.svelte-1rltd31 {display:flex;justify-content:start;align-items:center;padding-left:10px;}`
3959
+ };
3960
+ function bs(e, t) {
3961
+ be(t, !0), lt(e, Tl);
3962
+ let n = J(t, "messages", 15), s = J(t, "loading", 15), r = ge(void 0);
3963
+ const i = async () => {
3964
+ await Ci(), y(r) && (y(r).scrollTop = y(r).scrollHeight);
3965
+ };
3966
+ Xe(() => {
3967
+ n(), i();
3968
+ });
3969
+ var o = El(), l = ee(P(o), 2);
3970
+ Jr(l, 17, n, Kr, (c, f) => {
3971
+ var d = $l(), h = P(d), v = P(h), p = P(v, !0);
3972
+ F(v), F(h), F(d), wt(() => {
3973
+ Vi(d, es(y(f).sentByUser ? "message-sent" : "message-received"), "svelte-1rltd31"), Zr(p, y(f).content);
3974
+ }), j(c, d);
3975
+ });
3976
+ var a = ee(l, 2);
3977
+ {
3978
+ var u = (c) => {
3979
+ var f = kl(), d = P(f);
3980
+ Te(d, {
3981
+ icon: "svg-spinners:3-dots-bounce",
3982
+ width: "25px",
3983
+ height: "25px",
3984
+ color: "white"
3985
+ }), F(f), j(c, f);
3986
+ };
3987
+ rt(a, (c) => {
3988
+ s() && c(u);
3989
+ });
3990
+ }
3991
+ return F(o), Ji(o, (c) => k(r, c), () => y(r)), j(e, o), we({
3992
+ get messages() {
3993
+ return n();
3994
+ },
3995
+ set messages(c) {
3996
+ n(c), V();
3997
+ },
3998
+ get loading() {
3999
+ return s();
4000
+ },
4001
+ set loading(c) {
4002
+ s(c), V();
4003
+ }
4004
+ });
4005
+ }
4006
+ Ae(bs, { messages: {}, loading: {} }, [], [], !0);
4007
+ const Il = () => {
4008
+ const t = document.cookie.split(";").find((n) => n.includes("token"));
4009
+ return t ? t.split("=")[1] : "1i6FKWFjKAtnYN5YdyoooBGFobGxiWjRIWmltNHFGSGY0R292QVM1M2ZuTXBoSG9iVGtKNEdaeU9HU0RzUWZtZ2ZSeG96YUlMemUvMTVvZFJUZTFuMzRpUElOT1BjK25SanM2RGhVSzE2cnUzTjA2TjdnOWJzbFFxdVh1MEtOQ1VhdUxQZXJ6Z204emZIZFpH";
4010
+ }, Sl = () => {
4011
+ const t = document.cookie.split(";").find((n) => n.includes("envid"));
4012
+ return t ? t.split("=")[1] : "aks_qua";
4013
+ }, W = {
4014
+ getToken: Il,
4015
+ getEnvironmentId: Sl
4016
+ }, Ge = () => {
4017
+ switch (W.getEnvironmentId()) {
4018
+ case "aks_svi":
4019
+ return "http://localhost:8080";
4020
+ case "aks_qua":
4021
+ return "https://aks-knowledge-base-back-65440859697.europe-west1.run.app";
4022
+ case "":
4023
+ throw new Error("Environment ID not set");
4024
+ default:
4025
+ return "";
4026
+ }
4027
+ }, Cl = async (e) => {
4028
+ const t = await fetch(`${Ge()}/chat/${e}`, {
4029
+ headers: {
4030
+ akstoken: W.getToken(),
4031
+ envid: W.getEnvironmentId()
4032
+ }
4033
+ });
4034
+ if (!t.ok)
4035
+ throw new Error("Failed to fetch chat");
4036
+ const n = await t.json();
4037
+ return ve.fromJson(n);
4038
+ }, Al = async () => {
4039
+ const e = await fetch(`${Ge()}/chat`, {
4040
+ headers: {
4041
+ akstoken: W.getToken(),
4042
+ envid: W.getEnvironmentId()
4043
+ }
4044
+ });
4045
+ if (!e.ok)
4046
+ throw new Error("Failed to fetch chats");
4047
+ return (await e.json()).map((n) => ve.fromJson(n));
4048
+ }, Ol = async () => {
4049
+ const e = await fetch(`${Ge()}/chat`, {
4050
+ method: "POST",
4051
+ headers: {
4052
+ akstoken: W.getToken(),
4053
+ envid: W.getEnvironmentId()
4054
+ }
4055
+ });
4056
+ if (!e.ok)
4057
+ throw new Error("Failed to create chat");
4058
+ const t = await e.json();
4059
+ return ve.fromJson(t);
4060
+ }, Nl = async (e, t) => {
4061
+ const n = await fetch(`${Ge()}/chat/${e}/message`, {
4062
+ method: "POST",
4063
+ headers: {
4064
+ "Content-Type": "application/json",
4065
+ akstoken: W.getToken(),
4066
+ envid: W.getEnvironmentId()
4067
+ },
4068
+ body: JSON.stringify({ content: t })
4069
+ });
4070
+ if (!n.ok)
4071
+ throw new Error("Failed to send message");
4072
+ const s = await n.json();
4073
+ return ie.fromJson(s);
4074
+ }, Fl = async (e, t) => {
4075
+ if (!(await fetch(`${Ge()}/chat/${e}/title`, {
4076
+ method: "POST",
4077
+ headers: {
4078
+ "Content-Type": "application/json",
4079
+ akstoken: W.getToken(),
4080
+ envid: W.getEnvironmentId()
4081
+ },
4082
+ body: JSON.stringify({ title: t })
4083
+ })).ok)
4084
+ throw new Error("Failed to change title");
4085
+ }, Ml = async (e) => {
4086
+ if (!(await fetch(`${Ge()}/chat/${e}`, {
4087
+ method: "DELETE",
4088
+ headers: {
4089
+ akstoken: W.getToken(),
4090
+ envid: W.getEnvironmentId()
4091
+ }
4092
+ })).ok)
4093
+ throw new Error("Failed to delete chat");
4094
+ }, Ne = {
4095
+ getChat: Cl,
4096
+ getChats: Al,
4097
+ newChat: Ol,
4098
+ sendMessage: Nl,
4099
+ deleteChat: Ml,
4100
+ changeTitle: Fl
4101
+ };
4102
+ var Pl = (e, t, n, s) => {
4103
+ t()._id != y(n)._id && s(y(n));
4104
+ }, Rl = (e, t, n) => t(y(n)._id, y(n).title), jl = /* @__PURE__ */ X('<div class="chat svelte-s62nll"><button class="chat-button svelte-s62nll"><span style="font-weight: bold;" class="svelte-s62nll"> </span></button> <button class="chat-delete svelte-s62nll"><!></button></div>'), Ll = /* @__PURE__ */ X('<div class="history svelte-s62nll"><span class="title svelte-s62nll">History</span> <div class="chats svelte-s62nll"></div></div>'), Dl = /* @__PURE__ */ X('<div class="external-div svelte-s62nll"><!></div>');
4105
+ const zl = {
4106
+ hash: "svelte-s62nll",
4107
+ code: `\r
4108
+ @import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");.svelte-s62nll {font-family:"Montserrat", sans-serif;}.history.svelte-s62nll {position:fixed;bottom:0;right:350px;width:300px;height:600px;border-radius:15px;display:flex;flex-direction:column;margin:30px;padding:10px;background:#3c4450;box-shadow:0 0 10px rgba(0, 0, 0, 0.1);}.title.svelte-s62nll {font-size:1.5rem;color:#fff;margin:10px;text-align:left;}.chats.svelte-s62nll {display:flex;flex-direction:column;padding:10px;overflow-y:scroll;overflow-x:hidden;height:100%;padding-right:55px;gap:20px;}.chat.svelte-s62nll {background:rgba(255, 255, 255, 0.2);display:flex;justify-content:space-between;align-items:center;border-radius:10px;transition:200ms;width:220px;}.chat.svelte-s62nll > .chat-button:where(.svelte-s62nll) {background:transparent;padding:5px 10px;border-radius:10px;cursor:pointer;transition:200ms;text-align:left;border:none;font-size:15px;}.chat.svelte-s62nll > .chat-delete:where(.svelte-s62nll) {display:flex;justify-content:center;align-items:center;background:transparent;border-radius:100%;cursor:pointer;transition:200ms;border:none;height:35px;width:35px;color:white;margin:3px;}.chat.svelte-s62nll:hover {scale:1.02;}.chat-button.svelte-s62nll:hover {background:rgba(255, 255, 255, 0.2);}.chat-delete.svelte-s62nll:hover {background:rgba(255, 255, 255, 0.2);}.chat.svelte-s62nll > button:where(.svelte-s62nll) > span:where(.svelte-s62nll) {color:white;text-shadow:0 0 5px rgba(0, 0, 0, 0.1);}`
4109
+ };
4110
+ function ws(e, t) {
4111
+ be(t, !0), lt(e, zl);
4112
+ let n = J(t, "showHistory", 15), s = J(t, "actChat", 15), r = J(t, "chats", 15);
4113
+ const i = (c) => {
4114
+ s(c);
4115
+ }, o = (c, f) => {
4116
+ confirm("Sei sicuro di voler eliminare la chat " + f + "?") && Ne.deleteChat(c).then(() => {
4117
+ r(r().filter((d) => d._id !== c)), s()._id === c && s(new ve("", "", "", "New Chat", [ie.firstMessage()]));
4118
+ });
4119
+ };
4120
+ var l = Dl(), a = P(l);
4121
+ {
4122
+ var u = (c) => {
4123
+ var f = Ll(), d = ee(P(f), 2);
4124
+ Jr(d, 21, r, Kr, (h, v) => {
4125
+ var p = jl(), m = P(p);
4126
+ m.__click = [Pl, s, v, i];
4127
+ var _ = P(m), g = P(_, !0);
4128
+ F(_), F(m);
4129
+ var b = ee(m, 2);
4130
+ b.__click = [Rl, o, v];
4131
+ var x = P(b);
4132
+ Te(x, {
4133
+ icon: "tabler:trash",
4134
+ width: "25px",
4135
+ height: "25px"
4136
+ }), F(b), F(p), wt(() => {
4137
+ It(p, "style", s()._id === y(v)._id ? "background: #295dcf; cursor: default;" : ""), Zr(g, y(v).title);
4138
+ }), j(h, p);
4139
+ }), F(d), F(f), rs(3, f, () => co, () => ({ axis: "x", duration: 600 })), j(c, f);
4140
+ };
4141
+ rt(a, (c) => {
4142
+ n() && c(u);
4143
+ });
4144
+ }
4145
+ return F(l), j(e, l), we({
4146
+ get showHistory() {
4147
+ return n();
4148
+ },
4149
+ set showHistory(c) {
4150
+ n(c), V();
4151
+ },
4152
+ get actChat() {
4153
+ return s();
4154
+ },
4155
+ set actChat(c) {
4156
+ s(c), V();
4157
+ },
4158
+ get chats() {
4159
+ return r();
4160
+ },
4161
+ set chats(c) {
4162
+ r(c), V();
4163
+ }
4164
+ });
4165
+ }
4166
+ ot(["click"]);
4167
+ Ae(ws, { showHistory: {}, actChat: {}, chats: {} }, [], [], !0);
4168
+ var Ul = /* @__PURE__ */ X('<!> <div class="chat svelte-18mfzyz"><!> <!> <!></div>', 1), Hl = (e, t) => k(t, !0), ql = /* @__PURE__ */ X('<button class="chat-bottom svelte-18mfzyz">Show Chat</button>'), Vl = /* @__PURE__ */ X('<div class="external-div svelte-18mfzyz"><!></div>');
4169
+ const Bl = {
4170
+ hash: "svelte-18mfzyz",
4171
+ code: `\r
4172
+ @import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");.svelte-18mfzyz {font-family:"Montserrat", sans-serif !important;}.chat.svelte-18mfzyz {position:fixed;bottom:0;right:0;width:400px;height:600px;border-radius:15px;display:flex;flex-direction:column;margin:30px;padding:10px;background:#295dcf;box-shadow:0 0 10px rgba(0, 0, 0, 0.1);}.chat-bottom.svelte-18mfzyz {position:fixed;bottom:0;right:0;background:#295dcf;border:none;color:white;font-size:1rem;cursor:pointer;border-radius:30px;padding:10px;margin:30px;font-weight:bold;font-family:"Montserrat", sans-serif !important;}`
4173
+ };
4174
+ function xs(e, t) {
4175
+ be(t, !0), lt(e, Bl);
4176
+ let n = ge(!1), s = ge(!1), r = ge(N(new ve("", "", "", "New Chat", [ie.firstMessage()]))), i = ge(N([])), o = ge(N([ie.firstMessage()])), l = ge(!1);
4177
+ const a = async (h) => {
4178
+ if (k(l, !0), k(o, N([
4179
+ ...y(o),
4180
+ new ie((/* @__PURE__ */ new Date()).getTime(), !0, h)
4181
+ ])), y(o).length == 2 && (k(r, N(await Ne.newChat())), k(i, N([...y(i), y(r)])), y(r).messages = y(o)), y(r)) {
4182
+ let v = await Ne.sendMessage(y(r)._id, h);
4183
+ y(o).length == 2 && k(r, N(await Ne.getChat(y(r)._id))), k(r, N(await Ne.getChat(y(r)._id))), k(o, N([...y(o), v]));
4184
+ }
4185
+ k(l, !1);
4186
+ };
4187
+ Xe(() => {
4188
+ y(r) && k(o, N(y(r).messages)), Ne.getChats().then((h) => {
4189
+ k(i, N(h));
4190
+ });
4191
+ });
4192
+ var u = Vl(), c = P(u);
4193
+ {
4194
+ var f = (h) => {
4195
+ var v = Ul(), p = tn(v);
4196
+ ws(p, {
4197
+ get showHistory() {
4198
+ return y(s);
4199
+ },
4200
+ set showHistory(x) {
4201
+ k(s, N(x));
4202
+ },
4203
+ get actChat() {
4204
+ return y(r);
4205
+ },
4206
+ set actChat(x) {
4207
+ k(r, N(x));
4208
+ },
4209
+ get chats() {
4210
+ return y(i);
4211
+ },
4212
+ set chats(x) {
4213
+ k(i, N(x));
4214
+ }
4215
+ });
4216
+ var m = ee(p, 2), _ = P(m);
4217
+ ys(_, {
4218
+ get show() {
4219
+ return y(n);
4220
+ },
4221
+ set show(x) {
4222
+ k(n, N(x));
4223
+ },
4224
+ get showHistory() {
4225
+ return y(s);
4226
+ },
4227
+ set showHistory(x) {
4228
+ k(s, N(x));
4229
+ },
4230
+ get actChat() {
4231
+ return y(r);
4232
+ },
4233
+ set actChat(x) {
4234
+ k(r, N(x));
4235
+ }
4236
+ });
4237
+ var g = ee(_, 2);
4238
+ bs(g, {
4239
+ get messages() {
4240
+ return y(o);
4241
+ },
4242
+ set messages(x) {
4243
+ k(o, N(x));
4244
+ },
4245
+ get loading() {
4246
+ return y(l);
4247
+ },
4248
+ set loading(x) {
4249
+ k(l, N(x));
4250
+ }
4251
+ });
4252
+ var b = ee(g, 2);
4253
+ ms(b, { sendMessage: a }), F(m), rs(3, m, () => uo, () => ({ y: 50, duration: 500 })), j(h, v);
4254
+ }, d = (h) => {
4255
+ var v = ql();
4256
+ v.__click = [Hl, n], j(h, v);
4257
+ };
4258
+ rt(c, (h) => {
4259
+ y(n) ? h(f) : h(d, !1);
4260
+ });
4261
+ }
4262
+ F(u), j(e, u), we();
4263
+ }
4264
+ ot(["click"]);
4265
+ Ae(xs, {}, [], [], !0);
4266
+ function Gl(e, t) {
4267
+ be(t, !0);
4268
+ let n = J(t, "envId", 23, () => "aks_qua"), s = J(t, "token", 23, () => "1i6FKWFjKAtnYN5YdyoooBGFobGxiWjRIWmltNHFGSGY0R292QVM1M2ZuTXBoSG9iVGtKNEdaeU9HU0RzUWZtZ2ZSeG96YUlMemUvMTVvZFJUZTFuMzRpUElOT1BjK25SanM2RGhVSzE2cnUzTjA2TjdnOWJzbFFxdVh1MEtOQ1VhdUxQZXJ6Z204emZIZFpH");
4269
+ return document.cookie = `envid=${n()}`, document.cookie = `token=${s()}`, xs(e, {}), we({
4270
+ get envId() {
4271
+ return n();
4272
+ },
4273
+ set envId(r = "aks_qua") {
4274
+ n(r), V();
4275
+ },
4276
+ get token() {
4277
+ return s();
4278
+ },
4279
+ set token(r = "1i6FKWFjKAtnYN5YdyoooBGFobGxiWjRIWmltNHFGSGY0R292QVM1M2ZuTXBoSG9iVGtKNEdaeU9HU0RzUWZtZ2ZSeG96YUlMemUvMTVvZFJUZTFuMzRpUElOT1BjK25SanM2RGhVSzE2cnUzTjA2TjdnOWJzbFFxdVh1MEtOQ1VhdUxQZXJ6Z204emZIZFpH") {
4280
+ s(r), V();
4281
+ }
4282
+ });
4283
+ }
4284
+ customElements.define("akb-chat", Ae(
4285
+ Gl,
4286
+ {
4287
+ token: {
4288
+ attribute: "token",
4289
+ reflect: !0,
4290
+ type: "String"
4291
+ },
4292
+ envId: {
4293
+ attribute: "envid",
4294
+ reflect: !0,
4295
+ type: "String"
4296
+ }
4297
+ },
4298
+ [],
4299
+ [],
4300
+ !1
4301
+ ));
4302
+ export {
4303
+ Gl as ChatComponent
4304
+ };