@pie-players/pie-tool-annotation-toolbar 0.3.53 → 0.3.55

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.
@@ -1,5 +1,5 @@
1
1
  import { t as m } from "./defineProperty-Dt7ri80W.js";
2
- var _a = Object.create, To = Object.defineProperty, Sa = Object.getOwnPropertyDescriptor, wa = Object.getOwnPropertyNames, ka = Object.getPrototypeOf, Ea = Object.prototype.hasOwnProperty, Rd = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), xa = (e, t, n, r) => {
2
+ var _a = Object.create, To = Object.defineProperty, Sa = Object.getOwnPropertyDescriptor, wa = Object.getOwnPropertyNames, ka = Object.getPrototypeOf, Ea = Object.prototype.hasOwnProperty, Od = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), xa = (e, t, n, r) => {
3
3
  if (t && typeof t == "object" || typeof t == "function")
4
4
  for (var i = wa(t), o = 0, s = i.length, a; o < s; o++)
5
5
  a = i[o], !Ea.call(e, a) && a !== n && To(e, a, {
@@ -10,16 +10,16 @@ var _a = Object.create, To = Object.defineProperty, Sa = Object.getOwnPropertyDe
10
10
  }, Aa = (e, t, n) => (n = e != null ? _a(ka(e)) : {}, xa(t || !e || !e.__esModule ? To(n, "default", {
11
11
  value: e,
12
12
  enumerable: !0
13
- }) : n, e)), $d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, n) => (typeof require < "u" ? require : t)[n] }) : e)(function(e) {
13
+ }) : n, e)), Id = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, n) => (typeof require < "u" ? require : t)[n] }) : e)(function(e) {
14
14
  if (typeof require < "u") return require.apply(this, arguments);
15
15
  throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
16
16
  });
17
17
  if (typeof window < "u") {
18
- var wi, ki;
19
- ((wi = (ki = window).__svelte ?? (ki.__svelte = {})).v ?? (wi.v = /* @__PURE__ */ new Set())).add("5");
18
+ var ki, Ei;
19
+ ((ki = (Ei = window).__svelte ?? (Ei.__svelte = {})).v ?? (ki.v = /* @__PURE__ */ new Set())).add("5");
20
20
  }
21
21
  var Ct = {}, j = /* @__PURE__ */ Symbol("uninitialized");
