@tempots/ui 5.0.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,33 +1,33 @@
1
- var ye = Object.defineProperty;
2
- var xe = (t, e, o) => e in t ? ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var bt = (t, e, o) => xe(t, typeof e != "symbol" ? e + "" : e, o);
4
- import { getWindow as rt, prop as N, makeProviderMark as qt, Signal as Xt, Use as Kt, html as Rt, on as Jt, Value as E, attr as Gt, Empty as Ot, OneOfType as Qt, WithElement as q, OnDispose as z, Portal as Zt, Fragment as ot, renderableOfTNode as kt, When as te, effectOf as ve, computedOf as ee, WithBrowserCtx as be, OneOfTuple as Ae, Prop as Re } from "@tempots/dom";
5
- import { delayed as ne, AsyncResult as H, nearEqual as ut, interval as Oe } from "@tempots/std";
6
- const Ee = (t) => {
1
+ var be = Object.defineProperty;
2
+ var Ae = (t, e, o) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var At = (t, e, o) => Ae(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { getWindow as ct, prop as H, makeProviderMark as Xt, Signal as Jt, Use as Gt, html as Rt, on as Qt, Value as E, attr as Zt, Empty as Et, OneOfType as te, WithElement as $, OnDispose as F, Portal as ee, Fragment as st, renderableOfTNode as Dt, When as ne, effectOf as Oe, computedOf as oe, WithBrowserCtx as Re, OneOfTuple as Ee, Prop as Le } from "@tempots/dom";
5
+ import { delayed as se, AsyncResult as U, nearEqual as ft, interval as Se } from "@tempots/std";
6
+ const Te = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
9
9
  const o = e.split(".") || [];
10
10
  return o.length > 1 ? "." + o.pop() : void 0;
11
- }, Le = (t, e) => {
12
- const o = Ee(e);
11
+ }, Pe = (t, e) => {
12
+ const o = Te(e);
13
13
  return o != null && (t.length === 0 || !t.some((n) => o == n));
14
- }, Se = (t, e, o, n) => {
14
+ }, ke = (t, e, o, n) => {
15
15
  let s = t.target;
16
16
  for (; s != null && !(s instanceof HTMLAnchorElement); )
17
17
  s = s.parentElement;
18
18
  if (s == null)
19
19
  return !0;
20
- const i = s;
21
- if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
20
+ const r = s;
21
+ if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
22
22
  return !0;
23
- const { pathname: r, search: c, hash: l } = i;
23
+ const { pathname: i, search: c, hash: l } = r;
24
24
  if (n) {
25
- const a = r + c + l, h = i.getAttribute("href");
25
+ const a = i + c + l, h = r.getAttribute("href");
26
26
  if (!(h != null && h.startsWith("#")) && h !== a)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : Le(o, r);
30
- }, Te = (t, e = {
29
+ return e ? !1 : Pe(o, i);
30
+ }, De = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
@@ -36,41 +36,41 @@ const Ee = (t) => {
36
36
  (n) => n.startsWith(".") ? n : "." + n
37
37
  ) : [];
38
38
  return (n) => {
39
- Se(
39
+ ke(
40
40
  n,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
42
  o,
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && n.preventDefault();
45
45
  };
46
- }, Pe = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, oe = (t, e) => {
47
- var i;
48
- const o = new URL(t, e ?? ((i = rt()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(o.searchParams.entries());
46
+ }, Ce = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, re = (t, e) => {
47
+ var r;
48
+ const o = new URL(t, e ?? ((r = ct()) == null ? void 0 : r.location.toString())), n = Object.fromEntries(o.searchParams.entries());
49
49
  let s = o.hash;
50
50
  return s.startsWith("#") && (s = s.substring(1)), {
51
51
  pathname: o.pathname,
52
52
  search: n,
53
53
  hash: s === "" ? void 0 : s
54
54
  };
55
- }, Nt = (t, e) => {
56
- const o = oe(e);
55
+ }, $t = (t, e) => {
56
+ const o = re(e);
57
57
  return t.set(o), t;
58
- }, Et = (t) => {
58
+ }, Lt = (t) => {
59
59
  const o = new URLSearchParams(t.search).toString(), n = t.hash;
60
60
  return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
61
- }, ke = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ce = (t) => {
61
+ }, We = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Fe = (t) => {
62
62
  const e = t.container.currentURL, o = e.iso(
63
- (n) => oe(n),
63
+ (n) => re(n),
64
64
  (n) => {
65
- if (ke(n.pathname))
66
- return Et(n);
67
- const s = new URL(n.pathname, e.value), i = s.origin + s.pathname;
68
- return Et({ ...n, pathname: i });
65
+ if (We(n.pathname))
66
+ return Lt(n);
67
+ const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
68
+ return Lt({ ...n, pathname: r });
69
69
  }
70
70
  );
71
71
  return { value: o, dispose: o.dispose };
72
- }, De = () => {
73
- const t = rt(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
72
+ }, Me = () => {
73
+ const t = ct(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
74
74
  return {
75
75
  pathname: (t == null ? void 0 : t.location.pathname) ?? "",
76
76
  search: Object.fromEntries(
@@ -78,8 +78,8 @@ const Ee = (t) => {
78
78
  ),
79
79
  hash: e
80
80
  };
81
- }, We = () => {
82
- const t = N(De(), Pe), e = rt(), o = () => {
81
+ }, Ve = () => {
82
+ const t = H(Me(), Ce), e = ct(), o = () => {
83
83
  let n = (e == null ? void 0 : e.location.hash) ?? "";
84
84
  n.startsWith("#") && (n = n.substring(1));
85
85
  const s = {
@@ -94,72 +94,73 @@ const Ee = (t) => {
94
94
  return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
95
95
  e == null || e.removeEventListener("popstate", o);
96
96
  }), t.on((n) => {
97
- e == null || e.history.pushState({}, "", Et(n));
97
+ e == null || e.history.pushState({}, "", Lt(n));
98
98
  }), {
99
99
  value: t,
100
100
  dispose: t.dispose
101
101
  };
102
- }, se = {
103
- mark: qt("LocationProvider"),
102
+ }, ie = {
103
+ mark: Xt("LocationProvider"),
104
104
  create: (t, e) => {
105
105
  if (e.isBrowser())
106
- return We();
106
+ return Ve();
107
107
  if (e.isHeadless())
108
- return Ce(e);
108
+ return Fe(e);
109
109
  throw new Error("Unknown context");
110
110
  }
111
- }, Fe = (t) => {
111
+ }, Ne = (t) => {
112
112
  document.startViewTransition ? document.startViewTransition(t) : t();
113
- }, Me = (t, ...e) => {
114
- if (typeof t == "string" || Xt.is(t))
115
- return Me({ href: t }, ...e);
113
+ }, $e = (t, ...e) => {
114
+ if (typeof t == "string" || Jt.is(t))
115
+ return $e({ href: t }, ...e);
116
116
  const {
117
117
  href: o,
118
118
  withViewTransition: n,
119
119
  ...s
120
120
  } = t;
121
- return Kt(se, (i) => Rt.a(
122
- Jt.click(
123
- Te(() => (n == !0 ? Fe(() => {
124
- Nt(i, E.get(o));
125
- }) : Nt(i, E.get(o)), !0), s)
121
+ return Gt(ie, (r) => Rt.a(
122
+ Qt.click(
123
+ De(() => (n === !0 ? Ne(() => {
124
+ $t(r, E.get(o));
125
+ }) : $t(r, E.get(o)), !0), s)
126
126
  ),
127
- Gt.href(o),
127
+ Zt.href(o),
128
128
  ...e
129
+ /* c8 ignore next 2 */
129
130
  ));
130
- }, Hn = {
131
- mark: qt("Appearance"),
131
+ }, Kn = {
132
+ mark: Xt("Appearance"),
132
133
  create: () => {
133
- const t = Ve();
134
+ const t = He();
134
135
  return {
135
136
  value: t,
136
137
  dispose: t.dispose
137
138
  };
138
139
  }
139
140
  };
140
- function Ve() {
141
- const t = rt(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = N(o ? "dark" : "light"), s = (i) => n.set(i.matches ? "dark" : "light");
141
+ function He() {
142
+ const t = ct(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = H(o ? "dark" : "light"), s = (r) => n.set(r.matches ? "dark" : "light");
142
143
  return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
143
144
  }
144
- const ie = (t, e) => {
145
+ const ce = (t, e) => {
145
146
  if (typeof e == "function")
146
- return ie(t, { success: e });
147
- const o = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Ot), i = e.notAsked ?? (() => Ot);
148
- return Qt(E.toSignal(t), {
149
- AsyncSuccess: (r) => n(r.$.value),
150
- AsyncFailure: (r) => o(r.$.error),
151
- Loading: (r) => s(r.map((c) => c.previousValue)),
152
- NotAsked: i
147
+ return ce(t, { success: e });
148
+ const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Et), r = e.notAsked ?? (() => Et);
149
+ return te(E.toSignal(t), {
150
+ AsyncSuccess: (i) => n(i.$.value),
151
+ AsyncFailure: (i) => o(i.$.error),
152
+ Loading: (i) => s(i.map((c) => c.previousValue)),
153
+ NotAsked: r
153
154
  });
154
- }, Bn = (t = 10) => q((e) => z(ne(() => e == null ? void 0 : e.focus(), t))), Un = (t = 10) => q((e) => {
155
- const o = ne(() => e.select(), t);
156
- return z(o);
157
- }), zn = q((t) => {
155
+ }, _n = (t = 10) => $((e) => F(se(() => e == null ? void 0 : e.focus(), t))), In = (t = 10) => $((e) => {
156
+ const o = se(() => e.select(), t);
157
+ return F(o);
158
+ }), jn = $((t) => {
158
159
  const e = t.style.getPropertyValue(":empty");
159
- return t.style.setProperty(":empty", "display:none"), z((o) => {
160
+ return t.style.setProperty(":empty", "display:none"), F((o) => {
160
161
  o && t.style.setProperty(":empty", e);
161
162
  });
162
- }), _n = (t) => Zt("head > title", Gt.innerText(t)), Ne = {
163
+ }), Yn = (t) => ee("head > title", Zt.innerText(t)), Be = {
163
164
  partial: {
164
165
  root: null,
165
166
  rootMargin: "0px",
@@ -170,111 +171,154 @@ const ie = (t, e) => {
170
171
  rootMargin: "0px",
171
172
  threshold: 1
172
173
  }
173
- }, ht = {
174
+ }, dt = {
174
175
  partial: /* @__PURE__ */ new Map(),
175
176
  full: /* @__PURE__ */ new Map()
176
- }, nt = {
177
+ }, ot = {
177
178
  partial: null,
178
179
  full: null
179
180
  };
180
- function $e(t) {
181
- return nt[t] == null && (nt[t] = new IntersectionObserver((e) => {
181
+ function Ue(t) {
182
+ return ot[t] == null && (ot[t] = new IntersectionObserver((e) => {
182
183
  e.forEach((o) => {
183
- const n = ht[t].get(o.target);
184
+ const n = dt[t].get(o.target);
184
185
  n == null || n.set(o.isIntersecting);
185
186
  });
186
- }, Ne[t])), nt[t];
187
- }
188
- const He = ({ mode: t = "partial", once: e = !1 }, o) => {
189
- const n = N(!1);
190
- return ot(
191
- q((s) => {
192
- const i = typeof IntersectionObserver < "u" ? $e(t) : null;
193
- ht[t].set(s, n), i == null || i.observe(s);
194
- function r() {
187
+ }, Be[t])), ot[t];
188
+ }
189
+ const ze = ({ mode: t = "partial", once: e = !1 }, o) => {
190
+ const n = H(!1);
191
+ return st(
192
+ $((s) => {
193
+ const r = typeof IntersectionObserver < "u" ? Ue(t) : null;
194
+ dt[t].set(s, n), r == null || r.observe(s);
195
+ function i() {
195
196
  var l;
196
- i == null || i.unobserve(s), ht[t].delete(s), ht[t].size === 0 && ((l = nt[t]) == null || l.disconnect(), nt[t] = null);
197
+ r == null || r.unobserve(s), dt[t].delete(s), dt[t].size === 0 && ((l = ot[t]) == null || l.disconnect(), ot[t] = null);
197
198
  }
198
199
  let c = null;
199
200
  return e && (c = n.on((l) => {
200
- l && r();
201
- })), z(() => {
202
- n.dispose(), r(), c == null || c();
201
+ l && i();
202
+ })), F(() => {
203
+ n.dispose(), i(), c == null || c();
203
204
  });
204
205
  }),
205
- kt(o(n))
206
+ Dt(o(n))
206
207
  );
207
- }, In = (t, e, o) => He(t, (n) => te(n, e, o ?? (() => Ot))), Q = Math.min, X = Math.max, dt = Math.round, ft = Math.floor, D = (t) => ({
208
+ }, qn = (t, e, o) => ze(t, (n) => ne(n, e, o ?? (() => Et)));
209
+ function Xn(t) {
210
+ return $((e) => {
211
+ const o = (n) => {
212
+ e.contains(n.target) || t(n);
213
+ };
214
+ return document.addEventListener("click", o), F(() => {
215
+ document.removeEventListener("click", o);
216
+ });
217
+ });
218
+ }
219
+ const G = (t, e) => t === void 0 || t === e, Ht = (t, e) => t === void 0 || t === e;
220
+ function Ke(t, e) {
221
+ return typeof t == "string" ? e.key === t : Ht(t.key, e.key) && Ht(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(
222
+ t.commandOrControlKey,
223
+ e.metaKey || e.ctrlKey
224
+ );
225
+ }
226
+ function le({
227
+ allowedKeys: t,
228
+ handler: e
229
+ }) {
230
+ return $((o) => {
231
+ const n = (s) => {
232
+ if (o.contains(s.target)) {
233
+ for (const r of t)
234
+ if (Ke(r, s)) {
235
+ e(s);
236
+ break;
237
+ }
238
+ }
239
+ };
240
+ return document.addEventListener("keydown", n), F(() => {
241
+ document.removeEventListener("keydown", n);
242
+ });
243
+ });
244
+ }
245
+ function Jn(t) {
246
+ return le({ allowedKeys: ["Enter"], handler: t });
247
+ }
248
+ function Gn(t) {
249
+ return le({ allowedKeys: ["Escape"], handler: t });
250
+ }
251
+ const Z = Math.min, q = Math.max, mt = Math.round, ht = Math.floor, C = (t) => ({
208
252
  x: t,
209
253
  y: t
210
- }), Be = {
254
+ }), _e = {
211
255
  left: "right",
212
256
  right: "left",
213
257
  bottom: "top",
214
258
  top: "bottom"
215
- }, Ue = {
259
+ }, Ie = {
216
260
  start: "end",
217
261
  end: "start"
218
262
  };
219
- function Lt(t, e, o) {
220
- return X(t, Q(e, o));
263
+ function St(t, e, o) {
264
+ return q(t, Z(e, o));
221
265
  }
222
- function ct(t, e) {
266
+ function lt(t, e) {
223
267
  return typeof t == "function" ? t(e) : t;
224
268
  }
225
- function K(t) {
269
+ function X(t) {
226
270
  return t.split("-")[0];
227
271
  }
228
- function lt(t) {
272
+ function at(t) {
229
273
  return t.split("-")[1];
230
274
  }
231
- function re(t) {
275
+ function ae(t) {
232
276
  return t === "x" ? "y" : "x";
233
277
  }
234
278
  function Ct(t) {
235
279
  return t === "y" ? "height" : "width";
236
280
  }
237
- function B(t) {
238
- return ["top", "bottom"].includes(K(t)) ? "y" : "x";
281
+ function z(t) {
282
+ return ["top", "bottom"].includes(X(t)) ? "y" : "x";
239
283
  }
240
- function Dt(t) {
241
- return re(B(t));
284
+ function Wt(t) {
285
+ return ae(z(t));
242
286
  }
243
- function ze(t, e, o) {
287
+ function je(t, e, o) {
244
288
  o === void 0 && (o = !1);
245
- const n = lt(t), s = Dt(t), i = Ct(s);
246
- let r = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
247
- return e.reference[i] > e.floating[i] && (r = mt(r)), [r, mt(r)];
289
+ const n = at(t), s = Wt(t), r = Ct(s);
290
+ let i = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
291
+ return e.reference[r] > e.floating[r] && (i = gt(i)), [i, gt(i)];
248
292
  }
249
- function _e(t) {
250
- const e = mt(t);
251
- return [St(t), e, St(e)];
293
+ function Ye(t) {
294
+ const e = gt(t);
295
+ return [Tt(t), e, Tt(e)];
252
296
  }
253
- function St(t) {
254
- return t.replace(/start|end/g, (e) => Ue[e]);
297
+ function Tt(t) {
298
+ return t.replace(/start|end/g, (e) => Ie[e]);
255
299
  }
256
- function Ie(t, e, o) {
257
- const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
300
+ function qe(t, e, o) {
301
+ const n = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
258
302
  switch (t) {
259
303
  case "top":
260
304
  case "bottom":
261
305
  return o ? e ? s : n : e ? n : s;
262
306
  case "left":
263
307
  case "right":
264
- return e ? i : r;
308
+ return e ? r : i;
265
309
  default:
266
310
  return [];
267
311
  }
268
312
  }
269
- function je(t, e, o, n) {
270
- const s = lt(t);
271
- let i = Ie(K(t), o === "start", n);
272
- return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(St)))), i;
313
+ function Xe(t, e, o, n) {
314
+ const s = at(t);
315
+ let r = qe(X(t), o === "start", n);
316
+ return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(Tt)))), r;
273
317
  }
274
- function mt(t) {
275
- return t.replace(/left|right|bottom|top/g, (e) => Be[e]);
318
+ function gt(t) {
319
+ return t.replace(/left|right|bottom|top/g, (e) => _e[e]);
276
320
  }
277
- function Ye(t) {
321
+ function Je(t) {
278
322
  return {
279
323
  top: 0,
280
324
  right: 0,
@@ -283,15 +327,15 @@ function Ye(t) {
283
327
  ...t
284
328
  };
285
329
  }
286
- function ce(t) {
287
- return typeof t != "number" ? Ye(t) : {
330
+ function ue(t) {
331
+ return typeof t != "number" ? Je(t) : {
288
332
  top: t,
289
333
  right: t,
290
334
  bottom: t,
291
335
  left: t
292
336
  };
293
337
  }
294
- function gt(t) {
338
+ function pt(t) {
295
339
  const {
296
340
  x: e,
297
341
  y: o,
@@ -309,12 +353,12 @@ function gt(t) {
309
353
  y: o
310
354
  };
311
355
  }
312
- function $t(t, e, o) {
356
+ function Bt(t, e, o) {
313
357
  let {
314
358
  reference: n,
315
359
  floating: s
316
360
  } = t;
317
- const i = B(e), r = Dt(e), c = Ct(r), l = K(e), a = i === "y", h = n.x + n.width / 2 - s.width / 2, f = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
361
+ const r = z(e), i = Wt(e), c = Ct(i), l = X(e), a = r === "y", h = n.x + n.width / 2 - s.width / 2, f = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
318
362
  let u;
319
363
  switch (l) {
320
364
  case "top":
@@ -347,31 +391,31 @@ function $t(t, e, o) {
347
391
  y: n.y
348
392
  };
349
393
  }
350
- switch (lt(e)) {
394
+ switch (at(e)) {
351
395
  case "start":
352
- u[r] -= m * (o && a ? -1 : 1);
396
+ u[i] -= m * (o && a ? -1 : 1);
353
397
  break;
354
398
  case "end":
355
- u[r] += m * (o && a ? -1 : 1);
399
+ u[i] += m * (o && a ? -1 : 1);
356
400
  break;
357
401
  }
358
402
  return u;
359
403
  }
360
- const qe = async (t, e, o) => {
404
+ const Ge = async (t, e, o) => {
361
405
  const {
362
406
  placement: n = "bottom",
363
407
  strategy: s = "absolute",
364
- middleware: i = [],
365
- platform: r
366
- } = o, c = i.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
367
- let a = await r.getElementRects({
408
+ middleware: r = [],
409
+ platform: i
410
+ } = o, c = r.filter(Boolean), l = await (i.isRTL == null ? void 0 : i.isRTL(e));
411
+ let a = await i.getElementRects({
368
412
  reference: t,
369
413
  floating: e,
370
414
  strategy: s
371
415
  }), {
372
416
  x: h,
373
417
  y: f
374
- } = $t(a, n, l), m = n, u = {}, d = 0;
418
+ } = Bt(a, n, l), m = n, u = {}, d = 0;
375
419
  for (let p = 0; p < c.length; p++) {
376
420
  const {
377
421
  name: w,
@@ -389,7 +433,7 @@ const qe = async (t, e, o) => {
389
433
  strategy: s,
390
434
  middlewareData: u,
391
435
  rects: a,
392
- platform: r,
436
+ platform: i,
393
437
  elements: {
394
438
  reference: t,
395
439
  floating: e
@@ -401,14 +445,14 @@ const qe = async (t, e, o) => {
401
445
  ...u[w],
402
446
  ...b
403
447
  }
404
- }, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await r.getElementRects({
448
+ }, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await i.getElementRects({
405
449
  reference: t,
406
450
  floating: e,
407
451
  strategy: s
408
452
  }) : v.rects), {
409
453
  x: h,
410
454
  y: f
411
- } = $t(a, m, l)), p = -1);
455
+ } = Bt(a, m, l)), p = -1);
412
456
  }
413
457
  return {
414
458
  x: h,
@@ -418,14 +462,14 @@ const qe = async (t, e, o) => {
418
462
  middlewareData: u
419
463
  };
420
464
  };
421
- async function le(t, e) {
465
+ async function fe(t, e) {
422
466
  var o;
423
467
  e === void 0 && (e = {});
424
468
  const {
425
469
  x: n,
426
470
  y: s,
427
- platform: i,
428
- rects: r,
471
+ platform: r,
472
+ rects: i,
429
473
  elements: c,
430
474
  strategy: l
431
475
  } = t, {
@@ -434,23 +478,23 @@ async function le(t, e) {
434
478
  elementContext: f = "floating",
435
479
  altBoundary: m = !1,
436
480
  padding: u = 0
437
- } = ct(e, t), d = ce(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = gt(await i.getClippingRect({
438
- element: (o = await (i.isElement == null ? void 0 : i.isElement(w))) == null || o ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
481
+ } = lt(e, t), d = ue(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = pt(await r.getClippingRect({
482
+ element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
439
483
  boundary: a,
440
484
  rootBoundary: h,
441
485
  strategy: l
442
486
  })), x = f === "floating" ? {
443
487
  x: n,
444
488
  y: s,
445
- width: r.floating.width,
446
- height: r.floating.height
447
- } : r.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
489
+ width: i.floating.width,
490
+ height: i.floating.height
491
+ } : i.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
448
492
  x: 1,
449
493
  y: 1
450
494
  } : {
451
495
  x: 1,
452
496
  y: 1
453
- }, v = gt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
497
+ }, v = pt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
454
498
  elements: c,
455
499
  rect: x,
456
500
  offsetParent: y,
@@ -463,7 +507,7 @@ async function le(t, e) {
463
507
  right: (v.right - g.right + d.right) / b.x
464
508
  };
465
509
  }
466
- const Xe = (t) => ({
510
+ const Qe = (t) => ({
467
511
  name: "arrow",
468
512
  options: t,
469
513
  async fn(e) {
@@ -471,36 +515,36 @@ const Xe = (t) => ({
471
515
  x: o,
472
516
  y: n,
473
517
  placement: s,
474
- rects: i,
475
- platform: r,
518
+ rects: r,
519
+ platform: i,
476
520
  elements: c,
477
521
  middlewareData: l
478
522
  } = e, {
479
523
  element: a,
480
524
  padding: h = 0
481
- } = ct(t, e) || {};
525
+ } = lt(t, e) || {};
482
526
  if (a == null)
483
527
  return {};
484
- const f = ce(h), m = {
528
+ const f = ue(h), m = {
485
529
  x: o,
486
530
  y: n
487
- }, u = Dt(s), d = Ct(u), p = await r.getDimensions(a), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = i.reference[d] + i.reference[u] - m[u] - i.floating[d], v = m[u] - i.reference[u], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
531
+ }, u = Wt(s), d = Ct(u), p = await i.getDimensions(a), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[d] + r.reference[u] - m[u] - r.floating[d], v = m[u] - r.reference[u], L = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a));
488
532
  let A = L ? L[y] : 0;
489
- (!A || !await (r.isElement == null ? void 0 : r.isElement(L))) && (A = c.floating[y] || i.floating[d]);
490
- const _ = b / 2 - v / 2, M = A / 2 - p[d] / 2 - 1, S = Q(f[g], M), I = Q(f[x], M), j = S, et = A - p[d] - I, R = A / 2 - p[d] / 2 + _, Y = Lt(j, R, et), V = !l.arrow && lt(s) != null && R !== Y && i.reference[d] / 2 - (R < j ? S : I) - p[d] / 2 < 0, T = V ? R < j ? R - j : R - et : 0;
533
+ (!A || !await (i.isElement == null ? void 0 : i.isElement(L))) && (A = c.floating[y] || r.floating[d]);
534
+ const _ = b / 2 - v / 2, V = A / 2 - p[d] / 2 - 1, S = Z(f[g], V), I = Z(f[x], V), j = S, nt = A - p[d] - I, O = A / 2 - p[d] / 2 + _, Y = St(j, O, nt), N = !l.arrow && at(s) != null && O !== Y && r.reference[d] / 2 - (O < j ? S : I) - p[d] / 2 < 0, T = N ? O < j ? O - j : O - nt : 0;
491
535
  return {
492
536
  [u]: m[u] + T,
493
537
  data: {
494
538
  [u]: Y,
495
- centerOffset: R - Y - T,
496
- ...V && {
539
+ centerOffset: O - Y - T,
540
+ ...N && {
497
541
  alignmentOffset: T
498
542
  }
499
543
  },
500
- reset: V
544
+ reset: N
501
545
  };
502
546
  }
503
- }), Ke = function(t) {
547
+ }), Ze = function(t) {
504
548
  return t === void 0 && (t = {}), {
505
549
  name: "flip",
506
550
  options: t,
@@ -508,8 +552,8 @@ const Xe = (t) => ({
508
552
  var o, n;
509
553
  const {
510
554
  placement: s,
511
- middlewareData: i,
512
- rects: r,
555
+ middlewareData: r,
556
+ rects: i,
513
557
  initialPlacement: c,
514
558
  platform: l,
515
559
  elements: a
@@ -521,60 +565,60 @@ const Xe = (t) => ({
521
565
  fallbackAxisSideDirection: d = "none",
522
566
  flipAlignment: p = !0,
523
567
  ...w
524
- } = ct(t, e);
525
- if ((o = i.arrow) != null && o.alignmentOffset)
568
+ } = lt(t, e);
569
+ if ((o = r.arrow) != null && o.alignmentOffset)
526
570
  return {};
527
- const g = K(s), x = B(c), y = K(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (y || !p ? [mt(c)] : _e(c)), L = d !== "none";
528
- !m && L && v.push(...je(c, p, d, b));
529
- const A = [c, ...v], _ = await le(e, w), M = [];
530
- let S = ((n = i.flip) == null ? void 0 : n.overflows) || [];
531
- if (h && M.push(_[g]), f) {
532
- const R = ze(s, r, b);
533
- M.push(_[R[0]], _[R[1]]);
571
+ const g = X(s), x = z(c), y = X(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (y || !p ? [gt(c)] : Ye(c)), L = d !== "none";
572
+ !m && L && v.push(...Xe(c, p, d, b));
573
+ const A = [c, ...v], _ = await fe(e, w), V = [];
574
+ let S = ((n = r.flip) == null ? void 0 : n.overflows) || [];
575
+ if (h && V.push(_[g]), f) {
576
+ const O = je(s, i, b);
577
+ V.push(_[O[0]], _[O[1]]);
534
578
  }
535
579
  if (S = [...S, {
536
580
  placement: s,
537
- overflows: M
538
- }], !M.every((R) => R <= 0)) {
581
+ overflows: V
582
+ }], !V.every((O) => O <= 0)) {
539
583
  var I, j;
540
- const R = (((I = i.flip) == null ? void 0 : I.index) || 0) + 1, Y = A[R];
541
- if (Y && (!(f === "alignment" ? x !== B(Y) : !1) || // We leave the current main axis only if every placement on that axis
584
+ const O = (((I = r.flip) == null ? void 0 : I.index) || 0) + 1, Y = A[O];
585
+ if (Y && (!(f === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
542
586
  // overflows the main axis.
543
- S.every((P) => P.overflows[0] > 0 && B(P.placement) === x)))
587
+ S.every((P) => P.overflows[0] > 0 && z(P.placement) === x)))
544
588
  return {
545
589
  data: {
546
- index: R,
590
+ index: O,
547
591
  overflows: S
548
592
  },
549
593
  reset: {
550
594
  placement: Y
551
595
  }
552
596
  };
553
- let V = (j = S.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : j.placement;
554
- if (!V)
597
+ let N = (j = S.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : j.placement;
598
+ if (!N)
555
599
  switch (u) {
556
600
  case "bestFit": {
557
- var et;
558
- const T = (et = S.filter((P) => {
601
+ var nt;
602
+ const T = (nt = S.filter((P) => {
559
603
  if (L) {
560
- const $ = B(P.placement);
561
- return $ === x || // Create a bias to the `y` side axis due to horizontal
604
+ const B = z(P.placement);
605
+ return B === x || // Create a bias to the `y` side axis due to horizontal
562
606
  // reading directions favoring greater width.
563
- $ === "y";
607
+ B === "y";
564
608
  }
565
609
  return !0;
566
- }).map((P) => [P.placement, P.overflows.filter(($) => $ > 0).reduce(($, we) => $ + we, 0)]).sort((P, $) => P[1] - $[1])[0]) == null ? void 0 : et[0];
567
- T && (V = T);
610
+ }).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, ve) => B + ve, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 : nt[0];
611
+ T && (N = T);
568
612
  break;
569
613
  }
570
614
  case "initialPlacement":
571
- V = c;
615
+ N = c;
572
616
  break;
573
617
  }
574
- if (s !== V)
618
+ if (s !== N)
575
619
  return {
576
620
  reset: {
577
- placement: V
621
+ placement: N
578
622
  }
579
623
  };
580
624
  }
@@ -582,12 +626,12 @@ const Xe = (t) => ({
582
626
  }
583
627
  };
584
628
  };
585
- async function Je(t, e) {
629
+ async function tn(t, e) {
586
630
  const {
587
631
  placement: o,
588
632
  platform: n,
589
633
  elements: s
590
- } = t, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = K(o), c = lt(o), l = B(o) === "y", a = ["left", "top"].includes(r) ? -1 : 1, h = i && l ? -1 : 1, f = ct(e, t);
634
+ } = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = X(o), c = at(o), l = z(o) === "y", a = ["left", "top"].includes(i) ? -1 : 1, h = r && l ? -1 : 1, f = lt(e, t);
591
635
  let {
592
636
  mainAxis: m,
593
637
  crossAxis: u,
@@ -609,7 +653,7 @@ async function Je(t, e) {
609
653
  y: u * h
610
654
  };
611
655
  }
612
- const Ge = function(t) {
656
+ const en = function(t) {
613
657
  return t === void 0 && (t = 0), {
614
658
  name: "offset",
615
659
  options: t,
@@ -617,21 +661,21 @@ const Ge = function(t) {
617
661
  var o, n;
618
662
  const {
619
663
  x: s,
620
- y: i,
621
- placement: r,
664
+ y: r,
665
+ placement: i,
622
666
  middlewareData: c
623
- } = e, l = await Je(e, t);
624
- return r === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
667
+ } = e, l = await tn(e, t);
668
+ return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
625
669
  x: s + l.x,
626
- y: i + l.y,
670
+ y: r + l.y,
627
671
  data: {
628
672
  ...l,
629
- placement: r
673
+ placement: i
630
674
  }
631
675
  };
632
676
  }
633
677
  };
634
- }, Qe = function(t) {
678
+ }, nn = function(t) {
635
679
  return t === void 0 && (t = {}), {
636
680
  name: "shift",
637
681
  options: t,
@@ -641,8 +685,8 @@ const Ge = function(t) {
641
685
  y: n,
642
686
  placement: s
643
687
  } = e, {
644
- mainAxis: i = !0,
645
- crossAxis: r = !1,
688
+ mainAxis: r = !0,
689
+ crossAxis: i = !1,
646
690
  limiter: c = {
647
691
  fn: (w) => {
648
692
  let {
@@ -656,18 +700,18 @@ const Ge = function(t) {
656
700
  }
657
701
  },
658
702
  ...l
659
- } = ct(t, e), a = {
703
+ } = lt(t, e), a = {
660
704
  x: o,
661
705
  y: n
662
- }, h = await le(e, l), f = B(K(s)), m = re(f);
706
+ }, h = await fe(e, l), f = z(X(s)), m = ae(f);
663
707
  let u = a[m], d = a[f];
664
- if (i) {
708
+ if (r) {
665
709
  const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
666
- u = Lt(x, u, y);
710
+ u = St(x, u, y);
667
711
  }
668
- if (r) {
712
+ if (i) {
669
713
  const w = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", x = d + h[w], y = d - h[g];
670
- d = Lt(x, d, y);
714
+ d = St(x, d, y);
671
715
  }
672
716
  const p = c.fn({
673
717
  ...e,
@@ -680,53 +724,53 @@ const Ge = function(t) {
680
724
  x: p.x - o,
681
725
  y: p.y - n,
682
726
  enabled: {
683
- [m]: i,
684
- [f]: r
727
+ [m]: r,
728
+ [f]: i
685
729
  }
686
730
  }
687
731
  };
688
732
  }
689
733
  };
690
734
  };
691
- function wt() {
735
+ function yt() {
692
736
  return typeof window < "u";
693
737
  }
694
- function tt(t) {
695
- return ae(t) ? (t.nodeName || "").toLowerCase() : "#document";
738
+ function et(t) {
739
+ return he(t) ? (t.nodeName || "").toLowerCase() : "#document";
696
740
  }
697
- function O(t) {
741
+ function R(t) {
698
742
  var e;
699
743
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
700
744
  }
701
- function F(t) {
745
+ function M(t) {
702
746
  var e;
703
- return (e = (ae(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
747
+ return (e = (he(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
704
748
  }
705
- function ae(t) {
706
- return wt() ? t instanceof Node || t instanceof O(t).Node : !1;
749
+ function he(t) {
750
+ return yt() ? t instanceof Node || t instanceof R(t).Node : !1;
707
751
  }
708
752
  function k(t) {
709
- return wt() ? t instanceof Element || t instanceof O(t).Element : !1;
753
+ return yt() ? t instanceof Element || t instanceof R(t).Element : !1;
710
754
  }
711
755
  function W(t) {
712
- return wt() ? t instanceof HTMLElement || t instanceof O(t).HTMLElement : !1;
756
+ return yt() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
713
757
  }
714
- function Ht(t) {
715
- return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
758
+ function Ut(t) {
759
+ return !yt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
716
760
  }
717
- function at(t) {
761
+ function ut(t) {
718
762
  const {
719
763
  overflow: e,
720
764
  overflowX: o,
721
765
  overflowY: n,
722
766
  display: s
723
- } = C(t);
767
+ } = D(t);
724
768
  return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
725
769
  }
726
- function Ze(t) {
727
- return ["table", "td", "th"].includes(tt(t));
770
+ function on(t) {
771
+ return ["table", "td", "th"].includes(et(t));
728
772
  }
729
- function yt(t) {
773
+ function xt(t) {
730
774
  return [":popover-open", ":modal"].some((e) => {
731
775
  try {
732
776
  return t.matches(e);
@@ -735,31 +779,31 @@ function yt(t) {
735
779
  }
736
780
  });
737
781
  }
738
- function Wt(t) {
739
- const e = Ft(), o = k(t) ? C(t) : t;
782
+ function Ft(t) {
783
+ const e = Mt(), o = k(t) ? D(t) : t;
740
784
  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));
741
785
  }
742
- function tn(t) {
743
- let e = U(t);
744
- for (; W(e) && !Z(e); ) {
745
- if (Wt(e))
786
+ function sn(t) {
787
+ let e = K(t);
788
+ for (; W(e) && !tt(e); ) {
789
+ if (Ft(e))
746
790
  return e;
747
- if (yt(e))
791
+ if (xt(e))
748
792
  return null;
749
- e = U(e);
793
+ e = K(e);
750
794
  }
751
795
  return null;
752
796
  }
753
- function Ft() {
797
+ function Mt() {
754
798
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
755
799
  }
756
- function Z(t) {
757
- return ["html", "body", "#document"].includes(tt(t));
800
+ function tt(t) {
801
+ return ["html", "body", "#document"].includes(et(t));
758
802
  }
759
- function C(t) {
760
- return O(t).getComputedStyle(t);
803
+ function D(t) {
804
+ return R(t).getComputedStyle(t);
761
805
  }
762
- function xt(t) {
806
+ function vt(t) {
763
807
  return k(t) ? {
764
808
  scrollLeft: t.scrollLeft,
765
809
  scrollTop: t.scrollTop
@@ -768,131 +812,131 @@ function xt(t) {
768
812
  scrollTop: t.scrollY
769
813
  };
770
814
  }
771
- function U(t) {
772
- if (tt(t) === "html")
815
+ function K(t) {
816
+ if (et(t) === "html")
773
817
  return t;
774
818
  const e = (
775
819
  // Step into the shadow DOM of the parent of a slotted node.
776
820
  t.assignedSlot || // DOM Element detected.
777
821
  t.parentNode || // ShadowRoot detected.
778
- Ht(t) && t.host || // Fallback.
779
- F(t)
822
+ Ut(t) && t.host || // Fallback.
823
+ M(t)
780
824
  );
781
- return Ht(e) ? e.host : e;
825
+ return Ut(e) ? e.host : e;
782
826
  }
783
- function ue(t) {
784
- const e = U(t);
785
- return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && at(e) ? e : ue(e);
827
+ function de(t) {
828
+ const e = K(t);
829
+ return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ut(e) ? e : de(e);
786
830
  }
787
- function st(t, e, o) {
831
+ function rt(t, e, o) {
788
832
  var n;
789
833
  e === void 0 && (e = []), o === void 0 && (o = !0);
790
- const s = ue(t), i = s === ((n = t.ownerDocument) == null ? void 0 : n.body), r = O(s);
791
- if (i) {
792
- const c = Tt(r);
793
- return e.concat(r, r.visualViewport || [], at(s) ? s : [], c && o ? st(c) : []);
834
+ const s = de(t), r = s === ((n = t.ownerDocument) == null ? void 0 : n.body), i = R(s);
835
+ if (r) {
836
+ const c = Pt(i);
837
+ return e.concat(i, i.visualViewport || [], ut(s) ? s : [], c && o ? rt(c) : []);
794
838
  }
795
- return e.concat(s, st(s, [], o));
839
+ return e.concat(s, rt(s, [], o));
796
840
  }
797
- function Tt(t) {
841
+ function Pt(t) {
798
842
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
799
843
  }
800
- function fe(t) {
801
- const e = C(t);
844
+ function me(t) {
845
+ const e = D(t);
802
846
  let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
803
- const s = W(t), i = s ? t.offsetWidth : o, r = s ? t.offsetHeight : n, c = dt(o) !== i || dt(n) !== r;
804
- return c && (o = i, n = r), {
847
+ const s = W(t), r = s ? t.offsetWidth : o, i = s ? t.offsetHeight : n, c = mt(o) !== r || mt(n) !== i;
848
+ return c && (o = r, n = i), {
805
849
  width: o,
806
850
  height: n,
807
851
  $: c
808
852
  };
809
853
  }
810
- function Mt(t) {
854
+ function Vt(t) {
811
855
  return k(t) ? t : t.contextElement;
812
856
  }
813
- function G(t) {
814
- const e = Mt(t);
857
+ function Q(t) {
858
+ const e = Vt(t);
815
859
  if (!W(e))
816
- return D(1);
860
+ return C(1);
817
861
  const o = e.getBoundingClientRect(), {
818
862
  width: n,
819
863
  height: s,
820
- $: i
821
- } = fe(e);
822
- let r = (i ? dt(o.width) : o.width) / n, c = (i ? dt(o.height) : o.height) / s;
823
- return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
824
- x: r,
864
+ $: r
865
+ } = me(e);
866
+ let i = (r ? mt(o.width) : o.width) / n, c = (r ? mt(o.height) : o.height) / s;
867
+ return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
868
+ x: i,
825
869
  y: c
826
870
  };
827
871
  }
828
- const en = /* @__PURE__ */ D(0);
829
- function he(t) {
830
- const e = O(t);
831
- return !Ft() || !e.visualViewport ? en : {
872
+ const rn = /* @__PURE__ */ C(0);
873
+ function ge(t) {
874
+ const e = R(t);
875
+ return !Mt() || !e.visualViewport ? rn : {
832
876
  x: e.visualViewport.offsetLeft,
833
877
  y: e.visualViewport.offsetTop
834
878
  };
835
879
  }
836
- function nn(t, e, o) {
837
- return e === void 0 && (e = !1), !o || e && o !== O(t) ? !1 : e;
880
+ function cn(t, e, o) {
881
+ return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
838
882
  }
839
883
  function J(t, e, o, n) {
840
884
  e === void 0 && (e = !1), o === void 0 && (o = !1);
841
- const s = t.getBoundingClientRect(), i = Mt(t);
842
- let r = D(1);
843
- e && (n ? k(n) && (r = G(n)) : r = G(t));
844
- const c = nn(i, o, n) ? he(i) : D(0);
845
- let l = (s.left + c.x) / r.x, a = (s.top + c.y) / r.y, h = s.width / r.x, f = s.height / r.y;
846
- if (i) {
847
- const m = O(i), u = n && k(n) ? O(n) : n;
848
- let d = m, p = Tt(d);
885
+ const s = t.getBoundingClientRect(), r = Vt(t);
886
+ let i = C(1);
887
+ e && (n ? k(n) && (i = Q(n)) : i = Q(t));
888
+ const c = cn(r, o, n) ? ge(r) : C(0);
889
+ let l = (s.left + c.x) / i.x, a = (s.top + c.y) / i.y, h = s.width / i.x, f = s.height / i.y;
890
+ if (r) {
891
+ const m = R(r), u = n && k(n) ? R(n) : n;
892
+ let d = m, p = Pt(d);
849
893
  for (; p && n && u !== d; ) {
850
- const w = G(p), g = p.getBoundingClientRect(), x = C(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
851
- l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += y, a += b, d = O(p), p = Tt(d);
894
+ const w = Q(p), g = p.getBoundingClientRect(), x = D(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
895
+ l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += y, a += b, d = R(p), p = Pt(d);
852
896
  }
853
897
  }
854
- return gt({
898
+ return pt({
855
899
  width: h,
856
900
  height: f,
857
901
  x: l,
858
902
  y: a
859
903
  });
860
904
  }
861
- function Vt(t, e) {
862
- const o = xt(t).scrollLeft;
863
- return e ? e.left + o : J(F(t)).left + o;
905
+ function Nt(t, e) {
906
+ const o = vt(t).scrollLeft;
907
+ return e ? e.left + o : J(M(t)).left + o;
864
908
  }
865
- function de(t, e, o) {
909
+ function pe(t, e, o) {
866
910
  o === void 0 && (o = !1);
867
911
  const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
868
912
  // RTL <body> scrollbar.
869
- Vt(t, n)
870
- )), i = n.top + e.scrollTop;
913
+ Nt(t, n)
914
+ )), r = n.top + e.scrollTop;
871
915
  return {
872
916
  x: s,
873
- y: i
917
+ y: r
874
918
  };
875
919
  }
876
- function on(t) {
920
+ function ln(t) {
877
921
  let {
878
922
  elements: e,
879
923
  rect: o,
880
924
  offsetParent: n,
881
925
  strategy: s
882
926
  } = t;
883
- const i = s === "fixed", r = F(n), c = e ? yt(e.floating) : !1;
884
- if (n === r || c && i)
927
+ const r = s === "fixed", i = M(n), c = e ? xt(e.floating) : !1;
928
+ if (n === i || c && r)
885
929
  return o;
886
930
  let l = {
887
931
  scrollLeft: 0,
888
932
  scrollTop: 0
889
- }, a = D(1);
890
- const h = D(0), f = W(n);
891
- if ((f || !f && !i) && ((tt(n) !== "body" || at(r)) && (l = xt(n)), W(n))) {
933
+ }, a = C(1);
934
+ const h = C(0), f = W(n);
935
+ if ((f || !f && !r) && ((et(n) !== "body" || ut(i)) && (l = vt(n)), W(n))) {
892
936
  const u = J(n);
893
- a = G(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
937
+ a = Q(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
894
938
  }
895
- const m = r && !f && !i ? de(r, l, !0) : D(0);
939
+ const m = i && !f && !r ? pe(i, l, !0) : C(0);
896
940
  return {
897
941
  width: o.width * a.x,
898
942
  height: o.height * a.y,
@@ -900,54 +944,54 @@ function on(t) {
900
944
  y: o.y * a.y - l.scrollTop * a.y + h.y + m.y
901
945
  };
902
946
  }
903
- function sn(t) {
947
+ function an(t) {
904
948
  return Array.from(t.getClientRects());
905
949
  }
906
- function rn(t) {
907
- const e = F(t), o = xt(t), n = t.ownerDocument.body, s = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
908
- let r = -o.scrollLeft + Vt(t);
950
+ function un(t) {
951
+ const e = M(t), o = vt(t), n = t.ownerDocument.body, s = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
952
+ let i = -o.scrollLeft + Nt(t);
909
953
  const c = -o.scrollTop;
910
- return C(n).direction === "rtl" && (r += X(e.clientWidth, n.clientWidth) - s), {
954
+ return D(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - s), {
911
955
  width: s,
912
- height: i,
913
- x: r,
956
+ height: r,
957
+ x: i,
914
958
  y: c
915
959
  };
916
960
  }
917
- function cn(t, e) {
918
- const o = O(t), n = F(t), s = o.visualViewport;
919
- let i = n.clientWidth, r = n.clientHeight, c = 0, l = 0;
961
+ function fn(t, e) {
962
+ const o = R(t), n = M(t), s = o.visualViewport;
963
+ let r = n.clientWidth, i = n.clientHeight, c = 0, l = 0;
920
964
  if (s) {
921
- i = s.width, r = s.height;
922
- const a = Ft();
965
+ r = s.width, i = s.height;
966
+ const a = Mt();
923
967
  (!a || a && e === "fixed") && (c = s.offsetLeft, l = s.offsetTop);
924
968
  }
925
969
  return {
926
- width: i,
927
- height: r,
970
+ width: r,
971
+ height: i,
928
972
  x: c,
929
973
  y: l
930
974
  };
931
975
  }
932
- function ln(t, e) {
933
- const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, i = W(t) ? G(t) : D(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = n * i.y;
976
+ function hn(t, e) {
977
+ const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, r = W(t) ? Q(t) : C(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, l = s * r.x, a = n * r.y;
934
978
  return {
935
- width: r,
979
+ width: i,
936
980
  height: c,
937
981
  x: l,
938
982
  y: a
939
983
  };
940
984
  }
941
- function Bt(t, e, o) {
985
+ function zt(t, e, o) {
942
986
  let n;
943
987
  if (e === "viewport")
944
- n = cn(t, o);
988
+ n = fn(t, o);
945
989
  else if (e === "document")
946
- n = rn(F(t));
990
+ n = un(M(t));
947
991
  else if (k(e))
948
- n = ln(e, o);
992
+ n = hn(e, o);
949
993
  else {
950
- const s = he(t);
994
+ const s = ge(t);
951
995
  n = {
952
996
  x: e.x - s.x,
953
997
  y: e.y - s.y,
@@ -955,36 +999,36 @@ function Bt(t, e, o) {
955
999
  height: e.height
956
1000
  };
957
1001
  }
958
- return gt(n);
1002
+ return pt(n);
959
1003
  }
960
- function me(t, e) {
961
- const o = U(t);
962
- return o === e || !k(o) || Z(o) ? !1 : C(o).position === "fixed" || me(o, e);
1004
+ function we(t, e) {
1005
+ const o = K(t);
1006
+ return o === e || !k(o) || tt(o) ? !1 : D(o).position === "fixed" || we(o, e);
963
1007
  }
964
- function an(t, e) {
1008
+ function dn(t, e) {
965
1009
  const o = e.get(t);
966
1010
  if (o)
967
1011
  return o;
968
- let n = st(t, [], !1).filter((c) => k(c) && tt(c) !== "body"), s = null;
969
- const i = C(t).position === "fixed";
970
- let r = i ? U(t) : t;
971
- for (; k(r) && !Z(r); ) {
972
- const c = C(r), l = Wt(r);
973
- !l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || at(r) && !l && me(t, r)) ? n = n.filter((h) => h !== r) : s = c, r = U(r);
1012
+ let n = rt(t, [], !1).filter((c) => k(c) && et(c) !== "body"), s = null;
1013
+ const r = D(t).position === "fixed";
1014
+ let i = r ? K(t) : t;
1015
+ for (; k(i) && !tt(i); ) {
1016
+ const c = D(i), l = Ft(i);
1017
+ !l && c.position === "fixed" && (s = null), (r ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ut(i) && !l && we(t, i)) ? n = n.filter((h) => h !== i) : s = c, i = K(i);
974
1018
  }
975
1019
  return e.set(t, n), n;
976
1020
  }
977
- function un(t) {
1021
+ function mn(t) {
978
1022
  let {
979
1023
  element: e,
980
1024
  boundary: o,
981
1025
  rootBoundary: n,
982
1026
  strategy: s
983
1027
  } = t;
984
- const r = [...o === "clippingAncestors" ? yt(e) ? [] : an(e, this._c) : [].concat(o), n], c = r[0], l = r.reduce((a, h) => {
985
- const f = Bt(e, h, s);
986
- return a.top = X(f.top, a.top), a.right = Q(f.right, a.right), a.bottom = Q(f.bottom, a.bottom), a.left = X(f.left, a.left), a;
987
- }, Bt(e, c, s));
1028
+ const i = [...o === "clippingAncestors" ? xt(e) ? [] : dn(e, this._c) : [].concat(o), n], c = i[0], l = i.reduce((a, h) => {
1029
+ const f = zt(e, h, s);
1030
+ return a.top = q(f.top, a.top), a.right = Z(f.right, a.right), a.bottom = Z(f.bottom, a.bottom), a.left = q(f.left, a.left), a;
1031
+ }, zt(e, c, s));
988
1032
  return {
989
1033
  width: l.right - l.left,
990
1034
  height: l.bottom - l.top,
@@ -992,73 +1036,73 @@ function un(t) {
992
1036
  y: l.top
993
1037
  };
994
1038
  }
995
- function fn(t) {
1039
+ function gn(t) {
996
1040
  const {
997
1041
  width: e,
998
1042
  height: o
999
- } = fe(t);
1043
+ } = me(t);
1000
1044
  return {
1001
1045
  width: e,
1002
1046
  height: o
1003
1047
  };
1004
1048
  }
1005
- function hn(t, e, o) {
1006
- const n = W(e), s = F(e), i = o === "fixed", r = J(t, !0, i, e);
1049
+ function pn(t, e, o) {
1050
+ const n = W(e), s = M(e), r = o === "fixed", i = J(t, !0, r, e);
1007
1051
  let c = {
1008
1052
  scrollLeft: 0,
1009
1053
  scrollTop: 0
1010
1054
  };
1011
- const l = D(0);
1055
+ const l = C(0);
1012
1056
  function a() {
1013
- l.x = Vt(s);
1057
+ l.x = Nt(s);
1014
1058
  }
1015
- if (n || !n && !i)
1016
- if ((tt(e) !== "body" || at(s)) && (c = xt(e)), n) {
1017
- const u = J(e, !0, i, e);
1059
+ if (n || !n && !r)
1060
+ if ((et(e) !== "body" || ut(s)) && (c = vt(e)), n) {
1061
+ const u = J(e, !0, r, e);
1018
1062
  l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
1019
1063
  } else s && a();
1020
- i && !n && s && a();
1021
- const h = s && !n && !i ? de(s, c) : D(0), f = r.left + c.scrollLeft - l.x - h.x, m = r.top + c.scrollTop - l.y - h.y;
1064
+ r && !n && s && a();
1065
+ const h = s && !n && !r ? pe(s, c) : C(0), f = i.left + c.scrollLeft - l.x - h.x, m = i.top + c.scrollTop - l.y - h.y;
1022
1066
  return {
1023
1067
  x: f,
1024
1068
  y: m,
1025
- width: r.width,
1026
- height: r.height
1069
+ width: i.width,
1070
+ height: i.height
1027
1071
  };
1028
1072
  }
1029
- function At(t) {
1030
- return C(t).position === "static";
1073
+ function Ot(t) {
1074
+ return D(t).position === "static";
1031
1075
  }
1032
- function Ut(t, e) {
1033
- if (!W(t) || C(t).position === "fixed")
1076
+ function Kt(t, e) {
1077
+ if (!W(t) || D(t).position === "fixed")
1034
1078
  return null;
1035
1079
  if (e)
1036
1080
  return e(t);
1037
1081
  let o = t.offsetParent;
1038
- return F(t) === o && (o = o.ownerDocument.body), o;
1082
+ return M(t) === o && (o = o.ownerDocument.body), o;
1039
1083
  }
1040
- function ge(t, e) {
1041
- const o = O(t);
1042
- if (yt(t))
1084
+ function ye(t, e) {
1085
+ const o = R(t);
1086
+ if (xt(t))
1043
1087
  return o;
1044
1088
  if (!W(t)) {
1045
- let s = U(t);
1046
- for (; s && !Z(s); ) {
1047
- if (k(s) && !At(s))
1089
+ let s = K(t);
1090
+ for (; s && !tt(s); ) {
1091
+ if (k(s) && !Ot(s))
1048
1092
  return s;
1049
- s = U(s);
1093
+ s = K(s);
1050
1094
  }
1051
1095
  return o;
1052
1096
  }
1053
- let n = Ut(t, e);
1054
- for (; n && Ze(n) && At(n); )
1055
- n = Ut(n, e);
1056
- return n && Z(n) && At(n) && !Wt(n) ? o : n || tn(t) || o;
1097
+ let n = Kt(t, e);
1098
+ for (; n && on(n) && Ot(n); )
1099
+ n = Kt(n, e);
1100
+ return n && tt(n) && Ot(n) && !Ft(n) ? o : n || sn(t) || o;
1057
1101
  }
1058
- const dn = async function(t) {
1059
- const e = this.getOffsetParent || ge, o = this.getDimensions, n = await o(t.floating);
1102
+ const wn = async function(t) {
1103
+ const e = this.getOffsetParent || ye, o = this.getDimensions, n = await o(t.floating);
1060
1104
  return {
1061
- reference: hn(t.reference, await e(t.floating), t.strategy),
1105
+ reference: pn(t.reference, await e(t.floating), t.strategy),
1062
1106
  floating: {
1063
1107
  x: 0,
1064
1108
  y: 0,
@@ -1067,33 +1111,33 @@ const dn = async function(t) {
1067
1111
  }
1068
1112
  };
1069
1113
  };
1070
- function mn(t) {
1071
- return C(t).direction === "rtl";
1072
- }
1073
- const gn = {
1074
- convertOffsetParentRelativeRectToViewportRelativeRect: on,
1075
- getDocumentElement: F,
1076
- getClippingRect: un,
1077
- getOffsetParent: ge,
1078
- getElementRects: dn,
1079
- getClientRects: sn,
1080
- getDimensions: fn,
1081
- getScale: G,
1114
+ function yn(t) {
1115
+ return D(t).direction === "rtl";
1116
+ }
1117
+ const xn = {
1118
+ convertOffsetParentRelativeRectToViewportRelativeRect: ln,
1119
+ getDocumentElement: M,
1120
+ getClippingRect: mn,
1121
+ getOffsetParent: ye,
1122
+ getElementRects: wn,
1123
+ getClientRects: an,
1124
+ getDimensions: gn,
1125
+ getScale: Q,
1082
1126
  isElement: k,
1083
- isRTL: mn
1127
+ isRTL: yn
1084
1128
  };
1085
- function pe(t, e) {
1129
+ function xe(t, e) {
1086
1130
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1087
1131
  }
1088
- function pn(t, e) {
1132
+ function vn(t, e) {
1089
1133
  let o = null, n;
1090
- const s = F(t);
1091
- function i() {
1134
+ const s = M(t);
1135
+ function r() {
1092
1136
  var c;
1093
1137
  clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
1094
1138
  }
1095
- function r(c, l) {
1096
- c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1139
+ function i(c, l) {
1140
+ c === void 0 && (c = !1), l === void 0 && (l = 1), r();
1097
1141
  const a = t.getBoundingClientRect(), {
1098
1142
  left: h,
1099
1143
  top: f,
@@ -1102,21 +1146,21 @@ function pn(t, e) {
1102
1146
  } = a;
1103
1147
  if (c || e(), !m || !u)
1104
1148
  return;
1105
- const d = ft(f), p = ft(s.clientWidth - (h + m)), w = ft(s.clientHeight - (f + u)), g = ft(h), y = {
1149
+ const d = ht(f), p = ht(s.clientWidth - (h + m)), w = ht(s.clientHeight - (f + u)), g = ht(h), y = {
1106
1150
  rootMargin: -d + "px " + -p + "px " + -w + "px " + -g + "px",
1107
- threshold: X(0, Q(1, l)) || 1
1151
+ threshold: q(0, Z(1, l)) || 1
1108
1152
  };
1109
1153
  let b = !0;
1110
1154
  function v(L) {
1111
1155
  const A = L[0].intersectionRatio;
1112
1156
  if (A !== l) {
1113
1157
  if (!b)
1114
- return r();
1115
- A ? r(!1, A) : n = setTimeout(() => {
1116
- r(!1, 1e-7);
1158
+ return i();
1159
+ A ? i(!1, A) : n = setTimeout(() => {
1160
+ i(!1, 1e-7);
1117
1161
  }, 1e3);
1118
1162
  }
1119
- A === 1 && !pe(a, t.getBoundingClientRect()) && r(), b = !1;
1163
+ A === 1 && !xe(a, t.getBoundingClientRect()) && i(), b = !1;
1120
1164
  }
1121
1165
  try {
1122
1166
  o = new IntersectionObserver(v, {
@@ -1129,25 +1173,25 @@ function pn(t, e) {
1129
1173
  }
1130
1174
  o.observe(t);
1131
1175
  }
1132
- return r(!0), i;
1176
+ return i(!0), r;
1133
1177
  }
1134
- function wn(t, e, o, n) {
1178
+ function bn(t, e, o, n) {
1135
1179
  n === void 0 && (n = {});
1136
1180
  const {
1137
1181
  ancestorScroll: s = !0,
1138
- ancestorResize: i = !0,
1139
- elementResize: r = typeof ResizeObserver == "function",
1182
+ ancestorResize: r = !0,
1183
+ elementResize: i = typeof ResizeObserver == "function",
1140
1184
  layoutShift: c = typeof IntersectionObserver == "function",
1141
1185
  animationFrame: l = !1
1142
- } = n, a = Mt(t), h = s || i ? [...a ? st(a) : [], ...st(e)] : [];
1186
+ } = n, a = Vt(t), h = s || r ? [...a ? rt(a) : [], ...rt(e)] : [];
1143
1187
  h.forEach((g) => {
1144
1188
  s && g.addEventListener("scroll", o, {
1145
1189
  passive: !0
1146
- }), i && g.addEventListener("resize", o);
1190
+ }), r && g.addEventListener("resize", o);
1147
1191
  });
1148
- const f = a && c ? pn(a, o) : null;
1192
+ const f = a && c ? vn(a, o) : null;
1149
1193
  let m = -1, u = null;
1150
- r && (u = new ResizeObserver((g) => {
1194
+ i && (u = new ResizeObserver((g) => {
1151
1195
  let [x] = g;
1152
1196
  x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1153
1197
  var y;
@@ -1158,28 +1202,28 @@ function wn(t, e, o, n) {
1158
1202
  l && w();
1159
1203
  function w() {
1160
1204
  const g = J(t);
1161
- p && !pe(p, g) && o(), p = g, d = requestAnimationFrame(w);
1205
+ p && !xe(p, g) && o(), p = g, d = requestAnimationFrame(w);
1162
1206
  }
1163
1207
  return o(), () => {
1164
1208
  var g;
1165
1209
  h.forEach((x) => {
1166
- s && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
1210
+ s && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
1167
1211
  }), f == null || f(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(d);
1168
1212
  };
1169
1213
  }
1170
- const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1214
+ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1171
1215
  const n = /* @__PURE__ */ new Map(), s = {
1172
- platform: gn,
1216
+ platform: xn,
1173
1217
  ...o
1174
- }, i = {
1218
+ }, r = {
1175
1219
  ...s.platform,
1176
1220
  _c: n
1177
1221
  };
1178
- return qe(t, e, {
1222
+ return Ge(t, e, {
1179
1223
  ...s,
1180
- platform: i
1224
+ platform: r
1181
1225
  });
1182
- }, jn = [
1226
+ }, Qn = [
1183
1227
  "top",
1184
1228
  "top-start",
1185
1229
  "top-end",
@@ -1192,22 +1236,25 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1192
1236
  "left",
1193
1237
  "left-start",
1194
1238
  "left-end"
1195
- ], Yn = (t, e = { isOpen: !1 }) => {
1239
+ ], Zn = (t, e = { isOpen: !1 }) => {
1196
1240
  const o = [];
1197
1241
  let n = null;
1198
- const s = E.deriveProp(e.isOpen), i = (c) => {
1242
+ const s = E.deriveProp(e.isOpen);
1243
+ function r(c) {
1199
1244
  n = c, s.set(!0);
1200
- }, r = () => {
1245
+ }
1246
+ function i() {
1201
1247
  s.set(!1), o.forEach((c) => c()), o.length = 0;
1202
- };
1203
- return ot(
1204
- te(
1248
+ }
1249
+ return st(
1250
+ t(r, i),
1251
+ ne(
1205
1252
  s,
1206
- () => q(
1207
- (c) => Zt(
1253
+ () => $(
1254
+ (c) => ee(
1208
1255
  "body",
1209
1256
  Rt.div(
1210
- q((l) => {
1257
+ $((l) => {
1211
1258
  l.style.position = "absolute";
1212
1259
  const a = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
1213
1260
  n.target
@@ -1215,7 +1262,10 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1215
1262
  if (a == null)
1216
1263
  throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
1217
1264
  let h = null;
1218
- const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal((n == null ? void 0 : n.placement) ?? "top"), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = N({
1265
+ const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal(
1266
+ /* c8 ignore next 3 */
1267
+ (n == null ? void 0 : n.placement) ?? "top"
1268
+ ), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = H({
1219
1269
  centerOffset: 0,
1220
1270
  alignmentOffset: 0,
1221
1271
  containerWidth: 0,
@@ -1225,21 +1275,21 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1225
1275
  });
1226
1276
  async function g() {
1227
1277
  const y = [
1228
- zt(),
1229
- yn({
1278
+ _t(),
1279
+ An({
1230
1280
  mainAxis: f.get(),
1231
1281
  crossAxis: m.get()
1232
1282
  }),
1233
- xn(),
1234
- zt()
1283
+ On(),
1284
+ _t()
1235
1285
  ];
1236
1286
  p != null && h != null && y.push(
1237
- vn({
1287
+ Rn({
1238
1288
  element: h,
1239
1289
  padding: d.get()
1240
1290
  })
1241
1291
  );
1242
- const b = await bn(a, l, {
1292
+ const b = await En(a, l, {
1243
1293
  placement: u.get(),
1244
1294
  strategy: "absolute",
1245
1295
  middleware: y
@@ -1247,13 +1297,13 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1247
1297
  if (l.style.top = `${L}px`, l.style.left = `${v}px`, h != null && A.arrow != null) {
1248
1298
  const {
1249
1299
  x: _,
1250
- y: M,
1300
+ y: V,
1251
1301
  centerOffset: S,
1252
1302
  alignmentOffset: I
1253
1303
  } = A.arrow;
1254
1304
  w.set({
1255
1305
  x: _,
1256
- y: M,
1306
+ y: V,
1257
1307
  centerOffset: S,
1258
1308
  alignmentOffset: I,
1259
1309
  containerWidth: l.offsetWidth,
@@ -1261,16 +1311,16 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1261
1311
  });
1262
1312
  }
1263
1313
  }
1264
- const x = ve(
1314
+ const x = Oe(
1265
1315
  f,
1266
1316
  m,
1267
1317
  u
1268
1318
  )(g);
1269
- return ot(
1319
+ return st(
1270
1320
  n == null ? void 0 : n.content,
1271
1321
  (n == null ? void 0 : n.arrow) != null ? Rt.div(
1272
1322
  n == null ? void 0 : n.arrow(
1273
- ee(
1323
+ oe(
1274
1324
  w,
1275
1325
  u
1276
1326
  )((y, b) => ({
@@ -1278,13 +1328,13 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1278
1328
  placement: b
1279
1329
  }))
1280
1330
  ),
1281
- q((y) => {
1331
+ $((y) => {
1282
1332
  h = y, g();
1283
1333
  })
1284
1334
  ) : null,
1285
- z(
1335
+ F(
1286
1336
  w.dispose,
1287
- wn(a, l, g),
1337
+ bn(a, l, g),
1288
1338
  x
1289
1339
  )
1290
1340
  );
@@ -1292,25 +1342,24 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1292
1342
  )
1293
1343
  )
1294
1344
  )
1295
- ),
1296
- t(i, r)
1345
+ )
1297
1346
  );
1298
- }, An = (t, e, o) => {
1299
- const n = N(H.notAsked), s = n.map(
1300
- (f) => H.isSuccess(f) ? f.value : void 0
1301
- ), i = n.map(
1302
- (f) => H.isFailure(f) ? f.error : void 0
1303
- ), r = n.map((f) => H.isLoading(f));
1347
+ }, Ln = (t, e, o) => {
1348
+ const n = H(U.notAsked), s = n.map(
1349
+ (f) => U.isSuccess(f) ? f.value : void 0
1350
+ ), r = n.map(
1351
+ (f) => U.isFailure(f) ? f.error : void 0
1352
+ ), i = n.map((f) => U.isLoading(f));
1304
1353
  let c;
1305
1354
  const l = async (f) => {
1306
1355
  c == null || c.abort(), c = new AbortController();
1307
1356
  const m = c.signal, u = n.get();
1308
- n.set(H.loading(H.getOrUndefined(u)));
1357
+ n.set(U.loading(U.getOrUndefined(u)));
1309
1358
  try {
1310
1359
  const d = await e({ request: f, abortSignal: m, previous: u });
1311
- await Promise.resolve(), c = void 0, n.set(H.success(d));
1360
+ await Promise.resolve(), c = void 0, n.set(U.success(d));
1312
1361
  } catch (d) {
1313
- c = void 0, n.set(H.failure(o(d)));
1362
+ c = void 0, n.set(U.failure(o(d)));
1314
1363
  }
1315
1364
  }, a = () => l(E.get(t)), h = () => {
1316
1365
  c == null || c.abort(), c = void 0, n.dispose();
@@ -1318,44 +1367,44 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
1318
1367
  return n.onDispose(E.on(t, l)), {
1319
1368
  status: n,
1320
1369
  value: s,
1321
- error: i,
1322
- loading: r,
1370
+ error: r,
1371
+ loading: i,
1323
1372
  reload: a,
1324
1373
  dispose: h
1325
1374
  };
1326
- }, Rn = (t, e) => {
1327
- const { status: o, dispose: n, reload: s } = t, { loading: i, failure: r, success: c } = e;
1328
- return ot(
1329
- z(n),
1330
- ie(o, {
1331
- loading: i != null ? (l) => i(l, s) : void 0,
1332
- failure: r != null ? (l) => r(l, s) : void 0,
1375
+ }, Sn = (t, e) => {
1376
+ const { status: o, dispose: n, reload: s } = t, { loading: r, failure: i, success: c } = e;
1377
+ return st(
1378
+ F(n),
1379
+ ce(o, {
1380
+ loading: r != null ? (l) => r(l, s) : void 0,
1381
+ failure: i != null ? (l) => i(l, s) : void 0,
1333
1382
  success: (l) => c(l, s)
1334
1383
  })
1335
1384
  );
1336
- }, qn = ({
1385
+ }, to = ({
1337
1386
  request: t,
1338
1387
  load: e,
1339
1388
  mapError: o = (n) => n
1340
1389
  }) => {
1341
- const n = An(t, e, o);
1342
- return (s) => Rn(n, s);
1343
- }, On = (t, e) => {
1390
+ const n = Ln(t, e, o);
1391
+ return (s) => Sn(n, s);
1392
+ }, Tn = (t, e) => {
1344
1393
  if (typeof e == "function")
1345
- return On(t, { success: e });
1346
- const o = e.failure ?? ((s) => ot(
1347
- z(s.on(console.error)),
1348
- s.map((i) => `Error: ${i}`)
1394
+ return Tn(t, { success: e });
1395
+ const o = e.failure ?? ((s) => st(
1396
+ F(s.on(console.error)),
1397
+ s.map((r) => `Error: ${r}`)
1349
1398
  )), n = e.success;
1350
- return Qt(E.toSignal(t), {
1399
+ return te(E.toSignal(t), {
1351
1400
  Success: (s) => n(s.$.value),
1352
1401
  Failure: (s) => o(s.$.error)
1353
1402
  });
1354
- }, Xn = () => Jt.focus((t) => {
1403
+ }, eo = () => Qt.focus((t) => {
1355
1404
  var e;
1356
1405
  return (e = t.target) == null ? void 0 : e.select();
1357
1406
  });
1358
- class vt {
1407
+ class bt {
1359
1408
  /**
1360
1409
  * Creates a new Rect instance.
1361
1410
  *
@@ -1394,7 +1443,7 @@ class vt {
1394
1443
  * console.log(rect1.equals(rect3)); // true (within tolerance)
1395
1444
  * ```
1396
1445
  */
1397
- bt(this, "equals", (e) => ut(this.left, e.left) && ut(this.top, e.top) && ut(this.width, e.width) && ut(this.height, e.height));
1446
+ At(this, "equals", (e) => ft(this.left, e.left) && ft(this.top, e.top) && ft(this.width, e.width) && ft(this.height, e.height));
1398
1447
  this.left = e, this.top = o, this.width = n, this.height = s;
1399
1448
  }
1400
1449
  /**
@@ -1428,7 +1477,7 @@ class vt {
1428
1477
  width: n = 0,
1429
1478
  height: s = 0
1430
1479
  }) {
1431
- return new vt(e, o, n, s);
1480
+ return new bt(e, o, n, s);
1432
1481
  }
1433
1482
  /**
1434
1483
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1494,96 +1543,98 @@ class vt {
1494
1543
  return { width: this.width, height: this.height };
1495
1544
  }
1496
1545
  }
1497
- function _t(t) {
1546
+ function It(t) {
1498
1547
  const e = t.getBoundingClientRect();
1499
- return vt.of({
1548
+ return bt.of({
1500
1549
  top: e.top + window.scrollY,
1501
1550
  left: e.left + window.scrollX,
1502
1551
  width: e.width,
1503
1552
  height: e.height
1504
1553
  });
1505
1554
  }
1506
- const En = (t) => be((e) => {
1507
- const { element: o } = e, n = N(_t(o)), s = kt(t(n))(e), i = () => {
1508
- n.set(vt.of(_t(o)));
1555
+ const Pn = (t) => Re((e) => {
1556
+ const { element: o } = e, n = H(It(o)), s = Dt(t(n))(e), r = () => {
1557
+ n.set(bt.of(It(o)));
1509
1558
  };
1510
- let r;
1511
- return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(o)), z((c) => {
1512
- r == null || r.disconnect(), s(c);
1559
+ let i;
1560
+ return typeof ResizeObserver == "function" && (i = new ResizeObserver(r), i.observe(o)), F((c) => {
1561
+ i == null || i.disconnect(), s(c);
1513
1562
  });
1514
- }), Kn = (t) => En(t), Jn = (t) => (e) => {
1515
- const o = rt(), n = N({
1563
+ }), no = (t) => Pn(t), oo = (t) => (e) => {
1564
+ const o = ct(), n = H({
1516
1565
  width: (o == null ? void 0 : o.innerWidth) ?? 0,
1517
1566
  height: (o == null ? void 0 : o.innerHeight) ?? 0
1518
- }), s = kt(t(n))(e), i = () => {
1567
+ }), s = Dt(t(n))(e), r = () => {
1519
1568
  n.set({
1569
+ /* c8 ignore next 6 */
1520
1570
  width: (o == null ? void 0 : o.innerWidth) ?? 0,
1521
1571
  height: (o == null ? void 0 : o.innerHeight) ?? 0
1522
1572
  });
1523
1573
  };
1524
- return o == null || o.addEventListener("resize", i), (r) => {
1525
- o == null || o.removeEventListener("resize", i), s(r);
1574
+ return o == null || o.addEventListener("resize", r), (i) => {
1575
+ o == null || o.removeEventListener("resize", r), s(i);
1526
1576
  };
1527
- }, Ln = (t, e) => {
1577
+ }, kn = (t, e) => {
1528
1578
  const o = e.split("/").filter((s) => s !== ""), n = {};
1529
1579
  for (let s = 0; s < t.length; s++) {
1530
- const i = t[s], r = o[s];
1531
- if (!r && i.type !== "catch-all")
1580
+ const r = t[s], i = o[s];
1581
+ if (!i && r.type !== "catch-all")
1532
1582
  return null;
1533
- if (i.type === "literal") {
1534
- if (i.value !== r)
1583
+ if (r.type === "literal") {
1584
+ if (r.value !== i)
1535
1585
  return null;
1536
- } else if (i.type === "param")
1537
- n[i.name] = r;
1538
- else if (i.type === "catch-all")
1586
+ } else if (r.type === "param")
1587
+ n[r.name] = i;
1588
+ else if (r.type === "catch-all")
1539
1589
  return { params: n, path: e };
1540
1590
  }
1541
1591
  return o.length !== t.length ? null : { params: n, path: e };
1542
- }, 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 !== ""), Tn = (t) => {
1592
+ }, Dn = (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) => {
1543
1593
  const e = t.map((o) => {
1544
- const n = Sn(o);
1594
+ const n = Dn(o);
1545
1595
  return { route: o, segments: n };
1546
1596
  });
1547
1597
  return function(n) {
1548
- for (const { segments: s, route: i } of e) {
1549
- const r = Ln(s, n);
1550
- if (r)
1551
- return { ...r, route: i };
1598
+ for (const { segments: s, route: r } of e) {
1599
+ const i = kn(s, n);
1600
+ if (i)
1601
+ return { ...i, route: r };
1552
1602
  }
1553
1603
  return null;
1554
1604
  };
1555
- }, Gn = (t) => {
1556
- const e = Tn(Object.keys(t));
1557
- return Kt(se, (o) => {
1605
+ }, so = (t) => {
1606
+ const e = Cn(Object.keys(t));
1607
+ return Gt(ie, (o) => {
1558
1608
  const n = o.map((s) => {
1559
- const i = e(s.pathname);
1560
- if (i == null)
1609
+ const r = e(s.pathname);
1610
+ if (r == null)
1561
1611
  throw console.error("No route found for", s), new Error("No route found");
1562
1612
  return {
1563
- params: i.params,
1564
- route: i.route,
1565
- path: i.path,
1613
+ params: r.params,
1614
+ route: r.route,
1615
+ path: r.path,
1566
1616
  search: s.search,
1567
1617
  hash: s.hash
1568
1618
  };
1569
1619
  });
1570
- return Ae(
1620
+ return Ee(
1571
1621
  n.map((s) => [s.route, s]),
1572
1622
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1573
1623
  t
1624
+ /* c8 ignore next 2 */
1574
1625
  );
1575
1626
  });
1576
- }, pt = 60 * 1e3, Pt = 60 * pt, it = 24 * Pt, It = 7 * it, jt = 30 * it, Pn = 365 * it, kn = [
1627
+ }, wt = 60 * 1e3, kt = 60 * wt, it = 24 * kt, jt = 7 * it, Yt = 30 * it, Wn = 365 * it, Fn = [
1577
1628
  {
1578
- max: pt * 90,
1579
- value: pt,
1629
+ max: wt * 90,
1630
+ value: wt,
1580
1631
  name: "minute",
1581
1632
  past: { singular: "a minute ago", plural: "{} minutes ago" },
1582
1633
  future: { singular: "in a minute", plural: "in {} minutes" }
1583
1634
  },
1584
1635
  {
1585
- max: Pt * 36,
1586
- value: Pt,
1636
+ max: kt * 36,
1637
+ value: kt,
1587
1638
  name: "hour",
1588
1639
  past: { singular: "an hour ago", plural: "{} hours ago" },
1589
1640
  future: { singular: "in an hour", plural: "in {} hours" }
@@ -1596,28 +1647,28 @@ const En = (t) => be((e) => {
1596
1647
  future: { singular: "tomorrow", plural: "in {} days" }
1597
1648
  },
1598
1649
  {
1599
- max: It * 6,
1600
- value: It,
1650
+ max: jt * 6,
1651
+ value: jt,
1601
1652
  name: "week",
1602
1653
  past: { singular: "last week", plural: "{} weeks ago" },
1603
1654
  future: { singular: "in a week", plural: "in {} weeks" }
1604
1655
  },
1605
1656
  {
1606
- max: jt * 18,
1607
- value: jt,
1657
+ max: Yt * 18,
1658
+ value: Yt,
1608
1659
  name: "month",
1609
1660
  past: { singular: "last month", plural: "{} months ago" },
1610
1661
  future: { singular: "in a month", plural: "in {} months" }
1611
1662
  },
1612
1663
  {
1613
1664
  max: 1 / 0,
1614
- value: Pn,
1665
+ value: Wn,
1615
1666
  name: "year",
1616
1667
  past: { singular: "last year", plural: "{} years ago" },
1617
1668
  future: { singular: "in a year", plural: "in {} years" }
1618
1669
  }
1619
1670
  ];
1620
- function Yt(t, e, o, n) {
1671
+ function qt(t, e, o, n) {
1621
1672
  const s = Math.round(t / e);
1622
1673
  return s <= 1 ? o : n.replace(
1623
1674
  "{}",
@@ -1627,78 +1678,83 @@ function Yt(t, e, o, n) {
1627
1678
  })
1628
1679
  );
1629
1680
  }
1630
- const Cn = (t = 1e3) => {
1631
- const e = N(/* @__PURE__ */ new Date()), o = Oe(() => e.set(/* @__PURE__ */ new Date()), t);
1681
+ const Mn = (t = 1e3) => {
1682
+ const e = H(/* @__PURE__ */ new Date()), o = Se(() => e.set(/* @__PURE__ */ new Date()), t);
1632
1683
  return e.onDispose(o), e;
1633
- }, Dn = (t) => {
1684
+ }, Vn = (t) => {
1634
1685
  const e = Math.abs(t);
1635
- if (e < pt)
1686
+ if (e < wt)
1636
1687
  return t < 0 ? "just now" : "in a moment";
1637
- for (const o of kn)
1688
+ for (const o of Fn)
1638
1689
  if (e < o.max)
1639
- return t < 0 ? Yt(e, o.value, o.past.singular, o.past.plural) : Yt(e, o.value, o.future.singular, o.future.plural);
1690
+ return t < 0 ? qt(e, o.value, o.past.singular, o.past.plural) : qt(e, o.value, o.future.singular, o.future.plural);
1640
1691
  throw new Error("unreachable");
1641
- }, Wn = (t, { now: e, frequency: o = 1e4 } = {}) => {
1642
- const n = e != null ? Xt.is(e) ? e.derive() : N(e) : Cn(o), s = ee(
1692
+ }, Nn = (t, { now: e, frequency: o = 1e4 } = {}) => {
1693
+ const n = e != null ? Jt.is(e) ? e.derive() : H(e) : Mn(o), s = oe(
1643
1694
  t,
1644
1695
  n
1645
- )((i, r) => i.getTime() - r.getTime());
1696
+ )((r, i) => r.getTime() - i.getTime());
1646
1697
  return s.onDispose(() => E.dispose(n)), s;
1647
- }, Fn = (t, e = {}) => {
1648
- const o = Wn(t, e), n = o.map(Dn);
1698
+ }, $n = (t, e = {}) => {
1699
+ const o = Nn(t, e), n = o.map(Vn);
1649
1700
  return n.onDispose(o.dispose), n;
1650
- }, Qn = (t, e = {}) => Fn(t, e);
1651
- class Mn extends Re {
1701
+ }, ro = (t, e = {}) => $n(t, e);
1702
+ class Hn extends Le {
1652
1703
  constructor() {
1653
1704
  super(...arguments);
1654
1705
  /**
1655
1706
  * Triggers an update of the Ticker by incrementing its internal value.
1656
1707
  * @returns void
1657
1708
  */
1658
- bt(this, "tick", () => this.update((o) => o + 1));
1709
+ At(this, "tick", () => this.update((o) => o + 1));
1659
1710
  }
1660
1711
  }
1661
- const Zn = (t = 0) => new Mn(t, (e, o) => e === o);
1712
+ const io = (t = 0) => new Hn(t, (e, o) => e === o);
1662
1713
  export {
1663
- Me as Anchor,
1664
- Hn as Appearance,
1665
- ie as AsyncResultView,
1666
- Bn as AutoFocus,
1667
- Un as AutoSelect,
1668
- En as ElementRect,
1669
- Kn as ElementSize,
1670
- _n as HTMLTitle,
1671
- zn as HiddenWhenEmpty,
1672
- He as InViewport,
1673
- se as Location,
1674
- Yn as PopOver,
1675
- vt as Rect,
1676
- qn as Resource,
1677
- Rn as ResourceDisplay,
1678
- On as ResultView,
1679
- Gn as Router,
1680
- Xn as SelectOnFocus,
1681
- Mn as Ticker,
1682
- In as WhenInViewport,
1683
- Jn as WindowSize,
1684
- Le as _checkExtensionCondition,
1685
- Ee as _getExtension,
1686
- Tn as _makeRouteMatcher,
1687
- Sn as _parseRouteSegments,
1688
- jn as allPlacements,
1689
- Pe as areLocationsEqual,
1690
- _t as getAbsoluteRect,
1691
- Te as handleAnchorClick,
1692
- oe as locationFromURL,
1693
- An as makeResource,
1694
- Ln as matchesRoute,
1695
- Cn as nowSignal,
1696
- Qn as relativeTime,
1697
- Wn as relativeTimeMillisSignal,
1698
- Fn as relativeTimeSignal,
1699
- Nt as setLocationFromUrl,
1700
- Zn as ticker,
1701
- Dn as timeDiffToString,
1702
- Et as urlFromLocation,
1703
- Ve as useAppearance
1714
+ $e as Anchor,
1715
+ Kn as Appearance,
1716
+ ce as AsyncResultView,
1717
+ _n as AutoFocus,
1718
+ In as AutoSelect,
1719
+ Pn as ElementRect,
1720
+ no as ElementSize,
1721
+ Yn as HTMLTitle,
1722
+ jn as HiddenWhenEmpty,
1723
+ ze as InViewport,
1724
+ ie as Location,
1725
+ Xn as OnClickOutside,
1726
+ Jn as OnEnterKey,
1727
+ Gn as OnEscapeKey,
1728
+ le as OnKeyPressed,
1729
+ Zn as PopOver,
1730
+ bt as Rect,
1731
+ to as Resource,
1732
+ Sn as ResourceDisplay,
1733
+ Tn as ResultView,
1734
+ so as Router,
1735
+ eo as SelectOnFocus,
1736
+ Hn as Ticker,
1737
+ qn as WhenInViewport,
1738
+ oo as WindowSize,
1739
+ Pe as _checkExtensionCondition,
1740
+ Te as _getExtension,
1741
+ Cn as _makeRouteMatcher,
1742
+ Dn as _parseRouteSegments,
1743
+ Qn as allPlacements,
1744
+ Ce as areLocationsEqual,
1745
+ It as getAbsoluteRect,
1746
+ De as handleAnchorClick,
1747
+ re as locationFromURL,
1748
+ Ln as makeResource,
1749
+ Ke as matchesKeyCombo,
1750
+ kn as matchesRoute,
1751
+ Mn as nowSignal,
1752
+ ro as relativeTime,
1753
+ Nn as relativeTimeMillisSignal,
1754
+ $n as relativeTimeSignal,
1755
+ $t as setLocationFromUrl,
1756
+ io as ticker,
1757
+ Vn as timeDiffToString,
1758
+ Lt as urlFromLocation,
1759
+ He as useAppearance
1704
1760
  };