@tempots/ui 10.0.0 → 10.2.0

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.
package/index.js CHANGED
@@ -1,17 +1,17 @@
1
- var Ce = Object.defineProperty;
2
- var De = (t, e, o) => e in t ? Ce(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var Lt = (t, e, o) => De(t, typeof e != "symbol" ? e + "" : e, o);
4
- import { getWindow as nt, prop as M, makeProviderMark as Nt, Signal as ie, Use as ct, html as Pt, on as ce, Value as k, attr as Vt, Empty as St, OneOfType as ae, WithElement as _, OnDispose as N, Fragment as j, Portal as le, renderableOfTNode as Ht, When as ue, previousSignal as We, effectOf as Fe, computedOf as fe, WithBrowserCtx as Me, Provide as Ne, OneOfTuple as he, Prop as Ve } from "@tempots/dom";
5
- import { delayed as de, AsyncResult as L, nearEqual as dt, interval as He } from "@tempots/std";
6
- const $e = (t) => {
1
+ var De = Object.defineProperty;
2
+ var We = (t, e, o) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var Lt = (t, e, o) => We(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { getWindow as st, prop as N, makeProviderMark as Nt, computedOf as Ht, Signal as ae, Use as at, html as Et, on as le, Value as C, attr as Vt, Empty as St, OneOfType as ue, WithElement as _, OnDispose as H, Fragment as Y, Portal as fe, renderableOfTNode as $t, When as he, previousSignal as Fe, effectOf as Me, WithBrowserCtx as Ne, Provide as He, OneOfTuple as de, Prop as Ve } from "@tempots/dom";
5
+ import { delayed as me, AsyncResult as L, nearEqual as mt, interval as $e } from "@tempots/std";
6
+ const ze = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
9
9
  const o = e.split(".") || [];
10
10
  return o.length > 1 ? "." + o.pop() : void 0;
11
- }, ze = (t, e) => {
12
- const o = $e(e);
11
+ }, Be = (t, e) => {
12
+ const o = ze(e);
13
13
  return o != null && (t.length === 0 || !t.some((n) => o == n));
14
- }, Be = (t, e, o, n) => {
14
+ }, _e = (t, e, o, n) => {
15
15
  let r = t.target;
16
16
  for (; r != null && !(r instanceof HTMLAnchorElement); )
17
17
  r = r.parentElement;
@@ -26,8 +26,8 @@ const $e = (t) => {
26
26
  if (!(u != null && u.startsWith("#")) && u !== l)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : ze(o, s);
30
- }, _e = (t, e = {
29
+ return e ? !1 : Be(o, s);
30
+ }, Ue = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
@@ -36,7 +36,7 @@ const $e = (t) => {
36
36
  (n) => n.startsWith(".") ? n : "." + n
37
37
  ) : [];
38
38
  return (n) => {
39
- Be(
39
+ _e(
40
40
  n,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
42
  o,
@@ -45,20 +45,20 @@ const $e = (t) => {
45
45
  };
46
46
  }, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Tt = (t, e) => {
47
47
  var i, s;
48
- const o = new URL(t, e ?? ((i = nt()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((s = o.searchParams) == null ? void 0 : s.entries()) ?? []);
48
+ const o = new URL(t, e ?? ((i = st()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((s = o.searchParams) == null ? void 0 : s.entries()) ?? []);
49
49
  let r = o.hash;
50
50
  return r.startsWith("#") && (r = r.substring(1)), {
51
51
  pathname: o.pathname,
52
52
  search: n,
53
53
  hash: r === "" ? void 0 : r
54
54
  };
55
- }, pt = (t) => {
55
+ }, et = (t) => {
56
56
  const o = new URLSearchParams(t.search).toString(), n = t.hash;
57
57
  return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
58
- }, Ue = (t) => {
58
+ }, je = (t) => {
59
59
  document.startViewTransition ? document.startViewTransition(t) : t();
60
- }, It = () => {
61
- const t = nt(), e = (t == null ? void 0 : t.location.hash) ?? "";
60
+ }, Yt = () => {
61
+ const t = st(), e = (t == null ? void 0 : t.location.hash) ?? "";
62
62
  return {
63
63
  pathname: (t == null ? void 0 : t.location.pathname) ?? "",
64
64
  search: Object.fromEntries(
@@ -66,32 +66,32 @@ const $e = (t) => {
66
66
  ),
67
67
  hash: e.startsWith("#") ? e.substring(1) || void 0 : e === "" ? void 0 : e
68
68
  };
69
- }, Yt = (t) => {
69
+ }, qt = (t) => {
70
70
  if ((t == null ? void 0 : t.scroll) !== "auto")
71
71
  return;
72
- const e = nt();
72
+ const e = st();
73
73
  e && e.requestAnimationFrame(
74
74
  () => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
75
75
  );
76
- }, qt = (t, e) => {
77
- e != null && e.viewTransition ? Ue(t) : t();
78
- }, je = () => {
79
- const t = M(It(), Ke), e = nt(), o = () => {
80
- t.set(It());
76
+ }, Xt = (t, e) => {
77
+ e != null && e.viewTransition ? je(t) : t();
78
+ }, Ie = () => {
79
+ const t = N(Yt(), Ke), e = st(), o = () => {
80
+ t.set(Yt());
81
81
  };
82
82
  e == null || e.addEventListener("popstate", o), e == null || e.addEventListener("hashchange", o);
83
83
  const n = (a, l, u) => {
84
- qt(() => {
84
+ Xt(() => {
85
85
  if (e) {
86
- const h = pt(a), p = (l == null ? void 0 : l.state) ?? {};
86
+ const h = et(a), p = (l == null ? void 0 : l.state) ?? {};
87
87
  u === "replaceState" || l != null && l.replace ? e.history.replaceState(p, "", h) : e.history.pushState(p, "", h);
88
88
  }
89
89
  t.set(a);
90
- }, l), Yt(l);
90
+ }, l), qt(l);
91
91
  }, r = (a, l) => {
92
- qt(() => {
92
+ Xt(() => {
93
93
  e == null || e.history.go(a);
94
- }, l), Yt(l);
94
+ }, l), qt(l);
95
95
  };
96
96
  return {
97
97
  location: t,
@@ -104,14 +104,14 @@ const $e = (t) => {
104
104
  e == null || e.removeEventListener("popstate", o), e == null || e.removeEventListener("hashchange", o), t.dispose();
105
105
  }
106
106
  };
107
- }, Ie = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ye = (t) => {
107
+ }, Ye = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), qe = (t) => {
108
108
  const e = t.container.currentURL, o = e.iso(
109
109
  (s) => Tt(s, e.value),
110
110
  (s) => {
111
- if (Ie(s.pathname))
112
- return pt(s);
111
+ if (Ye(s.pathname))
112
+ return et(s);
113
113
  const c = new URL(s.pathname, e.value), a = c.origin + c.pathname;
114
- return pt({ ...s, pathname: a });
114
+ return et({ ...s, pathname: a });
115
115
  }
116
116
  );
117
117
  return {
@@ -132,7 +132,7 @@ const $e = (t) => {
132
132
  },
133
133
  resolve: (s) => Tt(s, e.value)
134
134
  };
135
- }, rt = (t) => ({
135
+ }, it = (t) => ({
136
136
  pathname: t.pathname,
137
137
  search: { ...t.search },
138
138
  hash: t.hash ?? void 0
@@ -140,13 +140,34 @@ const $e = (t) => {
140
140
  if (t == null) return;
141
141
  const e = `${t}`;
142
142
  return e === "" ? void 0 : e;
143
- }, me = (t, e) => {
143
+ }, ge = (t, e) => {
144
144
  const o = { ...t };
145
145
  for (const [n, r] of Object.entries(e))
146
146
  r == null ? delete o[n] : o[n] = r;
147
147
  return o;
148
+ }, Xe = (t, e) => {
149
+ const o = (e == null ? void 0 : e.includeSearch) ?? !0, n = (e == null ? void 0 : e.includeHash) ?? !0, r = (e == null ? void 0 : e.ignoreSearchParams) ?? [];
150
+ let i;
151
+ if (!o)
152
+ i = {};
153
+ else if (r.length === 0)
154
+ i = { ...t.search };
155
+ else {
156
+ const s = new Set(r);
157
+ i = {};
158
+ for (const [c, a] of Object.entries(t.search))
159
+ s.has(c) || (i[c] = a);
160
+ }
161
+ return {
162
+ pathname: t.pathname,
163
+ search: i,
164
+ hash: n ? t.hash : void 0
165
+ };
166
+ }, Qt = (t, e, o) => {
167
+ const n = Xe(t, o);
168
+ return typeof e == "string" ? et(n) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(n))) : e(n);
148
169
  };
149
- class qe {
170
+ class Qe {
150
171
  constructor(e) {
151
172
  this.current = e;
152
173
  }
@@ -154,7 +175,7 @@ class qe {
154
175
  return this.current;
155
176
  }
156
177
  setLocation(e) {
157
- return this.current = rt(e), this;
178
+ return this.current = it(e), this;
158
179
  }
159
180
  setPathname(e) {
160
181
  return this.current = {
@@ -181,7 +202,7 @@ class qe {
181
202
  setSearch(e) {
182
203
  return this.current = {
183
204
  ...this.current,
184
- search: me(this.current.search, e)
205
+ search: ge(this.current.search, e)
185
206
  }, this;
186
207
  }
187
208
  setSearchParam(e, o) {
@@ -194,40 +215,45 @@ class qe {
194
215
  }, this;
195
216
  }
196
217
  }
197
- const Xe = (t, e) => t != null && t.replace ? "replaceState" : e, Qe = (t) => {
198
- const e = t.location, o = e.map(pt), n = e.map((m) => m.pathname), r = e.map((m) => ({ ...m.search })), i = e.map((m) => m.hash), s = (m, b, A) => {
199
- const E = rt({
200
- ...m,
201
- hash: kt(m.hash ?? void 0)
218
+ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
219
+ const e = t.location, o = e.map(et), n = e.map((g) => g.pathname), r = e.map((g) => ({ ...g.search })), i = e.map((g) => g.hash), s = (g, x) => Qt(t.location.value, g, x), c = (g, x) => Ht(
220
+ e,
221
+ g
222
+ )(
223
+ (O, E) => Qt(O, E, x)
224
+ ), a = (g, x, O) => {
225
+ const E = it({
226
+ ...g,
227
+ hash: kt(g.hash ?? void 0)
202
228
  });
203
- t.commit(E, b, A);
204
- }, c = (m, b) => {
205
- const A = Xe(b, "pushState");
206
- s(m, b, A);
207
- }, a = (m, b) => {
208
- const A = m(rt(t.location.value));
209
- c(A, b);
210
- }, l = (m, b) => {
211
- const A = t.resolve(m);
212
- c(A, b);
213
- }, u = (m, b) => {
214
- const A = { ...b, replace: !0 };
215
- l(m, A);
216
- }, h = (m, b) => {
217
- t.go(m, b);
218
- }, p = (m) => {
219
- t.back(m);
220
- }, f = (m) => {
221
- t.forward(m);
222
- }, d = (m, b) => a((A) => ({ ...A, pathname: m }), b), w = (m, b) => a((A) => {
223
- const E = { ...A }, V = kt(m);
224
- return V == null ? delete E.hash : E.hash = V, E;
225
- }, b), g = (m) => w(void 0, m), y = (m, b) => a(
226
- (A) => ({
227
- ...A,
228
- search: me(A.search, m)
229
+ t.commit(E, x, O);
230
+ }, l = (g, x) => {
231
+ const O = Je(x, "pushState");
232
+ a(g, x, O);
233
+ }, u = (g, x) => {
234
+ const O = g(it(t.location.value));
235
+ l(O, x);
236
+ }, h = (g, x) => {
237
+ const O = t.resolve(g);
238
+ l(O, x);
239
+ }, p = (g, x) => {
240
+ const O = { ...x, replace: !0 };
241
+ h(g, O);
242
+ }, f = (g, x) => {
243
+ t.go(g, x);
244
+ }, d = (g) => {
245
+ t.back(g);
246
+ }, w = (g) => {
247
+ t.forward(g);
248
+ }, m = (g, x) => u((O) => ({ ...O, pathname: g }), x), v = (g, x) => u((O) => {
249
+ const E = { ...O }, K = kt(g);
250
+ return K == null ? delete E.hash : E.hash = K, E;
251
+ }, x), b = (g) => v(void 0, g), y = (g, x) => u(
252
+ (O) => ({
253
+ ...O,
254
+ search: ge(O.search, g)
229
255
  }),
230
- b
256
+ x
231
257
  );
232
258
  return {
233
259
  handle: {
@@ -236,63 +262,65 @@ const Xe = (t, e) => t != null && t.replace ? "replaceState" : e, Qe = (t) => {
236
262
  pathname: n,
237
263
  search: r,
238
264
  hash: i,
239
- setLocation: c,
240
- updateLocation: a,
241
- navigate: l,
242
- replace: u,
243
- go: h,
244
- back: p,
245
- forward: f,
246
- setPathname: d,
247
- setHash: w,
248
- clearHash: g,
265
+ setLocation: l,
266
+ updateLocation: u,
267
+ navigate: h,
268
+ replace: p,
269
+ go: f,
270
+ back: d,
271
+ forward: w,
272
+ setPathname: m,
273
+ setHash: v,
274
+ clearHash: b,
249
275
  setSearch: y,
250
- setSearchParam: (m, b, A) => y({ [m]: b }, A),
251
- updateSearch: (m, b) => a(
252
- (A) => ({
253
- ...A,
254
- search: { ...m({ ...A.search }) }
276
+ setSearchParam: (g, x, O) => y({ [g]: x }, O),
277
+ updateSearch: (g, x) => u(
278
+ (O) => ({
279
+ ...O,
280
+ search: { ...g({ ...O.search }) }
255
281
  }),
256
- b
282
+ x
257
283
  ),
258
- queryParam: (m) => e.map((b) => b.search[m]),
259
- run: (m, b) => {
260
- const A = new qe(
261
- rt(t.location.value)
284
+ queryParam: (g) => e.map((x) => x.search[g]),
285
+ run: (g, x) => {
286
+ const O = new Qe(
287
+ it(t.location.value)
262
288
  );
263
- m(A), c(rt(A.location), b);
264
- }
289
+ g(O), l(it(O.location), x);
290
+ },
291
+ match: s,
292
+ matchSignal: c
265
293
  },
266
294
  dispose: () => {
267
295
  t.dispose(), o.dispose(), n.dispose(), r.dispose(), i.dispose();
268
296
  }
269
297
  };
270
- }, Je = (t) => {
298
+ }, Ze = (t) => {
271
299
  if (t.isBrowser())
272
- return je();
300
+ return Ie();
273
301
  if (t.isHeadless())
274
- return Ye(t);
302
+ return qe(t);
275
303
  throw new Error("Unknown context");
276
- }, $t = {
304
+ }, zt = {
277
305
  mark: Nt("Location"),
278
306
  create: (t, e) => {
279
- const o = Je(e), { handle: n, dispose: r } = Qe(o);
307
+ const o = Ze(e), { handle: n, dispose: r } = Ge(o);
280
308
  return {
281
309
  value: n,
282
310
  dispose: r
283
311
  };
284
312
  }
285
- }, Ge = (t, ...e) => {
286
- if (typeof t == "string" || ie.is(t))
287
- return Ge({ href: t }, ...e);
313
+ }, tn = (t, ...e) => {
314
+ if (typeof t == "string" || ae.is(t))
315
+ return tn({ href: t }, ...e);
288
316
  const { href: o, state: n, scroll: r, viewTransition: i, replace: s, ...c } = t;
289
- return ct($t, (a) => Pt.a(
290
- ce.click(
291
- _e(() => {
317
+ return at(zt, (a) => Et.a(
318
+ le.click(
319
+ Ue(() => {
292
320
  let l = !1;
293
321
  const u = {};
294
322
  return n !== void 0 && (u.state = n, l = !0), r !== void 0 && (u.scroll = r, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), s !== void 0 && (u.replace = s, l = !0), a.navigate(
295
- k.get(o),
323
+ C.get(o),
296
324
  l ? u : void 0
297
325
  ), !0;
298
326
  }, c)
@@ -301,48 +329,48 @@ const Xe = (t, e) => t != null && t.replace ? "replaceState" : e, Qe = (t) => {
301
329
  ...e
302
330
  /* c8 ignore next 2 */
303
331
  ));
304
- }, so = {
332
+ }, io = {
305
333
  mark: Nt("Appearance"),
306
334
  create: () => {
307
- const t = Ze();
335
+ const t = en();
308
336
  return {
309
337
  value: t,
310
338
  dispose: t.dispose
311
339
  };
312
340
  }
313
341
  };
314
- function Ze() {
315
- const t = nt(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = M(o ? "dark" : "light"), r = (i) => n.set(i.matches ? "dark" : "light");
342
+ function en() {
343
+ const t = st(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = N(o ? "dark" : "light"), r = (i) => n.set(i.matches ? "dark" : "light");
316
344
  return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
317
345
  }
318
- const ge = (t, e) => {
346
+ const pe = (t, e) => {
319
347
  if (typeof e == "function")
320
- return ge(t, { success: e });
348
+ return pe(t, { success: e });
321
349
  const o = e.failure ?? ((s) => s.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => St), i = e.notAsked ?? (() => St);
322
- return ae(k.toSignal(t), {
350
+ return ue(C.toSignal(t), {
323
351
  AsyncSuccess: (s) => n(s.$.value),
324
352
  AsyncFailure: (s) => o(s.$.error),
325
353
  Loading: (s) => r(s.map((c) => c.previousValue)),
326
354
  NotAsked: i
327
355
  });
328
- }, ro = (t = 10) => _((e) => N(de(() => e == null ? void 0 : e.focus(), t))), io = (t = 10) => _((e) => {
329
- const o = de(() => e.select(), t);
330
- return N(o);
356
+ }, co = (t = 10) => _((e) => H(me(() => e == null ? void 0 : e.focus(), t))), ao = (t = 10) => _((e) => {
357
+ const o = me(() => e.select(), t);
358
+ return H(o);
331
359
  });
332
- function co(t) {
360
+ function lo(t) {
333
361
  const e = Object.entries(t);
334
- return j(
362
+ return Y(
335
363
  ...e.map(
336
- ([o, n]) => Vt.class(k.map(n, (r) => r ? o : void 0))
364
+ ([o, n]) => Vt.class(C.map(n, (r) => r ? o : void 0))
337
365
  )
338
366
  );
339
367
  }
340
- const ao = _((t) => {
368
+ const uo = _((t) => {
341
369
  const e = t.style.getPropertyValue(":empty");
342
- return t.style.setProperty(":empty", "display:none"), N((o) => {
370
+ return t.style.setProperty(":empty", "display:none"), H((o) => {
343
371
  o && t.style.setProperty(":empty", e);
344
372
  });
345
- }), lo = (t) => le("head > title", Vt.innerText(t)), tn = {
373
+ }), fo = (t) => fe("head > title", Vt.innerText(t)), nn = {
346
374
  partial: {
347
375
  root: null,
348
376
  rootMargin: "0px",
@@ -353,59 +381,59 @@ const ao = _((t) => {
353
381
  rootMargin: "0px",
354
382
  threshold: 1
355
383
  }
356
- }, gt = {
384
+ }, pt = {
357
385
  partial: /* @__PURE__ */ new Map(),
358
386
  full: /* @__PURE__ */ new Map()
359
- }, it = {
387
+ }, ct = {
360
388
  partial: null,
361
389
  full: null
362
390
  };
363
- function en(t) {
364
- return it[t] == null && (it[t] = new IntersectionObserver((e) => {
391
+ function on(t) {
392
+ return ct[t] == null && (ct[t] = new IntersectionObserver((e) => {
365
393
  e.forEach((o) => {
366
- const n = gt[t].get(o.target);
394
+ const n = pt[t].get(o.target);
367
395
  n == null || n.set(o.isIntersecting);
368
396
  });
369
- }, tn[t])), it[t];
397
+ }, nn[t])), ct[t];
370
398
  }
371
- const nn = ({ mode: t = "partial", once: e = !1 }, o) => {
372
- const n = M(!1);
373
- return j(
399
+ const sn = ({ mode: t = "partial", once: e = !1 }, o) => {
400
+ const n = N(!1);
401
+ return Y(
374
402
  _((r) => {
375
- const i = typeof IntersectionObserver < "u" ? en(t) : null;
376
- gt[t].set(r, n), i == null || i.observe(r);
403
+ const i = typeof IntersectionObserver < "u" ? on(t) : null;
404
+ pt[t].set(r, n), i == null || i.observe(r);
377
405
  function s() {
378
406
  var a;
379
- i == null || i.unobserve(r), gt[t].delete(r), gt[t].size === 0 && ((a = it[t]) == null || a.disconnect(), it[t] = null);
407
+ i == null || i.unobserve(r), pt[t].delete(r), pt[t].size === 0 && ((a = ct[t]) == null || a.disconnect(), ct[t] = null);
380
408
  }
381
409
  let c = null;
382
410
  return e && (c = n.on((a) => {
383
411
  a && s();
384
- })), N(() => {
412
+ })), H(() => {
385
413
  n.dispose(), s(), c == null || c();
386
414
  });
387
415
  }),
388
- Ht(o(n))
416
+ $t(o(n))
389
417
  );
390
- }, uo = (t, e, o) => nn(t, (n) => ue(n, e, o ?? (() => St)));
391
- function on(t) {
418
+ }, ho = (t, e, o) => sn(t, (n) => he(n, e, o ?? (() => St)));
419
+ function rn(t) {
392
420
  return _((e) => {
393
421
  const o = (n) => {
394
422
  e.contains(n.target) || t(n);
395
423
  };
396
- return document.addEventListener("click", o), N(() => {
424
+ return document.addEventListener("click", o), H(() => {
397
425
  document.removeEventListener("click", o);
398
426
  });
399
427
  });
400
428
  }
401
- const G = (t, e) => t === void 0 || t === e, Xt = (t, e) => t === void 0 || t === e;
402
- function sn(t, e) {
403
- return typeof t == "string" ? e.key === t : Xt(t.key, e.key) && Xt(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
429
+ const Z = (t, e) => t === void 0 || t === e, Jt = (t, e) => t === void 0 || t === e;
430
+ function cn(t, e) {
431
+ return typeof t == "string" ? e.key === t : Jt(t.key, e.key) && Jt(t.code, e.code) && Z(t.ctrlKey, e.ctrlKey) && Z(t.altKey, e.altKey) && Z(t.shiftKey, e.shiftKey) && Z(t.metaKey, e.metaKey) && Z(t.repeat, e.repeat) && Z(
404
432
  t.commandOrControlKey,
405
433
  e.metaKey || e.ctrlKey
406
434
  );
407
435
  }
408
- function pe({
436
+ function we({
409
437
  allowedKeys: t,
410
438
  handler: e
411
439
  }) {
@@ -413,24 +441,24 @@ function pe({
413
441
  const n = (r) => {
414
442
  if (o.contains(r.target)) {
415
443
  for (const i of t)
416
- if (sn(i, r)) {
444
+ if (cn(i, r)) {
417
445
  e(r);
418
446
  break;
419
447
  }
420
448
  }
421
449
  };
422
- return document.addEventListener("keydown", n), N(() => {
450
+ return document.addEventListener("keydown", n), H(() => {
423
451
  document.removeEventListener("keydown", n);
424
452
  });
425
453
  });
426
454
  }
427
- function fo(t) {
428
- return pe({ allowedKeys: ["Enter"], handler: t });
455
+ function mo(t) {
456
+ return we({ allowedKeys: ["Enter"], handler: t });
429
457
  }
430
- function ho(t) {
431
- return pe({ allowedKeys: ["Escape"], handler: t });
458
+ function go(t) {
459
+ return we({ allowedKeys: ["Escape"], handler: t });
432
460
  }
433
- const rn = ({
461
+ const an = ({
434
462
  mutate: t,
435
463
  convertError: e,
436
464
  onSuccess: o,
@@ -438,7 +466,7 @@ const rn = ({
438
466
  onSettled: r
439
467
  }) => {
440
468
  let i;
441
- const s = M(L.notAsked), c = s.map(
469
+ const s = N(L.notAsked), c = s.map(
442
470
  (d) => L.isSuccess(d) ? d.value : void 0
443
471
  ), a = s.map(
444
472
  (d) => L.isFailure(d) ? d.error : void 0
@@ -452,13 +480,13 @@ const rn = ({
452
480
  pending: l,
453
481
  execute: async (d, w) => {
454
482
  u(), i = new AbortController();
455
- const g = i.signal, y = s.get(), x = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
456
- x != null ? s.set(L.loading(x)) : s.set(L.loading(L.getOrUndefined(y)));
483
+ const m = i.signal, v = s.get(), b = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
484
+ b != null ? s.set(L.loading(b)) : s.set(L.loading(L.getOrUndefined(v)));
457
485
  try {
458
- const v = await t({ request: d, abortSignal: g, previous: y });
459
- i = void 0, s.set(L.success(v)), o == null || o(v, d);
460
- } catch (v) {
461
- i = void 0, s.set(L.failure(e(v))), n == null || n(e(v), d);
486
+ const y = await t({ request: d, abortSignal: m, previous: v });
487
+ i = void 0, s.set(L.success(y)), o == null || o(y, d);
488
+ } catch (y) {
489
+ i = void 0, s.set(L.failure(e(y))), n == null || n(e(y), d);
462
490
  }
463
491
  r == null || r(s.get(), d);
464
492
  },
@@ -469,10 +497,10 @@ const rn = ({
469
497
  i == null || i.abort(), i = void 0, s.dispose();
470
498
  }
471
499
  };
472
- }, cn = (t, e) => {
473
- const { status: o, dispose: n, execute: r, cancel: i, pending: s, error: c, value: a } = t, { content: l } = e, u = We(a);
474
- return j(
475
- N(n),
500
+ }, ln = (t, e) => {
501
+ const { status: o, dispose: n, execute: r, cancel: i, pending: s, error: c, value: a } = t, { content: l } = e, u = Fe(a);
502
+ return Y(
503
+ H(n),
476
504
  l({
477
505
  previous: u,
478
506
  execute: r,
@@ -483,7 +511,7 @@ const rn = ({
483
511
  status: o
484
512
  })
485
513
  );
486
- }, mo = ({
514
+ }, po = ({
487
515
  mutate: t,
488
516
  convertError: e = (s) => s,
489
517
  onSuccess: o,
@@ -491,64 +519,64 @@ const rn = ({
491
519
  onSettled: r,
492
520
  content: i
493
521
  }) => {
494
- const s = rn({
522
+ const s = an({
495
523
  mutate: t,
496
524
  convertError: e,
497
525
  onSuccess: o,
498
526
  onError: n,
499
527
  onSettled: r
500
528
  });
501
- return cn(s, { content: i });
502
- }, tt = Math.min, X = Math.max, wt = Math.round, mt = Math.floor, H = (t) => ({
529
+ return ln(s, { content: i });
530
+ }, nt = Math.min, Q = Math.max, wt = Math.round, gt = Math.floor, V = (t) => ({
503
531
  x: t,
504
532
  y: t
505
- }), an = {
533
+ }), un = {
506
534
  left: "right",
507
535
  right: "left",
508
536
  bottom: "top",
509
537
  top: "bottom"
510
- }, ln = {
538
+ }, fn = {
511
539
  start: "end",
512
540
  end: "start"
513
541
  };
514
542
  function Ct(t, e, o) {
515
- return X(t, tt(e, o));
543
+ return Q(t, nt(e, o));
516
544
  }
517
- function ut(t, e) {
545
+ function ft(t, e) {
518
546
  return typeof t == "function" ? t(e) : t;
519
547
  }
520
- function Q(t) {
548
+ function J(t) {
521
549
  return t.split("-")[0];
522
550
  }
523
- function ft(t) {
551
+ function ht(t) {
524
552
  return t.split("-")[1];
525
553
  }
526
- function we(t) {
554
+ function ye(t) {
527
555
  return t === "x" ? "y" : "x";
528
556
  }
529
- function zt(t) {
557
+ function Bt(t) {
530
558
  return t === "y" ? "height" : "width";
531
559
  }
532
- function U(t) {
533
- return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
560
+ function I(t) {
561
+ return ["top", "bottom"].includes(J(t)) ? "y" : "x";
534
562
  }
535
- function Bt(t) {
536
- return we(U(t));
563
+ function _t(t) {
564
+ return ye(I(t));
537
565
  }
538
- function un(t, e, o) {
566
+ function hn(t, e, o) {
539
567
  o === void 0 && (o = !1);
540
- const n = ft(t), r = Bt(t), i = zt(r);
568
+ const n = ht(t), r = _t(t), i = Bt(r);
541
569
  let s = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
542
570
  return e.reference[i] > e.floating[i] && (s = yt(s)), [s, yt(s)];
543
571
  }
544
- function fn(t) {
572
+ function dn(t) {
545
573
  const e = yt(t);
546
574
  return [Dt(t), e, Dt(e)];
547
575
  }
548
576
  function Dt(t) {
549
- return t.replace(/start|end/g, (e) => ln[e]);
577
+ return t.replace(/start|end/g, (e) => fn[e]);
550
578
  }
551
- function hn(t, e, o) {
579
+ function mn(t, e, o) {
552
580
  const n = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
553
581
  switch (t) {
554
582
  case "top":
@@ -561,15 +589,15 @@ function hn(t, e, o) {
561
589
  return [];
562
590
  }
563
591
  }
564
- function dn(t, e, o, n) {
565
- const r = ft(t);
566
- let i = hn(Q(t), o === "start", n);
592
+ function gn(t, e, o, n) {
593
+ const r = ht(t);
594
+ let i = mn(J(t), o === "start", n);
567
595
  return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
568
596
  }
569
597
  function yt(t) {
570
- return t.replace(/left|right|bottom|top/g, (e) => an[e]);
598
+ return t.replace(/left|right|bottom|top/g, (e) => un[e]);
571
599
  }
572
- function mn(t) {
600
+ function pn(t) {
573
601
  return {
574
602
  top: 0,
575
603
  right: 0,
@@ -578,8 +606,8 @@ function mn(t) {
578
606
  ...t
579
607
  };
580
608
  }
581
- function ye(t) {
582
- return typeof t != "number" ? mn(t) : {
609
+ function ve(t) {
610
+ return typeof t != "number" ? pn(t) : {
583
611
  top: t,
584
612
  right: t,
585
613
  bottom: t,
@@ -604,12 +632,12 @@ function vt(t) {
604
632
  y: o
605
633
  };
606
634
  }
607
- function Qt(t, e, o) {
635
+ function Gt(t, e, o) {
608
636
  let {
609
637
  reference: n,
610
638
  floating: r
611
639
  } = t;
612
- const i = U(e), s = Bt(e), c = zt(s), a = Q(e), l = i === "y", u = n.x + n.width / 2 - r.width / 2, h = n.y + n.height / 2 - r.height / 2, p = n[c] / 2 - r[c] / 2;
640
+ const i = I(e), s = _t(e), c = Bt(s), a = J(e), l = i === "y", u = n.x + n.width / 2 - r.width / 2, h = n.y + n.height / 2 - r.height / 2, p = n[c] / 2 - r[c] / 2;
613
641
  let f;
614
642
  switch (a) {
615
643
  case "top":
@@ -642,7 +670,7 @@ function Qt(t, e, o) {
642
670
  y: n.y
643
671
  };
644
672
  }
645
- switch (ft(e)) {
673
+ switch (ht(e)) {
646
674
  case "start":
647
675
  f[s] -= p * (o && l ? -1 : 1);
648
676
  break;
@@ -652,7 +680,7 @@ function Qt(t, e, o) {
652
680
  }
653
681
  return f;
654
682
  }
655
- const gn = async (t, e, o) => {
683
+ const wn = async (t, e, o) => {
656
684
  const {
657
685
  placement: n = "bottom",
658
686
  strategy: r = "absolute",
@@ -666,17 +694,17 @@ const gn = async (t, e, o) => {
666
694
  }), {
667
695
  x: u,
668
696
  y: h
669
- } = Qt(l, n, a), p = n, f = {}, d = 0;
697
+ } = Gt(l, n, a), p = n, f = {}, d = 0;
670
698
  for (let w = 0; w < c.length; w++) {
671
699
  const {
672
- name: g,
673
- fn: y
700
+ name: m,
701
+ fn: v
674
702
  } = c[w], {
675
- x,
676
- y: v,
703
+ x: b,
704
+ y,
677
705
  data: R,
678
- reset: O
679
- } = await y({
706
+ reset: A
707
+ } = await v({
680
708
  x: u,
681
709
  y: h,
682
710
  initialPlacement: n,
@@ -690,20 +718,20 @@ const gn = async (t, e, o) => {
690
718
  floating: e
691
719
  }
692
720
  });
693
- u = x ?? u, h = v ?? h, f = {
721
+ u = b ?? u, h = y ?? h, f = {
694
722
  ...f,
695
- [g]: {
696
- ...f[g],
723
+ [m]: {
724
+ ...f[m],
697
725
  ...R
698
726
  }
699
- }, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (p = O.placement), O.rects && (l = O.rects === !0 ? await s.getElementRects({
727
+ }, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
700
728
  reference: t,
701
729
  floating: e,
702
730
  strategy: r
703
- }) : O.rects), {
731
+ }) : A.rects), {
704
732
  x: u,
705
733
  y: h
706
- } = Qt(l, p, a)), w = -1);
734
+ } = Gt(l, p, a)), w = -1);
707
735
  }
708
736
  return {
709
737
  x: u,
@@ -713,7 +741,7 @@ const gn = async (t, e, o) => {
713
741
  middlewareData: f
714
742
  };
715
743
  };
716
- async function ve(t, e) {
744
+ async function xe(t, e) {
717
745
  var o;
718
746
  e === void 0 && (e = {});
719
747
  const {
@@ -729,36 +757,36 @@ async function ve(t, e) {
729
757
  elementContext: h = "floating",
730
758
  altBoundary: p = !1,
731
759
  padding: f = 0
732
- } = ut(e, t), d = ye(f), g = c[p ? h === "floating" ? "reference" : "floating" : h], y = vt(await i.getClippingRect({
733
- element: (o = await (i.isElement == null ? void 0 : i.isElement(g))) == null || o ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
760
+ } = ft(e, t), d = ve(f), m = c[p ? h === "floating" ? "reference" : "floating" : h], v = vt(await i.getClippingRect({
761
+ element: (o = await (i.isElement == null ? void 0 : i.isElement(m))) == null || o ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
734
762
  boundary: l,
735
763
  rootBoundary: u,
736
764
  strategy: a
737
- })), x = h === "floating" ? {
765
+ })), b = h === "floating" ? {
738
766
  x: n,
739
767
  y: r,
740
768
  width: s.floating.width,
741
769
  height: s.floating.height
742
- } : s.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), R = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
770
+ } : s.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), R = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
743
771
  x: 1,
744
772
  y: 1
745
773
  } : {
746
774
  x: 1,
747
775
  y: 1
748
- }, O = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
776
+ }, A = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
749
777
  elements: c,
750
- rect: x,
751
- offsetParent: v,
778
+ rect: b,
779
+ offsetParent: y,
752
780
  strategy: a
753
- }) : x);
781
+ }) : b);
754
782
  return {
755
- top: (y.top - O.top + d.top) / R.y,
756
- bottom: (O.bottom - y.bottom + d.bottom) / R.y,
757
- left: (y.left - O.left + d.left) / R.x,
758
- right: (O.right - y.right + d.right) / R.x
783
+ top: (v.top - A.top + d.top) / R.y,
784
+ bottom: (A.bottom - v.bottom + d.bottom) / R.y,
785
+ left: (v.left - A.left + d.left) / R.x,
786
+ right: (A.right - v.right + d.right) / R.x
759
787
  };
760
788
  }
761
- const pn = (t) => ({
789
+ const yn = (t) => ({
762
790
  name: "arrow",
763
791
  options: t,
764
792
  async fn(e) {
@@ -773,29 +801,29 @@ const pn = (t) => ({
773
801
  } = e, {
774
802
  element: l,
775
803
  padding: u = 0
776
- } = ut(t, e) || {};
804
+ } = ft(t, e) || {};
777
805
  if (l == null)
778
806
  return {};
779
- const h = ye(u), p = {
807
+ const h = ve(u), p = {
780
808
  x: o,
781
809
  y: n
782
- }, f = Bt(r), d = zt(f), w = await s.getDimensions(l), g = f === "y", y = g ? "top" : "left", x = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", R = i.reference[d] + i.reference[f] - p[f] - i.floating[d], O = p[f] - i.reference[f], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
783
- let m = T ? T[v] : 0;
784
- (!m || !await (s.isElement == null ? void 0 : s.isElement(T))) && (m = c.floating[v] || i.floating[d]);
785
- const b = R / 2 - O / 2, A = m / 2 - w[d] / 2 - 1, E = tt(h[y], A), V = tt(h[x], A), Y = E, st = m - w[d] - V, P = m / 2 - w[d] / 2 + b, q = Ct(Y, P, st), B = !a.arrow && ft(r) != null && P !== q && i.reference[d] / 2 - (P < Y ? E : V) - w[d] / 2 < 0, C = B ? P < Y ? P - Y : P - st : 0;
810
+ }, f = _t(r), d = Bt(f), w = await s.getDimensions(l), m = f === "y", v = m ? "top" : "left", b = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", R = i.reference[d] + i.reference[f] - p[f] - i.floating[d], A = p[f] - i.reference[f], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
811
+ let P = k ? k[y] : 0;
812
+ (!P || !await (s.isElement == null ? void 0 : s.isElement(k))) && (P = c.floating[y] || i.floating[d]);
813
+ const U = R / 2 - A / 2, g = P / 2 - w[d] / 2 - 1, x = nt(h[v], g), O = nt(h[b], g), E = x, K = P - w[d] - O, S = P / 2 - w[d] / 2 + U, X = Ct(E, S, K), B = !a.arrow && ht(r) != null && S !== X && i.reference[d] / 2 - (S < E ? x : O) - w[d] / 2 < 0, D = B ? S < E ? S - E : S - K : 0;
786
814
  return {
787
- [f]: p[f] + C,
815
+ [f]: p[f] + D,
788
816
  data: {
789
- [f]: q,
790
- centerOffset: P - q - C,
817
+ [f]: X,
818
+ centerOffset: S - X - D,
791
819
  ...B && {
792
- alignmentOffset: C
820
+ alignmentOffset: D
793
821
  }
794
822
  },
795
823
  reset: B
796
824
  };
797
825
  }
798
- }), wn = function(t) {
826
+ }), vn = function(t) {
799
827
  return t === void 0 && (t = {}), {
800
828
  name: "flip",
801
829
  options: t,
@@ -815,51 +843,51 @@ const pn = (t) => ({
815
843
  fallbackStrategy: f = "bestFit",
816
844
  fallbackAxisSideDirection: d = "none",
817
845
  flipAlignment: w = !0,
818
- ...g
819
- } = ut(t, e);
846
+ ...m
847
+ } = ft(t, e);
820
848
  if ((o = i.arrow) != null && o.alignmentOffset)
821
849
  return {};
822
- const y = Q(r), x = U(c), v = Q(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), O = p || (v || !w ? [yt(c)] : fn(c)), T = d !== "none";
823
- !p && T && O.push(...dn(c, w, d, R));
824
- const m = [c, ...O], b = await ve(e, g), A = [];
825
- let E = ((n = i.flip) == null ? void 0 : n.overflows) || [];
826
- if (u && A.push(b[y]), h) {
827
- const P = un(r, s, R);
828
- A.push(b[P[0]], b[P[1]]);
850
+ const v = J(r), b = I(c), y = J(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), A = p || (y || !w ? [yt(c)] : dn(c)), k = d !== "none";
851
+ !p && k && A.push(...gn(c, w, d, R));
852
+ const P = [c, ...A], U = await xe(e, m), g = [];
853
+ let x = ((n = i.flip) == null ? void 0 : n.overflows) || [];
854
+ if (u && g.push(U[v]), h) {
855
+ const S = hn(r, s, R);
856
+ g.push(U[S[0]], U[S[1]]);
829
857
  }
830
- if (E = [...E, {
858
+ if (x = [...x, {
831
859
  placement: r,
832
- overflows: A
833
- }], !A.every((P) => P <= 0)) {
834
- var V, Y;
835
- const P = (((V = i.flip) == null ? void 0 : V.index) || 0) + 1, q = m[P];
836
- if (q && (!(h === "alignment" ? x !== U(q) : !1) || // We leave the current main axis only if every placement on that axis
860
+ overflows: g
861
+ }], !g.every((S) => S <= 0)) {
862
+ var O, E;
863
+ const S = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, X = P[S];
864
+ if (X && (!(h === "alignment" ? b !== I(X) : !1) || // We leave the current main axis only if every placement on that axis
837
865
  // overflows the main axis.
838
- E.every((D) => D.overflows[0] > 0 && U(D.placement) === x)))
866
+ x.every((W) => W.overflows[0] > 0 && I(W.placement) === b)))
839
867
  return {
840
868
  data: {
841
- index: P,
842
- overflows: E
869
+ index: S,
870
+ overflows: x
843
871
  },
844
872
  reset: {
845
- placement: q
873
+ placement: X
846
874
  }
847
875
  };
848
- let B = (Y = E.filter((C) => C.overflows[0] <= 0).sort((C, D) => C.overflows[1] - D.overflows[1])[0]) == null ? void 0 : Y.placement;
876
+ let B = (E = x.filter((D) => D.overflows[0] <= 0).sort((D, W) => D.overflows[1] - W.overflows[1])[0]) == null ? void 0 : E.placement;
849
877
  if (!B)
850
878
  switch (f) {
851
879
  case "bestFit": {
852
- var st;
853
- const C = (st = E.filter((D) => {
854
- if (T) {
855
- const K = U(D.placement);
856
- return K === x || // Create a bias to the `y` side axis due to horizontal
880
+ var K;
881
+ const D = (K = x.filter((W) => {
882
+ if (k) {
883
+ const j = I(W.placement);
884
+ return j === b || // Create a bias to the `y` side axis due to horizontal
857
885
  // reading directions favoring greater width.
858
- K === "y";
886
+ j === "y";
859
887
  }
860
888
  return !0;
861
- }).map((D) => [D.placement, D.overflows.filter((K) => K > 0).reduce((K, ke) => K + ke, 0)]).sort((D, K) => D[1] - K[1])[0]) == null ? void 0 : st[0];
862
- C && (B = C);
889
+ }).map((W) => [W.placement, W.overflows.filter((j) => j > 0).reduce((j, Ce) => j + Ce, 0)]).sort((W, j) => W[1] - j[1])[0]) == null ? void 0 : K[0];
890
+ D && (B = D);
863
891
  break;
864
892
  }
865
893
  case "initialPlacement":
@@ -877,12 +905,12 @@ const pn = (t) => ({
877
905
  }
878
906
  };
879
907
  };
880
- async function yn(t, e) {
908
+ async function xn(t, e) {
881
909
  const {
882
910
  placement: o,
883
911
  platform: n,
884
912
  elements: r
885
- } = t, i = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), s = Q(o), c = ft(o), a = U(o) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = i && a ? -1 : 1, h = ut(e, t);
913
+ } = t, i = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), s = J(o), c = ht(o), a = I(o) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = i && a ? -1 : 1, h = ft(e, t);
886
914
  let {
887
915
  mainAxis: p,
888
916
  crossAxis: f,
@@ -904,7 +932,7 @@ async function yn(t, e) {
904
932
  y: f * u
905
933
  };
906
934
  }
907
- const vn = function(t) {
935
+ const bn = function(t) {
908
936
  return t === void 0 && (t = 0), {
909
937
  name: "offset",
910
938
  options: t,
@@ -915,7 +943,7 @@ const vn = function(t) {
915
943
  y: i,
916
944
  placement: s,
917
945
  middlewareData: c
918
- } = e, a = await yn(e, t);
946
+ } = e, a = await xn(e, t);
919
947
  return s === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
920
948
  x: r + a.x,
921
949
  y: i + a.y,
@@ -926,7 +954,7 @@ const vn = function(t) {
926
954
  };
927
955
  }
928
956
  };
929
- }, xn = function(t) {
957
+ }, On = function(t) {
930
958
  return t === void 0 && (t = {}), {
931
959
  name: "shift",
932
960
  options: t,
@@ -939,30 +967,30 @@ const vn = function(t) {
939
967
  mainAxis: i = !0,
940
968
  crossAxis: s = !1,
941
969
  limiter: c = {
942
- fn: (g) => {
970
+ fn: (m) => {
943
971
  let {
944
- x: y,
945
- y: x
946
- } = g;
972
+ x: v,
973
+ y: b
974
+ } = m;
947
975
  return {
948
- x: y,
949
- y: x
976
+ x: v,
977
+ y: b
950
978
  };
951
979
  }
952
980
  },
953
981
  ...a
954
- } = ut(t, e), l = {
982
+ } = ft(t, e), l = {
955
983
  x: o,
956
984
  y: n
957
- }, u = await ve(e, a), h = U(Q(r)), p = we(h);
985
+ }, u = await xe(e, a), h = I(J(r)), p = ye(h);
958
986
  let f = l[p], d = l[h];
959
987
  if (i) {
960
- const g = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", x = f + u[g], v = f - u[y];
961
- f = Ct(x, f, v);
988
+ const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", b = f + u[m], y = f - u[v];
989
+ f = Ct(b, f, y);
962
990
  }
963
991
  if (s) {
964
- const g = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", x = d + u[g], v = d - u[y];
965
- d = Ct(x, d, v);
992
+ const m = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = d + u[m], y = d - u[v];
993
+ d = Ct(b, d, y);
966
994
  }
967
995
  const w = c.fn({
968
996
  ...e,
@@ -986,42 +1014,42 @@ const vn = function(t) {
986
1014
  function bt() {
987
1015
  return typeof window < "u";
988
1016
  }
989
- function ot(t) {
990
- return xe(t) ? (t.nodeName || "").toLowerCase() : "#document";
1017
+ function rt(t) {
1018
+ return be(t) ? (t.nodeName || "").toLowerCase() : "#document";
991
1019
  }
992
- function S(t) {
1020
+ function T(t) {
993
1021
  var e;
994
1022
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
995
1023
  }
996
1024
  function z(t) {
997
1025
  var e;
998
- return (e = (xe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1026
+ return (e = (be(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
999
1027
  }
1000
- function xe(t) {
1001
- return bt() ? t instanceof Node || t instanceof S(t).Node : !1;
1028
+ function be(t) {
1029
+ return bt() ? t instanceof Node || t instanceof T(t).Node : !1;
1002
1030
  }
1003
- function W(t) {
1004
- return bt() ? t instanceof Element || t instanceof S(t).Element : !1;
1031
+ function F(t) {
1032
+ return bt() ? t instanceof Element || t instanceof T(t).Element : !1;
1005
1033
  }
1006
1034
  function $(t) {
1007
- return bt() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
1035
+ return bt() ? t instanceof HTMLElement || t instanceof T(t).HTMLElement : !1;
1008
1036
  }
1009
- function Jt(t) {
1010
- return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
1037
+ function Zt(t) {
1038
+ return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof T(t).ShadowRoot;
1011
1039
  }
1012
- function ht(t) {
1040
+ function dt(t) {
1013
1041
  const {
1014
1042
  overflow: e,
1015
1043
  overflowX: o,
1016
1044
  overflowY: n,
1017
1045
  display: r
1018
- } = F(t);
1046
+ } = M(t);
1019
1047
  return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
1020
1048
  }
1021
- function bn(t) {
1022
- return ["table", "td", "th"].includes(ot(t));
1049
+ function An(t) {
1050
+ return ["table", "td", "th"].includes(rt(t));
1023
1051
  }
1024
- function At(t) {
1052
+ function Ot(t) {
1025
1053
  return [":popover-open", ":modal"].some((e) => {
1026
1054
  try {
1027
1055
  return t.matches(e);
@@ -1030,32 +1058,32 @@ function At(t) {
1030
1058
  }
1031
1059
  });
1032
1060
  }
1033
- function _t(t) {
1034
- const e = Kt(), o = W(t) ? F(t) : t;
1061
+ function Ut(t) {
1062
+ const e = Kt(), o = F(t) ? M(t) : t;
1035
1063
  return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
1036
1064
  }
1037
- function An(t) {
1038
- let e = I(t);
1039
- for (; $(e) && !et(e); ) {
1040
- if (_t(e))
1065
+ function Rn(t) {
1066
+ let e = q(t);
1067
+ for (; $(e) && !ot(e); ) {
1068
+ if (Ut(e))
1041
1069
  return e;
1042
- if (At(e))
1070
+ if (Ot(e))
1043
1071
  return null;
1044
- e = I(e);
1072
+ e = q(e);
1045
1073
  }
1046
1074
  return null;
1047
1075
  }
1048
1076
  function Kt() {
1049
1077
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1050
1078
  }
1051
- function et(t) {
1052
- return ["html", "body", "#document"].includes(ot(t));
1079
+ function ot(t) {
1080
+ return ["html", "body", "#document"].includes(rt(t));
1053
1081
  }
1054
- function F(t) {
1055
- return S(t).getComputedStyle(t);
1082
+ function M(t) {
1083
+ return T(t).getComputedStyle(t);
1056
1084
  }
1057
- function Ot(t) {
1058
- return W(t) ? {
1085
+ function At(t) {
1086
+ return F(t) ? {
1059
1087
  scrollLeft: t.scrollLeft,
1060
1088
  scrollTop: t.scrollTop
1061
1089
  } : {
@@ -1063,37 +1091,37 @@ function Ot(t) {
1063
1091
  scrollTop: t.scrollY
1064
1092
  };
1065
1093
  }
1066
- function I(t) {
1067
- if (ot(t) === "html")
1094
+ function q(t) {
1095
+ if (rt(t) === "html")
1068
1096
  return t;
1069
1097
  const e = (
1070
1098
  // Step into the shadow DOM of the parent of a slotted node.
1071
1099
  t.assignedSlot || // DOM Element detected.
1072
1100
  t.parentNode || // ShadowRoot detected.
1073
- Jt(t) && t.host || // Fallback.
1101
+ Zt(t) && t.host || // Fallback.
1074
1102
  z(t)
1075
1103
  );
1076
- return Jt(e) ? e.host : e;
1104
+ return Zt(e) ? e.host : e;
1077
1105
  }
1078
- function be(t) {
1079
- const e = I(t);
1080
- return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && ht(e) ? e : be(e);
1106
+ function Oe(t) {
1107
+ const e = q(t);
1108
+ return ot(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
1081
1109
  }
1082
- function at(t, e, o) {
1110
+ function lt(t, e, o) {
1083
1111
  var n;
1084
1112
  e === void 0 && (e = []), o === void 0 && (o = !0);
1085
- const r = be(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), s = S(r);
1113
+ const r = Oe(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), s = T(r);
1086
1114
  if (i) {
1087
1115
  const c = Wt(s);
1088
- return e.concat(s, s.visualViewport || [], ht(r) ? r : [], c && o ? at(c) : []);
1116
+ return e.concat(s, s.visualViewport || [], dt(r) ? r : [], c && o ? lt(c) : []);
1089
1117
  }
1090
- return e.concat(r, at(r, [], o));
1118
+ return e.concat(r, lt(r, [], o));
1091
1119
  }
1092
1120
  function Wt(t) {
1093
1121
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1094
1122
  }
1095
1123
  function Ae(t) {
1096
- const e = F(t);
1124
+ const e = M(t);
1097
1125
  let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
1098
1126
  const r = $(t), i = r ? t.offsetWidth : o, s = r ? t.offsetHeight : n, c = wt(o) !== i || wt(n) !== s;
1099
1127
  return c && (o = i, n = s), {
@@ -1102,13 +1130,13 @@ function Ae(t) {
1102
1130
  $: c
1103
1131
  };
1104
1132
  }
1105
- function Ut(t) {
1106
- return W(t) ? t : t.contextElement;
1133
+ function jt(t) {
1134
+ return F(t) ? t : t.contextElement;
1107
1135
  }
1108
- function Z(t) {
1109
- const e = Ut(t);
1136
+ function tt(t) {
1137
+ const e = jt(t);
1110
1138
  if (!$(e))
1111
- return H(1);
1139
+ return V(1);
1112
1140
  const o = e.getBoundingClientRect(), {
1113
1141
  width: n,
1114
1142
  height: r,
@@ -1120,30 +1148,30 @@ function Z(t) {
1120
1148
  y: c
1121
1149
  };
1122
1150
  }
1123
- const On = /* @__PURE__ */ H(0);
1124
- function Oe(t) {
1125
- const e = S(t);
1126
- return !Kt() || !e.visualViewport ? On : {
1151
+ const Ln = /* @__PURE__ */ V(0);
1152
+ function Re(t) {
1153
+ const e = T(t);
1154
+ return !Kt() || !e.visualViewport ? Ln : {
1127
1155
  x: e.visualViewport.offsetLeft,
1128
1156
  y: e.visualViewport.offsetTop
1129
1157
  };
1130
1158
  }
1131
- function Rn(t, e, o) {
1132
- return e === void 0 && (e = !1), !o || e && o !== S(t) ? !1 : e;
1159
+ function Pn(t, e, o) {
1160
+ return e === void 0 && (e = !1), !o || e && o !== T(t) ? !1 : e;
1133
1161
  }
1134
- function J(t, e, o, n) {
1162
+ function G(t, e, o, n) {
1135
1163
  e === void 0 && (e = !1), o === void 0 && (o = !1);
1136
- const r = t.getBoundingClientRect(), i = Ut(t);
1137
- let s = H(1);
1138
- e && (n ? W(n) && (s = Z(n)) : s = Z(t));
1139
- const c = Rn(i, o, n) ? Oe(i) : H(0);
1164
+ const r = t.getBoundingClientRect(), i = jt(t);
1165
+ let s = V(1);
1166
+ e && (n ? F(n) && (s = tt(n)) : s = tt(t));
1167
+ const c = Pn(i, o, n) ? Re(i) : V(0);
1140
1168
  let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, u = r.width / s.x, h = r.height / s.y;
1141
1169
  if (i) {
1142
- const p = S(i), f = n && W(n) ? S(n) : n;
1170
+ const p = T(i), f = n && F(n) ? T(n) : n;
1143
1171
  let d = p, w = Wt(d);
1144
1172
  for (; w && n && f !== d; ) {
1145
- const g = Z(w), y = w.getBoundingClientRect(), x = F(w), v = y.left + (w.clientLeft + parseFloat(x.paddingLeft)) * g.x, R = y.top + (w.clientTop + parseFloat(x.paddingTop)) * g.y;
1146
- a *= g.x, l *= g.y, u *= g.x, h *= g.y, a += v, l += R, d = S(w), w = Wt(d);
1173
+ const m = tt(w), v = w.getBoundingClientRect(), b = M(w), y = v.left + (w.clientLeft + parseFloat(b.paddingLeft)) * m.x, R = v.top + (w.clientTop + parseFloat(b.paddingTop)) * m.y;
1174
+ a *= m.x, l *= m.y, u *= m.x, h *= m.y, a += y, l += R, d = T(w), w = Wt(d);
1147
1175
  }
1148
1176
  }
1149
1177
  return vt({
@@ -1153,41 +1181,41 @@ function J(t, e, o, n) {
1153
1181
  y: l
1154
1182
  });
1155
1183
  }
1156
- function jt(t, e) {
1157
- const o = Ot(t).scrollLeft;
1158
- return e ? e.left + o : J(z(t)).left + o;
1184
+ function It(t, e) {
1185
+ const o = At(t).scrollLeft;
1186
+ return e ? e.left + o : G(z(t)).left + o;
1159
1187
  }
1160
- function Re(t, e, o) {
1188
+ function Le(t, e, o) {
1161
1189
  o === void 0 && (o = !1);
1162
1190
  const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
1163
1191
  // RTL <body> scrollbar.
1164
- jt(t, n)
1192
+ It(t, n)
1165
1193
  )), i = n.top + e.scrollTop;
1166
1194
  return {
1167
1195
  x: r,
1168
1196
  y: i
1169
1197
  };
1170
1198
  }
1171
- function Ln(t) {
1199
+ function En(t) {
1172
1200
  let {
1173
1201
  elements: e,
1174
1202
  rect: o,
1175
1203
  offsetParent: n,
1176
1204
  strategy: r
1177
1205
  } = t;
1178
- const i = r === "fixed", s = z(n), c = e ? At(e.floating) : !1;
1206
+ const i = r === "fixed", s = z(n), c = e ? Ot(e.floating) : !1;
1179
1207
  if (n === s || c && i)
1180
1208
  return o;
1181
1209
  let a = {
1182
1210
  scrollLeft: 0,
1183
1211
  scrollTop: 0
1184
- }, l = H(1);
1185
- const u = H(0), h = $(n);
1186
- if ((h || !h && !i) && ((ot(n) !== "body" || ht(s)) && (a = Ot(n)), $(n))) {
1187
- const f = J(n);
1188
- l = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
1212
+ }, l = V(1);
1213
+ const u = V(0), h = $(n);
1214
+ if ((h || !h && !i) && ((rt(n) !== "body" || dt(s)) && (a = At(n)), $(n))) {
1215
+ const f = G(n);
1216
+ l = tt(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
1189
1217
  }
1190
- const p = s && !h && !i ? Re(s, a, !0) : H(0);
1218
+ const p = s && !h && !i ? Le(s, a, !0) : V(0);
1191
1219
  return {
1192
1220
  width: o.width * l.x,
1193
1221
  height: o.height * l.y,
@@ -1195,22 +1223,22 @@ function Ln(t) {
1195
1223
  y: o.y * l.y - a.scrollTop * l.y + u.y + p.y
1196
1224
  };
1197
1225
  }
1198
- function En(t) {
1226
+ function Sn(t) {
1199
1227
  return Array.from(t.getClientRects());
1200
1228
  }
1201
- function Pn(t) {
1202
- const e = z(t), o = Ot(t), n = t.ownerDocument.body, r = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
1203
- let s = -o.scrollLeft + jt(t);
1229
+ function Tn(t) {
1230
+ const e = z(t), o = At(t), n = t.ownerDocument.body, r = Q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
1231
+ let s = -o.scrollLeft + It(t);
1204
1232
  const c = -o.scrollTop;
1205
- return F(n).direction === "rtl" && (s += X(e.clientWidth, n.clientWidth) - r), {
1233
+ return M(n).direction === "rtl" && (s += Q(e.clientWidth, n.clientWidth) - r), {
1206
1234
  width: r,
1207
1235
  height: i,
1208
1236
  x: s,
1209
1237
  y: c
1210
1238
  };
1211
1239
  }
1212
- function Sn(t, e) {
1213
- const o = S(t), n = z(t), r = o.visualViewport;
1240
+ function kn(t, e) {
1241
+ const o = T(t), n = z(t), r = o.visualViewport;
1214
1242
  let i = n.clientWidth, s = n.clientHeight, c = 0, a = 0;
1215
1243
  if (r) {
1216
1244
  i = r.width, s = r.height;
@@ -1224,8 +1252,8 @@ function Sn(t, e) {
1224
1252
  y: a
1225
1253
  };
1226
1254
  }
1227
- function Tn(t, e) {
1228
- const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, i = $(t) ? Z(t) : H(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = n * i.y;
1255
+ function Cn(t, e) {
1256
+ const o = G(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, i = $(t) ? tt(t) : V(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = n * i.y;
1229
1257
  return {
1230
1258
  width: s,
1231
1259
  height: c,
@@ -1233,16 +1261,16 @@ function Tn(t, e) {
1233
1261
  y: l
1234
1262
  };
1235
1263
  }
1236
- function Gt(t, e, o) {
1264
+ function te(t, e, o) {
1237
1265
  let n;
1238
1266
  if (e === "viewport")
1239
- n = Sn(t, o);
1267
+ n = kn(t, o);
1240
1268
  else if (e === "document")
1241
- n = Pn(z(t));
1242
- else if (W(e))
1243
- n = Tn(e, o);
1269
+ n = Tn(z(t));
1270
+ else if (F(e))
1271
+ n = Cn(e, o);
1244
1272
  else {
1245
- const r = Oe(t);
1273
+ const r = Re(t);
1246
1274
  n = {
1247
1275
  x: e.x - r.x,
1248
1276
  y: e.y - r.y,
@@ -1252,34 +1280,34 @@ function Gt(t, e, o) {
1252
1280
  }
1253
1281
  return vt(n);
1254
1282
  }
1255
- function Le(t, e) {
1256
- const o = I(t);
1257
- return o === e || !W(o) || et(o) ? !1 : F(o).position === "fixed" || Le(o, e);
1283
+ function Pe(t, e) {
1284
+ const o = q(t);
1285
+ return o === e || !F(o) || ot(o) ? !1 : M(o).position === "fixed" || Pe(o, e);
1258
1286
  }
1259
- function kn(t, e) {
1287
+ function Dn(t, e) {
1260
1288
  const o = e.get(t);
1261
1289
  if (o)
1262
1290
  return o;
1263
- let n = at(t, [], !1).filter((c) => W(c) && ot(c) !== "body"), r = null;
1264
- const i = F(t).position === "fixed";
1265
- let s = i ? I(t) : t;
1266
- for (; W(s) && !et(s); ) {
1267
- const c = F(s), a = _t(s);
1268
- !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || ht(s) && !a && Le(t, s)) ? n = n.filter((u) => u !== s) : r = c, s = I(s);
1291
+ let n = lt(t, [], !1).filter((c) => F(c) && rt(c) !== "body"), r = null;
1292
+ const i = M(t).position === "fixed";
1293
+ let s = i ? q(t) : t;
1294
+ for (; F(s) && !ot(s); ) {
1295
+ const c = M(s), a = Ut(s);
1296
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || dt(s) && !a && Pe(t, s)) ? n = n.filter((u) => u !== s) : r = c, s = q(s);
1269
1297
  }
1270
1298
  return e.set(t, n), n;
1271
1299
  }
1272
- function Cn(t) {
1300
+ function Wn(t) {
1273
1301
  let {
1274
1302
  element: e,
1275
1303
  boundary: o,
1276
1304
  rootBoundary: n,
1277
1305
  strategy: r
1278
1306
  } = t;
1279
- const s = [...o === "clippingAncestors" ? At(e) ? [] : kn(e, this._c) : [].concat(o), n], c = s[0], a = s.reduce((l, u) => {
1280
- const h = Gt(e, u, r);
1281
- return l.top = X(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = X(h.left, l.left), l;
1282
- }, Gt(e, c, r));
1307
+ const s = [...o === "clippingAncestors" ? Ot(e) ? [] : Dn(e, this._c) : [].concat(o), n], c = s[0], a = s.reduce((l, u) => {
1308
+ const h = te(e, u, r);
1309
+ return l.top = Q(h.top, l.top), l.right = nt(h.right, l.right), l.bottom = nt(h.bottom, l.bottom), l.left = Q(h.left, l.left), l;
1310
+ }, te(e, c, r));
1283
1311
  return {
1284
1312
  width: a.right - a.left,
1285
1313
  height: a.bottom - a.top,
@@ -1287,7 +1315,7 @@ function Cn(t) {
1287
1315
  y: a.top
1288
1316
  };
1289
1317
  }
1290
- function Dn(t) {
1318
+ function Fn(t) {
1291
1319
  const {
1292
1320
  width: e,
1293
1321
  height: o
@@ -1297,23 +1325,23 @@ function Dn(t) {
1297
1325
  height: o
1298
1326
  };
1299
1327
  }
1300
- function Wn(t, e, o) {
1301
- const n = $(e), r = z(e), i = o === "fixed", s = J(t, !0, i, e);
1328
+ function Mn(t, e, o) {
1329
+ const n = $(e), r = z(e), i = o === "fixed", s = G(t, !0, i, e);
1302
1330
  let c = {
1303
1331
  scrollLeft: 0,
1304
1332
  scrollTop: 0
1305
1333
  };
1306
- const a = H(0);
1334
+ const a = V(0);
1307
1335
  function l() {
1308
- a.x = jt(r);
1336
+ a.x = It(r);
1309
1337
  }
1310
1338
  if (n || !n && !i)
1311
- if ((ot(e) !== "body" || ht(r)) && (c = Ot(e)), n) {
1312
- const f = J(e, !0, i, e);
1339
+ if ((rt(e) !== "body" || dt(r)) && (c = At(e)), n) {
1340
+ const f = G(e, !0, i, e);
1313
1341
  a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
1314
1342
  } else r && l();
1315
1343
  i && !n && r && l();
1316
- const u = r && !n && !i ? Re(r, c) : H(0), h = s.left + c.scrollLeft - a.x - u.x, p = s.top + c.scrollTop - a.y - u.y;
1344
+ const u = r && !n && !i ? Le(r, c) : V(0), h = s.left + c.scrollLeft - a.x - u.x, p = s.top + c.scrollTop - a.y - u.y;
1317
1345
  return {
1318
1346
  x: h,
1319
1347
  y: p,
@@ -1321,11 +1349,11 @@ function Wn(t, e, o) {
1321
1349
  height: s.height
1322
1350
  };
1323
1351
  }
1324
- function Et(t) {
1325
- return F(t).position === "static";
1352
+ function Pt(t) {
1353
+ return M(t).position === "static";
1326
1354
  }
1327
- function Zt(t, e) {
1328
- if (!$(t) || F(t).position === "fixed")
1355
+ function ee(t, e) {
1356
+ if (!$(t) || M(t).position === "fixed")
1329
1357
  return null;
1330
1358
  if (e)
1331
1359
  return e(t);
@@ -1333,27 +1361,27 @@ function Zt(t, e) {
1333
1361
  return z(t) === o && (o = o.ownerDocument.body), o;
1334
1362
  }
1335
1363
  function Ee(t, e) {
1336
- const o = S(t);
1337
- if (At(t))
1364
+ const o = T(t);
1365
+ if (Ot(t))
1338
1366
  return o;
1339
1367
  if (!$(t)) {
1340
- let r = I(t);
1341
- for (; r && !et(r); ) {
1342
- if (W(r) && !Et(r))
1368
+ let r = q(t);
1369
+ for (; r && !ot(r); ) {
1370
+ if (F(r) && !Pt(r))
1343
1371
  return r;
1344
- r = I(r);
1372
+ r = q(r);
1345
1373
  }
1346
1374
  return o;
1347
1375
  }
1348
- let n = Zt(t, e);
1349
- for (; n && bn(n) && Et(n); )
1350
- n = Zt(n, e);
1351
- return n && et(n) && Et(n) && !_t(n) ? o : n || An(t) || o;
1376
+ let n = ee(t, e);
1377
+ for (; n && An(n) && Pt(n); )
1378
+ n = ee(n, e);
1379
+ return n && ot(n) && Pt(n) && !Ut(n) ? o : n || Rn(t) || o;
1352
1380
  }
1353
- const Fn = async function(t) {
1381
+ const Nn = async function(t) {
1354
1382
  const e = this.getOffsetParent || Ee, o = this.getDimensions, n = await o(t.floating);
1355
1383
  return {
1356
- reference: Wn(t.reference, await e(t.floating), t.strategy),
1384
+ reference: Mn(t.reference, await e(t.floating), t.strategy),
1357
1385
  floating: {
1358
1386
  x: 0,
1359
1387
  y: 0,
@@ -1362,25 +1390,25 @@ const Fn = async function(t) {
1362
1390
  }
1363
1391
  };
1364
1392
  };
1365
- function Mn(t) {
1366
- return F(t).direction === "rtl";
1393
+ function Hn(t) {
1394
+ return M(t).direction === "rtl";
1367
1395
  }
1368
- const Nn = {
1369
- convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
1396
+ const Vn = {
1397
+ convertOffsetParentRelativeRectToViewportRelativeRect: En,
1370
1398
  getDocumentElement: z,
1371
- getClippingRect: Cn,
1399
+ getClippingRect: Wn,
1372
1400
  getOffsetParent: Ee,
1373
- getElementRects: Fn,
1374
- getClientRects: En,
1375
- getDimensions: Dn,
1376
- getScale: Z,
1377
- isElement: W,
1378
- isRTL: Mn
1401
+ getElementRects: Nn,
1402
+ getClientRects: Sn,
1403
+ getDimensions: Fn,
1404
+ getScale: tt,
1405
+ isElement: F,
1406
+ isRTL: Hn
1379
1407
  };
1380
- function Pe(t, e) {
1408
+ function Se(t, e) {
1381
1409
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1382
1410
  }
1383
- function Vn(t, e) {
1411
+ function $n(t, e) {
1384
1412
  let o = null, n;
1385
1413
  const r = z(t);
1386
1414
  function i() {
@@ -1397,36 +1425,36 @@ function Vn(t, e) {
1397
1425
  } = l;
1398
1426
  if (c || e(), !p || !f)
1399
1427
  return;
1400
- const d = mt(h), w = mt(r.clientWidth - (u + p)), g = mt(r.clientHeight - (h + f)), y = mt(u), v = {
1401
- rootMargin: -d + "px " + -w + "px " + -g + "px " + -y + "px",
1402
- threshold: X(0, tt(1, a)) || 1
1428
+ const d = gt(h), w = gt(r.clientWidth - (u + p)), m = gt(r.clientHeight - (h + f)), v = gt(u), y = {
1429
+ rootMargin: -d + "px " + -w + "px " + -m + "px " + -v + "px",
1430
+ threshold: Q(0, nt(1, a)) || 1
1403
1431
  };
1404
1432
  let R = !0;
1405
- function O(T) {
1406
- const m = T[0].intersectionRatio;
1407
- if (m !== a) {
1433
+ function A(k) {
1434
+ const P = k[0].intersectionRatio;
1435
+ if (P !== a) {
1408
1436
  if (!R)
1409
1437
  return s();
1410
- m ? s(!1, m) : n = setTimeout(() => {
1438
+ P ? s(!1, P) : n = setTimeout(() => {
1411
1439
  s(!1, 1e-7);
1412
1440
  }, 1e3);
1413
1441
  }
1414
- m === 1 && !Pe(l, t.getBoundingClientRect()) && s(), R = !1;
1442
+ P === 1 && !Se(l, t.getBoundingClientRect()) && s(), R = !1;
1415
1443
  }
1416
1444
  try {
1417
- o = new IntersectionObserver(O, {
1418
- ...v,
1445
+ o = new IntersectionObserver(A, {
1446
+ ...y,
1419
1447
  // Handle <iframe>s
1420
1448
  root: r.ownerDocument
1421
1449
  });
1422
1450
  } catch {
1423
- o = new IntersectionObserver(O, v);
1451
+ o = new IntersectionObserver(A, y);
1424
1452
  }
1425
1453
  o.observe(t);
1426
1454
  }
1427
1455
  return s(!0), i;
1428
1456
  }
1429
- function Hn(t, e, o, n) {
1457
+ function zn(t, e, o, n) {
1430
1458
  n === void 0 && (n = {});
1431
1459
  const {
1432
1460
  ancestorScroll: r = !0,
@@ -1434,47 +1462,47 @@ function Hn(t, e, o, n) {
1434
1462
  elementResize: s = typeof ResizeObserver == "function",
1435
1463
  layoutShift: c = typeof IntersectionObserver == "function",
1436
1464
  animationFrame: a = !1
1437
- } = n, l = Ut(t), u = r || i ? [...l ? at(l) : [], ...at(e)] : [];
1438
- u.forEach((y) => {
1439
- r && y.addEventListener("scroll", o, {
1465
+ } = n, l = jt(t), u = r || i ? [...l ? lt(l) : [], ...lt(e)] : [];
1466
+ u.forEach((v) => {
1467
+ r && v.addEventListener("scroll", o, {
1440
1468
  passive: !0
1441
- }), i && y.addEventListener("resize", o);
1469
+ }), i && v.addEventListener("resize", o);
1442
1470
  });
1443
- const h = l && c ? Vn(l, o) : null;
1471
+ const h = l && c ? $n(l, o) : null;
1444
1472
  let p = -1, f = null;
1445
- s && (f = new ResizeObserver((y) => {
1446
- let [x] = y;
1447
- x && x.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1448
- var v;
1449
- (v = f) == null || v.observe(e);
1473
+ s && (f = new ResizeObserver((v) => {
1474
+ let [b] = v;
1475
+ b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1476
+ var y;
1477
+ (y = f) == null || y.observe(e);
1450
1478
  })), o();
1451
1479
  }), l && !a && f.observe(l), f.observe(e));
1452
- let d, w = a ? J(t) : null;
1453
- a && g();
1454
- function g() {
1455
- const y = J(t);
1456
- w && !Pe(w, y) && o(), w = y, d = requestAnimationFrame(g);
1480
+ let d, w = a ? G(t) : null;
1481
+ a && m();
1482
+ function m() {
1483
+ const v = G(t);
1484
+ w && !Se(w, v) && o(), w = v, d = requestAnimationFrame(m);
1457
1485
  }
1458
1486
  return o(), () => {
1459
- var y;
1460
- u.forEach((x) => {
1461
- r && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
1462
- }), h == null || h(), (y = f) == null || y.disconnect(), f = null, a && cancelAnimationFrame(d);
1487
+ var v;
1488
+ u.forEach((b) => {
1489
+ r && b.removeEventListener("scroll", o), i && b.removeEventListener("resize", o);
1490
+ }), h == null || h(), (v = f) == null || v.disconnect(), f = null, a && cancelAnimationFrame(d);
1463
1491
  };
1464
1492
  }
1465
- const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1493
+ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
1466
1494
  const n = /* @__PURE__ */ new Map(), r = {
1467
- platform: Nn,
1495
+ platform: Vn,
1468
1496
  ...o
1469
1497
  }, i = {
1470
1498
  ...r.platform,
1471
1499
  _c: n
1472
1500
  };
1473
- return gn(t, e, {
1501
+ return wn(t, e, {
1474
1502
  ...r,
1475
1503
  platform: i
1476
1504
  });
1477
- }, go = [
1505
+ }, wo = [
1478
1506
  "top",
1479
1507
  "top-start",
1480
1508
  "top-end",
@@ -1487,26 +1515,26 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1487
1515
  "left",
1488
1516
  "left-start",
1489
1517
  "left-end"
1490
- ], po = (t, e = { isOpen: !1 }) => {
1518
+ ], yo = (t, e = { isOpen: !1 }) => {
1491
1519
  const o = [];
1492
1520
  let n = null;
1493
- const r = k.deriveProp(e.isOpen);
1521
+ const r = C.deriveProp(e.isOpen);
1494
1522
  function i(c) {
1495
1523
  n = c, r.set(!0);
1496
1524
  }
1497
1525
  function s() {
1498
1526
  r.set(!1), o.forEach((c) => c()), o.length = 0;
1499
1527
  }
1500
- return j(
1528
+ return Y(
1501
1529
  t(i, s),
1502
- ue(
1530
+ he(
1503
1531
  r,
1504
- () => j(
1505
- (n == null ? void 0 : n.onClickOutside) != null ? on(n.onClickOutside) : null,
1532
+ () => Y(
1533
+ (n == null ? void 0 : n.onClickOutside) != null ? rn(n.onClickOutside) : null,
1506
1534
  _(
1507
- (c) => le(
1535
+ (c) => fe(
1508
1536
  "body",
1509
- Pt.div(
1537
+ Et.div(
1510
1538
  _((a) => {
1511
1539
  a.style.position = "absolute";
1512
1540
  const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
@@ -1515,14 +1543,14 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1515
1543
  if (l == null)
1516
1544
  throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
1517
1545
  let u = null;
1518
- const h = k.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), p = k.toSignal(
1546
+ const h = C.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), p = C.toSignal(
1519
1547
  (n == null ? void 0 : n.crossAxisOffset) ?? 0
1520
- ), f = k.toSignal(
1548
+ ), f = C.toSignal(
1521
1549
  /* c8 ignore next 3 */
1522
1550
  (n == null ? void 0 : n.placement) ?? "top"
1523
- ), d = k.toSignal(
1551
+ ), d = C.toSignal(
1524
1552
  (n == null ? void 0 : n.arrowPadding) ?? 0
1525
- ), w = n == null ? void 0 : n.arrow, g = M({
1553
+ ), w = n == null ? void 0 : n.arrow, m = N({
1526
1554
  centerOffset: 0,
1527
1555
  alignmentOffset: 0,
1528
1556
  containerWidth: 0,
@@ -1530,69 +1558,69 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1530
1558
  x: void 0,
1531
1559
  y: void 0
1532
1560
  });
1533
- async function y() {
1534
- const v = [
1535
- te(),
1536
- $n({
1561
+ async function v() {
1562
+ const y = [
1563
+ ne(),
1564
+ Bn({
1537
1565
  mainAxis: h.get(),
1538
1566
  crossAxis: p.get()
1539
1567
  }),
1540
- zn(),
1541
- te()
1568
+ _n(),
1569
+ ne()
1542
1570
  ];
1543
- w != null && u != null && v.push(
1544
- Bn({
1571
+ w != null && u != null && y.push(
1572
+ Un({
1545
1573
  element: u,
1546
1574
  padding: d.get()
1547
1575
  })
1548
1576
  );
1549
- const R = await _n(l, a, {
1577
+ const R = await Kn(l, a, {
1550
1578
  placement: f.get(),
1551
1579
  strategy: "absolute",
1552
- middleware: v
1553
- }), { x: O, y: T, middlewareData: m } = R;
1554
- if (a.style.top = `${T}px`, a.style.left = `${O}px`, u != null && m.arrow != null) {
1580
+ middleware: y
1581
+ }), { x: A, y: k, middlewareData: P } = R;
1582
+ if (a.style.top = `${k}px`, a.style.left = `${A}px`, u != null && P.arrow != null) {
1555
1583
  const {
1556
- x: b,
1557
- y: A,
1558
- centerOffset: E,
1559
- alignmentOffset: V
1560
- } = m.arrow;
1561
- g.set({
1562
- x: b,
1563
- y: A,
1564
- centerOffset: E,
1565
- alignmentOffset: V,
1584
+ x: U,
1585
+ y: g,
1586
+ centerOffset: x,
1587
+ alignmentOffset: O
1588
+ } = P.arrow;
1589
+ m.set({
1590
+ x: U,
1591
+ y: g,
1592
+ centerOffset: x,
1593
+ alignmentOffset: O,
1566
1594
  containerWidth: a.offsetWidth,
1567
1595
  containerHeight: a.offsetHeight
1568
1596
  });
1569
1597
  }
1570
1598
  }
1571
- const x = Fe(
1599
+ const b = Me(
1572
1600
  h,
1573
1601
  p,
1574
1602
  f
1575
- )(y);
1576
- return j(
1603
+ )(v);
1604
+ return Y(
1577
1605
  n == null ? void 0 : n.content,
1578
- (n == null ? void 0 : n.arrow) != null ? Pt.div(
1606
+ (n == null ? void 0 : n.arrow) != null ? Et.div(
1579
1607
  n == null ? void 0 : n.arrow(
1580
- fe(
1581
- g,
1608
+ Ht(
1609
+ m,
1582
1610
  f
1583
- )((v, R) => ({
1584
- ...v,
1611
+ )((y, R) => ({
1612
+ ...y,
1585
1613
  placement: R
1586
1614
  }))
1587
1615
  ),
1588
- _((v) => {
1589
- u = v, y();
1616
+ _((y) => {
1617
+ u = y, v();
1590
1618
  })
1591
1619
  ) : null,
1592
- N(
1593
- g.dispose,
1594
- Hn(l, a, y),
1595
- x
1620
+ H(
1621
+ m.dispose,
1622
+ zn(l, a, v),
1623
+ b
1596
1624
  )
1597
1625
  );
1598
1626
  })
@@ -1602,7 +1630,7 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1602
1630
  )
1603
1631
  )
1604
1632
  );
1605
- }, Kn = ({
1633
+ }, jn = ({
1606
1634
  request: t,
1607
1635
  load: e,
1608
1636
  convertError: o,
@@ -1611,29 +1639,29 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1611
1639
  onSettled: i
1612
1640
  }) => {
1613
1641
  let s;
1614
- const c = M(L.notAsked), a = c.map(
1615
- (g) => L.isSuccess(g) ? g.value : void 0
1642
+ const c = N(L.notAsked), a = c.map(
1643
+ (m) => L.isSuccess(m) ? m.value : void 0
1616
1644
  ), l = c.map(
1617
- (g) => L.isFailure(g) ? g.error : void 0
1618
- ), u = c.map((g) => L.isLoading(g)), h = () => {
1645
+ (m) => L.isFailure(m) ? m.error : void 0
1646
+ ), u = c.map((m) => L.isLoading(m)), h = () => {
1619
1647
  s == null || s.abort(), s = void 0;
1620
- }, p = (g) => {
1621
- h(), c.set(g ?? L.notAsked);
1622
- }, f = async (g) => {
1648
+ }, p = (m) => {
1649
+ h(), c.set(m ?? L.notAsked);
1650
+ }, f = async (m) => {
1623
1651
  h(), s = new AbortController();
1624
- const y = s.signal, x = c.get();
1625
- c.set(L.loading(L.getOrUndefined(x)));
1652
+ const v = s.signal, b = c.get();
1653
+ c.set(L.loading(L.getOrUndefined(b)));
1626
1654
  try {
1627
- const v = await e({ request: g, abortSignal: y, previous: x });
1628
- await Promise.resolve(), s = void 0, c.set(L.success(v)), n == null || n(v, g);
1629
- } catch (v) {
1630
- s = void 0, c.set(L.failure(o(v))), r == null || r(o(v), g);
1655
+ const y = await e({ request: m, abortSignal: v, previous: b });
1656
+ await Promise.resolve(), s = void 0, c.set(L.success(y)), n == null || n(y, m);
1657
+ } catch (y) {
1658
+ s = void 0, c.set(L.failure(o(y))), r == null || r(o(y), m);
1631
1659
  }
1632
- i == null || i(c.get(), g);
1633
- }, d = () => f(k.get(t)), w = () => {
1660
+ i == null || i(c.get(), m);
1661
+ }, d = () => f(C.get(t)), w = () => {
1634
1662
  s == null || s.abort(), s = void 0, c.dispose();
1635
1663
  };
1636
- return c.onDispose(k.on(t, f)), {
1664
+ return c.onDispose(C.on(t, f)), {
1637
1665
  status: c,
1638
1666
  value: a,
1639
1667
  error: l,
@@ -1642,17 +1670,17 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1642
1670
  reload: d,
1643
1671
  dispose: w
1644
1672
  };
1645
- }, Un = (t, e) => {
1673
+ }, In = (t, e) => {
1646
1674
  const { status: o, dispose: n, reload: r } = t, { pending: i, failure: s, success: c } = e;
1647
- return j(
1648
- N(n),
1649
- ge(o, {
1675
+ return Y(
1676
+ H(n),
1677
+ pe(o, {
1650
1678
  loading: i != null ? (a) => i({ previous: a, reload: r, cancel: t.cancel }) : void 0,
1651
1679
  failure: s != null ? (a) => s({ error: a, reload: r }) : void 0,
1652
1680
  success: (a) => c({ value: a, reload: r })
1653
1681
  })
1654
1682
  );
1655
- }, wo = ({
1683
+ }, vo = ({
1656
1684
  request: t,
1657
1685
  load: e,
1658
1686
  convertError: o = (l) => l,
@@ -1663,7 +1691,7 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1663
1691
  pending: c,
1664
1692
  failure: a
1665
1693
  }) => {
1666
- const l = Kn({
1694
+ const l = jn({
1667
1695
  request: t,
1668
1696
  load: e,
1669
1697
  convertError: o,
@@ -1671,19 +1699,19 @@ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1671
1699
  onError: r,
1672
1700
  onSettled: i
1673
1701
  });
1674
- return Un(l, { success: s, pending: c, failure: a });
1675
- }, jn = (t, e) => {
1702
+ return In(l, { success: s, pending: c, failure: a });
1703
+ }, Yn = (t, e) => {
1676
1704
  if (typeof e == "function")
1677
- return jn(t, { success: e });
1678
- const o = e.failure ?? ((r) => j(
1679
- N(r.on(console.error)),
1705
+ return Yn(t, { success: e });
1706
+ const o = e.failure ?? ((r) => Y(
1707
+ H(r.on(console.error)),
1680
1708
  r.map((i) => `Error: ${i}`)
1681
1709
  )), n = e.success;
1682
- return ae(k.toSignal(t), {
1710
+ return ue(C.toSignal(t), {
1683
1711
  Success: (r) => n(r.$.value),
1684
1712
  Failure: (r) => o(r.$.error)
1685
1713
  });
1686
- }, yo = () => ce.focus((t) => {
1714
+ }, xo = () => le.focus((t) => {
1687
1715
  var e;
1688
1716
  return (e = t.target) == null ? void 0 : e.select();
1689
1717
  });
@@ -1726,7 +1754,7 @@ class Rt {
1726
1754
  * console.log(rect1.equals(rect3)); // true (within tolerance)
1727
1755
  * ```
1728
1756
  */
1729
- Lt(this, "equals", (e) => dt(this.left, e.left) && dt(this.top, e.top) && dt(this.width, e.width) && dt(this.height, e.height));
1757
+ Lt(this, "equals", (e) => mt(this.left, e.left) && mt(this.top, e.top) && mt(this.width, e.width) && mt(this.height, e.height));
1730
1758
  this.left = e, this.top = o, this.width = n, this.height = r, this.localLeft = i, this.localTop = s;
1731
1759
  }
1732
1760
  /**
@@ -1875,7 +1903,7 @@ class Rt {
1875
1903
  return { width: this.width, height: this.height };
1876
1904
  }
1877
1905
  }
1878
- function ee(t) {
1906
+ function oe(t) {
1879
1907
  const e = t.getBoundingClientRect();
1880
1908
  return Rt.of({
1881
1909
  top: e.top + window.scrollY,
@@ -1886,49 +1914,55 @@ function ee(t) {
1886
1914
  localTop: t.offsetTop
1887
1915
  });
1888
1916
  }
1889
- const vo = (t) => Me((e) => {
1890
- const { element: o } = e, n = M(ee(o), (c, a) => c.equals(a)), r = Ht(t(n))(e), i = () => n.set(Rt.of(ee(o)));
1917
+ const bo = (t) => Ne((e) => {
1918
+ const { element: o } = e, n = N(oe(o), (c, a) => c.equals(a)), r = $t(t(n))(e), i = () => n.set(Rt.of(oe(o)));
1891
1919
  let s = null;
1892
- return typeof ResizeObserver < "u" && (s = new ResizeObserver(i)), s == null || s.observe(o), N((c) => {
1920
+ return typeof ResizeObserver < "u" && (s = new ResizeObserver(i)), s == null || s.observe(o), H((c) => {
1893
1921
  s == null || s.disconnect(), r(c);
1894
1922
  });
1895
1923
  });
1896
- function ne(t) {
1924
+ function se(t) {
1897
1925
  return {
1898
1926
  /* c8 ignore next 6 */
1899
1927
  width: (t == null ? void 0 : t.innerWidth) ?? 0,
1900
1928
  height: (t == null ? void 0 : t.innerHeight) ?? 0
1901
1929
  };
1902
1930
  }
1903
- const xo = (t) => (e) => {
1904
- const o = nt(), n = M(
1905
- ne(o),
1931
+ const Oo = (t) => (e) => {
1932
+ const o = st(), n = N(
1933
+ se(o),
1906
1934
  (s, c) => s.width === c.width && s.height === c.height
1907
- ), r = Ht(t(n))(e), i = () => n.set(ne(o));
1935
+ ), r = $t(t(n))(e), i = () => n.set(se(o));
1908
1936
  return o == null || o.addEventListener("resize", i), (s) => {
1909
1937
  o == null || o.removeEventListener("resize", i), r(s);
1910
1938
  };
1911
- }, In = (t, e) => {
1912
- const o = e.split("/").filter((r) => r !== ""), n = {};
1913
- for (let r = 0; r < t.length; r++) {
1914
- const i = t[r], s = o[r];
1915
- if (!s && i.type !== "catch-all")
1939
+ }, qn = (t, e) => {
1940
+ const o = e.split("/").filter((i) => i !== ""), n = (i) => {
1941
+ try {
1942
+ return decodeURIComponent(i);
1943
+ } catch {
1944
+ return i;
1945
+ }
1946
+ }, r = {};
1947
+ for (let i = 0; i < t.length; i++) {
1948
+ const s = t[i], c = o[i];
1949
+ if (!c && s.type !== "catch-all")
1916
1950
  return null;
1917
- if (i.type === "literal") {
1918
- if (i.value !== s)
1951
+ if (s.type === "literal") {
1952
+ if (s.value !== c)
1919
1953
  return null;
1920
- } else if (i.type === "param")
1921
- n[i.name] = s;
1922
- else if (i.type === "catch-all") {
1923
- if (i.name) {
1924
- const c = o.slice(r).join("/");
1925
- n[i.name] = c;
1954
+ } else if (s.type === "param")
1955
+ r[s.name] = n(c);
1956
+ else if (s.type === "catch-all") {
1957
+ if (s.name) {
1958
+ const a = o.slice(i).join("/");
1959
+ r[s.name] = n(a);
1926
1960
  }
1927
- return { params: n, path: e };
1961
+ return { params: r, path: e };
1928
1962
  }
1929
1963
  }
1930
- return o.length !== t.length ? null : { params: n, path: e };
1931
- }, Se = (t) => t.split("/").map((e) => {
1964
+ return o.length !== t.length ? null : { params: r, path: e };
1965
+ }, Te = (t) => t.split("/").map((e) => {
1932
1966
  if (e.startsWith(":"))
1933
1967
  return { type: "param", name: e.slice(1) };
1934
1968
  if (e.startsWith("*")) {
@@ -1936,14 +1970,14 @@ const xo = (t) => (e) => {
1936
1970
  return o != "" ? { type: "catch-all", name: o } : { type: "catch-all" };
1937
1971
  } else
1938
1972
  return { type: "literal", value: e };
1939
- }).filter((e) => e.type !== "literal" || e.value !== ""), bo = (t) => {
1973
+ }).filter((e) => e.type !== "literal" || e.value !== ""), Ao = (t) => {
1940
1974
  const e = t.map((o) => {
1941
- const n = Se(o);
1975
+ const n = Te(o);
1942
1976
  return { route: o, segments: n };
1943
1977
  });
1944
1978
  return function(n) {
1945
1979
  for (const { segments: r, route: i } of e) {
1946
- const s = In(r, n);
1980
+ const s = qn(r, n);
1947
1981
  if (s)
1948
1982
  return { ...s, route: i };
1949
1983
  }
@@ -1952,13 +1986,13 @@ const xo = (t) => (e) => {
1952
1986
  }, Ft = {
1953
1987
  mark: Nt("RouterContext"),
1954
1988
  create: () => {
1955
- const t = M([]);
1989
+ const t = N([]);
1956
1990
  return {
1957
1991
  value: t,
1958
1992
  dispose: () => t.dispose()
1959
1993
  };
1960
1994
  }
1961
- }, Yn = (t, e, o) => {
1995
+ }, Xn = (t, e, o) => {
1962
1996
  const n = o.split("/").filter((s) => s !== ""), r = {};
1963
1997
  let i = 0;
1964
1998
  for (let s = 0; s < t.length; s++) {
@@ -1992,25 +2026,25 @@ const xo = (t) => (e) => {
1992
2026
  };
1993
2027
  }
1994
2028
  return null;
1995
- }, Te = (t) => {
2029
+ }, ke = (t) => {
1996
2030
  const e = t.map((o) => {
1997
- const n = Se(o);
2031
+ const n = Te(o);
1998
2032
  return { route: o, segments: n };
1999
2033
  });
2000
2034
  return function(n) {
2001
2035
  for (const { segments: r, route: i } of e) {
2002
- const s = Yn(r, i, n);
2036
+ const s = Xn(r, i, n);
2003
2037
  if (s)
2004
2038
  return s;
2005
2039
  }
2006
2040
  return null;
2007
2041
  };
2008
- }, Ao = (t) => {
2009
- const e = Te(Object.keys(t));
2010
- return Ne(
2042
+ }, Ro = (t) => {
2043
+ const e = ke(Object.keys(t));
2044
+ return He(
2011
2045
  Ft,
2012
2046
  {},
2013
- () => ct($t, (o) => ct(Ft, (n) => {
2047
+ () => at(zt, (o) => at(Ft, (n) => {
2014
2048
  const r = o.location.map((i) => {
2015
2049
  const s = e(i.pathname);
2016
2050
  if (s == null)
@@ -2029,21 +2063,21 @@ const xo = (t) => (e) => {
2029
2063
  hash: i.hash
2030
2064
  };
2031
2065
  });
2032
- return he(
2066
+ return de(
2033
2067
  r.map((i) => [i.route, i]),
2034
2068
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2035
2069
  t
2036
2070
  );
2037
2071
  }))
2038
2072
  );
2039
- }, Oo = (t) => {
2040
- const e = Te(Object.keys(t));
2041
- return ct(Ft, (o) => ct($t, (n) => {
2073
+ }, Lo = (t) => {
2074
+ const e = ke(Object.keys(t));
2075
+ return at(Ft, (o) => at(zt, (n) => {
2042
2076
  const r = o.map((i) => {
2043
- const s = i[i.length - 1], c = (s == null ? void 0 : s.remainingPath) || "";
2044
- if (c === "")
2045
- throw console.error("No remaining path for SubRouter", i), new Error("No remaining path for SubRouter");
2046
- const a = e(c);
2077
+ const s = i[i.length - 1];
2078
+ if (s == null)
2079
+ throw console.error("No router context available for ChildRouter", i), new Error("No router context available for ChildRouter");
2080
+ const c = s.remainingPath ?? "", a = e(c);
2047
2081
  if (a == null)
2048
2082
  throw console.error("No route found for remaining path", c), new Error("No route found");
2049
2083
  return {
@@ -2055,13 +2089,13 @@ const xo = (t) => (e) => {
2055
2089
  hash: n.location.value.hash
2056
2090
  };
2057
2091
  });
2058
- return he(
2092
+ return de(
2059
2093
  r.map((i) => [i.route, i]),
2060
2094
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2061
2095
  t
2062
2096
  );
2063
2097
  }));
2064
- }, xt = 60 * 1e3, Mt = 60 * xt, lt = 24 * Mt, oe = 7 * lt, se = 30 * lt, qn = 365 * lt, Xn = [
2098
+ }, xt = 60 * 1e3, Mt = 60 * xt, ut = 24 * Mt, re = 7 * ut, ie = 30 * ut, Qn = 365 * ut, Jn = [
2065
2099
  {
2066
2100
  max: xt * 90,
2067
2101
  value: xt,
@@ -2077,35 +2111,35 @@ const xo = (t) => (e) => {
2077
2111
  future: { singular: "in an hour", plural: "in {} hours" }
2078
2112
  },
2079
2113
  {
2080
- max: lt * 10,
2081
- value: lt,
2114
+ max: ut * 10,
2115
+ value: ut,
2082
2116
  name: "day",
2083
2117
  past: { singular: "yesterday", plural: "{} days ago" },
2084
2118
  future: { singular: "tomorrow", plural: "in {} days" }
2085
2119
  },
2086
2120
  {
2087
- max: oe * 6,
2088
- value: oe,
2121
+ max: re * 6,
2122
+ value: re,
2089
2123
  name: "week",
2090
2124
  past: { singular: "last week", plural: "{} weeks ago" },
2091
2125
  future: { singular: "in a week", plural: "in {} weeks" }
2092
2126
  },
2093
2127
  {
2094
- max: se * 18,
2095
- value: se,
2128
+ max: ie * 18,
2129
+ value: ie,
2096
2130
  name: "month",
2097
2131
  past: { singular: "last month", plural: "{} months ago" },
2098
2132
  future: { singular: "in a month", plural: "in {} months" }
2099
2133
  },
2100
2134
  {
2101
2135
  max: 1 / 0,
2102
- value: qn,
2136
+ value: Qn,
2103
2137
  name: "year",
2104
2138
  past: { singular: "last year", plural: "{} years ago" },
2105
2139
  future: { singular: "in a year", plural: "in {} years" }
2106
2140
  }
2107
2141
  ];
2108
- function re(t, e, o, n) {
2142
+ function ce(t, e, o, n) {
2109
2143
  const r = Math.round(t / e);
2110
2144
  return r <= 1 ? o : n.replace(
2111
2145
  "{}",
@@ -2115,28 +2149,28 @@ function re(t, e, o, n) {
2115
2149
  })
2116
2150
  );
2117
2151
  }
2118
- const Qn = (t = 1e3) => {
2119
- const e = M(/* @__PURE__ */ new Date()), o = He(() => e.set(/* @__PURE__ */ new Date()), t);
2152
+ const Gn = (t = 1e3) => {
2153
+ const e = N(/* @__PURE__ */ new Date()), o = $e(() => e.set(/* @__PURE__ */ new Date()), t);
2120
2154
  return e.onDispose(o), e;
2121
- }, Jn = (t) => {
2155
+ }, Zn = (t) => {
2122
2156
  const e = Math.abs(t);
2123
2157
  if (e < xt)
2124
2158
  return t < 0 ? "just now" : "in a moment";
2125
- for (const o of Xn)
2159
+ for (const o of Jn)
2126
2160
  if (e < o.max)
2127
- return t < 0 ? re(e, o.value, o.past.singular, o.past.plural) : re(e, o.value, o.future.singular, o.future.plural);
2161
+ return t < 0 ? ce(e, o.value, o.past.singular, o.past.plural) : ce(e, o.value, o.future.singular, o.future.plural);
2128
2162
  throw new Error("unreachable");
2129
- }, Gn = (t, { now: e, frequency: o = 1e4 } = {}) => {
2130
- const n = e != null ? ie.is(e) ? e.derive() : M(e) : Qn(o), r = fe(
2163
+ }, to = (t, { now: e, frequency: o = 1e4 } = {}) => {
2164
+ const n = e != null ? ae.is(e) ? e.derive() : N(e) : Gn(o), r = Ht(
2131
2165
  t,
2132
2166
  n
2133
2167
  )((i, s) => i.getTime() - s.getTime());
2134
- return r.onDispose(() => k.dispose(n)), r;
2135
- }, Zn = (t, e = {}) => {
2136
- const o = Gn(t, e), n = o.map(Jn);
2168
+ return r.onDispose(() => C.dispose(n)), r;
2169
+ }, eo = (t, e = {}) => {
2170
+ const o = to(t, e), n = o.map(Zn);
2137
2171
  return n.onDispose(o.dispose), n;
2138
- }, Ro = (t, e = {}) => Zn(t, e);
2139
- class to extends Ve {
2172
+ }, Po = (t, e = {}) => eo(t, e);
2173
+ class no extends Ve {
2140
2174
  constructor() {
2141
2175
  super(...arguments);
2142
2176
  /**
@@ -2146,56 +2180,57 @@ class to extends Ve {
2146
2180
  Lt(this, "tick", () => this.update((o) => o + 1));
2147
2181
  }
2148
2182
  }
2149
- const Lo = (t = 0) => new to(t, (e, o) => e === o);
2183
+ const Eo = (t = 0) => new no(t, (e, o) => e === o);
2150
2184
  export {
2151
- Ge as Anchor,
2152
- so as Appearance,
2153
- ge as AsyncResultView,
2154
- ro as AutoFocus,
2155
- io as AutoSelect,
2156
- Oo as ChildRouter,
2157
- vo as ElementRect,
2158
- lo as HTMLTitle,
2159
- ao as HiddenWhenEmpty,
2160
- nn as InViewport,
2161
- $t as Location,
2162
- mo as Mutation,
2163
- cn as MutationDisplay,
2164
- on as OnClickOutside,
2165
- fo as OnEnterKey,
2166
- ho as OnEscapeKey,
2167
- pe as OnKeyPressed,
2168
- po as PopOver,
2169
- wo as Query,
2170
- Un as QueryDisplay,
2185
+ tn as Anchor,
2186
+ io as Appearance,
2187
+ pe as AsyncResultView,
2188
+ co as AutoFocus,
2189
+ ao as AutoSelect,
2190
+ Lo as ChildRouter,
2191
+ bo as ElementRect,
2192
+ fo as HTMLTitle,
2193
+ uo as HiddenWhenEmpty,
2194
+ sn as InViewport,
2195
+ zt as Location,
2196
+ po as Mutation,
2197
+ ln as MutationDisplay,
2198
+ rn as OnClickOutside,
2199
+ mo as OnEnterKey,
2200
+ go as OnEscapeKey,
2201
+ we as OnKeyPressed,
2202
+ yo as PopOver,
2203
+ vo as Query,
2204
+ In as QueryDisplay,
2171
2205
  Rt as Rect,
2172
- jn as ResultView,
2173
- Ao as RootRouter,
2206
+ Yn as ResultView,
2207
+ Ro as RootRouter,
2174
2208
  Ft as RouterContextProvider,
2175
- yo as SelectOnFocus,
2176
- to as Ticker,
2177
- uo as WhenInViewport,
2178
- xo as WindowSize,
2179
- ze as _checkExtensionCondition,
2180
- $e as _getExtension,
2181
- bo as _makeRouteMatcher,
2182
- Se as _parseRouteSegments,
2183
- go as allPlacements,
2209
+ xo as SelectOnFocus,
2210
+ no as Ticker,
2211
+ ho as WhenInViewport,
2212
+ Oo as WindowSize,
2213
+ Be as _checkExtensionCondition,
2214
+ ze as _getExtension,
2215
+ Ao as _makeRouteMatcher,
2216
+ Te as _parseRouteSegments,
2217
+ wo as allPlacements,
2184
2218
  Ke as areLocationsEqual,
2185
- co as classes,
2186
- ee as getAbsoluteRect,
2187
- _e as handleAnchorClick,
2219
+ lo as classes,
2220
+ Qt as evaluateLocationMatch,
2221
+ oe as getAbsoluteRect,
2222
+ Ue as handleAnchorClick,
2188
2223
  Tt as locationFromURL,
2189
- rn as makeMutationResource,
2190
- Kn as makeQueryResource,
2191
- sn as matchesKeyCombo,
2192
- In as matchesRoute,
2193
- Qn as nowSignal,
2194
- Ro as relativeTime,
2195
- Gn as relativeTimeMillisSignal,
2196
- Zn as relativeTimeSignal,
2197
- Lo as ticker,
2198
- Jn as timeDiffToString,
2199
- pt as urlFromLocation,
2200
- Ze as useAppearance
2224
+ an as makeMutationResource,
2225
+ jn as makeQueryResource,
2226
+ cn as matchesKeyCombo,
2227
+ qn as matchesRoute,
2228
+ Gn as nowSignal,
2229
+ Po as relativeTime,
2230
+ to as relativeTimeMillisSignal,
2231
+ eo as relativeTimeSignal,
2232
+ Eo as ticker,
2233
+ Zn as timeDiffToString,
2234
+ et as urlFromLocation,
2235
+ en as useAppearance
2201
2236
  };