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

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