@bot-brewers/chat-widget 1.7.1 → 1.7.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.
- package/dist/assistant-widget.js +885 -884
- package/package.json +1 -1
package/dist/assistant-widget.js
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ha = Object.defineProperty;
|
|
2
|
+
var hr = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var U = (t, e, i) =>
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
function
|
|
5
|
+
var ga = (t, e, i) => e in t ? ha(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
6
|
+
var U = (t, e, i) => ga(t, typeof e != "symbol" ? e + "" : e, i), Is = (t, e, i) => e.has(t) || hr("Cannot " + i);
|
|
7
|
+
var d = (t, e, i) => (Is(t, e, "read from private field"), i ? i.call(t) : e.get(t)), _ = (t, e, i) => e.has(t) ? hr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), w = (t, e, i, s) => (Is(t, e, "write to private field"), s ? s.call(t, i) : e.set(t, i), i), z = (t, e, i) => (Is(t, e, "access private method"), i);
|
|
8
|
+
var Dr = Array.isArray, pa = Array.prototype.indexOf, gs = Array.from, ss = Object.keys, rs = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, Pr = Object.getOwnPropertyDescriptors, va = Object.prototype, ma = Array.prototype, Zs = Object.getPrototypeOf, gr = Object.isExtensible;
|
|
9
|
+
function wa(t) {
|
|
10
10
|
return typeof t == "function";
|
|
11
11
|
}
|
|
12
12
|
const Ti = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function ba(t) {
|
|
15
15
|
return t();
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function $s(t) {
|
|
18
18
|
for (var e = 0; e < t.length; e++)
|
|
19
19
|
t[e]();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ur() {
|
|
22
22
|
var t, e, i = new Promise((s, r) => {
|
|
23
23
|
t = s, e = r;
|
|
24
24
|
});
|
|
25
25
|
return { promise: i, resolve: t, reject: e };
|
|
26
26
|
}
|
|
27
|
-
const Z = 2,
|
|
27
|
+
const Z = 2, Ks = 4, ps = 8, ya = 1 << 24, je = 16, Qe = 32, ct = 64, vs = 128, Ae = 512, Q = 1024, pe = 2048, We = 4096, ge = 8192, Je = 16384, Fi = 32768, Ct = 65536, pr = 1 << 17, Hr = 1 << 18, Mt = 1 << 19, Wr = 1 << 20, rt = 1 << 25, Et = 32768, As = 1 << 21, Js = 1 << 22, nt = 1 << 23, Wt = Symbol("$state"), _a = Symbol("legacy props"), xa = Symbol(""), Rt = new class extends Error {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(...arguments);
|
|
30
30
|
U(this, "name", "StaleReactionError");
|
|
31
31
|
U(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
32
32
|
}
|
|
33
|
-
}(),
|
|
34
|
-
function
|
|
33
|
+
}(), Xs = 3, xi = 8;
|
|
34
|
+
function Vr(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Sa() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Ca(t) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Ea() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Ia(t) {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Ta() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function ka() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ma() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function $a() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Aa() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function La() {
|
|
65
65
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Oa = 1, Na = 2, za = 16, Ra = 2, Da = 4, Pa = 8, Ua = 4, Ha = 1, Wa = 2, jr = "[", ms = "[!", Qs = "]", pi = {}, J = Symbol(), Va = "http://www.w3.org/1999/xhtml";
|
|
68
68
|
function ws(t) {
|
|
69
69
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function ja() {
|
|
72
72
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
73
73
|
}
|
|
74
74
|
let A = !1;
|
|
@@ -106,10 +106,10 @@ function as(t = !0) {
|
|
|
106
106
|
/** @type {Comment} */
|
|
107
107
|
i.data
|
|
108
108
|
);
|
|
109
|
-
if (s ===
|
|
109
|
+
if (s === Qs) {
|
|
110
110
|
if (e === 0) return i;
|
|
111
111
|
e -= 1;
|
|
112
|
-
} else (s ===
|
|
112
|
+
} else (s === jr || s === ms) && (e += 1);
|
|
113
113
|
}
|
|
114
114
|
var r = (
|
|
115
115
|
/** @type {TemplateNode} */
|
|
@@ -118,7 +118,7 @@ function as(t = !0) {
|
|
|
118
118
|
t && i.remove(), i = r;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function qr(t) {
|
|
122
122
|
if (!t || t.nodeType !== xi)
|
|
123
123
|
throw ws(), pi;
|
|
124
124
|
return (
|
|
@@ -126,24 +126,24 @@ function jr(t) {
|
|
|
126
126
|
t.data
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Fr(t) {
|
|
130
130
|
return t === this.v;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function qa(t, e) {
|
|
133
133
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return !
|
|
135
|
+
function Br(t) {
|
|
136
|
+
return !qa(t, this.v);
|
|
137
137
|
}
|
|
138
138
|
let Si = !1;
|
|
139
|
-
function
|
|
139
|
+
function Fa() {
|
|
140
140
|
Si = !0;
|
|
141
141
|
}
|
|
142
142
|
let R = null;
|
|
143
143
|
function vi(t) {
|
|
144
144
|
R = t;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function dt(t, e = !1, i) {
|
|
147
147
|
R = {
|
|
148
148
|
p: R,
|
|
149
149
|
i: !1,
|
|
@@ -162,7 +162,7 @@ function ut(t) {
|
|
|
162
162
|
if (i !== null) {
|
|
163
163
|
e.e = null;
|
|
164
164
|
for (var s of i)
|
|
165
|
-
|
|
165
|
+
pn(s);
|
|
166
166
|
}
|
|
167
167
|
return t !== void 0 && (e.x = t), e.i = !0, R = e.p, t ?? /** @type {T} */
|
|
168
168
|
{};
|
|
@@ -171,24 +171,24 @@ function Bi() {
|
|
|
171
171
|
return !Si || R !== null && R.l === null;
|
|
172
172
|
}
|
|
173
173
|
let gt = [];
|
|
174
|
-
function
|
|
174
|
+
function Yr() {
|
|
175
175
|
var t = gt;
|
|
176
|
-
gt = [],
|
|
176
|
+
gt = [], $s(t);
|
|
177
177
|
}
|
|
178
178
|
function Ci(t) {
|
|
179
179
|
if (gt.length === 0 && !Oi) {
|
|
180
180
|
var e = gt;
|
|
181
181
|
queueMicrotask(() => {
|
|
182
|
-
e === gt &&
|
|
182
|
+
e === gt && Yr();
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
gt.push(t);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Ba() {
|
|
188
188
|
for (; gt.length > 0; )
|
|
189
|
-
|
|
189
|
+
Yr();
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Gr(t) {
|
|
192
192
|
var e = k;
|
|
193
193
|
if (e === null)
|
|
194
194
|
return T.f |= nt, t;
|
|
@@ -214,8 +214,8 @@ function mi(t, e) {
|
|
|
214
214
|
throw t;
|
|
215
215
|
}
|
|
216
216
|
const Ki = /* @__PURE__ */ new Set();
|
|
217
|
-
let C = null, Xi = null, H = null, xe = [], ys = null,
|
|
218
|
-
var qt, Ft, pt, vt, Wi, Bt, Yt, G,
|
|
217
|
+
let C = null, Xi = null, H = null, xe = [], ys = null, Ls = !1, Oi = !1;
|
|
218
|
+
var qt, Ft, pt, vt, Wi, Bt, Yt, G, Os, ki, Ns, Zr, Kr;
|
|
219
219
|
const us = class us {
|
|
220
220
|
constructor() {
|
|
221
221
|
_(this, G);
|
|
@@ -276,7 +276,7 @@ const us = class us {
|
|
|
276
276
|
U(this, "is_fork", !1);
|
|
277
277
|
}
|
|
278
278
|
is_deferred() {
|
|
279
|
-
return this.is_fork ||
|
|
279
|
+
return this.is_fork || d(this, vt) > 0;
|
|
280
280
|
}
|
|
281
281
|
/**
|
|
282
282
|
*
|
|
@@ -292,8 +292,8 @@ const us = class us {
|
|
|
292
292
|
render_effects: []
|
|
293
293
|
};
|
|
294
294
|
for (const r of e)
|
|
295
|
-
z(this, G,
|
|
296
|
-
this.is_fork || z(this, G,
|
|
295
|
+
z(this, G, Os).call(this, r, i);
|
|
296
|
+
this.is_fork || z(this, G, Zr).call(this), this.is_deferred() ? (z(this, G, ki).call(this, i.effects), z(this, G, ki).call(this, i.render_effects)) : (Xi = this, C = null, vr(i.render_effects), vr(i.effects), Xi = null, (s = d(this, Wi)) == null || s.resolve()), H = null;
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
299
|
* Associate a change to a given source with the current
|
|
@@ -312,46 +312,46 @@ const us = class us {
|
|
|
312
312
|
}
|
|
313
313
|
flush() {
|
|
314
314
|
if (this.activate(), xe.length > 0) {
|
|
315
|
-
if (
|
|
315
|
+
if (Jr(), C !== null && C !== this)
|
|
316
316
|
return;
|
|
317
|
-
} else
|
|
317
|
+
} else d(this, pt) === 0 && this.process([]);
|
|
318
318
|
this.deactivate();
|
|
319
319
|
}
|
|
320
320
|
discard() {
|
|
321
|
-
for (const e of
|
|
322
|
-
|
|
321
|
+
for (const e of d(this, Ft)) e(this);
|
|
322
|
+
d(this, Ft).clear();
|
|
323
323
|
}
|
|
324
324
|
/**
|
|
325
325
|
*
|
|
326
326
|
* @param {boolean} blocking
|
|
327
327
|
*/
|
|
328
328
|
increment(e) {
|
|
329
|
-
w(this, pt,
|
|
329
|
+
w(this, pt, d(this, pt) + 1), e && w(this, vt, d(this, vt) + 1);
|
|
330
330
|
}
|
|
331
331
|
/**
|
|
332
332
|
*
|
|
333
333
|
* @param {boolean} blocking
|
|
334
334
|
*/
|
|
335
335
|
decrement(e) {
|
|
336
|
-
w(this, pt,
|
|
336
|
+
w(this, pt, d(this, pt) - 1), e && w(this, vt, d(this, vt) - 1), this.revive();
|
|
337
337
|
}
|
|
338
338
|
revive() {
|
|
339
|
-
for (const e of
|
|
340
|
-
|
|
341
|
-
for (const e of
|
|
339
|
+
for (const e of d(this, Bt))
|
|
340
|
+
d(this, Yt).delete(e), ee(e, pe), It(e);
|
|
341
|
+
for (const e of d(this, Yt))
|
|
342
342
|
ee(e, We), It(e);
|
|
343
343
|
this.flush();
|
|
344
344
|
}
|
|
345
345
|
/** @param {() => void} fn */
|
|
346
346
|
oncommit(e) {
|
|
347
|
-
|
|
347
|
+
d(this, qt).add(e);
|
|
348
348
|
}
|
|
349
349
|
/** @param {(batch: Batch) => void} fn */
|
|
350
350
|
ondiscard(e) {
|
|
351
|
-
|
|
351
|
+
d(this, Ft).add(e);
|
|
352
352
|
}
|
|
353
353
|
settled() {
|
|
354
|
-
return (
|
|
354
|
+
return (d(this, Wi) ?? w(this, Wi, Ur())).promise;
|
|
355
355
|
}
|
|
356
356
|
static ensure() {
|
|
357
357
|
if (C === null) {
|
|
@@ -375,53 +375,53 @@ qt = new WeakMap(), Ft = new WeakMap(), pt = new WeakMap(), vt = new WeakMap(),
|
|
|
375
375
|
* @param {Effect} root
|
|
376
376
|
* @param {EffectTarget} target
|
|
377
377
|
*/
|
|
378
|
-
|
|
378
|
+
Os = function(e, i) {
|
|
379
379
|
var u;
|
|
380
380
|
e.f ^= Q;
|
|
381
381
|
for (var s = e.first; s !== null; ) {
|
|
382
|
-
var r = s.f, n = (r & (Qe |
|
|
382
|
+
var r = s.f, n = (r & (Qe | ct)) !== 0, a = n && (r & Q) !== 0, o = a || (r & ge) !== 0 || this.skipped_effects.has(s);
|
|
383
383
|
if (s.f & vs && ((u = s.b) != null && u.is_pending()) && (i = {
|
|
384
384
|
parent: i,
|
|
385
385
|
effect: s,
|
|
386
386
|
effects: [],
|
|
387
387
|
render_effects: []
|
|
388
388
|
}), !o && s.fn !== null) {
|
|
389
|
-
n ? s.f ^= Q : r &
|
|
389
|
+
n ? s.f ^= Q : r & Ks ? i.effects.push(s) : Gi(s) && (s.f & je && d(this, Bt).add(s), Ui(s));
|
|
390
390
|
var l = s.first;
|
|
391
391
|
if (l !== null) {
|
|
392
392
|
s = l;
|
|
393
393
|
continue;
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
for (s = s.next; s === null &&
|
|
398
|
-
|
|
399
|
-
i.parent), s =
|
|
396
|
+
var c = s.parent;
|
|
397
|
+
for (s = s.next; s === null && c !== null; )
|
|
398
|
+
c === i.effect && (z(this, G, ki).call(this, i.effects), z(this, G, ki).call(this, i.render_effects), i = /** @type {EffectTarget} */
|
|
399
|
+
i.parent), s = c.next, c = c.parent;
|
|
400
400
|
}
|
|
401
401
|
}, /**
|
|
402
402
|
* @param {Effect[]} effects
|
|
403
403
|
*/
|
|
404
404
|
ki = function(e) {
|
|
405
405
|
for (const i of e)
|
|
406
|
-
i.f & pe ?
|
|
406
|
+
i.f & pe ? d(this, Bt).add(i) : i.f & We && d(this, Yt).add(i), z(this, G, Ns).call(this, i.deps), ee(i, Q);
|
|
407
407
|
}, /**
|
|
408
408
|
* @param {Value[] | null} deps
|
|
409
409
|
*/
|
|
410
|
-
|
|
410
|
+
Ns = function(e) {
|
|
411
411
|
if (e !== null)
|
|
412
412
|
for (const i of e)
|
|
413
|
-
!(i.f & Z) || !(i.f & Et) || (i.f ^= Et, z(this, G,
|
|
413
|
+
!(i.f & Z) || !(i.f & Et) || (i.f ^= Et, z(this, G, Ns).call(
|
|
414
414
|
this,
|
|
415
415
|
/** @type {Derived} */
|
|
416
416
|
i.deps
|
|
417
417
|
));
|
|
418
|
-
}, Gr = function() {
|
|
419
|
-
if (c(this, vt) === 0) {
|
|
420
|
-
for (const e of c(this, qt)) e();
|
|
421
|
-
c(this, qt).clear();
|
|
422
|
-
}
|
|
423
|
-
c(this, pt) === 0 && z(this, G, Zr).call(this);
|
|
424
418
|
}, Zr = function() {
|
|
419
|
+
if (d(this, vt) === 0) {
|
|
420
|
+
for (const e of d(this, qt)) e();
|
|
421
|
+
d(this, qt).clear();
|
|
422
|
+
}
|
|
423
|
+
d(this, pt) === 0 && z(this, G, Kr).call(this);
|
|
424
|
+
}, Kr = function() {
|
|
425
425
|
var n;
|
|
426
426
|
if (Ki.size > 1) {
|
|
427
427
|
this.previous.clear();
|
|
@@ -437,27 +437,27 @@ Os = function(e) {
|
|
|
437
437
|
continue;
|
|
438
438
|
}
|
|
439
439
|
const o = [];
|
|
440
|
-
for (const [
|
|
441
|
-
if (a.current.has(
|
|
442
|
-
if (i && u !== a.current.get(
|
|
443
|
-
a.current.set(
|
|
440
|
+
for (const [c, u] of this.current) {
|
|
441
|
+
if (a.current.has(c))
|
|
442
|
+
if (i && u !== a.current.get(c))
|
|
443
|
+
a.current.set(c, u);
|
|
444
444
|
else
|
|
445
445
|
continue;
|
|
446
|
-
o.push(
|
|
446
|
+
o.push(c);
|
|
447
447
|
}
|
|
448
448
|
if (o.length === 0)
|
|
449
449
|
continue;
|
|
450
|
-
const l = [...a.current.keys()].filter((
|
|
450
|
+
const l = [...a.current.keys()].filter((c) => !this.current.has(c));
|
|
451
451
|
if (l.length > 0) {
|
|
452
452
|
var r = xe;
|
|
453
453
|
xe = [];
|
|
454
|
-
const
|
|
454
|
+
const c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
455
455
|
for (const h of o)
|
|
456
|
-
|
|
456
|
+
Xr(h, l, c, u);
|
|
457
457
|
if (xe.length > 0) {
|
|
458
458
|
C = a, a.apply();
|
|
459
459
|
for (const h of xe)
|
|
460
|
-
z(n = a, G,
|
|
460
|
+
z(n = a, G, Os).call(n, h, s);
|
|
461
461
|
a.deactivate();
|
|
462
462
|
}
|
|
463
463
|
xe = r;
|
|
@@ -473,18 +473,18 @@ function lt(t) {
|
|
|
473
473
|
Oi = !0;
|
|
474
474
|
try {
|
|
475
475
|
for (var i; ; ) {
|
|
476
|
-
if (
|
|
476
|
+
if (Ba(), xe.length === 0 && (C == null || C.flush(), xe.length === 0))
|
|
477
477
|
return ys = null, /** @type {T} */
|
|
478
478
|
i;
|
|
479
|
-
|
|
479
|
+
Jr();
|
|
480
480
|
}
|
|
481
481
|
} finally {
|
|
482
482
|
Oi = e;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Jr() {
|
|
486
486
|
var t = xt;
|
|
487
|
-
|
|
487
|
+
Ls = !0;
|
|
488
488
|
var e = null;
|
|
489
489
|
try {
|
|
490
490
|
var i = 0;
|
|
@@ -492,28 +492,28 @@ function Kr() {
|
|
|
492
492
|
var s = Pe.ensure();
|
|
493
493
|
if (i++ > 1e3) {
|
|
494
494
|
var r, n;
|
|
495
|
-
|
|
495
|
+
Ya();
|
|
496
496
|
}
|
|
497
497
|
s.process(xe), at.clear();
|
|
498
498
|
}
|
|
499
499
|
} finally {
|
|
500
|
-
|
|
500
|
+
Ls = !1, ls(t), ys = null;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ya() {
|
|
504
504
|
try {
|
|
505
|
-
|
|
505
|
+
Ta();
|
|
506
506
|
} catch (t) {
|
|
507
507
|
mi(t, ys);
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
let Te = null;
|
|
511
|
-
function
|
|
511
|
+
function vr(t) {
|
|
512
512
|
var e = t.length;
|
|
513
513
|
if (e !== 0) {
|
|
514
514
|
for (var i = 0; i < e; ) {
|
|
515
515
|
var s = t[i++];
|
|
516
|
-
if (!(s.f & (Je | ge)) && Gi(s) && (Te = /* @__PURE__ */ new Set(), Ui(s), s.deps === null && s.first === null && s.nodes === null && (s.teardown === null && s.ac === null ?
|
|
516
|
+
if (!(s.f & (Je | ge)) && Gi(s) && (Te = /* @__PURE__ */ new Set(), Ui(s), s.deps === null && s.first === null && s.nodes === null && (s.teardown === null && s.ac === null ? wn(s) : s.fn = null), (Te == null ? void 0 : Te.size) > 0)) {
|
|
517
517
|
at.clear();
|
|
518
518
|
for (const r of Te) {
|
|
519
519
|
if (r.f & (Je | ge)) continue;
|
|
@@ -532,30 +532,30 @@ function pr(t) {
|
|
|
532
532
|
Te = null;
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Xr(t, e, i, s) {
|
|
536
536
|
if (!i.has(t) && (i.add(t), t.reactions !== null))
|
|
537
537
|
for (const r of t.reactions) {
|
|
538
538
|
const n = r.f;
|
|
539
|
-
n & Z ?
|
|
539
|
+
n & Z ? Xr(
|
|
540
540
|
/** @type {Derived} */
|
|
541
541
|
r,
|
|
542
542
|
e,
|
|
543
543
|
i,
|
|
544
544
|
s
|
|
545
|
-
) : n & (
|
|
545
|
+
) : n & (Js | je) && !(n & pe) && Qr(r, e, s) && (ee(r, pe), It(
|
|
546
546
|
/** @type {Effect} */
|
|
547
547
|
r
|
|
548
548
|
));
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function Qr(t, e, i) {
|
|
552
552
|
const s = i.get(t);
|
|
553
553
|
if (s !== void 0) return s;
|
|
554
554
|
if (t.deps !== null)
|
|
555
555
|
for (const r of t.deps) {
|
|
556
556
|
if (e.includes(r))
|
|
557
557
|
return !0;
|
|
558
|
-
if (r.f & Z &&
|
|
558
|
+
if (r.f & Z && Qr(
|
|
559
559
|
/** @type {Derived} */
|
|
560
560
|
r,
|
|
561
561
|
e,
|
|
@@ -573,16 +573,16 @@ function It(t) {
|
|
|
573
573
|
for (var e = ys = t; e.parent !== null; ) {
|
|
574
574
|
e = e.parent;
|
|
575
575
|
var i = e.f;
|
|
576
|
-
if (
|
|
576
|
+
if (Ls && e === k && i & je && !(i & Hr))
|
|
577
577
|
return;
|
|
578
|
-
if (i & (
|
|
578
|
+
if (i & (ct | Qe)) {
|
|
579
579
|
if (!(i & Q)) return;
|
|
580
580
|
e.f ^= Q;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
583
|
xe.push(e);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function Ga(t) {
|
|
586
586
|
let e = 0, i = Tt(0), s;
|
|
587
587
|
return () => {
|
|
588
588
|
Di() && (m(i), _s(() => (e === 0 && (s = At(() => t(() => Ni(i)))), e += 1, () => {
|
|
@@ -592,12 +592,12 @@ function Ya(t) {
|
|
|
592
592
|
})));
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
|
-
var
|
|
596
|
-
function
|
|
597
|
-
new
|
|
595
|
+
var Za = Ct | Mt | vs;
|
|
596
|
+
function Ka(t, e, i) {
|
|
597
|
+
new Ja(t, e, i);
|
|
598
598
|
}
|
|
599
|
-
var be, ue, Vi, Ne, mt, ze, ye, le, Re, Be, tt, wt, it, bt, st, fs, W,
|
|
600
|
-
class
|
|
599
|
+
var be, ue, Vi, Ne, mt, ze, ye, le, Re, Be, tt, wt, it, bt, st, fs, W, en, tn, zs, Qi, es, Rs;
|
|
600
|
+
class Ja {
|
|
601
601
|
/**
|
|
602
602
|
* @param {TemplateNode} node
|
|
603
603
|
* @param {BoundaryProps} props
|
|
@@ -639,40 +639,40 @@ class Ka {
|
|
|
639
639
|
* @type {Source<number> | null}
|
|
640
640
|
*/
|
|
641
641
|
_(this, st, null);
|
|
642
|
-
_(this, fs,
|
|
642
|
+
_(this, fs, Ga(() => (w(this, st, Tt(d(this, wt))), () => {
|
|
643
643
|
w(this, st, null);
|
|
644
644
|
})));
|
|
645
645
|
w(this, ue, e), w(this, Ne, i), w(this, mt, s), this.parent = /** @type {Effect} */
|
|
646
|
-
k.b, w(this, be, !!
|
|
646
|
+
k.b, w(this, be, !!d(this, Ne).pending), w(this, ze, sr(() => {
|
|
647
647
|
if (k.b = this, A) {
|
|
648
|
-
const n =
|
|
648
|
+
const n = d(this, Vi);
|
|
649
649
|
bs(), /** @type {Comment} */
|
|
650
650
|
n.nodeType === xi && /** @type {Comment} */
|
|
651
|
-
n.data === ms ? z(this, W,
|
|
651
|
+
n.data === ms ? z(this, W, tn).call(this) : z(this, W, en).call(this);
|
|
652
652
|
} else {
|
|
653
|
-
var r = z(this, W,
|
|
653
|
+
var r = z(this, W, zs).call(this);
|
|
654
654
|
try {
|
|
655
655
|
w(this, ye, Se(() => s(r)));
|
|
656
656
|
} catch (n) {
|
|
657
657
|
this.error(n);
|
|
658
658
|
}
|
|
659
|
-
|
|
659
|
+
d(this, it) > 0 ? z(this, W, es).call(this) : w(this, be, !1);
|
|
660
660
|
}
|
|
661
661
|
return () => {
|
|
662
662
|
var n;
|
|
663
|
-
(n =
|
|
663
|
+
(n = d(this, tt)) == null || n.remove();
|
|
664
664
|
};
|
|
665
|
-
},
|
|
665
|
+
}, Za)), A && w(this, ue, E);
|
|
666
666
|
}
|
|
667
667
|
/**
|
|
668
668
|
* Returns `true` if the effect exists inside a boundary whose pending snippet is shown
|
|
669
669
|
* @returns {boolean}
|
|
670
670
|
*/
|
|
671
671
|
is_pending() {
|
|
672
|
-
return
|
|
672
|
+
return d(this, be) || !!this.parent && this.parent.is_pending();
|
|
673
673
|
}
|
|
674
674
|
has_pending_snippet() {
|
|
675
|
-
return !!
|
|
675
|
+
return !!d(this, Ne).pending;
|
|
676
676
|
}
|
|
677
677
|
/**
|
|
678
678
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -681,41 +681,41 @@ class Ka {
|
|
|
681
681
|
* @param {1 | -1} d
|
|
682
682
|
*/
|
|
683
683
|
update_pending_count(e) {
|
|
684
|
-
z(this, W,
|
|
684
|
+
z(this, W, Rs).call(this, e), w(this, wt, d(this, wt) + e), d(this, st) && wi(d(this, st), d(this, wt));
|
|
685
685
|
}
|
|
686
686
|
get_effect_pending() {
|
|
687
|
-
return
|
|
687
|
+
return d(this, fs).call(this), m(
|
|
688
688
|
/** @type {Source<number>} */
|
|
689
|
-
|
|
689
|
+
d(this, st)
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
692
|
/** @param {unknown} error */
|
|
693
693
|
error(e) {
|
|
694
|
-
var i =
|
|
695
|
-
let s =
|
|
696
|
-
if (
|
|
694
|
+
var i = d(this, Ne).onerror;
|
|
695
|
+
let s = d(this, Ne).failed;
|
|
696
|
+
if (d(this, bt) || !i && !s)
|
|
697
697
|
throw e;
|
|
698
|
-
|
|
698
|
+
d(this, ye) && (ne(d(this, ye)), w(this, ye, null)), d(this, le) && (ne(d(this, le)), w(this, le, null)), d(this, Re) && (ne(d(this, Re)), w(this, Re, null)), A && (ve(
|
|
699
699
|
/** @type {TemplateNode} */
|
|
700
|
-
|
|
700
|
+
d(this, Vi)
|
|
701
701
|
), ns(), ve(as()));
|
|
702
702
|
var r = !1, n = !1;
|
|
703
703
|
const a = () => {
|
|
704
704
|
if (r) {
|
|
705
|
-
|
|
705
|
+
ja();
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
|
-
r = !0, n &&
|
|
708
|
+
r = !0, n && La(), Pe.ensure(), w(this, wt, 0), d(this, Re) !== null && _t(d(this, Re), () => {
|
|
709
709
|
w(this, Re, null);
|
|
710
|
-
}), w(this, be, this.has_pending_snippet()), w(this, ye, z(this, W, Qi).call(this, () => (w(this, bt, !1), Se(() =>
|
|
710
|
+
}), w(this, be, this.has_pending_snippet()), w(this, ye, z(this, W, Qi).call(this, () => (w(this, bt, !1), Se(() => d(this, mt).call(this, d(this, ue)))))), d(this, it) > 0 ? z(this, W, es).call(this) : w(this, be, !1);
|
|
711
711
|
};
|
|
712
712
|
var o = T;
|
|
713
713
|
try {
|
|
714
|
-
|
|
714
|
+
ce(null), n = !0, i == null || i(e, a), n = !1;
|
|
715
715
|
} catch (l) {
|
|
716
|
-
mi(l,
|
|
716
|
+
mi(l, d(this, ze) && d(this, ze).parent);
|
|
717
717
|
} finally {
|
|
718
|
-
|
|
718
|
+
ce(o);
|
|
719
719
|
}
|
|
720
720
|
s && Ci(() => {
|
|
721
721
|
w(this, Re, z(this, W, Qi).call(this, () => {
|
|
@@ -723,7 +723,7 @@ class Ka {
|
|
|
723
723
|
try {
|
|
724
724
|
return Se(() => {
|
|
725
725
|
s(
|
|
726
|
-
|
|
726
|
+
d(this, ue),
|
|
727
727
|
() => e,
|
|
728
728
|
() => a
|
|
729
729
|
);
|
|
@@ -732,7 +732,7 @@ class Ka {
|
|
|
732
732
|
return mi(
|
|
733
733
|
l,
|
|
734
734
|
/** @type {Effect} */
|
|
735
|
-
|
|
735
|
+
d(this, ze).parent
|
|
736
736
|
), null;
|
|
737
737
|
} finally {
|
|
738
738
|
w(this, bt, !1);
|
|
@@ -741,67 +741,67 @@ class Ka {
|
|
|
741
741
|
});
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
be = new WeakMap(), ue = new WeakMap(), Vi = new WeakMap(), Ne = new WeakMap(), mt = new WeakMap(), ze = new WeakMap(), ye = new WeakMap(), le = new WeakMap(), Re = new WeakMap(), Be = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), st = new WeakMap(), fs = new WeakMap(), W = new WeakSet(),
|
|
744
|
+
be = new WeakMap(), ue = new WeakMap(), Vi = new WeakMap(), Ne = new WeakMap(), mt = new WeakMap(), ze = new WeakMap(), ye = new WeakMap(), le = new WeakMap(), Re = new WeakMap(), Be = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), st = new WeakMap(), fs = new WeakMap(), W = new WeakSet(), en = function() {
|
|
745
745
|
try {
|
|
746
|
-
w(this, ye, Se(() =>
|
|
746
|
+
w(this, ye, Se(() => d(this, mt).call(this, d(this, ue))));
|
|
747
747
|
} catch (e) {
|
|
748
748
|
this.error(e);
|
|
749
749
|
}
|
|
750
750
|
w(this, be, !1);
|
|
751
|
-
},
|
|
752
|
-
const e =
|
|
753
|
-
e && (w(this, le, Se(() => e(
|
|
754
|
-
var i = z(this, W,
|
|
755
|
-
w(this, ye, z(this, W, Qi).call(this, () => (Pe.ensure(), Se(() =>
|
|
751
|
+
}, tn = function() {
|
|
752
|
+
const e = d(this, Ne).pending;
|
|
753
|
+
e && (w(this, le, Se(() => e(d(this, ue)))), Pe.enqueue(() => {
|
|
754
|
+
var i = z(this, W, zs).call(this);
|
|
755
|
+
w(this, ye, z(this, W, Qi).call(this, () => (Pe.ensure(), Se(() => d(this, mt).call(this, i))))), d(this, it) > 0 ? z(this, W, es).call(this) : (_t(
|
|
756
756
|
/** @type {Effect} */
|
|
757
|
-
|
|
757
|
+
d(this, le),
|
|
758
758
|
() => {
|
|
759
759
|
w(this, le, null);
|
|
760
760
|
}
|
|
761
761
|
), w(this, be, !1));
|
|
762
762
|
}));
|
|
763
|
-
},
|
|
764
|
-
var e =
|
|
765
|
-
return
|
|
763
|
+
}, zs = function() {
|
|
764
|
+
var e = d(this, ue);
|
|
765
|
+
return d(this, be) && (w(this, tt, Le()), d(this, ue).before(d(this, tt)), e = d(this, tt)), e;
|
|
766
766
|
}, /**
|
|
767
767
|
* @param {() => Effect | null} fn
|
|
768
768
|
*/
|
|
769
769
|
Qi = function(e) {
|
|
770
770
|
var i = k, s = T, r = R;
|
|
771
|
-
Ve(
|
|
771
|
+
Ve(d(this, ze)), ce(d(this, ze)), vi(d(this, ze).ctx);
|
|
772
772
|
try {
|
|
773
773
|
return e();
|
|
774
774
|
} catch (n) {
|
|
775
|
-
return
|
|
775
|
+
return Gr(n), null;
|
|
776
776
|
} finally {
|
|
777
|
-
Ve(i),
|
|
777
|
+
Ve(i), ce(s), vi(r);
|
|
778
778
|
}
|
|
779
779
|
}, es = function() {
|
|
780
780
|
const e = (
|
|
781
781
|
/** @type {(anchor: Node) => void} */
|
|
782
|
-
|
|
782
|
+
d(this, Ne).pending
|
|
783
783
|
);
|
|
784
|
-
|
|
784
|
+
d(this, ye) !== null && (w(this, Be, document.createDocumentFragment()), d(this, Be).append(
|
|
785
785
|
/** @type {TemplateNode} */
|
|
786
|
-
|
|
787
|
-
),
|
|
786
|
+
d(this, tt)
|
|
787
|
+
), _n(d(this, ye), d(this, Be))), d(this, le) === null && w(this, le, Se(() => e(d(this, ue))));
|
|
788
788
|
}, /**
|
|
789
789
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
790
790
|
* if any, such that we can replace the snippet with content once work is done
|
|
791
791
|
* @param {1 | -1} d
|
|
792
792
|
*/
|
|
793
|
-
|
|
793
|
+
Rs = function(e) {
|
|
794
794
|
var i;
|
|
795
795
|
if (!this.has_pending_snippet()) {
|
|
796
|
-
this.parent && z(i = this.parent, W,
|
|
796
|
+
this.parent && z(i = this.parent, W, Rs).call(i, e);
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
|
-
w(this, it,
|
|
799
|
+
w(this, it, d(this, it) + e), d(this, it) === 0 && (w(this, be, !1), d(this, le) && _t(d(this, le), () => {
|
|
800
800
|
w(this, le, null);
|
|
801
|
-
}),
|
|
801
|
+
}), d(this, Be) && (d(this, ue).before(d(this, Be)), w(this, Be, null)));
|
|
802
802
|
};
|
|
803
|
-
function
|
|
804
|
-
const r = Bi() ? Yi :
|
|
803
|
+
function Xa(t, e, i, s) {
|
|
804
|
+
const r = Bi() ? Yi : sn;
|
|
805
805
|
if (i.length === 0 && t.length === 0) {
|
|
806
806
|
s(e.map(r));
|
|
807
807
|
return;
|
|
@@ -809,18 +809,18 @@ function Ja(t, e, i, s) {
|
|
|
809
809
|
var n = C, a = (
|
|
810
810
|
/** @type {Effect} */
|
|
811
811
|
k
|
|
812
|
-
), o =
|
|
812
|
+
), o = Qa();
|
|
813
813
|
function l() {
|
|
814
|
-
Promise.all(i.map((
|
|
814
|
+
Promise.all(i.map((c) => /* @__PURE__ */ eo(c))).then((c) => {
|
|
815
815
|
o();
|
|
816
816
|
try {
|
|
817
|
-
s([...e.map(r), ...
|
|
817
|
+
s([...e.map(r), ...c]);
|
|
818
818
|
} catch (u) {
|
|
819
819
|
a.f & Je || mi(u, a);
|
|
820
820
|
}
|
|
821
821
|
n == null || n.deactivate(), os();
|
|
822
|
-
}).catch((
|
|
823
|
-
mi(
|
|
822
|
+
}).catch((c) => {
|
|
823
|
+
mi(c, a);
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
826
|
t.length > 0 ? Promise.all(t).then(() => {
|
|
@@ -832,14 +832,14 @@ function Ja(t, e, i, s) {
|
|
|
832
832
|
}
|
|
833
833
|
}) : l();
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function Qa() {
|
|
836
836
|
var t = k, e = T, i = R, s = C;
|
|
837
837
|
return function(n = !0) {
|
|
838
|
-
Ve(t),
|
|
838
|
+
Ve(t), ce(e), vi(i), n && (s == null || s.activate());
|
|
839
839
|
};
|
|
840
840
|
}
|
|
841
841
|
function os() {
|
|
842
|
-
Ve(null),
|
|
842
|
+
Ve(null), ce(null), vi(null);
|
|
843
843
|
}
|
|
844
844
|
// @__NO_SIDE_EFFECTS__
|
|
845
845
|
function Yi(t) {
|
|
@@ -851,7 +851,7 @@ function Yi(t) {
|
|
|
851
851
|
ctx: R,
|
|
852
852
|
deps: null,
|
|
853
853
|
effects: null,
|
|
854
|
-
equals:
|
|
854
|
+
equals: Fr,
|
|
855
855
|
f: e,
|
|
856
856
|
fn: t,
|
|
857
857
|
reactions: null,
|
|
@@ -866,12 +866,12 @@ function Yi(t) {
|
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
868
|
// @__NO_SIDE_EFFECTS__
|
|
869
|
-
function
|
|
869
|
+
function eo(t, e) {
|
|
870
870
|
let i = (
|
|
871
871
|
/** @type {Effect | null} */
|
|
872
872
|
k
|
|
873
873
|
);
|
|
874
|
-
i === null &&
|
|
874
|
+
i === null && Sa();
|
|
875
875
|
var s = (
|
|
876
876
|
/** @type {Boundary} */
|
|
877
877
|
i.b
|
|
@@ -883,62 +883,62 @@ function Qa(t, e) {
|
|
|
883
883
|
/** @type {V} */
|
|
884
884
|
J
|
|
885
885
|
), a = !T, o = /* @__PURE__ */ new Map();
|
|
886
|
-
return
|
|
886
|
+
return uo(() => {
|
|
887
887
|
var v;
|
|
888
|
-
var l =
|
|
888
|
+
var l = Ur();
|
|
889
889
|
r = l.promise;
|
|
890
890
|
try {
|
|
891
891
|
Promise.resolve(t()).then(l.resolve, l.reject).then(() => {
|
|
892
|
-
|
|
892
|
+
c === C && c.committed && c.deactivate(), os();
|
|
893
893
|
});
|
|
894
894
|
} catch (p) {
|
|
895
895
|
l.reject(p), os();
|
|
896
896
|
}
|
|
897
|
-
var
|
|
897
|
+
var c = (
|
|
898
898
|
/** @type {Batch} */
|
|
899
899
|
C
|
|
900
900
|
);
|
|
901
901
|
if (a) {
|
|
902
902
|
var u = !s.is_pending();
|
|
903
|
-
s.update_pending_count(1),
|
|
903
|
+
s.update_pending_count(1), c.increment(u), (v = o.get(c)) == null || v.reject(Rt), o.delete(c), o.set(c, l);
|
|
904
904
|
}
|
|
905
905
|
const h = (p, f = void 0) => {
|
|
906
|
-
if (
|
|
906
|
+
if (c.activate(), f)
|
|
907
907
|
f !== Rt && (n.f |= nt, wi(n, f));
|
|
908
908
|
else {
|
|
909
909
|
n.f & nt && (n.f ^= nt), wi(n, p);
|
|
910
910
|
for (const [g, y] of o) {
|
|
911
|
-
if (o.delete(g), g ===
|
|
911
|
+
if (o.delete(g), g === c) break;
|
|
912
912
|
y.reject(Rt);
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
a && (s.update_pending_count(-1),
|
|
915
|
+
a && (s.update_pending_count(-1), c.decrement(u));
|
|
916
916
|
};
|
|
917
917
|
l.promise.then(h, (p) => h(null, p || "unknown"));
|
|
918
|
-
}),
|
|
918
|
+
}), gn(() => {
|
|
919
919
|
for (const l of o.values())
|
|
920
920
|
l.reject(Rt);
|
|
921
921
|
}), new Promise((l) => {
|
|
922
|
-
function
|
|
922
|
+
function c(u) {
|
|
923
923
|
function h() {
|
|
924
|
-
u === r ? l(n) :
|
|
924
|
+
u === r ? l(n) : c(r);
|
|
925
925
|
}
|
|
926
926
|
u.then(h, h);
|
|
927
927
|
}
|
|
928
|
-
|
|
928
|
+
c(r);
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
931
|
// @__NO_SIDE_EFFECTS__
|
|
932
932
|
function Ke(t) {
|
|
933
933
|
const e = /* @__PURE__ */ Yi(t);
|
|
934
|
-
return
|
|
934
|
+
return xn(e), e;
|
|
935
935
|
}
|
|
936
936
|
// @__NO_SIDE_EFFECTS__
|
|
937
|
-
function
|
|
937
|
+
function sn(t) {
|
|
938
938
|
const e = /* @__PURE__ */ Yi(t);
|
|
939
|
-
return e.equals =
|
|
939
|
+
return e.equals = Br, e;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function rn(t) {
|
|
942
942
|
var e = t.effects;
|
|
943
943
|
if (e !== null) {
|
|
944
944
|
t.effects = null;
|
|
@@ -949,7 +949,7 @@ function sn(t) {
|
|
|
949
949
|
);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function to(t) {
|
|
953
953
|
for (var e = t.parent; e !== null; ) {
|
|
954
954
|
if (!(e.f & Z))
|
|
955
955
|
return e.f & Je ? null : (
|
|
@@ -960,19 +960,19 @@ function eo(t) {
|
|
|
960
960
|
}
|
|
961
961
|
return null;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function er(t) {
|
|
964
964
|
var e, i = k;
|
|
965
|
-
Ve(
|
|
965
|
+
Ve(to(t));
|
|
966
966
|
try {
|
|
967
|
-
t.f &= ~Et,
|
|
967
|
+
t.f &= ~Et, rn(t), e = In(t);
|
|
968
968
|
} finally {
|
|
969
969
|
Ve(i);
|
|
970
970
|
}
|
|
971
971
|
return e;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
974
|
-
var e =
|
|
975
|
-
if (t.equals(e) || (C != null && C.is_fork || (t.v = e), t.wv =
|
|
973
|
+
function nn(t) {
|
|
974
|
+
var e = er(t);
|
|
975
|
+
if (t.equals(e) || (C != null && C.is_fork || (t.v = e), t.wv = Cn()), !$t)
|
|
976
976
|
if (H !== null)
|
|
977
977
|
(Di() || C != null && C.is_fork) && H.set(t, e);
|
|
978
978
|
else {
|
|
@@ -980,16 +980,16 @@ function rn(t) {
|
|
|
980
980
|
ee(t, i);
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
|
-
let
|
|
983
|
+
let Ds = /* @__PURE__ */ new Set();
|
|
984
984
|
const at = /* @__PURE__ */ new Map();
|
|
985
|
-
let
|
|
985
|
+
let an = !1;
|
|
986
986
|
function Tt(t, e) {
|
|
987
987
|
var i = {
|
|
988
988
|
f: 0,
|
|
989
989
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
990
990
|
v: t,
|
|
991
991
|
reactions: null,
|
|
992
|
-
equals:
|
|
992
|
+
equals: Fr,
|
|
993
993
|
rv: 0,
|
|
994
994
|
wv: 0
|
|
995
995
|
};
|
|
@@ -998,18 +998,18 @@ function Tt(t, e) {
|
|
|
998
998
|
// @__NO_SIDE_EFFECTS__
|
|
999
999
|
function M(t, e) {
|
|
1000
1000
|
const i = Tt(t);
|
|
1001
|
-
return
|
|
1001
|
+
return xn(i), i;
|
|
1002
1002
|
}
|
|
1003
1003
|
// @__NO_SIDE_EFFECTS__
|
|
1004
|
-
function
|
|
1004
|
+
function on(t, e = !1, i = !0) {
|
|
1005
1005
|
var r;
|
|
1006
1006
|
const s = Tt(t);
|
|
1007
|
-
return e || (s.equals =
|
|
1007
|
+
return e || (s.equals = Br), Si && i && R !== null && R.l !== null && ((r = R.l).s ?? (r.s = [])).push(s), s;
|
|
1008
1008
|
}
|
|
1009
1009
|
function I(t, e, i = !1) {
|
|
1010
1010
|
T !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1011
1011
|
// to ensure we error if state is set inside an inspect effect
|
|
1012
|
-
(!Ue || T.f &
|
|
1012
|
+
(!Ue || T.f & pr) && Bi() && T.f & (Z | je | Js | pr) && !(ae != null && ae.includes(t)) && Aa();
|
|
1013
1013
|
let s = i ? F(e) : e;
|
|
1014
1014
|
return wi(t, s);
|
|
1015
1015
|
}
|
|
@@ -1018,30 +1018,30 @@ function wi(t, e) {
|
|
|
1018
1018
|
var i = t.v;
|
|
1019
1019
|
$t ? at.set(t, e) : at.set(t, i), t.v = e;
|
|
1020
1020
|
var s = Pe.ensure();
|
|
1021
|
-
s.capture(t, i), t.f & Z && (t.f & pe &&
|
|
1021
|
+
s.capture(t, i), t.f & Z && (t.f & pe && er(
|
|
1022
1022
|
/** @type {Derived} */
|
|
1023
1023
|
t
|
|
1024
|
-
), ee(t, t.f & Ae ? Q : We)), t.wv =
|
|
1024
|
+
), ee(t, t.f & Ae ? Q : We)), t.wv = Cn(), ln(t, pe), Bi() && k !== null && k.f & Q && !(k.f & (Qe | ct)) && (we === null ? go([t]) : we.push(t)), !s.is_fork && Ds.size > 0 && !an && io();
|
|
1025
1025
|
}
|
|
1026
1026
|
return e;
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1029
|
-
|
|
1028
|
+
function io() {
|
|
1029
|
+
an = !1;
|
|
1030
1030
|
var t = xt;
|
|
1031
1031
|
ls(!0);
|
|
1032
|
-
const e = Array.from(
|
|
1032
|
+
const e = Array.from(Ds);
|
|
1033
1033
|
try {
|
|
1034
1034
|
for (const i of e)
|
|
1035
1035
|
i.f & Q && ee(i, We), Gi(i) && Ui(i);
|
|
1036
1036
|
} finally {
|
|
1037
1037
|
ls(t);
|
|
1038
1038
|
}
|
|
1039
|
-
|
|
1039
|
+
Ds.clear();
|
|
1040
1040
|
}
|
|
1041
1041
|
function Ni(t) {
|
|
1042
1042
|
I(t, t.v + 1);
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function ln(t, e) {
|
|
1045
1045
|
var i = t.reactions;
|
|
1046
1046
|
if (i !== null)
|
|
1047
1047
|
for (var s = Bi(), r = i.length, n = 0; n < r; n++) {
|
|
@@ -1049,11 +1049,11 @@ function on(t, e) {
|
|
|
1049
1049
|
if (!(!s && a === k)) {
|
|
1050
1050
|
var l = (o & pe) === 0;
|
|
1051
1051
|
if (l && ee(a, e), o & Z) {
|
|
1052
|
-
var
|
|
1052
|
+
var c = (
|
|
1053
1053
|
/** @type {Derived} */
|
|
1054
1054
|
a
|
|
1055
1055
|
);
|
|
1056
|
-
H == null || H.delete(
|
|
1056
|
+
H == null || H.delete(c), o & Et || (o & Ae && (a.f |= Et), ln(c, We));
|
|
1057
1057
|
} else l && (o & je && Te !== null && Te.add(
|
|
1058
1058
|
/** @type {Effect} */
|
|
1059
1059
|
a
|
|
@@ -1067,16 +1067,16 @@ function on(t, e) {
|
|
|
1067
1067
|
function F(t) {
|
|
1068
1068
|
if (typeof t != "object" || t === null || Wt in t)
|
|
1069
1069
|
return t;
|
|
1070
|
-
const e =
|
|
1071
|
-
if (e !==
|
|
1070
|
+
const e = Zs(t);
|
|
1071
|
+
if (e !== va && e !== ma)
|
|
1072
1072
|
return t;
|
|
1073
|
-
var i = /* @__PURE__ */ new Map(), s =
|
|
1073
|
+
var i = /* @__PURE__ */ new Map(), s = Dr(t), r = /* @__PURE__ */ M(0), n = St, a = (o) => {
|
|
1074
1074
|
if (St === n)
|
|
1075
1075
|
return o();
|
|
1076
|
-
var l = T,
|
|
1077
|
-
|
|
1076
|
+
var l = T, c = St;
|
|
1077
|
+
ce(null), yr(n);
|
|
1078
1078
|
var u = o();
|
|
1079
|
-
return
|
|
1079
|
+
return ce(l), yr(c), u;
|
|
1080
1080
|
};
|
|
1081
1081
|
return s && i.set("length", /* @__PURE__ */ M(
|
|
1082
1082
|
/** @type {any[]} */
|
|
@@ -1085,26 +1085,26 @@ function F(t) {
|
|
|
1085
1085
|
/** @type {any} */
|
|
1086
1086
|
t,
|
|
1087
1087
|
{
|
|
1088
|
-
defineProperty(o, l,
|
|
1089
|
-
(!("value" in
|
|
1088
|
+
defineProperty(o, l, c) {
|
|
1089
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Ma();
|
|
1090
1090
|
var u = i.get(l);
|
|
1091
1091
|
return u === void 0 ? u = a(() => {
|
|
1092
|
-
var h = /* @__PURE__ */ M(
|
|
1092
|
+
var h = /* @__PURE__ */ M(c.value);
|
|
1093
1093
|
return i.set(l, h), h;
|
|
1094
|
-
}) : I(u,
|
|
1094
|
+
}) : I(u, c.value, !0), !0;
|
|
1095
1095
|
},
|
|
1096
1096
|
deleteProperty(o, l) {
|
|
1097
|
-
var
|
|
1098
|
-
if (
|
|
1097
|
+
var c = i.get(l);
|
|
1098
|
+
if (c === void 0) {
|
|
1099
1099
|
if (l in o) {
|
|
1100
1100
|
const u = a(() => /* @__PURE__ */ M(J));
|
|
1101
1101
|
i.set(l, u), Ni(r);
|
|
1102
1102
|
}
|
|
1103
1103
|
} else
|
|
1104
|
-
I(
|
|
1104
|
+
I(c, J), Ni(r);
|
|
1105
1105
|
return !0;
|
|
1106
1106
|
},
|
|
1107
|
-
get(o, l,
|
|
1107
|
+
get(o, l, c) {
|
|
1108
1108
|
var p;
|
|
1109
1109
|
if (l === Wt)
|
|
1110
1110
|
return t;
|
|
@@ -1116,14 +1116,14 @@ function F(t) {
|
|
|
1116
1116
|
var v = m(u);
|
|
1117
1117
|
return v === J ? void 0 : v;
|
|
1118
1118
|
}
|
|
1119
|
-
return Reflect.get(o, l,
|
|
1119
|
+
return Reflect.get(o, l, c);
|
|
1120
1120
|
},
|
|
1121
1121
|
getOwnPropertyDescriptor(o, l) {
|
|
1122
|
-
var
|
|
1123
|
-
if (
|
|
1122
|
+
var c = Reflect.getOwnPropertyDescriptor(o, l);
|
|
1123
|
+
if (c && "value" in c) {
|
|
1124
1124
|
var u = i.get(l);
|
|
1125
|
-
u && (
|
|
1126
|
-
} else if (
|
|
1125
|
+
u && (c.value = m(u));
|
|
1126
|
+
} else if (c === void 0) {
|
|
1127
1127
|
var h = i.get(l), v = h == null ? void 0 : h.v;
|
|
1128
1128
|
if (h !== void 0 && v !== J)
|
|
1129
1129
|
return {
|
|
@@ -1133,42 +1133,42 @@ function F(t) {
|
|
|
1133
1133
|
writable: !0
|
|
1134
1134
|
};
|
|
1135
1135
|
}
|
|
1136
|
-
return
|
|
1136
|
+
return c;
|
|
1137
1137
|
},
|
|
1138
1138
|
has(o, l) {
|
|
1139
1139
|
var v;
|
|
1140
1140
|
if (l === Wt)
|
|
1141
1141
|
return !0;
|
|
1142
|
-
var
|
|
1143
|
-
if (
|
|
1144
|
-
|
|
1142
|
+
var c = i.get(l), u = c !== void 0 && c.v !== J || Reflect.has(o, l);
|
|
1143
|
+
if (c !== void 0 || k !== null && (!u || (v = Ht(o, l)) != null && v.writable)) {
|
|
1144
|
+
c === void 0 && (c = a(() => {
|
|
1145
1145
|
var p = u ? F(o[l]) : J, f = /* @__PURE__ */ M(p);
|
|
1146
1146
|
return f;
|
|
1147
|
-
}), i.set(l,
|
|
1148
|
-
var h = m(
|
|
1147
|
+
}), i.set(l, c));
|
|
1148
|
+
var h = m(c);
|
|
1149
1149
|
if (h === J)
|
|
1150
1150
|
return !1;
|
|
1151
1151
|
}
|
|
1152
1152
|
return u;
|
|
1153
1153
|
},
|
|
1154
|
-
set(o, l,
|
|
1154
|
+
set(o, l, c, u) {
|
|
1155
1155
|
var q;
|
|
1156
1156
|
var h = i.get(l), v = l in o;
|
|
1157
1157
|
if (s && l === "length")
|
|
1158
|
-
for (var p =
|
|
1158
|
+
for (var p = c; p < /** @type {Source<number>} */
|
|
1159
1159
|
h.v; p += 1) {
|
|
1160
1160
|
var f = i.get(p + "");
|
|
1161
1161
|
f !== void 0 ? I(f, J) : p in o && (f = a(() => /* @__PURE__ */ M(J)), i.set(p + "", f));
|
|
1162
1162
|
}
|
|
1163
1163
|
if (h === void 0)
|
|
1164
|
-
(!v || (q = Ht(o, l)) != null && q.writable) && (h = a(() => /* @__PURE__ */ M(void 0)), I(h, F(
|
|
1164
|
+
(!v || (q = Ht(o, l)) != null && q.writable) && (h = a(() => /* @__PURE__ */ M(void 0)), I(h, F(c)), i.set(l, h));
|
|
1165
1165
|
else {
|
|
1166
1166
|
v = h.v !== J;
|
|
1167
|
-
var g = a(() => F(
|
|
1167
|
+
var g = a(() => F(c));
|
|
1168
1168
|
I(h, g);
|
|
1169
1169
|
}
|
|
1170
1170
|
var y = Reflect.getOwnPropertyDescriptor(o, l);
|
|
1171
|
-
if (y != null && y.set && y.set.call(u,
|
|
1171
|
+
if (y != null && y.set && y.set.call(u, c), !v) {
|
|
1172
1172
|
if (s && typeof l == "string") {
|
|
1173
1173
|
var x = (
|
|
1174
1174
|
/** @type {Source<number>} */
|
|
@@ -1186,22 +1186,22 @@ function F(t) {
|
|
|
1186
1186
|
var v = i.get(h);
|
|
1187
1187
|
return v === void 0 || v.v !== J;
|
|
1188
1188
|
});
|
|
1189
|
-
for (var [
|
|
1190
|
-
u.v !== J && !(
|
|
1189
|
+
for (var [c, u] of i)
|
|
1190
|
+
u.v !== J && !(c in o) && l.push(c);
|
|
1191
1191
|
return l;
|
|
1192
1192
|
},
|
|
1193
1193
|
setPrototypeOf() {
|
|
1194
|
-
|
|
1194
|
+
$a();
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
);
|
|
1198
1198
|
}
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1201
|
-
if (
|
|
1202
|
-
|
|
1199
|
+
var mr, cn, dn, un;
|
|
1200
|
+
function Ps() {
|
|
1201
|
+
if (mr === void 0) {
|
|
1202
|
+
mr = window, cn = /Firefox/.test(navigator.userAgent);
|
|
1203
1203
|
var t = Element.prototype, e = Node.prototype, i = Text.prototype;
|
|
1204
|
-
dn = Ht(e, "firstChild").get,
|
|
1204
|
+
dn = Ht(e, "firstChild").get, un = Ht(e, "nextSibling").get, gr(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), gr(i) && (i.__t = void 0);
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
1207
|
function Le(t = "") {
|
|
@@ -1218,7 +1218,7 @@ function Xe(t) {
|
|
|
1218
1218
|
function qe(t) {
|
|
1219
1219
|
return (
|
|
1220
1220
|
/** @type {TemplateNode | null} */
|
|
1221
|
-
|
|
1221
|
+
un.call(t)
|
|
1222
1222
|
);
|
|
1223
1223
|
}
|
|
1224
1224
|
function Y(t, e) {
|
|
@@ -1227,7 +1227,7 @@ function Y(t, e) {
|
|
|
1227
1227
|
var i = /* @__PURE__ */ Xe(E);
|
|
1228
1228
|
if (i === null)
|
|
1229
1229
|
i = E.appendChild(Le());
|
|
1230
|
-
else if (e && i.nodeType !==
|
|
1230
|
+
else if (e && i.nodeType !== Xs) {
|
|
1231
1231
|
var s = Le();
|
|
1232
1232
|
return i == null || i.before(s), ve(s), s;
|
|
1233
1233
|
}
|
|
@@ -1238,7 +1238,7 @@ function ts(t, e = !1) {
|
|
|
1238
1238
|
var i = /* @__PURE__ */ Xe(t);
|
|
1239
1239
|
return i instanceof Comment && i.data === "" ? /* @__PURE__ */ qe(i) : i;
|
|
1240
1240
|
}
|
|
1241
|
-
if (e && (E == null ? void 0 : E.nodeType) !==
|
|
1241
|
+
if (e && (E == null ? void 0 : E.nodeType) !== Xs) {
|
|
1242
1242
|
var s = Le();
|
|
1243
1243
|
return E == null || E.before(s), ve(s), s;
|
|
1244
1244
|
}
|
|
@@ -1251,24 +1251,24 @@ function se(t, e = 1, i = !1) {
|
|
|
1251
1251
|
/* @__PURE__ */ qe(s);
|
|
1252
1252
|
if (!A)
|
|
1253
1253
|
return s;
|
|
1254
|
-
if (i && (s == null ? void 0 : s.nodeType) !==
|
|
1254
|
+
if (i && (s == null ? void 0 : s.nodeType) !== Xs) {
|
|
1255
1255
|
var n = Le();
|
|
1256
1256
|
return s === null ? r == null || r.after(n) : s.before(n), ve(n), n;
|
|
1257
1257
|
}
|
|
1258
1258
|
return ve(s), s;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function tr(t) {
|
|
1261
1261
|
t.textContent = "";
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function fn() {
|
|
1264
1264
|
return !1;
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1267
|
-
A && /* @__PURE__ */ Xe(t) !== null &&
|
|
1266
|
+
function so(t) {
|
|
1267
|
+
A && /* @__PURE__ */ Xe(t) !== null && tr(t);
|
|
1268
1268
|
}
|
|
1269
|
-
let
|
|
1270
|
-
function
|
|
1271
|
-
|
|
1269
|
+
let wr = !1;
|
|
1270
|
+
function ro() {
|
|
1271
|
+
wr || (wr = !0, document.addEventListener(
|
|
1272
1272
|
"reset",
|
|
1273
1273
|
(t) => {
|
|
1274
1274
|
Promise.resolve().then(() => {
|
|
@@ -1288,24 +1288,24 @@ function so() {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
function Ei(t) {
|
|
1290
1290
|
var e = T, i = k;
|
|
1291
|
-
|
|
1291
|
+
ce(null), Ve(null);
|
|
1292
1292
|
try {
|
|
1293
1293
|
return t();
|
|
1294
1294
|
} finally {
|
|
1295
|
-
|
|
1295
|
+
ce(e), Ve(i);
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function no(t, e, i, s = i) {
|
|
1299
1299
|
t.addEventListener(e, () => Ei(i));
|
|
1300
1300
|
const r = t.__on_r;
|
|
1301
1301
|
r ? t.__on_r = () => {
|
|
1302
1302
|
r(), s(!0);
|
|
1303
|
-
} : t.__on_r = () => s(!0),
|
|
1303
|
+
} : t.__on_r = () => s(!0), ro();
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
k === null && (T === null &&
|
|
1305
|
+
function hn(t) {
|
|
1306
|
+
k === null && (T === null && Ia(), Ea()), $t && Ca();
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function ao(t, e) {
|
|
1309
1309
|
var i = e.last;
|
|
1310
1310
|
i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
|
|
1311
1311
|
}
|
|
@@ -1337,7 +1337,7 @@ function Oe(t, e, i) {
|
|
|
1337
1337
|
else e !== null && It(r);
|
|
1338
1338
|
var n = r;
|
|
1339
1339
|
if (i && n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && // either `null`, or a singular child
|
|
1340
|
-
!(n.f & Mt) && (n = n.first, t & je && t & Ct && n !== null && (n.f |= Ct)), n !== null && (n.parent = s, s !== null &&
|
|
1340
|
+
!(n.f & Mt) && (n = n.first, t & je && t & Ct && n !== null && (n.f |= Ct)), n !== null && (n.parent = s, s !== null && ao(n, s), T !== null && T.f & Z && !(t & ct))) {
|
|
1341
1341
|
var a = (
|
|
1342
1342
|
/** @type {Derived} */
|
|
1343
1343
|
T
|
|
@@ -1349,12 +1349,12 @@ function Oe(t, e, i) {
|
|
|
1349
1349
|
function Di() {
|
|
1350
1350
|
return T !== null && !Ue;
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1352
|
+
function gn(t) {
|
|
1353
1353
|
const e = Oe(ps, null, !1);
|
|
1354
1354
|
return ee(e, Q), e.teardown = t, e;
|
|
1355
1355
|
}
|
|
1356
1356
|
function Vt(t) {
|
|
1357
|
-
|
|
1357
|
+
hn();
|
|
1358
1358
|
var e = (
|
|
1359
1359
|
/** @type {Effect} */
|
|
1360
1360
|
k.f
|
|
@@ -1366,64 +1366,64 @@ function Vt(t) {
|
|
|
1366
1366
|
);
|
|
1367
1367
|
(s.e ?? (s.e = [])).push(t);
|
|
1368
1368
|
} else
|
|
1369
|
-
return
|
|
1369
|
+
return pn(t);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1372
|
-
return Oe(
|
|
1373
|
-
}
|
|
1374
|
-
function ao(t) {
|
|
1375
|
-
return fn(), Oe(ps | Hr, t, !0);
|
|
1371
|
+
function pn(t) {
|
|
1372
|
+
return Oe(Ks | Wr, t, !1);
|
|
1376
1373
|
}
|
|
1377
1374
|
function oo(t) {
|
|
1375
|
+
return hn(), Oe(ps | Wr, t, !0);
|
|
1376
|
+
}
|
|
1377
|
+
function lo(t) {
|
|
1378
1378
|
Pe.ensure();
|
|
1379
|
-
const e = Oe(
|
|
1379
|
+
const e = Oe(ct | Mt, t, !0);
|
|
1380
1380
|
return () => {
|
|
1381
1381
|
ne(e);
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function co(t) {
|
|
1385
1385
|
Pe.ensure();
|
|
1386
|
-
const e = Oe(
|
|
1386
|
+
const e = Oe(ct | Mt, t, !0);
|
|
1387
1387
|
return (i = {}) => new Promise((s) => {
|
|
1388
1388
|
i.outro ? _t(e, () => {
|
|
1389
1389
|
ne(e), s(void 0);
|
|
1390
1390
|
}) : (ne(e), s(void 0));
|
|
1391
1391
|
});
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1394
|
-
return Oe(
|
|
1393
|
+
function ir(t) {
|
|
1394
|
+
return Oe(Ks, t, !1);
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return Oe(
|
|
1396
|
+
function uo(t) {
|
|
1397
|
+
return Oe(Js | Mt, t, !0);
|
|
1398
1398
|
}
|
|
1399
1399
|
function _s(t, e = 0) {
|
|
1400
1400
|
return Oe(ps | e, t, !0);
|
|
1401
1401
|
}
|
|
1402
1402
|
function kt(t, e = [], i = [], s = []) {
|
|
1403
|
-
|
|
1403
|
+
Xa(s, e, i, (r) => {
|
|
1404
1404
|
Oe(ps, () => t(...r.map(m)), !0);
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function sr(t, e = 0) {
|
|
1408
1408
|
var i = Oe(je | e, t, !0);
|
|
1409
1409
|
return i;
|
|
1410
1410
|
}
|
|
1411
1411
|
function Se(t) {
|
|
1412
1412
|
return Oe(Qe | Mt, t, !0);
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1414
|
+
function vn(t) {
|
|
1415
1415
|
var e = t.teardown;
|
|
1416
1416
|
if (e !== null) {
|
|
1417
1417
|
const i = $t, s = T;
|
|
1418
|
-
|
|
1418
|
+
br(!0), ce(null);
|
|
1419
1419
|
try {
|
|
1420
1420
|
e.call(null);
|
|
1421
1421
|
} finally {
|
|
1422
|
-
|
|
1422
|
+
br(i), ce(s);
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function mn(t, e = !1) {
|
|
1427
1427
|
var i = t.first;
|
|
1428
1428
|
for (t.first = t.last = null; i !== null; ) {
|
|
1429
1429
|
const r = i.ac;
|
|
@@ -1431,10 +1431,10 @@ function vn(t, e = !1) {
|
|
|
1431
1431
|
r.abort(Rt);
|
|
1432
1432
|
});
|
|
1433
1433
|
var s = i.next;
|
|
1434
|
-
i.f &
|
|
1434
|
+
i.f & ct ? i.parent = null : ne(i, e), i = s;
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function fo(t) {
|
|
1438
1438
|
for (var e = t.first; e !== null; ) {
|
|
1439
1439
|
var i = e.next;
|
|
1440
1440
|
e.f & Qe || ne(e), e = i;
|
|
@@ -1442,32 +1442,32 @@ function uo(t) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
function ne(t, e = !0) {
|
|
1444
1444
|
var i = !1;
|
|
1445
|
-
(e || t.f &
|
|
1445
|
+
(e || t.f & Hr) && t.nodes !== null && t.nodes.end !== null && (ho(
|
|
1446
1446
|
t.nodes.start,
|
|
1447
1447
|
/** @type {TemplateNode} */
|
|
1448
1448
|
t.nodes.end
|
|
1449
|
-
), i = !0),
|
|
1449
|
+
), i = !0), mn(t, e && !i), cs(t, 0), ee(t, Je);
|
|
1450
1450
|
var s = t.nodes && t.nodes.t;
|
|
1451
1451
|
if (s !== null)
|
|
1452
1452
|
for (const n of s)
|
|
1453
1453
|
n.stop();
|
|
1454
|
-
|
|
1454
|
+
vn(t);
|
|
1455
1455
|
var r = t.parent;
|
|
1456
|
-
r !== null && r.first !== null &&
|
|
1456
|
+
r !== null && r.first !== null && wn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function ho(t, e) {
|
|
1459
1459
|
for (; t !== null; ) {
|
|
1460
1460
|
var i = t === e ? null : /* @__PURE__ */ qe(t);
|
|
1461
1461
|
t.remove(), t = i;
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function wn(t) {
|
|
1465
1465
|
var e = t.parent, i = t.prev, s = t.next;
|
|
1466
1466
|
i !== null && (i.next = s), s !== null && (s.prev = i), e !== null && (e.first === t && (e.first = s), e.last === t && (e.last = i));
|
|
1467
1467
|
}
|
|
1468
1468
|
function _t(t, e, i = !0) {
|
|
1469
1469
|
var s = [];
|
|
1470
|
-
|
|
1470
|
+
bn(t, s, !0);
|
|
1471
1471
|
var r = () => {
|
|
1472
1472
|
i && ne(t), e && e();
|
|
1473
1473
|
}, n = s.length;
|
|
@@ -1478,7 +1478,7 @@ function _t(t, e, i = !0) {
|
|
|
1478
1478
|
} else
|
|
1479
1479
|
r();
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function bn(t, e, i) {
|
|
1482
1482
|
if (!(t.f & ge)) {
|
|
1483
1483
|
t.f ^= ge;
|
|
1484
1484
|
var s = t.nodes && t.nodes.t;
|
|
@@ -1490,19 +1490,19 @@ function wn(t, e, i) {
|
|
|
1490
1490
|
// it means the parent block effect was pruned. In that case,
|
|
1491
1491
|
// transparency information was transferred to the branch effect.
|
|
1492
1492
|
(r.f & Qe) !== 0 && (t.f & je) !== 0;
|
|
1493
|
-
|
|
1493
|
+
bn(r, e, a ? i : !1), r = n;
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
|
|
1497
|
+
function rr(t) {
|
|
1498
|
+
yn(t, !0);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function yn(t, e) {
|
|
1501
1501
|
if (t.f & ge) {
|
|
1502
1502
|
t.f ^= ge, t.f & Q || (ee(t, pe), It(t));
|
|
1503
1503
|
for (var i = t.first; i !== null; ) {
|
|
1504
1504
|
var s = i.next, r = (i.f & Ct) !== 0 || (i.f & Qe) !== 0;
|
|
1505
|
-
|
|
1505
|
+
yn(i, r ? e : !1), i = s;
|
|
1506
1506
|
}
|
|
1507
1507
|
var n = t.nodes && t.nodes.t;
|
|
1508
1508
|
if (n !== null)
|
|
@@ -1510,7 +1510,7 @@ function bn(t, e) {
|
|
|
1510
1510
|
(a.is_global || e) && a.in();
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function _n(t, e) {
|
|
1514
1514
|
if (t.nodes)
|
|
1515
1515
|
for (var i = t.nodes.start, s = t.nodes.end; i !== null; ) {
|
|
1516
1516
|
var r = i === s ? null : /* @__PURE__ */ qe(i);
|
|
@@ -1522,11 +1522,11 @@ function ls(t) {
|
|
|
1522
1522
|
xt = t;
|
|
1523
1523
|
}
|
|
1524
1524
|
let $t = !1;
|
|
1525
|
-
function
|
|
1525
|
+
function br(t) {
|
|
1526
1526
|
$t = t;
|
|
1527
1527
|
}
|
|
1528
1528
|
let T = null, Ue = !1;
|
|
1529
|
-
function
|
|
1529
|
+
function ce(t) {
|
|
1530
1530
|
T = t;
|
|
1531
1531
|
}
|
|
1532
1532
|
let k = null;
|
|
@@ -1534,19 +1534,19 @@ function Ve(t) {
|
|
|
1534
1534
|
k = t;
|
|
1535
1535
|
}
|
|
1536
1536
|
let ae = null;
|
|
1537
|
-
function
|
|
1537
|
+
function xn(t) {
|
|
1538
1538
|
T !== null && (ae === null ? ae = [t] : ae.push(t));
|
|
1539
1539
|
}
|
|
1540
|
-
let ie = null,
|
|
1541
|
-
function
|
|
1540
|
+
let ie = null, de = 0, we = null;
|
|
1541
|
+
function go(t) {
|
|
1542
1542
|
we = t;
|
|
1543
1543
|
}
|
|
1544
|
-
let
|
|
1545
|
-
function
|
|
1544
|
+
let Sn = 1, Pi = 0, St = Pi;
|
|
1545
|
+
function yr(t) {
|
|
1546
1546
|
St = t;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1549
|
-
return ++
|
|
1548
|
+
function Cn() {
|
|
1549
|
+
return ++Sn;
|
|
1550
1550
|
}
|
|
1551
1551
|
function Gi(t) {
|
|
1552
1552
|
var e = t.f;
|
|
@@ -1560,7 +1560,7 @@ function Gi(t) {
|
|
|
1560
1560
|
if (Gi(
|
|
1561
1561
|
/** @type {Derived} */
|
|
1562
1562
|
n
|
|
1563
|
-
) &&
|
|
1563
|
+
) && nn(
|
|
1564
1564
|
/** @type {Derived} */
|
|
1565
1565
|
n
|
|
1566
1566
|
), n.wv > t.wv)
|
|
@@ -1572,12 +1572,12 @@ function Gi(t) {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
return !1;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function En(t, e, i = !0) {
|
|
1576
1576
|
var s = t.reactions;
|
|
1577
1577
|
if (s !== null && !(ae != null && ae.includes(t)))
|
|
1578
1578
|
for (var r = 0; r < s.length; r++) {
|
|
1579
1579
|
var n = s[r];
|
|
1580
|
-
n.f & Z ?
|
|
1580
|
+
n.f & Z ? En(
|
|
1581
1581
|
/** @type {Derived} */
|
|
1582
1582
|
n,
|
|
1583
1583
|
e,
|
|
@@ -1588,34 +1588,34 @@ function Cn(t, e, i = !0) {
|
|
|
1588
1588
|
));
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function In(t) {
|
|
1592
1592
|
var f;
|
|
1593
|
-
var e = ie, i =
|
|
1593
|
+
var e = ie, i = de, s = we, r = T, n = ae, a = R, o = Ue, l = St, c = t.f;
|
|
1594
1594
|
ie = /** @type {null | Value[]} */
|
|
1595
|
-
null,
|
|
1595
|
+
null, de = 0, we = null, T = c & (Qe | ct) ? null : t, ae = null, vi(t.ctx), Ue = !1, St = ++Pi, t.ac !== null && (Ei(() => {
|
|
1596
1596
|
t.ac.abort(Rt);
|
|
1597
1597
|
}), t.ac = null);
|
|
1598
1598
|
try {
|
|
1599
|
-
t.f |=
|
|
1599
|
+
t.f |= As;
|
|
1600
1600
|
var u = (
|
|
1601
1601
|
/** @type {Function} */
|
|
1602
1602
|
t.fn
|
|
1603
1603
|
), h = u(), v = t.deps;
|
|
1604
1604
|
if (ie !== null) {
|
|
1605
1605
|
var p;
|
|
1606
|
-
if (
|
|
1607
|
-
for (v.length =
|
|
1608
|
-
v[
|
|
1606
|
+
if (cs(t, de), v !== null && de > 0)
|
|
1607
|
+
for (v.length = de + ie.length, p = 0; p < ie.length; p++)
|
|
1608
|
+
v[de + p] = ie[p];
|
|
1609
1609
|
else
|
|
1610
1610
|
t.deps = v = ie;
|
|
1611
1611
|
if (Di() && t.f & Ae)
|
|
1612
|
-
for (p =
|
|
1612
|
+
for (p = de; p < v.length; p++)
|
|
1613
1613
|
((f = v[p]).reactions ?? (f.reactions = [])).push(t);
|
|
1614
|
-
} else v !== null &&
|
|
1614
|
+
} else v !== null && de < v.length && (cs(t, de), v.length = de);
|
|
1615
1615
|
if (Bi() && we !== null && !Ue && v !== null && !(t.f & (Z | We | pe)))
|
|
1616
1616
|
for (p = 0; p < /** @type {Source[]} */
|
|
1617
1617
|
we.length; p++)
|
|
1618
|
-
|
|
1618
|
+
En(
|
|
1619
1619
|
we[p],
|
|
1620
1620
|
/** @type {Effect} */
|
|
1621
1621
|
t
|
|
@@ -1623,15 +1623,15 @@ function En(t) {
|
|
|
1623
1623
|
return r !== null && r !== t && (Pi++, we !== null && (s === null ? s = we : s.push(.../** @type {Source[]} */
|
|
1624
1624
|
we))), t.f & nt && (t.f ^= nt), h;
|
|
1625
1625
|
} catch (g) {
|
|
1626
|
-
return
|
|
1626
|
+
return Gr(g);
|
|
1627
1627
|
} finally {
|
|
1628
|
-
t.f ^=
|
|
1628
|
+
t.f ^= As, ie = e, de = i, we = s, T = r, ae = n, vi(a), Ue = o, St = l;
|
|
1629
1629
|
}
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function po(t, e) {
|
|
1632
1632
|
let i = e.reactions;
|
|
1633
1633
|
if (i !== null) {
|
|
1634
|
-
var s =
|
|
1634
|
+
var s = pa.call(i, t);
|
|
1635
1635
|
if (s !== -1) {
|
|
1636
1636
|
var r = i.length - 1;
|
|
1637
1637
|
r === 0 ? i = e.reactions = null : (i[s] = i[r], i.pop());
|
|
@@ -1640,20 +1640,20 @@ function go(t, e) {
|
|
|
1640
1640
|
i === null && e.f & Z && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1641
1641
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1642
1642
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1643
|
-
(ie === null || !ie.includes(e)) && (ee(e, We), e.f & Ae && (e.f ^= Ae, e.f &= ~Et),
|
|
1643
|
+
(ie === null || !ie.includes(e)) && (ee(e, We), e.f & Ae && (e.f ^= Ae, e.f &= ~Et), rn(
|
|
1644
1644
|
/** @type {Derived} **/
|
|
1645
1645
|
e
|
|
1646
|
-
),
|
|
1646
|
+
), cs(
|
|
1647
1647
|
/** @type {Derived} **/
|
|
1648
1648
|
e,
|
|
1649
1649
|
0
|
|
1650
1650
|
));
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1652
|
+
function cs(t, e) {
|
|
1653
1653
|
var i = t.deps;
|
|
1654
1654
|
if (i !== null)
|
|
1655
1655
|
for (var s = e; s < i.length; s++)
|
|
1656
|
-
|
|
1656
|
+
po(t, i[s]);
|
|
1657
1657
|
}
|
|
1658
1658
|
function Ui(t) {
|
|
1659
1659
|
var e = t.f;
|
|
@@ -1662,16 +1662,16 @@ function Ui(t) {
|
|
|
1662
1662
|
var i = k, s = xt;
|
|
1663
1663
|
k = t, xt = !0;
|
|
1664
1664
|
try {
|
|
1665
|
-
e & (je |
|
|
1666
|
-
var r =
|
|
1667
|
-
t.teardown = typeof r == "function" ? r : null, t.wv =
|
|
1665
|
+
e & (je | ya) ? fo(t) : mn(t), vn(t);
|
|
1666
|
+
var r = In(t);
|
|
1667
|
+
t.teardown = typeof r == "function" ? r : null, t.wv = Sn;
|
|
1668
1668
|
var n;
|
|
1669
1669
|
} finally {
|
|
1670
1670
|
xt = s, k = i;
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
|
-
async function
|
|
1674
|
+
async function Tn() {
|
|
1675
1675
|
await Promise.resolve(), lt();
|
|
1676
1676
|
}
|
|
1677
1677
|
function m(t) {
|
|
@@ -1680,8 +1680,8 @@ function m(t) {
|
|
|
1680
1680
|
var s = k !== null && (k.f & Je) !== 0;
|
|
1681
1681
|
if (!s && !(ae != null && ae.includes(t))) {
|
|
1682
1682
|
var r = T.deps;
|
|
1683
|
-
if (T.f &
|
|
1684
|
-
t.rv < Pi && (t.rv = Pi, ie === null && r !== null && r[
|
|
1683
|
+
if (T.f & As)
|
|
1684
|
+
t.rv < Pi && (t.rv = Pi, ie === null && r !== null && r[de] === t ? de++ : ie === null ? ie = [t] : ie.includes(t) || ie.push(t));
|
|
1685
1685
|
else {
|
|
1686
1686
|
(T.deps ?? (T.deps = [])).push(t);
|
|
1687
1687
|
var n = t.reactions;
|
|
@@ -1697,31 +1697,31 @@ function m(t) {
|
|
|
1697
1697
|
/** @type {Derived} */
|
|
1698
1698
|
t
|
|
1699
1699
|
), o = a.v;
|
|
1700
|
-
return (!(a.f & Q) && a.reactions !== null ||
|
|
1700
|
+
return (!(a.f & Q) && a.reactions !== null || Mn(a)) && (o = er(a)), at.set(a, o), o;
|
|
1701
1701
|
}
|
|
1702
1702
|
} else i && (!(H != null && H.has(t)) || C != null && C.is_fork && !Di()) && (a = /** @type {Derived} */
|
|
1703
|
-
t, Gi(a) &&
|
|
1703
|
+
t, Gi(a) && nn(a), xt && Di() && !(a.f & Ae) && kn(a));
|
|
1704
1704
|
if (H != null && H.has(t))
|
|
1705
1705
|
return H.get(t);
|
|
1706
1706
|
if (t.f & nt)
|
|
1707
1707
|
throw t.v;
|
|
1708
1708
|
return t.v;
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function kn(t) {
|
|
1711
1711
|
if (t.deps !== null) {
|
|
1712
1712
|
t.f ^= Ae;
|
|
1713
1713
|
for (const e of t.deps)
|
|
1714
|
-
(e.reactions ?? (e.reactions = [])).push(t), e.f & Z && !(e.f & Ae) &&
|
|
1714
|
+
(e.reactions ?? (e.reactions = [])).push(t), e.f & Z && !(e.f & Ae) && kn(
|
|
1715
1715
|
/** @type {Derived} */
|
|
1716
1716
|
e
|
|
1717
1717
|
);
|
|
1718
1718
|
}
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function Mn(t) {
|
|
1721
1721
|
if (t.v === J) return !0;
|
|
1722
1722
|
if (t.deps === null) return !1;
|
|
1723
1723
|
for (const e of t.deps)
|
|
1724
|
-
if (at.has(e) || e.f & Z &&
|
|
1724
|
+
if (at.has(e) || e.f & Z && Mn(
|
|
1725
1725
|
/** @type {Derived} */
|
|
1726
1726
|
e
|
|
1727
1727
|
))
|
|
@@ -1736,33 +1736,33 @@ function At(t) {
|
|
|
1736
1736
|
Ue = e;
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
|
-
const
|
|
1739
|
+
const vo = -7169;
|
|
1740
1740
|
function ee(t, e) {
|
|
1741
|
-
t.f = t.f &
|
|
1741
|
+
t.f = t.f & vo | e;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function mo(t) {
|
|
1744
1744
|
if (!(typeof t != "object" || !t || t instanceof EventTarget)) {
|
|
1745
1745
|
if (Wt in t)
|
|
1746
|
-
|
|
1746
|
+
Us(t);
|
|
1747
1747
|
else if (!Array.isArray(t))
|
|
1748
1748
|
for (let e in t) {
|
|
1749
1749
|
const i = t[e];
|
|
1750
|
-
typeof i == "object" && i && Wt in i &&
|
|
1750
|
+
typeof i == "object" && i && Wt in i && Us(i);
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function Us(t, e = /* @__PURE__ */ new Set()) {
|
|
1755
1755
|
if (typeof t == "object" && t !== null && // We don't want to traverse DOM elements
|
|
1756
1756
|
!(t instanceof EventTarget) && !e.has(t)) {
|
|
1757
1757
|
e.add(t), t instanceof Date && t.getTime();
|
|
1758
1758
|
for (let s in t)
|
|
1759
1759
|
try {
|
|
1760
|
-
|
|
1760
|
+
Us(t[s], e);
|
|
1761
1761
|
} catch {
|
|
1762
1762
|
}
|
|
1763
|
-
const i =
|
|
1763
|
+
const i = Zs(t);
|
|
1764
1764
|
if (i !== Object.prototype && i !== Array.prototype && i !== Map.prototype && i !== Set.prototype && i !== Date.prototype) {
|
|
1765
|
-
const s =
|
|
1765
|
+
const s = Pr(i);
|
|
1766
1766
|
for (let r in s) {
|
|
1767
1767
|
const n = s[r].get;
|
|
1768
1768
|
if (n)
|
|
@@ -1774,12 +1774,12 @@ function Ps(t, e = /* @__PURE__ */ new Set()) {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
|
-
const
|
|
1778
|
-
function
|
|
1779
|
-
return
|
|
1777
|
+
const wo = ["touchstart", "touchmove"];
|
|
1778
|
+
function bo(t) {
|
|
1779
|
+
return wo.includes(t);
|
|
1780
1780
|
}
|
|
1781
|
-
const
|
|
1782
|
-
function
|
|
1781
|
+
const $n = /* @__PURE__ */ new Set(), Hs = /* @__PURE__ */ new Set();
|
|
1782
|
+
function yo(t, e, i, s = {}) {
|
|
1783
1783
|
function r(n) {
|
|
1784
1784
|
if (s.capture || Mi.call(e, n), !n.cancelBubble)
|
|
1785
1785
|
return Ei(() => i == null ? void 0 : i.call(this, n));
|
|
@@ -1788,22 +1788,22 @@ function bo(t, e, i, s = {}) {
|
|
|
1788
1788
|
e.addEventListener(t, r, s);
|
|
1789
1789
|
}) : e.addEventListener(t, r, s), r;
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1792
|
-
var n = { capture: s, passive: r }, a =
|
|
1791
|
+
function _o(t, e, i, s, r) {
|
|
1792
|
+
var n = { capture: s, passive: r }, a = yo(t, e, i, n);
|
|
1793
1793
|
(e === document.body || // @ts-ignore
|
|
1794
1794
|
e === window || // @ts-ignore
|
|
1795
1795
|
e === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
|
|
1796
|
-
e instanceof HTMLMediaElement) &&
|
|
1796
|
+
e instanceof HTMLMediaElement) && gn(() => {
|
|
1797
1797
|
e.removeEventListener(t, a, n);
|
|
1798
1798
|
});
|
|
1799
1799
|
}
|
|
1800
1800
|
function xs(t) {
|
|
1801
1801
|
for (var e = 0; e < t.length; e++)
|
|
1802
|
-
|
|
1803
|
-
for (var i of
|
|
1802
|
+
$n.add(t[e]);
|
|
1803
|
+
for (var i of Hs)
|
|
1804
1804
|
i(t);
|
|
1805
1805
|
}
|
|
1806
|
-
let
|
|
1806
|
+
let _r = null;
|
|
1807
1807
|
function Mi(t) {
|
|
1808
1808
|
var y;
|
|
1809
1809
|
var e = this, i = (
|
|
@@ -1813,8 +1813,8 @@ function Mi(t) {
|
|
|
1813
1813
|
/** @type {null | Element} */
|
|
1814
1814
|
r[0] || t.target
|
|
1815
1815
|
);
|
|
1816
|
-
|
|
1817
|
-
var a = 0, o =
|
|
1816
|
+
_r = t;
|
|
1817
|
+
var a = 0, o = _r === t && t.__root;
|
|
1818
1818
|
if (o) {
|
|
1819
1819
|
var l = r.indexOf(o);
|
|
1820
1820
|
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
@@ -1822,10 +1822,10 @@ function Mi(t) {
|
|
|
1822
1822
|
t.__root = e;
|
|
1823
1823
|
return;
|
|
1824
1824
|
}
|
|
1825
|
-
var
|
|
1826
|
-
if (
|
|
1825
|
+
var c = r.indexOf(e);
|
|
1826
|
+
if (c === -1)
|
|
1827
1827
|
return;
|
|
1828
|
-
l <=
|
|
1828
|
+
l <= c && (a = l);
|
|
1829
1829
|
}
|
|
1830
1830
|
if (n = /** @type {Element} */
|
|
1831
1831
|
r[a] || t.target, n !== e) {
|
|
@@ -1836,7 +1836,7 @@ function Mi(t) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
});
|
|
1838
1838
|
var u = T, h = k;
|
|
1839
|
-
|
|
1839
|
+
ce(null), Ve(null);
|
|
1840
1840
|
try {
|
|
1841
1841
|
for (var v, p = []; n !== null; ) {
|
|
1842
1842
|
var f = n.assignedSlot || n.parentNode || /** @type {any} */
|
|
@@ -1862,11 +1862,11 @@ function Mi(t) {
|
|
|
1862
1862
|
throw v;
|
|
1863
1863
|
}
|
|
1864
1864
|
} finally {
|
|
1865
|
-
t.__root = e, delete t.currentTarget,
|
|
1865
|
+
t.__root = e, delete t.currentTarget, ce(u), Ve(h);
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1869
|
+
function An(t) {
|
|
1870
1870
|
var e = document.createElement("template");
|
|
1871
1871
|
return e.innerHTML = t.replaceAll("<!>", "<!---->"), e.content;
|
|
1872
1872
|
}
|
|
@@ -1879,15 +1879,15 @@ function ot(t, e) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
// @__NO_SIDE_EFFECTS__
|
|
1881
1881
|
function V(t, e) {
|
|
1882
|
-
var i = (e &
|
|
1882
|
+
var i = (e & Ha) !== 0, s = (e & Wa) !== 0, r, n = !t.startsWith("<!>");
|
|
1883
1883
|
return () => {
|
|
1884
1884
|
if (A)
|
|
1885
1885
|
return ot(E, null), E;
|
|
1886
|
-
r === void 0 && (r =
|
|
1886
|
+
r === void 0 && (r = An(n ? t : "<!>" + t), i || (r = /** @type {TemplateNode} */
|
|
1887
1887
|
/* @__PURE__ */ Xe(r)));
|
|
1888
1888
|
var a = (
|
|
1889
1889
|
/** @type {TemplateNode} */
|
|
1890
|
-
s ||
|
|
1890
|
+
s || cn ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1891
1891
|
);
|
|
1892
1892
|
if (i) {
|
|
1893
1893
|
var o = (
|
|
@@ -1904,7 +1904,7 @@ function V(t, e) {
|
|
|
1904
1904
|
};
|
|
1905
1905
|
}
|
|
1906
1906
|
// @__NO_SIDE_EFFECTS__
|
|
1907
|
-
function
|
|
1907
|
+
function xo(t, e, i = "svg") {
|
|
1908
1908
|
var s = !t.startsWith("<!>"), r = `<${i}>${s ? t : "<!>" + t}</${i}>`, n;
|
|
1909
1909
|
return () => {
|
|
1910
1910
|
if (A)
|
|
@@ -1912,7 +1912,7 @@ function _o(t, e, i = "svg") {
|
|
|
1912
1912
|
if (!n) {
|
|
1913
1913
|
var a = (
|
|
1914
1914
|
/** @type {DocumentFragment} */
|
|
1915
|
-
|
|
1915
|
+
An(r)
|
|
1916
1916
|
), o = (
|
|
1917
1917
|
/** @type {Element} */
|
|
1918
1918
|
/* @__PURE__ */ Xe(a)
|
|
@@ -1928,10 +1928,10 @@ function _o(t, e, i = "svg") {
|
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
1930
|
// @__NO_SIDE_EFFECTS__
|
|
1931
|
-
function
|
|
1932
|
-
return /* @__PURE__ */
|
|
1931
|
+
function Ln(t, e) {
|
|
1932
|
+
return /* @__PURE__ */ xo(t, e, "svg");
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1934
|
+
function So() {
|
|
1935
1935
|
if (A)
|
|
1936
1936
|
return ot(E, null), E;
|
|
1937
1937
|
var t = document.createDocumentFragment(), e = document.createComment(""), i = Le();
|
|
@@ -1951,20 +1951,20 @@ function N(t, e) {
|
|
|
1951
1951
|
e
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
|
-
let
|
|
1955
|
-
function
|
|
1954
|
+
let Ws = !0;
|
|
1955
|
+
function ds(t, e) {
|
|
1956
1956
|
var i = e == null ? "" : typeof e == "object" ? e + "" : e;
|
|
1957
1957
|
i !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = i, t.nodeValue = i + "");
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1960
|
-
return
|
|
1959
|
+
function nr(t, e) {
|
|
1960
|
+
return On(t, e);
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1963
|
-
|
|
1962
|
+
function Co(t, e) {
|
|
1963
|
+
Ps(), e.intro = e.intro ?? !1;
|
|
1964
1964
|
const i = e.target, s = A, r = E;
|
|
1965
1965
|
try {
|
|
1966
1966
|
for (var n = /* @__PURE__ */ Xe(i); n && (n.nodeType !== xi || /** @type {Comment} */
|
|
1967
|
-
n.data !==
|
|
1967
|
+
n.data !== jr); )
|
|
1968
1968
|
n = /* @__PURE__ */ qe(n);
|
|
1969
1969
|
if (!n)
|
|
1970
1970
|
throw pi;
|
|
@@ -1972,37 +1972,37 @@ function So(t, e) {
|
|
|
1972
1972
|
/** @type {Comment} */
|
|
1973
1973
|
n
|
|
1974
1974
|
);
|
|
1975
|
-
const a =
|
|
1975
|
+
const a = On(t, { ...e, anchor: n });
|
|
1976
1976
|
return Ze(!1), /** @type {Exports} */
|
|
1977
1977
|
a;
|
|
1978
1978
|
} catch (a) {
|
|
1979
1979
|
if (a instanceof Error && a.message.split(`
|
|
1980
1980
|
`).some((o) => o.startsWith("https://svelte.dev/e/")))
|
|
1981
1981
|
throw a;
|
|
1982
|
-
return a !== pi && console.warn("Failed to hydrate: ", a), e.recover === !1 &&
|
|
1982
|
+
return a !== pi && console.warn("Failed to hydrate: ", a), e.recover === !1 && ka(), Ps(), tr(i), Ze(!1), nr(t, e);
|
|
1983
1983
|
} finally {
|
|
1984
1984
|
Ze(s), ve(r);
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
const zt = /* @__PURE__ */ new Map();
|
|
1988
|
-
function
|
|
1989
|
-
|
|
1988
|
+
function On(t, { target: e, anchor: i, props: s = {}, events: r, context: n, intro: a = !0 }) {
|
|
1989
|
+
Ps();
|
|
1990
1990
|
var o = /* @__PURE__ */ new Set(), l = (h) => {
|
|
1991
1991
|
for (var v = 0; v < h.length; v++) {
|
|
1992
1992
|
var p = h[v];
|
|
1993
1993
|
if (!o.has(p)) {
|
|
1994
1994
|
o.add(p);
|
|
1995
|
-
var f =
|
|
1995
|
+
var f = bo(p);
|
|
1996
1996
|
e.addEventListener(p, Mi, { passive: f });
|
|
1997
1997
|
var g = zt.get(p);
|
|
1998
1998
|
g === void 0 ? (document.addEventListener(p, Mi, { passive: f }), zt.set(p, 1)) : zt.set(p, g + 1);
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
2001
2001
|
};
|
|
2002
|
-
l(gs(
|
|
2003
|
-
var
|
|
2002
|
+
l(gs($n)), Hs.add(l);
|
|
2003
|
+
var c = void 0, u = co(() => {
|
|
2004
2004
|
var h = i ?? e.appendChild(Le());
|
|
2005
|
-
return
|
|
2005
|
+
return Ka(
|
|
2006
2006
|
/** @type {TemplateNode} */
|
|
2007
2007
|
h,
|
|
2008
2008
|
{
|
|
@@ -2011,7 +2011,7 @@ function Ln(t, { target: e, anchor: i, props: s = {}, events: r, context: n, int
|
|
|
2011
2011
|
},
|
|
2012
2012
|
(v) => {
|
|
2013
2013
|
if (n) {
|
|
2014
|
-
|
|
2014
|
+
dt({});
|
|
2015
2015
|
var p = (
|
|
2016
2016
|
/** @type {ComponentContext} */
|
|
2017
2017
|
R
|
|
@@ -2022,8 +2022,8 @@ function Ln(t, { target: e, anchor: i, props: s = {}, events: r, context: n, int
|
|
|
2022
2022
|
/** @type {TemplateNode} */
|
|
2023
2023
|
v,
|
|
2024
2024
|
null
|
|
2025
|
-
),
|
|
2026
|
-
E.data !==
|
|
2025
|
+
), Ws = a, c = t(v, s) || {}, Ws = !0, A && (k.nodes.end = E, E === null || E.nodeType !== xi || /** @type {Comment} */
|
|
2026
|
+
E.data !== Qs))
|
|
2027
2027
|
throw ws(), pi;
|
|
2028
2028
|
n && ut();
|
|
2029
2029
|
}
|
|
@@ -2037,18 +2037,18 @@ function Ln(t, { target: e, anchor: i, props: s = {}, events: r, context: n, int
|
|
|
2037
2037
|
);
|
|
2038
2038
|
--p === 0 ? (document.removeEventListener(v, Mi), zt.delete(v)) : zt.set(v, p);
|
|
2039
2039
|
}
|
|
2040
|
-
|
|
2040
|
+
Hs.delete(l), h !== i && ((f = h.parentNode) == null || f.removeChild(h));
|
|
2041
2041
|
};
|
|
2042
2042
|
});
|
|
2043
|
-
return
|
|
2043
|
+
return Vs.set(c, u), c;
|
|
2044
2044
|
}
|
|
2045
|
-
let
|
|
2046
|
-
function
|
|
2047
|
-
const i =
|
|
2048
|
-
return i ? (
|
|
2045
|
+
let Vs = /* @__PURE__ */ new WeakMap();
|
|
2046
|
+
function js(t, e) {
|
|
2047
|
+
const i = Vs.get(t);
|
|
2048
|
+
return i ? (Vs.delete(t), i(e)) : Promise.resolve();
|
|
2049
2049
|
}
|
|
2050
2050
|
var Me, De, fe, yt, ji, qi, hs;
|
|
2051
|
-
class
|
|
2051
|
+
class Eo {
|
|
2052
2052
|
/**
|
|
2053
2053
|
* @param {TemplateNode} anchor
|
|
2054
2054
|
* @param {boolean} transition
|
|
@@ -2094,34 +2094,34 @@ class Co {
|
|
|
2094
2094
|
/** @type {Batch} */
|
|
2095
2095
|
C
|
|
2096
2096
|
);
|
|
2097
|
-
if (
|
|
2097
|
+
if (d(this, Me).has(e)) {
|
|
2098
2098
|
var i = (
|
|
2099
2099
|
/** @type {Key} */
|
|
2100
|
-
|
|
2101
|
-
), s =
|
|
2100
|
+
d(this, Me).get(e)
|
|
2101
|
+
), s = d(this, De).get(i);
|
|
2102
2102
|
if (s)
|
|
2103
|
-
|
|
2103
|
+
rr(s), d(this, yt).delete(i);
|
|
2104
2104
|
else {
|
|
2105
|
-
var r =
|
|
2106
|
-
r && (
|
|
2105
|
+
var r = d(this, fe).get(i);
|
|
2106
|
+
r && (d(this, De).set(i, r.effect), d(this, fe).delete(i), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), s = r.effect);
|
|
2107
2107
|
}
|
|
2108
|
-
for (const [n, a] of
|
|
2109
|
-
if (
|
|
2108
|
+
for (const [n, a] of d(this, Me)) {
|
|
2109
|
+
if (d(this, Me).delete(n), n === e)
|
|
2110
2110
|
break;
|
|
2111
|
-
const o =
|
|
2112
|
-
o && (ne(o.effect),
|
|
2111
|
+
const o = d(this, fe).get(a);
|
|
2112
|
+
o && (ne(o.effect), d(this, fe).delete(a));
|
|
2113
2113
|
}
|
|
2114
|
-
for (const [n, a] of
|
|
2115
|
-
if (n === i ||
|
|
2114
|
+
for (const [n, a] of d(this, De)) {
|
|
2115
|
+
if (n === i || d(this, yt).has(n)) continue;
|
|
2116
2116
|
const o = () => {
|
|
2117
|
-
if (Array.from(
|
|
2118
|
-
var
|
|
2119
|
-
|
|
2117
|
+
if (Array.from(d(this, Me).values()).includes(n)) {
|
|
2118
|
+
var c = document.createDocumentFragment();
|
|
2119
|
+
_n(a, c), c.append(Le()), d(this, fe).set(n, { effect: a, fragment: c });
|
|
2120
2120
|
} else
|
|
2121
2121
|
ne(a);
|
|
2122
|
-
|
|
2122
|
+
d(this, yt).delete(n), d(this, De).delete(n);
|
|
2123
2123
|
};
|
|
2124
|
-
|
|
2124
|
+
d(this, ji) || !s ? (d(this, yt).add(n), _t(a, o, !1)) : o();
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
});
|
|
@@ -2129,10 +2129,10 @@ class Co {
|
|
|
2129
2129
|
* @param {Batch} batch
|
|
2130
2130
|
*/
|
|
2131
2131
|
_(this, hs, (e) => {
|
|
2132
|
-
|
|
2133
|
-
const i = Array.from(
|
|
2134
|
-
for (const [s, r] of
|
|
2135
|
-
i.includes(s) || (ne(r.effect),
|
|
2132
|
+
d(this, Me).delete(e);
|
|
2133
|
+
const i = Array.from(d(this, Me).values());
|
|
2134
|
+
for (const [s, r] of d(this, fe))
|
|
2135
|
+
i.includes(s) || (ne(r.effect), d(this, fe).delete(s));
|
|
2136
2136
|
});
|
|
2137
2137
|
this.anchor = e, w(this, ji, i);
|
|
2138
2138
|
}
|
|
@@ -2145,37 +2145,37 @@ class Co {
|
|
|
2145
2145
|
var s = (
|
|
2146
2146
|
/** @type {Batch} */
|
|
2147
2147
|
C
|
|
2148
|
-
), r =
|
|
2149
|
-
if (i && !
|
|
2148
|
+
), r = fn();
|
|
2149
|
+
if (i && !d(this, De).has(e) && !d(this, fe).has(e))
|
|
2150
2150
|
if (r) {
|
|
2151
2151
|
var n = document.createDocumentFragment(), a = Le();
|
|
2152
|
-
n.append(a),
|
|
2152
|
+
n.append(a), d(this, fe).set(e, {
|
|
2153
2153
|
effect: Se(() => i(a)),
|
|
2154
2154
|
fragment: n
|
|
2155
2155
|
});
|
|
2156
2156
|
} else
|
|
2157
|
-
|
|
2157
|
+
d(this, De).set(
|
|
2158
2158
|
e,
|
|
2159
2159
|
Se(() => i(this.anchor))
|
|
2160
2160
|
);
|
|
2161
|
-
if (
|
|
2162
|
-
for (const [o, l] of
|
|
2161
|
+
if (d(this, Me).set(s, e), r) {
|
|
2162
|
+
for (const [o, l] of d(this, De))
|
|
2163
2163
|
o === e ? s.skipped_effects.delete(l) : s.skipped_effects.add(l);
|
|
2164
|
-
for (const [o, l] of
|
|
2164
|
+
for (const [o, l] of d(this, fe))
|
|
2165
2165
|
o === e ? s.skipped_effects.delete(l.effect) : s.skipped_effects.add(l.effect);
|
|
2166
|
-
s.oncommit(
|
|
2166
|
+
s.oncommit(d(this, qi)), s.ondiscard(d(this, hs));
|
|
2167
2167
|
} else
|
|
2168
|
-
A && (this.anchor = E),
|
|
2168
|
+
A && (this.anchor = E), d(this, qi).call(this);
|
|
2169
2169
|
}
|
|
2170
2170
|
}
|
|
2171
2171
|
Me = new WeakMap(), De = new WeakMap(), fe = new WeakMap(), yt = new WeakMap(), ji = new WeakMap(), qi = new WeakMap(), hs = new WeakMap();
|
|
2172
2172
|
function he(t, e, i = !1) {
|
|
2173
2173
|
A && bs();
|
|
2174
|
-
var s = new
|
|
2174
|
+
var s = new Eo(t), r = i ? Ct : 0;
|
|
2175
2175
|
function n(a, o) {
|
|
2176
2176
|
if (A) {
|
|
2177
|
-
const
|
|
2178
|
-
if (a ===
|
|
2177
|
+
const c = qr(t) === ms;
|
|
2178
|
+
if (a === c) {
|
|
2179
2179
|
var l = as();
|
|
2180
2180
|
ve(l), s.anchor = l, Ze(!1), s.ensure(a, o), Ze(!0);
|
|
2181
2181
|
return;
|
|
@@ -2183,14 +2183,14 @@ function he(t, e, i = !1) {
|
|
|
2183
2183
|
}
|
|
2184
2184
|
s.ensure(a, o);
|
|
2185
2185
|
}
|
|
2186
|
-
|
|
2186
|
+
sr(() => {
|
|
2187
2187
|
var a = !1;
|
|
2188
2188
|
e((o, l = !0) => {
|
|
2189
2189
|
a = !0, n(l, o);
|
|
2190
2190
|
}), a || n(!1, null);
|
|
2191
2191
|
}, r);
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2193
|
+
function Io(t, e, i) {
|
|
2194
2194
|
for (var s = [], r = e.length, n, a = e.length, o = 0; o < r; o++) {
|
|
2195
2195
|
let h = e[o];
|
|
2196
2196
|
_t(
|
|
@@ -2202,7 +2202,7 @@ function Eo(t, e, i) {
|
|
|
2202
2202
|
/** @type {Set<EachOutroGroup>} */
|
|
2203
2203
|
t.outrogroups
|
|
2204
2204
|
);
|
|
2205
|
-
|
|
2205
|
+
qs(gs(n.done)), v.delete(n), v.size === 0 && (t.outrogroups = null);
|
|
2206
2206
|
}
|
|
2207
2207
|
} else
|
|
2208
2208
|
a -= 1;
|
|
@@ -2213,59 +2213,59 @@ function Eo(t, e, i) {
|
|
|
2213
2213
|
if (a === 0) {
|
|
2214
2214
|
var l = s.length === 0 && i !== null;
|
|
2215
2215
|
if (l) {
|
|
2216
|
-
var
|
|
2216
|
+
var c = (
|
|
2217
2217
|
/** @type {Element} */
|
|
2218
2218
|
i
|
|
2219
2219
|
), u = (
|
|
2220
2220
|
/** @type {Element} */
|
|
2221
|
-
|
|
2221
|
+
c.parentNode
|
|
2222
2222
|
);
|
|
2223
|
-
|
|
2223
|
+
tr(u), u.append(c), t.items.clear();
|
|
2224
2224
|
}
|
|
2225
|
-
|
|
2225
|
+
qs(e, !l);
|
|
2226
2226
|
} else
|
|
2227
2227
|
n = {
|
|
2228
2228
|
pending: new Set(e),
|
|
2229
2229
|
done: /* @__PURE__ */ new Set()
|
|
2230
2230
|
}, (t.outrogroups ?? (t.outrogroups = /* @__PURE__ */ new Set())).add(n);
|
|
2231
2231
|
}
|
|
2232
|
-
function
|
|
2232
|
+
function qs(t, e = !0) {
|
|
2233
2233
|
for (var i = 0; i < t.length; i++)
|
|
2234
2234
|
ne(t[i], e);
|
|
2235
2235
|
}
|
|
2236
|
-
var
|
|
2237
|
-
function
|
|
2236
|
+
var xr;
|
|
2237
|
+
function To(t, e, i, s, r, n = null) {
|
|
2238
2238
|
var a = t, o = /* @__PURE__ */ new Map();
|
|
2239
2239
|
A && bs();
|
|
2240
|
-
var l = null,
|
|
2240
|
+
var l = null, c = /* @__PURE__ */ sn(() => {
|
|
2241
2241
|
var g = i();
|
|
2242
|
-
return
|
|
2242
|
+
return Dr(g) ? g : g == null ? [] : gs(g);
|
|
2243
2243
|
}), u, h = !0;
|
|
2244
2244
|
function v() {
|
|
2245
|
-
f.fallback = l,
|
|
2245
|
+
f.fallback = l, ko(f, u, a, e, s), l !== null && (u.length === 0 ? l.f & rt ? (l.f ^= rt, $i(l, null, a)) : rr(l) : _t(l, () => {
|
|
2246
2246
|
l = null;
|
|
2247
2247
|
}));
|
|
2248
2248
|
}
|
|
2249
|
-
var p =
|
|
2249
|
+
var p = sr(() => {
|
|
2250
2250
|
u = /** @type {V[]} */
|
|
2251
|
-
m(
|
|
2251
|
+
m(c);
|
|
2252
2252
|
var g = u.length;
|
|
2253
2253
|
let y = !1;
|
|
2254
2254
|
if (A) {
|
|
2255
|
-
var x =
|
|
2255
|
+
var x = qr(a) === ms;
|
|
2256
2256
|
x !== (g === 0) && (a = as(), ve(a), Ze(!1), y = !0);
|
|
2257
2257
|
}
|
|
2258
2258
|
for (var $ = /* @__PURE__ */ new Set(), q = (
|
|
2259
2259
|
/** @type {Batch} */
|
|
2260
2260
|
C
|
|
2261
|
-
), oe =
|
|
2261
|
+
), oe = fn(), K = 0; K < g; K += 1) {
|
|
2262
2262
|
A && E.nodeType === xi && /** @type {Comment} */
|
|
2263
|
-
E.data ===
|
|
2263
|
+
E.data === Qs && (a = /** @type {Comment} */
|
|
2264
2264
|
E, y = !0, Ze(!1));
|
|
2265
2265
|
var Ce = u[K], Ee = s(Ce, K), P = h ? null : o.get(Ee);
|
|
2266
|
-
P ? (P.v && wi(P.v, Ce), P.i && wi(P.i, K), oe && q.skipped_effects.delete(P.e)) : (P =
|
|
2266
|
+
P ? (P.v && wi(P.v, Ce), P.i && wi(P.i, K), oe && q.skipped_effects.delete(P.e)) : (P = Mo(
|
|
2267
2267
|
o,
|
|
2268
|
-
h ? a :
|
|
2268
|
+
h ? a : xr ?? (xr = Le()),
|
|
2269
2269
|
Ce,
|
|
2270
2270
|
Ee,
|
|
2271
2271
|
K,
|
|
@@ -2274,7 +2274,7 @@ function Io(t, e, i, s, r, n = null) {
|
|
|
2274
2274
|
i
|
|
2275
2275
|
), h || (P.e.f |= rt), o.set(Ee, P)), $.add(Ee);
|
|
2276
2276
|
}
|
|
2277
|
-
if (g === 0 && n && !l && (h ? l = Se(() => n(a)) : (l = Se(() => n(
|
|
2277
|
+
if (g === 0 && n && !l && (h ? l = Se(() => n(a)) : (l = Se(() => n(xr ?? (xr = Le()))), l.f |= rt)), A && g > 0 && ve(as()), !h)
|
|
2278
2278
|
if (oe) {
|
|
2279
2279
|
for (const [te, Cs] of o)
|
|
2280
2280
|
$.has(te) || q.skipped_effects.add(Cs.e);
|
|
@@ -2282,13 +2282,13 @@ function Io(t, e, i, s, r, n = null) {
|
|
|
2282
2282
|
});
|
|
2283
2283
|
} else
|
|
2284
2284
|
v();
|
|
2285
|
-
y && Ze(!0), m(
|
|
2285
|
+
y && Ze(!0), m(c);
|
|
2286
2286
|
}), f = { effect: p, items: o, outrogroups: null, fallback: l };
|
|
2287
2287
|
h = !1, A && (a = E);
|
|
2288
2288
|
}
|
|
2289
|
-
function
|
|
2289
|
+
function ko(t, e, i, s, r) {
|
|
2290
2290
|
var P;
|
|
2291
|
-
var n = e.length, a = t.items, o = t.effect.first, l,
|
|
2291
|
+
var n = e.length, a = t.items, o = t.effect.first, l, c = null, u = [], h = [], v, p, f, g;
|
|
2292
2292
|
for (g = 0; g < n; g += 1) {
|
|
2293
2293
|
if (v = e[g], p = r(v, g), f = /** @type {EachItem} */
|
|
2294
2294
|
a.get(p).e, t.outrogroups !== null)
|
|
@@ -2298,23 +2298,23 @@ function To(t, e, i, s, r) {
|
|
|
2298
2298
|
if (f.f ^= rt, f === o)
|
|
2299
2299
|
$i(f, null, i);
|
|
2300
2300
|
else {
|
|
2301
|
-
var y =
|
|
2302
|
-
f === t.effect.last && (t.effect.last = f.prev), f.prev && (f.prev.next = f.next), f.next && (f.next.prev = f.prev), et(t,
|
|
2301
|
+
var y = c ? c.next : o;
|
|
2302
|
+
f === t.effect.last && (t.effect.last = f.prev), f.prev && (f.prev.next = f.next), f.next && (f.next.prev = f.prev), et(t, c, f), et(t, f, y), $i(f, y, i), c = f, u = [], h = [], o = c.next;
|
|
2303
2303
|
continue;
|
|
2304
2304
|
}
|
|
2305
|
-
if (f.f & ge &&
|
|
2305
|
+
if (f.f & ge && rr(f), f !== o) {
|
|
2306
2306
|
if (l !== void 0 && l.has(f)) {
|
|
2307
2307
|
if (u.length < h.length) {
|
|
2308
2308
|
var x = h[0], $;
|
|
2309
|
-
|
|
2309
|
+
c = x.prev;
|
|
2310
2310
|
var q = u[0], oe = u[u.length - 1];
|
|
2311
2311
|
for ($ = 0; $ < u.length; $ += 1)
|
|
2312
2312
|
$i(u[$], x, i);
|
|
2313
2313
|
for ($ = 0; $ < h.length; $ += 1)
|
|
2314
2314
|
l.delete(h[$]);
|
|
2315
|
-
et(t, q.prev, oe.next), et(t,
|
|
2315
|
+
et(t, q.prev, oe.next), et(t, c, q), et(t, oe, x), o = x, c = oe, g -= 1, u = [], h = [];
|
|
2316
2316
|
} else
|
|
2317
|
-
l.delete(f), $i(f, o, i), et(t, f.prev, f.next), et(t, f,
|
|
2317
|
+
l.delete(f), $i(f, o, i), et(t, f.prev, f.next), et(t, f, c === null ? t.effect.first : c.next), et(t, c, f), c = f;
|
|
2318
2318
|
continue;
|
|
2319
2319
|
}
|
|
2320
2320
|
for (u = [], h = []; o !== null && o !== f; )
|
|
@@ -2322,11 +2322,11 @@ function To(t, e, i, s, r) {
|
|
|
2322
2322
|
if (o === null)
|
|
2323
2323
|
continue;
|
|
2324
2324
|
}
|
|
2325
|
-
f.f & rt || u.push(f),
|
|
2325
|
+
f.f & rt || u.push(f), c = f, o = f.next;
|
|
2326
2326
|
}
|
|
2327
2327
|
if (t.outrogroups !== null) {
|
|
2328
2328
|
for (const te of t.outrogroups)
|
|
2329
|
-
te.pending.size === 0 && (
|
|
2329
|
+
te.pending.size === 0 && (qs(gs(te.done)), (P = t.outrogroups) == null || P.delete(te));
|
|
2330
2330
|
t.outrogroups.size === 0 && (t.outrogroups = null);
|
|
2331
2331
|
}
|
|
2332
2332
|
if (o !== null || l !== void 0) {
|
|
@@ -2339,16 +2339,16 @@ function To(t, e, i, s, r) {
|
|
|
2339
2339
|
var Ce = K.length;
|
|
2340
2340
|
if (Ce > 0) {
|
|
2341
2341
|
var Ee = null;
|
|
2342
|
-
|
|
2342
|
+
Io(t, K, Ee);
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2347
|
-
var l = a &
|
|
2346
|
+
function Mo(t, e, i, s, r, n, a, o) {
|
|
2347
|
+
var l = a & Oa ? a & za ? Tt(i) : /* @__PURE__ */ on(i, !1, !1) : null, c = a & Na ? Tt(r) : null;
|
|
2348
2348
|
return {
|
|
2349
2349
|
v: l,
|
|
2350
|
-
i:
|
|
2351
|
-
e: Se(() => (n(e, l ?? i,
|
|
2350
|
+
i: c,
|
|
2351
|
+
e: Se(() => (n(e, l ?? i, c ?? r, o), () => {
|
|
2352
2352
|
t.delete(s);
|
|
2353
2353
|
}))
|
|
2354
2354
|
};
|
|
@@ -2371,7 +2371,7 @@ function $i(t, e, i) {
|
|
|
2371
2371
|
function et(t, e, i) {
|
|
2372
2372
|
e === null ? t.effect.first = i : e.next = i, i === null ? t.effect.last = e : i.prev = e;
|
|
2373
2373
|
}
|
|
2374
|
-
const
|
|
2374
|
+
const $o = () => performance.now(), Ge = {
|
|
2375
2375
|
// don't access requestAnimationFrame eagerly outside method
|
|
2376
2376
|
// this allows basic testing of user code without JSDOM
|
|
2377
2377
|
// bunder will eval and remove ternary when the user's app is built
|
|
@@ -2379,18 +2379,18 @@ const Mo = () => performance.now(), Ge = {
|
|
|
2379
2379
|
/** @param {any} _ */
|
|
2380
2380
|
(t) => requestAnimationFrame(t)
|
|
2381
2381
|
),
|
|
2382
|
-
now: () =>
|
|
2382
|
+
now: () => $o(),
|
|
2383
2383
|
tasks: /* @__PURE__ */ new Set()
|
|
2384
2384
|
};
|
|
2385
|
-
function
|
|
2385
|
+
function Nn() {
|
|
2386
2386
|
const t = Ge.now();
|
|
2387
2387
|
Ge.tasks.forEach((e) => {
|
|
2388
2388
|
e.c(t) || (Ge.tasks.delete(e), e.f());
|
|
2389
|
-
}), Ge.tasks.size !== 0 && Ge.tick(
|
|
2389
|
+
}), Ge.tasks.size !== 0 && Ge.tick(Nn);
|
|
2390
2390
|
}
|
|
2391
|
-
function
|
|
2391
|
+
function Ao(t) {
|
|
2392
2392
|
let e;
|
|
2393
|
-
return Ge.tasks.size === 0 && Ge.tick(
|
|
2393
|
+
return Ge.tasks.size === 0 && Ge.tick(Nn), {
|
|
2394
2394
|
promise: new Promise((i) => {
|
|
2395
2395
|
Ge.tasks.add(e = { c: t, f: i });
|
|
2396
2396
|
}),
|
|
@@ -2404,7 +2404,7 @@ function Ji(t, e) {
|
|
|
2404
2404
|
t.dispatchEvent(new CustomEvent(e));
|
|
2405
2405
|
});
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2407
|
+
function Lo(t) {
|
|
2408
2408
|
if (t === "float") return "cssFloat";
|
|
2409
2409
|
if (t === "offset") return "cssOffset";
|
|
2410
2410
|
if (t.startsWith("--")) return t;
|
|
@@ -2414,20 +2414,20 @@ function Ao(t) {
|
|
|
2414
2414
|
(i) => i[0].toUpperCase() + i.slice(1)
|
|
2415
2415
|
).join("");
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2417
|
+
function Sr(t) {
|
|
2418
2418
|
const e = {}, i = t.split(";");
|
|
2419
2419
|
for (const s of i) {
|
|
2420
2420
|
const [r, n] = s.split(":");
|
|
2421
2421
|
if (!r || n === void 0) break;
|
|
2422
|
-
const a =
|
|
2422
|
+
const a = Lo(r.trim());
|
|
2423
2423
|
e[a] = n.trim();
|
|
2424
2424
|
}
|
|
2425
2425
|
return e;
|
|
2426
2426
|
}
|
|
2427
|
-
const
|
|
2428
|
-
function
|
|
2427
|
+
const Oo = (t) => t;
|
|
2428
|
+
function Cr(t, e, i, s) {
|
|
2429
2429
|
var y;
|
|
2430
|
-
var r = (t &
|
|
2430
|
+
var r = (t & Ua) !== 0, n = "both", a, o = e.inert, l = e.style.overflow, c, u;
|
|
2431
2431
|
function h() {
|
|
2432
2432
|
return Ei(() => a ?? (a = i()(e, (s == null ? void 0 : s()) ?? /** @type {P} */
|
|
2433
2433
|
{}, {
|
|
@@ -2437,23 +2437,23 @@ function Sr(t, e, i, s) {
|
|
|
2437
2437
|
var v = {
|
|
2438
2438
|
is_global: r,
|
|
2439
2439
|
in() {
|
|
2440
|
-
e.inert = o, Ji(e, "introstart"),
|
|
2441
|
-
Ji(e, "introend"),
|
|
2440
|
+
e.inert = o, Ji(e, "introstart"), c = Fs(e, h(), u, 1, () => {
|
|
2441
|
+
Ji(e, "introend"), c == null || c.abort(), c = a = void 0, e.style.overflow = l;
|
|
2442
2442
|
});
|
|
2443
2443
|
},
|
|
2444
2444
|
out(x) {
|
|
2445
|
-
e.inert = !0, Ji(e, "outrostart"), u =
|
|
2445
|
+
e.inert = !0, Ji(e, "outrostart"), u = Fs(e, h(), c, 0, () => {
|
|
2446
2446
|
Ji(e, "outroend"), x == null || x();
|
|
2447
2447
|
});
|
|
2448
2448
|
},
|
|
2449
2449
|
stop: () => {
|
|
2450
|
-
|
|
2450
|
+
c == null || c.abort(), u == null || u.abort();
|
|
2451
2451
|
}
|
|
2452
2452
|
}, p = (
|
|
2453
2453
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
2454
2454
|
k
|
|
2455
2455
|
);
|
|
2456
|
-
if (((y = p.nodes).t ?? (y.t = [])).push(v),
|
|
2456
|
+
if (((y = p.nodes).t ?? (y.t = [])).push(v), Ws) {
|
|
2457
2457
|
var f = r;
|
|
2458
2458
|
if (!f) {
|
|
2459
2459
|
for (var g = (
|
|
@@ -2464,19 +2464,19 @@ function Sr(t, e, i, s) {
|
|
|
2464
2464
|
;
|
|
2465
2465
|
f = !g || (g.f & Fi) !== 0;
|
|
2466
2466
|
}
|
|
2467
|
-
f &&
|
|
2467
|
+
f && ir(() => {
|
|
2468
2468
|
At(() => v.in());
|
|
2469
2469
|
});
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function Fs(t, e, i, s, r) {
|
|
2473
2473
|
var n = s === 1;
|
|
2474
|
-
if (
|
|
2474
|
+
if (wa(e)) {
|
|
2475
2475
|
var a, o = !1;
|
|
2476
2476
|
return Ci(() => {
|
|
2477
2477
|
if (!o) {
|
|
2478
2478
|
var y = e({ direction: n ? "in" : "out" });
|
|
2479
|
-
a =
|
|
2479
|
+
a = Fs(t, y, i, s, r);
|
|
2480
2480
|
}
|
|
2481
2481
|
}), {
|
|
2482
2482
|
abort: () => {
|
|
@@ -2494,10 +2494,10 @@ function qs(t, e, i, s, r) {
|
|
|
2494
2494
|
reset: Ti,
|
|
2495
2495
|
t: () => s
|
|
2496
2496
|
};
|
|
2497
|
-
const { delay: l = 0, css:
|
|
2497
|
+
const { delay: l = 0, css: c, tick: u, easing: h = Oo } = e;
|
|
2498
2498
|
var v = [];
|
|
2499
|
-
if (n && i === void 0 && (u && u(0, 1),
|
|
2500
|
-
var p =
|
|
2499
|
+
if (n && i === void 0 && (u && u(0, 1), c)) {
|
|
2500
|
+
var p = Sr(c(0, 1));
|
|
2501
2501
|
v.push(p, p);
|
|
2502
2502
|
}
|
|
2503
2503
|
var f = () => 1 - s, g = t.animate(v, { duration: l, fill: "forwards" });
|
|
@@ -2511,9 +2511,9 @@ function qs(t, e, i, s, r) {
|
|
|
2511
2511
|
), q = [];
|
|
2512
2512
|
if ($ > 0) {
|
|
2513
2513
|
var oe = !1;
|
|
2514
|
-
if (
|
|
2514
|
+
if (c)
|
|
2515
2515
|
for (var K = Math.ceil($ / 16.666666666666668), Ce = 0; Ce <= K; Ce += 1) {
|
|
2516
|
-
var Ee = y + x * h(Ce / K), P =
|
|
2516
|
+
var Ee = y + x * h(Ce / K), P = Sr(c(Ee, 1 - Ee));
|
|
2517
2517
|
q.push(P), oe || (oe = P.overflow === "hidden");
|
|
2518
2518
|
}
|
|
2519
2519
|
oe && (t.style.overflow = "hidden"), f = () => {
|
|
@@ -2523,7 +2523,7 @@ function qs(t, e, i, s, r) {
|
|
|
2523
2523
|
g.currentTime
|
|
2524
2524
|
);
|
|
2525
2525
|
return y + x * h(te / $);
|
|
2526
|
-
}, u &&
|
|
2526
|
+
}, u && Ao(() => {
|
|
2527
2527
|
if (g.playState !== "running") return !1;
|
|
2528
2528
|
var te = f();
|
|
2529
2529
|
return u(te, 1 - te), !0;
|
|
@@ -2546,7 +2546,7 @@ function qs(t, e, i, s, r) {
|
|
|
2546
2546
|
};
|
|
2547
2547
|
}
|
|
2548
2548
|
function Lt(t, e) {
|
|
2549
|
-
|
|
2549
|
+
ir(() => {
|
|
2550
2550
|
var i = t.getRootNode(), s = (
|
|
2551
2551
|
/** @type {ShadowRoot} */
|
|
2552
2552
|
i.host ? (
|
|
@@ -2564,9 +2564,9 @@ function Lt(t, e) {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
});
|
|
2566
2566
|
}
|
|
2567
|
-
const
|
|
2567
|
+
const Er = [...`
|
|
2568
2568
|
\r\f \v\uFEFF`];
|
|
2569
|
-
function
|
|
2569
|
+
function No(t, e, i) {
|
|
2570
2570
|
var s = t == null ? "" : "" + t;
|
|
2571
2571
|
if (i) {
|
|
2572
2572
|
for (var r in i)
|
|
@@ -2575,60 +2575,60 @@ function Oo(t, e, i) {
|
|
|
2575
2575
|
else if (s.length)
|
|
2576
2576
|
for (var n = r.length, a = 0; (a = s.indexOf(r, a)) >= 0; ) {
|
|
2577
2577
|
var o = a + n;
|
|
2578
|
-
(a === 0 ||
|
|
2578
|
+
(a === 0 || Er.includes(s[a - 1])) && (o === s.length || Er.includes(s[o])) ? s = (a === 0 ? "" : s.substring(0, a)) + s.substring(o + 1) : a = o;
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
2581
|
return s === "" ? null : s;
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function zn(t, e, i, s, r, n) {
|
|
2584
2584
|
var a = t.__className;
|
|
2585
2585
|
if (A || a !== i || a === void 0) {
|
|
2586
|
-
var o =
|
|
2586
|
+
var o = No(i, s, n);
|
|
2587
2587
|
(!A || o !== t.getAttribute("class")) && (o == null ? t.removeAttribute("class") : t.className = o), t.__className = i;
|
|
2588
2588
|
} else if (n && r !== n)
|
|
2589
2589
|
for (var l in n) {
|
|
2590
|
-
var
|
|
2591
|
-
(r == null ||
|
|
2590
|
+
var c = !!n[l];
|
|
2591
|
+
(r == null || c !== !!r[l]) && t.classList.toggle(l, c);
|
|
2592
2592
|
}
|
|
2593
2593
|
return n;
|
|
2594
2594
|
}
|
|
2595
|
-
const
|
|
2595
|
+
const zo = Symbol("is custom element"), Ro = Symbol("is html");
|
|
2596
2596
|
function bi(t, e, i, s) {
|
|
2597
|
-
var r =
|
|
2598
|
-
A && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === "LINK") || r[e] !== (r[e] = i) && (e === "loading" && (t[
|
|
2597
|
+
var r = Do(t);
|
|
2598
|
+
A && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === "LINK") || r[e] !== (r[e] = i) && (e === "loading" && (t[xa] = i), i == null ? t.removeAttribute(e) : typeof i != "string" && Po(t).includes(e) ? t[e] = i : t.setAttribute(e, i));
|
|
2599
2599
|
}
|
|
2600
|
-
function
|
|
2600
|
+
function Do(t) {
|
|
2601
2601
|
return (
|
|
2602
2602
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2603
2603
|
// @ts-expect-error
|
|
2604
2604
|
t.__attributes ?? (t.__attributes = {
|
|
2605
|
-
[
|
|
2606
|
-
[
|
|
2605
|
+
[zo]: t.nodeName.includes("-"),
|
|
2606
|
+
[Ro]: t.namespaceURI === Va
|
|
2607
2607
|
})
|
|
2608
2608
|
);
|
|
2609
2609
|
}
|
|
2610
|
-
var
|
|
2611
|
-
function
|
|
2612
|
-
var e = t.getAttribute("is") || t.nodeName, i =
|
|
2610
|
+
var Ir = /* @__PURE__ */ new Map();
|
|
2611
|
+
function Po(t) {
|
|
2612
|
+
var e = t.getAttribute("is") || t.nodeName, i = Ir.get(e);
|
|
2613
2613
|
if (i) return i;
|
|
2614
|
-
|
|
2614
|
+
Ir.set(e, i = []);
|
|
2615
2615
|
for (var s, r = t, n = Element.prototype; n !== r; ) {
|
|
2616
|
-
s =
|
|
2616
|
+
s = Pr(r);
|
|
2617
2617
|
for (var a in s)
|
|
2618
2618
|
s[a].set && i.push(a);
|
|
2619
|
-
r =
|
|
2619
|
+
r = Zs(r);
|
|
2620
2620
|
}
|
|
2621
2621
|
return i;
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function Uo(t, e, i = e) {
|
|
2624
2624
|
var s = /* @__PURE__ */ new WeakSet();
|
|
2625
|
-
|
|
2625
|
+
no(t, "input", async (r) => {
|
|
2626
2626
|
var n = r ? t.defaultValue : t.value;
|
|
2627
|
-
if (n = Ts(t) ? ks(n) : n, i(n), C !== null && s.add(C), await
|
|
2627
|
+
if (n = Ts(t) ? ks(n) : n, i(n), C !== null && s.add(C), await Tn(), n !== (n = e())) {
|
|
2628
2628
|
var a = t.selectionStart, o = t.selectionEnd, l = t.value.length;
|
|
2629
2629
|
if (t.value = n ?? "", o !== null) {
|
|
2630
|
-
var
|
|
2631
|
-
a === o && o === l &&
|
|
2630
|
+
var c = t.value.length;
|
|
2631
|
+
a === o && o === l && c > l ? (t.selectionStart = c, t.selectionEnd = c) : (t.selectionStart = a, t.selectionEnd = Math.min(o, c));
|
|
2632
2632
|
}
|
|
2633
2633
|
}
|
|
2634
2634
|
}), // If we are hydrating and the value has since changed,
|
|
@@ -2655,30 +2655,30 @@ function Ts(t) {
|
|
|
2655
2655
|
function ks(t) {
|
|
2656
2656
|
return t === "" ? null : +t;
|
|
2657
2657
|
}
|
|
2658
|
-
function
|
|
2658
|
+
function Tr(t, e) {
|
|
2659
2659
|
return t === e || (t == null ? void 0 : t[Wt]) === e;
|
|
2660
2660
|
}
|
|
2661
|
-
function
|
|
2662
|
-
return
|
|
2661
|
+
function Rn(t = {}, e, i, s) {
|
|
2662
|
+
return ir(() => {
|
|
2663
2663
|
var r, n;
|
|
2664
2664
|
return _s(() => {
|
|
2665
2665
|
r = n, n = [], At(() => {
|
|
2666
|
-
t !== i(...n) && (e(t, ...n), r &&
|
|
2666
|
+
t !== i(...n) && (e(t, ...n), r && Tr(i(...r), t) && e(null, ...r));
|
|
2667
2667
|
});
|
|
2668
2668
|
}), () => {
|
|
2669
2669
|
Ci(() => {
|
|
2670
|
-
n &&
|
|
2670
|
+
n && Tr(i(...n), t) && e(null, ...n);
|
|
2671
2671
|
});
|
|
2672
2672
|
};
|
|
2673
2673
|
}), t;
|
|
2674
2674
|
}
|
|
2675
|
-
function
|
|
2675
|
+
function Ho(t = !1) {
|
|
2676
2676
|
const e = (
|
|
2677
2677
|
/** @type {ComponentContextLegacy} */
|
|
2678
2678
|
R
|
|
2679
2679
|
), i = e.l.u;
|
|
2680
2680
|
if (!i) return;
|
|
2681
|
-
let s = () =>
|
|
2681
|
+
let s = () => mo(e.s);
|
|
2682
2682
|
if (t) {
|
|
2683
2683
|
let r = 0, n = (
|
|
2684
2684
|
/** @type {Record<string, any>} */
|
|
@@ -2687,37 +2687,37 @@ function Uo(t = !1) {
|
|
|
2687
2687
|
const a = /* @__PURE__ */ Yi(() => {
|
|
2688
2688
|
let o = !1;
|
|
2689
2689
|
const l = e.s;
|
|
2690
|
-
for (const
|
|
2691
|
-
l[
|
|
2690
|
+
for (const c in l)
|
|
2691
|
+
l[c] !== n[c] && (n[c] = l[c], o = !0);
|
|
2692
2692
|
return o && r++, r;
|
|
2693
2693
|
});
|
|
2694
2694
|
s = () => m(a);
|
|
2695
2695
|
}
|
|
2696
|
-
i.b.length &&
|
|
2697
|
-
|
|
2696
|
+
i.b.length && oo(() => {
|
|
2697
|
+
kr(e, s), $s(i.b);
|
|
2698
2698
|
}), Vt(() => {
|
|
2699
|
-
const r = At(() => i.m.map(
|
|
2699
|
+
const r = At(() => i.m.map(ba));
|
|
2700
2700
|
return () => {
|
|
2701
2701
|
for (const n of r)
|
|
2702
2702
|
typeof n == "function" && n();
|
|
2703
2703
|
};
|
|
2704
2704
|
}), i.a.length && Vt(() => {
|
|
2705
|
-
|
|
2705
|
+
kr(e, s), $s(i.a);
|
|
2706
2706
|
});
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2708
|
+
function kr(t, e) {
|
|
2709
2709
|
if (t.l.s)
|
|
2710
2710
|
for (const i of t.l.s) m(i);
|
|
2711
2711
|
e();
|
|
2712
2712
|
}
|
|
2713
2713
|
function yi(t, e, i, s) {
|
|
2714
|
-
var r = !Si || (i &
|
|
2714
|
+
var r = !Si || (i & Ra) !== 0, n = (i & Pa) !== 0, a = (
|
|
2715
2715
|
/** @type {V} */
|
|
2716
2716
|
s
|
|
2717
2717
|
), o = !0, l = () => (o && (o = !1, a = /** @type {V} */
|
|
2718
|
-
s), a),
|
|
2719
|
-
|
|
2720
|
-
t[e],
|
|
2718
|
+
s), a), c;
|
|
2719
|
+
c = /** @type {V} */
|
|
2720
|
+
t[e], c === void 0 && s !== void 0 && (c = l());
|
|
2721
2721
|
var u;
|
|
2722
2722
|
if (r ? u = () => {
|
|
2723
2723
|
var f = (
|
|
@@ -2732,7 +2732,7 @@ function yi(t, e, i, s) {
|
|
|
2732
2732
|
);
|
|
2733
2733
|
return f !== void 0 && (a = /** @type {V} */
|
|
2734
2734
|
void 0), f === void 0 ? a : f;
|
|
2735
|
-
}, r && !(i &
|
|
2735
|
+
}, r && !(i & Da))
|
|
2736
2736
|
return u;
|
|
2737
2737
|
var h = !1, v = /* @__PURE__ */ Yi(() => (h = !1, u())), p = (
|
|
2738
2738
|
/** @type {Effect} */
|
|
@@ -2749,11 +2749,11 @@ function yi(t, e, i, s) {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
);
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2753
|
-
return new
|
|
2752
|
+
function Wo(t) {
|
|
2753
|
+
return new Vo(t);
|
|
2754
2754
|
}
|
|
2755
2755
|
var Ye, _e;
|
|
2756
|
-
class
|
|
2756
|
+
class Vo {
|
|
2757
2757
|
/**
|
|
2758
2758
|
* @param {ComponentConstructorOptions & {
|
|
2759
2759
|
* component: any;
|
|
@@ -2766,7 +2766,7 @@ class Wo {
|
|
|
2766
2766
|
_(this, _e);
|
|
2767
2767
|
var n;
|
|
2768
2768
|
var i = /* @__PURE__ */ new Map(), s = (a, o) => {
|
|
2769
|
-
var l = /* @__PURE__ */
|
|
2769
|
+
var l = /* @__PURE__ */ on(o, !1, !1);
|
|
2770
2770
|
return i.set(a, l), l;
|
|
2771
2771
|
};
|
|
2772
2772
|
const r = new Proxy(
|
|
@@ -2776,14 +2776,14 @@ class Wo {
|
|
|
2776
2776
|
return m(i.get(o) ?? s(o, Reflect.get(a, o)));
|
|
2777
2777
|
},
|
|
2778
2778
|
has(a, o) {
|
|
2779
|
-
return o ===
|
|
2779
|
+
return o === _a ? !0 : (m(i.get(o) ?? s(o, Reflect.get(a, o))), Reflect.has(a, o));
|
|
2780
2780
|
},
|
|
2781
2781
|
set(a, o, l) {
|
|
2782
2782
|
return I(i.get(o) ?? s(o, l), l), Reflect.set(a, o, l);
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
2785
|
);
|
|
2786
|
-
w(this, _e, (e.hydrate ?
|
|
2786
|
+
w(this, _e, (e.hydrate ? Co : nr)(e.component, {
|
|
2787
2787
|
target: e.target,
|
|
2788
2788
|
anchor: e.anchor,
|
|
2789
2789
|
props: r,
|
|
@@ -2791,27 +2791,27 @@ class Wo {
|
|
|
2791
2791
|
intro: e.intro ?? !1,
|
|
2792
2792
|
recover: e.recover
|
|
2793
2793
|
})), (!((n = e == null ? void 0 : e.props) != null && n.$$host) || e.sync === !1) && lt(), w(this, Ye, r.$$events);
|
|
2794
|
-
for (const a of Object.keys(
|
|
2794
|
+
for (const a of Object.keys(d(this, _e)))
|
|
2795
2795
|
a === "$set" || a === "$destroy" || a === "$on" || rs(this, a, {
|
|
2796
2796
|
get() {
|
|
2797
|
-
return
|
|
2797
|
+
return d(this, _e)[a];
|
|
2798
2798
|
},
|
|
2799
2799
|
/** @param {any} value */
|
|
2800
2800
|
set(o) {
|
|
2801
|
-
|
|
2801
|
+
d(this, _e)[a] = o;
|
|
2802
2802
|
},
|
|
2803
2803
|
enumerable: !0
|
|
2804
2804
|
});
|
|
2805
|
-
|
|
2805
|
+
d(this, _e).$set = /** @param {Record<string, any>} next */
|
|
2806
2806
|
(a) => {
|
|
2807
2807
|
Object.assign(r, a);
|
|
2808
|
-
},
|
|
2809
|
-
|
|
2808
|
+
}, d(this, _e).$destroy = () => {
|
|
2809
|
+
js(d(this, _e));
|
|
2810
2810
|
};
|
|
2811
2811
|
}
|
|
2812
2812
|
/** @param {Record<string, any>} props */
|
|
2813
2813
|
$set(e) {
|
|
2814
|
-
|
|
2814
|
+
d(this, _e).$set(e);
|
|
2815
2815
|
}
|
|
2816
2816
|
/**
|
|
2817
2817
|
* @param {string} event
|
|
@@ -2819,22 +2819,22 @@ class Wo {
|
|
|
2819
2819
|
* @returns {any}
|
|
2820
2820
|
*/
|
|
2821
2821
|
$on(e, i) {
|
|
2822
|
-
|
|
2822
|
+
d(this, Ye)[e] = d(this, Ye)[e] || [];
|
|
2823
2823
|
const s = (...r) => i.call(this, ...r);
|
|
2824
|
-
return
|
|
2825
|
-
|
|
2824
|
+
return d(this, Ye)[e].push(s), () => {
|
|
2825
|
+
d(this, Ye)[e] = d(this, Ye)[e].filter(
|
|
2826
2826
|
/** @param {any} fn */
|
|
2827
2827
|
(r) => r !== s
|
|
2828
2828
|
);
|
|
2829
2829
|
};
|
|
2830
2830
|
}
|
|
2831
2831
|
$destroy() {
|
|
2832
|
-
|
|
2832
|
+
d(this, _e).$destroy();
|
|
2833
2833
|
}
|
|
2834
2834
|
}
|
|
2835
2835
|
Ye = new WeakMap(), _e = new WeakMap();
|
|
2836
|
-
let
|
|
2837
|
-
typeof HTMLElement == "function" && (
|
|
2836
|
+
let Dn;
|
|
2837
|
+
typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
2838
2838
|
/**
|
|
2839
2839
|
* @param {*} $$componentCtor
|
|
2840
2840
|
* @param {*} $$slots
|
|
@@ -2897,7 +2897,7 @@ typeof HTMLElement == "function" && (Rn = class extends HTMLElement {
|
|
|
2897
2897
|
};
|
|
2898
2898
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2899
2899
|
return;
|
|
2900
|
-
const i = {}, s =
|
|
2900
|
+
const i = {}, s = jo(this);
|
|
2901
2901
|
for (const r of this.$$s)
|
|
2902
2902
|
r in s && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), i.default = !0) : i[r] = e(r));
|
|
2903
2903
|
for (const r of this.attributes) {
|
|
@@ -2906,7 +2906,7 @@ typeof HTMLElement == "function" && (Rn = class extends HTMLElement {
|
|
|
2906
2906
|
}
|
|
2907
2907
|
for (const r in this.$$p_d)
|
|
2908
2908
|
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2909
|
-
this.$$c =
|
|
2909
|
+
this.$$c = Wo({
|
|
2910
2910
|
component: this.$$ctor,
|
|
2911
2911
|
target: this.shadowRoot || this,
|
|
2912
2912
|
props: {
|
|
@@ -2914,7 +2914,7 @@ typeof HTMLElement == "function" && (Rn = class extends HTMLElement {
|
|
|
2914
2914
|
$$slots: i,
|
|
2915
2915
|
$$host: this
|
|
2916
2916
|
}
|
|
2917
|
-
}), this.$$me =
|
|
2917
|
+
}), this.$$me = lo(() => {
|
|
2918
2918
|
_s(() => {
|
|
2919
2919
|
var r;
|
|
2920
2920
|
this.$$r = !0;
|
|
@@ -2995,7 +2995,7 @@ function is(t, e, i, s) {
|
|
|
2995
2995
|
return e;
|
|
2996
2996
|
}
|
|
2997
2997
|
}
|
|
2998
|
-
function
|
|
2998
|
+
function jo(t) {
|
|
2999
2999
|
const e = {};
|
|
3000
3000
|
return t.childNodes.forEach((i) => {
|
|
3001
3001
|
e[
|
|
@@ -3005,7 +3005,7 @@ function Vo(t) {
|
|
|
3005
3005
|
}), e;
|
|
3006
3006
|
}
|
|
3007
3007
|
function Ot(t, e, i, s, r, n) {
|
|
3008
|
-
let a = class extends
|
|
3008
|
+
let a = class extends Dn {
|
|
3009
3009
|
constructor() {
|
|
3010
3010
|
super(t, i, r), this.$$p_d = e;
|
|
3011
3011
|
}
|
|
@@ -3023,10 +3023,10 @@ function Ot(t, e, i, s, r, n) {
|
|
|
3023
3023
|
set(l) {
|
|
3024
3024
|
var h;
|
|
3025
3025
|
l = is(o, l, e), this.$$d[o] = l;
|
|
3026
|
-
var
|
|
3027
|
-
if (
|
|
3028
|
-
var u = (h = Ht(
|
|
3029
|
-
u ?
|
|
3026
|
+
var c = this.$$c;
|
|
3027
|
+
if (c) {
|
|
3028
|
+
var u = (h = Ht(c, o)) == null ? void 0 : h.get;
|
|
3029
|
+
u ? c[o] = l : c.$set({ [o]: l });
|
|
3030
3030
|
}
|
|
3031
3031
|
}
|
|
3032
3032
|
});
|
|
@@ -3040,8 +3040,8 @@ function Ot(t, e, i, s, r, n) {
|
|
|
3040
3040
|
}), t.element = /** @type {any} */
|
|
3041
3041
|
a, a;
|
|
3042
3042
|
}
|
|
3043
|
-
function
|
|
3044
|
-
R === null &&
|
|
3043
|
+
function ar(t) {
|
|
3044
|
+
R === null && Vr(), Si && R.l !== null ? Fo(R).m.push(t) : Vt(() => {
|
|
3045
3045
|
const e = At(t);
|
|
3046
3046
|
if (typeof e == "function") return (
|
|
3047
3047
|
/** @type {() => void} */
|
|
@@ -3049,25 +3049,25 @@ function nr(t) {
|
|
|
3049
3049
|
);
|
|
3050
3050
|
});
|
|
3051
3051
|
}
|
|
3052
|
-
function jo(t) {
|
|
3053
|
-
R === null && Wr(), nr(() => () => At(t));
|
|
3054
|
-
}
|
|
3055
3052
|
function qo(t) {
|
|
3053
|
+
R === null && Vr(), ar(() => () => At(t));
|
|
3054
|
+
}
|
|
3055
|
+
function Fo(t) {
|
|
3056
3056
|
var e = (
|
|
3057
3057
|
/** @type {ComponentContextLegacy} */
|
|
3058
3058
|
t.l
|
|
3059
3059
|
);
|
|
3060
3060
|
return e.u ?? (e.u = { a: [], b: [], m: [] });
|
|
3061
3061
|
}
|
|
3062
|
-
const
|
|
3063
|
-
var
|
|
3064
|
-
typeof window < "u" && ((
|
|
3065
|
-
const
|
|
3066
|
-
function
|
|
3062
|
+
const Bo = "5";
|
|
3063
|
+
var Rr;
|
|
3064
|
+
typeof window < "u" && ((Rr = window.__svelte ?? (window.__svelte = {})).v ?? (Rr.v = /* @__PURE__ */ new Set())).add(Bo);
|
|
3065
|
+
const Yo = (t) => t;
|
|
3066
|
+
function Go(t) {
|
|
3067
3067
|
const e = t - 1;
|
|
3068
3068
|
return e * e * e + 1;
|
|
3069
3069
|
}
|
|
3070
|
-
function
|
|
3070
|
+
function Mr(t) {
|
|
3071
3071
|
const e = typeof t == "string" && t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
|
|
3072
3072
|
return e ? [parseFloat(e[1]), e[2] || "px"] : [
|
|
3073
3073
|
/** @type {number} */
|
|
@@ -3075,7 +3075,7 @@ function kr(t) {
|
|
|
3075
3075
|
"px"
|
|
3076
3076
|
];
|
|
3077
3077
|
}
|
|
3078
|
-
function
|
|
3078
|
+
function Zo(t, { delay: e = 0, duration: i = 400, easing: s = Yo } = {}) {
|
|
3079
3079
|
const r = +getComputedStyle(t).opacity;
|
|
3080
3080
|
return {
|
|
3081
3081
|
delay: e,
|
|
@@ -3084,19 +3084,19 @@ function Go(t, { delay: e = 0, duration: i = 400, easing: s = Bo } = {}) {
|
|
|
3084
3084
|
css: (n) => `opacity: ${n * r}`
|
|
3085
3085
|
};
|
|
3086
3086
|
}
|
|
3087
|
-
function
|
|
3088
|
-
const o = getComputedStyle(t), l = +o.opacity,
|
|
3087
|
+
function Ko(t, { delay: e = 0, duration: i = 400, easing: s = Go, x: r = 0, y: n = 0, opacity: a = 0 } = {}) {
|
|
3088
|
+
const o = getComputedStyle(t), l = +o.opacity, c = o.transform === "none" ? "" : o.transform, u = l * (1 - a), [h, v] = Mr(r), [p, f] = Mr(n);
|
|
3089
3089
|
return {
|
|
3090
3090
|
delay: e,
|
|
3091
3091
|
duration: i,
|
|
3092
3092
|
easing: s,
|
|
3093
3093
|
css: (g, y) => `
|
|
3094
|
-
transform: ${
|
|
3094
|
+
transform: ${c} translate(${(1 - g) * h}${v}, ${(1 - g) * p}${f});
|
|
3095
3095
|
opacity: ${l - u * y}`
|
|
3096
3096
|
};
|
|
3097
3097
|
}
|
|
3098
3098
|
var Gt, Zt, Kt, Jt;
|
|
3099
|
-
class
|
|
3099
|
+
class Jo {
|
|
3100
3100
|
constructor() {
|
|
3101
3101
|
_(this, Gt);
|
|
3102
3102
|
_(this, Zt);
|
|
@@ -3105,28 +3105,28 @@ class Ko {
|
|
|
3105
3105
|
w(this, Gt, /* @__PURE__ */ M(!1)), w(this, Zt, /* @__PURE__ */ M(!1)), w(this, Kt, /* @__PURE__ */ M(!1)), w(this, Jt, /* @__PURE__ */ M(!1));
|
|
3106
3106
|
}
|
|
3107
3107
|
get isOpen() {
|
|
3108
|
-
return m(
|
|
3108
|
+
return m(d(this, Gt));
|
|
3109
3109
|
}
|
|
3110
3110
|
set isOpen(e) {
|
|
3111
|
-
I(
|
|
3111
|
+
I(d(this, Gt), e, !0);
|
|
3112
3112
|
}
|
|
3113
3113
|
get isMinimized() {
|
|
3114
|
-
return m(
|
|
3114
|
+
return m(d(this, Zt));
|
|
3115
3115
|
}
|
|
3116
3116
|
set isMinimized(e) {
|
|
3117
|
-
I(
|
|
3117
|
+
I(d(this, Zt), e, !0);
|
|
3118
3118
|
}
|
|
3119
3119
|
get isLoading() {
|
|
3120
|
-
return m(
|
|
3120
|
+
return m(d(this, Kt));
|
|
3121
3121
|
}
|
|
3122
3122
|
set isLoading(e) {
|
|
3123
|
-
I(
|
|
3123
|
+
I(d(this, Kt), e, !0);
|
|
3124
3124
|
}
|
|
3125
3125
|
get hasUnreadMessages() {
|
|
3126
|
-
return m(
|
|
3126
|
+
return m(d(this, Jt));
|
|
3127
3127
|
}
|
|
3128
3128
|
set hasUnreadMessages(e) {
|
|
3129
|
-
I(
|
|
3129
|
+
I(d(this, Jt), e, !0);
|
|
3130
3130
|
}
|
|
3131
3131
|
toggle() {
|
|
3132
3132
|
this.isOpen = !this.isOpen, this.isOpen && (this.hasUnreadMessages = !1);
|
|
@@ -3151,7 +3151,7 @@ class Ko {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
}
|
|
3153
3153
|
Gt = new WeakMap(), Zt = new WeakMap(), Kt = new WeakMap(), Jt = new WeakMap();
|
|
3154
|
-
const X = new
|
|
3154
|
+
const X = new Jo(), re = {
|
|
3155
3155
|
/** Session timeout: 1 hour in milliseconds */
|
|
3156
3156
|
SESSION_TIMEOUT: 60 * 60 * 1e3,
|
|
3157
3157
|
/** WebSocket reconnection delay: 1 second */
|
|
@@ -3181,14 +3181,14 @@ const X = new Ko(), re = {
|
|
|
3181
3181
|
MIN_LENGTH: 1,
|
|
3182
3182
|
/** Maximum message queue size to prevent memory leaks */
|
|
3183
3183
|
MAX_QUEUE_SIZE: 50
|
|
3184
|
-
},
|
|
3184
|
+
}, $r = {
|
|
3185
3185
|
/** Visitor ID storage key */
|
|
3186
3186
|
VISITOR_ID: "ai_chat_visitor_id",
|
|
3187
3187
|
/** Session history storage key */
|
|
3188
3188
|
SESSIONS: "ai_chat_sessions"
|
|
3189
3189
|
};
|
|
3190
3190
|
var Xt, Qt, ei, ti, ii;
|
|
3191
|
-
class
|
|
3191
|
+
class Xo {
|
|
3192
3192
|
constructor() {
|
|
3193
3193
|
_(this, Xt);
|
|
3194
3194
|
_(this, Qt);
|
|
@@ -3198,34 +3198,34 @@ class Jo {
|
|
|
3198
3198
|
w(this, Xt, /* @__PURE__ */ M(F([]))), w(this, Qt, /* @__PURE__ */ M(null)), w(this, ei, /* @__PURE__ */ M(!1)), w(this, ti, /* @__PURE__ */ M(null)), w(this, ii, /* @__PURE__ */ M(null)), this.streamingBuffer = "", this.streamingTimeout = null;
|
|
3199
3199
|
}
|
|
3200
3200
|
get messages() {
|
|
3201
|
-
return m(
|
|
3201
|
+
return m(d(this, Xt));
|
|
3202
3202
|
}
|
|
3203
3203
|
set messages(e) {
|
|
3204
|
-
I(
|
|
3204
|
+
I(d(this, Xt), e, !0);
|
|
3205
3205
|
}
|
|
3206
3206
|
get currentSession() {
|
|
3207
|
-
return m(
|
|
3207
|
+
return m(d(this, Qt));
|
|
3208
3208
|
}
|
|
3209
3209
|
set currentSession(e) {
|
|
3210
|
-
I(
|
|
3210
|
+
I(d(this, Qt), e, !0);
|
|
3211
3211
|
}
|
|
3212
3212
|
get isTyping() {
|
|
3213
|
-
return m(
|
|
3213
|
+
return m(d(this, ei));
|
|
3214
3214
|
}
|
|
3215
3215
|
set isTyping(e) {
|
|
3216
|
-
I(
|
|
3216
|
+
I(d(this, ei), e, !0);
|
|
3217
3217
|
}
|
|
3218
3218
|
get error() {
|
|
3219
|
-
return m(
|
|
3219
|
+
return m(d(this, ti));
|
|
3220
3220
|
}
|
|
3221
3221
|
set error(e) {
|
|
3222
|
-
I(
|
|
3222
|
+
I(d(this, ti), e, !0);
|
|
3223
3223
|
}
|
|
3224
3224
|
get streamingMessageId() {
|
|
3225
|
-
return m(
|
|
3225
|
+
return m(d(this, ii));
|
|
3226
3226
|
}
|
|
3227
3227
|
set streamingMessageId(e) {
|
|
3228
|
-
I(
|
|
3228
|
+
I(d(this, ii), e, !0);
|
|
3229
3229
|
}
|
|
3230
3230
|
// Derived state
|
|
3231
3231
|
get unreadCount() {
|
|
@@ -3311,7 +3311,7 @@ class Jo {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
3313
|
Xt = new WeakMap(), Qt = new WeakMap(), ei = new WeakMap(), ti = new WeakMap(), ii = new WeakMap();
|
|
3314
|
-
const S = new
|
|
3314
|
+
const S = new Xo(), Ar = {
|
|
3315
3315
|
"client-id": "clientId",
|
|
3316
3316
|
theme: "theme",
|
|
3317
3317
|
position: "position",
|
|
@@ -3333,7 +3333,7 @@ const S = new Jo(), $r = {
|
|
|
3333
3333
|
avatarEmoji: "🤖",
|
|
3334
3334
|
debug: !1,
|
|
3335
3335
|
autoInit: !0
|
|
3336
|
-
},
|
|
3336
|
+
}, Pn = {
|
|
3337
3337
|
/**
|
|
3338
3338
|
* Convert camelCase config to snake_case for backend API
|
|
3339
3339
|
*/
|
|
@@ -3378,16 +3378,16 @@ const S = new Jo(), $r = {
|
|
|
3378
3378
|
* Convert HTML attribute name to property name
|
|
3379
3379
|
*/
|
|
3380
3380
|
attributeToProperty(t) {
|
|
3381
|
-
return
|
|
3381
|
+
return Ar[t] || null;
|
|
3382
3382
|
},
|
|
3383
3383
|
/**
|
|
3384
3384
|
* Convert property name to HTML attribute name
|
|
3385
3385
|
*/
|
|
3386
3386
|
propertyToAttribute(t) {
|
|
3387
|
-
const i = Object.entries(
|
|
3387
|
+
const i = Object.entries(Ar).find(([, s]) => s === t);
|
|
3388
3388
|
return i ? i[0] : null;
|
|
3389
3389
|
}
|
|
3390
|
-
},
|
|
3390
|
+
}, Qo = [
|
|
3391
3391
|
"modern",
|
|
3392
3392
|
"corporate",
|
|
3393
3393
|
"friendly",
|
|
@@ -3395,16 +3395,16 @@ const S = new Jo(), $r = {
|
|
|
3395
3395
|
"dark",
|
|
3396
3396
|
"light"
|
|
3397
3397
|
];
|
|
3398
|
-
function
|
|
3399
|
-
return
|
|
3398
|
+
function Un(t) {
|
|
3399
|
+
return Qo.includes(t);
|
|
3400
3400
|
}
|
|
3401
3401
|
function Ss(t) {
|
|
3402
3402
|
return !t || typeof t != "string" ? !1 : /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t);
|
|
3403
3403
|
}
|
|
3404
|
-
function
|
|
3404
|
+
function or(t, e = "#6b46c1") {
|
|
3405
3405
|
return Ss(t) ? t : e;
|
|
3406
3406
|
}
|
|
3407
|
-
function
|
|
3407
|
+
function Hn(t) {
|
|
3408
3408
|
if (!Ss(t)) return t;
|
|
3409
3409
|
if (t.length === 4) {
|
|
3410
3410
|
const e = t.slice(1);
|
|
@@ -3412,13 +3412,13 @@ function Un(t) {
|
|
|
3412
3412
|
}
|
|
3413
3413
|
return t;
|
|
3414
3414
|
}
|
|
3415
|
-
function
|
|
3416
|
-
const e =
|
|
3415
|
+
function Wn(t) {
|
|
3416
|
+
const e = Hn(t), i = parseInt(e.slice(1, 3), 16) / 255, s = parseInt(e.slice(3, 5), 16) / 255, r = parseInt(e.slice(5, 7), 16) / 255, n = Math.max(i, s, r), a = Math.min(i, s, r);
|
|
3417
3417
|
let o = 0, l = 0;
|
|
3418
|
-
const
|
|
3418
|
+
const c = (n + a) / 2;
|
|
3419
3419
|
if (n !== a) {
|
|
3420
3420
|
const u = n - a;
|
|
3421
|
-
switch (l =
|
|
3421
|
+
switch (l = c > 0.5 ? u / (2 - n - a) : u / (n + a), n) {
|
|
3422
3422
|
case i:
|
|
3423
3423
|
o = ((s - r) / u + (s < r ? 6 : 0)) / 6;
|
|
3424
3424
|
break;
|
|
@@ -3430,9 +3430,9 @@ function Hn(t) {
|
|
|
3430
3430
|
break;
|
|
3431
3431
|
}
|
|
3432
3432
|
}
|
|
3433
|
-
return { h: o * 360, s: l * 100, l:
|
|
3433
|
+
return { h: o * 360, s: l * 100, l: c * 100 };
|
|
3434
3434
|
}
|
|
3435
|
-
function
|
|
3435
|
+
function Vn(t, e, i) {
|
|
3436
3436
|
e /= 100, i /= 100;
|
|
3437
3437
|
const s = e * Math.min(i, 1 - i), r = (n) => {
|
|
3438
3438
|
const a = (n + t / 30) % 12, o = i - s * Math.max(Math.min(a - 3, 9 - a, 1), -1);
|
|
@@ -3442,20 +3442,20 @@ function Wn(t, e, i) {
|
|
|
3442
3442
|
}
|
|
3443
3443
|
function $e(t, e) {
|
|
3444
3444
|
if (!Ss(t)) return t;
|
|
3445
|
-
const i =
|
|
3446
|
-
return
|
|
3445
|
+
const i = Wn(t), s = Math.max(0, Math.min(100, i.l + e));
|
|
3446
|
+
return Vn(i.h, i.s, s);
|
|
3447
3447
|
}
|
|
3448
|
-
const
|
|
3448
|
+
const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3449
3449
|
__proto__: null,
|
|
3450
3450
|
adjustColor: $e,
|
|
3451
|
-
expandHexColor:
|
|
3452
|
-
hexToHsl:
|
|
3453
|
-
hslToHex:
|
|
3451
|
+
expandHexColor: Hn,
|
|
3452
|
+
hexToHsl: Wn,
|
|
3453
|
+
hslToHex: Vn,
|
|
3454
3454
|
isValidHexColor: Ss,
|
|
3455
|
-
sanitizeHexColor:
|
|
3455
|
+
sanitizeHexColor: or
|
|
3456
3456
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3457
|
-
var si, ri, ni, ai, oi, li,
|
|
3458
|
-
class
|
|
3457
|
+
var si, ri, ni, ai, oi, li, ci, di, ui, fi, hi, gi;
|
|
3458
|
+
class tl {
|
|
3459
3459
|
constructor() {
|
|
3460
3460
|
_(this, si);
|
|
3461
3461
|
_(this, ri);
|
|
@@ -3463,85 +3463,85 @@ class el {
|
|
|
3463
3463
|
_(this, ai);
|
|
3464
3464
|
_(this, oi);
|
|
3465
3465
|
_(this, li);
|
|
3466
|
-
_(this, di);
|
|
3467
3466
|
_(this, ci);
|
|
3467
|
+
_(this, di);
|
|
3468
3468
|
_(this, ui);
|
|
3469
3469
|
_(this, fi);
|
|
3470
3470
|
_(this, hi);
|
|
3471
3471
|
_(this, gi);
|
|
3472
|
-
w(this, si, /* @__PURE__ */ M("")), w(this, ri, /* @__PURE__ */ M(F(Ie.theme))), w(this, ni, /* @__PURE__ */ M(F(Ie.position))), w(this, ai, /* @__PURE__ */ M(F(Ie.title))), w(this, oi, /* @__PURE__ */ M(F(Ie.logoUrl))), w(this, li, /* @__PURE__ */ M(F(Ie.placeholder))), w(this,
|
|
3472
|
+
w(this, si, /* @__PURE__ */ M("")), w(this, ri, /* @__PURE__ */ M(F(Ie.theme))), w(this, ni, /* @__PURE__ */ M(F(Ie.position))), w(this, ai, /* @__PURE__ */ M(F(Ie.title))), w(this, oi, /* @__PURE__ */ M(F(Ie.logoUrl))), w(this, li, /* @__PURE__ */ M(F(Ie.placeholder))), w(this, ci, /* @__PURE__ */ M(F(Ie.accentColor))), w(this, di, /* @__PURE__ */ M(F(Ie.avatarEmoji))), w(this, ui, /* @__PURE__ */ M(F(Ie.companyName))), w(this, fi, /* @__PURE__ */ M(F(Ie.apiUrl))), w(this, hi, /* @__PURE__ */ M(F(Ie.wsUrl))), w(this, gi, /* @__PURE__ */ M("default"));
|
|
3473
3473
|
}
|
|
3474
3474
|
get clientId() {
|
|
3475
|
-
return m(
|
|
3475
|
+
return m(d(this, si));
|
|
3476
3476
|
}
|
|
3477
3477
|
set clientId(e) {
|
|
3478
|
-
I(
|
|
3478
|
+
I(d(this, si), e, !0);
|
|
3479
3479
|
}
|
|
3480
3480
|
get theme() {
|
|
3481
|
-
return m(
|
|
3481
|
+
return m(d(this, ri));
|
|
3482
3482
|
}
|
|
3483
3483
|
set theme(e) {
|
|
3484
|
-
I(
|
|
3484
|
+
I(d(this, ri), e, !0);
|
|
3485
3485
|
}
|
|
3486
3486
|
get position() {
|
|
3487
|
-
return m(
|
|
3487
|
+
return m(d(this, ni));
|
|
3488
3488
|
}
|
|
3489
3489
|
set position(e) {
|
|
3490
|
-
I(
|
|
3490
|
+
I(d(this, ni), e, !0);
|
|
3491
3491
|
}
|
|
3492
3492
|
get title() {
|
|
3493
|
-
return m(
|
|
3493
|
+
return m(d(this, ai));
|
|
3494
3494
|
}
|
|
3495
3495
|
set title(e) {
|
|
3496
|
-
I(
|
|
3496
|
+
I(d(this, ai), e, !0);
|
|
3497
3497
|
}
|
|
3498
3498
|
get logoUrl() {
|
|
3499
|
-
return m(
|
|
3499
|
+
return m(d(this, oi));
|
|
3500
3500
|
}
|
|
3501
3501
|
set logoUrl(e) {
|
|
3502
|
-
I(
|
|
3502
|
+
I(d(this, oi), e, !0);
|
|
3503
3503
|
}
|
|
3504
3504
|
get placeholder() {
|
|
3505
|
-
return m(
|
|
3505
|
+
return m(d(this, li));
|
|
3506
3506
|
}
|
|
3507
3507
|
set placeholder(e) {
|
|
3508
|
-
I(
|
|
3508
|
+
I(d(this, li), e, !0);
|
|
3509
3509
|
}
|
|
3510
3510
|
get accentColor() {
|
|
3511
|
-
return m(
|
|
3511
|
+
return m(d(this, ci));
|
|
3512
3512
|
}
|
|
3513
3513
|
set accentColor(e) {
|
|
3514
|
-
I(
|
|
3514
|
+
I(d(this, ci), e, !0);
|
|
3515
3515
|
}
|
|
3516
3516
|
get avatarEmoji() {
|
|
3517
|
-
return m(
|
|
3517
|
+
return m(d(this, di));
|
|
3518
3518
|
}
|
|
3519
3519
|
set avatarEmoji(e) {
|
|
3520
|
-
I(
|
|
3520
|
+
I(d(this, di), e, !0);
|
|
3521
3521
|
}
|
|
3522
3522
|
get companyName() {
|
|
3523
|
-
return m(
|
|
3523
|
+
return m(d(this, ui));
|
|
3524
3524
|
}
|
|
3525
3525
|
set companyName(e) {
|
|
3526
|
-
I(
|
|
3526
|
+
I(d(this, ui), e, !0);
|
|
3527
3527
|
}
|
|
3528
3528
|
get apiUrl() {
|
|
3529
|
-
return m(
|
|
3529
|
+
return m(d(this, fi));
|
|
3530
3530
|
}
|
|
3531
3531
|
set apiUrl(e) {
|
|
3532
|
-
I(
|
|
3532
|
+
I(d(this, fi), e, !0);
|
|
3533
3533
|
}
|
|
3534
3534
|
get wsUrl() {
|
|
3535
|
-
return m(
|
|
3535
|
+
return m(d(this, hi));
|
|
3536
3536
|
}
|
|
3537
3537
|
set wsUrl(e) {
|
|
3538
|
-
I(
|
|
3538
|
+
I(d(this, hi), e, !0);
|
|
3539
3539
|
}
|
|
3540
3540
|
get titleSource() {
|
|
3541
|
-
return m(
|
|
3541
|
+
return m(d(this, gi));
|
|
3542
3542
|
}
|
|
3543
3543
|
set titleSource(e) {
|
|
3544
|
-
I(
|
|
3544
|
+
I(d(this, gi), e, !0);
|
|
3545
3545
|
}
|
|
3546
3546
|
updateConfig(e, i = "default") {
|
|
3547
3547
|
if (e.title !== void 0) {
|
|
@@ -3588,7 +3588,7 @@ class el {
|
|
|
3588
3588
|
parseElementAttributes(e) {
|
|
3589
3589
|
const i = {}, s = e.getAttributeNames();
|
|
3590
3590
|
for (const r of s) {
|
|
3591
|
-
const n =
|
|
3591
|
+
const n = Pn.attributeToProperty(r);
|
|
3592
3592
|
if (!n) continue;
|
|
3593
3593
|
const a = e.getAttribute(r);
|
|
3594
3594
|
if (a)
|
|
@@ -3603,10 +3603,10 @@ class el {
|
|
|
3603
3603
|
i[n] = a;
|
|
3604
3604
|
break;
|
|
3605
3605
|
case "accentColor":
|
|
3606
|
-
i.accentColor =
|
|
3606
|
+
i.accentColor = or(a, this.accentColor);
|
|
3607
3607
|
break;
|
|
3608
3608
|
case "theme":
|
|
3609
|
-
|
|
3609
|
+
Un(a) && (i.theme = a);
|
|
3610
3610
|
break;
|
|
3611
3611
|
case "position":
|
|
3612
3612
|
(a === "bottom-left" || a === "bottom-right") && (i.position = a);
|
|
@@ -3630,13 +3630,13 @@ class el {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
// Remove duplicate adjustColor method - using shared utility from color.ts
|
|
3632
3632
|
}
|
|
3633
|
-
si = new WeakMap(), ri = new WeakMap(), ni = new WeakMap(), ai = new WeakMap(), oi = new WeakMap(), li = new WeakMap(),
|
|
3634
|
-
const jt = new
|
|
3633
|
+
si = new WeakMap(), ri = new WeakMap(), ni = new WeakMap(), ai = new WeakMap(), oi = new WeakMap(), li = new WeakMap(), ci = new WeakMap(), di = new WeakMap(), ui = new WeakMap(), fi = new WeakMap(), hi = new WeakMap(), gi = new WeakMap();
|
|
3634
|
+
const jt = new tl(), il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3635
3635
|
__proto__: null,
|
|
3636
3636
|
configStore: jt
|
|
3637
3637
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3638
|
-
var
|
|
3639
|
-
const
|
|
3638
|
+
var sl = /* @__PURE__ */ Ln('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-bkcus6"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="currentColor" class="svelte-bkcus6"></path><path d="M12 6C9.79 6 8 7.79 8 10C8 12.21 9.79 14 12 14C14.21 14 16 12.21 16 10C16 7.79 14.21 6 12 6ZM12 12C10.9 12 10 11.1 10 10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 11.1 13.1 12 12 12Z" fill="currentColor" class="svelte-bkcus6"></path><path d="M12 15C9.33 15 4 16.34 4 19V20H20V19C20 16.34 14.67 15 12 15ZM6.03 18C6.47 17.28 9.09 17 12 17C14.91 17 17.53 17.28 17.97 18H6.03Z" fill="currentColor" class="svelte-bkcus6"></path></svg>'), rl = /* @__PURE__ */ Ln('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-bkcus6"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z" fill="currentColor" class="svelte-bkcus6"></path></svg>'), nl = /* @__PURE__ */ V('<span class="unread-indicator svelte-bkcus6"></span>'), al = /* @__PURE__ */ V("<button><!> <!></button>");
|
|
3639
|
+
const ol = {
|
|
3640
3640
|
hash: "svelte-bkcus6",
|
|
3641
3641
|
code: `.floating-button.svelte-bkcus6 {width:60px;height:60px;border-radius:var(--widget-radius-full);background:var(--widget-gradient);border:none;color:var(--widget-text-inverse);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--widget-shadow-lg);transition:all var(--widget-transition);position:relative;
|
|
3642
3642
|
animation: fadeIn var(--widget-transition);}
|
|
@@ -3653,8 +3653,8 @@ const al = {
|
|
|
3653
3653
|
}
|
|
3654
3654
|
}`
|
|
3655
3655
|
};
|
|
3656
|
-
function
|
|
3657
|
-
|
|
3656
|
+
function jn(t, e) {
|
|
3657
|
+
dt(e, !0), Lt(t, ol);
|
|
3658
3658
|
let i = yi(e, "onclick", 7);
|
|
3659
3659
|
const s = /* @__PURE__ */ Ke(() => X.isOpen), r = /* @__PURE__ */ Ke(() => X.hasUnreadMessages);
|
|
3660
3660
|
function n() {
|
|
@@ -3668,26 +3668,26 @@ function Vn(t, e) {
|
|
|
3668
3668
|
set onclick(f) {
|
|
3669
3669
|
i(f), lt();
|
|
3670
3670
|
}
|
|
3671
|
-
}, o =
|
|
3671
|
+
}, o = al();
|
|
3672
3672
|
let l;
|
|
3673
3673
|
o.__click = n;
|
|
3674
|
-
var
|
|
3674
|
+
var c = Y(o);
|
|
3675
3675
|
{
|
|
3676
3676
|
var u = (f) => {
|
|
3677
|
-
var g =
|
|
3677
|
+
var g = sl();
|
|
3678
3678
|
N(f, g);
|
|
3679
3679
|
}, h = (f) => {
|
|
3680
|
-
var g =
|
|
3680
|
+
var g = rl();
|
|
3681
3681
|
N(f, g);
|
|
3682
3682
|
};
|
|
3683
|
-
he(
|
|
3683
|
+
he(c, (f) => {
|
|
3684
3684
|
m(s) ? f(h, !1) : f(u);
|
|
3685
3685
|
});
|
|
3686
3686
|
}
|
|
3687
|
-
var v = se(
|
|
3687
|
+
var v = se(c, 2);
|
|
3688
3688
|
{
|
|
3689
3689
|
var p = (f) => {
|
|
3690
|
-
var g =
|
|
3690
|
+
var g = nl();
|
|
3691
3691
|
N(f, g);
|
|
3692
3692
|
};
|
|
3693
3693
|
he(v, (f) => {
|
|
@@ -3695,13 +3695,13 @@ function Vn(t, e) {
|
|
|
3695
3695
|
});
|
|
3696
3696
|
}
|
|
3697
3697
|
return B(o), kt(() => {
|
|
3698
|
-
l =
|
|
3698
|
+
l = zn(o, 1, "floating-button svelte-bkcus6", null, l, { open: m(s) }), bi(o, "aria-label", m(s) ? "Close chat" : "Open chat");
|
|
3699
3699
|
}), N(t, o), ut(a);
|
|
3700
3700
|
}
|
|
3701
3701
|
xs(["click"]);
|
|
3702
|
-
Ot(
|
|
3703
|
-
var
|
|
3704
|
-
const
|
|
3702
|
+
Ot(jn, { onclick: {} }, [], [], !0);
|
|
3703
|
+
var ll = /* @__PURE__ */ V('<img alt="Logo" class="header-logo svelte-g5m62x"/>'), cl = /* @__PURE__ */ V('<div class="header-icon svelte-g5m62x"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-g5m62x"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="currentColor"></path><circle cx="12" cy="12" r="3" fill="currentColor"></circle></svg></div>'), dl = /* @__PURE__ */ V('<header class="chat-header svelte-g5m62x"><div class="header-left svelte-g5m62x"><!></div> <div class="header-center svelte-g5m62x"><h2 class="header-title svelte-g5m62x"> </h2> <span class="header-status svelte-g5m62x">Online</span></div> <div class="header-right svelte-g5m62x"><button class="close-button svelte-g5m62x" aria-label="Close chat"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-g5m62x"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z" fill="currentColor"></path></svg></button></div></header>');
|
|
3704
|
+
const ul = {
|
|
3705
3705
|
hash: "svelte-g5m62x",
|
|
3706
3706
|
code: `.chat-header.svelte-g5m62x {display:flex;align-items:center;padding:var(--widget-space-sm) var(--widget-space-md);background:var(--widget-surface-elevated);color:var(--widget-text);border-radius:var(--widget-radius-xl) var(--widget-radius-xl) 0 0;border-bottom:1px solid var(--widget-border-subtle);gap:var(--widget-space-sm);position:relative;box-shadow:var(--widget-shadow-sm);min-height:48px; /* Maximum space optimization */}
|
|
3707
3707
|
|
|
@@ -3711,8 +3711,8 @@ const cl = {
|
|
|
3711
3711
|
animation: pulse 2s ease-in-out infinite;}.header-right.svelte-g5m62x {display:flex;align-items:center;gap:var(--widget-space-sm);
|
|
3712
3712
|
animation: fadeIn var(--widget-transition);}.close-button.svelte-g5m62x {background:var(--widget-surface);border:1px solid var(--widget-border-light);color:var(--widget-text-secondary);cursor:pointer;padding:var(--widget-space-xs);display:flex;align-items:center;justify-content:center;border-radius:var(--widget-radius-md);transition:all var(--widget-transition);box-shadow:var(--widget-shadow-sm);}.close-button.svelte-g5m62x:hover {background:var(--widget-surface-hover);color:var(--widget-text);border-color:var(--widget-border);transform:scale(1.05);}.close-button.svelte-g5m62x:active {transform:scale(0.98);box-shadow:var(--widget-shadow-inner);}.close-button.svelte-g5m62x svg:where(.svelte-g5m62x) {width:16px;height:16px;transition:transform var(--widget-transition);}`
|
|
3713
3713
|
};
|
|
3714
|
-
function
|
|
3715
|
-
|
|
3714
|
+
function qn(t, e) {
|
|
3715
|
+
dt(e, !0), Lt(t, ul);
|
|
3716
3716
|
let i = yi(e, "onclose", 7);
|
|
3717
3717
|
function s() {
|
|
3718
3718
|
var g;
|
|
@@ -3728,26 +3728,26 @@ function jn(t, e) {
|
|
|
3728
3728
|
}, n = dl(), a = Y(n), o = Y(a);
|
|
3729
3729
|
{
|
|
3730
3730
|
var l = (g) => {
|
|
3731
|
-
var y = ol();
|
|
3732
|
-
kt(() => bi(y, "src", jt.logoUrl)), N(g, y);
|
|
3733
|
-
}, d = (g) => {
|
|
3734
3731
|
var y = ll();
|
|
3732
|
+
kt(() => bi(y, "src", jt.logoUrl)), N(g, y);
|
|
3733
|
+
}, c = (g) => {
|
|
3734
|
+
var y = cl();
|
|
3735
3735
|
N(g, y);
|
|
3736
3736
|
};
|
|
3737
3737
|
he(o, (g) => {
|
|
3738
|
-
jt.logoUrl ? g(l) : g(
|
|
3738
|
+
jt.logoUrl ? g(l) : g(c, !1);
|
|
3739
3739
|
});
|
|
3740
3740
|
}
|
|
3741
3741
|
B(a);
|
|
3742
3742
|
var u = se(a, 2), h = Y(u), v = Y(h, !0);
|
|
3743
3743
|
B(h), ns(2), B(u);
|
|
3744
3744
|
var p = se(u, 2), f = Y(p);
|
|
3745
|
-
return f.__click = s, B(p), B(n), kt(() =>
|
|
3745
|
+
return f.__click = s, B(p), B(n), kt(() => ds(v, jt.title)), N(t, n), ut(r);
|
|
3746
3746
|
}
|
|
3747
3747
|
xs(["click"]);
|
|
3748
|
-
Ot(
|
|
3749
|
-
var
|
|
3750
|
-
const
|
|
3748
|
+
Ot(qn, { onclose: {} }, [], [], !0);
|
|
3749
|
+
var fl = /* @__PURE__ */ V('<span class="sending-indicator svelte-1uqoiy7" aria-label="Sending message" role="status"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="svelte-1uqoiy7"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="currentColor" opacity="0.3"></path><path d="M12 2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4V2Z" fill="currentColor"><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"></animateTransform></path></svg></span>'), hl = /* @__PURE__ */ V('<span class="failed-indicator svelte-1uqoiy7" aria-label="Message failed to send" role="alert"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="svelte-1uqoiy7"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="#ef4444"></path><path d="M11 7H13V13H11V7ZM11 15H13V17H11V15Z" fill="#ef4444"></path></svg></span>'), gl = /* @__PURE__ */ V('<div role="listitem"><div class="message-bubble svelte-1uqoiy7"><span class="message-content"> </span> <!> <!></div> <div class="message-time svelte-1uqoiy7"> </div></div>');
|
|
3750
|
+
const pl = {
|
|
3751
3751
|
hash: "svelte-1uqoiy7",
|
|
3752
3752
|
code: `.message.svelte-1uqoiy7 {max-width:85%; /* Slightly wider for card design */display:flex;flex-direction:column;gap:var(--widget-space-xs);
|
|
3753
3753
|
animation: fadeIn var(--widget-transition) ease-out;margin-bottom:var(--widget-space-md); /* Better spacing between cards */}.message.user.svelte-1uqoiy7 {align-self:flex-end;align-items:flex-end;}.message.assistant.svelte-1uqoiy7 {align-self:flex-start;align-items:flex-start;}.message-bubble.svelte-1uqoiy7 {padding:var(--widget-space-sm) var(--widget-space-md);border-radius:var(--widget-radius-xl); /* More rounded for modern card look */font-size:var(--widget-font-size-base);line-height:var(--widget-line-height-normal);font-weight:var(--widget-font-weight-normal);word-wrap:break-word;position:relative;display:inline-flex;align-items:flex-start; /* Better for multi-line text */gap:var(--widget-space-sm);box-shadow:var(--widget-shadow-card);transition:all var(--widget-transition);font-family:var(--widget-font-family);border:1px solid var(--widget-border-subtle);}.message.user.svelte-1uqoiy7 .message-bubble:where(.svelte-1uqoiy7) {background:var(--widget-primary);color:var(--widget-text-inverse);border-color:var(--widget-primary);box-shadow:var(--widget-shadow-card);font-weight:var(--widget-font-weight-medium); /* Slightly bolder for user messages */}.message.assistant.svelte-1uqoiy7 .message-bubble:where(.svelte-1uqoiy7) {background:var(--widget-surface-elevated);color:var(--widget-text);border-color:var(--widget-border-light);box-shadow:var(--widget-shadow-card);}.message-bubble.svelte-1uqoiy7:hover {box-shadow:var(--widget-shadow-md);transform:translateY(-1px);}.message-time.svelte-1uqoiy7 {font-size:var(--widget-font-size-xs);color:var(--widget-text-subtle);font-weight:var(--widget-font-weight-medium);padding:0 var(--widget-space-md);margin-top:var(--widget-space-xs);letter-spacing:var(--widget-letter-spacing-wide);}.sending-indicator.svelte-1uqoiy7,
|
|
@@ -3761,8 +3761,8 @@ const gl = {
|
|
|
3761
3761
|
|
|
3762
3762
|
/* Theme adjustments can be added here if needed */`
|
|
3763
3763
|
};
|
|
3764
|
-
function
|
|
3765
|
-
|
|
3764
|
+
function Fn(t, e) {
|
|
3765
|
+
dt(e, !0), Lt(t, pl);
|
|
3766
3766
|
let i = yi(e, "message", 7);
|
|
3767
3767
|
function s(x) {
|
|
3768
3768
|
return new Intl.DateTimeFormat("en-US", { hour: "numeric", minute: "2-digit", hour12: !0 }).format(x);
|
|
@@ -3775,14 +3775,14 @@ function qn(t, e) {
|
|
|
3775
3775
|
set message(x) {
|
|
3776
3776
|
i(x), lt();
|
|
3777
3777
|
}
|
|
3778
|
-
}, a =
|
|
3778
|
+
}, a = gl();
|
|
3779
3779
|
let o;
|
|
3780
|
-
var l = Y(a),
|
|
3781
|
-
B(
|
|
3782
|
-
var h = se(
|
|
3780
|
+
var l = Y(a), c = Y(l), u = Y(c, !0);
|
|
3781
|
+
B(c);
|
|
3782
|
+
var h = se(c, 2);
|
|
3783
3783
|
{
|
|
3784
3784
|
var v = (x) => {
|
|
3785
|
-
var $ =
|
|
3785
|
+
var $ = fl();
|
|
3786
3786
|
N(x, $);
|
|
3787
3787
|
};
|
|
3788
3788
|
he(h, (x) => {
|
|
@@ -3792,7 +3792,7 @@ function qn(t, e) {
|
|
|
3792
3792
|
var p = se(h, 2);
|
|
3793
3793
|
{
|
|
3794
3794
|
var f = (x) => {
|
|
3795
|
-
var $ =
|
|
3795
|
+
var $ = hl();
|
|
3796
3796
|
N(x, $);
|
|
3797
3797
|
};
|
|
3798
3798
|
he(p, (x) => {
|
|
@@ -3803,7 +3803,7 @@ function qn(t, e) {
|
|
|
3803
3803
|
var g = se(l, 2), y = Y(g, !0);
|
|
3804
3804
|
return B(g), B(a), kt(
|
|
3805
3805
|
(x, $) => {
|
|
3806
|
-
o =
|
|
3806
|
+
o = zn(a, 1, "message svelte-1uqoiy7", null, o, { user: m(r), assistant: !m(r) }), bi(a, "aria-label", m(r) ? "Your message" : "Assistant message"), ds(u, i().content), bi(g, "aria-label", x), ds(y, $);
|
|
3807
3807
|
},
|
|
3808
3808
|
[
|
|
3809
3809
|
() => `Sent at ${s(i().timestamp)}`,
|
|
@@ -3811,10 +3811,10 @@ function qn(t, e) {
|
|
|
3811
3811
|
]
|
|
3812
3812
|
), N(t, a), ut(n);
|
|
3813
3813
|
}
|
|
3814
|
-
Ot(
|
|
3815
|
-
|
|
3816
|
-
var
|
|
3817
|
-
const
|
|
3814
|
+
Ot(Fn, { message: {} }, [], [], !0);
|
|
3815
|
+
Fa();
|
|
3816
|
+
var vl = /* @__PURE__ */ V('<div class="typing-indicator svelte-ej4x60" role="status" aria-live="polite" aria-label="Assistant is typing"><span aria-hidden="true" class="svelte-ej4x60"></span> <span aria-hidden="true" class="svelte-ej4x60"></span> <span aria-hidden="true" class="svelte-ej4x60"></span> <span class="sr-only svelte-ej4x60">Assistant is typing a response</span></div>');
|
|
3817
|
+
const ml = {
|
|
3818
3818
|
hash: "svelte-ej4x60",
|
|
3819
3819
|
code: `.typing-indicator.svelte-ej4x60 {display:inline-flex;align-items:center;justify-content:center;gap:var(--widget-space-xs);padding:var(--widget-space-sm) var(--widget-space-md);background:var(--widget-surface-elevated);border:1px solid var(--widget-border-subtle);border-radius:var(--widget-radius-2xl);box-shadow:var(--widget-shadow-card);margin-bottom:var(--widget-space-md);width:fit-content;
|
|
3820
3820
|
animation: svelte-ej4x60-fadeInScale 0.3s ease-out;}
|
|
@@ -3835,12 +3835,12 @@ const vl = {
|
|
|
3835
3835
|
|
|
3836
3836
|
/* Screen reader only content */.sr-only.svelte-ej4x60 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`
|
|
3837
3837
|
};
|
|
3838
|
-
function
|
|
3839
|
-
|
|
3840
|
-
var i =
|
|
3838
|
+
function Bn(t, e) {
|
|
3839
|
+
dt(e, !1), Lt(t, ml), Ho();
|
|
3840
|
+
var i = So(), s = ts(i);
|
|
3841
3841
|
{
|
|
3842
3842
|
var r = (n) => {
|
|
3843
|
-
var a =
|
|
3843
|
+
var a = vl();
|
|
3844
3844
|
N(n, a);
|
|
3845
3845
|
};
|
|
3846
3846
|
he(s, (n) => {
|
|
@@ -3849,9 +3849,9 @@ function Fn(t, e) {
|
|
|
3849
3849
|
}
|
|
3850
3850
|
N(t, i), ut();
|
|
3851
3851
|
}
|
|
3852
|
-
Ot(
|
|
3853
|
-
var
|
|
3854
|
-
const
|
|
3852
|
+
Ot(Bn, {}, [], [], !0);
|
|
3853
|
+
var wl = /* @__PURE__ */ V('<div class="empty-state svelte-qha2j" role="status" aria-label="No messages yet"><div class="empty-icon svelte-qha2j" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-qha2j"><path d="M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM20 16H6L4 18V4H20V16Z" fill="currentColor"></path><path d="M7 9H17V11H7V9ZM7 6H17V8H7V6ZM7 12H14V14H7V12Z" fill="currentColor"></path></svg></div> <p class="svelte-qha2j">Start a conversation</p> <span class="svelte-qha2j">Ask me anything!</span></div>'), bl = /* @__PURE__ */ V('<div class="messages-container svelte-qha2j" role="list" aria-label="Messages"><!> <!></div>'), yl = /* @__PURE__ */ V('<div class="error-message svelte-qha2j"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-qha2j"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="#ef4444"></path><path d="M11 7H13V13H11V7ZM11 15H13V17H11V15Z" fill="#ef4444"></path></svg> <p class="svelte-qha2j"> </p></div>'), _l = /* @__PURE__ */ V('<div class="message-list svelte-qha2j" role="log" aria-live="polite" aria-label="Chat conversation"><!> <!></div>');
|
|
3854
|
+
const xl = {
|
|
3855
3855
|
hash: "svelte-qha2j",
|
|
3856
3856
|
code: `.message-list.svelte-qha2j {flex:1;overflow-y:auto;padding:var(--widget-space-lg);display:flex;flex-direction:column;background:var(--widget-gradient-subtle);position:relative;}.empty-state.svelte-qha2j {display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;text-align:center;padding:var(--widget-space-3xl) var(--widget-space-lg);
|
|
3857
3857
|
animation: fadeIn var(--widget-transition-slow);}.empty-icon.svelte-qha2j {width:80px;height:80px;margin-bottom:var(--widget-space-lg);background:var(--widget-glass);backdrop-filter:blur(var(--widget-blur));border-radius:var(--widget-radius-2xl);display:flex;align-items:center;justify-content:center;box-shadow:var(--widget-shadow-md);
|
|
@@ -3862,8 +3862,8 @@ const _l = {
|
|
|
3862
3862
|
|
|
3863
3863
|
/* Dark theme adjustments */`
|
|
3864
3864
|
};
|
|
3865
|
-
function
|
|
3866
|
-
|
|
3865
|
+
function Yn(t, e) {
|
|
3866
|
+
dt(e, !0), Lt(t, xl);
|
|
3867
3867
|
let i, s = !0;
|
|
3868
3868
|
Vt(() => {
|
|
3869
3869
|
S.messages, s && r();
|
|
@@ -3873,7 +3873,7 @@ function Bn(t, e) {
|
|
|
3873
3873
|
S.isStreaming, s && S.isStreaming && r();
|
|
3874
3874
|
});
|
|
3875
3875
|
async function r() {
|
|
3876
|
-
await
|
|
3876
|
+
await Tn(), i && (i.scrollTop = i.scrollHeight);
|
|
3877
3877
|
}
|
|
3878
3878
|
function n() {
|
|
3879
3879
|
if (i) {
|
|
@@ -3881,44 +3881,44 @@ function Bn(t, e) {
|
|
|
3881
3881
|
s = p - v - f < 100;
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
3884
|
-
|
|
3884
|
+
ar(() => {
|
|
3885
3885
|
r();
|
|
3886
3886
|
});
|
|
3887
|
-
var a =
|
|
3887
|
+
var a = _l(), o = Y(a);
|
|
3888
3888
|
{
|
|
3889
3889
|
var l = (v) => {
|
|
3890
|
-
var p =
|
|
3890
|
+
var p = wl();
|
|
3891
3891
|
N(v, p);
|
|
3892
|
-
},
|
|
3893
|
-
var p =
|
|
3894
|
-
|
|
3895
|
-
|
|
3892
|
+
}, c = (v) => {
|
|
3893
|
+
var p = bl(), f = Y(p);
|
|
3894
|
+
To(f, 17, () => S.messages, (y) => y.id, (y, x) => {
|
|
3895
|
+
Fn(y, {
|
|
3896
3896
|
get message() {
|
|
3897
3897
|
return m(x);
|
|
3898
3898
|
}
|
|
3899
3899
|
});
|
|
3900
3900
|
});
|
|
3901
3901
|
var g = se(f, 2);
|
|
3902
|
-
|
|
3902
|
+
Bn(g, {}), B(p), N(v, p);
|
|
3903
3903
|
};
|
|
3904
3904
|
he(o, (v) => {
|
|
3905
|
-
S.messages.length === 0 ? v(l) : v(
|
|
3905
|
+
S.messages.length === 0 ? v(l) : v(c, !1);
|
|
3906
3906
|
});
|
|
3907
3907
|
}
|
|
3908
3908
|
var u = se(o, 2);
|
|
3909
3909
|
{
|
|
3910
3910
|
var h = (v) => {
|
|
3911
|
-
var p =
|
|
3912
|
-
B(f), B(p), kt(() =>
|
|
3911
|
+
var p = yl(), f = se(Y(p), 2), g = Y(f, !0);
|
|
3912
|
+
B(f), B(p), kt(() => ds(g, S.error)), N(v, p);
|
|
3913
3913
|
};
|
|
3914
3914
|
he(u, (v) => {
|
|
3915
3915
|
S.error && v(h);
|
|
3916
3916
|
});
|
|
3917
3917
|
}
|
|
3918
|
-
B(a),
|
|
3918
|
+
B(a), Rn(a, (v) => i = v, () => i), _o("scroll", a, n), N(t, a), ut();
|
|
3919
3919
|
}
|
|
3920
|
-
Ot(
|
|
3921
|
-
class
|
|
3920
|
+
Ot(Yn, {}, [], [], !0);
|
|
3921
|
+
class Sl {
|
|
3922
3922
|
constructor(e) {
|
|
3923
3923
|
this.isDebugMode = e.debug ?? !1;
|
|
3924
3924
|
}
|
|
@@ -3953,25 +3953,26 @@ class xl {
|
|
|
3953
3953
|
return this.isDebugMode;
|
|
3954
3954
|
}
|
|
3955
3955
|
}
|
|
3956
|
-
function
|
|
3957
|
-
return new
|
|
3956
|
+
function lr(t) {
|
|
3957
|
+
return new Sl(t);
|
|
3958
|
+
}
|
|
3959
|
+
function Ms() {
|
|
3960
|
+
var t;
|
|
3961
|
+
try {
|
|
3962
|
+
return typeof process < "u" && ((t = process.env) == null ? void 0 : t.NODE_ENV) === "test" ? process.env.ENABLE_TEST_DEBUG === "true" : localStorage.getItem("ai-widget-debug") === "true" || window._aiWidgetDebug === !0 || !1;
|
|
3963
|
+
} catch {
|
|
3964
|
+
return !1;
|
|
3965
|
+
}
|
|
3958
3966
|
}
|
|
3959
3967
|
const O = {
|
|
3960
|
-
isDebugEnabled
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
return typeof process < "u" && ((t = process.env) == null ? void 0 : t.NODE_ENV) === "test" ? process.env.ENABLE_TEST_DEBUG === "true" : localStorage.getItem("ai-widget-debug") === "true" || window._aiWidgetDebug === !0 || !1;
|
|
3964
|
-
} catch {
|
|
3965
|
-
return !1;
|
|
3966
|
-
}
|
|
3968
|
+
isDebugEnabled: Ms,
|
|
3969
|
+
log: (t, e, i) => {
|
|
3970
|
+
Ms() && (i !== void 0 ? console.log(`[${t}] ${e}:`, i) : console.log(`[${t}] ${e}`));
|
|
3967
3971
|
},
|
|
3968
|
-
|
|
3969
|
-
|
|
3972
|
+
warn: (t, e, i) => {
|
|
3973
|
+
Ms() && (i !== void 0 ? console.warn(`[${t}] ${e}:`, i) : console.warn(`[${t}] ${e}`));
|
|
3970
3974
|
},
|
|
3971
|
-
|
|
3972
|
-
this.isDebugEnabled() && (i !== void 0 ? console.warn(`[${t}] ${e}:`, i) : console.warn(`[${t}] ${e}`));
|
|
3973
|
-
},
|
|
3974
|
-
error(t, e, i) {
|
|
3975
|
+
error: (t, e, i) => {
|
|
3975
3976
|
i !== void 0 ? console.error(`[${t}] ${e}:`, i) : console.error(`[${t}] ${e}`);
|
|
3976
3977
|
}
|
|
3977
3978
|
};
|
|
@@ -4061,8 +4062,8 @@ class Dt {
|
|
|
4061
4062
|
function He() {
|
|
4062
4063
|
return Dt.getInstance();
|
|
4063
4064
|
}
|
|
4064
|
-
var
|
|
4065
|
-
const
|
|
4065
|
+
var Cl = /* @__PURE__ */ V('<div class="input-bar svelte-1a8gd73"><textarea class="input-field svelte-1a8gd73" rows="1" aria-label="Message input"></textarea> <button class="send-button svelte-1a8gd73" aria-label="Send message"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-1a8gd73"><path d="M2 21L23 12L2 3V10L17 12L2 14V21Z" fill="currentColor"></path></svg></button></div>');
|
|
4066
|
+
const El = {
|
|
4066
4067
|
hash: "svelte-1a8gd73",
|
|
4067
4068
|
code: `.input-bar.svelte-1a8gd73 {display:flex;align-items:flex-end;gap:var(--widget-space-sm);padding:var(--widget-space-sm) var(--widget-space-md);background:var(--widget-surface-elevated);border-top:1px solid var(--widget-border-subtle);border-radius:0 0 var(--widget-radius-xl) var(--widget-radius-xl);position:relative;min-height:48px; /* Maximum space optimization */}
|
|
4068
4069
|
|
|
@@ -4077,8 +4078,8 @@ const Cl = {
|
|
|
4077
4078
|
|
|
4078
4079
|
/* Theme adjustments */`
|
|
4079
4080
|
};
|
|
4080
|
-
function
|
|
4081
|
-
|
|
4081
|
+
function Gn(t, e) {
|
|
4082
|
+
dt(e, !0), Lt(t, El);
|
|
4082
4083
|
let i = yi(e, "onsend", 7), s = yi(e, "disabled", 7, !1), r = /* @__PURE__ */ M(""), n;
|
|
4083
4084
|
function a() {
|
|
4084
4085
|
var x, $, q, oe;
|
|
@@ -4120,7 +4121,7 @@ function Yn(t, e) {
|
|
|
4120
4121
|
function l() {
|
|
4121
4122
|
n && (n.style.height = "auto", n.style.height = Math.min(n.scrollHeight, 120) + "px");
|
|
4122
4123
|
}
|
|
4123
|
-
const
|
|
4124
|
+
const c = /* @__PURE__ */ Ke(() => s() || S.isTyping || S.error !== null), u = /* @__PURE__ */ Ke(() => S.isTyping ? "Waiting for response..." : S.error ? "Error occurred" : jt.placeholder);
|
|
4124
4125
|
var h = {
|
|
4125
4126
|
get onsend() {
|
|
4126
4127
|
return i();
|
|
@@ -4134,19 +4135,19 @@ function Yn(t, e) {
|
|
|
4134
4135
|
set disabled(g = !1) {
|
|
4135
4136
|
s(g), lt();
|
|
4136
4137
|
}
|
|
4137
|
-
}, v =
|
|
4138
|
-
|
|
4138
|
+
}, v = Cl(), p = Y(v);
|
|
4139
|
+
so(p), p.__keydown = o, p.__input = l, Rn(p, (g) => n = g, () => n);
|
|
4139
4140
|
var f = se(p, 2);
|
|
4140
4141
|
return f.__click = a, B(v), kt(
|
|
4141
4142
|
(g) => {
|
|
4142
|
-
bi(p, "placeholder", m(u)), p.disabled = m(
|
|
4143
|
+
bi(p, "placeholder", m(u)), p.disabled = m(c), f.disabled = g;
|
|
4143
4144
|
},
|
|
4144
|
-
[() => m(
|
|
4145
|
-
),
|
|
4145
|
+
[() => m(c) || !m(r).trim()]
|
|
4146
|
+
), Uo(p, () => m(r), (g) => I(r, g)), N(t, v), ut(h);
|
|
4146
4147
|
}
|
|
4147
4148
|
xs(["keydown", "input", "click"]);
|
|
4148
|
-
Ot(
|
|
4149
|
-
class
|
|
4149
|
+
Ot(Gn, { onsend: {}, disabled: {} }, [], [], !0);
|
|
4150
|
+
class Il {
|
|
4150
4151
|
/**
|
|
4151
4152
|
* Validate message content and length
|
|
4152
4153
|
*/
|
|
@@ -4278,7 +4279,7 @@ class El {
|
|
|
4278
4279
|
}), s;
|
|
4279
4280
|
}
|
|
4280
4281
|
}
|
|
4281
|
-
class
|
|
4282
|
+
class Zn {
|
|
4282
4283
|
/**
|
|
4283
4284
|
* Validate client ID format
|
|
4284
4285
|
*/
|
|
@@ -4318,7 +4319,7 @@ class Pt extends me {
|
|
|
4318
4319
|
super(e, { ...r, statusCode: i, endpoint: s }, !0), this.name = "NetworkError", this.statusCode = i, this.endpoint = s;
|
|
4319
4320
|
}
|
|
4320
4321
|
}
|
|
4321
|
-
class
|
|
4322
|
+
class Kn extends me {
|
|
4322
4323
|
constructor(e, i, s, r, n) {
|
|
4323
4324
|
super(e, { ...n, wsUrl: i, closeCode: s, closeReason: r }, !0), this.name = "WebSocketError", this.wsUrl = i, this.closeCode = s, this.closeReason = r;
|
|
4324
4325
|
}
|
|
@@ -4328,12 +4329,12 @@ class zi extends me {
|
|
|
4328
4329
|
super(e, { ...n, field: i, value: s, expectedType: r }, !1), this.name = "ValidationError", this.field = i, this.value = s, this.expectedType = r;
|
|
4329
4330
|
}
|
|
4330
4331
|
}
|
|
4331
|
-
class
|
|
4332
|
+
class Jn extends me {
|
|
4332
4333
|
constructor(e, i, s, r) {
|
|
4333
4334
|
super(e, { ...r, configKey: i, configValue: s }, !1), this.name = "ConfigurationError", this.configKey = i, this.configValue = s;
|
|
4334
4335
|
}
|
|
4335
4336
|
}
|
|
4336
|
-
class
|
|
4337
|
+
class Xn extends me {
|
|
4337
4338
|
constructor(e, i, s, r) {
|
|
4338
4339
|
super(e, { ...r, clientId: i, statusCode: s }, !1), this.name = "AuthenticationError", this.clientId = i, this.statusCode = s;
|
|
4339
4340
|
}
|
|
@@ -4343,20 +4344,20 @@ class Ut extends me {
|
|
|
4343
4344
|
super(e, { ...r, retryAfter: i, limit: s }, !0), this.name = "RateLimitError", this.retryAfter = i, this.limit = s;
|
|
4344
4345
|
}
|
|
4345
4346
|
}
|
|
4346
|
-
class
|
|
4347
|
+
class Qn extends me {
|
|
4347
4348
|
constructor(e, i, s, r) {
|
|
4348
4349
|
super(e, { ...r, storageType: i, operation: s }, !0), this.name = "StorageError", this.storageType = i, this.operation = s;
|
|
4349
4350
|
}
|
|
4350
4351
|
}
|
|
4351
|
-
class
|
|
4352
|
+
class ea extends me {
|
|
4352
4353
|
constructor(e, i, s, r) {
|
|
4353
4354
|
super(e, { ...r, timeout: i, operation: s }, !0), this.name = "TimeoutError", this.timeout = i, this.operation = s;
|
|
4354
4355
|
}
|
|
4355
4356
|
}
|
|
4356
|
-
function
|
|
4357
|
+
function Lr(t) {
|
|
4357
4358
|
return t instanceof me ? t.isRetryable : !!(t instanceof TypeError && t.message.includes("fetch"));
|
|
4358
4359
|
}
|
|
4359
|
-
function
|
|
4360
|
+
function Tl(t) {
|
|
4360
4361
|
return t instanceof me ? {
|
|
4361
4362
|
name: t.name,
|
|
4362
4363
|
message: t.message,
|
|
@@ -4372,21 +4373,21 @@ function Il(t) {
|
|
|
4372
4373
|
type: typeof t
|
|
4373
4374
|
};
|
|
4374
4375
|
}
|
|
4375
|
-
function
|
|
4376
|
-
return t instanceof Pt ? t.statusCode === 404 ? "Service temporarily unavailable. Please try again later." : t.statusCode === 429 || t instanceof Ut ? "Too many requests. Please wait a moment and try again." : t.statusCode && t.statusCode >= 500 ? "Server error. Please try again in a few moments." : t.statusCode && (t.statusCode === 400 || t.statusCode === 401 || t.statusCode === 403) ? t.message : "Unable to connect to the server. Please check your internet connection." : t instanceof
|
|
4376
|
+
function kl(t) {
|
|
4377
|
+
return t instanceof Pt ? t.statusCode === 404 ? "Service temporarily unavailable. Please try again later." : t.statusCode === 429 || t instanceof Ut ? "Too many requests. Please wait a moment and try again." : t.statusCode && t.statusCode >= 500 ? "Server error. Please try again in a few moments." : t.statusCode && (t.statusCode === 400 || t.statusCode === 401 || t.statusCode === 403) ? t.message : "Unable to connect to the server. Please check your internet connection." : t instanceof Kn ? "Connection lost. Attempting to reconnect..." : t instanceof Xn ? "Access denied. Please check your configuration." : t instanceof zi ? t.message : t instanceof Jn ? "Widget configuration error. Please contact support." : t instanceof ea ? "Request timed out. Please try again." : t instanceof Qn ? "Unable to save data. Please check your browser settings." : "Something went wrong. Please try again.";
|
|
4377
4378
|
}
|
|
4378
4379
|
class Ri {
|
|
4379
4380
|
/**
|
|
4380
4381
|
* Process and categorize errors using custom error classes
|
|
4381
4382
|
*/
|
|
4382
4383
|
static handle(e, i) {
|
|
4383
|
-
const s =
|
|
4384
|
+
const s = Tl(e);
|
|
4384
4385
|
let r;
|
|
4385
|
-
return e instanceof Pt ? r = "NETWORK_ERROR" : e instanceof
|
|
4386
|
-
message:
|
|
4386
|
+
return e instanceof Pt ? r = "NETWORK_ERROR" : e instanceof Kn ? r = "WEBSOCKET_ERROR" : e instanceof zi ? r = "VALIDATION_ERROR" : e instanceof Jn ? r = "CONFIGURATION_ERROR" : e instanceof Xn ? r = "AUTHENTICATION_ERROR" : e instanceof Ut ? r = "RATE_LIMIT_ERROR" : e instanceof Qn ? r = "STORAGE_ERROR" : e instanceof ea ? r = "TIMEOUT_ERROR" : e instanceof me ? r = "WIDGET_ERROR" : r = "UNKNOWN_ERROR", {
|
|
4387
|
+
message: kl(e),
|
|
4387
4388
|
code: r,
|
|
4388
4389
|
isUserFacing: !0,
|
|
4389
|
-
shouldRetry:
|
|
4390
|
+
shouldRetry: Lr(e),
|
|
4390
4391
|
context: {
|
|
4391
4392
|
...i,
|
|
4392
4393
|
metadata: {
|
|
@@ -4406,7 +4407,7 @@ class Ri {
|
|
|
4406
4407
|
* Check if error should be retried
|
|
4407
4408
|
*/
|
|
4408
4409
|
static shouldRetry(e) {
|
|
4409
|
-
return e && typeof e == "object" && "shouldRetry" in e ? e.shouldRetry :
|
|
4410
|
+
return e && typeof e == "object" && "shouldRetry" in e ? e.shouldRetry : Lr(e);
|
|
4410
4411
|
}
|
|
4411
4412
|
/**
|
|
4412
4413
|
* Get user-friendly error message
|
|
@@ -4428,14 +4429,14 @@ class Ri {
|
|
|
4428
4429
|
};
|
|
4429
4430
|
}
|
|
4430
4431
|
}
|
|
4431
|
-
class
|
|
4432
|
+
class Bs {
|
|
4432
4433
|
// Note: No default production URL - must be configured explicitly
|
|
4433
4434
|
// via environment variable, runtime config, or attribute
|
|
4434
4435
|
/**
|
|
4435
4436
|
* Resolve API and WebSocket URLs based on client ID and environment
|
|
4436
4437
|
*/
|
|
4437
4438
|
static resolveUrls(e, i = {}) {
|
|
4438
|
-
const s =
|
|
4439
|
+
const s = Zn.validate(e);
|
|
4439
4440
|
if (!s.isValid)
|
|
4440
4441
|
throw new Error(`Invalid client ID for URL resolution: ${s.error}`);
|
|
4441
4442
|
const r = s.sanitizedValue;
|
|
@@ -4532,7 +4533,7 @@ See documentation for setup guide.`
|
|
|
4532
4533
|
}
|
|
4533
4534
|
}
|
|
4534
4535
|
}
|
|
4535
|
-
class
|
|
4536
|
+
class Ml {
|
|
4536
4537
|
constructor(e) {
|
|
4537
4538
|
try {
|
|
4538
4539
|
const i = window, s = i.AIChat || i.ChatWidget || {}, r = e ? this.parseElementAttributes(e) : {}, n = {
|
|
@@ -4542,10 +4543,10 @@ class kl {
|
|
|
4542
4543
|
};
|
|
4543
4544
|
if (!n.clientId)
|
|
4544
4545
|
throw new Error("Widget configuration missing: clientId is required");
|
|
4545
|
-
const a =
|
|
4546
|
+
const a = Zn.validate(n.clientId);
|
|
4546
4547
|
if (!a.isValid)
|
|
4547
4548
|
throw new Error(`Invalid client ID: ${a.error}`);
|
|
4548
|
-
const l = n.apiUrl && n.wsUrl ? { apiUrl: n.apiUrl, wsUrl: n.wsUrl } :
|
|
4549
|
+
const l = n.apiUrl && n.wsUrl ? { apiUrl: n.apiUrl, wsUrl: n.wsUrl } : Bs.resolveUrls(a.sanitizedValue);
|
|
4549
4550
|
this.config = {
|
|
4550
4551
|
...n,
|
|
4551
4552
|
clientId: a.sanitizedValue,
|
|
@@ -4567,7 +4568,7 @@ class kl {
|
|
|
4567
4568
|
parseElementAttributes(e) {
|
|
4568
4569
|
const i = {}, s = e.getAttributeNames();
|
|
4569
4570
|
for (const r of s) {
|
|
4570
|
-
const n =
|
|
4571
|
+
const n = Pn.attributeToProperty(r);
|
|
4571
4572
|
if (!n) continue;
|
|
4572
4573
|
const a = e.getAttribute(r);
|
|
4573
4574
|
if (a)
|
|
@@ -4583,7 +4584,7 @@ class kl {
|
|
|
4583
4584
|
i[n] = a;
|
|
4584
4585
|
break;
|
|
4585
4586
|
case "theme":
|
|
4586
|
-
|
|
4587
|
+
Un(a) && (i.theme = a);
|
|
4587
4588
|
break;
|
|
4588
4589
|
case "position":
|
|
4589
4590
|
(a === "bottom-left" || a === "bottom-right") && (i.position = a);
|
|
@@ -4632,7 +4633,7 @@ class kl {
|
|
|
4632
4633
|
}
|
|
4633
4634
|
const _i = /* @__PURE__ */ new Map();
|
|
4634
4635
|
let Hi = !1;
|
|
4635
|
-
function
|
|
4636
|
+
function $l() {
|
|
4636
4637
|
try {
|
|
4637
4638
|
const t = "__storage_test__";
|
|
4638
4639
|
return localStorage.setItem(t, t), localStorage.removeItem(t), !0;
|
|
@@ -4640,22 +4641,22 @@ function Ml() {
|
|
|
4640
4641
|
return !1;
|
|
4641
4642
|
}
|
|
4642
4643
|
}
|
|
4643
|
-
Hi =
|
|
4644
|
-
function
|
|
4644
|
+
Hi = !$l();
|
|
4645
|
+
function Al(t) {
|
|
4645
4646
|
try {
|
|
4646
4647
|
return Hi ? _i.get(t) ?? null : localStorage.getItem(t);
|
|
4647
4648
|
} catch {
|
|
4648
4649
|
return _i.get(t) ?? null;
|
|
4649
4650
|
}
|
|
4650
4651
|
}
|
|
4651
|
-
function
|
|
4652
|
+
function Ll(t, e) {
|
|
4652
4653
|
try {
|
|
4653
4654
|
return Hi ? (_i.set(t, e), !0) : (localStorage.setItem(t, e), !0);
|
|
4654
4655
|
} catch {
|
|
4655
4656
|
return _i.set(t, e), Hi = !0, !1;
|
|
4656
4657
|
}
|
|
4657
4658
|
}
|
|
4658
|
-
function
|
|
4659
|
+
function Ol(t) {
|
|
4659
4660
|
try {
|
|
4660
4661
|
if (Hi) {
|
|
4661
4662
|
_i.delete(t);
|
|
@@ -4682,13 +4683,13 @@ const ke = class ke {
|
|
|
4682
4683
|
* Internal storage access methods that use adapter if available
|
|
4683
4684
|
*/
|
|
4684
4685
|
getItem(e) {
|
|
4685
|
-
return this.storageAdapter ? this.storageAdapter.getItem(e) :
|
|
4686
|
+
return this.storageAdapter ? this.storageAdapter.getItem(e) : Al(e);
|
|
4686
4687
|
}
|
|
4687
4688
|
setItem(e, i) {
|
|
4688
|
-
this.storageAdapter ? this.storageAdapter.setItem(e, i) :
|
|
4689
|
+
this.storageAdapter ? this.storageAdapter.setItem(e, i) : Ll(e, i);
|
|
4689
4690
|
}
|
|
4690
4691
|
removeItem(e) {
|
|
4691
|
-
this.storageAdapter ? this.storageAdapter.removeItem(e) :
|
|
4692
|
+
this.storageAdapter ? this.storageAdapter.removeItem(e) : Ol(e);
|
|
4692
4693
|
}
|
|
4693
4694
|
/**
|
|
4694
4695
|
* Generate RFC 4122 compliant UUID v4 for visitor identification
|
|
@@ -4744,14 +4745,14 @@ const ke = class ke {
|
|
|
4744
4745
|
this.removeItem(ke.VISITOR_ID_KEY), this.removeItem(ke.SESSION_HISTORY_KEY), this.visitorId = this.generateVisitorId();
|
|
4745
4746
|
}
|
|
4746
4747
|
};
|
|
4747
|
-
ke.VISITOR_ID_KEY =
|
|
4748
|
-
let
|
|
4748
|
+
ke.VISITOR_ID_KEY = $r.VISITOR_ID, ke.SESSION_HISTORY_KEY = $r.SESSIONS;
|
|
4749
|
+
let Ys = ke;
|
|
4749
4750
|
class Ai {
|
|
4750
4751
|
/**
|
|
4751
4752
|
* Get API endpoint URL with base path resolved
|
|
4752
4753
|
*/
|
|
4753
4754
|
static getApiUrl(e, i) {
|
|
4754
|
-
const { apiUrl: s } =
|
|
4755
|
+
const { apiUrl: s } = Bs.resolveUrls(i.clientId, i.options);
|
|
4755
4756
|
switch (e) {
|
|
4756
4757
|
case "init":
|
|
4757
4758
|
return `${s}/init`;
|
|
@@ -4769,15 +4770,15 @@ class Ai {
|
|
|
4769
4770
|
* Get WebSocket URL with query parameters
|
|
4770
4771
|
*/
|
|
4771
4772
|
static getWebSocketUrl(e) {
|
|
4772
|
-
const { wsUrl: i } =
|
|
4773
|
+
const { wsUrl: i } = Bs.resolveUrls(e.clientId, e.options), s = new URLSearchParams({
|
|
4773
4774
|
session_id: e.sessionId
|
|
4774
4775
|
});
|
|
4775
4776
|
return e.visitorId && s.append("visitor_id", e.visitorId), `${i}?${s}`;
|
|
4776
4777
|
}
|
|
4777
4778
|
}
|
|
4778
|
-
class
|
|
4779
|
+
class Nl {
|
|
4779
4780
|
constructor(e, i) {
|
|
4780
|
-
this.sessionId = null, this.config = e, this.visitor = i, this.debugLogger =
|
|
4781
|
+
this.sessionId = null, this.config = e, this.visitor = i, this.debugLogger = lr(e.getAll());
|
|
4781
4782
|
}
|
|
4782
4783
|
/**
|
|
4783
4784
|
* Initialize widget session with backend
|
|
@@ -4814,16 +4815,16 @@ class Ol {
|
|
|
4814
4815
|
try {
|
|
4815
4816
|
const l = await a.json();
|
|
4816
4817
|
this.debugLogger.error("APIClient", "Validation error (422)", l);
|
|
4817
|
-
const
|
|
4818
|
-
throw new Error(`Validation error: ${typeof
|
|
4818
|
+
const c = l.detail || l.message || "Validation failed";
|
|
4819
|
+
throw new Error(`Validation error: ${typeof c == "string" ? c : JSON.stringify(c)}`);
|
|
4819
4820
|
} catch (l) {
|
|
4820
4821
|
throw l instanceof Error && l.message.startsWith("Validation error:") ? l : new Error("Invalid request data. Please check client ID and visitor ID format.");
|
|
4821
4822
|
}
|
|
4822
4823
|
if (a.status === 429) {
|
|
4823
|
-
const l = a.headers.get("Retry-After"),
|
|
4824
|
+
const l = a.headers.get("Retry-After"), c = l ? parseInt(l, 10) : 60;
|
|
4824
4825
|
throw new Ut(
|
|
4825
|
-
`Rate limit exceeded. Please try again in ${
|
|
4826
|
-
|
|
4826
|
+
`Rate limit exceeded. Please try again in ${c} seconds.`,
|
|
4827
|
+
c
|
|
4827
4828
|
);
|
|
4828
4829
|
}
|
|
4829
4830
|
throw new Pt(
|
|
@@ -4859,7 +4860,7 @@ class Ol {
|
|
|
4859
4860
|
sessionId: this.sessionId,
|
|
4860
4861
|
clientId: this.config.clientId
|
|
4861
4862
|
});
|
|
4862
|
-
const n =
|
|
4863
|
+
const n = Il.validate(e);
|
|
4863
4864
|
if (this.debugLogger.log("APIClient", "Message validation result", {
|
|
4864
4865
|
correlationId: i,
|
|
4865
4866
|
input: e,
|
|
@@ -4878,17 +4879,17 @@ class Ol {
|
|
|
4878
4879
|
session_id: this.sessionId,
|
|
4879
4880
|
message: n.sanitizedValue
|
|
4880
4881
|
}
|
|
4881
|
-
},
|
|
4882
|
+
}, c = Ai.getApiUrl("chat", {
|
|
4882
4883
|
clientId: this.config.clientId
|
|
4883
4884
|
});
|
|
4884
4885
|
this.debugLogger.log("APIClient", "HTTP request payload", {
|
|
4885
4886
|
correlationId: i,
|
|
4886
|
-
url:
|
|
4887
|
+
url: c,
|
|
4887
4888
|
payload: l,
|
|
4888
4889
|
messageContent: l.body.message,
|
|
4889
4890
|
messageLength: ((r = l.body.message) == null ? void 0 : r.length) || 0
|
|
4890
4891
|
});
|
|
4891
|
-
const u = await fetch(
|
|
4892
|
+
const u = await fetch(c, {
|
|
4892
4893
|
method: "POST",
|
|
4893
4894
|
headers: {
|
|
4894
4895
|
"Content-Type": "application/json",
|
|
@@ -4914,7 +4915,7 @@ class Ol {
|
|
|
4914
4915
|
throw new Pt(
|
|
4915
4916
|
`Failed to send message: ${u.statusText}`,
|
|
4916
4917
|
u.status,
|
|
4917
|
-
|
|
4918
|
+
c
|
|
4918
4919
|
);
|
|
4919
4920
|
}
|
|
4920
4921
|
const h = await u.json();
|
|
@@ -5027,9 +5028,9 @@ class Ol {
|
|
|
5027
5028
|
}
|
|
5028
5029
|
}
|
|
5029
5030
|
var Li = /* @__PURE__ */ ((t) => (t.DISCONNECTED = "disconnected", t.CONNECTING = "connecting", t.CONNECTED = "connected", t.ERROR = "error", t))(Li || {});
|
|
5030
|
-
class
|
|
5031
|
+
class zl {
|
|
5031
5032
|
constructor(e, i) {
|
|
5032
|
-
this.ws = null, this.sessionId = null, this.state = "disconnected", this.messageQueue = [], this.reconnectAttempts = 0, this.maxReconnectAttempts = re.MAX_RECONNECT_ATTEMPTS, this.reconnectDelay = re.RECONNECT_DELAY, this.heartbeatInterval = null, this.listeners = /* @__PURE__ */ new Map(), this.abortController = null, this.cleanupFunctions = [], this.config = e, this.visitor = i, this.debugLogger =
|
|
5033
|
+
this.ws = null, this.sessionId = null, this.state = "disconnected", this.messageQueue = [], this.reconnectAttempts = 0, this.maxReconnectAttempts = re.MAX_RECONNECT_ATTEMPTS, this.reconnectDelay = re.RECONNECT_DELAY, this.heartbeatInterval = null, this.listeners = /* @__PURE__ */ new Map(), this.abortController = null, this.cleanupFunctions = [], this.config = e, this.visitor = i, this.debugLogger = lr(e.getAll());
|
|
5033
5034
|
}
|
|
5034
5035
|
/**
|
|
5035
5036
|
* Connect to WebSocket server
|
|
@@ -5076,7 +5077,7 @@ class Nl {
|
|
|
5076
5077
|
/* CONNECTED */
|
|
5077
5078
|
), this.reconnectAttempts = 0, this.flushMessageQueue(), this.startHeartbeat();
|
|
5078
5079
|
}, this.ws.onmessage = (e) => {
|
|
5079
|
-
var i, s, r, n, a, o, l,
|
|
5080
|
+
var i, s, r, n, a, o, l, c, u;
|
|
5080
5081
|
this.debugLogger.log("WebSocketManager", "Raw message received", {
|
|
5081
5082
|
data: e.data,
|
|
5082
5083
|
type: typeof e.data,
|
|
@@ -5096,7 +5097,7 @@ class Nl {
|
|
|
5096
5097
|
hasError: h.type === "error",
|
|
5097
5098
|
metadata: (l = h.data) == null ? void 0 : l.metadata
|
|
5098
5099
|
}), this.debugLogger.log("WebSocketManager", "Emitting to listeners", {
|
|
5099
|
-
listenerCount: ((
|
|
5100
|
+
listenerCount: ((c = this.listeners.get("message")) == null ? void 0 : c.size) || 0,
|
|
5100
5101
|
hasMessageListeners: this.listeners.has("message"),
|
|
5101
5102
|
allListenerTypes: Array.from(this.listeners.keys())
|
|
5102
5103
|
}), this.emit("message", h), this.debugLogger.log("WebSocketManager", "Message emission completed successfully");
|
|
@@ -5285,7 +5286,7 @@ class Nl {
|
|
|
5285
5286
|
), this.messageQueue = [], this.reconnectAttempts = 0, this.sessionId = null, this.listeners.clear();
|
|
5286
5287
|
}
|
|
5287
5288
|
}
|
|
5288
|
-
class
|
|
5289
|
+
class Rl {
|
|
5289
5290
|
constructor(e, i, s) {
|
|
5290
5291
|
this.typingTimeout = null, this.hasHiddenTypingForCurrentStream = !1, this.lastCompletionTimestamp = null, this.lastMessageSentTimestamp = null, this.COMPLETION_GRACE_PERIOD_MS = re.COMPLETION_GRACE_PERIOD, this.chatStore = e, this.uiStore = i, this.debugLogger = s;
|
|
5291
5292
|
}
|
|
@@ -5382,8 +5383,8 @@ class zl {
|
|
|
5382
5383
|
this.typingTimeout && (clearTimeout(this.typingTimeout), this.typingTimeout = null);
|
|
5383
5384
|
}
|
|
5384
5385
|
}
|
|
5385
|
-
var
|
|
5386
|
-
const
|
|
5386
|
+
var Dl = /* @__PURE__ */ V('<button class="restart-button svelte-zsv8oa" aria-describedby="error-message">Retry Connection</button> <span id="error-message" class="sr-only svelte-zsv8oa">Connection lost. Unable to reconnect. Click to retry connection.</span>', 1), Pl = /* @__PURE__ */ V('<button class="restart-button svelte-zsv8oa" aria-describedby="error-message">Retry Connection</button> <span id="error-message" class="sr-only svelte-zsv8oa">Connection error occurred. Click to retry connection.</span>', 1), Ul = /* @__PURE__ */ V('<div class="error-banner svelte-zsv8oa" role="alert" aria-live="polite"><!></div>'), Hl = /* @__PURE__ */ V('<button class="backdrop svelte-zsv8oa" aria-label="Close chat overlay" tabindex="-1"></button>'), Wl = /* @__PURE__ */ V('<div class="chat-container svelte-zsv8oa" role="dialog" aria-label="Chat assistant" aria-modal="true"><!> <!> <!> <!></div> <!>', 1), Vl = /* @__PURE__ */ V('<div class="widget-container svelte-zsv8oa"><!> <!></div>');
|
|
5387
|
+
const jl = {
|
|
5387
5388
|
hash: "svelte-zsv8oa",
|
|
5388
5389
|
code: `.widget-container.svelte-zsv8oa {position:fixed;bottom:var(--widget-space-lg);z-index:var(--widget-z-base);font-family:var(--widget-font-family);}.widget-container[data-position="bottom-right"].svelte-zsv8oa {right:var(--widget-space-lg);}.widget-container[data-position="bottom-left"].svelte-zsv8oa {left:var(--widget-space-lg);}.chat-container.svelte-zsv8oa {position:absolute;
|
|
5389
5390
|
/* Dynamic positioning - optimized for when floating button is hidden (widget open) */bottom:var(--widget-space-lg); /* 24px base spacing when button is hidden */
|
|
@@ -5463,18 +5464,18 @@ const Vl = {
|
|
|
5463
5464
|
.widget-container[data-position="bottom-left"].svelte-zsv8oa .chat-container:where(.svelte-zsv8oa) {left:8px;right:8px;transform-origin:bottom center;}
|
|
5464
5465
|
}`
|
|
5465
5466
|
};
|
|
5466
|
-
function
|
|
5467
|
-
|
|
5467
|
+
function ta(t, e) {
|
|
5468
|
+
dt(e, !0), Lt(t, jl);
|
|
5468
5469
|
let i = yi(e, "hostElement", 7), s, r, n, a, o, l;
|
|
5469
|
-
const
|
|
5470
|
+
const c = He();
|
|
5470
5471
|
let u = !1, h = !1, v = !1, p = null, f = /* @__PURE__ */ M(F(Li.DISCONNECTED)), g = /* @__PURE__ */ M(
|
|
5471
5472
|
!1
|
|
5472
5473
|
// Track if max reconnection attempts exhausted
|
|
5473
5474
|
);
|
|
5474
|
-
|
|
5475
|
+
ar(async () => {
|
|
5475
5476
|
try {
|
|
5476
|
-
if (s = new
|
|
5477
|
-
const { configStore: b } = await Promise.resolve().then(() =>
|
|
5477
|
+
if (s = new Ml(i()), l = lr(s.getAll()), r = new Ys(), n = new Nl(s, r), a = new zl(s, r), o = new Rl(S, X, l), i()) {
|
|
5478
|
+
const { configStore: b } = await Promise.resolve().then(() => il);
|
|
5478
5479
|
b.loadFromAttributes(i());
|
|
5479
5480
|
}
|
|
5480
5481
|
x(), l.log("ChatWidget", "Attaching WebSocket listeners"), a.on("message", q), a.on("stateChange", (b) => {
|
|
@@ -5491,7 +5492,7 @@ function ea(t, e) {
|
|
|
5491
5492
|
} catch (b) {
|
|
5492
5493
|
l.error("ChatWidget", "Initialization failed", b), p = b instanceof Error ? b.message : "Failed to initialize chat";
|
|
5493
5494
|
}
|
|
5494
|
-
}),
|
|
5495
|
+
}), qo(() => {
|
|
5495
5496
|
const b = n == null ? void 0 : n.getSessionId();
|
|
5496
5497
|
b && r.markSessionInactive(b), a == null || a.disconnect(), o == null || o.cleanup();
|
|
5497
5498
|
});
|
|
@@ -5531,7 +5532,7 @@ function ea(t, e) {
|
|
|
5531
5532
|
if (i() && (i().setAttribute("data-theme", b.theme || "modern"), b.primary_color || b.accent_color)) {
|
|
5532
5533
|
const j = b.accent_color || b.primary_color;
|
|
5533
5534
|
if (j) {
|
|
5534
|
-
const L =
|
|
5535
|
+
const L = or(j, "#6b46c1");
|
|
5535
5536
|
i().style.setProperty("--widget-primary", L), i().style.setProperty("--widget-primary-hover", $e(L, -20)), i().style.setProperty("--widget-primary-light", $e(L, 20)), i().style.setProperty("--widget-primary-dark", $e(L, -30)), i().style.setProperty("--widget-gradient", `linear-gradient(135deg, ${L} 0%, ${$e(L, 20)} 100%)`), i().style.setProperty("--widget-gradient-hover", `linear-gradient(135deg, ${$e(L, -20)} 0%, ${L} 100%)`);
|
|
5536
5537
|
}
|
|
5537
5538
|
}
|
|
@@ -5551,7 +5552,7 @@ function ea(t, e) {
|
|
|
5551
5552
|
o.handleMessage(b);
|
|
5552
5553
|
}
|
|
5553
5554
|
async function oe(b) {
|
|
5554
|
-
const j =
|
|
5555
|
+
const j = c.getCurrent();
|
|
5555
5556
|
l.log("ChatWidget", "handleSendMessage called with content", {
|
|
5556
5557
|
correlationId: j,
|
|
5557
5558
|
content: b,
|
|
@@ -5601,83 +5602,83 @@ function ea(t, e) {
|
|
|
5601
5602
|
l.log("ChatWidget", "Manual retry connection requested"), I(g, !1), p = null, S.setError(null), a == null || a.retryConnection();
|
|
5602
5603
|
}
|
|
5603
5604
|
const P = /* @__PURE__ */ Ke(() => X.isOpen), te = /* @__PURE__ */ Ke(() => X.isLoading), Cs = /* @__PURE__ */ Ke(() => (s == null ? void 0 : s.position) || "bottom-right");
|
|
5604
|
-
var
|
|
5605
|
+
var ia = {
|
|
5605
5606
|
get hostElement() {
|
|
5606
5607
|
return i();
|
|
5607
5608
|
},
|
|
5608
5609
|
set hostElement(b) {
|
|
5609
5610
|
i(b), lt();
|
|
5610
5611
|
}
|
|
5611
|
-
}, Zi =
|
|
5612
|
+
}, Zi = Vl(), dr = Y(Zi);
|
|
5612
5613
|
{
|
|
5613
|
-
var
|
|
5614
|
-
|
|
5614
|
+
var sa = (b) => {
|
|
5615
|
+
jn(b, { onclick: K });
|
|
5615
5616
|
};
|
|
5616
5617
|
he(dr, (b) => {
|
|
5617
|
-
m(P) || b(
|
|
5618
|
+
m(P) || b(sa);
|
|
5618
5619
|
});
|
|
5619
5620
|
}
|
|
5620
|
-
var
|
|
5621
|
+
var ra = se(dr, 2);
|
|
5621
5622
|
{
|
|
5622
|
-
var
|
|
5623
|
-
var j =
|
|
5624
|
-
|
|
5625
|
-
var
|
|
5626
|
-
|
|
5627
|
-
var
|
|
5623
|
+
var na = (b) => {
|
|
5624
|
+
var j = Wl(), L = ts(j), D = Y(L);
|
|
5625
|
+
qn(D, { onclose: () => X.close() });
|
|
5626
|
+
var ur = se(D, 2);
|
|
5627
|
+
Yn(ur, {});
|
|
5628
|
+
var fr = se(ur, 2);
|
|
5628
5629
|
{
|
|
5629
5630
|
let Fe = /* @__PURE__ */ Ke(() => S.error !== null || m(te));
|
|
5630
|
-
|
|
5631
|
+
Gn(fr, {
|
|
5631
5632
|
onsend: oe,
|
|
5632
5633
|
get disabled() {
|
|
5633
5634
|
return m(Fe);
|
|
5634
5635
|
}
|
|
5635
5636
|
});
|
|
5636
5637
|
}
|
|
5637
|
-
var
|
|
5638
|
+
var aa = se(fr, 2);
|
|
5638
5639
|
{
|
|
5639
|
-
var
|
|
5640
|
-
var ft =
|
|
5640
|
+
var oa = (Fe) => {
|
|
5641
|
+
var ft = Ul(), da = Y(ft);
|
|
5641
5642
|
{
|
|
5642
|
-
var
|
|
5643
|
-
var Ii = Rl(), Es = ts(Ii);
|
|
5644
|
-
Es.__click = Ee, ns(2), N(Nt, Ii);
|
|
5645
|
-
}, ua = (Nt) => {
|
|
5643
|
+
var ua = (Nt) => {
|
|
5646
5644
|
var Ii = Dl(), Es = ts(Ii);
|
|
5645
|
+
Es.__click = Ee, ns(2), N(Nt, Ii);
|
|
5646
|
+
}, fa = (Nt) => {
|
|
5647
|
+
var Ii = Pl(), Es = ts(Ii);
|
|
5647
5648
|
Es.__click = Ce, ns(2), N(Nt, Ii);
|
|
5648
5649
|
};
|
|
5649
5650
|
he(da, (Nt) => {
|
|
5650
|
-
m(g) ? Nt(
|
|
5651
|
+
m(g) ? Nt(ua) : Nt(fa, !1);
|
|
5651
5652
|
});
|
|
5652
5653
|
}
|
|
5653
5654
|
B(ft), N(Fe, ft);
|
|
5654
5655
|
};
|
|
5655
|
-
he(
|
|
5656
|
-
S.error && Fe(
|
|
5656
|
+
he(aa, (Fe) => {
|
|
5657
|
+
S.error && Fe(oa);
|
|
5657
5658
|
});
|
|
5658
5659
|
}
|
|
5659
5660
|
B(L);
|
|
5660
|
-
var
|
|
5661
|
+
var la = se(L, 2);
|
|
5661
5662
|
{
|
|
5662
|
-
var
|
|
5663
|
-
var ft =
|
|
5664
|
-
ft.__click = () => X.close(),
|
|
5663
|
+
var ca = (Fe) => {
|
|
5664
|
+
var ft = Hl();
|
|
5665
|
+
ft.__click = () => X.close(), Cr(3, ft, () => Zo, () => ({ duration: 200 })), N(Fe, ft);
|
|
5665
5666
|
};
|
|
5666
|
-
he(
|
|
5667
|
-
m(P) && Fe(
|
|
5667
|
+
he(la, (Fe) => {
|
|
5668
|
+
m(P) && Fe(ca);
|
|
5668
5669
|
});
|
|
5669
5670
|
}
|
|
5670
|
-
|
|
5671
|
+
Cr(3, L, () => Ko, () => ({ y: 20, duration: 300 })), N(b, j);
|
|
5671
5672
|
};
|
|
5672
|
-
he(
|
|
5673
|
-
m(P) && b(
|
|
5673
|
+
he(ra, (b) => {
|
|
5674
|
+
m(P) && b(na);
|
|
5674
5675
|
});
|
|
5675
5676
|
}
|
|
5676
|
-
return B(Zi), kt(() => bi(Zi, "data-position", m(Cs))), N(t, Zi), ut(
|
|
5677
|
+
return B(Zi), kt(() => bi(Zi, "data-position", m(Cs))), N(t, Zi), ut(ia);
|
|
5677
5678
|
}
|
|
5678
5679
|
xs(["click"]);
|
|
5679
|
-
Ot(
|
|
5680
|
-
const
|
|
5680
|
+
Ot(ta, { hostElement: {} }, [], [], !0);
|
|
5681
|
+
const cr = {
|
|
5681
5682
|
brand: "generic",
|
|
5682
5683
|
primary: "#6b46c1",
|
|
5683
5684
|
primaryHover: "#5a3aa8",
|
|
@@ -5692,7 +5693,7 @@ const lr = {
|
|
|
5692
5693
|
textSecondary: "#6b7280",
|
|
5693
5694
|
textMuted: "#9ca3af",
|
|
5694
5695
|
textInverse: "#ffffff"
|
|
5695
|
-
},
|
|
5696
|
+
}, Gs = {
|
|
5696
5697
|
brand: "bot-brewers",
|
|
5697
5698
|
primary: "#1e5ba8",
|
|
5698
5699
|
primaryHover: "#0f2d5a",
|
|
@@ -5708,7 +5709,7 @@ const lr = {
|
|
|
5708
5709
|
textMuted: "#94a3b8",
|
|
5709
5710
|
textInverse: "#ffffff"
|
|
5710
5711
|
};
|
|
5711
|
-
function
|
|
5712
|
+
function ql(t = cr) {
|
|
5712
5713
|
var e;
|
|
5713
5714
|
return `/* ============================================
|
|
5714
5715
|
Premium Design System - ${t.brand === "bot-brewers" ? "Bot Brewers Brand" : "Generic"}
|
|
@@ -5973,10 +5974,10 @@ function jl(t = lr) {
|
|
|
5973
5974
|
}
|
|
5974
5975
|
}`;
|
|
5975
5976
|
}
|
|
5976
|
-
function
|
|
5977
|
-
return
|
|
5977
|
+
function Fl(t = cr) {
|
|
5978
|
+
return ql(t);
|
|
5978
5979
|
}
|
|
5979
|
-
const
|
|
5980
|
+
const Bl = {
|
|
5980
5981
|
brand: "generic",
|
|
5981
5982
|
primary: "#6b46c1",
|
|
5982
5983
|
primaryHover: "#5a3aa8",
|
|
@@ -5991,7 +5992,7 @@ const Fl = {
|
|
|
5991
5992
|
textSecondary: "#475569",
|
|
5992
5993
|
textMuted: "#64748b",
|
|
5993
5994
|
textInverse: "#ffffff"
|
|
5994
|
-
},
|
|
5995
|
+
}, Yl = {
|
|
5995
5996
|
brand: "generic",
|
|
5996
5997
|
primary: "#2563eb",
|
|
5997
5998
|
primaryHover: "#1d4ed8",
|
|
@@ -6006,7 +6007,7 @@ const Fl = {
|
|
|
6006
6007
|
textSecondary: "#475569",
|
|
6007
6008
|
textMuted: "#64748b",
|
|
6008
6009
|
textInverse: "#ffffff"
|
|
6009
|
-
},
|
|
6010
|
+
}, Or = {
|
|
6010
6011
|
brand: "generic",
|
|
6011
6012
|
primary: "#f97316",
|
|
6012
6013
|
primaryHover: "#ea580c",
|
|
@@ -6021,7 +6022,7 @@ const Fl = {
|
|
|
6021
6022
|
textSecondary: "#6b7280",
|
|
6022
6023
|
textMuted: "#9ca3af",
|
|
6023
6024
|
textInverse: "#ffffff"
|
|
6024
|
-
},
|
|
6025
|
+
}, Gl = {
|
|
6025
6026
|
brand: "generic",
|
|
6026
6027
|
primary: "#6b7280",
|
|
6027
6028
|
primaryHover: "#4b5563",
|
|
@@ -6036,7 +6037,7 @@ const Fl = {
|
|
|
6036
6037
|
textSecondary: "#6b7280",
|
|
6037
6038
|
textMuted: "#9ca3af",
|
|
6038
6039
|
textInverse: "#ffffff"
|
|
6039
|
-
},
|
|
6040
|
+
}, Zl = {
|
|
6040
6041
|
brand: "generic",
|
|
6041
6042
|
primary: "#8b5cf6",
|
|
6042
6043
|
primaryHover: "#7c3aed",
|
|
@@ -6051,7 +6052,7 @@ const Fl = {
|
|
|
6051
6052
|
textSecondary: "#cbd5e1",
|
|
6052
6053
|
textMuted: "#94a3b8",
|
|
6053
6054
|
textInverse: "#0f172a"
|
|
6054
|
-
},
|
|
6055
|
+
}, Kl = {
|
|
6055
6056
|
brand: "generic",
|
|
6056
6057
|
primary: "#14b8a6",
|
|
6057
6058
|
primaryHover: "#0d9488",
|
|
@@ -6066,7 +6067,7 @@ const Fl = {
|
|
|
6066
6067
|
textSecondary: "#0f766e",
|
|
6067
6068
|
textMuted: "#14b8a6",
|
|
6068
6069
|
textInverse: "#ffffff"
|
|
6069
|
-
},
|
|
6070
|
+
}, Jl = {
|
|
6070
6071
|
brand: "generic",
|
|
6071
6072
|
primary: "#dc2626",
|
|
6072
6073
|
primaryHover: "#b91c1c",
|
|
@@ -6082,23 +6083,23 @@ const Fl = {
|
|
|
6082
6083
|
textMuted: "#9ca3af",
|
|
6083
6084
|
textInverse: "#ffffff"
|
|
6084
6085
|
};
|
|
6085
|
-
function
|
|
6086
|
+
function Xl(t) {
|
|
6086
6087
|
return {
|
|
6087
|
-
"bot-brewers":
|
|
6088
|
-
modern:
|
|
6089
|
-
corporate:
|
|
6090
|
-
friendly:
|
|
6091
|
-
playful:
|
|
6088
|
+
"bot-brewers": Gs,
|
|
6089
|
+
modern: Bl,
|
|
6090
|
+
corporate: Yl,
|
|
6091
|
+
friendly: Or,
|
|
6092
|
+
playful: Or,
|
|
6092
6093
|
// Alias
|
|
6093
|
-
minimal:
|
|
6094
|
-
dark:
|
|
6095
|
-
elegant:
|
|
6096
|
-
bold:
|
|
6097
|
-
generic:
|
|
6098
|
-
default:
|
|
6094
|
+
minimal: Gl,
|
|
6095
|
+
dark: Zl,
|
|
6096
|
+
elegant: Kl,
|
|
6097
|
+
bold: Jl,
|
|
6098
|
+
generic: cr,
|
|
6099
|
+
default: Gs
|
|
6099
6100
|
}[t.toLowerCase()] || null;
|
|
6100
6101
|
}
|
|
6101
|
-
class
|
|
6102
|
+
class Nr extends HTMLElement {
|
|
6102
6103
|
constructor() {
|
|
6103
6104
|
super(), this._app = null, this._currentTheme = "bot-brewers", this._shadowRoot = this.attachShadow({ mode: "open" });
|
|
6104
6105
|
}
|
|
@@ -6117,10 +6118,10 @@ class Or extends HTMLElement {
|
|
|
6117
6118
|
this.mountApp();
|
|
6118
6119
|
}
|
|
6119
6120
|
disconnectedCallback() {
|
|
6120
|
-
this._app && (
|
|
6121
|
+
this._app && (js(this._app), this._app = null);
|
|
6121
6122
|
}
|
|
6122
6123
|
attributeChangedCallback(e, i, s) {
|
|
6123
|
-
i !== s && ((e === "theme" || e === "data-theme") && s && (this._currentTheme = s, this.updateStyles()), e === "accent-color" && s && this.updateAccentColor(s), e === "client-id" && s && this._app && (O.log("ChatWidget", `Client ID changed from ${i} to ${s}, remounting widget`),
|
|
6124
|
+
i !== s && ((e === "theme" || e === "data-theme") && s && (this._currentTheme = s, this.updateStyles()), e === "accent-color" && s && this.updateAccentColor(s), e === "client-id" && s && this._app && (O.log("ChatWidget", `Client ID changed from ${i} to ${s}, remounting widget`), js(this._app), this._app = null, this.mountApp()));
|
|
6124
6125
|
}
|
|
6125
6126
|
mountApp() {
|
|
6126
6127
|
const e = this.getAttribute("theme") || this.getAttribute("data-theme") || "bot-brewers";
|
|
@@ -6128,7 +6129,7 @@ class Or extends HTMLElement {
|
|
|
6128
6129
|
const i = document.createElement("div");
|
|
6129
6130
|
i.className = "widget-root";
|
|
6130
6131
|
const s = document.createElement("style");
|
|
6131
|
-
s.textContent = this.getStyles(), this._shadowRoot.innerHTML = "", this._shadowRoot.appendChild(s), this._shadowRoot.appendChild(i), this._app =
|
|
6132
|
+
s.textContent = this.getStyles(), this._shadowRoot.innerHTML = "", this._shadowRoot.appendChild(s), this._shadowRoot.appendChild(i), this._app = nr(ta, {
|
|
6132
6133
|
target: i,
|
|
6133
6134
|
props: {
|
|
6134
6135
|
hostElement: this
|
|
@@ -6140,8 +6141,8 @@ class Or extends HTMLElement {
|
|
|
6140
6141
|
return this.getThemeStyles(e);
|
|
6141
6142
|
}
|
|
6142
6143
|
getThemeStyles(e) {
|
|
6143
|
-
const i =
|
|
6144
|
-
return
|
|
6144
|
+
const i = Xl(e) || Gs;
|
|
6145
|
+
return Fl(i);
|
|
6145
6146
|
}
|
|
6146
6147
|
updateStyles() {
|
|
6147
6148
|
const e = this._shadowRoot.querySelector("style");
|
|
@@ -6149,14 +6150,14 @@ class Or extends HTMLElement {
|
|
|
6149
6150
|
}
|
|
6150
6151
|
updateAccentColor(e) {
|
|
6151
6152
|
const i = this._shadowRoot.querySelector(".widget-root");
|
|
6152
|
-
i && Promise.resolve().then(() =>
|
|
6153
|
+
i && Promise.resolve().then(() => el).then(({ adjustColor: s }) => {
|
|
6153
6154
|
i.style.setProperty("--widget-primary", e), i.style.setProperty("--widget-primary-hover", s(e, -20)), i.style.setProperty("--widget-primary-light", s(e, 20)), i.style.setProperty("--widget-primary-dark", s(e, -30));
|
|
6154
6155
|
});
|
|
6155
6156
|
}
|
|
6156
6157
|
}
|
|
6157
|
-
customElements.get("assistant-widget") ? customElements.get("chat-widget") || customElements.define("chat-widget",
|
|
6158
|
-
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
6159
|
-
function
|
|
6158
|
+
customElements.get("assistant-widget") ? customElements.get("chat-widget") || customElements.define("chat-widget", Nr) : customElements.define("assistant-widget", Nr);
|
|
6159
|
+
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", zr) : zr();
|
|
6160
|
+
function zr() {
|
|
6160
6161
|
if (document.querySelector("assistant-widget, chat-widget"))
|
|
6161
6162
|
return;
|
|
6162
6163
|
const t = window, e = t.AIChat || t.ChatWidget;
|
|
@@ -6170,5 +6171,5 @@ function Nr() {
|
|
|
6170
6171
|
}
|
|
6171
6172
|
}
|
|
6172
6173
|
export {
|
|
6173
|
-
|
|
6174
|
+
Nr as ChatWidgetElement
|
|
6174
6175
|
};
|