@pie-players/pie-tool-answer-eliminator 0.2.4 → 0.2.5
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-answer-eliminator.js +1283 -1079
- package/dist/tool-answer-eliminator.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,123 +1,126 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ai = Object.defineProperty;
|
|
2
|
+
var Kt = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
|
|
5
|
+
var ui = (t, e, n) => e in t ? ai(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var p = (t, e, n) => ui(t, typeof e != "symbol" ? e + "" : e, n), Tt = (t, e, n) => e.has(t) || Kt("Cannot " + n);
|
|
7
|
+
var l = (t, e, n) => (Tt(t, e, "read from private field"), n ? n.call(t) : e.get(t)), b = (t, e, n) => e.has(t) ? Kt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), m = (t, e, n, i) => (Tt(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n), k = (t, e, n) => (Tt(t, e, "access private method"), n);
|
|
8
|
+
var an;
|
|
9
|
+
typeof window < "u" && ((an = window.__svelte ?? (window.__svelte = {})).v ?? (an.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const un = "[", cn = "[!", fn = "]", mt = {}, O = /* @__PURE__ */ Symbol(), ci = "http://www.w3.org/1999/xhtml", Ot = !1;
|
|
11
|
+
var fi = Array.isArray, hi = Array.prototype.indexOf, ze = Array.prototype.includes, di = Array.from, vt = Object.keys, _t = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, gi = Object.prototype, pi = Array.prototype, mi = Object.getPrototypeOf, Wt = Object.isExtensible;
|
|
12
|
+
const vi = () => {
|
|
13
|
+
};
|
|
14
|
+
function _i(t) {
|
|
13
15
|
for (var e = 0; e < t.length; e++)
|
|
14
16
|
t[e]();
|
|
15
17
|
}
|
|
16
|
-
function
|
|
17
|
-
var t, e, n = new Promise((
|
|
18
|
-
t =
|
|
18
|
+
function yi() {
|
|
19
|
+
var t, e, n = new Promise((i, r) => {
|
|
20
|
+
t = i, e = r;
|
|
19
21
|
});
|
|
20
22
|
return { promise: n, resolve: t, reject: e };
|
|
21
23
|
}
|
|
22
|
-
const
|
|
24
|
+
const R = 2, yt = 4, hn = 8, dn = 1 << 24, ge = 16, pe = 32, Ce = 64, gn = 128, G = 512, N = 1024, I = 2048, Q = 4096, ve = 8192, _e = 16384, Ye = 32768, bt = 65536, Qt = 1 << 17, pn = 1 << 18, Ve = 1 << 19, bi = 1 << 20, Ne = 65536, Nt = 1 << 21, mn = 1 << 22, Ze = 1 << 23, Rt = /* @__PURE__ */ Symbol("$state"), wi = /* @__PURE__ */ Symbol("legacy props"), Ht = new class extends Error {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
p(this, "name", "StaleReactionError");
|
|
28
|
+
p(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
27
29
|
}
|
|
28
|
-
}(),
|
|
29
|
-
function
|
|
30
|
+
}(), Et = 8;
|
|
31
|
+
function Ci(t) {
|
|
30
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
31
33
|
}
|
|
32
|
-
function
|
|
34
|
+
function Si(t) {
|
|
33
35
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function Ei() {
|
|
36
38
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
37
39
|
}
|
|
38
|
-
function
|
|
40
|
+
function $i(t) {
|
|
39
41
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
40
42
|
}
|
|
41
|
-
function
|
|
43
|
+
function Ai() {
|
|
42
44
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
43
45
|
}
|
|
44
|
-
function
|
|
46
|
+
function ki() {
|
|
45
47
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
46
48
|
}
|
|
47
|
-
function
|
|
49
|
+
function xi() {
|
|
48
50
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
49
51
|
}
|
|
50
|
-
function
|
|
52
|
+
function Ti() {
|
|
51
53
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function Ri() {
|
|
54
56
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
55
57
|
}
|
|
56
|
-
function
|
|
58
|
+
function Oi() {
|
|
57
59
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
58
60
|
}
|
|
59
|
-
function
|
|
61
|
+
function vn(t) {
|
|
60
62
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
61
63
|
}
|
|
62
|
-
function
|
|
64
|
+
function Ni() {
|
|
63
65
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
64
66
|
}
|
|
65
|
-
let
|
|
66
|
-
function
|
|
67
|
-
|
|
67
|
+
let te = !1;
|
|
68
|
+
function lt(t) {
|
|
69
|
+
te = t;
|
|
68
70
|
}
|
|
69
|
-
let
|
|
70
|
-
function
|
|
71
|
+
let q;
|
|
72
|
+
function et(t) {
|
|
71
73
|
if (t === null)
|
|
72
|
-
throw
|
|
73
|
-
return
|
|
74
|
+
throw vn(), mt;
|
|
75
|
+
return q = t;
|
|
74
76
|
}
|
|
75
77
|
function _n() {
|
|
76
|
-
return
|
|
78
|
+
return et(/* @__PURE__ */ Ue(q));
|
|
77
79
|
}
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
for (var e = t, n =
|
|
80
|
+
function Ii(t = 1) {
|
|
81
|
+
if (te) {
|
|
82
|
+
for (var e = t, n = q; e--; )
|
|
81
83
|
n = /** @type {TemplateNode} */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
84
|
+
/* @__PURE__ */ Ue(n);
|
|
85
|
+
q = n;
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
|
-
function
|
|
87
|
-
for (var e = 0, n =
|
|
88
|
-
if (n.nodeType ===
|
|
89
|
-
var
|
|
88
|
+
function Li(t = !0) {
|
|
89
|
+
for (var e = 0, n = q; ; ) {
|
|
90
|
+
if (n.nodeType === Et) {
|
|
91
|
+
var i = (
|
|
90
92
|
/** @type {Comment} */
|
|
91
93
|
n.data
|
|
92
94
|
);
|
|
93
|
-
if (
|
|
95
|
+
if (i === fn) {
|
|
94
96
|
if (e === 0) return n;
|
|
95
97
|
e -= 1;
|
|
96
|
-
} else (
|
|
98
|
+
} else (i === un || i === cn || // "[1", "[2", etc. for if blocks
|
|
99
|
+
i[0] === "[" && !isNaN(Number(i.slice(1)))) && (e += 1);
|
|
97
100
|
}
|
|
98
|
-
var
|
|
101
|
+
var r = (
|
|
99
102
|
/** @type {TemplateNode} */
|
|
100
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ Ue(n)
|
|
101
104
|
);
|
|
102
|
-
t && n.remove(), n =
|
|
105
|
+
t && n.remove(), n = r;
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
|
-
function
|
|
108
|
+
function yn(t) {
|
|
106
109
|
return t === this.v;
|
|
107
110
|
}
|
|
108
|
-
function
|
|
111
|
+
function Fi(t, e) {
|
|
109
112
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
110
113
|
}
|
|
111
|
-
function
|
|
112
|
-
return !
|
|
114
|
+
function Bi(t) {
|
|
115
|
+
return !Fi(t, this.v);
|
|
113
116
|
}
|
|
114
|
-
let
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
+
let Di = !1, V = null;
|
|
118
|
+
function wt(t) {
|
|
119
|
+
V = t;
|
|
117
120
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
p:
|
|
121
|
+
function bn(t, e = !1, n) {
|
|
122
|
+
V = {
|
|
123
|
+
p: V,
|
|
121
124
|
i: !1,
|
|
122
125
|
c: null,
|
|
123
126
|
e: null,
|
|
@@ -126,166 +129,190 @@ function mn(t, e = !1, n) {
|
|
|
126
129
|
l: null
|
|
127
130
|
};
|
|
128
131
|
}
|
|
129
|
-
function
|
|
132
|
+
function wn(t) {
|
|
130
133
|
var e = (
|
|
131
134
|
/** @type {ComponentContext} */
|
|
132
|
-
|
|
135
|
+
V
|
|
133
136
|
), n = e.e;
|
|
134
137
|
if (n !== null) {
|
|
135
138
|
e.e = null;
|
|
136
|
-
for (var
|
|
137
|
-
|
|
139
|
+
for (var i of n)
|
|
140
|
+
Gn(i);
|
|
138
141
|
}
|
|
139
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
142
|
+
return t !== void 0 && (e.x = t), e.i = !0, V = e.p, t ?? /** @type {T} */
|
|
140
143
|
{};
|
|
141
144
|
}
|
|
142
|
-
function
|
|
145
|
+
function Cn() {
|
|
143
146
|
return !0;
|
|
144
147
|
}
|
|
145
148
|
let Ee = [];
|
|
146
|
-
function
|
|
149
|
+
function Sn() {
|
|
147
150
|
var t = Ee;
|
|
148
|
-
Ee = [],
|
|
151
|
+
Ee = [], _i(t);
|
|
149
152
|
}
|
|
150
|
-
function
|
|
151
|
-
if (Ee.length === 0 && !
|
|
153
|
+
function Fe(t) {
|
|
154
|
+
if (Ee.length === 0 && !Je) {
|
|
152
155
|
var e = Ee;
|
|
153
156
|
queueMicrotask(() => {
|
|
154
|
-
e === Ee &&
|
|
157
|
+
e === Ee && Sn();
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
160
|
Ee.push(t);
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function Mi() {
|
|
160
163
|
for (; Ee.length > 0; )
|
|
161
|
-
|
|
164
|
+
Sn();
|
|
162
165
|
}
|
|
163
166
|
function En(t) {
|
|
164
167
|
var e = w;
|
|
165
168
|
if (e === null)
|
|
166
|
-
return
|
|
167
|
-
if ((e.f &
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
e.b.error(t);
|
|
171
|
-
} else
|
|
172
|
-
yt(t, e);
|
|
169
|
+
return _.f |= Ze, t;
|
|
170
|
+
if ((e.f & Ye) === 0 && (e.f & yt) === 0)
|
|
171
|
+
throw t;
|
|
172
|
+
Ct(t, e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Ct(t, e) {
|
|
175
175
|
for (; e !== null; ) {
|
|
176
|
-
if ((e.f &
|
|
176
|
+
if ((e.f & gn) !== 0) {
|
|
177
|
+
if ((e.f & Ye) === 0)
|
|
178
|
+
throw t;
|
|
177
179
|
try {
|
|
178
180
|
e.b.error(t);
|
|
179
181
|
return;
|
|
180
182
|
} catch (n) {
|
|
181
183
|
t = n;
|
|
182
184
|
}
|
|
185
|
+
}
|
|
183
186
|
e = e.parent;
|
|
184
187
|
}
|
|
185
188
|
throw t;
|
|
186
189
|
}
|
|
187
|
-
const
|
|
188
|
-
function
|
|
189
|
-
t.f = t.f &
|
|
190
|
+
const qi = -7169;
|
|
191
|
+
function A(t, e) {
|
|
192
|
+
t.f = t.f & qi | e;
|
|
190
193
|
}
|
|
191
|
-
function
|
|
192
|
-
(t.f &
|
|
194
|
+
function zt(t) {
|
|
195
|
+
(t.f & G) !== 0 || t.deps === null ? A(t, N) : A(t, Q);
|
|
193
196
|
}
|
|
194
197
|
function $n(t) {
|
|
195
198
|
if (t !== null)
|
|
196
199
|
for (const e of t)
|
|
197
|
-
(e.f &
|
|
200
|
+
(e.f & R) === 0 || (e.f & Ne) === 0 || (e.f ^= Ne, $n(
|
|
198
201
|
/** @type {Derived} */
|
|
199
202
|
e.deps
|
|
200
203
|
));
|
|
201
204
|
}
|
|
202
|
-
function
|
|
203
|
-
(t.f &
|
|
205
|
+
function An(t, e, n) {
|
|
206
|
+
(t.f & I) !== 0 ? e.add(t) : (t.f & Q) !== 0 && n.add(t), $n(t.deps), A(t, N);
|
|
204
207
|
}
|
|
205
|
-
const
|
|
206
|
-
let
|
|
207
|
-
var
|
|
208
|
+
const at = /* @__PURE__ */ new Set();
|
|
209
|
+
let x = null, U = null, F = [], $t = null, It = !1, Je = !1;
|
|
210
|
+
var Be, De, Ae, Me, nt, it, ke, ae, qe, re, Lt, Ft, kn;
|
|
208
211
|
const Ut = class Ut {
|
|
209
212
|
constructor() {
|
|
210
|
-
b(this,
|
|
211
|
-
|
|
213
|
+
b(this, re);
|
|
214
|
+
p(this, "committed", !1);
|
|
212
215
|
/**
|
|
213
216
|
* The current values of any sources that are updated in this batch
|
|
214
217
|
* They keys of this map are identical to `this.#previous`
|
|
215
218
|
* @type {Map<Source, any>}
|
|
216
219
|
*/
|
|
217
|
-
|
|
220
|
+
p(this, "current", /* @__PURE__ */ new Map());
|
|
218
221
|
/**
|
|
219
222
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
220
223
|
* They keys of this map are identical to `this.#current`
|
|
221
224
|
* @type {Map<Source, any>}
|
|
222
225
|
*/
|
|
223
|
-
|
|
226
|
+
p(this, "previous", /* @__PURE__ */ new Map());
|
|
224
227
|
/**
|
|
225
228
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
226
229
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
227
230
|
* @type {Set<() => void>}
|
|
228
231
|
*/
|
|
229
|
-
b(this,
|
|
232
|
+
b(this, Be, /* @__PURE__ */ new Set());
|
|
230
233
|
/**
|
|
231
234
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
232
235
|
* @type {Set<(batch: Batch) => void>}
|
|
233
236
|
*/
|
|
234
|
-
b(this,
|
|
237
|
+
b(this, De, /* @__PURE__ */ new Set());
|
|
235
238
|
/**
|
|
236
239
|
* The number of async effects that are currently in flight
|
|
237
240
|
*/
|
|
238
|
-
b(this,
|
|
241
|
+
b(this, Ae, 0);
|
|
239
242
|
/**
|
|
240
243
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
241
244
|
*/
|
|
242
|
-
b(this,
|
|
245
|
+
b(this, Me, 0);
|
|
243
246
|
/**
|
|
244
247
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
245
248
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
246
249
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
247
250
|
*/
|
|
248
|
-
b(this,
|
|
251
|
+
b(this, nt, null);
|
|
249
252
|
/**
|
|
250
253
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
251
254
|
* @type {Set<Effect>}
|
|
252
255
|
*/
|
|
253
|
-
b(this,
|
|
256
|
+
b(this, it, /* @__PURE__ */ new Set());
|
|
254
257
|
/**
|
|
255
258
|
* Deferred effects that are MAYBE_DIRTY
|
|
256
259
|
* @type {Set<Effect>}
|
|
257
260
|
*/
|
|
258
|
-
b(this,
|
|
261
|
+
b(this, ke, /* @__PURE__ */ new Set());
|
|
259
262
|
/**
|
|
260
|
-
* A
|
|
261
|
-
* is committed — we skip over these during `process
|
|
262
|
-
*
|
|
263
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
264
|
+
* is committed — we skip over these during `process`.
|
|
265
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
266
|
+
* so they can be rescheduled if the branch survives.
|
|
267
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
263
268
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
b(this,
|
|
269
|
+
b(this, ae, /* @__PURE__ */ new Map());
|
|
270
|
+
p(this, "is_fork", !1);
|
|
271
|
+
b(this, qe, !1);
|
|
267
272
|
}
|
|
268
273
|
is_deferred() {
|
|
269
|
-
return this.is_fork ||
|
|
274
|
+
return this.is_fork || l(this, Me) > 0;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
278
|
+
* @param {Effect} effect
|
|
279
|
+
*/
|
|
280
|
+
skip_effect(e) {
|
|
281
|
+
l(this, ae).has(e) || l(this, ae).set(e, { d: [], m: [] });
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
285
|
+
* any tracked dirty/maybe_dirty child effects
|
|
286
|
+
* @param {Effect} effect
|
|
287
|
+
*/
|
|
288
|
+
unskip_effect(e) {
|
|
289
|
+
var n = l(this, ae).get(e);
|
|
290
|
+
if (n) {
|
|
291
|
+
l(this, ae).delete(e);
|
|
292
|
+
for (var i of n.d)
|
|
293
|
+
A(i, I), ne(i);
|
|
294
|
+
for (i of n.m)
|
|
295
|
+
A(i, Q), ne(i);
|
|
296
|
+
}
|
|
270
297
|
}
|
|
271
298
|
/**
|
|
272
299
|
*
|
|
273
300
|
* @param {Effect[]} root_effects
|
|
274
301
|
*/
|
|
275
302
|
process(e) {
|
|
276
|
-
|
|
277
|
-
var n = [],
|
|
278
|
-
for (const
|
|
279
|
-
|
|
303
|
+
F = [], this.apply();
|
|
304
|
+
var n = [], i = [];
|
|
305
|
+
for (const r of e)
|
|
306
|
+
k(this, re, Lt).call(this, r, n, i);
|
|
280
307
|
if (this.is_deferred()) {
|
|
281
|
-
|
|
282
|
-
for (const
|
|
283
|
-
|
|
308
|
+
k(this, re, Ft).call(this, i), k(this, re, Ft).call(this, n);
|
|
309
|
+
for (const [r, s] of l(this, ae))
|
|
310
|
+
On(r, s);
|
|
284
311
|
} else {
|
|
285
|
-
for (const
|
|
286
|
-
|
|
312
|
+
for (const r of l(this, Be)) r();
|
|
313
|
+
l(this, Be).clear(), l(this, Ae) === 0 && k(this, re, kn).call(this), x = null, Jt(i), Jt(n), l(this, nt)?.resolve();
|
|
287
314
|
}
|
|
288
|
-
|
|
315
|
+
U = null;
|
|
289
316
|
}
|
|
290
317
|
/**
|
|
291
318
|
* Associate a change to a given source with the current
|
|
@@ -294,315 +321,315 @@ const Ut = class Ut {
|
|
|
294
321
|
* @param {any} value
|
|
295
322
|
*/
|
|
296
323
|
capture(e, n) {
|
|
297
|
-
n !==
|
|
324
|
+
n !== O && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ze) === 0 && (this.current.set(e, e.v), U?.set(e, e.v));
|
|
298
325
|
}
|
|
299
326
|
activate() {
|
|
300
|
-
|
|
327
|
+
x = this, this.apply();
|
|
301
328
|
}
|
|
302
329
|
deactivate() {
|
|
303
|
-
|
|
330
|
+
x === this && (x = null, U = null);
|
|
304
331
|
}
|
|
305
332
|
flush() {
|
|
306
|
-
if (this.activate(),
|
|
307
|
-
if (
|
|
333
|
+
if (this.activate(), F.length > 0) {
|
|
334
|
+
if (xn(), x !== null && x !== this)
|
|
308
335
|
return;
|
|
309
|
-
} else
|
|
336
|
+
} else l(this, Ae) === 0 && this.process([]);
|
|
310
337
|
this.deactivate();
|
|
311
338
|
}
|
|
312
339
|
discard() {
|
|
313
|
-
for (const e of
|
|
314
|
-
|
|
340
|
+
for (const e of l(this, De)) e(this);
|
|
341
|
+
l(this, De).clear();
|
|
315
342
|
}
|
|
316
343
|
/**
|
|
317
344
|
*
|
|
318
345
|
* @param {boolean} blocking
|
|
319
346
|
*/
|
|
320
347
|
increment(e) {
|
|
321
|
-
|
|
348
|
+
m(this, Ae, l(this, Ae) + 1), e && m(this, Me, l(this, Me) + 1);
|
|
322
349
|
}
|
|
323
350
|
/**
|
|
324
351
|
*
|
|
325
352
|
* @param {boolean} blocking
|
|
326
353
|
*/
|
|
327
354
|
decrement(e) {
|
|
328
|
-
|
|
329
|
-
|
|
355
|
+
m(this, Ae, l(this, Ae) - 1), e && m(this, Me, l(this, Me) - 1), !l(this, qe) && (m(this, qe, !0), Fe(() => {
|
|
356
|
+
m(this, qe, !1), this.is_deferred() ? F.length > 0 && this.flush() : this.revive();
|
|
330
357
|
}));
|
|
331
358
|
}
|
|
332
359
|
revive() {
|
|
333
|
-
for (const e of
|
|
334
|
-
|
|
335
|
-
for (const e of
|
|
336
|
-
|
|
360
|
+
for (const e of l(this, it))
|
|
361
|
+
l(this, ke).delete(e), A(e, I), ne(e);
|
|
362
|
+
for (const e of l(this, ke))
|
|
363
|
+
A(e, Q), ne(e);
|
|
337
364
|
this.flush();
|
|
338
365
|
}
|
|
339
366
|
/** @param {() => void} fn */
|
|
340
367
|
oncommit(e) {
|
|
341
|
-
|
|
368
|
+
l(this, Be).add(e);
|
|
342
369
|
}
|
|
343
370
|
/** @param {(batch: Batch) => void} fn */
|
|
344
371
|
ondiscard(e) {
|
|
345
|
-
|
|
372
|
+
l(this, De).add(e);
|
|
346
373
|
}
|
|
347
374
|
settled() {
|
|
348
|
-
return (
|
|
375
|
+
return (l(this, nt) ?? m(this, nt, yi())).promise;
|
|
349
376
|
}
|
|
350
377
|
static ensure() {
|
|
351
|
-
if (
|
|
352
|
-
const e =
|
|
353
|
-
|
|
354
|
-
|
|
378
|
+
if (x === null) {
|
|
379
|
+
const e = x = new Ut();
|
|
380
|
+
at.add(x), Je || Fe(() => {
|
|
381
|
+
x === e && e.flush();
|
|
355
382
|
});
|
|
356
383
|
}
|
|
357
|
-
return
|
|
384
|
+
return x;
|
|
358
385
|
}
|
|
359
386
|
apply() {
|
|
360
387
|
}
|
|
361
388
|
};
|
|
362
|
-
|
|
389
|
+
Be = new WeakMap(), De = new WeakMap(), Ae = new WeakMap(), Me = new WeakMap(), nt = new WeakMap(), it = new WeakMap(), ke = new WeakMap(), ae = new WeakMap(), qe = new WeakMap(), re = new WeakSet(), /**
|
|
363
390
|
* Traverse the effect tree, executing effects or stashing
|
|
364
391
|
* them for later execution as appropriate
|
|
365
392
|
* @param {Effect} root
|
|
366
393
|
* @param {Effect[]} effects
|
|
367
394
|
* @param {Effect[]} render_effects
|
|
368
395
|
*/
|
|
369
|
-
Lt = function(e, n,
|
|
370
|
-
e.f ^=
|
|
371
|
-
for (var
|
|
372
|
-
var
|
|
373
|
-
if (!c &&
|
|
374
|
-
a ?
|
|
375
|
-
var h =
|
|
396
|
+
Lt = function(e, n, i) {
|
|
397
|
+
e.f ^= N;
|
|
398
|
+
for (var r = e.first, s = null; r !== null; ) {
|
|
399
|
+
var o = r.f, a = (o & (pe | Ce)) !== 0, u = a && (o & N) !== 0, c = u || (o & ve) !== 0 || l(this, ae).has(r);
|
|
400
|
+
if (!c && r.fn !== null) {
|
|
401
|
+
a ? r.f ^= N : s !== null && (o & (yt | hn | dn)) !== 0 ? s.b.defer_effect(r) : (o & yt) !== 0 ? n.push(r) : st(r) && ((o & ge) !== 0 && l(this, ke).add(r), Ge(r));
|
|
402
|
+
var h = r.first;
|
|
376
403
|
if (h !== null) {
|
|
377
|
-
|
|
404
|
+
r = h;
|
|
378
405
|
continue;
|
|
379
406
|
}
|
|
380
407
|
}
|
|
381
|
-
var f =
|
|
382
|
-
for (
|
|
383
|
-
f === s && (s = null),
|
|
408
|
+
var f = r.parent;
|
|
409
|
+
for (r = r.next; r === null && f !== null; )
|
|
410
|
+
f === s && (s = null), r = f.next, f = f.parent;
|
|
384
411
|
}
|
|
385
412
|
}, /**
|
|
386
413
|
* @param {Effect[]} effects
|
|
387
414
|
*/
|
|
388
415
|
Ft = function(e) {
|
|
389
416
|
for (var n = 0; n < e.length; n += 1)
|
|
390
|
-
|
|
391
|
-
},
|
|
392
|
-
var
|
|
393
|
-
if (
|
|
417
|
+
An(e[n], l(this, it), l(this, ke));
|
|
418
|
+
}, kn = function() {
|
|
419
|
+
var r;
|
|
420
|
+
if (at.size > 1) {
|
|
394
421
|
this.previous.clear();
|
|
395
|
-
var e =
|
|
396
|
-
for (const s of
|
|
422
|
+
var e = U, n = !0;
|
|
423
|
+
for (const s of at) {
|
|
397
424
|
if (s === this) {
|
|
398
425
|
n = !1;
|
|
399
426
|
continue;
|
|
400
427
|
}
|
|
401
|
-
const
|
|
428
|
+
const o = [];
|
|
402
429
|
for (const [u, c] of this.current) {
|
|
403
430
|
if (s.current.has(u))
|
|
404
431
|
if (n && c !== s.current.get(u))
|
|
405
432
|
s.current.set(u, c);
|
|
406
433
|
else
|
|
407
434
|
continue;
|
|
408
|
-
|
|
435
|
+
o.push(u);
|
|
409
436
|
}
|
|
410
|
-
if (
|
|
437
|
+
if (o.length === 0)
|
|
411
438
|
continue;
|
|
412
439
|
const a = [...s.current.keys()].filter((u) => !this.current.has(u));
|
|
413
440
|
if (a.length > 0) {
|
|
414
|
-
var
|
|
415
|
-
|
|
441
|
+
var i = F;
|
|
442
|
+
F = [];
|
|
416
443
|
const u = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
|
|
417
|
-
for (const h of
|
|
418
|
-
|
|
419
|
-
if (
|
|
420
|
-
|
|
421
|
-
for (const h of
|
|
422
|
-
|
|
444
|
+
for (const h of o)
|
|
445
|
+
Tn(h, a, u, c);
|
|
446
|
+
if (F.length > 0) {
|
|
447
|
+
x = s, s.apply();
|
|
448
|
+
for (const h of F)
|
|
449
|
+
k(r = s, re, Lt).call(r, h, [], []);
|
|
423
450
|
s.deactivate();
|
|
424
451
|
}
|
|
425
|
-
|
|
452
|
+
F = i;
|
|
426
453
|
}
|
|
427
454
|
}
|
|
428
|
-
|
|
455
|
+
x = null, U = e;
|
|
429
456
|
}
|
|
430
|
-
this.committed = !0,
|
|
457
|
+
this.committed = !0, at.delete(this);
|
|
431
458
|
};
|
|
432
|
-
let
|
|
433
|
-
function
|
|
434
|
-
var e =
|
|
435
|
-
|
|
459
|
+
let de = Ut;
|
|
460
|
+
function J(t) {
|
|
461
|
+
var e = Je;
|
|
462
|
+
Je = !0;
|
|
436
463
|
try {
|
|
437
464
|
for (var n; ; ) {
|
|
438
|
-
if (
|
|
439
|
-
return
|
|
465
|
+
if (Mi(), F.length === 0 && (x?.flush(), F.length === 0))
|
|
466
|
+
return $t = null, /** @type {T} */
|
|
440
467
|
n;
|
|
441
|
-
|
|
468
|
+
xn();
|
|
442
469
|
}
|
|
443
470
|
} finally {
|
|
444
|
-
|
|
471
|
+
Je = e;
|
|
445
472
|
}
|
|
446
473
|
}
|
|
447
|
-
function
|
|
448
|
-
|
|
474
|
+
function xn() {
|
|
475
|
+
It = !0;
|
|
449
476
|
var t = null;
|
|
450
477
|
try {
|
|
451
|
-
for (var e = 0;
|
|
452
|
-
var n =
|
|
478
|
+
for (var e = 0; F.length > 0; ) {
|
|
479
|
+
var n = de.ensure();
|
|
453
480
|
if (e++ > 1e3) {
|
|
454
|
-
var
|
|
455
|
-
|
|
481
|
+
var i, r;
|
|
482
|
+
ji();
|
|
456
483
|
}
|
|
457
|
-
n.process(
|
|
484
|
+
n.process(F), ye.clear();
|
|
458
485
|
}
|
|
459
486
|
} finally {
|
|
460
|
-
|
|
487
|
+
F = [], It = !1, $t = null;
|
|
461
488
|
}
|
|
462
489
|
}
|
|
463
|
-
function
|
|
490
|
+
function ji() {
|
|
464
491
|
try {
|
|
465
|
-
|
|
492
|
+
Ai();
|
|
466
493
|
} catch (t) {
|
|
467
|
-
|
|
494
|
+
Ct(t, $t);
|
|
468
495
|
}
|
|
469
496
|
}
|
|
470
|
-
let
|
|
471
|
-
function
|
|
497
|
+
let le = null;
|
|
498
|
+
function Jt(t) {
|
|
472
499
|
var e = t.length;
|
|
473
500
|
if (e !== 0) {
|
|
474
501
|
for (var n = 0; n < e; ) {
|
|
475
|
-
var
|
|
476
|
-
if ((
|
|
477
|
-
|
|
478
|
-
for (const
|
|
479
|
-
if ((
|
|
480
|
-
const s = [
|
|
481
|
-
let
|
|
482
|
-
for (;
|
|
483
|
-
|
|
502
|
+
var i = t[n++];
|
|
503
|
+
if ((i.f & (_e | ve)) === 0 && st(i) && (le = /* @__PURE__ */ new Set(), Ge(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Un(i), le?.size > 0)) {
|
|
504
|
+
ye.clear();
|
|
505
|
+
for (const r of le) {
|
|
506
|
+
if ((r.f & (_e | ve)) !== 0) continue;
|
|
507
|
+
const s = [r];
|
|
508
|
+
let o = r.parent;
|
|
509
|
+
for (; o !== null; )
|
|
510
|
+
le.has(o) && (le.delete(o), s.push(o)), o = o.parent;
|
|
484
511
|
for (let a = s.length - 1; a >= 0; a--) {
|
|
485
512
|
const u = s[a];
|
|
486
|
-
(u.f & (
|
|
513
|
+
(u.f & (_e | ve)) === 0 && Ge(u);
|
|
487
514
|
}
|
|
488
515
|
}
|
|
489
|
-
|
|
516
|
+
le.clear();
|
|
490
517
|
}
|
|
491
518
|
}
|
|
492
|
-
|
|
519
|
+
le = null;
|
|
493
520
|
}
|
|
494
521
|
}
|
|
495
|
-
function
|
|
522
|
+
function Tn(t, e, n, i) {
|
|
496
523
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
497
|
-
for (const
|
|
498
|
-
const s =
|
|
499
|
-
(s &
|
|
524
|
+
for (const r of t.reactions) {
|
|
525
|
+
const s = r.f;
|
|
526
|
+
(s & R) !== 0 ? Tn(
|
|
500
527
|
/** @type {Derived} */
|
|
501
|
-
|
|
528
|
+
r,
|
|
502
529
|
e,
|
|
503
530
|
n,
|
|
504
|
-
r
|
|
505
|
-
) : (s & (dn | ce)) !== 0 && (s & F) === 0 && xn(i, e, r) && (T(i, F), ve(
|
|
506
|
-
/** @type {Effect} */
|
|
507
531
|
i
|
|
532
|
+
) : (s & (mn | ge)) !== 0 && (s & I) === 0 && Rn(r, e, i) && (A(r, I), ne(
|
|
533
|
+
/** @type {Effect} */
|
|
534
|
+
r
|
|
508
535
|
));
|
|
509
536
|
}
|
|
510
537
|
}
|
|
511
|
-
function
|
|
512
|
-
const
|
|
513
|
-
if (
|
|
538
|
+
function Rn(t, e, n) {
|
|
539
|
+
const i = n.get(t);
|
|
540
|
+
if (i !== void 0) return i;
|
|
514
541
|
if (t.deps !== null)
|
|
515
|
-
for (const
|
|
516
|
-
if (
|
|
542
|
+
for (const r of t.deps) {
|
|
543
|
+
if (ze.call(e, r))
|
|
517
544
|
return !0;
|
|
518
|
-
if ((
|
|
545
|
+
if ((r.f & R) !== 0 && Rn(
|
|
519
546
|
/** @type {Derived} */
|
|
520
|
-
|
|
547
|
+
r,
|
|
521
548
|
e,
|
|
522
549
|
n
|
|
523
550
|
))
|
|
524
551
|
return n.set(
|
|
525
552
|
/** @type {Derived} */
|
|
526
|
-
|
|
553
|
+
r,
|
|
527
554
|
!0
|
|
528
555
|
), !0;
|
|
529
556
|
}
|
|
530
557
|
return n.set(t, !1), !1;
|
|
531
558
|
}
|
|
532
|
-
function
|
|
533
|
-
for (var e =
|
|
559
|
+
function ne(t) {
|
|
560
|
+
for (var e = $t = t; e.parent !== null; ) {
|
|
534
561
|
e = e.parent;
|
|
535
562
|
var n = e.f;
|
|
536
|
-
if (
|
|
563
|
+
if (It && e === w && (n & ge) !== 0 && (n & pn) === 0)
|
|
537
564
|
return;
|
|
538
|
-
if ((n & (
|
|
539
|
-
if ((n &
|
|
540
|
-
e.f ^=
|
|
565
|
+
if ((n & (Ce | pe)) !== 0) {
|
|
566
|
+
if ((n & N) === 0) return;
|
|
567
|
+
e.f ^= N;
|
|
541
568
|
}
|
|
542
569
|
}
|
|
543
|
-
|
|
570
|
+
F.push(e);
|
|
544
571
|
}
|
|
545
|
-
function
|
|
546
|
-
if (!((t.f &
|
|
547
|
-
|
|
548
|
-
for (var
|
|
549
|
-
|
|
572
|
+
function On(t, e) {
|
|
573
|
+
if (!((t.f & pe) !== 0 && (t.f & N) !== 0)) {
|
|
574
|
+
(t.f & I) !== 0 ? e.d.push(t) : (t.f & Q) !== 0 && e.m.push(t), A(t, N);
|
|
575
|
+
for (var n = t.first; n !== null; )
|
|
576
|
+
On(n, e), n = n.next;
|
|
550
577
|
}
|
|
551
578
|
}
|
|
552
|
-
function
|
|
553
|
-
let e = 0, n =
|
|
579
|
+
function Pi(t) {
|
|
580
|
+
let e = 0, n = At(0), i;
|
|
554
581
|
return () => {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
e -= 1, e === 0 && (
|
|
582
|
+
Yt() && (y(n), Yn(() => (e === 0 && (i = ni(() => t(() => Xe(n)))), e += 1, () => {
|
|
583
|
+
Fe(() => {
|
|
584
|
+
e -= 1, e === 0 && (i?.(), i = void 0, Xe(n));
|
|
558
585
|
});
|
|
559
586
|
})));
|
|
560
587
|
};
|
|
561
588
|
}
|
|
562
|
-
var
|
|
563
|
-
function
|
|
564
|
-
new
|
|
589
|
+
var Hi = bt | Ve | gn;
|
|
590
|
+
function zi(t, e, n) {
|
|
591
|
+
new Gi(t, e, n);
|
|
565
592
|
}
|
|
566
|
-
var
|
|
567
|
-
class
|
|
593
|
+
var M, rt, X, xe, Z, P, L, ee, ue, me, Te, ce, je, Re, Pe, He, fe, St, $, Nn, In, Bt, ct, ft, Dt;
|
|
594
|
+
class Gi {
|
|
568
595
|
/**
|
|
569
596
|
* @param {TemplateNode} node
|
|
570
597
|
* @param {BoundaryProps} props
|
|
571
598
|
* @param {((anchor: Node) => void)} children
|
|
572
599
|
*/
|
|
573
|
-
constructor(e, n,
|
|
600
|
+
constructor(e, n, i) {
|
|
574
601
|
b(this, $);
|
|
575
602
|
/** @type {Boundary | null} */
|
|
576
|
-
|
|
577
|
-
|
|
603
|
+
p(this, "parent");
|
|
604
|
+
p(this, "is_pending", !1);
|
|
578
605
|
/** @type {TemplateNode} */
|
|
579
|
-
b(this,
|
|
606
|
+
b(this, M);
|
|
580
607
|
/** @type {TemplateNode | null} */
|
|
581
|
-
b(this,
|
|
608
|
+
b(this, rt, te ? q : null);
|
|
582
609
|
/** @type {BoundaryProps} */
|
|
583
|
-
b(this,
|
|
610
|
+
b(this, X);
|
|
584
611
|
/** @type {((anchor: Node) => void)} */
|
|
585
|
-
b(this,
|
|
612
|
+
b(this, xe);
|
|
586
613
|
/** @type {Effect} */
|
|
587
|
-
b(this,
|
|
614
|
+
b(this, Z);
|
|
588
615
|
/** @type {Effect | null} */
|
|
589
|
-
b(this,
|
|
616
|
+
b(this, P, null);
|
|
590
617
|
/** @type {Effect | null} */
|
|
591
|
-
b(this,
|
|
618
|
+
b(this, L, null);
|
|
592
619
|
/** @type {Effect | null} */
|
|
593
|
-
b(this,
|
|
620
|
+
b(this, ee, null);
|
|
594
621
|
/** @type {DocumentFragment | null} */
|
|
595
|
-
b(this,
|
|
622
|
+
b(this, ue, null);
|
|
596
623
|
/** @type {TemplateNode | null} */
|
|
597
|
-
b(this,
|
|
598
|
-
b(this,
|
|
599
|
-
b(this,
|
|
600
|
-
b(this,
|
|
601
|
-
b(this,
|
|
624
|
+
b(this, me, null);
|
|
625
|
+
b(this, Te, 0);
|
|
626
|
+
b(this, ce, 0);
|
|
627
|
+
b(this, je, !1);
|
|
628
|
+
b(this, Re, !1);
|
|
602
629
|
/** @type {Set<Effect>} */
|
|
603
630
|
b(this, Pe, /* @__PURE__ */ new Set());
|
|
604
631
|
/** @type {Set<Effect>} */
|
|
605
|
-
b(this,
|
|
632
|
+
b(this, He, /* @__PURE__ */ new Set());
|
|
606
633
|
/**
|
|
607
634
|
* A source containing the number of pending async deriveds/expressions.
|
|
608
635
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -610,37 +637,37 @@ class jr {
|
|
|
610
637
|
* calls followed by no-op flushes
|
|
611
638
|
* @type {Source<number> | null}
|
|
612
639
|
*/
|
|
613
|
-
b(this,
|
|
614
|
-
b(this,
|
|
615
|
-
|
|
640
|
+
b(this, fe, null);
|
|
641
|
+
b(this, St, Pi(() => (m(this, fe, At(l(this, Te))), () => {
|
|
642
|
+
m(this, fe, null);
|
|
616
643
|
})));
|
|
617
|
-
|
|
618
|
-
w.b, this.is_pending = !!
|
|
619
|
-
if (w.b = this,
|
|
620
|
-
const s =
|
|
644
|
+
m(this, M, e), m(this, X, n), m(this, xe, i), this.parent = /** @type {Effect} */
|
|
645
|
+
w.b, this.is_pending = !!l(this, X).pending, m(this, Z, rr(() => {
|
|
646
|
+
if (w.b = this, te) {
|
|
647
|
+
const s = l(this, rt);
|
|
621
648
|
_n(), /** @type {Comment} */
|
|
622
|
-
s.nodeType ===
|
|
623
|
-
s.data ===
|
|
649
|
+
s.nodeType === Et && /** @type {Comment} */
|
|
650
|
+
s.data === cn ? k(this, $, In).call(this) : (k(this, $, Nn).call(this), l(this, ce) === 0 && (this.is_pending = !1));
|
|
624
651
|
} else {
|
|
625
|
-
var
|
|
652
|
+
var r = k(this, $, Bt).call(this);
|
|
626
653
|
try {
|
|
627
|
-
|
|
654
|
+
m(this, P, Se(() => i(r)));
|
|
628
655
|
} catch (s) {
|
|
629
656
|
this.error(s);
|
|
630
657
|
}
|
|
631
|
-
|
|
658
|
+
l(this, ce) > 0 ? k(this, $, ft).call(this) : this.is_pending = !1;
|
|
632
659
|
}
|
|
633
660
|
return () => {
|
|
634
|
-
|
|
661
|
+
l(this, me)?.remove();
|
|
635
662
|
};
|
|
636
|
-
},
|
|
663
|
+
}, Hi)), te && m(this, M, q);
|
|
637
664
|
}
|
|
638
665
|
/**
|
|
639
666
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
640
667
|
* @param {Effect} effect
|
|
641
668
|
*/
|
|
642
669
|
defer_effect(e) {
|
|
643
|
-
|
|
670
|
+
An(e, l(this, Pe), l(this, He));
|
|
644
671
|
}
|
|
645
672
|
/**
|
|
646
673
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -650,7 +677,7 @@ class jr {
|
|
|
650
677
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
651
678
|
}
|
|
652
679
|
has_pending_snippet() {
|
|
653
|
-
return !!
|
|
680
|
+
return !!l(this, X).pending;
|
|
654
681
|
}
|
|
655
682
|
/**
|
|
656
683
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -659,148 +686,148 @@ class jr {
|
|
|
659
686
|
* @param {1 | -1} d
|
|
660
687
|
*/
|
|
661
688
|
update_pending_count(e) {
|
|
662
|
-
|
|
663
|
-
|
|
689
|
+
k(this, $, Dt).call(this, e), m(this, Te, l(this, Te) + e), !(!l(this, fe) || l(this, je)) && (m(this, je, !0), Fe(() => {
|
|
690
|
+
m(this, je, !1), l(this, fe) && Mn(l(this, fe), l(this, Te));
|
|
664
691
|
}));
|
|
665
692
|
}
|
|
666
693
|
get_effect_pending() {
|
|
667
|
-
return
|
|
694
|
+
return l(this, St).call(this), y(
|
|
668
695
|
/** @type {Source<number>} */
|
|
669
|
-
|
|
696
|
+
l(this, fe)
|
|
670
697
|
);
|
|
671
698
|
}
|
|
672
699
|
/** @param {unknown} error */
|
|
673
700
|
error(e) {
|
|
674
|
-
var n =
|
|
675
|
-
let
|
|
676
|
-
if (
|
|
701
|
+
var n = l(this, X).onerror;
|
|
702
|
+
let i = l(this, X).failed;
|
|
703
|
+
if (l(this, Re) || !n && !i)
|
|
677
704
|
throw e;
|
|
678
|
-
|
|
705
|
+
l(this, P) && (W(l(this, P)), m(this, P, null)), l(this, L) && (W(l(this, L)), m(this, L, null)), l(this, ee) && (W(l(this, ee)), m(this, ee, null)), te && (et(
|
|
679
706
|
/** @type {TemplateNode} */
|
|
680
|
-
|
|
681
|
-
),
|
|
682
|
-
var
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
|
|
707
|
+
l(this, rt)
|
|
708
|
+
), Ii(), et(Li()));
|
|
709
|
+
var r = !1, s = !1;
|
|
710
|
+
const o = () => {
|
|
711
|
+
if (r) {
|
|
712
|
+
Ni();
|
|
686
713
|
return;
|
|
687
714
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}), this.is_pending = this.has_pending_snippet(),
|
|
715
|
+
r = !0, s && Oi(), de.ensure(), m(this, Te, 0), l(this, ee) !== null && dt(l(this, ee), () => {
|
|
716
|
+
m(this, ee, null);
|
|
717
|
+
}), this.is_pending = this.has_pending_snippet(), m(this, P, k(this, $, ct).call(this, () => (m(this, Re, !1), Se(() => l(this, xe).call(this, l(this, M)))))), l(this, ce) > 0 ? k(this, $, ft).call(this) : this.is_pending = !1;
|
|
691
718
|
};
|
|
692
|
-
|
|
719
|
+
Fe(() => {
|
|
693
720
|
try {
|
|
694
|
-
s = !0, n?.(e,
|
|
721
|
+
s = !0, n?.(e, o), s = !1;
|
|
695
722
|
} catch (a) {
|
|
696
|
-
|
|
723
|
+
Ct(a, l(this, Z) && l(this, Z).parent);
|
|
697
724
|
}
|
|
698
|
-
|
|
699
|
-
|
|
725
|
+
i && m(this, ee, k(this, $, ct).call(this, () => {
|
|
726
|
+
de.ensure(), m(this, Re, !0);
|
|
700
727
|
try {
|
|
701
|
-
return
|
|
702
|
-
|
|
703
|
-
|
|
728
|
+
return Se(() => {
|
|
729
|
+
i(
|
|
730
|
+
l(this, M),
|
|
704
731
|
() => e,
|
|
705
|
-
() =>
|
|
732
|
+
() => o
|
|
706
733
|
);
|
|
707
734
|
});
|
|
708
735
|
} catch (a) {
|
|
709
|
-
return
|
|
736
|
+
return Ct(
|
|
710
737
|
a,
|
|
711
738
|
/** @type {Effect} */
|
|
712
|
-
|
|
739
|
+
l(this, Z).parent
|
|
713
740
|
), null;
|
|
714
741
|
} finally {
|
|
715
|
-
|
|
742
|
+
m(this, Re, !1);
|
|
716
743
|
}
|
|
717
744
|
}));
|
|
718
745
|
});
|
|
719
746
|
}
|
|
720
747
|
}
|
|
721
|
-
|
|
748
|
+
M = new WeakMap(), rt = new WeakMap(), X = new WeakMap(), xe = new WeakMap(), Z = new WeakMap(), P = new WeakMap(), L = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), me = new WeakMap(), Te = new WeakMap(), ce = new WeakMap(), je = new WeakMap(), Re = new WeakMap(), Pe = new WeakMap(), He = new WeakMap(), fe = new WeakMap(), St = new WeakMap(), $ = new WeakSet(), Nn = function() {
|
|
722
749
|
try {
|
|
723
|
-
|
|
750
|
+
m(this, P, Se(() => l(this, xe).call(this, l(this, M))));
|
|
724
751
|
} catch (e) {
|
|
725
752
|
this.error(e);
|
|
726
753
|
}
|
|
727
|
-
},
|
|
728
|
-
const e =
|
|
729
|
-
e && (
|
|
730
|
-
var n =
|
|
731
|
-
|
|
754
|
+
}, In = function() {
|
|
755
|
+
const e = l(this, X).pending;
|
|
756
|
+
e && (m(this, L, Se(() => e(l(this, M)))), Fe(() => {
|
|
757
|
+
var n = k(this, $, Bt).call(this);
|
|
758
|
+
m(this, P, k(this, $, ct).call(this, () => (de.ensure(), Se(() => l(this, xe).call(this, n))))), l(this, ce) > 0 ? k(this, $, ft).call(this) : (dt(
|
|
732
759
|
/** @type {Effect} */
|
|
733
|
-
|
|
760
|
+
l(this, L),
|
|
734
761
|
() => {
|
|
735
|
-
|
|
762
|
+
m(this, L, null);
|
|
736
763
|
}
|
|
737
764
|
), this.is_pending = !1);
|
|
738
765
|
}));
|
|
739
766
|
}, Bt = function() {
|
|
740
|
-
var e =
|
|
741
|
-
return this.is_pending && (
|
|
767
|
+
var e = l(this, M);
|
|
768
|
+
return this.is_pending && (m(this, me, Hn()), l(this, M).before(l(this, me)), e = l(this, me)), e;
|
|
742
769
|
}, /**
|
|
743
770
|
* @param {() => Effect | null} fn
|
|
744
771
|
*/
|
|
745
|
-
|
|
746
|
-
var n = w,
|
|
747
|
-
|
|
772
|
+
ct = function(e) {
|
|
773
|
+
var n = w, i = _, r = V;
|
|
774
|
+
we(l(this, Z)), ie(l(this, Z)), wt(l(this, Z).ctx);
|
|
748
775
|
try {
|
|
749
776
|
return e();
|
|
750
777
|
} catch (s) {
|
|
751
778
|
return En(s), null;
|
|
752
779
|
} finally {
|
|
753
|
-
|
|
780
|
+
we(n), ie(i), wt(r);
|
|
754
781
|
}
|
|
755
|
-
},
|
|
782
|
+
}, ft = function() {
|
|
756
783
|
const e = (
|
|
757
784
|
/** @type {(anchor: Node) => void} */
|
|
758
|
-
|
|
785
|
+
l(this, X).pending
|
|
759
786
|
);
|
|
760
|
-
|
|
787
|
+
l(this, P) !== null && (m(this, ue, document.createDocumentFragment()), l(this, ue).append(
|
|
761
788
|
/** @type {TemplateNode} */
|
|
762
|
-
|
|
763
|
-
),
|
|
789
|
+
l(this, me)
|
|
790
|
+
), lr(l(this, P), l(this, ue))), l(this, L) === null && m(this, L, Se(() => e(l(this, M))));
|
|
764
791
|
}, /**
|
|
765
792
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
766
793
|
* if any, such that we can replace the snippet with content once work is done
|
|
767
794
|
* @param {1 | -1} d
|
|
768
795
|
*/
|
|
769
|
-
|
|
796
|
+
Dt = function(e) {
|
|
770
797
|
var n;
|
|
771
798
|
if (!this.has_pending_snippet()) {
|
|
772
|
-
this.parent &&
|
|
799
|
+
this.parent && k(n = this.parent, $, Dt).call(n, e);
|
|
773
800
|
return;
|
|
774
801
|
}
|
|
775
|
-
if (
|
|
802
|
+
if (m(this, ce, l(this, ce) + e), l(this, ce) === 0) {
|
|
776
803
|
this.is_pending = !1;
|
|
777
|
-
for (const
|
|
778
|
-
|
|
779
|
-
for (const
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
}),
|
|
804
|
+
for (const i of l(this, Pe))
|
|
805
|
+
A(i, I), ne(i);
|
|
806
|
+
for (const i of l(this, He))
|
|
807
|
+
A(i, Q), ne(i);
|
|
808
|
+
l(this, Pe).clear(), l(this, He).clear(), l(this, L) && dt(l(this, L), () => {
|
|
809
|
+
m(this, L, null);
|
|
810
|
+
}), l(this, ue) && (l(this, M).before(l(this, ue)), m(this, ue, null));
|
|
784
811
|
}
|
|
785
812
|
};
|
|
786
813
|
// @__NO_SIDE_EFFECTS__
|
|
787
|
-
function
|
|
788
|
-
var e =
|
|
814
|
+
function Ln(t) {
|
|
815
|
+
var e = R | I, n = _ !== null && (_.f & R) !== 0 ? (
|
|
789
816
|
/** @type {Derived} */
|
|
790
|
-
|
|
817
|
+
_
|
|
791
818
|
) : null;
|
|
792
|
-
return w !== null && (w.f |=
|
|
793
|
-
ctx:
|
|
819
|
+
return w !== null && (w.f |= Ve), {
|
|
820
|
+
ctx: V,
|
|
794
821
|
deps: null,
|
|
795
822
|
effects: null,
|
|
796
|
-
equals:
|
|
823
|
+
equals: yn,
|
|
797
824
|
f: e,
|
|
798
825
|
fn: t,
|
|
799
826
|
reactions: null,
|
|
800
827
|
rv: 0,
|
|
801
828
|
v: (
|
|
802
829
|
/** @type {V} */
|
|
803
|
-
|
|
830
|
+
O
|
|
804
831
|
),
|
|
805
832
|
wv: 0,
|
|
806
833
|
parent: n ?? w,
|
|
@@ -808,25 +835,25 @@ function In(t) {
|
|
|
808
835
|
};
|
|
809
836
|
}
|
|
810
837
|
// @__NO_SIDE_EFFECTS__
|
|
811
|
-
function
|
|
812
|
-
const e = /* @__PURE__ */
|
|
838
|
+
function Yi(t) {
|
|
839
|
+
const e = /* @__PURE__ */ Ln(t);
|
|
813
840
|
return Wn(e), e;
|
|
814
841
|
}
|
|
815
|
-
function
|
|
842
|
+
function Vi(t) {
|
|
816
843
|
var e = t.effects;
|
|
817
844
|
if (e !== null) {
|
|
818
845
|
t.effects = null;
|
|
819
846
|
for (var n = 0; n < e.length; n += 1)
|
|
820
|
-
|
|
847
|
+
W(
|
|
821
848
|
/** @type {Effect} */
|
|
822
849
|
e[n]
|
|
823
850
|
);
|
|
824
851
|
}
|
|
825
852
|
}
|
|
826
|
-
function
|
|
853
|
+
function Ui(t) {
|
|
827
854
|
for (var e = t.parent; e !== null; ) {
|
|
828
|
-
if ((e.f &
|
|
829
|
-
return (e.f &
|
|
855
|
+
if ((e.f & R) === 0)
|
|
856
|
+
return (e.f & _e) === 0 ? (
|
|
830
857
|
/** @type {Effect} */
|
|
831
858
|
e
|
|
832
859
|
) : null;
|
|
@@ -834,116 +861,126 @@ function Yr(t) {
|
|
|
834
861
|
}
|
|
835
862
|
return null;
|
|
836
863
|
}
|
|
837
|
-
function
|
|
864
|
+
function Gt(t) {
|
|
838
865
|
var e, n = w;
|
|
839
|
-
|
|
866
|
+
we(Ui(t));
|
|
840
867
|
try {
|
|
841
|
-
t.f &= ~
|
|
868
|
+
t.f &= ~Ne, Vi(t), e = Zn(t);
|
|
842
869
|
} finally {
|
|
843
|
-
|
|
870
|
+
we(n);
|
|
844
871
|
}
|
|
845
872
|
return e;
|
|
846
873
|
}
|
|
847
|
-
function
|
|
848
|
-
var e =
|
|
849
|
-
if (!t.equals(e) && (t.wv =
|
|
850
|
-
|
|
874
|
+
function Fn(t) {
|
|
875
|
+
var e = Gt(t);
|
|
876
|
+
if (!t.equals(e) && (t.wv = Jn(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
877
|
+
A(t, N);
|
|
851
878
|
return;
|
|
852
879
|
}
|
|
853
|
-
|
|
880
|
+
be || (U !== null ? (Yt() || x?.is_fork) && U.set(t, e) : zt(t));
|
|
854
881
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
882
|
+
function Ki(t) {
|
|
883
|
+
if (t.effects !== null)
|
|
884
|
+
for (const e of t.effects)
|
|
885
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ht), e.teardown = vi, e.ac = null, tt(e, 0), Vt(e));
|
|
886
|
+
}
|
|
887
|
+
function Bn(t) {
|
|
888
|
+
if (t.effects !== null)
|
|
889
|
+
for (const e of t.effects)
|
|
890
|
+
e.teardown && Ge(e);
|
|
891
|
+
}
|
|
892
|
+
let Mt = /* @__PURE__ */ new Set();
|
|
893
|
+
const ye = /* @__PURE__ */ new Map();
|
|
894
|
+
let Dn = !1;
|
|
895
|
+
function At(t, e) {
|
|
859
896
|
var n = {
|
|
860
897
|
f: 0,
|
|
861
898
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
862
899
|
v: t,
|
|
863
900
|
reactions: null,
|
|
864
|
-
equals:
|
|
901
|
+
equals: yn,
|
|
865
902
|
rv: 0,
|
|
866
903
|
wv: 0
|
|
867
904
|
};
|
|
868
905
|
return n;
|
|
869
906
|
}
|
|
870
907
|
// @__NO_SIDE_EFFECTS__
|
|
871
|
-
function
|
|
872
|
-
const n =
|
|
908
|
+
function z(t, e) {
|
|
909
|
+
const n = At(t);
|
|
873
910
|
return Wn(n), n;
|
|
874
911
|
}
|
|
875
912
|
// @__NO_SIDE_EFFECTS__
|
|
876
|
-
function
|
|
877
|
-
const
|
|
878
|
-
return e || (
|
|
913
|
+
function Wi(t, e = !1, n = !0) {
|
|
914
|
+
const i = At(t);
|
|
915
|
+
return e || (i.equals = Bi), i;
|
|
879
916
|
}
|
|
880
|
-
function
|
|
881
|
-
|
|
917
|
+
function T(t, e, n = !1) {
|
|
918
|
+
_ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
882
919
|
// to ensure we error if state is set inside an inspect effect
|
|
883
|
-
(!
|
|
884
|
-
let
|
|
885
|
-
return
|
|
920
|
+
(!K || (_.f & Qt) !== 0) && Cn() && (_.f & (R | ge | mn | Qt)) !== 0 && (Y === null || !ze.call(Y, t)) && Ri();
|
|
921
|
+
let i = n ? Qe(e) : e;
|
|
922
|
+
return Mn(t, i);
|
|
886
923
|
}
|
|
887
|
-
function
|
|
924
|
+
function Mn(t, e) {
|
|
888
925
|
if (!t.equals(e)) {
|
|
889
926
|
var n = t.v;
|
|
890
|
-
|
|
891
|
-
var
|
|
892
|
-
if (
|
|
893
|
-
const
|
|
927
|
+
be ? ye.set(t, e) : ye.set(t, n), t.v = e;
|
|
928
|
+
var i = de.ensure();
|
|
929
|
+
if (i.capture(t, n), (t.f & R) !== 0) {
|
|
930
|
+
const r = (
|
|
894
931
|
/** @type {Derived} */
|
|
895
932
|
t
|
|
896
933
|
);
|
|
897
|
-
(t.f &
|
|
934
|
+
(t.f & I) !== 0 && Gt(r), zt(r);
|
|
898
935
|
}
|
|
899
|
-
t.wv =
|
|
936
|
+
t.wv = Jn(), qn(t, I), w !== null && (w.f & N) !== 0 && (w.f & (pe | Ce)) === 0 && (j === null ? ar([t]) : j.push(t)), !i.is_fork && Mt.size > 0 && !Dn && Qi();
|
|
900
937
|
}
|
|
901
938
|
return e;
|
|
902
939
|
}
|
|
903
|
-
function
|
|
904
|
-
|
|
905
|
-
for (const t of
|
|
906
|
-
(t.f &
|
|
907
|
-
|
|
940
|
+
function Qi() {
|
|
941
|
+
Dn = !1;
|
|
942
|
+
for (const t of Mt)
|
|
943
|
+
(t.f & N) !== 0 && A(t, Q), st(t) && Ge(t);
|
|
944
|
+
Mt.clear();
|
|
908
945
|
}
|
|
909
|
-
function
|
|
910
|
-
|
|
946
|
+
function Xe(t) {
|
|
947
|
+
T(t, t.v + 1);
|
|
911
948
|
}
|
|
912
949
|
function qn(t, e) {
|
|
913
950
|
var n = t.reactions;
|
|
914
951
|
if (n !== null)
|
|
915
|
-
for (var
|
|
916
|
-
var s = n[
|
|
917
|
-
if (a &&
|
|
952
|
+
for (var i = n.length, r = 0; r < i; r++) {
|
|
953
|
+
var s = n[r], o = s.f, a = (o & I) === 0;
|
|
954
|
+
if (a && A(s, e), (o & R) !== 0) {
|
|
918
955
|
var u = (
|
|
919
956
|
/** @type {Derived} */
|
|
920
957
|
s
|
|
921
958
|
);
|
|
922
|
-
|
|
923
|
-
} else a && ((
|
|
959
|
+
U?.delete(u), (o & Ne) === 0 && (o & G && (s.f |= Ne), qn(u, Q));
|
|
960
|
+
} else a && ((o & ge) !== 0 && le !== null && le.add(
|
|
924
961
|
/** @type {Effect} */
|
|
925
962
|
s
|
|
926
|
-
),
|
|
963
|
+
), ne(
|
|
927
964
|
/** @type {Effect} */
|
|
928
965
|
s
|
|
929
966
|
));
|
|
930
967
|
}
|
|
931
968
|
}
|
|
932
|
-
function
|
|
933
|
-
if (typeof t != "object" || t === null ||
|
|
969
|
+
function Qe(t) {
|
|
970
|
+
if (typeof t != "object" || t === null || Rt in t)
|
|
934
971
|
return t;
|
|
935
|
-
const e =
|
|
936
|
-
if (e !==
|
|
972
|
+
const e = mi(t);
|
|
973
|
+
if (e !== gi && e !== pi)
|
|
937
974
|
return t;
|
|
938
|
-
var n = /* @__PURE__ */ new Map(),
|
|
939
|
-
if (
|
|
975
|
+
var n = /* @__PURE__ */ new Map(), i = fi(t), r = /* @__PURE__ */ z(0), s = Oe, o = (a) => {
|
|
976
|
+
if (Oe === s)
|
|
940
977
|
return a();
|
|
941
|
-
var u =
|
|
942
|
-
|
|
978
|
+
var u = _, c = Oe;
|
|
979
|
+
ie(null), en(s);
|
|
943
980
|
var h = a();
|
|
944
|
-
return
|
|
981
|
+
return ie(u), en(c), h;
|
|
945
982
|
};
|
|
946
|
-
return
|
|
983
|
+
return i && n.set("length", /* @__PURE__ */ z(
|
|
947
984
|
/** @type {any[]} */
|
|
948
985
|
t.length
|
|
949
986
|
)), new Proxy(
|
|
@@ -951,34 +988,34 @@ function We(t) {
|
|
|
951
988
|
t,
|
|
952
989
|
{
|
|
953
990
|
defineProperty(a, u, c) {
|
|
954
|
-
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) &&
|
|
991
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && xi();
|
|
955
992
|
var h = n.get(u);
|
|
956
|
-
return h === void 0 ?
|
|
957
|
-
var f = /* @__PURE__ */
|
|
993
|
+
return h === void 0 ? o(() => {
|
|
994
|
+
var f = /* @__PURE__ */ z(c.value);
|
|
958
995
|
return n.set(u, f), f;
|
|
959
|
-
}) :
|
|
996
|
+
}) : T(h, c.value, !0), !0;
|
|
960
997
|
},
|
|
961
998
|
deleteProperty(a, u) {
|
|
962
999
|
var c = n.get(u);
|
|
963
1000
|
if (c === void 0) {
|
|
964
1001
|
if (u in a) {
|
|
965
|
-
const h =
|
|
966
|
-
n.set(u, h),
|
|
1002
|
+
const h = o(() => /* @__PURE__ */ z(O));
|
|
1003
|
+
n.set(u, h), Xe(r);
|
|
967
1004
|
}
|
|
968
1005
|
} else
|
|
969
|
-
|
|
1006
|
+
T(c, O), Xe(r);
|
|
970
1007
|
return !0;
|
|
971
1008
|
},
|
|
972
1009
|
get(a, u, c) {
|
|
973
|
-
if (u ===
|
|
1010
|
+
if (u === Rt)
|
|
974
1011
|
return t;
|
|
975
1012
|
var h = n.get(u), f = u in a;
|
|
976
|
-
if (h === void 0 && (!f ||
|
|
977
|
-
var
|
|
978
|
-
return
|
|
1013
|
+
if (h === void 0 && (!f || Le(a, u)?.writable) && (h = o(() => {
|
|
1014
|
+
var g = Qe(f ? a[u] : O), v = /* @__PURE__ */ z(g);
|
|
1015
|
+
return v;
|
|
979
1016
|
}), n.set(u, h)), h !== void 0) {
|
|
980
1017
|
var d = y(h);
|
|
981
|
-
return d ===
|
|
1018
|
+
return d === O ? void 0 : d;
|
|
982
1019
|
}
|
|
983
1020
|
return Reflect.get(a, u, c);
|
|
984
1021
|
},
|
|
@@ -989,7 +1026,7 @@ function We(t) {
|
|
|
989
1026
|
h && (c.value = y(h));
|
|
990
1027
|
} else if (c === void 0) {
|
|
991
1028
|
var f = n.get(u), d = f?.v;
|
|
992
|
-
if (f !== void 0 && d !==
|
|
1029
|
+
if (f !== void 0 && d !== O)
|
|
993
1030
|
return {
|
|
994
1031
|
enumerable: !0,
|
|
995
1032
|
configurable: !0,
|
|
@@ -1000,122 +1037,128 @@ function We(t) {
|
|
|
1000
1037
|
return c;
|
|
1001
1038
|
},
|
|
1002
1039
|
has(a, u) {
|
|
1003
|
-
if (u ===
|
|
1040
|
+
if (u === Rt)
|
|
1004
1041
|
return !0;
|
|
1005
|
-
var c = n.get(u), h = c !== void 0 && c.v !==
|
|
1006
|
-
if (c !== void 0 || w !== null && (!h ||
|
|
1007
|
-
c === void 0 && (c =
|
|
1008
|
-
var d = h ?
|
|
1009
|
-
return
|
|
1042
|
+
var c = n.get(u), h = c !== void 0 && c.v !== O || Reflect.has(a, u);
|
|
1043
|
+
if (c !== void 0 || w !== null && (!h || Le(a, u)?.writable)) {
|
|
1044
|
+
c === void 0 && (c = o(() => {
|
|
1045
|
+
var d = h ? Qe(a[u]) : O, g = /* @__PURE__ */ z(d);
|
|
1046
|
+
return g;
|
|
1010
1047
|
}), n.set(u, c));
|
|
1011
1048
|
var f = y(c);
|
|
1012
|
-
if (f ===
|
|
1049
|
+
if (f === O)
|
|
1013
1050
|
return !1;
|
|
1014
1051
|
}
|
|
1015
1052
|
return h;
|
|
1016
1053
|
},
|
|
1017
1054
|
set(a, u, c, h) {
|
|
1018
1055
|
var f = n.get(u), d = u in a;
|
|
1019
|
-
if (
|
|
1020
|
-
for (var
|
|
1021
|
-
f.v;
|
|
1022
|
-
var
|
|
1023
|
-
|
|
1056
|
+
if (i && u === "length")
|
|
1057
|
+
for (var g = c; g < /** @type {Source<number>} */
|
|
1058
|
+
f.v; g += 1) {
|
|
1059
|
+
var v = n.get(g + "");
|
|
1060
|
+
v !== void 0 ? T(v, O) : g in a && (v = o(() => /* @__PURE__ */ z(O)), n.set(g + "", v));
|
|
1024
1061
|
}
|
|
1025
1062
|
if (f === void 0)
|
|
1026
|
-
(!d ||
|
|
1063
|
+
(!d || Le(a, u)?.writable) && (f = o(() => /* @__PURE__ */ z(void 0)), T(f, Qe(c)), n.set(u, f));
|
|
1027
1064
|
else {
|
|
1028
|
-
d = f.v !==
|
|
1029
|
-
var
|
|
1030
|
-
|
|
1065
|
+
d = f.v !== O;
|
|
1066
|
+
var S = o(() => Qe(c));
|
|
1067
|
+
T(f, S);
|
|
1031
1068
|
}
|
|
1032
|
-
var
|
|
1033
|
-
if (
|
|
1034
|
-
if (
|
|
1035
|
-
var
|
|
1069
|
+
var E = Reflect.getOwnPropertyDescriptor(a, u);
|
|
1070
|
+
if (E?.set && E.set.call(h, c), !d) {
|
|
1071
|
+
if (i && typeof u == "string") {
|
|
1072
|
+
var se = (
|
|
1036
1073
|
/** @type {Source<number>} */
|
|
1037
1074
|
n.get("length")
|
|
1038
|
-
),
|
|
1039
|
-
Number.isInteger(
|
|
1075
|
+
), Ie = Number(u);
|
|
1076
|
+
Number.isInteger(Ie) && Ie >= se.v && T(se, Ie + 1);
|
|
1040
1077
|
}
|
|
1041
|
-
|
|
1078
|
+
Xe(r);
|
|
1042
1079
|
}
|
|
1043
1080
|
return !0;
|
|
1044
1081
|
},
|
|
1045
1082
|
ownKeys(a) {
|
|
1046
|
-
y(
|
|
1083
|
+
y(r);
|
|
1047
1084
|
var u = Reflect.ownKeys(a).filter((f) => {
|
|
1048
1085
|
var d = n.get(f);
|
|
1049
|
-
return d === void 0 || d.v !==
|
|
1086
|
+
return d === void 0 || d.v !== O;
|
|
1050
1087
|
});
|
|
1051
1088
|
for (var [c, h] of n)
|
|
1052
|
-
h.v !==
|
|
1089
|
+
h.v !== O && !(c in a) && u.push(c);
|
|
1053
1090
|
return u;
|
|
1054
1091
|
},
|
|
1055
1092
|
setPrototypeOf() {
|
|
1056
|
-
|
|
1093
|
+
Ti();
|
|
1057
1094
|
}
|
|
1058
1095
|
}
|
|
1059
1096
|
);
|
|
1060
1097
|
}
|
|
1061
|
-
var
|
|
1062
|
-
function
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1098
|
+
var Xt, jn, Pn;
|
|
1099
|
+
function qt() {
|
|
1100
|
+
if (Xt === void 0) {
|
|
1101
|
+
Xt = window;
|
|
1065
1102
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1066
|
-
|
|
1103
|
+
jn = Le(e, "firstChild").get, Pn = Le(e, "nextSibling").get, Wt(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Wt(n) && (n.__t = void 0);
|
|
1067
1104
|
}
|
|
1068
1105
|
}
|
|
1069
|
-
function
|
|
1106
|
+
function Hn(t = "") {
|
|
1070
1107
|
return document.createTextNode(t);
|
|
1071
1108
|
}
|
|
1072
1109
|
// @__NO_SIDE_EFFECTS__
|
|
1073
|
-
function
|
|
1110
|
+
function Ji(t) {
|
|
1074
1111
|
return (
|
|
1075
1112
|
/** @type {TemplateNode | null} */
|
|
1076
|
-
|
|
1113
|
+
jn.call(t)
|
|
1077
1114
|
);
|
|
1078
1115
|
}
|
|
1079
1116
|
// @__NO_SIDE_EFFECTS__
|
|
1080
|
-
function
|
|
1117
|
+
function Ue(t) {
|
|
1081
1118
|
return (
|
|
1082
1119
|
/** @type {TemplateNode | null} */
|
|
1083
|
-
|
|
1120
|
+
Pn.call(t)
|
|
1084
1121
|
);
|
|
1085
1122
|
}
|
|
1086
|
-
function
|
|
1123
|
+
function Xi(t) {
|
|
1087
1124
|
t.textContent = "";
|
|
1088
1125
|
}
|
|
1089
|
-
function
|
|
1090
|
-
|
|
1091
|
-
|
|
1126
|
+
function Zi(t, e, n) {
|
|
1127
|
+
return (
|
|
1128
|
+
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1129
|
+
document.createElementNS(ci, t, void 0)
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
function zn(t) {
|
|
1133
|
+
var e = _, n = w;
|
|
1134
|
+
ie(null), we(null);
|
|
1092
1135
|
try {
|
|
1093
1136
|
return t();
|
|
1094
1137
|
} finally {
|
|
1095
|
-
|
|
1138
|
+
ie(e), we(n);
|
|
1096
1139
|
}
|
|
1097
1140
|
}
|
|
1098
|
-
function
|
|
1099
|
-
w === null && (
|
|
1141
|
+
function er(t) {
|
|
1142
|
+
w === null && (_ === null && $i(), Ei()), be && Si();
|
|
1100
1143
|
}
|
|
1101
|
-
function
|
|
1144
|
+
function tr(t, e) {
|
|
1102
1145
|
var n = e.last;
|
|
1103
1146
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1104
1147
|
}
|
|
1105
|
-
function
|
|
1106
|
-
var
|
|
1107
|
-
|
|
1108
|
-
var
|
|
1109
|
-
ctx:
|
|
1148
|
+
function Ke(t, e, n) {
|
|
1149
|
+
var i = w;
|
|
1150
|
+
i !== null && (i.f & ve) !== 0 && (t |= ve);
|
|
1151
|
+
var r = {
|
|
1152
|
+
ctx: V,
|
|
1110
1153
|
deps: null,
|
|
1111
1154
|
nodes: null,
|
|
1112
|
-
f: t |
|
|
1155
|
+
f: t | I | G,
|
|
1113
1156
|
first: null,
|
|
1114
1157
|
fn: e,
|
|
1115
1158
|
last: null,
|
|
1116
1159
|
next: null,
|
|
1117
|
-
parent:
|
|
1118
|
-
b:
|
|
1160
|
+
parent: i,
|
|
1161
|
+
b: i && i.b,
|
|
1119
1162
|
prev: null,
|
|
1120
1163
|
teardown: null,
|
|
1121
1164
|
wv: 0,
|
|
@@ -1123,460 +1166,463 @@ function Ge(t, e, n) {
|
|
|
1123
1166
|
};
|
|
1124
1167
|
if (n)
|
|
1125
1168
|
try {
|
|
1126
|
-
|
|
1169
|
+
Ge(r);
|
|
1127
1170
|
} catch (a) {
|
|
1128
|
-
throw
|
|
1171
|
+
throw W(r), a;
|
|
1129
1172
|
}
|
|
1130
|
-
else e !== null &&
|
|
1131
|
-
var s =
|
|
1173
|
+
else e !== null && ne(r);
|
|
1174
|
+
var s = r;
|
|
1132
1175
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1133
|
-
(s.f &
|
|
1134
|
-
var
|
|
1176
|
+
(s.f & Ve) === 0 && (s = s.first, (t & ge) !== 0 && (t & bt) !== 0 && s !== null && (s.f |= bt)), s !== null && (s.parent = i, i !== null && tr(s, i), _ !== null && (_.f & R) !== 0 && (t & Ce) === 0)) {
|
|
1177
|
+
var o = (
|
|
1135
1178
|
/** @type {Derived} */
|
|
1136
|
-
|
|
1179
|
+
_
|
|
1137
1180
|
);
|
|
1138
|
-
(
|
|
1181
|
+
(o.effects ?? (o.effects = [])).push(s);
|
|
1139
1182
|
}
|
|
1140
|
-
return
|
|
1183
|
+
return r;
|
|
1141
1184
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return
|
|
1185
|
+
function Yt() {
|
|
1186
|
+
return _ !== null && !K;
|
|
1144
1187
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1188
|
+
function ht(t) {
|
|
1189
|
+
er();
|
|
1147
1190
|
var e = (
|
|
1148
1191
|
/** @type {Effect} */
|
|
1149
1192
|
w.f
|
|
1150
|
-
), n = !
|
|
1193
|
+
), n = !_ && (e & pe) !== 0 && (e & Ye) === 0;
|
|
1151
1194
|
if (n) {
|
|
1152
|
-
var
|
|
1195
|
+
var i = (
|
|
1153
1196
|
/** @type {ComponentContext} */
|
|
1154
|
-
|
|
1197
|
+
V
|
|
1155
1198
|
);
|
|
1156
|
-
(
|
|
1199
|
+
(i.e ?? (i.e = [])).push(t);
|
|
1157
1200
|
} else
|
|
1158
|
-
return
|
|
1201
|
+
return Gn(t);
|
|
1159
1202
|
}
|
|
1160
|
-
function
|
|
1161
|
-
return
|
|
1203
|
+
function Gn(t) {
|
|
1204
|
+
return Ke(yt | bi, t, !1);
|
|
1162
1205
|
}
|
|
1163
|
-
function
|
|
1164
|
-
|
|
1165
|
-
const e =
|
|
1206
|
+
function nr(t) {
|
|
1207
|
+
de.ensure();
|
|
1208
|
+
const e = Ke(Ce | Ve, t, !0);
|
|
1166
1209
|
return () => {
|
|
1167
|
-
|
|
1210
|
+
W(e);
|
|
1168
1211
|
};
|
|
1169
1212
|
}
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1172
|
-
const e =
|
|
1173
|
-
return (n = {}) => new Promise((
|
|
1174
|
-
n.outro ?
|
|
1175
|
-
|
|
1176
|
-
}) : (
|
|
1213
|
+
function ir(t) {
|
|
1214
|
+
de.ensure();
|
|
1215
|
+
const e = Ke(Ce | Ve, t, !0);
|
|
1216
|
+
return (n = {}) => new Promise((i) => {
|
|
1217
|
+
n.outro ? dt(e, () => {
|
|
1218
|
+
W(e), i(void 0);
|
|
1219
|
+
}) : (W(e), i(void 0));
|
|
1177
1220
|
});
|
|
1178
1221
|
}
|
|
1179
1222
|
function Yn(t, e = 0) {
|
|
1180
|
-
return
|
|
1223
|
+
return Ke(hn | e, t, !0);
|
|
1181
1224
|
}
|
|
1182
|
-
function
|
|
1183
|
-
var n =
|
|
1225
|
+
function rr(t, e = 0) {
|
|
1226
|
+
var n = Ke(ge | e, t, !0);
|
|
1184
1227
|
return n;
|
|
1185
1228
|
}
|
|
1186
|
-
function
|
|
1187
|
-
return
|
|
1229
|
+
function Se(t) {
|
|
1230
|
+
return Ke(pe | Ve, t, !0);
|
|
1188
1231
|
}
|
|
1189
|
-
function
|
|
1232
|
+
function Vn(t) {
|
|
1190
1233
|
var e = t.teardown;
|
|
1191
1234
|
if (e !== null) {
|
|
1192
|
-
const n =
|
|
1193
|
-
|
|
1235
|
+
const n = be, i = _;
|
|
1236
|
+
Zt(!0), ie(null);
|
|
1194
1237
|
try {
|
|
1195
1238
|
e.call(null);
|
|
1196
1239
|
} finally {
|
|
1197
|
-
|
|
1240
|
+
Zt(n), ie(i);
|
|
1198
1241
|
}
|
|
1199
1242
|
}
|
|
1200
1243
|
}
|
|
1201
|
-
function
|
|
1244
|
+
function Vt(t, e = !1) {
|
|
1202
1245
|
var n = t.first;
|
|
1203
1246
|
for (t.first = t.last = null; n !== null; ) {
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1206
|
-
|
|
1247
|
+
const r = n.ac;
|
|
1248
|
+
r !== null && zn(() => {
|
|
1249
|
+
r.abort(Ht);
|
|
1207
1250
|
});
|
|
1208
|
-
var
|
|
1209
|
-
(n.f &
|
|
1251
|
+
var i = n.next;
|
|
1252
|
+
(n.f & Ce) !== 0 ? n.parent = null : W(n, e), n = i;
|
|
1210
1253
|
}
|
|
1211
1254
|
}
|
|
1212
|
-
function
|
|
1255
|
+
function sr(t) {
|
|
1213
1256
|
for (var e = t.first; e !== null; ) {
|
|
1214
1257
|
var n = e.next;
|
|
1215
|
-
(e.f &
|
|
1258
|
+
(e.f & pe) === 0 && W(e), e = n;
|
|
1216
1259
|
}
|
|
1217
1260
|
}
|
|
1218
|
-
function
|
|
1261
|
+
function W(t, e = !0) {
|
|
1219
1262
|
var n = !1;
|
|
1220
|
-
(e || (t.f &
|
|
1263
|
+
(e || (t.f & pn) !== 0) && t.nodes !== null && t.nodes.end !== null && (or(
|
|
1221
1264
|
t.nodes.start,
|
|
1222
1265
|
/** @type {TemplateNode} */
|
|
1223
1266
|
t.nodes.end
|
|
1224
|
-
), n = !0),
|
|
1225
|
-
var
|
|
1226
|
-
if (
|
|
1227
|
-
for (const s of
|
|
1267
|
+
), n = !0), Vt(t, e && !n), tt(t, 0), A(t, _e);
|
|
1268
|
+
var i = t.nodes && t.nodes.t;
|
|
1269
|
+
if (i !== null)
|
|
1270
|
+
for (const s of i)
|
|
1228
1271
|
s.stop();
|
|
1229
|
-
|
|
1230
|
-
var
|
|
1231
|
-
|
|
1272
|
+
Vn(t);
|
|
1273
|
+
var r = t.parent;
|
|
1274
|
+
r !== null && r.first !== null && Un(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1232
1275
|
}
|
|
1233
|
-
function
|
|
1276
|
+
function or(t, e) {
|
|
1234
1277
|
for (; t !== null; ) {
|
|
1235
|
-
var n = t === e ? null : /* @__PURE__ */
|
|
1278
|
+
var n = t === e ? null : /* @__PURE__ */ Ue(t);
|
|
1236
1279
|
t.remove(), t = n;
|
|
1237
1280
|
}
|
|
1238
1281
|
}
|
|
1239
1282
|
function Un(t) {
|
|
1240
|
-
var e = t.parent, n = t.prev,
|
|
1241
|
-
n !== null && (n.next =
|
|
1242
|
-
}
|
|
1243
|
-
function
|
|
1244
|
-
var
|
|
1245
|
-
|
|
1246
|
-
var
|
|
1247
|
-
n &&
|
|
1248
|
-
}, s =
|
|
1283
|
+
var e = t.parent, n = t.prev, i = t.next;
|
|
1284
|
+
n !== null && (n.next = i), i !== null && (i.prev = n), e !== null && (e.first === t && (e.first = i), e.last === t && (e.last = n));
|
|
1285
|
+
}
|
|
1286
|
+
function dt(t, e, n = !0) {
|
|
1287
|
+
var i = [];
|
|
1288
|
+
Kn(t, i, !0);
|
|
1289
|
+
var r = () => {
|
|
1290
|
+
n && W(t), e && e();
|
|
1291
|
+
}, s = i.length;
|
|
1249
1292
|
if (s > 0) {
|
|
1250
|
-
var
|
|
1251
|
-
for (var a of
|
|
1252
|
-
a.out(
|
|
1293
|
+
var o = () => --s || r();
|
|
1294
|
+
for (var a of i)
|
|
1295
|
+
a.out(o);
|
|
1253
1296
|
} else
|
|
1254
|
-
|
|
1255
|
-
}
|
|
1256
|
-
function
|
|
1257
|
-
if ((t.f &
|
|
1258
|
-
t.f ^=
|
|
1259
|
-
var
|
|
1260
|
-
if (
|
|
1261
|
-
for (const a of
|
|
1297
|
+
r();
|
|
1298
|
+
}
|
|
1299
|
+
function Kn(t, e, n) {
|
|
1300
|
+
if ((t.f & ve) === 0) {
|
|
1301
|
+
t.f ^= ve;
|
|
1302
|
+
var i = t.nodes && t.nodes.t;
|
|
1303
|
+
if (i !== null)
|
|
1304
|
+
for (const a of i)
|
|
1262
1305
|
(a.is_global || n) && e.push(a);
|
|
1263
|
-
for (var
|
|
1264
|
-
var s =
|
|
1306
|
+
for (var r = t.first; r !== null; ) {
|
|
1307
|
+
var s = r.next, o = (r.f & bt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1265
1308
|
// it means the parent block effect was pruned. In that case,
|
|
1266
1309
|
// transparency information was transferred to the branch effect.
|
|
1267
|
-
(
|
|
1268
|
-
|
|
1310
|
+
(r.f & pe) !== 0 && (t.f & ge) !== 0;
|
|
1311
|
+
Kn(r, e, o ? n : !1), r = s;
|
|
1269
1312
|
}
|
|
1270
1313
|
}
|
|
1271
1314
|
}
|
|
1272
|
-
function
|
|
1315
|
+
function lr(t, e) {
|
|
1273
1316
|
if (t.nodes)
|
|
1274
|
-
for (var n = t.nodes.start,
|
|
1275
|
-
var
|
|
1276
|
-
e.append(n), n =
|
|
1317
|
+
for (var n = t.nodes.start, i = t.nodes.end; n !== null; ) {
|
|
1318
|
+
var r = n === i ? null : /* @__PURE__ */ Ue(n);
|
|
1319
|
+
e.append(n), n = r;
|
|
1277
1320
|
}
|
|
1278
1321
|
}
|
|
1279
|
-
let
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1322
|
+
let gt = !1, be = !1;
|
|
1323
|
+
function Zt(t) {
|
|
1324
|
+
be = t;
|
|
1282
1325
|
}
|
|
1283
|
-
let
|
|
1284
|
-
function
|
|
1285
|
-
|
|
1326
|
+
let _ = null, K = !1;
|
|
1327
|
+
function ie(t) {
|
|
1328
|
+
_ = t;
|
|
1286
1329
|
}
|
|
1287
1330
|
let w = null;
|
|
1288
|
-
function
|
|
1331
|
+
function we(t) {
|
|
1289
1332
|
w = t;
|
|
1290
1333
|
}
|
|
1291
|
-
let
|
|
1334
|
+
let Y = null;
|
|
1292
1335
|
function Wn(t) {
|
|
1293
|
-
|
|
1336
|
+
_ !== null && (Y === null ? Y = [t] : Y.push(t));
|
|
1294
1337
|
}
|
|
1295
|
-
let
|
|
1296
|
-
function
|
|
1297
|
-
|
|
1338
|
+
let B = null, D = 0, j = null;
|
|
1339
|
+
function ar(t) {
|
|
1340
|
+
j = t;
|
|
1298
1341
|
}
|
|
1299
|
-
let
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1342
|
+
let Qn = 1, $e = 0, Oe = $e;
|
|
1343
|
+
function en(t) {
|
|
1344
|
+
Oe = t;
|
|
1302
1345
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return ++
|
|
1346
|
+
function Jn() {
|
|
1347
|
+
return ++Qn;
|
|
1305
1348
|
}
|
|
1306
|
-
function
|
|
1349
|
+
function st(t) {
|
|
1307
1350
|
var e = t.f;
|
|
1308
|
-
if ((e &
|
|
1351
|
+
if ((e & I) !== 0)
|
|
1309
1352
|
return !0;
|
|
1310
|
-
if (e &
|
|
1353
|
+
if (e & R && (t.f &= ~Ne), (e & Q) !== 0) {
|
|
1311
1354
|
for (var n = (
|
|
1312
1355
|
/** @type {Value[]} */
|
|
1313
1356
|
t.deps
|
|
1314
|
-
),
|
|
1315
|
-
var s = n[
|
|
1316
|
-
if (
|
|
1357
|
+
), i = n.length, r = 0; r < i; r++) {
|
|
1358
|
+
var s = n[r];
|
|
1359
|
+
if (st(
|
|
1317
1360
|
/** @type {Derived} */
|
|
1318
1361
|
s
|
|
1319
|
-
) &&
|
|
1362
|
+
) && Fn(
|
|
1320
1363
|
/** @type {Derived} */
|
|
1321
1364
|
s
|
|
1322
1365
|
), s.wv > t.wv)
|
|
1323
1366
|
return !0;
|
|
1324
1367
|
}
|
|
1325
|
-
(e &
|
|
1368
|
+
(e & G) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1326
1369
|
// traversal of the graph in the other batches still happens
|
|
1327
|
-
|
|
1370
|
+
U === null && A(t, N);
|
|
1328
1371
|
}
|
|
1329
1372
|
return !1;
|
|
1330
1373
|
}
|
|
1331
|
-
function
|
|
1332
|
-
var
|
|
1333
|
-
if (
|
|
1334
|
-
for (var
|
|
1335
|
-
var s = r
|
|
1336
|
-
(s.f &
|
|
1374
|
+
function Xn(t, e, n = !0) {
|
|
1375
|
+
var i = t.reactions;
|
|
1376
|
+
if (i !== null && !(Y !== null && ze.call(Y, t)))
|
|
1377
|
+
for (var r = 0; r < i.length; r++) {
|
|
1378
|
+
var s = i[r];
|
|
1379
|
+
(s.f & R) !== 0 ? Xn(
|
|
1337
1380
|
/** @type {Derived} */
|
|
1338
1381
|
s,
|
|
1339
1382
|
e,
|
|
1340
1383
|
!1
|
|
1341
|
-
) : e === s && (n ?
|
|
1384
|
+
) : e === s && (n ? A(s, I) : (s.f & N) !== 0 && A(s, Q), ne(
|
|
1342
1385
|
/** @type {Effect} */
|
|
1343
1386
|
s
|
|
1344
1387
|
));
|
|
1345
1388
|
}
|
|
1346
1389
|
}
|
|
1347
|
-
function
|
|
1348
|
-
var
|
|
1349
|
-
var e =
|
|
1350
|
-
|
|
1351
|
-
null,
|
|
1352
|
-
t.ac.abort(
|
|
1390
|
+
function Zn(t) {
|
|
1391
|
+
var S;
|
|
1392
|
+
var e = B, n = D, i = j, r = _, s = Y, o = V, a = K, u = Oe, c = t.f;
|
|
1393
|
+
B = /** @type {null | Value[]} */
|
|
1394
|
+
null, D = 0, j = null, _ = (c & (pe | Ce)) === 0 ? t : null, Y = null, wt(t.ctx), K = !1, Oe = ++$e, t.ac !== null && (zn(() => {
|
|
1395
|
+
t.ac.abort(Ht);
|
|
1353
1396
|
}), t.ac = null);
|
|
1354
1397
|
try {
|
|
1355
|
-
t.f |=
|
|
1398
|
+
t.f |= Nt;
|
|
1356
1399
|
var h = (
|
|
1357
1400
|
/** @type {Function} */
|
|
1358
1401
|
t.fn
|
|
1359
|
-
), f = h()
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1402
|
+
), f = h();
|
|
1403
|
+
t.f |= Ye;
|
|
1404
|
+
var d = t.deps, g = x?.is_fork;
|
|
1405
|
+
if (B !== null) {
|
|
1406
|
+
var v;
|
|
1407
|
+
if (g || tt(t, D), d !== null && D > 0)
|
|
1408
|
+
for (d.length = D + B.length, v = 0; v < B.length; v++)
|
|
1409
|
+
d[D + v] = B[v];
|
|
1365
1410
|
else
|
|
1366
|
-
t.deps = d =
|
|
1367
|
-
if (
|
|
1368
|
-
for (
|
|
1369
|
-
((
|
|
1370
|
-
} else !
|
|
1371
|
-
if (
|
|
1372
|
-
for (
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1411
|
+
t.deps = d = B;
|
|
1412
|
+
if (Yt() && (t.f & G) !== 0)
|
|
1413
|
+
for (v = D; v < d.length; v++)
|
|
1414
|
+
((S = d[v]).reactions ?? (S.reactions = [])).push(t);
|
|
1415
|
+
} else !g && d !== null && D < d.length && (tt(t, D), d.length = D);
|
|
1416
|
+
if (Cn() && j !== null && !K && d !== null && (t.f & (R | Q | I)) === 0)
|
|
1417
|
+
for (v = 0; v < /** @type {Source[]} */
|
|
1418
|
+
j.length; v++)
|
|
1419
|
+
Xn(
|
|
1420
|
+
j[v],
|
|
1376
1421
|
/** @type {Effect} */
|
|
1377
1422
|
t
|
|
1378
1423
|
);
|
|
1379
|
-
if (
|
|
1380
|
-
if ($e++,
|
|
1381
|
-
for (let
|
|
1382
|
-
|
|
1424
|
+
if (r !== null && r !== t) {
|
|
1425
|
+
if ($e++, r.deps !== null)
|
|
1426
|
+
for (let E = 0; E < n; E += 1)
|
|
1427
|
+
r.deps[E].rv = $e;
|
|
1383
1428
|
if (e !== null)
|
|
1384
|
-
for (const
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1429
|
+
for (const E of e)
|
|
1430
|
+
E.rv = $e;
|
|
1431
|
+
j !== null && (i === null ? i = j : i.push(.../** @type {Source[]} */
|
|
1432
|
+
j));
|
|
1388
1433
|
}
|
|
1389
|
-
return (t.f &
|
|
1390
|
-
} catch (
|
|
1391
|
-
return En(
|
|
1434
|
+
return (t.f & Ze) !== 0 && (t.f ^= Ze), f;
|
|
1435
|
+
} catch (E) {
|
|
1436
|
+
return En(E);
|
|
1392
1437
|
} finally {
|
|
1393
|
-
t.f ^=
|
|
1438
|
+
t.f ^= Nt, B = e, D = n, j = i, _ = r, Y = s, wt(o), K = a, Oe = u;
|
|
1394
1439
|
}
|
|
1395
1440
|
}
|
|
1396
|
-
function
|
|
1441
|
+
function ur(t, e) {
|
|
1397
1442
|
let n = e.reactions;
|
|
1398
1443
|
if (n !== null) {
|
|
1399
|
-
var
|
|
1400
|
-
if (
|
|
1401
|
-
var
|
|
1402
|
-
|
|
1444
|
+
var i = hi.call(n, t);
|
|
1445
|
+
if (i !== -1) {
|
|
1446
|
+
var r = n.length - 1;
|
|
1447
|
+
r === 0 ? n = e.reactions = null : (n[i] = n[r], n.pop());
|
|
1403
1448
|
}
|
|
1404
1449
|
}
|
|
1405
|
-
if (n === null && (e.f &
|
|
1450
|
+
if (n === null && (e.f & R) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1406
1451
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1407
1452
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1408
|
-
(
|
|
1453
|
+
(B === null || !ze.call(B, e))) {
|
|
1409
1454
|
var s = (
|
|
1410
1455
|
/** @type {Derived} */
|
|
1411
1456
|
e
|
|
1412
1457
|
);
|
|
1413
|
-
(s.f &
|
|
1458
|
+
(s.f & G) !== 0 && (s.f ^= G, s.f &= ~Ne), zt(s), Ki(s), tt(s, 0);
|
|
1414
1459
|
}
|
|
1415
1460
|
}
|
|
1416
|
-
function
|
|
1461
|
+
function tt(t, e) {
|
|
1417
1462
|
var n = t.deps;
|
|
1418
1463
|
if (n !== null)
|
|
1419
|
-
for (var
|
|
1420
|
-
|
|
1464
|
+
for (var i = e; i < n.length; i++)
|
|
1465
|
+
ur(t, n[i]);
|
|
1421
1466
|
}
|
|
1422
|
-
function
|
|
1467
|
+
function Ge(t) {
|
|
1423
1468
|
var e = t.f;
|
|
1424
|
-
if ((e &
|
|
1425
|
-
|
|
1426
|
-
var n = w,
|
|
1427
|
-
w = t,
|
|
1469
|
+
if ((e & _e) === 0) {
|
|
1470
|
+
A(t, N);
|
|
1471
|
+
var n = w, i = gt;
|
|
1472
|
+
w = t, gt = !0;
|
|
1428
1473
|
try {
|
|
1429
|
-
(e & (
|
|
1430
|
-
var
|
|
1431
|
-
t.teardown = typeof
|
|
1474
|
+
(e & (ge | dn)) !== 0 ? sr(t) : Vt(t), Vn(t);
|
|
1475
|
+
var r = Zn(t);
|
|
1476
|
+
t.teardown = typeof r == "function" ? r : null, t.wv = Qn;
|
|
1432
1477
|
var s;
|
|
1433
|
-
|
|
1478
|
+
Ot && Di && (t.f & I) !== 0 && t.deps;
|
|
1434
1479
|
} finally {
|
|
1435
|
-
|
|
1480
|
+
gt = i, w = n;
|
|
1436
1481
|
}
|
|
1437
1482
|
}
|
|
1438
1483
|
}
|
|
1439
1484
|
function y(t) {
|
|
1440
|
-
var e = t.f, n = (e &
|
|
1441
|
-
if (
|
|
1442
|
-
var
|
|
1443
|
-
if (!
|
|
1444
|
-
var
|
|
1445
|
-
if ((
|
|
1446
|
-
t.rv < $e && (t.rv = $e,
|
|
1485
|
+
var e = t.f, n = (e & R) !== 0;
|
|
1486
|
+
if (_ !== null && !K) {
|
|
1487
|
+
var i = w !== null && (w.f & _e) !== 0;
|
|
1488
|
+
if (!i && (Y === null || !ze.call(Y, t))) {
|
|
1489
|
+
var r = _.deps;
|
|
1490
|
+
if ((_.f & Nt) !== 0)
|
|
1491
|
+
t.rv < $e && (t.rv = $e, B === null && r !== null && r[D] === t ? D++ : B === null ? B = [t] : B.push(t));
|
|
1447
1492
|
else {
|
|
1448
|
-
(
|
|
1493
|
+
(_.deps ?? (_.deps = [])).push(t);
|
|
1449
1494
|
var s = t.reactions;
|
|
1450
|
-
s === null ? t.reactions = [
|
|
1495
|
+
s === null ? t.reactions = [_] : ze.call(s, _) || s.push(_);
|
|
1451
1496
|
}
|
|
1452
1497
|
}
|
|
1453
1498
|
}
|
|
1454
|
-
if (
|
|
1455
|
-
return
|
|
1499
|
+
if (be && ye.has(t))
|
|
1500
|
+
return ye.get(t);
|
|
1456
1501
|
if (n) {
|
|
1457
|
-
var
|
|
1502
|
+
var o = (
|
|
1458
1503
|
/** @type {Derived} */
|
|
1459
1504
|
t
|
|
1460
1505
|
);
|
|
1461
|
-
if (
|
|
1462
|
-
var a =
|
|
1463
|
-
return ((
|
|
1506
|
+
if (be) {
|
|
1507
|
+
var a = o.v;
|
|
1508
|
+
return ((o.f & N) === 0 && o.reactions !== null || ti(o)) && (a = Gt(o)), ye.set(o, a), a;
|
|
1464
1509
|
}
|
|
1465
|
-
var u = (
|
|
1466
|
-
|
|
1510
|
+
var u = (o.f & G) === 0 && !K && _ !== null && (gt || (_.f & G) !== 0), c = (o.f & Ye) === 0;
|
|
1511
|
+
st(o) && (u && (o.f |= G), Fn(o)), u && !c && (Bn(o), ei(o));
|
|
1467
1512
|
}
|
|
1468
|
-
if (
|
|
1469
|
-
return
|
|
1470
|
-
if ((t.f &
|
|
1513
|
+
if (U?.has(t))
|
|
1514
|
+
return U.get(t);
|
|
1515
|
+
if ((t.f & Ze) !== 0)
|
|
1471
1516
|
throw t.v;
|
|
1472
1517
|
return t.v;
|
|
1473
1518
|
}
|
|
1474
|
-
function
|
|
1475
|
-
if (t.deps !== null)
|
|
1476
|
-
t.f |= z;
|
|
1519
|
+
function ei(t) {
|
|
1520
|
+
if (t.f |= G, t.deps !== null)
|
|
1477
1521
|
for (const e of t.deps)
|
|
1478
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f &
|
|
1522
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & R) !== 0 && (e.f & G) === 0 && (Bn(
|
|
1479
1523
|
/** @type {Derived} */
|
|
1480
1524
|
e
|
|
1481
|
-
)
|
|
1482
|
-
|
|
1525
|
+
), ei(
|
|
1526
|
+
/** @type {Derived} */
|
|
1527
|
+
e
|
|
1528
|
+
));
|
|
1483
1529
|
}
|
|
1484
|
-
function
|
|
1485
|
-
if (t.v ===
|
|
1530
|
+
function ti(t) {
|
|
1531
|
+
if (t.v === O) return !0;
|
|
1486
1532
|
if (t.deps === null) return !1;
|
|
1487
1533
|
for (const e of t.deps)
|
|
1488
|
-
if (
|
|
1534
|
+
if (ye.has(e) || (e.f & R) !== 0 && ti(
|
|
1489
1535
|
/** @type {Derived} */
|
|
1490
1536
|
e
|
|
1491
1537
|
))
|
|
1492
1538
|
return !0;
|
|
1493
1539
|
return !1;
|
|
1494
1540
|
}
|
|
1495
|
-
function
|
|
1496
|
-
var e =
|
|
1541
|
+
function ni(t) {
|
|
1542
|
+
var e = K;
|
|
1497
1543
|
try {
|
|
1498
|
-
return
|
|
1544
|
+
return K = !0, t();
|
|
1499
1545
|
} finally {
|
|
1500
|
-
|
|
1546
|
+
K = e;
|
|
1501
1547
|
}
|
|
1502
1548
|
}
|
|
1503
|
-
const
|
|
1504
|
-
let
|
|
1505
|
-
function
|
|
1549
|
+
const cr = /* @__PURE__ */ new Set(), tn = /* @__PURE__ */ new Set();
|
|
1550
|
+
let nn = null;
|
|
1551
|
+
function rn(t) {
|
|
1506
1552
|
var e = this, n = (
|
|
1507
1553
|
/** @type {Node} */
|
|
1508
1554
|
e.ownerDocument
|
|
1509
|
-
),
|
|
1555
|
+
), i = t.type, r = t.composedPath?.() || [], s = (
|
|
1510
1556
|
/** @type {null | Element} */
|
|
1511
|
-
|
|
1557
|
+
r[0] || t.target
|
|
1512
1558
|
);
|
|
1513
|
-
|
|
1514
|
-
var
|
|
1559
|
+
nn = t;
|
|
1560
|
+
var o = 0, a = nn === t && t.__root;
|
|
1515
1561
|
if (a) {
|
|
1516
|
-
var u =
|
|
1562
|
+
var u = r.indexOf(a);
|
|
1517
1563
|
if (u !== -1 && (e === document || e === /** @type {any} */
|
|
1518
1564
|
window)) {
|
|
1519
1565
|
t.__root = e;
|
|
1520
1566
|
return;
|
|
1521
1567
|
}
|
|
1522
|
-
var c =
|
|
1568
|
+
var c = r.indexOf(e);
|
|
1523
1569
|
if (c === -1)
|
|
1524
1570
|
return;
|
|
1525
|
-
u <= c && (
|
|
1571
|
+
u <= c && (o = u);
|
|
1526
1572
|
}
|
|
1527
1573
|
if (s = /** @type {Element} */
|
|
1528
|
-
|
|
1574
|
+
r[o] || t.target, s !== e) {
|
|
1529
1575
|
_t(t, "currentTarget", {
|
|
1530
1576
|
configurable: !0,
|
|
1531
1577
|
get() {
|
|
1532
1578
|
return s || n;
|
|
1533
1579
|
}
|
|
1534
1580
|
});
|
|
1535
|
-
var h =
|
|
1536
|
-
|
|
1581
|
+
var h = _, f = w;
|
|
1582
|
+
ie(null), we(null);
|
|
1537
1583
|
try {
|
|
1538
|
-
for (var d,
|
|
1539
|
-
var
|
|
1584
|
+
for (var d, g = []; s !== null; ) {
|
|
1585
|
+
var v = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1540
1586
|
s.host || null;
|
|
1541
1587
|
try {
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1588
|
+
var S = s["__" + i];
|
|
1589
|
+
S != null && (!/** @type {any} */
|
|
1544
1590
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1545
1591
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1546
|
-
t.target === s) &&
|
|
1547
|
-
} catch (
|
|
1548
|
-
d ?
|
|
1592
|
+
t.target === s) && S.call(s, t);
|
|
1593
|
+
} catch (E) {
|
|
1594
|
+
d ? g.push(E) : d = E;
|
|
1549
1595
|
}
|
|
1550
|
-
if (t.cancelBubble ||
|
|
1596
|
+
if (t.cancelBubble || v === e || v === null)
|
|
1551
1597
|
break;
|
|
1552
|
-
s =
|
|
1598
|
+
s = v;
|
|
1553
1599
|
}
|
|
1554
1600
|
if (d) {
|
|
1555
|
-
for (let
|
|
1601
|
+
for (let E of g)
|
|
1556
1602
|
queueMicrotask(() => {
|
|
1557
|
-
throw
|
|
1603
|
+
throw E;
|
|
1558
1604
|
});
|
|
1559
1605
|
throw d;
|
|
1560
1606
|
}
|
|
1561
1607
|
} finally {
|
|
1562
|
-
t.__root = e, delete t.currentTarget,
|
|
1608
|
+
t.__root = e, delete t.currentTarget, ie(h), we(f);
|
|
1563
1609
|
}
|
|
1564
1610
|
}
|
|
1565
1611
|
}
|
|
1566
|
-
function
|
|
1612
|
+
function fr(t, e) {
|
|
1567
1613
|
var n = (
|
|
1568
1614
|
/** @type {Effect} */
|
|
1569
1615
|
w
|
|
1570
1616
|
);
|
|
1571
1617
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1572
1618
|
}
|
|
1573
|
-
function
|
|
1574
|
-
if (
|
|
1619
|
+
function hr(t, e) {
|
|
1620
|
+
if (te) {
|
|
1575
1621
|
var n = (
|
|
1576
1622
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1577
1623
|
w
|
|
1578
1624
|
);
|
|
1579
|
-
((n.f &
|
|
1625
|
+
((n.f & Ye) === 0 || n.nodes.end === null) && (n.nodes.end = q), _n();
|
|
1580
1626
|
return;
|
|
1581
1627
|
}
|
|
1582
1628
|
t !== null && t.before(
|
|
@@ -1584,57 +1630,60 @@ function li(t, e) {
|
|
|
1584
1630
|
e
|
|
1585
1631
|
);
|
|
1586
1632
|
}
|
|
1587
|
-
const
|
|
1588
|
-
function
|
|
1589
|
-
return
|
|
1633
|
+
const dr = ["touchstart", "touchmove"];
|
|
1634
|
+
function gr(t) {
|
|
1635
|
+
return dr.includes(t);
|
|
1590
1636
|
}
|
|
1591
|
-
function
|
|
1592
|
-
return
|
|
1637
|
+
function ii(t, e) {
|
|
1638
|
+
return ri(t, e);
|
|
1593
1639
|
}
|
|
1594
|
-
function
|
|
1595
|
-
|
|
1596
|
-
const n = e.target,
|
|
1640
|
+
function pr(t, e) {
|
|
1641
|
+
qt(), e.intro = e.intro ?? !1;
|
|
1642
|
+
const n = e.target, i = te, r = q;
|
|
1597
1643
|
try {
|
|
1598
|
-
for (var s = /* @__PURE__ */
|
|
1599
|
-
s.data !==
|
|
1600
|
-
s = /* @__PURE__ */
|
|
1644
|
+
for (var s = /* @__PURE__ */ Ji(n); s && (s.nodeType !== Et || /** @type {Comment} */
|
|
1645
|
+
s.data !== un); )
|
|
1646
|
+
s = /* @__PURE__ */ Ue(s);
|
|
1601
1647
|
if (!s)
|
|
1602
|
-
throw
|
|
1603
|
-
|
|
1648
|
+
throw mt;
|
|
1649
|
+
lt(!0), et(
|
|
1604
1650
|
/** @type {Comment} */
|
|
1605
1651
|
s
|
|
1606
1652
|
);
|
|
1607
|
-
const
|
|
1608
|
-
return
|
|
1609
|
-
|
|
1610
|
-
} catch (
|
|
1611
|
-
if (
|
|
1653
|
+
const o = ri(t, { ...e, anchor: s });
|
|
1654
|
+
return lt(!1), /** @type {Exports} */
|
|
1655
|
+
o;
|
|
1656
|
+
} catch (o) {
|
|
1657
|
+
if (o instanceof Error && o.message.split(`
|
|
1612
1658
|
`).some((a) => a.startsWith("https://svelte.dev/e/")))
|
|
1613
|
-
throw
|
|
1614
|
-
return
|
|
1659
|
+
throw o;
|
|
1660
|
+
return o !== mt && console.warn("Failed to hydrate: ", o), e.recover === !1 && ki(), qt(), Xi(n), lt(!1), ii(t, e);
|
|
1615
1661
|
} finally {
|
|
1616
|
-
|
|
1662
|
+
lt(i), et(r);
|
|
1617
1663
|
}
|
|
1618
1664
|
}
|
|
1619
|
-
const
|
|
1620
|
-
function
|
|
1621
|
-
|
|
1665
|
+
const ut = /* @__PURE__ */ new Map();
|
|
1666
|
+
function ri(t, { target: e, anchor: n, props: i = {}, events: r, context: s, intro: o = !0 }) {
|
|
1667
|
+
qt();
|
|
1622
1668
|
var a = /* @__PURE__ */ new Set(), u = (f) => {
|
|
1623
1669
|
for (var d = 0; d < f.length; d++) {
|
|
1624
|
-
var
|
|
1625
|
-
if (!a.has(
|
|
1626
|
-
a.add(
|
|
1627
|
-
var
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1670
|
+
var g = f[d];
|
|
1671
|
+
if (!a.has(g)) {
|
|
1672
|
+
a.add(g);
|
|
1673
|
+
var v = gr(g);
|
|
1674
|
+
for (const se of [e, document]) {
|
|
1675
|
+
var S = ut.get(se);
|
|
1676
|
+
S === void 0 && (S = /* @__PURE__ */ new Map(), ut.set(se, S));
|
|
1677
|
+
var E = S.get(g);
|
|
1678
|
+
E === void 0 ? (se.addEventListener(g, rn, { passive: v }), S.set(g, 1)) : S.set(g, E + 1);
|
|
1679
|
+
}
|
|
1631
1680
|
}
|
|
1632
1681
|
}
|
|
1633
1682
|
};
|
|
1634
|
-
u(
|
|
1635
|
-
var c = void 0, h =
|
|
1636
|
-
var f = n ?? e.appendChild(
|
|
1637
|
-
return
|
|
1683
|
+
u(di(cr)), tn.add(u);
|
|
1684
|
+
var c = void 0, h = ir(() => {
|
|
1685
|
+
var f = n ?? e.appendChild(Hn());
|
|
1686
|
+
return zi(
|
|
1638
1687
|
/** @type {TemplateNode} */
|
|
1639
1688
|
f,
|
|
1640
1689
|
{
|
|
@@ -1642,87 +1691,87 @@ function rr(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1642
1691
|
}
|
|
1643
1692
|
},
|
|
1644
1693
|
(d) => {
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
p.c = s;
|
|
1652
|
-
}
|
|
1653
|
-
if (i && (r.$$events = i), ee && si(
|
|
1694
|
+
bn({});
|
|
1695
|
+
var g = (
|
|
1696
|
+
/** @type {ComponentContext} */
|
|
1697
|
+
V
|
|
1698
|
+
);
|
|
1699
|
+
if (s && (g.c = s), r && (i.$$events = r), te && fr(
|
|
1654
1700
|
/** @type {TemplateNode} */
|
|
1655
1701
|
d,
|
|
1656
1702
|
null
|
|
1657
|
-
), c = t(d,
|
|
1658
|
-
|
|
1659
|
-
throw
|
|
1660
|
-
|
|
1703
|
+
), c = t(d, i) || {}, te && (w.nodes.end = q, q === null || q.nodeType !== Et || /** @type {Comment} */
|
|
1704
|
+
q.data !== fn))
|
|
1705
|
+
throw vn(), mt;
|
|
1706
|
+
wn();
|
|
1661
1707
|
}
|
|
1662
1708
|
), () => {
|
|
1663
|
-
for (var d of a)
|
|
1664
|
-
e
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1709
|
+
for (var d of a)
|
|
1710
|
+
for (const S of [e, document]) {
|
|
1711
|
+
var g = (
|
|
1712
|
+
/** @type {Map<string, number>} */
|
|
1713
|
+
ut.get(S)
|
|
1714
|
+
), v = (
|
|
1715
|
+
/** @type {number} */
|
|
1716
|
+
g.get(d)
|
|
1717
|
+
);
|
|
1718
|
+
--v == 0 ? (S.removeEventListener(d, rn), g.delete(d), g.size === 0 && ut.delete(S)) : g.set(d, v);
|
|
1719
|
+
}
|
|
1720
|
+
tn.delete(u), f !== n && f.parentNode?.removeChild(f);
|
|
1672
1721
|
};
|
|
1673
1722
|
});
|
|
1674
|
-
return
|
|
1723
|
+
return jt.set(c, h), c;
|
|
1675
1724
|
}
|
|
1676
|
-
let
|
|
1677
|
-
function
|
|
1678
|
-
const n =
|
|
1679
|
-
return n ? (
|
|
1725
|
+
let jt = /* @__PURE__ */ new WeakMap();
|
|
1726
|
+
function mr(t, e) {
|
|
1727
|
+
const n = jt.get(t);
|
|
1728
|
+
return n ? (jt.delete(t), n(e)) : Promise.resolve();
|
|
1680
1729
|
}
|
|
1681
|
-
function
|
|
1682
|
-
|
|
1683
|
-
const e =
|
|
1730
|
+
function vr(t) {
|
|
1731
|
+
V === null && Ci(), ht(() => {
|
|
1732
|
+
const e = ni(t);
|
|
1684
1733
|
if (typeof e == "function") return (
|
|
1685
1734
|
/** @type {() => void} */
|
|
1686
1735
|
e
|
|
1687
1736
|
);
|
|
1688
1737
|
});
|
|
1689
1738
|
}
|
|
1690
|
-
function
|
|
1691
|
-
var
|
|
1739
|
+
function oe(t, e, n, i) {
|
|
1740
|
+
var r = (
|
|
1692
1741
|
/** @type {V} */
|
|
1693
|
-
|
|
1694
|
-
), s = !0,
|
|
1695
|
-
|
|
1742
|
+
i
|
|
1743
|
+
), s = !0, o = () => (s && (s = !1, r = /** @type {V} */
|
|
1744
|
+
i), r), a;
|
|
1696
1745
|
a = /** @type {V} */
|
|
1697
|
-
t[e], a === void 0 &&
|
|
1746
|
+
t[e], a === void 0 && i !== void 0 && (a = o());
|
|
1698
1747
|
var u;
|
|
1699
1748
|
u = () => {
|
|
1700
1749
|
var d = (
|
|
1701
1750
|
/** @type {V} */
|
|
1702
1751
|
t[e]
|
|
1703
1752
|
);
|
|
1704
|
-
return d === void 0 ?
|
|
1753
|
+
return d === void 0 ? o() : (s = !0, d);
|
|
1705
1754
|
};
|
|
1706
|
-
var c = !1, h = /* @__PURE__ */
|
|
1755
|
+
var c = !1, h = /* @__PURE__ */ Ln(() => (c = !1, u())), f = (
|
|
1707
1756
|
/** @type {Effect} */
|
|
1708
1757
|
w
|
|
1709
1758
|
);
|
|
1710
1759
|
return (
|
|
1711
1760
|
/** @type {() => V} */
|
|
1712
|
-
(function(d,
|
|
1761
|
+
(function(d, g) {
|
|
1713
1762
|
if (arguments.length > 0) {
|
|
1714
|
-
const
|
|
1715
|
-
return
|
|
1763
|
+
const v = g ? y(h) : d;
|
|
1764
|
+
return T(h, v), c = !0, r !== void 0 && (r = v), d;
|
|
1716
1765
|
}
|
|
1717
|
-
return
|
|
1766
|
+
return be && c || (f.f & _e) !== 0 ? h.v : y(h);
|
|
1718
1767
|
})
|
|
1719
1768
|
);
|
|
1720
1769
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return new
|
|
1770
|
+
function _r(t) {
|
|
1771
|
+
return new yr(t);
|
|
1723
1772
|
}
|
|
1724
|
-
var
|
|
1725
|
-
class
|
|
1773
|
+
var he, H;
|
|
1774
|
+
class yr {
|
|
1726
1775
|
/**
|
|
1727
1776
|
* @param {ComponentConstructorOptions & {
|
|
1728
1777
|
* component: any;
|
|
@@ -1730,56 +1779,56 @@ class di {
|
|
|
1730
1779
|
*/
|
|
1731
1780
|
constructor(e) {
|
|
1732
1781
|
/** @type {any} */
|
|
1733
|
-
b(this,
|
|
1782
|
+
b(this, he);
|
|
1734
1783
|
/** @type {Record<string, any>} */
|
|
1735
1784
|
b(this, H);
|
|
1736
|
-
var n = /* @__PURE__ */ new Map(),
|
|
1737
|
-
var a = /* @__PURE__ */
|
|
1785
|
+
var n = /* @__PURE__ */ new Map(), i = (s, o) => {
|
|
1786
|
+
var a = /* @__PURE__ */ Wi(o, !1, !1);
|
|
1738
1787
|
return n.set(s, a), a;
|
|
1739
1788
|
};
|
|
1740
|
-
const
|
|
1789
|
+
const r = new Proxy(
|
|
1741
1790
|
{ ...e.props || {}, $$events: {} },
|
|
1742
1791
|
{
|
|
1743
|
-
get(s,
|
|
1744
|
-
return y(n.get(
|
|
1792
|
+
get(s, o) {
|
|
1793
|
+
return y(n.get(o) ?? i(o, Reflect.get(s, o)));
|
|
1745
1794
|
},
|
|
1746
|
-
has(s,
|
|
1747
|
-
return
|
|
1795
|
+
has(s, o) {
|
|
1796
|
+
return o === wi ? !0 : (y(n.get(o) ?? i(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
1748
1797
|
},
|
|
1749
|
-
set(s,
|
|
1750
|
-
return
|
|
1798
|
+
set(s, o, a) {
|
|
1799
|
+
return T(n.get(o) ?? i(o, a), a), Reflect.set(s, o, a);
|
|
1751
1800
|
}
|
|
1752
1801
|
}
|
|
1753
1802
|
);
|
|
1754
|
-
|
|
1803
|
+
m(this, H, (e.hydrate ? pr : ii)(e.component, {
|
|
1755
1804
|
target: e.target,
|
|
1756
1805
|
anchor: e.anchor,
|
|
1757
|
-
props:
|
|
1806
|
+
props: r,
|
|
1758
1807
|
context: e.context,
|
|
1759
1808
|
intro: e.intro ?? !1,
|
|
1760
1809
|
recover: e.recover
|
|
1761
|
-
})), (!e?.props?.$$host || e.sync === !1) &&
|
|
1762
|
-
for (const s of Object.keys(
|
|
1810
|
+
})), (!e?.props?.$$host || e.sync === !1) && J(), m(this, he, r.$$events);
|
|
1811
|
+
for (const s of Object.keys(l(this, H)))
|
|
1763
1812
|
s === "$set" || s === "$destroy" || s === "$on" || _t(this, s, {
|
|
1764
1813
|
get() {
|
|
1765
|
-
return
|
|
1814
|
+
return l(this, H)[s];
|
|
1766
1815
|
},
|
|
1767
1816
|
/** @param {any} value */
|
|
1768
|
-
set(
|
|
1769
|
-
|
|
1817
|
+
set(o) {
|
|
1818
|
+
l(this, H)[s] = o;
|
|
1770
1819
|
},
|
|
1771
1820
|
enumerable: !0
|
|
1772
1821
|
});
|
|
1773
|
-
|
|
1822
|
+
l(this, H).$set = /** @param {Record<string, any>} next */
|
|
1774
1823
|
(s) => {
|
|
1775
|
-
Object.assign(
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1824
|
+
Object.assign(r, s);
|
|
1825
|
+
}, l(this, H).$destroy = () => {
|
|
1826
|
+
mr(l(this, H));
|
|
1778
1827
|
};
|
|
1779
1828
|
}
|
|
1780
1829
|
/** @param {Record<string, any>} props */
|
|
1781
1830
|
$set(e) {
|
|
1782
|
-
|
|
1831
|
+
l(this, H).$set(e);
|
|
1783
1832
|
}
|
|
1784
1833
|
/**
|
|
1785
1834
|
* @param {string} event
|
|
@@ -1787,96 +1836,96 @@ class di {
|
|
|
1787
1836
|
* @returns {any}
|
|
1788
1837
|
*/
|
|
1789
1838
|
$on(e, n) {
|
|
1790
|
-
|
|
1791
|
-
const
|
|
1792
|
-
return
|
|
1793
|
-
|
|
1839
|
+
l(this, he)[e] = l(this, he)[e] || [];
|
|
1840
|
+
const i = (...r) => n.call(this, ...r);
|
|
1841
|
+
return l(this, he)[e].push(i), () => {
|
|
1842
|
+
l(this, he)[e] = l(this, he)[e].filter(
|
|
1794
1843
|
/** @param {any} fn */
|
|
1795
|
-
(
|
|
1844
|
+
(r) => r !== i
|
|
1796
1845
|
);
|
|
1797
1846
|
};
|
|
1798
1847
|
}
|
|
1799
1848
|
$destroy() {
|
|
1800
|
-
|
|
1849
|
+
l(this, H).$destroy();
|
|
1801
1850
|
}
|
|
1802
1851
|
}
|
|
1803
|
-
|
|
1804
|
-
let
|
|
1805
|
-
typeof HTMLElement == "function" && (
|
|
1852
|
+
he = new WeakMap(), H = new WeakMap();
|
|
1853
|
+
let si;
|
|
1854
|
+
typeof HTMLElement == "function" && (si = class extends HTMLElement {
|
|
1806
1855
|
/**
|
|
1807
1856
|
* @param {*} $$componentCtor
|
|
1808
1857
|
* @param {*} $$slots
|
|
1809
1858
|
* @param {ShadowRootInit | undefined} shadow_root_init
|
|
1810
1859
|
*/
|
|
1811
|
-
constructor(e, n,
|
|
1860
|
+
constructor(e, n, i) {
|
|
1812
1861
|
super();
|
|
1813
1862
|
/** The Svelte component constructor */
|
|
1814
|
-
|
|
1863
|
+
p(this, "$$ctor");
|
|
1815
1864
|
/** Slots */
|
|
1816
|
-
|
|
1865
|
+
p(this, "$$s");
|
|
1817
1866
|
/** @type {any} The Svelte component instance */
|
|
1818
|
-
|
|
1867
|
+
p(this, "$$c");
|
|
1819
1868
|
/** Whether or not the custom element is connected */
|
|
1820
|
-
|
|
1869
|
+
p(this, "$$cn", !1);
|
|
1821
1870
|
/** @type {Record<string, any>} Component props data */
|
|
1822
|
-
|
|
1871
|
+
p(this, "$$d", {});
|
|
1823
1872
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1824
|
-
|
|
1873
|
+
p(this, "$$r", !1);
|
|
1825
1874
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1826
|
-
|
|
1875
|
+
p(this, "$$p_d", {});
|
|
1827
1876
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1828
|
-
|
|
1877
|
+
p(this, "$$l", {});
|
|
1829
1878
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1830
|
-
|
|
1879
|
+
p(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1831
1880
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1832
|
-
|
|
1881
|
+
p(this, "$$me");
|
|
1833
1882
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
1834
|
-
|
|
1835
|
-
this.$$ctor = e, this.$$s = n,
|
|
1883
|
+
p(this, "$$shadowRoot", null);
|
|
1884
|
+
this.$$ctor = e, this.$$s = n, i && (this.$$shadowRoot = this.attachShadow(i));
|
|
1836
1885
|
}
|
|
1837
1886
|
/**
|
|
1838
1887
|
* @param {string} type
|
|
1839
1888
|
* @param {EventListenerOrEventListenerObject} listener
|
|
1840
1889
|
* @param {boolean | AddEventListenerOptions} [options]
|
|
1841
1890
|
*/
|
|
1842
|
-
addEventListener(e, n,
|
|
1891
|
+
addEventListener(e, n, i) {
|
|
1843
1892
|
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(n), this.$$c) {
|
|
1844
|
-
const
|
|
1845
|
-
this.$$l_u.set(n,
|
|
1893
|
+
const r = this.$$c.$on(e, n);
|
|
1894
|
+
this.$$l_u.set(n, r);
|
|
1846
1895
|
}
|
|
1847
|
-
super.addEventListener(e, n,
|
|
1896
|
+
super.addEventListener(e, n, i);
|
|
1848
1897
|
}
|
|
1849
1898
|
/**
|
|
1850
1899
|
* @param {string} type
|
|
1851
1900
|
* @param {EventListenerOrEventListenerObject} listener
|
|
1852
1901
|
* @param {boolean | AddEventListenerOptions} [options]
|
|
1853
1902
|
*/
|
|
1854
|
-
removeEventListener(e, n,
|
|
1855
|
-
if (super.removeEventListener(e, n,
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1903
|
+
removeEventListener(e, n, i) {
|
|
1904
|
+
if (super.removeEventListener(e, n, i), this.$$c) {
|
|
1905
|
+
const r = this.$$l_u.get(n);
|
|
1906
|
+
r && (r(), this.$$l_u.delete(n));
|
|
1858
1907
|
}
|
|
1859
1908
|
}
|
|
1860
1909
|
async connectedCallback() {
|
|
1861
1910
|
if (this.$$cn = !0, !this.$$c) {
|
|
1862
|
-
let e = function(
|
|
1911
|
+
let e = function(r) {
|
|
1863
1912
|
return (s) => {
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1913
|
+
const o = Zi("slot");
|
|
1914
|
+
r !== "default" && (o.name = r), hr(s, o);
|
|
1866
1915
|
};
|
|
1867
1916
|
};
|
|
1868
1917
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1869
1918
|
return;
|
|
1870
|
-
const n = {},
|
|
1871
|
-
for (const
|
|
1872
|
-
|
|
1873
|
-
for (const
|
|
1874
|
-
const s = this.$$g_p(
|
|
1875
|
-
s in this.$$d || (this.$$d[s] =
|
|
1919
|
+
const n = {}, i = br(this);
|
|
1920
|
+
for (const r of this.$$s)
|
|
1921
|
+
r in i && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), n.default = !0) : n[r] = e(r));
|
|
1922
|
+
for (const r of this.attributes) {
|
|
1923
|
+
const s = this.$$g_p(r.name);
|
|
1924
|
+
s in this.$$d || (this.$$d[s] = pt(s, r.value, this.$$p_d, "toProp"));
|
|
1876
1925
|
}
|
|
1877
|
-
for (const
|
|
1878
|
-
!(
|
|
1879
|
-
this.$$c =
|
|
1926
|
+
for (const r in this.$$p_d)
|
|
1927
|
+
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
1928
|
+
this.$$c = _r({
|
|
1880
1929
|
component: this.$$ctor,
|
|
1881
1930
|
target: this.$$shadowRoot || this,
|
|
1882
1931
|
props: {
|
|
@@ -1884,27 +1933,27 @@ typeof HTMLElement == "function" && (ir = class extends HTMLElement {
|
|
|
1884
1933
|
$$slots: n,
|
|
1885
1934
|
$$host: this
|
|
1886
1935
|
}
|
|
1887
|
-
}), this.$$me =
|
|
1936
|
+
}), this.$$me = nr(() => {
|
|
1888
1937
|
Yn(() => {
|
|
1889
1938
|
this.$$r = !0;
|
|
1890
|
-
for (const
|
|
1891
|
-
if (!this.$$p_d[
|
|
1892
|
-
this.$$d[
|
|
1893
|
-
const s =
|
|
1894
|
-
|
|
1895
|
-
this.$$d[
|
|
1939
|
+
for (const r of vt(this.$$c)) {
|
|
1940
|
+
if (!this.$$p_d[r]?.reflect) continue;
|
|
1941
|
+
this.$$d[r] = this.$$c[r];
|
|
1942
|
+
const s = pt(
|
|
1943
|
+
r,
|
|
1944
|
+
this.$$d[r],
|
|
1896
1945
|
this.$$p_d,
|
|
1897
1946
|
"toAttribute"
|
|
1898
1947
|
);
|
|
1899
|
-
s == null ? this.removeAttribute(this.$$p_d[
|
|
1948
|
+
s == null ? this.removeAttribute(this.$$p_d[r].attribute || r) : this.setAttribute(this.$$p_d[r].attribute || r, s);
|
|
1900
1949
|
}
|
|
1901
1950
|
this.$$r = !1;
|
|
1902
1951
|
});
|
|
1903
1952
|
});
|
|
1904
|
-
for (const
|
|
1905
|
-
for (const s of this.$$l[
|
|
1906
|
-
const
|
|
1907
|
-
this.$$l_u.set(s,
|
|
1953
|
+
for (const r in this.$$l)
|
|
1954
|
+
for (const s of this.$$l[r]) {
|
|
1955
|
+
const o = this.$$c.$on(r, s);
|
|
1956
|
+
this.$$l_u.set(s, o);
|
|
1908
1957
|
}
|
|
1909
1958
|
this.$$l = {};
|
|
1910
1959
|
}
|
|
@@ -1916,8 +1965,8 @@ typeof HTMLElement == "function" && (ir = class extends HTMLElement {
|
|
|
1916
1965
|
* @param {string} _oldValue
|
|
1917
1966
|
* @param {string} newValue
|
|
1918
1967
|
*/
|
|
1919
|
-
attributeChangedCallback(e, n,
|
|
1920
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
1968
|
+
attributeChangedCallback(e, n, i) {
|
|
1969
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = pt(e, i, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
1921
1970
|
}
|
|
1922
1971
|
disconnectedCallback() {
|
|
1923
1972
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1928,17 +1977,17 @@ typeof HTMLElement == "function" && (ir = class extends HTMLElement {
|
|
|
1928
1977
|
* @param {string} attribute_name
|
|
1929
1978
|
*/
|
|
1930
1979
|
$$g_p(e) {
|
|
1931
|
-
return
|
|
1980
|
+
return vt(this.$$p_d).find(
|
|
1932
1981
|
(n) => this.$$p_d[n].attribute === e || !this.$$p_d[n].attribute && n.toLowerCase() === e
|
|
1933
1982
|
) || e;
|
|
1934
1983
|
}
|
|
1935
1984
|
});
|
|
1936
|
-
function
|
|
1937
|
-
const
|
|
1938
|
-
if (e =
|
|
1985
|
+
function pt(t, e, n, i) {
|
|
1986
|
+
const r = n[t]?.type;
|
|
1987
|
+
if (e = r === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !n[t])
|
|
1939
1988
|
return e;
|
|
1940
|
-
if (
|
|
1941
|
-
switch (
|
|
1989
|
+
if (i === "toAttribute")
|
|
1990
|
+
switch (r) {
|
|
1942
1991
|
case "Object":
|
|
1943
1992
|
case "Array":
|
|
1944
1993
|
return e == null ? null : JSON.stringify(e);
|
|
@@ -1950,7 +1999,7 @@ function dt(t, e, n, r) {
|
|
|
1950
1999
|
return e;
|
|
1951
2000
|
}
|
|
1952
2001
|
else
|
|
1953
|
-
switch (
|
|
2002
|
+
switch (r) {
|
|
1954
2003
|
case "Object":
|
|
1955
2004
|
case "Array":
|
|
1956
2005
|
return e && JSON.parse(e);
|
|
@@ -1963,7 +2012,7 @@ function dt(t, e, n, r) {
|
|
|
1963
2012
|
return e;
|
|
1964
2013
|
}
|
|
1965
2014
|
}
|
|
1966
|
-
function
|
|
2015
|
+
function br(t) {
|
|
1967
2016
|
const e = {};
|
|
1968
2017
|
return t.childNodes.forEach((n) => {
|
|
1969
2018
|
e[
|
|
@@ -1972,78 +2021,233 @@ function pi(t) {
|
|
|
1972
2021
|
] = !0;
|
|
1973
2022
|
}), e;
|
|
1974
2023
|
}
|
|
1975
|
-
function
|
|
1976
|
-
let
|
|
2024
|
+
function wr(t, e, n, i, r, s) {
|
|
2025
|
+
let o = class extends si {
|
|
1977
2026
|
constructor() {
|
|
1978
|
-
super(t, n,
|
|
2027
|
+
super(t, n, r), this.$$p_d = e;
|
|
1979
2028
|
}
|
|
1980
2029
|
static get observedAttributes() {
|
|
1981
|
-
return
|
|
2030
|
+
return vt(e).map(
|
|
1982
2031
|
(a) => (e[a].attribute || a).toLowerCase()
|
|
1983
2032
|
);
|
|
1984
2033
|
}
|
|
1985
2034
|
};
|
|
1986
|
-
return
|
|
1987
|
-
_t(
|
|
2035
|
+
return vt(e).forEach((a) => {
|
|
2036
|
+
_t(o.prototype, a, {
|
|
1988
2037
|
get() {
|
|
1989
2038
|
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
1990
2039
|
},
|
|
1991
2040
|
set(u) {
|
|
1992
|
-
u =
|
|
2041
|
+
u = pt(a, u, e), this.$$d[a] = u;
|
|
1993
2042
|
var c = this.$$c;
|
|
1994
2043
|
if (c) {
|
|
1995
|
-
var h =
|
|
2044
|
+
var h = Le(c, a)?.get;
|
|
1996
2045
|
h ? c[a] = u : c.$set({ [a]: u });
|
|
1997
2046
|
}
|
|
1998
2047
|
}
|
|
1999
2048
|
});
|
|
2000
|
-
}),
|
|
2001
|
-
_t(
|
|
2049
|
+
}), i.forEach((a) => {
|
|
2050
|
+
_t(o.prototype, a, {
|
|
2002
2051
|
get() {
|
|
2003
2052
|
return this.$$c?.[a];
|
|
2004
2053
|
}
|
|
2005
2054
|
});
|
|
2006
2055
|
}), t.element = /** @type {any} */
|
|
2007
|
-
|
|
2056
|
+
o, o;
|
|
2008
2057
|
}
|
|
2009
|
-
var
|
|
2058
|
+
var sn;
|
|
2010
2059
|
(function(t) {
|
|
2011
2060
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2012
|
-
})(
|
|
2013
|
-
var
|
|
2061
|
+
})(sn || (sn = {}));
|
|
2062
|
+
var on;
|
|
2014
2063
|
(function(t) {
|
|
2015
|
-
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange";
|
|
2016
|
-
})(
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2064
|
+
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2065
|
+
})(on || (on = {}));
|
|
2066
|
+
const Cr = {
|
|
2067
|
+
/**
|
|
2068
|
+
* Visual accessibility features
|
|
2069
|
+
* For students with low vision, color blindness, or visual processing needs
|
|
2070
|
+
*/
|
|
2071
|
+
visual: {
|
|
2072
|
+
// Magnification and zoom
|
|
2073
|
+
magnification: "magnification",
|
|
2074
|
+
screenMagnifier: "screenMagnifier",
|
|
2075
|
+
zoomable: "zoomable",
|
|
2076
|
+
// Color and contrast
|
|
2077
|
+
highContrastDisplay: "highContrastDisplay",
|
|
2078
|
+
highContrastAudio: "highContrastAudio",
|
|
2079
|
+
colorContrast: "colorContrast",
|
|
2080
|
+
invertColors: "invertColors",
|
|
2081
|
+
// Display customization
|
|
2082
|
+
displayTransformability: "displayTransformability",
|
|
2083
|
+
largePrint: "largePrint",
|
|
2084
|
+
fontEnlargement: "fontEnlargement",
|
|
2085
|
+
resizeText: "resizeText",
|
|
2086
|
+
// Visual alternatives
|
|
2087
|
+
alternativeText: "alternativeText",
|
|
2088
|
+
longDescription: "longDescription",
|
|
2089
|
+
describedMath: "describedMath",
|
|
2090
|
+
tactileGraphic: "tactileGraphic",
|
|
2091
|
+
tactileObject: "tactileObject"
|
|
2092
|
+
},
|
|
2093
|
+
/**
|
|
2094
|
+
* Auditory accessibility features
|
|
2095
|
+
* For students who are deaf, hard of hearing, or benefit from audio
|
|
2096
|
+
*/
|
|
2097
|
+
auditory: {
|
|
2098
|
+
// Audio output
|
|
2099
|
+
audioDescription: "audioDescription",
|
|
2100
|
+
textToSpeech: "textToSpeech",
|
|
2101
|
+
readAloud: "readAloud",
|
|
2102
|
+
humanVoice: "humanVoice",
|
|
2103
|
+
syntheticVoice: "syntheticVoice",
|
|
2104
|
+
// Speech control
|
|
2105
|
+
speechRate: "speechRate",
|
|
2106
|
+
speechVolume: "speechVolume",
|
|
2107
|
+
voicePitch: "voicePitch",
|
|
2108
|
+
// Visual alternatives for audio
|
|
2109
|
+
captions: "captions",
|
|
2110
|
+
closedCaptions: "closedCaptions",
|
|
2111
|
+
openCaptions: "openCaptions",
|
|
2112
|
+
transcript: "transcript",
|
|
2113
|
+
signLanguage: "signLanguage",
|
|
2114
|
+
subtitles: "subtitles",
|
|
2115
|
+
// Audio adjustments
|
|
2116
|
+
audioControl: "audioControl",
|
|
2117
|
+
noBackgroundAudio: "noBackgroundAudio"
|
|
2118
|
+
},
|
|
2119
|
+
/**
|
|
2120
|
+
* Motor/physical accessibility features
|
|
2121
|
+
* For students with limited mobility or motor control
|
|
2122
|
+
*/
|
|
2123
|
+
motor: {
|
|
2124
|
+
// Input alternatives
|
|
2125
|
+
keyboardControl: "keyboardControl",
|
|
2126
|
+
mouseControl: "mouseControl",
|
|
2127
|
+
touchControl: "touchControl",
|
|
2128
|
+
voiceControl: "voiceControl",
|
|
2129
|
+
switchControl: "switchControl",
|
|
2130
|
+
eyeGazeControl: "eyeGazeControl",
|
|
2131
|
+
// Keyboard features
|
|
2132
|
+
singleSwitchAccess: "singleSwitchAccess",
|
|
2133
|
+
stickyKeys: "stickyKeys",
|
|
2134
|
+
keyboardShortcuts: "keyboardShortcuts",
|
|
2135
|
+
// Timing
|
|
2136
|
+
timingControl: "timingControl",
|
|
2137
|
+
unlimitedTime: "unlimitedTime",
|
|
2138
|
+
extendedTime: "extendedTime",
|
|
2139
|
+
pauseControl: "pauseControl"
|
|
2140
|
+
},
|
|
2141
|
+
/**
|
|
2142
|
+
* Cognitive/learning accessibility features
|
|
2143
|
+
* For students with learning disabilities, ADHD, autism, etc.
|
|
2144
|
+
*/
|
|
2145
|
+
cognitive: {
|
|
2146
|
+
// Content simplification
|
|
2147
|
+
simplifiedLanguage: "simplifiedLanguage",
|
|
2148
|
+
reducedComplexity: "reducedComplexity",
|
|
2149
|
+
structuralNavigation: "structuralNavigation",
|
|
2150
|
+
tableOfContents: "tableOfContents",
|
|
2151
|
+
// Focus and attention
|
|
2152
|
+
reducedDistraction: "reducedDistraction",
|
|
2153
|
+
noFlashing: "noFlashing",
|
|
2154
|
+
pauseAnimation: "pauseAnimation",
|
|
2155
|
+
// Organization and support
|
|
2156
|
+
annotations: "annotations",
|
|
2157
|
+
bookmarking: "bookmarking",
|
|
2158
|
+
highlighting: "highlighting",
|
|
2159
|
+
guidedNavigation: "guidedNavigation",
|
|
2160
|
+
// Tools
|
|
2161
|
+
calculator: "calculator",
|
|
2162
|
+
dictionary: "dictionary",
|
|
2163
|
+
thesaurus: "thesaurus",
|
|
2164
|
+
spellingAssistance: "spellingAssistance",
|
|
2165
|
+
grammarAssistance: "grammarAssistance"
|
|
2166
|
+
},
|
|
2167
|
+
/**
|
|
2168
|
+
* Reading support features
|
|
2169
|
+
* For students with dyslexia or reading challenges
|
|
2170
|
+
*/
|
|
2171
|
+
reading: {
|
|
2172
|
+
// Text presentation
|
|
2173
|
+
lineSpacing: "lineSpacing",
|
|
2174
|
+
wordSpacing: "wordSpacing",
|
|
2175
|
+
letterSpacing: "letterSpacing",
|
|
2176
|
+
fontFamily: "fontFamily",
|
|
2177
|
+
readingMask: "readingMask",
|
|
2178
|
+
readingGuide: "readingGuide",
|
|
2179
|
+
readingRuler: "readingRuler",
|
|
2180
|
+
// Highlighting and emphasis
|
|
2181
|
+
wordHighlighting: "wordHighlighting",
|
|
2182
|
+
lineHighlighting: "lineHighlighting",
|
|
2183
|
+
focusIndicator: "focusIndicator",
|
|
2184
|
+
// Content support
|
|
2185
|
+
printableResource: "printableResource",
|
|
2186
|
+
braille: "braille",
|
|
2187
|
+
nemeth: "nemeth",
|
|
2188
|
+
refreshableBraille: "refreshableBraille"
|
|
2189
|
+
},
|
|
2190
|
+
/**
|
|
2191
|
+
* Navigation features
|
|
2192
|
+
* For efficient content navigation
|
|
2193
|
+
*/
|
|
2194
|
+
navigation: {
|
|
2195
|
+
// Structure
|
|
2196
|
+
index: "index",
|
|
2197
|
+
pageNavigation: "pageNavigation",
|
|
2198
|
+
skipContent: "skipContent",
|
|
2199
|
+
breadcrumbs: "breadcrumbs",
|
|
2200
|
+
// Search
|
|
2201
|
+
searchable: "searchable",
|
|
2202
|
+
fullTextSearch: "fullTextSearch"
|
|
2203
|
+
},
|
|
2204
|
+
/**
|
|
2205
|
+
* Linguistic features
|
|
2206
|
+
* For language support
|
|
2207
|
+
*/
|
|
2208
|
+
linguistic: {
|
|
2209
|
+
// Languages
|
|
2210
|
+
multilingualText: "multilingualText",
|
|
2211
|
+
translatedText: "translatedText",
|
|
2212
|
+
glossary: "glossary",
|
|
2213
|
+
// Sign language
|
|
2214
|
+
signLanguageInterpretation: "signLanguageInterpretation",
|
|
2215
|
+
visualLanguage: "visualLanguage"
|
|
2216
|
+
},
|
|
2217
|
+
/**
|
|
2218
|
+
* Assessment-specific features
|
|
2219
|
+
* Features specific to test-taking environments
|
|
2220
|
+
*/
|
|
2221
|
+
assessment: {
|
|
2222
|
+
// Tools
|
|
2223
|
+
protractor: "protractor",
|
|
2224
|
+
ruler: "ruler",
|
|
2225
|
+
graph: "graph",
|
|
2226
|
+
graphingCalculator: "graphingCalculator",
|
|
2227
|
+
periodicTable: "periodicTable",
|
|
2228
|
+
formulaSheet: "formulaSheet",
|
|
2229
|
+
// Answer support
|
|
2230
|
+
answerMasking: "answerMasking",
|
|
2231
|
+
answerEliminator: "answerEliminator",
|
|
2232
|
+
strikethrough: "strikethrough",
|
|
2233
|
+
// Item features
|
|
2234
|
+
itemGlossary: "itemGlossary",
|
|
2235
|
+
tutorialAvailable: "tutorialAvailable"
|
|
2236
|
+
}
|
|
2033
2237
|
};
|
|
2034
|
-
Object.
|
|
2035
|
-
var
|
|
2238
|
+
Object.values(Cr).flatMap((t) => Object.values(t));
|
|
2239
|
+
var Pt;
|
|
2036
2240
|
(function(t) {
|
|
2037
2241
|
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";
|
|
2038
|
-
})(
|
|
2039
|
-
var
|
|
2242
|
+
})(Pt || (Pt = {}));
|
|
2243
|
+
var ln;
|
|
2040
2244
|
(function(t) {
|
|
2041
2245
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
2042
|
-
})(
|
|
2043
|
-
class
|
|
2246
|
+
})(ln || (ln = {}));
|
|
2247
|
+
class oi {
|
|
2044
2248
|
constructor() {
|
|
2045
|
-
|
|
2046
|
-
|
|
2249
|
+
p(this, "elementType", "multiple-choice");
|
|
2250
|
+
p(this, "priority", 100);
|
|
2047
2251
|
}
|
|
2048
2252
|
canHandle(e) {
|
|
2049
2253
|
return e.tagName.toLowerCase() === "multiple-choice" || e.classList.contains("multiple-choice");
|
|
@@ -2059,8 +2263,8 @@ class sr {
|
|
|
2059
2263
|
const n = e.querySelector(".label") || e.querySelector("label") || e.querySelector('[class*="label"]') || e.querySelector("span");
|
|
2060
2264
|
if (!n)
|
|
2061
2265
|
return null;
|
|
2062
|
-
const
|
|
2063
|
-
return
|
|
2266
|
+
const i = document.createRange();
|
|
2267
|
+
return i.selectNodeContents(n), i;
|
|
2064
2268
|
}
|
|
2065
2269
|
getChoiceId(e) {
|
|
2066
2270
|
const n = e.querySelector(
|
|
@@ -2081,30 +2285,30 @@ class sr {
|
|
|
2081
2285
|
return e;
|
|
2082
2286
|
}
|
|
2083
2287
|
generateFallbackId(e) {
|
|
2084
|
-
const
|
|
2085
|
-
return `choice-${Array.from(
|
|
2288
|
+
const i = e.closest(".multiple-choice")?.querySelectorAll(".choice-input") || [];
|
|
2289
|
+
return `choice-${Array.from(i).indexOf(e)}`;
|
|
2086
2290
|
}
|
|
2087
2291
|
}
|
|
2088
|
-
class
|
|
2292
|
+
class Sr {
|
|
2089
2293
|
constructor() {
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2294
|
+
p(this, "elementType", "ebsr");
|
|
2295
|
+
p(this, "priority", 95);
|
|
2296
|
+
p(this, "mcAdapter", new oi());
|
|
2093
2297
|
}
|
|
2094
2298
|
canHandle(e) {
|
|
2095
2299
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
2096
2300
|
}
|
|
2097
2301
|
findChoices(e) {
|
|
2098
|
-
const n = e.querySelector('ebsr-multiple-choice[id="a"]'),
|
|
2099
|
-
return n &&
|
|
2302
|
+
const n = e.querySelector('ebsr-multiple-choice[id="a"]'), i = e.querySelector('ebsr-multiple-choice[id="b"]'), r = [];
|
|
2303
|
+
return n && r.push(...this.mcAdapter.findChoices(n)), i && r.push(...this.mcAdapter.findChoices(i)), r;
|
|
2100
2304
|
}
|
|
2101
2305
|
// Delegate all other methods to MultipleChoiceAdapter
|
|
2102
2306
|
createChoiceRange(e) {
|
|
2103
2307
|
return this.mcAdapter.createChoiceRange(e);
|
|
2104
2308
|
}
|
|
2105
2309
|
getChoiceId(e) {
|
|
2106
|
-
const n = e.closest("ebsr-multiple-choice")?.id || "unknown",
|
|
2107
|
-
return `${n}-${
|
|
2310
|
+
const n = e.closest("ebsr-multiple-choice")?.id || "unknown", i = this.mcAdapter.getChoiceId(e);
|
|
2311
|
+
return `${n}-${i}`;
|
|
2108
2312
|
}
|
|
2109
2313
|
getChoiceLabel(e) {
|
|
2110
2314
|
return this.mcAdapter.getChoiceLabel(e);
|
|
@@ -2116,10 +2320,10 @@ class vi {
|
|
|
2116
2320
|
return this.mcAdapter.getButtonContainer(e);
|
|
2117
2321
|
}
|
|
2118
2322
|
}
|
|
2119
|
-
class
|
|
2323
|
+
class Er {
|
|
2120
2324
|
constructor() {
|
|
2121
|
-
|
|
2122
|
-
|
|
2325
|
+
p(this, "elementType", "inline-dropdown");
|
|
2326
|
+
p(this, "priority", 90);
|
|
2123
2327
|
}
|
|
2124
2328
|
canHandle(e) {
|
|
2125
2329
|
return e.tagName.toLowerCase() === "inline-dropdown" || e.querySelector('[role="combobox"]') !== null;
|
|
@@ -2144,13 +2348,13 @@ class mi {
|
|
|
2144
2348
|
return e;
|
|
2145
2349
|
}
|
|
2146
2350
|
}
|
|
2147
|
-
class
|
|
2351
|
+
class $r {
|
|
2148
2352
|
constructor() {
|
|
2149
|
-
|
|
2353
|
+
p(this, "adapters");
|
|
2150
2354
|
this.adapters = [
|
|
2151
|
-
new
|
|
2152
|
-
new
|
|
2153
|
-
new
|
|
2355
|
+
new oi(),
|
|
2356
|
+
new Sr(),
|
|
2357
|
+
new Er()
|
|
2154
2358
|
].sort((e, n) => n.priority - e.priority);
|
|
2155
2359
|
}
|
|
2156
2360
|
/**
|
|
@@ -2163,11 +2367,11 @@ class yi {
|
|
|
2163
2367
|
* Find all choices with their adapters within a root element
|
|
2164
2368
|
*/
|
|
2165
2369
|
findAllChoicesWithAdapters(e) {
|
|
2166
|
-
const n = [],
|
|
2167
|
-
for (const
|
|
2168
|
-
const s =
|
|
2169
|
-
for (const
|
|
2170
|
-
|
|
2370
|
+
const n = [], i = /* @__PURE__ */ new Set();
|
|
2371
|
+
for (const r of this.adapters) {
|
|
2372
|
+
const s = r.findChoices(e);
|
|
2373
|
+
for (const o of s)
|
|
2374
|
+
i.has(o) || (i.add(o), n.push({ choice: o, adapter: r }));
|
|
2171
2375
|
}
|
|
2172
2376
|
return n;
|
|
2173
2377
|
}
|
|
@@ -2175,14 +2379,14 @@ class yi {
|
|
|
2175
2379
|
* Register a custom adapter
|
|
2176
2380
|
*/
|
|
2177
2381
|
registerAdapter(e) {
|
|
2178
|
-
this.adapters.push(e), this.adapters.sort((n,
|
|
2382
|
+
this.adapters.push(e), this.adapters.sort((n, i) => i.priority - n.priority);
|
|
2179
2383
|
}
|
|
2180
2384
|
}
|
|
2181
|
-
class
|
|
2385
|
+
class Ar {
|
|
2182
2386
|
constructor() {
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2387
|
+
p(this, "name", "mask");
|
|
2388
|
+
p(this, "highlights", /* @__PURE__ */ new Map());
|
|
2389
|
+
p(this, "ranges", /* @__PURE__ */ new Map());
|
|
2186
2390
|
}
|
|
2187
2391
|
initialize() {
|
|
2188
2392
|
this.injectCSS();
|
|
@@ -2196,8 +2400,8 @@ class bi {
|
|
|
2196
2400
|
return;
|
|
2197
2401
|
}
|
|
2198
2402
|
this.injectHighlightCSS(e);
|
|
2199
|
-
const
|
|
2200
|
-
CSS.highlights.set(`answer-masked-${e}`,
|
|
2403
|
+
const i = new Highlight(n);
|
|
2404
|
+
CSS.highlights.set(`answer-masked-${e}`, i), this.highlights.set(e, i), this.ranges.set(e, n), this.addAriaAttributes(n);
|
|
2201
2405
|
}
|
|
2202
2406
|
remove(e) {
|
|
2203
2407
|
if (!this.isSupported()) {
|
|
@@ -2236,13 +2440,13 @@ class bi {
|
|
|
2236
2440
|
injectHighlightCSS(e) {
|
|
2237
2441
|
const n = `answer-eliminator-mask-highlight-${e}`;
|
|
2238
2442
|
if (document.getElementById(n)) return;
|
|
2239
|
-
const
|
|
2240
|
-
|
|
2443
|
+
const i = document.createElement("style");
|
|
2444
|
+
i.id = n, i.textContent = `
|
|
2241
2445
|
::highlight(answer-masked-${e}) {
|
|
2242
2446
|
opacity: 0.2;
|
|
2243
2447
|
filter: blur(2px);
|
|
2244
2448
|
}
|
|
2245
|
-
`, document.head.appendChild(
|
|
2449
|
+
`, document.head.appendChild(i);
|
|
2246
2450
|
}
|
|
2247
2451
|
removeHighlightCSS(e) {
|
|
2248
2452
|
document.getElementById(`answer-eliminator-mask-highlight-${e}`)?.remove();
|
|
@@ -2268,8 +2472,8 @@ class bi {
|
|
|
2268
2472
|
return null;
|
|
2269
2473
|
}
|
|
2270
2474
|
applyFallback(e, n) {
|
|
2271
|
-
const
|
|
2272
|
-
|
|
2475
|
+
const i = this.findChoiceContainer(n);
|
|
2476
|
+
i && (i.classList.add("answer-masked-fallback"), i.setAttribute("data-eliminated", "true"), i.setAttribute("data-eliminated-id", e), this.addAriaAttributes(n));
|
|
2273
2477
|
}
|
|
2274
2478
|
removeFallback(e) {
|
|
2275
2479
|
const n = document.querySelector(
|
|
@@ -2277,15 +2481,15 @@ class bi {
|
|
|
2277
2481
|
);
|
|
2278
2482
|
if (!n) return;
|
|
2279
2483
|
n.classList.remove("answer-masked-fallback"), n.removeAttribute("data-eliminated"), n.removeAttribute("data-eliminated-id");
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2484
|
+
const i = document.createRange();
|
|
2485
|
+
i.selectNodeContents(n), this.removeAriaAttributes(i);
|
|
2282
2486
|
}
|
|
2283
2487
|
}
|
|
2284
|
-
class
|
|
2488
|
+
class kr {
|
|
2285
2489
|
constructor() {
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2490
|
+
p(this, "name", "strikethrough");
|
|
2491
|
+
p(this, "highlights", /* @__PURE__ */ new Map());
|
|
2492
|
+
p(this, "ranges", /* @__PURE__ */ new Map());
|
|
2289
2493
|
}
|
|
2290
2494
|
initialize() {
|
|
2291
2495
|
if (!this.isSupported()) {
|
|
@@ -2303,8 +2507,8 @@ class wi {
|
|
|
2303
2507
|
return;
|
|
2304
2508
|
}
|
|
2305
2509
|
this.injectHighlightCSS(e);
|
|
2306
|
-
const
|
|
2307
|
-
CSS.highlights.set(`answer-eliminated-${e}`,
|
|
2510
|
+
const i = new Highlight(n);
|
|
2511
|
+
CSS.highlights.set(`answer-eliminated-${e}`, i), this.highlights.set(e, i), this.ranges.set(e, n), this.addAriaAttributes(n);
|
|
2308
2512
|
}
|
|
2309
2513
|
remove(e) {
|
|
2310
2514
|
if (!this.isSupported()) {
|
|
@@ -2354,15 +2558,15 @@ class wi {
|
|
|
2354
2558
|
injectHighlightCSS(e) {
|
|
2355
2559
|
const n = `answer-eliminator-highlight-${e}`;
|
|
2356
2560
|
if (document.getElementById(n)) return;
|
|
2357
|
-
const
|
|
2358
|
-
|
|
2561
|
+
const i = document.createElement("style");
|
|
2562
|
+
i.id = n, i.textContent = `
|
|
2359
2563
|
::highlight(answer-eliminated-${e}) {
|
|
2360
2564
|
text-decoration: line-through;
|
|
2361
2565
|
text-decoration-thickness: 2px;
|
|
2362
2566
|
text-decoration-color: var(--pie-incorrect, #ff9800);
|
|
2363
2567
|
opacity: 0.6;
|
|
2364
2568
|
}
|
|
2365
|
-
`, document.head.appendChild(
|
|
2569
|
+
`, document.head.appendChild(i);
|
|
2366
2570
|
}
|
|
2367
2571
|
removeHighlightCSS(e) {
|
|
2368
2572
|
document.getElementById(`answer-eliminator-highlight-${e}`)?.remove();
|
|
@@ -2376,10 +2580,10 @@ class wi {
|
|
|
2376
2580
|
const n = this.findChoiceContainer(e);
|
|
2377
2581
|
if (!n) return;
|
|
2378
2582
|
n.setAttribute("data-eliminated", "true"), n.setAttribute("aria-disabled", "true");
|
|
2379
|
-
const
|
|
2380
|
-
if (
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2583
|
+
const i = n.querySelector(".label");
|
|
2584
|
+
if (i && !i.querySelector(".sr-announcement")) {
|
|
2585
|
+
const r = document.createElement("span");
|
|
2586
|
+
r.className = "sr-announcement", r.textContent = " (eliminated)", i.appendChild(r);
|
|
2383
2587
|
}
|
|
2384
2588
|
}
|
|
2385
2589
|
removeAriaAttributes(e) {
|
|
@@ -2398,8 +2602,8 @@ class wi {
|
|
|
2398
2602
|
}
|
|
2399
2603
|
// Fallback for browsers without CSS Highlight API
|
|
2400
2604
|
applyFallback(e, n) {
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2605
|
+
const i = this.findChoiceContainer(n);
|
|
2606
|
+
i && (i.classList.add("answer-eliminated-fallback"), i.setAttribute("data-eliminated", "true"), i.setAttribute("data-eliminated-id", e), this.addAriaAttributes(n));
|
|
2403
2607
|
}
|
|
2404
2608
|
removeFallback(e) {
|
|
2405
2609
|
const n = document.querySelector(
|
|
@@ -2407,29 +2611,29 @@ class wi {
|
|
|
2407
2611
|
);
|
|
2408
2612
|
if (!n) return;
|
|
2409
2613
|
n.classList.remove("answer-eliminated-fallback"), n.removeAttribute("data-eliminated"), n.removeAttribute("data-eliminated-id");
|
|
2410
|
-
const
|
|
2411
|
-
|
|
2614
|
+
const i = document.createRange();
|
|
2615
|
+
i.selectNodeContents(n), this.removeAriaAttributes(i);
|
|
2412
2616
|
}
|
|
2413
2617
|
}
|
|
2414
|
-
class
|
|
2618
|
+
class xr {
|
|
2415
2619
|
constructor(e = "strikethrough", n = "right") {
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2620
|
+
p(this, "registry");
|
|
2621
|
+
p(this, "strategy");
|
|
2622
|
+
p(this, "eliminatedChoices", /* @__PURE__ */ new Set());
|
|
2419
2623
|
// Set<choiceId> for current element
|
|
2420
|
-
|
|
2624
|
+
p(this, "choiceElements", /* @__PURE__ */ new Map());
|
|
2421
2625
|
// choiceId -> element
|
|
2422
|
-
|
|
2626
|
+
p(this, "choiceButtons", /* @__PURE__ */ new Map());
|
|
2423
2627
|
// choiceId -> button
|
|
2424
|
-
|
|
2425
|
-
|
|
2628
|
+
p(this, "buttonAlignment", "right");
|
|
2629
|
+
p(this, "shouldRestoreState", !0);
|
|
2426
2630
|
// Whether to restore eliminations from state storage
|
|
2427
2631
|
// Store integration (replaces session/localStorage)
|
|
2428
|
-
|
|
2429
|
-
this.registry = new
|
|
2632
|
+
p(this, "storeIntegration", null);
|
|
2633
|
+
this.registry = new $r(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = n;
|
|
2430
2634
|
}
|
|
2431
2635
|
createStrategy(e) {
|
|
2432
|
-
return e === "mask" ? new
|
|
2636
|
+
return e === "mask" ? new Ar() : new kr();
|
|
2433
2637
|
}
|
|
2434
2638
|
/**
|
|
2435
2639
|
* Initialize eliminator for a question
|
|
@@ -2437,28 +2641,28 @@ class Ei {
|
|
|
2437
2641
|
initializeForQuestion(e) {
|
|
2438
2642
|
this.cleanupButtons();
|
|
2439
2643
|
const n = this.registry.findAllChoicesWithAdapters(e);
|
|
2440
|
-
for (const { choice:
|
|
2441
|
-
this.initializeChoice(
|
|
2644
|
+
for (const { choice: i, adapter: r } of n)
|
|
2645
|
+
this.initializeChoice(i, r);
|
|
2442
2646
|
this.shouldRestoreState && this.restoreState();
|
|
2443
2647
|
}
|
|
2444
2648
|
/**
|
|
2445
2649
|
* Initialize a single choice
|
|
2446
2650
|
*/
|
|
2447
2651
|
initializeChoice(e, n) {
|
|
2448
|
-
const
|
|
2449
|
-
this.choiceElements.set(
|
|
2450
|
-
const
|
|
2451
|
-
if (!
|
|
2452
|
-
this.choiceButtons.set(
|
|
2652
|
+
const i = n.getChoiceId(e);
|
|
2653
|
+
this.choiceElements.set(i, e);
|
|
2654
|
+
const r = this.createToggleButton(e, n);
|
|
2655
|
+
if (!r) return;
|
|
2656
|
+
this.choiceButtons.set(i, r);
|
|
2453
2657
|
const s = n.getButtonContainer(e);
|
|
2454
|
-
s && (s.style.position = "relative", s.appendChild(
|
|
2658
|
+
s && (s.style.position = "relative", s.appendChild(r));
|
|
2455
2659
|
}
|
|
2456
2660
|
/**
|
|
2457
2661
|
* Create elimination toggle button
|
|
2458
2662
|
*/
|
|
2459
2663
|
createToggleButton(e, n) {
|
|
2460
|
-
const
|
|
2461
|
-
return s.type = "button", s.className = "answer-eliminator-toggle", s.setAttribute("aria-label", `Toggle elimination for ${
|
|
2664
|
+
const i = n.getChoiceId(e), r = n.getChoiceLabel(e), s = document.createElement("button");
|
|
2665
|
+
return s.type = "button", s.className = "answer-eliminator-toggle", s.setAttribute("aria-label", `Toggle elimination for ${r}`), s.setAttribute("data-choice-id", i), s.textContent = "⊗", this.applyButtonAlignment(s), Object.assign(s.style, {
|
|
2462
2666
|
width: "28px",
|
|
2463
2667
|
height: "28px",
|
|
2464
2668
|
padding: "0",
|
|
@@ -2477,18 +2681,18 @@ class Ei {
|
|
|
2477
2681
|
}), s.addEventListener("mouseenter", () => {
|
|
2478
2682
|
s.style.background = "#f0f0f0", s.style.borderColor = "#999", s.style.color = "#333";
|
|
2479
2683
|
}), s.addEventListener("mouseleave", () => {
|
|
2480
|
-
this.strategy.isEliminated(
|
|
2481
|
-
}), s.addEventListener("click", (
|
|
2482
|
-
|
|
2684
|
+
this.strategy.isEliminated(i) || (s.style.background = "white", s.style.borderColor = "#ccc", s.style.color = "#666");
|
|
2685
|
+
}), s.addEventListener("click", (o) => {
|
|
2686
|
+
o.preventDefault(), o.stopPropagation(), this.toggleElimination(e, n);
|
|
2483
2687
|
}), s;
|
|
2484
2688
|
}
|
|
2485
2689
|
/**
|
|
2486
2690
|
* Toggle elimination for a choice
|
|
2487
2691
|
*/
|
|
2488
2692
|
toggleElimination(e, n) {
|
|
2489
|
-
const
|
|
2490
|
-
if (this.strategy.isEliminated(
|
|
2491
|
-
this.restoreChoice(
|
|
2693
|
+
const i = n.getChoiceId(e);
|
|
2694
|
+
if (this.strategy.isEliminated(i))
|
|
2695
|
+
this.restoreChoice(i);
|
|
2492
2696
|
else {
|
|
2493
2697
|
if (!n.canEliminate(e)) {
|
|
2494
2698
|
console.warn(
|
|
@@ -2504,13 +2708,13 @@ class Ei {
|
|
|
2504
2708
|
* Eliminate a choice
|
|
2505
2709
|
*/
|
|
2506
2710
|
eliminateChoice(e, n) {
|
|
2507
|
-
const
|
|
2508
|
-
if (!
|
|
2711
|
+
const i = n.getChoiceId(e), r = n.createChoiceRange(e);
|
|
2712
|
+
if (!r) {
|
|
2509
2713
|
console.error("Failed to create range for choice");
|
|
2510
2714
|
return;
|
|
2511
2715
|
}
|
|
2512
|
-
this.strategy.apply(
|
|
2513
|
-
const s = this.choiceButtons.get(
|
|
2716
|
+
this.strategy.apply(i, r), this.eliminatedChoices.add(i);
|
|
2717
|
+
const s = this.choiceButtons.get(i);
|
|
2514
2718
|
s && (s.classList.add("active"), s.setAttribute("aria-pressed", "true"), s.style.background = "#ff9800", s.style.borderColor = "#ff9800", s.style.color = "white"), this.saveState();
|
|
2515
2719
|
}
|
|
2516
2720
|
/**
|
|
@@ -2572,15 +2776,15 @@ class Ei {
|
|
|
2572
2776
|
try {
|
|
2573
2777
|
const n = e.eliminatedChoices;
|
|
2574
2778
|
if (!n || n.length === 0) return;
|
|
2575
|
-
for (const
|
|
2576
|
-
const
|
|
2577
|
-
if (!
|
|
2578
|
-
const s = this.findAdapterForChoice(
|
|
2779
|
+
for (const i of n) {
|
|
2780
|
+
const r = this.choiceElements.get(i);
|
|
2781
|
+
if (!r) continue;
|
|
2782
|
+
const s = this.findAdapterForChoice(r);
|
|
2579
2783
|
if (!s) continue;
|
|
2580
|
-
const
|
|
2581
|
-
if (
|
|
2582
|
-
this.strategy.apply(
|
|
2583
|
-
const a = this.choiceButtons.get(
|
|
2784
|
+
const o = s.createChoiceRange(r);
|
|
2785
|
+
if (o) {
|
|
2786
|
+
this.strategy.apply(i, o), this.eliminatedChoices.add(i);
|
|
2787
|
+
const a = this.choiceButtons.get(i);
|
|
2584
2788
|
a && (a.classList.add("active"), a.setAttribute("aria-pressed", "true"), a.style.background = "#ff9800", a.style.borderColor = "#ff9800", a.style.color = "white");
|
|
2585
2789
|
}
|
|
2586
2790
|
}
|
|
@@ -2594,8 +2798,8 @@ class Ei {
|
|
|
2594
2798
|
findAdapterForChoice(e) {
|
|
2595
2799
|
let n = e;
|
|
2596
2800
|
for (; n && n !== document.body; ) {
|
|
2597
|
-
const
|
|
2598
|
-
if (
|
|
2801
|
+
const i = this.registry.findAdapter(n);
|
|
2802
|
+
if (i) return i;
|
|
2599
2803
|
n = n.parentElement;
|
|
2600
2804
|
}
|
|
2601
2805
|
return null;
|
|
@@ -2679,144 +2883,144 @@ class Ei {
|
|
|
2679
2883
|
this.cleanupButtons(), this.strategy.destroy();
|
|
2680
2884
|
}
|
|
2681
2885
|
}
|
|
2682
|
-
function
|
|
2683
|
-
|
|
2684
|
-
let n =
|
|
2886
|
+
function Tr(t, e) {
|
|
2887
|
+
bn(e, !0);
|
|
2888
|
+
let n = oe(e, "visible", 7, !1), i = oe(e, "toolId", 7, "answerEliminator"), r = oe(e, "strategy", 7, "strikethrough"), s = oe(
|
|
2685
2889
|
e,
|
|
2686
2890
|
"alwaysOn",
|
|
2687
2891
|
7,
|
|
2688
2892
|
!1
|
|
2689
2893
|
// Set true for profile-based accommodation
|
|
2690
|
-
),
|
|
2894
|
+
), o = oe(
|
|
2691
2895
|
e,
|
|
2692
2896
|
"buttonAlignment",
|
|
2693
2897
|
7,
|
|
2694
2898
|
"right"
|
|
2695
2899
|
// Button placement: left, right, or inline with checkbox
|
|
2696
|
-
), a =
|
|
2900
|
+
), a = oe(e, "coordinator"), u = oe(
|
|
2697
2901
|
e,
|
|
2698
2902
|
"scopeElement",
|
|
2699
2903
|
7,
|
|
2700
2904
|
null
|
|
2701
2905
|
// Container element to limit DOM queries (for multi-item pages)
|
|
2702
|
-
), c =
|
|
2906
|
+
), c = oe(
|
|
2703
2907
|
e,
|
|
2704
2908
|
"elementToolStateStore",
|
|
2705
2909
|
7,
|
|
2706
2910
|
null
|
|
2707
2911
|
// ElementToolStateStore instance
|
|
2708
|
-
), h =
|
|
2912
|
+
), h = oe(
|
|
2709
2913
|
e,
|
|
2710
2914
|
"globalElementId",
|
|
2711
2915
|
7,
|
|
2712
2916
|
""
|
|
2713
2917
|
// Composite key: "assessmentId:sectionId:itemId:elementId"
|
|
2714
|
-
), f = /* @__PURE__ */
|
|
2715
|
-
function
|
|
2716
|
-
if (!y(
|
|
2717
|
-
const
|
|
2718
|
-
if (!
|
|
2918
|
+
), f = /* @__PURE__ */ z(null), d = /* @__PURE__ */ z(0), g = /* @__PURE__ */ z(null), v = /* @__PURE__ */ z(!1), S = /* @__PURE__ */ Yi(() => s() || n());
|
|
2919
|
+
function E() {
|
|
2920
|
+
if (!y(S) || !y(f)) return;
|
|
2921
|
+
const C = u() || document.body, ot = C.querySelector("pie-player") || C.querySelector("multiple-choice") || C.querySelector("ebsr") || C.querySelector("[data-pie-element]") || C;
|
|
2922
|
+
if (!ot) {
|
|
2719
2923
|
console.warn("[AnswerEliminator] Could not find question root within scope");
|
|
2720
2924
|
return;
|
|
2721
2925
|
}
|
|
2722
|
-
y(f).initializeForQuestion(
|
|
2926
|
+
y(f).initializeForQuestion(ot), kt();
|
|
2723
2927
|
}
|
|
2724
|
-
function
|
|
2725
|
-
const
|
|
2726
|
-
|
|
2727
|
-
|
|
2928
|
+
function se(C, ot = 5e3) {
|
|
2929
|
+
const We = u() || document.body, xt = () => We.querySelector("pie-player") || We.querySelector("multiple-choice") || We.querySelector("ebsr") || We.querySelector("[data-pie-element]") ? (y(g) && (y(g).disconnect(), T(g, null)), C(), !0) : !1;
|
|
2930
|
+
xt() || (T(
|
|
2931
|
+
g,
|
|
2728
2932
|
new MutationObserver(() => {
|
|
2729
|
-
|
|
2933
|
+
xt();
|
|
2730
2934
|
}),
|
|
2731
2935
|
!0
|
|
2732
|
-
), y(
|
|
2936
|
+
), y(g).observe(We, { childList: !0, subtree: !0 }), setTimeout(
|
|
2733
2937
|
() => {
|
|
2734
|
-
y(
|
|
2938
|
+
y(g) && (y(g).disconnect(), T(g, null), xt());
|
|
2735
2939
|
},
|
|
2736
|
-
|
|
2940
|
+
ot
|
|
2737
2941
|
));
|
|
2738
2942
|
}
|
|
2739
|
-
function
|
|
2740
|
-
|
|
2741
|
-
|
|
2943
|
+
function Ie() {
|
|
2944
|
+
se(() => {
|
|
2945
|
+
E();
|
|
2742
2946
|
});
|
|
2743
2947
|
}
|
|
2744
|
-
function
|
|
2745
|
-
|
|
2948
|
+
function kt() {
|
|
2949
|
+
T(d, y(f)?.getEliminatedCount() || 0, !0);
|
|
2746
2950
|
}
|
|
2747
|
-
|
|
2748
|
-
a() &&
|
|
2749
|
-
}),
|
|
2951
|
+
ht(() => {
|
|
2952
|
+
a() && i() && !y(v) && (a().registerTool(i(), "Answer Eliminator", void 0, Pt.MODAL), T(v, !0));
|
|
2953
|
+
}), ht(() => {
|
|
2750
2954
|
y(f) && c() && h() && y(f).setStoreIntegration(c(), h());
|
|
2751
|
-
}),
|
|
2752
|
-
|
|
2753
|
-
}), y(
|
|
2754
|
-
|
|
2955
|
+
}), vr(() => (T(f, new xr(r(), o()), !0), y(f) && c() && h() && y(f).setStoreIntegration(c(), h()), document.addEventListener("pie-item-changed", Ie), document.addEventListener("answer-eliminator-state-change", () => {
|
|
2956
|
+
kt();
|
|
2957
|
+
}), y(S) ? se(() => {
|
|
2958
|
+
E();
|
|
2755
2959
|
}) : y(f).cleanup(), () => {
|
|
2756
|
-
y(
|
|
2757
|
-
})),
|
|
2758
|
-
y(f) && (y(
|
|
2960
|
+
y(g) && (y(g).disconnect(), T(g, null)), y(f)?.destroy(), T(f, null), a() && i() && a().unregisterTool(i()), document.removeEventListener("pie-item-changed", Ie), document.removeEventListener("answer-eliminator-state-change", kt);
|
|
2961
|
+
})), ht(() => {
|
|
2962
|
+
y(f) && (y(S) ? (y(f).enableStateRestoration(), E()) : y(f).cleanup());
|
|
2759
2963
|
});
|
|
2760
|
-
var
|
|
2964
|
+
var li = {
|
|
2761
2965
|
get visible() {
|
|
2762
2966
|
return n();
|
|
2763
2967
|
},
|
|
2764
|
-
set visible(
|
|
2765
|
-
n(
|
|
2968
|
+
set visible(C = !1) {
|
|
2969
|
+
n(C), J();
|
|
2766
2970
|
},
|
|
2767
2971
|
get toolId() {
|
|
2768
|
-
return
|
|
2972
|
+
return i();
|
|
2769
2973
|
},
|
|
2770
|
-
set toolId(
|
|
2771
|
-
|
|
2974
|
+
set toolId(C = "answerEliminator") {
|
|
2975
|
+
i(C), J();
|
|
2772
2976
|
},
|
|
2773
2977
|
get strategy() {
|
|
2774
|
-
return
|
|
2978
|
+
return r();
|
|
2775
2979
|
},
|
|
2776
|
-
set strategy(
|
|
2777
|
-
|
|
2980
|
+
set strategy(C = "strikethrough") {
|
|
2981
|
+
r(C), J();
|
|
2778
2982
|
},
|
|
2779
2983
|
get alwaysOn() {
|
|
2780
2984
|
return s();
|
|
2781
2985
|
},
|
|
2782
|
-
set alwaysOn(
|
|
2783
|
-
s(
|
|
2986
|
+
set alwaysOn(C = !1) {
|
|
2987
|
+
s(C), J();
|
|
2784
2988
|
},
|
|
2785
2989
|
get buttonAlignment() {
|
|
2786
|
-
return
|
|
2990
|
+
return o();
|
|
2787
2991
|
},
|
|
2788
|
-
set buttonAlignment(
|
|
2789
|
-
|
|
2992
|
+
set buttonAlignment(C = "right") {
|
|
2993
|
+
o(C), J();
|
|
2790
2994
|
},
|
|
2791
2995
|
get coordinator() {
|
|
2792
2996
|
return a();
|
|
2793
2997
|
},
|
|
2794
|
-
set coordinator(
|
|
2795
|
-
a(
|
|
2998
|
+
set coordinator(C) {
|
|
2999
|
+
a(C), J();
|
|
2796
3000
|
},
|
|
2797
3001
|
get scopeElement() {
|
|
2798
3002
|
return u();
|
|
2799
3003
|
},
|
|
2800
|
-
set scopeElement(
|
|
2801
|
-
u(
|
|
3004
|
+
set scopeElement(C = null) {
|
|
3005
|
+
u(C), J();
|
|
2802
3006
|
},
|
|
2803
3007
|
get elementToolStateStore() {
|
|
2804
3008
|
return c();
|
|
2805
3009
|
},
|
|
2806
|
-
set elementToolStateStore(
|
|
2807
|
-
c(
|
|
3010
|
+
set elementToolStateStore(C = null) {
|
|
3011
|
+
c(C), J();
|
|
2808
3012
|
},
|
|
2809
3013
|
get globalElementId() {
|
|
2810
3014
|
return h();
|
|
2811
3015
|
},
|
|
2812
|
-
set globalElementId(
|
|
2813
|
-
h(
|
|
3016
|
+
set globalElementId(C = "") {
|
|
3017
|
+
h(C), J();
|
|
2814
3018
|
}
|
|
2815
3019
|
};
|
|
2816
|
-
return
|
|
3020
|
+
return wn(li);
|
|
2817
3021
|
}
|
|
2818
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
2819
|
-
|
|
3022
|
+
customElements.define("pie-tool-answer-eliminator", wr(
|
|
3023
|
+
Tr,
|
|
2820
3024
|
{
|
|
2821
3025
|
visible: { attribute: "visible", type: "Boolean" },
|
|
2822
3026
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -2832,6 +3036,6 @@ customElements.define("pie-tool-answer-eliminator", gi(
|
|
|
2832
3036
|
[]
|
|
2833
3037
|
));
|
|
2834
3038
|
export {
|
|
2835
|
-
|
|
3039
|
+
Tr as default
|
|
2836
3040
|
};
|
|
2837
3041
|
//# sourceMappingURL=tool-answer-eliminator.js.map
|