@pie-qti/player-elements 0.1.22 → 0.1.24

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.
Files changed (71) hide show
  1. package/dist/ar-SA-BDmOol_3.js +854 -0
  2. package/dist/ar-SA-BDmOol_3.js.map +1 -0
  3. package/dist/{define-Bkc2UFCK.js → define-D7_K0JFy.js} +4057 -2664
  4. package/dist/define-D7_K0JFy.js.map +1 -0
  5. package/dist/dist-BRTWr852.js +5809 -0
  6. package/dist/dist-BRTWr852.js.map +1 -0
  7. package/dist/{dist-CPyrAOfS.js → dist-BaQdJU08.js} +210 -130
  8. package/dist/dist-BaQdJU08.js.map +1 -0
  9. package/dist/{dist-C0bIgnik.js → dist-DwvskOs6.js} +4 -4
  10. package/dist/{dist-C0bIgnik.js.map → dist-DwvskOs6.js.map} +1 -1
  11. package/dist/{dist-_mWRIrTg.js → dist-ffJZTPTU.js} +2440 -2658
  12. package/dist/dist-ffJZTPTU.js.map +1 -0
  13. package/dist/{element-BrpUrZI4.js → element-DSCNeDLu.js} +2 -2
  14. package/dist/{element-BrpUrZI4.js.map → element-DSCNeDLu.js.map} +1 -1
  15. package/dist/{element-class-DWoLXp_r-ms67Krq-.js → element-class-DQy2cIPM-CldZrSRR.js} +3717 -3464
  16. package/dist/element-class-DQy2cIPM-CldZrSRR.js.map +1 -0
  17. package/dist/elements/BaseSvelteMountElement.d.ts +1 -0
  18. package/dist/elements/QtiAssessmentPlayerElement.d.ts +1 -0
  19. package/dist/elements.js +3 -3
  20. package/dist/es-ES-C98YtDtb.js +802 -0
  21. package/dist/es-ES-C98YtDtb.js.map +1 -0
  22. package/dist/fr-FR-CrmmiRPf.js +802 -0
  23. package/dist/fr-FR-CrmmiRPf.js.map +1 -0
  24. package/dist/index.js +2 -2
  25. package/dist/item-toolbar-element-BW9Y_n5x.js +1990 -0
  26. package/dist/item-toolbar-element-BW9Y_n5x.js.map +1 -0
  27. package/dist/{tag-names-DV56RHJk.js → language-tags-DVlRltrl.js} +25 -22
  28. package/dist/language-tags-DVlRltrl.js.map +1 -0
  29. package/dist/nl-NL-BeQBX6yq.js +505 -0
  30. package/dist/nl-NL-BeQBX6yq.js.map +1 -0
  31. package/dist/nl-NL-CAR7pgVz.js +802 -0
  32. package/dist/nl-NL-CAR7pgVz.js.map +1 -0
  33. package/dist/pie-assessment-toolkit-element-CpiB3twr.js +8573 -0
  34. package/dist/pie-assessment-toolkit-element-CpiB3twr.js.map +1 -0
  35. package/dist/pie-tool-calculator-BiWMTJe7.js +2992 -0
  36. package/dist/pie-tool-calculator-BiWMTJe7.js.map +1 -0
  37. package/dist/provider-Y5PhmTAu.js +58 -0
  38. package/dist/provider-Y5PhmTAu.js.map +1 -0
  39. package/dist/register-players.js +1 -1
  40. package/dist/register.js +7285 -9569
  41. package/dist/register.js.map +1 -1
  42. package/dist/{resolveItems-XtUnsftV.js → resolveItems-D8DJkv-4.js} +2 -2
  43. package/dist/{resolveItems-XtUnsftV.js.map → resolveItems-D8DJkv-4.js.map} +1 -1
  44. package/dist/ro-RO-DTZbhL0e.js +802 -0
  45. package/dist/ro-RO-DTZbhL0e.js.map +1 -0
  46. package/dist/root-DSkIM1v3.js +47 -0
  47. package/dist/root-DSkIM1v3.js.map +1 -0
  48. package/dist/th-TH-aqlT_oK3.js +802 -0
  49. package/dist/th-TH-aqlT_oK3.js.map +1 -0
  50. package/dist/tool-tts-inline-B71NTBbb.js +4435 -0
  51. package/dist/tool-tts-inline-B71NTBbb.js.map +1 -0
  52. package/dist/zh-CN-DCqaRRhU.js +802 -0
  53. package/dist/zh-CN-DCqaRRhU.js.map +1 -0
  54. package/package.json +8 -8
  55. package/dist/define-Bkc2UFCK.js.map +0 -1
  56. package/dist/dist-CPyrAOfS.js.map +0 -1
  57. package/dist/dist-DU1nH3y8.js +0 -1247
  58. package/dist/dist-DU1nH3y8.js.map +0 -1
  59. package/dist/dist-_mWRIrTg.js.map +0 -1
  60. package/dist/element-class-DWoLXp_r-ms67Krq-.js.map +0 -1
  61. package/dist/item-toolbar-element-DFppTi_H.js +0 -6015
  62. package/dist/item-toolbar-element-DFppTi_H.js.map +0 -1
  63. package/dist/pie-assessment-toolkit-element-DlSFT_I2.js +0 -28479
  64. package/dist/pie-assessment-toolkit-element-DlSFT_I2.js.map +0 -1
  65. package/dist/pie-tool-calculator-BGp3etqJ.js +0 -2226
  66. package/dist/pie-tool-calculator-BGp3etqJ.js.map +0 -1
  67. package/dist/root-DBWhDxjY.js +0 -98
  68. package/dist/root-DBWhDxjY.js.map +0 -1
  69. package/dist/tag-names-DV56RHJk.js.map +0 -1
  70. package/dist/tool-tts-inline-DVUYjVnD.js +0 -2574
  71. package/dist/tool-tts-inline-DVUYjVnD.js.map +0 -1
