@walker-di/fortalece-ai-sdk 0.1.12 → 0.2.1
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/fortalece-ai-sdk.iife.js +40 -5
- package/dist/fortalece-ai-sdk.js +1456 -1231
- package/dist/fortalece-ai-sdk.umd.cjs +40 -5
- package/package.json +4 -2
package/dist/fortalece-ai-sdk.js
CHANGED
|
@@ -1,130 +1,130 @@
|
|
|
1
1
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
-
const
|
|
3
|
-
var
|
|
4
|
-
function
|
|
2
|
+
const gs = 1, ms = 2, _s = 16, bs = 1, ws = 2, on = "[", Gt = "[!", Rr = "]", ht = {}, B = Symbol(), ys = "http://www.w3.org/1999/xhtml", yr = !1;
|
|
3
|
+
var ln = Array.isArray, xs = Array.prototype.indexOf, Jt = Array.from, Bt = Object.keys, Ht = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, $s = Object.getOwnPropertyDescriptors, Ss = Object.prototype, ks = Array.prototype, cn = Object.getPrototypeOf, Yr = Object.isExtensible;
|
|
4
|
+
function Es(e) {
|
|
5
5
|
for (var t = 0; t < e.length; t++)
|
|
6
6
|
e[t]();
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function fn() {
|
|
9
9
|
var e, t, r = new Promise((n, i) => {
|
|
10
10
|
e = n, t = i;
|
|
11
11
|
});
|
|
12
12
|
return { promise: r, resolve: e, reject: t };
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const U = 2, Mr = 4, Ir = 8, Cs = 1 << 24, Oe = 16, Ne = 32, Ve = 64, Xt = 128, _e = 512, q = 1024, ne = 2048, Pe = 4096, ae = 8192, De = 16384, Qt = 32768, pt = 65536, Zr = 1 << 17, un = 1 << 18, st = 1 << 19, As = 1 << 20, Be = 1 << 25, tt = 32768, xr = 1 << 21, Dr = 1 << 22, He = 1 << 23, Ut = Symbol("$state"), zs = Symbol("legacy props"), Ts = Symbol(""), ft = new class extends Error {
|
|
15
15
|
name = "StaleReactionError";
|
|
16
16
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
17
|
-
}(),
|
|
18
|
-
function
|
|
17
|
+
}(), Lr = 3, _t = 8;
|
|
18
|
+
function Rs(e) {
|
|
19
19
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ms() {
|
|
22
22
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Is(e) {
|
|
25
25
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ds() {
|
|
28
28
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ls(e) {
|
|
31
31
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Os() {
|
|
34
34
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Ns() {
|
|
37
37
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Ps() {
|
|
40
40
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Fs() {
|
|
43
43
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Us() {
|
|
46
46
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function js() {
|
|
49
49
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function er(e) {
|
|
52
52
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Bs() {
|
|
55
55
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
56
56
|
}
|
|
57
|
-
let
|
|
58
|
-
function
|
|
59
|
-
|
|
57
|
+
let k = !1;
|
|
58
|
+
function Me(e) {
|
|
59
|
+
k = e;
|
|
60
60
|
}
|
|
61
|
-
let
|
|
62
|
-
function
|
|
61
|
+
let S;
|
|
62
|
+
function oe(e) {
|
|
63
63
|
if (e === null)
|
|
64
|
-
throw
|
|
65
|
-
return
|
|
64
|
+
throw er(), ht;
|
|
65
|
+
return S = e;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
67
|
+
function tr() {
|
|
68
|
+
return oe(/* @__PURE__ */ ke(S));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
if (
|
|
72
|
-
if (/* @__PURE__ */
|
|
73
|
-
throw
|
|
74
|
-
|
|
70
|
+
function M(e) {
|
|
71
|
+
if (k) {
|
|
72
|
+
if (/* @__PURE__ */ ke(S) !== null)
|
|
73
|
+
throw er(), ht;
|
|
74
|
+
S = e;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
if (
|
|
79
|
-
for (var t = e, r =
|
|
77
|
+
function Or(e = 1) {
|
|
78
|
+
if (k) {
|
|
79
|
+
for (var t = e, r = S; t--; )
|
|
80
80
|
r = /** @type {TemplateNode} */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
81
|
+
/* @__PURE__ */ ke(r);
|
|
82
|
+
S = r;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
for (var t = 0, r =
|
|
87
|
-
if (r.nodeType ===
|
|
85
|
+
function qt(e = !0) {
|
|
86
|
+
for (var t = 0, r = S; ; ) {
|
|
87
|
+
if (r.nodeType === _t) {
|
|
88
88
|
var n = (
|
|
89
89
|
/** @type {Comment} */
|
|
90
90
|
r.data
|
|
91
91
|
);
|
|
92
|
-
if (n ===
|
|
92
|
+
if (n === Rr) {
|
|
93
93
|
if (t === 0) return r;
|
|
94
94
|
t -= 1;
|
|
95
|
-
} else (n ===
|
|
95
|
+
} else (n === on || n === Gt) && (t += 1);
|
|
96
96
|
}
|
|
97
97
|
var i = (
|
|
98
98
|
/** @type {TemplateNode} */
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ ke(r)
|
|
100
100
|
);
|
|
101
101
|
e && r.remove(), r = i;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
if (!e || e.nodeType !==
|
|
106
|
-
throw
|
|
104
|
+
function dn(e) {
|
|
105
|
+
if (!e || e.nodeType !== _t)
|
|
106
|
+
throw er(), ht;
|
|
107
107
|
return (
|
|
108
108
|
/** @type {Comment} */
|
|
109
109
|
e.data
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function hn(e) {
|
|
113
113
|
return e === this.v;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Hs(e, t) {
|
|
116
116
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
return !
|
|
118
|
+
function pn(e) {
|
|
119
|
+
return !Hs(e, this.v);
|
|
120
120
|
}
|
|
121
|
-
let
|
|
122
|
-
function
|
|
123
|
-
|
|
121
|
+
let qs = !1, le = null;
|
|
122
|
+
function vt(e) {
|
|
123
|
+
le = e;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
127
|
-
p:
|
|
125
|
+
function Nr(e, t = !1, r) {
|
|
126
|
+
le = {
|
|
127
|
+
p: le,
|
|
128
128
|
i: !1,
|
|
129
129
|
c: null,
|
|
130
130
|
e: null,
|
|
@@ -133,54 +133,54 @@ function fr(e, t = !1, r) {
|
|
|
133
133
|
l: null
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Pr(e) {
|
|
137
137
|
var t = (
|
|
138
138
|
/** @type {ComponentContext} */
|
|
139
|
-
|
|
139
|
+
le
|
|
140
140
|
), r = t.e;
|
|
141
141
|
if (r !== null) {
|
|
142
142
|
t.e = null;
|
|
143
143
|
for (var n of r)
|
|
144
|
-
|
|
144
|
+
In(n);
|
|
145
145
|
}
|
|
146
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
146
|
+
return e !== void 0 && (t.x = e), t.i = !0, le = t.p, e ?? /** @type {T} */
|
|
147
147
|
{};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function vn() {
|
|
150
150
|
return !0;
|
|
151
151
|
}
|
|
152
|
-
let
|
|
153
|
-
function
|
|
154
|
-
var e =
|
|
155
|
-
|
|
152
|
+
let Je = [];
|
|
153
|
+
function gn() {
|
|
154
|
+
var e = Je;
|
|
155
|
+
Je = [], Es(e);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
if (
|
|
159
|
-
var t =
|
|
157
|
+
function rr(e) {
|
|
158
|
+
if (Je.length === 0 && !St) {
|
|
159
|
+
var t = Je;
|
|
160
160
|
queueMicrotask(() => {
|
|
161
|
-
t ===
|
|
161
|
+
t === Je && gn();
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
Je.push(e);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
for (;
|
|
168
|
-
|
|
166
|
+
function Ws() {
|
|
167
|
+
for (; Je.length > 0; )
|
|
168
|
+
gn();
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function mn(e) {
|
|
171
171
|
var t = E;
|
|
172
172
|
if (t === null)
|
|
173
|
-
return
|
|
174
|
-
if ((t.f &
|
|
175
|
-
if ((t.f &
|
|
173
|
+
return $.f |= He, e;
|
|
174
|
+
if ((t.f & Qt) === 0) {
|
|
175
|
+
if ((t.f & Xt) === 0)
|
|
176
176
|
throw e;
|
|
177
177
|
t.b.error(e);
|
|
178
178
|
} else
|
|
179
|
-
|
|
179
|
+
gt(e, t);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function gt(e, t) {
|
|
182
182
|
for (; t !== null; ) {
|
|
183
|
-
if ((t.f &
|
|
183
|
+
if ((t.f & Xt) !== 0)
|
|
184
184
|
try {
|
|
185
185
|
t.b.error(e);
|
|
186
186
|
return;
|
|
@@ -191,9 +191,9 @@ function it(e, t) {
|
|
|
191
191
|
}
|
|
192
192
|
throw e;
|
|
193
193
|
}
|
|
194
|
-
const
|
|
195
|
-
let
|
|
196
|
-
class
|
|
194
|
+
const Pt = /* @__PURE__ */ new Set();
|
|
195
|
+
let L = null, ve = null, he = [], nr = null, $r = !1, St = !1;
|
|
196
|
+
class me {
|
|
197
197
|
committed = !1;
|
|
198
198
|
/**
|
|
199
199
|
* The current values of any sources that are updated in this batch
|
|
@@ -257,7 +257,7 @@ class de {
|
|
|
257
257
|
* @param {Effect[]} root_effects
|
|
258
258
|
*/
|
|
259
259
|
process(t) {
|
|
260
|
-
|
|
260
|
+
he = [], this.apply();
|
|
261
261
|
var r = {
|
|
262
262
|
parent: null,
|
|
263
263
|
effect: null,
|
|
@@ -267,7 +267,7 @@ class de {
|
|
|
267
267
|
};
|
|
268
268
|
for (const n of t)
|
|
269
269
|
this.#a(n, r);
|
|
270
|
-
this.is_fork || this.#f(), this.is_deferred() ? (this.#o(r.effects), this.#o(r.render_effects), this.#o(r.block_effects)) : (
|
|
270
|
+
this.is_fork || this.#f(), this.is_deferred() ? (this.#o(r.effects), this.#o(r.render_effects), this.#o(r.block_effects)) : (L = null, Gr(r.render_effects), Gr(r.effects), this.#l?.resolve()), ve = null;
|
|
271
271
|
}
|
|
272
272
|
/**
|
|
273
273
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -278,15 +278,15 @@ class de {
|
|
|
278
278
|
#a(t, r) {
|
|
279
279
|
t.f ^= q;
|
|
280
280
|
for (var n = t.first; n !== null; ) {
|
|
281
|
-
var i = n.f, s = (i & (
|
|
282
|
-
if ((n.f &
|
|
281
|
+
var i = n.f, s = (i & (Ne | Ve)) !== 0, a = s && (i & q) !== 0, o = a || (i & ae) !== 0 || this.skipped_effects.has(n);
|
|
282
|
+
if ((n.f & Xt) !== 0 && n.b?.is_pending() && (r = {
|
|
283
283
|
parent: r,
|
|
284
284
|
effect: n,
|
|
285
285
|
effects: [],
|
|
286
286
|
render_effects: [],
|
|
287
287
|
block_effects: []
|
|
288
288
|
}), !o && n.fn !== null) {
|
|
289
|
-
s ? n.f ^= q : (i &
|
|
289
|
+
s ? n.f ^= q : (i & Mr) !== 0 ? r.effects.push(n) : zt(n) && ((n.f & Oe) !== 0 && r.block_effects.push(n), At(n));
|
|
290
290
|
var l = n.first;
|
|
291
291
|
if (l !== null) {
|
|
292
292
|
n = l;
|
|
@@ -304,7 +304,7 @@ class de {
|
|
|
304
304
|
*/
|
|
305
305
|
#o(t) {
|
|
306
306
|
for (const r of t)
|
|
307
|
-
((r.f &
|
|
307
|
+
((r.f & ne) !== 0 ? this.#i : this.#s).push(r), this.#c(r.deps), W(r, q);
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
310
|
* @param {Value[] | null} deps
|
|
@@ -312,7 +312,7 @@ class de {
|
|
|
312
312
|
#c(t) {
|
|
313
313
|
if (t !== null)
|
|
314
314
|
for (const r of t)
|
|
315
|
-
(r.f &
|
|
315
|
+
(r.f & U) === 0 || (r.f & tt) === 0 || (r.f ^= tt, this.#c(
|
|
316
316
|
/** @type {Derived} */
|
|
317
317
|
r.deps
|
|
318
318
|
));
|
|
@@ -324,17 +324,17 @@ class de {
|
|
|
324
324
|
* @param {any} value
|
|
325
325
|
*/
|
|
326
326
|
capture(t, r) {
|
|
327
|
-
this.previous.has(t) || this.previous.set(t, r), (t.f &
|
|
327
|
+
this.previous.has(t) || this.previous.set(t, r), (t.f & He) === 0 && (this.current.set(t, t.v), ve?.set(t, t.v));
|
|
328
328
|
}
|
|
329
329
|
activate() {
|
|
330
|
-
|
|
330
|
+
L = this, this.apply();
|
|
331
331
|
}
|
|
332
332
|
deactivate() {
|
|
333
|
-
|
|
333
|
+
L === this && (L = null, ve = null);
|
|
334
334
|
}
|
|
335
335
|
flush() {
|
|
336
|
-
if (this.activate(),
|
|
337
|
-
if (
|
|
336
|
+
if (this.activate(), he.length > 0) {
|
|
337
|
+
if (_n(), L !== null && L !== this)
|
|
338
338
|
return;
|
|
339
339
|
} else this.#r === 0 && this.process([]);
|
|
340
340
|
this.deactivate();
|
|
@@ -351,16 +351,16 @@ class de {
|
|
|
351
351
|
this.#r === 0 && this.#u();
|
|
352
352
|
}
|
|
353
353
|
#u() {
|
|
354
|
-
if (
|
|
354
|
+
if (Pt.size > 1) {
|
|
355
355
|
this.previous.clear();
|
|
356
|
-
var t =
|
|
356
|
+
var t = ve, r = !0, n = {
|
|
357
357
|
parent: null,
|
|
358
358
|
effect: null,
|
|
359
359
|
effects: [],
|
|
360
360
|
render_effects: [],
|
|
361
361
|
block_effects: []
|
|
362
362
|
};
|
|
363
|
-
for (const s of
|
|
363
|
+
for (const s of Pt) {
|
|
364
364
|
if (s === this) {
|
|
365
365
|
r = !1;
|
|
366
366
|
continue;
|
|
@@ -378,23 +378,23 @@ class de {
|
|
|
378
378
|
continue;
|
|
379
379
|
const o = [...s.current.keys()].filter((l) => !this.current.has(l));
|
|
380
380
|
if (o.length > 0) {
|
|
381
|
-
var i =
|
|
382
|
-
|
|
381
|
+
var i = he;
|
|
382
|
+
he = [];
|
|
383
383
|
const l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
|
|
384
384
|
for (const u of a)
|
|
385
|
-
|
|
386
|
-
if (
|
|
387
|
-
|
|
388
|
-
for (const u of
|
|
385
|
+
bn(u, o, l, c);
|
|
386
|
+
if (he.length > 0) {
|
|
387
|
+
L = s, s.apply();
|
|
388
|
+
for (const u of he)
|
|
389
389
|
s.#a(u, n);
|
|
390
390
|
s.deactivate();
|
|
391
391
|
}
|
|
392
|
-
|
|
392
|
+
he = i;
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
|
|
395
|
+
L = null, ve = t;
|
|
396
396
|
}
|
|
397
|
-
this.committed = !0,
|
|
397
|
+
this.committed = !0, Pt.delete(this);
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
400
400
|
*
|
|
@@ -412,9 +412,9 @@ class de {
|
|
|
412
412
|
}
|
|
413
413
|
revive() {
|
|
414
414
|
for (const t of this.#i)
|
|
415
|
-
|
|
415
|
+
W(t, ne), rt(t);
|
|
416
416
|
for (const t of this.#s)
|
|
417
|
-
|
|
417
|
+
W(t, Pe), rt(t);
|
|
418
418
|
this.#i = [], this.#s = [], this.flush();
|
|
419
419
|
}
|
|
420
420
|
/** @param {() => void} fn */
|
|
@@ -426,112 +426,112 @@ class de {
|
|
|
426
426
|
this.#e.add(t);
|
|
427
427
|
}
|
|
428
428
|
settled() {
|
|
429
|
-
return (this.#l ??=
|
|
429
|
+
return (this.#l ??= fn()).promise;
|
|
430
430
|
}
|
|
431
431
|
static ensure() {
|
|
432
|
-
if (
|
|
433
|
-
const t =
|
|
434
|
-
|
|
435
|
-
|
|
432
|
+
if (L === null) {
|
|
433
|
+
const t = L = new me();
|
|
434
|
+
Pt.add(L), St || me.enqueue(() => {
|
|
435
|
+
L === t && t.flush();
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
|
-
return
|
|
438
|
+
return L;
|
|
439
439
|
}
|
|
440
440
|
/** @param {() => void} task */
|
|
441
441
|
static enqueue(t) {
|
|
442
|
-
|
|
442
|
+
rr(t);
|
|
443
443
|
}
|
|
444
444
|
apply() {
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
function
|
|
448
|
-
var t =
|
|
449
|
-
|
|
447
|
+
function H(e) {
|
|
448
|
+
var t = St;
|
|
449
|
+
St = !0;
|
|
450
450
|
try {
|
|
451
451
|
for (var r; ; ) {
|
|
452
|
-
if (
|
|
453
|
-
return
|
|
452
|
+
if (Ws(), he.length === 0 && (L?.flush(), he.length === 0))
|
|
453
|
+
return nr = null, /** @type {T} */
|
|
454
454
|
r;
|
|
455
|
-
|
|
455
|
+
_n();
|
|
456
456
|
}
|
|
457
457
|
} finally {
|
|
458
|
-
|
|
458
|
+
St = t;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
462
|
-
var e =
|
|
463
|
-
|
|
461
|
+
function _n() {
|
|
462
|
+
var e = Qe;
|
|
463
|
+
$r = !0;
|
|
464
464
|
var t = null;
|
|
465
465
|
try {
|
|
466
466
|
var r = 0;
|
|
467
|
-
for (
|
|
468
|
-
var n =
|
|
467
|
+
for (Vt(!0); he.length > 0; ) {
|
|
468
|
+
var n = me.ensure();
|
|
469
469
|
if (r++ > 1e3) {
|
|
470
470
|
var i, s;
|
|
471
|
-
|
|
471
|
+
Ks();
|
|
472
472
|
}
|
|
473
|
-
n.process(
|
|
473
|
+
n.process(he), qe.clear();
|
|
474
474
|
}
|
|
475
475
|
} finally {
|
|
476
|
-
|
|
476
|
+
$r = !1, Vt(e), nr = null;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Ks() {
|
|
480
480
|
try {
|
|
481
|
-
|
|
481
|
+
Os();
|
|
482
482
|
} catch (e) {
|
|
483
|
-
|
|
483
|
+
gt(e, nr);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
let
|
|
487
|
-
function
|
|
486
|
+
let Re = null;
|
|
487
|
+
function Gr(e) {
|
|
488
488
|
var t = e.length;
|
|
489
489
|
if (t !== 0) {
|
|
490
490
|
for (var r = 0; r < t; ) {
|
|
491
491
|
var n = e[r++];
|
|
492
|
-
if ((n.f & (
|
|
493
|
-
|
|
494
|
-
for (const i of
|
|
495
|
-
if ((i.f & (
|
|
492
|
+
if ((n.f & (De | ae)) === 0 && zt(n) && (Re = /* @__PURE__ */ new Set(), At(n), n.deps === null && n.first === null && n.nodes === null && (n.teardown === null && n.ac === null ? Nn(n) : n.fn = null), Re?.size > 0)) {
|
|
493
|
+
qe.clear();
|
|
494
|
+
for (const i of Re) {
|
|
495
|
+
if ((i.f & (De | ae)) !== 0) continue;
|
|
496
496
|
const s = [i];
|
|
497
497
|
let a = i.parent;
|
|
498
498
|
for (; a !== null; )
|
|
499
|
-
|
|
499
|
+
Re.has(a) && (Re.delete(a), s.push(a)), a = a.parent;
|
|
500
500
|
for (let o = s.length - 1; o >= 0; o--) {
|
|
501
501
|
const l = s[o];
|
|
502
|
-
(l.f & (
|
|
502
|
+
(l.f & (De | ae)) === 0 && At(l);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
|
|
505
|
+
Re.clear();
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
|
|
508
|
+
Re = null;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function bn(e, t, r, n) {
|
|
512
512
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
513
513
|
for (const i of e.reactions) {
|
|
514
514
|
const s = i.f;
|
|
515
|
-
(s &
|
|
515
|
+
(s & U) !== 0 ? bn(
|
|
516
516
|
/** @type {Derived} */
|
|
517
517
|
i,
|
|
518
518
|
t,
|
|
519
519
|
r,
|
|
520
520
|
n
|
|
521
|
-
) : (s & (
|
|
521
|
+
) : (s & (Dr | Oe)) !== 0 && (s & ne) === 0 && wn(i, t, n) && (W(i, ne), rt(
|
|
522
522
|
/** @type {Effect} */
|
|
523
523
|
i
|
|
524
524
|
));
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function wn(e, t, r) {
|
|
528
528
|
const n = r.get(e);
|
|
529
529
|
if (n !== void 0) return n;
|
|
530
530
|
if (e.deps !== null)
|
|
531
531
|
for (const i of e.deps) {
|
|
532
532
|
if (t.includes(i))
|
|
533
533
|
return !0;
|
|
534
|
-
if ((i.f &
|
|
534
|
+
if ((i.f & U) !== 0 && wn(
|
|
535
535
|
/** @type {Derived} */
|
|
536
536
|
i,
|
|
537
537
|
t,
|
|
@@ -545,41 +545,41 @@ function Xr(e, t, r) {
|
|
|
545
545
|
}
|
|
546
546
|
return r.set(e, !1), !1;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
for (var t =
|
|
548
|
+
function rt(e) {
|
|
549
|
+
for (var t = nr = e; t.parent !== null; ) {
|
|
550
550
|
t = t.parent;
|
|
551
551
|
var r = t.f;
|
|
552
|
-
if (
|
|
552
|
+
if ($r && t === E && (r & Oe) !== 0 && (r & un) === 0)
|
|
553
553
|
return;
|
|
554
|
-
if ((r & (
|
|
554
|
+
if ((r & (Ve | Ne)) !== 0) {
|
|
555
555
|
if ((r & q) === 0) return;
|
|
556
556
|
t.f ^= q;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
|
|
559
|
+
he.push(t);
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
let t = 0, r =
|
|
561
|
+
function Vs(e) {
|
|
562
|
+
let t = 0, r = nt(0), n;
|
|
563
563
|
return () => {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
t -= 1, t === 0 && (n?.(), n = void 0,
|
|
564
|
+
Et() && (f(r), Ur(() => (t === 0 && (n = Hr(() => e(() => kt(r)))), t += 1, () => {
|
|
565
|
+
rr(() => {
|
|
566
|
+
t -= 1, t === 0 && (n?.(), n = void 0, kt(r));
|
|
567
567
|
});
|
|
568
568
|
})));
|
|
569
569
|
};
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
function
|
|
573
|
-
new
|
|
571
|
+
var Ys = pt | st | Xt;
|
|
572
|
+
function Zs(e, t, r) {
|
|
573
|
+
new Gs(e, t, r);
|
|
574
574
|
}
|
|
575
|
-
class
|
|
575
|
+
class Gs {
|
|
576
576
|
/** @type {Boundary | null} */
|
|
577
577
|
parent;
|
|
578
578
|
#t = !1;
|
|
579
579
|
/** @type {TemplateNode} */
|
|
580
580
|
#e;
|
|
581
581
|
/** @type {TemplateNode | null} */
|
|
582
|
-
#r =
|
|
582
|
+
#r = k ? S : null;
|
|
583
583
|
/** @type {BoundaryProps} */
|
|
584
584
|
#n;
|
|
585
585
|
/** @type {((anchor: Node) => void)} */
|
|
@@ -598,7 +598,7 @@ class qs {
|
|
|
598
598
|
#f = null;
|
|
599
599
|
#u = 0;
|
|
600
600
|
#d = 0;
|
|
601
|
-
#
|
|
601
|
+
#p = !1;
|
|
602
602
|
/**
|
|
603
603
|
* A source containing the number of pending async deriveds/expressions.
|
|
604
604
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -607,7 +607,7 @@ class qs {
|
|
|
607
607
|
* @type {Source<number> | null}
|
|
608
608
|
*/
|
|
609
609
|
#h = null;
|
|
610
|
-
#b =
|
|
610
|
+
#b = Vs(() => (this.#h = nt(this.#u), () => {
|
|
611
611
|
this.#h = null;
|
|
612
612
|
}));
|
|
613
613
|
/**
|
|
@@ -617,16 +617,16 @@ class qs {
|
|
|
617
617
|
*/
|
|
618
618
|
constructor(t, r, n) {
|
|
619
619
|
this.#e = t, this.#n = r, this.#l = n, this.parent = /** @type {Effect} */
|
|
620
|
-
E.b, this.#t = !!this.#n.pending, this.#i =
|
|
621
|
-
if (E.b = this,
|
|
620
|
+
E.b, this.#t = !!this.#n.pending, this.#i = jr(() => {
|
|
621
|
+
if (E.b = this, k) {
|
|
622
622
|
const s = this.#r;
|
|
623
|
-
|
|
624
|
-
s.nodeType ===
|
|
625
|
-
s.data ===
|
|
623
|
+
tr(), /** @type {Comment} */
|
|
624
|
+
s.nodeType === _t && /** @type {Comment} */
|
|
625
|
+
s.data === Gt ? this.#y() : this.#w();
|
|
626
626
|
} else {
|
|
627
627
|
var i = this.#m();
|
|
628
628
|
try {
|
|
629
|
-
this.#s =
|
|
629
|
+
this.#s = pe(() => n(i));
|
|
630
630
|
} catch (s) {
|
|
631
631
|
this.error(s);
|
|
632
632
|
}
|
|
@@ -635,11 +635,11 @@ class qs {
|
|
|
635
635
|
return () => {
|
|
636
636
|
this.#f?.remove();
|
|
637
637
|
};
|
|
638
|
-
},
|
|
638
|
+
}, Ys), k && (this.#e = S);
|
|
639
639
|
}
|
|
640
640
|
#w() {
|
|
641
641
|
try {
|
|
642
|
-
this.#s =
|
|
642
|
+
this.#s = pe(() => this.#l(this.#e));
|
|
643
643
|
} catch (t) {
|
|
644
644
|
this.error(t);
|
|
645
645
|
}
|
|
@@ -647,9 +647,9 @@ class qs {
|
|
|
647
647
|
}
|
|
648
648
|
#y() {
|
|
649
649
|
const t = this.#n.pending;
|
|
650
|
-
t && (this.#a =
|
|
650
|
+
t && (this.#a = pe(() => t(this.#e)), me.enqueue(() => {
|
|
651
651
|
var r = this.#m();
|
|
652
|
-
this.#s = this.#
|
|
652
|
+
this.#s = this.#v(() => (me.ensure(), pe(() => this.#l(r)))), this.#d > 0 ? this.#g() : (Xe(
|
|
653
653
|
/** @type {Effect} */
|
|
654
654
|
this.#a,
|
|
655
655
|
() => {
|
|
@@ -660,7 +660,7 @@ class qs {
|
|
|
660
660
|
}
|
|
661
661
|
#m() {
|
|
662
662
|
var t = this.#e;
|
|
663
|
-
return this.#t && (this.#f =
|
|
663
|
+
return this.#t && (this.#f = be(), this.#e.before(this.#f), t = this.#f), t;
|
|
664
664
|
}
|
|
665
665
|
/**
|
|
666
666
|
* Returns `true` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -675,15 +675,15 @@ class qs {
|
|
|
675
675
|
/**
|
|
676
676
|
* @param {() => Effect | null} fn
|
|
677
677
|
*/
|
|
678
|
-
#
|
|
679
|
-
var r = E, n =
|
|
680
|
-
|
|
678
|
+
#v(t) {
|
|
679
|
+
var r = E, n = $, i = le;
|
|
680
|
+
Se(this.#i), re(this.#i), vt(this.#i.ctx);
|
|
681
681
|
try {
|
|
682
682
|
return t();
|
|
683
683
|
} catch (s) {
|
|
684
|
-
return
|
|
684
|
+
return mn(s), null;
|
|
685
685
|
} finally {
|
|
686
|
-
|
|
686
|
+
Se(r), re(n), vt(i);
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
#g() {
|
|
@@ -694,7 +694,7 @@ class qs {
|
|
|
694
694
|
this.#s !== null && (this.#c = document.createDocumentFragment(), this.#c.append(
|
|
695
695
|
/** @type {TemplateNode} */
|
|
696
696
|
this.#f
|
|
697
|
-
),
|
|
697
|
+
), Un(this.#s, this.#c)), this.#a === null && (this.#a = pe(() => t(this.#e)));
|
|
698
698
|
}
|
|
699
699
|
/**
|
|
700
700
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -706,7 +706,7 @@ class qs {
|
|
|
706
706
|
this.parent && this.parent.#_(t);
|
|
707
707
|
return;
|
|
708
708
|
}
|
|
709
|
-
this.#d += t, this.#d === 0 && (this.#t = !1, this.#a &&
|
|
709
|
+
this.#d += t, this.#d === 0 && (this.#t = !1, this.#a && Xe(this.#a, () => {
|
|
710
710
|
this.#a = null;
|
|
711
711
|
}), this.#c && (this.#e.before(this.#c), this.#c = null));
|
|
712
712
|
}
|
|
@@ -717,7 +717,7 @@ class qs {
|
|
|
717
717
|
* @param {1 | -1} d
|
|
718
718
|
*/
|
|
719
719
|
update_pending_count(t) {
|
|
720
|
-
this.#_(t), this.#u += t, this.#h &&
|
|
720
|
+
this.#_(t), this.#u += t, this.#h && mt(this.#h, this.#u);
|
|
721
721
|
}
|
|
722
722
|
get_effect_pending() {
|
|
723
723
|
return this.#b(), f(
|
|
@@ -729,35 +729,35 @@ class qs {
|
|
|
729
729
|
error(t) {
|
|
730
730
|
var r = this.#n.onerror;
|
|
731
731
|
let n = this.#n.failed;
|
|
732
|
-
if (this.#
|
|
732
|
+
if (this.#p || !r && !n)
|
|
733
733
|
throw t;
|
|
734
|
-
this.#s && (
|
|
734
|
+
this.#s && (G(this.#s), this.#s = null), this.#a && (G(this.#a), this.#a = null), this.#o && (G(this.#o), this.#o = null), k && (oe(
|
|
735
735
|
/** @type {TemplateNode} */
|
|
736
736
|
this.#r
|
|
737
|
-
),
|
|
737
|
+
), Or(), oe(qt()));
|
|
738
738
|
var i = !1, s = !1;
|
|
739
739
|
const a = () => {
|
|
740
740
|
if (i) {
|
|
741
|
-
|
|
741
|
+
Bs();
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
|
-
i = !0, s &&
|
|
744
|
+
i = !0, s && js(), me.ensure(), this.#u = 0, this.#o !== null && Xe(this.#o, () => {
|
|
745
745
|
this.#o = null;
|
|
746
|
-
}), this.#t = this.has_pending_snippet(), this.#s = this.#
|
|
746
|
+
}), this.#t = this.has_pending_snippet(), this.#s = this.#v(() => (this.#p = !1, pe(() => this.#l(this.#e)))), this.#d > 0 ? this.#g() : this.#t = !1;
|
|
747
747
|
};
|
|
748
|
-
var o =
|
|
748
|
+
var o = $;
|
|
749
749
|
try {
|
|
750
|
-
|
|
750
|
+
re(null), s = !0, r?.(t, a), s = !1;
|
|
751
751
|
} catch (l) {
|
|
752
|
-
|
|
752
|
+
gt(l, this.#i && this.#i.parent);
|
|
753
753
|
} finally {
|
|
754
|
-
|
|
754
|
+
re(o);
|
|
755
755
|
}
|
|
756
|
-
n &&
|
|
757
|
-
this.#o = this.#
|
|
758
|
-
|
|
756
|
+
n && rr(() => {
|
|
757
|
+
this.#o = this.#v(() => {
|
|
758
|
+
me.ensure(), this.#p = !0;
|
|
759
759
|
try {
|
|
760
|
-
return
|
|
760
|
+
return pe(() => {
|
|
761
761
|
n(
|
|
762
762
|
this.#e,
|
|
763
763
|
() => t,
|
|
@@ -765,39 +765,39 @@ class qs {
|
|
|
765
765
|
);
|
|
766
766
|
});
|
|
767
767
|
} catch (l) {
|
|
768
|
-
return
|
|
768
|
+
return gt(
|
|
769
769
|
l,
|
|
770
770
|
/** @type {Effect} */
|
|
771
771
|
this.#i.parent
|
|
772
772
|
), null;
|
|
773
773
|
} finally {
|
|
774
|
-
this.#
|
|
774
|
+
this.#p = !1;
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
777
|
});
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
function
|
|
781
|
-
const i =
|
|
780
|
+
function Js(e, t, r, n) {
|
|
781
|
+
const i = sr;
|
|
782
782
|
if (r.length === 0 && e.length === 0) {
|
|
783
783
|
n(t.map(i));
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
var s =
|
|
786
|
+
var s = L, a = (
|
|
787
787
|
/** @type {Effect} */
|
|
788
788
|
E
|
|
789
|
-
), o =
|
|
789
|
+
), o = Xs();
|
|
790
790
|
function l() {
|
|
791
|
-
Promise.all(r.map((c) => /* @__PURE__ */
|
|
791
|
+
Promise.all(r.map((c) => /* @__PURE__ */ Qs(c))).then((c) => {
|
|
792
792
|
o();
|
|
793
793
|
try {
|
|
794
794
|
n([...t.map(i), ...c]);
|
|
795
795
|
} catch (u) {
|
|
796
|
-
(a.f &
|
|
796
|
+
(a.f & De) === 0 && gt(u, a);
|
|
797
797
|
}
|
|
798
|
-
s?.deactivate(),
|
|
798
|
+
s?.deactivate(), Wt();
|
|
799
799
|
}).catch((c) => {
|
|
800
|
-
|
|
800
|
+
gt(c, a);
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
803
|
e.length > 0 ? Promise.all(e).then(() => {
|
|
@@ -805,37 +805,37 @@ function Hs(e, t, r, n) {
|
|
|
805
805
|
try {
|
|
806
806
|
return l();
|
|
807
807
|
} finally {
|
|
808
|
-
s?.deactivate(),
|
|
808
|
+
s?.deactivate(), Wt();
|
|
809
809
|
}
|
|
810
810
|
}) : l();
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
var e = E, t =
|
|
812
|
+
function Xs() {
|
|
813
|
+
var e = E, t = $, r = le, n = L;
|
|
814
814
|
return function(s = !0) {
|
|
815
|
-
|
|
815
|
+
Se(e), re(t), vt(r), s && n?.activate();
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
|
|
818
|
+
function Wt() {
|
|
819
|
+
Se(null), re(null), vt(null);
|
|
820
820
|
}
|
|
821
821
|
// @__NO_SIDE_EFFECTS__
|
|
822
|
-
function
|
|
823
|
-
var t =
|
|
822
|
+
function sr(e) {
|
|
823
|
+
var t = U | ne, r = $ !== null && ($.f & U) !== 0 ? (
|
|
824
824
|
/** @type {Derived} */
|
|
825
|
-
|
|
825
|
+
$
|
|
826
826
|
) : null;
|
|
827
|
-
return E !== null && (E.f |=
|
|
828
|
-
ctx:
|
|
827
|
+
return E !== null && (E.f |= st), {
|
|
828
|
+
ctx: le,
|
|
829
829
|
deps: null,
|
|
830
830
|
effects: null,
|
|
831
|
-
equals:
|
|
831
|
+
equals: hn,
|
|
832
832
|
f: t,
|
|
833
833
|
fn: e,
|
|
834
834
|
reactions: null,
|
|
835
835
|
rv: 0,
|
|
836
836
|
v: (
|
|
837
837
|
/** @type {V} */
|
|
838
|
-
|
|
838
|
+
B
|
|
839
839
|
),
|
|
840
840
|
wv: 0,
|
|
841
841
|
parent: r ?? E,
|
|
@@ -843,12 +843,12 @@ function Ut(e) {
|
|
|
843
843
|
};
|
|
844
844
|
}
|
|
845
845
|
// @__NO_SIDE_EFFECTS__
|
|
846
|
-
function
|
|
846
|
+
function Qs(e, t) {
|
|
847
847
|
let r = (
|
|
848
848
|
/** @type {Effect | null} */
|
|
849
849
|
E
|
|
850
850
|
);
|
|
851
|
-
r === null &&
|
|
851
|
+
r === null && Ms();
|
|
852
852
|
var n = (
|
|
853
853
|
/** @type {Boundary} */
|
|
854
854
|
r.b
|
|
@@ -856,44 +856,44 @@ function Ks(e, t) {
|
|
|
856
856
|
/** @type {Promise<V>} */
|
|
857
857
|
/** @type {unknown} */
|
|
858
858
|
void 0
|
|
859
|
-
), s =
|
|
859
|
+
), s = nt(
|
|
860
860
|
/** @type {V} */
|
|
861
|
-
|
|
862
|
-
), a =
|
|
863
|
-
return
|
|
864
|
-
var l =
|
|
861
|
+
B
|
|
862
|
+
), a = !$, o = /* @__PURE__ */ new Map();
|
|
863
|
+
return li(() => {
|
|
864
|
+
var l = fn();
|
|
865
865
|
i = l.promise;
|
|
866
866
|
try {
|
|
867
867
|
Promise.resolve(e()).then(l.resolve, l.reject).then(() => {
|
|
868
|
-
c ===
|
|
868
|
+
c === L && c.committed && c.deactivate(), Wt();
|
|
869
869
|
});
|
|
870
870
|
} catch (h) {
|
|
871
|
-
l.reject(h),
|
|
871
|
+
l.reject(h), Wt();
|
|
872
872
|
}
|
|
873
873
|
var c = (
|
|
874
874
|
/** @type {Batch} */
|
|
875
|
-
|
|
875
|
+
L
|
|
876
876
|
);
|
|
877
877
|
if (a) {
|
|
878
878
|
var u = !n.is_pending();
|
|
879
|
-
n.update_pending_count(1), c.increment(u), o.get(c)?.reject(
|
|
879
|
+
n.update_pending_count(1), c.increment(u), o.get(c)?.reject(ft), o.delete(c), o.set(c, l);
|
|
880
880
|
}
|
|
881
881
|
const d = (h, g = void 0) => {
|
|
882
882
|
if (c.activate(), g)
|
|
883
|
-
g !==
|
|
883
|
+
g !== ft && (s.f |= He, mt(s, g));
|
|
884
884
|
else {
|
|
885
|
-
(s.f &
|
|
886
|
-
for (const [
|
|
887
|
-
if (o.delete(
|
|
888
|
-
b.reject(
|
|
885
|
+
(s.f & He) !== 0 && (s.f ^= He), mt(s, h);
|
|
886
|
+
for (const [p, b] of o) {
|
|
887
|
+
if (o.delete(p), p === c) break;
|
|
888
|
+
b.reject(ft);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
a && (n.update_pending_count(-1), c.decrement(u));
|
|
892
892
|
};
|
|
893
893
|
l.promise.then(d, (h) => d(null, h || "unknown"));
|
|
894
|
-
}),
|
|
894
|
+
}), ii(() => {
|
|
895
895
|
for (const l of o.values())
|
|
896
|
-
l.reject(
|
|
896
|
+
l.reject(ft);
|
|
897
897
|
}), new Promise((l) => {
|
|
898
898
|
function c(u) {
|
|
899
899
|
function d() {
|
|
@@ -905,30 +905,30 @@ function Ks(e, t) {
|
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
// @__NO_SIDE_EFFECTS__
|
|
908
|
-
function
|
|
909
|
-
const t = /* @__PURE__ */
|
|
910
|
-
return
|
|
908
|
+
function ge(e) {
|
|
909
|
+
const t = /* @__PURE__ */ sr(e);
|
|
910
|
+
return jn(t), t;
|
|
911
911
|
}
|
|
912
912
|
// @__NO_SIDE_EFFECTS__
|
|
913
|
-
function
|
|
914
|
-
const t = /* @__PURE__ */
|
|
915
|
-
return t.equals =
|
|
913
|
+
function ei(e) {
|
|
914
|
+
const t = /* @__PURE__ */ sr(e);
|
|
915
|
+
return t.equals = pn, t;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function yn(e) {
|
|
918
918
|
var t = e.effects;
|
|
919
919
|
if (t !== null) {
|
|
920
920
|
e.effects = null;
|
|
921
921
|
for (var r = 0; r < t.length; r += 1)
|
|
922
|
-
|
|
922
|
+
G(
|
|
923
923
|
/** @type {Effect} */
|
|
924
924
|
t[r]
|
|
925
925
|
);
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function ti(e) {
|
|
929
929
|
for (var t = e.parent; t !== null; ) {
|
|
930
|
-
if ((t.f &
|
|
931
|
-
return (t.f &
|
|
930
|
+
if ((t.f & U) === 0)
|
|
931
|
+
return (t.f & De) === 0 ? (
|
|
932
932
|
/** @type {Effect} */
|
|
933
933
|
t
|
|
934
934
|
) : null;
|
|
@@ -936,121 +936,121 @@ function Ys(e) {
|
|
|
936
936
|
}
|
|
937
937
|
return null;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Fr(e) {
|
|
940
940
|
var t, r = E;
|
|
941
|
-
|
|
941
|
+
Se(ti(e));
|
|
942
942
|
try {
|
|
943
|
-
e.f &= ~
|
|
943
|
+
e.f &= ~tt, yn(e), t = Wn(e);
|
|
944
944
|
} finally {
|
|
945
|
-
|
|
945
|
+
Se(r);
|
|
946
946
|
}
|
|
947
947
|
return t;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
var t =
|
|
951
|
-
if (e.equals(t) || (
|
|
952
|
-
if (
|
|
953
|
-
(
|
|
949
|
+
function xn(e) {
|
|
950
|
+
var t = Fr(e);
|
|
951
|
+
if (e.equals(t) || (L?.is_fork || (e.v = t), e.wv = Hn()), !it)
|
|
952
|
+
if (ve !== null)
|
|
953
|
+
(Et() || L?.is_fork) && ve.set(e, t);
|
|
954
954
|
else {
|
|
955
|
-
var r = (e.f &
|
|
956
|
-
|
|
955
|
+
var r = (e.f & _e) === 0 ? Pe : q;
|
|
956
|
+
W(e, r);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
let
|
|
960
|
-
const
|
|
961
|
-
let
|
|
962
|
-
function
|
|
959
|
+
let Sr = /* @__PURE__ */ new Set();
|
|
960
|
+
const qe = /* @__PURE__ */ new Map();
|
|
961
|
+
let $n = !1;
|
|
962
|
+
function nt(e, t) {
|
|
963
963
|
var r = {
|
|
964
964
|
f: 0,
|
|
965
965
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
966
966
|
v: e,
|
|
967
967
|
reactions: null,
|
|
968
|
-
equals:
|
|
968
|
+
equals: hn,
|
|
969
969
|
rv: 0,
|
|
970
970
|
wv: 0
|
|
971
971
|
};
|
|
972
972
|
return r;
|
|
973
973
|
}
|
|
974
974
|
// @__NO_SIDE_EFFECTS__
|
|
975
|
-
function
|
|
976
|
-
const r =
|
|
977
|
-
return
|
|
975
|
+
function z(e, t) {
|
|
976
|
+
const r = nt(e);
|
|
977
|
+
return jn(r), r;
|
|
978
978
|
}
|
|
979
979
|
// @__NO_SIDE_EFFECTS__
|
|
980
|
-
function
|
|
981
|
-
const n =
|
|
982
|
-
return t || (n.equals =
|
|
980
|
+
function Sn(e, t = !1, r = !0) {
|
|
981
|
+
const n = nt(e);
|
|
982
|
+
return t || (n.equals = pn), n;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
|
|
984
|
+
function m(e, t, r = !1) {
|
|
985
|
+
$ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
986
986
|
// to ensure we error if state is set inside an inspect effect
|
|
987
|
-
(
|
|
988
|
-
let n = r ?
|
|
989
|
-
return
|
|
987
|
+
(!$e || ($.f & Zr) !== 0) && vn() && ($.f & (U | Oe | Dr | Zr)) !== 0 && !Le?.includes(e) && Us();
|
|
988
|
+
let n = r ? Ie(t) : t;
|
|
989
|
+
return mt(e, n);
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function mt(e, t) {
|
|
992
992
|
if (!e.equals(t)) {
|
|
993
993
|
var r = e.v;
|
|
994
|
-
|
|
995
|
-
var n =
|
|
996
|
-
n.capture(e, r), (e.f &
|
|
994
|
+
it ? qe.set(e, t) : qe.set(e, r), e.v = t;
|
|
995
|
+
var n = me.ensure();
|
|
996
|
+
n.capture(e, r), (e.f & U) !== 0 && ((e.f & ne) !== 0 && Fr(
|
|
997
997
|
/** @type {Derived} */
|
|
998
998
|
e
|
|
999
|
-
),
|
|
999
|
+
), W(e, (e.f & _e) !== 0 ? q : Pe)), e.wv = Hn(), kn(e, ne), E !== null && (E.f & q) !== 0 && (E.f & (Ne | Ve)) === 0 && (de === null ? ui([e]) : de.push(e)), !n.is_fork && Sr.size > 0 && !$n && ri();
|
|
1000
1000
|
}
|
|
1001
1001
|
return t;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1004
|
-
|
|
1005
|
-
var e =
|
|
1006
|
-
|
|
1007
|
-
const t = Array.from(
|
|
1003
|
+
function ri() {
|
|
1004
|
+
$n = !1;
|
|
1005
|
+
var e = Qe;
|
|
1006
|
+
Vt(!0);
|
|
1007
|
+
const t = Array.from(Sr);
|
|
1008
1008
|
try {
|
|
1009
1009
|
for (const r of t)
|
|
1010
|
-
(r.f & q) !== 0 &&
|
|
1010
|
+
(r.f & q) !== 0 && W(r, Pe), zt(r) && At(r);
|
|
1011
1011
|
} finally {
|
|
1012
|
-
|
|
1012
|
+
Vt(e);
|
|
1013
1013
|
}
|
|
1014
|
-
|
|
1014
|
+
Sr.clear();
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
|
|
1016
|
+
function kt(e) {
|
|
1017
|
+
m(e, e.v + 1);
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function kn(e, t) {
|
|
1020
1020
|
var r = e.reactions;
|
|
1021
1021
|
if (r !== null)
|
|
1022
1022
|
for (var n = r.length, i = 0; i < n; i++) {
|
|
1023
|
-
var s = r[i], a = s.f, o = (a &
|
|
1024
|
-
if (o &&
|
|
1023
|
+
var s = r[i], a = s.f, o = (a & ne) === 0;
|
|
1024
|
+
if (o && W(s, t), (a & U) !== 0) {
|
|
1025
1025
|
var l = (
|
|
1026
1026
|
/** @type {Derived} */
|
|
1027
1027
|
s
|
|
1028
1028
|
);
|
|
1029
|
-
|
|
1030
|
-
} else o && ((a &
|
|
1029
|
+
ve?.delete(l), (a & tt) === 0 && (a & _e && (s.f |= tt), kn(l, Pe));
|
|
1030
|
+
} else o && ((a & Oe) !== 0 && Re !== null && Re.add(
|
|
1031
1031
|
/** @type {Effect} */
|
|
1032
1032
|
s
|
|
1033
|
-
),
|
|
1033
|
+
), rt(
|
|
1034
1034
|
/** @type {Effect} */
|
|
1035
1035
|
s
|
|
1036
1036
|
));
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1040
|
-
if (typeof e != "object" || e === null ||
|
|
1039
|
+
function Ie(e) {
|
|
1040
|
+
if (typeof e != "object" || e === null || Ut in e)
|
|
1041
1041
|
return e;
|
|
1042
|
-
const t =
|
|
1043
|
-
if (t !==
|
|
1042
|
+
const t = cn(e);
|
|
1043
|
+
if (t !== Ss && t !== ks)
|
|
1044
1044
|
return e;
|
|
1045
|
-
var r = /* @__PURE__ */ new Map(), n =
|
|
1046
|
-
if (
|
|
1045
|
+
var r = /* @__PURE__ */ new Map(), n = ln(e), i = /* @__PURE__ */ z(0), s = et, a = (o) => {
|
|
1046
|
+
if (et === s)
|
|
1047
1047
|
return o();
|
|
1048
|
-
var l =
|
|
1049
|
-
|
|
1048
|
+
var l = $, c = et;
|
|
1049
|
+
re(null), Qr(s);
|
|
1050
1050
|
var u = o();
|
|
1051
|
-
return
|
|
1051
|
+
return re(l), Qr(c), u;
|
|
1052
1052
|
};
|
|
1053
|
-
return n && r.set("length", /* @__PURE__ */
|
|
1053
|
+
return n && r.set("length", /* @__PURE__ */ z(
|
|
1054
1054
|
/** @type {any[]} */
|
|
1055
1055
|
e.length
|
|
1056
1056
|
)), new Proxy(
|
|
@@ -1058,34 +1058,34 @@ function qe(e) {
|
|
|
1058
1058
|
e,
|
|
1059
1059
|
{
|
|
1060
1060
|
defineProperty(o, l, c) {
|
|
1061
|
-
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) &&
|
|
1061
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Ps();
|
|
1062
1062
|
var u = r.get(l);
|
|
1063
1063
|
return u === void 0 ? u = a(() => {
|
|
1064
|
-
var d = /* @__PURE__ */
|
|
1064
|
+
var d = /* @__PURE__ */ z(c.value);
|
|
1065
1065
|
return r.set(l, d), d;
|
|
1066
|
-
}) :
|
|
1066
|
+
}) : m(u, c.value, !0), !0;
|
|
1067
1067
|
},
|
|
1068
1068
|
deleteProperty(o, l) {
|
|
1069
1069
|
var c = r.get(l);
|
|
1070
1070
|
if (c === void 0) {
|
|
1071
1071
|
if (l in o) {
|
|
1072
|
-
const u = a(() => /* @__PURE__ */
|
|
1073
|
-
r.set(l, u),
|
|
1072
|
+
const u = a(() => /* @__PURE__ */ z(B));
|
|
1073
|
+
r.set(l, u), kt(i);
|
|
1074
1074
|
}
|
|
1075
1075
|
} else
|
|
1076
|
-
|
|
1076
|
+
m(c, B), kt(i);
|
|
1077
1077
|
return !0;
|
|
1078
1078
|
},
|
|
1079
1079
|
get(o, l, c) {
|
|
1080
|
-
if (l ===
|
|
1080
|
+
if (l === Ut)
|
|
1081
1081
|
return e;
|
|
1082
1082
|
var u = r.get(l), d = l in o;
|
|
1083
|
-
if (u === void 0 && (!d ||
|
|
1084
|
-
var g =
|
|
1085
|
-
return
|
|
1083
|
+
if (u === void 0 && (!d || dt(o, l)?.writable) && (u = a(() => {
|
|
1084
|
+
var g = Ie(d ? o[l] : B), p = /* @__PURE__ */ z(g);
|
|
1085
|
+
return p;
|
|
1086
1086
|
}), r.set(l, u)), u !== void 0) {
|
|
1087
1087
|
var h = f(u);
|
|
1088
|
-
return h ===
|
|
1088
|
+
return h === B ? void 0 : h;
|
|
1089
1089
|
}
|
|
1090
1090
|
return Reflect.get(o, l, c);
|
|
1091
1091
|
},
|
|
@@ -1096,7 +1096,7 @@ function qe(e) {
|
|
|
1096
1096
|
u && (c.value = f(u));
|
|
1097
1097
|
} else if (c === void 0) {
|
|
1098
1098
|
var d = r.get(l), h = d?.v;
|
|
1099
|
-
if (d !== void 0 && h !==
|
|
1099
|
+
if (d !== void 0 && h !== B)
|
|
1100
1100
|
return {
|
|
1101
1101
|
enumerable: !0,
|
|
1102
1102
|
configurable: !0,
|
|
@@ -1107,16 +1107,16 @@ function qe(e) {
|
|
|
1107
1107
|
return c;
|
|
1108
1108
|
},
|
|
1109
1109
|
has(o, l) {
|
|
1110
|
-
if (l ===
|
|
1110
|
+
if (l === Ut)
|
|
1111
1111
|
return !0;
|
|
1112
|
-
var c = r.get(l), u = c !== void 0 && c.v !==
|
|
1113
|
-
if (c !== void 0 || E !== null && (!u ||
|
|
1112
|
+
var c = r.get(l), u = c !== void 0 && c.v !== B || Reflect.has(o, l);
|
|
1113
|
+
if (c !== void 0 || E !== null && (!u || dt(o, l)?.writable)) {
|
|
1114
1114
|
c === void 0 && (c = a(() => {
|
|
1115
|
-
var h = u ?
|
|
1115
|
+
var h = u ? Ie(o[l]) : B, g = /* @__PURE__ */ z(h);
|
|
1116
1116
|
return g;
|
|
1117
1117
|
}), r.set(l, c));
|
|
1118
1118
|
var d = f(c);
|
|
1119
|
-
if (d ===
|
|
1119
|
+
if (d === B)
|
|
1120
1120
|
return !1;
|
|
1121
1121
|
}
|
|
1122
1122
|
return u;
|
|
@@ -1126,26 +1126,26 @@ function qe(e) {
|
|
|
1126
1126
|
if (n && l === "length")
|
|
1127
1127
|
for (var g = c; g < /** @type {Source<number>} */
|
|
1128
1128
|
d.v; g += 1) {
|
|
1129
|
-
var
|
|
1130
|
-
|
|
1129
|
+
var p = r.get(g + "");
|
|
1130
|
+
p !== void 0 ? m(p, B) : g in o && (p = a(() => /* @__PURE__ */ z(B)), r.set(g + "", p));
|
|
1131
1131
|
}
|
|
1132
1132
|
if (d === void 0)
|
|
1133
|
-
(!h ||
|
|
1133
|
+
(!h || dt(o, l)?.writable) && (d = a(() => /* @__PURE__ */ z(void 0)), m(d, Ie(c)), r.set(l, d));
|
|
1134
1134
|
else {
|
|
1135
|
-
h = d.v !==
|
|
1136
|
-
var b = a(() =>
|
|
1137
|
-
|
|
1135
|
+
h = d.v !== B;
|
|
1136
|
+
var b = a(() => Ie(c));
|
|
1137
|
+
m(d, b);
|
|
1138
1138
|
}
|
|
1139
|
-
var
|
|
1140
|
-
if (
|
|
1139
|
+
var C = Reflect.getOwnPropertyDescriptor(o, l);
|
|
1140
|
+
if (C?.set && C.set.call(u, c), !h) {
|
|
1141
1141
|
if (n && typeof l == "string") {
|
|
1142
|
-
var
|
|
1142
|
+
var x = (
|
|
1143
1143
|
/** @type {Source<number>} */
|
|
1144
1144
|
r.get("length")
|
|
1145
|
-
),
|
|
1146
|
-
Number.isInteger(
|
|
1145
|
+
), y = Number(l);
|
|
1146
|
+
Number.isInteger(y) && y >= x.v && m(x, y + 1);
|
|
1147
1147
|
}
|
|
1148
|
-
|
|
1148
|
+
kt(i);
|
|
1149
1149
|
}
|
|
1150
1150
|
return !0;
|
|
1151
1151
|
},
|
|
@@ -1153,109 +1153,109 @@ function qe(e) {
|
|
|
1153
1153
|
f(i);
|
|
1154
1154
|
var l = Reflect.ownKeys(o).filter((d) => {
|
|
1155
1155
|
var h = r.get(d);
|
|
1156
|
-
return h === void 0 || h.v !==
|
|
1156
|
+
return h === void 0 || h.v !== B;
|
|
1157
1157
|
});
|
|
1158
1158
|
for (var [c, u] of r)
|
|
1159
|
-
u.v !==
|
|
1159
|
+
u.v !== B && !(c in o) && l.push(c);
|
|
1160
1160
|
return l;
|
|
1161
1161
|
},
|
|
1162
1162
|
setPrototypeOf() {
|
|
1163
|
-
|
|
1163
|
+
Fs();
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
1166
|
);
|
|
1167
1167
|
}
|
|
1168
|
-
var
|
|
1169
|
-
function
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1168
|
+
var Jr, En, Cn, An;
|
|
1169
|
+
function kr() {
|
|
1170
|
+
if (Jr === void 0) {
|
|
1171
|
+
Jr = window, En = /Firefox/.test(navigator.userAgent);
|
|
1172
1172
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1173
|
-
|
|
1173
|
+
Cn = dt(t, "firstChild").get, An = dt(t, "nextSibling").get, Yr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Yr(r) && (r.__t = void 0);
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function be(e = "") {
|
|
1177
1177
|
return document.createTextNode(e);
|
|
1178
1178
|
}
|
|
1179
1179
|
// @__NO_SIDE_EFFECTS__
|
|
1180
|
-
function
|
|
1180
|
+
function Ke(e) {
|
|
1181
1181
|
return (
|
|
1182
1182
|
/** @type {TemplateNode | null} */
|
|
1183
|
-
|
|
1183
|
+
Cn.call(e)
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
1186
1186
|
// @__NO_SIDE_EFFECTS__
|
|
1187
|
-
function
|
|
1187
|
+
function ke(e) {
|
|
1188
1188
|
return (
|
|
1189
1189
|
/** @type {TemplateNode | null} */
|
|
1190
|
-
|
|
1190
|
+
An.call(e)
|
|
1191
1191
|
);
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1194
|
-
if (!
|
|
1195
|
-
return /* @__PURE__ */
|
|
1196
|
-
var r = /* @__PURE__ */
|
|
1193
|
+
function I(e, t) {
|
|
1194
|
+
if (!k)
|
|
1195
|
+
return /* @__PURE__ */ Ke(e);
|
|
1196
|
+
var r = /* @__PURE__ */ Ke(S);
|
|
1197
1197
|
if (r === null)
|
|
1198
|
-
r =
|
|
1199
|
-
else if (t && r.nodeType !==
|
|
1200
|
-
var n =
|
|
1201
|
-
return r?.before(n),
|
|
1198
|
+
r = S.appendChild(be());
|
|
1199
|
+
else if (t && r.nodeType !== Lr) {
|
|
1200
|
+
var n = be();
|
|
1201
|
+
return r?.before(n), oe(n), n;
|
|
1202
1202
|
}
|
|
1203
|
-
return
|
|
1203
|
+
return oe(r), r;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
if (!
|
|
1207
|
-
var r = /* @__PURE__ */
|
|
1208
|
-
return r instanceof Comment && r.data === "" ? /* @__PURE__ */
|
|
1205
|
+
function zn(e, t = !1) {
|
|
1206
|
+
if (!k) {
|
|
1207
|
+
var r = /* @__PURE__ */ Ke(e);
|
|
1208
|
+
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ke(r) : r;
|
|
1209
1209
|
}
|
|
1210
|
-
if (t &&
|
|
1211
|
-
var n =
|
|
1212
|
-
return
|
|
1210
|
+
if (t && S?.nodeType !== Lr) {
|
|
1211
|
+
var n = be();
|
|
1212
|
+
return S?.before(n), oe(n), n;
|
|
1213
1213
|
}
|
|
1214
|
-
return
|
|
1214
|
+
return S;
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1217
|
-
let n =
|
|
1216
|
+
function O(e, t = 1, r = !1) {
|
|
1217
|
+
let n = k ? S : e;
|
|
1218
1218
|
for (var i; t--; )
|
|
1219
1219
|
i = n, n = /** @type {TemplateNode} */
|
|
1220
|
-
/* @__PURE__ */
|
|
1221
|
-
if (!
|
|
1220
|
+
/* @__PURE__ */ ke(n);
|
|
1221
|
+
if (!k)
|
|
1222
1222
|
return n;
|
|
1223
|
-
if (r && n?.nodeType !==
|
|
1224
|
-
var s =
|
|
1225
|
-
return n === null ? i?.after(s) : n.before(s),
|
|
1223
|
+
if (r && n?.nodeType !== Lr) {
|
|
1224
|
+
var s = be();
|
|
1225
|
+
return n === null ? i?.after(s) : n.before(s), oe(s), s;
|
|
1226
1226
|
}
|
|
1227
|
-
return
|
|
1227
|
+
return oe(n), n;
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function Tn(e) {
|
|
1230
1230
|
e.textContent = "";
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Rn() {
|
|
1233
1233
|
return !1;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
var t =
|
|
1237
|
-
|
|
1235
|
+
function Mn(e) {
|
|
1236
|
+
var t = $, r = E;
|
|
1237
|
+
re(null), Se(null);
|
|
1238
1238
|
try {
|
|
1239
1239
|
return e();
|
|
1240
1240
|
} finally {
|
|
1241
|
-
|
|
1241
|
+
re(t), Se(r);
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
E === null && (
|
|
1244
|
+
function ni(e) {
|
|
1245
|
+
E === null && ($ === null && Ls(), Ds()), it && Is();
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function si(e, t) {
|
|
1248
1248
|
var r = t.last;
|
|
1249
1249
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Ee(e, t, r) {
|
|
1252
1252
|
var n = E;
|
|
1253
|
-
n !== null && (n.f &
|
|
1253
|
+
n !== null && (n.f & ae) !== 0 && (e |= ae);
|
|
1254
1254
|
var i = {
|
|
1255
|
-
ctx:
|
|
1255
|
+
ctx: le,
|
|
1256
1256
|
deps: null,
|
|
1257
1257
|
nodes: null,
|
|
1258
|
-
f: e |
|
|
1258
|
+
f: e | ne | _e,
|
|
1259
1259
|
first: null,
|
|
1260
1260
|
fn: t,
|
|
1261
1261
|
last: null,
|
|
@@ -1269,143 +1269,143 @@ function ye(e, t, r) {
|
|
|
1269
1269
|
};
|
|
1270
1270
|
if (r)
|
|
1271
1271
|
try {
|
|
1272
|
-
|
|
1272
|
+
At(i), i.f |= Qt;
|
|
1273
1273
|
} catch (o) {
|
|
1274
|
-
throw
|
|
1274
|
+
throw G(i), o;
|
|
1275
1275
|
}
|
|
1276
|
-
else t !== null &&
|
|
1276
|
+
else t !== null && rt(i);
|
|
1277
1277
|
var s = i;
|
|
1278
1278
|
if (r && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1279
|
-
(s.f &
|
|
1279
|
+
(s.f & st) === 0 && (s = s.first, (e & Oe) !== 0 && (e & pt) !== 0 && s !== null && (s.f |= pt)), s !== null && (s.parent = n, n !== null && si(s, n), $ !== null && ($.f & U) !== 0 && (e & Ve) === 0)) {
|
|
1280
1280
|
var a = (
|
|
1281
1281
|
/** @type {Derived} */
|
|
1282
|
-
|
|
1282
|
+
$
|
|
1283
1283
|
);
|
|
1284
1284
|
(a.effects ??= []).push(s);
|
|
1285
1285
|
}
|
|
1286
1286
|
return i;
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1289
|
-
return
|
|
1288
|
+
function Et() {
|
|
1289
|
+
return $ !== null && !$e;
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1292
|
-
const t =
|
|
1293
|
-
return
|
|
1291
|
+
function ii(e) {
|
|
1292
|
+
const t = Ee(Ir, null, !1);
|
|
1293
|
+
return W(t, q), t.teardown = e, t;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1295
|
+
function Kt(e) {
|
|
1296
|
+
ni();
|
|
1297
1297
|
var t = (
|
|
1298
1298
|
/** @type {Effect} */
|
|
1299
1299
|
E.f
|
|
1300
|
-
), r =
|
|
1300
|
+
), r = !$ && (t & Ne) !== 0 && (t & Qt) === 0;
|
|
1301
1301
|
if (r) {
|
|
1302
1302
|
var n = (
|
|
1303
1303
|
/** @type {ComponentContext} */
|
|
1304
|
-
|
|
1304
|
+
le
|
|
1305
1305
|
);
|
|
1306
1306
|
(n.e ??= []).push(e);
|
|
1307
1307
|
} else
|
|
1308
|
-
return
|
|
1308
|
+
return In(e);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1311
|
-
return
|
|
1310
|
+
function In(e) {
|
|
1311
|
+
return Ee(Mr | As, e, !1);
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1314
|
-
|
|
1315
|
-
const t =
|
|
1313
|
+
function ai(e) {
|
|
1314
|
+
me.ensure();
|
|
1315
|
+
const t = Ee(Ve | st, e, !0);
|
|
1316
1316
|
return () => {
|
|
1317
|
-
|
|
1317
|
+
G(t);
|
|
1318
1318
|
};
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
|
|
1322
|
-
const t =
|
|
1320
|
+
function oi(e) {
|
|
1321
|
+
me.ensure();
|
|
1322
|
+
const t = Ee(Ve | st, e, !0);
|
|
1323
1323
|
return (r = {}) => new Promise((n) => {
|
|
1324
|
-
r.outro ?
|
|
1325
|
-
|
|
1326
|
-
}) : (
|
|
1324
|
+
r.outro ? Xe(t, () => {
|
|
1325
|
+
G(t), n(void 0);
|
|
1326
|
+
}) : (G(t), n(void 0));
|
|
1327
1327
|
});
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1330
|
-
return
|
|
1329
|
+
function Dn(e) {
|
|
1330
|
+
return Ee(Mr, e, !1);
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1333
|
-
return
|
|
1332
|
+
function li(e) {
|
|
1333
|
+
return Ee(Dr | st, e, !0);
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1336
|
-
return
|
|
1335
|
+
function Ur(e, t = 0) {
|
|
1336
|
+
return Ee(Ir | t, e, !0);
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1339
|
-
|
|
1340
|
-
|
|
1338
|
+
function te(e, t = [], r = [], n = []) {
|
|
1339
|
+
Js(n, t, r, (i) => {
|
|
1340
|
+
Ee(Ir, () => e(...i.map(f)), !0);
|
|
1341
1341
|
});
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1344
|
-
var r =
|
|
1343
|
+
function jr(e, t = 0) {
|
|
1344
|
+
var r = Ee(Oe | t, e, !0);
|
|
1345
1345
|
return r;
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1348
|
-
return
|
|
1347
|
+
function pe(e) {
|
|
1348
|
+
return Ee(Ne | st, e, !0);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function Ln(e) {
|
|
1351
1351
|
var t = e.teardown;
|
|
1352
1352
|
if (t !== null) {
|
|
1353
|
-
const r =
|
|
1354
|
-
|
|
1353
|
+
const r = it, n = $;
|
|
1354
|
+
Xr(!0), re(null);
|
|
1355
1355
|
try {
|
|
1356
1356
|
t.call(null);
|
|
1357
1357
|
} finally {
|
|
1358
|
-
|
|
1358
|
+
Xr(r), re(n);
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function On(e, t = !1) {
|
|
1363
1363
|
var r = e.first;
|
|
1364
1364
|
for (e.first = e.last = null; r !== null; ) {
|
|
1365
1365
|
const i = r.ac;
|
|
1366
|
-
i !== null &&
|
|
1367
|
-
i.abort(
|
|
1366
|
+
i !== null && Mn(() => {
|
|
1367
|
+
i.abort(ft);
|
|
1368
1368
|
});
|
|
1369
1369
|
var n = r.next;
|
|
1370
|
-
(r.f &
|
|
1370
|
+
(r.f & Ve) !== 0 ? r.parent = null : G(r, t), r = n;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function ci(e) {
|
|
1374
1374
|
for (var t = e.first; t !== null; ) {
|
|
1375
1375
|
var r = t.next;
|
|
1376
|
-
(t.f &
|
|
1376
|
+
(t.f & Ne) === 0 && G(t), t = r;
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function G(e, t = !0) {
|
|
1380
1380
|
var r = !1;
|
|
1381
|
-
(t || (e.f &
|
|
1381
|
+
(t || (e.f & un) !== 0) && e.nodes !== null && e.nodes.end !== null && (fi(
|
|
1382
1382
|
e.nodes.start,
|
|
1383
1383
|
/** @type {TemplateNode} */
|
|
1384
1384
|
e.nodes.end
|
|
1385
|
-
), r = !0),
|
|
1385
|
+
), r = !0), On(e, t && !r), Yt(e, 0), W(e, De);
|
|
1386
1386
|
var n = e.nodes && e.nodes.t;
|
|
1387
1387
|
if (n !== null)
|
|
1388
1388
|
for (const s of n)
|
|
1389
1389
|
s.stop();
|
|
1390
|
-
|
|
1390
|
+
Ln(e);
|
|
1391
1391
|
var i = e.parent;
|
|
1392
|
-
i !== null && i.first !== null &&
|
|
1392
|
+
i !== null && i.first !== null && Nn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function fi(e, t) {
|
|
1395
1395
|
for (; e !== null; ) {
|
|
1396
|
-
var r = e === t ? null : /* @__PURE__ */
|
|
1396
|
+
var r = e === t ? null : /* @__PURE__ */ ke(e);
|
|
1397
1397
|
e.remove(), e = r;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Nn(e) {
|
|
1401
1401
|
var t = e.parent, r = e.prev, n = e.next;
|
|
1402
1402
|
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1404
|
+
function Xe(e, t, r = !0) {
|
|
1405
1405
|
var n = [];
|
|
1406
|
-
|
|
1406
|
+
Pn(e, n, !0);
|
|
1407
1407
|
var i = () => {
|
|
1408
|
-
r &&
|
|
1408
|
+
r && G(e), t && t();
|
|
1409
1409
|
}, s = n.length;
|
|
1410
1410
|
if (s > 0) {
|
|
1411
1411
|
var a = () => --s || i();
|
|
@@ -1414,31 +1414,31 @@ function He(e, t, r = !0) {
|
|
|
1414
1414
|
} else
|
|
1415
1415
|
i();
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
if ((e.f &
|
|
1419
|
-
e.f ^=
|
|
1417
|
+
function Pn(e, t, r) {
|
|
1418
|
+
if ((e.f & ae) === 0) {
|
|
1419
|
+
e.f ^= ae;
|
|
1420
1420
|
var n = e.nodes && e.nodes.t;
|
|
1421
1421
|
if (n !== null)
|
|
1422
1422
|
for (const o of n)
|
|
1423
1423
|
(o.is_global || r) && t.push(o);
|
|
1424
1424
|
for (var i = e.first; i !== null; ) {
|
|
1425
|
-
var s = i.next, a = (i.f &
|
|
1425
|
+
var s = i.next, a = (i.f & pt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1426
1426
|
// it means the parent block effect was pruned. In that case,
|
|
1427
1427
|
// transparency information was transferred to the branch effect.
|
|
1428
|
-
(i.f &
|
|
1429
|
-
|
|
1428
|
+
(i.f & Ne) !== 0 && (e.f & Oe) !== 0;
|
|
1429
|
+
Pn(i, t, a ? r : !1), i = s;
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
|
|
1433
|
+
function Br(e) {
|
|
1434
|
+
Fn(e, !0);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
if ((e.f &
|
|
1438
|
-
e.f ^=
|
|
1436
|
+
function Fn(e, t) {
|
|
1437
|
+
if ((e.f & ae) !== 0) {
|
|
1438
|
+
e.f ^= ae, (e.f & q) === 0 && (W(e, ne), rt(e));
|
|
1439
1439
|
for (var r = e.first; r !== null; ) {
|
|
1440
|
-
var n = r.next, i = (r.f &
|
|
1441
|
-
|
|
1440
|
+
var n = r.next, i = (r.f & pt) !== 0 || (r.f & Ne) !== 0;
|
|
1441
|
+
Fn(r, i ? t : !1), r = n;
|
|
1442
1442
|
}
|
|
1443
1443
|
var s = e.nodes && e.nodes.t;
|
|
1444
1444
|
if (s !== null)
|
|
@@ -1446,242 +1446,242 @@ function mn(e, t) {
|
|
|
1446
1446
|
(a.is_global || t) && a.in();
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Un(e, t) {
|
|
1450
1450
|
if (e.nodes)
|
|
1451
1451
|
for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
|
|
1452
|
-
var i = r === n ? null : /* @__PURE__ */
|
|
1452
|
+
var i = r === n ? null : /* @__PURE__ */ ke(r);
|
|
1453
1453
|
t.append(r), r = i;
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
let
|
|
1457
|
-
function
|
|
1458
|
-
|
|
1456
|
+
let Qe = !1;
|
|
1457
|
+
function Vt(e) {
|
|
1458
|
+
Qe = e;
|
|
1459
1459
|
}
|
|
1460
|
-
let
|
|
1461
|
-
function
|
|
1462
|
-
|
|
1460
|
+
let it = !1;
|
|
1461
|
+
function Xr(e) {
|
|
1462
|
+
it = e;
|
|
1463
1463
|
}
|
|
1464
|
-
let
|
|
1465
|
-
function
|
|
1466
|
-
|
|
1464
|
+
let $ = null, $e = !1;
|
|
1465
|
+
function re(e) {
|
|
1466
|
+
$ = e;
|
|
1467
1467
|
}
|
|
1468
1468
|
let E = null;
|
|
1469
|
-
function
|
|
1469
|
+
function Se(e) {
|
|
1470
1470
|
E = e;
|
|
1471
1471
|
}
|
|
1472
|
-
let
|
|
1473
|
-
function
|
|
1474
|
-
|
|
1472
|
+
let Le = null;
|
|
1473
|
+
function jn(e) {
|
|
1474
|
+
$ !== null && (Le === null ? Le = [e] : Le.push(e));
|
|
1475
1475
|
}
|
|
1476
|
-
let
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1476
|
+
let Y = null, ie = 0, de = null;
|
|
1477
|
+
function ui(e) {
|
|
1478
|
+
de = e;
|
|
1479
1479
|
}
|
|
1480
|
-
let
|
|
1481
|
-
function
|
|
1482
|
-
|
|
1480
|
+
let Bn = 1, Ct = 0, et = Ct;
|
|
1481
|
+
function Qr(e) {
|
|
1482
|
+
et = e;
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1485
|
-
return ++
|
|
1484
|
+
function Hn() {
|
|
1485
|
+
return ++Bn;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function zt(e) {
|
|
1488
1488
|
var t = e.f;
|
|
1489
|
-
if ((t &
|
|
1489
|
+
if ((t & ne) !== 0)
|
|
1490
1490
|
return !0;
|
|
1491
|
-
if (t &
|
|
1491
|
+
if (t & U && (e.f &= ~tt), (t & Pe) !== 0) {
|
|
1492
1492
|
var r = e.deps;
|
|
1493
1493
|
if (r !== null)
|
|
1494
1494
|
for (var n = r.length, i = 0; i < n; i++) {
|
|
1495
1495
|
var s = r[i];
|
|
1496
|
-
if (
|
|
1496
|
+
if (zt(
|
|
1497
1497
|
/** @type {Derived} */
|
|
1498
1498
|
s
|
|
1499
|
-
) &&
|
|
1499
|
+
) && xn(
|
|
1500
1500
|
/** @type {Derived} */
|
|
1501
1501
|
s
|
|
1502
1502
|
), s.wv > e.wv)
|
|
1503
1503
|
return !0;
|
|
1504
1504
|
}
|
|
1505
|
-
(t &
|
|
1505
|
+
(t & _e) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1506
1506
|
// traversal of the graph in the other batches still happens
|
|
1507
|
-
|
|
1507
|
+
ve === null && W(e, q);
|
|
1508
1508
|
}
|
|
1509
1509
|
return !1;
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function qn(e, t, r = !0) {
|
|
1512
1512
|
var n = e.reactions;
|
|
1513
|
-
if (n !== null && !
|
|
1513
|
+
if (n !== null && !Le?.includes(e))
|
|
1514
1514
|
for (var i = 0; i < n.length; i++) {
|
|
1515
1515
|
var s = n[i];
|
|
1516
|
-
(s.f &
|
|
1516
|
+
(s.f & U) !== 0 ? qn(
|
|
1517
1517
|
/** @type {Derived} */
|
|
1518
1518
|
s,
|
|
1519
1519
|
t,
|
|
1520
1520
|
!1
|
|
1521
|
-
) : t === s && (r ?
|
|
1521
|
+
) : t === s && (r ? W(s, ne) : (s.f & q) !== 0 && W(s, Pe), rt(
|
|
1522
1522
|
/** @type {Effect} */
|
|
1523
1523
|
s
|
|
1524
1524
|
));
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1528
|
-
var t =
|
|
1529
|
-
|
|
1530
|
-
null,
|
|
1531
|
-
e.ac.abort(
|
|
1527
|
+
function Wn(e) {
|
|
1528
|
+
var t = Y, r = ie, n = de, i = $, s = Le, a = le, o = $e, l = et, c = e.f;
|
|
1529
|
+
Y = /** @type {null | Value[]} */
|
|
1530
|
+
null, ie = 0, de = null, $ = (c & (Ne | Ve)) === 0 ? e : null, Le = null, vt(e.ctx), $e = !1, et = ++Ct, e.ac !== null && (Mn(() => {
|
|
1531
|
+
e.ac.abort(ft);
|
|
1532
1532
|
}), e.ac = null);
|
|
1533
1533
|
try {
|
|
1534
|
-
e.f |=
|
|
1534
|
+
e.f |= xr;
|
|
1535
1535
|
var u = (
|
|
1536
1536
|
/** @type {Function} */
|
|
1537
1537
|
e.fn
|
|
1538
1538
|
), d = u(), h = e.deps;
|
|
1539
|
-
if (
|
|
1539
|
+
if (Y !== null) {
|
|
1540
1540
|
var g;
|
|
1541
|
-
if (
|
|
1542
|
-
for (h.length =
|
|
1543
|
-
h[
|
|
1541
|
+
if (Yt(e, ie), h !== null && ie > 0)
|
|
1542
|
+
for (h.length = ie + Y.length, g = 0; g < Y.length; g++)
|
|
1543
|
+
h[ie + g] = Y[g];
|
|
1544
1544
|
else
|
|
1545
|
-
e.deps = h =
|
|
1546
|
-
if (
|
|
1547
|
-
for (g =
|
|
1545
|
+
e.deps = h = Y;
|
|
1546
|
+
if (Et() && (e.f & _e) !== 0)
|
|
1547
|
+
for (g = ie; g < h.length; g++)
|
|
1548
1548
|
(h[g].reactions ??= []).push(e);
|
|
1549
|
-
} else h !== null &&
|
|
1550
|
-
if (
|
|
1549
|
+
} else h !== null && ie < h.length && (Yt(e, ie), h.length = ie);
|
|
1550
|
+
if (vn() && de !== null && !$e && h !== null && (e.f & (U | Pe | ne)) === 0)
|
|
1551
1551
|
for (g = 0; g < /** @type {Source[]} */
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1552
|
+
de.length; g++)
|
|
1553
|
+
qn(
|
|
1554
|
+
de[g],
|
|
1555
1555
|
/** @type {Effect} */
|
|
1556
1556
|
e
|
|
1557
1557
|
);
|
|
1558
|
-
return i !== null && i !== e && (
|
|
1559
|
-
|
|
1560
|
-
} catch (
|
|
1561
|
-
return
|
|
1558
|
+
return i !== null && i !== e && (Ct++, de !== null && (n === null ? n = de : n.push(.../** @type {Source[]} */
|
|
1559
|
+
de))), (e.f & He) !== 0 && (e.f ^= He), d;
|
|
1560
|
+
} catch (p) {
|
|
1561
|
+
return mn(p);
|
|
1562
1562
|
} finally {
|
|
1563
|
-
e.f ^=
|
|
1563
|
+
e.f ^= xr, Y = t, ie = r, de = n, $ = i, Le = s, vt(a), $e = o, et = l;
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function di(e, t) {
|
|
1567
1567
|
let r = t.reactions;
|
|
1568
1568
|
if (r !== null) {
|
|
1569
|
-
var n =
|
|
1569
|
+
var n = xs.call(r, e);
|
|
1570
1570
|
if (n !== -1) {
|
|
1571
1571
|
var i = r.length - 1;
|
|
1572
1572
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
r === null && (t.f &
|
|
1575
|
+
r === null && (t.f & U) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1576
1576
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1577
1577
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1578
|
-
(
|
|
1578
|
+
(Y === null || !Y.includes(t)) && (W(t, Pe), (t.f & _e) !== 0 && (t.f ^= _e, t.f &= ~tt), yn(
|
|
1579
1579
|
/** @type {Derived} **/
|
|
1580
1580
|
t
|
|
1581
|
-
),
|
|
1581
|
+
), Yt(
|
|
1582
1582
|
/** @type {Derived} **/
|
|
1583
1583
|
t,
|
|
1584
1584
|
0
|
|
1585
1585
|
));
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function Yt(e, t) {
|
|
1588
1588
|
var r = e.deps;
|
|
1589
1589
|
if (r !== null)
|
|
1590
1590
|
for (var n = t; n < r.length; n++)
|
|
1591
|
-
|
|
1591
|
+
di(e, r[n]);
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function At(e) {
|
|
1594
1594
|
var t = e.f;
|
|
1595
|
-
if ((t &
|
|
1596
|
-
|
|
1597
|
-
var r = E, n =
|
|
1598
|
-
E = e,
|
|
1595
|
+
if ((t & De) === 0) {
|
|
1596
|
+
W(e, q);
|
|
1597
|
+
var r = E, n = Qe;
|
|
1598
|
+
E = e, Qe = !0;
|
|
1599
1599
|
try {
|
|
1600
|
-
(t & (
|
|
1601
|
-
var i =
|
|
1602
|
-
e.teardown = typeof i == "function" ? i : null, e.wv =
|
|
1600
|
+
(t & (Oe | Cs)) !== 0 ? ci(e) : On(e), Ln(e);
|
|
1601
|
+
var i = Wn(e);
|
|
1602
|
+
e.teardown = typeof i == "function" ? i : null, e.wv = Bn;
|
|
1603
1603
|
var s;
|
|
1604
|
-
|
|
1604
|
+
yr && qs && (e.f & ne) !== 0 && e.deps;
|
|
1605
1605
|
} finally {
|
|
1606
|
-
|
|
1606
|
+
Qe = n, E = r;
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
function f(e) {
|
|
1611
|
-
var t = e.f, r = (t &
|
|
1612
|
-
if (
|
|
1613
|
-
var n = E !== null && (E.f &
|
|
1614
|
-
if (!n && !
|
|
1615
|
-
var i =
|
|
1616
|
-
if ((
|
|
1617
|
-
e.rv <
|
|
1611
|
+
var t = e.f, r = (t & U) !== 0;
|
|
1612
|
+
if ($ !== null && !$e) {
|
|
1613
|
+
var n = E !== null && (E.f & De) !== 0;
|
|
1614
|
+
if (!n && !Le?.includes(e)) {
|
|
1615
|
+
var i = $.deps;
|
|
1616
|
+
if (($.f & xr) !== 0)
|
|
1617
|
+
e.rv < Ct && (e.rv = Ct, Y === null && i !== null && i[ie] === e ? ie++ : Y === null ? Y = [e] : Y.includes(e) || Y.push(e));
|
|
1618
1618
|
else {
|
|
1619
|
-
(
|
|
1619
|
+
($.deps ??= []).push(e);
|
|
1620
1620
|
var s = e.reactions;
|
|
1621
|
-
s === null ? e.reactions = [
|
|
1621
|
+
s === null ? e.reactions = [$] : s.includes($) || s.push($);
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
if (
|
|
1626
|
-
if (
|
|
1627
|
-
return
|
|
1625
|
+
if (it) {
|
|
1626
|
+
if (qe.has(e))
|
|
1627
|
+
return qe.get(e);
|
|
1628
1628
|
if (r) {
|
|
1629
1629
|
var a = (
|
|
1630
1630
|
/** @type {Derived} */
|
|
1631
1631
|
e
|
|
1632
1632
|
), o = a.v;
|
|
1633
|
-
return ((a.f & q) === 0 && a.reactions !== null ||
|
|
1633
|
+
return ((a.f & q) === 0 && a.reactions !== null || Vn(a)) && (o = Fr(a)), qe.set(a, o), o;
|
|
1634
1634
|
}
|
|
1635
|
-
} else r && (!
|
|
1636
|
-
e,
|
|
1637
|
-
if (
|
|
1638
|
-
return
|
|
1639
|
-
if ((e.f &
|
|
1635
|
+
} else r && (!ve?.has(e) || L?.is_fork && !Et()) && (a = /** @type {Derived} */
|
|
1636
|
+
e, zt(a) && xn(a), Qe && Et() && (a.f & _e) === 0 && Kn(a));
|
|
1637
|
+
if (ve?.has(e))
|
|
1638
|
+
return ve.get(e);
|
|
1639
|
+
if ((e.f & He) !== 0)
|
|
1640
1640
|
throw e.v;
|
|
1641
1641
|
return e.v;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function Kn(e) {
|
|
1644
1644
|
if (e.deps !== null) {
|
|
1645
|
-
e.f ^=
|
|
1645
|
+
e.f ^= _e;
|
|
1646
1646
|
for (const t of e.deps)
|
|
1647
|
-
(t.reactions ??= []).push(e), (t.f &
|
|
1647
|
+
(t.reactions ??= []).push(e), (t.f & U) !== 0 && (t.f & _e) === 0 && Kn(
|
|
1648
1648
|
/** @type {Derived} */
|
|
1649
1649
|
t
|
|
1650
1650
|
);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
if (e.v ===
|
|
1653
|
+
function Vn(e) {
|
|
1654
|
+
if (e.v === B) return !0;
|
|
1655
1655
|
if (e.deps === null) return !1;
|
|
1656
1656
|
for (const t of e.deps)
|
|
1657
|
-
if (
|
|
1657
|
+
if (qe.has(t) || (t.f & U) !== 0 && Vn(
|
|
1658
1658
|
/** @type {Derived} */
|
|
1659
1659
|
t
|
|
1660
1660
|
))
|
|
1661
1661
|
return !0;
|
|
1662
1662
|
return !1;
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1665
|
-
var t =
|
|
1664
|
+
function Hr(e) {
|
|
1665
|
+
var t = $e;
|
|
1666
1666
|
try {
|
|
1667
|
-
return
|
|
1667
|
+
return $e = !0, e();
|
|
1668
1668
|
} finally {
|
|
1669
|
-
|
|
1669
|
+
$e = t;
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
|
-
const
|
|
1673
|
-
function
|
|
1674
|
-
e.f = e.f &
|
|
1672
|
+
const hi = -7169;
|
|
1673
|
+
function W(e, t) {
|
|
1674
|
+
e.f = e.f & hi | t;
|
|
1675
1675
|
}
|
|
1676
|
-
const
|
|
1677
|
-
function
|
|
1676
|
+
const Yn = /* @__PURE__ */ new Set(), Er = /* @__PURE__ */ new Set();
|
|
1677
|
+
function Zn(e) {
|
|
1678
1678
|
for (var t = 0; t < e.length; t++)
|
|
1679
|
-
|
|
1680
|
-
for (var r of
|
|
1679
|
+
Yn.add(e[t]);
|
|
1680
|
+
for (var r of Er)
|
|
1681
1681
|
r(e);
|
|
1682
1682
|
}
|
|
1683
|
-
let
|
|
1684
|
-
function
|
|
1683
|
+
let en = null;
|
|
1684
|
+
function Ft(e) {
|
|
1685
1685
|
var t = this, r = (
|
|
1686
1686
|
/** @type {Node} */
|
|
1687
1687
|
t.ownerDocument
|
|
@@ -1689,8 +1689,8 @@ function yt(e) {
|
|
|
1689
1689
|
/** @type {null | Element} */
|
|
1690
1690
|
i[0] || e.target
|
|
1691
1691
|
);
|
|
1692
|
-
|
|
1693
|
-
var a = 0, o =
|
|
1692
|
+
en = e;
|
|
1693
|
+
var a = 0, o = en === e && e.__root;
|
|
1694
1694
|
if (o) {
|
|
1695
1695
|
var l = i.indexOf(o);
|
|
1696
1696
|
if (l !== -1 && (t === document || t === /** @type {any} */
|
|
@@ -1705,17 +1705,17 @@ function yt(e) {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
if (s = /** @type {Element} */
|
|
1707
1707
|
i[a] || e.target, s !== t) {
|
|
1708
|
-
|
|
1708
|
+
Ht(e, "currentTarget", {
|
|
1709
1709
|
configurable: !0,
|
|
1710
1710
|
get() {
|
|
1711
1711
|
return s || r;
|
|
1712
1712
|
}
|
|
1713
1713
|
});
|
|
1714
|
-
var u =
|
|
1715
|
-
|
|
1714
|
+
var u = $, d = E;
|
|
1715
|
+
re(null), Se(null);
|
|
1716
1716
|
try {
|
|
1717
1717
|
for (var h, g = []; s !== null; ) {
|
|
1718
|
-
var
|
|
1718
|
+
var p = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1719
1719
|
s.host || null;
|
|
1720
1720
|
try {
|
|
1721
1721
|
var b = s["__" + n];
|
|
@@ -1723,30 +1723,30 @@ function yt(e) {
|
|
|
1723
1723
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1724
1724
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1725
1725
|
e.target === s) && b.call(s, e);
|
|
1726
|
-
} catch (
|
|
1727
|
-
h ? g.push(
|
|
1726
|
+
} catch (C) {
|
|
1727
|
+
h ? g.push(C) : h = C;
|
|
1728
1728
|
}
|
|
1729
|
-
if (e.cancelBubble ||
|
|
1729
|
+
if (e.cancelBubble || p === t || p === null)
|
|
1730
1730
|
break;
|
|
1731
|
-
s =
|
|
1731
|
+
s = p;
|
|
1732
1732
|
}
|
|
1733
1733
|
if (h) {
|
|
1734
|
-
for (let
|
|
1734
|
+
for (let C of g)
|
|
1735
1735
|
queueMicrotask(() => {
|
|
1736
|
-
throw
|
|
1736
|
+
throw C;
|
|
1737
1737
|
});
|
|
1738
1738
|
throw h;
|
|
1739
1739
|
}
|
|
1740
1740
|
} finally {
|
|
1741
|
-
e.__root = t, delete e.currentTarget,
|
|
1741
|
+
e.__root = t, delete e.currentTarget, re(u), Se(d);
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
1744
|
}
|
|
1745
|
-
function
|
|
1745
|
+
function Gn(e) {
|
|
1746
1746
|
var t = document.createElement("template");
|
|
1747
1747
|
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1748
1748
|
}
|
|
1749
|
-
function
|
|
1749
|
+
function We(e, t) {
|
|
1750
1750
|
var r = (
|
|
1751
1751
|
/** @type {Effect} */
|
|
1752
1752
|
E
|
|
@@ -1754,66 +1754,72 @@ function tt(e, t) {
|
|
|
1754
1754
|
r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
|
|
1755
1755
|
}
|
|
1756
1756
|
// @__NO_SIDE_EFFECTS__
|
|
1757
|
-
function
|
|
1758
|
-
var r = (t &
|
|
1757
|
+
function N(e, t) {
|
|
1758
|
+
var r = (t & bs) !== 0, n = (t & ws) !== 0, i, s = !e.startsWith("<!>");
|
|
1759
1759
|
return () => {
|
|
1760
|
-
if (
|
|
1761
|
-
return
|
|
1762
|
-
i === void 0 && (i =
|
|
1763
|
-
/* @__PURE__ */
|
|
1760
|
+
if (k)
|
|
1761
|
+
return We(S, null), S;
|
|
1762
|
+
i === void 0 && (i = Gn(s ? e : "<!>" + e), r || (i = /** @type {TemplateNode} */
|
|
1763
|
+
/* @__PURE__ */ Ke(i)));
|
|
1764
1764
|
var a = (
|
|
1765
1765
|
/** @type {TemplateNode} */
|
|
1766
|
-
n ||
|
|
1766
|
+
n || En ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1767
1767
|
);
|
|
1768
1768
|
if (r) {
|
|
1769
1769
|
var o = (
|
|
1770
1770
|
/** @type {TemplateNode} */
|
|
1771
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ Ke(a)
|
|
1772
1772
|
), l = (
|
|
1773
1773
|
/** @type {TemplateNode} */
|
|
1774
1774
|
a.lastChild
|
|
1775
1775
|
);
|
|
1776
|
-
|
|
1776
|
+
We(o, l);
|
|
1777
1777
|
} else
|
|
1778
|
-
|
|
1778
|
+
We(a, a);
|
|
1779
1779
|
return a;
|
|
1780
1780
|
};
|
|
1781
1781
|
}
|
|
1782
1782
|
// @__NO_SIDE_EFFECTS__
|
|
1783
|
-
function
|
|
1783
|
+
function pi(e, t, r = "svg") {
|
|
1784
1784
|
var n = !e.startsWith("<!>"), i = `<${r}>${n ? e : "<!>" + e}</${r}>`, s;
|
|
1785
1785
|
return () => {
|
|
1786
|
-
if (
|
|
1787
|
-
return
|
|
1786
|
+
if (k)
|
|
1787
|
+
return We(S, null), S;
|
|
1788
1788
|
if (!s) {
|
|
1789
1789
|
var a = (
|
|
1790
1790
|
/** @type {DocumentFragment} */
|
|
1791
|
-
|
|
1791
|
+
Gn(i)
|
|
1792
1792
|
), o = (
|
|
1793
1793
|
/** @type {Element} */
|
|
1794
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ Ke(a)
|
|
1795
1795
|
);
|
|
1796
1796
|
s = /** @type {Element} */
|
|
1797
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ Ke(o);
|
|
1798
1798
|
}
|
|
1799
1799
|
var l = (
|
|
1800
1800
|
/** @type {TemplateNode} */
|
|
1801
1801
|
s.cloneNode(!0)
|
|
1802
1802
|
);
|
|
1803
|
-
return
|
|
1803
|
+
return We(l, l), l;
|
|
1804
1804
|
};
|
|
1805
1805
|
}
|
|
1806
1806
|
// @__NO_SIDE_EFFECTS__
|
|
1807
|
-
function
|
|
1808
|
-
return /* @__PURE__ */
|
|
1807
|
+
function ir(e, t) {
|
|
1808
|
+
return /* @__PURE__ */ pi(e, t, "svg");
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1811
|
-
if (
|
|
1810
|
+
function vi() {
|
|
1811
|
+
if (k)
|
|
1812
|
+
return We(S, null), S;
|
|
1813
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = be();
|
|
1814
|
+
return e.append(t, r), We(t, r), e;
|
|
1815
|
+
}
|
|
1816
|
+
function D(e, t) {
|
|
1817
|
+
if (k) {
|
|
1812
1818
|
var r = (
|
|
1813
1819
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1814
1820
|
E
|
|
1815
1821
|
);
|
|
1816
|
-
((r.f &
|
|
1822
|
+
((r.f & Qt) === 0 || r.nodes.end === null) && (r.nodes.end = S), tr();
|
|
1817
1823
|
return;
|
|
1818
1824
|
}
|
|
1819
1825
|
e !== null && e.before(
|
|
@@ -1821,61 +1827,61 @@ function M(e, t) {
|
|
|
1821
1827
|
t
|
|
1822
1828
|
);
|
|
1823
1829
|
}
|
|
1824
|
-
const
|
|
1825
|
-
function
|
|
1826
|
-
return
|
|
1830
|
+
const gi = ["touchstart", "touchmove"];
|
|
1831
|
+
function mi(e) {
|
|
1832
|
+
return gi.includes(e);
|
|
1827
1833
|
}
|
|
1828
1834
|
function je(e, t) {
|
|
1829
1835
|
var r = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1830
1836
|
r !== (e.__t ??= e.nodeValue) && (e.__t = r, e.nodeValue = r + "");
|
|
1831
1837
|
}
|
|
1832
|
-
function
|
|
1833
|
-
return
|
|
1838
|
+
function Jn(e, t) {
|
|
1839
|
+
return Xn(e, t);
|
|
1834
1840
|
}
|
|
1835
|
-
function
|
|
1836
|
-
|
|
1837
|
-
const r = t.target, n =
|
|
1841
|
+
function _i(e, t) {
|
|
1842
|
+
kr(), t.intro = t.intro ?? !1;
|
|
1843
|
+
const r = t.target, n = k, i = S;
|
|
1838
1844
|
try {
|
|
1839
|
-
for (var s = /* @__PURE__ */
|
|
1840
|
-
s.data !==
|
|
1841
|
-
s = /* @__PURE__ */
|
|
1845
|
+
for (var s = /* @__PURE__ */ Ke(r); s && (s.nodeType !== _t || /** @type {Comment} */
|
|
1846
|
+
s.data !== on); )
|
|
1847
|
+
s = /* @__PURE__ */ ke(s);
|
|
1842
1848
|
if (!s)
|
|
1843
|
-
throw
|
|
1844
|
-
|
|
1849
|
+
throw ht;
|
|
1850
|
+
Me(!0), oe(
|
|
1845
1851
|
/** @type {Comment} */
|
|
1846
1852
|
s
|
|
1847
1853
|
);
|
|
1848
|
-
const a =
|
|
1849
|
-
return
|
|
1854
|
+
const a = Xn(e, { ...t, anchor: s });
|
|
1855
|
+
return Me(!1), /** @type {Exports} */
|
|
1850
1856
|
a;
|
|
1851
1857
|
} catch (a) {
|
|
1852
1858
|
if (a instanceof Error && a.message.split(`
|
|
1853
1859
|
`).some((o) => o.startsWith("https://svelte.dev/e/")))
|
|
1854
1860
|
throw a;
|
|
1855
|
-
return a !==
|
|
1861
|
+
return a !== ht && console.warn("Failed to hydrate: ", a), t.recover === !1 && Ns(), kr(), Tn(r), Me(!1), Jn(e, t);
|
|
1856
1862
|
} finally {
|
|
1857
|
-
|
|
1863
|
+
Me(n), oe(i);
|
|
1858
1864
|
}
|
|
1859
1865
|
}
|
|
1860
|
-
const
|
|
1861
|
-
function
|
|
1862
|
-
|
|
1866
|
+
const ct = /* @__PURE__ */ new Map();
|
|
1867
|
+
function Xn(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: a = !0 }) {
|
|
1868
|
+
kr();
|
|
1863
1869
|
var o = /* @__PURE__ */ new Set(), l = (d) => {
|
|
1864
1870
|
for (var h = 0; h < d.length; h++) {
|
|
1865
1871
|
var g = d[h];
|
|
1866
1872
|
if (!o.has(g)) {
|
|
1867
1873
|
o.add(g);
|
|
1868
|
-
var
|
|
1869
|
-
t.addEventListener(g,
|
|
1870
|
-
var b =
|
|
1871
|
-
b === void 0 ? (document.addEventListener(g,
|
|
1874
|
+
var p = mi(g);
|
|
1875
|
+
t.addEventListener(g, Ft, { passive: p });
|
|
1876
|
+
var b = ct.get(g);
|
|
1877
|
+
b === void 0 ? (document.addEventListener(g, Ft, { passive: p }), ct.set(g, 1)) : ct.set(g, b + 1);
|
|
1872
1878
|
}
|
|
1873
1879
|
}
|
|
1874
1880
|
};
|
|
1875
|
-
l(
|
|
1876
|
-
var c = void 0, u =
|
|
1877
|
-
var d = r ?? t.appendChild(
|
|
1878
|
-
return
|
|
1881
|
+
l(Jt(Yn)), Er.add(l);
|
|
1882
|
+
var c = void 0, u = oi(() => {
|
|
1883
|
+
var d = r ?? t.appendChild(be());
|
|
1884
|
+
return Zs(
|
|
1879
1885
|
/** @type {TemplateNode} */
|
|
1880
1886
|
d,
|
|
1881
1887
|
{
|
|
@@ -1884,42 +1890,42 @@ function Tn(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
1884
1890
|
},
|
|
1885
1891
|
(h) => {
|
|
1886
1892
|
if (s) {
|
|
1887
|
-
|
|
1893
|
+
Nr({});
|
|
1888
1894
|
var g = (
|
|
1889
1895
|
/** @type {ComponentContext} */
|
|
1890
|
-
|
|
1896
|
+
le
|
|
1891
1897
|
);
|
|
1892
1898
|
g.c = s;
|
|
1893
1899
|
}
|
|
1894
|
-
if (i && (n.$$events = i),
|
|
1900
|
+
if (i && (n.$$events = i), k && We(
|
|
1895
1901
|
/** @type {TemplateNode} */
|
|
1896
1902
|
h,
|
|
1897
1903
|
null
|
|
1898
|
-
), c = e(h, n) || {},
|
|
1899
|
-
|
|
1900
|
-
throw
|
|
1901
|
-
s &&
|
|
1904
|
+
), c = e(h, n) || {}, k && (E.nodes.end = S, S === null || S.nodeType !== _t || /** @type {Comment} */
|
|
1905
|
+
S.data !== Rr))
|
|
1906
|
+
throw er(), ht;
|
|
1907
|
+
s && Pr();
|
|
1902
1908
|
}
|
|
1903
1909
|
), () => {
|
|
1904
1910
|
for (var h of o) {
|
|
1905
|
-
t.removeEventListener(h,
|
|
1911
|
+
t.removeEventListener(h, Ft);
|
|
1906
1912
|
var g = (
|
|
1907
1913
|
/** @type {number} */
|
|
1908
|
-
|
|
1914
|
+
ct.get(h)
|
|
1909
1915
|
);
|
|
1910
|
-
--g === 0 ? (document.removeEventListener(h,
|
|
1916
|
+
--g === 0 ? (document.removeEventListener(h, Ft), ct.delete(h)) : ct.set(h, g);
|
|
1911
1917
|
}
|
|
1912
|
-
|
|
1918
|
+
Er.delete(l), d !== r && d.parentNode?.removeChild(d);
|
|
1913
1919
|
};
|
|
1914
1920
|
});
|
|
1915
|
-
return
|
|
1921
|
+
return Cr.set(c, u), c;
|
|
1916
1922
|
}
|
|
1917
|
-
let
|
|
1918
|
-
function
|
|
1919
|
-
const r =
|
|
1920
|
-
return r ? (
|
|
1923
|
+
let Cr = /* @__PURE__ */ new WeakMap();
|
|
1924
|
+
function bi(e, t) {
|
|
1925
|
+
const r = Cr.get(e);
|
|
1926
|
+
return r ? (Cr.delete(e), r(t)) : Promise.resolve();
|
|
1921
1927
|
}
|
|
1922
|
-
class
|
|
1928
|
+
class wi {
|
|
1923
1929
|
/** @type {TemplateNode} */
|
|
1924
1930
|
anchor;
|
|
1925
1931
|
/** @type {Map<Batch, Key>} */
|
|
@@ -1965,7 +1971,7 @@ class hi {
|
|
|
1965
1971
|
#i = () => {
|
|
1966
1972
|
var t = (
|
|
1967
1973
|
/** @type {Batch} */
|
|
1968
|
-
|
|
1974
|
+
L
|
|
1969
1975
|
);
|
|
1970
1976
|
if (this.#t.has(t)) {
|
|
1971
1977
|
var r = (
|
|
@@ -1973,7 +1979,7 @@ class hi {
|
|
|
1973
1979
|
this.#t.get(t)
|
|
1974
1980
|
), n = this.#e.get(r);
|
|
1975
1981
|
if (n)
|
|
1976
|
-
|
|
1982
|
+
Br(n), this.#n.delete(r);
|
|
1977
1983
|
else {
|
|
1978
1984
|
var i = this.#r.get(r);
|
|
1979
1985
|
i && (this.#e.set(r, i.effect), this.#r.delete(r), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), n = i.effect);
|
|
@@ -1982,19 +1988,19 @@ class hi {
|
|
|
1982
1988
|
if (this.#t.delete(s), s === t)
|
|
1983
1989
|
break;
|
|
1984
1990
|
const o = this.#r.get(a);
|
|
1985
|
-
o && (
|
|
1991
|
+
o && (G(o.effect), this.#r.delete(a));
|
|
1986
1992
|
}
|
|
1987
1993
|
for (const [s, a] of this.#e) {
|
|
1988
1994
|
if (s === r || this.#n.has(s)) continue;
|
|
1989
1995
|
const o = () => {
|
|
1990
1996
|
if (Array.from(this.#t.values()).includes(s)) {
|
|
1991
1997
|
var c = document.createDocumentFragment();
|
|
1992
|
-
|
|
1998
|
+
Un(a, c), c.append(be()), this.#r.set(s, { effect: a, fragment: c });
|
|
1993
1999
|
} else
|
|
1994
|
-
|
|
2000
|
+
G(a);
|
|
1995
2001
|
this.#n.delete(s), this.#e.delete(s);
|
|
1996
2002
|
};
|
|
1997
|
-
this.#l || !n ? (this.#n.add(s),
|
|
2003
|
+
this.#l || !n ? (this.#n.add(s), Xe(a, o, !1)) : o();
|
|
1998
2004
|
}
|
|
1999
2005
|
}
|
|
2000
2006
|
};
|
|
@@ -2005,7 +2011,7 @@ class hi {
|
|
|
2005
2011
|
this.#t.delete(t);
|
|
2006
2012
|
const r = Array.from(this.#t.values());
|
|
2007
2013
|
for (const [n, i] of this.#r)
|
|
2008
|
-
r.includes(n) || (
|
|
2014
|
+
r.includes(n) || (G(i.effect), this.#r.delete(n));
|
|
2009
2015
|
};
|
|
2010
2016
|
/**
|
|
2011
2017
|
*
|
|
@@ -2015,19 +2021,19 @@ class hi {
|
|
|
2015
2021
|
ensure(t, r) {
|
|
2016
2022
|
var n = (
|
|
2017
2023
|
/** @type {Batch} */
|
|
2018
|
-
|
|
2019
|
-
), i =
|
|
2024
|
+
L
|
|
2025
|
+
), i = Rn();
|
|
2020
2026
|
if (r && !this.#e.has(t) && !this.#r.has(t))
|
|
2021
2027
|
if (i) {
|
|
2022
|
-
var s = document.createDocumentFragment(), a =
|
|
2028
|
+
var s = document.createDocumentFragment(), a = be();
|
|
2023
2029
|
s.append(a), this.#r.set(t, {
|
|
2024
|
-
effect:
|
|
2030
|
+
effect: pe(() => r(a)),
|
|
2025
2031
|
fragment: s
|
|
2026
2032
|
});
|
|
2027
2033
|
} else
|
|
2028
2034
|
this.#e.set(
|
|
2029
2035
|
t,
|
|
2030
|
-
|
|
2036
|
+
pe(() => r(this.anchor))
|
|
2031
2037
|
);
|
|
2032
2038
|
if (this.#t.set(n, t), i) {
|
|
2033
2039
|
for (const [o, l] of this.#e)
|
|
@@ -2036,43 +2042,43 @@ class hi {
|
|
|
2036
2042
|
o === t ? n.skipped_effects.delete(l.effect) : n.skipped_effects.add(l.effect);
|
|
2037
2043
|
n.oncommit(this.#i), n.ondiscard(this.#s);
|
|
2038
2044
|
} else
|
|
2039
|
-
|
|
2045
|
+
k && (this.anchor = S), this.#i();
|
|
2040
2046
|
}
|
|
2041
2047
|
}
|
|
2042
|
-
function
|
|
2043
|
-
|
|
2044
|
-
const t =
|
|
2048
|
+
function Qn(e) {
|
|
2049
|
+
le === null && Rs(), Kt(() => {
|
|
2050
|
+
const t = Hr(e);
|
|
2045
2051
|
if (typeof t == "function") return (
|
|
2046
2052
|
/** @type {() => void} */
|
|
2047
2053
|
t
|
|
2048
2054
|
);
|
|
2049
2055
|
});
|
|
2050
2056
|
}
|
|
2051
|
-
function
|
|
2052
|
-
|
|
2053
|
-
var n = new
|
|
2057
|
+
function F(e, t, r = !1) {
|
|
2058
|
+
k && tr();
|
|
2059
|
+
var n = new wi(e), i = r ? pt : 0;
|
|
2054
2060
|
function s(a, o) {
|
|
2055
|
-
if (
|
|
2056
|
-
const c =
|
|
2061
|
+
if (k) {
|
|
2062
|
+
const c = dn(e) === Gt;
|
|
2057
2063
|
if (a === c) {
|
|
2058
|
-
var l =
|
|
2059
|
-
|
|
2064
|
+
var l = qt();
|
|
2065
|
+
oe(l), n.anchor = l, Me(!1), n.ensure(a, o), Me(!0);
|
|
2060
2066
|
return;
|
|
2061
2067
|
}
|
|
2062
2068
|
}
|
|
2063
2069
|
n.ensure(a, o);
|
|
2064
2070
|
}
|
|
2065
|
-
|
|
2071
|
+
jr(() => {
|
|
2066
2072
|
var a = !1;
|
|
2067
2073
|
t((o, l = !0) => {
|
|
2068
2074
|
a = !0, s(l, o);
|
|
2069
2075
|
}), a || s(!1, null);
|
|
2070
2076
|
}, i);
|
|
2071
2077
|
}
|
|
2072
|
-
function
|
|
2078
|
+
function yi(e, t, r) {
|
|
2073
2079
|
for (var n = [], i = t.length, s, a = t.length, o = 0; o < i; o++) {
|
|
2074
2080
|
let d = t[o];
|
|
2075
|
-
|
|
2081
|
+
Xe(
|
|
2076
2082
|
d,
|
|
2077
2083
|
() => {
|
|
2078
2084
|
if (s) {
|
|
@@ -2081,7 +2087,7 @@ function vi(e, t, r) {
|
|
|
2081
2087
|
/** @type {Set<EachOutroGroup>} */
|
|
2082
2088
|
e.outrogroups
|
|
2083
2089
|
);
|
|
2084
|
-
|
|
2090
|
+
Ar(Jt(s.done)), h.delete(s), h.size === 0 && (e.outrogroups = null);
|
|
2085
2091
|
}
|
|
2086
2092
|
} else
|
|
2087
2093
|
a -= 1;
|
|
@@ -2099,158 +2105,158 @@ function vi(e, t, r) {
|
|
|
2099
2105
|
/** @type {Element} */
|
|
2100
2106
|
c.parentNode
|
|
2101
2107
|
);
|
|
2102
|
-
|
|
2108
|
+
Tn(u), u.append(c), e.items.clear();
|
|
2103
2109
|
}
|
|
2104
|
-
|
|
2110
|
+
Ar(t, !l);
|
|
2105
2111
|
} else
|
|
2106
2112
|
s = {
|
|
2107
2113
|
pending: new Set(t),
|
|
2108
2114
|
done: /* @__PURE__ */ new Set()
|
|
2109
2115
|
}, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(s);
|
|
2110
2116
|
}
|
|
2111
|
-
function
|
|
2117
|
+
function Ar(e, t = !0) {
|
|
2112
2118
|
for (var r = 0; r < e.length; r++)
|
|
2113
|
-
|
|
2119
|
+
G(e[r], t);
|
|
2114
2120
|
}
|
|
2115
|
-
var
|
|
2116
|
-
function
|
|
2121
|
+
var tn;
|
|
2122
|
+
function xi(e, t, r, n, i, s = null) {
|
|
2117
2123
|
var a = e, o = /* @__PURE__ */ new Map();
|
|
2118
|
-
|
|
2119
|
-
var l = null, c = /* @__PURE__ */
|
|
2124
|
+
k && tr();
|
|
2125
|
+
var l = null, c = /* @__PURE__ */ ei(() => {
|
|
2120
2126
|
var b = r();
|
|
2121
|
-
return
|
|
2127
|
+
return ln(b) ? b : b == null ? [] : Jt(b);
|
|
2122
2128
|
}), u, d = !0;
|
|
2123
2129
|
function h() {
|
|
2124
|
-
|
|
2130
|
+
p.fallback = l, $i(p, u, a, t, n), l !== null && (u.length === 0 ? (l.f & Be) === 0 ? Br(l) : (l.f ^= Be, $t(l, null, a)) : Xe(l, () => {
|
|
2125
2131
|
l = null;
|
|
2126
2132
|
}));
|
|
2127
2133
|
}
|
|
2128
|
-
var g =
|
|
2134
|
+
var g = jr(() => {
|
|
2129
2135
|
u = /** @type {V[]} */
|
|
2130
2136
|
f(c);
|
|
2131
2137
|
var b = u.length;
|
|
2132
|
-
let
|
|
2133
|
-
if (
|
|
2134
|
-
var
|
|
2135
|
-
|
|
2138
|
+
let C = !1;
|
|
2139
|
+
if (k) {
|
|
2140
|
+
var x = dn(a) === Gt;
|
|
2141
|
+
x !== (b === 0) && (a = qt(), oe(a), Me(!1), C = !0);
|
|
2136
2142
|
}
|
|
2137
|
-
for (var
|
|
2143
|
+
for (var y = /* @__PURE__ */ new Set(), J = (
|
|
2138
2144
|
/** @type {Batch} */
|
|
2139
|
-
|
|
2140
|
-
),
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
var
|
|
2145
|
-
|
|
2145
|
+
L
|
|
2146
|
+
), j = Rn(), K = 0; K < b; K += 1) {
|
|
2147
|
+
k && S.nodeType === _t && /** @type {Comment} */
|
|
2148
|
+
S.data === Rr && (a = /** @type {Comment} */
|
|
2149
|
+
S, C = !0, Me(!1));
|
|
2150
|
+
var Ce = u[K], we = n(Ce, K), R = d ? null : o.get(we);
|
|
2151
|
+
R ? (R.v && mt(R.v, Ce), R.i && mt(R.i, K), j && J.skipped_effects.delete(R.e)) : (R = Si(
|
|
2146
2152
|
o,
|
|
2147
|
-
d ? a :
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2153
|
+
d ? a : tn ??= be(),
|
|
2154
|
+
Ce,
|
|
2155
|
+
we,
|
|
2156
|
+
K,
|
|
2151
2157
|
i,
|
|
2152
2158
|
t,
|
|
2153
2159
|
r
|
|
2154
|
-
), d || (
|
|
2160
|
+
), d || (R.e.f |= Be), o.set(we, R)), y.add(we);
|
|
2155
2161
|
}
|
|
2156
|
-
if (b === 0 && s && !l && (d ? l =
|
|
2157
|
-
if (
|
|
2158
|
-
for (const [
|
|
2159
|
-
|
|
2160
|
-
|
|
2162
|
+
if (b === 0 && s && !l && (d ? l = pe(() => s(a)) : (l = pe(() => s(tn ??= be())), l.f |= Be)), k && b > 0 && oe(qt()), !d)
|
|
2163
|
+
if (j) {
|
|
2164
|
+
for (const [ce, at] of o)
|
|
2165
|
+
y.has(ce) || J.skipped_effects.add(at.e);
|
|
2166
|
+
J.oncommit(h), J.ondiscard(() => {
|
|
2161
2167
|
});
|
|
2162
2168
|
} else
|
|
2163
2169
|
h();
|
|
2164
|
-
|
|
2165
|
-
}),
|
|
2166
|
-
d = !1,
|
|
2170
|
+
C && Me(!0), f(c);
|
|
2171
|
+
}), p = { effect: g, items: o, outrogroups: null, fallback: l };
|
|
2172
|
+
d = !1, k && (a = S);
|
|
2167
2173
|
}
|
|
2168
|
-
function
|
|
2169
|
-
var s = t.length, a = e.items, o = e.effect.first, l, c = null, u = [], d = [], h, g,
|
|
2174
|
+
function $i(e, t, r, n, i) {
|
|
2175
|
+
var s = t.length, a = e.items, o = e.effect.first, l, c = null, u = [], d = [], h, g, p, b;
|
|
2170
2176
|
for (b = 0; b < s; b += 1) {
|
|
2171
|
-
if (h = t[b], g = i(h, b),
|
|
2177
|
+
if (h = t[b], g = i(h, b), p = /** @type {EachItem} */
|
|
2172
2178
|
a.get(g).e, e.outrogroups !== null)
|
|
2173
|
-
for (const
|
|
2174
|
-
|
|
2175
|
-
if ((
|
|
2176
|
-
if (
|
|
2177
|
-
|
|
2179
|
+
for (const R of e.outrogroups)
|
|
2180
|
+
R.pending.delete(p), R.done.delete(p);
|
|
2181
|
+
if ((p.f & Be) !== 0)
|
|
2182
|
+
if (p.f ^= Be, p === o)
|
|
2183
|
+
$t(p, null, r);
|
|
2178
2184
|
else {
|
|
2179
|
-
var
|
|
2180
|
-
|
|
2185
|
+
var C = c ? c.next : o;
|
|
2186
|
+
p === e.effect.last && (e.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), Ue(e, c, p), Ue(e, p, C), $t(p, C, r), c = p, u = [], d = [], o = c.next;
|
|
2181
2187
|
continue;
|
|
2182
2188
|
}
|
|
2183
|
-
if ((
|
|
2184
|
-
if (l !== void 0 && l.has(
|
|
2189
|
+
if ((p.f & ae) !== 0 && Br(p), p !== o) {
|
|
2190
|
+
if (l !== void 0 && l.has(p)) {
|
|
2185
2191
|
if (u.length < d.length) {
|
|
2186
|
-
var
|
|
2187
|
-
c =
|
|
2188
|
-
var
|
|
2189
|
-
for (
|
|
2190
|
-
|
|
2191
|
-
for (
|
|
2192
|
-
l.delete(d[
|
|
2193
|
-
|
|
2192
|
+
var x = d[0], y;
|
|
2193
|
+
c = x.prev;
|
|
2194
|
+
var J = u[0], j = u[u.length - 1];
|
|
2195
|
+
for (y = 0; y < u.length; y += 1)
|
|
2196
|
+
$t(u[y], x, r);
|
|
2197
|
+
for (y = 0; y < d.length; y += 1)
|
|
2198
|
+
l.delete(d[y]);
|
|
2199
|
+
Ue(e, J.prev, j.next), Ue(e, c, J), Ue(e, j, x), o = x, c = j, b -= 1, u = [], d = [];
|
|
2194
2200
|
} else
|
|
2195
|
-
l.delete(
|
|
2201
|
+
l.delete(p), $t(p, o, r), Ue(e, p.prev, p.next), Ue(e, p, c === null ? e.effect.first : c.next), Ue(e, c, p), c = p;
|
|
2196
2202
|
continue;
|
|
2197
2203
|
}
|
|
2198
|
-
for (u = [], d = []; o !== null && o !==
|
|
2204
|
+
for (u = [], d = []; o !== null && o !== p; )
|
|
2199
2205
|
(l ??= /* @__PURE__ */ new Set()).add(o), d.push(o), o = o.next;
|
|
2200
2206
|
if (o === null)
|
|
2201
2207
|
continue;
|
|
2202
2208
|
}
|
|
2203
|
-
(
|
|
2209
|
+
(p.f & Be) === 0 && u.push(p), c = p, o = p.next;
|
|
2204
2210
|
}
|
|
2205
2211
|
if (e.outrogroups !== null) {
|
|
2206
|
-
for (const
|
|
2207
|
-
|
|
2212
|
+
for (const R of e.outrogroups)
|
|
2213
|
+
R.pending.size === 0 && (Ar(Jt(R.done)), e.outrogroups?.delete(R));
|
|
2208
2214
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2209
2215
|
}
|
|
2210
2216
|
if (o !== null || l !== void 0) {
|
|
2211
|
-
var
|
|
2217
|
+
var K = [];
|
|
2212
2218
|
if (l !== void 0)
|
|
2213
|
-
for (
|
|
2214
|
-
(
|
|
2219
|
+
for (p of l)
|
|
2220
|
+
(p.f & ae) === 0 && K.push(p);
|
|
2215
2221
|
for (; o !== null; )
|
|
2216
|
-
(o.f &
|
|
2217
|
-
var
|
|
2218
|
-
if (
|
|
2219
|
-
var
|
|
2220
|
-
|
|
2222
|
+
(o.f & ae) === 0 && o !== e.fallback && K.push(o), o = o.next;
|
|
2223
|
+
var Ce = K.length;
|
|
2224
|
+
if (Ce > 0) {
|
|
2225
|
+
var we = null;
|
|
2226
|
+
yi(e, K, we);
|
|
2221
2227
|
}
|
|
2222
2228
|
}
|
|
2223
2229
|
}
|
|
2224
|
-
function
|
|
2225
|
-
var l = (a &
|
|
2230
|
+
function Si(e, t, r, n, i, s, a, o) {
|
|
2231
|
+
var l = (a & gs) !== 0 ? (a & _s) === 0 ? /* @__PURE__ */ Sn(r, !1, !1) : nt(r) : null, c = (a & ms) !== 0 ? nt(i) : null;
|
|
2226
2232
|
return {
|
|
2227
2233
|
v: l,
|
|
2228
2234
|
i: c,
|
|
2229
|
-
e:
|
|
2235
|
+
e: pe(() => (s(t, l ?? r, c ?? i, o), () => {
|
|
2230
2236
|
e.delete(n);
|
|
2231
2237
|
}))
|
|
2232
2238
|
};
|
|
2233
2239
|
}
|
|
2234
|
-
function
|
|
2240
|
+
function $t(e, t, r) {
|
|
2235
2241
|
if (e.nodes)
|
|
2236
|
-
for (var n = e.nodes.start, i = e.nodes.end, s = t && (t.f &
|
|
2242
|
+
for (var n = e.nodes.start, i = e.nodes.end, s = t && (t.f & Be) === 0 ? (
|
|
2237
2243
|
/** @type {EffectNodes} */
|
|
2238
2244
|
t.nodes.start
|
|
2239
2245
|
) : r; n !== null; ) {
|
|
2240
2246
|
var a = (
|
|
2241
2247
|
/** @type {TemplateNode} */
|
|
2242
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ ke(n)
|
|
2243
2249
|
);
|
|
2244
2250
|
if (s.before(n), n === i)
|
|
2245
2251
|
return;
|
|
2246
2252
|
n = a;
|
|
2247
2253
|
}
|
|
2248
2254
|
}
|
|
2249
|
-
function
|
|
2255
|
+
function Ue(e, t, r) {
|
|
2250
2256
|
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2251
2257
|
}
|
|
2252
|
-
function
|
|
2253
|
-
|
|
2258
|
+
function es(e, t) {
|
|
2259
|
+
Dn(() => {
|
|
2254
2260
|
var r = e.getRootNode(), n = (
|
|
2255
2261
|
/** @type {ShadowRoot} */
|
|
2256
2262
|
r.host ? (
|
|
@@ -2268,9 +2274,9 @@ function Mn(e, t) {
|
|
|
2268
2274
|
}
|
|
2269
2275
|
});
|
|
2270
2276
|
}
|
|
2271
|
-
const
|
|
2277
|
+
const rn = [...`
|
|
2272
2278
|
\r\f \v\uFEFF`];
|
|
2273
|
-
function
|
|
2279
|
+
function ki(e, t, r) {
|
|
2274
2280
|
var n = e == null ? "" : "" + e;
|
|
2275
2281
|
if (r) {
|
|
2276
2282
|
for (var i in r)
|
|
@@ -2279,19 +2285,59 @@ function _i(e, t, r) {
|
|
|
2279
2285
|
else if (n.length)
|
|
2280
2286
|
for (var s = i.length, a = 0; (a = n.indexOf(i, a)) >= 0; ) {
|
|
2281
2287
|
var o = a + s;
|
|
2282
|
-
(a === 0 ||
|
|
2288
|
+
(a === 0 || rn.includes(n[a - 1])) && (o === n.length || rn.includes(n[o])) ? n = (a === 0 ? "" : n.substring(0, a)) + n.substring(o + 1) : a = o;
|
|
2283
2289
|
}
|
|
2284
2290
|
}
|
|
2285
2291
|
return n === "" ? null : n;
|
|
2286
2292
|
}
|
|
2287
|
-
function
|
|
2293
|
+
function nn(e, t = !1) {
|
|
2294
|
+
var r = t ? " !important;" : ";", n = "";
|
|
2295
|
+
for (var i in e) {
|
|
2296
|
+
var s = e[i];
|
|
2297
|
+
s != null && s !== "" && (n += " " + i + ": " + s + r);
|
|
2298
|
+
}
|
|
2299
|
+
return n;
|
|
2300
|
+
}
|
|
2301
|
+
function _r(e) {
|
|
2302
|
+
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
2303
|
+
}
|
|
2304
|
+
function Ei(e, t) {
|
|
2305
|
+
if (t) {
|
|
2306
|
+
var r = "", n, i;
|
|
2307
|
+
if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
|
|
2308
|
+
e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
2309
|
+
var s = !1, a = 0, o = !1, l = [];
|
|
2310
|
+
n && l.push(...Object.keys(n).map(_r)), i && l.push(...Object.keys(i).map(_r));
|
|
2311
|
+
var c = 0, u = -1;
|
|
2312
|
+
const b = e.length;
|
|
2313
|
+
for (var d = 0; d < b; d++) {
|
|
2314
|
+
var h = e[d];
|
|
2315
|
+
if (o ? h === "/" && e[d - 1] === "*" && (o = !1) : s ? s === h && (s = !1) : h === "/" && e[d + 1] === "*" ? o = !0 : h === '"' || h === "'" ? s = h : h === "(" ? a++ : h === ")" && a--, !o && s === !1 && a === 0) {
|
|
2316
|
+
if (h === ":" && u === -1)
|
|
2317
|
+
u = d;
|
|
2318
|
+
else if (h === ";" || d === b - 1) {
|
|
2319
|
+
if (u !== -1) {
|
|
2320
|
+
var g = _r(e.substring(c, u).trim());
|
|
2321
|
+
if (!l.includes(g)) {
|
|
2322
|
+
h !== ";" && d++;
|
|
2323
|
+
var p = e.substring(c, d).trim();
|
|
2324
|
+
r += " " + p + ";";
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
c = d + 1, u = -1;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
return n && (r += nn(n)), i && (r += nn(i, !0)), r = r.trim(), r === "" ? null : r;
|
|
2333
|
+
}
|
|
2288
2334
|
return e == null ? null : String(e);
|
|
2289
2335
|
}
|
|
2290
|
-
function
|
|
2336
|
+
function ut(e, t, r, n, i, s) {
|
|
2291
2337
|
var a = e.__className;
|
|
2292
|
-
if (
|
|
2293
|
-
var o =
|
|
2294
|
-
(!
|
|
2338
|
+
if (k || a !== r || a === void 0) {
|
|
2339
|
+
var o = ki(r, n, s);
|
|
2340
|
+
(!k || o !== e.getAttribute("class")) && (o == null ? e.removeAttribute("class") : e.className = o), e.__className = r;
|
|
2295
2341
|
} else if (s && i !== s)
|
|
2296
2342
|
for (var l in s) {
|
|
2297
2343
|
var c = !!s[l];
|
|
@@ -2299,60 +2345,66 @@ function dt(e, t, r, n, i, s) {
|
|
|
2299
2345
|
}
|
|
2300
2346
|
return s;
|
|
2301
2347
|
}
|
|
2302
|
-
function
|
|
2303
|
-
var i
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
(!S || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e.__style = t;
|
|
2348
|
+
function br(e, t = {}, r, n) {
|
|
2349
|
+
for (var i in r) {
|
|
2350
|
+
var s = r[i];
|
|
2351
|
+
t[i] !== s && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, s, n));
|
|
2307
2352
|
}
|
|
2353
|
+
}
|
|
2354
|
+
function zr(e, t, r, n) {
|
|
2355
|
+
var i = e.__style;
|
|
2356
|
+
if (k || i !== t) {
|
|
2357
|
+
var s = Ei(t, n);
|
|
2358
|
+
(!k || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e.__style = t;
|
|
2359
|
+
} else n && (Array.isArray(n) ? (br(e, r?.[0], n[0]), br(e, r?.[1], n[1], "important")) : br(e, r, n));
|
|
2308
2360
|
return n;
|
|
2309
2361
|
}
|
|
2310
|
-
const
|
|
2311
|
-
function
|
|
2312
|
-
var i =
|
|
2313
|
-
|
|
2362
|
+
const Ci = Symbol("is custom element"), Ai = Symbol("is html");
|
|
2363
|
+
function Zt(e, t, r, n) {
|
|
2364
|
+
var i = zi(e);
|
|
2365
|
+
k && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || i[t] !== (i[t] = r) && (t === "loading" && (e[Ts] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ti(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2314
2366
|
}
|
|
2315
|
-
function
|
|
2367
|
+
function zi(e) {
|
|
2316
2368
|
return (
|
|
2317
2369
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2318
2370
|
// @ts-expect-error
|
|
2319
2371
|
e.__attributes ??= {
|
|
2320
|
-
[
|
|
2321
|
-
[
|
|
2372
|
+
[Ci]: e.nodeName.includes("-"),
|
|
2373
|
+
[Ai]: e.namespaceURI === ys
|
|
2322
2374
|
}
|
|
2323
2375
|
);
|
|
2324
2376
|
}
|
|
2325
|
-
var
|
|
2326
|
-
function
|
|
2327
|
-
var t = e.getAttribute("is") || e.nodeName, r =
|
|
2377
|
+
var sn = /* @__PURE__ */ new Map();
|
|
2378
|
+
function Ti(e) {
|
|
2379
|
+
var t = e.getAttribute("is") || e.nodeName, r = sn.get(t);
|
|
2328
2380
|
if (r) return r;
|
|
2329
|
-
|
|
2381
|
+
sn.set(t, r = []);
|
|
2330
2382
|
for (var n, i = e, s = Element.prototype; s !== i; ) {
|
|
2331
|
-
n =
|
|
2383
|
+
n = $s(i);
|
|
2332
2384
|
for (var a in n)
|
|
2333
2385
|
n[a].set && r.push(a);
|
|
2334
|
-
i =
|
|
2386
|
+
i = cn(i);
|
|
2335
2387
|
}
|
|
2336
2388
|
return r;
|
|
2337
2389
|
}
|
|
2338
|
-
function
|
|
2339
|
-
return e === t || e?.[
|
|
2390
|
+
function an(e, t) {
|
|
2391
|
+
return e === t || e?.[Ut] === t;
|
|
2340
2392
|
}
|
|
2341
|
-
function
|
|
2342
|
-
return
|
|
2393
|
+
function Tr(e = {}, t, r, n) {
|
|
2394
|
+
return Dn(() => {
|
|
2343
2395
|
var i, s;
|
|
2344
|
-
return
|
|
2345
|
-
i = s, s = [],
|
|
2346
|
-
e !== r(...s) && (t(e, ...s), i &&
|
|
2396
|
+
return Ur(() => {
|
|
2397
|
+
i = s, s = [], Hr(() => {
|
|
2398
|
+
e !== r(...s) && (t(e, ...s), i && an(r(...i), e) && t(null, ...i));
|
|
2347
2399
|
});
|
|
2348
2400
|
}), () => {
|
|
2349
|
-
|
|
2350
|
-
s &&
|
|
2401
|
+
rr(() => {
|
|
2402
|
+
s && an(r(...s), e) && t(null, ...s);
|
|
2351
2403
|
});
|
|
2352
2404
|
};
|
|
2353
2405
|
}), e;
|
|
2354
2406
|
}
|
|
2355
|
-
function
|
|
2407
|
+
function Z(e, t, r, n) {
|
|
2356
2408
|
var i = (
|
|
2357
2409
|
/** @type {V} */
|
|
2358
2410
|
n
|
|
@@ -2368,7 +2420,7 @@ function ge(e, t, r, n) {
|
|
|
2368
2420
|
);
|
|
2369
2421
|
return h === void 0 ? a() : (s = !0, h);
|
|
2370
2422
|
};
|
|
2371
|
-
var c = !1, u = /* @__PURE__ */
|
|
2423
|
+
var c = !1, u = /* @__PURE__ */ sr(() => (c = !1, l())), d = (
|
|
2372
2424
|
/** @type {Effect} */
|
|
2373
2425
|
E
|
|
2374
2426
|
);
|
|
@@ -2376,17 +2428,17 @@ function ge(e, t, r, n) {
|
|
|
2376
2428
|
/** @type {() => V} */
|
|
2377
2429
|
(function(h, g) {
|
|
2378
2430
|
if (arguments.length > 0) {
|
|
2379
|
-
const
|
|
2380
|
-
return
|
|
2431
|
+
const p = g ? f(u) : h;
|
|
2432
|
+
return m(u, p), c = !0, i !== void 0 && (i = p), h;
|
|
2381
2433
|
}
|
|
2382
|
-
return
|
|
2434
|
+
return it && c || (d.f & De) !== 0 ? u.v : f(u);
|
|
2383
2435
|
})
|
|
2384
2436
|
);
|
|
2385
2437
|
}
|
|
2386
|
-
function
|
|
2387
|
-
return new
|
|
2438
|
+
function Ri(e) {
|
|
2439
|
+
return new Mi(e);
|
|
2388
2440
|
}
|
|
2389
|
-
class
|
|
2441
|
+
class Mi {
|
|
2390
2442
|
/** @type {any} */
|
|
2391
2443
|
#t;
|
|
2392
2444
|
/** @type {Record<string, any>} */
|
|
@@ -2398,7 +2450,7 @@ class ki {
|
|
|
2398
2450
|
*/
|
|
2399
2451
|
constructor(t) {
|
|
2400
2452
|
var r = /* @__PURE__ */ new Map(), n = (s, a) => {
|
|
2401
|
-
var o = /* @__PURE__ */
|
|
2453
|
+
var o = /* @__PURE__ */ Sn(a, !1, !1);
|
|
2402
2454
|
return r.set(s, o), o;
|
|
2403
2455
|
};
|
|
2404
2456
|
const i = new Proxy(
|
|
@@ -2408,23 +2460,23 @@ class ki {
|
|
|
2408
2460
|
return f(r.get(a) ?? n(a, Reflect.get(s, a)));
|
|
2409
2461
|
},
|
|
2410
2462
|
has(s, a) {
|
|
2411
|
-
return a ===
|
|
2463
|
+
return a === zs ? !0 : (f(r.get(a) ?? n(a, Reflect.get(s, a))), Reflect.has(s, a));
|
|
2412
2464
|
},
|
|
2413
2465
|
set(s, a, o) {
|
|
2414
|
-
return
|
|
2466
|
+
return m(r.get(a) ?? n(a, o), o), Reflect.set(s, a, o);
|
|
2415
2467
|
}
|
|
2416
2468
|
}
|
|
2417
2469
|
);
|
|
2418
|
-
this.#e = (t.hydrate ?
|
|
2470
|
+
this.#e = (t.hydrate ? _i : Jn)(t.component, {
|
|
2419
2471
|
target: t.target,
|
|
2420
2472
|
anchor: t.anchor,
|
|
2421
2473
|
props: i,
|
|
2422
2474
|
context: t.context,
|
|
2423
2475
|
intro: t.intro ?? !1,
|
|
2424
2476
|
recover: t.recover
|
|
2425
|
-
}), (!t?.props?.$$host || t.sync === !1) &&
|
|
2477
|
+
}), (!t?.props?.$$host || t.sync === !1) && H(), this.#t = i.$$events;
|
|
2426
2478
|
for (const s of Object.keys(this.#e))
|
|
2427
|
-
s === "$set" || s === "$destroy" || s === "$on" ||
|
|
2479
|
+
s === "$set" || s === "$destroy" || s === "$on" || Ht(this, s, {
|
|
2428
2480
|
get() {
|
|
2429
2481
|
return this.#e[s];
|
|
2430
2482
|
},
|
|
@@ -2438,7 +2490,7 @@ class ki {
|
|
|
2438
2490
|
(s) => {
|
|
2439
2491
|
Object.assign(i, s);
|
|
2440
2492
|
}, this.#e.$destroy = () => {
|
|
2441
|
-
|
|
2493
|
+
bi(this.#e);
|
|
2442
2494
|
};
|
|
2443
2495
|
}
|
|
2444
2496
|
/** @param {Record<string, any>} props */
|
|
@@ -2464,8 +2516,8 @@ class ki {
|
|
|
2464
2516
|
this.#e.$destroy();
|
|
2465
2517
|
}
|
|
2466
2518
|
}
|
|
2467
|
-
let
|
|
2468
|
-
typeof HTMLElement == "function" && (
|
|
2519
|
+
let ts;
|
|
2520
|
+
typeof HTMLElement == "function" && (ts = class extends HTMLElement {
|
|
2469
2521
|
/** The Svelte component constructor */
|
|
2470
2522
|
$$ctor;
|
|
2471
2523
|
/** Slots */
|
|
@@ -2522,21 +2574,21 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
2522
2574
|
let e = function(n) {
|
|
2523
2575
|
return (i) => {
|
|
2524
2576
|
const s = document.createElement("slot");
|
|
2525
|
-
n !== "default" && (s.name = n),
|
|
2577
|
+
n !== "default" && (s.name = n), D(i, s);
|
|
2526
2578
|
};
|
|
2527
2579
|
};
|
|
2528
2580
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2529
2581
|
return;
|
|
2530
|
-
const t = {}, r =
|
|
2582
|
+
const t = {}, r = Ii(this);
|
|
2531
2583
|
for (const n of this.$$s)
|
|
2532
2584
|
n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
|
|
2533
2585
|
for (const n of this.attributes) {
|
|
2534
2586
|
const i = this.$$g_p(n.name);
|
|
2535
|
-
i in this.$$d || (this.$$d[i] =
|
|
2587
|
+
i in this.$$d || (this.$$d[i] = jt(i, n.value, this.$$p_d, "toProp"));
|
|
2536
2588
|
}
|
|
2537
2589
|
for (const n in this.$$p_d)
|
|
2538
2590
|
!(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
2539
|
-
this.$$c =
|
|
2591
|
+
this.$$c = Ri({
|
|
2540
2592
|
component: this.$$ctor,
|
|
2541
2593
|
target: this.shadowRoot || this,
|
|
2542
2594
|
props: {
|
|
@@ -2544,13 +2596,13 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
2544
2596
|
$$slots: t,
|
|
2545
2597
|
$$host: this
|
|
2546
2598
|
}
|
|
2547
|
-
}), this.$$me =
|
|
2548
|
-
|
|
2599
|
+
}), this.$$me = ai(() => {
|
|
2600
|
+
Ur(() => {
|
|
2549
2601
|
this.$$r = !0;
|
|
2550
|
-
for (const n of
|
|
2602
|
+
for (const n of Bt(this.$$c)) {
|
|
2551
2603
|
if (!this.$$p_d[n]?.reflect) continue;
|
|
2552
2604
|
this.$$d[n] = this.$$c[n];
|
|
2553
|
-
const i =
|
|
2605
|
+
const i = jt(
|
|
2554
2606
|
n,
|
|
2555
2607
|
this.$$d[n],
|
|
2556
2608
|
this.$$p_d,
|
|
@@ -2577,7 +2629,7 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
2577
2629
|
* @param {string} newValue
|
|
2578
2630
|
*/
|
|
2579
2631
|
attributeChangedCallback(e, t, r) {
|
|
2580
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
2632
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = jt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2581
2633
|
}
|
|
2582
2634
|
disconnectedCallback() {
|
|
2583
2635
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2588,12 +2640,12 @@ typeof HTMLElement == "function" && (Dn = class extends HTMLElement {
|
|
|
2588
2640
|
* @param {string} attribute_name
|
|
2589
2641
|
*/
|
|
2590
2642
|
$$g_p(e) {
|
|
2591
|
-
return
|
|
2643
|
+
return Bt(this.$$p_d).find(
|
|
2592
2644
|
(t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
|
|
2593
2645
|
) || e;
|
|
2594
2646
|
}
|
|
2595
2647
|
});
|
|
2596
|
-
function
|
|
2648
|
+
function jt(e, t, r, n) {
|
|
2597
2649
|
const i = r[e]?.type;
|
|
2598
2650
|
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
|
|
2599
2651
|
return t;
|
|
@@ -2623,7 +2675,7 @@ function xt(e, t, r, n) {
|
|
|
2623
2675
|
return t;
|
|
2624
2676
|
}
|
|
2625
2677
|
}
|
|
2626
|
-
function
|
|
2678
|
+
function Ii(e) {
|
|
2627
2679
|
const t = {};
|
|
2628
2680
|
return e.childNodes.forEach((r) => {
|
|
2629
2681
|
t[
|
|
@@ -2632,33 +2684,33 @@ function Si(e) {
|
|
|
2632
2684
|
] = !0;
|
|
2633
2685
|
}), t;
|
|
2634
2686
|
}
|
|
2635
|
-
function
|
|
2636
|
-
let a = class extends
|
|
2687
|
+
function rs(e, t, r, n, i, s) {
|
|
2688
|
+
let a = class extends ts {
|
|
2637
2689
|
constructor() {
|
|
2638
2690
|
super(e, r, i), this.$$p_d = t;
|
|
2639
2691
|
}
|
|
2640
2692
|
static get observedAttributes() {
|
|
2641
|
-
return
|
|
2693
|
+
return Bt(t).map(
|
|
2642
2694
|
(o) => (t[o].attribute || o).toLowerCase()
|
|
2643
2695
|
);
|
|
2644
2696
|
}
|
|
2645
2697
|
};
|
|
2646
|
-
return
|
|
2647
|
-
|
|
2698
|
+
return Bt(t).forEach((o) => {
|
|
2699
|
+
Ht(a.prototype, o, {
|
|
2648
2700
|
get() {
|
|
2649
2701
|
return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
|
|
2650
2702
|
},
|
|
2651
2703
|
set(l) {
|
|
2652
|
-
l =
|
|
2704
|
+
l = jt(o, l, t), this.$$d[o] = l;
|
|
2653
2705
|
var c = this.$$c;
|
|
2654
2706
|
if (c) {
|
|
2655
|
-
var u =
|
|
2707
|
+
var u = dt(c, o)?.get;
|
|
2656
2708
|
u ? c[o] = l : c.$set({ [o]: l });
|
|
2657
2709
|
}
|
|
2658
2710
|
}
|
|
2659
2711
|
});
|
|
2660
2712
|
}), n.forEach((o) => {
|
|
2661
|
-
|
|
2713
|
+
Ht(a.prototype, o, {
|
|
2662
2714
|
get() {
|
|
2663
2715
|
return this.$$c?.[o];
|
|
2664
2716
|
}
|
|
@@ -2666,147 +2718,8 @@ function Ln(e, t, r, n, i, s) {
|
|
|
2666
2718
|
}), e.element = /** @type {any} */
|
|
2667
2719
|
a, a;
|
|
2668
2720
|
}
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
hash: "svelte-1105cax",
|
|
2672
|
-
code: `.svelte-1105cax {box-sizing:border-box;margin:0;padding:0;}.support-chat.svelte-1105cax {--primary-color: #6366f1;--shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);position:fixed;bottom:1rem;z-index:9999;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;}.toggle-btn.svelte-1105cax {position:absolute;bottom:0;right:0;width:3.5rem;height:3.5rem;border-radius:50%;border:none;background:var(--primary-color);color:white;cursor:pointer;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;transition:transform 0.2s, opacity 0.2s;}.toggle-btn.svelte-1105cax:hover {transform:scale(1.05);}.toggle-btn.svelte-1105cax .icon:where(.svelte-1105cax) {width:1.5rem;height:1.5rem;}.unread-badge.svelte-1105cax {position:absolute;top:-4px;right:-4px;min-width:1.25rem;height:1.25rem;padding:0 0.25rem;background:#ef4444;color:white;font-size:0.625rem;font-weight:bold;border-radius:9999px;display:flex;align-items:center;justify-content:center;}.chat-window.svelte-1105cax {position:absolute;bottom:4.5rem;right:0;width:380px;max-width:calc(100vw - 2rem);height:500px;max-height:calc(100vh - 8rem);background:#ffffff;border-radius:1rem;box-shadow:var(--shadow);overflow:hidden;border:1px solid #e5e7eb;}.chat-window.svelte-1105cax iframe:where(.svelte-1105cax) {width:100%;height:100%;border:none;display:block;}.chat-window.svelte-1105cax iframe.hidden:where(.svelte-1105cax) {visibility:hidden;position:absolute;}.loading-state.svelte-1105cax {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;background:#f9fafb;color:#6b7280;font-size:0.875rem;}.loading-spinner.svelte-1105cax {width:2rem;height:2rem;border:3px solid #e5e7eb;border-top-color:var(--primary-color);border-radius:50%;
|
|
2673
|
-
animation: svelte-1105cax-spin 0.8s linear infinite;}
|
|
2674
|
-
|
|
2675
|
-
@keyframes svelte-1105cax-spin {
|
|
2676
|
-
to {
|
|
2677
|
-
transform: rotate(360deg);
|
|
2678
|
-
}
|
|
2679
|
-
}`
|
|
2680
|
-
};
|
|
2681
|
-
function Di(e, t) {
|
|
2682
|
-
fr(t, !0), Mn(e, Ii);
|
|
2683
|
-
let r = ge(t, "embedId"), n = ge(t, "embedUrl", 7, "https://app.fortalece.ai"), i = ge(t, "position", 7, "bottom-right"), s = /* @__PURE__ */ L(!1), a = /* @__PURE__ */ L(!1), o = /* @__PURE__ */ L(0), l = /* @__PURE__ */ L(void 0);
|
|
2684
|
-
const c = /* @__PURE__ */ De(() => `${n()}/embed/${r()}`), u = /* @__PURE__ */ De(() => i() === "bottom-left" ? "left: 1rem; right: auto;" : "right: 1rem; left: auto;");
|
|
2685
|
-
Rn(() => {
|
|
2686
|
-
function w(y) {
|
|
2687
|
-
try {
|
|
2688
|
-
const $e = new URL(n()).origin;
|
|
2689
|
-
if (y.origin !== $e) return;
|
|
2690
|
-
} catch {
|
|
2691
|
-
return;
|
|
2692
|
-
}
|
|
2693
|
-
const { type: ee, payload: F } = y.data || {};
|
|
2694
|
-
switch (ee) {
|
|
2695
|
-
case "fortalece:ready":
|
|
2696
|
-
$(a, !0);
|
|
2697
|
-
break;
|
|
2698
|
-
case "fortalece:close-request":
|
|
2699
|
-
$(s, !1);
|
|
2700
|
-
break;
|
|
2701
|
-
case "fortalece:resize":
|
|
2702
|
-
break;
|
|
2703
|
-
case "fortalece:unread":
|
|
2704
|
-
$(o, F?.count || 0, !0);
|
|
2705
|
-
break;
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
return window.addEventListener("message", w), () => window.removeEventListener("message", w);
|
|
2709
|
-
});
|
|
2710
|
-
function d() {
|
|
2711
|
-
$(s, !f(s)), f(s) && $(o, 0);
|
|
2712
|
-
}
|
|
2713
|
-
function h(w, y = {}) {
|
|
2714
|
-
if (f(l)?.contentWindow)
|
|
2715
|
-
try {
|
|
2716
|
-
const ee = new URL(n()).origin;
|
|
2717
|
-
f(l).contentWindow.postMessage({ type: w, payload: y }, ee);
|
|
2718
|
-
} catch {
|
|
2719
|
-
}
|
|
2720
|
-
}
|
|
2721
|
-
hr(() => {
|
|
2722
|
-
f(s) && f(a) && h("fortalece:opened");
|
|
2723
|
-
});
|
|
2724
|
-
var g = {
|
|
2725
|
-
get embedId() {
|
|
2726
|
-
return r();
|
|
2727
|
-
},
|
|
2728
|
-
set embedId(w) {
|
|
2729
|
-
r(w), ue();
|
|
2730
|
-
},
|
|
2731
|
-
get embedUrl() {
|
|
2732
|
-
return n();
|
|
2733
|
-
},
|
|
2734
|
-
set embedUrl(w = "https://app.fortalece.ai") {
|
|
2735
|
-
n(w), ue();
|
|
2736
|
-
},
|
|
2737
|
-
get position() {
|
|
2738
|
-
return i();
|
|
2739
|
-
},
|
|
2740
|
-
set position(w = "bottom-right") {
|
|
2741
|
-
i(w), ue();
|
|
2742
|
-
}
|
|
2743
|
-
}, v = Mi(), b = R(v);
|
|
2744
|
-
b.__click = d;
|
|
2745
|
-
var _ = R(b);
|
|
2746
|
-
{
|
|
2747
|
-
var k = (w) => {
|
|
2748
|
-
var y = zi(), ee = R(y, !0);
|
|
2749
|
-
T(y), re(() => je(ee, f(o) > 9 ? "9+" : f(o))), M(w, y);
|
|
2750
|
-
};
|
|
2751
|
-
B(_, (w) => {
|
|
2752
|
-
f(o) > 0 && !f(s) && w(k);
|
|
2753
|
-
});
|
|
2754
|
-
}
|
|
2755
|
-
var I = D(_, 2);
|
|
2756
|
-
{
|
|
2757
|
-
var U = (w) => {
|
|
2758
|
-
var y = Ci();
|
|
2759
|
-
M(w, y);
|
|
2760
|
-
}, ve = (w) => {
|
|
2761
|
-
var y = Ai();
|
|
2762
|
-
M(w, y);
|
|
2763
|
-
};
|
|
2764
|
-
B(I, (w) => {
|
|
2765
|
-
f(s) ? w(U) : w(ve, !1);
|
|
2766
|
-
});
|
|
2767
|
-
}
|
|
2768
|
-
T(b);
|
|
2769
|
-
var W = D(b, 2);
|
|
2770
|
-
{
|
|
2771
|
-
var Z = (w) => {
|
|
2772
|
-
var y = Ri(), ee = R(y);
|
|
2773
|
-
{
|
|
2774
|
-
var F = (xe) => {
|
|
2775
|
-
var jt = Ti();
|
|
2776
|
-
M(xe, jt);
|
|
2777
|
-
};
|
|
2778
|
-
B(ee, (xe) => {
|
|
2779
|
-
f(a) || xe(F);
|
|
2780
|
-
});
|
|
2781
|
-
}
|
|
2782
|
-
var $e = D(ee, 2);
|
|
2783
|
-
let lt;
|
|
2784
|
-
sr($e, (xe) => $(l, xe), () => f(l)), T(y), re(() => {
|
|
2785
|
-
Tt($e, "src", f(c)), lt = dt($e, 1, "svelte-1105cax", null, lt, { hidden: !f(a) });
|
|
2786
|
-
}), M(w, y);
|
|
2787
|
-
};
|
|
2788
|
-
B(W, (w) => {
|
|
2789
|
-
f(s) && w(Z);
|
|
2790
|
-
});
|
|
2791
|
-
}
|
|
2792
|
-
return T(v), re(() => {
|
|
2793
|
-
In(v, f(u)), Tt(b, "aria-label", f(s) ? "Close chat" : "Open chat");
|
|
2794
|
-
}), M(e, v), ur(g);
|
|
2795
|
-
}
|
|
2796
|
-
zn(["click"]);
|
|
2797
|
-
customElements.define("support-chat", Ln(
|
|
2798
|
-
Di,
|
|
2799
|
-
{
|
|
2800
|
-
embedId: { attribute: "embed-id", reflect: !0 },
|
|
2801
|
-
embedUrl: { attribute: "embed-url", reflect: !0 },
|
|
2802
|
-
position: { attribute: "position", reflect: !0 }
|
|
2803
|
-
},
|
|
2804
|
-
[],
|
|
2805
|
-
[],
|
|
2806
|
-
!0
|
|
2807
|
-
));
|
|
2808
|
-
const Li = 50, ft = 5;
|
|
2809
|
-
class Oi {
|
|
2721
|
+
const Di = 50, xt = 5;
|
|
2722
|
+
class Li {
|
|
2810
2723
|
consoleErrors = [];
|
|
2811
2724
|
attachments = [];
|
|
2812
2725
|
mediaRecorder = null;
|
|
@@ -2844,7 +2757,7 @@ class Oi {
|
|
|
2844
2757
|
timestamp: Date.now(),
|
|
2845
2758
|
stack: new Error().stack
|
|
2846
2759
|
};
|
|
2847
|
-
this.consoleErrors.push(n), this.consoleErrors.length >
|
|
2760
|
+
this.consoleErrors.push(n), this.consoleErrors.length > Di && this.consoleErrors.shift();
|
|
2848
2761
|
}
|
|
2849
2762
|
stringifyArg(t) {
|
|
2850
2763
|
if (t === null) return "null";
|
|
@@ -3031,8 +2944,8 @@ class Oi {
|
|
|
3031
2944
|
* Add an attachment from a File
|
|
3032
2945
|
*/
|
|
3033
2946
|
async addAttachment(t) {
|
|
3034
|
-
if (this.attachments.length >=
|
|
3035
|
-
return console.warn(`[SDK] Maximum ${
|
|
2947
|
+
if (this.attachments.length >= xt)
|
|
2948
|
+
return console.warn(`[SDK] Maximum ${xt} attachments allowed`), null;
|
|
3036
2949
|
const r = this.getAttachmentType(t.type);
|
|
3037
2950
|
if (!r)
|
|
3038
2951
|
return console.warn(`[SDK] Unsupported file type: ${t.type}`), null;
|
|
@@ -3049,8 +2962,8 @@ class Oi {
|
|
|
3049
2962
|
* Add an attachment from a Blob (e.g., screen recording)
|
|
3050
2963
|
*/
|
|
3051
2964
|
async addBlobAttachment(t, r) {
|
|
3052
|
-
if (this.attachments.length >=
|
|
3053
|
-
return console.warn(`[SDK] Maximum ${
|
|
2965
|
+
if (this.attachments.length >= xt)
|
|
2966
|
+
return console.warn(`[SDK] Maximum ${xt} attachments allowed`), null;
|
|
3054
2967
|
const n = this.getAttachmentType(t.type);
|
|
3055
2968
|
if (!n)
|
|
3056
2969
|
return console.warn(`[SDK] Unsupported blob type: ${t.type}`), null;
|
|
@@ -3086,7 +2999,7 @@ class Oi {
|
|
|
3086
2999
|
* Check if more attachments can be added
|
|
3087
3000
|
*/
|
|
3088
3001
|
canAddAttachment() {
|
|
3089
|
-
return this.attachments.length <
|
|
3002
|
+
return this.attachments.length < xt;
|
|
3090
3003
|
}
|
|
3091
3004
|
getAttachmentType(t) {
|
|
3092
3005
|
return t.startsWith("image/") ? "image" : t.startsWith("audio/") ? "audio" : t.startsWith("video/") ? "video" : null;
|
|
@@ -3116,12 +3029,311 @@ class Oi {
|
|
|
3116
3029
|
this.stopConsoleCapture(), this.isRecording() && this.stopScreenRecording(), this.clearConsoleErrors(), this.clearAttachments();
|
|
3117
3030
|
}
|
|
3118
3031
|
}
|
|
3119
|
-
let
|
|
3120
|
-
function
|
|
3121
|
-
return
|
|
3032
|
+
let wr = null;
|
|
3033
|
+
function ns() {
|
|
3034
|
+
return wr || (wr = new Li()), wr;
|
|
3035
|
+
}
|
|
3036
|
+
var Oi = /* @__PURE__ */ N('<button class="recording-btn svelte-1105cax" aria-label="Stop recording"><span class="recording-dot svelte-1105cax"></span> <span class="recording-time svelte-1105cax"> </span> <span class="stop-label svelte-1105cax">Stop</span></button>'), Ni = /* @__PURE__ */ N('<span class="unread-badge svelte-1105cax"> </span>'), Pi = /* @__PURE__ */ ir('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon svelte-1105cax"><path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" class="svelte-1105cax"></path></svg>'), Fi = /* @__PURE__ */ ir('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon svelte-1105cax"><path fill-rule="evenodd" d="M4.804 21.644A6.707 6.707 0 0 0 6 21.75a6.721 6.721 0 0 0 3.583-1.029c.774.182 1.584.279 2.417.279 5.322 0 9.75-3.97 9.75-9 0-5.03-4.428-9-9.75-9s-9.75 3.97-9.75 9c0 2.409 1.025 4.587 2.674 6.192.232.226.277.428.254.543a3.73 3.73 0 0 1-.814 1.686.75.75 0 0 0 .44 1.223ZM8.25 10.875a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25ZM10.875 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z" clip-rule="evenodd" class="svelte-1105cax"></path></svg>'), Ui = /* @__PURE__ */ N('<button class="toggle-btn svelte-1105cax"><!> <!></button>'), ji = /* @__PURE__ */ N('<div class="loading-state svelte-1105cax"><div class="loading-spinner svelte-1105cax"></div> <p class="svelte-1105cax">Loading...</p></div>'), Bi = /* @__PURE__ */ N('<div class="support-chat svelte-1105cax"><!> <div><!> <iframe title="Support Chat" sandbox="allow-scripts allow-forms allow-same-origin" allow="clipboard-write"></iframe></div></div>');
|
|
3037
|
+
const Hi = {
|
|
3038
|
+
hash: "svelte-1105cax",
|
|
3039
|
+
code: `.svelte-1105cax {box-sizing:border-box;margin:0;padding:0;}.support-chat.svelte-1105cax {--primary-color: #6366f1;--shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
|
|
3040
|
+
0 8px 10px -6px rgba(0, 0, 0, 0.1);position:fixed;bottom:1rem;z-index:9999;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
3041
|
+
"Helvetica Neue", Arial, sans-serif;}.toggle-btn.svelte-1105cax {position:absolute;bottom:0;right:0;width:3.5rem;height:3.5rem;border-radius:50%;border:none;background:var(--primary-color);color:white;cursor:pointer;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;transition:transform 0.2s,
|
|
3042
|
+
opacity 0.2s;}.toggle-btn.svelte-1105cax:hover {transform:scale(1.05);}.toggle-btn.svelte-1105cax .icon:where(.svelte-1105cax) {width:1.5rem;height:1.5rem;}.unread-badge.svelte-1105cax {position:absolute;top:-4px;right:-4px;min-width:1.25rem;height:1.25rem;padding:0 0.25rem;background:#ef4444;color:white;font-size:0.625rem;font-weight:bold;border-radius:9999px;display:flex;align-items:center;justify-content:center;}.chat-window.svelte-1105cax {position:absolute;bottom:4.5rem;right:0;width:380px;max-width:calc(100vw - 2rem);height:500px;max-height:calc(100vh - 8rem);background:#ffffff;border-radius:1rem;box-shadow:var(--shadow);overflow:hidden;border:1px solid #e5e7eb;}.chat-window.svelte-1105cax iframe:where(.svelte-1105cax) {width:100%;height:100%;border:none;display:block;}.chat-window.svelte-1105cax iframe.hidden:where(.svelte-1105cax) {visibility:hidden;position:absolute;}.chat-window.chat-window-hidden.svelte-1105cax {display:none;}.loading-state.svelte-1105cax {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;background:#f9fafb;color:#6b7280;font-size:0.875rem;}.loading-spinner.svelte-1105cax {width:2rem;height:2rem;border:3px solid #e5e7eb;border-top-color:var(--primary-color);border-radius:50%;
|
|
3043
|
+
animation: svelte-1105cax-spin 0.8s linear infinite;}
|
|
3044
|
+
|
|
3045
|
+
@keyframes svelte-1105cax-spin {
|
|
3046
|
+
to {
|
|
3047
|
+
transform: rotate(360deg);
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
/* Recording Button */.recording-btn.svelte-1105cax {position:absolute;bottom:0;right:0;display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;background:#ef4444;color:white;border:none;border-radius:2rem;cursor:pointer;box-shadow:var(--shadow),
|
|
3052
|
+
0 0 20px rgba(239, 68, 68, 0.4);font-size:0.875rem;font-weight:600;transition:transform 0.15s,
|
|
3053
|
+
box-shadow 0.15s;
|
|
3054
|
+
animation: svelte-1105cax-pulse-glow 2s ease-in-out infinite;}.recording-btn.svelte-1105cax:hover {transform:scale(1.02);box-shadow:var(--shadow),
|
|
3055
|
+
0 0 30px rgba(239, 68, 68, 0.5);}.recording-dot.svelte-1105cax {width:0.5rem;height:0.5rem;background:white;border-radius:50%;
|
|
3056
|
+
animation: svelte-1105cax-blink 1s infinite;}.recording-time.svelte-1105cax {font-family:"SF Mono", Monaco, "Inconsolata", "Fira Mono", monospace;font-size:0.75rem;}.stop-label.svelte-1105cax {padding-left:0.25rem;border-left:1px solid rgba(255, 255, 255, 0.3);}
|
|
3057
|
+
|
|
3058
|
+
@keyframes svelte-1105cax-blink {
|
|
3059
|
+
0%,
|
|
3060
|
+
50% {
|
|
3061
|
+
opacity: 1;
|
|
3062
|
+
}
|
|
3063
|
+
51%,
|
|
3064
|
+
100% {
|
|
3065
|
+
opacity: 0.3;
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
@keyframes svelte-1105cax-pulse-glow {
|
|
3070
|
+
0%,
|
|
3071
|
+
100% {
|
|
3072
|
+
box-shadow:
|
|
3073
|
+
var(--shadow),
|
|
3074
|
+
0 0 20px rgba(239, 68, 68, 0.4);
|
|
3075
|
+
}
|
|
3076
|
+
50% {
|
|
3077
|
+
box-shadow:
|
|
3078
|
+
var(--shadow),
|
|
3079
|
+
0 0 30px rgba(239, 68, 68, 0.6);
|
|
3080
|
+
}
|
|
3081
|
+
}`
|
|
3082
|
+
};
|
|
3083
|
+
function qi(e, t) {
|
|
3084
|
+
Nr(t, !0), es(e, Hi);
|
|
3085
|
+
let r = Z(t, "embedId"), n = Z(t, "embedUrl", 7, "https://app.fortalece.ai"), i = Z(t, "position", 7, "bottom-right"), s = Z(
|
|
3086
|
+
t,
|
|
3087
|
+
"showHeader",
|
|
3088
|
+
7,
|
|
3089
|
+
"true"
|
|
3090
|
+
// Default to string 'true' since HTML attributes are strings
|
|
3091
|
+
), a = Z(t, "allowAttachments", 7, !0), o = Z(t, "allowScreenRecording", 7, !0), l = Z(t, "captureConsoleLogs", 7, !0), c = /* @__PURE__ */ z(!1), u = /* @__PURE__ */ z(!1), d = /* @__PURE__ */ z(0), h = /* @__PURE__ */ z(!1), g = /* @__PURE__ */ z(null), p = /* @__PURE__ */ z("00:00"), b = /* @__PURE__ */ z(void 0), C = /* @__PURE__ */ z(null), x = /* @__PURE__ */ z(Ie([])), y = /* @__PURE__ */ z(Ie([]));
|
|
3092
|
+
Kt(() => {
|
|
3093
|
+
if (f(h) && f(g) !== null) {
|
|
3094
|
+
const w = setInterval(
|
|
3095
|
+
() => {
|
|
3096
|
+
const T = Math.floor((Date.now() - f(g)) / 1e3), se = Math.floor(T / 60).toString().padStart(2, "0"), ye = (T % 60).toString().padStart(2, "0");
|
|
3097
|
+
m(p, `${se}:${ye}`);
|
|
3098
|
+
},
|
|
3099
|
+
1e3
|
|
3100
|
+
);
|
|
3101
|
+
return () => clearInterval(w);
|
|
3102
|
+
}
|
|
3103
|
+
});
|
|
3104
|
+
const J = /* @__PURE__ */ ge(() => s() === "false" || s() === !1), j = /* @__PURE__ */ ge(() => !f(c) || f(J) || !f(u)), K = /* @__PURE__ */ ge(() => `${n()}/embed/${r()}${f(J) ? "?showHeader=false" : ""}`), Ce = /* @__PURE__ */ ge(() => i() === "bottom-left" ? "left: 1rem; right: auto;" : "right: 1rem; left: auto;");
|
|
3105
|
+
Qn(() => {
|
|
3106
|
+
m(C, ns(), !0), l() && f(C).startConsoleCapture();
|
|
3107
|
+
function w(T) {
|
|
3108
|
+
try {
|
|
3109
|
+
const Ze = new URL(n()).origin;
|
|
3110
|
+
if (T.origin !== Ze) return;
|
|
3111
|
+
} catch {
|
|
3112
|
+
return;
|
|
3113
|
+
}
|
|
3114
|
+
const { type: se, payload: ye } = T.data || {};
|
|
3115
|
+
switch (se) {
|
|
3116
|
+
case "fortalece:ready":
|
|
3117
|
+
m(u, !0);
|
|
3118
|
+
break;
|
|
3119
|
+
case "fortalece:close-request":
|
|
3120
|
+
m(c, !1);
|
|
3121
|
+
break;
|
|
3122
|
+
case "fortalece:request-context":
|
|
3123
|
+
at();
|
|
3124
|
+
break;
|
|
3125
|
+
case "fortalece:request-attachments":
|
|
3126
|
+
bt();
|
|
3127
|
+
break;
|
|
3128
|
+
case "fortalece:clear-attachments":
|
|
3129
|
+
fe();
|
|
3130
|
+
break;
|
|
3131
|
+
case "fortalece:resize":
|
|
3132
|
+
break;
|
|
3133
|
+
case "fortalece:unread":
|
|
3134
|
+
m(d, ye?.count || 0, !0);
|
|
3135
|
+
break;
|
|
3136
|
+
case "fortalece:recording-started":
|
|
3137
|
+
m(h, !0), m(g, Date.now(), !0), m(p, "00:00"), m(c, !1);
|
|
3138
|
+
break;
|
|
3139
|
+
case "fortalece:recording-stopped":
|
|
3140
|
+
m(h, !1), m(g, null), m(p, "00:00"), m(c, !0);
|
|
3141
|
+
break;
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
return window.addEventListener("message", w), () => {
|
|
3145
|
+
window.removeEventListener("message", w), l() && f(C) && f(C).stopConsoleCapture();
|
|
3146
|
+
};
|
|
3147
|
+
});
|
|
3148
|
+
function we() {
|
|
3149
|
+
m(c, !f(c)), f(c) && m(d, 0);
|
|
3150
|
+
}
|
|
3151
|
+
function R() {
|
|
3152
|
+
ce("fortalece:stop-recording"), m(h, !1), m(g, null), m(p, "00:00");
|
|
3153
|
+
}
|
|
3154
|
+
function ce(w, T = {}) {
|
|
3155
|
+
if (f(b)?.contentWindow)
|
|
3156
|
+
try {
|
|
3157
|
+
const se = new URL(n()).origin;
|
|
3158
|
+
f(b).contentWindow.postMessage({ type: w, payload: T }, se);
|
|
3159
|
+
} catch {
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
function at() {
|
|
3163
|
+
if (!f(C)) return;
|
|
3164
|
+
const w = f(C).getPageContext();
|
|
3165
|
+
if (ce("fortalece:page-context", w), l()) {
|
|
3166
|
+
const T = f(C).getConsoleErrors();
|
|
3167
|
+
m(y, T, !0), ce("fortalece:console-logs", { logs: T });
|
|
3168
|
+
}
|
|
3169
|
+
ce("fortalece:capture-state", {
|
|
3170
|
+
allowAttachments: a(),
|
|
3171
|
+
allowScreenRecording: o(),
|
|
3172
|
+
captureConsoleLogs: l(),
|
|
3173
|
+
attachmentCount: f(x).length,
|
|
3174
|
+
maxAttachments: 5
|
|
3175
|
+
});
|
|
3176
|
+
}
|
|
3177
|
+
function bt() {
|
|
3178
|
+
f(x).forEach((w) => {
|
|
3179
|
+
ce("fortalece:attachment-added", w);
|
|
3180
|
+
});
|
|
3181
|
+
}
|
|
3182
|
+
function fe() {
|
|
3183
|
+
f(C) && (f(C).clearAttachments(), f(C).clearConsoleErrors(), m(x, [], !0), m(y, [], !0), ce("fortalece:capture-state", {
|
|
3184
|
+
allowAttachments: a(),
|
|
3185
|
+
allowScreenRecording: o(),
|
|
3186
|
+
captureConsoleLogs: l(),
|
|
3187
|
+
attachmentCount: 0,
|
|
3188
|
+
maxAttachments: 5
|
|
3189
|
+
}));
|
|
3190
|
+
}
|
|
3191
|
+
Kt(() => {
|
|
3192
|
+
f(c) && f(u) && (ce("fortalece:opened"), at(), bt());
|
|
3193
|
+
});
|
|
3194
|
+
var wt = {
|
|
3195
|
+
get embedId() {
|
|
3196
|
+
return r();
|
|
3197
|
+
},
|
|
3198
|
+
set embedId(w) {
|
|
3199
|
+
r(w), H();
|
|
3200
|
+
},
|
|
3201
|
+
get embedUrl() {
|
|
3202
|
+
return n();
|
|
3203
|
+
},
|
|
3204
|
+
set embedUrl(w = "https://app.fortalece.ai") {
|
|
3205
|
+
n(w), H();
|
|
3206
|
+
},
|
|
3207
|
+
get position() {
|
|
3208
|
+
return i();
|
|
3209
|
+
},
|
|
3210
|
+
set position(w = "bottom-right") {
|
|
3211
|
+
i(w), H();
|
|
3212
|
+
},
|
|
3213
|
+
get showHeader() {
|
|
3214
|
+
return s();
|
|
3215
|
+
},
|
|
3216
|
+
set showHeader(w = "true") {
|
|
3217
|
+
s(w), H();
|
|
3218
|
+
},
|
|
3219
|
+
get allowAttachments() {
|
|
3220
|
+
return a();
|
|
3221
|
+
},
|
|
3222
|
+
set allowAttachments(w = !0) {
|
|
3223
|
+
a(w), H();
|
|
3224
|
+
},
|
|
3225
|
+
get allowScreenRecording() {
|
|
3226
|
+
return o();
|
|
3227
|
+
},
|
|
3228
|
+
set allowScreenRecording(w = !0) {
|
|
3229
|
+
o(w), H();
|
|
3230
|
+
},
|
|
3231
|
+
get captureConsoleLogs() {
|
|
3232
|
+
return l();
|
|
3233
|
+
},
|
|
3234
|
+
set captureConsoleLogs(w = !0) {
|
|
3235
|
+
l(w), H();
|
|
3236
|
+
}
|
|
3237
|
+
}, Ye = Bi(), ot = I(Ye);
|
|
3238
|
+
{
|
|
3239
|
+
var ar = (w) => {
|
|
3240
|
+
var T = Oi();
|
|
3241
|
+
T.__click = R;
|
|
3242
|
+
var se = O(I(T), 2), ye = I(se, !0);
|
|
3243
|
+
M(se), Or(2), M(T), te(() => je(ye, f(p))), D(w, T);
|
|
3244
|
+
}, or = (w) => {
|
|
3245
|
+
var T = vi(), se = zn(T);
|
|
3246
|
+
{
|
|
3247
|
+
var ye = (Ze) => {
|
|
3248
|
+
var Fe = Ui();
|
|
3249
|
+
Fe.__click = we;
|
|
3250
|
+
var Dt = I(Fe);
|
|
3251
|
+
{
|
|
3252
|
+
var Lt = (X) => {
|
|
3253
|
+
var Ae = Ni(), ur = I(Ae, !0);
|
|
3254
|
+
M(Ae), te(() => je(ur, f(d) > 9 ? "9+" : f(d))), D(X, Ae);
|
|
3255
|
+
};
|
|
3256
|
+
F(Dt, (X) => {
|
|
3257
|
+
f(d) > 0 && !f(c) && X(Lt);
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
var cr = O(Dt, 2);
|
|
3261
|
+
{
|
|
3262
|
+
var Ot = (X) => {
|
|
3263
|
+
var Ae = Pi();
|
|
3264
|
+
D(X, Ae);
|
|
3265
|
+
}, fr = (X) => {
|
|
3266
|
+
var Ae = Fi();
|
|
3267
|
+
D(X, Ae);
|
|
3268
|
+
};
|
|
3269
|
+
F(cr, (X) => {
|
|
3270
|
+
f(c) ? X(Ot) : X(fr, !1);
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
M(Fe), te(() => Zt(Fe, "aria-label", f(c) ? "Close chat" : "Open chat")), D(Ze, Fe);
|
|
3274
|
+
};
|
|
3275
|
+
F(
|
|
3276
|
+
se,
|
|
3277
|
+
(Ze) => {
|
|
3278
|
+
f(j) && Ze(ye);
|
|
3279
|
+
},
|
|
3280
|
+
!0
|
|
3281
|
+
);
|
|
3282
|
+
}
|
|
3283
|
+
D(w, T);
|
|
3284
|
+
};
|
|
3285
|
+
F(ot, (w) => {
|
|
3286
|
+
f(h) ? w(ar) : w(or, !1);
|
|
3287
|
+
});
|
|
3288
|
+
}
|
|
3289
|
+
var lt = O(ot, 2);
|
|
3290
|
+
let Tt, Rt;
|
|
3291
|
+
var Mt = I(lt);
|
|
3292
|
+
{
|
|
3293
|
+
var lr = (w) => {
|
|
3294
|
+
var T = ji();
|
|
3295
|
+
D(w, T);
|
|
3296
|
+
};
|
|
3297
|
+
F(Mt, (w) => {
|
|
3298
|
+
f(u) || w(lr);
|
|
3299
|
+
});
|
|
3300
|
+
}
|
|
3301
|
+
var yt = O(Mt, 2);
|
|
3302
|
+
let It;
|
|
3303
|
+
return Tr(yt, (w) => m(b, w), () => f(b)), M(lt), M(Ye), te(() => {
|
|
3304
|
+
zr(Ye, f(Ce)), Tt = ut(lt, 1, "chat-window svelte-1105cax", null, Tt, { "chat-window-hidden": !f(c) }), Rt = zr(lt, "", Rt, { bottom: f(j) ? "4.5rem" : "0" }), Zt(yt, "src", f(K)), It = ut(yt, 1, "svelte-1105cax", null, It, { hidden: !f(u) });
|
|
3305
|
+
}), D(e, Ye), Pr(wt);
|
|
3122
3306
|
}
|
|
3123
|
-
|
|
3124
|
-
|
|
3307
|
+
Zn(["click"]);
|
|
3308
|
+
customElements.define("support-chat", rs(
|
|
3309
|
+
qi,
|
|
3310
|
+
{
|
|
3311
|
+
embedId: { attribute: "embed-id", reflect: !0 },
|
|
3312
|
+
embedUrl: { attribute: "embed-url", reflect: !0 },
|
|
3313
|
+
position: { attribute: "position", reflect: !0 },
|
|
3314
|
+
showHeader: { attribute: "show-header", reflect: !0 },
|
|
3315
|
+
allowAttachments: {
|
|
3316
|
+
attribute: "allow-attachments",
|
|
3317
|
+
reflect: !0,
|
|
3318
|
+
type: "Boolean"
|
|
3319
|
+
},
|
|
3320
|
+
allowScreenRecording: {
|
|
3321
|
+
attribute: "allow-screen-recording",
|
|
3322
|
+
reflect: !0,
|
|
3323
|
+
type: "Boolean"
|
|
3324
|
+
},
|
|
3325
|
+
captureConsoleLogs: {
|
|
3326
|
+
attribute: "capture-console-logs",
|
|
3327
|
+
reflect: !0,
|
|
3328
|
+
type: "Boolean"
|
|
3329
|
+
}
|
|
3330
|
+
},
|
|
3331
|
+
[],
|
|
3332
|
+
[],
|
|
3333
|
+
!0
|
|
3334
|
+
));
|
|
3335
|
+
var Wi = /* @__PURE__ */ N('<div class="recording-indicator svelte-p7nz7"><div class="recording-dot svelte-p7nz7"></div> <span class="svelte-p7nz7">Recording...</span> <button class="stop-recording-btn svelte-p7nz7">Stop</button></div>'), Ki = /* @__PURE__ */ N('<button class="capture-btn svelte-p7nz7"><span class="capture-icon svelte-p7nz7">📎</span> <span class="svelte-p7nz7">Add File</span></button>'), Vi = /* @__PURE__ */ N('<button class="capture-btn svelte-p7nz7"><span class="capture-icon svelte-p7nz7">📸</span> <span class="svelte-p7nz7">Screenshot</span></button> <button class="capture-btn record-btn svelte-p7nz7"><span class="capture-icon svelte-p7nz7">🔴</span> <span class="svelte-p7nz7">Record Screen</span></button>', 1), Yi = /* @__PURE__ */ N('<div class="attachment-item svelte-p7nz7"><span class="attachment-icon svelte-p7nz7"> </span> <div class="attachment-info svelte-p7nz7"><span class="attachment-name svelte-p7nz7"> </span> <span class="attachment-size svelte-p7nz7"> </span></div> <button class="remove-attachment-btn svelte-p7nz7">✕</button></div>'), Zi = /* @__PURE__ */ N('<div class="attachment-list svelte-p7nz7"><div class="attachment-header svelte-p7nz7"><span class="svelte-p7nz7"> </span></div> <!></div>'), Gi = /* @__PURE__ */ N('<div class="console-info svelte-p7nz7"><span class="console-icon svelte-p7nz7">🔧</span> <span class="svelte-p7nz7"> </span></div>'), Ji = /* @__PURE__ */ N('<div class="capture-panel svelte-p7nz7"><div class="capture-panel-header svelte-p7nz7"><span class="svelte-p7nz7">Capture</span> <button class="close-capture-btn svelte-p7nz7">✕</button></div> <div class="capture-actions svelte-p7nz7"><!> <!></div> <!> <!></div>'), Xi = /* @__PURE__ */ ir('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon svelte-p7nz7"><path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" class="svelte-p7nz7"></path></svg>'), Qi = /* @__PURE__ */ ir('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon svelte-p7nz7"><path fill-rule="evenodd" d="M4.848 2.771A49.144 49.144 0 0 1 12 2.25c2.43 0 4.817.178 7.152.52 1.978.292 3.348 2.024 3.348 3.97v6.02c0 1.946-1.37 3.678-3.348 3.97a48.901 48.901 0 0 1-3.476.383.39.39 0 0 0-.297.17l-2.755 4.133a.75.75 0 0 1-1.248 0l-2.755-4.133a.39.39 0 0 0-.297-.17 48.9 48.9 0 0 1-3.476-.384c-1.978-.29-3.348-2.024-3.348-3.97V6.741c0-1.946 1.37-3.68 3.348-3.97Z" clip-rule="evenodd" class="svelte-p7nz7"></path></svg>'), ea = /* @__PURE__ */ N('<button class="toggle-btn svelte-p7nz7"><!></button>'), ta = /* @__PURE__ */ N('<span class="badge svelte-p7nz7"> </span>'), ra = /* @__PURE__ */ N('<button aria-label="Toggle capture panel"><!> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon svelte-p7nz7"><path d="M12 9a3.75 3.75 0 1 0 0 7.5A3.75 3.75 0 0 0 12 9Z" class="svelte-p7nz7"></path><path fill-rule="evenodd" d="M9.344 3.071a49.52 49.52 0 0 1 5.312 0c.967.052 1.83.585 2.332 1.39l.821 1.317c.24.383.645.643 1.11.71.386.054.77.113 1.152.177 1.432.239 2.429 1.493 2.429 2.909V18a3 3 0 0 1-3 3H4.5a3 3 0 0 1-3-3V9.574c0-1.416.997-2.67 2.429-2.909.382-.064.766-.123 1.151-.178a1.56 1.56 0 0 0 1.11-.71l.822-1.315a2.942 2.942 0 0 1 2.332-1.39ZM6.75 12.75a5.25 5.25 0 1 1 10.5 0 5.25 5.25 0 0 1-10.5 0Zm12-1.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z" clip-rule="evenodd" class="svelte-p7nz7"></path></svg></button>'), na = /* @__PURE__ */ N('<div class="loading-state svelte-p7nz7"><div class="loading-spinner svelte-p7nz7"></div> <p class="svelte-p7nz7">Loading...</p></div>'), sa = /* @__PURE__ */ N('<div><!> <iframe title="Feedback Panel" sandbox="allow-scripts allow-forms allow-same-origin" allow="clipboard-write"></iframe></div>'), ia = /* @__PURE__ */ N('<div><!> <!> <!> <!> <input type="file" accept="image/*,audio/*,video/*" multiple style="display: none;" class="svelte-p7nz7"/> <!></div>');
|
|
3336
|
+
const aa = {
|
|
3125
3337
|
hash: "svelte-p7nz7",
|
|
3126
3338
|
code: `
|
|
3127
3339
|
/* Host element styling for inline mode */:host {display:block;}:host([display="inline"]) {display:block;width:100%;height:100%;}.svelte-p7nz7 {box-sizing:border-box;margin:0;padding:0;}.feedback-panel.svelte-p7nz7 {--primary-color: #6366f1;--danger-color: #ef4444;--shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);position:fixed;bottom:1rem;z-index:9999;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;}
|
|
@@ -3163,146 +3375,152 @@ const Qi = {
|
|
|
3163
3375
|
}
|
|
3164
3376
|
}`
|
|
3165
3377
|
};
|
|
3166
|
-
function
|
|
3167
|
-
|
|
3168
|
-
let r =
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3378
|
+
function oa(e, t) {
|
|
3379
|
+
Nr(t, !0), es(e, aa);
|
|
3380
|
+
let r = Z(t, "embedId"), n = Z(t, "embedUrl", 7, "https://app.fortalece.ai"), i = Z(t, "position", 7, "bottom-right"), s = Z(t, "display", 7, "floating"), a = Z(t, "allowAttachments", 7, !0), o = Z(t, "allowScreenRecording", 7, !0), l = Z(t, "captureConsoleLogs", 7, !0), c = Z(
|
|
3381
|
+
t,
|
|
3382
|
+
"showHeader",
|
|
3383
|
+
7,
|
|
3384
|
+
"true"
|
|
3385
|
+
// Default to string 'true' since HTML attributes are strings
|
|
3386
|
+
);
|
|
3387
|
+
const u = /* @__PURE__ */ ge(() => s() === "inline");
|
|
3388
|
+
let d = /* @__PURE__ */ z(!1), h = /* @__PURE__ */ z(!1);
|
|
3389
|
+
const g = /* @__PURE__ */ ge(() => f(u) ? !0 : f(d));
|
|
3390
|
+
let p = /* @__PURE__ */ z(!1), b = /* @__PURE__ */ z(void 0), C = /* @__PURE__ */ z(void 0), x = /* @__PURE__ */ z(null), y = /* @__PURE__ */ z(Ie([])), J = /* @__PURE__ */ z(Ie([])), j = /* @__PURE__ */ z(!1);
|
|
3391
|
+
const K = /* @__PURE__ */ ge(() => c() === "false" || c() === !1), Ce = /* @__PURE__ */ ge(() => `${n()}/embed/${r()}?type=feedback-panel${f(K) ? "&showHeader=false" : ""}`), we = /* @__PURE__ */ ge(() => i() === "bottom-left" ? "left: 1rem; right: auto;" : "right: 1rem; left: auto;"), R = /* @__PURE__ */ ge(() => f(y).length < 5), ce = /* @__PURE__ */ ge(() => a() || o());
|
|
3392
|
+
Qn(() => {
|
|
3393
|
+
m(x, ns(), !0), l() && f(x).startConsoleCapture();
|
|
3394
|
+
function v(_) {
|
|
3177
3395
|
try {
|
|
3178
|
-
const
|
|
3179
|
-
if (
|
|
3396
|
+
const Q = new URL(n()).origin;
|
|
3397
|
+
if (_.origin !== Q) return;
|
|
3180
3398
|
} catch {
|
|
3181
3399
|
return;
|
|
3182
3400
|
}
|
|
3183
|
-
const { type:
|
|
3184
|
-
switch (
|
|
3401
|
+
const { type: A } = _.data || {};
|
|
3402
|
+
switch (A) {
|
|
3185
3403
|
case "fortalece:ready":
|
|
3186
|
-
|
|
3404
|
+
m(h, !0), wt();
|
|
3187
3405
|
break;
|
|
3188
3406
|
case "fortalece:close-request":
|
|
3189
|
-
|
|
3407
|
+
m(d, !1);
|
|
3190
3408
|
break;
|
|
3191
3409
|
case "fortalece:request-context":
|
|
3192
|
-
|
|
3410
|
+
wt();
|
|
3193
3411
|
break;
|
|
3194
3412
|
case "fortalece:request-attachments":
|
|
3195
|
-
|
|
3413
|
+
Ye();
|
|
3196
3414
|
break;
|
|
3197
3415
|
case "fortalece:submit-start":
|
|
3198
3416
|
break;
|
|
3199
3417
|
case "fortalece:submit-complete":
|
|
3200
|
-
|
|
3418
|
+
_.data.payload?.success && (lr(), f(u) || m(d, !1));
|
|
3201
3419
|
break;
|
|
3202
3420
|
}
|
|
3203
3421
|
}
|
|
3204
|
-
return window.addEventListener("message",
|
|
3205
|
-
window.removeEventListener("message",
|
|
3422
|
+
return window.addEventListener("message", v), () => {
|
|
3423
|
+
window.removeEventListener("message", v), l() && f(x) && f(x).stopConsoleCapture();
|
|
3206
3424
|
};
|
|
3207
3425
|
});
|
|
3208
|
-
function
|
|
3209
|
-
|
|
3426
|
+
function at() {
|
|
3427
|
+
m(d, !f(d)), f(d) && m(j, !1);
|
|
3210
3428
|
}
|
|
3211
|
-
function
|
|
3212
|
-
|
|
3429
|
+
function bt() {
|
|
3430
|
+
m(j, !f(j));
|
|
3213
3431
|
}
|
|
3214
|
-
function
|
|
3215
|
-
if (f(
|
|
3432
|
+
function fe(v, _ = {}) {
|
|
3433
|
+
if (f(b)?.contentWindow)
|
|
3216
3434
|
try {
|
|
3217
|
-
const
|
|
3218
|
-
f(
|
|
3435
|
+
const A = new URL(n()).origin;
|
|
3436
|
+
f(b).contentWindow.postMessage({ type: v, payload: _ }, A);
|
|
3219
3437
|
} catch {
|
|
3220
3438
|
}
|
|
3221
3439
|
}
|
|
3222
|
-
function
|
|
3223
|
-
if (!f(
|
|
3224
|
-
const
|
|
3225
|
-
if (
|
|
3226
|
-
const
|
|
3227
|
-
|
|
3440
|
+
function wt() {
|
|
3441
|
+
if (!f(x)) return;
|
|
3442
|
+
const v = f(x).getPageContext();
|
|
3443
|
+
if (fe("fortalece:page-context", v), l()) {
|
|
3444
|
+
const _ = f(x).getConsoleErrors();
|
|
3445
|
+
fe("fortalece:console-logs", { logs: _ });
|
|
3228
3446
|
}
|
|
3229
|
-
|
|
3447
|
+
fe("fortalece:capture-state", {
|
|
3230
3448
|
allowAttachments: a(),
|
|
3231
3449
|
allowScreenRecording: o(),
|
|
3232
3450
|
captureConsoleLogs: l(),
|
|
3233
|
-
attachmentCount: f(
|
|
3451
|
+
attachmentCount: f(y).length,
|
|
3234
3452
|
maxAttachments: 5
|
|
3235
3453
|
});
|
|
3236
3454
|
}
|
|
3237
|
-
function
|
|
3238
|
-
f(
|
|
3239
|
-
|
|
3455
|
+
function Ye() {
|
|
3456
|
+
f(y).forEach((v) => {
|
|
3457
|
+
fe("fortalece:attachment-added", v);
|
|
3240
3458
|
});
|
|
3241
3459
|
}
|
|
3242
|
-
let
|
|
3243
|
-
|
|
3244
|
-
const
|
|
3245
|
-
|
|
3460
|
+
let ot = !1;
|
|
3461
|
+
Kt(() => {
|
|
3462
|
+
const v = f(g) && f(h);
|
|
3463
|
+
v && !ot ? (ot = !0, fe("fortalece:opened"), wt(), Ye()) : v || (ot = !1);
|
|
3246
3464
|
});
|
|
3247
|
-
function
|
|
3248
|
-
f(
|
|
3249
|
-
}
|
|
3250
|
-
async function
|
|
3251
|
-
const
|
|
3252
|
-
if (!(!
|
|
3253
|
-
for (const
|
|
3254
|
-
if (!f(
|
|
3255
|
-
const
|
|
3256
|
-
|
|
3465
|
+
function ar() {
|
|
3466
|
+
f(C)?.click();
|
|
3467
|
+
}
|
|
3468
|
+
async function or(v) {
|
|
3469
|
+
const _ = v.target;
|
|
3470
|
+
if (!(!_.files || !f(x))) {
|
|
3471
|
+
for (const A of Array.from(_.files)) {
|
|
3472
|
+
if (!f(R)) break;
|
|
3473
|
+
const Q = await f(x).addAttachment(A);
|
|
3474
|
+
Q && (m(y, [...f(y), Q], !0), fe("fortalece:attachment-added", Q));
|
|
3257
3475
|
}
|
|
3258
|
-
|
|
3476
|
+
_.value = "";
|
|
3259
3477
|
}
|
|
3260
3478
|
}
|
|
3261
|
-
function
|
|
3262
|
-
f(
|
|
3479
|
+
function lt(v) {
|
|
3480
|
+
f(x) && (f(x).removeAttachment(v), m(y, f(y).filter((_) => _.id !== v), !0), fe("fortalece:attachment-removed", { id: v }));
|
|
3263
3481
|
}
|
|
3264
|
-
async function
|
|
3265
|
-
if (!(!f(
|
|
3482
|
+
async function Tt() {
|
|
3483
|
+
if (!(!f(x) || f(p)))
|
|
3266
3484
|
try {
|
|
3267
|
-
await f(
|
|
3268
|
-
|
|
3485
|
+
await f(x).startScreenRecording(), m(p, !0), m(
|
|
3486
|
+
j,
|
|
3269
3487
|
!1
|
|
3270
3488
|
// Minimize panel during recording
|
|
3271
3489
|
);
|
|
3272
|
-
} catch (
|
|
3273
|
-
console.error("[SDK] Failed to start recording:",
|
|
3490
|
+
} catch (v) {
|
|
3491
|
+
console.error("[SDK] Failed to start recording:", v);
|
|
3274
3492
|
}
|
|
3275
3493
|
}
|
|
3276
|
-
async function
|
|
3277
|
-
if (!f(
|
|
3278
|
-
|
|
3279
|
-
const
|
|
3280
|
-
if (
|
|
3281
|
-
const
|
|
3282
|
-
|
|
3494
|
+
async function Rt() {
|
|
3495
|
+
if (!f(x) || !f(p)) return;
|
|
3496
|
+
m(p, !1);
|
|
3497
|
+
const v = await f(x).stopScreenRecording();
|
|
3498
|
+
if (v && f(R)) {
|
|
3499
|
+
const _ = `recording-${Date.now()}.webm`, A = await f(x).addBlobAttachment(v, _);
|
|
3500
|
+
A && (m(y, [...f(y), A], !0), fe("fortalece:attachment-added", A), fe("fortalece:recording-complete", { dataUrl: A.dataUrl, size: A.size }));
|
|
3283
3501
|
}
|
|
3284
3502
|
}
|
|
3285
|
-
async function
|
|
3286
|
-
if (!f(
|
|
3287
|
-
|
|
3288
|
-
|
|
3503
|
+
async function Mt() {
|
|
3504
|
+
if (!f(x) || !f(R)) return;
|
|
3505
|
+
m(
|
|
3506
|
+
j,
|
|
3289
3507
|
!1
|
|
3290
3508
|
// Hide panel for cleaner screenshot
|
|
3291
|
-
), await new Promise((
|
|
3292
|
-
const
|
|
3293
|
-
if (
|
|
3294
|
-
const
|
|
3295
|
-
|
|
3509
|
+
), await new Promise((_) => setTimeout(_, 100));
|
|
3510
|
+
const v = await f(x).captureScreenshot();
|
|
3511
|
+
if (v) {
|
|
3512
|
+
const _ = `screenshot-${Date.now()}.png`, A = await f(x).addBlobAttachment(v, _);
|
|
3513
|
+
A && (m(y, [...f(y), A], !0), fe("fortalece:attachment-added", A));
|
|
3296
3514
|
}
|
|
3297
3515
|
}
|
|
3298
|
-
function
|
|
3299
|
-
f(
|
|
3516
|
+
function lr() {
|
|
3517
|
+
f(x) && (f(x).clearAttachments(), f(x).clearConsoleErrors(), m(y, [], !0), m(J, [], !0));
|
|
3300
3518
|
}
|
|
3301
|
-
function
|
|
3302
|
-
return
|
|
3519
|
+
function yt(v) {
|
|
3520
|
+
return v < 1024 ? `${v} B` : v < 1024 * 1024 ? `${(v / 1024).toFixed(1)} KB` : `${(v / (1024 * 1024)).toFixed(1)} MB`;
|
|
3303
3521
|
}
|
|
3304
|
-
function
|
|
3305
|
-
switch (
|
|
3522
|
+
function It(v) {
|
|
3523
|
+
switch (v) {
|
|
3306
3524
|
case "video":
|
|
3307
3525
|
return "🎬";
|
|
3308
3526
|
case "audio":
|
|
@@ -3312,216 +3530,222 @@ function ea(e, t) {
|
|
|
3312
3530
|
return "🖼️";
|
|
3313
3531
|
}
|
|
3314
3532
|
}
|
|
3315
|
-
var
|
|
3533
|
+
var w = {
|
|
3316
3534
|
get embedId() {
|
|
3317
3535
|
return r();
|
|
3318
3536
|
},
|
|
3319
|
-
set embedId(
|
|
3320
|
-
r(
|
|
3537
|
+
set embedId(v) {
|
|
3538
|
+
r(v), H();
|
|
3321
3539
|
},
|
|
3322
3540
|
get embedUrl() {
|
|
3323
3541
|
return n();
|
|
3324
3542
|
},
|
|
3325
|
-
set embedUrl(
|
|
3326
|
-
n(
|
|
3543
|
+
set embedUrl(v = "https://app.fortalece.ai") {
|
|
3544
|
+
n(v), H();
|
|
3327
3545
|
},
|
|
3328
3546
|
get position() {
|
|
3329
3547
|
return i();
|
|
3330
3548
|
},
|
|
3331
|
-
set position(
|
|
3332
|
-
i(
|
|
3549
|
+
set position(v = "bottom-right") {
|
|
3550
|
+
i(v), H();
|
|
3333
3551
|
},
|
|
3334
3552
|
get display() {
|
|
3335
3553
|
return s();
|
|
3336
3554
|
},
|
|
3337
|
-
set display(
|
|
3338
|
-
s(
|
|
3555
|
+
set display(v = "floating") {
|
|
3556
|
+
s(v), H();
|
|
3339
3557
|
},
|
|
3340
3558
|
get allowAttachments() {
|
|
3341
3559
|
return a();
|
|
3342
3560
|
},
|
|
3343
|
-
set allowAttachments(
|
|
3344
|
-
a(
|
|
3561
|
+
set allowAttachments(v = !0) {
|
|
3562
|
+
a(v), H();
|
|
3345
3563
|
},
|
|
3346
3564
|
get allowScreenRecording() {
|
|
3347
3565
|
return o();
|
|
3348
3566
|
},
|
|
3349
|
-
set allowScreenRecording(
|
|
3350
|
-
o(
|
|
3567
|
+
set allowScreenRecording(v = !0) {
|
|
3568
|
+
o(v), H();
|
|
3351
3569
|
},
|
|
3352
3570
|
get captureConsoleLogs() {
|
|
3353
3571
|
return l();
|
|
3354
3572
|
},
|
|
3355
|
-
set captureConsoleLogs(
|
|
3356
|
-
l(
|
|
3573
|
+
set captureConsoleLogs(v = !0) {
|
|
3574
|
+
l(v), H();
|
|
3575
|
+
},
|
|
3576
|
+
get showHeader() {
|
|
3577
|
+
return c();
|
|
3578
|
+
},
|
|
3579
|
+
set showHeader(v = "true") {
|
|
3580
|
+
c(v), H();
|
|
3357
3581
|
}
|
|
3358
|
-
},
|
|
3359
|
-
let
|
|
3360
|
-
var
|
|
3582
|
+
}, T = ia();
|
|
3583
|
+
let se;
|
|
3584
|
+
var ye = I(T);
|
|
3361
3585
|
{
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
|
|
3586
|
+
var Ze = (v) => {
|
|
3587
|
+
var _ = Wi(), A = O(I(_), 4);
|
|
3588
|
+
A.__click = Rt, M(_), D(v, _);
|
|
3365
3589
|
};
|
|
3366
|
-
|
|
3367
|
-
f(
|
|
3590
|
+
F(ye, (v) => {
|
|
3591
|
+
f(p) && !f(u) && v(Ze);
|
|
3368
3592
|
});
|
|
3369
3593
|
}
|
|
3370
|
-
var
|
|
3594
|
+
var Fe = O(ye, 2);
|
|
3371
3595
|
{
|
|
3372
|
-
var
|
|
3373
|
-
var
|
|
3374
|
-
|
|
3375
|
-
var
|
|
3596
|
+
var Dt = (v) => {
|
|
3597
|
+
var _ = Ji(), A = I(_), Q = O(I(A), 2);
|
|
3598
|
+
Q.__click = bt, M(A);
|
|
3599
|
+
var ze = O(A, 2), P = I(ze);
|
|
3376
3600
|
{
|
|
3377
|
-
var
|
|
3378
|
-
var
|
|
3379
|
-
|
|
3601
|
+
var ue = (V) => {
|
|
3602
|
+
var ee = Ki();
|
|
3603
|
+
ee.__click = ar, te(() => ee.disabled = !f(R)), D(V, ee);
|
|
3380
3604
|
};
|
|
3381
|
-
|
|
3382
|
-
a() &&
|
|
3605
|
+
F(P, (V) => {
|
|
3606
|
+
a() && V(ue);
|
|
3383
3607
|
});
|
|
3384
3608
|
}
|
|
3385
|
-
var
|
|
3609
|
+
var Te = O(P, 2);
|
|
3386
3610
|
{
|
|
3387
|
-
var
|
|
3388
|
-
var
|
|
3389
|
-
|
|
3390
|
-
var
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
}),
|
|
3611
|
+
var dr = (V) => {
|
|
3612
|
+
var ee = Vi(), xe = zn(ee);
|
|
3613
|
+
xe.__click = Mt;
|
|
3614
|
+
var Ge = O(xe, 2);
|
|
3615
|
+
Ge.__click = Tt, te(() => {
|
|
3616
|
+
xe.disabled = !f(R), Ge.disabled = !f(R);
|
|
3617
|
+
}), D(V, ee);
|
|
3394
3618
|
};
|
|
3395
|
-
|
|
3396
|
-
o() &&
|
|
3619
|
+
F(Te, (V) => {
|
|
3620
|
+
o() && V(dr);
|
|
3397
3621
|
});
|
|
3398
3622
|
}
|
|
3399
|
-
|
|
3400
|
-
var
|
|
3623
|
+
M(ze);
|
|
3624
|
+
var Kr = O(ze, 2);
|
|
3401
3625
|
{
|
|
3402
|
-
var
|
|
3403
|
-
var
|
|
3404
|
-
|
|
3405
|
-
var
|
|
3406
|
-
|
|
3407
|
-
var
|
|
3408
|
-
|
|
3409
|
-
var
|
|
3410
|
-
|
|
3411
|
-
var
|
|
3412
|
-
|
|
3413
|
-
var
|
|
3414
|
-
|
|
3415
|
-
(
|
|
3416
|
-
je(
|
|
3626
|
+
var is = (V) => {
|
|
3627
|
+
var ee = Zi(), xe = I(ee), Ge = I(xe), ls = I(Ge);
|
|
3628
|
+
M(Ge), M(xe);
|
|
3629
|
+
var cs = O(xe, 2);
|
|
3630
|
+
xi(cs, 17, () => f(y), (hr) => hr.id, (hr, Nt) => {
|
|
3631
|
+
var pr = Yi(), vr = I(pr), fs = I(vr, !0);
|
|
3632
|
+
M(vr);
|
|
3633
|
+
var gr = O(vr, 2), mr = I(gr), us = I(mr, !0);
|
|
3634
|
+
M(mr);
|
|
3635
|
+
var Vr = O(mr, 2), ds = I(Vr, !0);
|
|
3636
|
+
M(Vr), M(gr);
|
|
3637
|
+
var hs = O(gr, 2);
|
|
3638
|
+
hs.__click = () => lt(f(Nt).id), M(pr), te(
|
|
3639
|
+
(ps, vs) => {
|
|
3640
|
+
je(fs, ps), je(us, f(Nt).name), je(ds, vs);
|
|
3417
3641
|
},
|
|
3418
3642
|
[
|
|
3419
|
-
() =>
|
|
3420
|
-
() =>
|
|
3643
|
+
() => It(f(Nt).type),
|
|
3644
|
+
() => yt(f(Nt).size)
|
|
3421
3645
|
]
|
|
3422
|
-
),
|
|
3423
|
-
}),
|
|
3646
|
+
), D(hr, pr);
|
|
3647
|
+
}), M(ee), te(() => je(ls, `Attachments (${f(y).length ?? ""}/5)`)), D(V, ee);
|
|
3424
3648
|
};
|
|
3425
|
-
|
|
3426
|
-
f(
|
|
3649
|
+
F(Kr, (V) => {
|
|
3650
|
+
f(y).length > 0 && V(is);
|
|
3427
3651
|
});
|
|
3428
3652
|
}
|
|
3429
|
-
var
|
|
3653
|
+
var as = O(Kr, 2);
|
|
3430
3654
|
{
|
|
3431
|
-
var
|
|
3432
|
-
var
|
|
3433
|
-
|
|
3655
|
+
var os = (V) => {
|
|
3656
|
+
var ee = Gi(), xe = O(I(ee), 2), Ge = I(xe);
|
|
3657
|
+
M(xe), M(ee), te(() => je(Ge, `${f(J).length ?? ""} console error(s) captured`)), D(V, ee);
|
|
3434
3658
|
};
|
|
3435
|
-
|
|
3436
|
-
l() && f(
|
|
3659
|
+
F(as, (V) => {
|
|
3660
|
+
l() && f(J).length > 0 && V(os);
|
|
3437
3661
|
});
|
|
3438
3662
|
}
|
|
3439
|
-
|
|
3663
|
+
M(_), D(v, _);
|
|
3440
3664
|
};
|
|
3441
|
-
|
|
3442
|
-
f(
|
|
3665
|
+
F(Fe, (v) => {
|
|
3666
|
+
f(j) && !f(p) && f(ce) && !f(u) && v(Dt);
|
|
3443
3667
|
});
|
|
3444
3668
|
}
|
|
3445
|
-
var
|
|
3669
|
+
var Lt = O(Fe, 2);
|
|
3446
3670
|
{
|
|
3447
|
-
var
|
|
3448
|
-
var
|
|
3449
|
-
|
|
3450
|
-
var
|
|
3671
|
+
var cr = (v) => {
|
|
3672
|
+
var _ = ea();
|
|
3673
|
+
_.__click = at;
|
|
3674
|
+
var A = I(_);
|
|
3451
3675
|
{
|
|
3452
|
-
var
|
|
3453
|
-
var
|
|
3454
|
-
|
|
3455
|
-
},
|
|
3456
|
-
var
|
|
3457
|
-
|
|
3676
|
+
var Q = (P) => {
|
|
3677
|
+
var ue = Xi();
|
|
3678
|
+
D(P, ue);
|
|
3679
|
+
}, ze = (P) => {
|
|
3680
|
+
var ue = Qi();
|
|
3681
|
+
D(P, ue);
|
|
3458
3682
|
};
|
|
3459
|
-
|
|
3460
|
-
f(
|
|
3683
|
+
F(A, (P) => {
|
|
3684
|
+
f(g) ? P(Q) : P(ze, !1);
|
|
3461
3685
|
});
|
|
3462
3686
|
}
|
|
3463
|
-
|
|
3687
|
+
M(_), te(() => Zt(_, "aria-label", f(g) ? "Close feedback" : "Send feedback")), D(v, _);
|
|
3464
3688
|
};
|
|
3465
|
-
|
|
3466
|
-
f(
|
|
3689
|
+
F(Lt, (v) => {
|
|
3690
|
+
f(u) || v(cr);
|
|
3467
3691
|
});
|
|
3468
3692
|
}
|
|
3469
|
-
var
|
|
3693
|
+
var Ot = O(Lt, 2);
|
|
3470
3694
|
{
|
|
3471
|
-
var
|
|
3472
|
-
var
|
|
3473
|
-
let
|
|
3474
|
-
|
|
3475
|
-
var
|
|
3695
|
+
var fr = (v) => {
|
|
3696
|
+
var _ = ra();
|
|
3697
|
+
let A;
|
|
3698
|
+
_.__click = bt;
|
|
3699
|
+
var Q = I(_);
|
|
3476
3700
|
{
|
|
3477
|
-
var
|
|
3478
|
-
var
|
|
3479
|
-
|
|
3701
|
+
var ze = (P) => {
|
|
3702
|
+
var ue = ta(), Te = I(ue, !0);
|
|
3703
|
+
M(ue), te(() => je(Te, f(y).length)), D(P, ue);
|
|
3480
3704
|
};
|
|
3481
|
-
|
|
3482
|
-
f(
|
|
3705
|
+
F(Q, (P) => {
|
|
3706
|
+
f(y).length > 0 && P(ze);
|
|
3483
3707
|
});
|
|
3484
3708
|
}
|
|
3485
|
-
|
|
3709
|
+
Or(2), M(_), te(() => A = ut(_, 1, "capture-toggle-btn svelte-p7nz7", null, A, { "has-items": f(y).length > 0 })), D(v, _);
|
|
3486
3710
|
};
|
|
3487
|
-
|
|
3488
|
-
!f(
|
|
3711
|
+
F(Ot, (v) => {
|
|
3712
|
+
!f(u) && f(g) && f(ce) && !f(p) && v(fr);
|
|
3489
3713
|
});
|
|
3490
3714
|
}
|
|
3491
|
-
var
|
|
3492
|
-
|
|
3493
|
-
var
|
|
3715
|
+
var X = O(Ot, 2);
|
|
3716
|
+
X.__change = or, Tr(X, (v) => m(C, v), () => f(C));
|
|
3717
|
+
var Ae = O(X, 2);
|
|
3494
3718
|
{
|
|
3495
|
-
var
|
|
3496
|
-
var
|
|
3497
|
-
let
|
|
3498
|
-
var
|
|
3719
|
+
var ur = (v) => {
|
|
3720
|
+
var _ = sa();
|
|
3721
|
+
let A;
|
|
3722
|
+
var Q = I(_);
|
|
3499
3723
|
{
|
|
3500
|
-
var
|
|
3501
|
-
var
|
|
3502
|
-
|
|
3724
|
+
var ze = (Te) => {
|
|
3725
|
+
var dr = na();
|
|
3726
|
+
D(Te, dr);
|
|
3503
3727
|
};
|
|
3504
|
-
|
|
3505
|
-
f(
|
|
3728
|
+
F(Q, (Te) => {
|
|
3729
|
+
f(h) || Te(ze);
|
|
3506
3730
|
});
|
|
3507
3731
|
}
|
|
3508
|
-
var
|
|
3509
|
-
let
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
}),
|
|
3732
|
+
var P = O(Q, 2);
|
|
3733
|
+
let ue;
|
|
3734
|
+
Tr(P, (Te) => m(b, Te), () => f(b)), M(_), te(() => {
|
|
3735
|
+
A = ut(_, 1, "panel-window svelte-p7nz7", null, A, { inline: f(u) }), Zt(P, "src", f(Ce)), ue = ut(P, 1, "svelte-p7nz7", null, ue, { hidden: !f(h) });
|
|
3736
|
+
}), D(v, _);
|
|
3513
3737
|
};
|
|
3514
|
-
|
|
3515
|
-
f(
|
|
3738
|
+
F(Ae, (v) => {
|
|
3739
|
+
f(g) && v(ur);
|
|
3516
3740
|
});
|
|
3517
3741
|
}
|
|
3518
|
-
return T
|
|
3519
|
-
|
|
3520
|
-
}),
|
|
3742
|
+
return M(T), te(() => {
|
|
3743
|
+
se = ut(T, 1, "feedback-panel svelte-p7nz7", null, se, { inline: f(u) }), zr(T, f(u) ? "" : f(we));
|
|
3744
|
+
}), D(e, T), Pr(w);
|
|
3521
3745
|
}
|
|
3522
|
-
|
|
3523
|
-
customElements.define("feedback-panel",
|
|
3524
|
-
|
|
3746
|
+
Zn(["click", "change"]);
|
|
3747
|
+
customElements.define("feedback-panel", rs(
|
|
3748
|
+
oa,
|
|
3525
3749
|
{
|
|
3526
3750
|
embedId: { attribute: "embed-id", reflect: !0 },
|
|
3527
3751
|
embedUrl: { attribute: "embed-url", reflect: !0 },
|
|
@@ -3541,24 +3765,25 @@ customElements.define("feedback-panel", Ln(
|
|
|
3541
3765
|
attribute: "capture-console-logs",
|
|
3542
3766
|
reflect: !0,
|
|
3543
3767
|
type: "Boolean"
|
|
3544
|
-
}
|
|
3768
|
+
},
|
|
3769
|
+
showHeader: { attribute: "show-header", reflect: !0 }
|
|
3545
3770
|
},
|
|
3546
3771
|
[],
|
|
3547
3772
|
[],
|
|
3548
3773
|
!0
|
|
3549
3774
|
));
|
|
3550
|
-
const
|
|
3551
|
-
function
|
|
3775
|
+
const qr = "https://api.fortalece.ai";
|
|
3776
|
+
function Wr() {
|
|
3552
3777
|
return `msg_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
3553
3778
|
}
|
|
3554
|
-
function
|
|
3779
|
+
function ss(e) {
|
|
3555
3780
|
const t = {
|
|
3556
3781
|
"Content-Type": "application/json"
|
|
3557
3782
|
};
|
|
3558
3783
|
return e.apiKey && (t.Authorization = `Bearer ${e.apiKey}`), e.projectId && (t["X-Project-ID"] = e.projectId), t;
|
|
3559
3784
|
}
|
|
3560
|
-
async function
|
|
3561
|
-
const n = e.apiUrl ||
|
|
3785
|
+
async function ca(e, t, r) {
|
|
3786
|
+
const n = e.apiUrl || qr, i = {
|
|
3562
3787
|
projectId: e.projectId,
|
|
3563
3788
|
message: t,
|
|
3564
3789
|
conversationId: r
|
|
@@ -3566,7 +3791,7 @@ async function ra(e, t, r) {
|
|
|
3566
3791
|
try {
|
|
3567
3792
|
const s = await fetch(`${n}/api/chat/message`, {
|
|
3568
3793
|
method: "POST",
|
|
3569
|
-
headers:
|
|
3794
|
+
headers: ss(e),
|
|
3570
3795
|
body: JSON.stringify(i)
|
|
3571
3796
|
});
|
|
3572
3797
|
if (!s.ok)
|
|
@@ -3578,7 +3803,7 @@ async function ra(e, t, r) {
|
|
|
3578
3803
|
return {
|
|
3579
3804
|
success: !0,
|
|
3580
3805
|
message: {
|
|
3581
|
-
id: a.id ||
|
|
3806
|
+
id: a.id || Wr(),
|
|
3582
3807
|
role: "assistant",
|
|
3583
3808
|
content: a.message || a.content || "",
|
|
3584
3809
|
timestamp: new Date(a.timestamp || Date.now()),
|
|
@@ -3593,31 +3818,31 @@ async function ra(e, t, r) {
|
|
|
3593
3818
|
};
|
|
3594
3819
|
}
|
|
3595
3820
|
}
|
|
3596
|
-
function
|
|
3821
|
+
function fa(e) {
|
|
3597
3822
|
return {
|
|
3598
|
-
id:
|
|
3823
|
+
id: Wr(),
|
|
3599
3824
|
role: "user",
|
|
3600
3825
|
content: e,
|
|
3601
3826
|
timestamp: /* @__PURE__ */ new Date()
|
|
3602
3827
|
};
|
|
3603
3828
|
}
|
|
3604
|
-
function
|
|
3829
|
+
function ua(e) {
|
|
3605
3830
|
return {
|
|
3606
|
-
id:
|
|
3831
|
+
id: Wr(),
|
|
3607
3832
|
role: "system",
|
|
3608
3833
|
content: e,
|
|
3609
3834
|
timestamp: /* @__PURE__ */ new Date()
|
|
3610
3835
|
};
|
|
3611
3836
|
}
|
|
3612
|
-
async function
|
|
3613
|
-
const r = e.apiUrl ||
|
|
3837
|
+
async function da(e, t) {
|
|
3838
|
+
const r = e.apiUrl || qr, n = {
|
|
3614
3839
|
...t,
|
|
3615
3840
|
projectId: e.projectId
|
|
3616
3841
|
};
|
|
3617
3842
|
try {
|
|
3618
3843
|
const i = await fetch(`${r}/api/feedback`, {
|
|
3619
3844
|
method: "POST",
|
|
3620
|
-
headers:
|
|
3845
|
+
headers: ss(e),
|
|
3621
3846
|
body: JSON.stringify(n)
|
|
3622
3847
|
});
|
|
3623
3848
|
if (!i.ok)
|
|
@@ -3637,24 +3862,24 @@ async function ia(e, t) {
|
|
|
3637
3862
|
};
|
|
3638
3863
|
}
|
|
3639
3864
|
}
|
|
3640
|
-
function
|
|
3865
|
+
function ha(e, t) {
|
|
3641
3866
|
return {
|
|
3642
3867
|
projectId: e,
|
|
3643
|
-
apiUrl: t?.apiUrl ||
|
|
3868
|
+
apiUrl: t?.apiUrl || qr,
|
|
3644
3869
|
apiKey: t?.apiKey
|
|
3645
3870
|
};
|
|
3646
3871
|
}
|
|
3647
|
-
const
|
|
3872
|
+
const pa = "0.2.0";
|
|
3648
3873
|
export {
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3874
|
+
Li as ContextCaptureService,
|
|
3875
|
+
qr as DEFAULT_API_URL,
|
|
3876
|
+
oa as FeedbackPanel,
|
|
3877
|
+
qi as SupportChat,
|
|
3878
|
+
pa as VERSION,
|
|
3879
|
+
ha as createApiConfig,
|
|
3880
|
+
ua as createSystemMessage,
|
|
3881
|
+
fa as createUserMessage,
|
|
3882
|
+
ns as getContextCaptureService,
|
|
3883
|
+
ca as sendMessage,
|
|
3884
|
+
da as submitFeedback
|
|
3660
3885
|
};
|