@pie-players/pie-tool-answer-eliminator 0.3.68 → 0.3.69
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-answer-eliminator.js +961 -959
- package/package.json +7 -7
- package/dist/vite.config.d.ts +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as Ws } from "./rolldown-runtime--eTHp1Qs.js";
|
|
2
2
|
if (typeof window < "u") {
|
|
3
|
-
var
|
|
4
|
-
((
|
|
3
|
+
var hr, ur;
|
|
4
|
+
((hr = (ur = window).__svelte ?? (ur.__svelte = {})).v ?? (hr.v = /* @__PURE__ */ new Set())).add("5");
|
|
5
5
|
}
|
|
6
6
|
var zt = {}, B = /* @__PURE__ */ Symbol("uninitialized");
|
|
7
|
-
var
|
|
7
|
+
var Fs = Array.isArray, Ds = Array.prototype.indexOf, Ut = Array.prototype.includes, zs = Array.from, qt = Object.keys, jt = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, Us = Object.prototype, qs = Array.prototype, js = Object.getPrototypeOf, dr = Object.isExtensible, Gs = () => {
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function Vs(t) {
|
|
10
10
|
for (var e = 0; e < t.length; e++) t[e]();
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Ks() {
|
|
13
13
|
var t, e;
|
|
14
14
|
return {
|
|
15
15
|
promise: new Promise((n, r) => {
|
|
@@ -27,7 +27,7 @@ function yt(t) {
|
|
|
27
27
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
28
28
|
}, yt(t);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ys(t, e) {
|
|
31
31
|
if (yt(t) != "object" || !t) return t;
|
|
32
32
|
var n = t[Symbol.toPrimitive];
|
|
33
33
|
if (n !== void 0) {
|
|
@@ -37,63 +37,63 @@ function Ks(t, e) {
|
|
|
37
37
|
}
|
|
38
38
|
return (e === "string" ? String : Number)(t);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
var e =
|
|
40
|
+
function Xs(t) {
|
|
41
|
+
var e = Ys(t, "string");
|
|
42
42
|
return yt(e) == "symbol" ? e : e + "";
|
|
43
43
|
}
|
|
44
44
|
function d(t, e, n) {
|
|
45
|
-
return (e =
|
|
45
|
+
return (e = Xs(e)) in t ? Object.defineProperty(t, e, {
|
|
46
46
|
value: n,
|
|
47
47
|
enumerable: !0,
|
|
48
48
|
configurable: !0,
|
|
49
49
|
writable: !0
|
|
50
50
|
}) : t[e] = n, t;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
52
|
+
var bh = 1 << 24, le = 1024, te = 2048, Ve = 4096, Zr = 8192, Js = 16384, ei = 32768, fr = 1 << 25, ti = 65536, Sh = 1 << 17, Th = 1 << 18, _t = 1 << 19, Qs = 1 << 20, kt = 65536, pr = 1 << 21, wh = 1 << 22, ni = 1 << 23, gt = /* @__PURE__ */ Symbol("$state"), ri = /* @__PURE__ */ Symbol("legacy props"), Zs = /* @__PURE__ */ Symbol("proxy path"), eo = /* @__PURE__ */ Symbol("attributes"), to = /* @__PURE__ */ Symbol("class"), no = /* @__PURE__ */ Symbol("style"), ro = /* @__PURE__ */ Symbol("text"), sn = new class extends Error {
|
|
53
53
|
constructor(...e) {
|
|
54
54
|
super(...e), d(this, "name", "StaleReactionError"), d(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
55
55
|
}
|
|
56
56
|
}(), kh = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
57
|
-
function
|
|
57
|
+
function io(t) {
|
|
58
58
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function so(t) {
|
|
61
61
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function oo() {
|
|
64
64
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ao(t) {
|
|
67
67
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function lo() {
|
|
70
70
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function co() {
|
|
73
73
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function ho(t) {
|
|
76
76
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function uo() {
|
|
79
79
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function fo() {
|
|
82
82
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function po() {
|
|
85
85
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function go() {
|
|
88
88
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function mo() {
|
|
91
91
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function ii(t) {
|
|
94
94
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function vo() {
|
|
97
97
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
98
98
|
}
|
|
99
99
|
var ie = !1;
|
|
@@ -103,19 +103,19 @@ function Rt(t) {
|
|
|
103
103
|
var j;
|
|
104
104
|
function bt(t) {
|
|
105
105
|
if (t === null)
|
|
106
|
-
throw
|
|
106
|
+
throw ii(), zt;
|
|
107
107
|
return j = t;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function si() {
|
|
110
110
|
return bt(/* @__PURE__ */ lt(j));
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function yo(t = 1) {
|
|
113
113
|
if (ie) {
|
|
114
114
|
for (var e = t, n = j; e--; ) n = /* @__PURE__ */ lt(n);
|
|
115
115
|
j = n;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function bo(t = !0) {
|
|
119
119
|
for (var e = 0, n = j; ; ) {
|
|
120
120
|
if (n.nodeType === 8) {
|
|
121
121
|
var r = n.data;
|
|
@@ -128,27 +128,27 @@ function yo(t = !0) {
|
|
|
128
128
|
t && n.remove(), n = i;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function oi(t) {
|
|
132
132
|
return t === this.v;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function So(t, e) {
|
|
135
135
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return !
|
|
137
|
+
function ai(t) {
|
|
138
|
+
return !So(t, this.v);
|
|
139
139
|
}
|
|
140
|
-
var
|
|
141
|
-
function
|
|
142
|
-
return t.label = e,
|
|
140
|
+
var Ee = !1, Et = !1;
|
|
141
|
+
function gr(t, e) {
|
|
142
|
+
return t.label = e, To(t.v, e), t;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
return t?.[
|
|
144
|
+
function To(t, e) {
|
|
145
|
+
return t?.[Zs]?.(e), t;
|
|
146
146
|
}
|
|
147
147
|
var I = null;
|
|
148
148
|
function Gt(t) {
|
|
149
149
|
I = t;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function li(t, e = !1, n) {
|
|
152
152
|
I = {
|
|
153
153
|
p: I,
|
|
154
154
|
i: !1,
|
|
@@ -164,38 +164,38 @@ function ai(t, e = !1, n) {
|
|
|
164
164
|
} : null
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function ci(t) {
|
|
168
168
|
var e = I, n = e.e;
|
|
169
169
|
if (n !== null) {
|
|
170
170
|
e.e = null;
|
|
171
|
-
for (var r of n)
|
|
171
|
+
for (var r of n) Ni(r);
|
|
172
172
|
}
|
|
173
173
|
return t !== void 0 && (e.x = t), e.i = !0, I = e.p, t ?? {};
|
|
174
174
|
}
|
|
175
175
|
function on() {
|
|
176
176
|
return !Et || I !== null && I.l === null;
|
|
177
177
|
}
|
|
178
|
-
var
|
|
179
|
-
function
|
|
180
|
-
var t =
|
|
181
|
-
|
|
178
|
+
var Oe = [];
|
|
179
|
+
function hi() {
|
|
180
|
+
var t = Oe;
|
|
181
|
+
Oe = [], Vs(t);
|
|
182
182
|
}
|
|
183
183
|
function ze(t) {
|
|
184
|
-
if (
|
|
185
|
-
var e =
|
|
184
|
+
if (Oe.length === 0 && !mt) {
|
|
185
|
+
var e = Oe;
|
|
186
186
|
queueMicrotask(() => {
|
|
187
|
-
e ===
|
|
187
|
+
e === Oe && hi();
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
Oe.push(t);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
for (;
|
|
192
|
+
function wo() {
|
|
193
|
+
for (; Oe.length > 0; ) hi();
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function ui(t) {
|
|
196
196
|
var e = C;
|
|
197
197
|
if (e === null)
|
|
198
|
-
return A.f |=
|
|
198
|
+
return A.f |= ni, t;
|
|
199
199
|
if ((e.f & 32768) === 0 && (e.f & 4) === 0)
|
|
200
200
|
throw t;
|
|
201
201
|
nt(t, e);
|
|
@@ -217,23 +217,23 @@ function nt(t, e) {
|
|
|
217
217
|
throw t;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
var
|
|
220
|
+
var _o = ~(te | Ve | le);
|
|
221
221
|
function $(t, e) {
|
|
222
|
-
t.f = t.f &
|
|
222
|
+
t.f = t.f & _o | e;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function jn(t) {
|
|
225
225
|
(t.f & 512) !== 0 || t.deps === null ? $(t, le) : $(t, Ve);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function di(t) {
|
|
228
228
|
if (t !== null)
|
|
229
229
|
for (const e of t)
|
|
230
|
-
(e.f & 2) === 0 || (e.f & 65536) === 0 || (e.f ^=
|
|
230
|
+
(e.f & 2) === 0 || (e.f & 65536) === 0 || (e.f ^= kt, di(e.deps));
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
(t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && n.add(t),
|
|
232
|
+
function fi(t, e, n) {
|
|
233
|
+
(t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && n.add(t), di(t.deps), $(t, le);
|
|
234
234
|
}
|
|
235
235
|
var ko = !1, Mt = !1;
|
|
236
|
-
function
|
|
236
|
+
function Eo(t) {
|
|
237
237
|
var e = Mt;
|
|
238
238
|
try {
|
|
239
239
|
return Mt = !1, [t(), Mt];
|
|
@@ -243,67 +243,67 @@ function _o(t) {
|
|
|
243
243
|
}
|
|
244
244
|
function an(t) {
|
|
245
245
|
var e = A, n = C;
|
|
246
|
-
|
|
246
|
+
fe(null), Ae(null);
|
|
247
247
|
try {
|
|
248
248
|
return t();
|
|
249
249
|
} finally {
|
|
250
|
-
|
|
250
|
+
fe(e), Ae(n);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function Ao(t) {
|
|
254
254
|
let e = 0, n = ln(0), r;
|
|
255
255
|
return () => {
|
|
256
|
-
|
|
256
|
+
Qn() && (w(n), Zn(() => (e === 0 && (r = hn(() => t(() => vt(n)))), e += 1, () => {
|
|
257
257
|
ze(() => {
|
|
258
258
|
e -= 1, e === 0 && (r?.(), r = void 0, vt(n));
|
|
259
259
|
});
|
|
260
260
|
})));
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function pi(t, e) {
|
|
264
264
|
if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
function _(t, e, n) {
|
|
270
|
-
fi(t, e), e.set(t, n);
|
|
266
|
+
function Gn(t, e) {
|
|
267
|
+
pi(t, e), e.add(t);
|
|
271
268
|
}
|
|
272
269
|
function k(t, e, n) {
|
|
270
|
+
pi(t, e), e.set(t, n);
|
|
271
|
+
}
|
|
272
|
+
function _(t, e, n) {
|
|
273
273
|
if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : n;
|
|
274
274
|
throw new TypeError("Private element is not present on this object");
|
|
275
275
|
}
|
|
276
276
|
function S(t, e, n) {
|
|
277
|
-
return t.set(
|
|
277
|
+
return t.set(_(t, e), n), n;
|
|
278
278
|
}
|
|
279
279
|
function p(t, e) {
|
|
280
|
-
return t.get(
|
|
280
|
+
return t.get(_(t, e));
|
|
281
281
|
}
|
|
282
|
-
var
|
|
283
|
-
function
|
|
284
|
-
new
|
|
282
|
+
var Co = ti | _t;
|
|
283
|
+
function xo(t, e, n, r) {
|
|
284
|
+
new Ro(t, e, n, r);
|
|
285
285
|
}
|
|
286
|
-
var se = /* @__PURE__ */ new WeakMap(),
|
|
286
|
+
var se = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), Ro = class {
|
|
287
287
|
constructor(t, e, n, r) {
|
|
288
|
-
|
|
289
|
-
S(
|
|
288
|
+
Gn(this, W), d(this, "parent", void 0), d(this, "is_pending", !1), d(this, "transform_error", void 0), k(this, se, void 0), k(this, _n, ie ? j : null), k(this, he, void 0), k(this, St, void 0), k(this, ee, void 0), k(this, ue, null), k(this, J, null), k(this, ne, null), k(this, $e, null), k(this, Je, 0), k(this, He, 0), k(this, Ot, !1), k(this, kn, /* @__PURE__ */ new Set()), k(this, En, /* @__PURE__ */ new Set()), k(this, Ce, null), k(this, mr, Ao(() => (S(Ce, this, ln(p(Je, this))), () => {
|
|
289
|
+
S(Ce, this, null);
|
|
290
290
|
}))), S(se, this, t), S(he, this, e), S(St, this, (i) => {
|
|
291
291
|
var s = C;
|
|
292
292
|
s.b = this, s.f |= 128, n(i);
|
|
293
|
-
}), this.parent = C.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), S(ee, this,
|
|
293
|
+
}), this.parent = C.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), S(ee, this, Zo(() => {
|
|
294
294
|
if (ie) {
|
|
295
|
-
const i = p(
|
|
296
|
-
|
|
295
|
+
const i = p(_n, this);
|
|
296
|
+
si();
|
|
297
297
|
const s = i.data === "[!";
|
|
298
298
|
if (i.data.startsWith("[?")) {
|
|
299
299
|
const o = JSON.parse(i.data.slice(2));
|
|
300
|
-
|
|
301
|
-
} else s ?
|
|
302
|
-
} else
|
|
303
|
-
},
|
|
300
|
+
_(W, this, Oo).call(this, o);
|
|
301
|
+
} else s ? _(W, this, Lo).call(this) : _(W, this, Mo).call(this);
|
|
302
|
+
} else _(W, this, mi).call(this);
|
|
303
|
+
}, Co)), ie && S(se, this, j);
|
|
304
304
|
}
|
|
305
305
|
defer_effect(t) {
|
|
306
|
-
|
|
306
|
+
fi(t, p(kn, this), p(En, this));
|
|
307
307
|
}
|
|
308
308
|
is_rendered() {
|
|
309
309
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
@@ -312,44 +312,44 @@ var se = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), he =
|
|
|
312
312
|
return !!p(he, this).pending;
|
|
313
313
|
}
|
|
314
314
|
update_pending_count(t, e) {
|
|
315
|
-
|
|
316
|
-
S(Ot, this, !1), p(
|
|
315
|
+
_(W, this, vi).call(this, t, e), S(Je, this, p(Je, this) + t), !(!p(Ce, this) || p(Ot, this)) && (S(Ot, this, !0), ze(() => {
|
|
316
|
+
S(Ot, this, !1), p(Ce, this) && xi(p(Ce, this), p(Je, this));
|
|
317
317
|
}));
|
|
318
318
|
}
|
|
319
319
|
get_effect_pending() {
|
|
320
|
-
return p(
|
|
320
|
+
return p(mr, this).call(this), w(p(Ce, this));
|
|
321
321
|
}
|
|
322
322
|
error(t) {
|
|
323
323
|
if (!p(he, this).onerror && !p(he, this).failed) throw t;
|
|
324
324
|
O?.is_fork ? (p(ue, this) && O.skip_effect(p(ue, this)), p(J, this) && O.skip_effect(p(J, this)), p(ne, this) && O.skip_effect(p(ne, this)), O.oncommit(() => {
|
|
325
|
-
|
|
326
|
-
})) :
|
|
325
|
+
_(W, this, vr).call(this, t);
|
|
326
|
+
})) : _(W, this, vr).call(this, t);
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
|
-
function
|
|
329
|
+
function Mo() {
|
|
330
330
|
try {
|
|
331
331
|
S(ue, this, qe(() => p(St, this).call(this, p(se, this))));
|
|
332
332
|
} catch (t) {
|
|
333
333
|
this.error(t);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
const e = p(he, this).failed, { reset: n, invoke_onerror: r } =
|
|
336
|
+
function Oo(t) {
|
|
337
|
+
const e = p(he, this).failed, { reset: n, invoke_onerror: r } = _(W, this, gi).call(this, t);
|
|
338
338
|
ze(r), e && S(ne, this, qe(() => {
|
|
339
339
|
e(p(se, this), () => t, () => n);
|
|
340
340
|
}));
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function gi(t) {
|
|
343
343
|
var e = !1, n = !1;
|
|
344
344
|
const r = () => {
|
|
345
345
|
if (e) {
|
|
346
|
-
|
|
346
|
+
vo();
|
|
347
347
|
return;
|
|
348
348
|
}
|
|
349
|
-
e = !0, n &&
|
|
349
|
+
e = !0, n && go(), p(ne, this) !== null && cn(p(ne, this), () => {
|
|
350
350
|
S(ne, this, null);
|
|
351
|
-
}),
|
|
352
|
-
|
|
351
|
+
}), _(W, this, Kn).call(this, () => {
|
|
352
|
+
_(W, this, mi).call(this);
|
|
353
353
|
});
|
|
354
354
|
};
|
|
355
355
|
return {
|
|
@@ -363,61 +363,61 @@ function pi(t) {
|
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Lo() {
|
|
367
367
|
const t = p(he, this).pending;
|
|
368
368
|
t && (this.is_pending = !0, S(J, this, qe(() => t(p(se, this)))), ze(() => {
|
|
369
|
-
var e = S(
|
|
370
|
-
e.append(n), S(ue, this,
|
|
369
|
+
var e = S($e, this, document.createDocumentFragment()), n = Pi();
|
|
370
|
+
e.append(n), S(ue, this, _(W, this, Kn).call(this, () => qe(() => p(St, this).call(this, n)))), p(He, this) === 0 && (p(se, this).before(e), S($e, this, null), cn(p(J, this), () => {
|
|
371
371
|
S(J, this, null);
|
|
372
|
-
}),
|
|
372
|
+
}), _(W, this, Vn).call(this, O));
|
|
373
373
|
}));
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function mi() {
|
|
376
376
|
try {
|
|
377
|
-
if (this.is_pending = this.has_pending_snippet(), S(
|
|
377
|
+
if (this.is_pending = this.has_pending_snippet(), S(He, this, 0), S(Je, this, 0), S(ue, this, qe(() => {
|
|
378
378
|
p(St, this).call(this, p(se, this));
|
|
379
|
-
})), p(
|
|
380
|
-
var t = S(
|
|
381
|
-
|
|
379
|
+
})), p(He, this) > 0) {
|
|
380
|
+
var t = S($e, this, document.createDocumentFragment());
|
|
381
|
+
na(p(ue, this), t);
|
|
382
382
|
const e = p(he, this).pending;
|
|
383
383
|
S(J, this, qe(() => e(p(se, this))));
|
|
384
|
-
} else
|
|
384
|
+
} else _(W, this, Vn).call(this, O);
|
|
385
385
|
} catch (e) {
|
|
386
386
|
this.error(e);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
this.is_pending = !1, t.transfer_effects(p(
|
|
389
|
+
function Vn(t) {
|
|
390
|
+
this.is_pending = !1, t.transfer_effects(p(kn, this), p(En, this));
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Kn(t) {
|
|
393
393
|
var e = C, n = A, r = I;
|
|
394
|
-
|
|
394
|
+
Ae(p(ee, this)), fe(p(ee, this)), Gt(p(ee, this).ctx);
|
|
395
395
|
try {
|
|
396
396
|
return at.ensure(), t();
|
|
397
397
|
} catch (i) {
|
|
398
|
-
return
|
|
398
|
+
return ui(i), null;
|
|
399
399
|
} finally {
|
|
400
|
-
|
|
400
|
+
Ae(e), fe(n), Gt(r);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function vi(t, e) {
|
|
404
404
|
if (!this.has_pending_snippet()) {
|
|
405
405
|
if (this.parent) {
|
|
406
406
|
var n;
|
|
407
|
-
|
|
407
|
+
_(W, n = this.parent, vi).call(n, t, e);
|
|
408
408
|
}
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
S(
|
|
411
|
+
S(He, this, p(He, this) + t), p(He, this) === 0 && (_(W, this, Vn).call(this, e), p(J, this) && cn(p(J, this), () => {
|
|
412
412
|
S(J, this, null);
|
|
413
|
-
}), p(
|
|
413
|
+
}), p($e, this) && (p(se, this).before(p($e, this)), S($e, this, null)));
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
p(ue, this) && (oe(p(ue, this)), S(ue, this, null)), p(J, this) && (oe(p(J, this)), S(J, this, null)), p(ne, this) && (oe(p(ne, this)), S(ne, this, null)), ie && (bt(p(
|
|
415
|
+
function vr(t) {
|
|
416
|
+
p(ue, this) && (oe(p(ue, this)), S(ue, this, null)), p(J, this) && (oe(p(J, this)), S(J, this, null)), p(ne, this) && (oe(p(ne, this)), S(ne, this, null)), ie && (bt(p(_n, this)), yo(), bt(bo()));
|
|
417
417
|
let e = p(he, this).failed;
|
|
418
418
|
const n = (r) => {
|
|
419
|
-
const { reset: i, invoke_onerror: s } =
|
|
420
|
-
s(), e && S(ne, this,
|
|
419
|
+
const { reset: i, invoke_onerror: s } = _(W, this, gi).call(this, r);
|
|
420
|
+
s(), e && S(ne, this, _(W, this, Kn).call(this, () => {
|
|
421
421
|
try {
|
|
422
422
|
return qe(() => {
|
|
423
423
|
var o = C;
|
|
@@ -442,11 +442,11 @@ function gr(t) {
|
|
|
442
442
|
// @__NO_SIDE_EFFECTS__
|
|
443
443
|
function Vt(t) {
|
|
444
444
|
var e = 2 | te;
|
|
445
|
-
return C !== null && (C.f |=
|
|
445
|
+
return C !== null && (C.f |= _t), {
|
|
446
446
|
ctx: I,
|
|
447
447
|
deps: null,
|
|
448
448
|
effects: null,
|
|
449
|
-
equals:
|
|
449
|
+
equals: oi,
|
|
450
450
|
f: e,
|
|
451
451
|
fn: t,
|
|
452
452
|
reactions: null,
|
|
@@ -457,58 +457,58 @@ function Vt(t) {
|
|
|
457
457
|
ac: null
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
var
|
|
460
|
+
var Po = /* @__PURE__ */ Symbol("obsolete");
|
|
461
461
|
// @__NO_SIDE_EFFECTS__
|
|
462
|
-
function
|
|
462
|
+
function yr(t) {
|
|
463
463
|
const e = /* @__PURE__ */ Vt(t);
|
|
464
|
-
return
|
|
464
|
+
return Ee || Wi(e), e;
|
|
465
465
|
}
|
|
466
466
|
// @__NO_SIDE_EFFECTS__
|
|
467
|
-
function
|
|
467
|
+
function Io(t) {
|
|
468
468
|
const e = /* @__PURE__ */ Vt(t);
|
|
469
|
-
return e.equals =
|
|
469
|
+
return e.equals = ai, e;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function No(t) {
|
|
472
472
|
var e = t.effects;
|
|
473
473
|
if (e !== null) {
|
|
474
474
|
t.effects = null;
|
|
475
475
|
for (var n = 0; n < e.length; n += 1) oe(e[n]);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Yn(t) {
|
|
479
479
|
var e, n = C, r = t.parent;
|
|
480
|
-
if (!
|
|
481
|
-
return
|
|
482
|
-
|
|
480
|
+
if (!ye && r !== null && t.v !== B && (r.f & 24576) !== 0)
|
|
481
|
+
return mo(), t.v;
|
|
482
|
+
Ae(r);
|
|
483
483
|
try {
|
|
484
|
-
t.f &= ~
|
|
484
|
+
t.f &= ~kt, No(t), e = Ui(t);
|
|
485
485
|
} finally {
|
|
486
|
-
|
|
486
|
+
Ae(n);
|
|
487
487
|
}
|
|
488
488
|
return e;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
var e =
|
|
492
|
-
if (!t.equals(e) && (t.wv =
|
|
490
|
+
function yi(t) {
|
|
491
|
+
var e = Yn(t);
|
|
492
|
+
if (!t.equals(e) && (t.wv = Di(), (!O?.is_fork || t.deps === null) && (O !== null ? (O.capture(t, e, !0), An?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
|
|
493
493
|
$(t, le);
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
496
|
-
|
|
496
|
+
ye || (q !== null ? (Qn() || O?.is_fork) && q.set(t, e) : jn(t));
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function $o(t) {
|
|
499
499
|
if (t.effects !== null)
|
|
500
500
|
for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && an(() => {
|
|
501
501
|
e.ac.abort(sn), e.ac = null;
|
|
502
|
-
}), e.fn !== null && (e.teardown =
|
|
502
|
+
}), e.fn !== null && (e.teardown = Gs), Tt(e, 0), er(e));
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function bi(t) {
|
|
505
505
|
if (t.effects !== null)
|
|
506
506
|
for (const e of t.effects) e.teardown && e.fn !== null && st(e);
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
var
|
|
508
|
+
var Si, Kt = null, Qe = null, O = null, An = null, q = null, Cn = null, mt = !1, fn = !1, it = null, Yt = null, Ti = 0;
|
|
509
|
+
var Ho = 1, Xt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakSet(), at = class wi {
|
|
510
510
|
constructor() {
|
|
511
|
-
|
|
511
|
+
Gn(this, N), d(this, "id", Ho++), k(this, Xt, !1), d(this, "linked", !0), k(this, Be, null), k(this, Le, null), d(this, "async_deriveds", /* @__PURE__ */ new Map()), d(this, "current", /* @__PURE__ */ new Map()), d(this, "previous", /* @__PURE__ */ new Map()), k(this, Jt, /* @__PURE__ */ new Set()), k(this, Lt, /* @__PURE__ */ new Set()), k(this, Ze, 0), k(this, Re, /* @__PURE__ */ new Map()), k(this, ht, null), k(this, Z, []), k(this, xn, []), k(this, Ue, /* @__PURE__ */ new Set()), k(this, ve, /* @__PURE__ */ new Set()), k(this, ke, /* @__PURE__ */ new Map()), k(this, $t, /* @__PURE__ */ new Set()), d(this, "is_fork", !1), k(this, ut, !1), Qe === null ? Kt = Qe = this : (S(Le, Qe, this), S(Be, this, Qe)), Qe = this;
|
|
512
512
|
}
|
|
513
513
|
skip_effect(e) {
|
|
514
514
|
p(ke, this).has(e) || p(ke, this).set(e, {
|
|
@@ -538,30 +538,30 @@ var $o = 1, Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap
|
|
|
538
538
|
}
|
|
539
539
|
flush() {
|
|
540
540
|
try {
|
|
541
|
-
fn = !0, O = this,
|
|
541
|
+
fn = !0, O = this, _(N, this, Qt).call(this);
|
|
542
542
|
} finally {
|
|
543
|
-
|
|
543
|
+
Ti = 0, Cn = null, it = null, Yt = null, fn = !1, O = null, q = null, de.clear();
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
discard() {
|
|
547
547
|
for (const e of p(Lt, this)) e(this);
|
|
548
548
|
p(Lt, this).clear();
|
|
549
|
-
for (const e of this.async_deriveds.values()) e.reject(
|
|
550
|
-
|
|
549
|
+
for (const e of this.async_deriveds.values()) e.reject(Po);
|
|
550
|
+
_(N, this, Zt).call(this), p(ht, this)?.resolve();
|
|
551
551
|
}
|
|
552
552
|
register_created_effect(e) {
|
|
553
|
-
p(
|
|
553
|
+
p(xn, this).push(e);
|
|
554
554
|
}
|
|
555
555
|
increment(e, n) {
|
|
556
556
|
if (S(Ze, this, p(Ze, this) + 1), e) {
|
|
557
|
-
let r = p(
|
|
558
|
-
p(
|
|
557
|
+
let r = p(Re, this).get(n) ?? 0;
|
|
558
|
+
p(Re, this).set(n, r + 1);
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
decrement(e, n) {
|
|
562
562
|
if (S(Ze, this, p(Ze, this) - 1), e) {
|
|
563
|
-
let r = p(
|
|
564
|
-
r === 1 ? p(
|
|
563
|
+
let r = p(Re, this).get(n) ?? 0;
|
|
564
|
+
r === 1 ? p(Re, this).delete(n) : p(Re, this).set(n, r - 1);
|
|
565
565
|
}
|
|
566
566
|
p(ut, this) || (S(ut, this, !0), ze(() => {
|
|
567
567
|
S(ut, this, !1), this.linked && this.flush();
|
|
@@ -569,7 +569,7 @@ var $o = 1, Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap
|
|
|
569
569
|
}
|
|
570
570
|
transfer_effects(e, n) {
|
|
571
571
|
for (const r of e) p(Ue, this).add(r);
|
|
572
|
-
for (const r of n) p(
|
|
572
|
+
for (const r of n) p(ve, this).add(r);
|
|
573
573
|
e.clear(), n.clear();
|
|
574
574
|
}
|
|
575
575
|
oncommit(e) {
|
|
@@ -579,11 +579,11 @@ var $o = 1, Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap
|
|
|
579
579
|
p(Lt, this).add(e);
|
|
580
580
|
}
|
|
581
581
|
settled() {
|
|
582
|
-
return (p(ht, this) ?? S(ht, this,
|
|
582
|
+
return (p(ht, this) ?? S(ht, this, Ks())).promise;
|
|
583
583
|
}
|
|
584
584
|
static ensure() {
|
|
585
585
|
if (O === null) {
|
|
586
|
-
const e = O = new
|
|
586
|
+
const e = O = new wi();
|
|
587
587
|
!fn && !mt && ze(() => {
|
|
588
588
|
p(Xt, e) || e.flush();
|
|
589
589
|
});
|
|
@@ -591,13 +591,13 @@ var $o = 1, Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap
|
|
|
591
591
|
return O;
|
|
592
592
|
}
|
|
593
593
|
apply() {
|
|
594
|
-
if (!
|
|
594
|
+
if (!Ee || !this.is_fork && p(Be, this) === null && p(Le, this) === null) {
|
|
595
595
|
q = null;
|
|
596
596
|
return;
|
|
597
597
|
}
|
|
598
598
|
q = /* @__PURE__ */ new Map();
|
|
599
599
|
for (const [n, [r]] of this.current) q.set(n, r);
|
|
600
|
-
for (let n = Kt; n !== null; n = p(
|
|
600
|
+
for (let n = Kt; n !== null; n = p(Le, n))
|
|
601
601
|
if (!(n === this || n.is_fork)) {
|
|
602
602
|
var e = !1;
|
|
603
603
|
if (n.id < this.id) {
|
|
@@ -612,14 +612,14 @@ var $o = 1, Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
schedule(e) {
|
|
615
|
-
if (
|
|
615
|
+
if (Cn = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
|
|
616
616
|
e.b.defer_effect(e);
|
|
617
617
|
return;
|
|
618
618
|
}
|
|
619
619
|
for (var n = e; n.parent !== null; ) {
|
|
620
620
|
n = n.parent;
|
|
621
621
|
var r = n.f;
|
|
622
|
-
if (it !== null && n === C && (
|
|
622
|
+
if (it !== null && n === C && (Ee || (A === null || (A.f & 2) === 0) && !ko))
|
|
623
623
|
return;
|
|
624
624
|
if ((r & 96) !== 0) {
|
|
625
625
|
if ((r & 1024) === 0) return;
|
|
@@ -629,10 +629,10 @@ var $o = 1, Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap
|
|
|
629
629
|
p(Z, this).push(n);
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
|
-
|
|
633
|
-
function
|
|
632
|
+
Si = at;
|
|
633
|
+
function br() {
|
|
634
634
|
if (this.is_fork) return !0;
|
|
635
|
-
for (const n of p(
|
|
635
|
+
for (const n of p(Re, this).keys()) {
|
|
636
636
|
for (var t = n, e = !1; t.parent !== null; ) {
|
|
637
637
|
if (p(ke, this).has(t)) {
|
|
638
638
|
e = !0;
|
|
@@ -645,51 +645,51 @@ function vr() {
|
|
|
645
645
|
return !1;
|
|
646
646
|
}
|
|
647
647
|
function Qt() {
|
|
648
|
-
S(Xt, this, !0),
|
|
648
|
+
S(Xt, this, !0), Ti++ > 1e3 && (_(N, this, Zt).call(this), Do());
|
|
649
649
|
for (const a of p(Ue, this))
|
|
650
|
-
p(
|
|
651
|
-
for (const a of p(
|
|
650
|
+
p(ve, this).delete(a), $(a, te), this.schedule(a);
|
|
651
|
+
for (const a of p(ve, this))
|
|
652
652
|
$(a, Ve), this.schedule(a);
|
|
653
653
|
const t = p(Z, this);
|
|
654
654
|
S(Z, this, []), this.apply();
|
|
655
655
|
var e = it = [], n = [], r = Yt = [];
|
|
656
656
|
for (const a of t) try {
|
|
657
|
-
|
|
657
|
+
_(N, this, _i).call(this, a, e, n);
|
|
658
658
|
} catch (l) {
|
|
659
|
-
throw
|
|
659
|
+
throw Ai(a), _(N, this, br).call(this) || this.discard(), l;
|
|
660
660
|
}
|
|
661
661
|
if (O = null, r.length > 0) {
|
|
662
|
-
var i =
|
|
662
|
+
var i = Si.ensure();
|
|
663
663
|
for (const a of r) i.schedule(a);
|
|
664
664
|
}
|
|
665
|
-
if (it = null, Yt = null,
|
|
666
|
-
|
|
667
|
-
for (const [a, l] of p(ke, this))
|
|
668
|
-
r.length > 0 &&
|
|
665
|
+
if (it = null, Yt = null, _(N, this, br).call(this)) {
|
|
666
|
+
_(N, this, dt).call(this, n), _(N, this, dt).call(this, e);
|
|
667
|
+
for (const [a, l] of p(ke, this)) Ei(a, l);
|
|
668
|
+
r.length > 0 && _(N, O, Qt).call(O);
|
|
669
669
|
return;
|
|
670
670
|
}
|
|
671
|
-
const s =
|
|
671
|
+
const s = _(N, this, Bo).call(this);
|
|
672
672
|
if (s) {
|
|
673
|
-
|
|
673
|
+
_(N, this, dt).call(this, n), _(N, this, dt).call(this, e), _(N, s, Wo).call(s, this);
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
676
|
-
p(Ue, this).clear(), p(
|
|
676
|
+
p(Ue, this).clear(), p(ve, this).clear();
|
|
677
677
|
for (const a of p(Jt, this)) a(this);
|
|
678
|
-
p(Jt, this).clear(),
|
|
678
|
+
p(Jt, this).clear(), An = this, Sr(n), Sr(e), An = null, p(ht, this)?.resolve();
|
|
679
679
|
var o = O;
|
|
680
|
-
if (p(Ze, this) === 0 && (p(Z, this).length === 0 || o !== null) && (
|
|
680
|
+
if (p(Ze, this) === 0 && (p(Z, this).length === 0 || o !== null) && (_(N, this, Zt).call(this), Ee && (_(N, this, Fo).call(this), O = o)), p(Z, this).length > 0)
|
|
681
681
|
if (o !== null) {
|
|
682
682
|
const a = o;
|
|
683
683
|
p(Z, a).push(...p(Z, this).filter((l) => !p(Z, a).includes(l)));
|
|
684
684
|
} else o = this;
|
|
685
|
-
o !== null &&
|
|
685
|
+
o !== null && (de.clear(), _(N, o, Qt).call(o));
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function _i(t, e, n) {
|
|
688
688
|
t.f ^= le;
|
|
689
689
|
for (var r = t.first; r !== null; ) {
|
|
690
690
|
var i = r.f, s = (i & 96) !== 0;
|
|
691
691
|
if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || p(ke, this).has(r)) && r.fn !== null) {
|
|
692
|
-
s ? r.f ^= le : (i & 4) !== 0 ? e.push(r) :
|
|
692
|
+
s ? r.f ^= le : (i & 4) !== 0 ? e.push(r) : Ee && (i & 16777224) !== 0 ? n.push(r) : At(r) && ((i & 16) !== 0 && p(ve, this).add(r), st(r));
|
|
693
693
|
var o = r.first;
|
|
694
694
|
if (o !== null) {
|
|
695
695
|
r = o;
|
|
@@ -706,23 +706,23 @@ function wi(t, e, n) {
|
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
for (var t = p(
|
|
709
|
+
function Bo() {
|
|
710
|
+
for (var t = p(Be, this); t !== null; ) {
|
|
711
711
|
if (!t.is_fork) {
|
|
712
712
|
for (const [e, [, n]] of this.current) if (t.current.has(e) && !n) return t;
|
|
713
713
|
}
|
|
714
|
-
t = p(
|
|
714
|
+
t = p(Be, t);
|
|
715
715
|
}
|
|
716
716
|
return null;
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Wo(t) {
|
|
719
719
|
for (const [n, r] of t.current)
|
|
720
720
|
!this.previous.has(n) && t.previous.has(n) && this.previous.set(n, t.previous.get(n)), this.current.set(n, r);
|
|
721
721
|
for (const [n, r] of t.async_deriveds) {
|
|
722
722
|
const i = this.async_deriveds.get(n);
|
|
723
723
|
i && r.promise.then(i.resolve).catch(i.reject);
|
|
724
724
|
}
|
|
725
|
-
t.async_deriveds.clear(), this.transfer_effects(p(Ue, t), p(
|
|
725
|
+
t.async_deriveds.clear(), this.transfer_effects(p(Ue, t), p(ve, t));
|
|
726
726
|
const e = (n) => {
|
|
727
727
|
var r = n.reactions;
|
|
728
728
|
if (r !== null && !((n.f & 2) !== 0 && (n.f & 6144) === 0))
|
|
@@ -731,18 +731,18 @@ function Bo(t) {
|
|
|
731
731
|
if ((i & 2) !== 0) e(o);
|
|
732
732
|
else {
|
|
733
733
|
var s = o;
|
|
734
|
-
i & 4194320 && !this.async_deriveds.has(s) && (p(
|
|
734
|
+
i & 4194320 && !this.async_deriveds.has(s) && (p(ve, this).delete(s), $(s, te), this.schedule(s));
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
};
|
|
738
738
|
for (const n of this.current.keys()) e(n);
|
|
739
|
-
this.oncommit(() => t.discard()),
|
|
739
|
+
this.oncommit(() => t.discard()), _(N, t, Zt).call(t), O = this, _(N, this, Qt).call(this);
|
|
740
740
|
}
|
|
741
741
|
function dt(t) {
|
|
742
|
-
for (var e = 0; e < t.length; e += 1)
|
|
742
|
+
for (var e = 0; e < t.length; e += 1) fi(t[e], p(Ue, this), p(ve, this));
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
for (let h = Kt; h !== null; h = p(
|
|
744
|
+
function Fo() {
|
|
745
|
+
for (let h = Kt; h !== null; h = p(Le, h)) {
|
|
746
746
|
var t = h.id < this.id, e = [];
|
|
747
747
|
for (const [u, [f, g]] of this.current) {
|
|
748
748
|
if (h.current.has(u)) {
|
|
@@ -763,7 +763,7 @@ function Wo() {
|
|
|
763
763
|
t && h.discard();
|
|
764
764
|
else if (e.length > 0) {
|
|
765
765
|
if (t) for (const u of p($t, this)) h.unskip_effect(u, (f) => {
|
|
766
|
-
(f.f & 4194320) !== 0 ? h.schedule(f) :
|
|
766
|
+
(f.f & 4194320) !== 0 ? h.schedule(f) : _(N, h, dt).call(h, [f]);
|
|
767
767
|
});
|
|
768
768
|
h.activate();
|
|
769
769
|
var s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
@@ -774,10 +774,10 @@ function Wo() {
|
|
|
774
774
|
return g ? g[0] !== f[0] || g[1] !== f[1] : !0;
|
|
775
775
|
}).map(([u]) => u);
|
|
776
776
|
if (l.length > 0)
|
|
777
|
-
for (const u of p(
|
|
777
|
+
for (const u of p(xn, this)) (u.f & 155648) === 0 && Xn(u, l, o) && ((u.f & 4194320) !== 0 ? ($(u, te), h.schedule(u)) : p(Ue, h).add(u));
|
|
778
778
|
if (p(Z, h).length > 0 && !p(ut, h)) {
|
|
779
779
|
h.apply();
|
|
780
|
-
for (var c of p(Z, h))
|
|
780
|
+
for (var c of p(Z, h)) _(N, h, _i).call(h, c, [], []);
|
|
781
781
|
S(Z, h, []);
|
|
782
782
|
}
|
|
783
783
|
h.deactivate();
|
|
@@ -787,100 +787,100 @@ function Wo() {
|
|
|
787
787
|
}
|
|
788
788
|
function Zt() {
|
|
789
789
|
if (this.linked) {
|
|
790
|
-
var t = p(
|
|
791
|
-
t === null ? Kt = e : S(
|
|
790
|
+
var t = p(Be, this), e = p(Le, this);
|
|
791
|
+
t === null ? Kt = e : S(Le, t, e), e === null ? Qe = t : S(Be, e, t), this.linked = !1;
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function ge(t) {
|
|
795
795
|
var e = mt;
|
|
796
796
|
mt = !0;
|
|
797
797
|
try {
|
|
798
798
|
var n;
|
|
799
799
|
for (t && (O !== null && !O.is_fork && O.flush(), n = t()); ; ) {
|
|
800
|
-
if (
|
|
800
|
+
if (wo(), O === null) return n;
|
|
801
801
|
O.flush();
|
|
802
802
|
}
|
|
803
803
|
} finally {
|
|
804
804
|
mt = e;
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function Do() {
|
|
808
808
|
if (0) {
|
|
809
809
|
var t;
|
|
810
810
|
for (const n of O.current.keys()) for (const [r, i] of n.updated ?? [])
|
|
811
811
|
var e;
|
|
812
812
|
}
|
|
813
813
|
try {
|
|
814
|
-
|
|
814
|
+
lo();
|
|
815
815
|
} catch (n) {
|
|
816
|
-
nt(n,
|
|
816
|
+
nt(n, Cn);
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
var
|
|
820
|
-
function
|
|
819
|
+
var me = null;
|
|
820
|
+
function Sr(t) {
|
|
821
821
|
var e = t.length;
|
|
822
822
|
if (e !== 0) {
|
|
823
823
|
for (var n = 0; n < e; ) {
|
|
824
824
|
var r = t[n++];
|
|
825
|
-
if ((r.f & 24576) === 0 && At(r) && (
|
|
826
|
-
|
|
827
|
-
for (const i of
|
|
825
|
+
if ((r.f & 24576) === 0 && At(r) && (me = /* @__PURE__ */ new Set(), st(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Hi(r), me?.size > 0)) {
|
|
826
|
+
de.clear();
|
|
827
|
+
for (const i of me) {
|
|
828
828
|
if ((i.f & 24576) !== 0) continue;
|
|
829
829
|
const s = [i];
|
|
830
830
|
let o = i.parent;
|
|
831
831
|
for (; o !== null; )
|
|
832
|
-
|
|
832
|
+
me.has(o) && (me.delete(o), s.push(o)), o = o.parent;
|
|
833
833
|
for (let a = s.length - 1; a >= 0; a--) {
|
|
834
834
|
const l = s[a];
|
|
835
835
|
(l.f & 24576) === 0 && st(l);
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
|
|
838
|
+
me.clear();
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
-
|
|
841
|
+
me = null;
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
function ki(t, e, n, r) {
|
|
845
845
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
846
846
|
for (const i of t.reactions) {
|
|
847
847
|
const s = i.f;
|
|
848
|
-
(s & 2) !== 0 ? ki(i, e, n, r) : (s & 4194320) !== 0 && (s & 2048) === 0 &&
|
|
848
|
+
(s & 2) !== 0 ? ki(i, e, n, r) : (s & 4194320) !== 0 && (s & 2048) === 0 && Xn(i, e, r) && ($(i, te), Jn(i));
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Xn(t, e, n) {
|
|
852
852
|
const r = n.get(t);
|
|
853
853
|
if (r !== void 0) return r;
|
|
854
854
|
if (t.deps !== null) for (const i of t.deps) {
|
|
855
855
|
if (Ut.call(e, i)) return !0;
|
|
856
|
-
if ((i.f & 2) !== 0 &&
|
|
856
|
+
if ((i.f & 2) !== 0 && Xn(i, e, n))
|
|
857
857
|
return n.set(i, !0), !0;
|
|
858
858
|
}
|
|
859
859
|
return n.set(t, !1), !1;
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function Jn(t) {
|
|
862
862
|
O.schedule(t);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function Ei(t, e) {
|
|
865
865
|
if (!((t.f & 32) !== 0 && (t.f & 1024) !== 0)) {
|
|
866
866
|
(t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), $(t, le);
|
|
867
867
|
for (var n = t.first; n !== null; )
|
|
868
|
-
|
|
868
|
+
Ei(n, e), n = n.next;
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Ai(t) {
|
|
872
872
|
$(t, le);
|
|
873
873
|
for (var e = t.first; e !== null; )
|
|
874
|
-
|
|
874
|
+
Ai(e), e = e.next;
|
|
875
875
|
}
|
|
876
|
-
var en = /* @__PURE__ */ new Set(),
|
|
877
|
-
var
|
|
876
|
+
var en = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Map();
|
|
877
|
+
var Ci = !1;
|
|
878
878
|
function ln(t, e) {
|
|
879
879
|
var n = {
|
|
880
880
|
f: 0,
|
|
881
881
|
v: t,
|
|
882
882
|
reactions: null,
|
|
883
|
-
equals:
|
|
883
|
+
equals: oi,
|
|
884
884
|
rv: 0,
|
|
885
885
|
wv: 0
|
|
886
886
|
};
|
|
@@ -889,36 +889,36 @@ function ln(t, e) {
|
|
|
889
889
|
// @__NO_SIDE_EFFECTS__
|
|
890
890
|
function X(t, e) {
|
|
891
891
|
const n = ln(t, e);
|
|
892
|
-
return
|
|
892
|
+
return Wi(n), n;
|
|
893
893
|
}
|
|
894
894
|
// @__NO_SIDE_EFFECTS__
|
|
895
|
-
function
|
|
895
|
+
function zo(t, e = !1, n = !0) {
|
|
896
896
|
const r = ln(t);
|
|
897
|
-
if (e || (r.equals =
|
|
897
|
+
if (e || (r.equals = ai), Et && n && I !== null && I.l !== null) {
|
|
898
898
|
var i;
|
|
899
899
|
((i = I.l).s ?? (i.s = [])).push(r);
|
|
900
900
|
}
|
|
901
901
|
return r;
|
|
902
902
|
}
|
|
903
903
|
function z(t, e, n = !1) {
|
|
904
|
-
A !== null && (!re || (A.f & 131072) !== 0) && on() && (A.f & 4325394) !== 0 && (ae === null || !ae.has(t)) &&
|
|
904
|
+
A !== null && (!re || (A.f & 131072) !== 0) && on() && (A.f & 4325394) !== 0 && (ae === null || !ae.has(t)) && po();
|
|
905
905
|
let r = n ? tt(e) : e;
|
|
906
|
-
return
|
|
906
|
+
return xi(t, r, Yt);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function xi(t, e, n = null) {
|
|
909
909
|
if (!t.equals(e)) {
|
|
910
|
-
|
|
910
|
+
ye ? de.set(t, e) : de.has(t) || de.set(t, t.v);
|
|
911
911
|
var r = at.ensure();
|
|
912
912
|
if (r.capture(t, e), (t.f & 2) !== 0) {
|
|
913
913
|
const i = t;
|
|
914
|
-
(t.f & 2048) !== 0 &&
|
|
914
|
+
(t.f & 2048) !== 0 && Yn(i), q === null && jn(i);
|
|
915
915
|
}
|
|
916
|
-
t.wv =
|
|
916
|
+
t.wv = Di(), Ri(t, te, n), on() && C !== null && (C.f & 1024) !== 0 && (C.f & 96) === 0 && (Q === null ? ia([t]) : Q.push(t)), !r.is_fork && en.size > 0 && !Ci && Uo();
|
|
917
917
|
}
|
|
918
918
|
return e;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
|
|
920
|
+
function Uo() {
|
|
921
|
+
Ci = !1;
|
|
922
922
|
for (const t of en) {
|
|
923
923
|
(t.f & 1024) !== 0 && $(t, Ve);
|
|
924
924
|
let e;
|
|
@@ -934,7 +934,7 @@ function zo() {
|
|
|
934
934
|
function vt(t) {
|
|
935
935
|
z(t, t.v + 1);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function Ri(t, e, n) {
|
|
938
938
|
var r = t.reactions;
|
|
939
939
|
if (r !== null)
|
|
940
940
|
for (var i = on(), s = r.length, o = 0; o < s; o++) {
|
|
@@ -944,39 +944,39 @@ function xi(t, e, n) {
|
|
|
944
944
|
if (c && $(a, e), (l & 131072) !== 0) en.add(a);
|
|
945
945
|
else if ((l & 2) !== 0) {
|
|
946
946
|
var h = a;
|
|
947
|
-
q?.delete(h), (l & 65536) === 0 && (l & 512 && (C === null || (C.f & 2097152) === 0) && (a.f |=
|
|
947
|
+
q?.delete(h), (l & 65536) === 0 && (l & 512 && (C === null || (C.f & 2097152) === 0) && (a.f |= kt), Ri(h, Ve, n));
|
|
948
948
|
} else if (c) {
|
|
949
949
|
var u = a;
|
|
950
|
-
(l & 16) !== 0 &&
|
|
950
|
+
(l & 16) !== 0 && me !== null && me.add(u), n !== null ? n.push(u) : Jn(u);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
var
|
|
955
|
+
var qo = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
956
956
|
function tt(t) {
|
|
957
957
|
if (typeof t != "object" || t === null || gt in t) return t;
|
|
958
|
-
const e =
|
|
959
|
-
if (e !==
|
|
960
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
958
|
+
const e = js(t);
|
|
959
|
+
if (e !== Us && e !== qs) return t;
|
|
960
|
+
var n = /* @__PURE__ */ new Map(), r = Fs(t), i = /* @__PURE__ */ X(0), s = null, o = We, a = (u) => {
|
|
961
961
|
if (We === o) return u();
|
|
962
962
|
var f = A, g = We;
|
|
963
|
-
|
|
963
|
+
fe(null), _r(o);
|
|
964
964
|
var m = u();
|
|
965
|
-
return
|
|
965
|
+
return fe(f), _r(g), m;
|
|
966
966
|
};
|
|
967
967
|
r && n.set("length", /* @__PURE__ */ X(t.length, s));
|
|
968
968
|
var l = "";
|
|
969
969
|
let c = !1;
|
|
970
970
|
function h(u) {
|
|
971
971
|
if (!c) {
|
|
972
|
-
c = !0, l = u,
|
|
973
|
-
for (const [f, g] of n)
|
|
972
|
+
c = !0, l = u, gr(i, `${l} version`);
|
|
973
|
+
for (const [f, g] of n) gr(g, jo(l, f));
|
|
974
974
|
c = !1;
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
return new Proxy(t, {
|
|
978
978
|
defineProperty(u, f, g) {
|
|
979
|
-
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) &&
|
|
979
|
+
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && uo();
|
|
980
980
|
var m = n.get(f);
|
|
981
981
|
return m === void 0 ? a(() => {
|
|
982
982
|
var y = /* @__PURE__ */ X(g.value, s);
|
|
@@ -997,7 +997,7 @@ function tt(t) {
|
|
|
997
997
|
get(u, f, g) {
|
|
998
998
|
if (f === gt) return t;
|
|
999
999
|
var m = n.get(f), y = f in u;
|
|
1000
|
-
if (m === void 0 && (!y ||
|
|
1000
|
+
if (m === void 0 && (!y || Ne(u, f)?.writable) && (m = a(() => {
|
|
1001
1001
|
var b = tt(y ? u[f] : B), x = /* @__PURE__ */ X(b, s);
|
|
1002
1002
|
return x;
|
|
1003
1003
|
}), n.set(f, m)), m !== void 0) {
|
|
@@ -1025,7 +1025,7 @@ function tt(t) {
|
|
|
1025
1025
|
has(u, f) {
|
|
1026
1026
|
if (f === gt) return !0;
|
|
1027
1027
|
var g = n.get(f), m = g !== void 0 && g.v !== B || Reflect.has(u, f);
|
|
1028
|
-
return (g !== void 0 || C !== null && (!m ||
|
|
1028
|
+
return (g !== void 0 || C !== null && (!m || Ne(u, f)?.writable)) && (g === void 0 && (g = a(() => {
|
|
1029
1029
|
var y = m ? tt(u[f]) : B, v = /* @__PURE__ */ X(y, s);
|
|
1030
1030
|
return v;
|
|
1031
1031
|
}), n.set(f, g)), w(g) === B) ? !1 : m;
|
|
@@ -1037,7 +1037,7 @@ function tt(t) {
|
|
|
1037
1037
|
x !== void 0 ? z(x, B) : b in u && (x = a(() => /* @__PURE__ */ X(B, s)), n.set(b + "", x));
|
|
1038
1038
|
}
|
|
1039
1039
|
if (y === void 0)
|
|
1040
|
-
(!v ||
|
|
1040
|
+
(!v || Ne(u, f)?.writable) && (y = a(() => /* @__PURE__ */ X(void 0, s)), z(y, tt(g)), n.set(f, y));
|
|
1041
1041
|
else {
|
|
1042
1042
|
v = y.v !== B;
|
|
1043
1043
|
var D = a(() => tt(g));
|
|
@@ -1063,48 +1063,48 @@ function tt(t) {
|
|
|
1063
1063
|
return f;
|
|
1064
1064
|
},
|
|
1065
1065
|
setPrototypeOf() {
|
|
1066
|
-
|
|
1066
|
+
fo();
|
|
1067
1067
|
}
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1071
|
-
return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` :
|
|
1070
|
+
function jo(t, e) {
|
|
1071
|
+
return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : qo.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
|
|
1072
1072
|
}
|
|
1073
|
-
var
|
|
1074
|
-
function
|
|
1075
|
-
if (
|
|
1076
|
-
|
|
1073
|
+
var Tr, Go, Mi, Oi, Li;
|
|
1074
|
+
function Rn() {
|
|
1075
|
+
if (Tr === void 0) {
|
|
1076
|
+
Tr = window, Go = document, Mi = /Firefox/.test(navigator.userAgent);
|
|
1077
1077
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1078
|
-
|
|
1078
|
+
Oi = Ne(e, "firstChild").get, Li = Ne(e, "nextSibling").get, dr(t) && (t[to] = void 0, t[eo] = null, t[no] = void 0, t.__e = void 0), dr(n) && (n[ro] = void 0);
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Pi(t = "") {
|
|
1082
1082
|
return document.createTextNode(t);
|
|
1083
1083
|
}
|
|
1084
1084
|
// @__NO_SIDE_EFFECTS__
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1085
|
+
function Mn(t) {
|
|
1086
|
+
return Oi.call(t);
|
|
1087
1087
|
}
|
|
1088
1088
|
// @__NO_SIDE_EFFECTS__
|
|
1089
1089
|
function lt(t) {
|
|
1090
|
-
return
|
|
1090
|
+
return Li.call(t);
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Vo(t) {
|
|
1093
1093
|
t.textContent = "";
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function Ii(t, e, n) {
|
|
1096
1096
|
return e == null || e === "http://www.w3.org/1999/xhtml" ? n ? document.createElement(t, { is: n }) : document.createElement(t) : n ? document.createElementNS(e, t, { is: n }) : document.createElementNS(e, t);
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1099
|
-
C === null && (A === null &&
|
|
1098
|
+
function Ko(t) {
|
|
1099
|
+
C === null && (A === null && ao(t), oo()), ye && so(t);
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function Yo(t, e) {
|
|
1102
1102
|
var n = e.last;
|
|
1103
1103
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1104
1104
|
}
|
|
1105
1105
|
function Ke(t, e) {
|
|
1106
1106
|
var n = C;
|
|
1107
|
-
n !== null && (n.f & 8192) !== 0 && (t |=
|
|
1107
|
+
n !== null && (n.f & 8192) !== 0 && (t |= Zr);
|
|
1108
1108
|
var r = {
|
|
1109
1109
|
ctx: I,
|
|
1110
1110
|
deps: null,
|
|
@@ -1131,70 +1131,70 @@ function Ke(t, e) {
|
|
|
1131
1131
|
} catch (o) {
|
|
1132
1132
|
throw oe(r), o;
|
|
1133
1133
|
}
|
|
1134
|
-
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |=
|
|
1134
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= ti));
|
|
1135
1135
|
}
|
|
1136
|
-
if (i !== null && (i.parent = n, n !== null &&
|
|
1136
|
+
if (i !== null && (i.parent = n, n !== null && Yo(i, n), A !== null && (A.f & 2) !== 0 && (t & 64) === 0)) {
|
|
1137
1137
|
var s = A;
|
|
1138
1138
|
(s.effects ?? (s.effects = [])).push(i);
|
|
1139
1139
|
}
|
|
1140
1140
|
return r;
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function Qn() {
|
|
1143
1143
|
return A !== null && !re;
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1145
|
+
function Me(t) {
|
|
1146
|
+
Ko("$effect");
|
|
1147
1147
|
var e = C.f;
|
|
1148
1148
|
if (!A && (e & 32) !== 0 && I !== null && !I.i) {
|
|
1149
1149
|
var n = I;
|
|
1150
1150
|
(n.e ?? (n.e = [])).push(t);
|
|
1151
|
-
} else return
|
|
1151
|
+
} else return Ni(t);
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return Ke(4 |
|
|
1153
|
+
function Ni(t) {
|
|
1154
|
+
return Ke(4 | Qs, t);
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function Xo(t) {
|
|
1157
1157
|
at.ensure();
|
|
1158
|
-
const e = Ke(64 |
|
|
1158
|
+
const e = Ke(64 | _t, t);
|
|
1159
1159
|
return () => {
|
|
1160
1160
|
oe(e);
|
|
1161
1161
|
};
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1163
|
+
function Jo(t) {
|
|
1164
1164
|
at.ensure();
|
|
1165
|
-
const e = Ke(64 |
|
|
1165
|
+
const e = Ke(64 | _t, t);
|
|
1166
1166
|
return (n = {}) => new Promise((r) => {
|
|
1167
1167
|
n.outro ? cn(e, () => {
|
|
1168
1168
|
oe(e), r(void 0);
|
|
1169
1169
|
}) : (oe(e), r(void 0));
|
|
1170
1170
|
});
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Qo(t) {
|
|
1173
1173
|
return Ke(4, t);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function Zn(t, e = 0) {
|
|
1176
1176
|
return Ke(8 | e, t);
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function Zo(t, e = 0) {
|
|
1179
1179
|
var n = Ke(16 | e, t);
|
|
1180
1180
|
return n;
|
|
1181
1181
|
}
|
|
1182
1182
|
function qe(t) {
|
|
1183
|
-
return Ke(32 |
|
|
1183
|
+
return Ke(32 | _t, t);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function $i(t) {
|
|
1186
1186
|
var e = t.teardown;
|
|
1187
1187
|
if (e !== null) {
|
|
1188
|
-
const n =
|
|
1189
|
-
|
|
1188
|
+
const n = ye, r = A;
|
|
1189
|
+
wr(!0), fe(null);
|
|
1190
1190
|
try {
|
|
1191
1191
|
e.call(null);
|
|
1192
1192
|
} finally {
|
|
1193
|
-
|
|
1193
|
+
wr(n), fe(r);
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function er(t, e = !1) {
|
|
1198
1198
|
var n = t.first;
|
|
1199
1199
|
for (t.first = t.last = null; n !== null; ) {
|
|
1200
1200
|
const i = n.ac;
|
|
@@ -1205,7 +1205,7 @@ function Qn(t, e = !1) {
|
|
|
1205
1205
|
(n.f & 64) !== 0 ? n.parent = null : oe(n, e), n = r;
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function ea(t) {
|
|
1209
1209
|
for (var e = t.first; e !== null; ) {
|
|
1210
1210
|
var n = e.next;
|
|
1211
1211
|
(e.f & 32) === 0 && oe(e), e = n;
|
|
@@ -1213,26 +1213,26 @@ function Zo(t) {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
function oe(t, e = !0) {
|
|
1215
1215
|
var n = !1;
|
|
1216
|
-
(e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (
|
|
1216
|
+
(e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (ta(t.nodes.start, t.nodes.end), n = !0), t.f |= fr, er(t, e && !n), Tt(t, 0);
|
|
1217
1217
|
var r = t.nodes && t.nodes.t;
|
|
1218
1218
|
if (r !== null) for (const s of r) s.stop();
|
|
1219
|
-
|
|
1219
|
+
$i(t), t.f ^= fr, t.f |= Js;
|
|
1220
1220
|
var i = t.parent;
|
|
1221
|
-
i !== null && i.first !== null &&
|
|
1221
|
+
i !== null && i.first !== null && Hi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function ta(t, e) {
|
|
1224
1224
|
for (; t !== null; ) {
|
|
1225
1225
|
var n = t === e ? null : /* @__PURE__ */ lt(t);
|
|
1226
1226
|
t.remove(), t = n;
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function Hi(t) {
|
|
1230
1230
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1231
1231
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1232
1232
|
}
|
|
1233
1233
|
function cn(t, e, n = !0) {
|
|
1234
1234
|
var r = [];
|
|
1235
|
-
|
|
1235
|
+
Bi(t, r, !0);
|
|
1236
1236
|
var i = () => {
|
|
1237
1237
|
n && oe(t), e && e();
|
|
1238
1238
|
}, s = r.length;
|
|
@@ -1241,9 +1241,9 @@ function cn(t, e, n = !0) {
|
|
|
1241
1241
|
for (var a of r) a.out(o);
|
|
1242
1242
|
} else i();
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1244
|
+
function Bi(t, e, n) {
|
|
1245
1245
|
if ((t.f & 8192) === 0) {
|
|
1246
|
-
t.f ^=
|
|
1246
|
+
t.f ^= Zr;
|
|
1247
1247
|
var r = t.nodes && t.nodes.t;
|
|
1248
1248
|
if (r !== null)
|
|
1249
1249
|
for (const a of r) (a.is_global || n) && e.push(a);
|
|
@@ -1251,103 +1251,103 @@ function Hi(t, e, n) {
|
|
|
1251
1251
|
var s = i.next;
|
|
1252
1252
|
if ((i.f & 64) === 0) {
|
|
1253
1253
|
var o = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
|
|
1254
|
-
|
|
1254
|
+
Bi(i, e, o ? n : !1);
|
|
1255
1255
|
}
|
|
1256
1256
|
i = s;
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function na(t, e) {
|
|
1261
1261
|
if (t.nodes)
|
|
1262
1262
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1263
1263
|
var i = n === r ? null : /* @__PURE__ */ lt(n);
|
|
1264
1264
|
e.append(n), n = i;
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
|
-
var
|
|
1268
|
-
function
|
|
1269
|
-
|
|
1267
|
+
var ra = null, Ht = !1, ye = !1;
|
|
1268
|
+
function wr(t) {
|
|
1269
|
+
ye = t;
|
|
1270
1270
|
}
|
|
1271
1271
|
var A = null, re = !1;
|
|
1272
|
-
function
|
|
1272
|
+
function fe(t) {
|
|
1273
1273
|
A = t;
|
|
1274
1274
|
}
|
|
1275
1275
|
var C = null;
|
|
1276
|
-
function
|
|
1276
|
+
function Ae(t) {
|
|
1277
1277
|
C = t;
|
|
1278
1278
|
}
|
|
1279
1279
|
var ae = null;
|
|
1280
|
-
function
|
|
1281
|
-
A !== null && (!
|
|
1280
|
+
function Wi(t) {
|
|
1281
|
+
A !== null && (!Ee || (A.f & 2) !== 0) && (ae ?? (ae = /* @__PURE__ */ new Set())).add(t);
|
|
1282
1282
|
}
|
|
1283
1283
|
var V = null, Y = 0, Q = null;
|
|
1284
|
-
function
|
|
1284
|
+
function ia(t) {
|
|
1285
1285
|
Q = t;
|
|
1286
1286
|
}
|
|
1287
|
-
var
|
|
1288
|
-
function
|
|
1287
|
+
var Fi = 1, Pe = 0, We = Pe;
|
|
1288
|
+
function _r(t) {
|
|
1289
1289
|
We = t;
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return ++
|
|
1291
|
+
function Di() {
|
|
1292
|
+
return ++Fi;
|
|
1293
1293
|
}
|
|
1294
1294
|
function At(t) {
|
|
1295
1295
|
var e = t.f;
|
|
1296
1296
|
if ((e & 2048) !== 0) return !0;
|
|
1297
|
-
if (e & 2 && (t.f &= ~
|
|
1297
|
+
if (e & 2 && (t.f &= ~kt), (e & 4096) !== 0) {
|
|
1298
1298
|
for (var n = t.deps, r = n.length, i = 0; i < r; i++) {
|
|
1299
1299
|
var s = n[i];
|
|
1300
|
-
if (At(s) &&
|
|
1300
|
+
if (At(s) && yi(s), s.wv > t.wv) return !0;
|
|
1301
1301
|
}
|
|
1302
1302
|
(e & 512) !== 0 && q === null && $(t, le);
|
|
1303
1303
|
}
|
|
1304
1304
|
return !1;
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function zi(t, e, n = !0) {
|
|
1307
1307
|
var r = t.reactions;
|
|
1308
|
-
if (r !== null && !(!
|
|
1308
|
+
if (r !== null && !(!Ee && ae !== null && ae.has(t)))
|
|
1309
1309
|
for (var i = 0; i < r.length; i++) {
|
|
1310
1310
|
var s = r[i];
|
|
1311
|
-
(s.f & 2) !== 0 ?
|
|
1311
|
+
(s.f & 2) !== 0 ? zi(s, e, !1) : e === s && (n ? $(s, te) : (s.f & 1024) !== 0 && $(s, Ve), Jn(s));
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Ui(t) {
|
|
1315
1315
|
var e = V, n = Y, r = Q, i = A, s = ae, o = I, a = re, l = We, c = t.f;
|
|
1316
|
-
V = null, Y = 0, Q = null, A = (c & 96) === 0 ? t : null, ae = null, Gt(t.ctx), re = !1, We = ++
|
|
1316
|
+
V = null, Y = 0, Q = null, A = (c & 96) === 0 ? t : null, ae = null, Gt(t.ctx), re = !1, We = ++Pe, t.ac !== null && (an(() => {
|
|
1317
1317
|
t.ac.abort(sn);
|
|
1318
1318
|
}), t.ac = null);
|
|
1319
1319
|
try {
|
|
1320
|
-
t.f |=
|
|
1320
|
+
t.f |= pr;
|
|
1321
1321
|
var h = t.fn, u = h();
|
|
1322
|
-
t.f |=
|
|
1322
|
+
t.f |= ei;
|
|
1323
1323
|
var f = t.deps, g = O?.is_fork;
|
|
1324
1324
|
if (V !== null) {
|
|
1325
1325
|
var m;
|
|
1326
1326
|
if (g || Tt(t, Y), f !== null && Y > 0)
|
|
1327
1327
|
for (f.length = Y + V.length, m = 0; m < V.length; m++) f[Y + m] = V[m];
|
|
1328
1328
|
else t.deps = f = V;
|
|
1329
|
-
if (
|
|
1329
|
+
if (Qn() && (t.f & 512) !== 0) for (m = Y; m < f.length; m++) {
|
|
1330
1330
|
var y;
|
|
1331
1331
|
((y = f[m]).reactions ?? (y.reactions = [])).push(t);
|
|
1332
1332
|
}
|
|
1333
1333
|
} else !g && f !== null && Y < f.length && (Tt(t, Y), f.length = Y);
|
|
1334
|
-
if (on() && Q !== null && !re && f !== null && (t.f & 6146) === 0) for (m = 0; m < Q.length; m++)
|
|
1334
|
+
if (on() && Q !== null && !re && f !== null && (t.f & 6146) === 0) for (m = 0; m < Q.length; m++) zi(Q[m], t);
|
|
1335
1335
|
if (i !== null && i !== t) {
|
|
1336
|
-
if (
|
|
1337
|
-
if (e !== null) for (const v of e) v.rv =
|
|
1336
|
+
if (Pe++, i.deps !== null) for (let v = 0; v < n; v += 1) i.deps[v].rv = Pe;
|
|
1337
|
+
if (e !== null) for (const v of e) v.rv = Pe;
|
|
1338
1338
|
Q !== null && (r === null ? r = Q : r.push(...Q));
|
|
1339
1339
|
}
|
|
1340
|
-
return (t.f & 8388608) !== 0 && (t.f ^=
|
|
1340
|
+
return (t.f & 8388608) !== 0 && (t.f ^= ni), u;
|
|
1341
1341
|
} catch (v) {
|
|
1342
|
-
return
|
|
1342
|
+
return ui(v);
|
|
1343
1343
|
} finally {
|
|
1344
|
-
t.f ^=
|
|
1344
|
+
t.f ^= pr, V = e, Y = n, Q = r, A = i, ae = s, Gt(o), re = a, We = l;
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function sa(t, e) {
|
|
1348
1348
|
let n = e.reactions;
|
|
1349
1349
|
if (n !== null) {
|
|
1350
|
-
var r =
|
|
1350
|
+
var r = Ds.call(n, t);
|
|
1351
1351
|
if (r !== -1) {
|
|
1352
1352
|
var i = n.length - 1;
|
|
1353
1353
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
@@ -1355,15 +1355,15 @@ function ia(t, e) {
|
|
|
1355
1355
|
}
|
|
1356
1356
|
if (n === null && (e.f & 2) !== 0 && (V === null || !Ut.call(V, e))) {
|
|
1357
1357
|
var s = e;
|
|
1358
|
-
(s.f & 512) !== 0 && (s.f ^= 512, s.f &= ~
|
|
1358
|
+
(s.f & 512) !== 0 && (s.f ^= 512, s.f &= ~kt), s.v !== B && jn(s), s.ac !== null && an(() => {
|
|
1359
1359
|
s.ac.abort(sn), s.ac = null, $(s, te);
|
|
1360
|
-
}),
|
|
1360
|
+
}), $o(s), Tt(s, 0);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
function Tt(t, e) {
|
|
1364
1364
|
var n = t.deps;
|
|
1365
1365
|
if (n !== null)
|
|
1366
|
-
for (var r = e; r < n.length; r++)
|
|
1366
|
+
for (var r = e; r < n.length; r++) sa(t, n[r]);
|
|
1367
1367
|
}
|
|
1368
1368
|
function st(t) {
|
|
1369
1369
|
var e = t.f;
|
|
@@ -1373,9 +1373,9 @@ function st(t) {
|
|
|
1373
1373
|
if (C = t, Ht = (e & 96) === 0, 0)
|
|
1374
1374
|
var i, s;
|
|
1375
1375
|
try {
|
|
1376
|
-
(e & 16777232) !== 0 ?
|
|
1377
|
-
var o =
|
|
1378
|
-
if (t.teardown = typeof o == "function" ? o : null, t.wv =
|
|
1376
|
+
(e & 16777232) !== 0 ? ea(t) : er(t), $i(t);
|
|
1377
|
+
var o = Ui(t);
|
|
1378
|
+
if (t.teardown = typeof o == "function" ? o : null, t.wv = Fi, 0)
|
|
1379
1379
|
for (var a of t.deps) ;
|
|
1380
1380
|
} finally {
|
|
1381
1381
|
Ht = r, C = n;
|
|
@@ -1384,10 +1384,10 @@ function st(t) {
|
|
|
1384
1384
|
}
|
|
1385
1385
|
function w(t) {
|
|
1386
1386
|
var e = (t.f & 2) !== 0;
|
|
1387
|
-
if (
|
|
1387
|
+
if (ra?.add(t), A !== null && !re && !(C !== null && (C.f & 16384) !== 0) && (ae === null || !ae.has(t))) {
|
|
1388
1388
|
var n = A.deps;
|
|
1389
1389
|
if ((A.f & 2097152) !== 0)
|
|
1390
|
-
t.rv <
|
|
1390
|
+
t.rv < Pe && (t.rv = Pe, V === null && n !== null && n[Y] === t ? Y++ : V === null ? V = [t] : V.push(t));
|
|
1391
1391
|
else {
|
|
1392
1392
|
var r;
|
|
1393
1393
|
(r = A).deps ?? (r.deps = []), Ut.call(A.deps, t) || A.deps.push(t);
|
|
@@ -1396,37 +1396,37 @@ function w(t) {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
if (0) {
|
|
1399
|
-
if (!re && reactivity_loss_tracker && O === null &&
|
|
1399
|
+
if (!re && reactivity_loss_tracker && O === null && An === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
|
|
1400
1400
|
var s;
|
|
1401
1401
|
if (tracing_mode_flag && !re && tracing_expressions !== null && A !== null && tracing_expressions.reaction === A && !t.trace) {
|
|
1402
1402
|
if (s)
|
|
1403
1403
|
var o, a;
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
if (
|
|
1406
|
+
if (ye && de.has(t)) return de.get(t);
|
|
1407
1407
|
if (e) {
|
|
1408
1408
|
var l = t;
|
|
1409
|
-
if (
|
|
1409
|
+
if (ye) {
|
|
1410
1410
|
var c = l.v;
|
|
1411
|
-
return ((l.f & 1024) === 0 && l.reactions !== null ||
|
|
1411
|
+
return ((l.f & 1024) === 0 && l.reactions !== null || ji(l)) && (c = Yn(l)), de.set(l, c), c;
|
|
1412
1412
|
}
|
|
1413
|
-
var h = (l.f & 512) === 0 && !re && A !== null && (Ht || (A.f & 512) !== 0), u = (l.f &
|
|
1414
|
-
At(l) && (h && (l.f |= 512),
|
|
1413
|
+
var h = (l.f & 512) === 0 && !re && A !== null && (Ht || (A.f & 512) !== 0), u = (l.f & ei) === 0;
|
|
1414
|
+
At(l) && (h && (l.f |= 512), yi(l)), h && !u && (bi(l), qi(l));
|
|
1415
1415
|
}
|
|
1416
1416
|
if (q?.has(t)) return q.get(t);
|
|
1417
1417
|
if ((t.f & 8388608) !== 0) throw t.v;
|
|
1418
1418
|
return t.v;
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function qi(t) {
|
|
1421
1421
|
if (t.f |= 512, t.deps !== null)
|
|
1422
1422
|
for (const e of t.deps)
|
|
1423
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & 2) !== 0 && (e.f & 512) === 0 && (
|
|
1423
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & 2) !== 0 && (e.f & 512) === 0 && (bi(e), qi(e));
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1425
|
+
function ji(t) {
|
|
1426
1426
|
if (t.v === B) return !0;
|
|
1427
1427
|
if (t.deps === null) return !1;
|
|
1428
1428
|
for (const e of t.deps)
|
|
1429
|
-
if (
|
|
1429
|
+
if (de.has(e) || (e.f & 2) !== 0 && ji(e)) return !0;
|
|
1430
1430
|
return !1;
|
|
1431
1431
|
}
|
|
1432
1432
|
function hn(t) {
|
|
@@ -1437,11 +1437,13 @@ function hn(t) {
|
|
|
1437
1437
|
re = e;
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
var Pt = /* @__PURE__ */ Symbol("events"),
|
|
1441
|
-
function
|
|
1440
|
+
var Pt = /* @__PURE__ */ Symbol("events"), oa = /* @__PURE__ */ new Set(), kr = /* @__PURE__ */ new Set(), pn = null, gn = !1;
|
|
1441
|
+
function Er(t) {
|
|
1442
1442
|
var e = this, n = e.ownerDocument, r = t.type, i = t.composedPath?.() || [], s = i[0] || t.target;
|
|
1443
|
-
|
|
1444
|
-
|
|
1443
|
+
pn = t, gn || (gn = !0, setTimeout(() => {
|
|
1444
|
+
gn = !1, pn = null;
|
|
1445
|
+
}));
|
|
1446
|
+
var o = 0, a = pn === t && t[Pt];
|
|
1445
1447
|
if (a) {
|
|
1446
1448
|
var l = i.indexOf(a);
|
|
1447
1449
|
if (l !== -1 && (e === document || e === window)) {
|
|
@@ -1460,7 +1462,7 @@ function _r(t) {
|
|
|
1460
1462
|
}
|
|
1461
1463
|
});
|
|
1462
1464
|
var h = A, u = C;
|
|
1463
|
-
|
|
1465
|
+
fe(null), Ae(null);
|
|
1464
1466
|
try {
|
|
1465
1467
|
for (var f, g = []; s !== null && s !== e; ) {
|
|
1466
1468
|
try {
|
|
@@ -1479,17 +1481,17 @@ function _r(t) {
|
|
|
1479
1481
|
throw f;
|
|
1480
1482
|
}
|
|
1481
1483
|
} finally {
|
|
1482
|
-
t[Pt] = e, delete t.currentTarget,
|
|
1484
|
+
t[Pt] = e, delete t.currentTarget, fe(h), Ae(u);
|
|
1483
1485
|
}
|
|
1484
1486
|
}
|
|
1485
1487
|
}
|
|
1486
|
-
var
|
|
1487
|
-
function aa(t) {
|
|
1488
|
-
return oa?.createHTML(t) ?? t;
|
|
1489
|
-
}
|
|
1488
|
+
var aa = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
|
|
1490
1489
|
function la(t) {
|
|
1491
|
-
|
|
1492
|
-
|
|
1490
|
+
return aa?.createHTML(t) ?? t;
|
|
1491
|
+
}
|
|
1492
|
+
function ca(t) {
|
|
1493
|
+
var e = Ii("template");
|
|
1494
|
+
return e.innerHTML = la(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1493
1495
|
}
|
|
1494
1496
|
function Bt(t, e) {
|
|
1495
1497
|
var n = C;
|
|
@@ -1501,29 +1503,29 @@ function Bt(t, e) {
|
|
|
1501
1503
|
});
|
|
1502
1504
|
}
|
|
1503
1505
|
// @__NO_SIDE_EFFECTS__
|
|
1504
|
-
function
|
|
1506
|
+
function ha(t, e) {
|
|
1505
1507
|
var n = (e & 1) !== 0, r = (e & 2) !== 0, i, s = !t.startsWith("<!>");
|
|
1506
1508
|
return () => {
|
|
1507
1509
|
if (ie)
|
|
1508
1510
|
return Bt(j, null), j;
|
|
1509
|
-
i === void 0 && (i =
|
|
1510
|
-
var o = r ||
|
|
1511
|
+
i === void 0 && (i = ca(s ? t : "<!>" + t), n || (i = /* @__PURE__ */ Mn(i)));
|
|
1512
|
+
var o = r || Mi ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1511
1513
|
if (n) {
|
|
1512
|
-
var a = /* @__PURE__ */
|
|
1514
|
+
var a = /* @__PURE__ */ Mn(o), l = o.lastChild;
|
|
1513
1515
|
Bt(a, l);
|
|
1514
1516
|
} else Bt(o, o);
|
|
1515
1517
|
return o;
|
|
1516
1518
|
};
|
|
1517
1519
|
}
|
|
1518
|
-
function
|
|
1520
|
+
function Gi(t, e) {
|
|
1519
1521
|
if (ie) {
|
|
1520
1522
|
var n = C;
|
|
1521
|
-
((n.f & 32768) === 0 || n.nodes.end === null) && (n.nodes.end = j),
|
|
1523
|
+
((n.f & 32768) === 0 || n.nodes.end === null) && (n.nodes.end = j), si();
|
|
1522
1524
|
return;
|
|
1523
1525
|
}
|
|
1524
1526
|
t !== null && t.before(e);
|
|
1525
1527
|
}
|
|
1526
|
-
var
|
|
1528
|
+
var ua = [
|
|
1527
1529
|
"allowfullscreen",
|
|
1528
1530
|
"async",
|
|
1529
1531
|
"autofocus",
|
|
@@ -1552,8 +1554,8 @@ var ha = [
|
|
|
1552
1554
|
"defer",
|
|
1553
1555
|
"disablepictureinpicture",
|
|
1554
1556
|
"disableremoteplayback"
|
|
1555
|
-
],
|
|
1556
|
-
...
|
|
1557
|
+
], Eh = [
|
|
1558
|
+
...ua,
|
|
1557
1559
|
"formNoValidate",
|
|
1558
1560
|
"isMap",
|
|
1559
1561
|
"noModule",
|
|
@@ -1568,17 +1570,17 @@ var ha = [
|
|
|
1568
1570
|
"allowFullscreen",
|
|
1569
1571
|
"disablePictureInPicture",
|
|
1570
1572
|
"disableRemotePlayback"
|
|
1571
|
-
],
|
|
1572
|
-
function
|
|
1573
|
-
return
|
|
1573
|
+
], da = ["touchstart", "touchmove"];
|
|
1574
|
+
function fa(t) {
|
|
1575
|
+
return da.includes(t);
|
|
1574
1576
|
}
|
|
1575
|
-
var
|
|
1577
|
+
var pa = [
|
|
1576
1578
|
"$state",
|
|
1577
1579
|
"$state.raw",
|
|
1578
1580
|
"$derived",
|
|
1579
1581
|
"$derived.by"
|
|
1580
|
-
],
|
|
1581
|
-
...
|
|
1582
|
+
], Ah = [
|
|
1583
|
+
...pa,
|
|
1582
1584
|
"$state.eager",
|
|
1583
1585
|
"$state.snapshot",
|
|
1584
1586
|
"$props",
|
|
@@ -1593,18 +1595,18 @@ var fa = [
|
|
|
1593
1595
|
"$inspect().with",
|
|
1594
1596
|
"$inspect.trace",
|
|
1595
1597
|
"$host"
|
|
1596
|
-
],
|
|
1597
|
-
function
|
|
1598
|
-
return
|
|
1598
|
+
], Ar = !0;
|
|
1599
|
+
function Vi(t, e) {
|
|
1600
|
+
return Ki(t, e);
|
|
1599
1601
|
}
|
|
1600
|
-
function
|
|
1601
|
-
|
|
1602
|
+
function ga(t, e) {
|
|
1603
|
+
Rn(), e.intro = e.intro ?? !1;
|
|
1602
1604
|
const n = e.target, r = ie, i = j;
|
|
1603
1605
|
try {
|
|
1604
|
-
for (var s = /* @__PURE__ */
|
|
1606
|
+
for (var s = /* @__PURE__ */ Mn(n); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ lt(s);
|
|
1605
1607
|
if (!s) throw zt;
|
|
1606
1608
|
Rt(!0), bt(s);
|
|
1607
|
-
const o =
|
|
1609
|
+
const o = Ki(t, {
|
|
1608
1610
|
...e,
|
|
1609
1611
|
anchor: s
|
|
1610
1612
|
});
|
|
@@ -1612,61 +1614,61 @@ function pa(t, e) {
|
|
|
1612
1614
|
} catch (o) {
|
|
1613
1615
|
if (o instanceof Error && o.message.split(`
|
|
1614
1616
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw o;
|
|
1615
|
-
return o !== zt && console.warn("Failed to hydrate: ", o), e.recover === !1 &&
|
|
1617
|
+
return o !== zt && console.warn("Failed to hydrate: ", o), e.recover === !1 && co(), Rn(), Vo(n), Rt(!1), Vi(t, e);
|
|
1616
1618
|
} finally {
|
|
1617
1619
|
Rt(r), bt(i);
|
|
1618
1620
|
}
|
|
1619
1621
|
}
|
|
1620
1622
|
var It = /* @__PURE__ */ new Map();
|
|
1621
|
-
function
|
|
1622
|
-
|
|
1623
|
-
var l = void 0, c =
|
|
1624
|
-
var h = n ?? e.appendChild(
|
|
1625
|
-
|
|
1623
|
+
function Ki(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: o = !0, transformError: a }) {
|
|
1624
|
+
Rn();
|
|
1625
|
+
var l = void 0, c = Jo(() => {
|
|
1626
|
+
var h = n ?? e.appendChild(Pi());
|
|
1627
|
+
xo(h, { pending: () => {
|
|
1626
1628
|
} }, (g) => {
|
|
1627
|
-
|
|
1629
|
+
li({});
|
|
1628
1630
|
var m = I;
|
|
1629
|
-
if (s && (m.c = s), i && (r.$$events = i), ie && Bt(g, null),
|
|
1630
|
-
throw
|
|
1631
|
-
|
|
1631
|
+
if (s && (m.c = s), i && (r.$$events = i), ie && Bt(g, null), Ar = o, l = t(g, r) || {}, Ar = !0, ie && (C.nodes.end = j, j === null || j.nodeType !== 8 || j.data !== "]"))
|
|
1632
|
+
throw ii(), zt;
|
|
1633
|
+
ci();
|
|
1632
1634
|
}, a);
|
|
1633
1635
|
var u = /* @__PURE__ */ new Set(), f = (g) => {
|
|
1634
1636
|
for (var m = 0; m < g.length; m++) {
|
|
1635
1637
|
var y = g[m];
|
|
1636
1638
|
if (!u.has(y)) {
|
|
1637
1639
|
u.add(y);
|
|
1638
|
-
var v =
|
|
1640
|
+
var v = fa(y);
|
|
1639
1641
|
for (const D of [e, document]) {
|
|
1640
1642
|
var b = It.get(D);
|
|
1641
1643
|
b === void 0 && (b = /* @__PURE__ */ new Map(), It.set(D, b));
|
|
1642
1644
|
var x = b.get(y);
|
|
1643
|
-
x === void 0 ? (D.addEventListener(y,
|
|
1645
|
+
x === void 0 ? (D.addEventListener(y, Er, { passive: v }), b.set(y, 1)) : b.set(y, x + 1);
|
|
1644
1646
|
}
|
|
1645
1647
|
}
|
|
1646
1648
|
}
|
|
1647
1649
|
};
|
|
1648
|
-
return f(
|
|
1650
|
+
return f(zs(oa)), kr.add(f), () => {
|
|
1649
1651
|
for (var g of u) for (const v of [e, document]) {
|
|
1650
1652
|
var m = It.get(v), y = m.get(g);
|
|
1651
|
-
--y == 0 ? (v.removeEventListener(g,
|
|
1653
|
+
--y == 0 ? (v.removeEventListener(g, Er), m.delete(g), m.size === 0 && It.delete(v)) : m.set(g, y);
|
|
1652
1654
|
}
|
|
1653
|
-
|
|
1655
|
+
kr.delete(f), h !== n && h.parentNode?.removeChild(h);
|
|
1654
1656
|
};
|
|
1655
1657
|
});
|
|
1656
|
-
return
|
|
1658
|
+
return On.set(l, c), l;
|
|
1657
1659
|
}
|
|
1658
|
-
var
|
|
1659
|
-
function
|
|
1660
|
-
const n =
|
|
1661
|
-
return n ? (
|
|
1660
|
+
var On = /* @__PURE__ */ new WeakMap();
|
|
1661
|
+
function ma(t, e) {
|
|
1662
|
+
const n = On.get(t);
|
|
1663
|
+
return n ? (On.delete(t), n(e)) : Promise.resolve();
|
|
1662
1664
|
}
|
|
1663
|
-
function
|
|
1664
|
-
I === null &&
|
|
1665
|
+
function va(t) {
|
|
1666
|
+
I === null && io("onMount"), Et && I.l !== null ? ya(I).m.push(t) : Me(() => {
|
|
1665
1667
|
const e = hn(t);
|
|
1666
1668
|
if (typeof e == "function") return e;
|
|
1667
1669
|
});
|
|
1668
1670
|
}
|
|
1669
|
-
function
|
|
1671
|
+
function ya(t) {
|
|
1670
1672
|
var e = t.l;
|
|
1671
1673
|
return e.u ?? (e.u = {
|
|
1672
1674
|
a: [],
|
|
@@ -1674,44 +1676,44 @@ function va(t) {
|
|
|
1674
1676
|
m: []
|
|
1675
1677
|
});
|
|
1676
1678
|
}
|
|
1677
|
-
var
|
|
1679
|
+
var Yi, et = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), mn = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakSet(), Xi = class {
|
|
1678
1680
|
constructor(t) {
|
|
1679
|
-
|
|
1681
|
+
Gn(this, Cr), k(this, et, /* @__PURE__ */ new WeakMap()), k(this, tn, void 0), k(this, mn, void 0), S(mn, this, t);
|
|
1680
1682
|
}
|
|
1681
1683
|
observe(t, e) {
|
|
1682
1684
|
var n = p(et, this).get(t) || /* @__PURE__ */ new Set();
|
|
1683
|
-
return n.add(e), p(et, this).set(t, n),
|
|
1685
|
+
return n.add(e), p(et, this).set(t, n), _(Cr, this, ba).call(this).observe(t, p(mn, this)), () => {
|
|
1684
1686
|
var r = p(et, this).get(t);
|
|
1685
1687
|
r.delete(e), r.size === 0 && (p(et, this).delete(t), p(tn, this).unobserve(t));
|
|
1686
1688
|
};
|
|
1687
1689
|
}
|
|
1688
1690
|
};
|
|
1689
|
-
|
|
1690
|
-
function
|
|
1691
|
+
Yi = Xi;
|
|
1692
|
+
function ba() {
|
|
1691
1693
|
return p(tn, this) ?? S(tn, this, new ResizeObserver((t) => {
|
|
1692
1694
|
for (var e of t) {
|
|
1693
|
-
|
|
1695
|
+
Yi.entries.set(e.target, e);
|
|
1694
1696
|
for (var n of p(et, this).get(e.target) || []) n(e);
|
|
1695
1697
|
}
|
|
1696
1698
|
}));
|
|
1697
1699
|
}
|
|
1698
|
-
d(
|
|
1699
|
-
function
|
|
1700
|
+
d(Xi, "entries", /* @__PURE__ */ new WeakMap());
|
|
1701
|
+
function vn(t, e) {
|
|
1700
1702
|
return t === e || t?.[gt] === e;
|
|
1701
1703
|
}
|
|
1702
|
-
function
|
|
1704
|
+
function Sa(t = {}, e, n, r) {
|
|
1703
1705
|
var i = I.r, s = C;
|
|
1704
|
-
return
|
|
1706
|
+
return Qo(() => {
|
|
1705
1707
|
var o, a;
|
|
1706
|
-
return
|
|
1708
|
+
return Zn(() => {
|
|
1707
1709
|
o = a, a = r?.() || [], hn(() => {
|
|
1708
|
-
|
|
1710
|
+
vn(n(...a), t) || (e(t, ...a), o && vn(n(...o), t) && e(null, ...o));
|
|
1709
1711
|
});
|
|
1710
1712
|
}), () => {
|
|
1711
1713
|
let l = s;
|
|
1712
1714
|
for (; l !== i && l.parent !== null && l.parent.f & 33554432; ) l = l.parent;
|
|
1713
1715
|
const c = () => {
|
|
1714
|
-
a &&
|
|
1716
|
+
a && vn(n(...a), t) && e(null, ...a);
|
|
1715
1717
|
}, h = l.teardown;
|
|
1716
1718
|
l.teardown = () => {
|
|
1717
1719
|
c(), h?.();
|
|
@@ -1719,15 +1721,15 @@ function ba(t = {}, e, n, r) {
|
|
|
1719
1721
|
};
|
|
1720
1722
|
}), t;
|
|
1721
1723
|
}
|
|
1722
|
-
function
|
|
1724
|
+
function Te(t, e, n, r) {
|
|
1723
1725
|
var i = !Et || (n & 2) !== 0, s = (n & 8) !== 0, o = (n & 16) !== 0, a = r, l = !0, c = void 0, h = () => o && i ? (c ?? (c = /* @__PURE__ */ Vt(r)), w(c)) : (l && (l = !1, a = o ? hn(r) : r), a);
|
|
1724
1726
|
let u;
|
|
1725
1727
|
if (s) {
|
|
1726
|
-
var f = gt in t ||
|
|
1727
|
-
u =
|
|
1728
|
+
var f = gt in t || ri in t;
|
|
1729
|
+
u = Ne(t, e)?.set ?? (f && e in t ? (E) => t[e] = E : void 0);
|
|
1728
1730
|
}
|
|
1729
1731
|
var g, m = !1;
|
|
1730
|
-
s ? [g, m] =
|
|
1732
|
+
s ? [g, m] = Eo(() => t[e]) : g = t[e], g === void 0 && r !== void 0 && (g = h(), u && (i && ho(e), u(g)));
|
|
1731
1733
|
var y;
|
|
1732
1734
|
if (i ? y = () => {
|
|
1733
1735
|
var E = t[e];
|
|
@@ -1742,7 +1744,7 @@ function Se(t, e, n, r) {
|
|
|
1742
1744
|
return arguments.length > 0 ? ((!i || !H || v || m) && u(H ? y() : E), E) : y();
|
|
1743
1745
|
});
|
|
1744
1746
|
}
|
|
1745
|
-
var b = !1, x = ((n & 1) !== 0 ? Vt :
|
|
1747
|
+
var b = !1, x = ((n & 1) !== 0 ? Vt : Io)(() => (b = !1, y()));
|
|
1746
1748
|
s && w(x);
|
|
1747
1749
|
var D = C;
|
|
1748
1750
|
return (function(E, H) {
|
|
@@ -1750,17 +1752,17 @@ function Se(t, e, n, r) {
|
|
|
1750
1752
|
const F = H ? w(x) : i && s ? tt(E) : E;
|
|
1751
1753
|
return z(x, F), b = !0, a !== void 0 && (a = F), E;
|
|
1752
1754
|
}
|
|
1753
|
-
return
|
|
1755
|
+
return ye && b || (D.f & 16384) !== 0 ? x.v : w(x);
|
|
1754
1756
|
});
|
|
1755
1757
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return new
|
|
1758
|
+
function Ta(t) {
|
|
1759
|
+
return new wa(t);
|
|
1758
1760
|
}
|
|
1759
|
-
var
|
|
1761
|
+
var xe = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), wa = class {
|
|
1760
1762
|
constructor(t) {
|
|
1761
|
-
|
|
1763
|
+
k(this, xe, void 0), k(this, ce, void 0);
|
|
1762
1764
|
var e = /* @__PURE__ */ new Map(), n = (i, s) => {
|
|
1763
|
-
var o = /* @__PURE__ */
|
|
1765
|
+
var o = /* @__PURE__ */ zo(s, !1, !1);
|
|
1764
1766
|
return e.set(i, o), o;
|
|
1765
1767
|
};
|
|
1766
1768
|
const r = new Proxy({
|
|
@@ -1771,13 +1773,13 @@ var Ce = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ta =
|
|
|
1771
1773
|
return w(e.get(s) ?? n(s, Reflect.get(i, s)));
|
|
1772
1774
|
},
|
|
1773
1775
|
has(i, s) {
|
|
1774
|
-
return s ===
|
|
1776
|
+
return s === ri ? !0 : (w(e.get(s) ?? n(s, Reflect.get(i, s))), Reflect.has(i, s));
|
|
1775
1777
|
},
|
|
1776
1778
|
set(i, s, o) {
|
|
1777
1779
|
return z(e.get(s) ?? n(s, o), o), Reflect.set(i, s, o);
|
|
1778
1780
|
}
|
|
1779
1781
|
});
|
|
1780
|
-
S(ce, this, (t.hydrate ?
|
|
1782
|
+
S(ce, this, (t.hydrate ? ga : Vi)(t.component, {
|
|
1781
1783
|
target: t.target,
|
|
1782
1784
|
anchor: t.anchor,
|
|
1783
1785
|
props: r,
|
|
@@ -1785,7 +1787,7 @@ var Ce = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ta =
|
|
|
1785
1787
|
intro: t.intro ?? !1,
|
|
1786
1788
|
recover: t.recover,
|
|
1787
1789
|
transformError: t.transformError
|
|
1788
|
-
})), !
|
|
1790
|
+
})), !Ee && (!t?.props?.$$host || t.sync === !1) && ge(), S(xe, this, r.$$events);
|
|
1789
1791
|
for (const i of Object.keys(p(ce, this)))
|
|
1790
1792
|
i === "$set" || i === "$destroy" || i === "$on" || jt(this, i, {
|
|
1791
1793
|
get() {
|
|
@@ -1799,24 +1801,24 @@ var Ce = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ta =
|
|
|
1799
1801
|
p(ce, this).$set = (i) => {
|
|
1800
1802
|
Object.assign(r, i);
|
|
1801
1803
|
}, p(ce, this).$destroy = () => {
|
|
1802
|
-
|
|
1804
|
+
ma(p(ce, this));
|
|
1803
1805
|
};
|
|
1804
1806
|
}
|
|
1805
1807
|
$set(t) {
|
|
1806
1808
|
p(ce, this).$set(t);
|
|
1807
1809
|
}
|
|
1808
1810
|
$on(t, e) {
|
|
1809
|
-
p(
|
|
1811
|
+
p(xe, this)[t] = p(xe, this)[t] || [];
|
|
1810
1812
|
const n = (...r) => e.call(this, ...r);
|
|
1811
|
-
return p(
|
|
1812
|
-
p(
|
|
1813
|
+
return p(xe, this)[t].push(n), () => {
|
|
1814
|
+
p(xe, this)[t] = p(xe, this)[t].filter((r) => r !== n);
|
|
1813
1815
|
};
|
|
1814
1816
|
}
|
|
1815
1817
|
$destroy() {
|
|
1816
1818
|
p(ce, this).$destroy();
|
|
1817
1819
|
}
|
|
1818
|
-
},
|
|
1819
|
-
typeof HTMLElement == "function" && (
|
|
1820
|
+
}, Ji;
|
|
1821
|
+
typeof HTMLElement == "function" && (Ji = class extends HTMLElement {
|
|
1820
1822
|
constructor(t, e, n) {
|
|
1821
1823
|
super(), d(this, "$$ctor", void 0), d(this, "$$s", void 0), d(this, "$$c", void 0), d(this, "$$cn", !1), d(this, "$$d", {}), d(this, "$$r", !1), d(this, "$$p_d", {}), d(this, "$$l", {}), d(this, "$$l_u", /* @__PURE__ */ new Map()), d(this, "$$me", void 0), d(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, n && (this.$$shadowRoot = this.attachShadow(n));
|
|
1822
1824
|
}
|
|
@@ -1837,19 +1839,19 @@ typeof HTMLElement == "function" && (Xi = class extends HTMLElement {
|
|
|
1837
1839
|
if (this.$$cn = !0, !this.$$c) {
|
|
1838
1840
|
let t = function(r) {
|
|
1839
1841
|
return (i) => {
|
|
1840
|
-
const s =
|
|
1841
|
-
r !== "default" && (s.name = r),
|
|
1842
|
+
const s = Ii("slot");
|
|
1843
|
+
r !== "default" && (s.name = r), Gi(i, s);
|
|
1842
1844
|
};
|
|
1843
1845
|
};
|
|
1844
1846
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
1845
|
-
const e = {}, n =
|
|
1847
|
+
const e = {}, n = _a(this);
|
|
1846
1848
|
for (const r of this.$$s) r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = t(r), e.default = !0) : e[r] = t(r));
|
|
1847
1849
|
for (const r of this.attributes) {
|
|
1848
1850
|
const i = this.$$g_p(r.name);
|
|
1849
1851
|
i in this.$$d || (this.$$d[i] = Wt(i, r.value, this.$$p_d, "toProp"));
|
|
1850
1852
|
}
|
|
1851
1853
|
for (const r in this.$$p_d) !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
1852
|
-
this.$$c =
|
|
1854
|
+
this.$$c = Ta({
|
|
1853
1855
|
component: this.$$ctor,
|
|
1854
1856
|
target: this.$$shadowRoot || this,
|
|
1855
1857
|
props: {
|
|
@@ -1857,8 +1859,8 @@ typeof HTMLElement == "function" && (Xi = class extends HTMLElement {
|
|
|
1857
1859
|
$$slots: e,
|
|
1858
1860
|
$$host: this
|
|
1859
1861
|
}
|
|
1860
|
-
}), this.$$me =
|
|
1861
|
-
|
|
1862
|
+
}), this.$$me = Xo(() => {
|
|
1863
|
+
Zn(() => {
|
|
1862
1864
|
this.$$r = !0;
|
|
1863
1865
|
for (const r of qt(this.$$c)) {
|
|
1864
1866
|
if (!this.$$p_d[r]?.reflect) continue;
|
|
@@ -1914,14 +1916,14 @@ function Wt(t, e, n, r) {
|
|
|
1914
1916
|
return e;
|
|
1915
1917
|
}
|
|
1916
1918
|
}
|
|
1917
|
-
function
|
|
1919
|
+
function _a(t) {
|
|
1918
1920
|
const e = {};
|
|
1919
1921
|
return t.childNodes.forEach((n) => {
|
|
1920
1922
|
e[n.slot || "default"] = !0;
|
|
1921
1923
|
}), e;
|
|
1922
1924
|
}
|
|
1923
1925
|
function ka(t, e, n, r, i, s) {
|
|
1924
|
-
let o = class extends
|
|
1926
|
+
let o = class extends Ji {
|
|
1925
1927
|
constructor() {
|
|
1926
1928
|
super(t, n, i), this.$$p_d = e;
|
|
1927
1929
|
}
|
|
@@ -1937,7 +1939,7 @@ function ka(t, e, n, r, i, s) {
|
|
|
1937
1939
|
set(l) {
|
|
1938
1940
|
l = Wt(a, l, e), this.$$d[a] = l;
|
|
1939
1941
|
var c = this.$$c;
|
|
1940
|
-
c && (
|
|
1942
|
+
c && (Ne(c, a)?.get ? c[a] = l : c.$set({ [a]: l }));
|
|
1941
1943
|
}
|
|
1942
1944
|
});
|
|
1943
1945
|
}), r.forEach((a) => {
|
|
@@ -1946,14 +1948,14 @@ function ka(t, e, n, r, i, s) {
|
|
|
1946
1948
|
} });
|
|
1947
1949
|
}), s && (o = s(o)), t.element = o, o;
|
|
1948
1950
|
}
|
|
1949
|
-
var
|
|
1951
|
+
var Ea = class extends Event {
|
|
1950
1952
|
constructor(t, e, n, r) {
|
|
1951
1953
|
super("context-request", {
|
|
1952
1954
|
bubbles: !0,
|
|
1953
1955
|
composed: !0
|
|
1954
1956
|
}), d(this, "context", void 0), d(this, "contextTarget", void 0), d(this, "callback", void 0), d(this, "subscribe", void 0), this.context = t, this.contextTarget = e, this.callback = n, this.subscribe = r ?? !1;
|
|
1955
1957
|
}
|
|
1956
|
-
},
|
|
1958
|
+
}, Aa = class {
|
|
1957
1959
|
constructor(t, e) {
|
|
1958
1960
|
d(this, "host", void 0), d(this, "context", void 0), d(this, "subscribe", void 0), d(this, "onValue", void 0), d(this, "isConnected", !1), d(this, "unsubscribe", void 0), d(this, "currentValue", void 0), d(this, "handleValue", (n, r) => {
|
|
1959
1961
|
r !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = r), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = n, this.onValue?.(n);
|
|
@@ -1969,12 +1971,12 @@ var _a = class extends Event {
|
|
|
1969
1971
|
return this.currentValue;
|
|
1970
1972
|
}
|
|
1971
1973
|
requestValue() {
|
|
1972
|
-
this.host.dispatchEvent(new
|
|
1974
|
+
this.host.dispatchEvent(new Ea(this.context, this.host, this.handleValue, this.subscribe));
|
|
1973
1975
|
}
|
|
1974
|
-
}, un = (t) => t,
|
|
1975
|
-
function
|
|
1976
|
+
}, un = (t) => t, Ca = un(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Ch = un(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), xa = un(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), xh = un(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
1977
|
+
function Qi(t, e, n) {
|
|
1976
1978
|
let r = !1;
|
|
1977
|
-
const i = new
|
|
1979
|
+
const i = new Aa(t, {
|
|
1978
1980
|
context: e,
|
|
1979
1981
|
subscribe: !0,
|
|
1980
1982
|
onValue: (c) => {
|
|
@@ -1998,22 +2000,22 @@ function Ji(t, e, n) {
|
|
|
1998
2000
|
globalThis.clearInterval(l), t.removeEventListener("context-provider", s), i.disconnect();
|
|
1999
2001
|
};
|
|
2000
2002
|
}
|
|
2001
|
-
function xa(t, e) {
|
|
2002
|
-
return Ji(t, Aa, e);
|
|
2003
|
-
}
|
|
2004
2003
|
function Ra(t, e) {
|
|
2005
|
-
return
|
|
2004
|
+
return Qi(t, Ca, e);
|
|
2006
2005
|
}
|
|
2007
2006
|
function Ma(t, e) {
|
|
2008
|
-
return
|
|
2007
|
+
return Qi(t, xa, e);
|
|
2009
2008
|
}
|
|
2010
2009
|
function Oa(t, e) {
|
|
2011
2010
|
return Ra(t, e);
|
|
2012
2011
|
}
|
|
2012
|
+
function La(t, e) {
|
|
2013
|
+
return Ma(t, e);
|
|
2014
|
+
}
|
|
2013
2015
|
function wt(t) {
|
|
2014
2016
|
return t ? t.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
|
|
2015
2017
|
}
|
|
2016
|
-
function
|
|
2018
|
+
function Pa(t) {
|
|
2017
2019
|
const e = wt(t);
|
|
2018
2020
|
if (!e) return [];
|
|
2019
2021
|
const n = e.split("-"), r = [];
|
|
@@ -2023,13 +2025,13 @@ function La(t) {
|
|
|
2023
2025
|
}
|
|
2024
2026
|
return r;
|
|
2025
2027
|
}
|
|
2026
|
-
function
|
|
2027
|
-
for (const n of
|
|
2028
|
+
function Ia(t, e) {
|
|
2029
|
+
for (const n of Pa(t)) {
|
|
2028
2030
|
const r = e.find((i) => wt(i) === n);
|
|
2029
2031
|
if (r != null) return r;
|
|
2030
2032
|
}
|
|
2031
2033
|
}
|
|
2032
|
-
var
|
|
2034
|
+
var Na = class {
|
|
2033
2035
|
serialize(t, e) {
|
|
2034
2036
|
return {
|
|
2035
2037
|
startContainer: this.getNodePath(t.startContainer, e),
|
|
@@ -2102,9 +2104,9 @@ var rt;
|
|
|
2102
2104
|
(function(t) {
|
|
2103
2105
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2104
2106
|
})(rt || (rt = {}));
|
|
2105
|
-
var
|
|
2107
|
+
var Zi = class Ln {
|
|
2106
2108
|
constructor(e = {}) {
|
|
2107
|
-
if (d(this, "config", void 0), d(this, "ttsWordHighlight", null), d(this, "ttsSentenceHighlight", null), d(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), d(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), d(this, "annotations", /* @__PURE__ */ new Map()), d(this, "colorHighlights", /* @__PURE__ */ new Map()), d(this, "nextAnnotationId", 1), d(this, "supported", !1), d(this, "rangeSerializer", void 0), d(this, "themeObserver", null), d(this, "explicitTTSColorOverride", null), this.config = e, this.rangeSerializer = new
|
|
2109
|
+
if (d(this, "config", void 0), d(this, "ttsWordHighlight", null), d(this, "ttsSentenceHighlight", null), d(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), d(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), d(this, "annotations", /* @__PURE__ */ new Map()), d(this, "colorHighlights", /* @__PURE__ */ new Map()), d(this, "nextAnnotationId", 1), d(this, "supported", !1), d(this, "rangeSerializer", void 0), d(this, "themeObserver", null), d(this, "explicitTTSColorOverride", null), this.config = e, this.rangeSerializer = new Na(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2108
2110
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
2109
2111
|
return;
|
|
2110
2112
|
}
|
|
@@ -2214,12 +2216,12 @@ var Qi = class Mn {
|
|
|
2214
2216
|
];
|
|
2215
2217
|
let u = h[h.length - 1], f = -1 / 0;
|
|
2216
2218
|
for (const H of h) {
|
|
2217
|
-
const F = this.blend(c, a, H), ct = this.contrastRatio(F, a), R = this.contrastRatio(F, l),
|
|
2219
|
+
const F = this.blend(c, a, H), ct = this.contrastRatio(F, a), R = this.contrastRatio(F, l), cr = ct * 1.2 + R * 0.8;
|
|
2218
2220
|
if (ct >= 1.25 && R >= 2.4) {
|
|
2219
2221
|
u = H;
|
|
2220
2222
|
break;
|
|
2221
2223
|
}
|
|
2222
|
-
|
|
2224
|
+
cr > f && (f = cr, u = H);
|
|
2223
2225
|
}
|
|
2224
2226
|
const g = Math.max(0.24, Math.min(0.85, u * 0.55)), m = Math.max(0.55, Math.min(0.95, u + 0.2)), y = Math.max(0.22, Math.min(0.6, u * 0.45)), v = l, b = this.blend(v, a, m), x = this.contrastRatio(b, a), D = this.relativeLuminance(a) > 0.45 ? [
|
|
2225
2227
|
0,
|
|
@@ -2490,10 +2492,10 @@ var Qi = class Mn {
|
|
|
2490
2492
|
}
|
|
2491
2493
|
}
|
|
2492
2494
|
highlightTTSElementFallbacks(e) {
|
|
2493
|
-
typeof Element > "u" || this.highlightElementFallbacks(e, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights,
|
|
2495
|
+
typeof Element > "u" || this.highlightElementFallbacks(e, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights, Ln.SENTENCE_FALLBACK_SELECTOR);
|
|
2494
2496
|
}
|
|
2495
2497
|
highlightTTSWordElementFallbacks(e) {
|
|
2496
|
-
typeof Element > "u" || this.highlightElementFallbacks(e, "data-pie-tts-word-element", this.ttsWordElementHighlights,
|
|
2498
|
+
typeof Element > "u" || this.highlightElementFallbacks(e, "data-pie-tts-word-element", this.ttsWordElementHighlights, Ln.WORD_FALLBACK_SELECTOR);
|
|
2497
2499
|
}
|
|
2498
2500
|
highlightElementFallbacks(e, n, r, i) {
|
|
2499
2501
|
for (const s of e) {
|
|
@@ -2655,9 +2657,9 @@ var Qi = class Mn {
|
|
|
2655
2657
|
}
|
|
2656
2658
|
}
|
|
2657
2659
|
};
|
|
2658
|
-
d(
|
|
2659
|
-
d(
|
|
2660
|
-
var
|
|
2660
|
+
d(Zi, "SENTENCE_FALLBACK_SELECTOR", "math, mjx-container, svg, img, canvas, [role='img']");
|
|
2661
|
+
d(Zi, "WORD_FALLBACK_SELECTOR", "svg, img, canvas, [role='img']");
|
|
2662
|
+
var $a = {
|
|
2661
2663
|
common: {
|
|
2662
2664
|
close: "Close",
|
|
2663
2665
|
cancel: "Cancel",
|
|
@@ -3156,7 +3158,7 @@ var Na = {
|
|
|
3156
3158
|
coordinatorUnavailable: "Toolkit coordinator is not available for text-to-speech updates."
|
|
3157
3159
|
}
|
|
3158
3160
|
}
|
|
3159
|
-
},
|
|
3161
|
+
}, yn = "en-US", Ha = /* @__PURE__ */ new Set([
|
|
3160
3162
|
"ar",
|
|
3161
3163
|
"ckb",
|
|
3162
3164
|
"dv",
|
|
@@ -3172,7 +3174,7 @@ var Na = {
|
|
|
3172
3174
|
"ug",
|
|
3173
3175
|
"ur",
|
|
3174
3176
|
"yi"
|
|
3175
|
-
]),
|
|
3177
|
+
]), Ba = /* @__PURE__ */ new Set([
|
|
3176
3178
|
"zero",
|
|
3177
3179
|
"one",
|
|
3178
3180
|
"two",
|
|
@@ -3180,23 +3182,23 @@ var Na = {
|
|
|
3180
3182
|
"many",
|
|
3181
3183
|
"other"
|
|
3182
3184
|
]);
|
|
3183
|
-
function
|
|
3185
|
+
function xr(t) {
|
|
3184
3186
|
if (typeof t != "object" || t === null) return !1;
|
|
3185
3187
|
const e = Object.keys(t);
|
|
3186
|
-
return e.length > 0 && e.every((n) =>
|
|
3188
|
+
return e.length > 0 && e.every((n) => Ba.has(n));
|
|
3187
3189
|
}
|
|
3188
|
-
function
|
|
3190
|
+
function Rr(t) {
|
|
3189
3191
|
try {
|
|
3190
3192
|
const n = new Intl.Locale(t).textInfo;
|
|
3191
3193
|
if (n?.direction === "rtl" || n?.direction === "ltr") return n.direction;
|
|
3192
3194
|
} catch {
|
|
3193
3195
|
}
|
|
3194
3196
|
const e = wt(t).split("-")[0] ?? "";
|
|
3195
|
-
return
|
|
3197
|
+
return Ha.has(e) ? "rtl" : "ltr";
|
|
3196
3198
|
}
|
|
3197
|
-
var
|
|
3199
|
+
var Wa = class Ft {
|
|
3198
3200
|
constructor(e = {}) {
|
|
3199
|
-
d(this, "locale", void 0), d(this, "fallbackLocale", void 0), d(this, "catalogs", void 0), d(this, "customMessages", void 0), d(this, "loading", void 0), d(this, "listeners", /* @__PURE__ */ new Set()), d(this, "config", void 0), this.config = { ...e }, this.fallbackLocale = Nt(e.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[
|
|
3201
|
+
d(this, "locale", void 0), d(this, "fallbackLocale", void 0), d(this, "catalogs", void 0), d(this, "customMessages", void 0), d(this, "loading", void 0), d(this, "listeners", /* @__PURE__ */ new Set()), d(this, "config", void 0), this.config = { ...e }, this.fallbackLocale = Nt(e.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[yn, $a]]), this.customMessages = { ...e.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(e.locale) ?? "en-US";
|
|
3200
3202
|
}
|
|
3201
3203
|
async initialize(e) {
|
|
3202
3204
|
if (this.config = {
|
|
@@ -3231,14 +3233,14 @@ var Ba = class Ft {
|
|
|
3231
3233
|
}
|
|
3232
3234
|
t(e, n) {
|
|
3233
3235
|
const r = this.lookup(e);
|
|
3234
|
-
return r === void 0 ? (this.config.onMissingKey?.(e, this.locale), e) :
|
|
3236
|
+
return r === void 0 ? (this.config.onMissingKey?.(e, this.locale), e) : Mr(r, n);
|
|
3235
3237
|
}
|
|
3236
3238
|
plural(e, n) {
|
|
3237
3239
|
const r = this.lookupNode(e);
|
|
3238
|
-
return r === void 0 || !
|
|
3240
|
+
return r === void 0 || !xr(r) ? this.t(e, n) : Mr(r[this.selectPluralCategory(n.count)] ?? r.other, n);
|
|
3239
3241
|
}
|
|
3240
3242
|
getDirection() {
|
|
3241
|
-
return
|
|
3243
|
+
return Rr(this.locale);
|
|
3242
3244
|
}
|
|
3243
3245
|
getAvailableLocales() {
|
|
3244
3246
|
return [.../* @__PURE__ */ new Set([
|
|
@@ -3261,7 +3263,7 @@ var Ba = class Ft {
|
|
|
3261
3263
|
}
|
|
3262
3264
|
addCustomMessages(e, n) {
|
|
3263
3265
|
const r = Nt(e);
|
|
3264
|
-
this.customMessages[r] =
|
|
3266
|
+
this.customMessages[r] = es(this.customMessages[r] ?? {}, n), this.notify();
|
|
3265
3267
|
}
|
|
3266
3268
|
withLocale(e) {
|
|
3267
3269
|
const n = this.resolveLocaleTag(e) ?? Nt(e);
|
|
@@ -3276,14 +3278,14 @@ var Ba = class Ft {
|
|
|
3276
3278
|
try {
|
|
3277
3279
|
return new Intl.NumberFormat(this.locale, n).format(e);
|
|
3278
3280
|
} catch {
|
|
3279
|
-
return new Intl.NumberFormat(
|
|
3281
|
+
return new Intl.NumberFormat(yn, n).format(e);
|
|
3280
3282
|
}
|
|
3281
3283
|
}
|
|
3282
3284
|
formatDate(e, n) {
|
|
3283
3285
|
try {
|
|
3284
3286
|
return new Intl.DateTimeFormat(this.locale, n).format(e);
|
|
3285
3287
|
} catch {
|
|
3286
|
-
return new Intl.DateTimeFormat(
|
|
3288
|
+
return new Intl.DateTimeFormat(yn, n).format(e);
|
|
3287
3289
|
}
|
|
3288
3290
|
}
|
|
3289
3291
|
getBundle(e = this.locale) {
|
|
@@ -3294,12 +3296,12 @@ var Ba = class Ft {
|
|
|
3294
3296
|
return {
|
|
3295
3297
|
locale: n,
|
|
3296
3298
|
translations: r,
|
|
3297
|
-
direction:
|
|
3299
|
+
direction: Rr(n)
|
|
3298
3300
|
};
|
|
3299
3301
|
}
|
|
3300
3302
|
resolveLocaleTag(e) {
|
|
3301
3303
|
if (!e) return;
|
|
3302
|
-
const n = this.getAvailableLocales(), r =
|
|
3304
|
+
const n = this.getAvailableLocales(), r = Ia(e, n);
|
|
3303
3305
|
if (r) return r;
|
|
3304
3306
|
const i = wt(e).split("-")[0];
|
|
3305
3307
|
if (i)
|
|
@@ -3322,14 +3324,14 @@ var Ba = class Ft {
|
|
|
3322
3324
|
this.catalogs.get(this.fallbackLocale)
|
|
3323
3325
|
];
|
|
3324
3326
|
for (const r of n) {
|
|
3325
|
-
const i =
|
|
3327
|
+
const i = Fa(r, e);
|
|
3326
3328
|
if (i !== void 0) return i;
|
|
3327
3329
|
}
|
|
3328
3330
|
}
|
|
3329
3331
|
lookup(e) {
|
|
3330
3332
|
const n = this.lookupNode(e);
|
|
3331
3333
|
if (typeof n == "string") return n;
|
|
3332
|
-
if (n !== void 0 &&
|
|
3334
|
+
if (n !== void 0 && xr(n)) return n.other;
|
|
3333
3335
|
}
|
|
3334
3336
|
selectPluralCategory(e) {
|
|
3335
3337
|
let n = Ft.pluralRules.get(this.locale);
|
|
@@ -3347,70 +3349,70 @@ var Ba = class Ft {
|
|
|
3347
3349
|
for (const e of this.listeners) e();
|
|
3348
3350
|
}
|
|
3349
3351
|
};
|
|
3350
|
-
d(
|
|
3352
|
+
d(Wa, "pluralRules", /* @__PURE__ */ new Map());
|
|
3351
3353
|
function Nt(t) {
|
|
3352
3354
|
return t ? t.trim().replace(/_/g, "-") : "";
|
|
3353
3355
|
}
|
|
3354
|
-
function
|
|
3356
|
+
function Fa(t, e) {
|
|
3355
3357
|
if (!t) return;
|
|
3356
3358
|
let n = t;
|
|
3357
3359
|
for (const r of e.split("."))
|
|
3358
3360
|
if (typeof n != "object" || n === null || (n = n[r], n === void 0)) return;
|
|
3359
3361
|
return n;
|
|
3360
3362
|
}
|
|
3361
|
-
function
|
|
3363
|
+
function Mr(t, e) {
|
|
3362
3364
|
return e ? t.replace(/\{(\w+)\}/g, (n, r) => {
|
|
3363
3365
|
const i = e[r];
|
|
3364
3366
|
return i == null ? n : String(i);
|
|
3365
3367
|
}) : t;
|
|
3366
3368
|
}
|
|
3367
|
-
function
|
|
3369
|
+
function es(t, e) {
|
|
3368
3370
|
const n = { ...t };
|
|
3369
3371
|
for (const [r, i] of Object.entries(e)) {
|
|
3370
3372
|
const s = n[r];
|
|
3371
|
-
i && typeof i == "object" && s && typeof s == "object" ? n[r] =
|
|
3373
|
+
i && typeof i == "object" && s && typeof s == "object" ? n[r] = es(s, i) : n[r] = i;
|
|
3372
3374
|
}
|
|
3373
3375
|
return n;
|
|
3374
3376
|
}
|
|
3375
|
-
function
|
|
3377
|
+
function ts(t) {
|
|
3376
3378
|
return (...e) => {
|
|
3377
3379
|
console.debug(`[${t}]`, ...e);
|
|
3378
3380
|
};
|
|
3379
3381
|
}
|
|
3380
|
-
var
|
|
3382
|
+
var Rh = ts("I18nService"), bn = {
|
|
3381
3383
|
assessment: [],
|
|
3382
3384
|
section: [],
|
|
3383
3385
|
item: [],
|
|
3384
3386
|
passage: [],
|
|
3385
3387
|
rubric: [],
|
|
3386
3388
|
element: []
|
|
3387
|
-
},
|
|
3388
|
-
section: [...
|
|
3389
|
-
item: [...
|
|
3390
|
-
passage: [...
|
|
3389
|
+
}, Sn = {
|
|
3390
|
+
section: [...bn.section],
|
|
3391
|
+
item: [...bn.item],
|
|
3392
|
+
passage: [...bn.passage]
|
|
3391
3393
|
};
|
|
3392
3394
|
function Fe(t) {
|
|
3393
3395
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
3394
3396
|
}
|
|
3395
|
-
function
|
|
3397
|
+
function we(t, e) {
|
|
3396
3398
|
if (t == null) return [];
|
|
3397
3399
|
if (!Array.isArray(t)) throw new Error(`Invalid tools config at "${e}": expected an array of tool ids.`);
|
|
3398
3400
|
if (t.find((n) => typeof n != "string") !== void 0) throw new Error(`Invalid tools config at "${e}": all entries must be strings.`);
|
|
3399
3401
|
return t;
|
|
3400
3402
|
}
|
|
3401
|
-
function
|
|
3403
|
+
function Da(t) {
|
|
3402
3404
|
if (t != null) {
|
|
3403
3405
|
if (!Fe(t)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
|
|
3404
3406
|
return t;
|
|
3405
3407
|
}
|
|
3406
3408
|
}
|
|
3407
|
-
function
|
|
3409
|
+
function za(t) {
|
|
3408
3410
|
if (t != null) {
|
|
3409
3411
|
if (!Fe(t)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
|
|
3410
3412
|
return t;
|
|
3411
3413
|
}
|
|
3412
3414
|
}
|
|
3413
|
-
function
|
|
3415
|
+
function Ua(t, e) {
|
|
3414
3416
|
if (e == null) return;
|
|
3415
3417
|
if (!Fe(e)) throw new Error(`Invalid tools config at "providers.${t}": expected an object.`);
|
|
3416
3418
|
const n = e, r = (i) => i === "polly" || i === "google" || i === "custom";
|
|
@@ -3419,50 +3421,50 @@ function za(t, e) {
|
|
|
3419
3421
|
if ("provider" in n && n.provider !== void 0 && !Fe(n.provider) && !(t === "textToSpeech" && r(n.provider))) throw new Error(`Invalid tools config at "providers.${t}.provider": expected an object.`);
|
|
3420
3422
|
return n;
|
|
3421
3423
|
}
|
|
3422
|
-
function
|
|
3424
|
+
function qa(t) {
|
|
3423
3425
|
if (t == null) return {};
|
|
3424
3426
|
if (!Fe(t)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
|
|
3425
3427
|
const e = {};
|
|
3426
|
-
for (const [n, r] of Object.entries(t)) e[n] =
|
|
3428
|
+
for (const [n, r] of Object.entries(t)) e[n] = Ua(n, r);
|
|
3427
3429
|
return e;
|
|
3428
3430
|
}
|
|
3429
|
-
function
|
|
3431
|
+
function ja(t) {
|
|
3430
3432
|
const e = t.trim();
|
|
3431
3433
|
return e || "";
|
|
3432
3434
|
}
|
|
3433
|
-
function
|
|
3435
|
+
function _e(t) {
|
|
3434
3436
|
if (!t || t.length === 0) return [];
|
|
3435
3437
|
const e = /* @__PURE__ */ new Set();
|
|
3436
3438
|
for (const n of t) {
|
|
3437
3439
|
if (typeof n != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
|
|
3438
|
-
const r =
|
|
3440
|
+
const r = ja(n);
|
|
3439
3441
|
r && e.add(r);
|
|
3440
3442
|
}
|
|
3441
3443
|
return Array.from(e);
|
|
3442
3444
|
}
|
|
3443
|
-
function
|
|
3445
|
+
function Ga(t, e) {
|
|
3444
3446
|
if (t != null) {
|
|
3445
3447
|
if (t === "on" || t === "off") return t;
|
|
3446
3448
|
throw new Error(`Invalid tools config at "${e}": expected "on" or "off", got ${JSON.stringify(t)}.`);
|
|
3447
3449
|
}
|
|
3448
3450
|
}
|
|
3449
|
-
function
|
|
3451
|
+
function Va(t) {
|
|
3450
3452
|
if (t != null && !Fe(t)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
3451
|
-
const e =
|
|
3453
|
+
const e = za(t?.policy), n = Da(t?.placement), r = qa(t?.providers), i = Ga(t?.pnpEnforcement, "pnpEnforcement"), s = {
|
|
3452
3454
|
policy: {
|
|
3453
|
-
allowed: we(
|
|
3454
|
-
blocked: we(
|
|
3455
|
+
allowed: _e(we(e?.allowed, "policy.allowed")),
|
|
3456
|
+
blocked: _e(we(e?.blocked, "policy.blocked"))
|
|
3455
3457
|
},
|
|
3456
3458
|
placement: {
|
|
3457
|
-
section: we(
|
|
3458
|
-
item: we(
|
|
3459
|
-
passage: we(
|
|
3459
|
+
section: _e(we(n?.section, "placement.section")).length ? _e(we(n?.section, "placement.section")) : [...Sn.section],
|
|
3460
|
+
item: _e(we(n?.item, "placement.item")).length ? _e(we(n?.item, "placement.item")) : [...Sn.item],
|
|
3461
|
+
passage: _e(we(n?.passage, "placement.passage")).length ? _e(we(n?.passage, "placement.passage")) : [...Sn.passage]
|
|
3460
3462
|
},
|
|
3461
3463
|
providers: r
|
|
3462
3464
|
};
|
|
3463
3465
|
return i && (s.pnpEnforcement = i), s;
|
|
3464
3466
|
}
|
|
3465
|
-
var
|
|
3467
|
+
var Ka = {
|
|
3466
3468
|
visual: {
|
|
3467
3469
|
magnification: "magnification",
|
|
3468
3470
|
screenMagnifier: "screenMagnifier",
|
|
@@ -3575,36 +3577,36 @@ var Va = {
|
|
|
3575
3577
|
itemGlossary: "itemGlossary",
|
|
3576
3578
|
tutorialAvailable: "tutorialAvailable"
|
|
3577
3579
|
}
|
|
3578
|
-
},
|
|
3580
|
+
}, Mh = Object.values(Ka).flatMap((t) => Object.values(t)), Ya = /^[a-z][a-z0-9+.-]*:/i, Xa = /* @__PURE__ */ new Set([
|
|
3579
3581
|
"http:",
|
|
3580
3582
|
"https:",
|
|
3581
3583
|
"data:",
|
|
3582
3584
|
"blob:"
|
|
3583
3585
|
]);
|
|
3584
|
-
function
|
|
3586
|
+
function Ja(t) {
|
|
3585
3587
|
return t !== void 0 && t !== 1;
|
|
3586
3588
|
}
|
|
3587
|
-
function
|
|
3589
|
+
function Qa(t) {
|
|
3588
3590
|
if (typeof t != "string") return !1;
|
|
3589
3591
|
const e = t.trim();
|
|
3590
3592
|
if (!e) return !1;
|
|
3591
|
-
if (e.startsWith("//") || !
|
|
3593
|
+
if (e.startsWith("//") || !Ya.test(e)) return !0;
|
|
3592
3594
|
const n = e.slice(0, e.indexOf(":") + 1).toLowerCase();
|
|
3593
|
-
return
|
|
3595
|
+
return Xa.has(n);
|
|
3594
3596
|
}
|
|
3595
|
-
function
|
|
3597
|
+
function Za(t) {
|
|
3596
3598
|
if (!Array.isArray(t)) return [];
|
|
3597
3599
|
const e = [];
|
|
3598
3600
|
for (const n of t) {
|
|
3599
3601
|
if (!n || typeof n != "object") continue;
|
|
3600
3602
|
const r = n;
|
|
3601
|
-
if (!
|
|
3603
|
+
if (!Qa(r.src)) continue;
|
|
3602
3604
|
const i = { src: r.src.trim() };
|
|
3603
3605
|
typeof r.type == "string" && r.type.trim() && (i.type = r.type.trim()), Number.isFinite(r.width) && (i.width = r.width), Number.isFinite(r.height) && (i.height = r.height), !e.some((s) => s.src === i.src) && e.push(i);
|
|
3604
3606
|
}
|
|
3605
3607
|
return e;
|
|
3606
3608
|
}
|
|
3607
|
-
function
|
|
3609
|
+
function el(t) {
|
|
3608
3610
|
if (!t || typeof t != "object") return;
|
|
3609
3611
|
const e = t, n = Number(e.startSeconds);
|
|
3610
3612
|
if (!Number.isFinite(n) || n < 0) return;
|
|
@@ -3614,56 +3616,56 @@ function Za(t) {
|
|
|
3614
3616
|
endSeconds: r
|
|
3615
3617
|
};
|
|
3616
3618
|
}
|
|
3617
|
-
function
|
|
3619
|
+
function tl(t) {
|
|
3618
3620
|
if (typeof t == "string")
|
|
3619
3621
|
return t.trim() || void 0;
|
|
3620
3622
|
}
|
|
3621
|
-
var
|
|
3622
|
-
function
|
|
3623
|
+
var nl = 100, rl = 1;
|
|
3624
|
+
function il(t, e, n) {
|
|
3623
3625
|
if (!e) return () => {
|
|
3624
3626
|
};
|
|
3625
3627
|
const { startSeconds: r, endSeconds: i } = e;
|
|
3626
3628
|
let s;
|
|
3627
3629
|
r > 0 && (s = () => {
|
|
3628
3630
|
t.currentTime < r && (t.currentTime = r);
|
|
3629
|
-
}, t.readyState >=
|
|
3631
|
+
}, t.readyState >= rl ? s() : t.addEventListener("loadedmetadata", s));
|
|
3630
3632
|
let o, a;
|
|
3631
3633
|
return i !== void 0 && (o = () => {
|
|
3632
3634
|
t.currentTime >= i && n();
|
|
3633
3635
|
}, t.addEventListener("timeupdate", o), a = setInterval(() => {
|
|
3634
3636
|
t.paused || o?.();
|
|
3635
|
-
},
|
|
3637
|
+
}, nl)), () => {
|
|
3636
3638
|
s && t.removeEventListener("loadedmetadata", s), o && t.removeEventListener("timeupdate", o), a !== void 0 && clearInterval(a);
|
|
3637
3639
|
};
|
|
3638
3640
|
}
|
|
3639
|
-
function
|
|
3641
|
+
function sl(t, e) {
|
|
3640
3642
|
if (!e || t.includes("#")) return t;
|
|
3641
3643
|
const n = e.endSeconds !== void 0 ? `,${e.endSeconds}` : "";
|
|
3642
3644
|
return `${t}#t=${e.startSeconds}${n}`;
|
|
3643
3645
|
}
|
|
3644
|
-
function
|
|
3646
|
+
function ol(t) {
|
|
3645
3647
|
if (!t) return null;
|
|
3646
3648
|
const e = t.payload;
|
|
3647
3649
|
if (!e || typeof e != "object") return null;
|
|
3648
3650
|
const n = e.media;
|
|
3649
3651
|
if (!n || typeof n != "object")
|
|
3650
3652
|
return console.warn("[spoken-audio] card carries a `payload` with no `media`; recorded speech needs `media.sources`, so this card is ignored and read-aloud falls back to the script or generated speech"), null;
|
|
3651
|
-
if (
|
|
3653
|
+
if (Ja(n.version))
|
|
3652
3654
|
return console.warn(`[spoken-audio] card's media declares version ${String(n.version)}, which this build does not render; the card is ignored and read-aloud falls back to the script or generated speech`), null;
|
|
3653
3655
|
if (n.kind !== void 0 && n.kind !== "audio")
|
|
3654
3656
|
return console.warn(`[spoken-audio] card's media is kind "${n.kind}", not "audio"; a spoken card carries recorded speech, so this card is ignored`), null;
|
|
3655
|
-
const r =
|
|
3657
|
+
const r = Za(n.sources);
|
|
3656
3658
|
return r.length === 0 ? (console.warn("[spoken-audio] card's `media.sources` yielded no usable URL; read-aloud falls back to the script or generated speech"), null) : {
|
|
3657
3659
|
sources: r,
|
|
3658
|
-
fragment:
|
|
3659
|
-
label:
|
|
3660
|
+
fragment: el(e.fragment),
|
|
3661
|
+
label: tl(n.label)
|
|
3660
3662
|
};
|
|
3661
3663
|
}
|
|
3662
|
-
var
|
|
3664
|
+
var Oh = ts("ToolCoordinator"), Pn;
|
|
3663
3665
|
(function(t) {
|
|
3664
3666
|
t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
3665
|
-
})(
|
|
3666
|
-
var
|
|
3667
|
+
})(Pn || (Pn = {}));
|
|
3668
|
+
var tr = (t, e) => {
|
|
3667
3669
|
const n = e?.useSentenceSegmenter !== !1;
|
|
3668
3670
|
try {
|
|
3669
3671
|
if (!n) throw new Error("Segmenter disabled by policy");
|
|
@@ -3690,13 +3692,13 @@ var Zn = (t, e) => {
|
|
|
3690
3692
|
text: t,
|
|
3691
3693
|
offset: 0
|
|
3692
3694
|
}];
|
|
3693
|
-
},
|
|
3695
|
+
}, Or = 5e3, Lr = 2e3, ns = (t) => String(t || "").trim().toLowerCase(), al = () => {
|
|
3694
3696
|
const t = typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "";
|
|
3695
|
-
return
|
|
3696
|
-
},
|
|
3697
|
+
return ns(t || "en-US");
|
|
3698
|
+
}, ll = (t, e) => {
|
|
3697
3699
|
if (e) return t.find((o) => o.voiceURI === e) || t.find((o) => o.name === e) || null;
|
|
3698
|
-
const n =
|
|
3699
|
-
const a =
|
|
3700
|
+
const n = al(), r = n.split("-")[0] || "en", i = (o) => {
|
|
3701
|
+
const a = ns(o.lang);
|
|
3700
3702
|
return a === n || a.startsWith(`${r}-`);
|
|
3701
3703
|
}, s = [
|
|
3702
3704
|
(o) => o.localService && i(o),
|
|
@@ -3710,14 +3712,14 @@ var Zn = (t, e) => {
|
|
|
3710
3712
|
if (a) return a;
|
|
3711
3713
|
}
|
|
3712
3714
|
return t[0] || null;
|
|
3713
|
-
},
|
|
3715
|
+
}, cl = (t) => !t.default, hl = class {
|
|
3714
3716
|
constructor() {
|
|
3715
3717
|
d(this, "providerId", "browser"), d(this, "providerName", "Browser Speech Synthesis"), d(this, "version", "1.0.0");
|
|
3716
3718
|
}
|
|
3717
3719
|
async initialize(t) {
|
|
3718
3720
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
3719
3721
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
3720
|
-
return new
|
|
3722
|
+
return new ul(t);
|
|
3721
3723
|
}
|
|
3722
3724
|
supportsFeature(t) {
|
|
3723
3725
|
return !0;
|
|
@@ -3735,7 +3737,7 @@ var Zn = (t, e) => {
|
|
|
3735
3737
|
}
|
|
3736
3738
|
destroy() {
|
|
3737
3739
|
}
|
|
3738
|
-
},
|
|
3740
|
+
}, ul = class {
|
|
3739
3741
|
constructor(t) {
|
|
3740
3742
|
d(this, "utterance", null), d(this, "config", null), d(this, "_isPlaying", !1), d(this, "_isPaused", !1), d(this, "speakRunId", 0), d(this, "settlePendingVoiceWait", null), d(this, "settlePendingChunk", null), d(this, "onPlaybackStart", void 0), d(this, "onWordBoundary", void 0), this.config = t;
|
|
3741
3743
|
}
|
|
@@ -3760,7 +3762,7 @@ var Zn = (t, e) => {
|
|
|
3760
3762
|
f();
|
|
3761
3763
|
}
|
|
3762
3764
|
};
|
|
3763
|
-
c = () => u(!1), this.settlePendingVoiceWait = c, l = setTimeout(() => u(!1, /* @__PURE__ */ new Error(`Configured browser voice "${e}" could not be resolved because the browser did not publish its voice inventory within ${
|
|
3765
|
+
c = () => u(!1), this.settlePendingVoiceWait = c, l = setTimeout(() => u(!1, /* @__PURE__ */ new Error(`Configured browser voice "${e}" could not be resolved because the browser did not publish its voice inventory within ${Lr / 1e3} seconds.`)), Lr), s ? i.addEventListener("voiceschanged", g) : i.onvoiceschanged = m, f();
|
|
3764
3766
|
});
|
|
3765
3767
|
}
|
|
3766
3768
|
async resolveBrowserVoice(t) {
|
|
@@ -3777,7 +3779,7 @@ var Zn = (t, e) => {
|
|
|
3777
3779
|
shouldContinue: !1,
|
|
3778
3780
|
voice: null
|
|
3779
3781
|
};
|
|
3780
|
-
const r =
|
|
3782
|
+
const r = ll(n, e || void 0);
|
|
3781
3783
|
if (e && !r) throw new Error(`Configured browser voice "${e}" is unavailable. Select a voice exposed by this browser using its voiceURI or name.`);
|
|
3782
3784
|
return {
|
|
3783
3785
|
shouldContinue: !0,
|
|
@@ -3853,7 +3855,7 @@ var Zn = (t, e) => {
|
|
|
3853
3855
|
}
|
|
3854
3856
|
segmentSentences(t) {
|
|
3855
3857
|
const e = this.getSegmentationPolicy();
|
|
3856
|
-
return
|
|
3858
|
+
return tr(t, {
|
|
3857
3859
|
locale: e.locale,
|
|
3858
3860
|
useSentenceSegmenter: e.useSentenceSegmenter
|
|
3859
3861
|
});
|
|
@@ -3869,7 +3871,7 @@ var Zn = (t, e) => {
|
|
|
3869
3871
|
return;
|
|
3870
3872
|
}
|
|
3871
3873
|
const o = new SpeechSynthesisUtterance(t);
|
|
3872
|
-
this.utterance = o, r &&
|
|
3874
|
+
this.utterance = o, r && cl(r) && (o.voice = r), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
|
|
3873
3875
|
let a = !1, l = !1, c = null, h = null;
|
|
3874
3876
|
const u = () => {
|
|
3875
3877
|
this.utterance === o && (this.utterance = null);
|
|
@@ -3879,7 +3881,7 @@ var Zn = (t, e) => {
|
|
|
3879
3881
|
o.onstart = null, o.onend = null, o.onerror = null, o.onpause = null, o.onresume = null, o.onboundary = null;
|
|
3880
3882
|
}, m = (v, b) => {
|
|
3881
3883
|
l || (l = !0, f(), g(), u(), h && this.settlePendingChunk === h && (this.settlePendingChunk = null), n === this.speakRunId && (this._isPlaying = !1, this._isPaused = !1), b ? s(b) : i(v));
|
|
3882
|
-
}, y = (v) => /* @__PURE__ */ new Error(v === "ended" ? "Browser speech synthesis ended before audio started. The browser speech engine may be unavailable or stuck; try another voice or restart the browser." : `Browser speech synthesis did not start within ${
|
|
3884
|
+
}, y = (v) => /* @__PURE__ */ new Error(v === "ended" ? "Browser speech synthesis ended before audio started. The browser speech engine may be unavailable or stuck; try another voice or restart the browser." : `Browser speech synthesis did not start within ${Or / 1e3} seconds. The browser speech engine may be unavailable or stuck; try another voice or restart the browser.`);
|
|
3883
3885
|
h = () => m(!1), this.settlePendingChunk = h, o.onstart = () => {
|
|
3884
3886
|
if (n !== this.speakRunId) {
|
|
3885
3887
|
m(!1);
|
|
@@ -3921,7 +3923,7 @@ var Zn = (t, e) => {
|
|
|
3921
3923
|
console.log("[BrowserProvider] Calling onWordBoundary with word:", H, "at position:", F), this.onWordBoundary(H, F, E);
|
|
3922
3924
|
}, c = setTimeout(() => {
|
|
3923
3925
|
l || a || n !== this.speakRunId || (m(!1, y("timedOut")), speechSynthesis.cancel());
|
|
3924
|
-
},
|
|
3926
|
+
}, Or);
|
|
3925
3927
|
try {
|
|
3926
3928
|
speechSynthesis.speak(o);
|
|
3927
3929
|
} catch (v) {
|
|
@@ -3951,7 +3953,7 @@ var Zn = (t, e) => {
|
|
|
3951
3953
|
...t.providerOptions || {}
|
|
3952
3954
|
});
|
|
3953
3955
|
}
|
|
3954
|
-
}, P = (t) => t.trim().replace(/\s+/g, " "),
|
|
3956
|
+
}, P = (t) => t.trim().replace(/\s+/g, " "), rs = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, is = (t) => {
|
|
3955
3957
|
if (t.hidden || t.tagName?.toLowerCase() === "mjx-assistive-mml" || t.getAttribute("aria-hidden") === "true" || t.hasAttribute("inert")) return !0;
|
|
3956
3958
|
const e = t.classList;
|
|
3957
3959
|
if (e?.contains("sr-only") || e?.contains("pie-sr-only") || e?.contains("visually-hidden")) return !0;
|
|
@@ -3962,28 +3964,28 @@ var Zn = (t, e) => {
|
|
|
3962
3964
|
if ((n.position === "absolute" || n.position === "fixed") && s && (n.overflow === "hidden" || o) || n.opacity === "0" && s) return !0;
|
|
3963
3965
|
}
|
|
3964
3966
|
return !1;
|
|
3965
|
-
},
|
|
3967
|
+
}, nr = (t, e) => {
|
|
3966
3968
|
let n = t.nodeType === 1 ? t : t.parentElement;
|
|
3967
3969
|
for (; n; ) {
|
|
3968
|
-
if (
|
|
3970
|
+
if (is(n)) return !0;
|
|
3969
3971
|
if (e && n === e) break;
|
|
3970
3972
|
n = n.parentElement;
|
|
3971
3973
|
}
|
|
3972
3974
|
return !1;
|
|
3973
|
-
},
|
|
3974
|
-
const e = t.getAttribute?.(
|
|
3975
|
+
}, Pr = "data-tts-suppress", ss = /* @__PURE__ */ new Set(["computer-read-aloud", "all"]), Ir = /* @__PURE__ */ new Set([...ss, "screen-reader"]), Nr = /* @__PURE__ */ new Set(), dl = (t) => {
|
|
3976
|
+
const e = t.getAttribute?.(Pr);
|
|
3975
3977
|
if (e == null) return !1;
|
|
3976
3978
|
const n = e.trim().toLowerCase();
|
|
3977
|
-
return
|
|
3978
|
-
},
|
|
3979
|
+
return ss.has(n) ? !0 : Ir.has(n) ? !1 : (Nr.has(n) || (Nr.add(n), console.warn(`[tts] ${Pr}="${e}" is not one of ${Array.from(Ir).join(", ")}; suppressing read-aloud for this content anyway, because a suppression attribute that fails open would leak the answer to items where reading is the construct. Correct the value to silence this.`)), !0);
|
|
3980
|
+
}, In = (t, e) => {
|
|
3979
3981
|
let n = t.nodeType === 1 ? t : t.parentElement;
|
|
3980
3982
|
for (; n; ) {
|
|
3981
|
-
if (
|
|
3983
|
+
if (dl(n)) return !0;
|
|
3982
3984
|
if (e && n === e) break;
|
|
3983
3985
|
n = n.parentElement;
|
|
3984
3986
|
}
|
|
3985
3987
|
return !1;
|
|
3986
|
-
}, Ct = (t, e) =>
|
|
3988
|
+
}, Ct = (t, e) => nr(t, e) || In(t), $r = (t, e) => {
|
|
3987
3989
|
if (typeof document > "u" || typeof document.createTreeWalker != "function" || typeof NodeFilter > "u" || typeof t.intersectsNode != "function") return {
|
|
3988
3990
|
text: t.toString(),
|
|
3989
3991
|
filtered: !1
|
|
@@ -4006,7 +4008,7 @@ var Zn = (t, e) => {
|
|
|
4006
4008
|
text: n.join(""),
|
|
4007
4009
|
filtered: r
|
|
4008
4010
|
};
|
|
4009
|
-
},
|
|
4011
|
+
}, os = (t, e, n) => {
|
|
4010
4012
|
if (!t || !e || /\s/.test(t) || /\s/.test(e)) return !1;
|
|
4011
4013
|
const r = n?.boundarySpacingMode ?? "segmenterPreferred";
|
|
4012
4014
|
if (r === "none") return !1;
|
|
@@ -4034,7 +4036,7 @@ var Zn = (t, e) => {
|
|
|
4034
4036
|
const f = h;
|
|
4035
4037
|
if (f.parentElement && !Ct(f, t)) {
|
|
4036
4038
|
const g = f.textContent || "", m = g.match(/\S/), y = m ? m[0] : null;
|
|
4037
|
-
!s && !o &&
|
|
4039
|
+
!s && !o && os(l, y, e) && (r.push(" "), a && n.set(i, a), i++, o = !0);
|
|
4038
4040
|
for (let v = 0; v < g.length; v++) {
|
|
4039
4041
|
const b = g[v], x = /\s/.test(b);
|
|
4040
4042
|
s ? x || (s = !1, r.push(b), n.set(i, {
|
|
@@ -4066,7 +4068,7 @@ var Zn = (t, e) => {
|
|
|
4066
4068
|
text: u,
|
|
4067
4069
|
map: n
|
|
4068
4070
|
};
|
|
4069
|
-
},
|
|
4071
|
+
}, fl = /* @__PURE__ */ new Set([
|
|
4070
4072
|
"speak",
|
|
4071
4073
|
"p",
|
|
4072
4074
|
"s",
|
|
@@ -4075,20 +4077,20 @@ var Zn = (t, e) => {
|
|
|
4075
4077
|
"say-as",
|
|
4076
4078
|
"voice",
|
|
4077
4079
|
"lang"
|
|
4078
|
-
]),
|
|
4080
|
+
]), Hr = /* @__PURE__ */ new Set(["audio", "phoneme"]), as = (t) => t.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/ /g, " ").replace(/&/g, "&"), Dt = (t, e, n) => {
|
|
4079
4081
|
for (let r = 0; r < e.length; r++) t.push({
|
|
4080
4082
|
char: e[r],
|
|
4081
4083
|
rawOffset: n === null ? null : n + r
|
|
4082
4084
|
});
|
|
4083
|
-
},
|
|
4085
|
+
}, pl = (t, e, n) => {
|
|
4084
4086
|
const r = e.slice(n).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
|
|
4085
|
-
return r ? (Dt(t,
|
|
4086
|
-
},
|
|
4087
|
+
return r ? (Dt(t, as(r[0]), n), r[0].length) : 0;
|
|
4088
|
+
}, Br = (t) => {
|
|
4087
4089
|
t.push({
|
|
4088
4090
|
char: " ",
|
|
4089
4091
|
rawOffset: null
|
|
4090
4092
|
});
|
|
4091
|
-
},
|
|
4093
|
+
}, gl = (t) => {
|
|
4092
4094
|
const e = /* @__PURE__ */ new Map(), n = [];
|
|
4093
4095
|
let r = !0;
|
|
4094
4096
|
for (const i of t) {
|
|
@@ -4104,17 +4106,17 @@ var Zn = (t, e) => {
|
|
|
4104
4106
|
text: n.join(""),
|
|
4105
4107
|
rawToSpokenOffsetMap: e
|
|
4106
4108
|
};
|
|
4107
|
-
},
|
|
4109
|
+
}, ml = (t) => t.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", vl = (t, e) => {
|
|
4108
4110
|
const n = new RegExp(`${e}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), r = t.match(n);
|
|
4109
|
-
return
|
|
4110
|
-
},
|
|
4111
|
+
return as(r?.[2] ?? r?.[3] ?? "") || null;
|
|
4112
|
+
}, ls = (t) => {
|
|
4111
4113
|
const e = [];
|
|
4112
4114
|
let n = !1, r = !1, i = 0;
|
|
4113
4115
|
for (; i < t.length; ) {
|
|
4114
4116
|
const o = t[i];
|
|
4115
4117
|
if (o !== "<") {
|
|
4116
4118
|
if (o === "&") {
|
|
4117
|
-
const f =
|
|
4119
|
+
const f = pl(e, t, i);
|
|
4118
4120
|
if (f > 0) {
|
|
4119
4121
|
i += f;
|
|
4120
4122
|
continue;
|
|
@@ -4129,9 +4131,9 @@ var Zn = (t, e) => {
|
|
|
4129
4131
|
continue;
|
|
4130
4132
|
}
|
|
4131
4133
|
r = !0;
|
|
4132
|
-
const l = t.slice(i, a + 1), c =
|
|
4134
|
+
const l = t.slice(i, a + 1), c = ml(l), h = /^<\s*\//.test(l), u = /\/\s*>$/.test(l);
|
|
4133
4135
|
if (!h && c === "sub") {
|
|
4134
|
-
const f =
|
|
4136
|
+
const f = vl(l, "alias");
|
|
4135
4137
|
if (!f) {
|
|
4136
4138
|
n = !0, i = a + 1;
|
|
4137
4139
|
continue;
|
|
@@ -4142,23 +4144,23 @@ var Zn = (t, e) => {
|
|
|
4142
4144
|
continue;
|
|
4143
4145
|
}
|
|
4144
4146
|
if (!h && c === "break") {
|
|
4145
|
-
|
|
4147
|
+
Br(e), i = a + 1;
|
|
4146
4148
|
continue;
|
|
4147
4149
|
}
|
|
4148
|
-
if (!h &&
|
|
4150
|
+
if (!h && Hr.has(c) && (n = !0, u)) {
|
|
4149
4151
|
i = a + 1;
|
|
4150
4152
|
continue;
|
|
4151
4153
|
}
|
|
4152
|
-
c && !
|
|
4154
|
+
c && !fl.has(c) && !Hr.has(c) && c !== "break" && c !== "sub" && (n = !0), !h && (c === "p" || c === "s") && Br(e), i = a + 1;
|
|
4153
4155
|
}
|
|
4154
|
-
const s =
|
|
4156
|
+
const s = gl(e);
|
|
4155
4157
|
return {
|
|
4156
4158
|
spokenText: P(s.text),
|
|
4157
4159
|
rawToSpokenOffsetMap: s.rawToSpokenOffsetMap,
|
|
4158
4160
|
unsupportedSemantic: n,
|
|
4159
4161
|
hasMarkup: r
|
|
4160
4162
|
};
|
|
4161
|
-
},
|
|
4163
|
+
}, yl = rs(), cs = /* @__PURE__ */ new Map([
|
|
4162
4164
|
["zero", "0"],
|
|
4163
4165
|
["one", "1"],
|
|
4164
4166
|
["two", "2"],
|
|
@@ -4170,7 +4172,7 @@ var Zn = (t, e) => {
|
|
|
4170
4172
|
["eight", "8"],
|
|
4171
4173
|
["nine", "9"],
|
|
4172
4174
|
["ten", "10"]
|
|
4173
|
-
]),
|
|
4175
|
+
]), bl = [
|
|
4174
4176
|
{
|
|
4175
4177
|
phrase: [
|
|
4176
4178
|
"plus",
|
|
@@ -4245,9 +4247,9 @@ var Zn = (t, e) => {
|
|
|
4245
4247
|
visible: "+",
|
|
4246
4248
|
score: 5
|
|
4247
4249
|
}
|
|
4248
|
-
],
|
|
4250
|
+
], Nn = (t) => {
|
|
4249
4251
|
const e = [];
|
|
4250
|
-
for (const n of t.matchAll(
|
|
4252
|
+
for (const n of t.matchAll(yl)) {
|
|
4251
4253
|
const r = n[0], i = n.index ?? 0;
|
|
4252
4254
|
e.push({
|
|
4253
4255
|
text: r,
|
|
@@ -4257,16 +4259,16 @@ var Zn = (t, e) => {
|
|
|
4257
4259
|
});
|
|
4258
4260
|
}
|
|
4259
4261
|
return e;
|
|
4260
|
-
},
|
|
4262
|
+
}, $n = (t) => cs.get(t.normalized) || t.normalized, Sl = (t, e) => {
|
|
4261
4263
|
const n = [];
|
|
4262
4264
|
for (let r = 0; r < t.length; r++) {
|
|
4263
|
-
for (let i = 0; i < e.length; i++)
|
|
4265
|
+
for (let i = 0; i < e.length; i++) $n(t[r]) === $n(e[i]) && n.push({
|
|
4264
4266
|
spokenStartToken: r,
|
|
4265
4267
|
spokenEndToken: r + 1,
|
|
4266
4268
|
visibleToken: i,
|
|
4267
4269
|
score: 10
|
|
4268
4270
|
});
|
|
4269
|
-
for (const i of
|
|
4271
|
+
for (const i of bl) {
|
|
4270
4272
|
const s = t.slice(r, r + i.phrase.length);
|
|
4271
4273
|
if (s.length === i.phrase.length && s.every((o, a) => o.normalized === i.phrase[a]))
|
|
4272
4274
|
for (let o = 0; o < e.length; o++)
|
|
@@ -4279,8 +4281,8 @@ var Zn = (t, e) => {
|
|
|
4279
4281
|
}
|
|
4280
4282
|
}
|
|
4281
4283
|
return n;
|
|
4282
|
-
},
|
|
4283
|
-
const n =
|
|
4284
|
+
}, Tl = (t, e) => {
|
|
4285
|
+
const n = Sl(t, e).sort((l, c) => t[l.spokenStartToken].start - t[c.spokenStartToken].start || e[l.visibleToken].start - e[c.visibleToken].start), r = new Array(n.length).fill(0), i = new Array(n.length).fill(-1);
|
|
4284
4286
|
for (let l = 0; l < n.length; l++) {
|
|
4285
4287
|
const c = n[l];
|
|
4286
4288
|
r[l] = c.score;
|
|
@@ -4309,12 +4311,12 @@ var Zn = (t, e) => {
|
|
|
4309
4311
|
score: l.score
|
|
4310
4312
|
};
|
|
4311
4313
|
});
|
|
4312
|
-
},
|
|
4314
|
+
}, wl = (t, e, n) => {
|
|
4313
4315
|
if (t.length === 0) return 0;
|
|
4314
4316
|
const r = t.length / Math.max(1, Math.min(e.length, n.length)), i = t.reduce((s, o) => s + o.score, 0) / t.length / 10;
|
|
4315
4317
|
return Math.min(1, r * i);
|
|
4316
|
-
},
|
|
4317
|
-
const e =
|
|
4318
|
+
}, hs = (t) => {
|
|
4319
|
+
const e = ls(t.speechText), n = P(t.visibleText), r = e.spokenText, i = Nn(r), s = Nn(n), o = e.unsupportedSemantic ? [] : Tl(i, s), a = wl(o, i, s), l = r === n && r.length > 0, c = o.length === 1 && o[0].score === 10 && i.length <= 2 && s.length <= 2, h = e.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (o.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", u = e.unsupportedSemantic ? "unsupported" : e.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
4318
4320
|
return {
|
|
4319
4321
|
speechText: t.speechText,
|
|
4320
4322
|
spokenText: r,
|
|
@@ -4327,16 +4329,16 @@ var Zn = (t, e) => {
|
|
|
4327
4329
|
visibleTokens: s,
|
|
4328
4330
|
rawToSpokenOffsetMap: e.rawToSpokenOffsetMap
|
|
4329
4331
|
};
|
|
4330
|
-
},
|
|
4332
|
+
}, rr = (t, e) => t.find((n) => n.start <= e && e < n.end) || null, us = (t) => {
|
|
4331
4333
|
if (!t || /^<[^>]+>$/.test(t.trim())) return null;
|
|
4332
|
-
const e =
|
|
4333
|
-
return e ?
|
|
4334
|
-
},
|
|
4335
|
-
const r =
|
|
4334
|
+
const e = Nn(t)[0];
|
|
4335
|
+
return e ? cs.get(e.normalized) || e.normalized : null;
|
|
4336
|
+
}, Wr = (t, e, n) => {
|
|
4337
|
+
const r = us(n);
|
|
4336
4338
|
if (!e || !r) return !1;
|
|
4337
|
-
const i =
|
|
4338
|
-
return i ?
|
|
4339
|
-
},
|
|
4339
|
+
const i = rr(t.spokenTokens, e.start);
|
|
4340
|
+
return i ? $n(i) === r : !1;
|
|
4341
|
+
}, Fr = (t, e) => {
|
|
4340
4342
|
const n = t.rawToSpokenOffsetMap.get(e);
|
|
4341
4343
|
if (n !== void 0) return n;
|
|
4342
4344
|
for (let r = e; r < t.speechText.length; r++) {
|
|
@@ -4345,35 +4347,35 @@ var Zn = (t, e) => {
|
|
|
4345
4347
|
if (t.speechText[r] === ">") break;
|
|
4346
4348
|
}
|
|
4347
4349
|
return null;
|
|
4348
|
-
},
|
|
4349
|
-
const r =
|
|
4350
|
+
}, Dr = (t, e, n) => {
|
|
4351
|
+
const r = Fr(t, e);
|
|
4350
4352
|
if (r === null) return null;
|
|
4351
|
-
const i =
|
|
4353
|
+
const i = Fr(t, Math.max(e, e + n - 1)), s = rr(t.spokenTokens, r), o = i !== null && i >= r ? i - r + 1 : s ? s.end - r : n;
|
|
4352
4354
|
return {
|
|
4353
4355
|
start: r,
|
|
4354
4356
|
length: Math.max(1, o)
|
|
4355
4357
|
};
|
|
4356
|
-
},
|
|
4358
|
+
}, zr = (t, e, n) => {
|
|
4357
4359
|
if (e < 0 || e >= t.spokenText.length) return null;
|
|
4358
|
-
const r =
|
|
4360
|
+
const r = rr(t.spokenTokens, e);
|
|
4359
4361
|
return r ? {
|
|
4360
4362
|
start: e,
|
|
4361
4363
|
length: Math.min(n, r.end - e)
|
|
4362
4364
|
} : null;
|
|
4363
|
-
},
|
|
4365
|
+
}, _l = (t, e, n = 1, r) => {
|
|
4364
4366
|
if (t.boundaryOffsetMode === "unsupported" || !Number.isFinite(e)) return null;
|
|
4365
4367
|
const i = Math.max(1, Number.isFinite(n) ? n : 1);
|
|
4366
4368
|
if (r && /^<[^>]+>$/.test(r.trim())) return null;
|
|
4367
4369
|
if (t.boundaryOffsetMode === "raw-ssml") {
|
|
4368
|
-
const s =
|
|
4370
|
+
const s = Dr(t, e, i), o = zr(t, e, i);
|
|
4369
4371
|
if (r) {
|
|
4370
|
-
if (
|
|
4371
|
-
if (
|
|
4372
|
-
if (
|
|
4372
|
+
if (Wr(t, s, r)) return s;
|
|
4373
|
+
if (Wr(t, o, r)) return o;
|
|
4374
|
+
if (us(r)) return null;
|
|
4373
4375
|
}
|
|
4374
4376
|
return s || o;
|
|
4375
4377
|
}
|
|
4376
|
-
return
|
|
4378
|
+
return zr(t, e, i) || Dr(t, e, i);
|
|
4377
4379
|
}, kl = (t, e) => {
|
|
4378
4380
|
if (t.playbackMode === "region-fallback") return null;
|
|
4379
4381
|
const n = t.anchors.find((s) => s.spokenStart <= e && e < s.spokenEnd);
|
|
@@ -4396,7 +4398,7 @@ var Zn = (t, e) => {
|
|
|
4396
4398
|
start: Math.min(r.visibleStart, i.visibleStart),
|
|
4397
4399
|
end: Math.max(r.visibleEnd, i.visibleEnd)
|
|
4398
4400
|
} : null;
|
|
4399
|
-
},
|
|
4401
|
+
}, El = /* @__PURE__ */ new Map([
|
|
4400
4402
|
["+", ["plus"]],
|
|
4401
4403
|
["-", ["minus", "negative"]],
|
|
4402
4404
|
["−", ["minus", "negative"]],
|
|
@@ -4420,12 +4422,12 @@ var Zn = (t, e) => {
|
|
|
4420
4422
|
["•", ["times"]],
|
|
4421
4423
|
["·", ["times"]],
|
|
4422
4424
|
["", ["times", "multiplied by"]]
|
|
4423
|
-
]),
|
|
4425
|
+
]), Al = /* @__PURE__ */ new Map([
|
|
4424
4426
|
["", "function-application"],
|
|
4425
4427
|
["", "implicit-multiply"],
|
|
4426
4428
|
["", "invisible-separator"],
|
|
4427
4429
|
["", "invisible-plus"]
|
|
4428
|
-
]),
|
|
4430
|
+
]), ds = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), Cl = /* @__PURE__ */ new Map([
|
|
4429
4431
|
["msqrt", "radical"],
|
|
4430
4432
|
["mroot", "radical"],
|
|
4431
4433
|
["msub", "subscript"],
|
|
@@ -4435,11 +4437,11 @@ var Zn = (t, e) => {
|
|
|
4435
4437
|
["munderover", "underoverscript"],
|
|
4436
4438
|
["mmultiscripts", "multiscript"],
|
|
4437
4439
|
["menclose", "enclosure"]
|
|
4438
|
-
]),
|
|
4440
|
+
]), xl = (t) => t.replace(/\s+/g, " ").trim(), De = (t) => (t.localName || t.tagName || "").toLowerCase(), Rl = (t) => t.nodeType === Node.ELEMENT_NODE, ot = (t) => Array.from(t.childNodes).filter(Rl), ir = (t) => xl(t.textContent || ""), be = (t, e) => ({
|
|
4439
4441
|
type: "element-range",
|
|
4440
4442
|
quality: e,
|
|
4441
4443
|
element: t
|
|
4442
|
-
}),
|
|
4444
|
+
}), Ml = (t) => {
|
|
4443
4445
|
switch (t) {
|
|
4444
4446
|
case "mi":
|
|
4445
4447
|
return "identifier";
|
|
@@ -4455,36 +4457,36 @@ var Zn = (t, e) => {
|
|
|
4455
4457
|
default:
|
|
4456
4458
|
return "unknown";
|
|
4457
4459
|
}
|
|
4458
|
-
},
|
|
4459
|
-
const e = t.normalized ??
|
|
4460
|
+
}, Ol = (t, e) => e === "operator" ? t === "−" ? "-" : t : t.toLowerCase(), Ll = (t, e, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? ds.get(t) ?? [] : t === "|" ? ["absolute value"] : e === "operator" ? El.get(t) || [] : [], je = (t) => {
|
|
4461
|
+
const e = t.normalized ?? Ol(t.text, t.kind || "unknown");
|
|
4460
4462
|
return {
|
|
4461
4463
|
id: `math-token-${t.state.nextId++}`,
|
|
4462
4464
|
kind: t.kind,
|
|
4463
4465
|
role: t.role,
|
|
4464
4466
|
text: t.text,
|
|
4465
4467
|
normalized: e,
|
|
4466
|
-
spokenAliases:
|
|
4468
|
+
spokenAliases: Ll(t.text, t.kind, t.role),
|
|
4467
4469
|
sourceElement: t.sourceElement,
|
|
4468
4470
|
path: t.path,
|
|
4469
|
-
target: t.target ||
|
|
4471
|
+
target: t.target || be(t.sourceElement, "element-range"),
|
|
4470
4472
|
optional: t.optional
|
|
4471
4473
|
};
|
|
4472
4474
|
}, Ge = (t, e, n = "tokens") => {
|
|
4473
4475
|
t[n].push(e);
|
|
4474
|
-
},
|
|
4475
|
-
ot(t).forEach((r, i) =>
|
|
4476
|
-
},
|
|
4476
|
+
}, fs = (t, e, n) => {
|
|
4477
|
+
ot(t).forEach((r, i) => Se(r, e, `${n}/${De(r)}[${i}]`));
|
|
4478
|
+
}, Pl = (t, e, n) => {
|
|
4477
4479
|
const r = ot(t);
|
|
4478
|
-
r[0] &&
|
|
4480
|
+
r[0] && Se(r[0], e, `${n}/numerator`), Ge(e, je({
|
|
4479
4481
|
state: e,
|
|
4480
4482
|
kind: "structure",
|
|
4481
4483
|
role: "fraction",
|
|
4482
4484
|
text: "/",
|
|
4483
4485
|
sourceElement: t,
|
|
4484
4486
|
path: n,
|
|
4485
|
-
target:
|
|
4486
|
-
})), r[1] &&
|
|
4487
|
-
},
|
|
4487
|
+
target: be(t, "element-range")
|
|
4488
|
+
})), r[1] && Se(r[1], e, `${n}/denominator`);
|
|
4489
|
+
}, Il = (t, e, n) => {
|
|
4488
4490
|
const r = t.getAttribute("open") || "(", i = t.getAttribute("close") || ")";
|
|
4489
4491
|
Ge(e, je({
|
|
4490
4492
|
state: e,
|
|
@@ -4493,23 +4495,23 @@ var Zn = (t, e) => {
|
|
|
4493
4495
|
text: r,
|
|
4494
4496
|
sourceElement: t,
|
|
4495
4497
|
path: `${n}/open`,
|
|
4496
|
-
target:
|
|
4497
|
-
})),
|
|
4498
|
+
target: be(t, "element-range")
|
|
4499
|
+
})), fs(t, e, n), Ge(e, je({
|
|
4498
4500
|
state: e,
|
|
4499
4501
|
kind: "operator",
|
|
4500
4502
|
role: i === "|" ? "absolute-value-fence" : "close-fence",
|
|
4501
4503
|
text: i,
|
|
4502
4504
|
sourceElement: t,
|
|
4503
4505
|
path: `${n}/close`,
|
|
4504
|
-
target:
|
|
4506
|
+
target: be(t, "element-range")
|
|
4505
4507
|
}));
|
|
4506
|
-
},
|
|
4508
|
+
}, Nl = (t, e, n) => {
|
|
4507
4509
|
const r = ot(t);
|
|
4508
|
-
r[0] &&
|
|
4510
|
+
r[0] && Se(r[0], e, `${n}/base`);
|
|
4509
4511
|
const i = r[1];
|
|
4510
4512
|
if (!i) return;
|
|
4511
|
-
const s =
|
|
4512
|
-
if (
|
|
4513
|
+
const s = ir(i);
|
|
4514
|
+
if (ds.has(s)) {
|
|
4513
4515
|
Ge(e, je({
|
|
4514
4516
|
state: e,
|
|
4515
4517
|
kind: "structure",
|
|
@@ -4518,23 +4520,23 @@ var Zn = (t, e) => {
|
|
|
4518
4520
|
normalized: s,
|
|
4519
4521
|
sourceElement: i,
|
|
4520
4522
|
path: `${n}/exponent`,
|
|
4521
|
-
target:
|
|
4523
|
+
target: be(t, "element-range")
|
|
4522
4524
|
}));
|
|
4523
4525
|
return;
|
|
4524
4526
|
}
|
|
4525
|
-
|
|
4526
|
-
},
|
|
4527
|
+
Se(i, e, `${n}/exponent`);
|
|
4528
|
+
}, $l = (t, e, n, r) => {
|
|
4527
4529
|
Ge(e, je({
|
|
4528
4530
|
state: e,
|
|
4529
4531
|
kind: "structure",
|
|
4530
4532
|
role: r,
|
|
4531
|
-
text:
|
|
4533
|
+
text: ir(t) || r,
|
|
4532
4534
|
normalized: `\0${r}`,
|
|
4533
4535
|
sourceElement: t,
|
|
4534
4536
|
path: n,
|
|
4535
|
-
target:
|
|
4537
|
+
target: be(t, "element-range")
|
|
4536
4538
|
}));
|
|
4537
|
-
},
|
|
4539
|
+
}, Hl = (t, e, n) => {
|
|
4538
4540
|
let r = 0;
|
|
4539
4541
|
for (const i of ot(t))
|
|
4540
4542
|
(De(i) === "mtr" || De(i) === "mlabeledtr") && (r++, Ge(e, je({
|
|
@@ -4545,12 +4547,12 @@ var Zn = (t, e) => {
|
|
|
4545
4547
|
normalized: `row-${r}`,
|
|
4546
4548
|
sourceElement: i,
|
|
4547
4549
|
path: `${n}/row[${r}]`,
|
|
4548
|
-
target:
|
|
4549
|
-
}), "layoutTargets")),
|
|
4550
|
-
},
|
|
4551
|
-
const r =
|
|
4550
|
+
target: be(i, "region-fallback")
|
|
4551
|
+
}), "layoutTargets")), Se(i, e, `${n}/${De(i)}[${r}]`);
|
|
4552
|
+
}, Bl = (t, e, n) => {
|
|
4553
|
+
const r = ir(t);
|
|
4552
4554
|
if (!r) return;
|
|
4553
|
-
const i =
|
|
4555
|
+
const i = Ml(De(t)), s = i === "operator" ? Al.get(r) : void 0, o = s ?? (i === "operator" && (r === "(" || r === ")") ? "grouping-fence" : i);
|
|
4554
4556
|
Ge(e, je({
|
|
4555
4557
|
state: e,
|
|
4556
4558
|
kind: i,
|
|
@@ -4558,10 +4560,10 @@ var Zn = (t, e) => {
|
|
|
4558
4560
|
text: r,
|
|
4559
4561
|
sourceElement: t,
|
|
4560
4562
|
path: n,
|
|
4561
|
-
target: s && t.parentElement ?
|
|
4563
|
+
target: s && t.parentElement ? be(t.parentElement, "region-fallback") : void 0,
|
|
4562
4564
|
optional: !!s || o === "grouping-fence"
|
|
4563
4565
|
}));
|
|
4564
|
-
},
|
|
4566
|
+
}, Se = (t, e, n) => {
|
|
4565
4567
|
const r = De(t);
|
|
4566
4568
|
switch (r) {
|
|
4567
4569
|
case "annotation":
|
|
@@ -4572,7 +4574,7 @@ var Zn = (t, e) => {
|
|
|
4572
4574
|
const o = De(s);
|
|
4573
4575
|
return o !== "annotation" && o !== "annotation-xml";
|
|
4574
4576
|
});
|
|
4575
|
-
i &&
|
|
4577
|
+
i && Se(i, e, `${n}/presentation`);
|
|
4576
4578
|
return;
|
|
4577
4579
|
}
|
|
4578
4580
|
case "mi":
|
|
@@ -4581,48 +4583,48 @@ var Zn = (t, e) => {
|
|
|
4581
4583
|
case "mtext":
|
|
4582
4584
|
case "ms":
|
|
4583
4585
|
case "mspace":
|
|
4584
|
-
|
|
4586
|
+
Bl(t, e, n);
|
|
4585
4587
|
return;
|
|
4586
4588
|
case "mfrac":
|
|
4587
|
-
|
|
4589
|
+
Pl(t, e, n);
|
|
4588
4590
|
return;
|
|
4589
4591
|
case "msup":
|
|
4590
|
-
|
|
4592
|
+
Nl(t, e, n);
|
|
4591
4593
|
return;
|
|
4592
4594
|
case "mfenced":
|
|
4593
|
-
|
|
4595
|
+
Il(t, e, n);
|
|
4594
4596
|
return;
|
|
4595
4597
|
case "mtable":
|
|
4596
|
-
|
|
4598
|
+
Hl(t, e, n);
|
|
4597
4599
|
return;
|
|
4598
4600
|
case "mphantom":
|
|
4599
4601
|
return;
|
|
4600
4602
|
case "maction": {
|
|
4601
4603
|
const i = ot(t)[0];
|
|
4602
|
-
i &&
|
|
4604
|
+
i && Se(i, e, `${n}/action`);
|
|
4603
4605
|
return;
|
|
4604
4606
|
}
|
|
4605
4607
|
default: {
|
|
4606
|
-
const i =
|
|
4608
|
+
const i = Cl.get(r);
|
|
4607
4609
|
if (i) {
|
|
4608
|
-
|
|
4610
|
+
$l(t, e, n, i);
|
|
4609
4611
|
return;
|
|
4610
4612
|
}
|
|
4611
|
-
|
|
4613
|
+
fs(t, e, n);
|
|
4612
4614
|
}
|
|
4613
4615
|
}
|
|
4614
|
-
},
|
|
4616
|
+
}, Wl = (t) => {
|
|
4615
4617
|
const e = {
|
|
4616
4618
|
tokens: [],
|
|
4617
4619
|
layoutTargets: [],
|
|
4618
4620
|
nextId: 0
|
|
4619
4621
|
};
|
|
4620
|
-
return
|
|
4622
|
+
return Se(t, e, "/math"), {
|
|
4621
4623
|
tokens: e.tokens,
|
|
4622
4624
|
layoutTargets: e.layoutTargets,
|
|
4623
|
-
expressionTarget:
|
|
4625
|
+
expressionTarget: be(t, "region-fallback")
|
|
4624
4626
|
};
|
|
4625
|
-
},
|
|
4627
|
+
}, Fl = (t) => t.boundary && t.alignment.segments.find((e) => e.speechTokenIds.includes(t.boundary.token.id))?.target || null, Dl = 0.95, zl = (t) => {
|
|
4626
4628
|
const e = [], n = /* @__PURE__ */ new Set(), r = (i) => {
|
|
4627
4629
|
const s = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
4628
4630
|
if (s.length === 0) return;
|
|
@@ -4632,7 +4634,7 @@ var Zn = (t, e) => {
|
|
|
4632
4634
|
r(t.normalized);
|
|
4633
4635
|
for (const i of t.spokenAliases) r(i);
|
|
4634
4636
|
return e;
|
|
4635
|
-
},
|
|
4637
|
+
}, Ur = (t, e, n) => {
|
|
4636
4638
|
let r = 0;
|
|
4637
4639
|
for (const i of n) {
|
|
4638
4640
|
if (i.length <= r) continue;
|
|
@@ -4647,13 +4649,13 @@ var Zn = (t, e) => {
|
|
|
4647
4649
|
s && (r = i.length);
|
|
4648
4650
|
}
|
|
4649
4651
|
return r;
|
|
4650
|
-
},
|
|
4652
|
+
}, Ul = (t, e) => {
|
|
4651
4653
|
const n = [];
|
|
4652
4654
|
let r = 0;
|
|
4653
4655
|
for (const i of e) {
|
|
4654
|
-
const s =
|
|
4656
|
+
const s = zl(i);
|
|
4655
4657
|
if (i.optional) {
|
|
4656
|
-
const o =
|
|
4658
|
+
const o = Ur(t, r, s);
|
|
4657
4659
|
o > 0 && (n.push({
|
|
4658
4660
|
speechTokens: t.slice(r, r + o),
|
|
4659
4661
|
math: i
|
|
@@ -4661,7 +4663,7 @@ var Zn = (t, e) => {
|
|
|
4661
4663
|
continue;
|
|
4662
4664
|
}
|
|
4663
4665
|
for (; r < t.length; ) {
|
|
4664
|
-
const o =
|
|
4666
|
+
const o = Ur(t, r, s);
|
|
4665
4667
|
if (o > 0) {
|
|
4666
4668
|
n.push({
|
|
4667
4669
|
speechTokens: t.slice(r, r + o),
|
|
@@ -4673,23 +4675,23 @@ var Zn = (t, e) => {
|
|
|
4673
4675
|
}
|
|
4674
4676
|
}
|
|
4675
4677
|
return n;
|
|
4676
|
-
},
|
|
4678
|
+
}, ql = (t, e, n) => {
|
|
4677
4679
|
const r = n.filter((o) => !o.optional).length, i = t.filter((o) => !o.math.optional).length, s = t.reduce((o, a) => o + a.speechTokens.length, 0);
|
|
4678
4680
|
return r > 0 && i === r && s === e.length;
|
|
4679
|
-
},
|
|
4681
|
+
}, jl = (t) => t.map(({ speechTokens: e, math: n }) => ({
|
|
4680
4682
|
speechTokenIds: e.map((r) => r.id),
|
|
4681
4683
|
mathTokenIds: [n.id],
|
|
4682
4684
|
score: 1,
|
|
4683
4685
|
confidence: 1,
|
|
4684
4686
|
target: n.target
|
|
4685
|
-
})),
|
|
4686
|
-
const e = t.minExactWordConfidence ??
|
|
4687
|
+
})), Gl = (t) => {
|
|
4688
|
+
const e = t.minExactWordConfidence ?? Dl, n = Ul(t.speech.tokens, t.math.tokens), r = ql(n, t.speech.tokens, t.math.tokens) ? 1 : 0;
|
|
4687
4689
|
return {
|
|
4688
|
-
segments: r >= e ?
|
|
4690
|
+
segments: r >= e ? jl(n) : [],
|
|
4689
4691
|
confidence: r,
|
|
4690
4692
|
fallbackTarget: t.math.expressionTarget
|
|
4691
4693
|
};
|
|
4692
|
-
},
|
|
4694
|
+
}, ps = rs(), Vl = /* @__PURE__ */ new Map([
|
|
4693
4695
|
["zero", "0"],
|
|
4694
4696
|
["one", "1"],
|
|
4695
4697
|
["two", "2"],
|
|
@@ -4701,17 +4703,17 @@ var Zn = (t, e) => {
|
|
|
4701
4703
|
["eight", "8"],
|
|
4702
4704
|
["nine", "9"],
|
|
4703
4705
|
["ten", "10"]
|
|
4704
|
-
]),
|
|
4706
|
+
]), gs = (t) => {
|
|
4705
4707
|
const e = t.toLowerCase();
|
|
4706
|
-
return
|
|
4707
|
-
},
|
|
4708
|
+
return Vl.get(e) || e;
|
|
4709
|
+
}, Kl = (t) => {
|
|
4708
4710
|
const e = [];
|
|
4709
|
-
for (const n of t.matchAll(
|
|
4711
|
+
for (const n of t.matchAll(ps)) {
|
|
4710
4712
|
const r = n[0], i = n.index ?? 0;
|
|
4711
4713
|
e.push({
|
|
4712
4714
|
id: `speech-token-${e.length}`,
|
|
4713
4715
|
text: r,
|
|
4714
|
-
normalized:
|
|
4716
|
+
normalized: gs(r),
|
|
4715
4717
|
start: i,
|
|
4716
4718
|
end: i + r.length,
|
|
4717
4719
|
sourceStart: i,
|
|
@@ -4721,21 +4723,21 @@ var Zn = (t, e) => {
|
|
|
4721
4723
|
}
|
|
4722
4724
|
return e;
|
|
4723
4725
|
}, xt = (t) => {
|
|
4724
|
-
const e =
|
|
4726
|
+
const e = ls(t.speechText);
|
|
4725
4727
|
return {
|
|
4726
4728
|
speechText: t.speechText,
|
|
4727
4729
|
spokenText: e.spokenText,
|
|
4728
|
-
tokens:
|
|
4730
|
+
tokens: Kl(e.spokenText),
|
|
4729
4731
|
rawToSpokenOffsetMap: e.rawToSpokenOffsetMap,
|
|
4730
4732
|
boundaryOffsetSpace: e.unsupportedSemantic ? "unsupported" : e.hasMarkup ? "raw-ssml" : "plain-spoken-text",
|
|
4731
4733
|
unsupportedSemantic: e.unsupportedSemantic,
|
|
4732
4734
|
hasMarkup: e.hasMarkup
|
|
4733
4735
|
};
|
|
4734
|
-
},
|
|
4736
|
+
}, sr = (t) => {
|
|
4735
4737
|
if (!t || /^<[^>]+>$/.test(t.trim())) return null;
|
|
4736
|
-
const e = t.match(
|
|
4737
|
-
return e?.[0] ?
|
|
4738
|
-
},
|
|
4738
|
+
const e = t.match(ps);
|
|
4739
|
+
return e?.[0] ? gs(e[0]) : null;
|
|
4740
|
+
}, Yl = (t, e) => t.find((n) => n.start <= e && e < n.end) || null, Xl = (t, e) => {
|
|
4739
4741
|
const n = t.rawToSpokenOffsetMap.get(e);
|
|
4740
4742
|
if (n !== void 0) return n;
|
|
4741
4743
|
for (let r = e; r < t.speechText.length; r++) {
|
|
@@ -4744,57 +4746,57 @@ var Zn = (t, e) => {
|
|
|
4744
4746
|
if (t.speechText[r] === ">") break;
|
|
4745
4747
|
}
|
|
4746
4748
|
return null;
|
|
4747
|
-
},
|
|
4749
|
+
}, Hn = (t, e, n) => {
|
|
4748
4750
|
if (e === null) return null;
|
|
4749
|
-
const r =
|
|
4751
|
+
const r = Yl(t.tokens, e);
|
|
4750
4752
|
return r ? {
|
|
4751
4753
|
token: r,
|
|
4752
4754
|
start: e,
|
|
4753
4755
|
length: Math.max(1, Math.min(n, r.end - e)),
|
|
4754
4756
|
confidence: 0.75
|
|
4755
4757
|
} : null;
|
|
4756
|
-
},
|
|
4757
|
-
const n =
|
|
4758
|
+
}, Bn = (t, e) => {
|
|
4759
|
+
const n = sr(e);
|
|
4758
4760
|
return !!(t && n && t.token.normalized === n);
|
|
4759
|
-
},
|
|
4761
|
+
}, Jl = (t) => {
|
|
4760
4762
|
if (t.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(t.position) || t.boundaryWord && /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
|
|
4761
|
-
const e = Math.max(1, Number.isFinite(t.length) ? t.length : 1), n =
|
|
4762
|
-
return
|
|
4763
|
+
const e = Math.max(1, Number.isFinite(t.length) ? t.length : 1), n = Hn(t.tokenization, Xl(t.tokenization, t.position), e), r = Hn(t.tokenization, t.position >= 0 && t.position < t.tokenization.spokenText.length ? t.position : null, e);
|
|
4764
|
+
return Bn(n, t.boundaryWord) ? {
|
|
4763
4765
|
...n,
|
|
4764
4766
|
confidence: 1
|
|
4765
|
-
} :
|
|
4767
|
+
} : Bn(r, t.boundaryWord) ? {
|
|
4766
4768
|
...r,
|
|
4767
4769
|
confidence: 1
|
|
4768
|
-
} : t.boundaryWord &&
|
|
4769
|
-
},
|
|
4770
|
+
} : t.boundaryWord && sr(t.boundaryWord) ? null : t.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
|
|
4771
|
+
}, Ql = (t) => {
|
|
4770
4772
|
if (t.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(t.position) || t.boundaryWord && /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
|
|
4771
|
-
const e = Math.max(1, Number.isFinite(t.length) ? t.length : 1), n =
|
|
4772
|
-
return
|
|
4773
|
+
const e = Math.max(1, Number.isFinite(t.length) ? t.length : 1), n = Hn(t.tokenization, t.position >= 0 && t.position < t.tokenization.spokenText.length ? t.position : null, e);
|
|
4774
|
+
return Bn(n, t.boundaryWord) ? {
|
|
4773
4775
|
...n,
|
|
4774
4776
|
confidence: 1
|
|
4775
|
-
} : t.boundaryWord &&
|
|
4777
|
+
} : t.boundaryWord && sr(t.boundaryWord) ? null : n;
|
|
4776
4778
|
}, rn = (t) => {
|
|
4777
|
-
const e = xt({ speechText: t.speechText }), n =
|
|
4779
|
+
const e = xt({ speechText: t.speechText }), n = Wl(t.mathElement);
|
|
4778
4780
|
return {
|
|
4779
4781
|
speech: e,
|
|
4780
4782
|
math: n,
|
|
4781
|
-
result:
|
|
4783
|
+
result: Gl({
|
|
4782
4784
|
speech: e,
|
|
4783
4785
|
math: n
|
|
4784
4786
|
})
|
|
4785
4787
|
};
|
|
4786
|
-
},
|
|
4787
|
-
const n =
|
|
4788
|
+
}, Zl = (t, e) => {
|
|
4789
|
+
const n = Ql({
|
|
4788
4790
|
tokenization: t.speech,
|
|
4789
4791
|
position: e.position,
|
|
4790
4792
|
length: e.length,
|
|
4791
4793
|
boundaryWord: e.boundaryWord
|
|
4792
4794
|
});
|
|
4793
|
-
return
|
|
4795
|
+
return Fl({
|
|
4794
4796
|
alignment: t.result,
|
|
4795
4797
|
boundary: n
|
|
4796
4798
|
});
|
|
4797
|
-
},
|
|
4799
|
+
}, ec = (t, e) => {
|
|
4798
4800
|
if (!e.boundaryWord || /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
4799
4801
|
const n = xt({ speechText: e.boundaryWord }).tokens[0];
|
|
4800
4802
|
if (!n) return null;
|
|
@@ -4803,7 +4805,7 @@ var Zn = (t, e) => {
|
|
|
4803
4805
|
return i.normalized.toLowerCase() === s || i.spokenAliases.some((o) => o.toLowerCase() === s);
|
|
4804
4806
|
});
|
|
4805
4807
|
return r.length === 1 ? r[0].target : null;
|
|
4806
|
-
},
|
|
4808
|
+
}, Wn = "http://www.w3.org/1998/Math/MathML", tc = /* @__PURE__ */ new Set([
|
|
4807
4809
|
"math",
|
|
4808
4810
|
"maction",
|
|
4809
4811
|
"menclose",
|
|
@@ -4837,7 +4839,7 @@ var Zn = (t, e) => {
|
|
|
4837
4839
|
"semantics",
|
|
4838
4840
|
"annotation",
|
|
4839
4841
|
"annotation-xml"
|
|
4840
|
-
]),
|
|
4842
|
+
]), nc = /* @__PURE__ */ new Set([
|
|
4841
4843
|
"accent",
|
|
4842
4844
|
"accentunder",
|
|
4843
4845
|
"align",
|
|
@@ -4889,44 +4891,44 @@ var Zn = (t, e) => {
|
|
|
4889
4891
|
"width",
|
|
4890
4892
|
"xmlns",
|
|
4891
4893
|
"xml:lang"
|
|
4892
|
-
]),
|
|
4894
|
+
]), ms = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), rc = (t) => ms(t).replace(/"/g, """), ic = (t, e) => {
|
|
4893
4895
|
const n = t.toLowerCase(), r = e.trim().toLowerCase();
|
|
4894
|
-
return !!(n.startsWith("on") || !
|
|
4895
|
-
},
|
|
4896
|
+
return !!(n.startsWith("on") || !nc.has(n) || r.includes("javascript:") || r.includes("data:text/html"));
|
|
4897
|
+
}, sc = (t) => {
|
|
4896
4898
|
const e = t.localName.toLowerCase();
|
|
4897
|
-
if (!
|
|
4899
|
+
if (!tc.has(e)) return !1;
|
|
4898
4900
|
const n = t.namespaceURI;
|
|
4899
|
-
return !n || n ===
|
|
4900
|
-
},
|
|
4901
|
-
if (t.nodeType === Node.TEXT_NODE) return
|
|
4901
|
+
return !n || n === Wn || n === "http://www.w3.org/1999/xhtml";
|
|
4902
|
+
}, vs = (t) => {
|
|
4903
|
+
if (t.nodeType === Node.TEXT_NODE) return ms(t.textContent || "");
|
|
4902
4904
|
if (t.nodeType === Node.COMMENT_NODE) return "";
|
|
4903
4905
|
if (t.nodeType !== Node.ELEMENT_NODE) return null;
|
|
4904
4906
|
const e = t;
|
|
4905
|
-
if (!
|
|
4907
|
+
if (!sc(e)) return null;
|
|
4906
4908
|
const n = e.localName.toLowerCase(), r = [];
|
|
4907
4909
|
for (const s of Array.from(e.attributes)) {
|
|
4908
4910
|
const o = s.name.toLowerCase();
|
|
4909
|
-
if (!
|
|
4910
|
-
if (o === "xmlns" && s.value !==
|
|
4911
|
-
r.push(`${o}="${
|
|
4911
|
+
if (!ic(o, s.value)) {
|
|
4912
|
+
if (o === "xmlns" && s.value !== Wn) return null;
|
|
4913
|
+
r.push(`${o}="${rc(s.value)}"`);
|
|
4912
4914
|
}
|
|
4913
4915
|
}
|
|
4914
|
-
n === "math" && !r.some((s) => s.startsWith("xmlns=")) && r.unshift(`xmlns="${
|
|
4916
|
+
n === "math" && !r.some((s) => s.startsWith("xmlns=")) && r.unshift(`xmlns="${Wn}"`);
|
|
4915
4917
|
const i = [];
|
|
4916
4918
|
for (const s of Array.from(e.childNodes)) {
|
|
4917
|
-
const o =
|
|
4919
|
+
const o = vs(s);
|
|
4918
4920
|
if (o === null) return null;
|
|
4919
4921
|
i.push(o);
|
|
4920
4922
|
}
|
|
4921
4923
|
return `<${n}${r.length > 0 ? ` ${r.join(" ")}` : ""}>${i.join("")}</${n}>`;
|
|
4922
|
-
},
|
|
4924
|
+
}, oc = (t) => typeof DOMParser < "u" ? new DOMParser().parseFromString(t, "application/xml") : null, Tn = (t) => {
|
|
4923
4925
|
const e = String(t || "").trim();
|
|
4924
4926
|
if (!e) return null;
|
|
4925
|
-
const n =
|
|
4927
|
+
const n = oc(e);
|
|
4926
4928
|
if (!n || n.getElementsByTagName("parsererror").length > 0) return null;
|
|
4927
4929
|
const r = n.documentElement;
|
|
4928
|
-
return !r || r.localName.toLowerCase() !== "math" ? null :
|
|
4929
|
-
},
|
|
4930
|
+
return !r || r.localName.toLowerCase() !== "math" ? null : vs(r);
|
|
4931
|
+
}, ys = (t) => ({
|
|
4930
4932
|
chars: [],
|
|
4931
4933
|
map: /* @__PURE__ */ new Map(),
|
|
4932
4934
|
position: 0,
|
|
@@ -4934,28 +4936,28 @@ var Zn = (t, e) => {
|
|
|
4934
4936
|
lastCharWasWhitespace: !1,
|
|
4935
4937
|
lastMapped: null,
|
|
4936
4938
|
options: t
|
|
4937
|
-
}),
|
|
4939
|
+
}), bs = (t) => t.classList?.contains("MathJax") || t.tagName?.toLowerCase() === "mjx-container", Ss = (t) => t.tagName?.toLowerCase() === "mjx-assistive-mml", Ts = (t) => {
|
|
4938
4940
|
const e = t.tagName?.toLowerCase();
|
|
4939
4941
|
return e === "annotation" || e === "annotation-xml";
|
|
4940
|
-
},
|
|
4942
|
+
}, ac = (t) => {
|
|
4941
4943
|
const e = t.getAttribute("data-mathml");
|
|
4942
4944
|
return e && e.trim() ? e : null;
|
|
4943
|
-
},
|
|
4944
|
-
if (t.tagName.toLowerCase() === "math") return
|
|
4945
|
-
const e =
|
|
4945
|
+
}, lc = (t) => t.querySelector("mjx-assistive-mml math")?.outerHTML || null, cc = (t) => {
|
|
4946
|
+
if (t.tagName.toLowerCase() === "math") return Tn(t.outerHTML);
|
|
4947
|
+
const e = ac(t);
|
|
4946
4948
|
if (e) {
|
|
4947
|
-
const n =
|
|
4949
|
+
const n = Tn(e);
|
|
4948
4950
|
if (n) return n;
|
|
4949
4951
|
}
|
|
4950
|
-
if (
|
|
4951
|
-
const n =
|
|
4952
|
+
if (bs(t)) {
|
|
4953
|
+
const n = lc(t);
|
|
4952
4954
|
if (n) {
|
|
4953
|
-
const r =
|
|
4955
|
+
const r = Tn(n);
|
|
4954
4956
|
if (r) return r;
|
|
4955
4957
|
}
|
|
4956
4958
|
}
|
|
4957
4959
|
return null;
|
|
4958
|
-
},
|
|
4960
|
+
}, hc = /* @__PURE__ */ new Set([
|
|
4959
4961
|
"P",
|
|
4960
4962
|
"H1",
|
|
4961
4963
|
"H2",
|
|
@@ -4971,7 +4973,7 @@ var Zn = (t, e) => {
|
|
|
4971
4973
|
"FIGCAPTION",
|
|
4972
4974
|
"LABEL",
|
|
4973
4975
|
"BUTTON"
|
|
4974
|
-
]),
|
|
4976
|
+
]), uc = /* @__PURE__ */ new Set([
|
|
4975
4977
|
"heading",
|
|
4976
4978
|
"listitem",
|
|
4977
4979
|
"option",
|
|
@@ -4980,51 +4982,51 @@ var Zn = (t, e) => {
|
|
|
4980
4982
|
"cell",
|
|
4981
4983
|
"columnheader",
|
|
4982
4984
|
"rowheader"
|
|
4983
|
-
]),
|
|
4985
|
+
]), dc = (t, e) => {
|
|
4984
4986
|
let n = t.parentElement, r = null;
|
|
4985
4987
|
for (; n && n !== e; ) {
|
|
4986
4988
|
const i = (n.getAttribute("role") || "").toLowerCase(), s = n.tagName.toUpperCase();
|
|
4987
|
-
if (
|
|
4989
|
+
if (hc.has(s) || uc.has(i)) {
|
|
4988
4990
|
r = n;
|
|
4989
4991
|
break;
|
|
4990
4992
|
}
|
|
4991
4993
|
n = n.parentElement;
|
|
4992
4994
|
}
|
|
4993
4995
|
return r || e;
|
|
4994
|
-
},
|
|
4996
|
+
}, fc = (t) => !!(typeof t.querySelector == "function" && t.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || t.tagName?.toLowerCase() === "math" || t.hasAttribute?.("data-mathml") || bs(t), Ie = (t, e, n) => {
|
|
4995
4997
|
/[.,;:!?]/.test(e) && t.chars.length > 0 && t.chars[t.chars.length - 1] === " " && (t.chars.pop(), t.position--, t.map.delete(t.position)), t.chars.push(e), n ? (t.map.set(t.position, n), t.lastMapped = n) : t.lastMapped && t.map.set(t.position, t.lastMapped), t.position++;
|
|
4996
|
-
},
|
|
4998
|
+
}, ws = (t, e) => {
|
|
4997
4999
|
if (t.inLeadingWhitespace || t.lastCharWasWhitespace || t.chars.length === 0) return !1;
|
|
4998
5000
|
const n = t.chars[t.chars.length - 1];
|
|
4999
|
-
return
|
|
5000
|
-
},
|
|
5001
|
+
return os(n, e, t.options);
|
|
5002
|
+
}, _s = (t, e) => {
|
|
5001
5003
|
const n = e.textContent || "";
|
|
5002
5004
|
let r = !1;
|
|
5003
5005
|
for (let i = 0; i < n.length; i++) {
|
|
5004
5006
|
const s = n[i], o = /\s/.test(s);
|
|
5005
5007
|
if (t.inLeadingWhitespace) {
|
|
5006
|
-
o || (t.inLeadingWhitespace = !1,
|
|
5008
|
+
o || (t.inLeadingWhitespace = !1, Ie(t, s, {
|
|
5007
5009
|
node: e,
|
|
5008
5010
|
offset: i
|
|
5009
5011
|
}), r = !0, t.lastCharWasWhitespace = !1);
|
|
5010
5012
|
continue;
|
|
5011
5013
|
}
|
|
5012
5014
|
if (o) {
|
|
5013
|
-
t.lastCharWasWhitespace ||
|
|
5015
|
+
t.lastCharWasWhitespace || Ie(t, " ", {
|
|
5014
5016
|
node: e,
|
|
5015
5017
|
offset: i
|
|
5016
5018
|
}), t.lastCharWasWhitespace = !0;
|
|
5017
5019
|
continue;
|
|
5018
5020
|
}
|
|
5019
|
-
!r &&
|
|
5021
|
+
!r && ws(t, s) && Ie(t, " ", {
|
|
5020
5022
|
node: e,
|
|
5021
5023
|
offset: i
|
|
5022
|
-
}),
|
|
5024
|
+
}), Ie(t, s, {
|
|
5023
5025
|
node: e,
|
|
5024
5026
|
offset: i
|
|
5025
5027
|
}), r = !0, t.lastCharWasWhitespace = !1;
|
|
5026
5028
|
}
|
|
5027
|
-
},
|
|
5029
|
+
}, pc = (t, e) => {
|
|
5028
5030
|
for (let n = 0; n < e.text.length; n++) {
|
|
5029
5031
|
const r = e.text[n], i = /\s/.test(r), s = e.map.get(n) || null, o = s?.node || t.lastMapped?.node || null, a = s?.offset ?? t.lastMapped?.offset ?? 0, l = s ? {
|
|
5030
5032
|
node: s.node,
|
|
@@ -5038,10 +5040,10 @@ var Zn = (t, e) => {
|
|
|
5038
5040
|
t.inLeadingWhitespace = !1;
|
|
5039
5041
|
}
|
|
5040
5042
|
if (i) {
|
|
5041
|
-
t.lastCharWasWhitespace ||
|
|
5043
|
+
t.lastCharWasWhitespace || Ie(t, " ", l), t.lastCharWasWhitespace = !0;
|
|
5042
5044
|
continue;
|
|
5043
5045
|
}
|
|
5044
|
-
n === 0 &&
|
|
5046
|
+
n === 0 && ws(t, r) && Ie(t, " ", l), Ie(t, r, l), t.lastCharWasWhitespace = !1, s ? (t.map.set(t.position - 1, {
|
|
5045
5047
|
node: s.node,
|
|
5046
5048
|
offset: s.offset
|
|
5047
5049
|
}), t.lastMapped = {
|
|
@@ -5052,7 +5054,7 @@ var Zn = (t, e) => {
|
|
|
5052
5054
|
offset: a
|
|
5053
5055
|
});
|
|
5054
5056
|
}
|
|
5055
|
-
},
|
|
5057
|
+
}, gc = (t) => {
|
|
5056
5058
|
if (typeof DOMParser > "u") return "";
|
|
5057
5059
|
const e = new DOMParser().parseFromString(t, "application/xml");
|
|
5058
5060
|
if (e.getElementsByTagName("parsererror").length > 0) return "";
|
|
@@ -5064,20 +5066,20 @@ var Zn = (t, e) => {
|
|
|
5064
5066
|
}
|
|
5065
5067
|
if (i.nodeType !== 1) return;
|
|
5066
5068
|
const s = i;
|
|
5067
|
-
if (!
|
|
5069
|
+
if (!Ts(s))
|
|
5068
5070
|
for (const o of Array.from(s.childNodes)) r(o);
|
|
5069
5071
|
};
|
|
5070
5072
|
return r(e.documentElement), P(n.join(" "));
|
|
5071
|
-
},
|
|
5072
|
-
const r =
|
|
5073
|
+
}, mc = (t, e, n) => {
|
|
5074
|
+
const r = ys(n), i = (a) => {
|
|
5073
5075
|
if (Ct(a, t)) return;
|
|
5074
5076
|
if (a.nodeType === 3) {
|
|
5075
|
-
|
|
5077
|
+
_s(r, a);
|
|
5076
5078
|
return;
|
|
5077
5079
|
}
|
|
5078
5080
|
if (a.nodeType !== 1) return;
|
|
5079
5081
|
const l = a;
|
|
5080
|
-
if (!(
|
|
5082
|
+
if (!(Ss(l) || Ts(l)))
|
|
5081
5083
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
5082
5084
|
};
|
|
5083
5085
|
i(t), ks(r);
|
|
@@ -5086,7 +5088,7 @@ var Zn = (t, e) => {
|
|
|
5086
5088
|
text: s,
|
|
5087
5089
|
map: r.map
|
|
5088
5090
|
};
|
|
5089
|
-
const o =
|
|
5091
|
+
const o = gc(e);
|
|
5090
5092
|
return o ? {
|
|
5091
5093
|
text: o,
|
|
5092
5094
|
map: /* @__PURE__ */ new Map()
|
|
@@ -5094,8 +5096,8 @@ var Zn = (t, e) => {
|
|
|
5094
5096
|
}, ks = (t) => {
|
|
5095
5097
|
for (; t.chars.length > 0 && /\s/.test(t.chars[t.chars.length - 1]); )
|
|
5096
5098
|
t.chars.pop(), t.position--, t.map.delete(t.position);
|
|
5097
|
-
},
|
|
5098
|
-
const n =
|
|
5099
|
+
}, vc = (t, e) => {
|
|
5100
|
+
const n = ys(e), r = [];
|
|
5099
5101
|
let i = 0, s, o = !1;
|
|
5100
5102
|
const a = () => {
|
|
5101
5103
|
const h = P(n.chars.slice(i, n.chars.length).join(""));
|
|
@@ -5107,18 +5109,18 @@ var Zn = (t, e) => {
|
|
|
5107
5109
|
}, l = (h) => {
|
|
5108
5110
|
if (Ct(h, t)) return;
|
|
5109
5111
|
if (h.nodeType === Node.TEXT_NODE) {
|
|
5110
|
-
const g =
|
|
5111
|
-
s && g !== s && a(), s = g,
|
|
5112
|
+
const g = dc(h, t);
|
|
5113
|
+
s && g !== s && a(), s = g, _s(n, h);
|
|
5112
5114
|
return;
|
|
5113
5115
|
}
|
|
5114
5116
|
if (h.nodeType !== Node.ELEMENT_NODE) return;
|
|
5115
5117
|
const u = h;
|
|
5116
|
-
if (
|
|
5117
|
-
const f =
|
|
5118
|
+
if (Ss(u)) return;
|
|
5119
|
+
const f = cc(u);
|
|
5118
5120
|
if (f) {
|
|
5119
5121
|
a();
|
|
5120
|
-
const g =
|
|
5121
|
-
|
|
5122
|
+
const g = mc(u, f, e);
|
|
5123
|
+
pc(n, g);
|
|
5122
5124
|
const m = P(g.text);
|
|
5123
5125
|
r.push({
|
|
5124
5126
|
type: "math",
|
|
@@ -5141,7 +5143,7 @@ var Zn = (t, e) => {
|
|
|
5141
5143
|
containsMathMarkup: o
|
|
5142
5144
|
};
|
|
5143
5145
|
}, ft = (t, e) => {
|
|
5144
|
-
if (!
|
|
5146
|
+
if (!fc(t)) {
|
|
5145
5147
|
const { text: n, map: r } = nn(t, e);
|
|
5146
5148
|
return {
|
|
5147
5149
|
visibleText: n,
|
|
@@ -5153,50 +5155,50 @@ var Zn = (t, e) => {
|
|
|
5153
5155
|
containsMathMarkup: !1
|
|
5154
5156
|
};
|
|
5155
5157
|
}
|
|
5156
|
-
return
|
|
5157
|
-
},
|
|
5158
|
+
return vc(t, e);
|
|
5159
|
+
}, wn = null, qr = Promise.resolve(), yc = (t) => (t || "en").split("-")[0].toLowerCase() || "en", bc = async () => (wn || (wn = import("./sre-kwoc_SMV.js").then((t) => /* @__PURE__ */ Ws(t.default, 1)).then((t) => {
|
|
5158
5160
|
const e = t.default || t;
|
|
5159
5161
|
if (!e || typeof e.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
5160
5162
|
return e;
|
|
5161
|
-
})),
|
|
5162
|
-
if (!
|
|
5163
|
-
const e =
|
|
5163
|
+
})), wn), Sc = (t) => t === "en" ? "clearspeak" : "mathspeak", jr = (t) => !!t && typeof t == "object" && !Array.isArray(t), Gr = (t) => typeof t == "string" && t.trim() ? t.trim() : void 0, or = (t) => {
|
|
5164
|
+
if (!jr(t)) return;
|
|
5165
|
+
const e = Gr(t.domain), n = Gr(t.style), r = jr(t.engineOptions) ? t.engineOptions : void 0;
|
|
5164
5166
|
if (!(!e && !n && !r))
|
|
5165
5167
|
return {
|
|
5166
5168
|
...e ? { domain: e } : {},
|
|
5167
5169
|
...n ? { style: n } : {},
|
|
5168
5170
|
...r ? { engineOptions: r } : {}
|
|
5169
5171
|
};
|
|
5170
|
-
},
|
|
5171
|
-
const i =
|
|
5172
|
+
}, Tc = async (t, e, n, r) => {
|
|
5173
|
+
const i = yc(e), s = or(r);
|
|
5172
5174
|
await t.setupEngine?.({
|
|
5173
5175
|
...s?.engineOptions || {},
|
|
5174
5176
|
locale: i,
|
|
5175
|
-
domain: s?.domain ||
|
|
5177
|
+
domain: s?.domain || Sc(i),
|
|
5176
5178
|
...s?.style ? { style: s.style } : {},
|
|
5177
5179
|
modality: "speech",
|
|
5178
5180
|
markup: n
|
|
5179
5181
|
}), await t.engineReady?.();
|
|
5180
|
-
},
|
|
5181
|
-
const e =
|
|
5182
|
-
return
|
|
5182
|
+
}, wc = async (t) => {
|
|
5183
|
+
const e = qr.then(t, t);
|
|
5184
|
+
return qr = e.then(() => {
|
|
5183
5185
|
}, () => {
|
|
5184
5186
|
}), e;
|
|
5185
|
-
},
|
|
5187
|
+
}, Es = async (t, e, n, r, i) => wc(async () => (await Tc(t, n, r, i), t.toSpeech(e))), _c = (t) => t.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), kc = async (t, e, n, r) => {
|
|
5186
5188
|
try {
|
|
5187
|
-
const i =
|
|
5189
|
+
const i = _c(await Es(t, e, n, "ssml", r));
|
|
5188
5190
|
return i.includes("<speak") ? i : null;
|
|
5189
5191
|
} catch (i) {
|
|
5190
5192
|
return console.debug("[TTSService] Math SSML generation failed; using plain", { message: i instanceof Error ? i.message : String(i) }), null;
|
|
5191
5193
|
}
|
|
5192
|
-
},
|
|
5194
|
+
}, As = async (t, e = {}) => {
|
|
5193
5195
|
if (!t.some((c) => c.type === "math")) return {
|
|
5194
5196
|
speechText: P(t.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
|
|
5195
5197
|
usedMathSpeech: !1,
|
|
5196
5198
|
usedFallback: !1
|
|
5197
5199
|
};
|
|
5198
5200
|
let n = null, r = !1, i = !1;
|
|
5199
|
-
const s = e.loadSre ||
|
|
5201
|
+
const s = e.loadSre || bc, o = [];
|
|
5200
5202
|
for (const c of t) {
|
|
5201
5203
|
if (c.type === "text") {
|
|
5202
5204
|
o.push(c.text);
|
|
@@ -5204,7 +5206,7 @@ var Zn = (t, e) => {
|
|
|
5204
5206
|
}
|
|
5205
5207
|
try {
|
|
5206
5208
|
n || (n = await s());
|
|
5207
|
-
const h = P(await
|
|
5209
|
+
const h = P(await Es(n, c.mathml, e.language, "none", e.mathSpeech));
|
|
5208
5210
|
if (h) {
|
|
5209
5211
|
o.push(h), r = !0;
|
|
5210
5212
|
continue;
|
|
@@ -5222,7 +5224,7 @@ var Zn = (t, e) => {
|
|
|
5222
5224
|
usedFallback: i,
|
|
5223
5225
|
ssml: l
|
|
5224
5226
|
};
|
|
5225
|
-
},
|
|
5227
|
+
}, Ec = (t, e) => As([t], e), Ac = (t) => (t || "en").split("-")[0].toLowerCase() || "en", Cc = /* @__PURE__ */ new Set([
|
|
5226
5228
|
"H1",
|
|
5227
5229
|
"H2",
|
|
5228
5230
|
"H3",
|
|
@@ -5232,17 +5234,17 @@ var Zn = (t, e) => {
|
|
|
5232
5234
|
"LI",
|
|
5233
5235
|
"LABEL",
|
|
5234
5236
|
"BUTTON"
|
|
5235
|
-
]),
|
|
5237
|
+
]), xc = /* @__PURE__ */ new Set([
|
|
5236
5238
|
"heading",
|
|
5237
5239
|
"listitem",
|
|
5238
5240
|
"option",
|
|
5239
5241
|
"radio"
|
|
5240
|
-
]),
|
|
5242
|
+
]), Rc = (t) => {
|
|
5241
5243
|
if (t.type !== "text" || !t.sourceElement) return !1;
|
|
5242
5244
|
const e = t.sourceElement.tagName.toUpperCase(), n = (t.sourceElement.getAttribute("role") || "").toLowerCase();
|
|
5243
|
-
return
|
|
5244
|
-
},
|
|
5245
|
-
const e = t.resolveMathSpeech ??
|
|
5245
|
+
return Cc.has(e) || xc.has(n);
|
|
5246
|
+
}, Mc = async (t) => {
|
|
5247
|
+
const e = t.resolveMathSpeech ?? Ec, { visibleText: n } = t, r = [];
|
|
5246
5248
|
let i = 0;
|
|
5247
5249
|
const s = (a) => {
|
|
5248
5250
|
const l = P(a), c = n.indexOf(l, i), h = c >= 0 ? c : i, u = h + l.length;
|
|
@@ -5254,10 +5256,10 @@ var Zn = (t, e) => {
|
|
|
5254
5256
|
for (let a = 0; a < t.chunks.length; a++) {
|
|
5255
5257
|
const l = t.chunks[a];
|
|
5256
5258
|
if (l.type === "text") {
|
|
5257
|
-
const g =
|
|
5259
|
+
const g = Rc(l) ? [{
|
|
5258
5260
|
text: l.text,
|
|
5259
5261
|
offset: 0
|
|
5260
|
-
}] :
|
|
5262
|
+
}] : tr(l.text, { locale: t.language });
|
|
5261
5263
|
for (const m of g) {
|
|
5262
5264
|
const y = P(m.text);
|
|
5263
5265
|
if (!y) continue;
|
|
@@ -5294,38 +5296,38 @@ var Zn = (t, e) => {
|
|
|
5294
5296
|
}
|
|
5295
5297
|
return {
|
|
5296
5298
|
segments: r,
|
|
5297
|
-
locale:
|
|
5299
|
+
locale: Ac(t.language),
|
|
5298
5300
|
visibleText: n,
|
|
5299
5301
|
plainSpeechText: P(o.join(" "))
|
|
5300
5302
|
};
|
|
5301
|
-
},
|
|
5302
|
-
const e = Math.max(1, t.maxEntries ??
|
|
5303
|
+
}, Oc = (t) => (t || "en").split("-")[0].toLowerCase() || "en", Lc = "sre-v1", Pc = 256, Fn = (t) => Array.isArray(t) ? `array:[${t.map(Fn).join(",")}]` : t && typeof t == "object" ? `object:{${Object.entries(t).sort(([e], [n]) => e.localeCompare(n)).map(([e, n]) => `${JSON.stringify(e)}:${Fn(n)}`).join(",")}}` : t === null ? "null:null" : typeof t > "u" ? "undefined:" : typeof t == "function" ? `function:${t.name || "anonymous"}` : typeof t == "symbol" ? `symbol:${String(t)}` : typeof t == "bigint" ? `bigint:${t.toString()}` : typeof t == "number" ? Number.isFinite(t) ? `number:${t}` : `number:${String(t)}` : `${typeof t}:${JSON.stringify(t)}`, Vr = (t, e, n, r) => `${Lc}\0${Oc(t)}\0${e ? "ssml" : "plain"}\0${Fn(n ?? null)}\0${r}`, Ic = (t = {}) => {
|
|
5304
|
+
const e = Math.max(1, t.maxEntries ?? Pc), n = t.resolve ?? ((s, o) => As([s], o)), r = /* @__PURE__ */ new Map(), i = (s, o) => {
|
|
5303
5305
|
for (r.delete(s), r.set(s, o); r.size > e; ) {
|
|
5304
5306
|
const a = r.keys().next().value;
|
|
5305
5307
|
a !== void 0 && r.delete(a);
|
|
5306
5308
|
}
|
|
5307
5309
|
};
|
|
5308
5310
|
return async (s, o) => {
|
|
5309
|
-
const a =
|
|
5311
|
+
const a = or(o.mathSpeech), l = o.produceSsml === !0, c = Vr(o.language, l, a, s.mathml), h = r.get(c);
|
|
5310
5312
|
if (h)
|
|
5311
5313
|
return r.delete(c), r.set(c, h), h;
|
|
5312
5314
|
const u = await n(s, {
|
|
5313
5315
|
...o,
|
|
5314
5316
|
mathSpeech: a
|
|
5315
5317
|
});
|
|
5316
|
-
return l && u.ssml && e > 1 && i(
|
|
5318
|
+
return l && u.ssml && e > 1 && i(Vr(o.language, !1, a, s.mathml), {
|
|
5317
5319
|
speechText: u.speechText,
|
|
5318
5320
|
usedMathSpeech: u.usedMathSpeech,
|
|
5319
5321
|
usedFallback: u.usedFallback
|
|
5320
5322
|
}), i(c, u), u;
|
|
5321
5323
|
};
|
|
5322
|
-
},
|
|
5324
|
+
}, Nc = (t) => !t || /^<[^>]+>$/.test(t.trim()) ? null : xt({ speechText: t }).tokens[0]?.normalized || null, $c = (t, e) => {
|
|
5323
5325
|
const n = xt({ speechText: t.speechText });
|
|
5324
5326
|
if (!Number.isFinite(e.position)) return {
|
|
5325
5327
|
boundary: null,
|
|
5326
5328
|
spokenText: n.spokenText
|
|
5327
5329
|
};
|
|
5328
|
-
const r =
|
|
5330
|
+
const r = Jl({
|
|
5329
5331
|
tokenization: n,
|
|
5330
5332
|
position: e.position,
|
|
5331
5333
|
length: e.length,
|
|
@@ -5338,8 +5340,8 @@ var Zn = (t, e) => {
|
|
|
5338
5340
|
} : null,
|
|
5339
5341
|
spokenText: n.spokenText
|
|
5340
5342
|
};
|
|
5341
|
-
},
|
|
5342
|
-
const n =
|
|
5343
|
+
}, Hc = (t, e, n) => n ? xt({ speechText: t }).tokens.find((r) => r.start <= e && e < r.end)?.normalized === n : !0, Bc = (t, e) => {
|
|
5344
|
+
const n = Nc(e.word);
|
|
5343
5345
|
if (t.id !== e.chunkId) return {
|
|
5344
5346
|
chunkId: e.chunkId,
|
|
5345
5347
|
normalizedWord: n,
|
|
@@ -5358,12 +5360,12 @@ var Zn = (t, e) => {
|
|
|
5358
5360
|
};
|
|
5359
5361
|
let r, i;
|
|
5360
5362
|
if (t.catalogAlignment)
|
|
5361
|
-
r =
|
|
5363
|
+
r = _l(t.catalogAlignment, e.position, e.length, e.word), i = t.catalogAlignment.spokenText;
|
|
5362
5364
|
else {
|
|
5363
|
-
const s =
|
|
5365
|
+
const s = $c(t, e);
|
|
5364
5366
|
r = s.boundary, i = s.spokenText;
|
|
5365
5367
|
}
|
|
5366
|
-
return r ?
|
|
5368
|
+
return r ? Hc(i, r.start, n) ? {
|
|
5367
5369
|
chunkId: t.id,
|
|
5368
5370
|
normalizedWord: n,
|
|
5369
5371
|
chunkSpokenStart: r.start,
|
|
@@ -5403,12 +5405,12 @@ var Zn = (t, e) => {
|
|
|
5403
5405
|
quality: "region",
|
|
5404
5406
|
confidence: t.confidence,
|
|
5405
5407
|
reason: t.reason
|
|
5406
|
-
},
|
|
5408
|
+
}, Cs = /* @__PURE__ */ new Map([
|
|
5407
5409
|
["mi", "mjx-mi"],
|
|
5408
5410
|
["mn", "mjx-mn"],
|
|
5409
5411
|
["mo", "mjx-mo"],
|
|
5410
5412
|
["mtext", "mjx-mtext"]
|
|
5411
|
-
]),
|
|
5413
|
+
]), Dn = "mi,mn,mo,mtext", xs = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", Rs = [
|
|
5412
5414
|
"mjx-mfrac",
|
|
5413
5415
|
"mjx-msqrt",
|
|
5414
5416
|
"mjx-mroot",
|
|
@@ -5416,55 +5418,55 @@ var Zn = (t, e) => {
|
|
|
5416
5418
|
"mjx-munder",
|
|
5417
5419
|
"mjx-mover",
|
|
5418
5420
|
"mjx-munderover"
|
|
5419
|
-
].join(","),
|
|
5421
|
+
].join(","), Ms = (t) => t.type === "text-range" ? t.node.parentElement : t.element, dn = (t) => {
|
|
5420
5422
|
let e = t;
|
|
5421
5423
|
for (; e; ) {
|
|
5422
5424
|
if (e.localName?.toLowerCase() === "mjx-container") return e;
|
|
5423
5425
|
e = e.parentElement;
|
|
5424
5426
|
}
|
|
5425
5427
|
return null;
|
|
5426
|
-
},
|
|
5428
|
+
}, Kr = (t) => !t || dn(t) ? !1 : !nr(t), Os = (t) => {
|
|
5427
5429
|
const e = t.getBoundingClientRect?.();
|
|
5428
5430
|
return !!(e && e.width > 0 && e.height > 0);
|
|
5429
|
-
},
|
|
5431
|
+
}, zn = (t) => {
|
|
5430
5432
|
let e = t;
|
|
5431
5433
|
for (; e; ) {
|
|
5432
5434
|
if (e.localName?.toLowerCase() === "math") return e;
|
|
5433
5435
|
e = e.parentElement;
|
|
5434
5436
|
}
|
|
5435
5437
|
return null;
|
|
5436
|
-
},
|
|
5438
|
+
}, Ls = (t, e) => {
|
|
5437
5439
|
if (t.length === 0 || t.length !== e.length) return !1;
|
|
5438
5440
|
for (let n = 0; n < t.length; n += 1) {
|
|
5439
|
-
const r =
|
|
5441
|
+
const r = Cs.get(t[n].localName.toLowerCase());
|
|
5440
5442
|
if (!r || e[n].localName.toLowerCase() !== r) return !1;
|
|
5441
5443
|
}
|
|
5442
5444
|
return !0;
|
|
5443
|
-
},
|
|
5444
|
-
if (!t || !
|
|
5445
|
-
const n =
|
|
5445
|
+
}, Wc = (t, e) => {
|
|
5446
|
+
if (!t || !Cs.has(t.localName.toLowerCase()) || e.querySelector(Rs)) return null;
|
|
5447
|
+
const n = zn(t), r = e.querySelector("mjx-math");
|
|
5446
5448
|
if (!n || !r) return null;
|
|
5447
|
-
const i = Array.from(n.querySelectorAll(
|
|
5449
|
+
const i = Array.from(n.querySelectorAll(Dn)), s = i.indexOf(t);
|
|
5448
5450
|
if (s < 0) return null;
|
|
5449
|
-
const o = Array.from(r.querySelectorAll(
|
|
5450
|
-
if (!
|
|
5451
|
+
const o = Array.from(r.querySelectorAll(xs));
|
|
5452
|
+
if (!Ls(i, o)) return null;
|
|
5451
5453
|
const a = o[s];
|
|
5452
|
-
return !a || !
|
|
5453
|
-
},
|
|
5454
|
+
return !a || !Os(a) ? null : a;
|
|
5455
|
+
}, Fc = (t) => {
|
|
5454
5456
|
const e = dn(t);
|
|
5455
5457
|
if (e) {
|
|
5456
|
-
if (e.querySelector(
|
|
5457
|
-
const r =
|
|
5458
|
+
if (e.querySelector(Rs)) return "expression";
|
|
5459
|
+
const r = zn(t) ?? t, i = e.querySelector("mjx-math");
|
|
5458
5460
|
if (!i) return "expression";
|
|
5459
|
-
const s = Array.from(r.querySelectorAll(
|
|
5460
|
-
return
|
|
5461
|
+
const s = Array.from(r.querySelectorAll(Dn)), o = Array.from(i.querySelectorAll(xs));
|
|
5462
|
+
return Ls(s, o) && o.some((a) => Os(a)) ? "token" : "expression";
|
|
5461
5463
|
}
|
|
5462
|
-
const n =
|
|
5463
|
-
return Array.from(n.querySelectorAll(
|
|
5464
|
-
},
|
|
5465
|
-
const e =
|
|
5464
|
+
const n = zn(t) ?? t;
|
|
5465
|
+
return Array.from(n.querySelectorAll(Dn)).some((r) => !nr(r)) ? "token" : "expression";
|
|
5466
|
+
}, Un = (t) => {
|
|
5467
|
+
const e = Ms(t), n = dn(e);
|
|
5466
5468
|
if (n) {
|
|
5467
|
-
const r =
|
|
5469
|
+
const r = Wc(e, n);
|
|
5468
5470
|
return r ? {
|
|
5469
5471
|
type: "element",
|
|
5470
5472
|
quality: "semantic-token",
|
|
@@ -5475,35 +5477,35 @@ var Zn = (t, e) => {
|
|
|
5475
5477
|
element: n
|
|
5476
5478
|
};
|
|
5477
5479
|
}
|
|
5478
|
-
return t.type === "text-range" ?
|
|
5480
|
+
return t.type === "text-range" ? Kr(t.node.parentElement) ? {
|
|
5479
5481
|
type: "text-range",
|
|
5480
5482
|
quality: "semantic-token",
|
|
5481
5483
|
node: t.node,
|
|
5482
5484
|
startOffset: t.startOffset,
|
|
5483
5485
|
endOffset: t.endOffset
|
|
5484
|
-
} : null :
|
|
5486
|
+
} : null : Kr(t.element) ? {
|
|
5485
5487
|
type: "element",
|
|
5486
5488
|
quality: t.quality === "region-fallback" ? "expression" : "semantic-token",
|
|
5487
5489
|
element: t.element
|
|
5488
5490
|
} : null;
|
|
5489
|
-
},
|
|
5491
|
+
}, Dc = Un, zc = () => {
|
|
5490
5492
|
const t = /* @__PURE__ */ new WeakMap();
|
|
5491
5493
|
return (e) => {
|
|
5492
|
-
const n =
|
|
5493
|
-
if (!n || !r) return
|
|
5494
|
+
const n = Ms(e), r = dn(n);
|
|
5495
|
+
if (!n || !r) return Un(e);
|
|
5494
5496
|
if (t.has(n)) return t.get(n) ?? null;
|
|
5495
|
-
const i =
|
|
5497
|
+
const i = Un(e);
|
|
5496
5498
|
return t.set(n, i), i;
|
|
5497
5499
|
};
|
|
5498
|
-
},
|
|
5500
|
+
}, Uc = (t, e, n, r = t.mathAlignments, i = Dc) => {
|
|
5499
5501
|
if (e.chunkSpokenStart === null || e.chunkSpokenEnd === null) return null;
|
|
5500
5502
|
let s = null;
|
|
5501
5503
|
for (const o of r) {
|
|
5502
|
-
const a =
|
|
5504
|
+
const a = Zl(o.alignment, {
|
|
5503
5505
|
position: e.chunkSpokenStart,
|
|
5504
5506
|
length: Math.max(1, e.chunkSpokenEnd - e.chunkSpokenStart),
|
|
5505
5507
|
boundaryWord: n.word
|
|
5506
|
-
}) ||
|
|
5508
|
+
}) || ec(o.alignment, { boundaryWord: n.word });
|
|
5507
5509
|
if (!a) continue;
|
|
5508
5510
|
const l = i(a);
|
|
5509
5511
|
if (l) {
|
|
@@ -5512,7 +5514,7 @@ var Zn = (t, e) => {
|
|
|
5512
5514
|
}
|
|
5513
5515
|
}
|
|
5514
5516
|
return s;
|
|
5515
|
-
},
|
|
5517
|
+
}, Ps = (t, e, n) => {
|
|
5516
5518
|
if (!t || typeof document > "u" || n <= e) return null;
|
|
5517
5519
|
const r = t.get(e);
|
|
5518
5520
|
let i = t.get(Math.max(e, n - 1));
|
|
@@ -5524,17 +5526,17 @@ var Zn = (t, e) => {
|
|
|
5524
5526
|
} catch {
|
|
5525
5527
|
return null;
|
|
5526
5528
|
}
|
|
5527
|
-
},
|
|
5529
|
+
}, qc = (t, e) => {
|
|
5528
5530
|
if (!t.catalogAlignment || e.chunkSpokenStart === null) return null;
|
|
5529
5531
|
const n = kl(t.catalogAlignment, e.chunkSpokenStart);
|
|
5530
5532
|
if (!n) return null;
|
|
5531
|
-
const r =
|
|
5533
|
+
const r = Ps(t.visibleMap, n.start, n.end);
|
|
5532
5534
|
return r ? {
|
|
5533
5535
|
type: "range",
|
|
5534
5536
|
quality: t.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
|
|
5535
5537
|
range: r
|
|
5536
5538
|
} : null;
|
|
5537
|
-
},
|
|
5539
|
+
}, jc = (t) => t.regionRange ? {
|
|
5538
5540
|
type: "range",
|
|
5539
5541
|
quality: "region",
|
|
5540
5542
|
range: t.regionRange
|
|
@@ -5542,43 +5544,43 @@ var Zn = (t, e) => {
|
|
|
5542
5544
|
type: "element",
|
|
5543
5545
|
quality: "region",
|
|
5544
5546
|
element: t.regionElement
|
|
5545
|
-
} : null,
|
|
5547
|
+
} : null, Yr = (t, e = t.chunk.mathAlignments) => {
|
|
5546
5548
|
if (e.length !== 1) return null;
|
|
5547
5549
|
const n = e[0]?.alignment.result.fallbackTarget;
|
|
5548
5550
|
return n ? t.renderedMathTargetResolver(n) : null;
|
|
5549
|
-
},
|
|
5551
|
+
}, Gc = (t, e) => t ? e.mathAlignments.filter(({ element: n }) => {
|
|
5550
5552
|
try {
|
|
5551
5553
|
return t.type === "range" ? t.range.intersectsNode(n) : t.type === "element" ? t.element === n || t.element.contains(n) : t.node.parentElement?.contains(n) || !1;
|
|
5552
5554
|
} catch {
|
|
5553
5555
|
return !1;
|
|
5554
5556
|
}
|
|
5555
|
-
}) : e.mathAlignments,
|
|
5557
|
+
}) : e.mathAlignments, Xr = () => ({
|
|
5556
5558
|
activeTarget: null,
|
|
5557
5559
|
regionTarget: null,
|
|
5558
5560
|
quality: "region",
|
|
5559
5561
|
confidence: 0,
|
|
5560
5562
|
reason: "boundary chunk id was not found"
|
|
5561
|
-
}),
|
|
5563
|
+
}), Jr = (t) => t.length === 1 ? t[0].element : null, Vc = (t, e) => e.length > 0 && e.every(({ element: n }) => t.mathCapabilityByElement.get(n) === "token"), Kc = 3, Yc = (t, e, n) => {
|
|
5562
5564
|
if (!e || e.type !== "range") return !1;
|
|
5563
5565
|
const { startContainer: r, endContainer: i } = e.range;
|
|
5564
|
-
return r === i && r.nodeType ===
|
|
5565
|
-
},
|
|
5566
|
+
return r === i && r.nodeType === Kc ? !1 : n.some(({ element: s }) => t.mathCapabilityByElement.get(s) === "token" && s.contains(r) && s.contains(i));
|
|
5567
|
+
}, Xc = (t, e) => ({
|
|
5566
5568
|
chunk: t,
|
|
5567
|
-
regionTarget:
|
|
5568
|
-
renderedMathTargetResolver:
|
|
5569
|
-
mathCapabilityByElement: new Map(t.mathAlignments.map(({ element: n }) => [n, e ?
|
|
5569
|
+
regionTarget: jc(t),
|
|
5570
|
+
renderedMathTargetResolver: zc(),
|
|
5571
|
+
mathCapabilityByElement: new Map(t.mathAlignments.map(({ element: n }) => [n, e ? Fc(n) : "expression"])),
|
|
5570
5572
|
heldTokenByElement: /* @__PURE__ */ new Map()
|
|
5571
|
-
}),
|
|
5572
|
-
const e = t.mathTokenHighlighting !== !1, n = new Map(t.chunks.map((r) => [r.id,
|
|
5573
|
+
}), Jc = (t) => {
|
|
5574
|
+
const e = t.mathTokenHighlighting !== !1, n = new Map(t.chunks.map((r) => [r.id, Xc(r, e)]));
|
|
5573
5575
|
return {
|
|
5574
5576
|
chunks: t.chunks,
|
|
5575
5577
|
resolveInitial(r) {
|
|
5576
5578
|
const i = n.get(r);
|
|
5577
|
-
if (!i) return
|
|
5579
|
+
if (!i) return Xr();
|
|
5578
5580
|
const s = i.chunk.mathAlignments, o = s.length === 1 ? s[0].element : null, a = o ? i.mathCapabilityByElement.get(o) : null;
|
|
5579
5581
|
return Xe(a === "expression" ? {
|
|
5580
5582
|
semanticTarget: null,
|
|
5581
|
-
expressionTarget:
|
|
5583
|
+
expressionTarget: Yr(i),
|
|
5582
5584
|
regionTarget: i.regionTarget,
|
|
5583
5585
|
confidence: 0.5,
|
|
5584
5586
|
reason: "initial expression (sticky expression mode)"
|
|
@@ -5592,10 +5594,10 @@ var Zn = (t, e) => {
|
|
|
5592
5594
|
},
|
|
5593
5595
|
resolveBoundary(r) {
|
|
5594
5596
|
const i = n.get(r.chunkId);
|
|
5595
|
-
if (!i) return
|
|
5596
|
-
const { chunk: s } = i, o =
|
|
5597
|
+
if (!i) return Xr();
|
|
5598
|
+
const { chunk: s } = i, o = Bc(s, r), a = qc(s, o), l = Gc(a, s), c = (!a || l.length > 0 ? Uc(s, o, r, l, i.renderedMathTargetResolver) : null) || null, h = e && c && c.quality !== "expression" ? c : null, u = c && c.quality === "expression" ? c : null;
|
|
5597
5599
|
if (h) {
|
|
5598
|
-
const f =
|
|
5600
|
+
const f = Jr(l);
|
|
5599
5601
|
return f && i.heldTokenByElement.set(f, h), Xe({
|
|
5600
5602
|
semanticTarget: h,
|
|
5601
5603
|
expressionTarget: null,
|
|
@@ -5604,15 +5606,15 @@ var Zn = (t, e) => {
|
|
|
5604
5606
|
reason: o.reason
|
|
5605
5607
|
});
|
|
5606
5608
|
}
|
|
5607
|
-
if (a && (e ? !
|
|
5609
|
+
if (a && (e ? !Yc(i, a, l) : l.length === 0)) return Xe({
|
|
5608
5610
|
semanticTarget: a,
|
|
5609
5611
|
expressionTarget: null,
|
|
5610
5612
|
regionTarget: i.regionTarget,
|
|
5611
5613
|
confidence: o.confidence,
|
|
5612
5614
|
reason: o.reason
|
|
5613
5615
|
});
|
|
5614
|
-
if (
|
|
5615
|
-
const f =
|
|
5616
|
+
if (Vc(i, l)) {
|
|
5617
|
+
const f = Jr(l), g = f ? i.heldTokenByElement.get(f) ?? null : null;
|
|
5616
5618
|
return Xe({
|
|
5617
5619
|
semanticTarget: g,
|
|
5618
5620
|
expressionTarget: null,
|
|
@@ -5623,21 +5625,21 @@ var Zn = (t, e) => {
|
|
|
5623
5625
|
}
|
|
5624
5626
|
return Xe({
|
|
5625
5627
|
semanticTarget: null,
|
|
5626
|
-
expressionTarget: u ??
|
|
5628
|
+
expressionTarget: u ?? Yr(i, l),
|
|
5627
5629
|
regionTarget: i.regionTarget,
|
|
5628
5630
|
confidence: o.confidence,
|
|
5629
5631
|
reason: o.reason
|
|
5630
5632
|
});
|
|
5631
5633
|
}
|
|
5632
5634
|
};
|
|
5633
|
-
},
|
|
5635
|
+
}, Qc = (t) => {
|
|
5634
5636
|
if (t.alignment?.boundaryOffsetMode) return t.alignment.boundaryOffsetMode;
|
|
5635
5637
|
const e = t.mathAlignment?.speech.boundaryOffsetSpace;
|
|
5636
5638
|
return e || "plain-spoken-text";
|
|
5637
|
-
},
|
|
5639
|
+
}, Zc = (t) => t.mathAlignments?.length ? t.mathAlignments : t.mathAlignment && t.sourceElement ? [{
|
|
5638
5640
|
element: t.sourceElement,
|
|
5639
5641
|
alignment: t.mathAlignment
|
|
5640
|
-
}] : [],
|
|
5642
|
+
}] : [], eh = (t) => (t.chunks && t.chunks.length ? t.chunks : [{
|
|
5641
5643
|
speechText: t.speechText || "",
|
|
5642
5644
|
visibleText: t.visibleText || t.speechText || "",
|
|
5643
5645
|
sourceElement: t.sourceElement || t.contentRoot,
|
|
@@ -5654,9 +5656,9 @@ var Zn = (t, e) => {
|
|
|
5654
5656
|
regionRange: e.regionRange,
|
|
5655
5657
|
visibleMap: e.visibleMap,
|
|
5656
5658
|
catalogAlignment: e.alignment,
|
|
5657
|
-
mathAlignments:
|
|
5658
|
-
offsetSpace:
|
|
5659
|
-
})),
|
|
5659
|
+
mathAlignments: Zc(e),
|
|
5660
|
+
offsetSpace: Qc(e)
|
|
5661
|
+
})), th = [
|
|
5660
5662
|
"[data-pie-tts-region]",
|
|
5661
5663
|
"[data-catalog-region]",
|
|
5662
5664
|
"li",
|
|
@@ -5666,18 +5668,18 @@ var Zn = (t, e) => {
|
|
|
5666
5668
|
"[role='group']",
|
|
5667
5669
|
"[role='region']",
|
|
5668
5670
|
"div"
|
|
5669
|
-
].join(","),
|
|
5670
|
-
const n = t.closest(
|
|
5671
|
+
].join(","), Is = (t, e) => {
|
|
5672
|
+
const n = t.closest(th);
|
|
5671
5673
|
return n && e.contains(n) ? n : t;
|
|
5672
|
-
},
|
|
5674
|
+
}, nh = (t, e, n) => {
|
|
5673
5675
|
const r = /* @__PURE__ */ new Map();
|
|
5674
5676
|
for (let i = e; i < n; i++) {
|
|
5675
5677
|
const s = t.get(i);
|
|
5676
5678
|
s && r.set(i - e, s);
|
|
5677
5679
|
}
|
|
5678
5680
|
return r;
|
|
5679
|
-
},
|
|
5680
|
-
const e = ft(t.contentRoot, t.textProcessingOptions), n = await
|
|
5681
|
+
}, rh = async (t) => {
|
|
5682
|
+
const e = ft(t.contentRoot, t.textProcessingOptions), n = await Mc({
|
|
5681
5683
|
chunks: e.chunks,
|
|
5682
5684
|
visibleText: e.visibleText,
|
|
5683
5685
|
language: t.language,
|
|
@@ -5695,8 +5697,8 @@ var Zn = (t, e) => {
|
|
|
5695
5697
|
segment: r,
|
|
5696
5698
|
anchor: {
|
|
5697
5699
|
sourceElement: a,
|
|
5698
|
-
regionElement:
|
|
5699
|
-
visibleMap:
|
|
5700
|
+
regionElement: Is(a, t.contentRoot),
|
|
5701
|
+
visibleMap: nh(e.map, r.visibleSpan.start, r.visibleSpan.end)
|
|
5700
5702
|
}
|
|
5701
5703
|
};
|
|
5702
5704
|
}
|
|
@@ -5716,8 +5718,8 @@ var Zn = (t, e) => {
|
|
|
5716
5718
|
containsMathMarkup: e.containsMathMarkup,
|
|
5717
5719
|
visibleText: e.visibleText
|
|
5718
5720
|
};
|
|
5719
|
-
},
|
|
5720
|
-
const n =
|
|
5721
|
+
}, ih = (t, e) => {
|
|
5722
|
+
const n = hs({
|
|
5721
5723
|
speechText: t.spokenText,
|
|
5722
5724
|
visibleText: t.spokenText
|
|
5723
5725
|
});
|
|
@@ -5726,13 +5728,13 @@ var Zn = (t, e) => {
|
|
|
5726
5728
|
visibleText: t.visibleText,
|
|
5727
5729
|
sourceElement: e.sourceElement,
|
|
5728
5730
|
regionElement: e.regionElement,
|
|
5729
|
-
regionRange:
|
|
5731
|
+
regionRange: Ps(e.visibleMap, 0, t.visibleText.length) ?? void 0,
|
|
5730
5732
|
speechMatchesVisibleText: !0,
|
|
5731
5733
|
playbackMode: n.playbackMode,
|
|
5732
5734
|
alignment: n,
|
|
5733
5735
|
visibleMap: e.visibleMap
|
|
5734
5736
|
};
|
|
5735
|
-
},
|
|
5737
|
+
}, Ns = (t, e) => {
|
|
5736
5738
|
const n = e.sourceElement;
|
|
5737
5739
|
return {
|
|
5738
5740
|
speechText: t.spokenText,
|
|
@@ -5745,7 +5747,7 @@ var Zn = (t, e) => {
|
|
|
5745
5747
|
speechText: t.spokenText
|
|
5746
5748
|
}) : void 0
|
|
5747
5749
|
};
|
|
5748
|
-
},
|
|
5750
|
+
}, sh = (t, e, n) => {
|
|
5749
5751
|
const r = e.sourceElement;
|
|
5750
5752
|
return {
|
|
5751
5753
|
speechText: n,
|
|
@@ -5757,18 +5759,18 @@ var Zn = (t, e) => {
|
|
|
5757
5759
|
mathElement: r,
|
|
5758
5760
|
speechText: n
|
|
5759
5761
|
}) : void 0,
|
|
5760
|
-
plainFallback:
|
|
5762
|
+
plainFallback: Ns(t, e)
|
|
5761
5763
|
};
|
|
5762
|
-
},
|
|
5764
|
+
}, oh = (t, e = {}) => t.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? ih(n, r) : e.format === "ssml" && n.ssml ? sh(n, r, n.ssml) : Ns(n, r)), ah = "pie-tts-control-handoff", M;
|
|
5763
5765
|
(function(t) {
|
|
5764
5766
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
5765
5767
|
})(M || (M = {}));
|
|
5766
|
-
var
|
|
5768
|
+
var $s = (t, e) => t === e || t.startContainer === e.startContainer && t.startOffset === e.startOffset && t.endContainer === e.endContainer && t.endOffset === e.endOffset, lh = (t, e) => t === e ? !0 : !t || !e || t.type !== e.type || t.quality !== e.quality ? !1 : t.type === "range" && e.type === "range" ? $s(t.range, e.range) : t.type === "element" && e.type === "element" ? t.element === e.element : t.type === "text-range" && e.type === "text-range" ? t.node === e.node && t.startOffset === e.startOffset && t.endOffset === e.endOffset : !1, ch = class qn {
|
|
5767
5769
|
constructor() {
|
|
5768
|
-
d(this, "currentProvider", null), d(this, "provider", null), d(this, "highlightCoordinator", null), d(this, "highlightTargetResolverProvider", null), d(this, "catalogResolver", null), d(this, "state", M.IDLE), d(this, "ttsConfig", {}), d(this, "currentText", null), d(this, "currentContentElement", null), d(this, "normalizedToDOM", /* @__PURE__ */ new Map()), d(this, "listeners", /* @__PURE__ */ new Map()), d(this, "lastError", null), d(this, "speakRunId", 0), d(this, "currentBoundaryOffset", 0), d(this, "activeWordBoundaryOffset", 0), d(this, "seekSegments", []), d(this, "playbackChunks", []), d(this, "activeRecordedAudio", null), d(this, "sentenceHighlightSegments", []), d(this, "currentSeekSegmentIndex", 0), d(this, "activeSentenceStartOffset", null), d(this, "playbackStartDeferredRunId", null), d(this, "pendingPlaybackStartHighlights", []), d(this, "playbackStartBarrierCleanup", null), d(this, "playbackRateWriteQueue", Promise.resolve()), d(this, "playbackRateRequestId", 0), d(this, "pendingPlaybackRateRequest", null), d(this, "activePlaybackRate", null), d(this, "activeHighlightMode", "word"), d(this, "lastRenderedRegionTarget", null), d(this, "telemetryReporter", null), d(this, "generatedMathSpeechResolver",
|
|
5770
|
+
d(this, "currentProvider", null), d(this, "provider", null), d(this, "highlightCoordinator", null), d(this, "highlightTargetResolverProvider", null), d(this, "catalogResolver", null), d(this, "state", M.IDLE), d(this, "ttsConfig", {}), d(this, "currentText", null), d(this, "currentContentElement", null), d(this, "normalizedToDOM", /* @__PURE__ */ new Map()), d(this, "listeners", /* @__PURE__ */ new Map()), d(this, "lastError", null), d(this, "speakRunId", 0), d(this, "currentBoundaryOffset", 0), d(this, "activeWordBoundaryOffset", 0), d(this, "seekSegments", []), d(this, "playbackChunks", []), d(this, "activeRecordedAudio", null), d(this, "sentenceHighlightSegments", []), d(this, "currentSeekSegmentIndex", 0), d(this, "activeSentenceStartOffset", null), d(this, "playbackStartDeferredRunId", null), d(this, "pendingPlaybackStartHighlights", []), d(this, "playbackStartBarrierCleanup", null), d(this, "playbackRateWriteQueue", Promise.resolve()), d(this, "playbackRateRequestId", 0), d(this, "pendingPlaybackRateRequest", null), d(this, "activePlaybackRate", null), d(this, "activeHighlightMode", "word"), d(this, "lastRenderedRegionTarget", null), d(this, "telemetryReporter", null), d(this, "generatedMathSpeechResolver", Ic());
|
|
5769
5771
|
}
|
|
5770
5772
|
debugLog(e, n) {
|
|
5771
|
-
|
|
5773
|
+
qn.debugEnabled && (n === void 0 ? console.debug(e) : console.debug(e, n));
|
|
5772
5774
|
}
|
|
5773
5775
|
clearPlaybackStartBarrier(e = this.playbackStartBarrierCleanup) {
|
|
5774
5776
|
e?.(), this.playbackStartBarrierCleanup === e && (this.playbackStartBarrierCleanup = null);
|
|
@@ -5888,7 +5890,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
5888
5890
|
const s = r?.resolveWordRange?.(e, n);
|
|
5889
5891
|
if (s && this.isRangeWithinScope(s, i)) return {
|
|
5890
5892
|
range: s,
|
|
5891
|
-
remapped:
|
|
5893
|
+
remapped: !$s(e, s)
|
|
5892
5894
|
};
|
|
5893
5895
|
} catch {
|
|
5894
5896
|
}
|
|
@@ -5986,12 +5988,12 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
5986
5988
|
}
|
|
5987
5989
|
getMathSpeechOptions() {
|
|
5988
5990
|
const e = (this.ttsConfig.providerOptions || {}).mathSpeech;
|
|
5989
|
-
return
|
|
5991
|
+
return or(e);
|
|
5990
5992
|
}
|
|
5991
5993
|
buildPositionMap(e, n, r) {
|
|
5992
5994
|
this.normalizedToDOM.clear();
|
|
5993
5995
|
const { text: i, map: s } = nn(e, this.getTextProcessingOptions(r));
|
|
5994
|
-
this.normalizedToDOM = s,
|
|
5996
|
+
this.normalizedToDOM = s, qn.debugEnabled && (this.debugLog("[TTSService] Text comparison:", {
|
|
5995
5997
|
spokenLength: n.length,
|
|
5996
5998
|
normalizedDomLength: i.length,
|
|
5997
5999
|
match: n === i,
|
|
@@ -6052,7 +6054,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6052
6054
|
return e.includes("<") ? /<\s*break\b|<\s*speak\b|<\s*prosody\b|<\s*p\b|<\s*s\b/i.test(e) : !1;
|
|
6053
6055
|
}
|
|
6054
6056
|
isElementHidden(e) {
|
|
6055
|
-
return
|
|
6057
|
+
return is(e);
|
|
6056
6058
|
}
|
|
6057
6059
|
getBoundaryStrength(e) {
|
|
6058
6060
|
const n = Number(e.getAttribute("data-tts-break-ms"));
|
|
@@ -6104,7 +6106,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6104
6106
|
let a = o.nextNode(), l = null;
|
|
6105
6107
|
for (; a; ) {
|
|
6106
6108
|
const c = a, h = c.parentElement;
|
|
6107
|
-
if (h && !this.isElementHidden(h) && !
|
|
6109
|
+
if (h && !this.isElementHidden(h) && !In(c)) {
|
|
6108
6110
|
const u = this.getBoundaryAnchor(c, e), f = s.get(c);
|
|
6109
6111
|
u && f !== void 0 && u.anchor !== l && f > 0 && (r.set(f, Math.max(r.get(f) || 0, u.units)), l = u.anchor);
|
|
6110
6112
|
}
|
|
@@ -6141,7 +6143,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6141
6143
|
}
|
|
6142
6144
|
segmentSentences(e) {
|
|
6143
6145
|
const n = this.ttsConfig.providerOptions?.locale || void 0;
|
|
6144
|
-
return
|
|
6146
|
+
return tr(e, { locale: n });
|
|
6145
6147
|
}
|
|
6146
6148
|
createSeekSegmentsFromText(e) {
|
|
6147
6149
|
return this.segmentSentences(e).map((n) => {
|
|
@@ -6327,7 +6329,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6327
6329
|
}
|
|
6328
6330
|
async switchProviderToBrowser(e, n) {
|
|
6329
6331
|
if (!this.currentProvider) return !1;
|
|
6330
|
-
const r = new
|
|
6332
|
+
const r = new hl(), i = this.currentProvider.providerId, s = {};
|
|
6331
6333
|
this.ttsConfig.rate !== void 0 && (s.rate = this.ttsConfig.rate), this.ttsConfig.pitch !== void 0 && (s.pitch = this.ttsConfig.pitch), this.ttsConfig.mathTokenHighlighting !== void 0 && (s.mathTokenHighlighting = this.ttsConfig.mathTokenHighlighting);
|
|
6332
6334
|
const o = n?.operation || "tts-initialize", a = n?.contentToSpeak ?? "", l = a.replace(/\s+/g, " ").trim().slice(0, 120), c = a.length > 0 ? {
|
|
6333
6335
|
textLength: a.length,
|
|
@@ -6471,7 +6473,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6471
6473
|
}, g = this.catalogResolver.getAlternative(u, {
|
|
6472
6474
|
...f,
|
|
6473
6475
|
form: "payload"
|
|
6474
|
-
}), m = g?.payload ?
|
|
6476
|
+
}), m = g?.payload ? ol({ payload: g.payload }) ?? void 0 : void 0, y = this.catalogResolver.getAlternative(u, {
|
|
6475
6477
|
...f,
|
|
6476
6478
|
form: "content"
|
|
6477
6479
|
})?.content;
|
|
@@ -6497,8 +6499,8 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6497
6499
|
const u = h, f = o(u);
|
|
6498
6500
|
if (f) {
|
|
6499
6501
|
s();
|
|
6500
|
-
const g = ft(u, this.getTextProcessingOptions(n.language)), m = g.visibleText || P(u.textContent || ""), y =
|
|
6501
|
-
const b = f.script, x =
|
|
6502
|
+
const g = ft(u, this.getTextProcessingOptions(n.language)), m = g.visibleText || P(u.textContent || ""), y = Is(u, e), v = f.script !== void 0 ? (() => {
|
|
6503
|
+
const b = f.script, x = hs({
|
|
6502
6504
|
speechText: b,
|
|
6503
6505
|
visibleText: m
|
|
6504
6506
|
}), D = a(u, m), E = D ? rn({
|
|
@@ -6552,7 +6554,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6552
6554
|
return !e || e.providerId?.toLowerCase() === "browser" ? "plain" : e.getCapabilities?.().supportsSSML ? "ssml" : "plain";
|
|
6553
6555
|
}
|
|
6554
6556
|
async resolveGeneratedSpeechContent(e, n, r) {
|
|
6555
|
-
const i = this.resolveGeneratedPlaybackFormat(), { plan: s, containsMathMarkup: o, visibleText: a } = await
|
|
6557
|
+
const i = this.resolveGeneratedPlaybackFormat(), { plan: s, containsMathMarkup: o, visibleText: a } = await rh({
|
|
6556
6558
|
contentRoot: e,
|
|
6557
6559
|
language: r,
|
|
6558
6560
|
mathSpeech: this.getMathSpeechOptions(),
|
|
@@ -6569,7 +6571,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6569
6571
|
containsMathMarkup: !1,
|
|
6570
6572
|
speechMatchesVisibleText: !0
|
|
6571
6573
|
};
|
|
6572
|
-
const c =
|
|
6574
|
+
const c = oh(s, { format: i }), h = s.plainSpeechText;
|
|
6573
6575
|
return {
|
|
6574
6576
|
contentToSpeak: h,
|
|
6575
6577
|
speechText: h,
|
|
@@ -6640,7 +6642,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6640
6642
|
this.highlightCoordinator && this.paintTTSWordRange(this.resolveWordHighlightRange(e).range);
|
|
6641
6643
|
}
|
|
6642
6644
|
highlightRenderableRegionTarget(e) {
|
|
6643
|
-
if (!(!this.highlightCoordinator || !e || typeof document > "u") && !(!this.highlightTargetResolverProvider &&
|
|
6645
|
+
if (!(!this.highlightCoordinator || !e || typeof document > "u") && !(!this.highlightTargetResolverProvider && lh(this.lastRenderedRegionTarget, e)))
|
|
6644
6646
|
try {
|
|
6645
6647
|
const n = document.createRange();
|
|
6646
6648
|
if (e.type === "element") n.selectNodeContents(e.element);
|
|
@@ -6699,7 +6701,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6699
6701
|
async playRecordedAudio(e, n) {
|
|
6700
6702
|
if (typeof document > "u") throw new Error("[tts] no document available to play recorded audio");
|
|
6701
6703
|
const r = e.sources[0], i = document.createElement("audio");
|
|
6702
|
-
i.preload = "auto", i.src =
|
|
6704
|
+
i.preload = "auto", i.src = sl(r.src, e.fragment), i.playbackRate = this.normalizePlaybackRate(Number(this.ttsConfig.rate || 1)), await new Promise((s, o) => {
|
|
6703
6705
|
let a, l = !1, c = !1;
|
|
6704
6706
|
const h = () => {
|
|
6705
6707
|
c || l || (l = !0, n?.());
|
|
@@ -6715,7 +6717,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6715
6717
|
cancel: () => {
|
|
6716
6718
|
c || (c = !0, u(), i.pause(), s());
|
|
6717
6719
|
}
|
|
6718
|
-
}, i.addEventListener("ended", f), i.addEventListener("error", g), i.addEventListener("playing", h), a =
|
|
6720
|
+
}, i.addEventListener("ended", f), i.addEventListener("error", g), i.addEventListener("playing", h), a = il(i, e.fragment, f), Promise.resolve(i.play()).then(h).catch(g);
|
|
6719
6721
|
}).finally(() => {
|
|
6720
6722
|
this.activeRecordedAudio?.element === i && (this.activeRecordedAudio = null), i.pause(), i.removeAttribute("src");
|
|
6721
6723
|
});
|
|
@@ -6734,10 +6736,10 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6734
6736
|
});
|
|
6735
6737
|
return;
|
|
6736
6738
|
}
|
|
6737
|
-
const r = e.regionElement || e.sourceElement || this.currentContentElement, i = r ?
|
|
6739
|
+
const r = e.regionElement || e.sourceElement || this.currentContentElement, i = r ? eh({
|
|
6738
6740
|
contentRoot: r,
|
|
6739
6741
|
chunks: [e]
|
|
6740
|
-
})[0] : null, s = this.ttsConfig.mathTokenHighlighting !== !1, o = i ?
|
|
6742
|
+
})[0] : null, s = this.ttsConfig.mathTokenHighlighting !== !1, o = i ? Jc({
|
|
6741
6743
|
chunks: [i],
|
|
6742
6744
|
mathTokenHighlighting: s
|
|
6743
6745
|
}) : null;
|
|
@@ -6797,7 +6799,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6797
6799
|
}
|
|
6798
6800
|
async speakRange(e, n) {
|
|
6799
6801
|
if (!this.provider) throw new Error("TTS service not initialized");
|
|
6800
|
-
if (
|
|
6802
|
+
if (In(e.commonAncestorContainer)) {
|
|
6801
6803
|
console.warn("[tts] selection lies inside content marked not-to-be-spoken; nothing was spoken. Selecting a node and pressing read-aloud must not become a way around suppression.");
|
|
6802
6804
|
return;
|
|
6803
6805
|
}
|
|
@@ -6807,14 +6809,14 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6807
6809
|
r = h.nodeType === Node.ELEMENT_NODE ? h : h.parentElement;
|
|
6808
6810
|
}
|
|
6809
6811
|
if (!r) return;
|
|
6810
|
-
const i =
|
|
6812
|
+
const i = $r(e, r), s = i.text.trim();
|
|
6811
6813
|
if (!s) {
|
|
6812
6814
|
i.filtered && console.warn("[tts] every part of the selection is either hidden or marked not-to-be-spoken; nothing was spoken.");
|
|
6813
6815
|
return;
|
|
6814
6816
|
}
|
|
6815
6817
|
const o = document.createRange();
|
|
6816
6818
|
o.selectNodeContents(r), o.setEnd(e.startContainer, e.startOffset);
|
|
6817
|
-
const a =
|
|
6819
|
+
const a = $r(o, r).text, l = P(a), c = l.length + (/\s$/.test(a) && l ? 1 : 0);
|
|
6818
6820
|
this.debugLog("[TTSService] speakRange offset calculation:", {
|
|
6819
6821
|
selectedText: s,
|
|
6820
6822
|
textBeforeRange: a.substring(0, 100),
|
|
@@ -6925,7 +6927,7 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6925
6927
|
this.provider && (this.speakRunId += 1, this.clearPlaybackStartBarrier(), this.cancelRecordedAudio(), this.provider.onWordBoundary = void 0, this.provider.stop(), this.setState(M.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null, this.activePlaybackRate = null);
|
|
6926
6928
|
}
|
|
6927
6929
|
requestControlHandoff() {
|
|
6928
|
-
typeof window > "u" || window.dispatchEvent(new CustomEvent(
|
|
6930
|
+
typeof window > "u" || window.dispatchEvent(new CustomEvent(ah, { detail: { source: "host" } }));
|
|
6929
6931
|
}
|
|
6930
6932
|
isPlaying() {
|
|
6931
6933
|
return this.state === M.PLAYING;
|
|
@@ -6996,14 +6998,14 @@ var Ns = (t, e) => t === e || t.startContainer === e.startContainer && t.startOf
|
|
|
6996
6998
|
});
|
|
6997
6999
|
}
|
|
6998
7000
|
};
|
|
6999
|
-
d(
|
|
7001
|
+
d(ch, "debugEnabled", (() => {
|
|
7000
7002
|
try {
|
|
7001
7003
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7002
7004
|
} catch {
|
|
7003
7005
|
}
|
|
7004
7006
|
return globalThis.__PIE_TTS_DEBUG__ === !0;
|
|
7005
7007
|
})());
|
|
7006
|
-
var
|
|
7008
|
+
var Lh = Object.freeze([0.8, 1.25]), Ph = Object.freeze([
|
|
7007
7009
|
{
|
|
7008
7010
|
rate: 0.8,
|
|
7009
7011
|
label: "Slow",
|
|
@@ -7020,11 +7022,11 @@ var Oh = Object.freeze([0.8, 1.25]), Lh = Object.freeze([
|
|
|
7020
7022
|
label: "Fast",
|
|
7021
7023
|
ariaLabel: "Fast speed"
|
|
7022
7024
|
}
|
|
7023
|
-
]),
|
|
7025
|
+
]), Ih = Object.freeze([
|
|
7024
7026
|
0.8,
|
|
7025
7027
|
1,
|
|
7026
7028
|
1.25
|
|
7027
|
-
]),
|
|
7029
|
+
]), Nh = Va({
|
|
7028
7030
|
policy: {
|
|
7029
7031
|
allowed: [],
|
|
7030
7032
|
blocked: []
|
|
@@ -7035,13 +7037,13 @@ var Oh = Object.freeze([0.8, 1.25]), Lh = Object.freeze([
|
|
|
7035
7037
|
passage: []
|
|
7036
7038
|
},
|
|
7037
7039
|
providers: {}
|
|
7038
|
-
}),
|
|
7040
|
+
}), hh = [
|
|
7039
7041
|
"assessment",
|
|
7040
7042
|
"section",
|
|
7041
7043
|
"item",
|
|
7042
7044
|
"passage",
|
|
7043
7045
|
"rubric"
|
|
7044
|
-
],
|
|
7046
|
+
], $h = new Set(hh), Hs, pe = class K {
|
|
7045
7047
|
constructor() {
|
|
7046
7048
|
d(this, "elementType", "multiple-choice"), d(this, "priority", 100);
|
|
7047
7049
|
}
|
|
@@ -7101,41 +7103,41 @@ var Oh = Object.freeze([0.8, 1.25]), Lh = Object.freeze([
|
|
|
7101
7103
|
for (const n of e.querySelectorAll(".feedback-tick")) n.setAttribute(K.FEEDBACK_HOOK_ATTR, "true");
|
|
7102
7104
|
}
|
|
7103
7105
|
};
|
|
7104
|
-
|
|
7105
|
-
d(
|
|
7106
|
-
d(
|
|
7107
|
-
d(
|
|
7108
|
-
d(
|
|
7109
|
-
d(
|
|
7110
|
-
d(
|
|
7111
|
-
d(
|
|
7112
|
-
var
|
|
7106
|
+
Hs = pe;
|
|
7107
|
+
d(pe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
7108
|
+
d(pe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
7109
|
+
d(pe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
|
|
7110
|
+
d(pe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
|
|
7111
|
+
d(pe, "CHOICE_SELECTOR", `[${Hs.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
7112
|
+
d(pe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
|
|
7113
|
+
d(pe, "MUI_DISABLED_CLASS", "Mui-disabled");
|
|
7114
|
+
var Bs = "ebsr-multiple-choice", uh = `${Bs}--version-`, ar = (t) => {
|
|
7113
7115
|
if (!(t instanceof HTMLElement)) return !1;
|
|
7114
7116
|
const e = t.tagName.toLowerCase();
|
|
7115
|
-
return e ===
|
|
7116
|
-
},
|
|
7117
|
+
return e === Bs || e.startsWith(uh);
|
|
7118
|
+
}, Qr = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(ar) ?? null, dh = (t) => {
|
|
7117
7119
|
let e = t.parentElement;
|
|
7118
7120
|
for (; e !== null; ) {
|
|
7119
|
-
if (
|
|
7121
|
+
if (ar(e)) return e;
|
|
7120
7122
|
e = e.parentElement;
|
|
7121
7123
|
}
|
|
7122
7124
|
return null;
|
|
7123
|
-
},
|
|
7125
|
+
}, fh = class {
|
|
7124
7126
|
constructor() {
|
|
7125
|
-
d(this, "elementType", "ebsr"), d(this, "priority", 110), d(this, "mcAdapter", new
|
|
7127
|
+
d(this, "elementType", "ebsr"), d(this, "priority", 110), d(this, "mcAdapter", new pe());
|
|
7126
7128
|
}
|
|
7127
7129
|
canHandle(t) {
|
|
7128
|
-
return t.tagName.toLowerCase() === "ebsr" || Array.from(t.querySelectorAll("*")).some(
|
|
7130
|
+
return t.tagName.toLowerCase() === "ebsr" || Array.from(t.querySelectorAll("*")).some(ar);
|
|
7129
7131
|
}
|
|
7130
7132
|
findChoices(t) {
|
|
7131
|
-
const e =
|
|
7133
|
+
const e = Qr(t, "a"), n = Qr(t, "b"), r = [];
|
|
7132
7134
|
return e && r.push(...this.mcAdapter.findChoices(e)), n && r.push(...this.mcAdapter.findChoices(n)), r;
|
|
7133
7135
|
}
|
|
7134
7136
|
createChoiceRange(t) {
|
|
7135
7137
|
return this.mcAdapter.createChoiceRange(t);
|
|
7136
7138
|
}
|
|
7137
7139
|
getChoiceId(t) {
|
|
7138
|
-
return `${
|
|
7140
|
+
return `${dh(t)?.id || "unknown"}-${this.mcAdapter.getChoiceId(t)}`;
|
|
7139
7141
|
}
|
|
7140
7142
|
getChoiceLabel(t) {
|
|
7141
7143
|
return this.mcAdapter.getChoiceLabel(t);
|
|
@@ -7152,7 +7154,7 @@ var Hs = "ebsr-multiple-choice", hh = `${Hs}--version-`, sr = (t) => {
|
|
|
7152
7154
|
getButtonContainer(t) {
|
|
7153
7155
|
return this.mcAdapter.getButtonContainer(t);
|
|
7154
7156
|
}
|
|
7155
|
-
},
|
|
7157
|
+
}, ph = class {
|
|
7156
7158
|
constructor() {
|
|
7157
7159
|
d(this, "elementType", "inline-dropdown"), d(this, "priority", 90);
|
|
7158
7160
|
}
|
|
@@ -7178,12 +7180,12 @@ var Hs = "ebsr-multiple-choice", hh = `${Hs}--version-`, sr = (t) => {
|
|
|
7178
7180
|
getButtonContainer(t) {
|
|
7179
7181
|
return t;
|
|
7180
7182
|
}
|
|
7181
|
-
},
|
|
7183
|
+
}, gh = class {
|
|
7182
7184
|
constructor() {
|
|
7183
7185
|
d(this, "adapters", void 0), this.adapters = [
|
|
7184
|
-
new
|
|
7185
|
-
new
|
|
7186
|
-
new
|
|
7186
|
+
new pe(),
|
|
7187
|
+
new fh(),
|
|
7188
|
+
new ph()
|
|
7187
7189
|
].sort((t, e) => e.priority - t.priority);
|
|
7188
7190
|
}
|
|
7189
7191
|
findAdapter(t) {
|
|
@@ -7497,9 +7499,9 @@ d(L, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
|
|
|
7497
7499
|
"flow-root",
|
|
7498
7500
|
"list-item"
|
|
7499
7501
|
]));
|
|
7500
|
-
var
|
|
7502
|
+
var lr = class pt {
|
|
7501
7503
|
constructor(e = "strikethrough", n = "right") {
|
|
7502
|
-
d(this, "registry", void 0), d(this, "strategy", void 0), d(this, "eliminatedChoices", /* @__PURE__ */ new Set()), d(this, "choiceElements", /* @__PURE__ */ new Map()), d(this, "choiceButtons", /* @__PURE__ */ new Map()), d(this, "choiceAdapters", /* @__PURE__ */ new Map()), d(this, "buttonAlignment", "right"), d(this, "shouldRestoreState", !0), d(this, "active", !0), d(this, "questionRoot", null), d(this, "selectionChangeHandler", null), d(this, "selectionObserver", null), d(this, "selectionRefreshFrame", null), d(this, "storeIntegration", null), this.registry = new
|
|
7504
|
+
d(this, "registry", void 0), d(this, "strategy", void 0), d(this, "eliminatedChoices", /* @__PURE__ */ new Set()), d(this, "choiceElements", /* @__PURE__ */ new Map()), d(this, "choiceButtons", /* @__PURE__ */ new Map()), d(this, "choiceAdapters", /* @__PURE__ */ new Map()), d(this, "buttonAlignment", "right"), d(this, "shouldRestoreState", !0), d(this, "active", !0), d(this, "questionRoot", null), d(this, "selectionChangeHandler", null), d(this, "selectionObserver", null), d(this, "selectionRefreshFrame", null), d(this, "storeIntegration", null), this.registry = new gh(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = n;
|
|
7503
7505
|
}
|
|
7504
7506
|
createStrategy(e) {
|
|
7505
7507
|
return e === "mask" ? new Ye() : new L();
|
|
@@ -7684,22 +7686,22 @@ var or = class pt {
|
|
|
7684
7686
|
this.restoreAllSelectable(), this.cleanupButtons(), this.strategy.destroy();
|
|
7685
7687
|
}
|
|
7686
7688
|
};
|
|
7687
|
-
d(
|
|
7688
|
-
d(
|
|
7689
|
-
var
|
|
7690
|
-
function
|
|
7691
|
-
|
|
7692
|
-
let n =
|
|
7693
|
-
const g = /* @__PURE__ */
|
|
7694
|
-
let m = /* @__PURE__ */ X(null), y = /* @__PURE__ */ X(null), v = null, b = null, x = /* @__PURE__ */
|
|
7695
|
-
|
|
7689
|
+
d(lr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
|
|
7690
|
+
d(lr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
7691
|
+
var mh = /* @__PURE__ */ ha('<div style="display: none;" aria-hidden="true"></div>');
|
|
7692
|
+
function vh(t, e) {
|
|
7693
|
+
li(e, !0);
|
|
7694
|
+
let n = Te(e, "visible", 7, !1), r = Te(e, "toolId", 7, "answerEliminator"), i = Te(e, "strategy", 7, "strikethrough"), s = Te(e, "alwaysOn", 7, !1), o = Te(e, "buttonAlignment", 7, "right"), a = Te(e, "scopeElement", 7, null), l = Te(e, "elementToolStateStore", 7, null), c = Te(e, "globalElementId", 7, ""), h = /* @__PURE__ */ X(null), u = /* @__PURE__ */ X(null), f = /* @__PURE__ */ X(null);
|
|
7695
|
+
const g = /* @__PURE__ */ yr(() => w(u)?.toolCoordinator);
|
|
7696
|
+
let m = /* @__PURE__ */ X(null), y = /* @__PURE__ */ X(null), v = null, b = null, x = /* @__PURE__ */ yr(() => s() || n());
|
|
7697
|
+
Me(() => {
|
|
7696
7698
|
if (w(h))
|
|
7697
|
-
return
|
|
7699
|
+
return Oa(w(h), (R) => {
|
|
7698
7700
|
z(u, R, !0);
|
|
7699
7701
|
});
|
|
7700
|
-
}),
|
|
7702
|
+
}), Me(() => {
|
|
7701
7703
|
if (w(h))
|
|
7702
|
-
return
|
|
7704
|
+
return La(w(h), (R) => {
|
|
7703
7705
|
z(f, R, !0);
|
|
7704
7706
|
});
|
|
7705
7707
|
});
|
|
@@ -7722,13 +7724,13 @@ function mh(t, e) {
|
|
|
7722
7724
|
});
|
|
7723
7725
|
});
|
|
7724
7726
|
}
|
|
7725
|
-
|
|
7726
|
-
!w(g) || !r() || (v && b && (v !== w(g) || b !== r()) && (v.unregisterTool(b), v = null, b = null), v || (w(g).registerTool(r(), "Answer Eliminator", void 0,
|
|
7727
|
-
}),
|
|
7727
|
+
Me(() => {
|
|
7728
|
+
!w(g) || !r() || (v && b && (v !== w(g) || b !== r()) && (v.unregisterTool(b), v = null, b = null), v || (w(g).registerTool(r(), "Answer Eliminator", void 0, Pn.MODAL), v = w(g), b = r()));
|
|
7729
|
+
}), Me(() => {
|
|
7728
7730
|
w(m) && l() && c() && w(m).setStoreIntegration(l(), c());
|
|
7729
|
-
}),
|
|
7731
|
+
}), va(() => (z(m, new lr(i(), o()), !0), w(m) && l() && c() && w(m).setStoreIntegration(l(), c()), w(x) ? E() : w(m).cleanup(), () => {
|
|
7730
7732
|
w(m)?.destroy(), z(m, null), v && b && (v.unregisterTool(b), v = null, b = null);
|
|
7731
|
-
})),
|
|
7733
|
+
})), Me(() => {
|
|
7732
7734
|
const R = w(f)?.contextVersion ?? null;
|
|
7733
7735
|
if (R !== null) {
|
|
7734
7736
|
if (w(y) === null) {
|
|
@@ -7737,7 +7739,7 @@ function mh(t, e) {
|
|
|
7737
7739
|
}
|
|
7738
7740
|
R !== w(y) && (z(y, R, !0), H());
|
|
7739
7741
|
}
|
|
7740
|
-
}),
|
|
7742
|
+
}), Me(() => {
|
|
7741
7743
|
w(m) && (w(x) ? (w(m).enableStateRestoration(), E()) : w(m).cleanup());
|
|
7742
7744
|
});
|
|
7743
7745
|
var F = {
|
|
@@ -7745,54 +7747,54 @@ function mh(t, e) {
|
|
|
7745
7747
|
return n();
|
|
7746
7748
|
},
|
|
7747
7749
|
set visible(R = !1) {
|
|
7748
|
-
n(R),
|
|
7750
|
+
n(R), ge();
|
|
7749
7751
|
},
|
|
7750
7752
|
get toolId() {
|
|
7751
7753
|
return r();
|
|
7752
7754
|
},
|
|
7753
7755
|
set toolId(R = "answerEliminator") {
|
|
7754
|
-
r(R),
|
|
7756
|
+
r(R), ge();
|
|
7755
7757
|
},
|
|
7756
7758
|
get strategy() {
|
|
7757
7759
|
return i();
|
|
7758
7760
|
},
|
|
7759
7761
|
set strategy(R = "strikethrough") {
|
|
7760
|
-
i(R),
|
|
7762
|
+
i(R), ge();
|
|
7761
7763
|
},
|
|
7762
7764
|
get alwaysOn() {
|
|
7763
7765
|
return s();
|
|
7764
7766
|
},
|
|
7765
7767
|
set alwaysOn(R = !1) {
|
|
7766
|
-
s(R),
|
|
7768
|
+
s(R), ge();
|
|
7767
7769
|
},
|
|
7768
7770
|
get buttonAlignment() {
|
|
7769
7771
|
return o();
|
|
7770
7772
|
},
|
|
7771
7773
|
set buttonAlignment(R = "right") {
|
|
7772
|
-
o(R),
|
|
7774
|
+
o(R), ge();
|
|
7773
7775
|
},
|
|
7774
7776
|
get scopeElement() {
|
|
7775
7777
|
return a();
|
|
7776
7778
|
},
|
|
7777
7779
|
set scopeElement(R = null) {
|
|
7778
|
-
a(R),
|
|
7780
|
+
a(R), ge();
|
|
7779
7781
|
},
|
|
7780
7782
|
get elementToolStateStore() {
|
|
7781
7783
|
return l();
|
|
7782
7784
|
},
|
|
7783
7785
|
set elementToolStateStore(R = null) {
|
|
7784
|
-
l(R),
|
|
7786
|
+
l(R), ge();
|
|
7785
7787
|
},
|
|
7786
7788
|
get globalElementId() {
|
|
7787
7789
|
return c();
|
|
7788
7790
|
},
|
|
7789
7791
|
set globalElementId(R = "") {
|
|
7790
|
-
c(R),
|
|
7792
|
+
c(R), ge();
|
|
7791
7793
|
}
|
|
7792
|
-
}, ct =
|
|
7793
|
-
return
|
|
7794
|
+
}, ct = mh();
|
|
7795
|
+
return Sa(ct, (R) => z(h, R), () => w(h)), Gi(t, ct), ci(F);
|
|
7794
7796
|
}
|
|
7795
|
-
customElements.define("pie-tool-answer-eliminator", ka(
|
|
7797
|
+
customElements.define("pie-tool-answer-eliminator", ka(vh, {
|
|
7796
7798
|
visible: {
|
|
7797
7799
|
attribute: "visible",
|
|
7798
7800
|
type: "Boolean"
|
|
@@ -7818,5 +7820,5 @@ customElements.define("pie-tool-answer-eliminator", ka(mh, {
|
|
|
7818
7820
|
globalElementId: { type: "String" }
|
|
7819
7821
|
}, [], [], { mode: "open" }));
|
|
7820
7822
|
export {
|
|
7821
|
-
|
|
7823
|
+
vh as default
|
|
7822
7824
|
};
|