@pie-players/pie-tool-text-to-speech 0.3.46 → 0.3.48
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/README.md +1 -1
- package/dist/tool-text-to-speech.js +743 -720
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as v } from "./defineProperty-Dt7ri80W.js";
|
|
2
|
-
var
|
|
2
|
+
var uc = Object.create, ea = Object.defineProperty, fc = Object.getOwnPropertyDescriptor, dc = Object.getOwnPropertyNames, hc = Object.getPrototypeOf, pc = Object.prototype.hasOwnProperty, og = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), gc = (e, t, r, n) => {
|
|
3
3
|
if (t && typeof t == "object" || typeof t == "function")
|
|
4
|
-
for (var i =
|
|
5
|
-
a = i[o], !
|
|
4
|
+
for (var i = dc(t), o = 0, s = i.length, a; o < s; o++)
|
|
5
|
+
a = i[o], !pc.call(e, a) && a !== r && ea(e, a, {
|
|
6
6
|
get: ((l) => t[l]).bind(null, a),
|
|
7
|
-
enumerable: !(n =
|
|
7
|
+
enumerable: !(n = fc(t, a)) || n.enumerable
|
|
8
8
|
});
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, mc = (e, t, r) => (r = e != null ? uc(hc(e)) : {}, gc(t || !e || !e.__esModule ? ea(r, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : r, e)),
|
|
13
|
+
}) : r, e)), sg = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
|
|
14
14
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
15
15
|
throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
16
16
|
});
|
|
@@ -19,9 +19,9 @@ if (typeof window < "u") {
|
|
|
19
19
|
((Yo = (Xo = window).__svelte ?? (Xo.__svelte = {})).v ?? (Yo.v = /* @__PURE__ */ new Set())).add("5");
|
|
20
20
|
}
|
|
21
21
|
var Ar = {}, Q = /* @__PURE__ */ Symbol("uninitialized");
|
|
22
|
-
var
|
|
22
|
+
var vc = Array.isArray, _c = Array.prototype.indexOf, $n = Array.prototype.includes, bc = Array.from, zn = Object.keys, Dn = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, yc = Object.getOwnPropertyDescriptors, Tc = Object.prototype, Sc = Array.prototype, ta = Object.getPrototypeOf, Ko = Object.isExtensible, wc = () => {
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function kc(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
26
26
|
}
|
|
27
27
|
function ra() {
|
|
@@ -34,55 +34,55 @@ function ra() {
|
|
|
34
34
|
reject: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var ag = 1 << 24, Ce = 1024, Le = 2048, ir = 4096, po = 8192, Ec = 16384, go = 32768, Jo = 1 << 25, mo = 65536, lg = 1 << 17, cg = 1 << 18, Lr = 1 << 19, xc = 1 << 20, cn = 65536, Zo = 1 << 21, Ac = 1 << 22, Hn = 1 << 23, rn = /* @__PURE__ */ Symbol("$state"), na = /* @__PURE__ */ Symbol("legacy props"), Mc = /* @__PURE__ */ Symbol(""), Cc = /* @__PURE__ */ Symbol("proxy path"), Ni = /* @__PURE__ */ Symbol("attributes"), $i = /* @__PURE__ */ Symbol("class"), zi = /* @__PURE__ */ Symbol("style"), Mn = /* @__PURE__ */ Symbol("text"), ia = /* @__PURE__ */ Symbol("form reset");
|
|
38
38
|
var Qn = new class extends Error {
|
|
39
39
|
constructor(...t) {
|
|
40
40
|
super(...t), v(this, "name", "StaleReactionError"), v(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
41
41
|
}
|
|
42
42
|
}(), oa = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
43
|
-
function
|
|
43
|
+
function Oc(e) {
|
|
44
44
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Ic() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Rc(e) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Lc() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Pc(e) {
|
|
56
56
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Nc() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function $c() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function zc(e) {
|
|
65
65
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Dc() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Hc() {
|
|
71
71
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Wc() {
|
|
74
74
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
75
75
|
}
|
|
76
76
|
function Fc() {
|
|
77
77
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Bc() {
|
|
80
80
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
81
81
|
}
|
|
82
82
|
function ei(e) {
|
|
83
83
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Uc() {
|
|
86
86
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
87
87
|
}
|
|
88
88
|
var D = !1;
|
|
@@ -124,7 +124,7 @@ function sa(e = !0) {
|
|
|
124
124
|
e && r.remove(), r = i;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function jc(e) {
|
|
128
128
|
if (!e || e.nodeType !== 8)
|
|
129
129
|
throw ei(), Ar;
|
|
130
130
|
return e.data;
|
|
@@ -132,18 +132,18 @@ function Uc(e) {
|
|
|
132
132
|
function aa(e) {
|
|
133
133
|
return e === this.v;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Gc(e, t) {
|
|
136
136
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
137
137
|
}
|
|
138
138
|
function la(e) {
|
|
139
|
-
return !
|
|
139
|
+
return !Gc(e, this.v);
|
|
140
140
|
}
|
|
141
141
|
var ut = !1, un = !1;
|
|
142
142
|
function Qo(e, t) {
|
|
143
|
-
return e.label = t,
|
|
143
|
+
return e.label = t, Vc(e.v, t), e;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return e?.[
|
|
145
|
+
function Vc(e, t) {
|
|
146
|
+
return e?.[Cc]?.(t), e;
|
|
147
147
|
}
|
|
148
148
|
var B = null;
|
|
149
149
|
function Mr(e) {
|
|
@@ -179,7 +179,7 @@ function fn() {
|
|
|
179
179
|
var Bt = [];
|
|
180
180
|
function fa() {
|
|
181
181
|
var e = Bt;
|
|
182
|
-
Bt = [],
|
|
182
|
+
Bt = [], kc(e);
|
|
183
183
|
}
|
|
184
184
|
function er(e) {
|
|
185
185
|
if (Bt.length === 0 && !nn) {
|
|
@@ -190,7 +190,7 @@ function er(e) {
|
|
|
190
190
|
}
|
|
191
191
|
Bt.push(e);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function qc() {
|
|
194
194
|
for (; Bt.length > 0; ) fa();
|
|
195
195
|
}
|
|
196
196
|
function da(e) {
|
|
@@ -216,9 +216,9 @@ function Mt(e, t) {
|
|
|
216
216
|
}
|
|
217
217
|
throw e;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
219
|
+
var Yc = ~(Le | ir | Ce);
|
|
220
220
|
function G(e, t) {
|
|
221
|
-
e.f = e.f &
|
|
221
|
+
e.f = e.f & Yc | t;
|
|
222
222
|
}
|
|
223
223
|
function _o(e) {
|
|
224
224
|
(e.f & 512) !== 0 || e.deps === null ? G(e, Ce) : G(e, ir);
|
|
@@ -231,8 +231,8 @@ function ha(e) {
|
|
|
231
231
|
function pa(e, t, r) {
|
|
232
232
|
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), ha(e.deps), G(e, Ce);
|
|
233
233
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
234
|
+
var Xc = !1, yn = !1;
|
|
235
|
+
function Kc(e) {
|
|
236
236
|
var t = yn;
|
|
237
237
|
try {
|
|
238
238
|
return yn = !1, [e(), yn];
|
|
@@ -259,10 +259,10 @@ function E(e, t, r) {
|
|
|
259
259
|
function h(e, t) {
|
|
260
260
|
return e.get(O(e, t));
|
|
261
261
|
}
|
|
262
|
-
var ma,
|
|
263
|
-
var
|
|
262
|
+
var ma, Wn = null, yr = null, R = null, Hi = null, fe = null, Wi = null, nn = !1, mi = !1, Cr = null, Fn = null, va = 0;
|
|
263
|
+
var Jc = 1, Bn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakSet(), or = class _a {
|
|
264
264
|
constructor() {
|
|
265
|
-
bo(this, V), v(this, "id",
|
|
265
|
+
bo(this, V), v(this, "id", Jc++), A(this, Bn, !1), v(this, "linked", !0), A(this, qt, null), A(this, Ut, null), v(this, "async_deriveds", /* @__PURE__ */ new Map()), v(this, "current", /* @__PURE__ */ new Map()), v(this, "previous", /* @__PURE__ */ new Map()), A(this, Un, /* @__PURE__ */ new Set()), A(this, Tn, /* @__PURE__ */ new Set()), A(this, Tr, 0), A(this, Ft, /* @__PURE__ */ new Map()), A(this, Kr, null), A(this, Ae, []), A(this, Fi, []), A(this, tr, /* @__PURE__ */ new Set()), A(this, ct, /* @__PURE__ */ new Set()), A(this, At, /* @__PURE__ */ new Map()), A(this, Cn, /* @__PURE__ */ new Set()), v(this, "is_fork", !1), A(this, Jr, !1), yr === null ? Wn = yr = this : (E(Ut, yr, this), E(qt, this, yr)), yr = this;
|
|
266
266
|
}
|
|
267
267
|
skip_effect(t) {
|
|
268
268
|
h(At, this).has(t) || h(At, this).set(t, {
|
|
@@ -294,7 +294,7 @@ var Kc = 1, Bn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
294
294
|
try {
|
|
295
295
|
mi = !0, R = this, O(V, this, jn).call(this);
|
|
296
296
|
} finally {
|
|
297
|
-
va = 0,
|
|
297
|
+
va = 0, Wi = null, Cr = null, Fn = null, mi = !1, R = null, fe = null, Kt.clear();
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
discard() {
|
|
@@ -302,18 +302,18 @@ var Kc = 1, Bn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
302
302
|
h(Tn, this).clear(), O(V, this, Gn).call(this), h(Kr, this)?.resolve();
|
|
303
303
|
}
|
|
304
304
|
register_created_effect(t) {
|
|
305
|
-
h(
|
|
305
|
+
h(Fi, this).push(t);
|
|
306
306
|
}
|
|
307
307
|
increment(t, r) {
|
|
308
308
|
if (E(Tr, this, h(Tr, this) + 1), t) {
|
|
309
|
-
let n = h(
|
|
310
|
-
h(
|
|
309
|
+
let n = h(Ft, this).get(r) ?? 0;
|
|
310
|
+
h(Ft, this).set(r, n + 1);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
decrement(t, r) {
|
|
314
314
|
if (E(Tr, this, h(Tr, this) - 1), t) {
|
|
315
|
-
let n = h(
|
|
316
|
-
n === 1 ? h(
|
|
315
|
+
let n = h(Ft, this).get(r) ?? 0;
|
|
316
|
+
n === 1 ? h(Ft, this).delete(r) : h(Ft, this).set(r, n - 1);
|
|
317
317
|
}
|
|
318
318
|
h(Jr, this) || (E(Jr, this, !0), er(() => {
|
|
319
319
|
E(Jr, this, !1), this.linked && this.flush();
|
|
@@ -349,7 +349,7 @@ var Kc = 1, Bn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
349
349
|
}
|
|
350
350
|
fe = /* @__PURE__ */ new Map();
|
|
351
351
|
for (const [r, [n]] of this.current) fe.set(r, n);
|
|
352
|
-
for (let r =
|
|
352
|
+
for (let r = Wn; r !== null; r = h(Ut, r))
|
|
353
353
|
if (!(r === this || r.is_fork)) {
|
|
354
354
|
var t = !1;
|
|
355
355
|
if (r.id < this.id) {
|
|
@@ -364,14 +364,14 @@ var Kc = 1, Bn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
schedule(t) {
|
|
367
|
-
if (
|
|
367
|
+
if (Wi = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
|
|
368
368
|
t.b.defer_effect(t);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
371
|
for (var r = t; r.parent !== null; ) {
|
|
372
372
|
r = r.parent;
|
|
373
373
|
var n = r.f;
|
|
374
|
-
if (Cr !== null && r === M && (ut || (L === null || (L.f & 2) === 0) && !
|
|
374
|
+
if (Cr !== null && r === M && (ut || (L === null || (L.f & 2) === 0) && !Xc))
|
|
375
375
|
return;
|
|
376
376
|
if ((n & 96) !== 0) {
|
|
377
377
|
if ((n & 1024) === 0) return;
|
|
@@ -384,7 +384,7 @@ var Kc = 1, Bn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
384
384
|
ma = or;
|
|
385
385
|
function es() {
|
|
386
386
|
if (this.is_fork) return !0;
|
|
387
|
-
for (const r of h(
|
|
387
|
+
for (const r of h(Ft, this).keys()) {
|
|
388
388
|
for (var e = r, t = !1; e.parent !== null; ) {
|
|
389
389
|
if (h(At, this).has(e)) {
|
|
390
390
|
t = !0;
|
|
@@ -397,14 +397,14 @@ function es() {
|
|
|
397
397
|
return !1;
|
|
398
398
|
}
|
|
399
399
|
function jn() {
|
|
400
|
-
E(Bn, this, !0), va++ > 1e3 && (O(V, this, Gn).call(this),
|
|
400
|
+
E(Bn, this, !0), va++ > 1e3 && (O(V, this, Gn).call(this), tu());
|
|
401
401
|
for (const a of h(tr, this))
|
|
402
402
|
h(ct, this).delete(a), G(a, Le), this.schedule(a);
|
|
403
403
|
for (const a of h(ct, this))
|
|
404
404
|
G(a, ir), this.schedule(a);
|
|
405
405
|
const e = h(Ae, this);
|
|
406
406
|
E(Ae, this, []), this.apply();
|
|
407
|
-
var t = Cr = [], r = [], n =
|
|
407
|
+
var t = Cr = [], r = [], n = Fn = [];
|
|
408
408
|
for (const a of e) try {
|
|
409
409
|
O(V, this, ba).call(this, a, t, r);
|
|
410
410
|
} catch (l) {
|
|
@@ -414,22 +414,22 @@ function jn() {
|
|
|
414
414
|
var i = ma.ensure();
|
|
415
415
|
for (const a of n) i.schedule(a);
|
|
416
416
|
}
|
|
417
|
-
if (Cr = null,
|
|
417
|
+
if (Cr = null, Fn = null, O(V, this, es).call(this)) {
|
|
418
418
|
O(V, this, Zr).call(this, r), O(V, this, Zr).call(this, t);
|
|
419
419
|
for (const [a, l] of h(At, this)) Ta(a, l);
|
|
420
420
|
n.length > 0 && O(V, R, jn).call(R);
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
const o = O(V, this,
|
|
423
|
+
const o = O(V, this, Zc).call(this);
|
|
424
424
|
if (o) {
|
|
425
|
-
O(V, this, Zr).call(this, r), O(V, this, Zr).call(this, t), O(V, o,
|
|
425
|
+
O(V, this, Zr).call(this, r), O(V, this, Zr).call(this, t), O(V, o, Qc).call(o, this);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
428
|
h(tr, this).clear(), h(ct, this).clear();
|
|
429
429
|
for (const a of h(Un, this)) a(this);
|
|
430
430
|
h(Un, this).clear(), Hi = this, ts(r), ts(t), Hi = null, h(Kr, this)?.resolve();
|
|
431
431
|
var s = R;
|
|
432
|
-
if (h(Tr, this) === 0 && (h(Ae, this).length === 0 || s !== null) && (O(V, this, Gn).call(this), ut && (O(V, this,
|
|
432
|
+
if (h(Tr, this) === 0 && (h(Ae, this).length === 0 || s !== null) && (O(V, this, Gn).call(this), ut && (O(V, this, eu).call(this), R = s)), h(Ae, this).length > 0) if (s !== null) {
|
|
433
433
|
const a = s;
|
|
434
434
|
h(Ae, a).push(...h(Ae, this).filter((l) => !h(Ae, a).includes(l)));
|
|
435
435
|
} else s = this;
|
|
@@ -457,7 +457,7 @@ function ba(e, t, r) {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Zc() {
|
|
461
461
|
for (var e = h(qt, this); e !== null; ) {
|
|
462
462
|
if (!e.is_fork) {
|
|
463
463
|
for (const [t, [, r]] of this.current) if (e.current.has(t) && !r) return e;
|
|
@@ -466,7 +466,7 @@ function Jc() {
|
|
|
466
466
|
}
|
|
467
467
|
return null;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Qc(e) {
|
|
470
470
|
for (const [r, n] of e.current)
|
|
471
471
|
!this.previous.has(r) && e.previous.has(r) && this.previous.set(r, e.previous.get(r)), this.current.set(r, n);
|
|
472
472
|
for (const [r, n] of e.async_deriveds) {
|
|
@@ -492,8 +492,8 @@ function Zc(e) {
|
|
|
492
492
|
function Zr(e) {
|
|
493
493
|
for (var t = 0; t < e.length; t += 1) pa(e[t], h(tr, this), h(ct, this));
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
for (let c =
|
|
495
|
+
function eu() {
|
|
496
|
+
for (let c = Wn; c !== null; c = h(Ut, c)) {
|
|
497
497
|
var e = c.id < this.id, t = [];
|
|
498
498
|
for (const [u, [d, p]] of this.current) {
|
|
499
499
|
if (c.current.has(u)) {
|
|
@@ -524,7 +524,7 @@ function Qc() {
|
|
|
524
524
|
return p ? p[0] !== d[0] || p[1] !== d[1] : !0;
|
|
525
525
|
}).map(([u]) => u);
|
|
526
526
|
if (a.length > 0)
|
|
527
|
-
for (const u of h(
|
|
527
|
+
for (const u of h(Fi, this)) (u.f & 155648) === 0 && yo(u, a, o) && ((u.f & 4194320) !== 0 ? (G(u, Le), c.schedule(u)) : h(tr, c).add(u));
|
|
528
528
|
if (h(Ae, c).length > 0 && !h(Jr, c)) {
|
|
529
529
|
c.apply();
|
|
530
530
|
for (var l of h(Ae, c)) O(V, c, ba).call(c, l, [], []);
|
|
@@ -538,7 +538,7 @@ function Qc() {
|
|
|
538
538
|
function Gn() {
|
|
539
539
|
if (this.linked) {
|
|
540
540
|
var e = h(qt, this), t = h(Ut, this);
|
|
541
|
-
e === null ?
|
|
541
|
+
e === null ? Wn = t : E(Ut, e, t), t === null ? yr = e : E(qt, t, e), this.linked = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
function Qr(e) {
|
|
@@ -547,23 +547,23 @@ function Qr(e) {
|
|
|
547
547
|
try {
|
|
548
548
|
var r;
|
|
549
549
|
for (e && (R !== null && !R.is_fork && R.flush(), r = e()); ; ) {
|
|
550
|
-
if (
|
|
550
|
+
if (qc(), R === null) return r;
|
|
551
551
|
R.flush();
|
|
552
552
|
}
|
|
553
553
|
} finally {
|
|
554
554
|
nn = t;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function tu() {
|
|
558
558
|
if (0) {
|
|
559
559
|
var e;
|
|
560
560
|
for (const r of R.current.keys()) for (const [n, i] of r.updated ?? [])
|
|
561
561
|
var t;
|
|
562
562
|
}
|
|
563
563
|
try {
|
|
564
|
-
|
|
564
|
+
Nc();
|
|
565
565
|
} catch (r) {
|
|
566
|
-
Mt(r,
|
|
566
|
+
Mt(r, Wi);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
var qe = null;
|
|
@@ -623,7 +623,7 @@ function Sa(e) {
|
|
|
623
623
|
for (var t = e.first; t !== null; )
|
|
624
624
|
Sa(t), t = t.next;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function ru(e) {
|
|
627
627
|
let t = 0, r = dn(0), n;
|
|
628
628
|
return () => {
|
|
629
629
|
Eo() && (y(r), xo(() => (t === 0 && (n = ri(() => e(() => on(r)))), t += 1, () => {
|
|
@@ -633,15 +633,15 @@ function tu(e) {
|
|
|
633
633
|
})));
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
var
|
|
637
|
-
function
|
|
638
|
-
new
|
|
636
|
+
var nu = mo | Lr;
|
|
637
|
+
function iu(e, t, r, n) {
|
|
638
|
+
new ou(e, t, r, n);
|
|
639
639
|
}
|
|
640
|
-
var
|
|
640
|
+
var We = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), rs = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakSet(), ou = class {
|
|
641
641
|
constructor(e, t, r, n) {
|
|
642
|
-
bo(this, ae), v(this, "parent", void 0), v(this, "is_pending", !1), v(this, "transform_error", void 0), A(this,
|
|
642
|
+
bo(this, ae), v(this, "parent", void 0), v(this, "is_pending", !1), v(this, "transform_error", void 0), A(this, We, void 0), A(this, Bi, D ? $ : null), A(this, Ye, void 0), A(this, sn, void 0), A(this, Me, void 0), A(this, Xe, null), A(this, _e, null), A(this, De, null), A(this, Yt, null), A(this, Sr, 0), A(this, Xt, 0), A(this, Sn, !1), A(this, Ui, /* @__PURE__ */ new Set()), A(this, ji, /* @__PURE__ */ new Set()), A(this, Ht, null), A(this, rs, ru(() => (E(Ht, this, dn(h(Sr, this))), () => {
|
|
643
643
|
E(Ht, this, null);
|
|
644
|
-
}))), E(
|
|
644
|
+
}))), E(We, this, e), E(Ye, this, t), E(sn, this, (i) => {
|
|
645
645
|
var o = M;
|
|
646
646
|
o.b = this, o.f |= 128, r(i);
|
|
647
647
|
}), this.parent = M.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), E(Me, this, za(() => {
|
|
@@ -651,10 +651,10 @@ var Fe = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Ye =
|
|
|
651
651
|
const o = i.data === "[!";
|
|
652
652
|
if (i.data.startsWith("[?")) {
|
|
653
653
|
const s = JSON.parse(i.data.slice(2));
|
|
654
|
-
O(ae, this,
|
|
655
|
-
} else o ? O(ae, this,
|
|
654
|
+
O(ae, this, au).call(this, s);
|
|
655
|
+
} else o ? O(ae, this, lu).call(this) : O(ae, this, su).call(this);
|
|
656
656
|
} else O(ae, this, wa).call(this);
|
|
657
|
-
},
|
|
657
|
+
}, nu)), D && E(We, this, $);
|
|
658
658
|
}
|
|
659
659
|
defer_effect(e) {
|
|
660
660
|
pa(e, h(Ui, this), h(ji, this));
|
|
@@ -680,25 +680,25 @@ var Fe = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Ye =
|
|
|
680
680
|
})) : O(ae, this, ns).call(this, e);
|
|
681
681
|
}
|
|
682
682
|
};
|
|
683
|
-
function
|
|
683
|
+
function su() {
|
|
684
684
|
try {
|
|
685
|
-
E(Xe, this, ft(() => h(sn, this).call(this, h(
|
|
685
|
+
E(Xe, this, ft(() => h(sn, this).call(this, h(We, this))));
|
|
686
686
|
} catch (e) {
|
|
687
687
|
this.error(e);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function au(e) {
|
|
691
691
|
const t = h(Ye, this).failed;
|
|
692
692
|
t && E(De, this, ft(() => {
|
|
693
|
-
t(h(
|
|
693
|
+
t(h(We, this), () => e, () => () => {
|
|
694
694
|
});
|
|
695
695
|
}));
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function lu() {
|
|
698
698
|
const e = h(Ye, this).pending;
|
|
699
|
-
e && (this.is_pending = !0, E(_e, this, ft(() => e(h(
|
|
699
|
+
e && (this.is_pending = !0, E(_e, this, ft(() => e(h(We, this)))), er(() => {
|
|
700
700
|
var t = E(Yt, this, document.createDocumentFragment()), r = Be();
|
|
701
|
-
t.append(r), E(Xe, this, O(ae, this, Gi).call(this, () => ft(() => h(sn, this).call(this, r)))), h(Xt, this) === 0 && (h(
|
|
701
|
+
t.append(r), E(Xe, this, O(ae, this, Gi).call(this, () => ft(() => h(sn, this).call(this, r)))), h(Xt, this) === 0 && (h(We, this).before(t), E(Yt, this, null), hn(h(_e, this), () => {
|
|
702
702
|
E(_e, this, null);
|
|
703
703
|
}), O(ae, this, So).call(this, R));
|
|
704
704
|
}));
|
|
@@ -706,12 +706,12 @@ function au() {
|
|
|
706
706
|
function wa() {
|
|
707
707
|
try {
|
|
708
708
|
if (this.is_pending = this.has_pending_snippet(), E(Xt, this, 0), E(Sr, this, 0), E(Xe, this, ft(() => {
|
|
709
|
-
h(sn, this).call(this, h(
|
|
709
|
+
h(sn, this).call(this, h(We, this));
|
|
710
710
|
})), h(Xt, this) > 0) {
|
|
711
711
|
var e = E(Yt, this, document.createDocumentFragment());
|
|
712
712
|
Ba(h(Xe, this), e);
|
|
713
713
|
const t = h(Ye, this).pending;
|
|
714
|
-
E(_e, this, ft(() => t(h(
|
|
714
|
+
E(_e, this, ft(() => t(h(We, this))));
|
|
715
715
|
} else O(ae, this, So).call(this, R);
|
|
716
716
|
} catch (t) {
|
|
717
717
|
this.error(t);
|
|
@@ -741,7 +741,7 @@ function ka(e, t) {
|
|
|
741
741
|
}
|
|
742
742
|
E(Xt, this, h(Xt, this) + e), h(Xt, this) === 0 && (O(ae, this, So).call(this, t), h(_e, this) && hn(h(_e, this), () => {
|
|
743
743
|
E(_e, this, null);
|
|
744
|
-
}), h(Yt, this) && (h(
|
|
744
|
+
}), h(Yt, this) && (h(We, this).before(h(Yt, this)), E(Yt, this, null)));
|
|
745
745
|
}
|
|
746
746
|
function ns(e) {
|
|
747
747
|
h(Xe, this) && (ge(h(Xe, this)), E(Xe, this, null)), h(_e, this) && (ge(h(_e, this)), E(_e, this, null)), h(De, this) && (ge(h(De, this)), E(De, this, null)), D && (Oe(h(Bi, this)), Di(), Oe(sa()));
|
|
@@ -750,7 +750,7 @@ function ns(e) {
|
|
|
750
750
|
var n = !1, i = !1;
|
|
751
751
|
const o = () => {
|
|
752
752
|
if (n) {
|
|
753
|
-
|
|
753
|
+
Uc();
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
756
|
n = !0, i && Fc(), h(De, this) !== null && hn(h(De, this), () => {
|
|
@@ -768,7 +768,7 @@ function ns(e) {
|
|
|
768
768
|
try {
|
|
769
769
|
return ft(() => {
|
|
770
770
|
var l = M;
|
|
771
|
-
l.b = this, l.f |= 128, r(h(
|
|
771
|
+
l.b = this, l.f |= 128, r(h(We, this), () => a, () => o);
|
|
772
772
|
});
|
|
773
773
|
} catch (l) {
|
|
774
774
|
return Mt(l, h(Me, this).parent), null;
|
|
@@ -786,14 +786,14 @@ function ns(e) {
|
|
|
786
786
|
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => Mt(l, h(Me, this) && h(Me, this).parent)) : s(a);
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function cu(e, t, r, n) {
|
|
790
790
|
const i = fn() ? an : xa;
|
|
791
791
|
var o = e.filter((p) => !p.settled);
|
|
792
792
|
if (r.length === 0 && o.length === 0) {
|
|
793
793
|
n(t.map(i));
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
var s = M, a =
|
|
796
|
+
var s = M, a = uu(), l = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((p) => p.promise)) : null;
|
|
797
797
|
function c(p) {
|
|
798
798
|
if ((s.f & 16384) === 0) {
|
|
799
799
|
a();
|
|
@@ -811,13 +811,13 @@ function lu(e, t, r, n) {
|
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
813
|
function d() {
|
|
814
|
-
Promise.all(r.map((p) => /* @__PURE__ */
|
|
814
|
+
Promise.all(r.map((p) => /* @__PURE__ */ fu(p))).then((p) => c([...t.map(i), ...p])).catch((p) => Mt(p, s)).finally(u);
|
|
815
815
|
}
|
|
816
816
|
l ? l.then(() => {
|
|
817
817
|
a(), d(), Vn();
|
|
818
818
|
}) : d();
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function uu() {
|
|
821
821
|
var e = M, t = L, r = B, n = R;
|
|
822
822
|
if (0) var i;
|
|
823
823
|
return function(s = !0) {
|
|
@@ -853,11 +853,11 @@ function an(e) {
|
|
|
853
853
|
}
|
|
854
854
|
var wn = /* @__PURE__ */ Symbol("obsolete");
|
|
855
855
|
// @__NO_SIDE_EFFECTS__
|
|
856
|
-
function
|
|
856
|
+
function fu(e, t, r) {
|
|
857
857
|
let n = M;
|
|
858
|
-
n === null &&
|
|
858
|
+
n === null && Ic();
|
|
859
859
|
var i = void 0, o = dn(Q), s = !L, a = /* @__PURE__ */ new Set();
|
|
860
|
-
return
|
|
860
|
+
return Mu(() => {
|
|
861
861
|
var l = M, c = ra();
|
|
862
862
|
i = c.promise;
|
|
863
863
|
try {
|
|
@@ -878,7 +878,7 @@ function uu(e, t, r) {
|
|
|
878
878
|
d?.(), a.delete(c), m !== wn && (u.activate(), m ? (o.f |= Hn, Yn(o, m)) : ((o.f & 8388608) !== 0 && (o.f ^= Hn), Yn(o, g)), u.deactivate());
|
|
879
879
|
};
|
|
880
880
|
c.promise.then(p, (g) => p(null, g || "unknown"));
|
|
881
|
-
}),
|
|
881
|
+
}), Eu(() => {
|
|
882
882
|
for (const l of a) l.reject(wn);
|
|
883
883
|
}), new Promise((l) => {
|
|
884
884
|
function c(u) {
|
|
@@ -891,7 +891,7 @@ function uu(e, t, r) {
|
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
// @__NO_SIDE_EFFECTS__
|
|
894
|
-
function
|
|
894
|
+
function du(e) {
|
|
895
895
|
const t = /* @__PURE__ */ an(e);
|
|
896
896
|
return ut || Ua(t), t;
|
|
897
897
|
}
|
|
@@ -900,7 +900,7 @@ function xa(e) {
|
|
|
900
900
|
const t = /* @__PURE__ */ an(e);
|
|
901
901
|
return t.equals = la, t;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function hu(e) {
|
|
904
904
|
var t = e.effects;
|
|
905
905
|
if (t !== null) {
|
|
906
906
|
e.effects = null;
|
|
@@ -910,10 +910,10 @@ function du(e) {
|
|
|
910
910
|
function wo(e) {
|
|
911
911
|
var t, r = M, n = e.parent;
|
|
912
912
|
if (!dt && n !== null && e.v !== Q && (n.f & 24576) !== 0)
|
|
913
|
-
return
|
|
913
|
+
return Bc(), e.v;
|
|
914
914
|
Ke(n);
|
|
915
915
|
try {
|
|
916
|
-
e.f &= ~cn,
|
|
916
|
+
e.f &= ~cn, hu(e), t = qa(e);
|
|
917
917
|
} finally {
|
|
918
918
|
Ke(r);
|
|
919
919
|
}
|
|
@@ -927,9 +927,9 @@ function Aa(e) {
|
|
|
927
927
|
}
|
|
928
928
|
dt || (fe !== null ? (Eo() || R?.is_fork) && fe.set(e, t) : _o(e));
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function pu(e) {
|
|
931
931
|
if (e.effects !== null)
|
|
932
|
-
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Qn), t.fn !== null && (t.teardown =
|
|
932
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Qn), t.fn !== null && (t.teardown = wc), t.ac = null, ln(t, 0), Ao(t));
|
|
933
933
|
}
|
|
934
934
|
function Ma(e) {
|
|
935
935
|
if (e.effects !== null)
|
|
@@ -954,7 +954,7 @@ function q(e, t) {
|
|
|
954
954
|
return Ua(r), r;
|
|
955
955
|
}
|
|
956
956
|
// @__NO_SIDE_EFFECTS__
|
|
957
|
-
function
|
|
957
|
+
function gu(e, t = !1, r = !0) {
|
|
958
958
|
const n = dn(e);
|
|
959
959
|
if (t || (n.equals = la), un && r && B !== null && B.l !== null) {
|
|
960
960
|
var i;
|
|
@@ -963,9 +963,9 @@ function pu(e, t = !1, r = !0) {
|
|
|
963
963
|
return n;
|
|
964
964
|
}
|
|
965
965
|
function P(e, t, r = !1) {
|
|
966
|
-
L !== null && (!He || (L.f & 131072) !== 0) && fn() && (L.f & 4325394) !== 0 && (
|
|
966
|
+
L !== null && (!He || (L.f & 131072) !== 0) && fn() && (L.f & 4325394) !== 0 && (Fe === null || !Fe.has(e)) && Wc();
|
|
967
967
|
let n = r ? Ct(t) : t;
|
|
968
|
-
return Yn(e, n,
|
|
968
|
+
return Yn(e, n, Fn);
|
|
969
969
|
}
|
|
970
970
|
function Yn(e, t, r = null) {
|
|
971
971
|
if (!e.equals(t)) {
|
|
@@ -975,11 +975,11 @@ function Yn(e, t, r = null) {
|
|
|
975
975
|
const i = e;
|
|
976
976
|
(e.f & 2048) !== 0 && wo(i), fe === null && _o(i);
|
|
977
977
|
}
|
|
978
|
-
e.wv = Ga(), Oa(e, Le, r), fn() && M !== null && (M.f & 1024) !== 0 && (M.f & 96) === 0 && (xe === null ?
|
|
978
|
+
e.wv = Ga(), Oa(e, Le, r), fn() && M !== null && (M.f & 1024) !== 0 && (M.f & 96) === 0 && (xe === null ? Ru([e]) : xe.push(e)), !n.is_fork && qn.size > 0 && !Ca && mu();
|
|
979
979
|
}
|
|
980
980
|
return t;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function mu() {
|
|
983
983
|
Ca = !1;
|
|
984
984
|
for (const e of qn) {
|
|
985
985
|
(e.f & 1024) !== 0 && G(e, ir);
|
|
@@ -1014,12 +1014,12 @@ function Oa(e, t, r) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
var
|
|
1017
|
+
var vu = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
1018
1018
|
function Ct(e) {
|
|
1019
1019
|
if (typeof e != "object" || e === null || rn in e) return e;
|
|
1020
1020
|
const t = ta(e);
|
|
1021
|
-
if (t !==
|
|
1022
|
-
var r = /* @__PURE__ */ new Map(), n =
|
|
1021
|
+
if (t !== Tc && t !== Sc) return e;
|
|
1022
|
+
var r = /* @__PURE__ */ new Map(), n = vc(e), i = /* @__PURE__ */ q(0), o = null, s = Jt, a = (d) => {
|
|
1023
1023
|
if (Jt === s) return d();
|
|
1024
1024
|
var p = L, g = Jt;
|
|
1025
1025
|
Ie(null), cs(s);
|
|
@@ -1032,13 +1032,13 @@ function Ct(e) {
|
|
|
1032
1032
|
function u(d) {
|
|
1033
1033
|
if (!c) {
|
|
1034
1034
|
c = !0, l = d, Qo(i, `${l} version`);
|
|
1035
|
-
for (const [p, g] of r) Qo(g,
|
|
1035
|
+
for (const [p, g] of r) Qo(g, _u(l, p));
|
|
1036
1036
|
c = !1;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
return new Proxy(e, {
|
|
1040
1040
|
defineProperty(d, p, g) {
|
|
1041
|
-
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) &&
|
|
1041
|
+
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && Dc();
|
|
1042
1042
|
var m = r.get(p);
|
|
1043
1043
|
return m === void 0 ? a(() => {
|
|
1044
1044
|
var b = /* @__PURE__ */ q(g.value, o);
|
|
@@ -1125,17 +1125,17 @@ function Ct(e) {
|
|
|
1125
1125
|
return p;
|
|
1126
1126
|
},
|
|
1127
1127
|
setPrototypeOf() {
|
|
1128
|
-
|
|
1128
|
+
Hc();
|
|
1129
1129
|
}
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1133
|
-
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` :
|
|
1132
|
+
function _u(e, t) {
|
|
1133
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : vu.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1134
1134
|
}
|
|
1135
|
-
var is,
|
|
1135
|
+
var is, bu, Ia, Ra, La;
|
|
1136
1136
|
function Vi() {
|
|
1137
1137
|
if (is === void 0) {
|
|
1138
|
-
is = window,
|
|
1138
|
+
is = window, bu = document, Ia = /Firefox/.test(navigator.userAgent);
|
|
1139
1139
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1140
1140
|
Ra = Vt(t, "firstChild").get, La = Vt(t, "nextSibling").get, Ko(e) && (e[$i] = void 0, e[Ni] = null, e[zi] = void 0, e.__e = void 0), Ko(r) && (r[Mn] = void 0);
|
|
1141
1141
|
}
|
|
@@ -1189,10 +1189,10 @@ function ke(e, t = 1, r = !1) {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
return Oe(n), n;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function yu(e) {
|
|
1193
1193
|
e.textContent = "";
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Tu() {
|
|
1196
1196
|
return !ut || qe !== null ? !1 : (M.f & go) !== 0;
|
|
1197
1197
|
}
|
|
1198
1198
|
function ko(e, t, r) {
|
|
@@ -1205,7 +1205,7 @@ function ti(e) {
|
|
|
1205
1205
|
t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
|
|
1206
1206
|
}
|
|
1207
1207
|
var ss = !1;
|
|
1208
|
-
function
|
|
1208
|
+
function Su() {
|
|
1209
1209
|
ss || (ss = !0, document.addEventListener("reset", (e) => {
|
|
1210
1210
|
Promise.resolve().then(() => {
|
|
1211
1211
|
if (!e.defaultPrevented) for (const t of e.target.elements) t[ia]?.();
|
|
@@ -1221,10 +1221,10 @@ function Pa(e) {
|
|
|
1221
1221
|
Ie(t), Ke(r);
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1225
|
-
M === null && (L === null &&
|
|
1224
|
+
function wu(e) {
|
|
1225
|
+
M === null && (L === null && Pc(e), Lc()), dt && Rc(e);
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function ku(e, t) {
|
|
1228
1228
|
var r = t.last;
|
|
1229
1229
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1230
1230
|
}
|
|
@@ -1258,7 +1258,7 @@ function Je(e, t) {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= mo));
|
|
1260
1260
|
}
|
|
1261
|
-
if (i !== null && (i.parent = r, r !== null &&
|
|
1261
|
+
if (i !== null && (i.parent = r, r !== null && ku(i, r), L !== null && (L.f & 2) !== 0 && (e & 64) === 0)) {
|
|
1262
1262
|
var o = L;
|
|
1263
1263
|
(o.effects ?? (o.effects = [])).push(i);
|
|
1264
1264
|
}
|
|
@@ -1267,12 +1267,12 @@ function Je(e, t) {
|
|
|
1267
1267
|
function Eo() {
|
|
1268
1268
|
return L !== null && !He;
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function Eu(e) {
|
|
1271
1271
|
const t = Je(8, null);
|
|
1272
1272
|
return G(t, Ce), t.teardown = e, t;
|
|
1273
1273
|
}
|
|
1274
1274
|
function On(e) {
|
|
1275
|
-
|
|
1275
|
+
wu("$effect");
|
|
1276
1276
|
var t = M.f;
|
|
1277
1277
|
if (!L && (t & 32) !== 0 && B !== null && !B.i) {
|
|
1278
1278
|
var r = B;
|
|
@@ -1280,16 +1280,16 @@ function On(e) {
|
|
|
1280
1280
|
} else return Na(e);
|
|
1281
1281
|
}
|
|
1282
1282
|
function Na(e) {
|
|
1283
|
-
return Je(4 |
|
|
1283
|
+
return Je(4 | xc, e);
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function xu(e) {
|
|
1286
1286
|
or.ensure();
|
|
1287
1287
|
const t = Je(64 | Lr, e);
|
|
1288
1288
|
return () => {
|
|
1289
1289
|
ge(t);
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Au(e) {
|
|
1293
1293
|
or.ensure();
|
|
1294
1294
|
const t = Je(64 | Lr, e);
|
|
1295
1295
|
return (r = {}) => new Promise((n) => {
|
|
@@ -1301,14 +1301,14 @@ function xu(e) {
|
|
|
1301
1301
|
function $a(e) {
|
|
1302
1302
|
return Je(4, e);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return Je(
|
|
1304
|
+
function Mu(e) {
|
|
1305
|
+
return Je(Ac | Lr, e);
|
|
1306
1306
|
}
|
|
1307
1307
|
function xo(e, t = 0) {
|
|
1308
1308
|
return Je(8 | t, e);
|
|
1309
1309
|
}
|
|
1310
1310
|
function Br(e, t = [], r = [], n = []) {
|
|
1311
|
-
|
|
1311
|
+
cu(n, t, r, (i) => {
|
|
1312
1312
|
Je(8, () => e(...i.map(y)));
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
@@ -1342,7 +1342,7 @@ function Ao(e, t = !1) {
|
|
|
1342
1342
|
(r.f & 64) !== 0 ? r.parent = null : ge(r, t), r = n;
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function Cu(e) {
|
|
1346
1346
|
for (var t = e.first; t !== null; ) {
|
|
1347
1347
|
var r = t.next;
|
|
1348
1348
|
(t.f & 32) === 0 && ge(t), t = r;
|
|
@@ -1350,14 +1350,14 @@ function Mu(e) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
function ge(e, t = !0) {
|
|
1352
1352
|
var r = !1;
|
|
1353
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (
|
|
1353
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Ou(e.nodes.start, e.nodes.end), r = !0), G(e, Jo), Ao(e, t && !r), ln(e, 0);
|
|
1354
1354
|
var n = e.nodes && e.nodes.t;
|
|
1355
1355
|
if (n !== null) for (const o of n) o.stop();
|
|
1356
|
-
Da(e), e.f ^= Jo, e.f |=
|
|
1356
|
+
Da(e), e.f ^= Jo, e.f |= Ec;
|
|
1357
1357
|
var i = e.parent;
|
|
1358
1358
|
i !== null && i.first !== null && Ha(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function Ou(e, t) {
|
|
1361
1361
|
for (; e !== null; ) {
|
|
1362
1362
|
var r = e === t ? null : /* @__PURE__ */ gt(e);
|
|
1363
1363
|
e.remove(), e = r;
|
|
@@ -1369,7 +1369,7 @@ function Ha(e) {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
function hn(e, t, r = !0) {
|
|
1371
1371
|
var n = [];
|
|
1372
|
-
|
|
1372
|
+
Wa(e, n, !0);
|
|
1373
1373
|
var i = () => {
|
|
1374
1374
|
r && ge(e), t && t();
|
|
1375
1375
|
}, o = n.length;
|
|
@@ -1378,7 +1378,7 @@ function hn(e, t, r = !0) {
|
|
|
1378
1378
|
for (var a of n) a.out(s);
|
|
1379
1379
|
} else i();
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Wa(e, t, r) {
|
|
1382
1382
|
if ((e.f & 8192) === 0) {
|
|
1383
1383
|
e.f ^= po;
|
|
1384
1384
|
var n = e.nodes && e.nodes.t;
|
|
@@ -1388,21 +1388,21 @@ function Fa(e, t, r) {
|
|
|
1388
1388
|
var o = i.next;
|
|
1389
1389
|
if ((i.f & 64) === 0) {
|
|
1390
1390
|
var s = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
|
|
1391
|
-
|
|
1391
|
+
Wa(i, t, s ? r : !1);
|
|
1392
1392
|
}
|
|
1393
1393
|
i = o;
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
function as(e) {
|
|
1398
|
-
|
|
1398
|
+
Fa(e, !0);
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Fa(e, t) {
|
|
1401
1401
|
if ((e.f & 8192) !== 0) {
|
|
1402
1402
|
e.f ^= po, (e.f & 1024) === 0 && (G(e, Le), or.ensure().schedule(e));
|
|
1403
1403
|
for (var r = e.first; r !== null; ) {
|
|
1404
1404
|
var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
|
|
1405
|
-
|
|
1405
|
+
Fa(r, i ? t : !1), r = n;
|
|
1406
1406
|
}
|
|
1407
1407
|
var o = e.nodes && e.nodes.t;
|
|
1408
1408
|
if (o !== null)
|
|
@@ -1416,7 +1416,7 @@ function Ba(e, t) {
|
|
|
1416
1416
|
t.append(r), r = i;
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
var
|
|
1419
|
+
var Iu = null, In = !1, dt = !1;
|
|
1420
1420
|
function ls(e) {
|
|
1421
1421
|
dt = e;
|
|
1422
1422
|
}
|
|
@@ -1428,12 +1428,12 @@ var M = null;
|
|
|
1428
1428
|
function Ke(e) {
|
|
1429
1429
|
M = e;
|
|
1430
1430
|
}
|
|
1431
|
-
var
|
|
1431
|
+
var Fe = null;
|
|
1432
1432
|
function Ua(e) {
|
|
1433
|
-
L !== null && (!ut || (L.f & 2) !== 0) && (
|
|
1433
|
+
L !== null && (!ut || (L.f & 2) !== 0) && (Fe ?? (Fe = /* @__PURE__ */ new Set())).add(e);
|
|
1434
1434
|
}
|
|
1435
1435
|
var pe = null, ve = 0, xe = null;
|
|
1436
|
-
function
|
|
1436
|
+
function Ru(e) {
|
|
1437
1437
|
xe = e;
|
|
1438
1438
|
}
|
|
1439
1439
|
var ja = 1, jt = 0, Jt = jt;
|
|
@@ -1457,15 +1457,15 @@ function pn(e) {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
function Va(e, t, r = !0) {
|
|
1459
1459
|
var n = e.reactions;
|
|
1460
|
-
if (n !== null && !(!ut &&
|
|
1460
|
+
if (n !== null && !(!ut && Fe !== null && Fe.has(e)))
|
|
1461
1461
|
for (var i = 0; i < n.length; i++) {
|
|
1462
1462
|
var o = n[i];
|
|
1463
1463
|
(o.f & 2) !== 0 ? Va(o, t, !1) : t === o && (r ? G(o, Le) : (o.f & 1024) !== 0 && G(o, ir), To(o));
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
1466
|
function qa(e) {
|
|
1467
|
-
var t = pe, r = ve, n = xe, i = L, o =
|
|
1468
|
-
pe = null, ve = 0, xe = null, L = (c & 96) === 0 ? e : null,
|
|
1467
|
+
var t = pe, r = ve, n = xe, i = L, o = Fe, s = B, a = He, l = Jt, c = e.f;
|
|
1468
|
+
pe = null, ve = 0, xe = null, L = (c & 96) === 0 ? e : null, Fe = null, Mr(e.ctx), He = !1, Jt = ++jt, e.ac !== null && (Pa(() => {
|
|
1469
1469
|
e.ac.abort(Qn);
|
|
1470
1470
|
}), e.ac = null);
|
|
1471
1471
|
try {
|
|
@@ -1493,13 +1493,13 @@ function qa(e) {
|
|
|
1493
1493
|
} catch (T) {
|
|
1494
1494
|
return da(T);
|
|
1495
1495
|
} finally {
|
|
1496
|
-
e.f ^= Zo, pe = t, ve = r, xe = n, L = i,
|
|
1496
|
+
e.f ^= Zo, pe = t, ve = r, xe = n, L = i, Fe = o, Mr(s), He = a, Jt = l;
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function Lu(e, t) {
|
|
1500
1500
|
let r = t.reactions;
|
|
1501
1501
|
if (r !== null) {
|
|
1502
|
-
var n =
|
|
1502
|
+
var n = _c.call(r, e);
|
|
1503
1503
|
if (n !== -1) {
|
|
1504
1504
|
var i = r.length - 1;
|
|
1505
1505
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
@@ -1507,13 +1507,13 @@ function Ru(e, t) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
if (r === null && (t.f & 2) !== 0 && (pe === null || !$n.call(pe, t))) {
|
|
1509
1509
|
var o = t;
|
|
1510
|
-
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~cn), o.v !== Q && _o(o),
|
|
1510
|
+
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~cn), o.v !== Q && _o(o), pu(o), ln(o, 0);
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
function ln(e, t) {
|
|
1514
1514
|
var r = e.deps;
|
|
1515
1515
|
if (r !== null)
|
|
1516
|
-
for (var n = t; n < r.length; n++)
|
|
1516
|
+
for (var n = t; n < r.length; n++) Lu(e, r[n]);
|
|
1517
1517
|
}
|
|
1518
1518
|
function Ir(e) {
|
|
1519
1519
|
var t = e.f;
|
|
@@ -1523,7 +1523,7 @@ function Ir(e) {
|
|
|
1523
1523
|
if (M = e, In = !0, 0)
|
|
1524
1524
|
var i, o;
|
|
1525
1525
|
try {
|
|
1526
|
-
(t & 16777232) !== 0 ?
|
|
1526
|
+
(t & 16777232) !== 0 ? Cu(e) : Ao(e), Da(e);
|
|
1527
1527
|
var s = qa(e);
|
|
1528
1528
|
if (e.teardown = typeof s == "function" ? s : null, e.wv = ja, 0)
|
|
1529
1529
|
for (var a of e.deps) ;
|
|
@@ -1534,7 +1534,7 @@ function Ir(e) {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
function y(e) {
|
|
1536
1536
|
var t = (e.f & 2) !== 0;
|
|
1537
|
-
if (
|
|
1537
|
+
if (Iu?.add(e), L !== null && !He && !(M !== null && (M.f & 16384) !== 0) && (Fe === null || !Fe.has(e))) {
|
|
1538
1538
|
var r = L.deps;
|
|
1539
1539
|
if ((L.f & 2097152) !== 0)
|
|
1540
1540
|
e.rv < jt && (e.rv = jt, pe === null && r !== null && r[ve] === e ? ve++ : pe === null ? pe = [e] : pe.push(e));
|
|
@@ -1591,7 +1591,7 @@ var Er = /* @__PURE__ */ Symbol("events"), Ka = /* @__PURE__ */ new Set(), qi =
|
|
|
1591
1591
|
function mr(e, t, r) {
|
|
1592
1592
|
(t[Er] ?? (t[Er] = {}))[e] = r;
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Pu(e) {
|
|
1595
1595
|
for (var t = 0; t < e.length; t++) Ka.add(e[t]);
|
|
1596
1596
|
for (var r of qi) r(e);
|
|
1597
1597
|
}
|
|
@@ -1641,13 +1641,13 @@ function fs(e) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1645
|
-
function Nu(e) {
|
|
1646
|
-
return Pu?.createHTML(e) ?? e;
|
|
1647
|
-
}
|
|
1644
|
+
var Nu = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1648
1645
|
function $u(e) {
|
|
1646
|
+
return Nu?.createHTML(e) ?? e;
|
|
1647
|
+
}
|
|
1648
|
+
function zu(e) {
|
|
1649
1649
|
var t = ko("template");
|
|
1650
|
-
return t.innerHTML =
|
|
1650
|
+
return t.innerHTML = $u(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1651
1651
|
}
|
|
1652
1652
|
function Ot(e, t) {
|
|
1653
1653
|
var r = M;
|
|
@@ -1664,7 +1664,7 @@ function Ze(e, t) {
|
|
|
1664
1664
|
return () => {
|
|
1665
1665
|
if (D)
|
|
1666
1666
|
return Ot($, null), $;
|
|
1667
|
-
i === void 0 && (i =
|
|
1667
|
+
i === void 0 && (i = zu(o ? e : "<!>" + e), r || (i = /* @__PURE__ */ Or(i)));
|
|
1668
1668
|
var s = n || Ia ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1669
1669
|
if (r) {
|
|
1670
1670
|
var a = /* @__PURE__ */ Or(s), l = s.lastChild;
|
|
@@ -1673,7 +1673,7 @@ function Ze(e, t) {
|
|
|
1673
1673
|
return s;
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function Du(e = "") {
|
|
1677
1677
|
if (!D) {
|
|
1678
1678
|
var t = Be(e + "");
|
|
1679
1679
|
return Ot(t, t), t;
|
|
@@ -1681,7 +1681,7 @@ function zu(e = "") {
|
|
|
1681
1681
|
var r = $;
|
|
1682
1682
|
return r.nodeType !== 3 ? (r.before(r = Be()), Oe(r)) : ti(r), Ot(r, r), r;
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function Hu() {
|
|
1685
1685
|
if (D)
|
|
1686
1686
|
return Ot($, null), $;
|
|
1687
1687
|
var e = document.createDocumentFragment(), t = document.createComment(""), r = Be();
|
|
@@ -1695,7 +1695,7 @@ function me(e, t) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
e !== null && e.before(t);
|
|
1697
1697
|
}
|
|
1698
|
-
var
|
|
1698
|
+
var Wu = [
|
|
1699
1699
|
"allowfullscreen",
|
|
1700
1700
|
"async",
|
|
1701
1701
|
"autofocus",
|
|
@@ -1724,8 +1724,8 @@ var Hu = [
|
|
|
1724
1724
|
"defer",
|
|
1725
1725
|
"disablepictureinpicture",
|
|
1726
1726
|
"disableremoteplayback"
|
|
1727
|
-
],
|
|
1728
|
-
...
|
|
1727
|
+
], fg = [
|
|
1728
|
+
...Wu,
|
|
1729
1729
|
"formNoValidate",
|
|
1730
1730
|
"isMap",
|
|
1731
1731
|
"noModule",
|
|
@@ -1741,16 +1741,16 @@ var Hu = [
|
|
|
1741
1741
|
"disablePictureInPicture",
|
|
1742
1742
|
"disableRemotePlayback"
|
|
1743
1743
|
], Fu = ["touchstart", "touchmove"];
|
|
1744
|
-
function
|
|
1744
|
+
function Bu(e) {
|
|
1745
1745
|
return Fu.includes(e);
|
|
1746
1746
|
}
|
|
1747
|
-
var
|
|
1747
|
+
var Uu = [
|
|
1748
1748
|
"$state",
|
|
1749
1749
|
"$state.raw",
|
|
1750
1750
|
"$derived",
|
|
1751
1751
|
"$derived.by"
|
|
1752
|
-
],
|
|
1753
|
-
...
|
|
1752
|
+
], dg = [
|
|
1753
|
+
...Uu,
|
|
1754
1754
|
"$state.eager",
|
|
1755
1755
|
"$state.snapshot",
|
|
1756
1756
|
"$props",
|
|
@@ -1773,7 +1773,7 @@ function kn(e, t) {
|
|
|
1773
1773
|
function Ja(e, t) {
|
|
1774
1774
|
return Za(e, t);
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function ju(e, t) {
|
|
1777
1777
|
Vi(), t.intro = t.intro ?? !1;
|
|
1778
1778
|
const r = t.target, n = D, i = $;
|
|
1779
1779
|
try {
|
|
@@ -1788,7 +1788,7 @@ function Uu(e, t) {
|
|
|
1788
1788
|
} catch (s) {
|
|
1789
1789
|
if (s instanceof Error && s.message.split(`
|
|
1790
1790
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1791
|
-
return s !== Ar && console.warn("Failed to hydrate: ", s), t.recover === !1 &&
|
|
1791
|
+
return s !== Ar && console.warn("Failed to hydrate: ", s), t.recover === !1 && $c(), Vi(), yu(r), kr(!1), Ja(e, t);
|
|
1792
1792
|
} finally {
|
|
1793
1793
|
kr(n), Oe(i);
|
|
1794
1794
|
}
|
|
@@ -1796,9 +1796,9 @@ function Uu(e, t) {
|
|
|
1796
1796
|
var En = /* @__PURE__ */ new Map();
|
|
1797
1797
|
function Za(e, { target: t, anchor: r, props: n = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1798
1798
|
Vi();
|
|
1799
|
-
var l = void 0, c =
|
|
1799
|
+
var l = void 0, c = Au(() => {
|
|
1800
1800
|
var u = r ?? t.appendChild(Be());
|
|
1801
|
-
|
|
1801
|
+
iu(u, { pending: () => {
|
|
1802
1802
|
} }, (g) => {
|
|
1803
1803
|
ca({});
|
|
1804
1804
|
var m = B;
|
|
@@ -1811,7 +1811,7 @@ function Za(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
|
|
|
1811
1811
|
var b = g[m];
|
|
1812
1812
|
if (!d.has(b)) {
|
|
1813
1813
|
d.add(b);
|
|
1814
|
-
var T =
|
|
1814
|
+
var T = Bu(b);
|
|
1815
1815
|
for (const J of [t, document]) {
|
|
1816
1816
|
var I = En.get(J);
|
|
1817
1817
|
I === void 0 && (I = /* @__PURE__ */ new Map(), En.set(J, I));
|
|
@@ -1821,7 +1821,7 @@ function Za(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
|
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
|
-
return p(
|
|
1824
|
+
return p(bc(Ka)), qi.add(p), () => {
|
|
1825
1825
|
for (var g of d) for (const T of [t, document]) {
|
|
1826
1826
|
var m = En.get(T), b = m.get(g);
|
|
1827
1827
|
--b == 0 ? (T.removeEventListener(g, fs), m.delete(g), m.size === 0 && En.delete(T)) : m.set(g, b);
|
|
@@ -1832,11 +1832,11 @@ function Za(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
|
|
|
1832
1832
|
return Yi.set(l, c), l;
|
|
1833
1833
|
}
|
|
1834
1834
|
var Yi = /* @__PURE__ */ new WeakMap();
|
|
1835
|
-
function
|
|
1835
|
+
function Gu(e, t) {
|
|
1836
1836
|
const r = Yi.get(e);
|
|
1837
1837
|
return r ? (Yi.delete(e), r(t)) : Promise.resolve();
|
|
1838
1838
|
}
|
|
1839
|
-
var lt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakMap(), _i = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(),
|
|
1839
|
+
var lt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakMap(), _i = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(), Vu = class {
|
|
1840
1840
|
constructor(e, t = !0) {
|
|
1841
1841
|
v(this, "anchor", void 0), A(this, lt, /* @__PURE__ */ new Map()), A(this, kt, /* @__PURE__ */ new Map()), A(this, $e, /* @__PURE__ */ new Map()), A(this, Ur, /* @__PURE__ */ new Set()), A(this, vi, !0), A(this, _i, (r) => {
|
|
1842
1842
|
if (h(lt, this).has(r)) {
|
|
@@ -1874,7 +1874,7 @@ var lt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), $e =
|
|
|
1874
1874
|
}), this.anchor = e, E(vi, this, t);
|
|
1875
1875
|
}
|
|
1876
1876
|
ensure(e, t) {
|
|
1877
|
-
var r = R, n =
|
|
1877
|
+
var r = R, n = Tu();
|
|
1878
1878
|
if (t && !h(kt, this).has(e) && !h($e, this).has(e)) if (n) {
|
|
1879
1879
|
var i = document.createDocumentFragment(), o = Be();
|
|
1880
1880
|
i.append(o), h($e, this).set(e, {
|
|
@@ -1890,13 +1890,13 @@ var lt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), $e =
|
|
|
1890
1890
|
D && (this.anchor = $), h(_i, this).call(this, r);
|
|
1891
1891
|
}
|
|
1892
1892
|
};
|
|
1893
|
-
function
|
|
1894
|
-
B === null &&
|
|
1893
|
+
function qu(e) {
|
|
1894
|
+
B === null && Oc("onMount"), un && B.l !== null ? Yu(B).m.push(e) : On(() => {
|
|
1895
1895
|
const t = ri(e);
|
|
1896
1896
|
if (typeof t == "function") return t;
|
|
1897
1897
|
});
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function Yu(e) {
|
|
1900
1900
|
var t = e.l;
|
|
1901
1901
|
return t.u ?? (t.u = {
|
|
1902
1902
|
a: [],
|
|
@@ -1907,10 +1907,10 @@ function qu(e) {
|
|
|
1907
1907
|
function vr(e, t, r = !1) {
|
|
1908
1908
|
var n;
|
|
1909
1909
|
D && (n = $, vo());
|
|
1910
|
-
var i = new
|
|
1910
|
+
var i = new Vu(e), o = r ? mo : 0;
|
|
1911
1911
|
function s(a, l) {
|
|
1912
1912
|
if (D) {
|
|
1913
|
-
var c =
|
|
1913
|
+
var c = jc(n);
|
|
1914
1914
|
if (a !== parseInt(c.substring(1))) {
|
|
1915
1915
|
var u = sa();
|
|
1916
1916
|
Oe(u), i.anchor = u, kr(!1), i.ensure(a, l), kr(!0);
|
|
@@ -1926,7 +1926,7 @@ function vr(e, t, r = !1) {
|
|
|
1926
1926
|
}), a || s(-1, null);
|
|
1927
1927
|
}, o);
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function Xu(e, t) {
|
|
1930
1930
|
$a(() => {
|
|
1931
1931
|
var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
|
|
1932
1932
|
if (!n.querySelector("#" + t.hash)) {
|
|
@@ -1937,7 +1937,7 @@ function Yu(e, t) {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
var ps = [...`
|
|
1939
1939
|
\r\f \v\uFEFF`];
|
|
1940
|
-
function
|
|
1940
|
+
function Ku(e, t, r) {
|
|
1941
1941
|
var n = e == null ? "" : "" + e;
|
|
1942
1942
|
if (t && (n = n ? n + " " + t : t), r) {
|
|
1943
1943
|
for (var i of Object.keys(r)) if (r[i]) n = n ? n + " " + i : i;
|
|
@@ -1960,7 +1960,7 @@ function gs(e, t = !1) {
|
|
|
1960
1960
|
function bi(e) {
|
|
1961
1961
|
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
1962
1962
|
}
|
|
1963
|
-
function
|
|
1963
|
+
function Ju(e, t) {
|
|
1964
1964
|
if (t) {
|
|
1965
1965
|
var r = "", n, i;
|
|
1966
1966
|
if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
|
|
@@ -1991,10 +1991,10 @@ function Ku(e, t) {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
return e == null ? null : String(e);
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1994
|
+
function Zu(e, t, r, n, i, o) {
|
|
1995
1995
|
var s = e[$i];
|
|
1996
1996
|
if (D || s !== r || s === void 0) {
|
|
1997
|
-
var a =
|
|
1997
|
+
var a = Ku(r, n, o);
|
|
1998
1998
|
(!D || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[$i] = r;
|
|
1999
1999
|
} else if (o && i !== o) for (var l in o) {
|
|
2000
2000
|
var c = !!o[l];
|
|
@@ -2008,16 +2008,16 @@ function yi(e, t = {}, r, n) {
|
|
|
2008
2008
|
t[i] !== o && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, o, n));
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function Qu(e, t, r, n) {
|
|
2012
2012
|
var i = e[zi];
|
|
2013
2013
|
if (D || i !== t) {
|
|
2014
|
-
var o =
|
|
2014
|
+
var o = Ju(t, n);
|
|
2015
2015
|
(!D || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[zi] = t;
|
|
2016
2016
|
} else n && (Array.isArray(n) ? (yi(e, r?.[0], n[0]), yi(e, r?.[1], n[1], "important")) : yi(e, r, n));
|
|
2017
2017
|
return n;
|
|
2018
2018
|
}
|
|
2019
|
-
var
|
|
2020
|
-
function
|
|
2019
|
+
var ef = /* @__PURE__ */ Symbol("is custom element"), tf = /* @__PURE__ */ Symbol("is html"), rf = oa ? "link" : "LINK", nf = oa ? "progress" : "PROGRESS";
|
|
2020
|
+
function of(e) {
|
|
2021
2021
|
if (D) {
|
|
2022
2022
|
var t = !1, r = () => {
|
|
2023
2023
|
if (!t) {
|
|
@@ -2031,35 +2031,35 @@ function nf(e) {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
2033
|
};
|
|
2034
|
-
e[ia] = r, er(r),
|
|
2034
|
+
e[ia] = r, er(r), Su();
|
|
2035
2035
|
}
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function sf(e, t) {
|
|
2038
2038
|
var r = Qa(e);
|
|
2039
|
-
r.value === (r.value = t ?? void 0) || e.value === t && (t !== 0 || e.nodeName !==
|
|
2039
|
+
r.value === (r.value = t ?? void 0) || e.value === t && (t !== 0 || e.nodeName !== nf) || (e.value = t ?? "");
|
|
2040
2040
|
}
|
|
2041
2041
|
function Xi(e, t, r, n) {
|
|
2042
2042
|
var i = Qa(e);
|
|
2043
|
-
if (D && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName ===
|
|
2043
|
+
if (D && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === rf)) {
|
|
2044
2044
|
n || void 0;
|
|
2045
2045
|
return;
|
|
2046
2046
|
}
|
|
2047
|
-
i[t] !== (i[t] = r) && (t === "loading" && (e[
|
|
2047
|
+
i[t] !== (i[t] = r) && (t === "loading" && (e[Mc] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && af(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2048
2048
|
}
|
|
2049
2049
|
function Qa(e) {
|
|
2050
2050
|
var t;
|
|
2051
2051
|
return (t = e)[Ni] ?? (t[Ni] = {
|
|
2052
|
-
[
|
|
2053
|
-
[
|
|
2052
|
+
[ef]: e.nodeName.includes("-"),
|
|
2053
|
+
[tf]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
2054
2054
|
});
|
|
2055
2055
|
}
|
|
2056
2056
|
var ms = /* @__PURE__ */ new Map();
|
|
2057
|
-
function
|
|
2057
|
+
function af(e) {
|
|
2058
2058
|
var t = e.getAttribute("is") || e.nodeName, r = ms.get(t);
|
|
2059
2059
|
if (r) return r;
|
|
2060
2060
|
ms.set(t, r = []);
|
|
2061
2061
|
for (var n, i = e, o = Element.prototype; o !== i; ) {
|
|
2062
|
-
n =
|
|
2062
|
+
n = yc(i);
|
|
2063
2063
|
for (var s in n) n[s].set && s !== "innerHTML" && s !== "textContent" && s !== "innerText" && r.push(s);
|
|
2064
2064
|
i = ta(i);
|
|
2065
2065
|
}
|
|
@@ -2071,14 +2071,14 @@ var el, wr = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(),
|
|
|
2071
2071
|
}
|
|
2072
2072
|
observe(e, t) {
|
|
2073
2073
|
var r = h(wr, this).get(e) || /* @__PURE__ */ new Set();
|
|
2074
|
-
return r.add(t), h(wr, this).set(e, r), O(vs, this,
|
|
2074
|
+
return r.add(t), h(wr, this).set(e, r), O(vs, this, lf).call(this).observe(e, h(Ti, this)), () => {
|
|
2075
2075
|
var n = h(wr, this).get(e);
|
|
2076
2076
|
n.delete(t), n.size === 0 && (h(wr, this).delete(e), h(Xn, this).unobserve(e));
|
|
2077
2077
|
};
|
|
2078
2078
|
}
|
|
2079
2079
|
};
|
|
2080
2080
|
el = tl;
|
|
2081
|
-
function
|
|
2081
|
+
function lf() {
|
|
2082
2082
|
return h(Xn, this) ?? E(Xn, this, new ResizeObserver((e) => {
|
|
2083
2083
|
for (var t of e) {
|
|
2084
2084
|
el.entries.set(t.target, t);
|
|
@@ -2118,7 +2118,7 @@ function xn(e, t, r, n) {
|
|
|
2118
2118
|
d = Vt(e, t)?.set ?? (p && t in e ? (w) => e[t] = w : void 0);
|
|
2119
2119
|
}
|
|
2120
2120
|
var g, m = !1;
|
|
2121
|
-
o ? [g, m] =
|
|
2121
|
+
o ? [g, m] = Kc(() => e[t]) : g = e[t], g === void 0 && n !== void 0 && (g = u(), d && (i && zc(t), d(g)));
|
|
2122
2122
|
var b;
|
|
2123
2123
|
if (i ? b = () => {
|
|
2124
2124
|
var w = e[t];
|
|
@@ -2144,14 +2144,14 @@ function xn(e, t, r, n) {
|
|
|
2144
2144
|
return dt && I || (J.f & 16384) !== 0 ? H.v : y(H);
|
|
2145
2145
|
});
|
|
2146
2146
|
}
|
|
2147
|
-
function
|
|
2148
|
-
return new
|
|
2147
|
+
function cf(e) {
|
|
2148
|
+
return new uf(e);
|
|
2149
2149
|
}
|
|
2150
|
-
var
|
|
2150
|
+
var Wt = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), uf = class {
|
|
2151
2151
|
constructor(e) {
|
|
2152
|
-
A(this,
|
|
2152
|
+
A(this, Wt, void 0), A(this, Ge, void 0);
|
|
2153
2153
|
var t = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
2154
|
-
var s = /* @__PURE__ */
|
|
2154
|
+
var s = /* @__PURE__ */ gu(o, !1, !1);
|
|
2155
2155
|
return t.set(i, s), s;
|
|
2156
2156
|
};
|
|
2157
2157
|
const n = new Proxy({
|
|
@@ -2168,7 +2168,7 @@ var Ft = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), cf =
|
|
|
2168
2168
|
return P(t.get(o) ?? r(o, s), s), Reflect.set(i, o, s);
|
|
2169
2169
|
}
|
|
2170
2170
|
});
|
|
2171
|
-
E(Ge, this, (e.hydrate ?
|
|
2171
|
+
E(Ge, this, (e.hydrate ? ju : Ja)(e.component, {
|
|
2172
2172
|
target: e.target,
|
|
2173
2173
|
anchor: e.anchor,
|
|
2174
2174
|
props: n,
|
|
@@ -2176,7 +2176,7 @@ var Ft = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), cf =
|
|
|
2176
2176
|
intro: e.intro ?? !1,
|
|
2177
2177
|
recover: e.recover,
|
|
2178
2178
|
transformError: e.transformError
|
|
2179
|
-
})), !ut && (!e?.props?.$$host || e.sync === !1) && Qr(), E(
|
|
2179
|
+
})), !ut && (!e?.props?.$$host || e.sync === !1) && Qr(), E(Wt, this, n.$$events);
|
|
2180
2180
|
for (const i of Object.keys(h(Ge, this)))
|
|
2181
2181
|
i === "$set" || i === "$destroy" || i === "$on" || Dn(this, i, {
|
|
2182
2182
|
get() {
|
|
@@ -2190,17 +2190,17 @@ var Ft = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), cf =
|
|
|
2190
2190
|
h(Ge, this).$set = (i) => {
|
|
2191
2191
|
Object.assign(n, i);
|
|
2192
2192
|
}, h(Ge, this).$destroy = () => {
|
|
2193
|
-
|
|
2193
|
+
Gu(h(Ge, this));
|
|
2194
2194
|
};
|
|
2195
2195
|
}
|
|
2196
2196
|
$set(e) {
|
|
2197
2197
|
h(Ge, this).$set(e);
|
|
2198
2198
|
}
|
|
2199
2199
|
$on(e, t) {
|
|
2200
|
-
h(
|
|
2200
|
+
h(Wt, this)[e] = h(Wt, this)[e] || [];
|
|
2201
2201
|
const r = (...n) => t.call(this, ...n);
|
|
2202
|
-
return h(
|
|
2203
|
-
h(
|
|
2202
|
+
return h(Wt, this)[e].push(r), () => {
|
|
2203
|
+
h(Wt, this)[e] = h(Wt, this)[e].filter((n) => n !== r);
|
|
2204
2204
|
};
|
|
2205
2205
|
}
|
|
2206
2206
|
$destroy() {
|
|
@@ -2233,14 +2233,14 @@ typeof HTMLElement == "function" && (rl = class extends HTMLElement {
|
|
|
2233
2233
|
};
|
|
2234
2234
|
};
|
|
2235
2235
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2236
|
-
const t = {}, r =
|
|
2236
|
+
const t = {}, r = ff(this);
|
|
2237
2237
|
for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
|
|
2238
2238
|
for (const n of this.attributes) {
|
|
2239
2239
|
const i = this.$$g_p(n.name);
|
|
2240
2240
|
i in this.$$d || (this.$$d[i] = Rn(i, n.value, this.$$p_d, "toProp"));
|
|
2241
2241
|
}
|
|
2242
2242
|
for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
2243
|
-
this.$$c =
|
|
2243
|
+
this.$$c = cf({
|
|
2244
2244
|
component: this.$$ctor,
|
|
2245
2245
|
target: this.$$shadowRoot || this,
|
|
2246
2246
|
props: {
|
|
@@ -2248,7 +2248,7 @@ typeof HTMLElement == "function" && (rl = class extends HTMLElement {
|
|
|
2248
2248
|
$$slots: t,
|
|
2249
2249
|
$$host: this
|
|
2250
2250
|
}
|
|
2251
|
-
}), this.$$me =
|
|
2251
|
+
}), this.$$me = xu(() => {
|
|
2252
2252
|
xo(() => {
|
|
2253
2253
|
this.$$r = !0;
|
|
2254
2254
|
for (const n of zn(this.$$c)) {
|
|
@@ -2305,13 +2305,13 @@ function Rn(e, t, r, n) {
|
|
|
2305
2305
|
return t;
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2308
|
+
function ff(e) {
|
|
2309
2309
|
const t = {};
|
|
2310
2310
|
return e.childNodes.forEach((r) => {
|
|
2311
2311
|
t[r.slot || "default"] = !0;
|
|
2312
2312
|
}), t;
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function df(e, t, r, n, i, o) {
|
|
2315
2315
|
let s = class extends rl {
|
|
2316
2316
|
constructor() {
|
|
2317
2317
|
super(e, r, i), this.$$p_d = t;
|
|
@@ -2337,7 +2337,7 @@ function ff(e, t, r, n, i, o) {
|
|
|
2337
2337
|
} });
|
|
2338
2338
|
}), o && (s = o(s)), e.element = s, s;
|
|
2339
2339
|
}
|
|
2340
|
-
var ni = (e) => e,
|
|
2340
|
+
var ni = (e) => e, hg = ni(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), pg = ni(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), gg = ni(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), mg = ni(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext")), hf = class {
|
|
2341
2341
|
serialize(e, t) {
|
|
2342
2342
|
return {
|
|
2343
2343
|
startContainer: this.getNodePath(e.startContainer, t),
|
|
@@ -2412,7 +2412,7 @@ var xr;
|
|
|
2412
2412
|
})(xr || (xr = {}));
|
|
2413
2413
|
var nl = class Ki {
|
|
2414
2414
|
constructor(t = {}) {
|
|
2415
|
-
if (v(this, "config", void 0), v(this, "ttsWordHighlight", null), v(this, "ttsSentenceHighlight", null), v(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), v(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), v(this, "annotations", /* @__PURE__ */ new Map()), v(this, "colorHighlights", /* @__PURE__ */ new Map()), v(this, "nextAnnotationId", 1), v(this, "supported", !1), v(this, "rangeSerializer", void 0), v(this, "themeObserver", null), v(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new
|
|
2415
|
+
if (v(this, "config", void 0), v(this, "ttsWordHighlight", null), v(this, "ttsSentenceHighlight", null), v(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), v(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), v(this, "annotations", /* @__PURE__ */ new Map()), v(this, "colorHighlights", /* @__PURE__ */ new Map()), v(this, "nextAnnotationId", 1), v(this, "supported", !1), v(this, "rangeSerializer", void 0), v(this, "themeObserver", null), v(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new hf(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2416
2416
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
2417
2417
|
return;
|
|
2418
2418
|
}
|
|
@@ -2822,7 +2822,7 @@ function il(e) {
|
|
|
2822
2822
|
console.debug(`[${e}]`, ...t);
|
|
2823
2823
|
};
|
|
2824
2824
|
}
|
|
2825
|
-
var
|
|
2825
|
+
var vg = il("I18nService"), wi = {
|
|
2826
2826
|
assessment: [],
|
|
2827
2827
|
section: [],
|
|
2828
2828
|
item: [],
|
|
@@ -2843,19 +2843,19 @@ function Et(e, t) {
|
|
|
2843
2843
|
if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
2844
2844
|
return e;
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function pf(e) {
|
|
2847
2847
|
if (e != null) {
|
|
2848
2848
|
if (!Zt(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
|
|
2849
2849
|
return e;
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function gf(e) {
|
|
2853
2853
|
if (e != null) {
|
|
2854
2854
|
if (!Zt(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
|
|
2855
2855
|
return e;
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function mf(e, t) {
|
|
2859
2859
|
if (t == null) return;
|
|
2860
2860
|
if (!Zt(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
|
|
2861
2861
|
const r = t, n = (i) => i === "polly" || i === "google" || i === "custom";
|
|
@@ -2864,11 +2864,11 @@ function gf(e, t) {
|
|
|
2864
2864
|
if ("provider" in r && r.provider !== void 0 && !Zt(r.provider) && !(e === "textToSpeech" && n(r.provider))) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
|
|
2865
2865
|
return r;
|
|
2866
2866
|
}
|
|
2867
|
-
function
|
|
2867
|
+
function vf(e) {
|
|
2868
2868
|
if (e == null) return {};
|
|
2869
2869
|
if (!Zt(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
|
|
2870
2870
|
const t = {};
|
|
2871
|
-
for (const [r, n] of Object.entries(e)) t[r] =
|
|
2871
|
+
for (const [r, n] of Object.entries(e)) t[r] = mf(r, n);
|
|
2872
2872
|
return t;
|
|
2873
2873
|
}
|
|
2874
2874
|
function ol(e) {
|
|
@@ -2885,15 +2885,15 @@ function xt(e) {
|
|
|
2885
2885
|
}
|
|
2886
2886
|
return Array.from(t);
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function _f(e, t) {
|
|
2889
2889
|
if (e != null) {
|
|
2890
2890
|
if (e === "on" || e === "off") return e;
|
|
2891
2891
|
throw new Error(`Invalid tools config at "${t}": expected "on" or "off", got ${JSON.stringify(e)}.`);
|
|
2892
2892
|
}
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2894
|
+
function bf(e) {
|
|
2895
2895
|
if (e != null && !Zt(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
2896
|
-
const t =
|
|
2896
|
+
const t = gf(e?.policy), r = pf(e?.placement), n = vf(e?.providers), i = _f(e?.pnpEnforcement, "pnpEnforcement"), o = {
|
|
2897
2897
|
policy: {
|
|
2898
2898
|
allowed: xt(Et(t?.allowed, "policy.allowed")),
|
|
2899
2899
|
blocked: xt(Et(t?.blocked, "policy.blocked"))
|
|
@@ -2907,7 +2907,7 @@ function _f(e) {
|
|
|
2907
2907
|
};
|
|
2908
2908
|
return i && (o.pnpEnforcement = i), o;
|
|
2909
2909
|
}
|
|
2910
|
-
var
|
|
2910
|
+
var yf = [
|
|
2911
2911
|
"assessment",
|
|
2912
2912
|
"section",
|
|
2913
2913
|
"item",
|
|
@@ -2918,7 +2918,7 @@ var bf = [
|
|
|
2918
2918
|
function Ln(e, t) {
|
|
2919
2919
|
if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
|
|
2920
2920
|
}
|
|
2921
|
-
var
|
|
2921
|
+
var Tf = [
|
|
2922
2922
|
{
|
|
2923
2923
|
pattern: /<script\b/i,
|
|
2924
2924
|
reason: "contains a <script> tag"
|
|
@@ -2936,17 +2936,17 @@ var yf = [
|
|
|
2936
2936
|
reason: "contains a <foreignObject> element"
|
|
2937
2937
|
}
|
|
2938
2938
|
];
|
|
2939
|
-
function
|
|
2939
|
+
function Sf(e, t, r) {
|
|
2940
2940
|
const n = t.trimStart(), i = n.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(n);
|
|
2941
2941
|
if (/^data:/i.test(n)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
|
|
2942
2942
|
if (!(!i && !o)) {
|
|
2943
|
-
for (const { pattern: s, reason: a } of
|
|
2943
|
+
for (const { pattern: s, reason: a } of Tf) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${a}. Inline SVG icons must not include scriptable content.`);
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
2946
|
function bs(e) {
|
|
2947
2947
|
if (Ln(e.toolId, "toolId"), Ln(e.name, "name"), Ln(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
|
|
2948
|
-
if (typeof e.icon == "string" &&
|
|
2949
|
-
const t = e.supportedLevels.find((r) => !
|
|
2948
|
+
if (typeof e.icon == "string" && Sf(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2949
|
+
const t = e.supportedLevels.find((r) => !yf.includes(r));
|
|
2950
2950
|
if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
|
|
2951
2951
|
if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
|
|
2952
2952
|
if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
|
|
@@ -2955,7 +2955,7 @@ function bs(e) {
|
|
|
2955
2955
|
if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
|
|
2956
2956
|
if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
|
|
2957
2957
|
}
|
|
2958
|
-
var
|
|
2958
|
+
var wf = class {
|
|
2959
2959
|
constructor() {
|
|
2960
2960
|
v(this, "tools", /* @__PURE__ */ new Map()), v(this, "pnpIndex", /* @__PURE__ */ new Map()), v(this, "componentOverrides", {}), v(this, "moduleLoaders", /* @__PURE__ */ new Map()), v(this, "loadedToolModules", /* @__PURE__ */ new Set()), v(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
2961
2961
|
}
|
|
@@ -3101,10 +3101,10 @@ var Sf = class {
|
|
|
3101
3101
|
function sl(e) {
|
|
3102
3102
|
return e.level === "item";
|
|
3103
3103
|
}
|
|
3104
|
-
function
|
|
3104
|
+
function kf(e) {
|
|
3105
3105
|
return e.level === "passage";
|
|
3106
3106
|
}
|
|
3107
|
-
function
|
|
3107
|
+
function Ef(e) {
|
|
3108
3108
|
return e.level === "rubric";
|
|
3109
3109
|
}
|
|
3110
3110
|
function al(e) {
|
|
@@ -3145,7 +3145,7 @@ function Mo(e) {
|
|
|
3145
3145
|
}
|
|
3146
3146
|
return n.filter(Boolean).join(" ").trim();
|
|
3147
3147
|
}
|
|
3148
|
-
if (
|
|
3148
|
+
if (kf(e)) {
|
|
3149
3149
|
const t = e.passage;
|
|
3150
3150
|
if (!t?.config) return "";
|
|
3151
3151
|
const r = t.config, n = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
@@ -3164,7 +3164,7 @@ function Mo(e) {
|
|
|
3164
3164
|
}
|
|
3165
3165
|
return n.filter(Boolean).join(" ").trim();
|
|
3166
3166
|
}
|
|
3167
|
-
if (
|
|
3167
|
+
if (Ef(e)) {
|
|
3168
3168
|
const t = e.rubricBlock;
|
|
3169
3169
|
return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3170
3170
|
}
|
|
@@ -3181,7 +3181,7 @@ function ii(e) {
|
|
|
3181
3181
|
/\d+\s*[+\-*/=]\s*\d+/
|
|
3182
3182
|
].some((r) => r.test(t));
|
|
3183
3183
|
}
|
|
3184
|
-
function
|
|
3184
|
+
function xf(e) {
|
|
3185
3185
|
const t = [
|
|
3186
3186
|
"pie-multiple-choice",
|
|
3187
3187
|
"pie-inline-choice",
|
|
@@ -3211,7 +3211,7 @@ function Ef(e) {
|
|
|
3211
3211
|
function oi(e) {
|
|
3212
3212
|
return Mo(e).trim().length >= 10;
|
|
3213
3213
|
}
|
|
3214
|
-
function
|
|
3214
|
+
function Af(e) {
|
|
3215
3215
|
const t = Mo(e);
|
|
3216
3216
|
return [
|
|
3217
3217
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
@@ -3222,23 +3222,23 @@ function xf(e) {
|
|
|
3222
3222
|
/physics|force|energy|velocity|acceleration/i
|
|
3223
3223
|
].some((r) => r.test(t));
|
|
3224
3224
|
}
|
|
3225
|
-
var
|
|
3225
|
+
var Mf = [
|
|
3226
3226
|
"assessment",
|
|
3227
3227
|
"section",
|
|
3228
3228
|
"item",
|
|
3229
3229
|
"passage",
|
|
3230
3230
|
"rubric"
|
|
3231
|
-
],
|
|
3232
|
-
function
|
|
3233
|
-
return
|
|
3231
|
+
], Cf = new Set(Mf);
|
|
3232
|
+
function Of(e) {
|
|
3233
|
+
return Cf.has(e);
|
|
3234
3234
|
}
|
|
3235
3235
|
function Co(e, t, r) {
|
|
3236
3236
|
const n = e.trim(), i = r.trim();
|
|
3237
3237
|
if (!n || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3238
|
-
if (!
|
|
3238
|
+
if (!Of(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
3239
3239
|
return `${n}:${t}:${i}`;
|
|
3240
3240
|
}
|
|
3241
|
-
var
|
|
3241
|
+
var If = class {
|
|
3242
3242
|
constructor() {
|
|
3243
3243
|
v(this, "providerId", "desmos-calculator"), v(this, "providerName", "Desmos Calculator"), v(this, "category", "calculator"), v(this, "version", "1.10"), v(this, "requiresAuth", !0), v(this, "desmosProvider", null), v(this, "config", null);
|
|
3244
3244
|
}
|
|
@@ -3342,14 +3342,34 @@ var Of = class {
|
|
|
3342
3342
|
text: e,
|
|
3343
3343
|
offset: 0
|
|
3344
3344
|
}];
|
|
3345
|
-
},
|
|
3345
|
+
}, ll = (e) => String(e || "").trim().toLowerCase(), Rf = () => ll((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), Lf = (e, t) => {
|
|
3346
|
+
if (t) {
|
|
3347
|
+
const s = e.find((a) => a.name === t);
|
|
3348
|
+
if (s) return s;
|
|
3349
|
+
}
|
|
3350
|
+
const r = Rf(), n = r.split("-")[0] || "en", i = (s) => {
|
|
3351
|
+
const a = ll(s.lang);
|
|
3352
|
+
return a === r || a.startsWith(`${n}-`);
|
|
3353
|
+
}, o = [
|
|
3354
|
+
(s) => s.localService && i(s),
|
|
3355
|
+
(s) => s.default && i(s),
|
|
3356
|
+
(s) => i(s),
|
|
3357
|
+
(s) => s.localService,
|
|
3358
|
+
(s) => s.default
|
|
3359
|
+
];
|
|
3360
|
+
for (const s of o) {
|
|
3361
|
+
const a = e.find(s);
|
|
3362
|
+
if (a) return a;
|
|
3363
|
+
}
|
|
3364
|
+
return e[0] || null;
|
|
3365
|
+
}, Pf = (e) => !e.default, Io = class {
|
|
3346
3366
|
constructor() {
|
|
3347
3367
|
v(this, "providerId", "browser"), v(this, "providerName", "Browser Speech Synthesis"), v(this, "version", "1.0.0");
|
|
3348
3368
|
}
|
|
3349
3369
|
async initialize(e) {
|
|
3350
3370
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
3351
3371
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
3352
|
-
return new
|
|
3372
|
+
return new Nf(e);
|
|
3353
3373
|
}
|
|
3354
3374
|
supportsFeature(e) {
|
|
3355
3375
|
return !0;
|
|
@@ -3367,7 +3387,7 @@ var Of = class {
|
|
|
3367
3387
|
}
|
|
3368
3388
|
destroy() {
|
|
3369
3389
|
}
|
|
3370
|
-
},
|
|
3390
|
+
}, Nf = class {
|
|
3371
3391
|
constructor(e) {
|
|
3372
3392
|
v(this, "utterance", null), v(this, "config", null), v(this, "_isPlaying", !1), v(this, "_isPaused", !1), v(this, "speakRunId", 0), v(this, "onWordBoundary", void 0), this.config = e;
|
|
3373
3393
|
}
|
|
@@ -3452,37 +3472,40 @@ var Of = class {
|
|
|
3452
3472
|
n(!1);
|
|
3453
3473
|
return;
|
|
3454
3474
|
}
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3475
|
+
const o = new SpeechSynthesisUtterance(e);
|
|
3476
|
+
this.utterance = o;
|
|
3477
|
+
const s = Lf(speechSynthesis.getVoices(), this.config?.voice);
|
|
3478
|
+
s && Pf(s) && (o.voice = s), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
|
|
3479
|
+
const a = () => {
|
|
3480
|
+
this.utterance === o && (this.utterance = null);
|
|
3481
|
+
};
|
|
3482
|
+
o.onstart = () => {
|
|
3460
3483
|
r === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
3461
|
-
},
|
|
3462
|
-
if (r !== this.speakRunId) {
|
|
3484
|
+
}, o.onend = () => {
|
|
3485
|
+
if (a(), r !== this.speakRunId) {
|
|
3463
3486
|
n(!1);
|
|
3464
3487
|
return;
|
|
3465
3488
|
}
|
|
3466
3489
|
this._isPlaying = !1, this._isPaused = !1, n(!0);
|
|
3467
|
-
},
|
|
3468
|
-
if (r !== this.speakRunId) {
|
|
3490
|
+
}, o.onerror = (l) => {
|
|
3491
|
+
if (a(), r !== this.speakRunId) {
|
|
3469
3492
|
n(!1);
|
|
3470
3493
|
return;
|
|
3471
3494
|
}
|
|
3472
|
-
if (this._isPlaying = !1, this._isPaused = !1,
|
|
3495
|
+
if (this._isPlaying = !1, this._isPaused = !1, l.error === "interrupted" || l.error === "canceled") {
|
|
3473
3496
|
n(!1);
|
|
3474
3497
|
return;
|
|
3475
3498
|
}
|
|
3476
|
-
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${
|
|
3477
|
-
},
|
|
3499
|
+
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${l.error}`));
|
|
3500
|
+
}, o.onpause = () => {
|
|
3478
3501
|
r === this.speakRunId && (this._isPaused = !0);
|
|
3479
|
-
},
|
|
3502
|
+
}, o.onresume = () => {
|
|
3480
3503
|
r === this.speakRunId && (this._isPaused = !1);
|
|
3481
|
-
},
|
|
3482
|
-
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:",
|
|
3483
|
-
const
|
|
3484
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:",
|
|
3485
|
-
}, speechSynthesis.speak(
|
|
3504
|
+
}, o.onboundary = (l) => {
|
|
3505
|
+
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", l.name, "charIndex:", l.charIndex, "charLength:", l.charLength), l.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
|
|
3506
|
+
const c = Math.max(0, Math.min(l.charIndex, Math.max(0, e.length - 1))), u = Number(l.charLength || 0), d = this.inferWordLength(e, c), p = Number.isFinite(u) && u > 0 && u <= 80 && c + u <= e.length ? u : d, g = e.substring(c, Math.min(e.length, c + p)).trim(), m = t + c;
|
|
3507
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", g, "at position:", m), this.onWordBoundary(g, m, p);
|
|
3508
|
+
}, speechSynthesis.speak(o);
|
|
3486
3509
|
});
|
|
3487
3510
|
}
|
|
3488
3511
|
pause() {
|
|
@@ -3492,7 +3515,7 @@ var Of = class {
|
|
|
3492
3515
|
this._isPlaying && this._isPaused && speechSynthesis.resume();
|
|
3493
3516
|
}
|
|
3494
3517
|
stop() {
|
|
3495
|
-
this.speakRunId += 1, this._isPlaying && speechSynthesis.cancel(), this._isPlaying = !1, this._isPaused = !1;
|
|
3518
|
+
this.speakRunId += 1, (this._isPlaying || this.utterance) && speechSynthesis.cancel(), this.utterance = null, this._isPlaying = !1, this._isPaused = !1;
|
|
3496
3519
|
}
|
|
3497
3520
|
isPlaying() {
|
|
3498
3521
|
return this._isPlaying && !this._isPaused;
|
|
@@ -3506,7 +3529,7 @@ var Of = class {
|
|
|
3506
3529
|
...e.providerOptions || {}
|
|
3507
3530
|
});
|
|
3508
3531
|
}
|
|
3509
|
-
},
|
|
3532
|
+
}, $f = class {
|
|
3510
3533
|
async emitTelemetry(e, t) {
|
|
3511
3534
|
try {
|
|
3512
3535
|
await this.config?.onTelemetry?.(e, t);
|
|
@@ -3596,7 +3619,7 @@ var Of = class {
|
|
|
3596
3619
|
destroy() {
|
|
3597
3620
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3598
3621
|
}
|
|
3599
|
-
},
|
|
3622
|
+
}, zf = /* @__PURE__ */ new Set([
|
|
3600
3623
|
"annotation-xml",
|
|
3601
3624
|
"color-profile",
|
|
3602
3625
|
"font-face",
|
|
@@ -3605,16 +3628,16 @@ var Of = class {
|
|
|
3605
3628
|
"font-face-format",
|
|
3606
3629
|
"font-face-name",
|
|
3607
3630
|
"missing-glyph"
|
|
3608
|
-
]),
|
|
3631
|
+
]), Df = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Hf = (e, t = "custom element tag") => {
|
|
3609
3632
|
if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
|
|
3610
3633
|
const r = e.trim();
|
|
3611
3634
|
if (!r) throw new Error(`Invalid ${t}: tag is empty`);
|
|
3612
3635
|
if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
|
|
3613
3636
|
if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
|
|
3614
|
-
if (
|
|
3615
|
-
if (!
|
|
3637
|
+
if (zf.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
|
|
3638
|
+
if (!Df.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3616
3639
|
return r;
|
|
3617
|
-
},
|
|
3640
|
+
}, cl = {
|
|
3618
3641
|
calculator: "pie-tool-calculator",
|
|
3619
3642
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3620
3643
|
ruler: "pie-tool-ruler",
|
|
@@ -3626,21 +3649,21 @@ var Of = class {
|
|
|
3626
3649
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3627
3650
|
graph: "pie-tool-graph",
|
|
3628
3651
|
periodicTable: "pie-tool-periodic-table"
|
|
3629
|
-
},
|
|
3630
|
-
const i =
|
|
3652
|
+
}, Wf = (e, t) => Hf(t?.toolTagMap?.[e] ?? cl[e] ?? e, `tool component tag for "${e}"`), Ff = (e) => document.createElement(e), Qe = (e, t, r, n) => {
|
|
3653
|
+
const i = Wf(e, n), o = n?.toolComponentFactories?.[e] ?? n?.toolComponentFactory;
|
|
3631
3654
|
return o ? o({
|
|
3632
3655
|
toolId: e,
|
|
3633
3656
|
tagName: i,
|
|
3634
3657
|
context: t,
|
|
3635
3658
|
toolbarContext: r
|
|
3636
|
-
}) :
|
|
3659
|
+
}) : Ff(i);
|
|
3637
3660
|
}, Ji = /* @__PURE__ */ new WeakMap();
|
|
3638
|
-
function
|
|
3661
|
+
function Bf(e, t) {
|
|
3639
3662
|
if (!e) return null;
|
|
3640
3663
|
const r = Ji.get(e), n = r?.get(t);
|
|
3641
3664
|
return n ? n.isConnected ? n : (r?.delete(t), null) : null;
|
|
3642
3665
|
}
|
|
3643
|
-
function
|
|
3666
|
+
function Uf(e, t, r) {
|
|
3644
3667
|
if (!e) return;
|
|
3645
3668
|
let n = Ji.get(e);
|
|
3646
3669
|
n || (n = /* @__PURE__ */ new Map(), Ji.set(e, n)), n.set(t, r);
|
|
@@ -3648,7 +3671,7 @@ function Hf(e, t, r) {
|
|
|
3648
3671
|
function ys(e) {
|
|
3649
3672
|
return e === "basic" || e === "scientific" ? e : null;
|
|
3650
3673
|
}
|
|
3651
|
-
function
|
|
3674
|
+
function jf(e) {
|
|
3652
3675
|
const t = e.getToolRenderParams?.("calculator") ?? {}, r = ys(t.calculatorType), n = t.availableTypes;
|
|
3653
3676
|
return {
|
|
3654
3677
|
calculatorType: r,
|
|
@@ -3660,14 +3683,14 @@ function Ts(e, t, r) {
|
|
|
3660
3683
|
const n = e;
|
|
3661
3684
|
t ? (n.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete n.calculatorType, e.removeAttribute("calculator-type")), r && r.length > 0 ? n.availableTypes = r : delete n.availableTypes;
|
|
3662
3685
|
}
|
|
3663
|
-
var
|
|
3686
|
+
var Gf = {
|
|
3664
3687
|
toolId: "calculator",
|
|
3665
3688
|
name: "Calculator",
|
|
3666
3689
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3667
3690
|
icon: "calculator",
|
|
3668
3691
|
provider: {
|
|
3669
3692
|
getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
|
|
3670
|
-
createProvider: () => new
|
|
3693
|
+
createProvider: () => new If(),
|
|
3671
3694
|
getInitConfig: (e) => e?.provider?.init ?? {},
|
|
3672
3695
|
getAuthFetcher: (e) => {
|
|
3673
3696
|
const t = e?.provider?.runtime?.authFetcher;
|
|
@@ -3693,8 +3716,8 @@ var Wf = {
|
|
|
3693
3716
|
return ii(e);
|
|
3694
3717
|
},
|
|
3695
3718
|
renderToolbar(e, t) {
|
|
3696
|
-
const { calculatorType: r, availableTypes: n, displayName: i } =
|
|
3697
|
-
a ||
|
|
3719
|
+
const { calculatorType: r, availableTypes: n, displayName: i } = jf(t), o = Co(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Bf(t.toolCoordinator, o), l = a ?? Qe(this.toolId, e, t, s);
|
|
3720
|
+
a || Uf(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Ts(l, r, n);
|
|
3698
3721
|
const c = r === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = r === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, d = {
|
|
3699
3722
|
toolId: this.toolId,
|
|
3700
3723
|
label: i,
|
|
@@ -3735,7 +3758,7 @@ var Wf = {
|
|
|
3735
3758
|
}
|
|
3736
3759
|
};
|
|
3737
3760
|
}
|
|
3738
|
-
}, Y = (e) => e.trim().replace(/\s+/g, " "),
|
|
3761
|
+
}, Y = (e) => e.trim().replace(/\s+/g, " "), ul = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, fl = (e) => {
|
|
3739
3762
|
if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
|
|
3740
3763
|
const t = e.classList;
|
|
3741
3764
|
if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
|
|
@@ -3749,12 +3772,12 @@ var Wf = {
|
|
|
3749
3772
|
}, Pr = (e, t) => {
|
|
3750
3773
|
let r = e.nodeType === 1 ? e : e.parentElement;
|
|
3751
3774
|
for (; r; ) {
|
|
3752
|
-
if (
|
|
3775
|
+
if (fl(r)) return !0;
|
|
3753
3776
|
if (t && r === t) break;
|
|
3754
3777
|
r = r.parentElement;
|
|
3755
3778
|
}
|
|
3756
3779
|
return !1;
|
|
3757
|
-
},
|
|
3780
|
+
}, dl = (e, t, r) => {
|
|
3758
3781
|
if (!e || !t || /\s/.test(e) || /\s/.test(t)) return !1;
|
|
3759
3782
|
const n = r?.boundarySpacingMode ?? "segmenterPreferred";
|
|
3760
3783
|
if (n === "none") return !1;
|
|
@@ -3782,7 +3805,7 @@ var Wf = {
|
|
|
3782
3805
|
const p = u;
|
|
3783
3806
|
if (p.parentElement && !Pr(p, e)) {
|
|
3784
3807
|
const g = p.textContent || "", m = g.match(/\S/), b = m ? m[0] : null;
|
|
3785
|
-
!o && !s &&
|
|
3808
|
+
!o && !s && dl(l, b, t) && (n.push(" "), a && r.set(i, a), i++, s = !0);
|
|
3786
3809
|
for (let T = 0; T < g.length; T++) {
|
|
3787
3810
|
const I = g[T], H = /\s/.test(I);
|
|
3788
3811
|
o ? H || (o = !1, n.push(I), r.set(i, {
|
|
@@ -3814,11 +3837,11 @@ var Wf = {
|
|
|
3814
3837
|
text: d,
|
|
3815
3838
|
map: r
|
|
3816
3839
|
};
|
|
3817
|
-
}, Ei = null, Ss = Promise.resolve(),
|
|
3840
|
+
}, Ei = null, Ss = Promise.resolve(), Vf = (e) => (e || "en").split("-")[0].toLowerCase() || "en", qf = async () => (Ei || (Ei = import("./sre-5M5pQS1Z.js").then((e) => /* @__PURE__ */ mc(e.default, 1)).then((e) => {
|
|
3818
3841
|
const t = e.default || e;
|
|
3819
3842
|
if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
3820
3843
|
return t;
|
|
3821
|
-
})), Ei),
|
|
3844
|
+
})), Ei), Yf = (e) => e === "en" ? "clearspeak" : "mathspeak", ws = (e) => !!e && typeof e == "object" && !Array.isArray(e), ks = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, si = (e) => {
|
|
3822
3845
|
if (!ws(e)) return;
|
|
3823
3846
|
const t = ks(e.domain), r = ks(e.style), n = ws(e.engineOptions) ? e.engineOptions : void 0;
|
|
3824
3847
|
if (!(!t && !r && !n))
|
|
@@ -3827,36 +3850,36 @@ var Wf = {
|
|
|
3827
3850
|
...r ? { style: r } : {},
|
|
3828
3851
|
...n ? { engineOptions: n } : {}
|
|
3829
3852
|
};
|
|
3830
|
-
},
|
|
3831
|
-
const i =
|
|
3853
|
+
}, Xf = async (e, t, r, n) => {
|
|
3854
|
+
const i = Vf(t), o = si(n);
|
|
3832
3855
|
await e.setupEngine?.({
|
|
3833
3856
|
...o?.engineOptions || {},
|
|
3834
3857
|
locale: i,
|
|
3835
|
-
domain: o?.domain ||
|
|
3858
|
+
domain: o?.domain || Yf(i),
|
|
3836
3859
|
...o?.style ? { style: o.style } : {},
|
|
3837
3860
|
modality: "speech",
|
|
3838
3861
|
markup: r
|
|
3839
3862
|
}), await e.engineReady?.();
|
|
3840
|
-
},
|
|
3863
|
+
}, Kf = async (e) => {
|
|
3841
3864
|
const t = Ss.then(e, e);
|
|
3842
3865
|
return Ss = t.then(() => {
|
|
3843
3866
|
}, () => {
|
|
3844
3867
|
}), t;
|
|
3845
|
-
},
|
|
3868
|
+
}, hl = async (e, t, r, n, i) => Kf(async () => (await Xf(e, r, n, i), e.toSpeech(t))), Jf = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), Zf = async (e, t, r, n) => {
|
|
3846
3869
|
try {
|
|
3847
|
-
const i =
|
|
3870
|
+
const i = Jf(await hl(e, t, r, "ssml", n));
|
|
3848
3871
|
return i.includes("<speak") ? i : null;
|
|
3849
3872
|
} catch (i) {
|
|
3850
3873
|
return console.debug("[TTSService] Math SSML generation failed; using plain", { message: i instanceof Error ? i.message : String(i) }), null;
|
|
3851
3874
|
}
|
|
3852
|
-
},
|
|
3875
|
+
}, pl = async (e, t = {}) => {
|
|
3853
3876
|
if (!e.some((c) => c.type === "math")) return {
|
|
3854
3877
|
speechText: Y(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
|
|
3855
3878
|
usedMathSpeech: !1,
|
|
3856
3879
|
usedFallback: !1
|
|
3857
3880
|
};
|
|
3858
3881
|
let r = null, n = !1, i = !1;
|
|
3859
|
-
const o = t.loadSre ||
|
|
3882
|
+
const o = t.loadSre || qf, s = [];
|
|
3860
3883
|
for (const c of e) {
|
|
3861
3884
|
if (c.type === "text") {
|
|
3862
3885
|
s.push(c.text);
|
|
@@ -3864,7 +3887,7 @@ var Wf = {
|
|
|
3864
3887
|
}
|
|
3865
3888
|
try {
|
|
3866
3889
|
r || (r = await o());
|
|
3867
|
-
const u = Y(await
|
|
3890
|
+
const u = Y(await hl(r, c.mathml, t.language, "none", t.mathSpeech));
|
|
3868
3891
|
if (u) {
|
|
3869
3892
|
s.push(u), n = !0;
|
|
3870
3893
|
continue;
|
|
@@ -3876,18 +3899,18 @@ var Wf = {
|
|
|
3876
3899
|
}
|
|
3877
3900
|
const a = Y(s.join(" "));
|
|
3878
3901
|
let l;
|
|
3879
|
-
return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await
|
|
3902
|
+
return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await Zf(r, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
|
|
3880
3903
|
speechText: a,
|
|
3881
3904
|
usedMathSpeech: n,
|
|
3882
3905
|
usedFallback: i,
|
|
3883
3906
|
ssml: l
|
|
3884
3907
|
};
|
|
3885
|
-
},
|
|
3908
|
+
}, Qf = /* @__PURE__ */ new Set([
|
|
3886
3909
|
"reserved-row",
|
|
3887
3910
|
"expanding-row",
|
|
3888
3911
|
"floating-overlay",
|
|
3889
3912
|
"left-aligned"
|
|
3890
|
-
]), Es = (e) => e && typeof e == "object" ? e : {},
|
|
3913
|
+
]), Es = (e) => e && typeof e == "object" ? e : {}, ed = (e) => e === "polly" || e === "google" || e === "server", Ee = (e, t) => e === void 0 ? t : e, Jn = (e, t = "left-aligned") => typeof e == "string" && Qf.has(e) ? e : t, xs = Object.freeze([0.8, 1.25]), xi = (e) => {
|
|
3891
3914
|
if (!Array.isArray(e)) return [...xs];
|
|
3892
3915
|
if (e.length === 0) return [];
|
|
3893
3916
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -3897,12 +3920,12 @@ var Wf = {
|
|
|
3897
3920
|
n !== 1 && t.add(n);
|
|
3898
3921
|
}
|
|
3899
3922
|
return t.size ? Array.from(t) : [...xs];
|
|
3900
|
-
},
|
|
3923
|
+
}, td = (e) => {
|
|
3901
3924
|
const t = {
|
|
3902
3925
|
...e,
|
|
3903
3926
|
layoutMode: Jn(e.layoutMode)
|
|
3904
3927
|
}, r = e.backend || "browser";
|
|
3905
|
-
if (!
|
|
3928
|
+
if (!ed(r)) return t;
|
|
3906
3929
|
const n = {
|
|
3907
3930
|
...t,
|
|
3908
3931
|
apiEndpoint: Ee(t.apiEndpoint, "/api/tts"),
|
|
@@ -3925,12 +3948,12 @@ var Wf = {
|
|
|
3925
3948
|
} : n;
|
|
3926
3949
|
}, Ai = (e) => {
|
|
3927
3950
|
const t = Es(e), r = Es(t.settings);
|
|
3928
|
-
return
|
|
3951
|
+
return td({
|
|
3929
3952
|
...t,
|
|
3930
3953
|
...r
|
|
3931
3954
|
});
|
|
3932
|
-
}, Zi = (e) => e.backend || "browser",
|
|
3933
|
-
const t = Zi(e), r =
|
|
3955
|
+
}, Zi = (e) => e.backend || "browser", gl = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, ml = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), rd = (e) => {
|
|
3956
|
+
const t = Zi(e), r = gl(e, t), n = ml(e, r), i = si(e.mathSpeech);
|
|
3934
3957
|
return {
|
|
3935
3958
|
voice: e.defaultVoice,
|
|
3936
3959
|
rate: e.rate,
|
|
@@ -3956,8 +3979,8 @@ var Wf = {
|
|
|
3956
3979
|
validateEndpoint: e.validateEndpoint,
|
|
3957
3980
|
...typeof e.mathTokenHighlighting == "boolean" ? { mathTokenHighlighting: e.mathTokenHighlighting } : {}
|
|
3958
3981
|
};
|
|
3959
|
-
},
|
|
3960
|
-
switch (
|
|
3982
|
+
}, vl = (e) => Jn(e.layoutMode), nd = (e) => {
|
|
3983
|
+
switch (vl(e)) {
|
|
3961
3984
|
case "reserved-row":
|
|
3962
3985
|
return {
|
|
3963
3986
|
mount: "before-buttons",
|
|
@@ -3983,21 +4006,21 @@ var Wf = {
|
|
|
3983
4006
|
}
|
|
3984
4007
|
};
|
|
3985
4008
|
}
|
|
3986
|
-
}, jr = /* @__PURE__ */ new Map(),
|
|
4009
|
+
}, jr = /* @__PURE__ */ new Map(), id = "__pieToolElementUnmount", As = "pie-tool-active-change", od = {
|
|
3987
4010
|
toolId: "textToSpeech",
|
|
3988
4011
|
name: "Text to Speech",
|
|
3989
4012
|
description: "Read content aloud",
|
|
3990
4013
|
icon: "volume-up",
|
|
3991
4014
|
provider: {
|
|
3992
4015
|
getProviderId: () => "tts",
|
|
3993
|
-
createProvider: (e) => new
|
|
4016
|
+
createProvider: (e) => new $f(Zi(Ai(e))),
|
|
3994
4017
|
getInitConfig: (e) => {
|
|
3995
|
-
const t = Ai(e), r = Zi(t), n =
|
|
4018
|
+
const t = Ai(e), r = Zi(t), n = gl(t, r);
|
|
3996
4019
|
return {
|
|
3997
4020
|
backend: r,
|
|
3998
4021
|
serverProvider: n,
|
|
3999
|
-
transportMode:
|
|
4000
|
-
...
|
|
4022
|
+
transportMode: ml(t, n),
|
|
4023
|
+
...rd(t)
|
|
4001
4024
|
};
|
|
4002
4025
|
},
|
|
4003
4026
|
getAuthFetcher: (e) => {
|
|
@@ -4023,12 +4046,12 @@ var Wf = {
|
|
|
4023
4046
|
return oi(e);
|
|
4024
4047
|
},
|
|
4025
4048
|
renderToolbar(e, t) {
|
|
4026
|
-
const r = () => Ai(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => xi(r().speedOptions), i = () =>
|
|
4049
|
+
const r = () => Ai(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => xi(r().speedOptions), i = () => vl(r()), o = () => nd(r()), s = Co(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
|
|
4027
4050
|
const u = t.ui?.size;
|
|
4028
4051
|
return u === "sm" || u === "lg" ? u : "md";
|
|
4029
4052
|
}, l = () => {
|
|
4030
4053
|
let u = jr.get(s);
|
|
4031
|
-
return u && typeof u.isConnected == "boolean" && !u.isConnected && (jr.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[
|
|
4054
|
+
return u && typeof u.isConnected == "boolean" && !u.isConnected && (jr.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[id] = () => {
|
|
4032
4055
|
jr.get(s) === u && jr.delete(s);
|
|
4033
4056
|
}, jr.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = n(), u;
|
|
4034
4057
|
}, c = o();
|
|
@@ -4077,7 +4100,7 @@ function vt(e) {
|
|
|
4077
4100
|
function Ro(e, t) {
|
|
4078
4101
|
e.setAttribute("data-pie-tool-surface", t);
|
|
4079
4102
|
}
|
|
4080
|
-
var
|
|
4103
|
+
var sd = {
|
|
4081
4104
|
toolId: "ruler",
|
|
4082
4105
|
name: "Ruler",
|
|
4083
4106
|
description: "On-screen ruler for measurements",
|
|
@@ -4119,7 +4142,7 @@ var rd = {
|
|
|
4119
4142
|
subscribeActive: r.subscribeActive
|
|
4120
4143
|
};
|
|
4121
4144
|
}
|
|
4122
|
-
},
|
|
4145
|
+
}, ad = {
|
|
4123
4146
|
toolId: "protractor",
|
|
4124
4147
|
name: "Protractor",
|
|
4125
4148
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4161,7 +4184,7 @@ var rd = {
|
|
|
4161
4184
|
subscribeActive: r.subscribeActive
|
|
4162
4185
|
};
|
|
4163
4186
|
}
|
|
4164
|
-
},
|
|
4187
|
+
}, ld = {
|
|
4165
4188
|
toolId: "answerEliminator",
|
|
4166
4189
|
name: "Answer Eliminator",
|
|
4167
4190
|
description: "Strike through answer choices",
|
|
@@ -4174,7 +4197,7 @@ var rd = {
|
|
|
4174
4197
|
"choiceMasking"
|
|
4175
4198
|
],
|
|
4176
4199
|
isVisibleInContext(e) {
|
|
4177
|
-
return
|
|
4200
|
+
return xf(e);
|
|
4178
4201
|
},
|
|
4179
4202
|
renderToolbar(e, t) {
|
|
4180
4203
|
const r = mt(this.toolId, t), n = t.componentOverrides ?? {}, i = Qe(this.toolId, e, t, n);
|
|
@@ -4208,7 +4231,7 @@ var rd = {
|
|
|
4208
4231
|
subscribeActive: r.subscribeActive
|
|
4209
4232
|
};
|
|
4210
4233
|
}
|
|
4211
|
-
},
|
|
4234
|
+
}, cd = {
|
|
4212
4235
|
toolId: "highlighter",
|
|
4213
4236
|
name: "Highlighter",
|
|
4214
4237
|
description: "Highlight text",
|
|
@@ -4259,7 +4282,7 @@ var rd = {
|
|
|
4259
4282
|
subscribeActive: r.subscribeActive
|
|
4260
4283
|
};
|
|
4261
4284
|
}
|
|
4262
|
-
},
|
|
4285
|
+
}, ud = {
|
|
4263
4286
|
toolId: "lineReader",
|
|
4264
4287
|
name: "Line Reader",
|
|
4265
4288
|
description: "Reading guide overlay",
|
|
@@ -4308,7 +4331,7 @@ var rd = {
|
|
|
4308
4331
|
subscribeActive: r.subscribeActive
|
|
4309
4332
|
};
|
|
4310
4333
|
}
|
|
4311
|
-
},
|
|
4334
|
+
}, fd = {
|
|
4312
4335
|
toolId: "theme",
|
|
4313
4336
|
name: "Theme",
|
|
4314
4337
|
description: "Accessible themes and contrast",
|
|
@@ -4363,7 +4386,7 @@ var rd = {
|
|
|
4363
4386
|
subscribeActive: r.subscribeActive
|
|
4364
4387
|
};
|
|
4365
4388
|
}
|
|
4366
|
-
},
|
|
4389
|
+
}, dd = {
|
|
4367
4390
|
toolId: "annotationToolbar",
|
|
4368
4391
|
name: "Highlighter",
|
|
4369
4392
|
description: "Highlight and annotate text",
|
|
@@ -4414,7 +4437,7 @@ var rd = {
|
|
|
4414
4437
|
subscribeActive: r.subscribeActive
|
|
4415
4438
|
};
|
|
4416
4439
|
}
|
|
4417
|
-
},
|
|
4440
|
+
}, hd = {
|
|
4418
4441
|
toolId: "graph",
|
|
4419
4442
|
name: "Graph",
|
|
4420
4443
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4467,7 +4490,7 @@ var rd = {
|
|
|
4467
4490
|
subscribeActive: r.subscribeActive
|
|
4468
4491
|
};
|
|
4469
4492
|
}
|
|
4470
|
-
},
|
|
4493
|
+
}, pd = {
|
|
4471
4494
|
toolId: "periodicTable",
|
|
4472
4495
|
name: "Periodic Table",
|
|
4473
4496
|
description: "Chemistry periodic table reference",
|
|
@@ -4479,7 +4502,7 @@ var rd = {
|
|
|
4479
4502
|
"elementReference"
|
|
4480
4503
|
],
|
|
4481
4504
|
isVisibleInContext(e) {
|
|
4482
|
-
return
|
|
4505
|
+
return Af(e);
|
|
4483
4506
|
},
|
|
4484
4507
|
renderToolbar(e, t) {
|
|
4485
4508
|
const r = mt(this.toolId, t), n = {
|
|
@@ -4519,54 +4542,54 @@ var rd = {
|
|
|
4519
4542
|
subscribeActive: r.subscribeActive
|
|
4520
4543
|
};
|
|
4521
4544
|
}
|
|
4522
|
-
},
|
|
4523
|
-
|
|
4524
|
-
td,
|
|
4525
|
-
rd,
|
|
4526
|
-
nd,
|
|
4527
|
-
id,
|
|
4545
|
+
}, gd = [
|
|
4546
|
+
Gf,
|
|
4528
4547
|
od,
|
|
4529
4548
|
sd,
|
|
4530
4549
|
ad,
|
|
4531
4550
|
ld,
|
|
4532
4551
|
cd,
|
|
4533
|
-
ud
|
|
4552
|
+
ud,
|
|
4553
|
+
fd,
|
|
4554
|
+
dd,
|
|
4555
|
+
hd,
|
|
4556
|
+
pd
|
|
4534
4557
|
];
|
|
4535
|
-
function
|
|
4536
|
-
const t = new
|
|
4558
|
+
function md(e = {}) {
|
|
4559
|
+
const t = new wf(), r = {
|
|
4537
4560
|
toolTagMap: {
|
|
4538
|
-
...
|
|
4561
|
+
...cl,
|
|
4539
4562
|
...e.toolTagMap || {}
|
|
4540
4563
|
},
|
|
4541
4564
|
toolComponentFactory: e.toolComponentFactory,
|
|
4542
4565
|
toolComponentFactories: e.toolComponentFactories
|
|
4543
4566
|
}, n = (i) => e.overrides?.[i.toolId] || i;
|
|
4544
|
-
return e.includePackagedTools &&
|
|
4567
|
+
return e.includePackagedTools && vd(t, {
|
|
4545
4568
|
toolIds: e.toolIds,
|
|
4546
4569
|
applyOverrides: n
|
|
4547
4570
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
|
|
4548
4571
|
}
|
|
4549
|
-
function
|
|
4572
|
+
function vd(e, t = {}) {
|
|
4550
4573
|
const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, n = t.applyOverrides || ((i) => i);
|
|
4551
|
-
for (const i of
|
|
4574
|
+
for (const i of gd)
|
|
4552
4575
|
r && !r.has(i.toolId) || e.register(n(i));
|
|
4553
4576
|
}
|
|
4554
|
-
function
|
|
4555
|
-
return
|
|
4577
|
+
function _d(e = {}) {
|
|
4578
|
+
return md({
|
|
4556
4579
|
...e,
|
|
4557
4580
|
includePackagedTools: !0
|
|
4558
4581
|
});
|
|
4559
4582
|
}
|
|
4560
|
-
function
|
|
4561
|
-
const e =
|
|
4583
|
+
function bd() {
|
|
4584
|
+
const e = _d(), t = /* @__PURE__ */ new Set();
|
|
4562
4585
|
for (const r of e.getAllTools()) for (const n of r.pnpSupportIds || []) t.add(n);
|
|
4563
4586
|
return [...t].sort();
|
|
4564
4587
|
}
|
|
4565
|
-
var
|
|
4566
|
-
supports: [...
|
|
4588
|
+
var yd = bd(), _g = {
|
|
4589
|
+
supports: [...yd],
|
|
4567
4590
|
prohibitedSupports: [],
|
|
4568
4591
|
activateAtInit: []
|
|
4569
|
-
},
|
|
4592
|
+
}, Td = {
|
|
4570
4593
|
visual: {
|
|
4571
4594
|
magnification: "magnification",
|
|
4572
4595
|
screenMagnifier: "screenMagnifier",
|
|
@@ -4679,11 +4702,11 @@ var md = gd(), pg = {
|
|
|
4679
4702
|
itemGlossary: "itemGlossary",
|
|
4680
4703
|
tutorialAvailable: "tutorialAvailable"
|
|
4681
4704
|
}
|
|
4682
|
-
},
|
|
4705
|
+
}, bg = Object.values(Td).flatMap((e) => Object.values(e)), yg = il("ToolCoordinator"), Qi;
|
|
4683
4706
|
(function(e) {
|
|
4684
4707
|
e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
4685
4708
|
})(Qi || (Qi = {}));
|
|
4686
|
-
var
|
|
4709
|
+
var Sd = /* @__PURE__ */ new Set([
|
|
4687
4710
|
"speak",
|
|
4688
4711
|
"p",
|
|
4689
4712
|
"s",
|
|
@@ -4692,20 +4715,20 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4692
4715
|
"say-as",
|
|
4693
4716
|
"voice",
|
|
4694
4717
|
"lang"
|
|
4695
|
-
]), Ms = /* @__PURE__ */ new Set(["audio", "phoneme"]),
|
|
4718
|
+
]), Ms = /* @__PURE__ */ new Set(["audio", "phoneme"]), _l = (e) => e.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/ /g, " ").replace(/&/g, "&"), Pn = (e, t, r) => {
|
|
4696
4719
|
for (let n = 0; n < t.length; n++) e.push({
|
|
4697
4720
|
char: t[n],
|
|
4698
4721
|
rawOffset: r === null ? null : r + n
|
|
4699
4722
|
});
|
|
4700
|
-
},
|
|
4723
|
+
}, wd = (e, t, r) => {
|
|
4701
4724
|
const n = t.slice(r).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
|
|
4702
|
-
return n ? (Pn(e,
|
|
4725
|
+
return n ? (Pn(e, _l(n[0]), r), n[0].length) : 0;
|
|
4703
4726
|
}, Cs = (e) => {
|
|
4704
4727
|
e.push({
|
|
4705
4728
|
char: " ",
|
|
4706
4729
|
rawOffset: null
|
|
4707
4730
|
});
|
|
4708
|
-
},
|
|
4731
|
+
}, kd = (e) => {
|
|
4709
4732
|
const t = /* @__PURE__ */ new Map(), r = [];
|
|
4710
4733
|
let n = !0;
|
|
4711
4734
|
for (const i of e) {
|
|
@@ -4721,17 +4744,17 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4721
4744
|
text: r.join(""),
|
|
4722
4745
|
rawToSpokenOffsetMap: t
|
|
4723
4746
|
};
|
|
4724
|
-
},
|
|
4747
|
+
}, Ed = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", xd = (e, t) => {
|
|
4725
4748
|
const r = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), n = e.match(r);
|
|
4726
|
-
return
|
|
4727
|
-
},
|
|
4749
|
+
return _l(n?.[2] ?? n?.[3] ?? "") || null;
|
|
4750
|
+
}, bl = (e) => {
|
|
4728
4751
|
const t = [];
|
|
4729
4752
|
let r = !1, n = !1, i = 0;
|
|
4730
4753
|
for (; i < e.length; ) {
|
|
4731
4754
|
const s = e[i];
|
|
4732
4755
|
if (s !== "<") {
|
|
4733
4756
|
if (s === "&") {
|
|
4734
|
-
const p =
|
|
4757
|
+
const p = wd(t, e, i);
|
|
4735
4758
|
if (p > 0) {
|
|
4736
4759
|
i += p;
|
|
4737
4760
|
continue;
|
|
@@ -4746,9 +4769,9 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4746
4769
|
continue;
|
|
4747
4770
|
}
|
|
4748
4771
|
n = !0;
|
|
4749
|
-
const l = e.slice(i, a + 1), c =
|
|
4772
|
+
const l = e.slice(i, a + 1), c = Ed(l), u = /^<\s*\//.test(l), d = /\/\s*>$/.test(l);
|
|
4750
4773
|
if (!u && c === "sub") {
|
|
4751
|
-
const p =
|
|
4774
|
+
const p = xd(l, "alias");
|
|
4752
4775
|
if (!p) {
|
|
4753
4776
|
r = !0, i = a + 1;
|
|
4754
4777
|
continue;
|
|
@@ -4766,16 +4789,16 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4766
4789
|
i = a + 1;
|
|
4767
4790
|
continue;
|
|
4768
4791
|
}
|
|
4769
|
-
c && !
|
|
4792
|
+
c && !Sd.has(c) && !Ms.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && Cs(t), i = a + 1;
|
|
4770
4793
|
}
|
|
4771
|
-
const o =
|
|
4794
|
+
const o = kd(t);
|
|
4772
4795
|
return {
|
|
4773
4796
|
spokenText: Y(o.text),
|
|
4774
4797
|
rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
|
|
4775
4798
|
unsupportedSemantic: r,
|
|
4776
4799
|
hasMarkup: n
|
|
4777
4800
|
};
|
|
4778
|
-
},
|
|
4801
|
+
}, Ad = ul(), yl = /* @__PURE__ */ new Map([
|
|
4779
4802
|
["zero", "0"],
|
|
4780
4803
|
["one", "1"],
|
|
4781
4804
|
["two", "2"],
|
|
@@ -4787,7 +4810,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4787
4810
|
["eight", "8"],
|
|
4788
4811
|
["nine", "9"],
|
|
4789
4812
|
["ten", "10"]
|
|
4790
|
-
]),
|
|
4813
|
+
]), Md = [
|
|
4791
4814
|
{
|
|
4792
4815
|
phrase: [
|
|
4793
4816
|
"plus",
|
|
@@ -4864,7 +4887,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4864
4887
|
}
|
|
4865
4888
|
], eo = (e) => {
|
|
4866
4889
|
const t = [];
|
|
4867
|
-
for (const r of e.matchAll(
|
|
4890
|
+
for (const r of e.matchAll(Ad)) {
|
|
4868
4891
|
const n = r[0], i = r.index ?? 0;
|
|
4869
4892
|
t.push({
|
|
4870
4893
|
text: n,
|
|
@@ -4874,7 +4897,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4874
4897
|
});
|
|
4875
4898
|
}
|
|
4876
4899
|
return t;
|
|
4877
|
-
}, to = (e) =>
|
|
4900
|
+
}, to = (e) => yl.get(e.normalized) || e.normalized, Cd = (e, t) => {
|
|
4878
4901
|
const r = [];
|
|
4879
4902
|
for (let n = 0; n < e.length; n++) {
|
|
4880
4903
|
for (let i = 0; i < t.length; i++) to(e[n]) === to(t[i]) && r.push({
|
|
@@ -4883,7 +4906,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4883
4906
|
visibleToken: i,
|
|
4884
4907
|
score: 10
|
|
4885
4908
|
});
|
|
4886
|
-
for (const i of
|
|
4909
|
+
for (const i of Md) {
|
|
4887
4910
|
const o = e.slice(n, n + i.phrase.length);
|
|
4888
4911
|
if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
|
|
4889
4912
|
for (let s = 0; s < t.length; s++)
|
|
@@ -4896,8 +4919,8 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4896
4919
|
}
|
|
4897
4920
|
}
|
|
4898
4921
|
return r;
|
|
4899
|
-
},
|
|
4900
|
-
const r =
|
|
4922
|
+
}, Od = (e, t) => {
|
|
4923
|
+
const r = Cd(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
|
|
4901
4924
|
for (let l = 0; l < r.length; l++) {
|
|
4902
4925
|
const c = r[l];
|
|
4903
4926
|
n[l] = c.score;
|
|
@@ -4926,12 +4949,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4926
4949
|
score: l.score
|
|
4927
4950
|
};
|
|
4928
4951
|
});
|
|
4929
|
-
},
|
|
4952
|
+
}, Id = (e, t, r) => {
|
|
4930
4953
|
if (e.length === 0) return 0;
|
|
4931
4954
|
const n = e.length / Math.max(1, Math.min(t.length, r.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
|
|
4932
4955
|
return Math.min(1, n * i);
|
|
4933
|
-
},
|
|
4934
|
-
const t =
|
|
4956
|
+
}, Tl = (e) => {
|
|
4957
|
+
const t = bl(e.speechText), r = Y(e.visibleText), n = t.spokenText, i = eo(n), o = eo(r), s = t.unsupportedSemantic ? [] : Od(i, o), a = Id(s, i, o), l = n === r && n.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", d = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
4935
4958
|
return {
|
|
4936
4959
|
speechText: e.speechText,
|
|
4937
4960
|
spokenText: n,
|
|
@@ -4944,12 +4967,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4944
4967
|
visibleTokens: o,
|
|
4945
4968
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap
|
|
4946
4969
|
};
|
|
4947
|
-
}, Lo = (e, t) => e.find((r) => r.start <= t && t < r.end) || null,
|
|
4970
|
+
}, Lo = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, Sl = (e) => {
|
|
4948
4971
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
4949
4972
|
const t = eo(e)[0];
|
|
4950
|
-
return t ?
|
|
4973
|
+
return t ? yl.get(t.normalized) || t.normalized : null;
|
|
4951
4974
|
}, Os = (e, t, r) => {
|
|
4952
|
-
const n =
|
|
4975
|
+
const n = Sl(r);
|
|
4953
4976
|
if (!t || !n) return !1;
|
|
4954
4977
|
const i = Lo(e.spokenTokens, t.start);
|
|
4955
4978
|
return i ? to(i) === n : !1;
|
|
@@ -4977,7 +5000,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4977
5000
|
start: t,
|
|
4978
5001
|
length: Math.min(r, n.end - t)
|
|
4979
5002
|
} : null;
|
|
4980
|
-
},
|
|
5003
|
+
}, Rd = (e, t, r = 1, n) => {
|
|
4981
5004
|
if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
|
|
4982
5005
|
const i = Math.max(1, Number.isFinite(r) ? r : 1);
|
|
4983
5006
|
if (n && /^<[^>]+>$/.test(n.trim())) return null;
|
|
@@ -4986,12 +5009,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
4986
5009
|
if (n) {
|
|
4987
5010
|
if (Os(e, o, n)) return o;
|
|
4988
5011
|
if (Os(e, s, n)) return s;
|
|
4989
|
-
if (
|
|
5012
|
+
if (Sl(n)) return null;
|
|
4990
5013
|
}
|
|
4991
5014
|
return o || s;
|
|
4992
5015
|
}
|
|
4993
5016
|
return Ls(e, t, i) || Rs(e, t, i);
|
|
4994
|
-
},
|
|
5017
|
+
}, Ld = (e, t) => {
|
|
4995
5018
|
if (e.playbackMode === "region-fallback") return null;
|
|
4996
5019
|
const r = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
|
|
4997
5020
|
if (r) return {
|
|
@@ -5013,7 +5036,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5013
5036
|
start: Math.min(n.visibleStart, i.visibleStart),
|
|
5014
5037
|
end: Math.max(n.visibleEnd, i.visibleEnd)
|
|
5015
5038
|
} : null;
|
|
5016
|
-
},
|
|
5039
|
+
}, Pd = /* @__PURE__ */ new Map([
|
|
5017
5040
|
["+", ["plus"]],
|
|
5018
5041
|
["-", ["minus", "negative"]],
|
|
5019
5042
|
["−", ["minus", "negative"]],
|
|
@@ -5037,12 +5060,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5037
5060
|
["•", ["times"]],
|
|
5038
5061
|
["·", ["times"]],
|
|
5039
5062
|
["", ["times", "multiplied by"]]
|
|
5040
|
-
]),
|
|
5063
|
+
]), Nd = /* @__PURE__ */ new Map([
|
|
5041
5064
|
["", "function-application"],
|
|
5042
5065
|
["", "implicit-multiply"],
|
|
5043
5066
|
["", "invisible-separator"],
|
|
5044
5067
|
["", "invisible-plus"]
|
|
5045
|
-
]),
|
|
5068
|
+
]), wl = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), $d = /* @__PURE__ */ new Map([
|
|
5046
5069
|
["msqrt", "radical"],
|
|
5047
5070
|
["mroot", "radical"],
|
|
5048
5071
|
["msub", "subscript"],
|
|
@@ -5052,11 +5075,11 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5052
5075
|
["munderover", "underoverscript"],
|
|
5053
5076
|
["mmultiscripts", "multiscript"],
|
|
5054
5077
|
["menclose", "enclosure"]
|
|
5055
|
-
]),
|
|
5078
|
+
]), zd = (e) => e.replace(/\s+/g, " ").trim(), Qt = (e) => (e.localName || e.tagName || "").toLowerCase(), Dd = (e) => e.nodeType === Node.ELEMENT_NODE, Rr = (e) => Array.from(e.childNodes).filter(Dd), Po = (e) => zd(e.textContent || ""), ht = (e, t) => ({
|
|
5056
5079
|
type: "element-range",
|
|
5057
5080
|
quality: t,
|
|
5058
5081
|
element: e
|
|
5059
|
-
}),
|
|
5082
|
+
}), Hd = (e) => {
|
|
5060
5083
|
switch (e) {
|
|
5061
5084
|
case "mi":
|
|
5062
5085
|
return "identifier";
|
|
@@ -5072,15 +5095,15 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5072
5095
|
default:
|
|
5073
5096
|
return "unknown";
|
|
5074
5097
|
}
|
|
5075
|
-
},
|
|
5076
|
-
const t = e.normalized ??
|
|
5098
|
+
}, Wd = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Fd = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? wl.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? Pd.get(e) || [] : [], rr = (e) => {
|
|
5099
|
+
const t = e.normalized ?? Wd(e.text, e.kind || "unknown");
|
|
5077
5100
|
return {
|
|
5078
5101
|
id: `math-token-${e.state.nextId++}`,
|
|
5079
5102
|
kind: e.kind,
|
|
5080
5103
|
role: e.role,
|
|
5081
5104
|
text: e.text,
|
|
5082
5105
|
normalized: t,
|
|
5083
|
-
spokenAliases:
|
|
5106
|
+
spokenAliases: Fd(e.text, e.kind, e.role),
|
|
5084
5107
|
sourceElement: e.sourceElement,
|
|
5085
5108
|
path: e.path,
|
|
5086
5109
|
target: e.target || ht(e.sourceElement, "element-range"),
|
|
@@ -5088,9 +5111,9 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5088
5111
|
};
|
|
5089
5112
|
}, nr = (e, t, r = "tokens") => {
|
|
5090
5113
|
e[r].push(t);
|
|
5091
|
-
},
|
|
5114
|
+
}, kl = (e, t, r) => {
|
|
5092
5115
|
Rr(e).forEach((n, i) => pt(n, t, `${r}/${Qt(n)}[${i}]`));
|
|
5093
|
-
},
|
|
5116
|
+
}, Bd = (e, t, r) => {
|
|
5094
5117
|
const n = Rr(e);
|
|
5095
5118
|
n[0] && pt(n[0], t, `${r}/numerator`), nr(t, rr({
|
|
5096
5119
|
state: t,
|
|
@@ -5101,7 +5124,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5101
5124
|
path: r,
|
|
5102
5125
|
target: ht(e, "element-range")
|
|
5103
5126
|
})), n[1] && pt(n[1], t, `${r}/denominator`);
|
|
5104
|
-
},
|
|
5127
|
+
}, Ud = (e, t, r) => {
|
|
5105
5128
|
const n = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
|
|
5106
5129
|
nr(t, rr({
|
|
5107
5130
|
state: t,
|
|
@@ -5111,7 +5134,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5111
5134
|
sourceElement: e,
|
|
5112
5135
|
path: `${r}/open`,
|
|
5113
5136
|
target: ht(e, "element-range")
|
|
5114
|
-
})),
|
|
5137
|
+
})), kl(e, t, r), nr(t, rr({
|
|
5115
5138
|
state: t,
|
|
5116
5139
|
kind: "operator",
|
|
5117
5140
|
role: i === "|" ? "absolute-value-fence" : "close-fence",
|
|
@@ -5120,13 +5143,13 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5120
5143
|
path: `${r}/close`,
|
|
5121
5144
|
target: ht(e, "element-range")
|
|
5122
5145
|
}));
|
|
5123
|
-
},
|
|
5146
|
+
}, jd = (e, t, r) => {
|
|
5124
5147
|
const n = Rr(e);
|
|
5125
5148
|
n[0] && pt(n[0], t, `${r}/base`);
|
|
5126
5149
|
const i = n[1];
|
|
5127
5150
|
if (!i) return;
|
|
5128
5151
|
const o = Po(i);
|
|
5129
|
-
if (
|
|
5152
|
+
if (wl.has(o)) {
|
|
5130
5153
|
nr(t, rr({
|
|
5131
5154
|
state: t,
|
|
5132
5155
|
kind: "structure",
|
|
@@ -5140,7 +5163,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5140
5163
|
return;
|
|
5141
5164
|
}
|
|
5142
5165
|
pt(i, t, `${r}/exponent`);
|
|
5143
|
-
},
|
|
5166
|
+
}, Gd = (e, t, r, n) => {
|
|
5144
5167
|
nr(t, rr({
|
|
5145
5168
|
state: t,
|
|
5146
5169
|
kind: "structure",
|
|
@@ -5151,7 +5174,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5151
5174
|
path: r,
|
|
5152
5175
|
target: ht(e, "element-range")
|
|
5153
5176
|
}));
|
|
5154
|
-
},
|
|
5177
|
+
}, Vd = (e, t, r) => {
|
|
5155
5178
|
let n = 0;
|
|
5156
5179
|
for (const i of Rr(e))
|
|
5157
5180
|
(Qt(i) === "mtr" || Qt(i) === "mlabeledtr") && (n++, nr(t, rr({
|
|
@@ -5164,10 +5187,10 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5164
5187
|
path: `${r}/row[${n}]`,
|
|
5165
5188
|
target: ht(i, "region-fallback")
|
|
5166
5189
|
}), "layoutTargets")), pt(i, t, `${r}/${Qt(i)}[${n}]`);
|
|
5167
|
-
},
|
|
5190
|
+
}, qd = (e, t, r) => {
|
|
5168
5191
|
const n = Po(e);
|
|
5169
5192
|
if (!n) return;
|
|
5170
|
-
const i =
|
|
5193
|
+
const i = Hd(Qt(e)), o = i === "operator" ? Nd.get(n) : void 0, s = o ?? (i === "operator" && (n === "(" || n === ")") ? "grouping-fence" : i);
|
|
5171
5194
|
nr(t, rr({
|
|
5172
5195
|
state: t,
|
|
5173
5196
|
kind: i,
|
|
@@ -5198,19 +5221,19 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5198
5221
|
case "mtext":
|
|
5199
5222
|
case "ms":
|
|
5200
5223
|
case "mspace":
|
|
5201
|
-
|
|
5224
|
+
qd(e, t, r);
|
|
5202
5225
|
return;
|
|
5203
5226
|
case "mfrac":
|
|
5204
|
-
|
|
5227
|
+
Bd(e, t, r);
|
|
5205
5228
|
return;
|
|
5206
5229
|
case "msup":
|
|
5207
|
-
|
|
5230
|
+
jd(e, t, r);
|
|
5208
5231
|
return;
|
|
5209
5232
|
case "mfenced":
|
|
5210
|
-
|
|
5233
|
+
Ud(e, t, r);
|
|
5211
5234
|
return;
|
|
5212
5235
|
case "mtable":
|
|
5213
|
-
|
|
5236
|
+
Vd(e, t, r);
|
|
5214
5237
|
return;
|
|
5215
5238
|
case "mphantom":
|
|
5216
5239
|
return;
|
|
@@ -5220,15 +5243,15 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5220
5243
|
return;
|
|
5221
5244
|
}
|
|
5222
5245
|
default: {
|
|
5223
|
-
const i =
|
|
5246
|
+
const i = $d.get(n);
|
|
5224
5247
|
if (i) {
|
|
5225
|
-
|
|
5248
|
+
Gd(e, t, r, i);
|
|
5226
5249
|
return;
|
|
5227
5250
|
}
|
|
5228
|
-
|
|
5251
|
+
kl(e, t, r);
|
|
5229
5252
|
}
|
|
5230
5253
|
}
|
|
5231
|
-
},
|
|
5254
|
+
}, Yd = (e) => {
|
|
5232
5255
|
const t = {
|
|
5233
5256
|
tokens: [],
|
|
5234
5257
|
layoutTargets: [],
|
|
@@ -5239,7 +5262,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5239
5262
|
layoutTargets: t.layoutTargets,
|
|
5240
5263
|
expressionTarget: ht(e, "region-fallback")
|
|
5241
5264
|
};
|
|
5242
|
-
},
|
|
5265
|
+
}, Xd = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Kd = 0.95, Jd = (e) => {
|
|
5243
5266
|
const t = [], r = /* @__PURE__ */ new Set(), n = (i) => {
|
|
5244
5267
|
const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
5245
5268
|
if (o.length === 0) return;
|
|
@@ -5264,11 +5287,11 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5264
5287
|
o && (n = i.length);
|
|
5265
5288
|
}
|
|
5266
5289
|
return n;
|
|
5267
|
-
},
|
|
5290
|
+
}, Zd = (e, t) => {
|
|
5268
5291
|
const r = [];
|
|
5269
5292
|
let n = 0;
|
|
5270
5293
|
for (const i of t) {
|
|
5271
|
-
const o =
|
|
5294
|
+
const o = Jd(i);
|
|
5272
5295
|
if (i.optional) {
|
|
5273
5296
|
const s = Ps(e, n, o);
|
|
5274
5297
|
s > 0 && (r.push({
|
|
@@ -5290,23 +5313,23 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5290
5313
|
}
|
|
5291
5314
|
}
|
|
5292
5315
|
return r;
|
|
5293
|
-
},
|
|
5316
|
+
}, Qd = (e, t, r) => {
|
|
5294
5317
|
const n = r.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
|
|
5295
5318
|
return n > 0 && i === n && o === t.length;
|
|
5296
|
-
},
|
|
5319
|
+
}, eh = (e) => e.map(({ speechTokens: t, math: r }) => ({
|
|
5297
5320
|
speechTokenIds: t.map((n) => n.id),
|
|
5298
5321
|
mathTokenIds: [r.id],
|
|
5299
5322
|
score: 1,
|
|
5300
5323
|
confidence: 1,
|
|
5301
5324
|
target: r.target
|
|
5302
|
-
})),
|
|
5303
|
-
const t = e.minExactWordConfidence ??
|
|
5325
|
+
})), th = (e) => {
|
|
5326
|
+
const t = e.minExactWordConfidence ?? Kd, r = Zd(e.speech.tokens, e.math.tokens), n = Qd(r, e.speech.tokens, e.math.tokens) ? 1 : 0;
|
|
5304
5327
|
return {
|
|
5305
|
-
segments: n >= t ?
|
|
5328
|
+
segments: n >= t ? eh(r) : [],
|
|
5306
5329
|
confidence: n,
|
|
5307
5330
|
fallbackTarget: e.math.expressionTarget
|
|
5308
5331
|
};
|
|
5309
|
-
},
|
|
5332
|
+
}, El = ul(), rh = /* @__PURE__ */ new Map([
|
|
5310
5333
|
["zero", "0"],
|
|
5311
5334
|
["one", "1"],
|
|
5312
5335
|
["two", "2"],
|
|
@@ -5318,17 +5341,17 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5318
5341
|
["eight", "8"],
|
|
5319
5342
|
["nine", "9"],
|
|
5320
5343
|
["ten", "10"]
|
|
5321
|
-
]),
|
|
5344
|
+
]), xl = (e) => {
|
|
5322
5345
|
const t = e.toLowerCase();
|
|
5323
|
-
return
|
|
5324
|
-
},
|
|
5346
|
+
return rh.get(t) || t;
|
|
5347
|
+
}, nh = (e) => {
|
|
5325
5348
|
const t = [];
|
|
5326
|
-
for (const r of e.matchAll(
|
|
5349
|
+
for (const r of e.matchAll(El)) {
|
|
5327
5350
|
const n = r[0], i = r.index ?? 0;
|
|
5328
5351
|
t.push({
|
|
5329
5352
|
id: `speech-token-${t.length}`,
|
|
5330
5353
|
text: n,
|
|
5331
|
-
normalized:
|
|
5354
|
+
normalized: xl(n),
|
|
5332
5355
|
start: i,
|
|
5333
5356
|
end: i + n.length,
|
|
5334
5357
|
sourceStart: i,
|
|
@@ -5338,11 +5361,11 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5338
5361
|
}
|
|
5339
5362
|
return t;
|
|
5340
5363
|
}, gn = (e) => {
|
|
5341
|
-
const t =
|
|
5364
|
+
const t = bl(e.speechText);
|
|
5342
5365
|
return {
|
|
5343
5366
|
speechText: e.speechText,
|
|
5344
5367
|
spokenText: t.spokenText,
|
|
5345
|
-
tokens:
|
|
5368
|
+
tokens: nh(t.spokenText),
|
|
5346
5369
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
|
|
5347
5370
|
boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
|
|
5348
5371
|
unsupportedSemantic: t.unsupportedSemantic,
|
|
@@ -5350,9 +5373,9 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5350
5373
|
};
|
|
5351
5374
|
}, No = (e) => {
|
|
5352
5375
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5353
|
-
const t = e.match(
|
|
5354
|
-
return t?.[0] ?
|
|
5355
|
-
},
|
|
5376
|
+
const t = e.match(El);
|
|
5377
|
+
return t?.[0] ? xl(t[0]) : null;
|
|
5378
|
+
}, ih = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, oh = (e, t) => {
|
|
5356
5379
|
const r = e.rawToSpokenOffsetMap.get(t);
|
|
5357
5380
|
if (r !== void 0) return r;
|
|
5358
5381
|
for (let n = t; n < e.speechText.length; n++) {
|
|
@@ -5363,7 +5386,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5363
5386
|
return null;
|
|
5364
5387
|
}, ro = (e, t, r) => {
|
|
5365
5388
|
if (t === null) return null;
|
|
5366
|
-
const n =
|
|
5389
|
+
const n = ih(e.tokens, t);
|
|
5367
5390
|
return n ? {
|
|
5368
5391
|
token: n,
|
|
5369
5392
|
start: t,
|
|
@@ -5373,9 +5396,9 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5373
5396
|
}, no = (e, t) => {
|
|
5374
5397
|
const r = No(t);
|
|
5375
5398
|
return !!(e && r && e.token.normalized === r);
|
|
5376
|
-
},
|
|
5399
|
+
}, sh = (e) => {
|
|
5377
5400
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5378
|
-
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ro(e.tokenization,
|
|
5401
|
+
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ro(e.tokenization, oh(e.tokenization, e.position), t), n = ro(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5379
5402
|
return no(r, e.boundaryWord) ? {
|
|
5380
5403
|
...r,
|
|
5381
5404
|
confidence: 1
|
|
@@ -5383,7 +5406,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5383
5406
|
...n,
|
|
5384
5407
|
confidence: 1
|
|
5385
5408
|
} : e.boundaryWord && No(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? r || n : n || r;
|
|
5386
|
-
},
|
|
5409
|
+
}, ah = (e) => {
|
|
5387
5410
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5388
5411
|
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ro(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5389
5412
|
return no(r, e.boundaryWord) ? {
|
|
@@ -5391,27 +5414,27 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5391
5414
|
confidence: 1
|
|
5392
5415
|
} : e.boundaryWord && No(e.boundaryWord) ? null : r;
|
|
5393
5416
|
}, Zn = (e) => {
|
|
5394
|
-
const t = gn({ speechText: e.speechText }), r =
|
|
5417
|
+
const t = gn({ speechText: e.speechText }), r = Yd(e.mathElement);
|
|
5395
5418
|
return {
|
|
5396
5419
|
speech: t,
|
|
5397
5420
|
math: r,
|
|
5398
|
-
result:
|
|
5421
|
+
result: th({
|
|
5399
5422
|
speech: t,
|
|
5400
5423
|
math: r
|
|
5401
5424
|
})
|
|
5402
5425
|
};
|
|
5403
|
-
},
|
|
5404
|
-
const r =
|
|
5426
|
+
}, lh = (e, t) => {
|
|
5427
|
+
const r = ah({
|
|
5405
5428
|
tokenization: e.speech,
|
|
5406
5429
|
position: t.position,
|
|
5407
5430
|
length: t.length,
|
|
5408
5431
|
boundaryWord: t.boundaryWord
|
|
5409
5432
|
});
|
|
5410
|
-
return
|
|
5433
|
+
return Xd({
|
|
5411
5434
|
alignment: e.result,
|
|
5412
5435
|
boundary: r
|
|
5413
5436
|
});
|
|
5414
|
-
},
|
|
5437
|
+
}, ch = (e, t) => {
|
|
5415
5438
|
if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
|
|
5416
5439
|
const r = gn({ speechText: t.boundaryWord }).tokens[0];
|
|
5417
5440
|
if (!r) return null;
|
|
@@ -5420,7 +5443,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5420
5443
|
return i.normalized.toLowerCase() === o || i.spokenAliases.some((s) => s.toLowerCase() === o);
|
|
5421
5444
|
});
|
|
5422
5445
|
return n.length === 1 ? n[0].target : null;
|
|
5423
|
-
}, io = "http://www.w3.org/1998/Math/MathML",
|
|
5446
|
+
}, io = "http://www.w3.org/1998/Math/MathML", uh = /* @__PURE__ */ new Set([
|
|
5424
5447
|
"math",
|
|
5425
5448
|
"maction",
|
|
5426
5449
|
"menclose",
|
|
@@ -5454,7 +5477,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5454
5477
|
"semantics",
|
|
5455
5478
|
"annotation",
|
|
5456
5479
|
"annotation-xml"
|
|
5457
|
-
]),
|
|
5480
|
+
]), fh = /* @__PURE__ */ new Set([
|
|
5458
5481
|
"accent",
|
|
5459
5482
|
"accentunder",
|
|
5460
5483
|
"align",
|
|
@@ -5506,44 +5529,44 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5506
5529
|
"width",
|
|
5507
5530
|
"xmlns",
|
|
5508
5531
|
"xml:lang"
|
|
5509
|
-
]),
|
|
5532
|
+
]), Al = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), dh = (e) => Al(e).replace(/"/g, """), hh = (e, t) => {
|
|
5510
5533
|
const r = e.toLowerCase(), n = t.trim().toLowerCase();
|
|
5511
|
-
return !!(r.startsWith("on") || !
|
|
5512
|
-
},
|
|
5534
|
+
return !!(r.startsWith("on") || !fh.has(r) || n.includes("javascript:") || n.includes("data:text/html"));
|
|
5535
|
+
}, ph = (e) => {
|
|
5513
5536
|
const t = e.localName.toLowerCase();
|
|
5514
|
-
if (!
|
|
5537
|
+
if (!uh.has(t)) return !1;
|
|
5515
5538
|
const r = e.namespaceURI;
|
|
5516
5539
|
return !r || r === io || r === "http://www.w3.org/1999/xhtml";
|
|
5517
|
-
},
|
|
5518
|
-
if (e.nodeType === Node.TEXT_NODE) return
|
|
5540
|
+
}, Ml = (e) => {
|
|
5541
|
+
if (e.nodeType === Node.TEXT_NODE) return Al(e.textContent || "");
|
|
5519
5542
|
if (e.nodeType === Node.COMMENT_NODE) return "";
|
|
5520
5543
|
if (e.nodeType !== Node.ELEMENT_NODE) return null;
|
|
5521
5544
|
const t = e;
|
|
5522
|
-
if (!
|
|
5545
|
+
if (!ph(t)) return null;
|
|
5523
5546
|
const r = t.localName.toLowerCase(), n = [];
|
|
5524
5547
|
for (const o of Array.from(t.attributes)) {
|
|
5525
5548
|
const s = o.name.toLowerCase();
|
|
5526
|
-
if (!
|
|
5549
|
+
if (!hh(s, o.value)) {
|
|
5527
5550
|
if (s === "xmlns" && o.value !== io) return null;
|
|
5528
|
-
n.push(`${s}="${
|
|
5551
|
+
n.push(`${s}="${dh(o.value)}"`);
|
|
5529
5552
|
}
|
|
5530
5553
|
}
|
|
5531
5554
|
r === "math" && !n.some((o) => o.startsWith("xmlns=")) && n.unshift(`xmlns="${io}"`);
|
|
5532
5555
|
const i = [];
|
|
5533
5556
|
for (const o of Array.from(t.childNodes)) {
|
|
5534
|
-
const s =
|
|
5557
|
+
const s = Ml(o);
|
|
5535
5558
|
if (s === null) return null;
|
|
5536
5559
|
i.push(s);
|
|
5537
5560
|
}
|
|
5538
5561
|
return `<${r}${n.length > 0 ? ` ${n.join(" ")}` : ""}>${i.join("")}</${r}>`;
|
|
5539
|
-
},
|
|
5562
|
+
}, gh = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, Mi = (e) => {
|
|
5540
5563
|
const t = String(e || "").trim();
|
|
5541
5564
|
if (!t) return null;
|
|
5542
|
-
const r =
|
|
5565
|
+
const r = gh(t);
|
|
5543
5566
|
if (!r || r.getElementsByTagName("parsererror").length > 0) return null;
|
|
5544
5567
|
const n = r.documentElement;
|
|
5545
|
-
return !n || n.localName.toLowerCase() !== "math" ? null :
|
|
5546
|
-
},
|
|
5568
|
+
return !n || n.localName.toLowerCase() !== "math" ? null : Ml(n);
|
|
5569
|
+
}, Cl = (e) => ({
|
|
5547
5570
|
chars: [],
|
|
5548
5571
|
map: /* @__PURE__ */ new Map(),
|
|
5549
5572
|
position: 0,
|
|
@@ -5551,28 +5574,28 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5551
5574
|
lastCharWasWhitespace: !1,
|
|
5552
5575
|
lastMapped: null,
|
|
5553
5576
|
options: e
|
|
5554
|
-
}),
|
|
5577
|
+
}), Ol = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Il = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Rl = (e) => {
|
|
5555
5578
|
const t = e.tagName?.toLowerCase();
|
|
5556
5579
|
return t === "annotation" || t === "annotation-xml";
|
|
5557
|
-
},
|
|
5580
|
+
}, mh = (e) => {
|
|
5558
5581
|
const t = e.getAttribute("data-mathml");
|
|
5559
5582
|
return t && t.trim() ? t : null;
|
|
5560
|
-
},
|
|
5583
|
+
}, vh = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, _h = (e) => {
|
|
5561
5584
|
if (e.tagName.toLowerCase() === "math") return Mi(e.outerHTML);
|
|
5562
|
-
const t =
|
|
5585
|
+
const t = mh(e);
|
|
5563
5586
|
if (t) {
|
|
5564
5587
|
const r = Mi(t);
|
|
5565
5588
|
if (r) return r;
|
|
5566
5589
|
}
|
|
5567
|
-
if (
|
|
5568
|
-
const r =
|
|
5590
|
+
if (Ol(e)) {
|
|
5591
|
+
const r = vh(e);
|
|
5569
5592
|
if (r) {
|
|
5570
5593
|
const n = Mi(r);
|
|
5571
5594
|
if (n) return n;
|
|
5572
5595
|
}
|
|
5573
5596
|
}
|
|
5574
5597
|
return null;
|
|
5575
|
-
},
|
|
5598
|
+
}, bh = /* @__PURE__ */ new Set([
|
|
5576
5599
|
"P",
|
|
5577
5600
|
"H1",
|
|
5578
5601
|
"H2",
|
|
@@ -5588,7 +5611,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5588
5611
|
"FIGCAPTION",
|
|
5589
5612
|
"LABEL",
|
|
5590
5613
|
"BUTTON"
|
|
5591
|
-
]),
|
|
5614
|
+
]), yh = /* @__PURE__ */ new Set([
|
|
5592
5615
|
"heading",
|
|
5593
5616
|
"listitem",
|
|
5594
5617
|
"option",
|
|
@@ -5597,24 +5620,24 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5597
5620
|
"cell",
|
|
5598
5621
|
"columnheader",
|
|
5599
5622
|
"rowheader"
|
|
5600
|
-
]),
|
|
5623
|
+
]), Th = (e, t) => {
|
|
5601
5624
|
let r = e.parentElement, n = null;
|
|
5602
5625
|
for (; r && r !== t; ) {
|
|
5603
5626
|
const i = (r.getAttribute("role") || "").toLowerCase(), o = r.tagName.toUpperCase();
|
|
5604
|
-
if (
|
|
5627
|
+
if (bh.has(o) || yh.has(i)) {
|
|
5605
5628
|
n = r;
|
|
5606
5629
|
break;
|
|
5607
5630
|
}
|
|
5608
5631
|
r = r.parentElement;
|
|
5609
5632
|
}
|
|
5610
5633
|
return n || t;
|
|
5611
|
-
},
|
|
5634
|
+
}, Sh = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Ol(e), Gt = (e, t, r) => {
|
|
5612
5635
|
/[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), r ? (e.map.set(e.position, r), e.lastMapped = r) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
|
|
5613
|
-
},
|
|
5636
|
+
}, Ll = (e, t) => {
|
|
5614
5637
|
if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
|
|
5615
5638
|
const r = e.chars[e.chars.length - 1];
|
|
5616
|
-
return
|
|
5617
|
-
},
|
|
5639
|
+
return dl(r, t, e.options);
|
|
5640
|
+
}, Pl = (e, t) => {
|
|
5618
5641
|
const r = t.textContent || "";
|
|
5619
5642
|
let n = !1;
|
|
5620
5643
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -5633,7 +5656,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5633
5656
|
}), e.lastCharWasWhitespace = !0;
|
|
5634
5657
|
continue;
|
|
5635
5658
|
}
|
|
5636
|
-
!n &&
|
|
5659
|
+
!n && Ll(e, o) && Gt(e, " ", {
|
|
5637
5660
|
node: t,
|
|
5638
5661
|
offset: i
|
|
5639
5662
|
}), Gt(e, o, {
|
|
@@ -5641,7 +5664,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5641
5664
|
offset: i
|
|
5642
5665
|
}), n = !0, e.lastCharWasWhitespace = !1;
|
|
5643
5666
|
}
|
|
5644
|
-
},
|
|
5667
|
+
}, wh = (e, t) => {
|
|
5645
5668
|
for (let r = 0; r < t.text.length; r++) {
|
|
5646
5669
|
const n = t.text[r], i = /\s/.test(n), o = t.map.get(r) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
|
|
5647
5670
|
node: o.node,
|
|
@@ -5658,7 +5681,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5658
5681
|
e.lastCharWasWhitespace || Gt(e, " ", l), e.lastCharWasWhitespace = !0;
|
|
5659
5682
|
continue;
|
|
5660
5683
|
}
|
|
5661
|
-
r === 0 &&
|
|
5684
|
+
r === 0 && Ll(e, n) && Gt(e, " ", l), Gt(e, n, l), e.lastCharWasWhitespace = !1, o ? (e.map.set(e.position - 1, {
|
|
5662
5685
|
node: o.node,
|
|
5663
5686
|
offset: o.offset
|
|
5664
5687
|
}), e.lastMapped = {
|
|
@@ -5669,7 +5692,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5669
5692
|
offset: a
|
|
5670
5693
|
});
|
|
5671
5694
|
}
|
|
5672
|
-
},
|
|
5695
|
+
}, kh = (e) => {
|
|
5673
5696
|
if (typeof DOMParser > "u") return "";
|
|
5674
5697
|
const t = new DOMParser().parseFromString(e, "application/xml");
|
|
5675
5698
|
if (t.getElementsByTagName("parsererror").length > 0) return "";
|
|
@@ -5681,38 +5704,38 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5681
5704
|
}
|
|
5682
5705
|
if (i.nodeType !== 1) return;
|
|
5683
5706
|
const o = i;
|
|
5684
|
-
if (!
|
|
5707
|
+
if (!Rl(o))
|
|
5685
5708
|
for (const s of Array.from(o.childNodes)) n(s);
|
|
5686
5709
|
};
|
|
5687
5710
|
return n(t.documentElement), Y(r.join(" "));
|
|
5688
|
-
},
|
|
5689
|
-
const n =
|
|
5711
|
+
}, Eh = (e, t, r) => {
|
|
5712
|
+
const n = Cl(r), i = (a) => {
|
|
5690
5713
|
if (Pr(a, e)) return;
|
|
5691
5714
|
if (a.nodeType === 3) {
|
|
5692
|
-
|
|
5715
|
+
Pl(n, a);
|
|
5693
5716
|
return;
|
|
5694
5717
|
}
|
|
5695
5718
|
if (a.nodeType !== 1) return;
|
|
5696
5719
|
const l = a;
|
|
5697
|
-
if (!(
|
|
5720
|
+
if (!(Il(l) || Rl(l)))
|
|
5698
5721
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
5699
5722
|
};
|
|
5700
|
-
i(e),
|
|
5723
|
+
i(e), Nl(n);
|
|
5701
5724
|
const o = Y(n.chars.join(""));
|
|
5702
5725
|
if (o) return {
|
|
5703
5726
|
text: o,
|
|
5704
5727
|
map: n.map
|
|
5705
5728
|
};
|
|
5706
|
-
const s =
|
|
5729
|
+
const s = kh(t);
|
|
5707
5730
|
return s ? {
|
|
5708
5731
|
text: s,
|
|
5709
5732
|
map: /* @__PURE__ */ new Map()
|
|
5710
5733
|
} : Kn(e, r);
|
|
5711
|
-
},
|
|
5734
|
+
}, Nl = (e) => {
|
|
5712
5735
|
for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
|
|
5713
5736
|
e.chars.pop(), e.position--, e.map.delete(e.position);
|
|
5714
|
-
},
|
|
5715
|
-
const r =
|
|
5737
|
+
}, xh = (e, t) => {
|
|
5738
|
+
const r = Cl(t), n = [];
|
|
5716
5739
|
let i = 0, o, s = !1;
|
|
5717
5740
|
const a = () => {
|
|
5718
5741
|
const u = Y(r.chars.slice(i, r.chars.length).join(""));
|
|
@@ -5724,18 +5747,18 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5724
5747
|
}, l = (u) => {
|
|
5725
5748
|
if (Pr(u, e)) return;
|
|
5726
5749
|
if (u.nodeType === Node.TEXT_NODE) {
|
|
5727
|
-
const g =
|
|
5728
|
-
o && g !== o && a(), o = g,
|
|
5750
|
+
const g = Th(u, e);
|
|
5751
|
+
o && g !== o && a(), o = g, Pl(r, u);
|
|
5729
5752
|
return;
|
|
5730
5753
|
}
|
|
5731
5754
|
if (u.nodeType !== Node.ELEMENT_NODE) return;
|
|
5732
5755
|
const d = u;
|
|
5733
|
-
if (
|
|
5734
|
-
const p =
|
|
5756
|
+
if (Il(d)) return;
|
|
5757
|
+
const p = _h(d);
|
|
5735
5758
|
if (p) {
|
|
5736
5759
|
a();
|
|
5737
|
-
const g =
|
|
5738
|
-
|
|
5760
|
+
const g = Eh(d, p, t);
|
|
5761
|
+
wh(r, g);
|
|
5739
5762
|
const m = Y(g.text);
|
|
5740
5763
|
n.push({
|
|
5741
5764
|
type: "math",
|
|
@@ -5748,7 +5771,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5748
5771
|
for (const g of Array.from(d.childNodes)) l(g);
|
|
5749
5772
|
};
|
|
5750
5773
|
for (const u of Array.from(e.childNodes)) l(u);
|
|
5751
|
-
|
|
5774
|
+
Nl(r), a();
|
|
5752
5775
|
const c = r.chars.join("");
|
|
5753
5776
|
for (; r.map.has(c.length); ) r.map.delete(c.length);
|
|
5754
5777
|
return {
|
|
@@ -5758,7 +5781,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5758
5781
|
containsMathMarkup: s
|
|
5759
5782
|
};
|
|
5760
5783
|
}, en = (e, t) => {
|
|
5761
|
-
if (!
|
|
5784
|
+
if (!Sh(e)) {
|
|
5762
5785
|
const { text: r, map: n } = Kn(e, t);
|
|
5763
5786
|
return {
|
|
5764
5787
|
visibleText: r,
|
|
@@ -5770,8 +5793,8 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5770
5793
|
containsMathMarkup: !1
|
|
5771
5794
|
};
|
|
5772
5795
|
}
|
|
5773
|
-
return
|
|
5774
|
-
},
|
|
5796
|
+
return xh(e, t);
|
|
5797
|
+
}, Ah = (e, t) => pl([e], t), Mh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Ch = /* @__PURE__ */ new Set([
|
|
5775
5798
|
"H1",
|
|
5776
5799
|
"H2",
|
|
5777
5800
|
"H3",
|
|
@@ -5781,17 +5804,17 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5781
5804
|
"LI",
|
|
5782
5805
|
"LABEL",
|
|
5783
5806
|
"BUTTON"
|
|
5784
|
-
]),
|
|
5807
|
+
]), Oh = /* @__PURE__ */ new Set([
|
|
5785
5808
|
"heading",
|
|
5786
5809
|
"listitem",
|
|
5787
5810
|
"option",
|
|
5788
5811
|
"radio"
|
|
5789
|
-
]),
|
|
5812
|
+
]), Ih = (e) => {
|
|
5790
5813
|
if (e.type !== "text" || !e.sourceElement) return !1;
|
|
5791
5814
|
const t = e.sourceElement.tagName.toUpperCase(), r = (e.sourceElement.getAttribute("role") || "").toLowerCase();
|
|
5792
|
-
return
|
|
5793
|
-
},
|
|
5794
|
-
const t = e.resolveMathSpeech ??
|
|
5815
|
+
return Ch.has(t) || Oh.has(r);
|
|
5816
|
+
}, Rh = async (e) => {
|
|
5817
|
+
const t = e.resolveMathSpeech ?? Ah, { visibleText: r } = e, n = [];
|
|
5795
5818
|
let i = 0;
|
|
5796
5819
|
const o = (a) => {
|
|
5797
5820
|
const l = Y(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, d = u + l.length;
|
|
@@ -5803,7 +5826,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5803
5826
|
for (let a = 0; a < e.chunks.length; a++) {
|
|
5804
5827
|
const l = e.chunks[a];
|
|
5805
5828
|
if (l.type === "text") {
|
|
5806
|
-
const g =
|
|
5829
|
+
const g = Ih(l) ? [{
|
|
5807
5830
|
text: l.text,
|
|
5808
5831
|
offset: 0
|
|
5809
5832
|
}] : Oo(l.text, { locale: e.language });
|
|
@@ -5843,12 +5866,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5843
5866
|
}
|
|
5844
5867
|
return {
|
|
5845
5868
|
segments: n,
|
|
5846
|
-
locale:
|
|
5869
|
+
locale: Mh(e.language),
|
|
5847
5870
|
visibleText: r,
|
|
5848
5871
|
plainSpeechText: Y(s.join(" "))
|
|
5849
5872
|
};
|
|
5850
|
-
},
|
|
5851
|
-
const t = Math.max(1, e.maxEntries ??
|
|
5873
|
+
}, Lh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Ph = "sre-v1", Nh = 256, oo = (e) => Array.isArray(e) ? `array:[${e.map(oo).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${oo(r)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, Ns = (e, t, r, n) => `${Ph}\0${Lh(e)}\0${t ? "ssml" : "plain"}\0${oo(r ?? null)}\0${n}`, $h = (e = {}) => {
|
|
5874
|
+
const t = Math.max(1, e.maxEntries ?? Nh), r = e.resolve ?? ((o, s) => pl([o], s)), n = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
5852
5875
|
for (n.delete(o), n.set(o, s); n.size > t; ) {
|
|
5853
5876
|
const a = n.keys().next().value;
|
|
5854
5877
|
a !== void 0 && n.delete(a);
|
|
@@ -5868,13 +5891,13 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5868
5891
|
usedFallback: d.usedFallback
|
|
5869
5892
|
}), i(c, d), d;
|
|
5870
5893
|
};
|
|
5871
|
-
},
|
|
5894
|
+
}, zh = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : gn({ speechText: e }).tokens[0]?.normalized || null, Dh = (e, t) => {
|
|
5872
5895
|
const r = gn({ speechText: e.speechText });
|
|
5873
5896
|
if (!Number.isFinite(t.position)) return {
|
|
5874
5897
|
boundary: null,
|
|
5875
5898
|
spokenText: r.spokenText
|
|
5876
5899
|
};
|
|
5877
|
-
const n =
|
|
5900
|
+
const n = sh({
|
|
5878
5901
|
tokenization: r,
|
|
5879
5902
|
position: t.position,
|
|
5880
5903
|
length: t.length,
|
|
@@ -5887,8 +5910,8 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5887
5910
|
} : null,
|
|
5888
5911
|
spokenText: r.spokenText
|
|
5889
5912
|
};
|
|
5890
|
-
},
|
|
5891
|
-
const r =
|
|
5913
|
+
}, Hh = (e, t, r) => r ? gn({ speechText: e }).tokens.find((n) => n.start <= t && t < n.end)?.normalized === r : !0, Wh = (e, t) => {
|
|
5914
|
+
const r = zh(t.word);
|
|
5892
5915
|
if (e.id !== t.chunkId) return {
|
|
5893
5916
|
chunkId: t.chunkId,
|
|
5894
5917
|
normalizedWord: r,
|
|
@@ -5907,12 +5930,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5907
5930
|
};
|
|
5908
5931
|
let n, i;
|
|
5909
5932
|
if (e.catalogAlignment)
|
|
5910
|
-
n =
|
|
5933
|
+
n = Rd(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
|
|
5911
5934
|
else {
|
|
5912
|
-
const o =
|
|
5935
|
+
const o = Dh(e, t);
|
|
5913
5936
|
n = o.boundary, i = o.spokenText;
|
|
5914
5937
|
}
|
|
5915
|
-
return n ?
|
|
5938
|
+
return n ? Hh(i, n.start, r) ? {
|
|
5916
5939
|
chunkId: e.id,
|
|
5917
5940
|
normalizedWord: r,
|
|
5918
5941
|
chunkSpokenStart: n.start,
|
|
@@ -5952,12 +5975,12 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5952
5975
|
quality: "region",
|
|
5953
5976
|
confidence: e.confidence,
|
|
5954
5977
|
reason: e.reason
|
|
5955
|
-
},
|
|
5978
|
+
}, $l = /* @__PURE__ */ new Map([
|
|
5956
5979
|
["mi", "mjx-mi"],
|
|
5957
5980
|
["mn", "mjx-mn"],
|
|
5958
5981
|
["mo", "mjx-mo"],
|
|
5959
5982
|
["mtext", "mjx-mtext"]
|
|
5960
|
-
]), so = "mi,mn,mo,mtext",
|
|
5983
|
+
]), so = "mi,mn,mo,mtext", zl = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", Dl = [
|
|
5961
5984
|
"mjx-mfrac",
|
|
5962
5985
|
"mjx-msqrt",
|
|
5963
5986
|
"mjx-mroot",
|
|
@@ -5965,14 +5988,14 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5965
5988
|
"mjx-munder",
|
|
5966
5989
|
"mjx-mover",
|
|
5967
5990
|
"mjx-munderover"
|
|
5968
|
-
].join(","),
|
|
5991
|
+
].join(","), Hl = (e) => e.type === "text-range" ? e.node.parentElement : e.element, ai = (e) => {
|
|
5969
5992
|
let t = e;
|
|
5970
5993
|
for (; t; ) {
|
|
5971
5994
|
if (t.localName?.toLowerCase() === "mjx-container") return t;
|
|
5972
5995
|
t = t.parentElement;
|
|
5973
5996
|
}
|
|
5974
5997
|
return null;
|
|
5975
|
-
}, $s = (e) => !e || ai(e) ? !1 : !Pr(e),
|
|
5998
|
+
}, $s = (e) => !e || ai(e) ? !1 : !Pr(e), Wl = (e) => {
|
|
5976
5999
|
const t = e.getBoundingClientRect?.();
|
|
5977
6000
|
return !!(t && t.width > 0 && t.height > 0);
|
|
5978
6001
|
}, ao = (e) => {
|
|
@@ -5985,35 +6008,35 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
5985
6008
|
}, Fl = (e, t) => {
|
|
5986
6009
|
if (e.length === 0 || e.length !== t.length) return !1;
|
|
5987
6010
|
for (let r = 0; r < e.length; r += 1) {
|
|
5988
|
-
const n =
|
|
6011
|
+
const n = $l.get(e[r].localName.toLowerCase());
|
|
5989
6012
|
if (!n || t[r].localName.toLowerCase() !== n) return !1;
|
|
5990
6013
|
}
|
|
5991
6014
|
return !0;
|
|
5992
|
-
},
|
|
5993
|
-
if (!e ||
|
|
6015
|
+
}, Fh = (e, t) => {
|
|
6016
|
+
if (!e || !$l.has(e.localName.toLowerCase()) || t.querySelector(Dl)) return null;
|
|
5994
6017
|
const r = ao(e), n = t.querySelector("mjx-math");
|
|
5995
6018
|
if (!r || !n) return null;
|
|
5996
6019
|
const i = Array.from(r.querySelectorAll(so)), o = i.indexOf(e);
|
|
5997
6020
|
if (o < 0) return null;
|
|
5998
|
-
const s = Array.from(n.querySelectorAll(
|
|
6021
|
+
const s = Array.from(n.querySelectorAll(zl));
|
|
5999
6022
|
if (!Fl(i, s)) return null;
|
|
6000
6023
|
const a = s[o];
|
|
6001
|
-
return !a || !
|
|
6002
|
-
},
|
|
6024
|
+
return !a || !Wl(a) ? null : a;
|
|
6025
|
+
}, Bh = (e) => {
|
|
6003
6026
|
const t = ai(e);
|
|
6004
6027
|
if (t) {
|
|
6005
|
-
if (t.querySelector(
|
|
6028
|
+
if (t.querySelector(Dl)) return "expression";
|
|
6006
6029
|
const n = ao(e) ?? e, i = t.querySelector("mjx-math");
|
|
6007
6030
|
if (!i) return "expression";
|
|
6008
|
-
const o = Array.from(n.querySelectorAll(so)), s = Array.from(i.querySelectorAll(
|
|
6009
|
-
return Fl(o, s) && s.some((a) =>
|
|
6031
|
+
const o = Array.from(n.querySelectorAll(so)), s = Array.from(i.querySelectorAll(zl));
|
|
6032
|
+
return Fl(o, s) && s.some((a) => Wl(a)) ? "token" : "expression";
|
|
6010
6033
|
}
|
|
6011
6034
|
const r = ao(e) ?? e;
|
|
6012
6035
|
return Array.from(r.querySelectorAll(so)).some((n) => !Pr(n)) ? "token" : "expression";
|
|
6013
6036
|
}, lo = (e) => {
|
|
6014
|
-
const t =
|
|
6037
|
+
const t = Hl(e), r = ai(t);
|
|
6015
6038
|
if (r) {
|
|
6016
|
-
const n =
|
|
6039
|
+
const n = Fh(t, r);
|
|
6017
6040
|
return n ? {
|
|
6018
6041
|
type: "element",
|
|
6019
6042
|
quality: "semantic-token",
|
|
@@ -6035,24 +6058,24 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6035
6058
|
quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
|
|
6036
6059
|
element: e.element
|
|
6037
6060
|
} : null;
|
|
6038
|
-
},
|
|
6061
|
+
}, Uh = lo, jh = () => {
|
|
6039
6062
|
const e = /* @__PURE__ */ new WeakMap();
|
|
6040
6063
|
return (t) => {
|
|
6041
|
-
const r =
|
|
6064
|
+
const r = Hl(t), n = ai(r);
|
|
6042
6065
|
if (!r || !n) return lo(t);
|
|
6043
6066
|
if (e.has(r)) return e.get(r) ?? null;
|
|
6044
6067
|
const i = lo(t);
|
|
6045
6068
|
return e.set(r, i), i;
|
|
6046
6069
|
};
|
|
6047
|
-
},
|
|
6070
|
+
}, Gh = (e, t, r, n = e.mathAlignments, i = Uh) => {
|
|
6048
6071
|
if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
|
|
6049
6072
|
let o = null;
|
|
6050
6073
|
for (const s of n) {
|
|
6051
|
-
const a =
|
|
6074
|
+
const a = lh(s.alignment, {
|
|
6052
6075
|
position: t.chunkSpokenStart,
|
|
6053
6076
|
length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
|
|
6054
6077
|
boundaryWord: r.word
|
|
6055
|
-
}) ||
|
|
6078
|
+
}) || ch(s.alignment, { boundaryWord: r.word });
|
|
6056
6079
|
if (!a) continue;
|
|
6057
6080
|
const l = i(a);
|
|
6058
6081
|
if (l) {
|
|
@@ -6061,7 +6084,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6061
6084
|
}
|
|
6062
6085
|
}
|
|
6063
6086
|
return o;
|
|
6064
|
-
},
|
|
6087
|
+
}, Bl = (e, t, r) => {
|
|
6065
6088
|
if (!e || typeof document > "u" || r <= t) return null;
|
|
6066
6089
|
const n = e.get(t);
|
|
6067
6090
|
let i = e.get(Math.max(t, r - 1));
|
|
@@ -6073,17 +6096,17 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6073
6096
|
} catch {
|
|
6074
6097
|
return null;
|
|
6075
6098
|
}
|
|
6076
|
-
},
|
|
6099
|
+
}, Vh = (e, t) => {
|
|
6077
6100
|
if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
|
|
6078
|
-
const r =
|
|
6101
|
+
const r = Ld(e.catalogAlignment, t.chunkSpokenStart);
|
|
6079
6102
|
if (!r) return null;
|
|
6080
|
-
const n =
|
|
6103
|
+
const n = Bl(e.visibleMap, r.start, r.end);
|
|
6081
6104
|
return n ? {
|
|
6082
6105
|
type: "range",
|
|
6083
6106
|
quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
|
|
6084
6107
|
range: n
|
|
6085
6108
|
} : null;
|
|
6086
|
-
},
|
|
6109
|
+
}, qh = (e) => e.regionRange ? {
|
|
6087
6110
|
type: "range",
|
|
6088
6111
|
quality: "region",
|
|
6089
6112
|
range: e.regionRange
|
|
@@ -6095,7 +6118,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6095
6118
|
if (t.length !== 1) return null;
|
|
6096
6119
|
const r = t[0]?.alignment.result.fallbackTarget;
|
|
6097
6120
|
return r ? e.renderedMathTargetResolver(r) : null;
|
|
6098
|
-
},
|
|
6121
|
+
}, Yh = (e, t) => e ? t.mathAlignments.filter(({ element: r }) => {
|
|
6099
6122
|
try {
|
|
6100
6123
|
return e.type === "range" ? e.range.intersectsNode(r) : e.type === "element" ? e.element === r || e.element.contains(r) : e.node.parentElement?.contains(r) || !1;
|
|
6101
6124
|
} catch {
|
|
@@ -6107,18 +6130,18 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6107
6130
|
quality: "region",
|
|
6108
6131
|
confidence: 0,
|
|
6109
6132
|
reason: "boundary chunk id was not found"
|
|
6110
|
-
}), Hs = (e) => e.length === 1 ? e[0].element : null,
|
|
6133
|
+
}), Hs = (e) => e.length === 1 ? e[0].element : null, Xh = (e, t) => t.length > 0 && t.every(({ element: r }) => e.mathCapabilityByElement.get(r) === "token"), Kh = 3, Jh = (e, t, r) => {
|
|
6111
6134
|
if (!t || t.type !== "range") return !1;
|
|
6112
6135
|
const { startContainer: n, endContainer: i } = t.range;
|
|
6113
|
-
return n === i && n.nodeType ===
|
|
6114
|
-
},
|
|
6136
|
+
return n === i && n.nodeType === Kh ? !1 : r.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(n) && o.contains(i));
|
|
6137
|
+
}, Zh = (e, t) => ({
|
|
6115
6138
|
chunk: e,
|
|
6116
|
-
regionTarget:
|
|
6117
|
-
renderedMathTargetResolver:
|
|
6118
|
-
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ?
|
|
6139
|
+
regionTarget: qh(e),
|
|
6140
|
+
renderedMathTargetResolver: jh(),
|
|
6141
|
+
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ? Bh(r) : "expression"])),
|
|
6119
6142
|
heldTokenByElement: /* @__PURE__ */ new Map()
|
|
6120
|
-
}),
|
|
6121
|
-
const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id,
|
|
6143
|
+
}), Qh = (e) => {
|
|
6144
|
+
const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id, Zh(n, t)]));
|
|
6122
6145
|
return {
|
|
6123
6146
|
chunks: e.chunks,
|
|
6124
6147
|
resolveInitial(n) {
|
|
@@ -6142,7 +6165,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6142
6165
|
resolveBoundary(n) {
|
|
6143
6166
|
const i = r.get(n.chunkId);
|
|
6144
6167
|
if (!i) return Ds();
|
|
6145
|
-
const { chunk: o } = i, s =
|
|
6168
|
+
const { chunk: o } = i, s = Wh(o, n), a = Vh(o, s), l = Yh(a, o), c = (!a || l.length > 0 ? Gh(o, s, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, d = c && c.quality === "expression" ? c : null;
|
|
6146
6169
|
if (u) {
|
|
6147
6170
|
const p = Hs(l);
|
|
6148
6171
|
return p && i.heldTokenByElement.set(p, u), _r({
|
|
@@ -6153,14 +6176,14 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6153
6176
|
reason: s.reason
|
|
6154
6177
|
});
|
|
6155
6178
|
}
|
|
6156
|
-
if (a && (t ? !
|
|
6179
|
+
if (a && (t ? !Jh(i, a, l) : l.length === 0)) return _r({
|
|
6157
6180
|
semanticTarget: a,
|
|
6158
6181
|
expressionTarget: null,
|
|
6159
6182
|
regionTarget: i.regionTarget,
|
|
6160
6183
|
confidence: s.confidence,
|
|
6161
6184
|
reason: s.reason
|
|
6162
6185
|
});
|
|
6163
|
-
if (
|
|
6186
|
+
if (Xh(i, l)) {
|
|
6164
6187
|
const p = Hs(l), g = p ? i.heldTokenByElement.get(p) ?? null : null;
|
|
6165
6188
|
return _r({
|
|
6166
6189
|
semanticTarget: g,
|
|
@@ -6179,14 +6202,14 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6179
6202
|
});
|
|
6180
6203
|
}
|
|
6181
6204
|
};
|
|
6182
|
-
},
|
|
6205
|
+
}, ep = (e) => {
|
|
6183
6206
|
if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
|
|
6184
6207
|
const t = e.mathAlignment?.speech.boundaryOffsetSpace;
|
|
6185
6208
|
return t || "plain-spoken-text";
|
|
6186
|
-
},
|
|
6209
|
+
}, tp = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
|
|
6187
6210
|
element: e.sourceElement,
|
|
6188
6211
|
alignment: e.mathAlignment
|
|
6189
|
-
}] : [],
|
|
6212
|
+
}] : [], rp = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
|
|
6190
6213
|
speechText: e.speechText || "",
|
|
6191
6214
|
visibleText: e.visibleText || e.speechText || "",
|
|
6192
6215
|
sourceElement: e.sourceElement || e.contentRoot,
|
|
@@ -6203,9 +6226,9 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6203
6226
|
regionRange: t.regionRange,
|
|
6204
6227
|
visibleMap: t.visibleMap,
|
|
6205
6228
|
catalogAlignment: t.alignment,
|
|
6206
|
-
mathAlignments:
|
|
6207
|
-
offsetSpace:
|
|
6208
|
-
})),
|
|
6229
|
+
mathAlignments: tp(t),
|
|
6230
|
+
offsetSpace: ep(t)
|
|
6231
|
+
})), np = [
|
|
6209
6232
|
"[data-pie-tts-region]",
|
|
6210
6233
|
"[data-catalog-region]",
|
|
6211
6234
|
"li",
|
|
@@ -6215,18 +6238,18 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6215
6238
|
"[role='group']",
|
|
6216
6239
|
"[role='region']",
|
|
6217
6240
|
"div"
|
|
6218
|
-
].join(","),
|
|
6219
|
-
const r = e.closest(
|
|
6241
|
+
].join(","), Ul = (e, t) => {
|
|
6242
|
+
const r = e.closest(np);
|
|
6220
6243
|
return r && t.contains(r) ? r : e;
|
|
6221
|
-
},
|
|
6244
|
+
}, ip = (e, t, r) => {
|
|
6222
6245
|
const n = /* @__PURE__ */ new Map();
|
|
6223
6246
|
for (let i = t; i < r; i++) {
|
|
6224
6247
|
const o = e.get(i);
|
|
6225
6248
|
o && n.set(i - t, o);
|
|
6226
6249
|
}
|
|
6227
6250
|
return n;
|
|
6228
|
-
},
|
|
6229
|
-
const t = en(e.contentRoot, e.textProcessingOptions), r = await
|
|
6251
|
+
}, op = async (e) => {
|
|
6252
|
+
const t = en(e.contentRoot, e.textProcessingOptions), r = await Rh({
|
|
6230
6253
|
chunks: t.chunks,
|
|
6231
6254
|
visibleText: t.visibleText,
|
|
6232
6255
|
language: e.language,
|
|
@@ -6244,8 +6267,8 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6244
6267
|
segment: n,
|
|
6245
6268
|
anchor: {
|
|
6246
6269
|
sourceElement: a,
|
|
6247
|
-
regionElement:
|
|
6248
|
-
visibleMap:
|
|
6270
|
+
regionElement: Ul(a, e.contentRoot),
|
|
6271
|
+
visibleMap: ip(t.map, n.visibleSpan.start, n.visibleSpan.end)
|
|
6249
6272
|
}
|
|
6250
6273
|
};
|
|
6251
6274
|
}
|
|
@@ -6265,8 +6288,8 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6265
6288
|
containsMathMarkup: t.containsMathMarkup,
|
|
6266
6289
|
visibleText: t.visibleText
|
|
6267
6290
|
};
|
|
6268
|
-
},
|
|
6269
|
-
const r =
|
|
6291
|
+
}, sp = (e, t) => {
|
|
6292
|
+
const r = Tl({
|
|
6270
6293
|
speechText: e.spokenText,
|
|
6271
6294
|
visibleText: e.spokenText
|
|
6272
6295
|
});
|
|
@@ -6275,13 +6298,13 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6275
6298
|
visibleText: e.visibleText,
|
|
6276
6299
|
sourceElement: t.sourceElement,
|
|
6277
6300
|
regionElement: t.regionElement,
|
|
6278
|
-
regionRange:
|
|
6301
|
+
regionRange: Bl(t.visibleMap, 0, e.visibleText.length) ?? void 0,
|
|
6279
6302
|
speechMatchesVisibleText: !0,
|
|
6280
6303
|
playbackMode: r.playbackMode,
|
|
6281
6304
|
alignment: r,
|
|
6282
6305
|
visibleMap: t.visibleMap
|
|
6283
6306
|
};
|
|
6284
|
-
},
|
|
6307
|
+
}, jl = (e, t) => {
|
|
6285
6308
|
const r = t.sourceElement;
|
|
6286
6309
|
return {
|
|
6287
6310
|
speechText: e.spokenText,
|
|
@@ -6294,7 +6317,7 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6294
6317
|
speechText: e.spokenText
|
|
6295
6318
|
}) : void 0
|
|
6296
6319
|
};
|
|
6297
|
-
},
|
|
6320
|
+
}, ap = (e, t, r) => {
|
|
6298
6321
|
const n = t.sourceElement;
|
|
6299
6322
|
return {
|
|
6300
6323
|
speechText: r,
|
|
@@ -6306,15 +6329,15 @@ var _d = /* @__PURE__ */ new Set([
|
|
|
6306
6329
|
mathElement: n,
|
|
6307
6330
|
speechText: r
|
|
6308
6331
|
}) : void 0,
|
|
6309
|
-
plainFallback:
|
|
6332
|
+
plainFallback: jl(e, t)
|
|
6310
6333
|
};
|
|
6311
|
-
},
|
|
6334
|
+
}, lp = (e, t = {}) => e.items.map(({ segment: r, anchor: n }) => r.kind === "prose" ? sp(r, n) : t.format === "ssml" && r.ssml ? ap(r, n, r.ssml) : jl(r, n)), cp = "pie-tts-control-handoff", z;
|
|
6312
6335
|
(function(e) {
|
|
6313
6336
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
6314
6337
|
})(z || (z = {}));
|
|
6315
|
-
var
|
|
6338
|
+
var up = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, fp = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? up(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, dp = class co {
|
|
6316
6339
|
constructor() {
|
|
6317
|
-
v(this, "currentProvider", null), v(this, "provider", null), v(this, "highlightCoordinator", null), v(this, "catalogResolver", null), v(this, "state", z.IDLE), v(this, "ttsConfig", {}), v(this, "currentText", null), v(this, "currentContentElement", null), v(this, "normalizedToDOM", /* @__PURE__ */ new Map()), v(this, "listeners", /* @__PURE__ */ new Map()), v(this, "lastError", null), v(this, "speakRunId", 0), v(this, "currentBoundaryOffset", 0), v(this, "seekSegments", []), v(this, "sentenceHighlightSegments", []), v(this, "currentSeekSegmentIndex", 0), v(this, "activeSentenceStartOffset", null), v(this, "activeHighlightMode", "word"), v(this, "lastRenderedRegionTarget", null), v(this, "telemetryReporter", null), v(this, "generatedMathSpeechResolver",
|
|
6340
|
+
v(this, "currentProvider", null), v(this, "provider", null), v(this, "highlightCoordinator", null), v(this, "catalogResolver", null), v(this, "state", z.IDLE), v(this, "ttsConfig", {}), v(this, "currentText", null), v(this, "currentContentElement", null), v(this, "normalizedToDOM", /* @__PURE__ */ new Map()), v(this, "listeners", /* @__PURE__ */ new Map()), v(this, "lastError", null), v(this, "speakRunId", 0), v(this, "currentBoundaryOffset", 0), v(this, "seekSegments", []), v(this, "sentenceHighlightSegments", []), v(this, "currentSeekSegmentIndex", 0), v(this, "activeSentenceStartOffset", null), v(this, "activeHighlightMode", "word"), v(this, "lastRenderedRegionTarget", null), v(this, "telemetryReporter", null), v(this, "generatedMathSpeechResolver", $h());
|
|
6318
6341
|
}
|
|
6319
6342
|
debugLog(t, r) {
|
|
6320
6343
|
co.debugEnabled && (r === void 0 ? console.debug(t) : console.debug(t, r));
|
|
@@ -6437,7 +6460,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6437
6460
|
return t.includes("<") ? /<\s*break\b|<\s*speak\b|<\s*prosody\b|<\s*p\b|<\s*s\b/i.test(t) : !1;
|
|
6438
6461
|
}
|
|
6439
6462
|
isElementHidden(t) {
|
|
6440
|
-
return
|
|
6463
|
+
return fl(t);
|
|
6441
6464
|
}
|
|
6442
6465
|
getBoundaryStrength(t) {
|
|
6443
6466
|
const r = Number(t.getAttribute("data-tts-break-ms"));
|
|
@@ -6845,7 +6868,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6845
6868
|
const d = u, p = s(d);
|
|
6846
6869
|
if (p) {
|
|
6847
6870
|
o();
|
|
6848
|
-
const g = en(d, this.getTextProcessingOptions(r.language)), m = g.visibleText || Y(d.textContent || ""), b =
|
|
6871
|
+
const g = en(d, this.getTextProcessingOptions(r.language)), m = g.visibleText || Y(d.textContent || ""), b = Tl({
|
|
6849
6872
|
speechText: p.content,
|
|
6850
6873
|
visibleText: m
|
|
6851
6874
|
}), T = a(d, m), I = T ? Zn({
|
|
@@ -6862,7 +6885,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6862
6885
|
speechText: p.content,
|
|
6863
6886
|
visibleText: m,
|
|
6864
6887
|
sourceElement: d,
|
|
6865
|
-
regionElement:
|
|
6888
|
+
regionElement: Ul(d, t),
|
|
6866
6889
|
speechMatchesVisibleText: J === m,
|
|
6867
6890
|
playbackMode: b.playbackMode,
|
|
6868
6891
|
alignment: b,
|
|
@@ -6881,7 +6904,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6881
6904
|
return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
|
|
6882
6905
|
}
|
|
6883
6906
|
async resolveGeneratedSpeechContent(t, r, n) {
|
|
6884
|
-
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await
|
|
6907
|
+
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await op({
|
|
6885
6908
|
contentRoot: t,
|
|
6886
6909
|
language: n,
|
|
6887
6910
|
mathSpeech: this.getMathSpeechOptions(),
|
|
@@ -6898,7 +6921,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6898
6921
|
containsMathMarkup: !1,
|
|
6899
6922
|
speechMatchesVisibleText: !0
|
|
6900
6923
|
};
|
|
6901
|
-
const c =
|
|
6924
|
+
const c = lp(o, { format: i }), u = o.plainSpeechText;
|
|
6902
6925
|
return {
|
|
6903
6926
|
contentToSpeak: u,
|
|
6904
6927
|
speechText: u,
|
|
@@ -6971,7 +6994,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6971
6994
|
}
|
|
6972
6995
|
}
|
|
6973
6996
|
highlightRenderableRegionTarget(t) {
|
|
6974
|
-
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !
|
|
6997
|
+
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !fp(this.lastRenderedRegionTarget, t))
|
|
6975
6998
|
try {
|
|
6976
6999
|
const r = document.createRange();
|
|
6977
7000
|
if (t.type === "element") r.selectNodeContents(t.element);
|
|
@@ -7022,10 +7045,10 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7022
7045
|
async speakCatalogChunkOnce(t, r) {
|
|
7023
7046
|
if (!this.provider) return;
|
|
7024
7047
|
this.lastRenderedRegionTarget = null;
|
|
7025
|
-
const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ?
|
|
7048
|
+
const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ? rp({
|
|
7026
7049
|
contentRoot: n,
|
|
7027
7050
|
chunks: [t]
|
|
7028
|
-
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ?
|
|
7051
|
+
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? Qh({
|
|
7029
7052
|
chunks: [i],
|
|
7030
7053
|
mathTokenHighlighting: o
|
|
7031
7054
|
}) : null;
|
|
@@ -7136,7 +7159,7 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7136
7159
|
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.setState(z.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
|
|
7137
7160
|
}
|
|
7138
7161
|
requestControlHandoff() {
|
|
7139
|
-
typeof window > "u" || window.dispatchEvent(new CustomEvent(
|
|
7162
|
+
typeof window > "u" || window.dispatchEvent(new CustomEvent(cp, { detail: { source: "host" } }));
|
|
7140
7163
|
}
|
|
7141
7164
|
isPlaying() {
|
|
7142
7165
|
return this.state === z.PLAYING;
|
|
@@ -7207,14 +7230,14 @@ var sp = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7207
7230
|
});
|
|
7208
7231
|
}
|
|
7209
7232
|
};
|
|
7210
|
-
v(
|
|
7233
|
+
v(dp, "debugEnabled", (() => {
|
|
7211
7234
|
try {
|
|
7212
7235
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7213
7236
|
} catch {
|
|
7214
7237
|
}
|
|
7215
7238
|
return globalThis.__PIE_TTS_DEBUG__ === !0;
|
|
7216
7239
|
})());
|
|
7217
|
-
var
|
|
7240
|
+
var Tg = bf({
|
|
7218
7241
|
policy: {
|
|
7219
7242
|
allowed: [],
|
|
7220
7243
|
blocked: []
|
|
@@ -7225,8 +7248,8 @@ var vg = _f({
|
|
|
7225
7248
|
passage: []
|
|
7226
7249
|
},
|
|
7227
7250
|
providers: {}
|
|
7228
|
-
}),
|
|
7229
|
-
function
|
|
7251
|
+
}), Gl = "https://proxy.pie-api.com", hp = `${Gl}/bundles/`;
|
|
7252
|
+
function Vl(e) {
|
|
7230
7253
|
try {
|
|
7231
7254
|
const t = {
|
|
7232
7255
|
BASE_URL: "/",
|
|
@@ -7239,10 +7262,10 @@ function Gl(e) {
|
|
|
7239
7262
|
} catch {
|
|
7240
7263
|
}
|
|
7241
7264
|
}
|
|
7242
|
-
var
|
|
7265
|
+
var Sg = typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || Vl("PUBLIC_BUILDER_ORIGIN_URL") || Gl, pp = typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || Vl("PUBLIC_BUILDER_BUNDLE_URL") || hp, gp = {
|
|
7243
7266
|
retryDelayMs: 3e3,
|
|
7244
7267
|
timeoutMs: 12e4
|
|
7245
|
-
}, { entries:
|
|
7268
|
+
}, { entries: ql, setPrototypeOf: Ws, isFrozen: mp, getPrototypeOf: vp, getOwnPropertyDescriptor: _p } = Object, { freeze: de, seal: Re, create: tn } = Object, { apply: uo, construct: fo } = typeof Reflect < "u" && Reflect;
|
|
7246
7269
|
de || (de = function(t) {
|
|
7247
7270
|
return t;
|
|
7248
7271
|
});
|
|
@@ -7257,7 +7280,7 @@ fo || (fo = function(t) {
|
|
|
7257
7280
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) n[i - 1] = arguments[i];
|
|
7258
7281
|
return new t(...n);
|
|
7259
7282
|
});
|
|
7260
|
-
var Gr = he(Array.prototype.forEach),
|
|
7283
|
+
var Gr = he(Array.prototype.forEach), bp = he(Array.prototype.lastIndexOf), Fs = he(Array.prototype.pop), Vr = he(Array.prototype.push), yp = he(Array.prototype.splice), Nn = he(String.prototype.toLowerCase), Ci = he(String.prototype.toString), Oi = he(String.prototype.match), br = he(String.prototype.replace), Tp = he(String.prototype.indexOf), Sp = he(String.prototype.trim), ze = he(Object.prototype.hasOwnProperty), ce = he(RegExp.prototype.test), qr = wp(TypeError);
|
|
7261
7284
|
function he(e) {
|
|
7262
7285
|
return function(t) {
|
|
7263
7286
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -7265,7 +7288,7 @@ function he(e) {
|
|
|
7265
7288
|
return uo(e, t, n);
|
|
7266
7289
|
};
|
|
7267
7290
|
}
|
|
7268
|
-
function
|
|
7291
|
+
function wp(e) {
|
|
7269
7292
|
return function() {
|
|
7270
7293
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
|
|
7271
7294
|
return fo(e, r);
|
|
@@ -7273,35 +7296,35 @@ function bp(e) {
|
|
|
7273
7296
|
}
|
|
7274
7297
|
function C(e, t) {
|
|
7275
7298
|
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Nn;
|
|
7276
|
-
|
|
7299
|
+
Ws && Ws(e, null);
|
|
7277
7300
|
let n = t.length;
|
|
7278
7301
|
for (; n--; ) {
|
|
7279
7302
|
let i = t[n];
|
|
7280
7303
|
if (typeof i == "string") {
|
|
7281
7304
|
const o = r(i);
|
|
7282
|
-
o !== i && (
|
|
7305
|
+
o !== i && (mp(t) || (t[n] = o), i = o);
|
|
7283
7306
|
}
|
|
7284
7307
|
e[i] = !0;
|
|
7285
7308
|
}
|
|
7286
7309
|
return e;
|
|
7287
7310
|
}
|
|
7288
|
-
function
|
|
7311
|
+
function kp(e) {
|
|
7289
7312
|
for (let t = 0; t < e.length; t++) ze(e, t) || (e[t] = null);
|
|
7290
7313
|
return e;
|
|
7291
7314
|
}
|
|
7292
7315
|
function Ve(e) {
|
|
7293
7316
|
const t = tn(null);
|
|
7294
|
-
for (const [r, n] of
|
|
7317
|
+
for (const [r, n] of ql(e)) ze(e, r) && (Array.isArray(n) ? t[r] = kp(n) : n && typeof n == "object" && n.constructor === Object ? t[r] = Ve(n) : t[r] = n);
|
|
7295
7318
|
return t;
|
|
7296
7319
|
}
|
|
7297
7320
|
function Yr(e, t) {
|
|
7298
7321
|
for (; e !== null; ) {
|
|
7299
|
-
const n =
|
|
7322
|
+
const n = _p(e, t);
|
|
7300
7323
|
if (n) {
|
|
7301
7324
|
if (n.get) return he(n.get);
|
|
7302
7325
|
if (typeof n.value == "function") return he(n.value);
|
|
7303
7326
|
}
|
|
7304
|
-
e =
|
|
7327
|
+
e = vp(e);
|
|
7305
7328
|
}
|
|
7306
7329
|
function r() {
|
|
7307
7330
|
return null;
|
|
@@ -7502,7 +7525,7 @@ var Bs = de([
|
|
|
7502
7525
|
"feSpotLight",
|
|
7503
7526
|
"feTile",
|
|
7504
7527
|
"feTurbulence"
|
|
7505
|
-
]),
|
|
7528
|
+
]), Ep = de([
|
|
7506
7529
|
"animate",
|
|
7507
7530
|
"color-profile",
|
|
7508
7531
|
"cursor",
|
|
@@ -7556,7 +7579,7 @@ var Bs = de([
|
|
|
7556
7579
|
"munder",
|
|
7557
7580
|
"munderover",
|
|
7558
7581
|
"mprescripts"
|
|
7559
|
-
]),
|
|
7582
|
+
]), xp = de([
|
|
7560
7583
|
"maction",
|
|
7561
7584
|
"maligngroup",
|
|
7562
7585
|
"malignmark",
|
|
@@ -7940,27 +7963,27 @@ var Bs = de([
|
|
|
7940
7963
|
"xlink:title",
|
|
7941
7964
|
"xml:space",
|
|
7942
7965
|
"xmlns:xlink"
|
|
7943
|
-
]),
|
|
7966
|
+
]), Ap = Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Mp = Re(/<%[\w\W]*|[\w\W]*%>/gm), Cp = Re(/\$\{[\w\W]*/gm), Op = Re(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ip = Re(/^aria-[\-\w]+$/), Yl = Re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Rp = Re(/^(?:\w+script|data):/i), Lp = Re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Xl = Re(/^html$/i), Pp = Re(/^[a-z][.\w]*(-[.\w]+)+$/i), Vs = /* @__PURE__ */ Object.freeze({
|
|
7944
7967
|
__proto__: null,
|
|
7945
|
-
ARIA_ATTR:
|
|
7946
|
-
ATTR_WHITESPACE:
|
|
7947
|
-
CUSTOM_ELEMENT:
|
|
7948
|
-
DATA_ATTR:
|
|
7949
|
-
DOCTYPE_NAME:
|
|
7950
|
-
ERB_EXPR:
|
|
7951
|
-
IS_ALLOWED_URI:
|
|
7952
|
-
IS_SCRIPT_OR_DATA:
|
|
7953
|
-
MUSTACHE_EXPR:
|
|
7954
|
-
TMPLIT_EXPR:
|
|
7968
|
+
ARIA_ATTR: Ip,
|
|
7969
|
+
ATTR_WHITESPACE: Lp,
|
|
7970
|
+
CUSTOM_ELEMENT: Pp,
|
|
7971
|
+
DATA_ATTR: Op,
|
|
7972
|
+
DOCTYPE_NAME: Xl,
|
|
7973
|
+
ERB_EXPR: Mp,
|
|
7974
|
+
IS_ALLOWED_URI: Yl,
|
|
7975
|
+
IS_SCRIPT_OR_DATA: Rp,
|
|
7976
|
+
MUSTACHE_EXPR: Ap,
|
|
7977
|
+
TMPLIT_EXPR: Cp
|
|
7955
7978
|
}), Xr = {
|
|
7956
7979
|
element: 1,
|
|
7957
7980
|
text: 3,
|
|
7958
7981
|
progressingInstruction: 7,
|
|
7959
7982
|
comment: 8,
|
|
7960
7983
|
document: 9
|
|
7961
|
-
},
|
|
7984
|
+
}, Np = function() {
|
|
7962
7985
|
return typeof window > "u" ? null : window;
|
|
7963
|
-
},
|
|
7986
|
+
}, $p = function(t, r) {
|
|
7964
7987
|
if (typeof t != "object" || typeof t.createPolicy != "function") return null;
|
|
7965
7988
|
let n = null;
|
|
7966
7989
|
const i = "data-tt-policy-suffix";
|
|
@@ -7991,9 +8014,9 @@ var Bs = de([
|
|
|
7991
8014
|
uponSanitizeShadowNode: []
|
|
7992
8015
|
};
|
|
7993
8016
|
};
|
|
7994
|
-
function
|
|
7995
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
7996
|
-
const t = (k) =>
|
|
8017
|
+
function Kl() {
|
|
8018
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Np();
|
|
8019
|
+
const t = (k) => Kl(k);
|
|
7997
8020
|
if (t.version = "3.4.0", t.removed = [], !e || !e.document || e.document.nodeType !== Xr.document || !e.Element)
|
|
7998
8021
|
return t.isSupported = !1, t;
|
|
7999
8022
|
let { document: r } = e;
|
|
@@ -8005,7 +8028,7 @@ function Xl() {
|
|
|
8005
8028
|
let w, X = "";
|
|
8006
8029
|
const { implementation: le, createNodeIterator: sr, createDocumentFragment: ar, getElementsByTagName: lr } = r, { importNode: li } = n;
|
|
8007
8030
|
let te = qs();
|
|
8008
|
-
t.isSupported = typeof
|
|
8031
|
+
t.isSupported = typeof ql == "function" && typeof J == "function" && le && le.createHTMLDocument !== void 0;
|
|
8009
8032
|
const { MUSTACHE_EXPR: It, ERB_EXPR: Rt, TMPLIT_EXPR: Lt, DATA_ATTR: ci, ARIA_ATTR: ui, IS_SCRIPT_OR_DATA: mn, ATTR_WHITESPACE: vn, CUSTOM_ELEMENT: fi } = Vs;
|
|
8010
8033
|
let { IS_ALLOWED_URI: x } = Vs, N = null;
|
|
8011
8034
|
const yt = C({}, [
|
|
@@ -8022,7 +8045,7 @@ function Xl() {
|
|
|
8022
8045
|
...Gs,
|
|
8023
8046
|
...An
|
|
8024
8047
|
]);
|
|
8025
|
-
let
|
|
8048
|
+
let F = Object.seal(tn(null, {
|
|
8026
8049
|
tagNameCheck: {
|
|
8027
8050
|
writable: !0,
|
|
8028
8051
|
configurable: !1,
|
|
@@ -8125,22 +8148,22 @@ function Xl() {
|
|
|
8125
8148
|
"ms",
|
|
8126
8149
|
"mtext"
|
|
8127
8150
|
]), bn = C({}, ["annotation-xml"]);
|
|
8128
|
-
const
|
|
8151
|
+
const oc = C({}, [
|
|
8129
8152
|
"title",
|
|
8130
8153
|
"style",
|
|
8131
8154
|
"font",
|
|
8132
8155
|
"a",
|
|
8133
8156
|
"script"
|
|
8134
8157
|
]);
|
|
8135
|
-
let
|
|
8136
|
-
const
|
|
8158
|
+
let Wr = null;
|
|
8159
|
+
const sc = ["application/xhtml+xml", "text/html"], ac = "text/html";
|
|
8137
8160
|
let Z = null, gr = null;
|
|
8138
|
-
const
|
|
8161
|
+
const lc = r.createElement("form"), $o = function(f) {
|
|
8139
8162
|
return f instanceof RegExp || f instanceof Function;
|
|
8140
8163
|
}, hi = function() {
|
|
8141
8164
|
let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8142
8165
|
if (!(gr && gr === f)) {
|
|
8143
|
-
if ((!f || typeof f != "object") && (f = {}), f = Ve(f),
|
|
8166
|
+
if ((!f || typeof f != "object") && (f = {}), f = Ve(f), Wr = sc.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? ac : f.PARSER_MEDIA_TYPE, Z = Wr === "application/xhtml+xml" ? Ci : Nn, N = ze(f, "ALLOWED_TAGS") ? C({}, f.ALLOWED_TAGS, Z) : yt, U = ze(f, "ALLOWED_ATTR") ? C({}, f.ALLOWED_ATTR, Z) : Nr, je = ze(f, "ALLOWED_NAMESPACES") ? C({}, f.ALLOWED_NAMESPACES, Ci) : Hr, ot = ze(f, "ADD_URI_SAFE_ATTR") ? C(Ve(wt), f.ADD_URI_SAFE_ATTR, Z) : wt, K = ze(f, "ADD_DATA_URI_TAGS") ? C(Ve(re), f.ADD_DATA_URI_TAGS, Z) : re, ye = ze(f, "FORBID_CONTENTS") ? C({}, f.FORBID_CONTENTS, Z) : zr, Pt = ze(f, "FORBID_TAGS") ? C({}, f.FORBID_TAGS, Z) : Ve({}), cr = ze(f, "FORBID_ATTR") ? C({}, f.FORBID_ATTR, Z) : Ve({}), it = ze(f, "USE_PROFILES") ? f.USE_PROFILES : !1, ie = f.ALLOW_ARIA_ATTR !== !1, be = f.ALLOW_DATA_ATTR !== !1, et = f.ALLOW_UNKNOWN_PROTOCOLS || !1, ur = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, tt = f.SAFE_FOR_TEMPLATES || !1, Nt = f.SAFE_FOR_XML !== !1, Pe = f.WHOLE_DOCUMENT || !1, Tt = f.RETURN_DOM || !1, rt = f.RETURN_DOM_FRAGMENT || !1, St = f.RETURN_TRUSTED_TYPE || !1, fr = f.FORCE_BODY || !1, dr = f.SANITIZE_DOM !== !1, nt = f.SANITIZE_NAMED_PROPS || !1, $r = f.KEEP_CONTENT !== !1, zt = f.IN_PLACE || !1, x = f.ALLOWED_URI_REGEXP || Yl, st = f.NAMESPACE || Te, _n = f.MATHML_TEXT_INTEGRATION_POINTS || _n, bn = f.HTML_INTEGRATION_POINTS || bn, F = f.CUSTOM_ELEMENT_HANDLING || tn(null), f.CUSTOM_ELEMENT_HANDLING && $o(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (F.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && $o(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (F.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (F.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), tt && (be = !1), rt && (Tt = !0), it && (N = C({}, Us), U = tn(null), it.html === !0 && (C(N, Bs), C(U, js)), it.svg === !0 && (C(N, Ii), C(U, Pi), C(U, An)), it.svgFilters === !0 && (C(N, Ri), C(U, Pi), C(U, An)), it.mathMl === !0 && (C(N, Li), C(U, Gs), C(U, An))), Ue.tagCheck = null, Ue.attributeCheck = null, f.ADD_TAGS && (typeof f.ADD_TAGS == "function" ? Ue.tagCheck = f.ADD_TAGS : (N === yt && (N = Ve(N)), C(N, f.ADD_TAGS, Z))), f.ADD_ATTR && (typeof f.ADD_ATTR == "function" ? Ue.attributeCheck = f.ADD_ATTR : (U === Nr && (U = Ve(U)), C(U, f.ADD_ATTR, Z))), f.ADD_URI_SAFE_ATTR && C(ot, f.ADD_URI_SAFE_ATTR, Z), f.FORBID_CONTENTS && (ye === zr && (ye = Ve(ye)), C(ye, f.FORBID_CONTENTS, Z)), f.ADD_FORBID_CONTENTS && (ye === zr && (ye = Ve(ye)), C(ye, f.ADD_FORBID_CONTENTS, Z)), $r && (N["#text"] = !0), Pe && C(N, [
|
|
8144
8167
|
"html",
|
|
8145
8168
|
"head",
|
|
8146
8169
|
"body"
|
|
@@ -8149,21 +8172,21 @@ function Xl() {
|
|
|
8149
8172
|
if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw qr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
8150
8173
|
w = f.TRUSTED_TYPES_POLICY, X = w.createHTML("");
|
|
8151
8174
|
} else
|
|
8152
|
-
w === void 0 && (w =
|
|
8175
|
+
w === void 0 && (w = $p(g, i)), w !== null && typeof X == "string" && (X = w.createHTML(""));
|
|
8153
8176
|
de && de(f), gr = f;
|
|
8154
8177
|
}
|
|
8155
8178
|
}, zo = C({}, [
|
|
8156
8179
|
...Ii,
|
|
8157
8180
|
...Ri,
|
|
8158
|
-
...
|
|
8159
|
-
]), Do = C({}, [...Li, ...
|
|
8181
|
+
...Ep
|
|
8182
|
+
]), Do = C({}, [...Li, ...xp]), cc = function(f) {
|
|
8160
8183
|
let _ = J(f);
|
|
8161
8184
|
(!_ || !_.tagName) && (_ = {
|
|
8162
8185
|
namespaceURI: st,
|
|
8163
8186
|
tagName: "template"
|
|
8164
8187
|
});
|
|
8165
8188
|
const S = Nn(f.tagName), j = Nn(_.tagName);
|
|
8166
|
-
return je[f.namespaceURI] ? f.namespaceURI === pr ? _.namespaceURI === Te ? S === "svg" : _.namespaceURI === hr ? S === "svg" && (j === "annotation-xml" || _n[j]) : !!zo[S] : f.namespaceURI === hr ? _.namespaceURI === Te ? S === "math" : _.namespaceURI === pr ? S === "math" && bn[j] : !!Do[S] : f.namespaceURI === Te ? _.namespaceURI === pr && !bn[j] || _.namespaceURI === hr && !_n[j] ? !1 : !Do[S] && (
|
|
8189
|
+
return je[f.namespaceURI] ? f.namespaceURI === pr ? _.namespaceURI === Te ? S === "svg" : _.namespaceURI === hr ? S === "svg" && (j === "annotation-xml" || _n[j]) : !!zo[S] : f.namespaceURI === hr ? _.namespaceURI === Te ? S === "math" : _.namespaceURI === pr ? S === "math" && bn[j] : !!Do[S] : f.namespaceURI === Te ? _.namespaceURI === pr && !bn[j] || _.namespaceURI === hr && !_n[j] ? !1 : !Do[S] && (oc[S] || !zo[S]) : !!(Wr === "application/xhtml+xml" && je[f.namespaceURI]) : !1;
|
|
8167
8190
|
}, Ne = function(f) {
|
|
8168
8191
|
Vr(t.removed, { element: f });
|
|
8169
8192
|
try {
|
|
@@ -8198,10 +8221,10 @@ function Xl() {
|
|
|
8198
8221
|
const Se = Oi(f, /^[\r\n\t ]+/);
|
|
8199
8222
|
S = Se && Se[0];
|
|
8200
8223
|
}
|
|
8201
|
-
|
|
8224
|
+
Wr === "application/xhtml+xml" && st === Te && (f = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + f + "</body></html>");
|
|
8202
8225
|
const j = w ? w.createHTML(f) : f;
|
|
8203
8226
|
if (st === Te) try {
|
|
8204
|
-
_ = new p().parseFromString(j,
|
|
8227
|
+
_ = new p().parseFromString(j, Wr);
|
|
8205
8228
|
} catch {
|
|
8206
8229
|
}
|
|
8207
8230
|
if (!_ || !_.documentElement) {
|
|
@@ -8211,9 +8234,9 @@ function Xl() {
|
|
|
8211
8234
|
} catch {
|
|
8212
8235
|
}
|
|
8213
8236
|
}
|
|
8214
|
-
const
|
|
8215
|
-
return f && S &&
|
|
8216
|
-
},
|
|
8237
|
+
const W = _.body || _.documentElement;
|
|
8238
|
+
return f && S && W.insertBefore(r.createTextNode(S), W.childNodes[0] || null), st === Te ? lr.call(_, Pe ? "html" : "body")[0] : Pe ? _.documentElement : W;
|
|
8239
|
+
}, Wo = function(f) {
|
|
8217
8240
|
return sr.call(f.ownerDocument || f, f, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
8218
8241
|
}, pi = function(f) {
|
|
8219
8242
|
return f instanceof d && (typeof f.nodeName != "string" || typeof f.textContent != "string" || typeof f.removeChild != "function" || !(f.attributes instanceof u) || typeof f.removeAttribute != "function" || typeof f.setAttribute != "function" || typeof f.namespaceURI != "string" || typeof f.insertBefore != "function" || typeof f.hasChildNodes != "function");
|
|
@@ -8225,7 +8248,7 @@ function Xl() {
|
|
|
8225
8248
|
S.call(t, f, _, gr);
|
|
8226
8249
|
});
|
|
8227
8250
|
}
|
|
8228
|
-
const
|
|
8251
|
+
const Fo = function(f) {
|
|
8229
8252
|
let _ = null;
|
|
8230
8253
|
if (at(te.beforeSanitizeElements, f, null), pi(f))
|
|
8231
8254
|
return Ne(f), !0;
|
|
@@ -8236,21 +8259,21 @@ function Xl() {
|
|
|
8236
8259
|
}), Nt && f.hasChildNodes() && !gi(f.firstElementChild) && ce(/<[/\w!]/g, f.innerHTML) && ce(/<[/\w!]/g, f.textContent) || Nt && f.namespaceURI === Te && S === "style" && gi(f.firstElementChild) || f.nodeType === Xr.progressingInstruction || Nt && f.nodeType === Xr.comment && ce(/<[/\w]/g, f.data))
|
|
8237
8260
|
return Ne(f), !0;
|
|
8238
8261
|
if (Pt[S] || !(Ue.tagCheck instanceof Function && Ue.tagCheck(S)) && !N[S]) {
|
|
8239
|
-
if (!Pt[S] && Uo(S) && (
|
|
8262
|
+
if (!Pt[S] && Uo(S) && (F.tagNameCheck instanceof RegExp && ce(F.tagNameCheck, S) || F.tagNameCheck instanceof Function && F.tagNameCheck(S)))
|
|
8240
8263
|
return !1;
|
|
8241
8264
|
if ($r && !ye[S]) {
|
|
8242
|
-
const j = J(f) || f.parentNode,
|
|
8243
|
-
if (
|
|
8244
|
-
const Se =
|
|
8265
|
+
const j = J(f) || f.parentNode, W = H(f) || f.childNodes;
|
|
8266
|
+
if (W && j) {
|
|
8267
|
+
const Se = W.length;
|
|
8245
8268
|
for (let we = Se - 1; we >= 0; --we) {
|
|
8246
|
-
const ee = b(
|
|
8269
|
+
const ee = b(W[we], !0);
|
|
8247
8270
|
ee.__removalCount = (f.__removalCount || 0) + 1, j.insertBefore(ee, I(f));
|
|
8248
8271
|
}
|
|
8249
8272
|
}
|
|
8250
8273
|
}
|
|
8251
8274
|
return Ne(f), !0;
|
|
8252
8275
|
}
|
|
8253
|
-
return f instanceof l && !
|
|
8276
|
+
return f instanceof l && !cc(f) || (S === "noscript" || S === "noembed" || S === "noframes") && ce(/<\/no(script|embed|frames)/i, f.innerHTML) ? (Ne(f), !0) : (tt && f.nodeType === Xr.text && (_ = f.textContent, Gr([
|
|
8254
8277
|
It,
|
|
8255
8278
|
Rt,
|
|
8256
8279
|
Lt
|
|
@@ -8258,15 +8281,15 @@ function Xl() {
|
|
|
8258
8281
|
_ = br(_, j, " ");
|
|
8259
8282
|
}), f.textContent !== _ && (Vr(t.removed, { element: f.cloneNode() }), f.textContent = _)), at(te.afterSanitizeElements, f, null), !1);
|
|
8260
8283
|
}, Bo = function(f, _, S) {
|
|
8261
|
-
if (cr[_] || dr && (_ === "id" || _ === "name") && (S in r || S in
|
|
8284
|
+
if (cr[_] || dr && (_ === "id" || _ === "name") && (S in r || S in lc)) return !1;
|
|
8262
8285
|
if (!(be && !cr[_] && ce(ci, _))) {
|
|
8263
8286
|
if (!(ie && ce(ui, _))) {
|
|
8264
8287
|
if (!(Ue.attributeCheck instanceof Function && Ue.attributeCheck(_, f))) {
|
|
8265
8288
|
if (!U[_] || cr[_]) {
|
|
8266
|
-
if (!(Uo(f) && (
|
|
8289
|
+
if (!(Uo(f) && (F.tagNameCheck instanceof RegExp && ce(F.tagNameCheck, f) || F.tagNameCheck instanceof Function && F.tagNameCheck(f)) && (F.attributeNameCheck instanceof RegExp && ce(F.attributeNameCheck, _) || F.attributeNameCheck instanceof Function && F.attributeNameCheck(_, f)) || _ === "is" && F.allowCustomizedBuiltInElements && (F.tagNameCheck instanceof RegExp && ce(F.tagNameCheck, S) || F.tagNameCheck instanceof Function && F.tagNameCheck(S)))) return !1;
|
|
8267
8290
|
} else if (!ot[_]) {
|
|
8268
8291
|
if (!ce(x, br(S, vn, ""))) {
|
|
8269
|
-
if (!((_ === "src" || _ === "xlink:href" || _ === "href") && f !== "script" &&
|
|
8292
|
+
if (!((_ === "src" || _ === "xlink:href" || _ === "href") && f !== "script" && Tp(S, "data:") === 0 && K[f])) {
|
|
8270
8293
|
if (!(et && !ce(mn, br(S, vn, "")))) {
|
|
8271
8294
|
if (S) return !1;
|
|
8272
8295
|
}
|
|
@@ -8292,23 +8315,23 @@ function Xl() {
|
|
|
8292
8315
|
};
|
|
8293
8316
|
let j = _.length;
|
|
8294
8317
|
for (; j--; ) {
|
|
8295
|
-
const { name:
|
|
8296
|
-
let ne =
|
|
8297
|
-
if (S.attrName = ee, S.attrValue = ne, S.keepAttr = !0, S.forceKeepAttr = void 0, at(te.uponSanitizeAttribute, f, S), ne = S.attrValue, nt && (ee === "id" || ee === "name") && (Dt(
|
|
8298
|
-
Dt(
|
|
8318
|
+
const { name: W, namespaceURI: Se, value: we } = _[j], ee = Z(W), Fr = we;
|
|
8319
|
+
let ne = W === "value" ? Fr : Sp(Fr);
|
|
8320
|
+
if (S.attrName = ee, S.attrValue = ne, S.keepAttr = !0, S.forceKeepAttr = void 0, at(te.uponSanitizeAttribute, f, S), ne = S.attrValue, nt && (ee === "id" || ee === "name") && (Dt(W, f), ne = di + ne), Nt && ce(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, ne)) {
|
|
8321
|
+
Dt(W, f);
|
|
8299
8322
|
continue;
|
|
8300
8323
|
}
|
|
8301
8324
|
if (ee === "attributename" && Oi(ne, "href")) {
|
|
8302
|
-
Dt(
|
|
8325
|
+
Dt(W, f);
|
|
8303
8326
|
continue;
|
|
8304
8327
|
}
|
|
8305
8328
|
if (S.forceKeepAttr) continue;
|
|
8306
8329
|
if (!S.keepAttr) {
|
|
8307
|
-
Dt(
|
|
8330
|
+
Dt(W, f);
|
|
8308
8331
|
continue;
|
|
8309
8332
|
}
|
|
8310
8333
|
if (!ur && ce(/\/>/i, ne)) {
|
|
8311
|
-
Dt(
|
|
8334
|
+
Dt(W, f);
|
|
8312
8335
|
continue;
|
|
8313
8336
|
}
|
|
8314
8337
|
tt && Gr([
|
|
@@ -8320,7 +8343,7 @@ function Xl() {
|
|
|
8320
8343
|
});
|
|
8321
8344
|
const Vo = Z(f.nodeName);
|
|
8322
8345
|
if (!Bo(Vo, ee, ne)) {
|
|
8323
|
-
Dt(
|
|
8346
|
+
Dt(W, f);
|
|
8324
8347
|
continue;
|
|
8325
8348
|
}
|
|
8326
8349
|
if (w && typeof g == "object" && typeof g.getAttributeType == "function" && !Se) switch (g.getAttributeType(Vo, ee)) {
|
|
@@ -8331,22 +8354,22 @@ function Xl() {
|
|
|
8331
8354
|
ne = w.createScriptURL(ne);
|
|
8332
8355
|
break;
|
|
8333
8356
|
}
|
|
8334
|
-
if (ne !==
|
|
8335
|
-
Se ? f.setAttributeNS(Se,
|
|
8357
|
+
if (ne !== Fr) try {
|
|
8358
|
+
Se ? f.setAttributeNS(Se, W, ne) : f.setAttribute(W, ne), pi(f) ? Ne(f) : Fs(t.removed);
|
|
8336
8359
|
} catch {
|
|
8337
|
-
Dt(
|
|
8360
|
+
Dt(W, f);
|
|
8338
8361
|
}
|
|
8339
8362
|
}
|
|
8340
8363
|
at(te.afterSanitizeAttributes, f, null);
|
|
8341
8364
|
}, Go = function(f) {
|
|
8342
8365
|
let _ = null;
|
|
8343
|
-
const S =
|
|
8366
|
+
const S = Wo(f);
|
|
8344
8367
|
for (at(te.beforeSanitizeShadowDOM, f, null); _ = S.nextNode(); )
|
|
8345
|
-
at(te.uponSanitizeShadowNode, _, null),
|
|
8368
|
+
at(te.uponSanitizeShadowNode, _, null), Fo(_), jo(_), _.content instanceof o && Go(_.content);
|
|
8346
8369
|
at(te.afterSanitizeShadowDOM, f, null);
|
|
8347
8370
|
};
|
|
8348
8371
|
return t.sanitize = function(k) {
|
|
8349
|
-
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ = null, S = null, j = null,
|
|
8372
|
+
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ = null, S = null, j = null, W = null;
|
|
8350
8373
|
if (Dr = !k, Dr && (k = "<!-->"), typeof k != "string" && !gi(k)) if (typeof k.toString == "function") {
|
|
8351
8374
|
if (k = k.toString(), typeof k != "string") throw qr("dirty is not a string, aborting");
|
|
8352
8375
|
} else throw qr("toString is not a function");
|
|
@@ -8363,9 +8386,9 @@ function Xl() {
|
|
|
8363
8386
|
if (_ = Ho(k), !_) return Tt ? null : St ? X : "";
|
|
8364
8387
|
}
|
|
8365
8388
|
_ && fr && Ne(_.firstChild);
|
|
8366
|
-
const Se =
|
|
8389
|
+
const Se = Wo(zt ? k : _);
|
|
8367
8390
|
for (; j = Se.nextNode(); )
|
|
8368
|
-
|
|
8391
|
+
Fo(j), jo(j), j.content instanceof o && Go(j.content);
|
|
8369
8392
|
if (zt) return k;
|
|
8370
8393
|
if (Tt) {
|
|
8371
8394
|
if (tt) {
|
|
@@ -8375,17 +8398,17 @@ function Xl() {
|
|
|
8375
8398
|
It,
|
|
8376
8399
|
Rt,
|
|
8377
8400
|
Lt
|
|
8378
|
-
], (
|
|
8379
|
-
ee = br(ee,
|
|
8401
|
+
], (Fr) => {
|
|
8402
|
+
ee = br(ee, Fr, " ");
|
|
8380
8403
|
}), _.innerHTML = ee;
|
|
8381
8404
|
}
|
|
8382
8405
|
if (rt)
|
|
8383
|
-
for (
|
|
8384
|
-
else
|
|
8385
|
-
return (U.shadowroot || U.shadowrootmode) && (
|
|
8406
|
+
for (W = ar.call(_.ownerDocument); _.firstChild; ) W.appendChild(_.firstChild);
|
|
8407
|
+
else W = _;
|
|
8408
|
+
return (U.shadowroot || U.shadowrootmode) && (W = li.call(n, W, !0)), W;
|
|
8386
8409
|
}
|
|
8387
8410
|
let we = Pe ? _.outerHTML : _.innerHTML;
|
|
8388
|
-
return Pe && N["!doctype"] && _.ownerDocument && _.ownerDocument.doctype && _.ownerDocument.doctype.name && ce(
|
|
8411
|
+
return Pe && N["!doctype"] && _.ownerDocument && _.ownerDocument.doctype && _.ownerDocument.doctype.name && ce(Xl, _.ownerDocument.doctype.name) && (we = "<!DOCTYPE " + _.ownerDocument.doctype.name + `>
|
|
8389
8412
|
` + we), tt && Gr([
|
|
8390
8413
|
It,
|
|
8391
8414
|
Rt,
|
|
@@ -8403,17 +8426,17 @@ function Xl() {
|
|
|
8403
8426
|
typeof f == "function" && Vr(te[k], f);
|
|
8404
8427
|
}, t.removeHook = function(k, f) {
|
|
8405
8428
|
if (f !== void 0) {
|
|
8406
|
-
const _ =
|
|
8407
|
-
return _ === -1 ? void 0 :
|
|
8429
|
+
const _ = bp(te[k], f);
|
|
8430
|
+
return _ === -1 ? void 0 : yp(te[k], _, 1)[0];
|
|
8408
8431
|
}
|
|
8409
|
-
return
|
|
8432
|
+
return Fs(te[k]);
|
|
8410
8433
|
}, t.removeHooks = function(k) {
|
|
8411
8434
|
te[k] = [];
|
|
8412
8435
|
}, t.removeAllHooks = function() {
|
|
8413
8436
|
te = qs();
|
|
8414
8437
|
}, t;
|
|
8415
8438
|
}
|
|
8416
|
-
var
|
|
8439
|
+
var wg = Kl(), ho;
|
|
8417
8440
|
(function(e) {
|
|
8418
8441
|
e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js";
|
|
8419
8442
|
})(ho || (ho = {}));
|
|
@@ -8421,7 +8444,7 @@ var Ys;
|
|
|
8421
8444
|
(function(e) {
|
|
8422
8445
|
e.loading = "loading", e.loaded = "loaded";
|
|
8423
8446
|
})(Ys || (Ys = {}));
|
|
8424
|
-
var
|
|
8447
|
+
var kg = gp.timeoutMs, Xs;
|
|
8425
8448
|
(function(e) {
|
|
8426
8449
|
e.SAVE = "save", e.MODEL = "model", e.SCORE = "score", e.MANUAL_SCORE = "manual-score";
|
|
8427
8450
|
})(Xs || (Xs = {}));
|
|
@@ -8437,9 +8460,9 @@ var Zs;
|
|
|
8437
8460
|
(function(e) {
|
|
8438
8461
|
e.PENDING = "pending", e.IN_PROGRESS = "in_progress", e.COMPLETED = "completed", e.FAILED = "failed";
|
|
8439
8462
|
})(Zs || (Zs = {}));
|
|
8440
|
-
var
|
|
8463
|
+
var zp = class Jl extends CustomEvent {
|
|
8441
8464
|
constructor(t, r = !1) {
|
|
8442
|
-
super(
|
|
8465
|
+
super(Jl.TYPE, {
|
|
8443
8466
|
bubbles: !0,
|
|
8444
8467
|
detail: {
|
|
8445
8468
|
update: t,
|
|
@@ -8448,10 +8471,10 @@ var Lp = class Kl extends CustomEvent {
|
|
|
8448
8471
|
}), v(this, "update", void 0), v(this, "reset", void 0), this.update = t, this.reset = r;
|
|
8449
8472
|
}
|
|
8450
8473
|
};
|
|
8451
|
-
v(
|
|
8452
|
-
var
|
|
8474
|
+
v(zp, "TYPE", "model.updated");
|
|
8475
|
+
var Dp = class Zl extends CustomEvent {
|
|
8453
8476
|
constructor(t, r) {
|
|
8454
|
-
super(
|
|
8477
|
+
super(Zl.TYPE, {
|
|
8455
8478
|
bubbles: !0,
|
|
8456
8479
|
detail: {
|
|
8457
8480
|
src: t,
|
|
@@ -8460,19 +8483,19 @@ var Pp = class Jl extends CustomEvent {
|
|
|
8460
8483
|
}), v(this, "src", void 0), v(this, "done", void 0), this.src = t, this.done = r;
|
|
8461
8484
|
}
|
|
8462
8485
|
};
|
|
8463
|
-
v(
|
|
8464
|
-
var
|
|
8486
|
+
v(Dp, "TYPE", "delete.image");
|
|
8487
|
+
var Hp = class Ql extends CustomEvent {
|
|
8465
8488
|
constructor(t) {
|
|
8466
|
-
super(
|
|
8489
|
+
super(Ql.TYPE, {
|
|
8467
8490
|
bubbles: !0,
|
|
8468
8491
|
detail: t
|
|
8469
8492
|
}), v(this, "handler", void 0), this.handler = t;
|
|
8470
8493
|
}
|
|
8471
8494
|
};
|
|
8472
|
-
v(
|
|
8473
|
-
var
|
|
8495
|
+
v(Hp, "TYPE", "insert.image");
|
|
8496
|
+
var Wp = class ec extends CustomEvent {
|
|
8474
8497
|
constructor(t, r) {
|
|
8475
|
-
super(
|
|
8498
|
+
super(ec.TYPE, {
|
|
8476
8499
|
bubbles: !0,
|
|
8477
8500
|
detail: {
|
|
8478
8501
|
src: t,
|
|
@@ -8481,19 +8504,19 @@ var $p = class Ql extends CustomEvent {
|
|
|
8481
8504
|
}), v(this, "src", void 0), v(this, "done", void 0), this.src = t, this.done = r;
|
|
8482
8505
|
}
|
|
8483
8506
|
};
|
|
8484
|
-
v(
|
|
8485
|
-
var
|
|
8507
|
+
v(Wp, "TYPE", "delete.sound");
|
|
8508
|
+
var Fp = class tc extends CustomEvent {
|
|
8486
8509
|
constructor(t) {
|
|
8487
|
-
super(
|
|
8510
|
+
super(tc.TYPE, {
|
|
8488
8511
|
bubbles: !0,
|
|
8489
8512
|
detail: t
|
|
8490
8513
|
}), v(this, "handler", void 0), this.handler = t;
|
|
8491
8514
|
}
|
|
8492
8515
|
};
|
|
8493
|
-
v(
|
|
8494
|
-
var
|
|
8516
|
+
v(Fp, "TYPE", "insert.sound");
|
|
8517
|
+
var Bp = class rc extends CustomEvent {
|
|
8495
8518
|
constructor(t, r) {
|
|
8496
|
-
super(
|
|
8519
|
+
super(rc.TYPE, {
|
|
8497
8520
|
bubbles: !0,
|
|
8498
8521
|
composed: !0,
|
|
8499
8522
|
detail: {
|
|
@@ -8503,7 +8526,7 @@ var Dp = class tc extends CustomEvent {
|
|
|
8503
8526
|
}), v(this, "component", void 0), v(this, "complete", void 0), this.component = t, this.complete = r;
|
|
8504
8527
|
}
|
|
8505
8528
|
};
|
|
8506
|
-
v(
|
|
8529
|
+
v(Bp, "TYPE", "session-changed");
|
|
8507
8530
|
var Qs;
|
|
8508
8531
|
(function(e) {
|
|
8509
8532
|
e[e.ROOT = 0] = "ROOT", e[e.SUBJECT = 1] = "SUBJECT", e[e.LEVEL = 2] = "LEVEL", e[e.STANDARD = 3] = "STANDARD";
|
|
@@ -8522,19 +8545,19 @@ function _t(e, t) {
|
|
|
8522
8545
|
function bt() {
|
|
8523
8546
|
return typeof window < "u" && window.PIE_DEBUG === !0;
|
|
8524
8547
|
}
|
|
8525
|
-
var
|
|
8526
|
-
buildServiceBase:
|
|
8548
|
+
var Eg = _t("math-rendering", () => bt()), xg = _t("pie-scoring", () => bt()), Ag = _t("pie-updates", () => bt()), Mg = _t("pie-initialization", () => bt()), Cg = {
|
|
8549
|
+
buildServiceBase: pp,
|
|
8527
8550
|
bundleType: ho.player,
|
|
8528
8551
|
env: {
|
|
8529
8552
|
mode: "gather",
|
|
8530
8553
|
role: "student"
|
|
8531
8554
|
}
|
|
8532
|
-
},
|
|
8555
|
+
}, Og = _t("asset-handler", () => bt()), Ig = _t("authoring", () => bt()), Rg = _t("instrumentation-event-bridge", () => bt()), Lg = _t("instrumentation-provider-resolution", () => bt()), Pg = Object.freeze([
|
|
8533
8556
|
"composed",
|
|
8534
8557
|
"engine-ready",
|
|
8535
8558
|
"interactive",
|
|
8536
8559
|
"disposed"
|
|
8537
|
-
]),
|
|
8560
|
+
]), Ng = _t("pie-overrides", () => bt()), nc = [
|
|
8538
8561
|
"a[href]",
|
|
8539
8562
|
"button:not([disabled])",
|
|
8540
8563
|
"input:not([disabled]):not([type='hidden'])",
|
|
@@ -8543,19 +8566,19 @@ var Tg = _t("math-rendering", () => bt()), Sg = _t("pie-scoring", () => bt()), w
|
|
|
8543
8566
|
"[contenteditable]:not([contenteditable='false'])",
|
|
8544
8567
|
"[tabindex]:not([tabindex='-1'])"
|
|
8545
8568
|
].join(",");
|
|
8546
|
-
function
|
|
8547
|
-
return !e.matches(
|
|
8569
|
+
function Up(e) {
|
|
8570
|
+
return !e.matches(nc) || e.hasAttribute("disabled") || e.closest("[inert]") ? !1 : e.offsetParent !== null || e.getClientRects().length > 0;
|
|
8548
8571
|
}
|
|
8549
|
-
function
|
|
8550
|
-
return Array.from(e.querySelectorAll(
|
|
8572
|
+
function ic(e) {
|
|
8573
|
+
return Array.from(e.querySelectorAll(nc)).filter((t) => Up(t));
|
|
8551
8574
|
}
|
|
8552
|
-
function
|
|
8575
|
+
function jp(e, t) {
|
|
8553
8576
|
try {
|
|
8554
8577
|
if (t && e.contains(t)) {
|
|
8555
8578
|
t.focus();
|
|
8556
8579
|
return;
|
|
8557
8580
|
}
|
|
8558
|
-
const r =
|
|
8581
|
+
const r = ic(e);
|
|
8559
8582
|
if (r.length > 0) {
|
|
8560
8583
|
r[0].focus();
|
|
8561
8584
|
return;
|
|
@@ -8564,14 +8587,14 @@ function Fp(e, t) {
|
|
|
8564
8587
|
} catch {
|
|
8565
8588
|
}
|
|
8566
8589
|
}
|
|
8567
|
-
function
|
|
8590
|
+
function Gp(e, t = {}) {
|
|
8568
8591
|
const r = typeof document < "u" ? document.activeElement : null, n = t.wrap ?? !0, i = (o) => {
|
|
8569
8592
|
if (o.key === "Escape") {
|
|
8570
8593
|
t.onEscape?.();
|
|
8571
8594
|
return;
|
|
8572
8595
|
}
|
|
8573
8596
|
if (o.key !== "Tab") return;
|
|
8574
|
-
const s =
|
|
8597
|
+
const s = ic(e);
|
|
8575
8598
|
if (!s.length) {
|
|
8576
8599
|
if (!n) return;
|
|
8577
8600
|
o.preventDefault(), e.focus?.();
|
|
@@ -8584,7 +8607,7 @@ function Wp(e, t = {}) {
|
|
|
8584
8607
|
}
|
|
8585
8608
|
l === s.length - 1 && (n ? (o.preventDefault(), s[0].focus()) : t.onTabExit?.("forward", o));
|
|
8586
8609
|
};
|
|
8587
|
-
return queueMicrotask(() =>
|
|
8610
|
+
return queueMicrotask(() => jp(e, t.initialFocus)), e.addEventListener("keydown", i), () => {
|
|
8588
8611
|
e.removeEventListener("keydown", i);
|
|
8589
8612
|
try {
|
|
8590
8613
|
r?.focus?.();
|
|
@@ -8592,7 +8615,7 @@ function Wp(e, t = {}) {
|
|
|
8592
8615
|
}
|
|
8593
8616
|
};
|
|
8594
8617
|
}
|
|
8595
|
-
var
|
|
8618
|
+
var Vp = /* @__PURE__ */ Ze('<div class="pie-tool-text-to-speech__error-message svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), qp = /* @__PURE__ */ Ze('<div class="pie-tool-text-to-speech__loading-message svelte-xk676z"><span class="svelte-xk676z">Initializing...</span></div>'), Yp = /* @__PURE__ */ Ze('<div class="pie-tool-text-to-speech__selection-info svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), Xp = /* @__PURE__ */ Ze('<p class="svelte-xk676z">Select text on the page to read it aloud.</p>'), Kp = /* @__PURE__ */ Ze('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Resume</span>', 1), Jp = /* @__PURE__ */ Ze('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Pause</span>', 1), Zp = /* @__PURE__ */ Ze('<span class="pie-tool-text-to-speech__pulse svelte-xk676z"></span>'), Qp = /* @__PURE__ */ Ze('<div><div class="pie-tool-text-to-speech__status-icon svelte-xk676z"><!></div> <span class="svelte-xk676z"> </span></div>'), eg = /* @__PURE__ */ Ze('<div class="pie-tool-text-to-speech__instructions svelte-xk676z"><!></div> <div class="pie-tool-text-to-speech__control-group svelte-xk676z"><label for="tts-speed" class="svelte-xk676z"><span class="svelte-xk676z">Speed:</span> <strong class="svelte-xk676z"> </strong></label> <input id="tts-speed" type="range" min="0.5" max="2.0" step="0.25" class="svelte-xk676z"/></div> <div class="pie-tool-text-to-speech__playback-controls svelte-xk676z"><button class="pie-tool-text-to-speech__button-primary svelte-xk676z" aria-label="Play" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Play</span></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" type="button"><!></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" aria-label="Stop" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Stop</span></button></div> <!>', 1), tg = /* @__PURE__ */ Ze('<div class="pie-tool-text-to-speech svelte-xk676z" role="dialog" aria-label="Text-to-Speech Tool" tabindex="-1"><div class="pie-tool-text-to-speech__header svelte-xk676z"><div class="pie-tool-text-to-speech__header-left svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.858 18.142a3 3 0 104.243-4.242L12 12.142 7.757 7.899a3 3 0 000 4.242z" class="svelte-xk676z"></path></svg> <span class="pie-tool-text-to-speech__title svelte-xk676z">Text-to-Speech</span></div> <button class="pie-tool-text-to-speech__close-button svelte-xk676z" aria-label="Close" type="button">×</button></div> <div class="pie-tool-text-to-speech__content svelte-xk676z"><!></div></div>'), rg = {
|
|
8596
8619
|
hash: "svelte-xk676z",
|
|
8597
8620
|
code: `.pie-tool-text-to-speech.svelte-xk676z {position:fixed;width:300px;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border-light, #cbd5e0);border-radius:8px;box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);cursor:move;user-select:none;font-family:system-ui, -apple-system, sans-serif;}.pie-tool-text-to-speech__header.svelte-xk676z {display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--pie-primary-dark, #283593);color:var(--pie-white, #fff);border-radius:8px 8px 0 0;cursor:move;}.pie-tool-text-to-speech__header-left.svelte-xk676z {display:flex;align-items:center;gap:8px;}.pie-tool-text-to-speech__title.svelte-xk676z {font-weight:600;font-size:14px;}.pie-tool-text-to-speech__close-button.svelte-xk676z {background:rgb(255 255 255 / 0.2);border:none;color:var(--pie-white, #fff);width:24px;height:24px;border-radius:4px;cursor:pointer;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;transition:background-color 0.2s;}.pie-tool-text-to-speech__close-button.svelte-xk676z:hover {background:rgb(255 255 255 / 0.3);}.pie-tool-text-to-speech__content.svelte-xk676z {padding:16px;}.pie-tool-text-to-speech__error-message.svelte-xk676z,
|
|
8598
8621
|
.pie-tool-text-to-speech__loading-message.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:12px;border-radius:6px;font-size:13px;}.pie-tool-text-to-speech__error-message.svelte-xk676z {background:color-mix(in srgb, var(--pie-incorrect, #c33) 12%, transparent);color:var(--pie-incorrect-icon, #c33);border:1px solid color-mix(in srgb, var(--pie-incorrect, #c33) 30%, transparent);}.pie-tool-text-to-speech__loading-message.svelte-xk676z {background:var(--pie-secondary-background, #f0f4f8);color:var(--pie-text, #4a5568);justify-content:center;}.pie-tool-text-to-speech__instructions.svelte-xk676z {margin-bottom:16px;font-size:13px;color:var(--pie-text, #4a5568);}.pie-tool-text-to-speech__instructions.svelte-xk676z p:where(.svelte-xk676z) {margin:0;line-height:1.5;}.pie-tool-text-to-speech__selection-info.svelte-xk676z {display:flex;align-items:center;gap:6px;padding:8px 12px;background:color-mix(in srgb, var(--pie-correct, #10b981) 12%, transparent);border:1px solid color-mix(in srgb, var(--pie-correct, #10b981) 35%, transparent);border-radius:6px;color:var(--pie-correct-icon, #234e52);font-size:12px;}.pie-tool-text-to-speech__selection-info.svelte-xk676z svg:where(.svelte-xk676z) {flex-shrink:0;}.pie-tool-text-to-speech__control-group.svelte-xk676z {margin-bottom:16px;}.pie-tool-text-to-speech__control-group.svelte-xk676z label:where(.svelte-xk676z) {display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:13px;color:var(--pie-text, #4a5568);}.pie-tool-text-to-speech__control-group.svelte-xk676z label:where(.svelte-xk676z) strong:where(.svelte-xk676z) {color:var(--pie-primary, #667eea);font-weight:600;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z) {width:100%;height:6px;border-radius:3px;background:var(--pie-secondary-background, #e2e8f0);outline:none;-webkit-appearance:none;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb {-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--pie-primary, #667eea);cursor:pointer;transition:all 0.2s;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb:hover {background:var(--pie-primary-dark, #764ba2);transform:scale(1.1);}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z {display:flex;gap:8px;margin-bottom:12px;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z) {flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z) svg:where(.svelte-xk676z) {flex-shrink:0;}.pie-tool-text-to-speech__button-primary.svelte-xk676z {background:var(--pie-primary, #667eea);color:var(--pie-white, #fff);}.pie-tool-text-to-speech__button-primary.svelte-xk676z:hover:not(:disabled) {transform:translateY(-1px);box-shadow:0 4px 6px color-mix(in srgb, var(--pie-primary, #667eea) 35%, transparent);}.pie-tool-text-to-speech__button-secondary.svelte-xk676z {background:var(--pie-button-bg, #f7fafc);color:var(--pie-button-color, #4a5568);border:1px solid var(--pie-button-border, #e2e8f0);}.pie-tool-text-to-speech__button-secondary.svelte-xk676z:hover:not(:disabled) {background:var(--pie-button-hover-bg, #edf2f7);}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;transform:none !important;}.pie-tool-text-to-speech__status-indicator.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:8px 12px;background:color-mix(in srgb, var(--pie-correct, #4caf50) 10%, transparent);border:1px solid color-mix(in srgb, var(--pie-correct, #4caf50) 30%, transparent);border-radius:6px;font-size:12px;color:var(--pie-correct-icon, #166534);
|
|
@@ -8629,8 +8652,8 @@ var Bp = /* @__PURE__ */ Ze('<div class="pie-tool-text-to-speech__error-message
|
|
|
8629
8652
|
animation: none !important;transition:none !important;}
|
|
8630
8653
|
}`
|
|
8631
8654
|
};
|
|
8632
|
-
function
|
|
8633
|
-
ca(t, !0),
|
|
8655
|
+
function ng(e, t) {
|
|
8656
|
+
ca(t, !0), Xu(e, rg);
|
|
8634
8657
|
let r = xn(t, "visible", 7, !1), n = xn(t, "toolId", 7, "textToSpeech"), i = xn(t, "coordinator", 7), o = xn(t, "ttsService", 7);
|
|
8635
8658
|
const s = typeof window < "u";
|
|
8636
8659
|
let a = /* @__PURE__ */ q(void 0), l = /* @__PURE__ */ q(void 0), c = /* @__PURE__ */ q(!1), u = /* @__PURE__ */ q(Ct({
|
|
@@ -8642,7 +8665,7 @@ function Qp(e, t) {
|
|
|
8642
8665
|
})), p = /* @__PURE__ */ q(!1), g = /* @__PURE__ */ q(!1), m = /* @__PURE__ */ q(!1), b = /* @__PURE__ */ q(""), T = /* @__PURE__ */ q(1), I = /* @__PURE__ */ q(!1), H = /* @__PURE__ */ q(null), J = /* @__PURE__ */ q(!1), w = null;
|
|
8643
8666
|
On(() => {
|
|
8644
8667
|
i() && n() && !y(J) && (i().registerTool(n(), "Text-to-Speech", void 0, Qi.MODAL), P(J, !0));
|
|
8645
|
-
}),
|
|
8668
|
+
}), qu(async () => {
|
|
8646
8669
|
if (s) {
|
|
8647
8670
|
try {
|
|
8648
8671
|
const x = new Io();
|
|
@@ -8661,7 +8684,7 @@ function Qp(e, t) {
|
|
|
8661
8684
|
w?.(), w = null;
|
|
8662
8685
|
return;
|
|
8663
8686
|
}
|
|
8664
|
-
return w?.(), w =
|
|
8687
|
+
return w?.(), w = Gp(y(a), {
|
|
8665
8688
|
initialFocus: y(l) || null,
|
|
8666
8689
|
onEscape: Lt
|
|
8667
8690
|
}), () => {
|
|
@@ -8728,7 +8751,7 @@ function Qp(e, t) {
|
|
|
8728
8751
|
function Lt() {
|
|
8729
8752
|
i()?.hideTool(n());
|
|
8730
8753
|
}
|
|
8731
|
-
const ci = /* @__PURE__ */
|
|
8754
|
+
const ci = /* @__PURE__ */ du(() => y(T) === 0.5 ? "Slow" : y(T) === 0.75 ? "Slower" : y(T) === 1 ? "Normal" : y(T) === 1.25 ? "Faster" : y(T) === 1.5 ? "Fast" : y(T) === 2 ? "Very Fast" : `${y(T)}x`);
|
|
8732
8755
|
var ui = {
|
|
8733
8756
|
get visible() {
|
|
8734
8757
|
return r();
|
|
@@ -8754,21 +8777,21 @@ function Qp(e, t) {
|
|
|
8754
8777
|
set ttsService(x) {
|
|
8755
8778
|
o(x), Qr();
|
|
8756
8779
|
}
|
|
8757
|
-
}, mn =
|
|
8758
|
-
var N =
|
|
8780
|
+
}, mn = Hu(), vn = os(mn), fi = (x) => {
|
|
8781
|
+
var N = tg(), yt = se(N), U = ke(se(yt), 2);
|
|
8759
8782
|
_s(U, (ie) => P(l, ie), () => y(l)), oe(yt);
|
|
8760
|
-
var Nr = ke(yt, 2),
|
|
8761
|
-
var be =
|
|
8783
|
+
var Nr = ke(yt, 2), F = se(Nr), Pt = (ie) => {
|
|
8784
|
+
var be = Vp(), et = ke(se(be), 2), ur = se(et, !0);
|
|
8762
8785
|
oe(et), oe(be), Br(() => kn(ur, y(H))), me(ie, be);
|
|
8763
8786
|
}, cr = (ie) => {
|
|
8764
|
-
var be =
|
|
8787
|
+
var be = qp();
|
|
8765
8788
|
me(ie, be);
|
|
8766
8789
|
}, Ue = (ie) => {
|
|
8767
|
-
var be =
|
|
8768
|
-
var re =
|
|
8790
|
+
var be = eg(), et = os(be), ur = se(et), tt = (K) => {
|
|
8791
|
+
var re = Yp(), ot = ke(se(re), 2), wt = se(ot);
|
|
8769
8792
|
oe(ot), oe(re), Br(() => kn(wt, `${y(b).length ?? ""} characters selected`)), me(K, re);
|
|
8770
8793
|
}, Nt = (K) => {
|
|
8771
|
-
var re =
|
|
8794
|
+
var re = Xp();
|
|
8772
8795
|
me(K, re);
|
|
8773
8796
|
};
|
|
8774
8797
|
vr(ur, (K) => {
|
|
@@ -8777,12 +8800,12 @@ function Qp(e, t) {
|
|
|
8777
8800
|
var Pe = ke(et, 2), $t = se(Pe), fr = ke(se($t), 2), Tt = se(fr, !0);
|
|
8778
8801
|
oe(fr), oe($t);
|
|
8779
8802
|
var rt = ke($t, 2);
|
|
8780
|
-
|
|
8803
|
+
of(rt), oe(Pe);
|
|
8781
8804
|
var St = ke(Pe, 2), dr = se(St), nt = ke(dr, 2), di = se(nt), $r = (K) => {
|
|
8782
|
-
var re =
|
|
8805
|
+
var re = Kp();
|
|
8783
8806
|
Di(2), me(K, re);
|
|
8784
8807
|
}, zt = (K) => {
|
|
8785
|
-
var re =
|
|
8808
|
+
var re = Jp();
|
|
8786
8809
|
Di(2), me(K, re);
|
|
8787
8810
|
};
|
|
8788
8811
|
vr(di, (K) => {
|
|
@@ -8791,13 +8814,13 @@ function Qp(e, t) {
|
|
|
8791
8814
|
var it = ke(nt, 2);
|
|
8792
8815
|
oe(St);
|
|
8793
8816
|
var ye = ke(St, 2), zr = (K) => {
|
|
8794
|
-
var re =
|
|
8817
|
+
var re = Qp();
|
|
8795
8818
|
let ot;
|
|
8796
8819
|
var wt = se(re), hr = se(wt), pr = (je) => {
|
|
8797
|
-
var Hr =
|
|
8820
|
+
var Hr = Du("⏸");
|
|
8798
8821
|
me(je, Hr);
|
|
8799
8822
|
}, Te = (je) => {
|
|
8800
|
-
var Hr =
|
|
8823
|
+
var Hr = Zp();
|
|
8801
8824
|
me(je, Hr);
|
|
8802
8825
|
};
|
|
8803
8826
|
vr(hr, (je) => {
|
|
@@ -8805,29 +8828,29 @@ function Qp(e, t) {
|
|
|
8805
8828
|
}), oe(wt);
|
|
8806
8829
|
var st = ke(wt, 2), Dr = se(st, !0);
|
|
8807
8830
|
oe(st), oe(re), Br(() => {
|
|
8808
|
-
ot =
|
|
8831
|
+
ot = Zu(re, 1, "pie-tool-text-to-speech__status-indicator svelte-xk676z", null, ot, { "pie-tool-text-to-speech__status-indicator--paused": y(m) }), kn(Dr, y(m) ? "Paused" : "Speaking...");
|
|
8809
8832
|
}), me(K, re);
|
|
8810
8833
|
};
|
|
8811
8834
|
vr(ye, (K) => {
|
|
8812
8835
|
y(g) && K(zr);
|
|
8813
8836
|
}), Br(() => {
|
|
8814
|
-
kn(Tt, y(ci)),
|
|
8837
|
+
kn(Tt, y(ci)), sf(rt, y(T)), rt.disabled = y(g), dr.disabled = !y(I) || y(g), nt.disabled = !y(g), Xi(nt, "aria-label", y(m) ? "Resume" : "Pause"), it.disabled = !y(g);
|
|
8815
8838
|
}), mr("input", rt, lr), mr("click", dr, le), mr("click", nt, sr), mr("click", it, ar), me(ie, be);
|
|
8816
8839
|
};
|
|
8817
|
-
vr(
|
|
8840
|
+
vr(F, (ie) => {
|
|
8818
8841
|
y(H) ? ie(Pt) : y(p) ? ie(Ue, -1) : ie(cr, 1);
|
|
8819
|
-
}), oe(Nr), oe(N), _s(N, (ie) => P(a, ie), () => y(a)), Br(() =>
|
|
8842
|
+
}), oe(Nr), oe(N), _s(N, (ie) => P(a, ie), () => y(a)), Br(() => Qu(N, `left: ${y(u).x ?? ""}px; top: ${y(u).y ?? ""}px;`)), mr("pointerdown", N, li), mr("click", U, Lt), me(x, N);
|
|
8820
8843
|
};
|
|
8821
8844
|
return vr(vn, (x) => {
|
|
8822
8845
|
r() && s && x(fi);
|
|
8823
8846
|
}), me(e, mn), ua(ui);
|
|
8824
8847
|
}
|
|
8825
|
-
|
|
8848
|
+
Pu([
|
|
8826
8849
|
"pointerdown",
|
|
8827
8850
|
"click",
|
|
8828
8851
|
"input"
|
|
8829
8852
|
]);
|
|
8830
|
-
customElements.define("pie-tool-text-to-speech",
|
|
8853
|
+
customElements.define("pie-tool-text-to-speech", df(ng, {
|
|
8831
8854
|
visible: {
|
|
8832
8855
|
attribute: "visible",
|
|
8833
8856
|
type: "Boolean"
|
|
@@ -8840,7 +8863,7 @@ customElements.define("pie-tool-text-to-speech", ff(Qp, {
|
|
|
8840
8863
|
ttsService: {}
|
|
8841
8864
|
}, [], [], { mode: "open" }));
|
|
8842
8865
|
export {
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8866
|
+
ng as default,
|
|
8867
|
+
sg as n,
|
|
8868
|
+
og as t
|
|
8846
8869
|
};
|