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

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