@pie-players/pie-tool-answer-eliminator 0.3.29 → 0.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
1
  import { t as u } from "./defineProperty-CyepwRr5.js";
2
2
  if (typeof window < "u") {
3
- var hr, pr;
4
- ((hr = (pr = window).__svelte ?? (pr.__svelte = {})).v ?? (hr.v = /* @__PURE__ */ new Set())).add("5");
3
+ var wr, Tr;
4
+ ((wr = (Tr = window).__svelte ?? (Tr.__svelte = {})).v ?? (wr.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
- var wt = {}, M = Symbol(), Ro = Symbol("filename");
7
- var Qi = Array.isArray, Ji = Array.prototype.indexOf, ze = Array.prototype.includes, Zi = Array.from, Tt = Object.keys, At = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, en = Object.prototype, tn = Array.prototype, rn = Object.getPrototypeOf, vr = Object.isExtensible, nn = () => {
6
+ var St = {}, M = Symbol(), Bo = Symbol("filename");
7
+ var rn = Array.isArray, nn = Array.prototype.indexOf, Ge = Array.prototype.includes, sn = Array.from, It = Object.keys, Et = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, on = Object.prototype, an = Array.prototype, ln = Object.getPrototypeOf, Ar = Object.isExtensible, cn = () => {
8
8
  };
9
- function sn(e) {
9
+ function un(e) {
10
10
  for (var t = 0; t < e.length; t++) e[t]();
11
11
  }
12
- function on() {
12
+ function dn() {
13
13
  var e, t;
14
14
  return {
15
15
  promise: new Promise((r, i) => {
@@ -19,71 +19,74 @@ function on() {
19
19
  reject: t
20
20
  };
21
21
  }
22
- var Mo = 1 << 24, ee = 1024, ce = 2048, Pe = 4096, jr = 8192, an = 16384, zr = 32768, mr = 1 << 25, Gr = 65536, Po = 1 << 17, xo = 1 << 18, st = 1 << 19, ln = 1 << 20, Ho = 1 << 25, ot = 65536, gr = 1 << 21, No = 1 << 22, Wr = 1 << 23, Je = Symbol("$state"), qr = Symbol("legacy props"), cn = Symbol("proxy path"), Jt = new class extends Error {
22
+ var jo = 1 << 24, re = 1024, le = 2048, He = 4096, Ur = 8192, fn = 16384, Yr = 32768, Sr = 1 << 25, Xr = 65536, Vo = 1 << 17, zo = 1 << 18, at = 1 << 19, hn = 1 << 20, lt = 65536, Ir = 1 << 21, Go = 1 << 22, Qr = 1 << 23, tt = Symbol("$state"), Jr = Symbol("legacy props"), pn = Symbol("proxy path"), nr = new class extends Error {
23
23
  constructor(...t) {
24
24
  super(...t), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
25
25
  }
26
- }(), Fo = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
27
- function un(e) {
26
+ }(), qo = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
27
+ function vn(e) {
28
28
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
29
29
  }
30
- function dn(e) {
30
+ function mn(e) {
31
31
  throw new Error("https://svelte.dev/e/effect_in_teardown");
32
32
  }
33
- function fn() {
33
+ function gn() {
34
34
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
35
35
  }
36
- function hn(e) {
36
+ function _n(e) {
37
37
  throw new Error("https://svelte.dev/e/effect_orphan");
38
38
  }
39
- function pn() {
39
+ function yn() {
40
40
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
41
41
  }
42
- function vn() {
42
+ function bn() {
43
43
  throw new Error("https://svelte.dev/e/hydration_failed");
44
44
  }
45
- function mn(e) {
45
+ function wn(e) {
46
46
  throw new Error("https://svelte.dev/e/props_invalid_value");
47
47
  }
48
- function gn() {
48
+ function Tn() {
49
49
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
50
50
  }
51
- function _n() {
51
+ function An() {
52
52
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
53
53
  }
54
- function yn() {
54
+ function Sn() {
55
55
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
56
56
  }
57
- function bn() {
57
+ function In() {
58
58
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
59
59
  }
60
- function Kr(e) {
60
+ function En() {
61
+ console.warn("https://svelte.dev/e/derived_inert");
62
+ }
63
+ function Zr(e) {
61
64
  console.warn("https://svelte.dev/e/hydration_mismatch");
62
65
  }
63
- function wn() {
66
+ function kn() {
64
67
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
65
68
  }
66
- var Y = !1;
67
- function ct(e) {
68
- Y = e;
69
+ var Z = !1;
70
+ function dt(e) {
71
+ Z = e;
69
72
  }
70
- var x;
71
- function tt(e) {
73
+ var N;
74
+ function nt(e) {
72
75
  if (e === null)
73
- throw Kr(), wt;
74
- return x = e;
76
+ throw Zr(), St;
77
+ return N = e;
75
78
  }
76
- function Ur() {
77
- return tt(/* @__PURE__ */ Ue(x));
79
+ function ei() {
80
+ return nt(/* @__PURE__ */ Xe(N));
78
81
  }
79
- function Tn(e = 1) {
80
- if (Y) {
81
- for (var t = e, r = x; t--; ) r = /* @__PURE__ */ Ue(r);
82
- x = r;
82
+ function Cn(e = 1) {
83
+ if (Z) {
84
+ for (var t = e, r = N; t--; ) r = /* @__PURE__ */ Xe(r);
85
+ N = r;
83
86
  }
84
87
  }
85
- function An(e = !0) {
86
- for (var t = 0, r = x; ; ) {
88
+ function $n(e = !0) {
89
+ for (var t = 0, r = N; ; ) {
87
90
  if (r.nodeType === 8) {
88
91
  var i = r.data;
89
92
  if (i === "]") {
@@ -91,83 +94,83 @@ function An(e = !0) {
91
94
  t -= 1;
92
95
  } else (i === "[" || i === "[!" || i[0] === "[" && !isNaN(Number(i.slice(1)))) && (t += 1);
93
96
  }
94
- var n = /* @__PURE__ */ Ue(r);
97
+ var n = /* @__PURE__ */ Xe(r);
95
98
  e && r.remove(), r = n;
96
99
  }
97
100
  }
98
- function Yr(e) {
101
+ function ti(e) {
99
102
  return e === this.v;
100
103
  }
101
- function Sn(e, t) {
104
+ function Ln(e, t) {
102
105
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
103
106
  }
104
- function Xr(e) {
105
- return !Sn(e, this.v);
107
+ function ri(e) {
108
+ return !Ln(e, this.v);
106
109
  }
107
- var Re = !1, at = !1;
108
- function _r(e, t) {
109
- return e.label = t, In(e.v, t), e;
110
+ var ye = !1, ct = !1;
111
+ function Er(e, t) {
112
+ return e.label = t, On(e.v, t), e;
110
113
  }
111
- function In(e, t) {
112
- return e?.[cn]?.(t), e;
114
+ function On(e, t) {
115
+ return e?.[pn]?.(t), e;
113
116
  }
114
- var O = null;
115
- function St(e) {
116
- O = e;
117
+ var L = null;
118
+ function kt(e) {
119
+ L = e;
117
120
  }
118
- function Qr(e, t = !1, r) {
119
- O = {
120
- p: O,
121
+ function ii(e, t = !1, r) {
122
+ L = {
123
+ p: L,
121
124
  i: !1,
122
125
  c: null,
123
126
  e: null,
124
127
  s: e,
125
128
  x: null,
126
- r: T,
127
- l: at && !t ? {
129
+ r: A,
130
+ l: ct && !t ? {
128
131
  s: null,
129
132
  u: null,
130
133
  $: []
131
134
  } : null
132
135
  };
133
136
  }
134
- function Jr(e) {
135
- var t = O, r = t.e;
137
+ function ni(e) {
138
+ var t = L, r = t.e;
136
139
  if (r !== null) {
137
140
  t.e = null;
138
- for (var i of r) Ii(i);
141
+ for (var i of r) Li(i);
139
142
  }
140
- return e !== void 0 && (t.x = e), t.i = !0, O = t.p, e ?? {};
143
+ return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
141
144
  }
142
- function $t() {
143
- return !at || O !== null && O.l === null;
145
+ function Rt() {
146
+ return !ct || L !== null && L.l === null;
144
147
  }
145
- var Ie = [];
146
- function Zr() {
147
- var e = Ie;
148
- Ie = [], sn(e);
148
+ var ke = [];
149
+ function si() {
150
+ var e = ke;
151
+ ke = [], un(e);
149
152
  }
150
- function Ge(e) {
151
- if (Ie.length === 0 && !Ze) {
152
- var t = Ie;
153
+ function We(e) {
154
+ if (ke.length === 0 && !rt) {
155
+ var t = ke;
153
156
  queueMicrotask(() => {
154
- t === Ie && Zr();
157
+ t === ke && si();
155
158
  });
156
159
  }
157
- Ie.push(e);
160
+ ke.push(e);
158
161
  }
159
- function En() {
160
- for (; Ie.length > 0; ) Zr();
162
+ function Rn() {
163
+ for (; ke.length > 0; ) si();
161
164
  }
162
- function ei(e) {
163
- var t = T;
165
+ function oi(e) {
166
+ var t = A;
164
167
  if (t === null)
165
- return w.f |= Wr, e;
168
+ return T.f |= Qr, e;
166
169
  if (!(t.f & 32768) && !(t.f & 4))
167
170
  throw e;
168
- Ve(e, t);
171
+ je(e, t);
169
172
  }
170
- function Ve(e, t) {
173
+ function je(e, t) {
171
174
  for (; t !== null; ) {
172
175
  if (t.f & 128) {
173
176
  if (!(t.f & 32768)) throw e;
@@ -182,194 +185,233 @@ function Ve(e, t) {
182
185
  }
183
186
  throw e;
184
187
  }
185
- var kn = ~(ce | Pe | ee);
186
- function R(e, t) {
187
- e.f = e.f & kn | t;
188
+ var Mn = ~(le | He | re);
189
+ function O(e, t) {
190
+ e.f = e.f & Mn | t;
188
191
  }
189
- function Zt(e) {
190
- e.f & 512 || e.deps === null ? R(e, ee) : R(e, Pe);
192
+ function sr(e) {
193
+ e.f & 512 || e.deps === null ? O(e, re) : O(e, He);
191
194
  }
192
- function ti(e) {
195
+ function ai(e) {
193
196
  if (e !== null)
194
197
  for (const t of e)
195
- !(t.f & 2) || !(t.f & 65536) || (t.f ^= ot, ti(t.deps));
198
+ !(t.f & 2) || !(t.f & 65536) || (t.f ^= lt, ai(t.deps));
196
199
  }
197
- function ri(e, t, r) {
198
- e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), ti(e.deps), R(e, ee);
200
+ function li(e, t, r) {
201
+ e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), ai(e.deps), O(e, re);
199
202
  }
200
- var Cn = !1, ut = !1;
201
- function $n(e) {
202
- var t = ut;
203
+ var Pn = !1, ft = !1;
204
+ function xn(e) {
205
+ var t = ft;
203
206
  try {
204
- return ut = !1, [e(), ut];
207
+ return ft = !1, [e(), ft];
205
208
  } finally {
206
- ut = t;
209
+ ft = t;
207
210
  }
208
211
  }
209
- function ii(e, t) {
212
+ function ci(e, t) {
210
213
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
211
214
  }
212
- function er(e, t) {
213
- ii(e, t), t.add(e);
215
+ function or(e, t) {
216
+ ci(e, t), t.add(e);
214
217
  }
215
- function A(e, t, r) {
216
- ii(e, t), t.set(e, r);
218
+ function w(e, t, r) {
219
+ ci(e, t), t.set(e, r);
217
220
  }
218
- function E(e, t, r) {
221
+ function S(e, t, r) {
219
222
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
220
223
  throw new TypeError("Private element is not present on this object");
221
224
  }
222
- function l(e, t) {
223
- return e.get(E(e, t));
225
+ function a(e, t) {
226
+ return e.get(S(e, t));
224
227
  }
225
228
  function b(e, t, r) {
226
- return e.set(E(e, t), r), r;
229
+ return e.set(S(e, t), r), r;
227
230
  }
228
- var ni, le = /* @__PURE__ */ new Set(), C = null, yr = null, F = null, jt = null, Ze = !1, Ht = !1, We = null, It = null, si = 0;
229
- var On = 1, Et = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakSet(), Ke = class oi {
231
+ var ui, se = /* @__PURE__ */ new Set(), I = null, kr = null, x = null, Gt = null, rt = !1, Ft = !1, qe = null, Ct = null, di = 0;
232
+ var Hn = 1, $t = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Ye = class fi {
230
233
  constructor() {
231
- er(this, re), u(this, "id", On++), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), A(this, Et, /* @__PURE__ */ new Set()), A(this, dt, /* @__PURE__ */ new Set()), A(this, Ne, 0), A(this, De, 0), A(this, mt, null), A(this, U, []), A(this, rt, /* @__PURE__ */ new Set()), A(this, Ce, /* @__PURE__ */ new Set()), A(this, Se, /* @__PURE__ */ new Map()), u(this, "is_fork", !1), A(this, ft, !1);
234
+ or(this, F), u(this, "id", Hn++), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), w(this, $t, /* @__PURE__ */ new Set()), w(this, ht, /* @__PURE__ */ new Set()), w(this, Je, /* @__PURE__ */ new Set()), w(this, Ie, /* @__PURE__ */ new Map()), w(this, ge, /* @__PURE__ */ new Map()), w(this, _t, null), w(this, Q, []), w(this, Wt, []), w(this, Ke, /* @__PURE__ */ new Set()), w(this, Le, /* @__PURE__ */ new Set()), w(this, _e, /* @__PURE__ */ new Map()), w(this, yt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), w(this, pt, !1), w(this, ze, /* @__PURE__ */ new Set());
232
235
  }
233
236
  skip_effect(t) {
234
- l(Se, this).has(t) || l(Se, this).set(t, {
237
+ a(_e, this).has(t) || a(_e, this).set(t, {
235
238
  d: [],
236
239
  m: []
237
- });
238
- }
239
- unskip_effect(t) {
240
- var r = l(Se, this).get(t);
241
- if (r) {
242
- l(Se, this).delete(t);
243
- for (var i of r.d)
244
- R(i, ce), this.schedule(i);
245
- for (i of r.m)
246
- R(i, Pe), this.schedule(i);
240
+ }), a(yt, this).delete(t);
241
+ }
242
+ unskip_effect(t, r = (i) => this.schedule(i)) {
243
+ var i = a(_e, this).get(t);
244
+ if (i) {
245
+ a(_e, this).delete(t);
246
+ for (var n of i.d)
247
+ O(n, le), r(n);
248
+ for (n of i.m)
249
+ O(n, He), r(n);
247
250
  }
251
+ a(yt, this).add(t);
248
252
  }
249
- capture(t, r) {
250
- r !== M && !this.previous.has(t) && this.previous.set(t, r), t.f & 8388608 || (this.current.set(t, t.v), F?.set(t, t.v));
253
+ capture(t, r, i = !1) {
254
+ t.v !== M && !this.previous.has(t) && this.previous.set(t, t.v), t.f & 8388608 || (this.current.set(t, [r, i]), x?.set(t, r)), this.is_fork || (t.v = r);
251
255
  }
252
256
  activate() {
253
- C = this;
257
+ I = this;
254
258
  }
255
259
  deactivate() {
256
- C = null, F = null;
260
+ I = null, x = null;
257
261
  }
258
262
  flush() {
259
263
  var t = null;
260
264
  try {
261
- Ht = !0, C = this, E(re, this, ai).call(this);
265
+ Ft = !0, I = this, S(F, this, ar).call(this);
262
266
  } finally {
263
- si = 0, jt = null, We = null, It = null, Ht = !1, C = null, F = null, me.clear();
267
+ di = 0, Gt = null, qe = null, Ct = null, Ft = !1, I = null, x = null, Me.clear();
264
268
  }
265
269
  }
266
270
  discard() {
267
- for (const t of l(dt, this)) t(this);
268
- l(dt, this).clear(), le.delete(this);
271
+ for (const t of a(ht, this)) t(this);
272
+ a(ht, this).clear(), a(Je, this).clear(), se.delete(this);
269
273
  }
270
- increment(t) {
271
- b(Ne, this, l(Ne, this) + 1), t && b(De, this, l(De, this) + 1);
274
+ register_created_effect(t) {
275
+ a(Wt, this).push(t);
272
276
  }
273
- decrement(t, r) {
274
- b(Ne, this, l(Ne, this) - 1), t && b(De, this, l(De, this) - 1), !(l(ft, this) || r) && (b(ft, this, !0), Ge(() => {
275
- b(ft, this, !1), this.flush();
277
+ increment(t, r) {
278
+ let i = a(Ie, this).get(r) ?? 0;
279
+ if (a(Ie, this).set(r, i + 1), t) {
280
+ let n = a(ge, this).get(r) ?? 0;
281
+ a(ge, this).set(r, n + 1);
282
+ }
283
+ }
284
+ decrement(t, r, i) {
285
+ let n = a(Ie, this).get(r) ?? 0;
286
+ if (n === 1 ? a(Ie, this).delete(r) : a(Ie, this).set(r, n - 1), t) {
287
+ let s = a(ge, this).get(r) ?? 0;
288
+ s === 1 ? a(ge, this).delete(r) : a(ge, this).set(r, s - 1);
289
+ }
290
+ a(pt, this) || i || (b(pt, this, !0), We(() => {
291
+ b(pt, this, !1), this.flush();
276
292
  }));
277
293
  }
278
294
  transfer_effects(t, r) {
279
- for (const i of t) l(rt, this).add(i);
280
- for (const i of r) l(Ce, this).add(i);
295
+ for (const i of t) a(Ke, this).add(i);
296
+ for (const i of r) a(Le, this).add(i);
281
297
  t.clear(), r.clear();
282
298
  }
283
299
  oncommit(t) {
284
- l(Et, this).add(t);
300
+ a($t, this).add(t);
285
301
  }
286
302
  ondiscard(t) {
287
- l(dt, this).add(t);
303
+ a(ht, this).add(t);
304
+ }
305
+ on_fork_commit(t) {
306
+ a(Je, this).add(t);
307
+ }
308
+ run_fork_commit_callbacks() {
309
+ for (const t of a(Je, this)) t(this);
310
+ a(Je, this).clear();
288
311
  }
289
312
  settled() {
290
- return (l(mt, this) ?? b(mt, this, on())).promise;
313
+ return (a(_t, this) ?? b(_t, this, dn())).promise;
291
314
  }
292
315
  static ensure() {
293
- if (C === null) {
294
- const t = C = new oi();
295
- Ht || (le.add(C), Ze || Ge(() => {
296
- C === t && t.flush();
316
+ if (I === null) {
317
+ const t = I = new fi();
318
+ Ft || (se.add(I), rt || We(() => {
319
+ I === t && t.flush();
297
320
  }));
298
321
  }
299
- return C;
322
+ return I;
300
323
  }
301
324
  apply() {
302
- if (!Re || !this.is_fork && le.size === 1) {
303
- F = null;
325
+ if (!ye || !this.is_fork && se.size === 1) {
326
+ x = null;
304
327
  return;
305
328
  }
306
- F = new Map(this.current);
307
- for (const t of le)
308
- if (!(t === this || t.is_fork))
309
- for (const [r, i] of t.previous) F.has(r) || F.set(r, i);
329
+ x = /* @__PURE__ */ new Map();
330
+ for (const [i, [n]] of this.current) x.set(i, n);
331
+ for (const i of se)
332
+ if (!(i === this || i.is_fork)) {
333
+ var t = !1, r = !1;
334
+ if (i.id < this.id) for (const [n, [, s]] of i.current)
335
+ s || (t || (t = this.current.has(n)), r || (r = !this.current.has(n)));
336
+ if (t && r) a(ze, this).add(i);
337
+ else for (const [n, s] of i.previous) x.has(n) || x.set(n, s);
338
+ }
310
339
  }
311
340
  schedule(t) {
312
- if (jt = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
341
+ if (Gt = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
313
342
  t.b.defer_effect(t);
314
343
  return;
315
344
  }
316
345
  for (var r = t; r.parent !== null; ) {
317
346
  r = r.parent;
318
347
  var i = r.f;
319
- if (We !== null && r === T && (Re || (w === null || !(w.f & 2)) && !Cn))
348
+ if (qe !== null && r === A && (ye || (T === null || !(T.f & 2)) && !Pn))
320
349
  return;
321
350
  if (i & 96) {
322
351
  if (!(i & 1024)) return;
323
- r.f ^= ee;
352
+ r.f ^= re;
324
353
  }
325
354
  }
326
- l(U, this).push(r);
355
+ a(Q, this).push(r);
327
356
  }
328
357
  };
329
- ni = Ke;
330
- function br() {
331
- return this.is_fork || l(De, this) > 0;
332
- }
333
- function ai() {
334
- if (si++ > 1e3 && (le.delete(this), Rn()), !E(re, this, br).call(this)) {
335
- for (const o of l(rt, this))
336
- l(Ce, this).delete(o), R(o, ce), this.schedule(o);
337
- for (const o of l(Ce, this))
338
- R(o, Pe), this.schedule(o);
339
- }
340
- const e = l(U, this);
341
- b(U, this, []), this.apply();
342
- var t = We = [], r = [], i = It = [];
358
+ ui = Ye;
359
+ function qt() {
360
+ return this.is_fork || a(ge, this).size > 0;
361
+ }
362
+ function Nn() {
363
+ for (const r of a(ze, this)) for (const i of a(ge, r).keys()) {
364
+ for (var e = !1, t = i; t.parent !== null; ) {
365
+ if (a(_e, this).has(t)) {
366
+ e = !0;
367
+ break;
368
+ }
369
+ t = t.parent;
370
+ }
371
+ if (!e) return !0;
372
+ }
373
+ return !1;
374
+ }
375
+ function ar() {
376
+ if (di++ > 1e3 && (se.delete(this), Fn()), !S(F, this, qt).call(this)) {
377
+ for (const o of a(Ke, this))
378
+ a(Le, this).delete(o), O(o, le), this.schedule(o);
379
+ for (const o of a(Le, this))
380
+ O(o, He), this.schedule(o);
381
+ }
382
+ const e = a(Q, this);
383
+ b(Q, this, []), this.apply();
384
+ var t = qe = [], r = [], i = Ct = [];
343
385
  for (const o of e) try {
344
- E(re, this, li).call(this, o, t, r);
345
- } catch (a) {
346
- throw fi(o), a;
386
+ S(F, this, hi).call(this, o, t, r);
387
+ } catch (l) {
388
+ throw mi(o), l;
347
389
  }
348
- if (C = null, i.length > 0) {
349
- var n = ni.ensure();
390
+ if (I = null, i.length > 0) {
391
+ var n = ui.ensure();
350
392
  for (const o of i) n.schedule(o);
351
393
  }
352
- if (We = null, It = null, E(re, this, br).call(this)) {
353
- E(re, this, wr).call(this, r), E(re, this, wr).call(this, t);
354
- for (const [o, a] of l(Se, this)) di(o, a);
394
+ if (qe = null, Ct = null, S(F, this, qt).call(this) || S(F, this, Nn).call(this)) {
395
+ S(F, this, Kt).call(this, r), S(F, this, Kt).call(this, t);
396
+ for (const [o, l] of a(_e, this)) vi(o, l);
355
397
  } else {
356
- l(Ne, this) === 0 && le.delete(this), l(rt, this).clear(), l(Ce, this).clear();
357
- for (const o of l(Et, this)) o(this);
358
- l(Et, this).clear(), yr = this, Tr(r), Tr(t), yr = null, l(mt, this)?.resolve();
398
+ a(Ie, this).size === 0 && se.delete(this), a(Ke, this).clear(), a(Le, this).clear();
399
+ for (const o of a($t, this)) o(this);
400
+ a($t, this).clear(), kr = this, Cr(r), Cr(t), kr = null, a(_t, this)?.resolve();
359
401
  }
360
- var s = C;
361
- if (l(U, this).length > 0) {
402
+ var s = I;
403
+ if (a(Q, this).length > 0) {
362
404
  const o = s ?? (s = this);
363
- l(U, o).push(...l(U, this).filter((a) => !l(U, o).includes(a)));
405
+ a(Q, o).push(...a(Q, this).filter((l) => !a(Q, o).includes(l)));
364
406
  }
365
- s !== null && (le.add(s), E(re, s, ai).call(s)), le.has(this) || E(re, this, Ln).call(this);
407
+ s !== null && (se.add(s), S(F, s, ar).call(s)), ye && !se.has(this) && S(F, this, Dn).call(this);
366
408
  }
367
- function li(e, t, r) {
368
- e.f ^= ee;
409
+ function hi(e, t, r) {
410
+ e.f ^= re;
369
411
  for (var i = e.first; i !== null; ) {
370
412
  var n = i.f, s = (n & 96) !== 0;
371
- if (!(s && n & 1024 || n & 8192 || l(Se, this).has(i)) && i.fn !== null) {
372
- s ? i.f ^= ee : n & 4 ? t.push(i) : Re && n & 16777224 ? r.push(i) : lt(i) && (n & 16 && l(Ce, this).add(i), qe(i));
413
+ if (!(s && n & 1024 || n & 8192 || a(_e, this).has(i)) && i.fn !== null) {
414
+ s ? i.f ^= re : n & 4 ? t.push(i) : ye && n & 16777224 ? r.push(i) : ut(i) && (n & 16 && a(Le, this).add(i), Ue(i));
373
415
  var o = i.first;
374
416
  if (o !== null) {
375
417
  i = o;
@@ -377,484 +419,493 @@ function li(e, t, r) {
377
419
  }
378
420
  }
379
421
  for (; i !== null; ) {
380
- var a = i.next;
381
- if (a !== null) {
382
- i = a;
422
+ var l = i.next;
423
+ if (l !== null) {
424
+ i = l;
383
425
  break;
384
426
  }
385
427
  i = i.parent;
386
428
  }
387
429
  }
388
430
  }
389
- function wr(e) {
390
- for (var t = 0; t < e.length; t += 1) ri(e[t], l(rt, this), l(Ce, this));
431
+ function Kt(e) {
432
+ for (var t = 0; t < e.length; t += 1) li(e[t], a(Ke, this), a(Le, this));
391
433
  }
392
- function Ln() {
393
- for (const a of le) {
394
- var e = a.id < this.id, t = [];
395
- for (const [c, p] of this.current) {
396
- if (a.current.has(c)) if (e && p !== a.current.get(c)) a.current.set(c, p);
397
- else continue;
398
- t.push(c);
434
+ function Dn() {
435
+ for (const d of se) {
436
+ var e = d.id < this.id, t = [];
437
+ for (const [f, [v, h]] of this.current) {
438
+ if (d.current.has(f)) {
439
+ var r = d.current.get(f)[0];
440
+ if (e && v !== r) d.current.set(f, [v, h]);
441
+ else continue;
442
+ }
443
+ t.push(f);
399
444
  }
400
- var r = [...a.current.keys()].filter((c) => !this.current.has(c));
401
- if (r.length === 0)
402
- e && a.discard();
445
+ var i = [...d.current.keys()].filter((f) => !this.current.has(f));
446
+ if (i.length === 0)
447
+ e && d.discard();
403
448
  else if (t.length > 0) {
404
- a.activate();
405
- var i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
406
- for (var s of t) ci(s, r, i, n);
407
- if (l(U, a).length > 0) {
408
- a.apply();
409
- for (var o of l(U, a)) E(re, a, li).call(a, o, [], []);
410
- b(U, a, []);
449
+ if (e) for (const f of a(yt, this)) d.unskip_effect(f, (v) => {
450
+ v.f & 4194320 ? d.schedule(v) : S(F, d, Kt).call(d, [v]);
451
+ });
452
+ d.activate();
453
+ var n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
454
+ for (var o of t) pi(o, i, n, s);
455
+ s = /* @__PURE__ */ new Map();
456
+ var l = [...d.current.keys()].filter((f) => this.current.has(f) ? this.current.get(f)[0] !== f : !0);
457
+ for (const f of a(Wt, this)) !(f.f & 155648) && lr(f, l, s) && (f.f & 4194320 ? (O(f, le), d.schedule(f)) : a(Ke, d).add(f));
458
+ if (a(Q, d).length > 0) {
459
+ d.apply();
460
+ for (var c of a(Q, d)) S(F, d, hi).call(d, c, [], []);
461
+ b(Q, d, []);
411
462
  }
412
- a.deactivate();
463
+ d.deactivate();
413
464
  }
414
465
  }
466
+ for (const d of se) a(ze, d).has(this) && (a(ze, d).delete(this), a(ze, d).size === 0 && !S(F, d, qt).call(d) && (d.activate(), S(F, d, ar).call(d)));
415
467
  }
416
- function se(e) {
417
- var t = Ze;
418
- Ze = !0;
468
+ function ue(e) {
469
+ var t = rt;
470
+ rt = !0;
419
471
  try {
420
472
  var r;
421
- for (e && (C !== null && !C.is_fork && C.flush(), r = e()); ; ) {
422
- if (En(), C === null) return r;
423
- C.flush();
473
+ for (e && (I !== null && !I.is_fork && I.flush(), r = e()); ; ) {
474
+ if (Rn(), I === null) return r;
475
+ I.flush();
424
476
  }
425
477
  } finally {
426
- Ze = t;
478
+ rt = t;
427
479
  }
428
480
  }
429
- function Rn() {
481
+ function Fn() {
430
482
  if (0) {
431
483
  var e;
432
- for (const r of C.current.keys()) for (const [i, n] of r.updated ?? [])
484
+ for (const r of I.current.keys()) for (const [i, n] of r.updated ?? [])
433
485
  var t;
434
486
  }
435
487
  try {
436
- pn();
488
+ yn();
437
489
  } catch (r) {
438
- Ve(r, jt);
490
+ je(r, Gt);
439
491
  }
440
492
  }
441
- var ae = null;
442
- function Tr(e) {
493
+ var de = null;
494
+ function Cr(e) {
443
495
  var t = e.length;
444
496
  if (t !== 0) {
445
497
  for (var r = 0; r < t; ) {
446
498
  var i = e[r++];
447
- if (!(i.f & 24576) && lt(i) && (ae = /* @__PURE__ */ new Set(), qe(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && ki(i), ae?.size > 0)) {
448
- me.clear();
449
- for (const n of ae) {
499
+ if (!(i.f & 24576) && ut(i) && (de = /* @__PURE__ */ new Set(), Ue(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Ri(i), de?.size > 0)) {
500
+ Me.clear();
501
+ for (const n of de) {
450
502
  if (n.f & 24576) continue;
451
503
  const s = [n];
452
504
  let o = n.parent;
453
505
  for (; o !== null; )
454
- ae.has(o) && (ae.delete(o), s.push(o)), o = o.parent;
455
- for (let a = s.length - 1; a >= 0; a--) {
456
- const c = s[a];
457
- c.f & 24576 || qe(c);
506
+ de.has(o) && (de.delete(o), s.push(o)), o = o.parent;
507
+ for (let l = s.length - 1; l >= 0; l--) {
508
+ const c = s[l];
509
+ c.f & 24576 || Ue(c);
458
510
  }
459
511
  }
460
- ae.clear();
512
+ de.clear();
461
513
  }
462
514
  }
463
- ae = null;
515
+ de = null;
464
516
  }
465
517
  }
466
- function ci(e, t, r, i) {
518
+ function pi(e, t, r, i) {
467
519
  if (!r.has(e) && (r.add(e), e.reactions !== null))
468
520
  for (const n of e.reactions) {
469
521
  const s = n.f;
470
- s & 2 ? ci(n, t, r, i) : s & 4194320 && !(s & 2048) && ui(n, t, i) && (R(n, ce), tr(n));
522
+ s & 2 ? pi(n, t, r, i) : s & 4194320 && !(s & 2048) && lr(n, t, i) && (O(n, le), cr(n));
471
523
  }
472
524
  }
473
- function ui(e, t, r) {
525
+ function lr(e, t, r) {
474
526
  const i = r.get(e);
475
527
  if (i !== void 0) return i;
476
528
  if (e.deps !== null) for (const n of e.deps) {
477
- if (ze.call(t, n)) return !0;
478
- if (n.f & 2 && ui(n, t, r))
529
+ if (Ge.call(t, n)) return !0;
530
+ if (n.f & 2 && lr(n, t, r))
479
531
  return r.set(n, !0), !0;
480
532
  }
481
533
  return r.set(e, !1), !1;
482
534
  }
483
- function tr(e) {
484
- C.schedule(e);
535
+ function cr(e) {
536
+ I.schedule(e);
485
537
  }
486
- function di(e, t) {
538
+ function vi(e, t) {
487
539
  if (!(e.f & 32 && e.f & 1024)) {
488
- e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), R(e, ee);
540
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), O(e, re);
489
541
  for (var r = e.first; r !== null; )
490
- di(r, t), r = r.next;
542
+ vi(r, t), r = r.next;
491
543
  }
492
544
  }
493
- function fi(e) {
494
- R(e, ee);
545
+ function mi(e) {
546
+ O(e, re);
495
547
  for (var t = e.first; t !== null; )
496
- fi(t), t = t.next;
548
+ mi(t), t = t.next;
497
549
  }
498
- function Mn(e) {
499
- let t = 0, r = Ot(0), i;
550
+ function Bn(e) {
551
+ let t = 0, r = Mt(0), i;
500
552
  return () => {
501
- sr() && (g(r), or(() => (t === 0 && (i = Rt(() => e(() => et(r)))), t += 1, () => {
502
- Ge(() => {
503
- t -= 1, t === 0 && (i?.(), i = void 0, et(r));
553
+ hr() && (g(r), pr(() => (t === 0 && (i = xt(() => e(() => it(r)))), t += 1, () => {
554
+ We(() => {
555
+ t -= 1, t === 0 && (i?.(), i = void 0, it(r));
504
556
  });
505
557
  })));
506
558
  };
507
559
  }
508
- var Pn = Gr | st;
509
- function xn(e, t, r, i) {
510
- new Hn(e, t, r, i);
560
+ var jn = Xr | at;
561
+ function Vn(e, t, r, i) {
562
+ new zn(e, t, r, i);
511
563
  }
512
- var X = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakSet(), Hn = class {
564
+ var ee = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakSet(), zn = class {
513
565
  constructor(e, t, r, i) {
514
- er(this, N), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), A(this, X, void 0), A(this, Nt, Y ? x : null), A(this, pe, void 0), A(this, it, void 0), A(this, z, void 0), A(this, ve, null), A(this, Q, null), A(this, oe, null), A(this, $e, null), A(this, Fe, 0), A(this, Oe, 0), A(this, ht, !1), A(this, zt, /* @__PURE__ */ new Set()), A(this, Gt, /* @__PURE__ */ new Set()), A(this, we, null), A(this, Ar, Mn(() => (b(we, this, Ot(l(Fe, this))), () => {
515
- b(we, this, null);
516
- }))), b(X, this, e), b(pe, this, t), b(it, this, (n) => {
517
- var s = T;
566
+ or(this, P), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), w(this, ee, void 0), w(this, Ut, Z ? N : null), w(this, ne, void 0), w(this, st, void 0), w(this, q, void 0), w(this, oe, null), w(this, z, null), w(this, X, null), w(this, Oe, null), w(this, Fe, 0), w(this, Re, 0), w(this, vt, !1), w(this, Yt, /* @__PURE__ */ new Set()), w(this, Xt, /* @__PURE__ */ new Set()), w(this, Ae, null), w(this, $r, Bn(() => (b(Ae, this, Mt(a(Fe, this))), () => {
567
+ b(Ae, this, null);
568
+ }))), b(ee, this, e), b(ne, this, t), b(st, this, (n) => {
569
+ var s = A;
518
570
  s.b = this, s.f |= 128, r(n);
519
- }), this.parent = T.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), b(z, this, ts(() => {
520
- if (Y) {
521
- const n = l(Nt, this);
522
- Ur();
571
+ }), this.parent = A.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), b(q, this, as(() => {
572
+ if (Z) {
573
+ const n = a(Ut, this);
574
+ ei();
523
575
  const s = n.data === "[!";
524
576
  if (n.data.startsWith("[?")) {
525
577
  const o = JSON.parse(n.data.slice(2));
526
- E(N, this, Dn).call(this, o);
527
- } else s ? E(N, this, Fn).call(this) : E(N, this, Nn).call(this);
528
- } else E(N, this, Sr).call(this);
529
- }, Pn)), Y && b(X, this, x);
578
+ S(P, this, Wn).call(this, o);
579
+ } else s ? S(P, this, qn).call(this) : S(P, this, Gn).call(this);
580
+ } else S(P, this, gi).call(this);
581
+ }, jn)), Z && b(ee, this, N);
530
582
  }
531
583
  defer_effect(e) {
532
- ri(e, l(zt, this), l(Gt, this));
584
+ li(e, a(Yt, this), a(Xt, this));
533
585
  }
534
586
  is_rendered() {
535
587
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
536
588
  }
537
589
  has_pending_snippet() {
538
- return !!l(pe, this).pending;
590
+ return !!a(ne, this).pending;
539
591
  }
540
592
  update_pending_count(e, t) {
541
- E(N, this, hi).call(this, e, t), b(Fe, this, l(Fe, this) + e), !(!l(we, this) || l(ht, this)) && (b(ht, this, !0), Ge(() => {
542
- b(ht, this, !1), l(we, this) && gi(l(we, this), l(Fe, this));
593
+ S(P, this, _i).call(this, e, t), b(Fe, this, a(Fe, this) + e), !(!a(Ae, this) || a(vt, this)) && (b(vt, this, !0), We(() => {
594
+ b(vt, this, !1), a(Ae, this) && Ti(a(Ae, this), a(Fe, this));
543
595
  }));
544
596
  }
545
597
  get_effect_pending() {
546
- return l(Ar, this).call(this), g(l(we, this));
598
+ return a($r, this).call(this), g(a(Ae, this));
547
599
  }
548
600
  error(e) {
549
- var t = l(pe, this).onerror;
550
- let r = l(pe, this).failed;
551
- if (!t && !r) throw e;
552
- l(ve, this) && (Z(l(ve, this)), b(ve, this, null)), l(Q, this) && (Z(l(Q, this)), b(Q, this, null)), l(oe, this) && (Z(l(oe, this)), b(oe, this, null)), Y && (tt(l(Nt, this)), Tn(), tt(An()));
553
- var i = !1, n = !1;
554
- const s = () => {
555
- if (i) {
556
- wn();
557
- return;
558
- }
559
- i = !0, n && bn(), l(oe, this) !== null && Lt(l(oe, this), () => {
560
- b(oe, this, null);
561
- }), E(N, this, Wt).call(this, () => {
562
- E(N, this, Sr).call(this);
563
- });
564
- }, o = (a) => {
565
- try {
566
- n = !0, t?.(a, s), n = !1;
567
- } catch (c) {
568
- Ve(c, l(z, this) && l(z, this).parent);
569
- }
570
- r && b(oe, this, E(N, this, Wt).call(this, () => {
571
- try {
572
- return Me(() => {
573
- var c = T;
574
- c.b = this, c.f |= 128, r(l(X, this), () => a, () => s);
575
- });
576
- } catch (c) {
577
- return Ve(c, l(z, this).parent), null;
578
- }
579
- }));
580
- };
581
- Ge(() => {
582
- var a;
583
- try {
584
- a = this.transform_error(e);
585
- } catch (c) {
586
- Ve(c, l(z, this) && l(z, this).parent);
587
- return;
588
- }
589
- a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(o, (c) => Ve(c, l(z, this) && l(z, this).parent)) : o(a);
590
- });
601
+ if (!a(ne, this).onerror && !a(ne, this).failed) throw e;
602
+ I?.is_fork ? (a(oe, this) && I.skip_effect(a(oe, this)), a(z, this) && I.skip_effect(a(z, this)), a(X, this) && I.skip_effect(a(X, this)), I.on_fork_commit(() => {
603
+ S(P, this, Lr).call(this, e);
604
+ })) : S(P, this, Lr).call(this, e);
591
605
  }
592
606
  };
593
- function Nn() {
607
+ function Gn() {
594
608
  try {
595
- b(ve, this, Me(() => l(it, this).call(this, l(X, this))));
609
+ b(oe, this, xe(() => a(st, this).call(this, a(ee, this))));
596
610
  } catch (e) {
597
611
  this.error(e);
598
612
  }
599
613
  }
600
- function Dn(e) {
601
- const t = l(pe, this).failed;
602
- t && b(oe, this, Me(() => {
603
- t(l(X, this), () => e, () => () => {
614
+ function Wn(e) {
615
+ const t = a(ne, this).failed;
616
+ t && b(X, this, xe(() => {
617
+ t(a(ee, this), () => e, () => () => {
604
618
  });
605
619
  }));
606
620
  }
607
- function Fn() {
608
- const e = l(pe, this).pending;
609
- e && (this.is_pending = !0, b(Q, this, Me(() => e(l(X, this)))), Ge(() => {
610
- var t = b($e, this, document.createDocumentFragment()), r = Ti();
611
- t.append(r), b(ve, this, E(N, this, Wt).call(this, () => Me(() => l(it, this).call(this, r)))), l(Oe, this) === 0 && (l(X, this).before(t), b($e, this, null), Lt(l(Q, this), () => {
612
- b(Q, this, null);
613
- }), E(N, this, rr).call(this, C));
621
+ function qn() {
622
+ const e = a(ne, this).pending;
623
+ e && (this.is_pending = !0, b(z, this, xe(() => e(a(ee, this)))), We(() => {
624
+ var t = b(Oe, this, document.createDocumentFragment()), r = ki();
625
+ t.append(r), b(oe, this, S(P, this, Qt).call(this, () => xe(() => a(st, this).call(this, r)))), a(Re, this) === 0 && (a(ee, this).before(t), b(Oe, this, null), Pt(a(z, this), () => {
626
+ b(z, this, null);
627
+ }), S(P, this, ur).call(this, I));
614
628
  }));
615
629
  }
616
- function Sr() {
630
+ function gi() {
617
631
  try {
618
- if (this.is_pending = this.has_pending_snippet(), b(Oe, this, 0), b(Fe, this, 0), b(ve, this, Me(() => {
619
- l(it, this).call(this, l(X, this));
620
- })), l(Oe, this) > 0) {
621
- var e = b($e, this, document.createDocumentFragment());
622
- ns(l(ve, this), e);
623
- const t = l(pe, this).pending;
624
- b(Q, this, Me(() => t(l(X, this))));
625
- } else E(N, this, rr).call(this, C);
632
+ if (this.is_pending = this.has_pending_snippet(), b(Re, this, 0), b(Fe, this, 0), b(oe, this, xe(() => {
633
+ a(st, this).call(this, a(ee, this));
634
+ })), a(Re, this) > 0) {
635
+ var e = b(Oe, this, document.createDocumentFragment());
636
+ us(a(oe, this), e);
637
+ const t = a(ne, this).pending;
638
+ b(z, this, xe(() => t(a(ee, this))));
639
+ } else S(P, this, ur).call(this, I);
626
640
  } catch (t) {
627
641
  this.error(t);
628
642
  }
629
643
  }
630
- function rr(e) {
631
- this.is_pending = !1, e.transfer_effects(l(zt, this), l(Gt, this));
644
+ function ur(e) {
645
+ this.is_pending = !1, e.transfer_effects(a(Yt, this), a(Xt, this));
632
646
  }
633
- function Wt(e) {
634
- var t = T, r = w, i = O;
635
- _e(l(z, this)), ie(l(z, this)), St(l(z, this).ctx);
647
+ function Qt(e) {
648
+ var t = A, r = T, i = L;
649
+ be(a(q, this)), ae(a(q, this)), kt(a(q, this).ctx);
636
650
  try {
637
- return Ke.ensure(), e();
651
+ return Ye.ensure(), e();
638
652
  } catch (n) {
639
- return ei(n), null;
653
+ return oi(n), null;
640
654
  } finally {
641
- _e(t), ie(r), St(i);
655
+ be(t), ae(r), kt(i);
642
656
  }
643
657
  }
644
- function hi(e, t) {
658
+ function _i(e, t) {
645
659
  if (!this.has_pending_snippet()) {
646
660
  if (this.parent) {
647
661
  var r;
648
- E(N, r = this.parent, hi).call(r, e, t);
662
+ S(P, r = this.parent, _i).call(r, e, t);
649
663
  }
650
664
  return;
651
665
  }
652
- b(Oe, this, l(Oe, this) + e), l(Oe, this) === 0 && (E(N, this, rr).call(this, t), l(Q, this) && Lt(l(Q, this), () => {
653
- b(Q, this, null);
654
- }), l($e, this) && (l(X, this).before(l($e, this)), b($e, this, null)));
666
+ b(Re, this, a(Re, this) + e), a(Re, this) === 0 && (S(P, this, ur).call(this, t), a(z, this) && Pt(a(z, this), () => {
667
+ b(z, this, null);
668
+ }), a(Oe, this) && (a(ee, this).before(a(Oe, this)), b(Oe, this, null)));
669
+ }
670
+ function Lr(e) {
671
+ a(oe, this) && (te(a(oe, this)), b(oe, this, null)), a(z, this) && (te(a(z, this)), b(z, this, null)), a(X, this) && (te(a(X, this)), b(X, this, null)), Z && (nt(a(Ut, this)), Cn(), nt($n()));
672
+ var t = a(ne, this).onerror;
673
+ let r = a(ne, this).failed;
674
+ var i = !1, n = !1;
675
+ const s = () => {
676
+ if (i) {
677
+ kn();
678
+ return;
679
+ }
680
+ i = !0, n && In(), a(X, this) !== null && Pt(a(X, this), () => {
681
+ b(X, this, null);
682
+ }), S(P, this, Qt).call(this, () => {
683
+ S(P, this, gi).call(this);
684
+ });
685
+ }, o = (l) => {
686
+ try {
687
+ n = !0, t?.(l, s), n = !1;
688
+ } catch (c) {
689
+ je(c, a(q, this) && a(q, this).parent);
690
+ }
691
+ r && b(X, this, S(P, this, Qt).call(this, () => {
692
+ try {
693
+ return xe(() => {
694
+ var c = A;
695
+ c.b = this, c.f |= 128, r(a(ee, this), () => l, () => s);
696
+ });
697
+ } catch (c) {
698
+ return je(c, a(q, this).parent), null;
699
+ }
700
+ }));
701
+ };
702
+ We(() => {
703
+ var l;
704
+ try {
705
+ l = this.transform_error(e);
706
+ } catch (c) {
707
+ je(c, a(q, this) && a(q, this).parent);
708
+ return;
709
+ }
710
+ l !== null && typeof l == "object" && typeof l.then == "function" ? l.then(o, (c) => je(c, a(q, this) && a(q, this).parent)) : o(l);
711
+ });
655
712
  }
656
713
  // @__NO_SIDE_EFFECTS__
657
- function ir(e) {
658
- var t = 2 | ce, r = w !== null && w.f & 2 ? w : null;
659
- return T !== null && (T.f |= st), {
660
- ctx: O,
714
+ function dr(e) {
715
+ var t = 2 | le;
716
+ return A !== null && (A.f |= at), {
717
+ ctx: L,
661
718
  deps: null,
662
719
  effects: null,
663
- equals: Yr,
720
+ equals: ti,
664
721
  f: t,
665
722
  fn: e,
666
723
  reactions: null,
667
724
  rv: 0,
668
725
  v: M,
669
726
  wv: 0,
670
- parent: r ?? T,
727
+ parent: A,
671
728
  ac: null
672
729
  };
673
730
  }
674
731
  // @__NO_SIDE_EFFECTS__
675
- function Ir(e) {
676
- const t = /* @__PURE__ */ ir(e);
677
- return Re || $i(t), t;
732
+ function Or(e) {
733
+ const t = /* @__PURE__ */ dr(e);
734
+ return ye || Pi(t), t;
678
735
  }
679
736
  // @__NO_SIDE_EFFECTS__
680
- function Bn(e) {
681
- const t = /* @__PURE__ */ ir(e);
682
- return t.equals = Xr, t;
737
+ function Kn(e) {
738
+ const t = /* @__PURE__ */ dr(e);
739
+ return t.equals = ri, t;
683
740
  }
684
- function Vn(e) {
741
+ function Un(e) {
685
742
  var t = e.effects;
686
743
  if (t !== null) {
687
744
  e.effects = null;
688
- for (var r = 0; r < t.length; r += 1) Z(t[r]);
689
- }
690
- }
691
- function jn(e) {
692
- for (var t = e.parent; t !== null; ) {
693
- if (!(t.f & 2)) return t.f & 16384 ? null : t;
694
- t = t.parent;
745
+ for (var r = 0; r < t.length; r += 1) te(t[r]);
695
746
  }
696
- return null;
697
747
  }
698
- function nr(e) {
699
- var t, r = T;
700
- if (_e(jn(e)), 0)
748
+ function fr(e) {
749
+ var t, r = A, i = e.parent;
750
+ if (!fe && i !== null && i.f & 24576)
751
+ return En(), e.v;
752
+ if (be(i), 0)
701
753
  try {
702
754
  } finally {
703
755
  }
704
756
  else try {
705
- e.f &= ~ot, Vn(e), t = Mi(e);
757
+ e.f &= ~lt, Un(e), t = Di(e);
706
758
  } finally {
707
- _e(r);
759
+ be(r);
708
760
  }
709
761
  return t;
710
762
  }
711
- function pi(e) {
712
- var t = e.v, r = nr(e);
713
- if (!e.equals(r) && (e.wv = Li(), (!C?.is_fork || e.deps === null) && (e.v = r, C?.capture(e, t), e.deps === null))) {
714
- R(e, ee);
763
+ function yi(e) {
764
+ var t = fr(e);
765
+ if (!e.equals(t) && (e.wv = Hi(), (!I?.is_fork || e.deps === null) && (I !== null ? I.capture(e, t, !0) : e.v = t, e.deps === null))) {
766
+ O(e, re);
715
767
  return;
716
768
  }
717
- ge || (F !== null ? (sr() || C?.is_fork) && F.set(e, r) : Zt(e));
769
+ fe || (x !== null ? (hr() || I?.is_fork) && x.set(e, t) : sr(e));
718
770
  }
719
- function zn(e) {
771
+ function Yn(e) {
720
772
  if (e.effects !== null)
721
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Jt), t.teardown = nn, t.ac = null, nt(t, 0), ar(t));
773
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(nr), t.teardown = cn, t.ac = null, ot(t, 0), vr(t));
722
774
  }
723
- function vi(e) {
775
+ function bi(e) {
724
776
  if (e.effects !== null)
725
- for (const t of e.effects) t.teardown && qe(t);
777
+ for (const t of e.effects) t.teardown && Ue(t);
726
778
  }
727
- var qt = /* @__PURE__ */ new Set(), me = /* @__PURE__ */ new Map();
728
- var mi = !1;
729
- function Ot(e, t) {
779
+ var Jt = /* @__PURE__ */ new Set(), Me = /* @__PURE__ */ new Map();
780
+ var wi = !1;
781
+ function Mt(e, t) {
730
782
  var r = {
731
783
  f: 0,
732
784
  v: e,
733
785
  reactions: null,
734
- equals: Yr,
786
+ equals: ti,
735
787
  rv: 0,
736
788
  wv: 0
737
789
  };
738
790
  return r;
739
791
  }
740
792
  // @__NO_SIDE_EFFECTS__
741
- function P(e, t) {
742
- const r = Ot(e, t);
743
- return $i(r), r;
793
+ function H(e, t) {
794
+ const r = Mt(e, t);
795
+ return Pi(r), r;
744
796
  }
745
797
  // @__NO_SIDE_EFFECTS__
746
- function Gn(e, t = !1, r = !0) {
747
- const i = Ot(e);
748
- if (t || (i.equals = Xr), at && r && O !== null && O.l !== null) {
798
+ function Xn(e, t = !1, r = !0) {
799
+ const i = Mt(e);
800
+ if (t || (i.equals = ri), ct && r && L !== null && L.l !== null) {
749
801
  var n;
750
- ((n = O.l).s ?? (n.s = [])).push(i);
802
+ ((n = L.l).s ?? (n.s = [])).push(i);
751
803
  }
752
804
  return i;
753
805
  }
754
806
  function $(e, t, r = !1) {
755
- w !== null && (!J || w.f & 131072) && $t() && w.f & 4325394 && (W === null || !ze.call(W, e)) && yn();
756
- let i = r ? je(t) : t;
757
- return gi(e, i, It);
807
+ T !== null && (!J || T.f & 131072) && Rt() && T.f & 4325394 && (K === null || !Ge.call(K, e)) && Sn();
808
+ let i = r ? Ve(t) : t;
809
+ return Ti(e, i, Ct);
758
810
  }
759
- function gi(e, t, r = null) {
811
+ function Ti(e, t, r = null) {
760
812
  if (!e.equals(t)) {
761
- var i = e.v;
762
- ge ? me.set(e, t) : me.set(e, i), e.v = t;
763
- var n = Ke.ensure();
764
- if (n.capture(e, i), e.f & 2) {
765
- const s = e;
766
- e.f & 2048 && nr(s), F === null && Zt(s);
813
+ Me.set(e, fe ? t : e.v);
814
+ var i = Ye.ensure();
815
+ if (i.capture(e, t), e.f & 2) {
816
+ const n = e;
817
+ e.f & 2048 && fr(n), x === null && sr(n);
767
818
  }
768
- e.wv = Li(), _i(e, ce, r), $t() && T !== null && T.f & 1024 && !(T.f & 96) && (G === null ? os([e]) : G.push(e)), !n.is_fork && qt.size > 0 && !mi && Wn();
819
+ e.wv = Hi(), Ai(e, le, r), Rt() && A !== null && A.f & 1024 && !(A.f & 96) && (W === null ? fs([e]) : W.push(e)), !i.is_fork && Jt.size > 0 && !wi && Qn();
769
820
  }
770
821
  return t;
771
822
  }
772
- function Wn() {
773
- mi = !1;
774
- for (const e of qt)
775
- e.f & 1024 && R(e, Pe), lt(e) && qe(e);
776
- qt.clear();
823
+ function Qn() {
824
+ wi = !1;
825
+ for (const e of Jt)
826
+ e.f & 1024 && O(e, He), ut(e) && Ue(e);
827
+ Jt.clear();
777
828
  }
778
- function et(e) {
829
+ function it(e) {
779
830
  $(e, e.v + 1);
780
831
  }
781
- function _i(e, t, r) {
832
+ function Ai(e, t, r) {
782
833
  var i = e.reactions;
783
834
  if (i !== null)
784
- for (var n = $t(), s = i.length, o = 0; o < s; o++) {
785
- var a = i[o], c = a.f;
786
- if (!(!n && a === T)) {
787
- var p = (c & ce) === 0;
788
- if (p && R(a, t), c & 2) {
789
- var f = a;
790
- F?.delete(f), c & 65536 || (c & 512 && (a.f |= ot), _i(f, Pe, r));
791
- } else if (p) {
792
- var m = a;
793
- c & 16 && ae !== null && ae.add(m), r !== null ? r.push(m) : tr(m);
835
+ for (var n = Rt(), s = i.length, o = 0; o < s; o++) {
836
+ var l = i[o], c = l.f;
837
+ if (!(!n && l === A)) {
838
+ var d = (c & le) === 0;
839
+ if (d && O(l, t), c & 2) {
840
+ var f = l;
841
+ x?.delete(f), c & 65536 || (c & 512 && (l.f |= lt), Ai(f, He, r));
842
+ } else if (d) {
843
+ var v = l;
844
+ c & 16 && de !== null && de.add(v), r !== null ? r.push(v) : cr(v);
794
845
  }
795
846
  }
796
847
  }
797
848
  }
798
- var qn = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
799
- function je(e) {
800
- if (typeof e != "object" || e === null || Je in e) return e;
801
- const t = rn(e);
802
- if (t !== en && t !== tn) return e;
803
- var r = /* @__PURE__ */ new Map(), i = Qi(e), n = /* @__PURE__ */ P(0), s = null, o = Le, a = (m) => {
804
- if (Le === o) return m();
805
- var h = w, v = Le;
806
- ie(null), Cr(o);
807
- var d = m();
808
- return ie(h), Cr(v), d;
849
+ var Jn = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
850
+ function Ve(e) {
851
+ if (typeof e != "object" || e === null || tt in e) return e;
852
+ const t = ln(e);
853
+ if (t !== on && t !== an) return e;
854
+ var r = /* @__PURE__ */ new Map(), i = rn(e), n = /* @__PURE__ */ H(0), s = null, o = Pe, l = (v) => {
855
+ if (Pe === o) return v();
856
+ var h = T, m = Pe;
857
+ ae(null), Pr(o);
858
+ var p = v();
859
+ return ae(h), Pr(m), p;
809
860
  };
810
- i && r.set("length", /* @__PURE__ */ P(e.length, s));
861
+ i && r.set("length", /* @__PURE__ */ H(e.length, s));
811
862
  var c = "";
812
- let p = !1;
813
- function f(m) {
814
- if (!p) {
815
- p = !0, c = m, _r(n, `${c} version`);
816
- for (const [h, v] of r) _r(v, Kn(c, h));
817
- p = !1;
863
+ let d = !1;
864
+ function f(v) {
865
+ if (!d) {
866
+ d = !0, c = v, Er(n, `${c} version`);
867
+ for (const [h, m] of r) Er(m, Zn(c, h));
868
+ d = !1;
818
869
  }
819
870
  }
820
871
  return new Proxy(e, {
821
- defineProperty(m, h, v) {
822
- (!("value" in v) || v.configurable === !1 || v.enumerable === !1 || v.writable === !1) && gn();
823
- var d = r.get(h);
824
- return d === void 0 ? a(() => {
825
- var y = /* @__PURE__ */ P(v.value, s);
872
+ defineProperty(v, h, m) {
873
+ (!("value" in m) || m.configurable === !1 || m.enumerable === !1 || m.writable === !1) && Tn();
874
+ var p = r.get(h);
875
+ return p === void 0 ? l(() => {
876
+ var y = /* @__PURE__ */ H(m.value, s);
826
877
  return r.set(h, y), y;
827
- }) : $(d, v.value, !0), !0;
878
+ }) : $(p, m.value, !0), !0;
828
879
  },
829
- deleteProperty(m, h) {
830
- var v = r.get(h);
831
- if (v === void 0) {
832
- if (h in m) {
833
- const d = a(() => /* @__PURE__ */ P(M, s));
834
- r.set(h, d), et(n);
880
+ deleteProperty(v, h) {
881
+ var m = r.get(h);
882
+ if (m === void 0) {
883
+ if (h in v) {
884
+ const p = l(() => /* @__PURE__ */ H(M, s));
885
+ r.set(h, p), it(n);
835
886
  }
836
887
  } else
837
- $(v, M), et(n);
888
+ $(m, M), it(n);
838
889
  return !0;
839
890
  },
840
- get(m, h, v) {
841
- if (h === Je) return e;
842
- var d = r.get(h), y = h in m;
843
- if (d === void 0 && (!y || ke(m, h)?.writable) && (d = a(() => {
844
- var S = /* @__PURE__ */ P(je(y ? m[h] : M), s);
845
- return S;
846
- }), r.set(h, d)), d !== void 0) {
847
- var _ = g(d);
891
+ get(v, h, m) {
892
+ if (h === tt) return e;
893
+ var p = r.get(h), y = h in v;
894
+ if (p === void 0 && (!y || $e(v, h)?.writable) && (p = l(() => {
895
+ var E = /* @__PURE__ */ H(Ve(y ? v[h] : M), s);
896
+ return E;
897
+ }), r.set(h, p)), p !== void 0) {
898
+ var _ = g(p);
848
899
  return _ === M ? void 0 : _;
849
900
  }
850
- return Reflect.get(m, h, v);
901
+ return Reflect.get(v, h, m);
851
902
  },
852
- getOwnPropertyDescriptor(m, h) {
853
- var v = Reflect.getOwnPropertyDescriptor(m, h);
854
- if (v && "value" in v) {
855
- var d = r.get(h);
856
- d && (v.value = g(d));
857
- } else if (v === void 0) {
903
+ getOwnPropertyDescriptor(v, h) {
904
+ var m = Reflect.getOwnPropertyDescriptor(v, h);
905
+ if (m && "value" in m) {
906
+ var p = r.get(h);
907
+ p && (m.value = g(p));
908
+ } else if (m === void 0) {
858
909
  var y = r.get(h), _ = y?.v;
859
910
  if (y !== void 0 && _ !== M) return {
860
911
  enumerable: !0,
@@ -863,106 +914,106 @@ function je(e) {
863
914
  writable: !0
864
915
  };
865
916
  }
866
- return v;
917
+ return m;
867
918
  },
868
- has(m, h) {
869
- if (h === Je) return !0;
870
- var v = r.get(h), d = v !== void 0 && v.v !== M || Reflect.has(m, h);
871
- return (v !== void 0 || T !== null && (!d || ke(m, h)?.writable)) && (v === void 0 && (v = a(() => {
872
- var y = /* @__PURE__ */ P(d ? je(m[h]) : M, s);
919
+ has(v, h) {
920
+ if (h === tt) return !0;
921
+ var m = r.get(h), p = m !== void 0 && m.v !== M || Reflect.has(v, h);
922
+ return (m !== void 0 || A !== null && (!p || $e(v, h)?.writable)) && (m === void 0 && (m = l(() => {
923
+ var y = /* @__PURE__ */ H(p ? Ve(v[h]) : M, s);
873
924
  return y;
874
- }), r.set(h, v)), g(v) === M) ? !1 : d;
925
+ }), r.set(h, m)), g(m) === M) ? !1 : p;
875
926
  },
876
- set(m, h, v, d) {
877
- var y = r.get(h), _ = h in m;
878
- if (i && h === "length") for (var S = v; S < y.v; S += 1) {
879
- var B = r.get(S + "");
880
- B !== void 0 ? $(B, M) : S in m && (B = a(() => /* @__PURE__ */ P(M, s)), r.set(S + "", B));
927
+ set(v, h, m, p) {
928
+ var y = r.get(h), _ = h in v;
929
+ if (i && h === "length") for (var E = m; E < y.v; E += 1) {
930
+ var j = r.get(E + "");
931
+ j !== void 0 ? $(j, M) : E in v && (j = l(() => /* @__PURE__ */ H(M, s)), r.set(E + "", j));
881
932
  }
882
933
  if (y === void 0)
883
- (!_ || ke(m, h)?.writable) && (y = a(() => /* @__PURE__ */ P(void 0, s)), $(y, je(v)), r.set(h, y));
934
+ (!_ || $e(v, h)?.writable) && (y = l(() => /* @__PURE__ */ H(void 0, s)), $(y, Ve(m)), r.set(h, y));
884
935
  else {
885
936
  _ = y.v !== M;
886
- var k = a(() => je(v));
887
- $(y, k);
937
+ var C = l(() => Ve(m));
938
+ $(y, C);
888
939
  }
889
- var q = Reflect.getOwnPropertyDescriptor(m, h);
890
- if (q?.set && q.set.call(d, v), !_) {
940
+ var U = Reflect.getOwnPropertyDescriptor(v, h);
941
+ if (U?.set && U.set.call(p, m), !_) {
891
942
  if (i && typeof h == "string") {
892
- var be = r.get("length"), Ye = Number(h);
893
- Number.isInteger(Ye) && Ye >= be.v && $(be, Ye + 1);
943
+ var Te = r.get("length"), Qe = Number(h);
944
+ Number.isInteger(Qe) && Qe >= Te.v && $(Te, Qe + 1);
894
945
  }
895
- et(n);
946
+ it(n);
896
947
  }
897
948
  return !0;
898
949
  },
899
- ownKeys(m) {
950
+ ownKeys(v) {
900
951
  g(n);
901
- var h = Reflect.ownKeys(m).filter((y) => {
952
+ var h = Reflect.ownKeys(v).filter((y) => {
902
953
  var _ = r.get(y);
903
954
  return _ === void 0 || _.v !== M;
904
955
  });
905
- for (var [v, d] of r) d.v !== M && !(v in m) && h.push(v);
956
+ for (var [m, p] of r) p.v !== M && !(m in v) && h.push(m);
906
957
  return h;
907
958
  },
908
959
  setPrototypeOf() {
909
- _n();
960
+ An();
910
961
  }
911
962
  });
912
963
  }
913
- function Kn(e, t) {
914
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : qn.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
964
+ function Zn(e, t) {
965
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Jn.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
915
966
  }
916
- var Er, Un, yi, bi, wi;
917
- function Kt() {
918
- if (Er === void 0) {
919
- Er = window, Un = document, yi = /Firefox/.test(navigator.userAgent);
967
+ var Rr, es, Si, Ii, Ei;
968
+ function Zt() {
969
+ if (Rr === void 0) {
970
+ Rr = window, es = document, Si = /Firefox/.test(navigator.userAgent);
920
971
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
921
- bi = ke(t, "firstChild").get, wi = ke(t, "nextSibling").get, vr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), vr(r) && (r.__t = void 0);
972
+ Ii = $e(t, "firstChild").get, Ei = $e(t, "nextSibling").get, Ar(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ar(r) && (r.__t = void 0);
922
973
  }
923
974
  }
924
- function Ti(e = "") {
975
+ function ki(e = "") {
925
976
  return document.createTextNode(e);
926
977
  }
927
978
  // @__NO_SIDE_EFFECTS__
928
- function Ut(e) {
929
- return bi.call(e);
979
+ function er(e) {
980
+ return Ii.call(e);
930
981
  }
931
982
  // @__NO_SIDE_EFFECTS__
932
- function Ue(e) {
933
- return wi.call(e);
983
+ function Xe(e) {
984
+ return Ei.call(e);
934
985
  }
935
- function Yn(e) {
986
+ function ts(e) {
936
987
  e.textContent = "";
937
988
  }
938
- function Ai(e, t, r) {
989
+ function Ci(e, t, r) {
939
990
  let i = r ? { is: r } : void 0;
940
991
  return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, i);
941
992
  }
942
- function Si(e) {
943
- var t = w, r = T;
944
- ie(null), _e(null);
993
+ function $i(e) {
994
+ var t = T, r = A;
995
+ ae(null), be(null);
945
996
  try {
946
997
  return e();
947
998
  } finally {
948
- ie(t), _e(r);
999
+ ae(t), be(r);
949
1000
  }
950
1001
  }
951
- function Xn(e) {
952
- T === null && (w === null && hn(e), fn()), ge && dn(e);
1002
+ function rs(e) {
1003
+ A === null && (T === null && _n(e), gn()), fe && mn(e);
953
1004
  }
954
- function Qn(e, t) {
1005
+ function is(e, t) {
955
1006
  var r = t.last;
956
1007
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
957
1008
  }
958
- function xe(e, t) {
959
- var r = T;
960
- r !== null && r.f & 8192 && (e |= jr);
1009
+ function Ne(e, t) {
1010
+ var r = A;
1011
+ r !== null && r.f & 8192 && (e |= Ur);
961
1012
  var i = {
962
- ctx: O,
1013
+ ctx: L,
963
1014
  deps: null,
964
1015
  nodes: null,
965
- f: e | ce | 512,
1016
+ f: e | le | 512,
966
1017
  first: null,
967
1018
  fn: t,
968
1019
  last: null,
@@ -973,307 +1024,313 @@ function xe(e, t) {
973
1024
  teardown: null,
974
1025
  wv: 0,
975
1026
  ac: null
976
- }, n = i;
977
- if (e & 4) We !== null ? We.push(i) : Ke.ensure().schedule(i);
1027
+ };
1028
+ I?.register_created_effect(i);
1029
+ var n = i;
1030
+ if (e & 4) qe !== null ? qe.push(i) : Ye.ensure().schedule(i);
978
1031
  else if (t !== null) {
979
1032
  try {
980
- qe(i);
1033
+ Ue(i);
981
1034
  } catch (o) {
982
- throw Z(i), o;
1035
+ throw te(i), o;
983
1036
  }
984
- n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= Gr));
1037
+ n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= Xr));
985
1038
  }
986
- if (n !== null && (n.parent = r, r !== null && Qn(n, r), w !== null && w.f & 2 && !(e & 64))) {
987
- var s = w;
1039
+ if (n !== null && (n.parent = r, r !== null && is(n, r), T !== null && T.f & 2 && !(e & 64))) {
1040
+ var s = T;
988
1041
  (s.effects ?? (s.effects = [])).push(n);
989
1042
  }
990
1043
  return i;
991
1044
  }
992
- function sr() {
993
- return w !== null && !J;
1045
+ function hr() {
1046
+ return T !== null && !J;
994
1047
  }
995
- function Ae(e) {
996
- Xn("$effect");
997
- var t = T.f;
998
- if (!w && t & 32 && !(t & 32768)) {
999
- var r = O;
1048
+ function Ee(e) {
1049
+ rs("$effect");
1050
+ var t = A.f;
1051
+ if (!T && t & 32 && !(t & 32768)) {
1052
+ var r = L;
1000
1053
  (r.e ?? (r.e = [])).push(e);
1001
- } else return Ii(e);
1054
+ } else return Li(e);
1002
1055
  }
1003
- function Ii(e) {
1004
- return xe(4 | ln, e);
1056
+ function Li(e) {
1057
+ return Ne(4 | hn, e);
1005
1058
  }
1006
- function Jn(e) {
1007
- Ke.ensure();
1008
- const t = xe(64 | st, e);
1059
+ function ns(e) {
1060
+ Ye.ensure();
1061
+ const t = Ne(64 | at, e);
1009
1062
  return () => {
1010
- Z(t);
1063
+ te(t);
1011
1064
  };
1012
1065
  }
1013
- function Zn(e) {
1014
- Ke.ensure();
1015
- const t = xe(64 | st, e);
1066
+ function ss(e) {
1067
+ Ye.ensure();
1068
+ const t = Ne(64 | at, e);
1016
1069
  return (r = {}) => new Promise((i) => {
1017
- r.outro ? Lt(t, () => {
1018
- Z(t), i(void 0);
1019
- }) : (Z(t), i(void 0));
1070
+ r.outro ? Pt(t, () => {
1071
+ te(t), i(void 0);
1072
+ }) : (te(t), i(void 0));
1020
1073
  });
1021
1074
  }
1022
- function es(e) {
1023
- return xe(4, e);
1075
+ function os(e) {
1076
+ return Ne(4, e);
1024
1077
  }
1025
- function or(e, t = 0) {
1026
- return xe(8 | t, e);
1078
+ function pr(e, t = 0) {
1079
+ return Ne(8 | t, e);
1027
1080
  }
1028
- function ts(e, t = 0) {
1029
- var r = xe(16 | t, e);
1081
+ function as(e, t = 0) {
1082
+ var r = Ne(16 | t, e);
1030
1083
  return r;
1031
1084
  }
1032
- function Me(e) {
1033
- return xe(32 | st, e);
1085
+ function xe(e) {
1086
+ return Ne(32 | at, e);
1034
1087
  }
1035
- function Ei(e) {
1088
+ function Oi(e) {
1036
1089
  var t = e.teardown;
1037
1090
  if (t !== null) {
1038
- const r = ge, i = w;
1039
- kr(!0), ie(null);
1091
+ const r = fe, i = T;
1092
+ Mr(!0), ae(null);
1040
1093
  try {
1041
1094
  t.call(null);
1042
1095
  } finally {
1043
- kr(r), ie(i);
1096
+ Mr(r), ae(i);
1044
1097
  }
1045
1098
  }
1046
1099
  }
1047
- function ar(e, t = !1) {
1100
+ function vr(e, t = !1) {
1048
1101
  var r = e.first;
1049
1102
  for (e.first = e.last = null; r !== null; ) {
1050
1103
  const n = r.ac;
1051
- n !== null && Si(() => {
1052
- n.abort(Jt);
1104
+ n !== null && $i(() => {
1105
+ n.abort(nr);
1053
1106
  });
1054
1107
  var i = r.next;
1055
- r.f & 64 ? r.parent = null : Z(r, t), r = i;
1108
+ r.f & 64 ? r.parent = null : te(r, t), r = i;
1056
1109
  }
1057
1110
  }
1058
- function rs(e) {
1111
+ function ls(e) {
1059
1112
  for (var t = e.first; t !== null; ) {
1060
1113
  var r = t.next;
1061
- t.f & 32 || Z(t), t = r;
1114
+ t.f & 32 || te(t), t = r;
1062
1115
  }
1063
1116
  }
1064
- function Z(e, t = !0) {
1117
+ function te(e, t = !0) {
1065
1118
  var r = !1;
1066
- (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (is(e.nodes.start, e.nodes.end), r = !0), R(e, mr), ar(e, t && !r), nt(e, 0);
1119
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (cs(e.nodes.start, e.nodes.end), r = !0), O(e, Sr), vr(e, t && !r), ot(e, 0);
1067
1120
  var i = e.nodes && e.nodes.t;
1068
1121
  if (i !== null) for (const s of i) s.stop();
1069
- Ei(e), e.f ^= mr, e.f |= an;
1122
+ Oi(e), e.f ^= Sr, e.f |= fn;
1070
1123
  var n = e.parent;
1071
- n !== null && n.first !== null && ki(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1124
+ n !== null && n.first !== null && Ri(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1072
1125
  }
1073
- function is(e, t) {
1126
+ function cs(e, t) {
1074
1127
  for (; e !== null; ) {
1075
- var r = e === t ? null : /* @__PURE__ */ Ue(e);
1128
+ var r = e === t ? null : /* @__PURE__ */ Xe(e);
1076
1129
  e.remove(), e = r;
1077
1130
  }
1078
1131
  }
1079
- function ki(e) {
1132
+ function Ri(e) {
1080
1133
  var t = e.parent, r = e.prev, i = e.next;
1081
1134
  r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
1082
1135
  }
1083
- function Lt(e, t, r = !0) {
1136
+ function Pt(e, t, r = !0) {
1084
1137
  var i = [];
1085
- Ci(e, i, !0);
1138
+ Mi(e, i, !0);
1086
1139
  var n = () => {
1087
- r && Z(e), t && t();
1140
+ r && te(e), t && t();
1088
1141
  }, s = i.length;
1089
1142
  if (s > 0) {
1090
1143
  var o = () => --s || n();
1091
- for (var a of i) a.out(o);
1144
+ for (var l of i) l.out(o);
1092
1145
  } else n();
1093
1146
  }
1094
- function Ci(e, t, r) {
1147
+ function Mi(e, t, r) {
1095
1148
  if (!(e.f & 8192)) {
1096
- e.f ^= jr;
1149
+ e.f ^= Ur;
1097
1150
  var i = e.nodes && e.nodes.t;
1098
1151
  if (i !== null)
1099
- for (const a of i) (a.is_global || r) && t.push(a);
1152
+ for (const l of i) (l.is_global || r) && t.push(l);
1100
1153
  for (var n = e.first; n !== null; ) {
1101
- var s = n.next, o = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1102
- Ci(n, t, o ? r : !1), n = s;
1154
+ var s = n.next;
1155
+ if (!(n.f & 64)) {
1156
+ var o = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1157
+ Mi(n, t, o ? r : !1);
1158
+ }
1159
+ n = s;
1103
1160
  }
1104
1161
  }
1105
1162
  }
1106
- function ns(e, t) {
1163
+ function us(e, t) {
1107
1164
  if (e.nodes)
1108
1165
  for (var r = e.nodes.start, i = e.nodes.end; r !== null; ) {
1109
- var n = r === i ? null : /* @__PURE__ */ Ue(r);
1166
+ var n = r === i ? null : /* @__PURE__ */ Xe(r);
1110
1167
  t.append(r), r = n;
1111
1168
  }
1112
1169
  }
1113
- var ss = null, gt = !1, ge = !1;
1114
- function kr(e) {
1115
- ge = e;
1170
+ var ds = null, bt = !1, fe = !1;
1171
+ function Mr(e) {
1172
+ fe = e;
1116
1173
  }
1117
- var w = null, J = !1;
1118
- function ie(e) {
1119
- w = e;
1120
- }
1121
- var T = null;
1122
- function _e(e) {
1174
+ var T = null, J = !1;
1175
+ function ae(e) {
1123
1176
  T = e;
1124
1177
  }
1125
- var W = null;
1126
- function $i(e) {
1127
- w !== null && (!Re || w.f & 2) && (W === null ? W = [e] : W.push(e));
1178
+ var A = null;
1179
+ function be(e) {
1180
+ A = e;
1128
1181
  }
1129
- var D = null, V = 0, G = null;
1130
- function os(e) {
1131
- G = e;
1182
+ var K = null;
1183
+ function Pi(e) {
1184
+ T !== null && (!ye || T.f & 2) && (K === null ? K = [e] : K.push(e));
1132
1185
  }
1133
- var Oi = 1, Ee = 0, Le = Ee;
1134
- function Cr(e) {
1135
- Le = e;
1186
+ var B = null, V = 0, W = null;
1187
+ function fs(e) {
1188
+ W = e;
1189
+ }
1190
+ var xi = 1, Ce = 0, Pe = Ce;
1191
+ function Pr(e) {
1192
+ Pe = e;
1136
1193
  }
1137
- function Li() {
1138
- return ++Oi;
1194
+ function Hi() {
1195
+ return ++xi;
1139
1196
  }
1140
- function lt(e) {
1197
+ function ut(e) {
1141
1198
  var t = e.f;
1142
1199
  if (t & 2048) return !0;
1143
- if (t & 2 && (e.f &= ~ot), t & 4096) {
1200
+ if (t & 2 && (e.f &= ~lt), t & 4096) {
1144
1201
  for (var r = e.deps, i = r.length, n = 0; n < i; n++) {
1145
1202
  var s = r[n];
1146
- if (lt(s) && pi(s), s.wv > e.wv) return !0;
1203
+ if (ut(s) && yi(s), s.wv > e.wv) return !0;
1147
1204
  }
1148
- t & 512 && F === null && R(e, ee);
1205
+ t & 512 && x === null && O(e, re);
1149
1206
  }
1150
1207
  return !1;
1151
1208
  }
1152
- function Ri(e, t, r = !0) {
1209
+ function Ni(e, t, r = !0) {
1153
1210
  var i = e.reactions;
1154
- if (i !== null && !(!Re && W !== null && ze.call(W, e)))
1211
+ if (i !== null && !(!ye && K !== null && Ge.call(K, e)))
1155
1212
  for (var n = 0; n < i.length; n++) {
1156
1213
  var s = i[n];
1157
- s.f & 2 ? Ri(s, t, !1) : t === s && (r ? R(s, ce) : s.f & 1024 && R(s, Pe), tr(s));
1214
+ s.f & 2 ? Ni(s, t, !1) : t === s && (r ? O(s, le) : s.f & 1024 && O(s, He), cr(s));
1158
1215
  }
1159
1216
  }
1160
- function Mi(e) {
1161
- var t = D, r = V, i = G, n = w, s = W, o = O, a = J, c = Le, p = e.f;
1162
- D = null, V = 0, G = null, w = p & 96 ? null : e, W = null, St(e.ctx), J = !1, Le = ++Ee, e.ac !== null && (Si(() => {
1163
- e.ac.abort(Jt);
1217
+ function Di(e) {
1218
+ var t = B, r = V, i = W, n = T, s = K, o = L, l = J, c = Pe, d = e.f;
1219
+ B = null, V = 0, W = null, T = d & 96 ? null : e, K = null, kt(e.ctx), J = !1, Pe = ++Ce, e.ac !== null && ($i(() => {
1220
+ e.ac.abort(nr);
1164
1221
  }), e.ac = null);
1165
1222
  try {
1166
- e.f |= gr;
1167
- var f = e.fn, m = f();
1168
- e.f |= zr;
1169
- var h = e.deps, v = C?.is_fork;
1170
- if (D !== null) {
1171
- var d;
1172
- if (v || nt(e, V), h !== null && V > 0)
1173
- for (h.length = V + D.length, d = 0; d < D.length; d++) h[V + d] = D[d];
1174
- else e.deps = h = D;
1175
- if (sr() && e.f & 512) for (d = V; d < h.length; d++) {
1223
+ e.f |= Ir;
1224
+ var f = e.fn, v = f();
1225
+ e.f |= Yr;
1226
+ var h = e.deps, m = I?.is_fork;
1227
+ if (B !== null) {
1228
+ var p;
1229
+ if (m || ot(e, V), h !== null && V > 0)
1230
+ for (h.length = V + B.length, p = 0; p < B.length; p++) h[V + p] = B[p];
1231
+ else e.deps = h = B;
1232
+ if (hr() && e.f & 512) for (p = V; p < h.length; p++) {
1176
1233
  var y;
1177
- ((y = h[d]).reactions ?? (y.reactions = [])).push(e);
1234
+ ((y = h[p]).reactions ?? (y.reactions = [])).push(e);
1178
1235
  }
1179
- } else !v && h !== null && V < h.length && (nt(e, V), h.length = V);
1180
- if ($t() && G !== null && !J && h !== null && !(e.f & 6146)) for (d = 0; d < G.length; d++) Ri(G[d], e);
1236
+ } else !m && h !== null && V < h.length && (ot(e, V), h.length = V);
1237
+ if (Rt() && W !== null && !J && h !== null && !(e.f & 6146)) for (p = 0; p < W.length; p++) Ni(W[p], e);
1181
1238
  if (n !== null && n !== e) {
1182
- if (Ee++, n.deps !== null) for (let _ = 0; _ < r; _ += 1) n.deps[_].rv = Ee;
1183
- if (t !== null) for (const _ of t) _.rv = Ee;
1184
- G !== null && (i === null ? i = G : i.push(...G));
1239
+ if (Ce++, n.deps !== null) for (let _ = 0; _ < r; _ += 1) n.deps[_].rv = Ce;
1240
+ if (t !== null) for (const _ of t) _.rv = Ce;
1241
+ W !== null && (i === null ? i = W : i.push(...W));
1185
1242
  }
1186
- return e.f & 8388608 && (e.f ^= Wr), m;
1243
+ return e.f & 8388608 && (e.f ^= Qr), v;
1187
1244
  } catch (_) {
1188
- return ei(_);
1245
+ return oi(_);
1189
1246
  } finally {
1190
- e.f ^= gr, D = t, V = r, G = i, w = n, W = s, St(o), J = a, Le = c;
1247
+ e.f ^= Ir, B = t, V = r, W = i, T = n, K = s, kt(o), J = l, Pe = c;
1191
1248
  }
1192
1249
  }
1193
- function as(e, t) {
1250
+ function hs(e, t) {
1194
1251
  let r = t.reactions;
1195
1252
  if (r !== null) {
1196
- var i = Ji.call(r, e);
1253
+ var i = nn.call(r, e);
1197
1254
  if (i !== -1) {
1198
1255
  var n = r.length - 1;
1199
1256
  n === 0 ? r = t.reactions = null : (r[i] = r[n], r.pop());
1200
1257
  }
1201
1258
  }
1202
- if (r === null && t.f & 2 && (D === null || !ze.call(D, t))) {
1259
+ if (r === null && t.f & 2 && (B === null || !Ge.call(B, t))) {
1203
1260
  var s = t;
1204
- s.f & 512 && (s.f ^= 512, s.f &= ~ot), Zt(s), zn(s), nt(s, 0);
1261
+ s.f & 512 && (s.f ^= 512, s.f &= ~lt), s.v !== M && sr(s), Yn(s), ot(s, 0);
1205
1262
  }
1206
1263
  }
1207
- function nt(e, t) {
1264
+ function ot(e, t) {
1208
1265
  var r = e.deps;
1209
1266
  if (r !== null)
1210
- for (var i = t; i < r.length; i++) as(e, r[i]);
1267
+ for (var i = t; i < r.length; i++) hs(e, r[i]);
1211
1268
  }
1212
- function qe(e) {
1269
+ function Ue(e) {
1213
1270
  var t = e.f;
1214
1271
  if (!(t & 16384)) {
1215
- R(e, ee);
1216
- var r = T, i = gt;
1217
- if (T = e, gt = !0, 0)
1272
+ O(e, re);
1273
+ var r = A, i = bt;
1274
+ if (A = e, bt = !0, 0)
1218
1275
  var n, s;
1219
1276
  try {
1220
- t & 16777232 ? rs(e) : ar(e), Ei(e);
1221
- var o = Mi(e);
1222
- if (e.teardown = typeof o == "function" ? o : null, e.wv = Oi, 0)
1223
- for (var a of e.deps) ;
1277
+ t & 16777232 ? ls(e) : vr(e), Oi(e);
1278
+ var o = Di(e);
1279
+ if (e.teardown = typeof o == "function" ? o : null, e.wv = xi, 0)
1280
+ for (var l of e.deps) ;
1224
1281
  } finally {
1225
- gt = i, T = r;
1282
+ bt = i, A = r;
1226
1283
  }
1227
1284
  }
1228
1285
  }
1229
1286
  function g(e) {
1230
1287
  var t = (e.f & 2) !== 0;
1231
- if (ss?.add(e), w !== null && !J && !(T !== null && T.f & 16384) && (W === null || !ze.call(W, e))) {
1232
- var r = w.deps;
1233
- if (w.f & 2097152)
1234
- e.rv < Ee && (e.rv = Ee, D === null && r !== null && r[V] === e ? V++ : D === null ? D = [e] : D.push(e));
1288
+ if (ds?.add(e), T !== null && !J && !(A !== null && A.f & 16384) && (K === null || !Ge.call(K, e))) {
1289
+ var r = T.deps;
1290
+ if (T.f & 2097152)
1291
+ e.rv < Ce && (e.rv = Ce, B === null && r !== null && r[V] === e ? V++ : B === null ? B = [e] : B.push(e));
1235
1292
  else {
1236
1293
  var i;
1237
- ((i = w).deps ?? (i.deps = [])).push(e);
1294
+ ((i = T).deps ?? (i.deps = [])).push(e);
1238
1295
  var n = e.reactions;
1239
- n === null ? e.reactions = [w] : ze.call(n, w) || n.push(w);
1296
+ n === null ? e.reactions = [T] : Ge.call(n, T) || n.push(T);
1240
1297
  }
1241
1298
  }
1242
1299
  if (0) {
1243
- if (!J && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152))
1300
+ if (!J && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152) && !reactivity_loss_tracker.effect_deps.has(e))
1244
1301
  var s;
1245
- if (tracing_mode_flag && !J && tracing_expressions !== null && w !== null && tracing_expressions.reaction === w && !e.trace) {
1302
+ if (tracing_mode_flag && !J && tracing_expressions !== null && T !== null && tracing_expressions.reaction === T && !e.trace) {
1246
1303
  if (s)
1247
- var o, a;
1304
+ var o, l;
1248
1305
  }
1249
1306
  }
1250
- if (ge && me.has(e)) return me.get(e);
1307
+ if (fe && Me.has(e)) return Me.get(e);
1251
1308
  if (t) {
1252
1309
  var c = e;
1253
- if (ge) {
1254
- var p = c.v;
1255
- return (!(c.f & 1024) && c.reactions !== null || xi(c)) && (p = nr(c)), me.set(c, p), p;
1310
+ if (fe) {
1311
+ var d = c.v;
1312
+ return (!(c.f & 1024) && c.reactions !== null || Bi(c)) && (d = fr(c)), Me.set(c, d), d;
1256
1313
  }
1257
- var f = (c.f & 512) === 0 && !J && w !== null && (gt || (w.f & 512) !== 0), m = (c.f & zr) === 0;
1258
- lt(c) && (f && (c.f |= 512), pi(c)), f && !m && (vi(c), Pi(c));
1314
+ var f = (c.f & 512) === 0 && !J && T !== null && (bt || (T.f & 512) !== 0), v = (c.f & Yr) === 0;
1315
+ ut(c) && (f && (c.f |= 512), yi(c)), f && !v && (bi(c), Fi(c));
1259
1316
  }
1260
- if (F?.has(e)) return F.get(e);
1317
+ if (x?.has(e)) return x.get(e);
1261
1318
  if (e.f & 8388608) throw e.v;
1262
1319
  return e.v;
1263
1320
  }
1264
- function Pi(e) {
1321
+ function Fi(e) {
1265
1322
  if (e.f |= 512, e.deps !== null)
1266
1323
  for (const t of e.deps)
1267
- (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (vi(t), Pi(t));
1324
+ (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (bi(t), Fi(t));
1268
1325
  }
1269
- function xi(e) {
1326
+ function Bi(e) {
1270
1327
  if (e.v === M) return !0;
1271
1328
  if (e.deps === null) return !1;
1272
1329
  for (const t of e.deps)
1273
- if (me.has(t) || t.f & 2 && xi(t)) return !0;
1330
+ if (Me.has(t) || t.f & 2 && Bi(t)) return !0;
1274
1331
  return !1;
1275
1332
  }
1276
- function Rt(e) {
1333
+ function xt(e) {
1277
1334
  var t = J;
1278
1335
  try {
1279
1336
  return J = !0, e();
@@ -1281,63 +1338,63 @@ function Rt(e) {
1281
1338
  J = t;
1282
1339
  }
1283
1340
  }
1284
- var pt = Symbol("events"), ls = /* @__PURE__ */ new Set(), $r = /* @__PURE__ */ new Set(), Or = null;
1285
- function Lr(e) {
1341
+ var mt = Symbol("events"), ps = /* @__PURE__ */ new Set(), xr = /* @__PURE__ */ new Set(), Hr = null;
1342
+ function Nr(e) {
1286
1343
  var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [], s = n[0] || e.target;
1287
- Or = e;
1288
- var o = 0, a = Or === e && e[pt];
1289
- if (a) {
1290
- var c = n.indexOf(a);
1344
+ Hr = e;
1345
+ var o = 0, l = Hr === e && e[mt];
1346
+ if (l) {
1347
+ var c = n.indexOf(l);
1291
1348
  if (c !== -1 && (t === document || t === window)) {
1292
- e[pt] = t;
1349
+ e[mt] = t;
1293
1350
  return;
1294
1351
  }
1295
- var p = n.indexOf(t);
1296
- if (p === -1) return;
1297
- c <= p && (o = c);
1352
+ var d = n.indexOf(t);
1353
+ if (d === -1) return;
1354
+ c <= d && (o = c);
1298
1355
  }
1299
1356
  if (s = n[o] || e.target, s !== t) {
1300
- At(e, "currentTarget", {
1357
+ Et(e, "currentTarget", {
1301
1358
  configurable: !0,
1302
1359
  get() {
1303
1360
  return s || r;
1304
1361
  }
1305
1362
  });
1306
- var f = w, m = T;
1307
- ie(null), _e(null);
1363
+ var f = T, v = A;
1364
+ ae(null), be(null);
1308
1365
  try {
1309
- for (var h, v = []; s !== null; ) {
1310
- var d = s.assignedSlot || s.parentNode || s.host || null;
1366
+ for (var h, m = []; s !== null; ) {
1367
+ var p = s.assignedSlot || s.parentNode || s.host || null;
1311
1368
  try {
1312
- var y = s[pt]?.[i];
1369
+ var y = s[mt]?.[i];
1313
1370
  y != null && (!s.disabled || e.target === s) && y.call(s, e);
1314
1371
  } catch (_) {
1315
- h ? v.push(_) : h = _;
1372
+ h ? m.push(_) : h = _;
1316
1373
  }
1317
- if (e.cancelBubble || d === t || d === null) break;
1318
- s = d;
1374
+ if (e.cancelBubble || p === t || p === null) break;
1375
+ s = p;
1319
1376
  }
1320
1377
  if (h) {
1321
- for (let _ of v) queueMicrotask(() => {
1378
+ for (let _ of m) queueMicrotask(() => {
1322
1379
  throw _;
1323
1380
  });
1324
1381
  throw h;
1325
1382
  }
1326
1383
  } finally {
1327
- e[pt] = t, delete e.currentTarget, ie(f), _e(m);
1384
+ e[mt] = t, delete e.currentTarget, ae(f), be(v);
1328
1385
  }
1329
1386
  }
1330
1387
  }
1331
- var cs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1332
- function us(e) {
1333
- return cs?.createHTML(e) ?? e;
1388
+ var vs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1389
+ function ms(e) {
1390
+ return vs?.createHTML(e) ?? e;
1334
1391
  }
1335
- function ds(e) {
1336
- var t = Ai("template");
1337
- return t.innerHTML = us(e.replaceAll("<!>", "<!---->")), t.content;
1392
+ function gs(e) {
1393
+ var t = Ci("template");
1394
+ return t.innerHTML = ms(e.replaceAll("<!>", "<!---->")), t.content;
1338
1395
  }
1339
- function _t(e, t) {
1340
- var r = T;
1396
+ function wt(e, t) {
1397
+ var r = A;
1341
1398
  r.nodes === null && (r.nodes = {
1342
1399
  start: e,
1343
1400
  end: t,
@@ -1346,29 +1403,29 @@ function _t(e, t) {
1346
1403
  });
1347
1404
  }
1348
1405
  // @__NO_SIDE_EFFECTS__
1349
- function fs(e, t) {
1406
+ function _s(e, t) {
1350
1407
  var r = (t & 1) !== 0, i = (t & 2) !== 0, n, s = !e.startsWith("<!>");
1351
1408
  return () => {
1352
- if (Y)
1353
- return _t(x, null), x;
1354
- n === void 0 && (n = ds(s ? e : "<!>" + e), r || (n = /* @__PURE__ */ Ut(n)));
1355
- var o = i || yi ? document.importNode(n, !0) : n.cloneNode(!0);
1409
+ if (Z)
1410
+ return wt(N, null), N;
1411
+ n === void 0 && (n = gs(s ? e : "<!>" + e), r || (n = /* @__PURE__ */ er(n)));
1412
+ var o = i || Si ? document.importNode(n, !0) : n.cloneNode(!0);
1356
1413
  if (r) {
1357
- var a = /* @__PURE__ */ Ut(o), c = o.lastChild;
1358
- _t(a, c);
1359
- } else _t(o, o);
1414
+ var l = /* @__PURE__ */ er(o), c = o.lastChild;
1415
+ wt(l, c);
1416
+ } else wt(o, o);
1360
1417
  return o;
1361
1418
  };
1362
1419
  }
1363
- function Hi(e, t) {
1364
- if (Y) {
1365
- var r = T;
1366
- (!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = x), Ur();
1420
+ function ji(e, t) {
1421
+ if (Z) {
1422
+ var r = A;
1423
+ (!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = N), ei();
1367
1424
  return;
1368
1425
  }
1369
1426
  e !== null && e.before(t);
1370
1427
  }
1371
- var hs = [
1428
+ var ys = [
1372
1429
  "allowfullscreen",
1373
1430
  "async",
1374
1431
  "autofocus",
@@ -1397,8 +1454,8 @@ var hs = [
1397
1454
  "defer",
1398
1455
  "disablepictureinpicture",
1399
1456
  "disableremoteplayback"
1400
- ], Bo = [
1401
- ...hs,
1457
+ ], Ko = [
1458
+ ...ys,
1402
1459
  "formNoValidate",
1403
1460
  "isMap",
1404
1461
  "noModule",
@@ -1413,17 +1470,17 @@ var hs = [
1413
1470
  "allowFullscreen",
1414
1471
  "disablePictureInPicture",
1415
1472
  "disableRemotePlayback"
1416
- ], ps = ["touchstart", "touchmove"];
1417
- function vs(e) {
1418
- return ps.includes(e);
1473
+ ], bs = ["touchstart", "touchmove"];
1474
+ function ws(e) {
1475
+ return bs.includes(e);
1419
1476
  }
1420
- var ms = [
1477
+ var Ts = [
1421
1478
  "$state",
1422
1479
  "$state.raw",
1423
1480
  "$derived",
1424
1481
  "$derived.by"
1425
- ], Vo = [
1426
- ...ms,
1482
+ ], Uo = [
1483
+ ...Ts,
1427
1484
  "$state.eager",
1428
1485
  "$state.snapshot",
1429
1486
  "$props",
@@ -1438,80 +1495,80 @@ var ms = [
1438
1495
  "$inspect().with",
1439
1496
  "$inspect.trace",
1440
1497
  "$host"
1441
- ], Rr = !0;
1442
- function Ni(e, t) {
1443
- return Di(e, t);
1498
+ ], Dr = !0;
1499
+ function Vi(e, t) {
1500
+ return zi(e, t);
1444
1501
  }
1445
- function gs(e, t) {
1446
- Kt(), t.intro = t.intro ?? !1;
1447
- const r = t.target, i = Y, n = x;
1502
+ function As(e, t) {
1503
+ Zt(), t.intro = t.intro ?? !1;
1504
+ const r = t.target, i = Z, n = N;
1448
1505
  try {
1449
- for (var s = /* @__PURE__ */ Ut(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ue(s);
1450
- if (!s) throw wt;
1451
- ct(!0), tt(s);
1452
- const o = Di(e, {
1506
+ for (var s = /* @__PURE__ */ er(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Xe(s);
1507
+ if (!s) throw St;
1508
+ dt(!0), nt(s);
1509
+ const o = zi(e, {
1453
1510
  ...t,
1454
1511
  anchor: s
1455
1512
  });
1456
- return ct(!1), o;
1513
+ return dt(!1), o;
1457
1514
  } catch (o) {
1458
1515
  if (o instanceof Error && o.message.split(`
1459
- `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw o;
1460
- return o !== wt && console.warn("Failed to hydrate: ", o), t.recover === !1 && vn(), Kt(), Yn(r), ct(!1), Ni(e, t);
1516
+ `).some((l) => l.startsWith("https://svelte.dev/e/"))) throw o;
1517
+ return o !== St && console.warn("Failed to hydrate: ", o), t.recover === !1 && bn(), Zt(), ts(r), dt(!1), Vi(e, t);
1461
1518
  } finally {
1462
- ct(i), tt(n);
1463
- }
1464
- }
1465
- var vt = /* @__PURE__ */ new Map();
1466
- function Di(e, { target: t, anchor: r, props: i = {}, events: n, context: s, intro: o = !0, transformError: a }) {
1467
- Kt();
1468
- var c = void 0, p = Zn(() => {
1469
- var f = r ?? t.appendChild(Ti());
1470
- xn(f, { pending: () => {
1471
- } }, (v) => {
1472
- Qr({});
1473
- var d = O;
1474
- if (s && (d.c = s), n && (i.$$events = n), Y && _t(v, null), Rr = o, c = e(v, i) || {}, Rr = !0, Y && (T.nodes.end = x, x === null || x.nodeType !== 8 || x.data !== "]"))
1475
- throw Kr(), wt;
1476
- Jr();
1477
- }, a);
1478
- var m = /* @__PURE__ */ new Set(), h = (v) => {
1479
- for (var d = 0; d < v.length; d++) {
1480
- var y = v[d];
1481
- if (!m.has(y)) {
1482
- m.add(y);
1483
- var _ = vs(y);
1484
- for (const k of [t, document]) {
1485
- var S = vt.get(k);
1486
- S === void 0 && (S = /* @__PURE__ */ new Map(), vt.set(k, S));
1487
- var B = S.get(y);
1488
- B === void 0 ? (k.addEventListener(y, Lr, { passive: _ }), S.set(y, 1)) : S.set(y, B + 1);
1519
+ dt(i), nt(n);
1520
+ }
1521
+ }
1522
+ var gt = /* @__PURE__ */ new Map();
1523
+ function zi(e, { target: t, anchor: r, props: i = {}, events: n, context: s, intro: o = !0, transformError: l }) {
1524
+ Zt();
1525
+ var c = void 0, d = ss(() => {
1526
+ var f = r ?? t.appendChild(ki());
1527
+ Vn(f, { pending: () => {
1528
+ } }, (m) => {
1529
+ ii({});
1530
+ var p = L;
1531
+ if (s && (p.c = s), n && (i.$$events = n), Z && wt(m, null), Dr = o, c = e(m, i) || {}, Dr = !0, Z && (A.nodes.end = N, N === null || N.nodeType !== 8 || N.data !== "]"))
1532
+ throw Zr(), St;
1533
+ ni();
1534
+ }, l);
1535
+ var v = /* @__PURE__ */ new Set(), h = (m) => {
1536
+ for (var p = 0; p < m.length; p++) {
1537
+ var y = m[p];
1538
+ if (!v.has(y)) {
1539
+ v.add(y);
1540
+ var _ = ws(y);
1541
+ for (const C of [t, document]) {
1542
+ var E = gt.get(C);
1543
+ E === void 0 && (E = /* @__PURE__ */ new Map(), gt.set(C, E));
1544
+ var j = E.get(y);
1545
+ j === void 0 ? (C.addEventListener(y, Nr, { passive: _ }), E.set(y, 1)) : E.set(y, j + 1);
1489
1546
  }
1490
1547
  }
1491
1548
  }
1492
1549
  };
1493
- return h(Zi(ls)), $r.add(h), () => {
1494
- for (var v of m) for (const _ of [t, document]) {
1495
- var d = vt.get(_), y = d.get(v);
1496
- --y == 0 ? (_.removeEventListener(v, Lr), d.delete(v), d.size === 0 && vt.delete(_)) : d.set(v, y);
1550
+ return h(sn(ps)), xr.add(h), () => {
1551
+ for (var m of v) for (const _ of [t, document]) {
1552
+ var p = gt.get(_), y = p.get(m);
1553
+ --y == 0 ? (_.removeEventListener(m, Nr), p.delete(m), p.size === 0 && gt.delete(_)) : p.set(m, y);
1497
1554
  }
1498
- $r.delete(h), f !== r && f.parentNode?.removeChild(f);
1555
+ xr.delete(h), f !== r && f.parentNode?.removeChild(f);
1499
1556
  };
1500
1557
  });
1501
- return Yt.set(c, p), c;
1558
+ return tr.set(c, d), c;
1502
1559
  }
1503
- var Yt = /* @__PURE__ */ new WeakMap();
1504
- function _s(e, t) {
1505
- const r = Yt.get(e);
1506
- return r ? (Yt.delete(e), r(t)) : Promise.resolve();
1560
+ var tr = /* @__PURE__ */ new WeakMap();
1561
+ function Ss(e, t) {
1562
+ const r = tr.get(e);
1563
+ return r ? (tr.delete(e), r(t)) : Promise.resolve();
1507
1564
  }
1508
- function ys(e) {
1509
- O === null && un("onMount"), at && O.l !== null ? bs(O).m.push(e) : Ae(() => {
1510
- const t = Rt(e);
1565
+ function Is(e) {
1566
+ L === null && vn("onMount"), ct && L.l !== null ? Es(L).m.push(e) : Ee(() => {
1567
+ const t = xt(e);
1511
1568
  if (typeof t == "function") return t;
1512
1569
  });
1513
1570
  }
1514
- function bs(e) {
1571
+ function Es(e) {
1515
1572
  var t = e.l;
1516
1573
  return t.u ?? (t.u = {
1517
1574
  a: [],
@@ -1519,94 +1576,93 @@ function bs(e) {
1519
1576
  m: []
1520
1577
  });
1521
1578
  }
1522
- var jo = [...`
1523
- \r\f \v\uFEFF`], Fi, Be = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakSet(), Bi = class {
1579
+ var Gi, Be = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), Fr = /* @__PURE__ */ new WeakSet(), Wi = class {
1524
1580
  constructor(e) {
1525
- er(this, Mr), A(this, Be, /* @__PURE__ */ new WeakMap()), A(this, kt, void 0), A(this, Dt, void 0), b(Dt, this, e);
1581
+ or(this, Fr), w(this, Be, /* @__PURE__ */ new WeakMap()), w(this, Lt, void 0), w(this, Bt, void 0), b(Bt, this, e);
1526
1582
  }
1527
1583
  observe(e, t) {
1528
- var r = l(Be, this).get(e) || /* @__PURE__ */ new Set();
1529
- return r.add(t), l(Be, this).set(e, r), E(Mr, this, ws).call(this).observe(e, l(Dt, this)), () => {
1530
- var i = l(Be, this).get(e);
1531
- i.delete(t), i.size === 0 && (l(Be, this).delete(e), l(kt, this).unobserve(e));
1584
+ var r = a(Be, this).get(e) || /* @__PURE__ */ new Set();
1585
+ return r.add(t), a(Be, this).set(e, r), S(Fr, this, ks).call(this).observe(e, a(Bt, this)), () => {
1586
+ var i = a(Be, this).get(e);
1587
+ i.delete(t), i.size === 0 && (a(Be, this).delete(e), a(Lt, this).unobserve(e));
1532
1588
  };
1533
1589
  }
1534
1590
  };
1535
- Fi = Bi;
1536
- function ws() {
1537
- return l(kt, this) ?? b(kt, this, new ResizeObserver((e) => {
1591
+ Gi = Wi;
1592
+ function ks() {
1593
+ return a(Lt, this) ?? b(Lt, this, new ResizeObserver((e) => {
1538
1594
  for (var t of e) {
1539
- Fi.entries.set(t.target, t);
1540
- for (var r of l(Be, this).get(t.target) || []) r(t);
1595
+ Gi.entries.set(t.target, t);
1596
+ for (var r of a(Be, this).get(t.target) || []) r(t);
1541
1597
  }
1542
1598
  }));
1543
1599
  }
1544
- u(Bi, "entries", /* @__PURE__ */ new WeakMap());
1545
- function Pr(e, t) {
1546
- return e === t || e?.[Je] === t;
1547
- }
1548
- function Ts(e = {}, t, r, i) {
1549
- var n = O.r, s = T;
1550
- return es(() => {
1551
- var o, a;
1552
- return or(() => {
1553
- o = a, a = i?.() || [], Rt(() => {
1554
- e !== r(...a) && (t(e, ...a), o && Pr(r(...o), e) && t(null, ...o));
1600
+ u(Wi, "entries", /* @__PURE__ */ new WeakMap());
1601
+ function Br(e, t) {
1602
+ return e === t || e?.[tt] === t;
1603
+ }
1604
+ function Cs(e = {}, t, r, i) {
1605
+ var n = L.r, s = A;
1606
+ return os(() => {
1607
+ var o, l;
1608
+ return pr(() => {
1609
+ o = l, l = i?.() || [], xt(() => {
1610
+ e !== r(...l) && (t(e, ...l), o && Br(r(...o), e) && t(null, ...o));
1555
1611
  });
1556
1612
  }), () => {
1557
1613
  let c = s;
1558
1614
  for (; c !== n && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
1559
- const p = () => {
1560
- a && Pr(r(...a), e) && t(null, ...a);
1615
+ const d = () => {
1616
+ l && Br(r(...l), e) && t(null, ...l);
1561
1617
  }, f = c.teardown;
1562
1618
  c.teardown = () => {
1563
- p(), f?.();
1619
+ d(), f?.();
1564
1620
  };
1565
1621
  };
1566
1622
  }), e;
1567
1623
  }
1568
- function he(e, t, r, i) {
1569
- var n = !at || (r & 2) !== 0, s = (r & 8) !== 0, o = (r & 16) !== 0, a = i, c = !0, p = () => (c && (c = !1, a = o ? Rt(i) : i), a);
1624
+ function me(e, t, r, i) {
1625
+ var n = !ct || (r & 2) !== 0, s = (r & 8) !== 0, o = (r & 16) !== 0, l = i, c = !0, d = () => (c && (c = !1, l = o ? xt(i) : i), l);
1570
1626
  let f;
1571
1627
  if (s) {
1572
- var m = Je in e || qr in e;
1573
- f = ke(e, t)?.set ?? (m && t in e ? (k) => e[t] = k : void 0);
1574
- }
1575
- var h, v = !1;
1576
- s ? [h, v] = $n(() => e[t]) : h = e[t], h === void 0 && i !== void 0 && (h = p(), f && (n && mn(t), f(h)));
1577
- var d;
1578
- if (n ? d = () => {
1579
- var k = e[t];
1580
- return k === void 0 ? p() : (c = !0, k);
1581
- } : d = () => {
1582
- var k = e[t];
1583
- return k !== void 0 && (a = void 0), k === void 0 ? a : k;
1584
- }, n && !(r & 4)) return d;
1628
+ var v = tt in e || Jr in e;
1629
+ f = $e(e, t)?.set ?? (v && t in e ? (C) => e[t] = C : void 0);
1630
+ }
1631
+ var h, m = !1;
1632
+ s ? [h, m] = xn(() => e[t]) : h = e[t], h === void 0 && i !== void 0 && (h = d(), f && (n && wn(t), f(h)));
1633
+ var p;
1634
+ if (n ? p = () => {
1635
+ var C = e[t];
1636
+ return C === void 0 ? d() : (c = !0, C);
1637
+ } : p = () => {
1638
+ var C = e[t];
1639
+ return C !== void 0 && (l = void 0), C === void 0 ? l : C;
1640
+ }, n && !(r & 4)) return p;
1585
1641
  if (f) {
1586
1642
  var y = e.$$legacy;
1587
- return function(k, q) {
1588
- return arguments.length > 0 ? ((!n || !q || y || v) && f(q ? d() : k), k) : d();
1643
+ return function(C, U) {
1644
+ return arguments.length > 0 ? ((!n || !U || y || m) && f(U ? p() : C), C) : p();
1589
1645
  };
1590
1646
  }
1591
- var _ = !1, S = (r & 1 ? ir : Bn)(() => (_ = !1, d()));
1592
- s && g(S);
1593
- var B = T;
1594
- return function(k, q) {
1647
+ var _ = !1, E = (r & 1 ? dr : Kn)(() => (_ = !1, p()));
1648
+ s && g(E);
1649
+ var j = A;
1650
+ return function(C, U) {
1595
1651
  if (arguments.length > 0) {
1596
- const be = q ? g(S) : n && s ? je(k) : k;
1597
- return $(S, be), _ = !0, a !== void 0 && (a = be), k;
1652
+ const Te = U ? g(E) : n && s ? Ve(C) : C;
1653
+ return $(E, Te), _ = !0, l !== void 0 && (l = Te), C;
1598
1654
  }
1599
- return ge && _ || B.f & 16384 ? S.v : g(S);
1655
+ return fe && _ || j.f & 16384 ? E.v : g(E);
1600
1656
  };
1601
1657
  }
1602
- function As(e) {
1603
- return new Ss(e);
1658
+ function $s(e) {
1659
+ return new Ls(e);
1604
1660
  }
1605
- var Te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ss = class {
1661
+ var Se = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ls = class {
1606
1662
  constructor(e) {
1607
- A(this, Te, void 0), A(this, te, void 0);
1663
+ w(this, Se, void 0), w(this, ie, void 0);
1608
1664
  var t = /* @__PURE__ */ new Map(), r = (n, s) => {
1609
- var o = /* @__PURE__ */ Gn(s, !1, !1);
1665
+ var o = /* @__PURE__ */ Xn(s, !1, !1);
1610
1666
  return t.set(n, o), o;
1611
1667
  };
1612
1668
  const i = new Proxy({
@@ -1617,13 +1673,13 @@ var Te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ss =
1617
1673
  return g(t.get(s) ?? r(s, Reflect.get(n, s)));
1618
1674
  },
1619
1675
  has(n, s) {
1620
- return s === qr ? !0 : (g(t.get(s) ?? r(s, Reflect.get(n, s))), Reflect.has(n, s));
1676
+ return s === Jr ? !0 : (g(t.get(s) ?? r(s, Reflect.get(n, s))), Reflect.has(n, s));
1621
1677
  },
1622
1678
  set(n, s, o) {
1623
1679
  return $(t.get(s) ?? r(s, o), o), Reflect.set(n, s, o);
1624
1680
  }
1625
1681
  });
1626
- b(te, this, (e.hydrate ? gs : Ni)(e.component, {
1682
+ b(ie, this, (e.hydrate ? As : Vi)(e.component, {
1627
1683
  target: e.target,
1628
1684
  anchor: e.anchor,
1629
1685
  props: i,
@@ -1631,38 +1687,38 @@ var Te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ss =
1631
1687
  intro: e.intro ?? !1,
1632
1688
  recover: e.recover,
1633
1689
  transformError: e.transformError
1634
- })), !Re && (!e?.props?.$$host || e.sync === !1) && se(), b(Te, this, i.$$events);
1635
- for (const n of Object.keys(l(te, this)))
1636
- n === "$set" || n === "$destroy" || n === "$on" || At(this, n, {
1690
+ })), !ye && (!e?.props?.$$host || e.sync === !1) && ue(), b(Se, this, i.$$events);
1691
+ for (const n of Object.keys(a(ie, this)))
1692
+ n === "$set" || n === "$destroy" || n === "$on" || Et(this, n, {
1637
1693
  get() {
1638
- return l(te, this)[n];
1694
+ return a(ie, this)[n];
1639
1695
  },
1640
1696
  set(s) {
1641
- l(te, this)[n] = s;
1697
+ a(ie, this)[n] = s;
1642
1698
  },
1643
1699
  enumerable: !0
1644
1700
  });
1645
- l(te, this).$set = (n) => {
1701
+ a(ie, this).$set = (n) => {
1646
1702
  Object.assign(i, n);
1647
- }, l(te, this).$destroy = () => {
1648
- _s(l(te, this));
1703
+ }, a(ie, this).$destroy = () => {
1704
+ Ss(a(ie, this));
1649
1705
  };
1650
1706
  }
1651
1707
  $set(e) {
1652
- l(te, this).$set(e);
1708
+ a(ie, this).$set(e);
1653
1709
  }
1654
1710
  $on(e, t) {
1655
- l(Te, this)[e] = l(Te, this)[e] || [];
1711
+ a(Se, this)[e] = a(Se, this)[e] || [];
1656
1712
  const r = (...i) => t.call(this, ...i);
1657
- return l(Te, this)[e].push(r), () => {
1658
- l(Te, this)[e] = l(Te, this)[e].filter((i) => i !== r);
1713
+ return a(Se, this)[e].push(r), () => {
1714
+ a(Se, this)[e] = a(Se, this)[e].filter((i) => i !== r);
1659
1715
  };
1660
1716
  }
1661
1717
  $destroy() {
1662
- l(te, this).$destroy();
1718
+ a(ie, this).$destroy();
1663
1719
  }
1664
- }, Vi;
1665
- typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
1720
+ }, qi;
1721
+ typeof HTMLElement == "function" && (qi = class extends HTMLElement {
1666
1722
  constructor(e, t, r) {
1667
1723
  super(), u(this, "$$ctor", void 0), u(this, "$$s", void 0), u(this, "$$c", void 0), u(this, "$$cn", !1), u(this, "$$d", {}), u(this, "$$r", !1), u(this, "$$p_d", {}), u(this, "$$l", {}), u(this, "$$l_u", /* @__PURE__ */ new Map()), u(this, "$$me", void 0), u(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
1668
1724
  }
@@ -1683,19 +1739,19 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
1683
1739
  if (this.$$cn = !0, !this.$$c) {
1684
1740
  let e = function(i) {
1685
1741
  return (n) => {
1686
- const s = Ai("slot");
1687
- i !== "default" && (s.name = i), Hi(n, s);
1742
+ const s = Ci("slot");
1743
+ i !== "default" && (s.name = i), ji(n, s);
1688
1744
  };
1689
1745
  };
1690
1746
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
1691
- const t = {}, r = Is(this);
1747
+ const t = {}, r = Os(this);
1692
1748
  for (const i of this.$$s) i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
1693
1749
  for (const i of this.attributes) {
1694
1750
  const n = this.$$g_p(i.name);
1695
- n in this.$$d || (this.$$d[n] = yt(n, i.value, this.$$p_d, "toProp"));
1751
+ n in this.$$d || (this.$$d[n] = Tt(n, i.value, this.$$p_d, "toProp"));
1696
1752
  }
1697
1753
  for (const i in this.$$p_d) !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
1698
- this.$$c = As({
1754
+ this.$$c = $s({
1699
1755
  component: this.$$ctor,
1700
1756
  target: this.$$shadowRoot || this,
1701
1757
  props: {
@@ -1703,13 +1759,13 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
1703
1759
  $$slots: t,
1704
1760
  $$host: this
1705
1761
  }
1706
- }), this.$$me = Jn(() => {
1707
- or(() => {
1762
+ }), this.$$me = ns(() => {
1763
+ pr(() => {
1708
1764
  this.$$r = !0;
1709
- for (const i of Tt(this.$$c)) {
1765
+ for (const i of It(this.$$c)) {
1710
1766
  if (!this.$$p_d[i]?.reflect) continue;
1711
1767
  this.$$d[i] = this.$$c[i];
1712
- const n = yt(i, this.$$d[i], this.$$p_d, "toAttribute");
1768
+ const n = Tt(i, this.$$d[i], this.$$p_d, "toAttribute");
1713
1769
  n == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, n);
1714
1770
  }
1715
1771
  this.$$r = !1;
@@ -1723,7 +1779,7 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
1723
1779
  }
1724
1780
  }
1725
1781
  attributeChangedCallback(e, t, r) {
1726
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = yt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
1782
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Tt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
1727
1783
  }
1728
1784
  disconnectedCallback() {
1729
1785
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -1731,10 +1787,10 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
1731
1787
  });
1732
1788
  }
1733
1789
  $$g_p(e) {
1734
- return Tt(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
1790
+ return It(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
1735
1791
  }
1736
1792
  });
1737
- function yt(e, t, r, i) {
1793
+ function Tt(e, t, r, i) {
1738
1794
  const n = r[e]?.type;
1739
1795
  if (t = n === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e]) return t;
1740
1796
  if (i === "toAttribute") switch (n) {
@@ -1760,46 +1816,46 @@ function yt(e, t, r, i) {
1760
1816
  return t;
1761
1817
  }
1762
1818
  }
1763
- function Is(e) {
1819
+ function Os(e) {
1764
1820
  const t = {};
1765
1821
  return e.childNodes.forEach((r) => {
1766
1822
  t[r.slot || "default"] = !0;
1767
1823
  }), t;
1768
1824
  }
1769
- function Es(e, t, r, i, n, s) {
1770
- let o = class extends Vi {
1825
+ function Rs(e, t, r, i, n, s) {
1826
+ let o = class extends qi {
1771
1827
  constructor() {
1772
1828
  super(e, r, n), this.$$p_d = t;
1773
1829
  }
1774
1830
  static get observedAttributes() {
1775
- return Tt(t).map((a) => (t[a].attribute || a).toLowerCase());
1831
+ return It(t).map((l) => (t[l].attribute || l).toLowerCase());
1776
1832
  }
1777
1833
  };
1778
- return Tt(t).forEach((a) => {
1779
- At(o.prototype, a, {
1834
+ return It(t).forEach((l) => {
1835
+ Et(o.prototype, l, {
1780
1836
  get() {
1781
- return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
1837
+ return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
1782
1838
  },
1783
1839
  set(c) {
1784
- c = yt(a, c, t), this.$$d[a] = c;
1785
- var p = this.$$c;
1786
- p && (ke(p, a)?.get ? p[a] = c : p.$set({ [a]: c }));
1840
+ c = Tt(l, c, t), this.$$d[l] = c;
1841
+ var d = this.$$c;
1842
+ d && ($e(d, l)?.get ? d[l] = c : d.$set({ [l]: c }));
1787
1843
  }
1788
1844
  });
1789
- }), i.forEach((a) => {
1790
- At(o.prototype, a, { get() {
1791
- return this.$$c?.[a];
1845
+ }), i.forEach((l) => {
1846
+ Et(o.prototype, l, { get() {
1847
+ return this.$$c?.[l];
1792
1848
  } });
1793
1849
  }), s && (o = s(o)), e.element = o, o;
1794
1850
  }
1795
- var ks = class extends Event {
1851
+ var Ms = class extends Event {
1796
1852
  constructor(e, t, r, i) {
1797
1853
  super("context-request", {
1798
1854
  bubbles: !0,
1799
1855
  composed: !0
1800
1856
  }), u(this, "context", void 0), u(this, "contextTarget", void 0), u(this, "callback", void 0), u(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = i ?? !1;
1801
1857
  }
1802
- }, Cs = class {
1858
+ }, Ps = class {
1803
1859
  constructor(e, t) {
1804
1860
  u(this, "host", void 0), u(this, "context", void 0), u(this, "subscribe", void 0), u(this, "onValue", void 0), u(this, "isConnected", !1), u(this, "unsubscribe", void 0), u(this, "currentValue", void 0), u(this, "handleValue", (r, i) => {
1805
1861
  i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
@@ -1815,26 +1871,26 @@ var ks = class extends Event {
1815
1871
  return this.currentValue;
1816
1872
  }
1817
1873
  requestValue() {
1818
- this.host.dispatchEvent(new ks(this.context, this.host, this.handleValue, this.subscribe));
1874
+ this.host.dispatchEvent(new Ms(this.context, this.host, this.handleValue, this.subscribe));
1819
1875
  }
1820
- }, Mt = (e) => e, $s = Mt(Symbol.for("pie.assessmentToolkit.runtimeContext")), zo = Mt(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Os = Mt(Symbol.for("pie.assessmentToolkit.shellContext")), Go = Mt(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
1821
- function ji(e, t, r) {
1876
+ }, Ht = (e) => e, xs = Ht(Symbol.for("pie.assessmentToolkit.runtimeContext")), Yo = Ht(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Hs = Ht(Symbol.for("pie.assessmentToolkit.shellContext")), Xo = Ht(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
1877
+ function Ki(e, t, r) {
1822
1878
  let i = !1;
1823
- const n = new Cs(e, {
1879
+ const n = new Ps(e, {
1824
1880
  context: t,
1825
1881
  subscribe: !0,
1826
- onValue: (p) => {
1827
- i = !0, r(p);
1882
+ onValue: (d) => {
1883
+ i = !0, r(d);
1828
1884
  }
1829
1885
  });
1830
1886
  n.connect();
1831
- const s = (p) => {
1832
- p.context === t && n.requestValue();
1887
+ const s = (d) => {
1888
+ d.context === t && n.requestValue();
1833
1889
  };
1834
1890
  e.addEventListener("context-provider", s);
1835
1891
  let o = 0;
1836
- const a = 200, c = globalThis.setInterval(() => {
1837
- if (i || o >= a) {
1892
+ const l = 200, c = globalThis.setInterval(() => {
1893
+ if (i || o >= l) {
1838
1894
  globalThis.clearInterval(c);
1839
1895
  return;
1840
1896
  }
@@ -1844,48 +1900,48 @@ function ji(e, t, r) {
1844
1900
  globalThis.clearInterval(c), e.removeEventListener("context-provider", s), n.disconnect();
1845
1901
  };
1846
1902
  }
1847
- function Ls(e, t) {
1848
- return ji(e, $s, t);
1903
+ function Ns(e, t) {
1904
+ return Ki(e, xs, t);
1849
1905
  }
1850
- function Rs(e, t) {
1851
- return ji(e, Os, t);
1906
+ function Ds(e, t) {
1907
+ return Ki(e, Hs, t);
1852
1908
  }
1853
- function Ms(e, t) {
1854
- return Ls(e, t);
1909
+ function Fs(e, t) {
1910
+ return Ns(e, t);
1855
1911
  }
1856
- function Ps(e, t) {
1857
- return Rs(e, t);
1912
+ function Bs(e, t) {
1913
+ return Ds(e, t);
1858
1914
  }
1859
- var xr;
1915
+ var jr;
1860
1916
  (function(e) {
1861
1917
  e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
1862
- })(xr || (xr = {}));
1863
- var Hr;
1918
+ })(jr || (jr = {}));
1919
+ var Vr;
1864
1920
  (function(e) {
1865
1921
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
1866
- })(Hr || (Hr = {}));
1867
- function zi(e) {
1922
+ })(Vr || (Vr = {}));
1923
+ function Ui(e) {
1868
1924
  return (...t) => {
1869
1925
  console.debug(`[${e}]`, ...t);
1870
1926
  };
1871
1927
  }
1872
- var Wo = zi("I18nService"), Ft = {
1928
+ var Qo = Ui("I18nService"), jt = {
1873
1929
  assessment: [],
1874
1930
  section: [],
1875
1931
  item: [],
1876
1932
  passage: [],
1877
1933
  rubric: [],
1878
1934
  element: []
1879
- }, qo = {
1880
- section: [...Ft.section],
1881
- item: [...Ft.item],
1882
- passage: [...Ft.passage]
1935
+ }, Jo = {
1936
+ section: [...jt.section],
1937
+ item: [...jt.item],
1938
+ passage: [...jt.passage]
1883
1939
  };
1884
- function xs(e) {
1940
+ function js(e) {
1885
1941
  const t = e.trim();
1886
1942
  return t || "";
1887
1943
  }
1888
- var Hs = [
1944
+ var Vs = [
1889
1945
  "assessment",
1890
1946
  "section",
1891
1947
  "item",
@@ -1893,13 +1949,38 @@ var Hs = [
1893
1949
  "rubric",
1894
1950
  "element"
1895
1951
  ];
1896
- function bt(e, t) {
1952
+ function At(e, t) {
1897
1953
  if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
1898
1954
  }
1899
- function Nr(e) {
1900
- if (bt(e.toolId, "toolId"), bt(e.name, "name"), bt(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
1901
- if (!Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
1902
- const t = e.supportedLevels.find((r) => !Hs.includes(r));
1955
+ var zs = [
1956
+ {
1957
+ pattern: /<script\b/i,
1958
+ reason: "contains a <script> tag"
1959
+ },
1960
+ {
1961
+ pattern: /\son[a-z]+\s*=/i,
1962
+ reason: "contains an inline event handler (on*=) attribute"
1963
+ },
1964
+ {
1965
+ pattern: /javascript:/i,
1966
+ reason: "contains a javascript: URL"
1967
+ },
1968
+ {
1969
+ pattern: /<foreignObject\b/i,
1970
+ reason: "contains a <foreignObject> element"
1971
+ }
1972
+ ];
1973
+ function Gs(e, t, r) {
1974
+ const i = t.trimStart(), n = i.toLowerCase().startsWith("<svg"), s = /^https?:/i.test(i);
1975
+ if (/^data:/i.test(i)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
1976
+ if (!(!n && !s)) {
1977
+ for (const { pattern: o, reason: l } of zs) if (o.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${l}. Inline SVG icons must not include scriptable content.`);
1978
+ }
1979
+ }
1980
+ function zr(e) {
1981
+ if (At(e.toolId, "toolId"), At(e.name, "name"), At(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
1982
+ if (typeof e.icon == "string" && Gs(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
1983
+ const t = e.supportedLevels.find((r) => !Vs.includes(r));
1903
1984
  if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
1904
1985
  if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
1905
1986
  if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
@@ -1908,23 +1989,23 @@ function Nr(e) {
1908
1989
  if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
1909
1990
  if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
1910
1991
  }
1911
- var Ns = class {
1992
+ var Ws = class {
1912
1993
  constructor() {
1913
1994
  u(this, "tools", /* @__PURE__ */ new Map()), u(this, "pnpIndex", /* @__PURE__ */ new Map()), u(this, "componentOverrides", {}), u(this, "moduleLoaders", /* @__PURE__ */ new Map()), u(this, "loadedToolModules", /* @__PURE__ */ new Set()), u(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
1914
1995
  }
1915
1996
  normalizeToolId(e) {
1916
- return xs(e);
1997
+ return js(e);
1917
1998
  }
1918
1999
  normalizeToolIds(e) {
1919
2000
  return e.map((t) => this.normalizeToolId(t));
1920
2001
  }
1921
2002
  register(e) {
1922
- if (Nr(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2003
+ if (zr(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
1923
2004
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
1924
2005
  this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
1925
2006
  }
1926
2007
  override(e) {
1927
- if (Nr(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2008
+ if (zr(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
1928
2009
  const t = this.tools.get(e.toolId);
1929
2010
  if (t.pnpSupportIds) for (const r of t.pnpSupportIds) this.pnpIndex.get(r)?.delete(e.toolId);
1930
2011
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const r of e.pnpSupportIds)
@@ -2009,7 +2090,7 @@ var Ns = class {
2009
2090
  setToolModuleLoaders(e) {
2010
2091
  for (const [t, r] of Object.entries(e))
2011
2092
  if (r) {
2012
- if (bt(t, "tool module loader id"), typeof r != "function") throw new Error(`Invalid tool module loader for "${t}": expected a function.`);
2093
+ if (At(t, "tool module loader id"), typeof r != "function") throw new Error(`Invalid tool module loader for "${t}": expected a function.`);
2013
2094
  this.moduleLoaders.set(t, r);
2014
2095
  }
2015
2096
  }
@@ -2051,35 +2132,35 @@ var Ns = class {
2051
2132
  return i.renderToolbar(t, n);
2052
2133
  }
2053
2134
  };
2054
- function Gi(e) {
2135
+ function Yi(e) {
2055
2136
  return e.level === "item";
2056
2137
  }
2057
- function Ds(e) {
2138
+ function qs(e) {
2058
2139
  return e.level === "passage";
2059
2140
  }
2060
- function Fs(e) {
2141
+ function Ks(e) {
2061
2142
  return e.level === "rubric";
2062
2143
  }
2063
- function Wi(e) {
2144
+ function Xi(e) {
2064
2145
  return e.level === "element";
2065
2146
  }
2066
- function lr(e) {
2067
- if (Wi(e)) {
2147
+ function mr(e) {
2148
+ if (Xi(e)) {
2068
2149
  const t = e.item.config;
2069
2150
  if (!t) return "";
2070
- const r = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
2151
+ const r = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
2071
2152
  n && typeof n == "string" && r.push(i(n));
2072
- const s = t.models, o = (Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : []).find((a) => a && typeof a == "object" && a.id === e.elementId);
2153
+ const s = t.models, o = (Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : []).find((l) => l && typeof l == "object" && l.id === e.elementId);
2073
2154
  if (o) {
2074
- for (const a of Object.values(o))
2075
- if (typeof a == "string" && r.push(i(a)), Array.isArray(a)) {
2076
- for (const c of a) if (c && typeof c == "object")
2077
- for (const p of Object.values(c)) typeof p == "string" && r.push(i(p));
2155
+ for (const l of Object.values(o))
2156
+ if (typeof l == "string" && r.push(i(l)), Array.isArray(l)) {
2157
+ for (const c of l) if (c && typeof c == "object")
2158
+ for (const d of Object.values(c)) typeof d == "string" && r.push(i(d));
2078
2159
  }
2079
2160
  }
2080
2161
  return r.filter(Boolean).join(" ").trim();
2081
2162
  }
2082
- if (Gi(e)) {
2163
+ if (Yi(e)) {
2083
2164
  const t = e.item;
2084
2165
  if (!t?.config) return "";
2085
2166
  const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
@@ -2087,18 +2168,18 @@ function lr(e) {
2087
2168
  const s = r.elements;
2088
2169
  if (s && typeof s == "object")
2089
2170
  for (const c of Object.values(s)) typeof c == "string" && i.push(n(c));
2090
- const o = r.models, a = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2091
- for (const c of a)
2171
+ const o = r.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2172
+ for (const c of l)
2092
2173
  if (!(!c || typeof c != "object")) {
2093
- for (const p of Object.values(c))
2094
- if (typeof p == "string" && i.push(n(p)), Array.isArray(p)) {
2095
- for (const f of p) if (f && typeof f == "object")
2096
- for (const m of Object.values(f)) typeof m == "string" && i.push(n(m));
2174
+ for (const d of Object.values(c))
2175
+ if (typeof d == "string" && i.push(n(d)), Array.isArray(d)) {
2176
+ for (const f of d) if (f && typeof f == "object")
2177
+ for (const v of Object.values(f)) typeof v == "string" && i.push(n(v));
2097
2178
  }
2098
2179
  }
2099
2180
  return i.filter(Boolean).join(" ").trim();
2100
2181
  }
2101
- if (Ds(e)) {
2182
+ if (qs(e)) {
2102
2183
  const t = e.passage;
2103
2184
  if (!t?.config) return "";
2104
2185
  const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
@@ -2106,25 +2187,25 @@ function lr(e) {
2106
2187
  const s = r.elements;
2107
2188
  if (s && typeof s == "object")
2108
2189
  for (const c of Object.values(s)) typeof c == "string" && i.push(n(c));
2109
- const o = r.models, a = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2110
- for (const c of a)
2190
+ const o = r.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2191
+ for (const c of l)
2111
2192
  if (!(!c || typeof c != "object")) {
2112
- for (const p of Object.values(c))
2113
- if (typeof p == "string" && i.push(n(p)), Array.isArray(p)) {
2114
- for (const f of p) if (f && typeof f == "object")
2115
- for (const m of Object.values(f)) typeof m == "string" && i.push(n(m));
2193
+ for (const d of Object.values(c))
2194
+ if (typeof d == "string" && i.push(n(d)), Array.isArray(d)) {
2195
+ for (const f of d) if (f && typeof f == "object")
2196
+ for (const v of Object.values(f)) typeof v == "string" && i.push(n(v));
2116
2197
  }
2117
2198
  }
2118
2199
  return i.filter(Boolean).join(" ").trim();
2119
2200
  }
2120
- if (Fs(e)) {
2201
+ if (Ks(e)) {
2121
2202
  const t = e.rubricBlock;
2122
2203
  return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
2123
2204
  }
2124
2205
  return "";
2125
2206
  }
2126
- function Pt(e) {
2127
- const t = lr(e);
2207
+ function Nt(e) {
2208
+ const t = mr(e);
2128
2209
  return [
2129
2210
  /<math[>\s]/i,
2130
2211
  /\\\[([^\]]+)\\\]/,
@@ -2134,7 +2215,7 @@ function Pt(e) {
2134
2215
  /\d+\s*[+\-*/=]\s*\d+/
2135
2216
  ].some((r) => r.test(t));
2136
2217
  }
2137
- function Bs(e) {
2218
+ function Us(e) {
2138
2219
  const t = [
2139
2220
  "pie-multiple-choice",
2140
2221
  "pie-inline-choice",
@@ -2143,7 +2224,7 @@ function Bs(e) {
2143
2224
  "inline-choice",
2144
2225
  "select-text"
2145
2226
  ];
2146
- if (Wi(e)) {
2227
+ if (Xi(e)) {
2147
2228
  const r = e.item.config;
2148
2229
  if (!r?.models) return !1;
2149
2230
  const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((s) => s && typeof s == "object" && s.id === e.elementId);
@@ -2151,7 +2232,7 @@ function Bs(e) {
2151
2232
  const n = i.element || "";
2152
2233
  return t.includes(n);
2153
2234
  }
2154
- if (Gi(e)) {
2235
+ if (Yi(e)) {
2155
2236
  const r = e.item.config?.models;
2156
2237
  return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((i) => {
2157
2238
  if (!i || typeof i != "object") return !1;
@@ -2161,11 +2242,11 @@ function Bs(e) {
2161
2242
  }
2162
2243
  return !1;
2163
2244
  }
2164
- function xt(e) {
2165
- return lr(e).trim().length >= 10;
2245
+ function Dt(e) {
2246
+ return mr(e).trim().length >= 10;
2166
2247
  }
2167
- function Vs(e) {
2168
- const t = lr(e);
2248
+ function Ys(e) {
2249
+ const t = mr(e);
2169
2250
  return [
2170
2251
  /chemistry|chemical|element|atom|molecule|compound/i,
2171
2252
  /periodic\s+table/i,
@@ -2175,23 +2256,23 @@ function Vs(e) {
2175
2256
  /physics|force|energy|velocity|acceleration/i
2176
2257
  ].some((r) => r.test(t));
2177
2258
  }
2178
- var js = [
2259
+ var Xs = [
2179
2260
  "assessment",
2180
2261
  "section",
2181
2262
  "item",
2182
2263
  "passage",
2183
2264
  "rubric"
2184
- ], zs = new Set(js);
2185
- function Gs(e) {
2186
- return zs.has(e);
2265
+ ], Qs = new Set(Xs);
2266
+ function Js(e) {
2267
+ return Qs.has(e);
2187
2268
  }
2188
- function cr(e, t, r) {
2269
+ function gr(e, t, r) {
2189
2270
  const i = e.trim(), n = r.trim();
2190
2271
  if (!i || !n) throw new Error("Tool instance ids require non-empty tool and scope ids");
2191
- if (!Gs(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
2272
+ if (!Js(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
2192
2273
  return `${i}:${t}:${n}`;
2193
2274
  }
2194
- var Ws = class {
2275
+ var Zs = class {
2195
2276
  constructor() {
2196
2277
  u(this, "providerId", "desmos-calculator"), u(this, "providerName", "Desmos Calculator"), u(this, "category", "calculator"), u(this, "version", "1.10"), u(this, "requiresAuth", !0), u(this, "desmosProvider", null), u(this, "config", null);
2197
2278
  }
@@ -2213,34 +2294,36 @@ var Ws = class {
2213
2294
  toolId: "calculator",
2214
2295
  operation: "desmos-provider-module-import",
2215
2296
  backend: "desmos"
2216
- }), this.desmosProvider = new (await (async () => {
2297
+ });
2298
+ const r = await (async () => {
2217
2299
  try {
2218
- const r = await import("./dist-DwP27yIs.js");
2300
+ const i = await import("./dist-rF11IR1B.js");
2219
2301
  return await this.emitTelemetry("pie-tool-library-load-success", {
2220
2302
  toolId: "calculator",
2221
2303
  operation: "desmos-provider-module-import",
2222
2304
  backend: "desmos",
2223
2305
  duration: Date.now() - t
2224
- }), r;
2225
- } catch (r) {
2306
+ }), i;
2307
+ } catch (i) {
2226
2308
  throw await this.emitTelemetry("pie-tool-library-load-error", {
2227
2309
  toolId: "calculator",
2228
2310
  operation: "desmos-provider-module-import",
2229
2311
  backend: "desmos",
2230
2312
  duration: Date.now() - t,
2231
2313
  errorType: "ToolLibraryLoadError",
2232
- message: r instanceof Error ? r.message : String(r)
2233
- }), r;
2314
+ message: i instanceof Error ? i.message : String(i)
2315
+ }), i;
2234
2316
  }
2235
- })()).DesmosCalculatorProvider();
2317
+ })();
2318
+ this.desmosProvider = new r.DesmosCalculatorProvider();
2236
2319
  try {
2237
2320
  await this.desmosProvider.initialize({
2238
2321
  apiKey: e.apiKey,
2239
2322
  proxyEndpoint: e.proxyEndpoint,
2240
2323
  onTelemetry: e.onTelemetry
2241
2324
  }), console.log(`[DesmosToolProvider] Initialized successfully ${e.proxyEndpoint ? "(using proxy)" : e.apiKey ? "(direct API key)" : "(no auth)"}`);
2242
- } catch (r) {
2243
- throw console.error("[DesmosToolProvider] Initialization failed:", r), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
2325
+ } catch (i) {
2326
+ throw console.error("[DesmosToolProvider] Initialization failed:", i), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
2244
2327
  }
2245
2328
  }
2246
2329
  async createInstance(e) {
@@ -2266,16 +2349,16 @@ var Ws = class {
2266
2349
  destroy() {
2267
2350
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
2268
2351
  }
2269
- }, qs = (e, t) => {
2352
+ }, eo = (e, t) => {
2270
2353
  const r = t?.useSentenceSegmenter !== !1;
2271
2354
  try {
2272
2355
  if (!r) throw new Error("Segmenter disabled by policy");
2273
2356
  const o = globalThis.Intl?.Segmenter;
2274
2357
  if (typeof o == "function") {
2275
- const a = new o(t?.locale, { granularity: "sentence" }), c = Array.from(a.segment(e)).map((p) => ({
2276
- text: p.segment,
2277
- offset: p.index
2278
- })).filter((p) => p.text.trim().length > 0);
2358
+ const l = new o(t?.locale, { granularity: "sentence" }), c = Array.from(l.segment(e)).map((d) => ({
2359
+ text: d.segment,
2360
+ offset: d.index
2361
+ })).filter((d) => d.text.trim().length > 0);
2279
2362
  if (c.length > 0) return c;
2280
2363
  }
2281
2364
  } catch {
@@ -2283,24 +2366,24 @@ var Ws = class {
2283
2366
  const i = e.match(/[^.!?]+(?:[.!?]+|$)/g) || [e], n = [];
2284
2367
  let s = 0;
2285
2368
  for (const o of i) {
2286
- const a = e.indexOf(o, s);
2287
- a !== -1 && (n.push({
2369
+ const l = e.indexOf(o, s);
2370
+ l !== -1 && (n.push({
2288
2371
  text: o,
2289
- offset: a
2290
- }), s = a + o.length);
2372
+ offset: l
2373
+ }), s = l + o.length);
2291
2374
  }
2292
2375
  return n.length > 0 ? n : [{
2293
2376
  text: e,
2294
2377
  offset: 0
2295
2378
  }];
2296
- }, Ks = class {
2379
+ }, to = class {
2297
2380
  constructor() {
2298
2381
  u(this, "providerId", "browser"), u(this, "providerName", "Browser Speech Synthesis"), u(this, "version", "1.0.0");
2299
2382
  }
2300
2383
  async initialize(e) {
2301
2384
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
2302
2385
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
2303
- return new Us(e);
2386
+ return new ro(e);
2304
2387
  }
2305
2388
  supportsFeature(e) {
2306
2389
  return !0;
@@ -2317,7 +2400,7 @@ var Ws = class {
2317
2400
  }
2318
2401
  destroy() {
2319
2402
  }
2320
- }, Us = class {
2403
+ }, ro = class {
2321
2404
  constructor(e) {
2322
2405
  u(this, "utterance", null), u(this, "config", null), u(this, "_isPlaying", !1), u(this, "_isPaused", !1), u(this, "speakRunId", 0), u(this, "onWordBoundary", void 0), this.config = e;
2323
2406
  }
@@ -2353,18 +2436,18 @@ var Ws = class {
2353
2436
  const r = this.segmentSentences(e), i = [];
2354
2437
  let n = "", s = 0;
2355
2438
  for (const o of r) {
2356
- const a = o.text.trim();
2357
- if (!a) continue;
2358
- const c = o.text.search(/\S/), p = o.offset + (c === -1 ? 0 : c);
2439
+ const l = o.text.trim();
2440
+ if (!l) continue;
2441
+ const c = o.text.search(/\S/), d = o.offset + (c === -1 ? 0 : c);
2359
2442
  if (!n) {
2360
- n = a, s = p;
2443
+ n = l, s = d;
2361
2444
  continue;
2362
2445
  }
2363
- const f = `${n} ${a}`;
2446
+ const f = `${n} ${l}`;
2364
2447
  f.length <= 260 ? n = f : (i.push({
2365
2448
  text: n,
2366
2449
  offset: s
2367
- }), n = a, s = p);
2450
+ }), n = l, s = d);
2368
2451
  }
2369
2452
  return n && i.push({
2370
2453
  text: n,
@@ -2387,7 +2470,7 @@ var Ws = class {
2387
2470
  }
2388
2471
  segmentSentences(e) {
2389
2472
  const t = this.getSegmentationPolicy();
2390
- return qs(e, {
2473
+ return eo(e, {
2391
2474
  locale: t.locale,
2392
2475
  useSentenceSegmenter: t.useSentenceSegmenter
2393
2476
  });
@@ -2430,8 +2513,8 @@ var Ws = class {
2430
2513
  r === this.speakRunId && (this._isPaused = !1);
2431
2514
  }, this.utterance.onboundary = (s) => {
2432
2515
  if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", s.name, "charIndex:", s.charIndex, "charLength:", s.charLength), s.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
2433
- const o = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), a = Number(s.charLength || 0), c = this.inferWordLength(e, o), p = Number.isFinite(a) && a > 0 && a <= 80 && o + a <= e.length ? a : c, f = e.substring(o, Math.min(e.length, o + p)).trim(), m = t + o;
2434
- console.log("[BrowserProvider] Calling onWordBoundary with word:", f, "at position:", m), this.onWordBoundary(f, m, p);
2516
+ const o = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), l = Number(s.charLength || 0), c = this.inferWordLength(e, o), d = Number.isFinite(l) && l > 0 && l <= 80 && o + l <= e.length ? l : c, f = e.substring(o, Math.min(e.length, o + d)).trim(), v = t + o;
2517
+ console.log("[BrowserProvider] Calling onWordBoundary with word:", f, "at position:", v), this.onWordBoundary(f, v, d);
2435
2518
  }, speechSynthesis.speak(this.utterance);
2436
2519
  });
2437
2520
  }
@@ -2456,7 +2539,7 @@ var Ws = class {
2456
2539
  ...e.providerOptions || {}
2457
2540
  });
2458
2541
  }
2459
- }, Ys = class {
2542
+ }, io = class {
2460
2543
  async emitTelemetry(e, t) {
2461
2544
  try {
2462
2545
  await this.config?.onTelemetry?.(e, t);
@@ -2488,7 +2571,7 @@ var Ws = class {
2488
2571
  }
2489
2572
  async _initializeBrowserTTS(e) {
2490
2573
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
2491
- this.ttsProvider = new Ks(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2574
+ this.ttsProvider = new to(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2492
2575
  }
2493
2576
  async _initializeServerTTS(e) {
2494
2577
  if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
@@ -2497,26 +2580,28 @@ var Ws = class {
2497
2580
  toolId: "tts",
2498
2581
  operation: "server-provider-module-import",
2499
2582
  backend: e.serverProvider || e.backend
2500
- }), this.ttsProvider = new (await (async () => {
2583
+ });
2584
+ const r = await (async () => {
2501
2585
  try {
2502
- const r = await import("./dist-Bud4G4lv.js");
2586
+ const i = await import("./dist-DIBQdekL.js");
2503
2587
  return await this.emitTelemetry("pie-tool-library-load-success", {
2504
2588
  toolId: "tts",
2505
2589
  operation: "server-provider-module-import",
2506
2590
  backend: e.serverProvider || e.backend,
2507
2591
  duration: Date.now() - t
2508
- }), r;
2509
- } catch (r) {
2592
+ }), i;
2593
+ } catch (i) {
2510
2594
  throw await this.emitTelemetry("pie-tool-library-load-error", {
2511
2595
  toolId: "tts",
2512
2596
  operation: "server-provider-module-import",
2513
2597
  backend: e.serverProvider || e.backend,
2514
2598
  duration: Date.now() - t,
2515
2599
  errorType: "ToolLibraryLoadError",
2516
- message: r instanceof Error ? r.message : String(r)
2517
- }), r;
2600
+ message: i instanceof Error ? i.message : String(i)
2601
+ }), i;
2518
2602
  }
2519
- })()).ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
2603
+ })();
2604
+ this.ttsProvider = new r.ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
2520
2605
  }
2521
2606
  async createInstance(e) {
2522
2607
  if (!this.ttsProvider) throw new Error("[TTSToolProvider] Provider not initialized. Call initialize() first.");
@@ -2544,7 +2629,7 @@ var Ws = class {
2544
2629
  destroy() {
2545
2630
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
2546
2631
  }
2547
- }, Xs = /* @__PURE__ */ new Set([
2632
+ }, no = /* @__PURE__ */ new Set([
2548
2633
  "annotation-xml",
2549
2634
  "color-profile",
2550
2635
  "font-face",
@@ -2553,16 +2638,16 @@ var Ws = class {
2553
2638
  "font-face-format",
2554
2639
  "font-face-name",
2555
2640
  "missing-glyph"
2556
- ]), Qs = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Js = (e, t = "custom element tag") => {
2641
+ ]), so = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, oo = (e, t = "custom element tag") => {
2557
2642
  if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
2558
2643
  const r = e.trim();
2559
2644
  if (!r) throw new Error(`Invalid ${t}: tag is empty`);
2560
2645
  if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
2561
2646
  if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
2562
- if (Xs.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
2563
- if (!Qs.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2647
+ if (no.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
2648
+ if (!so.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2564
2649
  return r;
2565
- }, qi = {
2650
+ }, Qi = {
2566
2651
  calculator: "pie-tool-calculator",
2567
2652
  textToSpeech: "pie-tool-text-to-speech",
2568
2653
  ruler: "pie-tool-ruler",
@@ -2575,22 +2660,22 @@ var Ws = class {
2575
2660
  annotationToolbar: "pie-tool-annotation-toolbar",
2576
2661
  graph: "pie-tool-graph",
2577
2662
  periodicTable: "pie-tool-periodic-table"
2578
- }, Zs = (e, t) => Js(t?.toolTagMap?.[e] ?? qi[e] ?? e, `tool component tag for "${e}"`), eo = (e) => document.createElement(e), ne = (e, t, r, i) => {
2579
- const n = Zs(e, i), s = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
2663
+ }, ao = (e, t) => oo(t?.toolTagMap?.[e] ?? Qi[e] ?? e, `tool component tag for "${e}"`), lo = (e) => document.createElement(e), ce = (e, t, r, i) => {
2664
+ const n = ao(e, i), s = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
2580
2665
  return s ? s({
2581
2666
  toolId: e,
2582
2667
  tagName: n,
2583
2668
  context: t,
2584
2669
  toolbarContext: r
2585
- }) : eo(n);
2586
- }, to = {
2670
+ }) : lo(n);
2671
+ }, co = {
2587
2672
  toolId: "calculator",
2588
2673
  name: "Calculator",
2589
2674
  description: "Multi-type calculator (basic, scientific, graphing)",
2590
2675
  icon: "calculator",
2591
2676
  provider: {
2592
2677
  getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
2593
- createProvider: () => new Ws(),
2678
+ createProvider: () => new Zs(),
2594
2679
  getInitConfig: (e) => e?.provider?.init ?? {},
2595
2680
  getAuthFetcher: (e) => {
2596
2681
  const t = e?.provider?.runtime?.authFetcher;
@@ -2613,10 +2698,10 @@ var Ws = class {
2613
2698
  "scientificCalculator"
2614
2699
  ],
2615
2700
  isVisibleInContext(e) {
2616
- return Pt(e);
2701
+ return Nt(e);
2617
2702
  },
2618
2703
  renderToolbar(e, t) {
2619
- const r = cr(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ne(this.toolId, e, t, i);
2704
+ const r = gr(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ce(this.toolId, e, t, i);
2620
2705
  n.setAttribute("tool-id", r), n.toolkitCoordinator = t.toolkitCoordinator;
2621
2706
  const s = {
2622
2707
  toolId: this.toolId,
@@ -2647,22 +2732,22 @@ var Ws = class {
2647
2732
  }],
2648
2733
  button: s,
2649
2734
  sync: () => {
2650
- const a = t.isToolVisible(r);
2651
- s.active = a, s.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", s.tooltip = a ? "Close calculator" : "Calculator", o !== a && (n.visible = a, o = a), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
2735
+ const l = t.isToolVisible(r);
2736
+ s.active = l, s.ariaLabel = l ? "Close scientific calculator" : "Open scientific calculator", s.tooltip = l ? "Close calculator" : "Calculator", o !== l && (n.visible = l, o = l), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
2652
2737
  },
2653
- subscribeActive: (a) => t.subscribeVisibility ? t.subscribeVisibility(() => {
2654
- a(t.isToolVisible(r));
2738
+ subscribeActive: (l) => t.subscribeVisibility ? t.subscribeVisibility(() => {
2739
+ l(t.isToolVisible(r));
2655
2740
  }) : () => {
2656
2741
  }
2657
2742
  };
2658
2743
  }
2659
- }, ro = /* @__PURE__ */ new Set([
2744
+ }, uo = /* @__PURE__ */ new Set([
2660
2745
  "reserved-row",
2661
2746
  "expanding-row",
2662
2747
  "floating-overlay",
2663
2748
  "left-aligned"
2664
- ]), Dr = (e) => e && typeof e == "object" ? e : {}, io = (e) => e === "polly" || e === "google" || e === "server", j = (e, t) => e === void 0 ? t : e, Ct = (e, t = "left-aligned") => typeof e == "string" && ro.has(e) ? e : t, Fr = Object.freeze([0.8, 1.25]), Bt = (e) => {
2665
- if (!Array.isArray(e)) return [...Fr];
2749
+ ]), Gr = (e) => e && typeof e == "object" ? e : {}, fo = (e) => e === "polly" || e === "google" || e === "server", G = (e, t) => e === void 0 ? t : e, Ot = (e, t = "left-aligned") => typeof e == "string" && uo.has(e) ? e : t, Wr = Object.freeze([0.8, 1.25]), Vt = (e) => {
2750
+ if (!Array.isArray(e)) return [...Wr];
2666
2751
  if (e.length === 0) return [];
2667
2752
  const t = /* @__PURE__ */ new Set();
2668
2753
  for (const r of e) {
@@ -2670,41 +2755,41 @@ var Ws = class {
2670
2755
  const i = Math.round(r * 100) / 100;
2671
2756
  i !== 1 && t.add(i);
2672
2757
  }
2673
- return t.size ? Array.from(t) : [...Fr];
2674
- }, no = (e) => {
2758
+ return t.size ? Array.from(t) : [...Wr];
2759
+ }, ho = (e) => {
2675
2760
  const t = {
2676
2761
  ...e,
2677
- layoutMode: Ct(e.layoutMode)
2762
+ layoutMode: Ot(e.layoutMode)
2678
2763
  }, r = e.backend || "browser";
2679
- if (!io(r)) return t;
2764
+ if (!fo(r)) return t;
2680
2765
  const i = {
2681
2766
  ...t,
2682
- apiEndpoint: j(t.apiEndpoint, "/api/tts"),
2683
- transportMode: j(t.transportMode, "pie"),
2684
- endpointValidationMode: j(t.endpointValidationMode, "voices"),
2685
- validateEndpoint: j(t.validateEndpoint, !0),
2686
- includeAuthOnAssetFetch: j(t.includeAuthOnAssetFetch, !1),
2687
- rate: j(t.rate, 1),
2688
- language: j(t.language, "en-US")
2767
+ apiEndpoint: G(t.apiEndpoint, "/api/tts"),
2768
+ transportMode: G(t.transportMode, "pie"),
2769
+ endpointValidationMode: G(t.endpointValidationMode, "voices"),
2770
+ validateEndpoint: G(t.validateEndpoint, !0),
2771
+ includeAuthOnAssetFetch: G(t.includeAuthOnAssetFetch, !1),
2772
+ rate: G(t.rate, 1),
2773
+ language: G(t.language, "en-US")
2689
2774
  };
2690
2775
  return r === "polly" ? {
2691
2776
  ...i,
2692
- defaultVoice: j(i.defaultVoice, "Joanna"),
2693
- engine: j(i.engine, "neural"),
2694
- format: j(i.format, "mp3"),
2695
- speechMarksMode: j(i.speechMarksMode, "word+sentence")
2777
+ defaultVoice: G(i.defaultVoice, "Joanna"),
2778
+ engine: G(i.engine, "neural"),
2779
+ format: G(i.format, "mp3"),
2780
+ speechMarksMode: G(i.speechMarksMode, "word+sentence")
2696
2781
  } : r === "google" ? {
2697
2782
  ...i,
2698
- defaultVoice: j(i.defaultVoice, "en-US-Wavenet-A")
2783
+ defaultVoice: G(i.defaultVoice, "en-US-Wavenet-A")
2699
2784
  } : i;
2700
- }, Vt = (e) => {
2701
- const t = Dr(e), r = Dr(e?.settings);
2702
- return no({
2785
+ }, zt = (e) => {
2786
+ const t = Gr(e), r = Gr(e?.settings);
2787
+ return ho({
2703
2788
  ...t,
2704
2789
  ...r
2705
2790
  });
2706
- }, Xt = (e) => e.backend || "browser", Ki = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Ui = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), so = (e) => {
2707
- const t = Xt(e), r = Ki(e, t), i = Ui(e, r);
2791
+ }, rr = (e) => e.backend || "browser", Ji = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Zi = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), po = (e) => {
2792
+ const t = rr(e), r = Ji(e, t), i = Zi(e, r);
2708
2793
  return {
2709
2794
  voice: e.defaultVoice,
2710
2795
  rate: e.rate,
@@ -2728,8 +2813,8 @@ var Ws = class {
2728
2813
  includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
2729
2814
  validateEndpoint: e.validateEndpoint
2730
2815
  };
2731
- }, Yi = (e) => Ct(e.layoutMode), oo = (e) => {
2732
- switch (Yi(e)) {
2816
+ }, en = (e) => Ot(e.layoutMode), vo = (e) => {
2817
+ switch (en(e)) {
2733
2818
  case "reserved-row":
2734
2819
  return {
2735
2820
  mount: "before-buttons",
@@ -2755,21 +2840,21 @@ var Ws = class {
2755
2840
  }
2756
2841
  };
2757
2842
  }
2758
- }, Xe = /* @__PURE__ */ new Map(), ao = "__pieToolElementUnmount", Br = "pie-tool-active-change", lo = {
2843
+ }, Ze = /* @__PURE__ */ new Map(), mo = "__pieToolElementUnmount", qr = "pie-tool-active-change", go = {
2759
2844
  toolId: "textToSpeech",
2760
2845
  name: "Text to Speech",
2761
2846
  description: "Read content aloud",
2762
2847
  icon: "volume-up",
2763
2848
  provider: {
2764
2849
  getProviderId: () => "tts",
2765
- createProvider: (e) => new Ys(Xt(Vt(e))),
2850
+ createProvider: (e) => new io(rr(zt(e))),
2766
2851
  getInitConfig: (e) => {
2767
- const t = Vt(e), r = Xt(t), i = Ki(t, r);
2852
+ const t = zt(e), r = rr(t), i = Ji(t, r);
2768
2853
  return {
2769
2854
  backend: r,
2770
2855
  serverProvider: i,
2771
- transportMode: Ui(t, i),
2772
- ...so(t)
2856
+ transportMode: Zi(t, i),
2857
+ ...po(t)
2773
2858
  };
2774
2859
  },
2775
2860
  getAuthFetcher: (e) => {
@@ -2778,9 +2863,9 @@ var Ws = class {
2778
2863
  },
2779
2864
  sanitizeConfig: (e) => {
2780
2865
  const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
2781
- t && "layoutMode" in t && (t.layoutMode = Ct(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = Bt(t.speedOptions));
2866
+ t && "layoutMode" in t && (t.layoutMode = Ot(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = Vt(t.speedOptions));
2782
2867
  const r = { ...e };
2783
- return "layoutMode" in r && (r.layoutMode = Ct(r.layoutMode)), "speedOptions" in r && (r.speedOptions = Bt(r.speedOptions)), t && (r.settings = t), r;
2868
+ return "layoutMode" in r && (r.layoutMode = Ot(r.layoutMode)), "speedOptions" in r && (r.speedOptions = Vt(r.speedOptions)), t && (r.settings = t), r;
2784
2869
  },
2785
2870
  lazy: !0
2786
2871
  },
@@ -2792,47 +2877,47 @@ var Ws = class {
2792
2877
  "speechOutput"
2793
2878
  ],
2794
2879
  isVisibleInContext(e) {
2795
- return xt(e);
2880
+ return Dt(e);
2796
2881
  },
2797
2882
  renderToolbar(e, t) {
2798
- const r = () => Vt(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => Bt(r().speedOptions), n = () => Yi(r()), s = () => oo(r()), o = cr(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
2883
+ const r = () => zt(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => Vt(r().speedOptions), n = () => en(r()), s = () => vo(r()), o = gr(this.toolId, t.scope.level, t.scope.scopeId), l = () => {
2799
2884
  const f = t.ui?.size;
2800
2885
  return f === "sm" || f === "lg" ? f : "md";
2801
2886
  }, c = () => {
2802
- let f = Xe.get(o);
2803
- return f && typeof f.isConnected == "boolean" && !f.isConnected && (Xe.delete(o), f = void 0), f || (f = document.createElement("pie-tool-tts-inline"), f[ao] = () => {
2804
- Xe.get(o) === f && Xe.delete(o);
2805
- }, Xe.set(o, f)), f.setAttribute("tool-id", o), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", a()), f.setAttribute("layout-mode", n()), f.speedOptions = i(), f;
2806
- }, p = s();
2887
+ let f = Ze.get(o);
2888
+ return f && typeof f.isConnected == "boolean" && !f.isConnected && (Ze.delete(o), f = void 0), f || (f = document.createElement("pie-tool-tts-inline"), f[mo] = () => {
2889
+ Ze.get(o) === f && Ze.delete(o);
2890
+ }, Ze.set(o, f)), f.setAttribute("tool-id", o), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", l()), f.setAttribute("layout-mode", n()), f.speedOptions = i(), f;
2891
+ }, d = s();
2807
2892
  return {
2808
2893
  toolId: this.toolId,
2809
2894
  button: null,
2810
2895
  elements: [{
2811
2896
  element: c(),
2812
- mount: p.mount,
2897
+ mount: d.mount,
2813
2898
  layoutHints: { controlsRow: {
2814
- reserveSpace: p.controlsRow.reserveSpace,
2815
- showWhenToolActive: p.controlsRow.expandWhenToolActive
2899
+ reserveSpace: d.controlsRow.reserveSpace,
2900
+ showWhenToolActive: d.controlsRow.expandWhenToolActive
2816
2901
  } }
2817
2902
  }],
2818
2903
  subscribeActive: (f) => {
2819
- const m = c(), h = (v) => {
2820
- const d = v.detail;
2821
- f(d?.active === !0);
2904
+ const v = c(), h = (m) => {
2905
+ const p = m.detail;
2906
+ f(p?.active === !0);
2822
2907
  };
2823
- return m.addEventListener(Br, h), () => {
2824
- m.removeEventListener(Br, h);
2908
+ return v.addEventListener(qr, h), () => {
2909
+ v.removeEventListener(qr, h);
2825
2910
  };
2826
2911
  },
2827
2912
  sync: () => {
2828
2913
  const f = c();
2829
- f.setAttribute("tool-id", o), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", a()), f.setAttribute("layout-mode", n()), f.speedOptions = i();
2914
+ f.setAttribute("tool-id", o), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", l()), f.setAttribute("layout-mode", n()), f.speedOptions = i();
2830
2915
  }
2831
2916
  };
2832
2917
  }
2833
2918
  };
2834
- function ue(e, t) {
2835
- const r = cr(e, t.scope.level, t.scope.scopeId);
2919
+ function he(e, t) {
2920
+ const r = gr(e, t.scope.level, t.scope.scopeId);
2836
2921
  return {
2837
2922
  fullToolId: r,
2838
2923
  isActive: () => t.isToolVisible(r),
@@ -2842,14 +2927,14 @@ function ue(e, t) {
2842
2927
  }
2843
2928
  };
2844
2929
  }
2845
- function de(e) {
2930
+ function pe(e) {
2846
2931
  const t = e.isActive();
2847
2932
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
2848
2933
  }
2849
- function ur(e, t) {
2934
+ function _r(e, t) {
2850
2935
  e.setAttribute("data-pie-tool-surface", t);
2851
2936
  }
2852
- var co = {
2937
+ var _o = {
2853
2938
  toolId: "ruler",
2854
2939
  name: "Ruler",
2855
2940
  description: "On-screen ruler for measurements",
@@ -2861,10 +2946,10 @@ var co = {
2861
2946
  ],
2862
2947
  pnpSupportIds: ["ruler", "measurement"],
2863
2948
  isVisibleInContext(e) {
2864
- return Pt(e);
2949
+ return Nt(e);
2865
2950
  },
2866
2951
  renderToolbar(e, t) {
2867
- const r = ue(this.toolId, t), i = {
2952
+ const r = he(this.toolId, t), i = {
2868
2953
  toolId: this.toolId,
2869
2954
  label: this.name,
2870
2955
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -2873,8 +2958,8 @@ var co = {
2873
2958
  tooltip: "Ruler",
2874
2959
  onClick: () => t.toggleTool(this.toolId),
2875
2960
  active: r.isActive()
2876
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
2877
- return s.setAttribute("tool-id", r.fullToolId), ur(s, "frameless"), {
2961
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
2962
+ return s.setAttribute("tool-id", r.fullToolId), _r(s, "frameless"), {
2878
2963
  toolId: this.toolId,
2879
2964
  button: i,
2880
2965
  elements: [{
@@ -2882,7 +2967,7 @@ var co = {
2882
2967
  mount: "after-buttons"
2883
2968
  }],
2884
2969
  sync: () => {
2885
- de({
2970
+ pe({
2886
2971
  button: i,
2887
2972
  overlay: s,
2888
2973
  isActive: r.isActive
@@ -2891,7 +2976,7 @@ var co = {
2891
2976
  subscribeActive: r.subscribeActive
2892
2977
  };
2893
2978
  }
2894
- }, uo = {
2979
+ }, yo = {
2895
2980
  toolId: "protractor",
2896
2981
  name: "Protractor",
2897
2982
  description: "On-screen protractor for angle measurements",
@@ -2903,10 +2988,10 @@ var co = {
2903
2988
  ],
2904
2989
  pnpSupportIds: ["protractor", "angleMeasurement"],
2905
2990
  isVisibleInContext(e) {
2906
- return Pt(e);
2991
+ return Nt(e);
2907
2992
  },
2908
2993
  renderToolbar(e, t) {
2909
- const r = ue(this.toolId, t), i = {
2994
+ const r = he(this.toolId, t), i = {
2910
2995
  toolId: this.toolId,
2911
2996
  label: this.name,
2912
2997
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -2915,8 +3000,8 @@ var co = {
2915
3000
  tooltip: "Protractor",
2916
3001
  onClick: () => t.toggleTool(this.toolId),
2917
3002
  active: r.isActive()
2918
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
2919
- return s.setAttribute("tool-id", r.fullToolId), ur(s, "frameless"), {
3003
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3004
+ return s.setAttribute("tool-id", r.fullToolId), _r(s, "frameless"), {
2920
3005
  toolId: this.toolId,
2921
3006
  button: i,
2922
3007
  elements: [{
@@ -2924,7 +3009,7 @@ var co = {
2924
3009
  mount: "after-buttons"
2925
3010
  }],
2926
3011
  sync: () => {
2927
- de({
3012
+ pe({
2928
3013
  button: i,
2929
3014
  overlay: s,
2930
3015
  isActive: r.isActive
@@ -2933,7 +3018,7 @@ var co = {
2933
3018
  subscribeActive: r.subscribeActive
2934
3019
  };
2935
3020
  }
2936
- }, fo = {
3021
+ }, bo = {
2937
3022
  toolId: "answerEliminator",
2938
3023
  name: "Answer Eliminator",
2939
3024
  description: "Strike through answer choices",
@@ -2946,10 +3031,10 @@ var co = {
2946
3031
  "choiceMasking"
2947
3032
  ],
2948
3033
  isVisibleInContext(e) {
2949
- return Bs(e);
3034
+ return Us(e);
2950
3035
  },
2951
3036
  renderToolbar(e, t) {
2952
- const r = ue(this.toolId, t), i = t.componentOverrides ?? {}, n = ne(this.toolId, e, t, i);
3037
+ const r = he(this.toolId, t), i = t.componentOverrides ?? {}, n = ce(this.toolId, e, t, i);
2953
3038
  n.setAttribute("tool-id", r.fullToolId), n.setAttribute("strategy", "strikethrough"), n.setAttribute("button-alignment", "inline");
2954
3039
  const s = {
2955
3040
  toolId: this.toolId,
@@ -2969,7 +3054,7 @@ var co = {
2969
3054
  mount: "after-buttons"
2970
3055
  }],
2971
3056
  sync: () => {
2972
- de({
3057
+ pe({
2973
3058
  button: s,
2974
3059
  overlay: n,
2975
3060
  isActive: r.isActive
@@ -2980,7 +3065,7 @@ var co = {
2980
3065
  subscribeActive: r.subscribeActive
2981
3066
  };
2982
3067
  }
2983
- }, ho = {
3068
+ }, wo = {
2984
3069
  toolId: "highlighter",
2985
3070
  name: "Highlighter",
2986
3071
  description: "Highlight text",
@@ -2998,10 +3083,10 @@ var co = {
2998
3083
  "annotation"
2999
3084
  ],
3000
3085
  isVisibleInContext(e) {
3001
- return xt(e);
3086
+ return Dt(e);
3002
3087
  },
3003
3088
  renderToolbar(e, t) {
3004
- const r = ue(this.toolId, t), i = {
3089
+ const r = he(this.toolId, t), i = {
3005
3090
  toolId: this.toolId,
3006
3091
  label: this.name,
3007
3092
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3010,7 +3095,7 @@ var co = {
3010
3095
  tooltip: "Highlight",
3011
3096
  onClick: () => t.toggleTool(this.toolId),
3012
3097
  active: r.isActive()
3013
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
3098
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3014
3099
  return s.setAttribute("tool-id", r.fullToolId), {
3015
3100
  toolId: this.toolId,
3016
3101
  button: i,
@@ -3019,7 +3104,7 @@ var co = {
3019
3104
  mount: "after-buttons"
3020
3105
  }],
3021
3106
  sync: () => {
3022
- de({
3107
+ pe({
3023
3108
  button: i,
3024
3109
  overlay: s,
3025
3110
  isActive: r.isActive,
@@ -3031,7 +3116,7 @@ var co = {
3031
3116
  subscribeActive: r.subscribeActive
3032
3117
  };
3033
3118
  }
3034
- }, po = {
3119
+ }, To = {
3035
3120
  toolId: "lineReader",
3036
3121
  name: "Line Reader",
3037
3122
  description: "Reading guide overlay",
@@ -3050,10 +3135,10 @@ var co = {
3050
3135
  "trackingGuide"
3051
3136
  ],
3052
3137
  isVisibleInContext(e) {
3053
- return xt(e);
3138
+ return Dt(e);
3054
3139
  },
3055
3140
  renderToolbar(e, t) {
3056
- const r = ue(this.toolId, t), i = {
3141
+ const r = he(this.toolId, t), i = {
3057
3142
  toolId: this.toolId,
3058
3143
  label: this.name,
3059
3144
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3062,8 +3147,8 @@ var co = {
3062
3147
  tooltip: "Line Reader",
3063
3148
  onClick: () => t.toggleTool(this.toolId),
3064
3149
  active: r.isActive()
3065
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
3066
- return s.setAttribute("tool-id", r.fullToolId), ur(s, "frameless"), {
3150
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3151
+ return s.setAttribute("tool-id", r.fullToolId), _r(s, "frameless"), {
3067
3152
  toolId: this.toolId,
3068
3153
  button: i,
3069
3154
  elements: [{
@@ -3071,7 +3156,7 @@ var co = {
3071
3156
  mount: "after-buttons"
3072
3157
  }],
3073
3158
  sync: () => {
3074
- de({
3159
+ pe({
3075
3160
  button: i,
3076
3161
  overlay: s,
3077
3162
  isActive: r.isActive
@@ -3080,7 +3165,7 @@ var co = {
3080
3165
  subscribeActive: r.subscribeActive
3081
3166
  };
3082
3167
  }
3083
- }, vo = {
3168
+ }, Ao = {
3084
3169
  toolId: "theme",
3085
3170
  name: "Theme",
3086
3171
  description: "Accessible themes and contrast",
@@ -3099,7 +3184,7 @@ var co = {
3099
3184
  return !0;
3100
3185
  },
3101
3186
  renderToolbar(e, t) {
3102
- const r = ue(this.toolId, t), i = {
3187
+ const r = he(this.toolId, t), i = {
3103
3188
  toolId: this.toolId,
3104
3189
  label: this.name,
3105
3190
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3108,7 +3193,7 @@ var co = {
3108
3193
  tooltip: "Theme",
3109
3194
  onClick: () => t.toggleTool(this.toolId),
3110
3195
  active: r.isActive()
3111
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
3196
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3112
3197
  return s.setAttribute("tool-id", r.fullToolId), {
3113
3198
  toolId: this.toolId,
3114
3199
  button: i,
@@ -3127,7 +3212,7 @@ var co = {
3127
3212
  }
3128
3213
  }],
3129
3214
  sync: () => {
3130
- de({
3215
+ pe({
3131
3216
  button: i,
3132
3217
  overlay: s,
3133
3218
  isActive: r.isActive
@@ -3136,7 +3221,7 @@ var co = {
3136
3221
  subscribeActive: r.subscribeActive
3137
3222
  };
3138
3223
  }
3139
- }, mo = {
3224
+ }, So = {
3140
3225
  toolId: "annotationToolbar",
3141
3226
  name: "Highlighter",
3142
3227
  description: "Highlight and annotate text",
@@ -3157,10 +3242,10 @@ var co = {
3157
3242
  "annotation"
3158
3243
  ],
3159
3244
  isVisibleInContext(e) {
3160
- return xt(e);
3245
+ return Dt(e);
3161
3246
  },
3162
3247
  renderToolbar(e, t) {
3163
- const r = ue(this.toolId, t), i = {
3248
+ const r = he(this.toolId, t), i = {
3164
3249
  toolId: this.toolId,
3165
3250
  label: this.name,
3166
3251
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3169,7 +3254,7 @@ var co = {
3169
3254
  tooltip: "Highlight",
3170
3255
  onClick: () => t.toggleTool(this.toolId),
3171
3256
  active: r.isActive()
3172
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
3257
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3173
3258
  return s.setAttribute("tool-id", r.fullToolId), {
3174
3259
  toolId: this.toolId,
3175
3260
  button: i,
@@ -3178,7 +3263,7 @@ var co = {
3178
3263
  mount: "after-buttons"
3179
3264
  }],
3180
3265
  sync: () => {
3181
- de({
3266
+ pe({
3182
3267
  button: i,
3183
3268
  overlay: s,
3184
3269
  isActive: r.isActive
@@ -3187,7 +3272,7 @@ var co = {
3187
3272
  subscribeActive: r.subscribeActive
3188
3273
  };
3189
3274
  }
3190
- }, go = {
3275
+ }, Io = {
3191
3276
  toolId: "graph",
3192
3277
  name: "Graph",
3193
3278
  description: "Graphing calculator and coordinate plane",
@@ -3200,10 +3285,10 @@ var co = {
3200
3285
  "graphingTool"
3201
3286
  ],
3202
3287
  isVisibleInContext(e) {
3203
- return Pt(e);
3288
+ return Nt(e);
3204
3289
  },
3205
3290
  renderToolbar(e, t) {
3206
- const r = ue(this.toolId, t), i = {
3291
+ const r = he(this.toolId, t), i = {
3207
3292
  toolId: this.toolId,
3208
3293
  label: this.name,
3209
3294
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3212,7 +3297,7 @@ var co = {
3212
3297
  tooltip: "Graph",
3213
3298
  onClick: () => t.toggleTool(this.toolId),
3214
3299
  active: r.isActive()
3215
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
3300
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3216
3301
  return s.setAttribute("tool-id", r.fullToolId), {
3217
3302
  toolId: this.toolId,
3218
3303
  button: i,
@@ -3231,7 +3316,7 @@ var co = {
3231
3316
  }
3232
3317
  }],
3233
3318
  sync: () => {
3234
- de({
3319
+ pe({
3235
3320
  button: i,
3236
3321
  overlay: s,
3237
3322
  isActive: r.isActive
@@ -3240,7 +3325,7 @@ var co = {
3240
3325
  subscribeActive: r.subscribeActive
3241
3326
  };
3242
3327
  }
3243
- }, _o = {
3328
+ }, Eo = {
3244
3329
  toolId: "periodicTable",
3245
3330
  name: "Periodic Table",
3246
3331
  description: "Chemistry periodic table reference",
@@ -3252,10 +3337,10 @@ var co = {
3252
3337
  "elementReference"
3253
3338
  ],
3254
3339
  isVisibleInContext(e) {
3255
- return Vs(e);
3340
+ return Ys(e);
3256
3341
  },
3257
3342
  renderToolbar(e, t) {
3258
- const r = ue(this.toolId, t), i = {
3343
+ const r = he(this.toolId, t), i = {
3259
3344
  toolId: this.toolId,
3260
3345
  label: this.name,
3261
3346
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3264,7 +3349,7 @@ var co = {
3264
3349
  tooltip: "Periodic Table",
3265
3350
  onClick: () => t.toggleTool(this.toolId),
3266
3351
  active: r.isActive()
3267
- }, n = t.componentOverrides ?? {}, s = ne(this.toolId, e, t, n);
3352
+ }, n = t.componentOverrides ?? {}, s = ce(this.toolId, e, t, n);
3268
3353
  return s.setAttribute("tool-id", r.fullToolId), {
3269
3354
  toolId: this.toolId,
3270
3355
  button: i,
@@ -3283,7 +3368,7 @@ var co = {
3283
3368
  }
3284
3369
  }],
3285
3370
  sync: () => {
3286
- de({
3371
+ pe({
3287
3372
  button: i,
3288
3373
  overlay: s,
3289
3374
  isActive: r.isActive
@@ -3292,54 +3377,54 @@ var co = {
3292
3377
  subscribeActive: r.subscribeActive
3293
3378
  };
3294
3379
  }
3295
- }, yo = [
3296
- to,
3297
- lo,
3380
+ }, ko = [
3298
3381
  co,
3299
- uo,
3300
- fo,
3301
- ho,
3302
- po,
3303
- vo,
3304
- mo,
3305
3382
  go,
3306
- _o
3383
+ _o,
3384
+ yo,
3385
+ bo,
3386
+ wo,
3387
+ To,
3388
+ Ao,
3389
+ So,
3390
+ Io,
3391
+ Eo
3307
3392
  ];
3308
- function bo(e = {}) {
3309
- const t = new Ns(), r = {
3393
+ function Co(e = {}) {
3394
+ const t = new Ws(), r = {
3310
3395
  toolTagMap: {
3311
- ...qi,
3396
+ ...Qi,
3312
3397
  ...e.toolTagMap || {}
3313
3398
  },
3314
3399
  toolComponentFactory: e.toolComponentFactory,
3315
3400
  toolComponentFactories: e.toolComponentFactories
3316
3401
  }, i = (n) => e.overrides?.[n.toolId] || n;
3317
- return e.includePackagedTools && wo(t, {
3402
+ return e.includePackagedTools && $o(t, {
3318
3403
  toolIds: e.toolIds,
3319
3404
  applyOverrides: i
3320
3405
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
3321
3406
  }
3322
- function wo(e, t = {}) {
3407
+ function $o(e, t = {}) {
3323
3408
  const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, i = t.applyOverrides || ((n) => n);
3324
- for (const n of yo)
3409
+ for (const n of ko)
3325
3410
  r && !r.has(n.toolId) || e.register(i(n));
3326
3411
  }
3327
- function To(e = {}) {
3328
- return bo({
3412
+ function Lo(e = {}) {
3413
+ return Co({
3329
3414
  ...e,
3330
3415
  includePackagedTools: !0
3331
3416
  });
3332
3417
  }
3333
- function Ao() {
3334
- const e = To(), t = /* @__PURE__ */ new Set();
3418
+ function Oo() {
3419
+ const e = Lo(), t = /* @__PURE__ */ new Set();
3335
3420
  for (const r of e.getAllTools()) for (const i of r.pnpSupportIds || []) t.add(i);
3336
3421
  return [...t].sort();
3337
3422
  }
3338
- var So = Ao(), Ko = {
3339
- supports: [...So],
3423
+ var Ro = Oo(), Zo = {
3424
+ supports: [...Ro],
3340
3425
  prohibitedSupports: [],
3341
3426
  activateAtInit: []
3342
- }, Io = {
3427
+ }, Mo = {
3343
3428
  visual: {
3344
3429
  magnification: "magnification",
3345
3430
  screenMagnifier: "screenMagnifier",
@@ -3452,15 +3537,15 @@ var So = Ao(), Ko = {
3452
3537
  itemGlossary: "itemGlossary",
3453
3538
  tutorialAvailable: "tutorialAvailable"
3454
3539
  }
3455
- }, Uo = Object.values(Io).flatMap((e) => Object.values(e)), Yo = zi("ToolCoordinator"), Qt;
3540
+ }, ea = Object.values(Mo).flatMap((e) => Object.values(e)), ta = Ui("ToolCoordinator"), ir;
3456
3541
  (function(e) {
3457
3542
  e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
3458
- })(Qt || (Qt = {}));
3459
- var Vr;
3543
+ })(ir || (ir = {}));
3544
+ var Kr;
3460
3545
  (function(e) {
3461
3546
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
3462
- })(Vr || (Vr = {}));
3463
- var Xi, ye = class K {
3547
+ })(Kr || (Kr = {}));
3548
+ var tn, we = class Y {
3464
3549
  constructor() {
3465
3550
  u(this, "elementType", "multiple-choice"), u(this, "priority", 100);
3466
3551
  }
@@ -3468,8 +3553,8 @@ var Xi, ye = class K {
3468
3553
  return t.tagName.toLowerCase() === "multiple-choice" || t.classList.contains("multiple-choice");
3469
3554
  }
3470
3555
  findChoices(t) {
3471
- t.setAttribute(K.ROOT_HOOK_ATTR, "true");
3472
- const r = Array.from(t.querySelectorAll(K.CHOICE_SELECTOR));
3556
+ t.setAttribute(Y.ROOT_HOOK_ATTR, "true");
3557
+ const r = Array.from(t.querySelectorAll(Y.CHOICE_SELECTOR));
3473
3558
  for (const i of r) this.annotateChoice(i);
3474
3559
  return this.annotateFeedbackTicks(t), r;
3475
3560
  }
@@ -3488,36 +3573,36 @@ var Xi, ye = class K {
3488
3573
  }
3489
3574
  canEliminate(t) {
3490
3575
  const r = t.querySelector('input[type="checkbox"], input[type="radio"]');
3491
- return !(!r || r.getAttribute("aria-checked") === "true" || r.disabled || (t.closest(`[${K.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelector(`[${K.FEEDBACK_HOOK_ATTR}="true"]`));
3576
+ return !(!r || r.getAttribute("aria-checked") === "true" || r.disabled || (t.closest(`[${Y.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelector(`[${Y.FEEDBACK_HOOK_ATTR}="true"]`));
3492
3577
  }
3493
3578
  getButtonContainer(t) {
3494
3579
  return t;
3495
3580
  }
3496
3581
  generateFallbackId(t) {
3497
- const r = (t.closest(`[${K.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelectorAll(`[${K.CHOICE_HOOK_ATTR}="true"]`) || [];
3582
+ const r = (t.closest(`[${Y.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelectorAll(`[${Y.CHOICE_HOOK_ATTR}="true"]`) || [];
3498
3583
  return `choice-${Array.from(r).indexOf(t)}`;
3499
3584
  }
3500
3585
  annotateChoice(t) {
3501
- t.setAttribute(K.CHOICE_HOOK_ATTR, "true");
3586
+ t.setAttribute(Y.CHOICE_HOOK_ATTR, "true");
3502
3587
  const r = this.resolveLabelElement(t);
3503
- r && r.setAttribute(K.LABEL_HOOK_ATTR, "true");
3588
+ r && r.setAttribute(Y.LABEL_HOOK_ATTR, "true");
3504
3589
  }
3505
3590
  resolveLabelElement(t) {
3506
- return t.querySelector(`[${K.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label") || t.querySelector("span");
3591
+ return t.querySelector(`[${Y.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label") || t.querySelector("span");
3507
3592
  }
3508
3593
  annotateFeedbackTicks(t) {
3509
- for (const r of t.querySelectorAll(".feedback-tick")) r.setAttribute(K.FEEDBACK_HOOK_ATTR, "true");
3594
+ for (const r of t.querySelectorAll(".feedback-tick")) r.setAttribute(Y.FEEDBACK_HOOK_ATTR, "true");
3510
3595
  }
3511
3596
  };
3512
- Xi = ye;
3513
- u(ye, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
3514
- u(ye, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
3515
- u(ye, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
3516
- u(ye, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
3517
- u(ye, "CHOICE_SELECTOR", `[${Xi.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
3518
- var Eo = class {
3597
+ tn = we;
3598
+ u(we, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
3599
+ u(we, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
3600
+ u(we, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
3601
+ u(we, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
3602
+ u(we, "CHOICE_SELECTOR", `[${tn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
3603
+ var Po = class {
3519
3604
  constructor() {
3520
- u(this, "elementType", "ebsr"), u(this, "priority", 95), u(this, "mcAdapter", new ye());
3605
+ u(this, "elementType", "ebsr"), u(this, "priority", 95), u(this, "mcAdapter", new we());
3521
3606
  }
3522
3607
  canHandle(e) {
3523
3608
  return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
@@ -3541,7 +3626,7 @@ var Eo = class {
3541
3626
  getButtonContainer(e) {
3542
3627
  return this.mcAdapter.getButtonContainer(e);
3543
3628
  }
3544
- }, ko = class {
3629
+ }, xo = class {
3545
3630
  constructor() {
3546
3631
  u(this, "elementType", "inline-dropdown"), u(this, "priority", 90);
3547
3632
  }
@@ -3567,12 +3652,12 @@ var Eo = class {
3567
3652
  getButtonContainer(e) {
3568
3653
  return e;
3569
3654
  }
3570
- }, Co = class {
3655
+ }, Ho = class {
3571
3656
  constructor() {
3572
3657
  u(this, "adapters", void 0), this.adapters = [
3573
- new ye(),
3574
- new Eo(),
3575
- new ko()
3658
+ new we(),
3659
+ new Po(),
3660
+ new xo()
3576
3661
  ].sort((e, t) => t.priority - e.priority);
3577
3662
  }
3578
3663
  findAdapter(e) {
@@ -3593,7 +3678,7 @@ var Eo = class {
3593
3678
  registerAdapter(e) {
3594
3679
  this.adapters.push(e), this.adapters.sort((t, r) => r.priority - t.priority);
3595
3680
  }
3596
- }, He = class H {
3681
+ }, De = class D {
3597
3682
  constructor() {
3598
3683
  u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
3599
3684
  }
@@ -3609,14 +3694,14 @@ var Eo = class {
3609
3694
  }
3610
3695
  this.injectHighlightCSS(t);
3611
3696
  const i = new Highlight(r);
3612
- CSS.highlights.set(`${H.HIGHLIGHT_NAME_PREFIX}${t}`, i), this.highlights.set(t, i), this.ranges.set(t, r), this.addAriaAttributes(r);
3697
+ CSS.highlights.set(`${D.HIGHLIGHT_NAME_PREFIX}${t}`, i), this.highlights.set(t, i), this.ranges.set(t, r), this.addAriaAttributes(r);
3613
3698
  }
3614
3699
  remove(t) {
3615
3700
  if (!this.isSupported()) {
3616
3701
  this.removeFallback(t);
3617
3702
  return;
3618
3703
  }
3619
- CSS.highlights.delete(`${H.HIGHLIGHT_NAME_PREFIX}${t}`), this.removeHighlightCSS(t);
3704
+ CSS.highlights.delete(`${D.HIGHLIGHT_NAME_PREFIX}${t}`), this.removeHighlightCSS(t);
3620
3705
  const r = this.ranges.get(t);
3621
3706
  r && this.removeAriaAttributes(r), this.highlights.delete(t), this.ranges.delete(t), this.fallbackContainers.delete(t);
3622
3707
  }
@@ -3634,7 +3719,7 @@ var Eo = class {
3634
3719
  return typeof CSS < "u" && "highlights" in CSS;
3635
3720
  }
3636
3721
  injectHighlightCSS(t) {
3637
- const r = `${H.HIGHLIGHT_STYLE_PREFIX}${t}`;
3722
+ const r = `${D.HIGHLIGHT_STYLE_PREFIX}${t}`;
3638
3723
  if (document.getElementById(r)) return;
3639
3724
  const i = document.createElement("style");
3640
3725
  i.id = r, i.textContent = `
@@ -3645,43 +3730,43 @@ var Eo = class {
3645
3730
  `, document.head.appendChild(i);
3646
3731
  }
3647
3732
  removeHighlightCSS(t) {
3648
- document.getElementById(`${H.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove();
3733
+ document.getElementById(`${D.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove();
3649
3734
  }
3650
3735
  addAriaAttributes(t) {
3651
3736
  const r = this.findChoiceContainer(t);
3652
- r && (r.setAttribute(H.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
3737
+ r && (r.setAttribute(D.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
3653
3738
  }
3654
3739
  removeAriaAttributes(t) {
3655
3740
  const r = this.findChoiceContainer(t);
3656
- r && (r.removeAttribute(H.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
3741
+ r && (r.removeAttribute(D.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
3657
3742
  }
3658
3743
  findChoiceContainer(t) {
3659
3744
  let r = t.startContainer;
3660
3745
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
3661
- if (r.getAttribute(H.CHOICE_HOOK_ATTR) === "true") return r;
3746
+ if (r.getAttribute(D.CHOICE_HOOK_ATTR) === "true") return r;
3662
3747
  r = r.parentElement;
3663
3748
  }
3664
3749
  return null;
3665
3750
  }
3666
3751
  applyFallback(t, r) {
3667
3752
  const i = this.findChoiceContainer(r);
3668
- i && (i.classList.add(H.FALLBACK_CLASS), i.setAttribute(H.ELIMINATED_ATTR, "true"), i.setAttribute(H.ELIMINATED_ID_ATTR, t), this.fallbackContainers.set(t, i), this.addAriaAttributes(r));
3753
+ i && (i.classList.add(D.FALLBACK_CLASS), i.setAttribute(D.ELIMINATED_ATTR, "true"), i.setAttribute(D.ELIMINATED_ID_ATTR, t), this.fallbackContainers.set(t, i), this.addAriaAttributes(r));
3669
3754
  }
3670
3755
  removeFallback(t) {
3671
3756
  const r = this.fallbackContainers.get(t);
3672
3757
  if (!r) return;
3673
- r.classList.remove(H.FALLBACK_CLASS), r.removeAttribute(H.ELIMINATED_ATTR), r.removeAttribute(H.ELIMINATED_ID_ATTR);
3758
+ r.classList.remove(D.FALLBACK_CLASS), r.removeAttribute(D.ELIMINATED_ATTR), r.removeAttribute(D.ELIMINATED_ID_ATTR);
3674
3759
  const i = document.createRange();
3675
3760
  i.selectNodeContents(r), this.removeAriaAttributes(i), this.fallbackContainers.delete(t);
3676
3761
  }
3677
3762
  };
3678
- u(He, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
3679
- u(He, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
3680
- u(He, "FALLBACK_CLASS", "pie-answer-masked-fallback");
3681
- u(He, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
3682
- u(He, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
3683
- u(He, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
3684
- var fe = class L {
3763
+ u(De, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
3764
+ u(De, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
3765
+ u(De, "FALLBACK_CLASS", "pie-answer-masked-fallback");
3766
+ u(De, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
3767
+ u(De, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
3768
+ u(De, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
3769
+ var ve = class R {
3685
3770
  constructor() {
3686
3771
  u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
3687
3772
  }
@@ -3698,14 +3783,14 @@ var fe = class L {
3698
3783
  }
3699
3784
  this.injectHighlightCSS(t);
3700
3785
  const i = new Highlight(r);
3701
- CSS.highlights.set(`${L.HIGHLIGHT_NAME_PREFIX}${t}`, i), this.highlights.set(t, i), this.ranges.set(t, r), this.addAriaAttributes(r);
3786
+ CSS.highlights.set(`${R.HIGHLIGHT_NAME_PREFIX}${t}`, i), this.highlights.set(t, i), this.ranges.set(t, r), this.addAriaAttributes(r);
3702
3787
  }
3703
3788
  remove(t) {
3704
3789
  if (!this.isSupported()) {
3705
3790
  this.removeFallback(t);
3706
3791
  return;
3707
3792
  }
3708
- CSS.highlights.delete(`${L.HIGHLIGHT_NAME_PREFIX}${t}`), this.removeHighlightCSS(t);
3793
+ CSS.highlights.delete(`${R.HIGHLIGHT_NAME_PREFIX}${t}`), this.removeHighlightCSS(t);
3709
3794
  const r = this.ranges.get(t);
3710
3795
  r && this.removeAriaAttributes(r), this.highlights.delete(t), this.ranges.delete(t), this.fallbackContainers.delete(t);
3711
3796
  }
@@ -3723,7 +3808,7 @@ var fe = class L {
3723
3808
  return typeof CSS < "u" && "highlights" in CSS;
3724
3809
  }
3725
3810
  injectHighlightCSS(t) {
3726
- const r = `${L.HIGHLIGHT_STYLE_PREFIX}${t}`;
3811
+ const r = `${R.HIGHLIGHT_STYLE_PREFIX}${t}`;
3727
3812
  if (document.getElementById(r)) return;
3728
3813
  const i = document.createElement("style");
3729
3814
  i.id = r, i.textContent = `
@@ -3736,63 +3821,63 @@ var fe = class L {
3736
3821
  `, document.head.appendChild(i);
3737
3822
  }
3738
3823
  removeHighlightCSS(t) {
3739
- document.getElementById(`${L.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove();
3824
+ document.getElementById(`${R.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove();
3740
3825
  }
3741
3826
  addAriaAttributes(t) {
3742
3827
  const r = this.findChoiceContainer(t);
3743
3828
  if (!r) return;
3744
- r.setAttribute(L.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
3829
+ r.setAttribute(R.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
3745
3830
  const i = this.resolveLabelElement(r);
3746
- if (i && !i.querySelector(`.${L.SR_CLASS}`)) {
3831
+ if (i && !i.querySelector(`.${R.SR_CLASS}`)) {
3747
3832
  const n = document.createElement("span");
3748
- n.className = L.SR_CLASS, n.textContent = " (eliminated)", i.appendChild(n);
3833
+ n.className = R.SR_CLASS, n.textContent = " (eliminated)", i.appendChild(n);
3749
3834
  }
3750
3835
  }
3751
3836
  removeAriaAttributes(t) {
3752
3837
  const r = this.findChoiceContainer(t);
3753
- r && (r.removeAttribute(L.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${L.SR_CLASS}`)?.remove());
3838
+ r && (r.removeAttribute(R.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${R.SR_CLASS}`)?.remove());
3754
3839
  }
3755
3840
  findChoiceContainer(t) {
3756
3841
  let r = t.startContainer;
3757
3842
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
3758
- if (r.getAttribute(L.CHOICE_HOOK_ATTR) === "true") return r;
3843
+ if (r.getAttribute(R.CHOICE_HOOK_ATTR) === "true") return r;
3759
3844
  r = r.parentElement;
3760
3845
  }
3761
3846
  return null;
3762
3847
  }
3763
3848
  applyFallback(t, r) {
3764
3849
  const i = this.findChoiceContainer(r);
3765
- i && (i.classList.add(L.FALLBACK_CLASS), i.setAttribute(L.ELIMINATED_ATTR, "true"), i.setAttribute(L.ELIMINATED_ID_ATTR, t), this.fallbackContainers.set(t, i), this.addAriaAttributes(r));
3850
+ i && (i.classList.add(R.FALLBACK_CLASS), i.setAttribute(R.ELIMINATED_ATTR, "true"), i.setAttribute(R.ELIMINATED_ID_ATTR, t), this.fallbackContainers.set(t, i), this.addAriaAttributes(r));
3766
3851
  }
3767
3852
  removeFallback(t) {
3768
3853
  const r = this.fallbackContainers.get(t);
3769
3854
  if (!r) return;
3770
- r.classList.remove(L.FALLBACK_CLASS), r.removeAttribute(L.ELIMINATED_ATTR), r.removeAttribute(L.ELIMINATED_ID_ATTR);
3855
+ r.classList.remove(R.FALLBACK_CLASS), r.removeAttribute(R.ELIMINATED_ATTR), r.removeAttribute(R.ELIMINATED_ID_ATTR);
3771
3856
  const i = document.createRange();
3772
3857
  i.selectNodeContents(r), this.removeAriaAttributes(i), this.fallbackContainers.delete(t);
3773
3858
  }
3774
3859
  resolveLabelElement(t) {
3775
- return t.querySelector(`[${L.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label");
3860
+ return t.querySelector(`[${R.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label");
3776
3861
  }
3777
3862
  };
3778
- u(fe, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
3779
- u(fe, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
3780
- u(fe, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
3781
- u(fe, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
3782
- u(fe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
3783
- u(fe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
3784
- u(fe, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
3785
- u(fe, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
3786
- var dr = class Qe {
3863
+ u(ve, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
3864
+ u(ve, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
3865
+ u(ve, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
3866
+ u(ve, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
3867
+ u(ve, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
3868
+ u(ve, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
3869
+ u(ve, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
3870
+ u(ve, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
3871
+ var yr = class et {
3787
3872
  constructor(t = "strikethrough", r = "right") {
3788
- u(this, "registry", void 0), u(this, "strategy", void 0), u(this, "eliminatedChoices", /* @__PURE__ */ new Set()), u(this, "choiceElements", /* @__PURE__ */ new Map()), u(this, "choiceButtons", /* @__PURE__ */ new Map()), u(this, "choiceAdapters", /* @__PURE__ */ new Map()), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "storeIntegration", null), this.registry = new Co(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = r;
3873
+ u(this, "registry", void 0), u(this, "strategy", void 0), u(this, "eliminatedChoices", /* @__PURE__ */ new Set()), u(this, "choiceElements", /* @__PURE__ */ new Map()), u(this, "choiceButtons", /* @__PURE__ */ new Map()), u(this, "choiceAdapters", /* @__PURE__ */ new Map()), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "storeIntegration", null), this.registry = new Ho(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = r;
3789
3874
  }
3790
3875
  createStrategy(t) {
3791
3876
  switch (t) {
3792
3877
  case "mask":
3793
- return new He();
3878
+ return new De();
3794
3879
  default:
3795
- return new fe();
3880
+ return new ve();
3796
3881
  }
3797
3882
  }
3798
3883
  initializeForQuestion(t) {
@@ -3812,7 +3897,7 @@ var dr = class Qe {
3812
3897
  }
3813
3898
  createToggleButton(t, r) {
3814
3899
  const i = r.getChoiceId(t), n = r.getChoiceLabel(t), s = document.createElement("button");
3815
- return s.type = "button", s.className = Qe.TOGGLE_CLASS, s.setAttribute("aria-label", `Toggle elimination for ${n}`), s.setAttribute("data-choice-id", i), s.textContent = "⊗", this.applyButtonAlignment(s), s.addEventListener("click", (o) => {
3900
+ return s.type = "button", s.className = et.TOGGLE_CLASS, s.setAttribute("aria-label", `Toggle elimination for ${n}`), s.setAttribute("data-choice-id", i), s.textContent = "⊗", this.applyButtonAlignment(s), s.addEventListener("click", (o) => {
3816
3901
  o.preventDefault(), o.stopPropagation(), this.toggleElimination(t, r);
3817
3902
  }), s;
3818
3903
  }
@@ -3836,12 +3921,12 @@ var dr = class Qe {
3836
3921
  }
3837
3922
  this.strategy.apply(i, n), this.eliminatedChoices.add(i);
3838
3923
  const s = this.choiceButtons.get(i);
3839
- s && (s.classList.add(Qe.TOGGLE_ACTIVE_CLASS), s.setAttribute("aria-pressed", "true")), this.saveState();
3924
+ s && (s.classList.add(et.TOGGLE_ACTIVE_CLASS), s.setAttribute("aria-pressed", "true")), this.saveState();
3840
3925
  }
3841
3926
  restoreChoice(t) {
3842
3927
  this.strategy.remove(t), this.eliminatedChoices.delete(t);
3843
3928
  const r = this.choiceButtons.get(t);
3844
- r && (r.classList.remove(Qe.TOGGLE_ACTIVE_CLASS), r.setAttribute("aria-pressed", "false")), this.saveState();
3929
+ r && (r.classList.remove(et.TOGGLE_ACTIVE_CLASS), r.setAttribute("aria-pressed", "false")), this.saveState();
3845
3930
  }
3846
3931
  resetAll() {
3847
3932
  if (this.eliminatedChoices.size !== 0) {
@@ -3878,8 +3963,8 @@ var dr = class Qe {
3878
3963
  const o = s.createChoiceRange(n);
3879
3964
  if (o) {
3880
3965
  this.strategy.apply(i, o), this.eliminatedChoices.add(i);
3881
- const a = this.choiceButtons.get(i);
3882
- a && (a.classList.add(Qe.TOGGLE_ACTIVE_CLASS), a.setAttribute("aria-pressed", "true"));
3966
+ const l = this.choiceButtons.get(i);
3967
+ l && (l.classList.add(et.TOGGLE_ACTIVE_CLASS), l.setAttribute("aria-pressed", "true"));
3883
3968
  }
3884
3969
  }
3885
3970
  } catch (r) {
@@ -3932,115 +4017,115 @@ var dr = class Qe {
3932
4017
  this.cleanupButtons(), this.strategy.destroy();
3933
4018
  }
3934
4019
  };
3935
- u(dr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
3936
- u(dr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
3937
- var $o = /* @__PURE__ */ fs('<div style="display: none;" aria-hidden="true"></div>');
3938
- function Oo(e, t) {
3939
- Qr(t, !0);
3940
- let r = he(t, "visible", 7, !1), i = he(t, "toolId", 7, "answerEliminator"), n = he(t, "strategy", 7, "strikethrough"), s = he(t, "alwaysOn", 7, !1), o = he(t, "buttonAlignment", 7, "right"), a = he(t, "scopeElement", 7, null), c = he(t, "elementToolStateStore", 7, null), p = he(t, "globalElementId", 7, ""), f = /* @__PURE__ */ P(null), m = /* @__PURE__ */ P(null), h = /* @__PURE__ */ P(null);
3941
- const v = /* @__PURE__ */ Ir(() => g(m)?.toolCoordinator);
3942
- let d = /* @__PURE__ */ P(null), y = /* @__PURE__ */ P(null), _ = /* @__PURE__ */ P(null), S = /* @__PURE__ */ P(null), B = /* @__PURE__ */ Ir(() => s() || r());
3943
- Ae(() => {
4020
+ u(yr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
4021
+ u(yr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
4022
+ var No = /* @__PURE__ */ _s('<div style="display: none;" aria-hidden="true"></div>');
4023
+ function Do(e, t) {
4024
+ ii(t, !0);
4025
+ let r = me(t, "visible", 7, !1), i = me(t, "toolId", 7, "answerEliminator"), n = me(t, "strategy", 7, "strikethrough"), s = me(t, "alwaysOn", 7, !1), o = me(t, "buttonAlignment", 7, "right"), l = me(t, "scopeElement", 7, null), c = me(t, "elementToolStateStore", 7, null), d = me(t, "globalElementId", 7, ""), f = /* @__PURE__ */ H(null), v = /* @__PURE__ */ H(null), h = /* @__PURE__ */ H(null);
4026
+ const m = /* @__PURE__ */ Or(() => g(v)?.toolCoordinator);
4027
+ let p = /* @__PURE__ */ H(null), y = /* @__PURE__ */ H(null), _ = /* @__PURE__ */ H(null), E = /* @__PURE__ */ H(null), j = /* @__PURE__ */ Or(() => s() || r());
4028
+ Ee(() => {
3944
4029
  if (g(f))
3945
- return Ms(g(f), (I) => {
3946
- $(m, I, !0);
4030
+ return Fs(g(f), (k) => {
4031
+ $(v, k, !0);
3947
4032
  });
3948
- }), Ae(() => {
4033
+ }), Ee(() => {
3949
4034
  if (g(f))
3950
- return Ps(g(f), (I) => {
3951
- $(h, I, !0);
4035
+ return Bs(g(f), (k) => {
4036
+ $(h, k, !0);
3952
4037
  });
3953
4038
  });
3954
- function k() {
3955
- return a() || g(h)?.scopeElement || null;
4039
+ function C() {
4040
+ return l() || g(h)?.scopeElement || null;
3956
4041
  }
3957
- function q() {
3958
- if (!g(B) || !g(d)) return;
3959
- const I = k();
3960
- if (!I) {
4042
+ function U() {
4043
+ if (!g(j) || !g(p)) return;
4044
+ const k = C();
4045
+ if (!k) {
3961
4046
  console.warn("[AnswerEliminator] Missing shell scope context for question root");
3962
4047
  return;
3963
4048
  }
3964
- g(d).initializeForQuestion(I);
4049
+ g(p).initializeForQuestion(k);
3965
4050
  }
3966
- function be() {
4051
+ function Te() {
3967
4052
  requestAnimationFrame(() => {
3968
4053
  requestAnimationFrame(() => {
3969
- q();
4054
+ U();
3970
4055
  });
3971
4056
  });
3972
4057
  }
3973
- Ae(() => {
3974
- !g(v) || !i() || (g(S) && g(_) && (g(S) !== g(v) || g(_) !== i()) && (g(S).unregisterTool(g(_)), $(S, null), $(_, null)), g(_) || (g(v).registerTool(i(), "Answer Eliminator", void 0, Qt.MODAL), $(S, g(v), !0), $(_, i())));
3975
- }), Ae(() => {
3976
- g(d) && c() && p() && g(d).setStoreIntegration(c(), p());
3977
- }), ys(() => ($(d, new dr(n(), o()), !0), g(d) && c() && p() && g(d).setStoreIntegration(c(), p()), g(B) ? q() : g(d).cleanup(), () => {
3978
- g(d)?.destroy(), $(d, null), g(S) && g(_) && (g(S).unregisterTool(g(_)), $(S, null), $(_, null));
3979
- })), Ae(() => {
3980
- const I = g(h)?.contextVersion ?? null;
3981
- if (I !== null) {
4058
+ Ee(() => {
4059
+ !g(m) || !i() || (g(E) && g(_) && (g(E) !== g(m) || g(_) !== i()) && (g(E).unregisterTool(g(_)), $(E, null), $(_, null)), g(_) || (g(m).registerTool(i(), "Answer Eliminator", void 0, ir.MODAL), $(E, g(m), !0), $(_, i())));
4060
+ }), Ee(() => {
4061
+ g(p) && c() && d() && g(p).setStoreIntegration(c(), d());
4062
+ }), Is(() => ($(p, new yr(n(), o()), !0), g(p) && c() && d() && g(p).setStoreIntegration(c(), d()), g(j) ? U() : g(p).cleanup(), () => {
4063
+ g(p)?.destroy(), $(p, null), g(E) && g(_) && (g(E).unregisterTool(g(_)), $(E, null), $(_, null));
4064
+ })), Ee(() => {
4065
+ const k = g(h)?.contextVersion ?? null;
4066
+ if (k !== null) {
3982
4067
  if (g(y) === null) {
3983
- $(y, I, !0);
4068
+ $(y, k, !0);
3984
4069
  return;
3985
4070
  }
3986
- I !== g(y) && ($(y, I, !0), be());
4071
+ k !== g(y) && ($(y, k, !0), Te());
3987
4072
  }
3988
- }), Ae(() => {
3989
- g(d) && (g(B) ? (g(d).enableStateRestoration(), q()) : g(d).cleanup());
4073
+ }), Ee(() => {
4074
+ g(p) && (g(j) ? (g(p).enableStateRestoration(), U()) : g(p).cleanup());
3990
4075
  });
3991
- var Ye = {
4076
+ var Qe = {
3992
4077
  get visible() {
3993
4078
  return r();
3994
4079
  },
3995
- set visible(I = !1) {
3996
- r(I), se();
4080
+ set visible(k = !1) {
4081
+ r(k), ue();
3997
4082
  },
3998
4083
  get toolId() {
3999
4084
  return i();
4000
4085
  },
4001
- set toolId(I = "answerEliminator") {
4002
- i(I), se();
4086
+ set toolId(k = "answerEliminator") {
4087
+ i(k), ue();
4003
4088
  },
4004
4089
  get strategy() {
4005
4090
  return n();
4006
4091
  },
4007
- set strategy(I = "strikethrough") {
4008
- n(I), se();
4092
+ set strategy(k = "strikethrough") {
4093
+ n(k), ue();
4009
4094
  },
4010
4095
  get alwaysOn() {
4011
4096
  return s();
4012
4097
  },
4013
- set alwaysOn(I = !1) {
4014
- s(I), se();
4098
+ set alwaysOn(k = !1) {
4099
+ s(k), ue();
4015
4100
  },
4016
4101
  get buttonAlignment() {
4017
4102
  return o();
4018
4103
  },
4019
- set buttonAlignment(I = "right") {
4020
- o(I), se();
4104
+ set buttonAlignment(k = "right") {
4105
+ o(k), ue();
4021
4106
  },
4022
4107
  get scopeElement() {
4023
- return a();
4108
+ return l();
4024
4109
  },
4025
- set scopeElement(I = null) {
4026
- a(I), se();
4110
+ set scopeElement(k = null) {
4111
+ l(k), ue();
4027
4112
  },
4028
4113
  get elementToolStateStore() {
4029
4114
  return c();
4030
4115
  },
4031
- set elementToolStateStore(I = null) {
4032
- c(I), se();
4116
+ set elementToolStateStore(k = null) {
4117
+ c(k), ue();
4033
4118
  },
4034
4119
  get globalElementId() {
4035
- return p();
4120
+ return d();
4036
4121
  },
4037
- set globalElementId(I = "") {
4038
- p(I), se();
4122
+ set globalElementId(k = "") {
4123
+ d(k), ue();
4039
4124
  }
4040
- }, fr = $o();
4041
- return Ts(fr, (I) => $(f, I), () => g(f)), Hi(e, fr), Jr(Ye);
4125
+ }, br = No();
4126
+ return Cs(br, (k) => $(f, k), () => g(f)), ji(e, br), ni(Qe);
4042
4127
  }
4043
- customElements.define("pie-tool-answer-eliminator", Es(Oo, {
4128
+ customElements.define("pie-tool-answer-eliminator", Rs(Do, {
4044
4129
  visible: {
4045
4130
  attribute: "visible",
4046
4131
  type: "Boolean"
@@ -4066,5 +4151,5 @@ customElements.define("pie-tool-answer-eliminator", Es(Oo, {
4066
4151
  globalElementId: { type: "String" }
4067
4152
  }, [], [], { mode: "open" }));
4068
4153
  export {
4069
- Oo as default
4154
+ Do as default
4070
4155
  };