@pie-players/pie-section-player 0.3.19 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/defineProperty-CyepwRr5-eHUSgEtz.js +33 -0
- package/dist/defineProperty-CyepwRr5.js +33 -0
- package/dist/dist-BCuSaTvi.js +393 -0
- package/dist/dist-BIgX-aC4-C5B4fLQK.js +389 -0
- package/dist/dist-DwP27yIs-gkxodgFn.js +201 -0
- package/dist/{index-QLtHZ4Yz-B0r-CUMY.js → dist-S3IAfazl.js} +36 -64
- package/dist/{index-BZq66Ke6-D8dZwpj4.js → module-COIydQYl-2o-TlgiW.js} +38152 -30086
- package/dist/pie-section-player.js +7042 -9287
- package/dist/player-preload-C_CjM5hv.js +6317 -0
- package/dist/tool-annotation-toolbar-BS_MjvXd.js +3974 -0
- package/dist/utils/player-preload.js +5 -5
- package/package.json +14 -14
- package/dist/index-BRKsQ6Im-_GY8ip1I.js +0 -442
- package/dist/index-BRKsQ6Im.js +0 -460
- package/dist/index-QLtHZ4Yz.js +0 -244
- package/dist/player-preload-DGzat3U_.js +0 -7040
- package/dist/tool-annotation-toolbar-BCBoCQa5.js +0 -4930
|
@@ -0,0 +1,3974 @@
|
|
|
1
|
+
import { t as b } from "./defineProperty-CyepwRr5-eHUSgEtz.js";
|
|
2
|
+
if (typeof window < "u") {
|
|
3
|
+
var mn, bn;
|
|
4
|
+
((mn = (bn = window).__svelte ?? (bn.__svelte = {})).v ?? (mn.v = /* @__PURE__ */ new Set())).add("5");
|
|
5
|
+
}
|
|
6
|
+
var fe = {}, W = Symbol(), Kn = Array.isArray, dr = Array.prototype.indexOf, pe = Array.prototype.includes, po = Array.from, ro = Object.keys, so = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, hr = Object.getOwnPropertyDescriptors, fr = Object.prototype, pr = Array.prototype, Jn = Object.getPrototypeOf, yn = Object.isExtensible, vr = () => {
|
|
7
|
+
};
|
|
8
|
+
function gr(t) {
|
|
9
|
+
for (var e = 0; e < t.length; e++) t[e]();
|
|
10
|
+
}
|
|
11
|
+
function Xn() {
|
|
12
|
+
var t, e;
|
|
13
|
+
return {
|
|
14
|
+
promise: new Promise((o, n) => {
|
|
15
|
+
t = o, e = n;
|
|
16
|
+
}),
|
|
17
|
+
resolve: t,
|
|
18
|
+
reject: e
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
var et = 1024, wt = 2048, ie = 4096, qo = 8192, mr = 16384, Fo = 32768, wn = 1 << 25, Go = 65536, ye = 1 << 19, br = 1 << 20, _e = 1 << 25, Re = 65536, Tn = 1 << 21, yr = 1 << 22, lo = 1 << 23, Ce = Symbol("$state"), Zn = Symbol("legacy props"), wr = Symbol(""), _t = new class extends Error {
|
|
22
|
+
constructor(...t) {
|
|
23
|
+
super(...t), b(this, "name", "StaleReactionError"), b(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
24
|
+
}
|
|
25
|
+
}(), Tr = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
26
|
+
function Ir() {
|
|
27
|
+
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
28
|
+
}
|
|
29
|
+
function $r(t, e, o) {
|
|
30
|
+
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
31
|
+
}
|
|
32
|
+
function kr(t) {
|
|
33
|
+
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
34
|
+
}
|
|
35
|
+
function Sr() {
|
|
36
|
+
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
37
|
+
}
|
|
38
|
+
function xr(t) {
|
|
39
|
+
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
40
|
+
}
|
|
41
|
+
function Ar() {
|
|
42
|
+
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
43
|
+
}
|
|
44
|
+
function _r() {
|
|
45
|
+
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
46
|
+
}
|
|
47
|
+
function Cr(t) {
|
|
48
|
+
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
49
|
+
}
|
|
50
|
+
function Er() {
|
|
51
|
+
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
52
|
+
}
|
|
53
|
+
function Pr() {
|
|
54
|
+
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
55
|
+
}
|
|
56
|
+
function Lr() {
|
|
57
|
+
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
58
|
+
}
|
|
59
|
+
function Mr() {
|
|
60
|
+
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
61
|
+
}
|
|
62
|
+
function vo(t) {
|
|
63
|
+
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
64
|
+
}
|
|
65
|
+
function Or() {
|
|
66
|
+
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
67
|
+
}
|
|
68
|
+
var L = !1;
|
|
69
|
+
function Ct(t) {
|
|
70
|
+
L = t;
|
|
71
|
+
}
|
|
72
|
+
var E;
|
|
73
|
+
function G(t) {
|
|
74
|
+
if (t === null) throw vo(), fe;
|
|
75
|
+
return E = t;
|
|
76
|
+
}
|
|
77
|
+
function go() {
|
|
78
|
+
return G(/* @__PURE__ */ Tt(E));
|
|
79
|
+
}
|
|
80
|
+
function He(t) {
|
|
81
|
+
if (L) {
|
|
82
|
+
if (/* @__PURE__ */ Tt(E) !== null) throw vo(), fe;
|
|
83
|
+
E = t;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function Rr(t = 1) {
|
|
87
|
+
if (L) {
|
|
88
|
+
for (var e = t, o = E; e--; ) o = /* @__PURE__ */ Tt(o);
|
|
89
|
+
E = o;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function ao(t = !0) {
|
|
93
|
+
for (var e = 0, o = E; ; ) {
|
|
94
|
+
if (o.nodeType === 8) {
|
|
95
|
+
var n = o.data;
|
|
96
|
+
if (n === "]") {
|
|
97
|
+
if (e === 0) return o;
|
|
98
|
+
e -= 1;
|
|
99
|
+
} else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
|
|
100
|
+
}
|
|
101
|
+
var i = /* @__PURE__ */ Tt(o);
|
|
102
|
+
t && o.remove(), o = i;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function Yn(t) {
|
|
106
|
+
if (!t || t.nodeType !== 8) throw vo(), fe;
|
|
107
|
+
return t.data;
|
|
108
|
+
}
|
|
109
|
+
function Qn(t) {
|
|
110
|
+
return t === this.v;
|
|
111
|
+
}
|
|
112
|
+
function Nr(t, e) {
|
|
113
|
+
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
114
|
+
}
|
|
115
|
+
function ti(t) {
|
|
116
|
+
return !Nr(t, this.v);
|
|
117
|
+
}
|
|
118
|
+
var zt = !1, mo = !1, j = null;
|
|
119
|
+
function ve(t) {
|
|
120
|
+
j = t;
|
|
121
|
+
}
|
|
122
|
+
function ei(t, e = !1, o) {
|
|
123
|
+
j = {
|
|
124
|
+
p: j,
|
|
125
|
+
i: !1,
|
|
126
|
+
c: null,
|
|
127
|
+
e: null,
|
|
128
|
+
s: t,
|
|
129
|
+
x: null,
|
|
130
|
+
r: S,
|
|
131
|
+
l: mo && !e ? {
|
|
132
|
+
s: null,
|
|
133
|
+
u: null,
|
|
134
|
+
$: []
|
|
135
|
+
} : null
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function oi(t) {
|
|
139
|
+
var e = j, o = e.e;
|
|
140
|
+
if (o !== null) {
|
|
141
|
+
e.e = null;
|
|
142
|
+
for (var n of o) Ei(n);
|
|
143
|
+
}
|
|
144
|
+
return t !== void 0 && (e.x = t), e.i = !0, j = e.p, t ?? {};
|
|
145
|
+
}
|
|
146
|
+
function Ne() {
|
|
147
|
+
return !mo || j !== null && j.l === null;
|
|
148
|
+
}
|
|
149
|
+
var Ut = [];
|
|
150
|
+
function ni() {
|
|
151
|
+
var t = Ut;
|
|
152
|
+
Ut = [], gr(t);
|
|
153
|
+
}
|
|
154
|
+
function ee(t) {
|
|
155
|
+
if (Ut.length === 0 && !Ee) {
|
|
156
|
+
var e = Ut;
|
|
157
|
+
queueMicrotask(() => {
|
|
158
|
+
e === Ut && ni();
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
Ut.push(t);
|
|
162
|
+
}
|
|
163
|
+
function Vr() {
|
|
164
|
+
for (; Ut.length > 0; ) ni();
|
|
165
|
+
}
|
|
166
|
+
function ii(t) {
|
|
167
|
+
var e = S;
|
|
168
|
+
if (e === null) return x.f |= lo, t;
|
|
169
|
+
if (!(e.f & 32768) && !(e.f & 4)) throw t;
|
|
170
|
+
Vt(t, e);
|
|
171
|
+
}
|
|
172
|
+
function Vt(t, e) {
|
|
173
|
+
for (; e !== null; ) {
|
|
174
|
+
if (e.f & 128) {
|
|
175
|
+
if (!(e.f & 32768)) throw t;
|
|
176
|
+
try {
|
|
177
|
+
e.b.error(t);
|
|
178
|
+
return;
|
|
179
|
+
} catch (o) {
|
|
180
|
+
t = o;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
e = e.parent;
|
|
184
|
+
}
|
|
185
|
+
throw t;
|
|
186
|
+
}
|
|
187
|
+
var jr = ~(wt | ie | et);
|
|
188
|
+
function N(t, e) {
|
|
189
|
+
t.f = t.f & jr | e;
|
|
190
|
+
}
|
|
191
|
+
function Uo(t) {
|
|
192
|
+
t.f & 512 || t.deps === null ? N(t, et) : N(t, ie);
|
|
193
|
+
}
|
|
194
|
+
function ri(t) {
|
|
195
|
+
if (t !== null) for (const e of t) !(e.f & 2) || !(e.f & 65536) || (e.f ^= Re, ri(e.deps));
|
|
196
|
+
}
|
|
197
|
+
function si(t, e, o) {
|
|
198
|
+
t.f & 2048 ? e.add(t) : t.f & 4096 && o.add(t), ri(t.deps), N(t, et);
|
|
199
|
+
}
|
|
200
|
+
var Wr = !1, Be = !1;
|
|
201
|
+
function zr(t) {
|
|
202
|
+
var e = Be;
|
|
203
|
+
try {
|
|
204
|
+
return Be = !1, [t(), Be];
|
|
205
|
+
} finally {
|
|
206
|
+
Be = e;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function li(t, e) {
|
|
210
|
+
if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
211
|
+
}
|
|
212
|
+
function Ko(t, e) {
|
|
213
|
+
li(t, e), e.add(t);
|
|
214
|
+
}
|
|
215
|
+
function k(t, e, o) {
|
|
216
|
+
li(t, e), e.set(t, o);
|
|
217
|
+
}
|
|
218
|
+
function M(t, e, o) {
|
|
219
|
+
if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : o;
|
|
220
|
+
throw new TypeError("Private element is not present on this object");
|
|
221
|
+
}
|
|
222
|
+
function c(t, e) {
|
|
223
|
+
return t.get(M(t, e));
|
|
224
|
+
}
|
|
225
|
+
function T(t, e, o) {
|
|
226
|
+
return t.set(M(t, e), o), o;
|
|
227
|
+
}
|
|
228
|
+
var ai, Et = /* @__PURE__ */ new Set(), P = null, F = null, Oo = null, Ee = !1, Io = !1, ge = null, co = null, ci = 0, Dr = 1, uo = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakSet(), re = class ui {
|
|
229
|
+
constructor() {
|
|
230
|
+
Ko(this, mt), b(this, "id", Dr++), b(this, "current", /* @__PURE__ */ new Map()), b(this, "previous", /* @__PURE__ */ new Map()), k(this, uo, /* @__PURE__ */ new Set()), k(this, qe, /* @__PURE__ */ new Set()), k(this, ae, 0), k(this, ce, 0), k(this, Ze, null), k(this, at, []), k(this, Le, /* @__PURE__ */ new Set()), k(this, Zt, /* @__PURE__ */ new Set()), k(this, Gt, /* @__PURE__ */ new Map()), b(this, "is_fork", !1), k(this, Fe, !1);
|
|
231
|
+
}
|
|
232
|
+
skip_effect(e) {
|
|
233
|
+
c(Gt, this).has(e) || c(Gt, this).set(e, {
|
|
234
|
+
d: [],
|
|
235
|
+
m: []
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
unskip_effect(e) {
|
|
239
|
+
var o = c(Gt, this).get(e);
|
|
240
|
+
if (o) {
|
|
241
|
+
c(Gt, this).delete(e);
|
|
242
|
+
for (var n of o.d) N(n, wt), this.schedule(n);
|
|
243
|
+
for (n of o.m) N(n, ie), this.schedule(n);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
capture(e, o) {
|
|
247
|
+
o !== W && !this.previous.has(e) && this.previous.set(e, o), e.f & 8388608 || (this.current.set(e, e.v), F?.set(e, e.v));
|
|
248
|
+
}
|
|
249
|
+
activate() {
|
|
250
|
+
P = this;
|
|
251
|
+
}
|
|
252
|
+
deactivate() {
|
|
253
|
+
P = null, F = null;
|
|
254
|
+
}
|
|
255
|
+
flush() {
|
|
256
|
+
try {
|
|
257
|
+
Io = !0, P = this, M(mt, this, di).call(this);
|
|
258
|
+
} finally {
|
|
259
|
+
ci = 0, Oo = null, ge = null, co = null, Io = !1, P = null, F = null, Wt.clear();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
discard() {
|
|
263
|
+
for (const e of c(qe, this)) e(this);
|
|
264
|
+
c(qe, this).clear(), Et.delete(this);
|
|
265
|
+
}
|
|
266
|
+
increment(e) {
|
|
267
|
+
T(ae, this, c(ae, this) + 1), e && T(ce, this, c(ce, this) + 1);
|
|
268
|
+
}
|
|
269
|
+
decrement(e, o) {
|
|
270
|
+
T(ae, this, c(ae, this) - 1), e && T(ce, this, c(ce, this) - 1), !(c(Fe, this) || o) && (T(Fe, this, !0), ee(() => {
|
|
271
|
+
T(Fe, this, !1), this.flush();
|
|
272
|
+
}));
|
|
273
|
+
}
|
|
274
|
+
transfer_effects(e, o) {
|
|
275
|
+
for (const n of e) c(Le, this).add(n);
|
|
276
|
+
for (const n of o) c(Zt, this).add(n);
|
|
277
|
+
e.clear(), o.clear();
|
|
278
|
+
}
|
|
279
|
+
oncommit(e) {
|
|
280
|
+
c(uo, this).add(e);
|
|
281
|
+
}
|
|
282
|
+
ondiscard(e) {
|
|
283
|
+
c(qe, this).add(e);
|
|
284
|
+
}
|
|
285
|
+
settled() {
|
|
286
|
+
return (c(Ze, this) ?? T(Ze, this, Xn())).promise;
|
|
287
|
+
}
|
|
288
|
+
static ensure() {
|
|
289
|
+
if (P === null) {
|
|
290
|
+
const e = P = new ui();
|
|
291
|
+
Io || (Et.add(P), Ee || ee(() => {
|
|
292
|
+
P === e && e.flush();
|
|
293
|
+
}));
|
|
294
|
+
}
|
|
295
|
+
return P;
|
|
296
|
+
}
|
|
297
|
+
apply() {
|
|
298
|
+
if (!zt || !this.is_fork && Et.size === 1) {
|
|
299
|
+
F = null;
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
F = new Map(this.current);
|
|
303
|
+
for (const e of Et) if (!(e === this || e.is_fork)) for (const [o, n] of e.previous) F.has(o) || F.set(o, n);
|
|
304
|
+
}
|
|
305
|
+
schedule(e) {
|
|
306
|
+
if (Oo = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
|
|
307
|
+
e.b.defer_effect(e);
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
for (var o = e; o.parent !== null; ) {
|
|
311
|
+
o = o.parent;
|
|
312
|
+
var n = o.f;
|
|
313
|
+
if (ge !== null && o === S && (zt || (x === null || !(x.f & 2)) && !Wr)) return;
|
|
314
|
+
if (n & 96) {
|
|
315
|
+
if (!(n & 1024)) return;
|
|
316
|
+
o.f ^= et;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
c(at, this).push(o);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
ai = re;
|
|
323
|
+
function In() {
|
|
324
|
+
return this.is_fork || c(ce, this) > 0;
|
|
325
|
+
}
|
|
326
|
+
function di() {
|
|
327
|
+
if (ci++ > 1e3 && (Et.delete(this), Br()), !M(mt, this, In).call(this)) {
|
|
328
|
+
for (const s of c(Le, this)) c(Zt, this).delete(s), N(s, wt), this.schedule(s);
|
|
329
|
+
for (const s of c(Zt, this)) N(s, ie), this.schedule(s);
|
|
330
|
+
}
|
|
331
|
+
const t = c(at, this);
|
|
332
|
+
T(at, this, []), this.apply();
|
|
333
|
+
var e = ge = [], o = [], n = co = [];
|
|
334
|
+
for (const s of t) try {
|
|
335
|
+
M(mt, this, hi).call(this, s, e, o);
|
|
336
|
+
} catch (l) {
|
|
337
|
+
throw gi(s), l;
|
|
338
|
+
}
|
|
339
|
+
if (P = null, n.length > 0) {
|
|
340
|
+
var i = ai.ensure();
|
|
341
|
+
for (const s of n) i.schedule(s);
|
|
342
|
+
}
|
|
343
|
+
if (ge = null, co = null, M(mt, this, In).call(this)) {
|
|
344
|
+
M(mt, this, $n).call(this, o), M(mt, this, $n).call(this, e);
|
|
345
|
+
for (const [s, l] of c(Gt, this)) vi(s, l);
|
|
346
|
+
} else {
|
|
347
|
+
c(ae, this) === 0 && Et.delete(this), c(Le, this).clear(), c(Zt, this).clear();
|
|
348
|
+
for (const s of c(uo, this)) s(this);
|
|
349
|
+
c(uo, this).clear(), kn(o), kn(e), c(Ze, this)?.resolve();
|
|
350
|
+
}
|
|
351
|
+
var r = P;
|
|
352
|
+
if (c(at, this).length > 0) {
|
|
353
|
+
const s = r ?? (r = this);
|
|
354
|
+
c(at, s).push(...c(at, this).filter((l) => !c(at, s).includes(l)));
|
|
355
|
+
}
|
|
356
|
+
r !== null && (Et.add(r), M(mt, r, di).call(r)), Et.has(this) || M(mt, this, Hr).call(this);
|
|
357
|
+
}
|
|
358
|
+
function hi(t, e, o) {
|
|
359
|
+
t.f ^= et;
|
|
360
|
+
for (var n = t.first; n !== null; ) {
|
|
361
|
+
var i = n.f, r = (i & 96) !== 0;
|
|
362
|
+
if (!(r && i & 1024 || i & 8192 || c(Gt, this).has(n)) && n.fn !== null) {
|
|
363
|
+
r ? n.f ^= et : i & 4 ? e.push(n) : zt && i & 16777224 ? o.push(n) : Ve(n) && (i & 16 && c(Zt, this).add(n), be(n));
|
|
364
|
+
var s = n.first;
|
|
365
|
+
if (s !== null) {
|
|
366
|
+
n = s;
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
for (; n !== null; ) {
|
|
371
|
+
var l = n.next;
|
|
372
|
+
if (l !== null) {
|
|
373
|
+
n = l;
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
n = n.parent;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function $n(t) {
|
|
381
|
+
for (var e = 0; e < t.length; e += 1) si(t[e], c(Le, this), c(Zt, this));
|
|
382
|
+
}
|
|
383
|
+
function Hr() {
|
|
384
|
+
for (const l of Et) {
|
|
385
|
+
var t = l.id < this.id, e = [];
|
|
386
|
+
for (const [a, u] of this.current) {
|
|
387
|
+
if (l.current.has(a)) if (t && u !== l.current.get(a)) l.current.set(a, u);
|
|
388
|
+
else continue;
|
|
389
|
+
e.push(a);
|
|
390
|
+
}
|
|
391
|
+
var o = [...l.current.keys()].filter((a) => !this.current.has(a));
|
|
392
|
+
if (o.length === 0) t && l.discard();
|
|
393
|
+
else if (e.length > 0) {
|
|
394
|
+
l.activate();
|
|
395
|
+
var n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
396
|
+
for (var r of e) fi(r, o, n, i);
|
|
397
|
+
if (c(at, l).length > 0) {
|
|
398
|
+
l.apply();
|
|
399
|
+
for (var s of c(at, l)) M(mt, l, hi).call(l, s, [], []);
|
|
400
|
+
T(at, l, []);
|
|
401
|
+
}
|
|
402
|
+
l.deactivate();
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function Ye(t) {
|
|
407
|
+
var e = Ee;
|
|
408
|
+
Ee = !0;
|
|
409
|
+
try {
|
|
410
|
+
var o;
|
|
411
|
+
for (t && (P !== null && !P.is_fork && P.flush(), o = t()); ; ) {
|
|
412
|
+
if (Vr(), P === null) return o;
|
|
413
|
+
P.flush();
|
|
414
|
+
}
|
|
415
|
+
} finally {
|
|
416
|
+
Ee = e;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
function Br() {
|
|
420
|
+
try {
|
|
421
|
+
Ar();
|
|
422
|
+
} catch (t) {
|
|
423
|
+
Vt(t, Oo);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
var bt = null;
|
|
427
|
+
function kn(t) {
|
|
428
|
+
var e = t.length;
|
|
429
|
+
if (e !== 0) {
|
|
430
|
+
for (var o = 0; o < e; ) {
|
|
431
|
+
var n = t[o++];
|
|
432
|
+
if (!(n.f & 24576) && Ve(n) && (bt = /* @__PURE__ */ new Set(), be(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Mi(n), bt?.size > 0)) {
|
|
433
|
+
Wt.clear();
|
|
434
|
+
for (const i of bt) {
|
|
435
|
+
if (i.f & 24576) continue;
|
|
436
|
+
const r = [i];
|
|
437
|
+
let s = i.parent;
|
|
438
|
+
for (; s !== null; ) bt.has(s) && (bt.delete(s), r.push(s)), s = s.parent;
|
|
439
|
+
for (let l = r.length - 1; l >= 0; l--) {
|
|
440
|
+
const a = r[l];
|
|
441
|
+
a.f & 24576 || be(a);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
bt.clear();
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
bt = null;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
function fi(t, e, o, n) {
|
|
451
|
+
if (!o.has(t) && (o.add(t), t.reactions !== null)) for (const i of t.reactions) {
|
|
452
|
+
const r = i.f;
|
|
453
|
+
r & 2 ? fi(i, e, o, n) : r & 4194320 && !(r & 2048) && pi(i, e, n) && (N(i, wt), Jo(i));
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function pi(t, e, o) {
|
|
457
|
+
const n = o.get(t);
|
|
458
|
+
if (n !== void 0) return n;
|
|
459
|
+
if (t.deps !== null) for (const i of t.deps) {
|
|
460
|
+
if (pe.call(e, i)) return !0;
|
|
461
|
+
if (i.f & 2 && pi(i, e, o)) return o.set(i, !0), !0;
|
|
462
|
+
}
|
|
463
|
+
return o.set(t, !1), !1;
|
|
464
|
+
}
|
|
465
|
+
function Jo(t) {
|
|
466
|
+
P.schedule(t);
|
|
467
|
+
}
|
|
468
|
+
function vi(t, e) {
|
|
469
|
+
if (!(t.f & 32 && t.f & 1024)) {
|
|
470
|
+
t.f & 2048 ? e.d.push(t) : t.f & 4096 && e.m.push(t), N(t, et);
|
|
471
|
+
for (var o = t.first; o !== null; ) vi(o, e), o = o.next;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
function gi(t) {
|
|
475
|
+
N(t, et);
|
|
476
|
+
for (var e = t.first; e !== null; ) gi(e), e = e.next;
|
|
477
|
+
}
|
|
478
|
+
function qr(t) {
|
|
479
|
+
let e = 0, o = oe(0), n;
|
|
480
|
+
return () => {
|
|
481
|
+
en() && (g(o), on(() => (e === 0 && (n = an(() => t(() => Pe(o)))), e += 1, () => {
|
|
482
|
+
ee(() => {
|
|
483
|
+
e -= 1, e === 0 && (n?.(), n = void 0, Pe(o));
|
|
484
|
+
});
|
|
485
|
+
})));
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
var Fr = Go | ye;
|
|
489
|
+
function Gr(t, e, o, n) {
|
|
490
|
+
new Ur(t, e, o, n);
|
|
491
|
+
}
|
|
492
|
+
var ct = /* @__PURE__ */ new WeakMap(), $o = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), No = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), Ur = class {
|
|
493
|
+
constructor(t, e, o, n) {
|
|
494
|
+
Ko(this, B), b(this, "parent", void 0), b(this, "is_pending", !1), b(this, "transform_error", void 0), k(this, ct, void 0), k(this, $o, L ? E : null), k(this, Nt, void 0), k(this, Me, void 0), k(this, Y, void 0), k(this, jt, null), k(this, ut, null), k(this, At, null), k(this, Yt, null), k(this, ue, 0), k(this, Qt, 0), k(this, Ge, !1), k(this, Ro, /* @__PURE__ */ new Set()), k(this, No, /* @__PURE__ */ new Set()), k(this, qt, null), k(this, Sn, qr(() => (T(qt, this, oe(c(ue, this))), () => {
|
|
495
|
+
T(qt, this, null);
|
|
496
|
+
}))), T(ct, this, t), T(Nt, this, e), T(Me, this, (i) => {
|
|
497
|
+
var r = S;
|
|
498
|
+
r.b = this, r.f |= 128, o(i);
|
|
499
|
+
}), this.parent = S.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), T(Y, this, nn(() => {
|
|
500
|
+
if (L) {
|
|
501
|
+
const i = c($o, this);
|
|
502
|
+
go();
|
|
503
|
+
const r = i.data === "[!";
|
|
504
|
+
if (i.data.startsWith("[?")) {
|
|
505
|
+
const s = JSON.parse(i.data.slice(2));
|
|
506
|
+
M(B, this, Jr).call(this, s);
|
|
507
|
+
} else r ? M(B, this, Xr).call(this) : M(B, this, Kr).call(this);
|
|
508
|
+
} else M(B, this, xn).call(this);
|
|
509
|
+
}, Fr)), L && T(ct, this, E);
|
|
510
|
+
}
|
|
511
|
+
defer_effect(t) {
|
|
512
|
+
si(t, c(Ro, this), c(No, this));
|
|
513
|
+
}
|
|
514
|
+
is_rendered() {
|
|
515
|
+
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
516
|
+
}
|
|
517
|
+
has_pending_snippet() {
|
|
518
|
+
return !!c(Nt, this).pending;
|
|
519
|
+
}
|
|
520
|
+
update_pending_count(t, e) {
|
|
521
|
+
M(B, this, mi).call(this, t, e), T(ue, this, c(ue, this) + t), !(!c(qt, this) || c(Ge, this)) && (T(Ge, this, !0), ee(() => {
|
|
522
|
+
T(Ge, this, !1), c(qt, this) && me(c(qt, this), c(ue, this));
|
|
523
|
+
}));
|
|
524
|
+
}
|
|
525
|
+
get_effect_pending() {
|
|
526
|
+
return c(Sn, this).call(this), g(c(qt, this));
|
|
527
|
+
}
|
|
528
|
+
error(t) {
|
|
529
|
+
var e = c(Nt, this).onerror;
|
|
530
|
+
let o = c(Nt, this).failed;
|
|
531
|
+
if (!e && !o) throw t;
|
|
532
|
+
c(jt, this) && (z(c(jt, this)), T(jt, this, null)), c(ut, this) && (z(c(ut, this)), T(ut, this, null)), c(At, this) && (z(c(At, this)), T(At, this, null)), L && (G(c($o, this)), Rr(), G(ao()));
|
|
533
|
+
var n = !1, i = !1;
|
|
534
|
+
const r = () => {
|
|
535
|
+
if (n) {
|
|
536
|
+
Or();
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
n = !0, i && Mr(), c(At, this) !== null && se(c(At, this), () => {
|
|
540
|
+
T(At, this, null);
|
|
541
|
+
}), M(B, this, Vo).call(this, () => {
|
|
542
|
+
M(B, this, xn).call(this);
|
|
543
|
+
});
|
|
544
|
+
}, s = (l) => {
|
|
545
|
+
try {
|
|
546
|
+
i = !0, e?.(l, r), i = !1;
|
|
547
|
+
} catch (a) {
|
|
548
|
+
Vt(a, c(Y, this) && c(Y, this).parent);
|
|
549
|
+
}
|
|
550
|
+
o && T(At, this, M(B, this, Vo).call(this, () => {
|
|
551
|
+
try {
|
|
552
|
+
return ot(() => {
|
|
553
|
+
var a = S;
|
|
554
|
+
a.b = this, a.f |= 128, o(c(ct, this), () => l, () => r);
|
|
555
|
+
});
|
|
556
|
+
} catch (a) {
|
|
557
|
+
return Vt(a, c(Y, this).parent), null;
|
|
558
|
+
}
|
|
559
|
+
}));
|
|
560
|
+
};
|
|
561
|
+
ee(() => {
|
|
562
|
+
var l;
|
|
563
|
+
try {
|
|
564
|
+
l = this.transform_error(t);
|
|
565
|
+
} catch (a) {
|
|
566
|
+
Vt(a, c(Y, this) && c(Y, this).parent);
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
l !== null && typeof l == "object" && typeof l.then == "function" ? l.then(s, (a) => Vt(a, c(Y, this) && c(Y, this).parent)) : s(l);
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
function Kr() {
|
|
574
|
+
try {
|
|
575
|
+
T(jt, this, ot(() => c(Me, this).call(this, c(ct, this))));
|
|
576
|
+
} catch (t) {
|
|
577
|
+
this.error(t);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
function Jr(t) {
|
|
581
|
+
const e = c(Nt, this).failed;
|
|
582
|
+
e && T(At, this, ot(() => {
|
|
583
|
+
e(c(ct, this), () => t, () => () => {
|
|
584
|
+
});
|
|
585
|
+
}));
|
|
586
|
+
}
|
|
587
|
+
function Xr() {
|
|
588
|
+
const t = c(Nt, this).pending;
|
|
589
|
+
t && (this.is_pending = !0, T(ut, this, ot(() => t(c(ct, this)))), ee(() => {
|
|
590
|
+
var e = T(Yt, this, document.createDocumentFragment()), o = ht();
|
|
591
|
+
e.append(o), T(jt, this, M(B, this, Vo).call(this, () => ot(() => c(Me, this).call(this, o)))), c(Qt, this) === 0 && (c(ct, this).before(e), T(Yt, this, null), se(c(ut, this), () => {
|
|
592
|
+
T(ut, this, null);
|
|
593
|
+
}), M(B, this, Xo).call(this, P));
|
|
594
|
+
}));
|
|
595
|
+
}
|
|
596
|
+
function xn() {
|
|
597
|
+
try {
|
|
598
|
+
if (this.is_pending = this.has_pending_snippet(), T(Qt, this, 0), T(ue, this, 0), T(jt, this, ot(() => {
|
|
599
|
+
c(Me, this).call(this, c(ct, this));
|
|
600
|
+
})), c(Qt, this) > 0) {
|
|
601
|
+
var t = T(Yt, this, document.createDocumentFragment());
|
|
602
|
+
ln(c(jt, this), t);
|
|
603
|
+
const e = c(Nt, this).pending;
|
|
604
|
+
T(ut, this, ot(() => e(c(ct, this))));
|
|
605
|
+
} else M(B, this, Xo).call(this, P);
|
|
606
|
+
} catch (e) {
|
|
607
|
+
this.error(e);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
function Xo(t) {
|
|
611
|
+
this.is_pending = !1, t.transfer_effects(c(Ro, this), c(No, this));
|
|
612
|
+
}
|
|
613
|
+
function Vo(t) {
|
|
614
|
+
var e = S, o = x, n = j;
|
|
615
|
+
yt(c(Y, this)), nt(c(Y, this)), ve(c(Y, this).ctx);
|
|
616
|
+
try {
|
|
617
|
+
return re.ensure(), t();
|
|
618
|
+
} catch (i) {
|
|
619
|
+
return ii(i), null;
|
|
620
|
+
} finally {
|
|
621
|
+
yt(e), nt(o), ve(n);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function mi(t, e) {
|
|
625
|
+
if (!this.has_pending_snippet()) {
|
|
626
|
+
if (this.parent) {
|
|
627
|
+
var o;
|
|
628
|
+
M(B, o = this.parent, mi).call(o, t, e);
|
|
629
|
+
}
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
T(Qt, this, c(Qt, this) + t), c(Qt, this) === 0 && (M(B, this, Xo).call(this, e), c(ut, this) && se(c(ut, this), () => {
|
|
633
|
+
T(ut, this, null);
|
|
634
|
+
}), c(Yt, this) && (c(ct, this).before(c(Yt, this)), T(Yt, this, null)));
|
|
635
|
+
}
|
|
636
|
+
function Zr(t, e, o, n) {
|
|
637
|
+
const i = Ne() ? bo : Zo;
|
|
638
|
+
var r = t.filter((h) => !h.settled);
|
|
639
|
+
if (o.length === 0 && r.length === 0) {
|
|
640
|
+
n(e.map(i));
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
var s = S, l = Yr(), a = r.length === 1 ? r[0].promise : r.length > 1 ? Promise.all(r.map((h) => h.promise)) : null;
|
|
644
|
+
function u(h) {
|
|
645
|
+
l();
|
|
646
|
+
try {
|
|
647
|
+
n(h);
|
|
648
|
+
} catch (v) {
|
|
649
|
+
s.f & 16384 || Vt(v, s);
|
|
650
|
+
}
|
|
651
|
+
ho();
|
|
652
|
+
}
|
|
653
|
+
if (o.length === 0) {
|
|
654
|
+
a.then(() => u(e.map(i)));
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
var d = bi();
|
|
658
|
+
function p() {
|
|
659
|
+
Promise.all(o.map((h) => /* @__PURE__ */ Qr(h))).then((h) => u([...e.map(i), ...h])).catch((h) => Vt(h, s)).finally(() => d());
|
|
660
|
+
}
|
|
661
|
+
a ? a.then(() => {
|
|
662
|
+
l(), p(), ho();
|
|
663
|
+
}) : p();
|
|
664
|
+
}
|
|
665
|
+
function Yr() {
|
|
666
|
+
var t = S, e = x, o = j, n = P;
|
|
667
|
+
return function(i = !0) {
|
|
668
|
+
yt(t), nt(e), ve(o), i && !(t.f & 16384) && (n?.activate(), n?.apply());
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
function ho(t = !0) {
|
|
672
|
+
yt(null), nt(null), ve(null), t && P?.deactivate();
|
|
673
|
+
}
|
|
674
|
+
function bi() {
|
|
675
|
+
var t = S.b, e = P, o = t.is_rendered();
|
|
676
|
+
return t.update_pending_count(1, e), e.increment(o), (n = !1) => {
|
|
677
|
+
t.update_pending_count(-1, e), e.decrement(o, n);
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
// @__NO_SIDE_EFFECTS__
|
|
681
|
+
function bo(t) {
|
|
682
|
+
var e = 2 | wt, o = x !== null && x.f & 2 ? x : null;
|
|
683
|
+
return S !== null && (S.f |= ye), {
|
|
684
|
+
ctx: j,
|
|
685
|
+
deps: null,
|
|
686
|
+
effects: null,
|
|
687
|
+
equals: Qn,
|
|
688
|
+
f: e,
|
|
689
|
+
fn: t,
|
|
690
|
+
reactions: null,
|
|
691
|
+
rv: 0,
|
|
692
|
+
v: W,
|
|
693
|
+
wv: 0,
|
|
694
|
+
parent: o ?? S,
|
|
695
|
+
ac: null
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
// @__NO_SIDE_EFFECTS__
|
|
699
|
+
function Qr(t, e, o) {
|
|
700
|
+
let n = S;
|
|
701
|
+
n === null && Ir();
|
|
702
|
+
var i = void 0, r = oe(W), s = !x, l = /* @__PURE__ */ new Map();
|
|
703
|
+
return cs(() => {
|
|
704
|
+
var a = S, u = Xn();
|
|
705
|
+
i = u.promise;
|
|
706
|
+
try {
|
|
707
|
+
Promise.resolve(t()).then(u.resolve, u.reject).finally(ho);
|
|
708
|
+
} catch (v) {
|
|
709
|
+
u.reject(v), ho();
|
|
710
|
+
}
|
|
711
|
+
var d = P;
|
|
712
|
+
if (s) {
|
|
713
|
+
if (a.f & 32768) var p = bi();
|
|
714
|
+
if (n.b.is_rendered()) l.get(d)?.reject(_t), l.delete(d);
|
|
715
|
+
else {
|
|
716
|
+
for (const v of l.values()) v.reject(_t);
|
|
717
|
+
l.clear();
|
|
718
|
+
}
|
|
719
|
+
l.set(d, u);
|
|
720
|
+
}
|
|
721
|
+
const h = (v, y = void 0) => {
|
|
722
|
+
if (p && p(y === _t), !(y === _t || a.f & 16384)) {
|
|
723
|
+
if (d.activate(), y) r.f |= lo, me(r, y);
|
|
724
|
+
else {
|
|
725
|
+
r.f & 8388608 && (r.f ^= lo), me(r, v);
|
|
726
|
+
for (const [$, f] of l) {
|
|
727
|
+
if (l.delete($), $ === d) break;
|
|
728
|
+
f.reject(_t);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
d.deactivate();
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
u.promise.then(h, (v) => h(null, v || "unknown"));
|
|
735
|
+
}), ss(() => {
|
|
736
|
+
for (const a of l.values()) a.reject(_t);
|
|
737
|
+
}), new Promise((a) => {
|
|
738
|
+
function u(d) {
|
|
739
|
+
function p() {
|
|
740
|
+
d === i ? a(r) : u(i);
|
|
741
|
+
}
|
|
742
|
+
d.then(p, p);
|
|
743
|
+
}
|
|
744
|
+
u(i);
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
// @__NO_SIDE_EFFECTS__
|
|
748
|
+
function ko(t) {
|
|
749
|
+
const e = /* @__PURE__ */ bo(t);
|
|
750
|
+
return zt || Ni(e), e;
|
|
751
|
+
}
|
|
752
|
+
// @__NO_SIDE_EFFECTS__
|
|
753
|
+
function Zo(t) {
|
|
754
|
+
const e = /* @__PURE__ */ bo(t);
|
|
755
|
+
return e.equals = ti, e;
|
|
756
|
+
}
|
|
757
|
+
function ts(t) {
|
|
758
|
+
var e = t.effects;
|
|
759
|
+
if (e !== null) {
|
|
760
|
+
t.effects = null;
|
|
761
|
+
for (var o = 0; o < e.length; o += 1) z(e[o]);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function es(t) {
|
|
765
|
+
for (var e = t.parent; e !== null; ) {
|
|
766
|
+
if (!(e.f & 2)) return e.f & 16384 ? null : e;
|
|
767
|
+
e = e.parent;
|
|
768
|
+
}
|
|
769
|
+
return null;
|
|
770
|
+
}
|
|
771
|
+
function Yo(t) {
|
|
772
|
+
var e, o = S;
|
|
773
|
+
yt(es(t));
|
|
774
|
+
try {
|
|
775
|
+
t.f &= ~Re, ts(t), e = zi(t);
|
|
776
|
+
} finally {
|
|
777
|
+
yt(o);
|
|
778
|
+
}
|
|
779
|
+
return e;
|
|
780
|
+
}
|
|
781
|
+
function yi(t) {
|
|
782
|
+
var e = t.v, o = Yo(t);
|
|
783
|
+
if (!t.equals(o) && (t.wv = ji(), (!P?.is_fork || t.deps === null) && (t.v = o, P?.capture(t, e), t.deps === null))) {
|
|
784
|
+
N(t, et);
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
Dt || (F !== null ? (en() || P?.is_fork) && F.set(t, o) : Uo(t));
|
|
788
|
+
}
|
|
789
|
+
function os(t) {
|
|
790
|
+
if (t.effects !== null) for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(_t), e.teardown = vr, e.ac = null, Oe(e, 0), rn(e));
|
|
791
|
+
}
|
|
792
|
+
function wi(t) {
|
|
793
|
+
if (t.effects !== null) for (const e of t.effects) e.teardown && be(e);
|
|
794
|
+
}
|
|
795
|
+
var jo = /* @__PURE__ */ new Set(), Wt = /* @__PURE__ */ new Map(), Ti = !1;
|
|
796
|
+
function oe(t, e) {
|
|
797
|
+
return {
|
|
798
|
+
f: 0,
|
|
799
|
+
v: t,
|
|
800
|
+
reactions: null,
|
|
801
|
+
equals: Qn,
|
|
802
|
+
rv: 0,
|
|
803
|
+
wv: 0
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
// @__NO_SIDE_EFFECTS__
|
|
807
|
+
function V(t, e) {
|
|
808
|
+
const o = oe(t, e);
|
|
809
|
+
return Ni(o), o;
|
|
810
|
+
}
|
|
811
|
+
// @__NO_SIDE_EFFECTS__
|
|
812
|
+
function Ii(t, e = !1, o = !0) {
|
|
813
|
+
const n = oe(t);
|
|
814
|
+
if (e || (n.equals = ti), mo && o && j !== null && j.l !== null) {
|
|
815
|
+
var i;
|
|
816
|
+
((i = j.l).s ?? (i.s = [])).push(n);
|
|
817
|
+
}
|
|
818
|
+
return n;
|
|
819
|
+
}
|
|
820
|
+
function _(t, e, o = !1) {
|
|
821
|
+
return x !== null && (!dt || x.f & 131072) && Ne() && x.f & 4325394 && (tt === null || !pe.call(tt, t)) && Lr(), me(t, o ? Kt(e) : e, co);
|
|
822
|
+
}
|
|
823
|
+
function me(t, e, o = null) {
|
|
824
|
+
if (!t.equals(e)) {
|
|
825
|
+
var n = t.v;
|
|
826
|
+
Dt ? Wt.set(t, e) : Wt.set(t, n), t.v = e;
|
|
827
|
+
var i = re.ensure();
|
|
828
|
+
if (i.capture(t, n), t.f & 2) {
|
|
829
|
+
const r = t;
|
|
830
|
+
t.f & 2048 && Yo(r), F === null && Uo(r);
|
|
831
|
+
}
|
|
832
|
+
t.wv = ji(), $i(t, wt, o), Ne() && S !== null && S.f & 1024 && !(S.f & 96) && (Q === null ? fs([t]) : Q.push(t)), !i.is_fork && jo.size > 0 && !Ti && ns();
|
|
833
|
+
}
|
|
834
|
+
return e;
|
|
835
|
+
}
|
|
836
|
+
function ns() {
|
|
837
|
+
Ti = !1;
|
|
838
|
+
for (const t of jo) t.f & 1024 && N(t, ie), Ve(t) && be(t);
|
|
839
|
+
jo.clear();
|
|
840
|
+
}
|
|
841
|
+
function Pe(t) {
|
|
842
|
+
_(t, t.v + 1);
|
|
843
|
+
}
|
|
844
|
+
function $i(t, e, o) {
|
|
845
|
+
var n = t.reactions;
|
|
846
|
+
if (n !== null) for (var i = Ne(), r = n.length, s = 0; s < r; s++) {
|
|
847
|
+
var l = n[s], a = l.f;
|
|
848
|
+
if (!(!i && l === S)) {
|
|
849
|
+
var u = (a & wt) === 0;
|
|
850
|
+
if (u && N(l, e), a & 2) {
|
|
851
|
+
var d = l;
|
|
852
|
+
F?.delete(d), a & 65536 || (a & 512 && (l.f |= Re), $i(d, ie, o));
|
|
853
|
+
} else if (u) {
|
|
854
|
+
var p = l;
|
|
855
|
+
a & 16 && bt !== null && bt.add(p), o !== null ? o.push(p) : Jo(p);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
function Kt(t) {
|
|
861
|
+
if (typeof t != "object" || t === null || Ce in t) return t;
|
|
862
|
+
const e = Jn(t);
|
|
863
|
+
if (e !== fr && e !== pr) return t;
|
|
864
|
+
var o = /* @__PURE__ */ new Map(), n = Kn(t), i = /* @__PURE__ */ V(0), r = null, s = te, l = (a) => {
|
|
865
|
+
if (te === s) return a();
|
|
866
|
+
var u = x, d = te;
|
|
867
|
+
nt(null), En(s);
|
|
868
|
+
var p = a();
|
|
869
|
+
return nt(u), En(d), p;
|
|
870
|
+
};
|
|
871
|
+
return n && o.set("length", /* @__PURE__ */ V(t.length, r)), new Proxy(t, {
|
|
872
|
+
defineProperty(a, u, d) {
|
|
873
|
+
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && Er();
|
|
874
|
+
var p = o.get(u);
|
|
875
|
+
return p === void 0 ? l(() => {
|
|
876
|
+
var h = /* @__PURE__ */ V(d.value, r);
|
|
877
|
+
return o.set(u, h), h;
|
|
878
|
+
}) : _(p, d.value, !0), !0;
|
|
879
|
+
},
|
|
880
|
+
deleteProperty(a, u) {
|
|
881
|
+
var d = o.get(u);
|
|
882
|
+
if (d === void 0) {
|
|
883
|
+
if (u in a) {
|
|
884
|
+
const p = l(() => /* @__PURE__ */ V(W, r));
|
|
885
|
+
o.set(u, p), Pe(i);
|
|
886
|
+
}
|
|
887
|
+
} else _(d, W), Pe(i);
|
|
888
|
+
return !0;
|
|
889
|
+
},
|
|
890
|
+
get(a, u, d) {
|
|
891
|
+
if (u === Ce) return t;
|
|
892
|
+
var p = o.get(u), h = u in a;
|
|
893
|
+
if (p === void 0 && (!h || Xt(a, u)?.writable) && (p = l(() => /* @__PURE__ */ V(Kt(h ? a[u] : W), r)), o.set(u, p)), p !== void 0) {
|
|
894
|
+
var v = g(p);
|
|
895
|
+
return v === W ? void 0 : v;
|
|
896
|
+
}
|
|
897
|
+
return Reflect.get(a, u, d);
|
|
898
|
+
},
|
|
899
|
+
getOwnPropertyDescriptor(a, u) {
|
|
900
|
+
var d = Reflect.getOwnPropertyDescriptor(a, u);
|
|
901
|
+
if (d && "value" in d) {
|
|
902
|
+
var p = o.get(u);
|
|
903
|
+
p && (d.value = g(p));
|
|
904
|
+
} else if (d === void 0) {
|
|
905
|
+
var h = o.get(u), v = h?.v;
|
|
906
|
+
if (h !== void 0 && v !== W) return {
|
|
907
|
+
enumerable: !0,
|
|
908
|
+
configurable: !0,
|
|
909
|
+
value: v,
|
|
910
|
+
writable: !0
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
return d;
|
|
914
|
+
},
|
|
915
|
+
has(a, u) {
|
|
916
|
+
if (u === Ce) return !0;
|
|
917
|
+
var d = o.get(u), p = d !== void 0 && d.v !== W || Reflect.has(a, u);
|
|
918
|
+
return (d !== void 0 || S !== null && (!p || Xt(a, u)?.writable)) && (d === void 0 && (d = l(() => /* @__PURE__ */ V(p ? Kt(a[u]) : W, r)), o.set(u, d)), g(d) === W) ? !1 : p;
|
|
919
|
+
},
|
|
920
|
+
set(a, u, d, p) {
|
|
921
|
+
var h = o.get(u), v = u in a;
|
|
922
|
+
if (n && u === "length") for (var y = d; y < h.v; y += 1) {
|
|
923
|
+
var $ = o.get(y + "");
|
|
924
|
+
$ !== void 0 ? _($, W) : y in a && ($ = l(() => /* @__PURE__ */ V(W, r)), o.set(y + "", $));
|
|
925
|
+
}
|
|
926
|
+
if (h === void 0) (!v || Xt(a, u)?.writable) && (h = l(() => /* @__PURE__ */ V(void 0, r)), _(h, Kt(d)), o.set(u, h));
|
|
927
|
+
else {
|
|
928
|
+
v = h.v !== W;
|
|
929
|
+
var f = l(() => Kt(d));
|
|
930
|
+
_(h, f);
|
|
931
|
+
}
|
|
932
|
+
var w = Reflect.getOwnPropertyDescriptor(a, u);
|
|
933
|
+
if (w?.set && w.set.call(p, d), !v) {
|
|
934
|
+
if (n && typeof u == "string") {
|
|
935
|
+
var R = o.get("length"), A = Number(u);
|
|
936
|
+
Number.isInteger(A) && A >= R.v && _(R, A + 1);
|
|
937
|
+
}
|
|
938
|
+
Pe(i);
|
|
939
|
+
}
|
|
940
|
+
return !0;
|
|
941
|
+
},
|
|
942
|
+
ownKeys(a) {
|
|
943
|
+
g(i);
|
|
944
|
+
var u = Reflect.ownKeys(a).filter((h) => {
|
|
945
|
+
var v = o.get(h);
|
|
946
|
+
return v === void 0 || v.v !== W;
|
|
947
|
+
});
|
|
948
|
+
for (var [d, p] of o) p.v !== W && !(d in a) && u.push(d);
|
|
949
|
+
return u;
|
|
950
|
+
},
|
|
951
|
+
setPrototypeOf() {
|
|
952
|
+
Pr();
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
var An, ki, Si, xi;
|
|
957
|
+
function Wo() {
|
|
958
|
+
if (An === void 0) {
|
|
959
|
+
An = window, ki = /Firefox/.test(navigator.userAgent);
|
|
960
|
+
var t = Element.prototype, e = Node.prototype, o = Text.prototype;
|
|
961
|
+
Si = Xt(e, "firstChild").get, xi = Xt(e, "nextSibling").get, yn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), yn(o) && (o.__t = void 0);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
function ht(t = "") {
|
|
965
|
+
return document.createTextNode(t);
|
|
966
|
+
}
|
|
967
|
+
// @__NO_SIDE_EFFECTS__
|
|
968
|
+
function ne(t) {
|
|
969
|
+
return Si.call(t);
|
|
970
|
+
}
|
|
971
|
+
// @__NO_SIDE_EFFECTS__
|
|
972
|
+
function Tt(t) {
|
|
973
|
+
return xi.call(t);
|
|
974
|
+
}
|
|
975
|
+
function Ue(t, e) {
|
|
976
|
+
if (!L) return /* @__PURE__ */ ne(t);
|
|
977
|
+
var o = /* @__PURE__ */ ne(E);
|
|
978
|
+
if (o === null) o = E.appendChild(ht());
|
|
979
|
+
else if (e && o.nodeType !== 3) {
|
|
980
|
+
var n = ht();
|
|
981
|
+
return o?.before(n), G(n), n;
|
|
982
|
+
}
|
|
983
|
+
return e && tn(o), G(o), o;
|
|
984
|
+
}
|
|
985
|
+
function So(t, e = !1) {
|
|
986
|
+
if (!L) {
|
|
987
|
+
var o = /* @__PURE__ */ ne(t);
|
|
988
|
+
return o instanceof Comment && o.data === "" ? /* @__PURE__ */ Tt(o) : o;
|
|
989
|
+
}
|
|
990
|
+
if (e) {
|
|
991
|
+
if (E?.nodeType !== 3) {
|
|
992
|
+
var n = ht();
|
|
993
|
+
return E?.before(n), G(n), n;
|
|
994
|
+
}
|
|
995
|
+
tn(E);
|
|
996
|
+
}
|
|
997
|
+
return E;
|
|
998
|
+
}
|
|
999
|
+
function Pt(t, e = 1, o = !1) {
|
|
1000
|
+
let n = L ? E : t;
|
|
1001
|
+
for (var i; e--; ) i = n, n = /* @__PURE__ */ Tt(n);
|
|
1002
|
+
if (!L) return n;
|
|
1003
|
+
if (o) {
|
|
1004
|
+
if (n?.nodeType !== 3) {
|
|
1005
|
+
var r = ht();
|
|
1006
|
+
return n === null ? i?.after(r) : n.before(r), G(r), r;
|
|
1007
|
+
}
|
|
1008
|
+
tn(n);
|
|
1009
|
+
}
|
|
1010
|
+
return G(n), n;
|
|
1011
|
+
}
|
|
1012
|
+
function Ai(t) {
|
|
1013
|
+
t.textContent = "";
|
|
1014
|
+
}
|
|
1015
|
+
function _i() {
|
|
1016
|
+
return !zt || bt !== null ? !1 : (S.f & Fo) !== 0;
|
|
1017
|
+
}
|
|
1018
|
+
function Qo(t, e, o) {
|
|
1019
|
+
let n = o ? { is: o } : void 0;
|
|
1020
|
+
return document.createElementNS(e ?? "http://www.w3.org/1999/xhtml", t, n);
|
|
1021
|
+
}
|
|
1022
|
+
function tn(t) {
|
|
1023
|
+
if (t.nodeValue.length < 65536) return;
|
|
1024
|
+
let e = t.nextSibling;
|
|
1025
|
+
for (; e !== null && e.nodeType === 3; ) e.remove(), t.nodeValue += e.nodeValue, e = t.nextSibling;
|
|
1026
|
+
}
|
|
1027
|
+
function Ci(t) {
|
|
1028
|
+
var e = x, o = S;
|
|
1029
|
+
nt(null), yt(null);
|
|
1030
|
+
try {
|
|
1031
|
+
return t();
|
|
1032
|
+
} finally {
|
|
1033
|
+
nt(e), yt(o);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
function is(t) {
|
|
1037
|
+
S === null && (x === null && xr(t), Sr()), Dt && kr(t);
|
|
1038
|
+
}
|
|
1039
|
+
function rs(t, e) {
|
|
1040
|
+
var o = e.last;
|
|
1041
|
+
o === null ? e.last = e.first = t : (o.next = t, t.prev = o, e.last = t);
|
|
1042
|
+
}
|
|
1043
|
+
function It(t, e) {
|
|
1044
|
+
var o = S;
|
|
1045
|
+
o !== null && o.f & 8192 && (t |= qo);
|
|
1046
|
+
var n = {
|
|
1047
|
+
ctx: j,
|
|
1048
|
+
deps: null,
|
|
1049
|
+
nodes: null,
|
|
1050
|
+
f: t | wt | 512,
|
|
1051
|
+
first: null,
|
|
1052
|
+
fn: e,
|
|
1053
|
+
last: null,
|
|
1054
|
+
next: null,
|
|
1055
|
+
parent: o,
|
|
1056
|
+
b: o && o.b,
|
|
1057
|
+
prev: null,
|
|
1058
|
+
teardown: null,
|
|
1059
|
+
wv: 0,
|
|
1060
|
+
ac: null
|
|
1061
|
+
}, i = n;
|
|
1062
|
+
if (t & 4) ge !== null ? ge.push(n) : re.ensure().schedule(n);
|
|
1063
|
+
else if (e !== null) {
|
|
1064
|
+
try {
|
|
1065
|
+
be(n);
|
|
1066
|
+
} catch (s) {
|
|
1067
|
+
throw z(n), s;
|
|
1068
|
+
}
|
|
1069
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, t & 16 && t & 65536 && i !== null && (i.f |= Go));
|
|
1070
|
+
}
|
|
1071
|
+
if (i !== null && (i.parent = o, o !== null && rs(i, o), x !== null && x.f & 2 && !(t & 64))) {
|
|
1072
|
+
var r = x;
|
|
1073
|
+
(r.effects ?? (r.effects = [])).push(i);
|
|
1074
|
+
}
|
|
1075
|
+
return n;
|
|
1076
|
+
}
|
|
1077
|
+
function en() {
|
|
1078
|
+
return x !== null && !dt;
|
|
1079
|
+
}
|
|
1080
|
+
function ss(t) {
|
|
1081
|
+
const e = It(8, null);
|
|
1082
|
+
return N(e, et), e.teardown = t, e;
|
|
1083
|
+
}
|
|
1084
|
+
function _n(t) {
|
|
1085
|
+
is("$effect");
|
|
1086
|
+
var e = S.f;
|
|
1087
|
+
if (!x && e & 32 && !(e & 32768)) {
|
|
1088
|
+
var o = j;
|
|
1089
|
+
(o.e ?? (o.e = [])).push(t);
|
|
1090
|
+
} else return Ei(t);
|
|
1091
|
+
}
|
|
1092
|
+
function Ei(t) {
|
|
1093
|
+
return It(4 | br, t);
|
|
1094
|
+
}
|
|
1095
|
+
function ls(t) {
|
|
1096
|
+
re.ensure();
|
|
1097
|
+
const e = It(64 | ye, t);
|
|
1098
|
+
return () => {
|
|
1099
|
+
z(e);
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
function as(t) {
|
|
1103
|
+
re.ensure();
|
|
1104
|
+
const e = It(64 | ye, t);
|
|
1105
|
+
return (o = {}) => new Promise((n) => {
|
|
1106
|
+
o.outro ? se(e, () => {
|
|
1107
|
+
z(e), n(void 0);
|
|
1108
|
+
}) : (z(e), n(void 0));
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
function Pi(t) {
|
|
1112
|
+
return It(4, t);
|
|
1113
|
+
}
|
|
1114
|
+
function cs(t) {
|
|
1115
|
+
return It(yr | ye, t);
|
|
1116
|
+
}
|
|
1117
|
+
function on(t, e = 0) {
|
|
1118
|
+
return It(8 | e, t);
|
|
1119
|
+
}
|
|
1120
|
+
function Ke(t, e = [], o = [], n = []) {
|
|
1121
|
+
Zr(n, e, o, (i) => {
|
|
1122
|
+
It(8, () => t(...i.map(g)));
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
function nn(t, e = 0) {
|
|
1126
|
+
return It(16 | e, t);
|
|
1127
|
+
}
|
|
1128
|
+
function ot(t) {
|
|
1129
|
+
return It(32 | ye, t);
|
|
1130
|
+
}
|
|
1131
|
+
function Li(t) {
|
|
1132
|
+
var e = t.teardown;
|
|
1133
|
+
if (e !== null) {
|
|
1134
|
+
const o = Dt, n = x;
|
|
1135
|
+
Cn(!0), nt(null);
|
|
1136
|
+
try {
|
|
1137
|
+
e.call(null);
|
|
1138
|
+
} finally {
|
|
1139
|
+
Cn(o), nt(n);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
function rn(t, e = !1) {
|
|
1144
|
+
var o = t.first;
|
|
1145
|
+
for (t.first = t.last = null; o !== null; ) {
|
|
1146
|
+
const i = o.ac;
|
|
1147
|
+
i !== null && Ci(() => {
|
|
1148
|
+
i.abort(_t);
|
|
1149
|
+
});
|
|
1150
|
+
var n = o.next;
|
|
1151
|
+
o.f & 64 ? o.parent = null : z(o, e), o = n;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
function us(t) {
|
|
1155
|
+
for (var e = t.first; e !== null; ) {
|
|
1156
|
+
var o = e.next;
|
|
1157
|
+
e.f & 32 || z(e), e = o;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
function z(t, e = !0) {
|
|
1161
|
+
var o = !1;
|
|
1162
|
+
(e || t.f & 262144) && t.nodes !== null && t.nodes.end !== null && (ds(t.nodes.start, t.nodes.end), o = !0), N(t, wn), rn(t, e && !o), Oe(t, 0);
|
|
1163
|
+
var n = t.nodes && t.nodes.t;
|
|
1164
|
+
if (n !== null) for (const r of n) r.stop();
|
|
1165
|
+
Li(t), t.f ^= wn, t.f |= mr;
|
|
1166
|
+
var i = t.parent;
|
|
1167
|
+
i !== null && i.first !== null && Mi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1168
|
+
}
|
|
1169
|
+
function ds(t, e) {
|
|
1170
|
+
for (; t !== null; ) {
|
|
1171
|
+
var o = t === e ? null : /* @__PURE__ */ Tt(t);
|
|
1172
|
+
t.remove(), t = o;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
function Mi(t) {
|
|
1176
|
+
var e = t.parent, o = t.prev, n = t.next;
|
|
1177
|
+
o !== null && (o.next = n), n !== null && (n.prev = o), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = o));
|
|
1178
|
+
}
|
|
1179
|
+
function se(t, e, o = !0) {
|
|
1180
|
+
var n = [];
|
|
1181
|
+
Oi(t, n, !0);
|
|
1182
|
+
var i = () => {
|
|
1183
|
+
o && z(t), e && e();
|
|
1184
|
+
}, r = n.length;
|
|
1185
|
+
if (r > 0) {
|
|
1186
|
+
var s = () => --r || i();
|
|
1187
|
+
for (var l of n) l.out(s);
|
|
1188
|
+
} else i();
|
|
1189
|
+
}
|
|
1190
|
+
function Oi(t, e, o) {
|
|
1191
|
+
if (!(t.f & 8192)) {
|
|
1192
|
+
t.f ^= qo;
|
|
1193
|
+
var n = t.nodes && t.nodes.t;
|
|
1194
|
+
if (n !== null) for (const l of n) (l.is_global || o) && e.push(l);
|
|
1195
|
+
for (var i = t.first; i !== null; ) {
|
|
1196
|
+
var r = i.next, s = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
|
|
1197
|
+
Oi(i, e, s ? o : !1), i = r;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
function sn(t) {
|
|
1202
|
+
Ri(t, !0);
|
|
1203
|
+
}
|
|
1204
|
+
function Ri(t, e) {
|
|
1205
|
+
if (t.f & 8192) {
|
|
1206
|
+
t.f ^= qo, t.f & 1024 || (N(t, wt), re.ensure().schedule(t));
|
|
1207
|
+
for (var o = t.first; o !== null; ) {
|
|
1208
|
+
var n = o.next, i = (o.f & 65536) !== 0 || (o.f & 32) !== 0;
|
|
1209
|
+
Ri(o, i ? e : !1), o = n;
|
|
1210
|
+
}
|
|
1211
|
+
var r = t.nodes && t.nodes.t;
|
|
1212
|
+
if (r !== null) for (const s of r) (s.is_global || e) && s.in();
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
function ln(t, e) {
|
|
1216
|
+
if (t.nodes) for (var o = t.nodes.start, n = t.nodes.end; o !== null; ) {
|
|
1217
|
+
var i = o === n ? null : /* @__PURE__ */ Tt(o);
|
|
1218
|
+
e.append(o), o = i;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
var hs = null, Qe = !1, Dt = !1;
|
|
1222
|
+
function Cn(t) {
|
|
1223
|
+
Dt = t;
|
|
1224
|
+
}
|
|
1225
|
+
var x = null, dt = !1;
|
|
1226
|
+
function nt(t) {
|
|
1227
|
+
x = t;
|
|
1228
|
+
}
|
|
1229
|
+
var S = null;
|
|
1230
|
+
function yt(t) {
|
|
1231
|
+
S = t;
|
|
1232
|
+
}
|
|
1233
|
+
var tt = null;
|
|
1234
|
+
function Ni(t) {
|
|
1235
|
+
x !== null && (!zt || x.f & 2) && (tt === null ? tt = [t] : tt.push(t));
|
|
1236
|
+
}
|
|
1237
|
+
var q = null, X = 0, Q = null;
|
|
1238
|
+
function fs(t) {
|
|
1239
|
+
Q = t;
|
|
1240
|
+
}
|
|
1241
|
+
var Vi = 1, Jt = 0, te = Jt;
|
|
1242
|
+
function En(t) {
|
|
1243
|
+
te = t;
|
|
1244
|
+
}
|
|
1245
|
+
function ji() {
|
|
1246
|
+
return ++Vi;
|
|
1247
|
+
}
|
|
1248
|
+
function Ve(t) {
|
|
1249
|
+
var e = t.f;
|
|
1250
|
+
if (e & 2048) return !0;
|
|
1251
|
+
if (e & 2 && (t.f &= ~Re), e & 4096) {
|
|
1252
|
+
for (var o = t.deps, n = o.length, i = 0; i < n; i++) {
|
|
1253
|
+
var r = o[i];
|
|
1254
|
+
if (Ve(r) && yi(r), r.wv > t.wv) return !0;
|
|
1255
|
+
}
|
|
1256
|
+
e & 512 && F === null && N(t, et);
|
|
1257
|
+
}
|
|
1258
|
+
return !1;
|
|
1259
|
+
}
|
|
1260
|
+
function Wi(t, e, o = !0) {
|
|
1261
|
+
var n = t.reactions;
|
|
1262
|
+
if (n !== null && !(!zt && tt !== null && pe.call(tt, t))) for (var i = 0; i < n.length; i++) {
|
|
1263
|
+
var r = n[i];
|
|
1264
|
+
r.f & 2 ? Wi(r, e, !1) : e === r && (o ? N(r, wt) : r.f & 1024 && N(r, ie), Jo(r));
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
function zi(t) {
|
|
1268
|
+
var e = q, o = X, n = Q, i = x, r = tt, s = j, l = dt, a = te, u = t.f;
|
|
1269
|
+
q = null, X = 0, Q = null, x = u & 96 ? null : t, tt = null, ve(t.ctx), dt = !1, te = ++Jt, t.ac !== null && (Ci(() => {
|
|
1270
|
+
t.ac.abort(_t);
|
|
1271
|
+
}), t.ac = null);
|
|
1272
|
+
try {
|
|
1273
|
+
t.f |= Tn;
|
|
1274
|
+
var d = t.fn, p = d();
|
|
1275
|
+
t.f |= Fo;
|
|
1276
|
+
var h = t.deps, v = P?.is_fork;
|
|
1277
|
+
if (q !== null) {
|
|
1278
|
+
var y;
|
|
1279
|
+
if (v || Oe(t, X), h !== null && X > 0) for (h.length = X + q.length, y = 0; y < q.length; y++) h[X + y] = q[y];
|
|
1280
|
+
else t.deps = h = q;
|
|
1281
|
+
if (en() && t.f & 512) for (y = X; y < h.length; y++) {
|
|
1282
|
+
var $;
|
|
1283
|
+
(($ = h[y]).reactions ?? ($.reactions = [])).push(t);
|
|
1284
|
+
}
|
|
1285
|
+
} else !v && h !== null && X < h.length && (Oe(t, X), h.length = X);
|
|
1286
|
+
if (Ne() && Q !== null && !dt && h !== null && !(t.f & 6146)) for (y = 0; y < Q.length; y++) Wi(Q[y], t);
|
|
1287
|
+
if (i !== null && i !== t) {
|
|
1288
|
+
if (Jt++, i.deps !== null) for (let f = 0; f < o; f += 1) i.deps[f].rv = Jt;
|
|
1289
|
+
if (e !== null) for (const f of e) f.rv = Jt;
|
|
1290
|
+
Q !== null && (n === null ? n = Q : n.push(...Q));
|
|
1291
|
+
}
|
|
1292
|
+
return t.f & 8388608 && (t.f ^= lo), p;
|
|
1293
|
+
} catch (f) {
|
|
1294
|
+
return ii(f);
|
|
1295
|
+
} finally {
|
|
1296
|
+
t.f ^= Tn, q = e, X = o, Q = n, x = i, tt = r, ve(s), dt = l, te = a;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
function ps(t, e) {
|
|
1300
|
+
let o = e.reactions;
|
|
1301
|
+
if (o !== null) {
|
|
1302
|
+
var n = dr.call(o, t);
|
|
1303
|
+
if (n !== -1) {
|
|
1304
|
+
var i = o.length - 1;
|
|
1305
|
+
i === 0 ? o = e.reactions = null : (o[n] = o[i], o.pop());
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
if (o === null && e.f & 2 && (q === null || !pe.call(q, e))) {
|
|
1309
|
+
var r = e;
|
|
1310
|
+
r.f & 512 && (r.f ^= 512, r.f &= ~Re), Uo(r), os(r), Oe(r, 0);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
function Oe(t, e) {
|
|
1314
|
+
var o = t.deps;
|
|
1315
|
+
if (o !== null) for (var n = e; n < o.length; n++) ps(t, o[n]);
|
|
1316
|
+
}
|
|
1317
|
+
function be(t) {
|
|
1318
|
+
var e = t.f;
|
|
1319
|
+
if (!(e & 16384)) {
|
|
1320
|
+
N(t, et);
|
|
1321
|
+
var o = S, n = Qe;
|
|
1322
|
+
S = t, Qe = !0;
|
|
1323
|
+
try {
|
|
1324
|
+
e & 16777232 ? us(t) : rn(t), Li(t);
|
|
1325
|
+
var i = zi(t);
|
|
1326
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Vi;
|
|
1327
|
+
} finally {
|
|
1328
|
+
Qe = n, S = o;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
function g(t) {
|
|
1333
|
+
var e = (t.f & 2) !== 0;
|
|
1334
|
+
if (hs?.add(t), x !== null && !dt && !(S !== null && S.f & 16384) && (tt === null || !pe.call(tt, t))) {
|
|
1335
|
+
var o = x.deps;
|
|
1336
|
+
if (x.f & 2097152) t.rv < Jt && (t.rv = Jt, q === null && o !== null && o[X] === t ? X++ : q === null ? q = [t] : q.push(t));
|
|
1337
|
+
else {
|
|
1338
|
+
var n;
|
|
1339
|
+
((n = x).deps ?? (n.deps = [])).push(t);
|
|
1340
|
+
var i = t.reactions;
|
|
1341
|
+
i === null ? t.reactions = [x] : pe.call(i, x) || i.push(x);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
if (Dt && Wt.has(t)) return Wt.get(t);
|
|
1345
|
+
if (e) {
|
|
1346
|
+
var r = t;
|
|
1347
|
+
if (Dt) {
|
|
1348
|
+
var s = r.v;
|
|
1349
|
+
return (!(r.f & 1024) && r.reactions !== null || Hi(r)) && (s = Yo(r)), Wt.set(r, s), s;
|
|
1350
|
+
}
|
|
1351
|
+
var l = (r.f & 512) === 0 && !dt && x !== null && (Qe || (x.f & 512) !== 0), a = (r.f & Fo) === 0;
|
|
1352
|
+
Ve(r) && (l && (r.f |= 512), yi(r)), l && !a && (wi(r), Di(r));
|
|
1353
|
+
}
|
|
1354
|
+
if (F?.has(t)) return F.get(t);
|
|
1355
|
+
if (t.f & 8388608) throw t.v;
|
|
1356
|
+
return t.v;
|
|
1357
|
+
}
|
|
1358
|
+
function Di(t) {
|
|
1359
|
+
if (t.f |= 512, t.deps !== null) for (const e of t.deps) (e.reactions ?? (e.reactions = [])).push(t), e.f & 2 && !(e.f & 512) && (wi(e), Di(e));
|
|
1360
|
+
}
|
|
1361
|
+
function Hi(t) {
|
|
1362
|
+
if (t.v === W) return !0;
|
|
1363
|
+
if (t.deps === null) return !1;
|
|
1364
|
+
for (const e of t.deps) if (Wt.has(e) || e.f & 2 && Hi(e)) return !0;
|
|
1365
|
+
return !1;
|
|
1366
|
+
}
|
|
1367
|
+
function an(t) {
|
|
1368
|
+
var e = dt;
|
|
1369
|
+
try {
|
|
1370
|
+
return dt = !0, t();
|
|
1371
|
+
} finally {
|
|
1372
|
+
dt = e;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
var he = Symbol("events"), Bi = /* @__PURE__ */ new Set(), zo = /* @__PURE__ */ new Set();
|
|
1376
|
+
function Ie(t, e, o) {
|
|
1377
|
+
(e[he] ?? (e[he] = {}))[t] = o;
|
|
1378
|
+
}
|
|
1379
|
+
function vs(t) {
|
|
1380
|
+
for (var e = 0; e < t.length; e++) Bi.add(t[e]);
|
|
1381
|
+
for (var o of zo) o(t);
|
|
1382
|
+
}
|
|
1383
|
+
var Pn = null;
|
|
1384
|
+
function Ln(t) {
|
|
1385
|
+
var e = this, o = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], r = i[0] || t.target;
|
|
1386
|
+
Pn = t;
|
|
1387
|
+
var s = 0, l = Pn === t && t[he];
|
|
1388
|
+
if (l) {
|
|
1389
|
+
var a = i.indexOf(l);
|
|
1390
|
+
if (a !== -1 && (e === document || e === window)) {
|
|
1391
|
+
t[he] = e;
|
|
1392
|
+
return;
|
|
1393
|
+
}
|
|
1394
|
+
var u = i.indexOf(e);
|
|
1395
|
+
if (u === -1) return;
|
|
1396
|
+
a <= u && (s = a);
|
|
1397
|
+
}
|
|
1398
|
+
if (r = i[s] || t.target, r !== e) {
|
|
1399
|
+
so(t, "currentTarget", {
|
|
1400
|
+
configurable: !0,
|
|
1401
|
+
get() {
|
|
1402
|
+
return r || o;
|
|
1403
|
+
}
|
|
1404
|
+
});
|
|
1405
|
+
var d = x, p = S;
|
|
1406
|
+
nt(null), yt(null);
|
|
1407
|
+
try {
|
|
1408
|
+
for (var h, v = []; r !== null; ) {
|
|
1409
|
+
var y = r.assignedSlot || r.parentNode || r.host || null;
|
|
1410
|
+
try {
|
|
1411
|
+
var $ = r[he]?.[n];
|
|
1412
|
+
$ != null && (!r.disabled || t.target === r) && $.call(r, t);
|
|
1413
|
+
} catch (f) {
|
|
1414
|
+
h ? v.push(f) : h = f;
|
|
1415
|
+
}
|
|
1416
|
+
if (t.cancelBubble || y === e || y === null) break;
|
|
1417
|
+
r = y;
|
|
1418
|
+
}
|
|
1419
|
+
if (h) {
|
|
1420
|
+
for (let f of v) queueMicrotask(() => {
|
|
1421
|
+
throw f;
|
|
1422
|
+
});
|
|
1423
|
+
throw h;
|
|
1424
|
+
}
|
|
1425
|
+
} finally {
|
|
1426
|
+
t[he] = e, delete t.currentTarget, nt(d), yt(p);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
var gs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
|
|
1431
|
+
function ms(t) {
|
|
1432
|
+
return gs?.createHTML(t) ?? t;
|
|
1433
|
+
}
|
|
1434
|
+
function bs(t) {
|
|
1435
|
+
var e = Qo("template");
|
|
1436
|
+
return e.innerHTML = ms(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1437
|
+
}
|
|
1438
|
+
function to(t, e) {
|
|
1439
|
+
var o = S;
|
|
1440
|
+
o.nodes === null && (o.nodes = {
|
|
1441
|
+
start: t,
|
|
1442
|
+
end: e,
|
|
1443
|
+
a: null,
|
|
1444
|
+
t: null
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
// @__NO_SIDE_EFFECTS__
|
|
1448
|
+
function le(t, e) {
|
|
1449
|
+
var o = (e & 1) !== 0, n = (e & 2) !== 0, i, r = !t.startsWith("<!>");
|
|
1450
|
+
return () => {
|
|
1451
|
+
if (L) return to(E, null), E;
|
|
1452
|
+
i === void 0 && (i = bs(r ? t : "<!>" + t), o || (i = /* @__PURE__ */ ne(i)));
|
|
1453
|
+
var s = n || ki ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1454
|
+
if (o) {
|
|
1455
|
+
var l = /* @__PURE__ */ ne(s), a = s.lastChild;
|
|
1456
|
+
to(l, a);
|
|
1457
|
+
} else to(s, s);
|
|
1458
|
+
return s;
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
function Ot(t, e) {
|
|
1462
|
+
if (L) {
|
|
1463
|
+
var o = S;
|
|
1464
|
+
(!(o.f & 32768) || o.nodes.end === null) && (o.nodes.end = E), go();
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
t !== null && t.before(e);
|
|
1468
|
+
}
|
|
1469
|
+
var ys = ["touchstart", "touchmove"];
|
|
1470
|
+
function ws(t) {
|
|
1471
|
+
return ys.includes(t);
|
|
1472
|
+
}
|
|
1473
|
+
function Mn(t, e) {
|
|
1474
|
+
var o = e == null ? "" : typeof e == "object" ? `${e}` : e;
|
|
1475
|
+
o !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = o, t.nodeValue = `${o}`);
|
|
1476
|
+
}
|
|
1477
|
+
function qi(t, e) {
|
|
1478
|
+
return Fi(t, e);
|
|
1479
|
+
}
|
|
1480
|
+
function Ts(t, e) {
|
|
1481
|
+
Wo(), e.intro = e.intro ?? !1;
|
|
1482
|
+
const o = e.target, n = L, i = E;
|
|
1483
|
+
try {
|
|
1484
|
+
for (var r = /* @__PURE__ */ ne(o); r && (r.nodeType !== 8 || r.data !== "["); ) r = /* @__PURE__ */ Tt(r);
|
|
1485
|
+
if (!r) throw fe;
|
|
1486
|
+
Ct(!0), G(r);
|
|
1487
|
+
const s = Fi(t, {
|
|
1488
|
+
...e,
|
|
1489
|
+
anchor: r
|
|
1490
|
+
});
|
|
1491
|
+
return Ct(!1), s;
|
|
1492
|
+
} catch (s) {
|
|
1493
|
+
if (s instanceof Error && s.message.split(`
|
|
1494
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1495
|
+
return s !== fe && console.warn("Failed to hydrate: ", s), e.recover === !1 && _r(), Wo(), Ai(o), Ct(!1), qi(t, e);
|
|
1496
|
+
} finally {
|
|
1497
|
+
Ct(n), G(i);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
var Je = /* @__PURE__ */ new Map();
|
|
1501
|
+
function Fi(t, { target: e, anchor: o, props: n = {}, events: i, context: r, intro: s = !0, transformError: l }) {
|
|
1502
|
+
Wo();
|
|
1503
|
+
var a = void 0, u = as(() => {
|
|
1504
|
+
var d = o ?? e.appendChild(ht());
|
|
1505
|
+
Gr(d, { pending: () => {
|
|
1506
|
+
} }, (v) => {
|
|
1507
|
+
ei({});
|
|
1508
|
+
var y = j;
|
|
1509
|
+
if (r && (y.c = r), i && (n.$$events = i), L && to(v, null), a = t(v, n) || {}, L && (S.nodes.end = E, E === null || E.nodeType !== 8 || E.data !== "]")) throw vo(), fe;
|
|
1510
|
+
oi();
|
|
1511
|
+
}, l);
|
|
1512
|
+
var p = /* @__PURE__ */ new Set(), h = (v) => {
|
|
1513
|
+
for (var y = 0; y < v.length; y++) {
|
|
1514
|
+
var $ = v[y];
|
|
1515
|
+
if (!p.has($)) {
|
|
1516
|
+
p.add($);
|
|
1517
|
+
var f = ws($);
|
|
1518
|
+
for (const A of [e, document]) {
|
|
1519
|
+
var w = Je.get(A);
|
|
1520
|
+
w === void 0 && (w = /* @__PURE__ */ new Map(), Je.set(A, w));
|
|
1521
|
+
var R = w.get($);
|
|
1522
|
+
R === void 0 ? (A.addEventListener($, Ln, { passive: f }), w.set($, 1)) : w.set($, R + 1);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
};
|
|
1527
|
+
return h(po(Bi)), zo.add(h), () => {
|
|
1528
|
+
for (var v of p) for (const f of [e, document]) {
|
|
1529
|
+
var y = Je.get(f), $ = y.get(v);
|
|
1530
|
+
--$ == 0 ? (f.removeEventListener(v, Ln), y.delete(v), y.size === 0 && Je.delete(f)) : y.set(v, $);
|
|
1531
|
+
}
|
|
1532
|
+
zo.delete(h), d !== o && d.parentNode?.removeChild(d);
|
|
1533
|
+
};
|
|
1534
|
+
});
|
|
1535
|
+
return Do.set(a, u), a;
|
|
1536
|
+
}
|
|
1537
|
+
var Do = /* @__PURE__ */ new WeakMap();
|
|
1538
|
+
function Is(t, e) {
|
|
1539
|
+
const o = Do.get(t);
|
|
1540
|
+
return o ? (Do.delete(t), o(e)) : Promise.resolve();
|
|
1541
|
+
}
|
|
1542
|
+
var kt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakMap(), Ao = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), $s = class {
|
|
1543
|
+
constructor(t, e = !0) {
|
|
1544
|
+
b(this, "anchor", void 0), k(this, kt, /* @__PURE__ */ new Map()), k(this, Lt, /* @__PURE__ */ new Map()), k(this, lt, /* @__PURE__ */ new Map()), k(this, $e, /* @__PURE__ */ new Set()), k(this, xo, !0), k(this, Ao, (o) => {
|
|
1545
|
+
if (c(kt, this).has(o)) {
|
|
1546
|
+
var n = c(kt, this).get(o), i = c(Lt, this).get(n);
|
|
1547
|
+
if (i) sn(i), c($e, this).delete(n);
|
|
1548
|
+
else {
|
|
1549
|
+
var r = c(lt, this).get(n);
|
|
1550
|
+
r && (c(Lt, this).set(n, r.effect), c(lt, this).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
|
|
1551
|
+
}
|
|
1552
|
+
for (const [s, l] of c(kt, this)) {
|
|
1553
|
+
if (c(kt, this).delete(s), s === o) break;
|
|
1554
|
+
const a = c(lt, this).get(l);
|
|
1555
|
+
a && (z(a.effect), c(lt, this).delete(l));
|
|
1556
|
+
}
|
|
1557
|
+
for (const [s, l] of c(Lt, this)) {
|
|
1558
|
+
if (s === n || c($e, this).has(s)) continue;
|
|
1559
|
+
const a = () => {
|
|
1560
|
+
if (Array.from(c(kt, this).values()).includes(s)) {
|
|
1561
|
+
var u = document.createDocumentFragment();
|
|
1562
|
+
ln(l, u), u.append(ht()), c(lt, this).set(s, {
|
|
1563
|
+
effect: l,
|
|
1564
|
+
fragment: u
|
|
1565
|
+
});
|
|
1566
|
+
} else z(l);
|
|
1567
|
+
c($e, this).delete(s), c(Lt, this).delete(s);
|
|
1568
|
+
};
|
|
1569
|
+
c(xo, this) || !i ? (c($e, this).add(s), se(l, a, !1)) : a();
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}), k(this, On, (o) => {
|
|
1573
|
+
c(kt, this).delete(o);
|
|
1574
|
+
const n = Array.from(c(kt, this).values());
|
|
1575
|
+
for (const [i, r] of c(lt, this)) n.includes(i) || (z(r.effect), c(lt, this).delete(i));
|
|
1576
|
+
}), this.anchor = t, T(xo, this, e);
|
|
1577
|
+
}
|
|
1578
|
+
ensure(t, e) {
|
|
1579
|
+
var o = P, n = _i();
|
|
1580
|
+
if (e && !c(Lt, this).has(t) && !c(lt, this).has(t)) if (n) {
|
|
1581
|
+
var i = document.createDocumentFragment(), r = ht();
|
|
1582
|
+
i.append(r), c(lt, this).set(t, {
|
|
1583
|
+
effect: ot(() => e(r)),
|
|
1584
|
+
fragment: i
|
|
1585
|
+
});
|
|
1586
|
+
} else c(Lt, this).set(t, ot(() => e(this.anchor)));
|
|
1587
|
+
if (c(kt, this).set(o, t), n) {
|
|
1588
|
+
for (const [s, l] of c(Lt, this)) s === t ? o.unskip_effect(l) : o.skip_effect(l);
|
|
1589
|
+
for (const [s, l] of c(lt, this)) s === t ? o.unskip_effect(l.effect) : o.skip_effect(l.effect);
|
|
1590
|
+
o.oncommit(c(Ao, this)), o.ondiscard(c(On, this));
|
|
1591
|
+
} else L && (this.anchor = E), c(Ao, this).call(this, o);
|
|
1592
|
+
}
|
|
1593
|
+
};
|
|
1594
|
+
function ke(t, e, o = !1) {
|
|
1595
|
+
var n;
|
|
1596
|
+
L && (n = E, go());
|
|
1597
|
+
var i = new $s(t), r = o ? Go : 0;
|
|
1598
|
+
function s(l, a) {
|
|
1599
|
+
if (L) {
|
|
1600
|
+
var u = Yn(n);
|
|
1601
|
+
if (l !== parseInt(u.substring(1))) {
|
|
1602
|
+
var d = ao();
|
|
1603
|
+
G(d), i.anchor = d, Ct(!1), i.ensure(l, a), Ct(!0);
|
|
1604
|
+
return;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
i.ensure(l, a);
|
|
1608
|
+
}
|
|
1609
|
+
nn(() => {
|
|
1610
|
+
var l = !1;
|
|
1611
|
+
e((a, u = 0) => {
|
|
1612
|
+
l = !0, s(u, a);
|
|
1613
|
+
}), l || s(-1, null);
|
|
1614
|
+
}, r);
|
|
1615
|
+
}
|
|
1616
|
+
function ks(t, e) {
|
|
1617
|
+
return e;
|
|
1618
|
+
}
|
|
1619
|
+
function Ss(t, e, o) {
|
|
1620
|
+
for (var n = [], i = e.length, r, s = e.length, l = 0; l < i; l++) {
|
|
1621
|
+
let p = e[l];
|
|
1622
|
+
se(p, () => {
|
|
1623
|
+
if (r) {
|
|
1624
|
+
if (r.pending.delete(p), r.done.add(p), r.pending.size === 0) {
|
|
1625
|
+
var h = t.outrogroups;
|
|
1626
|
+
Ho(t, po(r.done)), h.delete(r), h.size === 0 && (t.outrogroups = null);
|
|
1627
|
+
}
|
|
1628
|
+
} else s -= 1;
|
|
1629
|
+
}, !1);
|
|
1630
|
+
}
|
|
1631
|
+
if (s === 0) {
|
|
1632
|
+
var a = n.length === 0 && o !== null;
|
|
1633
|
+
if (a) {
|
|
1634
|
+
var u = o, d = u.parentNode;
|
|
1635
|
+
Ai(d), d.append(u), t.items.clear();
|
|
1636
|
+
}
|
|
1637
|
+
Ho(t, e, !a);
|
|
1638
|
+
} else r = {
|
|
1639
|
+
pending: new Set(e),
|
|
1640
|
+
done: /* @__PURE__ */ new Set()
|
|
1641
|
+
}, (t.outrogroups ?? (t.outrogroups = /* @__PURE__ */ new Set())).add(r);
|
|
1642
|
+
}
|
|
1643
|
+
function Ho(t, e, o = !0) {
|
|
1644
|
+
var n;
|
|
1645
|
+
if (t.pending.size > 0) {
|
|
1646
|
+
n = /* @__PURE__ */ new Set();
|
|
1647
|
+
for (const s of t.pending.values()) for (const l of s) n.add(t.items.get(l).e);
|
|
1648
|
+
}
|
|
1649
|
+
for (var i = 0; i < e.length; i++) {
|
|
1650
|
+
var r = e[i];
|
|
1651
|
+
n?.has(r) ? (r.f |= _e, ln(r, document.createDocumentFragment())) : z(e[i], o);
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
var Xe;
|
|
1655
|
+
function xs(t, e, o, n, i, r = null) {
|
|
1656
|
+
var s = t, l = /* @__PURE__ */ new Map();
|
|
1657
|
+
if (e & 4) {
|
|
1658
|
+
var a = t;
|
|
1659
|
+
s = L ? G(/* @__PURE__ */ ne(a)) : a.appendChild(ht());
|
|
1660
|
+
}
|
|
1661
|
+
L && go();
|
|
1662
|
+
var u = null, d = /* @__PURE__ */ Zo(() => {
|
|
1663
|
+
var w = o();
|
|
1664
|
+
return Kn(w) ? w : w == null ? [] : po(w);
|
|
1665
|
+
}), p, h = /* @__PURE__ */ new Map(), v = !0;
|
|
1666
|
+
function y(w) {
|
|
1667
|
+
f.effect.f & 16384 || (f.pending.delete(w), f.fallback = u, As(f, p, s, e, n), u !== null && (p.length === 0 ? u.f & 33554432 ? (u.f ^= _e, Ae(u, null, s)) : sn(u) : se(u, () => {
|
|
1668
|
+
u = null;
|
|
1669
|
+
})));
|
|
1670
|
+
}
|
|
1671
|
+
function $(w) {
|
|
1672
|
+
f.pending.delete(w);
|
|
1673
|
+
}
|
|
1674
|
+
var f = {
|
|
1675
|
+
effect: nn(() => {
|
|
1676
|
+
p = g(d);
|
|
1677
|
+
var w = p.length;
|
|
1678
|
+
let R = !1;
|
|
1679
|
+
L && Yn(s) === "[!" != (w === 0) && (s = ao(), G(s), Ct(!1), R = !0);
|
|
1680
|
+
for (var A = /* @__PURE__ */ new Set(), O = P, U = _i(), D = 0; D < w; D += 1) {
|
|
1681
|
+
L && E.nodeType === 8 && E.data === "]" && (s = E, R = !0, Ct(!1));
|
|
1682
|
+
var H = p[D], ft = n(H, D), K = v ? null : l.get(ft);
|
|
1683
|
+
K ? (K.v && me(K.v, H), K.i && me(K.i, D), U && O.unskip_effect(K.e)) : (K = _s(l, v ? s : Xe ?? (Xe = ht()), H, ft, D, i, e, o), v || (K.e.f |= _e), l.set(ft, K)), A.add(ft);
|
|
1684
|
+
}
|
|
1685
|
+
if (w === 0 && r && !u && (v ? u = ot(() => r(s)) : (u = ot(() => r(Xe ?? (Xe = ht()))), u.f |= _e)), w > A.size && $r("", "", ""), L && w > 0 && G(ao()), !v) if (h.set(O, A), U) {
|
|
1686
|
+
for (const [pt, je] of l) A.has(pt) || O.skip_effect(je.e);
|
|
1687
|
+
O.oncommit(y), O.ondiscard($);
|
|
1688
|
+
} else y(O);
|
|
1689
|
+
R && Ct(!0), g(d);
|
|
1690
|
+
}),
|
|
1691
|
+
flags: e,
|
|
1692
|
+
items: l,
|
|
1693
|
+
pending: h,
|
|
1694
|
+
outrogroups: null,
|
|
1695
|
+
fallback: u
|
|
1696
|
+
};
|
|
1697
|
+
v = !1, L && (s = E);
|
|
1698
|
+
}
|
|
1699
|
+
function Se(t) {
|
|
1700
|
+
for (; t !== null && !(t.f & 32); ) t = t.next;
|
|
1701
|
+
return t;
|
|
1702
|
+
}
|
|
1703
|
+
function As(t, e, o, n, i) {
|
|
1704
|
+
var r = (n & 8) !== 0, s = e.length, l = t.items, a = Se(t.effect.first), u, d = null, p, h = [], v = [], y, $, f, w;
|
|
1705
|
+
if (r) for (w = 0; w < s; w += 1) y = e[w], $ = i(y, w), f = l.get($).e, f.f & 33554432 || (f.nodes?.a?.measure(), (p ?? (p = /* @__PURE__ */ new Set())).add(f));
|
|
1706
|
+
for (w = 0; w < s; w += 1) {
|
|
1707
|
+
if (y = e[w], $ = i(y, w), f = l.get($).e, t.outrogroups !== null) for (const pt of t.outrogroups) pt.pending.delete(f), pt.done.delete(f);
|
|
1708
|
+
if (f.f & 8192 && (sn(f), r && (f.nodes?.a?.unfix(), (p ?? (p = /* @__PURE__ */ new Set())).delete(f))), f.f & 33554432) if (f.f ^= _e, f === a) Ae(f, null, o);
|
|
1709
|
+
else {
|
|
1710
|
+
var R = d ? d.next : a;
|
|
1711
|
+
f === t.effect.last && (t.effect.last = f.prev), f.prev && (f.prev.next = f.next), f.next && (f.next.prev = f.prev), Mt(t, d, f), Mt(t, f, R), Ae(f, R, o), d = f, h = [], v = [], a = Se(d.next);
|
|
1712
|
+
continue;
|
|
1713
|
+
}
|
|
1714
|
+
if (f !== a) {
|
|
1715
|
+
if (u !== void 0 && u.has(f)) {
|
|
1716
|
+
if (h.length < v.length) {
|
|
1717
|
+
var A = v[0], O;
|
|
1718
|
+
d = A.prev;
|
|
1719
|
+
var U = h[0], D = h[h.length - 1];
|
|
1720
|
+
for (O = 0; O < h.length; O += 1) Ae(h[O], A, o);
|
|
1721
|
+
for (O = 0; O < v.length; O += 1) u.delete(v[O]);
|
|
1722
|
+
Mt(t, U.prev, D.next), Mt(t, d, U), Mt(t, D, A), a = A, d = D, w -= 1, h = [], v = [];
|
|
1723
|
+
} else u.delete(f), Ae(f, a, o), Mt(t, f.prev, f.next), Mt(t, f, d === null ? t.effect.first : d.next), Mt(t, d, f), d = f;
|
|
1724
|
+
continue;
|
|
1725
|
+
}
|
|
1726
|
+
for (h = [], v = []; a !== null && a !== f; ) (u ?? (u = /* @__PURE__ */ new Set())).add(a), v.push(a), a = Se(a.next);
|
|
1727
|
+
if (a === null) continue;
|
|
1728
|
+
}
|
|
1729
|
+
f.f & 33554432 || h.push(f), d = f, a = Se(f.next);
|
|
1730
|
+
}
|
|
1731
|
+
if (t.outrogroups !== null) {
|
|
1732
|
+
for (const pt of t.outrogroups) pt.pending.size === 0 && (Ho(t, po(pt.done)), t.outrogroups?.delete(pt));
|
|
1733
|
+
t.outrogroups.size === 0 && (t.outrogroups = null);
|
|
1734
|
+
}
|
|
1735
|
+
if (a !== null || u !== void 0) {
|
|
1736
|
+
var H = [];
|
|
1737
|
+
if (u !== void 0) for (f of u) f.f & 8192 || H.push(f);
|
|
1738
|
+
for (; a !== null; ) !(a.f & 8192) && a !== t.fallback && H.push(a), a = Se(a.next);
|
|
1739
|
+
var ft = H.length;
|
|
1740
|
+
if (ft > 0) {
|
|
1741
|
+
var K = n & 4 && s === 0 ? o : null;
|
|
1742
|
+
if (r) {
|
|
1743
|
+
for (w = 0; w < ft; w += 1) H[w].nodes?.a?.measure();
|
|
1744
|
+
for (w = 0; w < ft; w += 1) H[w].nodes?.a?.fix();
|
|
1745
|
+
}
|
|
1746
|
+
Ss(t, H, K);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
r && ee(() => {
|
|
1750
|
+
if (p !== void 0) for (f of p) f.nodes?.a?.apply();
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
function _s(t, e, o, n, i, r, s, l) {
|
|
1754
|
+
var a = s & 1 ? s & 16 ? oe(o) : /* @__PURE__ */ Ii(o, !1, !1) : null, u = s & 2 ? oe(i) : null;
|
|
1755
|
+
return {
|
|
1756
|
+
v: a,
|
|
1757
|
+
i: u,
|
|
1758
|
+
e: ot(() => (r(e, a ?? o, u ?? i, l), () => {
|
|
1759
|
+
t.delete(n);
|
|
1760
|
+
}))
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
function Ae(t, e, o) {
|
|
1764
|
+
if (t.nodes) for (var n = t.nodes.start, i = t.nodes.end, r = e && !(e.f & 33554432) ? e.nodes.start : o; n !== null; ) {
|
|
1765
|
+
var s = /* @__PURE__ */ Tt(n);
|
|
1766
|
+
if (r.before(n), n === i) return;
|
|
1767
|
+
n = s;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
function Mt(t, e, o) {
|
|
1771
|
+
e === null ? t.effect.first = o : e.next = o, o === null ? t.effect.last = e : o.prev = e;
|
|
1772
|
+
}
|
|
1773
|
+
function Cs(t, e) {
|
|
1774
|
+
Pi(() => {
|
|
1775
|
+
var o = t.getRootNode(), n = o.host ? o : o.head ?? o.ownerDocument.head;
|
|
1776
|
+
if (!n.querySelector("#" + e.hash)) {
|
|
1777
|
+
const i = Qo("style");
|
|
1778
|
+
i.id = e.hash, i.textContent = e.code, n.appendChild(i);
|
|
1779
|
+
}
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
function Rn(t, e = !1) {
|
|
1783
|
+
var o = e ? " !important;" : ";", n = "";
|
|
1784
|
+
for (var i of Object.keys(t)) {
|
|
1785
|
+
var r = t[i];
|
|
1786
|
+
r != null && r !== "" && (n += " " + i + ": " + r + o);
|
|
1787
|
+
}
|
|
1788
|
+
return n;
|
|
1789
|
+
}
|
|
1790
|
+
function _o(t) {
|
|
1791
|
+
return t[0] !== "-" || t[1] !== "-" ? t.toLowerCase() : t;
|
|
1792
|
+
}
|
|
1793
|
+
function Es(t, e) {
|
|
1794
|
+
if (e) {
|
|
1795
|
+
var o = "", n, i;
|
|
1796
|
+
if (Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, t) {
|
|
1797
|
+
t = String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
1798
|
+
var r = !1, s = 0, l = !1, a = [];
|
|
1799
|
+
n && a.push(...Object.keys(n).map(_o)), i && a.push(...Object.keys(i).map(_o));
|
|
1800
|
+
var u = 0, d = -1;
|
|
1801
|
+
const $ = t.length;
|
|
1802
|
+
for (var p = 0; p < $; p++) {
|
|
1803
|
+
var h = t[p];
|
|
1804
|
+
if (l ? h === "/" && t[p - 1] === "*" && (l = !1) : r ? r === h && (r = !1) : h === "/" && t[p + 1] === "*" ? l = !0 : h === '"' || h === "'" ? r = h : h === "(" ? s++ : h === ")" && s--, !l && r === !1 && s === 0) {
|
|
1805
|
+
if (h === ":" && d === -1) d = p;
|
|
1806
|
+
else if (h === ";" || p === $ - 1) {
|
|
1807
|
+
if (d !== -1) {
|
|
1808
|
+
var v = _o(t.substring(u, d).trim());
|
|
1809
|
+
if (!a.includes(v)) {
|
|
1810
|
+
h !== ";" && p++;
|
|
1811
|
+
var y = t.substring(u, p).trim();
|
|
1812
|
+
o += " " + y + ";";
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
u = p + 1, d = -1;
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
return n && (o += Rn(n)), i && (o += Rn(i, !0)), o = o.trim(), o === "" ? null : o;
|
|
1821
|
+
}
|
|
1822
|
+
return t == null ? null : String(t);
|
|
1823
|
+
}
|
|
1824
|
+
function Co(t, e = {}, o, n) {
|
|
1825
|
+
for (var i in o) {
|
|
1826
|
+
var r = o[i];
|
|
1827
|
+
e[i] !== r && (o[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, r, n));
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
function Nn(t, e, o, n) {
|
|
1831
|
+
var i = t.__style;
|
|
1832
|
+
if (L || i !== e) {
|
|
1833
|
+
var r = Es(e, n);
|
|
1834
|
+
(!L || r !== t.getAttribute("style")) && (r == null ? t.removeAttribute("style") : t.style.cssText = r), t.__style = e;
|
|
1835
|
+
} else n && (Array.isArray(n) ? (Co(t, o?.[0], n[0]), Co(t, o?.[1], n[1], "important")) : Co(t, o, n));
|
|
1836
|
+
return n;
|
|
1837
|
+
}
|
|
1838
|
+
var Ps = Symbol("is custom element"), Ls = Symbol("is html"), Ms = Tr ? "link" : "LINK";
|
|
1839
|
+
function Vn(t, e, o, n) {
|
|
1840
|
+
var i = Os(t);
|
|
1841
|
+
L && (i[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Ms) || i[e] !== (i[e] = o) && (e === "loading" && (t[wr] = o), o == null ? t.removeAttribute(e) : typeof o != "string" && Rs(t).includes(e) ? t[e] = o : t.setAttribute(e, o));
|
|
1842
|
+
}
|
|
1843
|
+
function Os(t) {
|
|
1844
|
+
return t.__attributes ?? (t.__attributes = {
|
|
1845
|
+
[Ps]: t.nodeName.includes("-"),
|
|
1846
|
+
[Ls]: t.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
var jn = /* @__PURE__ */ new Map();
|
|
1850
|
+
function Rs(t) {
|
|
1851
|
+
var e = t.getAttribute("is") || t.nodeName, o = jn.get(e);
|
|
1852
|
+
if (o) return o;
|
|
1853
|
+
jn.set(e, o = []);
|
|
1854
|
+
for (var n, i = t, r = Element.prototype; r !== i; ) {
|
|
1855
|
+
n = hr(i);
|
|
1856
|
+
for (var s in n) n[s].set && o.push(s);
|
|
1857
|
+
i = Jn(i);
|
|
1858
|
+
}
|
|
1859
|
+
return o;
|
|
1860
|
+
}
|
|
1861
|
+
var Gi, de = /* @__PURE__ */ new WeakMap(), fo = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakSet(), Ui = class {
|
|
1862
|
+
constructor(t) {
|
|
1863
|
+
Ko(this, Wn), k(this, de, /* @__PURE__ */ new WeakMap()), k(this, fo, void 0), k(this, Eo, void 0), T(Eo, this, t);
|
|
1864
|
+
}
|
|
1865
|
+
observe(t, e) {
|
|
1866
|
+
var o = c(de, this).get(t) || /* @__PURE__ */ new Set();
|
|
1867
|
+
return o.add(e), c(de, this).set(t, o), M(Wn, this, Ns).call(this).observe(t, c(Eo, this)), () => {
|
|
1868
|
+
var n = c(de, this).get(t);
|
|
1869
|
+
n.delete(e), n.size === 0 && (c(de, this).delete(t), c(fo, this).unobserve(t));
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
Gi = Ui;
|
|
1874
|
+
function Ns() {
|
|
1875
|
+
return c(fo, this) ?? T(fo, this, new ResizeObserver((t) => {
|
|
1876
|
+
for (var e of t) {
|
|
1877
|
+
Gi.entries.set(e.target, e);
|
|
1878
|
+
for (var o of c(de, this).get(e.target) || []) o(e);
|
|
1879
|
+
}
|
|
1880
|
+
}));
|
|
1881
|
+
}
|
|
1882
|
+
b(Ui, "entries", /* @__PURE__ */ new WeakMap());
|
|
1883
|
+
function zn(t, e) {
|
|
1884
|
+
return t === e || t?.[Ce] === e;
|
|
1885
|
+
}
|
|
1886
|
+
function Dn(t = {}, e, o, n) {
|
|
1887
|
+
var i = j.r, r = S;
|
|
1888
|
+
return Pi(() => {
|
|
1889
|
+
var s, l;
|
|
1890
|
+
return on(() => {
|
|
1891
|
+
s = l, l = n?.() || [], an(() => {
|
|
1892
|
+
t !== o(...l) && (e(t, ...l), s && zn(o(...s), t) && e(null, ...s));
|
|
1893
|
+
});
|
|
1894
|
+
}), () => {
|
|
1895
|
+
let a = r;
|
|
1896
|
+
for (; a !== i && a.parent !== null && a.parent.f & 33554432; ) a = a.parent;
|
|
1897
|
+
const u = () => {
|
|
1898
|
+
l && zn(o(...l), t) && e(null, ...l);
|
|
1899
|
+
}, d = a.teardown;
|
|
1900
|
+
a.teardown = () => {
|
|
1901
|
+
u(), d?.();
|
|
1902
|
+
};
|
|
1903
|
+
};
|
|
1904
|
+
}), t;
|
|
1905
|
+
}
|
|
1906
|
+
function Po(t, e, o, n) {
|
|
1907
|
+
var i = !mo || (o & 2) !== 0, r = (o & 8) !== 0, s = (o & 16) !== 0, l = n, a = !0, u = () => (a && (a = !1, l = s ? an(n) : n), l);
|
|
1908
|
+
let d;
|
|
1909
|
+
if (r) {
|
|
1910
|
+
var p = Ce in t || Zn in t;
|
|
1911
|
+
d = Xt(t, e)?.set ?? (p && e in t ? (A) => t[e] = A : void 0);
|
|
1912
|
+
}
|
|
1913
|
+
var h, v = !1;
|
|
1914
|
+
r ? [h, v] = zr(() => t[e]) : h = t[e], h === void 0 && n !== void 0 && (h = u(), d && (i && Cr(e), d(h)));
|
|
1915
|
+
var y;
|
|
1916
|
+
if (i ? y = () => {
|
|
1917
|
+
var A = t[e];
|
|
1918
|
+
return A === void 0 ? u() : (a = !0, A);
|
|
1919
|
+
} : y = () => {
|
|
1920
|
+
var A = t[e];
|
|
1921
|
+
return A !== void 0 && (l = void 0), A === void 0 ? l : A;
|
|
1922
|
+
}, i && !(o & 4)) return y;
|
|
1923
|
+
if (d) {
|
|
1924
|
+
var $ = t.$$legacy;
|
|
1925
|
+
return function(A, O) {
|
|
1926
|
+
return arguments.length > 0 ? ((!i || !O || $ || v) && d(O ? y() : A), A) : y();
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1929
|
+
var f = !1, w = (o & 1 ? bo : Zo)(() => (f = !1, y()));
|
|
1930
|
+
r && g(w);
|
|
1931
|
+
var R = S;
|
|
1932
|
+
return function(A, O) {
|
|
1933
|
+
if (arguments.length > 0) {
|
|
1934
|
+
const U = O ? g(w) : i && r ? Kt(A) : A;
|
|
1935
|
+
return _(w, U), f = !0, l !== void 0 && (l = U), A;
|
|
1936
|
+
}
|
|
1937
|
+
return Dt && f || R.f & 16384 ? w.v : g(w);
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
function Vs(t) {
|
|
1941
|
+
return new js(t);
|
|
1942
|
+
}
|
|
1943
|
+
var Ft = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), js = class {
|
|
1944
|
+
constructor(t) {
|
|
1945
|
+
k(this, Ft, void 0), k(this, vt, void 0);
|
|
1946
|
+
var e = /* @__PURE__ */ new Map(), o = (i, r) => {
|
|
1947
|
+
var s = /* @__PURE__ */ Ii(r, !1, !1);
|
|
1948
|
+
return e.set(i, s), s;
|
|
1949
|
+
};
|
|
1950
|
+
const n = new Proxy({
|
|
1951
|
+
...t.props || {},
|
|
1952
|
+
$$events: {}
|
|
1953
|
+
}, {
|
|
1954
|
+
get(i, r) {
|
|
1955
|
+
return g(e.get(r) ?? o(r, Reflect.get(i, r)));
|
|
1956
|
+
},
|
|
1957
|
+
has(i, r) {
|
|
1958
|
+
return r === Zn ? !0 : (g(e.get(r) ?? o(r, Reflect.get(i, r))), Reflect.has(i, r));
|
|
1959
|
+
},
|
|
1960
|
+
set(i, r, s) {
|
|
1961
|
+
return _(e.get(r) ?? o(r, s), s), Reflect.set(i, r, s);
|
|
1962
|
+
}
|
|
1963
|
+
});
|
|
1964
|
+
T(vt, this, (t.hydrate ? Ts : qi)(t.component, {
|
|
1965
|
+
target: t.target,
|
|
1966
|
+
anchor: t.anchor,
|
|
1967
|
+
props: n,
|
|
1968
|
+
context: t.context,
|
|
1969
|
+
intro: t.intro ?? !1,
|
|
1970
|
+
recover: t.recover,
|
|
1971
|
+
transformError: t.transformError
|
|
1972
|
+
})), !zt && (!t?.props?.$$host || t.sync === !1) && Ye(), T(Ft, this, n.$$events);
|
|
1973
|
+
for (const i of Object.keys(c(vt, this))) i === "$set" || i === "$destroy" || i === "$on" || so(this, i, {
|
|
1974
|
+
get() {
|
|
1975
|
+
return c(vt, this)[i];
|
|
1976
|
+
},
|
|
1977
|
+
set(r) {
|
|
1978
|
+
c(vt, this)[i] = r;
|
|
1979
|
+
},
|
|
1980
|
+
enumerable: !0
|
|
1981
|
+
});
|
|
1982
|
+
c(vt, this).$set = (i) => {
|
|
1983
|
+
Object.assign(n, i);
|
|
1984
|
+
}, c(vt, this).$destroy = () => {
|
|
1985
|
+
Is(c(vt, this));
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
$set(t) {
|
|
1989
|
+
c(vt, this).$set(t);
|
|
1990
|
+
}
|
|
1991
|
+
$on(t, e) {
|
|
1992
|
+
c(Ft, this)[t] = c(Ft, this)[t] || [];
|
|
1993
|
+
const o = (...n) => e.call(this, ...n);
|
|
1994
|
+
return c(Ft, this)[t].push(o), () => {
|
|
1995
|
+
c(Ft, this)[t] = c(Ft, this)[t].filter((n) => n !== o);
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
$destroy() {
|
|
1999
|
+
c(vt, this).$destroy();
|
|
2000
|
+
}
|
|
2001
|
+
}, Ki;
|
|
2002
|
+
typeof HTMLElement == "function" && (Ki = class extends HTMLElement {
|
|
2003
|
+
constructor(t, e, o) {
|
|
2004
|
+
super(), b(this, "$$ctor", void 0), b(this, "$$s", void 0), b(this, "$$c", void 0), b(this, "$$cn", !1), b(this, "$$d", {}), b(this, "$$r", !1), b(this, "$$p_d", {}), b(this, "$$l", {}), b(this, "$$l_u", /* @__PURE__ */ new Map()), b(this, "$$me", void 0), b(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, o && (this.$$shadowRoot = this.attachShadow(o));
|
|
2005
|
+
}
|
|
2006
|
+
addEventListener(t, e, o) {
|
|
2007
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(e), this.$$c) {
|
|
2008
|
+
const n = this.$$c.$on(t, e);
|
|
2009
|
+
this.$$l_u.set(e, n);
|
|
2010
|
+
}
|
|
2011
|
+
super.addEventListener(t, e, o);
|
|
2012
|
+
}
|
|
2013
|
+
removeEventListener(t, e, o) {
|
|
2014
|
+
if (super.removeEventListener(t, e, o), this.$$c) {
|
|
2015
|
+
const n = this.$$l_u.get(e);
|
|
2016
|
+
n && (n(), this.$$l_u.delete(e));
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
async connectedCallback() {
|
|
2020
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
2021
|
+
let t = function(n) {
|
|
2022
|
+
return (i) => {
|
|
2023
|
+
const r = Qo("slot");
|
|
2024
|
+
n !== "default" && (r.name = n), Ot(i, r);
|
|
2025
|
+
};
|
|
2026
|
+
};
|
|
2027
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2028
|
+
const e = {}, o = Ws(this);
|
|
2029
|
+
for (const n of this.$$s) n in o && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
|
|
2030
|
+
for (const n of this.attributes) {
|
|
2031
|
+
const i = this.$$g_p(n.name);
|
|
2032
|
+
i in this.$$d || (this.$$d[i] = eo(i, n.value, this.$$p_d, "toProp"));
|
|
2033
|
+
}
|
|
2034
|
+
for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
2035
|
+
this.$$c = Vs({
|
|
2036
|
+
component: this.$$ctor,
|
|
2037
|
+
target: this.$$shadowRoot || this,
|
|
2038
|
+
props: {
|
|
2039
|
+
...this.$$d,
|
|
2040
|
+
$$slots: e,
|
|
2041
|
+
$$host: this
|
|
2042
|
+
}
|
|
2043
|
+
}), this.$$me = ls(() => {
|
|
2044
|
+
on(() => {
|
|
2045
|
+
this.$$r = !0;
|
|
2046
|
+
for (const n of ro(this.$$c)) {
|
|
2047
|
+
if (!this.$$p_d[n]?.reflect) continue;
|
|
2048
|
+
this.$$d[n] = this.$$c[n];
|
|
2049
|
+
const i = eo(n, this.$$d[n], this.$$p_d, "toAttribute");
|
|
2050
|
+
i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
|
|
2051
|
+
}
|
|
2052
|
+
this.$$r = !1;
|
|
2053
|
+
});
|
|
2054
|
+
});
|
|
2055
|
+
for (const n in this.$$l) for (const i of this.$$l[n]) {
|
|
2056
|
+
const r = this.$$c.$on(n, i);
|
|
2057
|
+
this.$$l_u.set(i, r);
|
|
2058
|
+
}
|
|
2059
|
+
this.$$l = {};
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
attributeChangedCallback(t, e, o) {
|
|
2063
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = eo(t, o, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2064
|
+
}
|
|
2065
|
+
disconnectedCallback() {
|
|
2066
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
2067
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
$$g_p(t) {
|
|
2071
|
+
return ro(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
|
|
2072
|
+
}
|
|
2073
|
+
});
|
|
2074
|
+
function eo(t, e, o, n) {
|
|
2075
|
+
const i = o[t]?.type;
|
|
2076
|
+
if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !o[t]) return e;
|
|
2077
|
+
if (n === "toAttribute") switch (i) {
|
|
2078
|
+
case "Object":
|
|
2079
|
+
case "Array":
|
|
2080
|
+
return e == null ? null : JSON.stringify(e);
|
|
2081
|
+
case "Boolean":
|
|
2082
|
+
return e ? "" : null;
|
|
2083
|
+
case "Number":
|
|
2084
|
+
return e ?? null;
|
|
2085
|
+
default:
|
|
2086
|
+
return e;
|
|
2087
|
+
}
|
|
2088
|
+
else switch (i) {
|
|
2089
|
+
case "Object":
|
|
2090
|
+
case "Array":
|
|
2091
|
+
return e && JSON.parse(e);
|
|
2092
|
+
case "Boolean":
|
|
2093
|
+
return e;
|
|
2094
|
+
case "Number":
|
|
2095
|
+
return e != null ? +e : e;
|
|
2096
|
+
default:
|
|
2097
|
+
return e;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
function Ws(t) {
|
|
2101
|
+
const e = {};
|
|
2102
|
+
return t.childNodes.forEach((o) => {
|
|
2103
|
+
e[o.slot || "default"] = !0;
|
|
2104
|
+
}), e;
|
|
2105
|
+
}
|
|
2106
|
+
function zs(t, e, o, n, i, r) {
|
|
2107
|
+
let s = class extends Ki {
|
|
2108
|
+
constructor() {
|
|
2109
|
+
super(t, o, i), this.$$p_d = e;
|
|
2110
|
+
}
|
|
2111
|
+
static get observedAttributes() {
|
|
2112
|
+
return ro(e).map((l) => (e[l].attribute || l).toLowerCase());
|
|
2113
|
+
}
|
|
2114
|
+
};
|
|
2115
|
+
return ro(e).forEach((l) => {
|
|
2116
|
+
so(s.prototype, l, {
|
|
2117
|
+
get() {
|
|
2118
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2119
|
+
},
|
|
2120
|
+
set(a) {
|
|
2121
|
+
a = eo(l, a, e), this.$$d[l] = a;
|
|
2122
|
+
var u = this.$$c;
|
|
2123
|
+
u && (Xt(u, l)?.get ? u[l] = a : u.$set({ [l]: a }));
|
|
2124
|
+
}
|
|
2125
|
+
});
|
|
2126
|
+
}), n.forEach((l) => {
|
|
2127
|
+
so(s.prototype, l, { get() {
|
|
2128
|
+
return this.$$c?.[l];
|
|
2129
|
+
} });
|
|
2130
|
+
}), r && (s = r(s)), t.element = s, s;
|
|
2131
|
+
}
|
|
2132
|
+
var Ds = class extends Event {
|
|
2133
|
+
constructor(t, e, o, n) {
|
|
2134
|
+
super("context-request", {
|
|
2135
|
+
bubbles: !0,
|
|
2136
|
+
composed: !0
|
|
2137
|
+
}), b(this, "context", void 0), b(this, "contextTarget", void 0), b(this, "callback", void 0), b(this, "subscribe", void 0), this.context = t, this.contextTarget = e, this.callback = o, this.subscribe = n ?? !1;
|
|
2138
|
+
}
|
|
2139
|
+
}, Hs = class {
|
|
2140
|
+
constructor(t, e) {
|
|
2141
|
+
b(this, "host", void 0), b(this, "context", void 0), b(this, "subscribe", void 0), b(this, "onValue", void 0), b(this, "isConnected", !1), b(this, "unsubscribe", void 0), b(this, "currentValue", void 0), b(this, "handleValue", (o, n) => {
|
|
2142
|
+
n !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = n), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = o, this.onValue?.(o);
|
|
2143
|
+
}), this.host = t, this.context = e.context, this.subscribe = e.subscribe ?? !0, this.onValue = e.onValue;
|
|
2144
|
+
}
|
|
2145
|
+
connect() {
|
|
2146
|
+
this.isConnected || (this.isConnected = !0, this.requestValue());
|
|
2147
|
+
}
|
|
2148
|
+
disconnect() {
|
|
2149
|
+
this.isConnected && (this.isConnected = !1, this.unsubscribe?.(), this.unsubscribe = void 0);
|
|
2150
|
+
}
|
|
2151
|
+
get value() {
|
|
2152
|
+
return this.currentValue;
|
|
2153
|
+
}
|
|
2154
|
+
requestValue() {
|
|
2155
|
+
this.host.dispatchEvent(new Ds(this.context, this.host, this.handleValue, this.subscribe));
|
|
2156
|
+
}
|
|
2157
|
+
}, yo = (t) => t;
|
|
2158
|
+
yo(Symbol.for("pie.assessmentToolkit.runtimeContext"));
|
|
2159
|
+
yo(Symbol.for("pie.assessmentToolkit.hostRuntimeContext"));
|
|
2160
|
+
var Bs = yo(Symbol.for("pie.assessmentToolkit.shellContext")), qs = yo(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
2161
|
+
function Ji(t, e, o) {
|
|
2162
|
+
let n = !1;
|
|
2163
|
+
const i = new Hs(t, {
|
|
2164
|
+
context: e,
|
|
2165
|
+
subscribe: !0,
|
|
2166
|
+
onValue: (u) => {
|
|
2167
|
+
n = !0, o(u);
|
|
2168
|
+
}
|
|
2169
|
+
});
|
|
2170
|
+
i.connect();
|
|
2171
|
+
const r = (u) => {
|
|
2172
|
+
u.context === e && i.requestValue();
|
|
2173
|
+
};
|
|
2174
|
+
t.addEventListener("context-provider", r);
|
|
2175
|
+
let s = 0;
|
|
2176
|
+
const l = 200, a = globalThis.setInterval(() => {
|
|
2177
|
+
if (n || s >= l) {
|
|
2178
|
+
globalThis.clearInterval(a);
|
|
2179
|
+
return;
|
|
2180
|
+
}
|
|
2181
|
+
s += 1, i.requestValue();
|
|
2182
|
+
}, 50);
|
|
2183
|
+
return () => {
|
|
2184
|
+
globalThis.clearInterval(a), t.removeEventListener("context-provider", r), i.disconnect();
|
|
2185
|
+
};
|
|
2186
|
+
}
|
|
2187
|
+
function Fs(t, e) {
|
|
2188
|
+
return Ji(t, Bs, e);
|
|
2189
|
+
}
|
|
2190
|
+
function Gs(t, e) {
|
|
2191
|
+
return Ji(t, qs, e);
|
|
2192
|
+
}
|
|
2193
|
+
var Hn;
|
|
2194
|
+
(function(t) {
|
|
2195
|
+
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2196
|
+
})(Hn || (Hn = {}));
|
|
2197
|
+
var Rt;
|
|
2198
|
+
(function(t) {
|
|
2199
|
+
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2200
|
+
})(Rt || (Rt = {}));
|
|
2201
|
+
function Xi(t) {
|
|
2202
|
+
return (...e) => {
|
|
2203
|
+
console.debug(`[${t}]`, ...e);
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
2206
|
+
Xi("I18nService");
|
|
2207
|
+
var Lo = {
|
|
2208
|
+
assessment: [],
|
|
2209
|
+
section: [],
|
|
2210
|
+
item: [],
|
|
2211
|
+
passage: [],
|
|
2212
|
+
rubric: [],
|
|
2213
|
+
element: []
|
|
2214
|
+
};
|
|
2215
|
+
[...Lo.section], [...Lo.item], [...Lo.passage];
|
|
2216
|
+
function Us(t) {
|
|
2217
|
+
return t.trim() || "";
|
|
2218
|
+
}
|
|
2219
|
+
var Ks = [
|
|
2220
|
+
"assessment",
|
|
2221
|
+
"section",
|
|
2222
|
+
"item",
|
|
2223
|
+
"passage",
|
|
2224
|
+
"rubric",
|
|
2225
|
+
"element"
|
|
2226
|
+
];
|
|
2227
|
+
function oo(t, e) {
|
|
2228
|
+
if (typeof t != "string" || t.trim().length === 0) throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2229
|
+
}
|
|
2230
|
+
function Bn(t) {
|
|
2231
|
+
if (oo(t.toolId, "toolId"), oo(t.name, "name"), oo(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function") throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2232
|
+
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2233
|
+
const e = t.supportedLevels.find((o) => !Ks.includes(o));
|
|
2234
|
+
if (e) throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
|
|
2235
|
+
if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${t.toolId}": unsupported activation "${String(t.activation)}".`);
|
|
2236
|
+
if (t.singletonScope !== void 0 && t.singletonScope !== "section") throw new Error(`Invalid tool registration "${t.toolId}": unsupported singletonScope "${String(t.singletonScope)}".`);
|
|
2237
|
+
if (t.activation === "selection-gateway" && t.singletonScope !== "section") throw new Error(`Invalid tool registration "${t.toolId}": selection-gateway tools must declare singletonScope "section".`);
|
|
2238
|
+
if (t.pnpSupportIds !== void 0 && (!Array.isArray(t.pnpSupportIds) || t.pnpSupportIds.some((o) => typeof o != "string" || o.trim().length === 0))) throw new Error(`Invalid tool registration "${t.toolId}": "pnpSupportIds" must be an array of non-empty strings.`);
|
|
2239
|
+
if (typeof t.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${t.toolId}": "isVisibleInContext" must be a function.`);
|
|
2240
|
+
if (typeof t.renderToolbar != "function") throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
|
|
2241
|
+
}
|
|
2242
|
+
var Js = class {
|
|
2243
|
+
constructor() {
|
|
2244
|
+
b(this, "tools", /* @__PURE__ */ new Map()), b(this, "pnpIndex", /* @__PURE__ */ new Map()), b(this, "componentOverrides", {}), b(this, "moduleLoaders", /* @__PURE__ */ new Map()), b(this, "loadedToolModules", /* @__PURE__ */ new Set()), b(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
2245
|
+
}
|
|
2246
|
+
normalizeToolId(t) {
|
|
2247
|
+
return Us(t);
|
|
2248
|
+
}
|
|
2249
|
+
normalizeToolIds(t) {
|
|
2250
|
+
return t.map((e) => this.normalizeToolId(e));
|
|
2251
|
+
}
|
|
2252
|
+
register(t) {
|
|
2253
|
+
if (Bn(t), this.tools.has(t.toolId)) throw new Error(`Tool '${t.toolId}' is already registered`);
|
|
2254
|
+
if (this.tools.set(t.toolId, t), t.pnpSupportIds) for (const e of t.pnpSupportIds) this.pnpIndex.has(e) || this.pnpIndex.set(e, /* @__PURE__ */ new Set()), this.pnpIndex.get(e).add(t.toolId);
|
|
2255
|
+
}
|
|
2256
|
+
override(t) {
|
|
2257
|
+
if (Bn(t), !this.tools.has(t.toolId)) throw new Error(`Cannot override non-existent tool '${t.toolId}'`);
|
|
2258
|
+
const e = this.tools.get(t.toolId);
|
|
2259
|
+
if (e.pnpSupportIds) for (const o of e.pnpSupportIds) this.pnpIndex.get(o)?.delete(t.toolId);
|
|
2260
|
+
if (this.tools.set(t.toolId, t), t.pnpSupportIds) for (const o of t.pnpSupportIds) this.pnpIndex.has(o) || this.pnpIndex.set(o, /* @__PURE__ */ new Set()), this.pnpIndex.get(o).add(t.toolId);
|
|
2261
|
+
}
|
|
2262
|
+
unregister(t) {
|
|
2263
|
+
const e = this.tools.get(t);
|
|
2264
|
+
if (e) {
|
|
2265
|
+
if (e.pnpSupportIds) for (const o of e.pnpSupportIds) this.pnpIndex.get(o)?.delete(t);
|
|
2266
|
+
this.tools.delete(t);
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
get(t) {
|
|
2270
|
+
return this.tools.get(t);
|
|
2271
|
+
}
|
|
2272
|
+
has(t) {
|
|
2273
|
+
return this.tools.has(t);
|
|
2274
|
+
}
|
|
2275
|
+
getAllToolIds() {
|
|
2276
|
+
return Array.from(this.tools.keys());
|
|
2277
|
+
}
|
|
2278
|
+
getAllTools() {
|
|
2279
|
+
return Array.from(this.tools.values());
|
|
2280
|
+
}
|
|
2281
|
+
getToolsByPNPSupport(t) {
|
|
2282
|
+
return this.pnpIndex.get(t) || /* @__PURE__ */ new Set();
|
|
2283
|
+
}
|
|
2284
|
+
getToolsByLevel(t) {
|
|
2285
|
+
return this.getAllTools().filter((e) => e.supportedLevels.includes(t));
|
|
2286
|
+
}
|
|
2287
|
+
getToolActivation(t) {
|
|
2288
|
+
return this.get(t)?.activation || "toolbar-toggle";
|
|
2289
|
+
}
|
|
2290
|
+
getToolSingletonScope(t) {
|
|
2291
|
+
return this.get(t)?.singletonScope || null;
|
|
2292
|
+
}
|
|
2293
|
+
filterToolIdsByActivation(t, e) {
|
|
2294
|
+
return t.filter((o) => this.getToolActivation(o) === e);
|
|
2295
|
+
}
|
|
2296
|
+
filterVisibleInContext(t, e) {
|
|
2297
|
+
const o = [];
|
|
2298
|
+
for (const n of t) {
|
|
2299
|
+
const i = this.get(n);
|
|
2300
|
+
if (!i) {
|
|
2301
|
+
console.warn(`Tool '${n}' is allowed but not registered`);
|
|
2302
|
+
continue;
|
|
2303
|
+
}
|
|
2304
|
+
if (i.supportedLevels.includes(e.level)) try {
|
|
2305
|
+
i.isVisibleInContext(e) && o.push(i);
|
|
2306
|
+
} catch (r) {
|
|
2307
|
+
console.error(`Error evaluating visibility for tool '${n}':`, r);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
return o;
|
|
2311
|
+
}
|
|
2312
|
+
getToolMetadata() {
|
|
2313
|
+
return this.getAllTools().map((t) => ({
|
|
2314
|
+
toolId: t.toolId,
|
|
2315
|
+
name: t.name,
|
|
2316
|
+
description: t.description,
|
|
2317
|
+
pnpSupportIds: t.pnpSupportIds || [],
|
|
2318
|
+
supportedLevels: t.supportedLevels,
|
|
2319
|
+
activation: t.activation || "toolbar-toggle",
|
|
2320
|
+
singletonScope: t.singletonScope || null
|
|
2321
|
+
}));
|
|
2322
|
+
}
|
|
2323
|
+
generatePNPSupportsFromTools(t) {
|
|
2324
|
+
const e = /* @__PURE__ */ new Set();
|
|
2325
|
+
for (const o of t) {
|
|
2326
|
+
const n = this.get(o);
|
|
2327
|
+
if (n?.pnpSupportIds) for (const i of n.pnpSupportIds) e.add(i);
|
|
2328
|
+
}
|
|
2329
|
+
return Array.from(e);
|
|
2330
|
+
}
|
|
2331
|
+
clear() {
|
|
2332
|
+
this.tools.clear(), this.pnpIndex.clear();
|
|
2333
|
+
}
|
|
2334
|
+
setComponentOverrides(t) {
|
|
2335
|
+
this.componentOverrides = t;
|
|
2336
|
+
}
|
|
2337
|
+
setToolModuleLoaders(t) {
|
|
2338
|
+
for (const [e, o] of Object.entries(t)) if (o) {
|
|
2339
|
+
if (oo(e, "tool module loader id"), typeof o != "function") throw new Error(`Invalid tool module loader for "${e}": expected a function.`);
|
|
2340
|
+
this.moduleLoaders.set(e, o);
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
async ensureToolModuleLoaded(t) {
|
|
2344
|
+
if (this.loadedToolModules.has(t)) return;
|
|
2345
|
+
const e = this.moduleLoadPromises.get(t);
|
|
2346
|
+
if (e) {
|
|
2347
|
+
await e;
|
|
2348
|
+
return;
|
|
2349
|
+
}
|
|
2350
|
+
const o = this.moduleLoaders.get(t);
|
|
2351
|
+
if (!o) return;
|
|
2352
|
+
const n = (async () => {
|
|
2353
|
+
await o(), this.loadedToolModules.add(t);
|
|
2354
|
+
})();
|
|
2355
|
+
this.moduleLoadPromises.set(t, n);
|
|
2356
|
+
try {
|
|
2357
|
+
await n;
|
|
2358
|
+
} finally {
|
|
2359
|
+
this.moduleLoadPromises.delete(t);
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
async ensureToolModulesLoaded(t) {
|
|
2363
|
+
await Promise.all(t.map((e) => this.ensureToolModuleLoaded(e)));
|
|
2364
|
+
}
|
|
2365
|
+
isToolModuleLoaded(t) {
|
|
2366
|
+
return this.loadedToolModules.has(t);
|
|
2367
|
+
}
|
|
2368
|
+
renderForToolbar(t, e, o) {
|
|
2369
|
+
const n = this.get(t);
|
|
2370
|
+
if (!n) throw new Error(`Tool '${t}' is not registered`);
|
|
2371
|
+
const i = {
|
|
2372
|
+
...o,
|
|
2373
|
+
componentOverrides: {
|
|
2374
|
+
...this.componentOverrides || {},
|
|
2375
|
+
...o.componentOverrides || {}
|
|
2376
|
+
}
|
|
2377
|
+
};
|
|
2378
|
+
return n.renderToolbar(e, i);
|
|
2379
|
+
}
|
|
2380
|
+
};
|
|
2381
|
+
function Zi(t) {
|
|
2382
|
+
return t.level === "item";
|
|
2383
|
+
}
|
|
2384
|
+
function Xs(t) {
|
|
2385
|
+
return t.level === "passage";
|
|
2386
|
+
}
|
|
2387
|
+
function Zs(t) {
|
|
2388
|
+
return t.level === "rubric";
|
|
2389
|
+
}
|
|
2390
|
+
function Yi(t) {
|
|
2391
|
+
return t.level === "element";
|
|
2392
|
+
}
|
|
2393
|
+
function cn(t) {
|
|
2394
|
+
if (Yi(t)) {
|
|
2395
|
+
const e = t.item.config;
|
|
2396
|
+
if (!e) return "";
|
|
2397
|
+
const o = [], n = (l) => l.replace(/<[^>]*>/g, " ").trim(), i = e.elements?.[t.elementId];
|
|
2398
|
+
i && typeof i == "string" && o.push(n(i));
|
|
2399
|
+
const r = e.models, s = (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).find((l) => l && typeof l == "object" && l.id === t.elementId);
|
|
2400
|
+
if (s) {
|
|
2401
|
+
for (const l of Object.values(s)) if (typeof l == "string" && o.push(n(l)), Array.isArray(l)) {
|
|
2402
|
+
for (const a of l) if (a && typeof a == "object") for (const u of Object.values(a)) typeof u == "string" && o.push(n(u));
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
return o.filter(Boolean).join(" ").trim();
|
|
2406
|
+
}
|
|
2407
|
+
if (Zi(t)) {
|
|
2408
|
+
const e = t.item;
|
|
2409
|
+
if (!e?.config) return "";
|
|
2410
|
+
const o = e.config, n = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim();
|
|
2411
|
+
typeof o.markup == "string" && n.push(i(o.markup));
|
|
2412
|
+
const r = o.elements;
|
|
2413
|
+
if (r && typeof r == "object") for (const a of Object.values(r)) typeof a == "string" && n.push(i(a));
|
|
2414
|
+
const s = o.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2415
|
+
for (const a of l) if (!(!a || typeof a != "object")) {
|
|
2416
|
+
for (const u of Object.values(a)) if (typeof u == "string" && n.push(i(u)), Array.isArray(u)) {
|
|
2417
|
+
for (const d of u) if (d && typeof d == "object") for (const p of Object.values(d)) typeof p == "string" && n.push(i(p));
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
return n.filter(Boolean).join(" ").trim();
|
|
2421
|
+
}
|
|
2422
|
+
if (Xs(t)) {
|
|
2423
|
+
const e = t.passage;
|
|
2424
|
+
if (!e?.config) return "";
|
|
2425
|
+
const o = e.config, n = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim();
|
|
2426
|
+
typeof o.markup == "string" && n.push(i(o.markup)), typeof o.content == "string" && n.push(i(o.content)), typeof o.prompt == "string" && n.push(i(o.prompt));
|
|
2427
|
+
const r = o.elements;
|
|
2428
|
+
if (r && typeof r == "object") for (const a of Object.values(r)) typeof a == "string" && n.push(i(a));
|
|
2429
|
+
const s = o.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2430
|
+
for (const a of l) if (!(!a || typeof a != "object")) {
|
|
2431
|
+
for (const u of Object.values(a)) if (typeof u == "string" && n.push(i(u)), Array.isArray(u)) {
|
|
2432
|
+
for (const d of u) if (d && typeof d == "object") for (const p of Object.values(d)) typeof p == "string" && n.push(i(p));
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
return n.filter(Boolean).join(" ").trim();
|
|
2436
|
+
}
|
|
2437
|
+
if (Zs(t)) {
|
|
2438
|
+
const e = t.rubricBlock;
|
|
2439
|
+
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
2440
|
+
}
|
|
2441
|
+
return "";
|
|
2442
|
+
}
|
|
2443
|
+
function no(t) {
|
|
2444
|
+
const e = cn(t);
|
|
2445
|
+
return [
|
|
2446
|
+
/<math[>\s]/i,
|
|
2447
|
+
/\\\[([^\]]+)\\\]/,
|
|
2448
|
+
/\$\$[^$]+\$\$/,
|
|
2449
|
+
/\\\(/,
|
|
2450
|
+
/[+\-*/=<>≤≥∑∫√π]/,
|
|
2451
|
+
/\d+\s*[+\-*/=]\s*\d+/
|
|
2452
|
+
].some((o) => o.test(e));
|
|
2453
|
+
}
|
|
2454
|
+
function Ys(t) {
|
|
2455
|
+
const e = [
|
|
2456
|
+
"pie-multiple-choice",
|
|
2457
|
+
"pie-inline-choice",
|
|
2458
|
+
"pie-select-text",
|
|
2459
|
+
"multiple-choice",
|
|
2460
|
+
"inline-choice",
|
|
2461
|
+
"select-text"
|
|
2462
|
+
];
|
|
2463
|
+
if (Yi(t)) {
|
|
2464
|
+
const o = t.item.config;
|
|
2465
|
+
if (!o?.models) return !1;
|
|
2466
|
+
const n = (Array.isArray(o.models) ? o.models : Object.values(o.models)).find((r) => r && typeof r == "object" && r.id === t.elementId);
|
|
2467
|
+
if (!n) return !1;
|
|
2468
|
+
const i = n.element || "";
|
|
2469
|
+
return e.includes(i);
|
|
2470
|
+
}
|
|
2471
|
+
if (Zi(t)) {
|
|
2472
|
+
const o = t.item.config?.models;
|
|
2473
|
+
return (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).some((n) => {
|
|
2474
|
+
if (!n || typeof n != "object") return !1;
|
|
2475
|
+
const i = n.element || "";
|
|
2476
|
+
return e.includes(i) ? !0 : Array.isArray(n.choices) && n.choices.length > 0;
|
|
2477
|
+
});
|
|
2478
|
+
}
|
|
2479
|
+
return !1;
|
|
2480
|
+
}
|
|
2481
|
+
function io(t) {
|
|
2482
|
+
return cn(t).trim().length >= 10;
|
|
2483
|
+
}
|
|
2484
|
+
function Qs(t) {
|
|
2485
|
+
const e = cn(t);
|
|
2486
|
+
return [
|
|
2487
|
+
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
2488
|
+
/periodic\s+table/i,
|
|
2489
|
+
/H₂O|CO₂|NaCl|O₂|N₂/i,
|
|
2490
|
+
/\b[A-Z][a-z]?\d*\b/,
|
|
2491
|
+
/biology|organism|cell|DNA|RNA|protein/i,
|
|
2492
|
+
/physics|force|energy|velocity|acceleration/i
|
|
2493
|
+
].some((o) => o.test(e));
|
|
2494
|
+
}
|
|
2495
|
+
var tl = /* @__PURE__ */ new Set([
|
|
2496
|
+
"assessment",
|
|
2497
|
+
"section",
|
|
2498
|
+
"item",
|
|
2499
|
+
"passage",
|
|
2500
|
+
"rubric"
|
|
2501
|
+
]);
|
|
2502
|
+
function el(t) {
|
|
2503
|
+
return tl.has(t);
|
|
2504
|
+
}
|
|
2505
|
+
function un(t, e, o) {
|
|
2506
|
+
const n = t.trim(), i = o.trim();
|
|
2507
|
+
if (!n || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
2508
|
+
if (!el(e)) throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
2509
|
+
return `${n}:${e}:${i}`;
|
|
2510
|
+
}
|
|
2511
|
+
var ol = class {
|
|
2512
|
+
constructor() {
|
|
2513
|
+
b(this, "providerId", "desmos-calculator"), b(this, "providerName", "Desmos Calculator"), b(this, "category", "calculator"), b(this, "version", "1.10"), b(this, "requiresAuth", !0), b(this, "desmosProvider", null), b(this, "config", null);
|
|
2514
|
+
}
|
|
2515
|
+
async emitTelemetry(t, e) {
|
|
2516
|
+
try {
|
|
2517
|
+
await this.config?.onTelemetry?.(t, e);
|
|
2518
|
+
} catch (o) {
|
|
2519
|
+
console.warn("[DesmosToolProvider] telemetry callback failed:", o);
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
async initialize(t) {
|
|
2523
|
+
if (this.desmosProvider) {
|
|
2524
|
+
console.warn("[DesmosToolProvider] Already initialized, skipping reinitialization");
|
|
2525
|
+
return;
|
|
2526
|
+
}
|
|
2527
|
+
this.config = t;
|
|
2528
|
+
const e = Date.now();
|
|
2529
|
+
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
2530
|
+
toolId: "calculator",
|
|
2531
|
+
operation: "desmos-provider-module-import",
|
|
2532
|
+
backend: "desmos"
|
|
2533
|
+
}), this.desmosProvider = new (await (async () => {
|
|
2534
|
+
try {
|
|
2535
|
+
const o = await import("./dist-DwP27yIs-gkxodgFn.js");
|
|
2536
|
+
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
2537
|
+
toolId: "calculator",
|
|
2538
|
+
operation: "desmos-provider-module-import",
|
|
2539
|
+
backend: "desmos",
|
|
2540
|
+
duration: Date.now() - e
|
|
2541
|
+
}), o;
|
|
2542
|
+
} catch (o) {
|
|
2543
|
+
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
2544
|
+
toolId: "calculator",
|
|
2545
|
+
operation: "desmos-provider-module-import",
|
|
2546
|
+
backend: "desmos",
|
|
2547
|
+
duration: Date.now() - e,
|
|
2548
|
+
errorType: "ToolLibraryLoadError",
|
|
2549
|
+
message: o instanceof Error ? o.message : String(o)
|
|
2550
|
+
}), o;
|
|
2551
|
+
}
|
|
2552
|
+
})()).DesmosCalculatorProvider();
|
|
2553
|
+
try {
|
|
2554
|
+
await this.desmosProvider.initialize({
|
|
2555
|
+
apiKey: t.apiKey,
|
|
2556
|
+
proxyEndpoint: t.proxyEndpoint,
|
|
2557
|
+
onTelemetry: t.onTelemetry
|
|
2558
|
+
}), console.log(`[DesmosToolProvider] Initialized successfully ${t.proxyEndpoint ? "(using proxy)" : t.apiKey ? "(direct API key)" : "(no auth)"}`);
|
|
2559
|
+
} catch (o) {
|
|
2560
|
+
throw console.error("[DesmosToolProvider] Initialization failed:", o), /* @__PURE__ */ new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
async createInstance(t) {
|
|
2564
|
+
if (!this.desmosProvider) throw new Error("[DesmosToolProvider] Provider not initialized. Call initialize() first.");
|
|
2565
|
+
return this.desmosProvider;
|
|
2566
|
+
}
|
|
2567
|
+
getCapabilities() {
|
|
2568
|
+
return {
|
|
2569
|
+
supportsOffline: !1,
|
|
2570
|
+
requiresAuth: !0,
|
|
2571
|
+
maxInstances: null,
|
|
2572
|
+
features: {
|
|
2573
|
+
basic: !0,
|
|
2574
|
+
scientific: !0,
|
|
2575
|
+
graphing: !0,
|
|
2576
|
+
fourFunction: !0
|
|
2577
|
+
}
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
isReady() {
|
|
2581
|
+
return this.desmosProvider !== null;
|
|
2582
|
+
}
|
|
2583
|
+
destroy() {
|
|
2584
|
+
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
2585
|
+
}
|
|
2586
|
+
}, nl = (t, e) => {
|
|
2587
|
+
const o = e?.useSentenceSegmenter !== !1;
|
|
2588
|
+
try {
|
|
2589
|
+
if (!o) throw new Error("Segmenter disabled by policy");
|
|
2590
|
+
const s = globalThis.Intl?.Segmenter;
|
|
2591
|
+
if (typeof s == "function") {
|
|
2592
|
+
const l = new s(e?.locale, { granularity: "sentence" }), a = Array.from(l.segment(t)).map((u) => ({
|
|
2593
|
+
text: u.segment,
|
|
2594
|
+
offset: u.index
|
|
2595
|
+
})).filter((u) => u.text.trim().length > 0);
|
|
2596
|
+
if (a.length > 0) return a;
|
|
2597
|
+
}
|
|
2598
|
+
} catch {
|
|
2599
|
+
}
|
|
2600
|
+
const n = t.match(/[^.!?]+(?:[.!?]+|$)/g) || [t], i = [];
|
|
2601
|
+
let r = 0;
|
|
2602
|
+
for (const s of n) {
|
|
2603
|
+
const l = t.indexOf(s, r);
|
|
2604
|
+
l !== -1 && (i.push({
|
|
2605
|
+
text: s,
|
|
2606
|
+
offset: l
|
|
2607
|
+
}), r = l + s.length);
|
|
2608
|
+
}
|
|
2609
|
+
return i.length > 0 ? i : [{
|
|
2610
|
+
text: t,
|
|
2611
|
+
offset: 0
|
|
2612
|
+
}];
|
|
2613
|
+
}, il = class {
|
|
2614
|
+
constructor() {
|
|
2615
|
+
b(this, "providerId", "browser"), b(this, "providerName", "Browser Speech Synthesis"), b(this, "version", "1.0.0");
|
|
2616
|
+
}
|
|
2617
|
+
async initialize(t) {
|
|
2618
|
+
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
2619
|
+
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
2620
|
+
return new rl(t);
|
|
2621
|
+
}
|
|
2622
|
+
supportsFeature(t) {
|
|
2623
|
+
return !0;
|
|
2624
|
+
}
|
|
2625
|
+
getCapabilities() {
|
|
2626
|
+
return {
|
|
2627
|
+
supportsPause: !0,
|
|
2628
|
+
supportsResume: !0,
|
|
2629
|
+
supportsWordBoundary: !0,
|
|
2630
|
+
supportsVoiceSelection: !0,
|
|
2631
|
+
supportsRateControl: !0,
|
|
2632
|
+
supportsPitchControl: !0
|
|
2633
|
+
};
|
|
2634
|
+
}
|
|
2635
|
+
destroy() {
|
|
2636
|
+
}
|
|
2637
|
+
}, rl = class {
|
|
2638
|
+
constructor(t) {
|
|
2639
|
+
b(this, "utterance", null), b(this, "config", null), b(this, "_isPlaying", !1), b(this, "_isPaused", !1), b(this, "speakRunId", 0), b(this, "onWordBoundary", void 0), this.config = t;
|
|
2640
|
+
}
|
|
2641
|
+
async speak(t) {
|
|
2642
|
+
if (!this.config) throw new Error("TTS not initialized");
|
|
2643
|
+
this.stop();
|
|
2644
|
+
const e = this.speakRunId, o = this.splitIntoChunks(t);
|
|
2645
|
+
for (const n of o) if (e !== this.speakRunId || !await this.speakChunk(n.text, n.offset, e)) break;
|
|
2646
|
+
}
|
|
2647
|
+
async speakSegments(t) {
|
|
2648
|
+
if (!this.config) throw new Error("TTS not initialized");
|
|
2649
|
+
this.stop();
|
|
2650
|
+
const e = this.speakRunId;
|
|
2651
|
+
for (const o of t) {
|
|
2652
|
+
if (e !== this.speakRunId) break;
|
|
2653
|
+
const n = this.splitIntoChunks(o.text);
|
|
2654
|
+
for (const r of n) if (e !== this.speakRunId || !await this.speakChunk(r.text, o.startOffset + r.offset, e)) break;
|
|
2655
|
+
const i = Math.max(0, Number(o.pauseMsAfter || 0));
|
|
2656
|
+
if (i > 0 && e === this.speakRunId && !await this.waitForPause(i, e)) break;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
async waitForPause(t, e) {
|
|
2660
|
+
return await new Promise((o) => setTimeout(o, t)), e === this.speakRunId;
|
|
2661
|
+
}
|
|
2662
|
+
splitIntoChunks(t) {
|
|
2663
|
+
if (t.length <= 260) return [{
|
|
2664
|
+
text: t,
|
|
2665
|
+
offset: 0
|
|
2666
|
+
}];
|
|
2667
|
+
const e = this.segmentSentences(t), o = [];
|
|
2668
|
+
let n = "", i = 0;
|
|
2669
|
+
for (const r of e) {
|
|
2670
|
+
const s = r.text.trim();
|
|
2671
|
+
if (!s) continue;
|
|
2672
|
+
const l = r.text.search(/\S/), a = r.offset + (l === -1 ? 0 : l);
|
|
2673
|
+
if (!n) {
|
|
2674
|
+
n = s, i = a;
|
|
2675
|
+
continue;
|
|
2676
|
+
}
|
|
2677
|
+
const u = `${n} ${s}`;
|
|
2678
|
+
u.length <= 260 ? n = u : (o.push({
|
|
2679
|
+
text: n,
|
|
2680
|
+
offset: i
|
|
2681
|
+
}), n = s, i = a);
|
|
2682
|
+
}
|
|
2683
|
+
return n && o.push({
|
|
2684
|
+
text: n,
|
|
2685
|
+
offset: i
|
|
2686
|
+
}), o.length ? o : [{
|
|
2687
|
+
text: t,
|
|
2688
|
+
offset: 0
|
|
2689
|
+
}];
|
|
2690
|
+
}
|
|
2691
|
+
getHighlightMode() {
|
|
2692
|
+
return (this.config?.providerOptions || {}).highlightMode === "word" ? "word" : "sentence";
|
|
2693
|
+
}
|
|
2694
|
+
getSegmentationPolicy() {
|
|
2695
|
+
const t = this.config?.providerOptions || {}, e = t.segmenter || {}, o = e.mode !== "regexOnly";
|
|
2696
|
+
return {
|
|
2697
|
+
useSentenceSegmenter: o,
|
|
2698
|
+
useWordSegmenter: o,
|
|
2699
|
+
locale: typeof e.locale == "string" && e.locale.trim().length > 0 ? e.locale : typeof t.locale == "string" && t.locale.trim().length > 0 ? t.locale : void 0
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
segmentSentences(t) {
|
|
2703
|
+
const e = this.getSegmentationPolicy();
|
|
2704
|
+
return nl(t, {
|
|
2705
|
+
locale: e.locale,
|
|
2706
|
+
useSentenceSegmenter: e.useSentenceSegmenter
|
|
2707
|
+
});
|
|
2708
|
+
}
|
|
2709
|
+
inferWordLength(t, e) {
|
|
2710
|
+
const o = Math.max(0, Math.min(e, Math.max(0, t.length - 1)));
|
|
2711
|
+
return t.slice(o).match(/^\s*([^\s]+)/)?.[1]?.length || 1;
|
|
2712
|
+
}
|
|
2713
|
+
async speakChunk(t, e, o) {
|
|
2714
|
+
return new Promise((n, i) => {
|
|
2715
|
+
if (o !== this.speakRunId) {
|
|
2716
|
+
n(!1);
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
if (this.utterance = new SpeechSynthesisUtterance(t), this.config?.voice) {
|
|
2720
|
+
const r = speechSynthesis.getVoices().find((s) => s.name === this.config.voice);
|
|
2721
|
+
r && (this.utterance.voice = r);
|
|
2722
|
+
}
|
|
2723
|
+
this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
|
|
2724
|
+
o === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
2725
|
+
}, this.utterance.onend = () => {
|
|
2726
|
+
if (o !== this.speakRunId) {
|
|
2727
|
+
n(!1);
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
this._isPlaying = !1, this._isPaused = !1, n(!0);
|
|
2731
|
+
}, this.utterance.onerror = (r) => {
|
|
2732
|
+
if (o !== this.speakRunId) {
|
|
2733
|
+
n(!1);
|
|
2734
|
+
return;
|
|
2735
|
+
}
|
|
2736
|
+
if (this._isPlaying = !1, this._isPaused = !1, r.error === "interrupted" || r.error === "canceled") {
|
|
2737
|
+
n(!1);
|
|
2738
|
+
return;
|
|
2739
|
+
}
|
|
2740
|
+
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${r.error}`));
|
|
2741
|
+
}, this.utterance.onpause = () => {
|
|
2742
|
+
o === this.speakRunId && (this._isPaused = !0);
|
|
2743
|
+
}, this.utterance.onresume = () => {
|
|
2744
|
+
o === this.speakRunId && (this._isPaused = !1);
|
|
2745
|
+
}, this.utterance.onboundary = (r) => {
|
|
2746
|
+
if (o !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", r.name, "charIndex:", r.charIndex, "charLength:", r.charLength), r.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
|
|
2747
|
+
const s = Math.max(0, Math.min(r.charIndex, Math.max(0, t.length - 1))), l = Number(r.charLength || 0), a = this.inferWordLength(t, s), u = Number.isFinite(l) && l > 0 && l <= 80 && s + l <= t.length ? l : a, d = t.substring(s, Math.min(t.length, s + u)).trim(), p = e + s;
|
|
2748
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:", p), this.onWordBoundary(d, p, u);
|
|
2749
|
+
}, speechSynthesis.speak(this.utterance);
|
|
2750
|
+
});
|
|
2751
|
+
}
|
|
2752
|
+
pause() {
|
|
2753
|
+
this._isPlaying && !this._isPaused && speechSynthesis.pause();
|
|
2754
|
+
}
|
|
2755
|
+
resume() {
|
|
2756
|
+
this._isPlaying && this._isPaused && speechSynthesis.resume();
|
|
2757
|
+
}
|
|
2758
|
+
stop() {
|
|
2759
|
+
this.speakRunId += 1, this._isPlaying && speechSynthesis.cancel(), this._isPlaying = !1, this._isPaused = !1;
|
|
2760
|
+
}
|
|
2761
|
+
isPlaying() {
|
|
2762
|
+
return this._isPlaying && !this._isPaused;
|
|
2763
|
+
}
|
|
2764
|
+
isPaused() {
|
|
2765
|
+
return this._isPaused;
|
|
2766
|
+
}
|
|
2767
|
+
updateSettings(t) {
|
|
2768
|
+
this.config || (this.config = {}), t.rate !== void 0 && (this.config.rate = t.rate), t.pitch !== void 0 && (this.config.pitch = t.pitch), t.voice !== void 0 && (this.config.voice = t.voice), t.providerOptions !== void 0 && (this.config.providerOptions = {
|
|
2769
|
+
...this.config.providerOptions || {},
|
|
2770
|
+
...t.providerOptions || {}
|
|
2771
|
+
});
|
|
2772
|
+
}
|
|
2773
|
+
}, sl = class {
|
|
2774
|
+
async emitTelemetry(t, e) {
|
|
2775
|
+
try {
|
|
2776
|
+
await this.config?.onTelemetry?.(t, e);
|
|
2777
|
+
} catch (o) {
|
|
2778
|
+
console.warn("[TTSToolProvider] telemetry callback failed:", o);
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
constructor(t = "browser") {
|
|
2782
|
+
b(this, "providerId", "tts-service"), b(this, "providerName", "Text-to-Speech"), b(this, "category", "tts"), b(this, "version", "1.0"), b(this, "requiresAuth", void 0), b(this, "ttsProvider", null), b(this, "config", null), this.requiresAuth = t !== "browser";
|
|
2783
|
+
}
|
|
2784
|
+
async initialize(t) {
|
|
2785
|
+
if (this.ttsProvider) {
|
|
2786
|
+
console.warn("[TTSToolProvider] Already initialized, skipping reinitialization");
|
|
2787
|
+
return;
|
|
2788
|
+
}
|
|
2789
|
+
switch (this.config = t, t.backend) {
|
|
2790
|
+
case "browser":
|
|
2791
|
+
await this._initializeBrowserTTS(t);
|
|
2792
|
+
break;
|
|
2793
|
+
case "polly":
|
|
2794
|
+
case "google":
|
|
2795
|
+
case "server":
|
|
2796
|
+
await this._initializeServerTTS(t);
|
|
2797
|
+
break;
|
|
2798
|
+
default:
|
|
2799
|
+
throw new Error(`[TTSToolProvider] Unknown backend: ${t.backend}`);
|
|
2800
|
+
}
|
|
2801
|
+
console.log(`[TTSToolProvider] Initialized successfully (backend: ${t.backend})`);
|
|
2802
|
+
}
|
|
2803
|
+
async _initializeBrowserTTS(t) {
|
|
2804
|
+
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
2805
|
+
this.ttsProvider = new il(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
2806
|
+
}
|
|
2807
|
+
async _initializeServerTTS(t) {
|
|
2808
|
+
if (!t.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
2809
|
+
const e = Date.now();
|
|
2810
|
+
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
2811
|
+
toolId: "tts",
|
|
2812
|
+
operation: "server-provider-module-import",
|
|
2813
|
+
backend: t.serverProvider || t.backend
|
|
2814
|
+
}), this.ttsProvider = new (await (async () => {
|
|
2815
|
+
try {
|
|
2816
|
+
const o = await import("./dist-BIgX-aC4-C5B4fLQK.js");
|
|
2817
|
+
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
2818
|
+
toolId: "tts",
|
|
2819
|
+
operation: "server-provider-module-import",
|
|
2820
|
+
backend: t.serverProvider || t.backend,
|
|
2821
|
+
duration: Date.now() - e
|
|
2822
|
+
}), o;
|
|
2823
|
+
} catch (o) {
|
|
2824
|
+
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
2825
|
+
toolId: "tts",
|
|
2826
|
+
operation: "server-provider-module-import",
|
|
2827
|
+
backend: t.serverProvider || t.backend,
|
|
2828
|
+
duration: Date.now() - e,
|
|
2829
|
+
errorType: "ToolLibraryLoadError",
|
|
2830
|
+
message: o instanceof Error ? o.message : String(o)
|
|
2831
|
+
}), o;
|
|
2832
|
+
}
|
|
2833
|
+
})()).ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${t.serverProvider || t.backend})`);
|
|
2834
|
+
}
|
|
2835
|
+
async createInstance(t) {
|
|
2836
|
+
if (!this.ttsProvider) throw new Error("[TTSToolProvider] Provider not initialized. Call initialize() first.");
|
|
2837
|
+
return this.ttsProvider;
|
|
2838
|
+
}
|
|
2839
|
+
getCapabilities() {
|
|
2840
|
+
const t = this.config?.backend === "browser";
|
|
2841
|
+
return {
|
|
2842
|
+
supportsOffline: t,
|
|
2843
|
+
requiresAuth: !t,
|
|
2844
|
+
maxInstances: 1,
|
|
2845
|
+
features: {
|
|
2846
|
+
wordBoundary: !0,
|
|
2847
|
+
pause: !0,
|
|
2848
|
+
resume: !0,
|
|
2849
|
+
rateControl: !0,
|
|
2850
|
+
pitchControl: t,
|
|
2851
|
+
voiceSelection: !0
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2855
|
+
isReady() {
|
|
2856
|
+
return this.ttsProvider !== null;
|
|
2857
|
+
}
|
|
2858
|
+
destroy() {
|
|
2859
|
+
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
2860
|
+
}
|
|
2861
|
+
}, ll = /* @__PURE__ */ new Set([
|
|
2862
|
+
"annotation-xml",
|
|
2863
|
+
"color-profile",
|
|
2864
|
+
"font-face",
|
|
2865
|
+
"font-face-src",
|
|
2866
|
+
"font-face-uri",
|
|
2867
|
+
"font-face-format",
|
|
2868
|
+
"font-face-name",
|
|
2869
|
+
"missing-glyph"
|
|
2870
|
+
]), al = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, cl = (t, e = "custom element tag") => {
|
|
2871
|
+
if (!t || typeof t != "string") throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
2872
|
+
const o = t.trim();
|
|
2873
|
+
if (!o) throw new Error(`Invalid ${e}: tag is empty`);
|
|
2874
|
+
if (o !== o.toLowerCase()) throw new Error(`Invalid ${e} "${o}": custom element names must be lowercase`);
|
|
2875
|
+
if (!o.includes("-")) throw new Error(`Invalid ${e} "${o}": custom element names must include a hyphen`);
|
|
2876
|
+
if (ll.has(o)) throw new Error(`Invalid ${e} "${o}": this name is reserved by the HTML spec`);
|
|
2877
|
+
if (!al.test(o)) throw new Error(`Invalid ${e} "${o}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
2878
|
+
return o;
|
|
2879
|
+
}, Qi = {
|
|
2880
|
+
calculator: "pie-tool-calculator",
|
|
2881
|
+
textToSpeech: "pie-tool-text-to-speech",
|
|
2882
|
+
ruler: "pie-tool-ruler",
|
|
2883
|
+
protractor: "pie-tool-protractor",
|
|
2884
|
+
answerEliminator: "pie-tool-answer-eliminator",
|
|
2885
|
+
highlighter: "pie-tool-annotation-toolbar",
|
|
2886
|
+
lineReader: "pie-tool-line-reader",
|
|
2887
|
+
theme: "pie-tool-theme",
|
|
2888
|
+
colorScheme: "pie-tool-theme",
|
|
2889
|
+
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
2890
|
+
graph: "pie-tool-graph",
|
|
2891
|
+
periodicTable: "pie-tool-periodic-table"
|
|
2892
|
+
}, ul = (t, e) => cl(e?.toolTagMap?.[t] ?? Qi[t] ?? t, `tool component tag for "${t}"`), dl = (t) => document.createElement(t), gt = (t, e, o, n) => {
|
|
2893
|
+
const i = ul(t, n), r = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
|
|
2894
|
+
return r ? r({
|
|
2895
|
+
toolId: t,
|
|
2896
|
+
tagName: i,
|
|
2897
|
+
context: e,
|
|
2898
|
+
toolbarContext: o
|
|
2899
|
+
}) : dl(i);
|
|
2900
|
+
}, hl = {
|
|
2901
|
+
toolId: "calculator",
|
|
2902
|
+
name: "Calculator",
|
|
2903
|
+
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
2904
|
+
icon: "calculator",
|
|
2905
|
+
provider: {
|
|
2906
|
+
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
2907
|
+
createProvider: () => new ol(),
|
|
2908
|
+
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
2909
|
+
getAuthFetcher: (t) => {
|
|
2910
|
+
const e = t?.provider?.runtime?.authFetcher;
|
|
2911
|
+
return typeof e == "function" ? e : async () => {
|
|
2912
|
+
const o = await fetch("/api/tools/desmos/auth", {
|
|
2913
|
+
method: "GET",
|
|
2914
|
+
credentials: "same-origin"
|
|
2915
|
+
});
|
|
2916
|
+
if (!o.ok) throw new Error(`Failed to fetch Desmos auth config (${o.status})`);
|
|
2917
|
+
return await o.json();
|
|
2918
|
+
};
|
|
2919
|
+
},
|
|
2920
|
+
lazy: !0
|
|
2921
|
+
},
|
|
2922
|
+
supportedLevels: ["item"],
|
|
2923
|
+
pnpSupportIds: [
|
|
2924
|
+
"calculator",
|
|
2925
|
+
"graphingCalculator",
|
|
2926
|
+
"basicCalculator",
|
|
2927
|
+
"scientificCalculator"
|
|
2928
|
+
],
|
|
2929
|
+
isVisibleInContext(t) {
|
|
2930
|
+
return no(t);
|
|
2931
|
+
},
|
|
2932
|
+
renderToolbar(t, e) {
|
|
2933
|
+
const o = un(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, i = gt(this.toolId, t, e, n);
|
|
2934
|
+
i.setAttribute("tool-id", o), i.toolkitCoordinator = e.toolkitCoordinator;
|
|
2935
|
+
const r = {
|
|
2936
|
+
toolId: this.toolId,
|
|
2937
|
+
label: this.name,
|
|
2938
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
2939
|
+
disabled: !1,
|
|
2940
|
+
ariaLabel: "Open scientific calculator",
|
|
2941
|
+
tooltip: "Calculator",
|
|
2942
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
2943
|
+
active: e.isToolVisible(o)
|
|
2944
|
+
};
|
|
2945
|
+
let s = r.active;
|
|
2946
|
+
return i.visible = r.active, {
|
|
2947
|
+
toolId: this.toolId,
|
|
2948
|
+
elements: [{
|
|
2949
|
+
element: i,
|
|
2950
|
+
mount: "after-buttons",
|
|
2951
|
+
shell: {
|
|
2952
|
+
title: this.name,
|
|
2953
|
+
draggable: !0,
|
|
2954
|
+
resizable: !0,
|
|
2955
|
+
closeable: !0,
|
|
2956
|
+
initialWidth: 720,
|
|
2957
|
+
initialHeight: 620,
|
|
2958
|
+
minWidth: 360,
|
|
2959
|
+
minHeight: 420
|
|
2960
|
+
}
|
|
2961
|
+
}],
|
|
2962
|
+
button: r,
|
|
2963
|
+
sync: () => {
|
|
2964
|
+
const l = e.isToolVisible(o);
|
|
2965
|
+
r.active = l, r.ariaLabel = l ? "Close scientific calculator" : "Open scientific calculator", r.tooltip = l ? "Close calculator" : "Calculator", s !== l && (i.visible = l, s = l), i.toolkitCoordinator !== e.toolkitCoordinator && (i.toolkitCoordinator = e.toolkitCoordinator);
|
|
2966
|
+
},
|
|
2967
|
+
subscribeActive: (l) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
2968
|
+
l(e.isToolVisible(o));
|
|
2969
|
+
}) : () => {
|
|
2970
|
+
}
|
|
2971
|
+
};
|
|
2972
|
+
}
|
|
2973
|
+
}, qn = (t) => t && typeof t == "object" ? t : {}, fl = (t) => t === "polly" || t === "google" || t === "server", Z = (t, e) => t === void 0 ? e : t, pl = (t) => {
|
|
2974
|
+
const e = t.backend || "browser";
|
|
2975
|
+
if (!fl(e)) return t;
|
|
2976
|
+
const o = {
|
|
2977
|
+
...t,
|
|
2978
|
+
apiEndpoint: Z(t.apiEndpoint, "/api/tts"),
|
|
2979
|
+
transportMode: Z(t.transportMode, "pie"),
|
|
2980
|
+
endpointValidationMode: Z(t.endpointValidationMode, "voices"),
|
|
2981
|
+
validateEndpoint: Z(t.validateEndpoint, !0),
|
|
2982
|
+
includeAuthOnAssetFetch: Z(t.includeAuthOnAssetFetch, !1),
|
|
2983
|
+
rate: Z(t.rate, 1),
|
|
2984
|
+
language: Z(t.language, "en-US")
|
|
2985
|
+
};
|
|
2986
|
+
return e === "polly" ? {
|
|
2987
|
+
...o,
|
|
2988
|
+
defaultVoice: Z(o.defaultVoice, "Joanna"),
|
|
2989
|
+
engine: Z(o.engine, "neural"),
|
|
2990
|
+
format: Z(o.format, "mp3"),
|
|
2991
|
+
speechMarksMode: Z(o.speechMarksMode, "word+sentence")
|
|
2992
|
+
} : e === "google" ? {
|
|
2993
|
+
...o,
|
|
2994
|
+
defaultVoice: Z(o.defaultVoice, "en-US-Wavenet-A")
|
|
2995
|
+
} : o;
|
|
2996
|
+
}, Mo = (t) => {
|
|
2997
|
+
const e = qn(t), o = qn(t?.settings);
|
|
2998
|
+
return pl({
|
|
2999
|
+
...e,
|
|
3000
|
+
...o
|
|
3001
|
+
});
|
|
3002
|
+
}, Bo = (t) => t.backend || "browser", tr = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), er = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), vl = (t) => {
|
|
3003
|
+
const e = Bo(t), o = tr(t, e), n = er(t, o);
|
|
3004
|
+
return {
|
|
3005
|
+
voice: t.defaultVoice,
|
|
3006
|
+
rate: t.rate,
|
|
3007
|
+
pitch: t.pitch,
|
|
3008
|
+
providerOptions: {
|
|
3009
|
+
...t.language ? { locale: t.language } : {},
|
|
3010
|
+
...e === "polly" && t.engine ? { engine: t.engine } : {},
|
|
3011
|
+
...e === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
|
|
3012
|
+
...e === "polly" && t.format ? { format: t.format } : {},
|
|
3013
|
+
...e === "polly" ? { speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"] } : {},
|
|
3014
|
+
...n === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
|
|
3015
|
+
...n === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
|
|
3016
|
+
...n === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
|
|
3017
|
+
},
|
|
3018
|
+
apiEndpoint: t.apiEndpoint,
|
|
3019
|
+
provider: o,
|
|
3020
|
+
language: t.language,
|
|
3021
|
+
transportMode: n,
|
|
3022
|
+
endpointMode: t.endpointMode,
|
|
3023
|
+
endpointValidationMode: t.endpointValidationMode,
|
|
3024
|
+
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
3025
|
+
validateEndpoint: t.validateEndpoint
|
|
3026
|
+
};
|
|
3027
|
+
}, xe = /* @__PURE__ */ new Map(), gl = "__pieToolElementUnmount", Fn = Object.freeze([1.5, 2]), ml = (t) => {
|
|
3028
|
+
if (!Array.isArray(t)) return [...Fn];
|
|
3029
|
+
const e = /* @__PURE__ */ new Set();
|
|
3030
|
+
for (const o of t) {
|
|
3031
|
+
if (typeof o != "number" || !Number.isFinite(o) || o <= 0) continue;
|
|
3032
|
+
const n = Math.round(o * 100) / 100;
|
|
3033
|
+
n !== 1 && e.add(n);
|
|
3034
|
+
}
|
|
3035
|
+
return e.size ? Array.from(e) : [...Fn];
|
|
3036
|
+
}, bl = {
|
|
3037
|
+
toolId: "textToSpeech",
|
|
3038
|
+
name: "Text to Speech",
|
|
3039
|
+
description: "Read content aloud",
|
|
3040
|
+
icon: "volume-up",
|
|
3041
|
+
provider: {
|
|
3042
|
+
getProviderId: () => "tts",
|
|
3043
|
+
createProvider: (t) => new sl(Bo(Mo(t))),
|
|
3044
|
+
getInitConfig: (t) => {
|
|
3045
|
+
const e = Mo(t), o = Bo(e), n = tr(e, o);
|
|
3046
|
+
return {
|
|
3047
|
+
backend: o,
|
|
3048
|
+
serverProvider: n,
|
|
3049
|
+
transportMode: er(e, n),
|
|
3050
|
+
...vl(e)
|
|
3051
|
+
};
|
|
3052
|
+
},
|
|
3053
|
+
getAuthFetcher: (t) => {
|
|
3054
|
+
const e = t?.provider?.runtime?.authFetcher;
|
|
3055
|
+
return typeof e == "function" ? e : void 0;
|
|
3056
|
+
},
|
|
3057
|
+
lazy: !0
|
|
3058
|
+
},
|
|
3059
|
+
supportedLevels: [
|
|
3060
|
+
"section",
|
|
3061
|
+
"item",
|
|
3062
|
+
"passage",
|
|
3063
|
+
"rubric"
|
|
3064
|
+
],
|
|
3065
|
+
pnpSupportIds: [
|
|
3066
|
+
"textToSpeech",
|
|
3067
|
+
"readAloud",
|
|
3068
|
+
"tts",
|
|
3069
|
+
"speechOutput"
|
|
3070
|
+
],
|
|
3071
|
+
isVisibleInContext(t) {
|
|
3072
|
+
return io(t);
|
|
3073
|
+
},
|
|
3074
|
+
renderToolbar(t, e) {
|
|
3075
|
+
const o = () => ml(Mo(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0).speedOptions), n = un(this.toolId, e.scope.level, e.scope.scopeId), i = () => {
|
|
3076
|
+
const s = e.ui?.size;
|
|
3077
|
+
return s === "sm" || s === "lg" ? s : "md";
|
|
3078
|
+
}, r = () => {
|
|
3079
|
+
let s = xe.get(n);
|
|
3080
|
+
return s && typeof s.isConnected == "boolean" && !s.isConnected && (xe.delete(n), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[gl] = () => {
|
|
3081
|
+
xe.get(n) === s && xe.delete(n);
|
|
3082
|
+
}, xe.set(n, s)), s.setAttribute("tool-id", n), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", i()), s.speedOptions = o(), s;
|
|
3083
|
+
};
|
|
3084
|
+
return {
|
|
3085
|
+
toolId: this.toolId,
|
|
3086
|
+
button: null,
|
|
3087
|
+
elements: [{
|
|
3088
|
+
element: r(),
|
|
3089
|
+
mount: "before-buttons"
|
|
3090
|
+
}],
|
|
3091
|
+
sync: () => {
|
|
3092
|
+
const s = r();
|
|
3093
|
+
s.setAttribute("tool-id", n), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", i()), s.speedOptions = o();
|
|
3094
|
+
}
|
|
3095
|
+
};
|
|
3096
|
+
}
|
|
3097
|
+
};
|
|
3098
|
+
function St(t, e) {
|
|
3099
|
+
const o = un(t, e.scope.level, e.scope.scopeId);
|
|
3100
|
+
return {
|
|
3101
|
+
fullToolId: o,
|
|
3102
|
+
isActive: () => e.isToolVisible(o),
|
|
3103
|
+
subscribeActive: (n) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3104
|
+
n(e.isToolVisible(o));
|
|
3105
|
+
}) : () => {
|
|
3106
|
+
}
|
|
3107
|
+
};
|
|
3108
|
+
}
|
|
3109
|
+
function xt(t) {
|
|
3110
|
+
const e = t.isActive();
|
|
3111
|
+
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
3112
|
+
}
|
|
3113
|
+
var yl = [
|
|
3114
|
+
hl,
|
|
3115
|
+
bl,
|
|
3116
|
+
{
|
|
3117
|
+
toolId: "ruler",
|
|
3118
|
+
name: "Ruler",
|
|
3119
|
+
description: "On-screen ruler for measurements",
|
|
3120
|
+
icon: "ruler",
|
|
3121
|
+
supportedLevels: ["item", "element"],
|
|
3122
|
+
pnpSupportIds: ["ruler", "measurement"],
|
|
3123
|
+
isVisibleInContext(t) {
|
|
3124
|
+
return no(t);
|
|
3125
|
+
},
|
|
3126
|
+
renderToolbar(t, e) {
|
|
3127
|
+
const o = St(this.toolId, e), n = {
|
|
3128
|
+
toolId: this.toolId,
|
|
3129
|
+
label: this.name,
|
|
3130
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3131
|
+
disabled: !1,
|
|
3132
|
+
ariaLabel: "Open ruler tool",
|
|
3133
|
+
tooltip: "Ruler",
|
|
3134
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3135
|
+
active: o.isActive()
|
|
3136
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3137
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3138
|
+
toolId: this.toolId,
|
|
3139
|
+
button: n,
|
|
3140
|
+
elements: [{
|
|
3141
|
+
element: r,
|
|
3142
|
+
mount: "after-buttons"
|
|
3143
|
+
}],
|
|
3144
|
+
sync: () => {
|
|
3145
|
+
xt({
|
|
3146
|
+
button: n,
|
|
3147
|
+
overlay: r,
|
|
3148
|
+
isActive: o.isActive
|
|
3149
|
+
}), e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3150
|
+
},
|
|
3151
|
+
subscribeActive: o.subscribeActive
|
|
3152
|
+
};
|
|
3153
|
+
}
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
toolId: "protractor",
|
|
3157
|
+
name: "Protractor",
|
|
3158
|
+
description: "On-screen protractor for angle measurements",
|
|
3159
|
+
icon: "protractor",
|
|
3160
|
+
supportedLevels: ["item", "element"],
|
|
3161
|
+
pnpSupportIds: ["protractor", "angleMeasurement"],
|
|
3162
|
+
isVisibleInContext(t) {
|
|
3163
|
+
return no(t);
|
|
3164
|
+
},
|
|
3165
|
+
renderToolbar(t, e) {
|
|
3166
|
+
const o = St(this.toolId, e), n = {
|
|
3167
|
+
toolId: this.toolId,
|
|
3168
|
+
label: this.name,
|
|
3169
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3170
|
+
disabled: !1,
|
|
3171
|
+
ariaLabel: "Open protractor tool",
|
|
3172
|
+
tooltip: "Protractor",
|
|
3173
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3174
|
+
active: o.isActive()
|
|
3175
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3176
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3177
|
+
toolId: this.toolId,
|
|
3178
|
+
button: n,
|
|
3179
|
+
elements: [{
|
|
3180
|
+
element: r,
|
|
3181
|
+
mount: "after-buttons"
|
|
3182
|
+
}],
|
|
3183
|
+
sync: () => {
|
|
3184
|
+
xt({
|
|
3185
|
+
button: n,
|
|
3186
|
+
overlay: r,
|
|
3187
|
+
isActive: o.isActive
|
|
3188
|
+
}), e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3189
|
+
},
|
|
3190
|
+
subscribeActive: o.subscribeActive
|
|
3191
|
+
};
|
|
3192
|
+
}
|
|
3193
|
+
},
|
|
3194
|
+
{
|
|
3195
|
+
toolId: "answerEliminator",
|
|
3196
|
+
name: "Answer Eliminator",
|
|
3197
|
+
description: "Strike through answer choices",
|
|
3198
|
+
icon: "strikethrough",
|
|
3199
|
+
supportedLevels: ["item"],
|
|
3200
|
+
pnpSupportIds: [
|
|
3201
|
+
"answerMasking",
|
|
3202
|
+
"answerEliminator",
|
|
3203
|
+
"strikethrough",
|
|
3204
|
+
"choiceMasking"
|
|
3205
|
+
],
|
|
3206
|
+
isVisibleInContext(t) {
|
|
3207
|
+
return Ys(t);
|
|
3208
|
+
},
|
|
3209
|
+
renderToolbar(t, e) {
|
|
3210
|
+
const o = St(this.toolId, e), n = e.componentOverrides ?? {}, i = gt(this.toolId, t, e, n);
|
|
3211
|
+
i.setAttribute("tool-id", o.fullToolId), i.setAttribute("strategy", "strikethrough"), i.setAttribute("button-alignment", "inline");
|
|
3212
|
+
const r = {
|
|
3213
|
+
toolId: this.toolId,
|
|
3214
|
+
label: this.name,
|
|
3215
|
+
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>',
|
|
3216
|
+
disabled: !1,
|
|
3217
|
+
ariaLabel: "Answer eliminator - Strike through choices",
|
|
3218
|
+
tooltip: "Strike Through",
|
|
3219
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3220
|
+
active: o.isActive()
|
|
3221
|
+
};
|
|
3222
|
+
return {
|
|
3223
|
+
toolId: this.toolId,
|
|
3224
|
+
button: r,
|
|
3225
|
+
elements: [{
|
|
3226
|
+
element: i,
|
|
3227
|
+
mount: "after-buttons"
|
|
3228
|
+
}],
|
|
3229
|
+
sync: () => {
|
|
3230
|
+
xt({
|
|
3231
|
+
button: r,
|
|
3232
|
+
overlay: i,
|
|
3233
|
+
isActive: o.isActive
|
|
3234
|
+
}), e.toolCoordinator && (i.coordinator = e.toolCoordinator), i.scopeElement = e.getScopeElement?.() || null, e.elementToolStateStore && (i.elementToolStateStore = e.elementToolStateStore);
|
|
3235
|
+
const s = e.getGlobalElementId?.();
|
|
3236
|
+
s && (i.globalElementId = s);
|
|
3237
|
+
},
|
|
3238
|
+
subscribeActive: o.subscribeActive
|
|
3239
|
+
};
|
|
3240
|
+
}
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
toolId: "highlighter",
|
|
3244
|
+
name: "Highlighter",
|
|
3245
|
+
description: "Highlight text",
|
|
3246
|
+
icon: "highlighter",
|
|
3247
|
+
activation: "toolbar-toggle",
|
|
3248
|
+
supportedLevels: [
|
|
3249
|
+
"passage",
|
|
3250
|
+
"rubric",
|
|
3251
|
+
"item",
|
|
3252
|
+
"element"
|
|
3253
|
+
],
|
|
3254
|
+
pnpSupportIds: [
|
|
3255
|
+
"highlighter",
|
|
3256
|
+
"textHighlight",
|
|
3257
|
+
"annotation"
|
|
3258
|
+
],
|
|
3259
|
+
isVisibleInContext(t) {
|
|
3260
|
+
return io(t);
|
|
3261
|
+
},
|
|
3262
|
+
renderToolbar(t, e) {
|
|
3263
|
+
const o = St(this.toolId, e), n = {
|
|
3264
|
+
toolId: this.toolId,
|
|
3265
|
+
label: this.name,
|
|
3266
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3267
|
+
disabled: !1,
|
|
3268
|
+
ariaLabel: "Highlighter - Highlight text",
|
|
3269
|
+
tooltip: "Highlight",
|
|
3270
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3271
|
+
active: o.isActive()
|
|
3272
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3273
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3274
|
+
toolId: this.toolId,
|
|
3275
|
+
button: n,
|
|
3276
|
+
elements: [{
|
|
3277
|
+
element: r,
|
|
3278
|
+
mount: "after-buttons"
|
|
3279
|
+
}],
|
|
3280
|
+
sync: () => {
|
|
3281
|
+
xt({
|
|
3282
|
+
button: n,
|
|
3283
|
+
overlay: r,
|
|
3284
|
+
isActive: o.isActive,
|
|
3285
|
+
onActiveChange: (s) => {
|
|
3286
|
+
r.enabled = s;
|
|
3287
|
+
}
|
|
3288
|
+
}), e.ttsService && (r.ttsService = e.ttsService);
|
|
3289
|
+
},
|
|
3290
|
+
subscribeActive: o.subscribeActive
|
|
3291
|
+
};
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
toolId: "lineReader",
|
|
3296
|
+
name: "Line Reader",
|
|
3297
|
+
description: "Reading guide overlay",
|
|
3298
|
+
icon: "bars-3",
|
|
3299
|
+
supportedLevels: [
|
|
3300
|
+
"passage",
|
|
3301
|
+
"rubric",
|
|
3302
|
+
"item"
|
|
3303
|
+
],
|
|
3304
|
+
pnpSupportIds: [
|
|
3305
|
+
"readingMask",
|
|
3306
|
+
"readingGuide",
|
|
3307
|
+
"readingRuler",
|
|
3308
|
+
"lineReader",
|
|
3309
|
+
"trackingGuide"
|
|
3310
|
+
],
|
|
3311
|
+
isVisibleInContext(t) {
|
|
3312
|
+
return io(t);
|
|
3313
|
+
},
|
|
3314
|
+
renderToolbar(t, e) {
|
|
3315
|
+
const o = St(this.toolId, e), n = {
|
|
3316
|
+
toolId: this.toolId,
|
|
3317
|
+
label: this.name,
|
|
3318
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3319
|
+
disabled: !1,
|
|
3320
|
+
ariaLabel: "Line reader - Reading guide",
|
|
3321
|
+
tooltip: "Line Reader",
|
|
3322
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3323
|
+
active: o.isActive()
|
|
3324
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3325
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3326
|
+
toolId: this.toolId,
|
|
3327
|
+
button: n,
|
|
3328
|
+
elements: [{
|
|
3329
|
+
element: r,
|
|
3330
|
+
mount: "after-buttons"
|
|
3331
|
+
}],
|
|
3332
|
+
sync: () => {
|
|
3333
|
+
xt({
|
|
3334
|
+
button: n,
|
|
3335
|
+
overlay: r,
|
|
3336
|
+
isActive: o.isActive
|
|
3337
|
+
}), e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3338
|
+
},
|
|
3339
|
+
subscribeActive: o.subscribeActive
|
|
3340
|
+
};
|
|
3341
|
+
}
|
|
3342
|
+
},
|
|
3343
|
+
{
|
|
3344
|
+
toolId: "theme",
|
|
3345
|
+
name: "Theme",
|
|
3346
|
+
description: "Accessible themes and contrast",
|
|
3347
|
+
icon: "swatch",
|
|
3348
|
+
supportedLevels: ["assessment", "section"],
|
|
3349
|
+
pnpSupportIds: [
|
|
3350
|
+
"highContrastDisplay",
|
|
3351
|
+
"colorContrast",
|
|
3352
|
+
"invertColors",
|
|
3353
|
+
"colorScheme",
|
|
3354
|
+
"theme",
|
|
3355
|
+
"highContrast",
|
|
3356
|
+
"customColors"
|
|
3357
|
+
],
|
|
3358
|
+
isVisibleInContext(t) {
|
|
3359
|
+
return !0;
|
|
3360
|
+
},
|
|
3361
|
+
renderToolbar(t, e) {
|
|
3362
|
+
const o = St(this.toolId, e), n = {
|
|
3363
|
+
toolId: this.toolId,
|
|
3364
|
+
label: this.name,
|
|
3365
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3366
|
+
disabled: !1,
|
|
3367
|
+
ariaLabel: "Theme - Change colors and contrast",
|
|
3368
|
+
tooltip: "Theme",
|
|
3369
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3370
|
+
active: o.isActive()
|
|
3371
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3372
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3373
|
+
toolId: this.toolId,
|
|
3374
|
+
button: n,
|
|
3375
|
+
elements: [{
|
|
3376
|
+
element: r,
|
|
3377
|
+
mount: "after-buttons",
|
|
3378
|
+
shell: {
|
|
3379
|
+
title: this.name,
|
|
3380
|
+
draggable: !0,
|
|
3381
|
+
resizable: !1,
|
|
3382
|
+
closeable: !0,
|
|
3383
|
+
initialWidth: 520,
|
|
3384
|
+
initialHeight: 380,
|
|
3385
|
+
minWidth: 420,
|
|
3386
|
+
minHeight: 300
|
|
3387
|
+
}
|
|
3388
|
+
}],
|
|
3389
|
+
sync: () => {
|
|
3390
|
+
xt({
|
|
3391
|
+
button: n,
|
|
3392
|
+
overlay: r,
|
|
3393
|
+
isActive: o.isActive
|
|
3394
|
+
}), e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3395
|
+
},
|
|
3396
|
+
subscribeActive: o.subscribeActive
|
|
3397
|
+
};
|
|
3398
|
+
}
|
|
3399
|
+
},
|
|
3400
|
+
{
|
|
3401
|
+
toolId: "annotationToolbar",
|
|
3402
|
+
name: "Highlighter",
|
|
3403
|
+
description: "Highlight and annotate text",
|
|
3404
|
+
icon: "highlighter",
|
|
3405
|
+
activation: "selection-gateway",
|
|
3406
|
+
singletonScope: "section",
|
|
3407
|
+
supportedLevels: [
|
|
3408
|
+
"passage",
|
|
3409
|
+
"rubric",
|
|
3410
|
+
"item",
|
|
3411
|
+
"element"
|
|
3412
|
+
],
|
|
3413
|
+
pnpSupportIds: [
|
|
3414
|
+
"highlighting",
|
|
3415
|
+
"annotations",
|
|
3416
|
+
"highlighter",
|
|
3417
|
+
"textHighlight",
|
|
3418
|
+
"annotation"
|
|
3419
|
+
],
|
|
3420
|
+
isVisibleInContext(t) {
|
|
3421
|
+
return io(t);
|
|
3422
|
+
},
|
|
3423
|
+
renderToolbar(t, e) {
|
|
3424
|
+
const o = St(this.toolId, e), n = {
|
|
3425
|
+
toolId: this.toolId,
|
|
3426
|
+
label: this.name,
|
|
3427
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3428
|
+
disabled: !1,
|
|
3429
|
+
ariaLabel: "Annotation toolbar - Highlight text",
|
|
3430
|
+
tooltip: "Highlight",
|
|
3431
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3432
|
+
active: o.isActive()
|
|
3433
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3434
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3435
|
+
toolId: this.toolId,
|
|
3436
|
+
button: n,
|
|
3437
|
+
elements: [{
|
|
3438
|
+
element: r,
|
|
3439
|
+
mount: "after-buttons"
|
|
3440
|
+
}],
|
|
3441
|
+
sync: () => {
|
|
3442
|
+
xt({
|
|
3443
|
+
button: n,
|
|
3444
|
+
overlay: r,
|
|
3445
|
+
isActive: o.isActive
|
|
3446
|
+
}), e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3447
|
+
},
|
|
3448
|
+
subscribeActive: o.subscribeActive
|
|
3449
|
+
};
|
|
3450
|
+
}
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
toolId: "graph",
|
|
3454
|
+
name: "Graph",
|
|
3455
|
+
description: "Graphing calculator and coordinate plane",
|
|
3456
|
+
icon: "chart-bar",
|
|
3457
|
+
supportedLevels: ["section"],
|
|
3458
|
+
pnpSupportIds: [
|
|
3459
|
+
"graph",
|
|
3460
|
+
"graphingCalculator",
|
|
3461
|
+
"coordinatePlane",
|
|
3462
|
+
"graphingTool"
|
|
3463
|
+
],
|
|
3464
|
+
isVisibleInContext(t) {
|
|
3465
|
+
return no(t);
|
|
3466
|
+
},
|
|
3467
|
+
renderToolbar(t, e) {
|
|
3468
|
+
const o = St(this.toolId, e), n = {
|
|
3469
|
+
toolId: this.toolId,
|
|
3470
|
+
label: this.name,
|
|
3471
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3472
|
+
disabled: !1,
|
|
3473
|
+
ariaLabel: "Graph - Graphing calculator",
|
|
3474
|
+
tooltip: "Graph",
|
|
3475
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3476
|
+
active: o.isActive()
|
|
3477
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3478
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3479
|
+
toolId: this.toolId,
|
|
3480
|
+
button: n,
|
|
3481
|
+
elements: [{
|
|
3482
|
+
element: r,
|
|
3483
|
+
mount: "after-buttons",
|
|
3484
|
+
shell: {
|
|
3485
|
+
title: this.name,
|
|
3486
|
+
draggable: !0,
|
|
3487
|
+
resizable: !0,
|
|
3488
|
+
closeable: !0,
|
|
3489
|
+
initialWidth: 920,
|
|
3490
|
+
initialHeight: 680,
|
|
3491
|
+
minWidth: 640,
|
|
3492
|
+
minHeight: 500
|
|
3493
|
+
}
|
|
3494
|
+
}],
|
|
3495
|
+
sync: () => {
|
|
3496
|
+
xt({
|
|
3497
|
+
button: n,
|
|
3498
|
+
overlay: r,
|
|
3499
|
+
isActive: o.isActive
|
|
3500
|
+
});
|
|
3501
|
+
},
|
|
3502
|
+
subscribeActive: o.subscribeActive
|
|
3503
|
+
};
|
|
3504
|
+
}
|
|
3505
|
+
},
|
|
3506
|
+
{
|
|
3507
|
+
toolId: "periodicTable",
|
|
3508
|
+
name: "Periodic Table",
|
|
3509
|
+
description: "Chemistry periodic table reference",
|
|
3510
|
+
icon: "beaker",
|
|
3511
|
+
supportedLevels: ["section"],
|
|
3512
|
+
pnpSupportIds: [
|
|
3513
|
+
"periodicTable",
|
|
3514
|
+
"chemistryReference",
|
|
3515
|
+
"elementReference"
|
|
3516
|
+
],
|
|
3517
|
+
isVisibleInContext(t) {
|
|
3518
|
+
return Qs(t);
|
|
3519
|
+
},
|
|
3520
|
+
renderToolbar(t, e) {
|
|
3521
|
+
const o = St(this.toolId, e), n = {
|
|
3522
|
+
toolId: this.toolId,
|
|
3523
|
+
label: this.name,
|
|
3524
|
+
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
3525
|
+
disabled: !1,
|
|
3526
|
+
ariaLabel: "Periodic table - Chemistry reference",
|
|
3527
|
+
tooltip: "Periodic Table",
|
|
3528
|
+
onClick: () => e.toggleTool(this.toolId),
|
|
3529
|
+
active: o.isActive()
|
|
3530
|
+
}, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
|
|
3531
|
+
return r.setAttribute("tool-id", o.fullToolId), {
|
|
3532
|
+
toolId: this.toolId,
|
|
3533
|
+
button: n,
|
|
3534
|
+
elements: [{
|
|
3535
|
+
element: r,
|
|
3536
|
+
mount: "after-buttons",
|
|
3537
|
+
shell: {
|
|
3538
|
+
title: this.name,
|
|
3539
|
+
draggable: !0,
|
|
3540
|
+
resizable: !0,
|
|
3541
|
+
closeable: !0,
|
|
3542
|
+
initialWidth: 1160,
|
|
3543
|
+
initialHeight: 760,
|
|
3544
|
+
minWidth: 920,
|
|
3545
|
+
minHeight: 620
|
|
3546
|
+
}
|
|
3547
|
+
}],
|
|
3548
|
+
sync: () => {
|
|
3549
|
+
xt({
|
|
3550
|
+
button: n,
|
|
3551
|
+
overlay: r,
|
|
3552
|
+
isActive: o.isActive
|
|
3553
|
+
});
|
|
3554
|
+
},
|
|
3555
|
+
subscribeActive: o.subscribeActive
|
|
3556
|
+
};
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
];
|
|
3560
|
+
function wl(t = {}) {
|
|
3561
|
+
const e = new Js(), o = {
|
|
3562
|
+
toolTagMap: {
|
|
3563
|
+
...Qi,
|
|
3564
|
+
...t.toolTagMap || {}
|
|
3565
|
+
},
|
|
3566
|
+
toolComponentFactory: t.toolComponentFactory,
|
|
3567
|
+
toolComponentFactories: t.toolComponentFactories
|
|
3568
|
+
}, n = (i) => t.overrides?.[i.toolId] || i;
|
|
3569
|
+
return t.includePackagedTools && Tl(e, {
|
|
3570
|
+
toolIds: t.toolIds,
|
|
3571
|
+
applyOverrides: n
|
|
3572
|
+
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(o), e;
|
|
3573
|
+
}
|
|
3574
|
+
function Tl(t, e = {}) {
|
|
3575
|
+
const o = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, n = e.applyOverrides || ((i) => i);
|
|
3576
|
+
for (const i of yl) o && !o.has(i.toolId) || t.register(n(i));
|
|
3577
|
+
}
|
|
3578
|
+
function Il(t = {}) {
|
|
3579
|
+
return wl({
|
|
3580
|
+
...t,
|
|
3581
|
+
includePackagedTools: !0
|
|
3582
|
+
});
|
|
3583
|
+
}
|
|
3584
|
+
function $l() {
|
|
3585
|
+
const t = Il(), e = /* @__PURE__ */ new Set();
|
|
3586
|
+
for (const o of t.getAllTools()) for (const n of o.pnpSupportIds || []) e.add(n);
|
|
3587
|
+
return [...e].sort();
|
|
3588
|
+
}
|
|
3589
|
+
[...$l()];
|
|
3590
|
+
Object.values({
|
|
3591
|
+
visual: {
|
|
3592
|
+
magnification: "magnification",
|
|
3593
|
+
screenMagnifier: "screenMagnifier",
|
|
3594
|
+
zoomable: "zoomable",
|
|
3595
|
+
highContrastDisplay: "highContrastDisplay",
|
|
3596
|
+
highContrastAudio: "highContrastAudio",
|
|
3597
|
+
colorContrast: "colorContrast",
|
|
3598
|
+
invertColors: "invertColors",
|
|
3599
|
+
displayTransformability: "displayTransformability",
|
|
3600
|
+
largePrint: "largePrint",
|
|
3601
|
+
fontEnlargement: "fontEnlargement",
|
|
3602
|
+
resizeText: "resizeText",
|
|
3603
|
+
alternativeText: "alternativeText",
|
|
3604
|
+
longDescription: "longDescription",
|
|
3605
|
+
describedMath: "describedMath",
|
|
3606
|
+
tactileGraphic: "tactileGraphic",
|
|
3607
|
+
tactileObject: "tactileObject"
|
|
3608
|
+
},
|
|
3609
|
+
auditory: {
|
|
3610
|
+
audioDescription: "audioDescription",
|
|
3611
|
+
textToSpeech: "textToSpeech",
|
|
3612
|
+
readAloud: "readAloud",
|
|
3613
|
+
humanVoice: "humanVoice",
|
|
3614
|
+
syntheticVoice: "syntheticVoice",
|
|
3615
|
+
speechRate: "speechRate",
|
|
3616
|
+
speechVolume: "speechVolume",
|
|
3617
|
+
voicePitch: "voicePitch",
|
|
3618
|
+
captions: "captions",
|
|
3619
|
+
closedCaptions: "closedCaptions",
|
|
3620
|
+
openCaptions: "openCaptions",
|
|
3621
|
+
transcript: "transcript",
|
|
3622
|
+
signLanguage: "signLanguage",
|
|
3623
|
+
subtitles: "subtitles",
|
|
3624
|
+
audioControl: "audioControl",
|
|
3625
|
+
noBackgroundAudio: "noBackgroundAudio"
|
|
3626
|
+
},
|
|
3627
|
+
motor: {
|
|
3628
|
+
keyboardControl: "keyboardControl",
|
|
3629
|
+
mouseControl: "mouseControl",
|
|
3630
|
+
touchControl: "touchControl",
|
|
3631
|
+
voiceControl: "voiceControl",
|
|
3632
|
+
switchControl: "switchControl",
|
|
3633
|
+
eyeGazeControl: "eyeGazeControl",
|
|
3634
|
+
singleSwitchAccess: "singleSwitchAccess",
|
|
3635
|
+
stickyKeys: "stickyKeys",
|
|
3636
|
+
keyboardShortcuts: "keyboardShortcuts",
|
|
3637
|
+
timingControl: "timingControl",
|
|
3638
|
+
unlimitedTime: "unlimitedTime",
|
|
3639
|
+
extendedTime: "extendedTime",
|
|
3640
|
+
pauseControl: "pauseControl"
|
|
3641
|
+
},
|
|
3642
|
+
cognitive: {
|
|
3643
|
+
simplifiedLanguage: "simplifiedLanguage",
|
|
3644
|
+
reducedComplexity: "reducedComplexity",
|
|
3645
|
+
structuralNavigation: "structuralNavigation",
|
|
3646
|
+
tableOfContents: "tableOfContents",
|
|
3647
|
+
reducedDistraction: "reducedDistraction",
|
|
3648
|
+
noFlashing: "noFlashing",
|
|
3649
|
+
pauseAnimation: "pauseAnimation",
|
|
3650
|
+
annotations: "annotations",
|
|
3651
|
+
bookmarking: "bookmarking",
|
|
3652
|
+
highlighting: "highlighting",
|
|
3653
|
+
guidedNavigation: "guidedNavigation",
|
|
3654
|
+
calculator: "calculator",
|
|
3655
|
+
thesaurus: "thesaurus",
|
|
3656
|
+
spellingAssistance: "spellingAssistance",
|
|
3657
|
+
grammarAssistance: "grammarAssistance"
|
|
3658
|
+
},
|
|
3659
|
+
reading: {
|
|
3660
|
+
lineSpacing: "lineSpacing",
|
|
3661
|
+
wordSpacing: "wordSpacing",
|
|
3662
|
+
letterSpacing: "letterSpacing",
|
|
3663
|
+
fontFamily: "fontFamily",
|
|
3664
|
+
readingMask: "readingMask",
|
|
3665
|
+
readingGuide: "readingGuide",
|
|
3666
|
+
readingRuler: "readingRuler",
|
|
3667
|
+
wordHighlighting: "wordHighlighting",
|
|
3668
|
+
lineHighlighting: "lineHighlighting",
|
|
3669
|
+
focusIndicator: "focusIndicator",
|
|
3670
|
+
printableResource: "printableResource",
|
|
3671
|
+
braille: "braille",
|
|
3672
|
+
nemeth: "nemeth",
|
|
3673
|
+
refreshableBraille: "refreshableBraille"
|
|
3674
|
+
},
|
|
3675
|
+
navigation: {
|
|
3676
|
+
index: "index",
|
|
3677
|
+
pageNavigation: "pageNavigation",
|
|
3678
|
+
skipContent: "skipContent",
|
|
3679
|
+
breadcrumbs: "breadcrumbs",
|
|
3680
|
+
searchable: "searchable",
|
|
3681
|
+
fullTextSearch: "fullTextSearch"
|
|
3682
|
+
},
|
|
3683
|
+
linguistic: {
|
|
3684
|
+
multilingualText: "multilingualText",
|
|
3685
|
+
translatedText: "translatedText",
|
|
3686
|
+
glossary: "glossary",
|
|
3687
|
+
signLanguageInterpretation: "signLanguageInterpretation",
|
|
3688
|
+
visualLanguage: "visualLanguage"
|
|
3689
|
+
},
|
|
3690
|
+
assessment: {
|
|
3691
|
+
protractor: "protractor",
|
|
3692
|
+
ruler: "ruler",
|
|
3693
|
+
graph: "graph",
|
|
3694
|
+
graphingCalculator: "graphingCalculator",
|
|
3695
|
+
periodicTable: "periodicTable",
|
|
3696
|
+
formulaSheet: "formulaSheet",
|
|
3697
|
+
answerMasking: "answerMasking",
|
|
3698
|
+
answerEliminator: "answerEliminator",
|
|
3699
|
+
strikethrough: "strikethrough",
|
|
3700
|
+
itemGlossary: "itemGlossary",
|
|
3701
|
+
tutorialAvailable: "tutorialAvailable"
|
|
3702
|
+
}
|
|
3703
|
+
}).flatMap((t) => Object.values(t));
|
|
3704
|
+
Xi("ToolCoordinator");
|
|
3705
|
+
var Gn;
|
|
3706
|
+
(function(t) {
|
|
3707
|
+
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";
|
|
3708
|
+
})(Gn || (Gn = {}));
|
|
3709
|
+
var Un;
|
|
3710
|
+
(function(t) {
|
|
3711
|
+
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
3712
|
+
})(Un || (Un = {}));
|
|
3713
|
+
var kl = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Sl = /* @__PURE__ */ le('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), xl = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Al = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), _l = /* @__PURE__ */ le('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Cl = /* @__PURE__ */ le('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), El = /* @__PURE__ */ le('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Pl = {
|
|
3714
|
+
hash: "svelte-g8qu62",
|
|
3715
|
+
code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
|
|
3716
|
+
|
|
3717
|
+
/* Screen reader only content */.pie-sr-only.svelte-g8qu62 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}
|
|
3718
|
+
|
|
3719
|
+
/* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
|
|
3720
|
+
};
|
|
3721
|
+
function Ll(t, e) {
|
|
3722
|
+
ei(e, !0), Cs(t, Pl);
|
|
3723
|
+
let o = Po(e, "enabled", 7, !0), n = Po(e, "highlightCoordinator", 7, null), i = Po(e, "ttsService", 7, null);
|
|
3724
|
+
const r = typeof window < "u", s = "pie-annotations", l = [
|
|
3725
|
+
{
|
|
3726
|
+
name: Rt.YELLOW,
|
|
3727
|
+
hex: "#fde995",
|
|
3728
|
+
label: "Yellow highlight"
|
|
3729
|
+
},
|
|
3730
|
+
{
|
|
3731
|
+
name: Rt.PINK,
|
|
3732
|
+
hex: "#ff9fae",
|
|
3733
|
+
label: "Pink highlight"
|
|
3734
|
+
},
|
|
3735
|
+
{
|
|
3736
|
+
name: Rt.BLUE,
|
|
3737
|
+
hex: "#a7e0f6",
|
|
3738
|
+
label: "Blue highlight"
|
|
3739
|
+
},
|
|
3740
|
+
{
|
|
3741
|
+
name: Rt.GREEN,
|
|
3742
|
+
hex: "#a6e1c5",
|
|
3743
|
+
label: "Green highlight"
|
|
3744
|
+
}
|
|
3745
|
+
], a = [
|
|
3746
|
+
"button",
|
|
3747
|
+
"input",
|
|
3748
|
+
"select",
|
|
3749
|
+
"textarea",
|
|
3750
|
+
'[contenteditable="true"]',
|
|
3751
|
+
".pie-tool-annotation-toolbar",
|
|
3752
|
+
".pie-tool-toolbar",
|
|
3753
|
+
'[role="button"]',
|
|
3754
|
+
'[role="textbox"]'
|
|
3755
|
+
];
|
|
3756
|
+
let u = /* @__PURE__ */ V(null), d = /* @__PURE__ */ V(null), p = /* @__PURE__ */ V(null), h = /* @__PURE__ */ V(null), v = /* @__PURE__ */ V(Kt({
|
|
3757
|
+
isVisible: !1,
|
|
3758
|
+
selectedText: "",
|
|
3759
|
+
selectedRange: null,
|
|
3760
|
+
toolbarPosition: {
|
|
3761
|
+
x: 0,
|
|
3762
|
+
y: 0
|
|
3763
|
+
}
|
|
3764
|
+
})), y = /* @__PURE__ */ V(!1), $ = /* @__PURE__ */ V(!1), f = /* @__PURE__ */ V(""), w = /* @__PURE__ */ V(0), R = /* @__PURE__ */ V(null), A = /* @__PURE__ */ ko(() => g(w) > 0), O = /* @__PURE__ */ ko(() => g(R) !== null), U = /* @__PURE__ */ ko(() => g(h)?.scopeElement || g(p)?.scopeElement || null);
|
|
3765
|
+
function D() {
|
|
3766
|
+
const m = g(u)?.ownerDocument;
|
|
3767
|
+
return g(U) || m?.documentElement || document.documentElement;
|
|
3768
|
+
}
|
|
3769
|
+
function H() {
|
|
3770
|
+
return `${s}:${g(p)?.canonicalItemId || g(p)?.itemId || "global"}`;
|
|
3771
|
+
}
|
|
3772
|
+
function ft(m) {
|
|
3773
|
+
if (!n()) return null;
|
|
3774
|
+
const I = n().getAnnotations();
|
|
3775
|
+
for (const C of I) {
|
|
3776
|
+
const it = m.compareBoundaryPoints(Range.START_TO_START, C.range), Ht = m.compareBoundaryPoints(Range.END_TO_END, C.range), we = m.compareBoundaryPoints(Range.START_TO_END, C.range), wo = m.compareBoundaryPoints(Range.END_TO_START, C.range);
|
|
3777
|
+
if (it >= 0 && Ht <= 0 || it <= 0 && Ht >= 0 || we > 0 && wo < 0) return C.id;
|
|
3778
|
+
}
|
|
3779
|
+
return null;
|
|
3780
|
+
}
|
|
3781
|
+
function K(m) {
|
|
3782
|
+
if (m.nodeType !== Node.ELEMENT_NODE && m.nodeType !== Node.TEXT_NODE) return !1;
|
|
3783
|
+
const I = m.nodeType === Node.TEXT_NODE ? m.parentElement : m;
|
|
3784
|
+
return I ? !a.some((C) => {
|
|
3785
|
+
try {
|
|
3786
|
+
return I.closest(C) !== null;
|
|
3787
|
+
} catch {
|
|
3788
|
+
return !1;
|
|
3789
|
+
}
|
|
3790
|
+
}) : !1;
|
|
3791
|
+
}
|
|
3792
|
+
function pt(m) {
|
|
3793
|
+
if (!g(U)) return !0;
|
|
3794
|
+
const I = m.commonAncestorContainer, C = I.nodeType === Node.TEXT_NODE ? I.parentElement : I;
|
|
3795
|
+
return !!C && g(U).contains(C);
|
|
3796
|
+
}
|
|
3797
|
+
function je() {
|
|
3798
|
+
if (!(!r || !n())) try {
|
|
3799
|
+
const m = D(), I = n().exportAnnotations(m);
|
|
3800
|
+
sessionStorage.setItem(H(), JSON.stringify(I));
|
|
3801
|
+
} catch (m) {
|
|
3802
|
+
console.error("[AnnotationToolbar] Failed to save annotations:", m);
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
function or() {
|
|
3806
|
+
if (!(!r || !n())) try {
|
|
3807
|
+
const m = sessionStorage.getItem(H());
|
|
3808
|
+
if (!m) return;
|
|
3809
|
+
const I = JSON.parse(m), C = D(), it = n().importAnnotations(I, C);
|
|
3810
|
+
console.log(`[AnnotationToolbar] Restored ${it} annotations`), _(w, n().getAnnotations().length, !0);
|
|
3811
|
+
} catch (m) {
|
|
3812
|
+
console.error("[AnnotationToolbar] Failed to load annotations:", m);
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
function We() {
|
|
3816
|
+
if (!o() || !r) return;
|
|
3817
|
+
const m = window.getSelection();
|
|
3818
|
+
if (!m || m.rangeCount === 0) return $t();
|
|
3819
|
+
const I = m.getRangeAt(0), C = m.toString().trim();
|
|
3820
|
+
if (!C || !pt(I) || !K(I.commonAncestorContainer)) return $t();
|
|
3821
|
+
const it = I.getBoundingClientRect(), Ht = it.left + it.width / 2, we = it.top - 8;
|
|
3822
|
+
_(R, ft(I), !0), g(v).isVisible = !0, g(v).selectedText = C, g(v).selectedRange = I.cloneRange(), g(v).toolbarPosition = {
|
|
3823
|
+
x: Ht,
|
|
3824
|
+
y: we
|
|
3825
|
+
}, _(f, `Annotation toolbar opened for "${C.length > 30 ? C.substring(0, 30) + "..." : C}"`), setTimeout(() => {
|
|
3826
|
+
_(f, "");
|
|
3827
|
+
}, 2e3), _($, !0), setTimeout(() => {
|
|
3828
|
+
_($, !1);
|
|
3829
|
+
}, 100);
|
|
3830
|
+
}
|
|
3831
|
+
function $t() {
|
|
3832
|
+
g(y) && i() && (i().stop(), _(y, !1)), g(v).isVisible = !1, g(v).selectedText = "", g(v).selectedRange = null;
|
|
3833
|
+
}
|
|
3834
|
+
function dn(m) {
|
|
3835
|
+
if (!g(v).selectedRange || !n()) return;
|
|
3836
|
+
const I = g(v).selectedText;
|
|
3837
|
+
n().addAnnotation(g(v).selectedRange, m), _(w, n().getAnnotations().length, !0), je();
|
|
3838
|
+
const C = m === Rt.UNDERLINE ? "underlined" : `highlighted in ${m}`;
|
|
3839
|
+
_(f, `"${I.length > 30 ? I.substring(0, 30) + "..." : I}" ${C}`), setTimeout(() => {
|
|
3840
|
+
_(f, "");
|
|
3841
|
+
}, 3e3), $t();
|
|
3842
|
+
}
|
|
3843
|
+
function nr() {
|
|
3844
|
+
if (!g(R) || !n()) {
|
|
3845
|
+
console.warn("[AnnotationToolbar] No overlapping annotation to remove");
|
|
3846
|
+
return;
|
|
3847
|
+
}
|
|
3848
|
+
console.log("[AnnotationToolbar] Removing annotation:", g(R));
|
|
3849
|
+
const m = n().getAnnotation(g(R));
|
|
3850
|
+
if (!m) {
|
|
3851
|
+
console.warn("[AnnotationToolbar] Annotation not found:", g(R));
|
|
3852
|
+
return;
|
|
3853
|
+
}
|
|
3854
|
+
const I = m.range.toString();
|
|
3855
|
+
n().removeAnnotation(g(R));
|
|
3856
|
+
const C = n().getAnnotations().length;
|
|
3857
|
+
_(w, C, !0), console.log("[AnnotationToolbar] Annotations remaining:", C), je(), _(f, `Removed annotation from "${I.length > 30 ? I.substring(0, 30) + "..." : I}"`), setTimeout(() => {
|
|
3858
|
+
_(f, "");
|
|
3859
|
+
}, 3e3), $t();
|
|
3860
|
+
}
|
|
3861
|
+
function ir() {
|
|
3862
|
+
const m = g(w);
|
|
3863
|
+
n()?.clearAnnotations(), _(w, 0), sessionStorage.removeItem(H()), _(f, `${m} annotation${m === 1 ? "" : "s"} cleared`), setTimeout(() => {
|
|
3864
|
+
_(f, "");
|
|
3865
|
+
}, 3e3), $t();
|
|
3866
|
+
}
|
|
3867
|
+
async function rr() {
|
|
3868
|
+
if (!(!g(v).selectedRange || !i())) {
|
|
3869
|
+
_(y, !0);
|
|
3870
|
+
try {
|
|
3871
|
+
console.log("[AnnotationToolbar] Speaking range:", g(v).selectedRange.toString().substring(0, 50)), await i().speakRange(g(v).selectedRange, { contentRoot: D() }), console.log("[AnnotationToolbar] TTS completed successfully");
|
|
3872
|
+
} catch (m) {
|
|
3873
|
+
console.error("[AnnotationToolbar] TTS error:", m), alert(`TTS failed: ${m instanceof Error ? m.message : String(m)}`);
|
|
3874
|
+
} finally {
|
|
3875
|
+
_(y, !1);
|
|
3876
|
+
}
|
|
3877
|
+
}
|
|
3878
|
+
}
|
|
3879
|
+
function hn(m) {
|
|
3880
|
+
m.key === "Escape" && g(v).isVisible && (m.preventDefault(), $t());
|
|
3881
|
+
}
|
|
3882
|
+
function ze(m) {
|
|
3883
|
+
!g(v).isVisible || g($) || g(d) && !g(d).contains(m.target) && $t();
|
|
3884
|
+
}
|
|
3885
|
+
_n(() => {
|
|
3886
|
+
if (!r) return;
|
|
3887
|
+
const m = setTimeout(() => {
|
|
3888
|
+
or();
|
|
3889
|
+
}, 2e3), I = g(U) || document;
|
|
3890
|
+
return I.addEventListener("mouseup", We), I.addEventListener("click", ze), I.addEventListener("touchend", We), I.addEventListener("touchstart", ze), document.addEventListener("keydown", hn), window.addEventListener("scroll", $t, !0), () => {
|
|
3891
|
+
clearTimeout(m), I.removeEventListener("mouseup", We), I.removeEventListener("click", ze), I.removeEventListener("touchend", We), I.removeEventListener("touchstart", ze), document.removeEventListener("keydown", hn), window.removeEventListener("scroll", $t, !0);
|
|
3892
|
+
};
|
|
3893
|
+
}), _n(() => {
|
|
3894
|
+
if (!g(u)) return;
|
|
3895
|
+
const m = Fs(g(u), (C) => {
|
|
3896
|
+
_(p, C, !0);
|
|
3897
|
+
}), I = Gs(g(u), (C) => {
|
|
3898
|
+
_(h, C, !0);
|
|
3899
|
+
});
|
|
3900
|
+
return () => {
|
|
3901
|
+
I(), m();
|
|
3902
|
+
};
|
|
3903
|
+
});
|
|
3904
|
+
var sr = {
|
|
3905
|
+
get enabled() {
|
|
3906
|
+
return o();
|
|
3907
|
+
},
|
|
3908
|
+
set enabled(m = !0) {
|
|
3909
|
+
o(m), Ye();
|
|
3910
|
+
},
|
|
3911
|
+
get highlightCoordinator() {
|
|
3912
|
+
return n();
|
|
3913
|
+
},
|
|
3914
|
+
set highlightCoordinator(m = null) {
|
|
3915
|
+
n(m), Ye();
|
|
3916
|
+
},
|
|
3917
|
+
get ttsService() {
|
|
3918
|
+
return i();
|
|
3919
|
+
},
|
|
3920
|
+
set ttsService(m = null) {
|
|
3921
|
+
i(m), Ye();
|
|
3922
|
+
}
|
|
3923
|
+
}, fn = El(), pn = So(fn);
|
|
3924
|
+
Dn(pn, (m) => _(u, m), () => g(u));
|
|
3925
|
+
var vn = Pt(pn, 2), lr = (m) => {
|
|
3926
|
+
var I = Cl(), C = Ue(I);
|
|
3927
|
+
xs(C, 17, () => l, ks, (rt, st) => {
|
|
3928
|
+
var J = kl(), De = Ue(J), To = Ue(De, !0);
|
|
3929
|
+
He(De), He(J), Ke(() => {
|
|
3930
|
+
Nn(J, `background-color: ${g(st).hex ?? ""};`), Vn(J, "aria-label", g(st).label), Vn(J, "title", g(st).label), Mn(To, g(st).label);
|
|
3931
|
+
}), Ie("click", J, () => dn(g(st).name)), Ot(rt, J);
|
|
3932
|
+
});
|
|
3933
|
+
var it = Pt(C, 2), Ht = Pt(it, 2), we = (rt) => {
|
|
3934
|
+
var st = Sl(), J = Pt(So(st), 2);
|
|
3935
|
+
Ke(() => J.disabled = g(y)), Ie("click", J, rr), Ot(rt, st);
|
|
3936
|
+
};
|
|
3937
|
+
ke(Ht, (rt) => {
|
|
3938
|
+
i() && rt(we);
|
|
3939
|
+
});
|
|
3940
|
+
var wo = Pt(Ht, 2), cr = (rt) => {
|
|
3941
|
+
var st = _l(), J = Pt(So(st), 2), De = (Bt) => {
|
|
3942
|
+
var Te = xl();
|
|
3943
|
+
Ie("click", Te, nr), Ot(Bt, Te);
|
|
3944
|
+
};
|
|
3945
|
+
ke(J, (Bt) => {
|
|
3946
|
+
g(O) && Bt(De);
|
|
3947
|
+
});
|
|
3948
|
+
var To = Pt(J, 2), ur = (Bt) => {
|
|
3949
|
+
var Te = Al();
|
|
3950
|
+
Ie("click", Te, ir), Ot(Bt, Te);
|
|
3951
|
+
};
|
|
3952
|
+
ke(To, (Bt) => {
|
|
3953
|
+
g(A) && Bt(ur);
|
|
3954
|
+
}), Ot(rt, st);
|
|
3955
|
+
};
|
|
3956
|
+
ke(wo, (rt) => {
|
|
3957
|
+
(g(O) || g(A)) && rt(cr);
|
|
3958
|
+
}), He(I), Dn(I, (rt) => _(d, rt), () => g(d)), Ke(() => Nn(I, `left:${g(v).toolbarPosition.x}px; top:${g(v).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Ie("click", it, () => dn(Rt.UNDERLINE)), Ot(m, I);
|
|
3959
|
+
};
|
|
3960
|
+
ke(vn, (m) => {
|
|
3961
|
+
g(v).isVisible && m(lr);
|
|
3962
|
+
});
|
|
3963
|
+
var gn = Pt(vn, 2), ar = Ue(gn, !0);
|
|
3964
|
+
return He(gn), Ke(() => Mn(ar, g(f))), Ot(t, fn), oi(sr);
|
|
3965
|
+
}
|
|
3966
|
+
vs(["click"]);
|
|
3967
|
+
customElements.define("pie-tool-annotation-toolbar", zs(Ll, {
|
|
3968
|
+
enabled: {
|
|
3969
|
+
attribute: "enabled",
|
|
3970
|
+
type: "Boolean"
|
|
3971
|
+
},
|
|
3972
|
+
highlightCoordinator: { type: "Object" },
|
|
3973
|
+
ttsService: { type: "Object" }
|
|
3974
|
+
}, [], [], { mode: "open" }));
|