@pie-players/pie-tool-theme 0.3.9 → 0.3.11
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/tool-color-scheme.js +859 -843
- package/package.json +5 -5
- package/tool-color-scheme.svelte +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Rn = Object.defineProperty;
|
|
2
|
+
var Di = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var h = (t, e, r) =>
|
|
7
|
-
var u = (t, e, r) => (Vr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), k = (t, e, r) => e.has(t) ?
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var Ln = (t, e, r) => e in t ? Rn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
+
var h = (t, e, r) => Ln(t, typeof e != "symbol" ? e + "" : e, r), Vr = (t, e, r) => e.has(t) || Di("Cannot " + r);
|
|
7
|
+
var u = (t, e, r) => (Vr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), k = (t, e, r) => e.has(t) ? Di("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), _ = (t, e, r, i) => (Vr(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r), L = (t, e, r) => (Vr(t, e, "access private method"), r);
|
|
8
|
+
var fo;
|
|
9
|
+
typeof window < "u" && ((fo = window.__svelte ?? (window.__svelte = {})).v ?? (fo.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const Pn = 1, Mn = 2, xn = 16, Nn = 2, po = "[", di = "[!", Vi = "[?", pi = "]", Pt = {}, F = /* @__PURE__ */ Symbol(), ho = "http://www.w3.org/1999/xhtml", jr = !1;
|
|
11
|
+
var vo = Array.isArray, Dn = Array.prototype.indexOf, Mt = Array.prototype.includes, _r = Array.from, vr = Object.keys, mr = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Vn = Object.getOwnPropertyDescriptors, Fn = Object.prototype, qn = Array.prototype, mo = Object.getPrototypeOf, Fi = Object.isExtensible;
|
|
12
|
+
const Bn = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function Hn(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
@@ -21,56 +21,56 @@ function go() {
|
|
|
21
21
|
});
|
|
22
22
|
return { promise: r, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const H = 2, Bt = 4, xt = 8, hi = 1 << 24, Ze = 16, _e = 32, et = 64, Ur = 128, ue = 512, q = 1024, B = 2048, ye = 4096, U = 8192, $e = 16384, mt = 32768, Nt = 65536, qi = 1 << 17, zn = 1 << 18, gt = 1 << 19, jn = 1 << 20, Fe = 1 << 25, pt = 65536, Gr = 1 << 21, vi = 1 << 22, Ye = 1 << 23, ar = /* @__PURE__ */ Symbol("$state"), Un = /* @__PURE__ */ Symbol("legacy props"), Gn = /* @__PURE__ */ Symbol(""), rt = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
h(this, "name", "StaleReactionError");
|
|
28
28
|
h(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
30
|
+
}(), Wn = (
|
|
31
31
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
32
32
|
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
33
33
|
), wr = 3, rr = 8;
|
|
34
|
-
function
|
|
34
|
+
function Kn(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Yn() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Qn(t, e, r) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Jn(t) {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Xn() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Zn(t) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function es() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ts() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function rs() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function is() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function os() {
|
|
65
65
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ns() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
69
69
|
}
|
|
70
70
|
function kr(t) {
|
|
71
71
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ss() {
|
|
74
74
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
75
75
|
}
|
|
76
76
|
let E = !1;
|
|
@@ -93,7 +93,7 @@ function z(t) {
|
|
|
93
93
|
I = t;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function bo(t = 1) {
|
|
97
97
|
if (E) {
|
|
98
98
|
for (var e = t, r = I; e--; )
|
|
99
99
|
r = /** @type {TemplateNode} */
|
|
@@ -101,17 +101,17 @@ function mo(t = 1) {
|
|
|
101
101
|
I = r;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function gr(t = !0) {
|
|
105
105
|
for (var e = 0, r = I; ; ) {
|
|
106
106
|
if (r.nodeType === rr) {
|
|
107
107
|
var i = (
|
|
108
108
|
/** @type {Comment} */
|
|
109
109
|
r.data
|
|
110
110
|
);
|
|
111
|
-
if (i ===
|
|
111
|
+
if (i === pi) {
|
|
112
112
|
if (e === 0) return r;
|
|
113
113
|
e -= 1;
|
|
114
|
-
} else (i ===
|
|
114
|
+
} else (i === po || i === di || // "[1", "[2", etc. for if blocks
|
|
115
115
|
i[0] === "[" && !isNaN(Number(i.slice(1)))) && (e += 1);
|
|
116
116
|
}
|
|
117
117
|
var o = (
|
|
@@ -121,7 +121,7 @@ function mr(t = !0) {
|
|
|
121
121
|
t && r.remove(), r = o;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function yo(t) {
|
|
125
125
|
if (!t || t.nodeType !== rr)
|
|
126
126
|
throw kr(), Pt;
|
|
127
127
|
return (
|
|
@@ -129,20 +129,20 @@ function bo(t) {
|
|
|
129
129
|
t.data
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function _o(t) {
|
|
133
133
|
return t === this.v;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ls(t, e) {
|
|
136
136
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
return !
|
|
138
|
+
function wo(t) {
|
|
139
|
+
return !ls(t, this.v);
|
|
140
140
|
}
|
|
141
|
-
let
|
|
141
|
+
let as = !1, ie = null;
|
|
142
142
|
function Dt(t) {
|
|
143
143
|
ie = t;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ko(t, e = !1, r) {
|
|
146
146
|
ie = {
|
|
147
147
|
p: ie,
|
|
148
148
|
i: !1,
|
|
@@ -153,7 +153,7 @@ function wo(t, e = !1, r) {
|
|
|
153
153
|
l: null
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function To(t) {
|
|
157
157
|
var e = (
|
|
158
158
|
/** @type {ComponentContext} */
|
|
159
159
|
ie
|
|
@@ -161,44 +161,44 @@ function ko(t) {
|
|
|
161
161
|
if (r !== null) {
|
|
162
162
|
e.e = null;
|
|
163
163
|
for (var i of r)
|
|
164
|
-
|
|
164
|
+
Wo(i);
|
|
165
165
|
}
|
|
166
166
|
return t !== void 0 && (e.x = t), e.i = !0, ie = e.p, t ?? /** @type {T} */
|
|
167
167
|
{};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Io() {
|
|
170
170
|
return !0;
|
|
171
171
|
}
|
|
172
172
|
let it = [];
|
|
173
|
-
function
|
|
173
|
+
function So() {
|
|
174
174
|
var t = it;
|
|
175
|
-
it = [],
|
|
175
|
+
it = [], Hn(t);
|
|
176
176
|
}
|
|
177
177
|
function ut(t) {
|
|
178
178
|
if (it.length === 0 && !Qt) {
|
|
179
179
|
var e = it;
|
|
180
180
|
queueMicrotask(() => {
|
|
181
|
-
e === it &&
|
|
181
|
+
e === it && So();
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
it.push(t);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function cs() {
|
|
187
187
|
for (; it.length > 0; )
|
|
188
|
-
|
|
188
|
+
So();
|
|
189
189
|
}
|
|
190
190
|
function Ao(t) {
|
|
191
|
-
var e =
|
|
191
|
+
var e = S;
|
|
192
192
|
if (e === null)
|
|
193
193
|
return T.f |= Ye, t;
|
|
194
|
-
if ((e.f &
|
|
194
|
+
if ((e.f & mt) === 0 && (e.f & Bt) === 0)
|
|
195
195
|
throw t;
|
|
196
196
|
Ke(t, e);
|
|
197
197
|
}
|
|
198
198
|
function Ke(t, e) {
|
|
199
199
|
for (; e !== null; ) {
|
|
200
200
|
if ((e.f & Ur) !== 0) {
|
|
201
|
-
if ((e.f &
|
|
201
|
+
if ((e.f & mt) === 0)
|
|
202
202
|
throw t;
|
|
203
203
|
try {
|
|
204
204
|
e.b.error(t);
|
|
@@ -211,32 +211,32 @@ function Ke(t, e) {
|
|
|
211
211
|
}
|
|
212
212
|
throw t;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const us = -7169;
|
|
215
215
|
function M(t, e) {
|
|
216
|
-
t.f = t.f &
|
|
216
|
+
t.f = t.f & us | e;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function mi(t) {
|
|
219
219
|
(t.f & ue) !== 0 || t.deps === null ? M(t, q) : M(t, ye);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Eo(t) {
|
|
222
222
|
if (t !== null)
|
|
223
223
|
for (const e of t)
|
|
224
|
-
(e.f &
|
|
224
|
+
(e.f & H) === 0 || (e.f & pt) === 0 || (e.f ^= pt, Eo(
|
|
225
225
|
/** @type {Derived} */
|
|
226
226
|
e.deps
|
|
227
227
|
));
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
(t.f &
|
|
229
|
+
function $o(t, e, r) {
|
|
230
|
+
(t.f & B) !== 0 ? e.add(t) : (t.f & ye) !== 0 && r.add(t), Eo(t.deps), M(t, q);
|
|
231
231
|
}
|
|
232
232
|
const or = /* @__PURE__ */ new Set();
|
|
233
|
-
let R = null,
|
|
234
|
-
var Ue,
|
|
235
|
-
const
|
|
233
|
+
let R = null, ge = null, K = [], Ir = null, Qt = !1, Vt = null, fs = 1;
|
|
234
|
+
var Ue, St, st, At, Et, $t, Ge, Te, Ot, J, Wr, Kr, Yr, Qr;
|
|
235
|
+
const Ci = class Ci {
|
|
236
236
|
constructor() {
|
|
237
237
|
k(this, J);
|
|
238
238
|
// for debugging. TODO remove once async is stable
|
|
239
|
-
h(this, "id",
|
|
239
|
+
h(this, "id", fs++);
|
|
240
240
|
/**
|
|
241
241
|
* The current values of any sources that are updated in this batch
|
|
242
242
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -259,7 +259,7 @@ const Oi = class Oi {
|
|
|
259
259
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
260
260
|
* @type {Set<(batch: Batch) => void>}
|
|
261
261
|
*/
|
|
262
|
-
k(this,
|
|
262
|
+
k(this, St, /* @__PURE__ */ new Set());
|
|
263
263
|
/**
|
|
264
264
|
* The number of async effects that are currently in flight
|
|
265
265
|
*/
|
|
@@ -267,7 +267,7 @@ const Oi = class Oi {
|
|
|
267
267
|
/**
|
|
268
268
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
269
269
|
*/
|
|
270
|
-
k(this,
|
|
270
|
+
k(this, At, 0);
|
|
271
271
|
/**
|
|
272
272
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
273
273
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
@@ -312,7 +312,7 @@ const Oi = class Oi {
|
|
|
312
312
|
if (r) {
|
|
313
313
|
u(this, Te).delete(e);
|
|
314
314
|
for (var i of r.d)
|
|
315
|
-
M(i,
|
|
315
|
+
M(i, B), Ee(i);
|
|
316
316
|
for (i of r.m)
|
|
317
317
|
M(i, ye), Ee(i);
|
|
318
318
|
}
|
|
@@ -329,13 +329,13 @@ const Oi = class Oi {
|
|
|
329
329
|
if (Vt = null, L(this, J, Wr).call(this)) {
|
|
330
330
|
L(this, J, Yr).call(this, i), L(this, J, Yr).call(this, r);
|
|
331
331
|
for (const [o, n] of u(this, Te))
|
|
332
|
-
|
|
332
|
+
Lo(o, n);
|
|
333
333
|
} else {
|
|
334
334
|
R = null;
|
|
335
335
|
for (const o of u(this, Ue)) o(this);
|
|
336
|
-
u(this, Ue).clear(), u(this, st) === 0 && L(this, J, Qr).call(this),
|
|
336
|
+
u(this, Ue).clear(), u(this, st) === 0 && L(this, J, Qr).call(this), Bi(i), Bi(r), u(this, $t).clear(), u(this, Ge).clear(), u(this, Et)?.resolve();
|
|
337
337
|
}
|
|
338
|
-
|
|
338
|
+
ge = null;
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
341
341
|
* Associate a change to a given source with the current
|
|
@@ -344,17 +344,17 @@ const Oi = class Oi {
|
|
|
344
344
|
* @param {any} value
|
|
345
345
|
*/
|
|
346
346
|
capture(e, r) {
|
|
347
|
-
r !== F && !this.previous.has(e) && this.previous.set(e, r), (e.f & Ye) === 0 && (this.current.set(e, e.v),
|
|
347
|
+
r !== F && !this.previous.has(e) && this.previous.set(e, r), (e.f & Ye) === 0 && (this.current.set(e, e.v), ge?.set(e, e.v));
|
|
348
348
|
}
|
|
349
349
|
activate() {
|
|
350
350
|
R = this, this.apply();
|
|
351
351
|
}
|
|
352
352
|
deactivate() {
|
|
353
|
-
R === this && (R = null,
|
|
353
|
+
R === this && (R = null, ge = null);
|
|
354
354
|
}
|
|
355
355
|
flush() {
|
|
356
356
|
if (K.length > 0)
|
|
357
|
-
R = this,
|
|
357
|
+
R = this, Oo();
|
|
358
358
|
else if (u(this, st) === 0 && !this.is_fork) {
|
|
359
359
|
for (const e of u(this, Ue)) e(this);
|
|
360
360
|
u(this, Ue).clear(), L(this, J, Qr).call(this), u(this, Et)?.resolve();
|
|
@@ -362,28 +362,28 @@ const Oi = class Oi {
|
|
|
362
362
|
this.deactivate();
|
|
363
363
|
}
|
|
364
364
|
discard() {
|
|
365
|
-
for (const e of u(this,
|
|
366
|
-
u(this,
|
|
365
|
+
for (const e of u(this, St)) e(this);
|
|
366
|
+
u(this, St).clear();
|
|
367
367
|
}
|
|
368
368
|
/**
|
|
369
369
|
*
|
|
370
370
|
* @param {boolean} blocking
|
|
371
371
|
*/
|
|
372
372
|
increment(e) {
|
|
373
|
-
_(this, st, u(this, st) + 1), e && _(this,
|
|
373
|
+
_(this, st, u(this, st) + 1), e && _(this, At, u(this, At) + 1);
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
376
|
*
|
|
377
377
|
* @param {boolean} blocking
|
|
378
378
|
*/
|
|
379
379
|
decrement(e) {
|
|
380
|
-
_(this, st, u(this, st) - 1), e && _(this,
|
|
380
|
+
_(this, st, u(this, st) - 1), e && _(this, At, u(this, At) - 1), !u(this, Ot) && (_(this, Ot, !0), ut(() => {
|
|
381
381
|
_(this, Ot, !1), L(this, J, Wr).call(this) ? K.length > 0 && this.flush() : this.revive();
|
|
382
382
|
}));
|
|
383
383
|
}
|
|
384
384
|
revive() {
|
|
385
385
|
for (const e of u(this, $t))
|
|
386
|
-
u(this, Ge).delete(e), M(e,
|
|
386
|
+
u(this, Ge).delete(e), M(e, B), Ee(e);
|
|
387
387
|
for (const e of u(this, Ge))
|
|
388
388
|
M(e, ye), Ee(e);
|
|
389
389
|
this.flush();
|
|
@@ -394,14 +394,14 @@ const Oi = class Oi {
|
|
|
394
394
|
}
|
|
395
395
|
/** @param {(batch: Batch) => void} fn */
|
|
396
396
|
ondiscard(e) {
|
|
397
|
-
u(this,
|
|
397
|
+
u(this, St).add(e);
|
|
398
398
|
}
|
|
399
399
|
settled() {
|
|
400
400
|
return (u(this, Et) ?? _(this, Et, go())).promise;
|
|
401
401
|
}
|
|
402
402
|
static ensure() {
|
|
403
403
|
if (R === null) {
|
|
404
|
-
const e = R = new
|
|
404
|
+
const e = R = new Ci();
|
|
405
405
|
or.add(R), Qt || ut(() => {
|
|
406
406
|
R === e && e.flush();
|
|
407
407
|
});
|
|
@@ -411,8 +411,8 @@ const Oi = class Oi {
|
|
|
411
411
|
apply() {
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
Ue = new WeakMap(),
|
|
415
|
-
return this.is_fork || u(this,
|
|
414
|
+
Ue = new WeakMap(), St = new WeakMap(), st = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), $t = new WeakMap(), Ge = new WeakMap(), Te = new WeakMap(), Ot = new WeakMap(), J = new WeakSet(), Wr = function() {
|
|
415
|
+
return this.is_fork || u(this, At) > 0;
|
|
416
416
|
}, /**
|
|
417
417
|
* Traverse the effect tree, executing effects or stashing
|
|
418
418
|
* them for later execution as appropriate
|
|
@@ -425,7 +425,7 @@ Kr = function(e, r, i) {
|
|
|
425
425
|
for (var o = e.first; o !== null; ) {
|
|
426
426
|
var n = o.f, s = (n & (_e | et)) !== 0, l = s && (n & q) !== 0, a = (n & U) !== 0, c = l || u(this, Te).has(o);
|
|
427
427
|
if (!c && o.fn !== null) {
|
|
428
|
-
s ? a || (o.f ^= q) : (n &
|
|
428
|
+
s ? a || (o.f ^= q) : (n & Bt) !== 0 ? r.push(o) : (n & (xt | hi)) !== 0 && a ? i.push(o) : ir(o) && (qt(o), (n & Ze) !== 0 && (u(this, Ge).add(o), a && M(o, B)));
|
|
429
429
|
var f = o.first;
|
|
430
430
|
if (f !== null) {
|
|
431
431
|
o = f;
|
|
@@ -446,12 +446,12 @@ Kr = function(e, r, i) {
|
|
|
446
446
|
*/
|
|
447
447
|
Yr = function(e) {
|
|
448
448
|
for (var r = 0; r < e.length; r += 1)
|
|
449
|
-
|
|
449
|
+
$o(e[r], u(this, $t), u(this, Ge));
|
|
450
450
|
}, Qr = function() {
|
|
451
451
|
var n;
|
|
452
452
|
if (or.size > 1) {
|
|
453
453
|
this.previous.clear();
|
|
454
|
-
var e = R, r =
|
|
454
|
+
var e = R, r = ge, i = !0;
|
|
455
455
|
for (const s of or) {
|
|
456
456
|
if (s === this) {
|
|
457
457
|
i = !1;
|
|
@@ -474,7 +474,7 @@ Yr = function(e) {
|
|
|
474
474
|
K = [];
|
|
475
475
|
const c = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
476
476
|
for (const d of l)
|
|
477
|
-
|
|
477
|
+
Co(d, a, c, f);
|
|
478
478
|
if (K.length > 0) {
|
|
479
479
|
R = s, s.apply();
|
|
480
480
|
for (const d of K)
|
|
@@ -484,33 +484,33 @@ Yr = function(e) {
|
|
|
484
484
|
K = o;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
R = e,
|
|
487
|
+
R = e, ge = r;
|
|
488
488
|
}
|
|
489
489
|
u(this, Te).clear(), or.delete(this);
|
|
490
490
|
};
|
|
491
|
-
let
|
|
491
|
+
let Be = Ci;
|
|
492
492
|
function Wt(t) {
|
|
493
493
|
var e = Qt;
|
|
494
494
|
Qt = !0;
|
|
495
495
|
try {
|
|
496
496
|
for (var r; ; ) {
|
|
497
|
-
if (
|
|
497
|
+
if (cs(), K.length === 0 && (R?.flush(), K.length === 0))
|
|
498
498
|
return Ir = null, /** @type {T} */
|
|
499
499
|
r;
|
|
500
|
-
|
|
500
|
+
Oo();
|
|
501
501
|
}
|
|
502
502
|
} finally {
|
|
503
503
|
Qt = e;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Oo() {
|
|
507
507
|
var t = null;
|
|
508
508
|
try {
|
|
509
509
|
for (var e = 0; K.length > 0; ) {
|
|
510
|
-
var r =
|
|
510
|
+
var r = Be.ensure();
|
|
511
511
|
if (e++ > 1e3) {
|
|
512
512
|
var i, o;
|
|
513
|
-
|
|
513
|
+
ds();
|
|
514
514
|
}
|
|
515
515
|
r.process(K), Qe.clear();
|
|
516
516
|
}
|
|
@@ -518,20 +518,20 @@ function $o() {
|
|
|
518
518
|
K = [], Ir = null, Vt = null;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function ds() {
|
|
522
522
|
try {
|
|
523
|
-
|
|
523
|
+
es();
|
|
524
524
|
} catch (t) {
|
|
525
525
|
Ke(t, Ir);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
let xe = null;
|
|
529
|
-
function
|
|
529
|
+
function Bi(t) {
|
|
530
530
|
var e = t.length;
|
|
531
531
|
if (e !== 0) {
|
|
532
532
|
for (var r = 0; r < e; ) {
|
|
533
533
|
var i = t[r++];
|
|
534
|
-
if ((i.f & ($e | U)) === 0 && ir(i) && (xe = /* @__PURE__ */ new Set(), qt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null &&
|
|
534
|
+
if ((i.f & ($e | U)) === 0 && ir(i) && (xe = /* @__PURE__ */ new Set(), qt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Qo(i), xe?.size > 0)) {
|
|
535
535
|
Qe.clear();
|
|
536
536
|
for (const o of xe) {
|
|
537
537
|
if ((o.f & ($e | U)) !== 0) continue;
|
|
@@ -550,30 +550,30 @@ function qi(t) {
|
|
|
550
550
|
xe = null;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Co(t, e, r, i) {
|
|
554
554
|
if (!r.has(t) && (r.add(t), t.reactions !== null))
|
|
555
555
|
for (const o of t.reactions) {
|
|
556
556
|
const n = o.f;
|
|
557
|
-
(n &
|
|
557
|
+
(n & H) !== 0 ? Co(
|
|
558
558
|
/** @type {Derived} */
|
|
559
559
|
o,
|
|
560
560
|
e,
|
|
561
561
|
r,
|
|
562
562
|
i
|
|
563
|
-
) : (n & (
|
|
563
|
+
) : (n & (vi | Ze)) !== 0 && (n & B) === 0 && Ro(o, e, i) && (M(o, B), Ee(
|
|
564
564
|
/** @type {Effect} */
|
|
565
565
|
o
|
|
566
566
|
));
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Ro(t, e, r) {
|
|
570
570
|
const i = r.get(t);
|
|
571
571
|
if (i !== void 0) return i;
|
|
572
572
|
if (t.deps !== null)
|
|
573
573
|
for (const o of t.deps) {
|
|
574
574
|
if (Mt.call(e, o))
|
|
575
575
|
return !0;
|
|
576
|
-
if ((o.f &
|
|
576
|
+
if ((o.f & H) !== 0 && Ro(
|
|
577
577
|
/** @type {Derived} */
|
|
578
578
|
o,
|
|
579
579
|
e,
|
|
@@ -589,14 +589,14 @@ function Co(t, e, r) {
|
|
|
589
589
|
}
|
|
590
590
|
function Ee(t) {
|
|
591
591
|
var e = Ir = t, r = e.b;
|
|
592
|
-
if (r?.is_pending && (t.f & (
|
|
592
|
+
if (r?.is_pending && (t.f & (Bt | xt | hi)) !== 0 && (t.f & mt) === 0) {
|
|
593
593
|
r.defer_effect(t);
|
|
594
594
|
return;
|
|
595
595
|
}
|
|
596
596
|
for (; e.parent !== null; ) {
|
|
597
597
|
e = e.parent;
|
|
598
598
|
var i = e.f;
|
|
599
|
-
if (Vt !== null && e ===
|
|
599
|
+
if (Vt !== null && e === S && (t.f & xt) === 0)
|
|
600
600
|
return;
|
|
601
601
|
if ((i & (et | _e)) !== 0) {
|
|
602
602
|
if ((i & q) === 0)
|
|
@@ -606,29 +606,29 @@ function Ee(t) {
|
|
|
606
606
|
}
|
|
607
607
|
K.push(e);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function Lo(t, e) {
|
|
610
610
|
if (!((t.f & _e) !== 0 && (t.f & q) !== 0)) {
|
|
611
|
-
(t.f &
|
|
611
|
+
(t.f & B) !== 0 ? e.d.push(t) : (t.f & ye) !== 0 && e.m.push(t), M(t, q);
|
|
612
612
|
for (var r = t.first; r !== null; )
|
|
613
|
-
|
|
613
|
+
Lo(r, e), r = r.next;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function ps(t) {
|
|
617
617
|
let e = 0, r = ht(0), i;
|
|
618
618
|
return () => {
|
|
619
|
-
|
|
619
|
+
_i() && (v(r), wi(() => (e === 0 && (i = Ai(() => t(() => Jt(r)))), e += 1, () => {
|
|
620
620
|
ut(() => {
|
|
621
621
|
e -= 1, e === 0 && (i?.(), i = void 0, Jt(r));
|
|
622
622
|
});
|
|
623
623
|
})));
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
new
|
|
626
|
+
var hs = Nt | gt;
|
|
627
|
+
function vs(t, e, r, i) {
|
|
628
|
+
new ms(t, e, r, i);
|
|
629
629
|
}
|
|
630
|
-
var Z, Zt, Ie, lt, W,
|
|
631
|
-
class
|
|
630
|
+
var Z, Zt, Ie, lt, W, Se, ee, ve, Ne, at, We, Ct, Rt, Lt, De, br, P, Po, Mo, xo, Jr, cr, ur, Xr;
|
|
631
|
+
class ms {
|
|
632
632
|
/**
|
|
633
633
|
* @param {TemplateNode} node
|
|
634
634
|
* @param {BoundaryProps} props
|
|
@@ -657,7 +657,7 @@ class ps {
|
|
|
657
657
|
/** @type {Effect} */
|
|
658
658
|
k(this, W);
|
|
659
659
|
/** @type {Effect | null} */
|
|
660
|
-
k(this,
|
|
660
|
+
k(this, Se, null);
|
|
661
661
|
/** @type {Effect | null} */
|
|
662
662
|
k(this, ee, null);
|
|
663
663
|
/** @type {Effect | null} */
|
|
@@ -679,38 +679,38 @@ class ps {
|
|
|
679
679
|
* @type {Source<number> | null}
|
|
680
680
|
*/
|
|
681
681
|
k(this, De, null);
|
|
682
|
-
k(this, br,
|
|
682
|
+
k(this, br, ps(() => (_(this, De, ht(u(this, at))), () => {
|
|
683
683
|
_(this, De, null);
|
|
684
684
|
})));
|
|
685
685
|
_(this, Z, e), _(this, Ie, r), _(this, lt, (n) => {
|
|
686
686
|
var s = (
|
|
687
687
|
/** @type {Effect} */
|
|
688
|
-
|
|
688
|
+
S
|
|
689
689
|
);
|
|
690
690
|
s.b = this, s.f |= Ur, i(n);
|
|
691
691
|
}), this.parent = /** @type {Effect} */
|
|
692
|
-
|
|
692
|
+
S.b, this.transform_error = o ?? this.parent?.transform_error ?? ((n) => n), _(this, W, ki(() => {
|
|
693
693
|
if (E) {
|
|
694
694
|
const n = (
|
|
695
695
|
/** @type {Comment} */
|
|
696
696
|
u(this, Zt)
|
|
697
697
|
);
|
|
698
698
|
Tr();
|
|
699
|
-
const s = n.data ===
|
|
700
|
-
if (n.data.startsWith(
|
|
701
|
-
const a = JSON.parse(n.data.slice(
|
|
702
|
-
L(this, P,
|
|
703
|
-
} else s ? L(this, P,
|
|
699
|
+
const s = n.data === di;
|
|
700
|
+
if (n.data.startsWith(Vi)) {
|
|
701
|
+
const a = JSON.parse(n.data.slice(Vi.length));
|
|
702
|
+
L(this, P, Mo).call(this, a);
|
|
703
|
+
} else s ? L(this, P, xo).call(this) : L(this, P, Po).call(this);
|
|
704
704
|
} else
|
|
705
705
|
L(this, P, Jr).call(this);
|
|
706
|
-
},
|
|
706
|
+
}, hs)), E && _(this, Z, I);
|
|
707
707
|
}
|
|
708
708
|
/**
|
|
709
709
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
710
710
|
* @param {Effect} effect
|
|
711
711
|
*/
|
|
712
712
|
defer_effect(e) {
|
|
713
|
-
|
|
713
|
+
$o(e, u(this, Rt), u(this, Lt));
|
|
714
714
|
}
|
|
715
715
|
/**
|
|
716
716
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -745,20 +745,20 @@ class ps {
|
|
|
745
745
|
let i = u(this, Ie).failed;
|
|
746
746
|
if (!r && !i)
|
|
747
747
|
throw e;
|
|
748
|
-
u(this,
|
|
748
|
+
u(this, Se) && (G(u(this, Se)), _(this, Se, null)), u(this, ee) && (G(u(this, ee)), _(this, ee, null)), u(this, ve) && (G(u(this, ve)), _(this, ve, null)), E && (Q(
|
|
749
749
|
/** @type {TemplateNode} */
|
|
750
750
|
u(this, Zt)
|
|
751
|
-
),
|
|
751
|
+
), bo(), Q(gr()));
|
|
752
752
|
var o = !1, n = !1;
|
|
753
753
|
const s = () => {
|
|
754
754
|
if (o) {
|
|
755
|
-
|
|
755
|
+
ss();
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
o = !0, n &&
|
|
758
|
+
o = !0, n && ns(), u(this, ve) !== null && ft(u(this, ve), () => {
|
|
759
759
|
_(this, ve, null);
|
|
760
760
|
}), L(this, P, ur).call(this, () => {
|
|
761
|
-
|
|
761
|
+
Be.ensure(), L(this, P, Jr).call(this);
|
|
762
762
|
});
|
|
763
763
|
}, l = (a) => {
|
|
764
764
|
try {
|
|
@@ -767,12 +767,12 @@ class ps {
|
|
|
767
767
|
Ke(c, u(this, W) && u(this, W).parent);
|
|
768
768
|
}
|
|
769
769
|
i && _(this, ve, L(this, P, ur).call(this, () => {
|
|
770
|
-
|
|
770
|
+
Be.ensure();
|
|
771
771
|
try {
|
|
772
772
|
return ce(() => {
|
|
773
773
|
var c = (
|
|
774
774
|
/** @type {Effect} */
|
|
775
|
-
|
|
775
|
+
S
|
|
776
776
|
);
|
|
777
777
|
c.b = this, c.f |= Ur, i(
|
|
778
778
|
u(this, Z),
|
|
@@ -806,16 +806,16 @@ class ps {
|
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
Z = new WeakMap(), Zt = new WeakMap(), Ie = new WeakMap(), lt = new WeakMap(), W = new WeakMap(),
|
|
809
|
+
Z = new WeakMap(), Zt = new WeakMap(), Ie = new WeakMap(), lt = new WeakMap(), W = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), ve = new WeakMap(), Ne = new WeakMap(), at = new WeakMap(), We = new WeakMap(), Ct = new WeakMap(), Rt = new WeakMap(), Lt = new WeakMap(), De = new WeakMap(), br = new WeakMap(), P = new WeakSet(), Po = function() {
|
|
810
810
|
try {
|
|
811
|
-
_(this,
|
|
811
|
+
_(this, Se, ce(() => u(this, lt).call(this, u(this, Z))));
|
|
812
812
|
} catch (e) {
|
|
813
813
|
this.error(e);
|
|
814
814
|
}
|
|
815
815
|
}, /**
|
|
816
816
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
817
817
|
*/
|
|
818
|
-
|
|
818
|
+
Mo = function(e) {
|
|
819
819
|
const r = u(this, Ie).failed;
|
|
820
820
|
r && _(this, ve, ce(() => {
|
|
821
821
|
r(
|
|
@@ -825,11 +825,11 @@ Po = function(e) {
|
|
|
825
825
|
}
|
|
826
826
|
);
|
|
827
827
|
}));
|
|
828
|
-
},
|
|
828
|
+
}, xo = function() {
|
|
829
829
|
const e = u(this, Ie).pending;
|
|
830
830
|
e && (this.is_pending = !0, _(this, ee, ce(() => e(u(this, Z)))), ut(() => {
|
|
831
831
|
var r = _(this, Ne, document.createDocumentFragment()), i = fe();
|
|
832
|
-
r.append(i), _(this,
|
|
832
|
+
r.append(i), _(this, Se, L(this, P, ur).call(this, () => (Be.ensure(), ce(() => u(this, lt).call(this, i))))), u(this, We) === 0 && (u(this, Z).before(r), _(this, Ne, null), ft(
|
|
833
833
|
/** @type {Effect} */
|
|
834
834
|
u(this, ee),
|
|
835
835
|
() => {
|
|
@@ -839,11 +839,11 @@ Po = function(e) {
|
|
|
839
839
|
}));
|
|
840
840
|
}, Jr = function() {
|
|
841
841
|
try {
|
|
842
|
-
if (this.is_pending = this.has_pending_snippet(), _(this, We, 0), _(this, at, 0), _(this,
|
|
842
|
+
if (this.is_pending = this.has_pending_snippet(), _(this, We, 0), _(this, at, 0), _(this, Se, ce(() => {
|
|
843
843
|
u(this, lt).call(this, u(this, Z));
|
|
844
844
|
})), u(this, We) > 0) {
|
|
845
845
|
var e = _(this, Ne, document.createDocumentFragment());
|
|
846
|
-
|
|
846
|
+
Si(u(this, Se), e);
|
|
847
847
|
const r = (
|
|
848
848
|
/** @type {(anchor: Node) => void} */
|
|
849
849
|
u(this, Ie).pending
|
|
@@ -857,7 +857,7 @@ Po = function(e) {
|
|
|
857
857
|
}, cr = function() {
|
|
858
858
|
this.is_pending = !1;
|
|
859
859
|
for (const e of u(this, Rt))
|
|
860
|
-
M(e,
|
|
860
|
+
M(e, B), Ee(e);
|
|
861
861
|
for (const e of u(this, Lt))
|
|
862
862
|
M(e, ye), Ee(e);
|
|
863
863
|
u(this, Rt).clear(), u(this, Lt).clear();
|
|
@@ -866,7 +866,7 @@ Po = function(e) {
|
|
|
866
866
|
* @param {() => T} fn
|
|
867
867
|
*/
|
|
868
868
|
ur = function(e) {
|
|
869
|
-
var r =
|
|
869
|
+
var r = S, i = T, o = ie;
|
|
870
870
|
Oe(u(this, W)), pe(u(this, W)), Dt(u(this, W).ctx);
|
|
871
871
|
try {
|
|
872
872
|
return e();
|
|
@@ -890,8 +890,8 @@ Xr = function(e) {
|
|
|
890
890
|
_(this, ee, null);
|
|
891
891
|
}), u(this, Ne) && (u(this, Z).before(u(this, Ne)), _(this, Ne, null)));
|
|
892
892
|
};
|
|
893
|
-
function
|
|
894
|
-
const o =
|
|
893
|
+
function gs(t, e, r, i) {
|
|
894
|
+
const o = Sr;
|
|
895
895
|
var n = t.filter((d) => !d.settled);
|
|
896
896
|
if (r.length === 0 && n.length === 0) {
|
|
897
897
|
i(e.map(o));
|
|
@@ -899,14 +899,14 @@ function hs(t, e, r, i) {
|
|
|
899
899
|
}
|
|
900
900
|
var s = (
|
|
901
901
|
/** @type {Effect} */
|
|
902
|
-
|
|
903
|
-
), l =
|
|
902
|
+
S
|
|
903
|
+
), l = bs(), a = n.length === 1 ? n[0].promise : n.length > 1 ? Promise.all(n.map((d) => d.promise)) : null;
|
|
904
904
|
function c(d) {
|
|
905
905
|
l();
|
|
906
906
|
try {
|
|
907
907
|
i(d);
|
|
908
|
-
} catch (
|
|
909
|
-
(s.f & $e) === 0 && Ke(
|
|
908
|
+
} catch (m) {
|
|
909
|
+
(s.f & $e) === 0 && Ke(m, s);
|
|
910
910
|
}
|
|
911
911
|
Zr();
|
|
912
912
|
}
|
|
@@ -915,12 +915,12 @@ function hs(t, e, r, i) {
|
|
|
915
915
|
return;
|
|
916
916
|
}
|
|
917
917
|
function f() {
|
|
918
|
-
l(), Promise.all(r.map((d) => /* @__PURE__ */
|
|
918
|
+
l(), Promise.all(r.map((d) => /* @__PURE__ */ _s(d))).then((d) => c([...e.map(o), ...d])).catch((d) => Ke(d, s));
|
|
919
919
|
}
|
|
920
920
|
a ? a.then(f) : f();
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
var t =
|
|
922
|
+
function bs() {
|
|
923
|
+
var t = S, e = T, r = ie, i = R;
|
|
924
924
|
return function(n = !0) {
|
|
925
925
|
Oe(t), pe(e), Dt(r), n && i?.activate();
|
|
926
926
|
};
|
|
@@ -928,11 +928,11 @@ function vs() {
|
|
|
928
928
|
function Zr(t = !0) {
|
|
929
929
|
Oe(null), pe(null), Dt(null), t && R?.deactivate();
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function ys() {
|
|
932
932
|
var t = (
|
|
933
933
|
/** @type {Boundary} */
|
|
934
934
|
/** @type {Effect} */
|
|
935
|
-
|
|
935
|
+
S.b
|
|
936
936
|
), e = (
|
|
937
937
|
/** @type {Batch} */
|
|
938
938
|
R
|
|
@@ -942,16 +942,16 @@ function gs() {
|
|
|
942
942
|
};
|
|
943
943
|
}
|
|
944
944
|
// @__NO_SIDE_EFFECTS__
|
|
945
|
-
function
|
|
946
|
-
var e =
|
|
945
|
+
function Sr(t) {
|
|
946
|
+
var e = H | B, r = T !== null && (T.f & H) !== 0 ? (
|
|
947
947
|
/** @type {Derived} */
|
|
948
948
|
T
|
|
949
949
|
) : null;
|
|
950
|
-
return
|
|
950
|
+
return S !== null && (S.f |= gt), {
|
|
951
951
|
ctx: ie,
|
|
952
952
|
deps: null,
|
|
953
953
|
effects: null,
|
|
954
|
-
equals:
|
|
954
|
+
equals: _o,
|
|
955
955
|
f: e,
|
|
956
956
|
fn: t,
|
|
957
957
|
reactions: null,
|
|
@@ -961,14 +961,14 @@ function Ar(t) {
|
|
|
961
961
|
F
|
|
962
962
|
),
|
|
963
963
|
wv: 0,
|
|
964
|
-
parent: r ??
|
|
964
|
+
parent: r ?? S,
|
|
965
965
|
ac: null
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
// @__NO_SIDE_EFFECTS__
|
|
969
|
-
function
|
|
969
|
+
function _s(t, e, r) {
|
|
970
970
|
/** @type {Effect | null} */
|
|
971
|
-
|
|
971
|
+
S === null && Yn();
|
|
972
972
|
var o = (
|
|
973
973
|
/** @type {Promise<V>} */
|
|
974
974
|
/** @type {unknown} */
|
|
@@ -977,36 +977,36 @@ function ms(t, e, r) {
|
|
|
977
977
|
/** @type {V} */
|
|
978
978
|
F
|
|
979
979
|
), s = !T, l = /* @__PURE__ */ new Map();
|
|
980
|
-
return
|
|
980
|
+
return Ls(() => {
|
|
981
981
|
var a = go();
|
|
982
982
|
o = a.promise;
|
|
983
983
|
try {
|
|
984
984
|
Promise.resolve(t()).then(a.resolve, a.reject).finally(Zr);
|
|
985
|
-
} catch (
|
|
986
|
-
a.reject(
|
|
985
|
+
} catch (m) {
|
|
986
|
+
a.reject(m), Zr();
|
|
987
987
|
}
|
|
988
988
|
var c = (
|
|
989
989
|
/** @type {Batch} */
|
|
990
990
|
R
|
|
991
991
|
);
|
|
992
992
|
if (s) {
|
|
993
|
-
var f =
|
|
993
|
+
var f = ys();
|
|
994
994
|
l.get(c)?.reject(rt), l.delete(c), l.set(c, a);
|
|
995
995
|
}
|
|
996
|
-
const d = (
|
|
996
|
+
const d = (m, y = void 0) => {
|
|
997
997
|
if (c.activate(), y)
|
|
998
998
|
y !== rt && (n.f |= Ye, Ft(n, y));
|
|
999
999
|
else {
|
|
1000
|
-
(n.f & Ye) !== 0 && (n.f ^= Ye), Ft(n,
|
|
1001
|
-
for (const [p,
|
|
1000
|
+
(n.f & Ye) !== 0 && (n.f ^= Ye), Ft(n, m);
|
|
1001
|
+
for (const [p, A] of l) {
|
|
1002
1002
|
if (l.delete(p), p === c) break;
|
|
1003
|
-
|
|
1003
|
+
A.reject(rt);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
f && f();
|
|
1007
1007
|
};
|
|
1008
|
-
a.promise.then(d, (
|
|
1009
|
-
}),
|
|
1008
|
+
a.promise.then(d, (m) => d(null, m || "unknown"));
|
|
1009
|
+
}), Os(() => {
|
|
1010
1010
|
for (const a of l.values())
|
|
1011
1011
|
a.reject(rt);
|
|
1012
1012
|
}), new Promise((a) => {
|
|
@@ -1021,15 +1021,15 @@ function ms(t, e, r) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
// @__NO_SIDE_EFFECTS__
|
|
1023
1023
|
function Fr(t) {
|
|
1024
|
-
const e = /* @__PURE__ */
|
|
1025
|
-
return
|
|
1024
|
+
const e = /* @__PURE__ */ Sr(t);
|
|
1025
|
+
return Zo(e), e;
|
|
1026
1026
|
}
|
|
1027
1027
|
// @__NO_SIDE_EFFECTS__
|
|
1028
|
-
function
|
|
1029
|
-
const e = /* @__PURE__ */
|
|
1030
|
-
return e.equals =
|
|
1028
|
+
function ws(t) {
|
|
1029
|
+
const e = /* @__PURE__ */ Sr(t);
|
|
1030
|
+
return e.equals = wo, e;
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function ks(t) {
|
|
1033
1033
|
var e = t.effects;
|
|
1034
1034
|
if (e !== null) {
|
|
1035
1035
|
t.effects = null;
|
|
@@ -1040,9 +1040,9 @@ function ys(t) {
|
|
|
1040
1040
|
);
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function Ts(t) {
|
|
1044
1044
|
for (var e = t.parent; e !== null; ) {
|
|
1045
|
-
if ((e.f &
|
|
1045
|
+
if ((e.f & H) === 0)
|
|
1046
1046
|
return (e.f & $e) === 0 ? (
|
|
1047
1047
|
/** @type {Effect} */
|
|
1048
1048
|
e
|
|
@@ -1052,43 +1052,43 @@ function _s(t) {
|
|
|
1052
1052
|
return null;
|
|
1053
1053
|
}
|
|
1054
1054
|
function gi(t) {
|
|
1055
|
-
var e, r =
|
|
1056
|
-
Oe(
|
|
1055
|
+
var e, r = S;
|
|
1056
|
+
Oe(Ts(t));
|
|
1057
1057
|
try {
|
|
1058
|
-
t.f &= ~pt,
|
|
1058
|
+
t.f &= ~pt, ks(t), e = on(t);
|
|
1059
1059
|
} finally {
|
|
1060
1060
|
Oe(r);
|
|
1061
1061
|
}
|
|
1062
1062
|
return e;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function No(t) {
|
|
1065
1065
|
var e = gi(t);
|
|
1066
|
-
if (!t.equals(e) && (t.wv =
|
|
1066
|
+
if (!t.equals(e) && (t.wv = tn(), (!R?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1067
1067
|
M(t, q);
|
|
1068
1068
|
return;
|
|
1069
1069
|
}
|
|
1070
|
-
Xe || (
|
|
1070
|
+
Xe || (ge !== null ? (_i() || R?.is_fork) && ge.set(t, e) : mi(t));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function Is(t) {
|
|
1073
1073
|
if (t.effects !== null)
|
|
1074
1074
|
for (const e of t.effects)
|
|
1075
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(rt), e.teardown =
|
|
1075
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(rt), e.teardown = Bn, e.ac = null, Xt(e, 0), Ti(e));
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function Do(t) {
|
|
1078
1078
|
if (t.effects !== null)
|
|
1079
1079
|
for (const e of t.effects)
|
|
1080
1080
|
e.teardown && qt(e);
|
|
1081
1081
|
}
|
|
1082
1082
|
let ei = /* @__PURE__ */ new Set();
|
|
1083
1083
|
const Qe = /* @__PURE__ */ new Map();
|
|
1084
|
-
let
|
|
1084
|
+
let Vo = !1;
|
|
1085
1085
|
function ht(t, e) {
|
|
1086
1086
|
var r = {
|
|
1087
1087
|
f: 0,
|
|
1088
1088
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1089
1089
|
v: t,
|
|
1090
1090
|
reactions: null,
|
|
1091
|
-
equals:
|
|
1091
|
+
equals: _o,
|
|
1092
1092
|
rv: 0,
|
|
1093
1093
|
wv: 0
|
|
1094
1094
|
};
|
|
@@ -1097,17 +1097,17 @@ function ht(t, e) {
|
|
|
1097
1097
|
// @__NO_SIDE_EFFECTS__
|
|
1098
1098
|
function re(t, e) {
|
|
1099
1099
|
const r = ht(t);
|
|
1100
|
-
return
|
|
1100
|
+
return Zo(r), r;
|
|
1101
1101
|
}
|
|
1102
1102
|
// @__NO_SIDE_EFFECTS__
|
|
1103
|
-
function
|
|
1103
|
+
function Fo(t, e = !1, r = !0) {
|
|
1104
1104
|
const i = ht(t);
|
|
1105
|
-
return e || (i.equals =
|
|
1105
|
+
return e || (i.equals = wo), i;
|
|
1106
1106
|
}
|
|
1107
1107
|
function V(t, e, r = !1) {
|
|
1108
1108
|
T !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1109
1109
|
// to ensure we error if state is set inside an inspect effect
|
|
1110
|
-
(!be || (T.f &
|
|
1110
|
+
(!be || (T.f & qi) !== 0) && Io() && (T.f & (H | Ze | vi | qi)) !== 0 && (de === null || !Mt.call(de, t)) && os();
|
|
1111
1111
|
let i = r ? Kt(e) : e;
|
|
1112
1112
|
return Ft(t, i);
|
|
1113
1113
|
}
|
|
@@ -1115,20 +1115,20 @@ function Ft(t, e) {
|
|
|
1115
1115
|
if (!t.equals(e)) {
|
|
1116
1116
|
var r = t.v;
|
|
1117
1117
|
Xe ? Qe.set(t, e) : Qe.set(t, r), t.v = e;
|
|
1118
|
-
var i =
|
|
1119
|
-
if (i.capture(t, r), (t.f &
|
|
1118
|
+
var i = Be.ensure();
|
|
1119
|
+
if (i.capture(t, r), (t.f & H) !== 0) {
|
|
1120
1120
|
const o = (
|
|
1121
1121
|
/** @type {Derived} */
|
|
1122
1122
|
t
|
|
1123
1123
|
);
|
|
1124
|
-
(t.f &
|
|
1124
|
+
(t.f & B) !== 0 && gi(o), mi(o);
|
|
1125
1125
|
}
|
|
1126
|
-
t.wv =
|
|
1126
|
+
t.wv = tn(), qo(t, B), S !== null && (S.f & q) !== 0 && (S.f & (_e | et)) === 0 && (le === null ? xs([t]) : le.push(t)), !i.is_fork && ei.size > 0 && !Vo && Ss();
|
|
1127
1127
|
}
|
|
1128
1128
|
return e;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1130
|
+
function Ss() {
|
|
1131
|
+
Vo = !1;
|
|
1132
1132
|
for (const t of ei)
|
|
1133
1133
|
(t.f & q) !== 0 && M(t, ye), ir(t) && qt(t);
|
|
1134
1134
|
ei.clear();
|
|
@@ -1136,17 +1136,17 @@ function ks() {
|
|
|
1136
1136
|
function Jt(t) {
|
|
1137
1137
|
V(t, t.v + 1);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function qo(t, e) {
|
|
1140
1140
|
var r = t.reactions;
|
|
1141
1141
|
if (r !== null)
|
|
1142
1142
|
for (var i = r.length, o = 0; o < i; o++) {
|
|
1143
|
-
var n = r[o], s = n.f, l = (s &
|
|
1144
|
-
if (l && M(n, e), (s &
|
|
1143
|
+
var n = r[o], s = n.f, l = (s & B) === 0;
|
|
1144
|
+
if (l && M(n, e), (s & H) !== 0) {
|
|
1145
1145
|
var a = (
|
|
1146
1146
|
/** @type {Derived} */
|
|
1147
1147
|
n
|
|
1148
1148
|
);
|
|
1149
|
-
|
|
1149
|
+
ge?.delete(a), (s & pt) === 0 && (s & ue && (n.f |= pt), qo(a, ye));
|
|
1150
1150
|
} else l && ((s & Ze) !== 0 && xe !== null && xe.add(
|
|
1151
1151
|
/** @type {Effect} */
|
|
1152
1152
|
n
|
|
@@ -1159,16 +1159,16 @@ function Fo(t, e) {
|
|
|
1159
1159
|
function Kt(t) {
|
|
1160
1160
|
if (typeof t != "object" || t === null || ar in t)
|
|
1161
1161
|
return t;
|
|
1162
|
-
const e =
|
|
1163
|
-
if (e !==
|
|
1162
|
+
const e = mo(t);
|
|
1163
|
+
if (e !== Fn && e !== qn)
|
|
1164
1164
|
return t;
|
|
1165
|
-
var r = /* @__PURE__ */ new Map(), i =
|
|
1165
|
+
var r = /* @__PURE__ */ new Map(), i = vo(t), o = /* @__PURE__ */ re(0), n = dt, s = (l) => {
|
|
1166
1166
|
if (dt === n)
|
|
1167
1167
|
return l();
|
|
1168
1168
|
var a = T, c = dt;
|
|
1169
|
-
pe(null),
|
|
1169
|
+
pe(null), Ui(n);
|
|
1170
1170
|
var f = l();
|
|
1171
|
-
return pe(a),
|
|
1171
|
+
return pe(a), Ui(c), f;
|
|
1172
1172
|
};
|
|
1173
1173
|
return i && r.set("length", /* @__PURE__ */ re(
|
|
1174
1174
|
/** @type {any[]} */
|
|
@@ -1178,7 +1178,7 @@ function Kt(t) {
|
|
|
1178
1178
|
t,
|
|
1179
1179
|
{
|
|
1180
1180
|
defineProperty(l, a, c) {
|
|
1181
|
-
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) &&
|
|
1181
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && rs();
|
|
1182
1182
|
var f = r.get(a);
|
|
1183
1183
|
return f === void 0 ? s(() => {
|
|
1184
1184
|
var d = /* @__PURE__ */ re(c.value);
|
|
@@ -1204,8 +1204,8 @@ function Kt(t) {
|
|
|
1204
1204
|
var y = Kt(d ? l[a] : F), p = /* @__PURE__ */ re(y);
|
|
1205
1205
|
return p;
|
|
1206
1206
|
}), r.set(a, f)), f !== void 0) {
|
|
1207
|
-
var
|
|
1208
|
-
return
|
|
1207
|
+
var m = v(f);
|
|
1208
|
+
return m === F ? void 0 : m;
|
|
1209
1209
|
}
|
|
1210
1210
|
return Reflect.get(l, a, c);
|
|
1211
1211
|
},
|
|
@@ -1215,12 +1215,12 @@ function Kt(t) {
|
|
|
1215
1215
|
var f = r.get(a);
|
|
1216
1216
|
f && (c.value = v(f));
|
|
1217
1217
|
} else if (c === void 0) {
|
|
1218
|
-
var d = r.get(a),
|
|
1219
|
-
if (d !== void 0 &&
|
|
1218
|
+
var d = r.get(a), m = d?.v;
|
|
1219
|
+
if (d !== void 0 && m !== F)
|
|
1220
1220
|
return {
|
|
1221
1221
|
enumerable: !0,
|
|
1222
1222
|
configurable: !0,
|
|
1223
|
-
value:
|
|
1223
|
+
value: m,
|
|
1224
1224
|
writable: !0
|
|
1225
1225
|
};
|
|
1226
1226
|
}
|
|
@@ -1230,9 +1230,9 @@ function Kt(t) {
|
|
|
1230
1230
|
if (a === ar)
|
|
1231
1231
|
return !0;
|
|
1232
1232
|
var c = r.get(a), f = c !== void 0 && c.v !== F || Reflect.has(l, a);
|
|
1233
|
-
if (c !== void 0 ||
|
|
1233
|
+
if (c !== void 0 || S !== null && (!f || It(l, a)?.writable)) {
|
|
1234
1234
|
c === void 0 && (c = s(() => {
|
|
1235
|
-
var
|
|
1235
|
+
var m = f ? Kt(l[a]) : F, y = /* @__PURE__ */ re(m);
|
|
1236
1236
|
return y;
|
|
1237
1237
|
}), r.set(a, c));
|
|
1238
1238
|
var d = v(c);
|
|
@@ -1242,7 +1242,7 @@ function Kt(t) {
|
|
|
1242
1242
|
return f;
|
|
1243
1243
|
},
|
|
1244
1244
|
set(l, a, c, f) {
|
|
1245
|
-
var d = r.get(a),
|
|
1245
|
+
var d = r.get(a), m = a in l;
|
|
1246
1246
|
if (i && a === "length")
|
|
1247
1247
|
for (var y = c; y < /** @type {Source<number>} */
|
|
1248
1248
|
d.v; y += 1) {
|
|
@@ -1250,14 +1250,14 @@ function Kt(t) {
|
|
|
1250
1250
|
p !== void 0 ? V(p, F) : y in l && (p = s(() => /* @__PURE__ */ re(F)), r.set(y + "", p));
|
|
1251
1251
|
}
|
|
1252
1252
|
if (d === void 0)
|
|
1253
|
-
(!
|
|
1253
|
+
(!m || It(l, a)?.writable) && (d = s(() => /* @__PURE__ */ re(void 0)), V(d, Kt(c)), r.set(a, d));
|
|
1254
1254
|
else {
|
|
1255
|
-
|
|
1256
|
-
var
|
|
1257
|
-
V(d,
|
|
1255
|
+
m = d.v !== F;
|
|
1256
|
+
var A = s(() => Kt(c));
|
|
1257
|
+
V(d, A);
|
|
1258
1258
|
}
|
|
1259
1259
|
var $ = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1260
|
-
if ($?.set && $.set.call(f, c), !
|
|
1260
|
+
if ($?.set && $.set.call(f, c), !m) {
|
|
1261
1261
|
if (i && typeof a == "string") {
|
|
1262
1262
|
var O = (
|
|
1263
1263
|
/** @type {Source<number>} */
|
|
@@ -1272,25 +1272,25 @@ function Kt(t) {
|
|
|
1272
1272
|
ownKeys(l) {
|
|
1273
1273
|
v(o);
|
|
1274
1274
|
var a = Reflect.ownKeys(l).filter((d) => {
|
|
1275
|
-
var
|
|
1276
|
-
return
|
|
1275
|
+
var m = r.get(d);
|
|
1276
|
+
return m === void 0 || m.v !== F;
|
|
1277
1277
|
});
|
|
1278
1278
|
for (var [c, f] of r)
|
|
1279
1279
|
f.v !== F && !(c in l) && a.push(c);
|
|
1280
1280
|
return a;
|
|
1281
1281
|
},
|
|
1282
1282
|
setPrototypeOf() {
|
|
1283
|
-
|
|
1283
|
+
is();
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
);
|
|
1287
1287
|
}
|
|
1288
|
-
var Hi,
|
|
1288
|
+
var Hi, Bo, Ho, zo;
|
|
1289
1289
|
function ti() {
|
|
1290
1290
|
if (Hi === void 0) {
|
|
1291
|
-
Hi = window,
|
|
1291
|
+
Hi = window, Bo = /Firefox/.test(navigator.userAgent);
|
|
1292
1292
|
var t = Element.prototype, e = Node.prototype, r = Text.prototype;
|
|
1293
|
-
Ho = It(e, "firstChild").get,
|
|
1293
|
+
Ho = It(e, "firstChild").get, zo = It(e, "nextSibling").get, Fi(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Fi(r) && (r.__t = void 0);
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
function fe(t = "") {
|
|
@@ -1307,7 +1307,7 @@ function Je(t) {
|
|
|
1307
1307
|
function Ce(t) {
|
|
1308
1308
|
return (
|
|
1309
1309
|
/** @type {TemplateNode | null} */
|
|
1310
|
-
|
|
1310
|
+
zo.call(t)
|
|
1311
1311
|
);
|
|
1312
1312
|
}
|
|
1313
1313
|
function j(t, e) {
|
|
@@ -1320,12 +1320,12 @@ function j(t, e) {
|
|
|
1320
1320
|
var i = fe();
|
|
1321
1321
|
return r?.before(i), Q(i), i;
|
|
1322
1322
|
}
|
|
1323
|
-
return e &&
|
|
1323
|
+
return e && yi(
|
|
1324
1324
|
/** @type {Text} */
|
|
1325
1325
|
r
|
|
1326
1326
|
), Q(r), r;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function As(t, e = !1) {
|
|
1329
1329
|
if (!E) {
|
|
1330
1330
|
var r = /* @__PURE__ */ Je(t);
|
|
1331
1331
|
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Ce(r) : r;
|
|
@@ -1335,7 +1335,7 @@ function Ts(t, e = !1) {
|
|
|
1335
1335
|
var i = fe();
|
|
1336
1336
|
return I?.before(i), Q(i), i;
|
|
1337
1337
|
}
|
|
1338
|
-
|
|
1338
|
+
yi(
|
|
1339
1339
|
/** @type {Text} */
|
|
1340
1340
|
I
|
|
1341
1341
|
);
|
|
@@ -1354,26 +1354,26 @@ function Pe(t, e = 1, r = !1) {
|
|
|
1354
1354
|
var n = fe();
|
|
1355
1355
|
return i === null ? o?.after(n) : i.before(n), Q(n), n;
|
|
1356
1356
|
}
|
|
1357
|
-
|
|
1357
|
+
yi(
|
|
1358
1358
|
/** @type {Text} */
|
|
1359
1359
|
i
|
|
1360
1360
|
);
|
|
1361
1361
|
}
|
|
1362
1362
|
return Q(i), i;
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function jo(t) {
|
|
1365
1365
|
t.textContent = "";
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function Uo() {
|
|
1368
1368
|
return !1;
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function bi(t, e, r) {
|
|
1371
1371
|
return (
|
|
1372
1372
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1373
|
-
document.createElementNS(
|
|
1373
|
+
document.createElementNS(ho, t, void 0)
|
|
1374
1374
|
);
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function yi(t) {
|
|
1377
1377
|
if (
|
|
1378
1378
|
/** @type {string} */
|
|
1379
1379
|
t.nodeValue.length < 65536
|
|
@@ -1384,8 +1384,8 @@ function bi(t) {
|
|
|
1384
1384
|
e.remove(), t.nodeValue += /** @type {string} */
|
|
1385
1385
|
e.nodeValue, e = t.nextSibling;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
var e = T, r =
|
|
1387
|
+
function Go(t) {
|
|
1388
|
+
var e = T, r = S;
|
|
1389
1389
|
pe(null), Oe(null);
|
|
1390
1390
|
try {
|
|
1391
1391
|
return t();
|
|
@@ -1393,21 +1393,21 @@ function Uo(t) {
|
|
|
1393
1393
|
pe(e), Oe(r);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1396
|
+
function Es(t) {
|
|
1397
|
+
S === null && (T === null && Zn(), Xn()), Xe && Jn();
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function $s(t, e) {
|
|
1400
1400
|
var r = e.last;
|
|
1401
1401
|
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
1402
1402
|
}
|
|
1403
1403
|
function Re(t, e) {
|
|
1404
|
-
var r =
|
|
1404
|
+
var r = S;
|
|
1405
1405
|
r !== null && (r.f & U) !== 0 && (t |= U);
|
|
1406
1406
|
var i = {
|
|
1407
1407
|
ctx: ie,
|
|
1408
1408
|
deps: null,
|
|
1409
1409
|
nodes: null,
|
|
1410
|
-
f: t |
|
|
1410
|
+
f: t | B | ue,
|
|
1411
1411
|
first: null,
|
|
1412
1412
|
fn: e,
|
|
1413
1413
|
last: null,
|
|
@@ -1419,7 +1419,7 @@ function Re(t, e) {
|
|
|
1419
1419
|
wv: 0,
|
|
1420
1420
|
ac: null
|
|
1421
1421
|
}, o = i;
|
|
1422
|
-
if ((t &
|
|
1422
|
+
if ((t & Bt) !== 0)
|
|
1423
1423
|
Vt !== null ? Vt.push(i) : Ee(i);
|
|
1424
1424
|
else if (e !== null) {
|
|
1425
1425
|
try {
|
|
@@ -1428,9 +1428,9 @@ function Re(t, e) {
|
|
|
1428
1428
|
throw G(i), s;
|
|
1429
1429
|
}
|
|
1430
1430
|
o.deps === null && o.teardown === null && o.nodes === null && o.first === o.last && // either `null`, or a singular child
|
|
1431
|
-
(o.f &
|
|
1431
|
+
(o.f & gt) === 0 && (o = o.first, (t & Ze) !== 0 && (t & Nt) !== 0 && o !== null && (o.f |= Nt));
|
|
1432
1432
|
}
|
|
1433
|
-
if (o !== null && (o.parent = r, r !== null &&
|
|
1433
|
+
if (o !== null && (o.parent = r, r !== null && $s(o, r), T !== null && (T.f & H) !== 0 && (t & et) === 0)) {
|
|
1434
1434
|
var n = (
|
|
1435
1435
|
/** @type {Derived} */
|
|
1436
1436
|
T
|
|
@@ -1439,19 +1439,19 @@ function Re(t, e) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
return i;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function _i() {
|
|
1443
1443
|
return T !== null && !be;
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function Os(t) {
|
|
1446
1446
|
const e = Re(xt, null);
|
|
1447
1447
|
return M(e, q), e.teardown = t, e;
|
|
1448
1448
|
}
|
|
1449
1449
|
function kt(t) {
|
|
1450
|
-
|
|
1450
|
+
Es();
|
|
1451
1451
|
var e = (
|
|
1452
1452
|
/** @type {Effect} */
|
|
1453
|
-
|
|
1454
|
-
), r = !T && (e & _e) !== 0 && (e &
|
|
1453
|
+
S.f
|
|
1454
|
+
), r = !T && (e & _e) !== 0 && (e & mt) === 0;
|
|
1455
1455
|
if (r) {
|
|
1456
1456
|
var i = (
|
|
1457
1457
|
/** @type {ComponentContext} */
|
|
@@ -1459,72 +1459,72 @@ function kt(t) {
|
|
|
1459
1459
|
);
|
|
1460
1460
|
(i.e ?? (i.e = [])).push(t);
|
|
1461
1461
|
} else
|
|
1462
|
-
return
|
|
1462
|
+
return Wo(t);
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1465
|
-
return Re(
|
|
1464
|
+
function Wo(t) {
|
|
1465
|
+
return Re(Bt | jn, t);
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1468
|
-
|
|
1469
|
-
const e = Re(et |
|
|
1467
|
+
function Cs(t) {
|
|
1468
|
+
Be.ensure();
|
|
1469
|
+
const e = Re(et | gt, t);
|
|
1470
1470
|
return () => {
|
|
1471
1471
|
G(e);
|
|
1472
1472
|
};
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1475
|
-
|
|
1476
|
-
const e = Re(et |
|
|
1474
|
+
function Rs(t) {
|
|
1475
|
+
Be.ensure();
|
|
1476
|
+
const e = Re(et | gt, t);
|
|
1477
1477
|
return (r = {}) => new Promise((i) => {
|
|
1478
1478
|
r.outro ? ft(e, () => {
|
|
1479
1479
|
G(e), i(void 0);
|
|
1480
1480
|
}) : (G(e), i(void 0));
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return Re(
|
|
1483
|
+
function Ko(t) {
|
|
1484
|
+
return Re(Bt, t);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
return Re(
|
|
1486
|
+
function Ls(t) {
|
|
1487
|
+
return Re(vi | gt, t);
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function wi(t, e = 0) {
|
|
1490
1490
|
return Re(xt | e, t);
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1493
|
-
|
|
1492
|
+
function zi(t, e = [], r = [], i = []) {
|
|
1493
|
+
gs(i, e, r, (o) => {
|
|
1494
1494
|
Re(xt, () => t(...o.map(v)));
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function ki(t, e = 0) {
|
|
1498
1498
|
var r = Re(Ze | e, t);
|
|
1499
1499
|
return r;
|
|
1500
1500
|
}
|
|
1501
1501
|
function ce(t) {
|
|
1502
|
-
return Re(_e |
|
|
1502
|
+
return Re(_e | gt, t);
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function Yo(t) {
|
|
1505
1505
|
var e = t.teardown;
|
|
1506
1506
|
if (e !== null) {
|
|
1507
1507
|
const r = Xe, i = T;
|
|
1508
|
-
|
|
1508
|
+
ji(!0), pe(null);
|
|
1509
1509
|
try {
|
|
1510
1510
|
e.call(null);
|
|
1511
1511
|
} finally {
|
|
1512
|
-
|
|
1512
|
+
ji(r), pe(i);
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Ti(t, e = !1) {
|
|
1517
1517
|
var r = t.first;
|
|
1518
1518
|
for (t.first = t.last = null; r !== null; ) {
|
|
1519
1519
|
const o = r.ac;
|
|
1520
|
-
o !== null &&
|
|
1520
|
+
o !== null && Go(() => {
|
|
1521
1521
|
o.abort(rt);
|
|
1522
1522
|
});
|
|
1523
1523
|
var i = r.next;
|
|
1524
1524
|
(r.f & et) !== 0 ? r.parent = null : G(r, e), r = i;
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Ps(t) {
|
|
1528
1528
|
for (var e = t.first; e !== null; ) {
|
|
1529
1529
|
var r = e.next;
|
|
1530
1530
|
(e.f & _e) === 0 && G(e), e = r;
|
|
@@ -1532,32 +1532,32 @@ function Cs(t) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
function G(t, e = !0) {
|
|
1534
1534
|
var r = !1;
|
|
1535
|
-
(e || (t.f &
|
|
1535
|
+
(e || (t.f & zn) !== 0) && t.nodes !== null && t.nodes.end !== null && (Ms(
|
|
1536
1536
|
t.nodes.start,
|
|
1537
1537
|
/** @type {TemplateNode} */
|
|
1538
1538
|
t.nodes.end
|
|
1539
|
-
), r = !0),
|
|
1539
|
+
), r = !0), Ti(t, e && !r), Xt(t, 0), M(t, $e);
|
|
1540
1540
|
var i = t.nodes && t.nodes.t;
|
|
1541
1541
|
if (i !== null)
|
|
1542
1542
|
for (const n of i)
|
|
1543
1543
|
n.stop();
|
|
1544
|
-
|
|
1544
|
+
Yo(t);
|
|
1545
1545
|
var o = t.parent;
|
|
1546
|
-
o !== null && o.first !== null &&
|
|
1546
|
+
o !== null && o.first !== null && Qo(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function Ms(t, e) {
|
|
1549
1549
|
for (; t !== null; ) {
|
|
1550
1550
|
var r = t === e ? null : /* @__PURE__ */ Ce(t);
|
|
1551
1551
|
t.remove(), t = r;
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function Qo(t) {
|
|
1555
1555
|
var e = t.parent, r = t.prev, i = t.next;
|
|
1556
1556
|
r !== null && (r.next = i), i !== null && (i.prev = r), e !== null && (e.first === t && (e.first = i), e.last === t && (e.last = r));
|
|
1557
1557
|
}
|
|
1558
1558
|
function ft(t, e, r = !0) {
|
|
1559
1559
|
var i = [];
|
|
1560
|
-
|
|
1560
|
+
Jo(t, i, !0);
|
|
1561
1561
|
var o = () => {
|
|
1562
1562
|
r && G(t), e && e();
|
|
1563
1563
|
}, n = i.length;
|
|
@@ -1568,7 +1568,7 @@ function ft(t, e, r = !0) {
|
|
|
1568
1568
|
} else
|
|
1569
1569
|
o();
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Jo(t, e, r) {
|
|
1572
1572
|
if ((t.f & U) === 0) {
|
|
1573
1573
|
t.f ^= U;
|
|
1574
1574
|
var i = t.nodes && t.nodes.t;
|
|
@@ -1580,19 +1580,19 @@ function Qo(t, e, r) {
|
|
|
1580
1580
|
// it means the parent block effect was pruned. In that case,
|
|
1581
1581
|
// transparency information was transferred to the branch effect.
|
|
1582
1582
|
(o.f & _e) !== 0 && (t.f & Ze) !== 0;
|
|
1583
|
-
|
|
1583
|
+
Jo(o, e, s ? r : !1), o = n;
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1588
|
-
|
|
1587
|
+
function Ii(t) {
|
|
1588
|
+
Xo(t, !0);
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1590
|
+
function Xo(t, e) {
|
|
1591
1591
|
if ((t.f & U) !== 0) {
|
|
1592
1592
|
t.f ^= U;
|
|
1593
1593
|
for (var r = t.first; r !== null; ) {
|
|
1594
1594
|
var i = r.next, o = (r.f & Nt) !== 0 || (r.f & _e) !== 0;
|
|
1595
|
-
|
|
1595
|
+
Xo(r, o ? e : !1), r = i;
|
|
1596
1596
|
}
|
|
1597
1597
|
var n = t.nodes && t.nodes.t;
|
|
1598
1598
|
if (n !== null)
|
|
@@ -1600,7 +1600,7 @@ function Jo(t, e) {
|
|
|
1600
1600
|
(s.is_global || e) && s.in();
|
|
1601
1601
|
}
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function Si(t, e) {
|
|
1604
1604
|
if (t.nodes)
|
|
1605
1605
|
for (var r = t.nodes.start, i = t.nodes.end; r !== null; ) {
|
|
1606
1606
|
var o = r === i ? null : /* @__PURE__ */ Ce(r);
|
|
@@ -1608,37 +1608,37 @@ function Ii(t, e) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
let fr = !1, Xe = !1;
|
|
1611
|
-
function
|
|
1611
|
+
function ji(t) {
|
|
1612
1612
|
Xe = t;
|
|
1613
1613
|
}
|
|
1614
1614
|
let T = null, be = !1;
|
|
1615
1615
|
function pe(t) {
|
|
1616
1616
|
T = t;
|
|
1617
1617
|
}
|
|
1618
|
-
let
|
|
1618
|
+
let S = null;
|
|
1619
1619
|
function Oe(t) {
|
|
1620
|
-
|
|
1620
|
+
S = t;
|
|
1621
1621
|
}
|
|
1622
1622
|
let de = null;
|
|
1623
|
-
function
|
|
1623
|
+
function Zo(t) {
|
|
1624
1624
|
T !== null && (de === null ? de = [t] : de.push(t));
|
|
1625
1625
|
}
|
|
1626
1626
|
let Y = null, X = 0, le = null;
|
|
1627
|
-
function
|
|
1627
|
+
function xs(t) {
|
|
1628
1628
|
le = t;
|
|
1629
1629
|
}
|
|
1630
|
-
let
|
|
1631
|
-
function
|
|
1630
|
+
let en = 1, ot = 0, dt = ot;
|
|
1631
|
+
function Ui(t) {
|
|
1632
1632
|
dt = t;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1635
|
-
return ++
|
|
1634
|
+
function tn() {
|
|
1635
|
+
return ++en;
|
|
1636
1636
|
}
|
|
1637
1637
|
function ir(t) {
|
|
1638
1638
|
var e = t.f;
|
|
1639
|
-
if ((e &
|
|
1639
|
+
if ((e & B) !== 0)
|
|
1640
1640
|
return !0;
|
|
1641
|
-
if (e &
|
|
1641
|
+
if (e & H && (t.f &= ~pt), (e & ye) !== 0) {
|
|
1642
1642
|
for (var r = (
|
|
1643
1643
|
/** @type {Value[]} */
|
|
1644
1644
|
t.deps
|
|
@@ -1647,7 +1647,7 @@ function ir(t) {
|
|
|
1647
1647
|
if (ir(
|
|
1648
1648
|
/** @type {Derived} */
|
|
1649
1649
|
n
|
|
1650
|
-
) &&
|
|
1650
|
+
) && No(
|
|
1651
1651
|
/** @type {Derived} */
|
|
1652
1652
|
n
|
|
1653
1653
|
), n.wv > t.wv)
|
|
@@ -1655,31 +1655,31 @@ function ir(t) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
(e & ue) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1657
1657
|
// traversal of the graph in the other batches still happens
|
|
1658
|
-
|
|
1658
|
+
ge === null && M(t, q);
|
|
1659
1659
|
}
|
|
1660
1660
|
return !1;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function rn(t, e, r = !0) {
|
|
1663
1663
|
var i = t.reactions;
|
|
1664
1664
|
if (i !== null && !(de !== null && Mt.call(de, t)))
|
|
1665
1665
|
for (var o = 0; o < i.length; o++) {
|
|
1666
1666
|
var n = i[o];
|
|
1667
|
-
(n.f &
|
|
1667
|
+
(n.f & H) !== 0 ? rn(
|
|
1668
1668
|
/** @type {Derived} */
|
|
1669
1669
|
n,
|
|
1670
1670
|
e,
|
|
1671
1671
|
!1
|
|
1672
|
-
) : e === n && (r ? M(n,
|
|
1672
|
+
) : e === n && (r ? M(n, B) : (n.f & q) !== 0 && M(n, ye), Ee(
|
|
1673
1673
|
/** @type {Effect} */
|
|
1674
1674
|
n
|
|
1675
1675
|
));
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1679
|
-
var
|
|
1678
|
+
function on(t) {
|
|
1679
|
+
var A;
|
|
1680
1680
|
var e = Y, r = X, i = le, o = T, n = de, s = ie, l = be, a = dt, c = t.f;
|
|
1681
1681
|
Y = /** @type {null | Value[]} */
|
|
1682
|
-
null, X = 0, le = null, T = (c & (_e | et)) === 0 ? t : null, de = null, Dt(t.ctx), be = !1, dt = ++ot, t.ac !== null && (
|
|
1682
|
+
null, X = 0, le = null, T = (c & (_e | et)) === 0 ? t : null, de = null, Dt(t.ctx), be = !1, dt = ++ot, t.ac !== null && (Go(() => {
|
|
1683
1683
|
t.ac.abort(rt);
|
|
1684
1684
|
}), t.ac = null);
|
|
1685
1685
|
try {
|
|
@@ -1688,23 +1688,23 @@ function rn(t) {
|
|
|
1688
1688
|
/** @type {Function} */
|
|
1689
1689
|
t.fn
|
|
1690
1690
|
), d = f();
|
|
1691
|
-
t.f |=
|
|
1692
|
-
var
|
|
1691
|
+
t.f |= mt;
|
|
1692
|
+
var m = t.deps, y = R?.is_fork;
|
|
1693
1693
|
if (Y !== null) {
|
|
1694
1694
|
var p;
|
|
1695
|
-
if (y || Xt(t, X),
|
|
1696
|
-
for (
|
|
1697
|
-
|
|
1695
|
+
if (y || Xt(t, X), m !== null && X > 0)
|
|
1696
|
+
for (m.length = X + Y.length, p = 0; p < Y.length; p++)
|
|
1697
|
+
m[X + p] = Y[p];
|
|
1698
1698
|
else
|
|
1699
|
-
t.deps =
|
|
1700
|
-
if (
|
|
1701
|
-
for (p = X; p <
|
|
1702
|
-
((
|
|
1703
|
-
} else !y &&
|
|
1704
|
-
if (
|
|
1699
|
+
t.deps = m = Y;
|
|
1700
|
+
if (_i() && (t.f & ue) !== 0)
|
|
1701
|
+
for (p = X; p < m.length; p++)
|
|
1702
|
+
((A = m[p]).reactions ?? (A.reactions = [])).push(t);
|
|
1703
|
+
} else !y && m !== null && X < m.length && (Xt(t, X), m.length = X);
|
|
1704
|
+
if (Io() && le !== null && !be && m !== null && (t.f & (H | ye | B)) === 0)
|
|
1705
1705
|
for (p = 0; p < /** @type {Source[]} */
|
|
1706
1706
|
le.length; p++)
|
|
1707
|
-
|
|
1707
|
+
rn(
|
|
1708
1708
|
le[p],
|
|
1709
1709
|
/** @type {Effect} */
|
|
1710
1710
|
t
|
|
@@ -1726,16 +1726,16 @@ function rn(t) {
|
|
|
1726
1726
|
t.f ^= Gr, Y = e, X = r, le = i, T = o, de = n, Dt(s), be = l, dt = a;
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function Ns(t, e) {
|
|
1730
1730
|
let r = e.reactions;
|
|
1731
1731
|
if (r !== null) {
|
|
1732
|
-
var i =
|
|
1732
|
+
var i = Dn.call(r, t);
|
|
1733
1733
|
if (i !== -1) {
|
|
1734
1734
|
var o = r.length - 1;
|
|
1735
1735
|
o === 0 ? r = e.reactions = null : (r[i] = r[o], r.pop());
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
-
if (r === null && (e.f &
|
|
1738
|
+
if (r === null && (e.f & H) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1739
1739
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1740
1740
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1741
1741
|
(Y === null || !Mt.call(Y, e))) {
|
|
@@ -1743,36 +1743,36 @@ function Ps(t, e) {
|
|
|
1743
1743
|
/** @type {Derived} */
|
|
1744
1744
|
e
|
|
1745
1745
|
);
|
|
1746
|
-
(n.f & ue) !== 0 && (n.f ^= ue, n.f &= ~pt),
|
|
1746
|
+
(n.f & ue) !== 0 && (n.f ^= ue, n.f &= ~pt), mi(n), Is(n), Xt(n, 0);
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
1749
|
function Xt(t, e) {
|
|
1750
1750
|
var r = t.deps;
|
|
1751
1751
|
if (r !== null)
|
|
1752
1752
|
for (var i = e; i < r.length; i++)
|
|
1753
|
-
|
|
1753
|
+
Ns(t, r[i]);
|
|
1754
1754
|
}
|
|
1755
1755
|
function qt(t) {
|
|
1756
1756
|
var e = t.f;
|
|
1757
1757
|
if ((e & $e) === 0) {
|
|
1758
1758
|
M(t, q);
|
|
1759
|
-
var r =
|
|
1760
|
-
|
|
1759
|
+
var r = S, i = fr;
|
|
1760
|
+
S = t, fr = !0;
|
|
1761
1761
|
try {
|
|
1762
|
-
(e & (Ze |
|
|
1763
|
-
var o =
|
|
1764
|
-
t.teardown = typeof o == "function" ? o : null, t.wv =
|
|
1762
|
+
(e & (Ze | hi)) !== 0 ? Ps(t) : Ti(t), Yo(t);
|
|
1763
|
+
var o = on(t);
|
|
1764
|
+
t.teardown = typeof o == "function" ? o : null, t.wv = en;
|
|
1765
1765
|
var n;
|
|
1766
|
-
jr &&
|
|
1766
|
+
jr && as && (t.f & B) !== 0 && t.deps;
|
|
1767
1767
|
} finally {
|
|
1768
|
-
fr = i,
|
|
1768
|
+
fr = i, S = r;
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
1772
1772
|
function v(t) {
|
|
1773
|
-
var e = t.f, r = (e &
|
|
1773
|
+
var e = t.f, r = (e & H) !== 0;
|
|
1774
1774
|
if (T !== null && !be) {
|
|
1775
|
-
var i =
|
|
1775
|
+
var i = S !== null && (S.f & $e) !== 0;
|
|
1776
1776
|
if (!i && (de === null || !Mt.call(de, t))) {
|
|
1777
1777
|
var o = T.deps;
|
|
1778
1778
|
if ((T.f & Gr) !== 0)
|
|
@@ -1793,33 +1793,33 @@ function v(t) {
|
|
|
1793
1793
|
);
|
|
1794
1794
|
if (Xe) {
|
|
1795
1795
|
var l = s.v;
|
|
1796
|
-
return ((s.f & q) === 0 && s.reactions !== null ||
|
|
1796
|
+
return ((s.f & q) === 0 && s.reactions !== null || sn(s)) && (l = gi(s)), Qe.set(s, l), l;
|
|
1797
1797
|
}
|
|
1798
|
-
var a = (s.f & ue) === 0 && !be && T !== null && (fr || (T.f & ue) !== 0), c = (s.f &
|
|
1799
|
-
ir(s) && (a && (s.f |= ue),
|
|
1798
|
+
var a = (s.f & ue) === 0 && !be && T !== null && (fr || (T.f & ue) !== 0), c = (s.f & mt) === 0;
|
|
1799
|
+
ir(s) && (a && (s.f |= ue), No(s)), a && !c && (Do(s), nn(s));
|
|
1800
1800
|
}
|
|
1801
|
-
if (
|
|
1802
|
-
return
|
|
1801
|
+
if (ge?.has(t))
|
|
1802
|
+
return ge.get(t);
|
|
1803
1803
|
if ((t.f & Ye) !== 0)
|
|
1804
1804
|
throw t.v;
|
|
1805
1805
|
return t.v;
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function nn(t) {
|
|
1808
1808
|
if (t.f |= ue, t.deps !== null)
|
|
1809
1809
|
for (const e of t.deps)
|
|
1810
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f &
|
|
1810
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & H) !== 0 && (e.f & ue) === 0 && (Do(
|
|
1811
1811
|
/** @type {Derived} */
|
|
1812
1812
|
e
|
|
1813
|
-
),
|
|
1813
|
+
), nn(
|
|
1814
1814
|
/** @type {Derived} */
|
|
1815
1815
|
e
|
|
1816
1816
|
));
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1818
|
+
function sn(t) {
|
|
1819
1819
|
if (t.v === F) return !0;
|
|
1820
1820
|
if (t.deps === null) return !1;
|
|
1821
1821
|
for (const e of t.deps)
|
|
1822
|
-
if (Qe.has(e) || (e.f &
|
|
1822
|
+
if (Qe.has(e) || (e.f & H) !== 0 && sn(
|
|
1823
1823
|
/** @type {Derived} */
|
|
1824
1824
|
e
|
|
1825
1825
|
))
|
|
@@ -1834,18 +1834,18 @@ function Ai(t) {
|
|
|
1834
1834
|
be = e;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
const nt = /* @__PURE__ */ Symbol("events"),
|
|
1837
|
+
const nt = /* @__PURE__ */ Symbol("events"), ln = /* @__PURE__ */ new Set(), ri = /* @__PURE__ */ new Set();
|
|
1838
1838
|
function qr(t, e, r) {
|
|
1839
1839
|
(e[nt] ?? (e[nt] = {}))[t] = r;
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Ds(t) {
|
|
1842
1842
|
for (var e = 0; e < t.length; e++)
|
|
1843
|
-
|
|
1843
|
+
ln.add(t[e]);
|
|
1844
1844
|
for (var r of ri)
|
|
1845
1845
|
r(t);
|
|
1846
1846
|
}
|
|
1847
|
-
let
|
|
1848
|
-
function
|
|
1847
|
+
let Gi = null;
|
|
1848
|
+
function Wi(t) {
|
|
1849
1849
|
var e = this, r = (
|
|
1850
1850
|
/** @type {Node} */
|
|
1851
1851
|
e.ownerDocument
|
|
@@ -1853,8 +1853,8 @@ function Gi(t) {
|
|
|
1853
1853
|
/** @type {null | Element} */
|
|
1854
1854
|
o[0] || t.target
|
|
1855
1855
|
);
|
|
1856
|
-
|
|
1857
|
-
var s = 0, l =
|
|
1856
|
+
Gi = t;
|
|
1857
|
+
var s = 0, l = Gi === t && t[nt];
|
|
1858
1858
|
if (l) {
|
|
1859
1859
|
var a = o.indexOf(l);
|
|
1860
1860
|
if (a !== -1 && (e === document || e === /** @type {any} */
|
|
@@ -1869,84 +1869,84 @@ function Gi(t) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
if (n = /** @type {Element} */
|
|
1871
1871
|
o[s] || t.target, n !== e) {
|
|
1872
|
-
|
|
1872
|
+
mr(t, "currentTarget", {
|
|
1873
1873
|
configurable: !0,
|
|
1874
1874
|
get() {
|
|
1875
1875
|
return n || r;
|
|
1876
1876
|
}
|
|
1877
1877
|
});
|
|
1878
|
-
var f = T, d =
|
|
1878
|
+
var f = T, d = S;
|
|
1879
1879
|
pe(null), Oe(null);
|
|
1880
1880
|
try {
|
|
1881
|
-
for (var
|
|
1881
|
+
for (var m, y = []; n !== null; ) {
|
|
1882
1882
|
var p = n.assignedSlot || n.parentNode || /** @type {any} */
|
|
1883
1883
|
n.host || null;
|
|
1884
1884
|
try {
|
|
1885
|
-
var
|
|
1886
|
-
|
|
1885
|
+
var A = n[nt]?.[i];
|
|
1886
|
+
A != null && (!/** @type {any} */
|
|
1887
1887
|
n.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1888
1888
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1889
|
-
t.target === n) &&
|
|
1889
|
+
t.target === n) && A.call(n, t);
|
|
1890
1890
|
} catch ($) {
|
|
1891
|
-
|
|
1891
|
+
m ? y.push($) : m = $;
|
|
1892
1892
|
}
|
|
1893
1893
|
if (t.cancelBubble || p === e || p === null)
|
|
1894
1894
|
break;
|
|
1895
1895
|
n = p;
|
|
1896
1896
|
}
|
|
1897
|
-
if (
|
|
1897
|
+
if (m) {
|
|
1898
1898
|
for (let $ of y)
|
|
1899
1899
|
queueMicrotask(() => {
|
|
1900
1900
|
throw $;
|
|
1901
1901
|
});
|
|
1902
|
-
throw
|
|
1902
|
+
throw m;
|
|
1903
1903
|
}
|
|
1904
1904
|
} finally {
|
|
1905
1905
|
t[nt] = e, delete t.currentTarget, pe(f), Oe(d);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const Vs = (
|
|
1910
1910
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1911
1911
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1912
1912
|
/** @param {string} html */
|
|
1913
1913
|
createHTML: (t) => t
|
|
1914
1914
|
})
|
|
1915
1915
|
);
|
|
1916
|
-
function
|
|
1916
|
+
function Fs(t) {
|
|
1917
1917
|
return (
|
|
1918
1918
|
/** @type {string} */
|
|
1919
|
-
|
|
1919
|
+
Vs?.createHTML(t) ?? t
|
|
1920
1920
|
);
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
var e =
|
|
1924
|
-
return e.innerHTML =
|
|
1922
|
+
function an(t) {
|
|
1923
|
+
var e = bi("template");
|
|
1924
|
+
return e.innerHTML = Fs(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1925
1925
|
}
|
|
1926
1926
|
function vt(t, e) {
|
|
1927
1927
|
var r = (
|
|
1928
1928
|
/** @type {Effect} */
|
|
1929
|
-
|
|
1929
|
+
S
|
|
1930
1930
|
);
|
|
1931
1931
|
r.nodes === null && (r.nodes = { start: t, end: e, a: null, t: null });
|
|
1932
1932
|
}
|
|
1933
1933
|
// @__NO_SIDE_EFFECTS__
|
|
1934
|
-
function
|
|
1935
|
-
var r = (e &
|
|
1934
|
+
function Ei(t, e) {
|
|
1935
|
+
var r = (e & Nn) !== 0, i, o = !t.startsWith("<!>");
|
|
1936
1936
|
return () => {
|
|
1937
1937
|
if (E)
|
|
1938
1938
|
return vt(I, null), I;
|
|
1939
|
-
i === void 0 && (i =
|
|
1939
|
+
i === void 0 && (i = an(o ? t : "<!>" + t), i = /** @type {TemplateNode} */
|
|
1940
1940
|
/* @__PURE__ */ Je(i));
|
|
1941
1941
|
var n = (
|
|
1942
1942
|
/** @type {TemplateNode} */
|
|
1943
|
-
r ||
|
|
1943
|
+
r || Bo ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1944
1944
|
);
|
|
1945
1945
|
return vt(n, n), n;
|
|
1946
1946
|
};
|
|
1947
1947
|
}
|
|
1948
1948
|
// @__NO_SIDE_EFFECTS__
|
|
1949
|
-
function
|
|
1949
|
+
function qs(t, e, r = "svg") {
|
|
1950
1950
|
var i = !t.startsWith("<!>"), o = `<${r}>${i ? t : "<!>" + t}</${r}>`, n;
|
|
1951
1951
|
return () => {
|
|
1952
1952
|
if (E)
|
|
@@ -1954,7 +1954,7 @@ function Ds(t, e, r = "svg") {
|
|
|
1954
1954
|
if (!n) {
|
|
1955
1955
|
var s = (
|
|
1956
1956
|
/** @type {DocumentFragment} */
|
|
1957
|
-
|
|
1957
|
+
an(o)
|
|
1958
1958
|
), l = (
|
|
1959
1959
|
/** @type {Element} */
|
|
1960
1960
|
/* @__PURE__ */ Je(s)
|
|
@@ -1970,10 +1970,10 @@ function Ds(t, e, r = "svg") {
|
|
|
1970
1970
|
};
|
|
1971
1971
|
}
|
|
1972
1972
|
// @__NO_SIDE_EFFECTS__
|
|
1973
|
-
function
|
|
1974
|
-
return /* @__PURE__ */
|
|
1973
|
+
function Bs(t, e) {
|
|
1974
|
+
return /* @__PURE__ */ qs(t, e, "svg");
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function Hs() {
|
|
1977
1977
|
if (E)
|
|
1978
1978
|
return vt(I, null), I;
|
|
1979
1979
|
var t = document.createDocumentFragment(), e = document.createComment(""), r = fe();
|
|
@@ -1983,9 +1983,9 @@ function Tt(t, e) {
|
|
|
1983
1983
|
if (E) {
|
|
1984
1984
|
var r = (
|
|
1985
1985
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1986
|
-
|
|
1986
|
+
S
|
|
1987
1987
|
);
|
|
1988
|
-
((r.f &
|
|
1988
|
+
((r.f & mt) === 0 || r.nodes.end === null) && (r.nodes.end = I), Tr();
|
|
1989
1989
|
return;
|
|
1990
1990
|
}
|
|
1991
1991
|
t !== null && t.before(
|
|
@@ -1993,23 +1993,23 @@ function Tt(t, e) {
|
|
|
1993
1993
|
e
|
|
1994
1994
|
);
|
|
1995
1995
|
}
|
|
1996
|
-
const
|
|
1997
|
-
function
|
|
1998
|
-
return
|
|
1996
|
+
const zs = ["touchstart", "touchmove"];
|
|
1997
|
+
function js(t) {
|
|
1998
|
+
return zs.includes(t);
|
|
1999
1999
|
}
|
|
2000
2000
|
function nr(t, e) {
|
|
2001
2001
|
var r = e == null ? "" : typeof e == "object" ? `${e}` : e;
|
|
2002
2002
|
r !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = r, t.nodeValue = `${r}`);
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2005
|
-
return
|
|
2004
|
+
function cn(t, e) {
|
|
2005
|
+
return un(t, e);
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2007
|
+
function Us(t, e) {
|
|
2008
2008
|
ti(), e.intro = e.intro ?? !1;
|
|
2009
2009
|
const r = e.target, i = E, o = I;
|
|
2010
2010
|
try {
|
|
2011
2011
|
for (var n = /* @__PURE__ */ Je(r); n && (n.nodeType !== rr || /** @type {Comment} */
|
|
2012
|
-
n.data !==
|
|
2012
|
+
n.data !== po); )
|
|
2013
2013
|
n = /* @__PURE__ */ Ce(n);
|
|
2014
2014
|
if (!n)
|
|
2015
2015
|
throw Pt;
|
|
@@ -2017,24 +2017,24 @@ function Bs(t, e) {
|
|
|
2017
2017
|
/** @type {Comment} */
|
|
2018
2018
|
n
|
|
2019
2019
|
);
|
|
2020
|
-
const s =
|
|
2020
|
+
const s = un(t, { ...e, anchor: n });
|
|
2021
2021
|
return qe(!1), /** @type {Exports} */
|
|
2022
2022
|
s;
|
|
2023
2023
|
} catch (s) {
|
|
2024
2024
|
if (s instanceof Error && s.message.split(`
|
|
2025
2025
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
2026
2026
|
throw s;
|
|
2027
|
-
return s !== Pt && console.warn("Failed to hydrate: ", s), e.recover === !1 &&
|
|
2027
|
+
return s !== Pt && console.warn("Failed to hydrate: ", s), e.recover === !1 && ts(), ti(), jo(r), qe(!1), cn(t, e);
|
|
2028
2028
|
} finally {
|
|
2029
2029
|
qe(i), Q(o);
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
2032
|
const sr = /* @__PURE__ */ new Map();
|
|
2033
|
-
function
|
|
2033
|
+
function un(t, { target: e, anchor: r, props: i = {}, events: o, context: n, intro: s = !0, transformError: l }) {
|
|
2034
2034
|
ti();
|
|
2035
|
-
var a = void 0, c =
|
|
2035
|
+
var a = void 0, c = Rs(() => {
|
|
2036
2036
|
var f = r ?? e.appendChild(fe());
|
|
2037
|
-
|
|
2037
|
+
vs(
|
|
2038
2038
|
/** @type {TemplateNode} */
|
|
2039
2039
|
f,
|
|
2040
2040
|
{
|
|
@@ -2042,7 +2042,7 @@ function cn(t, { target: e, anchor: r, props: i = {}, events: o, context: n, int
|
|
|
2042
2042
|
}
|
|
2043
2043
|
},
|
|
2044
2044
|
(y) => {
|
|
2045
|
-
|
|
2045
|
+
ko({});
|
|
2046
2046
|
var p = (
|
|
2047
2047
|
/** @type {ComponentContext} */
|
|
2048
2048
|
ie
|
|
@@ -2051,52 +2051,52 @@ function cn(t, { target: e, anchor: r, props: i = {}, events: o, context: n, int
|
|
|
2051
2051
|
/** @type {TemplateNode} */
|
|
2052
2052
|
y,
|
|
2053
2053
|
null
|
|
2054
|
-
), a = t(y, i) || {}, E && (
|
|
2055
|
-
I.data !==
|
|
2054
|
+
), a = t(y, i) || {}, E && (S.nodes.end = I, I === null || I.nodeType !== rr || /** @type {Comment} */
|
|
2055
|
+
I.data !== pi))
|
|
2056
2056
|
throw kr(), Pt;
|
|
2057
|
-
|
|
2057
|
+
To();
|
|
2058
2058
|
},
|
|
2059
2059
|
l
|
|
2060
2060
|
);
|
|
2061
|
-
var d = /* @__PURE__ */ new Set(),
|
|
2061
|
+
var d = /* @__PURE__ */ new Set(), m = (y) => {
|
|
2062
2062
|
for (var p = 0; p < y.length; p++) {
|
|
2063
|
-
var
|
|
2064
|
-
if (!d.has(
|
|
2065
|
-
d.add(
|
|
2066
|
-
var $ =
|
|
2063
|
+
var A = y[p];
|
|
2064
|
+
if (!d.has(A)) {
|
|
2065
|
+
d.add(A);
|
|
2066
|
+
var $ = js(A);
|
|
2067
2067
|
for (const x of [e, document]) {
|
|
2068
2068
|
var O = sr.get(x);
|
|
2069
2069
|
O === void 0 && (O = /* @__PURE__ */ new Map(), sr.set(x, O));
|
|
2070
|
-
var w = O.get(
|
|
2071
|
-
w === void 0 ? (x.addEventListener(
|
|
2070
|
+
var w = O.get(A);
|
|
2071
|
+
w === void 0 ? (x.addEventListener(A, Wi, { passive: $ }), O.set(A, 1)) : O.set(A, w + 1);
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
};
|
|
2076
|
-
return
|
|
2076
|
+
return m(_r(ln)), ri.add(m), () => {
|
|
2077
2077
|
for (var y of d)
|
|
2078
2078
|
for (const $ of [e, document]) {
|
|
2079
2079
|
var p = (
|
|
2080
2080
|
/** @type {Map<string, number>} */
|
|
2081
2081
|
sr.get($)
|
|
2082
|
-
),
|
|
2082
|
+
), A = (
|
|
2083
2083
|
/** @type {number} */
|
|
2084
2084
|
p.get(y)
|
|
2085
2085
|
);
|
|
2086
|
-
--
|
|
2086
|
+
--A == 0 ? ($.removeEventListener(y, Wi), p.delete(y), p.size === 0 && sr.delete($)) : p.set(y, A);
|
|
2087
2087
|
}
|
|
2088
|
-
ri.delete(
|
|
2088
|
+
ri.delete(m), f !== r && f.parentNode?.removeChild(f);
|
|
2089
2089
|
};
|
|
2090
2090
|
});
|
|
2091
2091
|
return ii.set(a, c), a;
|
|
2092
2092
|
}
|
|
2093
2093
|
let ii = /* @__PURE__ */ new WeakMap();
|
|
2094
|
-
function
|
|
2094
|
+
function Gs(t, e) {
|
|
2095
2095
|
const r = ii.get(t);
|
|
2096
2096
|
return r ? (ii.delete(t), r(e)) : Promise.resolve();
|
|
2097
2097
|
}
|
|
2098
|
-
var
|
|
2099
|
-
class
|
|
2098
|
+
var me, Ae, te, ct, er, tr, yr;
|
|
2099
|
+
class Ws {
|
|
2100
2100
|
/**
|
|
2101
2101
|
* @param {TemplateNode} anchor
|
|
2102
2102
|
* @param {boolean} transition
|
|
@@ -2105,7 +2105,7 @@ class js {
|
|
|
2105
2105
|
/** @type {TemplateNode} */
|
|
2106
2106
|
h(this, "anchor");
|
|
2107
2107
|
/** @type {Map<Batch, Key>} */
|
|
2108
|
-
k(this,
|
|
2108
|
+
k(this, me, /* @__PURE__ */ new Map());
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
2111
2111
|
* These effects are visible and actively part of the document tree.
|
|
@@ -2120,7 +2120,7 @@ class js {
|
|
|
2120
2120
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
2121
2121
|
* @type {Map<Key, Effect>}
|
|
2122
2122
|
*/
|
|
2123
|
-
k(this,
|
|
2123
|
+
k(this, Ae, /* @__PURE__ */ new Map());
|
|
2124
2124
|
/**
|
|
2125
2125
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
2126
2126
|
* in the DOM, because their insertion is deferred.
|
|
@@ -2141,32 +2141,32 @@ class js {
|
|
|
2141
2141
|
* @param {Batch} batch
|
|
2142
2142
|
*/
|
|
2143
2143
|
k(this, tr, (e) => {
|
|
2144
|
-
if (u(this,
|
|
2144
|
+
if (u(this, me).has(e)) {
|
|
2145
2145
|
var r = (
|
|
2146
2146
|
/** @type {Key} */
|
|
2147
|
-
u(this,
|
|
2148
|
-
), i = u(this,
|
|
2147
|
+
u(this, me).get(e)
|
|
2148
|
+
), i = u(this, Ae).get(r);
|
|
2149
2149
|
if (i)
|
|
2150
|
-
|
|
2150
|
+
Ii(i), u(this, ct).delete(r);
|
|
2151
2151
|
else {
|
|
2152
2152
|
var o = u(this, te).get(r);
|
|
2153
|
-
o && (o.effect.f & U) === 0 && (u(this,
|
|
2153
|
+
o && (o.effect.f & U) === 0 && (u(this, Ae).set(r, o.effect), u(this, te).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
2154
2154
|
}
|
|
2155
|
-
for (const [n, s] of u(this,
|
|
2156
|
-
if (u(this,
|
|
2155
|
+
for (const [n, s] of u(this, me)) {
|
|
2156
|
+
if (u(this, me).delete(n), n === e)
|
|
2157
2157
|
break;
|
|
2158
2158
|
const l = u(this, te).get(s);
|
|
2159
2159
|
l && (G(l.effect), u(this, te).delete(s));
|
|
2160
2160
|
}
|
|
2161
|
-
for (const [n, s] of u(this,
|
|
2161
|
+
for (const [n, s] of u(this, Ae)) {
|
|
2162
2162
|
if (n === r || u(this, ct).has(n) || (s.f & U) !== 0) continue;
|
|
2163
2163
|
const l = () => {
|
|
2164
|
-
if (Array.from(u(this,
|
|
2164
|
+
if (Array.from(u(this, me).values()).includes(n)) {
|
|
2165
2165
|
var c = document.createDocumentFragment();
|
|
2166
|
-
|
|
2166
|
+
Si(s, c), c.append(fe()), u(this, te).set(n, { effect: s, fragment: c });
|
|
2167
2167
|
} else
|
|
2168
2168
|
G(s);
|
|
2169
|
-
u(this, ct).delete(n), u(this,
|
|
2169
|
+
u(this, ct).delete(n), u(this, Ae).delete(n);
|
|
2170
2170
|
};
|
|
2171
2171
|
u(this, er) || !i ? (u(this, ct).add(n), ft(s, l, !1)) : l();
|
|
2172
2172
|
}
|
|
@@ -2176,8 +2176,8 @@ class js {
|
|
|
2176
2176
|
* @param {Batch} batch
|
|
2177
2177
|
*/
|
|
2178
2178
|
k(this, yr, (e) => {
|
|
2179
|
-
u(this,
|
|
2180
|
-
const r = Array.from(u(this,
|
|
2179
|
+
u(this, me).delete(e);
|
|
2180
|
+
const r = Array.from(u(this, me).values());
|
|
2181
2181
|
for (const [i, o] of u(this, te))
|
|
2182
2182
|
r.includes(i) || (G(o.effect), u(this, te).delete(i));
|
|
2183
2183
|
});
|
|
@@ -2192,8 +2192,8 @@ class js {
|
|
|
2192
2192
|
var i = (
|
|
2193
2193
|
/** @type {Batch} */
|
|
2194
2194
|
R
|
|
2195
|
-
), o =
|
|
2196
|
-
if (r && !u(this,
|
|
2195
|
+
), o = Uo();
|
|
2196
|
+
if (r && !u(this, Ae).has(e) && !u(this, te).has(e))
|
|
2197
2197
|
if (o) {
|
|
2198
2198
|
var n = document.createDocumentFragment(), s = fe();
|
|
2199
2199
|
n.append(s), u(this, te).set(e, {
|
|
@@ -2201,12 +2201,12 @@ class js {
|
|
|
2201
2201
|
fragment: n
|
|
2202
2202
|
});
|
|
2203
2203
|
} else
|
|
2204
|
-
u(this,
|
|
2204
|
+
u(this, Ae).set(
|
|
2205
2205
|
e,
|
|
2206
2206
|
ce(() => r(this.anchor))
|
|
2207
2207
|
);
|
|
2208
|
-
if (u(this,
|
|
2209
|
-
for (const [l, a] of u(this,
|
|
2208
|
+
if (u(this, me).set(i, e), o) {
|
|
2209
|
+
for (const [l, a] of u(this, Ae))
|
|
2210
2210
|
l === e ? i.unskip_effect(a) : i.skip_effect(a);
|
|
2211
2211
|
for (const [l, a] of u(this, te))
|
|
2212
2212
|
l === e ? i.unskip_effect(a.effect) : i.skip_effect(a.effect);
|
|
@@ -2215,9 +2215,9 @@ class js {
|
|
|
2215
2215
|
E && (this.anchor = I), u(this, tr).call(this, i);
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
|
|
2219
|
-
function
|
|
2220
|
-
ie === null &&
|
|
2218
|
+
me = new WeakMap(), Ae = new WeakMap(), te = new WeakMap(), ct = new WeakMap(), er = new WeakMap(), tr = new WeakMap(), yr = new WeakMap();
|
|
2219
|
+
function Ks(t) {
|
|
2220
|
+
ie === null && Kn(), kt(() => {
|
|
2221
2221
|
const e = Ai(t);
|
|
2222
2222
|
if (typeof e == "function") return (
|
|
2223
2223
|
/** @type {() => void} */
|
|
@@ -2225,32 +2225,32 @@ function Us(t) {
|
|
|
2225
2225
|
);
|
|
2226
2226
|
});
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2228
|
+
function Br(t, e, r = !1) {
|
|
2229
2229
|
var i;
|
|
2230
2230
|
E && (i = I, Tr());
|
|
2231
|
-
var o = new
|
|
2231
|
+
var o = new Ws(t), n = r ? Nt : 0;
|
|
2232
2232
|
function s(l, a) {
|
|
2233
2233
|
if (E) {
|
|
2234
|
-
var c =
|
|
2234
|
+
var c = yo(
|
|
2235
2235
|
/** @type {TemplateNode} */
|
|
2236
2236
|
i
|
|
2237
2237
|
);
|
|
2238
2238
|
if (l !== parseInt(c.substring(1))) {
|
|
2239
|
-
var f =
|
|
2239
|
+
var f = gr();
|
|
2240
2240
|
Q(f), o.anchor = f, qe(!1), o.ensure(l, a), qe(!0);
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
2244
|
o.ensure(l, a);
|
|
2245
2245
|
}
|
|
2246
|
-
|
|
2246
|
+
ki(() => {
|
|
2247
2247
|
var l = !1;
|
|
2248
2248
|
e((a, c = 0) => {
|
|
2249
2249
|
l = !0, s(c, a);
|
|
2250
2250
|
}), l || s(-1, null);
|
|
2251
2251
|
}, n);
|
|
2252
2252
|
}
|
|
2253
|
-
function
|
|
2253
|
+
function Ys(t, e, r) {
|
|
2254
2254
|
for (var i = [], o = e.length, n, s = e.length, l = 0; l < o; l++) {
|
|
2255
2255
|
let d = e[l];
|
|
2256
2256
|
ft(
|
|
@@ -2258,11 +2258,11 @@ function Gs(t, e, r) {
|
|
|
2258
2258
|
() => {
|
|
2259
2259
|
if (n) {
|
|
2260
2260
|
if (n.pending.delete(d), n.done.add(d), n.pending.size === 0) {
|
|
2261
|
-
var
|
|
2261
|
+
var m = (
|
|
2262
2262
|
/** @type {Set<EachOutroGroup>} */
|
|
2263
2263
|
t.outrogroups
|
|
2264
2264
|
);
|
|
2265
|
-
oi(t, _r(n.done)),
|
|
2265
|
+
oi(t, _r(n.done)), m.delete(n), m.size === 0 && (t.outrogroups = null);
|
|
2266
2266
|
}
|
|
2267
2267
|
} else
|
|
2268
2268
|
s -= 1;
|
|
@@ -2280,7 +2280,7 @@ function Gs(t, e, r) {
|
|
|
2280
2280
|
/** @type {Element} */
|
|
2281
2281
|
c.parentNode
|
|
2282
2282
|
);
|
|
2283
|
-
|
|
2283
|
+
jo(f), f.append(c), t.items.clear();
|
|
2284
2284
|
}
|
|
2285
2285
|
oi(t, e, !a);
|
|
2286
2286
|
} else
|
|
@@ -2305,13 +2305,13 @@ function oi(t, e, r = !0) {
|
|
|
2305
2305
|
if (i?.has(n)) {
|
|
2306
2306
|
n.f |= Fe;
|
|
2307
2307
|
const s = document.createDocumentFragment();
|
|
2308
|
-
|
|
2308
|
+
Si(n, s);
|
|
2309
2309
|
} else
|
|
2310
2310
|
G(e[o], r);
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
|
-
var
|
|
2314
|
-
function
|
|
2313
|
+
var Ki;
|
|
2314
|
+
function Qs(t, e, r, i, o, n = null) {
|
|
2315
2315
|
var s = t, l = /* @__PURE__ */ new Map();
|
|
2316
2316
|
{
|
|
2317
2317
|
var a = (
|
|
@@ -2321,39 +2321,39 @@ function Ws(t, e, r, i, o, n = null) {
|
|
|
2321
2321
|
s = E ? Q(/* @__PURE__ */ Je(a)) : a.appendChild(fe());
|
|
2322
2322
|
}
|
|
2323
2323
|
E && Tr();
|
|
2324
|
-
var c = null, f = /* @__PURE__ */
|
|
2324
|
+
var c = null, f = /* @__PURE__ */ ws(() => {
|
|
2325
2325
|
var w = r();
|
|
2326
|
-
return
|
|
2327
|
-
}), d,
|
|
2326
|
+
return vo(w) ? w : w == null ? [] : _r(w);
|
|
2327
|
+
}), d, m = /* @__PURE__ */ new Map(), y = !0;
|
|
2328
2328
|
function p(w) {
|
|
2329
|
-
(O.effect.f & $e) === 0 && (O.pending.delete(w), O.fallback = c,
|
|
2329
|
+
(O.effect.f & $e) === 0 && (O.pending.delete(w), O.fallback = c, Js(O, d, s, e, i), c !== null && (d.length === 0 ? (c.f & Fe) === 0 ? Ii(c) : (c.f ^= Fe, Yt(c, null, s)) : ft(c, () => {
|
|
2330
2330
|
c = null;
|
|
2331
2331
|
})));
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function A(w) {
|
|
2334
2334
|
O.pending.delete(w);
|
|
2335
2335
|
}
|
|
2336
|
-
var $ =
|
|
2336
|
+
var $ = ki(() => {
|
|
2337
2337
|
d = /** @type {V[]} */
|
|
2338
2338
|
v(f);
|
|
2339
2339
|
var w = d.length;
|
|
2340
2340
|
let x = !1;
|
|
2341
2341
|
if (E) {
|
|
2342
|
-
var he =
|
|
2343
|
-
he !== (w === 0) && (s =
|
|
2342
|
+
var he = yo(s) === di;
|
|
2343
|
+
he !== (w === 0) && (s = gr(), Q(s), qe(!1), x = !0);
|
|
2344
2344
|
}
|
|
2345
2345
|
for (var oe = /* @__PURE__ */ new Set(), we = (
|
|
2346
2346
|
/** @type {Batch} */
|
|
2347
2347
|
R
|
|
2348
|
-
), bt =
|
|
2348
|
+
), bt = Uo(), N = 0; N < w; N += 1) {
|
|
2349
2349
|
E && I.nodeType === rr && /** @type {Comment} */
|
|
2350
|
-
I.data ===
|
|
2350
|
+
I.data === pi && (s = /** @type {Comment} */
|
|
2351
2351
|
I, x = !0, qe(!1));
|
|
2352
|
-
var
|
|
2353
|
-
ne ? (ne.v && Ft(ne.v,
|
|
2352
|
+
var Ht = d[N], yt = i(Ht, N), ne = y ? null : l.get(yt);
|
|
2353
|
+
ne ? (ne.v && Ft(ne.v, Ht), ne.i && Ft(ne.i, N), bt && we.unskip_effect(ne.e)) : (ne = Xs(
|
|
2354
2354
|
l,
|
|
2355
|
-
y ? s :
|
|
2356
|
-
|
|
2355
|
+
y ? s : Ki ?? (Ki = fe()),
|
|
2356
|
+
Ht,
|
|
2357
2357
|
yt,
|
|
2358
2358
|
N,
|
|
2359
2359
|
o,
|
|
@@ -2361,15 +2361,15 @@ function Ws(t, e, r, i, o, n = null) {
|
|
|
2361
2361
|
r
|
|
2362
2362
|
), y || (ne.e.f |= Fe), l.set(yt, ne)), oe.add(yt);
|
|
2363
2363
|
}
|
|
2364
|
-
if (w === 0 && n && !c && (y ? c = ce(() => n(s)) : (c = ce(() => n(
|
|
2365
|
-
if (
|
|
2364
|
+
if (w === 0 && n && !c && (y ? c = ce(() => n(s)) : (c = ce(() => n(Ki ?? (Ki = fe()))), c.f |= Fe)), w > oe.size && Qn(), E && w > 0 && Q(gr()), !y)
|
|
2365
|
+
if (m.set(we, oe), bt) {
|
|
2366
2366
|
for (const [$r, Or] of l)
|
|
2367
2367
|
oe.has($r) || we.skip_effect(Or.e);
|
|
2368
|
-
we.oncommit(p), we.ondiscard(
|
|
2368
|
+
we.oncommit(p), we.ondiscard(A);
|
|
2369
2369
|
} else
|
|
2370
2370
|
p(we);
|
|
2371
2371
|
x && qe(!0), v(f);
|
|
2372
|
-
}), O = { effect: $, items: l, pending:
|
|
2372
|
+
}), O = { effect: $, items: l, pending: m, outrogroups: null, fallback: c };
|
|
2373
2373
|
y = !1, E && (s = I);
|
|
2374
2374
|
}
|
|
2375
2375
|
function Ut(t) {
|
|
@@ -2377,10 +2377,10 @@ function Ut(t) {
|
|
|
2377
2377
|
t = t.next;
|
|
2378
2378
|
return t;
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2381
|
-
var n = e.length, s = t.items, l = Ut(t.effect.first), a, c = null, f = [], d = [],
|
|
2382
|
-
for (
|
|
2383
|
-
if (
|
|
2380
|
+
function Js(t, e, r, i, o) {
|
|
2381
|
+
var n = e.length, s = t.items, l = Ut(t.effect.first), a, c = null, f = [], d = [], m, y, p, A;
|
|
2382
|
+
for (A = 0; A < n; A += 1) {
|
|
2383
|
+
if (m = e[A], y = o(m, A), p = /** @type {EachItem} */
|
|
2384
2384
|
s.get(y).e, t.outrogroups !== null)
|
|
2385
2385
|
for (const N of t.outrogroups)
|
|
2386
2386
|
N.pending.delete(p), N.done.delete(p);
|
|
@@ -2392,7 +2392,7 @@ function Ks(t, e, r, i, o) {
|
|
|
2392
2392
|
p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), je(t, c, p), je(t, p, $), Yt(p, $, r), c = p, f = [], d = [], l = Ut(c.next);
|
|
2393
2393
|
continue;
|
|
2394
2394
|
}
|
|
2395
|
-
if ((p.f & U) !== 0 &&
|
|
2395
|
+
if ((p.f & U) !== 0 && Ii(p), p !== l) {
|
|
2396
2396
|
if (a !== void 0 && a.has(p)) {
|
|
2397
2397
|
if (f.length < d.length) {
|
|
2398
2398
|
var O = d[0], w;
|
|
@@ -2402,7 +2402,7 @@ function Ks(t, e, r, i, o) {
|
|
|
2402
2402
|
Yt(f[w], O, r);
|
|
2403
2403
|
for (w = 0; w < d.length; w += 1)
|
|
2404
2404
|
a.delete(d[w]);
|
|
2405
|
-
je(t, x.prev, he.next), je(t, c, x), je(t, he, O), l = O, c = he,
|
|
2405
|
+
je(t, x.prev, he.next), je(t, c, x), je(t, he, O), l = O, c = he, A -= 1, f = [], d = [];
|
|
2406
2406
|
} else
|
|
2407
2407
|
a.delete(p), Yt(p, l, r), je(t, p.prev, p.next), je(t, p, c === null ? t.effect.first : c.next), je(t, c, p), c = p;
|
|
2408
2408
|
continue;
|
|
@@ -2429,12 +2429,12 @@ function Ks(t, e, r, i, o) {
|
|
|
2429
2429
|
var we = oe.length;
|
|
2430
2430
|
if (we > 0) {
|
|
2431
2431
|
var bt = n === 0 ? r : null;
|
|
2432
|
-
|
|
2432
|
+
Ys(t, oe, bt);
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2437
|
-
var a = (s &
|
|
2436
|
+
function Xs(t, e, r, i, o, n, s, l) {
|
|
2437
|
+
var a = (s & Pn) !== 0 ? (s & xn) === 0 ? /* @__PURE__ */ Fo(r, !1, !1) : ht(r) : null, c = (s & Mn) !== 0 ? ht(o) : null;
|
|
2438
2438
|
return {
|
|
2439
2439
|
v: a,
|
|
2440
2440
|
i: c,
|
|
@@ -2461,8 +2461,8 @@ function Yt(t, e, r) {
|
|
|
2461
2461
|
function je(t, e, r) {
|
|
2462
2462
|
e === null ? t.effect.first = r : e.next = r, r === null ? t.effect.last = e : r.prev = e;
|
|
2463
2463
|
}
|
|
2464
|
-
function
|
|
2465
|
-
|
|
2464
|
+
function Zs(t, e) {
|
|
2465
|
+
Ko(() => {
|
|
2466
2466
|
var r = t.getRootNode(), i = (
|
|
2467
2467
|
/** @type {ShadowRoot} */
|
|
2468
2468
|
r.host ? (
|
|
@@ -2475,14 +2475,14 @@ function Qs(t, e) {
|
|
|
2475
2475
|
)
|
|
2476
2476
|
);
|
|
2477
2477
|
if (!i.querySelector("#" + e.hash)) {
|
|
2478
|
-
const o =
|
|
2478
|
+
const o = bi("style");
|
|
2479
2479
|
o.id = e.hash, o.textContent = e.code, i.appendChild(o);
|
|
2480
2480
|
}
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
2483
|
-
const
|
|
2483
|
+
const Yi = [...`
|
|
2484
2484
|
\r\f \v\uFEFF`];
|
|
2485
|
-
function
|
|
2485
|
+
function el(t, e, r) {
|
|
2486
2486
|
var i = "" + t;
|
|
2487
2487
|
if (r) {
|
|
2488
2488
|
for (var o of Object.keys(r))
|
|
@@ -2491,18 +2491,18 @@ function Js(t, e, r) {
|
|
|
2491
2491
|
else if (i.length)
|
|
2492
2492
|
for (var n = o.length, s = 0; (s = i.indexOf(o, s)) >= 0; ) {
|
|
2493
2493
|
var l = s + n;
|
|
2494
|
-
(s === 0 ||
|
|
2494
|
+
(s === 0 || Yi.includes(i[s - 1])) && (l === i.length || Yi.includes(i[l])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(l + 1) : s = l;
|
|
2495
2495
|
}
|
|
2496
2496
|
}
|
|
2497
2497
|
return i === "" ? null : i;
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function tl(t, e) {
|
|
2500
2500
|
return t == null ? null : String(t);
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function rl(t, e, r, i, o, n) {
|
|
2503
2503
|
var s = t.__className;
|
|
2504
2504
|
if (E || s !== r || s === void 0) {
|
|
2505
|
-
var l =
|
|
2505
|
+
var l = el(r, i, n);
|
|
2506
2506
|
(!E || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = r;
|
|
2507
2507
|
} else if (n && o !== n)
|
|
2508
2508
|
for (var a in n) {
|
|
@@ -2514,52 +2514,52 @@ function Zs(t, e, r, i, o, n) {
|
|
|
2514
2514
|
function wt(t, e, r, i) {
|
|
2515
2515
|
var o = t.__style;
|
|
2516
2516
|
if (E || o !== e) {
|
|
2517
|
-
var n =
|
|
2517
|
+
var n = tl(e);
|
|
2518
2518
|
(!E || n !== t.getAttribute("style")) && (n == null ? t.removeAttribute("style") : t.style.cssText = n), t.__style = e;
|
|
2519
2519
|
}
|
|
2520
2520
|
return i;
|
|
2521
2521
|
}
|
|
2522
|
-
const
|
|
2523
|
-
function
|
|
2524
|
-
var o =
|
|
2525
|
-
E && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName ===
|
|
2522
|
+
const il = /* @__PURE__ */ Symbol("is custom element"), ol = /* @__PURE__ */ Symbol("is html"), nl = Wn ? "link" : "LINK";
|
|
2523
|
+
function Hr(t, e, r, i) {
|
|
2524
|
+
var o = sl(t);
|
|
2525
|
+
E && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === nl) || o[e] !== (o[e] = r) && (e === "loading" && (t[Gn] = r), r == null ? t.removeAttribute(e) : typeof r != "string" && ll(t).includes(e) ? t[e] = r : t.setAttribute(e, r));
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function sl(t) {
|
|
2528
2528
|
return (
|
|
2529
2529
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2530
2530
|
// @ts-expect-error
|
|
2531
2531
|
t.__attributes ?? (t.__attributes = {
|
|
2532
|
-
[
|
|
2533
|
-
[
|
|
2532
|
+
[il]: t.nodeName.includes("-"),
|
|
2533
|
+
[ol]: t.namespaceURI === ho
|
|
2534
2534
|
})
|
|
2535
2535
|
);
|
|
2536
2536
|
}
|
|
2537
|
-
var
|
|
2538
|
-
function
|
|
2539
|
-
var e = t.getAttribute("is") || t.nodeName, r =
|
|
2537
|
+
var Qi = /* @__PURE__ */ new Map();
|
|
2538
|
+
function ll(t) {
|
|
2539
|
+
var e = t.getAttribute("is") || t.nodeName, r = Qi.get(e);
|
|
2540
2540
|
if (r) return r;
|
|
2541
|
-
|
|
2541
|
+
Qi.set(e, r = []);
|
|
2542
2542
|
for (var i, o = t, n = Element.prototype; n !== o; ) {
|
|
2543
|
-
i =
|
|
2543
|
+
i = Vn(o);
|
|
2544
2544
|
for (var s in i)
|
|
2545
2545
|
i[s].set && r.push(s);
|
|
2546
|
-
o =
|
|
2546
|
+
o = mo(o);
|
|
2547
2547
|
}
|
|
2548
2548
|
return r;
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2550
|
+
function Ji(t, e) {
|
|
2551
2551
|
return t === e || t?.[ar] === e;
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2554
|
-
return
|
|
2553
|
+
function al(t = {}, e, r, i) {
|
|
2554
|
+
return Ko(() => {
|
|
2555
2555
|
var o, n;
|
|
2556
|
-
return
|
|
2556
|
+
return wi(() => {
|
|
2557
2557
|
o = n, n = [], Ai(() => {
|
|
2558
|
-
t !== r(...n) && (e(t, ...n), o &&
|
|
2558
|
+
t !== r(...n) && (e(t, ...n), o && Ji(r(...o), t) && e(null, ...o));
|
|
2559
2559
|
});
|
|
2560
2560
|
}), () => {
|
|
2561
2561
|
ut(() => {
|
|
2562
|
-
n &&
|
|
2562
|
+
n && Ji(r(...n), t) && e(null, ...n);
|
|
2563
2563
|
});
|
|
2564
2564
|
};
|
|
2565
2565
|
}), t;
|
|
@@ -2574,32 +2574,32 @@ function lr(t, e, r, i) {
|
|
|
2574
2574
|
t[e], l === void 0 && i !== void 0 && (l = s());
|
|
2575
2575
|
var a;
|
|
2576
2576
|
a = () => {
|
|
2577
|
-
var
|
|
2577
|
+
var m = (
|
|
2578
2578
|
/** @type {V} */
|
|
2579
2579
|
t[e]
|
|
2580
2580
|
);
|
|
2581
|
-
return
|
|
2581
|
+
return m === void 0 ? s() : (n = !0, m);
|
|
2582
2582
|
};
|
|
2583
|
-
var c = !1, f = /* @__PURE__ */
|
|
2583
|
+
var c = !1, f = /* @__PURE__ */ Sr(() => (c = !1, a())), d = (
|
|
2584
2584
|
/** @type {Effect} */
|
|
2585
|
-
|
|
2585
|
+
S
|
|
2586
2586
|
);
|
|
2587
2587
|
return (
|
|
2588
2588
|
/** @type {() => V} */
|
|
2589
|
-
(function(
|
|
2589
|
+
(function(m, y) {
|
|
2590
2590
|
if (arguments.length > 0) {
|
|
2591
|
-
const p = y ? v(f) :
|
|
2592
|
-
return V(f, p), c = !0, o !== void 0 && (o = p),
|
|
2591
|
+
const p = y ? v(f) : m;
|
|
2592
|
+
return V(f, p), c = !0, o !== void 0 && (o = p), m;
|
|
2593
2593
|
}
|
|
2594
2594
|
return Xe && c || (d.f & $e) !== 0 ? f.v : v(f);
|
|
2595
2595
|
})
|
|
2596
2596
|
);
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2599
|
-
return new
|
|
2598
|
+
function cl(t) {
|
|
2599
|
+
return new ul(t);
|
|
2600
2600
|
}
|
|
2601
2601
|
var Ve, ae;
|
|
2602
|
-
class
|
|
2602
|
+
class ul {
|
|
2603
2603
|
/**
|
|
2604
2604
|
* @param {ComponentConstructorOptions & {
|
|
2605
2605
|
* component: any;
|
|
@@ -2611,7 +2611,7 @@ class ll {
|
|
|
2611
2611
|
/** @type {Record<string, any>} */
|
|
2612
2612
|
k(this, ae);
|
|
2613
2613
|
var r = /* @__PURE__ */ new Map(), i = (n, s) => {
|
|
2614
|
-
var l = /* @__PURE__ */
|
|
2614
|
+
var l = /* @__PURE__ */ Fo(s, !1, !1);
|
|
2615
2615
|
return r.set(n, l), l;
|
|
2616
2616
|
};
|
|
2617
2617
|
const o = new Proxy(
|
|
@@ -2621,14 +2621,14 @@ class ll {
|
|
|
2621
2621
|
return v(r.get(s) ?? i(s, Reflect.get(n, s)));
|
|
2622
2622
|
},
|
|
2623
2623
|
has(n, s) {
|
|
2624
|
-
return s ===
|
|
2624
|
+
return s === Un ? !0 : (v(r.get(s) ?? i(s, Reflect.get(n, s))), Reflect.has(n, s));
|
|
2625
2625
|
},
|
|
2626
2626
|
set(n, s, l) {
|
|
2627
2627
|
return V(r.get(s) ?? i(s, l), l), Reflect.set(n, s, l);
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
2630
|
);
|
|
2631
|
-
_(this, ae, (e.hydrate ?
|
|
2631
|
+
_(this, ae, (e.hydrate ? Us : cn)(e.component, {
|
|
2632
2632
|
target: e.target,
|
|
2633
2633
|
anchor: e.anchor,
|
|
2634
2634
|
props: o,
|
|
@@ -2638,7 +2638,7 @@ class ll {
|
|
|
2638
2638
|
transformError: e.transformError
|
|
2639
2639
|
})), (!e?.props?.$$host || e.sync === !1) && Wt(), _(this, Ve, o.$$events);
|
|
2640
2640
|
for (const n of Object.keys(u(this, ae)))
|
|
2641
|
-
n === "$set" || n === "$destroy" || n === "$on" ||
|
|
2641
|
+
n === "$set" || n === "$destroy" || n === "$on" || mr(this, n, {
|
|
2642
2642
|
get() {
|
|
2643
2643
|
return u(this, ae)[n];
|
|
2644
2644
|
},
|
|
@@ -2652,7 +2652,7 @@ class ll {
|
|
|
2652
2652
|
(n) => {
|
|
2653
2653
|
Object.assign(o, n);
|
|
2654
2654
|
}, u(this, ae).$destroy = () => {
|
|
2655
|
-
|
|
2655
|
+
Gs(u(this, ae));
|
|
2656
2656
|
};
|
|
2657
2657
|
}
|
|
2658
2658
|
/** @param {Record<string, any>} props */
|
|
@@ -2679,8 +2679,8 @@ class ll {
|
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
2681
|
Ve = new WeakMap(), ae = new WeakMap();
|
|
2682
|
-
let
|
|
2683
|
-
typeof HTMLElement == "function" && (
|
|
2682
|
+
let fn;
|
|
2683
|
+
typeof HTMLElement == "function" && (fn = class extends HTMLElement {
|
|
2684
2684
|
/**
|
|
2685
2685
|
* @param {*} $$componentCtor
|
|
2686
2686
|
* @param {*} $$slots
|
|
@@ -2739,13 +2739,13 @@ typeof HTMLElement == "function" && (un = class extends HTMLElement {
|
|
|
2739
2739
|
if (this.$$cn = !0, !this.$$c) {
|
|
2740
2740
|
let e = function(o) {
|
|
2741
2741
|
return (n) => {
|
|
2742
|
-
const s =
|
|
2742
|
+
const s = bi("slot");
|
|
2743
2743
|
o !== "default" && (s.name = o), Tt(n, s);
|
|
2744
2744
|
};
|
|
2745
2745
|
};
|
|
2746
2746
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2747
2747
|
return;
|
|
2748
|
-
const r = {}, i =
|
|
2748
|
+
const r = {}, i = fl(this);
|
|
2749
2749
|
for (const o of this.$$s)
|
|
2750
2750
|
o in i && (o === "default" && !this.$$d.children ? (this.$$d.children = e(o), r.default = !0) : r[o] = e(o));
|
|
2751
2751
|
for (const o of this.attributes) {
|
|
@@ -2754,7 +2754,7 @@ typeof HTMLElement == "function" && (un = class extends HTMLElement {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
for (const o in this.$$p_d)
|
|
2756
2756
|
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
2757
|
-
this.$$c =
|
|
2757
|
+
this.$$c = cl({
|
|
2758
2758
|
component: this.$$ctor,
|
|
2759
2759
|
target: this.$$shadowRoot || this,
|
|
2760
2760
|
props: {
|
|
@@ -2762,8 +2762,8 @@ typeof HTMLElement == "function" && (un = class extends HTMLElement {
|
|
|
2762
2762
|
$$slots: r,
|
|
2763
2763
|
$$host: this
|
|
2764
2764
|
}
|
|
2765
|
-
}), this.$$me =
|
|
2766
|
-
|
|
2765
|
+
}), this.$$me = Cs(() => {
|
|
2766
|
+
wi(() => {
|
|
2767
2767
|
this.$$r = !0;
|
|
2768
2768
|
for (const o of vr(this.$$c)) {
|
|
2769
2769
|
if (!this.$$p_d[o]?.reflect) continue;
|
|
@@ -2841,7 +2841,7 @@ function dr(t, e, r, i) {
|
|
|
2841
2841
|
return e;
|
|
2842
2842
|
}
|
|
2843
2843
|
}
|
|
2844
|
-
function
|
|
2844
|
+
function fl(t) {
|
|
2845
2845
|
const e = {};
|
|
2846
2846
|
return t.childNodes.forEach((r) => {
|
|
2847
2847
|
e[
|
|
@@ -2850,8 +2850,8 @@ function al(t) {
|
|
|
2850
2850
|
] = !0;
|
|
2851
2851
|
}), e;
|
|
2852
2852
|
}
|
|
2853
|
-
function
|
|
2854
|
-
let s = class extends
|
|
2853
|
+
function dl(t, e, r, i, o, n) {
|
|
2854
|
+
let s = class extends fn {
|
|
2855
2855
|
constructor() {
|
|
2856
2856
|
super(t, r, o), this.$$p_d = e;
|
|
2857
2857
|
}
|
|
@@ -2862,7 +2862,7 @@ function cl(t, e, r, i, o, n) {
|
|
|
2862
2862
|
}
|
|
2863
2863
|
};
|
|
2864
2864
|
return vr(e).forEach((l) => {
|
|
2865
|
-
|
|
2865
|
+
mr(s.prototype, l, {
|
|
2866
2866
|
get() {
|
|
2867
2867
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2868
2868
|
},
|
|
@@ -2876,7 +2876,7 @@ function cl(t, e, r, i, o, n) {
|
|
|
2876
2876
|
}
|
|
2877
2877
|
});
|
|
2878
2878
|
}), i.forEach((l) => {
|
|
2879
|
-
|
|
2879
|
+
mr(s.prototype, l, {
|
|
2880
2880
|
get() {
|
|
2881
2881
|
return this.$$c?.[l];
|
|
2882
2882
|
}
|
|
@@ -2884,7 +2884,7 @@ function cl(t, e, r, i, o, n) {
|
|
|
2884
2884
|
}), t.element = /** @type {any} */
|
|
2885
2885
|
s, s;
|
|
2886
2886
|
}
|
|
2887
|
-
class
|
|
2887
|
+
class pl extends Event {
|
|
2888
2888
|
constructor(r, i, o, n) {
|
|
2889
2889
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2890
2890
|
h(this, "context");
|
|
@@ -2894,7 +2894,7 @@ class ul extends Event {
|
|
|
2894
2894
|
this.context = r, this.contextTarget = i, this.callback = o, this.subscribe = n ?? !1;
|
|
2895
2895
|
}
|
|
2896
2896
|
}
|
|
2897
|
-
class
|
|
2897
|
+
class hl {
|
|
2898
2898
|
constructor(e, r) {
|
|
2899
2899
|
h(this, "host");
|
|
2900
2900
|
h(this, "context");
|
|
@@ -2918,13 +2918,13 @@ class fl {
|
|
|
2918
2918
|
return this.currentValue;
|
|
2919
2919
|
}
|
|
2920
2920
|
requestValue() {
|
|
2921
|
-
this.host.dispatchEvent(new
|
|
2921
|
+
this.host.dispatchEvent(new pl(this.context, this.host, this.handleValue, this.subscribe));
|
|
2922
2922
|
}
|
|
2923
2923
|
}
|
|
2924
|
-
const
|
|
2925
|
-
function
|
|
2924
|
+
const vl = (t) => t, ml = vl(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext"));
|
|
2925
|
+
function gl(t, e, r) {
|
|
2926
2926
|
let i = !1;
|
|
2927
|
-
const o = new
|
|
2927
|
+
const o = new hl(t, {
|
|
2928
2928
|
context: e,
|
|
2929
2929
|
subscribe: !0,
|
|
2930
2930
|
onValue: (c) => {
|
|
@@ -2948,29 +2948,29 @@ function hl(t, e, r) {
|
|
|
2948
2948
|
globalThis.clearInterval(a), t.removeEventListener("context-provider", n), o.disconnect();
|
|
2949
2949
|
};
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2952
|
-
return
|
|
2951
|
+
function bl(t, e) {
|
|
2952
|
+
return gl(t, ml, e);
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2955
|
-
return
|
|
2954
|
+
function yl(t, e) {
|
|
2955
|
+
return bl(t, e);
|
|
2956
2956
|
}
|
|
2957
|
-
var
|
|
2957
|
+
var Xi;
|
|
2958
2958
|
(function(t) {
|
|
2959
2959
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2960
|
-
})(
|
|
2961
|
-
var
|
|
2960
|
+
})(Xi || (Xi = {}));
|
|
2961
|
+
var Zi;
|
|
2962
2962
|
(function(t) {
|
|
2963
2963
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2964
|
-
})(
|
|
2965
|
-
const
|
|
2964
|
+
})(Zi || (Zi = {}));
|
|
2965
|
+
const _l = {
|
|
2966
2966
|
tts: "textToSpeech",
|
|
2967
2967
|
colorScheme: "theme"
|
|
2968
2968
|
};
|
|
2969
|
-
function
|
|
2969
|
+
function wl(t) {
|
|
2970
2970
|
const e = t.trim();
|
|
2971
|
-
return e ?
|
|
2971
|
+
return e ? _l[e] || e : "";
|
|
2972
2972
|
}
|
|
2973
|
-
const
|
|
2973
|
+
const kl = [
|
|
2974
2974
|
"assessment",
|
|
2975
2975
|
"section",
|
|
2976
2976
|
"item",
|
|
@@ -2982,12 +2982,12 @@ function pr(t, e) {
|
|
|
2982
2982
|
if (typeof t != "string" || t.trim().length === 0)
|
|
2983
2983
|
throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2984
2984
|
}
|
|
2985
|
-
function
|
|
2985
|
+
function eo(t) {
|
|
2986
2986
|
if (pr(t.toolId, "toolId"), pr(t.name, "name"), pr(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
|
|
2987
2987
|
throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2988
2988
|
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
|
|
2989
2989
|
throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2990
|
-
const e = t.supportedLevels.find((r) => !
|
|
2990
|
+
const e = t.supportedLevels.find((r) => !kl.includes(r));
|
|
2991
2991
|
if (e)
|
|
2992
2992
|
throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
|
|
2993
2993
|
if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway")
|
|
@@ -3003,7 +3003,7 @@ function Zi(t) {
|
|
|
3003
3003
|
if (typeof t.renderToolbar != "function")
|
|
3004
3004
|
throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
|
|
3005
3005
|
}
|
|
3006
|
-
class
|
|
3006
|
+
class Tl {
|
|
3007
3007
|
constructor() {
|
|
3008
3008
|
h(this, "tools", /* @__PURE__ */ new Map());
|
|
3009
3009
|
h(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
@@ -3017,7 +3017,7 @@ class _l {
|
|
|
3017
3017
|
* Normalize a single tool alias to canonical toolId.
|
|
3018
3018
|
*/
|
|
3019
3019
|
normalizeToolId(e) {
|
|
3020
|
-
return
|
|
3020
|
+
return wl(e);
|
|
3021
3021
|
}
|
|
3022
3022
|
/**
|
|
3023
3023
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -3032,7 +3032,7 @@ class _l {
|
|
|
3032
3032
|
* @throws Error if toolId is already registered
|
|
3033
3033
|
*/
|
|
3034
3034
|
register(e) {
|
|
3035
|
-
if (
|
|
3035
|
+
if (eo(e), this.tools.has(e.toolId))
|
|
3036
3036
|
throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
3037
3037
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds)
|
|
3038
3038
|
for (const r of e.pnpSupportIds)
|
|
@@ -3044,7 +3044,7 @@ class _l {
|
|
|
3044
3044
|
* @param registration - New tool registration (must have existing toolId)
|
|
3045
3045
|
*/
|
|
3046
3046
|
override(e) {
|
|
3047
|
-
if (
|
|
3047
|
+
if (eo(e), !this.tools.has(e.toolId))
|
|
3048
3048
|
throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
3049
3049
|
const r = this.tools.get(e.toolId);
|
|
3050
3050
|
if (r.pnpSupportIds)
|
|
@@ -3277,20 +3277,20 @@ class _l {
|
|
|
3277
3277
|
return o.renderToolbar(r, n);
|
|
3278
3278
|
}
|
|
3279
3279
|
}
|
|
3280
|
-
function
|
|
3280
|
+
function dn(t) {
|
|
3281
3281
|
return t.level === "item";
|
|
3282
3282
|
}
|
|
3283
|
-
function
|
|
3283
|
+
function Il(t) {
|
|
3284
3284
|
return t.level === "passage";
|
|
3285
3285
|
}
|
|
3286
|
-
function
|
|
3286
|
+
function Sl(t) {
|
|
3287
3287
|
return t.level === "rubric";
|
|
3288
3288
|
}
|
|
3289
|
-
function
|
|
3289
|
+
function pn(t) {
|
|
3290
3290
|
return t.level === "element";
|
|
3291
3291
|
}
|
|
3292
|
-
function
|
|
3293
|
-
if (
|
|
3292
|
+
function $i(t) {
|
|
3293
|
+
if (pn(t)) {
|
|
3294
3294
|
const e = t.item.config;
|
|
3295
3295
|
if (!e)
|
|
3296
3296
|
return "";
|
|
@@ -3308,7 +3308,7 @@ function Ei(t) {
|
|
|
3308
3308
|
}
|
|
3309
3309
|
return r.filter(Boolean).join(" ").trim();
|
|
3310
3310
|
}
|
|
3311
|
-
if (
|
|
3311
|
+
if (dn(t)) {
|
|
3312
3312
|
const e = t.item;
|
|
3313
3313
|
if (!e?.config)
|
|
3314
3314
|
return "";
|
|
@@ -3331,7 +3331,7 @@ function Ei(t) {
|
|
|
3331
3331
|
}
|
|
3332
3332
|
return i.filter(Boolean).join(" ").trim();
|
|
3333
3333
|
}
|
|
3334
|
-
if (
|
|
3334
|
+
if (Il(t)) {
|
|
3335
3335
|
const e = t.passage;
|
|
3336
3336
|
if (!e?.config)
|
|
3337
3337
|
return "";
|
|
@@ -3354,14 +3354,14 @@ function Ei(t) {
|
|
|
3354
3354
|
}
|
|
3355
3355
|
return i.filter(Boolean).join(" ").trim();
|
|
3356
3356
|
}
|
|
3357
|
-
if (
|
|
3357
|
+
if (Sl(t)) {
|
|
3358
3358
|
const e = t.rubricBlock;
|
|
3359
3359
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3360
3360
|
}
|
|
3361
3361
|
return "";
|
|
3362
3362
|
}
|
|
3363
|
-
function
|
|
3364
|
-
const e =
|
|
3363
|
+
function Ar(t) {
|
|
3364
|
+
const e = $i(t);
|
|
3365
3365
|
return [
|
|
3366
3366
|
/<math[>\s]/i,
|
|
3367
3367
|
// MathML
|
|
@@ -3377,7 +3377,7 @@ function Sr(t) {
|
|
|
3377
3377
|
// Simple arithmetic
|
|
3378
3378
|
].some((i) => i.test(e));
|
|
3379
3379
|
}
|
|
3380
|
-
function
|
|
3380
|
+
function Al(t) {
|
|
3381
3381
|
const e = [
|
|
3382
3382
|
"pie-multiple-choice",
|
|
3383
3383
|
"pie-inline-choice",
|
|
@@ -3386,7 +3386,7 @@ function Tl(t) {
|
|
|
3386
3386
|
"inline-choice",
|
|
3387
3387
|
"select-text"
|
|
3388
3388
|
];
|
|
3389
|
-
if (
|
|
3389
|
+
if (pn(t)) {
|
|
3390
3390
|
const r = t.item.config;
|
|
3391
3391
|
if (!r?.models)
|
|
3392
3392
|
return !1;
|
|
@@ -3396,7 +3396,7 @@ function Tl(t) {
|
|
|
3396
3396
|
const n = o.element || "";
|
|
3397
3397
|
return e.includes(n);
|
|
3398
3398
|
}
|
|
3399
|
-
if (
|
|
3399
|
+
if (dn(t)) {
|
|
3400
3400
|
const r = t.item.config?.models;
|
|
3401
3401
|
return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((o) => {
|
|
3402
3402
|
if (!o || typeof o != "object")
|
|
@@ -3408,10 +3408,10 @@ function Tl(t) {
|
|
|
3408
3408
|
return !1;
|
|
3409
3409
|
}
|
|
3410
3410
|
function Er(t) {
|
|
3411
|
-
return
|
|
3411
|
+
return $i(t).trim().length >= 10;
|
|
3412
3412
|
}
|
|
3413
|
-
function
|
|
3414
|
-
const e =
|
|
3413
|
+
function El(t) {
|
|
3414
|
+
const e = $i(t);
|
|
3415
3415
|
return [
|
|
3416
3416
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
3417
3417
|
/periodic\s+table/i,
|
|
@@ -3423,25 +3423,25 @@ function Il(t) {
|
|
|
3423
3423
|
/physics|force|energy|velocity|acceleration/i
|
|
3424
3424
|
].some((i) => i.test(e));
|
|
3425
3425
|
}
|
|
3426
|
-
const
|
|
3426
|
+
const $l = [
|
|
3427
3427
|
"assessment",
|
|
3428
3428
|
"section",
|
|
3429
3429
|
"item",
|
|
3430
3430
|
"passage",
|
|
3431
3431
|
"rubric"
|
|
3432
|
-
],
|
|
3433
|
-
function
|
|
3434
|
-
return
|
|
3432
|
+
], Ol = new Set($l);
|
|
3433
|
+
function Cl(t) {
|
|
3434
|
+
return Ol.has(t);
|
|
3435
3435
|
}
|
|
3436
|
-
function
|
|
3436
|
+
function Oi(t, e, r) {
|
|
3437
3437
|
const i = t.trim(), o = r.trim();
|
|
3438
3438
|
if (!i || !o)
|
|
3439
3439
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3440
|
-
if (!
|
|
3440
|
+
if (!Cl(e))
|
|
3441
3441
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
3442
3442
|
return `${i}:${e}:${o}`;
|
|
3443
3443
|
}
|
|
3444
|
-
class
|
|
3444
|
+
class Rl {
|
|
3445
3445
|
constructor() {
|
|
3446
3446
|
h(this, "providerId", "desmos-calculator");
|
|
3447
3447
|
h(this, "providerName", "Desmos Calculator");
|
|
@@ -3527,7 +3527,33 @@ class $l {
|
|
|
3527
3527
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
3528
3528
|
}
|
|
3529
3529
|
}
|
|
3530
|
-
|
|
3530
|
+
const Ll = (t, e) => {
|
|
3531
|
+
const r = e?.useSentenceSegmenter !== !1;
|
|
3532
|
+
try {
|
|
3533
|
+
if (!r)
|
|
3534
|
+
throw new Error("Segmenter disabled by policy");
|
|
3535
|
+
const l = globalThis.Intl?.Segmenter;
|
|
3536
|
+
if (typeof l == "function") {
|
|
3537
|
+
const a = new l(e?.locale, {
|
|
3538
|
+
granularity: "sentence"
|
|
3539
|
+
}), c = Array.from(a.segment(t)).map((f) => ({
|
|
3540
|
+
text: f.segment,
|
|
3541
|
+
offset: f.index
|
|
3542
|
+
})).filter((f) => f.text.trim().length > 0);
|
|
3543
|
+
if (c.length > 0)
|
|
3544
|
+
return c;
|
|
3545
|
+
}
|
|
3546
|
+
} catch {
|
|
3547
|
+
}
|
|
3548
|
+
const i = /[^.!?]+(?:[.!?]+|$)/g, o = t.match(i) || [t], n = [];
|
|
3549
|
+
let s = 0;
|
|
3550
|
+
for (const l of o) {
|
|
3551
|
+
const a = t.indexOf(l, s);
|
|
3552
|
+
a !== -1 && (n.push({ text: l, offset: a }), s = a + l.length);
|
|
3553
|
+
}
|
|
3554
|
+
return n.length > 0 ? n : [{ text: t, offset: 0 }];
|
|
3555
|
+
};
|
|
3556
|
+
class Pl {
|
|
3531
3557
|
constructor() {
|
|
3532
3558
|
h(this, "providerId", "browser");
|
|
3533
3559
|
h(this, "providerName", "Browser Speech Synthesis");
|
|
@@ -3538,7 +3564,7 @@ class Ol {
|
|
|
3538
3564
|
throw new Error("BrowserTTSProvider requires browser environment");
|
|
3539
3565
|
if (!("speechSynthesis" in window))
|
|
3540
3566
|
throw new Error("Browser does not support Speech Synthesis API");
|
|
3541
|
-
return new
|
|
3567
|
+
return new Ml(e);
|
|
3542
3568
|
}
|
|
3543
3569
|
supportsFeature(e) {
|
|
3544
3570
|
return !0;
|
|
@@ -3556,7 +3582,7 @@ class Ol {
|
|
|
3556
3582
|
destroy() {
|
|
3557
3583
|
}
|
|
3558
3584
|
}
|
|
3559
|
-
class
|
|
3585
|
+
class Ml {
|
|
3560
3586
|
constructor(e) {
|
|
3561
3587
|
h(this, "utterance", null);
|
|
3562
3588
|
h(this, "config", null);
|
|
@@ -3626,30 +3652,11 @@ class Cl {
|
|
|
3626
3652
|
};
|
|
3627
3653
|
}
|
|
3628
3654
|
segmentSentences(e) {
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
if (typeof l == "function") {
|
|
3635
|
-
const a = new l(s.locale, {
|
|
3636
|
-
granularity: "sentence"
|
|
3637
|
-
}), f = Array.from(a.segment(e)).map((d) => ({
|
|
3638
|
-
text: d.segment,
|
|
3639
|
-
offset: d.index
|
|
3640
|
-
})).filter((d) => d.text.trim().length > 0);
|
|
3641
|
-
if (f.length > 0)
|
|
3642
|
-
return f;
|
|
3643
|
-
}
|
|
3644
|
-
} catch {
|
|
3645
|
-
}
|
|
3646
|
-
const r = /[^.!?]+(?:[.!?]+|$)/g, i = e.match(r) || [e], o = [];
|
|
3647
|
-
let n = 0;
|
|
3648
|
-
for (const s of i) {
|
|
3649
|
-
const l = e.indexOf(s, n);
|
|
3650
|
-
l !== -1 && (o.push({ text: s, offset: l }), n = l + s.length);
|
|
3651
|
-
}
|
|
3652
|
-
return o.length > 0 ? o : [{ text: e, offset: 0 }];
|
|
3655
|
+
const r = this.getSegmentationPolicy();
|
|
3656
|
+
return Ll(e, {
|
|
3657
|
+
locale: r.locale,
|
|
3658
|
+
useSentenceSegmenter: r.useSentenceSegmenter
|
|
3659
|
+
});
|
|
3653
3660
|
}
|
|
3654
3661
|
inferWordLength(e, r) {
|
|
3655
3662
|
const i = Math.max(0, Math.min(r, Math.max(0, e.length - 1)));
|
|
@@ -3690,8 +3697,8 @@ class Cl {
|
|
|
3690
3697
|
}, this.utterance.onboundary = (s) => {
|
|
3691
3698
|
if (i !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", s.name, "charIndex:", s.charIndex, "charLength:", s.charLength), s.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
|
|
3692
3699
|
return;
|
|
3693
|
-
const l = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), a = Number(s.charLength || 0), c = this.inferWordLength(e, l), f = Number.isFinite(a) && a > 0 && a <= 80 && l + a <= e.length ? a : c, d = e.substring(l, Math.min(e.length, l + f)).trim(),
|
|
3694
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:",
|
|
3700
|
+
const l = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), a = Number(s.charLength || 0), c = this.inferWordLength(e, l), f = Number.isFinite(a) && a > 0 && a <= 80 && l + a <= e.length ? a : c, d = e.substring(l, Math.min(e.length, l + f)).trim(), m = r + l;
|
|
3701
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:", m), this.onWordBoundary(d, m, f);
|
|
3695
3702
|
}, speechSynthesis.speak(this.utterance);
|
|
3696
3703
|
});
|
|
3697
3704
|
}
|
|
@@ -3721,7 +3728,7 @@ class Cl {
|
|
|
3721
3728
|
});
|
|
3722
3729
|
}
|
|
3723
3730
|
}
|
|
3724
|
-
class
|
|
3731
|
+
class xl {
|
|
3725
3732
|
/**
|
|
3726
3733
|
* Create TTS tool provider
|
|
3727
3734
|
*
|
|
@@ -3770,7 +3777,7 @@ class Rl {
|
|
|
3770
3777
|
async _initializeBrowserTTS(e) {
|
|
3771
3778
|
if (typeof window > "u" || !("speechSynthesis" in window))
|
|
3772
3779
|
throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3773
|
-
this.ttsProvider = new
|
|
3780
|
+
this.ttsProvider = new Pl(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3774
3781
|
}
|
|
3775
3782
|
/**
|
|
3776
3783
|
* Initialize server-based TTS (Polly, Google)
|
|
@@ -3836,7 +3843,7 @@ class Rl {
|
|
|
3836
3843
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3837
3844
|
}
|
|
3838
3845
|
}
|
|
3839
|
-
const
|
|
3846
|
+
const Nl = /* @__PURE__ */ new Set([
|
|
3840
3847
|
"annotation-xml",
|
|
3841
3848
|
"color-profile",
|
|
3842
3849
|
"font-face",
|
|
@@ -3845,7 +3852,7 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3845
3852
|
"font-face-format",
|
|
3846
3853
|
"font-face-name",
|
|
3847
3854
|
"missing-glyph"
|
|
3848
|
-
]),
|
|
3855
|
+
]), Dl = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Vl = (t, e = "custom element tag") => {
|
|
3849
3856
|
if (!t || typeof t != "string")
|
|
3850
3857
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3851
3858
|
const r = t.trim();
|
|
@@ -3855,12 +3862,12 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3855
3862
|
throw new Error(`Invalid ${e} "${r}": custom element names must be lowercase`);
|
|
3856
3863
|
if (!r.includes("-"))
|
|
3857
3864
|
throw new Error(`Invalid ${e} "${r}": custom element names must include a hyphen`);
|
|
3858
|
-
if (
|
|
3865
|
+
if (Nl.has(r))
|
|
3859
3866
|
throw new Error(`Invalid ${e} "${r}": this name is reserved by the HTML spec`);
|
|
3860
|
-
if (!
|
|
3867
|
+
if (!Dl.test(r))
|
|
3861
3868
|
throw new Error(`Invalid ${e} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3862
3869
|
return r;
|
|
3863
|
-
},
|
|
3870
|
+
}, hn = {
|
|
3864
3871
|
calculator: "pie-tool-calculator",
|
|
3865
3872
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3866
3873
|
ruler: "pie-tool-ruler",
|
|
@@ -3873,20 +3880,20 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3873
3880
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3874
3881
|
graph: "pie-tool-graph",
|
|
3875
3882
|
periodicTable: "pie-tool-periodic-table"
|
|
3876
|
-
},
|
|
3877
|
-
const r = e?.toolTagMap?.[t] ??
|
|
3878
|
-
return
|
|
3879
|
-
},
|
|
3880
|
-
const o =
|
|
3881
|
-
return s ? s({ toolId: t, tagName: o, context: e, toolbarContext: r }) :
|
|
3882
|
-
},
|
|
3883
|
+
}, Fl = (t, e) => {
|
|
3884
|
+
const r = e?.toolTagMap?.[t] ?? hn[t] ?? t;
|
|
3885
|
+
return Vl(r, `tool component tag for "${t}"`);
|
|
3886
|
+
}, ql = (t) => document.createElement(t), Le = (t, e, r, i) => {
|
|
3887
|
+
const o = Fl(t, i), s = i?.toolComponentFactories?.[t] ?? i?.toolComponentFactory;
|
|
3888
|
+
return s ? s({ toolId: t, tagName: o, context: e, toolbarContext: r }) : ql(o);
|
|
3889
|
+
}, Bl = {
|
|
3883
3890
|
toolId: "calculator",
|
|
3884
3891
|
name: "Calculator",
|
|
3885
3892
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3886
3893
|
icon: "calculator",
|
|
3887
3894
|
provider: {
|
|
3888
3895
|
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
3889
|
-
createProvider: () => new
|
|
3896
|
+
createProvider: () => new Rl(),
|
|
3890
3897
|
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
3891
3898
|
getAuthFetcher: (t) => {
|
|
3892
3899
|
const e = t?.provider?.runtime?.authFetcher;
|
|
@@ -3923,10 +3930,10 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3923
3930
|
* (MathML, LaTeX, arithmetic markers).
|
|
3924
3931
|
*/
|
|
3925
3932
|
isVisibleInContext(t) {
|
|
3926
|
-
return
|
|
3933
|
+
return Ar(t);
|
|
3927
3934
|
},
|
|
3928
3935
|
renderToolbar(t, e) {
|
|
3929
|
-
const r =
|
|
3936
|
+
const r = Oi(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides, o = Le(this.toolId, t, e, i);
|
|
3930
3937
|
o.setAttribute("tool-id", r), o.toolkitCoordinator = e.toolkitCoordinator;
|
|
3931
3938
|
const n = {
|
|
3932
3939
|
toolId: this.toolId,
|
|
@@ -3968,12 +3975,39 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3968
3975
|
}
|
|
3969
3976
|
};
|
|
3970
3977
|
}
|
|
3971
|
-
},
|
|
3972
|
-
const e =
|
|
3978
|
+
}, to = (t) => t && typeof t == "object" ? t : {}, zr = (t) => {
|
|
3979
|
+
const e = to(t), r = to(t?.settings);
|
|
3973
3980
|
return { ...e, ...r };
|
|
3974
|
-
},
|
|
3981
|
+
}, ni = (t) => t.backend || "browser", vn = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), mn = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Hl = (t) => {
|
|
3982
|
+
const e = ni(t), r = vn(t, e), i = mn(t, r);
|
|
3983
|
+
return {
|
|
3984
|
+
voice: t.defaultVoice,
|
|
3985
|
+
rate: t.rate,
|
|
3986
|
+
pitch: t.pitch,
|
|
3987
|
+
providerOptions: {
|
|
3988
|
+
...t.language ? { locale: t.language } : {},
|
|
3989
|
+
...e === "polly" && t.engine ? { engine: t.engine } : {},
|
|
3990
|
+
...e === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
|
|
3991
|
+
...e === "polly" && t.format ? { format: t.format } : {},
|
|
3992
|
+
...e === "polly" ? {
|
|
3993
|
+
speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3994
|
+
} : {},
|
|
3995
|
+
...i === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
|
|
3996
|
+
...i === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
|
|
3997
|
+
...i === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
|
|
3998
|
+
},
|
|
3999
|
+
apiEndpoint: t.apiEndpoint,
|
|
4000
|
+
provider: r,
|
|
4001
|
+
language: t.language,
|
|
4002
|
+
transportMode: i,
|
|
4003
|
+
endpointMode: t.endpointMode,
|
|
4004
|
+
endpointValidationMode: t.endpointValidationMode,
|
|
4005
|
+
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
4006
|
+
validateEndpoint: t.validateEndpoint
|
|
4007
|
+
};
|
|
4008
|
+
}, Gt = /* @__PURE__ */ new Map(), zl = "__pieToolElementUnmount", ro = Object.freeze([1.5, 2]), jl = (t) => {
|
|
3975
4009
|
if (!Array.isArray(t))
|
|
3976
|
-
return [...
|
|
4010
|
+
return [...ro];
|
|
3977
4011
|
const e = /* @__PURE__ */ new Set();
|
|
3978
4012
|
for (const r of t) {
|
|
3979
4013
|
if (typeof r != "number" || !Number.isFinite(r) || r <= 0)
|
|
@@ -3981,8 +4015,8 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3981
4015
|
const i = Math.round(r * 100) / 100;
|
|
3982
4016
|
i !== 1 && e.add(i);
|
|
3983
4017
|
}
|
|
3984
|
-
return e.size ? Array.from(e) : [...
|
|
3985
|
-
},
|
|
4018
|
+
return e.size ? Array.from(e) : [...ro];
|
|
4019
|
+
}, Ul = {
|
|
3986
4020
|
toolId: "textToSpeech",
|
|
3987
4021
|
name: "Text to Speech",
|
|
3988
4022
|
description: "Read content aloud",
|
|
@@ -3991,33 +4025,15 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
3991
4025
|
getProviderId: () => "tts",
|
|
3992
4026
|
createProvider: (t) => {
|
|
3993
4027
|
const e = zr(t);
|
|
3994
|
-
return new
|
|
4028
|
+
return new xl(ni(e));
|
|
3995
4029
|
},
|
|
3996
4030
|
getInitConfig: (t) => {
|
|
3997
|
-
const e = zr(t), r = e
|
|
4031
|
+
const e = zr(t), r = ni(e), i = vn(e, r), o = mn(e, i);
|
|
3998
4032
|
return {
|
|
3999
4033
|
backend: r,
|
|
4000
|
-
apiEndpoint: e.apiEndpoint,
|
|
4001
4034
|
serverProvider: i,
|
|
4002
|
-
providerOptions: r === "polly" || o === "custom" ? {
|
|
4003
|
-
...r === "polly" && e.engine ? { engine: e.engine } : {},
|
|
4004
|
-
...r === "polly" && typeof e.sampleRate == "number" ? { sampleRate: e.sampleRate } : {},
|
|
4005
|
-
...r === "polly" && e.format ? { format: e.format } : {},
|
|
4006
|
-
...r === "polly" ? {
|
|
4007
|
-
speechMarkTypes: e.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
4008
|
-
} : {},
|
|
4009
|
-
...o === "custom" && typeof e.cache == "boolean" ? { cache: e.cache } : {},
|
|
4010
|
-
...o === "custom" && e.speedRate ? { speedRate: e.speedRate } : {},
|
|
4011
|
-
...o === "custom" && e.lang_id ? { lang_id: e.lang_id } : {}
|
|
4012
|
-
} : void 0,
|
|
4013
|
-
voice: e.defaultVoice,
|
|
4014
|
-
rate: e.rate,
|
|
4015
|
-
pitch: e.pitch,
|
|
4016
4035
|
transportMode: o,
|
|
4017
|
-
|
|
4018
|
-
endpointValidationMode: e.endpointValidationMode,
|
|
4019
|
-
includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
|
|
4020
|
-
validateEndpoint: e.validateEndpoint
|
|
4036
|
+
...Hl(e)
|
|
4021
4037
|
};
|
|
4022
4038
|
},
|
|
4023
4039
|
getAuthFetcher: (t) => {
|
|
@@ -4052,13 +4068,13 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
4052
4068
|
renderToolbar(t, e) {
|
|
4053
4069
|
const r = () => {
|
|
4054
4070
|
const s = zr(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
|
|
4055
|
-
return
|
|
4056
|
-
}, i =
|
|
4071
|
+
return jl(s.speedOptions);
|
|
4072
|
+
}, i = Oi(this.toolId, e.scope.level, e.scope.scopeId), o = () => {
|
|
4057
4073
|
const s = e.ui?.size;
|
|
4058
4074
|
return s === "sm" || s === "lg" ? s : "md";
|
|
4059
4075
|
}, n = () => {
|
|
4060
4076
|
let s = Gt.get(i);
|
|
4061
|
-
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Gt.delete(i), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[
|
|
4077
|
+
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Gt.delete(i), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[zl] = () => {
|
|
4062
4078
|
Gt.get(i) === s && Gt.delete(i);
|
|
4063
4079
|
}, Gt.set(i, s)), s.setAttribute("tool-id", i), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", o()), s.speedOptions = r(), s;
|
|
4064
4080
|
};
|
|
@@ -4080,8 +4096,8 @@ const Ll = /* @__PURE__ */ new Set([
|
|
|
4080
4096
|
};
|
|
4081
4097
|
}
|
|
4082
4098
|
};
|
|
4083
|
-
function
|
|
4084
|
-
const r =
|
|
4099
|
+
function He(t, e) {
|
|
4100
|
+
const r = Oi(t, e.scope.level, e.scope.scopeId);
|
|
4085
4101
|
return {
|
|
4086
4102
|
fullToolId: r,
|
|
4087
4103
|
isActive: () => e.isToolVisible(r),
|
|
@@ -4095,7 +4111,7 @@ function ze(t) {
|
|
|
4095
4111
|
const e = t.isActive();
|
|
4096
4112
|
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
4097
4113
|
}
|
|
4098
|
-
const
|
|
4114
|
+
const Gl = {
|
|
4099
4115
|
toolId: "ruler",
|
|
4100
4116
|
name: "Ruler",
|
|
4101
4117
|
description: "On-screen ruler for measurements",
|
|
@@ -4114,10 +4130,10 @@ const Hl = {
|
|
|
4114
4130
|
* Pass 2: Ruler is relevant when math content is present
|
|
4115
4131
|
*/
|
|
4116
4132
|
isVisibleInContext(t) {
|
|
4117
|
-
return
|
|
4133
|
+
return Ar(t);
|
|
4118
4134
|
},
|
|
4119
4135
|
renderToolbar(t, e) {
|
|
4120
|
-
const r =
|
|
4136
|
+
const r = He(this.toolId, e), i = {
|
|
4121
4137
|
toolId: this.toolId,
|
|
4122
4138
|
label: this.name,
|
|
4123
4139
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4141,7 +4157,7 @@ const Hl = {
|
|
|
4141
4157
|
subscribeActive: r.subscribeActive
|
|
4142
4158
|
};
|
|
4143
4159
|
}
|
|
4144
|
-
},
|
|
4160
|
+
}, Wl = {
|
|
4145
4161
|
toolId: "protractor",
|
|
4146
4162
|
name: "Protractor",
|
|
4147
4163
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4160,10 +4176,10 @@ const Hl = {
|
|
|
4160
4176
|
* Pass 2: Protractor is relevant when math content is present
|
|
4161
4177
|
*/
|
|
4162
4178
|
isVisibleInContext(t) {
|
|
4163
|
-
return
|
|
4179
|
+
return Ar(t);
|
|
4164
4180
|
},
|
|
4165
4181
|
renderToolbar(t, e) {
|
|
4166
|
-
const r =
|
|
4182
|
+
const r = He(this.toolId, e), i = {
|
|
4167
4183
|
toolId: this.toolId,
|
|
4168
4184
|
label: this.name,
|
|
4169
4185
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4187,7 +4203,7 @@ const Hl = {
|
|
|
4187
4203
|
subscribeActive: r.subscribeActive
|
|
4188
4204
|
};
|
|
4189
4205
|
}
|
|
4190
|
-
},
|
|
4206
|
+
}, Kl = {
|
|
4191
4207
|
toolId: "answerEliminator",
|
|
4192
4208
|
name: "Answer Eliminator",
|
|
4193
4209
|
description: "Strike through answer choices",
|
|
@@ -4210,10 +4226,10 @@ const Hl = {
|
|
|
4210
4226
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
4211
4227
|
*/
|
|
4212
4228
|
isVisibleInContext(t) {
|
|
4213
|
-
return
|
|
4229
|
+
return Al(t);
|
|
4214
4230
|
},
|
|
4215
4231
|
renderToolbar(t, e) {
|
|
4216
|
-
const r =
|
|
4232
|
+
const r = He(this.toolId, e), i = e.componentOverrides ?? {}, o = Le(this.toolId, t, e, i);
|
|
4217
4233
|
o.setAttribute("tool-id", r.fullToolId), o.setAttribute("strategy", "strikethrough"), o.setAttribute("button-alignment", "inline");
|
|
4218
4234
|
const n = {
|
|
4219
4235
|
toolId: this.toolId,
|
|
@@ -4241,7 +4257,7 @@ const Hl = {
|
|
|
4241
4257
|
subscribeActive: r.subscribeActive
|
|
4242
4258
|
};
|
|
4243
4259
|
}
|
|
4244
|
-
},
|
|
4260
|
+
}, Yl = {
|
|
4245
4261
|
toolId: "highlighter",
|
|
4246
4262
|
name: "Highlighter",
|
|
4247
4263
|
description: "Highlight text",
|
|
@@ -4258,7 +4274,7 @@ const Hl = {
|
|
|
4258
4274
|
return Er(t);
|
|
4259
4275
|
},
|
|
4260
4276
|
renderToolbar(t, e) {
|
|
4261
|
-
const r =
|
|
4277
|
+
const r = He(this.toolId, e), i = {
|
|
4262
4278
|
toolId: this.toolId,
|
|
4263
4279
|
label: this.name,
|
|
4264
4280
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4285,7 +4301,7 @@ const Hl = {
|
|
|
4285
4301
|
subscribeActive: r.subscribeActive
|
|
4286
4302
|
};
|
|
4287
4303
|
}
|
|
4288
|
-
},
|
|
4304
|
+
}, Ql = {
|
|
4289
4305
|
toolId: "lineReader",
|
|
4290
4306
|
name: "Line Reader",
|
|
4291
4307
|
description: "Reading guide overlay",
|
|
@@ -4313,7 +4329,7 @@ const Hl = {
|
|
|
4313
4329
|
return Er(t);
|
|
4314
4330
|
},
|
|
4315
4331
|
renderToolbar(t, e) {
|
|
4316
|
-
const r =
|
|
4332
|
+
const r = He(this.toolId, e), i = {
|
|
4317
4333
|
toolId: this.toolId,
|
|
4318
4334
|
label: this.name,
|
|
4319
4335
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4337,7 +4353,7 @@ const Hl = {
|
|
|
4337
4353
|
subscribeActive: r.subscribeActive
|
|
4338
4354
|
};
|
|
4339
4355
|
}
|
|
4340
|
-
},
|
|
4356
|
+
}, Jl = {
|
|
4341
4357
|
toolId: "theme",
|
|
4342
4358
|
name: "Theme",
|
|
4343
4359
|
description: "Accessible themes and contrast",
|
|
@@ -4369,7 +4385,7 @@ const Hl = {
|
|
|
4369
4385
|
return !0;
|
|
4370
4386
|
},
|
|
4371
4387
|
renderToolbar(t, e) {
|
|
4372
|
-
const r =
|
|
4388
|
+
const r = He(this.toolId, e), i = {
|
|
4373
4389
|
toolId: this.toolId,
|
|
4374
4390
|
label: this.name,
|
|
4375
4391
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4408,7 +4424,7 @@ const Hl = {
|
|
|
4408
4424
|
subscribeActive: r.subscribeActive
|
|
4409
4425
|
};
|
|
4410
4426
|
}
|
|
4411
|
-
},
|
|
4427
|
+
}, Xl = Jl, Zl = {
|
|
4412
4428
|
toolId: "annotationToolbar",
|
|
4413
4429
|
name: "Highlighter",
|
|
4414
4430
|
description: "Highlight and annotate text",
|
|
@@ -4438,7 +4454,7 @@ const Hl = {
|
|
|
4438
4454
|
return Er(t);
|
|
4439
4455
|
},
|
|
4440
4456
|
renderToolbar(t, e) {
|
|
4441
|
-
const r =
|
|
4457
|
+
const r = He(this.toolId, e), i = {
|
|
4442
4458
|
toolId: this.toolId,
|
|
4443
4459
|
label: this.name,
|
|
4444
4460
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4462,7 +4478,7 @@ const Hl = {
|
|
|
4462
4478
|
subscribeActive: r.subscribeActive
|
|
4463
4479
|
};
|
|
4464
4480
|
}
|
|
4465
|
-
},
|
|
4481
|
+
}, ea = {
|
|
4466
4482
|
toolId: "graph",
|
|
4467
4483
|
name: "Graph",
|
|
4468
4484
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4485,10 +4501,10 @@ const Hl = {
|
|
|
4485
4501
|
* Pass 2: Graph is relevant when math content is present
|
|
4486
4502
|
*/
|
|
4487
4503
|
isVisibleInContext(t) {
|
|
4488
|
-
return
|
|
4504
|
+
return Ar(t);
|
|
4489
4505
|
},
|
|
4490
4506
|
renderToolbar(t, e) {
|
|
4491
|
-
const r =
|
|
4507
|
+
const r = He(this.toolId, e), i = {
|
|
4492
4508
|
toolId: this.toolId,
|
|
4493
4509
|
label: this.name,
|
|
4494
4510
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4527,7 +4543,7 @@ const Hl = {
|
|
|
4527
4543
|
subscribeActive: r.subscribeActive
|
|
4528
4544
|
};
|
|
4529
4545
|
}
|
|
4530
|
-
},
|
|
4546
|
+
}, ta = {
|
|
4531
4547
|
toolId: "periodicTable",
|
|
4532
4548
|
name: "Periodic Table",
|
|
4533
4549
|
description: "Chemistry periodic table reference",
|
|
@@ -4548,10 +4564,10 @@ const Hl = {
|
|
|
4548
4564
|
* Pass 2: Periodic table is relevant when science content is present
|
|
4549
4565
|
*/
|
|
4550
4566
|
isVisibleInContext(t) {
|
|
4551
|
-
return
|
|
4567
|
+
return El(t);
|
|
4552
4568
|
},
|
|
4553
4569
|
renderToolbar(t, e) {
|
|
4554
|
-
const r =
|
|
4570
|
+
const r = He(this.toolId, e), i = {
|
|
4555
4571
|
toolId: this.toolId,
|
|
4556
4572
|
label: this.name,
|
|
4557
4573
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4590,53 +4606,53 @@ const Hl = {
|
|
|
4590
4606
|
subscribeActive: r.subscribeActive
|
|
4591
4607
|
};
|
|
4592
4608
|
}
|
|
4593
|
-
},
|
|
4594
|
-
Dl,
|
|
4595
|
-
ql,
|
|
4596
|
-
Hl,
|
|
4609
|
+
}, ra = [
|
|
4597
4610
|
Bl,
|
|
4598
|
-
zl,
|
|
4599
|
-
jl,
|
|
4600
4611
|
Ul,
|
|
4612
|
+
Gl,
|
|
4601
4613
|
Wl,
|
|
4602
4614
|
Kl,
|
|
4603
4615
|
Yl,
|
|
4604
|
-
Ql
|
|
4616
|
+
Ql,
|
|
4617
|
+
Xl,
|
|
4618
|
+
Zl,
|
|
4619
|
+
ea,
|
|
4620
|
+
ta
|
|
4605
4621
|
];
|
|
4606
|
-
function
|
|
4607
|
-
const e = new
|
|
4622
|
+
function ia(t = {}) {
|
|
4623
|
+
const e = new Tl(), r = {
|
|
4608
4624
|
toolTagMap: {
|
|
4609
|
-
...
|
|
4625
|
+
...hn,
|
|
4610
4626
|
...t.toolTagMap || {}
|
|
4611
4627
|
},
|
|
4612
4628
|
toolComponentFactory: t.toolComponentFactory,
|
|
4613
4629
|
toolComponentFactories: t.toolComponentFactories
|
|
4614
4630
|
}, i = (o) => t.overrides?.[o.toolId] || o;
|
|
4615
|
-
return t.includePackagedTools &&
|
|
4631
|
+
return t.includePackagedTools && oa(e, {
|
|
4616
4632
|
toolIds: t.toolIds,
|
|
4617
4633
|
applyOverrides: i
|
|
4618
4634
|
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(r), e;
|
|
4619
4635
|
}
|
|
4620
|
-
function
|
|
4636
|
+
function oa(t, e = {}) {
|
|
4621
4637
|
const r = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, i = e.applyOverrides || ((o) => o);
|
|
4622
|
-
for (const o of
|
|
4638
|
+
for (const o of ra)
|
|
4623
4639
|
r && !r.has(o.toolId) || t.register(i(o));
|
|
4624
4640
|
}
|
|
4625
|
-
function
|
|
4626
|
-
return
|
|
4641
|
+
function na(t = {}) {
|
|
4642
|
+
return ia({
|
|
4627
4643
|
...t,
|
|
4628
4644
|
includePackagedTools: !0
|
|
4629
4645
|
});
|
|
4630
4646
|
}
|
|
4631
|
-
function
|
|
4632
|
-
const t =
|
|
4647
|
+
function sa() {
|
|
4648
|
+
const t = na(), e = /* @__PURE__ */ new Set();
|
|
4633
4649
|
for (const r of t.getAllTools())
|
|
4634
4650
|
for (const i of r.pnpSupportIds || [])
|
|
4635
4651
|
e.add(i);
|
|
4636
4652
|
return [...e].sort();
|
|
4637
4653
|
}
|
|
4638
|
-
|
|
4639
|
-
const
|
|
4654
|
+
sa();
|
|
4655
|
+
const la = {
|
|
4640
4656
|
/**
|
|
4641
4657
|
* Visual accessibility features
|
|
4642
4658
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4807,22 +4823,22 @@ const ra = {
|
|
|
4807
4823
|
tutorialAvailable: "tutorialAvailable"
|
|
4808
4824
|
}
|
|
4809
4825
|
};
|
|
4810
|
-
Object.values(
|
|
4811
|
-
var
|
|
4826
|
+
Object.values(la).flatMap((t) => Object.values(t));
|
|
4827
|
+
var si;
|
|
4812
4828
|
(function(t) {
|
|
4813
4829
|
t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
4814
|
-
})(
|
|
4815
|
-
var
|
|
4830
|
+
})(si || (si = {}));
|
|
4831
|
+
var io;
|
|
4816
4832
|
(function(t) {
|
|
4817
4833
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4818
|
-
})(
|
|
4819
|
-
function
|
|
4834
|
+
})(io || (io = {}));
|
|
4835
|
+
function aa(t) {
|
|
4820
4836
|
return t === "light" || t === "dark" || t === "auto";
|
|
4821
4837
|
}
|
|
4822
|
-
function
|
|
4838
|
+
function ca(t) {
|
|
4823
4839
|
return t === "self" || t === "document";
|
|
4824
4840
|
}
|
|
4825
|
-
function
|
|
4841
|
+
function li(t) {
|
|
4826
4842
|
if (!t || typeof t != "object")
|
|
4827
4843
|
return {};
|
|
4828
4844
|
const e = {};
|
|
@@ -4834,7 +4850,7 @@ function si(t) {
|
|
|
4834
4850
|
} else typeof i == "number" && (e[r] = String(i));
|
|
4835
4851
|
return e;
|
|
4836
4852
|
}
|
|
4837
|
-
const
|
|
4853
|
+
const ua = [
|
|
4838
4854
|
{
|
|
4839
4855
|
id: "default",
|
|
4840
4856
|
name: "Default",
|
|
@@ -5028,17 +5044,17 @@ const na = [
|
|
|
5028
5044
|
},
|
|
5029
5045
|
preview: { bg: "#333333", text: "#e0e0e0", primary: "#aaaaaa" }
|
|
5030
5046
|
}
|
|
5031
|
-
],
|
|
5032
|
-
function
|
|
5033
|
-
return [...
|
|
5047
|
+
], ai = new Map(ua.map((t) => [t.id, t])), gn = /* @__PURE__ */ new Map();
|
|
5048
|
+
function fa() {
|
|
5049
|
+
return [...ai.values(), ...gn.values()];
|
|
5034
5050
|
}
|
|
5035
|
-
function
|
|
5036
|
-
return t ?
|
|
5051
|
+
function da(t) {
|
|
5052
|
+
return t ? gn.get(t) ?? ai.get(t) : ai.get("default");
|
|
5037
5053
|
}
|
|
5038
|
-
function
|
|
5039
|
-
return
|
|
5054
|
+
function pa(t) {
|
|
5055
|
+
return da(t)?.variables ?? {};
|
|
5040
5056
|
}
|
|
5041
|
-
const
|
|
5057
|
+
const ha = {
|
|
5042
5058
|
"--pie-text": "black",
|
|
5043
5059
|
"--pie-disabled": "grey",
|
|
5044
5060
|
"--pie-disabled-secondary": "#ababab",
|
|
@@ -5087,7 +5103,7 @@ const ca = {
|
|
|
5087
5103
|
"--pie-button-hover-color": "#111827",
|
|
5088
5104
|
"--pie-button-active-bg": "#f3f4f6",
|
|
5089
5105
|
"--pie-button-focus-outline": "#3b82f6"
|
|
5090
|
-
},
|
|
5106
|
+
}, va = {
|
|
5091
5107
|
"--pie-text": "#ffffff",
|
|
5092
5108
|
"--pie-disabled": "#999999",
|
|
5093
5109
|
"--pie-disabled-secondary": "#777777",
|
|
@@ -5136,7 +5152,7 @@ const ca = {
|
|
|
5136
5152
|
"--pie-button-hover-color": "#ffffff",
|
|
5137
5153
|
"--pie-button-active-bg": "#4b5563",
|
|
5138
5154
|
"--pie-button-focus-outline": "#93c5fd"
|
|
5139
|
-
},
|
|
5155
|
+
}, ci = /* @__PURE__ */ new Map();
|
|
5140
5156
|
function hr(t) {
|
|
5141
5157
|
const e = t.trim();
|
|
5142
5158
|
return e || void 0;
|
|
@@ -5145,9 +5161,9 @@ function Me(t) {
|
|
|
5145
5161
|
if (!(!t.left || !t.right))
|
|
5146
5162
|
return `color-mix(in srgb, ${t.left} ${t.leftWeight}, ${t.right})`;
|
|
5147
5163
|
}
|
|
5148
|
-
function
|
|
5164
|
+
function ma(t) {
|
|
5149
5165
|
const e = (r) => hr(t.getPropertyValue(r));
|
|
5150
|
-
return
|
|
5166
|
+
return li({
|
|
5151
5167
|
"--pie-background": e("--color-base-100"),
|
|
5152
5168
|
"--pie-background-dark": e("--color-base-200"),
|
|
5153
5169
|
"--pie-secondary-background": e("--color-base-200"),
|
|
@@ -5233,38 +5249,38 @@ function fa(t) {
|
|
|
5233
5249
|
"--pie-button-focus-outline": e("--color-primary")
|
|
5234
5250
|
});
|
|
5235
5251
|
}
|
|
5236
|
-
const
|
|
5252
|
+
const oo = {
|
|
5237
5253
|
id: "daisyui",
|
|
5238
5254
|
canRead(t) {
|
|
5239
5255
|
const e = getComputedStyle(t);
|
|
5240
5256
|
return !!(hr(e.getPropertyValue("--color-base-100")) || hr(e.getPropertyValue("--color-base-content")) || hr(e.getPropertyValue("--color-primary")));
|
|
5241
5257
|
},
|
|
5242
5258
|
read(t) {
|
|
5243
|
-
return
|
|
5259
|
+
return ma(getComputedStyle(t));
|
|
5244
5260
|
}
|
|
5245
5261
|
};
|
|
5246
|
-
|
|
5247
|
-
function
|
|
5262
|
+
ci.set(oo.id, oo);
|
|
5263
|
+
function ga(t) {
|
|
5248
5264
|
const e = t.provider?.trim() || "auto", r = (o) => {
|
|
5249
5265
|
if (e !== "auto") {
|
|
5250
|
-
const n =
|
|
5251
|
-
return !n || !n.canRead(o) ? {} :
|
|
5266
|
+
const n = ci.get(e);
|
|
5267
|
+
return !n || !n.canRead(o) ? {} : li(n.read(o));
|
|
5252
5268
|
}
|
|
5253
|
-
for (const n of
|
|
5269
|
+
for (const n of ci.values())
|
|
5254
5270
|
if (n.canRead(o))
|
|
5255
|
-
return
|
|
5271
|
+
return li(n.read(o));
|
|
5256
5272
|
return {};
|
|
5257
5273
|
}, i = r(t.target);
|
|
5258
5274
|
return Object.keys(i).length > 0 ? i : typeof document < "u" && t.target !== document.documentElement ? r(document.documentElement) : {};
|
|
5259
5275
|
}
|
|
5260
|
-
const
|
|
5276
|
+
const ba = typeof HTMLElement > "u" ? class {
|
|
5261
5277
|
} : HTMLElement;
|
|
5262
|
-
function
|
|
5278
|
+
function ui(t) {
|
|
5263
5279
|
if (!t)
|
|
5264
5280
|
return {};
|
|
5265
5281
|
if (typeof t == "string")
|
|
5266
5282
|
try {
|
|
5267
|
-
return
|
|
5283
|
+
return ui(JSON.parse(t));
|
|
5268
5284
|
} catch {
|
|
5269
5285
|
return {};
|
|
5270
5286
|
}
|
|
@@ -5275,7 +5291,7 @@ function ci(t) {
|
|
|
5275
5291
|
r.startsWith("--") && (typeof i == "string" ? e[r] = i : typeof i == "number" && (e[r] = String(i)));
|
|
5276
5292
|
return e;
|
|
5277
5293
|
}
|
|
5278
|
-
class
|
|
5294
|
+
class ya extends ba {
|
|
5279
5295
|
constructor() {
|
|
5280
5296
|
super(...arguments);
|
|
5281
5297
|
h(this, "mediaQuery", null);
|
|
@@ -5288,14 +5304,14 @@ class ha extends pa {
|
|
|
5288
5304
|
}
|
|
5289
5305
|
get theme() {
|
|
5290
5306
|
const r = this.getAttribute("theme");
|
|
5291
|
-
return
|
|
5307
|
+
return aa(r) ? r : "light";
|
|
5292
5308
|
}
|
|
5293
5309
|
set theme(r) {
|
|
5294
5310
|
this.setAttribute("theme", r);
|
|
5295
5311
|
}
|
|
5296
5312
|
get scope() {
|
|
5297
5313
|
const r = this.getAttribute("scope");
|
|
5298
|
-
return
|
|
5314
|
+
return ca(r) ? r : "self";
|
|
5299
5315
|
}
|
|
5300
5316
|
set scope(r) {
|
|
5301
5317
|
this.setAttribute("scope", r);
|
|
@@ -5304,7 +5320,7 @@ class ha extends pa {
|
|
|
5304
5320
|
return { ...this.variablesOverride };
|
|
5305
5321
|
}
|
|
5306
5322
|
set variables(r) {
|
|
5307
|
-
this.variablesOverride =
|
|
5323
|
+
this.variablesOverride = ui(r), this.setAttribute("variables", JSON.stringify(this.variablesOverride)), this.applyTheme();
|
|
5308
5324
|
}
|
|
5309
5325
|
get provider() {
|
|
5310
5326
|
return this.getAttribute("provider")?.trim() || "auto";
|
|
@@ -5325,7 +5341,7 @@ class ha extends pa {
|
|
|
5325
5341
|
this.mediaQuery && this.mediaQuery.removeEventListener("change", this.onMediaChange), this.mediaQuery = null, this.scope === "self" && (this.clearPreviousKeys(this), this.removeAttribute("data-theme"), this.removeAttribute("data-color-scheme"));
|
|
5326
5342
|
}
|
|
5327
5343
|
attributeChangedCallback(r, i, o) {
|
|
5328
|
-
i !== o && (r === "variables" && (this.variablesOverride =
|
|
5344
|
+
i !== o && (r === "variables" && (this.variablesOverride = ui(o)), r === "theme" && this.setupAutoThemeListener(), this.applyTheme());
|
|
5329
5345
|
}
|
|
5330
5346
|
getTarget() {
|
|
5331
5347
|
return this.scope === "document" ? document.documentElement : this;
|
|
@@ -5335,10 +5351,10 @@ class ha extends pa {
|
|
|
5335
5351
|
return;
|
|
5336
5352
|
const { effectiveTheme: r, dataTheme: i } = this.resolveThemeState(), o = this.getTarget();
|
|
5337
5353
|
o.setAttribute("data-theme", i), this.scheme && this.scheme !== "default" ? o.setAttribute("data-color-scheme", this.scheme) : o.removeAttribute("data-color-scheme");
|
|
5338
|
-
const n = r === "dark" ?
|
|
5354
|
+
const n = r === "dark" ? va : ha, s = ga({
|
|
5339
5355
|
target: o,
|
|
5340
5356
|
provider: this.provider
|
|
5341
|
-
}), l =
|
|
5357
|
+
}), l = pa(this.scheme), a = {
|
|
5342
5358
|
...n,
|
|
5343
5359
|
...s,
|
|
5344
5360
|
...l,
|
|
@@ -5365,55 +5381,55 @@ class ha extends pa {
|
|
|
5365
5381
|
typeof window > "u" || (this.mediaQuery && (this.mediaQuery.removeEventListener("change", this.onMediaChange), this.mediaQuery = null), this.getAttribute("theme")?.trim() === "auto" && (this.mediaQuery = window.matchMedia("(prefers-color-scheme: dark)"), this.mediaQuery.addEventListener("change", this.onMediaChange)));
|
|
5366
5382
|
}
|
|
5367
5383
|
}
|
|
5368
|
-
function
|
|
5369
|
-
typeof customElements > "u" || customElements.get(t) || customElements.define(t,
|
|
5384
|
+
function _a(t = "pie-theme") {
|
|
5385
|
+
typeof customElements > "u" || customElements.get(t) || customElements.define(t, ya);
|
|
5370
5386
|
}
|
|
5371
|
-
|
|
5372
|
-
const
|
|
5373
|
-
function
|
|
5387
|
+
_a();
|
|
5388
|
+
const wa = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, bn = "https://proxy.pie-api.com", ka = `${bn}/bundles/`;
|
|
5389
|
+
function yn(t) {
|
|
5374
5390
|
try {
|
|
5375
|
-
const e =
|
|
5391
|
+
const e = wa?.[t];
|
|
5376
5392
|
if (typeof e == "string" && e.length > 0)
|
|
5377
5393
|
return e;
|
|
5378
5394
|
} catch {
|
|
5379
5395
|
}
|
|
5380
5396
|
}
|
|
5381
|
-
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL ||
|
|
5382
|
-
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL ||
|
|
5383
|
-
var
|
|
5397
|
+
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || yn("PUBLIC_BUILDER_ORIGIN_URL");
|
|
5398
|
+
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || yn("PUBLIC_BUILDER_BUNDLE_URL");
|
|
5399
|
+
var fi;
|
|
5384
5400
|
(function(t) {
|
|
5385
5401
|
t.player = "player.js", t.clientPlayer = "client-player.js", t.editor = "editor.js";
|
|
5386
|
-
})(
|
|
5387
|
-
var
|
|
5402
|
+
})(fi || (fi = {}));
|
|
5403
|
+
var no;
|
|
5388
5404
|
(function(t) {
|
|
5389
5405
|
t.loading = "loading", t.loaded = "loaded";
|
|
5390
|
-
})(
|
|
5406
|
+
})(no || (no = {}));
|
|
5391
5407
|
typeof window < "u" && !window.pieHelpers && (window.pieHelpers = {
|
|
5392
5408
|
loadingScripts: {},
|
|
5393
5409
|
loadingPromises: {}
|
|
5394
5410
|
});
|
|
5395
|
-
var no;
|
|
5396
|
-
(function(t) {
|
|
5397
|
-
t.SAVE = "save", t.MODEL = "model", t.SCORE = "score", t.MANUAL_SCORE = "manual-score";
|
|
5398
|
-
})(no || (no = {}));
|
|
5399
5411
|
var so;
|
|
5400
5412
|
(function(t) {
|
|
5401
|
-
t.
|
|
5413
|
+
t.SAVE = "save", t.MODEL = "model", t.SCORE = "score", t.MANUAL_SCORE = "manual-score";
|
|
5402
5414
|
})(so || (so = {}));
|
|
5403
5415
|
var lo;
|
|
5404
5416
|
(function(t) {
|
|
5405
|
-
t.
|
|
5417
|
+
t.AUTO = "auto", t.MANUAL = "manual";
|
|
5406
5418
|
})(lo || (lo = {}));
|
|
5407
5419
|
var ao;
|
|
5408
5420
|
(function(t) {
|
|
5409
|
-
t.
|
|
5421
|
+
t.GATHER = "gather", t.VIEW = "view", t.EVALUATE = "evaluate";
|
|
5410
5422
|
})(ao || (ao = {}));
|
|
5411
5423
|
var co;
|
|
5412
5424
|
(function(t) {
|
|
5413
|
-
t
|
|
5425
|
+
t.PENDING = "pending", t.IN_PROGRESS = "in_progress", t.COMPLETED = "completed", t.FAILED = "failed";
|
|
5414
5426
|
})(co || (co = {}));
|
|
5415
|
-
|
|
5416
|
-
function
|
|
5427
|
+
var uo;
|
|
5428
|
+
(function(t) {
|
|
5429
|
+
t[t.ROOT = 0] = "ROOT", t[t.SUBJECT = 1] = "SUBJECT", t[t.LEVEL = 2] = "LEVEL", t[t.STANDARD = 3] = "STANDARD";
|
|
5430
|
+
})(uo || (uo = {}));
|
|
5431
|
+
fi.player;
|
|
5432
|
+
function Ta(t) {
|
|
5417
5433
|
const e = typeof document < "u" ? document.activeElement : null;
|
|
5418
5434
|
return queueMicrotask(() => {
|
|
5419
5435
|
try {
|
|
@@ -5427,14 +5443,14 @@ function ba(t) {
|
|
|
5427
5443
|
}
|
|
5428
5444
|
};
|
|
5429
5445
|
}
|
|
5430
|
-
function
|
|
5446
|
+
function Ia(t) {
|
|
5431
5447
|
try {
|
|
5432
5448
|
return typeof localStorage > "u" ? null : localStorage.getItem(t);
|
|
5433
5449
|
} catch {
|
|
5434
5450
|
return null;
|
|
5435
5451
|
}
|
|
5436
5452
|
}
|
|
5437
|
-
function
|
|
5453
|
+
function Sa(t, e) {
|
|
5438
5454
|
try {
|
|
5439
5455
|
if (typeof localStorage > "u")
|
|
5440
5456
|
return;
|
|
@@ -5442,66 +5458,66 @@ function _a(t, e) {
|
|
|
5442
5458
|
} catch {
|
|
5443
5459
|
}
|
|
5444
5460
|
}
|
|
5445
|
-
var
|
|
5446
|
-
const
|
|
5461
|
+
var Aa = /* @__PURE__ */ Bs('<svg xmlns="http://www.w3.org/2000/svg" class="pie-tool-color-scheme__check svelte-17qy4wk" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"></polyline></svg>'), Ea = /* @__PURE__ */ Ei('<button type="button" role="menuitem"><div class="pie-tool-color-scheme__preview svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-bg svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-text svelte-17qy4wk">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-17qy4wk"></div></div></div> <div class="pie-tool-color-scheme__info svelte-17qy4wk"><div class="pie-tool-color-scheme__name svelte-17qy4wk"> </div> <div class="pie-tool-color-scheme__description svelte-17qy4wk"> </div></div> <!></button>'), $a = /* @__PURE__ */ Ei('<div class="pie-tool-color-scheme__dropdown svelte-17qy4wk" role="menu"></div>'), Oa = /* @__PURE__ */ Ei('<div class="pie-tool-color-scheme svelte-17qy4wk" role="dialog" tabindex="-1" aria-label="Theme selector"><div class="pie-tool-color-scheme__content svelte-17qy4wk"><p class="pie-tool-color-scheme__description svelte-17qy4wk">Select a theme to improve readability and reduce eye strain.</p> <button type="button" class="pie-tool-color-scheme__dropdown-trigger svelte-17qy4wk" aria-label="Select theme"><div class="pie-tool-color-scheme__current svelte-17qy4wk"><div class="pie-tool-color-scheme__preview svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-bg svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-text svelte-17qy4wk">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-17qy4wk"></div></div></div> <div class="pie-tool-color-scheme__current-info svelte-17qy4wk"><div class="pie-tool-color-scheme__current-name svelte-17qy4wk"> </div> <div class="pie-tool-color-scheme__current-description svelte-17qy4wk"> </div></div> <svg class="pie-tool-color-scheme__dropdown-arrow svelte-17qy4wk" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M7,10L12,15L17,10H7Z"></path></svg></div></button> <!></div></div>');
|
|
5462
|
+
const Ca = {
|
|
5447
5463
|
hash: "svelte-17qy4wk",
|
|
5448
5464
|
code: `.pie-tool-color-scheme.svelte-17qy4wk {position:relative;width:100%;height:100%;min-height:0;background-color:var(--pie-background, white);display:flex;flex-direction:column;}.pie-tool-color-scheme__content.svelte-17qy4wk {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow:auto;}.pie-tool-color-scheme__description.svelte-17qy4wk {margin:0 0 1rem 0;color:var(--pie-text, black);opacity:0.7;font-size:0.875rem;}.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk {width:100%;padding:0.75rem;border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;background-color:var(--pie-background, white);color:var(--pie-text, black);cursor:pointer;transition:all 0.15s ease;}.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, #f0f0f0);}.pie-tool-color-scheme__current.svelte-17qy4wk {display:flex;align-items:center;gap:0.75rem;}.pie-tool-color-scheme__current-info.svelte-17qy4wk {flex:1;text-align:left;}.pie-tool-color-scheme__current-name.svelte-17qy4wk {font-size:0.875rem;font-weight:600;color:var(--pie-text, black);}.pie-tool-color-scheme__current-description.svelte-17qy4wk {font-size:0.75rem;color:var(--pie-text, black);opacity:0.6;}.pie-tool-color-scheme__dropdown-arrow.svelte-17qy4wk {width:1.5rem;height:1.5rem;flex-shrink:0;}.pie-tool-color-scheme__dropdown.svelte-17qy4wk {position:relative;width:100%;max-height:24rem;background-color:var(--pie-background, white);border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;overflow-x:hidden;margin-top:0.5rem;}.pie-tool-color-scheme__option.svelte-17qy4wk {display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.75rem 1rem;border:none;background-color:transparent;color:var(--pie-text, black);cursor:pointer;text-align:left;transition:background-color 0.15s ease;}.pie-tool-color-scheme__option.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, rgba(0, 0, 0, 0.05));}.pie-tool-color-scheme__option--active.svelte-17qy4wk {background-color:var(--pie-primary-light, rgba(63, 81, 181, 0.1));}.pie-tool-color-scheme__preview.svelte-17qy4wk {flex-shrink:0;width:2.5rem;height:2.5rem;border:2px solid var(--pie-border, #ccc);border-radius:0.25rem;overflow:hidden;}.pie-tool-color-scheme__preview-bg.svelte-17qy4wk {width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;}.pie-tool-color-scheme__preview-text.svelte-17qy4wk {font-weight:700;font-size:1.25rem;}.pie-tool-color-scheme__preview-primary.svelte-17qy4wk {position:absolute;bottom:0;right:0;width:0.75rem;height:0.75rem;border-radius:50%;}.pie-tool-color-scheme__info.svelte-17qy4wk {flex:1;}.pie-tool-color-scheme__name.svelte-17qy4wk {font-size:0.875rem;font-weight:600;color:var(--pie-text, black);line-height:1.25;}.pie-tool-color-scheme__description.svelte-17qy4wk {font-size:0.75rem;color:var(--pie-text, black);opacity:0.6;}.pie-tool-color-scheme__check.svelte-17qy4wk {flex-shrink:0;width:1rem;height:1rem;color:var(--pie-primary, #3f51b5);}
|
|
5449
5465
|
|
|
5450
5466
|
/* Keyboard focus styling */.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk:focus-visible,
|
|
5451
5467
|
.pie-tool-color-scheme__option.svelte-17qy4wk:focus-visible {outline:2px solid var(--pie-primary, #3f51b5);outline-offset:2px;}`
|
|
5452
5468
|
};
|
|
5453
|
-
function
|
|
5454
|
-
|
|
5469
|
+
function Ra(t, e) {
|
|
5470
|
+
ko(e, !0), Zs(t, Ca);
|
|
5455
5471
|
const r = typeof window < "u";
|
|
5456
5472
|
let i = lr(e, "visible", 7, !1), o = lr(e, "toolId", 7, "theme"), n = lr(e, "schemes", 7, ""), s = lr(e, "schemeCatalog", 7, null), l = /* @__PURE__ */ re(void 0), a = /* @__PURE__ */ re(null);
|
|
5457
5473
|
const c = /* @__PURE__ */ Fr(() => v(a)?.toolCoordinator);
|
|
5458
5474
|
let f = /* @__PURE__ */ re(!1);
|
|
5459
5475
|
kt(() => {
|
|
5460
5476
|
if (v(l))
|
|
5461
|
-
return
|
|
5462
|
-
V(a,
|
|
5477
|
+
return yl(v(l), (g) => {
|
|
5478
|
+
V(a, g, !0);
|
|
5463
5479
|
});
|
|
5464
5480
|
});
|
|
5465
5481
|
const d = { bg: "#ffffff", text: "#000000", primary: "#3f51b5" };
|
|
5466
|
-
function g
|
|
5482
|
+
function m(g, b) {
|
|
5467
5483
|
return {
|
|
5468
|
-
bg:
|
|
5469
|
-
text:
|
|
5470
|
-
primary:
|
|
5484
|
+
bg: g?.["--pie-background"] || g?.["--pie-secondary-background"] || b.bg,
|
|
5485
|
+
text: g?.["--pie-text"] || b.text,
|
|
5486
|
+
primary: g?.["--pie-primary"] || b.primary
|
|
5471
5487
|
};
|
|
5472
5488
|
}
|
|
5473
|
-
function y(
|
|
5474
|
-
if (!
|
|
5475
|
-
const b =
|
|
5489
|
+
function y(g) {
|
|
5490
|
+
if (!g || typeof g != "object") return null;
|
|
5491
|
+
const b = g, C = typeof b.id == "string" ? b.id.trim() : "";
|
|
5476
5492
|
if (!C) return null;
|
|
5477
5493
|
const D = typeof b.name == "string" && b.name.trim() ? b.name.trim() : C, _t = typeof b.description == "string" ? b.description : "", se = b.preview, zt = se && typeof se == "object" && typeof se.bg == "string" && typeof se.text == "string" && typeof se.primary == "string" ? {
|
|
5478
5494
|
bg: se.bg,
|
|
5479
5495
|
text: se.text,
|
|
5480
5496
|
primary: se.primary
|
|
5481
|
-
} :
|
|
5497
|
+
} : m(typeof b.variables == "object" && b.variables ? b.variables : void 0, d);
|
|
5482
5498
|
return { id: C, name: D, description: _t, preview: zt };
|
|
5483
5499
|
}
|
|
5484
|
-
function p(
|
|
5485
|
-
if (!
|
|
5500
|
+
function p(g) {
|
|
5501
|
+
if (!g?.trim()) return [];
|
|
5486
5502
|
try {
|
|
5487
|
-
const b = JSON.parse(
|
|
5503
|
+
const b = JSON.parse(g);
|
|
5488
5504
|
return Array.isArray(b) ? b.map((C) => y(C)).filter((C) => !!C) : [];
|
|
5489
5505
|
} catch {
|
|
5490
5506
|
return [];
|
|
5491
5507
|
}
|
|
5492
5508
|
}
|
|
5493
|
-
function
|
|
5494
|
-
const
|
|
5495
|
-
if (
|
|
5509
|
+
function A() {
|
|
5510
|
+
const g = v(l)?.closest("pie-theme");
|
|
5511
|
+
if (g) return g;
|
|
5496
5512
|
const b = document.querySelector('pie-theme[scope="document"]');
|
|
5497
5513
|
return b || document.querySelector("pie-theme");
|
|
5498
5514
|
}
|
|
5499
5515
|
function $() {
|
|
5500
|
-
return
|
|
5516
|
+
return fa().map((b) => ({
|
|
5501
5517
|
id: b.id,
|
|
5502
5518
|
name: b.name || b.id,
|
|
5503
5519
|
description: b.description || "",
|
|
5504
|
-
preview: b.preview ||
|
|
5520
|
+
preview: b.preview || m(b.variables, d)
|
|
5505
5521
|
}));
|
|
5506
5522
|
}
|
|
5507
5523
|
const O = /* @__PURE__ */ Fr(() => {
|
|
@@ -5509,8 +5525,8 @@ function Sa(t, e) {
|
|
|
5509
5525
|
const C = s().map((D) => y(D)).filter((D) => !!D);
|
|
5510
5526
|
if (C.length > 0) return C;
|
|
5511
5527
|
}
|
|
5512
|
-
const
|
|
5513
|
-
if (
|
|
5528
|
+
const g = p(n());
|
|
5529
|
+
if (g.length > 0) return g;
|
|
5514
5530
|
const b = $();
|
|
5515
5531
|
return b.length > 0 ? b : [
|
|
5516
5532
|
{
|
|
@@ -5522,147 +5538,147 @@ function Sa(t, e) {
|
|
|
5522
5538
|
];
|
|
5523
5539
|
});
|
|
5524
5540
|
let w = /* @__PURE__ */ re("default"), x = /* @__PURE__ */ re(!1), he = null;
|
|
5525
|
-
function oe(
|
|
5541
|
+
function oe(g) {
|
|
5526
5542
|
if (!r) return;
|
|
5527
|
-
const b =
|
|
5543
|
+
const b = A();
|
|
5528
5544
|
if (b)
|
|
5529
|
-
b.setAttribute("scheme",
|
|
5545
|
+
b.setAttribute("scheme", g || "default");
|
|
5530
5546
|
else {
|
|
5531
5547
|
const C = document.documentElement;
|
|
5532
|
-
|
|
5548
|
+
g === "default" ? C.removeAttribute("data-color-scheme") : C.setAttribute("data-color-scheme", g);
|
|
5533
5549
|
}
|
|
5534
|
-
|
|
5550
|
+
Sa("pie-color-scheme", g);
|
|
5535
5551
|
}
|
|
5536
|
-
function we(
|
|
5537
|
-
V(w,
|
|
5552
|
+
function we(g) {
|
|
5553
|
+
V(w, g, !0), oe(g), v(c)?.hideTool(o());
|
|
5538
5554
|
}
|
|
5539
5555
|
function bt() {
|
|
5540
5556
|
V(x, !v(x));
|
|
5541
5557
|
}
|
|
5542
|
-
let N = /* @__PURE__ */ Fr(() => v(O).find((
|
|
5558
|
+
let N = /* @__PURE__ */ Fr(() => v(O).find((g) => g.id === v(w)) || v(O)[0] || {
|
|
5543
5559
|
id: "default",
|
|
5544
5560
|
name: "Default",
|
|
5545
5561
|
description: "",
|
|
5546
5562
|
preview: d
|
|
5547
5563
|
});
|
|
5548
5564
|
kt(() => {
|
|
5549
|
-
v(O).find((
|
|
5565
|
+
v(O).find((g) => g.id === v(w)) || V(w, v(O)[0]?.id || "default", !0);
|
|
5550
5566
|
});
|
|
5551
|
-
function
|
|
5552
|
-
if (
|
|
5567
|
+
function Ht(g) {
|
|
5568
|
+
if (g.key === "Escape")
|
|
5553
5569
|
v(x) && V(x, !1);
|
|
5554
|
-
else if (v(x) && (
|
|
5555
|
-
|
|
5570
|
+
else if (v(x) && (g.key === "ArrowDown" || g.key === "ArrowUp")) {
|
|
5571
|
+
g.preventDefault();
|
|
5556
5572
|
const b = v(l)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");
|
|
5557
5573
|
if (!b || b.length === 0) return;
|
|
5558
5574
|
const C = Array.from(b).findIndex((_t) => _t === document.activeElement);
|
|
5559
5575
|
let D;
|
|
5560
|
-
|
|
5576
|
+
g.key === "ArrowDown" ? D = C === -1 ? 0 : (C + 1) % b.length : D = C === -1 ? b.length - 1 : (C - 1 + b.length) % b.length, b[D]?.focus();
|
|
5561
5577
|
}
|
|
5562
5578
|
}
|
|
5563
5579
|
kt(() => {
|
|
5564
|
-
v(c) && o() && !v(f) && (v(c).registerTool(o(), "Theme", void 0,
|
|
5580
|
+
v(c) && o() && !v(f) && (v(c).registerTool(o(), "Theme", void 0, si.MODAL), V(f, !0));
|
|
5565
5581
|
}), kt(() => {
|
|
5566
5582
|
v(c) && v(l) && o() && v(c).updateToolElement(o(), v(l));
|
|
5567
5583
|
}), kt(() => {
|
|
5568
|
-
!i() && he ? (he(), he = null) : i() && v(l) && !he && (he =
|
|
5569
|
-
}),
|
|
5584
|
+
!i() && he ? (he(), he = null) : i() && v(l) && !he && (he = Ta(v(l)));
|
|
5585
|
+
}), Ks(() => {
|
|
5570
5586
|
if (r) {
|
|
5571
|
-
const C =
|
|
5587
|
+
const C = A()?.getAttribute("scheme"), D = Ia("pie-color-scheme") ?? C ?? "default";
|
|
5572
5588
|
V(w, D, !0), D && requestAnimationFrame(() => {
|
|
5573
5589
|
oe(D);
|
|
5574
5590
|
});
|
|
5575
5591
|
}
|
|
5576
|
-
function
|
|
5592
|
+
function g(b) {
|
|
5577
5593
|
if (!v(x)) return;
|
|
5578
5594
|
const C = b.composedPath();
|
|
5579
5595
|
(!v(l) || !C.includes(v(l))) && V(x, !1);
|
|
5580
5596
|
}
|
|
5581
|
-
return document.addEventListener("click",
|
|
5582
|
-
document.removeEventListener("click",
|
|
5597
|
+
return document.addEventListener("click", g), () => {
|
|
5598
|
+
document.removeEventListener("click", g), v(c) && o() && v(c).unregisterTool(o());
|
|
5583
5599
|
};
|
|
5584
5600
|
});
|
|
5585
5601
|
var yt = {
|
|
5586
5602
|
get visible() {
|
|
5587
5603
|
return i();
|
|
5588
5604
|
},
|
|
5589
|
-
set visible(
|
|
5590
|
-
i(
|
|
5605
|
+
set visible(g = !1) {
|
|
5606
|
+
i(g), Wt();
|
|
5591
5607
|
},
|
|
5592
5608
|
get toolId() {
|
|
5593
5609
|
return o();
|
|
5594
5610
|
},
|
|
5595
|
-
set toolId(
|
|
5596
|
-
o(
|
|
5611
|
+
set toolId(g = "theme") {
|
|
5612
|
+
o(g), Wt();
|
|
5597
5613
|
},
|
|
5598
5614
|
get schemes() {
|
|
5599
5615
|
return n();
|
|
5600
5616
|
},
|
|
5601
|
-
set schemes(
|
|
5602
|
-
n(
|
|
5617
|
+
set schemes(g = "") {
|
|
5618
|
+
n(g), Wt();
|
|
5603
5619
|
},
|
|
5604
5620
|
get schemeCatalog() {
|
|
5605
5621
|
return s();
|
|
5606
5622
|
},
|
|
5607
|
-
set schemeCatalog(
|
|
5608
|
-
s(
|
|
5623
|
+
set schemeCatalog(g = null) {
|
|
5624
|
+
s(g), Wt();
|
|
5609
5625
|
}
|
|
5610
|
-
}, ne =
|
|
5626
|
+
}, ne = Hs(), $r = As(ne);
|
|
5611
5627
|
{
|
|
5612
|
-
var Or = (
|
|
5613
|
-
var b =
|
|
5628
|
+
var Or = (g) => {
|
|
5629
|
+
var b = Oa(), C = j(b), D = Pe(j(C), 2), _t = j(D), se = j(_t), zt = j(se), Ri = j(zt), _n = Pe(Ri, 2);
|
|
5614
5630
|
z(zt), z(se);
|
|
5615
|
-
var
|
|
5631
|
+
var Li = Pe(se, 2), Cr = j(Li), wn = j(Cr, !0);
|
|
5616
5632
|
z(Cr);
|
|
5617
|
-
var
|
|
5618
|
-
z(
|
|
5619
|
-
var
|
|
5633
|
+
var Pi = Pe(Cr, 2), kn = j(Pi, !0);
|
|
5634
|
+
z(Pi), z(Li), bo(2), z(_t), z(D);
|
|
5635
|
+
var Tn = Pe(D, 2);
|
|
5620
5636
|
{
|
|
5621
|
-
var
|
|
5622
|
-
var Rr =
|
|
5623
|
-
|
|
5624
|
-
var tt =
|
|
5625
|
-
let
|
|
5626
|
-
var Pr = j(tt), Mr = j(Pr),
|
|
5637
|
+
var In = (jt) => {
|
|
5638
|
+
var Rr = $a();
|
|
5639
|
+
Qs(Rr, 21, () => v(O), (Lr) => Lr.id, (Lr, ke) => {
|
|
5640
|
+
var tt = Ea();
|
|
5641
|
+
let Mi;
|
|
5642
|
+
var Pr = j(tt), Mr = j(Pr), xi = j(Mr), Sn = Pe(xi, 2);
|
|
5627
5643
|
z(Mr), z(Pr);
|
|
5628
|
-
var xr = Pe(Pr, 2), Nr = j(xr),
|
|
5644
|
+
var xr = Pe(Pr, 2), Nr = j(xr), An = j(Nr, !0);
|
|
5629
5645
|
z(Nr);
|
|
5630
|
-
var
|
|
5631
|
-
z(
|
|
5632
|
-
var
|
|
5646
|
+
var Ni = Pe(Nr, 2), En = j(Ni, !0);
|
|
5647
|
+
z(Ni), z(xr);
|
|
5648
|
+
var $n = Pe(xr, 2);
|
|
5633
5649
|
{
|
|
5634
|
-
var
|
|
5635
|
-
var
|
|
5636
|
-
Tt(Dr,
|
|
5650
|
+
var On = (Dr) => {
|
|
5651
|
+
var Cn = Aa();
|
|
5652
|
+
Tt(Dr, Cn);
|
|
5637
5653
|
};
|
|
5638
|
-
|
|
5639
|
-
v(w) === v(ke).id && Dr(
|
|
5654
|
+
Br($n, (Dr) => {
|
|
5655
|
+
v(w) === v(ke).id && Dr(On);
|
|
5640
5656
|
});
|
|
5641
5657
|
}
|
|
5642
|
-
z(tt),
|
|
5643
|
-
|
|
5658
|
+
z(tt), zi(() => {
|
|
5659
|
+
Mi = rl(tt, 1, "pie-tool-color-scheme__option svelte-17qy4wk", null, Mi, {
|
|
5644
5660
|
"pie-tool-color-scheme__option--active": v(w) === v(ke).id
|
|
5645
|
-
}),
|
|
5661
|
+
}), Hr(tt, "aria-label", v(ke).name), Hr(tt, "aria-current", v(w) === v(ke).id), wt(Mr, `background-color: ${v(ke).preview.bg ?? ""}`), wt(xi, `color: ${v(ke).preview.text ?? ""}`), wt(Sn, `background-color: ${v(ke).preview.primary ?? ""}`), nr(An, v(ke).name), nr(En, v(ke).description);
|
|
5646
5662
|
}), qr("click", tt, () => we(v(ke).id)), Tt(Lr, tt);
|
|
5647
5663
|
}), z(Rr), Tt(jt, Rr);
|
|
5648
5664
|
};
|
|
5649
|
-
|
|
5650
|
-
v(x) && jt(
|
|
5665
|
+
Br(Tn, (jt) => {
|
|
5666
|
+
v(x) && jt(In);
|
|
5651
5667
|
});
|
|
5652
5668
|
}
|
|
5653
|
-
z(C), z(b),
|
|
5654
|
-
|
|
5655
|
-
}), qr("keydown", b,
|
|
5669
|
+
z(C), z(b), al(b, (jt) => V(l, jt), () => v(l)), zi(() => {
|
|
5670
|
+
Hr(D, "aria-expanded", v(x)), wt(zt, `background-color: ${v(N).preview.bg ?? ""}`), wt(Ri, `color: ${v(N).preview.text ?? ""}`), wt(_n, `background-color: ${v(N).preview.primary ?? ""}`), nr(wn, v(N).name), nr(kn, v(N).description);
|
|
5671
|
+
}), qr("keydown", b, Ht), qr("click", D, bt), Tt(g, b);
|
|
5656
5672
|
};
|
|
5657
|
-
|
|
5658
|
-
i() &&
|
|
5673
|
+
Br($r, (g) => {
|
|
5674
|
+
i() && g(Or);
|
|
5659
5675
|
});
|
|
5660
5676
|
}
|
|
5661
|
-
return Tt(t, ne),
|
|
5677
|
+
return Tt(t, ne), To(yt);
|
|
5662
5678
|
}
|
|
5663
|
-
|
|
5664
|
-
customElements.define("pie-tool-theme",
|
|
5665
|
-
|
|
5679
|
+
Ds(["keydown", "click"]);
|
|
5680
|
+
customElements.define("pie-tool-theme", dl(
|
|
5681
|
+
Ra,
|
|
5666
5682
|
{
|
|
5667
5683
|
visible: { attribute: "visible", type: "Boolean" },
|
|
5668
5684
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -5674,5 +5690,5 @@ customElements.define("pie-tool-theme", cl(
|
|
|
5674
5690
|
{ mode: "open" }
|
|
5675
5691
|
));
|
|
5676
5692
|
export {
|
|
5677
|
-
|
|
5693
|
+
Ra as default
|
|
5678
5694
|
};
|