@@ -0,0 +1,4435 @@
1
+ import { _ as e, a as t, f as n, g as r, h as i, v as a } from "./dist-ffJZTPTU.js";
2
+ //#region ../../node_modules/.bun/@pie-players+pie-tool-tts-inline@0.3.68+0f70b067cf29f19a/node_modules/@pie-players/pie-tool-tts-inline/dist/tool-tts-inline.js
3
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
4
+ var o = {}, s = Symbol("uninitialized"), c = "http://www.w3.org/1999/xhtml", l = Array.isArray, u = Array.prototype.indexOf, d = Array.prototype.includes, f = Array.from, p = Object.keys, m = Object.defineProperty, h = Object.getOwnPropertyDescriptor, g = Object.getOwnPropertyDescriptors, _ = Object.prototype, v = Array.prototype, y = Object.getPrototypeOf, b = Object.isExtensible, x = () => {};
5
+ function S(e) {
6
+ for (var t = 0; t < e.length; t++) e[t]();
7
+ }
8
+ function ee() {
9
+ var e, t;
10
+ return {
11
+ promise: new Promise((n, r) => {
12
+ e = n, t = r;
13
+ }),
14
+ resolve: e,
15
+ reject: t
16
+ };
17
+ }
18
+ var C = 1024, w = 2048, te = 4096, T = 8192, E = 16384, ne = 32768, re = 1 << 25, D = 65536, O = 1 << 19, ie = 1 << 20, k = 1 << 25, ae = 65536, oe = 1 << 21, A = 1 << 22, se = 1 << 23, j = Symbol("$state"), M = Symbol("legacy props"), N = Symbol(""), ce = Symbol("attributes"), le = Symbol("class"), ue = Symbol("style"), de = Symbol("text"), fe = new class extends Error {
19
+ name = "StaleReactionError";
20
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
21
+ }(), pe = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
22
+ function me() {
23
+ throw Error("https://svelte.dev/e/async_derived_orphan");
24
+ }
25
+ function he(e, t, n) {
26
+ throw Error("https://svelte.dev/e/each_key_duplicate");
27
+ }
28
+ function ge(e) {
29
+ throw Error("https://svelte.dev/e/effect_in_teardown");
30
+ }
31
+ function _e() {
32
+ throw Error("https://svelte.dev/e/effect_in_unowned_derived");
33
+ }
34
+ function ve(e) {
35
+ throw Error("https://svelte.dev/e/effect_orphan");
36
+ }
37
+ function ye() {
38
+ throw Error("https://svelte.dev/e/effect_update_depth_exceeded");
39
+ }
40
+ function be() {
41
+ throw Error("https://svelte.dev/e/hydration_failed");
42
+ }
43
+ function xe(e) {
44
+ throw Error("https://svelte.dev/e/props_invalid_value");
45
+ }
46
+ function Se() {
47
+ throw Error("https://svelte.dev/e/state_descriptors_fixed");
48
+ }
49
+ function Ce() {
50
+ throw Error("https://svelte.dev/e/state_prototype_fixed");
51
+ }
52
+ function we() {
53
+ throw Error("https://svelte.dev/e/state_unsafe_mutation");
54
+ }
55
+ function Te() {
56
+ throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
57
+ }
58
+ function Ee() {
59
+ console.warn("https://svelte.dev/e/derived_inert");
60
+ }
61
+ function De(e) {
62
+ console.warn("https://svelte.dev/e/hydration_mismatch");
63
+ }
64
+ function Oe() {
65
+ console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
66
+ }
67
+ var P = !1;
68
+ function F(e) {
69
+ P = e;
70
+ }
71
+ var I;
72
+ function L(e) {
73
+ if (e === null) throw De(), o;
74
+ return I = e;
75
+ }
76
+ function ke() {
77
+ return L(/* @__PURE__ */ Qt(I));
78
+ }
79
+ function Ae(e) {
80
+ if (P) {
81
+ if (/* @__PURE__ */ Qt(I) !== null) throw De(), o;
82
+ I = e;
83
+ }
84
+ }
85
+ function je(e = 1) {
86
+ if (P) {
87
+ for (var t = e, n = I; t--;) n = /* @__PURE__ */ Qt(n);
88
+ I = n;
89
+ }
90
+ }
91
+ function Me(e = !0) {
92
+ for (var t = 0, n = I;;) {
93
+ if (n.nodeType === 8) {
94
+ var r = n.data;
95
+ if (r === "]") {
96
+ if (t === 0) return n;
97
+ --t;
98
+ } else (r === "[" || r === "[!" || r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
99
+ }
100
+ var i = /* @__PURE__ */ Qt(n);
101
+ e && n.remove(), n = i;
102
+ }
103
+ }
104
+ function Ne(e) {
105
+ if (!e || e.nodeType !== 8) throw De(), o;
106
+ return e.data;
107
+ }
108
+ function Pe(e) {
109
+ return e === this.v;
110
+ }
111
+ function Fe(e, t) {
112
+ return e == e ? e !== t || typeof e == "object" && !!e || typeof e == "function" : t == t;
113
+ }
114
+ function Ie(e) {
115
+ return !Fe(e, this.v);
116
+ }
117
+ var R = null;
118
+ function Le(e) {
119
+ R = e;
120
+ }
121
+ function Re(e, t = !1, n) {
122
+ R = {
123
+ p: R,
124
+ i: !1,
125
+ c: null,
126
+ e: null,
127
+ s: e,
128
+ x: null,
129
+ r: q,
130
+ l: null
131
+ };
132
+ }
133
+ function ze(e) {
134
+ var t = R, n = t.e;
135
+ if (n !== null) {
136
+ t.e = null;
137
+ for (var r of n) pn(r);
138
+ }
139
+ return e !== void 0 && (t.x = e), t.i = !0, R = t.p, e ?? {};
140
+ }
141
+ function Be() {
142
+ return !0;
143
+ }
144
+ var Ve = [];
145
+ function He() {
146
+ var e = Ve;
147
+ Ve = [], S(e);
148
+ }
149
+ function Ue(e) {
150
+ if (Ve.length === 0 && !xt) {
151
+ var t = Ve;
152
+ queueMicrotask(() => {
153
+ t === Ve && He();
154
+ });
155
+ }
156
+ Ve.push(e);
157
+ }
158
+ function We() {
159
+ for (; Ve.length > 0;) He();
160
+ }
161
+ function Ge(e) {
162
+ var t = q;
163
+ if (t === null) return G.f |= se, e;
164
+ if (!(t.f & 32768) && !(t.f & 4)) throw e;
165
+ Ke(e, t);
166
+ }
167
+ function Ke(e, t) {
168
+ if (!(t !== null && t.f & 16384)) {
169
+ for (; t !== null;) {
170
+ if (t.f & 128) {
171
+ if (!(t.f & 32768)) throw e;
172
+ try {
173
+ t.b.error(e);
174
+ return;
175
+ } catch (t) {
176
+ e = t;
177
+ }
178
+ }
179
+ t = t.parent;
180
+ }
181
+ throw e;
182
+ }
183
+ }
184
+ var qe = ~(w | te | C);
185
+ function z(e, t) {
186
+ e.f = e.f & qe | t;
187
+ }
188
+ function Je(e) {
189
+ e.f & 512 || e.deps === null ? z(e, C) : z(e, te);
190
+ }
191
+ function Ye(e) {
192
+ if (e !== null) for (let t of e) !(t.f & 2) || !(t.f & 65536) || (t.f ^= ae, Ye(t.deps));
193
+ }
194
+ function Xe(e, t, n) {
195
+ e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), Ye(e.deps), z(e, C);
196
+ }
197
+ var Ze = !1;
198
+ function Qe(e) {
199
+ var t = Ze;
200
+ try {
201
+ return Ze = !1, [e(), Ze];
202
+ } finally {
203
+ Ze = t;
204
+ }
205
+ }
206
+ function $e(e) {
207
+ var t = G, n = q;
208
+ K(null), Ln(null);
209
+ try {
210
+ return e();
211
+ } finally {
212
+ K(t), Ln(n);
213
+ }
214
+ }
215
+ function et(e) {
216
+ let t = 0, n = Rt(0), r;
217
+ return () => {
218
+ un() && (X(n), vn(() => (t === 0 && (r = tr(() => e(() => Ht(n)))), t += 1, () => {
219
+ Ue(() => {
220
+ --t, t === 0 && (r?.(), r = void 0, Ht(n));
221
+ });
222
+ })));
223
+ };
224
+ }
225
+ var tt = D | O;
226
+ function nt(e, t, n, r) {
227
+ new rt(e, t, n, r);
228
+ }
229
+ var rt = class {
230
+ parent;
231
+ is_pending = !1;
232
+ transform_error;
233
+ #e;
234
+ #t = P ? I : null;
235
+ #n;
236
+ #r;
237
+ #i;
238
+ #a = null;
239
+ #o = null;
240
+ #s = null;
241
+ #c = null;
242
+ #l = 0;
243
+ #u = 0;
244
+ #d = !1;
245
+ #f = /* @__PURE__ */ new Set();
246
+ #p = /* @__PURE__ */ new Set();
247
+ #m = null;
248
+ #h = et(() => (this.#m = Rt(this.#l), () => {
249
+ this.#m = null;
250
+ }));
251
+ constructor(e, t, n, r) {
252
+ this.#e = e, this.#n = t, this.#r = (e) => {
253
+ var t = q;
254
+ t.b = this, t.f |= 128, n(e);
255
+ }, this.parent = q.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), this.#i = bn(() => {
256
+ if (P) {
257
+ let e = this.#t;
258
+ ke();
259
+ let t = e.data === "[!";
260
+ if (e.data.startsWith("[?")) {
261
+ let t = JSON.parse(e.data.slice(2));
262
+ this.#_(t);
263
+ } else t ? this.#y() : this.#g();
264
+ } else this.#b();
265
+ }, tt), P && (this.#e = I);
266
+ }
267
+ #g() {
268
+ try {
269
+ this.#a = xn(() => this.#r(this.#e));
270
+ } catch (e) {
271
+ this.error(e);
272
+ }
273
+ }
274
+ #_(e) {
275
+ let t = this.#n.failed, { reset: n, invoke_onerror: r } = this.#v(e);
276
+ Ue(r), t && (this.#s = xn(() => {
277
+ t(this.#e, () => e, () => n);
278
+ }));
279
+ }
280
+ #v(e) {
281
+ var t = !1, n = !1;
282
+ let r = () => {
283
+ if (t) {
284
+ Oe();
285
+ return;
286
+ }
287
+ t = !0, n && Te(), this.#s !== null && Dn(this.#s, () => {
288
+ this.#s = null;
289
+ }), this.#S(() => {
290
+ this.#b();
291
+ });
292
+ };
293
+ return {
294
+ reset: r,
295
+ invoke_onerror: () => {
296
+ try {
297
+ n = !0, this.#n.onerror?.(e, r), n = !1;
298
+ } catch (e) {
299
+ Ke(e, this.#i && this.#i.parent);
300
+ }
301
+ }
302
+ };
303
+ }
304
+ #y() {
305
+ let e = this.#n.pending;
306
+ e && (this.is_pending = !0, this.#o = xn(() => e(this.#e)), Ue(() => {
307
+ var e = this.#c = document.createDocumentFragment(), t = Xt();
308
+ e.append(t), this.#a = this.#S(() => xn(() => this.#r(t))), this.#u === 0 && (this.#e.before(e), this.#c = null, Dn(this.#o, () => {
309
+ this.#o = null;
310
+ }), this.#x(V));
311
+ }));
312
+ }
313
+ #b() {
314
+ try {
315
+ if (this.is_pending = this.has_pending_snippet(), this.#u = 0, this.#l = 0, this.#a = xn(() => {
316
+ this.#r(this.#e);
317
+ }), this.#u > 0) {
318
+ var e = this.#c = document.createDocumentFragment();
319
+ jn(this.#a, e);
320
+ let t = this.#n.pending;
321
+ this.#o = xn(() => t(this.#e));
322
+ } else this.#x(V);
323
+ } catch (e) {
324
+ this.error(e);
325
+ }
326
+ }
327
+ #x(e) {
328
+ this.is_pending = !1, e.transfer_effects(this.#f, this.#p);
329
+ }
330
+ defer_effect(e) {
331
+ Xe(e, this.#f, this.#p);
332
+ }
333
+ is_rendered() {
334
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
335
+ }
336
+ has_pending_snippet() {
337
+ return !!this.#n.pending;
338
+ }
339
+ #S(e) {
340
+ var t = q, n = G, r = R;
341
+ Ln(this.#i), K(this.#i), Le(this.#i.ctx);
342
+ try {
343
+ return Dt.ensure(), e();
344
+ } catch (e) {
345
+ return Ge(e), null;
346
+ } finally {
347
+ Ln(t), K(n), Le(r);
348
+ }
349
+ }
350
+ #C(e, t) {
351
+ if (!this.has_pending_snippet()) {
352
+ this.parent && this.parent.#C(e, t);
353
+ return;
354
+ }
355
+ this.#u += e, this.#u === 0 && (this.#x(t), this.#o && Dn(this.#o, () => {
356
+ this.#o = null;
357
+ }), this.#c &&= (this.#e.before(this.#c), null));
358
+ }
359
+ update_pending_count(e, t) {
360
+ this.#C(e, t), this.#l += e, !(!this.#m || this.#d) && (this.#d = !0, Ue(() => {
361
+ this.#d = !1, this.#m && Bt(this.#m, this.#l);
362
+ }));
363
+ }
364
+ get_effect_pending() {
365
+ return this.#h(), X(this.#m);
366
+ }
367
+ error(e) {
368
+ if (!this.#n.onerror && !this.#n.failed) throw e;
369
+ V?.is_fork ? (this.#a && V.skip_effect(this.#a), this.#o && V.skip_effect(this.#o), this.#s && V.skip_effect(this.#s), V.oncommit(() => {
370
+ this.#w(e);
371
+ })) : this.#w(e);
372
+ }
373
+ #w(e) {
374
+ this.#a &&= (W(this.#a), null), this.#o &&= (W(this.#o), null), this.#s &&= (W(this.#s), null), P && (L(this.#t), je(), L(Me()));
375
+ let t = this.#n.failed, n = (e) => {
376
+ let { reset: n, invoke_onerror: r } = this.#v(e);
377
+ r(), t && (this.#s = this.#S(() => {
378
+ try {
379
+ return xn(() => {
380
+ var r = q;
381
+ r.b = this, r.f |= 128, t(this.#e, () => e, () => n);
382
+ });
383
+ } catch (e) {
384
+ return Ke(e, this.#i.parent), null;
385
+ }
386
+ }));
387
+ };
388
+ Ue(() => {
389
+ var t;
390
+ try {
391
+ t = this.transform_error(e);
392
+ } catch (e) {
393
+ Ke(e, this.#i && this.#i.parent);
394
+ return;
395
+ }
396
+ typeof t == "object" && t && typeof t.then == "function" ? t.then(n, (e) => Ke(e, this.#i && this.#i.parent)) : n(t);
397
+ });
398
+ }
399
+ };
400
+ function it(e, t, n, r) {
401
+ let i = Be() ? ct : dt;
402
+ var a = e.filter((e) => !e.settled), o = t.map(i);
403
+ if (n.length === 0 && a.length === 0) {
404
+ r(o);
405
+ return;
406
+ }
407
+ var s = q, c = at(), l = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
408
+ function u(e) {
409
+ if (!(s.f & 16384)) {
410
+ c();
411
+ try {
412
+ r([...o, ...e]);
413
+ } catch (e) {
414
+ Ke(e, s);
415
+ }
416
+ ot();
417
+ }
418
+ }
419
+ var d = st();
420
+ if (n.length === 0) {
421
+ l.then(() => u([])).finally(d);
422
+ return;
423
+ }
424
+ function f() {
425
+ Promise.all(n.map((e) => /* @__PURE__ */ ut(e))).then(u).catch((e) => Ke(e, s)).finally(d);
426
+ }
427
+ l ? l.then(() => {
428
+ c(), f(), ot();
429
+ }) : f();
430
+ }
431
+ function at() {
432
+ var e = q, t = G, n = R, r = V;
433
+ return function(i = !0) {
434
+ Ln(e), K(t), Le(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
435
+ };
436
+ }
437
+ function ot(e = !0) {
438
+ Ln(null), K(null), Le(null), e && V?.deactivate();
439
+ }
440
+ function st() {
441
+ var e = q, t = e.b, n = V, r = !!t?.is_rendered();
442
+ return t?.update_pending_count(1, n), n.increment(r, e), () => {
443
+ t?.update_pending_count(-1, n), n.decrement(r, e);
444
+ };
445
+ }
446
+ /*#__NO_SIDE_EFFECTS__*/
447
+ function ct(e) {
448
+ var t = 2 | w;
449
+ return q !== null && (q.f |= O), {
450
+ ctx: R,
451
+ deps: null,
452
+ effects: null,
453
+ equals: Pe,
454
+ f: t,
455
+ fn: e,
456
+ reactions: null,
457
+ rv: 0,
458
+ v: s,
459
+ wv: 0,
460
+ parent: q,
461
+ ac: null
462
+ };
463
+ }
464
+ var lt = Symbol("obsolete");
465
+ /*#__NO_SIDE_EFFECTS__*/
466
+ function ut(e, t, n) {
467
+ let r = q;
468
+ r === null && me();
469
+ var i = void 0, a = Rt(s), o = !G, c = /* @__PURE__ */ new Set();
470
+ return _n(() => {
471
+ var t = q, n = ee();
472
+ i = n.promise;
473
+ try {
474
+ Promise.resolve(e()).then(n.resolve, (e) => {
475
+ e !== fe && n.reject(e);
476
+ }).finally(ot);
477
+ } catch (e) {
478
+ n.reject(e), ot();
479
+ }
480
+ var s = V;
481
+ if (o) {
482
+ if (t.f & 32768) var l = st();
483
+ if (r.b?.is_rendered()) s.async_deriveds.get(t)?.reject(lt);
484
+ else for (let e of c.values()) e.reject(lt);
485
+ c.add(n), s.async_deriveds.set(t, n);
486
+ }
487
+ let u = (e, t = void 0) => {
488
+ l?.(), c.delete(n), t !== lt && (s.activate(), t ? (a.f |= se, Bt(a, t)) : (a.f & 8388608 && (a.f ^= se), Bt(a, e)), s.deactivate());
489
+ };
490
+ n.promise.then(u, (e) => u(null, e || "unknown"));
491
+ }), dn(() => {
492
+ for (let e of c) e.reject(lt);
493
+ }), new Promise((e) => {
494
+ function t(n) {
495
+ function r() {
496
+ n === i ? e(a) : t(i);
497
+ }
498
+ n.then(r, r);
499
+ }
500
+ t(i);
501
+ });
502
+ }
503
+ /*#__NO_SIDE_EFFECTS__*/
504
+ function B(e) {
505
+ let t = /* @__PURE__ */ ct(e);
506
+ return zn(t), t;
507
+ }
508
+ /*#__NO_SIDE_EFFECTS__*/
509
+ function dt(e) {
510
+ let t = /* @__PURE__ */ ct(e);
511
+ return t.equals = Ie, t;
512
+ }
513
+ function ft(e) {
514
+ var t = e.effects;
515
+ if (t !== null) {
516
+ e.effects = null;
517
+ for (var n = 0; n < t.length; n += 1) W(t[n]);
518
+ }
519
+ }
520
+ function pt(e) {
521
+ var t, n = q, r = e.parent;
522
+ if (!Pn && r !== null && e.v !== s && r.f & 24576) return Ee(), e.v;
523
+ Ln(r);
524
+ try {
525
+ e.f &= ~ae, ft(e), t = Yn(e);
526
+ } finally {
527
+ Ln(n);
528
+ }
529
+ return t;
530
+ }
531
+ function mt(e) {
532
+ var t = pt(e);
533
+ if (!e.equals(t) && (e.wv = Kn(), (!V?.is_fork || e.deps === null) && (V === null ? e.v = t : (V.capture(e, t, !0), vt?.capture(e, t, !0)), e.deps === null))) {
534
+ z(e, C);
535
+ return;
536
+ }
537
+ Pn || (yt === null ? Je(e) : (un() || V?.is_fork) && yt.set(e, t));
538
+ }
539
+ function ht(e) {
540
+ if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && $e(() => {
541
+ t.ac.abort(fe), t.ac = null;
542
+ }), t.fn !== null && (t.teardown = x), Zn(t, 0), Cn(t));
543
+ }
544
+ function gt(e) {
545
+ if (e.effects !== null) for (let t of e.effects) t.teardown && t.fn !== null && Qn(t);
546
+ }
547
+ var _t = null, V = null, vt = null, yt = null, bt = null, xt = !1, St = !1, Ct = null, wt = null, Tt = 0, Et = 1, Dt = class e {
548
+ id = Et++;
549
+ #e = !1;
550
+ linked = !0;
551
+ #t = null;
552
+ #n = null;
553
+ async_deriveds = /* @__PURE__ */ new Map();
554
+ current = /* @__PURE__ */ new Map();
555
+ previous = /* @__PURE__ */ new Map();
556
+ #r = /* @__PURE__ */ new Set();
557
+ #i = /* @__PURE__ */ new Set();
558
+ #a = 0;
559
+ #o = /* @__PURE__ */ new Map();
560
+ #s = null;
561
+ #c = [];
562
+ #l = [];
563
+ #u = /* @__PURE__ */ new Set();
564
+ #d = /* @__PURE__ */ new Set();
565
+ #f = /* @__PURE__ */ new Map();
566
+ #p = /* @__PURE__ */ new Set();
567
+ is_fork = !1;
568
+ #m = !1;
569
+ constructor() {
570
+ _t === null ? _t = this : (_t.#n = this, this.#t = _t), _t = this;
571
+ }
572
+ #h() {
573
+ if (this.is_fork) return !0;
574
+ for (let n of this.#o.keys()) {
575
+ for (var e = n, t = !1; e.parent !== null;) {
576
+ if (this.#f.has(e)) {
577
+ t = !0;
578
+ break;
579
+ }
580
+ e = e.parent;
581
+ }
582
+ if (!t) return !0;
583
+ }
584
+ return !1;
585
+ }
586
+ skip_effect(e) {
587
+ this.#f.has(e) || this.#f.set(e, {
588
+ d: [],
589
+ m: []
590
+ }), this.#p.delete(e);
591
+ }
592
+ unskip_effect(e, t = (e) => this.schedule(e)) {
593
+ var n = this.#f.get(e);
594
+ if (n) {
595
+ this.#f.delete(e);
596
+ for (var r of n.d) z(r, w), t(r);
597
+ for (r of n.m) z(r, te), t(r);
598
+ }
599
+ this.#p.add(e);
600
+ }
601
+ #g() {
602
+ this.#e = !0, Tt++ > 1e3 && (this.#x(), kt());
603
+ for (let e of this.#u) this.#d.delete(e), z(e, w), this.schedule(e);
604
+ for (let e of this.#d) z(e, te), this.schedule(e);
605
+ let t = this.#c;
606
+ this.#c = [], this.apply();
607
+ var n = Ct = [], r = [], i = wt = [];
608
+ for (let e of t) try {
609
+ this.#_(e, n, r);
610
+ } catch (t) {
611
+ throw Pt(e), this.#h() || this.discard(), t;
612
+ }
613
+ if (V = null, i.length > 0) {
614
+ var a = e.ensure();
615
+ for (let e of i) a.schedule(e);
616
+ }
617
+ if (Ct = null, wt = null, this.#h()) {
618
+ this.#b(r), this.#b(n);
619
+ for (let [e, t] of this.#f) Nt(e, t);
620
+ i.length > 0 && V.#g();
621
+ return;
622
+ }
623
+ let o = this.#v();
624
+ if (o) {
625
+ this.#b(r), this.#b(n), o.#y(this);
626
+ return;
627
+ }
628
+ this.#u.clear(), this.#d.clear();
629
+ for (let e of this.#r) e(this);
630
+ this.#r.clear(), vt = this, jt(r), jt(n), vt = null, this.#s?.resolve();
631
+ var s = V;
632
+ if (this.#a === 0 && (this.#c.length === 0 || s !== null) && this.#x(), this.#c.length > 0) {
633
+ if (s !== null) {
634
+ let e = s;
635
+ e.#c.push(...this.#c.filter((t) => !e.#c.includes(t)));
636
+ } else s = this;
637
+ }
638
+ s !== null && s.#g();
639
+ }
640
+ #_(e, t, n) {
641
+ e.f ^= C;
642
+ for (var r = e.first; r !== null;) {
643
+ var i = r.f, a = !!(i & 96);
644
+ if (!(a && i & 1024 || i & 8192 || this.#f.has(r)) && r.fn !== null) {
645
+ a ? r.f ^= C : i & 4 ? t.push(r) : qn(r) && (i & 16 && this.#d.add(r), Qn(r));
646
+ var o = r.first;
647
+ if (o !== null) {
648
+ r = o;
649
+ continue;
650
+ }
651
+ }
652
+ for (; r !== null;) {
653
+ var s = r.next;
654
+ if (s !== null) {
655
+ r = s;
656
+ break;
657
+ }
658
+ r = r.parent;
659
+ }
660
+ }
661
+ }
662
+ #v() {
663
+ for (var e = this.#t; e !== null;) {
664
+ if (!e.is_fork) {
665
+ for (let [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
666
+ }
667
+ e = e.#t;
668
+ }
669
+ return null;
670
+ }
671
+ #y(e) {
672
+ for (let [t, n] of e.current) !this.previous.has(t) && e.previous.has(t) && this.previous.set(t, e.previous.get(t)), this.current.set(t, n);
673
+ for (let [t, n] of e.async_deriveds) {
674
+ let e = this.async_deriveds.get(t);
675
+ e && n.promise.then(e.resolve).catch(e.reject);
676
+ }
677
+ e.async_deriveds.clear(), this.transfer_effects(e.#u, e.#d);
678
+ let t = (e) => {
679
+ var n = e.reactions;
680
+ if (n !== null && !(e.f & 2 && !(e.f & 6144))) for (let e of n) {
681
+ var r = e.f;
682
+ if (r & 2) t(e);
683
+ else {
684
+ var i = e;
685
+ r & 4194320 && !this.async_deriveds.has(i) && (this.#d.delete(i), z(i, w), this.schedule(i));
686
+ }
687
+ }
688
+ };
689
+ for (let e of this.current.keys()) t(e);
690
+ this.oncommit(() => e.discard()), e.#x(), V = this, this.#g();
691
+ }
692
+ #b(e) {
693
+ for (var t = 0; t < e.length; t += 1) Xe(e[t], this.#u, this.#d);
694
+ }
695
+ capture(e, t, n = !1) {
696
+ e.v !== s && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [t, n]), yt?.set(e, t)), this.is_fork || (e.v = t);
697
+ }
698
+ activate() {
699
+ V = this;
700
+ }
701
+ deactivate() {
702
+ V = null, yt = null;
703
+ }
704
+ flush() {
705
+ try {
706
+ St = !0, V = this, this.#g();
707
+ } finally {
708
+ Tt = 0, bt = null, Ct = null, wt = null, St = !1, V = null, yt = null, It.clear();
709
+ }
710
+ }
711
+ discard() {
712
+ for (let e of this.#i) e(this);
713
+ this.#i.clear();
714
+ for (let e of this.async_deriveds.values()) e.reject(lt);
715
+ this.#x(), this.#s?.resolve();
716
+ }
717
+ register_created_effect(e) {
718
+ this.#l.push(e);
719
+ }
720
+ increment(e, t) {
721
+ if (this.#a += 1, e) {
722
+ let e = this.#o.get(t) ?? 0;
723
+ this.#o.set(t, e + 1);
724
+ }
725
+ }
726
+ decrement(e, t) {
727
+ if (--this.#a, e) {
728
+ let e = this.#o.get(t) ?? 0;
729
+ e === 1 ? this.#o.delete(t) : this.#o.set(t, e - 1);
730
+ }
731
+ this.#m || (this.#m = !0, Ue(() => {
732
+ this.#m = !1, this.linked && this.flush();
733
+ }));
734
+ }
735
+ transfer_effects(e, t) {
736
+ for (let t of e) this.#u.add(t);
737
+ for (let e of t) this.#d.add(e);
738
+ e.clear(), t.clear();
739
+ }
740
+ oncommit(e) {
741
+ this.#r.add(e);
742
+ }
743
+ ondiscard(e) {
744
+ this.#i.add(e);
745
+ }
746
+ settled() {
747
+ return (this.#s ??= ee()).promise;
748
+ }
749
+ static ensure() {
750
+ if (V === null) {
751
+ let t = V = new e();
752
+ !St && !xt && Ue(() => {
753
+ t.#e || t.flush();
754
+ });
755
+ }
756
+ return V;
757
+ }
758
+ apply() {
759
+ yt = null;
760
+ }
761
+ schedule(e) {
762
+ if (bt = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
763
+ e.b.defer_effect(e);
764
+ return;
765
+ }
766
+ for (var t = e; t.parent !== null;) {
767
+ t = t.parent;
768
+ var n = t.f;
769
+ if (Ct !== null && t === q && (G === null || !(G.f & 2))) return;
770
+ if (n & 96) {
771
+ if (!(n & 1024)) return;
772
+ t.f ^= C;
773
+ }
774
+ }
775
+ this.#c.push(t);
776
+ }
777
+ #x() {
778
+ if (this.linked) {
779
+ var e = this.#t, t = this.#n;
780
+ e === null || (e.#n = t), t === null ? _t = e : t.#t = e, this.linked = !1;
781
+ }
782
+ }
783
+ };
784
+ function Ot(e) {
785
+ var t = xt;
786
+ xt = !0;
787
+ try {
788
+ var n;
789
+ for (e && (V !== null && !V.is_fork && V.flush(), n = e());;) {
790
+ if (We(), V === null) return n;
791
+ V.flush();
792
+ }
793
+ } finally {
794
+ xt = t;
795
+ }
796
+ }
797
+ function kt() {
798
+ try {
799
+ ye();
800
+ } catch (e) {
801
+ Ke(e, bt);
802
+ }
803
+ }
804
+ var At = null;
805
+ function jt(e) {
806
+ var t = e.length;
807
+ if (t !== 0) {
808
+ for (var n = 0; n < t;) {
809
+ var r = e[n++];
810
+ if (!(r.f & 24576) && qn(r) && (At = /* @__PURE__ */ new Set(), Qn(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && En(r), At?.size > 0)) {
811
+ It.clear();
812
+ for (let e of At) {
813
+ if (e.f & 24576) continue;
814
+ let t = [e], n = e.parent;
815
+ for (; n !== null;) At.has(n) && (At.delete(n), t.push(n)), n = n.parent;
816
+ for (let e = t.length - 1; e >= 0; e--) {
817
+ let n = t[e];
818
+ n.f & 24576 || Qn(n);
819
+ }
820
+ }
821
+ At.clear();
822
+ }
823
+ }
824
+ At = null;
825
+ }
826
+ }
827
+ function Mt(e) {
828
+ V.schedule(e);
829
+ }
830
+ function Nt(e, t) {
831
+ if (!(e.f & 32 && e.f & 1024)) {
832
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), z(e, C);
833
+ for (var n = e.first; n !== null;) Nt(n, t), n = n.next;
834
+ }
835
+ }
836
+ function Pt(e) {
837
+ z(e, C);
838
+ for (var t = e.first; t !== null;) Pt(t), t = t.next;
839
+ }
840
+ var Ft = /* @__PURE__ */ new Set(), It = /* @__PURE__ */ new Map(), Lt = !1;
841
+ function Rt(e, t) {
842
+ return {
843
+ f: 0,
844
+ v: e,
845
+ reactions: null,
846
+ equals: Pe,
847
+ rv: 0,
848
+ wv: 0
849
+ };
850
+ }
851
+ /*#__NO_SIDE_EFFECTS__*/
852
+ function H(e, t) {
853
+ let n = Rt(e, t);
854
+ return zn(n), n;
855
+ }
856
+ /*#__NO_SIDE_EFFECTS__*/
857
+ function zt(e, t = !1, n = !0) {
858
+ let r = Rt(e);
859
+ return t || (r.equals = Ie), r;
860
+ }
861
+ function U(e, t, n = !1) {
862
+ return G !== null && (!In || G.f & 131072) && Be() && G.f & 4325394 && (Rn === null || !Rn.has(e)) && we(), Bt(e, n ? Wt(t) : t, wt);
863
+ }
864
+ function Bt(e, t, n = null) {
865
+ if (!e.equals(t)) {
866
+ It.set(e, Pn ? t : e.v);
867
+ var r = Dt.ensure();
868
+ if (r.capture(e, t), e.f & 2) {
869
+ let t = e;
870
+ e.f & 2048 && pt(t), yt === null && Je(t);
871
+ }
872
+ e.wv = Kn(), Ut(e, w, n), Be() && q !== null && q.f & 1024 && !(q.f & 96) && (Bn === null ? Vn([e]) : Bn.push(e)), !r.is_fork && Ft.size > 0 && !Lt && Vt();
873
+ }
874
+ return t;
875
+ }
876
+ function Vt() {
877
+ Lt = !1;
878
+ for (let e of Ft) {
879
+ e.f & 1024 && z(e, te);
880
+ let t;
881
+ try {
882
+ t = qn(e);
883
+ } catch {
884
+ t = !0;
885
+ }
886
+ t && Qn(e);
887
+ }
888
+ Ft.clear();
889
+ }
890
+ function Ht(e) {
891
+ U(e, e.v + 1);
892
+ }
893
+ function Ut(e, t, n) {
894
+ var r = e.reactions;
895
+ if (r !== null) for (var i = Be(), a = r.length, o = 0; o < a; o++) {
896
+ var s = r[o], c = s.f;
897
+ if (!(!i && s === q)) {
898
+ var l = (c & w) === 0;
899
+ if (l && z(s, t), c & 131072) Ft.add(s);
900
+ else if (c & 2) {
901
+ var u = s;
902
+ yt?.delete(u), c & 65536 || (c & 512 && (q === null || !(q.f & 2097152)) && (s.f |= ae), Ut(u, te, n));
903
+ } else if (l) {
904
+ var d = s;
905
+ c & 16 && At !== null && At.add(d), n === null ? Mt(d) : n.push(d);
906
+ }
907
+ }
908
+ }
909
+ }
910
+ function Wt(e) {
911
+ if (typeof e != "object" || !e || j in e) return e;
912
+ let t = y(e);
913
+ if (t !== _ && t !== v) return e;
914
+ var n = /* @__PURE__ */ new Map(), r = l(e), i = /* @__PURE__ */ H(0), a = null, o = Wn, c = (e) => {
915
+ if (Wn === o) return e();
916
+ var t = G, n = Wn;
917
+ K(null), Gn(o);
918
+ var r = e();
919
+ return K(t), Gn(n), r;
920
+ };
921
+ return r && n.set("length", /* @__PURE__ */ H(e.length, a)), new Proxy(e, {
922
+ defineProperty(e, t, r) {
923
+ (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && Se();
924
+ var i = n.get(t);
925
+ return i === void 0 ? c(() => {
926
+ var e = /* @__PURE__ */ H(r.value, a);
927
+ return n.set(t, e), e;
928
+ }) : U(i, r.value, !0), !0;
929
+ },
930
+ deleteProperty(e, t) {
931
+ var r = n.get(t);
932
+ if (r === void 0) {
933
+ if (t in e) {
934
+ let e = c(() => /* @__PURE__ */ H(s, a));
935
+ n.set(t, e), Ht(i);
936
+ }
937
+ } else U(r, s), Ht(i);
938
+ return !0;
939
+ },
940
+ get(t, r, i) {
941
+ if (r === j) return e;
942
+ var o = n.get(r), l = r in t;
943
+ if (o === void 0 && (!l || h(t, r)?.writable) && (o = c(() => /* @__PURE__ */ H(Wt(l ? t[r] : s), a)), n.set(r, o)), o !== void 0) {
944
+ var u = X(o);
945
+ return u === s ? void 0 : u;
946
+ }
947
+ return Reflect.get(t, r, i);
948
+ },
949
+ getOwnPropertyDescriptor(e, t) {
950
+ var r = Reflect.getOwnPropertyDescriptor(e, t);
951
+ if (r && "value" in r) {
952
+ var i = n.get(t);
953
+ i && (r.value = X(i));
954
+ } else if (r === void 0) {
955
+ var a = n.get(t), o = a?.v;
956
+ if (a !== void 0 && o !== s) return {
957
+ enumerable: !0,
958
+ configurable: !0,
959
+ value: o,
960
+ writable: !0
961
+ };
962
+ }
963
+ return r;
964
+ },
965
+ has(e, t) {
966
+ if (t === j) return !0;
967
+ var r = n.get(t), i = r !== void 0 && r.v !== s || Reflect.has(e, t);
968
+ return (r !== void 0 || q !== null && (!i || h(e, t)?.writable)) && (r === void 0 && (r = c(() => /* @__PURE__ */ H(i ? Wt(e[t]) : s, a)), n.set(t, r)), X(r) === s) ? !1 : i;
969
+ },
970
+ set(e, t, o, l) {
971
+ var u = n.get(t), d = t in e;
972
+ if (r && t === "length") for (var f = o; f < u.v; f += 1) {
973
+ var p = n.get(f + "");
974
+ p === void 0 ? f in e && (p = c(() => /* @__PURE__ */ H(s, a)), n.set(f + "", p)) : U(p, s);
975
+ }
976
+ if (u === void 0) (!d || h(e, t)?.writable) && (u = c(() => /* @__PURE__ */ H(void 0, a)), U(u, Wt(o)), n.set(t, u));
977
+ else {
978
+ d = u.v !== s;
979
+ var m = c(() => Wt(o));
980
+ U(u, m);
981
+ }
982
+ var g = Reflect.getOwnPropertyDescriptor(e, t);
983
+ if (g?.set && g.set.call(l, o), !d) {
984
+ if (r && typeof t == "string") {
985
+ var _ = n.get("length"), v = Number(t);
986
+ Number.isInteger(v) && v >= _.v && U(_, v + 1);
987
+ }
988
+ Ht(i);
989
+ }
990
+ return !0;
991
+ },
992
+ ownKeys(e) {
993
+ X(i);
994
+ var t = Reflect.ownKeys(e).filter((e) => {
995
+ var t = n.get(e);
996
+ return t === void 0 || t.v !== s;
997
+ });
998
+ for (var [r, a] of n) a.v !== s && !(r in e) && t.push(r);
999
+ return t;
1000
+ },
1001
+ setPrototypeOf() {
1002
+ Ce();
1003
+ }
1004
+ });
1005
+ }
1006
+ var Gt, Kt, qt, Jt;
1007
+ function Yt() {
1008
+ if (Gt === void 0) {
1009
+ Gt = window, Kt = /Firefox/.test(navigator.userAgent);
1010
+ var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1011
+ qt = h(t, "firstChild").get, Jt = h(t, "nextSibling").get, b(e) && (e[le] = void 0, e[ce] = null, e[ue] = void 0, e.__e = void 0), b(n) && (n[de] = void 0);
1012
+ }
1013
+ }
1014
+ function Xt(e = "") {
1015
+ return document.createTextNode(e);
1016
+ }
1017
+ /*@__NO_SIDE_EFFECTS__*/
1018
+ function Zt(e) {
1019
+ return qt.call(e);
1020
+ }
1021
+ /*@__NO_SIDE_EFFECTS__*/
1022
+ function Qt(e) {
1023
+ return Jt.call(e);
1024
+ }
1025
+ function $t(e, t) {
1026
+ if (!P) return /* @__PURE__ */ Zt(e);
1027
+ var n = /* @__PURE__ */ Zt(I);
1028
+ if (n === null) n = I.appendChild(Xt());
1029
+ else if (t && n.nodeType !== 3) {
1030
+ var r = Xt();
1031
+ return n?.before(r), L(r), r;
1032
+ }
1033
+ return t && on(n), L(n), n;
1034
+ }
1035
+ function en(e, t = !1) {
1036
+ if (!P) {
1037
+ var n = /* @__PURE__ */ Zt(e);
1038
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Qt(n) : n;
1039
+ }
1040
+ if (t) {
1041
+ if (I?.nodeType !== 3) {
1042
+ var r = Xt();
1043
+ return I?.before(r), L(r), r;
1044
+ }
1045
+ on(I);
1046
+ }
1047
+ return I;
1048
+ }
1049
+ function tn(e, t = 1, n = !1) {
1050
+ let r = P ? I : e;
1051
+ for (var i; t--;) i = r, r = /* @__PURE__ */ Qt(r);
1052
+ if (!P) return r;
1053
+ if (n) {
1054
+ if (r?.nodeType !== 3) {
1055
+ var a = Xt();
1056
+ return r === null ? i?.after(a) : r.before(a), L(a), a;
1057
+ }
1058
+ on(r);
1059
+ }
1060
+ return L(r), r;
1061
+ }
1062
+ function nn(e) {
1063
+ e.textContent = "";
1064
+ }
1065
+ function rn() {
1066
+ return !1;
1067
+ }
1068
+ function an(e, t, n) {
1069
+ 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);
1070
+ }
1071
+ function on(e) {
1072
+ if (e.nodeValue.length < 65536) return;
1073
+ let t = e.nextSibling;
1074
+ for (; t !== null && t.nodeType === 3;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1075
+ }
1076
+ function sn(e) {
1077
+ q === null && (G === null && ve(e), _e()), Pn && ge(e);
1078
+ }
1079
+ function cn(e, t) {
1080
+ var n = t.last;
1081
+ n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1082
+ }
1083
+ function ln(e, t) {
1084
+ var n = q;
1085
+ n !== null && n.f & 8192 && (e |= T);
1086
+ var r = {
1087
+ ctx: R,
1088
+ deps: null,
1089
+ nodes: null,
1090
+ f: e | w | 512,
1091
+ first: null,
1092
+ fn: t,
1093
+ last: null,
1094
+ next: null,
1095
+ parent: n,
1096
+ b: n && n.b,
1097
+ prev: null,
1098
+ teardown: null,
1099
+ wv: 0,
1100
+ ac: null
1101
+ };
1102
+ V?.register_created_effect(r);
1103
+ var i = r;
1104
+ if (e & 4) Ct === null ? Dt.ensure().schedule(r) : Ct.push(r);
1105
+ else if (t !== null) {
1106
+ try {
1107
+ Qn(r);
1108
+ } catch (e) {
1109
+ throw W(r), e;
1110
+ }
1111
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= D));
1112
+ }
1113
+ if (i !== null && (i.parent = n, n !== null && cn(i, n), G !== null && G.f & 2 && !(e & 64))) {
1114
+ var a = G;
1115
+ (a.effects ??= []).push(i);
1116
+ }
1117
+ return r;
1118
+ }
1119
+ function un() {
1120
+ return G !== null && !In;
1121
+ }
1122
+ function dn(e) {
1123
+ let t = ln(8, null);
1124
+ return z(t, C), t.teardown = e, t;
1125
+ }
1126
+ function fn(e) {
1127
+ sn("$effect");
1128
+ var t = q.f;
1129
+ if (!G && t & 32 && R !== null && !R.i) {
1130
+ var n = R;
1131
+ (n.e ??= []).push(e);
1132
+ } else return pn(e);
1133
+ }
1134
+ function pn(e) {
1135
+ return ln(4 | ie, e);
1136
+ }
1137
+ function mn(e) {
1138
+ Dt.ensure();
1139
+ let t = ln(64 | O, e);
1140
+ return () => {
1141
+ W(t);
1142
+ };
1143
+ }
1144
+ function hn(e) {
1145
+ Dt.ensure();
1146
+ let t = ln(64 | O, e);
1147
+ return (e = {}) => new Promise((n) => {
1148
+ e.outro ? Dn(t, () => {
1149
+ W(t), n(void 0);
1150
+ }) : (W(t), n(void 0));
1151
+ });
1152
+ }
1153
+ function gn(e) {
1154
+ return ln(4, e);
1155
+ }
1156
+ function _n(e) {
1157
+ return ln(A | O, e);
1158
+ }
1159
+ function vn(e, t = 0) {
1160
+ return ln(8 | t, e);
1161
+ }
1162
+ function yn(e, t = [], n = [], r = []) {
1163
+ it(r, t, n, (t) => {
1164
+ ln(8, () => {
1165
+ e(...t.map(X));
1166
+ });
1167
+ });
1168
+ }
1169
+ function bn(e, t = 0) {
1170
+ return ln(16 | t, e);
1171
+ }
1172
+ function xn(e) {
1173
+ return ln(32 | O, e);
1174
+ }
1175
+ function Sn(e) {
1176
+ var t = e.teardown;
1177
+ if (t !== null) {
1178
+ let e = Pn, n = G;
1179
+ Fn(!0), K(null);
1180
+ try {
1181
+ t.call(null);
1182
+ } finally {
1183
+ Fn(e), K(n);
1184
+ }
1185
+ }
1186
+ }
1187
+ function Cn(e, t = !1) {
1188
+ var n = e.first;
1189
+ for (e.first = e.last = null; n !== null;) {
1190
+ let e = n.ac;
1191
+ e !== null && $e(() => {
1192
+ e.abort(fe);
1193
+ });
1194
+ var r = n.next;
1195
+ n.f & 64 ? n.parent = null : W(n, t), n = r;
1196
+ }
1197
+ }
1198
+ function wn(e) {
1199
+ for (var t = e.first; t !== null;) {
1200
+ var n = t.next;
1201
+ t.f & 32 || W(t), t = n;
1202
+ }
1203
+ }
1204
+ function W(e, t = !0) {
1205
+ var n = !1;
1206
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Tn(e.nodes.start, e.nodes.end), n = !0), e.f |= re, Cn(e, t && !n), Zn(e, 0);
1207
+ var r = e.nodes && e.nodes.t;
1208
+ if (r !== null) for (let e of r) e.stop();
1209
+ Sn(e), e.f ^= re, e.f |= E;
1210
+ var i = e.parent;
1211
+ i !== null && i.first !== null && En(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1212
+ }
1213
+ function Tn(e, t) {
1214
+ for (; e !== null;) {
1215
+ var n = e === t ? null : /* @__PURE__ */ Qt(e);
1216
+ e.remove(), e = n;
1217
+ }
1218
+ }
1219
+ function En(e) {
1220
+ var t = e.parent, n = e.prev, r = e.next;
1221
+ n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1222
+ }
1223
+ function Dn(e, t, n = !0) {
1224
+ var r = [];
1225
+ On(e, r, !0);
1226
+ var i = () => {
1227
+ n && W(e), t && t();
1228
+ }, a = r.length;
1229
+ if (a > 0) {
1230
+ var o = () => --a || i();
1231
+ for (var s of r) s.out(o);
1232
+ } else i();
1233
+ }
1234
+ function On(e, t, n) {
1235
+ if (!(e.f & 8192)) {
1236
+ e.f ^= T;
1237
+ var r = e.nodes && e.nodes.t;
1238
+ if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
1239
+ for (var i = e.first; i !== null;) {
1240
+ var a = i.next;
1241
+ if (!(i.f & 64)) {
1242
+ var o = !!(i.f & 65536) || !!(i.f & 32) && !!(e.f & 16);
1243
+ On(i, t, o ? n : !1);
1244
+ }
1245
+ i = a;
1246
+ }
1247
+ }
1248
+ }
1249
+ function kn(e) {
1250
+ An(e, !0);
1251
+ }
1252
+ function An(e, t) {
1253
+ if (e.f & 8192) {
1254
+ e.f ^= T, e.f & 1024 || (z(e, w), Dt.ensure().schedule(e));
1255
+ for (var n = e.first; n !== null;) {
1256
+ var r = n.next, i = !!(n.f & 65536) || !!(n.f & 32);
1257
+ An(n, i ? t : !1), n = r;
1258
+ }
1259
+ var a = e.nodes && e.nodes.t;
1260
+ if (a !== null) for (let e of a) (e.is_global || t) && e.in();
1261
+ }
1262
+ }
1263
+ function jn(e, t) {
1264
+ if (e.nodes) for (var n = e.nodes.start, r = e.nodes.end; n !== null;) {
1265
+ var i = n === r ? null : /* @__PURE__ */ Qt(n);
1266
+ t.append(n), n = i;
1267
+ }
1268
+ }
1269
+ var Mn = null, Nn = !1, Pn = !1;
1270
+ function Fn(e) {
1271
+ Pn = e;
1272
+ }
1273
+ var G = null, In = !1;
1274
+ function K(e) {
1275
+ G = e;
1276
+ }
1277
+ var q = null;
1278
+ function Ln(e) {
1279
+ q = e;
1280
+ }
1281
+ var Rn = null;
1282
+ function zn(e) {
1283
+ G !== null && (Rn ??= /* @__PURE__ */ new Set()).add(e);
1284
+ }
1285
+ var J = null, Y = 0, Bn = null;
1286
+ function Vn(e) {
1287
+ Bn = e;
1288
+ }
1289
+ var Hn = 1, Un = 0, Wn = Un;
1290
+ function Gn(e) {
1291
+ Wn = e;
1292
+ }
1293
+ function Kn() {
1294
+ return ++Hn;
1295
+ }
1296
+ function qn(e) {
1297
+ var t = e.f;
1298
+ if (t & 2048) return !0;
1299
+ if (t & 2 && (e.f &= ~ae), t & 4096) {
1300
+ for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
1301
+ var a = n[i];
1302
+ if (qn(a) && mt(a), a.wv > e.wv) return !0;
1303
+ }
1304
+ t & 512 && yt === null && z(e, C);
1305
+ }
1306
+ return !1;
1307
+ }
1308
+ function Jn(e, t, n = !0) {
1309
+ var r = e.reactions;
1310
+ if (r !== null && !(Rn !== null && Rn.has(e))) for (var i = 0; i < r.length; i++) {
1311
+ var a = r[i];
1312
+ a.f & 2 ? Jn(a, t, !1) : t === a && (n ? z(a, w) : a.f & 1024 && z(a, te), Mt(a));
1313
+ }
1314
+ }
1315
+ function Yn(e) {
1316
+ var t = J, n = Y, r = Bn, i = G, a = Rn, o = R, s = In, c = Wn, l = e.f;
1317
+ J = null, Y = 0, Bn = null, G = l & 96 ? null : e, Rn = null, Le(e.ctx), In = !1, Wn = ++Un, e.ac !== null && ($e(() => {
1318
+ e.ac.abort(fe);
1319
+ }), e.ac = null);
1320
+ try {
1321
+ e.f |= oe;
1322
+ var u = e.fn, d = u();
1323
+ e.f |= ne;
1324
+ var f = e.deps, p = V?.is_fork;
1325
+ if (J !== null) {
1326
+ var m;
1327
+ if (p || Zn(e, Y), f !== null && Y > 0) for (f.length = Y + J.length, m = 0; m < J.length; m++) f[Y + m] = J[m];
1328
+ else e.deps = f = J;
1329
+ if (un() && e.f & 512) for (m = Y; m < f.length; m++) (f[m].reactions ??= []).push(e);
1330
+ } else !p && f !== null && Y < f.length && (Zn(e, Y), f.length = Y);
1331
+ if (Be() && Bn !== null && !In && f !== null && !(e.f & 6146)) for (m = 0; m < Bn.length; m++) Jn(Bn[m], e);
1332
+ if (i !== null && i !== e) {
1333
+ if (Un++, i.deps !== null) for (let e = 0; e < n; e += 1) i.deps[e].rv = Un;
1334
+ if (t !== null) for (let e of t) e.rv = Un;
1335
+ Bn !== null && (r === null ? r = Bn : r.push(...Bn));
1336
+ }
1337
+ return e.f & 8388608 && (e.f ^= se), d;
1338
+ } catch (e) {
1339
+ return Ge(e);
1340
+ } finally {
1341
+ e.f ^= oe, J = t, Y = n, Bn = r, G = i, Rn = a, Le(o), In = s, Wn = c;
1342
+ }
1343
+ }
1344
+ function Xn(e, t) {
1345
+ let n = t.reactions;
1346
+ if (n !== null) {
1347
+ var r = u.call(n, e);
1348
+ if (r !== -1) {
1349
+ var i = n.length - 1;
1350
+ i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1351
+ }
1352
+ }
1353
+ if (n === null && t.f & 2 && (J === null || !d.call(J, t))) {
1354
+ var a = t;
1355
+ a.f & 512 && (a.f ^= 512, a.f &= ~ae), a.v !== s && Je(a), a.ac !== null && $e(() => {
1356
+ a.ac.abort(fe), a.ac = null, z(a, w);
1357
+ }), ht(a), Zn(a, 0);
1358
+ }
1359
+ }
1360
+ function Zn(e, t) {
1361
+ var n = e.deps;
1362
+ if (n !== null) for (var r = t; r < n.length; r++) Xn(e, n[r]);
1363
+ }
1364
+ function Qn(e) {
1365
+ var t = e.f;
1366
+ if (!(t & 16384)) {
1367
+ z(e, C);
1368
+ var n = q, r = Nn;
1369
+ q = e, Nn = !(t & 96);
1370
+ try {
1371
+ t & 16777232 ? wn(e) : Cn(e), Sn(e);
1372
+ var i = Yn(e);
1373
+ e.teardown = typeof i == "function" ? i : null, e.wv = Hn;
1374
+ } finally {
1375
+ Nn = r, q = n;
1376
+ }
1377
+ }
1378
+ }
1379
+ function X(e) {
1380
+ var t = !!(e.f & 2);
1381
+ if (Mn?.add(e), G !== null && !In && !(q !== null && q.f & 16384) && (Rn === null || !Rn.has(e))) {
1382
+ var n = G.deps;
1383
+ if (G.f & 2097152) e.rv < Un && (e.rv = Un, J === null && n !== null && n[Y] === e ? Y++ : J === null ? J = [e] : J.push(e));
1384
+ else {
1385
+ G.deps ??= [], d.call(G.deps, e) || G.deps.push(e);
1386
+ var r = e.reactions;
1387
+ r === null ? e.reactions = [G] : d.call(r, G) || r.push(G);
1388
+ }
1389
+ }
1390
+ if (Pn && It.has(e)) return It.get(e);
1391
+ if (t) {
1392
+ var i = e;
1393
+ if (Pn) {
1394
+ var a = i.v;
1395
+ return (!(i.f & 1024) && i.reactions !== null || er(i)) && (a = pt(i)), It.set(i, a), a;
1396
+ }
1397
+ var o = !(i.f & 512) && !In && G !== null && (Nn || !!(G.f & 512)), s = (i.f & ne) === 0;
1398
+ qn(i) && (o && (i.f |= 512), mt(i)), o && !s && (gt(i), $n(i));
1399
+ }
1400
+ if (yt?.has(e)) return yt.get(e);
1401
+ if (e.f & 8388608) throw e.v;
1402
+ return e.v;
1403
+ }
1404
+ function $n(e) {
1405
+ if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ??= []).push(e), t.f & 2 && !(t.f & 512) && (gt(t), $n(t));
1406
+ }
1407
+ function er(e) {
1408
+ if (e.v === s) return !0;
1409
+ if (e.deps === null) return !1;
1410
+ for (let t of e.deps) if (It.has(t) || t.f & 2 && er(t)) return !0;
1411
+ return !1;
1412
+ }
1413
+ function tr(e) {
1414
+ var t = In;
1415
+ try {
1416
+ return In = !0, e();
1417
+ } finally {
1418
+ In = t;
1419
+ }
1420
+ }
1421
+ function nr(e) {
1422
+ if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
1423
+ if (j in e) rr(e);
1424
+ else if (!Array.isArray(e)) for (let t in e) {
1425
+ let n = e[t];
1426
+ typeof n == "object" && n && j in n && rr(n);
1427
+ }
1428
+ }
1429
+ }
1430
+ function rr(e, t = /* @__PURE__ */ new Set()) {
1431
+ if (typeof e == "object" && e && !(e instanceof EventTarget) && !t.has(e)) {
1432
+ t.add(e), e instanceof Date && e.getTime();
1433
+ for (let n in e) try {
1434
+ rr(e[n], t);
1435
+ } catch {}
1436
+ let n = y(e);
1437
+ if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
1438
+ let t = g(n);
1439
+ for (let n in t) {
1440
+ let r = t[n].get;
1441
+ if (r) try {
1442
+ r.call(e);
1443
+ } catch {}
1444
+ }
1445
+ }
1446
+ }
1447
+ }
1448
+ var ir = Symbol("events"), ar = /* @__PURE__ */ new Set(), or = /* @__PURE__ */ new Set();
1449
+ function sr(e, t, n) {
1450
+ (t[ir] ??= {})[e] = n;
1451
+ }
1452
+ function cr(e) {
1453
+ for (var t = 0; t < e.length; t++) ar.add(e[t]);
1454
+ for (var n of or) n(e);
1455
+ }
1456
+ var lr = null;
1457
+ function ur(e) {
1458
+ var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
1459
+ lr = e;
1460
+ var o = 0, s = lr === e && e[ir];
1461
+ if (s) {
1462
+ var c = i.indexOf(s);
1463
+ if (c !== -1 && (t === document || t === window)) {
1464
+ e[ir] = t;
1465
+ return;
1466
+ }
1467
+ var l = i.indexOf(t);
1468
+ if (l === -1) return;
1469
+ c <= l && (o = c);
1470
+ }
1471
+ if (a = i[o] || e.target, a !== t) {
1472
+ m(e, "currentTarget", {
1473
+ configurable: !0,
1474
+ get() {
1475
+ return a || n;
1476
+ }
1477
+ });
1478
+ var u = G, d = q;
1479
+ K(null), Ln(null);
1480
+ try {
1481
+ for (var f, p = []; a !== null && a !== t;) {
1482
+ try {
1483
+ var h = a[ir]?.[r];
1484
+ h != null && (!a.disabled || e.target === a) && h.call(a, e);
1485
+ } catch (e) {
1486
+ f ? p.push(e) : f = e;
1487
+ }
1488
+ if (e.cancelBubble) break;
1489
+ o++, a = o < i.length ? i[o] : null;
1490
+ }
1491
+ if (f) {
1492
+ for (let e of p) queueMicrotask(() => {
1493
+ throw e;
1494
+ });
1495
+ throw f;
1496
+ }
1497
+ } finally {
1498
+ e[ir] = t, delete e.currentTarget, K(u), Ln(d);
1499
+ }
1500
+ }
1501
+ }
1502
+ var dr = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1503
+ function fr(e) {
1504
+ return dr?.createHTML(e) ?? e;
1505
+ }
1506
+ function pr(e) {
1507
+ var t = an("template");
1508
+ return t.innerHTML = fr(e.replaceAll("<!>", "<!---->")), t.content;
1509
+ }
1510
+ function mr(e, t) {
1511
+ var n = q;
1512
+ n.nodes === null && (n.nodes = {
1513
+ start: e,
1514
+ end: t,
1515
+ a: null,
1516
+ t: null
1517
+ });
1518
+ }
1519
+ /*#__NO_SIDE_EFFECTS__*/
1520
+ function hr(e, t) {
1521
+ var n = !!(t & 1), r = !!(t & 2), i, a = !e.startsWith("<!>");
1522
+ return () => {
1523
+ if (P) return mr(I, null), I;
1524
+ i === void 0 && (i = pr(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ Zt(i)));
1525
+ var t = r || Kt ? document.importNode(i, !0) : i.cloneNode(!0);
1526
+ if (n) {
1527
+ var o = /* @__PURE__ */ Zt(t), s = t.lastChild;
1528
+ mr(o, s);
1529
+ } else mr(t, t);
1530
+ return t;
1531
+ };
1532
+ }
1533
+ function gr() {
1534
+ if (P) return mr(I, null), I;
1535
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = Xt();
1536
+ return e.append(t, n), mr(t, n), e;
1537
+ }
1538
+ function Z(e, t) {
1539
+ if (P) {
1540
+ var n = q;
1541
+ (!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = I), ke();
1542
+ return;
1543
+ }
1544
+ e !== null && e.before(t);
1545
+ }
1546
+ [.../* @__PURE__ */ "allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback".split(".")];
1547
+ var _r = ["touchstart", "touchmove"];
1548
+ function vr(e) {
1549
+ return _r.includes(e);
1550
+ }
1551
+ function yr(e, t) {
1552
+ var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
1553
+ n !== (e[de] ??= e.nodeValue) && (e[de] = n, e.nodeValue = `${n}`);
1554
+ }
1555
+ function br(e, t) {
1556
+ return Cr(e, t);
1557
+ }
1558
+ function xr(e, t) {
1559
+ Yt(), t.intro = t.intro ?? !1;
1560
+ let n = t.target, r = P, i = I;
1561
+ try {
1562
+ for (var a = /* @__PURE__ */ Zt(n); a && (a.nodeType !== 8 || a.data !== "[");) a = /* @__PURE__ */ Qt(a);
1563
+ if (!a) throw o;
1564
+ F(!0), L(a);
1565
+ let r = Cr(e, {
1566
+ ...t,
1567
+ anchor: a
1568
+ });
1569
+ return F(!1), r;
1570
+ } catch (r) {
1571
+ if (r instanceof Error && r.message.split("\n").some((e) => e.startsWith("https://svelte.dev/e/"))) throw r;
1572
+ return r !== o && console.warn("Failed to hydrate: ", r), t.recover === !1 && be(), Yt(), nn(n), F(!1), br(e, t);
1573
+ } finally {
1574
+ F(r), L(i);
1575
+ }
1576
+ }
1577
+ var Sr = /* @__PURE__ */ new Map();
1578
+ function Cr(e, { target: t, anchor: n, props: r = {}, events: i, context: a, intro: s = !0, transformError: c }) {
1579
+ Yt();
1580
+ var l = void 0, u = hn(() => {
1581
+ var s = n ?? t.appendChild(Xt());
1582
+ nt(s, { pending: () => {} }, (t) => {
1583
+ Re({});
1584
+ var n = R;
1585
+ if (a && (n.c = a), i && (r.$$events = i), P && mr(t, null), l = e(t, r) || {}, P && (q.nodes.end = I, I === null || I.nodeType !== 8 || I.data !== "]")) throw De(), o;
1586
+ ze();
1587
+ }, c);
1588
+ var u = /* @__PURE__ */ new Set(), d = (e) => {
1589
+ for (var n = 0; n < e.length; n++) {
1590
+ var r = e[n];
1591
+ if (!u.has(r)) {
1592
+ u.add(r);
1593
+ var i = vr(r);
1594
+ for (let e of [t, document]) {
1595
+ var a = Sr.get(e);
1596
+ a === void 0 && (a = /* @__PURE__ */ new Map(), Sr.set(e, a));
1597
+ var o = a.get(r);
1598
+ o === void 0 ? (e.addEventListener(r, ur, { passive: i }), a.set(r, 1)) : a.set(r, o + 1);
1599
+ }
1600
+ }
1601
+ }
1602
+ };
1603
+ return d(f(ar)), or.add(d), () => {
1604
+ for (var e of u) for (let n of [t, document]) {
1605
+ var r = Sr.get(n), i = r.get(e);
1606
+ --i == 0 ? (n.removeEventListener(e, ur), r.delete(e), r.size === 0 && Sr.delete(n)) : r.set(e, i);
1607
+ }
1608
+ or.delete(d), s !== n && s.parentNode?.removeChild(s);
1609
+ };
1610
+ });
1611
+ return wr.set(l, u), l;
1612
+ }
1613
+ var wr = /* @__PURE__ */ new WeakMap();
1614
+ function Tr(e, t) {
1615
+ let n = wr.get(e);
1616
+ return n ? (wr.delete(e), n(t)) : Promise.resolve();
1617
+ }
1618
+ var Er = class {
1619
+ anchor;
1620
+ #e = /* @__PURE__ */ new Map();
1621
+ #t = /* @__PURE__ */ new Map();
1622
+ #n = /* @__PURE__ */ new Map();
1623
+ #r = /* @__PURE__ */ new Set();
1624
+ #i = !0;
1625
+ constructor(e, t = !0) {
1626
+ this.anchor = e, this.#i = t;
1627
+ }
1628
+ #a = (e) => {
1629
+ if (this.#e.has(e)) {
1630
+ var t = this.#e.get(e), n = this.#t.get(t);
1631
+ if (n) kn(n), this.#r.delete(t);
1632
+ else {
1633
+ var r = this.#n.get(t);
1634
+ r && (kn(r.effect), this.#t.set(t, r.effect), this.#n.delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1635
+ }
1636
+ for (let [t, n] of this.#e) {
1637
+ if (this.#e.delete(t), t === e) break;
1638
+ let r = this.#n.get(n);
1639
+ r && (W(r.effect), this.#n.delete(n));
1640
+ }
1641
+ for (let [e, r] of this.#t) {
1642
+ if (e === t || this.#r.has(e)) continue;
1643
+ let i = () => {
1644
+ if (Array.from(this.#e.values()).includes(e)) {
1645
+ var t = document.createDocumentFragment();
1646
+ jn(r, t), t.append(Xt()), this.#n.set(e, {
1647
+ effect: r,
1648
+ fragment: t
1649
+ });
1650
+ } else W(r);
1651
+ this.#r.delete(e), this.#t.delete(e);
1652
+ };
1653
+ this.#i || !n ? (this.#r.add(e), Dn(r, i, !1)) : i();
1654
+ }
1655
+ }
1656
+ };
1657
+ #o = (e) => {
1658
+ this.#e.delete(e);
1659
+ let t = Array.from(this.#e.values());
1660
+ for (let [e, n] of this.#n) t.includes(e) || (W(n.effect), this.#n.delete(e));
1661
+ };
1662
+ ensure(e, t) {
1663
+ var n = V, r = rn();
1664
+ if (t && !this.#t.has(e) && !this.#n.has(e)) {
1665
+ if (r) {
1666
+ var i = document.createDocumentFragment(), a = Xt();
1667
+ i.append(a), this.#n.set(e, {
1668
+ effect: xn(() => t(a)),
1669
+ fragment: i
1670
+ });
1671
+ } else this.#t.set(e, xn(() => t(this.anchor)));
1672
+ }
1673
+ if (this.#e.set(n, e), r) {
1674
+ for (let [t, r] of this.#t) t === e ? n.unskip_effect(r) : n.skip_effect(r);
1675
+ for (let [t, r] of this.#n) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
1676
+ n.oncommit(this.#a), n.ondiscard(this.#o);
1677
+ } else P && (this.anchor = I), this.#a(n);
1678
+ }
1679
+ };
1680
+ function Dr(e, t, n = !1) {
1681
+ var r;
1682
+ P && (r = I, ke());
1683
+ var i = new Er(e), a = n ? D : 0;
1684
+ function o(e, t) {
1685
+ if (P) {
1686
+ var n = Ne(r);
1687
+ if (e !== parseInt(n.substring(1))) {
1688
+ var a = Me();
1689
+ L(a), i.anchor = a, F(!1), i.ensure(e, t), F(!0);
1690
+ return;
1691
+ }
1692
+ }
1693
+ i.ensure(e, t);
1694
+ }
1695
+ bn(() => {
1696
+ var e = !1;
1697
+ t((t, n = 0) => {
1698
+ e = !0, o(n, t);
1699
+ }), e || o(-1, null);
1700
+ }, a);
1701
+ }
1702
+ function Or(e, t, n) {
1703
+ for (var r = [], i = t.length, a, o = t.length, s = 0; s < i; s++) {
1704
+ let n = t[s];
1705
+ Dn(n, () => {
1706
+ if (a) {
1707
+ if (a.pending.delete(n), a.done.add(n), a.pending.size === 0) {
1708
+ var t = e.outrogroups;
1709
+ kr(e, f(a.done)), t.delete(a), t.size === 0 && (e.outrogroups = null);
1710
+ }
1711
+ } else --o;
1712
+ }, !1);
1713
+ }
1714
+ if (o === 0) {
1715
+ var c = r.length === 0 && n !== null;
1716
+ if (c) {
1717
+ var l = n, u = l.parentNode;
1718
+ nn(u), u.append(l), e.items.clear();
1719
+ }
1720
+ kr(e, t, !c);
1721
+ } else a = {
1722
+ pending: new Set(t),
1723
+ done: /* @__PURE__ */ new Set()
1724
+ }, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(a);
1725
+ }
1726
+ function kr(e, t, n = !0) {
1727
+ var r;
1728
+ if (e.pending.size > 0) {
1729
+ r = /* @__PURE__ */ new Set();
1730
+ for (let t of e.pending.values()) for (let n of t) r.add(e.items.get(n).e);
1731
+ }
1732
+ for (var i = 0; i < t.length; i++) {
1733
+ var a = t[i];
1734
+ r?.has(a) ? (a.f |= k, jn(a, document.createDocumentFragment())) : W(t[i], n);
1735
+ }
1736
+ }
1737
+ var Ar;
1738
+ function jr(e, t, n, r, i, a = null) {
1739
+ var o = e, s = /* @__PURE__ */ new Map();
1740
+ if (t & 4) {
1741
+ var c = e;
1742
+ o = P ? L(/* @__PURE__ */ Zt(c)) : c.appendChild(Xt());
1743
+ }
1744
+ P && ke();
1745
+ var u = null, d = /* @__PURE__ */ dt(() => {
1746
+ var e = n();
1747
+ return l(e) ? e : e == null ? [] : f(e);
1748
+ }), p, m = /* @__PURE__ */ new Map(), h = !0;
1749
+ function g(e) {
1750
+ v.effect.f & 16384 || (v.pending.delete(e), v.fallback = u, Nr(v, p, o, t, r), u !== null && (p.length === 0 ? u.f & 33554432 ? (u.f ^= k, Fr(u, null, o)) : kn(u) : Dn(u, () => {
1751
+ u = null;
1752
+ })));
1753
+ }
1754
+ function _(e) {
1755
+ v.pending.delete(e);
1756
+ }
1757
+ var v = {
1758
+ effect: bn(() => {
1759
+ p = X(d);
1760
+ var e = p.length;
1761
+ let c = !1;
1762
+ P && Ne(o) === "[!" != (e === 0) && (o = Me(), L(o), F(!1), c = !0);
1763
+ for (var l = /* @__PURE__ */ new Set(), f = V, v = rn(), y = 0; y < e; y += 1) {
1764
+ P && I.nodeType === 8 && I.data === "]" && (o = I, c = !0, F(!1));
1765
+ var b = p[y], x = r(b, y), S = h ? null : s.get(x);
1766
+ S ? (S.v && Bt(S.v, b), S.i && Bt(S.i, y), v && f.unskip_effect(S.e)) : (S = Pr(s, h ? o : Ar ??= Xt(), b, x, y, i, t, n), h || (S.e.f |= k), s.set(x, S)), l.add(x);
1767
+ }
1768
+ if (e === 0 && a && !u && (h ? u = xn(() => a(o)) : (u = xn(() => a(Ar ??= Xt())), u.f |= k)), e > l.size && he("", "", ""), P && e > 0 && L(Me()), !h) {
1769
+ if (m.set(f, l), v) {
1770
+ for (let [e, t] of s) l.has(e) || f.skip_effect(t.e);
1771
+ f.oncommit(g), f.ondiscard(_);
1772
+ } else g(f);
1773
+ }
1774
+ c && F(!0), X(d);
1775
+ }),
1776
+ flags: t,
1777
+ items: s,
1778
+ pending: m,
1779
+ outrogroups: null,
1780
+ fallback: u
1781
+ };
1782
+ h = !1, P && (o = I);
1783
+ }
1784
+ function Mr(e) {
1785
+ for (; e !== null && !(e.f & 32);) e = e.next;
1786
+ return e;
1787
+ }
1788
+ function Nr(e, t, n, r, i) {
1789
+ var a = !!(r & 8), o = t.length, s = e.items, c = Mr(e.effect.first), l, u = null, d, p = [], m = [], h, g, _, v;
1790
+ if (a) for (v = 0; v < o; v += 1) h = t[v], g = i(h, v), _ = s.get(g).e, _.f & 33554432 || (_.nodes?.a?.measure(), (d ??= /* @__PURE__ */ new Set()).add(_));
1791
+ for (v = 0; v < o; v += 1) {
1792
+ if (h = t[v], g = i(h, v), _ = s.get(g).e, e.outrogroups !== null) for (let t of e.outrogroups) t.pending.delete(_), t.done.delete(_);
1793
+ if (_.f & 8192 && (kn(_), a && (_.nodes?.a?.unfix(), (d ??= /* @__PURE__ */ new Set()).delete(_))), _.f & 33554432) {
1794
+ if (_.f ^= k, _ === c) Fr(_, null, n);
1795
+ else {
1796
+ var y = u ? u.next : c;
1797
+ _ === e.effect.last && (e.effect.last = _.prev), _.prev && (_.prev.next = _.next), _.next && (_.next.prev = _.prev), Ir(e, u, _), Ir(e, _, y), Fr(_, y, n), u = _, p = [], m = [], c = Mr(u.next);
1798
+ continue;
1799
+ }
1800
+ }
1801
+ if (_ !== c) {
1802
+ if (l !== void 0 && l.has(_)) {
1803
+ if (p.length < m.length) {
1804
+ var b = m[0], x;
1805
+ u = b.prev;
1806
+ var S = p[0], ee = p[p.length - 1];
1807
+ for (x = 0; x < p.length; x += 1) Fr(p[x], b, n);
1808
+ for (x = 0; x < m.length; x += 1) l.delete(m[x]);
1809
+ Ir(e, S.prev, ee.next), Ir(e, u, S), Ir(e, ee, b), c = b, u = ee, --v, p = [], m = [];
1810
+ } else l.delete(_), Fr(_, c, n), Ir(e, _.prev, _.next), Ir(e, _, u === null ? e.effect.first : u.next), Ir(e, u, _), u = _;
1811
+ continue;
1812
+ }
1813
+ for (p = [], m = []; c !== null && c !== _;) (l ??= /* @__PURE__ */ new Set()).add(c), m.push(c), c = Mr(c.next);
1814
+ if (c === null) continue;
1815
+ }
1816
+ _.f & 33554432 || p.push(_), u = _, c = Mr(_.next);
1817
+ }
1818
+ if (e.outrogroups !== null) {
1819
+ for (let t of e.outrogroups) t.pending.size === 0 && (kr(e, f(t.done)), e.outrogroups?.delete(t));
1820
+ e.outrogroups.size === 0 && (e.outrogroups = null);
1821
+ }
1822
+ if (c !== null || l !== void 0) {
1823
+ var C = [];
1824
+ if (l !== void 0) for (_ of l) _.f & 8192 || C.push(_);
1825
+ for (; c !== null;) !(c.f & 8192) && c !== e.fallback && C.push(c), c = Mr(c.next);
1826
+ var w = C.length;
1827
+ if (w > 0) {
1828
+ var te = r & 4 && o === 0 ? n : null;
1829
+ if (a) {
1830
+ for (v = 0; v < w; v += 1) C[v].nodes?.a?.measure();
1831
+ for (v = 0; v < w; v += 1) C[v].nodes?.a?.fix();
1832
+ }
1833
+ Or(e, C, te);
1834
+ }
1835
+ }
1836
+ a && Ue(() => {
1837
+ if (d !== void 0) for (_ of d) _.nodes?.a?.apply();
1838
+ });
1839
+ }
1840
+ function Pr(e, t, n, r, i, a, o, s) {
1841
+ var c = o & 1 ? o & 16 ? Rt(n) : /* @__PURE__ */ zt(n, !1, !1) : null, l = o & 2 ? Rt(i) : null;
1842
+ return {
1843
+ v: c,
1844
+ i: l,
1845
+ e: xn(() => (a(t, c ?? n, l ?? i, s), () => {
1846
+ e.delete(r);
1847
+ }))
1848
+ };
1849
+ }
1850
+ function Fr(e, t, n) {
1851
+ if (e.nodes) for (var r = e.nodes.start, i = e.nodes.end, a = t && !(t.f & 33554432) ? t.nodes.start : n; r !== null;) {
1852
+ var o = /* @__PURE__ */ Qt(r);
1853
+ if (a.before(r), r === i) return;
1854
+ r = o;
1855
+ }
1856
+ }
1857
+ function Ir(e, t, n) {
1858
+ t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
1859
+ }
1860
+ function Lr(e, t) {
1861
+ gn(() => {
1862
+ var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
1863
+ if (!r.querySelector("#" + t.hash)) {
1864
+ let e = an("style");
1865
+ e.id = t.hash, e.textContent = t.code, r.appendChild(e);
1866
+ }
1867
+ });
1868
+ }
1869
+ function Rr(e, t, n) {
1870
+ gn(() => {
1871
+ var r = tr(() => t(e, n?.()) || {});
1872
+ if (n && r?.update) {
1873
+ var i = !1, a = {};
1874
+ vn(() => {
1875
+ var e = n();
1876
+ nr(e), i && Fe(a, e) && (a = e, r.update(e));
1877
+ }), i = !0;
1878
+ }
1879
+ if (r?.destroy) return () => r.destroy();
1880
+ });
1881
+ }
1882
+ var zr = [..." \n\r\f\xA0\v"];
1883
+ function Br(e, t, n) {
1884
+ var r = e == null ? "" : "" + e;
1885
+ if (t && (r = r ? r + " " + t : t), n) {
1886
+ for (var i of Object.keys(n)) if (n[i]) r = r ? r + " " + i : i;
1887
+ else if (r.length) for (var a = i.length, o = 0; (o = r.indexOf(i, o)) >= 0;) {
1888
+ var s = o + a;
1889
+ (o === 0 || zr.includes(r[o - 1])) && (s === r.length || zr.includes(r[s])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(s + 1) : o = s;
1890
+ }
1891
+ }
1892
+ return r === "" ? null : r;
1893
+ }
1894
+ function Vr(e, t = !1) {
1895
+ var n = t ? " !important;" : ";", r = "";
1896
+ for (var i of Object.keys(e)) {
1897
+ var a = e[i];
1898
+ a != null && a !== "" && (r += " " + i + ": " + a + n);
1899
+ }
1900
+ return r;
1901
+ }
1902
+ function Hr(e) {
1903
+ return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
1904
+ }
1905
+ function Ur(e, t) {
1906
+ if (t) {
1907
+ var n = "", r, i;
1908
+ if (Array.isArray(t) ? (r = t[0], i = t[1]) : r = t, e) {
1909
+ e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1910
+ var a = !1, o = 0, s = !1, c = [];
1911
+ r && c.push(...Object.keys(r).map(Hr)), i && c.push(...Object.keys(i).map(Hr));
1912
+ var l = 0, u = -1;
1913
+ let t = e.length;
1914
+ for (var d = 0; d < t; d++) {
1915
+ var f = e[d];
1916
+ if (s ? f === "/" && e[d - 1] === "*" && (s = !1) : a ? a === f && (a = !1) : f === "/" && e[d + 1] === "*" ? s = !0 : f === "\"" || f === "'" ? a = f : f === "(" ? o++ : f === ")" && o--, !s && a === !1 && o === 0) {
1917
+ if (f === ":" && u === -1) u = d;
1918
+ else if (f === ";" || d === t - 1) {
1919
+ if (u !== -1) {
1920
+ var p = Hr(e.substring(l, u).trim());
1921
+ if (!c.includes(p)) {
1922
+ f !== ";" && d++;
1923
+ var m = e.substring(l, d).trim();
1924
+ n += " " + m + ";";
1925
+ }
1926
+ }
1927
+ l = d + 1, u = -1;
1928
+ }
1929
+ }
1930
+ }
1931
+ }
1932
+ return r && (n += Vr(r)), i && (n += Vr(i, !0)), n = n.trim(), n === "" ? null : n;
1933
+ }
1934
+ return e == null ? null : String(e);
1935
+ }
1936
+ function Wr(e, t, n, r, i, a) {
1937
+ var o = e[le];
1938
+ if (P || o !== n || o === void 0) {
1939
+ var s = Br(n, r, a);
1940
+ (!P || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e[le] = n;
1941
+ } else if (a && i !== a) for (var c in a) {
1942
+ var l = !!a[c];
1943
+ (i == null || l !== !!i[c]) && e.classList.toggle(c, l);
1944
+ }
1945
+ return a;
1946
+ }
1947
+ function Gr(e, t = {}, n, r) {
1948
+ for (var i in n) {
1949
+ var a = n[i];
1950
+ t[i] !== a && (n[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, a, r));
1951
+ }
1952
+ }
1953
+ function Kr(e, t, n, r) {
1954
+ var i = e[ue];
1955
+ if (P || i !== t) {
1956
+ var a = Ur(t, r);
1957
+ (!P || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e[ue] = t;
1958
+ } else r && (Array.isArray(r) ? (Gr(e, n?.[0], r[0]), Gr(e, n?.[1], r[1], "important")) : Gr(e, n, r));
1959
+ return r;
1960
+ }
1961
+ var qr = Symbol("is custom element"), Jr = Symbol("is html"), Yr = pe ? "link" : "LINK";
1962
+ function Q(e, t, n, r) {
1963
+ var i = Zr(e);
1964
+ P && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Yr) || i[t] !== (i[t] = n) && (t === "loading" && (e[N] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && $r(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
1965
+ }
1966
+ function Xr(e, t, n) {
1967
+ var r = G, i = q;
1968
+ let a = P;
1969
+ P && F(!1), K(null), Ln(null);
1970
+ try {
1971
+ t !== "style" && (Qr.has(e.getAttribute("is") || e.nodeName) || !customElements || customElements.get(e.getAttribute("is") || e.nodeName.toLowerCase()) ? $r(e).includes(t) : n && typeof n == "object") ? e[t] = n : Q(e, t, n == null ? n : String(n));
1972
+ } finally {
1973
+ K(r), Ln(i), a && F(!0);
1974
+ }
1975
+ }
1976
+ function Zr(e) {
1977
+ return e[ce] ??= {
1978
+ [qr]: e.nodeName.includes("-"),
1979
+ [Jr]: e.namespaceURI === c
1980
+ };
1981
+ }
1982
+ var Qr = /* @__PURE__ */ new Map();
1983
+ function $r(e) {
1984
+ var t = e.getAttribute("is") || e.nodeName, n = Qr.get(t);
1985
+ if (n) return n;
1986
+ Qr.set(t, n = []);
1987
+ for (var r, i = e, a = Element.prototype; a !== i;) {
1988
+ for (var o in r = g(i), r) r[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && n.push(o);
1989
+ i = y(i);
1990
+ }
1991
+ return n;
1992
+ }
1993
+ function ei(e, t) {
1994
+ return e === t || e?.[j] === t;
1995
+ }
1996
+ function ti(e = {}, t, n, r) {
1997
+ var i = R.r, a = q;
1998
+ return gn(() => {
1999
+ var o, s;
2000
+ return vn(() => {
2001
+ o = s, s = r?.() || [], tr(() => {
2002
+ ei(n(...s), e) || (t(e, ...s), o && ei(n(...o), e) && t(null, ...o));
2003
+ });
2004
+ }), () => {
2005
+ let r = a;
2006
+ for (; r !== i && r.parent !== null && r.parent.f & 33554432;) r = r.parent;
2007
+ let o = () => {
2008
+ s && ei(n(...s), e) && t(null, ...s);
2009
+ }, c = r.teardown;
2010
+ r.teardown = () => {
2011
+ o(), c?.();
2012
+ };
2013
+ };
2014
+ }), e;
2015
+ }
2016
+ function ni(e, t, n, r) {
2017
+ var i = !0, a = !!(n & 8), o = !!(n & 16), s = r, c = !0, l = void 0, u = () => o && i ? (l ??= /* @__PURE__ */ ct(r), X(l)) : (c && (c = !1, s = o ? tr(r) : r), s);
2018
+ let d;
2019
+ if (a) {
2020
+ var f = j in e || M in e;
2021
+ d = h(e, t)?.set ?? (f && t in e ? (n) => e[t] = n : void 0);
2022
+ }
2023
+ var p, m = !1;
2024
+ a ? [p, m] = Qe(() => e[t]) : p = e[t], p === void 0 && r !== void 0 && (p = u(), d && (i && xe(t), d(p)));
2025
+ var g = i ? () => {
2026
+ var n = e[t];
2027
+ return n === void 0 ? u() : (c = !0, n);
2028
+ } : () => {
2029
+ var n = e[t];
2030
+ return n !== void 0 && (s = void 0), n === void 0 ? s : n;
2031
+ };
2032
+ if (i && !(n & 4)) return g;
2033
+ if (d) {
2034
+ var _ = e.$$legacy;
2035
+ return (function(e, t) {
2036
+ return arguments.length > 0 ? ((!i || !t || _ || m) && d(t ? g() : e), e) : g();
2037
+ });
2038
+ }
2039
+ var v = !1, y = (n & 1 ? ct : dt)(() => (v = !1, g()));
2040
+ a && X(y);
2041
+ var b = q;
2042
+ return (function(e, t) {
2043
+ if (arguments.length > 0) {
2044
+ let n = t ? X(y) : i && a ? Wt(e) : e;
2045
+ return U(y, n), v = !0, s !== void 0 && (s = n), e;
2046
+ }
2047
+ return Pn && v || b.f & 16384 ? y.v : X(y);
2048
+ });
2049
+ }
2050
+ function ri(e) {
2051
+ return new ii(e);
2052
+ }
2053
+ var ii = class {
2054
+ #e;
2055
+ #t;
2056
+ constructor(e) {
2057
+ var t = /* @__PURE__ */ new Map(), n = (e, n) => {
2058
+ var r = /* @__PURE__ */ zt(n, !1, !1);
2059
+ return t.set(e, r), r;
2060
+ };
2061
+ let r = new Proxy({
2062
+ ...e.props || {},
2063
+ $$events: {}
2064
+ }, {
2065
+ get(e, r) {
2066
+ return X(t.get(r) ?? n(r, Reflect.get(e, r)));
2067
+ },
2068
+ has(e, r) {
2069
+ return r === M || (X(t.get(r) ?? n(r, Reflect.get(e, r))), Reflect.has(e, r));
2070
+ },
2071
+ set(e, r, i) {
2072
+ return U(t.get(r) ?? n(r, i), i), Reflect.set(e, r, i);
2073
+ }
2074
+ });
2075
+ this.#t = (e.hydrate ? xr : br)(e.component, {
2076
+ target: e.target,
2077
+ anchor: e.anchor,
2078
+ props: r,
2079
+ context: e.context,
2080
+ intro: e.intro ?? !1,
2081
+ recover: e.recover,
2082
+ transformError: e.transformError
2083
+ }), (!e?.props?.$$host || e.sync === !1) && Ot(), this.#e = r.$$events;
2084
+ for (let e of Object.keys(this.#t)) e !== "$set" && e !== "$destroy" && e !== "$on" && m(this, e, {
2085
+ get() {
2086
+ return this.#t[e];
2087
+ },
2088
+ set(t) {
2089
+ this.#t[e] = t;
2090
+ },
2091
+ enumerable: !0
2092
+ });
2093
+ this.#t.$set = (e) => {
2094
+ Object.assign(r, e);
2095
+ }, this.#t.$destroy = () => {
2096
+ Tr(this.#t);
2097
+ };
2098
+ }
2099
+ $set(e) {
2100
+ this.#t.$set(e);
2101
+ }
2102
+ $on(e, t) {
2103
+ this.#e[e] = this.#e[e] || [];
2104
+ let n = (...e) => t.call(this, ...e);
2105
+ return this.#e[e].push(n), () => {
2106
+ this.#e[e] = this.#e[e].filter((e) => e !== n);
2107
+ };
2108
+ }
2109
+ $destroy() {
2110
+ this.#t.$destroy();
2111
+ }
2112
+ }, ai;
2113
+ typeof HTMLElement == "function" && (ai = class extends HTMLElement {
2114
+ $$ctor;
2115
+ $$s;
2116
+ $$c;
2117
+ $$cn = !1;
2118
+ $$d = {};
2119
+ $$r = !1;
2120
+ $$p_d = {};
2121
+ $$l = {};
2122
+ $$l_u = /* @__PURE__ */ new Map();
2123
+ $$me;
2124
+ $$shadowRoot = null;
2125
+ constructor(e, t, n) {
2126
+ super(), this.$$ctor = e, this.$$s = t, n && (this.$$shadowRoot = this.attachShadow(n));
2127
+ }
2128
+ addEventListener(e, t, n) {
2129
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
2130
+ let n = this.$$c.$on(e, t);
2131
+ this.$$l_u.set(t, n);
2132
+ }
2133
+ super.addEventListener(e, t, n);
2134
+ }
2135
+ removeEventListener(e, t, n) {
2136
+ if (super.removeEventListener(e, t, n), this.$$c) {
2137
+ let e = this.$$l_u.get(t);
2138
+ e && (e(), this.$$l_u.delete(t));
2139
+ }
2140
+ }
2141
+ async connectedCallback() {
2142
+ if (this.$$cn = !0, !this.$$c) {
2143
+ if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2144
+ function e(e) {
2145
+ return (t) => {
2146
+ let n = an("slot");
2147
+ e !== "default" && (n.name = e), Z(t, n);
2148
+ };
2149
+ }
2150
+ let t = {}, n = si(this);
2151
+ for (let r of this.$$s) r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
2152
+ for (let e of this.attributes) {
2153
+ let t = this.$$g_p(e.name);
2154
+ t in this.$$d || (this.$$d[t] = oi(t, e.value, this.$$p_d, "toProp"));
2155
+ }
2156
+ for (let e in this.$$p_d) !(e in this.$$d) && this[e] !== void 0 && (this.$$d[e] = this[e], delete this[e]);
2157
+ this.$$c = ri({
2158
+ component: this.$$ctor,
2159
+ target: this.$$shadowRoot || this,
2160
+ props: {
2161
+ ...this.$$d,
2162
+ $$slots: t,
2163
+ $$host: this
2164
+ }
2165
+ }), this.$$me = mn(() => {
2166
+ vn(() => {
2167
+ this.$$r = !0;
2168
+ for (let e of p(this.$$c)) {
2169
+ if (!this.$$p_d[e]?.reflect) continue;
2170
+ this.$$d[e] = this.$$c[e];
2171
+ let t = oi(e, this.$$d[e], this.$$p_d, "toAttribute");
2172
+ t == null ? this.removeAttribute(this.$$p_d[e].attribute || e) : this.setAttribute(this.$$p_d[e].attribute || e, t);
2173
+ }
2174
+ this.$$r = !1;
2175
+ });
2176
+ });
2177
+ for (let e in this.$$l) for (let t of this.$$l[e]) {
2178
+ let n = this.$$c.$on(e, t);
2179
+ this.$$l_u.set(t, n);
2180
+ }
2181
+ this.$$l = {};
2182
+ }
2183
+ }
2184
+ attributeChangedCallback(e, t, n) {
2185
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = oi(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2186
+ }
2187
+ disconnectedCallback() {
2188
+ this.$$cn = !1, Promise.resolve().then(() => {
2189
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2190
+ });
2191
+ }
2192
+ $$g_p(e) {
2193
+ return p(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2194
+ }
2195
+ });
2196
+ function oi(e, t, n, r) {
2197
+ let i = n[e]?.type;
2198
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e]) return t;
2199
+ if (r === "toAttribute") switch (i) {
2200
+ case "Object":
2201
+ case "Array": return t == null ? null : JSON.stringify(t);
2202
+ case "Boolean": return t ? "" : null;
2203
+ case "Number": return t ?? null;
2204
+ default: return t;
2205
+ }
2206
+ else switch (i) {
2207
+ case "Object":
2208
+ case "Array": return t && JSON.parse(t);
2209
+ case "Boolean": return t;
2210
+ case "Number": return t == null ? t : +t;
2211
+ default: return t;
2212
+ }
2213
+ }
2214
+ function si(e) {
2215
+ let t = {};
2216
+ return e.childNodes.forEach((e) => {
2217
+ t[e.slot || "default"] = !0;
2218
+ }), t;
2219
+ }
2220
+ function ci(e, t, n, r, i, a) {
2221
+ let o = class extends ai {
2222
+ constructor() {
2223
+ super(e, n, i), this.$$p_d = t;
2224
+ }
2225
+ static get observedAttributes() {
2226
+ return p(t).map((e) => (t[e].attribute || e).toLowerCase());
2227
+ }
2228
+ };
2229
+ return p(t).forEach((e) => {
2230
+ m(o.prototype, e, {
2231
+ get() {
2232
+ return this.$$c && e in this.$$c ? this.$$c[e] : this.$$d[e];
2233
+ },
2234
+ set(n) {
2235
+ n = oi(e, n, t), this.$$d[e] = n;
2236
+ var r = this.$$c;
2237
+ r && (h(r, e)?.get ? r[e] = n : r.$set({ [e]: n }));
2238
+ }
2239
+ });
2240
+ }), r.forEach((e) => {
2241
+ m(o.prototype, e, { get() {
2242
+ return this.$$c?.[e];
2243
+ } });
2244
+ }), a && (o = a(o)), e.element = o, o;
2245
+ }
2246
+ var li = globalThis, ui = li.ShadowRoot && (li.ShadyCSS === void 0 || li.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, di = Symbol(), fi = /* @__PURE__ */ new WeakMap(), pi = class {
2247
+ constructor(e, t, n) {
2248
+ if (this._$cssResult$ = !0, n !== di) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
2249
+ this.cssText = e, this.t = t;
2250
+ }
2251
+ get styleSheet() {
2252
+ let e = this.o, t = this.t;
2253
+ if (ui && e === void 0) {
2254
+ let n = t !== void 0 && t.length === 1;
2255
+ n && (e = fi.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && fi.set(t, e));
2256
+ }
2257
+ return e;
2258
+ }
2259
+ toString() {
2260
+ return this.cssText;
2261
+ }
2262
+ }, mi = (e) => new pi(typeof e == "string" ? e : e + "", void 0, di), hi = (e, t) => {
2263
+ if (ui) e.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
2264
+ else for (let n of t) {
2265
+ let t = document.createElement("style"), r = li.litNonce;
2266
+ r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
2267
+ }
2268
+ }, gi = ui ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
2269
+ let t = "";
2270
+ for (let n of e.cssRules) t += n.cssText;
2271
+ return mi(t);
2272
+ })(e) : e, { is: _i, defineProperty: vi, getOwnPropertyDescriptor: yi, getOwnPropertyNames: bi, getOwnPropertySymbols: xi, getPrototypeOf: Si } = Object, Ci = globalThis, wi = Ci.trustedTypes, Ti = wi ? wi.emptyScript : "", Ei = Ci.reactiveElementPolyfillSupport, Di = (e, t) => e, Oi = {
2273
+ toAttribute(e, t) {
2274
+ switch (t) {
2275
+ case Boolean:
2276
+ e = e ? Ti : null;
2277
+ break;
2278
+ case Object:
2279
+ case Array: e = e == null ? e : JSON.stringify(e);
2280
+ }
2281
+ return e;
2282
+ },
2283
+ fromAttribute(e, t) {
2284
+ let n = e;
2285
+ switch (t) {
2286
+ case Boolean:
2287
+ n = e !== null;
2288
+ break;
2289
+ case Number:
2290
+ n = e === null ? null : Number(e);
2291
+ break;
2292
+ case Object:
2293
+ case Array: try {
2294
+ n = JSON.parse(e);
2295
+ } catch {
2296
+ n = null;
2297
+ }
2298
+ }
2299
+ return n;
2300
+ }
2301
+ }, ki = (e, t) => !_i(e, t), Ai = {
2302
+ attribute: !0,
2303
+ type: String,
2304
+ converter: Oi,
2305
+ reflect: !1,
2306
+ useDefault: !1,
2307
+ hasChanged: ki
2308
+ };
2309
+ Symbol.metadata ??= Symbol("metadata"), Ci.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
2310
+ var ji = class extends HTMLElement {
2311
+ static addInitializer(e) {
2312
+ this._$Ei(), (this.l ??= []).push(e);
2313
+ }
2314
+ static get observedAttributes() {
2315
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
2316
+ }
2317
+ static createProperty(e, t = Ai) {
2318
+ if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
2319
+ let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
2320
+ r !== void 0 && vi(this.prototype, e, r);
2321
+ }
2322
+ }
2323
+ static getPropertyDescriptor(e, t, n) {
2324
+ let { get: r, set: i } = yi(this.prototype, e) ?? {
2325
+ get() {
2326
+ return this[t];
2327
+ },
2328
+ set(e) {
2329
+ this[t] = e;
2330
+ }
2331
+ };
2332
+ return {
2333
+ get: r,
2334
+ set(t) {
2335
+ let a = r?.call(this);
2336
+ i?.call(this, t), this.requestUpdate(e, a, n);
2337
+ },
2338
+ configurable: !0,
2339
+ enumerable: !0
2340
+ };
2341
+ }
2342
+ static getPropertyOptions(e) {
2343
+ return this.elementProperties.get(e) ?? Ai;
2344
+ }
2345
+ static _$Ei() {
2346
+ if (this.hasOwnProperty(Di("elementProperties"))) return;
2347
+ let e = Si(this);
2348
+ e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
2349
+ }
2350
+ static finalize() {
2351
+ if (this.hasOwnProperty(Di("finalized"))) return;
2352
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Di("properties"))) {
2353
+ let e = this.properties, t = [...bi(e), ...xi(e)];
2354
+ for (let n of t) this.createProperty(n, e[n]);
2355
+ }
2356
+ let e = this[Symbol.metadata];
2357
+ if (e !== null) {
2358
+ let t = litPropertyMetadata.get(e);
2359
+ if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
2360
+ }
2361
+ this._$Eh = /* @__PURE__ */ new Map();
2362
+ for (let [e, t] of this.elementProperties) {
2363
+ let n = this._$Eu(e, t);
2364
+ n !== void 0 && this._$Eh.set(n, e);
2365
+ }
2366
+ this.elementStyles = this.finalizeStyles(this.styles);
2367
+ }
2368
+ static finalizeStyles(e) {
2369
+ let t = [];
2370
+ if (Array.isArray(e)) {
2371
+ let n = new Set(e.flat(1 / 0).reverse());
2372
+ for (let e of n) t.unshift(gi(e));
2373
+ } else e !== void 0 && t.push(gi(e));
2374
+ return t;
2375
+ }
2376
+ static _$Eu(e, t) {
2377
+ let n = t.attribute;
2378
+ return n === !1 ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
2379
+ }
2380
+ constructor() {
2381
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
2382
+ }
2383
+ _$Ev() {
2384
+ this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
2385
+ }
2386
+ addController(e) {
2387
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
2388
+ }
2389
+ removeController(e) {
2390
+ this._$EO?.delete(e);
2391
+ }
2392
+ _$E_() {
2393
+ let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
2394
+ for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
2395
+ e.size > 0 && (this._$Ep = e);
2396
+ }
2397
+ createRenderRoot() {
2398
+ let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
2399
+ return hi(e, this.constructor.elementStyles), e;
2400
+ }
2401
+ connectedCallback() {
2402
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
2403
+ }
2404
+ enableUpdating(e) {}
2405
+ disconnectedCallback() {
2406
+ this._$EO?.forEach(((e) => e.hostDisconnected?.()));
2407
+ }
2408
+ attributeChangedCallback(e, t, n) {
2409
+ this._$AK(e, n);
2410
+ }
2411
+ _$ET(e, t) {
2412
+ let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
2413
+ if (r !== void 0 && n.reflect === !0) {
2414
+ let i = (n.converter?.toAttribute === void 0 ? Oi : n.converter).toAttribute(t, n.type);
2415
+ this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
2416
+ }
2417
+ }
2418
+ _$AK(e, t) {
2419
+ let n = this.constructor, r = n._$Eh.get(e);
2420
+ if (r !== void 0 && this._$Em !== r) {
2421
+ let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? Oi : e.converter;
2422
+ this._$Em = r;
2423
+ let a = i.fromAttribute(t, e.type);
2424
+ this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
2425
+ }
2426
+ }
2427
+ requestUpdate(e, t, n) {
2428
+ if (e !== void 0) {
2429
+ let r = this.constructor, i = this[e];
2430
+ if (n ??= r.getPropertyOptions(e), !((n.hasChanged ?? ki)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(r._$Eu(e, n)))) return;
2431
+ this.C(e, t, n);
2432
+ }
2433
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
2434
+ }
2435
+ C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
2436
+ n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), i !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
2437
+ }
2438
+ async _$EP() {
2439
+ this.isUpdatePending = !0;
2440
+ try {
2441
+ await this._$ES;
2442
+ } catch (e) {
2443
+ Promise.reject(e);
2444
+ }
2445
+ let e = this.scheduleUpdate();
2446
+ return e != null && await e, !this.isUpdatePending;
2447
+ }
2448
+ scheduleUpdate() {
2449
+ return this.performUpdate();
2450
+ }
2451
+ performUpdate() {
2452
+ if (!this.isUpdatePending) return;
2453
+ if (!this.hasUpdated) {
2454
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
2455
+ for (let [e, t] of this._$Ep) this[e] = t;
2456
+ this._$Ep = void 0;
2457
+ }
2458
+ let e = this.constructor.elementProperties;
2459
+ if (e.size > 0) for (let [t, n] of e) {
2460
+ let { wrapped: e } = n, r = this[t];
2461
+ e !== !0 || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
2462
+ }
2463
+ }
2464
+ let e = !1, t = this._$AL;
2465
+ try {
2466
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach(((e) => e.hostUpdate?.())), this.update(t)) : this._$EM();
2467
+ } catch (t) {
2468
+ throw e = !1, this._$EM(), t;
2469
+ }
2470
+ e && this._$AE(t);
2471
+ }
2472
+ willUpdate(e) {}
2473
+ _$AE(e) {
2474
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
2475
+ }
2476
+ _$EM() {
2477
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
2478
+ }
2479
+ get updateComplete() {
2480
+ return this.getUpdateComplete();
2481
+ }
2482
+ getUpdateComplete() {
2483
+ return this._$ES;
2484
+ }
2485
+ shouldUpdate(e) {
2486
+ return !0;
2487
+ }
2488
+ update(e) {
2489
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
2490
+ }
2491
+ updated(e) {}
2492
+ firstUpdated(e) {}
2493
+ };
2494
+ ji.elementStyles = [], ji.shadowRootOptions = { mode: "open" }, ji[Di("elementProperties")] = /* @__PURE__ */ new Map(), ji[Di("finalized")] = /* @__PURE__ */ new Map(), Ei?.({ ReactiveElement: ji }), (Ci.reactiveElementVersions ??= []).push("2.1.1");
2495
+ var Mi = globalThis, Ni = Mi.trustedTypes, Pi = Ni ? Ni.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Fi = "$lit$", Ii = `lit$${Math.random().toFixed(9).slice(2)}$`, Li = "?" + Ii, Ri = `<${Li}>`, zi = document, Bi = () => zi.createComment(""), Vi = (e) => e === null || typeof e != "object" && typeof e != "function", Hi = Array.isArray, Ui = (e) => Hi(e) || typeof e?.[Symbol.iterator] == "function", Wi = "[ \n\f\r]", Gi = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ki = /-->/g, qi = />/g, Ji = RegExp(`>|${Wi}(?:([^\\s"'>=/]+)(${Wi}*=${Wi}*(?:[^
2496
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Yi = /'/g, Xi = /"/g, Zi = /^(?:script|style|textarea|title)$/i, Qi = ((e) => (t, ...n) => ({
2497
+ _$litType$: e,
2498
+ strings: t,
2499
+ values: n
2500
+ }))(1), $i = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), ea = /* @__PURE__ */ new WeakMap(), ta = zi.createTreeWalker(zi, 129);
2501
+ function na(e, t) {
2502
+ if (!Hi(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
2503
+ return Pi === void 0 ? t : Pi.createHTML(t);
2504
+ }
2505
+ var ra = (e, t) => {
2506
+ let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = Gi;
2507
+ for (let t = 0; t < n; t++) {
2508
+ let n = e[t], s, c, l = -1, u = 0;
2509
+ for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === Gi ? c[1] === "!--" ? o = Ki : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = Ji) : (Zi.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = Ji) : o = qi : o === Ji ? c[0] === ">" ? (o = i ?? Gi, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? Ji : c[3] === "\"" ? Xi : Yi) : o === Xi || o === Yi ? o = Ji : o === Ki || o === qi ? o = Gi : (o = Ji, i = void 0);
2510
+ let d = o === Ji && e[t + 1].startsWith("/>") ? " " : "";
2511
+ a += o === Gi ? n + Ri : l >= 0 ? (r.push(s), n.slice(0, l) + Fi + n.slice(l) + Ii + d) : n + Ii + (l === -2 ? t : d);
2512
+ }
2513
+ return [na(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
2514
+ }, ia = class e {
2515
+ constructor({ strings: t, _$litType$: n }, r) {
2516
+ let i;
2517
+ this.parts = [];
2518
+ let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = ra(t, n);
2519
+ if (this.el = e.createElement(l, r), ta.currentNode = this.el.content, n === 2 || n === 3) {
2520
+ let e = this.el.content.firstChild;
2521
+ e.replaceWith(...e.childNodes);
2522
+ }
2523
+ for (; (i = ta.nextNode()) !== null && c.length < s;) {
2524
+ if (i.nodeType === 1) {
2525
+ if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(Fi)) {
2526
+ let t = u[o++], n = i.getAttribute(e).split(Ii), r = /([.?@])?(.*)/.exec(t);
2527
+ c.push({
2528
+ type: 1,
2529
+ index: a,
2530
+ name: r[2],
2531
+ strings: n,
2532
+ ctor: r[1] === "." ? la : r[1] === "?" ? ua : r[1] === "@" ? da : ca
2533
+ }), i.removeAttribute(e);
2534
+ } else e.startsWith(Ii) && (c.push({
2535
+ type: 6,
2536
+ index: a
2537
+ }), i.removeAttribute(e));
2538
+ if (Zi.test(i.tagName)) {
2539
+ let e = i.textContent.split(Ii), t = e.length - 1;
2540
+ if (t > 0) {
2541
+ i.textContent = Ni ? Ni.emptyScript : "";
2542
+ for (let n = 0; n < t; n++) i.append(e[n], Bi()), ta.nextNode(), c.push({
2543
+ type: 2,
2544
+ index: ++a
2545
+ });
2546
+ i.append(e[t], Bi());
2547
+ }
2548
+ }
2549
+ } else if (i.nodeType === 8) {
2550
+ if (i.data === Li) c.push({
2551
+ type: 2,
2552
+ index: a
2553
+ });
2554
+ else {
2555
+ let e = -1;
2556
+ for (; (e = i.data.indexOf(Ii, e + 1)) !== -1;) c.push({
2557
+ type: 7,
2558
+ index: a
2559
+ }), e += Ii.length - 1;
2560
+ }
2561
+ }
2562
+ a++;
2563
+ }
2564
+ }
2565
+ static createElement(e, t) {
2566
+ let n = zi.createElement("template");
2567
+ return n.innerHTML = e, n;
2568
+ }
2569
+ };
2570
+ function aa(e, t, n = e, r) {
2571
+ if (t === $i) return t;
2572
+ let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = Vi(t) ? void 0 : t._$litDirective$;
2573
+ return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = aa(e, i._$AS(e, t.values), i, r)), t;
2574
+ }
2575
+ var oa = class {
2576
+ constructor(e, t) {
2577
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
2578
+ }
2579
+ get parentNode() {
2580
+ return this._$AM.parentNode;
2581
+ }
2582
+ get _$AU() {
2583
+ return this._$AM._$AU;
2584
+ }
2585
+ u(e) {
2586
+ let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? zi).importNode(t, !0);
2587
+ ta.currentNode = r;
2588
+ let i = ta.nextNode(), a = 0, o = 0, s = n[0];
2589
+ for (; s !== void 0;) {
2590
+ if (a === s.index) {
2591
+ let t;
2592
+ s.type === 2 ? t = new sa(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new fa(i, this, e)), this._$AV.push(t), s = n[++o];
2593
+ }
2594
+ a !== s?.index && (i = ta.nextNode(), a++);
2595
+ }
2596
+ return ta.currentNode = zi, r;
2597
+ }
2598
+ p(e) {
2599
+ let t = 0;
2600
+ for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
2601
+ }
2602
+ }, sa = class e {
2603
+ get _$AU() {
2604
+ return this._$AM?._$AU ?? this._$Cv;
2605
+ }
2606
+ constructor(e, t, n, r) {
2607
+ this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
2608
+ }
2609
+ get parentNode() {
2610
+ let e = this._$AA.parentNode, t = this._$AM;
2611
+ return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
2612
+ }
2613
+ get startNode() {
2614
+ return this._$AA;
2615
+ }
2616
+ get endNode() {
2617
+ return this._$AB;
2618
+ }
2619
+ _$AI(e, t = this) {
2620
+ e = aa(this, e, t), Vi(e) ? e === $ || e == null || e === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : e !== this._$AH && e !== $i && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Ui(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
2621
+ }
2622
+ O(e) {
2623
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
2624
+ }
2625
+ T(e) {
2626
+ this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
2627
+ }
2628
+ _(e) {
2629
+ this._$AH !== $ && Vi(this._$AH) ? this._$AA.nextSibling.data = e : this.T(zi.createTextNode(e)), this._$AH = e;
2630
+ }
2631
+ $(e) {
2632
+ let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = ia.createElement(na(n.h, n.h[0]), this.options)), n);
2633
+ if (this._$AH?._$AD === r) this._$AH.p(t);
2634
+ else {
2635
+ let e = new oa(r, this), n = e.u(this.options);
2636
+ e.p(t), this.T(n), this._$AH = e;
2637
+ }
2638
+ }
2639
+ _$AC(e) {
2640
+ let t = ea.get(e.strings);
2641
+ return t === void 0 && ea.set(e.strings, t = new ia(e)), t;
2642
+ }
2643
+ k(t) {
2644
+ Hi(this._$AH) || (this._$AH = [], this._$AR());
2645
+ let n = this._$AH, r, i = 0;
2646
+ for (let a of t) i === n.length ? n.push(r = new e(this.O(Bi()), this.O(Bi()), this, this.options)) : r = n[i], r._$AI(a), i++;
2647
+ i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
2648
+ }
2649
+ _$AR(e = this._$AA.nextSibling, t) {
2650
+ for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
2651
+ let t = e.nextSibling;
2652
+ e.remove(), e = t;
2653
+ }
2654
+ }
2655
+ setConnected(e) {
2656
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
2657
+ }
2658
+ }, ca = class {
2659
+ get tagName() {
2660
+ return this.element.tagName;
2661
+ }
2662
+ get _$AU() {
2663
+ return this._$AM._$AU;
2664
+ }
2665
+ constructor(e, t, n, r, i) {
2666
+ this.type = 1, this._$AH = $, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = $;
2667
+ }
2668
+ _$AI(e, t = this, n, r) {
2669
+ let i = this.strings, a = !1;
2670
+ if (i === void 0) e = aa(this, e, t, 0), a = !Vi(e) || e !== this._$AH && e !== $i, a && (this._$AH = e);
2671
+ else {
2672
+ let r = e, o, s;
2673
+ for (e = i[0], o = 0; o < i.length - 1; o++) s = aa(this, r[n + o], t, o), s === $i && (s = this._$AH[o]), a ||= !Vi(s) || s !== this._$AH[o], s === $ ? e = $ : e !== $ && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
2674
+ }
2675
+ a && !r && this.j(e);
2676
+ }
2677
+ j(e) {
2678
+ e === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
2679
+ }
2680
+ }, la = class extends ca {
2681
+ constructor() {
2682
+ super(...arguments), this.type = 3;
2683
+ }
2684
+ j(e) {
2685
+ this.element[this.name] = e === $ ? void 0 : e;
2686
+ }
2687
+ }, ua = class extends ca {
2688
+ constructor() {
2689
+ super(...arguments), this.type = 4;
2690
+ }
2691
+ j(e) {
2692
+ this.element.toggleAttribute(this.name, !!e && e !== $);
2693
+ }
2694
+ }, da = class extends ca {
2695
+ constructor(e, t, n, r, i) {
2696
+ super(e, t, n, r, i), this.type = 5;
2697
+ }
2698
+ _$AI(e, t = this) {
2699
+ if ((e = aa(this, e, t, 0) ?? $) === $i) return;
2700
+ let n = this._$AH, r = e === $ && n !== $ || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== $ && (n === $ || r);
2701
+ r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
2702
+ }
2703
+ handleEvent(e) {
2704
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
2705
+ }
2706
+ }, fa = class {
2707
+ constructor(e, t, n) {
2708
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
2709
+ }
2710
+ get _$AU() {
2711
+ return this._$AM._$AU;
2712
+ }
2713
+ _$AI(e) {
2714
+ aa(this, e);
2715
+ }
2716
+ }, pa = Mi.litHtmlPolyfillSupport;
2717
+ pa?.(ia, sa), (Mi.litHtmlVersions ??= []).push("3.3.1");
2718
+ var ma = (e, t, n) => {
2719
+ let r = n?.renderBefore ?? t, i = r._$litPart$;
2720
+ if (i === void 0) {
2721
+ let e = n?.renderBefore ?? null;
2722
+ r._$litPart$ = i = new sa(t.insertBefore(Bi(), e), e, void 0, n ?? {});
2723
+ }
2724
+ return i._$AI(e), i;
2725
+ }, ha = globalThis, ga = class extends ji {
2726
+ constructor() {
2727
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
2728
+ }
2729
+ createRenderRoot() {
2730
+ let e = super.createRenderRoot();
2731
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
2732
+ }
2733
+ update(e) {
2734
+ let t = this.render();
2735
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = ma(t, this.renderRoot, this.renderOptions);
2736
+ }
2737
+ connectedCallback() {
2738
+ super.connectedCallback(), this._$Do?.setConnected(!0);
2739
+ }
2740
+ disconnectedCallback() {
2741
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
2742
+ }
2743
+ render() {
2744
+ return $i;
2745
+ }
2746
+ };
2747
+ ga._$litElement$ = !0, ga.finalized = !0, ha.litElementHydrateSupport?.({ LitElement: ga });
2748
+ var _a = ha.litElementPolyfillSupport;
2749
+ _a?.({ LitElement: ga }), (ha.litElementVersions ??= []).push("4.2.1");
2750
+ var va = (e) => (t, n) => {
2751
+ n === void 0 ? customElements.get(e) || customElements.define(e, t) : n.addInitializer((() => {
2752
+ customElements.get(e) || customElements.define(e, t);
2753
+ }));
2754
+ }, ya = {
2755
+ attribute: !0,
2756
+ type: String,
2757
+ converter: Oi,
2758
+ reflect: !1,
2759
+ hasChanged: ki
2760
+ }, ba = (e = ya, t, n) => {
2761
+ let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
2762
+ if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
2763
+ let { name: r } = n;
2764
+ return {
2765
+ set(n) {
2766
+ let i = t.get.call(this);
2767
+ t.set.call(this, n), this.requestUpdate(r, i, e);
2768
+ },
2769
+ init(t) {
2770
+ return t !== void 0 && this.C(r, void 0, e, t), t;
2771
+ }
2772
+ };
2773
+ }
2774
+ if (r === "setter") {
2775
+ let { name: r } = n;
2776
+ return function(n) {
2777
+ let i = this[r];
2778
+ t.call(this, n), this.requestUpdate(r, i, e);
2779
+ };
2780
+ }
2781
+ throw Error("Unsupported decorator location: " + r);
2782
+ };
2783
+ function xa(e) {
2784
+ return (t, n) => typeof n == "object" ? ba(e, t, n) : ((e, t, n) => {
2785
+ let r = t.hasOwnProperty(n);
2786
+ return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
2787
+ })(e, t, n);
2788
+ }
2789
+ var Sa = Object.defineProperty, Ca = Object.getOwnPropertyDescriptor, wa = (e, t, n, r) => {
2790
+ for (var i = r > 1 ? void 0 : r ? Ca(t, n) : t, a = e.length - 1, o; a >= 0; a--) (o = e[a]) && (i = (r ? o(t, n, i) : o(i)) || i);
2791
+ return r && i && Sa(t, n, i), i;
2792
+ }, Ta = class extends ga {
2793
+ constructor() {
2794
+ super(...arguments), this.variant = "primary", this.size = "default", this.type = "circle", this.state = "default", this.iconName = "home", this.disabled = !1, this.buttonAriaLabel = "Icon button";
2795
+ }
2796
+ createRenderRoot() {
2797
+ return this;
2798
+ }
2799
+ connectedCallback() {
2800
+ if (super.connectedCallback(), !document.querySelector("link[href*=\"Roboto\"]")) {
2801
+ let e = document.createElement("link");
2802
+ e.rel = "stylesheet", e.href = "https://ui.renaissance.com/fonts/Roboto/style.css", document.head.appendChild(e);
2803
+ }
2804
+ }
2805
+ set shape(e) {
2806
+ this.type = e;
2807
+ }
2808
+ get shape() {
2809
+ return this.type;
2810
+ }
2811
+ get buttonClasses() {
2812
+ return [
2813
+ "nds-icon-button",
2814
+ `nds-icon-button--${this.variant}`,
2815
+ `nds-icon-button--${this.size}`,
2816
+ `nds-icon-button--${this.type}`,
2817
+ this.state === "default" ? "" : `nds-icon-button--${this.state}`,
2818
+ this.disabled ? "nds-icon-button--disabled" : ""
2819
+ ].filter(Boolean).join(" ");
2820
+ }
2821
+ handleClick(e) {
2822
+ if (this.disabled) {
2823
+ e.preventDefault(), e.stopPropagation();
2824
+ return;
2825
+ }
2826
+ this.dispatchEvent(new CustomEvent("icon-button-click", {
2827
+ bubbles: !0,
2828
+ composed: !0,
2829
+ detail: { originalEvent: e }
2830
+ }));
2831
+ }
2832
+ render() {
2833
+ return Qi`
2834
+ <style>
2835
+ nds-icon-button {
2836
+ display: inline-block;
2837
+ }
2838
+
2839
+ .nds-icon-button {
2840
+ display: inline-flex;
2841
+ align-items: center;
2842
+ justify-content: center;
2843
+ cursor: pointer;
2844
+ font-family: var(--font-family-roboto, "Roboto", sans-serif);
2845
+ font-weight: var(--font-weight-regular, 400);
2846
+ line-height: 1;
2847
+ text-decoration: none;
2848
+ background: none;
2849
+ position: relative;
2850
+ box-sizing: border-box;
2851
+ margin: 0;
2852
+ padding: 0;
2853
+ border: none;
2854
+ transition: background-color 0.2s ease-in-out,
2855
+ color 0.2s ease-in-out,
2856
+ box-shadow 0.2s ease-in-out;
2857
+ }
2858
+
2859
+ /* ── Sizes ── */
2860
+ .nds-icon-button--small {
2861
+ width: var(--height-32, 32px);
2862
+ height: var(--height-32, 32px);
2863
+ }
2864
+
2865
+ .nds-icon-button--medium {
2866
+ width: var(--height-36, 36px);
2867
+ height: var(--height-36, 36px);
2868
+ }
2869
+
2870
+ .nds-icon-button--default {
2871
+ width: var(--height-40, 40px);
2872
+ height: var(--height-40, 40px);
2873
+ }
2874
+
2875
+ .nds-icon-button--large {
2876
+ width: var(--height-48, 48px);
2877
+ height: var(--height-48, 48px);
2878
+ }
2879
+
2880
+ /* ── Shapes ── */
2881
+ .nds-icon-button--circle {
2882
+ border-radius: var(--radius-circle, 50%);
2883
+ }
2884
+
2885
+ .nds-icon-button--rounded {
2886
+ border-radius: var(--radius-8, 8px);
2887
+ }
2888
+
2889
+ /* ── Primary ── */
2890
+ .nds-icon-button--primary {
2891
+ background-color: var(--color-interactive-blue, #146eb3);
2892
+ color: var(--color-primary-white, #ffffff);
2893
+ }
2894
+
2895
+ .nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
2896
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2897
+ }
2898
+
2899
+ .nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
2900
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2901
+ }
2902
+
2903
+ /* ── Secondary ── */
2904
+ .nds-icon-button--secondary {
2905
+ background-color: var(--color-primary-white, #ffffff);
2906
+ color: var(--color-interactive-blue, #146eb3);
2907
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
2908
+ }
2909
+
2910
+ .nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
2911
+ background-color: var(--color-interactive-blue, #146eb3);
2912
+ color: var(--color-primary-white, #ffffff);
2913
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2914
+ }
2915
+
2916
+ .nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
2917
+ background-color: var(--color-interactive-blue, #146eb3);
2918
+ color: var(--color-primary-white, #ffffff);
2919
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2920
+ }
2921
+
2922
+ /* ── Tertiary ── */
2923
+ .nds-icon-button--tertiary {
2924
+ background-color: var(--color-new-gray, #f3f5f7);
2925
+ color: var(--color-interactive-blue, #146eb3);
2926
+ }
2927
+
2928
+ .nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
2929
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
2930
+ }
2931
+
2932
+ .nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
2933
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2934
+ }
2935
+
2936
+ /* ── Ghost ── */
2937
+ .nds-icon-button--ghost {
2938
+ background-color: transparent;
2939
+ color: var(--color-interactive-blue, #146eb3);
2940
+ }
2941
+
2942
+ .nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
2943
+ background-color: var(--color-new-gray, #f3f5f7);
2944
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
2945
+ }
2946
+
2947
+ .nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
2948
+ background-color: var(--color-new-gray, #f3f5f7);
2949
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2950
+ }
2951
+
2952
+ /* ── Dark (for dark backgrounds) ── */
2953
+ .nds-icon-button--dark {
2954
+ background-color: transparent;
2955
+ color: var(--color-primary-white, #ffffff);
2956
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
2957
+ }
2958
+
2959
+ .nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
2960
+ background-color: var(--color-interactive-blue, #146eb3);
2961
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
2962
+ }
2963
+
2964
+ .nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
2965
+ background-color: var(--color-interactive-blue, #146eb3);
2966
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
2967
+ }
2968
+
2969
+ /* ── Disabled ── */
2970
+ .nds-icon-button--disabled,
2971
+ .nds-icon-button:disabled {
2972
+ opacity: 0.5;
2973
+ cursor: not-allowed;
2974
+ }
2975
+
2976
+ /* ── Icon sizing ── */
2977
+ .nds-icon-button__icon {
2978
+ line-height: 1;
2979
+ display: inline-flex;
2980
+ align-items: center;
2981
+ justify-content: center;
2982
+ color: inherit;
2983
+ }
2984
+
2985
+ .nds-icon-button--small .nds-icon-button__icon {
2986
+ font-size: var(--nds-icon-small, 12px);
2987
+ }
2988
+
2989
+ .nds-icon-button--medium .nds-icon-button__icon {
2990
+ font-size: var(--nds-icon-medium, 14px);
2991
+ }
2992
+
2993
+ .nds-icon-button--default .nds-icon-button__icon {
2994
+ font-size: var(--nds-icon-default, 16px);
2995
+ }
2996
+
2997
+ .nds-icon-button--large .nds-icon-button__icon {
2998
+ font-size: var(--nds-icon-large, 20px);
2999
+ }
3000
+
3001
+ /* ── Focus ── */
3002
+ .nds-icon-button:focus-visible {
3003
+ outline: 2px solid var(--color-focus-blue, #2b87ff);
3004
+ outline-offset: 2px;
3005
+ }
3006
+
3007
+ /* ── Reduced motion ── */
3008
+ @media (prefers-reduced-motion: reduce) {
3009
+ .nds-icon-button {
3010
+ transition: none;
3011
+ }
3012
+ }
3013
+ </style>
3014
+ <button
3015
+ type="button"
3016
+ class="${this.buttonClasses}"
3017
+ ?disabled="${this.disabled}"
3018
+ aria-disabled="${this.disabled ? "true" : "false"}"
3019
+ aria-label="${this.buttonAriaLabel}"
3020
+ @click="${this.handleClick}"
3021
+ >
3022
+ <i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
3023
+ </button>
3024
+ `;
3025
+ }
3026
+ };
3027
+ wa([xa()], Ta.prototype, "variant", 2), wa([xa()], Ta.prototype, "size", 2), wa([xa()], Ta.prototype, "type", 2), wa([xa()], Ta.prototype, "state", 2), wa([xa({ attribute: "icon-name" })], Ta.prototype, "iconName", 2), wa([xa({ type: Boolean })], Ta.prototype, "disabled", 2), wa([xa({ attribute: "button-aria-label" })], Ta.prototype, "buttonAriaLabel", 2), wa([xa()], Ta.prototype, "shape", 1), Ta = wa([va("nds-icon-button")], Ta);
3028
+ var Ea = {
3029
+ maxZoom: 2,
3030
+ minCompensation: .25
3031
+ };
3032
+ function Da(e, t) {
3033
+ let n = e / t;
3034
+ return Number.isFinite(n) && n > 0 ? n : 1;
3035
+ }
3036
+ function Oa(e, t, n) {
3037
+ return Math.max(n, Math.min(1, t / e));
3038
+ }
3039
+ function ka(e) {
3040
+ let { maxZoom: t, minCompensation: n } = e, r = /* @__PURE__ */ H(1), i = /* @__PURE__ */ H(1);
3041
+ function a() {
3042
+ let e = Da(window.outerWidth, window.innerWidth);
3043
+ U(i, e, !0), U(r, Oa(e, t, n), !0);
3044
+ }
3045
+ return fn(() => {
3046
+ if (!(typeof window > "u")) return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
3047
+ }), {
3048
+ get current() {
3049
+ return X(r);
3050
+ },
3051
+ get zoom() {
3052
+ return X(i);
3053
+ }
3054
+ };
3055
+ }
3056
+ function Aa(e) {
3057
+ return e ? e.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
3058
+ }
3059
+ function ja(e) {
3060
+ let t = Aa(e);
3061
+ if (!t) return [];
3062
+ let n = t.split("-"), r = [];
3063
+ for (let e = n.length; e > 0; e--) {
3064
+ let t = n.slice(0, e);
3065
+ t.length > 1 && t[t.length - 1].length === 1 || r.push(t.join("-"));
3066
+ }
3067
+ return r;
3068
+ }
3069
+ function Ma(e, t) {
3070
+ for (let n of ja(e)) {
3071
+ let e = t.find((e) => Aa(e) === n);
3072
+ if (e != null) return e;
3073
+ }
3074
+ }
3075
+ var Na = {
3076
+ common: {
3077
+ close: "Close",
3078
+ cancel: "Cancel",
3079
+ save: "Save",
3080
+ reset: "Reset",
3081
+ retry: "Retry",
3082
+ back: "Back",
3083
+ next: "Next",
3084
+ previous: "Previous",
3085
+ submit: "Submit",
3086
+ continue: "Continue",
3087
+ finish: "Finish",
3088
+ yes: "Yes",
3089
+ no: "No",
3090
+ ok: "OK",
3091
+ any: "Any",
3092
+ off: "Off",
3093
+ auto: "Auto",
3094
+ all: "All",
3095
+ none: "None",
3096
+ loading: "Loading…",
3097
+ error: "Error",
3098
+ settings: "Settings",
3099
+ language: "Language",
3100
+ theme: "Theme",
3101
+ preview: "Preview",
3102
+ author: "Author",
3103
+ unknown: "Unknown",
3104
+ untitled: "Untitled",
3105
+ apply: "Apply",
3106
+ enabled: "Enabled",
3107
+ disabled: "Disabled",
3108
+ closeA11y: "Close",
3109
+ settingsA11y: "Open settings menu"
3110
+ },
3111
+ player: {
3112
+ passage: "Passage",
3113
+ passages: "Passages",
3114
+ question: "Question",
3115
+ questionNumbered: "Question {position}",
3116
+ questions: "Questions",
3117
+ items: "Items",
3118
+ section: "Section",
3119
+ loadingSection: "Loading section content…",
3120
+ loadingPassage: "Loading passage content…",
3121
+ configurationError: "Configuration Error",
3122
+ playerError: "Player Error",
3123
+ authoringBackendError: "Authoring Backend Configuration Error",
3124
+ itemLoadError: "Question could not be loaded.",
3125
+ sectionTabsA11y: "Section content tabs",
3126
+ passagesRegionA11y: "Passages",
3127
+ itemsRegionA11y: "Items",
3128
+ sectionToolsA11y: "Section tools",
3129
+ scrollDownA11y: "Scroll down",
3130
+ resizePanels: "Resize panels",
3131
+ resizePassagesAndItemsA11y: "Resize passages and items panels",
3132
+ resizeMediaRegion: "Resize media region",
3133
+ resizeQuestionAndMediaA11y: "Resize question and media panels",
3134
+ resizePassageAndMediaA11y: "Resize passage and media panels",
3135
+ assessment: {
3136
+ sectionPosition: "Section {position} of {total}",
3137
+ noSections: "No sections"
3138
+ },
3139
+ formative: {
3140
+ checkAnswer: "Check answer",
3141
+ tryAgain: "Try again",
3142
+ answerRecorded: "Answer recorded.",
3143
+ correct: "Correct.",
3144
+ partlyCorrect: "Partly correct.",
3145
+ notCorrect: "Not correct.",
3146
+ notAutoScored: "Answer recorded. This question is not scored automatically.",
3147
+ checkFailed: "This question could not be checked. Try again.",
3148
+ triesLeft: {
3149
+ one: "{count} try left.",
3150
+ other: "{count} tries left."
3151
+ }
3152
+ },
3153
+ timedMedia: {
3154
+ waitingForMedia: "Questions will appear as the media plays.",
3155
+ questionAvailable: "Question {position} is now available.",
3156
+ playbackPaused: "Playback paused. Answer question {position} to continue.",
3157
+ playbackAdvisory: "Answer question {position} before continuing with the media.",
3158
+ playbackReleased: "Answer accepted. Continue playing the media."
3159
+ }
3160
+ },
3161
+ toolkit: {
3162
+ toolsA11y: "Assessment tools",
3163
+ toolbarInitError: "Unable to initialize assessment toolkit.",
3164
+ settingsTitle: "Settings",
3165
+ closeSettingsA11y: "Close settings",
3166
+ dragPanelA11y: "Drag panel",
3167
+ closePanelA11y: "Close panel",
3168
+ resizeWindow: "Resize window",
3169
+ minimize: "Minimize",
3170
+ maximize: "Maximize",
3171
+ minimizePanelA11y: "Minimize panel",
3172
+ maximizePanelA11y: "Maximize panel",
3173
+ window: {
3174
+ moveLeftA11y: "Move tool left",
3175
+ moveRightA11y: "Move tool right",
3176
+ moveUpA11y: "Move tool up",
3177
+ moveDownA11y: "Move tool down",
3178
+ shrinkA11y: "Shrink tool window",
3179
+ growA11y: "Grow tool window",
3180
+ centerA11y: "Center tool window",
3181
+ closeA11y: "Close tool"
3182
+ },
3183
+ announce: {
3184
+ movedUp: "Moved up to {position}",
3185
+ movedDown: "Moved down to {position}",
3186
+ movedLeft: "Moved left to {position}",
3187
+ movedRight: "Moved right to {position}",
3188
+ rotatedTo: "Rotated to {degrees} degrees"
3189
+ }
3190
+ },
3191
+ tools: {
3192
+ calculator: {
3193
+ name: "Calculator",
3194
+ nameBasic: "Basic Calculator",
3195
+ nameScientific: "Scientific Calculator",
3196
+ nameGraphing: "Graphing Calculator",
3197
+ description: "Multi-type calculator (basic, scientific, graphing)",
3198
+ openedBasic: "Basic calculator opened",
3199
+ openedScientific: "Scientific calculator opened",
3200
+ openedGraphing: "Graphing calculator opened",
3201
+ closedBasic: "Basic calculator closed",
3202
+ closedScientific: "Scientific calculator closed",
3203
+ closedGraphing: "Graphing calculator closed",
3204
+ toolA11y: "Calculator tool",
3205
+ loading: "Loading calculator…",
3206
+ providerUnavailable: "The calculator is unavailable."
3207
+ },
3208
+ graph: {
3209
+ name: "Graph",
3210
+ description: "Graphing calculator and coordinate plane",
3211
+ buttonA11y: "Graph, graphing calculator",
3212
+ tooltip: "Graph",
3213
+ toolA11y: "Graph tool — draw points and lines on a coordinate grid",
3214
+ canvasA11y: "Graph canvas — use tools to add points and draw lines",
3215
+ grid: "Grid:",
3216
+ gridOpacityA11y: "Grid opacity",
3217
+ pointA11y: "Graph point {id}",
3218
+ modeSelector: "Selector",
3219
+ modeSelectorHint: "Selector: click and drag points to move them or associated lines.",
3220
+ modePoint: "Point",
3221
+ modePointHint: "Point: click on the grid to add points.",
3222
+ modeLine: "Line",
3223
+ modeLineHint: "Line: click a starting point, then an ending point to draw a line.",
3224
+ modeDelete: "Delete",
3225
+ modeDeleteHint: "Delete: click on a point to delete it and any connected lines."
3226
+ },
3227
+ periodicTable: {
3228
+ name: "Periodic Table",
3229
+ description: "Chemistry periodic table reference",
3230
+ buttonA11y: "Periodic Table, chemistry reference",
3231
+ tooltip: "Periodic Table",
3232
+ toolA11y: "Periodic table — select an element to view its details",
3233
+ elementsA11y: "Periodic table elements",
3234
+ showAllA11y: "Show all elements",
3235
+ allElements: "All Elements",
3236
+ atomicMass: "Atomic Mass",
3237
+ atomicNumber: "Atomic No",
3238
+ electronConfig: "Electron Config",
3239
+ phase: "Phase",
3240
+ filterByA11y: "Filter by {category}",
3241
+ elementA11y: "{name}, Symbol: {symbol}, Atomic number: {number}, Atomic mass: {mass}, Category: {category}",
3242
+ outsideFilterA11y: ", outside the current filter",
3243
+ category: {
3244
+ unknown: "Unknown",
3245
+ alkaliMetal: "Alkali Metal",
3246
+ alkalineEarthMetal: "Alkaline Earth Metal",
3247
+ transitionMetal: "Transition Metal",
3248
+ postTransitionMetal: "Post-transition Metal",
3249
+ metalloid: "Metalloid",
3250
+ diatomicNonmetal: "Diatomic Nonmetal",
3251
+ polyatomicNonmetal: "Polyatomic Nonmetal",
3252
+ nobleGas: "Noble Gas",
3253
+ lanthanide: "Lanthanide",
3254
+ actinide: "Actinide"
3255
+ }
3256
+ },
3257
+ ruler: {
3258
+ name: "Ruler",
3259
+ description: "On-screen ruler for measurements",
3260
+ buttonA11y: "Ruler",
3261
+ tooltip: "Ruler",
3262
+ toolA11y: "Draggable and rotatable ruler measurement tool",
3263
+ unitSelectionA11y: "Ruler unit selection",
3264
+ inches: "Inches",
3265
+ centimeters: "Centimeters",
3266
+ inchesInSentence: "inches",
3267
+ centimetersInSentence: "centimeters",
3268
+ switchToInchesA11y: "Switch to inches",
3269
+ switchToCentimetersA11y: "Switch to centimeters",
3270
+ switchedTo: "Switched to {unit}",
3271
+ applicationA11y: "Ruler tool. Use arrow keys to move, Shift+arrows to rotate, PageUp or PageDown for fine rotation, U to toggle units. Current unit: {unit}",
3272
+ imageAlt: "Ruler showing {unit}"
3273
+ },
3274
+ protractor: {
3275
+ name: "Protractor",
3276
+ description: "On-screen protractor for angle measurements",
3277
+ buttonA11y: "Protractor",
3278
+ tooltip: "Protractor",
3279
+ toolA11y: "Protractor tool. Use arrow keys to move, Shift+arrows to rotate, and PageUp or PageDown for fine rotation.",
3280
+ roleA11y: "Draggable and rotatable protractor measurement tool",
3281
+ imageAlt: "Protractor with 180-degree semicircular scale marked from 0 to 180 degrees in both directions, with degree markings every 10 degrees"
3282
+ },
3283
+ dictionary: {
3284
+ name: "Dictionary",
3285
+ description: "Look up word definitions",
3286
+ buttonA11y: "Dictionary, look up word definitions",
3287
+ tooltip: "Dictionary",
3288
+ toolA11y: "Dictionary"
3289
+ },
3290
+ pictureDictionary: {
3291
+ name: "Picture Dictionary",
3292
+ description: "Look up pictures for words",
3293
+ buttonA11y: "Picture Dictionary, look up pictures for words",
3294
+ tooltip: "Picture Dictionary",
3295
+ toolA11y: "Picture Dictionary"
3296
+ },
3297
+ dictionarySpanish: {
3298
+ name: "Spanish Dictionary",
3299
+ description: "Look up word definitions in Spanish",
3300
+ buttonA11y: "Spanish Dictionary, look up word definitions in Spanish",
3301
+ tooltip: "Spanish Dictionary",
3302
+ toolA11y: "Spanish Dictionary"
3303
+ },
3304
+ pictureDictionarySpanish: {
3305
+ name: "Spanish Picture Dictionary",
3306
+ description: "Look up pictures for words in Spanish",
3307
+ buttonA11y: "Spanish Picture Dictionary, look up pictures for words in Spanish",
3308
+ tooltip: "Spanish Picture Dictionary",
3309
+ toolA11y: "Spanish Picture Dictionary"
3310
+ },
3311
+ lineReader: {
3312
+ name: "Line Reader",
3313
+ description: "Reading guide overlay",
3314
+ buttonA11y: "Line Reader, reading guide",
3315
+ tooltip: "Line Reader",
3316
+ roleA11y: "Draggable and resizable reading guide overlay",
3317
+ close: "Close line reader",
3318
+ resizeWindowA11y: "Drag to resize the reading window",
3319
+ resizeFrameA11y: "Drag to resize the frame and window width",
3320
+ windowHeightAnnounce: "Reading window height {pixels} pixels",
3321
+ frameHeightAnnounce: "Frame height {pixels} pixels",
3322
+ widthAnnounce: "Width {pixels} pixels",
3323
+ applicationA11y: "Line Reader tool. A clear reading window inside an obscuring frame. Use arrow keys to move, +/- to resize the reading window, Escape to close. Reading window height: {paneHeight} pixels, Frame height: {frameHeight} pixels",
3324
+ resizeWindowFullA11y: "Resize the reading window. Drag, or use the up and down arrow keys to change its height. Current height {paneHeight} pixels",
3325
+ resizeFrameFullA11y: "Resize the frame. Drag, or use the up and down arrow keys to change the frame height and the left and right arrow keys to change the width. Current frame height {frameHeight} pixels, width {width} pixels"
3326
+ },
3327
+ answerEliminator: {
3328
+ name: "Answer Eliminator",
3329
+ description: "Strike through answer choices",
3330
+ buttonA11y: "Strike Through, eliminate answer choices",
3331
+ tooltip: "Strike Through"
3332
+ },
3333
+ highlighter: {
3334
+ name: "Highlighter",
3335
+ description: "Highlight and annotate text",
3336
+ buttonA11y: "Highlight text",
3337
+ tooltip: "Highlight"
3338
+ },
3339
+ annotationToolbar: {
3340
+ name: "Annotation",
3341
+ description: "Highlight and annotate text",
3342
+ buttonA11y: "Annotate, highlight and mark up text",
3343
+ tooltip: "Annotate",
3344
+ toolbarA11y: "Text annotation toolbar",
3345
+ underline: "Underline",
3346
+ underlineA11y: "Underline selected text",
3347
+ readAloud: "Read Aloud",
3348
+ readAloudA11y: "Read selected text aloud",
3349
+ remove: "Remove",
3350
+ removeA11y: "Remove this annotation",
3351
+ clearAll: "Clear All",
3352
+ clearAllA11y: "Clear all annotations from document",
3353
+ highlightYellowA11y: "Yellow highlight",
3354
+ highlightPinkA11y: "Pink highlight",
3355
+ highlightBlueA11y: "Blue highlight",
3356
+ highlightGreenA11y: "Green highlight"
3357
+ },
3358
+ theme: {
3359
+ name: "Theme",
3360
+ description: "Accessible themes and contrast",
3361
+ buttonA11y: "Theme, change colors and contrast",
3362
+ tooltip: "Theme",
3363
+ selectorA11y: "Theme selector",
3364
+ hint: "Select a theme to improve readability and reduce eye strain.",
3365
+ selectA11y: "Select theme",
3366
+ selectCurrentA11y: "Select theme. Current theme: {name}",
3367
+ optionUnavailableA11y: "{name}, unavailable",
3368
+ unavailableName: "Unavailable theme: {id}",
3369
+ unavailableDescription: "PIE's managed base theme remains active until this theme becomes available again.",
3370
+ unavailableStatus: "The selected theme is unavailable. PIE's managed base theme is active until it becomes available again."
3371
+ },
3372
+ textToSpeech: {
3373
+ name: "Text to Speech",
3374
+ description: "Read content aloud",
3375
+ toolA11y: "Text-to-speech tool",
3376
+ title: "Text-to-Speech",
3377
+ initializing: "Initializing…",
3378
+ initFailed: "Failed to initialize text-to-speech.",
3379
+ selectText: "Select text on the page to read it aloud.",
3380
+ speed: "Speed:",
3381
+ play: "Play",
3382
+ pause: "Pause",
3383
+ resume: "Resume",
3384
+ stop: "Stop",
3385
+ speaking: "Speaking…",
3386
+ paused: "Paused",
3387
+ charactersSelected: {
3388
+ one: "{count} character selected",
3389
+ other: "{count} characters selected"
3390
+ },
3391
+ rate: {
3392
+ slow: "Slow",
3393
+ slower: "Slower",
3394
+ normal: "Normal",
3395
+ faster: "Faster",
3396
+ fast: "Fast",
3397
+ veryFast: "Very Fast"
3398
+ },
3399
+ inline: {
3400
+ controlsA11y: "Reading controls",
3401
+ playbackSpeedA11y: "Playback speed",
3402
+ rewindA11y: "Rewind",
3403
+ fastForwardA11y: "Fast-forward",
3404
+ stopA11y: "Stop reading",
3405
+ initializing: "Initializing text-to-speech",
3406
+ initFailed: "Unable to initialize text-to-speech. Try again.",
3407
+ starting: "Starting reading",
3408
+ started: "Reading started",
3409
+ resumed: "Reading resumed",
3410
+ pausedAnnouncement: "Reading paused",
3411
+ stopped: "Reading stopped",
3412
+ switchedSection: "Reading switched to another section",
3413
+ startFailed: "Unable to start reading",
3414
+ skippedForward: "Skipped forward",
3415
+ skipForwardFailed: "Unable to skip forward",
3416
+ skippedBackward: "Skipped backward",
3417
+ skipBackwardFailed: "Unable to skip backward",
3418
+ speedChangeFailed: "Unable to change playback speed",
3419
+ speedAnnounce: "Playback speed {label}",
3420
+ playA11y: "Play reading",
3421
+ pauseA11y: "Pause reading",
3422
+ resumeA11y: "Resume reading"
3423
+ }
3424
+ },
3425
+ signLanguage: {
3426
+ name: "Sign Language",
3427
+ description: "Signed alternate for authored content",
3428
+ generic: "Sign language",
3429
+ unknown: "Sign language ({code})",
3430
+ ase: "American Sign Language",
3431
+ bfi: "British Sign Language",
3432
+ fsl: "French Sign Language",
3433
+ gss: "Greek Sign Language",
3434
+ mfs: "Mexican Sign Language",
3435
+ signedEnglish: "Signed English",
3436
+ regionA11y: "{language} translation"
3437
+ },
3438
+ audioTranscript: {
3439
+ name: "Audio Transcript",
3440
+ description: "Text transcript of audio content",
3441
+ regionA11y: "Transcript"
3442
+ }
3443
+ },
3444
+ debug: {
3445
+ session: "Session",
3446
+ sessionData: "Session Data",
3447
+ sessionDataPersistent: "PIE Session Data (Persistent)",
3448
+ noItemSessionYet: "No item session data yet. Interact with the item to see updates here.",
3449
+ itemSessionsSnapshot: "Item Sessions Snapshot",
3450
+ sectionControllerUnavailable: "Section controller not available for this section yet.",
3451
+ filteredModel: "Filtered Model",
3452
+ environment: "Environment",
3453
+ events: "Events",
3454
+ controllerEvents: "Controller Events",
3455
+ instrumentation: "Instrumentation",
3456
+ databaseState: "Database state",
3457
+ sessionDb: "Session DB (Server)",
3458
+ noRows: "No rows",
3459
+ noRecords: "No instrumentation records yet.",
3460
+ selectRecord: "Select a record to inspect details.",
3461
+ selectEvent: "Select an event to inspect payload details.",
3462
+ showRawTables: "Show raw tables",
3463
+ showReconstructedSnapshots: "Show reconstructed snapshots",
3464
+ showSectionRequest: "Show section request",
3465
+ showAssessmentRequest: "Show assessment request",
3466
+ liveUpdatesUnsupported: "Live updates are not supported in this browser",
3467
+ liveUpdatesDisconnected: "Live updates disconnected; retrying…",
3468
+ fieldType: "Type:",
3469
+ fieldTarget: "Target:",
3470
+ fieldItem: "Item:",
3471
+ fieldCanonical: "Canonical:",
3472
+ fieldIntent: "Intent:",
3473
+ fieldDuplicates: "Duplicates:",
3474
+ fieldSemanticRepeats: "Semantic Repeats:",
3475
+ dragItemSessionPanelA11y: "Drag item session panel",
3476
+ debuggerTabsA11y: "Debugger tabs",
3477
+ sessionDataJsonA11y: "Session data JSON",
3478
+ environmentJsonA11y: "Environment JSON",
3479
+ filteredModelJsonA11y: "Filtered model JSON",
3480
+ sectionSessionJsonA11y: "Section session snapshot JSON",
3481
+ eventLevelFilterA11y: "Event level filter",
3482
+ controllerEventDetailsA11y: "Controller event details",
3483
+ instrumentationFilterA11y: "Filter instrumentation record type",
3484
+ instrumentationDetailsA11y: "Instrumentation record details",
3485
+ toggleSessionPanelA11y: "Toggle session panel",
3486
+ toggleEventPanelA11y: "Toggle event broadcast panel",
3487
+ toggleDatabasePanelA11y: "Toggle database state panel",
3488
+ toggleInstrumentationPanelA11y: "Toggle instrumentation panel",
3489
+ pnp: {
3490
+ title: "PNP Profile",
3491
+ noAssessmentBound: "No assessment bound",
3492
+ determinationReadOnly: "Determination (read-only)",
3493
+ toolsEditor: "Tools Editor",
3494
+ enforcement: "PNP enforcement",
3495
+ allAvailableTools: "All available tools",
3496
+ clearPlacement: "Clear placement",
3497
+ tool: "Tool",
3498
+ placement: "Placement",
3499
+ provider: "Provider",
3500
+ simulation: "PNP simulation",
3501
+ resolvedTools: "Resolved Tools (toolkit)",
3502
+ provenanceSummary: "Tool Policy Provenance Summary",
3503
+ perToolDecisions: "Per-Tool Decisions",
3504
+ profileReadOnly: "PNP Profile (read-only)"
3505
+ },
3506
+ tts: {
3507
+ title: "TTS settings",
3508
+ closeA11y: "Close TTS settings",
3509
+ toolbarLayoutMode: "Toolbar layout mode",
3510
+ reservedRow: "Reserved row",
3511
+ expandingRow: "Expanding row",
3512
+ floatingOverlay: "Floating overlay",
3513
+ leftAlignedControls: "Left-aligned controls",
3514
+ inlineSpeedButtons: "Inline speed buttons",
3515
+ resetToDefaults: "Reset to defaults",
3516
+ mathHighlighting: "Math highlighting",
3517
+ checkingAvailability: "Checking availability…",
3518
+ recheck: "Recheck",
3519
+ voice: "Voice",
3520
+ bestAvailableVoice: "Best available voice (auto)",
3521
+ unnamedVoice: "Unnamed voice",
3522
+ apiEndpoint: "API endpoint",
3523
+ gender: "Gender",
3524
+ any: "Any",
3525
+ male: "Male",
3526
+ female: "Female",
3527
+ neutral: "Neutral",
3528
+ engine: "Engine",
3529
+ neural: "Neural",
3530
+ standard: "Standard",
3531
+ providerDefault: "Provider default",
3532
+ format: "Format",
3533
+ sampleRate: "Sample rate",
3534
+ speechMarks: "Speech marks",
3535
+ word: "Word",
3536
+ wordAndSentence: "Word + sentence",
3537
+ voiceType: "Voice type",
3538
+ wavenetVoiceType: "WaveNet",
3539
+ studioVoiceType: "Studio",
3540
+ plainText: "Plain text",
3541
+ sampleText: "Sample text",
3542
+ resetSample: "Reset sample",
3543
+ providerAvailable: "Provider available.",
3544
+ providerUnavailable: "Provider unavailable.",
3545
+ providerCheckFailed: "Provider availability check failed.",
3546
+ providerNotChecked: "Provider availability has not been checked yet.",
3547
+ webSpeechUnavailable: "Web Speech API is not available in this browser.",
3548
+ browserNoVoices: "Browser text-to-speech is available, but no voices were returned yet.",
3549
+ browserUnavailable: "Browser text-to-speech is not available.",
3550
+ googleUnavailable: "Google Cloud TTS is not available from the configured API.",
3551
+ pollyUnavailable: "AWS Polly is not available from the configured API.",
3552
+ recommendedVoices: "Recommended voices",
3553
+ allVoices: "All available voices",
3554
+ previewVoice: "Preview voice",
3555
+ stopPreview: "Stop preview",
3556
+ applying: "Applying…",
3557
+ ssmlPreviewUnsupported: "SSML preview is not supported in the Browser backend.",
3558
+ pollySsmlHint: "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails.",
3559
+ mathHighlightParts: "Highlighting each part of a formula as it is read, falling back to the whole formula when alignment is uncertain.",
3560
+ mathHighlightBlock: "Highlighting each formula as a single block instead of breaking it into parts.",
3561
+ previewFailed: "Failed to play preview audio.",
3562
+ previewNoAudio: "Preview response did not include audio content.",
3563
+ previewEnterText: "Enter preview text before starting playback.",
3564
+ previewUnavailable: "Cannot preview while this service is unavailable.",
3565
+ browserSynthesisUnavailable: "Browser speech synthesis is unavailable.",
3566
+ browserSynthesisEndedEarly: "Browser speech synthesis ended before audio started. Restart the browser and try again.",
3567
+ browserSynthesisQueueFailed: "Browser speech synthesis failed to queue preview audio.",
3568
+ browserPreviewFailed: "Failed to play browser voice preview.",
3569
+ ssmlWordTrackingDisabled: "Google SSML preview preserves authored SSML, so word tracking is disabled.",
3570
+ applyUnavailable: "Cannot apply settings while this service is unavailable.",
3571
+ coordinatorUnavailable: "Toolkit coordinator is not available for text-to-speech updates."
3572
+ }
3573
+ }
3574
+ }, Pa = "en-US", Fa = /* @__PURE__ */ new Set([
3575
+ "ar",
3576
+ "ckb",
3577
+ "dv",
3578
+ "fa",
3579
+ "he",
3580
+ "iw",
3581
+ "ks",
3582
+ "ku",
3583
+ "nqo",
3584
+ "ps",
3585
+ "sd",
3586
+ "syr",
3587
+ "ug",
3588
+ "ur",
3589
+ "yi"
3590
+ ]), Ia = /* @__PURE__ */ new Set([
3591
+ "zero",
3592
+ "one",
3593
+ "two",
3594
+ "few",
3595
+ "many",
3596
+ "other"
3597
+ ]);
3598
+ function La(e) {
3599
+ if (typeof e != "object" || !e) return !1;
3600
+ let t = Object.keys(e);
3601
+ return t.length > 0 && t.every((e) => Ia.has(e));
3602
+ }
3603
+ function Ra(e) {
3604
+ try {
3605
+ let t = new Intl.Locale(e).textInfo;
3606
+ if (t?.direction === "rtl" || t?.direction === "ltr") return t.direction;
3607
+ } catch {}
3608
+ let t = Aa(e).split("-")[0] ?? "";
3609
+ return Fa.has(t) ? "rtl" : "ltr";
3610
+ }
3611
+ var za = class e {
3612
+ static pluralRules = /* @__PURE__ */ new Map();
3613
+ locale;
3614
+ fallbackLocale;
3615
+ catalogs;
3616
+ customMessages;
3617
+ loading;
3618
+ listeners = /* @__PURE__ */ new Set();
3619
+ config;
3620
+ constructor(e = {}) {
3621
+ this.config = { ...e }, this.fallbackLocale = Ba(e.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[Pa, Na]]), this.customMessages = { ...e.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(e.locale) ?? "en-US";
3622
+ }
3623
+ async initialize(e) {
3624
+ if (this.config = {
3625
+ ...this.config,
3626
+ ...e
3627
+ }, e.customMessages) for (let [t, n] of Object.entries(e.customMessages)) this.addCustomMessages(t, n);
3628
+ await this.setLocale(e.locale ?? this.locale);
3629
+ }
3630
+ getLocale() {
3631
+ return this.locale;
3632
+ }
3633
+ async setLocale(e) {
3634
+ let t = this.resolveLocaleTag(e);
3635
+ if (!t) {
3636
+ this.locale = Ba(e) || "en-US", this.notify();
3637
+ return;
3638
+ }
3639
+ if (!this.catalogs.has(t)) {
3640
+ let e = this.loading.get(t);
3641
+ if (e) await e;
3642
+ else {
3643
+ let e = this.loadCatalog(t);
3644
+ this.loading.set(t, e);
3645
+ try {
3646
+ await e;
3647
+ } finally {
3648
+ this.loading.delete(t);
3649
+ }
3650
+ }
3651
+ }
3652
+ this.locale = t, this.notify();
3653
+ }
3654
+ t(e, t) {
3655
+ let n = this.lookup(e);
3656
+ return n === void 0 ? (this.config.onMissingKey?.(e, this.locale), e) : Ha(n, t);
3657
+ }
3658
+ plural(e, t) {
3659
+ let n = this.lookupNode(e);
3660
+ return n === void 0 || !La(n) ? this.t(e, t) : Ha(n[this.selectPluralCategory(t.count)] ?? n.other, t);
3661
+ }
3662
+ getDirection() {
3663
+ return Ra(this.locale);
3664
+ }
3665
+ getAvailableLocales() {
3666
+ return [.../* @__PURE__ */ new Set([
3667
+ ...this.catalogs.keys(),
3668
+ ...this.config.availableLocales ?? [],
3669
+ ...Object.keys(this.customMessages)
3670
+ ])];
3671
+ }
3672
+ isLocaleLoaded(e) {
3673
+ let t = this.resolveLocaleTag(e);
3674
+ return t !== void 0 && this.catalogs.has(t);
3675
+ }
3676
+ subscribe(e) {
3677
+ return this.listeners.add(e), () => {
3678
+ this.listeners.delete(e);
3679
+ };
3680
+ }
3681
+ hasKey(e) {
3682
+ return this.lookup(e) !== void 0;
3683
+ }
3684
+ addCustomMessages(e, t) {
3685
+ let n = Ba(e);
3686
+ this.customMessages[n] = Ua(this.customMessages[n] ?? {}, t), this.notify();
3687
+ }
3688
+ withLocale(t) {
3689
+ let n = this.resolveLocaleTag(t) ?? Ba(t);
3690
+ if (n === this.locale) return this;
3691
+ let r = new e({
3692
+ ...this.config,
3693
+ locale: n
3694
+ });
3695
+ return r.locale = n || "en-US", r.catalogs = this.catalogs, r.customMessages = this.customMessages, r.loading = this.loading, r;
3696
+ }
3697
+ formatNumber(e, t) {
3698
+ try {
3699
+ return new Intl.NumberFormat(this.locale, t).format(e);
3700
+ } catch {
3701
+ return new Intl.NumberFormat(Pa, t).format(e);
3702
+ }
3703
+ }
3704
+ formatDate(e, t) {
3705
+ try {
3706
+ return new Intl.DateTimeFormat(this.locale, t).format(e);
3707
+ } catch {
3708
+ return new Intl.DateTimeFormat(Pa, t).format(e);
3709
+ }
3710
+ }
3711
+ getBundle(e = this.locale) {
3712
+ let t = this.resolveLocaleTag(e);
3713
+ if (!t) return;
3714
+ let n = this.catalogs.get(t);
3715
+ if (n) return {
3716
+ locale: t,
3717
+ translations: n,
3718
+ direction: Ra(t)
3719
+ };
3720
+ }
3721
+ resolveLocaleTag(e) {
3722
+ if (!e) return;
3723
+ let t = this.getAvailableLocales(), n = Ma(e, t);
3724
+ if (n) return n;
3725
+ let r = Aa(e).split("-")[0];
3726
+ if (r) return t.find((e) => Aa(e).split("-")[0] === r);
3727
+ }
3728
+ async loadCatalog(e) {
3729
+ let t = this.config.loadCatalog;
3730
+ if (t) try {
3731
+ this.catalogs.set(e, await t(e));
3732
+ } catch (t) {
3733
+ throw Error(`Failed to load i18n catalog for locale: ${e}`, { cause: t });
3734
+ }
3735
+ }
3736
+ lookupNode(e) {
3737
+ let t = [
3738
+ this.customMessages[this.locale],
3739
+ this.catalogs.get(this.locale),
3740
+ this.customMessages[this.fallbackLocale],
3741
+ this.catalogs.get(this.fallbackLocale)
3742
+ ];
3743
+ for (let n of t) {
3744
+ let t = Va(n, e);
3745
+ if (t !== void 0) return t;
3746
+ }
3747
+ }
3748
+ lookup(e) {
3749
+ let t = this.lookupNode(e);
3750
+ if (typeof t == "string") return t;
3751
+ if (t !== void 0 && La(t)) return t.other;
3752
+ }
3753
+ selectPluralCategory(t) {
3754
+ let n = e.pluralRules.get(this.locale);
3755
+ if (!n) {
3756
+ try {
3757
+ n = new Intl.PluralRules(this.locale);
3758
+ } catch {
3759
+ return t === 1 ? "one" : "other";
3760
+ }
3761
+ e.pluralRules.set(this.locale, n);
3762
+ }
3763
+ return n.select(t);
3764
+ }
3765
+ notify() {
3766
+ for (let e of this.listeners) e();
3767
+ }
3768
+ };
3769
+ function Ba(e) {
3770
+ return e ? e.trim().replace(/_/g, "-") : "";
3771
+ }
3772
+ function Va(e, t) {
3773
+ if (!e) return;
3774
+ let n = e;
3775
+ for (let e of t.split(".")) if (typeof n != "object" || !n || (n = n[e], n === void 0)) return;
3776
+ return n;
3777
+ }
3778
+ function Ha(e, t) {
3779
+ return t ? e.replace(/\{(\w+)\}/g, (e, n) => {
3780
+ let r = t[n];
3781
+ return r == null ? e : String(r);
3782
+ }) : e;
3783
+ }
3784
+ function Ua(e, t) {
3785
+ let n = { ...e };
3786
+ for (let [e, r] of Object.entries(t)) {
3787
+ let t = n[e];
3788
+ n[e] = r && typeof r == "object" && t && typeof t == "object" ? Ua(t, r) : r;
3789
+ }
3790
+ return n;
3791
+ }
3792
+ var Wa;
3793
+ function Ga() {
3794
+ return Wa ||= new za(), Wa;
3795
+ }
3796
+ function Ka(e) {
3797
+ let t = e?.i18n ?? Ga();
3798
+ return {
3799
+ getLocale: () => t.getLocale(),
3800
+ setLocale: (e) => t.setLocale(e),
3801
+ t: (e, n) => t.t(e, n),
3802
+ plural: (e, n) => t.plural?.(e, n) ?? t.t(e, n),
3803
+ getDirection: () => t.getDirection?.() ?? "ltr",
3804
+ hasKey: (e) => t.hasKey?.(e) ?? !1,
3805
+ subscribe: (e) => t.subscribe?.(e) ?? (() => {})
3806
+ };
3807
+ }
3808
+ var qa = /* @__PURE__ */ hr("<nds-icon-button></nds-icon-button>", 2), Ja = /* @__PURE__ */ hr("<button type=\"button\"><i aria-hidden=\"true\"></i></button>"), Ya = /* @__PURE__ */ hr("<span class=\"pie-tool-tts-inline__trigger-zoom svelte-18mzc0g\"><!></span>"), Xa = /* @__PURE__ */ hr("<button type=\"button\" role=\"radio\" data-pie-tts-control=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-18mzc0g\"><span class=\"pie-tool-tts-inline__speed-label svelte-18mzc0g\"> </span></button>"), Za = /* @__PURE__ */ hr("<div role=\"radiogroup\"></div>"), Qa = /* @__PURE__ */ hr("<div role=\"toolbar\" tabindex=\"-1\"><!> <button type=\"button\" data-pie-tts-control=\"\" data-pie-tts-media=\"\" data-pie-tts-seek=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-18mzc0g\"><i class=\"fa-solid fa-backward pie-tool-tts-inline__icon svelte-18mzc0g\" aria-hidden=\"true\"></i></button> <button type=\"button\" data-pie-tts-control=\"\" data-pie-tts-media=\"\" data-pie-tts-seek=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-18mzc0g\"><i class=\"fa-solid fa-forward pie-tool-tts-inline__icon svelte-18mzc0g\" aria-hidden=\"true\"></i></button> <button type=\"button\" data-pie-tts-control=\"\" data-pie-tts-media=\"\" data-pie-tts-stop=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-18mzc0g\"><i class=\"fa-solid fa-stop pie-tool-tts-inline__icon svelte-18mzc0g\" aria-hidden=\"true\"></i></button></div>"), $a = /* @__PURE__ */ hr("<!> <!>", 1), eo = /* @__PURE__ */ hr("<div><!> <div class=\"pie-sr-only svelte-18mzc0g\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"> </div></div>"), to = {
3809
+ hash: "svelte-18mzc0g",
3810
+ code: "\n /* Lay the component out as a flex box, not the default inline custom element.\n As `display: inline` the host is blockified into a block flex item that\n wraps its content in a line box, so the inline-flex root sits on the text\n baseline — a zoom-shrunk play button then rides that baseline and drifts\n LOW versus the calculator button (whose flex-item wrapper has no line box).\n inline-flex + center removes the line box and keeps the trigger centered. */:host {display:inline-flex;align-items:center;}.pie-tool-tts-inline.svelte-18mzc0g {position:relative;display:inline-flex;align-items:center;\n /* Gap between trigger and panel lives outside the zoomed buttons, so it\n is compensated separately or it keeps growing with browser zoom. */gap:calc(0.5rem * var(--pie-tts-zoom-comp, 1));}.pie-tool-tts-inline--controls-row.svelte-18mzc0g {width:100%;justify-content:flex-end;}\n\n /* The play/pause trigger and the \"more\" overflow control are now\n <nds-icon-button> hosts; the NDS component owns their shape, colours,\n hover/active/focus states, and the filled active (`variant=\"primary\"`)\n appearance. This class only drives the host's size via NDS's own size\n custom properties (see the size variants below), so the light-DOM inner\n button matches the toolbar's md/sm/lg dimensions. */\n /* Freeze the play/pause button at its 200%-zoom appearance (factor is 1 at\n zoom <= 200%, so behaviour below that is unchanged). The zoom goes on this\n wrapper, not the nds-icon-button host — see the snippet. */.pie-tool-tts-inline__trigger-zoom.svelte-18mzc0g {display:inline-flex;zoom:var(--pie-tts-zoom-comp, 1);}.pie-tool-tts-inline__trigger.svelte-18mzc0g {display:inline-flex;\n /* Outer button size follows the toolbar size variants (below); the glyph\n keeps the NDS-native icon size (size=\"small\") so it isn't oversized. */--height-32: 2rem;\n /* Host-settable accent: the NDS tertiary glyph colour derives from\n --color-interactive-blue, remapped here to the same chain the panel\n paints with. It defaults through --pie-button-color so the glyph follows\n the active theme; the literal is the no-theme last resort. */--color-interactive-blue: var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));\n /* NDS palette bridge — keep in sync with the copies in\n assessment-toolkit ItemToolBar and section-player SectionItemsPane\n (asserted by scripts/check-theme-tokens.mjs). The vendored button\n paints its fill, its on-accent glyph, its hover ring and its focus\n ring from the NDS design-system palette, which no PIE theme sets, so\n a tertiary trigger kept a #f3f5f7 pill on every page — and once the\n glyph followed the theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}\n\n /* Non-NDS fallback trigger (host opted out of nds-icon-button). Inherits\n the plain `__control` box; only override to keep the round trigger\n shape and the themeable accent colour on its glyph. */.pie-tool-tts-inline__trigger--plain.svelte-18mzc0g {border-radius:50%;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));}\n\n /* Active/open trigger hooks (PIE-727).\n ---------------------------------------------------------------------------\n README documents --pie-tool-trigger-active-background / -color /\n -border-color as the supported way to style this trigger while its panel is\n open, instead of overriding broad tokens like --pie-primary. The component\n had stopped honouring all three, so a host following the docs got nothing.\n These rules restore them, matching how tool-calculator-inline-desmos wires\n the same three hooks.\n ---------------------------------------------------------------------------\n Every fallback is the value this element already resolves to when the hook\n is unset, so adding these rules changes nothing by default. That is\n deliberate: unlike the calculator, this trigger has never had a filled\n active look, and introducing one here would restyle the control for every\n host. Hosts opt in by setting a hook; nobody is opted in by us.\n\n Keyed off [aria-expanded='true'], which the markup already maintains, so\n there is no new state to keep in sync. */.pie-tool-tts-inline__trigger--plain[aria-expanded=\"true\"].svelte-18mzc0g {\n /* All three fallbacks are `__control`'s chains, including the glyph colour.\n Not `--plain`'s: that rule also declares `color`, but `__control` repeats\n it further down the sheet at equal specificity, so `__control` wins and\n `--plain`'s accent declaration never applies. Measured in Chromium: the\n plain trigger's glyph is --pie-button-color either way. */background:var(\n --pie-tool-trigger-active-background,\n var(--pie-button-background-color, var(--pie-button-bg, var(--pie-background, #fff)))\n );color:var(\n --pie-tool-trigger-active-color,\n var(--pie-button-color, var(--pie-text, #222))\n );border-color:var(\n --pie-tool-trigger-active-border-color,\n var(--pie-button-border-color, var(--pie-button-border, var(--pie-border, #c6c6c6)))\n );}\n\n /* NDS variant: its glyph colour derives from --color-interactive-blue, so the\n accent is remapped rather than painted, exactly as the base rule does. Only\n the foreground hook applies -- background and border are owned by the NDS\n button's own internals, and setting them on this host element would paint a\n box the tertiary button does not currently have. */.pie-tool-tts-inline__trigger:not(.pie-tool-tts-inline__trigger--plain)[aria-expanded=\"true\"].svelte-18mzc0g {--color-interactive-blue: var(\n --pie-tool-trigger-active-color,\n var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)))\n );}.pie-tool-tts-inline__control.svelte-18mzc0g:hover:not(:disabled) {background-color:var(--pie-button-hover-background-color, var(--pie-button-hover-bg, var(--pie-secondary-background, #f2f4f8)));transform:translateY(-1px);box-shadow:0 2px 6px color-mix(in srgb, var(--pie-shadow, #000) 14%, transparent);}.pie-tool-tts-inline__control.svelte-18mzc0g:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.pie-tool-tts-inline__control.svelte-18mzc0g:focus-visible {outline:2px solid var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-primary, #0066cc)));outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-primary, #0066cc) 22%, transparent);}\n\n /* Activating play/pause deliberately KEEPS focus on the trigger while the\n controls panel opens beside it, so where focus sits has to stay visible —\n including after a pointer activation, where the browser suppresses\n :focus-visible and would paint no ring at all. Scoped to\n `:focus:not(:focus-visible)` so it only fills that gap: genuine keyboard\n focus keeps whatever the shared `__control` rule (plain trigger) or the NDS\n component (nds-icon-button) already paints, untouched.\n Two selectors because the two trigger variants focus different nodes: the\n plain fallback IS the button, while <nds-icon-button> holds focus on an\n inner light-DOM <button> that Lit creates — so it carries no Svelte scoping\n class and must be reached with :global(). */.pie-tool-tts-inline__trigger.svelte-18mzc0g:focus:not(:focus-visible),\n .pie-tool-tts-inline__trigger.svelte-18mzc0g button:focus:not(:focus-visible) {outline:2px solid var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-primary, #0066cc)));outline-offset:2px;}.pie-tool-tts-inline__panel.svelte-18mzc0g {display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;\n /* Buttons inside are zoom-capped (see __control); compensate the panel's\n own spacing/height with the same factor so its chrome doesn't keep\n growing around the frozen buttons past 200%. */gap:calc(0.25rem * var(--pie-tts-zoom-comp, 1));box-sizing:border-box;min-height:calc(var(--pie-tts-controls-row-height, 2.875rem) * var(--pie-tts-zoom-comp, 1));padding:calc(0.25rem * var(--pie-tts-zoom-comp, 1)) calc(0.5rem * var(--pie-tts-zoom-comp, 1));background:var(--pie-surface, var(--pie-background, #fff));border:1px solid var(--pie-border, #d0d0d0);border-radius:0.5rem;}.pie-tool-tts-inline__panel--floating.svelte-18mzc0g {position:absolute;z-index:2;top:50%;right:0;left:auto;}.pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g {\n /* Fixed so it escapes overflow-clipping ancestors; top / right /\n max-width are set inline by measureLeftAlignedOverlay(). */position:fixed;}.pie-tool-tts-inline__panel--row.svelte-18mzc0g {position:absolute;z-index:2;top:100%;right:0;left:auto;}.pie-tool-tts-inline__control.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;\n /* Cap each control (rewind / fast-forward / stop / speed) at its\n 200%-zoom size; matches the trigger and the passage/questions toggle. */zoom:var(--pie-tts-zoom-comp, 1);width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-button-border, var(--pie-border, #c6c6c6)));border-radius:0.25rem;background:var(--pie-button-background-color, var(--pie-button-bg, var(--pie-background, #fff)));color:var(--pie-button-color, var(--pie-text, #222));cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}\n\n /* Icon-only panel controls (rewind / fast-forward / stop) are round to match\n the circular NDS trigger; the pill-shaped speed radios keep square corners. */.pie-tool-tts-inline__control--secondary.svelte-18mzc0g {border-radius:50%;}.pie-tool-tts-inline__speed-group.svelte-18mzc0g {display:inline-flex;flex-wrap:wrap;align-items:center;gap:calc(0.25rem * var(--pie-tts-zoom-comp, 1));}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {width:auto;height:2rem;padding:0;font-size:1rem;font-weight:500;letter-spacing:0;white-space:nowrap;}.pie-tool-tts-inline__control--speed[aria-checked='true'].svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background:color-mix(in srgb, var(--pie-primary, #1565c0) 14%, var(--pie-background, #fff));color:var(--pie-primary, #1565c0);font-weight:600;}.pie-tool-tts-inline__speed-label.svelte-18mzc0g {line-height:1.2;\n /* Render speed labels lowercase regardless of the configured casing.\n Applied to the visible text only; the radio's accessible name comes\n from aria-label (option.ariaLabel), so screen readers still hear the\n canonical \"Slow speed\" / \"Normal speed\" / \"Fast speed\". */text-transform:lowercase;}\n\n /* Reserve the bold (selected) width — stacked popper only. Switching the\n selected speed there would otherwise change the label width and resize the\n fit-content card. The ghost is a zero-height, hidden grid row whose bold text\n sets the column width. The inline (roomy) row keeps its natural sizing. */.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__speed-label:where(.svelte-18mzc0g) {display:inline-grid;justify-items:center;}.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__speed-label:where(.svelte-18mzc0g)::before {content:attr(data-label);height:0;overflow:hidden;font-weight:700;visibility:hidden;}.pie-tool-tts-inline__control.svelte-18mzc0g:disabled {cursor:not-allowed;opacity:0.6;}\n\n /* ── Overlay layouts (floating-overlay + left-aligned) ──────────────────────\n The Knowledge-Check design keeps the controls on the surrounding\n Question/Passage header: a low-chrome card, icon-only media glyphs, and speed\n radios as plain text with the selected one lifted into a chip.\n\n Shape comes from that design; colour comes from the theme. The overlay used\n to paint literals (#146eb3 glyphs on a #fff card with a #f3f5f7 chip), which\n left a blue-on-white panel floating over every non-default theme — a DaisyUI\n `valentine` page rendered a pink player with a blue TTS panel. Each surface\n now defaults through a canonical token and keeps its literal only as the\n no-theme last resort.\n\n Foregrounds resolve through --pie-button-color (DaisyUI base-content), the\n one family whose contrast against the card is guaranteed in every shipped\n theme: --pie-primary and --pie-tertiary are `direct` mappings of DaisyUI\n slots chosen to pair with their own -content colour, so an accent glyph taken\n from either drops to 1.37:1 on `pastel` and 11 of 35 themes fall under 3:1.\n Selection is signalled by the chip and the bolder weight rather than by hue.\n\n Host knobs, all unchanged: --pie-tts-button-color (accent),\n --pie-tts-inline-muted-color, --pie-tts-selected-bg,\n --pie-selected-button-background/-border, --pie-tts-menu-shadow. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g,\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g {min-height:0;height:calc(3rem * var(--pie-tts-zoom-comp, 1)); /* Figma: 48px */justify-content:center;gap:calc(0.375rem * var(--pie-tts-zoom-comp, 1));\n /* --pie-white, not --pie-background: the base light theme sets\n --pie-background to rgba(255,255,255,0) so page content shows through,\n and a floating card cannot be transparent. --pie-white is the theme's\n opaque page surface (DaisyUI base-100; #000 under the dark theme). */background:var(--pie-tts-selected-bg, var(--pie-surface, var(--pie-white, #fff)));\n /* The Figma card is shadow-only, but the shadow is black: once the card\n takes a dark theme's surface it has no visible edge left. A hairline\n derived from the text colour reads on either. Not --pie-border: a host\n that wants borderless controls sets that to transparent, which is\n exactly the case where the shadow is the only edge. --pie-tts-card-border\n is the opt-out (`transparent` restores the shadow-only card). */border:1px solid var(--pie-tts-card-border, color-mix(in srgb, var(--pie-text, #000) 15%, transparent));border-radius:0.5rem; /* Figma: --radius-8 (8px) */box-shadow:var(--pie-tts-menu-shadow, 0 1px 5px 0 rgba(0, 0, 0, 0.3));}\n\n /* Compact: the popper card holds the media row (rewind / fast-forward / stop)\n on top and the speed radios stacked below. The white card bg + shadow come\n from the shared overlay rule above; this only tunes the compact layout. */.pie-tool-tts-inline__panel--compact.svelte-18mzc0g {gap:0;width:fit-content;min-width:calc(7.5rem * var(--pie-tts-zoom-comp, 1)); /* ~120px floor; grows with content beyond that */height:auto; /* stacked popper grows past the 48px roomy toolbar height */padding:0;}\n\n /* Media controls (rewind / fast-forward / stop): accent glyph, no chrome. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g) {border:0;background:transparent;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));}.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g):hover:not(:disabled),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222))) 12%, transparent);}\n\n /* Speed radios (inline / roomy): plain muted text with breathing room between\n options — min-width + side padding, matching the original inline spacing. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g) {min-width:2.75rem;padding:0 0.625rem;border:1px solid transparent;background:transparent;box-shadow:none;\n /* Unselected labels are text on the card, so they take the full text colour\n rather than a dimmed mix: DaisyUI only guarantees base-content against the\n surface, and `valentine` is 5.46:1 there — a 10% dim already lands under\n 4.5:1. Hosts that want them dimmer set --pie-tts-inline-muted-color. */color:var(--pie-tts-inline-muted-color, var(--pie-button-color, var(--pie-text, #5b6b73)));font-size:1rem;}.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g):hover:not(:disabled),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222))) 8%, transparent);}\n\n /* Selected inline radio: \"chip\" treatment. Placed after the muted rule so it\n wins at equal specificity. The fill is --pie-button-active-bg, which the\n DaisyUI mapping already tunes (base-300 at 70% toward base-100) to hold\n base-content text at 4.5:1 in every shipped theme. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-18mzc0g) {border:1px solid var(--pie-selected-button-border, var(--pie-button-border, var(--pie-border, #d9dada)));border-radius:6px;background:var(--pie-selected-button-background, var(--pie-button-active-bg, #f3f5f7));color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));font-weight:600;}\n\n /* ── Compact left-aligned overlay ───────────────────────────────────────────\n Inside the popper card the media controls occupy the top row and the speed\n radios drop onto their own full-width line below, stacked vertically.\n `order` puts the speeds after the media buttons even though they are first in\n the DOM; flex-basis:100% forces the wrap so media occupy the top line. */.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g {order:1;flex-basis:100%;flex-direction:column;align-items:center;gap:0.125rem;}\n\n /* In the card every option reads in the accent colour; the selected one is\n lifted into a bordered chip. Options size to their content and centre (no\n full-width stretch), keeping the popper compact. */.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g) {justify-content:center;width:auto;min-width:0;height:auto;padding:0.25rem 0.75rem;border:1px solid transparent;border-radius:0.5rem;background:transparent;box-shadow:none;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));font-size:0.75rem;font-weight:500;}.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-18mzc0g) {border:1px solid var(--pie-selected-button-border, var(--pie-button-border, var(--pie-border, #d9dada)));border-radius:6px;background:var(--pie-selected-button-background, var(--pie-button-active-bg, #f3f5f7));color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));font-weight:700;}\n\n /* Trigger size variants set the NDS outer size (--height-32); the glyph keeps\n the NDS-native icon size (host renders size=\"small\"). */.pie-tool-tts-inline__trigger--sm.svelte-18mzc0g {--height-32: 1.75rem;}.pie-tool-tts-inline__trigger--md.svelte-18mzc0g {--height-32: 2rem;}.pie-tool-tts-inline__trigger--lg.svelte-18mzc0g {--height-32: 2.5rem;}.pie-tool-tts-inline__icon.svelte-18mzc0g {font-size:1rem;line-height:1;color:currentColor;}\n\n @media (max-width: 839px) {.pie-tool-tts-inline.svelte-18mzc0g {gap:0.375rem;}.pie-tool-tts-inline__panel--compact.svelte-18mzc0g {padding:0;}\n\n /* NOTE: the trigger's --height-32 is intentionally NOT shrunk here. Browser\n zoom narrows the CSS viewport enough to trip this breakpoint, which would\n drop the play button to 1.75rem while the calculator button (furnished by\n the toolbar) stays 2rem, mismatching them under zoom. Size is governed by\n the zoom-compensation cap instead. */.pie-tool-tts-inline__control.svelte-18mzc0g {width:1.75rem;height:1.75rem;}.pie-tool-tts-inline__control.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {font-size:1rem;}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {width:auto;min-width:2.5rem;height:1.75rem;padding:0 0.5rem;}\n\n /* drop font-size on smaller screens */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g) {font-size:0.75rem;}\n }.pie-sr-only.svelte-18mzc0g {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}\n\n @media (prefers-reduced-motion: reduce) {.pie-tool-tts-inline__control.svelte-18mzc0g {transition:none !important;}\n }"
3811
+ };
3812
+ function no(o, s) {
3813
+ Re(s, !0), Lr(o, to);
3814
+ let c = ni(s, "catalogId", 7, ""), l = ni(s, "language", 7, "en-US"), u = ni(s, "size", 7, "md"), d = ni(s, "speedOptions", 7, void 0), f = ni(s, "showSingleSpeedOption", 7, !1), p = ni(s, "layoutMode", 7, "expanding-row"), m = typeof window < "u", h = "__pie_tts_inline_active_owner__", g = "pie-tts-inline-owner-change", _ = ["/_fa-pro/fontawesome.min.css", "/_fa-pro/light.min.css"], v = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css", y = /font.?awesome|fa-?pro/i, b = !1, x = () => {
3815
+ if (!(!m || b)) {
3816
+ if (b = !0, !document.querySelector("link[href*=\"Roboto\"]")) {
3817
+ let e = document.createElement("link");
3818
+ e.rel = "stylesheet", e.href = "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap", document.head.appendChild(e);
3819
+ }
3820
+ if (!Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).some((e) => y.test(e.href))) {
3821
+ if (!document.querySelector(`link[href="${v}"]`)) {
3822
+ let e = document.createElement("link");
3823
+ e.rel = "stylesheet", e.href = v, document.head.appendChild(e);
3824
+ }
3825
+ for (let e of _) {
3826
+ if (document.querySelector(`link[href="${e}"]`)) continue;
3827
+ let t = document.createElement("link");
3828
+ t.rel = "stylesheet", t.href = e, document.head.appendChild(t);
3829
+ }
3830
+ }
3831
+ }
3832
+ }, S = "__pieFaTtsShadowInstalled", ee = (e) => {
3833
+ let t = e.getRootNode();
3834
+ if (!(t instanceof ShadowRoot)) return;
3835
+ let n = t;
3836
+ if (n[S]) return;
3837
+ n[S] = !0;
3838
+ let r = /* @__PURE__ */ new Set(), i = (e) => {
3839
+ if (!e || r.has(e)) return;
3840
+ r.add(e);
3841
+ let n = document.createElement("link");
3842
+ n.rel = "stylesheet", n.href = e, t.appendChild(n);
3843
+ }, a = Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).filter((e) => y.test(e.href));
3844
+ for (let e of a) i(e.href);
3845
+ }, C = (e) => {
3846
+ x(), ee(e);
3847
+ let t = () => {
3848
+ for (let t of e.querySelectorAll("i.fa-light")) t.classList.remove("fa-light"), t.classList.add("fa-solid");
3849
+ };
3850
+ t();
3851
+ let n = new MutationObserver(t);
3852
+ return n.observe(e, {
3853
+ childList: !0,
3854
+ subtree: !0,
3855
+ attributes: !0,
3856
+ attributeFilter: ["class"]
3857
+ }), { destroy() {
3858
+ n.disconnect();
3859
+ } };
3860
+ }, w = (e, t) => {
3861
+ let n = t, r = () => {
3862
+ let t = e.querySelector("button");
3863
+ if (t) for (let [e, r] of Object.entries(n)) r == null ? t.removeAttribute(e) : t.setAttribute(e, r);
3864
+ };
3865
+ r();
3866
+ let i = new MutationObserver(r);
3867
+ return i.observe(e, {
3868
+ childList: !0,
3869
+ subtree: !0
3870
+ }), {
3871
+ update(e) {
3872
+ n = e, r();
3873
+ },
3874
+ destroy() {
3875
+ i.disconnect();
3876
+ }
3877
+ };
3878
+ }, te = (e) => (x(), ee(e), {}), T = /* @__PURE__ */ H(void 0), E = /* @__PURE__ */ H(void 0), ne = /* @__PURE__ */ H(null), re = /* @__PURE__ */ B(() => X(ne)?.ndsIcons === !0), D = /* @__PURE__ */ B(() => Ka(X(ne))), O = /* @__PURE__ */ H(null), ie = /* @__PURE__ */ H(null), k = /* @__PURE__ */ B(() => X(ne)?.ttsService), ae = /* @__PURE__ */ B(() => X(ne)?.highlightCoordinator), oe = /* @__PURE__ */ B(() => X(ie)?.scopeElement || X(O)?.scopeElement || null), A = /* @__PURE__ */ H(!1), se = /* @__PURE__ */ H(!1), j = /* @__PURE__ */ H(!1), M = /* @__PURE__ */ H(!1), N = /* @__PURE__ */ H(""), ce = /* @__PURE__ */ H(null), le = /* @__PURE__ */ H(null), ue = /* @__PURE__ */ H(!1), de = /* @__PURE__ */ H(!1), fe = /* @__PURE__ */ H(!1), pe = null, me = /* @__PURE__ */ B(() => X(ue) || X(de)), he = null, ge = /* @__PURE__ */ B(() => t(d())), _e = /* @__PURE__ */ B(() => P(X(ge))), ve = /* @__PURE__ */ B(() => X(ge).length > 1 || f() ? X(ge) : []), ye = /* @__PURE__ */ B(() => X(ce) !== null && X(le) === X(_e) && X(ge).some((e) => e.rate === X(ce)) ? X(ce) : F(X(ge))), be = `pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`, xe = `pie-tts-inline-${Math.random().toString(36).slice(2)}`, Se = `${be}-controls`;
3879
+ function Ce() {
3880
+ if (!m) return null;
3881
+ let e = window[h];
3882
+ return typeof e == "string" ? e : null;
3883
+ }
3884
+ function we() {
3885
+ return Ce() === be;
3886
+ }
3887
+ function Te(e, t) {
3888
+ m && window.dispatchEvent(new CustomEvent(g, { detail: {
3889
+ ownerId: e,
3890
+ previousOwnerId: t
3891
+ } }));
3892
+ }
3893
+ function Ee() {
3894
+ if (!m) return;
3895
+ let e = Ce();
3896
+ e !== be && (window[h] = be, Te(be, e));
3897
+ }
3898
+ function De() {
3899
+ m && Ce() === be && (delete window[h], Te(null, be));
3900
+ }
3901
+ function Oe(e = "", t = !1) {
3902
+ U(de, !1), U(j, !1), U(M, !1), U(A, t, !0), U(N, e, !0);
3903
+ }
3904
+ function P(e) {
3905
+ return e.map((e) => `${e.rate}:${e.label}:${e.ariaLabel}:${e.isDefault ? "1" : "0"}`).join("|");
3906
+ }
3907
+ function F(e) {
3908
+ return e.find((e) => e.isDefault)?.rate ?? e.find((e) => e.rate === 1)?.rate ?? e[0]?.rate ?? 1;
3909
+ }
3910
+ async function I(e, t) {
3911
+ if (typeof e.setPlaybackRate == "function") {
3912
+ await e.setPlaybackRate(t);
3913
+ return;
3914
+ }
3915
+ await e.updateSettings({ rate: t });
3916
+ }
3917
+ function L() {
3918
+ if (!X(T) || !X(E)) return !1;
3919
+ let e = X(T).getRootNode();
3920
+ if (!(e instanceof ShadowRoot)) return !1;
3921
+ let t = e.activeElement;
3922
+ return !!(t && X(E).contains(t));
3923
+ }
3924
+ function ke() {
3925
+ if (!X(E)) return !1;
3926
+ let e = X(E).getRootNode();
3927
+ if (!(e instanceof ShadowRoot)) return !1;
3928
+ let t = e.activeElement;
3929
+ return !t || !X(E).contains(t) ? !1 : t.matches(R);
3930
+ }
3931
+ function je() {
3932
+ let e = X(E)?.querySelector(Le);
3933
+ if (e && !e.disabled) {
3934
+ e.focus();
3935
+ return;
3936
+ }
3937
+ Me(!0);
3938
+ }
3939
+ function Me(e) {
3940
+ if (!X(T) || !e) return;
3941
+ let t = X(T).getRootNode();
3942
+ if (!(t instanceof ShadowRoot)) return;
3943
+ let n = t.querySelector(".pie-tool-tts-inline__trigger");
3944
+ (n?.querySelector("button") ?? n)?.focus();
3945
+ }
3946
+ function Ne(e = X(D).t("tools.textToSpeech.inline.switchedSection"), t = !1) {
3947
+ if (!X(fe) && !(!X(A) && !we())) {
3948
+ U(fe, !0);
3949
+ try {
3950
+ let n = L();
3951
+ we() && De(), Oe(e), qe(), t && queueMicrotask(() => {
3952
+ Me(n);
3953
+ });
3954
+ } finally {
3955
+ U(fe, !1);
3956
+ }
3957
+ }
3958
+ }
3959
+ fn(() => {
3960
+ if (X(T)) return r(X(T), (e) => {
3961
+ U(ne, e, !0);
3962
+ });
3963
+ }), fn(() => {
3964
+ if (!X(T)) return;
3965
+ let t = e(X(T), (e) => {
3966
+ U(O, e, !0);
3967
+ }), n = i(X(T), (e) => {
3968
+ U(ie, e, !0);
3969
+ });
3970
+ return () => {
3971
+ n(), t();
3972
+ };
3973
+ }), fn(() => {
3974
+ if (!X(k)) return;
3975
+ let e = (e) => {
3976
+ if (!X(A) || !we()) {
3977
+ U(j, !1), U(M, !1);
3978
+ return;
3979
+ }
3980
+ U(j, e === "playing" || e === "paused", !0), U(M, e === "paused");
3981
+ }, t = (t) => {
3982
+ let n = String(t), r = ke();
3983
+ e(n), n === "playing" && (X(de) && U(N, X(D).t("tools.textToSpeech.inline.started"), !0), U(de, !1)), (n === "error" || n === "idle") && U(de, !1), r && !X(j) && queueMicrotask(je);
3984
+ };
3985
+ return X(k).onStateChange(xe, t), e(X(k).getState()), () => {
3986
+ X(k).offStateChange(xe, t);
3987
+ };
3988
+ }), fn(() => {
3989
+ if (!m) return;
3990
+ let e = (e) => {
3991
+ let { ownerId: t = null, previousOwnerId: n = null } = e.detail || {};
3992
+ n === be && t !== be && Ne(X(D).t("tools.textToSpeech.inline.switchedSection"));
3993
+ };
3994
+ return window.addEventListener(g, e), () => {
3995
+ window.removeEventListener(g, e);
3996
+ };
3997
+ }), fn(() => {
3998
+ if (!m) return;
3999
+ let e = () => {
4000
+ Ne(X(D).t("tools.textToSpeech.inline.switchedSection"), !0);
4001
+ };
4002
+ return window.addEventListener(n, e), () => {
4003
+ window.removeEventListener(n, e);
4004
+ };
4005
+ }), fn(() => () => {
4006
+ De(), qe();
4007
+ });
4008
+ async function Pe() {
4009
+ if (!X(k)) return !1;
4010
+ try {
4011
+ return await X(ne)?.toolkitCoordinator?.ensureTTSReady?.(), !0;
4012
+ } catch (e) {
4013
+ return console.error("[TTS Inline] Failed to initialize TTS:", e), !1;
4014
+ }
4015
+ }
4016
+ let Fe = "[data-pie-tts-speed-rate]", Ie = "[data-pie-tts-media]", R = "[data-pie-tts-seek]", Le = "[data-pie-tts-stop]";
4017
+ function Be(e) {
4018
+ return X(E) ? Array.from(X(E).querySelectorAll(e)).filter((e) => !e.disabled && window.getComputedStyle(e).display !== "none") : [];
4019
+ }
4020
+ function Ve(e, t) {
4021
+ let n = Be(e);
4022
+ if (!n.length) return;
4023
+ let r = n[(t + n.length) % n.length];
4024
+ if (r.focus(), e !== Fe) return;
4025
+ let i = Number(r.dataset.pieTtsSpeedRate), a = X(ve).find((e) => e.rate === i);
4026
+ a && et(a);
4027
+ }
4028
+ function He(e, t) {
4029
+ let n = Be(e);
4030
+ if (!n.length) return;
4031
+ let r = X(E)?.getRootNode(), i = r instanceof ShadowRoot ? r.activeElement : null, a = i ? n.indexOf(i) : -1;
4032
+ Ve(e, a === -1 ? 0 : a + t);
4033
+ }
4034
+ function Ue(e, t) {
4035
+ switch (t.key) {
4036
+ case "ArrowDown":
4037
+ case "ArrowRight":
4038
+ t.preventDefault(), He(e, 1);
4039
+ break;
4040
+ case "ArrowUp":
4041
+ case "ArrowLeft":
4042
+ t.preventDefault(), He(e, -1);
4043
+ break;
4044
+ case "Home":
4045
+ t.preventDefault(), Ve(e, 0);
4046
+ break;
4047
+ case "End": t.preventDefault(), Ve(e, -1);
4048
+ }
4049
+ }
4050
+ function We() {
4051
+ if (!X(oe)) return null;
4052
+ let e = X(oe);
4053
+ if (e.getAttribute?.("data-region") === "content") return e;
4054
+ let t = e.querySelector?.("[data-region='content']");
4055
+ return t instanceof Element ? t : e;
4056
+ }
4057
+ function Ge() {
4058
+ if (X(O)) return a({
4059
+ kind: X(O).kind,
4060
+ assessmentId: X(ne)?.assessmentId,
4061
+ sectionId: X(ne)?.sectionId,
4062
+ itemId: X(O).itemId,
4063
+ canonicalItemId: X(O).canonicalItemId || X(O).itemId
4064
+ });
4065
+ }
4066
+ function Ke(e) {
4067
+ return qe(), pe = X(k)?.setHighlightTargetResolverProvider?.(() => ({
4068
+ context: {
4069
+ scopeElement: X(ie)?.scopeElement || e || null,
4070
+ kind: X(O)?.kind,
4071
+ itemId: X(O)?.itemId,
4072
+ canonicalItemId: X(O)?.canonicalItemId,
4073
+ contentKind: X(O)?.contentKind,
4074
+ regionPolicy: X(O)?.regionPolicy
4075
+ },
4076
+ resolver: X(ie)?.ttsHighlightTargetResolver || null
4077
+ })) || null, pe;
4078
+ }
4079
+ function qe(e = pe) {
4080
+ e?.(), e === pe && (pe = null);
4081
+ }
4082
+ function z() {
4083
+ if (!we()) return !1;
4084
+ let e = String(X(k)?.getState?.() || "");
4085
+ return e === "playing" || e === "paused" || e === "loading";
4086
+ }
4087
+ function Je(e) {
4088
+ let t = L();
4089
+ Oe(X(D).t("tools.textToSpeech.inline.startFailed")), we() && De(), X(ae) && X(ae).clearTTS(), qe(e), t && queueMicrotask(() => {
4090
+ Me(!0);
4091
+ });
4092
+ }
4093
+ async function Ye() {
4094
+ if (!X(k)) return;
4095
+ let e = null, t = We();
4096
+ if (!t) {
4097
+ console.warn("[TTS Inline] No target container found from shell scope context");
4098
+ return;
4099
+ }
4100
+ try {
4101
+ U(A, !0);
4102
+ let n = t.textContent || "";
4103
+ if (!n) {
4104
+ console.warn("[TTS Inline] No text content found");
4105
+ return;
4106
+ }
4107
+ X(ae) && X(k).setHighlightCoordinator && X(k).setHighlightCoordinator(X(ae)), await I(X(k), X(ye)), he = {
4108
+ service: X(k),
4109
+ choicesKey: X(_e)
4110
+ }, e = Ke(t), X(k).setRootElement?.(t), U(de, !0), U(N, X(D).t("tools.textToSpeech.inline.starting"), !0), X(k).speak(n, {
4111
+ catalogId: c() || void 0,
4112
+ catalogContext: Ge(),
4113
+ language: l(),
4114
+ contentElement: t
4115
+ }).catch((t) => {
4116
+ console.error("[TTS Inline] Error:", t), Je(e);
4117
+ }).finally(() => {
4118
+ z() || qe(e);
4119
+ });
4120
+ } catch (t) {
4121
+ console.error("[TTS Inline] Error:", t), Je(e);
4122
+ }
4123
+ }
4124
+ async function Xe() {
4125
+ if (X(k) && !(X(me) || we() && String(X(k).getState?.() || "") === "loading")) {
4126
+ if (we() && X(M)) {
4127
+ X(k).resume(), U(N, X(D).t("tools.textToSpeech.inline.resumed"), !0);
4128
+ return;
4129
+ }
4130
+ if (we() && X(j) && !X(M)) {
4131
+ X(k).pause(), U(N, X(D).t("tools.textToSpeech.inline.pausedAnnouncement"), !0);
4132
+ return;
4133
+ }
4134
+ if (!X(ue)) {
4135
+ U(ue, !0);
4136
+ try {
4137
+ if (U(N, X(D).t("tools.textToSpeech.inline.initializing"), !0), !await Pe()) {
4138
+ U(N, X(D).t("tools.textToSpeech.inline.initFailed"), !0);
4139
+ return;
4140
+ }
4141
+ let e = String(X(k).getState?.() || "");
4142
+ (e === "playing" || e === "paused" || e === "loading") && !we() && X(k).stop(), Ee(), await Ye();
4143
+ } finally {
4144
+ U(ue, !1);
4145
+ }
4146
+ }
4147
+ }
4148
+ }
4149
+ function Ze() {
4150
+ if (!X(k)) return;
4151
+ let e = L();
4152
+ X(k).stop(), De(), Oe(X(D).t("tools.textToSpeech.inline.stopped")), X(ae) && X(ae).clearTTS(), qe(), e && queueMicrotask(() => {
4153
+ Me(!0);
4154
+ });
4155
+ }
4156
+ async function Qe() {
4157
+ if (!(!X(k) || !X(j))) try {
4158
+ await X(k).seekForward?.(1), U(N, X(D).t("tools.textToSpeech.inline.skippedForward"), !0);
4159
+ } catch (e) {
4160
+ console.error("[TTS Inline] Seek forward failed:", e), U(N, X(D).t("tools.textToSpeech.inline.skipForwardFailed"), !0);
4161
+ }
4162
+ }
4163
+ async function $e() {
4164
+ if (!(!X(k) || !X(j))) try {
4165
+ await X(k).seekBackward?.(1), U(N, X(D).t("tools.textToSpeech.inline.skippedBackward"), !0);
4166
+ } catch (e) {
4167
+ console.error("[TTS Inline] Seek backward failed:", e), U(N, X(D).t("tools.textToSpeech.inline.skipBackwardFailed"), !0);
4168
+ }
4169
+ }
4170
+ async function et(e) {
4171
+ let t = X(k);
4172
+ if (!t) return;
4173
+ if (X(ye) === e.rate) {
4174
+ U(N, X(D).t("tools.textToSpeech.inline.speedAnnounce", { label: e.label }), !0);
4175
+ return;
4176
+ }
4177
+ let n = X(ce), r = X(le);
4178
+ U(ce, e.rate, !0), U(le, X(_e), !0), U(N, X(D).t("tools.textToSpeech.inline.speedAnnounce", { label: e.label }), !0);
4179
+ let i = {
4180
+ service: t,
4181
+ choicesKey: X(_e)
4182
+ };
4183
+ he = i;
4184
+ try {
4185
+ await I(t, e.rate);
4186
+ } catch (e) {
4187
+ he === i && (he = null), console.error("[TTS Inline] Playback speed change failed:", e), U(ce, n, !0), U(le, r, !0), U(N, X(D).t("tools.textToSpeech.inline.speedChangeFailed"), !0);
4188
+ }
4189
+ }
4190
+ let tt = /* @__PURE__ */ B(() => u() === "sm" ? "pie-tool-tts-inline__trigger--sm" : u() === "lg" ? "pie-tool-tts-inline__trigger--lg" : "pie-tool-tts-inline__trigger--md"), nt = /* @__PURE__ */ B(() => p() === "reserved-row" || p() === "expanding-row"), rt = /* @__PURE__ */ B(() => p() === "floating-overlay"), it = /* @__PURE__ */ B(() => p() === "left-aligned"), at = /* @__PURE__ */ B(() => X(rt) || X(it)), ot = ka(Ea), st = "[data-pie-tool-overlay-boundary]", ct = /* @__PURE__ */ H(""), lt = /* @__PURE__ */ H(0);
4191
+ fn(() => {
4192
+ let e = X(k), t = X(_e), n = X(j) || X(M);
4193
+ if (!e || !n || !we() || he?.service === e && he.choicesKey === t) return;
4194
+ let r = {
4195
+ service: e,
4196
+ choicesKey: t
4197
+ };
4198
+ he = r;
4199
+ let i = !1;
4200
+ return queueMicrotask(() => {
4201
+ if (i || he !== r) return;
4202
+ let t = X(ye);
4203
+ I(e, t).catch((e) => {
4204
+ he === r && (he = null), console.error("[TTS Inline] External playback speed sync failed:", e);
4205
+ });
4206
+ }), () => {
4207
+ i = !0;
4208
+ };
4209
+ });
4210
+ function ut(e, t) {
4211
+ let n = e;
4212
+ for (; n;) {
4213
+ if (n.matches?.(t)) return n;
4214
+ n = n.parentElement ?? (n.getRootNode() instanceof ShadowRoot ? n.getRootNode().host : null);
4215
+ }
4216
+ return null;
4217
+ }
4218
+ function dt() {
4219
+ let e = X(T)?.getRootNode();
4220
+ return e instanceof ShadowRoot ? e.querySelector(".pie-tool-tts-inline__trigger") : null;
4221
+ }
4222
+ function ft(e) {
4223
+ let t = window.getComputedStyle(e), n = parseFloat(t.columnGap || t.gap) || 0, r = (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0) + (parseFloat(t.borderLeftWidth) || 0) + (parseFloat(t.borderRightWidth) || 0), i = Array.from(e.children).filter((e) => window.getComputedStyle(e).display !== "none");
4224
+ return i.length ? i.reduce((e, t) => e + t.offsetWidth, 0) + (i.length - 1) * n + r : 0;
4225
+ }
4226
+ function pt() {
4227
+ let e = dt();
4228
+ if (!e || !X(E)) return;
4229
+ let t = e.getBoundingClientRect(), n = ut(e, st)?.getBoundingClientRect().left ?? 0, r = Math.max(0, t.left - n - 16);
4230
+ if (!X(se)) {
4231
+ let e = ft(X(E));
4232
+ e > 0 && U(lt, e, !0);
4233
+ }
4234
+ U(se, X(lt) > 0 && r < X(lt), !0);
4235
+ let i = X(E).offsetHeight || t.height, a = X(se) ? t.top : t.top + t.height / 2 - i / 2, o = window.innerWidth - t.left + 8;
4236
+ U(ct, `top: ${a}px; right: ${o}px; left: auto; max-width: min(${r}px, var(--pie-tts-left-aligned-panel-width, ${r}px));`);
4237
+ }
4238
+ fn(() => {
4239
+ if (!X(it) || !X(A)) {
4240
+ U(ct, ""), U(se, !1), U(lt, 0);
4241
+ return;
4242
+ }
4243
+ if (typeof window > "u") return;
4244
+ let e = 0, t = () => {
4245
+ e ||= window.requestAnimationFrame(() => {
4246
+ e = 0, pt();
4247
+ });
4248
+ };
4249
+ pt(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0);
4250
+ let n = dt(), r = new ResizeObserver(t);
4251
+ n && r.observe(n), X(E) && r.observe(X(E));
4252
+ let i = n ? ut(n, st) : null;
4253
+ i && r.observe(i);
4254
+ let a = i?.querySelector("[data-pie-tool-overlay-protect]");
4255
+ return a && r.observe(a), () => {
4256
+ e && window.cancelAnimationFrame(e), window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0), r.disconnect();
4257
+ };
4258
+ });
4259
+ function mt() {
4260
+ if (!X(T)) return null;
4261
+ let e = X(T).getRootNode();
4262
+ return e instanceof ShadowRoot ? e.host : null;
4263
+ }
4264
+ fn(() => {
4265
+ let e = mt();
4266
+ if (!e) return;
4267
+ let t = X(A) === !0;
4268
+ e.setAttribute("data-active", t ? "true" : "false");
4269
+ let n = !1;
4270
+ return queueMicrotask(() => {
4271
+ n || e.dispatchEvent(new CustomEvent("pie-tool-active-change", {
4272
+ detail: { active: t },
4273
+ bubbles: !0,
4274
+ composed: !0
4275
+ }));
4276
+ }), () => {
4277
+ n = !0;
4278
+ };
4279
+ });
4280
+ var ht = {
4281
+ get catalogId() {
4282
+ return c();
4283
+ },
4284
+ set catalogId(e = "") {
4285
+ c(e), Ot();
4286
+ },
4287
+ get language() {
4288
+ return l();
4289
+ },
4290
+ set language(e = "en-US") {
4291
+ l(e), Ot();
4292
+ },
4293
+ get size() {
4294
+ return u();
4295
+ },
4296
+ set size(e = "md") {
4297
+ u(e), Ot();
4298
+ },
4299
+ get speedOptions() {
4300
+ return d();
4301
+ },
4302
+ set speedOptions(e = void 0) {
4303
+ d(e), Ot();
4304
+ },
4305
+ get showSingleSpeedOption() {
4306
+ return f();
4307
+ },
4308
+ set showSingleSpeedOption(e = !1) {
4309
+ f(e), Ot();
4310
+ },
4311
+ get layoutMode() {
4312
+ return p();
4313
+ },
4314
+ set layoutMode(e = "expanding-row") {
4315
+ p(e), Ot();
4316
+ }
4317
+ }, gt = gr(), _t = en(gt), V = (e) => {
4318
+ var t = eo();
4319
+ let n;
4320
+ {
4321
+ let e = (e) => {
4322
+ var t = Ya(), n = $t(t), r = (e) => {
4323
+ var t = qa();
4324
+ Xr(t, "type", "circle"), Xr(t, "size", "small"), Xr(t, "variant", "tertiary"), yn(() => Xr(t, "icon-name", X(j) && !X(M) ? "pause" : "play")), yn(() => Xr(t, "button-aria-label", X(D).t(X(j) && !X(M) ? "tools.textToSpeech.inline.pauseA11y" : X(M) ? "tools.textToSpeech.inline.resumeA11y" : "tools.textToSpeech.inline.playA11y"))), yn(() => Xr(t, "disabled", !X(k))), Rr(t, (e) => C?.(e)), Rr(t, (e, t) => w?.(e, t), () => ({
4325
+ "aria-expanded": X(A) ? "true" : "false",
4326
+ "aria-controls": X(A) ? Se : null,
4327
+ "aria-pressed": X(A) ? "true" : "false",
4328
+ "aria-busy": X(me) ? "true" : null
4329
+ })), yn(() => Wr(t, 1, `pie-tool-tts-inline__trigger ${X(tt) ?? ""}`, "svelte-18mzc0g")), sr("click", t, Xe), Z(e, t);
4330
+ }, i = (e) => {
4331
+ var t = Ja(), n = $t(t);
4332
+ Ae(t), Rr(t, (e) => te?.(e)), yn((e) => {
4333
+ Wr(t, 1, `pie-tool-tts-inline__control pie-tool-tts-inline__trigger pie-tool-tts-inline__trigger--plain ${X(tt) ?? ""}`, "svelte-18mzc0g"), Q(t, "aria-expanded", X(A) ? "true" : "false"), Q(t, "aria-controls", X(A) ? Se : void 0), Q(t, "aria-pressed", X(A) ? "true" : "false"), Q(t, "aria-label", e), Q(t, "aria-busy", X(me) ? "true" : void 0), t.disabled = !X(k), Wr(n, 1, `fa-solid ${X(j) && !X(M) ? "fa-pause" : "fa-play"} pie-tool-tts-inline__icon`, "svelte-18mzc0g");
4334
+ }, [() => X(D).t(X(j) && !X(M) ? "tools.textToSpeech.inline.pauseA11y" : X(M) ? "tools.textToSpeech.inline.resumeA11y" : "tools.textToSpeech.inline.playA11y")]), sr("click", t, Xe), Z(e, t);
4335
+ };
4336
+ Dr(n, (e) => {
4337
+ X(re) ? e(r) : e(i, -1);
4338
+ }), Ae(t), Z(e, t);
4339
+ }, n = (e) => {
4340
+ var t = gr(), n = en(t), r = (e) => {
4341
+ var t = Qa();
4342
+ let n;
4343
+ var r = $t(t), i = (e) => {
4344
+ var t = Za();
4345
+ let n;
4346
+ jr(t, 21, () => X(ve), (e) => e.rate, (e, t) => {
4347
+ var n = Xa(), r = $t(n), i = $t(r, !0);
4348
+ Ae(r), Ae(n), yn(() => {
4349
+ Q(n, "data-pie-tts-speed-rate", X(t).rate), Q(n, "tabindex", X(ye) === X(t).rate ? 0 : -1), Q(n, "aria-label", X(t).ariaLabel), Q(n, "aria-checked", X(ye) === X(t).rate), n.disabled = !X(k), Q(r, "data-label", X(t).label), yr(i, X(t).label);
4350
+ }), sr("click", n, () => et(X(t))), sr("keydown", n, (e) => Ue(Fe, e)), Z(e, n);
4351
+ }), Ae(t), yn((e) => {
4352
+ n = Wr(t, 1, "pie-tool-tts-inline__speed-group svelte-18mzc0g", null, n, { "pie-tool-tts-inline__speed-group--stacked": X(se) }), Q(t, "aria-label", e);
4353
+ }, [() => X(D).t("tools.textToSpeech.inline.playbackSpeedA11y")]), Z(e, t);
4354
+ };
4355
+ Dr(r, (e) => {
4356
+ X(ve).length > 0 && e(i);
4357
+ });
4358
+ var a = tn(r, 2), o = tn(a, 2), s = tn(o, 2);
4359
+ Ae(t), ti(t, (e) => U(E, e), () => X(E)), yn((e, r, i, c) => {
4360
+ Q(t, "id", Se), n = Wr(t, 1, "pie-tool-tts-inline__panel svelte-18mzc0g", null, n, {
4361
+ "pie-tool-tts-inline__panel--floating": X(rt),
4362
+ "pie-tool-tts-inline__panel--row": X(nt),
4363
+ "pie-tool-tts-inline__panel--left-aligned-inline": X(it),
4364
+ "pie-tool-tts-inline__panel--compact": X(it) && X(se)
4365
+ }), Kr(t, X(it) ? X(ct) : ""), Q(t, "aria-label", e), Q(a, "aria-label", r), a.disabled = !X(k) || !X(j), Q(o, "aria-label", i), o.disabled = !X(k) || !X(j), Q(s, "aria-label", c), s.disabled = !X(k);
4366
+ }, [
4367
+ () => X(D).t("tools.textToSpeech.inline.controlsA11y"),
4368
+ () => X(D).t("tools.textToSpeech.inline.rewindA11y"),
4369
+ () => X(D).t("tools.textToSpeech.inline.fastForwardA11y"),
4370
+ () => X(D).t("tools.textToSpeech.inline.stopA11y")
4371
+ ]), sr("click", a, $e), sr("keydown", a, (e) => Ue(Ie, e)), sr("click", o, Qe), sr("keydown", o, (e) => Ue(Ie, e)), sr("click", s, Ze), sr("keydown", s, (e) => Ue(Ie, e)), Z(e, t);
4372
+ };
4373
+ Dr(n, (e) => {
4374
+ X(A) && e(r);
4375
+ }), Z(e, t);
4376
+ };
4377
+ var r = $t(t), i = (t) => {
4378
+ var r = $a(), i = en(r);
4379
+ n(i);
4380
+ var a = tn(i, 2);
4381
+ e(a), Z(t, r);
4382
+ }, a = (t) => {
4383
+ var r = $a(), i = en(r);
4384
+ e(i);
4385
+ var a = tn(i, 2);
4386
+ n(a), Z(t, r);
4387
+ };
4388
+ Dr(r, (e) => {
4389
+ X(at) ? e(i) : e(a, -1);
4390
+ });
4391
+ var o = tn(r, 2), s = $t(o, !0);
4392
+ Ae(o), Ae(t), ti(t, (e) => U(T, e), () => X(T)), yn(() => yr(s, X(N)));
4393
+ }
4394
+ yn(() => {
4395
+ n = Wr(t, 1, "pie-tool-tts-inline svelte-18mzc0g", null, n, {
4396
+ "pie-tool-tts-inline--controls-row": X(nt),
4397
+ "pie-tool-tts-inline--floating": X(rt),
4398
+ "pie-tool-tts-inline--left-aligned": X(it)
4399
+ }), Kr(t, `--pie-tts-zoom-comp: ${ot.current};`);
4400
+ }), Z(e, t);
4401
+ };
4402
+ return Dr(_t, (e) => {
4403
+ m && e(V);
4404
+ }), Z(o, gt), ze(ht);
4405
+ }
4406
+ cr(["click", "keydown"]), customElements.define("pie-tool-tts-inline", ci(no, {
4407
+ catalogId: {
4408
+ attribute: "catalog-id",
4409
+ type: "String"
4410
+ },
4411
+ language: {
4412
+ attribute: "language",
4413
+ type: "String"
4414
+ },
4415
+ size: {
4416
+ attribute: "size",
4417
+ type: "String"
4418
+ },
4419
+ speedOptions: {
4420
+ attribute: "speed-options",
4421
+ type: "Array"
4422
+ },
4423
+ showSingleSpeedOption: {
4424
+ attribute: "show-single-speed-option",
4425
+ type: "Boolean"
4426
+ },
4427
+ layoutMode: {
4428
+ attribute: "layout-mode",
4429
+ type: "String"
4430
+ }
4431
+ }, [], [], { mode: "open" }));
4432
+ //#endregion
4433
+ export { no as default };
4434
+
4435
+ //# sourceMappingURL=tool-tts-inline-B71NTBbb.js.map