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