@pie-players/pie-tool-answer-eliminator 0.2.9 → 0.2.10
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/adapters/multiple-choice-adapter.ts +62 -14
- package/answer-eliminator-core.ts +7 -50
- package/dist/adapters/multiple-choice-adapter.d.ts +8 -0
- package/dist/adapters/multiple-choice-adapter.d.ts.map +1 -1
- package/dist/answer-eliminator-core.d.ts +2 -0
- package/dist/answer-eliminator-core.d.ts.map +1 -1
- package/dist/strategies/mask-strategy.d.ts +6 -2
- package/dist/strategies/mask-strategy.d.ts.map +1 -1
- package/dist/strategies/strikethrough-strategy.d.ts +9 -2
- package/dist/strategies/strikethrough-strategy.d.ts.map +1 -1
- package/dist/tool-answer-eliminator.js +1436 -1324
- package/package.json +4 -4
- package/strategies/mask-strategy.ts +27 -39
- package/strategies/strikethrough-strategy.ts +47 -66
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Rn = Object.defineProperty;
|
|
2
|
+
var li = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var f = (t, e, i) =>
|
|
7
|
-
var c = (t, e, i) => (
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var On = (t, e, i) => e in t ? Rn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
6
|
+
var f = (t, e, i) => On(t, typeof e != "symbol" ? e + "" : e, i), Ht = (t, e, i) => e.has(t) || li("Cannot " + i);
|
|
7
|
+
var c = (t, e, i) => (Ht(t, e, "read from private field"), i ? i.call(t) : e.get(t)), A = (t, e, i) => e.has(t) ? li("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), _ = (t, e, i, n) => (Ht(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), D = (t, e, i) => (Ht(t, e, "access private method"), i);
|
|
8
|
+
var Ai;
|
|
9
|
+
typeof window < "u" && ((Ai = window.__svelte ?? (window.__svelte = {})).v ?? (Ai.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const kn = 2, Ii = "[", Ei = "[!", wi = "]", yt = {}, N = /* @__PURE__ */ Symbol(), Hn = "http://www.w3.org/1999/xhtml", Nt = !1;
|
|
11
|
+
var Nn = Array.isArray, Vn = Array.prototype.indexOf, Xe = Array.prototype.includes, Mn = Array.from, Tt = Object.keys, At = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, Fn = Object.prototype, Dn = Array.prototype, Pn = Object.getPrototypeOf, ai = Object.isExtensible;
|
|
12
|
+
const Bn = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function Gn(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
var t, e, i = new Promise((n,
|
|
20
|
-
t = n, e =
|
|
18
|
+
function jn() {
|
|
19
|
+
var t, e, i = new Promise((n, s) => {
|
|
20
|
+
t = n, e = s;
|
|
21
21
|
});
|
|
22
22
|
return { promise: i, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const H = 2, nt = 4, Si = 8, $i = 1 << 24, be = 16, _e = 32, Ce = 64, Vt = 128, x = 512, V = 1024, F = 2048, te = 4096, Ie = 8192, Ee = 16384, Qe = 32768, It = 65536, ci = 1 << 17, Ci = 1 << 18, Je = 1 << 19, qn = 1 << 20, De = 65536, Mt = 1 << 21, Li = 1 << 22, st = 1 << 23, gt = /* @__PURE__ */ Symbol("$state"), Kn = /* @__PURE__ */ Symbol("legacy props"), Wt = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
f(this, "name", "StaleReactionError");
|
|
28
28
|
f(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
31
|
-
function
|
|
30
|
+
}(), Qt = 8;
|
|
31
|
+
function zn(t) {
|
|
32
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Yn(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Un() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function xn(t) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Xn() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Wn() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Qn() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Jn() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Zn() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function es() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Ri(t) {
|
|
62
62
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ts() {
|
|
65
65
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
66
66
|
}
|
|
67
|
-
let
|
|
68
|
-
function
|
|
69
|
-
|
|
67
|
+
let J = !1;
|
|
68
|
+
function ft(t) {
|
|
69
|
+
J = t;
|
|
70
70
|
}
|
|
71
|
-
let
|
|
72
|
-
function
|
|
71
|
+
let B;
|
|
72
|
+
function rt(t) {
|
|
73
73
|
if (t === null)
|
|
74
|
-
throw
|
|
75
|
-
return
|
|
74
|
+
throw Ri(), yt;
|
|
75
|
+
return B = t;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function Oi() {
|
|
78
|
+
return rt(/* @__PURE__ */ Ze(B));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
if (
|
|
82
|
-
for (var e = t, i =
|
|
80
|
+
function is(t = 1) {
|
|
81
|
+
if (J) {
|
|
82
|
+
for (var e = t, i = B; e--; )
|
|
83
83
|
i = /** @type {TemplateNode} */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
84
|
+
/* @__PURE__ */ Ze(i);
|
|
85
|
+
B = i;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
for (var e = 0, i =
|
|
90
|
-
if (i.nodeType ===
|
|
88
|
+
function ns(t = !0) {
|
|
89
|
+
for (var e = 0, i = B; ; ) {
|
|
90
|
+
if (i.nodeType === Qt) {
|
|
91
91
|
var n = (
|
|
92
92
|
/** @type {Comment} */
|
|
93
93
|
i.data
|
|
94
94
|
);
|
|
95
|
-
if (n ===
|
|
95
|
+
if (n === wi) {
|
|
96
96
|
if (e === 0) return i;
|
|
97
97
|
e -= 1;
|
|
98
|
-
} else (n ===
|
|
98
|
+
} else (n === Ii || n === Ei || // "[1", "[2", etc. for if blocks
|
|
99
99
|
n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
|
|
100
100
|
}
|
|
101
|
-
var
|
|
101
|
+
var s = (
|
|
102
102
|
/** @type {TemplateNode} */
|
|
103
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ Ze(i)
|
|
104
104
|
);
|
|
105
|
-
t && i.remove(), i =
|
|
105
|
+
t && i.remove(), i = s;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ki(t) {
|
|
109
109
|
return t === this.v;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function ss(t, e) {
|
|
112
112
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return !
|
|
114
|
+
function rs(t) {
|
|
115
|
+
return !ss(t, this.v);
|
|
116
116
|
}
|
|
117
|
-
let
|
|
118
|
-
function
|
|
119
|
-
|
|
117
|
+
let os = !1, W = null;
|
|
118
|
+
function Et(t) {
|
|
119
|
+
W = t;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
p:
|
|
121
|
+
function Hi(t, e = !1, i) {
|
|
122
|
+
W = {
|
|
123
|
+
p: W,
|
|
124
124
|
i: !1,
|
|
125
125
|
c: null,
|
|
126
126
|
e: null,
|
|
@@ -129,52 +129,52 @@ function Ii(t, e = !1, i) {
|
|
|
129
129
|
l: null
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Ni(t) {
|
|
133
133
|
var e = (
|
|
134
134
|
/** @type {ComponentContext} */
|
|
135
|
-
|
|
135
|
+
W
|
|
136
136
|
), i = e.e;
|
|
137
137
|
if (i !== null) {
|
|
138
138
|
e.e = null;
|
|
139
139
|
for (var n of i)
|
|
140
|
-
|
|
140
|
+
ln(n);
|
|
141
141
|
}
|
|
142
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
142
|
+
return t !== void 0 && (e.x = t), e.i = !0, W = e.p, t ?? /** @type {T} */
|
|
143
143
|
{};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Vi() {
|
|
146
146
|
return !0;
|
|
147
147
|
}
|
|
148
|
-
let
|
|
149
|
-
function
|
|
150
|
-
var t =
|
|
151
|
-
|
|
148
|
+
let Re = [];
|
|
149
|
+
function Mi() {
|
|
150
|
+
var t = Re;
|
|
151
|
+
Re = [], Gn(t);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (
|
|
155
|
-
var e =
|
|
153
|
+
function Me(t) {
|
|
154
|
+
if (Re.length === 0 && !tt) {
|
|
155
|
+
var e = Re;
|
|
156
156
|
queueMicrotask(() => {
|
|
157
|
-
e ===
|
|
157
|
+
e === Re && Mi();
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
Re.push(t);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
for (;
|
|
164
|
-
|
|
162
|
+
function ls() {
|
|
163
|
+
for (; Re.length > 0; )
|
|
164
|
+
Mi();
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
var e =
|
|
166
|
+
function Fi(t) {
|
|
167
|
+
var e = E;
|
|
168
168
|
if (e === null)
|
|
169
|
-
return
|
|
170
|
-
if ((e.f &
|
|
169
|
+
return y.f |= st, t;
|
|
170
|
+
if ((e.f & Qe) === 0 && (e.f & nt) === 0)
|
|
171
171
|
throw t;
|
|
172
172
|
wt(t, e);
|
|
173
173
|
}
|
|
174
174
|
function wt(t, e) {
|
|
175
175
|
for (; e !== null; ) {
|
|
176
|
-
if ((e.f &
|
|
177
|
-
if ((e.f &
|
|
176
|
+
if ((e.f & Vt) !== 0) {
|
|
177
|
+
if ((e.f & Qe) === 0)
|
|
178
178
|
throw t;
|
|
179
179
|
try {
|
|
180
180
|
e.b.error(t);
|
|
@@ -187,30 +187,30 @@ function wt(t, e) {
|
|
|
187
187
|
}
|
|
188
188
|
throw t;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
function
|
|
192
|
-
t.f = t.f &
|
|
190
|
+
const as = -7169;
|
|
191
|
+
function R(t, e) {
|
|
192
|
+
t.f = t.f & as | e;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
(t.f &
|
|
194
|
+
function Jt(t) {
|
|
195
|
+
(t.f & x) !== 0 || t.deps === null ? R(t, V) : R(t, te);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Di(t) {
|
|
198
198
|
if (t !== null)
|
|
199
199
|
for (const e of t)
|
|
200
|
-
(e.f &
|
|
200
|
+
(e.f & H) === 0 || (e.f & De) === 0 || (e.f ^= De, Di(
|
|
201
201
|
/** @type {Derived} */
|
|
202
202
|
e.deps
|
|
203
203
|
));
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
(t.f &
|
|
205
|
+
function Pi(t, e, i) {
|
|
206
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & te) !== 0 && i.add(t), Di(t.deps), R(t, V);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
-
var
|
|
211
|
-
const
|
|
208
|
+
const dt = /* @__PURE__ */ new Set();
|
|
209
|
+
let k = null, Q = null, G = [], Ct = null, Ft = !1, tt = !1;
|
|
210
|
+
var je, qe, ke, Ke, lt, at, He, de, ze, ae, Dt, Pt, Bi;
|
|
211
|
+
const ri = class ri {
|
|
212
212
|
constructor() {
|
|
213
|
-
|
|
213
|
+
A(this, ae);
|
|
214
214
|
f(this, "committed", !1);
|
|
215
215
|
/**
|
|
216
216
|
* The current values of any sources that are updated in this batch
|
|
@@ -229,36 +229,36 @@ const Jt = class Jt {
|
|
|
229
229
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
230
230
|
* @type {Set<() => void>}
|
|
231
231
|
*/
|
|
232
|
-
|
|
232
|
+
A(this, je, /* @__PURE__ */ new Set());
|
|
233
233
|
/**
|
|
234
234
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
235
235
|
* @type {Set<(batch: Batch) => void>}
|
|
236
236
|
*/
|
|
237
|
-
|
|
237
|
+
A(this, qe, /* @__PURE__ */ new Set());
|
|
238
238
|
/**
|
|
239
239
|
* The number of async effects that are currently in flight
|
|
240
240
|
*/
|
|
241
|
-
|
|
241
|
+
A(this, ke, 0);
|
|
242
242
|
/**
|
|
243
243
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
244
244
|
*/
|
|
245
|
-
|
|
245
|
+
A(this, Ke, 0);
|
|
246
246
|
/**
|
|
247
247
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
248
248
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
249
249
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
250
250
|
*/
|
|
251
|
-
|
|
251
|
+
A(this, lt, null);
|
|
252
252
|
/**
|
|
253
253
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
254
254
|
* @type {Set<Effect>}
|
|
255
255
|
*/
|
|
256
|
-
|
|
256
|
+
A(this, at, /* @__PURE__ */ new Set());
|
|
257
257
|
/**
|
|
258
258
|
* Deferred effects that are MAYBE_DIRTY
|
|
259
259
|
* @type {Set<Effect>}
|
|
260
260
|
*/
|
|
261
|
-
|
|
261
|
+
A(this, He, /* @__PURE__ */ new Set());
|
|
262
262
|
/**
|
|
263
263
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
264
264
|
* is committed — we skip over these during `process`.
|
|
@@ -266,19 +266,19 @@ const Jt = class Jt {
|
|
|
266
266
|
* so they can be rescheduled if the branch survives.
|
|
267
267
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
268
268
|
*/
|
|
269
|
-
|
|
269
|
+
A(this, de, /* @__PURE__ */ new Map());
|
|
270
270
|
f(this, "is_fork", !1);
|
|
271
|
-
|
|
271
|
+
A(this, ze, !1);
|
|
272
272
|
}
|
|
273
273
|
is_deferred() {
|
|
274
|
-
return this.is_fork || c(this,
|
|
274
|
+
return this.is_fork || c(this, Ke) > 0;
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* Add an effect to the #skipped_branches map and reset its children
|
|
278
278
|
* @param {Effect} effect
|
|
279
279
|
*/
|
|
280
280
|
skip_effect(e) {
|
|
281
|
-
c(this,
|
|
281
|
+
c(this, de).has(e) || c(this, de).set(e, { d: [], m: [] });
|
|
282
282
|
}
|
|
283
283
|
/**
|
|
284
284
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -286,13 +286,13 @@ const Jt = class Jt {
|
|
|
286
286
|
* @param {Effect} effect
|
|
287
287
|
*/
|
|
288
288
|
unskip_effect(e) {
|
|
289
|
-
var i = c(this,
|
|
289
|
+
var i = c(this, de).get(e);
|
|
290
290
|
if (i) {
|
|
291
|
-
c(this,
|
|
291
|
+
c(this, de).delete(e);
|
|
292
292
|
for (var n of i.d)
|
|
293
|
-
|
|
293
|
+
R(n, F), oe(n);
|
|
294
294
|
for (n of i.m)
|
|
295
|
-
|
|
295
|
+
R(n, te), oe(n);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
@@ -300,19 +300,19 @@ const Jt = class Jt {
|
|
|
300
300
|
* @param {Effect[]} root_effects
|
|
301
301
|
*/
|
|
302
302
|
process(e) {
|
|
303
|
-
|
|
303
|
+
G = [], this.apply();
|
|
304
304
|
var i = [], n = [];
|
|
305
|
-
for (const
|
|
306
|
-
|
|
305
|
+
for (const s of e)
|
|
306
|
+
D(this, ae, Dt).call(this, s, i, n);
|
|
307
307
|
if (this.is_deferred()) {
|
|
308
|
-
|
|
309
|
-
for (const [
|
|
310
|
-
|
|
308
|
+
D(this, ae, Pt).call(this, n), D(this, ae, Pt).call(this, i);
|
|
309
|
+
for (const [s, r] of c(this, de))
|
|
310
|
+
Ki(s, r);
|
|
311
311
|
} else {
|
|
312
|
-
for (const
|
|
313
|
-
c(this,
|
|
312
|
+
for (const s of c(this, je)) s();
|
|
313
|
+
c(this, je).clear(), c(this, ke) === 0 && D(this, ae, Bi).call(this), k = null, ui(n), ui(i), c(this, lt)?.resolve();
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
Q = null;
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
318
318
|
* Associate a change to a given source with the current
|
|
@@ -321,318 +321,318 @@ const Jt = class Jt {
|
|
|
321
321
|
* @param {any} value
|
|
322
322
|
*/
|
|
323
323
|
capture(e, i) {
|
|
324
|
-
i !==
|
|
324
|
+
i !== N && !this.previous.has(e) && this.previous.set(e, i), (e.f & st) === 0 && (this.current.set(e, e.v), Q?.set(e, e.v));
|
|
325
325
|
}
|
|
326
326
|
activate() {
|
|
327
|
-
|
|
327
|
+
k = this, this.apply();
|
|
328
328
|
}
|
|
329
329
|
deactivate() {
|
|
330
|
-
|
|
330
|
+
k === this && (k = null, Q = null);
|
|
331
331
|
}
|
|
332
332
|
flush() {
|
|
333
|
-
if (this.activate(),
|
|
334
|
-
if (
|
|
333
|
+
if (this.activate(), G.length > 0) {
|
|
334
|
+
if (Gi(), k !== null && k !== this)
|
|
335
335
|
return;
|
|
336
|
-
} else c(this,
|
|
336
|
+
} else c(this, ke) === 0 && this.process([]);
|
|
337
337
|
this.deactivate();
|
|
338
338
|
}
|
|
339
339
|
discard() {
|
|
340
|
-
for (const e of c(this,
|
|
341
|
-
c(this,
|
|
340
|
+
for (const e of c(this, qe)) e(this);
|
|
341
|
+
c(this, qe).clear();
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
344
|
*
|
|
345
345
|
* @param {boolean} blocking
|
|
346
346
|
*/
|
|
347
347
|
increment(e) {
|
|
348
|
-
|
|
348
|
+
_(this, ke, c(this, ke) + 1), e && _(this, Ke, c(this, Ke) + 1);
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
*
|
|
352
352
|
* @param {boolean} blocking
|
|
353
353
|
*/
|
|
354
354
|
decrement(e) {
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
_(this, ke, c(this, ke) - 1), e && _(this, Ke, c(this, Ke) - 1), !c(this, ze) && (_(this, ze, !0), Me(() => {
|
|
356
|
+
_(this, ze, !1), this.is_deferred() ? G.length > 0 && this.flush() : this.revive();
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
359
359
|
revive() {
|
|
360
|
-
for (const e of c(this,
|
|
361
|
-
c(this,
|
|
362
|
-
for (const e of c(this,
|
|
363
|
-
|
|
360
|
+
for (const e of c(this, at))
|
|
361
|
+
c(this, He).delete(e), R(e, F), oe(e);
|
|
362
|
+
for (const e of c(this, He))
|
|
363
|
+
R(e, te), oe(e);
|
|
364
364
|
this.flush();
|
|
365
365
|
}
|
|
366
366
|
/** @param {() => void} fn */
|
|
367
367
|
oncommit(e) {
|
|
368
|
-
c(this,
|
|
368
|
+
c(this, je).add(e);
|
|
369
369
|
}
|
|
370
370
|
/** @param {(batch: Batch) => void} fn */
|
|
371
371
|
ondiscard(e) {
|
|
372
|
-
c(this,
|
|
372
|
+
c(this, qe).add(e);
|
|
373
373
|
}
|
|
374
374
|
settled() {
|
|
375
|
-
return (c(this,
|
|
375
|
+
return (c(this, lt) ?? _(this, lt, jn())).promise;
|
|
376
376
|
}
|
|
377
377
|
static ensure() {
|
|
378
|
-
if (
|
|
379
|
-
const e =
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
if (k === null) {
|
|
379
|
+
const e = k = new ri();
|
|
380
|
+
dt.add(k), tt || Me(() => {
|
|
381
|
+
k === e && e.flush();
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
return
|
|
384
|
+
return k;
|
|
385
385
|
}
|
|
386
386
|
apply() {
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
je = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Ke = new WeakMap(), lt = new WeakMap(), at = new WeakMap(), He = new WeakMap(), de = new WeakMap(), ze = new WeakMap(), ae = new WeakSet(), /**
|
|
390
390
|
* Traverse the effect tree, executing effects or stashing
|
|
391
391
|
* them for later execution as appropriate
|
|
392
392
|
* @param {Effect} root
|
|
393
393
|
* @param {Effect[]} effects
|
|
394
394
|
* @param {Effect[]} render_effects
|
|
395
395
|
*/
|
|
396
|
-
|
|
397
|
-
e.f ^=
|
|
398
|
-
for (var
|
|
399
|
-
var o =
|
|
400
|
-
if (!u &&
|
|
401
|
-
l ?
|
|
402
|
-
var d =
|
|
396
|
+
Dt = function(e, i, n) {
|
|
397
|
+
e.f ^= V;
|
|
398
|
+
for (var s = e.first, r = null; s !== null; ) {
|
|
399
|
+
var o = s.f, l = (o & (_e | Ce)) !== 0, a = l && (o & V) !== 0, u = a || (o & Ie) !== 0 || c(this, de).has(s);
|
|
400
|
+
if (!u && s.fn !== null) {
|
|
401
|
+
l ? s.f ^= V : r !== null && (o & (nt | Si | $i)) !== 0 ? r.b.defer_effect(s) : (o & nt) !== 0 ? i.push(s) : ut(s) && ((o & be) !== 0 && c(this, He).add(s), We(s));
|
|
402
|
+
var d = s.first;
|
|
403
403
|
if (d !== null) {
|
|
404
|
-
|
|
404
|
+
s = d;
|
|
405
405
|
continue;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
for (;
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
412
|
-
|
|
408
|
+
for (; s !== null; ) {
|
|
409
|
+
s === r && (r = null);
|
|
410
|
+
var v = s.next;
|
|
411
|
+
if (v !== null) {
|
|
412
|
+
s = v;
|
|
413
413
|
break;
|
|
414
414
|
}
|
|
415
|
-
|
|
415
|
+
s = s.parent;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
}, /**
|
|
419
419
|
* @param {Effect[]} effects
|
|
420
420
|
*/
|
|
421
|
-
|
|
421
|
+
Pt = function(e) {
|
|
422
422
|
for (var i = 0; i < e.length; i += 1)
|
|
423
|
-
|
|
424
|
-
},
|
|
425
|
-
var
|
|
426
|
-
if (
|
|
423
|
+
Pi(e[i], c(this, at), c(this, He));
|
|
424
|
+
}, Bi = function() {
|
|
425
|
+
var s;
|
|
426
|
+
if (dt.size > 1) {
|
|
427
427
|
this.previous.clear();
|
|
428
|
-
var e =
|
|
429
|
-
for (const
|
|
430
|
-
if (
|
|
428
|
+
var e = Q, i = !0;
|
|
429
|
+
for (const r of dt) {
|
|
430
|
+
if (r === this) {
|
|
431
431
|
i = !1;
|
|
432
432
|
continue;
|
|
433
433
|
}
|
|
434
434
|
const o = [];
|
|
435
435
|
for (const [a, u] of this.current) {
|
|
436
|
-
if (
|
|
437
|
-
if (i && u !==
|
|
438
|
-
|
|
436
|
+
if (r.current.has(a))
|
|
437
|
+
if (i && u !== r.current.get(a))
|
|
438
|
+
r.current.set(a, u);
|
|
439
439
|
else
|
|
440
440
|
continue;
|
|
441
441
|
o.push(a);
|
|
442
442
|
}
|
|
443
443
|
if (o.length === 0)
|
|
444
444
|
continue;
|
|
445
|
-
const l = [...
|
|
445
|
+
const l = [...r.current.keys()].filter((a) => !this.current.has(a));
|
|
446
446
|
if (l.length > 0) {
|
|
447
|
-
var n =
|
|
448
|
-
|
|
447
|
+
var n = G;
|
|
448
|
+
G = [];
|
|
449
449
|
const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
450
450
|
for (const d of o)
|
|
451
|
-
|
|
452
|
-
if (
|
|
453
|
-
|
|
454
|
-
for (const d of
|
|
455
|
-
|
|
456
|
-
|
|
451
|
+
ji(d, l, a, u);
|
|
452
|
+
if (G.length > 0) {
|
|
453
|
+
k = r, r.apply();
|
|
454
|
+
for (const d of G)
|
|
455
|
+
D(s = r, ae, Dt).call(s, d, [], []);
|
|
456
|
+
r.deactivate();
|
|
457
457
|
}
|
|
458
|
-
|
|
458
|
+
G = n;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
k = null, Q = e;
|
|
462
462
|
}
|
|
463
|
-
this.committed = !0,
|
|
463
|
+
this.committed = !0, dt.delete(this);
|
|
464
464
|
};
|
|
465
|
-
let
|
|
466
|
-
function
|
|
467
|
-
var e =
|
|
468
|
-
|
|
465
|
+
let ve = ri;
|
|
466
|
+
function ue(t) {
|
|
467
|
+
var e = tt;
|
|
468
|
+
tt = !0;
|
|
469
469
|
try {
|
|
470
470
|
for (var i; ; ) {
|
|
471
|
-
if (
|
|
472
|
-
return
|
|
471
|
+
if (ls(), G.length === 0 && (k?.flush(), G.length === 0))
|
|
472
|
+
return Ct = null, /** @type {T} */
|
|
473
473
|
i;
|
|
474
|
-
|
|
474
|
+
Gi();
|
|
475
475
|
}
|
|
476
476
|
} finally {
|
|
477
|
-
|
|
477
|
+
tt = e;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
|
|
480
|
+
function Gi() {
|
|
481
|
+
Ft = !0;
|
|
482
482
|
var t = null;
|
|
483
483
|
try {
|
|
484
|
-
for (var e = 0;
|
|
485
|
-
var i =
|
|
484
|
+
for (var e = 0; G.length > 0; ) {
|
|
485
|
+
var i = ve.ensure();
|
|
486
486
|
if (e++ > 1e3) {
|
|
487
|
-
var n,
|
|
488
|
-
|
|
487
|
+
var n, s;
|
|
488
|
+
cs();
|
|
489
489
|
}
|
|
490
|
-
i.process(
|
|
490
|
+
i.process(G), we.clear();
|
|
491
491
|
}
|
|
492
492
|
} finally {
|
|
493
|
-
|
|
493
|
+
G = [], Ft = !1, Ct = null;
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function cs() {
|
|
497
497
|
try {
|
|
498
|
-
|
|
498
|
+
Xn();
|
|
499
499
|
} catch (t) {
|
|
500
|
-
wt(t,
|
|
500
|
+
wt(t, Ct);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
let
|
|
504
|
-
function
|
|
503
|
+
let fe = null;
|
|
504
|
+
function ui(t) {
|
|
505
505
|
var e = t.length;
|
|
506
506
|
if (e !== 0) {
|
|
507
507
|
for (var i = 0; i < e; ) {
|
|
508
508
|
var n = t[i++];
|
|
509
|
-
if ((n.f & (
|
|
509
|
+
if ((n.f & (Ee | Ie)) === 0 && ut(n) && (fe = /* @__PURE__ */ new Set(), We(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && cn(n), fe?.size > 0)) {
|
|
510
510
|
we.clear();
|
|
511
|
-
for (const
|
|
512
|
-
if ((
|
|
513
|
-
const
|
|
514
|
-
let o =
|
|
511
|
+
for (const s of fe) {
|
|
512
|
+
if ((s.f & (Ee | Ie)) !== 0) continue;
|
|
513
|
+
const r = [s];
|
|
514
|
+
let o = s.parent;
|
|
515
515
|
for (; o !== null; )
|
|
516
|
-
|
|
517
|
-
for (let l =
|
|
518
|
-
const a =
|
|
519
|
-
(a.f & (
|
|
516
|
+
fe.has(o) && (fe.delete(o), r.push(o)), o = o.parent;
|
|
517
|
+
for (let l = r.length - 1; l >= 0; l--) {
|
|
518
|
+
const a = r[l];
|
|
519
|
+
(a.f & (Ee | Ie)) === 0 && We(a);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
|
|
522
|
+
fe.clear();
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
|
|
525
|
+
fe = null;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function ji(t, e, i, n) {
|
|
529
529
|
if (!i.has(t) && (i.add(t), t.reactions !== null))
|
|
530
|
-
for (const
|
|
531
|
-
const
|
|
532
|
-
(
|
|
530
|
+
for (const s of t.reactions) {
|
|
531
|
+
const r = s.f;
|
|
532
|
+
(r & H) !== 0 ? ji(
|
|
533
533
|
/** @type {Derived} */
|
|
534
|
-
|
|
534
|
+
s,
|
|
535
535
|
e,
|
|
536
536
|
i,
|
|
537
537
|
n
|
|
538
|
-
) : (
|
|
538
|
+
) : (r & (Li | be)) !== 0 && (r & F) === 0 && qi(s, e, n) && (R(s, F), oe(
|
|
539
539
|
/** @type {Effect} */
|
|
540
|
-
|
|
540
|
+
s
|
|
541
541
|
));
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function qi(t, e, i) {
|
|
545
545
|
const n = i.get(t);
|
|
546
546
|
if (n !== void 0) return n;
|
|
547
547
|
if (t.deps !== null)
|
|
548
|
-
for (const
|
|
549
|
-
if (
|
|
548
|
+
for (const s of t.deps) {
|
|
549
|
+
if (Xe.call(e, s))
|
|
550
550
|
return !0;
|
|
551
|
-
if ((
|
|
551
|
+
if ((s.f & H) !== 0 && qi(
|
|
552
552
|
/** @type {Derived} */
|
|
553
|
-
|
|
553
|
+
s,
|
|
554
554
|
e,
|
|
555
555
|
i
|
|
556
556
|
))
|
|
557
557
|
return i.set(
|
|
558
558
|
/** @type {Derived} */
|
|
559
|
-
|
|
559
|
+
s,
|
|
560
560
|
!0
|
|
561
561
|
), !0;
|
|
562
562
|
}
|
|
563
563
|
return i.set(t, !1), !1;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
for (var e =
|
|
565
|
+
function oe(t) {
|
|
566
|
+
for (var e = Ct = t; e.parent !== null; ) {
|
|
567
567
|
e = e.parent;
|
|
568
568
|
var i = e.f;
|
|
569
|
-
if (
|
|
569
|
+
if (Ft && e === E && (i & be) !== 0 && (i & Ci) === 0)
|
|
570
570
|
return;
|
|
571
|
-
if ((i & (
|
|
572
|
-
if ((i &
|
|
573
|
-
e.f ^=
|
|
571
|
+
if ((i & (Ce | _e)) !== 0) {
|
|
572
|
+
if ((i & V) === 0) return;
|
|
573
|
+
e.f ^= V;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
|
|
576
|
+
G.push(e);
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
if (!((t.f &
|
|
580
|
-
(t.f &
|
|
578
|
+
function Ki(t, e) {
|
|
579
|
+
if (!((t.f & _e) !== 0 && (t.f & V) !== 0)) {
|
|
580
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & te) !== 0 && e.m.push(t), R(t, V);
|
|
581
581
|
for (var i = t.first; i !== null; )
|
|
582
|
-
|
|
582
|
+
Ki(i, e), i = i.next;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
let e = 0, i =
|
|
585
|
+
function us(t) {
|
|
586
|
+
let e = 0, i = Lt(0), n;
|
|
587
587
|
return () => {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
e -= 1, e === 0 && (n?.(), n = void 0,
|
|
588
|
+
ei() && (m(i), ti(() => (e === 0 && (n = ni(() => t(() => it(i)))), e += 1, () => {
|
|
589
|
+
Me(() => {
|
|
590
|
+
e -= 1, e === 0 && (n?.(), n = void 0, it(i));
|
|
591
591
|
});
|
|
592
592
|
})));
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
|
-
var
|
|
596
|
-
function
|
|
597
|
-
new
|
|
595
|
+
var fs = It | Je;
|
|
596
|
+
function ds(t, e, i) {
|
|
597
|
+
new hs(t, e, i);
|
|
598
598
|
}
|
|
599
|
-
var
|
|
600
|
-
class
|
|
599
|
+
var Y, ct, he, Ne, ne, se, K, re, pe, Ve, Ae, Ye, Ue, xe, ge, $t, M, zi, Yi, Bt, mt, Gt;
|
|
600
|
+
class hs {
|
|
601
601
|
/**
|
|
602
602
|
* @param {TemplateNode} node
|
|
603
603
|
* @param {BoundaryProps} props
|
|
604
604
|
* @param {((anchor: Node) => void)} children
|
|
605
605
|
*/
|
|
606
606
|
constructor(e, i, n) {
|
|
607
|
-
|
|
607
|
+
A(this, M);
|
|
608
608
|
/** @type {Boundary | null} */
|
|
609
609
|
f(this, "parent");
|
|
610
610
|
f(this, "is_pending", !1);
|
|
611
611
|
/** @type {TemplateNode} */
|
|
612
|
-
|
|
612
|
+
A(this, Y);
|
|
613
613
|
/** @type {TemplateNode | null} */
|
|
614
|
-
|
|
614
|
+
A(this, ct, J ? B : null);
|
|
615
615
|
/** @type {BoundaryProps} */
|
|
616
|
-
|
|
616
|
+
A(this, he);
|
|
617
617
|
/** @type {((anchor: Node) => void)} */
|
|
618
|
-
|
|
618
|
+
A(this, Ne);
|
|
619
619
|
/** @type {Effect} */
|
|
620
|
-
|
|
620
|
+
A(this, ne);
|
|
621
621
|
/** @type {Effect | null} */
|
|
622
|
-
|
|
622
|
+
A(this, se, null);
|
|
623
623
|
/** @type {Effect | null} */
|
|
624
|
-
|
|
624
|
+
A(this, K, null);
|
|
625
625
|
/** @type {Effect | null} */
|
|
626
|
-
|
|
626
|
+
A(this, re, null);
|
|
627
627
|
/** @type {DocumentFragment | null} */
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
628
|
+
A(this, pe, null);
|
|
629
|
+
A(this, Ve, 0);
|
|
630
|
+
A(this, Ae, 0);
|
|
631
|
+
A(this, Ye, !1);
|
|
632
632
|
/** @type {Set<Effect>} */
|
|
633
|
-
|
|
633
|
+
A(this, Ue, /* @__PURE__ */ new Set());
|
|
634
634
|
/** @type {Set<Effect>} */
|
|
635
|
-
|
|
635
|
+
A(this, xe, /* @__PURE__ */ new Set());
|
|
636
636
|
/**
|
|
637
637
|
* A source containing the number of pending async deriveds/expressions.
|
|
638
638
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -640,34 +640,34 @@ class or {
|
|
|
640
640
|
* calls followed by no-op flushes
|
|
641
641
|
* @type {Source<number> | null}
|
|
642
642
|
*/
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
643
|
+
A(this, ge, null);
|
|
644
|
+
A(this, $t, us(() => (_(this, ge, Lt(c(this, Ve))), () => {
|
|
645
|
+
_(this, ge, null);
|
|
646
646
|
})));
|
|
647
|
-
|
|
648
|
-
var
|
|
647
|
+
_(this, Y, e), _(this, he, i), _(this, Ne, (s) => {
|
|
648
|
+
var r = (
|
|
649
649
|
/** @type {Effect} */
|
|
650
|
-
|
|
650
|
+
E
|
|
651
651
|
);
|
|
652
|
-
|
|
652
|
+
r.b = this, r.f |= Vt, n(s);
|
|
653
653
|
}), this.parent = /** @type {Effect} */
|
|
654
|
-
|
|
655
|
-
if (
|
|
656
|
-
const
|
|
654
|
+
E.b, _(this, ne, ws(() => {
|
|
655
|
+
if (J) {
|
|
656
|
+
const s = (
|
|
657
657
|
/** @type {Comment} */
|
|
658
|
-
c(this,
|
|
658
|
+
c(this, ct)
|
|
659
659
|
);
|
|
660
|
-
|
|
660
|
+
Oi(), s.data === Ei ? D(this, M, Yi).call(this) : D(this, M, zi).call(this);
|
|
661
661
|
} else
|
|
662
|
-
|
|
663
|
-
},
|
|
662
|
+
D(this, M, Bt).call(this);
|
|
663
|
+
}, fs)), J && _(this, Y, B);
|
|
664
664
|
}
|
|
665
665
|
/**
|
|
666
666
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
667
667
|
* @param {Effect} effect
|
|
668
668
|
*/
|
|
669
669
|
defer_effect(e) {
|
|
670
|
-
|
|
670
|
+
Pi(e, c(this, Ue), c(this, xe));
|
|
671
671
|
}
|
|
672
672
|
/**
|
|
673
673
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -677,7 +677,7 @@ class or {
|
|
|
677
677
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
678
678
|
}
|
|
679
679
|
has_pending_snippet() {
|
|
680
|
-
return !!c(this,
|
|
680
|
+
return !!c(this, he).pending;
|
|
681
681
|
}
|
|
682
682
|
/**
|
|
683
683
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -686,54 +686,54 @@ class or {
|
|
|
686
686
|
* @param {1 | -1} d
|
|
687
687
|
*/
|
|
688
688
|
update_pending_count(e) {
|
|
689
|
-
|
|
690
|
-
|
|
689
|
+
D(this, M, Gt).call(this, e), _(this, Ve, c(this, Ve) + e), !(!c(this, ge) || c(this, Ye)) && (_(this, Ye, !0), Me(() => {
|
|
690
|
+
_(this, Ye, !1), c(this, ge) && Qi(c(this, ge), c(this, Ve));
|
|
691
691
|
}));
|
|
692
692
|
}
|
|
693
693
|
get_effect_pending() {
|
|
694
|
-
return c(this,
|
|
694
|
+
return c(this, $t).call(this), m(
|
|
695
695
|
/** @type {Source<number>} */
|
|
696
|
-
c(this,
|
|
696
|
+
c(this, ge)
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
699
|
/** @param {unknown} error */
|
|
700
700
|
error(e) {
|
|
701
|
-
var i = c(this,
|
|
702
|
-
let n = c(this,
|
|
701
|
+
var i = c(this, he).onerror;
|
|
702
|
+
let n = c(this, he).failed;
|
|
703
703
|
if (!i && !n)
|
|
704
704
|
throw e;
|
|
705
|
-
c(this,
|
|
705
|
+
c(this, se) && (ee(c(this, se)), _(this, se, null)), c(this, K) && (ee(c(this, K)), _(this, K, null)), c(this, re) && (ee(c(this, re)), _(this, re, null)), J && (rt(
|
|
706
706
|
/** @type {TemplateNode} */
|
|
707
|
-
c(this,
|
|
708
|
-
),
|
|
709
|
-
var
|
|
707
|
+
c(this, ct)
|
|
708
|
+
), is(), rt(ns()));
|
|
709
|
+
var s = !1, r = !1;
|
|
710
710
|
const o = () => {
|
|
711
|
-
if (
|
|
712
|
-
|
|
711
|
+
if (s) {
|
|
712
|
+
ts();
|
|
713
713
|
return;
|
|
714
714
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}),
|
|
718
|
-
|
|
715
|
+
s = !0, r && es(), c(this, re) !== null && vt(c(this, re), () => {
|
|
716
|
+
_(this, re, null);
|
|
717
|
+
}), D(this, M, mt).call(this, () => {
|
|
718
|
+
ve.ensure(), D(this, M, Bt).call(this);
|
|
719
719
|
});
|
|
720
720
|
};
|
|
721
|
-
|
|
721
|
+
Me(() => {
|
|
722
722
|
try {
|
|
723
|
-
|
|
723
|
+
r = !0, i?.(e, o), r = !1;
|
|
724
724
|
} catch (l) {
|
|
725
|
-
wt(l, c(this,
|
|
725
|
+
wt(l, c(this, ne) && c(this, ne).parent);
|
|
726
726
|
}
|
|
727
|
-
n &&
|
|
728
|
-
|
|
727
|
+
n && _(this, re, D(this, M, mt).call(this, () => {
|
|
728
|
+
ve.ensure();
|
|
729
729
|
try {
|
|
730
|
-
return
|
|
730
|
+
return Be(() => {
|
|
731
731
|
var l = (
|
|
732
732
|
/** @type {Effect} */
|
|
733
|
-
|
|
733
|
+
E
|
|
734
734
|
);
|
|
735
|
-
l.b = this, l.f |=
|
|
736
|
-
c(this,
|
|
735
|
+
l.b = this, l.f |= Vt, n(
|
|
736
|
+
c(this, Y),
|
|
737
737
|
() => e,
|
|
738
738
|
() => o
|
|
739
739
|
);
|
|
@@ -742,43 +742,43 @@ class or {
|
|
|
742
742
|
return wt(
|
|
743
743
|
l,
|
|
744
744
|
/** @type {Effect} */
|
|
745
|
-
c(this,
|
|
745
|
+
c(this, ne).parent
|
|
746
746
|
), null;
|
|
747
747
|
}
|
|
748
748
|
}));
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
|
|
752
|
+
Y = new WeakMap(), ct = new WeakMap(), he = new WeakMap(), Ne = new WeakMap(), ne = new WeakMap(), se = new WeakMap(), K = new WeakMap(), re = new WeakMap(), pe = new WeakMap(), Ve = new WeakMap(), Ae = new WeakMap(), Ye = new WeakMap(), Ue = new WeakMap(), xe = new WeakMap(), ge = new WeakMap(), $t = new WeakMap(), M = new WeakSet(), zi = function() {
|
|
753
753
|
try {
|
|
754
|
-
|
|
754
|
+
_(this, se, Be(() => c(this, Ne).call(this, c(this, Y))));
|
|
755
755
|
} catch (e) {
|
|
756
756
|
this.error(e);
|
|
757
757
|
}
|
|
758
|
-
},
|
|
759
|
-
const e = c(this,
|
|
760
|
-
e && (this.is_pending = !0,
|
|
761
|
-
var i =
|
|
762
|
-
i.append(n),
|
|
758
|
+
}, Yi = function() {
|
|
759
|
+
const e = c(this, he).pending;
|
|
760
|
+
e && (this.is_pending = !0, _(this, K, Be(() => e(c(this, Y)))), Me(() => {
|
|
761
|
+
var i = _(this, pe, document.createDocumentFragment()), n = nn();
|
|
762
|
+
i.append(n), _(this, se, D(this, M, mt).call(this, () => (ve.ensure(), Be(() => c(this, Ne).call(this, n))))), c(this, Ae) === 0 && (c(this, Y).before(i), _(this, pe, null), vt(
|
|
763
763
|
/** @type {Effect} */
|
|
764
|
-
c(this,
|
|
764
|
+
c(this, K),
|
|
765
765
|
() => {
|
|
766
|
-
|
|
766
|
+
_(this, K, null);
|
|
767
767
|
}
|
|
768
768
|
), this.is_pending = !1);
|
|
769
769
|
}));
|
|
770
|
-
},
|
|
770
|
+
}, Bt = function() {
|
|
771
771
|
try {
|
|
772
|
-
if (this.is_pending = this.has_pending_snippet(),
|
|
773
|
-
c(this,
|
|
774
|
-
})), c(this,
|
|
775
|
-
var e =
|
|
776
|
-
|
|
772
|
+
if (this.is_pending = this.has_pending_snippet(), _(this, Ae, 0), _(this, Ve, 0), _(this, se, Be(() => {
|
|
773
|
+
c(this, Ne).call(this, c(this, Y));
|
|
774
|
+
})), c(this, Ae) > 0) {
|
|
775
|
+
var e = _(this, pe, document.createDocumentFragment());
|
|
776
|
+
Cs(c(this, se), e);
|
|
777
777
|
const i = (
|
|
778
778
|
/** @type {(anchor: Node) => void} */
|
|
779
|
-
c(this,
|
|
779
|
+
c(this, he).pending
|
|
780
780
|
);
|
|
781
|
-
|
|
781
|
+
_(this, K, Be(() => i(c(this, Y))));
|
|
782
782
|
} else
|
|
783
783
|
this.is_pending = !1;
|
|
784
784
|
} catch (i) {
|
|
@@ -788,82 +788,82 @@ H = new WeakMap(), st = new WeakMap(), ue = new WeakMap(), Re = new WeakMap(), e
|
|
|
788
788
|
* @template T
|
|
789
789
|
* @param {() => T} fn
|
|
790
790
|
*/
|
|
791
|
-
|
|
792
|
-
var i =
|
|
793
|
-
|
|
791
|
+
mt = function(e) {
|
|
792
|
+
var i = E, n = y, s = W;
|
|
793
|
+
$e(c(this, ne)), le(c(this, ne)), Et(c(this, ne).ctx);
|
|
794
794
|
try {
|
|
795
795
|
return e();
|
|
796
|
-
} catch (
|
|
797
|
-
return
|
|
796
|
+
} catch (r) {
|
|
797
|
+
return Fi(r), null;
|
|
798
798
|
} finally {
|
|
799
|
-
|
|
799
|
+
$e(i), le(n), Et(s);
|
|
800
800
|
}
|
|
801
801
|
}, /**
|
|
802
802
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
803
803
|
* if any, such that we can replace the snippet with content once work is done
|
|
804
804
|
* @param {1 | -1} d
|
|
805
805
|
*/
|
|
806
|
-
|
|
806
|
+
Gt = function(e) {
|
|
807
807
|
var i;
|
|
808
808
|
if (!this.has_pending_snippet()) {
|
|
809
|
-
this.parent &&
|
|
809
|
+
this.parent && D(i = this.parent, M, Gt).call(i, e);
|
|
810
810
|
return;
|
|
811
811
|
}
|
|
812
|
-
if (
|
|
812
|
+
if (_(this, Ae, c(this, Ae) + e), c(this, Ae) === 0) {
|
|
813
813
|
this.is_pending = !1;
|
|
814
|
-
for (const n of c(this,
|
|
815
|
-
|
|
816
|
-
for (const n of c(this,
|
|
817
|
-
|
|
818
|
-
c(this,
|
|
819
|
-
|
|
820
|
-
}), c(this,
|
|
814
|
+
for (const n of c(this, Ue))
|
|
815
|
+
R(n, F), oe(n);
|
|
816
|
+
for (const n of c(this, xe))
|
|
817
|
+
R(n, te), oe(n);
|
|
818
|
+
c(this, Ue).clear(), c(this, xe).clear(), c(this, K) && vt(c(this, K), () => {
|
|
819
|
+
_(this, K, null);
|
|
820
|
+
}), c(this, pe) && (c(this, Y).before(c(this, pe)), _(this, pe, null));
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
823
|
// @__NO_SIDE_EFFECTS__
|
|
824
|
-
function
|
|
825
|
-
var e =
|
|
824
|
+
function Ui(t) {
|
|
825
|
+
var e = H | F, i = y !== null && (y.f & H) !== 0 ? (
|
|
826
826
|
/** @type {Derived} */
|
|
827
|
-
|
|
827
|
+
y
|
|
828
828
|
) : null;
|
|
829
|
-
return
|
|
830
|
-
ctx:
|
|
829
|
+
return E !== null && (E.f |= Je), {
|
|
830
|
+
ctx: W,
|
|
831
831
|
deps: null,
|
|
832
832
|
effects: null,
|
|
833
|
-
equals:
|
|
833
|
+
equals: ki,
|
|
834
834
|
f: e,
|
|
835
835
|
fn: t,
|
|
836
836
|
reactions: null,
|
|
837
837
|
rv: 0,
|
|
838
838
|
v: (
|
|
839
839
|
/** @type {V} */
|
|
840
|
-
|
|
840
|
+
N
|
|
841
841
|
),
|
|
842
842
|
wv: 0,
|
|
843
|
-
parent: i ??
|
|
843
|
+
parent: i ?? E,
|
|
844
844
|
ac: null
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
847
|
// @__NO_SIDE_EFFECTS__
|
|
848
|
-
function
|
|
849
|
-
const e = /* @__PURE__ */
|
|
850
|
-
return
|
|
848
|
+
function fi(t) {
|
|
849
|
+
const e = /* @__PURE__ */ Ui(t);
|
|
850
|
+
return fn(e), e;
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function ps(t) {
|
|
853
853
|
var e = t.effects;
|
|
854
854
|
if (e !== null) {
|
|
855
855
|
t.effects = null;
|
|
856
856
|
for (var i = 0; i < e.length; i += 1)
|
|
857
|
-
|
|
857
|
+
ee(
|
|
858
858
|
/** @type {Effect} */
|
|
859
859
|
e[i]
|
|
860
860
|
);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function gs(t) {
|
|
864
864
|
for (var e = t.parent; e !== null; ) {
|
|
865
|
-
if ((e.f &
|
|
866
|
-
return (e.f &
|
|
865
|
+
if ((e.f & H) === 0)
|
|
866
|
+
return (e.f & Ee) === 0 ? (
|
|
867
867
|
/** @type {Effect} */
|
|
868
868
|
e
|
|
869
869
|
) : null;
|
|
@@ -871,126 +871,126 @@ function ar(t) {
|
|
|
871
871
|
}
|
|
872
872
|
return null;
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
var e, i =
|
|
876
|
-
|
|
874
|
+
function Zt(t) {
|
|
875
|
+
var e, i = E;
|
|
876
|
+
$e(gs(t));
|
|
877
877
|
try {
|
|
878
|
-
t.f &= ~
|
|
878
|
+
t.f &= ~De, ps(t), e = gn(t);
|
|
879
879
|
} finally {
|
|
880
|
-
|
|
880
|
+
$e(i);
|
|
881
881
|
}
|
|
882
882
|
return e;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
var e =
|
|
886
|
-
if (!t.equals(e) && (t.wv =
|
|
887
|
-
|
|
884
|
+
function xi(t) {
|
|
885
|
+
var e = Zt(t);
|
|
886
|
+
if (!t.equals(e) && (t.wv = hn(), (!k?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
887
|
+
R(t, V);
|
|
888
888
|
return;
|
|
889
889
|
}
|
|
890
|
-
|
|
890
|
+
Se || (Q !== null ? (ei() || k?.is_fork) && Q.set(t, e) : Jt(t));
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function ms(t) {
|
|
893
893
|
if (t.effects !== null)
|
|
894
894
|
for (const e of t.effects)
|
|
895
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
895
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Wt), e.teardown = Bn, e.ac = null, ot(e, 0), ii(e));
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Xi(t) {
|
|
898
898
|
if (t.effects !== null)
|
|
899
899
|
for (const e of t.effects)
|
|
900
|
-
e.teardown &&
|
|
900
|
+
e.teardown && We(e);
|
|
901
901
|
}
|
|
902
|
-
let
|
|
902
|
+
let jt = /* @__PURE__ */ new Set();
|
|
903
903
|
const we = /* @__PURE__ */ new Map();
|
|
904
|
-
let
|
|
905
|
-
function
|
|
904
|
+
let Wi = !1;
|
|
905
|
+
function Lt(t, e) {
|
|
906
906
|
var i = {
|
|
907
907
|
f: 0,
|
|
908
908
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
909
909
|
v: t,
|
|
910
910
|
reactions: null,
|
|
911
|
-
equals:
|
|
911
|
+
equals: ki,
|
|
912
912
|
rv: 0,
|
|
913
913
|
wv: 0
|
|
914
914
|
};
|
|
915
915
|
return i;
|
|
916
916
|
}
|
|
917
917
|
// @__NO_SIDE_EFFECTS__
|
|
918
|
-
function
|
|
919
|
-
const i =
|
|
920
|
-
return
|
|
918
|
+
function P(t, e) {
|
|
919
|
+
const i = Lt(t);
|
|
920
|
+
return fn(i), i;
|
|
921
921
|
}
|
|
922
922
|
// @__NO_SIDE_EFFECTS__
|
|
923
|
-
function
|
|
924
|
-
const n =
|
|
925
|
-
return e || (n.equals =
|
|
923
|
+
function vs(t, e = !1, i = !0) {
|
|
924
|
+
const n = Lt(t);
|
|
925
|
+
return e || (n.equals = rs), n;
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
|
|
927
|
+
function $(t, e, i = !1) {
|
|
928
|
+
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
929
929
|
// to ensure we error if state is set inside an inspect effect
|
|
930
|
-
(!
|
|
931
|
-
let n = i ?
|
|
932
|
-
return
|
|
930
|
+
(!Z || (y.f & ci) !== 0) && Vi() && (y.f & (H | be | Li | ci)) !== 0 && (X === null || !Xe.call(X, t)) && Zn();
|
|
931
|
+
let n = i ? et(e) : e;
|
|
932
|
+
return Qi(t, n);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Qi(t, e) {
|
|
935
935
|
if (!t.equals(e)) {
|
|
936
936
|
var i = t.v;
|
|
937
|
-
|
|
938
|
-
var n =
|
|
939
|
-
if (n.capture(t, i), (t.f &
|
|
940
|
-
const
|
|
937
|
+
Se ? we.set(t, e) : we.set(t, i), t.v = e;
|
|
938
|
+
var n = ve.ensure();
|
|
939
|
+
if (n.capture(t, i), (t.f & H) !== 0) {
|
|
940
|
+
const s = (
|
|
941
941
|
/** @type {Derived} */
|
|
942
942
|
t
|
|
943
943
|
);
|
|
944
|
-
(t.f &
|
|
944
|
+
(t.f & F) !== 0 && Zt(s), Jt(s);
|
|
945
945
|
}
|
|
946
|
-
t.wv =
|
|
946
|
+
t.wv = hn(), Ji(t, F), E !== null && (E.f & V) !== 0 && (E.f & (_e | Ce)) === 0 && (z === null ? Ls([t]) : z.push(t)), !n.is_fork && jt.size > 0 && !Wi && bs();
|
|
947
947
|
}
|
|
948
948
|
return e;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
|
|
952
|
-
for (const t of
|
|
953
|
-
(t.f &
|
|
954
|
-
|
|
950
|
+
function bs() {
|
|
951
|
+
Wi = !1;
|
|
952
|
+
for (const t of jt)
|
|
953
|
+
(t.f & V) !== 0 && R(t, te), ut(t) && We(t);
|
|
954
|
+
jt.clear();
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
|
|
956
|
+
function it(t) {
|
|
957
|
+
$(t, t.v + 1);
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function Ji(t, e) {
|
|
960
960
|
var i = t.reactions;
|
|
961
961
|
if (i !== null)
|
|
962
|
-
for (var n = i.length,
|
|
963
|
-
var
|
|
964
|
-
if (l &&
|
|
962
|
+
for (var n = i.length, s = 0; s < n; s++) {
|
|
963
|
+
var r = i[s], o = r.f, l = (o & F) === 0;
|
|
964
|
+
if (l && R(r, e), (o & H) !== 0) {
|
|
965
965
|
var a = (
|
|
966
966
|
/** @type {Derived} */
|
|
967
|
-
|
|
967
|
+
r
|
|
968
968
|
);
|
|
969
|
-
|
|
970
|
-
} else l && ((o &
|
|
969
|
+
Q?.delete(a), (o & De) === 0 && (o & x && (r.f |= De), Ji(a, te));
|
|
970
|
+
} else l && ((o & be) !== 0 && fe !== null && fe.add(
|
|
971
971
|
/** @type {Effect} */
|
|
972
|
-
|
|
973
|
-
),
|
|
972
|
+
r
|
|
973
|
+
), oe(
|
|
974
974
|
/** @type {Effect} */
|
|
975
|
-
|
|
975
|
+
r
|
|
976
976
|
));
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
if (typeof t != "object" || t === null ||
|
|
979
|
+
function et(t) {
|
|
980
|
+
if (typeof t != "object" || t === null || gt in t)
|
|
981
981
|
return t;
|
|
982
|
-
const e =
|
|
983
|
-
if (e !==
|
|
982
|
+
const e = Pn(t);
|
|
983
|
+
if (e !== Fn && e !== Dn)
|
|
984
984
|
return t;
|
|
985
|
-
var i = /* @__PURE__ */ new Map(), n =
|
|
986
|
-
if (
|
|
985
|
+
var i = /* @__PURE__ */ new Map(), n = Nn(t), s = /* @__PURE__ */ P(0), r = Fe, o = (l) => {
|
|
986
|
+
if (Fe === r)
|
|
987
987
|
return l();
|
|
988
|
-
var a =
|
|
989
|
-
|
|
988
|
+
var a = y, u = Fe;
|
|
989
|
+
le(null), pi(r);
|
|
990
990
|
var d = l();
|
|
991
|
-
return
|
|
991
|
+
return le(a), pi(u), d;
|
|
992
992
|
};
|
|
993
|
-
return n && i.set("length", /* @__PURE__ */
|
|
993
|
+
return n && i.set("length", /* @__PURE__ */ P(
|
|
994
994
|
/** @type {any[]} */
|
|
995
995
|
t.length
|
|
996
996
|
)), new Proxy(
|
|
@@ -998,34 +998,34 @@ function Qe(t) {
|
|
|
998
998
|
t,
|
|
999
999
|
{
|
|
1000
1000
|
defineProperty(l, a, u) {
|
|
1001
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
1001
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Qn();
|
|
1002
1002
|
var d = i.get(a);
|
|
1003
1003
|
return d === void 0 ? o(() => {
|
|
1004
|
-
var
|
|
1005
|
-
return i.set(a,
|
|
1006
|
-
}) :
|
|
1004
|
+
var v = /* @__PURE__ */ P(u.value);
|
|
1005
|
+
return i.set(a, v), v;
|
|
1006
|
+
}) : $(d, u.value, !0), !0;
|
|
1007
1007
|
},
|
|
1008
1008
|
deleteProperty(l, a) {
|
|
1009
1009
|
var u = i.get(a);
|
|
1010
1010
|
if (u === void 0) {
|
|
1011
1011
|
if (a in l) {
|
|
1012
|
-
const d = o(() => /* @__PURE__ */ N
|
|
1013
|
-
i.set(a, d),
|
|
1012
|
+
const d = o(() => /* @__PURE__ */ P(N));
|
|
1013
|
+
i.set(a, d), it(s);
|
|
1014
1014
|
}
|
|
1015
1015
|
} else
|
|
1016
|
-
|
|
1016
|
+
$(u, N), it(s);
|
|
1017
1017
|
return !0;
|
|
1018
1018
|
},
|
|
1019
1019
|
get(l, a, u) {
|
|
1020
|
-
if (a ===
|
|
1020
|
+
if (a === gt)
|
|
1021
1021
|
return t;
|
|
1022
|
-
var d = i.get(a),
|
|
1023
|
-
if (d === void 0 && (!
|
|
1024
|
-
var
|
|
1022
|
+
var d = i.get(a), v = a in l;
|
|
1023
|
+
if (d === void 0 && (!v || Ge(l, a)?.writable) && (d = o(() => {
|
|
1024
|
+
var g = et(v ? l[a] : N), h = /* @__PURE__ */ P(g);
|
|
1025
1025
|
return h;
|
|
1026
1026
|
}), i.set(a, d)), d !== void 0) {
|
|
1027
|
-
var p =
|
|
1028
|
-
return p ===
|
|
1027
|
+
var p = m(d);
|
|
1028
|
+
return p === N ? void 0 : p;
|
|
1029
1029
|
}
|
|
1030
1030
|
return Reflect.get(l, a, u);
|
|
1031
1031
|
},
|
|
@@ -1033,10 +1033,10 @@ function Qe(t) {
|
|
|
1033
1033
|
var u = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1034
1034
|
if (u && "value" in u) {
|
|
1035
1035
|
var d = i.get(a);
|
|
1036
|
-
d && (u.value =
|
|
1036
|
+
d && (u.value = m(d));
|
|
1037
1037
|
} else if (u === void 0) {
|
|
1038
|
-
var
|
|
1039
|
-
if (
|
|
1038
|
+
var v = i.get(a), p = v?.v;
|
|
1039
|
+
if (v !== void 0 && p !== N)
|
|
1040
1040
|
return {
|
|
1041
1041
|
enumerable: !0,
|
|
1042
1042
|
configurable: !0,
|
|
@@ -1047,122 +1047,122 @@ function Qe(t) {
|
|
|
1047
1047
|
return u;
|
|
1048
1048
|
},
|
|
1049
1049
|
has(l, a) {
|
|
1050
|
-
if (a ===
|
|
1050
|
+
if (a === gt)
|
|
1051
1051
|
return !0;
|
|
1052
|
-
var u = i.get(a), d = u !== void 0 && u.v !==
|
|
1053
|
-
if (u !== void 0 ||
|
|
1052
|
+
var u = i.get(a), d = u !== void 0 && u.v !== N || Reflect.has(l, a);
|
|
1053
|
+
if (u !== void 0 || E !== null && (!d || Ge(l, a)?.writable)) {
|
|
1054
1054
|
u === void 0 && (u = o(() => {
|
|
1055
|
-
var p = d ?
|
|
1056
|
-
return
|
|
1055
|
+
var p = d ? et(l[a]) : N, g = /* @__PURE__ */ P(p);
|
|
1056
|
+
return g;
|
|
1057
1057
|
}), i.set(a, u));
|
|
1058
|
-
var
|
|
1059
|
-
if (
|
|
1058
|
+
var v = m(u);
|
|
1059
|
+
if (v === N)
|
|
1060
1060
|
return !1;
|
|
1061
1061
|
}
|
|
1062
1062
|
return d;
|
|
1063
1063
|
},
|
|
1064
1064
|
set(l, a, u, d) {
|
|
1065
|
-
var
|
|
1065
|
+
var v = i.get(a), p = a in l;
|
|
1066
1066
|
if (n && a === "length")
|
|
1067
|
-
for (var
|
|
1068
|
-
|
|
1069
|
-
var h = i.get(
|
|
1070
|
-
h !== void 0 ?
|
|
1067
|
+
for (var g = u; g < /** @type {Source<number>} */
|
|
1068
|
+
v.v; g += 1) {
|
|
1069
|
+
var h = i.get(g + "");
|
|
1070
|
+
h !== void 0 ? $(h, N) : g in l && (h = o(() => /* @__PURE__ */ P(N)), i.set(g + "", h));
|
|
1071
1071
|
}
|
|
1072
|
-
if (
|
|
1073
|
-
(!p ||
|
|
1072
|
+
if (v === void 0)
|
|
1073
|
+
(!p || Ge(l, a)?.writable) && (v = o(() => /* @__PURE__ */ P(void 0)), $(v, et(u)), i.set(a, v));
|
|
1074
1074
|
else {
|
|
1075
|
-
p =
|
|
1076
|
-
var
|
|
1077
|
-
|
|
1075
|
+
p = v.v !== N;
|
|
1076
|
+
var T = o(() => et(u));
|
|
1077
|
+
$(v, T);
|
|
1078
1078
|
}
|
|
1079
|
-
var
|
|
1080
|
-
if (
|
|
1079
|
+
var b = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1080
|
+
if (b?.set && b.set.call(d, u), !p) {
|
|
1081
1081
|
if (n && typeof a == "string") {
|
|
1082
|
-
var
|
|
1082
|
+
var S = (
|
|
1083
1083
|
/** @type {Source<number>} */
|
|
1084
1084
|
i.get("length")
|
|
1085
|
-
),
|
|
1086
|
-
Number.isInteger(
|
|
1085
|
+
), L = Number(a);
|
|
1086
|
+
Number.isInteger(L) && L >= S.v && $(S, L + 1);
|
|
1087
1087
|
}
|
|
1088
|
-
|
|
1088
|
+
it(s);
|
|
1089
1089
|
}
|
|
1090
1090
|
return !0;
|
|
1091
1091
|
},
|
|
1092
1092
|
ownKeys(l) {
|
|
1093
|
-
|
|
1094
|
-
var a = Reflect.ownKeys(l).filter((
|
|
1095
|
-
var p = i.get(
|
|
1096
|
-
return p === void 0 || p.v !==
|
|
1093
|
+
m(s);
|
|
1094
|
+
var a = Reflect.ownKeys(l).filter((v) => {
|
|
1095
|
+
var p = i.get(v);
|
|
1096
|
+
return p === void 0 || p.v !== N;
|
|
1097
1097
|
});
|
|
1098
1098
|
for (var [u, d] of i)
|
|
1099
|
-
d.v !==
|
|
1099
|
+
d.v !== N && !(u in l) && a.push(u);
|
|
1100
1100
|
return a;
|
|
1101
1101
|
},
|
|
1102
1102
|
setPrototypeOf() {
|
|
1103
|
-
|
|
1103
|
+
Jn();
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
);
|
|
1107
1107
|
}
|
|
1108
|
-
var
|
|
1109
|
-
function
|
|
1110
|
-
if (
|
|
1111
|
-
|
|
1108
|
+
var di, Zi, en, tn;
|
|
1109
|
+
function qt() {
|
|
1110
|
+
if (di === void 0) {
|
|
1111
|
+
di = window, Zi = /Firefox/.test(navigator.userAgent);
|
|
1112
1112
|
var t = Element.prototype, e = Node.prototype, i = Text.prototype;
|
|
1113
|
-
|
|
1113
|
+
en = Ge(e, "firstChild").get, tn = Ge(e, "nextSibling").get, ai(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), ai(i) && (i.__t = void 0);
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function nn(t = "") {
|
|
1117
1117
|
return document.createTextNode(t);
|
|
1118
1118
|
}
|
|
1119
1119
|
// @__NO_SIDE_EFFECTS__
|
|
1120
|
-
function
|
|
1120
|
+
function sn(t) {
|
|
1121
1121
|
return (
|
|
1122
1122
|
/** @type {TemplateNode | null} */
|
|
1123
|
-
|
|
1123
|
+
en.call(t)
|
|
1124
1124
|
);
|
|
1125
1125
|
}
|
|
1126
1126
|
// @__NO_SIDE_EFFECTS__
|
|
1127
|
-
function
|
|
1127
|
+
function Ze(t) {
|
|
1128
1128
|
return (
|
|
1129
1129
|
/** @type {TemplateNode | null} */
|
|
1130
|
-
|
|
1130
|
+
tn.call(t)
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function _s(t) {
|
|
1134
1134
|
t.textContent = "";
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function rn(t, e, i) {
|
|
1137
1137
|
return (
|
|
1138
1138
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1139
|
-
document.createElementNS(
|
|
1139
|
+
document.createElementNS(Hn, t, void 0)
|
|
1140
1140
|
);
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
var e =
|
|
1144
|
-
|
|
1142
|
+
function on(t) {
|
|
1143
|
+
var e = y, i = E;
|
|
1144
|
+
le(null), $e(null);
|
|
1145
1145
|
try {
|
|
1146
1146
|
return t();
|
|
1147
1147
|
} finally {
|
|
1148
|
-
|
|
1148
|
+
le(e), $e(i);
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
|
|
1151
|
+
function ys(t) {
|
|
1152
|
+
E === null && (y === null && xn(), Un()), Se && Yn();
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function Ts(t, e) {
|
|
1155
1155
|
var i = e.last;
|
|
1156
1156
|
i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1159
|
-
var n =
|
|
1160
|
-
n !== null && (n.f &
|
|
1161
|
-
var
|
|
1162
|
-
ctx:
|
|
1158
|
+
function Pe(t, e, i) {
|
|
1159
|
+
var n = E;
|
|
1160
|
+
n !== null && (n.f & Ie) !== 0 && (t |= Ie);
|
|
1161
|
+
var s = {
|
|
1162
|
+
ctx: W,
|
|
1163
1163
|
deps: null,
|
|
1164
1164
|
nodes: null,
|
|
1165
|
-
f: t |
|
|
1165
|
+
f: t | F | x,
|
|
1166
1166
|
first: null,
|
|
1167
1167
|
fn: e,
|
|
1168
1168
|
last: null,
|
|
@@ -1176,498 +1176,498 @@ function Me(t, e, i) {
|
|
|
1176
1176
|
};
|
|
1177
1177
|
if (i)
|
|
1178
1178
|
try {
|
|
1179
|
-
|
|
1179
|
+
We(s);
|
|
1180
1180
|
} catch (l) {
|
|
1181
|
-
throw
|
|
1181
|
+
throw ee(s), l;
|
|
1182
1182
|
}
|
|
1183
|
-
else e !== null &&
|
|
1184
|
-
var
|
|
1185
|
-
if (i &&
|
|
1186
|
-
(
|
|
1183
|
+
else e !== null && oe(s);
|
|
1184
|
+
var r = s;
|
|
1185
|
+
if (i && r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
|
|
1186
|
+
(r.f & Je) === 0 && (r = r.first, (t & be) !== 0 && (t & It) !== 0 && r !== null && (r.f |= It)), r !== null && (r.parent = n, n !== null && Ts(r, n), y !== null && (y.f & H) !== 0 && (t & Ce) === 0)) {
|
|
1187
1187
|
var o = (
|
|
1188
1188
|
/** @type {Derived} */
|
|
1189
|
-
|
|
1189
|
+
y
|
|
1190
1190
|
);
|
|
1191
|
-
(o.effects ?? (o.effects = [])).push(
|
|
1191
|
+
(o.effects ?? (o.effects = [])).push(r);
|
|
1192
1192
|
}
|
|
1193
|
-
return
|
|
1193
|
+
return s;
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1196
|
-
return
|
|
1195
|
+
function ei() {
|
|
1196
|
+
return y !== null && !Z;
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1199
|
-
|
|
1198
|
+
function Le(t) {
|
|
1199
|
+
ys();
|
|
1200
1200
|
var e = (
|
|
1201
1201
|
/** @type {Effect} */
|
|
1202
|
-
|
|
1203
|
-
), i = !
|
|
1202
|
+
E.f
|
|
1203
|
+
), i = !y && (e & _e) !== 0 && (e & Qe) === 0;
|
|
1204
1204
|
if (i) {
|
|
1205
1205
|
var n = (
|
|
1206
1206
|
/** @type {ComponentContext} */
|
|
1207
|
-
|
|
1207
|
+
W
|
|
1208
1208
|
);
|
|
1209
1209
|
(n.e ?? (n.e = [])).push(t);
|
|
1210
1210
|
} else
|
|
1211
|
-
return
|
|
1211
|
+
return ln(t);
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1214
|
-
return
|
|
1213
|
+
function ln(t) {
|
|
1214
|
+
return Pe(nt | qn, t, !1);
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1218
|
-
const e =
|
|
1216
|
+
function As(t) {
|
|
1217
|
+
ve.ensure();
|
|
1218
|
+
const e = Pe(Ce | Je, t, !0);
|
|
1219
1219
|
return () => {
|
|
1220
|
-
|
|
1220
|
+
ee(e);
|
|
1221
1221
|
};
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1225
|
-
const e =
|
|
1223
|
+
function Is(t) {
|
|
1224
|
+
ve.ensure();
|
|
1225
|
+
const e = Pe(Ce | Je, t, !0);
|
|
1226
1226
|
return (i = {}) => new Promise((n) => {
|
|
1227
|
-
i.outro ?
|
|
1228
|
-
|
|
1229
|
-
}) : (
|
|
1227
|
+
i.outro ? vt(e, () => {
|
|
1228
|
+
ee(e), n(void 0);
|
|
1229
|
+
}) : (ee(e), n(void 0));
|
|
1230
1230
|
});
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
1232
|
+
function Es(t) {
|
|
1233
|
+
return Pe(nt, t, !1);
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
return
|
|
1235
|
+
function ti(t, e = 0) {
|
|
1236
|
+
return Pe(Si | e, t, !0);
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1239
|
-
var i =
|
|
1238
|
+
function ws(t, e = 0) {
|
|
1239
|
+
var i = Pe(be | e, t, !0);
|
|
1240
1240
|
return i;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1243
|
-
return
|
|
1242
|
+
function Be(t) {
|
|
1243
|
+
return Pe(_e | Je, t, !0);
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function an(t) {
|
|
1246
1246
|
var e = t.teardown;
|
|
1247
1247
|
if (e !== null) {
|
|
1248
|
-
const i =
|
|
1249
|
-
|
|
1248
|
+
const i = Se, n = y;
|
|
1249
|
+
hi(!0), le(null);
|
|
1250
1250
|
try {
|
|
1251
1251
|
e.call(null);
|
|
1252
1252
|
} finally {
|
|
1253
|
-
|
|
1253
|
+
hi(i), le(n);
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function ii(t, e = !1) {
|
|
1258
1258
|
var i = t.first;
|
|
1259
1259
|
for (t.first = t.last = null; i !== null; ) {
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
|
|
1260
|
+
const s = i.ac;
|
|
1261
|
+
s !== null && on(() => {
|
|
1262
|
+
s.abort(Wt);
|
|
1263
1263
|
});
|
|
1264
1264
|
var n = i.next;
|
|
1265
|
-
(i.f &
|
|
1265
|
+
(i.f & Ce) !== 0 ? i.parent = null : ee(i, e), i = n;
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function Ss(t) {
|
|
1269
1269
|
for (var e = t.first; e !== null; ) {
|
|
1270
1270
|
var i = e.next;
|
|
1271
|
-
(e.f &
|
|
1271
|
+
(e.f & _e) === 0 && ee(e), e = i;
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function ee(t, e = !0) {
|
|
1275
1275
|
var i = !1;
|
|
1276
|
-
(e || (t.f &
|
|
1276
|
+
(e || (t.f & Ci) !== 0) && t.nodes !== null && t.nodes.end !== null && ($s(
|
|
1277
1277
|
t.nodes.start,
|
|
1278
1278
|
/** @type {TemplateNode} */
|
|
1279
1279
|
t.nodes.end
|
|
1280
|
-
), i = !0),
|
|
1280
|
+
), i = !0), ii(t, e && !i), ot(t, 0), R(t, Ee);
|
|
1281
1281
|
var n = t.nodes && t.nodes.t;
|
|
1282
1282
|
if (n !== null)
|
|
1283
|
-
for (const
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
var
|
|
1287
|
-
|
|
1283
|
+
for (const r of n)
|
|
1284
|
+
r.stop();
|
|
1285
|
+
an(t);
|
|
1286
|
+
var s = t.parent;
|
|
1287
|
+
s !== null && s.first !== null && cn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function $s(t, e) {
|
|
1290
1290
|
for (; t !== null; ) {
|
|
1291
|
-
var i = t === e ? null : /* @__PURE__ */
|
|
1291
|
+
var i = t === e ? null : /* @__PURE__ */ Ze(t);
|
|
1292
1292
|
t.remove(), t = i;
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function cn(t) {
|
|
1296
1296
|
var e = t.parent, i = t.prev, n = t.next;
|
|
1297
1297
|
i !== null && (i.next = n), n !== null && (n.prev = i), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = i));
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function vt(t, e, i = !0) {
|
|
1300
1300
|
var n = [];
|
|
1301
|
-
|
|
1302
|
-
var
|
|
1303
|
-
i &&
|
|
1304
|
-
},
|
|
1305
|
-
if (
|
|
1306
|
-
var o = () => --
|
|
1301
|
+
un(t, n, !0);
|
|
1302
|
+
var s = () => {
|
|
1303
|
+
i && ee(t), e && e();
|
|
1304
|
+
}, r = n.length;
|
|
1305
|
+
if (r > 0) {
|
|
1306
|
+
var o = () => --r || s();
|
|
1307
1307
|
for (var l of n)
|
|
1308
1308
|
l.out(o);
|
|
1309
1309
|
} else
|
|
1310
|
-
|
|
1310
|
+
s();
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1313
|
-
if ((t.f &
|
|
1314
|
-
t.f ^=
|
|
1312
|
+
function un(t, e, i) {
|
|
1313
|
+
if ((t.f & Ie) === 0) {
|
|
1314
|
+
t.f ^= Ie;
|
|
1315
1315
|
var n = t.nodes && t.nodes.t;
|
|
1316
1316
|
if (n !== null)
|
|
1317
1317
|
for (const l of n)
|
|
1318
1318
|
(l.is_global || i) && e.push(l);
|
|
1319
|
-
for (var
|
|
1320
|
-
var
|
|
1319
|
+
for (var s = t.first; s !== null; ) {
|
|
1320
|
+
var r = s.next, o = (s.f & It) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1321
1321
|
// it means the parent block effect was pruned. In that case,
|
|
1322
1322
|
// transparency information was transferred to the branch effect.
|
|
1323
|
-
(
|
|
1324
|
-
|
|
1323
|
+
(s.f & _e) !== 0 && (t.f & be) !== 0;
|
|
1324
|
+
un(s, e, o ? i : !1), s = r;
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Cs(t, e) {
|
|
1329
1329
|
if (t.nodes)
|
|
1330
1330
|
for (var i = t.nodes.start, n = t.nodes.end; i !== null; ) {
|
|
1331
|
-
var
|
|
1332
|
-
e.append(i), i =
|
|
1331
|
+
var s = i === n ? null : /* @__PURE__ */ Ze(i);
|
|
1332
|
+
e.append(i), i = s;
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
let
|
|
1336
|
-
function
|
|
1337
|
-
|
|
1335
|
+
let bt = !1, Se = !1;
|
|
1336
|
+
function hi(t) {
|
|
1337
|
+
Se = t;
|
|
1338
1338
|
}
|
|
1339
|
-
let
|
|
1340
|
-
function
|
|
1341
|
-
|
|
1339
|
+
let y = null, Z = !1;
|
|
1340
|
+
function le(t) {
|
|
1341
|
+
y = t;
|
|
1342
1342
|
}
|
|
1343
|
-
let
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1343
|
+
let E = null;
|
|
1344
|
+
function $e(t) {
|
|
1345
|
+
E = t;
|
|
1346
1346
|
}
|
|
1347
|
-
let
|
|
1348
|
-
function
|
|
1349
|
-
|
|
1347
|
+
let X = null;
|
|
1348
|
+
function fn(t) {
|
|
1349
|
+
y !== null && (X === null ? X = [t] : X.push(t));
|
|
1350
1350
|
}
|
|
1351
|
-
let
|
|
1352
|
-
function
|
|
1353
|
-
|
|
1351
|
+
let j = null, q = 0, z = null;
|
|
1352
|
+
function Ls(t) {
|
|
1353
|
+
z = t;
|
|
1354
1354
|
}
|
|
1355
|
-
let
|
|
1356
|
-
function
|
|
1357
|
-
|
|
1355
|
+
let dn = 1, Oe = 0, Fe = Oe;
|
|
1356
|
+
function pi(t) {
|
|
1357
|
+
Fe = t;
|
|
1358
1358
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return ++
|
|
1359
|
+
function hn() {
|
|
1360
|
+
return ++dn;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function ut(t) {
|
|
1363
1363
|
var e = t.f;
|
|
1364
|
-
if ((e &
|
|
1364
|
+
if ((e & F) !== 0)
|
|
1365
1365
|
return !0;
|
|
1366
|
-
if (e &
|
|
1366
|
+
if (e & H && (t.f &= ~De), (e & te) !== 0) {
|
|
1367
1367
|
for (var i = (
|
|
1368
1368
|
/** @type {Value[]} */
|
|
1369
1369
|
t.deps
|
|
1370
|
-
), n = i.length,
|
|
1371
|
-
var
|
|
1372
|
-
if (
|
|
1370
|
+
), n = i.length, s = 0; s < n; s++) {
|
|
1371
|
+
var r = i[s];
|
|
1372
|
+
if (ut(
|
|
1373
1373
|
/** @type {Derived} */
|
|
1374
|
-
|
|
1375
|
-
) &&
|
|
1374
|
+
r
|
|
1375
|
+
) && xi(
|
|
1376
1376
|
/** @type {Derived} */
|
|
1377
|
-
|
|
1378
|
-
),
|
|
1377
|
+
r
|
|
1378
|
+
), r.wv > t.wv)
|
|
1379
1379
|
return !0;
|
|
1380
1380
|
}
|
|
1381
|
-
(e &
|
|
1381
|
+
(e & x) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1382
1382
|
// traversal of the graph in the other batches still happens
|
|
1383
|
-
|
|
1383
|
+
Q === null && R(t, V);
|
|
1384
1384
|
}
|
|
1385
1385
|
return !1;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function pn(t, e, i = !0) {
|
|
1388
1388
|
var n = t.reactions;
|
|
1389
|
-
if (n !== null && !(
|
|
1390
|
-
for (var
|
|
1391
|
-
var
|
|
1392
|
-
(
|
|
1389
|
+
if (n !== null && !(X !== null && Xe.call(X, t)))
|
|
1390
|
+
for (var s = 0; s < n.length; s++) {
|
|
1391
|
+
var r = n[s];
|
|
1392
|
+
(r.f & H) !== 0 ? pn(
|
|
1393
1393
|
/** @type {Derived} */
|
|
1394
|
-
|
|
1394
|
+
r,
|
|
1395
1395
|
e,
|
|
1396
1396
|
!1
|
|
1397
|
-
) : e ===
|
|
1397
|
+
) : e === r && (i ? R(r, F) : (r.f & V) !== 0 && R(r, te), oe(
|
|
1398
1398
|
/** @type {Effect} */
|
|
1399
|
-
|
|
1399
|
+
r
|
|
1400
1400
|
));
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1404
|
-
var
|
|
1405
|
-
var e =
|
|
1406
|
-
|
|
1407
|
-
null,
|
|
1408
|
-
t.ac.abort(
|
|
1403
|
+
function gn(t) {
|
|
1404
|
+
var T;
|
|
1405
|
+
var e = j, i = q, n = z, s = y, r = X, o = W, l = Z, a = Fe, u = t.f;
|
|
1406
|
+
j = /** @type {null | Value[]} */
|
|
1407
|
+
null, q = 0, z = null, y = (u & (_e | Ce)) === 0 ? t : null, X = null, Et(t.ctx), Z = !1, Fe = ++Oe, t.ac !== null && (on(() => {
|
|
1408
|
+
t.ac.abort(Wt);
|
|
1409
1409
|
}), t.ac = null);
|
|
1410
1410
|
try {
|
|
1411
|
-
t.f |=
|
|
1411
|
+
t.f |= Mt;
|
|
1412
1412
|
var d = (
|
|
1413
1413
|
/** @type {Function} */
|
|
1414
1414
|
t.fn
|
|
1415
|
-
),
|
|
1416
|
-
t.f |=
|
|
1417
|
-
var p = t.deps,
|
|
1418
|
-
if (
|
|
1415
|
+
), v = d();
|
|
1416
|
+
t.f |= Qe;
|
|
1417
|
+
var p = t.deps, g = k?.is_fork;
|
|
1418
|
+
if (j !== null) {
|
|
1419
1419
|
var h;
|
|
1420
|
-
if (
|
|
1421
|
-
for (p.length =
|
|
1422
|
-
p[
|
|
1420
|
+
if (g || ot(t, q), p !== null && q > 0)
|
|
1421
|
+
for (p.length = q + j.length, h = 0; h < j.length; h++)
|
|
1422
|
+
p[q + h] = j[h];
|
|
1423
1423
|
else
|
|
1424
|
-
t.deps = p =
|
|
1425
|
-
if (
|
|
1426
|
-
for (h =
|
|
1427
|
-
((
|
|
1428
|
-
} else !
|
|
1429
|
-
if (
|
|
1424
|
+
t.deps = p = j;
|
|
1425
|
+
if (ei() && (t.f & x) !== 0)
|
|
1426
|
+
for (h = q; h < p.length; h++)
|
|
1427
|
+
((T = p[h]).reactions ?? (T.reactions = [])).push(t);
|
|
1428
|
+
} else !g && p !== null && q < p.length && (ot(t, q), p.length = q);
|
|
1429
|
+
if (Vi() && z !== null && !Z && p !== null && (t.f & (H | te | F)) === 0)
|
|
1430
1430
|
for (h = 0; h < /** @type {Source[]} */
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1431
|
+
z.length; h++)
|
|
1432
|
+
pn(
|
|
1433
|
+
z[h],
|
|
1434
1434
|
/** @type {Effect} */
|
|
1435
1435
|
t
|
|
1436
1436
|
);
|
|
1437
|
-
if (
|
|
1438
|
-
if (
|
|
1439
|
-
for (let
|
|
1440
|
-
|
|
1437
|
+
if (s !== null && s !== t) {
|
|
1438
|
+
if (Oe++, s.deps !== null)
|
|
1439
|
+
for (let b = 0; b < i; b += 1)
|
|
1440
|
+
s.deps[b].rv = Oe;
|
|
1441
1441
|
if (e !== null)
|
|
1442
|
-
for (const
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1442
|
+
for (const b of e)
|
|
1443
|
+
b.rv = Oe;
|
|
1444
|
+
z !== null && (n === null ? n = z : n.push(.../** @type {Source[]} */
|
|
1445
|
+
z));
|
|
1446
1446
|
}
|
|
1447
|
-
return (t.f &
|
|
1448
|
-
} catch (
|
|
1449
|
-
return
|
|
1447
|
+
return (t.f & st) !== 0 && (t.f ^= st), v;
|
|
1448
|
+
} catch (b) {
|
|
1449
|
+
return Fi(b);
|
|
1450
1450
|
} finally {
|
|
1451
|
-
t.f ^=
|
|
1451
|
+
t.f ^= Mt, j = e, q = i, z = n, y = s, X = r, Et(o), Z = l, Fe = a;
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function Rs(t, e) {
|
|
1455
1455
|
let i = e.reactions;
|
|
1456
1456
|
if (i !== null) {
|
|
1457
|
-
var n =
|
|
1457
|
+
var n = Vn.call(i, t);
|
|
1458
1458
|
if (n !== -1) {
|
|
1459
|
-
var
|
|
1460
|
-
|
|
1459
|
+
var s = i.length - 1;
|
|
1460
|
+
s === 0 ? i = e.reactions = null : (i[n] = i[s], i.pop());
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
if (i === null && (e.f &
|
|
1463
|
+
if (i === null && (e.f & H) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1464
1464
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1465
1465
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1466
|
-
(
|
|
1467
|
-
var
|
|
1466
|
+
(j === null || !Xe.call(j, e))) {
|
|
1467
|
+
var r = (
|
|
1468
1468
|
/** @type {Derived} */
|
|
1469
1469
|
e
|
|
1470
1470
|
);
|
|
1471
|
-
(
|
|
1471
|
+
(r.f & x) !== 0 && (r.f ^= x, r.f &= ~De), Jt(r), ms(r), ot(r, 0);
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function ot(t, e) {
|
|
1475
1475
|
var i = t.deps;
|
|
1476
1476
|
if (i !== null)
|
|
1477
1477
|
for (var n = e; n < i.length; n++)
|
|
1478
|
-
|
|
1478
|
+
Rs(t, i[n]);
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function We(t) {
|
|
1481
1481
|
var e = t.f;
|
|
1482
|
-
if ((e &
|
|
1483
|
-
|
|
1484
|
-
var i =
|
|
1485
|
-
|
|
1482
|
+
if ((e & Ee) === 0) {
|
|
1483
|
+
R(t, V);
|
|
1484
|
+
var i = E, n = bt;
|
|
1485
|
+
E = t, bt = !0;
|
|
1486
1486
|
try {
|
|
1487
|
-
(e & (
|
|
1488
|
-
var
|
|
1489
|
-
t.teardown = typeof
|
|
1490
|
-
var
|
|
1491
|
-
|
|
1487
|
+
(e & (be | $i)) !== 0 ? Ss(t) : ii(t), an(t);
|
|
1488
|
+
var s = gn(t);
|
|
1489
|
+
t.teardown = typeof s == "function" ? s : null, t.wv = dn;
|
|
1490
|
+
var r;
|
|
1491
|
+
Nt && os && (t.f & F) !== 0 && t.deps;
|
|
1492
1492
|
} finally {
|
|
1493
|
-
|
|
1493
|
+
bt = n, E = i;
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
var e = t.f, i = (e &
|
|
1499
|
-
if (
|
|
1500
|
-
var n =
|
|
1501
|
-
if (!n && (
|
|
1502
|
-
var
|
|
1503
|
-
if ((
|
|
1504
|
-
t.rv <
|
|
1497
|
+
function m(t) {
|
|
1498
|
+
var e = t.f, i = (e & H) !== 0;
|
|
1499
|
+
if (y !== null && !Z) {
|
|
1500
|
+
var n = E !== null && (E.f & Ee) !== 0;
|
|
1501
|
+
if (!n && (X === null || !Xe.call(X, t))) {
|
|
1502
|
+
var s = y.deps;
|
|
1503
|
+
if ((y.f & Mt) !== 0)
|
|
1504
|
+
t.rv < Oe && (t.rv = Oe, j === null && s !== null && s[q] === t ? q++ : j === null ? j = [t] : j.push(t));
|
|
1505
1505
|
else {
|
|
1506
|
-
(
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1506
|
+
(y.deps ?? (y.deps = [])).push(t);
|
|
1507
|
+
var r = t.reactions;
|
|
1508
|
+
r === null ? t.reactions = [y] : Xe.call(r, y) || r.push(y);
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
if (
|
|
1512
|
+
if (Se && we.has(t))
|
|
1513
1513
|
return we.get(t);
|
|
1514
1514
|
if (i) {
|
|
1515
1515
|
var o = (
|
|
1516
1516
|
/** @type {Derived} */
|
|
1517
1517
|
t
|
|
1518
1518
|
);
|
|
1519
|
-
if (
|
|
1519
|
+
if (Se) {
|
|
1520
1520
|
var l = o.v;
|
|
1521
|
-
return ((o.f &
|
|
1521
|
+
return ((o.f & V) === 0 && o.reactions !== null || vn(o)) && (l = Zt(o)), we.set(o, l), l;
|
|
1522
1522
|
}
|
|
1523
|
-
var a = (o.f &
|
|
1524
|
-
|
|
1523
|
+
var a = (o.f & x) === 0 && !Z && y !== null && (bt || (y.f & x) !== 0), u = (o.f & Qe) === 0;
|
|
1524
|
+
ut(o) && (a && (o.f |= x), xi(o)), a && !u && (Xi(o), mn(o));
|
|
1525
1525
|
}
|
|
1526
|
-
if (
|
|
1527
|
-
return
|
|
1528
|
-
if ((t.f &
|
|
1526
|
+
if (Q?.has(t))
|
|
1527
|
+
return Q.get(t);
|
|
1528
|
+
if ((t.f & st) !== 0)
|
|
1529
1529
|
throw t.v;
|
|
1530
1530
|
return t.v;
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1533
|
-
if (t.f |=
|
|
1532
|
+
function mn(t) {
|
|
1533
|
+
if (t.f |= x, t.deps !== null)
|
|
1534
1534
|
for (const e of t.deps)
|
|
1535
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f &
|
|
1535
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & H) !== 0 && (e.f & x) === 0 && (Xi(
|
|
1536
1536
|
/** @type {Derived} */
|
|
1537
1537
|
e
|
|
1538
|
-
),
|
|
1538
|
+
), mn(
|
|
1539
1539
|
/** @type {Derived} */
|
|
1540
1540
|
e
|
|
1541
1541
|
));
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1544
|
-
if (t.v ===
|
|
1543
|
+
function vn(t) {
|
|
1544
|
+
if (t.v === N) return !0;
|
|
1545
1545
|
if (t.deps === null) return !1;
|
|
1546
1546
|
for (const e of t.deps)
|
|
1547
|
-
if (we.has(e) || (e.f &
|
|
1547
|
+
if (we.has(e) || (e.f & H) !== 0 && vn(
|
|
1548
1548
|
/** @type {Derived} */
|
|
1549
1549
|
e
|
|
1550
1550
|
))
|
|
1551
1551
|
return !0;
|
|
1552
1552
|
return !1;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1555
|
-
var e =
|
|
1554
|
+
function ni(t) {
|
|
1555
|
+
var e = Z;
|
|
1556
1556
|
try {
|
|
1557
|
-
return
|
|
1557
|
+
return Z = !0, t();
|
|
1558
1558
|
} finally {
|
|
1559
|
-
|
|
1559
|
+
Z = e;
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
|
-
const
|
|
1563
|
-
let
|
|
1564
|
-
function
|
|
1562
|
+
const ht = /* @__PURE__ */ Symbol("events"), Os = /* @__PURE__ */ new Set(), gi = /* @__PURE__ */ new Set();
|
|
1563
|
+
let mi = null;
|
|
1564
|
+
function vi(t) {
|
|
1565
1565
|
var e = this, i = (
|
|
1566
1566
|
/** @type {Node} */
|
|
1567
1567
|
e.ownerDocument
|
|
1568
|
-
), n = t.type,
|
|
1568
|
+
), n = t.type, s = t.composedPath?.() || [], r = (
|
|
1569
1569
|
/** @type {null | Element} */
|
|
1570
|
-
|
|
1570
|
+
s[0] || t.target
|
|
1571
1571
|
);
|
|
1572
|
-
|
|
1573
|
-
var o = 0, l =
|
|
1572
|
+
mi = t;
|
|
1573
|
+
var o = 0, l = mi === t && t[ht];
|
|
1574
1574
|
if (l) {
|
|
1575
|
-
var a =
|
|
1575
|
+
var a = s.indexOf(l);
|
|
1576
1576
|
if (a !== -1 && (e === document || e === /** @type {any} */
|
|
1577
1577
|
window)) {
|
|
1578
|
-
t[
|
|
1578
|
+
t[ht] = e;
|
|
1579
1579
|
return;
|
|
1580
1580
|
}
|
|
1581
|
-
var u =
|
|
1581
|
+
var u = s.indexOf(e);
|
|
1582
1582
|
if (u === -1)
|
|
1583
1583
|
return;
|
|
1584
1584
|
a <= u && (o = a);
|
|
1585
1585
|
}
|
|
1586
|
-
if (
|
|
1587
|
-
|
|
1588
|
-
|
|
1586
|
+
if (r = /** @type {Element} */
|
|
1587
|
+
s[o] || t.target, r !== e) {
|
|
1588
|
+
At(t, "currentTarget", {
|
|
1589
1589
|
configurable: !0,
|
|
1590
1590
|
get() {
|
|
1591
|
-
return
|
|
1591
|
+
return r || i;
|
|
1592
1592
|
}
|
|
1593
1593
|
});
|
|
1594
|
-
var d =
|
|
1595
|
-
|
|
1594
|
+
var d = y, v = E;
|
|
1595
|
+
le(null), $e(null);
|
|
1596
1596
|
try {
|
|
1597
|
-
for (var p,
|
|
1598
|
-
var h =
|
|
1599
|
-
|
|
1597
|
+
for (var p, g = []; r !== null; ) {
|
|
1598
|
+
var h = r.assignedSlot || r.parentNode || /** @type {any} */
|
|
1599
|
+
r.host || null;
|
|
1600
1600
|
try {
|
|
1601
|
-
var
|
|
1602
|
-
|
|
1603
|
-
|
|
1601
|
+
var T = r[ht]?.[n];
|
|
1602
|
+
T != null && (!/** @type {any} */
|
|
1603
|
+
r.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1604
1604
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1605
|
-
t.target ===
|
|
1606
|
-
} catch (
|
|
1607
|
-
p ?
|
|
1605
|
+
t.target === r) && T.call(r, t);
|
|
1606
|
+
} catch (b) {
|
|
1607
|
+
p ? g.push(b) : p = b;
|
|
1608
1608
|
}
|
|
1609
1609
|
if (t.cancelBubble || h === e || h === null)
|
|
1610
1610
|
break;
|
|
1611
|
-
|
|
1611
|
+
r = h;
|
|
1612
1612
|
}
|
|
1613
1613
|
if (p) {
|
|
1614
|
-
for (let
|
|
1614
|
+
for (let b of g)
|
|
1615
1615
|
queueMicrotask(() => {
|
|
1616
|
-
throw
|
|
1616
|
+
throw b;
|
|
1617
1617
|
});
|
|
1618
1618
|
throw p;
|
|
1619
1619
|
}
|
|
1620
1620
|
} finally {
|
|
1621
|
-
t[
|
|
1621
|
+
t[ht] = e, delete t.currentTarget, le(d), $e(v);
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
const
|
|
1625
|
+
const ks = (
|
|
1626
1626
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1627
1627
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1628
1628
|
/** @param {string} html */
|
|
1629
1629
|
createHTML: (t) => t
|
|
1630
1630
|
})
|
|
1631
1631
|
);
|
|
1632
|
-
function
|
|
1632
|
+
function Hs(t) {
|
|
1633
1633
|
return (
|
|
1634
1634
|
/** @type {string} */
|
|
1635
|
-
|
|
1635
|
+
ks?.createHTML(t) ?? t
|
|
1636
1636
|
);
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1639
|
-
var i =
|
|
1640
|
-
return t = t.replaceAll("<!>", "<!---->"), i.innerHTML = e ?
|
|
1638
|
+
function Ns(t, e = !1) {
|
|
1639
|
+
var i = rn("template");
|
|
1640
|
+
return t = t.replaceAll("<!>", "<!---->"), i.innerHTML = e ? Hs(t) : t, i.content;
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function Kt(t, e) {
|
|
1643
1643
|
var i = (
|
|
1644
1644
|
/** @type {Effect} */
|
|
1645
|
-
|
|
1645
|
+
E
|
|
1646
1646
|
);
|
|
1647
1647
|
i.nodes === null && (i.nodes = { start: t, end: e, a: null, t: null });
|
|
1648
1648
|
}
|
|
1649
1649
|
// @__NO_SIDE_EFFECTS__
|
|
1650
|
-
function
|
|
1651
|
-
var i = (e &
|
|
1650
|
+
function Vs(t, e) {
|
|
1651
|
+
var i = (e & kn) !== 0, n, s = !t.startsWith("<!>");
|
|
1652
1652
|
return () => {
|
|
1653
|
-
if (
|
|
1654
|
-
return
|
|
1655
|
-
n === void 0 && (n =
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
var
|
|
1653
|
+
if (J)
|
|
1654
|
+
return Kt(B, null), B;
|
|
1655
|
+
n === void 0 && (n = Ns(s ? t : "<!>" + t, !0), n = /** @type {TemplateNode} */
|
|
1656
|
+
/* @__PURE__ */ sn(n));
|
|
1657
|
+
var r = (
|
|
1658
1658
|
/** @type {TemplateNode} */
|
|
1659
|
-
i ||
|
|
1659
|
+
i || Zi ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1660
1660
|
);
|
|
1661
|
-
return
|
|
1661
|
+
return Kt(r, r), r;
|
|
1662
1662
|
};
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1665
|
-
if (
|
|
1664
|
+
function bn(t, e) {
|
|
1665
|
+
if (J) {
|
|
1666
1666
|
var i = (
|
|
1667
1667
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1668
|
-
|
|
1668
|
+
E
|
|
1669
1669
|
);
|
|
1670
|
-
((i.f &
|
|
1670
|
+
((i.f & Qe) === 0 || i.nodes.end === null) && (i.nodes.end = B), Oi();
|
|
1671
1671
|
return;
|
|
1672
1672
|
}
|
|
1673
1673
|
t !== null && t.before(
|
|
@@ -1675,44 +1675,44 @@ function un(t, e) {
|
|
|
1675
1675
|
e
|
|
1676
1676
|
);
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1679
|
-
function
|
|
1680
|
-
return
|
|
1678
|
+
const Ms = ["touchstart", "touchmove"];
|
|
1679
|
+
function Fs(t) {
|
|
1680
|
+
return Ms.includes(t);
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1683
|
-
return
|
|
1682
|
+
function _n(t, e) {
|
|
1683
|
+
return yn(t, e);
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1686
|
-
|
|
1687
|
-
const i = e.target, n =
|
|
1685
|
+
function Ds(t, e) {
|
|
1686
|
+
qt(), e.intro = e.intro ?? !1;
|
|
1687
|
+
const i = e.target, n = J, s = B;
|
|
1688
1688
|
try {
|
|
1689
|
-
for (var
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
if (!
|
|
1693
|
-
throw
|
|
1694
|
-
|
|
1689
|
+
for (var r = /* @__PURE__ */ sn(i); r && (r.nodeType !== Qt || /** @type {Comment} */
|
|
1690
|
+
r.data !== Ii); )
|
|
1691
|
+
r = /* @__PURE__ */ Ze(r);
|
|
1692
|
+
if (!r)
|
|
1693
|
+
throw yt;
|
|
1694
|
+
ft(!0), rt(
|
|
1695
1695
|
/** @type {Comment} */
|
|
1696
|
-
|
|
1696
|
+
r
|
|
1697
1697
|
);
|
|
1698
|
-
const o =
|
|
1699
|
-
return
|
|
1698
|
+
const o = yn(t, { ...e, anchor: r });
|
|
1699
|
+
return ft(!1), /** @type {Exports} */
|
|
1700
1700
|
o;
|
|
1701
1701
|
} catch (o) {
|
|
1702
1702
|
if (o instanceof Error && o.message.split(`
|
|
1703
1703
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1704
1704
|
throw o;
|
|
1705
|
-
return o !==
|
|
1705
|
+
return o !== yt && console.warn("Failed to hydrate: ", o), e.recover === !1 && Wn(), qt(), _s(i), ft(!1), _n(t, e);
|
|
1706
1706
|
} finally {
|
|
1707
|
-
|
|
1707
|
+
ft(n), rt(s);
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
|
-
const
|
|
1711
|
-
function
|
|
1712
|
-
|
|
1713
|
-
var l = void 0, a =
|
|
1714
|
-
var u = i ?? e.appendChild(
|
|
1715
|
-
|
|
1710
|
+
const pt = /* @__PURE__ */ new Map();
|
|
1711
|
+
function yn(t, { target: e, anchor: i, props: n = {}, events: s, context: r, intro: o = !0 }) {
|
|
1712
|
+
qt();
|
|
1713
|
+
var l = void 0, a = Is(() => {
|
|
1714
|
+
var u = i ?? e.appendChild(nn());
|
|
1715
|
+
ds(
|
|
1716
1716
|
/** @type {TemplateNode} */
|
|
1717
1717
|
u,
|
|
1718
1718
|
{
|
|
@@ -1720,90 +1720,90 @@ function dn(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
|
|
|
1720
1720
|
}
|
|
1721
1721
|
},
|
|
1722
1722
|
(p) => {
|
|
1723
|
-
|
|
1724
|
-
var
|
|
1723
|
+
Hi({});
|
|
1724
|
+
var g = (
|
|
1725
1725
|
/** @type {ComponentContext} */
|
|
1726
|
-
|
|
1726
|
+
W
|
|
1727
1727
|
);
|
|
1728
|
-
if (
|
|
1728
|
+
if (r && (g.c = r), s && (n.$$events = s), J && Kt(
|
|
1729
1729
|
/** @type {TemplateNode} */
|
|
1730
1730
|
p,
|
|
1731
1731
|
null
|
|
1732
|
-
), l = t(p, n) || {},
|
|
1733
|
-
|
|
1734
|
-
throw
|
|
1735
|
-
|
|
1732
|
+
), l = t(p, n) || {}, J && (E.nodes.end = B, B === null || B.nodeType !== Qt || /** @type {Comment} */
|
|
1733
|
+
B.data !== wi))
|
|
1734
|
+
throw Ri(), yt;
|
|
1735
|
+
Ni();
|
|
1736
1736
|
}
|
|
1737
1737
|
);
|
|
1738
|
-
var d = /* @__PURE__ */ new Set(),
|
|
1739
|
-
for (var
|
|
1740
|
-
var h = p[
|
|
1738
|
+
var d = /* @__PURE__ */ new Set(), v = (p) => {
|
|
1739
|
+
for (var g = 0; g < p.length; g++) {
|
|
1740
|
+
var h = p[g];
|
|
1741
1741
|
if (!d.has(h)) {
|
|
1742
1742
|
d.add(h);
|
|
1743
|
-
var
|
|
1744
|
-
for (const
|
|
1745
|
-
var
|
|
1746
|
-
|
|
1747
|
-
var
|
|
1748
|
-
|
|
1743
|
+
var T = Fs(h);
|
|
1744
|
+
for (const L of [e, document]) {
|
|
1745
|
+
var b = pt.get(L);
|
|
1746
|
+
b === void 0 && (b = /* @__PURE__ */ new Map(), pt.set(L, b));
|
|
1747
|
+
var S = b.get(h);
|
|
1748
|
+
S === void 0 ? (L.addEventListener(h, vi, { passive: T }), b.set(h, 1)) : b.set(h, S + 1);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
1751
|
}
|
|
1752
1752
|
};
|
|
1753
|
-
return
|
|
1753
|
+
return v(Mn(Os)), gi.add(v), () => {
|
|
1754
1754
|
for (var p of d)
|
|
1755
|
-
for (const
|
|
1756
|
-
var
|
|
1755
|
+
for (const T of [e, document]) {
|
|
1756
|
+
var g = (
|
|
1757
1757
|
/** @type {Map<string, number>} */
|
|
1758
|
-
|
|
1758
|
+
pt.get(T)
|
|
1759
1759
|
), h = (
|
|
1760
1760
|
/** @type {number} */
|
|
1761
|
-
|
|
1761
|
+
g.get(p)
|
|
1762
1762
|
);
|
|
1763
|
-
--h == 0 ? (
|
|
1763
|
+
--h == 0 ? (T.removeEventListener(p, vi), g.delete(p), g.size === 0 && pt.delete(T)) : g.set(p, h);
|
|
1764
1764
|
}
|
|
1765
|
-
|
|
1765
|
+
gi.delete(v), u !== i && u.parentNode?.removeChild(u);
|
|
1766
1766
|
};
|
|
1767
1767
|
});
|
|
1768
|
-
return
|
|
1768
|
+
return zt.set(l, a), l;
|
|
1769
1769
|
}
|
|
1770
|
-
let
|
|
1771
|
-
function
|
|
1772
|
-
const i =
|
|
1773
|
-
return i ? (
|
|
1770
|
+
let zt = /* @__PURE__ */ new WeakMap();
|
|
1771
|
+
function Ps(t, e) {
|
|
1772
|
+
const i = zt.get(t);
|
|
1773
|
+
return i ? (zt.delete(t), i(e)) : Promise.resolve();
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1776
|
-
|
|
1777
|
-
const e =
|
|
1775
|
+
function Bs(t) {
|
|
1776
|
+
W === null && zn(), Le(() => {
|
|
1777
|
+
const e = ni(t);
|
|
1778
1778
|
if (typeof e == "function") return (
|
|
1779
1779
|
/** @type {() => void} */
|
|
1780
1780
|
e
|
|
1781
1781
|
);
|
|
1782
1782
|
});
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1785
|
-
return t === e || t?.[
|
|
1784
|
+
function bi(t, e) {
|
|
1785
|
+
return t === e || t?.[gt] === e;
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1788
|
-
return
|
|
1789
|
-
var
|
|
1790
|
-
return
|
|
1791
|
-
|
|
1792
|
-
t !== i(...
|
|
1787
|
+
function Gs(t = {}, e, i, n) {
|
|
1788
|
+
return Es(() => {
|
|
1789
|
+
var s, r;
|
|
1790
|
+
return ti(() => {
|
|
1791
|
+
s = r, r = [], ni(() => {
|
|
1792
|
+
t !== i(...r) && (e(t, ...r), s && bi(i(...s), t) && e(null, ...s));
|
|
1793
1793
|
});
|
|
1794
1794
|
}), () => {
|
|
1795
|
-
|
|
1796
|
-
|
|
1795
|
+
Me(() => {
|
|
1796
|
+
r && bi(i(...r), t) && e(null, ...r);
|
|
1797
1797
|
});
|
|
1798
1798
|
};
|
|
1799
1799
|
}), t;
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var
|
|
1801
|
+
function ye(t, e, i, n) {
|
|
1802
|
+
var s = (
|
|
1803
1803
|
/** @type {V} */
|
|
1804
1804
|
n
|
|
1805
|
-
),
|
|
1806
|
-
n),
|
|
1805
|
+
), r = !0, o = () => (r && (r = !1, s = /** @type {V} */
|
|
1806
|
+
n), s), l;
|
|
1807
1807
|
l = /** @type {V} */
|
|
1808
1808
|
t[e], l === void 0 && n !== void 0 && (l = o());
|
|
1809
1809
|
var a;
|
|
@@ -1812,28 +1812,28 @@ function ve(t, e, i, n) {
|
|
|
1812
1812
|
/** @type {V} */
|
|
1813
1813
|
t[e]
|
|
1814
1814
|
);
|
|
1815
|
-
return p === void 0 ? o() : (
|
|
1815
|
+
return p === void 0 ? o() : (r = !0, p);
|
|
1816
1816
|
};
|
|
1817
|
-
var u = !1, d = /* @__PURE__ */
|
|
1817
|
+
var u = !1, d = /* @__PURE__ */ Ui(() => (u = !1, a())), v = (
|
|
1818
1818
|
/** @type {Effect} */
|
|
1819
|
-
|
|
1819
|
+
E
|
|
1820
1820
|
);
|
|
1821
1821
|
return (
|
|
1822
1822
|
/** @type {() => V} */
|
|
1823
|
-
(function(p,
|
|
1823
|
+
(function(p, g) {
|
|
1824
1824
|
if (arguments.length > 0) {
|
|
1825
|
-
const h =
|
|
1826
|
-
return
|
|
1825
|
+
const h = g ? m(d) : p;
|
|
1826
|
+
return $(d, h), u = !0, s !== void 0 && (s = h), p;
|
|
1827
1827
|
}
|
|
1828
|
-
return
|
|
1828
|
+
return Se && u || (v.f & Ee) !== 0 ? d.v : m(d);
|
|
1829
1829
|
})
|
|
1830
1830
|
);
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1833
|
-
return new
|
|
1832
|
+
function js(t) {
|
|
1833
|
+
return new qs(t);
|
|
1834
1834
|
}
|
|
1835
|
-
var
|
|
1836
|
-
class
|
|
1835
|
+
var me, U;
|
|
1836
|
+
class qs {
|
|
1837
1837
|
/**
|
|
1838
1838
|
* @param {ComponentConstructorOptions & {
|
|
1839
1839
|
* component: any;
|
|
@@ -1841,56 +1841,56 @@ class Fr {
|
|
|
1841
1841
|
*/
|
|
1842
1842
|
constructor(e) {
|
|
1843
1843
|
/** @type {any} */
|
|
1844
|
-
|
|
1844
|
+
A(this, me);
|
|
1845
1845
|
/** @type {Record<string, any>} */
|
|
1846
|
-
|
|
1847
|
-
var i = /* @__PURE__ */ new Map(), n = (
|
|
1848
|
-
var l = /* @__PURE__ */
|
|
1849
|
-
return i.set(
|
|
1846
|
+
A(this, U);
|
|
1847
|
+
var i = /* @__PURE__ */ new Map(), n = (r, o) => {
|
|
1848
|
+
var l = /* @__PURE__ */ vs(o, !1, !1);
|
|
1849
|
+
return i.set(r, l), l;
|
|
1850
1850
|
};
|
|
1851
|
-
const
|
|
1851
|
+
const s = new Proxy(
|
|
1852
1852
|
{ ...e.props || {}, $$events: {} },
|
|
1853
1853
|
{
|
|
1854
|
-
get(
|
|
1855
|
-
return
|
|
1854
|
+
get(r, o) {
|
|
1855
|
+
return m(i.get(o) ?? n(o, Reflect.get(r, o)));
|
|
1856
1856
|
},
|
|
1857
|
-
has(
|
|
1858
|
-
return o ===
|
|
1857
|
+
has(r, o) {
|
|
1858
|
+
return o === Kn ? !0 : (m(i.get(o) ?? n(o, Reflect.get(r, o))), Reflect.has(r, o));
|
|
1859
1859
|
},
|
|
1860
|
-
set(
|
|
1861
|
-
return
|
|
1860
|
+
set(r, o, l) {
|
|
1861
|
+
return $(i.get(o) ?? n(o, l), l), Reflect.set(r, o, l);
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
1864
|
);
|
|
1865
|
-
|
|
1865
|
+
_(this, U, (e.hydrate ? Ds : _n)(e.component, {
|
|
1866
1866
|
target: e.target,
|
|
1867
1867
|
anchor: e.anchor,
|
|
1868
|
-
props:
|
|
1868
|
+
props: s,
|
|
1869
1869
|
context: e.context,
|
|
1870
1870
|
intro: e.intro ?? !1,
|
|
1871
1871
|
recover: e.recover
|
|
1872
|
-
})), (!e?.props?.$$host || e.sync === !1) &&
|
|
1873
|
-
for (const
|
|
1874
|
-
|
|
1872
|
+
})), (!e?.props?.$$host || e.sync === !1) && ue(), _(this, me, s.$$events);
|
|
1873
|
+
for (const r of Object.keys(c(this, U)))
|
|
1874
|
+
r === "$set" || r === "$destroy" || r === "$on" || At(this, r, {
|
|
1875
1875
|
get() {
|
|
1876
|
-
return c(this,
|
|
1876
|
+
return c(this, U)[r];
|
|
1877
1877
|
},
|
|
1878
1878
|
/** @param {any} value */
|
|
1879
1879
|
set(o) {
|
|
1880
|
-
c(this,
|
|
1880
|
+
c(this, U)[r] = o;
|
|
1881
1881
|
},
|
|
1882
1882
|
enumerable: !0
|
|
1883
1883
|
});
|
|
1884
|
-
c(this,
|
|
1885
|
-
(
|
|
1886
|
-
Object.assign(
|
|
1887
|
-
}, c(this,
|
|
1888
|
-
|
|
1884
|
+
c(this, U).$set = /** @param {Record<string, any>} next */
|
|
1885
|
+
(r) => {
|
|
1886
|
+
Object.assign(s, r);
|
|
1887
|
+
}, c(this, U).$destroy = () => {
|
|
1888
|
+
Ps(c(this, U));
|
|
1889
1889
|
};
|
|
1890
1890
|
}
|
|
1891
1891
|
/** @param {Record<string, any>} props */
|
|
1892
1892
|
$set(e) {
|
|
1893
|
-
c(this,
|
|
1893
|
+
c(this, U).$set(e);
|
|
1894
1894
|
}
|
|
1895
1895
|
/**
|
|
1896
1896
|
* @param {string} event
|
|
@@ -1898,22 +1898,22 @@ class Fr {
|
|
|
1898
1898
|
* @returns {any}
|
|
1899
1899
|
*/
|
|
1900
1900
|
$on(e, i) {
|
|
1901
|
-
c(this,
|
|
1902
|
-
const n = (...
|
|
1903
|
-
return c(this,
|
|
1904
|
-
c(this,
|
|
1901
|
+
c(this, me)[e] = c(this, me)[e] || [];
|
|
1902
|
+
const n = (...s) => i.call(this, ...s);
|
|
1903
|
+
return c(this, me)[e].push(n), () => {
|
|
1904
|
+
c(this, me)[e] = c(this, me)[e].filter(
|
|
1905
1905
|
/** @param {any} fn */
|
|
1906
|
-
(
|
|
1906
|
+
(s) => s !== n
|
|
1907
1907
|
);
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
1910
|
$destroy() {
|
|
1911
|
-
c(this,
|
|
1911
|
+
c(this, U).$destroy();
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
|
|
1915
|
-
let
|
|
1916
|
-
typeof HTMLElement == "function" && (
|
|
1914
|
+
me = new WeakMap(), U = new WeakMap();
|
|
1915
|
+
let Tn;
|
|
1916
|
+
typeof HTMLElement == "function" && (Tn = class extends HTMLElement {
|
|
1917
1917
|
/**
|
|
1918
1918
|
* @param {*} $$componentCtor
|
|
1919
1919
|
* @param {*} $$slots
|
|
@@ -1952,8 +1952,8 @@ typeof HTMLElement == "function" && (hn = class extends HTMLElement {
|
|
|
1952
1952
|
*/
|
|
1953
1953
|
addEventListener(e, i, n) {
|
|
1954
1954
|
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(i), this.$$c) {
|
|
1955
|
-
const
|
|
1956
|
-
this.$$l_u.set(i,
|
|
1955
|
+
const s = this.$$c.$on(e, i);
|
|
1956
|
+
this.$$l_u.set(i, s);
|
|
1957
1957
|
}
|
|
1958
1958
|
super.addEventListener(e, i, n);
|
|
1959
1959
|
}
|
|
@@ -1964,30 +1964,30 @@ typeof HTMLElement == "function" && (hn = class extends HTMLElement {
|
|
|
1964
1964
|
*/
|
|
1965
1965
|
removeEventListener(e, i, n) {
|
|
1966
1966
|
if (super.removeEventListener(e, i, n), this.$$c) {
|
|
1967
|
-
const
|
|
1968
|
-
|
|
1967
|
+
const s = this.$$l_u.get(i);
|
|
1968
|
+
s && (s(), this.$$l_u.delete(i));
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
1971
1971
|
async connectedCallback() {
|
|
1972
1972
|
if (this.$$cn = !0, !this.$$c) {
|
|
1973
|
-
let e = function(
|
|
1974
|
-
return (
|
|
1975
|
-
const o =
|
|
1976
|
-
|
|
1973
|
+
let e = function(s) {
|
|
1974
|
+
return (r) => {
|
|
1975
|
+
const o = rn("slot");
|
|
1976
|
+
s !== "default" && (o.name = s), bn(r, o);
|
|
1977
1977
|
};
|
|
1978
1978
|
};
|
|
1979
1979
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1980
1980
|
return;
|
|
1981
|
-
const i = {}, n =
|
|
1982
|
-
for (const
|
|
1983
|
-
|
|
1984
|
-
for (const
|
|
1985
|
-
const
|
|
1986
|
-
|
|
1981
|
+
const i = {}, n = Ks(this);
|
|
1982
|
+
for (const s of this.$$s)
|
|
1983
|
+
s in n && (s === "default" && !this.$$d.children ? (this.$$d.children = e(s), i.default = !0) : i[s] = e(s));
|
|
1984
|
+
for (const s of this.attributes) {
|
|
1985
|
+
const r = this.$$g_p(s.name);
|
|
1986
|
+
r in this.$$d || (this.$$d[r] = _t(r, s.value, this.$$p_d, "toProp"));
|
|
1987
1987
|
}
|
|
1988
|
-
for (const
|
|
1989
|
-
!(
|
|
1990
|
-
this.$$c =
|
|
1988
|
+
for (const s in this.$$p_d)
|
|
1989
|
+
!(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
|
|
1990
|
+
this.$$c = js({
|
|
1991
1991
|
component: this.$$ctor,
|
|
1992
1992
|
target: this.$$shadowRoot || this,
|
|
1993
1993
|
props: {
|
|
@@ -1995,27 +1995,27 @@ typeof HTMLElement == "function" && (hn = class extends HTMLElement {
|
|
|
1995
1995
|
$$slots: i,
|
|
1996
1996
|
$$host: this
|
|
1997
1997
|
}
|
|
1998
|
-
}), this.$$me =
|
|
1999
|
-
|
|
1998
|
+
}), this.$$me = As(() => {
|
|
1999
|
+
ti(() => {
|
|
2000
2000
|
this.$$r = !0;
|
|
2001
|
-
for (const
|
|
2002
|
-
if (!this.$$p_d[
|
|
2003
|
-
this.$$d[
|
|
2004
|
-
const
|
|
2005
|
-
|
|
2006
|
-
this.$$d[
|
|
2001
|
+
for (const s of Tt(this.$$c)) {
|
|
2002
|
+
if (!this.$$p_d[s]?.reflect) continue;
|
|
2003
|
+
this.$$d[s] = this.$$c[s];
|
|
2004
|
+
const r = _t(
|
|
2005
|
+
s,
|
|
2006
|
+
this.$$d[s],
|
|
2007
2007
|
this.$$p_d,
|
|
2008
2008
|
"toAttribute"
|
|
2009
2009
|
);
|
|
2010
|
-
|
|
2010
|
+
r == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, r);
|
|
2011
2011
|
}
|
|
2012
2012
|
this.$$r = !1;
|
|
2013
2013
|
});
|
|
2014
2014
|
});
|
|
2015
|
-
for (const
|
|
2016
|
-
for (const
|
|
2017
|
-
const o = this.$$c.$on(
|
|
2018
|
-
this.$$l_u.set(
|
|
2015
|
+
for (const s in this.$$l)
|
|
2016
|
+
for (const r of this.$$l[s]) {
|
|
2017
|
+
const o = this.$$c.$on(s, r);
|
|
2018
|
+
this.$$l_u.set(r, o);
|
|
2019
2019
|
}
|
|
2020
2020
|
this.$$l = {};
|
|
2021
2021
|
}
|
|
@@ -2028,7 +2028,7 @@ typeof HTMLElement == "function" && (hn = class extends HTMLElement {
|
|
|
2028
2028
|
* @param {string} newValue
|
|
2029
2029
|
*/
|
|
2030
2030
|
attributeChangedCallback(e, i, n) {
|
|
2031
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
2031
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = _t(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2032
2032
|
}
|
|
2033
2033
|
disconnectedCallback() {
|
|
2034
2034
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2039,17 +2039,17 @@ typeof HTMLElement == "function" && (hn = class extends HTMLElement {
|
|
|
2039
2039
|
* @param {string} attribute_name
|
|
2040
2040
|
*/
|
|
2041
2041
|
$$g_p(e) {
|
|
2042
|
-
return
|
|
2042
|
+
return Tt(this.$$p_d).find(
|
|
2043
2043
|
(i) => this.$$p_d[i].attribute === e || !this.$$p_d[i].attribute && i.toLowerCase() === e
|
|
2044
2044
|
) || e;
|
|
2045
2045
|
}
|
|
2046
2046
|
});
|
|
2047
|
-
function
|
|
2048
|
-
const
|
|
2049
|
-
if (e =
|
|
2047
|
+
function _t(t, e, i, n) {
|
|
2048
|
+
const s = i[t]?.type;
|
|
2049
|
+
if (e = s === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !i[t])
|
|
2050
2050
|
return e;
|
|
2051
2051
|
if (n === "toAttribute")
|
|
2052
|
-
switch (
|
|
2052
|
+
switch (s) {
|
|
2053
2053
|
case "Object":
|
|
2054
2054
|
case "Array":
|
|
2055
2055
|
return e == null ? null : JSON.stringify(e);
|
|
@@ -2061,7 +2061,7 @@ function gt(t, e, i, n) {
|
|
|
2061
2061
|
return e;
|
|
2062
2062
|
}
|
|
2063
2063
|
else
|
|
2064
|
-
switch (
|
|
2064
|
+
switch (s) {
|
|
2065
2065
|
case "Object":
|
|
2066
2066
|
case "Array":
|
|
2067
2067
|
return e && JSON.parse(e);
|
|
@@ -2074,7 +2074,7 @@ function gt(t, e, i, n) {
|
|
|
2074
2074
|
return e;
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2077
|
+
function Ks(t) {
|
|
2078
2078
|
const e = {};
|
|
2079
2079
|
return t.childNodes.forEach((i) => {
|
|
2080
2080
|
e[
|
|
@@ -2083,33 +2083,33 @@ function Dr(t) {
|
|
|
2083
2083
|
] = !0;
|
|
2084
2084
|
}), e;
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
let o = class extends
|
|
2086
|
+
function zs(t, e, i, n, s, r) {
|
|
2087
|
+
let o = class extends Tn {
|
|
2088
2088
|
constructor() {
|
|
2089
|
-
super(t, i,
|
|
2089
|
+
super(t, i, s), this.$$p_d = e;
|
|
2090
2090
|
}
|
|
2091
2091
|
static get observedAttributes() {
|
|
2092
|
-
return
|
|
2092
|
+
return Tt(e).map(
|
|
2093
2093
|
(l) => (e[l].attribute || l).toLowerCase()
|
|
2094
2094
|
);
|
|
2095
2095
|
}
|
|
2096
2096
|
};
|
|
2097
|
-
return
|
|
2098
|
-
|
|
2097
|
+
return Tt(e).forEach((l) => {
|
|
2098
|
+
At(o.prototype, l, {
|
|
2099
2099
|
get() {
|
|
2100
2100
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2101
2101
|
},
|
|
2102
2102
|
set(a) {
|
|
2103
|
-
a =
|
|
2103
|
+
a = _t(l, a, e), this.$$d[l] = a;
|
|
2104
2104
|
var u = this.$$c;
|
|
2105
2105
|
if (u) {
|
|
2106
|
-
var d =
|
|
2106
|
+
var d = Ge(u, l)?.get;
|
|
2107
2107
|
d ? u[l] = a : u.$set({ [l]: a });
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
});
|
|
2111
2111
|
}), n.forEach((l) => {
|
|
2112
|
-
|
|
2112
|
+
At(o.prototype, l, {
|
|
2113
2113
|
get() {
|
|
2114
2114
|
return this.$$c?.[l];
|
|
2115
2115
|
}
|
|
@@ -2117,17 +2117,17 @@ function Pr(t, e, i, n, r, s) {
|
|
|
2117
2117
|
}), t.element = /** @type {any} */
|
|
2118
2118
|
o, o;
|
|
2119
2119
|
}
|
|
2120
|
-
class
|
|
2121
|
-
constructor(i, n,
|
|
2120
|
+
class Ys extends Event {
|
|
2121
|
+
constructor(i, n, s, r) {
|
|
2122
2122
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2123
2123
|
f(this, "context");
|
|
2124
2124
|
f(this, "contextTarget");
|
|
2125
2125
|
f(this, "callback");
|
|
2126
2126
|
f(this, "subscribe");
|
|
2127
|
-
this.context = i, this.contextTarget = n, this.callback =
|
|
2127
|
+
this.context = i, this.contextTarget = n, this.callback = s, this.subscribe = r ?? !1;
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
|
-
class
|
|
2130
|
+
class Us {
|
|
2131
2131
|
constructor(e, i) {
|
|
2132
2132
|
f(this, "host");
|
|
2133
2133
|
f(this, "context");
|
|
@@ -2151,57 +2151,65 @@ class jr {
|
|
|
2151
2151
|
return this.currentValue;
|
|
2152
2152
|
}
|
|
2153
2153
|
requestValue() {
|
|
2154
|
-
this.host.dispatchEvent(new
|
|
2154
|
+
this.host.dispatchEvent(new Ys(this.context, this.host, this.handleValue, this.subscribe));
|
|
2155
2155
|
}
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2158
|
-
function
|
|
2157
|
+
const An = (t) => t, xs = An(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Xs = An(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext"));
|
|
2158
|
+
function In(t, e, i) {
|
|
2159
2159
|
let n = !1;
|
|
2160
|
-
const
|
|
2160
|
+
const s = new Us(t, {
|
|
2161
2161
|
context: e,
|
|
2162
2162
|
subscribe: !0,
|
|
2163
2163
|
onValue: (u) => {
|
|
2164
2164
|
n = !0, i(u);
|
|
2165
2165
|
}
|
|
2166
2166
|
});
|
|
2167
|
-
|
|
2168
|
-
const
|
|
2169
|
-
u.context === e &&
|
|
2167
|
+
s.connect();
|
|
2168
|
+
const r = (u) => {
|
|
2169
|
+
u.context === e && s.requestValue();
|
|
2170
2170
|
};
|
|
2171
|
-
t.addEventListener("context-provider",
|
|
2171
|
+
t.addEventListener("context-provider", r);
|
|
2172
2172
|
let o = 0;
|
|
2173
2173
|
const l = 200, a = globalThis.setInterval(() => {
|
|
2174
2174
|
if (n || o >= l) {
|
|
2175
2175
|
globalThis.clearInterval(a);
|
|
2176
2176
|
return;
|
|
2177
2177
|
}
|
|
2178
|
-
o += 1,
|
|
2178
|
+
o += 1, s.requestValue();
|
|
2179
2179
|
}, 50);
|
|
2180
2180
|
return () => {
|
|
2181
|
-
globalThis.clearInterval(a), t.removeEventListener("context-provider",
|
|
2181
|
+
globalThis.clearInterval(a), t.removeEventListener("context-provider", r), s.disconnect();
|
|
2182
2182
|
};
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2185
|
-
return
|
|
2184
|
+
function Ws(t, e) {
|
|
2185
|
+
return In(t, xs, e);
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2188
|
-
return
|
|
2187
|
+
function Qs(t, e) {
|
|
2188
|
+
return In(t, Xs, e);
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return
|
|
2190
|
+
function Js(t, e) {
|
|
2191
|
+
return Ws(t, e);
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2194
|
-
return
|
|
2193
|
+
function Zs(t, e) {
|
|
2194
|
+
return Qs(t, e);
|
|
2195
2195
|
}
|
|
2196
|
-
var
|
|
2196
|
+
var _i;
|
|
2197
2197
|
(function(t) {
|
|
2198
2198
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2199
|
-
})(
|
|
2200
|
-
var
|
|
2199
|
+
})(_i || (_i = {}));
|
|
2200
|
+
var yi;
|
|
2201
2201
|
(function(t) {
|
|
2202
2202
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2203
|
-
})(
|
|
2204
|
-
|
|
2203
|
+
})(yi || (yi = {}));
|
|
2204
|
+
const er = {
|
|
2205
|
+
tts: "textToSpeech",
|
|
2206
|
+
colorScheme: "theme"
|
|
2207
|
+
};
|
|
2208
|
+
function tr(t) {
|
|
2209
|
+
const e = t.trim();
|
|
2210
|
+
return e ? er[e] || e : "";
|
|
2211
|
+
}
|
|
2212
|
+
class ir {
|
|
2205
2213
|
constructor() {
|
|
2206
2214
|
f(this, "tools", /* @__PURE__ */ new Map());
|
|
2207
2215
|
f(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
@@ -2215,7 +2223,7 @@ class Yr {
|
|
|
2215
2223
|
* Normalize a single tool alias to canonical toolId.
|
|
2216
2224
|
*/
|
|
2217
2225
|
normalizeToolId(e) {
|
|
2218
|
-
return e
|
|
2226
|
+
return tr(e);
|
|
2219
2227
|
}
|
|
2220
2228
|
/**
|
|
2221
2229
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -2330,17 +2338,17 @@ class Yr {
|
|
|
2330
2338
|
*/
|
|
2331
2339
|
filterVisibleInContext(e, i) {
|
|
2332
2340
|
const n = [];
|
|
2333
|
-
for (const
|
|
2334
|
-
const
|
|
2335
|
-
if (!
|
|
2336
|
-
console.warn(`Tool '${
|
|
2341
|
+
for (const s of e) {
|
|
2342
|
+
const r = this.get(s);
|
|
2343
|
+
if (!r) {
|
|
2344
|
+
console.warn(`Tool '${s}' is allowed but not registered`);
|
|
2337
2345
|
continue;
|
|
2338
2346
|
}
|
|
2339
|
-
if (
|
|
2347
|
+
if (r.supportedLevels.includes(i.level))
|
|
2340
2348
|
try {
|
|
2341
|
-
|
|
2349
|
+
r.isVisibleInContext(i) && n.push(r);
|
|
2342
2350
|
} catch (o) {
|
|
2343
|
-
console.error(`Error evaluating visibility for tool '${
|
|
2351
|
+
console.error(`Error evaluating visibility for tool '${s}':`, o);
|
|
2344
2352
|
}
|
|
2345
2353
|
}
|
|
2346
2354
|
return n;
|
|
@@ -2370,10 +2378,10 @@ class Yr {
|
|
|
2370
2378
|
generatePNPSupportsFromTools(e) {
|
|
2371
2379
|
const i = /* @__PURE__ */ new Set();
|
|
2372
2380
|
for (const n of e) {
|
|
2373
|
-
const
|
|
2374
|
-
if (
|
|
2375
|
-
for (const
|
|
2376
|
-
i.add(
|
|
2381
|
+
const s = this.get(n);
|
|
2382
|
+
if (s?.pnpSupportIds)
|
|
2383
|
+
for (const r of s.pnpSupportIds)
|
|
2384
|
+
i.add(r);
|
|
2377
2385
|
}
|
|
2378
2386
|
return Array.from(i);
|
|
2379
2387
|
}
|
|
@@ -2412,12 +2420,12 @@ class Yr {
|
|
|
2412
2420
|
const n = this.moduleLoaders.get(e);
|
|
2413
2421
|
if (!n)
|
|
2414
2422
|
return;
|
|
2415
|
-
const
|
|
2423
|
+
const s = (async () => {
|
|
2416
2424
|
await n(), this.loadedToolModules.add(e);
|
|
2417
2425
|
})();
|
|
2418
|
-
this.moduleLoadPromises.set(e,
|
|
2426
|
+
this.moduleLoadPromises.set(e, s);
|
|
2419
2427
|
try {
|
|
2420
|
-
await
|
|
2428
|
+
await s;
|
|
2421
2429
|
} finally {
|
|
2422
2430
|
this.moduleLoadPromises.delete(e);
|
|
2423
2431
|
}
|
|
@@ -2438,39 +2446,39 @@ class Yr {
|
|
|
2438
2446
|
* Render a tool for toolbar use with component overrides attached.
|
|
2439
2447
|
*/
|
|
2440
2448
|
renderForToolbar(e, i, n) {
|
|
2441
|
-
const
|
|
2442
|
-
if (!
|
|
2449
|
+
const s = this.get(e);
|
|
2450
|
+
if (!s)
|
|
2443
2451
|
throw new Error(`Tool '${e}' is not registered`);
|
|
2444
|
-
const
|
|
2452
|
+
const r = {
|
|
2445
2453
|
...n,
|
|
2446
2454
|
componentOverrides: {
|
|
2447
2455
|
...this.componentOverrides || {},
|
|
2448
2456
|
...n.componentOverrides || {}
|
|
2449
2457
|
}
|
|
2450
2458
|
};
|
|
2451
|
-
return
|
|
2459
|
+
return s.renderToolbar(i, r);
|
|
2452
2460
|
}
|
|
2453
2461
|
}
|
|
2454
|
-
function
|
|
2462
|
+
function En(t) {
|
|
2455
2463
|
return t.level === "item";
|
|
2456
2464
|
}
|
|
2457
|
-
function
|
|
2465
|
+
function nr(t) {
|
|
2458
2466
|
return t.level === "passage";
|
|
2459
2467
|
}
|
|
2460
|
-
function
|
|
2468
|
+
function sr(t) {
|
|
2461
2469
|
return t.level === "rubric";
|
|
2462
2470
|
}
|
|
2463
|
-
function
|
|
2471
|
+
function wn(t) {
|
|
2464
2472
|
return t.level === "element";
|
|
2465
2473
|
}
|
|
2466
|
-
function
|
|
2467
|
-
if (
|
|
2474
|
+
function si(t) {
|
|
2475
|
+
if (wn(t)) {
|
|
2468
2476
|
const e = t.item.config;
|
|
2469
2477
|
if (!e)
|
|
2470
2478
|
return "";
|
|
2471
|
-
const i = [], n = (a) => a.replace(/<[^>]*>/g, " ").trim(),
|
|
2472
|
-
|
|
2473
|
-
const
|
|
2479
|
+
const i = [], n = (a) => a.replace(/<[^>]*>/g, " ").trim(), s = e.elements?.[t.elementId];
|
|
2480
|
+
s && typeof s == "string" && i.push(n(s));
|
|
2481
|
+
const r = e.models, l = (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).find((a) => a && typeof a == "object" && a.id === t.elementId);
|
|
2474
2482
|
if (l) {
|
|
2475
2483
|
for (const a of Object.values(l))
|
|
2476
2484
|
if (typeof a == "string" && i.push(n(a)), Array.isArray(a)) {
|
|
@@ -2482,41 +2490,60 @@ function Qt(t) {
|
|
|
2482
2490
|
}
|
|
2483
2491
|
return i.filter(Boolean).join(" ").trim();
|
|
2484
2492
|
}
|
|
2485
|
-
if (
|
|
2493
|
+
if (En(t)) {
|
|
2486
2494
|
const e = t.item;
|
|
2487
2495
|
if (!e?.config)
|
|
2488
2496
|
return "";
|
|
2489
|
-
const i = e.config, n = [],
|
|
2490
|
-
typeof i.markup == "string" && n.push(
|
|
2491
|
-
const
|
|
2492
|
-
if (
|
|
2493
|
-
for (const a of Object.values(
|
|
2494
|
-
typeof a == "string" && n.push(
|
|
2497
|
+
const i = e.config, n = [], s = (a) => a.replace(/<[^>]*>/g, " ").trim();
|
|
2498
|
+
typeof i.markup == "string" && n.push(s(i.markup));
|
|
2499
|
+
const r = i.elements;
|
|
2500
|
+
if (r && typeof r == "object")
|
|
2501
|
+
for (const a of Object.values(r))
|
|
2502
|
+
typeof a == "string" && n.push(s(a));
|
|
2495
2503
|
const o = i.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
|
|
2496
2504
|
for (const a of l)
|
|
2497
2505
|
if (!(!a || typeof a != "object")) {
|
|
2498
2506
|
for (const u of Object.values(a))
|
|
2499
|
-
if (typeof u == "string" && n.push(
|
|
2507
|
+
if (typeof u == "string" && n.push(s(u)), Array.isArray(u)) {
|
|
2500
2508
|
for (const d of u)
|
|
2501
2509
|
if (d && typeof d == "object")
|
|
2502
|
-
for (const
|
|
2503
|
-
typeof
|
|
2510
|
+
for (const v of Object.values(d))
|
|
2511
|
+
typeof v == "string" && n.push(s(v));
|
|
2504
2512
|
}
|
|
2505
2513
|
}
|
|
2506
2514
|
return n.filter(Boolean).join(" ").trim();
|
|
2507
2515
|
}
|
|
2508
|
-
if (
|
|
2516
|
+
if (nr(t)) {
|
|
2509
2517
|
const e = t.passage;
|
|
2510
|
-
|
|
2518
|
+
if (!e?.config)
|
|
2519
|
+
return "";
|
|
2520
|
+
const i = e.config, n = [], s = (a) => a.replace(/<[^>]*>/g, " ").trim();
|
|
2521
|
+
typeof i.markup == "string" && n.push(s(i.markup)), typeof i.content == "string" && n.push(s(i.content)), typeof i.prompt == "string" && n.push(s(i.prompt));
|
|
2522
|
+
const r = i.elements;
|
|
2523
|
+
if (r && typeof r == "object")
|
|
2524
|
+
for (const a of Object.values(r))
|
|
2525
|
+
typeof a == "string" && n.push(s(a));
|
|
2526
|
+
const o = i.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
|
|
2527
|
+
for (const a of l)
|
|
2528
|
+
if (!(!a || typeof a != "object")) {
|
|
2529
|
+
for (const u of Object.values(a))
|
|
2530
|
+
if (typeof u == "string" && n.push(s(u)), Array.isArray(u)) {
|
|
2531
|
+
for (const d of u)
|
|
2532
|
+
if (d && typeof d == "object")
|
|
2533
|
+
for (const v of Object.values(d))
|
|
2534
|
+
typeof v == "string" && n.push(s(v));
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
return n.filter(Boolean).join(" ").trim();
|
|
2511
2538
|
}
|
|
2512
|
-
if (
|
|
2539
|
+
if (sr(t)) {
|
|
2513
2540
|
const e = t.rubricBlock;
|
|
2514
2541
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
2515
2542
|
}
|
|
2516
2543
|
return "";
|
|
2517
2544
|
}
|
|
2518
|
-
function
|
|
2519
|
-
const e =
|
|
2545
|
+
function Rt(t) {
|
|
2546
|
+
const e = si(t);
|
|
2520
2547
|
return [
|
|
2521
2548
|
/<math[>\s]/i,
|
|
2522
2549
|
// MathML
|
|
@@ -2532,7 +2559,7 @@ function It(t) {
|
|
|
2532
2559
|
// Simple arithmetic
|
|
2533
2560
|
].some((n) => n.test(e));
|
|
2534
2561
|
}
|
|
2535
|
-
function
|
|
2562
|
+
function rr(t) {
|
|
2536
2563
|
const e = [
|
|
2537
2564
|
"pie-multiple-choice",
|
|
2538
2565
|
"pie-inline-choice",
|
|
@@ -2541,32 +2568,32 @@ function Qr(t) {
|
|
|
2541
2568
|
"inline-choice",
|
|
2542
2569
|
"select-text"
|
|
2543
2570
|
];
|
|
2544
|
-
if (
|
|
2571
|
+
if (wn(t)) {
|
|
2545
2572
|
const i = t.item.config;
|
|
2546
2573
|
if (!i?.models)
|
|
2547
2574
|
return !1;
|
|
2548
|
-
const
|
|
2549
|
-
if (!
|
|
2575
|
+
const s = (Array.isArray(i.models) ? i.models : Object.values(i.models)).find((o) => o && typeof o == "object" && o.id === t.elementId);
|
|
2576
|
+
if (!s)
|
|
2550
2577
|
return !1;
|
|
2551
|
-
const
|
|
2552
|
-
return e.includes(
|
|
2578
|
+
const r = s.element || "";
|
|
2579
|
+
return e.includes(r);
|
|
2553
2580
|
}
|
|
2554
|
-
if (
|
|
2581
|
+
if (En(t)) {
|
|
2555
2582
|
const i = t.item.config?.models;
|
|
2556
|
-
return (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).some((
|
|
2557
|
-
if (!
|
|
2583
|
+
return (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).some((s) => {
|
|
2584
|
+
if (!s || typeof s != "object")
|
|
2558
2585
|
return !1;
|
|
2559
|
-
const
|
|
2560
|
-
return e.includes(
|
|
2586
|
+
const r = s.element || "";
|
|
2587
|
+
return e.includes(r) ? !0 : Array.isArray(s.choices) && s.choices.length > 0;
|
|
2561
2588
|
});
|
|
2562
2589
|
}
|
|
2563
2590
|
return !1;
|
|
2564
2591
|
}
|
|
2565
|
-
function
|
|
2566
|
-
return
|
|
2592
|
+
function Ot(t) {
|
|
2593
|
+
return si(t).trim().length >= 10;
|
|
2567
2594
|
}
|
|
2568
|
-
function
|
|
2569
|
-
const e =
|
|
2595
|
+
function or(t) {
|
|
2596
|
+
const e = si(t);
|
|
2570
2597
|
return [
|
|
2571
2598
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
2572
2599
|
/periodic\s+table/i,
|
|
@@ -2578,25 +2605,25 @@ function Jr(t) {
|
|
|
2578
2605
|
/physics|force|energy|velocity|acceleration/i
|
|
2579
2606
|
].some((n) => n.test(e));
|
|
2580
2607
|
}
|
|
2581
|
-
const
|
|
2608
|
+
const lr = [
|
|
2582
2609
|
"assessment",
|
|
2583
2610
|
"section",
|
|
2584
2611
|
"item",
|
|
2585
2612
|
"passage",
|
|
2586
2613
|
"rubric"
|
|
2587
|
-
],
|
|
2588
|
-
function
|
|
2589
|
-
return
|
|
2614
|
+
], ar = new Set(lr);
|
|
2615
|
+
function cr(t) {
|
|
2616
|
+
return ar.has(t);
|
|
2590
2617
|
}
|
|
2591
|
-
function
|
|
2592
|
-
const
|
|
2593
|
-
if (!
|
|
2618
|
+
function ie(t, e, i) {
|
|
2619
|
+
const n = t.trim(), s = i.trim();
|
|
2620
|
+
if (!n || !s)
|
|
2594
2621
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
2595
|
-
if (!
|
|
2622
|
+
if (!cr(e))
|
|
2596
2623
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
2597
|
-
return
|
|
2624
|
+
return `${n}:${e}:${s}`;
|
|
2598
2625
|
}
|
|
2599
|
-
const
|
|
2626
|
+
const ur = /* @__PURE__ */ new Set([
|
|
2600
2627
|
"annotation-xml",
|
|
2601
2628
|
"color-profile",
|
|
2602
2629
|
"font-face",
|
|
@@ -2605,7 +2632,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2605
2632
|
"font-face-format",
|
|
2606
2633
|
"font-face-name",
|
|
2607
2634
|
"missing-glyph"
|
|
2608
|
-
]),
|
|
2635
|
+
]), fr = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, dr = (t, e = "custom element tag") => {
|
|
2609
2636
|
if (!t || typeof t != "string")
|
|
2610
2637
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
2611
2638
|
const i = t.trim();
|
|
@@ -2615,12 +2642,12 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2615
2642
|
throw new Error(`Invalid ${e} "${i}": custom element names must be lowercase`);
|
|
2616
2643
|
if (!i.includes("-"))
|
|
2617
2644
|
throw new Error(`Invalid ${e} "${i}": custom element names must include a hyphen`);
|
|
2618
|
-
if (
|
|
2645
|
+
if (ur.has(i))
|
|
2619
2646
|
throw new Error(`Invalid ${e} "${i}": this name is reserved by the HTML spec`);
|
|
2620
|
-
if (!
|
|
2647
|
+
if (!fr.test(i))
|
|
2621
2648
|
throw new Error(`Invalid ${e} "${i}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
2622
2649
|
return i;
|
|
2623
|
-
},
|
|
2650
|
+
}, Sn = {
|
|
2624
2651
|
calculator: "pie-tool-calculator",
|
|
2625
2652
|
textToSpeech: "pie-tool-text-to-speech",
|
|
2626
2653
|
ruler: "pie-tool-ruler",
|
|
@@ -2628,17 +2655,18 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2628
2655
|
answerEliminator: "pie-tool-answer-eliminator",
|
|
2629
2656
|
highlighter: "pie-tool-annotation-toolbar",
|
|
2630
2657
|
lineReader: "pie-tool-line-reader",
|
|
2631
|
-
|
|
2658
|
+
theme: "pie-tool-theme",
|
|
2659
|
+
colorScheme: "pie-tool-theme",
|
|
2632
2660
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
2633
2661
|
graph: "pie-tool-graph",
|
|
2634
2662
|
periodicTable: "pie-tool-periodic-table"
|
|
2635
|
-
},
|
|
2636
|
-
const i = e?.toolTagMap?.[t] ??
|
|
2637
|
-
return
|
|
2638
|
-
},
|
|
2639
|
-
const
|
|
2640
|
-
return o ? o({ toolId: t, tagName:
|
|
2641
|
-
},
|
|
2663
|
+
}, hr = (t, e) => {
|
|
2664
|
+
const i = e?.toolTagMap?.[t] ?? Sn[t] ?? t;
|
|
2665
|
+
return dr(i, `tool component tag for "${t}"`);
|
|
2666
|
+
}, pr = (t) => document.createElement(t), ce = (t, e, i, n) => {
|
|
2667
|
+
const s = hr(t, n), o = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
|
|
2668
|
+
return o ? o({ toolId: t, tagName: s, context: e, toolbarContext: i }) : pr(s);
|
|
2669
|
+
}, gr = {
|
|
2642
2670
|
toolId: "calculator",
|
|
2643
2671
|
name: "Calculator",
|
|
2644
2672
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
@@ -2664,20 +2692,28 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2664
2692
|
* (MathML, LaTeX, arithmetic markers).
|
|
2665
2693
|
*/
|
|
2666
2694
|
isVisibleInContext(t) {
|
|
2667
|
-
return
|
|
2695
|
+
return Rt(t);
|
|
2668
2696
|
},
|
|
2669
2697
|
renderToolbar(t, e) {
|
|
2670
|
-
const i =
|
|
2671
|
-
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2698
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, s = ce(this.toolId, t, e, n);
|
|
2699
|
+
s.setAttribute("tool-id", i);
|
|
2700
|
+
const r = {
|
|
2701
|
+
toolId: this.toolId,
|
|
2702
|
+
label: this.name,
|
|
2703
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
2704
|
+
disabled: !1,
|
|
2705
|
+
ariaLabel: "Open scientific calculator",
|
|
2706
|
+
tooltip: "Calculator",
|
|
2707
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
2708
|
+
active: e.isToolVisible(i)
|
|
2709
|
+
};
|
|
2710
|
+
return {
|
|
2674
2711
|
toolId: this.toolId,
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
button: null,
|
|
2712
|
+
elements: [{ element: s, mount: "after-buttons" }],
|
|
2713
|
+
button: r,
|
|
2678
2714
|
sync: () => {
|
|
2679
2715
|
const o = e.isToolVisible(i);
|
|
2680
|
-
r.visible = o;
|
|
2716
|
+
r.active = o, r.ariaLabel = o ? "Close scientific calculator" : "Open scientific calculator", r.tooltip = o ? "Close calculator" : "Calculator", s.visible = o;
|
|
2681
2717
|
},
|
|
2682
2718
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2683
2719
|
o(e.isToolVisible(i));
|
|
@@ -2685,7 +2721,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2685
2721
|
}
|
|
2686
2722
|
};
|
|
2687
2723
|
}
|
|
2688
|
-
},
|
|
2724
|
+
}, mr = {
|
|
2689
2725
|
toolId: "textToSpeech",
|
|
2690
2726
|
name: "Text to Speech",
|
|
2691
2727
|
description: "Read content aloud",
|
|
@@ -2711,23 +2747,115 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2711
2747
|
* - Context contains readable text (at least 10 characters)
|
|
2712
2748
|
*/
|
|
2713
2749
|
isVisibleInContext(t) {
|
|
2714
|
-
return
|
|
2750
|
+
return Ot(t);
|
|
2715
2751
|
},
|
|
2716
2752
|
renderToolbar(t, e) {
|
|
2717
|
-
|
|
2718
|
-
n.
|
|
2719
|
-
|
|
2753
|
+
let i = null;
|
|
2754
|
+
const n = e.ttsService, s = ie(this.toolId, e.scope.level, e.scope.scopeId), r = () => e.isToolVisible(s), o = {
|
|
2755
|
+
toolId: this.toolId,
|
|
2756
|
+
label: "Read aloud",
|
|
2757
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
2758
|
+
ariaLabel: "Read aloud",
|
|
2759
|
+
tooltip: "Read aloud",
|
|
2760
|
+
onClick: () => {
|
|
2761
|
+
p();
|
|
2762
|
+
},
|
|
2763
|
+
disabled: !1,
|
|
2764
|
+
active: !1
|
|
2765
|
+
}, l = () => {
|
|
2766
|
+
const g = r() ? "Stop reading" : "Read aloud";
|
|
2767
|
+
o.label = g, o.ariaLabel = g, o.tooltip = g, o.active = r(), o.disabled = !e.ttsService;
|
|
2768
|
+
}, a = (g) => {
|
|
2769
|
+
(g === "idle" || g === "error") && r() && (e.toggleTool(this.toolId), l());
|
|
2770
|
+
}, u = async () => {
|
|
2771
|
+
e.ensureTTSReady && (i || (i = (async () => {
|
|
2772
|
+
await e.ensureTTSReady?.(), e.toolkitCoordinator?.highlightCoordinator && n?.setHighlightCoordinator?.(e.toolkitCoordinator.highlightCoordinator);
|
|
2773
|
+
})()), await i);
|
|
2774
|
+
}, d = () => {
|
|
2775
|
+
n?.stop?.(), r() && e.toggleTool(this.toolId), l();
|
|
2776
|
+
}, v = () => {
|
|
2777
|
+
const g = e.getScopeElement?.();
|
|
2778
|
+
if (g)
|
|
2779
|
+
return g;
|
|
2780
|
+
const h = (S) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(S) : S.replace(/"/g, '\\"'), T = [
|
|
2781
|
+
e.catalogId,
|
|
2782
|
+
e.scope.itemId,
|
|
2783
|
+
e.scope.canonicalItemId
|
|
2784
|
+
].filter((S) => typeof S == "string" && S.length > 0), b = [];
|
|
2785
|
+
for (const S of T) {
|
|
2786
|
+
const L = h(S);
|
|
2787
|
+
e.scope.level === "passage" && b.push(`pie-passage-shell[item-id="${L}"] [data-region="content"]`), b.push(`pie-item-shell[item-id="${L}"] [data-region="content"]`);
|
|
2788
|
+
}
|
|
2789
|
+
b.push("[data-region='content']");
|
|
2790
|
+
for (const S of b) {
|
|
2791
|
+
const L = document.querySelector(S);
|
|
2792
|
+
if (L instanceof HTMLElement)
|
|
2793
|
+
return L;
|
|
2794
|
+
}
|
|
2795
|
+
return null;
|
|
2796
|
+
}, p = async () => {
|
|
2797
|
+
if (!n?.speak || !e.ttsService)
|
|
2798
|
+
return;
|
|
2799
|
+
if (r()) {
|
|
2800
|
+
d();
|
|
2801
|
+
return;
|
|
2802
|
+
}
|
|
2803
|
+
const g = v();
|
|
2804
|
+
if (!g)
|
|
2805
|
+
return;
|
|
2806
|
+
const h = g.textContent || "";
|
|
2807
|
+
if (h.trim())
|
|
2808
|
+
try {
|
|
2809
|
+
r() || e.toggleTool(this.toolId), l(), await u(), n.setRootElement?.(g), n.speak(h, {
|
|
2810
|
+
// For passage-level TTS, use rendered DOM text as the source of truth.
|
|
2811
|
+
// Catalog/SSML content can diverge from rendered text and break
|
|
2812
|
+
// word-boundary-to-DOM mapping for progressive yellow highlighting.
|
|
2813
|
+
catalogId: e.scope.level === "passage" ? void 0 : e.catalogId || e.itemId,
|
|
2814
|
+
language: e.language,
|
|
2815
|
+
contentElement: g
|
|
2816
|
+
}).catch((T) => {
|
|
2817
|
+
console.error("[ttsToolRegistration] Failed to start reading:", T), l();
|
|
2818
|
+
}), l();
|
|
2819
|
+
} catch (T) {
|
|
2820
|
+
l(), console.error("[ttsToolRegistration] Failed to start reading:", T);
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2720
2823
|
return {
|
|
2721
2824
|
toolId: this.toolId,
|
|
2722
|
-
|
|
2825
|
+
button: o,
|
|
2723
2826
|
sync: () => {
|
|
2724
|
-
|
|
2725
|
-
console.error("[ttsToolRegistration] Failed to initialize TTS service:",
|
|
2726
|
-
})
|
|
2827
|
+
l(), e.ensureTTSReady && u().catch((g) => {
|
|
2828
|
+
console.error("[ttsToolRegistration] Failed to initialize TTS service:", g);
|
|
2829
|
+
});
|
|
2830
|
+
},
|
|
2831
|
+
subscribeActive: (g) => {
|
|
2832
|
+
const h = [];
|
|
2833
|
+
if (e.subscribeVisibility) {
|
|
2834
|
+
const T = e.subscribeVisibility(() => {
|
|
2835
|
+
const b = r();
|
|
2836
|
+
l(), g(b);
|
|
2837
|
+
});
|
|
2838
|
+
h.push(T);
|
|
2839
|
+
}
|
|
2840
|
+
if (e.ttsService) {
|
|
2841
|
+
const T = `tts-toolbar:${s}`, b = (S) => {
|
|
2842
|
+
a(String(S || ""));
|
|
2843
|
+
const L = r();
|
|
2844
|
+
l(), g(L);
|
|
2845
|
+
};
|
|
2846
|
+
e.ttsService.onStateChange(T, b), h.push(() => {
|
|
2847
|
+
e.ttsService?.offStateChange(T, b);
|
|
2848
|
+
});
|
|
2849
|
+
}
|
|
2850
|
+
return h.length === 0 ? () => {
|
|
2851
|
+
} : () => {
|
|
2852
|
+
for (const T of h)
|
|
2853
|
+
T();
|
|
2854
|
+
};
|
|
2727
2855
|
}
|
|
2728
2856
|
};
|
|
2729
2857
|
}
|
|
2730
|
-
},
|
|
2858
|
+
}, vr = {
|
|
2731
2859
|
toolId: "ruler",
|
|
2732
2860
|
name: "Ruler",
|
|
2733
2861
|
description: "On-screen ruler for measurements",
|
|
@@ -2746,10 +2874,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2746
2874
|
* Pass 2: Ruler is relevant when math content is present
|
|
2747
2875
|
*/
|
|
2748
2876
|
isVisibleInContext(t) {
|
|
2749
|
-
return
|
|
2877
|
+
return Rt(t);
|
|
2750
2878
|
},
|
|
2751
2879
|
renderToolbar(t, e) {
|
|
2752
|
-
const i =
|
|
2880
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
2753
2881
|
toolId: this.toolId,
|
|
2754
2882
|
label: this.name,
|
|
2755
2883
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -2758,14 +2886,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2758
2886
|
tooltip: "Ruler",
|
|
2759
2887
|
onClick: () => e.toggleTool(this.toolId),
|
|
2760
2888
|
active: e.isToolVisible(i)
|
|
2761
|
-
},
|
|
2762
|
-
return
|
|
2889
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
2890
|
+
return r.setAttribute("tool-id", i), {
|
|
2763
2891
|
toolId: this.toolId,
|
|
2764
2892
|
button: n,
|
|
2765
|
-
|
|
2893
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
2766
2894
|
sync: () => {
|
|
2767
2895
|
const o = e.isToolVisible(i);
|
|
2768
|
-
n.active = o,
|
|
2896
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
2769
2897
|
},
|
|
2770
2898
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2771
2899
|
o(e.isToolVisible(i));
|
|
@@ -2773,7 +2901,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2773
2901
|
}
|
|
2774
2902
|
};
|
|
2775
2903
|
}
|
|
2776
|
-
},
|
|
2904
|
+
}, br = {
|
|
2777
2905
|
toolId: "protractor",
|
|
2778
2906
|
name: "Protractor",
|
|
2779
2907
|
description: "On-screen protractor for angle measurements",
|
|
@@ -2792,10 +2920,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2792
2920
|
* Pass 2: Protractor is relevant when math content is present
|
|
2793
2921
|
*/
|
|
2794
2922
|
isVisibleInContext(t) {
|
|
2795
|
-
return
|
|
2923
|
+
return Rt(t);
|
|
2796
2924
|
},
|
|
2797
2925
|
renderToolbar(t, e) {
|
|
2798
|
-
const i =
|
|
2926
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
2799
2927
|
toolId: this.toolId,
|
|
2800
2928
|
label: this.name,
|
|
2801
2929
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -2804,14 +2932,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2804
2932
|
tooltip: "Protractor",
|
|
2805
2933
|
onClick: () => e.toggleTool(this.toolId),
|
|
2806
2934
|
active: e.isToolVisible(i)
|
|
2807
|
-
},
|
|
2808
|
-
return
|
|
2935
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
2936
|
+
return r.setAttribute("tool-id", i), {
|
|
2809
2937
|
toolId: this.toolId,
|
|
2810
2938
|
button: n,
|
|
2811
|
-
|
|
2939
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
2812
2940
|
sync: () => {
|
|
2813
2941
|
const o = e.isToolVisible(i);
|
|
2814
|
-
n.active = o,
|
|
2942
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
2815
2943
|
},
|
|
2816
2944
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2817
2945
|
o(e.isToolVisible(i));
|
|
@@ -2819,7 +2947,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2819
2947
|
}
|
|
2820
2948
|
};
|
|
2821
2949
|
}
|
|
2822
|
-
},
|
|
2950
|
+
}, _r = {
|
|
2823
2951
|
toolId: "answerEliminator",
|
|
2824
2952
|
name: "Answer Eliminator",
|
|
2825
2953
|
description: "Strike through answer choices",
|
|
@@ -2842,12 +2970,12 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2842
2970
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
2843
2971
|
*/
|
|
2844
2972
|
isVisibleInContext(t) {
|
|
2845
|
-
return
|
|
2973
|
+
return rr(t);
|
|
2846
2974
|
},
|
|
2847
2975
|
renderToolbar(t, e) {
|
|
2848
|
-
const i =
|
|
2849
|
-
|
|
2850
|
-
const
|
|
2976
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides ?? {}, s = ce(this.toolId, t, e, n);
|
|
2977
|
+
s.setAttribute("tool-id", i), s.setAttribute("strategy", "strikethrough"), s.setAttribute("button-alignment", "inline");
|
|
2978
|
+
const r = {
|
|
2851
2979
|
toolId: this.toolId,
|
|
2852
2980
|
label: this.name,
|
|
2853
2981
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M19,3H16.3H7.7H5A2,2 0 0,0 3,5V7.7V16.4V19A2,2 0 0,0 5,21H7.7H16.4H19A2,2 0 0,0 21,19V16.3V7.7V5A2,2 0 0,0 19,3M15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4L13.4,12L17,15.6L15.6,17Z"/></svg>',
|
|
@@ -2859,13 +2987,13 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2859
2987
|
};
|
|
2860
2988
|
return {
|
|
2861
2989
|
toolId: this.toolId,
|
|
2862
|
-
button:
|
|
2863
|
-
|
|
2990
|
+
button: r,
|
|
2991
|
+
elements: [{ element: s, mount: "after-buttons" }],
|
|
2864
2992
|
sync: () => {
|
|
2865
2993
|
const o = e.isToolVisible(i);
|
|
2866
|
-
|
|
2994
|
+
r.active = o, s.visible = o, e.toolCoordinator && (s.coordinator = e.toolCoordinator), s.scopeElement = e.getScopeElement?.() || null, e.elementToolStateStore && (s.elementToolStateStore = e.elementToolStateStore);
|
|
2867
2995
|
const l = e.getGlobalElementId?.();
|
|
2868
|
-
l && (
|
|
2996
|
+
l && (s.globalElementId = l);
|
|
2869
2997
|
},
|
|
2870
2998
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2871
2999
|
o(e.isToolVisible(i));
|
|
@@ -2873,7 +3001,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2873
3001
|
}
|
|
2874
3002
|
};
|
|
2875
3003
|
}
|
|
2876
|
-
},
|
|
3004
|
+
}, yr = {
|
|
2877
3005
|
toolId: "highlighter",
|
|
2878
3006
|
name: "Highlighter",
|
|
2879
3007
|
description: "Highlight text",
|
|
@@ -2886,10 +3014,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2886
3014
|
* Pass 2: Highlighter is relevant when readable text is available
|
|
2887
3015
|
*/
|
|
2888
3016
|
isVisibleInContext(t) {
|
|
2889
|
-
return
|
|
3017
|
+
return Ot(t);
|
|
2890
3018
|
},
|
|
2891
3019
|
renderToolbar(t, e) {
|
|
2892
|
-
const i =
|
|
3020
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
2893
3021
|
toolId: this.toolId,
|
|
2894
3022
|
label: this.name,
|
|
2895
3023
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -2898,14 +3026,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2898
3026
|
tooltip: "Highlight",
|
|
2899
3027
|
onClick: () => e.toggleTool(this.toolId),
|
|
2900
3028
|
active: e.isToolVisible(i)
|
|
2901
|
-
},
|
|
2902
|
-
return
|
|
3029
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
3030
|
+
return r.setAttribute("tool-id", i), {
|
|
2903
3031
|
toolId: this.toolId,
|
|
2904
3032
|
button: n,
|
|
2905
|
-
|
|
3033
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
2906
3034
|
sync: () => {
|
|
2907
3035
|
const o = e.isToolVisible(i);
|
|
2908
|
-
n.active = o,
|
|
3036
|
+
n.active = o, r.enabled = o, r.visible = o, e.ttsService && (r.ttsService = e.ttsService);
|
|
2909
3037
|
},
|
|
2910
3038
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2911
3039
|
o(e.isToolVisible(i));
|
|
@@ -2913,7 +3041,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2913
3041
|
}
|
|
2914
3042
|
};
|
|
2915
3043
|
}
|
|
2916
|
-
},
|
|
3044
|
+
}, Tr = {
|
|
2917
3045
|
toolId: "lineReader",
|
|
2918
3046
|
name: "Line Reader",
|
|
2919
3047
|
description: "Reading guide overlay",
|
|
@@ -2938,10 +3066,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2938
3066
|
* Pass 2: Line reader is relevant when readable text is present
|
|
2939
3067
|
*/
|
|
2940
3068
|
isVisibleInContext(t) {
|
|
2941
|
-
return
|
|
3069
|
+
return Ot(t);
|
|
2942
3070
|
},
|
|
2943
3071
|
renderToolbar(t, e) {
|
|
2944
|
-
const i =
|
|
3072
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
2945
3073
|
toolId: this.toolId,
|
|
2946
3074
|
label: this.name,
|
|
2947
3075
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -2950,14 +3078,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2950
3078
|
tooltip: "Line Reader",
|
|
2951
3079
|
onClick: () => e.toggleTool(this.toolId),
|
|
2952
3080
|
active: e.isToolVisible(i)
|
|
2953
|
-
},
|
|
2954
|
-
return
|
|
3081
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
3082
|
+
return r.setAttribute("tool-id", i), {
|
|
2955
3083
|
toolId: this.toolId,
|
|
2956
3084
|
button: n,
|
|
2957
|
-
|
|
3085
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
2958
3086
|
sync: () => {
|
|
2959
3087
|
const o = e.isToolVisible(i);
|
|
2960
|
-
n.active = o,
|
|
3088
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
2961
3089
|
},
|
|
2962
3090
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2963
3091
|
o(e.isToolVisible(i));
|
|
@@ -2965,10 +3093,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2965
3093
|
}
|
|
2966
3094
|
};
|
|
2967
3095
|
}
|
|
2968
|
-
},
|
|
2969
|
-
toolId: "
|
|
2970
|
-
name: "
|
|
2971
|
-
description: "Accessible
|
|
3096
|
+
}, Ar = {
|
|
3097
|
+
toolId: "theme",
|
|
3098
|
+
name: "Theme",
|
|
3099
|
+
description: "Accessible themes and contrast",
|
|
2972
3100
|
icon: "swatch",
|
|
2973
3101
|
// Color scheme is assessment-wide
|
|
2974
3102
|
supportedLevels: ["assessment", "section"],
|
|
@@ -2982,7 +3110,9 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2982
3110
|
"invertColors",
|
|
2983
3111
|
// QTI 3.0 standard (visual.invertColors)
|
|
2984
3112
|
"colorScheme",
|
|
2985
|
-
//
|
|
3113
|
+
// Legacy alias
|
|
3114
|
+
"theme",
|
|
3115
|
+
// Canonical id
|
|
2986
3116
|
"highContrast",
|
|
2987
3117
|
// Common variant
|
|
2988
3118
|
"customColors"
|
|
@@ -2995,23 +3125,23 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
2995
3125
|
return !0;
|
|
2996
3126
|
},
|
|
2997
3127
|
renderToolbar(t, e) {
|
|
2998
|
-
const i =
|
|
3128
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
2999
3129
|
toolId: this.toolId,
|
|
3000
3130
|
label: this.name,
|
|
3001
3131
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3002
3132
|
disabled: !1,
|
|
3003
|
-
ariaLabel: "
|
|
3004
|
-
tooltip: "
|
|
3133
|
+
ariaLabel: "Theme - Change colors and contrast",
|
|
3134
|
+
tooltip: "Theme",
|
|
3005
3135
|
onClick: () => e.toggleTool(this.toolId),
|
|
3006
3136
|
active: e.isToolVisible(i)
|
|
3007
|
-
},
|
|
3008
|
-
return
|
|
3137
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
3138
|
+
return r.setAttribute("tool-id", i), {
|
|
3009
3139
|
toolId: this.toolId,
|
|
3010
3140
|
button: n,
|
|
3011
|
-
|
|
3141
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
3012
3142
|
sync: () => {
|
|
3013
3143
|
const o = e.isToolVisible(i);
|
|
3014
|
-
n.active = o,
|
|
3144
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3015
3145
|
},
|
|
3016
3146
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3017
3147
|
o(e.isToolVisible(i));
|
|
@@ -3019,7 +3149,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3019
3149
|
}
|
|
3020
3150
|
};
|
|
3021
3151
|
}
|
|
3022
|
-
},
|
|
3152
|
+
}, Ir = Ar, Er = {
|
|
3023
3153
|
toolId: "annotationToolbar",
|
|
3024
3154
|
name: "Highlighter",
|
|
3025
3155
|
description: "Highlight and annotate text",
|
|
@@ -3044,10 +3174,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3044
3174
|
* Pass 2: Annotation is relevant when readable text is present
|
|
3045
3175
|
*/
|
|
3046
3176
|
isVisibleInContext(t) {
|
|
3047
|
-
return
|
|
3177
|
+
return Ot(t);
|
|
3048
3178
|
},
|
|
3049
3179
|
renderToolbar(t, e) {
|
|
3050
|
-
const i =
|
|
3180
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
3051
3181
|
toolId: this.toolId,
|
|
3052
3182
|
label: this.name,
|
|
3053
3183
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3056,14 +3186,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3056
3186
|
tooltip: "Highlight",
|
|
3057
3187
|
onClick: () => e.toggleTool(this.toolId),
|
|
3058
3188
|
active: e.isToolVisible(i)
|
|
3059
|
-
},
|
|
3060
|
-
return
|
|
3189
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
3190
|
+
return r.setAttribute("tool-id", i), {
|
|
3061
3191
|
toolId: this.toolId,
|
|
3062
3192
|
button: n,
|
|
3063
|
-
|
|
3193
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
3064
3194
|
sync: () => {
|
|
3065
3195
|
const o = e.isToolVisible(i);
|
|
3066
|
-
n.active = o,
|
|
3196
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3067
3197
|
},
|
|
3068
3198
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3069
3199
|
o(e.isToolVisible(i));
|
|
@@ -3071,7 +3201,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3071
3201
|
}
|
|
3072
3202
|
};
|
|
3073
3203
|
}
|
|
3074
|
-
},
|
|
3204
|
+
}, wr = {
|
|
3075
3205
|
toolId: "graph",
|
|
3076
3206
|
name: "Graph",
|
|
3077
3207
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -3094,10 +3224,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3094
3224
|
* Pass 2: Graph is relevant when math content is present
|
|
3095
3225
|
*/
|
|
3096
3226
|
isVisibleInContext(t) {
|
|
3097
|
-
return
|
|
3227
|
+
return Rt(t);
|
|
3098
3228
|
},
|
|
3099
3229
|
renderToolbar(t, e) {
|
|
3100
|
-
const i =
|
|
3230
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
3101
3231
|
toolId: this.toolId,
|
|
3102
3232
|
label: this.name,
|
|
3103
3233
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3106,14 +3236,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3106
3236
|
tooltip: "Graph",
|
|
3107
3237
|
onClick: () => e.toggleTool(this.toolId),
|
|
3108
3238
|
active: e.isToolVisible(i)
|
|
3109
|
-
},
|
|
3110
|
-
return
|
|
3239
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
3240
|
+
return r.setAttribute("tool-id", i), {
|
|
3111
3241
|
toolId: this.toolId,
|
|
3112
3242
|
button: n,
|
|
3113
|
-
|
|
3243
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
3114
3244
|
sync: () => {
|
|
3115
3245
|
const o = e.isToolVisible(i);
|
|
3116
|
-
n.active = o,
|
|
3246
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3117
3247
|
},
|
|
3118
3248
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3119
3249
|
o(e.isToolVisible(i));
|
|
@@ -3121,7 +3251,7 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3121
3251
|
}
|
|
3122
3252
|
};
|
|
3123
3253
|
}
|
|
3124
|
-
},
|
|
3254
|
+
}, Sr = {
|
|
3125
3255
|
toolId: "periodicTable",
|
|
3126
3256
|
name: "Periodic Table",
|
|
3127
3257
|
description: "Chemistry periodic table reference",
|
|
@@ -3142,10 +3272,10 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3142
3272
|
* Pass 2: Periodic table is relevant when science content is present
|
|
3143
3273
|
*/
|
|
3144
3274
|
isVisibleInContext(t) {
|
|
3145
|
-
return
|
|
3275
|
+
return or(t);
|
|
3146
3276
|
},
|
|
3147
3277
|
renderToolbar(t, e) {
|
|
3148
|
-
const i =
|
|
3278
|
+
const i = ie(this.toolId, e.scope.level, e.scope.scopeId), n = {
|
|
3149
3279
|
toolId: this.toolId,
|
|
3150
3280
|
label: this.name,
|
|
3151
3281
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3154,14 +3284,14 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3154
3284
|
tooltip: "Periodic Table",
|
|
3155
3285
|
onClick: () => e.toggleTool(this.toolId),
|
|
3156
3286
|
active: e.isToolVisible(i)
|
|
3157
|
-
},
|
|
3158
|
-
return
|
|
3287
|
+
}, s = e.componentOverrides ?? {}, r = ce(this.toolId, t, e, s);
|
|
3288
|
+
return r.setAttribute("tool-id", i), {
|
|
3159
3289
|
toolId: this.toolId,
|
|
3160
3290
|
button: n,
|
|
3161
|
-
|
|
3291
|
+
elements: [{ element: r, mount: "after-buttons" }],
|
|
3162
3292
|
sync: () => {
|
|
3163
3293
|
const o = e.isToolVisible(i);
|
|
3164
|
-
n.active = o,
|
|
3294
|
+
n.active = o, r.visible = o, e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3165
3295
|
},
|
|
3166
3296
|
subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3167
3297
|
o(e.isToolVisible(i));
|
|
@@ -3170,26 +3300,26 @@ const ts = /* @__PURE__ */ new Set([
|
|
|
3170
3300
|
};
|
|
3171
3301
|
}
|
|
3172
3302
|
};
|
|
3173
|
-
function
|
|
3174
|
-
const e = new
|
|
3303
|
+
function $r(t = {}) {
|
|
3304
|
+
const e = new ir(), i = {
|
|
3175
3305
|
toolTagMap: {
|
|
3176
|
-
...
|
|
3306
|
+
...Sn,
|
|
3177
3307
|
...t.toolTagMap || {}
|
|
3178
3308
|
},
|
|
3179
3309
|
toolComponentFactory: t.toolComponentFactory,
|
|
3180
3310
|
toolComponentFactories: t.toolComponentFactories
|
|
3181
|
-
}, n = (
|
|
3182
|
-
return e.register(n(
|
|
3311
|
+
}, n = (s) => t.overrides?.[s.toolId] || s;
|
|
3312
|
+
return e.register(n(gr)), e.register(n(mr)), e.register(n(vr)), e.register(n(br)), e.register(n(_r)), e.register(n(yr)), e.register(n(Tr)), e.register(n(Ir)), e.register(n(Er)), e.register(n(wr)), e.register(n(Sr)), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
|
|
3183
3313
|
}
|
|
3184
|
-
function
|
|
3185
|
-
const t =
|
|
3314
|
+
function Cr() {
|
|
3315
|
+
const t = $r(), e = /* @__PURE__ */ new Set();
|
|
3186
3316
|
for (const i of t.getAllTools())
|
|
3187
3317
|
for (const n of i.pnpSupportIds || [])
|
|
3188
3318
|
e.add(n);
|
|
3189
3319
|
return [...e].sort();
|
|
3190
3320
|
}
|
|
3191
|
-
|
|
3192
|
-
const
|
|
3321
|
+
Cr();
|
|
3322
|
+
const Lr = {
|
|
3193
3323
|
/**
|
|
3194
3324
|
* Visual accessibility features
|
|
3195
3325
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -3360,16 +3490,16 @@ const ys = {
|
|
|
3360
3490
|
tutorialAvailable: "tutorialAvailable"
|
|
3361
3491
|
}
|
|
3362
3492
|
};
|
|
3363
|
-
Object.values(
|
|
3364
|
-
var
|
|
3493
|
+
Object.values(Lr).flatMap((t) => Object.values(t));
|
|
3494
|
+
var Yt;
|
|
3365
3495
|
(function(t) {
|
|
3366
3496
|
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";
|
|
3367
|
-
})(
|
|
3368
|
-
var
|
|
3497
|
+
})(Yt || (Yt = {}));
|
|
3498
|
+
var Ti;
|
|
3369
3499
|
(function(t) {
|
|
3370
3500
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
3371
|
-
})(
|
|
3372
|
-
class
|
|
3501
|
+
})(Ti || (Ti = {}));
|
|
3502
|
+
const O = class O {
|
|
3373
3503
|
constructor() {
|
|
3374
3504
|
f(this, "elementType", "multiple-choice");
|
|
3375
3505
|
f(this, "priority", 100);
|
|
@@ -3378,14 +3508,16 @@ class yn {
|
|
|
3378
3508
|
return e.tagName.toLowerCase() === "multiple-choice" || e.classList.contains("multiple-choice");
|
|
3379
3509
|
}
|
|
3380
3510
|
findChoices(e) {
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
)
|
|
3511
|
+
e.setAttribute(O.ROOT_HOOK_ATTR, "true");
|
|
3512
|
+
const i = Array.from(
|
|
3513
|
+
e.querySelectorAll(O.CHOICE_SELECTOR)
|
|
3385
3514
|
);
|
|
3515
|
+
for (const n of i)
|
|
3516
|
+
this.annotateChoice(n);
|
|
3517
|
+
return this.annotateFeedbackTicks(e), i;
|
|
3386
3518
|
}
|
|
3387
3519
|
createChoiceRange(e) {
|
|
3388
|
-
const i =
|
|
3520
|
+
const i = this.resolveLabelElement(e);
|
|
3389
3521
|
if (!i)
|
|
3390
3522
|
return null;
|
|
3391
3523
|
const n = document.createRange();
|
|
@@ -3398,34 +3530,59 @@ class yn {
|
|
|
3398
3530
|
return i?.getAttribute("value") || i?.id || this.generateFallbackId(e);
|
|
3399
3531
|
}
|
|
3400
3532
|
getChoiceLabel(e) {
|
|
3401
|
-
return
|
|
3533
|
+
return this.resolveLabelElement(e)?.textContent?.trim() || "Unlabeled choice";
|
|
3402
3534
|
}
|
|
3403
3535
|
canEliminate(e) {
|
|
3404
3536
|
const i = e.querySelector(
|
|
3405
3537
|
'input[type="checkbox"], input[type="radio"]'
|
|
3406
3538
|
);
|
|
3407
|
-
return !(!i || i.getAttribute("aria-checked") === "true" || i.disabled || e.closest(".multiple-choice")?.querySelector(
|
|
3539
|
+
return !(!i || i.getAttribute("aria-checked") === "true" || i.disabled || (e.closest(`[${O.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(
|
|
3540
|
+
`[${O.FEEDBACK_HOOK_ATTR}="true"]`
|
|
3541
|
+
));
|
|
3408
3542
|
}
|
|
3409
3543
|
getButtonContainer(e) {
|
|
3410
3544
|
return e;
|
|
3411
3545
|
}
|
|
3412
3546
|
generateFallbackId(e) {
|
|
3413
|
-
const n = e.closest(".multiple-choice")?.querySelectorAll(
|
|
3547
|
+
const n = (e.closest(`[${O.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(
|
|
3548
|
+
`[${O.CHOICE_HOOK_ATTR}="true"]`
|
|
3549
|
+
) || [];
|
|
3414
3550
|
return `choice-${Array.from(n).indexOf(e)}`;
|
|
3415
3551
|
}
|
|
3416
|
-
|
|
3417
|
-
|
|
3552
|
+
annotateChoice(e) {
|
|
3553
|
+
e.setAttribute(O.CHOICE_HOOK_ATTR, "true");
|
|
3554
|
+
const i = this.resolveLabelElement(e);
|
|
3555
|
+
i && i.setAttribute(O.LABEL_HOOK_ATTR, "true");
|
|
3556
|
+
}
|
|
3557
|
+
resolveLabelElement(e) {
|
|
3558
|
+
return e.querySelector(
|
|
3559
|
+
`[${O.LABEL_HOOK_ATTR}="true"]`
|
|
3560
|
+
) || e.querySelector("label") || e.querySelector("span");
|
|
3561
|
+
}
|
|
3562
|
+
annotateFeedbackTicks(e) {
|
|
3563
|
+
for (const i of e.querySelectorAll(
|
|
3564
|
+
".feedback-tick"
|
|
3565
|
+
))
|
|
3566
|
+
i.setAttribute(
|
|
3567
|
+
O.FEEDBACK_HOOK_ATTR,
|
|
3568
|
+
"true"
|
|
3569
|
+
);
|
|
3570
|
+
}
|
|
3571
|
+
};
|
|
3572
|
+
f(O, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), f(O, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label"), f(O, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root"), f(O, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick"), f(O, "CHOICE_SELECTOR", `[${O.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
3573
|
+
let St = O;
|
|
3574
|
+
class Rr {
|
|
3418
3575
|
constructor() {
|
|
3419
3576
|
f(this, "elementType", "ebsr");
|
|
3420
3577
|
f(this, "priority", 95);
|
|
3421
|
-
f(this, "mcAdapter", new
|
|
3578
|
+
f(this, "mcAdapter", new St());
|
|
3422
3579
|
}
|
|
3423
3580
|
canHandle(e) {
|
|
3424
3581
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
3425
3582
|
}
|
|
3426
3583
|
findChoices(e) {
|
|
3427
|
-
const i = e.querySelector('ebsr-multiple-choice[id="a"]'), n = e.querySelector('ebsr-multiple-choice[id="b"]'),
|
|
3428
|
-
return i &&
|
|
3584
|
+
const i = e.querySelector('ebsr-multiple-choice[id="a"]'), n = e.querySelector('ebsr-multiple-choice[id="b"]'), s = [];
|
|
3585
|
+
return i && s.push(...this.mcAdapter.findChoices(i)), n && s.push(...this.mcAdapter.findChoices(n)), s;
|
|
3429
3586
|
}
|
|
3430
3587
|
// Delegate all other methods to MultipleChoiceAdapter
|
|
3431
3588
|
createChoiceRange(e) {
|
|
@@ -3445,7 +3602,7 @@ class _s {
|
|
|
3445
3602
|
return this.mcAdapter.getButtonContainer(e);
|
|
3446
3603
|
}
|
|
3447
3604
|
}
|
|
3448
|
-
class
|
|
3605
|
+
class Or {
|
|
3449
3606
|
constructor() {
|
|
3450
3607
|
f(this, "elementType", "inline-dropdown");
|
|
3451
3608
|
f(this, "priority", 90);
|
|
@@ -3473,13 +3630,13 @@ class ws {
|
|
|
3473
3630
|
return e;
|
|
3474
3631
|
}
|
|
3475
3632
|
}
|
|
3476
|
-
class
|
|
3633
|
+
class kr {
|
|
3477
3634
|
constructor() {
|
|
3478
3635
|
f(this, "adapters");
|
|
3479
3636
|
this.adapters = [
|
|
3480
|
-
new
|
|
3481
|
-
new
|
|
3482
|
-
new
|
|
3637
|
+
new St(),
|
|
3638
|
+
new Rr(),
|
|
3639
|
+
new Or()
|
|
3483
3640
|
].sort((e, i) => i.priority - e.priority);
|
|
3484
3641
|
}
|
|
3485
3642
|
/**
|
|
@@ -3493,10 +3650,10 @@ class Ts {
|
|
|
3493
3650
|
*/
|
|
3494
3651
|
findAllChoicesWithAdapters(e) {
|
|
3495
3652
|
const i = [], n = /* @__PURE__ */ new Set();
|
|
3496
|
-
for (const
|
|
3497
|
-
const
|
|
3498
|
-
for (const o of
|
|
3499
|
-
n.has(o) || (n.add(o), i.push({ choice: o, adapter:
|
|
3653
|
+
for (const s of this.adapters) {
|
|
3654
|
+
const r = s.findChoices(e);
|
|
3655
|
+
for (const o of r)
|
|
3656
|
+
n.has(o) || (n.add(o), i.push({ choice: o, adapter: s }));
|
|
3500
3657
|
}
|
|
3501
3658
|
return i;
|
|
3502
3659
|
}
|
|
@@ -3507,7 +3664,7 @@ class Ts {
|
|
|
3507
3664
|
this.adapters.push(e), this.adapters.sort((i, n) => n.priority - i.priority);
|
|
3508
3665
|
}
|
|
3509
3666
|
}
|
|
3510
|
-
class
|
|
3667
|
+
const C = class C {
|
|
3511
3668
|
constructor() {
|
|
3512
3669
|
f(this, "name", "mask");
|
|
3513
3670
|
f(this, "highlights", /* @__PURE__ */ new Map());
|
|
@@ -3515,10 +3672,9 @@ class Ss {
|
|
|
3515
3672
|
f(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
3516
3673
|
}
|
|
3517
3674
|
initialize() {
|
|
3518
|
-
this.injectCSS();
|
|
3519
3675
|
}
|
|
3520
3676
|
destroy() {
|
|
3521
|
-
this.clearAll()
|
|
3677
|
+
this.clearAll();
|
|
3522
3678
|
}
|
|
3523
3679
|
apply(e, i) {
|
|
3524
3680
|
if (!this.isSupported()) {
|
|
@@ -3527,14 +3683,17 @@ class Ss {
|
|
|
3527
3683
|
}
|
|
3528
3684
|
this.injectHighlightCSS(e);
|
|
3529
3685
|
const n = new Highlight(i);
|
|
3530
|
-
CSS.highlights.set(
|
|
3686
|
+
CSS.highlights.set(
|
|
3687
|
+
`${C.HIGHLIGHT_NAME_PREFIX}${e}`,
|
|
3688
|
+
n
|
|
3689
|
+
), this.highlights.set(e, n), this.ranges.set(e, i), this.addAriaAttributes(i);
|
|
3531
3690
|
}
|
|
3532
3691
|
remove(e) {
|
|
3533
3692
|
if (!this.isSupported()) {
|
|
3534
3693
|
this.removeFallback(e);
|
|
3535
3694
|
return;
|
|
3536
3695
|
}
|
|
3537
|
-
CSS.highlights.delete(
|
|
3696
|
+
CSS.highlights.delete(`${C.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
|
|
3538
3697
|
const i = this.ranges.get(e);
|
|
3539
3698
|
i && this.removeAriaAttributes(i), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
|
|
3540
3699
|
}
|
|
@@ -3552,47 +3711,32 @@ class Ss {
|
|
|
3552
3711
|
isSupported() {
|
|
3553
3712
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
3554
3713
|
}
|
|
3555
|
-
injectCSS() {
|
|
3556
|
-
const e = "answer-eliminator-mask-styles";
|
|
3557
|
-
if (document.getElementById(e)) return;
|
|
3558
|
-
const i = document.createElement("style");
|
|
3559
|
-
i.id = e, i.textContent = `
|
|
3560
|
-
/* Fallback */
|
|
3561
|
-
.answer-masked-fallback {
|
|
3562
|
-
opacity: 0.2;
|
|
3563
|
-
filter: blur(2px);
|
|
3564
|
-
}
|
|
3565
|
-
`, document.head.appendChild(i);
|
|
3566
|
-
}
|
|
3567
3714
|
injectHighlightCSS(e) {
|
|
3568
|
-
const i =
|
|
3715
|
+
const i = `${C.HIGHLIGHT_STYLE_PREFIX}${e}`;
|
|
3569
3716
|
if (document.getElementById(i)) return;
|
|
3570
3717
|
const n = document.createElement("style");
|
|
3571
3718
|
n.id = i, n.textContent = `
|
|
3572
|
-
::highlight(answer-masked-${e}) {
|
|
3719
|
+
::highlight(pie-answer-masked-${e}) {
|
|
3573
3720
|
opacity: 0.2;
|
|
3574
3721
|
filter: blur(2px);
|
|
3575
3722
|
}
|
|
3576
3723
|
`, document.head.appendChild(n);
|
|
3577
3724
|
}
|
|
3578
3725
|
removeHighlightCSS(e) {
|
|
3579
|
-
document.getElementById(
|
|
3580
|
-
}
|
|
3581
|
-
removeCSS() {
|
|
3582
|
-
document.getElementById("answer-eliminator-mask-styles")?.remove();
|
|
3726
|
+
document.getElementById(`${C.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
|
|
3583
3727
|
}
|
|
3584
3728
|
addAriaAttributes(e) {
|
|
3585
3729
|
const i = this.findChoiceContainer(e);
|
|
3586
|
-
i && (i.setAttribute(
|
|
3730
|
+
i && (i.setAttribute(C.ELIMINATED_ATTR, "true"), i.setAttribute("aria-hidden", "true"));
|
|
3587
3731
|
}
|
|
3588
3732
|
removeAriaAttributes(e) {
|
|
3589
3733
|
const i = this.findChoiceContainer(e);
|
|
3590
|
-
i && (i.removeAttribute(
|
|
3734
|
+
i && (i.removeAttribute(C.ELIMINATED_ATTR), i.removeAttribute("aria-hidden"));
|
|
3591
3735
|
}
|
|
3592
3736
|
findChoiceContainer(e) {
|
|
3593
3737
|
let i = e.startContainer;
|
|
3594
3738
|
for (i.nodeType === Node.TEXT_NODE && (i = i.parentElement); i && i !== document.body; ) {
|
|
3595
|
-
if (i.
|
|
3739
|
+
if (i.getAttribute(C.CHOICE_HOOK_ATTR) === "true")
|
|
3596
3740
|
return i;
|
|
3597
3741
|
i = i.parentElement;
|
|
3598
3742
|
}
|
|
@@ -3600,17 +3744,19 @@ class Ss {
|
|
|
3600
3744
|
}
|
|
3601
3745
|
applyFallback(e, i) {
|
|
3602
3746
|
const n = this.findChoiceContainer(i);
|
|
3603
|
-
n && (n.classList.add(
|
|
3747
|
+
n && (n.classList.add(C.FALLBACK_CLASS), n.setAttribute(C.ELIMINATED_ATTR, "true"), n.setAttribute(C.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(i));
|
|
3604
3748
|
}
|
|
3605
3749
|
removeFallback(e) {
|
|
3606
3750
|
const i = this.fallbackContainers.get(e);
|
|
3607
3751
|
if (!i) return;
|
|
3608
|
-
i.classList.remove(
|
|
3752
|
+
i.classList.remove(C.FALLBACK_CLASS), i.removeAttribute(C.ELIMINATED_ATTR), i.removeAttribute(C.ELIMINATED_ID_ATTR);
|
|
3609
3753
|
const n = document.createRange();
|
|
3610
3754
|
n.selectNodeContents(i), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
|
|
3611
3755
|
}
|
|
3612
|
-
}
|
|
3613
|
-
|
|
3756
|
+
};
|
|
3757
|
+
f(C, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-"), f(C, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-"), f(C, "FALLBACK_CLASS", "pie-answer-masked-fallback"), f(C, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), f(C, "ELIMINATED_ATTR", "data-pie-answer-eliminated"), f(C, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
3758
|
+
let Ut = C;
|
|
3759
|
+
const w = class w {
|
|
3614
3760
|
constructor() {
|
|
3615
3761
|
f(this, "name", "strikethrough");
|
|
3616
3762
|
f(this, "highlights", /* @__PURE__ */ new Map());
|
|
@@ -3618,14 +3764,10 @@ class As {
|
|
|
3618
3764
|
f(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
3619
3765
|
}
|
|
3620
3766
|
initialize() {
|
|
3621
|
-
|
|
3622
|
-
console.warn("CSS Custom Highlight API not supported, using fallback");
|
|
3623
|
-
return;
|
|
3624
|
-
}
|
|
3625
|
-
this.injectCSS();
|
|
3767
|
+
this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
|
|
3626
3768
|
}
|
|
3627
3769
|
destroy() {
|
|
3628
|
-
this.clearAll()
|
|
3770
|
+
this.clearAll();
|
|
3629
3771
|
}
|
|
3630
3772
|
apply(e, i) {
|
|
3631
3773
|
if (!this.isSupported()) {
|
|
@@ -3634,14 +3776,19 @@ class As {
|
|
|
3634
3776
|
}
|
|
3635
3777
|
this.injectHighlightCSS(e);
|
|
3636
3778
|
const n = new Highlight(i);
|
|
3637
|
-
CSS.highlights.set(
|
|
3779
|
+
CSS.highlights.set(
|
|
3780
|
+
`${w.HIGHLIGHT_NAME_PREFIX}${e}`,
|
|
3781
|
+
n
|
|
3782
|
+
), this.highlights.set(e, n), this.ranges.set(e, i), this.addAriaAttributes(i);
|
|
3638
3783
|
}
|
|
3639
3784
|
remove(e) {
|
|
3640
3785
|
if (!this.isSupported()) {
|
|
3641
3786
|
this.removeFallback(e);
|
|
3642
3787
|
return;
|
|
3643
3788
|
}
|
|
3644
|
-
CSS.highlights.delete(
|
|
3789
|
+
CSS.highlights.delete(
|
|
3790
|
+
`${w.HIGHLIGHT_NAME_PREFIX}${e}`
|
|
3791
|
+
), this.removeHighlightCSS(e);
|
|
3645
3792
|
const i = this.ranges.get(e);
|
|
3646
3793
|
i && this.removeAriaAttributes(i), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
|
|
3647
3794
|
}
|
|
@@ -3659,35 +3806,12 @@ class As {
|
|
|
3659
3806
|
isSupported() {
|
|
3660
3807
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
3661
3808
|
}
|
|
3662
|
-
injectCSS() {
|
|
3663
|
-
const e = "answer-eliminator-strikethrough-styles";
|
|
3664
|
-
if (document.getElementById(e)) return;
|
|
3665
|
-
const i = document.createElement("style");
|
|
3666
|
-
i.id = e, i.textContent = `
|
|
3667
|
-
/* Fallback for browsers without CSS Highlight API */
|
|
3668
|
-
.answer-eliminated-fallback {
|
|
3669
|
-
text-decoration: line-through;
|
|
3670
|
-
text-decoration-thickness: 2px;
|
|
3671
|
-
text-decoration-color: var(--pie-incorrect, #ff9800);
|
|
3672
|
-
opacity: 0.6;
|
|
3673
|
-
}
|
|
3674
|
-
|
|
3675
|
-
/* Screen reader only text */
|
|
3676
|
-
.sr-announcement {
|
|
3677
|
-
position: absolute;
|
|
3678
|
-
left: -10000px;
|
|
3679
|
-
width: 1px;
|
|
3680
|
-
height: 1px;
|
|
3681
|
-
overflow: hidden;
|
|
3682
|
-
}
|
|
3683
|
-
`, document.head.appendChild(i);
|
|
3684
|
-
}
|
|
3685
3809
|
injectHighlightCSS(e) {
|
|
3686
|
-
const i =
|
|
3810
|
+
const i = `${w.HIGHLIGHT_STYLE_PREFIX}${e}`;
|
|
3687
3811
|
if (document.getElementById(i)) return;
|
|
3688
3812
|
const n = document.createElement("style");
|
|
3689
3813
|
n.id = i, n.textContent = `
|
|
3690
|
-
::highlight(answer-eliminated-${e}) {
|
|
3814
|
+
::highlight(pie-answer-eliminated-${e}) {
|
|
3691
3815
|
text-decoration: line-through;
|
|
3692
3816
|
text-decoration-thickness: 2px;
|
|
3693
3817
|
text-decoration-color: var(--pie-incorrect, #ff9800);
|
|
@@ -3696,32 +3820,31 @@ class As {
|
|
|
3696
3820
|
`, document.head.appendChild(n);
|
|
3697
3821
|
}
|
|
3698
3822
|
removeHighlightCSS(e) {
|
|
3699
|
-
document.getElementById(`answer-eliminator-highlight-${e}`)?.remove();
|
|
3700
|
-
}
|
|
3701
|
-
removeCSS() {
|
|
3702
3823
|
document.getElementById(
|
|
3703
|
-
|
|
3824
|
+
`${w.HIGHLIGHT_STYLE_PREFIX}${e}`
|
|
3704
3825
|
)?.remove();
|
|
3705
3826
|
}
|
|
3706
3827
|
addAriaAttributes(e) {
|
|
3707
3828
|
const i = this.findChoiceContainer(e);
|
|
3708
3829
|
if (!i) return;
|
|
3709
|
-
i.setAttribute(
|
|
3710
|
-
const n =
|
|
3711
|
-
if (n && !n.querySelector(
|
|
3712
|
-
const
|
|
3713
|
-
|
|
3830
|
+
i.setAttribute(w.ELIMINATED_ATTR, "true"), i.setAttribute("aria-disabled", "true");
|
|
3831
|
+
const n = this.resolveLabelElement(i);
|
|
3832
|
+
if (n && !n.querySelector(`.${w.SR_CLASS}`)) {
|
|
3833
|
+
const s = document.createElement("span");
|
|
3834
|
+
s.className = w.SR_CLASS, s.textContent = " (eliminated)", n.appendChild(s);
|
|
3714
3835
|
}
|
|
3715
3836
|
}
|
|
3716
3837
|
removeAriaAttributes(e) {
|
|
3717
3838
|
const i = this.findChoiceContainer(e);
|
|
3718
3839
|
if (!i) return;
|
|
3719
|
-
i.removeAttribute(
|
|
3840
|
+
i.removeAttribute(w.ELIMINATED_ATTR), i.removeAttribute("aria-disabled"), i.querySelector(
|
|
3841
|
+
`.${w.SR_CLASS}`
|
|
3842
|
+
)?.remove();
|
|
3720
3843
|
}
|
|
3721
3844
|
findChoiceContainer(e) {
|
|
3722
3845
|
let i = e.startContainer;
|
|
3723
3846
|
for (i.nodeType === Node.TEXT_NODE && (i = i.parentElement); i && i !== document.body; ) {
|
|
3724
|
-
if (i.
|
|
3847
|
+
if (i.getAttribute(w.CHOICE_HOOK_ATTR) === "true")
|
|
3725
3848
|
return i;
|
|
3726
3849
|
i = i.parentElement;
|
|
3727
3850
|
}
|
|
@@ -3730,17 +3853,24 @@ class As {
|
|
|
3730
3853
|
// Fallback for browsers without CSS Highlight API
|
|
3731
3854
|
applyFallback(e, i) {
|
|
3732
3855
|
const n = this.findChoiceContainer(i);
|
|
3733
|
-
n && (n.classList.add(
|
|
3856
|
+
n && (n.classList.add(w.FALLBACK_CLASS), n.setAttribute(w.ELIMINATED_ATTR, "true"), n.setAttribute(w.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(i));
|
|
3734
3857
|
}
|
|
3735
3858
|
removeFallback(e) {
|
|
3736
3859
|
const i = this.fallbackContainers.get(e);
|
|
3737
3860
|
if (!i) return;
|
|
3738
|
-
i.classList.remove(
|
|
3861
|
+
i.classList.remove(w.FALLBACK_CLASS), i.removeAttribute(w.ELIMINATED_ATTR), i.removeAttribute(w.ELIMINATED_ID_ATTR);
|
|
3739
3862
|
const n = document.createRange();
|
|
3740
3863
|
n.selectNodeContents(i), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
|
|
3741
3864
|
}
|
|
3742
|
-
|
|
3743
|
-
|
|
3865
|
+
resolveLabelElement(e) {
|
|
3866
|
+
return e.querySelector(
|
|
3867
|
+
`[${w.LABEL_HOOK_ATTR}="true"]`
|
|
3868
|
+
) || e.querySelector("label");
|
|
3869
|
+
}
|
|
3870
|
+
};
|
|
3871
|
+
f(w, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-"), f(w, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-"), f(w, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback"), f(w, "SR_CLASS", "pie-answer-eliminator-sr-announcement"), f(w, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), f(w, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label"), f(w, "ELIMINATED_ATTR", "data-pie-answer-eliminated"), f(w, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
3872
|
+
let xt = w;
|
|
3873
|
+
const Te = class Te {
|
|
3744
3874
|
constructor(e = "strikethrough", i = "right") {
|
|
3745
3875
|
f(this, "registry");
|
|
3746
3876
|
f(this, "strategy");
|
|
@@ -3757,10 +3887,10 @@ class Is {
|
|
|
3757
3887
|
// Whether to restore eliminations from state storage
|
|
3758
3888
|
// Store integration (replaces session/localStorage)
|
|
3759
3889
|
f(this, "storeIntegration", null);
|
|
3760
|
-
this.registry = new
|
|
3890
|
+
this.registry = new kr(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = i;
|
|
3761
3891
|
}
|
|
3762
3892
|
createStrategy(e) {
|
|
3763
|
-
return e === "mask" ? new
|
|
3893
|
+
return e === "mask" ? new Ut() : new xt();
|
|
3764
3894
|
}
|
|
3765
3895
|
/**
|
|
3766
3896
|
* Initialize eliminator for a question
|
|
@@ -3768,8 +3898,8 @@ class Is {
|
|
|
3768
3898
|
initializeForQuestion(e) {
|
|
3769
3899
|
this.cleanupButtons();
|
|
3770
3900
|
const i = this.registry.findAllChoicesWithAdapters(e);
|
|
3771
|
-
for (const { choice: n, adapter:
|
|
3772
|
-
this.initializeChoice(n,
|
|
3901
|
+
for (const { choice: n, adapter: s } of i)
|
|
3902
|
+
this.initializeChoice(n, s);
|
|
3773
3903
|
this.shouldRestoreState && this.restoreState();
|
|
3774
3904
|
}
|
|
3775
3905
|
/**
|
|
@@ -3778,40 +3908,20 @@ class Is {
|
|
|
3778
3908
|
initializeChoice(e, i) {
|
|
3779
3909
|
const n = i.getChoiceId(e);
|
|
3780
3910
|
this.choiceElements.set(n, e), this.choiceAdapters.set(n, i);
|
|
3781
|
-
const
|
|
3782
|
-
if (!
|
|
3783
|
-
this.choiceButtons.set(n,
|
|
3784
|
-
const
|
|
3785
|
-
|
|
3911
|
+
const s = this.createToggleButton(e, i);
|
|
3912
|
+
if (!s) return;
|
|
3913
|
+
this.choiceButtons.set(n, s);
|
|
3914
|
+
const r = i.getButtonContainer(e);
|
|
3915
|
+
r && (r.style.position = "relative", r.appendChild(s));
|
|
3786
3916
|
}
|
|
3787
3917
|
/**
|
|
3788
3918
|
* Create elimination toggle button
|
|
3789
3919
|
*/
|
|
3790
3920
|
createToggleButton(e, i) {
|
|
3791
|
-
const n = i.getChoiceId(e),
|
|
3792
|
-
return
|
|
3793
|
-
width: "28px",
|
|
3794
|
-
height: "28px",
|
|
3795
|
-
padding: "0",
|
|
3796
|
-
border: "1px solid #ccc",
|
|
3797
|
-
borderRadius: "4px",
|
|
3798
|
-
background: "white",
|
|
3799
|
-
cursor: "pointer",
|
|
3800
|
-
fontSize: "18px",
|
|
3801
|
-
lineHeight: "1",
|
|
3802
|
-
display: "flex",
|
|
3803
|
-
alignItems: "center",
|
|
3804
|
-
justifyContent: "center",
|
|
3805
|
-
color: "#666",
|
|
3806
|
-
transition: "all 0.2s ease",
|
|
3807
|
-
zIndex: "10"
|
|
3808
|
-
}), s.addEventListener("mouseenter", () => {
|
|
3809
|
-
s.style.background = "#f0f0f0", s.style.borderColor = "#999", s.style.color = "#333";
|
|
3810
|
-
}), s.addEventListener("mouseleave", () => {
|
|
3811
|
-
this.strategy.isEliminated(n) || (s.style.background = "white", s.style.borderColor = "#ccc", s.style.color = "#666");
|
|
3812
|
-
}), s.addEventListener("click", (o) => {
|
|
3921
|
+
const n = i.getChoiceId(e), s = i.getChoiceLabel(e), r = document.createElement("button");
|
|
3922
|
+
return r.type = "button", r.className = Te.TOGGLE_CLASS, r.setAttribute("aria-label", `Toggle elimination for ${s}`), r.setAttribute("data-choice-id", n), r.textContent = "⊗", this.applyButtonAlignment(r), r.addEventListener("click", (o) => {
|
|
3813
3923
|
o.preventDefault(), o.stopPropagation(), this.toggleElimination(e, i);
|
|
3814
|
-
}),
|
|
3924
|
+
}), r;
|
|
3815
3925
|
}
|
|
3816
3926
|
/**
|
|
3817
3927
|
* Toggle elimination for a choice
|
|
@@ -3835,14 +3945,14 @@ class Is {
|
|
|
3835
3945
|
* Eliminate a choice
|
|
3836
3946
|
*/
|
|
3837
3947
|
eliminateChoice(e, i) {
|
|
3838
|
-
const n = i.getChoiceId(e),
|
|
3839
|
-
if (!
|
|
3948
|
+
const n = i.getChoiceId(e), s = i.createChoiceRange(e);
|
|
3949
|
+
if (!s) {
|
|
3840
3950
|
console.error("Failed to create range for choice");
|
|
3841
3951
|
return;
|
|
3842
3952
|
}
|
|
3843
|
-
this.strategy.apply(n,
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3953
|
+
this.strategy.apply(n, s), this.eliminatedChoices.add(n);
|
|
3954
|
+
const r = this.choiceButtons.get(n);
|
|
3955
|
+
r && (r.classList.add(Te.TOGGLE_ACTIVE_CLASS), r.setAttribute("aria-pressed", "true")), this.saveState();
|
|
3846
3956
|
}
|
|
3847
3957
|
/**
|
|
3848
3958
|
* Restore a choice
|
|
@@ -3850,7 +3960,7 @@ class Is {
|
|
|
3850
3960
|
restoreChoice(e) {
|
|
3851
3961
|
this.strategy.remove(e), this.eliminatedChoices.delete(e);
|
|
3852
3962
|
const i = this.choiceButtons.get(e);
|
|
3853
|
-
i && (i.classList.remove(
|
|
3963
|
+
i && (i.classList.remove(Te.TOGGLE_ACTIVE_CLASS), i.setAttribute("aria-pressed", "false")), this.saveState();
|
|
3854
3964
|
}
|
|
3855
3965
|
/**
|
|
3856
3966
|
* Reset all eliminations for current element
|
|
@@ -3904,15 +4014,15 @@ class Is {
|
|
|
3904
4014
|
const i = e.eliminatedChoices;
|
|
3905
4015
|
if (!i || i.length === 0) return;
|
|
3906
4016
|
for (const n of i) {
|
|
3907
|
-
const
|
|
3908
|
-
if (!r) continue;
|
|
3909
|
-
const s = this.choiceAdapters.get(n);
|
|
4017
|
+
const s = this.choiceElements.get(n);
|
|
3910
4018
|
if (!s) continue;
|
|
3911
|
-
const
|
|
4019
|
+
const r = this.choiceAdapters.get(n);
|
|
4020
|
+
if (!r) continue;
|
|
4021
|
+
const o = r.createChoiceRange(s);
|
|
3912
4022
|
if (o) {
|
|
3913
4023
|
this.strategy.apply(n, o), this.eliminatedChoices.add(n);
|
|
3914
4024
|
const l = this.choiceButtons.get(n);
|
|
3915
|
-
l && (l.classList.add(
|
|
4025
|
+
l && (l.classList.add(Te.TOGGLE_ACTIVE_CLASS), l.setAttribute("aria-pressed", "true"));
|
|
3916
4026
|
}
|
|
3917
4027
|
}
|
|
3918
4028
|
} catch (i) {
|
|
@@ -3985,145 +4095,147 @@ class Is {
|
|
|
3985
4095
|
destroy() {
|
|
3986
4096
|
this.cleanupButtons(), this.strategy.destroy();
|
|
3987
4097
|
}
|
|
3988
|
-
}
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
4098
|
+
};
|
|
4099
|
+
f(Te, "TOGGLE_CLASS", "pie-answer-eliminator-toggle"), f(Te, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
4100
|
+
let Xt = Te;
|
|
4101
|
+
var Hr = /* @__PURE__ */ Vs('<div style="display: none;" aria-hidden="true"></div>');
|
|
4102
|
+
function Nr(t, e) {
|
|
4103
|
+
Hi(e, !0);
|
|
4104
|
+
let i = ye(e, "visible", 7, !1), n = ye(e, "toolId", 7, "answerEliminator"), s = ye(e, "strategy", 7, "strikethrough"), r = ye(
|
|
3993
4105
|
e,
|
|
3994
4106
|
"alwaysOn",
|
|
3995
4107
|
7,
|
|
3996
4108
|
!1
|
|
3997
4109
|
// Set true for profile-based accommodation
|
|
3998
|
-
), o =
|
|
4110
|
+
), o = ye(
|
|
3999
4111
|
e,
|
|
4000
4112
|
"buttonAlignment",
|
|
4001
4113
|
7,
|
|
4002
4114
|
"right"
|
|
4003
4115
|
// Button placement: left, right, or inline with checkbox
|
|
4004
|
-
), l =
|
|
4116
|
+
), l = ye(
|
|
4005
4117
|
e,
|
|
4006
4118
|
"scopeElement",
|
|
4007
4119
|
7,
|
|
4008
4120
|
null
|
|
4009
4121
|
// Container element to limit DOM queries (for multi-item pages)
|
|
4010
|
-
), a =
|
|
4122
|
+
), a = ye(
|
|
4011
4123
|
e,
|
|
4012
4124
|
"elementToolStateStore",
|
|
4013
4125
|
7,
|
|
4014
4126
|
null
|
|
4015
4127
|
// ElementToolStateStore instance
|
|
4016
|
-
), u =
|
|
4128
|
+
), u = ye(
|
|
4017
4129
|
e,
|
|
4018
4130
|
"globalElementId",
|
|
4019
4131
|
7,
|
|
4020
4132
|
""
|
|
4021
4133
|
// Composite key: "assessmentId:sectionId:itemId:elementId"
|
|
4022
|
-
), d = /* @__PURE__ */
|
|
4023
|
-
const
|
|
4024
|
-
let h = /* @__PURE__ */
|
|
4025
|
-
|
|
4026
|
-
if (
|
|
4027
|
-
return
|
|
4028
|
-
|
|
4134
|
+
), d = /* @__PURE__ */ P(null), v = /* @__PURE__ */ P(null), p = /* @__PURE__ */ P(null);
|
|
4135
|
+
const g = /* @__PURE__ */ fi(() => m(v)?.toolCoordinator);
|
|
4136
|
+
let h = /* @__PURE__ */ P(null), T = /* @__PURE__ */ P(null), b = /* @__PURE__ */ P(null), S = /* @__PURE__ */ P(null), L = /* @__PURE__ */ fi(() => r() || i());
|
|
4137
|
+
Le(() => {
|
|
4138
|
+
if (m(d))
|
|
4139
|
+
return Js(m(d), (I) => {
|
|
4140
|
+
$(v, I, !0);
|
|
4029
4141
|
});
|
|
4030
|
-
}),
|
|
4031
|
-
if (
|
|
4032
|
-
return
|
|
4033
|
-
|
|
4142
|
+
}), Le(() => {
|
|
4143
|
+
if (m(d))
|
|
4144
|
+
return Zs(m(d), (I) => {
|
|
4145
|
+
$(p, I, !0);
|
|
4034
4146
|
});
|
|
4035
4147
|
});
|
|
4036
|
-
function
|
|
4037
|
-
return l() ||
|
|
4148
|
+
function $n() {
|
|
4149
|
+
return l() || m(p)?.scopeElement || null;
|
|
4038
4150
|
}
|
|
4039
|
-
function
|
|
4040
|
-
if (!
|
|
4041
|
-
const
|
|
4042
|
-
if (!
|
|
4151
|
+
function kt() {
|
|
4152
|
+
if (!m(L) || !m(h)) return;
|
|
4153
|
+
const I = $n();
|
|
4154
|
+
if (!I) {
|
|
4043
4155
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
4044
4156
|
return;
|
|
4045
4157
|
}
|
|
4046
|
-
|
|
4158
|
+
m(h).initializeForQuestion(I);
|
|
4047
4159
|
}
|
|
4048
|
-
function
|
|
4160
|
+
function Cn() {
|
|
4049
4161
|
requestAnimationFrame(() => {
|
|
4050
4162
|
requestAnimationFrame(() => {
|
|
4051
|
-
|
|
4163
|
+
kt();
|
|
4052
4164
|
});
|
|
4053
4165
|
});
|
|
4054
4166
|
}
|
|
4055
|
-
|
|
4056
|
-
!g
|
|
4057
|
-
}),
|
|
4058
|
-
|
|
4059
|
-
}),
|
|
4060
|
-
|
|
4061
|
-
})),
|
|
4062
|
-
const
|
|
4063
|
-
if (
|
|
4064
|
-
if (
|
|
4065
|
-
|
|
4167
|
+
Le(() => {
|
|
4168
|
+
!m(g) || !n() || (m(S) && m(b) && (m(S) !== m(g) || m(b) !== n()) && (m(S).unregisterTool(m(b)), $(S, null), $(b, null)), m(b) || (m(g).registerTool(n(), "Answer Eliminator", void 0, Yt.MODAL), $(S, m(g), !0), $(b, n())));
|
|
4169
|
+
}), Le(() => {
|
|
4170
|
+
m(h) && a() && u() && m(h).setStoreIntegration(a(), u());
|
|
4171
|
+
}), Bs(() => ($(h, new Xt(s(), o()), !0), m(h) && a() && u() && m(h).setStoreIntegration(a(), u()), m(L) ? kt() : m(h).cleanup(), () => {
|
|
4172
|
+
m(h)?.destroy(), $(h, null), m(S) && m(b) && (m(S).unregisterTool(m(b)), $(S, null), $(b, null));
|
|
4173
|
+
})), Le(() => {
|
|
4174
|
+
const I = m(p)?.contextVersion ?? null;
|
|
4175
|
+
if (I !== null) {
|
|
4176
|
+
if (m(T) === null) {
|
|
4177
|
+
$(T, I, !0);
|
|
4066
4178
|
return;
|
|
4067
4179
|
}
|
|
4068
|
-
|
|
4180
|
+
I !== m(T) && ($(T, I, !0), Cn());
|
|
4069
4181
|
}
|
|
4070
|
-
}),
|
|
4071
|
-
|
|
4182
|
+
}), Le(() => {
|
|
4183
|
+
m(h) && (m(L) ? (m(h).enableStateRestoration(), kt()) : m(h).cleanup());
|
|
4072
4184
|
});
|
|
4073
|
-
var
|
|
4185
|
+
var Ln = {
|
|
4074
4186
|
get visible() {
|
|
4075
4187
|
return i();
|
|
4076
4188
|
},
|
|
4077
|
-
set visible(
|
|
4078
|
-
i(
|
|
4189
|
+
set visible(I = !1) {
|
|
4190
|
+
i(I), ue();
|
|
4079
4191
|
},
|
|
4080
4192
|
get toolId() {
|
|
4081
4193
|
return n();
|
|
4082
4194
|
},
|
|
4083
|
-
set toolId(
|
|
4084
|
-
n(
|
|
4195
|
+
set toolId(I = "answerEliminator") {
|
|
4196
|
+
n(I), ue();
|
|
4085
4197
|
},
|
|
4086
4198
|
get strategy() {
|
|
4087
|
-
return
|
|
4199
|
+
return s();
|
|
4088
4200
|
},
|
|
4089
|
-
set strategy(
|
|
4090
|
-
|
|
4201
|
+
set strategy(I = "strikethrough") {
|
|
4202
|
+
s(I), ue();
|
|
4091
4203
|
},
|
|
4092
4204
|
get alwaysOn() {
|
|
4093
|
-
return
|
|
4205
|
+
return r();
|
|
4094
4206
|
},
|
|
4095
|
-
set alwaysOn(
|
|
4096
|
-
|
|
4207
|
+
set alwaysOn(I = !1) {
|
|
4208
|
+
r(I), ue();
|
|
4097
4209
|
},
|
|
4098
4210
|
get buttonAlignment() {
|
|
4099
4211
|
return o();
|
|
4100
4212
|
},
|
|
4101
|
-
set buttonAlignment(
|
|
4102
|
-
o(
|
|
4213
|
+
set buttonAlignment(I = "right") {
|
|
4214
|
+
o(I), ue();
|
|
4103
4215
|
},
|
|
4104
4216
|
get scopeElement() {
|
|
4105
4217
|
return l();
|
|
4106
4218
|
},
|
|
4107
|
-
set scopeElement(
|
|
4108
|
-
l(
|
|
4219
|
+
set scopeElement(I = null) {
|
|
4220
|
+
l(I), ue();
|
|
4109
4221
|
},
|
|
4110
4222
|
get elementToolStateStore() {
|
|
4111
4223
|
return a();
|
|
4112
4224
|
},
|
|
4113
|
-
set elementToolStateStore(
|
|
4114
|
-
a(
|
|
4225
|
+
set elementToolStateStore(I = null) {
|
|
4226
|
+
a(I), ue();
|
|
4115
4227
|
},
|
|
4116
4228
|
get globalElementId() {
|
|
4117
4229
|
return u();
|
|
4118
4230
|
},
|
|
4119
|
-
set globalElementId(
|
|
4120
|
-
u(
|
|
4231
|
+
set globalElementId(I = "") {
|
|
4232
|
+
u(I), ue();
|
|
4121
4233
|
}
|
|
4122
|
-
},
|
|
4123
|
-
return
|
|
4234
|
+
}, oi = Hr();
|
|
4235
|
+
return Gs(oi, (I) => $(d, I), () => m(d)), bn(t, oi), Ni(Ln);
|
|
4124
4236
|
}
|
|
4125
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
4126
|
-
|
|
4237
|
+
customElements.define("pie-tool-answer-eliminator", zs(
|
|
4238
|
+
Nr,
|
|
4127
4239
|
{
|
|
4128
4240
|
visible: { attribute: "visible", type: "Boolean" },
|
|
4129
4241
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -4139,5 +4251,5 @@ customElements.define("pie-tool-answer-eliminator", Pr(
|
|
|
4139
4251
|
{ mode: "open" }
|
|
4140
4252
|
));
|
|
4141
4253
|
export {
|
|
4142
|
-
|
|
4254
|
+
Nr as default
|
|
4143
4255
|
};
|