@tempots/ui 10.1.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.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +465 -459
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  var De = Object.defineProperty;
2
- var We = (t, e, s) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
- var Lt = (t, e, s) => We(t, typeof e != "symbol" ? e + "" : e, s);
4
- import { getWindow as ot, 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 Pt, 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";
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
5
  import { delayed as me, AsyncResult as L, nearEqual as mt, interval as $e } from "@tempots/std";
6
6
  const ze = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
9
- const s = e.split(".") || [];
10
- return s.length > 1 ? "." + s.pop() : void 0;
9
+ const o = e.split(".") || [];
10
+ return o.length > 1 ? "." + o.pop() : void 0;
11
11
  }, Be = (t, e) => {
12
- const s = ze(e);
13
- return s != null && (t.length === 0 || !t.some((n) => s == n));
14
- }, _e = (t, e, s, n) => {
12
+ const o = ze(e);
13
+ return o != null && (t.length === 0 || !t.some((n) => 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;
@@ -20,45 +20,45 @@ const ze = (t) => {
20
20
  const i = r;
21
21
  if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
22
22
  return !0;
23
- const { pathname: o, search: c, hash: a } = i;
23
+ const { pathname: s, search: c, hash: a } = i;
24
24
  if (n) {
25
- const l = o + c + a, u = i.getAttribute("href");
25
+ const l = s + c + a, u = i.getAttribute("href");
26
26
  if (!(u != null && u.startsWith("#")) && u !== l)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : Be(s, o);
30
- }, Ke = (t, e = {
29
+ return e ? !1 : Be(o, s);
30
+ }, Ue = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
34
34
  }) => {
35
- const s = e.ignoreUrlWithExtension === !0 && Array.isArray(e.allowedExtensions) ? e.allowedExtensions.map(
35
+ const o = e.ignoreUrlWithExtension === !0 && Array.isArray(e.allowedExtensions) ? e.allowedExtensions.map(
36
36
  (n) => n.startsWith(".") ? n : "." + n
37
37
  ) : [];
38
38
  return (n) => {
39
39
  _e(
40
40
  n,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
- s,
42
+ o,
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && n.preventDefault();
45
45
  };
46
- }, Ue = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Tt = (t, e) => {
47
- var i, o;
48
- const s = new URL(t, e ?? ((i = ot()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((o = s.searchParams) == null ? void 0 : o.entries()) ?? []);
49
- let r = s.hash;
46
+ }, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Tt = (t, e) => {
47
+ var i, s;
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
+ let r = o.hash;
50
50
  return r.startsWith("#") && (r = r.substring(1)), {
51
- pathname: s.pathname,
51
+ pathname: o.pathname,
52
52
  search: n,
53
53
  hash: r === "" ? void 0 : r
54
54
  };
55
55
  }, et = (t) => {
56
- const s = new URLSearchParams(t.search).toString(), n = t.hash;
57
- return `${t.pathname}${s ? `?${s}` : ""}${n ? `#${n}` : ""}`;
56
+ const o = new URLSearchParams(t.search).toString(), n = t.hash;
57
+ return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
58
58
  }, je = (t) => {
59
59
  document.startViewTransition ? document.startViewTransition(t) : t();
60
60
  }, Yt = () => {
61
- const t = ot(), e = (t == null ? void 0 : t.location.hash) ?? "";
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(
@@ -69,17 +69,17 @@ const ze = (t) => {
69
69
  }, qt = (t) => {
70
70
  if ((t == null ? void 0 : t.scroll) !== "auto")
71
71
  return;
72
- const e = ot();
72
+ const e = st();
73
73
  e && e.requestAnimationFrame(
74
74
  () => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
75
75
  );
76
76
  }, Xt = (t, e) => {
77
77
  e != null && e.viewTransition ? je(t) : t();
78
78
  }, Ie = () => {
79
- const t = N(Yt(), Ue), e = ot(), s = () => {
79
+ const t = N(Yt(), Ke), e = st(), o = () => {
80
80
  t.set(Yt());
81
81
  };
82
- e == null || e.addEventListener("popstate", s), e == null || e.addEventListener("hashchange", s);
82
+ e == null || e.addEventListener("popstate", o), e == null || e.addEventListener("hashchange", o);
83
83
  const n = (a, l, u) => {
84
84
  Xt(() => {
85
85
  if (e) {
@@ -101,36 +101,36 @@ const ze = (t) => {
101
101
  forward: (a) => r(1, a),
102
102
  resolve: (a) => Tt(a),
103
103
  dispose: () => {
104
- e == null || e.removeEventListener("popstate", s), e == null || e.removeEventListener("hashchange", s), t.dispose();
104
+ e == null || e.removeEventListener("popstate", o), e == null || e.removeEventListener("hashchange", o), t.dispose();
105
105
  }
106
106
  };
107
107
  }, Ye = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), qe = (t) => {
108
- const e = t.container.currentURL, s = e.iso(
109
- (o) => Tt(o, e.value),
110
- (o) => {
111
- if (Ye(o.pathname))
112
- return et(o);
113
- const c = new URL(o.pathname, e.value), a = c.origin + c.pathname;
114
- return et({ ...o, pathname: a });
108
+ const e = t.container.currentURL, o = e.iso(
109
+ (s) => Tt(s, e.value),
110
+ (s) => {
111
+ if (Ye(s.pathname))
112
+ return et(s);
113
+ const c = new URL(s.pathname, e.value), a = c.origin + c.pathname;
114
+ return et({ ...s, pathname: a });
115
115
  }
116
116
  );
117
117
  return {
118
- location: s,
118
+ location: o,
119
119
  dispose: () => {
120
- s.dispose();
120
+ o.dispose();
121
121
  },
122
- commit: (o, c, a) => {
123
- s.set(o);
122
+ commit: (s, c, a) => {
123
+ o.set(s);
124
124
  },
125
- go: (o, c) => {
125
+ go: (s, c) => {
126
126
  },
127
127
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
128
- back: (o) => {
128
+ back: (s) => {
129
129
  },
130
130
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
131
- forward: (o) => {
131
+ forward: (s) => {
132
132
  },
133
- resolve: (o) => Tt(o, e.value)
133
+ resolve: (s) => Tt(s, e.value)
134
134
  };
135
135
  }, it = (t) => ({
136
136
  pathname: t.pathname,
@@ -141,30 +141,30 @@ const ze = (t) => {
141
141
  const e = `${t}`;
142
142
  return e === "" ? void 0 : e;
143
143
  }, ge = (t, e) => {
144
- const s = { ...t };
144
+ const o = { ...t };
145
145
  for (const [n, r] of Object.entries(e))
146
- r == null ? delete s[n] : s[n] = r;
147
- return s;
146
+ r == null ? delete o[n] : o[n] = r;
147
+ return o;
148
148
  }, Xe = (t, e) => {
149
- const s = (e == null ? void 0 : e.includeSearch) ?? !0, n = (e == null ? void 0 : e.includeHash) ?? !0, r = (e == null ? void 0 : e.ignoreSearchParams) ?? [];
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
150
  let i;
151
- if (!s)
151
+ if (!o)
152
152
  i = {};
153
153
  else if (r.length === 0)
154
154
  i = { ...t.search };
155
155
  else {
156
- const o = new Set(r);
156
+ const s = new Set(r);
157
157
  i = {};
158
158
  for (const [c, a] of Object.entries(t.search))
159
- o.has(c) || (i[c] = a);
159
+ s.has(c) || (i[c] = a);
160
160
  }
161
161
  return {
162
162
  pathname: t.pathname,
163
163
  search: i,
164
164
  hash: n ? t.hash : void 0
165
165
  };
166
- }, Qt = (t, e, s) => {
167
- const n = Xe(t, s);
166
+ }, Qt = (t, e, o) => {
167
+ const n = Xe(t, o);
168
168
  return typeof e == "string" ? et(n) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(n))) : e(n);
169
169
  };
170
170
  class Qe {
@@ -184,20 +184,20 @@ class Qe {
184
184
  }, this;
185
185
  }
186
186
  setHash(e) {
187
- const s = kt(e);
188
- if (s == null) {
187
+ const o = kt(e);
188
+ if (o == null) {
189
189
  const { hash: n, ...r } = this.current;
190
190
  this.current = r;
191
191
  } else
192
192
  this.current = {
193
193
  ...this.current,
194
- hash: s
194
+ hash: o
195
195
  };
196
196
  return this;
197
197
  }
198
198
  clearHash() {
199
- const { hash: e, ...s } = this.current;
200
- return this.current = s, this;
199
+ const { hash: e, ...o } = this.current;
200
+ return this.current = o, this;
201
201
  }
202
202
  setSearch(e) {
203
203
  return this.current = {
@@ -205,8 +205,8 @@ class Qe {
205
205
  search: ge(this.current.search, e)
206
206
  }, this;
207
207
  }
208
- setSearchParam(e, s) {
209
- return this.setSearch({ [e]: s });
208
+ setSearchParam(e, o) {
209
+ return this.setSearch({ [e]: o });
210
210
  }
211
211
  updateSearch(e) {
212
212
  return this.current = {
@@ -216,7 +216,7 @@ class Qe {
216
216
  }
217
217
  }
218
218
  const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
219
- const e = t.location, s = e.map(et), n = e.map((g) => g.pathname), r = e.map((g) => ({ ...g.search })), i = e.map((g) => g.hash), o = (g, x) => Qt(t.location.value, g, x), c = (g, x) => Ht(
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
220
  e,
221
221
  g
222
222
  )(
@@ -246,8 +246,8 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
246
246
  }, w = (g) => {
247
247
  t.forward(g);
248
248
  }, m = (g, x) => u((O) => ({ ...O, pathname: g }), x), v = (g, x) => u((O) => {
249
- const E = { ...O }, U = kt(g);
250
- return U == null ? delete E.hash : E.hash = U, E;
249
+ const E = { ...O }, K = kt(g);
250
+ return K == null ? delete E.hash : E.hash = K, E;
251
251
  }, x), b = (g) => v(void 0, g), y = (g, x) => u(
252
252
  (O) => ({
253
253
  ...O,
@@ -258,7 +258,7 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
258
258
  return {
259
259
  handle: {
260
260
  location: e,
261
- url: s,
261
+ url: o,
262
262
  pathname: n,
263
263
  search: r,
264
264
  hash: i,
@@ -288,11 +288,11 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
288
288
  );
289
289
  g(O), l(it(O.location), x);
290
290
  },
291
- match: o,
291
+ match: s,
292
292
  matchSignal: c
293
293
  },
294
294
  dispose: () => {
295
- t.dispose(), s.dispose(), n.dispose(), r.dispose(), i.dispose();
295
+ t.dispose(), o.dispose(), n.dispose(), r.dispose(), i.dispose();
296
296
  }
297
297
  };
298
298
  }, Ze = (t) => {
@@ -304,7 +304,7 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
304
304
  }, zt = {
305
305
  mark: Nt("Location"),
306
306
  create: (t, e) => {
307
- const s = Ze(e), { handle: n, dispose: r } = Ge(s);
307
+ const o = Ze(e), { handle: n, dispose: r } = Ge(o);
308
308
  return {
309
309
  value: n,
310
310
  dispose: r
@@ -313,23 +313,23 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
313
313
  }, tn = (t, ...e) => {
314
314
  if (typeof t == "string" || ae.is(t))
315
315
  return tn({ href: t }, ...e);
316
- const { href: s, state: n, scroll: r, viewTransition: i, replace: o, ...c } = t;
316
+ const { href: o, state: n, scroll: r, viewTransition: i, replace: s, ...c } = t;
317
317
  return at(zt, (a) => Et.a(
318
318
  le.click(
319
- Ke(() => {
319
+ Ue(() => {
320
320
  let l = !1;
321
321
  const u = {};
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), o !== void 0 && (u.replace = o, l = !0), a.navigate(
323
- C.get(s),
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(
323
+ C.get(o),
324
324
  l ? u : void 0
325
325
  ), !0;
326
326
  }, c)
327
327
  ),
328
- Vt.href(s),
328
+ Vt.href(o),
329
329
  ...e
330
330
  /* c8 ignore next 2 */
331
331
  ));
332
- }, is = {
332
+ }, io = {
333
333
  mark: Nt("Appearance"),
334
334
  create: () => {
335
335
  const t = en();
@@ -340,37 +340,37 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
340
340
  }
341
341
  };
342
342
  function en() {
343
- const t = ot(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, s = (e == null ? void 0 : e.matches) ?? !1, n = N(s ? "dark" : "light"), r = (i) => n.set(i.matches ? "dark" : "light");
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");
344
344
  return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
345
345
  }
346
346
  const pe = (t, e) => {
347
347
  if (typeof e == "function")
348
348
  return pe(t, { success: e });
349
- const s = e.failure ?? ((o) => o.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => Pt), i = e.notAsked ?? (() => Pt);
349
+ const o = e.failure ?? ((s) => s.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => St), i = e.notAsked ?? (() => St);
350
350
  return ue(C.toSignal(t), {
351
- AsyncSuccess: (o) => n(o.$.value),
352
- AsyncFailure: (o) => s(o.$.error),
353
- Loading: (o) => r(o.map((c) => c.previousValue)),
351
+ AsyncSuccess: (s) => n(s.$.value),
352
+ AsyncFailure: (s) => o(s.$.error),
353
+ Loading: (s) => r(s.map((c) => c.previousValue)),
354
354
  NotAsked: i
355
355
  });
356
- }, cs = (t = 10) => _((e) => H(me(() => e == null ? void 0 : e.focus(), t))), as = (t = 10) => _((e) => {
357
- const s = me(() => e.select(), t);
358
- return H(s);
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);
359
359
  });
360
- function ls(t) {
360
+ function lo(t) {
361
361
  const e = Object.entries(t);
362
362
  return Y(
363
363
  ...e.map(
364
- ([s, n]) => Vt.class(C.map(n, (r) => r ? s : void 0))
364
+ ([o, n]) => Vt.class(C.map(n, (r) => r ? o : void 0))
365
365
  )
366
366
  );
367
367
  }
368
- const us = _((t) => {
368
+ const uo = _((t) => {
369
369
  const e = t.style.getPropertyValue(":empty");
370
- return t.style.setProperty(":empty", "display:none"), H((s) => {
371
- s && t.style.setProperty(":empty", e);
370
+ return t.style.setProperty(":empty", "display:none"), H((o) => {
371
+ o && t.style.setProperty(":empty", e);
372
372
  });
373
- }), fs = (t) => fe("head > title", Vt.innerText(t)), nn = {
373
+ }), fo = (t) => fe("head > title", Vt.innerText(t)), nn = {
374
374
  partial: {
375
375
  root: null,
376
376
  rootMargin: "0px",
@@ -388,41 +388,41 @@ const us = _((t) => {
388
388
  partial: null,
389
389
  full: null
390
390
  };
391
- function sn(t) {
391
+ function on(t) {
392
392
  return ct[t] == null && (ct[t] = new IntersectionObserver((e) => {
393
- e.forEach((s) => {
394
- const n = pt[t].get(s.target);
395
- n == null || n.set(s.isIntersecting);
393
+ e.forEach((o) => {
394
+ const n = pt[t].get(o.target);
395
+ n == null || n.set(o.isIntersecting);
396
396
  });
397
397
  }, nn[t])), ct[t];
398
398
  }
399
- const on = ({ mode: t = "partial", once: e = !1 }, s) => {
399
+ const sn = ({ mode: t = "partial", once: e = !1 }, o) => {
400
400
  const n = N(!1);
401
401
  return Y(
402
402
  _((r) => {
403
- const i = typeof IntersectionObserver < "u" ? sn(t) : null;
403
+ const i = typeof IntersectionObserver < "u" ? on(t) : null;
404
404
  pt[t].set(r, n), i == null || i.observe(r);
405
- function o() {
405
+ function s() {
406
406
  var a;
407
407
  i == null || i.unobserve(r), pt[t].delete(r), pt[t].size === 0 && ((a = ct[t]) == null || a.disconnect(), ct[t] = null);
408
408
  }
409
409
  let c = null;
410
410
  return e && (c = n.on((a) => {
411
- a && o();
411
+ a && s();
412
412
  })), H(() => {
413
- n.dispose(), o(), c == null || c();
413
+ n.dispose(), s(), c == null || c();
414
414
  });
415
415
  }),
416
- $t(s(n))
416
+ $t(o(n))
417
417
  );
418
- }, hs = (t, e, s) => on(t, (n) => he(n, e, s ?? (() => Pt)));
418
+ }, ho = (t, e, o) => sn(t, (n) => he(n, e, o ?? (() => St)));
419
419
  function rn(t) {
420
420
  return _((e) => {
421
- const s = (n) => {
421
+ const o = (n) => {
422
422
  e.contains(n.target) || t(n);
423
423
  };
424
- return document.addEventListener("click", s), H(() => {
425
- document.removeEventListener("click", s);
424
+ return document.addEventListener("click", o), H(() => {
425
+ document.removeEventListener("click", o);
426
426
  });
427
427
  });
428
428
  }
@@ -437,9 +437,9 @@ function we({
437
437
  allowedKeys: t,
438
438
  handler: e
439
439
  }) {
440
- return _((s) => {
440
+ return _((o) => {
441
441
  const n = (r) => {
442
- if (s.contains(r.target)) {
442
+ if (o.contains(r.target)) {
443
443
  for (const i of t)
444
444
  if (cn(i, r)) {
445
445
  e(r);
@@ -452,81 +452,81 @@ function we({
452
452
  });
453
453
  });
454
454
  }
455
- function ds(t) {
455
+ function mo(t) {
456
456
  return we({ allowedKeys: ["Enter"], handler: t });
457
457
  }
458
- function ms(t) {
458
+ function go(t) {
459
459
  return we({ allowedKeys: ["Escape"], handler: t });
460
460
  }
461
461
  const an = ({
462
462
  mutate: t,
463
463
  convertError: e,
464
- onSuccess: s,
464
+ onSuccess: o,
465
465
  onError: n,
466
466
  onSettled: r
467
467
  }) => {
468
468
  let i;
469
- const o = N(L.notAsked), c = o.map(
469
+ const s = N(L.notAsked), c = s.map(
470
470
  (d) => L.isSuccess(d) ? d.value : void 0
471
- ), a = o.map(
471
+ ), a = s.map(
472
472
  (d) => L.isFailure(d) ? d.error : void 0
473
- ), l = o.map((d) => L.isLoading(d)), u = () => {
473
+ ), l = s.map((d) => L.isLoading(d)), u = () => {
474
474
  i == null || i.abort(), i = void 0;
475
475
  };
476
476
  return {
477
- status: o,
477
+ status: s,
478
478
  value: c,
479
479
  error: a,
480
480
  pending: l,
481
481
  execute: async (d, w) => {
482
482
  u(), i = new AbortController();
483
- const m = i.signal, v = o.get(), b = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
484
- b != null ? o.set(L.loading(b)) : o.set(L.loading(L.getOrUndefined(v)));
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)));
485
485
  try {
486
486
  const y = await t({ request: d, abortSignal: m, previous: v });
487
- i = void 0, o.set(L.success(y)), s == null || s(y, d);
487
+ i = void 0, s.set(L.success(y)), o == null || o(y, d);
488
488
  } catch (y) {
489
- i = void 0, o.set(L.failure(e(y))), n == null || n(e(y), d);
489
+ i = void 0, s.set(L.failure(e(y))), n == null || n(e(y), d);
490
490
  }
491
- r == null || r(o.get(), d);
491
+ r == null || r(s.get(), d);
492
492
  },
493
493
  cancel: (d) => {
494
- u(), o.set(d ?? L.notAsked);
494
+ u(), s.set(d ?? L.notAsked);
495
495
  },
496
496
  dispose: () => {
497
- i == null || i.abort(), i = void 0, o.dispose();
497
+ i == null || i.abort(), i = void 0, s.dispose();
498
498
  }
499
499
  };
500
500
  }, ln = (t, e) => {
501
- const { status: s, dispose: n, execute: r, cancel: i, pending: o, error: c, value: a } = t, { content: l } = e, u = Fe(a);
501
+ const { status: o, dispose: n, execute: r, cancel: i, pending: s, error: c, value: a } = t, { content: l } = e, u = Fe(a);
502
502
  return Y(
503
503
  H(n),
504
504
  l({
505
505
  previous: u,
506
506
  execute: r,
507
507
  cancel: i,
508
- pending: o,
508
+ pending: s,
509
509
  error: c,
510
510
  value: a,
511
- status: s
511
+ status: o
512
512
  })
513
513
  );
514
- }, gs = ({
514
+ }, po = ({
515
515
  mutate: t,
516
- convertError: e = (o) => o,
517
- onSuccess: s,
516
+ convertError: e = (s) => s,
517
+ onSuccess: o,
518
518
  onError: n,
519
519
  onSettled: r,
520
520
  content: i
521
521
  }) => {
522
- const o = an({
522
+ const s = an({
523
523
  mutate: t,
524
524
  convertError: e,
525
- onSuccess: s,
525
+ onSuccess: o,
526
526
  onError: n,
527
527
  onSettled: r
528
528
  });
529
- return ln(o, { content: i });
529
+ return ln(s, { content: i });
530
530
  }, nt = Math.min, Q = Math.max, wt = Math.round, gt = Math.floor, V = (t) => ({
531
531
  x: t,
532
532
  y: t
@@ -539,8 +539,8 @@ const an = ({
539
539
  start: "end",
540
540
  end: "start"
541
541
  };
542
- function Ct(t, e, s) {
543
- return Q(t, nt(e, s));
542
+ function Ct(t, e, o) {
543
+ return Q(t, nt(e, o));
544
544
  }
545
545
  function ft(t, e) {
546
546
  return typeof t == "function" ? t(e) : t;
@@ -563,11 +563,11 @@ function I(t) {
563
563
  function _t(t) {
564
564
  return ye(I(t));
565
565
  }
566
- function hn(t, e, s) {
567
- s === void 0 && (s = !1);
566
+ function hn(t, e, o) {
567
+ o === void 0 && (o = !1);
568
568
  const n = ht(t), r = _t(t), i = Bt(r);
569
- let o = r === "x" ? n === (s ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
570
- return e.reference[i] > e.floating[i] && (o = yt(o)), [o, yt(o)];
569
+ let s = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
570
+ return e.reference[i] > e.floating[i] && (s = yt(s)), [s, yt(s)];
571
571
  }
572
572
  function dn(t) {
573
573
  const e = yt(t);
@@ -576,23 +576,23 @@ function dn(t) {
576
576
  function Dt(t) {
577
577
  return t.replace(/start|end/g, (e) => fn[e]);
578
578
  }
579
- function mn(t, e, s) {
580
- const n = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], o = ["bottom", "top"];
579
+ function mn(t, e, o) {
580
+ const n = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
581
581
  switch (t) {
582
582
  case "top":
583
583
  case "bottom":
584
- return s ? e ? r : n : e ? n : r;
584
+ return o ? e ? r : n : e ? n : r;
585
585
  case "left":
586
586
  case "right":
587
- return e ? i : o;
587
+ return e ? i : s;
588
588
  default:
589
589
  return [];
590
590
  }
591
591
  }
592
- function gn(t, e, s, n) {
592
+ function gn(t, e, o, n) {
593
593
  const r = ht(t);
594
- let i = mn(J(t), s === "start", n);
595
- return r && (i = i.map((o) => o + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
594
+ let i = mn(J(t), o === "start", n);
595
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
596
596
  }
597
597
  function yt(t) {
598
598
  return t.replace(/left|right|bottom|top/g, (e) => un[e]);
@@ -617,27 +617,27 @@ function ve(t) {
617
617
  function vt(t) {
618
618
  const {
619
619
  x: e,
620
- y: s,
620
+ y: o,
621
621
  width: n,
622
622
  height: r
623
623
  } = t;
624
624
  return {
625
625
  width: n,
626
626
  height: r,
627
- top: s,
627
+ top: o,
628
628
  left: e,
629
629
  right: e + n,
630
- bottom: s + r,
630
+ bottom: o + r,
631
631
  x: e,
632
- y: s
632
+ y: o
633
633
  };
634
634
  }
635
- function Gt(t, e, s) {
635
+ function Gt(t, e, o) {
636
636
  let {
637
637
  reference: n,
638
638
  floating: r
639
639
  } = t;
640
- const i = I(e), o = _t(e), c = Bt(o), 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;
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;
641
641
  let f;
642
642
  switch (a) {
643
643
  case "top":
@@ -672,22 +672,22 @@ function Gt(t, e, s) {
672
672
  }
673
673
  switch (ht(e)) {
674
674
  case "start":
675
- f[o] -= p * (s && l ? -1 : 1);
675
+ f[s] -= p * (o && l ? -1 : 1);
676
676
  break;
677
677
  case "end":
678
- f[o] += p * (s && l ? -1 : 1);
678
+ f[s] += p * (o && l ? -1 : 1);
679
679
  break;
680
680
  }
681
681
  return f;
682
682
  }
683
- const wn = async (t, e, s) => {
683
+ const wn = async (t, e, o) => {
684
684
  const {
685
685
  placement: n = "bottom",
686
686
  strategy: r = "absolute",
687
687
  middleware: i = [],
688
- platform: o
689
- } = s, c = i.filter(Boolean), a = await (o.isRTL == null ? void 0 : o.isRTL(e));
690
- let l = await o.getElementRects({
688
+ platform: s
689
+ } = o, c = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
690
+ let l = await s.getElementRects({
691
691
  reference: t,
692
692
  floating: e,
693
693
  strategy: r
@@ -712,7 +712,7 @@ const wn = async (t, e, s) => {
712
712
  strategy: r,
713
713
  middlewareData: f,
714
714
  rects: l,
715
- platform: o,
715
+ platform: s,
716
716
  elements: {
717
717
  reference: t,
718
718
  floating: e
@@ -724,7 +724,7 @@ const wn = async (t, e, s) => {
724
724
  ...f[m],
725
725
  ...R
726
726
  }
727
- }, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await o.getElementRects({
727
+ }, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
728
728
  reference: t,
729
729
  floating: e,
730
730
  strategy: r
@@ -742,13 +742,13 @@ const wn = async (t, e, s) => {
742
742
  };
743
743
  };
744
744
  async function xe(t, e) {
745
- var s;
745
+ var o;
746
746
  e === void 0 && (e = {});
747
747
  const {
748
748
  x: n,
749
749
  y: r,
750
750
  platform: i,
751
- rects: o,
751
+ rects: s,
752
752
  elements: c,
753
753
  strategy: a
754
754
  } = t, {
@@ -758,16 +758,16 @@ async function xe(t, e) {
758
758
  altBoundary: p = !1,
759
759
  padding: f = 0
760
760
  } = ft(e, t), d = ve(f), m = c[p ? h === "floating" ? "reference" : "floating" : h], v = vt(await i.getClippingRect({
761
- element: (s = await (i.isElement == null ? void 0 : i.isElement(m))) == null || s ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
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)),
762
762
  boundary: l,
763
763
  rootBoundary: u,
764
764
  strategy: a
765
765
  })), b = h === "floating" ? {
766
766
  x: n,
767
767
  y: r,
768
- width: o.floating.width,
769
- height: o.floating.height
770
- } : o.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)) || {
768
+ width: s.floating.width,
769
+ height: s.floating.height
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)) || {
771
771
  x: 1,
772
772
  y: 1
773
773
  } : {
@@ -791,11 +791,11 @@ const yn = (t) => ({
791
791
  options: t,
792
792
  async fn(e) {
793
793
  const {
794
- x: s,
794
+ x: o,
795
795
  y: n,
796
796
  placement: r,
797
797
  rects: i,
798
- platform: o,
798
+ platform: s,
799
799
  elements: c,
800
800
  middlewareData: a
801
801
  } = e, {
@@ -805,17 +805,17 @@ const yn = (t) => ({
805
805
  if (l == null)
806
806
  return {};
807
807
  const h = ve(u), p = {
808
- x: s,
808
+ x: o,
809
809
  y: n
810
- }, f = _t(r), d = Bt(f), w = await o.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 (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l));
811
- let S = k ? k[y] : 0;
812
- (!S || !await (o.isElement == null ? void 0 : o.isElement(k))) && (S = c.floating[y] || i.floating[d]);
813
- const K = R / 2 - A / 2, g = S / 2 - w[d] / 2 - 1, x = nt(h[v], g), O = nt(h[b], g), E = x, U = S - w[d] - O, P = S / 2 - w[d] / 2 + K, X = Ct(E, P, U), B = !a.arrow && ht(r) != null && P !== X && i.reference[d] / 2 - (P < E ? x : O) - w[d] / 2 < 0, D = B ? P < E ? P - E : P - U : 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;
814
814
  return {
815
815
  [f]: p[f] + D,
816
816
  data: {
817
817
  [f]: X,
818
- centerOffset: P - X - D,
818
+ centerOffset: S - X - D,
819
819
  ...B && {
820
820
  alignmentOffset: D
821
821
  }
@@ -828,11 +828,11 @@ const yn = (t) => ({
828
828
  name: "flip",
829
829
  options: t,
830
830
  async fn(e) {
831
- var s, n;
831
+ var o, n;
832
832
  const {
833
833
  placement: r,
834
834
  middlewareData: i,
835
- rects: o,
835
+ rects: s,
836
836
  initialPlacement: c,
837
837
  platform: a,
838
838
  elements: l
@@ -845,28 +845,28 @@ const yn = (t) => ({
845
845
  flipAlignment: w = !0,
846
846
  ...m
847
847
  } = ft(t, e);
848
- if ((s = i.arrow) != null && s.alignmentOffset)
848
+ if ((o = i.arrow) != null && o.alignmentOffset)
849
849
  return {};
850
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
851
  !p && k && A.push(...gn(c, w, d, R));
852
- const S = [c, ...A], K = await xe(e, m), g = [];
852
+ const P = [c, ...A], U = await xe(e, m), g = [];
853
853
  let x = ((n = i.flip) == null ? void 0 : n.overflows) || [];
854
- if (u && g.push(K[v]), h) {
855
- const P = hn(r, o, R);
856
- g.push(K[P[0]], K[P[1]]);
854
+ if (u && g.push(U[v]), h) {
855
+ const S = hn(r, s, R);
856
+ g.push(U[S[0]], U[S[1]]);
857
857
  }
858
858
  if (x = [...x, {
859
859
  placement: r,
860
860
  overflows: g
861
- }], !g.every((P) => P <= 0)) {
861
+ }], !g.every((S) => S <= 0)) {
862
862
  var O, E;
863
- const P = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, X = S[P];
863
+ const S = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, X = P[S];
864
864
  if (X && (!(h === "alignment" ? b !== I(X) : !1) || // We leave the current main axis only if every placement on that axis
865
865
  // overflows the main axis.
866
866
  x.every((W) => W.overflows[0] > 0 && I(W.placement) === b)))
867
867
  return {
868
868
  data: {
869
- index: P,
869
+ index: S,
870
870
  overflows: x
871
871
  },
872
872
  reset: {
@@ -877,8 +877,8 @@ const yn = (t) => ({
877
877
  if (!B)
878
878
  switch (f) {
879
879
  case "bestFit": {
880
- var U;
881
- const D = (U = x.filter((W) => {
880
+ var K;
881
+ const D = (K = x.filter((W) => {
882
882
  if (k) {
883
883
  const j = I(W.placement);
884
884
  return j === b || // Create a bias to the `y` side axis due to horizontal
@@ -886,7 +886,7 @@ const yn = (t) => ({
886
886
  j === "y";
887
887
  }
888
888
  return !0;
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 : U[0];
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
890
  D && (B = D);
891
891
  break;
892
892
  }
@@ -907,10 +907,10 @@ const yn = (t) => ({
907
907
  };
908
908
  async function xn(t, e) {
909
909
  const {
910
- placement: s,
910
+ placement: o,
911
911
  platform: n,
912
912
  elements: r
913
- } = t, i = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), o = J(s), c = ht(s), a = I(s) === "y", l = ["left", "top"].includes(o) ? -1 : 1, u = i && a ? -1 : 1, h = ft(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);
914
914
  let {
915
915
  mainAxis: p,
916
916
  crossAxis: f,
@@ -937,19 +937,19 @@ const bn = function(t) {
937
937
  name: "offset",
938
938
  options: t,
939
939
  async fn(e) {
940
- var s, n;
940
+ var o, n;
941
941
  const {
942
942
  x: r,
943
943
  y: i,
944
- placement: o,
944
+ placement: s,
945
945
  middlewareData: c
946
946
  } = e, a = await xn(e, t);
947
- return o === ((s = c.offset) == null ? void 0 : s.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
947
+ return s === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
948
948
  x: r + a.x,
949
949
  y: i + a.y,
950
950
  data: {
951
951
  ...a,
952
- placement: o
952
+ placement: s
953
953
  }
954
954
  };
955
955
  }
@@ -960,12 +960,12 @@ const bn = function(t) {
960
960
  options: t,
961
961
  async fn(e) {
962
962
  const {
963
- x: s,
963
+ x: o,
964
964
  y: n,
965
965
  placement: r
966
966
  } = e, {
967
967
  mainAxis: i = !0,
968
- crossAxis: o = !1,
968
+ crossAxis: s = !1,
969
969
  limiter: c = {
970
970
  fn: (m) => {
971
971
  let {
@@ -980,7 +980,7 @@ const bn = function(t) {
980
980
  },
981
981
  ...a
982
982
  } = ft(t, e), l = {
983
- x: s,
983
+ x: o,
984
984
  y: n
985
985
  }, u = await xe(e, a), h = I(J(r)), p = ye(h);
986
986
  let f = l[p], d = l[h];
@@ -988,7 +988,7 @@ const bn = function(t) {
988
988
  const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", b = f + u[m], y = f - u[v];
989
989
  f = Ct(b, f, y);
990
990
  }
991
- if (o) {
991
+ if (s) {
992
992
  const m = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = d + u[m], y = d - u[v];
993
993
  d = Ct(b, d, y);
994
994
  }
@@ -1000,11 +1000,11 @@ const bn = function(t) {
1000
1000
  return {
1001
1001
  ...w,
1002
1002
  data: {
1003
- x: w.x - s,
1003
+ x: w.x - o,
1004
1004
  y: w.y - n,
1005
1005
  enabled: {
1006
1006
  [p]: i,
1007
- [h]: o
1007
+ [h]: s
1008
1008
  }
1009
1009
  }
1010
1010
  };
@@ -1040,11 +1040,11 @@ function Zt(t) {
1040
1040
  function dt(t) {
1041
1041
  const {
1042
1042
  overflow: e,
1043
- overflowX: s,
1043
+ overflowX: o,
1044
1044
  overflowY: n,
1045
1045
  display: r
1046
1046
  } = M(t);
1047
- return /auto|scroll|overlay|hidden|clip/.test(e + n + s) && !["inline", "contents"].includes(r);
1047
+ return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
1048
1048
  }
1049
1049
  function An(t) {
1050
1050
  return ["table", "td", "th"].includes(rt(t));
@@ -1058,14 +1058,14 @@ function Ot(t) {
1058
1058
  }
1059
1059
  });
1060
1060
  }
1061
- function Kt(t) {
1062
- const e = Ut(), s = F(t) ? M(t) : t;
1063
- return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => s[n] ? s[n] !== "none" : !1) || (s.containerType ? s.containerType !== "normal" : !1) || !e && (s.backdropFilter ? s.backdropFilter !== "none" : !1) || !e && (s.filter ? s.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (s.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (s.contain || "").includes(n));
1061
+ function Ut(t) {
1062
+ const e = Kt(), o = F(t) ? M(t) : t;
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));
1064
1064
  }
1065
1065
  function Rn(t) {
1066
1066
  let e = q(t);
1067
- for (; $(e) && !st(e); ) {
1068
- if (Kt(e))
1067
+ for (; $(e) && !ot(e); ) {
1068
+ if (Ut(e))
1069
1069
  return e;
1070
1070
  if (Ot(e))
1071
1071
  return null;
@@ -1073,10 +1073,10 @@ function Rn(t) {
1073
1073
  }
1074
1074
  return null;
1075
1075
  }
1076
- function Ut() {
1076
+ function Kt() {
1077
1077
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1078
1078
  }
1079
- function st(t) {
1079
+ function ot(t) {
1080
1080
  return ["html", "body", "#document"].includes(rt(t));
1081
1081
  }
1082
1082
  function M(t) {
@@ -1105,27 +1105,27 @@ function q(t) {
1105
1105
  }
1106
1106
  function Oe(t) {
1107
1107
  const e = q(t);
1108
- return st(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
1108
+ return ot(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
1109
1109
  }
1110
- function lt(t, e, s) {
1110
+ function lt(t, e, o) {
1111
1111
  var n;
1112
- e === void 0 && (e = []), s === void 0 && (s = !0);
1113
- const r = Oe(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), o = T(r);
1112
+ e === void 0 && (e = []), o === void 0 && (o = !0);
1113
+ const r = Oe(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), s = T(r);
1114
1114
  if (i) {
1115
- const c = Wt(o);
1116
- return e.concat(o, o.visualViewport || [], dt(r) ? r : [], c && s ? lt(c) : []);
1115
+ const c = Wt(s);
1116
+ return e.concat(s, s.visualViewport || [], dt(r) ? r : [], c && o ? lt(c) : []);
1117
1117
  }
1118
- return e.concat(r, lt(r, [], s));
1118
+ return e.concat(r, lt(r, [], o));
1119
1119
  }
1120
1120
  function Wt(t) {
1121
1121
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1122
1122
  }
1123
1123
  function Ae(t) {
1124
1124
  const e = M(t);
1125
- let s = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
1126
- const r = $(t), i = r ? t.offsetWidth : s, o = r ? t.offsetHeight : n, c = wt(s) !== i || wt(n) !== o;
1127
- return c && (s = i, n = o), {
1128
- width: s,
1125
+ let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
1126
+ const r = $(t), i = r ? t.offsetWidth : o, s = r ? t.offsetHeight : n, c = wt(o) !== i || wt(n) !== s;
1127
+ return c && (o = i, n = s), {
1128
+ width: o,
1129
1129
  height: n,
1130
1130
  $: c
1131
1131
  };
@@ -1137,35 +1137,35 @@ function tt(t) {
1137
1137
  const e = jt(t);
1138
1138
  if (!$(e))
1139
1139
  return V(1);
1140
- const s = e.getBoundingClientRect(), {
1140
+ const o = e.getBoundingClientRect(), {
1141
1141
  width: n,
1142
1142
  height: r,
1143
1143
  $: i
1144
1144
  } = Ae(e);
1145
- let o = (i ? wt(s.width) : s.width) / n, c = (i ? wt(s.height) : s.height) / r;
1146
- return (!o || !Number.isFinite(o)) && (o = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1147
- x: o,
1145
+ let s = (i ? wt(o.width) : o.width) / n, c = (i ? wt(o.height) : o.height) / r;
1146
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1147
+ x: s,
1148
1148
  y: c
1149
1149
  };
1150
1150
  }
1151
1151
  const Ln = /* @__PURE__ */ V(0);
1152
1152
  function Re(t) {
1153
1153
  const e = T(t);
1154
- return !Ut() || !e.visualViewport ? Ln : {
1154
+ return !Kt() || !e.visualViewport ? Ln : {
1155
1155
  x: e.visualViewport.offsetLeft,
1156
1156
  y: e.visualViewport.offsetTop
1157
1157
  };
1158
1158
  }
1159
- function Sn(t, e, s) {
1160
- return e === void 0 && (e = !1), !s || e && s !== T(t) ? !1 : e;
1159
+ function Pn(t, e, o) {
1160
+ return e === void 0 && (e = !1), !o || e && o !== T(t) ? !1 : e;
1161
1161
  }
1162
- function G(t, e, s, n) {
1163
- e === void 0 && (e = !1), s === void 0 && (s = !1);
1162
+ function G(t, e, o, n) {
1163
+ e === void 0 && (e = !1), o === void 0 && (o = !1);
1164
1164
  const r = t.getBoundingClientRect(), i = jt(t);
1165
- let o = V(1);
1166
- e && (n ? F(n) && (o = tt(n)) : o = tt(t));
1167
- const c = Sn(i, s, n) ? Re(i) : V(0);
1168
- let a = (r.left + c.x) / o.x, l = (r.top + c.y) / o.y, u = r.width / o.x, h = r.height / o.y;
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);
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;
1169
1169
  if (i) {
1170
1170
  const p = T(i), f = n && F(n) ? T(n) : n;
1171
1171
  let d = p, w = Wt(d);
@@ -1182,12 +1182,12 @@ function G(t, e, s, n) {
1182
1182
  });
1183
1183
  }
1184
1184
  function It(t, e) {
1185
- const s = At(t).scrollLeft;
1186
- return e ? e.left + s : G(z(t)).left + s;
1185
+ const o = At(t).scrollLeft;
1186
+ return e ? e.left + o : G(z(t)).left + o;
1187
1187
  }
1188
- function Le(t, e, s) {
1189
- s === void 0 && (s = !1);
1190
- const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (s ? 0 : (
1188
+ function Le(t, e, o) {
1189
+ o === void 0 && (o = !1);
1190
+ const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
1191
1191
  // RTL <body> scrollbar.
1192
1192
  It(t, n)
1193
1193
  )), i = n.top + e.scrollTop;
@@ -1199,76 +1199,76 @@ function Le(t, e, s) {
1199
1199
  function En(t) {
1200
1200
  let {
1201
1201
  elements: e,
1202
- rect: s,
1202
+ rect: o,
1203
1203
  offsetParent: n,
1204
1204
  strategy: r
1205
1205
  } = t;
1206
- const i = r === "fixed", o = z(n), c = e ? Ot(e.floating) : !1;
1207
- if (n === o || c && i)
1208
- return s;
1206
+ const i = r === "fixed", s = z(n), c = e ? Ot(e.floating) : !1;
1207
+ if (n === s || c && i)
1208
+ return o;
1209
1209
  let a = {
1210
1210
  scrollLeft: 0,
1211
1211
  scrollTop: 0
1212
1212
  }, l = V(1);
1213
1213
  const u = V(0), h = $(n);
1214
- if ((h || !h && !i) && ((rt(n) !== "body" || dt(o)) && (a = At(n)), $(n))) {
1214
+ if ((h || !h && !i) && ((rt(n) !== "body" || dt(s)) && (a = At(n)), $(n))) {
1215
1215
  const f = G(n);
1216
1216
  l = tt(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
1217
1217
  }
1218
- const p = o && !h && !i ? Le(o, a, !0) : V(0);
1218
+ const p = s && !h && !i ? Le(s, a, !0) : V(0);
1219
1219
  return {
1220
- width: s.width * l.x,
1221
- height: s.height * l.y,
1222
- x: s.x * l.x - a.scrollLeft * l.x + u.x + p.x,
1223
- y: s.y * l.y - a.scrollTop * l.y + u.y + p.y
1220
+ width: o.width * l.x,
1221
+ height: o.height * l.y,
1222
+ x: o.x * l.x - a.scrollLeft * l.x + u.x + p.x,
1223
+ y: o.y * l.y - a.scrollTop * l.y + u.y + p.y
1224
1224
  };
1225
1225
  }
1226
- function Pn(t) {
1226
+ function Sn(t) {
1227
1227
  return Array.from(t.getClientRects());
1228
1228
  }
1229
1229
  function Tn(t) {
1230
- const e = z(t), s = 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 o = -s.scrollLeft + It(t);
1232
- const c = -s.scrollTop;
1233
- return M(n).direction === "rtl" && (o += Q(e.clientWidth, n.clientWidth) - r), {
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);
1232
+ const c = -o.scrollTop;
1233
+ return M(n).direction === "rtl" && (s += Q(e.clientWidth, n.clientWidth) - r), {
1234
1234
  width: r,
1235
1235
  height: i,
1236
- x: o,
1236
+ x: s,
1237
1237
  y: c
1238
1238
  };
1239
1239
  }
1240
1240
  function kn(t, e) {
1241
- const s = T(t), n = z(t), r = s.visualViewport;
1242
- let i = n.clientWidth, o = n.clientHeight, c = 0, a = 0;
1241
+ const o = T(t), n = z(t), r = o.visualViewport;
1242
+ let i = n.clientWidth, s = n.clientHeight, c = 0, a = 0;
1243
1243
  if (r) {
1244
- i = r.width, o = r.height;
1245
- const l = Ut();
1244
+ i = r.width, s = r.height;
1245
+ const l = Kt();
1246
1246
  (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
1247
1247
  }
1248
1248
  return {
1249
1249
  width: i,
1250
- height: o,
1250
+ height: s,
1251
1251
  x: c,
1252
1252
  y: a
1253
1253
  };
1254
1254
  }
1255
1255
  function Cn(t, e) {
1256
- const s = G(t, !0, e === "fixed"), n = s.top + t.clientTop, r = s.left + t.clientLeft, i = $(t) ? tt(t) : V(1), o = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = n * i.y;
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;
1257
1257
  return {
1258
- width: o,
1258
+ width: s,
1259
1259
  height: c,
1260
1260
  x: a,
1261
1261
  y: l
1262
1262
  };
1263
1263
  }
1264
- function te(t, e, s) {
1264
+ function te(t, e, o) {
1265
1265
  let n;
1266
1266
  if (e === "viewport")
1267
- n = kn(t, s);
1267
+ n = kn(t, o);
1268
1268
  else if (e === "document")
1269
1269
  n = Tn(z(t));
1270
1270
  else if (F(e))
1271
- n = Cn(e, s);
1271
+ n = Cn(e, o);
1272
1272
  else {
1273
1273
  const r = Re(t);
1274
1274
  n = {
@@ -1280,31 +1280,31 @@ function te(t, e, s) {
1280
1280
  }
1281
1281
  return vt(n);
1282
1282
  }
1283
- function Se(t, e) {
1284
- const s = q(t);
1285
- return s === e || !F(s) || st(s) ? !1 : M(s).position === "fixed" || Se(s, 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);
1286
1286
  }
1287
1287
  function Dn(t, e) {
1288
- const s = e.get(t);
1289
- if (s)
1290
- return s;
1288
+ const o = e.get(t);
1289
+ if (o)
1290
+ return o;
1291
1291
  let n = lt(t, [], !1).filter((c) => F(c) && rt(c) !== "body"), r = null;
1292
1292
  const i = M(t).position === "fixed";
1293
- let o = i ? q(t) : t;
1294
- for (; F(o) && !st(o); ) {
1295
- const c = M(o), a = Kt(o);
1296
- !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || dt(o) && !a && Se(t, o)) ? n = n.filter((u) => u !== o) : r = c, o = q(o);
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);
1297
1297
  }
1298
1298
  return e.set(t, n), n;
1299
1299
  }
1300
1300
  function Wn(t) {
1301
1301
  let {
1302
1302
  element: e,
1303
- boundary: s,
1303
+ boundary: o,
1304
1304
  rootBoundary: n,
1305
1305
  strategy: r
1306
1306
  } = t;
1307
- const o = [...s === "clippingAncestors" ? Ot(e) ? [] : Dn(e, this._c) : [].concat(s), n], c = o[0], a = o.reduce((l, u) => {
1307
+ const s = [...o === "clippingAncestors" ? Ot(e) ? [] : Dn(e, this._c) : [].concat(o), n], c = s[0], a = s.reduce((l, u) => {
1308
1308
  const h = te(e, u, r);
1309
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
1310
  }, te(e, c, r));
@@ -1318,15 +1318,15 @@ function Wn(t) {
1318
1318
  function Fn(t) {
1319
1319
  const {
1320
1320
  width: e,
1321
- height: s
1321
+ height: o
1322
1322
  } = Ae(t);
1323
1323
  return {
1324
1324
  width: e,
1325
- height: s
1325
+ height: o
1326
1326
  };
1327
1327
  }
1328
- function Mn(t, e, s) {
1329
- const n = $(e), r = z(e), i = s === "fixed", o = G(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);
1330
1330
  let c = {
1331
1331
  scrollLeft: 0,
1332
1332
  scrollTop: 0
@@ -1341,15 +1341,15 @@ function Mn(t, e, s) {
1341
1341
  a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
1342
1342
  } else r && l();
1343
1343
  i && !n && r && l();
1344
- const u = r && !n && !i ? Le(r, c) : V(0), h = o.left + c.scrollLeft - a.x - u.x, p = o.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;
1345
1345
  return {
1346
1346
  x: h,
1347
1347
  y: p,
1348
- width: o.width,
1349
- height: o.height
1348
+ width: s.width,
1349
+ height: s.height
1350
1350
  };
1351
1351
  }
1352
- function St(t) {
1352
+ function Pt(t) {
1353
1353
  return M(t).position === "static";
1354
1354
  }
1355
1355
  function ee(t, e) {
@@ -1357,29 +1357,29 @@ function ee(t, e) {
1357
1357
  return null;
1358
1358
  if (e)
1359
1359
  return e(t);
1360
- let s = t.offsetParent;
1361
- return z(t) === s && (s = s.ownerDocument.body), s;
1360
+ let o = t.offsetParent;
1361
+ return z(t) === o && (o = o.ownerDocument.body), o;
1362
1362
  }
1363
1363
  function Ee(t, e) {
1364
- const s = T(t);
1364
+ const o = T(t);
1365
1365
  if (Ot(t))
1366
- return s;
1366
+ return o;
1367
1367
  if (!$(t)) {
1368
1368
  let r = q(t);
1369
- for (; r && !st(r); ) {
1370
- if (F(r) && !St(r))
1369
+ for (; r && !ot(r); ) {
1370
+ if (F(r) && !Pt(r))
1371
1371
  return r;
1372
1372
  r = q(r);
1373
1373
  }
1374
- return s;
1374
+ return o;
1375
1375
  }
1376
1376
  let n = ee(t, e);
1377
- for (; n && An(n) && St(n); )
1377
+ for (; n && An(n) && Pt(n); )
1378
1378
  n = ee(n, e);
1379
- return n && st(n) && St(n) && !Kt(n) ? s : n || Rn(t) || s;
1379
+ return n && ot(n) && Pt(n) && !Ut(n) ? o : n || Rn(t) || o;
1380
1380
  }
1381
1381
  const Nn = async function(t) {
1382
- const e = this.getOffsetParent || Ee, s = this.getDimensions, n = await s(t.floating);
1382
+ const e = this.getOffsetParent || Ee, o = this.getDimensions, n = await o(t.floating);
1383
1383
  return {
1384
1384
  reference: Mn(t.reference, await e(t.floating), t.strategy),
1385
1385
  floating: {
@@ -1399,23 +1399,23 @@ const Vn = {
1399
1399
  getClippingRect: Wn,
1400
1400
  getOffsetParent: Ee,
1401
1401
  getElementRects: Nn,
1402
- getClientRects: Pn,
1402
+ getClientRects: Sn,
1403
1403
  getDimensions: Fn,
1404
1404
  getScale: tt,
1405
1405
  isElement: F,
1406
1406
  isRTL: Hn
1407
1407
  };
1408
- function Pe(t, e) {
1408
+ function Se(t, e) {
1409
1409
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1410
1410
  }
1411
1411
  function $n(t, e) {
1412
- let s = null, n;
1412
+ let o = null, n;
1413
1413
  const r = z(t);
1414
1414
  function i() {
1415
1415
  var c;
1416
- clearTimeout(n), (c = s) == null || c.disconnect(), s = null;
1416
+ clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
1417
1417
  }
1418
- function o(c, a) {
1418
+ function s(c, a) {
1419
1419
  c === void 0 && (c = !1), a === void 0 && (a = 1), i();
1420
1420
  const l = t.getBoundingClientRect(), {
1421
1421
  left: u,
@@ -1431,69 +1431,69 @@ function $n(t, e) {
1431
1431
  };
1432
1432
  let R = !0;
1433
1433
  function A(k) {
1434
- const S = k[0].intersectionRatio;
1435
- if (S !== a) {
1434
+ const P = k[0].intersectionRatio;
1435
+ if (P !== a) {
1436
1436
  if (!R)
1437
- return o();
1438
- S ? o(!1, S) : n = setTimeout(() => {
1439
- o(!1, 1e-7);
1437
+ return s();
1438
+ P ? s(!1, P) : n = setTimeout(() => {
1439
+ s(!1, 1e-7);
1440
1440
  }, 1e3);
1441
1441
  }
1442
- S === 1 && !Pe(l, t.getBoundingClientRect()) && o(), R = !1;
1442
+ P === 1 && !Se(l, t.getBoundingClientRect()) && s(), R = !1;
1443
1443
  }
1444
1444
  try {
1445
- s = new IntersectionObserver(A, {
1445
+ o = new IntersectionObserver(A, {
1446
1446
  ...y,
1447
1447
  // Handle <iframe>s
1448
1448
  root: r.ownerDocument
1449
1449
  });
1450
1450
  } catch {
1451
- s = new IntersectionObserver(A, y);
1451
+ o = new IntersectionObserver(A, y);
1452
1452
  }
1453
- s.observe(t);
1453
+ o.observe(t);
1454
1454
  }
1455
- return o(!0), i;
1455
+ return s(!0), i;
1456
1456
  }
1457
- function zn(t, e, s, n) {
1457
+ function zn(t, e, o, n) {
1458
1458
  n === void 0 && (n = {});
1459
1459
  const {
1460
1460
  ancestorScroll: r = !0,
1461
1461
  ancestorResize: i = !0,
1462
- elementResize: o = typeof ResizeObserver == "function",
1462
+ elementResize: s = typeof ResizeObserver == "function",
1463
1463
  layoutShift: c = typeof IntersectionObserver == "function",
1464
1464
  animationFrame: a = !1
1465
1465
  } = n, l = jt(t), u = r || i ? [...l ? lt(l) : [], ...lt(e)] : [];
1466
1466
  u.forEach((v) => {
1467
- r && v.addEventListener("scroll", s, {
1467
+ r && v.addEventListener("scroll", o, {
1468
1468
  passive: !0
1469
- }), i && v.addEventListener("resize", s);
1469
+ }), i && v.addEventListener("resize", o);
1470
1470
  });
1471
- const h = l && c ? $n(l, s) : null;
1471
+ const h = l && c ? $n(l, o) : null;
1472
1472
  let p = -1, f = null;
1473
- o && (f = new ResizeObserver((v) => {
1473
+ s && (f = new ResizeObserver((v) => {
1474
1474
  let [b] = v;
1475
1475
  b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1476
1476
  var y;
1477
1477
  (y = f) == null || y.observe(e);
1478
- })), s();
1478
+ })), o();
1479
1479
  }), l && !a && f.observe(l), f.observe(e));
1480
1480
  let d, w = a ? G(t) : null;
1481
1481
  a && m();
1482
1482
  function m() {
1483
1483
  const v = G(t);
1484
- w && !Pe(w, v) && s(), w = v, d = requestAnimationFrame(m);
1484
+ w && !Se(w, v) && o(), w = v, d = requestAnimationFrame(m);
1485
1485
  }
1486
- return s(), () => {
1486
+ return o(), () => {
1487
1487
  var v;
1488
1488
  u.forEach((b) => {
1489
- r && b.removeEventListener("scroll", s), i && b.removeEventListener("resize", s);
1489
+ r && b.removeEventListener("scroll", o), i && b.removeEventListener("resize", o);
1490
1490
  }), h == null || h(), (v = f) == null || v.disconnect(), f = null, a && cancelAnimationFrame(d);
1491
1491
  };
1492
1492
  }
1493
- const Bn = bn, _n = On, ne = vn, Kn = yn, Un = (t, e, s) => {
1493
+ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
1494
1494
  const n = /* @__PURE__ */ new Map(), r = {
1495
1495
  platform: Vn,
1496
- ...s
1496
+ ...o
1497
1497
  }, i = {
1498
1498
  ...r.platform,
1499
1499
  _c: n
@@ -1502,7 +1502,7 @@ const Bn = bn, _n = On, ne = vn, Kn = yn, Un = (t, e, s) => {
1502
1502
  ...r,
1503
1503
  platform: i
1504
1504
  });
1505
- }, ps = [
1505
+ }, wo = [
1506
1506
  "top",
1507
1507
  "top-start",
1508
1508
  "top-end",
@@ -1515,18 +1515,18 @@ const Bn = bn, _n = On, ne = vn, Kn = yn, Un = (t, e, s) => {
1515
1515
  "left",
1516
1516
  "left-start",
1517
1517
  "left-end"
1518
- ], ws = (t, e = { isOpen: !1 }) => {
1519
- const s = [];
1518
+ ], yo = (t, e = { isOpen: !1 }) => {
1519
+ const o = [];
1520
1520
  let n = null;
1521
1521
  const r = C.deriveProp(e.isOpen);
1522
1522
  function i(c) {
1523
1523
  n = c, r.set(!0);
1524
1524
  }
1525
- function o() {
1526
- r.set(!1), s.forEach((c) => c()), s.length = 0;
1525
+ function s() {
1526
+ r.set(!1), o.forEach((c) => c()), o.length = 0;
1527
1527
  }
1528
1528
  return Y(
1529
- t(i, o),
1529
+ t(i, s),
1530
1530
  he(
1531
1531
  r,
1532
1532
  () => Y(
@@ -1569,25 +1569,25 @@ const Bn = bn, _n = On, ne = vn, Kn = yn, Un = (t, e, s) => {
1569
1569
  ne()
1570
1570
  ];
1571
1571
  w != null && u != null && y.push(
1572
- Kn({
1572
+ Un({
1573
1573
  element: u,
1574
1574
  padding: d.get()
1575
1575
  })
1576
1576
  );
1577
- const R = await Un(l, a, {
1577
+ const R = await Kn(l, a, {
1578
1578
  placement: f.get(),
1579
1579
  strategy: "absolute",
1580
1580
  middleware: y
1581
- }), { x: A, y: k, middlewareData: S } = R;
1582
- if (a.style.top = `${k}px`, a.style.left = `${A}px`, u != null && S.arrow != null) {
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) {
1583
1583
  const {
1584
- x: K,
1584
+ x: U,
1585
1585
  y: g,
1586
1586
  centerOffset: x,
1587
1587
  alignmentOffset: O
1588
- } = S.arrow;
1588
+ } = P.arrow;
1589
1589
  m.set({
1590
- x: K,
1590
+ x: U,
1591
1591
  y: g,
1592
1592
  centerOffset: x,
1593
1593
  alignmentOffset: O,
@@ -1633,33 +1633,33 @@ const Bn = bn, _n = On, ne = vn, Kn = yn, Un = (t, e, s) => {
1633
1633
  }, jn = ({
1634
1634
  request: t,
1635
1635
  load: e,
1636
- convertError: s,
1636
+ convertError: o,
1637
1637
  onSuccess: n,
1638
1638
  onError: r,
1639
1639
  onSettled: i
1640
1640
  }) => {
1641
- let o;
1641
+ let s;
1642
1642
  const c = N(L.notAsked), a = c.map(
1643
1643
  (m) => L.isSuccess(m) ? m.value : void 0
1644
1644
  ), l = c.map(
1645
1645
  (m) => L.isFailure(m) ? m.error : void 0
1646
1646
  ), u = c.map((m) => L.isLoading(m)), h = () => {
1647
- o == null || o.abort(), o = void 0;
1647
+ s == null || s.abort(), s = void 0;
1648
1648
  }, p = (m) => {
1649
1649
  h(), c.set(m ?? L.notAsked);
1650
1650
  }, f = async (m) => {
1651
- h(), o = new AbortController();
1652
- const v = o.signal, b = c.get();
1651
+ h(), s = new AbortController();
1652
+ const v = s.signal, b = c.get();
1653
1653
  c.set(L.loading(L.getOrUndefined(b)));
1654
1654
  try {
1655
1655
  const y = await e({ request: m, abortSignal: v, previous: b });
1656
- await Promise.resolve(), o = void 0, c.set(L.success(y)), n == null || n(y, m);
1656
+ await Promise.resolve(), s = void 0, c.set(L.success(y)), n == null || n(y, m);
1657
1657
  } catch (y) {
1658
- o = void 0, c.set(L.failure(s(y))), r == null || r(s(y), m);
1658
+ s = void 0, c.set(L.failure(o(y))), r == null || r(o(y), m);
1659
1659
  }
1660
1660
  i == null || i(c.get(), m);
1661
1661
  }, d = () => f(C.get(t)), w = () => {
1662
- o == null || o.abort(), o = void 0, c.dispose();
1662
+ s == null || s.abort(), s = void 0, c.dispose();
1663
1663
  };
1664
1664
  return c.onDispose(C.on(t, f)), {
1665
1665
  status: c,
@@ -1671,47 +1671,47 @@ const Bn = bn, _n = On, ne = vn, Kn = yn, Un = (t, e, s) => {
1671
1671
  dispose: w
1672
1672
  };
1673
1673
  }, In = (t, e) => {
1674
- const { status: s, dispose: n, reload: r } = t, { pending: i, failure: o, success: c } = e;
1674
+ const { status: o, dispose: n, reload: r } = t, { pending: i, failure: s, success: c } = e;
1675
1675
  return Y(
1676
1676
  H(n),
1677
- pe(s, {
1677
+ pe(o, {
1678
1678
  loading: i != null ? (a) => i({ previous: a, reload: r, cancel: t.cancel }) : void 0,
1679
- failure: o != null ? (a) => o({ error: a, reload: r }) : void 0,
1679
+ failure: s != null ? (a) => s({ error: a, reload: r }) : void 0,
1680
1680
  success: (a) => c({ value: a, reload: r })
1681
1681
  })
1682
1682
  );
1683
- }, ys = ({
1683
+ }, vo = ({
1684
1684
  request: t,
1685
1685
  load: e,
1686
- convertError: s = (l) => l,
1686
+ convertError: o = (l) => l,
1687
1687
  onSuccess: n,
1688
1688
  onError: r,
1689
1689
  onSettled: i,
1690
- success: o,
1690
+ success: s,
1691
1691
  pending: c,
1692
1692
  failure: a
1693
1693
  }) => {
1694
1694
  const l = jn({
1695
1695
  request: t,
1696
1696
  load: e,
1697
- convertError: s,
1697
+ convertError: o,
1698
1698
  onSuccess: n,
1699
1699
  onError: r,
1700
1700
  onSettled: i
1701
1701
  });
1702
- return In(l, { success: o, pending: c, failure: a });
1702
+ return In(l, { success: s, pending: c, failure: a });
1703
1703
  }, Yn = (t, e) => {
1704
1704
  if (typeof e == "function")
1705
1705
  return Yn(t, { success: e });
1706
- const s = e.failure ?? ((r) => Y(
1706
+ const o = e.failure ?? ((r) => Y(
1707
1707
  H(r.on(console.error)),
1708
1708
  r.map((i) => `Error: ${i}`)
1709
1709
  )), n = e.success;
1710
1710
  return ue(C.toSignal(t), {
1711
1711
  Success: (r) => n(r.$.value),
1712
- Failure: (r) => s(r.$.error)
1712
+ Failure: (r) => o(r.$.error)
1713
1713
  });
1714
- }, vs = () => le.focus((t) => {
1714
+ }, xo = () => le.focus((t) => {
1715
1715
  var e;
1716
1716
  return (e = t.target) == null ? void 0 : e.select();
1717
1717
  });
@@ -1733,7 +1733,7 @@ class Rt {
1733
1733
  * console.log(rect.height); // 50
1734
1734
  * ```
1735
1735
  */
1736
- constructor(e, s, n, r, i, o) {
1736
+ constructor(e, o, n, r, i, s) {
1737
1737
  /**
1738
1738
  * Compares this rectangle with another rectangle for equality.
1739
1739
  *
@@ -1755,7 +1755,7 @@ class Rt {
1755
1755
  * ```
1756
1756
  */
1757
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));
1758
- this.left = e, this.top = s, this.width = n, this.height = r, this.localLeft = i, this.localTop = o;
1758
+ this.left = e, this.top = o, this.width = n, this.height = r, this.localLeft = i, this.localTop = s;
1759
1759
  }
1760
1760
  /**
1761
1761
  * Creates a new Rect instance using an object with optional properties.
@@ -1784,13 +1784,13 @@ class Rt {
1784
1784
  */
1785
1785
  static of({
1786
1786
  left: e = 0,
1787
- top: s = 0,
1787
+ top: o = 0,
1788
1788
  width: n = 0,
1789
1789
  height: r = 0,
1790
1790
  localLeft: i = 0,
1791
- localTop: o = 0
1791
+ localTop: s = 0
1792
1792
  }) {
1793
- return new Rt(e, s, n, r, i, o);
1793
+ return new Rt(e, o, n, r, i, s);
1794
1794
  }
1795
1795
  /**
1796
1796
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1903,7 +1903,7 @@ class Rt {
1903
1903
  return { width: this.width, height: this.height };
1904
1904
  }
1905
1905
  }
1906
- function se(t) {
1906
+ function oe(t) {
1907
1907
  const e = t.getBoundingClientRect();
1908
1908
  return Rt.of({
1909
1909
  top: e.top + window.scrollY,
@@ -1914,66 +1914,72 @@ function se(t) {
1914
1914
  localTop: t.offsetTop
1915
1915
  });
1916
1916
  }
1917
- const xs = (t) => Ne((e) => {
1918
- const { element: s } = e, n = N(se(s), (c, a) => c.equals(a)), r = $t(t(n))(e), i = () => n.set(Rt.of(se(s)));
1919
- let o = null;
1920
- return typeof ResizeObserver < "u" && (o = new ResizeObserver(i)), o == null || o.observe(s), H((c) => {
1921
- o == null || o.disconnect(), r(c);
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)));
1919
+ let s = null;
1920
+ return typeof ResizeObserver < "u" && (s = new ResizeObserver(i)), s == null || s.observe(o), H((c) => {
1921
+ s == null || s.disconnect(), r(c);
1922
1922
  });
1923
1923
  });
1924
- function oe(t) {
1924
+ function se(t) {
1925
1925
  return {
1926
1926
  /* c8 ignore next 6 */
1927
1927
  width: (t == null ? void 0 : t.innerWidth) ?? 0,
1928
1928
  height: (t == null ? void 0 : t.innerHeight) ?? 0
1929
1929
  };
1930
1930
  }
1931
- const bs = (t) => (e) => {
1932
- const s = ot(), n = N(
1933
- oe(s),
1934
- (o, c) => o.width === c.width && o.height === c.height
1935
- ), r = $t(t(n))(e), i = () => n.set(oe(s));
1936
- return s == null || s.addEventListener("resize", i), (o) => {
1937
- s == null || s.removeEventListener("resize", i), r(o);
1931
+ const Oo = (t) => (e) => {
1932
+ const o = st(), n = N(
1933
+ se(o),
1934
+ (s, c) => s.width === c.width && s.height === c.height
1935
+ ), r = $t(t(n))(e), i = () => n.set(se(o));
1936
+ return o == null || o.addEventListener("resize", i), (s) => {
1937
+ o == null || o.removeEventListener("resize", i), r(s);
1938
1938
  };
1939
1939
  }, qn = (t, e) => {
1940
- const s = e.split("/").filter((r) => r !== ""), n = {};
1941
- for (let r = 0; r < t.length; r++) {
1942
- const i = t[r], o = s[r];
1943
- if (!o && i.type !== "catch-all")
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")
1944
1950
  return null;
1945
- if (i.type === "literal") {
1946
- if (i.value !== o)
1951
+ if (s.type === "literal") {
1952
+ if (s.value !== c)
1947
1953
  return null;
1948
- } else if (i.type === "param")
1949
- n[i.name] = o;
1950
- else if (i.type === "catch-all") {
1951
- if (i.name) {
1952
- const c = s.slice(r).join("/");
1953
- 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);
1954
1960
  }
1955
- return { params: n, path: e };
1961
+ return { params: r, path: e };
1956
1962
  }
1957
1963
  }
1958
- return s.length !== t.length ? null : { params: n, path: e };
1964
+ return o.length !== t.length ? null : { params: r, path: e };
1959
1965
  }, Te = (t) => t.split("/").map((e) => {
1960
1966
  if (e.startsWith(":"))
1961
1967
  return { type: "param", name: e.slice(1) };
1962
1968
  if (e.startsWith("*")) {
1963
- const s = e.slice(1);
1964
- return s != "" ? { type: "catch-all", name: s } : { type: "catch-all" };
1969
+ const o = e.slice(1);
1970
+ return o != "" ? { type: "catch-all", name: o } : { type: "catch-all" };
1965
1971
  } else
1966
1972
  return { type: "literal", value: e };
1967
- }).filter((e) => e.type !== "literal" || e.value !== ""), Os = (t) => {
1968
- const e = t.map((s) => {
1969
- const n = Te(s);
1970
- return { route: s, segments: n };
1973
+ }).filter((e) => e.type !== "literal" || e.value !== ""), Ao = (t) => {
1974
+ const e = t.map((o) => {
1975
+ const n = Te(o);
1976
+ return { route: o, segments: n };
1971
1977
  });
1972
1978
  return function(n) {
1973
1979
  for (const { segments: r, route: i } of e) {
1974
- const o = qn(r, n);
1975
- if (o)
1976
- return { ...o, route: i };
1980
+ const s = qn(r, n);
1981
+ if (s)
1982
+ return { ...s, route: i };
1977
1983
  }
1978
1984
  return null;
1979
1985
  };
@@ -1986,11 +1992,11 @@ const bs = (t) => (e) => {
1986
1992
  dispose: () => t.dispose()
1987
1993
  };
1988
1994
  }
1989
- }, Xn = (t, e, s) => {
1990
- const n = s.split("/").filter((o) => o !== ""), r = {};
1995
+ }, Xn = (t, e, o) => {
1996
+ const n = o.split("/").filter((s) => s !== ""), r = {};
1991
1997
  let i = 0;
1992
- for (let o = 0; o < t.length; o++) {
1993
- const c = t[o], a = n[o];
1998
+ for (let s = 0; s < t.length; s++) {
1999
+ const c = t[s], a = n[s];
1994
2000
  if (!a && c.type !== "catch-all")
1995
2001
  return null;
1996
2002
  if (c.type === "literal") {
@@ -2011,48 +2017,48 @@ const bs = (t) => (e) => {
2011
2017
  }
2012
2018
  }
2013
2019
  if (n.length === t.length) {
2014
- const o = "/" + n.join("/");
2020
+ const s = "/" + n.join("/");
2015
2021
  return {
2016
2022
  params: r,
2017
- matchedPath: o === "/" ? "" : o,
2023
+ matchedPath: s === "/" ? "" : s,
2018
2024
  remainingPath: "",
2019
2025
  route: e
2020
2026
  };
2021
2027
  }
2022
2028
  return null;
2023
2029
  }, ke = (t) => {
2024
- const e = t.map((s) => {
2025
- const n = Te(s);
2026
- return { route: s, segments: n };
2030
+ const e = t.map((o) => {
2031
+ const n = Te(o);
2032
+ return { route: o, segments: n };
2027
2033
  });
2028
2034
  return function(n) {
2029
2035
  for (const { segments: r, route: i } of e) {
2030
- const o = Xn(r, i, n);
2031
- if (o)
2032
- return o;
2036
+ const s = Xn(r, i, n);
2037
+ if (s)
2038
+ return s;
2033
2039
  }
2034
2040
  return null;
2035
2041
  };
2036
- }, As = (t) => {
2042
+ }, Ro = (t) => {
2037
2043
  const e = ke(Object.keys(t));
2038
2044
  return He(
2039
2045
  Ft,
2040
2046
  {},
2041
- () => at(zt, (s) => at(Ft, (n) => {
2042
- const r = s.location.map((i) => {
2043
- const o = e(i.pathname);
2044
- if (o == null)
2047
+ () => at(zt, (o) => at(Ft, (n) => {
2048
+ const r = o.location.map((i) => {
2049
+ const s = e(i.pathname);
2050
+ if (s == null)
2045
2051
  throw console.error("No route found for", i), new Error("No route found");
2046
2052
  const c = {
2047
- matchedPath: o.matchedPath,
2048
- remainingPath: o.remainingPath,
2053
+ matchedPath: s.matchedPath,
2054
+ remainingPath: s.remainingPath,
2049
2055
  fullPath: i.pathname,
2050
- params: o.params
2056
+ params: s.params
2051
2057
  };
2052
2058
  return n.value = [...n.value, c], {
2053
- params: o.params,
2054
- route: o.route,
2055
- path: o.matchedPath || i.pathname,
2059
+ params: s.params,
2060
+ route: s.route,
2061
+ path: s.matchedPath || i.pathname,
2056
2062
  search: i.search,
2057
2063
  hash: i.hash
2058
2064
  };
@@ -2064,14 +2070,14 @@ const bs = (t) => (e) => {
2064
2070
  );
2065
2071
  }))
2066
2072
  );
2067
- }, Rs = (t) => {
2073
+ }, Lo = (t) => {
2068
2074
  const e = ke(Object.keys(t));
2069
- return at(Ft, (s) => at(zt, (n) => {
2070
- const r = s.map((i) => {
2071
- const o = i[i.length - 1], c = (o == null ? void 0 : o.remainingPath) || "";
2072
- if (c === "")
2073
- throw console.error("No remaining path for SubRouter", i), new Error("No remaining path for SubRouter");
2074
- const a = e(c);
2075
+ return at(Ft, (o) => at(zt, (n) => {
2076
+ const r = o.map((i) => {
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);
2075
2081
  if (a == null)
2076
2082
  throw console.error("No route found for remaining path", c), new Error("No route found");
2077
2083
  return {
@@ -2133,9 +2139,9 @@ const bs = (t) => (e) => {
2133
2139
  future: { singular: "in a year", plural: "in {} years" }
2134
2140
  }
2135
2141
  ];
2136
- function ce(t, e, s, n) {
2142
+ function ce(t, e, o, n) {
2137
2143
  const r = Math.round(t / e);
2138
- return r <= 1 ? s : n.replace(
2144
+ return r <= 1 ? o : n.replace(
2139
2145
  "{}",
2140
2146
  r.toLocaleString(void 0, {
2141
2147
  maximumFractionDigits: 0,
@@ -2144,86 +2150,86 @@ function ce(t, e, s, n) {
2144
2150
  );
2145
2151
  }
2146
2152
  const Gn = (t = 1e3) => {
2147
- const e = N(/* @__PURE__ */ new Date()), s = $e(() => e.set(/* @__PURE__ */ new Date()), t);
2148
- return e.onDispose(s), e;
2153
+ const e = N(/* @__PURE__ */ new Date()), o = $e(() => e.set(/* @__PURE__ */ new Date()), t);
2154
+ return e.onDispose(o), e;
2149
2155
  }, Zn = (t) => {
2150
2156
  const e = Math.abs(t);
2151
2157
  if (e < xt)
2152
2158
  return t < 0 ? "just now" : "in a moment";
2153
- for (const s of Jn)
2154
- if (e < s.max)
2155
- return t < 0 ? ce(e, s.value, s.past.singular, s.past.plural) : ce(e, s.value, s.future.singular, s.future.plural);
2159
+ for (const o of Jn)
2160
+ if (e < o.max)
2161
+ return t < 0 ? ce(e, o.value, o.past.singular, o.past.plural) : ce(e, o.value, o.future.singular, o.future.plural);
2156
2162
  throw new Error("unreachable");
2157
- }, ts = (t, { now: e, frequency: s = 1e4 } = {}) => {
2158
- const n = e != null ? ae.is(e) ? e.derive() : N(e) : Gn(s), r = Ht(
2163
+ }, to = (t, { now: e, frequency: o = 1e4 } = {}) => {
2164
+ const n = e != null ? ae.is(e) ? e.derive() : N(e) : Gn(o), r = Ht(
2159
2165
  t,
2160
2166
  n
2161
- )((i, o) => i.getTime() - o.getTime());
2167
+ )((i, s) => i.getTime() - s.getTime());
2162
2168
  return r.onDispose(() => C.dispose(n)), r;
2163
- }, es = (t, e = {}) => {
2164
- const s = ts(t, e), n = s.map(Zn);
2165
- return n.onDispose(s.dispose), n;
2166
- }, Ls = (t, e = {}) => es(t, e);
2167
- class ns extends Ve {
2169
+ }, eo = (t, e = {}) => {
2170
+ const o = to(t, e), n = o.map(Zn);
2171
+ return n.onDispose(o.dispose), n;
2172
+ }, Po = (t, e = {}) => eo(t, e);
2173
+ class no extends Ve {
2168
2174
  constructor() {
2169
2175
  super(...arguments);
2170
2176
  /**
2171
2177
  * Triggers an update of the Ticker by incrementing its internal value.
2172
2178
  * @returns void
2173
2179
  */
2174
- Lt(this, "tick", () => this.update((s) => s + 1));
2180
+ Lt(this, "tick", () => this.update((o) => o + 1));
2175
2181
  }
2176
2182
  }
2177
- const Ss = (t = 0) => new ns(t, (e, s) => e === s);
2183
+ const Eo = (t = 0) => new no(t, (e, o) => e === o);
2178
2184
  export {
2179
2185
  tn as Anchor,
2180
- is as Appearance,
2186
+ io as Appearance,
2181
2187
  pe as AsyncResultView,
2182
- cs as AutoFocus,
2183
- as as AutoSelect,
2184
- Rs as ChildRouter,
2185
- xs as ElementRect,
2186
- fs as HTMLTitle,
2187
- us as HiddenWhenEmpty,
2188
- on as InViewport,
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,
2189
2195
  zt as Location,
2190
- gs as Mutation,
2196
+ po as Mutation,
2191
2197
  ln as MutationDisplay,
2192
2198
  rn as OnClickOutside,
2193
- ds as OnEnterKey,
2194
- ms as OnEscapeKey,
2199
+ mo as OnEnterKey,
2200
+ go as OnEscapeKey,
2195
2201
  we as OnKeyPressed,
2196
- ws as PopOver,
2197
- ys as Query,
2202
+ yo as PopOver,
2203
+ vo as Query,
2198
2204
  In as QueryDisplay,
2199
2205
  Rt as Rect,
2200
2206
  Yn as ResultView,
2201
- As as RootRouter,
2207
+ Ro as RootRouter,
2202
2208
  Ft as RouterContextProvider,
2203
- vs as SelectOnFocus,
2204
- ns as Ticker,
2205
- hs as WhenInViewport,
2206
- bs as WindowSize,
2209
+ xo as SelectOnFocus,
2210
+ no as Ticker,
2211
+ ho as WhenInViewport,
2212
+ Oo as WindowSize,
2207
2213
  Be as _checkExtensionCondition,
2208
2214
  ze as _getExtension,
2209
- Os as _makeRouteMatcher,
2215
+ Ao as _makeRouteMatcher,
2210
2216
  Te as _parseRouteSegments,
2211
- ps as allPlacements,
2212
- Ue as areLocationsEqual,
2213
- ls as classes,
2217
+ wo as allPlacements,
2218
+ Ke as areLocationsEqual,
2219
+ lo as classes,
2214
2220
  Qt as evaluateLocationMatch,
2215
- se as getAbsoluteRect,
2216
- Ke as handleAnchorClick,
2221
+ oe as getAbsoluteRect,
2222
+ Ue as handleAnchorClick,
2217
2223
  Tt as locationFromURL,
2218
2224
  an as makeMutationResource,
2219
2225
  jn as makeQueryResource,
2220
2226
  cn as matchesKeyCombo,
2221
2227
  qn as matchesRoute,
2222
2228
  Gn as nowSignal,
2223
- Ls as relativeTime,
2224
- ts as relativeTimeMillisSignal,
2225
- es as relativeTimeSignal,
2226
- Ss as ticker,
2229
+ Po as relativeTime,
2230
+ to as relativeTimeMillisSignal,
2231
+ eo as relativeTimeSignal,
2232
+ Eo as ticker,
2227
2233
  Zn as timeDiffToString,
2228
2234
  et as urlFromLocation,
2229
2235
  en as useAppearance