@pie-players/pie-tool-answer-eliminator 1.0.0-beta.0 → 1.0.0-beta.1

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,17 +1,17 @@
1
- import { coerceBooleanAttributes as xn } from "@pie-players/pie-players-shared/ui/attribute-coercion";
2
- import { connectToolRuntimeContext as Hn, connectToolShellContext as Nn } from "@pie-players/pie-assessment-toolkit/tools/registration";
3
- import { parseVersionedTagName as Pn } from "@pie-players/pie-players-shared/pie/tag-names";
1
+ import { coerceBooleanAttributes as Bn } from "@pie-players/pie-players-shared/ui/attribute-coercion";
2
+ import { connectToolRuntimeContext as Fn, connectToolShellContext as Gn } from "@pie-players/pie-assessment-toolkit/tools/registration";
3
+ import { parseVersionedTagName as Dn } from "@pie-players/pie-players-shared/pie/tag-names";
4
4
  if (typeof window < "u") {
5
5
  var hr, dr;
6
6
  ((hr = (dr = window).__svelte ?? (dr.__svelte = {})).v ?? (hr.v = /* @__PURE__ */ new Set())).add("5");
7
7
  }
8
- var gt = {}, N = /* @__PURE__ */ Symbol("uninitialized");
9
- var Bn = Array.isArray, Fn = Array.prototype.indexOf, yt = Array.prototype.includes, Gn = Array.from, bt = Object.keys, Ze = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, Kn = Object.prototype, Wn = Array.prototype, Dn = Object.getPrototypeOf, vr = Object.isExtensible, jn = () => {
8
+ var yt = {}, N = /* @__PURE__ */ Symbol("uninitialized");
9
+ var Wn = Array.isArray, jn = Array.prototype.indexOf, bt = Array.prototype.includes, qn = Array.from, wt = Object.keys, Ze = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, Yn = Object.prototype, zn = Array.prototype, Vn = Object.getPrototypeOf, vr = Object.isExtensible, Xn = () => {
10
10
  };
11
- function qn(t) {
11
+ function Un(t) {
12
12
  for (var e = 0; e < t.length; e++) t[e]();
13
13
  }
14
- function Yn() {
14
+ function Qn() {
15
15
  var t, e;
16
16
  return {
17
17
  promise: new Promise((r, n) => {
@@ -29,7 +29,7 @@ function et(t) {
29
29
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
30
30
  }, et(t);
31
31
  }
32
- function Vn(t, e) {
32
+ function Jn(t, e) {
33
33
  if (et(t) != "object" || !t) return t;
34
34
  var r = t[Symbol.toPrimitive];
35
35
  if (r !== void 0) {
@@ -39,53 +39,53 @@ function Vn(t, e) {
39
39
  }
40
40
  return (e === "string" ? String : Number)(t);
41
41
  }
42
- function zn(t) {
43
- var e = Vn(t, "string");
42
+ function Zn(t) {
43
+ var e = Jn(t, "string");
44
44
  return et(e) == "symbol" ? e : e + "";
45
45
  }
46
- function o(t, e, r) {
47
- return (e = zn(e)) in t ? Object.defineProperty(t, e, {
46
+ function u(t, e, r) {
47
+ return (e = Zn(e)) in t ? Object.defineProperty(t, e, {
48
48
  value: r,
49
49
  enumerable: !0,
50
50
  configurable: !0,
51
51
  writable: !0
52
52
  }) : t[e] = r, t;
53
53
  }
54
- var Ls = 1 << 24, ne = 1024, z = 2048, Oe = 4096, Mr = 8192, Xn = 16384, xr = 32768, _r = 1 << 25, Hr = 65536, Os = 1 << 17, Is = 1 << 18, st = 1 << 19, Un = 1 << 20, pr = 1 << 21, Ms = 1 << 22, Nr = 1 << 23, Ue = /* @__PURE__ */ Symbol("$state"), Pr = /* @__PURE__ */ Symbol("component"), Br = /* @__PURE__ */ Symbol("legacy props"), Qn = /* @__PURE__ */ Symbol("proxy path"), Jn = /* @__PURE__ */ Symbol("attributes"), Zn = /* @__PURE__ */ Symbol("class"), ei = /* @__PURE__ */ Symbol("style"), ti = /* @__PURE__ */ Symbol("text"), It = new class extends Error {
54
+ var Gs = 1 << 24, ne = 1024, V = 2048, Oe = 4096, Nr = 8192, ei = 16384, Pr = 32768, _r = 1 << 25, Kr = 65536, Ds = 1 << 17, Ws = 1 << 18, st = 1 << 19, ti = 1 << 20, pr = 1 << 21, js = 1 << 22, Br = 1 << 23, Ue = /* @__PURE__ */ Symbol("$state"), Fr = /* @__PURE__ */ Symbol("component"), Gr = /* @__PURE__ */ Symbol("legacy props"), ri = /* @__PURE__ */ Symbol("proxy path"), ni = /* @__PURE__ */ Symbol("attributes"), ii = /* @__PURE__ */ Symbol("class"), si = /* @__PURE__ */ Symbol("style"), ai = /* @__PURE__ */ Symbol("text"), It = new class extends Error {
55
55
  constructor(...e) {
56
- super(...e), o(this, "name", "StaleReactionError"), o(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
56
+ super(...e), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
57
57
  }
58
- }(), Hs = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
59
- function ri() {
58
+ }(), Ys = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
59
+ function li() {
60
60
  console.warn("https://svelte.dev/e/derived_inert");
61
61
  }
62
- function Fr(t) {
62
+ function Dr(t) {
63
63
  console.warn("https://svelte.dev/e/hydration_mismatch");
64
64
  }
65
- function ni() {
65
+ function oi() {
66
66
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
67
67
  }
68
68
  var J = !1;
69
69
  function lt(t) {
70
70
  J = t;
71
71
  }
72
- var G;
72
+ var F;
73
73
  function tt(t) {
74
74
  if (t === null)
75
- throw Fr(), gt;
76
- return G = t;
75
+ throw Dr(), yt;
76
+ return F = t;
77
77
  }
78
- function Gr() {
79
- return tt(/* @__PURE__ */ qe(G));
78
+ function Wr() {
79
+ return tt(/* @__PURE__ */ qe(F));
80
80
  }
81
- function ii(t = 1) {
81
+ function ui(t = 1) {
82
82
  if (J) {
83
- for (var e = t, r = G; e--; ) r = /* @__PURE__ */ qe(r);
84
- G = r;
83
+ for (var e = t, r = F; e--; ) r = /* @__PURE__ */ qe(r);
84
+ F = r;
85
85
  }
86
86
  }
87
- function si(t = !0) {
88
- for (var e = 0, r = G; ; ) {
87
+ function ci(t = !0) {
88
+ for (var e = 0, r = F; ; ) {
89
89
  if (r.nodeType === 8) {
90
90
  var n = r.data;
91
91
  if (n === "]") {
@@ -97,114 +97,114 @@ function si(t = !0) {
97
97
  t && r.remove(), r = i;
98
98
  }
99
99
  }
100
- function Kr(t) {
100
+ function jr(t) {
101
101
  return t === this.v;
102
102
  }
103
- function ai(t, e) {
103
+ function fi(t, e) {
104
104
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
105
105
  }
106
- function Wr(t) {
107
- return !ai(t, this.v);
106
+ function qr(t) {
107
+ return !fi(t, this.v);
108
108
  }
109
- function li(t) {
109
+ function hi(t) {
110
110
  throw new Error("https://svelte.dev/e/effect_in_teardown");
111
111
  }
112
- function oi() {
112
+ function di() {
113
113
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
114
114
  }
115
- function ui(t) {
115
+ function vi(t) {
116
116
  throw new Error("https://svelte.dev/e/effect_orphan");
117
117
  }
118
- function fi() {
118
+ function _i() {
119
119
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
120
120
  }
121
- function ci() {
121
+ function pi() {
122
122
  throw new Error("https://svelte.dev/e/hydration_failed");
123
123
  }
124
- function hi(t) {
124
+ function mi(t) {
125
125
  throw new Error("https://svelte.dev/e/props_invalid_value");
126
126
  }
127
- function di() {
127
+ function gi() {
128
128
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
129
129
  }
130
- function vi() {
130
+ function yi() {
131
131
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
132
132
  }
133
- function _i() {
133
+ function bi() {
134
134
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
135
135
  }
136
- function pi() {
136
+ function wi() {
137
137
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
138
138
  }
139
- var Ie = !1, Mt = !1;
139
+ var Me = !1, xt = !1;
140
140
  function mr(t, e) {
141
- return t.label = e, mi(t.v, e), t;
141
+ return t.label = e, Si(t.v, e), t;
142
142
  }
143
- function mi(t, e) {
144
- return t?.[Qn]?.(e), t;
143
+ function Si(t, e) {
144
+ return t?.[ri]?.(e), t;
145
145
  }
146
- var M = null;
147
- function wt(t) {
148
- M = t;
146
+ var I = null;
147
+ function St(t) {
148
+ I = t;
149
149
  }
150
- function Dr(t, e = !1, r) {
151
- M = {
152
- p: M,
150
+ function Yr(t, e = !1, r) {
151
+ I = {
152
+ p: I,
153
153
  i: !1,
154
154
  c: null,
155
155
  e: null,
156
156
  s: t,
157
157
  x: null,
158
158
  r: $,
159
- l: Mt && !e ? {
159
+ l: xt && !e ? {
160
160
  s: null,
161
161
  u: null,
162
162
  $: []
163
163
  } : null
164
164
  };
165
165
  }
166
- function jr(t) {
167
- var e = M, r = e.e;
166
+ function zr(t) {
167
+ var e = I, r = e.e;
168
168
  if (r !== null) {
169
169
  e.e = null;
170
- for (var n of r) dn(n);
170
+ for (var n of r) pn(n);
171
171
  }
172
- return t !== void 0 && (e.x = t), e.i = !0, M = e.p, er(t);
172
+ return t !== void 0 && (e.x = t), e.i = !0, I = e.p, tr(t);
173
173
  }
174
- function er(t = {}) {
175
- return Ze(t, Pr, { value: !0 }), t;
174
+ function tr(t = {}) {
175
+ return Ze(t, Fr, { value: !0 }), t;
176
176
  }
177
- function xt() {
178
- return !Mt || M !== null && M.l === null;
177
+ function Ht() {
178
+ return !xt || I !== null && I.l === null;
179
179
  }
180
180
  var we = [];
181
- function qr() {
181
+ function Vr() {
182
182
  var t = we;
183
- we = [], qn(t);
183
+ we = [], Un(t);
184
184
  }
185
- function ke(t) {
185
+ function Ce(t) {
186
186
  if (we.length === 0 && !Qe) {
187
187
  var e = we;
188
188
  queueMicrotask(() => {
189
- e === we && qr();
189
+ e === we && Vr();
190
190
  });
191
191
  }
192
192
  we.push(t);
193
193
  }
194
- function gi() {
195
- for (; we.length > 0; ) qr();
194
+ function Ai() {
195
+ for (; we.length > 0; ) Vr();
196
196
  }
197
- var yi = ~(z | Oe | ne);
197
+ var Ei = ~(V | Oe | ne);
198
198
  function O(t, e) {
199
- t.f = t.f & yi | e;
199
+ t.f = t.f & Ei | e;
200
200
  }
201
- function tr(t) {
201
+ function rr(t) {
202
202
  (t.f & 512) !== 0 || t.deps === null ? O(t, ne) : O(t, Oe);
203
203
  }
204
- function Yr(t, e, r) {
204
+ function Xr(t, e, r) {
205
205
  (t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && r.add(t), O(t, ne);
206
206
  }
207
- function Ht(t) {
207
+ function Nt(t) {
208
208
  var e = E, r = $;
209
209
  le(null), _e(null);
210
210
  try {
@@ -214,13 +214,13 @@ function Ht(t) {
214
214
  }
215
215
  }
216
216
  // @__NO_SIDE_EFFECTS__
217
- function St(t) {
218
- var e = 2 | z;
217
+ function At(t) {
218
+ var e = 2 | V;
219
219
  return $ !== null && ($.f |= st), {
220
- ctx: M,
220
+ ctx: I,
221
221
  deps: null,
222
222
  effects: null,
223
- equals: Kr,
223
+ equals: jr,
224
224
  f: e,
225
225
  fn: t,
226
226
  reactions: null,
@@ -231,62 +231,62 @@ function St(t) {
231
231
  ac: null
232
232
  };
233
233
  }
234
- var bi = /* @__PURE__ */ Symbol("obsolete");
234
+ var Ti = /* @__PURE__ */ Symbol("obsolete");
235
235
  // @__NO_SIDE_EFFECTS__
236
236
  function gr(t) {
237
- const e = /* @__PURE__ */ St(t);
238
- return Ie || mn(e), e;
237
+ const e = /* @__PURE__ */ At(t);
238
+ return Me || bn(e), e;
239
239
  }
240
240
  // @__NO_SIDE_EFFECTS__
241
- function wi(t) {
242
- const e = /* @__PURE__ */ St(t);
243
- return e.equals = Wr, e;
241
+ function $i(t) {
242
+ const e = /* @__PURE__ */ At(t);
243
+ return e.equals = qr, e;
244
244
  }
245
- function Si(t) {
245
+ function ki(t) {
246
246
  var e = t.effects;
247
247
  if (e !== null) {
248
248
  t.effects = null;
249
249
  for (var r = 0; r < e.length; r += 1) Z(e[r]);
250
250
  }
251
251
  }
252
- function rr(t) {
252
+ function nr(t) {
253
253
  var e, r = $, n = t.parent;
254
- if (!ce && n !== null && t.v !== N && (n.f & 24576) !== 0)
255
- return ri(), t.v;
254
+ if (!fe && n !== null && t.v !== N && (n.f & 24576) !== 0)
255
+ return li(), t.v;
256
256
  _e(n);
257
257
  try {
258
- Si(t), e = wn(t);
258
+ ki(t), e = En(t);
259
259
  } finally {
260
260
  _e(r);
261
261
  }
262
262
  return e;
263
263
  }
264
- function Vr(t) {
265
- var e = rr(t);
266
- if (!t.equals(e) && (t.wv = yn(), (!T?.is_fork || t.deps === null) && (T !== null ? (T.capture(t, e, !0), jt?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
264
+ function Ur(t) {
265
+ var e = nr(t);
266
+ if (!t.equals(e) && (t.wv = Sn(), (!T?.is_fork || t.deps === null) && (T !== null ? (T.capture(t, e, !0), qt?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
267
267
  O(t, ne);
268
268
  return;
269
269
  }
270
- ce || (F !== null ? (ar() || T?.is_fork) && F.set(t, e) : tr(t));
270
+ fe || (B !== null ? (lr() || T?.is_fork) && B.set(t, e) : rr(t));
271
271
  }
272
- function Ai(t) {
272
+ function Ci(t) {
273
273
  if (t.effects !== null)
274
- for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && Ht(() => {
274
+ for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && Nt(() => {
275
275
  e.ac.abort(It), e.ac = null;
276
- }), e.fn !== null && (e.teardown = jn), nt(e, 0), or(e));
276
+ }), e.fn !== null && (e.teardown = Xn), nt(e, 0), ur(e));
277
277
  }
278
- function zr(t) {
278
+ function Qr(t) {
279
279
  if (t.effects !== null)
280
- for (const e of t.effects) e.teardown && e.fn !== null && De(e);
280
+ for (const e of t.effects) e.teardown && e.fn !== null && We(e);
281
281
  }
282
- function Xr(t, e) {
282
+ function Jr(t, e) {
283
283
  if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
284
284
  }
285
- function nr(t, e) {
286
- Xr(t, e), e.add(t);
285
+ function ir(t, e) {
286
+ Jr(t, e), e.add(t);
287
287
  }
288
288
  function S(t, e, r) {
289
- Xr(t, e), e.set(t, r);
289
+ Jr(t, e), e.set(t, r);
290
290
  }
291
291
  function g(t, e, r) {
292
292
  if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : r;
@@ -298,10 +298,10 @@ function m(t, e, r) {
298
298
  function a(t, e) {
299
299
  return t.get(g(t, e));
300
300
  }
301
- var Ur, At = null, Pe = null, T = null, jt = null, F = null, qt = null, Qe = !1, Ft = !1, rt = null, Et = null, Qr = 0;
302
- var Ei = 1, Tt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakSet(), je = class Jr {
301
+ var Zr, Et = null, Pe = null, T = null, qt = null, B = null, Yt = null, Qe = !1, Ft = !1, rt = null, Tt = null, en = 0;
302
+ var Ri = 1, $t = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), je = class tn {
303
303
  constructor() {
304
- nr(this, C), o(this, "id", Ei++), S(this, Tt, !1), o(this, "linked", !0), S(this, Te, null), S(this, Se, null), o(this, "async_deriveds", /* @__PURE__ */ new Map()), o(this, "current", /* @__PURE__ */ new Map()), o(this, "previous", /* @__PURE__ */ new Map()), S(this, $t, /* @__PURE__ */ new Set()), S(this, ot, /* @__PURE__ */ new Set()), S(this, Be, 0), S(this, ye, /* @__PURE__ */ new Map()), S(this, Ve, null), S(this, X, []), S(this, Yt, []), S(this, Re, /* @__PURE__ */ new Set()), S(this, fe, /* @__PURE__ */ new Set()), S(this, he, /* @__PURE__ */ new Map()), S(this, dt, /* @__PURE__ */ new Set()), o(this, "is_fork", !1), S(this, ze, !1), Pe === null ? At = Pe = this : (m(Se, Pe, this), m(Te, this, Pe)), Pe = this;
304
+ ir(this, k), u(this, "id", Ri++), S(this, $t, !1), u(this, "linked", !0), S(this, Te, null), S(this, Se, null), u(this, "async_deriveds", /* @__PURE__ */ new Map()), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), S(this, kt, /* @__PURE__ */ new Set()), S(this, ot, /* @__PURE__ */ new Set()), S(this, Ke, 0), S(this, ye, /* @__PURE__ */ new Map()), S(this, ze, null), S(this, X, []), S(this, zt, []), S(this, Re, /* @__PURE__ */ new Set()), S(this, ce, /* @__PURE__ */ new Set()), S(this, he, /* @__PURE__ */ new Map()), S(this, dt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), S(this, Ve, !1), Pe === null ? Et = Pe = this : (m(Se, Pe, this), m(Te, this, Pe)), Pe = this;
305
305
  }
306
306
  skip_effect(e) {
307
307
  a(he, this).has(e) || a(he, this).set(e, {
@@ -314,83 +314,83 @@ var Ei = 1, Tt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap
314
314
  if (n) {
315
315
  a(he, this).delete(e);
316
316
  for (var i of n.d)
317
- O(i, z), r(i);
317
+ O(i, V), r(i);
318
318
  for (i of n.m)
319
319
  O(i, Oe), r(i);
320
320
  }
321
321
  a(dt, this).add(e);
322
322
  }
323
323
  capture(e, r, n = !1) {
324
- e.v !== N && !this.previous.has(e) && this.previous.set(e, e.v), (e.f & 8388608) === 0 && (this.current.set(e, [r, n]), F?.set(e, r)), this.is_fork || (e.v = r);
324
+ e.v !== N && !this.previous.has(e) && this.previous.set(e, e.v), (e.f & 8388608) === 0 && (this.current.set(e, [r, n]), B?.set(e, r)), this.is_fork || (e.v = r);
325
325
  }
326
326
  activate() {
327
327
  T = this;
328
328
  }
329
329
  deactivate() {
330
- T = null, F = null;
330
+ T = null, B = null;
331
331
  }
332
332
  flush() {
333
333
  try {
334
- Ft = !0, T = this, g(C, this, Ct).call(this);
334
+ Ft = !0, T = this, g(k, this, Ct).call(this);
335
335
  } finally {
336
- Qr = 0, qt = null, rt = null, Et = null, Ft = !1, T = null, F = null, ae.clear();
336
+ en = 0, Yt = null, rt = null, Tt = null, Ft = !1, T = null, B = null, ae.clear();
337
337
  }
338
338
  }
339
339
  discard() {
340
340
  for (const e of a(ot, this)) e(this);
341
341
  a(ot, this).clear();
342
- for (const e of this.async_deriveds.values()) e.reject(bi);
343
- g(C, this, kt).call(this), a(Ve, this)?.resolve();
342
+ for (const e of this.async_deriveds.values()) e.reject(Ti);
343
+ g(k, this, Rt).call(this), a(ze, this)?.resolve();
344
344
  }
345
345
  register_created_effect(e) {
346
- a(Yt, this).push(e);
346
+ a(zt, this).push(e);
347
347
  }
348
348
  increment(e, r) {
349
- if (m(Be, this, a(Be, this) + 1), e) {
349
+ if (m(Ke, this, a(Ke, this) + 1), e) {
350
350
  let n = a(ye, this).get(r) ?? 0;
351
351
  a(ye, this).set(r, n + 1);
352
352
  }
353
353
  }
354
354
  decrement(e, r) {
355
- if (m(Be, this, a(Be, this) - 1), e) {
355
+ if (m(Ke, this, a(Ke, this) - 1), e) {
356
356
  let n = a(ye, this).get(r) ?? 0;
357
357
  n === 1 ? a(ye, this).delete(r) : a(ye, this).set(r, n - 1);
358
358
  }
359
- a(ze, this) || (m(ze, this, !0), ke(() => {
360
- m(ze, this, !1), this.linked && this.flush();
359
+ a(Ve, this) || (m(Ve, this, !0), Ce(() => {
360
+ m(Ve, this, !1), this.linked && this.flush();
361
361
  }));
362
362
  }
363
363
  transfer_effects(e, r) {
364
364
  for (const n of e) a(Re, this).add(n);
365
- for (const n of r) a(fe, this).add(n);
365
+ for (const n of r) a(ce, this).add(n);
366
366
  e.clear(), r.clear();
367
367
  }
368
368
  oncommit(e) {
369
- a($t, this).add(e);
369
+ a(kt, this).add(e);
370
370
  }
371
371
  ondiscard(e) {
372
372
  a(ot, this).add(e);
373
373
  }
374
374
  settled() {
375
- return (a(Ve, this) ?? m(Ve, this, Yn())).promise;
375
+ return (a(ze, this) ?? m(ze, this, Qn())).promise;
376
376
  }
377
377
  static ensure() {
378
378
  if (T === null) {
379
- const e = T = new Jr();
380
- !Ft && !Qe && ke(() => {
381
- a(Tt, e) || e.flush();
379
+ const e = T = new tn();
380
+ !Ft && !Qe && Ce(() => {
381
+ a($t, e) || e.flush();
382
382
  });
383
383
  }
384
384
  return T;
385
385
  }
386
386
  apply() {
387
- if (!Ie || !this.is_fork && a(Te, this) === null && a(Se, this) === null) {
388
- F = null;
387
+ if (!Me || !this.is_fork && a(Te, this) === null && a(Se, this) === null) {
388
+ B = null;
389
389
  return;
390
390
  }
391
- F = /* @__PURE__ */ new Map();
392
- for (const [r, [n]] of this.current) F.set(r, n);
393
- for (let r = At; r !== null; r = a(Se, r))
391
+ B = /* @__PURE__ */ new Map();
392
+ for (const [r, [n]] of this.current) B.set(r, n);
393
+ for (let r = Et; r !== null; r = a(Se, r))
394
394
  if (!(r === this || r.is_fork)) {
395
395
  var e = !1;
396
396
  if (r.id < this.id) {
@@ -401,18 +401,18 @@ var Ei = 1, Tt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap
401
401
  }
402
402
  }
403
403
  if (!e)
404
- for (const [n, i] of r.previous) F.has(n) || F.set(n, i);
404
+ for (const [n, i] of r.previous) B.has(n) || B.set(n, i);
405
405
  }
406
406
  }
407
407
  schedule(e) {
408
- if (qt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
408
+ if (Yt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
409
409
  e.b.defer_effect(e);
410
410
  return;
411
411
  }
412
412
  a(X, this).push(e);
413
413
  }
414
414
  };
415
- Ur = je;
415
+ Zr = je;
416
416
  function yr() {
417
417
  if (this.is_fork) return !0;
418
418
  for (const r of a(ye, this).keys()) {
@@ -427,7 +427,7 @@ function yr() {
427
427
  }
428
428
  return !1;
429
429
  }
430
- function Zr() {
430
+ function rn() {
431
431
  var t = [];
432
432
  for (const i of a(X, this))
433
433
  if (!((i.f & 16384) !== 0 || (i.f & 6144) === 0)) {
@@ -447,52 +447,52 @@ function Zr() {
447
447
  return m(X, this, []), t;
448
448
  }
449
449
  function Ct() {
450
- m(Tt, this, !0);
450
+ m($t, this, !0);
451
451
  for (const l of a(Re, this))
452
- a(fe, this).delete(l), O(l, z), this.schedule(l);
453
- for (const l of a(fe, this))
452
+ a(ce, this).delete(l), O(l, V), this.schedule(l);
453
+ for (const l of a(ce, this))
454
454
  O(l, Oe), this.schedule(l);
455
455
  this.apply();
456
- for (var t = rt = [], e = [], r = Et = []; a(X, this).length > 0; ) {
457
- Qr++ > 1e3 && (g(C, this, kt).call(this), ki());
458
- for (const l of g(C, this, Zr).call(this)) try {
459
- g(C, this, en).call(this, l, t, e);
460
- } catch (u) {
461
- throw nn(l), g(C, this, yr).call(this) || this.discard(), u;
456
+ for (var t = rt = [], e = [], r = Tt = []; a(X, this).length > 0; ) {
457
+ en++ > 1e3 && (g(k, this, Rt).call(this), Ii());
458
+ for (const l of g(k, this, rn).call(this)) try {
459
+ g(k, this, nn).call(this, l, t, e);
460
+ } catch (o) {
461
+ throw ln(l), g(k, this, yr).call(this) || this.discard(), o;
462
462
  }
463
463
  }
464
464
  if (T = null, r.length > 0) {
465
- var n = Ur.ensure();
465
+ var n = Zr.ensure();
466
466
  for (const l of r) n.schedule(l);
467
467
  }
468
- if (rt = null, Et = null, g(C, this, yr).call(this)) {
469
- g(C, this, Xe).call(this, e), g(C, this, Xe).call(this, t);
470
- for (const [l, u] of a(he, this)) rn(l, u);
471
- r.length > 0 && g(C, T, Ct).call(T);
468
+ if (rt = null, Tt = null, g(k, this, yr).call(this)) {
469
+ g(k, this, Xe).call(this, e), g(k, this, Xe).call(this, t);
470
+ for (const [l, o] of a(he, this)) an(l, o);
471
+ r.length > 0 && g(k, T, Ct).call(T);
472
472
  return;
473
473
  }
474
- const i = g(C, this, Ti).call(this);
474
+ const i = g(k, this, Li).call(this);
475
475
  if (i) {
476
- g(C, this, Xe).call(this, e), g(C, this, Xe).call(this, t), g(C, i, $i).call(i, this);
476
+ g(k, this, Xe).call(this, e), g(k, this, Xe).call(this, t), g(k, i, Oi).call(i, this);
477
477
  return;
478
478
  }
479
- a(Re, this).clear(), a(fe, this).clear();
480
- for (const l of a($t, this)) l(this);
481
- a($t, this).clear(), jt = this, br(e), br(t), jt = null, a(Ve, this)?.resolve();
479
+ a(Re, this).clear(), a(ce, this).clear();
480
+ for (const l of a(kt, this)) l(this);
481
+ a(kt, this).clear(), qt = this, br(e), br(t), qt = null, a(ze, this)?.resolve();
482
482
  var s = T;
483
- if (a(Be, this) === 0 && (a(X, this).length === 0 || s !== null) && (g(C, this, kt).call(this), Ie && (g(C, this, Ci).call(this), T = s)), a(X, this).length > 0)
483
+ if (a(Ke, this) === 0 && (a(X, this).length === 0 || s !== null) && (g(k, this, Rt).call(this), Me && (g(k, this, Mi).call(this), T = s)), a(X, this).length > 0)
484
484
  if (s !== null) {
485
485
  for (const l of a(X, this)) a(X, s).push(l);
486
486
  m(X, this, []);
487
487
  } else s = this;
488
- s !== null && (ae.clear(), g(C, s, Ct).call(s));
488
+ s !== null && (ae.clear(), g(k, s, Ct).call(s));
489
489
  }
490
- function en(t, e, r) {
490
+ function nn(t, e, r) {
491
491
  t.f ^= ne;
492
492
  for (var n = t.first; n !== null; ) {
493
493
  var i = n.f, s = (i & 96) !== 0;
494
494
  if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || a(he, this).has(n)) && n.fn !== null) {
495
- s ? n.f ^= ne : (i & 4) !== 0 ? e.push(n) : Ie && (i & 16777224) !== 0 ? r.push(n) : at(n) && ((i & 16) !== 0 && a(fe, this).add(n), De(n));
495
+ s ? n.f ^= ne : (i & 4) !== 0 ? e.push(n) : Me && (i & 16777224) !== 0 ? r.push(n) : at(n) && ((i & 16) !== 0 && a(ce, this).add(n), We(n));
496
496
  var l = n.first;
497
497
  if (l !== null) {
498
498
  n = l;
@@ -500,16 +500,16 @@ function en(t, e, r) {
500
500
  }
501
501
  }
502
502
  for (; n !== null; ) {
503
- var u = n.next;
504
- if (u !== null) {
505
- n = u;
503
+ var o = n.next;
504
+ if (o !== null) {
505
+ n = o;
506
506
  break;
507
507
  }
508
508
  n = n.parent;
509
509
  }
510
510
  }
511
511
  }
512
- function Ti() {
512
+ function Li() {
513
513
  for (var t = a(Te, this); t !== null; ) {
514
514
  if (!t.is_fork) {
515
515
  for (const [e, [, r]] of this.current) if (t.current.has(e) && !r) return t;
@@ -518,14 +518,14 @@ function Ti() {
518
518
  }
519
519
  return null;
520
520
  }
521
- function $i(t) {
521
+ function Oi(t) {
522
522
  for (const [r, n] of t.current)
523
523
  !this.previous.has(r) && t.previous.has(r) && this.previous.set(r, t.previous.get(r)), this.current.set(r, n);
524
524
  for (const [r, n] of t.async_deriveds) {
525
525
  const i = this.async_deriveds.get(r);
526
526
  i && n.promise.then(i.resolve).catch(i.reject);
527
527
  }
528
- t.async_deriveds.clear(), this.transfer_effects(a(Re, t), a(fe, t));
528
+ t.async_deriveds.clear(), this.transfer_effects(a(Re, t), a(ce, t));
529
529
  const e = (r) => {
530
530
  var n = r.reactions;
531
531
  if (n !== null && !((r.f & 2) !== 0 && (r.f & 6144) === 0))
@@ -534,88 +534,88 @@ function $i(t) {
534
534
  if ((i & 2) !== 0) e(l);
535
535
  else {
536
536
  var s = l;
537
- i & 4194320 && !this.async_deriveds.has(s) && (a(fe, this).delete(s), O(s, z), this.schedule(s));
537
+ i & 4194320 && !this.async_deriveds.has(s) && (a(ce, this).delete(s), O(s, V), this.schedule(s));
538
538
  }
539
539
  }
540
540
  };
541
541
  for (const r of this.current.keys()) e(r);
542
- this.oncommit(() => t.discard()), g(C, t, kt).call(t), T = this, g(C, this, Ct).call(this);
542
+ this.oncommit(() => t.discard()), g(k, t, Rt).call(t), T = this, g(k, this, Ct).call(this);
543
543
  }
544
544
  function Xe(t) {
545
- for (var e = 0; e < t.length; e += 1) Yr(t[e], a(Re, this), a(fe, this));
545
+ for (var e = 0; e < t.length; e += 1) Xr(t[e], a(Re, this), a(ce, this));
546
546
  }
547
- function Ci() {
548
- for (let v = At; v !== null; v = a(Se, v)) {
547
+ function Mi() {
548
+ for (let v = Et; v !== null; v = a(Se, v)) {
549
549
  var t = v.id < this.id, e = [];
550
- for (const [f, [d, c]] of this.current) {
551
- if (v.current.has(f)) {
552
- var r = v.current.get(f)[0];
553
- if (t && d !== r) v.current.set(f, [d, c]);
550
+ for (const [c, [d, h]] of this.current) {
551
+ if (v.current.has(c)) {
552
+ var r = v.current.get(c)[0];
553
+ if (t && d !== r) v.current.set(c, [d, h]);
554
554
  else continue;
555
555
  }
556
- e.push(f);
556
+ e.push(c);
557
557
  }
558
- if (t) for (const [f, d] of this.async_deriveds) {
559
- const c = v.async_deriveds.get(f);
560
- c && d.promise.then(c.resolve).catch(c.reject);
558
+ if (t) for (const [c, d] of this.async_deriveds) {
559
+ const h = v.async_deriveds.get(c);
560
+ h && d.promise.then(h.resolve).catch(h.reject);
561
561
  }
562
- var n = [...v.current.keys()].filter((f) => !v.current.get(f)[1]);
563
- if (!(!a(Tt, v) || n.length === 0)) {
564
- var i = n.filter((f) => !this.current.has(f));
562
+ var n = [...v.current.keys()].filter((c) => !v.current.get(c)[1]);
563
+ if (!(!a($t, v) || n.length === 0)) {
564
+ var i = n.filter((c) => !this.current.has(c));
565
565
  if (i.length === 0)
566
566
  t && v.discard();
567
567
  else if (e.length > 0) {
568
- if (t) for (const f of a(dt, this)) v.unskip_effect(f, (d) => {
569
- (d.f & 4194320) !== 0 ? v.schedule(d) : g(C, v, Xe).call(v, [d]);
568
+ if (t) for (const c of a(dt, this)) v.unskip_effect(c, (d) => {
569
+ (d.f & 4194320) !== 0 ? v.schedule(d) : g(k, v, Xe).call(v, [d]);
570
570
  });
571
571
  v.activate();
572
572
  var s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
573
- for (var u of e) tn(u, i, s, l);
573
+ for (var o of e) sn(o, i, s, l);
574
574
  l = /* @__PURE__ */ new Map();
575
- var h = [...v.current].filter(([f, d]) => {
576
- const c = this.current.get(f);
577
- return c ? c[0] !== d[0] || c[1] !== d[1] : !0;
578
- }).map(([f]) => f);
579
- if (h.length > 0)
580
- for (const f of a(Yt, this)) (f.f & 155648) === 0 && ir(f, h, l) && ((f.f & 4194320) !== 0 ? (O(f, z), v.schedule(f)) : a(Re, v).add(f));
581
- if (a(X, v).length > 0 && !a(ze, v)) {
575
+ var f = [...v.current].filter(([c, d]) => {
576
+ const h = this.current.get(c);
577
+ return h ? h[0] !== d[0] || h[1] !== d[1] : !0;
578
+ }).map(([c]) => c);
579
+ if (f.length > 0)
580
+ for (const c of a(zt, this)) (c.f & 155648) === 0 && sr(c, f, l) && ((c.f & 4194320) !== 0 ? (O(c, V), v.schedule(c)) : a(Re, v).add(c));
581
+ if (a(X, v).length > 0 && !a(Ve, v)) {
582
582
  v.apply();
583
- for (var b of g(C, v, Zr).call(v)) g(C, v, en).call(v, b, [], []);
583
+ for (var y of g(k, v, rn).call(v)) g(k, v, nn).call(v, y, [], []);
584
584
  }
585
585
  v.deactivate();
586
586
  }
587
587
  }
588
588
  }
589
589
  }
590
- function kt() {
590
+ function Rt() {
591
591
  if (this.linked) {
592
592
  var t = a(Te, this), e = a(Se, this);
593
- t === null ? At = e : m(Se, t, e), e === null ? Pe = t : m(Te, e, t), this.linked = !1;
593
+ t === null ? Et = e : m(Se, t, e), e === null ? Pe = t : m(Te, e, t), this.linked = !1;
594
594
  }
595
595
  }
596
- function Fe(t) {
596
+ function Be(t) {
597
597
  var e = Qe;
598
598
  Qe = !0;
599
599
  try {
600
600
  var r;
601
601
  for (t && (T !== null && !T.is_fork && T.flush(), r = t()); ; ) {
602
- if (gi(), T === null) return r;
602
+ if (Ai(), T === null) return r;
603
603
  T.flush();
604
604
  }
605
605
  } finally {
606
606
  Qe = e;
607
607
  }
608
608
  }
609
- function ki() {
609
+ function Ii() {
610
610
  if (0) {
611
611
  var t;
612
612
  for (const r of T.current.keys()) for (const [n, i] of r.updated ?? [])
613
613
  var e;
614
614
  }
615
615
  try {
616
- fi();
616
+ _i();
617
617
  } catch (r) {
618
- de(r, qt);
618
+ de(r, Yt);
619
619
  }
620
620
  }
621
621
  var ue = null;
@@ -624,7 +624,7 @@ function br(t) {
624
624
  if (e !== 0) {
625
625
  for (var r = 0; r < e; ) {
626
626
  var n = t[r++];
627
- if ((n.f & 24576) === 0 && at(n) && (ue = /* @__PURE__ */ new Set(), De(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && _n(n), ue?.size > 0)) {
627
+ if ((n.f & 24576) === 0 && at(n) && (ue = /* @__PURE__ */ new Set(), We(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && gn(n), ue?.size > 0)) {
628
628
  ae.clear();
629
629
  for (const i of ue) {
630
630
  if ((i.f & 24576) !== 0) continue;
@@ -632,9 +632,9 @@ function br(t) {
632
632
  let l = i.parent;
633
633
  for (; l !== null; )
634
634
  ue.has(l) && (ue.delete(l), s.push(l)), l = l.parent;
635
- for (let u = s.length - 1; u >= 0; u--) {
636
- const h = s[u];
637
- (h.f & 24576) === 0 && De(h);
635
+ for (let o = s.length - 1; o >= 0; o--) {
636
+ const f = s[o];
637
+ (f.f & 24576) === 0 && We(f);
638
638
  }
639
639
  }
640
640
  ue.clear();
@@ -643,86 +643,86 @@ function br(t) {
643
643
  ue = null;
644
644
  }
645
645
  }
646
- function tn(t, e, r, n) {
646
+ function sn(t, e, r, n) {
647
647
  if (!r.has(t) && (r.add(t), t.reactions !== null))
648
648
  for (const i of t.reactions) {
649
649
  const s = i.f;
650
- (s & 2) !== 0 ? tn(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && ir(i, e, n) && (O(i, z), sr(i));
650
+ (s & 2) !== 0 ? sn(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && sr(i, e, n) && (O(i, V), ar(i));
651
651
  }
652
652
  }
653
- function ir(t, e, r) {
653
+ function sr(t, e, r) {
654
654
  const n = r.get(t);
655
655
  if (n !== void 0) return n;
656
656
  if (t.deps !== null) for (const i of t.deps) {
657
- if (yt.call(e, i)) return !0;
658
- if ((i.f & 2) !== 0 && ir(i, e, r))
657
+ if (bt.call(e, i)) return !0;
658
+ if ((i.f & 2) !== 0 && sr(i, e, r))
659
659
  return r.set(i, !0), !0;
660
660
  }
661
661
  return r.set(t, !1), !1;
662
662
  }
663
- function sr(t) {
663
+ function ar(t) {
664
664
  T.schedule(t);
665
665
  }
666
- function rn(t, e) {
666
+ function an(t, e) {
667
667
  if (!((t.f & 32) !== 0 && (t.f & 1024) !== 0)) {
668
668
  (t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), O(t, ne);
669
669
  for (var r = t.first; r !== null; )
670
- rn(r, e), r = r.next;
670
+ an(r, e), r = r.next;
671
671
  }
672
672
  }
673
- function nn(t) {
673
+ function ln(t) {
674
674
  O(t, ne);
675
675
  for (var e = t.first; e !== null; )
676
- nn(e), e = e.next;
676
+ ln(e), e = e.next;
677
677
  }
678
- var Rt = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map();
679
- var sn = !1;
680
- function Nt(t, e) {
678
+ var Lt = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map();
679
+ var on = !1;
680
+ function Pt(t, e) {
681
681
  var r = {
682
682
  f: 0,
683
683
  v: t,
684
684
  reactions: null,
685
- equals: Kr,
685
+ equals: jr,
686
686
  rv: 0,
687
687
  wv: 0
688
688
  };
689
689
  return r;
690
690
  }
691
691
  // @__NO_SIDE_EFFECTS__
692
- function D(t, e) {
693
- const r = Nt(t, e);
694
- return mn(r), r;
692
+ function W(t, e) {
693
+ const r = Pt(t, e);
694
+ return bn(r), r;
695
695
  }
696
696
  // @__NO_SIDE_EFFECTS__
697
- function Ri(t, e = !1, r = !0) {
698
- const n = Nt(t);
699
- if (e || (n.equals = Wr), Mt && r && M !== null && M.l !== null) {
697
+ function xi(t, e = !1, r = !0) {
698
+ const n = Pt(t);
699
+ if (e || (n.equals = qr), xt && r && I !== null && I.l !== null) {
700
700
  var i;
701
- ((i = M.l).s ?? (i.s = [])).push(n);
701
+ ((i = I.l).s ?? (i.s = [])).push(n);
702
702
  }
703
703
  return n;
704
704
  }
705
705
  function P(t, e, r = !1) {
706
- E !== null && (!U || (E.f & 131072) !== 0) && xt() && (E.f & 4325394) !== 0 && (ee === null || !ee.has(t)) && _i();
707
- let n = r ? We(e) : e;
708
- return an(t, n, Et);
706
+ E !== null && (!U || (E.f & 131072) !== 0) && Ht() && (E.f & 4325394) !== 0 && (ee === null || !ee.has(t)) && bi();
707
+ let n = r ? De(e) : e;
708
+ return un(t, n, Tt);
709
709
  }
710
710
  var be = null, Vt = 0;
711
- function an(t, e, r = null) {
711
+ function un(t, e, r = null) {
712
712
  if (!t.equals(e)) {
713
- ce ? ae.set(t, e) : ae.has(t) || ae.set(t, t.v);
713
+ fe ? ae.set(t, e) : ae.has(t) || ae.set(t, t.v);
714
714
  var n = je.ensure();
715
715
  if (n.capture(t, e), (t.f & 2) !== 0) {
716
716
  const i = t;
717
- (t.f & 2048) !== 0 && rr(i), F === null && tr(i);
717
+ (t.f & 2048) !== 0 && nr(i), B === null && rr(i);
718
718
  }
719
- t.wv = yn(), be = null, Vt = 0, ln(t, z, r), be = null, xt() && $ !== null && ($.f & 1024) !== 0 && ($.f & 96) === 0 && (V === null ? Yi([t]) : V.push(t)), !n.is_fork && Rt.size > 0 && !sn && Li();
719
+ t.wv = Sn(), be = null, Vt = 0, cn(t, V, r), be = null, Ht() && $ !== null && ($.f & 1024) !== 0 && ($.f & 96) === 0 && (z === null ? Qi([t]) : z.push(t)), !n.is_fork && Lt.size > 0 && !on && Hi();
720
720
  }
721
721
  return e;
722
722
  }
723
- function Li() {
724
- sn = !1;
725
- for (const t of Rt) {
723
+ function Hi() {
724
+ on = !1;
725
+ for (const t of Lt) {
726
726
  (t.f & 1024) !== 0 && O(t, Oe);
727
727
  let e;
728
728
  try {
@@ -730,98 +730,98 @@ function Li() {
730
730
  } catch {
731
731
  e = !0;
732
732
  }
733
- e && De(t);
733
+ e && We(t);
734
734
  }
735
- Rt.clear();
735
+ Lt.clear();
736
736
  }
737
737
  function Je(t) {
738
738
  P(t, t.v + 1);
739
739
  }
740
- function ln(t, e, r) {
740
+ function cn(t, e, r) {
741
741
  var n = t.reactions;
742
742
  if (n !== null) {
743
- var i = xt(), s = n.length;
743
+ var i = Ht(), s = n.length;
744
744
  if (Vt += s, Vt > 1e5 && be === null && (be = /* @__PURE__ */ new Set()), be !== null) {
745
745
  if (be.has(t)) return;
746
746
  be.add(t);
747
747
  }
748
748
  for (var l = 0; l < s; l++) {
749
- var u = n[l], h = u.f;
750
- if (!(!i && u === $)) {
751
- var b = (h & z) === 0;
752
- if (b && O(u, e), (h & 131072) !== 0) Rt.add(u);
753
- else if ((h & 2) !== 0) {
754
- var v = u;
755
- F?.delete(v), ln(v, Oe, r);
756
- } else if (b) {
757
- var f = u;
758
- (h & 16) !== 0 && ue !== null && ue.add(f), r !== null ? r.push(f) : sr(f);
749
+ var o = n[l], f = o.f;
750
+ if (!(!i && o === $)) {
751
+ var y = (f & V) === 0;
752
+ if (y && O(o, e), (f & 131072) !== 0) Lt.add(o);
753
+ else if ((f & 2) !== 0) {
754
+ var v = o;
755
+ B?.delete(v), cn(v, Oe, r);
756
+ } else if (y) {
757
+ var c = o;
758
+ (f & 16) !== 0 && ue !== null && ue.add(c), r !== null ? r.push(c) : ar(c);
759
759
  }
760
760
  }
761
761
  }
762
762
  }
763
763
  }
764
- var Oi = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
765
- function We(t) {
766
- if (typeof t != "object" || t === null || Ue in t || Pr in t) return t;
767
- const e = Dn(t);
768
- if (e !== Kn && e !== Wn) return t;
769
- var r = /* @__PURE__ */ new Map(), n = Bn(t), i = /* @__PURE__ */ D(0), s = null, l = $e, u = (f) => {
770
- if ($e === l) return f();
771
- var d = E, c = $e;
764
+ var Ni = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
765
+ function De(t) {
766
+ if (typeof t != "object" || t === null || Ue in t || Fr in t) return t;
767
+ const e = Vn(t);
768
+ if (e !== Yn && e !== zn) return t;
769
+ var r = /* @__PURE__ */ new Map(), n = Wn(t), i = /* @__PURE__ */ W(0), s = null, l = $e, o = (c) => {
770
+ if ($e === l) return c();
771
+ var d = E, h = $e;
772
772
  le(null), Ar(l);
773
- var _ = f();
774
- return le(d), Ar(c), _;
773
+ var _ = c();
774
+ return le(d), Ar(h), _;
775
775
  };
776
- n && r.set("length", /* @__PURE__ */ D(t.length, s));
777
- var h = "";
778
- let b = !1;
779
- function v(f) {
780
- if (!b) {
781
- b = !0, h = f, mr(i, `${h} version`);
782
- for (const [d, c] of r) mr(c, Ii(h, d));
783
- b = !1;
776
+ n && r.set("length", /* @__PURE__ */ W(t.length, s));
777
+ var f = "";
778
+ let y = !1;
779
+ function v(c) {
780
+ if (!y) {
781
+ y = !0, f = c, mr(i, `${f} version`);
782
+ for (const [d, h] of r) mr(h, Pi(f, d));
783
+ y = !1;
784
784
  }
785
785
  }
786
786
  return new Proxy(t, {
787
- defineProperty(f, d, c) {
788
- (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && di();
787
+ defineProperty(c, d, h) {
788
+ (!("value" in h) || h.configurable === !1 || h.enumerable === !1 || h.writable === !1) && gi();
789
789
  var _ = r.get(d);
790
- return _ === void 0 ? u(() => {
791
- var p = /* @__PURE__ */ D(c.value, s);
790
+ return _ === void 0 ? o(() => {
791
+ var p = /* @__PURE__ */ W(h.value, s);
792
792
  return r.set(d, p), p;
793
- }) : P(_, c.value, !0), !0;
793
+ }) : P(_, h.value, !0), !0;
794
794
  },
795
- deleteProperty(f, d) {
796
- var c = r.get(d);
797
- if (c === void 0) {
798
- if (d in f) {
799
- const _ = u(() => /* @__PURE__ */ D(N, s));
795
+ deleteProperty(c, d) {
796
+ var h = r.get(d);
797
+ if (h === void 0) {
798
+ if (d in c) {
799
+ const _ = o(() => /* @__PURE__ */ W(N, s));
800
800
  r.set(d, _), Je(i);
801
801
  }
802
802
  } else
803
- P(c, N), Je(i);
803
+ P(h, N), Je(i);
804
804
  return !0;
805
805
  },
806
- get(f, d, c) {
806
+ get(c, d, h) {
807
807
  if (d === Ue) return t;
808
- var _ = r.get(d), p = d in f;
809
- if (_ === void 0 && (!p || Ee(f, d)?.writable) && (_ = u(() => {
810
- var L = We(p ? f[d] : N), x = /* @__PURE__ */ D(L, s);
808
+ var _ = r.get(d), p = d in c;
809
+ if (_ === void 0 && (!p || Ee(c, d)?.writable) && (_ = o(() => {
810
+ var L = De(p ? c[d] : N), x = /* @__PURE__ */ W(L, s);
811
811
  return x;
812
812
  }), r.set(d, _)), _ !== void 0) {
813
813
  var R = A(_);
814
814
  return R === N ? void 0 : R;
815
815
  }
816
- return Reflect.get(f, d, c);
816
+ return Reflect.get(c, d, h);
817
817
  },
818
- getOwnPropertyDescriptor(f, d) {
819
- this.has?.(f, d);
820
- var c = Reflect.getOwnPropertyDescriptor(f, d), _ = r.get(d);
818
+ getOwnPropertyDescriptor(c, d) {
819
+ this.has?.(c, d);
820
+ var h = Reflect.getOwnPropertyDescriptor(c, d), _ = r.get(d);
821
821
  if (_ !== void 0) {
822
822
  var p = A(_);
823
823
  if (p === N) return;
824
- if (c && "value" in c) c.value = p;
824
+ if (h && "value" in h) h.value = p;
825
825
  else return {
826
826
  enumerable: !0,
827
827
  configurable: !0,
@@ -829,31 +829,31 @@ function We(t) {
829
829
  writable: !0
830
830
  };
831
831
  }
832
- return c;
832
+ return h;
833
833
  },
834
- has(f, d) {
834
+ has(c, d) {
835
835
  if (d === Ue) return !0;
836
- var c = r.get(d), _ = c !== void 0 && c.v !== N || Reflect.has(f, d);
837
- return (c !== void 0 || $ !== null && (!_ || Ee(f, d)?.writable)) && (c === void 0 && (c = u(() => {
838
- var p = _ ? We(f[d]) : N, R = /* @__PURE__ */ D(p, s);
836
+ var h = r.get(d), _ = h !== void 0 && h.v !== N || Reflect.has(c, d);
837
+ return (h !== void 0 || $ !== null && (!_ || Ee(c, d)?.writable)) && (h === void 0 && (h = o(() => {
838
+ var p = _ ? De(c[d]) : N, R = /* @__PURE__ */ W(p, s);
839
839
  return R;
840
- }), r.set(d, c)), A(c) === N) ? !1 : _;
840
+ }), r.set(d, h)), A(h) === N) ? !1 : _;
841
841
  },
842
- set(f, d, c, _) {
843
- var p = r.get(d), R = d in f;
844
- if (n && d === "length") for (var L = c; L < p.v; L += 1) {
842
+ set(c, d, h, _) {
843
+ var p = r.get(d), R = d in c;
844
+ if (n && d === "length") for (var L = h; L < p.v; L += 1) {
845
845
  var x = r.get(L + "");
846
- x !== void 0 ? P(x, N) : L in f && (x = u(() => /* @__PURE__ */ D(N, s)), r.set(L + "", x));
846
+ x !== void 0 ? P(x, N) : L in c && (x = o(() => /* @__PURE__ */ W(N, s)), r.set(L + "", x));
847
847
  }
848
848
  if (p === void 0)
849
- (!R || Ee(f, d)?.writable) && (p = u(() => /* @__PURE__ */ D(void 0, s)), P(p, We(c)), r.set(d, p));
849
+ (!R || Ee(c, d)?.writable) && (p = o(() => /* @__PURE__ */ W(void 0, s)), P(p, De(h)), r.set(d, p));
850
850
  else {
851
851
  R = p.v !== N;
852
- var w = u(() => We(c));
852
+ var w = o(() => De(h));
853
853
  P(p, w);
854
854
  }
855
- var H = Reflect.getOwnPropertyDescriptor(f, d);
856
- if (H?.set && H.set.call(_, c), !R) {
855
+ var H = Reflect.getOwnPropertyDescriptor(c, d);
856
+ if (H?.set && H.set.call(_, h), !R) {
857
857
  if (n && typeof d == "string") {
858
858
  var pe = r.get("length"), He = Number(d);
859
859
  Number.isInteger(He) && He >= pe.v && P(pe, He + 1);
@@ -862,52 +862,52 @@ function We(t) {
862
862
  }
863
863
  return !0;
864
864
  },
865
- ownKeys(f) {
865
+ ownKeys(c) {
866
866
  A(i);
867
- var d = Reflect.ownKeys(f).filter((p) => {
867
+ var d = Reflect.ownKeys(c).filter((p) => {
868
868
  var R = r.get(p);
869
869
  return R === void 0 || R.v !== N;
870
870
  });
871
- for (var [c, _] of r) _.v !== N && !(c in f) && d.push(c);
871
+ for (var [h, _] of r) _.v !== N && !(h in c) && d.push(h);
872
872
  return d;
873
873
  },
874
874
  setPrototypeOf() {
875
- vi();
875
+ yi();
876
876
  }
877
877
  });
878
878
  }
879
- function Ii(t, e) {
880
- return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Oi.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
879
+ function Pi(t, e) {
880
+ return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Ni.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
881
881
  }
882
- var wr, Mi, on, un, fn;
883
- function zt() {
882
+ var wr, Ki, fn, hn, dn;
883
+ function Xt() {
884
884
  if (wr === void 0) {
885
- wr = window, Mi = document, on = /Firefox/.test(navigator.userAgent);
885
+ wr = window, Ki = document, fn = /Firefox/.test(navigator.userAgent);
886
886
  var t = Element.prototype, e = Node.prototype, r = Text.prototype;
887
- un = Ee(e, "firstChild").get, fn = Ee(e, "nextSibling").get, vr(t) && (t[Zn] = void 0, t[Jn] = null, t[ei] = void 0, t.__e = void 0), vr(r) && (r[ti] = void 0);
887
+ hn = Ee(e, "firstChild").get, dn = Ee(e, "nextSibling").get, vr(t) && (t[ii] = void 0, t[ni] = null, t[si] = void 0, t.__e = void 0), vr(r) && (r[ai] = void 0);
888
888
  }
889
889
  }
890
- function cn(t = "") {
890
+ function vn(t = "") {
891
891
  return document.createTextNode(t);
892
892
  }
893
893
  // @__NO_SIDE_EFFECTS__
894
- function Xt(t) {
895
- return un.call(t);
894
+ function Ut(t) {
895
+ return hn.call(t);
896
896
  }
897
897
  // @__NO_SIDE_EFFECTS__
898
898
  function qe(t) {
899
- return fn.call(t);
899
+ return dn.call(t);
900
900
  }
901
- function xi(t) {
901
+ function Bi(t) {
902
902
  t.textContent = "";
903
903
  }
904
- function hn(t, e, r) {
904
+ function _n(t, e, r) {
905
905
  return e == null || e === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(t, { is: r }) : document.createElement(t) : r ? document.createElementNS(e, t, { is: r }) : document.createElementNS(e, t);
906
906
  }
907
- function Hi(t) {
907
+ function Fi(t) {
908
908
  var e = $;
909
909
  if (e === null)
910
- return E.f |= Nr, t;
910
+ return E.f |= Br, t;
911
911
  if ((e.f & 32768) === 0 && (e.f & 4) === 0)
912
912
  throw t;
913
913
  de(t, e);
@@ -929,21 +929,21 @@ function de(t, e) {
929
929
  throw t;
930
930
  }
931
931
  }
932
- function Ni(t) {
933
- $ === null && (E === null && ui(t), oi()), ce && li(t);
932
+ function Gi(t) {
933
+ $ === null && (E === null && vi(t), di()), fe && hi(t);
934
934
  }
935
- function Pi(t, e) {
935
+ function Di(t, e) {
936
936
  var r = e.last;
937
937
  r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
938
938
  }
939
- function Me(t, e) {
939
+ function Ie(t, e) {
940
940
  var r = $;
941
- r !== null && (r.f & 8192) !== 0 && (t |= Mr);
941
+ r !== null && (r.f & 8192) !== 0 && (t |= Nr);
942
942
  var n = {
943
- ctx: M,
943
+ ctx: I,
944
944
  deps: null,
945
945
  nodes: null,
946
- f: t | z | 512,
946
+ f: t | V | 512,
947
947
  first: null,
948
948
  fn: e,
949
949
  last: null,
@@ -961,65 +961,65 @@ function Me(t, e) {
961
961
  rt !== null ? rt.push(n) : je.ensure().schedule(n);
962
962
  else if (e !== null) {
963
963
  try {
964
- De(n);
964
+ We(n);
965
965
  } catch (l) {
966
966
  throw Z(n), l;
967
967
  }
968
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Hr));
968
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Kr));
969
969
  }
970
- if (i !== null && (i.parent = r, r !== null && Pi(i, r), E !== null && (E.f & 2) !== 0 && (t & 64) === 0)) {
970
+ if (i !== null && (i.parent = r, r !== null && Di(i, r), E !== null && (E.f & 2) !== 0 && (t & 64) === 0)) {
971
971
  var s = E;
972
972
  (s.effects ?? (s.effects = [])).push(i);
973
973
  }
974
974
  return n;
975
975
  }
976
- function ar() {
976
+ function lr() {
977
977
  return E !== null && !U;
978
978
  }
979
979
  function Ne(t) {
980
- Ni("$effect");
980
+ Gi("$effect");
981
981
  var e = $.f;
982
- if (!E && (e & 32) !== 0 && M !== null && !M.i) {
983
- var r = M;
982
+ if (!E && (e & 32) !== 0 && I !== null && !I.i) {
983
+ var r = I;
984
984
  (r.e ?? (r.e = [])).push(t);
985
- } else return dn(t);
985
+ } else return pn(t);
986
986
  }
987
- function dn(t) {
988
- return Me(4 | Un, t);
987
+ function pn(t) {
988
+ return Ie(4 | ti, t);
989
989
  }
990
- function Bi(t) {
990
+ function Wi(t) {
991
991
  je.ensure();
992
- const e = Me(64 | st, t);
992
+ const e = Ie(64 | st, t);
993
993
  return () => {
994
994
  Z(e);
995
995
  };
996
996
  }
997
- function Fi(t) {
997
+ function ji(t) {
998
998
  je.ensure();
999
- const e = Me(64 | st, t);
999
+ const e = Ie(64 | st, t);
1000
1000
  return (r = {}) => new Promise((n) => {
1001
- r.outro ? Pt(e, () => {
1001
+ r.outro ? Kt(e, () => {
1002
1002
  Z(e), n(void 0);
1003
1003
  }) : (Z(e), n(void 0));
1004
1004
  });
1005
1005
  }
1006
- function Gi(t) {
1007
- return Me(4, t);
1006
+ function qi(t) {
1007
+ return Ie(4, t);
1008
1008
  }
1009
- function lr(t, e = 0) {
1010
- return Me(8 | e, t);
1009
+ function or(t, e = 0) {
1010
+ return Ie(8 | e, t);
1011
1011
  }
1012
- function Ki(t, e = 0) {
1013
- var r = Me(16 | e, t);
1012
+ function Yi(t, e = 0) {
1013
+ var r = Ie(16 | e, t);
1014
1014
  return r;
1015
1015
  }
1016
1016
  function Le(t) {
1017
- return Me(32 | st, t);
1017
+ return Ie(32 | st, t);
1018
1018
  }
1019
- function vn(t) {
1019
+ function mn(t) {
1020
1020
  var e = t.teardown;
1021
1021
  if (e !== null) {
1022
- const r = ce, n = E;
1022
+ const r = fe, n = E;
1023
1023
  Sr(!0), le(null);
1024
1024
  try {
1025
1025
  e.call(null);
@@ -1030,18 +1030,18 @@ function vn(t) {
1030
1030
  }
1031
1031
  }
1032
1032
  }
1033
- function or(t, e = !1) {
1033
+ function ur(t, e = !1) {
1034
1034
  var r = t.first;
1035
1035
  for (t.first = t.last = null; r !== null; ) {
1036
1036
  const i = r.ac;
1037
- i !== null && Ht(() => {
1037
+ i !== null && Nt(() => {
1038
1038
  i.abort(It);
1039
1039
  });
1040
1040
  var n = r.next;
1041
1041
  (r.f & 64) !== 0 ? r.parent = null : Z(r, e), r = n;
1042
1042
  }
1043
1043
  }
1044
- function Wi(t) {
1044
+ function zi(t) {
1045
1045
  for (var e = t.first; e !== null; ) {
1046
1046
  var r = e.next;
1047
1047
  (e.f & 32) === 0 && Z(e), e = r;
@@ -1049,60 +1049,60 @@ function Wi(t) {
1049
1049
  }
1050
1050
  function Z(t, e = !0) {
1051
1051
  var r = !1;
1052
- (e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Di(t.nodes.start, t.nodes.end), r = !0), t.f |= _r, or(t, e && !r), nt(t, 0);
1052
+ (e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Vi(t.nodes.start, t.nodes.end), r = !0), t.f |= _r, ur(t, e && !r), nt(t, 0);
1053
1053
  var n = t.nodes && t.nodes.t;
1054
1054
  if (n !== null) for (const s of n) s.stop();
1055
- vn(t), t.f ^= _r, t.f |= Xn;
1055
+ mn(t), t.f ^= _r, t.f |= ei;
1056
1056
  var i = t.parent;
1057
- i !== null && i.first !== null && _n(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1057
+ i !== null && i.first !== null && gn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1058
1058
  }
1059
- function Di(t, e) {
1059
+ function Vi(t, e) {
1060
1060
  for (; t !== null; ) {
1061
1061
  var r = t === e ? null : /* @__PURE__ */ qe(t);
1062
1062
  t.remove(), t = r;
1063
1063
  }
1064
1064
  }
1065
- function _n(t) {
1065
+ function gn(t) {
1066
1066
  var e = t.parent, r = t.prev, n = t.next;
1067
1067
  r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
1068
1068
  }
1069
- function Pt(t, e, r = !0) {
1069
+ function Kt(t, e, r = !0) {
1070
1070
  var n = [];
1071
- t.f |= 256, pn(t, n, !0);
1071
+ t.f |= 256, yn(t, n, !0);
1072
1072
  var i = () => {
1073
1073
  r && Z(t), e && e();
1074
1074
  }, s = n.length;
1075
1075
  if (s > 0) {
1076
1076
  var l = () => --s || i();
1077
- for (var u of n) u.out(l);
1077
+ for (var o of n) o.out(l);
1078
1078
  } else i();
1079
1079
  }
1080
- function pn(t, e, r) {
1080
+ function yn(t, e, r) {
1081
1081
  if ((t.f & 8192) === 0) {
1082
- t.f ^= Mr;
1082
+ t.f ^= Nr;
1083
1083
  var n = t.nodes && t.nodes.t;
1084
1084
  if (n !== null)
1085
- for (const u of n) (u.is_global || r) && e.push(u);
1085
+ for (const o of n) (o.is_global || r) && e.push(o);
1086
1086
  for (var i = t.first; i !== null; ) {
1087
1087
  var s = i.next;
1088
1088
  if ((i.f & 64) === 0) {
1089
1089
  var l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1090
- pn(i, e, l ? r : !1);
1090
+ yn(i, e, l ? r : !1);
1091
1091
  }
1092
1092
  i = s;
1093
1093
  }
1094
1094
  }
1095
1095
  }
1096
- function ji(t, e) {
1096
+ function Xi(t, e) {
1097
1097
  if (t.nodes)
1098
1098
  for (var r = t.nodes.start, n = t.nodes.end; r !== null; ) {
1099
1099
  var i = r === n ? null : /* @__PURE__ */ qe(r);
1100
1100
  e.append(r), r = i;
1101
1101
  }
1102
1102
  }
1103
- var qi = null, vt = !1, ce = !1;
1103
+ var Ui = null, vt = !1, fe = !1;
1104
1104
  function Sr(t) {
1105
- ce = t;
1105
+ fe = t;
1106
1106
  }
1107
1107
  var E = null, U = !1;
1108
1108
  function le(t) {
@@ -1113,19 +1113,19 @@ function _e(t) {
1113
1113
  $ = t;
1114
1114
  }
1115
1115
  var ee = null;
1116
- function mn(t) {
1117
- E !== null && (!Ie && (E.f & 2097152) !== 0 || (E.f & 2) !== 0) && (ee ?? (ee = /* @__PURE__ */ new Set())).add(t);
1116
+ function bn(t) {
1117
+ E !== null && (!Me && (E.f & 2097152) !== 0 || (E.f & 2) !== 0) && (ee ?? (ee = /* @__PURE__ */ new Set())).add(t);
1118
1118
  }
1119
- var K = null, j = 0, V = null;
1120
- function Yi(t) {
1121
- V = t;
1119
+ var G = null, j = 0, z = null;
1120
+ function Qi(t) {
1121
+ z = t;
1122
1122
  }
1123
- var gn = 1, Ae = 0, $e = Ae;
1123
+ var wn = 1, Ae = 0, $e = Ae;
1124
1124
  function Ar(t) {
1125
1125
  $e = t;
1126
1126
  }
1127
- function yn() {
1128
- return ++gn;
1127
+ function Sn() {
1128
+ return ++wn;
1129
1129
  }
1130
1130
  function at(t) {
1131
1131
  var e = t.f;
@@ -1133,79 +1133,79 @@ function at(t) {
1133
1133
  if ((e & 4096) !== 0) {
1134
1134
  for (var r = t.deps, n = r.length, i = 0; i < n; i++) {
1135
1135
  var s = r[i];
1136
- if (at(s) && Vr(s), s.wv > t.wv) return !0;
1136
+ if (at(s) && Ur(s), s.wv > t.wv) return !0;
1137
1137
  }
1138
- (e & 512) !== 0 && F === null && O(t, ne);
1138
+ (e & 512) !== 0 && B === null && O(t, ne);
1139
1139
  }
1140
1140
  return !1;
1141
1141
  }
1142
- function bn(t, e, r = !0) {
1142
+ function An(t, e, r = !0) {
1143
1143
  var n = t.reactions;
1144
- if (n !== null && !(!Ie && ee !== null && ee.has(t)))
1144
+ if (n !== null && !(!Me && ee !== null && ee.has(t)))
1145
1145
  for (var i = 0; i < n.length; i++) {
1146
1146
  var s = n[i];
1147
- (s.f & 2) !== 0 ? bn(s, e, !1) : e === s && (r ? O(s, z) : (s.f & 1024) !== 0 && O(s, Oe), sr(s));
1147
+ (s.f & 2) !== 0 ? An(s, e, !1) : e === s && (r ? O(s, V) : (s.f & 1024) !== 0 && O(s, Oe), ar(s));
1148
1148
  }
1149
1149
  }
1150
- function wn(t) {
1151
- var e = K, r = j, n = V, i = E, s = ee, l = M, u = U, h = $e, b = t.f;
1152
- K = null, j = 0, V = null, E = (b & 96) === 0 ? t : null, ee = null, wt(t.ctx), U = !1, $e = ++Ae, t.ac !== null && (Ht(() => {
1150
+ function En(t) {
1151
+ var e = G, r = j, n = z, i = E, s = ee, l = I, o = U, f = $e, y = t.f;
1152
+ G = null, j = 0, z = null, E = (y & 96) === 0 ? t : null, ee = null, St(t.ctx), U = !1, $e = ++Ae, t.ac !== null && (Nt(() => {
1153
1153
  t.ac.abort(It);
1154
1154
  }), t.ac = null);
1155
1155
  try {
1156
1156
  t.f |= pr;
1157
- var v = t.fn, f = v();
1158
- t.f |= xr;
1157
+ var v = t.fn, c = v();
1158
+ t.f |= Pr;
1159
1159
  var d = Er(t);
1160
- if (xt() && V !== null && !U && d !== null && (t.f & 6146) === 0) for (var c = 0; c < V.length; c++) bn(V[c], t);
1160
+ if (Ht() && z !== null && !U && d !== null && (t.f & 6146) === 0) for (var h = 0; h < z.length; h++) An(z[h], t);
1161
1161
  if (i !== null && i !== t) {
1162
1162
  if (Ae++, i.deps !== null) for (let _ = 0; _ < r; _ += 1) i.deps[_].rv = Ae;
1163
1163
  if (e !== null) for (const _ of e) _.rv = Ae;
1164
- V !== null && (n === null ? n = V : n.push(...V));
1164
+ z !== null && (n === null ? n = z : n.push(...z));
1165
1165
  }
1166
- return (t.f & 8388608) !== 0 && (t.f ^= Nr), f;
1166
+ return (t.f & 8388608) !== 0 && (t.f ^= Br), c;
1167
1167
  } catch (_) {
1168
- return Er(t), Hi(_);
1168
+ return Er(t), Fi(_);
1169
1169
  } finally {
1170
- t.f ^= pr, K = e, j = r, V = n, E = i, ee = s, wt(l), U = u, $e = h;
1170
+ t.f ^= pr, G = e, j = r, z = n, E = i, ee = s, St(l), U = o, $e = f;
1171
1171
  }
1172
1172
  }
1173
1173
  function Er(t) {
1174
1174
  var e = t.deps, r = T?.is_fork;
1175
- if (K !== null) {
1175
+ if (G !== null) {
1176
1176
  var n;
1177
1177
  if (r || nt(t, j), e !== null && j > 0)
1178
- for (e.length = j + K.length, n = 0; n < K.length; n++) e[j + n] = K[n];
1179
- else t.deps = e = K;
1180
- if (ar() && (t.f & 512) !== 0) for (n = j; n < e.length; n++) {
1178
+ for (e.length = j + G.length, n = 0; n < G.length; n++) e[j + n] = G[n];
1179
+ else t.deps = e = G;
1180
+ if (lr() && (t.f & 512) !== 0) for (n = j; n < e.length; n++) {
1181
1181
  var i;
1182
1182
  ((i = e[n]).reactions ?? (i.reactions = [])).push(t);
1183
1183
  }
1184
1184
  } else !r && e !== null && j < e.length && (nt(t, j), e.length = j);
1185
1185
  return e;
1186
1186
  }
1187
- function Vi(t, e) {
1187
+ function Ji(t, e) {
1188
1188
  let r = e.reactions;
1189
1189
  if (r !== null) {
1190
- var n = Fn.call(r, t);
1190
+ var n = jn.call(r, t);
1191
1191
  if (n !== -1) {
1192
1192
  var i = r.length - 1;
1193
1193
  i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
1194
1194
  }
1195
1195
  }
1196
- if (r === null && (e.f & 2) !== 0 && (K === null || !yt.call(K, e))) {
1196
+ if (r === null && (e.f & 2) !== 0 && (G === null || !bt.call(G, e))) {
1197
1197
  var s = e;
1198
- (s.f & 512) !== 0 && (s.f ^= 512), s.v !== N && tr(s), s.ac !== null && Ht(() => {
1199
- s.ac.abort(It), s.ac = null, O(s, z);
1200
- }), Ai(s), nt(s, 0);
1198
+ (s.f & 512) !== 0 && (s.f ^= 512), s.v !== N && rr(s), s.ac !== null && Nt(() => {
1199
+ s.ac.abort(It), s.ac = null, O(s, V);
1200
+ }), Ci(s), nt(s, 0);
1201
1201
  }
1202
1202
  }
1203
1203
  function nt(t, e) {
1204
1204
  var r = t.deps;
1205
1205
  if (r !== null)
1206
- for (var n = e; n < r.length; n++) Vi(t, r[n]);
1206
+ for (var n = e; n < r.length; n++) Ji(t, r[n]);
1207
1207
  }
1208
- function De(t) {
1208
+ function We(t) {
1209
1209
  var e = t.f;
1210
1210
  if ((e & 16384) === 0) {
1211
1211
  O(t, ne);
@@ -1213,10 +1213,10 @@ function De(t) {
1213
1213
  if ($ = t, vt = (e & 96) === 0, 0)
1214
1214
  var i, s;
1215
1215
  try {
1216
- (e & 16777232) !== 0 ? Wi(t) : or(t), vn(t);
1217
- var l = wn(t);
1218
- if (t.teardown = typeof l == "function" ? l : null, t.wv = gn, 0)
1219
- for (var u of t.deps) ;
1216
+ (e & 16777232) !== 0 ? zi(t) : ur(t), mn(t);
1217
+ var l = En(t);
1218
+ if (t.teardown = typeof l == "function" ? l : null, t.wv = wn, 0)
1219
+ for (var o of t.deps) ;
1220
1220
  } finally {
1221
1221
  vt = n, $ = r;
1222
1222
  }
@@ -1224,49 +1224,49 @@ function De(t) {
1224
1224
  }
1225
1225
  function A(t) {
1226
1226
  var e = (t.f & 2) !== 0;
1227
- if (qi?.add(t), E !== null && !U && !($ !== null && ($.f & 16384) !== 0) && (ee === null || !ee.has(t))) {
1227
+ if (Ui?.add(t), E !== null && !U && !($ !== null && ($.f & 16384) !== 0) && (ee === null || !ee.has(t))) {
1228
1228
  var r = E.deps;
1229
1229
  if ((E.f & 2097152) !== 0)
1230
- t.rv < Ae && (t.rv = Ae, K === null && r !== null && r[j] === t ? j++ : K === null ? K = [t] : K.push(t));
1230
+ t.rv < Ae && (t.rv = Ae, G === null && r !== null && r[j] === t ? j++ : G === null ? G = [t] : G.push(t));
1231
1231
  else {
1232
1232
  var n;
1233
- (n = E).deps ?? (n.deps = []), yt.call(E.deps, t) || E.deps.push(t);
1233
+ (n = E).deps ?? (n.deps = []), bt.call(E.deps, t) || E.deps.push(t);
1234
1234
  var i = t.reactions;
1235
- i === null ? t.reactions = [E] : yt.call(i, E) || i.push(E);
1235
+ i === null ? t.reactions = [E] : bt.call(i, E) || i.push(E);
1236
1236
  }
1237
1237
  }
1238
1238
  if (0) {
1239
- if (!U && reactivity_loss_tracker && T === null && jt === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
1239
+ if (!U && reactivity_loss_tracker && T === null && qt === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
1240
1240
  var s;
1241
1241
  if (tracing_mode_flag && !U && tracing_expressions !== null && E !== null && tracing_expressions.reaction === E && !t.trace) {
1242
1242
  if (s)
1243
- var l, u;
1243
+ var l, o;
1244
1244
  }
1245
1245
  }
1246
- if (ce && ae.has(t)) return ae.get(t);
1246
+ if (fe && ae.has(t)) return ae.get(t);
1247
1247
  if (e) {
1248
- var h = t;
1249
- if (ce) {
1250
- var b = h.v;
1251
- return ((h.f & 1024) === 0 && h.reactions !== null || An(h)) && (b = rr(h)), ae.set(h, b), b;
1248
+ var f = t;
1249
+ if (fe) {
1250
+ var y = f.v;
1251
+ return ((f.f & 1024) === 0 && f.reactions !== null || $n(f)) && (y = nr(f)), ae.set(f, y), y;
1252
1252
  }
1253
- var v = (h.f & 512) === 0 && !U && E !== null && (vt || (E.f & 512) !== 0), f = (h.f & xr) === 0;
1254
- at(h) && (v && (h.f |= 512), Vr(h)), v && !f && (zr(h), Sn(h));
1253
+ var v = (f.f & 512) === 0 && !U && E !== null && (vt || (E.f & 512) !== 0), c = (f.f & Pr) === 0;
1254
+ at(f) && (v && (f.f |= 512), Ur(f)), v && !c && (Qr(f), Tn(f));
1255
1255
  }
1256
- if (F?.has(t)) return F.get(t);
1256
+ if (B?.has(t)) return B.get(t);
1257
1257
  if ((t.f & 8388608) !== 0) throw t.v;
1258
1258
  return t.v;
1259
1259
  }
1260
- function Sn(t) {
1260
+ function Tn(t) {
1261
1261
  if (t.f |= 512, t.deps !== null)
1262
1262
  for (const e of t.deps)
1263
- (e.reactions ?? (e.reactions = [])).push(t), (e.f & 2) !== 0 && (e.f & 512) === 0 && (zr(e), Sn(e));
1263
+ (e.reactions ?? (e.reactions = [])).push(t), (e.f & 2) !== 0 && (e.f & 512) === 0 && (Qr(e), Tn(e));
1264
1264
  }
1265
- function An(t) {
1265
+ function $n(t) {
1266
1266
  if (t.v === N) return !0;
1267
1267
  if (t.deps === null) return !1;
1268
1268
  for (const e of t.deps)
1269
- if (ae.has(e) || (e.f & 2) !== 0 && An(e)) return !0;
1269
+ if (ae.has(e) || (e.f & 2) !== 0 && $n(e)) return !0;
1270
1270
  return !1;
1271
1271
  }
1272
1272
  function Bt(t) {
@@ -1277,22 +1277,22 @@ function Bt(t) {
1277
1277
  U = e;
1278
1278
  }
1279
1279
  }
1280
- var ut = /* @__PURE__ */ Symbol("events"), zi = /* @__PURE__ */ new Set(), Tr = /* @__PURE__ */ new Set(), Gt = null, Kt = !1;
1280
+ var ut = /* @__PURE__ */ Symbol("events"), Zi = /* @__PURE__ */ new Set(), Tr = /* @__PURE__ */ new Set(), Gt = null, Dt = !1;
1281
1281
  function $r(t) {
1282
1282
  var e = this, r = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], s = i[0] || t.target;
1283
- Gt = t, Kt || (Kt = !0, setTimeout(() => {
1284
- Kt = !1, Gt = null;
1283
+ Gt = t, Dt || (Dt = !0, setTimeout(() => {
1284
+ Dt = !1, Gt = null;
1285
1285
  }));
1286
- var l = 0, u = Gt === t && t[ut];
1287
- if (u) {
1288
- var h = i.indexOf(u);
1289
- if (h !== -1 && (e === document || e === window)) {
1286
+ var l = 0, o = Gt === t && t[ut];
1287
+ if (o) {
1288
+ var f = i.indexOf(o);
1289
+ if (f !== -1 && (e === document || e === window)) {
1290
1290
  t[ut] = e;
1291
1291
  return;
1292
1292
  }
1293
- var b = i.indexOf(e);
1294
- if (b === -1) return;
1295
- h <= b && (l = h);
1293
+ var y = i.indexOf(e);
1294
+ if (y === -1) return;
1295
+ f <= y && (l = f);
1296
1296
  }
1297
1297
  if (s = i[l] || t.target, s !== e) {
1298
1298
  Ze(t, "currentTarget", {
@@ -1301,37 +1301,37 @@ function $r(t) {
1301
1301
  return s || r;
1302
1302
  }
1303
1303
  });
1304
- var v = E, f = $;
1304
+ var v = E, c = $;
1305
1305
  le(null), _e(null);
1306
1306
  try {
1307
- for (var d, c = []; s !== null && s !== e; ) {
1307
+ for (var d, h = []; s !== null && s !== e; ) {
1308
1308
  try {
1309
1309
  var _ = s[ut]?.[n];
1310
1310
  _ != null && (!s.disabled || t.target === s) && _.call(s, t);
1311
1311
  } catch (p) {
1312
- d ? c.push(p) : d = p;
1312
+ d ? h.push(p) : d = p;
1313
1313
  }
1314
1314
  if (t.cancelBubble) break;
1315
1315
  l++, s = l < i.length ? i[l] : null;
1316
1316
  }
1317
1317
  if (d) {
1318
- for (let p of c) queueMicrotask(() => {
1318
+ for (let p of h) queueMicrotask(() => {
1319
1319
  throw p;
1320
1320
  });
1321
1321
  throw d;
1322
1322
  }
1323
1323
  } finally {
1324
- t[ut] = e, delete t.currentTarget, le(v), _e(f);
1324
+ t[ut] = e, delete t.currentTarget, le(v), _e(c);
1325
1325
  }
1326
1326
  }
1327
1327
  }
1328
- var Xi = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1329
- function Ui(t) {
1330
- return Xi?.createHTML(t) ?? t;
1328
+ var es = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1329
+ function ts(t) {
1330
+ return es?.createHTML(t) ?? t;
1331
1331
  }
1332
- function Qi(t) {
1333
- var e = hn("template");
1334
- return e.innerHTML = Ui(t.replaceAll("<!>", "<!---->")), e.content;
1332
+ function rs(t) {
1333
+ var e = _n("template");
1334
+ return e.innerHTML = ts(t.replaceAll("<!>", "<!---->")), e.content;
1335
1335
  }
1336
1336
  function _t(t, e) {
1337
1337
  var r = $;
@@ -1343,29 +1343,29 @@ function _t(t, e) {
1343
1343
  });
1344
1344
  }
1345
1345
  // @__NO_SIDE_EFFECTS__
1346
- function Ji(t, e) {
1346
+ function ns(t, e) {
1347
1347
  var r = (e & 1) !== 0, n = (e & 2) !== 0, i, s = !t.startsWith("<!>");
1348
1348
  return () => {
1349
1349
  if (J)
1350
- return _t(G, null), G;
1351
- i === void 0 && (i = Qi(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Xt(i)));
1352
- var l = n || on ? document.importNode(i, !0) : i.cloneNode(!0);
1350
+ return _t(F, null), F;
1351
+ i === void 0 && (i = rs(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Ut(i)));
1352
+ var l = n || fn ? document.importNode(i, !0) : i.cloneNode(!0);
1353
1353
  if (r) {
1354
- var u = /* @__PURE__ */ Xt(l), h = l.lastChild;
1355
- _t(u, h);
1354
+ var o = /* @__PURE__ */ Ut(l), f = l.lastChild;
1355
+ _t(o, f);
1356
1356
  } else _t(l, l);
1357
1357
  return l;
1358
1358
  };
1359
1359
  }
1360
- function En(t, e) {
1360
+ function kn(t, e) {
1361
1361
  if (J) {
1362
1362
  var r = $;
1363
- ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = G), Gr();
1363
+ ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = F), Wr();
1364
1364
  return;
1365
1365
  }
1366
1366
  t !== null && t.before(e);
1367
1367
  }
1368
- var Zi = [
1368
+ var is = [
1369
1369
  "allowfullscreen",
1370
1370
  "async",
1371
1371
  "autofocus",
@@ -1394,8 +1394,8 @@ var Zi = [
1394
1394
  "defer",
1395
1395
  "disablepictureinpicture",
1396
1396
  "disableremoteplayback"
1397
- ], Ns = [
1398
- ...Zi,
1397
+ ], zs = [
1398
+ ...is,
1399
1399
  "formNoValidate",
1400
1400
  "isMap",
1401
1401
  "noModule",
@@ -1410,17 +1410,17 @@ var Zi = [
1410
1410
  "allowFullscreen",
1411
1411
  "disablePictureInPicture",
1412
1412
  "disableRemotePlayback"
1413
- ], es = ["touchstart", "touchmove"];
1414
- function ts(t) {
1415
- return es.includes(t);
1413
+ ], ss = ["touchstart", "touchmove"];
1414
+ function as(t) {
1415
+ return ss.includes(t);
1416
1416
  }
1417
- var rs = [
1417
+ var ls = [
1418
1418
  "$state",
1419
1419
  "$state.raw",
1420
1420
  "$derived",
1421
1421
  "$derived.by"
1422
- ], Ps = [
1423
- ...rs,
1422
+ ], Vs = [
1423
+ ...ls,
1424
1424
  "$state.eager",
1425
1425
  "$state.snapshot",
1426
1426
  "$props",
@@ -1436,41 +1436,41 @@ var rs = [
1436
1436
  "$inspect.trace",
1437
1437
  "$host"
1438
1438
  ];
1439
- function ns(t) {
1440
- let e = 0, r = Nt(0), n;
1439
+ function os(t) {
1440
+ let e = 0, r = Pt(0), n;
1441
1441
  return () => {
1442
- ar() && (A(r), lr(() => (e === 0 && (n = Bt(() => t(() => Je(r)))), e += 1, () => {
1443
- ke(() => {
1442
+ lr() && (A(r), or(() => (e === 0 && (n = Bt(() => t(() => Je(r)))), e += 1, () => {
1443
+ Ce(() => {
1444
1444
  e -= 1, e === 0 && (n?.(), n = void 0, Je(r));
1445
1445
  });
1446
1446
  })));
1447
1447
  };
1448
1448
  }
1449
- var is = Hr | st;
1450
- function ss(t, e, r, n) {
1451
- new as(t, e, r, n);
1449
+ var us = Kr | st;
1450
+ function cs(t, e, r, n) {
1451
+ new fs(t, e, r, n);
1452
1452
  }
1453
- var te = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakSet(), as = class {
1453
+ var te = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakSet(), fs = class {
1454
1454
  constructor(t, e, r, n) {
1455
- nr(this, I), o(this, "parent", void 0), o(this, "is_pending", !1), o(this, "transform_error", void 0), S(this, te, void 0), S(this, Ut, J ? G : null), S(this, se, void 0), S(this, it, void 0), S(this, q, void 0), S(this, re, null), S(this, Y, null), S(this, Q, null), S(this, ve, null), S(this, Ge, 0), S(this, Ce, 0), S(this, ft, !1), S(this, Qt, /* @__PURE__ */ new Set()), S(this, Jt, /* @__PURE__ */ new Set()), S(this, me, null), S(this, Cr, ns(() => (m(me, this, Nt(a(Ge, this))), () => {
1455
+ ir(this, M), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), S(this, te, void 0), S(this, Qt, J ? F : null), S(this, se, void 0), S(this, it, void 0), S(this, q, void 0), S(this, re, null), S(this, Y, null), S(this, Q, null), S(this, ve, null), S(this, Fe, 0), S(this, ke, 0), S(this, ct, !1), S(this, Jt, /* @__PURE__ */ new Set()), S(this, Zt, /* @__PURE__ */ new Set()), S(this, me, null), S(this, kr, os(() => (m(me, this, Pt(a(Fe, this))), () => {
1456
1456
  m(me, this, null);
1457
1457
  }))), m(te, this, t), m(se, this, e), m(it, this, (i) => {
1458
1458
  var s = $;
1459
1459
  s.b = this, s.f |= 128, r(i);
1460
- }), this.parent = $.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), m(q, this, Ki(() => {
1460
+ }), this.parent = $.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), m(q, this, Yi(() => {
1461
1461
  if (J) {
1462
- const i = a(Ut, this);
1463
- Gr();
1462
+ const i = a(Qt, this);
1463
+ Wr();
1464
1464
  const s = i.data === "[!";
1465
1465
  if (i.data.startsWith("[?")) {
1466
1466
  const l = JSON.parse(i.data.slice(2));
1467
- g(I, this, os).call(this, l);
1468
- } else s ? g(I, this, us).call(this) : g(I, this, ls).call(this);
1469
- } else g(I, this, $n).call(this);
1470
- }, is)), J && m(te, this, G);
1467
+ g(M, this, ds).call(this, l);
1468
+ } else s ? g(M, this, vs).call(this) : g(M, this, hs).call(this);
1469
+ } else g(M, this, Rn).call(this);
1470
+ }, us)), J && m(te, this, F);
1471
1471
  }
1472
1472
  defer_effect(t) {
1473
- Yr(t, a(Qt, this), a(Jt, this));
1473
+ Xr(t, a(Jt, this), a(Zt, this));
1474
1474
  }
1475
1475
  is_rendered() {
1476
1476
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -1479,44 +1479,44 @@ var te = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), se =
1479
1479
  return !!a(se, this).pending;
1480
1480
  }
1481
1481
  update_pending_count(t, e) {
1482
- g(I, this, Cn).call(this, t, e), m(Ge, this, a(Ge, this) + t), !(!a(me, this) || a(ft, this)) && (m(ft, this, !0), ke(() => {
1483
- m(ft, this, !1), a(me, this) && an(a(me, this), a(Ge, this));
1482
+ g(M, this, Ln).call(this, t, e), m(Fe, this, a(Fe, this) + t), !(!a(me, this) || a(ct, this)) && (m(ct, this, !0), Ce(() => {
1483
+ m(ct, this, !1), a(me, this) && un(a(me, this), a(Fe, this));
1484
1484
  }));
1485
1485
  }
1486
1486
  get_effect_pending() {
1487
- return a(Cr, this).call(this), A(a(me, this));
1487
+ return a(kr, this).call(this), A(a(me, this));
1488
1488
  }
1489
1489
  error(t) {
1490
1490
  if (!a(se, this).onerror && !a(se, this).failed) throw t;
1491
1491
  T?.is_fork ? (a(re, this) && T.skip_effect(a(re, this)), a(Y, this) && T.skip_effect(a(Y, this)), a(Q, this) && T.skip_effect(a(Q, this)), T.oncommit(() => {
1492
- g(I, this, kr).call(this, t);
1493
- })) : g(I, this, kr).call(this, t);
1492
+ g(M, this, Cr).call(this, t);
1493
+ })) : g(M, this, Cr).call(this, t);
1494
1494
  }
1495
1495
  };
1496
- function ls() {
1496
+ function hs() {
1497
1497
  try {
1498
1498
  m(re, this, Le(() => a(it, this).call(this, a(te, this))));
1499
1499
  } catch (t) {
1500
1500
  this.error(t);
1501
1501
  }
1502
1502
  }
1503
- function os(t) {
1504
- const e = a(se, this).failed, { reset: r, invoke_onerror: n } = g(I, this, Tn).call(this, t);
1505
- ke(n), e && m(Q, this, Le(() => {
1503
+ function ds(t) {
1504
+ const e = a(se, this).failed, { reset: r, invoke_onerror: n } = g(M, this, Cn).call(this, t);
1505
+ Ce(n), e && m(Q, this, Le(() => {
1506
1506
  e(a(te, this), () => t, () => r);
1507
1507
  }));
1508
1508
  }
1509
- function Tn(t) {
1509
+ function Cn(t) {
1510
1510
  var e = !1, r = !1;
1511
1511
  const n = () => {
1512
1512
  if (e) {
1513
- ni();
1513
+ oi();
1514
1514
  return;
1515
1515
  }
1516
- e = !0, r && pi(), a(Q, this) !== null && Pt(a(Q, this), () => {
1516
+ e = !0, r && wi(), a(Q, this) !== null && Kt(a(Q, this), () => {
1517
1517
  m(Q, this, null);
1518
- }), g(I, this, ur).call(this, () => {
1519
- g(I, this, $n).call(this);
1518
+ }), g(M, this, cr).call(this, () => {
1519
+ g(M, this, Rn).call(this);
1520
1520
  });
1521
1521
  };
1522
1522
  return {
@@ -1530,11 +1530,11 @@ function Tn(t) {
1530
1530
  }
1531
1531
  };
1532
1532
  }
1533
- function us() {
1533
+ function vs() {
1534
1534
  const t = a(se, this).pending;
1535
- t && (this.is_pending = !0, m(Y, this, Le(() => t(a(te, this)))), ke(() => {
1536
- var e = m(ve, this, document.createDocumentFragment()), r = cn(), n = !1;
1537
- if (e.append(r), m(re, this, g(I, this, ur).call(this, () => {
1535
+ t && (this.is_pending = !0, m(Y, this, Le(() => t(a(te, this)))), Ce(() => {
1536
+ var e = m(ve, this, document.createDocumentFragment()), r = vn(), n = !1;
1537
+ if (e.append(r), m(re, this, g(M, this, cr).call(this, () => {
1538
1538
  try {
1539
1539
  return Le(() => a(it, this).call(this, r));
1540
1540
  } catch (i) {
@@ -1546,58 +1546,58 @@ function us() {
1546
1546
  return null;
1547
1547
  }
1548
1548
  })), a(re, this) === null) {
1549
- m(ve, this, null), n && g(I, this, Lt).call(this, T);
1549
+ m(ve, this, null), n && g(M, this, Ot).call(this, T);
1550
1550
  return;
1551
1551
  }
1552
- a(Ce, this) === 0 && (a(te, this).before(e), m(ve, this, null), Pt(a(Y, this), () => {
1552
+ a(ke, this) === 0 && (a(te, this).before(e), m(ve, this, null), Kt(a(Y, this), () => {
1553
1553
  m(Y, this, null);
1554
- }), g(I, this, Lt).call(this, T));
1554
+ }), g(M, this, Ot).call(this, T));
1555
1555
  }));
1556
1556
  }
1557
- function $n() {
1557
+ function Rn() {
1558
1558
  try {
1559
- if (this.is_pending = this.has_pending_snippet(), m(Ce, this, 0), m(Ge, this, 0), m(re, this, Le(() => {
1559
+ if (this.is_pending = this.has_pending_snippet(), m(ke, this, 0), m(Fe, this, 0), m(re, this, Le(() => {
1560
1560
  a(it, this).call(this, a(te, this));
1561
- })), a(Ce, this) > 0) {
1561
+ })), a(ke, this) > 0) {
1562
1562
  var t = m(ve, this, document.createDocumentFragment());
1563
- ji(a(re, this), t);
1563
+ Xi(a(re, this), t);
1564
1564
  const e = a(se, this).pending;
1565
1565
  m(Y, this, Le(() => e(a(te, this))));
1566
- } else g(I, this, Lt).call(this, T);
1566
+ } else g(M, this, Ot).call(this, T);
1567
1567
  } catch (e) {
1568
1568
  this.error(e);
1569
1569
  }
1570
1570
  }
1571
- function Lt(t) {
1572
- this.is_pending = !1, t.transfer_effects(a(Qt, this), a(Jt, this));
1571
+ function Ot(t) {
1572
+ this.is_pending = !1, t.transfer_effects(a(Jt, this), a(Zt, this));
1573
1573
  }
1574
- function ur(t) {
1575
- var e = $, r = E, n = M;
1576
- _e(a(q, this)), le(a(q, this)), wt(a(q, this).ctx);
1574
+ function cr(t) {
1575
+ var e = $, r = E, n = I;
1576
+ _e(a(q, this)), le(a(q, this)), St(a(q, this).ctx);
1577
1577
  try {
1578
1578
  return je.ensure(), t();
1579
1579
  } finally {
1580
- _e(e), le(r), wt(n);
1580
+ _e(e), le(r), St(n);
1581
1581
  }
1582
1582
  }
1583
- function Cn(t, e) {
1583
+ function Ln(t, e) {
1584
1584
  if (!this.has_pending_snippet()) {
1585
1585
  if (this.parent) {
1586
1586
  var r;
1587
- g(I, r = this.parent, Cn).call(r, t, e);
1587
+ g(M, r = this.parent, Ln).call(r, t, e);
1588
1588
  }
1589
1589
  return;
1590
1590
  }
1591
- m(Ce, this, a(Ce, this) + t), a(Ce, this) === 0 && (g(I, this, Lt).call(this, e), a(Y, this) && Pt(a(Y, this), () => {
1591
+ m(ke, this, a(ke, this) + t), a(ke, this) === 0 && (g(M, this, Ot).call(this, e), a(Y, this) && Kt(a(Y, this), () => {
1592
1592
  m(Y, this, null);
1593
1593
  }), a(ve, this) && (a(te, this).before(a(ve, this)), m(ve, this, null)));
1594
1594
  }
1595
- function kr(t) {
1596
- a(re, this) && (Z(a(re, this)), m(re, this, null)), a(Y, this) && (Z(a(Y, this)), m(Y, this, null)), a(Q, this) && (Z(a(Q, this)), m(Q, this, null)), J && (tt(a(Ut, this)), ii(), tt(si()));
1595
+ function Cr(t) {
1596
+ a(re, this) && (Z(a(re, this)), m(re, this, null)), a(Y, this) && (Z(a(Y, this)), m(Y, this, null)), a(Q, this) && (Z(a(Q, this)), m(Q, this, null)), J && (tt(a(Qt, this)), ui(), tt(ci()));
1597
1597
  let e = a(se, this).failed;
1598
1598
  const r = (n) => {
1599
- const { reset: i, invoke_onerror: s } = g(I, this, Tn).call(this, n);
1600
- s(), e && m(Q, this, g(I, this, ur).call(this, () => {
1599
+ const { reset: i, invoke_onerror: s } = g(M, this, Cn).call(this, n);
1600
+ s(), e && m(Q, this, g(M, this, cr).call(this, () => {
1601
1601
  try {
1602
1602
  return Le(() => {
1603
1603
  var l = $;
@@ -1608,7 +1608,7 @@ function kr(t) {
1608
1608
  }
1609
1609
  }));
1610
1610
  };
1611
- ke(() => {
1611
+ Ce(() => {
1612
1612
  var n;
1613
1613
  try {
1614
1614
  n = this.transform_error(t);
@@ -1620,119 +1620,119 @@ function kr(t) {
1620
1620
  });
1621
1621
  }
1622
1622
  var Rr = !0;
1623
- function kn(t, e) {
1624
- return Rn(t, e);
1623
+ function On(t, e) {
1624
+ return Mn(t, e);
1625
1625
  }
1626
- function fs(t, e) {
1627
- zt(), e.intro = e.intro ?? !1;
1628
- const r = e.target, n = J, i = G;
1626
+ function _s(t, e) {
1627
+ Xt(), e.intro = e.intro ?? !1;
1628
+ const r = e.target, n = J, i = F;
1629
1629
  try {
1630
- for (var s = /* @__PURE__ */ Xt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ qe(s);
1631
- if (!s) throw gt;
1630
+ for (var s = /* @__PURE__ */ Ut(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ qe(s);
1631
+ if (!s) throw yt;
1632
1632
  lt(!0), tt(s);
1633
- const l = Rn(t, {
1633
+ const l = Mn(t, {
1634
1634
  ...e,
1635
1635
  anchor: s
1636
1636
  });
1637
1637
  return lt(!1), l;
1638
1638
  } catch (l) {
1639
1639
  if (l instanceof Error && l.message.split(`
1640
- `).some((u) => u.startsWith("https://svelte.dev/e/"))) throw l;
1641
- return l !== gt && console.warn("Failed to hydrate: ", l), e.recover === !1 && ci(), zt(), xi(r), lt(!1), kn(t, e);
1640
+ `).some((o) => o.startsWith("https://svelte.dev/e/"))) throw l;
1641
+ return l !== yt && console.warn("Failed to hydrate: ", l), e.recover === !1 && pi(), Xt(), Bi(r), lt(!1), On(t, e);
1642
1642
  } finally {
1643
1643
  lt(n), tt(i);
1644
1644
  }
1645
1645
  }
1646
- var ct = /* @__PURE__ */ new Map();
1647
- function Rn(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: u }) {
1648
- zt();
1649
- var h = void 0, b = Fi(() => {
1650
- var v = r ?? e.appendChild(cn());
1651
- ss(v, { pending: () => {
1652
- } }, (c) => {
1653
- Dr({});
1654
- var _ = M;
1655
- if (s && (_.c = s), i && (n.$$events = i), J && _t(c, null), Rr = l, h = t(c, n) || er(), Rr = !0, J && ($.nodes.end = G, G === null || G.nodeType !== 8 || G.data !== "]"))
1656
- throw Fr(), gt;
1657
- jr();
1658
- }, u);
1659
- var f = /* @__PURE__ */ new Set(), d = (c) => {
1660
- for (var _ = 0; _ < c.length; _++) {
1661
- var p = c[_];
1662
- if (!f.has(p)) {
1663
- f.add(p);
1664
- var R = ts(p);
1646
+ var ft = /* @__PURE__ */ new Map();
1647
+ function Mn(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: o }) {
1648
+ Xt();
1649
+ var f = void 0, y = ji(() => {
1650
+ var v = r ?? e.appendChild(vn());
1651
+ cs(v, { pending: () => {
1652
+ } }, (h) => {
1653
+ Yr({});
1654
+ var _ = I;
1655
+ if (s && (_.c = s), i && (n.$$events = i), J && _t(h, null), Rr = l, f = t(h, n) || tr(), Rr = !0, J && ($.nodes.end = F, F === null || F.nodeType !== 8 || F.data !== "]"))
1656
+ throw Dr(), yt;
1657
+ zr();
1658
+ }, o);
1659
+ var c = /* @__PURE__ */ new Set(), d = (h) => {
1660
+ for (var _ = 0; _ < h.length; _++) {
1661
+ var p = h[_];
1662
+ if (!c.has(p)) {
1663
+ c.add(p);
1664
+ var R = as(p);
1665
1665
  for (const w of [e, document]) {
1666
- var L = ct.get(w);
1667
- L === void 0 && (L = /* @__PURE__ */ new Map(), ct.set(w, L));
1666
+ var L = ft.get(w);
1667
+ L === void 0 && (L = /* @__PURE__ */ new Map(), ft.set(w, L));
1668
1668
  var x = L.get(p);
1669
1669
  x === void 0 ? (w.addEventListener(p, $r, { passive: R }), L.set(p, 1)) : L.set(p, x + 1);
1670
1670
  }
1671
1671
  }
1672
1672
  }
1673
1673
  };
1674
- return d(Gn(zi)), Tr.add(d), () => {
1675
- for (var c of f) for (const R of [e, document]) {
1676
- var _ = ct.get(R), p = _.get(c);
1677
- --p == 0 ? (R.removeEventListener(c, $r), _.delete(c), _.size === 0 && ct.delete(R)) : _.set(c, p);
1674
+ return d(qn(Zi)), Tr.add(d), () => {
1675
+ for (var h of c) for (const R of [e, document]) {
1676
+ var _ = ft.get(R), p = _.get(h);
1677
+ --p == 0 ? (R.removeEventListener(h, $r), _.delete(h), _.size === 0 && ft.delete(R)) : _.set(h, p);
1678
1678
  }
1679
1679
  Tr.delete(d), v !== r && v.parentNode?.removeChild(v);
1680
1680
  };
1681
1681
  });
1682
- return Zt.set(h, b), h;
1682
+ return er.set(f, y), f;
1683
1683
  }
1684
- var Zt = /* @__PURE__ */ new WeakMap();
1685
- function cs(t, e) {
1686
- const r = Zt.get(t);
1687
- return r ? (Zt.delete(t), r(e)) : Promise.resolve();
1684
+ var er = /* @__PURE__ */ new WeakMap();
1685
+ function ps(t, e) {
1686
+ const r = er.get(t);
1687
+ return r ? (er.delete(t), r(e)) : Promise.resolve();
1688
1688
  }
1689
- var Ln, Ke = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakSet(), On = class {
1689
+ var In, Ge = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakSet(), xn = class {
1690
1690
  constructor(t) {
1691
- nr(this, Lr), S(this, Ke, /* @__PURE__ */ new WeakMap()), S(this, Ot, void 0), S(this, Wt, void 0), m(Wt, this, t);
1691
+ ir(this, Lr), S(this, Ge, /* @__PURE__ */ new WeakMap()), S(this, Mt, void 0), S(this, Wt, void 0), m(Wt, this, t);
1692
1692
  }
1693
1693
  observe(t, e) {
1694
- var r = a(Ke, this).get(t) || /* @__PURE__ */ new Set();
1695
- return r.add(e), a(Ke, this).set(t, r), g(Lr, this, hs).call(this).observe(t, a(Wt, this)), () => {
1696
- var n = a(Ke, this).get(t);
1697
- n.delete(e), n.size === 0 && (a(Ke, this).delete(t), a(Ot, this).unobserve(t));
1694
+ var r = a(Ge, this).get(t) || /* @__PURE__ */ new Set();
1695
+ return r.add(e), a(Ge, this).set(t, r), g(Lr, this, ms).call(this).observe(t, a(Wt, this)), () => {
1696
+ var n = a(Ge, this).get(t);
1697
+ n.delete(e), n.size === 0 && (a(Ge, this).delete(t), a(Mt, this).unobserve(t));
1698
1698
  };
1699
1699
  }
1700
1700
  };
1701
- Ln = On;
1702
- function hs() {
1703
- return a(Ot, this) ?? m(Ot, this, new ResizeObserver((t) => {
1701
+ In = xn;
1702
+ function ms() {
1703
+ return a(Mt, this) ?? m(Mt, this, new ResizeObserver((t) => {
1704
1704
  for (var e of t) {
1705
- Ln.entries.set(e.target, e);
1706
- for (var r of a(Ke, this).get(e.target) || []) r(e);
1705
+ In.entries.set(e.target, e);
1706
+ for (var r of a(Ge, this).get(e.target) || []) r(e);
1707
1707
  }
1708
1708
  }));
1709
1709
  }
1710
- o(On, "entries", /* @__PURE__ */ new WeakMap());
1711
- function Dt(t, e) {
1710
+ u(xn, "entries", /* @__PURE__ */ new WeakMap());
1711
+ function jt(t, e) {
1712
1712
  return t === e || t?.[Ue] === e;
1713
1713
  }
1714
- function ds(t = er(), e, r, n) {
1715
- var i = M.r, s = $;
1716
- return Gi(() => {
1717
- var l, u;
1718
- return lr(() => {
1719
- l = u, u = n?.() || [], Bt(() => {
1720
- Dt(r(...u), t) || (e(t, ...u), l && Dt(r(...l), t) && e(null, ...l));
1714
+ function gs(t = tr(), e, r, n) {
1715
+ var i = I.r, s = $;
1716
+ return qi(() => {
1717
+ var l, o;
1718
+ return or(() => {
1719
+ l = o, o = n?.() || [], Bt(() => {
1720
+ jt(r(...o), t) || (e(t, ...o), l && jt(r(...l), t) && e(null, ...l));
1721
1721
  });
1722
1722
  }), () => {
1723
- let h = s;
1724
- for (; h !== i && h.parent !== null && h.parent.f & 33554432; ) h = h.parent;
1725
- const b = () => {
1726
- u && Dt(r(...u), t) && e(null, ...u);
1727
- }, v = h.teardown;
1728
- h.teardown = () => {
1729
- b(), v?.();
1723
+ let f = s;
1724
+ for (; f !== i && f.parent !== null && f.parent.f & 33554432; ) f = f.parent;
1725
+ const y = () => {
1726
+ o && jt(r(...o), t) && e(null, ...o);
1727
+ }, v = f.teardown;
1728
+ f.teardown = () => {
1729
+ y(), v?.();
1730
1730
  };
1731
1731
  };
1732
1732
  }), t;
1733
1733
  }
1734
1734
  var ht = !1;
1735
- function vs(t) {
1735
+ function ys(t) {
1736
1736
  var e = ht;
1737
1737
  try {
1738
1738
  return ht = !1, [t(), ht];
@@ -1741,47 +1741,47 @@ function vs(t) {
1741
1741
  }
1742
1742
  }
1743
1743
  function Ye(t, e, r, n) {
1744
- var i = !Mt || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, u = n, h = !0, b = void 0, v = () => l && i ? (b ?? (b = /* @__PURE__ */ St(n)), A(b)) : (h && (h = !1, u = l ? Bt(n) : n), u);
1745
- let f;
1744
+ var i = !xt || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, o = n, f = !0, y = void 0, v = () => l && i ? (y ?? (y = /* @__PURE__ */ At(n)), A(y)) : (f && (f = !1, o = l ? Bt(n) : n), o);
1745
+ let c;
1746
1746
  if (s) {
1747
- var d = Ue in t || Br in t;
1748
- f = Ee(t, e)?.set ?? (d && e in t ? (H) => t[e] = H : void 0);
1747
+ var d = Ue in t || Gr in t;
1748
+ c = Ee(t, e)?.set ?? (d && e in t ? (H) => t[e] = H : void 0);
1749
1749
  }
1750
- var c, _ = !1;
1751
- s ? [c, _] = vs(() => t[e]) : c = t[e], c === void 0 && n !== void 0 && (c = v(), f && (i && hi(e), f(c)));
1750
+ var h, _ = !1;
1751
+ s ? [h, _] = ys(() => t[e]) : h = t[e], h === void 0 && n !== void 0 && (h = v(), c && (i && mi(e), c(h)));
1752
1752
  var p;
1753
1753
  if (i ? p = () => {
1754
1754
  var H = t[e];
1755
- return H === void 0 ? v() : (h = !0, H);
1755
+ return H === void 0 ? v() : (f = !0, H);
1756
1756
  } : p = () => {
1757
1757
  var H = t[e];
1758
- return H !== void 0 && (u = void 0), H === void 0 ? u : H;
1758
+ return H !== void 0 && (o = void 0), H === void 0 ? o : H;
1759
1759
  }, i && (r & 4) === 0) return p;
1760
- if (f) {
1760
+ if (c) {
1761
1761
  var R = t.$$legacy;
1762
1762
  return (function(H, pe) {
1763
- return arguments.length > 0 ? ((!i || !pe || R || _) && f(pe ? p() : H), H) : p();
1763
+ return arguments.length > 0 ? ((!i || !pe || R || _) && c(pe ? p() : H), H) : p();
1764
1764
  });
1765
1765
  }
1766
- var L = !1, x = ((r & 1) !== 0 ? St : wi)(() => (L = !1, p()));
1766
+ var L = !1, x = ((r & 1) !== 0 ? At : $i)(() => (L = !1, p()));
1767
1767
  s && A(x);
1768
1768
  var w = $;
1769
1769
  return (function(H, pe) {
1770
1770
  if (arguments.length > 0) {
1771
- const He = pe ? A(x) : i && s ? We(H) : H;
1772
- return P(x, He), L = !0, u !== void 0 && (u = He), H;
1771
+ const He = pe ? A(x) : i && s ? De(H) : H;
1772
+ return P(x, He), L = !0, o !== void 0 && (o = He), H;
1773
1773
  }
1774
- return ce && L || (w.f & 16384) !== 0 ? x.v : A(x);
1774
+ return fe && L || (w.f & 16384) !== 0 ? x.v : A(x);
1775
1775
  });
1776
1776
  }
1777
- function _s(t) {
1778
- return new ps(t);
1777
+ function bs(t) {
1778
+ return new ws(t);
1779
1779
  }
1780
- var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ps = class {
1780
+ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ws = class {
1781
1781
  constructor(t) {
1782
1782
  S(this, ge, void 0), S(this, ie, void 0);
1783
1783
  var e = /* @__PURE__ */ new Map(), r = (i, s) => {
1784
- var l = /* @__PURE__ */ Ri(s, !1, !1);
1784
+ var l = /* @__PURE__ */ xi(s, !1, !1);
1785
1785
  return e.set(i, l), l;
1786
1786
  };
1787
1787
  const n = new Proxy({
@@ -1792,13 +1792,13 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ps =
1792
1792
  return A(e.get(s) ?? r(s, Reflect.get(i, s)));
1793
1793
  },
1794
1794
  has(i, s) {
1795
- return s === Br ? !0 : (A(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
1795
+ return s === Gr ? !0 : (A(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
1796
1796
  },
1797
1797
  set(i, s, l) {
1798
1798
  return P(e.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
1799
1799
  }
1800
1800
  });
1801
- m(ie, this, (t.hydrate ? fs : kn)(t.component, {
1801
+ m(ie, this, (t.hydrate ? _s : On)(t.component, {
1802
1802
  target: t.target,
1803
1803
  anchor: t.anchor,
1804
1804
  props: n,
@@ -1806,7 +1806,7 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ps =
1806
1806
  intro: t.intro ?? !1,
1807
1807
  recover: t.recover,
1808
1808
  transformError: t.transformError
1809
- })), !Ie && (!t?.props?.$$host || t.sync === !1) && Fe(), m(ge, this, n.$$events);
1809
+ })), !Me && (!t?.props?.$$host || t.sync === !1) && Be(), m(ge, this, n.$$events);
1810
1810
  for (const i of Object.keys(a(ie, this)))
1811
1811
  i === "$set" || i === "$destroy" || i === "$on" || Ze(this, i, {
1812
1812
  get() {
@@ -1820,7 +1820,7 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ps =
1820
1820
  a(ie, this).$set = (i) => {
1821
1821
  Object.assign(n, i);
1822
1822
  }, a(ie, this).$destroy = () => {
1823
- cs(a(ie, this));
1823
+ ps(a(ie, this));
1824
1824
  };
1825
1825
  }
1826
1826
  $set(t) {
@@ -1836,10 +1836,10 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ps =
1836
1836
  $destroy() {
1837
1837
  a(ie, this).$destroy();
1838
1838
  }
1839
- }, In;
1840
- typeof HTMLElement == "function" && (In = class extends HTMLElement {
1839
+ }, Hn;
1840
+ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
1841
1841
  constructor(t, e, r) {
1842
- super(), o(this, "$$ctor", void 0), o(this, "$$s", void 0), o(this, "$$c", void 0), o(this, "$$cn", !1), o(this, "$$d", {}), o(this, "$$r", !1), o(this, "$$p_d", {}), o(this, "$$l", {}), o(this, "$$l_u", /* @__PURE__ */ new Map()), o(this, "$$me", void 0), o(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, r && (this.$$shadowRoot = this.attachShadow(r));
1842
+ 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 = t, this.$$s = e, r && (this.$$shadowRoot = this.attachShadow(r));
1843
1843
  }
1844
1844
  addEventListener(t, e, r) {
1845
1845
  if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(e), this.$$c) {
@@ -1858,19 +1858,19 @@ typeof HTMLElement == "function" && (In = class extends HTMLElement {
1858
1858
  if (this.$$cn = !0, !this.$$c) {
1859
1859
  let t = function(n) {
1860
1860
  return (i) => {
1861
- const s = hn("slot");
1862
- n !== "default" && (s.name = n), En(i, s);
1861
+ const s = _n("slot");
1862
+ n !== "default" && (s.name = n), kn(i, s);
1863
1863
  };
1864
1864
  };
1865
1865
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
1866
- const e = {}, r = ms(this);
1866
+ const e = {}, r = Ss(this);
1867
1867
  for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
1868
1868
  for (const n of this.attributes) {
1869
1869
  const i = this.$$g_p(n.name);
1870
1870
  i in this.$$d || (this.$$d[i] = pt(i, n.value, this.$$p_d, "toProp"));
1871
1871
  }
1872
1872
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
1873
- this.$$c = _s({
1873
+ this.$$c = bs({
1874
1874
  component: this.$$ctor,
1875
1875
  target: this.$$shadowRoot || this,
1876
1876
  props: {
@@ -1878,10 +1878,10 @@ typeof HTMLElement == "function" && (In = class extends HTMLElement {
1878
1878
  $$slots: e,
1879
1879
  $$host: this
1880
1880
  }
1881
- }), this.$$me = Bi(() => {
1882
- lr(() => {
1881
+ }), this.$$me = Wi(() => {
1882
+ or(() => {
1883
1883
  this.$$r = !0;
1884
- for (const n of bt(this.$$c)) {
1884
+ for (const n of wt(this.$$c)) {
1885
1885
  if (!this.$$p_d[n]?.reflect) continue;
1886
1886
  this.$$d[n] = this.$$c[n];
1887
1887
  const i = pt(n, this.$$d[n], this.$$p_d, "toAttribute");
@@ -1906,7 +1906,7 @@ typeof HTMLElement == "function" && (In = class extends HTMLElement {
1906
1906
  });
1907
1907
  }
1908
1908
  $$g_p(t) {
1909
- return bt(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
1909
+ return wt(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
1910
1910
  }
1911
1911
  });
1912
1912
  function pt(t, e, r, n) {
@@ -1935,48 +1935,42 @@ function pt(t, e, r, n) {
1935
1935
  return e;
1936
1936
  }
1937
1937
  }
1938
- function ms(t) {
1938
+ function Ss(t) {
1939
1939
  const e = {};
1940
1940
  return t.childNodes.forEach((r) => {
1941
1941
  e[r.slot || "default"] = !0;
1942
1942
  }), e;
1943
1943
  }
1944
- function gs(t, e, r, n, i, s) {
1945
- let l = class extends In {
1944
+ function As(t, e, r, n, i, s) {
1945
+ let l = class extends Hn {
1946
1946
  constructor() {
1947
1947
  super(t, r, i), this.$$p_d = e;
1948
1948
  }
1949
1949
  static get observedAttributes() {
1950
- return bt(e).map((u) => (e[u].attribute || u).toLowerCase());
1950
+ return wt(e).map((o) => (e[o].attribute || o).toLowerCase());
1951
1951
  }
1952
1952
  };
1953
- return bt(e).forEach((u) => {
1954
- Ze(l.prototype, u, {
1953
+ return wt(e).forEach((o) => {
1954
+ Ze(l.prototype, o, {
1955
1955
  get() {
1956
- return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
1956
+ return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
1957
1957
  },
1958
- set(h) {
1959
- h = pt(u, h, e), this.$$d[u] = h;
1960
- var b = this.$$c;
1961
- b && (Ee(b, u)?.get ? b[u] = h : b.$set({ [u]: h }));
1958
+ set(f) {
1959
+ f = pt(o, f, e), this.$$d[o] = f;
1960
+ var y = this.$$c;
1961
+ y && (Ee(y, o)?.get ? y[o] = f : y.$set({ [o]: f }));
1962
1962
  }
1963
1963
  });
1964
- }), n.forEach((u) => {
1965
- Ze(l.prototype, u, { get() {
1966
- return this.$$c?.[u];
1964
+ }), n.forEach((o) => {
1965
+ Ze(l.prototype, o, { get() {
1966
+ return this.$$c?.[o];
1967
1967
  } });
1968
1968
  }), s && (l = s(l)), t.element = l, l;
1969
1969
  }
1970
- var Mn, oe = class W {
1971
- constructor() {
1972
- o(this, "elementType", "multiple-choice"), o(this, "priority", 100);
1973
- }
1974
- canHandle(e) {
1975
- return e.tagName.toLowerCase() === "multiple-choice" || e.classList.contains("multiple-choice");
1976
- }
1970
+ var Nn, oe = class D {
1977
1971
  findChoices(e) {
1978
- e.setAttribute(W.ROOT_HOOK_ATTR, "true");
1979
- const r = Array.from(e.querySelectorAll(W.CHOICE_SELECTOR));
1972
+ e.setAttribute(D.ROOT_HOOK_ATTR, "true");
1973
+ const r = Array.from(e.querySelectorAll(D.CHOICE_SELECTOR));
1980
1974
  for (const n of r) this.annotateChoice(n);
1981
1975
  return this.annotateFeedbackTicks(e), r;
1982
1976
  }
@@ -1999,55 +1993,49 @@ var Mn, oe = class W {
1999
1993
  }
2000
1994
  canEliminate(e) {
2001
1995
  const r = e.querySelector('input[type="checkbox"], input[type="radio"]');
2002
- return !(!r || this.isSelected(e) || r.disabled || (e.closest(`[${W.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(`[${W.FEEDBACK_HOOK_ATTR}="true"]`));
1996
+ return !(!r || this.isSelected(e) || r.disabled || (e.closest(`[${D.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(`[${D.FEEDBACK_HOOK_ATTR}="true"]`));
2003
1997
  }
2004
1998
  setSelectable(e, r) {
2005
1999
  const n = e.querySelector('input[type="checkbox"], input[type="radio"]');
2006
2000
  if (!n) return;
2007
2001
  n.disabled = !r, r ? n.removeAttribute("aria-disabled") : n.setAttribute("aria-disabled", "true");
2008
- const i = n.closest(W.MUI_BUTTON_SELECTOR);
2009
- i && i.classList.toggle(W.MUI_DISABLED_CLASS, !r);
2010
- }
2011
- getButtonContainer(e) {
2012
- return e;
2002
+ const i = n.closest(D.MUI_BUTTON_SELECTOR);
2003
+ i && i.classList.toggle(D.MUI_DISABLED_CLASS, !r);
2013
2004
  }
2014
2005
  generateFallbackId(e) {
2015
- const r = (e.closest(`[${W.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(`[${W.CHOICE_HOOK_ATTR}="true"]`) || [];
2006
+ const r = (e.closest(`[${D.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(`[${D.CHOICE_HOOK_ATTR}="true"]`) || [];
2016
2007
  return `choice-${Array.from(r).indexOf(e)}`;
2017
2008
  }
2018
2009
  annotateChoice(e) {
2019
- e.setAttribute(W.CHOICE_HOOK_ATTR, "true");
2010
+ e.setAttribute(D.CHOICE_HOOK_ATTR, "true");
2020
2011
  const r = this.resolveLabelElement(e);
2021
- r && r.setAttribute(W.LABEL_HOOK_ATTR, "true");
2012
+ r && r.setAttribute(D.LABEL_HOOK_ATTR, "true");
2022
2013
  }
2023
2014
  resolveLabelElement(e) {
2024
- return e.querySelector(`[${W.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label") || e.querySelector("span");
2015
+ return e.querySelector(`[${D.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label") || e.querySelector("span");
2025
2016
  }
2026
2017
  annotateFeedbackTicks(e) {
2027
- for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(W.FEEDBACK_HOOK_ATTR, "true");
2018
+ for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(D.FEEDBACK_HOOK_ATTR, "true");
2028
2019
  }
2029
2020
  };
2030
- Mn = oe;
2031
- o(oe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2032
- o(oe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2033
- o(oe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
2034
- o(oe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
2035
- o(oe, "CHOICE_SELECTOR", `[${Mn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
2036
- o(oe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
2037
- o(oe, "MUI_DISABLED_CLASS", "Mui-disabled");
2038
- var ys = "ebsr-multiple-choice", fr = (t) => t instanceof HTMLElement && Pn(t.tagName.toLowerCase()).baseName === ys, Or = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(fr) ?? null, bs = (t) => {
2021
+ Nn = oe;
2022
+ u(oe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2023
+ u(oe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2024
+ u(oe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
2025
+ u(oe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
2026
+ u(oe, "CHOICE_SELECTOR", `[${Nn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
2027
+ u(oe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
2028
+ u(oe, "MUI_DISABLED_CLASS", "Mui-disabled");
2029
+ var Es = "ebsr-multiple-choice", Pn = (t) => t instanceof HTMLElement && Dn(t.tagName.toLowerCase()).baseName === Es, Or = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(Pn) ?? null, Ts = (t) => {
2039
2030
  let e = t.parentElement;
2040
2031
  for (; e !== null; ) {
2041
- if (fr(e)) return e;
2032
+ if (Pn(e)) return e;
2042
2033
  e = e.parentElement;
2043
2034
  }
2044
2035
  return null;
2045
- }, ws = class {
2036
+ }, $s = class {
2046
2037
  constructor() {
2047
- o(this, "elementType", "ebsr"), o(this, "priority", 110), o(this, "mcAdapter", new oe());
2048
- }
2049
- canHandle(t) {
2050
- return t.tagName.toLowerCase() === "ebsr" || Array.from(t.querySelectorAll("*")).some(fr);
2038
+ u(this, "mcAdapter", new oe());
2051
2039
  }
2052
2040
  findChoices(t) {
2053
2041
  const e = Or(t, "a"), r = Or(t, "b"), n = [];
@@ -2057,7 +2045,7 @@ var ys = "ebsr-multiple-choice", fr = (t) => t instanceof HTMLElement && Pn(t.ta
2057
2045
  return this.mcAdapter.createChoiceRange(t);
2058
2046
  }
2059
2047
  getChoiceId(t) {
2060
- return `${bs(t)?.id || "unknown"}-${this.mcAdapter.getChoiceId(t)}`;
2048
+ return `${Ts(t)?.id || "unknown"}-${this.mcAdapter.getChoiceId(t)}`;
2061
2049
  }
2062
2050
  getChoiceLabel(t) {
2063
2051
  return this.mcAdapter.getChoiceLabel(t);
@@ -2071,64 +2059,101 @@ var ys = "ebsr-multiple-choice", fr = (t) => t instanceof HTMLElement && Pn(t.ta
2071
2059
  setSelectable(t, e) {
2072
2060
  this.mcAdapter.setSelectable(t, e);
2073
2061
  }
2074
- getButtonContainer(t) {
2075
- return this.mcAdapter.getButtonContainer(t);
2076
- }
2077
- }, Ss = class {
2078
- constructor() {
2079
- o(this, "elementType", "inline-dropdown"), o(this, "priority", 90);
2080
- }
2081
- canHandle(t) {
2082
- return t.tagName.toLowerCase() === "inline-dropdown" || t.querySelector('[role="combobox"]') !== null;
2083
- }
2084
- findChoices(t) {
2085
- return Array.from(t.querySelectorAll('[role="option"]'));
2086
- }
2087
- createChoiceRange(t) {
2088
- const e = document.createRange();
2089
- return e.selectNodeContents(t), e;
2090
- }
2091
- getChoiceId(t) {
2092
- return t.id || t.getAttribute("data-value") || "";
2093
- }
2094
- getChoiceLabel(t) {
2095
- return t.textContent?.trim() || "Unlabeled option";
2096
- }
2097
- canEliminate(t) {
2098
- return t.getAttribute("aria-selected") !== "true";
2099
- }
2100
- getButtonContainer(t) {
2101
- return t;
2102
- }
2103
- }, As = class {
2104
- constructor() {
2105
- o(this, "adapters", void 0), this.adapters = [
2106
- new oe(),
2107
- new ws(),
2108
- new Ss()
2109
- ].sort((t, e) => e.priority - t.priority);
2110
- }
2111
- findAdapter(t) {
2112
- return this.adapters.find((e) => e.canHandle(t)) || null;
2113
- }
2114
- findAllChoicesWithAdapters(t) {
2115
- const e = [], r = /* @__PURE__ */ new Set();
2116
- for (const n of this.adapters) {
2117
- const i = n.findChoices(t);
2118
- for (const s of i)
2119
- r.has(s) || (r.add(s), e.push({
2120
- choice: s,
2121
- adapter: n
2122
- }));
2123
- }
2124
- return e;
2062
+ }, Mr = "answer-masking", ks = "data-pie-answer-eliminator-choice", Cs = "data-pie-answer-eliminator-label";
2063
+ function Kn(t) {
2064
+ if (!t.localName.includes("-")) return null;
2065
+ try {
2066
+ const e = t.constructor.pieSupports;
2067
+ return Array.isArray(e) ? e : null;
2068
+ } catch {
2069
+ return null;
2125
2070
  }
2126
- registerAdapter(t) {
2127
- this.adapters.push(t), this.adapters.sort((e, r) => r.priority - e.priority);
2071
+ }
2072
+ function Rs(t) {
2073
+ const e = [];
2074
+ for (const r of [t, ...t.querySelectorAll("*")])
2075
+ Kn(r) && (e.some((n) => n.contains(r)) || e.push(r));
2076
+ return e;
2077
+ }
2078
+ function mt(t, e, r) {
2079
+ try {
2080
+ return t();
2081
+ } catch (n) {
2082
+ return console.error(`[AnswerEliminator] ${r} threw:`, n), e;
2083
+ }
2084
+ }
2085
+ function Ls(t) {
2086
+ if (!t || typeof t != "object") return null;
2087
+ const e = t, { id: r, label: n, container: i, content: s } = e, { isSelected: l, isEliminable: o, setEliminated: f } = e;
2088
+ return typeof r != "string" || !r || typeof n != "string" || !(i instanceof HTMLElement) || !(s instanceof Element) || !i.contains(s) || typeof l != "function" || typeof o != "function" || typeof f != "function" ? null : {
2089
+ target: {
2090
+ id: r,
2091
+ label: n.trim() || s.textContent?.trim() || "Unlabeled choice",
2092
+ container: i,
2093
+ createRange() {
2094
+ const y = document.createRange();
2095
+ return y.selectNodeContents(s), y;
2096
+ },
2097
+ isSelected: () => mt(() => l.call(t) === !0, !1, "isSelected"),
2098
+ canEliminate: () => mt(() => o.call(t) === !0, !1, "isEliminable"),
2099
+ setEliminated: (y) => mt(() => f.call(t, y), void 0, "setEliminated")
2100
+ },
2101
+ content: s
2102
+ };
2103
+ }
2104
+ function Ir(t, e) {
2105
+ t.getAttribute(e) !== "true" && t.setAttribute(e, "true");
2106
+ }
2107
+ function Os(t) {
2108
+ if (!Kn(t)?.includes("answer-masking")) return [];
2109
+ const e = t.pieSupportTargets;
2110
+ if (typeof e != "function")
2111
+ return console.warn(`[AnswerEliminator] <${t.localName}> declares ${Mr} but has no pieSupportTargets()`), [];
2112
+ const r = mt(() => e.call(t, Mr), [], `<${t.localName}>.pieSupportTargets`);
2113
+ if (!Array.isArray(r)) return [];
2114
+ const n = [], i = /* @__PURE__ */ new Set();
2115
+ for (const s of r) {
2116
+ const l = Ls(s);
2117
+ if (!l || i.has(l.target.id)) {
2118
+ console.warn(`[AnswerEliminator] <${t.localName}> supplied a choice that is malformed or repeats an id`, s);
2119
+ continue;
2120
+ }
2121
+ const { target: o, content: f } = l;
2122
+ i.add(o.id), Ir(o.container, ks), Ir(f, Cs), n.push({
2123
+ target: o,
2124
+ owner: t
2125
+ });
2128
2126
  }
2129
- }, xe = class B {
2127
+ return n;
2128
+ }
2129
+ var Ms = [new $s(), new oe()];
2130
+ function Is(t, e) {
2131
+ return {
2132
+ id: e.getChoiceId(t),
2133
+ label: e.getChoiceLabel(t),
2134
+ container: t,
2135
+ createRange: () => e.createChoiceRange(t),
2136
+ isSelected: () => e.isSelected(t),
2137
+ canEliminate: () => e.canEliminate(t),
2138
+ setEliminated: (r) => e.setSelectable(t, !r)
2139
+ };
2140
+ }
2141
+ function xs(t, e, r) {
2142
+ const n = [], i = new Set(r.map(({ target: s }) => s.container));
2143
+ for (const s of Ms) for (const l of s.findChoices(t))
2144
+ i.has(l) || (i.add(l), !e.some((o) => o.contains(l)) && n.push({
2145
+ target: Is(l, s),
2146
+ owner: null
2147
+ }));
2148
+ return n;
2149
+ }
2150
+ function xr(t) {
2151
+ const e = Rs(t), r = e.flatMap(Os);
2152
+ return [...r, ...xs(t, e, r)];
2153
+ }
2154
+ var xe = class K {
2130
2155
  constructor() {
2131
- o(this, "name", "mask"), o(this, "highlights", /* @__PURE__ */ new Map()), o(this, "ranges", /* @__PURE__ */ new Map()), o(this, "fallbackContainers", /* @__PURE__ */ new Map());
2156
+ u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
2132
2157
  }
2133
2158
  initialize() {
2134
2159
  }
@@ -2142,14 +2167,14 @@ var ys = "ebsr-multiple-choice", fr = (t) => t instanceof HTMLElement && Pn(t.ta
2142
2167
  }
2143
2168
  this.injectHighlightCSS(e);
2144
2169
  const n = new Highlight(r);
2145
- CSS.highlights.set(`${B.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2170
+ CSS.highlights.set(`${K.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2146
2171
  }
2147
2172
  remove(e) {
2148
2173
  if (!this.isSupported()) {
2149
2174
  this.removeFallback(e);
2150
2175
  return;
2151
2176
  }
2152
- CSS.highlights.delete(`${B.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2177
+ CSS.highlights.delete(`${K.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2153
2178
  const r = this.ranges.get(e);
2154
2179
  r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
2155
2180
  }
@@ -2167,56 +2192,56 @@ var ys = "ebsr-multiple-choice", fr = (t) => t instanceof HTMLElement && Pn(t.ta
2167
2192
  return typeof CSS < "u" && "highlights" in CSS;
2168
2193
  }
2169
2194
  injectHighlightCSS(e) {
2170
- const r = `${B.HIGHLIGHT_STYLE_PREFIX}${e}`;
2195
+ const r = `${K.HIGHLIGHT_STYLE_PREFIX}${e}`;
2171
2196
  if (document.getElementById(r)) return;
2172
2197
  const n = document.createElement("style");
2173
2198
  n.id = r, n.textContent = `
2174
- ::highlight(${B.HIGHLIGHT_NAME_PREFIX}${e}) {
2199
+ ::highlight(${K.HIGHLIGHT_NAME_PREFIX}${e}) {
2175
2200
  opacity: 0.2;
2176
2201
  filter: blur(2px);
2177
2202
  }
2178
2203
  `, document.head.appendChild(n);
2179
2204
  }
2180
2205
  removeHighlightCSS(e) {
2181
- document.getElementById(`${B.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2206
+ document.getElementById(`${K.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2182
2207
  }
2183
2208
  addAriaAttributes(e) {
2184
2209
  const r = this.findChoiceContainer(e);
2185
- r && (r.setAttribute(B.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
2210
+ r && (r.setAttribute(K.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
2186
2211
  }
2187
2212
  removeAriaAttributes(e) {
2188
2213
  const r = this.findChoiceContainer(e);
2189
- r && (r.removeAttribute(B.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
2214
+ r && (r.removeAttribute(K.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
2190
2215
  }
2191
2216
  findChoiceContainer(e) {
2192
2217
  let r = e.startContainer;
2193
2218
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
2194
- if (r.getAttribute(B.CHOICE_HOOK_ATTR) === "true") return r;
2219
+ if (r.getAttribute(K.CHOICE_HOOK_ATTR) === "true") return r;
2195
2220
  r = r.parentElement;
2196
2221
  }
2197
2222
  return null;
2198
2223
  }
2199
2224
  applyFallback(e, r) {
2200
2225
  const n = this.findChoiceContainer(r);
2201
- n && (n.classList.add(B.FALLBACK_CLASS), n.setAttribute(B.ELIMINATED_ATTR, "true"), n.setAttribute(B.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2226
+ n && (n.classList.add(K.FALLBACK_CLASS), n.setAttribute(K.ELIMINATED_ATTR, "true"), n.setAttribute(K.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2202
2227
  }
2203
2228
  removeFallback(e) {
2204
2229
  const r = this.fallbackContainers.get(e);
2205
2230
  if (!r) return;
2206
- r.classList.remove(B.FALLBACK_CLASS), r.removeAttribute(B.ELIMINATED_ATTR), r.removeAttribute(B.ELIMINATED_ID_ATTR);
2231
+ r.classList.remove(K.FALLBACK_CLASS), r.removeAttribute(K.ELIMINATED_ATTR), r.removeAttribute(K.ELIMINATED_ID_ATTR);
2207
2232
  const n = document.createRange();
2208
2233
  n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
2209
2234
  }
2210
2235
  };
2211
- o(xe, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
2212
- o(xe, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
2213
- o(xe, "FALLBACK_CLASS", "pie-answer-masked-fallback");
2214
- o(xe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2215
- o(xe, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2216
- o(xe, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2217
- var k = class y {
2236
+ u(xe, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
2237
+ u(xe, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
2238
+ u(xe, "FALLBACK_CLASS", "pie-answer-masked-fallback");
2239
+ u(xe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2240
+ u(xe, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2241
+ u(xe, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2242
+ var C = class b {
2218
2243
  constructor() {
2219
- o(this, "name", "strikethrough"), o(this, "highlights", /* @__PURE__ */ new Map()), o(this, "ranges", /* @__PURE__ */ new Map()), o(this, "fallbackContainers", /* @__PURE__ */ new Map()), o(this, "imageWrappers", /* @__PURE__ */ new Map()), o(this, "mathTargets", /* @__PURE__ */ new Map());
2244
+ u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map());
2220
2245
  }
2221
2246
  initialize() {
2222
2247
  this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
@@ -2228,7 +2253,7 @@ var k = class y {
2228
2253
  if (this.isSupported()) {
2229
2254
  this.injectHighlightCSS(e);
2230
2255
  const n = new Highlight(r);
2231
- CSS.highlights.set(`${y.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2256
+ CSS.highlights.set(`${b.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2232
2257
  } else this.applyFallback(e, r);
2233
2258
  this.strikeImages(e, r), this.strikeMath(e, r);
2234
2259
  }
@@ -2237,7 +2262,7 @@ var k = class y {
2237
2262
  this.removeFallback(e);
2238
2263
  return;
2239
2264
  }
2240
- CSS.highlights.delete(`${y.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2265
+ CSS.highlights.delete(`${b.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2241
2266
  const r = this.ranges.get(e);
2242
2267
  r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
2243
2268
  }
@@ -2261,11 +2286,11 @@ var k = class y {
2261
2286
  return typeof CSS < "u" && "highlights" in CSS;
2262
2287
  }
2263
2288
  injectHighlightCSS(e) {
2264
- const r = `${y.HIGHLIGHT_STYLE_PREFIX}${e}`;
2289
+ const r = `${b.HIGHLIGHT_STYLE_PREFIX}${e}`;
2265
2290
  if (document.getElementById(r)) return;
2266
2291
  const n = document.createElement("style");
2267
2292
  n.id = r, n.textContent = `
2268
- ::highlight(${y.HIGHLIGHT_NAME_PREFIX}${e}) {
2293
+ ::highlight(${b.HIGHLIGHT_NAME_PREFIX}${e}) {
2269
2294
  text-decoration: line-through;
2270
2295
  text-decoration-thickness: 2px;
2271
2296
  text-decoration-color: var(--pie-answer-eliminator-strike-color, var(--pie-incorrect, #ff9800));
@@ -2273,38 +2298,38 @@ var k = class y {
2273
2298
  `, document.head.appendChild(n);
2274
2299
  }
2275
2300
  removeHighlightCSS(e) {
2276
- document.getElementById(`${y.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2301
+ document.getElementById(`${b.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2277
2302
  }
2278
2303
  addAriaAttributes(e) {
2279
2304
  const r = this.findChoiceContainer(e);
2280
2305
  if (!r) return;
2281
- r.setAttribute(y.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
2306
+ r.setAttribute(b.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
2282
2307
  const n = this.resolveLabelElement(r);
2283
- if (n && !n.querySelector(`.${y.SR_CLASS}`)) {
2308
+ if (n && !n.querySelector(`.${b.SR_CLASS}`)) {
2284
2309
  const i = document.createElement("span");
2285
- i.className = y.SR_CLASS, i.textContent = " (eliminated)", n.appendChild(i);
2310
+ i.className = b.SR_CLASS, i.textContent = " (eliminated)", n.appendChild(i);
2286
2311
  }
2287
2312
  }
2288
2313
  removeAriaAttributes(e) {
2289
2314
  const r = this.findChoiceContainer(e);
2290
- r && (r.removeAttribute(y.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${y.SR_CLASS}`)?.remove());
2315
+ r && (r.removeAttribute(b.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${b.SR_CLASS}`)?.remove());
2291
2316
  }
2292
2317
  findChoiceContainer(e) {
2293
2318
  let r = e.startContainer;
2294
2319
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
2295
- if (r.getAttribute(y.CHOICE_HOOK_ATTR) === "true") return r;
2320
+ if (r.getAttribute(b.CHOICE_HOOK_ATTR) === "true") return r;
2296
2321
  r = r.parentElement;
2297
2322
  }
2298
2323
  return null;
2299
2324
  }
2300
2325
  applyFallback(e, r) {
2301
2326
  const n = this.findChoiceContainer(r);
2302
- n && (n.classList.add(y.FALLBACK_CLASS), n.setAttribute(y.ELIMINATED_ATTR, "true"), n.setAttribute(y.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2327
+ n && (n.classList.add(b.FALLBACK_CLASS), n.setAttribute(b.ELIMINATED_ATTR, "true"), n.setAttribute(b.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2303
2328
  }
2304
2329
  removeFallback(e) {
2305
2330
  const r = this.fallbackContainers.get(e);
2306
2331
  if (!r) return;
2307
- r.classList.remove(y.FALLBACK_CLASS), r.removeAttribute(y.ELIMINATED_ATTR), r.removeAttribute(y.ELIMINATED_ID_ATTR);
2332
+ r.classList.remove(b.FALLBACK_CLASS), r.removeAttribute(b.ELIMINATED_ATTR), r.removeAttribute(b.ELIMINATED_ID_ATTR);
2308
2333
  const n = document.createRange();
2309
2334
  n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
2310
2335
  }
@@ -2329,9 +2354,9 @@ var k = class y {
2329
2354
  const n = this.resolveImageScope(r);
2330
2355
  if (!n) return;
2331
2356
  const i = [];
2332
- for (const s of n.querySelectorAll(y.MATH_SELECTOR)) {
2333
- const l = s.querySelector(y.MATH_BOX_SELECTOR) ?? s, u = !!l.querySelector(y.MATH_STACKED_SELECTOR);
2334
- l.classList.add(y.MATH_STRIKE_CLASS, u ? y.MATH_STRIKE_CROSS_CLASS : y.MATH_STRIKE_LINE_CLASS), l.setAttribute(y.MATH_STRIKE_ATTR, u ? "cross" : "line"), i.push(l);
2357
+ for (const s of n.querySelectorAll(b.MATH_SELECTOR)) {
2358
+ const l = s.querySelector(b.MATH_BOX_SELECTOR) ?? s, o = !!l.querySelector(b.MATH_STACKED_SELECTOR);
2359
+ l.classList.add(b.MATH_STRIKE_CLASS, o ? b.MATH_STRIKE_CROSS_CLASS : b.MATH_STRIKE_LINE_CLASS), l.setAttribute(b.MATH_STRIKE_ATTR, o ? "cross" : "line"), i.push(l);
2335
2360
  }
2336
2361
  i.length > 0 && this.mathTargets.set(e, i);
2337
2362
  }
@@ -2339,7 +2364,7 @@ var k = class y {
2339
2364
  const r = this.mathTargets.get(e);
2340
2365
  if (r) {
2341
2366
  for (const n of r)
2342
- n.classList.remove(y.MATH_STRIKE_CLASS, y.MATH_STRIKE_LINE_CLASS, y.MATH_STRIKE_CROSS_CLASS), n.removeAttribute(y.MATH_STRIKE_ATTR);
2367
+ n.classList.remove(b.MATH_STRIKE_CLASS, b.MATH_STRIKE_LINE_CLASS, b.MATH_STRIKE_CROSS_CLASS), n.removeAttribute(b.MATH_STRIKE_ATTR);
2343
2368
  this.mathTargets.delete(e);
2344
2369
  }
2345
2370
  }
@@ -2350,16 +2375,16 @@ var k = class y {
2350
2375
  wrapImage(e) {
2351
2376
  const r = e.parentElement;
2352
2377
  if (!r) return null;
2353
- if (r.classList.contains(y.IMAGE_WRAPPER_CLASS) || r.hasAttribute(y.IMAGE_WRAPPER_ATTR)) return r;
2378
+ if (r.classList.contains(b.IMAGE_WRAPPER_CLASS) || r.hasAttribute(b.IMAGE_WRAPPER_ATTR)) return r;
2354
2379
  const n = document.createElement("span");
2355
- return n.className = y.IMAGE_WRAPPER_CLASS, n.setAttribute(y.IMAGE_WRAPPER_ATTR, "true"), this.fillsParentWidth(e, r) ? n.style.display = "block" : y.BLOCK_DISPLAYS.has(getComputedStyle(e).display) && (n.style.display = "block", n.style.width = "fit-content"), r.insertBefore(n, e), n.appendChild(e), n.appendChild(this.createImageStrikeOverlay()), n;
2380
+ return n.className = b.IMAGE_WRAPPER_CLASS, n.setAttribute(b.IMAGE_WRAPPER_ATTR, "true"), this.fillsParentWidth(e, r) ? n.style.display = "block" : b.BLOCK_DISPLAYS.has(getComputedStyle(e).display) && (n.style.display = "block", n.style.width = "fit-content"), r.insertBefore(n, e), n.appendChild(e), n.appendChild(this.createImageStrikeOverlay()), n;
2356
2381
  }
2357
2382
  fillsParentWidth(e, r) {
2358
2383
  const n = e.getBoundingClientRect().width, i = r.clientWidth;
2359
2384
  return n === 0 || i === 0 ? !1 : n >= i - 1;
2360
2385
  }
2361
2386
  unwrapImage(e) {
2362
- e.querySelector(`.${y.IMAGE_OVERLAY_CLASS}`)?.remove();
2387
+ e.querySelector(`.${b.IMAGE_OVERLAY_CLASS}`)?.remove();
2363
2388
  const r = e.parentElement;
2364
2389
  if (r) {
2365
2390
  for (; e.firstChild; ) r.insertBefore(e.firstChild, e);
@@ -2367,8 +2392,8 @@ var k = class y {
2367
2392
  }
2368
2393
  }
2369
2394
  createImageStrikeOverlay() {
2370
- const e = document.createElementNS(y.SVG_NS, "svg");
2371
- e.setAttribute("class", y.IMAGE_OVERLAY_CLASS), e.setAttribute("viewBox", "0 0 100 100"), e.setAttribute("preserveAspectRatio", "none"), e.setAttribute("aria-hidden", "true"), e.setAttribute("focusable", "false");
2395
+ const e = document.createElementNS(b.SVG_NS, "svg");
2396
+ e.setAttribute("class", b.IMAGE_OVERLAY_CLASS), e.setAttribute("viewBox", "0 0 100 100"), e.setAttribute("preserveAspectRatio", "none"), e.setAttribute("aria-hidden", "true"), e.setAttribute("focusable", "false");
2372
2397
  const r = [{
2373
2398
  x1: "0",
2374
2399
  y1: "0",
@@ -2380,38 +2405,38 @@ var k = class y {
2380
2405
  x2: "100",
2381
2406
  y2: "0"
2382
2407
  }];
2383
- for (const n of [y.IMAGE_CASING_CLASS, y.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: l, y2: u } of r) {
2384
- const h = document.createElementNS(y.SVG_NS, "line");
2385
- h.setAttribute("class", n), h.setAttribute("x1", i), h.setAttribute("y1", s), h.setAttribute("x2", l), h.setAttribute("y2", u), h.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(h);
2408
+ for (const n of [b.IMAGE_CASING_CLASS, b.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: l, y2: o } of r) {
2409
+ const f = document.createElementNS(b.SVG_NS, "line");
2410
+ f.setAttribute("class", n), f.setAttribute("x1", i), f.setAttribute("y1", s), f.setAttribute("x2", l), f.setAttribute("y2", o), f.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(f);
2386
2411
  }
2387
2412
  return e;
2388
2413
  }
2389
2414
  resolveLabelElement(e) {
2390
- return e.querySelector(`[${y.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2415
+ return e.querySelector(`[${b.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2391
2416
  }
2392
2417
  };
2393
- o(k, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
2394
- o(k, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
2395
- o(k, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
2396
- o(k, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
2397
- o(k, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2398
- o(k, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2399
- o(k, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2400
- o(k, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2401
- o(k, "IMAGE_WRAPPER_CLASS", "pie-answer-eliminator-image-strike");
2402
- o(k, "IMAGE_WRAPPER_ATTR", "data-pie-answer-eliminator-image-strike");
2403
- o(k, "IMAGE_OVERLAY_CLASS", "pie-answer-eliminator-image-strike-overlay");
2404
- o(k, "IMAGE_LINE_CLASS", "pie-answer-eliminator-image-strike-line");
2405
- o(k, "IMAGE_CASING_CLASS", "pie-answer-eliminator-image-strike-casing");
2406
- o(k, "MATH_STRIKE_CLASS", "pie-answer-eliminator-math-strike");
2407
- o(k, "MATH_STRIKE_LINE_CLASS", "pie-answer-eliminator-math-strike--line");
2408
- o(k, "MATH_STRIKE_CROSS_CLASS", "pie-answer-eliminator-math-strike--cross");
2409
- o(k, "MATH_STRIKE_ATTR", "data-pie-answer-eliminator-math-strike");
2410
- o(k, "MATH_STACKED_SELECTOR", "mjx-mfrac, mjx-mtable");
2411
- o(k, "MATH_BOX_SELECTOR", "mjx-math");
2412
- o(k, "MATH_SELECTOR", "mjx-container");
2413
- o(k, "SVG_NS", "http://www.w3.org/2000/svg");
2414
- o(k, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2418
+ u(C, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
2419
+ u(C, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
2420
+ u(C, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
2421
+ u(C, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
2422
+ u(C, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2423
+ u(C, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2424
+ u(C, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2425
+ u(C, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2426
+ u(C, "IMAGE_WRAPPER_CLASS", "pie-answer-eliminator-image-strike");
2427
+ u(C, "IMAGE_WRAPPER_ATTR", "data-pie-answer-eliminator-image-strike");
2428
+ u(C, "IMAGE_OVERLAY_CLASS", "pie-answer-eliminator-image-strike-overlay");
2429
+ u(C, "IMAGE_LINE_CLASS", "pie-answer-eliminator-image-strike-line");
2430
+ u(C, "IMAGE_CASING_CLASS", "pie-answer-eliminator-image-strike-casing");
2431
+ u(C, "MATH_STRIKE_CLASS", "pie-answer-eliminator-math-strike");
2432
+ u(C, "MATH_STRIKE_LINE_CLASS", "pie-answer-eliminator-math-strike--line");
2433
+ u(C, "MATH_STRIKE_CROSS_CLASS", "pie-answer-eliminator-math-strike--cross");
2434
+ u(C, "MATH_STRIKE_ATTR", "data-pie-answer-eliminator-math-strike");
2435
+ u(C, "MATH_STACKED_SELECTOR", "mjx-mfrac, mjx-mtable");
2436
+ u(C, "MATH_BOX_SELECTOR", "mjx-math");
2437
+ u(C, "MATH_SELECTOR", "mjx-container");
2438
+ u(C, "SVG_NS", "http://www.w3.org/2000/svg");
2439
+ u(C, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2415
2440
  "block",
2416
2441
  "flex",
2417
2442
  "grid",
@@ -2419,69 +2444,75 @@ o(k, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2419
2444
  "flow-root",
2420
2445
  "list-item"
2421
2446
  ]));
2422
- var Ir = "answerEliminator", cr = class mt {
2447
+ var Hr = "answerEliminator", fr = class gt {
2423
2448
  constructor(e = "strikethrough", r = "right") {
2424
- o(this, "registry", void 0), o(this, "strategy", void 0), o(this, "choices", /* @__PURE__ */ new Map()), o(this, "eliminated", /* @__PURE__ */ new Set()), o(this, "strategyKeys", /* @__PURE__ */ new Map()), o(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), o(this, "nextToken", 0), o(this, "buttonAlignment", "right"), o(this, "shouldRestoreState", !0), o(this, "active", !0), o(this, "questionRoot", null), o(this, "selectionChangeHandler", null), o(this, "selectionObserver", null), o(this, "selectionRefreshFrame", null), o(this, "store", null), o(this, "elementStateKeys", {}), this.registry = new As(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = r;
2449
+ u(this, "strategy", void 0), u(this, "choices", /* @__PURE__ */ new Map()), u(this, "eliminated", /* @__PURE__ */ new Set()), u(this, "strategyKeys", /* @__PURE__ */ new Map()), u(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), u(this, "nextToken", 0), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "active", !0), u(this, "questionRoot", null), u(this, "selectionChangeHandler", null), u(this, "selectionObserver", null), u(this, "selectionRefreshFrame", null), u(this, "focusedKey", null), u(this, "store", null), u(this, "elementStateKeys", {}), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = r;
2425
2450
  }
2426
2451
  createStrategy(e) {
2427
- return e === "mask" ? new xe() : new k();
2452
+ return e === "mask" ? new xe() : new C();
2428
2453
  }
2429
2454
  initializeForQuestion(e) {
2430
2455
  this.active = !0;
2431
2456
  const r = new Set(this.eliminated);
2432
2457
  this.restoreAllSelectable(), this.strategy.clearAll(), this.eliminated.clear(), this.cleanupButtons();
2433
- const n = this.registry.findAllChoicesWithAdapters(e);
2434
- for (const { choice: s, adapter: l } of n) this.initializeChoice(s, l, e);
2435
- const i = this.readPersistedEliminations();
2436
- for (const [s, l] of this.choices) (i.has(l.group) ? i.get(l.group)?.has(l.choiceId) : r.has(s)) && this.applyElimination(s, l);
2458
+ for (const i of xr(e)) this.initializeChoice(i, e);
2459
+ const n = this.readPersistedEliminations();
2460
+ for (const [i, s] of this.choices) (n.has(s.group) ? n.get(s.group)?.has(s.choiceId) : r.has(i)) && this.applyElimination(i, s);
2437
2461
  this.attachSelectionListener(e);
2438
2462
  }
2439
2463
  trackingKey(e, r) {
2440
2464
  return `${e}\0${r}`;
2441
2465
  }
2442
- resolveGroup(e, r) {
2443
- let n = null;
2444
- for (let l = e.parentElement; l !== null; l = l === r ? null : l.parentElement) {
2445
- if (l.id && Object.hasOwn(this.elementStateKeys, l.id)) return l.id;
2446
- n === null && l.localName.includes("-") && (n = l);
2466
+ resolveGroup({ target: e, owner: r }, n) {
2467
+ let i = r;
2468
+ for (let o = r ?? e.container.parentElement; o !== null; o = o === n ? null : o.parentElement) {
2469
+ if (o.id && Object.hasOwn(this.elementStateKeys, o.id)) return o.id;
2470
+ i === null && o.localName.includes("-") && (i = o);
2447
2471
  }
2448
- const i = n ?? r;
2449
- let s = this.anonymousGroups.get(i);
2450
- return s || (s = `\0anonymous-${this.nextToken++}`, this.anonymousGroups.set(i, s)), s;
2472
+ const s = i ?? n;
2473
+ let l = this.anonymousGroups.get(s);
2474
+ return l || (l = `\0anonymous-${this.nextToken++}`, this.anonymousGroups.set(s, l)), l;
2451
2475
  }
2452
2476
  strategyKeyFor(e) {
2453
2477
  let r = this.strategyKeys.get(e);
2454
2478
  return r || (r = `choice-${this.nextToken++}`, this.strategyKeys.set(e, r)), r;
2455
2479
  }
2456
- initializeChoice(e, r, n) {
2457
- const i = r.getChoiceId(e), s = this.resolveGroup(e, n), l = this.trackingKey(s, i), u = {
2458
- choiceId: i,
2459
- group: s,
2460
- strategyKey: this.strategyKeyFor(l),
2461
- element: e,
2462
- adapter: r,
2480
+ initializeChoice(e, r) {
2481
+ const { target: n, owner: i } = e, s = n.id, l = this.resolveGroup(e, r), o = this.trackingKey(l, s), f = {
2482
+ choiceId: s,
2483
+ group: l,
2484
+ strategyKey: this.strategyKeyFor(o),
2485
+ target: n,
2486
+ owner: i,
2463
2487
  button: null
2464
2488
  };
2465
- this.choices.set(l, u);
2466
- const h = this.createToggleButton(l, u);
2467
- u.button = h, this.updateButtonVisibility(l);
2468
- const b = r.getButtonContainer(e);
2469
- b && (b.style.position = "relative", b.appendChild(h));
2470
- }
2471
- createToggleButton(e, r) {
2472
- const n = r.adapter.getChoiceLabel(r.element), i = document.createElement("button");
2473
- i.type = "button", i.className = mt.TOGGLE_CLASS, i.setAttribute("aria-label", `Toggle elimination for ${n}`), i.setAttribute("aria-pressed", "false"), i.setAttribute("data-choice-id", r.choiceId);
2474
- const s = document.createElement("span");
2475
- return s.setAttribute("aria-hidden", "true"), s.textContent = "⊗", i.appendChild(s), this.applyButtonAlignment(i), i.dataset.pieShownDisplay = i.style.display, i.addEventListener("click", (l) => {
2476
- l.preventDefault(), l.stopPropagation(), this.toggleElimination(e);
2477
- }), i;
2489
+ this.choices.set(o, f);
2490
+ const y = this.createToggleButton(o, f, this.alignmentFor(n.container));
2491
+ f.button = y, this.updateButtonVisibility(o), n.container.style.position = "relative", n.container.appendChild(y);
2492
+ }
2493
+ alignmentFor(e) {
2494
+ return this.buttonAlignment === "inline" || getComputedStyle(e).display === "inline" ? "inline" : this.buttonAlignment;
2495
+ }
2496
+ createToggleButton(e, r, n) {
2497
+ const i = r.target.label, s = document.createElement("button");
2498
+ s.type = "button", s.className = gt.TOGGLE_CLASS, s.setAttribute("aria-label", `Toggle elimination for ${i}`), s.setAttribute("aria-pressed", "false"), s.setAttribute("data-choice-id", r.choiceId);
2499
+ const l = document.createElement("span");
2500
+ return l.setAttribute("aria-hidden", "true"), l.textContent = "⊗", s.appendChild(l), this.applyButtonAlignment(s, n), s.dataset.pieShownDisplay = s.style.display, s.addEventListener("click", (o) => {
2501
+ o.preventDefault(), o.stopPropagation(), this.toggleElimination(e);
2502
+ }), s.addEventListener("focus", () => {
2503
+ this.focusedKey = e;
2504
+ }), s.addEventListener("blur", () => {
2505
+ queueMicrotask(() => {
2506
+ s.isConnected && this.focusedKey === e && (this.focusedKey = null);
2507
+ });
2508
+ }), s;
2478
2509
  }
2479
2510
  toggleElimination(e) {
2480
2511
  const r = this.choices.get(e);
2481
2512
  if (r) {
2482
2513
  if (this.eliminated.has(e)) this.restoreChoice(e);
2483
2514
  else {
2484
- if (!r.adapter.canEliminate(r.element)) {
2515
+ if (!r.target.canEliminate()) {
2485
2516
  console.warn("Cannot eliminate this choice (already selected or in evaluate mode)");
2486
2517
  return;
2487
2518
  }
@@ -2493,14 +2524,14 @@ var Ir = "answerEliminator", cr = class mt {
2493
2524
  this.saveState(r.group);
2494
2525
  }
2495
2526
  }
2496
- applyElimination(e, r) {
2497
- if (r.adapter.isSelected?.(r.element)) return !1;
2498
- const n = r.adapter.createChoiceRange(r.element);
2499
- return n ? (this.strategy.apply(r.strategyKey, n), this.eliminated.add(e), r.adapter.setSelectable?.(r.element, !1), r.button && (r.button.classList.add(mt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(e), !0) : !1;
2527
+ applyElimination(e, r, n = !0) {
2528
+ if (r.target.isSelected()) return !1;
2529
+ const i = r.target.createRange();
2530
+ return i ? (this.strategy.apply(r.strategyKey, i), this.eliminated.add(e), n && r.target.setEliminated(!0), r.button && (r.button.classList.add(gt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(e), !0) : !1;
2500
2531
  }
2501
2532
  restoreChoice(e) {
2502
2533
  const r = this.choices.get(e);
2503
- this.eliminated.delete(e), r && (this.strategy.remove(r.strategyKey), r.adapter.setSelectable?.(r.element, !0), r.button && (r.button.classList.remove(mt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(e));
2534
+ this.eliminated.delete(e), r && (this.strategy.remove(r.strategyKey), r.target.setEliminated(!1), r.button && (r.button.classList.remove(gt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(e));
2504
2535
  }
2505
2536
  resetAll() {
2506
2537
  if (this.eliminated.size === 0) return;
@@ -2524,7 +2555,7 @@ var Ir = "answerEliminator", cr = class mt {
2524
2555
  const i = this.choices.get(n);
2525
2556
  i?.group === e && r.push(i.choiceId);
2526
2557
  }
2527
- this.store.setState(this.elementStateKeys[e], Ir, { eliminatedChoices: r });
2558
+ this.store.setState(this.elementStateKeys[e], Hr, { eliminatedChoices: r });
2528
2559
  }
2529
2560
  readPersistedEliminations() {
2530
2561
  const e = /* @__PURE__ */ new Map();
@@ -2532,7 +2563,7 @@ var Ir = "answerEliminator", cr = class mt {
2532
2563
  for (const { group: r } of this.choices.values())
2533
2564
  if (!(e.has(r) || !Object.hasOwn(this.elementStateKeys, r)))
2534
2565
  try {
2535
- const n = this.store.getState(this.elementStateKeys[r], Ir), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
2566
+ const n = this.store.getState(this.elementStateKeys[r], Hr), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
2536
2567
  e.set(r, new Set(i));
2537
2568
  } catch (n) {
2538
2569
  console.error("Failed to restore eliminator state:", n);
@@ -2540,17 +2571,14 @@ var Ir = "answerEliminator", cr = class mt {
2540
2571
  return e;
2541
2572
  }
2542
2573
  restoreAllSelectable() {
2543
- for (const e of this.eliminated) {
2544
- const r = this.choices.get(e);
2545
- r?.adapter.setSelectable?.(r.element, !0);
2546
- }
2574
+ for (const e of this.eliminated) this.choices.get(e)?.target.setEliminated(!1);
2547
2575
  }
2548
2576
  setButtonHidden(e, r) {
2549
2577
  const n = r ? "none" : e.dataset.pieShownDisplay ?? "";
2550
2578
  e.style.display !== n && (e.style.display = n);
2551
2579
  }
2552
2580
  shouldHideButton(e, r) {
2553
- return this.eliminated.has(e) ? !1 : this.active ? r.adapter.isSelected?.(r.element) ?? !1 : !0;
2581
+ return this.eliminated.has(e) ? !1 : this.active ? r.target.isSelected() : !0;
2554
2582
  }
2555
2583
  updateButtonVisibility(e) {
2556
2584
  const r = this.choices.get(e);
@@ -2559,6 +2587,24 @@ var Ir = "answerEliminator", cr = class mt {
2559
2587
  refreshSelectionState() {
2560
2588
  for (const e of this.choices.keys()) this.updateButtonVisibility(e);
2561
2589
  }
2590
+ hasDetachedChoice() {
2591
+ for (const { target: e } of this.choices.values()) if (!e.container.isConnected) return !0;
2592
+ return !1;
2593
+ }
2594
+ rescan() {
2595
+ const e = this.questionRoot;
2596
+ if (!e) return;
2597
+ const r = this.focusedKey !== null && !this.choices.get(this.focusedKey)?.button?.isConnected && (document.activeElement === null || document.activeElement === document.body) ? this.focusedKey : null, n = this.choices, i = new Set(this.eliminated);
2598
+ this.strategy.clearAll(), this.eliminated.clear();
2599
+ for (const { button: s } of n.values()) s?.remove();
2600
+ this.choices = /* @__PURE__ */ new Map();
2601
+ for (const s of xr(e)) this.initializeChoice(s, e);
2602
+ for (const s of i) {
2603
+ const l = n.get(s), o = this.choices.get(s), f = !!l?.owner && o?.owner === l.owner;
2604
+ o && this.applyElimination(s, o, !f) || (o ?? l)?.target.setEliminated(!1);
2605
+ }
2606
+ r && this.choices.get(r)?.button?.focus({ preventScroll: !0 });
2607
+ }
2562
2608
  scheduleSelectionRefresh() {
2563
2609
  this.selectionRefreshFrame === null && (this.selectionRefreshFrame = requestAnimationFrame(() => {
2564
2610
  this.selectionRefreshFrame = null, this.refreshSelectionState();
@@ -2568,7 +2614,7 @@ var Ir = "answerEliminator", cr = class mt {
2568
2614
  this.detachSelectionListener(), this.questionRoot = e, this.selectionChangeHandler = () => this.scheduleSelectionRefresh(), e.addEventListener("change", this.selectionChangeHandler), typeof MutationObserver < "u" && (this.selectionObserver = new MutationObserver((r) => {
2569
2615
  const n = /* @__PURE__ */ new Set();
2570
2616
  for (const { button: i } of this.choices.values()) i && n.add(i);
2571
- r.some((i) => !n.has(i.target)) && this.scheduleSelectionRefresh();
2617
+ r.some((i) => !n.has(i.target)) && (this.hasDetachedChoice() ? this.rescan() : this.scheduleSelectionRefresh());
2572
2618
  }), this.selectionObserver.observe(e, {
2573
2619
  subtree: !0,
2574
2620
  childList: !0,
@@ -2579,12 +2625,12 @@ var Ir = "answerEliminator", cr = class mt {
2579
2625
  this.selectionRefreshFrame !== null && (cancelAnimationFrame(this.selectionRefreshFrame), this.selectionRefreshFrame = null), this.selectionObserver && (this.selectionObserver.disconnect(), this.selectionObserver = null), this.questionRoot && this.selectionChangeHandler && this.questionRoot.removeEventListener("change", this.selectionChangeHandler), this.questionRoot = null, this.selectionChangeHandler = null;
2580
2626
  }
2581
2627
  cleanupButtons() {
2582
- this.detachSelectionListener();
2628
+ this.detachSelectionListener(), this.focusedKey = null;
2583
2629
  for (const { button: e } of this.choices.values()) e?.remove();
2584
2630
  this.choices.clear();
2585
2631
  }
2586
- applyButtonAlignment(e) {
2587
- switch (this.buttonAlignment) {
2632
+ applyButtonAlignment(e, r) {
2633
+ switch (r) {
2588
2634
  case "right":
2589
2635
  Object.assign(e.style, {
2590
2636
  position: "absolute",
@@ -2624,36 +2670,36 @@ var Ir = "answerEliminator", cr = class mt {
2624
2670
  this.restoreAllSelectable(), this.eliminated.clear(), this.cleanupButtons(), this.strategy.destroy();
2625
2671
  }
2626
2672
  };
2627
- o(cr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
2628
- o(cr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
2629
- var Es = /* @__PURE__ */ Ji('<div style="display: none;" aria-hidden="true"></div>');
2630
- function Ts(t, e) {
2631
- Dr(e, !0);
2632
- let r = Ye(e, "visible", 7, !1), n = Ye(e, "strategy", 7, "strikethrough"), i = Ye(e, "alwaysOn", 7, !1), s = Ye(e, "buttonAlignment", 7, "right"), l = Ye(e, "elementStateKeys", 23, () => ({})), u = /* @__PURE__ */ D(null), h = /* @__PURE__ */ D(null), b = /* @__PURE__ */ D(null);
2633
- const v = /* @__PURE__ */ gr(() => A(h)?.elementToolStateStore ?? null);
2634
- let f = /* @__PURE__ */ D(null), d = /* @__PURE__ */ D(null), c = /* @__PURE__ */ gr(() => i() || r());
2673
+ u(fr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
2674
+ u(fr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
2675
+ var Hs = /* @__PURE__ */ ns('<div style="display: none;" aria-hidden="true"></div>');
2676
+ function Ns(t, e) {
2677
+ Yr(e, !0);
2678
+ let r = Ye(e, "visible", 7, !1), n = Ye(e, "strategy", 7, "strikethrough"), i = Ye(e, "alwaysOn", 7, !1), s = Ye(e, "buttonAlignment", 7, "right"), l = Ye(e, "elementStateKeys", 23, () => ({})), o = /* @__PURE__ */ W(null), f = /* @__PURE__ */ W(null), y = /* @__PURE__ */ W(null);
2679
+ const v = /* @__PURE__ */ gr(() => A(f)?.elementToolStateStore ?? null);
2680
+ let c = /* @__PURE__ */ W(null), d = /* @__PURE__ */ W(null), h = /* @__PURE__ */ gr(() => i() || r());
2635
2681
  Ne(() => {
2636
- if (A(u))
2637
- return Hn(A(u), (w) => {
2638
- P(h, w, !0);
2682
+ if (A(o))
2683
+ return Fn(A(o), (w) => {
2684
+ P(f, w, !0);
2639
2685
  });
2640
2686
  }), Ne(() => {
2641
- if (A(u))
2642
- return Nn(A(u), (w) => {
2643
- P(b, w, !0);
2687
+ if (A(o))
2688
+ return Gn(A(o), (w) => {
2689
+ P(y, w, !0);
2644
2690
  });
2645
2691
  });
2646
2692
  function _() {
2647
- return A(b)?.scopeElement || null;
2693
+ return A(y)?.scopeElement || null;
2648
2694
  }
2649
2695
  function p() {
2650
- if (!A(c) || !A(f)) return;
2696
+ if (!A(h) || !A(c)) return;
2651
2697
  const w = _();
2652
2698
  if (!w) {
2653
2699
  console.warn("[AnswerEliminator] Missing shell scope context for question root");
2654
2700
  return;
2655
2701
  }
2656
- A(f).initializeForQuestion(w);
2702
+ A(c).initializeForQuestion(w);
2657
2703
  }
2658
2704
  function R() {
2659
2705
  requestAnimationFrame(() => {
@@ -2663,16 +2709,16 @@ function Ts(t, e) {
2663
2709
  });
2664
2710
  }
2665
2711
  Ne(() => {
2666
- A(f)?.setStoreIntegration(A(v), l() ?? {});
2712
+ A(c)?.setStoreIntegration(A(v), l() ?? {});
2667
2713
  }), Ne(() => {
2668
- const w = new cr(n(), s());
2714
+ const w = new fr(n(), s());
2669
2715
  return Bt(() => {
2670
- w.setStoreIntegration(A(v), l() ?? {}), P(f, w, !0), A(c) ? p() : w.cleanup();
2716
+ w.setStoreIntegration(A(v), l() ?? {}), P(c, w, !0), A(h) ? p() : w.cleanup();
2671
2717
  }), () => {
2672
- w.destroy(), A(f) === w && P(f, null);
2718
+ w.destroy(), A(c) === w && P(c, null);
2673
2719
  };
2674
2720
  }), Ne(() => {
2675
- const w = A(b)?.contextVersion ?? null;
2721
+ const w = A(y)?.contextVersion ?? null;
2676
2722
  if (w !== null) {
2677
2723
  if (A(d) === null) {
2678
2724
  P(d, w, !0);
@@ -2681,43 +2727,43 @@ function Ts(t, e) {
2681
2727
  w !== A(d) && (P(d, w, !0), R());
2682
2728
  }
2683
2729
  }), Ne(() => {
2684
- A(f) && (A(c) ? (A(f).enableStateRestoration(), p()) : A(f).cleanup());
2730
+ A(c) && (A(h) ? (A(c).enableStateRestoration(), p()) : A(c).cleanup());
2685
2731
  });
2686
2732
  var L = {
2687
2733
  get visible() {
2688
2734
  return r();
2689
2735
  },
2690
2736
  set visible(w = !1) {
2691
- r(w), Fe();
2737
+ r(w), Be();
2692
2738
  },
2693
2739
  get strategy() {
2694
2740
  return n();
2695
2741
  },
2696
2742
  set strategy(w = "strikethrough") {
2697
- n(w), Fe();
2743
+ n(w), Be();
2698
2744
  },
2699
2745
  get alwaysOn() {
2700
2746
  return i();
2701
2747
  },
2702
2748
  set alwaysOn(w = !1) {
2703
- i(w), Fe();
2749
+ i(w), Be();
2704
2750
  },
2705
2751
  get buttonAlignment() {
2706
2752
  return s();
2707
2753
  },
2708
2754
  set buttonAlignment(w = "right") {
2709
- s(w), Fe();
2755
+ s(w), Be();
2710
2756
  },
2711
2757
  get elementStateKeys() {
2712
2758
  return l();
2713
2759
  },
2714
2760
  set elementStateKeys(w = {}) {
2715
- l(w), Fe();
2761
+ l(w), Be();
2716
2762
  }
2717
- }, x = Es();
2718
- return ds(x, (w) => P(u, w), () => A(u)), En(t, x), jr(L);
2763
+ }, x = Hs();
2764
+ return gs(x, (w) => P(o, w), () => A(o)), kn(t, x), zr(L);
2719
2765
  }
2720
- $s("pie-tool-answer-eliminator", gs(Ts, {
2766
+ Ps("pie-tool-answer-eliminator", As(Ns, {
2721
2767
  visible: {
2722
2768
  attribute: "visible",
2723
2769
  type: "Boolean"
@@ -2735,10 +2781,10 @@ $s("pie-tool-answer-eliminator", gs(Ts, {
2735
2781
  type: "String"
2736
2782
  },
2737
2783
  elementStateKeys: { type: "Object" }
2738
- }, [], [], { mode: "open" }, xn));
2739
- function $s(t, e) {
2784
+ }, [], [], { mode: "open" }, Bn));
2785
+ function Ps(t, e) {
2740
2786
  customElements.get(t) || customElements.define(t, e);
2741
2787
  }
2742
2788
  export {
2743
- Ts as default
2789
+ Ns as default
2744
2790
  };