@tempots/ui 10.0.0 → 10.1.0

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