22
- var _o = Array.isArray, Ca = Array.prototype.indexOf, Cn = Array.prototype.includes, Un = Array.from, Mn = Object.keys, On = Object.defineProperty, it = Object.getOwnPropertyDescriptor, Ma = Object.getOwnPropertyDescriptors, Oa = Object.prototype, Ia = Array.prototype, So = Object.getPrototypeOf, Ei = Object.isExtensible, Ra = () => {
22
+ var _o = Array.isArray, Ca = Array.prototype.indexOf, Mn = Array.prototype.includes, Gn = Array.from, On = Object.keys, In = Object.defineProperty, it = Object.getOwnPropertyDescriptor, Ma = Object.getOwnPropertyDescriptors, Oa = Object.prototype, Ia = Array.prototype, So = Object.getPrototypeOf, xi = Object.isExtensible, Ra = () => {
23
23
  };
24
24
  function $a(e) {
25
25
  for (var t = 0; t < e.length; t++) e[t]();
@@ -34,8 +34,8 @@ function wo() {
34
34
  reject: t
35
35
  };
36
36
  }
37
- var Ld = 1 << 24, ce = 1024, de = 2048, bt = 4096, Ur = 8192, La = 16384, Gr = 32768, xi = 1 << 25, Kr = 65536, Pd = 1 << 17, Nd = 1 << 18, Lt = 1 << 19, Pa = 1 << 20, Yt = 1 << 25, nn = 65536, Ai = 1 << 21, Na = 1 << 22, In = 1 << 23, Xt = /* @__PURE__ */ Symbol("$state"), ko = /* @__PURE__ */ Symbol("legacy props"), Wa = /* @__PURE__ */ Symbol(""), Ha = /* @__PURE__ */ Symbol("proxy path"), yr = /* @__PURE__ */ Symbol("attributes"), za = /* @__PURE__ */ Symbol("class"), Tr = /* @__PURE__ */ Symbol("style"), Tn = /* @__PURE__ */ Symbol("text");
38
- var Gn = new class extends Error {
37
+ var Rd = 1 << 24, ce = 1024, de = 2048, bt = 4096, Gr = 8192, La = 16384, Kr = 32768, Ai = 1 << 25, Yr = 65536, $d = 1 << 17, Ld = 1 << 18, Lt = 1 << 19, Pa = 1 << 20, Yt = 1 << 25, nn = 65536, Ci = 1 << 21, Na = 1 << 22, Rn = 1 << 23, Xt = /* @__PURE__ */ Symbol("$state"), ko = /* @__PURE__ */ Symbol("legacy props"), Wa = /* @__PURE__ */ Symbol(""), Ha = /* @__PURE__ */ Symbol("proxy path"), Tr = /* @__PURE__ */ Symbol("attributes"), za = /* @__PURE__ */ Symbol("class"), _r = /* @__PURE__ */ Symbol("style"), Tn = /* @__PURE__ */ Symbol("text");
38
+ var Kn = new class extends Error {
39
39
  constructor(...t) {
40
40
  super(...t), m(this, "name", "StaleReactionError"), m(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
41
41
  }
@@ -79,7 +79,7 @@ function Qa() {
79
79
  function Za() {
80
80
  console.warn("https://svelte.dev/e/derived_inert");
81
81
  }
82
- function Kn(e) {
82
+ function Yn(e) {
83
83
  console.warn("https://svelte.dev/e/hydration_mismatch");
84
84
  }
85
85
  function el() {
@@ -92,16 +92,16 @@ function Ie(e) {
92
92
  var $;
93
93
  function Z(e) {
94
94
  if (e === null)
95
- throw Kn(), Ct;
95
+ throw Yn(), Ct;
96
96
  return $ = e;
97
97
  }
98
- function Yn() {
98
+ function Xn() {
99
99
  return Z(/* @__PURE__ */ xe($));
100
100
  }
101
101
  function hn(e) {
102
102
  if (P) {
103
103
  if (/* @__PURE__ */ xe($) !== null)
104
- throw Kn(), Ct;
104
+ throw Yn(), Ct;
105
105
  $ = e;
106
106
  }
107
107
  }
@@ -111,7 +111,7 @@ function tl(e = 1) {
111
111
  $ = n;
112
112
  }
113
113
  }
114
- function Rn(e = !0) {
114
+ function $n(e = !0) {
115
115
  for (var t = 0, n = $; ; ) {
116
116
  if (n.nodeType === 8) {
117
117
  var r = n.data;
@@ -126,7 +126,7 @@ function Rn(e = !0) {
126
126
  }
127
127
  function Eo(e) {
128
128
  if (!e || e.nodeType !== 8)
129
- throw Kn(), Ct;
129
+ throw Yn(), Ct;
130
130
  return e.data;
131
131
  }
132
132
  function xo(e) {
@@ -138,8 +138,8 @@ function nl(e, t) {
138
138
  function Ao(e) {
139
139
  return !nl(e, this.v);
140
140
  }
141
- var $e = !1, Xn = !1;
142
- function Ci(e, t) {
141
+ var $e = !1, Jn = !1;
142
+ function Mi(e, t) {
143
143
  return e.label = t, rl(e.v, t), e;
144
144
  }
145
145
  function rl(e, t) {
@@ -158,7 +158,7 @@ function Co(e, t = !1, n) {
158
158
  s: e,
159
159
  x: null,
160
160
  r: x,
161
- l: Xn && !t ? {
161
+ l: Jn && !t ? {
162
162
  s: null,
163
163
  u: null,
164
164
  $: []
@@ -174,7 +174,7 @@ function Mo(e) {
174
174
  return e !== void 0 && (t.x = e), t.i = !0, F = t.p, e ?? {};
175
175
  }
176
176
  function rn() {
177
- return !Xn || F !== null && F.l === null;
177
+ return !Jn || F !== null && F.l === null;
178
178
  }
179
179
  var Ze = [];
180
180
  function Oo() {
@@ -196,7 +196,7 @@ function il() {
196
196
  function Io(e) {
197
197
  var t = x;
198
198
  if (t === null)
199
- return M.f |= In, e;
199
+ return M.f |= Rn, e;
200
200
  if ((t.f & 32768) === 0 && (t.f & 4) === 0)
201
201
  throw e;
202
202
  Ue(e, t);
@@ -220,7 +220,7 @@ var ol = ~(de | bt | ce);
220
220
  function B(e, t) {
221
221
  e.f = e.f & ol | t;
222
222
  }
223
- function Yr(e) {
223
+ function Xr(e) {
224
224
  (e.f & 512) !== 0 || e.deps === null ? B(e, ce) : B(e, bt);
225
225
  }
226
226
  function Ro(e) {
@@ -243,7 +243,7 @@ function al(e) {
243
243
  function Lo(e, t) {
244
244
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
245
245
  }
246
- function Xr(e, t) {
246
+ function Jr(e, t) {
247
247
  Lo(e, t), t.add(e);
248
248
  }
249
249
  function E(e, t, n) {
@@ -259,10 +259,10 @@ function w(e, t, n) {
259
259
  function f(e, t) {
260
260
  return e.get(A(e, t));
261
261
  }
262
- var Po, $n = null, wt = null, C = null, _r = null, X = null, Sr = null, Jt = !1, ir = !1, Ot = null, Ln = null, No = 0;
263
- var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Nn = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), yt = class Wo {
262
+ var Po, Ln = null, wt = null, C = null, Sr = null, X = null, wr = null, Jt = !1, or = !1, Ot = null, Pn = null, No = 0;
263
+ var ll = 1, Nn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), yt = class Wo {
264
264
  constructor() {
265
- Xr(this, D), m(this, "id", ll++), E(this, Pn, !1), m(this, "linked", !0), E(this, ot, null), E(this, et, null), m(this, "async_deriveds", /* @__PURE__ */ new Map()), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), E(this, Nn, /* @__PURE__ */ new Set()), E(this, fn, /* @__PURE__ */ new Set()), E(this, kt, 0), E(this, Qe, /* @__PURE__ */ new Map()), E(this, qt, null), E(this, se, []), E(this, wr, []), E(this, ft, /* @__PURE__ */ new Set()), E(this, Re, /* @__PURE__ */ new Set()), E(this, Ve, /* @__PURE__ */ new Map()), E(this, _n, /* @__PURE__ */ new Set()), m(this, "is_fork", !1), E(this, Vt, !1), wt === null ? $n = wt = this : (w(et, wt, this), w(ot, this, wt)), wt = this;
265
+ Jr(this, D), m(this, "id", ll++), E(this, Nn, !1), m(this, "linked", !0), E(this, ot, null), E(this, et, null), m(this, "async_deriveds", /* @__PURE__ */ new Map()), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), E(this, Wn, /* @__PURE__ */ new Set()), E(this, fn, /* @__PURE__ */ new Set()), E(this, kt, 0), E(this, Qe, /* @__PURE__ */ new Map()), E(this, qt, null), E(this, se, []), E(this, kr, []), E(this, ft, /* @__PURE__ */ new Set()), E(this, Re, /* @__PURE__ */ new Set()), E(this, Ve, /* @__PURE__ */ new Map()), E(this, _n, /* @__PURE__ */ new Set()), m(this, "is_fork", !1), E(this, Vt, !1), wt === null ? Ln = wt = this : (w(et, wt, this), w(ot, this, wt)), wt = this;
266
266
  }
267
267
  skip_effect(t) {
268
268
  f(Ve, this).has(t) || f(Ve, this).set(t, {
@@ -292,17 +292,17 @@ var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
292
292
  }
293
293
  flush() {
294
294
  try {
295
- ir = !0, C = this, A(D, this, Wn).call(this);
295
+ or = !0, C = this, A(D, this, Hn).call(this);
296
296
  } finally {
297
- No = 0, Sr = null, Ot = null, Ln = null, ir = !1, C = null, X = null, lt.clear();
297
+ No = 0, wr = null, Ot = null, Pn = null, or = !1, C = null, X = null, lt.clear();
298
298
  }
299
299
  }
300
300
  discard() {
301
301
  for (const t of f(fn, this)) t(this);
302
- f(fn, this).clear(), A(D, this, Hn).call(this), f(qt, this)?.resolve();
302
+ f(fn, this).clear(), A(D, this, zn).call(this), f(qt, this)?.resolve();
303
303
  }
304
304
  register_created_effect(t) {
305
- f(wr, this).push(t);
305
+ f(kr, this).push(t);
306
306
  }
307
307
  increment(t, n) {
308
308
  if (w(kt, this, f(kt, this) + 1), t) {
@@ -325,7 +325,7 @@ var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
325
325
  t.clear(), n.clear();
326
326
  }
327
327
  oncommit(t) {
328
- f(Nn, this).add(t);
328
+ f(Wn, this).add(t);
329
329
  }
330
330
  ondiscard(t) {
331
331
  f(fn, this).add(t);
@@ -336,8 +336,8 @@ var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
336
336
  static ensure() {
337
337
  if (C === null) {
338
338
  const t = C = new Wo();
339
- !ir && !Jt && dt(() => {
340
- f(Pn, t) || t.flush();
339
+ !or && !Jt && dt(() => {
340
+ f(Nn, t) || t.flush();
341
341
  });
342
342
  }
343
343
  return C;
@@ -349,7 +349,7 @@ var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
349
349
  }
350
350
  X = /* @__PURE__ */ new Map();
351
351
  for (const [n, [r]] of this.current) X.set(n, r);
352
- for (let n = $n; n !== null; n = f(et, n))
352
+ for (let n = Ln; n !== null; n = f(et, n))
353
353
  if (!(n === this || n.is_fork)) {
354
354
  var t = !1;
355
355
  if (n.id < this.id) {
@@ -364,7 +364,7 @@ var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
364
364
  }
365
365
  }
366
366
  schedule(t) {
367
- if (Sr = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
367
+ if (wr = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
368
368
  t.b.defer_effect(t);
369
369
  return;
370
370
  }
@@ -382,7 +382,7 @@ var ll = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
382
382
  }
383
383
  };
384
384
  Po = yt;
385
- function Mi() {
385
+ function Oi() {
386
386
  if (this.is_fork) return !0;
387
387
  for (const n of f(Qe, this).keys()) {
388
388
  for (var e = n, t = !1; e.parent !== null; ) {
@@ -396,28 +396,28 @@ function Mi() {
396
396
  }
397
397
  return !1;
398
398
  }
399
- function Wn() {
400
- w(Pn, this, !0), No++ > 1e3 && (A(D, this, Hn).call(this), dl());
399
+ function Hn() {
400
+ w(Nn, this, !0), No++ > 1e3 && (A(D, this, zn).call(this), dl());
401
401
  for (const a of f(ft, this))
402
402
  f(Re, this).delete(a), B(a, de), this.schedule(a);
403
403
  for (const a of f(Re, this))
404
404
  B(a, bt), this.schedule(a);
405
405
  const e = f(se, this);
406
406
  w(se, this, []), this.apply();
407
- var t = Ot = [], n = [], r = Ln = [];
407
+ var t = Ot = [], n = [], r = Pn = [];
408
408
  for (const a of e) try {
409
409
  A(D, this, Ho).call(this, a, t, n);
410
410
  } catch (l) {
411
- throw Do(a), A(D, this, Mi).call(this) || this.discard(), l;
411
+ throw Do(a), A(D, this, Oi).call(this) || this.discard(), l;
412
412
  }
413
413
  if (C = null, r.length > 0) {
414
414
  var i = Po.ensure();
415
415
  for (const a of r) i.schedule(a);
416
416
  }
417
- if (Ot = null, Ln = null, A(D, this, Mi).call(this)) {
417
+ if (Ot = null, Pn = null, A(D, this, Oi).call(this)) {
418
418
  A(D, this, Ut).call(this, n), A(D, this, Ut).call(this, t);
419
419
  for (const [a, l] of f(Ve, this)) Bo(a, l);
420
- r.length > 0 && A(D, C, Wn).call(C);
420
+ r.length > 0 && A(D, C, Hn).call(C);
421
421
  return;
422
422
  }
423
423
  const o = A(D, this, cl).call(this);
@@ -426,14 +426,14 @@ function Wn() {
426
426
  return;
427
427
  }
428
428
  f(ft, this).clear(), f(Re, this).clear();
429
- for (const a of f(Nn, this)) a(this);
430
- f(Nn, this).clear(), _r = this, Oi(n), Oi(t), _r = null, f(qt, this)?.resolve();
429
+ for (const a of f(Wn, this)) a(this);
430
+ f(Wn, this).clear(), Sr = this, Ii(n), Ii(t), Sr = null, f(qt, this)?.resolve();
431
431
  var s = C;
432
- if (f(kt, this) === 0 && (f(se, this).length === 0 || s !== null) && (A(D, this, Hn).call(this), $e && (A(D, this, hl).call(this), C = s)), f(se, this).length > 0) if (s !== null) {
432
+ if (f(kt, this) === 0 && (f(se, this).length === 0 || s !== null) && (A(D, this, zn).call(this), $e && (A(D, this, hl).call(this), C = s)), f(se, this).length > 0) if (s !== null) {
433
433
  const a = s;
434
434
  f(se, a).push(...f(se, this).filter((l) => !f(se, a).includes(l)));
435
435
  } else s = this;
436
- s !== null && A(D, s, Wn).call(s);
436
+ s !== null && A(D, s, Hn).call(s);
437
437
  }
438
438
  function Ho(e, t, n) {
439
439
  e.f ^= ce;
@@ -487,13 +487,13 @@ function ul(e) {
487
487
  }
488
488
  };
489
489
  for (const n of this.current.keys()) t(n);
490
- this.oncommit(() => e.discard()), A(D, e, Hn).call(e), C = this, A(D, this, Wn).call(this);
490
+ this.oncommit(() => e.discard()), A(D, e, zn).call(e), C = this, A(D, this, Hn).call(this);
491
491
  }
492
492
  function Ut(e) {
493
493
  for (var t = 0; t < e.length; t += 1) $o(e[t], f(ft, this), f(Re, this));
494
494
  }
495
495
  function hl() {
496
- for (let c = $n; c !== null; c = f(et, c)) {
496
+ for (let c = Ln; c !== null; c = f(et, c)) {
497
497
  var e = c.id < this.id, t = [];
498
498
  for (const [u, [h, d]] of this.current) {
499
499
  if (c.current.has(u)) {
@@ -507,7 +507,7 @@ function hl() {
507
507
  const d = c.async_deriveds.get(u);
508
508
  d && h.promise.then(d.resolve).catch(d.reject);
509
509
  }
510
- if (f(Pn, c)) {
510
+ if (f(Nn, c)) {
511
511
  var r = [...c.current.keys()].filter((u) => !c.current.get(u)[1] && !this.current.has(u));
512
512
  if (r.length === 0)
513
513
  e && c.discard();
@@ -524,7 +524,7 @@ function hl() {
524
524
  return d ? d[0] !== h[0] || d[1] !== h[1] : !0;
525
525
  }).map(([u]) => u);
526
526
  if (a.length > 0)
527
- for (const u of f(wr, this)) (u.f & 155648) === 0 && Jr(u, a, o) && ((u.f & 4194320) !== 0 ? (B(u, de), c.schedule(u)) : f(ft, c).add(u));
527
+ for (const u of f(kr, this)) (u.f & 155648) === 0 && Qr(u, a, o) && ((u.f & 4194320) !== 0 ? (B(u, de), c.schedule(u)) : f(ft, c).add(u));
528
528
  if (f(se, c).length > 0 && !f(Vt, c)) {
529
529
  c.apply();
530
530
  for (var l of f(se, c)) A(D, c, Ho).call(c, l, [], []);
@@ -535,10 +535,10 @@ function hl() {
535
535
  }
536
536
  }
537
537
  }
538
- function Hn() {
538
+ function zn() {
539
539
  if (this.linked) {
540
540
  var e = f(ot, this), t = f(et, this);
541
- e === null ? $n = t : w(et, e, t), t === null ? wt = e : w(ot, t, e), this.linked = !1;
541
+ e === null ? Ln = t : w(et, e, t), t === null ? wt = e : w(ot, t, e), this.linked = !1;
542
542
  }
543
543
  }
544
544
  function Sn(e) {
@@ -563,11 +563,11 @@ function dl() {
563
563
  try {
564
564
  Ua();
565
565
  } catch (n) {
566
- Ue(n, Sr);
566
+ Ue(n, wr);
567
567
  }
568
568
  }
569
569
  var Se = null;
570
- function Oi(e) {
570
+ function Ii(e) {
571
571
  var t = e.length;
572
572
  if (t !== 0) {
573
573
  for (var n = 0; n < t; ) {
@@ -595,20 +595,20 @@ function zo(e, t, n, r) {
595
595
  if (!n.has(e) && (n.add(e), e.reactions !== null))
596
596
  for (const i of e.reactions) {
597
597
  const o = i.f;
598
- (o & 2) !== 0 ? zo(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && Jr(i, t, r) && (B(i, de), Qr(i));
598
+ (o & 2) !== 0 ? zo(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && Qr(i, t, r) && (B(i, de), Zr(i));
599
599
  }
600
600
  }
601
- function Jr(e, t, n) {
601
+ function Qr(e, t, n) {
602
602
  const r = n.get(e);
603
603
  if (r !== void 0) return r;
604
604
  if (e.deps !== null) for (const i of e.deps) {
605
- if (Cn.call(t, i)) return !0;
606
- if ((i.f & 2) !== 0 && Jr(i, t, n))
605
+ if (Mn.call(t, i)) return !0;
606
+ if ((i.f & 2) !== 0 && Qr(i, t, n))
607
607
  return n.set(i, !0), !0;
608
608
  }
609
609
  return n.set(e, !1), !1;
610
610
  }
611
- function Qr(e) {
611
+ function Zr(e) {
612
612
  C.schedule(e);
613
613
  }
614
614
  function Bo(e, t) {
@@ -626,28 +626,28 @@ function Do(e) {
626
626
  function fl(e) {
627
627
  let t = 0, n = pt(0), r;
628
628
  return () => {
629
- ii() && (T(n), oi(() => (t === 0 && (r = ci(() => e(() => Qt(n)))), t += 1, () => {
629
+ oi() && (T(n), si(() => (t === 0 && (r = ui(() => e(() => Qt(n)))), t += 1, () => {
630
630
  dt(() => {
631
631
  t -= 1, t === 0 && (r?.(), r = void 0, Qt(n));
632
632
  });
633
633
  })));
634
634
  };
635
635
  }
636
- var pl = Kr | Lt;
636
+ var pl = Yr | Lt;
637
637
  function gl(e, t, n, r) {
638
638
  new vl(e, t, n, r);
639
639
  }
640
- var be = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), vl = class {
640
+ var be = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), vl = class {
641
641
  constructor(e, t, n, r) {
642
- Xr(this, G), m(this, "parent", void 0), m(this, "is_pending", !1), m(this, "transform_error", void 0), E(this, be, void 0), E(this, kr, P ? $ : null), E(this, we, void 0), E(this, Zt, void 0), E(this, ae, void 0), E(this, ke, null), E(this, re, null), E(this, ve, null), E(this, st, null), E(this, Et, 0), E(this, at, 0), E(this, pn, !1), E(this, Er, /* @__PURE__ */ new Set()), E(this, xr, /* @__PURE__ */ new Set()), E(this, Xe, null), E(this, Ii, fl(() => (w(Xe, this, pt(f(Et, this))), () => {
642
+ Jr(this, G), m(this, "parent", void 0), m(this, "is_pending", !1), m(this, "transform_error", void 0), E(this, be, void 0), E(this, Er, P ? $ : null), E(this, we, void 0), E(this, Zt, void 0), E(this, ae, void 0), E(this, ke, null), E(this, re, null), E(this, ve, null), E(this, st, null), E(this, Et, 0), E(this, at, 0), E(this, pn, !1), E(this, xr, /* @__PURE__ */ new Set()), E(this, Ar, /* @__PURE__ */ new Set()), E(this, Xe, null), E(this, Ri, fl(() => (w(Xe, this, pt(f(Et, this))), () => {
643
643
  w(Xe, this, null);
644
644
  }))), w(be, this, e), w(we, this, t), w(Zt, this, (i) => {
645
645
  var o = x;
646
646
  o.b = this, o.f |= 128, n(i);
647
- }), this.parent = x.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), w(ae, this, si(() => {
647
+ }), this.parent = x.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), w(ae, this, ai(() => {
648
648
  if (P) {
649
- const i = f(kr, this);
650
- Yn();
649
+ const i = f(Er, this);
650
+ Xn();
651
651
  const o = i.data === "[!";
652
652
  if (i.data.startsWith("[?")) {
653
653
  const s = JSON.parse(i.data.slice(2));
@@ -657,7 +657,7 @@ var be = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), we =
657
657
  }, pl)), P && w(be, this, $);
658
658
  }
659
659
  defer_effect(e) {
660
- $o(e, f(Er, this), f(xr, this));
660
+ $o(e, f(xr, this), f(Ar, this));
661
661
  }
662
662
  is_rendered() {
663
663
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -671,13 +671,13 @@ var be = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), we =
671
671
  }));
672
672
  }
673
673
  get_effect_pending() {
674
- return f(Ii, this).call(this), T(f(Xe, this));
674
+ return f(Ri, this).call(this), T(f(Xe, this));
675
675
  }
676
676
  error(e) {
677
677
  if (!f(we, this).onerror && !f(we, this).failed) throw e;
678
678
  C?.is_fork ? (f(ke, this) && C.skip_effect(f(ke, this)), f(re, this) && C.skip_effect(f(re, this)), f(ve, this) && C.skip_effect(f(ve, this)), C.oncommit(() => {
679
- A(G, this, Ri).call(this, e);
680
- })) : A(G, this, Ri).call(this, e);
679
+ A(G, this, $i).call(this, e);
680
+ })) : A(G, this, $i).call(this, e);
681
681
  }
682
682
  };
683
683
  function ml() {
@@ -698,9 +698,9 @@ function yl() {
698
698
  const e = f(we, this).pending;
699
699
  e && (this.is_pending = !0, w(re, this, ue(() => e(f(be, this)))), dt(() => {
700
700
  var t = w(st, this, document.createDocumentFragment()), n = ye();
701
- t.append(n), w(ke, this, A(G, this, Ar).call(this, () => ue(() => f(Zt, this).call(this, n)))), f(at, this) === 0 && (f(be, this).before(t), w(st, this, null), Tt(f(re, this), () => {
701
+ t.append(n), w(ke, this, A(G, this, Cr).call(this, () => ue(() => f(Zt, this).call(this, n)))), f(at, this) === 0 && (f(be, this).before(t), w(st, this, null), Tt(f(re, this), () => {
702
702
  w(re, this, null);
703
- }), A(G, this, Zr).call(this, C));
703
+ }), A(G, this, ei).call(this, C));
704
704
  }));
705
705
  }
706
706
  function Fo() {
@@ -709,18 +709,18 @@ function Fo() {
709
709
  f(Zt, this).call(this, f(be, this));
710
710
  })), f(at, this) > 0) {
711
711
  var e = w(st, this, document.createDocumentFragment());
712
- li(f(ke, this), e);
712
+ ci(f(ke, this), e);
713
713
  const t = f(we, this).pending;
714
714
  w(re, this, ue(() => t(f(be, this))));
715
- } else A(G, this, Zr).call(this, C);
715
+ } else A(G, this, ei).call(this, C);
716
716
  } catch (t) {
717
717
  this.error(t);
718
718
  }
719
719
  }
720
- function Zr(e) {
721
- this.is_pending = !1, e.transfer_effects(f(Er, this), f(xr, this));
720
+ function ei(e) {
721
+ this.is_pending = !1, e.transfer_effects(f(xr, this), f(Ar, this));
722
722
  }
723
- function Ar(e) {
723
+ function Cr(e) {
724
724
  var t = x, n = M, r = F;
725
725
  Ee(f(ae, this)), he(f(ae, this)), Mt(f(ae, this).ctx);
726
726
  try {
@@ -739,12 +739,12 @@ function jo(e, t) {
739
739
  }
740
740
  return;
741
741
  }
742
- w(at, this, f(at, this) + e), f(at, this) === 0 && (A(G, this, Zr).call(this, t), f(re, this) && Tt(f(re, this), () => {
742
+ w(at, this, f(at, this) + e), f(at, this) === 0 && (A(G, this, ei).call(this, t), f(re, this) && Tt(f(re, this), () => {
743
743
  w(re, this, null);
744
744
  }), f(st, this) && (f(be, this).before(f(st, this)), w(st, this, null)));
745
745
  }
746
- function Ri(e) {
747
- f(ke, this) && (J(f(ke, this)), w(ke, this, null)), f(re, this) && (J(f(re, this)), w(re, this, null)), f(ve, this) && (J(f(ve, this)), w(ve, this, null)), P && (Z(f(kr, this)), tl(), Z(Rn()));
746
+ function $i(e) {
747
+ f(ke, this) && (J(f(ke, this)), w(ke, this, null)), f(re, this) && (J(f(re, this)), w(re, this, null)), f(ve, this) && (J(f(ve, this)), w(ve, this, null)), P && (Z(f(Er, this)), tl(), Z($n()));
748
748
  var t = f(we, this).onerror;
749
749
  let n = f(we, this).failed;
750
750
  var r = !1, i = !1;
@@ -755,7 +755,7 @@ function Ri(e) {
755
755
  }
756
756
  r = !0, i && Qa(), f(ve, this) !== null && Tt(f(ve, this), () => {
757
757
  w(ve, this, null);
758
- }), A(G, this, Ar).call(this, () => {
758
+ }), A(G, this, Cr).call(this, () => {
759
759
  A(G, this, Fo).call(this);
760
760
  });
761
761
  }, s = (a) => {
@@ -764,7 +764,7 @@ function Ri(e) {
764
764
  } catch (l) {
765
765
  Ue(l, f(ae, this) && f(ae, this).parent);
766
766
  }
767
- n && w(ve, this, A(G, this, Ar).call(this, () => {
767
+ n && w(ve, this, A(G, this, Cr).call(this, () => {
768
768
  try {
769
769
  return ue(() => {
770
770
  var l = x;
@@ -787,7 +787,7 @@ function Ri(e) {
787
787
  });
788
788
  }
789
789
  function Tl(e, t, n, r) {
790
- const i = rn() ? en : ei;
790
+ const i = rn() ? en : ti;
791
791
  var o = e.filter((d) => !d.settled);
792
792
  if (n.length === 0 && o.length === 0) {
793
793
  r(t.map(i));
@@ -802,7 +802,7 @@ function Tl(e, t, n, r) {
802
802
  } catch (p) {
803
803
  Ue(p, s);
804
804
  }
805
- zn();
805
+ Bn();
806
806
  }
807
807
  }
808
808
  var u = qo();
@@ -814,7 +814,7 @@ function Tl(e, t, n, r) {
814
814
  Promise.all(n.map((d) => /* @__PURE__ */ Sl(d))).then((d) => c([...t.map(i), ...d])).catch((d) => Ue(d, s)).finally(u);
815
815
  }
816
816
  l ? l.then(() => {
817
- a(), h(), zn();
817
+ a(), h(), Bn();
818
818
  }) : h();
819
819
  }
820
820
  function _l() {
@@ -824,7 +824,7 @@ function _l() {
824
824
  Ee(e), he(t), Mt(n), s && (e.f & 16384) === 0 && (r?.activate(), r?.apply());
825
825
  };
826
826
  }
827
- function zn(e = !0) {
827
+ function Bn(e = !0) {
828
828
  Ee(null), he(null), Mt(null), e && C?.deactivate();
829
829
  }
830
830
  function qo() {
@@ -862,10 +862,10 @@ function Sl(e, t, n) {
862
862
  i = c.promise;
863
863
  try {
864
864
  Promise.resolve(e()).then(c.resolve, (p) => {
865
- p !== Gn && c.reject(p);
866
- }).finally(zn);
865
+ p !== Kn && c.reject(p);
866
+ }).finally(Bn);
867
867
  } catch (p) {
868
- c.reject(p), zn();
868
+ c.reject(p), Bn();
869
869
  }
870
870
  var u = C;
871
871
  if (s) {
@@ -875,7 +875,7 @@ function Sl(e, t, n) {
875
875
  a.add(c), u.async_deriveds.set(l, c);
876
876
  }
877
877
  const d = (p, v = void 0) => {
878
- h?.(), a.delete(c), v !== gn && (u.activate(), v ? (o.f |= In, It(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= In), It(o, p)), u.deactivate());
878
+ h?.(), a.delete(c), v !== gn && (u.activate(), v ? (o.f |= Rn, It(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= Rn), It(o, p)), u.deactivate());
879
879
  };
880
880
  c.promise.then(d, (p) => d(null, p || "unknown"));
881
881
  }), Il(() => {
@@ -891,12 +891,12 @@ function Sl(e, t, n) {
891
891
  });
892
892
  }
893
893
  // @__NO_SIDE_EFFECTS__
894
- function or(e) {
894
+ function sr(e) {
895
895
  const t = /* @__PURE__ */ en(e);
896
896
  return $e || ls(t), t;
897
897
  }
898
898
  // @__NO_SIDE_EFFECTS__
899
- function ei(e) {
899
+ function ti(e) {
900
900
  const t = /* @__PURE__ */ en(e);
901
901
  return t.equals = Ao, t;
902
902
  }
@@ -907,7 +907,7 @@ function wl(e) {
907
907
  for (var n = 0; n < t.length; n += 1) J(t[n]);
908
908
  }
909
909
  }
910
- function ti(e) {
910
+ function ni(e) {
911
911
  var t, n = x, r = e.parent;
912
912
  if (!Le && r !== null && e.v !== j && (r.f & 24576) !== 0)
913
913
  return Za(), e.v;
@@ -920,22 +920,22 @@ function ti(e) {
920
920
  return t;
921
921
  }
922
922
  function Vo(e) {
923
- var t = ti(e);
924
- if (!e.equals(t) && (e.wv = us(), (!C?.is_fork || e.deps === null) && (C !== null ? (C.capture(e, t, !0), _r?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
923
+ var t = ni(e);
924
+ if (!e.equals(t) && (e.wv = us(), (!C?.is_fork || e.deps === null) && (C !== null ? (C.capture(e, t, !0), Sr?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
925
925
  B(e, ce);
926
926
  return;
927
927
  }
928
- Le || (X !== null ? (ii() || C?.is_fork) && X.set(e, t) : Yr(e));
928
+ Le || (X !== null ? (oi() || C?.is_fork) && X.set(e, t) : Xr(e));
929
929
  }
930
930
  function kl(e) {
931
931
  if (e.effects !== null)
932
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Gn), t.fn !== null && (t.teardown = Ra), t.ac = null, tn(t, 0), ai(t));
932
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Kn), t.fn !== null && (t.teardown = Ra), t.ac = null, tn(t, 0), li(t));
933
933
  }
934
934
  function Uo(e) {
935
935
  if (e.effects !== null)
936
936
  for (const t of e.effects) t.teardown && t.fn !== null && Rt(t);
937
937
  }
938
- var Bn = /* @__PURE__ */ new Set(), lt = /* @__PURE__ */ new Map();
938
+ var Dn = /* @__PURE__ */ new Set(), lt = /* @__PURE__ */ new Map();
939
939
  var Go = !1;
940
940
  function pt(e, t) {
941
941
  var n = {
@@ -956,7 +956,7 @@ function V(e, t) {
956
956
  // @__NO_SIDE_EFFECTS__
957
957
  function Ko(e, t = !1, n = !0) {
958
958
  const r = pt(e);
959
- if (t || (r.equals = Ao), Xn && n && F !== null && F.l !== null) {
959
+ if (t || (r.equals = Ao), Jn && n && F !== null && F.l !== null) {
960
960
  var i;
961
961
  ((i = F.l).s ?? (i.s = [])).push(r);
962
962
  }
@@ -965,7 +965,7 @@ function Ko(e, t = !1, n = !0) {
965
965
  function I(e, t, n = !1) {
966
966
  M !== null && (!me || (M.f & 131072) !== 0) && rn() && (M.f & 4325394) !== 0 && (Te === null || !Te.has(e)) && Ja();
967
967
  let r = n ? tt(t) : t;
968
- return It(e, r, Ln);
968
+ return It(e, r, Pn);
969
969
  }
970
970
  function It(e, t, n = null) {
971
971
  if (!e.equals(t)) {
@@ -973,15 +973,15 @@ function It(e, t, n = null) {
973
973
  var r = yt.ensure();
974
974
  if (r.capture(e, t), (e.f & 2) !== 0) {
975
975
  const i = e;
976
- (e.f & 2048) !== 0 && ti(i), X === null && Yr(i);
976
+ (e.f & 2048) !== 0 && ni(i), X === null && Xr(i);
977
977
  }
978
- e.wv = us(), Yo(e, de, n), rn() && x !== null && (x.f & 1024) !== 0 && (x.f & 96) === 0 && (oe === null ? Hl([e]) : oe.push(e)), !r.is_fork && Bn.size > 0 && !Go && El();
978
+ e.wv = us(), Yo(e, de, n), rn() && x !== null && (x.f & 1024) !== 0 && (x.f & 96) === 0 && (oe === null ? Hl([e]) : oe.push(e)), !r.is_fork && Dn.size > 0 && !Go && El();
979
979
  }
980
980
  return t;
981
981
  }
982
982
  function El() {
983
983
  Go = !1;
984
- for (const e of Bn) {
984
+ for (const e of Dn) {
985
985
  (e.f & 1024) !== 0 && B(e, bt);
986
986
  let t;
987
987
  try {
@@ -991,7 +991,7 @@ function El() {
991
991
  }
992
992
  t && Rt(e);
993
993
  }
994
- Bn.clear();
994
+ Dn.clear();
995
995
  }
996
996
  function Qt(e) {
997
997
  I(e, e.v + 1);
@@ -1003,13 +1003,13 @@ function Yo(e, t, n) {
1003
1003
  var a = r[s], l = a.f;
1004
1004
  if (!(!i && a === x)) {
1005
1005
  var c = (l & de) === 0;
1006
- if (c && B(a, t), (l & 131072) !== 0) Bn.add(a);
1006
+ if (c && B(a, t), (l & 131072) !== 0) Dn.add(a);
1007
1007
  else if ((l & 2) !== 0) {
1008
1008
  var u = a;
1009
1009
  X?.delete(u), (l & 65536) === 0 && (l & 512 && (x === null || (x.f & 2097152) === 0) && (a.f |= nn), Yo(u, bt, n));
1010
1010
  } else if (c) {
1011
1011
  var h = a;
1012
- (l & 16) !== 0 && Se !== null && Se.add(h), n !== null ? n.push(h) : Qr(h);
1012
+ (l & 16) !== 0 && Se !== null && Se.add(h), n !== null ? n.push(h) : Zr(h);
1013
1013
  }
1014
1014
  }
1015
1015
  }
@@ -1022,17 +1022,17 @@ function tt(e) {
1022
1022
  var n = /* @__PURE__ */ new Map(), r = _o(e), i = /* @__PURE__ */ V(0), o = null, s = ct, a = (h) => {
1023
1023
  if (ct === s) return h();
1024
1024
  var d = M, p = ct;
1025
- he(null), Ni(s);
1025
+ he(null), Wi(s);
1026
1026
  var v = h();
1027
- return he(d), Ni(p), v;
1027
+ return he(d), Wi(p), v;
1028
1028
  };
1029
1029
  r && n.set("length", /* @__PURE__ */ V(e.length, o));
1030
1030
  var l = "";
1031
1031
  let c = !1;
1032
1032
  function u(h) {
1033
1033
  if (!c) {
1034
- c = !0, l = h, Ci(i, `${l} version`);
1035
- for (const [d, p] of n) Ci(p, Al(l, d));
1034
+ c = !0, l = h, Mi(i, `${l} version`);
1035
+ for (const [d, p] of n) Mi(p, Al(l, d));
1036
1036
  c = !1;
1037
1037
  }
1038
1038
  }
@@ -1132,12 +1132,12 @@ function tt(e) {
1132
1132
  function Al(e, t) {
1133
1133
  return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : xl.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1134
1134
  }
1135
- var $i, Cl, Xo, Jo, Qo;
1136
- function Cr() {
1137
- if ($i === void 0) {
1138
- $i = window, Cl = document, Xo = /Firefox/.test(navigator.userAgent);
1135
+ var Li, Cl, Xo, Jo, Qo;
1136
+ function Mr() {
1137
+ if (Li === void 0) {
1138
+ Li = window, Cl = document, Xo = /Firefox/.test(navigator.userAgent);
1139
1139
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1140
- Jo = it(t, "firstChild").get, Qo = it(t, "nextSibling").get, Ei(e) && (e[za] = void 0, e[yr] = null, e[Tr] = void 0, e.__e = void 0), Ei(n) && (n[Tn] = void 0);
1140
+ Jo = it(t, "firstChild").get, Qo = it(t, "nextSibling").get, xi(e) && (e[za] = void 0, e[Tr] = null, e[_r] = void 0, e.__e = void 0), xi(n) && (n[Tn] = void 0);
1141
1141
  }
1142
1142
  }
1143
1143
  function ye(e = "") {
@@ -1159,9 +1159,9 @@ function vn(e, t) {
1159
1159
  var r = ye();
1160
1160
  return n?.before(r), Z(r), r;
1161
1161
  }
1162
- return t && ri(n), Z(n), n;
1162
+ return t && ii(n), Z(n), n;
1163
1163
  }
1164
- function sr(e, t = !1) {
1164
+ function ar(e, t = !1) {
1165
1165
  if (!P) {
1166
1166
  var n = /* @__PURE__ */ gt(e);
1167
1167
  return n instanceof Comment && n.data === "" ? /* @__PURE__ */ xe(n) : n;
@@ -1171,7 +1171,7 @@ function sr(e, t = !1) {
1171
1171
  var r = ye();
1172
1172
  return $?.before(r), Z(r), r;
1173
1173
  }
1174
- ri($);
1174
+ ii($);
1175
1175
  }
1176
1176
  return $;
1177
1177
  }
@@ -1185,7 +1185,7 @@ function ze(e, t = 1, n = !1) {
1185
1185
  var o = ye();
1186
1186
  return r === null ? i?.after(o) : r.before(o), Z(o), o;
1187
1187
  }
1188
- ri(r);
1188
+ ii(r);
1189
1189
  }
1190
1190
  return Z(r), r;
1191
1191
  }
@@ -1193,12 +1193,12 @@ function Zo(e) {
1193
1193
  e.textContent = "";
1194
1194
  }
1195
1195
  function es() {
1196
- return !$e || Se !== null ? !1 : (x.f & Gr) !== 0;
1196
+ return !$e || Se !== null ? !1 : (x.f & Kr) !== 0;
1197
1197
  }
1198
- function ni(e, t, n) {
1198
+ function ri(e, t, n) {
1199
1199
  return t == null || t === "http://www.w3.org/1999/xhtml" ? n ? document.createElement(e, { is: n }) : document.createElement(e) : n ? document.createElementNS(t, e, { is: n }) : document.createElementNS(t, e);
1200
1200
  }
1201
- function ri(e) {
1201
+ function ii(e) {
1202
1202
  if (e.nodeValue.length < 65536) return;
1203
1203
  let t = e.nextSibling;
1204
1204
  for (; t !== null && t.nodeType === 3; )
@@ -1222,7 +1222,7 @@ function Ol(e, t) {
1222
1222
  }
1223
1223
  function Ae(e, t) {
1224
1224
  var n = x;
1225
- n !== null && (n.f & 8192) !== 0 && (e |= Ur);
1225
+ n !== null && (n.f & 8192) !== 0 && (e |= Gr);
1226
1226
  var r = {
1227
1227
  ctx: F,
1228
1228
  deps: null,
@@ -1248,7 +1248,7 @@ function Ae(e, t) {
1248
1248
  } catch (s) {
1249
1249
  throw J(r), s;
1250
1250
  }
1251
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= Kr));
1251
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= Yr));
1252
1252
  }
1253
1253
  if (i !== null && (i.parent = n, n !== null && Ol(i, n), M !== null && (M.f & 2) !== 0 && (e & 64) === 0)) {
1254
1254
  var o = M;
@@ -1256,14 +1256,14 @@ function Ae(e, t) {
1256
1256
  }
1257
1257
  return r;
1258
1258
  }
1259
- function ii() {
1259
+ function oi() {
1260
1260
  return M !== null && !me;
1261
1261
  }
1262
1262
  function Il(e) {
1263
1263
  const t = Ae(8, null);
1264
1264
  return B(t, ce), t.teardown = e, t;
1265
1265
  }
1266
- function Li(e) {
1266
+ function Pi(e) {
1267
1267
  Ml("$effect");
1268
1268
  var t = x.f;
1269
1269
  if (!M && (t & 32) !== 0 && F !== null && !F.i) {
@@ -1296,7 +1296,7 @@ function rs(e) {
1296
1296
  function Ll(e) {
1297
1297
  return Ae(Na | Lt, e);
1298
1298
  }
1299
- function oi(e, t = 0) {
1299
+ function si(e, t = 0) {
1300
1300
  return Ae(8 | t, e);
1301
1301
  }
1302
1302
  function mn(e, t = [], n = [], r = []) {
@@ -1304,7 +1304,7 @@ function mn(e, t = [], n = [], r = []) {
1304
1304
  Ae(8, () => e(...i.map(T)));
1305
1305
  });
1306
1306
  }
1307
- function si(e, t = 0) {
1307
+ function ai(e, t = 0) {
1308
1308
  var n = Ae(16 | t, e);
1309
1309
  return n;
1310
1310
  }
@@ -1315,20 +1315,20 @@ function is(e) {
1315
1315
  var t = e.teardown;
1316
1316
  if (t !== null) {
1317
1317
  const n = Le, r = M;
1318
- Pi(!0), he(null);
1318
+ Ni(!0), he(null);
1319
1319
  try {
1320
1320
  t.call(null);
1321
1321
  } finally {
1322
- Pi(n), he(r);
1322
+ Ni(n), he(r);
1323
1323
  }
1324
1324
  }
1325
1325
  }
1326
- function ai(e, t = !1) {
1326
+ function li(e, t = !1) {
1327
1327
  var n = e.first;
1328
1328
  for (e.first = e.last = null; n !== null; ) {
1329
1329
  const i = n.ac;
1330
1330
  i !== null && ts(() => {
1331
- i.abort(Gn);
1331
+ i.abort(Kn);
1332
1332
  });
1333
1333
  var r = n.next;
1334
1334
  (n.f & 64) !== 0 ? n.parent = null : J(n, t), n = r;
@@ -1342,10 +1342,10 @@ function Pl(e) {
1342
1342
  }
1343
1343
  function J(e, t = !0) {
1344
1344
  var n = !1;
1345
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Nl(e.nodes.start, e.nodes.end), n = !0), B(e, xi), ai(e, t && !n), tn(e, 0);
1345
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Nl(e.nodes.start, e.nodes.end), n = !0), B(e, Ai), li(e, t && !n), tn(e, 0);
1346
1346
  var r = e.nodes && e.nodes.t;
1347
1347
  if (r !== null) for (const o of r) o.stop();
1348
- is(e), e.f ^= xi, e.f |= La;
1348
+ is(e), e.f ^= Ai, e.f |= La;
1349
1349
  var i = e.parent;
1350
1350
  i !== null && i.first !== null && os(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1351
1351
  }
@@ -1372,7 +1372,7 @@ function Tt(e, t, n = !0) {
1372
1372
  }
1373
1373
  function ss(e, t, n) {
1374
1374
  if ((e.f & 8192) === 0) {
1375
- e.f ^= Ur;
1375
+ e.f ^= Gr;
1376
1376
  var r = e.nodes && e.nodes.t;
1377
1377
  if (r !== null)
1378
1378
  for (const a of r) (a.is_global || n) && t.push(a);
@@ -1386,12 +1386,12 @@ function ss(e, t, n) {
1386
1386
  }
1387
1387
  }
1388
1388
  }
1389
- function Dn(e) {
1389
+ function Fn(e) {
1390
1390
  as(e, !0);
1391
1391
  }
1392
1392
  function as(e, t) {
1393
1393
  if ((e.f & 8192) !== 0) {
1394
- e.f ^= Ur, (e.f & 1024) === 0 && (B(e, de), yt.ensure().schedule(e));
1394
+ e.f ^= Gr, (e.f & 1024) === 0 && (B(e, de), yt.ensure().schedule(e));
1395
1395
  for (var n = e.first; n !== null; ) {
1396
1396
  var r = n.next, i = (n.f & 65536) !== 0 || (n.f & 32) !== 0;
1397
1397
  as(n, i ? t : !1), n = r;
@@ -1401,7 +1401,7 @@ function as(e, t) {
1401
1401
  for (const s of o) (s.is_global || t) && s.in();
1402
1402
  }
1403
1403
  }
1404
- function li(e, t) {
1404
+ function ci(e, t) {
1405
1405
  if (e.nodes)
1406
1406
  for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
1407
1407
  var i = n === r ? null : /* @__PURE__ */ xe(n);
@@ -1409,7 +1409,7 @@ function li(e, t) {
1409
1409
  }
1410
1410
  }
1411
1411
  var Wl = null, wn = !1, Le = !1;
1412
- function Pi(e) {
1412
+ function Ni(e) {
1413
1413
  Le = e;
1414
1414
  }
1415
1415
  var M = null, me = !1;
@@ -1429,7 +1429,7 @@ function Hl(e) {
1429
1429
  oe = e;
1430
1430
  }
1431
1431
  var cs = 1, nt = 0, ct = nt;
1432
- function Ni(e) {
1432
+ function Wi(e) {
1433
1433
  ct = e;
1434
1434
  }
1435
1435
  function us() {
@@ -1452,25 +1452,25 @@ function hs(e, t, n = !0) {
1452
1452
  if (r !== null && !(!$e && Te !== null && Te.has(e)))
1453
1453
  for (var i = 0; i < r.length; i++) {
1454
1454
  var o = r[i];
1455
- (o.f & 2) !== 0 ? hs(o, t, !1) : t === o && (n ? B(o, de) : (o.f & 1024) !== 0 && B(o, bt), Qr(o));
1455
+ (o.f & 2) !== 0 ? hs(o, t, !1) : t === o && (n ? B(o, de) : (o.f & 1024) !== 0 && B(o, bt), Zr(o));
1456
1456
  }
1457
1457
  }
1458
1458
  function ds(e) {
1459
1459
  var t = Q, n = ne, r = oe, i = M, o = Te, s = F, a = me, l = ct, c = e.f;
1460
1460
  Q = null, ne = 0, oe = null, M = (c & 96) === 0 ? e : null, Te = null, Mt(e.ctx), me = !1, ct = ++nt, e.ac !== null && (ts(() => {
1461
- e.ac.abort(Gn);
1461
+ e.ac.abort(Kn);
1462
1462
  }), e.ac = null);
1463
1463
  try {
1464
- e.f |= Ai;
1464
+ e.f |= Ci;
1465
1465
  var u = e.fn, h = u();
1466
- e.f |= Gr;
1466
+ e.f |= Kr;
1467
1467
  var d = e.deps, p = C?.is_fork;
1468
1468
  if (Q !== null) {
1469
1469
  var v;
1470
1470
  if (p || tn(e, ne), d !== null && ne > 0)
1471
1471
  for (d.length = ne + Q.length, v = 0; v < Q.length; v++) d[ne + v] = Q[v];
1472
1472
  else e.deps = d = Q;
1473
- if (ii() && (e.f & 512) !== 0) for (v = ne; v < d.length; v++) {
1473
+ if (oi() && (e.f & 512) !== 0) for (v = ne; v < d.length; v++) {
1474
1474
  var b;
1475
1475
  ((b = d[v]).reactions ?? (b.reactions = [])).push(e);
1476
1476
  }
@@ -1481,11 +1481,11 @@ function ds(e) {
1481
1481
  if (t !== null) for (const g of t) g.rv = nt;
1482
1482
  oe !== null && (r === null ? r = oe : r.push(...oe));
1483
1483
  }
1484
- return (e.f & 8388608) !== 0 && (e.f ^= In), h;
1484
+ return (e.f & 8388608) !== 0 && (e.f ^= Rn), h;
1485
1485
  } catch (g) {
1486
1486
  return Io(g);
1487
1487
  } finally {
1488
- e.f ^= Ai, Q = t, ne = n, oe = r, M = i, Te = o, Mt(s), me = a, ct = l;
1488
+ e.f ^= Ci, Q = t, ne = n, oe = r, M = i, Te = o, Mt(s), me = a, ct = l;
1489
1489
  }
1490
1490
  }
1491
1491
  function zl(e, t) {
@@ -1497,9 +1497,9 @@ function zl(e, t) {
1497
1497
  i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1498
1498
  }
1499
1499
  }
1500
- if (n === null && (t.f & 2) !== 0 && (Q === null || !Cn.call(Q, t))) {
1500
+ if (n === null && (t.f & 2) !== 0 && (Q === null || !Mn.call(Q, t))) {
1501
1501
  var o = t;
1502
- (o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~nn), o.v !== j && Yr(o), kl(o), tn(o, 0);
1502
+ (o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~nn), o.v !== j && Xr(o), kl(o), tn(o, 0);
1503
1503
  }
1504
1504
  }
1505
1505
  function tn(e, t) {
@@ -1515,7 +1515,7 @@ function Rt(e) {
1515
1515
  if (x = e, wn = !0, 0)
1516
1516
  var i, o;
1517
1517
  try {
1518
- (t & 16777232) !== 0 ? Pl(e) : ai(e), is(e);
1518
+ (t & 16777232) !== 0 ? Pl(e) : li(e), is(e);
1519
1519
  var s = ds(e);
1520
1520
  if (e.teardown = typeof s == "function" ? s : null, e.wv = cs, 0)
1521
1521
  for (var a of e.deps) ;
@@ -1532,9 +1532,9 @@ function T(e) {
1532
1532
  e.rv < nt && (e.rv = nt, Q === null && n !== null && n[ne] === e ? ne++ : Q === null ? Q = [e] : Q.push(e));
1533
1533
  else {
1534
1534
  var r;
1535
- (r = M).deps ?? (r.deps = []), Cn.call(M.deps, e) || M.deps.push(e);
1535
+ (r = M).deps ?? (r.deps = []), Mn.call(M.deps, e) || M.deps.push(e);
1536
1536
  var i = e.reactions;
1537
- i === null ? e.reactions = [M] : Cn.call(i, M) || i.push(M);
1537
+ i === null ? e.reactions = [M] : Mn.call(i, M) || i.push(M);
1538
1538
  }
1539
1539
  }
1540
1540
  if (0) {
@@ -1550,9 +1550,9 @@ function T(e) {
1550
1550
  var l = e;
1551
1551
  if (Le) {
1552
1552
  var c = l.v;
1553
- return ((l.f & 1024) === 0 && l.reactions !== null || ps(l)) && (c = ti(l)), lt.set(l, c), c;
1553
+ return ((l.f & 1024) === 0 && l.reactions !== null || ps(l)) && (c = ni(l)), lt.set(l, c), c;
1554
1554
  }
1555
- var u = (l.f & 512) === 0 && !me && M !== null && (wn || (M.f & 512) !== 0), h = (l.f & Gr) === 0;
1555
+ var u = (l.f & 512) === 0 && !me && M !== null && (wn || (M.f & 512) !== 0), h = (l.f & Kr) === 0;
1556
1556
  on(l) && (u && (l.f |= 512), Vo(l)), u && !h && (Uo(l), fs(l));
1557
1557
  }
1558
1558
  if (X?.has(e)) return X.get(e);
@@ -1571,7 +1571,7 @@ function ps(e) {
1571
1571
  if (lt.has(t) || (t.f & 2) !== 0 && ps(t)) return !0;
1572
1572
  return !1;
1573
1573
  }
1574
- function ci(e) {
1574
+ function ui(e) {
1575
1575
  var t = me;
1576
1576
  try {
1577
1577
  return me = !0, e();
@@ -1579,19 +1579,19 @@ function ci(e) {
1579
1579
  me = t;
1580
1580
  }
1581
1581
  }
1582
- var At = /* @__PURE__ */ Symbol("events"), gs = /* @__PURE__ */ new Set(), Mr = /* @__PURE__ */ new Set();
1582
+ var At = /* @__PURE__ */ Symbol("events"), gs = /* @__PURE__ */ new Set(), Or = /* @__PURE__ */ new Set();
1583
1583
  function zt(e, t, n) {
1584
1584
  (t[At] ?? (t[At] = {}))[e] = n;
1585
1585
  }
1586
1586
  function Bl(e) {
1587
1587
  for (var t = 0; t < e.length; t++) gs.add(e[t]);
1588
- for (var n of Mr) n(e);
1588
+ for (var n of Or) n(e);
1589
1589
  }
1590
- var Wi = null;
1591
- function Hi(e) {
1590
+ var Hi = null;
1591
+ function zi(e) {
1592
1592
  var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], o = i[0] || e.target;
1593
- Wi = e;
1594
- var s = 0, a = Wi === e && e[At];
1593
+ Hi = e;
1594
+ var s = 0, a = Hi === e && e[At];
1595
1595
  if (a) {
1596
1596
  var l = i.indexOf(a);
1597
1597
  if (l !== -1 && (t === document || t === window)) {
@@ -1603,7 +1603,7 @@ function Hi(e) {
1603
1603
  l <= c && (s = l);
1604
1604
  }
1605
1605
  if (o = i[s] || e.target, o !== t) {
1606
- On(e, "currentTarget", {
1606
+ In(e, "currentTarget", {
1607
1607
  configurable: !0,
1608
1608
  get() {
1609
1609
  return o || n;
@@ -1638,7 +1638,7 @@ function Fl(e) {
1638
1638
  return Dl?.createHTML(e) ?? e;
1639
1639
  }
1640
1640
  function jl(e) {
1641
- var t = ni("template");
1641
+ var t = ri("template");
1642
1642
  return t.innerHTML = Fl(e.replaceAll("<!>", "<!---->")), t.content;
1643
1643
  }
1644
1644
  function kn(e, t) {
@@ -1668,7 +1668,7 @@ function _t(e, t) {
1668
1668
  function qe(e, t) {
1669
1669
  if (P) {
1670
1670
  var n = x;
1671
- ((n.f & 32768) === 0 || n.nodes.end === null) && (n.nodes.end = $), Yn();
1671
+ ((n.f & 32768) === 0 || n.nodes.end === null) && (n.nodes.end = $), Xn();
1672
1672
  return;
1673
1673
  }
1674
1674
  e !== null && e.before(t);
@@ -1702,7 +1702,7 @@ var ql = [
1702
1702
  "defer",
1703
1703
  "disablepictureinpicture",
1704
1704
  "disableremoteplayback"
1705
- ], Hd = [
1705
+ ], Nd = [
1706
1706
  ...ql,
1707
1707
  "formNoValidate",
1708
1708
  "isMap",
@@ -1727,7 +1727,7 @@ var Gl = [
1727
1727
  "$state.raw",
1728
1728
  "$derived",
1729
1729
  "$derived.by"
1730
- ], zd = [
1730
+ ], Wd = [
1731
1731
  ...Gl,
1732
1732
  "$state.eager",
1733
1733
  "$state.snapshot",
@@ -1743,8 +1743,8 @@ var Gl = [
1743
1743
  "$inspect().with",
1744
1744
  "$inspect.trace",
1745
1745
  "$host"
1746
- ], zi = !0;
1747
- function Bi(e, t) {
1746
+ ], Bi = !0;
1747
+ function Di(e, t) {
1748
1748
  var n, r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1749
1749
  r !== ((n = e)[Tn] ?? (n[Tn] = e.nodeValue)) && (e[Tn] = r, e.nodeValue = `${r}`);
1750
1750
  }
@@ -1752,7 +1752,7 @@ function vs(e, t) {
1752
1752
  return ms(e, t);
1753
1753
  }
1754
1754
  function Kl(e, t) {
1755
- Cr(), t.intro = t.intro ?? !1;
1755
+ Mr(), t.intro = t.intro ?? !1;
1756
1756
  const n = t.target, r = P, i = $;
1757
1757
  try {
1758
1758
  for (var o = /* @__PURE__ */ gt(n); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ xe(o);
@@ -1766,22 +1766,22 @@ function Kl(e, t) {
1766
1766
  } catch (s) {
1767
1767
  if (s instanceof Error && s.message.split(`
1768
1768
  `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1769
- return s !== Ct && console.warn("Failed to hydrate: ", s), t.recover === !1 && Ga(), Cr(), Zo(n), Ie(!1), vs(e, t);
1769
+ return s !== Ct && console.warn("Failed to hydrate: ", s), t.recover === !1 && Ga(), Mr(), Zo(n), Ie(!1), vs(e, t);
1770
1770
  } finally {
1771
1771
  Ie(r), Z(i);
1772
1772
  }
1773
1773
  }
1774
1774
  var bn = /* @__PURE__ */ new Map();
1775
1775
  function ms(e, { target: t, anchor: n, props: r = {}, events: i, context: o, intro: s = !0, transformError: a }) {
1776
- Cr();
1776
+ Mr();
1777
1777
  var l = void 0, c = $l(() => {
1778
1778
  var u = n ?? t.appendChild(ye());
1779
1779
  gl(u, { pending: () => {
1780
1780
  } }, (p) => {
1781
1781
  Co({});
1782
1782
  var v = F;
1783
- if (o && (v.c = o), i && (r.$$events = i), P && kn(p, null), zi = s, l = e(p, r) || {}, zi = !0, P && (x.nodes.end = $, $ === null || $.nodeType !== 8 || $.data !== "]"))
1784
- throw Kn(), Ct;
1783
+ if (o && (v.c = o), i && (r.$$events = i), P && kn(p, null), Bi = s, l = e(p, r) || {}, Bi = !0, P && (x.nodes.end = $, $ === null || $.nodeType !== 8 || $.data !== "]"))
1784
+ throw Yn(), Ct;
1785
1785
  Mo();
1786
1786
  }, a);
1787
1787
  var h = /* @__PURE__ */ new Set(), d = (p) => {
@@ -1794,36 +1794,36 @@ function ms(e, { target: t, anchor: n, props: r = {}, events: i, context: o, int
1794
1794
  var y = bn.get(N);
1795
1795
  y === void 0 && (y = /* @__PURE__ */ new Map(), bn.set(N, y));
1796
1796
  var O = y.get(b);
1797
- O === void 0 ? (N.addEventListener(b, Hi, { passive: g }), y.set(b, 1)) : y.set(b, O + 1);
1797
+ O === void 0 ? (N.addEventListener(b, zi, { passive: g }), y.set(b, 1)) : y.set(b, O + 1);
1798
1798
  }
1799
1799
  }
1800
1800
  }
1801
1801
  };
1802
- return d(Un(gs)), Mr.add(d), () => {
1802
+ return d(Gn(gs)), Or.add(d), () => {
1803
1803
  for (var p of h) for (const g of [t, document]) {
1804
1804
  var v = bn.get(g), b = v.get(p);
1805
- --b == 0 ? (g.removeEventListener(p, Hi), v.delete(p), v.size === 0 && bn.delete(g)) : v.set(p, b);
1805
+ --b == 0 ? (g.removeEventListener(p, zi), v.delete(p), v.size === 0 && bn.delete(g)) : v.set(p, b);
1806
1806
  }
1807
- Mr.delete(d), u !== n && u.parentNode?.removeChild(u);
1807
+ Or.delete(d), u !== n && u.parentNode?.removeChild(u);
1808
1808
  };
1809
1809
  });
1810
- return Or.set(l, c), l;
1810
+ return Ir.set(l, c), l;
1811
1811
  }
1812
- var Or = /* @__PURE__ */ new WeakMap();
1812
+ var Ir = /* @__PURE__ */ new WeakMap();
1813
1813
  function Yl(e, t) {
1814
- const n = Or.get(e);
1815
- return n ? (Or.delete(e), n(t)) : Promise.resolve();
1814
+ const n = Ir.get(e);
1815
+ return n ? (Ir.delete(e), n(t)) : Promise.resolve();
1816
1816
  }
1817
- var Oe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Xl = class {
1817
+ var Oe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Xl = class {
1818
1818
  constructor(e, t = !0) {
1819
- m(this, "anchor", void 0), E(this, Oe, /* @__PURE__ */ new Map()), E(this, Be, /* @__PURE__ */ new Map()), E(this, ge, /* @__PURE__ */ new Map()), E(this, Bt, /* @__PURE__ */ new Set()), E(this, ar, !0), E(this, lr, (n) => {
1819
+ m(this, "anchor", void 0), E(this, Oe, /* @__PURE__ */ new Map()), E(this, Be, /* @__PURE__ */ new Map()), E(this, ge, /* @__PURE__ */ new Map()), E(this, Bt, /* @__PURE__ */ new Set()), E(this, lr, !0), E(this, cr, (n) => {
1820
1820
  if (f(Oe, this).has(n)) {
1821
1821
  var r = f(Oe, this).get(n), i = f(Be, this).get(r);
1822
1822
  if (i)
1823
- Dn(i), f(Bt, this).delete(r);
1823
+ Fn(i), f(Bt, this).delete(r);
1824
1824
  else {
1825
1825
  var o = f(ge, this).get(r);
1826
- o && (Dn(o.effect), f(Be, this).set(r, o.effect), f(ge, this).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
1826
+ o && (Fn(o.effect), f(Be, this).set(r, o.effect), f(ge, this).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
1827
1827
  }
1828
1828
  for (const [s, a] of f(Oe, this)) {
1829
1829
  if (f(Oe, this).delete(s), s === n) break;
@@ -1835,21 +1835,21 @@ var Oe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ge =
1835
1835
  const l = () => {
1836
1836
  if (Array.from(f(Oe, this).values()).includes(s)) {
1837
1837
  var c = document.createDocumentFragment();
1838
- li(a, c), c.append(ye()), f(ge, this).set(s, {
1838
+ ci(a, c), c.append(ye()), f(ge, this).set(s, {
1839
1839
  effect: a,
1840
1840
  fragment: c
1841
1841
  });
1842
1842
  } else J(a);
1843
1843
  f(Bt, this).delete(s), f(Be, this).delete(s);
1844
1844
  };
1845
- f(ar, this) || !i ? (f(Bt, this).add(s), Tt(a, l, !1)) : l();
1845
+ f(lr, this) || !i ? (f(Bt, this).add(s), Tt(a, l, !1)) : l();
1846
1846
  }
1847
1847
  }
1848
- }), E(this, Di, (n) => {
1848
+ }), E(this, Fi, (n) => {
1849
1849
  f(Oe, this).delete(n);
1850
1850
  const r = Array.from(f(Oe, this).values());
1851
1851
  for (const [i, o] of f(ge, this)) r.includes(i) || (J(o.effect), f(ge, this).delete(i));
1852
- }), this.anchor = e, w(ar, this, t);
1852
+ }), this.anchor = e, w(lr, this, t);
1853
1853
  }
1854
1854
  ensure(e, t) {
1855
1855
  var n = C, r = es();
@@ -1863,27 +1863,27 @@ var Oe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ge =
1863
1863
  if (f(Oe, this).set(n, e), r) {
1864
1864
  for (const [s, a] of f(Be, this)) s === e ? n.unskip_effect(a) : n.skip_effect(a);
1865
1865
  for (const [s, a] of f(ge, this)) s === e ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
1866
- n.oncommit(f(lr, this)), n.ondiscard(f(Di, this));
1866
+ n.oncommit(f(cr, this)), n.ondiscard(f(Fi, this));
1867
1867
  } else
1868
- P && (this.anchor = $), f(lr, this).call(this, n);
1868
+ P && (this.anchor = $), f(cr, this).call(this, n);
1869
1869
  }
1870
1870
  };
1871
1871
  function Dt(e, t, n = !1) {
1872
1872
  var r;
1873
- P && (r = $, Yn());
1874
- var i = new Xl(e), o = n ? Kr : 0;
1873
+ P && (r = $, Xn());
1874
+ var i = new Xl(e), o = n ? Yr : 0;
1875
1875
  function s(a, l) {
1876
1876
  if (P) {
1877
1877
  var c = Eo(r);
1878
1878
  if (a !== parseInt(c.substring(1))) {
1879
- var u = Rn();
1879
+ var u = $n();
1880
1880
  Z(u), i.anchor = u, Ie(!1), i.ensure(a, l), Ie(!0);
1881
1881
  return;
1882
1882
  }
1883
1883
  }
1884
1884
  i.ensure(a, l);
1885
1885
  }
1886
- si(() => {
1886
+ ai(() => {
1887
1887
  var a = !1;
1888
1888
  t((l, c = 0) => {
1889
1889
  a = !0, s(c, l);
@@ -1900,7 +1900,7 @@ function Ql(e, t, n) {
1900
1900
  if (o) {
1901
1901
  if (o.pending.delete(h), o.done.add(h), o.pending.size === 0) {
1902
1902
  var d = e.outrogroups;
1903
- Ir(e, Un(o.done)), d.delete(o), d.size === 0 && (e.outrogroups = null);
1903
+ Rr(e, Gn(o.done)), d.delete(o), d.size === 0 && (e.outrogroups = null);
1904
1904
  }
1905
1905
  } else s -= 1;
1906
1906
  }, !1);
@@ -1911,14 +1911,14 @@ function Ql(e, t, n) {
1911
1911
  var c = n, u = c.parentNode;
1912
1912
  Zo(u), u.append(c), e.items.clear();
1913
1913
  }
1914
- Ir(e, t, !l);
1914
+ Rr(e, t, !l);
1915
1915
  } else
1916
1916
  o = {
1917
1917
  pending: new Set(t),
1918
1918
  done: /* @__PURE__ */ new Set()
1919
1919
  }, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(o);
1920
1920
  }
1921
- function Ir(e, t, n = !0) {
1921
+ function Rr(e, t, n = !0) {
1922
1922
  var r;
1923
1923
  if (e.pending.size > 0) {
1924
1924
  r = /* @__PURE__ */ new Set();
@@ -1926,7 +1926,7 @@ function Ir(e, t, n = !0) {
1926
1926
  }
1927
1927
  for (var i = 0; i < t.length; i++) {
1928
1928
  var o = t[i];
1929
- r?.has(o) ? (o.f |= Yt, li(o, document.createDocumentFragment())) : J(t[i], n);
1929
+ r?.has(o) ? (o.f |= Yt, ci(o, document.createDocumentFragment())) : J(t[i], n);
1930
1930
  }
1931
1931
  }
1932
1932
  var yn;
@@ -1936,13 +1936,13 @@ function Zl(e, t, n, r, i, o = null) {
1936
1936
  var l = e;
1937
1937
  s = P ? Z(/* @__PURE__ */ gt(l)) : l.appendChild(ye());
1938
1938
  }
1939
- P && Yn();
1940
- var c = null, u = /* @__PURE__ */ ei(() => {
1939
+ P && Xn();
1940
+ var c = null, u = /* @__PURE__ */ ti(() => {
1941
1941
  var y = n();
1942
- return _o(y) ? y : y == null ? [] : Un(y);
1942
+ return _o(y) ? y : y == null ? [] : Gn(y);
1943
1943
  }), h, d = /* @__PURE__ */ new Map(), p = !0;
1944
1944
  function v(y) {
1945
- (g.effect.f & 16384) === 0 && (g.pending.delete(y), g.fallback = c, ec(g, h, s, t, r), c !== null && (h.length === 0 ? (c.f & 33554432) === 0 ? Dn(c) : (c.f ^= Yt, Gt(c, null, s)) : Tt(c, () => {
1945
+ (g.effect.f & 16384) === 0 && (g.pending.delete(y), g.fallback = c, ec(g, h, s, t, r), c !== null && (h.length === 0 ? (c.f & 33554432) === 0 ? Fn(c) : (c.f ^= Yt, Gt(c, null, s)) : Tt(c, () => {
1946
1946
  c = null;
1947
1947
  })));
1948
1948
  }
@@ -1950,11 +1950,11 @@ function Zl(e, t, n, r, i, o = null) {
1950
1950
  g.pending.delete(y);
1951
1951
  }
1952
1952
  var g = {
1953
- effect: si(() => {
1953
+ effect: ai(() => {
1954
1954
  h = T(u);
1955
1955
  var y = h.length;
1956
1956
  let O = !1;
1957
- P && Eo(s) === "[!" != (y === 0) && (s = Rn(), Z(s), Ie(!1), O = !0);
1957
+ P && Eo(s) === "[!" != (y === 0) && (s = $n(), Z(s), Ie(!1), O = !0);
1958
1958
  for (var N = /* @__PURE__ */ new Set(), S = C, H = es(), W = 0; W < y; W += 1) {
1959
1959
  P && $.nodeType === 8 && $.data === "]" && (s = $, O = !0, Ie(!1));
1960
1960
  var U = h[W], ee = r(U, W);
@@ -1963,9 +1963,9 @@ function Zl(e, t, n, r, i, o = null) {
1963
1963
  var q = p ? null : a.get(ee);
1964
1964
  q ? (q.v && It(q.v, U), q.i && It(q.i, W), H && S.unskip_effect(q.e)) : (q = tc(a, p ? s : yn ?? (yn = ye()), U, ee, W, i, t, n), p || (q.e.f |= Yt), a.set(ee, q)), N.add(ee);
1965
1965
  }
1966
- if (y === 0 && o && !c && (p ? c = ue(() => o(s)) : (c = ue(() => o(yn ?? (yn = ye()))), c.f |= Yt)), y > N.size && Fa("", "", ""), P && y > 0 && Z(Rn()), !p)
1966
+ if (y === 0 && o && !c && (p ? c = ue(() => o(s)) : (c = ue(() => o(yn ?? (yn = ye()))), c.f |= Yt)), y > N.size && Fa("", "", ""), P && y > 0 && Z($n()), !p)
1967
1967
  if (d.set(S, N), H) {
1968
- for (const [an, nr] of a) N.has(an) || S.skip_effect(nr.e);
1968
+ for (const [an, rr] of a) N.has(an) || S.skip_effect(rr.e);
1969
1969
  S.oncommit(v), S.ondiscard(b);
1970
1970
  } else v(S);
1971
1971
  O && Ie(!0), T(u);
@@ -1989,7 +1989,7 @@ function ec(e, t, n, r, i) {
1989
1989
  for (y = 0; y < s; y += 1) {
1990
1990
  if (v = t[y], b = i(v, y), g = a.get(b).e, e.outrogroups !== null) for (const q of e.outrogroups)
1991
1991
  q.pending.delete(g), q.done.delete(g);
1992
- if ((g.f & 8192) !== 0 && (Dn(g), o && (g.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(g))), (g.f & 33554432) !== 0)
1992
+ if ((g.f & 8192) !== 0 && (Fn(g), o && (g.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(g))), (g.f & 33554432) !== 0)
1993
1993
  if (g.f ^= Yt, g === l) Gt(g, null, n);
1994
1994
  else {
1995
1995
  var O = u ? u.next : l;
@@ -2016,7 +2016,7 @@ function ec(e, t, n, r, i) {
2016
2016
  (g.f & 33554432) === 0 && d.push(g), u = g, l = Ft(g.next);
2017
2017
  }
2018
2018
  if (e.outrogroups !== null) {
2019
- for (const q of e.outrogroups) q.pending.size === 0 && (Ir(e, Un(q.done)), e.outrogroups?.delete(q));
2019
+ for (const q of e.outrogroups) q.pending.size === 0 && (Rr(e, Gn(q.done)), e.outrogroups?.delete(q));
2020
2020
  e.outrogroups.size === 0 && (e.outrogroups = null);
2021
2021
  }
2022
2022
  if (l !== null || c !== void 0) {
@@ -2065,12 +2065,12 @@ function nc(e, t) {
2065
2065
  rs(() => {
2066
2066
  var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
2067
2067
  if (!r.querySelector("#" + t.hash)) {
2068
- const i = ni("style");
2068
+ const i = ri("style");
2069
2069
  i.id = t.hash, i.textContent = t.code, r.appendChild(i);
2070
2070
  }
2071
2071
  });
2072
2072
  }
2073
- function Fi(e, t = !1) {
2073
+ function ji(e, t = !1) {
2074
2074
  var n = t ? " !important;" : ";", r = "";
2075
2075
  for (var i of Object.keys(e)) {
2076
2076
  var o = e[i];
@@ -2078,7 +2078,7 @@ function Fi(e, t = !1) {
2078
2078
  }
2079
2079
  return r;
2080
2080
  }
2081
- function cr(e) {
2081
+ function ur(e) {
2082
2082
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
2083
2083
  }
2084
2084
  function rc(e, t) {
@@ -2087,7 +2087,7 @@ function rc(e, t) {
2087
2087
  if (Array.isArray(t) ? (r = t[0], i = t[1]) : r = t, e) {
2088
2088
  e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
2089
2089
  var o = !1, s = 0, a = !1, l = [];
2090
- r && l.push(...Object.keys(r).map(cr)), i && l.push(...Object.keys(i).map(cr));
2090
+ r && l.push(...Object.keys(r).map(ur)), i && l.push(...Object.keys(i).map(ur));
2091
2091
  var c = 0, u = -1;
2092
2092
  const b = e.length;
2093
2093
  for (var h = 0; h < b; h++) {
@@ -2096,7 +2096,7 @@ function rc(e, t) {
2096
2096
  if (d === ":" && u === -1) u = h;
2097
2097
  else if (d === ";" || h === b - 1) {
2098
2098
  if (u !== -1) {
2099
- var p = cr(e.substring(c, u).trim());
2099
+ var p = ur(e.substring(c, u).trim());
2100
2100
  if (!l.includes(p)) {
2101
2101
  d !== ";" && h++;
2102
2102
  var v = e.substring(c, h).trim();
@@ -2108,26 +2108,26 @@ function rc(e, t) {
2108
2108
  }
2109
2109
  }
2110
2110
  }
2111
- return r && (n += Fi(r)), i && (n += Fi(i, !0)), n = n.trim(), n === "" ? null : n;
2111
+ return r && (n += ji(r)), i && (n += ji(i, !0)), n = n.trim(), n === "" ? null : n;
2112
2112
  }
2113
2113
  return e == null ? null : String(e);
2114
2114
  }
2115
- function ur(e, t = {}, n, r) {
2115
+ function hr(e, t = {}, n, r) {
2116
2116
  for (var i in n) {
2117
2117
  var o = n[i];
2118
2118
  t[i] !== o && (n[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, o, r));
2119
2119
  }
2120
2120
  }
2121
- function ji(e, t, n, r) {
2122
- var i = e[Tr];
2121
+ function qi(e, t, n, r) {
2122
+ var i = e[_r];
2123
2123
  if (P || i !== t) {
2124
2124
  var o = rc(t, r);
2125
- (!P || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[Tr] = t;
2126
- } else r && (Array.isArray(r) ? (ur(e, n?.[0], r[0]), ur(e, n?.[1], r[1], "important")) : ur(e, n, r));
2125
+ (!P || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[_r] = t;
2126
+ } else r && (Array.isArray(r) ? (hr(e, n?.[0], r[0]), hr(e, n?.[1], r[1], "important")) : hr(e, n, r));
2127
2127
  return r;
2128
2128
  }
2129
2129
  var ic = /* @__PURE__ */ Symbol("is custom element"), oc = /* @__PURE__ */ Symbol("is html"), sc = Ba ? "link" : "LINK";
2130
- function qi(e, t, n, r) {
2130
+ function Vi(e, t, n, r) {
2131
2131
  var i = ac(e);
2132
2132
  if (P && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === sc)) {
2133
2133
  r || void 0;
@@ -2137,16 +2137,16 @@ function qi(e, t, n, r) {
2137
2137
  }
2138
2138
  function ac(e) {
2139
2139
  var t;
2140
- return (t = e)[yr] ?? (t[yr] = {
2140
+ return (t = e)[Tr] ?? (t[Tr] = {
2141
2141
  [ic]: e.nodeName.includes("-"),
2142
2142
  [oc]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2143
2143
  });
2144
2144
  }
2145
- var Vi = /* @__PURE__ */ new Map();
2145
+ var Ui = /* @__PURE__ */ new Map();
2146
2146
  function lc(e) {
2147
- var t = e.getAttribute("is") || e.nodeName, n = Vi.get(t);
2147
+ var t = e.getAttribute("is") || e.nodeName, n = Ui.get(t);
2148
2148
  if (n) return n;
2149
- Vi.set(t, n = []);
2149
+ Ui.set(t, n = []);
2150
2150
  for (var r, i = e, o = Element.prototype; o !== i; ) {
2151
2151
  r = Ma(i);
2152
2152
  for (var s in r) r[s].set && s !== "innerHTML" && s !== "textContent" && s !== "innerText" && n.push(s);
@@ -2154,21 +2154,21 @@ function lc(e) {
2154
2154
  }
2155
2155
  return n;
2156
2156
  }
2157
- var bs, xt = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakSet(), ys = class {
2157
+ var bs, xt = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), Gi = /* @__PURE__ */ new WeakSet(), ys = class {
2158
2158
  constructor(e) {
2159
- Xr(this, Ui), E(this, xt, /* @__PURE__ */ new WeakMap()), E(this, Fn, void 0), E(this, hr, void 0), w(hr, this, e);
2159
+ Jr(this, Gi), E(this, xt, /* @__PURE__ */ new WeakMap()), E(this, jn, void 0), E(this, dr, void 0), w(dr, this, e);
2160
2160
  }
2161
2161
  observe(e, t) {
2162
2162
  var n = f(xt, this).get(e) || /* @__PURE__ */ new Set();
2163
- return n.add(t), f(xt, this).set(e, n), A(Ui, this, cc).call(this).observe(e, f(hr, this)), () => {
2163
+ return n.add(t), f(xt, this).set(e, n), A(Gi, this, cc).call(this).observe(e, f(dr, this)), () => {
2164
2164
  var r = f(xt, this).get(e);
2165
- r.delete(t), r.size === 0 && (f(xt, this).delete(e), f(Fn, this).unobserve(e));
2165
+ r.delete(t), r.size === 0 && (f(xt, this).delete(e), f(jn, this).unobserve(e));
2166
2166
  };
2167
2167
  }
2168
2168
  };
2169
2169
  bs = ys;
2170
2170
  function cc() {
2171
- return f(Fn, this) ?? w(Fn, this, new ResizeObserver((e) => {
2171
+ return f(jn, this) ?? w(jn, this, new ResizeObserver((e) => {
2172
2172
  for (var t of e) {
2173
2173
  bs.entries.set(t.target, t);
2174
2174
  for (var n of f(xt, this).get(t.target) || []) n(t);
@@ -2176,22 +2176,22 @@ function cc() {
2176
2176
  }));
2177
2177
  }
2178
2178
  m(ys, "entries", /* @__PURE__ */ new WeakMap());
2179
- function dr(e, t) {
2179
+ function fr(e, t) {
2180
2180
  return e === t || e?.[Xt] === t;
2181
2181
  }
2182
- function Gi(e = {}, t, n, r) {
2182
+ function Ki(e = {}, t, n, r) {
2183
2183
  var i = F.r, o = x;
2184
2184
  return rs(() => {
2185
2185
  var s, a;
2186
- return oi(() => {
2187
- s = a, a = r?.() || [], ci(() => {
2188
- dr(n(...a), e) || (t(e, ...a), s && dr(n(...s), e) && t(null, ...s));
2186
+ return si(() => {
2187
+ s = a, a = r?.() || [], ui(() => {
2188
+ fr(n(...a), e) || (t(e, ...a), s && fr(n(...s), e) && t(null, ...s));
2189
2189
  });
2190
2190
  }), () => {
2191
2191
  let l = o;
2192
2192
  for (; l !== i && l.parent !== null && l.parent.f & 33554432; ) l = l.parent;
2193
2193
  const c = () => {
2194
- a && dr(n(...a), e) && t(null, ...a);
2194
+ a && fr(n(...a), e) && t(null, ...a);
2195
2195
  }, u = l.teardown;
2196
2196
  l.teardown = () => {
2197
2197
  c(), u?.();
@@ -2199,8 +2199,8 @@ function Gi(e = {}, t, n, r) {
2199
2199
  };
2200
2200
  }), e;
2201
2201
  }
2202
- function fr(e, t, n, r) {
2203
- var i = !Xn || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ en(r)), T(c)) : (l && (l = !1, a = s ? ci(r) : r), a);
2202
+ function pr(e, t, n, r) {
2203
+ var i = !Jn || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ en(r)), T(c)) : (l && (l = !1, a = s ? ui(r) : r), a);
2204
2204
  let h;
2205
2205
  if (o) {
2206
2206
  var d = Xt in e || ko in e;
@@ -2222,7 +2222,7 @@ function fr(e, t, n, r) {
2222
2222
  return arguments.length > 0 ? ((!i || !H || g || v) && h(H ? b() : S), S) : b();
2223
2223
  });
2224
2224
  }
2225
- var y = !1, O = ((n & 1) !== 0 ? en : ei)(() => (y = !1, b()));
2225
+ var y = !1, O = ((n & 1) !== 0 ? en : ti)(() => (y = !1, b()));
2226
2226
  o && T(O);
2227
2227
  var N = x;
2228
2228
  return (function(S, H) {
@@ -2267,7 +2267,7 @@ var Je = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), hc =
2267
2267
  transformError: e.transformError
2268
2268
  })), !$e && (!e?.props?.$$host || e.sync === !1) && Sn(), w(Je, this, r.$$events);
2269
2269
  for (const i of Object.keys(f(_e, this)))
2270
- i === "$set" || i === "$destroy" || i === "$on" || On(this, i, {
2270
+ i === "$set" || i === "$destroy" || i === "$on" || In(this, i, {
2271
2271
  get() {
2272
2272
  return f(_e, this)[i];
2273
2273
  },
@@ -2317,7 +2317,7 @@ typeof HTMLElement == "function" && (Ts = class extends HTMLElement {
2317
2317
  if (this.$$cn = !0, !this.$$c) {
2318
2318
  let e = function(r) {
2319
2319
  return (i) => {
2320
- const o = ni("slot");
2320
+ const o = ri("slot");
2321
2321
  r !== "default" && (o.name = r), qe(i, o);
2322
2322
  };
2323
2323
  };
@@ -2338,9 +2338,9 @@ typeof HTMLElement == "function" && (Ts = class extends HTMLElement {
2338
2338
  $$host: this
2339
2339
  }
2340
2340
  }), this.$$me = Rl(() => {
2341
- oi(() => {
2341
+ si(() => {
2342
2342
  this.$$r = !0;
2343
- for (const r of Mn(this.$$c)) {
2343
+ for (const r of On(this.$$c)) {
2344
2344
  if (!this.$$p_d[r]?.reflect) continue;
2345
2345
  this.$$d[r] = this.$$c[r];
2346
2346
  const i = En(r, this.$$d[r], this.$$p_d, "toAttribute");
@@ -2365,7 +2365,7 @@ typeof HTMLElement == "function" && (Ts = class extends HTMLElement {
2365
2365
  });
2366
2366
  }
2367
2367
  $$g_p(e) {
2368
- return Mn(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2368
+ return On(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2369
2369
  }
2370
2370
  });
2371
2371
  function En(e, t, n, r) {
@@ -2406,11 +2406,11 @@ function fc(e, t, n, r, i, o) {
2406
2406
  super(e, n, i), this.$$p_d = t;
2407
2407
  }
2408
2408
  static get observedAttributes() {
2409
- return Mn(t).map((a) => (t[a].attribute || a).toLowerCase());
2409
+ return On(t).map((a) => (t[a].attribute || a).toLowerCase());
2410
2410
  }
2411
2411
  };
2412
- return Mn(t).forEach((a) => {
2413
- On(s.prototype, a, {
2412
+ return On(t).forEach((a) => {
2413
+ In(s.prototype, a, {
2414
2414
  get() {
2415
2415
  return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2416
2416
  },
@@ -2421,7 +2421,7 @@ function fc(e, t, n, r, i, o) {
2421
2421
  }
2422
2422
  });
2423
2423
  }), r.forEach((a) => {
2424
- On(s.prototype, a, { get() {
2424
+ In(s.prototype, a, { get() {
2425
2425
  return this.$$c?.[a];
2426
2426
  } });
2427
2427
  }), o && (s = o(s)), e.element = s, s;
@@ -2451,7 +2451,7 @@ var pc = class extends Event {
2451
2451
  requestValue() {
2452
2452
  this.host.dispatchEvent(new pc(this.context, this.host, this.handleValue, this.subscribe));
2453
2453
  }
2454
- }, Jn = (e) => e, Bd = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Dd = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), vc = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), mc = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2454
+ }, Qn = (e) => e, Hd = Qn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), zd = Qn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), vc = Qn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), mc = Qn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2455
2455
  function _s(e, t, n) {
2456
2456
  let r = !1;
2457
2457
  const i = new gc(e, {
@@ -2557,7 +2557,7 @@ var le;
2557
2557
  (function(e) {
2558
2558
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2559
2559
  })(le || (le = {}));
2560
- var Ss = class Rr {
2560
+ var Ss = class $r {
2561
2561
  constructor(t = {}) {
2562
2562
  if (m(this, "config", void 0), m(this, "ttsWordHighlight", null), m(this, "ttsSentenceHighlight", null), m(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), m(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), m(this, "annotations", /* @__PURE__ */ new Map()), m(this, "colorHighlights", /* @__PURE__ */ new Map()), m(this, "nextAnnotationId", 1), m(this, "supported", !1), m(this, "rangeSerializer", void 0), m(this, "themeObserver", null), m(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new Tc(), typeof CSS > "u" || !("highlights" in CSS)) {
2563
2563
  console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
@@ -2802,10 +2802,10 @@ var Ss = class Rr {
2802
2802
  }
2803
2803
  }
2804
2804
  highlightTTSElementFallbacks(t) {
2805
- typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights, Rr.SENTENCE_FALLBACK_SELECTOR);
2805
+ typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights, $r.SENTENCE_FALLBACK_SELECTOR);
2806
2806
  }
2807
2807
  highlightTTSWordElementFallbacks(t) {
2808
- typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-word-element", this.ttsWordElementHighlights, Rr.WORD_FALLBACK_SELECTOR);
2808
+ typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-word-element", this.ttsWordElementHighlights, $r.WORD_FALLBACK_SELECTOR);
2809
2809
  }
2810
2810
  highlightElementFallbacks(t, n, r, i) {
2811
2811
  for (const o of t) {
@@ -2976,17 +2976,17 @@ function ws(e) {
2976
2976
  console.debug(`[${e}]`, ...t);
2977
2977
  };
2978
2978
  }
2979
- var Fd = ws("I18nService"), pr = {
2979
+ var Bd = ws("I18nService"), gr = {
2980
2980
  assessment: [],
2981
2981
  section: [],
2982
2982
  item: [],
2983
2983
  passage: [],
2984
2984
  rubric: [],
2985
2985
  element: []
2986
- }, gr = {
2987
- section: [...pr.section],
2988
- item: [...pr.item],
2989
- passage: [...pr.passage]
2986
+ }, vr = {
2987
+ section: [...gr.section],
2988
+ item: [...gr.item],
2989
+ passage: [...gr.passage]
2990
2990
  };
2991
2991
  function ut(e) {
2992
2992
  return typeof e == "object" && e !== null && !Array.isArray(e);
@@ -3053,9 +3053,9 @@ function xc(e) {
3053
3053
  blocked: je(Fe(t?.blocked, "policy.blocked"))
3054
3054
  },
3055
3055
  placement: {
3056
- section: je(Fe(n?.section, "placement.section")).length ? je(Fe(n?.section, "placement.section")) : [...gr.section],
3057
- item: je(Fe(n?.item, "placement.item")).length ? je(Fe(n?.item, "placement.item")) : [...gr.item],
3058
- passage: je(Fe(n?.passage, "placement.passage")).length ? je(Fe(n?.passage, "placement.passage")) : [...gr.passage]
3056
+ section: je(Fe(n?.section, "placement.section")).length ? je(Fe(n?.section, "placement.section")) : [...vr.section],
3057
+ item: je(Fe(n?.item, "placement.item")).length ? je(Fe(n?.item, "placement.item")) : [...vr.item],
3058
+ passage: je(Fe(n?.passage, "placement.passage")).length ? je(Fe(n?.passage, "placement.passage")) : [...vr.passage]
3059
3059
  },
3060
3060
  providers: r
3061
3061
  };
@@ -3097,7 +3097,7 @@ function Mc(e, t, n) {
3097
3097
  for (const { pattern: s, reason: a } of Cc) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${n}" ${a}. Inline SVG icons must not include scriptable content.`);
3098
3098
  }
3099
3099
  }
3100
- function Ki(e) {
3100
+ function Yi(e) {
3101
3101
  if (xn(e.toolId, "toolId"), xn(e.name, "name"), xn(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
3102
3102
  if (typeof e.icon == "string" && Mc(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
3103
3103
  const t = e.supportedLevels.find((n) => !Ac.includes(n));
@@ -3120,12 +3120,12 @@ var Oc = class {
3120
3120
  return e.map((t) => this.normalizeToolId(t));
3121
3121
  }
3122
3122
  register(e) {
3123
- if (Ki(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
3123
+ if (Yi(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
3124
3124
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
3125
3125
  this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
3126
3126
  }
3127
3127
  override(e) {
3128
- if (Ki(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
3128
+ if (Yi(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
3129
3129
  const t = this.tools.get(e.toolId);
3130
3130
  if (t.pnpSupportIds) for (const n of t.pnpSupportIds) this.pnpIndex.get(n)?.delete(e.toolId);
3131
3131
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const n of e.pnpSupportIds)
@@ -3264,7 +3264,7 @@ function Rc(e) {
3264
3264
  function xs(e) {
3265
3265
  return e.level === "element";
3266
3266
  }
3267
- function ui(e) {
3267
+ function hi(e) {
3268
3268
  if (xs(e)) {
3269
3269
  const t = e.item.config;
3270
3270
  if (!t) return "";
@@ -3324,8 +3324,8 @@ function ui(e) {
3324
3324
  }
3325
3325
  return "";
3326
3326
  }
3327
- function Qn(e) {
3328
- const t = ui(e);
3327
+ function Zn(e) {
3328
+ const t = hi(e);
3329
3329
  return [
3330
3330
  /<math[>\s]/i,
3331
3331
  /\\\[([^\]]+)\\\]/,
@@ -3362,11 +3362,11 @@ function $c(e) {
3362
3362
  }
3363
3363
  return !1;
3364
3364
  }
3365
- function Zn(e) {
3366
- return ui(e).trim().length >= 10;
3365
+ function er(e) {
3366
+ return hi(e).trim().length >= 10;
3367
3367
  }
3368
3368
  function Lc(e) {
3369
- const t = ui(e);
3369
+ const t = hi(e);
3370
3370
  return [
3371
3371
  /chemistry|chemical|element|atom|molecule|compound/i,
3372
3372
  /periodic\s+table/i,
@@ -3386,7 +3386,7 @@ var Pc = [
3386
3386
  function Wc(e) {
3387
3387
  return Nc.has(e);
3388
3388
  }
3389
- function hi(e, t, n) {
3389
+ function di(e, t, n) {
3390
3390
  const r = e.trim(), i = n.trim();
3391
3391
  if (!r || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
3392
3392
  if (!Wc(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
@@ -3469,7 +3469,7 @@ var Hc = class {
3469
3469
  destroy() {
3470
3470
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
3471
3471
  }
3472
- }, di = (e, t) => {
3472
+ }, fi = (e, t) => {
3473
3473
  const n = t?.useSentenceSegmenter !== !1;
3474
3474
  try {
3475
3475
  if (!n) throw new Error("Segmenter disabled by policy");
@@ -3611,7 +3611,7 @@ var Hc = class {
3611
3611
  }
3612
3612
  segmentSentences(e) {
3613
3613
  const t = this.getSegmentationPolicy();
3614
- return di(e, {
3614
+ return fi(e, {
3615
3615
  locale: t.locale,
3616
3616
  useSentenceSegmenter: t.useSentenceSegmenter
3617
3617
  });
@@ -3811,29 +3811,29 @@ var Hc = class {
3811
3811
  context: t,
3812
3812
  toolbarContext: n
3813
3813
  }) : Kc(i);
3814
- }, $r = /* @__PURE__ */ new WeakMap();
3814
+ }, Lr = /* @__PURE__ */ new WeakMap();
3815
3815
  function Yc(e, t) {
3816
3816
  if (!e) return null;
3817
- const n = $r.get(e), r = n?.get(t);
3817
+ const n = Lr.get(e), r = n?.get(t);
3818
3818
  return r ? r.isConnected ? r : (n?.delete(t), null) : null;
3819
3819
  }
3820
3820
  function Xc(e, t, n) {
3821
3821
  if (!e) return;
3822
- let r = $r.get(e);
3823
- r || (r = /* @__PURE__ */ new Map(), $r.set(e, r)), r.set(t, n);
3822
+ let r = Lr.get(e);
3823
+ r || (r = /* @__PURE__ */ new Map(), Lr.set(e, r)), r.set(t, n);
3824
3824
  }
3825
- function Yi(e) {
3825
+ function Xi(e) {
3826
3826
  return e === "basic" || e === "scientific" ? e : null;
3827
3827
  }
3828
3828
  function Jc(e) {
3829
- const t = e.getToolRenderParams?.("calculator") ?? {}, n = Yi(t.calculatorType), r = t.availableTypes;
3829
+ const t = e.getToolRenderParams?.("calculator") ?? {}, n = Xi(t.calculatorType), r = t.availableTypes;
3830
3830
  return {
3831
3831
  calculatorType: n,
3832
- availableTypes: Array.isArray(r) ? r.map((i) => Yi(i)).filter((i) => i !== null) : n ? [n] : null,
3832
+ availableTypes: Array.isArray(r) ? r.map((i) => Xi(i)).filter((i) => i !== null) : n ? [n] : null,
3833
3833
  displayName: n === "scientific" ? "Scientific Calculator" : n === "basic" ? "Basic Calculator" : "Calculator"
3834
3834
  };
3835
3835
  }
3836
- function Xi(e, t, n) {
3836
+ function Ji(e, t, n) {
3837
3837
  const r = e;
3838
3838
  t ? (r.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete r.calculatorType, e.removeAttribute("calculator-type")), n && n.length > 0 ? r.availableTypes = n : delete r.availableTypes;
3839
3839
  }
@@ -3867,11 +3867,11 @@ var Qc = {
3867
3867
  "scientificCalculator"
3868
3868
  ],
3869
3869
  isVisibleInContext(e) {
3870
- return Qn(e);
3870
+ return Zn(e);
3871
3871
  },
3872
3872
  renderToolbar(e, t) {
3873
- const { calculatorType: n, availableTypes: r, displayName: i } = Jc(t), o = hi(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Yc(t.toolCoordinator, o), l = a ?? Ce(this.toolId, e, t, s);
3874
- a || Xc(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Xi(l, n, r);
3873
+ const { calculatorType: n, availableTypes: r, displayName: i } = Jc(t), o = di(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Yc(t.toolCoordinator, o), l = a ?? Ce(this.toolId, e, t, s);
3874
+ a || Xc(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Ji(l, n, r);
3875
3875
  const c = n === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = n === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, h = {
3876
3876
  toolId: this.toolId,
3877
3877
  label: i,
@@ -3898,13 +3898,17 @@ var Qc = {
3898
3898
  minWidth: 380,
3899
3899
  minHeight: 420,
3900
3900
  initialAlign: "bottom-right",
3901
- initialMargin: 16
3901
+ initialMargin: 16,
3902
+ content: {
3903
+ overflowY: "auto",
3904
+ preserveMinHeight: !0
3905
+ }
3902
3906
  }
3903
3907
  }],
3904
3908
  button: h,
3905
3909
  sync: () => {
3906
3910
  const p = t.isToolVisible(o);
3907
- h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, d !== p && (l.visible = p, d = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Xi(l, n, r);
3911
+ h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, d !== p && (l.visible = p, d = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Ji(l, n, r);
3908
3912
  },
3909
3913
  subscribeActive: (p) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3910
3914
  p(t.isToolVisible(o));
@@ -3945,7 +3949,7 @@ var Qc = {
3945
3949
  }
3946
3950
  const i = /[A-Za-z0-9]/.test(e), o = /[A-Za-z0-9]/.test(t);
3947
3951
  return i && o;
3948
- }, jn = (e, t) => {
3952
+ }, qn = (e, t) => {
3949
3953
  const n = /* @__PURE__ */ new Map();
3950
3954
  if (typeof document > "u" || typeof document.createTreeWalker != "function" || typeof NodeFilter > "u") return {
3951
3955
  text: "",
@@ -3991,13 +3995,13 @@ var Qc = {
3991
3995
  text: h,
3992
3996
  map: n
3993
3997
  };
3994
- }, vr = null, Ji = Promise.resolve(), Zc = (e) => (e || "en").split("-")[0].toLowerCase() || "en", eu = async () => (vr || (vr = import("./sre-CXN7ed6H.js").then((e) => /* @__PURE__ */ Aa(e.default, 1)).then((e) => {
3998
+ }, mr = null, Qi = Promise.resolve(), Zc = (e) => (e || "en").split("-")[0].toLowerCase() || "en", eu = async () => (mr || (mr = import("./sre-CXN7ed6H.js").then((e) => /* @__PURE__ */ Aa(e.default, 1)).then((e) => {
3995
3999
  const t = e.default || e;
3996
4000
  if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
3997
4001
  return t;
3998
- })), vr), tu = (e) => e === "en" ? "clearspeak" : "mathspeak", Qi = (e) => !!e && typeof e == "object" && !Array.isArray(e), Zi = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, er = (e) => {
3999
- if (!Qi(e)) return;
4000
- const t = Zi(e.domain), n = Zi(e.style), r = Qi(e.engineOptions) ? e.engineOptions : void 0;
4002
+ })), mr), tu = (e) => e === "en" ? "clearspeak" : "mathspeak", Zi = (e) => !!e && typeof e == "object" && !Array.isArray(e), eo = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, tr = (e) => {
4003
+ if (!Zi(e)) return;
4004
+ const t = eo(e.domain), n = eo(e.style), r = Zi(e.engineOptions) ? e.engineOptions : void 0;
4001
4005
  if (!(!t && !n && !r))
4002
4006
  return {
4003
4007
  ...t ? { domain: t } : {},
@@ -4005,7 +4009,7 @@ var Qc = {
4005
4009
  ...r ? { engineOptions: r } : {}
4006
4010
  };
4007
4011
  }, nu = async (e, t, n, r) => {
4008
- const i = Zc(t), o = er(r);
4012
+ const i = Zc(t), o = tr(r);
4009
4013
  await e.setupEngine?.({
4010
4014
  ...o?.engineOptions || {},
4011
4015
  locale: i,
@@ -4015,8 +4019,8 @@ var Qc = {
4015
4019
  markup: n
4016
4020
  }), await e.engineReady?.();
4017
4021
  }, ru = async (e) => {
4018
- const t = Ji.then(e, e);
4019
- return Ji = t.then(() => {
4022
+ const t = Qi.then(e, e);
4023
+ return Qi = t.then(() => {
4020
4024
  }, () => {
4021
4025
  }), t;
4022
4026
  }, $s = async (e, t, n, r, i) => ru(async () => (await nu(e, n, r, i), e.toSpeech(t))), iu = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), ou = async (e, t, n, r) => {
@@ -4064,55 +4068,71 @@ var Qc = {
4064
4068
  "expanding-row",
4065
4069
  "floating-overlay",
4066
4070
  "left-aligned"
4067
- ]), eo = (e) => e && typeof e == "object" ? e : {}, au = (e) => e === "polly" || e === "google" || e === "server", ie = (e, t) => e === void 0 ? t : e, qn = (e, t = "left-aligned") => typeof e == "string" && su.has(e) ? e : t, to = Object.freeze([0.8, 1.25]), no = (e) => {
4068
- if (typeof e != "number" || !Number.isFinite(e) || e <= 0) return;
4069
- const t = Math.round(e * 100) / 100;
4070
- return t === 1 ? void 0 : t;
4071
+ ]), Pr = (e) => e && typeof e == "object" ? e : {}, au = (e) => e === "polly" || e === "google" || e === "server", ie = (e, t) => e === void 0 ? t : e, Vn = (e, t = "left-aligned") => typeof e == "string" && su.has(e) ? e : t, Dd = Object.freeze([0.8, 1.25]), to = Object.freeze([
4072
+ {
4073
+ rate: 0.8,
4074
+ label: "Slow",
4075
+ ariaLabel: "Slow speed"
4076
+ },
4077
+ {
4078
+ rate: 1,
4079
+ label: "Normal",
4080
+ ariaLabel: "Normal speed",
4081
+ default: !0
4082
+ },
4083
+ {
4084
+ rate: 1.25,
4085
+ label: "Fast",
4086
+ ariaLabel: "Fast speed"
4087
+ }
4088
+ ]), no = (e) => {
4089
+ if (!(typeof e != "number" || !Number.isFinite(e) || e <= 0))
4090
+ return Math.round(e * 100) / 100;
4071
4091
  }, ro = (e) => {
4072
4092
  if (typeof e != "string") return;
4073
4093
  const t = e.trim();
4074
4094
  return t.length ? t : void 0;
4075
- }, io = (e) => `${e}x`, Ps = (e, t) => t ? `Speed ${e}` : `${e} speed`, lu = (e, t, n) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : Ps(e, n), cu = (e) => {
4076
- if (typeof e == "number") return no(e);
4077
- if (!e || typeof e != "object" || Array.isArray(e)) return;
4078
- const t = e, n = no(t.rate);
4079
- if (n === void 0) return;
4080
- const r = ro(t.label), i = ro(t.ariaLabel);
4081
- return {
4082
- rate: n,
4083
- ...r ? { label: r } : {},
4084
- ...i ? { ariaLabel: i } : {}
4085
- };
4086
- }, Lr = (e) => {
4087
- if (!Array.isArray(e)) return [...to];
4088
- if (e.length === 0) return [];
4089
- const t = /* @__PURE__ */ new Set(), n = [];
4090
- for (const r of e) {
4091
- const i = cu(r);
4092
- if (i === void 0) continue;
4093
- const o = typeof i == "number" ? i : i.rate;
4094
- t.has(o) || (t.add(o), n.push(i));
4095
- }
4096
- return n.length ? n : [...to];
4097
- }, uu = (e) => Lr(e).map((t) => {
4098
- if (typeof t == "number") {
4099
- const i = io(t);
4100
- return {
4101
- rate: t,
4102
- label: i,
4103
- ariaLabel: Ps(i, !0)
4104
- };
4095
+ }, io = (e) => `${e}x`, Ps = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`, lu = (e, t, n) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : Ps(e, n), An = (e) => {
4096
+ const t = Array.isArray(e) ? e : [...to];
4097
+ if (t.length === 0) return [];
4098
+ const n = /* @__PURE__ */ new Set(), r = [];
4099
+ for (const s of t) {
4100
+ const a = Pr(s), l = no(typeof s == "number" ? s : a.rate);
4101
+ if (l === void 0 || n.has(l)) continue;
4102
+ n.add(l);
4103
+ const c = l === 1 ? "Normal" : io(l), u = typeof s == "number" ? c : ro(a.label) || c, h = typeof s == "number" ? l === 1 ? "Normal speed" : Ps(u, !0) : lu(u, ro(a.ariaLabel), u === c);
4104
+ r.push({
4105
+ rate: l,
4106
+ label: u,
4107
+ ariaLabel: h,
4108
+ isDefault: !1,
4109
+ requestedDefault: a.default === !0 || a.isDefault === !0
4110
+ });
4105
4111
  }
4106
- const n = io(t.rate), r = t.label || n;
4107
- return {
4108
- rate: t.rate,
4109
- label: r,
4110
- ariaLabel: lu(r, t.ariaLabel, r === n)
4111
- };
4112
- }), hu = (e) => {
4112
+ if (!r.length) return An(to);
4113
+ if (!n.has(1)) {
4114
+ const s = {
4115
+ rate: 1,
4116
+ label: "Normal",
4117
+ ariaLabel: "Normal speed",
4118
+ isDefault: !1,
4119
+ requestedDefault: !1
4120
+ }, a = r.findIndex((l) => l.rate > 1);
4121
+ a >= 0 ? r.splice(a, 0, s) : r.push(s);
4122
+ }
4123
+ const i = r.findIndex((s) => s.requestedDefault), o = i >= 0 ? i : r.findIndex((s) => s.rate === 1);
4124
+ return r.map(({ requestedDefault: s, ...a }, l) => ({
4125
+ ...a,
4126
+ isDefault: l === o
4127
+ }));
4128
+ }, Fd = Object.freeze([
4129
+ 0.8,
4130
+ 1,
4131
+ 1.25
4132
+ ]), cu = (e) => {
4113
4133
  const t = {
4114
4134
  ...e,
4115
- layoutMode: qn(e.layoutMode)
4135
+ layoutMode: Vn(e.layoutMode)
4116
4136
  }, n = e.backend || "browser";
4117
4137
  if (!au(n)) return t;
4118
4138
  const r = {
@@ -4135,14 +4155,14 @@ var Qc = {
4135
4155
  ...r,
4136
4156
  defaultVoice: ie(r.defaultVoice, "en-US-Wavenet-A")
4137
4157
  } : r;
4138
- }, mr = (e) => {
4139
- const t = eo(e), n = eo(t.settings);
4140
- return hu({
4158
+ }, br = (e) => {
4159
+ const t = Pr(e), n = Pr(t.settings);
4160
+ return cu({
4141
4161
  ...t,
4142
4162
  ...n
4143
4163
  });
4144
- }, Pr = (e) => e.backend || "browser", Ns = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Ws = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), du = (e) => {
4145
- const t = Pr(e), n = Ns(e, t), r = Ws(e, n), i = er(e.mathSpeech);
4164
+ }, Nr = (e) => e.backend || "browser", Ns = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Ws = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), uu = (e) => {
4165
+ const t = Nr(e), n = Ns(e, t), r = Ws(e, n), i = tr(e.mathSpeech);
4146
4166
  return {
4147
4167
  voice: e.defaultVoice,
4148
4168
  rate: e.rate,
@@ -4168,7 +4188,7 @@ var Qc = {
4168
4188
  validateEndpoint: e.validateEndpoint,
4169
4189
  ...typeof e.mathTokenHighlighting == "boolean" ? { mathTokenHighlighting: e.mathTokenHighlighting } : {}
4170
4190
  };
4171
- }, Hs = (e) => qn(e.layoutMode), fu = (e) => {
4191
+ }, Hs = (e) => Vn(e.layoutMode), hu = (e) => {
4172
4192
  switch (Hs(e)) {
4173
4193
  case "reserved-row":
4174
4194
  return {
@@ -4195,21 +4215,21 @@ var Qc = {
4195
4215
  }
4196
4216
  };
4197
4217
  }
4198
- }, jt = /* @__PURE__ */ new Map(), pu = "__pieToolElementUnmount", oo = "pie-tool-active-change", gu = {
4218
+ }, jt = /* @__PURE__ */ new Map(), du = "__pieToolElementUnmount", oo = "pie-tool-active-change", fu = {
4199
4219
  toolId: "textToSpeech",
4200
4220
  name: "Text to Speech",
4201
4221
  description: "Read content aloud",
4202
4222
  icon: "volume-up",
4203
4223
  provider: {
4204
4224
  getProviderId: () => "tts",
4205
- createProvider: (e) => new jc(Pr(mr(e))),
4225
+ createProvider: (e) => new jc(Nr(br(e))),
4206
4226
  getInitConfig: (e) => {
4207
- const t = mr(e), n = Pr(t), r = Ns(t, n);
4227
+ const t = br(e), n = Nr(t), r = Ns(t, n);
4208
4228
  return {
4209
4229
  backend: n,
4210
4230
  serverProvider: r,
4211
4231
  transportMode: Ws(t, r),
4212
- ...du(t)
4232
+ ...uu(t)
4213
4233
  };
4214
4234
  },
4215
4235
  getAuthFetcher: (e) => {
@@ -4218,9 +4238,9 @@ var Qc = {
4218
4238
  },
4219
4239
  sanitizeConfig: (e) => {
4220
4240
  const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
4221
- t && "layoutMode" in t && (t.layoutMode = qn(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = Lr(t.speedOptions));
4241
+ t && "layoutMode" in t && (t.layoutMode = Vn(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = An(t.speedOptions));
4222
4242
  const n = { ...e };
4223
- return "layoutMode" in n && (n.layoutMode = qn(n.layoutMode)), "speedOptions" in n && (n.speedOptions = Lr(n.speedOptions)), t && (n.settings = t), n;
4243
+ return "layoutMode" in n && (n.layoutMode = Vn(n.layoutMode)), "speedOptions" in n && (n.speedOptions = An(n.speedOptions)), t && (n.settings = t), n;
4224
4244
  },
4225
4245
  lazy: !0
4226
4246
  },
@@ -4232,17 +4252,17 @@ var Qc = {
4232
4252
  "speechOutput"
4233
4253
  ],
4234
4254
  isVisibleInContext(e) {
4235
- return Zn(e);
4255
+ return er(e);
4236
4256
  },
4237
4257
  renderToolbar(e, t) {
4238
- const n = () => mr(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => uu(n().speedOptions), i = () => Hs(n()), o = () => fu(n()), s = hi(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
4258
+ const n = () => br(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => An(n().speedOptions), i = () => Hs(n()), o = () => hu(n()), s = di(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
4239
4259
  const u = t.ui?.size;
4240
4260
  return u === "sm" || u === "lg" ? u : "md";
4241
4261
  }, l = () => {
4242
4262
  let u = jt.get(s);
4243
- return u && typeof u.isConnected == "boolean" && !u.isConnected && (jt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[pu] = () => {
4263
+ return u && typeof u.isConnected == "boolean" && !u.isConnected && (jt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[du] = () => {
4244
4264
  jt.get(s) === u && jt.delete(s);
4245
- }, jt.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r(), u;
4265
+ }, jt.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r(), u.showSingleSpeedOption = n().showSingleSpeedOption === !0, u;
4246
4266
  }, c = o();
4247
4267
  return {
4248
4268
  toolId: this.toolId,
@@ -4266,13 +4286,13 @@ var Qc = {
4266
4286
  },
4267
4287
  sync: () => {
4268
4288
  const u = l();
4269
- u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r();
4289
+ u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r(), u.showSingleSpeedOption = n().showSingleSpeedOption === !0;
4270
4290
  }
4271
4291
  };
4272
4292
  }
4273
4293
  };
4274
4294
  function We(e, t) {
4275
- const n = hi(e, t.scope.level, t.scope.scopeId);
4295
+ const n = di(e, t.scope.level, t.scope.scopeId);
4276
4296
  return {
4277
4297
  fullToolId: n,
4278
4298
  isActive: () => t.isToolVisible(n),
@@ -4286,10 +4306,10 @@ function He(e) {
4286
4306
  const t = e.isActive();
4287
4307
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
4288
4308
  }
4289
- function fi(e, t) {
4309
+ function pi(e, t) {
4290
4310
  e.setAttribute("data-pie-tool-surface", t);
4291
4311
  }
4292
- var vu = {
4312
+ var pu = {
4293
4313
  toolId: "ruler",
4294
4314
  name: "Ruler",
4295
4315
  description: "On-screen ruler for measurements",
@@ -4301,7 +4321,7 @@ var vu = {
4301
4321
  ],
4302
4322
  pnpSupportIds: ["ruler", "measurement"],
4303
4323
  isVisibleInContext(e) {
4304
- return Qn(e);
4324
+ return Zn(e);
4305
4325
  },
4306
4326
  renderToolbar(e, t) {
4307
4327
  const n = We(this.toolId, t), r = {
@@ -4314,7 +4334,7 @@ var vu = {
4314
4334
  onClick: () => t.toggleTool(this.toolId),
4315
4335
  active: n.isActive()
4316
4336
  }, i = t.componentOverrides ?? {}, o = Ce(this.toolId, e, t, i);
4317
- return o.setAttribute("tool-id", n.fullToolId), fi(o, "frameless"), {
4337
+ return o.setAttribute("tool-id", n.fullToolId), pi(o, "frameless"), {
4318
4338
  toolId: this.toolId,
4319
4339
  button: r,
4320
4340
  elements: [{
@@ -4331,7 +4351,7 @@ var vu = {
4331
4351
  subscribeActive: n.subscribeActive
4332
4352
  };
4333
4353
  }
4334
- }, mu = {
4354
+ }, gu = {
4335
4355
  toolId: "protractor",
4336
4356
  name: "Protractor",
4337
4357
  description: "On-screen protractor for angle measurements",
@@ -4343,7 +4363,7 @@ var vu = {
4343
4363
  ],
4344
4364
  pnpSupportIds: ["protractor", "angleMeasurement"],
4345
4365
  isVisibleInContext(e) {
4346
- return Qn(e);
4366
+ return Zn(e);
4347
4367
  },
4348
4368
  renderToolbar(e, t) {
4349
4369
  const n = We(this.toolId, t), r = {
@@ -4356,7 +4376,7 @@ var vu = {
4356
4376
  onClick: () => t.toggleTool(this.toolId),
4357
4377
  active: n.isActive()
4358
4378
  }, i = t.componentOverrides ?? {}, o = Ce(this.toolId, e, t, i);
4359
- return o.setAttribute("tool-id", n.fullToolId), fi(o, "frameless"), {
4379
+ return o.setAttribute("tool-id", n.fullToolId), pi(o, "frameless"), {
4360
4380
  toolId: this.toolId,
4361
4381
  button: r,
4362
4382
  elements: [{
@@ -4373,7 +4393,7 @@ var vu = {
4373
4393
  subscribeActive: n.subscribeActive
4374
4394
  };
4375
4395
  }
4376
- }, bu = {
4396
+ }, vu = {
4377
4397
  toolId: "answerEliminator",
4378
4398
  name: "Answer Eliminator",
4379
4399
  description: "Strike through answer choices",
@@ -4420,7 +4440,7 @@ var vu = {
4420
4440
  subscribeActive: n.subscribeActive
4421
4441
  };
4422
4442
  }
4423
- }, yu = {
4443
+ }, mu = {
4424
4444
  toolId: "highlighter",
4425
4445
  name: "Highlighter",
4426
4446
  description: "Highlight text",
@@ -4438,7 +4458,7 @@ var vu = {
4438
4458
  "annotation"
4439
4459
  ],
4440
4460
  isVisibleInContext(e) {
4441
- return Zn(e);
4461
+ return er(e);
4442
4462
  },
4443
4463
  renderToolbar(e, t) {
4444
4464
  const n = We(this.toolId, t), r = {
@@ -4471,7 +4491,7 @@ var vu = {
4471
4491
  subscribeActive: n.subscribeActive
4472
4492
  };
4473
4493
  }
4474
- }, Tu = {
4494
+ }, bu = {
4475
4495
  toolId: "lineReader",
4476
4496
  name: "Line Reader",
4477
4497
  description: "Reading guide overlay",
@@ -4490,7 +4510,7 @@ var vu = {
4490
4510
  "trackingGuide"
4491
4511
  ],
4492
4512
  isVisibleInContext(e) {
4493
- return Zn(e);
4513
+ return er(e);
4494
4514
  },
4495
4515
  renderToolbar(e, t) {
4496
4516
  const n = We(this.toolId, t), r = {
@@ -4503,7 +4523,7 @@ var vu = {
4503
4523
  onClick: () => t.toggleTool(this.toolId),
4504
4524
  active: n.isActive()
4505
4525
  }, i = t.componentOverrides ?? {}, o = Ce(this.toolId, e, t, i);
4506
- return o.setAttribute("tool-id", n.fullToolId), fi(o, "frameless"), {
4526
+ return o.setAttribute("tool-id", n.fullToolId), pi(o, "frameless"), {
4507
4527
  toolId: this.toolId,
4508
4528
  button: r,
4509
4529
  elements: [{
@@ -4520,7 +4540,7 @@ var vu = {
4520
4540
  subscribeActive: n.subscribeActive
4521
4541
  };
4522
4542
  }
4523
- }, _u = {
4543
+ }, yu = {
4524
4544
  toolId: "theme",
4525
4545
  name: "Theme",
4526
4546
  description: "Accessible themes and contrast",
@@ -4575,7 +4595,7 @@ var vu = {
4575
4595
  subscribeActive: n.subscribeActive
4576
4596
  };
4577
4597
  }
4578
- }, Su = {
4598
+ }, Tu = {
4579
4599
  toolId: "annotationToolbar",
4580
4600
  name: "Highlighter",
4581
4601
  description: "Highlight and annotate text",
@@ -4596,7 +4616,7 @@ var vu = {
4596
4616
  "annotation"
4597
4617
  ],
4598
4618
  isVisibleInContext(e) {
4599
- return Zn(e);
4619
+ return er(e);
4600
4620
  },
4601
4621
  renderToolbar(e, t) {
4602
4622
  const n = We(this.toolId, t), r = {
@@ -4626,7 +4646,7 @@ var vu = {
4626
4646
  subscribeActive: n.subscribeActive
4627
4647
  };
4628
4648
  }
4629
- }, wu = {
4649
+ }, _u = {
4630
4650
  toolId: "graph",
4631
4651
  name: "Graph",
4632
4652
  description: "Graphing calculator and coordinate plane",
@@ -4639,7 +4659,7 @@ var vu = {
4639
4659
  "graphingTool"
4640
4660
  ],
4641
4661
  isVisibleInContext(e) {
4642
- return Qn(e);
4662
+ return Zn(e);
4643
4663
  },
4644
4664
  renderToolbar(e, t) {
4645
4665
  const n = We(this.toolId, t), r = {
@@ -4679,7 +4699,7 @@ var vu = {
4679
4699
  subscribeActive: n.subscribeActive
4680
4700
  };
4681
4701
  }
4682
- }, ku = {
4702
+ }, Su = {
4683
4703
  toolId: "periodicTable",
4684
4704
  name: "Periodic Table",
4685
4705
  description: "Chemistry periodic table reference",
@@ -4731,8 +4751,10 @@ var vu = {
4731
4751
  subscribeActive: n.subscribeActive
4732
4752
  };
4733
4753
  }
4734
- }, Eu = [
4754
+ }, wu = [
4735
4755
  Qc,
4756
+ fu,
4757
+ pu,
4736
4758
  gu,
4737
4759
  vu,
4738
4760
  mu,
@@ -4740,11 +4762,9 @@ var vu = {
4740
4762
  yu,
4741
4763
  Tu,
4742
4764
  _u,
4743
- Su,
4744
- wu,
4745
- ku
4765
+ Su
4746
4766
  ];
4747
- function xu(e = {}) {
4767
+ function ku(e = {}) {
4748
4768
  const t = new Oc(), n = {
4749
4769
  toolTagMap: {
4750
4770
  ...Ms,
@@ -4753,32 +4773,32 @@ function xu(e = {}) {
4753
4773
  toolComponentFactory: e.toolComponentFactory,
4754
4774
  toolComponentFactories: e.toolComponentFactories
4755
4775
  }, r = (i) => e.overrides?.[i.toolId] || i;
4756
- return e.includePackagedTools && Au(t, {
4776
+ return e.includePackagedTools && Eu(t, {
4757
4777
  toolIds: e.toolIds,
4758
4778
  applyOverrides: r
4759
4779
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(n), t;
4760
4780
  }
4761
- function Au(e, t = {}) {
4781
+ function Eu(e, t = {}) {
4762
4782
  const n = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, r = t.applyOverrides || ((i) => i);
4763
- for (const i of Eu)
4783
+ for (const i of wu)
4764
4784
  n && !n.has(i.toolId) || e.register(r(i));
4765
4785
  }
4766
- function Cu(e = {}) {
4767
- return xu({
4786
+ function xu(e = {}) {
4787
+ return ku({
4768
4788
  ...e,
4769
4789
  includePackagedTools: !0
4770
4790
  });
4771
4791
  }
4772
- function Mu() {
4773
- const e = Cu(), t = /* @__PURE__ */ new Set();
4792
+ function Au() {
4793
+ const e = xu(), t = /* @__PURE__ */ new Set();
4774
4794
  for (const n of e.getAllTools()) for (const r of n.pnpSupportIds || []) t.add(r);
4775
4795
  return [...t].sort();
4776
4796
  }
4777
- var Ou = Mu(), jd = {
4778
- supports: [...Ou],
4797
+ var Cu = Au(), jd = {
4798
+ supports: [...Cu],
4779
4799
  prohibitedSupports: [],
4780
4800
  activateAtInit: []
4781
- }, Iu = {
4801
+ }, Mu = {
4782
4802
  visual: {
4783
4803
  magnification: "magnification",
4784
4804
  screenMagnifier: "screenMagnifier",
@@ -4891,11 +4911,11 @@ var Ou = Mu(), jd = {
4891
4911
  itemGlossary: "itemGlossary",
4892
4912
  tutorialAvailable: "tutorialAvailable"
4893
4913
  }
4894
- }, qd = Object.values(Iu).flatMap((e) => Object.values(e)), Vd = ws("ToolCoordinator"), so;
4914
+ }, qd = Object.values(Mu).flatMap((e) => Object.values(e)), Vd = ws("ToolCoordinator"), so;
4895
4915
  (function(e) {
4896
4916
  e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
4897
4917
  })(so || (so = {}));
4898
- var Ru = /* @__PURE__ */ new Set([
4918
+ var Ou = /* @__PURE__ */ new Set([
4899
4919
  "speak",
4900
4920
  "p",
4901
4921
  "s",
@@ -4904,20 +4924,20 @@ var Ru = /* @__PURE__ */ new Set([
4904
4924
  "say-as",
4905
4925
  "voice",
4906
4926
  "lang"
4907
- ]), ao = /* @__PURE__ */ new Set(["audio", "phoneme"]), zs = (e) => e.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&#160;/g, " ").replace(/&amp;/g, "&"), An = (e, t, n) => {
4927
+ ]), ao = /* @__PURE__ */ new Set(["audio", "phoneme"]), zs = (e) => e.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&#160;/g, " ").replace(/&amp;/g, "&"), Cn = (e, t, n) => {
4908
4928
  for (let r = 0; r < t.length; r++) e.push({
4909
4929
  char: t[r],
4910
4930
  rawOffset: n === null ? null : n + r
4911
4931
  });
4912
- }, $u = (e, t, n) => {
4932
+ }, Iu = (e, t, n) => {
4913
4933
  const r = t.slice(n).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
4914
- return r ? (An(e, zs(r[0]), n), r[0].length) : 0;
4934
+ return r ? (Cn(e, zs(r[0]), n), r[0].length) : 0;
4915
4935
  }, lo = (e) => {
4916
4936
  e.push({
4917
4937
  char: " ",
4918
4938
  rawOffset: null
4919
4939
  });
4920
- }, Lu = (e) => {
4940
+ }, Ru = (e) => {
4921
4941
  const t = /* @__PURE__ */ new Map(), n = [];
4922
4942
  let r = !0;
4923
4943
  for (const i of e) {
@@ -4933,7 +4953,7 @@ var Ru = /* @__PURE__ */ new Set([
4933
4953
  text: n.join(""),
4934
4954
  rawToSpokenOffsetMap: t
4935
4955
  };
4936
- }, Pu = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", Nu = (e, t) => {
4956
+ }, $u = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", Lu = (e, t) => {
4937
4957
  const n = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), r = e.match(n);
4938
4958
  return zs(r?.[2] ?? r?.[3] ?? "") || null;
4939
4959
  }, Bs = (e) => {
@@ -4943,29 +4963,29 @@ var Ru = /* @__PURE__ */ new Set([
4943
4963
  const s = e[i];
4944
4964
  if (s !== "<") {
4945
4965
  if (s === "&") {
4946
- const d = $u(t, e, i);
4966
+ const d = Iu(t, e, i);
4947
4967
  if (d > 0) {
4948
4968
  i += d;
4949
4969
  continue;
4950
4970
  }
4951
4971
  }
4952
- An(t, s, i), i++;
4972
+ Cn(t, s, i), i++;
4953
4973
  continue;
4954
4974
  }
4955
4975
  const a = e.indexOf(">", i + 1);
4956
4976
  if (a < 0) {
4957
- An(t, s, i), i++;
4977
+ Cn(t, s, i), i++;
4958
4978
  continue;
4959
4979
  }
4960
4980
  r = !0;
4961
- const l = e.slice(i, a + 1), c = Pu(l), u = /^<\s*\//.test(l), h = /\/\s*>$/.test(l);
4981
+ const l = e.slice(i, a + 1), c = $u(l), u = /^<\s*\//.test(l), h = /\/\s*>$/.test(l);
4962
4982
  if (!u && c === "sub") {
4963
- const d = Nu(l, "alias");
4983
+ const d = Lu(l, "alias");
4964
4984
  if (!d) {
4965
4985
  n = !0, i = a + 1;
4966
4986
  continue;
4967
4987
  }
4968
- An(t, d, null);
4988
+ Cn(t, d, null);
4969
4989
  const p = e.toLowerCase().indexOf("</sub>", a + 1);
4970
4990
  i = p >= 0 ? p + 6 : a + 1;
4971
4991
  continue;
@@ -4978,16 +4998,16 @@ var Ru = /* @__PURE__ */ new Set([
4978
4998
  i = a + 1;
4979
4999
  continue;
4980
5000
  }
4981
- c && !Ru.has(c) && !ao.has(c) && c !== "break" && c !== "sub" && (n = !0), !u && (c === "p" || c === "s") && lo(t), i = a + 1;
5001
+ c && !Ou.has(c) && !ao.has(c) && c !== "break" && c !== "sub" && (n = !0), !u && (c === "p" || c === "s") && lo(t), i = a + 1;
4982
5002
  }
4983
- const o = Lu(t);
5003
+ const o = Ru(t);
4984
5004
  return {
4985
5005
  spokenText: z(o.text),
4986
5006
  rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
4987
5007
  unsupportedSemantic: n,
4988
5008
  hasMarkup: r
4989
5009
  };
4990
- }, Wu = Os(), Ds = /* @__PURE__ */ new Map([
5010
+ }, Pu = Os(), Ds = /* @__PURE__ */ new Map([
4991
5011
  ["zero", "0"],
4992
5012
  ["one", "1"],
4993
5013
  ["two", "2"],
@@ -4999,7 +5019,7 @@ var Ru = /* @__PURE__ */ new Set([
4999
5019
  ["eight", "8"],
5000
5020
  ["nine", "9"],
5001
5021
  ["ten", "10"]
5002
- ]), Hu = [
5022
+ ]), Nu = [
5003
5023
  {
5004
5024
  phrase: [
5005
5025
  "plus",
@@ -5074,9 +5094,9 @@ var Ru = /* @__PURE__ */ new Set([
5074
5094
  visible: "+",
5075
5095
  score: 5
5076
5096
  }
5077
- ], Nr = (e) => {
5097
+ ], Wr = (e) => {
5078
5098
  const t = [];
5079
- for (const n of e.matchAll(Wu)) {
5099
+ for (const n of e.matchAll(Pu)) {
5080
5100
  const r = n[0], i = n.index ?? 0;
5081
5101
  t.push({
5082
5102
  text: r,
@@ -5086,16 +5106,16 @@ var Ru = /* @__PURE__ */ new Set([
5086
5106
  });
5087
5107
  }
5088
5108
  return t;
5089
- }, Wr = (e) => Ds.get(e.normalized) || e.normalized, zu = (e, t) => {
5109
+ }, Hr = (e) => Ds.get(e.normalized) || e.normalized, Wu = (e, t) => {
5090
5110
  const n = [];
5091
5111
  for (let r = 0; r < e.length; r++) {
5092
- for (let i = 0; i < t.length; i++) Wr(e[r]) === Wr(t[i]) && n.push({
5112
+ for (let i = 0; i < t.length; i++) Hr(e[r]) === Hr(t[i]) && n.push({
5093
5113
  spokenStartToken: r,
5094
5114
  spokenEndToken: r + 1,
5095
5115
  visibleToken: i,
5096
5116
  score: 10
5097
5117
  });
5098
- for (const i of Hu) {
5118
+ for (const i of Nu) {
5099
5119
  const o = e.slice(r, r + i.phrase.length);
5100
5120
  if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
5101
5121
  for (let s = 0; s < t.length; s++)
@@ -5108,8 +5128,8 @@ var Ru = /* @__PURE__ */ new Set([
5108
5128
  }
5109
5129
  }
5110
5130
  return n;
5111
- }, Bu = (e, t) => {
5112
- const n = zu(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), r = new Array(n.length).fill(0), i = new Array(n.length).fill(-1);
5131
+ }, Hu = (e, t) => {
5132
+ const n = Wu(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), r = new Array(n.length).fill(0), i = new Array(n.length).fill(-1);
5113
5133
  for (let l = 0; l < n.length; l++) {
5114
5134
  const c = n[l];
5115
5135
  r[l] = c.score;
@@ -5138,12 +5158,12 @@ var Ru = /* @__PURE__ */ new Set([
5138
5158
  score: l.score
5139
5159
  };
5140
5160
  });
5141
- }, Du = (e, t, n) => {
5161
+ }, zu = (e, t, n) => {
5142
5162
  if (e.length === 0) return 0;
5143
5163
  const r = e.length / Math.max(1, Math.min(t.length, n.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
5144
5164
  return Math.min(1, r * i);
5145
5165
  }, Fs = (e) => {
5146
- const t = Bs(e.speechText), n = z(e.visibleText), r = t.spokenText, i = Nr(r), o = Nr(n), s = t.unsupportedSemantic ? [] : Bu(i, o), a = Du(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
5166
+ const t = Bs(e.speechText), n = z(e.visibleText), r = t.spokenText, i = Wr(r), o = Wr(n), s = t.unsupportedSemantic ? [] : Hu(i, o), a = zu(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
5147
5167
  return {
5148
5168
  speechText: e.speechText,
5149
5169
  spokenText: r,
@@ -5156,15 +5176,15 @@ var Ru = /* @__PURE__ */ new Set([
5156
5176
  visibleTokens: o,
5157
5177
  rawToSpokenOffsetMap: t.rawToSpokenOffsetMap
5158
5178
  };
5159
- }, pi = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, js = (e) => {
5179
+ }, gi = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, js = (e) => {
5160
5180
  if (!e || /^<[^>]+>$/.test(e.trim())) return null;
5161
- const t = Nr(e)[0];
5181
+ const t = Wr(e)[0];
5162
5182
  return t ? Ds.get(t.normalized) || t.normalized : null;
5163
5183
  }, co = (e, t, n) => {
5164
5184
  const r = js(n);
5165
5185
  if (!t || !r) return !1;
5166
- const i = pi(e.spokenTokens, t.start);
5167
- return i ? Wr(i) === r : !1;
5186
+ const i = gi(e.spokenTokens, t.start);
5187
+ return i ? Hr(i) === r : !1;
5168
5188
  }, uo = (e, t) => {
5169
5189
  const n = e.rawToSpokenOffsetMap.get(t);
5170
5190
  if (n !== void 0) return n;
@@ -5177,19 +5197,19 @@ var Ru = /* @__PURE__ */ new Set([
5177
5197
  }, ho = (e, t, n) => {
5178
5198
  const r = uo(e, t);
5179
5199
  if (r === null) return null;
5180
- const i = uo(e, Math.max(t, t + n - 1)), o = pi(e.spokenTokens, r), s = i !== null && i >= r ? i - r + 1 : o ? o.end - r : n;
5200
+ const i = uo(e, Math.max(t, t + n - 1)), o = gi(e.spokenTokens, r), s = i !== null && i >= r ? i - r + 1 : o ? o.end - r : n;
5181
5201
  return {
5182
5202
  start: r,
5183
5203
  length: Math.max(1, s)
5184
5204
  };
5185
5205
  }, fo = (e, t, n) => {
5186
5206
  if (t < 0 || t >= e.spokenText.length) return null;
5187
- const r = pi(e.spokenTokens, t);
5207
+ const r = gi(e.spokenTokens, t);
5188
5208
  return r ? {
5189
5209
  start: t,
5190
5210
  length: Math.min(n, r.end - t)
5191
5211
  } : null;
5192
- }, Fu = (e, t, n = 1, r) => {
5212
+ }, Bu = (e, t, n = 1, r) => {
5193
5213
  if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
5194
5214
  const i = Math.max(1, Number.isFinite(n) ? n : 1);
5195
5215
  if (r && /^<[^>]+>$/.test(r.trim())) return null;
@@ -5203,7 +5223,7 @@ var Ru = /* @__PURE__ */ new Set([
5203
5223
  return o || s;
5204
5224
  }
5205
5225
  return fo(e, t, i) || ho(e, t, i);
5206
- }, ju = (e, t) => {
5226
+ }, Du = (e, t) => {
5207
5227
  if (e.playbackMode === "region-fallback") return null;
5208
5228
  const n = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
5209
5229
  if (n) return {
@@ -5225,7 +5245,7 @@ var Ru = /* @__PURE__ */ new Set([
5225
5245
  start: Math.min(r.visibleStart, i.visibleStart),
5226
5246
  end: Math.max(r.visibleEnd, i.visibleEnd)
5227
5247
  } : null;
5228
- }, qu = /* @__PURE__ */ new Map([
5248
+ }, Fu = /* @__PURE__ */ new Map([
5229
5249
  ["+", ["plus"]],
5230
5250
  ["-", ["minus", "negative"]],
5231
5251
  ["−", ["minus", "negative"]],
@@ -5249,12 +5269,12 @@ var Ru = /* @__PURE__ */ new Set([
5249
5269
  ["•", ["times"]],
5250
5270
  ["·", ["times"]],
5251
5271
  ["⁢", ["times", "multiplied by"]]
5252
- ]), Vu = /* @__PURE__ */ new Map([
5272
+ ]), ju = /* @__PURE__ */ new Map([
5253
5273
  ["⁡", "function-application"],
5254
5274
  ["⁢", "implicit-multiply"],
5255
5275
  ["⁣", "invisible-separator"],
5256
5276
  ["⁤", "invisible-plus"]
5257
- ]), qs = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), Uu = /* @__PURE__ */ new Map([
5277
+ ]), qs = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), qu = /* @__PURE__ */ new Map([
5258
5278
  ["msqrt", "radical"],
5259
5279
  ["mroot", "radical"],
5260
5280
  ["msub", "subscript"],
@@ -5264,11 +5284,11 @@ var Ru = /* @__PURE__ */ new Set([
5264
5284
  ["munderover", "underoverscript"],
5265
5285
  ["mmultiscripts", "multiscript"],
5266
5286
  ["menclose", "enclosure"]
5267
- ]), Gu = (e) => e.replace(/\s+/g, " ").trim(), ht = (e) => (e.localName || e.tagName || "").toLowerCase(), Ku = (e) => e.nodeType === Node.ELEMENT_NODE, $t = (e) => Array.from(e.childNodes).filter(Ku), gi = (e) => Gu(e.textContent || ""), Pe = (e, t) => ({
5287
+ ]), Vu = (e) => e.replace(/\s+/g, " ").trim(), ht = (e) => (e.localName || e.tagName || "").toLowerCase(), Uu = (e) => e.nodeType === Node.ELEMENT_NODE, $t = (e) => Array.from(e.childNodes).filter(Uu), vi = (e) => Vu(e.textContent || ""), Pe = (e, t) => ({
5268
5288
  type: "element-range",
5269
5289
  quality: t,
5270
5290
  element: e
5271
- }), Yu = (e) => {
5291
+ }), Gu = (e) => {
5272
5292
  switch (e) {
5273
5293
  case "mi":
5274
5294
  return "identifier";
@@ -5284,15 +5304,15 @@ var Ru = /* @__PURE__ */ new Set([
5284
5304
  default:
5285
5305
  return "unknown";
5286
5306
  }
5287
- }, Xu = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Ju = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? qs.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? qu.get(e) || [] : [], vt = (e) => {
5288
- const t = e.normalized ?? Xu(e.text, e.kind || "unknown");
5307
+ }, Ku = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Yu = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? qs.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? Fu.get(e) || [] : [], vt = (e) => {
5308
+ const t = e.normalized ?? Ku(e.text, e.kind || "unknown");
5289
5309
  return {
5290
5310
  id: `math-token-${e.state.nextId++}`,
5291
5311
  kind: e.kind,
5292
5312
  role: e.role,
5293
5313
  text: e.text,
5294
5314
  normalized: t,
5295
- spokenAliases: Ju(e.text, e.kind, e.role),
5315
+ spokenAliases: Yu(e.text, e.kind, e.role),
5296
5316
  sourceElement: e.sourceElement,
5297
5317
  path: e.path,
5298
5318
  target: e.target || Pe(e.sourceElement, "element-range"),
@@ -5302,7 +5322,7 @@ var Ru = /* @__PURE__ */ new Set([
5302
5322
  e[n].push(t);
5303
5323
  }, Vs = (e, t, n) => {
5304
5324
  $t(e).forEach((r, i) => Ne(r, t, `${n}/${ht(r)}[${i}]`));
5305
- }, Qu = (e, t, n) => {
5325
+ }, Xu = (e, t, n) => {
5306
5326
  const r = $t(e);
5307
5327
  r[0] && Ne(r[0], t, `${n}/numerator`), mt(t, vt({
5308
5328
  state: t,
@@ -5313,7 +5333,7 @@ var Ru = /* @__PURE__ */ new Set([
5313
5333
  path: n,
5314
5334
  target: Pe(e, "element-range")
5315
5335
  })), r[1] && Ne(r[1], t, `${n}/denominator`);
5316
- }, Zu = (e, t, n) => {
5336
+ }, Ju = (e, t, n) => {
5317
5337
  const r = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
5318
5338
  mt(t, vt({
5319
5339
  state: t,
@@ -5332,12 +5352,12 @@ var Ru = /* @__PURE__ */ new Set([
5332
5352
  path: `${n}/close`,
5333
5353
  target: Pe(e, "element-range")
5334
5354
  }));
5335
- }, eh = (e, t, n) => {
5355
+ }, Qu = (e, t, n) => {
5336
5356
  const r = $t(e);
5337
5357
  r[0] && Ne(r[0], t, `${n}/base`);
5338
5358
  const i = r[1];
5339
5359
  if (!i) return;
5340
- const o = gi(i);
5360
+ const o = vi(i);
5341
5361
  if (qs.has(o)) {
5342
5362
  mt(t, vt({
5343
5363
  state: t,
@@ -5352,18 +5372,18 @@ var Ru = /* @__PURE__ */ new Set([
5352
5372
  return;
5353
5373
  }
5354
5374
  Ne(i, t, `${n}/exponent`);
5355
- }, th = (e, t, n, r) => {
5375
+ }, Zu = (e, t, n, r) => {
5356
5376
  mt(t, vt({
5357
5377
  state: t,
5358
5378
  kind: "structure",
5359
5379
  role: r,
5360
- text: gi(e) || r,
5380
+ text: vi(e) || r,
5361
5381
  normalized: `\0${r}`,
5362
5382
  sourceElement: e,
5363
5383
  path: n,
5364
5384
  target: Pe(e, "element-range")
5365
5385
  }));
5366
- }, nh = (e, t, n) => {
5386
+ }, eh = (e, t, n) => {
5367
5387
  let r = 0;
5368
5388
  for (const i of $t(e))
5369
5389
  (ht(i) === "mtr" || ht(i) === "mlabeledtr") && (r++, mt(t, vt({
@@ -5376,10 +5396,10 @@ var Ru = /* @__PURE__ */ new Set([
5376
5396
  path: `${n}/row[${r}]`,
5377
5397
  target: Pe(i, "region-fallback")
5378
5398
  }), "layoutTargets")), Ne(i, t, `${n}/${ht(i)}[${r}]`);
5379
- }, rh = (e, t, n) => {
5380
- const r = gi(e);
5399
+ }, th = (e, t, n) => {
5400
+ const r = vi(e);
5381
5401
  if (!r) return;
5382
- const i = Yu(ht(e)), o = i === "operator" ? Vu.get(r) : void 0, s = o ?? (i === "operator" && (r === "(" || r === ")") ? "grouping-fence" : i);
5402
+ const i = Gu(ht(e)), o = i === "operator" ? ju.get(r) : void 0, s = o ?? (i === "operator" && (r === "(" || r === ")") ? "grouping-fence" : i);
5383
5403
  mt(t, vt({
5384
5404
  state: t,
5385
5405
  kind: i,
@@ -5410,19 +5430,19 @@ var Ru = /* @__PURE__ */ new Set([
5410
5430
  case "mtext":
5411
5431
  case "ms":
5412
5432
  case "mspace":
5413
- rh(e, t, n);
5433
+ th(e, t, n);
5414
5434
  return;
5415
5435
  case "mfrac":
5416
- Qu(e, t, n);
5436
+ Xu(e, t, n);
5417
5437
  return;
5418
5438
  case "msup":
5419
- eh(e, t, n);
5439
+ Qu(e, t, n);
5420
5440
  return;
5421
5441
  case "mfenced":
5422
- Zu(e, t, n);
5442
+ Ju(e, t, n);
5423
5443
  return;
5424
5444
  case "mtable":
5425
- nh(e, t, n);
5445
+ eh(e, t, n);
5426
5446
  return;
5427
5447
  case "mphantom":
5428
5448
  return;
@@ -5432,15 +5452,15 @@ var Ru = /* @__PURE__ */ new Set([
5432
5452
  return;
5433
5453
  }
5434
5454
  default: {
5435
- const i = Uu.get(r);
5455
+ const i = qu.get(r);
5436
5456
  if (i) {
5437
- th(e, t, n, i);
5457
+ Zu(e, t, n, i);
5438
5458
  return;
5439
5459
  }
5440
5460
  Vs(e, t, n);
5441
5461
  }
5442
5462
  }
5443
- }, ih = (e) => {
5463
+ }, nh = (e) => {
5444
5464
  const t = {
5445
5465
  tokens: [],
5446
5466
  layoutTargets: [],
@@ -5451,7 +5471,7 @@ var Ru = /* @__PURE__ */ new Set([
5451
5471
  layoutTargets: t.layoutTargets,
5452
5472
  expressionTarget: Pe(e, "region-fallback")
5453
5473
  };
5454
- }, oh = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, sh = 0.95, ah = (e) => {
5474
+ }, rh = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, ih = 0.95, oh = (e) => {
5455
5475
  const t = [], n = /* @__PURE__ */ new Set(), r = (i) => {
5456
5476
  const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
5457
5477
  if (o.length === 0) return;
@@ -5476,11 +5496,11 @@ var Ru = /* @__PURE__ */ new Set([
5476
5496
  o && (r = i.length);
5477
5497
  }
5478
5498
  return r;
5479
- }, lh = (e, t) => {
5499
+ }, sh = (e, t) => {
5480
5500
  const n = [];
5481
5501
  let r = 0;
5482
5502
  for (const i of t) {
5483
- const o = ah(i);
5503
+ const o = oh(i);
5484
5504
  if (i.optional) {
5485
5505
  const s = po(e, r, o);
5486
5506
  s > 0 && (n.push({
@@ -5502,23 +5522,23 @@ var Ru = /* @__PURE__ */ new Set([
5502
5522
  }
5503
5523
  }
5504
5524
  return n;
5505
- }, ch = (e, t, n) => {
5525
+ }, ah = (e, t, n) => {
5506
5526
  const r = n.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
5507
5527
  return r > 0 && i === r && o === t.length;
5508
- }, uh = (e) => e.map(({ speechTokens: t, math: n }) => ({
5528
+ }, lh = (e) => e.map(({ speechTokens: t, math: n }) => ({
5509
5529
  speechTokenIds: t.map((r) => r.id),
5510
5530
  mathTokenIds: [n.id],
5511
5531
  score: 1,
5512
5532
  confidence: 1,
5513
5533
  target: n.target
5514
- })), hh = (e) => {
5515
- const t = e.minExactWordConfidence ?? sh, n = lh(e.speech.tokens, e.math.tokens), r = ch(n, e.speech.tokens, e.math.tokens) ? 1 : 0;
5534
+ })), ch = (e) => {
5535
+ const t = e.minExactWordConfidence ?? ih, n = sh(e.speech.tokens, e.math.tokens), r = ah(n, e.speech.tokens, e.math.tokens) ? 1 : 0;
5516
5536
  return {
5517
- segments: r >= t ? uh(n) : [],
5537
+ segments: r >= t ? lh(n) : [],
5518
5538
  confidence: r,
5519
5539
  fallbackTarget: e.math.expressionTarget
5520
5540
  };
5521
- }, Us = Os(), dh = /* @__PURE__ */ new Map([
5541
+ }, Us = Os(), uh = /* @__PURE__ */ new Map([
5522
5542
  ["zero", "0"],
5523
5543
  ["one", "1"],
5524
5544
  ["two", "2"],
@@ -5532,8 +5552,8 @@ var Ru = /* @__PURE__ */ new Set([
5532
5552
  ["ten", "10"]
5533
5553
  ]), Gs = (e) => {
5534
5554
  const t = e.toLowerCase();
5535
- return dh.get(t) || t;
5536
- }, fh = (e) => {
5555
+ return uh.get(t) || t;
5556
+ }, hh = (e) => {
5537
5557
  const t = [];
5538
5558
  for (const n of e.matchAll(Us)) {
5539
5559
  const r = n[0], i = n.index ?? 0;
@@ -5554,17 +5574,17 @@ var Ru = /* @__PURE__ */ new Set([
5554
5574
  return {
5555
5575
  speechText: e.speechText,
5556
5576
  spokenText: t.spokenText,
5557
- tokens: fh(t.spokenText),
5577
+ tokens: hh(t.spokenText),
5558
5578
  rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
5559
5579
  boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
5560
5580
  unsupportedSemantic: t.unsupportedSemantic,
5561
5581
  hasMarkup: t.hasMarkup
5562
5582
  };
5563
- }, vi = (e) => {
5583
+ }, mi = (e) => {
5564
5584
  if (!e || /^<[^>]+>$/.test(e.trim())) return null;
5565
5585
  const t = e.match(Us);
5566
5586
  return t?.[0] ? Gs(t[0]) : null;
5567
- }, ph = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, gh = (e, t) => {
5587
+ }, dh = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, fh = (e, t) => {
5568
5588
  const n = e.rawToSpokenOffsetMap.get(t);
5569
5589
  if (n !== void 0) return n;
5570
5590
  for (let r = t; r < e.speechText.length; r++) {
@@ -5573,57 +5593,57 @@ var Ru = /* @__PURE__ */ new Set([
5573
5593
  if (e.speechText[r] === ">") break;
5574
5594
  }
5575
5595
  return null;
5576
- }, Hr = (e, t, n) => {
5596
+ }, zr = (e, t, n) => {
5577
5597
  if (t === null) return null;
5578
- const r = ph(e.tokens, t);
5598
+ const r = dh(e.tokens, t);
5579
5599
  return r ? {
5580
5600
  token: r,
5581
5601
  start: t,
5582
5602
  length: Math.max(1, Math.min(n, r.end - t)),
5583
5603
  confidence: 0.75
5584
5604
  } : null;
5585
- }, zr = (e, t) => {
5586
- const n = vi(t);
5605
+ }, Br = (e, t) => {
5606
+ const n = mi(t);
5587
5607
  return !!(e && n && e.token.normalized === n);
5588
- }, vh = (e) => {
5608
+ }, ph = (e) => {
5589
5609
  if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
5590
- const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = Hr(e.tokenization, gh(e.tokenization, e.position), t), r = Hr(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5591
- return zr(n, e.boundaryWord) ? {
5610
+ const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = zr(e.tokenization, fh(e.tokenization, e.position), t), r = zr(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5611
+ return Br(n, e.boundaryWord) ? {
5592
5612
  ...n,
5593
5613
  confidence: 1
5594
- } : zr(r, e.boundaryWord) ? {
5614
+ } : Br(r, e.boundaryWord) ? {
5595
5615
  ...r,
5596
5616
  confidence: 1
5597
- } : e.boundaryWord && vi(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
5598
- }, mh = (e) => {
5617
+ } : e.boundaryWord && mi(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
5618
+ }, gh = (e) => {
5599
5619
  if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
5600
- const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = Hr(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5601
- return zr(n, e.boundaryWord) ? {
5620
+ const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = zr(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5621
+ return Br(n, e.boundaryWord) ? {
5602
5622
  ...n,
5603
5623
  confidence: 1
5604
- } : e.boundaryWord && vi(e.boundaryWord) ? null : n;
5605
- }, Vn = (e) => {
5606
- const t = sn({ speechText: e.speechText }), n = ih(e.mathElement);
5624
+ } : e.boundaryWord && mi(e.boundaryWord) ? null : n;
5625
+ }, Un = (e) => {
5626
+ const t = sn({ speechText: e.speechText }), n = nh(e.mathElement);
5607
5627
  return {
5608
5628
  speech: t,
5609
5629
  math: n,
5610
- result: hh({
5630
+ result: ch({
5611
5631
  speech: t,
5612
5632
  math: n
5613
5633
  })
5614
5634
  };
5615
- }, bh = (e, t) => {
5616
- const n = mh({
5635
+ }, vh = (e, t) => {
5636
+ const n = gh({
5617
5637
  tokenization: e.speech,
5618
5638
  position: t.position,
5619
5639
  length: t.length,
5620
5640
  boundaryWord: t.boundaryWord
5621
5641
  });
5622
- return oh({
5642
+ return rh({
5623
5643
  alignment: e.result,
5624
5644
  boundary: n
5625
5645
  });
5626
- }, yh = (e, t) => {
5646
+ }, mh = (e, t) => {
5627
5647
  if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
5628
5648
  const n = sn({ speechText: t.boundaryWord }).tokens[0];
5629
5649
  if (!n) return null;
@@ -5632,7 +5652,7 @@ var Ru = /* @__PURE__ */ new Set([
5632
5652
  return i.normalized.toLowerCase() === o || i.spokenAliases.some((s) => s.toLowerCase() === o);
5633
5653
  });
5634
5654
  return r.length === 1 ? r[0].target : null;
5635
- }, Br = "http://www.w3.org/1998/Math/MathML", Th = /* @__PURE__ */ new Set([
5655
+ }, Dr = "http://www.w3.org/1998/Math/MathML", bh = /* @__PURE__ */ new Set([
5636
5656
  "math",
5637
5657
  "maction",
5638
5658
  "menclose",
@@ -5666,7 +5686,7 @@ var Ru = /* @__PURE__ */ new Set([
5666
5686
  "semantics",
5667
5687
  "annotation",
5668
5688
  "annotation-xml"
5669
- ]), _h = /* @__PURE__ */ new Set([
5689
+ ]), yh = /* @__PURE__ */ new Set([
5670
5690
  "accent",
5671
5691
  "accentunder",
5672
5692
  "align",
@@ -5718,29 +5738,29 @@ var Ru = /* @__PURE__ */ new Set([
5718
5738
  "width",
5719
5739
  "xmlns",
5720
5740
  "xml:lang"
5721
- ]), Ks = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Sh = (e) => Ks(e).replace(/"/g, "&quot;"), wh = (e, t) => {
5741
+ ]), Ks = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Th = (e) => Ks(e).replace(/"/g, "&quot;"), _h = (e, t) => {
5722
5742
  const n = e.toLowerCase(), r = t.trim().toLowerCase();
5723
- return !!(n.startsWith("on") || !_h.has(n) || r.includes("javascript:") || r.includes("data:text/html"));
5724
- }, kh = (e) => {
5743
+ return !!(n.startsWith("on") || !yh.has(n) || r.includes("javascript:") || r.includes("data:text/html"));
5744
+ }, Sh = (e) => {
5725
5745
  const t = e.localName.toLowerCase();
5726
- if (!Th.has(t)) return !1;
5746
+ if (!bh.has(t)) return !1;
5727
5747
  const n = e.namespaceURI;
5728
- return !n || n === Br || n === "http://www.w3.org/1999/xhtml";
5748
+ return !n || n === Dr || n === "http://www.w3.org/1999/xhtml";
5729
5749
  }, Ys = (e) => {
5730
5750
  if (e.nodeType === Node.TEXT_NODE) return Ks(e.textContent || "");
5731
5751
  if (e.nodeType === Node.COMMENT_NODE) return "";
5732
5752
  if (e.nodeType !== Node.ELEMENT_NODE) return null;
5733
5753
  const t = e;
5734
- if (!kh(t)) return null;
5754
+ if (!Sh(t)) return null;
5735
5755
  const n = t.localName.toLowerCase(), r = [];
5736
5756
  for (const o of Array.from(t.attributes)) {
5737
5757
  const s = o.name.toLowerCase();
5738
- if (!wh(s, o.value)) {
5739
- if (s === "xmlns" && o.value !== Br) return null;
5740
- r.push(`${s}="${Sh(o.value)}"`);
5758
+ if (!_h(s, o.value)) {
5759
+ if (s === "xmlns" && o.value !== Dr) return null;
5760
+ r.push(`${s}="${Th(o.value)}"`);
5741
5761
  }
5742
5762
  }
5743
- n === "math" && !r.some((o) => o.startsWith("xmlns=")) && r.unshift(`xmlns="${Br}"`);
5763
+ n === "math" && !r.some((o) => o.startsWith("xmlns=")) && r.unshift(`xmlns="${Dr}"`);
5744
5764
  const i = [];
5745
5765
  for (const o of Array.from(t.childNodes)) {
5746
5766
  const s = Ys(o);
@@ -5748,10 +5768,10 @@ var Ru = /* @__PURE__ */ new Set([
5748
5768
  i.push(s);
5749
5769
  }
5750
5770
  return `<${n}${r.length > 0 ? ` ${r.join(" ")}` : ""}>${i.join("")}</${n}>`;
5751
- }, Eh = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, br = (e) => {
5771
+ }, wh = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, yr = (e) => {
5752
5772
  const t = String(e || "").trim();
5753
5773
  if (!t) return null;
5754
- const n = Eh(t);
5774
+ const n = wh(t);
5755
5775
  if (!n || n.getElementsByTagName("parsererror").length > 0) return null;
5756
5776
  const r = n.documentElement;
5757
5777
  return !r || r.localName.toLowerCase() !== "math" ? null : Ys(r);
@@ -5766,25 +5786,25 @@ var Ru = /* @__PURE__ */ new Set([
5766
5786
  }), Js = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Qs = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Zs = (e) => {
5767
5787
  const t = e.tagName?.toLowerCase();
5768
5788
  return t === "annotation" || t === "annotation-xml";
5769
- }, xh = (e) => {
5789
+ }, kh = (e) => {
5770
5790
  const t = e.getAttribute("data-mathml");
5771
5791
  return t && t.trim() ? t : null;
5772
- }, Ah = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, Ch = (e) => {
5773
- if (e.tagName.toLowerCase() === "math") return br(e.outerHTML);
5774
- const t = xh(e);
5792
+ }, Eh = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, xh = (e) => {
5793
+ if (e.tagName.toLowerCase() === "math") return yr(e.outerHTML);
5794
+ const t = kh(e);
5775
5795
  if (t) {
5776
- const n = br(t);
5796
+ const n = yr(t);
5777
5797
  if (n) return n;
5778
5798
  }
5779
5799
  if (Js(e)) {
5780
- const n = Ah(e);
5800
+ const n = Eh(e);
5781
5801
  if (n) {
5782
- const r = br(n);
5802
+ const r = yr(n);
5783
5803
  if (r) return r;
5784
5804
  }
5785
5805
  }
5786
5806
  return null;
5787
- }, Mh = /* @__PURE__ */ new Set([
5807
+ }, Ah = /* @__PURE__ */ new Set([
5788
5808
  "P",
5789
5809
  "H1",
5790
5810
  "H2",
@@ -5800,7 +5820,7 @@ var Ru = /* @__PURE__ */ new Set([
5800
5820
  "FIGCAPTION",
5801
5821
  "LABEL",
5802
5822
  "BUTTON"
5803
- ]), Oh = /* @__PURE__ */ new Set([
5823
+ ]), Ch = /* @__PURE__ */ new Set([
5804
5824
  "heading",
5805
5825
  "listitem",
5806
5826
  "option",
@@ -5809,18 +5829,18 @@ var Ru = /* @__PURE__ */ new Set([
5809
5829
  "cell",
5810
5830
  "columnheader",
5811
5831
  "rowheader"
5812
- ]), Ih = (e, t) => {
5832
+ ]), Mh = (e, t) => {
5813
5833
  let n = e.parentElement, r = null;
5814
5834
  for (; n && n !== t; ) {
5815
5835
  const i = (n.getAttribute("role") || "").toLowerCase(), o = n.tagName.toUpperCase();
5816
- if (Mh.has(o) || Oh.has(i)) {
5836
+ if (Ah.has(o) || Ch.has(i)) {
5817
5837
  r = n;
5818
5838
  break;
5819
5839
  }
5820
5840
  n = n.parentElement;
5821
5841
  }
5822
5842
  return r || t;
5823
- }, Rh = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Js(e), rt = (e, t, n) => {
5843
+ }, Oh = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Js(e), rt = (e, t, n) => {
5824
5844
  /[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), n ? (e.map.set(e.position, n), e.lastMapped = n) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
5825
5845
  }, ea = (e, t) => {
5826
5846
  if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
@@ -5853,7 +5873,7 @@ var Ru = /* @__PURE__ */ new Set([
5853
5873
  offset: i
5854
5874
  }), r = !0, e.lastCharWasWhitespace = !1;
5855
5875
  }
5856
- }, $h = (e, t) => {
5876
+ }, Ih = (e, t) => {
5857
5877
  for (let n = 0; n < t.text.length; n++) {
5858
5878
  const r = t.text[n], i = /\s/.test(r), o = t.map.get(n) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
5859
5879
  node: o.node,
@@ -5881,7 +5901,7 @@ var Ru = /* @__PURE__ */ new Set([
5881
5901
  offset: a
5882
5902
  });
5883
5903
  }
5884
- }, Lh = (e) => {
5904
+ }, Rh = (e) => {
5885
5905
  if (typeof DOMParser > "u") return "";
5886
5906
  const t = new DOMParser().parseFromString(e, "application/xml");
5887
5907
  if (t.getElementsByTagName("parsererror").length > 0) return "";
@@ -5897,7 +5917,7 @@ var Ru = /* @__PURE__ */ new Set([
5897
5917
  for (const s of Array.from(o.childNodes)) r(s);
5898
5918
  };
5899
5919
  return r(t.documentElement), z(n.join(" "));
5900
- }, Ph = (e, t, n) => {
5920
+ }, $h = (e, t, n) => {
5901
5921
  const r = Xs(n), i = (a) => {
5902
5922
  if (Pt(a, e)) return;
5903
5923
  if (a.nodeType === 3) {
@@ -5915,15 +5935,15 @@ var Ru = /* @__PURE__ */ new Set([
5915
5935
  text: o,
5916
5936
  map: r.map
5917
5937
  };
5918
- const s = Lh(t);
5938
+ const s = Rh(t);
5919
5939
  return s ? {
5920
5940
  text: s,
5921
5941
  map: /* @__PURE__ */ new Map()
5922
- } : jn(e, n);
5942
+ } : qn(e, n);
5923
5943
  }, na = (e) => {
5924
5944
  for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
5925
5945
  e.chars.pop(), e.position--, e.map.delete(e.position);
5926
- }, Nh = (e, t) => {
5946
+ }, Lh = (e, t) => {
5927
5947
  const n = Xs(t), r = [];
5928
5948
  let i = 0, o, s = !1;
5929
5949
  const a = () => {
@@ -5936,18 +5956,18 @@ var Ru = /* @__PURE__ */ new Set([
5936
5956
  }, l = (u) => {
5937
5957
  if (Pt(u, e)) return;
5938
5958
  if (u.nodeType === Node.TEXT_NODE) {
5939
- const p = Ih(u, e);
5959
+ const p = Mh(u, e);
5940
5960
  o && p !== o && a(), o = p, ta(n, u);
5941
5961
  return;
5942
5962
  }
5943
5963
  if (u.nodeType !== Node.ELEMENT_NODE) return;
5944
5964
  const h = u;
5945
5965
  if (Qs(h)) return;
5946
- const d = Ch(h);
5966
+ const d = xh(h);
5947
5967
  if (d) {
5948
5968
  a();
5949
- const p = Ph(h, d, t);
5950
- $h(n, p);
5969
+ const p = $h(h, d, t);
5970
+ Ih(n, p);
5951
5971
  const v = z(p.text);
5952
5972
  r.push({
5953
5973
  type: "math",
@@ -5970,8 +5990,8 @@ var Ru = /* @__PURE__ */ new Set([
5970
5990
  containsMathMarkup: s
5971
5991
  };
5972
5992
  }, Kt = (e, t) => {
5973
- if (!Rh(e)) {
5974
- const { text: n, map: r } = jn(e, t);
5993
+ if (!Oh(e)) {
5994
+ const { text: n, map: r } = qn(e, t);
5975
5995
  return {
5976
5996
  visibleText: n,
5977
5997
  map: r,
@@ -5982,8 +6002,8 @@ var Ru = /* @__PURE__ */ new Set([
5982
6002
  containsMathMarkup: !1
5983
6003
  };
5984
6004
  }
5985
- return Nh(e, t);
5986
- }, Wh = (e, t) => Ls([e], t), Hh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", zh = /* @__PURE__ */ new Set([
6005
+ return Lh(e, t);
6006
+ }, Ph = (e, t) => Ls([e], t), Nh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Wh = /* @__PURE__ */ new Set([
5987
6007
  "H1",
5988
6008
  "H2",
5989
6009
  "H3",
@@ -5993,17 +6013,17 @@ var Ru = /* @__PURE__ */ new Set([
5993
6013
  "LI",
5994
6014
  "LABEL",
5995
6015
  "BUTTON"
5996
- ]), Bh = /* @__PURE__ */ new Set([
6016
+ ]), Hh = /* @__PURE__ */ new Set([
5997
6017
  "heading",
5998
6018
  "listitem",
5999
6019
  "option",
6000
6020
  "radio"
6001
- ]), Dh = (e) => {
6021
+ ]), zh = (e) => {
6002
6022
  if (e.type !== "text" || !e.sourceElement) return !1;
6003
6023
  const t = e.sourceElement.tagName.toUpperCase(), n = (e.sourceElement.getAttribute("role") || "").toLowerCase();
6004
- return zh.has(t) || Bh.has(n);
6005
- }, Fh = async (e) => {
6006
- const t = e.resolveMathSpeech ?? Wh, { visibleText: n } = e, r = [];
6024
+ return Wh.has(t) || Hh.has(n);
6025
+ }, Bh = async (e) => {
6026
+ const t = e.resolveMathSpeech ?? Ph, { visibleText: n } = e, r = [];
6007
6027
  let i = 0;
6008
6028
  const o = (a) => {
6009
6029
  const l = z(a), c = n.indexOf(l, i), u = c >= 0 ? c : i, h = u + l.length;
@@ -6015,10 +6035,10 @@ var Ru = /* @__PURE__ */ new Set([
6015
6035
  for (let a = 0; a < e.chunks.length; a++) {
6016
6036
  const l = e.chunks[a];
6017
6037
  if (l.type === "text") {
6018
- const p = Dh(l) ? [{
6038
+ const p = zh(l) ? [{
6019
6039
  text: l.text,
6020
6040
  offset: 0
6021
- }] : di(l.text, { locale: e.language });
6041
+ }] : fi(l.text, { locale: e.language });
6022
6042
  for (const v of p) {
6023
6043
  const b = z(v.text);
6024
6044
  if (!b) continue;
@@ -6055,19 +6075,19 @@ var Ru = /* @__PURE__ */ new Set([
6055
6075
  }
6056
6076
  return {
6057
6077
  segments: r,
6058
- locale: Hh(e.language),
6078
+ locale: Nh(e.language),
6059
6079
  visibleText: n,
6060
6080
  plainSpeechText: z(s.join(" "))
6061
6081
  };
6062
- }, jh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", qh = "sre-v1", Vh = 256, Dr = (e) => Array.isArray(e) ? `array:[${e.map(Dr).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${Dr(n)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, go = (e, t, n, r) => `${qh}\0${jh(e)}\0${t ? "ssml" : "plain"}\0${Dr(n ?? null)}\0${r}`, Uh = (e = {}) => {
6063
- const t = Math.max(1, e.maxEntries ?? Vh), n = e.resolve ?? ((o, s) => Ls([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
6082
+ }, Dh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Fh = "sre-v1", jh = 256, Fr = (e) => Array.isArray(e) ? `array:[${e.map(Fr).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${Fr(n)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, go = (e, t, n, r) => `${Fh}\0${Dh(e)}\0${t ? "ssml" : "plain"}\0${Fr(n ?? null)}\0${r}`, qh = (e = {}) => {
6083
+ const t = Math.max(1, e.maxEntries ?? jh), n = e.resolve ?? ((o, s) => Ls([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
6064
6084
  for (r.delete(o), r.set(o, s); r.size > t; ) {
6065
6085
  const a = r.keys().next().value;
6066
6086
  a !== void 0 && r.delete(a);
6067
6087
  }
6068
6088
  };
6069
6089
  return async (o, s) => {
6070
- const a = er(s.mathSpeech), l = s.produceSsml === !0, c = go(s.language, l, a, o.mathml), u = r.get(c);
6090
+ const a = tr(s.mathSpeech), l = s.produceSsml === !0, c = go(s.language, l, a, o.mathml), u = r.get(c);
6071
6091
  if (u)
6072
6092
  return r.delete(c), r.set(c, u), u;
6073
6093
  const h = await n(o, {
@@ -6080,13 +6100,13 @@ var Ru = /* @__PURE__ */ new Set([
6080
6100
  usedFallback: h.usedFallback
6081
6101
  }), i(c, h), h;
6082
6102
  };
6083
- }, Gh = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : sn({ speechText: e }).tokens[0]?.normalized || null, Kh = (e, t) => {
6103
+ }, Vh = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : sn({ speechText: e }).tokens[0]?.normalized || null, Uh = (e, t) => {
6084
6104
  const n = sn({ speechText: e.speechText });
6085
6105
  if (!Number.isFinite(t.position)) return {
6086
6106
  boundary: null,
6087
6107
  spokenText: n.spokenText
6088
6108
  };
6089
- const r = vh({
6109
+ const r = ph({
6090
6110
  tokenization: n,
6091
6111
  position: t.position,
6092
6112
  length: t.length,
@@ -6099,8 +6119,8 @@ var Ru = /* @__PURE__ */ new Set([
6099
6119
  } : null,
6100
6120
  spokenText: n.spokenText
6101
6121
  };
6102
- }, Yh = (e, t, n) => n ? sn({ speechText: e }).tokens.find((r) => r.start <= t && t < r.end)?.normalized === n : !0, Xh = (e, t) => {
6103
- const n = Gh(t.word);
6122
+ }, Gh = (e, t, n) => n ? sn({ speechText: e }).tokens.find((r) => r.start <= t && t < r.end)?.normalized === n : !0, Kh = (e, t) => {
6123
+ const n = Vh(t.word);
6104
6124
  if (e.id !== t.chunkId) return {
6105
6125
  chunkId: t.chunkId,
6106
6126
  normalizedWord: n,
@@ -6119,12 +6139,12 @@ var Ru = /* @__PURE__ */ new Set([
6119
6139
  };
6120
6140
  let r, i;
6121
6141
  if (e.catalogAlignment)
6122
- r = Fu(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
6142
+ r = Bu(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
6123
6143
  else {
6124
- const o = Kh(e, t);
6144
+ const o = Uh(e, t);
6125
6145
  r = o.boundary, i = o.spokenText;
6126
6146
  }
6127
- return r ? Yh(i, r.start, n) ? {
6147
+ return r ? Gh(i, r.start, n) ? {
6128
6148
  chunkId: e.id,
6129
6149
  normalizedWord: n,
6130
6150
  chunkSpokenStart: r.start,
@@ -6169,7 +6189,7 @@ var Ru = /* @__PURE__ */ new Set([
6169
6189
  ["mn", "mjx-mn"],
6170
6190
  ["mo", "mjx-mo"],
6171
6191
  ["mtext", "mjx-mtext"]
6172
- ]), Fr = "mi,mn,mo,mtext", ia = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", oa = [
6192
+ ]), jr = "mi,mn,mo,mtext", ia = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", oa = [
6173
6193
  "mjx-mfrac",
6174
6194
  "mjx-msqrt",
6175
6195
  "mjx-mroot",
@@ -6177,17 +6197,17 @@ var Ru = /* @__PURE__ */ new Set([
6177
6197
  "mjx-munder",
6178
6198
  "mjx-mover",
6179
6199
  "mjx-munderover"
6180
- ].join(","), sa = (e) => e.type === "text-range" ? e.node.parentElement : e.element, tr = (e) => {
6200
+ ].join(","), sa = (e) => e.type === "text-range" ? e.node.parentElement : e.element, nr = (e) => {
6181
6201
  let t = e;
6182
6202
  for (; t; ) {
6183
6203
  if (t.localName?.toLowerCase() === "mjx-container") return t;
6184
6204
  t = t.parentElement;
6185
6205
  }
6186
6206
  return null;
6187
- }, vo = (e) => !e || tr(e) ? !1 : !Pt(e), aa = (e) => {
6207
+ }, vo = (e) => !e || nr(e) ? !1 : !Pt(e), aa = (e) => {
6188
6208
  const t = e.getBoundingClientRect?.();
6189
6209
  return !!(t && t.width > 0 && t.height > 0);
6190
- }, jr = (e) => {
6210
+ }, qr = (e) => {
6191
6211
  let t = e;
6192
6212
  for (; t; ) {
6193
6213
  if (t.localName?.toLowerCase() === "math") return t;
@@ -6201,31 +6221,31 @@ var Ru = /* @__PURE__ */ new Set([
6201
6221
  if (!r || t[n].localName.toLowerCase() !== r) return !1;
6202
6222
  }
6203
6223
  return !0;
6204
- }, Jh = (e, t) => {
6224
+ }, Yh = (e, t) => {
6205
6225
  if (!e || !ra.has(e.localName.toLowerCase()) || t.querySelector(oa)) return null;
6206
- const n = jr(e), r = t.querySelector("mjx-math");
6226
+ const n = qr(e), r = t.querySelector("mjx-math");
6207
6227
  if (!n || !r) return null;
6208
- const i = Array.from(n.querySelectorAll(Fr)), o = i.indexOf(e);
6228
+ const i = Array.from(n.querySelectorAll(jr)), o = i.indexOf(e);
6209
6229
  if (o < 0) return null;
6210
6230
  const s = Array.from(r.querySelectorAll(ia));
6211
6231
  if (!la(i, s)) return null;
6212
6232
  const a = s[o];
6213
6233
  return !a || !aa(a) ? null : a;
6214
- }, Qh = (e) => {
6215
- const t = tr(e);
6234
+ }, Xh = (e) => {
6235
+ const t = nr(e);
6216
6236
  if (t) {
6217
6237
  if (t.querySelector(oa)) return "expression";
6218
- const r = jr(e) ?? e, i = t.querySelector("mjx-math");
6238
+ const r = qr(e) ?? e, i = t.querySelector("mjx-math");
6219
6239
  if (!i) return "expression";
6220
- const o = Array.from(r.querySelectorAll(Fr)), s = Array.from(i.querySelectorAll(ia));
6240
+ const o = Array.from(r.querySelectorAll(jr)), s = Array.from(i.querySelectorAll(ia));
6221
6241
  return la(o, s) && s.some((a) => aa(a)) ? "token" : "expression";
6222
6242
  }
6223
- const n = jr(e) ?? e;
6224
- return Array.from(n.querySelectorAll(Fr)).some((r) => !Pt(r)) ? "token" : "expression";
6225
- }, qr = (e) => {
6226
- const t = sa(e), n = tr(t);
6243
+ const n = qr(e) ?? e;
6244
+ return Array.from(n.querySelectorAll(jr)).some((r) => !Pt(r)) ? "token" : "expression";
6245
+ }, Vr = (e) => {
6246
+ const t = sa(e), n = nr(t);
6227
6247
  if (n) {
6228
- const r = Jh(t, n);
6248
+ const r = Yh(t, n);
6229
6249
  return r ? {
6230
6250
  type: "element",
6231
6251
  quality: "semantic-token",
@@ -6247,24 +6267,24 @@ var Ru = /* @__PURE__ */ new Set([
6247
6267
  quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
6248
6268
  element: e.element
6249
6269
  } : null;
6250
- }, Zh = qr, ed = () => {
6270
+ }, Jh = Vr, Qh = () => {
6251
6271
  const e = /* @__PURE__ */ new WeakMap();
6252
6272
  return (t) => {
6253
- const n = sa(t), r = tr(n);
6254
- if (!n || !r) return qr(t);
6273
+ const n = sa(t), r = nr(n);
6274
+ if (!n || !r) return Vr(t);
6255
6275
  if (e.has(n)) return e.get(n) ?? null;
6256
- const i = qr(t);
6276
+ const i = Vr(t);
6257
6277
  return e.set(n, i), i;
6258
6278
  };
6259
- }, td = (e, t, n, r = e.mathAlignments, i = Zh) => {
6279
+ }, Zh = (e, t, n, r = e.mathAlignments, i = Jh) => {
6260
6280
  if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
6261
6281
  let o = null;
6262
6282
  for (const s of r) {
6263
- const a = bh(s.alignment, {
6283
+ const a = vh(s.alignment, {
6264
6284
  position: t.chunkSpokenStart,
6265
6285
  length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
6266
6286
  boundaryWord: n.word
6267
- }) || yh(s.alignment, { boundaryWord: n.word });
6287
+ }) || mh(s.alignment, { boundaryWord: n.word });
6268
6288
  if (!a) continue;
6269
6289
  const l = i(a);
6270
6290
  if (l) {
@@ -6285,9 +6305,9 @@ var Ru = /* @__PURE__ */ new Set([
6285
6305
  } catch {
6286
6306
  return null;
6287
6307
  }
6288
- }, nd = (e, t) => {
6308
+ }, ed = (e, t) => {
6289
6309
  if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
6290
- const n = ju(e.catalogAlignment, t.chunkSpokenStart);
6310
+ const n = Du(e.catalogAlignment, t.chunkSpokenStart);
6291
6311
  if (!n) return null;
6292
6312
  const r = ca(e.visibleMap, n.start, n.end);
6293
6313
  return r ? {
@@ -6295,7 +6315,7 @@ var Ru = /* @__PURE__ */ new Set([
6295
6315
  quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
6296
6316
  range: r
6297
6317
  } : null;
6298
- }, rd = (e) => e.regionRange ? {
6318
+ }, td = (e) => e.regionRange ? {
6299
6319
  type: "range",
6300
6320
  quality: "region",
6301
6321
  range: e.regionRange
@@ -6307,7 +6327,7 @@ var Ru = /* @__PURE__ */ new Set([
6307
6327
  if (t.length !== 1) return null;
6308
6328
  const n = t[0]?.alignment.result.fallbackTarget;
6309
6329
  return n ? e.renderedMathTargetResolver(n) : null;
6310
- }, id = (e, t) => e ? t.mathAlignments.filter(({ element: n }) => {
6330
+ }, nd = (e, t) => e ? t.mathAlignments.filter(({ element: n }) => {
6311
6331
  try {
6312
6332
  return e.type === "range" ? e.range.intersectsNode(n) : e.type === "element" ? e.element === n || e.element.contains(n) : e.node.parentElement?.contains(n) || !1;
6313
6333
  } catch {
@@ -6319,18 +6339,18 @@ var Ru = /* @__PURE__ */ new Set([
6319
6339
  quality: "region",
6320
6340
  confidence: 0,
6321
6341
  reason: "boundary chunk id was not found"
6322
- }), yo = (e) => e.length === 1 ? e[0].element : null, od = (e, t) => t.length > 0 && t.every(({ element: n }) => e.mathCapabilityByElement.get(n) === "token"), sd = 3, ad = (e, t, n) => {
6342
+ }), yo = (e) => e.length === 1 ? e[0].element : null, rd = (e, t) => t.length > 0 && t.every(({ element: n }) => e.mathCapabilityByElement.get(n) === "token"), id = 3, od = (e, t, n) => {
6323
6343
  if (!t || t.type !== "range") return !1;
6324
6344
  const { startContainer: r, endContainer: i } = t.range;
6325
- return r === i && r.nodeType === sd ? !1 : n.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(r) && o.contains(i));
6326
- }, ld = (e, t) => ({
6345
+ return r === i && r.nodeType === id ? !1 : n.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(r) && o.contains(i));
6346
+ }, sd = (e, t) => ({
6327
6347
  chunk: e,
6328
- regionTarget: rd(e),
6329
- renderedMathTargetResolver: ed(),
6330
- mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ? Qh(n) : "expression"])),
6348
+ regionTarget: td(e),
6349
+ renderedMathTargetResolver: Qh(),
6350
+ mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ? Xh(n) : "expression"])),
6331
6351
  heldTokenByElement: /* @__PURE__ */ new Map()
6332
- }), cd = (e) => {
6333
- const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id, ld(r, t)]));
6352
+ }), ad = (e) => {
6353
+ const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id, sd(r, t)]));
6334
6354
  return {
6335
6355
  chunks: e.chunks,
6336
6356
  resolveInitial(r) {
@@ -6354,7 +6374,7 @@ var Ru = /* @__PURE__ */ new Set([
6354
6374
  resolveBoundary(r) {
6355
6375
  const i = n.get(r.chunkId);
6356
6376
  if (!i) return bo();
6357
- const { chunk: o } = i, s = Xh(o, r), a = nd(o, s), l = id(a, o), c = (!a || l.length > 0 ? td(o, s, r, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, h = c && c.quality === "expression" ? c : null;
6377
+ const { chunk: o } = i, s = Kh(o, r), a = ed(o, s), l = nd(a, o), c = (!a || l.length > 0 ? Zh(o, s, r, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, h = c && c.quality === "expression" ? c : null;
6358
6378
  if (u) {
6359
6379
  const d = yo(l);
6360
6380
  return d && i.heldTokenByElement.set(d, u), St({
@@ -6365,14 +6385,14 @@ var Ru = /* @__PURE__ */ new Set([
6365
6385
  reason: s.reason
6366
6386
  });
6367
6387
  }
6368
- if (a && (t ? !ad(i, a, l) : l.length === 0)) return St({
6388
+ if (a && (t ? !od(i, a, l) : l.length === 0)) return St({
6369
6389
  semanticTarget: a,
6370
6390
  expressionTarget: null,
6371
6391
  regionTarget: i.regionTarget,
6372
6392
  confidence: s.confidence,
6373
6393
  reason: s.reason
6374
6394
  });
6375
- if (od(i, l)) {
6395
+ if (rd(i, l)) {
6376
6396
  const d = yo(l), p = d ? i.heldTokenByElement.get(d) ?? null : null;
6377
6397
  return St({
6378
6398
  semanticTarget: p,
@@ -6391,14 +6411,14 @@ var Ru = /* @__PURE__ */ new Set([
6391
6411
  });
6392
6412
  }
6393
6413
  };
6394
- }, ud = (e) => {
6414
+ }, ld = (e) => {
6395
6415
  if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
6396
6416
  const t = e.mathAlignment?.speech.boundaryOffsetSpace;
6397
6417
  return t || "plain-spoken-text";
6398
- }, hd = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
6418
+ }, cd = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
6399
6419
  element: e.sourceElement,
6400
6420
  alignment: e.mathAlignment
6401
- }] : [], dd = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
6421
+ }] : [], ud = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
6402
6422
  speechText: e.speechText || "",
6403
6423
  visibleText: e.visibleText || e.speechText || "",
6404
6424
  sourceElement: e.sourceElement || e.contentRoot,
@@ -6415,9 +6435,9 @@ var Ru = /* @__PURE__ */ new Set([
6415
6435
  regionRange: t.regionRange,
6416
6436
  visibleMap: t.visibleMap,
6417
6437
  catalogAlignment: t.alignment,
6418
- mathAlignments: hd(t),
6419
- offsetSpace: ud(t)
6420
- })), fd = [
6438
+ mathAlignments: cd(t),
6439
+ offsetSpace: ld(t)
6440
+ })), hd = [
6421
6441
  "[data-pie-tts-region]",
6422
6442
  "[data-catalog-region]",
6423
6443
  "li",
@@ -6428,17 +6448,17 @@ var Ru = /* @__PURE__ */ new Set([
6428
6448
  "[role='region']",
6429
6449
  "div"
6430
6450
  ].join(","), ua = (e, t) => {
6431
- const n = e.closest(fd);
6451
+ const n = e.closest(hd);
6432
6452
  return n && t.contains(n) ? n : e;
6433
- }, pd = (e, t, n) => {
6453
+ }, dd = (e, t, n) => {
6434
6454
  const r = /* @__PURE__ */ new Map();
6435
6455
  for (let i = t; i < n; i++) {
6436
6456
  const o = e.get(i);
6437
6457
  o && r.set(i - t, o);
6438
6458
  }
6439
6459
  return r;
6440
- }, gd = async (e) => {
6441
- const t = Kt(e.contentRoot, e.textProcessingOptions), n = await Fh({
6460
+ }, fd = async (e) => {
6461
+ const t = Kt(e.contentRoot, e.textProcessingOptions), n = await Bh({
6442
6462
  chunks: t.chunks,
6443
6463
  visibleText: t.visibleText,
6444
6464
  language: e.language,
@@ -6457,7 +6477,7 @@ var Ru = /* @__PURE__ */ new Set([
6457
6477
  anchor: {
6458
6478
  sourceElement: a,
6459
6479
  regionElement: ua(a, e.contentRoot),
6460
- visibleMap: pd(t.map, r.visibleSpan.start, r.visibleSpan.end)
6480
+ visibleMap: dd(t.map, r.visibleSpan.start, r.visibleSpan.end)
6461
6481
  }
6462
6482
  };
6463
6483
  }
@@ -6477,7 +6497,7 @@ var Ru = /* @__PURE__ */ new Set([
6477
6497
  containsMathMarkup: t.containsMathMarkup,
6478
6498
  visibleText: t.visibleText
6479
6499
  };
6480
- }, vd = (e, t) => {
6500
+ }, pd = (e, t) => {
6481
6501
  const n = Fs({
6482
6502
  speechText: e.spokenText,
6483
6503
  visibleText: e.spokenText
@@ -6501,12 +6521,12 @@ var Ru = /* @__PURE__ */ new Set([
6501
6521
  sourceElement: n,
6502
6522
  regionElement: t.regionElement,
6503
6523
  speechMatchesVisibleText: e.spokenText === e.fallbackText,
6504
- mathAlignment: n ? Vn({
6524
+ mathAlignment: n ? Un({
6505
6525
  mathElement: n,
6506
6526
  speechText: e.spokenText
6507
6527
  }) : void 0
6508
6528
  };
6509
- }, md = (e, t, n) => {
6529
+ }, gd = (e, t, n) => {
6510
6530
  const r = t.sourceElement;
6511
6531
  return {
6512
6532
  speechText: n,
@@ -6514,22 +6534,22 @@ var Ru = /* @__PURE__ */ new Set([
6514
6534
  sourceElement: r,
6515
6535
  regionElement: t.regionElement,
6516
6536
  speechMatchesVisibleText: !1,
6517
- mathAlignment: r ? Vn({
6537
+ mathAlignment: r ? Un({
6518
6538
  mathElement: r,
6519
6539
  speechText: n
6520
6540
  }) : void 0,
6521
6541
  plainFallback: ha(e, t)
6522
6542
  };
6523
- }, bd = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? vd(n, r) : t.format === "ssml" && n.ssml ? md(n, r, n.ssml) : ha(n, r)), yd = "pie-tts-control-handoff", L;
6543
+ }, vd = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? pd(n, r) : t.format === "ssml" && n.ssml ? gd(n, r, n.ssml) : ha(n, r)), md = "pie-tts-control-handoff", L;
6524
6544
  (function(e) {
6525
6545
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
6526
6546
  })(L || (L = {}));
6527
- var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Td = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? da(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, _d = class Vr {
6547
+ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, bd = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? da(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, yd = class Ur {
6528
6548
  constructor() {
6529
- m(this, "currentProvider", null), m(this, "provider", null), m(this, "highlightCoordinator", null), m(this, "highlightTargetResolverProvider", null), m(this, "catalogResolver", null), m(this, "state", L.IDLE), m(this, "ttsConfig", {}), m(this, "currentText", null), m(this, "currentContentElement", null), m(this, "normalizedToDOM", /* @__PURE__ */ new Map()), m(this, "listeners", /* @__PURE__ */ new Map()), m(this, "lastError", null), m(this, "speakRunId", 0), m(this, "currentBoundaryOffset", 0), m(this, "activeWordBoundaryOffset", 0), m(this, "seekSegments", []), m(this, "playbackChunks", []), m(this, "sentenceHighlightSegments", []), m(this, "currentSeekSegmentIndex", 0), m(this, "activeSentenceStartOffset", null), m(this, "activeHighlightMode", "word"), m(this, "lastRenderedRegionTarget", null), m(this, "telemetryReporter", null), m(this, "generatedMathSpeechResolver", Uh());
6549
+ m(this, "currentProvider", null), m(this, "provider", null), m(this, "highlightCoordinator", null), m(this, "highlightTargetResolverProvider", null), m(this, "catalogResolver", null), m(this, "state", L.IDLE), m(this, "ttsConfig", {}), m(this, "currentText", null), m(this, "currentContentElement", null), m(this, "normalizedToDOM", /* @__PURE__ */ new Map()), m(this, "listeners", /* @__PURE__ */ new Map()), m(this, "lastError", null), m(this, "speakRunId", 0), m(this, "currentBoundaryOffset", 0), m(this, "activeWordBoundaryOffset", 0), m(this, "seekSegments", []), m(this, "playbackChunks", []), m(this, "sentenceHighlightSegments", []), m(this, "currentSeekSegmentIndex", 0), m(this, "activeSentenceStartOffset", null), m(this, "activeHighlightMode", "word"), m(this, "lastRenderedRegionTarget", null), m(this, "telemetryReporter", null), m(this, "generatedMathSpeechResolver", qh());
6530
6550
  }
6531
6551
  debugLog(t, n) {
6532
- Vr.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
6552
+ Ur.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
6533
6553
  }
6534
6554
  async emitTelemetry(t, n) {
6535
6555
  try {
@@ -6706,12 +6726,12 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6706
6726
  }
6707
6727
  getMathSpeechOptions() {
6708
6728
  const t = (this.ttsConfig.providerOptions || {}).mathSpeech;
6709
- return er(t);
6729
+ return tr(t);
6710
6730
  }
6711
6731
  buildPositionMap(t, n, r) {
6712
6732
  this.normalizedToDOM.clear();
6713
- const { text: i, map: o } = jn(t, this.getTextProcessingOptions(r));
6714
- this.normalizedToDOM = o, Vr.debugEnabled && (this.debugLog("[TTSService] Text comparison:", {
6733
+ const { text: i, map: o } = qn(t, this.getTextProcessingOptions(r));
6734
+ this.normalizedToDOM = o, Ur.debugEnabled && (this.debugLog("[TTSService] Text comparison:", {
6715
6735
  spokenLength: n.length,
6716
6736
  normalizedDomLength: i.length,
6717
6737
  match: n === i,
@@ -6820,7 +6840,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6820
6840
  return this.createSpeechPlanSegments(n, r);
6821
6841
  }
6822
6842
  collectSpeechPlanBoundaries(t, n) {
6823
- const r = /* @__PURE__ */ new Map(), { map: i } = jn(t, this.getTextProcessingOptions()), o = this.createNodeStartOffsets(i), s = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
6843
+ const r = /* @__PURE__ */ new Map(), { map: i } = qn(t, this.getTextProcessingOptions()), o = this.createNodeStartOffsets(i), s = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
6824
6844
  let a = s.nextNode(), l = null;
6825
6845
  for (; a; ) {
6826
6846
  const c = a, u = c.parentElement;
@@ -6860,7 +6880,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6860
6880
  }), i.filter((l) => l.text.trim().length > 0);
6861
6881
  }
6862
6882
  segmentSentences(t) {
6863
- return di(t, { locale: this.ttsConfig.providerOptions?.locale || void 0 });
6883
+ return fi(t, { locale: this.ttsConfig.providerOptions?.locale || void 0 });
6864
6884
  }
6865
6885
  createSeekSegmentsFromText(t) {
6866
6886
  return this.segmentSentences(t).map((n) => {
@@ -7198,12 +7218,12 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7198
7218
  const p = Kt(h, this.getTextProcessingOptions(n.language)), v = p.visibleText || z(h.textContent || ""), b = Fs({
7199
7219
  speechText: d.content,
7200
7220
  visibleText: v
7201
- }), g = a(h, v), y = g ? Vn({
7221
+ }), g = a(h, v), y = g ? Un({
7202
7222
  mathElement: g,
7203
7223
  speechText: d.content
7204
7224
  }) : void 0, O = y ? void 0 : l(h).map((S) => ({
7205
7225
  element: S,
7206
- alignment: Vn({
7226
+ alignment: Un({
7207
7227
  mathElement: S,
7208
7228
  speechText: d.content
7209
7229
  })
@@ -7231,7 +7251,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7231
7251
  return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
7232
7252
  }
7233
7253
  async resolveGeneratedSpeechContent(t, n, r) {
7234
- const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await gd({
7254
+ const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await fd({
7235
7255
  contentRoot: t,
7236
7256
  language: r,
7237
7257
  mathSpeech: this.getMathSpeechOptions(),
@@ -7248,7 +7268,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7248
7268
  containsMathMarkup: !1,
7249
7269
  speechMatchesVisibleText: !0
7250
7270
  };
7251
- const c = bd(o, { format: i }), u = o.plainSpeechText;
7271
+ const c = vd(o, { format: i }), u = o.plainSpeechText;
7252
7272
  return {
7253
7273
  contentToSpeak: u,
7254
7274
  speechText: u,
@@ -7317,7 +7337,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7317
7337
  this.highlightCoordinator && this.paintTTSWordRange(this.resolveWordHighlightRange(t).range);
7318
7338
  }
7319
7339
  highlightRenderableRegionTarget(t) {
7320
- if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && Td(this.lastRenderedRegionTarget, t)))
7340
+ if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && bd(this.lastRenderedRegionTarget, t)))
7321
7341
  try {
7322
7342
  const n = document.createRange();
7323
7343
  if (t.type === "element") n.selectNodeContents(t.element);
@@ -7376,10 +7396,10 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7376
7396
  async speakCatalogChunkOnce(t, n) {
7377
7397
  if (!this.provider) return;
7378
7398
  this.lastRenderedRegionTarget = null;
7379
- const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ? dd({
7399
+ const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ? ud({
7380
7400
  contentRoot: r,
7381
7401
  chunks: [t]
7382
- })[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? cd({
7402
+ })[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? ad({
7383
7403
  chunks: [i],
7384
7404
  mathTokenHighlighting: o
7385
7405
  }) : null;
@@ -7516,7 +7536,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7516
7536
  this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(L.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);
7517
7537
  }
7518
7538
  requestControlHandoff() {
7519
- typeof window > "u" || window.dispatchEvent(new CustomEvent(yd, { detail: { source: "host" } }));
7539
+ typeof window > "u" || window.dispatchEvent(new CustomEvent(md, { detail: { source: "host" } }));
7520
7540
  }
7521
7541
  isPlaying() {
7522
7542
  return this.state === L.PLAYING;
@@ -7587,7 +7607,7 @@ var da = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7587
7607
  });
7588
7608
  }
7589
7609
  };
7590
- m(_d, "debugEnabled", (() => {
7610
+ m(yd, "debugEnabled", (() => {
7591
7611
  try {
7592
7612
  if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
7593
7613
  } catch {
@@ -7605,7 +7625,7 @@ var Ud = xc({
7605
7625
  passage: []
7606
7626
  },
7607
7627
  providers: {}
7608
- }), Sd = /* @__PURE__ */ _t('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), wd = /* @__PURE__ */ _t('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), kd = /* @__PURE__ */ _t('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Ed = /* @__PURE__ */ _t('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), xd = /* @__PURE__ */ _t('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Ad = /* @__PURE__ */ _t('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Cd = /* @__PURE__ */ _t('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Md = {
7628
+ }), Td = /* @__PURE__ */ _t('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), _d = /* @__PURE__ */ _t('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Sd = /* @__PURE__ */ _t('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), wd = /* @__PURE__ */ _t('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), kd = /* @__PURE__ */ _t('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Ed = /* @__PURE__ */ _t('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), xd = /* @__PURE__ */ _t('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Ad = {
7609
7629
  hash: "svelte-g8qu62",
7610
7630
  code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
7611
7631
 
@@ -7613,9 +7633,9 @@ var Ud = xc({
7613
7633
 
7614
7634
  /* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
7615
7635
  };
7616
- function Od(e, t) {
7617
- Co(t, !0), nc(e, Md);
7618
- let n = fr(t, "enabled", 7, !0), r = fr(t, "highlightCoordinator", 7, null), i = fr(t, "ttsService", 7, null);
7636
+ function Cd(e, t) {
7637
+ Co(t, !0), nc(e, Ad);
7638
+ let n = pr(t, "enabled", 7, !0), r = pr(t, "highlightCoordinator", 7, null), i = pr(t, "ttsService", 7, null);
7619
7639
  const o = typeof window < "u", s = "pie-annotations", a = [
7620
7640
  {
7621
7641
  name: le.YELLOW,
@@ -7656,7 +7676,7 @@ function Od(e, t) {
7656
7676
  x: 0,
7657
7677
  y: 0
7658
7678
  }
7659
- })), v = /* @__PURE__ */ V(!1), b = /* @__PURE__ */ V(!1), g = /* @__PURE__ */ V(""), y = /* @__PURE__ */ V(0), O = /* @__PURE__ */ V(null), N = /* @__PURE__ */ or(() => T(y) > 0), S = /* @__PURE__ */ or(() => T(O) !== null), H = /* @__PURE__ */ or(() => T(d)?.scopeElement || T(h)?.scopeElement || null);
7679
+ })), v = /* @__PURE__ */ V(!1), b = /* @__PURE__ */ V(!1), g = /* @__PURE__ */ V(""), y = /* @__PURE__ */ V(0), O = /* @__PURE__ */ V(null), N = /* @__PURE__ */ sr(() => T(y) > 0), S = /* @__PURE__ */ sr(() => T(O) !== null), H = /* @__PURE__ */ sr(() => T(d)?.scopeElement || T(h)?.scopeElement || null);
7660
7680
  function W() {
7661
7681
  const _ = T(c)?.ownerDocument;
7662
7682
  return T(H) || _?.documentElement || document.documentElement;
@@ -7698,7 +7718,7 @@ function Od(e, t) {
7698
7718
  console.error("[AnnotationToolbar] Failed to save annotations:", _);
7699
7719
  }
7700
7720
  }
7701
- function nr() {
7721
+ function rr() {
7702
7722
  if (!(!o || !r()))
7703
7723
  try {
7704
7724
  const _ = sessionStorage.getItem(U());
@@ -7730,7 +7750,7 @@ function Od(e, t) {
7730
7750
  function Me() {
7731
7751
  T(v) && i() && (i().stop(), I(v, !1)), T(p).isVisible = !1, T(p).selectedText = "", T(p).selectedRange = null;
7732
7752
  }
7733
- function mi(_) {
7753
+ function bi(_) {
7734
7754
  if (!T(p).selectedRange || !r()) return;
7735
7755
  const k = T(p).selectedText;
7736
7756
  r().addAnnotation(T(p).selectedRange, _), I(y, r().getAnnotations().length, !0), an();
@@ -7777,21 +7797,21 @@ function Od(e, t) {
7777
7797
  }
7778
7798
  }
7779
7799
  }
7780
- function bi(_) {
7800
+ function yi(_) {
7781
7801
  _.key === "Escape" && T(p).isVisible && (_.preventDefault(), Me());
7782
7802
  }
7783
7803
  function cn(_) {
7784
7804
  !T(p).isVisible || T(b) || T(u) && !T(u).contains(_.target) && Me();
7785
7805
  }
7786
- Li(() => {
7806
+ Pi(() => {
7787
7807
  if (!o) return;
7788
7808
  const _ = setTimeout(() => {
7789
- nr();
7809
+ rr();
7790
7810
  }, 2e3), k = T(H) || document;
7791
- return k.addEventListener("mouseup", ln), k.addEventListener("click", cn), k.addEventListener("touchend", ln), k.addEventListener("touchstart", cn), document.addEventListener("keydown", bi), window.addEventListener("scroll", Me, !0), () => {
7792
- clearTimeout(_), k.removeEventListener("mouseup", ln), k.removeEventListener("click", cn), k.removeEventListener("touchend", ln), k.removeEventListener("touchstart", cn), document.removeEventListener("keydown", bi), window.removeEventListener("scroll", Me, !0);
7811
+ return k.addEventListener("mouseup", ln), k.addEventListener("click", cn), k.addEventListener("touchend", ln), k.addEventListener("touchstart", cn), document.addEventListener("keydown", yi), window.addEventListener("scroll", Me, !0), () => {
7812
+ clearTimeout(_), k.removeEventListener("mouseup", ln), k.removeEventListener("click", cn), k.removeEventListener("touchend", ln), k.removeEventListener("touchstart", cn), document.removeEventListener("keydown", yi), window.removeEventListener("scroll", Me, !0);
7793
7813
  };
7794
- }), Li(() => {
7814
+ }), Pi(() => {
7795
7815
  if (!T(c)) return;
7796
7816
  const _ = bc(T(c), (R) => {
7797
7817
  I(h, R, !0);
@@ -7821,51 +7841,51 @@ function Od(e, t) {
7821
7841
  set ttsService(_ = null) {
7822
7842
  i(_), Sn();
7823
7843
  }
7824
- }, yi = Cd(), Ti = sr(yi);
7825
- Gi(Ti, (_) => I(c, _), () => T(c));
7826
- var _i = ze(Ti, 2), ma = (_) => {
7827
- var k = Ad(), R = vn(k);
7844
+ }, Ti = xd(), _i = ar(Ti);
7845
+ Ki(_i, (_) => I(c, _), () => T(c));
7846
+ var Si = ze(_i, 2), ma = (_) => {
7847
+ var k = Ed(), R = vn(k);
7828
7848
  Zl(R, 17, () => a, Jl, (fe, pe) => {
7829
- var te = Sd(), un = vn(te), rr = vn(un, !0);
7849
+ var te = Td(), un = vn(te), ir = vn(un, !0);
7830
7850
  hn(un), hn(te), mn(() => {
7831
- ji(te, `background-color: ${T(pe).hex ?? ""};`), qi(te, "aria-label", T(pe).label), qi(te, "title", T(pe).label), Bi(rr, T(pe).label);
7832
- }), zt("click", te, () => mi(T(pe).name)), qe(fe, te);
7851
+ qi(te, `background-color: ${T(pe).hex ?? ""};`), Vi(te, "aria-label", T(pe).label), Vi(te, "title", T(pe).label), Di(ir, T(pe).label);
7852
+ }), zt("click", te, () => bi(T(pe).name)), qe(fe, te);
7833
7853
  });
7834
7854
  var K = ze(R, 2), Ke = ze(K, 2), Nt = (fe) => {
7835
- var pe = wd(), te = ze(sr(pe), 2);
7855
+ var pe = _d(), te = ze(ar(pe), 2);
7836
7856
  mn(() => te.disabled = T(v)), zt("click", te, ga), qe(fe, pe);
7837
7857
  };
7838
7858
  Dt(Ke, (fe) => {
7839
7859
  i() && fe(Nt);
7840
7860
  });
7841
7861
  var Wt = ze(Ke, 2), ya = (fe) => {
7842
- var pe = xd(), te = ze(sr(pe), 2), un = (Ye) => {
7843
- var Ht = kd();
7862
+ var pe = kd(), te = ze(ar(pe), 2), un = (Ye) => {
7863
+ var Ht = Sd();
7844
7864
  zt("click", Ht, fa), qe(Ye, Ht);
7845
7865
  };
7846
7866
  Dt(te, (Ye) => {
7847
7867
  T(S) && Ye(un);
7848
7868
  });
7849
- var rr = ze(te, 2), Ta = (Ye) => {
7850
- var Ht = Ed();
7869
+ var ir = ze(te, 2), Ta = (Ye) => {
7870
+ var Ht = wd();
7851
7871
  zt("click", Ht, pa), qe(Ye, Ht);
7852
7872
  };
7853
- Dt(rr, (Ye) => {
7873
+ Dt(ir, (Ye) => {
7854
7874
  T(N) && Ye(Ta);
7855
7875
  }), qe(fe, pe);
7856
7876
  };
7857
7877
  Dt(Wt, (fe) => {
7858
7878
  (T(S) || T(N)) && fe(ya);
7859
- }), hn(k), Gi(k, (fe) => I(u, fe), () => T(u)), mn(() => ji(k, `left:${T(p).toolbarPosition.x}px; top:${T(p).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), zt("click", K, () => mi(le.UNDERLINE)), qe(_, k);
7879
+ }), hn(k), Ki(k, (fe) => I(u, fe), () => T(u)), mn(() => qi(k, `left:${T(p).toolbarPosition.x}px; top:${T(p).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), zt("click", K, () => bi(le.UNDERLINE)), qe(_, k);
7860
7880
  };
7861
- Dt(_i, (_) => {
7881
+ Dt(Si, (_) => {
7862
7882
  T(p).isVisible && _(ma);
7863
7883
  });
7864
- var Si = ze(_i, 2), ba = vn(Si, !0);
7865
- return hn(Si), mn(() => Bi(ba, T(g))), qe(e, yi), Mo(va);
7884
+ var wi = ze(Si, 2), ba = vn(wi, !0);
7885
+ return hn(wi), mn(() => Di(ba, T(g))), qe(e, Ti), Mo(va);
7866
7886
  }
7867
7887
  Bl(["click"]);
7868
- customElements.define("pie-tool-annotation-toolbar", fc(Od, {
7888
+ customElements.define("pie-tool-annotation-toolbar", fc(Cd, {
7869
7889
  enabled: {
7870
7890
  attribute: "enabled",
7871
7891
  type: "Boolean"
@@ -7874,7 +7894,7 @@ customElements.define("pie-tool-annotation-toolbar", fc(Od, {
7874
7894
  ttsService: { type: "Object" }
7875
7895
  }, [], [], { mode: "open" }));
7876
7896
  export {
7877
- Od as default,
7878
- $d as n,
7879
- Rd as t
7897
+ Cd as default,
7898
+ Id as n,
7899
+ Od as t
7880
7900
  };