@pie-players/pie-tool-theme 0.1.9 → 0.1.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 +993 -929
- package/package.json +5 -5
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var yn = Object.defineProperty;
|
|
2
|
+
var $i = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var y = (t, e, r) =>
|
|
7
|
-
var f = (t, e, r) => (
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var wn = (t, e, r) => e in t ? yn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
+
var y = (t, e, r) => wn(t, typeof e != "symbol" ? e + "" : e, r), Nr = (t, e, r) => e.has(t) || $i("Cannot " + r);
|
|
7
|
+
var f = (t, e, r) => (Nr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), I = (t, e, r) => e.has(t) ? $i("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), T = (t, e, r, i) => (Nr(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r), U = (t, e, r) => (Nr(t, e, "access private method"), r);
|
|
8
|
+
var Xi;
|
|
9
|
+
typeof window < "u" && ((Xi = window.__svelte ?? (window.__svelte = {})).v ?? (Xi.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const kn = 1, Tn = 2, In = 16, En = 2, ni = "[", pr = "[!", si = "]", At = {}, j = /* @__PURE__ */ Symbol(), Zi = "http://www.w3.org/1999/xhtml", jr = !1;
|
|
11
|
+
var eo = Array.isArray, Sn = Array.prototype.indexOf, $t = Array.prototype.includes, hr = Array.from, cr = Object.keys, ar = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, An = Object.getOwnPropertyDescriptors, $n = Object.prototype, Rn = Array.prototype, to = Object.getPrototypeOf, Ri = Object.isExtensible;
|
|
12
|
+
const Ln = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function On(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ro() {
|
|
19
19
|
var t, e, r = new Promise((i, o) => {
|
|
20
20
|
t = i, e = o;
|
|
21
21
|
});
|
|
22
22
|
return { promise: r, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const F = 2, Ht = 4,
|
|
24
|
+
const F = 2, Ht = 4, vr = 8, io = 1 << 24, He = 16, be = 32, Qe = 64, Fr = 128, le = 512, N = 1024, x = 2048, me = 4096, te = 8192, Fe = 16384, Ct = 32768, Rt = 65536, Li = 1 << 17, oo = 1 << 18, ht = 1 << 19, Vn = 1 << 20, Ge = 1 << 25, ut = 65536, xr = 1 << 21, li = 1 << 22, ze = 1 << 23, ir = /* @__PURE__ */ Symbol("$state"), Mn = /* @__PURE__ */ Symbol("legacy props"), Cn = /* @__PURE__ */ Symbol(""), Ze = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
y(this, "name", "StaleReactionError");
|
|
28
28
|
y(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
30
|
+
}(), Nn = (
|
|
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
|
-
),
|
|
34
|
-
function
|
|
33
|
+
), gr = 3, Yt = 8;
|
|
34
|
+
function Dn(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Pn() {
|
|
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 Fn() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function xn(t) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
51
51
|
}
|
|
52
52
|
function Hn() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Bn() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Un() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Gn() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function zn() {
|
|
65
65
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Wn() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function mr(t) {
|
|
71
71
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
72
72
|
}
|
|
73
73
|
function Kn() {
|
|
74
74
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
75
75
|
}
|
|
76
76
|
let R = !1;
|
|
77
|
-
function
|
|
77
|
+
function je(t) {
|
|
78
78
|
R = t;
|
|
79
79
|
}
|
|
80
80
|
let A;
|
|
81
81
|
function Q(t) {
|
|
82
82
|
if (t === null)
|
|
83
|
-
throw
|
|
83
|
+
throw mr(), At;
|
|
84
84
|
return A = t;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function br() {
|
|
87
87
|
return Q(/* @__PURE__ */ Re(A));
|
|
88
88
|
}
|
|
89
89
|
function q(t) {
|
|
90
90
|
if (R) {
|
|
91
91
|
if (/* @__PURE__ */ Re(A) !== null)
|
|
92
|
-
throw
|
|
92
|
+
throw mr(), At;
|
|
93
93
|
A = t;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function no(t = 1) {
|
|
97
97
|
if (R) {
|
|
98
98
|
for (var e = t, r = A; e--; )
|
|
99
99
|
r = /** @type {TemplateNode} */
|
|
@@ -101,17 +101,17 @@ function oo(t = 1) {
|
|
|
101
101
|
A = r;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function fr(t = !0) {
|
|
105
105
|
for (var e = 0, r = A; ; ) {
|
|
106
106
|
if (r.nodeType === Yt) {
|
|
107
107
|
var i = (
|
|
108
108
|
/** @type {Comment} */
|
|
109
109
|
r.data
|
|
110
110
|
);
|
|
111
|
-
if (i ===
|
|
111
|
+
if (i === si) {
|
|
112
112
|
if (e === 0) return r;
|
|
113
113
|
e -= 1;
|
|
114
|
-
} else (i ===
|
|
114
|
+
} else (i === ni || i === pr || // "[1", "[2", etc. for if blocks
|
|
115
115
|
i[0] === "[" && !isNaN(Number(i.slice(1)))) && (e += 1);
|
|
116
116
|
}
|
|
117
117
|
var o = (
|
|
@@ -121,28 +121,28 @@ function ar(t = !0) {
|
|
|
121
121
|
t && r.remove(), r = o;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function so(t) {
|
|
125
125
|
if (!t || t.nodeType !== Yt)
|
|
126
|
-
throw
|
|
126
|
+
throw mr(), At;
|
|
127
127
|
return (
|
|
128
128
|
/** @type {Comment} */
|
|
129
129
|
t.data
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function lo(t) {
|
|
133
133
|
return t === this.v;
|
|
134
134
|
}
|
|
135
135
|
function Yn(t, e) {
|
|
136
136
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function co(t) {
|
|
139
139
|
return !Yn(t, this.v);
|
|
140
140
|
}
|
|
141
|
-
let
|
|
142
|
-
function
|
|
141
|
+
let Qn = !1, re = null;
|
|
142
|
+
function Lt(t) {
|
|
143
143
|
re = t;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ao(t, e = !1, r) {
|
|
146
146
|
re = {
|
|
147
147
|
p: re,
|
|
148
148
|
i: !1,
|
|
@@ -153,7 +153,7 @@ function co(t, e = !1, r) {
|
|
|
153
153
|
l: null
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function fo(t) {
|
|
157
157
|
var e = (
|
|
158
158
|
/** @type {ComponentContext} */
|
|
159
159
|
re
|
|
@@ -161,44 +161,44 @@ function ao(t) {
|
|
|
161
161
|
if (r !== null) {
|
|
162
162
|
e.e = null;
|
|
163
163
|
for (var i of r)
|
|
164
|
-
|
|
164
|
+
No(i);
|
|
165
165
|
}
|
|
166
166
|
return t !== void 0 && (e.x = t), e.i = !0, re = e.p, t ?? /** @type {T} */
|
|
167
167
|
{};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function uo() {
|
|
170
170
|
return !0;
|
|
171
171
|
}
|
|
172
|
-
let
|
|
173
|
-
function
|
|
174
|
-
var t =
|
|
175
|
-
|
|
172
|
+
let et = [];
|
|
173
|
+
function po() {
|
|
174
|
+
var t = et;
|
|
175
|
+
et = [], On(t);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
if (
|
|
179
|
-
var e =
|
|
177
|
+
function ct(t) {
|
|
178
|
+
if (et.length === 0 && !Ft) {
|
|
179
|
+
var e = et;
|
|
180
180
|
queueMicrotask(() => {
|
|
181
|
-
e ===
|
|
181
|
+
e === et && po();
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
et.push(t);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
for (;
|
|
188
|
-
|
|
186
|
+
function Jn() {
|
|
187
|
+
for (; et.length > 0; )
|
|
188
|
+
po();
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function ho(t) {
|
|
191
191
|
var e = L;
|
|
192
192
|
if (e === null)
|
|
193
|
-
return E.f |=
|
|
194
|
-
if ((e.f &
|
|
193
|
+
return E.f |= ze, t;
|
|
194
|
+
if ((e.f & Ct) === 0 && (e.f & Ht) === 0)
|
|
195
195
|
throw t;
|
|
196
|
-
|
|
196
|
+
Ot(t, e);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ot(t, e) {
|
|
199
199
|
for (; e !== null; ) {
|
|
200
|
-
if ((e.f &
|
|
201
|
-
if ((e.f &
|
|
200
|
+
if ((e.f & Fr) !== 0) {
|
|
201
|
+
if ((e.f & Ct) === 0)
|
|
202
202
|
throw t;
|
|
203
203
|
try {
|
|
204
204
|
e.b.error(t);
|
|
@@ -211,28 +211,28 @@ function Lt(t, e) {
|
|
|
211
211
|
}
|
|
212
212
|
throw t;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const Xn = -7169;
|
|
215
215
|
function V(t, e) {
|
|
216
|
-
t.f = t.f &
|
|
216
|
+
t.f = t.f & Xn | e;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function ci(t) {
|
|
219
219
|
(t.f & le) !== 0 || t.deps === null ? V(t, N) : V(t, me);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function vo(t) {
|
|
222
222
|
if (t !== null)
|
|
223
223
|
for (const e of t)
|
|
224
|
-
(e.f & F) === 0 || (e.f &
|
|
224
|
+
(e.f & F) === 0 || (e.f & ut) === 0 || (e.f ^= ut, vo(
|
|
225
225
|
/** @type {Derived} */
|
|
226
226
|
e.deps
|
|
227
227
|
));
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
(t.f &
|
|
229
|
+
function go(t, e, r) {
|
|
230
|
+
(t.f & x) !== 0 ? e.add(t) : (t.f & me) !== 0 && r.add(t), vo(t.deps), V(t, N);
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
let O = null, he = null,
|
|
234
|
-
var
|
|
235
|
-
const
|
|
232
|
+
const Xt = /* @__PURE__ */ new Set();
|
|
233
|
+
let O = null, he = null, K = [], _r = null, Hr = !1, Ft = !1;
|
|
234
|
+
var yt, wt, it, kt, Ut, Gt, ot, Ce, Tt, $e, Br, Ur, mo;
|
|
235
|
+
const yi = class yi {
|
|
236
236
|
constructor() {
|
|
237
237
|
I(this, $e);
|
|
238
238
|
y(this, "committed", !1);
|
|
@@ -253,36 +253,36 @@ const _i = class _i {
|
|
|
253
253
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
254
254
|
* @type {Set<() => void>}
|
|
255
255
|
*/
|
|
256
|
-
I(this,
|
|
256
|
+
I(this, yt, /* @__PURE__ */ new Set());
|
|
257
257
|
/**
|
|
258
258
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
259
259
|
* @type {Set<(batch: Batch) => void>}
|
|
260
260
|
*/
|
|
261
|
-
I(this,
|
|
261
|
+
I(this, wt, /* @__PURE__ */ new Set());
|
|
262
262
|
/**
|
|
263
263
|
* The number of async effects that are currently in flight
|
|
264
264
|
*/
|
|
265
|
-
I(this,
|
|
265
|
+
I(this, it, 0);
|
|
266
266
|
/**
|
|
267
267
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
268
268
|
*/
|
|
269
|
-
I(this,
|
|
269
|
+
I(this, kt, 0);
|
|
270
270
|
/**
|
|
271
271
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
272
272
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
273
273
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
274
274
|
*/
|
|
275
|
-
I(this,
|
|
275
|
+
I(this, Ut, null);
|
|
276
276
|
/**
|
|
277
277
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
278
278
|
* @type {Set<Effect>}
|
|
279
279
|
*/
|
|
280
|
-
I(this,
|
|
280
|
+
I(this, Gt, /* @__PURE__ */ new Set());
|
|
281
281
|
/**
|
|
282
282
|
* Deferred effects that are MAYBE_DIRTY
|
|
283
283
|
* @type {Set<Effect>}
|
|
284
284
|
*/
|
|
285
|
-
I(this,
|
|
285
|
+
I(this, ot, /* @__PURE__ */ new Set());
|
|
286
286
|
/**
|
|
287
287
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
288
288
|
* is committed — we skip over these during `process`.
|
|
@@ -290,19 +290,19 @@ const _i = class _i {
|
|
|
290
290
|
* so they can be rescheduled if the branch survives.
|
|
291
291
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
292
292
|
*/
|
|
293
|
-
I(this,
|
|
293
|
+
I(this, Ce, /* @__PURE__ */ new Map());
|
|
294
294
|
y(this, "is_fork", !1);
|
|
295
|
-
I(this,
|
|
295
|
+
I(this, Tt, !1);
|
|
296
296
|
}
|
|
297
297
|
is_deferred() {
|
|
298
|
-
return this.is_fork || f(this,
|
|
298
|
+
return this.is_fork || f(this, kt) > 0;
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
* Add an effect to the #skipped_branches map and reset its children
|
|
302
302
|
* @param {Effect} effect
|
|
303
303
|
*/
|
|
304
304
|
skip_effect(e) {
|
|
305
|
-
f(this,
|
|
305
|
+
f(this, Ce).has(e) || f(this, Ce).set(e, { d: [], m: [] });
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
308
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -310,11 +310,11 @@ const _i = class _i {
|
|
|
310
310
|
* @param {Effect} effect
|
|
311
311
|
*/
|
|
312
312
|
unskip_effect(e) {
|
|
313
|
-
var r = f(this,
|
|
313
|
+
var r = f(this, Ce).get(e);
|
|
314
314
|
if (r) {
|
|
315
|
-
f(this,
|
|
315
|
+
f(this, Ce).delete(e);
|
|
316
316
|
for (var i of r.d)
|
|
317
|
-
V(i,
|
|
317
|
+
V(i, x), ve(i);
|
|
318
318
|
for (i of r.m)
|
|
319
319
|
V(i, me), ve(i);
|
|
320
320
|
}
|
|
@@ -324,17 +324,17 @@ const _i = class _i {
|
|
|
324
324
|
* @param {Effect[]} root_effects
|
|
325
325
|
*/
|
|
326
326
|
process(e) {
|
|
327
|
-
|
|
327
|
+
K = [], this.apply();
|
|
328
328
|
var r = [], i = [];
|
|
329
329
|
for (const o of e)
|
|
330
|
-
U(this, $e,
|
|
330
|
+
U(this, $e, Br).call(this, o, r, i);
|
|
331
331
|
if (this.is_deferred()) {
|
|
332
|
-
U(this, $e,
|
|
333
|
-
for (const [o, n] of f(this,
|
|
334
|
-
|
|
332
|
+
U(this, $e, Ur).call(this, i), U(this, $e, Ur).call(this, r);
|
|
333
|
+
for (const [o, n] of f(this, Ce))
|
|
334
|
+
wo(o, n);
|
|
335
335
|
} else {
|
|
336
|
-
for (const o of f(this,
|
|
337
|
-
f(this,
|
|
336
|
+
for (const o of f(this, yt)) o();
|
|
337
|
+
f(this, yt).clear(), f(this, it) === 0 && U(this, $e, mo).call(this), O = null, Oi(i), Oi(r), f(this, Ut)?.resolve();
|
|
338
338
|
}
|
|
339
339
|
he = null;
|
|
340
340
|
}
|
|
@@ -345,7 +345,7 @@ const _i = class _i {
|
|
|
345
345
|
* @param {any} value
|
|
346
346
|
*/
|
|
347
347
|
capture(e, r) {
|
|
348
|
-
r !== j && !this.previous.has(e) && this.previous.set(e, r), (e.f &
|
|
348
|
+
r !== j && !this.previous.has(e) && this.previous.set(e, r), (e.f & ze) === 0 && (this.current.set(e, e.v), he?.set(e, e.v));
|
|
349
349
|
}
|
|
350
350
|
activate() {
|
|
351
351
|
O = this, this.apply();
|
|
@@ -354,54 +354,54 @@ const _i = class _i {
|
|
|
354
354
|
O === this && (O = null, he = null);
|
|
355
355
|
}
|
|
356
356
|
flush() {
|
|
357
|
-
if (this.activate(),
|
|
358
|
-
if (
|
|
357
|
+
if (this.activate(), K.length > 0) {
|
|
358
|
+
if (bo(), O !== null && O !== this)
|
|
359
359
|
return;
|
|
360
|
-
} else f(this,
|
|
360
|
+
} else f(this, it) === 0 && this.process([]);
|
|
361
361
|
this.deactivate();
|
|
362
362
|
}
|
|
363
363
|
discard() {
|
|
364
|
-
for (const e of f(this,
|
|
365
|
-
f(this,
|
|
364
|
+
for (const e of f(this, wt)) e(this);
|
|
365
|
+
f(this, wt).clear();
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
368
368
|
*
|
|
369
369
|
* @param {boolean} blocking
|
|
370
370
|
*/
|
|
371
371
|
increment(e) {
|
|
372
|
-
T(this,
|
|
372
|
+
T(this, it, f(this, it) + 1), e && T(this, kt, f(this, kt) + 1);
|
|
373
373
|
}
|
|
374
374
|
/**
|
|
375
375
|
*
|
|
376
376
|
* @param {boolean} blocking
|
|
377
377
|
*/
|
|
378
378
|
decrement(e) {
|
|
379
|
-
T(this,
|
|
380
|
-
T(this,
|
|
379
|
+
T(this, it, f(this, it) - 1), e && T(this, kt, f(this, kt) - 1), !f(this, Tt) && (T(this, Tt, !0), ct(() => {
|
|
380
|
+
T(this, Tt, !1), this.is_deferred() ? K.length > 0 && this.flush() : this.revive();
|
|
381
381
|
}));
|
|
382
382
|
}
|
|
383
383
|
revive() {
|
|
384
|
-
for (const e of f(this,
|
|
385
|
-
f(this,
|
|
386
|
-
for (const e of f(this,
|
|
384
|
+
for (const e of f(this, Gt))
|
|
385
|
+
f(this, ot).delete(e), V(e, x), ve(e);
|
|
386
|
+
for (const e of f(this, ot))
|
|
387
387
|
V(e, me), ve(e);
|
|
388
388
|
this.flush();
|
|
389
389
|
}
|
|
390
390
|
/** @param {() => void} fn */
|
|
391
391
|
oncommit(e) {
|
|
392
|
-
f(this,
|
|
392
|
+
f(this, yt).add(e);
|
|
393
393
|
}
|
|
394
394
|
/** @param {(batch: Batch) => void} fn */
|
|
395
395
|
ondiscard(e) {
|
|
396
|
-
f(this,
|
|
396
|
+
f(this, wt).add(e);
|
|
397
397
|
}
|
|
398
398
|
settled() {
|
|
399
|
-
return (f(this,
|
|
399
|
+
return (f(this, Ut) ?? T(this, Ut, ro())).promise;
|
|
400
400
|
}
|
|
401
401
|
static ensure() {
|
|
402
402
|
if (O === null) {
|
|
403
|
-
const e = O = new
|
|
404
|
-
|
|
403
|
+
const e = O = new yi();
|
|
404
|
+
Xt.add(O), Ft || ct(() => {
|
|
405
405
|
O === e && e.flush();
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -410,19 +410,19 @@ const _i = class _i {
|
|
|
410
410
|
apply() {
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
|
-
|
|
413
|
+
yt = new WeakMap(), wt = new WeakMap(), it = new WeakMap(), kt = new WeakMap(), Ut = new WeakMap(), Gt = new WeakMap(), ot = new WeakMap(), Ce = new WeakMap(), Tt = new WeakMap(), $e = new WeakSet(), /**
|
|
414
414
|
* Traverse the effect tree, executing effects or stashing
|
|
415
415
|
* them for later execution as appropriate
|
|
416
416
|
* @param {Effect} root
|
|
417
417
|
* @param {Effect[]} effects
|
|
418
418
|
* @param {Effect[]} render_effects
|
|
419
419
|
*/
|
|
420
|
-
|
|
420
|
+
Br = function(e, r, i) {
|
|
421
421
|
e.f ^= N;
|
|
422
422
|
for (var o = e.first, n = null; o !== null; ) {
|
|
423
|
-
var s = o.f, l = (s & (be |
|
|
423
|
+
var s = o.f, l = (s & (be | Qe)) !== 0, c = l && (s & N) !== 0, a = c || (s & te) !== 0 || f(this, Ce).has(o);
|
|
424
424
|
if (!a && o.fn !== null) {
|
|
425
|
-
l ? o.f ^= N : n !== null && (s & (Ht |
|
|
425
|
+
l ? o.f ^= N : n !== null && (s & (Ht | vr | io)) !== 0 ? n.b.defer_effect(o) : (s & Ht) !== 0 ? r.push(o) : Qt(o) && ((s & He) !== 0 && f(this, ot).add(o), Mt(o));
|
|
426
426
|
var u = o.first;
|
|
427
427
|
if (u !== null) {
|
|
428
428
|
o = u;
|
|
@@ -442,15 +442,15 @@ xr = function(e, r, i) {
|
|
|
442
442
|
}, /**
|
|
443
443
|
* @param {Effect[]} effects
|
|
444
444
|
*/
|
|
445
|
-
|
|
445
|
+
Ur = function(e) {
|
|
446
446
|
for (var r = 0; r < e.length; r += 1)
|
|
447
|
-
|
|
448
|
-
},
|
|
447
|
+
go(e[r], f(this, Gt), f(this, ot));
|
|
448
|
+
}, mo = function() {
|
|
449
449
|
var o;
|
|
450
|
-
if (
|
|
450
|
+
if (Xt.size > 1) {
|
|
451
451
|
this.previous.clear();
|
|
452
452
|
var e = he, r = !0;
|
|
453
|
-
for (const n of
|
|
453
|
+
for (const n of Xt) {
|
|
454
454
|
if (n === this) {
|
|
455
455
|
r = !1;
|
|
456
456
|
continue;
|
|
@@ -468,111 +468,111 @@ Br = function(e) {
|
|
|
468
468
|
continue;
|
|
469
469
|
const l = [...n.current.keys()].filter((c) => !this.current.has(c));
|
|
470
470
|
if (l.length > 0) {
|
|
471
|
-
var i =
|
|
472
|
-
|
|
471
|
+
var i = K;
|
|
472
|
+
K = [];
|
|
473
473
|
const c = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
|
|
474
474
|
for (const u of s)
|
|
475
|
-
|
|
476
|
-
if (
|
|
475
|
+
_o(u, l, c, a);
|
|
476
|
+
if (K.length > 0) {
|
|
477
477
|
O = n, n.apply();
|
|
478
|
-
for (const u of
|
|
479
|
-
U(o = n, $e,
|
|
478
|
+
for (const u of K)
|
|
479
|
+
U(o = n, $e, Br).call(o, u, [], []);
|
|
480
480
|
n.deactivate();
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
K = i;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
O = null, he = e;
|
|
486
486
|
}
|
|
487
|
-
this.committed = !0,
|
|
487
|
+
this.committed = !0, Xt.delete(this);
|
|
488
488
|
};
|
|
489
|
-
let
|
|
490
|
-
function
|
|
491
|
-
var e =
|
|
492
|
-
|
|
489
|
+
let xe = yi;
|
|
490
|
+
function Pt(t) {
|
|
491
|
+
var e = Ft;
|
|
492
|
+
Ft = !0;
|
|
493
493
|
try {
|
|
494
494
|
for (var r; ; ) {
|
|
495
|
-
if (
|
|
496
|
-
return
|
|
495
|
+
if (Jn(), K.length === 0 && (O?.flush(), K.length === 0))
|
|
496
|
+
return _r = null, /** @type {T} */
|
|
497
497
|
r;
|
|
498
|
-
|
|
498
|
+
bo();
|
|
499
499
|
}
|
|
500
500
|
} finally {
|
|
501
|
-
|
|
501
|
+
Ft = e;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function bo() {
|
|
505
505
|
Hr = !0;
|
|
506
506
|
var t = null;
|
|
507
507
|
try {
|
|
508
|
-
for (var e = 0;
|
|
509
|
-
var r =
|
|
508
|
+
for (var e = 0; K.length > 0; ) {
|
|
509
|
+
var r = xe.ensure();
|
|
510
510
|
if (e++ > 1e3) {
|
|
511
511
|
var i, o;
|
|
512
|
-
|
|
512
|
+
Zn();
|
|
513
513
|
}
|
|
514
|
-
r.process(
|
|
514
|
+
r.process(K), We.clear();
|
|
515
515
|
}
|
|
516
516
|
} finally {
|
|
517
|
-
|
|
517
|
+
K = [], Hr = !1, _r = null;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Zn() {
|
|
521
521
|
try {
|
|
522
522
|
Hn();
|
|
523
523
|
} catch (t) {
|
|
524
|
-
|
|
524
|
+
Ot(t, _r);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
let
|
|
528
|
-
function
|
|
527
|
+
let Me = null;
|
|
528
|
+
function Oi(t) {
|
|
529
529
|
var e = t.length;
|
|
530
530
|
if (e !== 0) {
|
|
531
531
|
for (var r = 0; r < e; ) {
|
|
532
532
|
var i = t[r++];
|
|
533
|
-
if ((i.f & (
|
|
534
|
-
|
|
535
|
-
for (const o of
|
|
536
|
-
if ((o.f & (
|
|
533
|
+
if ((i.f & (Fe | te)) === 0 && Qt(i) && (Me = /* @__PURE__ */ new Set(), Mt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && qo(i), Me?.size > 0)) {
|
|
534
|
+
We.clear();
|
|
535
|
+
for (const o of Me) {
|
|
536
|
+
if ((o.f & (Fe | te)) !== 0) continue;
|
|
537
537
|
const n = [o];
|
|
538
538
|
let s = o.parent;
|
|
539
539
|
for (; s !== null; )
|
|
540
|
-
|
|
540
|
+
Me.has(s) && (Me.delete(s), n.push(s)), s = s.parent;
|
|
541
541
|
for (let l = n.length - 1; l >= 0; l--) {
|
|
542
542
|
const c = n[l];
|
|
543
|
-
(c.f & (
|
|
543
|
+
(c.f & (Fe | te)) === 0 && Mt(c);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
Me.clear();
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
|
|
549
|
+
Me = null;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function _o(t, e, r, i) {
|
|
553
553
|
if (!r.has(t) && (r.add(t), t.reactions !== null))
|
|
554
554
|
for (const o of t.reactions) {
|
|
555
555
|
const n = o.f;
|
|
556
|
-
(n & F) !== 0 ?
|
|
556
|
+
(n & F) !== 0 ? _o(
|
|
557
557
|
/** @type {Derived} */
|
|
558
558
|
o,
|
|
559
559
|
e,
|
|
560
560
|
r,
|
|
561
561
|
i
|
|
562
|
-
) : (n & (
|
|
562
|
+
) : (n & (li | He)) !== 0 && (n & x) === 0 && yo(o, e, i) && (V(o, x), ve(
|
|
563
563
|
/** @type {Effect} */
|
|
564
564
|
o
|
|
565
565
|
));
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function yo(t, e, r) {
|
|
569
569
|
const i = r.get(t);
|
|
570
570
|
if (i !== void 0) return i;
|
|
571
571
|
if (t.deps !== null)
|
|
572
572
|
for (const o of t.deps) {
|
|
573
|
-
if (
|
|
573
|
+
if ($t.call(e, o))
|
|
574
574
|
return !0;
|
|
575
|
-
if ((o.f & F) !== 0 &&
|
|
575
|
+
if ((o.f & F) !== 0 && yo(
|
|
576
576
|
/** @type {Derived} */
|
|
577
577
|
o,
|
|
578
578
|
e,
|
|
@@ -587,41 +587,41 @@ function _o(t, e, r) {
|
|
|
587
587
|
return r.set(t, !1), !1;
|
|
588
588
|
}
|
|
589
589
|
function ve(t) {
|
|
590
|
-
for (var e =
|
|
590
|
+
for (var e = _r = t; e.parent !== null; ) {
|
|
591
591
|
e = e.parent;
|
|
592
592
|
var r = e.f;
|
|
593
|
-
if (Hr && e === L && (r & He) !== 0 && (r &
|
|
593
|
+
if (Hr && e === L && (r & He) !== 0 && (r & oo) === 0)
|
|
594
594
|
return;
|
|
595
|
-
if ((r & (
|
|
595
|
+
if ((r & (Qe | be)) !== 0) {
|
|
596
596
|
if ((r & N) === 0) return;
|
|
597
597
|
e.f ^= N;
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
|
|
600
|
+
K.push(e);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function wo(t, e) {
|
|
603
603
|
if (!((t.f & be) !== 0 && (t.f & N) !== 0)) {
|
|
604
|
-
(t.f &
|
|
604
|
+
(t.f & x) !== 0 ? e.d.push(t) : (t.f & me) !== 0 && e.m.push(t), V(t, N);
|
|
605
605
|
for (var r = t.first; r !== null; )
|
|
606
|
-
|
|
606
|
+
wo(r, e), r = r.next;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
let e = 0, r =
|
|
609
|
+
function es(t) {
|
|
610
|
+
let e = 0, r = dt(0), i;
|
|
611
611
|
return () => {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
e -= 1, e === 0 && (i?.(), i = void 0,
|
|
612
|
+
di() && (g(r), pi(() => (e === 0 && (i = mi(() => t(() => xt(r)))), e += 1, () => {
|
|
613
|
+
ct(() => {
|
|
614
|
+
e -= 1, e === 0 && (i?.(), i = void 0, xt(r));
|
|
615
615
|
});
|
|
616
616
|
})));
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
function
|
|
621
|
-
new
|
|
619
|
+
var ts = Rt | ht;
|
|
620
|
+
function rs(t, e, r) {
|
|
621
|
+
new is(t, e, r);
|
|
622
622
|
}
|
|
623
|
-
var ne,
|
|
624
|
-
class
|
|
623
|
+
var ne, zt, Ne, nt, Te, Ie, X, Ee, De, st, Ue, It, Et, St, Pe, ur, B, ko, To, Gr, or, zr;
|
|
624
|
+
class is {
|
|
625
625
|
/**
|
|
626
626
|
* @param {TemplateNode} node
|
|
627
627
|
* @param {BoundaryProps} props
|
|
@@ -635,11 +635,11 @@ class rs {
|
|
|
635
635
|
/** @type {TemplateNode} */
|
|
636
636
|
I(this, ne);
|
|
637
637
|
/** @type {TemplateNode | null} */
|
|
638
|
-
I(this,
|
|
638
|
+
I(this, zt, R ? A : null);
|
|
639
639
|
/** @type {BoundaryProps} */
|
|
640
|
-
I(this,
|
|
640
|
+
I(this, Ne);
|
|
641
641
|
/** @type {((anchor: Node) => void)} */
|
|
642
|
-
I(this,
|
|
642
|
+
I(this, nt);
|
|
643
643
|
/** @type {Effect} */
|
|
644
644
|
I(this, Te);
|
|
645
645
|
/** @type {Effect | null} */
|
|
@@ -649,14 +649,14 @@ class rs {
|
|
|
649
649
|
/** @type {Effect | null} */
|
|
650
650
|
I(this, Ee, null);
|
|
651
651
|
/** @type {DocumentFragment | null} */
|
|
652
|
-
I(this,
|
|
653
|
-
I(this,
|
|
654
|
-
I(this,
|
|
655
|
-
I(this,
|
|
656
|
-
/** @type {Set<Effect>} */
|
|
657
|
-
I(this, It, /* @__PURE__ */ new Set());
|
|
652
|
+
I(this, De, null);
|
|
653
|
+
I(this, st, 0);
|
|
654
|
+
I(this, Ue, 0);
|
|
655
|
+
I(this, It, !1);
|
|
658
656
|
/** @type {Set<Effect>} */
|
|
659
657
|
I(this, Et, /* @__PURE__ */ new Set());
|
|
658
|
+
/** @type {Set<Effect>} */
|
|
659
|
+
I(this, St, /* @__PURE__ */ new Set());
|
|
660
660
|
/**
|
|
661
661
|
* A source containing the number of pending async deriveds/expressions.
|
|
662
662
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -664,34 +664,34 @@ class rs {
|
|
|
664
664
|
* calls followed by no-op flushes
|
|
665
665
|
* @type {Source<number> | null}
|
|
666
666
|
*/
|
|
667
|
-
I(this,
|
|
668
|
-
I(this,
|
|
669
|
-
T(this,
|
|
667
|
+
I(this, Pe, null);
|
|
668
|
+
I(this, ur, es(() => (T(this, Pe, dt(f(this, st))), () => {
|
|
669
|
+
T(this, Pe, null);
|
|
670
670
|
})));
|
|
671
|
-
T(this, ne, e), T(this,
|
|
671
|
+
T(this, ne, e), T(this, Ne, r), T(this, nt, (o) => {
|
|
672
672
|
var n = (
|
|
673
673
|
/** @type {Effect} */
|
|
674
674
|
L
|
|
675
675
|
);
|
|
676
|
-
n.b = this, n.f |=
|
|
676
|
+
n.b = this, n.f |= Fr, i(o);
|
|
677
677
|
}), this.parent = /** @type {Effect} */
|
|
678
|
-
L.b, T(this, Te,
|
|
678
|
+
L.b, T(this, Te, hi(() => {
|
|
679
679
|
if (R) {
|
|
680
680
|
const o = (
|
|
681
681
|
/** @type {Comment} */
|
|
682
|
-
f(this,
|
|
682
|
+
f(this, zt)
|
|
683
683
|
);
|
|
684
|
-
|
|
684
|
+
br(), o.data === pr ? U(this, B, To).call(this) : U(this, B, ko).call(this);
|
|
685
685
|
} else
|
|
686
|
-
U(this, B,
|
|
687
|
-
},
|
|
686
|
+
U(this, B, Gr).call(this);
|
|
687
|
+
}, ts)), R && T(this, ne, A);
|
|
688
688
|
}
|
|
689
689
|
/**
|
|
690
690
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
691
691
|
* @param {Effect} effect
|
|
692
692
|
*/
|
|
693
693
|
defer_effect(e) {
|
|
694
|
-
|
|
694
|
+
go(e, f(this, Et), f(this, St));
|
|
695
695
|
}
|
|
696
696
|
/**
|
|
697
697
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -701,7 +701,7 @@ class rs {
|
|
|
701
701
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
702
702
|
}
|
|
703
703
|
has_pending_snippet() {
|
|
704
|
-
return !!f(this,
|
|
704
|
+
return !!f(this, Ne).pending;
|
|
705
705
|
}
|
|
706
706
|
/**
|
|
707
707
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -710,60 +710,60 @@ class rs {
|
|
|
710
710
|
* @param {1 | -1} d
|
|
711
711
|
*/
|
|
712
712
|
update_pending_count(e) {
|
|
713
|
-
U(this, B,
|
|
714
|
-
T(this,
|
|
713
|
+
U(this, B, zr).call(this, e), T(this, st, f(this, st) + e), !(!f(this, Pe) || f(this, It)) && (T(this, It, !0), ct(() => {
|
|
714
|
+
T(this, It, !1), f(this, Pe) && Vt(f(this, Pe), f(this, st));
|
|
715
715
|
}));
|
|
716
716
|
}
|
|
717
717
|
get_effect_pending() {
|
|
718
|
-
return f(this,
|
|
718
|
+
return f(this, ur).call(this), g(
|
|
719
719
|
/** @type {Source<number>} */
|
|
720
|
-
f(this,
|
|
720
|
+
f(this, Pe)
|
|
721
721
|
);
|
|
722
722
|
}
|
|
723
723
|
/** @param {unknown} error */
|
|
724
724
|
error(e) {
|
|
725
|
-
var r = f(this,
|
|
726
|
-
let i = f(this,
|
|
725
|
+
var r = f(this, Ne).onerror;
|
|
726
|
+
let i = f(this, Ne).failed;
|
|
727
727
|
if (!r && !i)
|
|
728
728
|
throw e;
|
|
729
729
|
f(this, Ie) && (G(f(this, Ie)), T(this, Ie, null)), f(this, X) && (G(f(this, X)), T(this, X, null)), f(this, Ee) && (G(f(this, Ee)), T(this, Ee, null)), R && (Q(
|
|
730
730
|
/** @type {TemplateNode} */
|
|
731
|
-
f(this,
|
|
732
|
-
),
|
|
731
|
+
f(this, zt)
|
|
732
|
+
), no(), Q(fr()));
|
|
733
733
|
var o = !1, n = !1;
|
|
734
734
|
const s = () => {
|
|
735
735
|
if (o) {
|
|
736
736
|
Kn();
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
o = !0, n &&
|
|
739
|
+
o = !0, n && Wn(), f(this, Ee) !== null && at(f(this, Ee), () => {
|
|
740
740
|
T(this, Ee, null);
|
|
741
|
-
}), U(this, B,
|
|
742
|
-
|
|
741
|
+
}), U(this, B, or).call(this, () => {
|
|
742
|
+
xe.ensure(), U(this, B, Gr).call(this);
|
|
743
743
|
});
|
|
744
744
|
};
|
|
745
|
-
|
|
745
|
+
ct(() => {
|
|
746
746
|
try {
|
|
747
747
|
n = !0, r?.(e, s), n = !1;
|
|
748
748
|
} catch (l) {
|
|
749
|
-
|
|
749
|
+
Ot(l, f(this, Te) && f(this, Te).parent);
|
|
750
750
|
}
|
|
751
|
-
i && T(this, Ee, U(this, B,
|
|
752
|
-
|
|
751
|
+
i && T(this, Ee, U(this, B, or).call(this, () => {
|
|
752
|
+
xe.ensure();
|
|
753
753
|
try {
|
|
754
754
|
return pe(() => {
|
|
755
755
|
var l = (
|
|
756
756
|
/** @type {Effect} */
|
|
757
757
|
L
|
|
758
758
|
);
|
|
759
|
-
l.b = this, l.f |=
|
|
759
|
+
l.b = this, l.f |= Fr, i(
|
|
760
760
|
f(this, ne),
|
|
761
761
|
() => e,
|
|
762
762
|
() => s
|
|
763
763
|
);
|
|
764
764
|
});
|
|
765
765
|
} catch (l) {
|
|
766
|
-
return
|
|
766
|
+
return Ot(
|
|
767
767
|
l,
|
|
768
768
|
/** @type {Effect} */
|
|
769
769
|
f(this, Te).parent
|
|
@@ -773,17 +773,17 @@ class rs {
|
|
|
773
773
|
});
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
|
-
ne = new WeakMap(),
|
|
776
|
+
ne = new WeakMap(), zt = new WeakMap(), Ne = new WeakMap(), nt = new WeakMap(), Te = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), Ee = new WeakMap(), De = new WeakMap(), st = new WeakMap(), Ue = new WeakMap(), It = new WeakMap(), Et = new WeakMap(), St = new WeakMap(), Pe = new WeakMap(), ur = new WeakMap(), B = new WeakSet(), ko = function() {
|
|
777
777
|
try {
|
|
778
|
-
T(this, Ie, pe(() => f(this,
|
|
778
|
+
T(this, Ie, pe(() => f(this, nt).call(this, f(this, ne))));
|
|
779
779
|
} catch (e) {
|
|
780
780
|
this.error(e);
|
|
781
781
|
}
|
|
782
|
-
},
|
|
783
|
-
const e = f(this,
|
|
784
|
-
e && (this.is_pending = !0, T(this, X, pe(() => e(f(this, ne)))),
|
|
785
|
-
var r = T(this,
|
|
786
|
-
r.append(i), T(this, Ie, U(this, B,
|
|
782
|
+
}, To = function() {
|
|
783
|
+
const e = f(this, Ne).pending;
|
|
784
|
+
e && (this.is_pending = !0, T(this, X, pe(() => e(f(this, ne)))), ct(() => {
|
|
785
|
+
var r = T(this, De, document.createDocumentFragment()), i = ce();
|
|
786
|
+
r.append(i), T(this, Ie, U(this, B, or).call(this, () => (xe.ensure(), pe(() => f(this, nt).call(this, i))))), f(this, Ue) === 0 && (f(this, ne).before(r), T(this, De, null), at(
|
|
787
787
|
/** @type {Effect} */
|
|
788
788
|
f(this, X),
|
|
789
789
|
() => {
|
|
@@ -791,16 +791,16 @@ ne = new WeakMap(), Gt = new WeakMap(), Ce = new WeakMap(), ot = new WeakMap(),
|
|
|
791
791
|
}
|
|
792
792
|
), this.is_pending = !1);
|
|
793
793
|
}));
|
|
794
|
-
},
|
|
794
|
+
}, Gr = function() {
|
|
795
795
|
try {
|
|
796
|
-
if (this.is_pending = this.has_pending_snippet(), T(this,
|
|
797
|
-
f(this,
|
|
798
|
-
})), f(this,
|
|
799
|
-
var e = T(this,
|
|
800
|
-
|
|
796
|
+
if (this.is_pending = this.has_pending_snippet(), T(this, Ue, 0), T(this, st, 0), T(this, Ie, pe(() => {
|
|
797
|
+
f(this, nt).call(this, f(this, ne));
|
|
798
|
+
})), f(this, Ue) > 0) {
|
|
799
|
+
var e = T(this, De, document.createDocumentFragment());
|
|
800
|
+
xo(f(this, Ie), e);
|
|
801
801
|
const r = (
|
|
802
802
|
/** @type {(anchor: Node) => void} */
|
|
803
|
-
f(this,
|
|
803
|
+
f(this, Ne).pending
|
|
804
804
|
);
|
|
805
805
|
T(this, X, pe(() => r(f(this, ne))));
|
|
806
806
|
} else
|
|
@@ -812,40 +812,40 @@ ne = new WeakMap(), Gt = new WeakMap(), Ce = new WeakMap(), ot = new WeakMap(),
|
|
|
812
812
|
* @template T
|
|
813
813
|
* @param {() => T} fn
|
|
814
814
|
*/
|
|
815
|
-
|
|
815
|
+
or = function(e) {
|
|
816
816
|
var r = L, i = E, o = re;
|
|
817
|
-
Ae(f(this, Te)), fe(f(this, Te)),
|
|
817
|
+
Ae(f(this, Te)), fe(f(this, Te)), Lt(f(this, Te).ctx);
|
|
818
818
|
try {
|
|
819
819
|
return e();
|
|
820
820
|
} catch (n) {
|
|
821
|
-
return
|
|
821
|
+
return ho(n), null;
|
|
822
822
|
} finally {
|
|
823
|
-
Ae(r), fe(i),
|
|
823
|
+
Ae(r), fe(i), Lt(o);
|
|
824
824
|
}
|
|
825
825
|
}, /**
|
|
826
826
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
827
827
|
* if any, such that we can replace the snippet with content once work is done
|
|
828
828
|
* @param {1 | -1} d
|
|
829
829
|
*/
|
|
830
|
-
|
|
830
|
+
zr = function(e) {
|
|
831
831
|
var r;
|
|
832
832
|
if (!this.has_pending_snippet()) {
|
|
833
|
-
this.parent && U(r = this.parent, B,
|
|
833
|
+
this.parent && U(r = this.parent, B, zr).call(r, e);
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
|
-
if (T(this,
|
|
836
|
+
if (T(this, Ue, f(this, Ue) + e), f(this, Ue) === 0) {
|
|
837
837
|
this.is_pending = !1;
|
|
838
|
-
for (const i of f(this, It))
|
|
839
|
-
V(i, H), ve(i);
|
|
840
838
|
for (const i of f(this, Et))
|
|
839
|
+
V(i, x), ve(i);
|
|
840
|
+
for (const i of f(this, St))
|
|
841
841
|
V(i, me), ve(i);
|
|
842
|
-
f(this,
|
|
842
|
+
f(this, Et).clear(), f(this, St).clear(), f(this, X) && at(f(this, X), () => {
|
|
843
843
|
T(this, X, null);
|
|
844
|
-
}), f(this,
|
|
844
|
+
}), f(this, De) && (f(this, ne).before(f(this, De)), T(this, De, null));
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
|
-
function
|
|
848
|
-
const o =
|
|
847
|
+
function os(t, e, r, i) {
|
|
848
|
+
const o = yr;
|
|
849
849
|
var n = t.filter((p) => !p.settled);
|
|
850
850
|
if (r.length === 0 && n.length === 0) {
|
|
851
851
|
i(e.map(o));
|
|
@@ -854,45 +854,45 @@ function is(t, e, r, i) {
|
|
|
854
854
|
var s = O, l = (
|
|
855
855
|
/** @type {Effect} */
|
|
856
856
|
L
|
|
857
|
-
), c =
|
|
857
|
+
), c = ns(), a = n.length === 1 ? n[0].promise : n.length > 1 ? Promise.all(n.map((p) => p.promise)) : null;
|
|
858
858
|
function u(p) {
|
|
859
859
|
c();
|
|
860
860
|
try {
|
|
861
861
|
i(p);
|
|
862
862
|
} catch (v) {
|
|
863
|
-
(l.f &
|
|
863
|
+
(l.f & Fe) === 0 && Ot(v, l);
|
|
864
864
|
}
|
|
865
|
-
s?.deactivate(),
|
|
865
|
+
s?.deactivate(), Wr();
|
|
866
866
|
}
|
|
867
867
|
if (r.length === 0) {
|
|
868
868
|
a.then(() => u(e.map(o)));
|
|
869
869
|
return;
|
|
870
870
|
}
|
|
871
871
|
function h() {
|
|
872
|
-
c(), Promise.all(r.map((p) => /* @__PURE__ */
|
|
872
|
+
c(), Promise.all(r.map((p) => /* @__PURE__ */ ss(p))).then((p) => u([...e.map(o), ...p])).catch((p) => Ot(p, l));
|
|
873
873
|
}
|
|
874
874
|
a ? a.then(h) : h();
|
|
875
875
|
}
|
|
876
|
-
function
|
|
876
|
+
function ns() {
|
|
877
877
|
var t = L, e = E, r = re, i = O;
|
|
878
878
|
return function(n = !0) {
|
|
879
|
-
Ae(t), fe(e),
|
|
879
|
+
Ae(t), fe(e), Lt(r), n && i?.activate();
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
function
|
|
883
|
-
Ae(null), fe(null),
|
|
882
|
+
function Wr() {
|
|
883
|
+
Ae(null), fe(null), Lt(null);
|
|
884
884
|
}
|
|
885
885
|
// @__NO_SIDE_EFFECTS__
|
|
886
|
-
function
|
|
887
|
-
var e = F |
|
|
886
|
+
function yr(t) {
|
|
887
|
+
var e = F | x, r = E !== null && (E.f & F) !== 0 ? (
|
|
888
888
|
/** @type {Derived} */
|
|
889
889
|
E
|
|
890
890
|
) : null;
|
|
891
|
-
return L !== null && (L.f |=
|
|
891
|
+
return L !== null && (L.f |= ht), {
|
|
892
892
|
ctx: re,
|
|
893
893
|
deps: null,
|
|
894
894
|
effects: null,
|
|
895
|
-
equals:
|
|
895
|
+
equals: lo,
|
|
896
896
|
f: e,
|
|
897
897
|
fn: t,
|
|
898
898
|
reactions: null,
|
|
@@ -907,12 +907,12 @@ function _r(t) {
|
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
909
|
// @__NO_SIDE_EFFECTS__
|
|
910
|
-
function
|
|
910
|
+
function ss(t, e, r) {
|
|
911
911
|
let i = (
|
|
912
912
|
/** @type {Effect | null} */
|
|
913
913
|
L
|
|
914
914
|
);
|
|
915
|
-
i === null &&
|
|
915
|
+
i === null && Pn();
|
|
916
916
|
var o = (
|
|
917
917
|
/** @type {Boundary} */
|
|
918
918
|
i.b
|
|
@@ -920,19 +920,19 @@ function ns(t, e, r) {
|
|
|
920
920
|
/** @type {Promise<V>} */
|
|
921
921
|
/** @type {unknown} */
|
|
922
922
|
void 0
|
|
923
|
-
), s =
|
|
923
|
+
), s = dt(
|
|
924
924
|
/** @type {V} */
|
|
925
925
|
j
|
|
926
926
|
), l = !E, c = /* @__PURE__ */ new Map();
|
|
927
|
-
return
|
|
928
|
-
var a =
|
|
927
|
+
return bs(() => {
|
|
928
|
+
var a = ro();
|
|
929
929
|
n = a.promise;
|
|
930
930
|
try {
|
|
931
931
|
Promise.resolve(t()).then(a.resolve, a.reject).then(() => {
|
|
932
|
-
u === O && u.committed && u.deactivate(),
|
|
932
|
+
u === O && u.committed && u.deactivate(), Wr();
|
|
933
933
|
});
|
|
934
934
|
} catch (v) {
|
|
935
|
-
a.reject(v),
|
|
935
|
+
a.reject(v), Wr();
|
|
936
936
|
}
|
|
937
937
|
var u = (
|
|
938
938
|
/** @type {Batch} */
|
|
@@ -940,24 +940,24 @@ function ns(t, e, r) {
|
|
|
940
940
|
);
|
|
941
941
|
if (l) {
|
|
942
942
|
var h = o.is_rendered();
|
|
943
|
-
o.update_pending_count(1), u.increment(h), c.get(u)?.reject(
|
|
943
|
+
o.update_pending_count(1), u.increment(h), c.get(u)?.reject(Ze), c.delete(u), c.set(u, a);
|
|
944
944
|
}
|
|
945
945
|
const p = (v, d = void 0) => {
|
|
946
946
|
if (u.activate(), d)
|
|
947
|
-
d !==
|
|
947
|
+
d !== Ze && (s.f |= ze, Vt(s, d));
|
|
948
948
|
else {
|
|
949
|
-
(s.f &
|
|
949
|
+
(s.f & ze) !== 0 && (s.f ^= ze), Vt(s, v);
|
|
950
950
|
for (const [w, b] of c) {
|
|
951
951
|
if (c.delete(w), w === u) break;
|
|
952
|
-
b.reject(
|
|
952
|
+
b.reject(Ze);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
955
|
l && (o.update_pending_count(-1), u.decrement(h));
|
|
956
956
|
};
|
|
957
957
|
a.promise.then(p, (v) => p(null, v || "unknown"));
|
|
958
|
-
}),
|
|
958
|
+
}), vs(() => {
|
|
959
959
|
for (const a of c.values())
|
|
960
|
-
a.reject(
|
|
960
|
+
a.reject(Ze);
|
|
961
961
|
}), new Promise((a) => {
|
|
962
962
|
function u(h) {
|
|
963
963
|
function p() {
|
|
@@ -969,16 +969,16 @@ function ns(t, e, r) {
|
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
// @__NO_SIDE_EFFECTS__
|
|
972
|
-
function
|
|
973
|
-
const e = /* @__PURE__ */
|
|
972
|
+
function Dr(t) {
|
|
973
|
+
const e = /* @__PURE__ */ yr(t);
|
|
974
974
|
return Ho(e), e;
|
|
975
975
|
}
|
|
976
976
|
// @__NO_SIDE_EFFECTS__
|
|
977
|
-
function ss(t) {
|
|
978
|
-
const e = /* @__PURE__ */ _r(t);
|
|
979
|
-
return e.equals = lo, e;
|
|
980
|
-
}
|
|
981
977
|
function ls(t) {
|
|
978
|
+
const e = /* @__PURE__ */ yr(t);
|
|
979
|
+
return e.equals = co, e;
|
|
980
|
+
}
|
|
981
|
+
function cs(t) {
|
|
982
982
|
var e = t.effects;
|
|
983
983
|
if (e !== null) {
|
|
984
984
|
t.effects = null;
|
|
@@ -989,10 +989,10 @@ function ls(t) {
|
|
|
989
989
|
);
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function as(t) {
|
|
993
993
|
for (var e = t.parent; e !== null; ) {
|
|
994
994
|
if ((e.f & F) === 0)
|
|
995
|
-
return (e.f &
|
|
995
|
+
return (e.f & Fe) === 0 ? (
|
|
996
996
|
/** @type {Effect} */
|
|
997
997
|
e
|
|
998
998
|
) : null;
|
|
@@ -1000,44 +1000,44 @@ function cs(t) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
return null;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function ai(t) {
|
|
1004
1004
|
var e, r = L;
|
|
1005
|
-
Ae(
|
|
1005
|
+
Ae(as(t));
|
|
1006
1006
|
try {
|
|
1007
|
-
t.f &= ~
|
|
1007
|
+
t.f &= ~ut, cs(t), e = zo(t);
|
|
1008
1008
|
} finally {
|
|
1009
1009
|
Ae(r);
|
|
1010
1010
|
}
|
|
1011
1011
|
return e;
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1014
|
-
var e =
|
|
1015
|
-
if (!t.equals(e) && (t.wv =
|
|
1013
|
+
function Io(t) {
|
|
1014
|
+
var e = ai(t);
|
|
1015
|
+
if (!t.equals(e) && (t.wv = Uo(), (!O?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1016
1016
|
V(t, N);
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
|
-
Ye || (he !== null ? (
|
|
1019
|
+
Ye || (he !== null ? (di() || O?.is_fork) && he.set(t, e) : ci(t));
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function fs(t) {
|
|
1022
1022
|
if (t.effects !== null)
|
|
1023
1023
|
for (const e of t.effects)
|
|
1024
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
1024
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ze), e.teardown = Ln, e.ac = null, Bt(e, 0), vi(e));
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Eo(t) {
|
|
1027
1027
|
if (t.effects !== null)
|
|
1028
1028
|
for (const e of t.effects)
|
|
1029
|
-
e.teardown &&
|
|
1029
|
+
e.teardown && Mt(e);
|
|
1030
1030
|
}
|
|
1031
1031
|
let Kr = /* @__PURE__ */ new Set();
|
|
1032
|
-
const
|
|
1033
|
-
let
|
|
1034
|
-
function
|
|
1032
|
+
const We = /* @__PURE__ */ new Map();
|
|
1033
|
+
let So = !1;
|
|
1034
|
+
function dt(t, e) {
|
|
1035
1035
|
var r = {
|
|
1036
1036
|
f: 0,
|
|
1037
1037
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1038
1038
|
v: t,
|
|
1039
1039
|
reactions: null,
|
|
1040
|
-
equals:
|
|
1040
|
+
equals: lo,
|
|
1041
1041
|
rv: 0,
|
|
1042
1042
|
wv: 0
|
|
1043
1043
|
};
|
|
@@ -1045,58 +1045,58 @@ function ut(t, e) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
// @__NO_SIDE_EFFECTS__
|
|
1047
1047
|
function ee(t, e) {
|
|
1048
|
-
const r =
|
|
1048
|
+
const r = dt(t);
|
|
1049
1049
|
return Ho(r), r;
|
|
1050
1050
|
}
|
|
1051
1051
|
// @__NO_SIDE_EFFECTS__
|
|
1052
|
-
function
|
|
1053
|
-
const i =
|
|
1054
|
-
return e || (i.equals =
|
|
1052
|
+
function Ao(t, e = !1, r = !0) {
|
|
1053
|
+
const i = dt(t);
|
|
1054
|
+
return e || (i.equals = co), i;
|
|
1055
1055
|
}
|
|
1056
1056
|
function C(t, e, r = !1) {
|
|
1057
1057
|
E !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1058
1058
|
// to ensure we error if state is set inside an inspect effect
|
|
1059
|
-
(!ge || (E.f &
|
|
1060
|
-
let i = r ?
|
|
1061
|
-
return
|
|
1059
|
+
(!ge || (E.f & Li) !== 0) && uo() && (E.f & (F | He | li | Li)) !== 0 && (ae === null || !$t.call(ae, t)) && zn();
|
|
1060
|
+
let i = r ? qt(e) : e;
|
|
1061
|
+
return Vt(t, i);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Vt(t, e) {
|
|
1064
1064
|
if (!t.equals(e)) {
|
|
1065
1065
|
var r = t.v;
|
|
1066
|
-
Ye ?
|
|
1067
|
-
var i =
|
|
1066
|
+
Ye ? We.set(t, e) : We.set(t, r), t.v = e;
|
|
1067
|
+
var i = xe.ensure();
|
|
1068
1068
|
if (i.capture(t, r), (t.f & F) !== 0) {
|
|
1069
1069
|
const o = (
|
|
1070
1070
|
/** @type {Derived} */
|
|
1071
1071
|
t
|
|
1072
1072
|
);
|
|
1073
|
-
(t.f &
|
|
1073
|
+
(t.f & x) !== 0 && ai(o), ci(o);
|
|
1074
1074
|
}
|
|
1075
|
-
t.wv =
|
|
1075
|
+
t.wv = Uo(), $o(t, x), L !== null && (L.f & N) !== 0 && (L.f & (be | Qe)) === 0 && (oe === null ? ws([t]) : oe.push(t)), !i.is_fork && Kr.size > 0 && !So && us();
|
|
1076
1076
|
}
|
|
1077
1077
|
return e;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
|
|
1079
|
+
function us() {
|
|
1080
|
+
So = !1;
|
|
1081
1081
|
for (const t of Kr)
|
|
1082
|
-
(t.f & N) !== 0 && V(t, me),
|
|
1082
|
+
(t.f & N) !== 0 && V(t, me), Qt(t) && Mt(t);
|
|
1083
1083
|
Kr.clear();
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function xt(t) {
|
|
1086
1086
|
C(t, t.v + 1);
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function $o(t, e) {
|
|
1089
1089
|
var r = t.reactions;
|
|
1090
1090
|
if (r !== null)
|
|
1091
1091
|
for (var i = r.length, o = 0; o < i; o++) {
|
|
1092
|
-
var n = r[o], s = n.f, l = (s &
|
|
1092
|
+
var n = r[o], s = n.f, l = (s & x) === 0;
|
|
1093
1093
|
if (l && V(n, e), (s & F) !== 0) {
|
|
1094
1094
|
var c = (
|
|
1095
1095
|
/** @type {Derived} */
|
|
1096
1096
|
n
|
|
1097
1097
|
);
|
|
1098
|
-
he?.delete(c), (s &
|
|
1099
|
-
} else l && ((s & He) !== 0 &&
|
|
1098
|
+
he?.delete(c), (s & ut) === 0 && (s & le && (n.f |= ut), $o(c, me));
|
|
1099
|
+
} else l && ((s & He) !== 0 && Me !== null && Me.add(
|
|
1100
1100
|
/** @type {Effect} */
|
|
1101
1101
|
n
|
|
1102
1102
|
), ve(
|
|
@@ -1105,19 +1105,19 @@ function Ao(t, e) {
|
|
|
1105
1105
|
));
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1109
|
-
if (typeof t != "object" || t === null ||
|
|
1108
|
+
function qt(t) {
|
|
1109
|
+
if (typeof t != "object" || t === null || ir in t)
|
|
1110
1110
|
return t;
|
|
1111
|
-
const e =
|
|
1112
|
-
if (e !==
|
|
1111
|
+
const e = to(t);
|
|
1112
|
+
if (e !== $n && e !== Rn)
|
|
1113
1113
|
return t;
|
|
1114
|
-
var r = /* @__PURE__ */ new Map(), i =
|
|
1115
|
-
if (
|
|
1114
|
+
var r = /* @__PURE__ */ new Map(), i = eo(t), o = /* @__PURE__ */ ee(0), n = ft, s = (l) => {
|
|
1115
|
+
if (ft === n)
|
|
1116
1116
|
return l();
|
|
1117
|
-
var c = E, a =
|
|
1118
|
-
fe(null),
|
|
1117
|
+
var c = E, a = ft;
|
|
1118
|
+
fe(null), Ni(n);
|
|
1119
1119
|
var u = l();
|
|
1120
|
-
return fe(c),
|
|
1120
|
+
return fe(c), Ni(a), u;
|
|
1121
1121
|
};
|
|
1122
1122
|
return i && r.set("length", /* @__PURE__ */ ee(
|
|
1123
1123
|
/** @type {any[]} */
|
|
@@ -1127,7 +1127,7 @@ function Pt(t) {
|
|
|
1127
1127
|
t,
|
|
1128
1128
|
{
|
|
1129
1129
|
defineProperty(l, c, a) {
|
|
1130
|
-
(!("value" in a) || a.configurable === !1 || a.enumerable === !1 || a.writable === !1) &&
|
|
1130
|
+
(!("value" in a) || a.configurable === !1 || a.enumerable === !1 || a.writable === !1) && Un();
|
|
1131
1131
|
var u = r.get(c);
|
|
1132
1132
|
return u === void 0 ? s(() => {
|
|
1133
1133
|
var h = /* @__PURE__ */ ee(a.value);
|
|
@@ -1139,18 +1139,18 @@ function Pt(t) {
|
|
|
1139
1139
|
if (a === void 0) {
|
|
1140
1140
|
if (c in l) {
|
|
1141
1141
|
const u = s(() => /* @__PURE__ */ ee(j));
|
|
1142
|
-
r.set(c, u),
|
|
1142
|
+
r.set(c, u), xt(o);
|
|
1143
1143
|
}
|
|
1144
1144
|
} else
|
|
1145
|
-
C(a, j),
|
|
1145
|
+
C(a, j), xt(o);
|
|
1146
1146
|
return !0;
|
|
1147
1147
|
},
|
|
1148
1148
|
get(l, c, a) {
|
|
1149
|
-
if (c ===
|
|
1149
|
+
if (c === ir)
|
|
1150
1150
|
return t;
|
|
1151
1151
|
var u = r.get(c), h = c in l;
|
|
1152
|
-
if (u === void 0 && (!h ||
|
|
1153
|
-
var v =
|
|
1152
|
+
if (u === void 0 && (!h || _t(l, c)?.writable) && (u = s(() => {
|
|
1153
|
+
var v = qt(h ? l[c] : j), d = /* @__PURE__ */ ee(v);
|
|
1154
1154
|
return d;
|
|
1155
1155
|
}), r.set(c, u)), u !== void 0) {
|
|
1156
1156
|
var p = g(u);
|
|
@@ -1176,12 +1176,12 @@ function Pt(t) {
|
|
|
1176
1176
|
return a;
|
|
1177
1177
|
},
|
|
1178
1178
|
has(l, c) {
|
|
1179
|
-
if (c ===
|
|
1179
|
+
if (c === ir)
|
|
1180
1180
|
return !0;
|
|
1181
1181
|
var a = r.get(c), u = a !== void 0 && a.v !== j || Reflect.has(l, c);
|
|
1182
|
-
if (a !== void 0 || L !== null && (!u ||
|
|
1182
|
+
if (a !== void 0 || L !== null && (!u || _t(l, c)?.writable)) {
|
|
1183
1183
|
a === void 0 && (a = s(() => {
|
|
1184
|
-
var p = u ?
|
|
1184
|
+
var p = u ? qt(l[c]) : j, v = /* @__PURE__ */ ee(p);
|
|
1185
1185
|
return v;
|
|
1186
1186
|
}), r.set(c, a));
|
|
1187
1187
|
var h = g(a);
|
|
@@ -1199,10 +1199,10 @@ function Pt(t) {
|
|
|
1199
1199
|
d !== void 0 ? C(d, j) : v in l && (d = s(() => /* @__PURE__ */ ee(j)), r.set(v + "", d));
|
|
1200
1200
|
}
|
|
1201
1201
|
if (h === void 0)
|
|
1202
|
-
(!p ||
|
|
1202
|
+
(!p || _t(l, c)?.writable) && (h = s(() => /* @__PURE__ */ ee(void 0)), C(h, qt(a)), r.set(c, h));
|
|
1203
1203
|
else {
|
|
1204
1204
|
p = h.v !== j;
|
|
1205
|
-
var w = s(() =>
|
|
1205
|
+
var w = s(() => qt(a));
|
|
1206
1206
|
C(h, w);
|
|
1207
1207
|
}
|
|
1208
1208
|
var b = Reflect.getOwnPropertyDescriptor(l, c);
|
|
@@ -1214,7 +1214,7 @@ function Pt(t) {
|
|
|
1214
1214
|
), S = Number(c);
|
|
1215
1215
|
Number.isInteger(S) && S >= $.v && C($, S + 1);
|
|
1216
1216
|
}
|
|
1217
|
-
|
|
1217
|
+
xt(o);
|
|
1218
1218
|
}
|
|
1219
1219
|
return !0;
|
|
1220
1220
|
},
|
|
@@ -1229,17 +1229,17 @@ function Pt(t) {
|
|
|
1229
1229
|
return c;
|
|
1230
1230
|
},
|
|
1231
1231
|
setPrototypeOf() {
|
|
1232
|
-
|
|
1232
|
+
Gn();
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
1235
|
);
|
|
1236
1236
|
}
|
|
1237
|
-
var
|
|
1237
|
+
var Vi, Ro, Lo, Oo;
|
|
1238
1238
|
function Yr() {
|
|
1239
|
-
if (
|
|
1240
|
-
|
|
1239
|
+
if (Vi === void 0) {
|
|
1240
|
+
Vi = window, Ro = /Firefox/.test(navigator.userAgent);
|
|
1241
1241
|
var t = Element.prototype, e = Node.prototype, r = Text.prototype;
|
|
1242
|
-
|
|
1242
|
+
Lo = _t(e, "firstChild").get, Oo = _t(e, "nextSibling").get, Ri(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Ri(r) && (r.__t = void 0);
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
1245
|
function ce(t = "") {
|
|
@@ -1249,42 +1249,42 @@ function ce(t = "") {
|
|
|
1249
1249
|
function Ke(t) {
|
|
1250
1250
|
return (
|
|
1251
1251
|
/** @type {TemplateNode | null} */
|
|
1252
|
-
|
|
1252
|
+
Lo.call(t)
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
1255
1255
|
// @__NO_SIDE_EFFECTS__
|
|
1256
1256
|
function Re(t) {
|
|
1257
1257
|
return (
|
|
1258
1258
|
/** @type {TemplateNode | null} */
|
|
1259
|
-
|
|
1259
|
+
Oo.call(t)
|
|
1260
1260
|
);
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function H(t, e) {
|
|
1263
1263
|
if (!R)
|
|
1264
1264
|
return /* @__PURE__ */ Ke(t);
|
|
1265
1265
|
var r = /* @__PURE__ */ Ke(A);
|
|
1266
1266
|
if (r === null)
|
|
1267
1267
|
r = A.appendChild(ce());
|
|
1268
|
-
else if (e && r.nodeType !==
|
|
1268
|
+
else if (e && r.nodeType !== gr) {
|
|
1269
1269
|
var i = ce();
|
|
1270
1270
|
return r?.before(i), Q(i), i;
|
|
1271
1271
|
}
|
|
1272
|
-
return e &&
|
|
1272
|
+
return e && ui(
|
|
1273
1273
|
/** @type {Text} */
|
|
1274
1274
|
r
|
|
1275
1275
|
), Q(r), r;
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function ds(t, e = !1) {
|
|
1278
1278
|
if (!R) {
|
|
1279
1279
|
var r = /* @__PURE__ */ Ke(t);
|
|
1280
1280
|
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Re(r) : r;
|
|
1281
1281
|
}
|
|
1282
1282
|
if (e) {
|
|
1283
|
-
if (A?.nodeType !==
|
|
1283
|
+
if (A?.nodeType !== gr) {
|
|
1284
1284
|
var i = ce();
|
|
1285
1285
|
return A?.before(i), Q(i), i;
|
|
1286
1286
|
}
|
|
1287
|
-
|
|
1287
|
+
ui(
|
|
1288
1288
|
/** @type {Text} */
|
|
1289
1289
|
A
|
|
1290
1290
|
);
|
|
@@ -1299,41 +1299,41 @@ function ue(t, e = 1, r = !1) {
|
|
|
1299
1299
|
if (!R)
|
|
1300
1300
|
return i;
|
|
1301
1301
|
if (r) {
|
|
1302
|
-
if (i?.nodeType !==
|
|
1302
|
+
if (i?.nodeType !== gr) {
|
|
1303
1303
|
var n = ce();
|
|
1304
1304
|
return i === null ? o?.after(n) : i.before(n), Q(n), n;
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1306
|
+
ui(
|
|
1307
1307
|
/** @type {Text} */
|
|
1308
1308
|
i
|
|
1309
1309
|
);
|
|
1310
1310
|
}
|
|
1311
1311
|
return Q(i), i;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function Vo(t) {
|
|
1314
1314
|
t.textContent = "";
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function Mo() {
|
|
1317
1317
|
return !1;
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function fi(t, e, r) {
|
|
1320
1320
|
return (
|
|
1321
1321
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1322
|
-
document.createElementNS(
|
|
1322
|
+
document.createElementNS(Zi, t, void 0)
|
|
1323
1323
|
);
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function ui(t) {
|
|
1326
1326
|
if (
|
|
1327
1327
|
/** @type {string} */
|
|
1328
1328
|
t.nodeValue.length < 65536
|
|
1329
1329
|
)
|
|
1330
1330
|
return;
|
|
1331
1331
|
let e = t.nextSibling;
|
|
1332
|
-
for (; e !== null && e.nodeType ===
|
|
1332
|
+
for (; e !== null && e.nodeType === gr; )
|
|
1333
1333
|
e.remove(), t.nodeValue += /** @type {string} */
|
|
1334
1334
|
e.nodeValue, e = t.nextSibling;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function Co(t) {
|
|
1337
1337
|
var e = E, r = L;
|
|
1338
1338
|
fe(null), Ae(null);
|
|
1339
1339
|
try {
|
|
@@ -1342,10 +1342,10 @@ function Mo(t) {
|
|
|
1342
1342
|
fe(e), Ae(r);
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1346
|
-
L === null && (E === null &&
|
|
1345
|
+
function ps(t) {
|
|
1346
|
+
L === null && (E === null && xn(), Fn()), Ye && jn();
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function hs(t, e) {
|
|
1349
1349
|
var r = e.last;
|
|
1350
1350
|
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
1351
1351
|
}
|
|
@@ -1356,7 +1356,7 @@ function Le(t, e, r) {
|
|
|
1356
1356
|
ctx: re,
|
|
1357
1357
|
deps: null,
|
|
1358
1358
|
nodes: null,
|
|
1359
|
-
f: t |
|
|
1359
|
+
f: t | x | le,
|
|
1360
1360
|
first: null,
|
|
1361
1361
|
fn: e,
|
|
1362
1362
|
last: null,
|
|
@@ -1370,14 +1370,14 @@ function Le(t, e, r) {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
if (r)
|
|
1372
1372
|
try {
|
|
1373
|
-
|
|
1373
|
+
Mt(o);
|
|
1374
1374
|
} catch (l) {
|
|
1375
1375
|
throw G(o), l;
|
|
1376
1376
|
}
|
|
1377
1377
|
else e !== null && ve(o);
|
|
1378
1378
|
var n = o;
|
|
1379
1379
|
if (r && n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && // either `null`, or a singular child
|
|
1380
|
-
(n.f &
|
|
1380
|
+
(n.f & ht) === 0 && (n = n.first, (t & He) !== 0 && (t & Rt) !== 0 && n !== null && (n.f |= Rt)), n !== null && (n.parent = i, i !== null && hs(n, i), E !== null && (E.f & F) !== 0 && (t & Qe) === 0)) {
|
|
1381
1381
|
var s = (
|
|
1382
1382
|
/** @type {Derived} */
|
|
1383
1383
|
E
|
|
@@ -1386,19 +1386,19 @@ function Le(t, e, r) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
return o;
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1389
|
+
function di() {
|
|
1390
1390
|
return E !== null && !ge;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
const e = Le(
|
|
1392
|
+
function vs(t) {
|
|
1393
|
+
const e = Le(vr, null, !1);
|
|
1394
1394
|
return V(e, N), e.teardown = t, e;
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1396
|
+
function mt(t) {
|
|
1397
|
+
ps();
|
|
1398
1398
|
var e = (
|
|
1399
1399
|
/** @type {Effect} */
|
|
1400
1400
|
L.f
|
|
1401
|
-
), r = !E && (e & be) !== 0 && (e &
|
|
1401
|
+
), r = !E && (e & be) !== 0 && (e & Ct) === 0;
|
|
1402
1402
|
if (r) {
|
|
1403
1403
|
var i = (
|
|
1404
1404
|
/** @type {ComponentContext} */
|
|
@@ -1406,72 +1406,72 @@ function gt(t) {
|
|
|
1406
1406
|
);
|
|
1407
1407
|
(i.e ?? (i.e = [])).push(t);
|
|
1408
1408
|
} else
|
|
1409
|
-
return
|
|
1409
|
+
return No(t);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
return Le(Ht |
|
|
1411
|
+
function No(t) {
|
|
1412
|
+
return Le(Ht | Vn, t, !1);
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1416
|
-
const e = Le(
|
|
1414
|
+
function gs(t) {
|
|
1415
|
+
xe.ensure();
|
|
1416
|
+
const e = Le(Qe | ht, t, !0);
|
|
1417
1417
|
return () => {
|
|
1418
1418
|
G(e);
|
|
1419
1419
|
};
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
|
|
1423
|
-
const e = Le(
|
|
1421
|
+
function ms(t) {
|
|
1422
|
+
xe.ensure();
|
|
1423
|
+
const e = Le(Qe | ht, t, !0);
|
|
1424
1424
|
return (r = {}) => new Promise((i) => {
|
|
1425
|
-
r.outro ?
|
|
1425
|
+
r.outro ? at(e, () => {
|
|
1426
1426
|
G(e), i(void 0);
|
|
1427
1427
|
}) : (G(e), i(void 0));
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1430
|
+
function Do(t) {
|
|
1431
1431
|
return Le(Ht, t, !1);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
return Le(
|
|
1433
|
+
function bs(t) {
|
|
1434
|
+
return Le(li | ht, t, !0);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return Le(
|
|
1436
|
+
function pi(t, e = 0) {
|
|
1437
|
+
return Le(vr | e, t, !0);
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
|
|
1441
|
-
Le(
|
|
1439
|
+
function Mi(t, e = [], r = [], i = []) {
|
|
1440
|
+
os(i, e, r, (o) => {
|
|
1441
|
+
Le(vr, () => t(...o.map(g)), !0);
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function hi(t, e = 0) {
|
|
1445
1445
|
var r = Le(He | e, t, !0);
|
|
1446
1446
|
return r;
|
|
1447
1447
|
}
|
|
1448
1448
|
function pe(t) {
|
|
1449
|
-
return Le(be |
|
|
1449
|
+
return Le(be | ht, t, !0);
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function Po(t) {
|
|
1452
1452
|
var e = t.teardown;
|
|
1453
1453
|
if (e !== null) {
|
|
1454
1454
|
const r = Ye, i = E;
|
|
1455
|
-
|
|
1455
|
+
Ci(!0), fe(null);
|
|
1456
1456
|
try {
|
|
1457
1457
|
e.call(null);
|
|
1458
1458
|
} finally {
|
|
1459
|
-
|
|
1459
|
+
Ci(r), fe(i);
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1463
|
+
function vi(t, e = !1) {
|
|
1464
1464
|
var r = t.first;
|
|
1465
1465
|
for (t.first = t.last = null; r !== null; ) {
|
|
1466
1466
|
const o = r.ac;
|
|
1467
|
-
o !== null &&
|
|
1468
|
-
o.abort(
|
|
1467
|
+
o !== null && Co(() => {
|
|
1468
|
+
o.abort(Ze);
|
|
1469
1469
|
});
|
|
1470
1470
|
var i = r.next;
|
|
1471
|
-
(r.f &
|
|
1471
|
+
(r.f & Qe) !== 0 ? r.parent = null : G(r, e), r = i;
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function _s(t) {
|
|
1475
1475
|
for (var e = t.first; e !== null; ) {
|
|
1476
1476
|
var r = e.next;
|
|
1477
1477
|
(e.f & be) === 0 && G(e), e = r;
|
|
@@ -1479,32 +1479,32 @@ function bs(t) {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
function G(t, e = !0) {
|
|
1481
1481
|
var r = !1;
|
|
1482
|
-
(e || (t.f &
|
|
1482
|
+
(e || (t.f & oo) !== 0) && t.nodes !== null && t.nodes.end !== null && (ys(
|
|
1483
1483
|
t.nodes.start,
|
|
1484
1484
|
/** @type {TemplateNode} */
|
|
1485
1485
|
t.nodes.end
|
|
1486
|
-
), r = !0),
|
|
1486
|
+
), r = !0), vi(t, e && !r), Bt(t, 0), V(t, Fe);
|
|
1487
1487
|
var i = t.nodes && t.nodes.t;
|
|
1488
1488
|
if (i !== null)
|
|
1489
1489
|
for (const n of i)
|
|
1490
1490
|
n.stop();
|
|
1491
|
-
|
|
1491
|
+
Po(t);
|
|
1492
1492
|
var o = t.parent;
|
|
1493
|
-
o !== null && o.first !== null &&
|
|
1493
|
+
o !== null && o.first !== null && qo(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function ys(t, e) {
|
|
1496
1496
|
for (; t !== null; ) {
|
|
1497
1497
|
var r = t === e ? null : /* @__PURE__ */ Re(t);
|
|
1498
1498
|
t.remove(), t = r;
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function qo(t) {
|
|
1502
1502
|
var e = t.parent, r = t.prev, i = t.next;
|
|
1503
1503
|
r !== null && (r.next = i), i !== null && (i.prev = r), e !== null && (e.first === t && (e.first = i), e.last === t && (e.last = r));
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function at(t, e, r = !0) {
|
|
1506
1506
|
var i = [];
|
|
1507
|
-
|
|
1507
|
+
jo(t, i, !0);
|
|
1508
1508
|
var o = () => {
|
|
1509
1509
|
r && G(t), e && e();
|
|
1510
1510
|
}, n = i.length;
|
|
@@ -1515,7 +1515,7 @@ function ct(t, e, r = !0) {
|
|
|
1515
1515
|
} else
|
|
1516
1516
|
o();
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function jo(t, e, r) {
|
|
1519
1519
|
if ((t.f & te) === 0) {
|
|
1520
1520
|
t.f ^= te;
|
|
1521
1521
|
var i = t.nodes && t.nodes.t;
|
|
@@ -1523,23 +1523,23 @@ function qo(t, e, r) {
|
|
|
1523
1523
|
for (const l of i)
|
|
1524
1524
|
(l.is_global || r) && e.push(l);
|
|
1525
1525
|
for (var o = t.first; o !== null; ) {
|
|
1526
|
-
var n = o.next, s = (o.f &
|
|
1526
|
+
var n = o.next, s = (o.f & Rt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1527
1527
|
// it means the parent block effect was pruned. In that case,
|
|
1528
1528
|
// transparency information was transferred to the branch effect.
|
|
1529
1529
|
(o.f & be) !== 0 && (t.f & He) !== 0;
|
|
1530
|
-
|
|
1530
|
+
jo(o, e, s ? r : !1), o = n;
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1535
|
-
|
|
1534
|
+
function gi(t) {
|
|
1535
|
+
Fo(t, !0);
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1537
|
+
function Fo(t, e) {
|
|
1538
1538
|
if ((t.f & te) !== 0) {
|
|
1539
|
-
t.f ^= te, (t.f & N) === 0 && (V(t,
|
|
1539
|
+
t.f ^= te, (t.f & N) === 0 && (V(t, x), ve(t));
|
|
1540
1540
|
for (var r = t.first; r !== null; ) {
|
|
1541
|
-
var i = r.next, o = (r.f &
|
|
1542
|
-
|
|
1541
|
+
var i = r.next, o = (r.f & Rt) !== 0 || (r.f & be) !== 0;
|
|
1542
|
+
Fo(r, o ? e : !1), r = i;
|
|
1543
1543
|
}
|
|
1544
1544
|
var n = t.nodes && t.nodes.t;
|
|
1545
1545
|
if (n !== null)
|
|
@@ -1547,15 +1547,15 @@ function jo(t, e) {
|
|
|
1547
1547
|
(s.is_global || e) && s.in();
|
|
1548
1548
|
}
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function xo(t, e) {
|
|
1551
1551
|
if (t.nodes)
|
|
1552
1552
|
for (var r = t.nodes.start, i = t.nodes.end; r !== null; ) {
|
|
1553
1553
|
var o = r === i ? null : /* @__PURE__ */ Re(r);
|
|
1554
1554
|
e.append(r), r = o;
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
let
|
|
1558
|
-
function
|
|
1557
|
+
let nr = !1, Ye = !1;
|
|
1558
|
+
function Ci(t) {
|
|
1559
1559
|
Ye = t;
|
|
1560
1560
|
}
|
|
1561
1561
|
let E = null, ge = !1;
|
|
@@ -1570,31 +1570,31 @@ let ae = null;
|
|
|
1570
1570
|
function Ho(t) {
|
|
1571
1571
|
E !== null && (ae === null ? ae = [t] : ae.push(t));
|
|
1572
1572
|
}
|
|
1573
|
-
let
|
|
1574
|
-
function
|
|
1573
|
+
let Y = null, J = 0, oe = null;
|
|
1574
|
+
function ws(t) {
|
|
1575
1575
|
oe = t;
|
|
1576
1576
|
}
|
|
1577
|
-
let
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1577
|
+
let Bo = 1, tt = 0, ft = tt;
|
|
1578
|
+
function Ni(t) {
|
|
1579
|
+
ft = t;
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return ++
|
|
1581
|
+
function Uo() {
|
|
1582
|
+
return ++Bo;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Qt(t) {
|
|
1585
1585
|
var e = t.f;
|
|
1586
|
-
if ((e &
|
|
1586
|
+
if ((e & x) !== 0)
|
|
1587
1587
|
return !0;
|
|
1588
|
-
if (e & F && (t.f &= ~
|
|
1588
|
+
if (e & F && (t.f &= ~ut), (e & me) !== 0) {
|
|
1589
1589
|
for (var r = (
|
|
1590
1590
|
/** @type {Value[]} */
|
|
1591
1591
|
t.deps
|
|
1592
1592
|
), i = r.length, o = 0; o < i; o++) {
|
|
1593
1593
|
var n = r[o];
|
|
1594
|
-
if (
|
|
1594
|
+
if (Qt(
|
|
1595
1595
|
/** @type {Derived} */
|
|
1596
1596
|
n
|
|
1597
|
-
) &&
|
|
1597
|
+
) && Io(
|
|
1598
1598
|
/** @type {Derived} */
|
|
1599
1599
|
n
|
|
1600
1600
|
), n.wv > t.wv)
|
|
@@ -1606,77 +1606,77 @@ function Wt(t) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return !1;
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function Go(t, e, r = !0) {
|
|
1610
1610
|
var i = t.reactions;
|
|
1611
|
-
if (i !== null && !(ae !== null &&
|
|
1611
|
+
if (i !== null && !(ae !== null && $t.call(ae, t)))
|
|
1612
1612
|
for (var o = 0; o < i.length; o++) {
|
|
1613
1613
|
var n = i[o];
|
|
1614
|
-
(n.f & F) !== 0 ?
|
|
1614
|
+
(n.f & F) !== 0 ? Go(
|
|
1615
1615
|
/** @type {Derived} */
|
|
1616
1616
|
n,
|
|
1617
1617
|
e,
|
|
1618
1618
|
!1
|
|
1619
|
-
) : e === n && (r ? V(n,
|
|
1619
|
+
) : e === n && (r ? V(n, x) : (n.f & N) !== 0 && V(n, me), ve(
|
|
1620
1620
|
/** @type {Effect} */
|
|
1621
1621
|
n
|
|
1622
1622
|
));
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function zo(t) {
|
|
1626
1626
|
var w;
|
|
1627
|
-
var e =
|
|
1628
|
-
|
|
1629
|
-
null, J = 0, oe = null, E = (a & (be |
|
|
1630
|
-
t.ac.abort(
|
|
1627
|
+
var e = Y, r = J, i = oe, o = E, n = ae, s = re, l = ge, c = ft, a = t.f;
|
|
1628
|
+
Y = /** @type {null | Value[]} */
|
|
1629
|
+
null, J = 0, oe = null, E = (a & (be | Qe)) === 0 ? t : null, ae = null, Lt(t.ctx), ge = !1, ft = ++tt, t.ac !== null && (Co(() => {
|
|
1630
|
+
t.ac.abort(Ze);
|
|
1631
1631
|
}), t.ac = null);
|
|
1632
1632
|
try {
|
|
1633
|
-
t.f |=
|
|
1633
|
+
t.f |= xr;
|
|
1634
1634
|
var u = (
|
|
1635
1635
|
/** @type {Function} */
|
|
1636
1636
|
t.fn
|
|
1637
1637
|
), h = u();
|
|
1638
|
-
t.f |=
|
|
1638
|
+
t.f |= Ct;
|
|
1639
1639
|
var p = t.deps, v = O?.is_fork;
|
|
1640
|
-
if (
|
|
1640
|
+
if (Y !== null) {
|
|
1641
1641
|
var d;
|
|
1642
|
-
if (v ||
|
|
1643
|
-
for (p.length = J +
|
|
1644
|
-
p[J + d] =
|
|
1642
|
+
if (v || Bt(t, J), p !== null && J > 0)
|
|
1643
|
+
for (p.length = J + Y.length, d = 0; d < Y.length; d++)
|
|
1644
|
+
p[J + d] = Y[d];
|
|
1645
1645
|
else
|
|
1646
|
-
t.deps = p =
|
|
1647
|
-
if (
|
|
1646
|
+
t.deps = p = Y;
|
|
1647
|
+
if (di() && (t.f & le) !== 0)
|
|
1648
1648
|
for (d = J; d < p.length; d++)
|
|
1649
1649
|
((w = p[d]).reactions ?? (w.reactions = [])).push(t);
|
|
1650
|
-
} else !v && p !== null && J < p.length && (
|
|
1651
|
-
if (
|
|
1650
|
+
} else !v && p !== null && J < p.length && (Bt(t, J), p.length = J);
|
|
1651
|
+
if (uo() && oe !== null && !ge && p !== null && (t.f & (F | me | x)) === 0)
|
|
1652
1652
|
for (d = 0; d < /** @type {Source[]} */
|
|
1653
1653
|
oe.length; d++)
|
|
1654
|
-
|
|
1654
|
+
Go(
|
|
1655
1655
|
oe[d],
|
|
1656
1656
|
/** @type {Effect} */
|
|
1657
1657
|
t
|
|
1658
1658
|
);
|
|
1659
1659
|
if (o !== null && o !== t) {
|
|
1660
|
-
if (
|
|
1660
|
+
if (tt++, o.deps !== null)
|
|
1661
1661
|
for (let b = 0; b < r; b += 1)
|
|
1662
|
-
o.deps[b].rv =
|
|
1662
|
+
o.deps[b].rv = tt;
|
|
1663
1663
|
if (e !== null)
|
|
1664
1664
|
for (const b of e)
|
|
1665
|
-
b.rv =
|
|
1665
|
+
b.rv = tt;
|
|
1666
1666
|
oe !== null && (i === null ? i = oe : i.push(.../** @type {Source[]} */
|
|
1667
1667
|
oe));
|
|
1668
1668
|
}
|
|
1669
|
-
return (t.f &
|
|
1669
|
+
return (t.f & ze) !== 0 && (t.f ^= ze), h;
|
|
1670
1670
|
} catch (b) {
|
|
1671
|
-
return
|
|
1671
|
+
return ho(b);
|
|
1672
1672
|
} finally {
|
|
1673
|
-
t.f ^=
|
|
1673
|
+
t.f ^= xr, Y = e, J = r, oe = i, E = o, ae = n, Lt(s), ge = l, ft = c;
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function ks(t, e) {
|
|
1677
1677
|
let r = e.reactions;
|
|
1678
1678
|
if (r !== null) {
|
|
1679
|
-
var i =
|
|
1679
|
+
var i = Sn.call(r, t);
|
|
1680
1680
|
if (i !== -1) {
|
|
1681
1681
|
var o = r.length - 1;
|
|
1682
1682
|
o === 0 ? r = e.reactions = null : (r[i] = r[o], r.pop());
|
|
@@ -1685,54 +1685,54 @@ function ws(t, e) {
|
|
|
1685
1685
|
if (r === null && (e.f & F) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1686
1686
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1687
1687
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1688
|
-
(
|
|
1688
|
+
(Y === null || !$t.call(Y, e))) {
|
|
1689
1689
|
var n = (
|
|
1690
1690
|
/** @type {Derived} */
|
|
1691
1691
|
e
|
|
1692
1692
|
);
|
|
1693
|
-
(n.f & le) !== 0 && (n.f ^= le, n.f &= ~
|
|
1693
|
+
(n.f & le) !== 0 && (n.f ^= le, n.f &= ~ut), ci(n), fs(n), Bt(n, 0);
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function Bt(t, e) {
|
|
1697
1697
|
var r = t.deps;
|
|
1698
1698
|
if (r !== null)
|
|
1699
1699
|
for (var i = e; i < r.length; i++)
|
|
1700
|
-
|
|
1700
|
+
ks(t, r[i]);
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function Mt(t) {
|
|
1703
1703
|
var e = t.f;
|
|
1704
|
-
if ((e &
|
|
1704
|
+
if ((e & Fe) === 0) {
|
|
1705
1705
|
V(t, N);
|
|
1706
|
-
var r = L, i =
|
|
1707
|
-
L = t,
|
|
1706
|
+
var r = L, i = nr;
|
|
1707
|
+
L = t, nr = !0;
|
|
1708
1708
|
try {
|
|
1709
|
-
(e & (He |
|
|
1710
|
-
var o =
|
|
1711
|
-
t.teardown = typeof o == "function" ? o : null, t.wv =
|
|
1709
|
+
(e & (He | io)) !== 0 ? _s(t) : vi(t), Po(t);
|
|
1710
|
+
var o = zo(t);
|
|
1711
|
+
t.teardown = typeof o == "function" ? o : null, t.wv = Bo;
|
|
1712
1712
|
var n;
|
|
1713
|
-
|
|
1713
|
+
jr && Qn && (t.f & x) !== 0 && t.deps;
|
|
1714
1714
|
} finally {
|
|
1715
|
-
|
|
1715
|
+
nr = i, L = r;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
|
1719
1719
|
function g(t) {
|
|
1720
1720
|
var e = t.f, r = (e & F) !== 0;
|
|
1721
1721
|
if (E !== null && !ge) {
|
|
1722
|
-
var i = L !== null && (L.f &
|
|
1723
|
-
if (!i && (ae === null ||
|
|
1722
|
+
var i = L !== null && (L.f & Fe) !== 0;
|
|
1723
|
+
if (!i && (ae === null || !$t.call(ae, t))) {
|
|
1724
1724
|
var o = E.deps;
|
|
1725
|
-
if ((E.f &
|
|
1726
|
-
t.rv <
|
|
1725
|
+
if ((E.f & xr) !== 0)
|
|
1726
|
+
t.rv < tt && (t.rv = tt, Y === null && o !== null && o[J] === t ? J++ : Y === null ? Y = [t] : Y.push(t));
|
|
1727
1727
|
else {
|
|
1728
1728
|
(E.deps ?? (E.deps = [])).push(t);
|
|
1729
1729
|
var n = t.reactions;
|
|
1730
|
-
n === null ? t.reactions = [E] :
|
|
1730
|
+
n === null ? t.reactions = [E] : $t.call(n, E) || n.push(E);
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
if (Ye &&
|
|
1735
|
-
return
|
|
1734
|
+
if (Ye && We.has(t))
|
|
1735
|
+
return We.get(t);
|
|
1736
1736
|
if (r) {
|
|
1737
1737
|
var s = (
|
|
1738
1738
|
/** @type {Derived} */
|
|
@@ -1740,24 +1740,24 @@ function g(t) {
|
|
|
1740
1740
|
);
|
|
1741
1741
|
if (Ye) {
|
|
1742
1742
|
var l = s.v;
|
|
1743
|
-
return ((s.f & N) === 0 && s.reactions !== null || Ko(s)) && (l =
|
|
1743
|
+
return ((s.f & N) === 0 && s.reactions !== null || Ko(s)) && (l = ai(s)), We.set(s, l), l;
|
|
1744
1744
|
}
|
|
1745
|
-
var c = (s.f & le) === 0 && !ge && E !== null && (
|
|
1746
|
-
|
|
1745
|
+
var c = (s.f & le) === 0 && !ge && E !== null && (nr || (E.f & le) !== 0), a = (s.f & Ct) === 0;
|
|
1746
|
+
Qt(s) && (c && (s.f |= le), Io(s)), c && !a && (Eo(s), Wo(s));
|
|
1747
1747
|
}
|
|
1748
1748
|
if (he?.has(t))
|
|
1749
1749
|
return he.get(t);
|
|
1750
|
-
if ((t.f &
|
|
1750
|
+
if ((t.f & ze) !== 0)
|
|
1751
1751
|
throw t.v;
|
|
1752
1752
|
return t.v;
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function Wo(t) {
|
|
1755
1755
|
if (t.f |= le, t.deps !== null)
|
|
1756
1756
|
for (const e of t.deps)
|
|
1757
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & F) !== 0 && (e.f & le) === 0 && (
|
|
1757
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & F) !== 0 && (e.f & le) === 0 && (Eo(
|
|
1758
1758
|
/** @type {Derived} */
|
|
1759
1759
|
e
|
|
1760
|
-
),
|
|
1760
|
+
), Wo(
|
|
1761
1761
|
/** @type {Derived} */
|
|
1762
1762
|
e
|
|
1763
1763
|
));
|
|
@@ -1766,14 +1766,14 @@ function Ko(t) {
|
|
|
1766
1766
|
if (t.v === j) return !0;
|
|
1767
1767
|
if (t.deps === null) return !1;
|
|
1768
1768
|
for (const e of t.deps)
|
|
1769
|
-
if (
|
|
1769
|
+
if (We.has(e) || (e.f & F) !== 0 && Ko(
|
|
1770
1770
|
/** @type {Derived} */
|
|
1771
1771
|
e
|
|
1772
1772
|
))
|
|
1773
1773
|
return !0;
|
|
1774
1774
|
return !1;
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function mi(t) {
|
|
1777
1777
|
var e = ge;
|
|
1778
1778
|
try {
|
|
1779
1779
|
return ge = !0, t();
|
|
@@ -1781,18 +1781,18 @@ function gi(t) {
|
|
|
1781
1781
|
ge = e;
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
|
-
const
|
|
1785
|
-
function
|
|
1786
|
-
(e[
|
|
1784
|
+
const rt = /* @__PURE__ */ Symbol("events"), Yo = /* @__PURE__ */ new Set(), Qr = /* @__PURE__ */ new Set();
|
|
1785
|
+
function Zt(t, e, r) {
|
|
1786
|
+
(e[rt] ?? (e[rt] = {}))[t] = r;
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function Ts(t) {
|
|
1789
1789
|
for (var e = 0; e < t.length; e++)
|
|
1790
1790
|
Yo.add(t[e]);
|
|
1791
|
-
for (var r of
|
|
1791
|
+
for (var r of Qr)
|
|
1792
1792
|
r(t);
|
|
1793
1793
|
}
|
|
1794
|
-
let
|
|
1795
|
-
function
|
|
1794
|
+
let Di = null;
|
|
1795
|
+
function Pi(t) {
|
|
1796
1796
|
var e = this, r = (
|
|
1797
1797
|
/** @type {Node} */
|
|
1798
1798
|
e.ownerDocument
|
|
@@ -1800,13 +1800,13 @@ function Di(t) {
|
|
|
1800
1800
|
/** @type {null | Element} */
|
|
1801
1801
|
o[0] || t.target
|
|
1802
1802
|
);
|
|
1803
|
-
|
|
1804
|
-
var s = 0, l =
|
|
1803
|
+
Di = t;
|
|
1804
|
+
var s = 0, l = Di === t && t[rt];
|
|
1805
1805
|
if (l) {
|
|
1806
1806
|
var c = o.indexOf(l);
|
|
1807
1807
|
if (c !== -1 && (e === document || e === /** @type {any} */
|
|
1808
1808
|
window)) {
|
|
1809
|
-
t[
|
|
1809
|
+
t[rt] = e;
|
|
1810
1810
|
return;
|
|
1811
1811
|
}
|
|
1812
1812
|
var a = o.indexOf(e);
|
|
@@ -1816,7 +1816,7 @@ function Di(t) {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
if (n = /** @type {Element} */
|
|
1818
1818
|
o[s] || t.target, n !== e) {
|
|
1819
|
-
|
|
1819
|
+
ar(t, "currentTarget", {
|
|
1820
1820
|
configurable: !0,
|
|
1821
1821
|
get() {
|
|
1822
1822
|
return n || r;
|
|
@@ -1829,7 +1829,7 @@ function Di(t) {
|
|
|
1829
1829
|
var d = n.assignedSlot || n.parentNode || /** @type {any} */
|
|
1830
1830
|
n.host || null;
|
|
1831
1831
|
try {
|
|
1832
|
-
var w = n[
|
|
1832
|
+
var w = n[rt]?.[i];
|
|
1833
1833
|
w != null && (!/** @type {any} */
|
|
1834
1834
|
n.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1835
1835
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
@@ -1849,28 +1849,28 @@ function Di(t) {
|
|
|
1849
1849
|
throw p;
|
|
1850
1850
|
}
|
|
1851
1851
|
} finally {
|
|
1852
|
-
t[
|
|
1852
|
+
t[rt] = e, delete t.currentTarget, fe(u), Ae(h);
|
|
1853
1853
|
}
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
|
-
const
|
|
1856
|
+
const Is = (
|
|
1857
1857
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1858
1858
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1859
1859
|
/** @param {string} html */
|
|
1860
1860
|
createHTML: (t) => t
|
|
1861
1861
|
})
|
|
1862
1862
|
);
|
|
1863
|
-
function
|
|
1863
|
+
function Es(t) {
|
|
1864
1864
|
return (
|
|
1865
1865
|
/** @type {string} */
|
|
1866
|
-
|
|
1866
|
+
Is?.createHTML(t) ?? t
|
|
1867
1867
|
);
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1870
|
-
var r =
|
|
1871
|
-
return t = t.replaceAll("<!>", "<!---->"), r.innerHTML = e ?
|
|
1869
|
+
function Qo(t, e = !1) {
|
|
1870
|
+
var r = fi("template");
|
|
1871
|
+
return t = t.replaceAll("<!>", "<!---->"), r.innerHTML = e ? Es(t) : t, r.content;
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function pt(t, e) {
|
|
1874
1874
|
var r = (
|
|
1875
1875
|
/** @type {Effect} */
|
|
1876
1876
|
L
|
|
@@ -1878,30 +1878,30 @@ function dt(t, e) {
|
|
|
1878
1878
|
r.nodes === null && (r.nodes = { start: t, end: e, a: null, t: null });
|
|
1879
1879
|
}
|
|
1880
1880
|
// @__NO_SIDE_EFFECTS__
|
|
1881
|
-
function
|
|
1882
|
-
var r = (e &
|
|
1881
|
+
function bi(t, e) {
|
|
1882
|
+
var r = (e & En) !== 0, i, o = !t.startsWith("<!>");
|
|
1883
1883
|
return () => {
|
|
1884
1884
|
if (R)
|
|
1885
|
-
return
|
|
1886
|
-
i === void 0 && (i =
|
|
1885
|
+
return pt(A, null), A;
|
|
1886
|
+
i === void 0 && (i = Qo(o ? t : "<!>" + t, !0), i = /** @type {TemplateNode} */
|
|
1887
1887
|
/* @__PURE__ */ Ke(i));
|
|
1888
1888
|
var n = (
|
|
1889
1889
|
/** @type {TemplateNode} */
|
|
1890
|
-
r ||
|
|
1890
|
+
r || Ro ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1891
1891
|
);
|
|
1892
|
-
return
|
|
1892
|
+
return pt(n, n), n;
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
1895
|
// @__NO_SIDE_EFFECTS__
|
|
1896
|
-
function
|
|
1896
|
+
function Ss(t, e, r = "svg") {
|
|
1897
1897
|
var i = !t.startsWith("<!>"), o = `<${r}>${i ? t : "<!>" + t}</${r}>`, n;
|
|
1898
1898
|
return () => {
|
|
1899
1899
|
if (R)
|
|
1900
|
-
return
|
|
1900
|
+
return pt(A, null), A;
|
|
1901
1901
|
if (!n) {
|
|
1902
1902
|
var s = (
|
|
1903
1903
|
/** @type {DocumentFragment} */
|
|
1904
|
-
|
|
1904
|
+
Qo(o, !0)
|
|
1905
1905
|
), l = (
|
|
1906
1906
|
/** @type {Element} */
|
|
1907
1907
|
/* @__PURE__ */ Ke(s)
|
|
@@ -1913,26 +1913,26 @@ function Es(t, e, r = "svg") {
|
|
|
1913
1913
|
/** @type {TemplateNode} */
|
|
1914
1914
|
n.cloneNode(!0)
|
|
1915
1915
|
);
|
|
1916
|
-
return
|
|
1916
|
+
return pt(c, c), c;
|
|
1917
1917
|
};
|
|
1918
1918
|
}
|
|
1919
1919
|
// @__NO_SIDE_EFFECTS__
|
|
1920
|
-
function
|
|
1921
|
-
return /* @__PURE__ */
|
|
1920
|
+
function As(t, e) {
|
|
1921
|
+
return /* @__PURE__ */ Ss(t, e, "svg");
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function $s() {
|
|
1924
1924
|
if (R)
|
|
1925
|
-
return
|
|
1925
|
+
return pt(A, null), A;
|
|
1926
1926
|
var t = document.createDocumentFragment(), e = document.createComment(""), r = ce();
|
|
1927
|
-
return t.append(e, r),
|
|
1927
|
+
return t.append(e, r), pt(e, r), t;
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function bt(t, e) {
|
|
1930
1930
|
if (R) {
|
|
1931
1931
|
var r = (
|
|
1932
1932
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1933
1933
|
L
|
|
1934
1934
|
);
|
|
1935
|
-
((r.f &
|
|
1935
|
+
((r.f & Ct) === 0 || r.nodes.end === null) && (r.nodes.end = A), br();
|
|
1936
1936
|
return;
|
|
1937
1937
|
}
|
|
1938
1938
|
t !== null && t.before(
|
|
@@ -1940,48 +1940,48 @@ function mt(t, e) {
|
|
|
1940
1940
|
e
|
|
1941
1941
|
);
|
|
1942
1942
|
}
|
|
1943
|
-
const
|
|
1944
|
-
function
|
|
1945
|
-
return
|
|
1943
|
+
const Rs = ["touchstart", "touchmove"];
|
|
1944
|
+
function Ls(t) {
|
|
1945
|
+
return Rs.includes(t);
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1947
|
+
function er(t, e) {
|
|
1948
1948
|
var r = e == null ? "" : typeof e == "object" ? e + "" : e;
|
|
1949
1949
|
r !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = r, t.nodeValue = r + "");
|
|
1950
1950
|
}
|
|
1951
|
-
function
|
|
1952
|
-
return
|
|
1951
|
+
function Jo(t, e) {
|
|
1952
|
+
return Xo(t, e);
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function Os(t, e) {
|
|
1955
1955
|
Yr(), e.intro = e.intro ?? !1;
|
|
1956
1956
|
const r = e.target, i = R, o = A;
|
|
1957
1957
|
try {
|
|
1958
1958
|
for (var n = /* @__PURE__ */ Ke(r); n && (n.nodeType !== Yt || /** @type {Comment} */
|
|
1959
|
-
n.data !==
|
|
1959
|
+
n.data !== ni); )
|
|
1960
1960
|
n = /* @__PURE__ */ Re(n);
|
|
1961
1961
|
if (!n)
|
|
1962
|
-
throw
|
|
1963
|
-
|
|
1962
|
+
throw At;
|
|
1963
|
+
je(!0), Q(
|
|
1964
1964
|
/** @type {Comment} */
|
|
1965
1965
|
n
|
|
1966
1966
|
);
|
|
1967
|
-
const s =
|
|
1968
|
-
return
|
|
1967
|
+
const s = Xo(t, { ...e, anchor: n });
|
|
1968
|
+
return je(!1), /** @type {Exports} */
|
|
1969
1969
|
s;
|
|
1970
1970
|
} catch (s) {
|
|
1971
1971
|
if (s instanceof Error && s.message.split(`
|
|
1972
1972
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1973
1973
|
throw s;
|
|
1974
|
-
return s !==
|
|
1974
|
+
return s !== At && console.warn("Failed to hydrate: ", s), e.recover === !1 && Bn(), Yr(), Vo(r), je(!1), Jo(t, e);
|
|
1975
1975
|
} finally {
|
|
1976
|
-
|
|
1976
|
+
je(i), Q(o);
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
const
|
|
1980
|
-
function
|
|
1979
|
+
const tr = /* @__PURE__ */ new Map();
|
|
1980
|
+
function Xo(t, { target: e, anchor: r, props: i = {}, events: o, context: n, intro: s = !0 }) {
|
|
1981
1981
|
Yr();
|
|
1982
|
-
var l = void 0, c =
|
|
1982
|
+
var l = void 0, c = ms(() => {
|
|
1983
1983
|
var a = r ?? e.appendChild(ce());
|
|
1984
|
-
|
|
1984
|
+
rs(
|
|
1985
1985
|
/** @type {TemplateNode} */
|
|
1986
1986
|
a,
|
|
1987
1987
|
{
|
|
@@ -1989,19 +1989,19 @@ function Jo(t, { target: e, anchor: r, props: i = {}, events: o, context: n, int
|
|
|
1989
1989
|
}
|
|
1990
1990
|
},
|
|
1991
1991
|
(p) => {
|
|
1992
|
-
|
|
1992
|
+
ao({});
|
|
1993
1993
|
var v = (
|
|
1994
1994
|
/** @type {ComponentContext} */
|
|
1995
1995
|
re
|
|
1996
1996
|
);
|
|
1997
|
-
if (n && (v.c = n), o && (i.$$events = o), R &&
|
|
1997
|
+
if (n && (v.c = n), o && (i.$$events = o), R && pt(
|
|
1998
1998
|
/** @type {TemplateNode} */
|
|
1999
1999
|
p,
|
|
2000
2000
|
null
|
|
2001
2001
|
), l = t(p, i) || {}, R && (L.nodes.end = A, A === null || A.nodeType !== Yt || /** @type {Comment} */
|
|
2002
|
-
A.data !==
|
|
2003
|
-
throw
|
|
2004
|
-
|
|
2002
|
+
A.data !== si))
|
|
2003
|
+
throw mr(), At;
|
|
2004
|
+
fo();
|
|
2005
2005
|
}
|
|
2006
2006
|
);
|
|
2007
2007
|
var u = /* @__PURE__ */ new Set(), h = (p) => {
|
|
@@ -2009,40 +2009,40 @@ function Jo(t, { target: e, anchor: r, props: i = {}, events: o, context: n, int
|
|
|
2009
2009
|
var d = p[v];
|
|
2010
2010
|
if (!u.has(d)) {
|
|
2011
2011
|
u.add(d);
|
|
2012
|
-
var w =
|
|
2012
|
+
var w = Ls(d);
|
|
2013
2013
|
for (const S of [e, document]) {
|
|
2014
|
-
var b =
|
|
2015
|
-
b === void 0 && (b = /* @__PURE__ */ new Map(),
|
|
2014
|
+
var b = tr.get(S);
|
|
2015
|
+
b === void 0 && (b = /* @__PURE__ */ new Map(), tr.set(S, b));
|
|
2016
2016
|
var $ = b.get(d);
|
|
2017
|
-
$ === void 0 ? (S.addEventListener(d,
|
|
2017
|
+
$ === void 0 ? (S.addEventListener(d, Pi, { passive: w }), b.set(d, 1)) : b.set(d, $ + 1);
|
|
2018
2018
|
}
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
2021
|
};
|
|
2022
|
-
return h(
|
|
2022
|
+
return h(hr(Yo)), Qr.add(h), () => {
|
|
2023
2023
|
for (var p of u)
|
|
2024
2024
|
for (const w of [e, document]) {
|
|
2025
2025
|
var v = (
|
|
2026
2026
|
/** @type {Map<string, number>} */
|
|
2027
|
-
|
|
2027
|
+
tr.get(w)
|
|
2028
2028
|
), d = (
|
|
2029
2029
|
/** @type {number} */
|
|
2030
2030
|
v.get(p)
|
|
2031
2031
|
);
|
|
2032
|
-
--d == 0 ? (w.removeEventListener(p,
|
|
2032
|
+
--d == 0 ? (w.removeEventListener(p, Pi), v.delete(p), v.size === 0 && tr.delete(w)) : v.set(p, d);
|
|
2033
2033
|
}
|
|
2034
|
-
|
|
2034
|
+
Qr.delete(h), a !== r && a.parentNode?.removeChild(a);
|
|
2035
2035
|
};
|
|
2036
2036
|
});
|
|
2037
|
-
return
|
|
2037
|
+
return Jr.set(l, c), l;
|
|
2038
2038
|
}
|
|
2039
|
-
let
|
|
2040
|
-
function
|
|
2041
|
-
const r =
|
|
2042
|
-
return r ? (
|
|
2039
|
+
let Jr = /* @__PURE__ */ new WeakMap();
|
|
2040
|
+
function Vs(t, e) {
|
|
2041
|
+
const r = Jr.get(t);
|
|
2042
|
+
return r ? (Jr.delete(t), r(e)) : Promise.resolve();
|
|
2043
2043
|
}
|
|
2044
|
-
var de, Se, Z,
|
|
2045
|
-
class
|
|
2044
|
+
var de, Se, Z, lt, Wt, Kt, dr;
|
|
2045
|
+
class Ms {
|
|
2046
2046
|
/**
|
|
2047
2047
|
* @param {TemplateNode} anchor
|
|
2048
2048
|
* @param {boolean} transition
|
|
@@ -2077,12 +2077,12 @@ class Vs {
|
|
|
2077
2077
|
* Keys of effects that are currently outroing
|
|
2078
2078
|
* @type {Set<Key>}
|
|
2079
2079
|
*/
|
|
2080
|
-
I(this,
|
|
2080
|
+
I(this, lt, /* @__PURE__ */ new Set());
|
|
2081
2081
|
/**
|
|
2082
2082
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2083
2083
|
* This is necessary for `<svelte:element>`
|
|
2084
2084
|
*/
|
|
2085
|
-
I(this,
|
|
2085
|
+
I(this, Wt, !0);
|
|
2086
2086
|
I(this, Kt, () => {
|
|
2087
2087
|
var e = (
|
|
2088
2088
|
/** @type {Batch} */
|
|
@@ -2094,7 +2094,7 @@ class Vs {
|
|
|
2094
2094
|
f(this, de).get(e)
|
|
2095
2095
|
), i = f(this, Se).get(r);
|
|
2096
2096
|
if (i)
|
|
2097
|
-
|
|
2097
|
+
gi(i), f(this, lt).delete(r);
|
|
2098
2098
|
else {
|
|
2099
2099
|
var o = f(this, Z).get(r);
|
|
2100
2100
|
o && (f(this, Se).set(r, o.effect), f(this, Z).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
@@ -2106,29 +2106,29 @@ class Vs {
|
|
|
2106
2106
|
l && (G(l.effect), f(this, Z).delete(s));
|
|
2107
2107
|
}
|
|
2108
2108
|
for (const [n, s] of f(this, Se)) {
|
|
2109
|
-
if (n === r || f(this,
|
|
2109
|
+
if (n === r || f(this, lt).has(n)) continue;
|
|
2110
2110
|
const l = () => {
|
|
2111
2111
|
if (Array.from(f(this, de).values()).includes(n)) {
|
|
2112
2112
|
var a = document.createDocumentFragment();
|
|
2113
|
-
|
|
2113
|
+
xo(s, a), a.append(ce()), f(this, Z).set(n, { effect: s, fragment: a });
|
|
2114
2114
|
} else
|
|
2115
2115
|
G(s);
|
|
2116
|
-
f(this,
|
|
2116
|
+
f(this, lt).delete(n), f(this, Se).delete(n);
|
|
2117
2117
|
};
|
|
2118
|
-
f(this,
|
|
2118
|
+
f(this, Wt) || !i ? (f(this, lt).add(n), at(s, l, !1)) : l();
|
|
2119
2119
|
}
|
|
2120
2120
|
}
|
|
2121
2121
|
});
|
|
2122
2122
|
/**
|
|
2123
2123
|
* @param {Batch} batch
|
|
2124
2124
|
*/
|
|
2125
|
-
I(this,
|
|
2125
|
+
I(this, dr, (e) => {
|
|
2126
2126
|
f(this, de).delete(e);
|
|
2127
2127
|
const r = Array.from(f(this, de).values());
|
|
2128
2128
|
for (const [i, o] of f(this, Z))
|
|
2129
2129
|
r.includes(i) || (G(o.effect), f(this, Z).delete(i));
|
|
2130
2130
|
});
|
|
2131
|
-
this.anchor = e, T(this,
|
|
2131
|
+
this.anchor = e, T(this, Wt, r);
|
|
2132
2132
|
}
|
|
2133
2133
|
/**
|
|
2134
2134
|
*
|
|
@@ -2139,7 +2139,7 @@ class Vs {
|
|
|
2139
2139
|
var i = (
|
|
2140
2140
|
/** @type {Batch} */
|
|
2141
2141
|
O
|
|
2142
|
-
), o =
|
|
2142
|
+
), o = Mo();
|
|
2143
2143
|
if (r && !f(this, Se).has(e) && !f(this, Z).has(e))
|
|
2144
2144
|
if (o) {
|
|
2145
2145
|
var n = document.createDocumentFragment(), s = ce();
|
|
@@ -2157,47 +2157,47 @@ class Vs {
|
|
|
2157
2157
|
l === e ? i.unskip_effect(c) : i.skip_effect(c);
|
|
2158
2158
|
for (const [l, c] of f(this, Z))
|
|
2159
2159
|
l === e ? i.unskip_effect(c.effect) : i.skip_effect(c.effect);
|
|
2160
|
-
i.oncommit(f(this, Kt)), i.ondiscard(f(this,
|
|
2160
|
+
i.oncommit(f(this, Kt)), i.ondiscard(f(this, dr));
|
|
2161
2161
|
} else
|
|
2162
2162
|
R && (this.anchor = A), f(this, Kt).call(this);
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
|
-
de = new WeakMap(), Se = new WeakMap(), Z = new WeakMap(),
|
|
2166
|
-
function
|
|
2167
|
-
re === null &&
|
|
2168
|
-
const e =
|
|
2165
|
+
de = new WeakMap(), Se = new WeakMap(), Z = new WeakMap(), lt = new WeakMap(), Wt = new WeakMap(), Kt = new WeakMap(), dr = new WeakMap();
|
|
2166
|
+
function Cs(t) {
|
|
2167
|
+
re === null && Dn(), mt(() => {
|
|
2168
|
+
const e = mi(t);
|
|
2169
2169
|
if (typeof e == "function") return (
|
|
2170
2170
|
/** @type {() => void} */
|
|
2171
2171
|
e
|
|
2172
2172
|
);
|
|
2173
2173
|
});
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2176
|
-
R &&
|
|
2177
|
-
var i = new
|
|
2175
|
+
function Pr(t, e, r = !1) {
|
|
2176
|
+
R && br();
|
|
2177
|
+
var i = new Ms(t), o = r ? Rt : 0;
|
|
2178
2178
|
function n(s, l) {
|
|
2179
2179
|
if (R) {
|
|
2180
|
-
const u =
|
|
2180
|
+
const u = so(t);
|
|
2181
2181
|
var c;
|
|
2182
|
-
if (u ===
|
|
2183
|
-
var a =
|
|
2184
|
-
Q(a), i.anchor = a,
|
|
2182
|
+
if (u === ni ? c = 0 : u === pr ? c = !1 : c = parseInt(u.substring(1)), s !== c) {
|
|
2183
|
+
var a = fr();
|
|
2184
|
+
Q(a), i.anchor = a, je(!1), i.ensure(s, l), je(!0);
|
|
2185
2185
|
return;
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
2188
|
i.ensure(s, l);
|
|
2189
2189
|
}
|
|
2190
|
-
|
|
2190
|
+
hi(() => {
|
|
2191
2191
|
var s = !1;
|
|
2192
2192
|
e((l, c = 0) => {
|
|
2193
2193
|
s = !0, n(c, l);
|
|
2194
2194
|
}), s || n(!1, null);
|
|
2195
2195
|
}, o);
|
|
2196
2196
|
}
|
|
2197
|
-
function
|
|
2197
|
+
function Ns(t, e, r) {
|
|
2198
2198
|
for (var i = [], o = e.length, n, s = e.length, l = 0; l < o; l++) {
|
|
2199
2199
|
let h = e[l];
|
|
2200
|
-
|
|
2200
|
+
at(
|
|
2201
2201
|
h,
|
|
2202
2202
|
() => {
|
|
2203
2203
|
if (n) {
|
|
@@ -2206,7 +2206,7 @@ function Cs(t, e, r) {
|
|
|
2206
2206
|
/** @type {Set<EachOutroGroup>} */
|
|
2207
2207
|
t.outrogroups
|
|
2208
2208
|
);
|
|
2209
|
-
|
|
2209
|
+
Xr(hr(n.done)), p.delete(n), p.size === 0 && (t.outrogroups = null);
|
|
2210
2210
|
}
|
|
2211
2211
|
} else
|
|
2212
2212
|
s -= 1;
|
|
@@ -2224,21 +2224,21 @@ function Cs(t, e, r) {
|
|
|
2224
2224
|
/** @type {Element} */
|
|
2225
2225
|
a.parentNode
|
|
2226
2226
|
);
|
|
2227
|
-
|
|
2227
|
+
Vo(u), u.append(a), t.items.clear();
|
|
2228
2228
|
}
|
|
2229
|
-
|
|
2229
|
+
Xr(e, !c);
|
|
2230
2230
|
} else
|
|
2231
2231
|
n = {
|
|
2232
2232
|
pending: new Set(e),
|
|
2233
2233
|
done: /* @__PURE__ */ new Set()
|
|
2234
2234
|
}, (t.outrogroups ?? (t.outrogroups = /* @__PURE__ */ new Set())).add(n);
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function Xr(t, e = !0) {
|
|
2237
2237
|
for (var r = 0; r < t.length; r++)
|
|
2238
2238
|
G(t[r], e);
|
|
2239
2239
|
}
|
|
2240
|
-
var
|
|
2241
|
-
function
|
|
2240
|
+
var qi;
|
|
2241
|
+
function Ds(t, e, r, i, o, n = null) {
|
|
2242
2242
|
var s = t, l = /* @__PURE__ */ new Map();
|
|
2243
2243
|
{
|
|
2244
2244
|
var c = (
|
|
@@ -2247,101 +2247,101 @@ function Ns(t, e, r, i, o, n = null) {
|
|
|
2247
2247
|
);
|
|
2248
2248
|
s = R ? Q(/* @__PURE__ */ Ke(c)) : c.appendChild(ce());
|
|
2249
2249
|
}
|
|
2250
|
-
R &&
|
|
2251
|
-
var a = null, u = /* @__PURE__ */
|
|
2250
|
+
R && br();
|
|
2251
|
+
var a = null, u = /* @__PURE__ */ ls(() => {
|
|
2252
2252
|
var b = r();
|
|
2253
|
-
return
|
|
2253
|
+
return eo(b) ? b : b == null ? [] : hr(b);
|
|
2254
2254
|
}), h, p = !0;
|
|
2255
2255
|
function v() {
|
|
2256
|
-
w.fallback = a,
|
|
2256
|
+
w.fallback = a, Ps(w, h, s, e, i), a !== null && (h.length === 0 ? (a.f & Ge) === 0 ? gi(a) : (a.f ^= Ge, jt(a, null, s)) : at(a, () => {
|
|
2257
2257
|
a = null;
|
|
2258
2258
|
}));
|
|
2259
2259
|
}
|
|
2260
|
-
var d =
|
|
2260
|
+
var d = hi(() => {
|
|
2261
2261
|
h = /** @type {V[]} */
|
|
2262
2262
|
g(u);
|
|
2263
2263
|
var b = h.length;
|
|
2264
2264
|
let $ = !1;
|
|
2265
2265
|
if (R) {
|
|
2266
|
-
var S =
|
|
2267
|
-
S !== (b === 0) && (s =
|
|
2266
|
+
var S = so(s) === pr;
|
|
2267
|
+
S !== (b === 0) && (s = fr(), Q(s), je(!1), $ = !0);
|
|
2268
2268
|
}
|
|
2269
2269
|
for (var D = /* @__PURE__ */ new Set(), z = (
|
|
2270
2270
|
/** @type {Batch} */
|
|
2271
2271
|
O
|
|
2272
|
-
), ye =
|
|
2272
|
+
), ye = Mo(), we = 0; we < b; we += 1) {
|
|
2273
2273
|
R && A.nodeType === Yt && /** @type {Comment} */
|
|
2274
|
-
A.data ===
|
|
2275
|
-
A, $ = !0,
|
|
2276
|
-
var
|
|
2277
|
-
ie ? (ie.v &&
|
|
2274
|
+
A.data === si && (s = /** @type {Comment} */
|
|
2275
|
+
A, $ = !0, je(!1));
|
|
2276
|
+
var Je = h[we], P = i(Je, we), ie = p ? null : l.get(P);
|
|
2277
|
+
ie ? (ie.v && Vt(ie.v, Je), ie.i && Vt(ie.i, we), ye && z.unskip_effect(ie.e)) : (ie = qs(
|
|
2278
2278
|
l,
|
|
2279
|
-
p ? s :
|
|
2280
|
-
|
|
2279
|
+
p ? s : qi ?? (qi = ce()),
|
|
2280
|
+
Je,
|
|
2281
2281
|
P,
|
|
2282
2282
|
we,
|
|
2283
2283
|
o,
|
|
2284
2284
|
e,
|
|
2285
2285
|
r
|
|
2286
|
-
), p || (ie.e.f |=
|
|
2286
|
+
), p || (ie.e.f |= Ge), l.set(P, ie)), D.add(P);
|
|
2287
2287
|
}
|
|
2288
|
-
if (b === 0 && n && !a && (p ? a = pe(() => n(s)) : (a = pe(() => n(
|
|
2288
|
+
if (b === 0 && n && !a && (p ? a = pe(() => n(s)) : (a = pe(() => n(qi ?? (qi = ce()))), a.f |= Ge)), b > D.size && qn(), R && b > 0 && Q(fr()), !p)
|
|
2289
2289
|
if (ye) {
|
|
2290
|
-
for (const [
|
|
2291
|
-
D.has(
|
|
2290
|
+
for (const [Tr, Ir] of l)
|
|
2291
|
+
D.has(Tr) || z.skip_effect(Ir.e);
|
|
2292
2292
|
z.oncommit(v), z.ondiscard(() => {
|
|
2293
2293
|
});
|
|
2294
2294
|
} else
|
|
2295
2295
|
v();
|
|
2296
|
-
$ &&
|
|
2296
|
+
$ && je(!0), g(u);
|
|
2297
2297
|
}), w = { effect: d, items: l, outrogroups: null, fallback: a };
|
|
2298
2298
|
p = !1, R && (s = A);
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function Dt(t) {
|
|
2301
2301
|
for (; t !== null && (t.f & be) === 0; )
|
|
2302
2302
|
t = t.next;
|
|
2303
2303
|
return t;
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2306
|
-
var n = e.length, s = t.items, l =
|
|
2305
|
+
function Ps(t, e, r, i, o) {
|
|
2306
|
+
var n = e.length, s = t.items, l = Dt(t.effect.first), c, a = null, u = [], h = [], p, v, d, w;
|
|
2307
2307
|
for (w = 0; w < n; w += 1) {
|
|
2308
2308
|
if (p = e[w], v = o(p, w), d = /** @type {EachItem} */
|
|
2309
2309
|
s.get(v).e, t.outrogroups !== null)
|
|
2310
2310
|
for (const P of t.outrogroups)
|
|
2311
2311
|
P.pending.delete(d), P.done.delete(d);
|
|
2312
|
-
if ((d.f &
|
|
2313
|
-
if (d.f ^=
|
|
2314
|
-
|
|
2312
|
+
if ((d.f & Ge) !== 0)
|
|
2313
|
+
if (d.f ^= Ge, d === l)
|
|
2314
|
+
jt(d, null, r);
|
|
2315
2315
|
else {
|
|
2316
2316
|
var b = a ? a.next : l;
|
|
2317
|
-
d === t.effect.last && (t.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev),
|
|
2317
|
+
d === t.effect.last && (t.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), Be(t, a, d), Be(t, d, b), jt(d, b, r), a = d, u = [], h = [], l = Dt(a.next);
|
|
2318
2318
|
continue;
|
|
2319
2319
|
}
|
|
2320
|
-
if ((d.f & te) !== 0 &&
|
|
2320
|
+
if ((d.f & te) !== 0 && gi(d), d !== l) {
|
|
2321
2321
|
if (c !== void 0 && c.has(d)) {
|
|
2322
2322
|
if (u.length < h.length) {
|
|
2323
2323
|
var $ = h[0], S;
|
|
2324
2324
|
a = $.prev;
|
|
2325
2325
|
var D = u[0], z = u[u.length - 1];
|
|
2326
2326
|
for (S = 0; S < u.length; S += 1)
|
|
2327
|
-
|
|
2327
|
+
jt(u[S], $, r);
|
|
2328
2328
|
for (S = 0; S < h.length; S += 1)
|
|
2329
2329
|
c.delete(h[S]);
|
|
2330
|
-
|
|
2330
|
+
Be(t, D.prev, z.next), Be(t, a, D), Be(t, z, $), l = $, a = z, w -= 1, u = [], h = [];
|
|
2331
2331
|
} else
|
|
2332
|
-
c.delete(d),
|
|
2332
|
+
c.delete(d), jt(d, l, r), Be(t, d.prev, d.next), Be(t, d, a === null ? t.effect.first : a.next), Be(t, a, d), a = d;
|
|
2333
2333
|
continue;
|
|
2334
2334
|
}
|
|
2335
2335
|
for (u = [], h = []; l !== null && l !== d; )
|
|
2336
|
-
(c ?? (c = /* @__PURE__ */ new Set())).add(l), h.push(l), l =
|
|
2336
|
+
(c ?? (c = /* @__PURE__ */ new Set())).add(l), h.push(l), l = Dt(l.next);
|
|
2337
2337
|
if (l === null)
|
|
2338
2338
|
continue;
|
|
2339
2339
|
}
|
|
2340
|
-
(d.f &
|
|
2340
|
+
(d.f & Ge) === 0 && u.push(d), a = d, l = Dt(d.next);
|
|
2341
2341
|
}
|
|
2342
2342
|
if (t.outrogroups !== null) {
|
|
2343
2343
|
for (const P of t.outrogroups)
|
|
2344
|
-
P.pending.size === 0 && (
|
|
2344
|
+
P.pending.size === 0 && (Xr(hr(P.done)), t.outrogroups?.delete(P));
|
|
2345
2345
|
t.outrogroups.size === 0 && (t.outrogroups = null);
|
|
2346
2346
|
}
|
|
2347
2347
|
if (l !== null || c !== void 0) {
|
|
@@ -2350,16 +2350,16 @@ function Ds(t, e, r, i, o) {
|
|
|
2350
2350
|
for (d of c)
|
|
2351
2351
|
(d.f & te) === 0 && ye.push(d);
|
|
2352
2352
|
for (; l !== null; )
|
|
2353
|
-
(l.f & te) === 0 && l !== t.fallback && ye.push(l), l =
|
|
2353
|
+
(l.f & te) === 0 && l !== t.fallback && ye.push(l), l = Dt(l.next);
|
|
2354
2354
|
var we = ye.length;
|
|
2355
2355
|
if (we > 0) {
|
|
2356
|
-
var
|
|
2357
|
-
|
|
2356
|
+
var Je = n === 0 ? r : null;
|
|
2357
|
+
Ns(t, ye, Je);
|
|
2358
2358
|
}
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2362
|
-
var c = (s &
|
|
2361
|
+
function qs(t, e, r, i, o, n, s, l) {
|
|
2362
|
+
var c = (s & kn) !== 0 ? (s & In) === 0 ? /* @__PURE__ */ Ao(r, !1, !1) : dt(r) : null, a = (s & Tn) !== 0 ? dt(o) : null;
|
|
2363
2363
|
return {
|
|
2364
2364
|
v: c,
|
|
2365
2365
|
i: a,
|
|
@@ -2368,9 +2368,9 @@ function Ps(t, e, r, i, o, n, s, l) {
|
|
|
2368
2368
|
}))
|
|
2369
2369
|
};
|
|
2370
2370
|
}
|
|
2371
|
-
function
|
|
2371
|
+
function jt(t, e, r) {
|
|
2372
2372
|
if (t.nodes)
|
|
2373
|
-
for (var i = t.nodes.start, o = t.nodes.end, n = e && (e.f &
|
|
2373
|
+
for (var i = t.nodes.start, o = t.nodes.end, n = e && (e.f & Ge) === 0 ? (
|
|
2374
2374
|
/** @type {EffectNodes} */
|
|
2375
2375
|
e.nodes.start
|
|
2376
2376
|
) : r; i !== null; ) {
|
|
@@ -2383,11 +2383,11 @@ function qt(t, e, r) {
|
|
|
2383
2383
|
i = s;
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function Be(t, e, r) {
|
|
2387
2387
|
e === null ? t.effect.first = r : e.next = r, r === null ? t.effect.last = e : r.prev = e;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
|
|
2389
|
+
function js(t, e) {
|
|
2390
|
+
Do(() => {
|
|
2391
2391
|
var r = t.getRootNode(), i = (
|
|
2392
2392
|
/** @type {ShadowRoot} */
|
|
2393
2393
|
r.host ? (
|
|
@@ -2400,14 +2400,14 @@ function qs(t, e) {
|
|
|
2400
2400
|
)
|
|
2401
2401
|
);
|
|
2402
2402
|
if (!i.querySelector("#" + e.hash)) {
|
|
2403
|
-
const o =
|
|
2403
|
+
const o = fi("style");
|
|
2404
2404
|
o.id = e.hash, o.textContent = e.code, i.appendChild(o);
|
|
2405
2405
|
}
|
|
2406
2406
|
});
|
|
2407
2407
|
}
|
|
2408
|
-
const
|
|
2408
|
+
const ji = [...`
|
|
2409
2409
|
\r\f \v\uFEFF`];
|
|
2410
|
-
function
|
|
2410
|
+
function Fs(t, e, r) {
|
|
2411
2411
|
var i = "" + t;
|
|
2412
2412
|
if (r) {
|
|
2413
2413
|
for (var o in r)
|
|
@@ -2416,18 +2416,18 @@ function js(t, e, r) {
|
|
|
2416
2416
|
else if (i.length)
|
|
2417
2417
|
for (var n = o.length, s = 0; (s = i.indexOf(o, s)) >= 0; ) {
|
|
2418
2418
|
var l = s + n;
|
|
2419
|
-
(s === 0 ||
|
|
2419
|
+
(s === 0 || ji.includes(i[s - 1])) && (l === i.length || ji.includes(i[l])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(l + 1) : s = l;
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
2422
|
return i === "" ? null : i;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function xs(t, e) {
|
|
2425
2425
|
return t == null ? null : String(t);
|
|
2426
2426
|
}
|
|
2427
2427
|
function Hs(t, e, r, i, o, n) {
|
|
2428
2428
|
var s = t.__className;
|
|
2429
2429
|
if (R || s !== r || s === void 0) {
|
|
2430
|
-
var l =
|
|
2430
|
+
var l = Fs(r, i, n);
|
|
2431
2431
|
(!R || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = r;
|
|
2432
2432
|
} else if (n && o !== n)
|
|
2433
2433
|
for (var c in n) {
|
|
@@ -2436,60 +2436,60 @@ function Hs(t, e, r, i, o, n) {
|
|
|
2436
2436
|
}
|
|
2437
2437
|
return n;
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function gt(t, e, r, i) {
|
|
2440
2440
|
var o = t.__style;
|
|
2441
2441
|
if (R || o !== e) {
|
|
2442
|
-
var n =
|
|
2442
|
+
var n = xs(e);
|
|
2443
2443
|
(!R || n !== t.getAttribute("style")) && (n == null ? t.removeAttribute("style") : t.style.cssText = n), t.__style = e;
|
|
2444
2444
|
}
|
|
2445
2445
|
return i;
|
|
2446
2446
|
}
|
|
2447
|
-
const
|
|
2448
|
-
function
|
|
2449
|
-
var o =
|
|
2450
|
-
R && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName ===
|
|
2447
|
+
const Bs = /* @__PURE__ */ Symbol("is custom element"), Us = /* @__PURE__ */ Symbol("is html"), Gs = Nn ? "link" : "LINK";
|
|
2448
|
+
function qr(t, e, r, i) {
|
|
2449
|
+
var o = zs(t);
|
|
2450
|
+
R && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Gs) || o[e] !== (o[e] = r) && (e === "loading" && (t[Cn] = r), r == null ? t.removeAttribute(e) : typeof r != "string" && Ws(t).includes(e) ? t[e] = r : t.setAttribute(e, r));
|
|
2451
2451
|
}
|
|
2452
|
-
function
|
|
2452
|
+
function zs(t) {
|
|
2453
2453
|
return (
|
|
2454
2454
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2455
2455
|
// @ts-expect-error
|
|
2456
2456
|
t.__attributes ?? (t.__attributes = {
|
|
2457
|
-
[
|
|
2458
|
-
[
|
|
2457
|
+
[Bs]: t.nodeName.includes("-"),
|
|
2458
|
+
[Us]: t.namespaceURI === Zi
|
|
2459
2459
|
})
|
|
2460
2460
|
);
|
|
2461
2461
|
}
|
|
2462
|
-
var
|
|
2463
|
-
function
|
|
2464
|
-
var e = t.getAttribute("is") || t.nodeName, r =
|
|
2462
|
+
var Fi = /* @__PURE__ */ new Map();
|
|
2463
|
+
function Ws(t) {
|
|
2464
|
+
var e = t.getAttribute("is") || t.nodeName, r = Fi.get(e);
|
|
2465
2465
|
if (r) return r;
|
|
2466
|
-
|
|
2466
|
+
Fi.set(e, r = []);
|
|
2467
2467
|
for (var i, o = t, n = Element.prototype; n !== o; ) {
|
|
2468
|
-
i =
|
|
2468
|
+
i = An(o);
|
|
2469
2469
|
for (var s in i)
|
|
2470
2470
|
i[s].set && r.push(s);
|
|
2471
|
-
o =
|
|
2471
|
+
o = to(o);
|
|
2472
2472
|
}
|
|
2473
2473
|
return r;
|
|
2474
2474
|
}
|
|
2475
|
-
function
|
|
2476
|
-
return t === e || t?.[
|
|
2475
|
+
function xi(t, e) {
|
|
2476
|
+
return t === e || t?.[ir] === e;
|
|
2477
2477
|
}
|
|
2478
2478
|
function Ks(t = {}, e, r, i) {
|
|
2479
|
-
return
|
|
2479
|
+
return Do(() => {
|
|
2480
2480
|
var o, n;
|
|
2481
|
-
return
|
|
2482
|
-
o = n, n = [],
|
|
2483
|
-
t !== r(...n) && (e(t, ...n), o &&
|
|
2481
|
+
return pi(() => {
|
|
2482
|
+
o = n, n = [], mi(() => {
|
|
2483
|
+
t !== r(...n) && (e(t, ...n), o && xi(r(...o), t) && e(null, ...o));
|
|
2484
2484
|
});
|
|
2485
2485
|
}), () => {
|
|
2486
|
-
|
|
2487
|
-
n &&
|
|
2486
|
+
ct(() => {
|
|
2487
|
+
n && xi(r(...n), t) && e(null, ...n);
|
|
2488
2488
|
});
|
|
2489
2489
|
};
|
|
2490
2490
|
}), t;
|
|
2491
2491
|
}
|
|
2492
|
-
function
|
|
2492
|
+
function rr(t, e, r, i) {
|
|
2493
2493
|
var o = (
|
|
2494
2494
|
/** @type {V} */
|
|
2495
2495
|
i
|
|
@@ -2505,7 +2505,7 @@ function tr(t, e, r, i) {
|
|
|
2505
2505
|
);
|
|
2506
2506
|
return p === void 0 ? s() : (n = !0, p);
|
|
2507
2507
|
};
|
|
2508
|
-
var a = !1, u = /* @__PURE__ */
|
|
2508
|
+
var a = !1, u = /* @__PURE__ */ yr(() => (a = !1, c())), h = (
|
|
2509
2509
|
/** @type {Effect} */
|
|
2510
2510
|
L
|
|
2511
2511
|
);
|
|
@@ -2516,15 +2516,15 @@ function tr(t, e, r, i) {
|
|
|
2516
2516
|
const d = v ? g(u) : p;
|
|
2517
2517
|
return C(u, d), a = !0, o !== void 0 && (o = d), p;
|
|
2518
2518
|
}
|
|
2519
|
-
return Ye && a || (h.f &
|
|
2519
|
+
return Ye && a || (h.f & Fe) !== 0 ? u.v : g(u);
|
|
2520
2520
|
})
|
|
2521
2521
|
);
|
|
2522
2522
|
}
|
|
2523
2523
|
function Ys(t) {
|
|
2524
|
-
return new
|
|
2524
|
+
return new Qs(t);
|
|
2525
2525
|
}
|
|
2526
|
-
var
|
|
2527
|
-
class
|
|
2526
|
+
var qe, se;
|
|
2527
|
+
class Qs {
|
|
2528
2528
|
/**
|
|
2529
2529
|
* @param {ComponentConstructorOptions & {
|
|
2530
2530
|
* component: any;
|
|
@@ -2532,11 +2532,11 @@ class Ws {
|
|
|
2532
2532
|
*/
|
|
2533
2533
|
constructor(e) {
|
|
2534
2534
|
/** @type {any} */
|
|
2535
|
-
I(this,
|
|
2535
|
+
I(this, qe);
|
|
2536
2536
|
/** @type {Record<string, any>} */
|
|
2537
2537
|
I(this, se);
|
|
2538
2538
|
var r = /* @__PURE__ */ new Map(), i = (n, s) => {
|
|
2539
|
-
var l = /* @__PURE__ */
|
|
2539
|
+
var l = /* @__PURE__ */ Ao(s, !1, !1);
|
|
2540
2540
|
return r.set(n, l), l;
|
|
2541
2541
|
};
|
|
2542
2542
|
const o = new Proxy(
|
|
@@ -2546,23 +2546,23 @@ class Ws {
|
|
|
2546
2546
|
return g(r.get(s) ?? i(s, Reflect.get(n, s)));
|
|
2547
2547
|
},
|
|
2548
2548
|
has(n, s) {
|
|
2549
|
-
return s ===
|
|
2549
|
+
return s === Mn ? !0 : (g(r.get(s) ?? i(s, Reflect.get(n, s))), Reflect.has(n, s));
|
|
2550
2550
|
},
|
|
2551
2551
|
set(n, s, l) {
|
|
2552
2552
|
return C(r.get(s) ?? i(s, l), l), Reflect.set(n, s, l);
|
|
2553
2553
|
}
|
|
2554
2554
|
}
|
|
2555
2555
|
);
|
|
2556
|
-
T(this, se, (e.hydrate ?
|
|
2556
|
+
T(this, se, (e.hydrate ? Os : Jo)(e.component, {
|
|
2557
2557
|
target: e.target,
|
|
2558
2558
|
anchor: e.anchor,
|
|
2559
2559
|
props: o,
|
|
2560
2560
|
context: e.context,
|
|
2561
2561
|
intro: e.intro ?? !1,
|
|
2562
2562
|
recover: e.recover
|
|
2563
|
-
})), (!e?.props?.$$host || e.sync === !1) &&
|
|
2563
|
+
})), (!e?.props?.$$host || e.sync === !1) && Pt(), T(this, qe, o.$$events);
|
|
2564
2564
|
for (const n of Object.keys(f(this, se)))
|
|
2565
|
-
n === "$set" || n === "$destroy" || n === "$on" ||
|
|
2565
|
+
n === "$set" || n === "$destroy" || n === "$on" || ar(this, n, {
|
|
2566
2566
|
get() {
|
|
2567
2567
|
return f(this, se)[n];
|
|
2568
2568
|
},
|
|
@@ -2576,7 +2576,7 @@ class Ws {
|
|
|
2576
2576
|
(n) => {
|
|
2577
2577
|
Object.assign(o, n);
|
|
2578
2578
|
}, f(this, se).$destroy = () => {
|
|
2579
|
-
|
|
2579
|
+
Vs(f(this, se));
|
|
2580
2580
|
};
|
|
2581
2581
|
}
|
|
2582
2582
|
/** @param {Record<string, any>} props */
|
|
@@ -2589,10 +2589,10 @@ class Ws {
|
|
|
2589
2589
|
* @returns {any}
|
|
2590
2590
|
*/
|
|
2591
2591
|
$on(e, r) {
|
|
2592
|
-
f(this,
|
|
2592
|
+
f(this, qe)[e] = f(this, qe)[e] || [];
|
|
2593
2593
|
const i = (...o) => r.call(this, ...o);
|
|
2594
|
-
return f(this,
|
|
2595
|
-
f(this,
|
|
2594
|
+
return f(this, qe)[e].push(i), () => {
|
|
2595
|
+
f(this, qe)[e] = f(this, qe)[e].filter(
|
|
2596
2596
|
/** @param {any} fn */
|
|
2597
2597
|
(o) => o !== i
|
|
2598
2598
|
);
|
|
@@ -2602,9 +2602,9 @@ class Ws {
|
|
|
2602
2602
|
f(this, se).$destroy();
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
|
2605
|
-
|
|
2606
|
-
let
|
|
2607
|
-
typeof HTMLElement == "function" && (
|
|
2605
|
+
qe = new WeakMap(), se = new WeakMap();
|
|
2606
|
+
let Zo;
|
|
2607
|
+
typeof HTMLElement == "function" && (Zo = class extends HTMLElement {
|
|
2608
2608
|
/**
|
|
2609
2609
|
* @param {*} $$componentCtor
|
|
2610
2610
|
* @param {*} $$slots
|
|
@@ -2663,18 +2663,18 @@ typeof HTMLElement == "function" && (Xo = class extends HTMLElement {
|
|
|
2663
2663
|
if (this.$$cn = !0, !this.$$c) {
|
|
2664
2664
|
let e = function(o) {
|
|
2665
2665
|
return (n) => {
|
|
2666
|
-
const s =
|
|
2667
|
-
o !== "default" && (s.name = o),
|
|
2666
|
+
const s = fi("slot");
|
|
2667
|
+
o !== "default" && (s.name = o), bt(n, s);
|
|
2668
2668
|
};
|
|
2669
2669
|
};
|
|
2670
2670
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2671
2671
|
return;
|
|
2672
|
-
const r = {}, i =
|
|
2672
|
+
const r = {}, i = Js(this);
|
|
2673
2673
|
for (const o of this.$$s)
|
|
2674
2674
|
o in i && (o === "default" && !this.$$d.children ? (this.$$d.children = e(o), r.default = !0) : r[o] = e(o));
|
|
2675
2675
|
for (const o of this.attributes) {
|
|
2676
2676
|
const n = this.$$g_p(o.name);
|
|
2677
|
-
n in this.$$d || (this.$$d[n] =
|
|
2677
|
+
n in this.$$d || (this.$$d[n] = sr(n, o.value, this.$$p_d, "toProp"));
|
|
2678
2678
|
}
|
|
2679
2679
|
for (const o in this.$$p_d)
|
|
2680
2680
|
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
@@ -2686,13 +2686,13 @@ typeof HTMLElement == "function" && (Xo = class extends HTMLElement {
|
|
|
2686
2686
|
$$slots: r,
|
|
2687
2687
|
$$host: this
|
|
2688
2688
|
}
|
|
2689
|
-
}), this.$$me =
|
|
2690
|
-
|
|
2689
|
+
}), this.$$me = gs(() => {
|
|
2690
|
+
pi(() => {
|
|
2691
2691
|
this.$$r = !0;
|
|
2692
|
-
for (const o of
|
|
2692
|
+
for (const o of cr(this.$$c)) {
|
|
2693
2693
|
if (!this.$$p_d[o]?.reflect) continue;
|
|
2694
2694
|
this.$$d[o] = this.$$c[o];
|
|
2695
|
-
const n =
|
|
2695
|
+
const n = sr(
|
|
2696
2696
|
o,
|
|
2697
2697
|
this.$$d[o],
|
|
2698
2698
|
this.$$p_d,
|
|
@@ -2719,7 +2719,7 @@ typeof HTMLElement == "function" && (Xo = class extends HTMLElement {
|
|
|
2719
2719
|
* @param {string} newValue
|
|
2720
2720
|
*/
|
|
2721
2721
|
attributeChangedCallback(e, r, i) {
|
|
2722
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
2722
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = sr(e, i, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2723
2723
|
}
|
|
2724
2724
|
disconnectedCallback() {
|
|
2725
2725
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2730,12 +2730,12 @@ typeof HTMLElement == "function" && (Xo = class extends HTMLElement {
|
|
|
2730
2730
|
* @param {string} attribute_name
|
|
2731
2731
|
*/
|
|
2732
2732
|
$$g_p(e) {
|
|
2733
|
-
return
|
|
2733
|
+
return cr(this.$$p_d).find(
|
|
2734
2734
|
(r) => this.$$p_d[r].attribute === e || !this.$$p_d[r].attribute && r.toLowerCase() === e
|
|
2735
2735
|
) || e;
|
|
2736
2736
|
}
|
|
2737
2737
|
});
|
|
2738
|
-
function
|
|
2738
|
+
function sr(t, e, r, i) {
|
|
2739
2739
|
const o = r[t]?.type;
|
|
2740
2740
|
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !r[t])
|
|
2741
2741
|
return e;
|
|
@@ -2765,7 +2765,7 @@ function nr(t, e, r, i) {
|
|
|
2765
2765
|
return e;
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
|
-
function
|
|
2768
|
+
function Js(t) {
|
|
2769
2769
|
const e = {};
|
|
2770
2770
|
return t.childNodes.forEach((r) => {
|
|
2771
2771
|
e[
|
|
@@ -2774,33 +2774,33 @@ function Qs(t) {
|
|
|
2774
2774
|
] = !0;
|
|
2775
2775
|
}), e;
|
|
2776
2776
|
}
|
|
2777
|
-
function
|
|
2778
|
-
let s = class extends
|
|
2777
|
+
function Xs(t, e, r, i, o, n) {
|
|
2778
|
+
let s = class extends Zo {
|
|
2779
2779
|
constructor() {
|
|
2780
2780
|
super(t, r, o), this.$$p_d = e;
|
|
2781
2781
|
}
|
|
2782
2782
|
static get observedAttributes() {
|
|
2783
|
-
return
|
|
2783
|
+
return cr(e).map(
|
|
2784
2784
|
(l) => (e[l].attribute || l).toLowerCase()
|
|
2785
2785
|
);
|
|
2786
2786
|
}
|
|
2787
2787
|
};
|
|
2788
|
-
return
|
|
2789
|
-
|
|
2788
|
+
return cr(e).forEach((l) => {
|
|
2789
|
+
ar(s.prototype, l, {
|
|
2790
2790
|
get() {
|
|
2791
2791
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2792
2792
|
},
|
|
2793
2793
|
set(c) {
|
|
2794
|
-
c =
|
|
2794
|
+
c = sr(l, c, e), this.$$d[l] = c;
|
|
2795
2795
|
var a = this.$$c;
|
|
2796
2796
|
if (a) {
|
|
2797
|
-
var u =
|
|
2797
|
+
var u = _t(a, l)?.get;
|
|
2798
2798
|
u ? a[l] = c : a.$set({ [l]: c });
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
2801
|
});
|
|
2802
2802
|
}), i.forEach((l) => {
|
|
2803
|
-
|
|
2803
|
+
ar(s.prototype, l, {
|
|
2804
2804
|
get() {
|
|
2805
2805
|
return this.$$c?.[l];
|
|
2806
2806
|
}
|
|
@@ -2808,7 +2808,7 @@ function Js(t, e, r, i, o, n) {
|
|
|
2808
2808
|
}), t.element = /** @type {any} */
|
|
2809
2809
|
s, s;
|
|
2810
2810
|
}
|
|
2811
|
-
class
|
|
2811
|
+
class Zs extends Event {
|
|
2812
2812
|
constructor(r, i, o, n) {
|
|
2813
2813
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2814
2814
|
y(this, "context");
|
|
@@ -2818,7 +2818,7 @@ class Xs extends Event {
|
|
|
2818
2818
|
this.context = r, this.contextTarget = i, this.callback = o, this.subscribe = n ?? !1;
|
|
2819
2819
|
}
|
|
2820
2820
|
}
|
|
2821
|
-
class
|
|
2821
|
+
class el {
|
|
2822
2822
|
constructor(e, r) {
|
|
2823
2823
|
y(this, "host");
|
|
2824
2824
|
y(this, "context");
|
|
@@ -2842,13 +2842,13 @@ class Zs {
|
|
|
2842
2842
|
return this.currentValue;
|
|
2843
2843
|
}
|
|
2844
2844
|
requestValue() {
|
|
2845
|
-
this.host.dispatchEvent(new
|
|
2845
|
+
this.host.dispatchEvent(new Zs(this.context, this.host, this.handleValue, this.subscribe));
|
|
2846
2846
|
}
|
|
2847
2847
|
}
|
|
2848
|
-
const
|
|
2849
|
-
function
|
|
2848
|
+
const tl = (t) => t, rl = tl(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext"));
|
|
2849
|
+
function il(t, e, r) {
|
|
2850
2850
|
let i = !1;
|
|
2851
|
-
const o = new
|
|
2851
|
+
const o = new el(t, {
|
|
2852
2852
|
context: e,
|
|
2853
2853
|
subscribe: !0,
|
|
2854
2854
|
onValue: (a) => {
|
|
@@ -2872,29 +2872,29 @@ function rl(t, e, r) {
|
|
|
2872
2872
|
globalThis.clearInterval(c), t.removeEventListener("context-provider", n), o.disconnect();
|
|
2873
2873
|
};
|
|
2874
2874
|
}
|
|
2875
|
-
function il(t, e) {
|
|
2876
|
-
return rl(t, tl, e);
|
|
2877
|
-
}
|
|
2878
2875
|
function ol(t, e) {
|
|
2879
|
-
return il(t, e);
|
|
2876
|
+
return il(t, rl, e);
|
|
2877
|
+
}
|
|
2878
|
+
function nl(t, e) {
|
|
2879
|
+
return ol(t, e);
|
|
2880
2880
|
}
|
|
2881
2881
|
var Hi;
|
|
2882
2882
|
(function(t) {
|
|
2883
2883
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2884
2884
|
})(Hi || (Hi = {}));
|
|
2885
|
-
var
|
|
2885
|
+
var Bi;
|
|
2886
2886
|
(function(t) {
|
|
2887
2887
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2888
|
-
})(
|
|
2889
|
-
const
|
|
2888
|
+
})(Bi || (Bi = {}));
|
|
2889
|
+
const sl = {
|
|
2890
2890
|
tts: "textToSpeech",
|
|
2891
2891
|
colorScheme: "theme"
|
|
2892
2892
|
};
|
|
2893
|
-
function
|
|
2893
|
+
function ll(t) {
|
|
2894
2894
|
const e = t.trim();
|
|
2895
|
-
return e ?
|
|
2895
|
+
return e ? sl[e] || e : "";
|
|
2896
2896
|
}
|
|
2897
|
-
class
|
|
2897
|
+
class cl {
|
|
2898
2898
|
constructor() {
|
|
2899
2899
|
y(this, "tools", /* @__PURE__ */ new Map());
|
|
2900
2900
|
y(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
@@ -2908,7 +2908,7 @@ class ll {
|
|
|
2908
2908
|
* Normalize a single tool alias to canonical toolId.
|
|
2909
2909
|
*/
|
|
2910
2910
|
normalizeToolId(e) {
|
|
2911
|
-
return
|
|
2911
|
+
return ll(e);
|
|
2912
2912
|
}
|
|
2913
2913
|
/**
|
|
2914
2914
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -3011,6 +3011,24 @@ class ll {
|
|
|
3011
3011
|
getToolsByLevel(e) {
|
|
3012
3012
|
return this.getAllTools().filter((r) => r.supportedLevels.includes(e));
|
|
3013
3013
|
}
|
|
3014
|
+
/**
|
|
3015
|
+
* Resolve tool activation with backward-compatible defaults.
|
|
3016
|
+
*/
|
|
3017
|
+
getToolActivation(e) {
|
|
3018
|
+
return this.get(e)?.activation || "toolbar-toggle";
|
|
3019
|
+
}
|
|
3020
|
+
/**
|
|
3021
|
+
* Resolve singleton scope for a tool when present.
|
|
3022
|
+
*/
|
|
3023
|
+
getToolSingletonScope(e) {
|
|
3024
|
+
return this.get(e)?.singletonScope || null;
|
|
3025
|
+
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Filter tool IDs by activation type.
|
|
3028
|
+
*/
|
|
3029
|
+
filterToolIdsByActivation(e, r) {
|
|
3030
|
+
return e.filter((i) => this.getToolActivation(i) === r);
|
|
3031
|
+
}
|
|
3014
3032
|
/**
|
|
3015
3033
|
* Filter tools by visibility in a given context
|
|
3016
3034
|
*
|
|
@@ -3050,7 +3068,9 @@ class ll {
|
|
|
3050
3068
|
name: e.name,
|
|
3051
3069
|
description: e.description,
|
|
3052
3070
|
pnpSupportIds: e.pnpSupportIds || [],
|
|
3053
|
-
supportedLevels: e.supportedLevels
|
|
3071
|
+
supportedLevels: e.supportedLevels,
|
|
3072
|
+
activation: e.activation || "toolbar-toggle",
|
|
3073
|
+
singletonScope: e.singletonScope || null
|
|
3054
3074
|
}));
|
|
3055
3075
|
}
|
|
3056
3076
|
/**
|
|
@@ -3144,20 +3164,20 @@ class ll {
|
|
|
3144
3164
|
return o.renderToolbar(r, n);
|
|
3145
3165
|
}
|
|
3146
3166
|
}
|
|
3147
|
-
function
|
|
3167
|
+
function en(t) {
|
|
3148
3168
|
return t.level === "item";
|
|
3149
3169
|
}
|
|
3150
|
-
function
|
|
3170
|
+
function al(t) {
|
|
3151
3171
|
return t.level === "passage";
|
|
3152
3172
|
}
|
|
3153
|
-
function
|
|
3173
|
+
function fl(t) {
|
|
3154
3174
|
return t.level === "rubric";
|
|
3155
3175
|
}
|
|
3156
|
-
function
|
|
3176
|
+
function tn(t) {
|
|
3157
3177
|
return t.level === "element";
|
|
3158
3178
|
}
|
|
3159
|
-
function
|
|
3160
|
-
if (
|
|
3179
|
+
function _i(t) {
|
|
3180
|
+
if (tn(t)) {
|
|
3161
3181
|
const e = t.item.config;
|
|
3162
3182
|
if (!e)
|
|
3163
3183
|
return "";
|
|
@@ -3175,7 +3195,7 @@ function bi(t) {
|
|
|
3175
3195
|
}
|
|
3176
3196
|
return r.filter(Boolean).join(" ").trim();
|
|
3177
3197
|
}
|
|
3178
|
-
if (
|
|
3198
|
+
if (en(t)) {
|
|
3179
3199
|
const e = t.item;
|
|
3180
3200
|
if (!e?.config)
|
|
3181
3201
|
return "";
|
|
@@ -3198,7 +3218,7 @@ function bi(t) {
|
|
|
3198
3218
|
}
|
|
3199
3219
|
return i.filter(Boolean).join(" ").trim();
|
|
3200
3220
|
}
|
|
3201
|
-
if (
|
|
3221
|
+
if (al(t)) {
|
|
3202
3222
|
const e = t.passage;
|
|
3203
3223
|
if (!e?.config)
|
|
3204
3224
|
return "";
|
|
@@ -3221,14 +3241,14 @@ function bi(t) {
|
|
|
3221
3241
|
}
|
|
3222
3242
|
return i.filter(Boolean).join(" ").trim();
|
|
3223
3243
|
}
|
|
3224
|
-
if (
|
|
3244
|
+
if (fl(t)) {
|
|
3225
3245
|
const e = t.rubricBlock;
|
|
3226
3246
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3227
3247
|
}
|
|
3228
3248
|
return "";
|
|
3229
3249
|
}
|
|
3230
|
-
function
|
|
3231
|
-
const e =
|
|
3250
|
+
function wr(t) {
|
|
3251
|
+
const e = _i(t);
|
|
3232
3252
|
return [
|
|
3233
3253
|
/<math[>\s]/i,
|
|
3234
3254
|
// MathML
|
|
@@ -3244,7 +3264,7 @@ function yr(t) {
|
|
|
3244
3264
|
// Simple arithmetic
|
|
3245
3265
|
].some((i) => i.test(e));
|
|
3246
3266
|
}
|
|
3247
|
-
function
|
|
3267
|
+
function ul(t) {
|
|
3248
3268
|
const e = [
|
|
3249
3269
|
"pie-multiple-choice",
|
|
3250
3270
|
"pie-inline-choice",
|
|
@@ -3253,7 +3273,7 @@ function fl(t) {
|
|
|
3253
3273
|
"inline-choice",
|
|
3254
3274
|
"select-text"
|
|
3255
3275
|
];
|
|
3256
|
-
if (
|
|
3276
|
+
if (tn(t)) {
|
|
3257
3277
|
const r = t.item.config;
|
|
3258
3278
|
if (!r?.models)
|
|
3259
3279
|
return !1;
|
|
@@ -3263,7 +3283,7 @@ function fl(t) {
|
|
|
3263
3283
|
const n = o.element || "";
|
|
3264
3284
|
return e.includes(n);
|
|
3265
3285
|
}
|
|
3266
|
-
if (
|
|
3286
|
+
if (en(t)) {
|
|
3267
3287
|
const r = t.item.config?.models;
|
|
3268
3288
|
return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((o) => {
|
|
3269
3289
|
if (!o || typeof o != "object")
|
|
@@ -3274,11 +3294,11 @@ function fl(t) {
|
|
|
3274
3294
|
}
|
|
3275
3295
|
return !1;
|
|
3276
3296
|
}
|
|
3277
|
-
function
|
|
3278
|
-
return
|
|
3297
|
+
function kr(t) {
|
|
3298
|
+
return _i(t).trim().length >= 10;
|
|
3279
3299
|
}
|
|
3280
|
-
function
|
|
3281
|
-
const e =
|
|
3300
|
+
function dl(t) {
|
|
3301
|
+
const e = _i(t);
|
|
3282
3302
|
return [
|
|
3283
3303
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
3284
3304
|
/periodic\s+table/i,
|
|
@@ -3290,25 +3310,25 @@ function ul(t) {
|
|
|
3290
3310
|
/physics|force|energy|velocity|acceleration/i
|
|
3291
3311
|
].some((i) => i.test(e));
|
|
3292
3312
|
}
|
|
3293
|
-
const
|
|
3313
|
+
const pl = [
|
|
3294
3314
|
"assessment",
|
|
3295
3315
|
"section",
|
|
3296
3316
|
"item",
|
|
3297
3317
|
"passage",
|
|
3298
3318
|
"rubric"
|
|
3299
|
-
],
|
|
3300
|
-
function
|
|
3301
|
-
return
|
|
3319
|
+
], hl = new Set(pl);
|
|
3320
|
+
function vl(t) {
|
|
3321
|
+
return hl.has(t);
|
|
3302
3322
|
}
|
|
3303
3323
|
function _e(t, e, r) {
|
|
3304
3324
|
const i = t.trim(), o = r.trim();
|
|
3305
3325
|
if (!i || !o)
|
|
3306
3326
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3307
|
-
if (!
|
|
3327
|
+
if (!vl(e))
|
|
3308
3328
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
3309
3329
|
return `${i}:${e}:${o}`;
|
|
3310
3330
|
}
|
|
3311
|
-
const
|
|
3331
|
+
const gl = /* @__PURE__ */ new Set([
|
|
3312
3332
|
"annotation-xml",
|
|
3313
3333
|
"color-profile",
|
|
3314
3334
|
"font-face",
|
|
@@ -3317,7 +3337,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3317
3337
|
"font-face-format",
|
|
3318
3338
|
"font-face-name",
|
|
3319
3339
|
"missing-glyph"
|
|
3320
|
-
]),
|
|
3340
|
+
]), ml = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, bl = (t, e = "custom element tag") => {
|
|
3321
3341
|
if (!t || typeof t != "string")
|
|
3322
3342
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3323
3343
|
const r = t.trim();
|
|
@@ -3327,12 +3347,12 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3327
3347
|
throw new Error(`Invalid ${e} "${r}": custom element names must be lowercase`);
|
|
3328
3348
|
if (!r.includes("-"))
|
|
3329
3349
|
throw new Error(`Invalid ${e} "${r}": custom element names must include a hyphen`);
|
|
3330
|
-
if (
|
|
3350
|
+
if (gl.has(r))
|
|
3331
3351
|
throw new Error(`Invalid ${e} "${r}": this name is reserved by the HTML spec`);
|
|
3332
|
-
if (!
|
|
3352
|
+
if (!ml.test(r))
|
|
3333
3353
|
throw new Error(`Invalid ${e} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3334
3354
|
return r;
|
|
3335
|
-
},
|
|
3355
|
+
}, rn = {
|
|
3336
3356
|
calculator: "pie-tool-calculator",
|
|
3337
3357
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3338
3358
|
ruler: "pie-tool-ruler",
|
|
@@ -3345,13 +3365,13 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3345
3365
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3346
3366
|
graph: "pie-tool-graph",
|
|
3347
3367
|
periodicTable: "pie-tool-periodic-table"
|
|
3348
|
-
},
|
|
3349
|
-
const r = e?.toolTagMap?.[t] ??
|
|
3350
|
-
return
|
|
3351
|
-
},
|
|
3352
|
-
const o =
|
|
3353
|
-
return s ? s({ toolId: t, tagName: o, context: e, toolbarContext: r }) :
|
|
3354
|
-
},
|
|
3368
|
+
}, _l = (t, e) => {
|
|
3369
|
+
const r = e?.toolTagMap?.[t] ?? rn[t] ?? t;
|
|
3370
|
+
return bl(r, `tool component tag for "${t}"`);
|
|
3371
|
+
}, yl = (t) => document.createElement(t), Oe = (t, e, r, i) => {
|
|
3372
|
+
const o = _l(t, i), s = i?.toolComponentFactories?.[t] ?? i?.toolComponentFactory;
|
|
3373
|
+
return s ? s({ toolId: t, tagName: o, context: e, toolbarContext: r }) : yl(o);
|
|
3374
|
+
}, wl = {
|
|
3355
3375
|
toolId: "calculator",
|
|
3356
3376
|
name: "Calculator",
|
|
3357
3377
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
@@ -3377,7 +3397,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3377
3397
|
* (MathML, LaTeX, arithmetic markers).
|
|
3378
3398
|
*/
|
|
3379
3399
|
isVisibleInContext(t) {
|
|
3380
|
-
return
|
|
3400
|
+
return wr(t);
|
|
3381
3401
|
},
|
|
3382
3402
|
renderToolbar(t, e) {
|
|
3383
3403
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides, o = Oe(this.toolId, t, e, i);
|
|
@@ -3406,7 +3426,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3406
3426
|
}
|
|
3407
3427
|
};
|
|
3408
3428
|
}
|
|
3409
|
-
},
|
|
3429
|
+
}, kl = {
|
|
3410
3430
|
toolId: "textToSpeech",
|
|
3411
3431
|
name: "Text to Speech",
|
|
3412
3432
|
description: "Read content aloud",
|
|
@@ -3432,7 +3452,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3432
3452
|
* - Context contains readable text (at least 10 characters)
|
|
3433
3453
|
*/
|
|
3434
3454
|
isVisibleInContext(t) {
|
|
3435
|
-
return
|
|
3455
|
+
return kr(t);
|
|
3436
3456
|
},
|
|
3437
3457
|
renderToolbar(t, e) {
|
|
3438
3458
|
let r = null;
|
|
@@ -3540,7 +3560,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3540
3560
|
}
|
|
3541
3561
|
};
|
|
3542
3562
|
}
|
|
3543
|
-
},
|
|
3563
|
+
}, Tl = {
|
|
3544
3564
|
toolId: "ruler",
|
|
3545
3565
|
name: "Ruler",
|
|
3546
3566
|
description: "On-screen ruler for measurements",
|
|
@@ -3559,7 +3579,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3559
3579
|
* Pass 2: Ruler is relevant when math content is present
|
|
3560
3580
|
*/
|
|
3561
3581
|
isVisibleInContext(t) {
|
|
3562
|
-
return
|
|
3582
|
+
return wr(t);
|
|
3563
3583
|
},
|
|
3564
3584
|
renderToolbar(t, e) {
|
|
3565
3585
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3586,7 +3606,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3586
3606
|
}
|
|
3587
3607
|
};
|
|
3588
3608
|
}
|
|
3589
|
-
},
|
|
3609
|
+
}, Il = {
|
|
3590
3610
|
toolId: "protractor",
|
|
3591
3611
|
name: "Protractor",
|
|
3592
3612
|
description: "On-screen protractor for angle measurements",
|
|
@@ -3605,7 +3625,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3605
3625
|
* Pass 2: Protractor is relevant when math content is present
|
|
3606
3626
|
*/
|
|
3607
3627
|
isVisibleInContext(t) {
|
|
3608
|
-
return
|
|
3628
|
+
return wr(t);
|
|
3609
3629
|
},
|
|
3610
3630
|
renderToolbar(t, e) {
|
|
3611
3631
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3632,7 +3652,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3632
3652
|
}
|
|
3633
3653
|
};
|
|
3634
3654
|
}
|
|
3635
|
-
},
|
|
3655
|
+
}, El = {
|
|
3636
3656
|
toolId: "answerEliminator",
|
|
3637
3657
|
name: "Answer Eliminator",
|
|
3638
3658
|
description: "Strike through answer choices",
|
|
@@ -3655,7 +3675,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3655
3675
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
3656
3676
|
*/
|
|
3657
3677
|
isVisibleInContext(t) {
|
|
3658
|
-
return
|
|
3678
|
+
return ul(t);
|
|
3659
3679
|
},
|
|
3660
3680
|
renderToolbar(t, e) {
|
|
3661
3681
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides ?? {}, o = Oe(this.toolId, t, e, i);
|
|
@@ -3686,11 +3706,12 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3686
3706
|
}
|
|
3687
3707
|
};
|
|
3688
3708
|
}
|
|
3689
|
-
},
|
|
3709
|
+
}, Sl = {
|
|
3690
3710
|
toolId: "highlighter",
|
|
3691
3711
|
name: "Highlighter",
|
|
3692
3712
|
description: "Highlight text",
|
|
3693
3713
|
icon: "highlighter",
|
|
3714
|
+
activation: "toolbar-toggle",
|
|
3694
3715
|
// Highlighter appears at passage, rubric, item, and element levels
|
|
3695
3716
|
supportedLevels: ["passage", "rubric", "item", "element"],
|
|
3696
3717
|
// PNP support IDs
|
|
@@ -3699,7 +3720,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3699
3720
|
* Pass 2: Highlighter is relevant when readable text is available
|
|
3700
3721
|
*/
|
|
3701
3722
|
isVisibleInContext(t) {
|
|
3702
|
-
return
|
|
3723
|
+
return kr(t);
|
|
3703
3724
|
},
|
|
3704
3725
|
renderToolbar(t, e) {
|
|
3705
3726
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3726,7 +3747,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3726
3747
|
}
|
|
3727
3748
|
};
|
|
3728
3749
|
}
|
|
3729
|
-
},
|
|
3750
|
+
}, Al = {
|
|
3730
3751
|
toolId: "lineReader",
|
|
3731
3752
|
name: "Line Reader",
|
|
3732
3753
|
description: "Reading guide overlay",
|
|
@@ -3751,7 +3772,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3751
3772
|
* Pass 2: Line reader is relevant when readable text is present
|
|
3752
3773
|
*/
|
|
3753
3774
|
isVisibleInContext(t) {
|
|
3754
|
-
return
|
|
3775
|
+
return kr(t);
|
|
3755
3776
|
},
|
|
3756
3777
|
renderToolbar(t, e) {
|
|
3757
3778
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3778,7 +3799,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3778
3799
|
}
|
|
3779
3800
|
};
|
|
3780
3801
|
}
|
|
3781
|
-
},
|
|
3802
|
+
}, $l = {
|
|
3782
3803
|
toolId: "theme",
|
|
3783
3804
|
name: "Theme",
|
|
3784
3805
|
description: "Accessible themes and contrast",
|
|
@@ -3834,11 +3855,13 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3834
3855
|
}
|
|
3835
3856
|
};
|
|
3836
3857
|
}
|
|
3837
|
-
},
|
|
3858
|
+
}, Rl = $l, Ll = {
|
|
3838
3859
|
toolId: "annotationToolbar",
|
|
3839
3860
|
name: "Highlighter",
|
|
3840
3861
|
description: "Highlight and annotate text",
|
|
3841
3862
|
icon: "highlighter",
|
|
3863
|
+
activation: "selection-gateway",
|
|
3864
|
+
singletonScope: "section",
|
|
3842
3865
|
// Annotation appears where there's text content
|
|
3843
3866
|
supportedLevels: ["passage", "rubric", "item", "element"],
|
|
3844
3867
|
// PNP support IDs
|
|
@@ -3859,7 +3882,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3859
3882
|
* Pass 2: Annotation is relevant when readable text is present
|
|
3860
3883
|
*/
|
|
3861
3884
|
isVisibleInContext(t) {
|
|
3862
|
-
return
|
|
3885
|
+
return kr(t);
|
|
3863
3886
|
},
|
|
3864
3887
|
renderToolbar(t, e) {
|
|
3865
3888
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3886,7 +3909,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3886
3909
|
}
|
|
3887
3910
|
};
|
|
3888
3911
|
}
|
|
3889
|
-
},
|
|
3912
|
+
}, Ol = {
|
|
3890
3913
|
toolId: "graph",
|
|
3891
3914
|
name: "Graph",
|
|
3892
3915
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -3909,7 +3932,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3909
3932
|
* Pass 2: Graph is relevant when math content is present
|
|
3910
3933
|
*/
|
|
3911
3934
|
isVisibleInContext(t) {
|
|
3912
|
-
return
|
|
3935
|
+
return wr(t);
|
|
3913
3936
|
},
|
|
3914
3937
|
renderToolbar(t, e) {
|
|
3915
3938
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3936,7 +3959,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3936
3959
|
}
|
|
3937
3960
|
};
|
|
3938
3961
|
}
|
|
3939
|
-
},
|
|
3962
|
+
}, Vl = {
|
|
3940
3963
|
toolId: "periodicTable",
|
|
3941
3964
|
name: "Periodic Table",
|
|
3942
3965
|
description: "Chemistry periodic table reference",
|
|
@@ -3957,7 +3980,7 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3957
3980
|
* Pass 2: Periodic table is relevant when science content is present
|
|
3958
3981
|
*/
|
|
3959
3982
|
isVisibleInContext(t) {
|
|
3960
|
-
return
|
|
3983
|
+
return dl(t);
|
|
3961
3984
|
},
|
|
3962
3985
|
renderToolbar(t, e) {
|
|
3963
3986
|
const r = _e(this.toolId, e.scope.level, e.scope.scopeId), i = {
|
|
@@ -3985,26 +4008,26 @@ const vl = /* @__PURE__ */ new Set([
|
|
|
3985
4008
|
};
|
|
3986
4009
|
}
|
|
3987
4010
|
};
|
|
3988
|
-
function
|
|
3989
|
-
const e = new
|
|
4011
|
+
function Ml(t = {}) {
|
|
4012
|
+
const e = new cl(), r = {
|
|
3990
4013
|
toolTagMap: {
|
|
3991
|
-
...
|
|
4014
|
+
...rn,
|
|
3992
4015
|
...t.toolTagMap || {}
|
|
3993
4016
|
},
|
|
3994
4017
|
toolComponentFactory: t.toolComponentFactory,
|
|
3995
4018
|
toolComponentFactories: t.toolComponentFactories
|
|
3996
4019
|
}, i = (o) => t.overrides?.[o.toolId] || o;
|
|
3997
|
-
return e.register(i(
|
|
4020
|
+
return e.register(i(wl)), e.register(i(kl)), e.register(i(Tl)), e.register(i(Il)), e.register(i(El)), e.register(i(Sl)), e.register(i(Al)), e.register(i(Rl)), e.register(i(Ll)), e.register(i(Ol)), e.register(i(Vl)), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(r), e;
|
|
3998
4021
|
}
|
|
3999
|
-
function
|
|
4000
|
-
const t =
|
|
4022
|
+
function Cl() {
|
|
4023
|
+
const t = Ml(), e = /* @__PURE__ */ new Set();
|
|
4001
4024
|
for (const r of t.getAllTools())
|
|
4002
4025
|
for (const i of r.pnpSupportIds || [])
|
|
4003
4026
|
e.add(i);
|
|
4004
4027
|
return [...e].sort();
|
|
4005
4028
|
}
|
|
4006
|
-
|
|
4007
|
-
const
|
|
4029
|
+
Cl();
|
|
4030
|
+
const Nl = {
|
|
4008
4031
|
/**
|
|
4009
4032
|
* Visual accessibility features
|
|
4010
4033
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4175,22 +4198,22 @@ const Cl = {
|
|
|
4175
4198
|
tutorialAvailable: "tutorialAvailable"
|
|
4176
4199
|
}
|
|
4177
4200
|
};
|
|
4178
|
-
Object.values(
|
|
4179
|
-
var
|
|
4201
|
+
Object.values(Nl).flatMap((t) => Object.values(t));
|
|
4202
|
+
var Zr;
|
|
4180
4203
|
(function(t) {
|
|
4181
4204
|
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";
|
|
4182
|
-
})(
|
|
4183
|
-
var
|
|
4205
|
+
})(Zr || (Zr = {}));
|
|
4206
|
+
var Ui;
|
|
4184
4207
|
(function(t) {
|
|
4185
4208
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4186
|
-
})(
|
|
4187
|
-
function
|
|
4209
|
+
})(Ui || (Ui = {}));
|
|
4210
|
+
function Dl(t) {
|
|
4188
4211
|
return t === "light" || t === "dark" || t === "auto";
|
|
4189
4212
|
}
|
|
4190
|
-
function
|
|
4213
|
+
function Pl(t) {
|
|
4191
4214
|
return t === "self" || t === "document";
|
|
4192
4215
|
}
|
|
4193
|
-
function
|
|
4216
|
+
function ei(t) {
|
|
4194
4217
|
if (!t || typeof t != "object")
|
|
4195
4218
|
return {};
|
|
4196
4219
|
const e = {};
|
|
@@ -4202,7 +4225,7 @@ function Zr(t) {
|
|
|
4202
4225
|
} else typeof i == "number" && (e[r] = String(i));
|
|
4203
4226
|
return e;
|
|
4204
4227
|
}
|
|
4205
|
-
const
|
|
4228
|
+
const ql = [
|
|
4206
4229
|
{
|
|
4207
4230
|
id: "default",
|
|
4208
4231
|
name: "Default",
|
|
@@ -4396,15 +4419,15 @@ const Pl = [
|
|
|
4396
4419
|
},
|
|
4397
4420
|
preview: { bg: "#333333", text: "#e0e0e0", primary: "#aaaaaa" }
|
|
4398
4421
|
}
|
|
4399
|
-
],
|
|
4400
|
-
function
|
|
4401
|
-
return [...
|
|
4402
|
-
}
|
|
4403
|
-
function jl(t) {
|
|
4404
|
-
return t ? rn.get(t) ?? ei.get(t) : ei.get("default");
|
|
4422
|
+
], ti = new Map(ql.map((t) => [t.id, t])), on = /* @__PURE__ */ new Map();
|
|
4423
|
+
function jl() {
|
|
4424
|
+
return [...ti.values(), ...on.values()];
|
|
4405
4425
|
}
|
|
4406
4426
|
function Fl(t) {
|
|
4407
|
-
return
|
|
4427
|
+
return t ? on.get(t) ?? ti.get(t) : ti.get("default");
|
|
4428
|
+
}
|
|
4429
|
+
function xl(t) {
|
|
4430
|
+
return Fl(t)?.variables ?? {};
|
|
4408
4431
|
}
|
|
4409
4432
|
const Hl = {
|
|
4410
4433
|
"--pie-text": "black",
|
|
@@ -4454,7 +4477,7 @@ const Hl = {
|
|
|
4454
4477
|
"--pie-button-hover-color": "#111827",
|
|
4455
4478
|
"--pie-button-active-bg": "#f3f4f6",
|
|
4456
4479
|
"--pie-button-focus-outline": "#3b82f6"
|
|
4457
|
-
},
|
|
4480
|
+
}, Bl = {
|
|
4458
4481
|
"--pie-text": "#ffffff",
|
|
4459
4482
|
"--pie-disabled": "#999999",
|
|
4460
4483
|
"--pie-disabled-secondary": "#777777",
|
|
@@ -4502,43 +4525,84 @@ const Hl = {
|
|
|
4502
4525
|
"--pie-button-hover-color": "#ffffff",
|
|
4503
4526
|
"--pie-button-active-bg": "#4b5563",
|
|
4504
4527
|
"--pie-button-focus-outline": "#93c5fd"
|
|
4505
|
-
},
|
|
4506
|
-
function
|
|
4528
|
+
}, ri = /* @__PURE__ */ new Map();
|
|
4529
|
+
function lr(t) {
|
|
4507
4530
|
const e = t.trim();
|
|
4508
4531
|
return e || void 0;
|
|
4509
4532
|
}
|
|
4510
|
-
function
|
|
4511
|
-
|
|
4512
|
-
|
|
4533
|
+
function Ve(t) {
|
|
4534
|
+
if (!(!t.left || !t.right))
|
|
4535
|
+
return `color-mix(in srgb, ${t.left} ${t.leftWeight}, ${t.right})`;
|
|
4536
|
+
}
|
|
4537
|
+
function Ul(t) {
|
|
4538
|
+
const e = (r) => lr(t.getPropertyValue(r));
|
|
4539
|
+
return ei({
|
|
4513
4540
|
"--pie-background": e("--color-base-100"),
|
|
4514
4541
|
"--pie-background-dark": e("--color-base-200"),
|
|
4515
4542
|
"--pie-secondary-background": e("--color-base-200"),
|
|
4516
4543
|
"--pie-dropdown-background": e("--color-base-300"),
|
|
4517
4544
|
"--pie-text": e("--color-base-content"),
|
|
4518
4545
|
"--pie-primary": e("--color-primary"),
|
|
4519
|
-
"--pie-primary-light":
|
|
4520
|
-
|
|
4546
|
+
"--pie-primary-light": Ve({
|
|
4547
|
+
left: e("--color-primary"),
|
|
4548
|
+
right: e("--color-base-100"),
|
|
4549
|
+
leftWeight: "60%"
|
|
4550
|
+
}),
|
|
4551
|
+
"--pie-primary-dark": Ve({
|
|
4552
|
+
left: e("--color-primary"),
|
|
4553
|
+
right: e("--color-base-content"),
|
|
4554
|
+
leftWeight: "75%"
|
|
4555
|
+
}),
|
|
4556
|
+
"--pie-faded-primary": Ve({
|
|
4557
|
+
left: e("--color-primary"),
|
|
4558
|
+
right: e("--color-base-100"),
|
|
4559
|
+
leftWeight: "20%"
|
|
4560
|
+
}),
|
|
4521
4561
|
"--pie-secondary": e("--color-secondary"),
|
|
4522
|
-
"--pie-secondary-light":
|
|
4523
|
-
|
|
4562
|
+
"--pie-secondary-light": Ve({
|
|
4563
|
+
left: e("--color-secondary"),
|
|
4564
|
+
right: e("--color-base-100"),
|
|
4565
|
+
leftWeight: "60%"
|
|
4566
|
+
}),
|
|
4567
|
+
"--pie-secondary-dark": Ve({
|
|
4568
|
+
left: e("--color-secondary"),
|
|
4569
|
+
right: e("--color-base-content"),
|
|
4570
|
+
leftWeight: "75%"
|
|
4571
|
+
}),
|
|
4524
4572
|
"--pie-tertiary": e("--color-accent"),
|
|
4525
|
-
"--pie-tertiary-light":
|
|
4573
|
+
"--pie-tertiary-light": Ve({
|
|
4574
|
+
left: e("--color-accent"),
|
|
4575
|
+
right: e("--color-base-100"),
|
|
4576
|
+
leftWeight: "60%"
|
|
4577
|
+
}),
|
|
4526
4578
|
"--pie-border": e("--color-base-300"),
|
|
4527
4579
|
"--pie-border-light": e("--color-base-200"),
|
|
4528
4580
|
"--pie-border-dark": e("--color-neutral"),
|
|
4529
4581
|
"--pie-border-gray": e("--color-base-300"),
|
|
4530
4582
|
"--pie-correct": e("--color-success"),
|
|
4531
|
-
"--pie-correct-secondary":
|
|
4583
|
+
"--pie-correct-secondary": Ve({
|
|
4584
|
+
left: e("--color-success"),
|
|
4585
|
+
right: e("--color-base-100"),
|
|
4586
|
+
leftWeight: "20%"
|
|
4587
|
+
}),
|
|
4532
4588
|
"--pie-correct-tertiary": e("--color-success"),
|
|
4533
4589
|
"--pie-correct-icon": e("--color-success"),
|
|
4534
4590
|
"--pie-incorrect": e("--color-error"),
|
|
4535
|
-
"--pie-incorrect-secondary":
|
|
4591
|
+
"--pie-incorrect-secondary": Ve({
|
|
4592
|
+
left: e("--color-error"),
|
|
4593
|
+
right: e("--color-base-100"),
|
|
4594
|
+
leftWeight: "20%"
|
|
4595
|
+
}),
|
|
4536
4596
|
"--pie-incorrect-icon": e("--color-error"),
|
|
4537
|
-
"--pie-missing": e("--color-
|
|
4538
|
-
"--pie-missing-icon": e("--color-
|
|
4597
|
+
"--pie-missing": e("--color-error"),
|
|
4598
|
+
"--pie-missing-icon": e("--color-error"),
|
|
4539
4599
|
"--pie-disabled": e("--color-base-300"),
|
|
4540
4600
|
"--pie-disabled-secondary": e("--color-base-200"),
|
|
4541
|
-
"--pie-focus-checked":
|
|
4601
|
+
"--pie-focus-checked": Ve({
|
|
4602
|
+
left: e("--color-primary"),
|
|
4603
|
+
right: e("--color-base-100"),
|
|
4604
|
+
leftWeight: "20%"
|
|
4605
|
+
}),
|
|
4542
4606
|
"--pie-focus-checked-border": e("--color-primary"),
|
|
4543
4607
|
"--pie-focus-unchecked": e("--color-base-200"),
|
|
4544
4608
|
"--pie-focus-unchecked-border": e("--color-base-300"),
|
|
@@ -4558,38 +4622,38 @@ function Bl(t) {
|
|
|
4558
4622
|
"--pie-button-focus-outline": e("--color-primary")
|
|
4559
4623
|
});
|
|
4560
4624
|
}
|
|
4561
|
-
const
|
|
4625
|
+
const Gi = {
|
|
4562
4626
|
id: "daisyui",
|
|
4563
4627
|
canRead(t) {
|
|
4564
4628
|
const e = getComputedStyle(t);
|
|
4565
|
-
return !!(
|
|
4629
|
+
return !!(lr(e.getPropertyValue("--color-base-100")) || lr(e.getPropertyValue("--color-base-content")) || lr(e.getPropertyValue("--color-primary")));
|
|
4566
4630
|
},
|
|
4567
4631
|
read(t) {
|
|
4568
|
-
return
|
|
4632
|
+
return Ul(getComputedStyle(t));
|
|
4569
4633
|
}
|
|
4570
4634
|
};
|
|
4571
|
-
|
|
4572
|
-
function
|
|
4635
|
+
ri.set(Gi.id, Gi);
|
|
4636
|
+
function Gl(t) {
|
|
4573
4637
|
const e = t.provider?.trim() || "auto", r = (o) => {
|
|
4574
4638
|
if (e !== "auto") {
|
|
4575
|
-
const n =
|
|
4576
|
-
return !n || !n.canRead(o) ? {} :
|
|
4639
|
+
const n = ri.get(e);
|
|
4640
|
+
return !n || !n.canRead(o) ? {} : ei(n.read(o));
|
|
4577
4641
|
}
|
|
4578
|
-
for (const n of
|
|
4642
|
+
for (const n of ri.values())
|
|
4579
4643
|
if (n.canRead(o))
|
|
4580
|
-
return
|
|
4644
|
+
return ei(n.read(o));
|
|
4581
4645
|
return {};
|
|
4582
4646
|
}, i = r(t.target);
|
|
4583
4647
|
return Object.keys(i).length > 0 ? i : typeof document < "u" && t.target !== document.documentElement ? r(document.documentElement) : {};
|
|
4584
4648
|
}
|
|
4585
|
-
const
|
|
4649
|
+
const zl = typeof HTMLElement > "u" ? class {
|
|
4586
4650
|
} : HTMLElement;
|
|
4587
|
-
function
|
|
4651
|
+
function ii(t) {
|
|
4588
4652
|
if (!t)
|
|
4589
4653
|
return {};
|
|
4590
4654
|
if (typeof t == "string")
|
|
4591
4655
|
try {
|
|
4592
|
-
return
|
|
4656
|
+
return ii(JSON.parse(t));
|
|
4593
4657
|
} catch {
|
|
4594
4658
|
return {};
|
|
4595
4659
|
}
|
|
@@ -4600,7 +4664,7 @@ function ri(t) {
|
|
|
4600
4664
|
r.startsWith("--") && (typeof i == "string" ? e[r] = i : typeof i == "number" && (e[r] = String(i)));
|
|
4601
4665
|
return e;
|
|
4602
4666
|
}
|
|
4603
|
-
class
|
|
4667
|
+
class Wl extends zl {
|
|
4604
4668
|
constructor() {
|
|
4605
4669
|
super(...arguments);
|
|
4606
4670
|
y(this, "mediaQuery", null);
|
|
@@ -4613,14 +4677,14 @@ class zl extends Gl {
|
|
|
4613
4677
|
}
|
|
4614
4678
|
get theme() {
|
|
4615
4679
|
const r = this.getAttribute("theme");
|
|
4616
|
-
return
|
|
4680
|
+
return Dl(r) ? r : "light";
|
|
4617
4681
|
}
|
|
4618
4682
|
set theme(r) {
|
|
4619
4683
|
this.setAttribute("theme", r);
|
|
4620
4684
|
}
|
|
4621
4685
|
get scope() {
|
|
4622
4686
|
const r = this.getAttribute("scope");
|
|
4623
|
-
return
|
|
4687
|
+
return Pl(r) ? r : "self";
|
|
4624
4688
|
}
|
|
4625
4689
|
set scope(r) {
|
|
4626
4690
|
this.setAttribute("scope", r);
|
|
@@ -4629,7 +4693,7 @@ class zl extends Gl {
|
|
|
4629
4693
|
return { ...this.variablesOverride };
|
|
4630
4694
|
}
|
|
4631
4695
|
set variables(r) {
|
|
4632
|
-
this.variablesOverride =
|
|
4696
|
+
this.variablesOverride = ii(r), this.setAttribute("variables", JSON.stringify(this.variablesOverride)), this.applyTheme();
|
|
4633
4697
|
}
|
|
4634
4698
|
get provider() {
|
|
4635
4699
|
return this.getAttribute("provider")?.trim() || "auto";
|
|
@@ -4650,7 +4714,7 @@ class zl extends Gl {
|
|
|
4650
4714
|
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"));
|
|
4651
4715
|
}
|
|
4652
4716
|
attributeChangedCallback(r, i, o) {
|
|
4653
|
-
i !== o && (r === "variables" && (this.variablesOverride =
|
|
4717
|
+
i !== o && (r === "variables" && (this.variablesOverride = ii(o)), r === "theme" && this.setupAutoThemeListener(), this.applyTheme());
|
|
4654
4718
|
}
|
|
4655
4719
|
getTarget() {
|
|
4656
4720
|
return this.scope === "document" ? document.documentElement : this;
|
|
@@ -4660,10 +4724,10 @@ class zl extends Gl {
|
|
|
4660
4724
|
return;
|
|
4661
4725
|
const { effectiveTheme: r, dataTheme: i } = this.resolveThemeState(), o = this.getTarget();
|
|
4662
4726
|
o.setAttribute("data-theme", i), this.scheme && this.scheme !== "default" ? o.setAttribute("data-color-scheme", this.scheme) : o.removeAttribute("data-color-scheme");
|
|
4663
|
-
const n = r === "dark" ?
|
|
4727
|
+
const n = r === "dark" ? Bl : Hl, s = Gl({
|
|
4664
4728
|
target: o,
|
|
4665
4729
|
provider: this.provider
|
|
4666
|
-
}), l =
|
|
4730
|
+
}), l = xl(this.scheme), c = {
|
|
4667
4731
|
...n,
|
|
4668
4732
|
...s,
|
|
4669
4733
|
...l,
|
|
@@ -4691,11 +4755,11 @@ class zl extends Gl {
|
|
|
4691
4755
|
}
|
|
4692
4756
|
}
|
|
4693
4757
|
function Kl(t = "pie-theme") {
|
|
4694
|
-
typeof customElements > "u" || customElements.get(t) || customElements.define(t,
|
|
4758
|
+
typeof customElements > "u" || customElements.get(t) || customElements.define(t, Wl);
|
|
4695
4759
|
}
|
|
4696
4760
|
Kl();
|
|
4697
|
-
const Yl = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 },
|
|
4698
|
-
function
|
|
4761
|
+
const Yl = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, nn = "https://proxy.pie-api.com", Ql = `${nn}/bundles/`;
|
|
4762
|
+
function sn(t) {
|
|
4699
4763
|
try {
|
|
4700
4764
|
const e = Yl?.[t];
|
|
4701
4765
|
if (typeof e == "string" && e.length > 0)
|
|
@@ -4703,24 +4767,24 @@ function nn(t) {
|
|
|
4703
4767
|
} catch {
|
|
4704
4768
|
}
|
|
4705
4769
|
}
|
|
4706
|
-
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL ||
|
|
4707
|
-
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL ||
|
|
4708
|
-
var
|
|
4770
|
+
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || sn("PUBLIC_BUILDER_ORIGIN_URL");
|
|
4771
|
+
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || sn("PUBLIC_BUILDER_BUNDLE_URL");
|
|
4772
|
+
var oi;
|
|
4709
4773
|
(function(t) {
|
|
4710
4774
|
t.player = "player.js", t.clientPlayer = "client-player.js", t.editor = "editor.js";
|
|
4711
|
-
})(
|
|
4712
|
-
var
|
|
4775
|
+
})(oi || (oi = {}));
|
|
4776
|
+
var zi;
|
|
4713
4777
|
(function(t) {
|
|
4714
4778
|
t.loading = "loading", t.loaded = "loaded";
|
|
4715
|
-
})(
|
|
4779
|
+
})(zi || (zi = {}));
|
|
4716
4780
|
typeof window < "u" && !window.pieHelpers && (window.pieHelpers = {
|
|
4717
4781
|
loadingScripts: {},
|
|
4718
4782
|
loadingPromises: {}
|
|
4719
4783
|
});
|
|
4720
|
-
var
|
|
4784
|
+
var Wi;
|
|
4721
4785
|
(function(t) {
|
|
4722
4786
|
t.SAVE = "save", t.MODEL = "model", t.SCORE = "score", t.MANUAL_SCORE = "manual-score";
|
|
4723
|
-
})(
|
|
4787
|
+
})(Wi || (Wi = {}));
|
|
4724
4788
|
var Ki;
|
|
4725
4789
|
(function(t) {
|
|
4726
4790
|
t.AUTO = "auto", t.MANUAL = "manual";
|
|
@@ -4729,16 +4793,16 @@ var Yi;
|
|
|
4729
4793
|
(function(t) {
|
|
4730
4794
|
t.GATHER = "gather", t.VIEW = "view", t.EVALUATE = "evaluate";
|
|
4731
4795
|
})(Yi || (Yi = {}));
|
|
4732
|
-
var
|
|
4796
|
+
var Qi;
|
|
4733
4797
|
(function(t) {
|
|
4734
4798
|
t.PENDING = "pending", t.IN_PROGRESS = "in_progress", t.COMPLETED = "completed", t.FAILED = "failed";
|
|
4735
|
-
})(
|
|
4736
|
-
var
|
|
4799
|
+
})(Qi || (Qi = {}));
|
|
4800
|
+
var Ji;
|
|
4737
4801
|
(function(t) {
|
|
4738
4802
|
t[t.ROOT = 0] = "ROOT", t[t.SUBJECT = 1] = "SUBJECT", t[t.LEVEL = 2] = "LEVEL", t[t.STANDARD = 3] = "STANDARD";
|
|
4739
|
-
})(
|
|
4740
|
-
|
|
4741
|
-
function
|
|
4803
|
+
})(Ji || (Ji = {}));
|
|
4804
|
+
oi.player;
|
|
4805
|
+
function Jl(t) {
|
|
4742
4806
|
const e = typeof document < "u" ? document.activeElement : null;
|
|
4743
4807
|
return queueMicrotask(() => {
|
|
4744
4808
|
try {
|
|
@@ -4752,14 +4816,14 @@ function Ql(t) {
|
|
|
4752
4816
|
}
|
|
4753
4817
|
};
|
|
4754
4818
|
}
|
|
4755
|
-
function
|
|
4819
|
+
function Xl(t) {
|
|
4756
4820
|
try {
|
|
4757
4821
|
return typeof localStorage > "u" ? null : localStorage.getItem(t);
|
|
4758
4822
|
} catch {
|
|
4759
4823
|
return null;
|
|
4760
4824
|
}
|
|
4761
4825
|
}
|
|
4762
|
-
function
|
|
4826
|
+
function Zl(t, e) {
|
|
4763
4827
|
try {
|
|
4764
4828
|
if (typeof localStorage > "u")
|
|
4765
4829
|
return;
|
|
@@ -4767,8 +4831,8 @@ function Xl(t, e) {
|
|
|
4767
4831
|
} catch {
|
|
4768
4832
|
}
|
|
4769
4833
|
}
|
|
4770
|
-
var
|
|
4771
|
-
const
|
|
4834
|
+
var ec = /* @__PURE__ */ As('<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>'), tc = /* @__PURE__ */ bi('<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>'), rc = /* @__PURE__ */ bi('<div class="pie-tool-color-scheme__dropdown svelte-17qy4wk" role="menu"></div>'), ic = /* @__PURE__ */ bi('<div class="pie-tool-color-scheme svelte-17qy4wk" role="dialog" tabindex="-1" aria-modal="true" aria-labelledby="color-scheme-title"><div class="pie-tool-color-scheme__header svelte-17qy4wk"><h3 id="color-scheme-title" class="pie-tool-color-scheme__title svelte-17qy4wk">Theme</h3> <button type="button" class="pie-tool-color-scheme__close svelte-17qy4wk" aria-label="Close theme selector">×</button></div> <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>');
|
|
4835
|
+
const oc = {
|
|
4772
4836
|
hash: "svelte-17qy4wk",
|
|
4773
4837
|
code: `.pie-tool-color-scheme.svelte-17qy4wk {position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;max-width:32rem;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);display:flex;flex-direction:column;}.pie-tool-color-scheme__header.svelte-17qy4wk {display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:2px solid var(--pie-border, #ccc);}.pie-tool-color-scheme__title.svelte-17qy4wk {font-size:1.25rem;font-weight:700;color:var(--pie-text, black);margin:0;}.pie-tool-color-scheme__close.svelte-17qy4wk {width:2rem;height:2rem;border:none;background:transparent;color:var(--pie-text, black);font-size:1.5rem;line-height:1;cursor:pointer;border-radius:0.25rem;}.pie-tool-color-scheme__close.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, #f0f0f0);}.pie-tool-color-scheme__content.svelte-17qy4wk {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;}.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);}
|
|
4774
4838
|
|
|
@@ -4776,15 +4840,15 @@ const ic = {
|
|
|
4776
4840
|
.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk:focus-visible,
|
|
4777
4841
|
.pie-tool-color-scheme__option.svelte-17qy4wk:focus-visible {outline:2px solid var(--pie-primary, #3f51b5);outline-offset:2px;}`
|
|
4778
4842
|
};
|
|
4779
|
-
function
|
|
4780
|
-
|
|
4843
|
+
function nc(t, e) {
|
|
4844
|
+
ao(e, !0), js(t, oc);
|
|
4781
4845
|
const r = typeof window < "u";
|
|
4782
|
-
let i =
|
|
4783
|
-
const a = /* @__PURE__ */
|
|
4846
|
+
let i = rr(e, "visible", 7, !1), o = rr(e, "toolId", 7, "theme"), n = rr(e, "schemes", 7, ""), s = rr(e, "schemeCatalog", 7, null), l = /* @__PURE__ */ ee(void 0), c = /* @__PURE__ */ ee(null);
|
|
4847
|
+
const a = /* @__PURE__ */ Dr(() => g(c)?.toolCoordinator);
|
|
4784
4848
|
let u = /* @__PURE__ */ ee(!1);
|
|
4785
|
-
|
|
4849
|
+
mt(() => {
|
|
4786
4850
|
if (g(l))
|
|
4787
|
-
return
|
|
4851
|
+
return nl(g(l), (m) => {
|
|
4788
4852
|
C(c, m, !0);
|
|
4789
4853
|
});
|
|
4790
4854
|
});
|
|
@@ -4843,12 +4907,12 @@ function oc(t, e) {
|
|
|
4843
4907
|
if (!m || typeof m != "object") return null;
|
|
4844
4908
|
const _ = m, k = typeof _.id == "string" ? _.id.trim() : "";
|
|
4845
4909
|
if (!k) return null;
|
|
4846
|
-
const M = typeof _.name == "string" && _.name.trim() ? _.name.trim() : k,
|
|
4847
|
-
bg:
|
|
4848
|
-
text:
|
|
4849
|
-
primary:
|
|
4910
|
+
const M = typeof _.name == "string" && _.name.trim() ? _.name.trim() : k, vt = typeof _.description == "string" ? _.description : "", W = _.preview, Jt = W && typeof W == "object" && typeof W.bg == "string" && typeof W.text == "string" && typeof W.primary == "string" ? {
|
|
4911
|
+
bg: W.bg,
|
|
4912
|
+
text: W.text,
|
|
4913
|
+
primary: W.primary
|
|
4850
4914
|
} : p(typeof _.variables == "object" && _.variables ? _.variables : void 0, { bg: "#ffffff", text: "#000000", primary: "#3f51b5" });
|
|
4851
|
-
return { id: k, name: M, description:
|
|
4915
|
+
return { id: k, name: M, description: vt, preview: Jt };
|
|
4852
4916
|
}
|
|
4853
4917
|
function d(m) {
|
|
4854
4918
|
if (!m?.trim()) return [];
|
|
@@ -4866,7 +4930,7 @@ function oc(t, e) {
|
|
|
4866
4930
|
return _ || document.querySelector("pie-theme");
|
|
4867
4931
|
}
|
|
4868
4932
|
function b() {
|
|
4869
|
-
const m =
|
|
4933
|
+
const m = jl(), _ = new Map(h.map((k) => [k.id, k]));
|
|
4870
4934
|
return m.map((k) => {
|
|
4871
4935
|
const M = _.get(k.id) || {
|
|
4872
4936
|
id: k.id,
|
|
@@ -4882,7 +4946,7 @@ function oc(t, e) {
|
|
|
4882
4946
|
};
|
|
4883
4947
|
});
|
|
4884
4948
|
}
|
|
4885
|
-
const $ = /* @__PURE__ */
|
|
4949
|
+
const $ = /* @__PURE__ */ Dr(() => {
|
|
4886
4950
|
if (Array.isArray(s()) && s().length > 0) {
|
|
4887
4951
|
const k = s().map((M) => v(M)).filter((M) => !!M);
|
|
4888
4952
|
if (k.length > 0) return k;
|
|
@@ -4902,42 +4966,42 @@ function oc(t, e) {
|
|
|
4902
4966
|
const k = document.documentElement;
|
|
4903
4967
|
m === "default" ? k.removeAttribute("data-color-scheme") : k.setAttribute("data-color-scheme", m);
|
|
4904
4968
|
}
|
|
4905
|
-
|
|
4969
|
+
Zl("pie-color-scheme", m);
|
|
4906
4970
|
}
|
|
4907
4971
|
function we(m) {
|
|
4908
4972
|
C(S, m, !0), ye(m), g(a)?.hideTool(o());
|
|
4909
4973
|
}
|
|
4910
|
-
function
|
|
4974
|
+
function Je() {
|
|
4911
4975
|
C(D, !g(D));
|
|
4912
4976
|
}
|
|
4913
|
-
let P = /* @__PURE__ */
|
|
4914
|
-
|
|
4977
|
+
let P = /* @__PURE__ */ Dr(() => g($).find((m) => m.id === g(S)) || g($)[0] || h[0]);
|
|
4978
|
+
mt(() => {
|
|
4915
4979
|
g($).find((m) => m.id === g(S)) || C(S, g($)[0]?.id || "default", !0);
|
|
4916
4980
|
});
|
|
4917
4981
|
function ie() {
|
|
4918
4982
|
C(D, !1), g(a)?.hideTool(o());
|
|
4919
4983
|
}
|
|
4920
|
-
function
|
|
4984
|
+
function Tr(m) {
|
|
4921
4985
|
if (m.key === "Escape")
|
|
4922
4986
|
g(D) ? C(D, !1) : ie();
|
|
4923
4987
|
else if (g(D) && (m.key === "ArrowDown" || m.key === "ArrowUp")) {
|
|
4924
4988
|
m.preventDefault();
|
|
4925
4989
|
const _ = g(l)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");
|
|
4926
4990
|
if (!_ || _.length === 0) return;
|
|
4927
|
-
const k = Array.from(_).findIndex((
|
|
4991
|
+
const k = Array.from(_).findIndex((vt) => vt === document.activeElement);
|
|
4928
4992
|
let M;
|
|
4929
4993
|
m.key === "ArrowDown" ? M = k === -1 ? 0 : (k + 1) % _.length : M = k === -1 ? _.length - 1 : (k - 1 + _.length) % _.length, _[M]?.focus();
|
|
4930
4994
|
}
|
|
4931
4995
|
}
|
|
4932
|
-
|
|
4933
|
-
g(a) && o() && !g(u) && (g(a).registerTool(o(), "Theme", void 0,
|
|
4934
|
-
}),
|
|
4996
|
+
mt(() => {
|
|
4997
|
+
g(a) && o() && !g(u) && (g(a).registerTool(o(), "Theme", void 0, Zr.MODAL), C(u, !0));
|
|
4998
|
+
}), mt(() => {
|
|
4935
4999
|
g(a) && g(l) && o() && g(a).updateToolElement(o(), g(l));
|
|
4936
|
-
}),
|
|
4937
|
-
!i() && z ? (z(), z = null) : i() && g(l) && !z && (z =
|
|
4938
|
-
}),
|
|
5000
|
+
}), mt(() => {
|
|
5001
|
+
!i() && z ? (z(), z = null) : i() && g(l) && !z && (z = Jl(g(l)));
|
|
5002
|
+
}), Cs(() => {
|
|
4939
5003
|
if (r) {
|
|
4940
|
-
const k = w()?.getAttribute("scheme"), M =
|
|
5004
|
+
const k = w()?.getAttribute("scheme"), M = Xl("pie-color-scheme") ?? k ?? "default";
|
|
4941
5005
|
C(S, M, !0), M && requestAnimationFrame(() => {
|
|
4942
5006
|
ye(M);
|
|
4943
5007
|
});
|
|
@@ -4951,89 +5015,89 @@ function oc(t, e) {
|
|
|
4951
5015
|
document.removeEventListener("click", m), g(a) && o() && g(a).unregisterTool(o());
|
|
4952
5016
|
};
|
|
4953
5017
|
});
|
|
4954
|
-
var
|
|
5018
|
+
var Ir = {
|
|
4955
5019
|
get visible() {
|
|
4956
5020
|
return i();
|
|
4957
5021
|
},
|
|
4958
5022
|
set visible(m = !1) {
|
|
4959
|
-
i(m),
|
|
5023
|
+
i(m), Pt();
|
|
4960
5024
|
},
|
|
4961
5025
|
get toolId() {
|
|
4962
5026
|
return o();
|
|
4963
5027
|
},
|
|
4964
5028
|
set toolId(m = "theme") {
|
|
4965
|
-
o(m),
|
|
5029
|
+
o(m), Pt();
|
|
4966
5030
|
},
|
|
4967
5031
|
get schemes() {
|
|
4968
5032
|
return n();
|
|
4969
5033
|
},
|
|
4970
5034
|
set schemes(m = "") {
|
|
4971
|
-
n(m),
|
|
5035
|
+
n(m), Pt();
|
|
4972
5036
|
},
|
|
4973
5037
|
get schemeCatalog() {
|
|
4974
5038
|
return s();
|
|
4975
5039
|
},
|
|
4976
5040
|
set schemeCatalog(m = null) {
|
|
4977
|
-
s(m),
|
|
5041
|
+
s(m), Pt();
|
|
4978
5042
|
}
|
|
4979
|
-
},
|
|
5043
|
+
}, wi = $s(), ln = ds(wi);
|
|
4980
5044
|
{
|
|
4981
|
-
var
|
|
4982
|
-
var _ =
|
|
5045
|
+
var cn = (m) => {
|
|
5046
|
+
var _ = ic(), k = H(_), M = ue(H(k), 2);
|
|
4983
5047
|
q(k);
|
|
4984
|
-
var
|
|
4985
|
-
q(
|
|
4986
|
-
var
|
|
4987
|
-
q(
|
|
4988
|
-
var
|
|
4989
|
-
q(
|
|
4990
|
-
var
|
|
5048
|
+
var vt = ue(k, 2), W = ue(H(vt), 2), Jt = H(W), Er = H(Jt), Sr = H(Er), ki = H(Sr), an = ue(ki, 2);
|
|
5049
|
+
q(Sr), q(Er);
|
|
5050
|
+
var Ti = ue(Er, 2), Ar = H(Ti), fn = H(Ar, !0);
|
|
5051
|
+
q(Ar);
|
|
5052
|
+
var Ii = ue(Ar, 2), un = H(Ii, !0);
|
|
5053
|
+
q(Ii), q(Ti), no(2), q(Jt), q(W);
|
|
5054
|
+
var dn = ue(W, 2);
|
|
4991
5055
|
{
|
|
4992
|
-
var
|
|
4993
|
-
var
|
|
4994
|
-
|
|
4995
|
-
var
|
|
4996
|
-
let
|
|
4997
|
-
var
|
|
4998
|
-
q(
|
|
4999
|
-
var
|
|
5000
|
-
q(
|
|
5001
|
-
var
|
|
5002
|
-
q(
|
|
5003
|
-
var
|
|
5056
|
+
var pn = (Nt) => {
|
|
5057
|
+
var $r = rc();
|
|
5058
|
+
Ds($r, 21, () => g($), (Rr) => Rr.id, (Rr, ke) => {
|
|
5059
|
+
var Xe = tc();
|
|
5060
|
+
let Ei;
|
|
5061
|
+
var Lr = H(Xe), Or = H(Lr), Si = H(Or), hn = ue(Si, 2);
|
|
5062
|
+
q(Or), q(Lr);
|
|
5063
|
+
var Vr = ue(Lr, 2), Mr = H(Vr), vn = H(Mr, !0);
|
|
5064
|
+
q(Mr);
|
|
5065
|
+
var Ai = ue(Mr, 2), gn = H(Ai, !0);
|
|
5066
|
+
q(Ai), q(Vr);
|
|
5067
|
+
var mn = ue(Vr, 2);
|
|
5004
5068
|
{
|
|
5005
|
-
var
|
|
5006
|
-
var
|
|
5007
|
-
|
|
5069
|
+
var bn = (Cr) => {
|
|
5070
|
+
var _n = ec();
|
|
5071
|
+
bt(Cr, _n);
|
|
5008
5072
|
};
|
|
5009
|
-
|
|
5010
|
-
g(S) === g(ke).id &&
|
|
5073
|
+
Pr(mn, (Cr) => {
|
|
5074
|
+
g(S) === g(ke).id && Cr(bn);
|
|
5011
5075
|
});
|
|
5012
5076
|
}
|
|
5013
|
-
q(
|
|
5014
|
-
|
|
5077
|
+
q(Xe), Mi(() => {
|
|
5078
|
+
Ei = Hs(Xe, 1, "pie-tool-color-scheme__option svelte-17qy4wk", null, Ei, {
|
|
5015
5079
|
"pie-tool-color-scheme__option--active": g(S) === g(ke).id
|
|
5016
|
-
}),
|
|
5017
|
-
}),
|
|
5018
|
-
}), q(
|
|
5080
|
+
}), qr(Xe, "aria-label", g(ke).name), qr(Xe, "aria-current", g(S) === g(ke).id), gt(Or, `background-color: ${g(ke).preview.bg ?? ""}`), gt(Si, `color: ${g(ke).preview.text ?? ""}`), gt(hn, `background-color: ${g(ke).preview.primary ?? ""}`), er(vn, g(ke).name), er(gn, g(ke).description);
|
|
5081
|
+
}), Zt("click", Xe, () => we(g(ke).id)), bt(Rr, Xe);
|
|
5082
|
+
}), q($r), bt(Nt, $r);
|
|
5019
5083
|
};
|
|
5020
|
-
|
|
5021
|
-
g(D) &&
|
|
5084
|
+
Pr(dn, (Nt) => {
|
|
5085
|
+
g(D) && Nt(pn);
|
|
5022
5086
|
});
|
|
5023
5087
|
}
|
|
5024
|
-
q(
|
|
5025
|
-
|
|
5026
|
-
}),
|
|
5088
|
+
q(vt), q(_), Ks(_, (Nt) => C(l, Nt), () => g(l)), Mi(() => {
|
|
5089
|
+
qr(W, "aria-expanded", g(D)), gt(Sr, `background-color: ${g(P).preview.bg ?? ""}`), gt(ki, `color: ${g(P).preview.text ?? ""}`), gt(an, `background-color: ${g(P).preview.primary ?? ""}`), er(fn, g(P).name), er(un, g(P).description);
|
|
5090
|
+
}), Zt("keydown", _, Tr), Zt("click", M, ie), Zt("click", W, Je), bt(m, _);
|
|
5027
5091
|
};
|
|
5028
|
-
|
|
5029
|
-
i() && m(
|
|
5092
|
+
Pr(ln, (m) => {
|
|
5093
|
+
i() && m(cn);
|
|
5030
5094
|
});
|
|
5031
5095
|
}
|
|
5032
|
-
return
|
|
5096
|
+
return bt(t, wi), fo(Ir);
|
|
5033
5097
|
}
|
|
5034
|
-
|
|
5035
|
-
customElements.define("pie-tool-theme",
|
|
5036
|
-
|
|
5098
|
+
Ts(["keydown", "click"]);
|
|
5099
|
+
customElements.define("pie-tool-theme", Xs(
|
|
5100
|
+
nc,
|
|
5037
5101
|
{
|
|
5038
5102
|
visible: { attribute: "visible", type: "Boolean" },
|
|
5039
5103
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -5045,5 +5109,5 @@ customElements.define("pie-tool-theme", Js(
|
|
|
5045
5109
|
{ mode: "open" }
|
|
5046
5110
|
));
|
|
5047
5111
|
export {
|
|
5048
|
-
|
|
5112
|
+
nc as default
|
|
5049
5113
|
};
|