@tempots/ui 0.22.0 → 0.22.1-next.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,29 +1,29 @@
1
- import { makeProviderMark as Pt, makeProp as k, Fragment as X, OnUnmount as q, WithProvider as Dt, UseProvider as Wt, renderableOfTNode as it, Signal as Mt, html as Ft, on as Nt, Value as rt, attr as Vt, Empty as ht, OneOfType as $t, makeSignal as ie, Portal as zt, isSSR as re, OnMount as Ht, When as Ut, OneOfTuple as se, makeComputedOf as ce, Prop as le } from "@tempots/dom";
2
- const ae = (t) => {
1
+ import { makeProviderMark as Mt, Fragment as X, OnBrowserCtx as pt, Async as Ot, OnHeadlessCtx as ie, UseProvider as Nt, makeProp as W, renderableOfTNode as rt, getWindow as gt, Signal as Vt, html as $t, on as Ht, Value as it, attr as zt, WithProvider as se, OnDispose as yt, Empty as ht, OneOfType as Bt, makeSignal as ce, OnElement as q, Portal as Ut, When as It, OneOfTuple as le, makeComputedOf as ae, Prop as ue } from "@tempots/dom";
2
+ const fe = (t) => {
3
3
  const e = t.split("/").pop();
4
4
  if (e == null || e.startsWith(".")) return;
5
5
  const n = e.split(".") || [];
6
6
  return n.length > 1 ? "." + n.pop() : void 0;
7
- }, ue = (t, e) => {
8
- const n = ae(e);
7
+ }, he = (t, e) => {
8
+ const n = fe(e);
9
9
  return n != null && (t.length === 0 || !t.some((o) => n == o));
10
- }, fe = (t, e, n, o) => {
11
- let i = t.target;
12
- for (; i != null && !(i instanceof HTMLAnchorElement); )
13
- i = i.parentElement;
14
- if (i == null)
10
+ }, me = (t, e, n, o) => {
11
+ let r = t.target;
12
+ for (; r != null && !(r instanceof HTMLAnchorElement); )
13
+ r = r.parentElement;
14
+ if (r == null)
15
15
  return !0;
16
- const r = i;
17
- if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
16
+ const i = r;
17
+ if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
18
18
  return !0;
19
- const { pathname: s, search: c, hash: a } = r;
19
+ const { pathname: s, search: c, hash: a } = i;
20
20
  if (o) {
21
- const l = s + c + a, u = r.getAttribute("href");
21
+ const l = s + c + a, u = i.getAttribute("href");
22
22
  if (!(u != null && u.startsWith("#")) && u !== l)
23
23
  return !0;
24
24
  }
25
- return e ? !1 : ue(n, s);
26
- }, he = (t, e = {
25
+ return e ? !1 : he(n, s);
26
+ }, de = (t, e = {
27
27
  ignoreUrlWithExtension: !0,
28
28
  allowedExtensions: [],
29
29
  ignoreExternalUrl: !0
@@ -32,119 +32,92 @@ const ae = (t) => {
32
32
  (o) => o.startsWith(".") ? o : "." + o
33
33
  ) : [];
34
34
  return (o) => {
35
- fe(
35
+ me(
36
36
  o,
37
37
  e.ignoreUrlWithExtension ?? !0,
38
38
  n,
39
39
  e.ignoreExternalUrl ?? !0
40
40
  ) || t() && o.preventDefault();
41
41
  };
42
- }, _t = Pt("LocationProvider"), de = () => {
43
- const t = (window == null ? void 0 : window.location.hash) === "" ? void 0 : (window == null ? void 0 : window.location.hash.substring(1)) ?? void 0;
44
- return {
45
- pathname: (window == null ? void 0 : window.location.pathname) ?? "",
46
- search: Object.fromEntries(
47
- new URLSearchParams((window == null ? void 0 : window.location.search) ?? "").entries()
48
- ),
49
- hash: t
42
+ }, pe = Mt("LocationProvider"), hn = (t) => X(
43
+ pt((e) => Ot(
44
+ import("./browser-location-12vUH3Kv.js").then((n) => n.ProvideBrowserLocation),
45
+ (n) => n(t)
46
+ )(e)),
47
+ ie((e) => Ot(
48
+ import("./headless-location-Ba_ht5ZQ.js").then((n) => n.ProvideHeadlessLocation),
49
+ (n) => n(e.container.currentURL, t)
50
+ )(e))
51
+ ), _t = (t) => Nt(pe, (e) => (n) => {
52
+ const o = W(e.value, e.equals);
53
+ e.feedProp(o), o.on(e.set);
54
+ const r = rt(t(o))(n);
55
+ return (i) => {
56
+ o.dispose(), r(i);
50
57
  };
51
- }, me = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, pe = (t) => {
52
- const e = new URL(t, (window == null ? void 0 : window.location.toString()) ?? ""), n = Object.fromEntries(e.searchParams.entries());
53
- let o = e.hash;
54
- return o.startsWith("#") && (o = o.substring(1)), {
55
- pathname: e.pathname,
56
- search: n,
57
- hash: o === "" ? void 0 : o
58
+ }), mn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, ge = (t, e) => {
59
+ var i;
60
+ const n = new URL(t, e ?? ((i = gt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
61
+ let r = n.hash;
62
+ return r.startsWith("#") && (r = r.substring(1)), {
63
+ pathname: n.pathname,
64
+ search: o,
65
+ hash: r === "" ? void 0 : r
58
66
  };
59
- }, ge = (t, e) => {
60
- const n = pe(e);
67
+ }, ye = (t, e) => {
68
+ const n = ge(e);
61
69
  return t.set(n), t;
62
- }, we = (t) => {
70
+ }, dn = (t) => {
63
71
  const n = new URLSearchParams(t.search).toString(), o = t.hash;
64
72
  return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
65
- }, ye = () => {
66
- const t = k(de(), me), e = () => {
67
- let n = (window == null ? void 0 : window.location.hash) ?? "";
68
- n.startsWith("#") && (n = n.substring(1));
69
- const o = {
70
- pathname: (window == null ? void 0 : window.location.pathname) ?? "",
71
- search: Object.fromEntries(
72
- new URLSearchParams((window == null ? void 0 : window.location.search) ?? "").entries()
73
- ),
74
- hash: n === "" ? void 0 : n
75
- };
76
- t.set(o);
77
- };
78
- return window == null || window.addEventListener("popstate", e), t.onDispose(() => {
79
- window == null || window.removeEventListener("popstate", e);
80
- }), t.on((n) => {
81
- window == null || window.history.pushState({}, "", we(n));
82
- }), t;
83
- }, dn = (t) => {
84
- const e = ye();
85
- return X(
86
- q(e.dispose),
87
- Dt(_t, e, t)
88
- );
89
- }, Bt = (t) => Wt(_t, (e) => (n) => {
90
- const o = k(e.value, e.equals);
91
- e.feedProp(o), o.on(e.set);
92
- const i = it(t(o))(n);
93
- return (r) => {
94
- o.dispose(), i(r);
95
- };
96
- }), ve = (t, ...e) => {
97
- if (typeof t == "string" || Mt.is(t))
98
- return ve({ href: t }, ...e);
73
+ }, we = (t, ...e) => {
74
+ if (typeof t == "string" || Vt.is(t))
75
+ return we({ href: t }, ...e);
99
76
  const { href: n, ...o } = t;
100
- return Bt((i) => Ft.a(
101
- Nt.click(
102
- he(() => (ge(i, rt.get(n)), !0), o)
77
+ return _t((r) => $t.a(
78
+ Ht.click(
79
+ de(() => (ye(r, it.get(n)), !0), o)
103
80
  ),
104
- Vt.href(n),
81
+ zt.href(n),
105
82
  ...e
106
83
  ));
107
- }, It = Pt("Appearance"), mn = (t) => {
108
- const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, n = k(e ? "dark" : "light"), o = (r) => {
109
- n.set(r.matches ? "dark" : "light");
110
- }, i = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
111
- return i == null || i.addEventListener("change", o), X(
112
- Dt(It, n, t),
113
- q(() => i == null ? void 0 : i.removeEventListener("change", o))
84
+ }, jt = Mt("Appearance"), pn = (t) => {
85
+ const e = gt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = W(n ? "dark" : "light"), r = (s) => {
86
+ o.set(s.matches ? "dark" : "light");
87
+ }, i = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0;
88
+ return i == null || i.addEventListener("change", r), X(
89
+ se(jt, o, t),
90
+ yt(() => i == null ? void 0 : i.removeEventListener("change", r))
114
91
  );
115
- }, pn = (t) => Wt(It, t), xe = (t, e) => {
92
+ }, gn = (t) => Nt(jt, t), xe = (t, e) => {
116
93
  if (typeof e == "function")
117
94
  return xe(t, { success: e });
118
95
  const n = e.failure ?? ((s) => X(
119
- q(s.on(console.error)),
96
+ yt(s.on(console.error)),
120
97
  s.map((c) => `Error: ${c}`)
121
- )), o = e.success, i = e.loading ?? (() => ht), r = e.notAsked ?? (() => ht);
122
- return $t(rt.toSignal(t), {
98
+ )), o = e.success, r = e.loading ?? (() => ht), i = e.notAsked ?? (() => ht);
99
+ return Bt(it.toSignal(t), {
123
100
  AsyncSuccess: (s) => o(s.$.value),
124
101
  AsyncFailure: (s) => n(s.$.error),
125
- Loading: (s) => i(s.$.previousValue ?? ie(void 0)),
126
- NotAsked: r
102
+ Loading: (s) => r(s.$.previousValue ?? ce(void 0)),
103
+ NotAsked: i
127
104
  });
128
- }, gn = (t = 10) => (e) => {
105
+ }, yn = (t = 10) => q((e) => {
129
106
  const n = setTimeout(() => {
130
- var o;
131
- (o = e.element) == null || o.focus();
107
+ e == null || e.focus();
132
108
  }, t);
133
- return (o) => clearTimeout(n);
134
- }, wn = (t = 10) => (e) => {
109
+ return () => clearTimeout(n);
110
+ }), wn = (t = 10) => q((e) => {
135
111
  const n = setTimeout(() => {
136
- var o;
137
- (o = e.element) == null || o.select();
112
+ e == null || e.select();
138
113
  }, t);
139
- return (o) => {
140
- clearTimeout(n);
141
- };
142
- }, yn = (t) => {
143
- const e = t.element, n = e.style.getPropertyValue(":empty");
144
- return e.style.setProperty(":empty", "display:none"), (o) => {
145
- o && e.style.setProperty(":empty", n);
114
+ return () => clearTimeout(n);
115
+ }), xn = q((t) => {
116
+ const e = t.style.getPropertyValue(":empty");
117
+ return t.style.setProperty(":empty", "display:none"), (n) => {
118
+ n && t.style.setProperty(":empty", e);
146
119
  };
147
- }, vn = (t) => zt("head > title", Vt.innerText(t)), be = {
120
+ }), vn = (t) => Ut("head > title", zt.innerText(t)), ve = {
148
121
  partial: {
149
122
  root: null,
150
123
  rootMargin: "0px",
@@ -158,100 +131,99 @@ const ae = (t) => {
158
131
  }, Q = {
159
132
  partial: /* @__PURE__ */ new Map(),
160
133
  full: /* @__PURE__ */ new Map()
161
- }, I = {
134
+ }, _ = {
162
135
  partial: null,
163
136
  full: null
164
137
  };
165
- function Ae(t) {
166
- return I[t] == null && (I[t] = new IntersectionObserver((e) => {
138
+ function be(t) {
139
+ return _[t] == null && (_[t] = new IntersectionObserver((e) => {
167
140
  e.forEach((n) => {
168
141
  const o = Q[t].get(n.target);
169
142
  o == null || o.set(n.isIntersecting);
170
143
  });
171
- }, be[t])), I[t];
144
+ }, ve[t])), _[t];
172
145
  }
173
- const Ee = (t, e) => {
174
- const n = k(re());
146
+ const Ae = (t, e) => {
147
+ const n = W(!1);
175
148
  return X(
176
- Ht((o) => {
177
- const i = typeof IntersectionObserver < "u" ? Ae(t) : null;
178
- return Q[t].set(o, n), i == null || i.observe(o), () => {
179
- var r;
180
- i == null || i.unobserve(o), Q[t].delete(o), Q[t].size === 0 && ((r = I[t]) == null || r.disconnect(), I[t] = null);
149
+ q((o) => {
150
+ const r = typeof IntersectionObserver < "u" ? be(t) : null;
151
+ return Q[t].set(o, n), r == null || r.observe(o), () => {
152
+ var i;
153
+ n.dispose(), r == null || r.unobserve(o), Q[t].delete(o), Q[t].size === 0 && ((i = _[t]) == null || i.disconnect(), _[t] = null);
181
154
  };
182
155
  }),
183
- q(n.dispose),
184
- it(e(n))
156
+ rt(e(n))
185
157
  );
186
- }, xn = (t, e, n) => Ee(t, (o) => Ut(o, e, n ?? ht)), Z = Math.min, W = Math.max, tt = Math.round, G = Math.floor, C = (t) => ({
158
+ }, bn = (t, e, n) => Ae(t, (o) => It(o, e, n ?? ht)), Z = Math.min, D = Math.max, tt = Math.round, G = Math.floor, C = (t) => ({
187
159
  x: t,
188
160
  y: t
189
- }), Re = {
161
+ }), Ee = {
190
162
  left: "right",
191
163
  right: "left",
192
164
  bottom: "top",
193
165
  top: "bottom"
194
- }, Le = {
166
+ }, Re = {
195
167
  start: "end",
196
168
  end: "start"
197
169
  };
198
- function At(t, e, n) {
199
- return W(t, Z(e, n));
170
+ function Lt(t, e, n) {
171
+ return D(t, Z(e, n));
200
172
  }
201
173
  function st(t, e) {
202
174
  return typeof t == "function" ? t(e) : t;
203
175
  }
204
- function M(t) {
176
+ function F(t) {
205
177
  return t.split("-")[0];
206
178
  }
207
179
  function ct(t) {
208
180
  return t.split("-")[1];
209
181
  }
210
- function jt(t) {
182
+ function Yt(t) {
211
183
  return t === "x" ? "y" : "x";
212
184
  }
213
- function Yt(t) {
185
+ function Xt(t) {
214
186
  return t === "y" ? "height" : "width";
215
187
  }
216
- function z(t) {
217
- return ["top", "bottom"].includes(M(t)) ? "y" : "x";
188
+ function H(t) {
189
+ return ["top", "bottom"].includes(F(t)) ? "y" : "x";
218
190
  }
219
- function Xt(t) {
220
- return jt(z(t));
191
+ function qt(t) {
192
+ return Yt(H(t));
221
193
  }
222
194
  function Oe(t, e, n) {
223
195
  n === void 0 && (n = !1);
224
- const o = ct(t), i = Xt(t), r = Yt(i);
225
- let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
226
- return e.reference[r] > e.floating[r] && (s = et(s)), [s, et(s)];
196
+ const o = ct(t), r = qt(t), i = Xt(r);
197
+ let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
198
+ return e.reference[i] > e.floating[i] && (s = et(s)), [s, et(s)];
227
199
  }
228
- function Se(t) {
200
+ function Le(t) {
229
201
  const e = et(t);
230
- return [dt(t), e, dt(e)];
202
+ return [mt(t), e, mt(e)];
231
203
  }
232
- function dt(t) {
233
- return t.replace(/start|end/g, (e) => Le[e]);
204
+ function mt(t) {
205
+ return t.replace(/start|end/g, (e) => Re[e]);
234
206
  }
235
207
  function Te(t, e, n) {
236
- const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
208
+ const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
237
209
  switch (t) {
238
210
  case "top":
239
211
  case "bottom":
240
- return n ? e ? i : o : e ? o : i;
212
+ return n ? e ? r : o : e ? o : r;
241
213
  case "left":
242
214
  case "right":
243
- return e ? r : s;
215
+ return e ? i : s;
244
216
  default:
245
217
  return [];
246
218
  }
247
219
  }
248
- function ke(t, e, n, o) {
249
- const i = ct(t);
250
- let r = Te(M(t), n === "start", o);
251
- return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(dt)))), r;
220
+ function Se(t, e, n, o) {
221
+ const r = ct(t);
222
+ let i = Te(F(t), n === "start", o);
223
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(mt)))), i;
252
224
  }
253
225
  function et(t) {
254
- return t.replace(/left|right|bottom|top/g, (e) => Re[e]);
226
+ return t.replace(/left|right|bottom|top/g, (e) => Ee[e]);
255
227
  }
256
228
  function Ce(t) {
257
229
  return {
@@ -262,7 +234,7 @@ function Ce(t) {
262
234
  ...t
263
235
  };
264
236
  }
265
- function Pe(t) {
237
+ function ke(t) {
266
238
  return typeof t != "number" ? Ce(t) : {
267
239
  top: t,
268
240
  right: t,
@@ -275,31 +247,31 @@ function nt(t) {
275
247
  x: e,
276
248
  y: n,
277
249
  width: o,
278
- height: i
250
+ height: r
279
251
  } = t;
280
252
  return {
281
253
  width: o,
282
- height: i,
254
+ height: r,
283
255
  top: n,
284
256
  left: e,
285
257
  right: e + o,
286
- bottom: n + i,
258
+ bottom: n + r,
287
259
  x: e,
288
260
  y: n
289
261
  };
290
262
  }
291
- function Et(t, e, n) {
263
+ function Tt(t, e, n) {
292
264
  let {
293
265
  reference: o,
294
- floating: i
266
+ floating: r
295
267
  } = t;
296
- const r = z(e), s = Xt(e), c = Yt(s), a = M(e), l = r === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
268
+ const i = H(e), s = qt(e), c = Xt(s), a = F(e), l = i === "y", u = o.x + o.width / 2 - r.width / 2, f = o.y + o.height / 2 - r.height / 2, d = o[c] / 2 - r[c] / 2;
297
269
  let h;
298
270
  switch (a) {
299
271
  case "top":
300
272
  h = {
301
273
  x: u,
302
- y: o.y - i.height
274
+ y: o.y - r.height
303
275
  };
304
276
  break;
305
277
  case "bottom":
@@ -316,7 +288,7 @@ function Et(t, e, n) {
316
288
  break;
317
289
  case "left":
318
290
  h = {
319
- x: o.x - i.width,
291
+ x: o.x - r.width,
320
292
  y: f
321
293
  };
322
294
  break;
@@ -328,44 +300,44 @@ function Et(t, e, n) {
328
300
  }
329
301
  switch (ct(e)) {
330
302
  case "start":
331
- h[s] -= m * (n && l ? -1 : 1);
303
+ h[s] -= d * (n && l ? -1 : 1);
332
304
  break;
333
305
  case "end":
334
- h[s] += m * (n && l ? -1 : 1);
306
+ h[s] += d * (n && l ? -1 : 1);
335
307
  break;
336
308
  }
337
309
  return h;
338
310
  }
339
- const De = async (t, e, n) => {
311
+ const Pe = async (t, e, n) => {
340
312
  const {
341
313
  placement: o = "bottom",
342
- strategy: i = "absolute",
343
- middleware: r = [],
314
+ strategy: r = "absolute",
315
+ middleware: i = [],
344
316
  platform: s
345
- } = n, c = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
317
+ } = n, c = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
346
318
  let l = await s.getElementRects({
347
319
  reference: t,
348
320
  floating: e,
349
- strategy: i
321
+ strategy: r
350
322
  }), {
351
323
  x: u,
352
324
  y: f
353
- } = Et(l, o, a), m = o, h = {}, p = 0;
325
+ } = Tt(l, o, a), d = o, h = {}, p = 0;
354
326
  for (let g = 0; g < c.length; g++) {
355
327
  const {
356
- name: w,
357
- fn: d
328
+ name: y,
329
+ fn: m
358
330
  } = c[g], {
359
- x: y,
360
- y: v,
331
+ x: w,
332
+ y: x,
361
333
  data: b,
362
- reset: x
363
- } = await d({
334
+ reset: v
335
+ } = await m({
364
336
  x: u,
365
337
  y: f,
366
338
  initialPlacement: o,
367
- placement: m,
368
- strategy: i,
339
+ placement: d,
340
+ strategy: r,
369
341
  middlewareData: h,
370
342
  rects: l,
371
343
  platform: s,
@@ -374,36 +346,36 @@ const De = async (t, e, n) => {
374
346
  floating: e
375
347
  }
376
348
  });
377
- u = y ?? u, f = v ?? f, h = {
349
+ u = w ?? u, f = x ?? f, h = {
378
350
  ...h,
379
- [w]: {
380
- ...h[w],
351
+ [y]: {
352
+ ...h[y],
381
353
  ...b
382
354
  }
383
- }, x && p <= 50 && (p++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (l = x.rects === !0 ? await s.getElementRects({
355
+ }, v && p <= 50 && (p++, typeof v == "object" && (v.placement && (d = v.placement), v.rects && (l = v.rects === !0 ? await s.getElementRects({
384
356
  reference: t,
385
357
  floating: e,
386
- strategy: i
387
- }) : x.rects), {
358
+ strategy: r
359
+ }) : v.rects), {
388
360
  x: u,
389
361
  y: f
390
- } = Et(l, m, a)), g = -1);
362
+ } = Tt(l, d, a)), g = -1);
391
363
  }
392
364
  return {
393
365
  x: u,
394
366
  y: f,
395
- placement: m,
396
- strategy: i,
367
+ placement: d,
368
+ strategy: r,
397
369
  middlewareData: h
398
370
  };
399
371
  };
400
- async function qt(t, e) {
372
+ async function Kt(t, e) {
401
373
  var n;
402
374
  e === void 0 && (e = {});
403
375
  const {
404
376
  x: o,
405
- y: i,
406
- platform: r,
377
+ y: r,
378
+ platform: i,
407
379
  rects: s,
408
380
  elements: c,
409
381
  strategy: a
@@ -411,46 +383,46 @@ async function qt(t, e) {
411
383
  boundary: l = "clippingAncestors",
412
384
  rootBoundary: u = "viewport",
413
385
  elementContext: f = "floating",
414
- altBoundary: m = !1,
386
+ altBoundary: d = !1,
415
387
  padding: h = 0
416
- } = st(e, t), p = Pe(h), w = c[m ? f === "floating" ? "reference" : "floating" : f], d = nt(await r.getClippingRect({
417
- element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
388
+ } = st(e, t), p = ke(h), y = c[d ? f === "floating" ? "reference" : "floating" : f], m = nt(await i.getClippingRect({
389
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
418
390
  boundary: l,
419
391
  rootBoundary: u,
420
392
  strategy: a
421
- })), y = f === "floating" ? {
393
+ })), w = f === "floating" ? {
422
394
  x: o,
423
- y: i,
395
+ y: r,
424
396
  width: s.floating.width,
425
397
  height: s.floating.height
426
- } : s.reference, v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(v)) ? await (r.getScale == null ? void 0 : r.getScale(v)) || {
398
+ } : s.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
427
399
  x: 1,
428
400
  y: 1
429
401
  } : {
430
402
  x: 1,
431
403
  y: 1
432
- }, x = nt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
404
+ }, v = nt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
433
405
  elements: c,
434
- rect: y,
435
- offsetParent: v,
406
+ rect: w,
407
+ offsetParent: x,
436
408
  strategy: a
437
- }) : y);
409
+ }) : w);
438
410
  return {
439
- top: (d.top - x.top + p.top) / b.y,
440
- bottom: (x.bottom - d.bottom + p.bottom) / b.y,
441
- left: (d.left - x.left + p.left) / b.x,
442
- right: (x.right - d.right + p.right) / b.x
411
+ top: (m.top - v.top + p.top) / b.y,
412
+ bottom: (v.bottom - m.bottom + p.bottom) / b.y,
413
+ left: (m.left - v.left + p.left) / b.x,
414
+ right: (v.right - m.right + p.right) / b.x
443
415
  };
444
416
  }
445
- const We = function(t) {
417
+ const De = function(t) {
446
418
  return t === void 0 && (t = {}), {
447
419
  name: "flip",
448
420
  options: t,
449
421
  async fn(e) {
450
422
  var n, o;
451
423
  const {
452
- placement: i,
453
- middlewareData: r,
424
+ placement: r,
425
+ middlewareData: i,
454
426
  rects: s,
455
427
  initialPlacement: c,
456
428
  platform: a,
@@ -458,63 +430,63 @@ const We = function(t) {
458
430
  } = e, {
459
431
  mainAxis: u = !0,
460
432
  crossAxis: f = !0,
461
- fallbackPlacements: m,
433
+ fallbackPlacements: d,
462
434
  fallbackStrategy: h = "bestFit",
463
435
  fallbackAxisSideDirection: p = "none",
464
436
  flipAlignment: g = !0,
465
- ...w
437
+ ...y
466
438
  } = st(t, e);
467
- if ((n = r.arrow) != null && n.alignmentOffset)
439
+ if ((n = i.arrow) != null && n.alignmentOffset)
468
440
  return {};
469
- const d = M(i), y = z(c), v = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x = m || (v || !g ? [et(c)] : Se(c)), N = p !== "none";
470
- !m && N && x.push(...ke(c, g, p, b));
471
- const ne = [c, ...x], ut = await qt(e, w), J = [];
472
- let _ = ((o = r.flip) == null ? void 0 : o.overflows) || [];
473
- if (u && J.push(ut[d]), f) {
474
- const D = Oe(i, s, b);
475
- J.push(ut[D[0]], ut[D[1]]);
441
+ const m = F(r), w = H(c), x = F(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [et(c)] : Le(c)), N = p !== "none";
442
+ !d && N && v.push(...Se(c, g, p, b));
443
+ const oe = [c, ...v], ut = await Kt(e, y), J = [];
444
+ let U = ((o = i.flip) == null ? void 0 : o.overflows) || [];
445
+ if (u && J.push(ut[m]), f) {
446
+ const P = Oe(r, s, b);
447
+ J.push(ut[P[0]], ut[P[1]]);
476
448
  }
477
- if (_ = [..._, {
478
- placement: i,
449
+ if (U = [...U, {
450
+ placement: r,
479
451
  overflows: J
480
- }], !J.every((D) => D <= 0)) {
481
- var yt, vt;
482
- const D = (((yt = r.flip) == null ? void 0 : yt.index) || 0) + 1, bt = ne[D];
483
- if (bt)
452
+ }], !J.every((P) => P <= 0)) {
453
+ var bt, At;
454
+ const P = (((bt = i.flip) == null ? void 0 : bt.index) || 0) + 1, Rt = oe[P];
455
+ if (Rt)
484
456
  return {
485
457
  data: {
486
- index: D,
487
- overflows: _
458
+ index: P,
459
+ overflows: U
488
460
  },
489
461
  reset: {
490
- placement: bt
462
+ placement: Rt
491
463
  }
492
464
  };
493
- let B = (vt = _.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : vt.placement;
494
- if (!B)
465
+ let I = (At = U.filter((V) => V.overflows[0] <= 0).sort((V, T) => V.overflows[1] - T.overflows[1])[0]) == null ? void 0 : At.placement;
466
+ if (!I)
495
467
  switch (h) {
496
468
  case "bestFit": {
497
- var xt;
498
- const V = (xt = _.filter((S) => {
469
+ var Et;
470
+ const V = (Et = U.filter((T) => {
499
471
  if (N) {
500
- const T = z(S.placement);
501
- return T === y || // Create a bias to the `y` side axis due to horizontal
472
+ const S = H(T.placement);
473
+ return S === w || // Create a bias to the `y` side axis due to horizontal
502
474
  // reading directions favoring greater width.
503
- T === "y";
475
+ S === "y";
504
476
  }
505
477
  return !0;
506
- }).map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T, oe) => T + oe, 0)]).sort((S, T) => S[1] - T[1])[0]) == null ? void 0 : xt[0];
507
- V && (B = V);
478
+ }).map((T) => [T.placement, T.overflows.filter((S) => S > 0).reduce((S, re) => S + re, 0)]).sort((T, S) => T[1] - S[1])[0]) == null ? void 0 : Et[0];
479
+ V && (I = V);
508
480
  break;
509
481
  }
510
482
  case "initialPlacement":
511
- B = c;
483
+ I = c;
512
484
  break;
513
485
  }
514
- if (i !== B)
486
+ if (r !== I)
515
487
  return {
516
488
  reset: {
517
- placement: B
489
+ placement: I
518
490
  }
519
491
  };
520
492
  }
@@ -522,14 +494,14 @@ const We = function(t) {
522
494
  }
523
495
  };
524
496
  };
525
- async function Me(t, e) {
497
+ async function We(t, e) {
526
498
  const {
527
499
  placement: n,
528
500
  platform: o,
529
- elements: i
530
- } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = M(n), c = ct(n), a = z(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = r && a ? -1 : 1, f = st(e, t);
501
+ elements: r
502
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = F(n), c = ct(n), a = H(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = i && a ? -1 : 1, f = st(e, t);
531
503
  let {
532
- mainAxis: m,
504
+ mainAxis: d,
533
505
  crossAxis: h,
534
506
  alignmentAxis: p
535
507
  } = typeof f == "number" ? {
@@ -544,9 +516,9 @@ async function Me(t, e) {
544
516
  };
545
517
  return c && typeof p == "number" && (h = c === "end" ? p * -1 : p), a ? {
546
518
  x: h * u,
547
- y: m * l
519
+ y: d * l
548
520
  } : {
549
- x: m * l,
521
+ x: d * l,
550
522
  y: h * u
551
523
  };
552
524
  }
@@ -557,14 +529,14 @@ const Fe = function(t) {
557
529
  async fn(e) {
558
530
  var n, o;
559
531
  const {
560
- x: i,
561
- y: r,
532
+ x: r,
533
+ y: i,
562
534
  placement: s,
563
535
  middlewareData: c
564
- } = e, a = await Me(e, t);
536
+ } = e, a = await We(e, t);
565
537
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
566
- x: i + a.x,
567
- y: r + a.y,
538
+ x: r + a.x,
539
+ y: i + a.y,
568
540
  data: {
569
541
  ...a,
570
542
  placement: s
@@ -572,7 +544,7 @@ const Fe = function(t) {
572
544
  };
573
545
  }
574
546
  };
575
- }, Ne = function(t) {
547
+ }, Me = function(t) {
576
548
  return t === void 0 && (t = {}), {
577
549
  name: "shift",
578
550
  options: t,
@@ -580,19 +552,19 @@ const Fe = function(t) {
580
552
  const {
581
553
  x: n,
582
554
  y: o,
583
- placement: i
555
+ placement: r
584
556
  } = e, {
585
- mainAxis: r = !0,
557
+ mainAxis: i = !0,
586
558
  crossAxis: s = !1,
587
559
  limiter: c = {
588
- fn: (w) => {
560
+ fn: (y) => {
589
561
  let {
590
- x: d,
591
- y
592
- } = w;
562
+ x: m,
563
+ y: w
564
+ } = y;
593
565
  return {
594
- x: d,
595
- y
566
+ x: m,
567
+ y: w
596
568
  };
597
569
  }
598
570
  },
@@ -600,19 +572,19 @@ const Fe = function(t) {
600
572
  } = st(t, e), l = {
601
573
  x: n,
602
574
  y: o
603
- }, u = await qt(e, a), f = z(M(i)), m = jt(f);
604
- let h = l[m], p = l[f];
605
- if (r) {
606
- const w = m === "y" ? "top" : "left", d = m === "y" ? "bottom" : "right", y = h + u[w], v = h - u[d];
607
- h = At(y, h, v);
575
+ }, u = await Kt(e, a), f = H(F(r)), d = Yt(f);
576
+ let h = l[d], p = l[f];
577
+ if (i) {
578
+ const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h + u[y], x = h - u[m];
579
+ h = Lt(w, h, x);
608
580
  }
609
581
  if (s) {
610
- const w = f === "y" ? "top" : "left", d = f === "y" ? "bottom" : "right", y = p + u[w], v = p - u[d];
611
- p = At(y, p, v);
582
+ const y = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", w = p + u[y], x = p - u[m];
583
+ p = Lt(w, p, x);
612
584
  }
613
585
  const g = c.fn({
614
586
  ...e,
615
- [m]: h,
587
+ [d]: h,
616
588
  [f]: p
617
589
  });
618
590
  return {
@@ -625,27 +597,27 @@ const Fe = function(t) {
625
597
  }
626
598
  };
627
599
  };
628
- function U(t) {
629
- return Kt(t) ? (t.nodeName || "").toLowerCase() : "#document";
600
+ function B(t) {
601
+ return Jt(t) ? (t.nodeName || "").toLowerCase() : "#document";
630
602
  }
631
603
  function A(t) {
632
604
  var e;
633
605
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
634
606
  }
635
- function O(t) {
607
+ function L(t) {
636
608
  var e;
637
- return (e = (Kt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
609
+ return (e = (Jt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
638
610
  }
639
- function Kt(t) {
611
+ function Jt(t) {
640
612
  return t instanceof Node || t instanceof A(t).Node;
641
613
  }
642
614
  function R(t) {
643
615
  return t instanceof Element || t instanceof A(t).Element;
644
616
  }
645
- function L(t) {
617
+ function O(t) {
646
618
  return t instanceof HTMLElement || t instanceof A(t).HTMLElement;
647
619
  }
648
- function Rt(t) {
620
+ function St(t) {
649
621
  return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
650
622
  }
651
623
  function K(t) {
@@ -653,12 +625,12 @@ function K(t) {
653
625
  overflow: e,
654
626
  overflowX: n,
655
627
  overflowY: o,
656
- display: i
628
+ display: r
657
629
  } = E(t);
658
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
630
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
659
631
  }
660
- function Ve(t) {
661
- return ["table", "td", "th"].includes(U(t));
632
+ function Ne(t) {
633
+ return ["table", "td", "th"].includes(B(t));
662
634
  }
663
635
  function lt(t) {
664
636
  return [":popover-open", ":modal"].some((e) => {
@@ -669,26 +641,26 @@ function lt(t) {
669
641
  }
670
642
  });
671
643
  }
672
- function pt(t) {
673
- const e = gt(), n = E(t);
644
+ function wt(t) {
645
+ const e = xt(), n = E(t);
674
646
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
675
647
  }
676
- function $e(t) {
677
- let e = P(t);
678
- for (; L(e) && !H(e); ) {
648
+ function Ve(t) {
649
+ let e = k(t);
650
+ for (; O(e) && !z(e); ) {
679
651
  if (lt(e))
680
652
  return null;
681
- if (pt(e))
653
+ if (wt(e))
682
654
  return e;
683
- e = P(e);
655
+ e = k(e);
684
656
  }
685
657
  return null;
686
658
  }
687
- function gt() {
659
+ function xt() {
688
660
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
689
661
  }
690
- function H(t) {
691
- return ["html", "body", "#document"].includes(U(t));
662
+ function z(t) {
663
+ return ["html", "body", "#document"].includes(B(t));
692
664
  }
693
665
  function E(t) {
694
666
  return A(t).getComputedStyle(t);
@@ -702,60 +674,60 @@ function at(t) {
702
674
  scrollTop: t.scrollY
703
675
  };
704
676
  }
705
- function P(t) {
706
- if (U(t) === "html")
677
+ function k(t) {
678
+ if (B(t) === "html")
707
679
  return t;
708
680
  const e = (
709
681
  // Step into the shadow DOM of the parent of a slotted node.
710
682
  t.assignedSlot || // DOM Element detected.
711
683
  t.parentNode || // ShadowRoot detected.
712
- Rt(t) && t.host || // Fallback.
713
- O(t)
684
+ St(t) && t.host || // Fallback.
685
+ L(t)
714
686
  );
715
- return Rt(e) ? e.host : e;
687
+ return St(e) ? e.host : e;
716
688
  }
717
- function Jt(t) {
718
- const e = P(t);
719
- return H(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && K(e) ? e : Jt(e);
689
+ function Gt(t) {
690
+ const e = k(t);
691
+ return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : O(e) && K(e) ? e : Gt(e);
720
692
  }
721
693
  function j(t, e, n) {
722
694
  var o;
723
695
  e === void 0 && (e = []), n === void 0 && (n = !0);
724
- const i = Jt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(i);
725
- return r ? e.concat(s, s.visualViewport || [], K(i) ? i : [], s.frameElement && n ? j(s.frameElement) : []) : e.concat(i, j(i, [], n));
696
+ const r = Gt(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
697
+ return i ? e.concat(s, s.visualViewport || [], K(r) ? r : [], s.frameElement && n ? j(s.frameElement) : []) : e.concat(r, j(r, [], n));
726
698
  }
727
- function Gt(t) {
699
+ function Qt(t) {
728
700
  const e = E(t);
729
701
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
730
- const i = L(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = tt(n) !== r || tt(o) !== s;
731
- return c && (n = r, o = s), {
702
+ const r = O(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = tt(n) !== i || tt(o) !== s;
703
+ return c && (n = i, o = s), {
732
704
  width: n,
733
705
  height: o,
734
706
  $: c
735
707
  };
736
708
  }
737
- function wt(t) {
709
+ function vt(t) {
738
710
  return R(t) ? t : t.contextElement;
739
711
  }
740
712
  function $(t) {
741
- const e = wt(t);
742
- if (!L(e))
713
+ const e = vt(t);
714
+ if (!O(e))
743
715
  return C(1);
744
716
  const n = e.getBoundingClientRect(), {
745
717
  width: o,
746
- height: i,
747
- $: r
748
- } = Gt(e);
749
- let s = (r ? tt(n.width) : n.width) / o, c = (r ? tt(n.height) : n.height) / i;
718
+ height: r,
719
+ $: i
720
+ } = Qt(e);
721
+ let s = (i ? tt(n.width) : n.width) / o, c = (i ? tt(n.height) : n.height) / r;
750
722
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
751
723
  x: s,
752
724
  y: c
753
725
  };
754
726
  }
755
- const ze = /* @__PURE__ */ C(0);
756
- function Qt(t) {
727
+ const $e = /* @__PURE__ */ C(0);
728
+ function Zt(t) {
757
729
  const e = A(t);
758
- return !gt() || !e.visualViewport ? ze : {
730
+ return !xt() || !e.visualViewport ? $e : {
759
731
  x: e.visualViewport.offsetLeft,
760
732
  y: e.visualViewport.offsetTop
761
733
  };
@@ -763,19 +735,19 @@ function Qt(t) {
763
735
  function He(t, e, n) {
764
736
  return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
765
737
  }
766
- function F(t, e, n, o) {
738
+ function M(t, e, n, o) {
767
739
  e === void 0 && (e = !1), n === void 0 && (n = !1);
768
- const i = t.getBoundingClientRect(), r = wt(t);
740
+ const r = t.getBoundingClientRect(), i = vt(t);
769
741
  let s = C(1);
770
742
  e && (o ? R(o) && (s = $(o)) : s = $(t));
771
- const c = He(r, n, o) ? Qt(r) : C(0);
772
- let a = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, u = i.width / s.x, f = i.height / s.y;
773
- if (r) {
774
- const m = A(r), h = o && R(o) ? A(o) : o;
775
- let p = m, g = p.frameElement;
743
+ const c = He(i, n, o) ? Zt(i) : C(0);
744
+ let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, u = r.width / s.x, f = r.height / s.y;
745
+ if (i) {
746
+ const d = A(i), h = o && R(o) ? A(o) : o;
747
+ let p = d, g = p.frameElement;
776
748
  for (; g && o && h !== p; ) {
777
- const w = $(g), d = g.getBoundingClientRect(), y = E(g), v = d.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, b = d.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
778
- a *= w.x, l *= w.y, u *= w.x, f *= w.y, a += v, l += b, p = A(g), g = p.frameElement;
749
+ const y = $(g), m = g.getBoundingClientRect(), w = E(g), x = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
750
+ a *= y.x, l *= y.y, u *= y.x, f *= y.y, a += x, l += b, p = A(g), g = p.frameElement;
779
751
  }
780
752
  }
781
753
  return nt({
@@ -785,24 +757,24 @@ function F(t, e, n, o) {
785
757
  y: l
786
758
  });
787
759
  }
788
- function Ue(t) {
760
+ function ze(t) {
789
761
  let {
790
762
  elements: e,
791
763
  rect: n,
792
764
  offsetParent: o,
793
- strategy: i
765
+ strategy: r
794
766
  } = t;
795
- const r = i === "fixed", s = O(o), c = e ? lt(e.floating) : !1;
796
- if (o === s || c && r)
767
+ const i = r === "fixed", s = L(o), c = e ? lt(e.floating) : !1;
768
+ if (o === s || c && i)
797
769
  return n;
798
770
  let a = {
799
771
  scrollLeft: 0,
800
772
  scrollTop: 0
801
773
  }, l = C(1);
802
- const u = C(0), f = L(o);
803
- if ((f || !f && !r) && ((U(o) !== "body" || K(s)) && (a = at(o)), L(o))) {
804
- const m = F(o);
805
- l = $(o), u.x = m.x + o.clientLeft, u.y = m.y + o.clientTop;
774
+ const u = C(0), f = O(o);
775
+ if ((f || !f && !i) && ((B(o) !== "body" || K(s)) && (a = at(o)), O(o))) {
776
+ const d = M(o);
777
+ l = $(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
806
778
  }
807
779
  return {
808
780
  width: n.width * l.x,
@@ -811,40 +783,40 @@ function Ue(t) {
811
783
  y: n.y * l.y - a.scrollTop * l.y + u.y
812
784
  };
813
785
  }
814
- function _e(t) {
786
+ function Be(t) {
815
787
  return Array.from(t.getClientRects());
816
788
  }
817
- function Zt(t) {
818
- return F(O(t)).left + at(t).scrollLeft;
789
+ function te(t) {
790
+ return M(L(t)).left + at(t).scrollLeft;
819
791
  }
820
- function Be(t) {
821
- const e = O(t), n = at(t), o = t.ownerDocument.body, i = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
822
- let s = -n.scrollLeft + Zt(t);
792
+ function Ue(t) {
793
+ const e = L(t), n = at(t), o = t.ownerDocument.body, r = D(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = D(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
794
+ let s = -n.scrollLeft + te(t);
823
795
  const c = -n.scrollTop;
824
- return E(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - i), {
825
- width: i,
826
- height: r,
796
+ return E(o).direction === "rtl" && (s += D(e.clientWidth, o.clientWidth) - r), {
797
+ width: r,
798
+ height: i,
827
799
  x: s,
828
800
  y: c
829
801
  };
830
802
  }
831
803
  function Ie(t, e) {
832
- const n = A(t), o = O(t), i = n.visualViewport;
833
- let r = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
834
- if (i) {
835
- r = i.width, s = i.height;
836
- const l = gt();
837
- (!l || l && e === "fixed") && (c = i.offsetLeft, a = i.offsetTop);
804
+ const n = A(t), o = L(t), r = n.visualViewport;
805
+ let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
806
+ if (r) {
807
+ i = r.width, s = r.height;
808
+ const l = xt();
809
+ (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
838
810
  }
839
811
  return {
840
- width: r,
812
+ width: i,
841
813
  height: s,
842
814
  x: c,
843
815
  y: a
844
816
  };
845
817
  }
846
- function je(t, e) {
847
- const n = F(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = L(t) ? $(t) : C(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, a = i * r.x, l = o * r.y;
818
+ function _e(t, e) {
819
+ const n = M(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = O(t) ? $(t) : C(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
848
820
  return {
849
821
  width: s,
850
822
  height: c,
@@ -852,52 +824,52 @@ function je(t, e) {
852
824
  y: l
853
825
  };
854
826
  }
855
- function Lt(t, e, n) {
827
+ function Ct(t, e, n) {
856
828
  let o;
857
829
  if (e === "viewport")
858
830
  o = Ie(t, n);
859
831
  else if (e === "document")
860
- o = Be(O(t));
832
+ o = Ue(L(t));
861
833
  else if (R(e))
862
- o = je(e, n);
834
+ o = _e(e, n);
863
835
  else {
864
- const i = Qt(t);
836
+ const r = Zt(t);
865
837
  o = {
866
838
  ...e,
867
- x: e.x - i.x,
868
- y: e.y - i.y
839
+ x: e.x - r.x,
840
+ y: e.y - r.y
869
841
  };
870
842
  }
871
843
  return nt(o);
872
844
  }
873
- function te(t, e) {
874
- const n = P(t);
875
- return n === e || !R(n) || H(n) ? !1 : E(n).position === "fixed" || te(n, e);
845
+ function ee(t, e) {
846
+ const n = k(t);
847
+ return n === e || !R(n) || z(n) ? !1 : E(n).position === "fixed" || ee(n, e);
876
848
  }
877
- function Ye(t, e) {
849
+ function je(t, e) {
878
850
  const n = e.get(t);
879
851
  if (n)
880
852
  return n;
881
- let o = j(t, [], !1).filter((c) => R(c) && U(c) !== "body"), i = null;
882
- const r = E(t).position === "fixed";
883
- let s = r ? P(t) : t;
884
- for (; R(s) && !H(s); ) {
885
- const c = E(s), a = pt(s);
886
- !a && c.position === "fixed" && (i = null), (r ? !a && !i : !a && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || K(s) && !a && te(t, s)) ? o = o.filter((u) => u !== s) : i = c, s = P(s);
853
+ let o = j(t, [], !1).filter((c) => R(c) && B(c) !== "body"), r = null;
854
+ const i = E(t).position === "fixed";
855
+ let s = i ? k(t) : t;
856
+ for (; R(s) && !z(s); ) {
857
+ const c = E(s), a = wt(s);
858
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || K(s) && !a && ee(t, s)) ? o = o.filter((u) => u !== s) : r = c, s = k(s);
887
859
  }
888
860
  return e.set(t, o), o;
889
861
  }
890
- function Xe(t) {
862
+ function Ye(t) {
891
863
  let {
892
864
  element: e,
893
865
  boundary: n,
894
866
  rootBoundary: o,
895
- strategy: i
867
+ strategy: r
896
868
  } = t;
897
- const s = [...n === "clippingAncestors" ? lt(e) ? [] : Ye(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, u) => {
898
- const f = Lt(e, u, i);
899
- return l.top = W(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = W(f.left, l.left), l;
900
- }, Lt(e, c, i));
869
+ const s = [...n === "clippingAncestors" ? lt(e) ? [] : je(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, u) => {
870
+ const f = Ct(e, u, r);
871
+ return l.top = D(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = D(f.left, l.left), l;
872
+ }, Ct(e, c, r));
901
873
  return {
902
874
  width: a.right - a.left,
903
875
  height: a.bottom - a.top,
@@ -905,28 +877,28 @@ function Xe(t) {
905
877
  y: a.top
906
878
  };
907
879
  }
908
- function qe(t) {
880
+ function Xe(t) {
909
881
  const {
910
882
  width: e,
911
883
  height: n
912
- } = Gt(t);
884
+ } = Qt(t);
913
885
  return {
914
886
  width: e,
915
887
  height: n
916
888
  };
917
889
  }
918
- function Ke(t, e, n) {
919
- const o = L(e), i = O(e), r = n === "fixed", s = F(t, !0, r, e);
890
+ function qe(t, e, n) {
891
+ const o = O(e), r = L(e), i = n === "fixed", s = M(t, !0, i, e);
920
892
  let c = {
921
893
  scrollLeft: 0,
922
894
  scrollTop: 0
923
895
  };
924
896
  const a = C(0);
925
- if (o || !o && !r)
926
- if ((U(e) !== "body" || K(i)) && (c = at(e)), o) {
927
- const f = F(e, !0, r, e);
897
+ if (o || !o && !i)
898
+ if ((B(e) !== "body" || K(r)) && (c = at(e)), o) {
899
+ const f = M(e, !0, i, e);
928
900
  a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
929
- } else i && (a.x = Zt(i));
901
+ } else r && (a.x = te(r));
930
902
  const l = s.left + c.scrollLeft - a.x, u = s.top + c.scrollTop - a.y;
931
903
  return {
932
904
  x: l,
@@ -938,31 +910,31 @@ function Ke(t, e, n) {
938
910
  function ft(t) {
939
911
  return E(t).position === "static";
940
912
  }
941
- function Ot(t, e) {
942
- return !L(t) || E(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
913
+ function kt(t, e) {
914
+ return !O(t) || E(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
943
915
  }
944
- function ee(t, e) {
916
+ function ne(t, e) {
945
917
  const n = A(t);
946
918
  if (lt(t))
947
919
  return n;
948
- if (!L(t)) {
949
- let i = P(t);
950
- for (; i && !H(i); ) {
951
- if (R(i) && !ft(i))
952
- return i;
953
- i = P(i);
920
+ if (!O(t)) {
921
+ let r = k(t);
922
+ for (; r && !z(r); ) {
923
+ if (R(r) && !ft(r))
924
+ return r;
925
+ r = k(r);
954
926
  }
955
927
  return n;
956
928
  }
957
- let o = Ot(t, e);
958
- for (; o && Ve(o) && ft(o); )
959
- o = Ot(o, e);
960
- return o && H(o) && ft(o) && !pt(o) ? n : o || $e(t) || n;
929
+ let o = kt(t, e);
930
+ for (; o && Ne(o) && ft(o); )
931
+ o = kt(o, e);
932
+ return o && z(o) && ft(o) && !wt(o) ? n : o || Ve(t) || n;
961
933
  }
962
- const Je = async function(t) {
963
- const e = this.getOffsetParent || ee, n = this.getDimensions, o = await n(t.floating);
934
+ const Ke = async function(t) {
935
+ const e = this.getOffsetParent || ne, n = this.getDimensions, o = await n(t.floating);
964
936
  return {
965
- reference: Ke(t.reference, await e(t.floating), t.strategy),
937
+ reference: qe(t.reference, await e(t.floating), t.strategy),
966
938
  floating: {
967
939
  x: 0,
968
940
  y: 0,
@@ -971,138 +943,138 @@ const Je = async function(t) {
971
943
  }
972
944
  };
973
945
  };
974
- function Ge(t) {
946
+ function Je(t) {
975
947
  return E(t).direction === "rtl";
976
948
  }
977
- const Qe = {
978
- convertOffsetParentRelativeRectToViewportRelativeRect: Ue,
979
- getDocumentElement: O,
980
- getClippingRect: Xe,
981
- getOffsetParent: ee,
982
- getElementRects: Je,
983
- getClientRects: _e,
984
- getDimensions: qe,
949
+ const Ge = {
950
+ convertOffsetParentRelativeRectToViewportRelativeRect: ze,
951
+ getDocumentElement: L,
952
+ getClippingRect: Ye,
953
+ getOffsetParent: ne,
954
+ getElementRects: Ke,
955
+ getClientRects: Be,
956
+ getDimensions: Xe,
985
957
  getScale: $,
986
958
  isElement: R,
987
- isRTL: Ge
959
+ isRTL: Je
988
960
  };
989
- function Ze(t, e) {
961
+ function Qe(t, e) {
990
962
  let n = null, o;
991
- const i = O(t);
992
- function r() {
963
+ const r = L(t);
964
+ function i() {
993
965
  var c;
994
966
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
995
967
  }
996
968
  function s(c, a) {
997
- c === void 0 && (c = !1), a === void 0 && (a = 1), r();
969
+ c === void 0 && (c = !1), a === void 0 && (a = 1), i();
998
970
  const {
999
971
  left: l,
1000
972
  top: u,
1001
973
  width: f,
1002
- height: m
974
+ height: d
1003
975
  } = t.getBoundingClientRect();
1004
- if (c || e(), !f || !m)
976
+ if (c || e(), !f || !d)
1005
977
  return;
1006
- const h = G(u), p = G(i.clientWidth - (l + f)), g = G(i.clientHeight - (u + m)), w = G(l), y = {
1007
- rootMargin: -h + "px " + -p + "px " + -g + "px " + -w + "px",
1008
- threshold: W(0, Z(1, a)) || 1
978
+ const h = G(u), p = G(r.clientWidth - (l + f)), g = G(r.clientHeight - (u + d)), y = G(l), w = {
979
+ rootMargin: -h + "px " + -p + "px " + -g + "px " + -y + "px",
980
+ threshold: D(0, Z(1, a)) || 1
1009
981
  };
1010
- let v = !0;
1011
- function b(x) {
1012
- const N = x[0].intersectionRatio;
982
+ let x = !0;
983
+ function b(v) {
984
+ const N = v[0].intersectionRatio;
1013
985
  if (N !== a) {
1014
- if (!v)
986
+ if (!x)
1015
987
  return s();
1016
988
  N ? s(!1, N) : o = setTimeout(() => {
1017
989
  s(!1, 1e-7);
1018
990
  }, 1e3);
1019
991
  }
1020
- v = !1;
992
+ x = !1;
1021
993
  }
1022
994
  try {
1023
995
  n = new IntersectionObserver(b, {
1024
- ...y,
996
+ ...w,
1025
997
  // Handle <iframe>s
1026
- root: i.ownerDocument
998
+ root: r.ownerDocument
1027
999
  });
1028
1000
  } catch {
1029
- n = new IntersectionObserver(b, y);
1001
+ n = new IntersectionObserver(b, w);
1030
1002
  }
1031
1003
  n.observe(t);
1032
1004
  }
1033
- return s(!0), r;
1005
+ return s(!0), i;
1034
1006
  }
1035
- function tn(t, e, n, o) {
1007
+ function Ze(t, e, n, o) {
1036
1008
  o === void 0 && (o = {});
1037
1009
  const {
1038
- ancestorScroll: i = !0,
1039
- ancestorResize: r = !0,
1010
+ ancestorScroll: r = !0,
1011
+ ancestorResize: i = !0,
1040
1012
  elementResize: s = typeof ResizeObserver == "function",
1041
1013
  layoutShift: c = typeof IntersectionObserver == "function",
1042
1014
  animationFrame: a = !1
1043
- } = o, l = wt(t), u = i || r ? [...l ? j(l) : [], ...j(e)] : [];
1044
- u.forEach((d) => {
1045
- i && d.addEventListener("scroll", n, {
1015
+ } = o, l = vt(t), u = r || i ? [...l ? j(l) : [], ...j(e)] : [];
1016
+ u.forEach((m) => {
1017
+ r && m.addEventListener("scroll", n, {
1046
1018
  passive: !0
1047
- }), r && d.addEventListener("resize", n);
1019
+ }), i && m.addEventListener("resize", n);
1048
1020
  });
1049
- const f = l && c ? Ze(l, n) : null;
1050
- let m = -1, h = null;
1051
- s && (h = new ResizeObserver((d) => {
1052
- let [y] = d;
1053
- y && y.target === l && h && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1054
- var v;
1055
- (v = h) == null || v.observe(e);
1021
+ const f = l && c ? Qe(l, n) : null;
1022
+ let d = -1, h = null;
1023
+ s && (h = new ResizeObserver((m) => {
1024
+ let [w] = m;
1025
+ w && w.target === l && h && (h.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1026
+ var x;
1027
+ (x = h) == null || x.observe(e);
1056
1028
  })), n();
1057
1029
  }), l && !a && h.observe(l), h.observe(e));
1058
- let p, g = a ? F(t) : null;
1059
- a && w();
1060
- function w() {
1061
- const d = F(t);
1062
- g && (d.x !== g.x || d.y !== g.y || d.width !== g.width || d.height !== g.height) && n(), g = d, p = requestAnimationFrame(w);
1030
+ let p, g = a ? M(t) : null;
1031
+ a && y();
1032
+ function y() {
1033
+ const m = M(t);
1034
+ g && (m.x !== g.x || m.y !== g.y || m.width !== g.width || m.height !== g.height) && n(), g = m, p = requestAnimationFrame(y);
1063
1035
  }
1064
1036
  return n(), () => {
1065
- var d;
1066
- u.forEach((y) => {
1067
- i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
1068
- }), f == null || f(), (d = h) == null || d.disconnect(), h = null, a && cancelAnimationFrame(p);
1037
+ var m;
1038
+ u.forEach((w) => {
1039
+ r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
1040
+ }), f == null || f(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
1069
1041
  };
1070
1042
  }
1071
- const en = Fe, nn = Ne, St = We, on = (t, e, n) => {
1072
- const o = /* @__PURE__ */ new Map(), i = {
1073
- platform: Qe,
1043
+ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1044
+ const o = /* @__PURE__ */ new Map(), r = {
1045
+ platform: Ge,
1074
1046
  ...n
1075
- }, r = {
1076
- ...i.platform,
1047
+ }, i = {
1048
+ ...r.platform,
1077
1049
  _c: o
1078
1050
  };
1079
- return De(t, e, {
1080
- ...i,
1081
- platform: r
1051
+ return Pe(t, e, {
1052
+ ...r,
1053
+ platform: i
1082
1054
  });
1083
- }, bn = ({
1055
+ }, An = ({
1084
1056
  content: t,
1085
1057
  open: e,
1086
1058
  placement: n,
1087
- offset: { mainAxis: o, crossAxis: i } = { mainAxis: 0, crossAxis: 0 }
1088
- }) => (r) => {
1089
- const s = r.element, c = rt.toSignal(e);
1090
- return Ut(
1091
- c,
1092
- zt(
1059
+ offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
1060
+ }) => pt((i) => {
1061
+ const s = it.toSignal(e), c = i.element;
1062
+ return It(
1063
+ s,
1064
+ Ut(
1093
1065
  "body",
1094
- Ft.div(
1095
- Ht((a) => {
1066
+ $t.div(
1067
+ q((a) => {
1096
1068
  const l = a;
1097
- return l.style.position = "absolute", tn(s, l, () => {
1098
- on(s, l, {
1069
+ return l.style.position = "absolute", Ze(c, l, () => {
1070
+ nn(c, l, {
1099
1071
  placement: n,
1100
1072
  strategy: "absolute",
1101
1073
  middleware: [
1102
- St(),
1103
- en({ mainAxis: o, crossAxis: i }),
1104
- nn(),
1105
- St()
1074
+ Pt(),
1075
+ tn({ mainAxis: o, crossAxis: r }),
1076
+ en(),
1077
+ Pt()
1106
1078
  ]
1107
1079
  }).then(({ x: u, y: f }) => {
1108
1080
  l.style.top = `${f}px`, l.style.left = `${u}px`;
@@ -1112,92 +1084,95 @@ const en = Fe, nn = Ne, St = We, on = (t, e, n) => {
1112
1084
  t()
1113
1085
  )
1114
1086
  )
1115
- )(r);
1116
- }, rn = (t, e) => {
1087
+ )(i);
1088
+ }), on = (t, e) => {
1117
1089
  if (typeof e == "function")
1118
- return rn(t, { success: e });
1119
- const n = e.failure ?? ((i) => X(
1120
- q(i.on(console.error)),
1121
- i.map((r) => `Error: ${r}`)
1090
+ return on(t, { success: e });
1091
+ const n = e.failure ?? ((r) => X(
1092
+ yt(r.on(console.error)),
1093
+ r.map((i) => `Error: ${i}`)
1122
1094
  )), o = e.success;
1123
- return $t(rt.toSignal(t), {
1124
- Success: (i) => o(i.$.value),
1125
- Failure: (i) => n(i.$.error)
1095
+ return Bt(it.toSignal(t), {
1096
+ Success: (r) => o(r.$.value),
1097
+ Failure: (r) => n(r.$.error)
1126
1098
  });
1127
- }, An = () => Nt.focus((t) => {
1099
+ }, En = () => Ht.focus((t) => {
1128
1100
  var e;
1129
1101
  return (e = t.target) == null ? void 0 : e.select();
1130
- }), En = (t) => (e) => {
1131
- const n = e.element, o = k({ width: n.clientWidth, height: n.clientHeight }), i = it(t(o))(e), r = () => {
1102
+ }), Rn = (t) => pt((e) => {
1103
+ const { element: n } = e, o = W({
1104
+ width: n.clientWidth,
1105
+ height: n.clientHeight
1106
+ }), r = rt(t(o))(e), i = () => {
1132
1107
  o.set({ width: n.clientWidth, height: n.clientHeight });
1133
1108
  };
1134
1109
  let s;
1135
- return typeof ResizeObserver == "function" && (s = new ResizeObserver(r), s.observe(n)), (c) => {
1136
- s == null || s.disconnect(), i(c);
1110
+ return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), (c) => {
1111
+ s == null || s.disconnect(), r(c);
1137
1112
  };
1138
- }, Rn = (t) => (e) => {
1139
- const n = k({
1140
- width: (window == null ? void 0 : window.innerWidth) ?? 0,
1141
- height: (window == null ? void 0 : window.innerHeight) ?? 0
1142
- }), o = it(t(n))(e), i = () => {
1143
- n.set({
1144
- width: (window == null ? void 0 : window.innerWidth) ?? 0,
1145
- height: (window == null ? void 0 : window.innerHeight) ?? 0
1113
+ }), On = (t) => (e) => {
1114
+ const n = gt(), o = W({
1115
+ width: (n == null ? void 0 : n.innerWidth) ?? 0,
1116
+ height: (n == null ? void 0 : n.innerHeight) ?? 0
1117
+ }), r = rt(t(o))(e), i = () => {
1118
+ o.set({
1119
+ width: (n == null ? void 0 : n.innerWidth) ?? 0,
1120
+ height: (n == null ? void 0 : n.innerHeight) ?? 0
1146
1121
  });
1147
1122
  };
1148
- return window == null || window.addEventListener("resize", i), (r) => {
1149
- window == null || window.removeEventListener("resize", i), o(r);
1123
+ return n == null || n.addEventListener("resize", i), (s) => {
1124
+ n == null || n.removeEventListener("resize", i), r(s);
1150
1125
  };
1151
- }, sn = (t, e) => {
1152
- const n = e.split("/").filter((i) => i !== ""), o = {};
1153
- for (let i = 0; i < t.length; i++) {
1154
- const r = t[i], s = n[i];
1155
- if (!s && r.type !== "catch-all")
1126
+ }, rn = (t, e) => {
1127
+ const n = e.split("/").filter((r) => r !== ""), o = {};
1128
+ for (let r = 0; r < t.length; r++) {
1129
+ const i = t[r], s = n[r];
1130
+ if (!s && i.type !== "catch-all")
1156
1131
  return null;
1157
- if (r.type === "literal") {
1158
- if (r.value !== s)
1132
+ if (i.type === "literal") {
1133
+ if (i.value !== s)
1159
1134
  return null;
1160
- } else if (r.type === "param")
1161
- o[r.name] = s;
1162
- else if (r.type === "catch-all")
1135
+ } else if (i.type === "param")
1136
+ o[i.name] = s;
1137
+ else if (i.type === "catch-all")
1163
1138
  return { params: o, path: e };
1164
1139
  }
1165
1140
  return n.length !== t.length ? null : { params: o, path: e };
1166
- }, cn = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), ln = (t) => {
1141
+ }, sn = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), cn = (t) => {
1167
1142
  const e = t.map((n) => {
1168
- const o = cn(n);
1143
+ const o = sn(n);
1169
1144
  return { route: n, segments: o };
1170
1145
  });
1171
1146
  return function(o) {
1172
- for (const { segments: i, route: r } of e) {
1173
- const s = sn(i, o);
1147
+ for (const { segments: r, route: i } of e) {
1148
+ const s = rn(r, o);
1174
1149
  if (s)
1175
- return { ...s, route: r };
1150
+ return { ...s, route: i };
1176
1151
  }
1177
1152
  return null;
1178
1153
  };
1179
1154
  }, Ln = (t) => {
1180
- const e = ln(Object.keys(t));
1181
- return Bt((n) => {
1182
- const o = n.map((i) => {
1183
- const r = e(i.pathname);
1184
- if (r == null)
1185
- throw console.error("No route found for", i), new Error("No route found");
1155
+ const e = cn(Object.keys(t));
1156
+ return _t((n) => {
1157
+ const o = n.map((r) => {
1158
+ const i = e(r.pathname);
1159
+ if (i == null)
1160
+ throw console.error("No route found for", r), new Error("No route found");
1186
1161
  return {
1187
- params: r.params,
1188
- route: r.route,
1189
- path: r.path,
1190
- search: i.search,
1191
- hash: i.hash
1162
+ params: i.params,
1163
+ route: i.route,
1164
+ path: i.path,
1165
+ search: r.search,
1166
+ hash: r.hash
1192
1167
  };
1193
1168
  });
1194
- return se(
1195
- o.map((i) => [i.route, i]),
1169
+ return le(
1170
+ o.map((r) => [r.route, r]),
1196
1171
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1197
1172
  t
1198
1173
  );
1199
1174
  });
1200
- }, ot = 60 * 1e3, mt = 60 * ot, Y = 24 * mt, Tt = 7 * Y, kt = 30 * Y, an = 365 * Y, un = [
1175
+ }, ot = 60 * 1e3, dt = 60 * ot, Y = 24 * dt, Dt = 7 * Y, Wt = 30 * Y, ln = 365 * Y, an = [
1201
1176
  {
1202
1177
  max: ot * 90,
1203
1178
  value: ot,
@@ -1206,8 +1181,8 @@ const en = Fe, nn = Ne, St = We, on = (t, e, n) => {
1206
1181
  future: { singular: "in a minute", plural: "in {} minutes" }
1207
1182
  },
1208
1183
  {
1209
- max: mt * 36,
1210
- value: mt,
1184
+ max: dt * 36,
1185
+ value: dt,
1211
1186
  name: "hour",
1212
1187
  past: { singular: "an hour ago", plural: "{} hours ago" },
1213
1188
  future: { singular: "in an hour", plural: "in {} hours" }
@@ -1220,91 +1195,89 @@ const en = Fe, nn = Ne, St = We, on = (t, e, n) => {
1220
1195
  future: { singular: "tomorrow", plural: "in {} days" }
1221
1196
  },
1222
1197
  {
1223
- max: Tt * 6,
1224
- value: Tt,
1198
+ max: Dt * 6,
1199
+ value: Dt,
1225
1200
  name: "week",
1226
1201
  past: { singular: "last week", plural: "{} weeks ago" },
1227
1202
  future: { singular: "in a week", plural: "in {} weeks" }
1228
1203
  },
1229
1204
  {
1230
- max: kt * 18,
1231
- value: kt,
1205
+ max: Wt * 18,
1206
+ value: Wt,
1232
1207
  name: "month",
1233
1208
  past: { singular: "last month", plural: "{} months ago" },
1234
1209
  future: { singular: "in a month", plural: "in {} months" }
1235
1210
  },
1236
1211
  {
1237
1212
  max: 1 / 0,
1238
- value: an,
1213
+ value: ln,
1239
1214
  name: "year",
1240
1215
  past: { singular: "last year", plural: "{} years ago" },
1241
1216
  future: { singular: "in a year", plural: "in {} years" }
1242
1217
  }
1243
1218
  ];
1244
- function Ct(t, e, n, o) {
1245
- const i = Math.round(t / e);
1246
- return i <= 1 ? n : o.replace(
1219
+ function Ft(t, e, n, o) {
1220
+ const r = Math.round(t / e);
1221
+ return r <= 1 ? n : o.replace(
1247
1222
  "{}",
1248
- i.toLocaleString(void 0, {
1223
+ r.toLocaleString(void 0, {
1249
1224
  maximumFractionDigits: 0,
1250
1225
  minimumFractionDigits: 0
1251
1226
  })
1252
1227
  );
1253
1228
  }
1254
- function fn(t) {
1229
+ function un(t) {
1255
1230
  const e = Math.abs(t);
1256
1231
  if (e < ot)
1257
1232
  return t < 0 ? "just now" : "in a moment";
1258
- for (const n of un)
1233
+ for (const n of an)
1259
1234
  if (e < n.max)
1260
- return t < 0 ? Ct(e, n.value, n.past.singular, n.past.plural) : Ct(e, n.value, n.future.singular, n.future.plural);
1235
+ return t < 0 ? Ft(e, n.value, n.past.singular, n.past.plural) : Ft(e, n.value, n.future.singular, n.future.plural);
1261
1236
  throw new Error("unreachable");
1262
1237
  }
1263
- const On = (t, e) => {
1264
- const n = e != null ? Mt.is(e) ? e.map((r) => r) : k(e) : k(/* @__PURE__ */ new Date()), o = ce(
1238
+ const Tn = (t, e) => {
1239
+ const n = e != null ? Vt.is(e) ? e.map((i) => i) : W(e) : W(/* @__PURE__ */ new Date()), o = ae(
1265
1240
  t,
1266
1241
  n
1267
- )((r, s) => {
1268
- const c = s.getTime() - r.getTime();
1269
- return fn(c);
1270
- }), i = le.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
1242
+ )((i, s) => {
1243
+ const c = i.getTime() - s.getTime();
1244
+ return un(c);
1245
+ }), r = ue.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
1271
1246
  return o.onDispose(() => {
1272
- i != null && clearInterval(i), n.dispose();
1247
+ r != null && clearInterval(r), n.dispose();
1273
1248
  }), o;
1274
1249
  };
1275
1250
  export {
1276
- ve as Anchor,
1251
+ we as Anchor,
1277
1252
  xe as AsyncResultView,
1278
- gn as AutoFocus,
1253
+ yn as AutoFocus,
1279
1254
  wn as AutoSelect,
1280
- En as ElementSize,
1255
+ Rn as ElementSize,
1281
1256
  vn as HTMLTitle,
1282
- yn as HiddenWhenEmpty,
1283
- Ee as InViewport,
1284
- _t as LocationProviderMarker,
1285
- bn as PopOver,
1286
- mn as ProvideAppearance,
1287
- dn as ProvideLocation,
1288
- rn as ResultView,
1257
+ xn as HiddenWhenEmpty,
1258
+ Ae as InViewport,
1259
+ pe as LocationProviderMarker,
1260
+ An as PopOver,
1261
+ pn as ProvideAppearance,
1262
+ hn as ProvideLocation,
1263
+ on as ResultView,
1289
1264
  Ln as Router,
1290
- An as SelectOnFocus,
1291
- pn as UseAppearance,
1292
- Bt as UseLocation,
1293
- xn as WhenInViewport,
1294
- Rn as WindowSize,
1295
- ue as _checkExtensionCondition,
1296
- ae as _getExtension,
1297
- de as _makeLocation,
1298
- ye as _makeLocationProp,
1299
- ln as _makeRouteMatcher,
1300
- cn as _parseRouteSegments,
1301
- It as appearanceMarker,
1302
- me as areLocationsEqual,
1303
- he as handleAnchorClick,
1304
- pe as locationFromURL,
1305
- On as makeRelativeTime,
1306
- sn as matchesRoute,
1307
- ge as setLocationFromUrl,
1308
- fn as timeDiffToString,
1309
- we as urlFromLocation
1265
+ En as SelectOnFocus,
1266
+ gn as UseAppearance,
1267
+ _t as UseLocation,
1268
+ bn as WhenInViewport,
1269
+ On as WindowSize,
1270
+ he as _checkExtensionCondition,
1271
+ fe as _getExtension,
1272
+ cn as _makeRouteMatcher,
1273
+ sn as _parseRouteSegments,
1274
+ jt as appearanceMarker,
1275
+ mn as areLocationsEqual,
1276
+ de as handleAnchorClick,
1277
+ ge as locationFromURL,
1278
+ Tn as makeRelativeTime,
1279
+ rn as matchesRoute,
1280
+ ye as setLocationFromUrl,
1281
+ un as timeDiffToString,
1282
+ dn as urlFromLocation
1310
1283
  };