@tempots/ui 15.0.0 → 15.0.1
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.cjs +1 -1
- package/index.js +518 -511
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getWindow as st, prop as M, makeProviderMark as
|
|
2
|
-
import { delayed as
|
|
1
|
+
import { getWindow as st, prop as M, makeProviderMark as Mt, computedOf as Nt, Signal as le, Use as ct, html as Pt, on as ue, Value as C, attr as Vt, Empty as Lt, OneOfType as fe, WithElement as _, OnDispose as N, Fragment as X, Portal as he, renderableOfTNode as de, When as me, previousSignal as We, effectOf as He, WithBrowserCtx as Fe, WithCtx as Me, OneOfTuple as pe, Provide as Ne, Prop as Ve } from "@tempots/dom";
|
|
2
|
+
import { delayed as ge, AsyncResult as R, nearEqual as mt, interval as $e } from "@tempots/std";
|
|
3
3
|
const ze = (t) => {
|
|
4
4
|
const e = t.split("/").pop();
|
|
5
5
|
if (e == null || e.startsWith(".")) return;
|
|
@@ -40,7 +40,7 @@ const ze = (t) => {
|
|
|
40
40
|
e.ignoreExternalUrl ?? !0
|
|
41
41
|
) || t() && o.preventDefault();
|
|
42
42
|
};
|
|
43
|
-
}, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash,
|
|
43
|
+
}, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, kt = (t, e) => {
|
|
44
44
|
const n = new URL(t, e ?? st()?.location.toString()), o = Object.fromEntries(n.searchParams?.entries() ?? []);
|
|
45
45
|
let s = n.hash;
|
|
46
46
|
return s.startsWith("#") && (s = s.substring(1)), {
|
|
@@ -69,7 +69,7 @@ const ze = (t) => {
|
|
|
69
69
|
e && e.requestAnimationFrame(
|
|
70
70
|
() => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
|
|
71
71
|
);
|
|
72
|
-
},
|
|
72
|
+
}, Xt = (t, e) => {
|
|
73
73
|
e?.viewTransition ? je(t) : t();
|
|
74
74
|
}, Ie = () => {
|
|
75
75
|
const t = M(jt(), Ke), e = st(), n = () => {
|
|
@@ -77,15 +77,15 @@ const ze = (t) => {
|
|
|
77
77
|
};
|
|
78
78
|
e?.addEventListener("popstate", n), e?.addEventListener("hashchange", n);
|
|
79
79
|
const o = (c, l, u) => {
|
|
80
|
-
|
|
80
|
+
Xt(() => {
|
|
81
81
|
if (e) {
|
|
82
|
-
const h = et(c),
|
|
83
|
-
u === "replaceState" || l?.replace ? e.history.replaceState(
|
|
82
|
+
const h = et(c), m = l?.state ?? {};
|
|
83
|
+
u === "replaceState" || l?.replace ? e.history.replaceState(m, "", h) : e.history.pushState(m, "", h);
|
|
84
84
|
}
|
|
85
85
|
t.set(c);
|
|
86
86
|
}, l), It(l);
|
|
87
87
|
}, s = (c, l) => {
|
|
88
|
-
|
|
88
|
+
Xt(() => {
|
|
89
89
|
e?.history.go(c);
|
|
90
90
|
}, l), It(l);
|
|
91
91
|
};
|
|
@@ -95,16 +95,16 @@ const ze = (t) => {
|
|
|
95
95
|
go: s,
|
|
96
96
|
back: (c) => s(-1, c),
|
|
97
97
|
forward: (c) => s(1, c),
|
|
98
|
-
resolve: (c) =>
|
|
98
|
+
resolve: (c) => kt(c),
|
|
99
99
|
dispose: () => {
|
|
100
100
|
e?.removeEventListener("popstate", n), e?.removeEventListener("hashchange", n), t.dispose();
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
},
|
|
103
|
+
}, Xe = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ye = (t) => {
|
|
104
104
|
const e = t.container.currentURL, n = e.iso(
|
|
105
|
-
(r) =>
|
|
105
|
+
(r) => kt(r, e.value),
|
|
106
106
|
(r) => {
|
|
107
|
-
if (
|
|
107
|
+
if (Xe(r.pathname))
|
|
108
108
|
return et(r);
|
|
109
109
|
const a = new URL(r.pathname, e.value), c = a.origin + a.pathname;
|
|
110
110
|
return et({ ...r, pathname: c });
|
|
@@ -126,22 +126,22 @@ const ze = (t) => {
|
|
|
126
126
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
127
127
|
forward: (r) => {
|
|
128
128
|
},
|
|
129
|
-
resolve: (r) =>
|
|
129
|
+
resolve: (r) => kt(r, e.value)
|
|
130
130
|
};
|
|
131
131
|
}, it = (t) => ({
|
|
132
132
|
pathname: t.pathname,
|
|
133
133
|
search: { ...t.search },
|
|
134
134
|
hash: t.hash ?? void 0
|
|
135
|
-
}),
|
|
135
|
+
}), Tt = (t) => {
|
|
136
136
|
if (t == null) return;
|
|
137
137
|
const e = `${t}`;
|
|
138
138
|
return e === "" ? void 0 : e;
|
|
139
|
-
},
|
|
139
|
+
}, we = (t, e) => {
|
|
140
140
|
const n = { ...t };
|
|
141
141
|
for (const [o, s] of Object.entries(e))
|
|
142
142
|
s == null ? delete n[o] : n[o] = s;
|
|
143
143
|
return n;
|
|
144
|
-
},
|
|
144
|
+
}, qe = (t, e) => {
|
|
145
145
|
const n = e?.includeSearch ?? !0, o = e?.includeHash ?? !0, s = e?.ignoreSearchParams ?? [];
|
|
146
146
|
let i;
|
|
147
147
|
if (!n)
|
|
@@ -159,8 +159,8 @@ const ze = (t) => {
|
|
|
159
159
|
search: i,
|
|
160
160
|
hash: o ? t.hash : void 0
|
|
161
161
|
};
|
|
162
|
-
},
|
|
163
|
-
const o =
|
|
162
|
+
}, Yt = (t, e, n) => {
|
|
163
|
+
const o = qe(t, n);
|
|
164
164
|
return typeof e == "string" ? et(o) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(o))) : e(o);
|
|
165
165
|
};
|
|
166
166
|
class Qe {
|
|
@@ -180,7 +180,7 @@ class Qe {
|
|
|
180
180
|
}, this;
|
|
181
181
|
}
|
|
182
182
|
setHash(e) {
|
|
183
|
-
const n =
|
|
183
|
+
const n = Tt(e);
|
|
184
184
|
if (n == null) {
|
|
185
185
|
const { hash: o, ...s } = this.current;
|
|
186
186
|
this.current = s;
|
|
@@ -198,7 +198,7 @@ class Qe {
|
|
|
198
198
|
setSearch(e) {
|
|
199
199
|
return this.current = {
|
|
200
200
|
...this.current,
|
|
201
|
-
search:
|
|
201
|
+
search: we(this.current.search, e)
|
|
202
202
|
}, this;
|
|
203
203
|
}
|
|
204
204
|
setSearchParam(e, n) {
|
|
@@ -212,42 +212,42 @@ class Qe {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
const Je = (t, e) => t?.replace ? "replaceState" : e, Ge = (t) => {
|
|
215
|
-
const e = t.location, n = e.map(et), o = e.map((
|
|
215
|
+
const e = t.location, n = e.map(et), o = e.map((g) => g.pathname), s = e.map((g) => ({ ...g.search })), i = e.map((g) => g.hash), r = (g, x) => Yt(t.location.value, g, x), a = (g, x) => Nt(
|
|
216
216
|
e,
|
|
217
|
-
|
|
217
|
+
g
|
|
218
218
|
)(
|
|
219
|
-
(S,
|
|
220
|
-
), c = (
|
|
221
|
-
const
|
|
222
|
-
...
|
|
223
|
-
hash:
|
|
219
|
+
(S, L) => Yt(S, L, x)
|
|
220
|
+
), c = (g, x, S) => {
|
|
221
|
+
const L = it({
|
|
222
|
+
...g,
|
|
223
|
+
hash: Tt(g.hash ?? void 0)
|
|
224
224
|
});
|
|
225
|
-
t.commit(
|
|
226
|
-
}, l = (
|
|
225
|
+
t.commit(L, x, S);
|
|
226
|
+
}, l = (g, x) => {
|
|
227
227
|
const S = Je(x, "pushState");
|
|
228
|
-
c(
|
|
229
|
-
}, u = (
|
|
230
|
-
const S =
|
|
228
|
+
c(g, x, S);
|
|
229
|
+
}, u = (g, x) => {
|
|
230
|
+
const S = g(it(t.location.value));
|
|
231
231
|
l(S, x);
|
|
232
|
-
}, h = (
|
|
233
|
-
const S = t.resolve(
|
|
232
|
+
}, h = (g, x) => {
|
|
233
|
+
const S = t.resolve(g);
|
|
234
234
|
l(S, x);
|
|
235
|
-
},
|
|
235
|
+
}, m = (g, x) => {
|
|
236
236
|
const S = { ...x, replace: !0 };
|
|
237
|
-
h(
|
|
238
|
-
}, f = (
|
|
239
|
-
t.go(
|
|
240
|
-
}, d = (
|
|
241
|
-
t.back(
|
|
242
|
-
}, y = (
|
|
243
|
-
t.forward(
|
|
244
|
-
},
|
|
245
|
-
const
|
|
246
|
-
return K == null ? delete
|
|
247
|
-
}, x), b = (
|
|
237
|
+
h(g, S);
|
|
238
|
+
}, f = (g, x) => {
|
|
239
|
+
t.go(g, x);
|
|
240
|
+
}, d = (g) => {
|
|
241
|
+
t.back(g);
|
|
242
|
+
}, y = (g) => {
|
|
243
|
+
t.forward(g);
|
|
244
|
+
}, p = (g, x) => u((S) => ({ ...S, pathname: g }), x), v = (g, x) => u((S) => {
|
|
245
|
+
const L = { ...S }, K = Tt(g);
|
|
246
|
+
return K == null ? delete L.hash : L.hash = K, L;
|
|
247
|
+
}, x), b = (g) => v(void 0, g), w = (g, x) => u(
|
|
248
248
|
(S) => ({
|
|
249
249
|
...S,
|
|
250
|
-
search:
|
|
250
|
+
search: we(S.search, g)
|
|
251
251
|
}),
|
|
252
252
|
x
|
|
253
253
|
);
|
|
@@ -261,28 +261,28 @@ const Je = (t, e) => t?.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
261
261
|
setLocation: l,
|
|
262
262
|
updateLocation: u,
|
|
263
263
|
navigate: h,
|
|
264
|
-
replace:
|
|
264
|
+
replace: m,
|
|
265
265
|
go: f,
|
|
266
266
|
back: d,
|
|
267
267
|
forward: y,
|
|
268
|
-
setPathname:
|
|
268
|
+
setPathname: p,
|
|
269
269
|
setHash: v,
|
|
270
270
|
clearHash: b,
|
|
271
271
|
setSearch: w,
|
|
272
|
-
setSearchParam: (
|
|
273
|
-
updateSearch: (
|
|
272
|
+
setSearchParam: (g, x, S) => w({ [g]: x }, S),
|
|
273
|
+
updateSearch: (g, x) => u(
|
|
274
274
|
(S) => ({
|
|
275
275
|
...S,
|
|
276
|
-
search: { ...
|
|
276
|
+
search: { ...g({ ...S.search }) }
|
|
277
277
|
}),
|
|
278
278
|
x
|
|
279
279
|
),
|
|
280
|
-
queryParam: (
|
|
281
|
-
run: (
|
|
280
|
+
queryParam: (g) => e.map((x) => x.search[g]),
|
|
281
|
+
run: (g, x) => {
|
|
282
282
|
const S = new Qe(
|
|
283
283
|
it(t.location.value)
|
|
284
284
|
);
|
|
285
|
-
|
|
285
|
+
g(S), l(it(S.location), x);
|
|
286
286
|
},
|
|
287
287
|
match: r,
|
|
288
288
|
matchSignal: a
|
|
@@ -295,10 +295,10 @@ const Je = (t, e) => t?.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
295
295
|
if (t.isBrowser())
|
|
296
296
|
return Ie();
|
|
297
297
|
if (t.isHeadless())
|
|
298
|
-
return
|
|
298
|
+
return Ye(t);
|
|
299
299
|
throw new Error("Unknown context");
|
|
300
|
-
},
|
|
301
|
-
mark:
|
|
300
|
+
}, $t = {
|
|
301
|
+
mark: Mt("Location"),
|
|
302
302
|
create: (t, e) => {
|
|
303
303
|
const n = Ze(e), { handle: o, dispose: s } = Ge(n);
|
|
304
304
|
return {
|
|
@@ -307,11 +307,11 @@ const Je = (t, e) => t?.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
}, tn = (t, ...e) => {
|
|
310
|
-
if (typeof t == "string" ||
|
|
310
|
+
if (typeof t == "string" || le.is(t))
|
|
311
311
|
return tn({ href: t }, ...e);
|
|
312
312
|
const { href: n, state: o, scroll: s, viewTransition: i, replace: r, ...a } = t;
|
|
313
|
-
return ct(
|
|
314
|
-
|
|
313
|
+
return ct($t, (c) => Pt.a(
|
|
314
|
+
ue.click(
|
|
315
315
|
Ue(() => {
|
|
316
316
|
let l = !1;
|
|
317
317
|
const u = {};
|
|
@@ -321,12 +321,12 @@ const Je = (t, e) => t?.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
321
321
|
), !0;
|
|
322
322
|
}, a)
|
|
323
323
|
),
|
|
324
|
-
|
|
324
|
+
Vt.href(n),
|
|
325
325
|
...e
|
|
326
326
|
/* c8 ignore next 2 */
|
|
327
327
|
));
|
|
328
|
-
},
|
|
329
|
-
mark:
|
|
328
|
+
}, bo = {
|
|
329
|
+
mark: Mt("Appearance"),
|
|
330
330
|
create: () => {
|
|
331
331
|
const t = en();
|
|
332
332
|
return {
|
|
@@ -339,34 +339,34 @@ function en() {
|
|
|
339
339
|
const t = st(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = e?.matches ?? !1, o = M(n ? "dark" : "light"), s = (i) => o.set(i.matches ? "dark" : "light");
|
|
340
340
|
return e?.addEventListener("change", s), o.onDispose(() => e?.removeEventListener("change", s)), o;
|
|
341
341
|
}
|
|
342
|
-
const
|
|
342
|
+
const ve = (t, e) => {
|
|
343
343
|
if (typeof e == "function")
|
|
344
|
-
return
|
|
345
|
-
const n = e.failure ?? ((r) => r.map((a) => `Error: ${a}`)), o = e.success, s = e.loading ?? (() =>
|
|
346
|
-
return
|
|
344
|
+
return ve(t, { success: e });
|
|
345
|
+
const n = e.failure ?? ((r) => r.map((a) => `Error: ${a}`)), o = e.success, s = e.loading ?? (() => Lt), i = e.notAsked ?? (() => Lt);
|
|
346
|
+
return fe(C.toSignal(t), {
|
|
347
347
|
AsyncSuccess: (r) => o(r.$.value),
|
|
348
348
|
AsyncFailure: (r) => n(r.$.error),
|
|
349
349
|
Loading: (r) => s(r.map((a) => a.previousValue)),
|
|
350
350
|
NotAsked: i
|
|
351
351
|
});
|
|
352
|
-
},
|
|
353
|
-
const n =
|
|
352
|
+
}, So = (t = 10) => _((e) => N(ge(() => e?.focus(), t))), Oo = (t = 10) => _((e) => {
|
|
353
|
+
const n = ge(() => e.select(), t);
|
|
354
354
|
return N(n);
|
|
355
355
|
});
|
|
356
|
-
function
|
|
356
|
+
function Ao(t) {
|
|
357
357
|
const e = Object.entries(t);
|
|
358
|
-
return
|
|
358
|
+
return X(
|
|
359
359
|
...e.map(
|
|
360
|
-
([n, o]) =>
|
|
360
|
+
([n, o]) => Vt.class(C.map(o, (s) => s ? n : void 0))
|
|
361
361
|
)
|
|
362
362
|
);
|
|
363
363
|
}
|
|
364
|
-
const
|
|
364
|
+
const Ro = _((t) => {
|
|
365
365
|
const e = t.style.getPropertyValue(":empty");
|
|
366
366
|
return t.style.setProperty(":empty", "display:none"), N((n) => {
|
|
367
367
|
n && t.style.setProperty(":empty", e);
|
|
368
368
|
});
|
|
369
|
-
}),
|
|
369
|
+
}), Eo = (t) => he("head > title", Vt.innerText(t)), nn = {
|
|
370
370
|
partial: {
|
|
371
371
|
root: null,
|
|
372
372
|
rootMargin: "0px",
|
|
@@ -393,7 +393,7 @@ function on(t) {
|
|
|
393
393
|
}
|
|
394
394
|
const sn = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
395
395
|
const o = M(!1);
|
|
396
|
-
return
|
|
396
|
+
return X(
|
|
397
397
|
_((s) => {
|
|
398
398
|
const i = typeof IntersectionObserver < "u" ? on(t) : null;
|
|
399
399
|
gt[t].set(s, o), i?.observe(s);
|
|
@@ -407,9 +407,9 @@ const sn = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
|
407
407
|
o.dispose(), r(), a?.();
|
|
408
408
|
});
|
|
409
409
|
}),
|
|
410
|
-
|
|
410
|
+
de(n(o))
|
|
411
411
|
);
|
|
412
|
-
},
|
|
412
|
+
}, Po = (t, e, n) => sn(t, (o) => me(o, e, n ?? (() => Lt)));
|
|
413
413
|
function rn(t) {
|
|
414
414
|
return _((e) => {
|
|
415
415
|
const n = (o) => {
|
|
@@ -420,14 +420,14 @@ function rn(t) {
|
|
|
420
420
|
});
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
const Z = (t, e) => t === void 0 || t === e,
|
|
423
|
+
const Z = (t, e) => t === void 0 || t === e, qt = (t, e) => t === void 0 || t === e;
|
|
424
424
|
function an(t, e) {
|
|
425
|
-
return typeof t == "string" ? e.key === t :
|
|
425
|
+
return typeof t == "string" ? e.key === t : qt(t.key, e.key) && qt(t.code, e.code) && Z(t.ctrlKey, e.ctrlKey) && Z(t.altKey, e.altKey) && Z(t.shiftKey, e.shiftKey) && Z(t.metaKey, e.metaKey) && Z(t.repeat, e.repeat) && Z(
|
|
426
426
|
t.commandOrControlKey,
|
|
427
427
|
e.metaKey || e.ctrlKey
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function ye({
|
|
431
431
|
allowedKeys: t,
|
|
432
432
|
handler: e
|
|
433
433
|
}) {
|
|
@@ -446,11 +446,11 @@ function ve({
|
|
|
446
446
|
});
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
return
|
|
449
|
+
function Lo(t) {
|
|
450
|
+
return ye({ allowedKeys: ["Enter"], handler: t });
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
452
|
+
function ko(t) {
|
|
453
|
+
return ye({ allowedKeys: ["Escape"], handler: t });
|
|
454
454
|
}
|
|
455
455
|
const cn = ({
|
|
456
456
|
mutate: t,
|
|
@@ -474,10 +474,10 @@ const cn = ({
|
|
|
474
474
|
pending: l,
|
|
475
475
|
execute: async (d, y) => {
|
|
476
476
|
u(), i = new AbortController();
|
|
477
|
-
const
|
|
477
|
+
const p = i.signal, v = r.get(), b = y?.optimisticValue ?? (y?.optimisticFromRequest != null ? y.optimisticFromRequest(d) : void 0);
|
|
478
478
|
b != null ? r.set(R.loading(b)) : r.set(R.loading(R.getOrUndefined(v)));
|
|
479
479
|
try {
|
|
480
|
-
const w = await t({ request: d, abortSignal:
|
|
480
|
+
const w = await t({ request: d, abortSignal: p, previous: v });
|
|
481
481
|
i = void 0, r.set(R.success(w)), n?.(w, d);
|
|
482
482
|
} catch (w) {
|
|
483
483
|
i = void 0, r.set(R.failure(e(w))), o?.(e(w), d);
|
|
@@ -492,8 +492,8 @@ const cn = ({
|
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
494
|
}, ln = (t, e) => {
|
|
495
|
-
const { status: n, dispose: o, execute: s, cancel: i, pending: r, error: a, value: c } = t, { content: l } = e, u =
|
|
496
|
-
return
|
|
495
|
+
const { status: n, dispose: o, execute: s, cancel: i, pending: r, error: a, value: c } = t, { content: l } = e, u = We(c);
|
|
496
|
+
return X(
|
|
497
497
|
N(o),
|
|
498
498
|
l({
|
|
499
499
|
previous: u,
|
|
@@ -505,7 +505,7 @@ const cn = ({
|
|
|
505
505
|
status: n
|
|
506
506
|
})
|
|
507
507
|
);
|
|
508
|
-
},
|
|
508
|
+
}, To = ({
|
|
509
509
|
mutate: t,
|
|
510
510
|
convertError: e = (r) => r,
|
|
511
511
|
onSuccess: n,
|
|
@@ -533,7 +533,7 @@ const cn = ({
|
|
|
533
533
|
start: "end",
|
|
534
534
|
end: "start"
|
|
535
535
|
};
|
|
536
|
-
function
|
|
536
|
+
function Ct(t, e, n) {
|
|
537
537
|
return Q(t, nt(e, n));
|
|
538
538
|
}
|
|
539
539
|
function ft(t, e) {
|
|
@@ -545,30 +545,30 @@ function J(t) {
|
|
|
545
545
|
function ht(t) {
|
|
546
546
|
return t.split("-")[1];
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function xe(t) {
|
|
549
549
|
return t === "x" ? "y" : "x";
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function zt(t) {
|
|
552
552
|
return t === "y" ? "height" : "width";
|
|
553
553
|
}
|
|
554
554
|
const hn = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
555
555
|
function I(t) {
|
|
556
556
|
return hn.has(J(t)) ? "y" : "x";
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
return
|
|
558
|
+
function Bt(t) {
|
|
559
|
+
return xe(I(t));
|
|
560
560
|
}
|
|
561
561
|
function dn(t, e, n) {
|
|
562
562
|
n === void 0 && (n = !1);
|
|
563
|
-
const o = ht(t), s =
|
|
563
|
+
const o = ht(t), s = Bt(t), i = zt(s);
|
|
564
564
|
let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
565
565
|
return e.reference[i] > e.floating[i] && (r = vt(r)), [r, vt(r)];
|
|
566
566
|
}
|
|
567
567
|
function mn(t) {
|
|
568
568
|
const e = vt(t);
|
|
569
|
-
return [
|
|
569
|
+
return [Dt(t), e, Dt(e)];
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Dt(t) {
|
|
572
572
|
return t.replace(/start|end/g, (e) => fn[e]);
|
|
573
573
|
}
|
|
574
574
|
const Qt = ["left", "right"], Jt = ["right", "left"], pn = ["top", "bottom"], gn = ["bottom", "top"];
|
|
@@ -587,7 +587,7 @@ function wn(t, e, n) {
|
|
|
587
587
|
function vn(t, e, n, o) {
|
|
588
588
|
const s = ht(t);
|
|
589
589
|
let i = wn(J(t), n === "start", o);
|
|
590
|
-
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(
|
|
590
|
+
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(Dt)))), i;
|
|
591
591
|
}
|
|
592
592
|
function vt(t) {
|
|
593
593
|
return t.replace(/left|right|bottom|top/g, (e) => un[e]);
|
|
@@ -601,7 +601,7 @@ function yn(t) {
|
|
|
601
601
|
...t
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function be(t) {
|
|
605
605
|
return typeof t != "number" ? yn(t) : {
|
|
606
606
|
top: t,
|
|
607
607
|
right: t,
|
|
@@ -632,7 +632,7 @@ function Gt(t, e, n) {
|
|
|
632
632
|
reference: o,
|
|
633
633
|
floating: s
|
|
634
634
|
} = t;
|
|
635
|
-
const i = I(e), r =
|
|
635
|
+
const i = I(e), r = Bt(e), a = zt(r), c = J(e), l = i === "y", u = o.x + o.width / 2 - s.width / 2, h = o.y + o.height / 2 - s.height / 2, m = o[a] / 2 - s[a] / 2;
|
|
636
636
|
let f;
|
|
637
637
|
switch (c) {
|
|
638
638
|
case "top":
|
|
@@ -667,15 +667,60 @@ function Gt(t, e, n) {
|
|
|
667
667
|
}
|
|
668
668
|
switch (ht(e)) {
|
|
669
669
|
case "start":
|
|
670
|
-
f[r] -=
|
|
670
|
+
f[r] -= m * (n && l ? -1 : 1);
|
|
671
671
|
break;
|
|
672
672
|
case "end":
|
|
673
|
-
f[r] +=
|
|
673
|
+
f[r] += m * (n && l ? -1 : 1);
|
|
674
674
|
break;
|
|
675
675
|
}
|
|
676
676
|
return f;
|
|
677
677
|
}
|
|
678
|
-
|
|
678
|
+
async function xn(t, e) {
|
|
679
|
+
var n;
|
|
680
|
+
e === void 0 && (e = {});
|
|
681
|
+
const {
|
|
682
|
+
x: o,
|
|
683
|
+
y: s,
|
|
684
|
+
platform: i,
|
|
685
|
+
rects: r,
|
|
686
|
+
elements: a,
|
|
687
|
+
strategy: c
|
|
688
|
+
} = t, {
|
|
689
|
+
boundary: l = "clippingAncestors",
|
|
690
|
+
rootBoundary: u = "viewport",
|
|
691
|
+
elementContext: h = "floating",
|
|
692
|
+
altBoundary: m = !1,
|
|
693
|
+
padding: f = 0
|
|
694
|
+
} = ft(e, t), d = be(f), p = a[m ? h === "floating" ? "reference" : "floating" : h], v = yt(await i.getClippingRect({
|
|
695
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(p))) == null || n ? p : p.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
696
|
+
boundary: l,
|
|
697
|
+
rootBoundary: u,
|
|
698
|
+
strategy: c
|
|
699
|
+
})), b = h === "floating" ? {
|
|
700
|
+
x: o,
|
|
701
|
+
y: s,
|
|
702
|
+
width: r.floating.width,
|
|
703
|
+
height: r.floating.height
|
|
704
|
+
} : r.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), O = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
|
|
705
|
+
x: 1,
|
|
706
|
+
y: 1
|
|
707
|
+
} : {
|
|
708
|
+
x: 1,
|
|
709
|
+
y: 1
|
|
710
|
+
}, E = yt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
711
|
+
elements: a,
|
|
712
|
+
rect: b,
|
|
713
|
+
offsetParent: w,
|
|
714
|
+
strategy: c
|
|
715
|
+
}) : b);
|
|
716
|
+
return {
|
|
717
|
+
top: (v.top - E.top + d.top) / O.y,
|
|
718
|
+
bottom: (E.bottom - v.bottom + d.bottom) / O.y,
|
|
719
|
+
left: (v.left - E.left + d.left) / O.x,
|
|
720
|
+
right: (E.right - v.right + d.right) / O.x
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
const bn = async (t, e, n) => {
|
|
679
724
|
const {
|
|
680
725
|
placement: o = "bottom",
|
|
681
726
|
strategy: s = "absolute",
|
|
@@ -689,99 +734,57 @@ const xn = async (t, e, n) => {
|
|
|
689
734
|
}), {
|
|
690
735
|
x: u,
|
|
691
736
|
y: h
|
|
692
|
-
} = Gt(l, o, c),
|
|
693
|
-
for (let
|
|
737
|
+
} = Gt(l, o, c), m = o, f = {}, d = 0;
|
|
738
|
+
for (let p = 0; p < a.length; p++) {
|
|
739
|
+
var y;
|
|
694
740
|
const {
|
|
695
|
-
name:
|
|
696
|
-
fn:
|
|
697
|
-
} = a[
|
|
698
|
-
x:
|
|
699
|
-
y:
|
|
700
|
-
data:
|
|
701
|
-
reset:
|
|
702
|
-
} = await
|
|
741
|
+
name: v,
|
|
742
|
+
fn: b
|
|
743
|
+
} = a[p], {
|
|
744
|
+
x: w,
|
|
745
|
+
y: O,
|
|
746
|
+
data: E,
|
|
747
|
+
reset: A
|
|
748
|
+
} = await b({
|
|
703
749
|
x: u,
|
|
704
750
|
y: h,
|
|
705
751
|
initialPlacement: o,
|
|
706
|
-
placement:
|
|
752
|
+
placement: m,
|
|
707
753
|
strategy: s,
|
|
708
754
|
middlewareData: f,
|
|
709
755
|
rects: l,
|
|
710
|
-
platform:
|
|
756
|
+
platform: {
|
|
757
|
+
...r,
|
|
758
|
+
detectOverflow: (y = r.detectOverflow) != null ? y : xn
|
|
759
|
+
},
|
|
711
760
|
elements: {
|
|
712
761
|
reference: t,
|
|
713
762
|
floating: e
|
|
714
763
|
}
|
|
715
764
|
});
|
|
716
|
-
u =
|
|
765
|
+
u = w ?? u, h = O ?? h, f = {
|
|
717
766
|
...f,
|
|
718
|
-
[
|
|
719
|
-
...f[
|
|
720
|
-
...
|
|
767
|
+
[v]: {
|
|
768
|
+
...f[v],
|
|
769
|
+
...E
|
|
721
770
|
}
|
|
722
|
-
},
|
|
771
|
+
}, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (m = A.placement), A.rects && (l = A.rects === !0 ? await r.getElementRects({
|
|
723
772
|
reference: t,
|
|
724
773
|
floating: e,
|
|
725
774
|
strategy: s
|
|
726
|
-
}) :
|
|
775
|
+
}) : A.rects), {
|
|
727
776
|
x: u,
|
|
728
777
|
y: h
|
|
729
|
-
} = Gt(l,
|
|
778
|
+
} = Gt(l, m, c)), p = -1);
|
|
730
779
|
}
|
|
731
780
|
return {
|
|
732
781
|
x: u,
|
|
733
782
|
y: h,
|
|
734
|
-
placement:
|
|
783
|
+
placement: m,
|
|
735
784
|
strategy: s,
|
|
736
785
|
middlewareData: f
|
|
737
786
|
};
|
|
738
|
-
}
|
|
739
|
-
async function be(t, e) {
|
|
740
|
-
var n;
|
|
741
|
-
e === void 0 && (e = {});
|
|
742
|
-
const {
|
|
743
|
-
x: o,
|
|
744
|
-
y: s,
|
|
745
|
-
platform: i,
|
|
746
|
-
rects: r,
|
|
747
|
-
elements: a,
|
|
748
|
-
strategy: c
|
|
749
|
-
} = t, {
|
|
750
|
-
boundary: l = "clippingAncestors",
|
|
751
|
-
rootBoundary: u = "viewport",
|
|
752
|
-
elementContext: h = "floating",
|
|
753
|
-
altBoundary: g = !1,
|
|
754
|
-
padding: f = 0
|
|
755
|
-
} = ft(e, t), d = xe(f), m = a[g ? h === "floating" ? "reference" : "floating" : h], v = yt(await i.getClippingRect({
|
|
756
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(m))) == null || n ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
757
|
-
boundary: l,
|
|
758
|
-
rootBoundary: u,
|
|
759
|
-
strategy: c
|
|
760
|
-
})), b = h === "floating" ? {
|
|
761
|
-
x: o,
|
|
762
|
-
y: s,
|
|
763
|
-
width: r.floating.width,
|
|
764
|
-
height: r.floating.height
|
|
765
|
-
} : r.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), A = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
|
|
766
|
-
x: 1,
|
|
767
|
-
y: 1
|
|
768
|
-
} : {
|
|
769
|
-
x: 1,
|
|
770
|
-
y: 1
|
|
771
|
-
}, O = yt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
772
|
-
elements: a,
|
|
773
|
-
rect: b,
|
|
774
|
-
offsetParent: w,
|
|
775
|
-
strategy: c
|
|
776
|
-
}) : b);
|
|
777
|
-
return {
|
|
778
|
-
top: (v.top - O.top + d.top) / A.y,
|
|
779
|
-
bottom: (O.bottom - v.bottom + d.bottom) / A.y,
|
|
780
|
-
left: (v.left - O.left + d.left) / A.x,
|
|
781
|
-
right: (O.right - v.right + d.right) / A.x
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
const bn = (t) => ({
|
|
787
|
+
}, Sn = (t) => ({
|
|
785
788
|
name: "arrow",
|
|
786
789
|
options: t,
|
|
787
790
|
async fn(e) {
|
|
@@ -799,18 +802,18 @@ const bn = (t) => ({
|
|
|
799
802
|
} = ft(t, e) || {};
|
|
800
803
|
if (l == null)
|
|
801
804
|
return {};
|
|
802
|
-
const h =
|
|
805
|
+
const h = be(u), m = {
|
|
803
806
|
x: n,
|
|
804
807
|
y: o
|
|
805
|
-
}, f =
|
|
806
|
-
let
|
|
807
|
-
(!
|
|
808
|
-
const U =
|
|
808
|
+
}, f = Bt(s), d = zt(f), y = await r.getDimensions(l), p = f === "y", v = p ? "top" : "left", b = p ? "bottom" : "right", w = p ? "clientHeight" : "clientWidth", O = i.reference[d] + i.reference[f] - m[f] - i.floating[d], E = m[f] - i.reference[f], A = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
|
|
809
|
+
let P = A ? A[w] : 0;
|
|
810
|
+
(!P || !await (r.isElement == null ? void 0 : r.isElement(A))) && (P = a.floating[w] || i.floating[d]);
|
|
811
|
+
const U = O / 2 - E / 2, g = P / 2 - y[d] / 2 - 1, x = nt(h[v], g), S = nt(h[b], g), L = x, K = P - y[d] - S, k = P / 2 - y[d] / 2 + U, q = Ct(L, k, K), B = !c.arrow && ht(s) != null && k !== q && i.reference[d] / 2 - (k < L ? x : S) - y[d] / 2 < 0, D = B ? k < L ? k - L : k - K : 0;
|
|
809
812
|
return {
|
|
810
|
-
[f]:
|
|
813
|
+
[f]: m[f] + D,
|
|
811
814
|
data: {
|
|
812
|
-
[f]:
|
|
813
|
-
centerOffset:
|
|
815
|
+
[f]: q,
|
|
816
|
+
centerOffset: k - q - D,
|
|
814
817
|
...B && {
|
|
815
818
|
alignmentOffset: D
|
|
816
819
|
}
|
|
@@ -818,7 +821,7 @@ const bn = (t) => ({
|
|
|
818
821
|
reset: B
|
|
819
822
|
};
|
|
820
823
|
}
|
|
821
|
-
}),
|
|
824
|
+
}), On = function(t) {
|
|
822
825
|
return t === void 0 && (t = {}), {
|
|
823
826
|
name: "flip",
|
|
824
827
|
options: t,
|
|
@@ -834,54 +837,54 @@ const bn = (t) => ({
|
|
|
834
837
|
} = e, {
|
|
835
838
|
mainAxis: u = !0,
|
|
836
839
|
crossAxis: h = !0,
|
|
837
|
-
fallbackPlacements:
|
|
840
|
+
fallbackPlacements: m,
|
|
838
841
|
fallbackStrategy: f = "bestFit",
|
|
839
842
|
fallbackAxisSideDirection: d = "none",
|
|
840
843
|
flipAlignment: y = !0,
|
|
841
|
-
...
|
|
844
|
+
...p
|
|
842
845
|
} = ft(t, e);
|
|
843
846
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
844
847
|
return {};
|
|
845
|
-
const v = J(s), b = I(a), w = J(a) === a,
|
|
846
|
-
!
|
|
847
|
-
const
|
|
848
|
+
const v = J(s), b = I(a), w = J(a) === a, O = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), E = m || (w || !y ? [vt(a)] : mn(a)), A = d !== "none";
|
|
849
|
+
!m && A && E.push(...vn(a, y, d, O));
|
|
850
|
+
const P = [a, ...E], U = await c.detectOverflow(e, p), g = [];
|
|
848
851
|
let x = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
849
|
-
if (u &&
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
+
if (u && g.push(U[v]), h) {
|
|
853
|
+
const k = dn(s, r, O);
|
|
854
|
+
g.push(U[k[0]], U[k[1]]);
|
|
852
855
|
}
|
|
853
856
|
if (x = [...x, {
|
|
854
857
|
placement: s,
|
|
855
|
-
overflows:
|
|
856
|
-
}], !
|
|
857
|
-
var S,
|
|
858
|
-
const
|
|
859
|
-
if (
|
|
858
|
+
overflows: g
|
|
859
|
+
}], !g.every((k) => k <= 0)) {
|
|
860
|
+
var S, L;
|
|
861
|
+
const k = (((S = i.flip) == null ? void 0 : S.index) || 0) + 1, q = P[k];
|
|
862
|
+
if (q && (!(h === "alignment" ? b !== I(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
860
863
|
// overflows the main axis.
|
|
861
|
-
x.every((
|
|
864
|
+
x.every((W) => I(W.placement) === b ? W.overflows[0] > 0 : !0)))
|
|
862
865
|
return {
|
|
863
866
|
data: {
|
|
864
|
-
index:
|
|
867
|
+
index: k,
|
|
865
868
|
overflows: x
|
|
866
869
|
},
|
|
867
870
|
reset: {
|
|
868
|
-
placement:
|
|
871
|
+
placement: q
|
|
869
872
|
}
|
|
870
873
|
};
|
|
871
|
-
let B = (
|
|
874
|
+
let B = (L = x.filter((D) => D.overflows[0] <= 0).sort((D, W) => D.overflows[1] - W.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
872
875
|
if (!B)
|
|
873
876
|
switch (f) {
|
|
874
877
|
case "bestFit": {
|
|
875
878
|
var K;
|
|
876
|
-
const D = (K = x.filter((
|
|
877
|
-
if (
|
|
878
|
-
const j = I(
|
|
879
|
+
const D = (K = x.filter((W) => {
|
|
880
|
+
if (A) {
|
|
881
|
+
const j = I(W.placement);
|
|
879
882
|
return j === b || // Create a bias to the `y` side axis due to horizontal
|
|
880
883
|
// reading directions favoring greater width.
|
|
881
884
|
j === "y";
|
|
882
885
|
}
|
|
883
886
|
return !0;
|
|
884
|
-
}).map((
|
|
887
|
+
}).map((W) => [W.placement, W.overflows.filter((j) => j > 0).reduce((j, De) => j + De, 0)]).sort((W, j) => W[1] - j[1])[0]) == null ? void 0 : K[0];
|
|
885
888
|
D && (B = D);
|
|
886
889
|
break;
|
|
887
890
|
}
|
|
@@ -899,15 +902,15 @@ const bn = (t) => ({
|
|
|
899
902
|
return {};
|
|
900
903
|
}
|
|
901
904
|
};
|
|
902
|
-
},
|
|
903
|
-
async function
|
|
905
|
+
}, An = /* @__PURE__ */ new Set(["left", "top"]);
|
|
906
|
+
async function Rn(t, e) {
|
|
904
907
|
const {
|
|
905
908
|
placement: n,
|
|
906
909
|
platform: o,
|
|
907
910
|
elements: s
|
|
908
|
-
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = J(n), a = ht(n), c = I(n) === "y", l =
|
|
911
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = J(n), a = ht(n), c = I(n) === "y", l = An.has(r) ? -1 : 1, u = i && c ? -1 : 1, h = ft(e, t);
|
|
909
912
|
let {
|
|
910
|
-
mainAxis:
|
|
913
|
+
mainAxis: m,
|
|
911
914
|
crossAxis: f,
|
|
912
915
|
alignmentAxis: d
|
|
913
916
|
} = typeof h == "number" ? {
|
|
@@ -921,13 +924,13 @@ async function An(t, e) {
|
|
|
921
924
|
};
|
|
922
925
|
return a && typeof d == "number" && (f = a === "end" ? d * -1 : d), c ? {
|
|
923
926
|
x: f * u,
|
|
924
|
-
y:
|
|
927
|
+
y: m * l
|
|
925
928
|
} : {
|
|
926
|
-
x:
|
|
929
|
+
x: m * l,
|
|
927
930
|
y: f * u
|
|
928
931
|
};
|
|
929
932
|
}
|
|
930
|
-
const
|
|
933
|
+
const En = function(t) {
|
|
931
934
|
return t === void 0 && (t = 0), {
|
|
932
935
|
name: "offset",
|
|
933
936
|
options: t,
|
|
@@ -938,7 +941,7 @@ const Rn = function(t) {
|
|
|
938
941
|
y: i,
|
|
939
942
|
placement: r,
|
|
940
943
|
middlewareData: a
|
|
941
|
-
} = e, c = await
|
|
944
|
+
} = e, c = await Rn(e, t);
|
|
942
945
|
return r === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
943
946
|
x: s + c.x,
|
|
944
947
|
y: i + c.y,
|
|
@@ -949,7 +952,7 @@ const Rn = function(t) {
|
|
|
949
952
|
};
|
|
950
953
|
}
|
|
951
954
|
};
|
|
952
|
-
},
|
|
955
|
+
}, Pn = function(t) {
|
|
953
956
|
return t === void 0 && (t = {}), {
|
|
954
957
|
name: "shift",
|
|
955
958
|
options: t,
|
|
@@ -957,49 +960,50 @@ const Rn = function(t) {
|
|
|
957
960
|
const {
|
|
958
961
|
x: n,
|
|
959
962
|
y: o,
|
|
960
|
-
placement: s
|
|
963
|
+
placement: s,
|
|
964
|
+
platform: i
|
|
961
965
|
} = e, {
|
|
962
|
-
mainAxis:
|
|
963
|
-
crossAxis:
|
|
964
|
-
limiter:
|
|
965
|
-
fn: (
|
|
966
|
+
mainAxis: r = !0,
|
|
967
|
+
crossAxis: a = !1,
|
|
968
|
+
limiter: c = {
|
|
969
|
+
fn: (v) => {
|
|
966
970
|
let {
|
|
967
|
-
x:
|
|
968
|
-
y:
|
|
969
|
-
} =
|
|
971
|
+
x: b,
|
|
972
|
+
y: w
|
|
973
|
+
} = v;
|
|
970
974
|
return {
|
|
971
|
-
x:
|
|
972
|
-
y:
|
|
975
|
+
x: b,
|
|
976
|
+
y: w
|
|
973
977
|
};
|
|
974
978
|
}
|
|
975
979
|
},
|
|
976
|
-
...
|
|
977
|
-
} = ft(t, e),
|
|
980
|
+
...l
|
|
981
|
+
} = ft(t, e), u = {
|
|
978
982
|
x: n,
|
|
979
983
|
y: o
|
|
980
|
-
},
|
|
981
|
-
let
|
|
982
|
-
if (i) {
|
|
983
|
-
const m = g === "y" ? "top" : "left", v = g === "y" ? "bottom" : "right", b = f + u[m], w = f - u[v];
|
|
984
|
-
f = Tt(b, f, w);
|
|
985
|
-
}
|
|
984
|
+
}, h = await i.detectOverflow(e, l), m = I(J(s)), f = xe(m);
|
|
985
|
+
let d = u[f], y = u[m];
|
|
986
986
|
if (r) {
|
|
987
|
-
const
|
|
988
|
-
d =
|
|
987
|
+
const v = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = d + h[v], O = d - h[b];
|
|
988
|
+
d = Ct(w, d, O);
|
|
989
|
+
}
|
|
990
|
+
if (a) {
|
|
991
|
+
const v = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", w = y + h[v], O = y - h[b];
|
|
992
|
+
y = Ct(w, y, O);
|
|
989
993
|
}
|
|
990
|
-
const
|
|
994
|
+
const p = c.fn({
|
|
991
995
|
...e,
|
|
992
|
-
[
|
|
993
|
-
[
|
|
996
|
+
[f]: d,
|
|
997
|
+
[m]: y
|
|
994
998
|
});
|
|
995
999
|
return {
|
|
996
|
-
...
|
|
1000
|
+
...p,
|
|
997
1001
|
data: {
|
|
998
|
-
x:
|
|
999
|
-
y:
|
|
1002
|
+
x: p.x - n,
|
|
1003
|
+
y: p.y - o,
|
|
1000
1004
|
enabled: {
|
|
1001
|
-
[
|
|
1002
|
-
[
|
|
1005
|
+
[f]: r,
|
|
1006
|
+
[m]: a
|
|
1003
1007
|
}
|
|
1004
1008
|
}
|
|
1005
1009
|
};
|
|
@@ -1012,7 +1016,7 @@ function bt() {
|
|
|
1012
1016
|
function rt(t) {
|
|
1013
1017
|
return Se(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1014
1018
|
}
|
|
1015
|
-
function
|
|
1019
|
+
function T(t) {
|
|
1016
1020
|
var e;
|
|
1017
1021
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1018
1022
|
}
|
|
@@ -1021,18 +1025,18 @@ function z(t) {
|
|
|
1021
1025
|
return (e = (Se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1022
1026
|
}
|
|
1023
1027
|
function Se(t) {
|
|
1024
|
-
return bt() ? t instanceof Node || t instanceof
|
|
1028
|
+
return bt() ? t instanceof Node || t instanceof T(t).Node : !1;
|
|
1025
1029
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return bt() ? t instanceof Element || t instanceof
|
|
1030
|
+
function H(t) {
|
|
1031
|
+
return bt() ? t instanceof Element || t instanceof T(t).Element : !1;
|
|
1028
1032
|
}
|
|
1029
1033
|
function $(t) {
|
|
1030
|
-
return bt() ? t instanceof HTMLElement || t instanceof
|
|
1034
|
+
return bt() ? t instanceof HTMLElement || t instanceof T(t).HTMLElement : !1;
|
|
1031
1035
|
}
|
|
1032
1036
|
function Zt(t) {
|
|
1033
|
-
return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
1037
|
+
return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof T(t).ShadowRoot;
|
|
1034
1038
|
}
|
|
1035
|
-
const
|
|
1039
|
+
const Ln = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1036
1040
|
function dt(t) {
|
|
1037
1041
|
const {
|
|
1038
1042
|
overflow: e,
|
|
@@ -1040,15 +1044,15 @@ function dt(t) {
|
|
|
1040
1044
|
overflowY: o,
|
|
1041
1045
|
display: s
|
|
1042
1046
|
} = F(t);
|
|
1043
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !
|
|
1047
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Ln.has(s);
|
|
1044
1048
|
}
|
|
1045
|
-
const
|
|
1046
|
-
function
|
|
1047
|
-
return
|
|
1049
|
+
const kn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1050
|
+
function Tn(t) {
|
|
1051
|
+
return kn.has(rt(t));
|
|
1048
1052
|
}
|
|
1049
|
-
const
|
|
1053
|
+
const Cn = [":popover-open", ":modal"];
|
|
1050
1054
|
function St(t) {
|
|
1051
|
-
return
|
|
1055
|
+
return Cn.some((e) => {
|
|
1052
1056
|
try {
|
|
1053
1057
|
return t.matches(e);
|
|
1054
1058
|
} catch {
|
|
@@ -1056,34 +1060,34 @@ function St(t) {
|
|
|
1056
1060
|
}
|
|
1057
1061
|
});
|
|
1058
1062
|
}
|
|
1059
|
-
const
|
|
1060
|
-
function
|
|
1061
|
-
const e =
|
|
1062
|
-
return
|
|
1063
|
+
const Dn = ["transform", "translate", "scale", "rotate", "perspective"], Wn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Hn = ["paint", "layout", "strict", "content"];
|
|
1064
|
+
function _t(t) {
|
|
1065
|
+
const e = Ut(), n = H(t) ? F(t) : t;
|
|
1066
|
+
return Dn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Wn.some((o) => (n.willChange || "").includes(o)) || Hn.some((o) => (n.contain || "").includes(o));
|
|
1063
1067
|
}
|
|
1064
|
-
function
|
|
1065
|
-
let e =
|
|
1068
|
+
function Fn(t) {
|
|
1069
|
+
let e = Y(t);
|
|
1066
1070
|
for (; $(e) && !ot(e); ) {
|
|
1067
|
-
if (
|
|
1071
|
+
if (_t(e))
|
|
1068
1072
|
return e;
|
|
1069
1073
|
if (St(e))
|
|
1070
1074
|
return null;
|
|
1071
|
-
e =
|
|
1075
|
+
e = Y(e);
|
|
1072
1076
|
}
|
|
1073
1077
|
return null;
|
|
1074
1078
|
}
|
|
1075
|
-
function
|
|
1079
|
+
function Ut() {
|
|
1076
1080
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1077
1081
|
}
|
|
1078
|
-
const
|
|
1082
|
+
const Mn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1079
1083
|
function ot(t) {
|
|
1080
|
-
return
|
|
1084
|
+
return Mn.has(rt(t));
|
|
1081
1085
|
}
|
|
1082
1086
|
function F(t) {
|
|
1083
|
-
return
|
|
1087
|
+
return T(t).getComputedStyle(t);
|
|
1084
1088
|
}
|
|
1085
1089
|
function Ot(t) {
|
|
1086
|
-
return
|
|
1090
|
+
return H(t) ? {
|
|
1087
1091
|
scrollLeft: t.scrollLeft,
|
|
1088
1092
|
scrollTop: t.scrollTop
|
|
1089
1093
|
} : {
|
|
@@ -1091,7 +1095,7 @@ function Ot(t) {
|
|
|
1091
1095
|
scrollTop: t.scrollY
|
|
1092
1096
|
};
|
|
1093
1097
|
}
|
|
1094
|
-
function
|
|
1098
|
+
function Y(t) {
|
|
1095
1099
|
if (rt(t) === "html")
|
|
1096
1100
|
return t;
|
|
1097
1101
|
const e = (
|
|
@@ -1104,20 +1108,20 @@ function q(t) {
|
|
|
1104
1108
|
return Zt(e) ? e.host : e;
|
|
1105
1109
|
}
|
|
1106
1110
|
function Oe(t) {
|
|
1107
|
-
const e =
|
|
1111
|
+
const e = Y(t);
|
|
1108
1112
|
return ot(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
|
|
1109
1113
|
}
|
|
1110
1114
|
function lt(t, e, n) {
|
|
1111
1115
|
var o;
|
|
1112
1116
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1113
|
-
const s = Oe(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r =
|
|
1117
|
+
const s = Oe(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r = T(s);
|
|
1114
1118
|
if (i) {
|
|
1115
|
-
const a =
|
|
1119
|
+
const a = Wt(r);
|
|
1116
1120
|
return e.concat(r, r.visualViewport || [], dt(s) ? s : [], a && n ? lt(a) : []);
|
|
1117
1121
|
}
|
|
1118
1122
|
return e.concat(s, lt(s, [], n));
|
|
1119
1123
|
}
|
|
1120
|
-
function
|
|
1124
|
+
function Wt(t) {
|
|
1121
1125
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1122
1126
|
}
|
|
1123
1127
|
function Ae(t) {
|
|
@@ -1130,11 +1134,11 @@ function Ae(t) {
|
|
|
1130
1134
|
$: a
|
|
1131
1135
|
};
|
|
1132
1136
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return
|
|
1137
|
+
function Kt(t) {
|
|
1138
|
+
return H(t) ? t : t.contextElement;
|
|
1135
1139
|
}
|
|
1136
1140
|
function tt(t) {
|
|
1137
|
-
const e =
|
|
1141
|
+
const e = Kt(t);
|
|
1138
1142
|
if (!$(e))
|
|
1139
1143
|
return V(1);
|
|
1140
1144
|
const n = e.getBoundingClientRect(), {
|
|
@@ -1148,30 +1152,30 @@ function tt(t) {
|
|
|
1148
1152
|
y: a
|
|
1149
1153
|
};
|
|
1150
1154
|
}
|
|
1151
|
-
const
|
|
1155
|
+
const Nn = /* @__PURE__ */ V(0);
|
|
1152
1156
|
function Re(t) {
|
|
1153
|
-
const e =
|
|
1154
|
-
return !
|
|
1157
|
+
const e = T(t);
|
|
1158
|
+
return !Ut() || !e.visualViewport ? Nn : {
|
|
1155
1159
|
x: e.visualViewport.offsetLeft,
|
|
1156
1160
|
y: e.visualViewport.offsetTop
|
|
1157
1161
|
};
|
|
1158
1162
|
}
|
|
1159
|
-
function
|
|
1160
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
1163
|
+
function Vn(t, e, n) {
|
|
1164
|
+
return e === void 0 && (e = !1), !n || e && n !== T(t) ? !1 : e;
|
|
1161
1165
|
}
|
|
1162
1166
|
function G(t, e, n, o) {
|
|
1163
1167
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1164
|
-
const s = t.getBoundingClientRect(), i =
|
|
1168
|
+
const s = t.getBoundingClientRect(), i = Kt(t);
|
|
1165
1169
|
let r = V(1);
|
|
1166
|
-
e && (o ?
|
|
1167
|
-
const a =
|
|
1170
|
+
e && (o ? H(o) && (r = tt(o)) : r = tt(t));
|
|
1171
|
+
const a = Vn(i, n, o) ? Re(i) : V(0);
|
|
1168
1172
|
let c = (s.left + a.x) / r.x, l = (s.top + a.y) / r.y, u = s.width / r.x, h = s.height / r.y;
|
|
1169
1173
|
if (i) {
|
|
1170
|
-
const
|
|
1171
|
-
let d =
|
|
1174
|
+
const m = T(i), f = o && H(o) ? T(o) : o;
|
|
1175
|
+
let d = m, y = Wt(d);
|
|
1172
1176
|
for (; y && o && f !== d; ) {
|
|
1173
|
-
const
|
|
1174
|
-
c *=
|
|
1177
|
+
const p = tt(y), v = y.getBoundingClientRect(), b = F(y), w = v.left + (y.clientLeft + parseFloat(b.paddingLeft)) * p.x, O = v.top + (y.clientTop + parseFloat(b.paddingTop)) * p.y;
|
|
1178
|
+
c *= p.x, l *= p.y, u *= p.x, h *= p.y, c += w, l += O, d = T(y), y = Wt(d);
|
|
1175
1179
|
}
|
|
1176
1180
|
}
|
|
1177
1181
|
return yt({
|
|
@@ -1181,22 +1185,18 @@ function G(t, e, n, o) {
|
|
|
1181
1185
|
y: l
|
|
1182
1186
|
});
|
|
1183
1187
|
}
|
|
1184
|
-
function
|
|
1188
|
+
function At(t, e) {
|
|
1185
1189
|
const n = Ot(t).scrollLeft;
|
|
1186
1190
|
return e ? e.left + n : G(z(t)).left + n;
|
|
1187
1191
|
}
|
|
1188
|
-
function Ee(t, e
|
|
1189
|
-
n
|
|
1190
|
-
const o = t.getBoundingClientRect(), s = o.left + e.scrollLeft - (n ? 0 : (
|
|
1191
|
-
// RTL <body> scrollbar.
|
|
1192
|
-
Kt(t, o)
|
|
1193
|
-
)), i = o.top + e.scrollTop;
|
|
1192
|
+
function Ee(t, e) {
|
|
1193
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - At(t, n), s = n.top + e.scrollTop;
|
|
1194
1194
|
return {
|
|
1195
|
-
x:
|
|
1196
|
-
y:
|
|
1195
|
+
x: o,
|
|
1196
|
+
y: s
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function $n(t) {
|
|
1200
1200
|
let {
|
|
1201
1201
|
elements: e,
|
|
1202
1202
|
rect: n,
|
|
@@ -1215,20 +1215,20 @@ function Vn(t) {
|
|
|
1215
1215
|
const f = G(o);
|
|
1216
1216
|
l = tt(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
|
|
1217
1217
|
}
|
|
1218
|
-
const
|
|
1218
|
+
const m = r && !h && !i ? Ee(r, c) : V(0);
|
|
1219
1219
|
return {
|
|
1220
1220
|
width: n.width * l.x,
|
|
1221
1221
|
height: n.height * l.y,
|
|
1222
|
-
x: n.x * l.x - c.scrollLeft * l.x + u.x +
|
|
1223
|
-
y: n.y * l.y - c.scrollTop * l.y + u.y +
|
|
1222
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + m.x,
|
|
1223
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + m.y
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function zn(t) {
|
|
1227
1227
|
return Array.from(t.getClientRects());
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function Bn(t) {
|
|
1230
1230
|
const e = z(t), n = Ot(t), o = t.ownerDocument.body, s = Q(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = Q(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1231
|
-
let r = -n.scrollLeft +
|
|
1231
|
+
let r = -n.scrollLeft + At(t);
|
|
1232
1232
|
const a = -n.scrollTop;
|
|
1233
1233
|
return F(o).direction === "rtl" && (r += Q(e.clientWidth, o.clientWidth) - s), {
|
|
1234
1234
|
width: s,
|
|
@@ -1237,14 +1237,20 @@ function zn(t) {
|
|
|
1237
1237
|
y: a
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1240
|
+
const te = 25;
|
|
1241
|
+
function _n(t, e) {
|
|
1242
|
+
const n = T(t), o = z(t), s = n.visualViewport;
|
|
1242
1243
|
let i = o.clientWidth, r = o.clientHeight, a = 0, c = 0;
|
|
1243
1244
|
if (s) {
|
|
1244
1245
|
i = s.width, r = s.height;
|
|
1245
|
-
const
|
|
1246
|
-
(!
|
|
1246
|
+
const u = Ut();
|
|
1247
|
+
(!u || u && e === "fixed") && (a = s.offsetLeft, c = s.offsetTop);
|
|
1247
1248
|
}
|
|
1249
|
+
const l = At(o);
|
|
1250
|
+
if (l <= 0) {
|
|
1251
|
+
const u = o.ownerDocument, h = u.body, m = getComputedStyle(h), f = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, d = Math.abs(o.clientWidth - h.clientWidth - f);
|
|
1252
|
+
d <= te && (i -= d);
|
|
1253
|
+
} else l <= te && (i += l);
|
|
1248
1254
|
return {
|
|
1249
1255
|
width: i,
|
|
1250
1256
|
height: r,
|
|
@@ -1252,7 +1258,8 @@ function Bn(t, e) {
|
|
|
1252
1258
|
y: c
|
|
1253
1259
|
};
|
|
1254
1260
|
}
|
|
1255
|
-
|
|
1261
|
+
const Un = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1262
|
+
function Kn(t, e) {
|
|
1256
1263
|
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = $(t) ? tt(t) : V(1), r = t.clientWidth * i.x, a = t.clientHeight * i.y, c = s * i.x, l = o * i.y;
|
|
1257
1264
|
return {
|
|
1258
1265
|
width: r,
|
|
@@ -1261,14 +1268,14 @@ function _n(t, e) {
|
|
|
1261
1268
|
y: l
|
|
1262
1269
|
};
|
|
1263
1270
|
}
|
|
1264
|
-
function
|
|
1271
|
+
function ee(t, e, n) {
|
|
1265
1272
|
let o;
|
|
1266
1273
|
if (e === "viewport")
|
|
1267
|
-
o =
|
|
1274
|
+
o = _n(t, n);
|
|
1268
1275
|
else if (e === "document")
|
|
1269
|
-
o =
|
|
1270
|
-
else if (
|
|
1271
|
-
o =
|
|
1276
|
+
o = Bn(z(t));
|
|
1277
|
+
else if (H(e))
|
|
1278
|
+
o = Kn(e, n);
|
|
1272
1279
|
else {
|
|
1273
1280
|
const s = Re(t);
|
|
1274
1281
|
o = {
|
|
@@ -1281,33 +1288,33 @@ function te(t, e, n) {
|
|
|
1281
1288
|
return yt(o);
|
|
1282
1289
|
}
|
|
1283
1290
|
function Pe(t, e) {
|
|
1284
|
-
const n =
|
|
1285
|
-
return n === e || !
|
|
1291
|
+
const n = Y(t);
|
|
1292
|
+
return n === e || !H(n) || ot(n) ? !1 : F(n).position === "fixed" || Pe(n, e);
|
|
1286
1293
|
}
|
|
1287
|
-
function
|
|
1294
|
+
function jn(t, e) {
|
|
1288
1295
|
const n = e.get(t);
|
|
1289
1296
|
if (n)
|
|
1290
1297
|
return n;
|
|
1291
|
-
let o = lt(t, [], !1).filter((a) =>
|
|
1298
|
+
let o = lt(t, [], !1).filter((a) => H(a) && rt(a) !== "body"), s = null;
|
|
1292
1299
|
const i = F(t).position === "fixed";
|
|
1293
|
-
let r = i ?
|
|
1294
|
-
for (;
|
|
1295
|
-
const a = F(r), c =
|
|
1296
|
-
!c && a.position === "fixed" && (s = null), (i ? !c && !s : !c && a.position === "static" && !!s &&
|
|
1300
|
+
let r = i ? Y(t) : t;
|
|
1301
|
+
for (; H(r) && !ot(r); ) {
|
|
1302
|
+
const a = F(r), c = _t(r);
|
|
1303
|
+
!c && a.position === "fixed" && (s = null), (i ? !c && !s : !c && a.position === "static" && !!s && Un.has(s.position) || dt(r) && !c && Pe(t, r)) ? o = o.filter((u) => u !== r) : s = a, r = Y(r);
|
|
1297
1304
|
}
|
|
1298
1305
|
return e.set(t, o), o;
|
|
1299
1306
|
}
|
|
1300
|
-
function
|
|
1307
|
+
function In(t) {
|
|
1301
1308
|
let {
|
|
1302
1309
|
element: e,
|
|
1303
1310
|
boundary: n,
|
|
1304
1311
|
rootBoundary: o,
|
|
1305
1312
|
strategy: s
|
|
1306
1313
|
} = t;
|
|
1307
|
-
const r = [...n === "clippingAncestors" ? St(e) ? [] :
|
|
1308
|
-
const h =
|
|
1314
|
+
const r = [...n === "clippingAncestors" ? St(e) ? [] : jn(e, this._c) : [].concat(n), o], a = r[0], c = r.reduce((l, u) => {
|
|
1315
|
+
const h = ee(e, u, s);
|
|
1309
1316
|
return l.top = Q(h.top, l.top), l.right = nt(h.right, l.right), l.bottom = nt(h.bottom, l.bottom), l.left = Q(h.left, l.left), l;
|
|
1310
|
-
},
|
|
1317
|
+
}, ee(e, a, s));
|
|
1311
1318
|
return {
|
|
1312
1319
|
width: c.right - c.left,
|
|
1313
1320
|
height: c.bottom - c.top,
|
|
@@ -1315,7 +1322,7 @@ function Kn(t) {
|
|
|
1315
1322
|
y: c.top
|
|
1316
1323
|
};
|
|
1317
1324
|
}
|
|
1318
|
-
function
|
|
1325
|
+
function Xn(t) {
|
|
1319
1326
|
const {
|
|
1320
1327
|
width: e,
|
|
1321
1328
|
height: n
|
|
@@ -1325,7 +1332,7 @@ function jn(t) {
|
|
|
1325
1332
|
height: n
|
|
1326
1333
|
};
|
|
1327
1334
|
}
|
|
1328
|
-
function
|
|
1335
|
+
function Yn(t, e, n) {
|
|
1329
1336
|
const o = $(e), s = z(e), i = n === "fixed", r = G(t, !0, i, e);
|
|
1330
1337
|
let a = {
|
|
1331
1338
|
scrollLeft: 0,
|
|
@@ -1333,7 +1340,7 @@ function In(t, e, n) {
|
|
|
1333
1340
|
};
|
|
1334
1341
|
const c = V(0);
|
|
1335
1342
|
function l() {
|
|
1336
|
-
c.x =
|
|
1343
|
+
c.x = At(s);
|
|
1337
1344
|
}
|
|
1338
1345
|
if (o || !o && !i)
|
|
1339
1346
|
if ((rt(e) !== "body" || dt(s)) && (a = Ot(e)), o) {
|
|
@@ -1341,18 +1348,18 @@ function In(t, e, n) {
|
|
|
1341
1348
|
c.x = f.x + e.clientLeft, c.y = f.y + e.clientTop;
|
|
1342
1349
|
} else s && l();
|
|
1343
1350
|
i && !o && s && l();
|
|
1344
|
-
const u = s && !o && !i ? Ee(s, a) : V(0), h = r.left + a.scrollLeft - c.x - u.x,
|
|
1351
|
+
const u = s && !o && !i ? Ee(s, a) : V(0), h = r.left + a.scrollLeft - c.x - u.x, m = r.top + a.scrollTop - c.y - u.y;
|
|
1345
1352
|
return {
|
|
1346
1353
|
x: h,
|
|
1347
|
-
y:
|
|
1354
|
+
y: m,
|
|
1348
1355
|
width: r.width,
|
|
1349
1356
|
height: r.height
|
|
1350
1357
|
};
|
|
1351
1358
|
}
|
|
1352
|
-
function
|
|
1359
|
+
function Et(t) {
|
|
1353
1360
|
return F(t).position === "static";
|
|
1354
1361
|
}
|
|
1355
|
-
function
|
|
1362
|
+
function ne(t, e) {
|
|
1356
1363
|
if (!$(t) || F(t).position === "fixed")
|
|
1357
1364
|
return null;
|
|
1358
1365
|
if (e)
|
|
@@ -1361,27 +1368,27 @@ function ee(t, e) {
|
|
|
1361
1368
|
return z(t) === n && (n = n.ownerDocument.body), n;
|
|
1362
1369
|
}
|
|
1363
1370
|
function Le(t, e) {
|
|
1364
|
-
const n =
|
|
1371
|
+
const n = T(t);
|
|
1365
1372
|
if (St(t))
|
|
1366
1373
|
return n;
|
|
1367
1374
|
if (!$(t)) {
|
|
1368
|
-
let s =
|
|
1375
|
+
let s = Y(t);
|
|
1369
1376
|
for (; s && !ot(s); ) {
|
|
1370
|
-
if (
|
|
1377
|
+
if (H(s) && !Et(s))
|
|
1371
1378
|
return s;
|
|
1372
|
-
s =
|
|
1379
|
+
s = Y(s);
|
|
1373
1380
|
}
|
|
1374
1381
|
return n;
|
|
1375
1382
|
}
|
|
1376
|
-
let o =
|
|
1377
|
-
for (; o &&
|
|
1378
|
-
o =
|
|
1379
|
-
return o && ot(o) &&
|
|
1383
|
+
let o = ne(t, e);
|
|
1384
|
+
for (; o && Tn(o) && Et(o); )
|
|
1385
|
+
o = ne(o, e);
|
|
1386
|
+
return o && ot(o) && Et(o) && !_t(o) ? n : o || Fn(t) || n;
|
|
1380
1387
|
}
|
|
1381
|
-
const
|
|
1388
|
+
const qn = async function(t) {
|
|
1382
1389
|
const e = this.getOffsetParent || Le, n = this.getDimensions, o = await n(t.floating);
|
|
1383
1390
|
return {
|
|
1384
|
-
reference:
|
|
1391
|
+
reference: Yn(t.reference, await e(t.floating), t.strategy),
|
|
1385
1392
|
floating: {
|
|
1386
1393
|
x: 0,
|
|
1387
1394
|
y: 0,
|
|
@@ -1390,25 +1397,25 @@ const Yn = async function(t) {
|
|
|
1390
1397
|
}
|
|
1391
1398
|
};
|
|
1392
1399
|
};
|
|
1393
|
-
function
|
|
1400
|
+
function Qn(t) {
|
|
1394
1401
|
return F(t).direction === "rtl";
|
|
1395
1402
|
}
|
|
1396
|
-
const
|
|
1397
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1403
|
+
const Jn = {
|
|
1404
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: $n,
|
|
1398
1405
|
getDocumentElement: z,
|
|
1399
|
-
getClippingRect:
|
|
1406
|
+
getClippingRect: In,
|
|
1400
1407
|
getOffsetParent: Le,
|
|
1401
|
-
getElementRects:
|
|
1402
|
-
getClientRects:
|
|
1403
|
-
getDimensions:
|
|
1408
|
+
getElementRects: qn,
|
|
1409
|
+
getClientRects: zn,
|
|
1410
|
+
getDimensions: Xn,
|
|
1404
1411
|
getScale: tt,
|
|
1405
|
-
isElement:
|
|
1406
|
-
isRTL:
|
|
1412
|
+
isElement: H,
|
|
1413
|
+
isRTL: Qn
|
|
1407
1414
|
};
|
|
1408
1415
|
function ke(t, e) {
|
|
1409
1416
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1410
1417
|
}
|
|
1411
|
-
function
|
|
1418
|
+
function Gn(t, e) {
|
|
1412
1419
|
let n = null, o;
|
|
1413
1420
|
const s = z(t);
|
|
1414
1421
|
function i() {
|
|
@@ -1420,41 +1427,41 @@ function Qn(t, e) {
|
|
|
1420
1427
|
const l = t.getBoundingClientRect(), {
|
|
1421
1428
|
left: u,
|
|
1422
1429
|
top: h,
|
|
1423
|
-
width:
|
|
1430
|
+
width: m,
|
|
1424
1431
|
height: f
|
|
1425
1432
|
} = l;
|
|
1426
|
-
if (a || e(), !
|
|
1433
|
+
if (a || e(), !m || !f)
|
|
1427
1434
|
return;
|
|
1428
|
-
const d = pt(h), y = pt(s.clientWidth - (u +
|
|
1429
|
-
rootMargin: -d + "px " + -y + "px " + -
|
|
1435
|
+
const d = pt(h), y = pt(s.clientWidth - (u + m)), p = pt(s.clientHeight - (h + f)), v = pt(u), w = {
|
|
1436
|
+
rootMargin: -d + "px " + -y + "px " + -p + "px " + -v + "px",
|
|
1430
1437
|
threshold: Q(0, nt(1, c)) || 1
|
|
1431
1438
|
};
|
|
1432
|
-
let
|
|
1433
|
-
function
|
|
1434
|
-
const
|
|
1435
|
-
if (
|
|
1436
|
-
if (!
|
|
1439
|
+
let O = !0;
|
|
1440
|
+
function E(A) {
|
|
1441
|
+
const P = A[0].intersectionRatio;
|
|
1442
|
+
if (P !== c) {
|
|
1443
|
+
if (!O)
|
|
1437
1444
|
return r();
|
|
1438
|
-
|
|
1445
|
+
P ? r(!1, P) : o = setTimeout(() => {
|
|
1439
1446
|
r(!1, 1e-7);
|
|
1440
1447
|
}, 1e3);
|
|
1441
1448
|
}
|
|
1442
|
-
|
|
1449
|
+
P === 1 && !ke(l, t.getBoundingClientRect()) && r(), O = !1;
|
|
1443
1450
|
}
|
|
1444
1451
|
try {
|
|
1445
|
-
n = new IntersectionObserver(
|
|
1452
|
+
n = new IntersectionObserver(E, {
|
|
1446
1453
|
...w,
|
|
1447
1454
|
// Handle <iframe>s
|
|
1448
1455
|
root: s.ownerDocument
|
|
1449
1456
|
});
|
|
1450
1457
|
} catch {
|
|
1451
|
-
n = new IntersectionObserver(
|
|
1458
|
+
n = new IntersectionObserver(E, w);
|
|
1452
1459
|
}
|
|
1453
1460
|
n.observe(t);
|
|
1454
1461
|
}
|
|
1455
1462
|
return r(!0), i;
|
|
1456
1463
|
}
|
|
1457
|
-
function
|
|
1464
|
+
function Zn(t, e, n, o) {
|
|
1458
1465
|
o === void 0 && (o = {});
|
|
1459
1466
|
const {
|
|
1460
1467
|
ancestorScroll: s = !0,
|
|
@@ -1462,26 +1469,26 @@ function Jn(t, e, n, o) {
|
|
|
1462
1469
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1463
1470
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1464
1471
|
animationFrame: c = !1
|
|
1465
|
-
} = o, l =
|
|
1472
|
+
} = o, l = Kt(t), u = s || i ? [...l ? lt(l) : [], ...lt(e)] : [];
|
|
1466
1473
|
u.forEach((v) => {
|
|
1467
1474
|
s && v.addEventListener("scroll", n, {
|
|
1468
1475
|
passive: !0
|
|
1469
1476
|
}), i && v.addEventListener("resize", n);
|
|
1470
1477
|
});
|
|
1471
|
-
const h = l && a ?
|
|
1472
|
-
let
|
|
1478
|
+
const h = l && a ? Gn(l, n) : null;
|
|
1479
|
+
let m = -1, f = null;
|
|
1473
1480
|
r && (f = new ResizeObserver((v) => {
|
|
1474
1481
|
let [b] = v;
|
|
1475
|
-
b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(
|
|
1482
|
+
b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1476
1483
|
var w;
|
|
1477
1484
|
(w = f) == null || w.observe(e);
|
|
1478
1485
|
})), n();
|
|
1479
1486
|
}), l && !c && f.observe(l), f.observe(e));
|
|
1480
1487
|
let d, y = c ? G(t) : null;
|
|
1481
|
-
c &&
|
|
1482
|
-
function
|
|
1488
|
+
c && p();
|
|
1489
|
+
function p() {
|
|
1483
1490
|
const v = G(t);
|
|
1484
|
-
y && !ke(y, v) && n(), y = v, d = requestAnimationFrame(
|
|
1491
|
+
y && !ke(y, v) && n(), y = v, d = requestAnimationFrame(p);
|
|
1485
1492
|
}
|
|
1486
1493
|
return n(), () => {
|
|
1487
1494
|
var v;
|
|
@@ -1490,19 +1497,19 @@ function Jn(t, e, n, o) {
|
|
|
1490
1497
|
}), h?.(), (v = f) == null || v.disconnect(), f = null, c && cancelAnimationFrame(d);
|
|
1491
1498
|
};
|
|
1492
1499
|
}
|
|
1493
|
-
const
|
|
1500
|
+
const to = En, eo = Pn, oe = On, no = Sn, oo = (t, e, n) => {
|
|
1494
1501
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1495
|
-
platform:
|
|
1502
|
+
platform: Jn,
|
|
1496
1503
|
...n
|
|
1497
1504
|
}, i = {
|
|
1498
1505
|
...s.platform,
|
|
1499
1506
|
_c: o
|
|
1500
1507
|
};
|
|
1501
|
-
return
|
|
1508
|
+
return bn(t, e, {
|
|
1502
1509
|
...s,
|
|
1503
1510
|
platform: i
|
|
1504
1511
|
});
|
|
1505
|
-
},
|
|
1512
|
+
}, Co = [
|
|
1506
1513
|
"top",
|
|
1507
1514
|
"top-start",
|
|
1508
1515
|
"top-end",
|
|
@@ -1515,7 +1522,7 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1515
1522
|
"left",
|
|
1516
1523
|
"left-start",
|
|
1517
1524
|
"left-end"
|
|
1518
|
-
],
|
|
1525
|
+
], Do = (t, e = { isOpen: !1 }) => {
|
|
1519
1526
|
const n = [];
|
|
1520
1527
|
let o = null;
|
|
1521
1528
|
const s = C.deriveProp(e.isOpen);
|
|
@@ -1525,16 +1532,16 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1525
1532
|
function r() {
|
|
1526
1533
|
s.set(!1), n.forEach((a) => a()), n.length = 0;
|
|
1527
1534
|
}
|
|
1528
|
-
return
|
|
1535
|
+
return X(
|
|
1529
1536
|
t(i, r),
|
|
1530
|
-
|
|
1537
|
+
me(
|
|
1531
1538
|
s,
|
|
1532
|
-
() =>
|
|
1539
|
+
() => X(
|
|
1533
1540
|
o?.onClickOutside != null ? rn(o.onClickOutside) : null,
|
|
1534
1541
|
_(
|
|
1535
|
-
(a) =>
|
|
1542
|
+
(a) => he(
|
|
1536
1543
|
"body",
|
|
1537
|
-
|
|
1544
|
+
Pt.div(
|
|
1538
1545
|
_((c) => {
|
|
1539
1546
|
c.style.position = "absolute";
|
|
1540
1547
|
const l = typeof o?.target == "string" ? a.querySelector(
|
|
@@ -1543,14 +1550,14 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1543
1550
|
if (l == null)
|
|
1544
1551
|
throw new Error(`Target not found: ${o?.target}`);
|
|
1545
1552
|
let u = null;
|
|
1546
|
-
const h = C.toSignal(o?.mainAxisOffset ?? 0),
|
|
1553
|
+
const h = C.toSignal(o?.mainAxisOffset ?? 0), m = C.toSignal(
|
|
1547
1554
|
o?.crossAxisOffset ?? 0
|
|
1548
1555
|
), f = C.toSignal(
|
|
1549
1556
|
/* c8 ignore next 3 */
|
|
1550
1557
|
o?.placement ?? "top"
|
|
1551
1558
|
), d = C.toSignal(
|
|
1552
1559
|
o?.arrowPadding ?? 0
|
|
1553
|
-
), y = o?.arrow,
|
|
1560
|
+
), y = o?.arrow, p = M({
|
|
1554
1561
|
centerOffset: 0,
|
|
1555
1562
|
alignmentOffset: 0,
|
|
1556
1563
|
containerWidth: 0,
|
|
@@ -1560,35 +1567,35 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1560
1567
|
});
|
|
1561
1568
|
async function v() {
|
|
1562
1569
|
const w = [
|
|
1563
|
-
|
|
1564
|
-
|
|
1570
|
+
oe(),
|
|
1571
|
+
to({
|
|
1565
1572
|
mainAxis: h.get(),
|
|
1566
|
-
crossAxis:
|
|
1573
|
+
crossAxis: m.get()
|
|
1567
1574
|
}),
|
|
1568
|
-
|
|
1569
|
-
|
|
1575
|
+
eo(),
|
|
1576
|
+
oe()
|
|
1570
1577
|
];
|
|
1571
1578
|
y != null && u != null && w.push(
|
|
1572
|
-
|
|
1579
|
+
no({
|
|
1573
1580
|
element: u,
|
|
1574
1581
|
padding: d.get()
|
|
1575
1582
|
})
|
|
1576
1583
|
);
|
|
1577
|
-
const
|
|
1584
|
+
const O = await oo(l, c, {
|
|
1578
1585
|
placement: f.get(),
|
|
1579
1586
|
strategy: "absolute",
|
|
1580
1587
|
middleware: w
|
|
1581
|
-
}), { x:
|
|
1582
|
-
if (c.style.top = `${
|
|
1588
|
+
}), { x: E, y: A, middlewareData: P } = O;
|
|
1589
|
+
if (c.style.top = `${A}px`, c.style.left = `${E}px`, u != null && P.arrow != null) {
|
|
1583
1590
|
const {
|
|
1584
1591
|
x: U,
|
|
1585
|
-
y:
|
|
1592
|
+
y: g,
|
|
1586
1593
|
centerOffset: x,
|
|
1587
1594
|
alignmentOffset: S
|
|
1588
|
-
} =
|
|
1589
|
-
|
|
1595
|
+
} = P.arrow;
|
|
1596
|
+
p.set({
|
|
1590
1597
|
x: U,
|
|
1591
|
-
y:
|
|
1598
|
+
y: g,
|
|
1592
1599
|
centerOffset: x,
|
|
1593
1600
|
alignmentOffset: S,
|
|
1594
1601
|
containerWidth: c.offsetWidth,
|
|
@@ -1596,22 +1603,22 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1596
1603
|
});
|
|
1597
1604
|
}
|
|
1598
1605
|
}
|
|
1599
|
-
const b =
|
|
1606
|
+
const b = He(
|
|
1600
1607
|
h,
|
|
1601
|
-
|
|
1608
|
+
m,
|
|
1602
1609
|
f
|
|
1603
1610
|
)(v);
|
|
1604
|
-
return
|
|
1611
|
+
return X(
|
|
1605
1612
|
o?.content,
|
|
1606
|
-
o?.arrow != null ?
|
|
1613
|
+
o?.arrow != null ? Pt.div(
|
|
1607
1614
|
o?.arrow(
|
|
1608
|
-
|
|
1609
|
-
|
|
1615
|
+
Nt(
|
|
1616
|
+
p,
|
|
1610
1617
|
f
|
|
1611
1618
|
)(
|
|
1612
|
-
(w,
|
|
1619
|
+
(w, O) => ({
|
|
1613
1620
|
...w,
|
|
1614
|
-
placement:
|
|
1621
|
+
placement: O
|
|
1615
1622
|
})
|
|
1616
1623
|
)
|
|
1617
1624
|
),
|
|
@@ -1621,7 +1628,7 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1621
1628
|
) : null,
|
|
1622
1629
|
// arrowSignal is automatically disposed by the scope
|
|
1623
1630
|
N(
|
|
1624
|
-
|
|
1631
|
+
Zn(l, c, v),
|
|
1625
1632
|
b
|
|
1626
1633
|
)
|
|
1627
1634
|
);
|
|
@@ -1632,7 +1639,7 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1632
1639
|
)
|
|
1633
1640
|
)
|
|
1634
1641
|
);
|
|
1635
|
-
},
|
|
1642
|
+
}, so = ({
|
|
1636
1643
|
request: t,
|
|
1637
1644
|
load: e,
|
|
1638
1645
|
convertError: n,
|
|
@@ -1642,24 +1649,24 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1642
1649
|
}) => {
|
|
1643
1650
|
let r;
|
|
1644
1651
|
const a = M(R.notAsked), c = a.map(
|
|
1645
|
-
(
|
|
1652
|
+
(p) => R.isSuccess(p) ? p.value : void 0
|
|
1646
1653
|
), l = a.map(
|
|
1647
|
-
(
|
|
1648
|
-
), u = a.map((
|
|
1654
|
+
(p) => R.isFailure(p) ? p.error : void 0
|
|
1655
|
+
), u = a.map((p) => R.isLoading(p)), h = () => {
|
|
1649
1656
|
r?.abort(), r = void 0;
|
|
1650
|
-
},
|
|
1651
|
-
h(), a.set(
|
|
1652
|
-
}, f = async (
|
|
1657
|
+
}, m = (p) => {
|
|
1658
|
+
h(), a.set(p ?? R.notAsked);
|
|
1659
|
+
}, f = async (p) => {
|
|
1653
1660
|
h(), r = new AbortController();
|
|
1654
1661
|
const v = r.signal, b = a.get();
|
|
1655
1662
|
a.set(R.loading(R.getOrUndefined(b)));
|
|
1656
1663
|
try {
|
|
1657
|
-
const w = await e({ request:
|
|
1658
|
-
await Promise.resolve(), r = void 0, a.set(R.success(w)), o?.(w,
|
|
1664
|
+
const w = await e({ request: p, abortSignal: v, previous: b });
|
|
1665
|
+
await Promise.resolve(), r = void 0, a.set(R.success(w)), o?.(w, p);
|
|
1659
1666
|
} catch (w) {
|
|
1660
|
-
r = void 0, a.set(R.failure(n(w))), s?.(n(w),
|
|
1667
|
+
r = void 0, a.set(R.failure(n(w))), s?.(n(w), p);
|
|
1661
1668
|
}
|
|
1662
|
-
i?.(a.get(),
|
|
1669
|
+
i?.(a.get(), p);
|
|
1663
1670
|
}, d = () => f(C.get(t)), y = () => {
|
|
1664
1671
|
r?.abort(), r = void 0, a.dispose();
|
|
1665
1672
|
};
|
|
@@ -1668,21 +1675,21 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1668
1675
|
value: c,
|
|
1669
1676
|
error: l,
|
|
1670
1677
|
loading: u,
|
|
1671
|
-
cancel:
|
|
1678
|
+
cancel: m,
|
|
1672
1679
|
reload: d,
|
|
1673
1680
|
dispose: y
|
|
1674
1681
|
};
|
|
1675
|
-
},
|
|
1682
|
+
}, ro = (t, e) => {
|
|
1676
1683
|
const { status: n, dispose: o, reload: s } = t, { pending: i, failure: r, success: a } = e;
|
|
1677
|
-
return
|
|
1684
|
+
return X(
|
|
1678
1685
|
N(o),
|
|
1679
|
-
|
|
1686
|
+
ve(n, {
|
|
1680
1687
|
loading: i != null ? (c) => i({ previous: c, reload: s, cancel: t.cancel }) : void 0,
|
|
1681
1688
|
failure: r != null ? (c) => r({ error: c, reload: s }) : void 0,
|
|
1682
1689
|
success: (c) => a({ value: c, reload: s })
|
|
1683
1690
|
})
|
|
1684
1691
|
);
|
|
1685
|
-
},
|
|
1692
|
+
}, Wo = ({
|
|
1686
1693
|
request: t,
|
|
1687
1694
|
load: e,
|
|
1688
1695
|
convertError: n = (l) => l,
|
|
@@ -1693,7 +1700,7 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1693
1700
|
pending: a,
|
|
1694
1701
|
failure: c
|
|
1695
1702
|
}) => {
|
|
1696
|
-
const l =
|
|
1703
|
+
const l = so({
|
|
1697
1704
|
request: t,
|
|
1698
1705
|
load: e,
|
|
1699
1706
|
convertError: n,
|
|
@@ -1701,17 +1708,17 @@ const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
|
1701
1708
|
onError: s,
|
|
1702
1709
|
onSettled: i
|
|
1703
1710
|
});
|
|
1704
|
-
return
|
|
1705
|
-
},
|
|
1711
|
+
return ro(l, { success: r, pending: a, failure: c });
|
|
1712
|
+
}, io = (t, e) => {
|
|
1706
1713
|
if (typeof e == "function")
|
|
1707
|
-
return
|
|
1714
|
+
return io(t, { success: e });
|
|
1708
1715
|
const n = e.failure ?? ((s) => (s.on(console.error), s.map((i) => `Error: ${i}`))), o = e.success;
|
|
1709
|
-
return
|
|
1716
|
+
return fe(C.toSignal(t), {
|
|
1710
1717
|
Success: (s) => o(s.$.value),
|
|
1711
1718
|
Failure: (s) => n(s.$.error)
|
|
1712
1719
|
});
|
|
1713
|
-
},
|
|
1714
|
-
class
|
|
1720
|
+
}, Ho = () => ue.focus((t) => t.target?.select());
|
|
1721
|
+
class Rt {
|
|
1715
1722
|
/**
|
|
1716
1723
|
* Creates a new Rect instance.
|
|
1717
1724
|
*
|
|
@@ -1765,7 +1772,7 @@ class At {
|
|
|
1765
1772
|
localLeft: i = 0,
|
|
1766
1773
|
localTop: r = 0
|
|
1767
1774
|
}) {
|
|
1768
|
-
return new
|
|
1775
|
+
return new Rt(e, n, o, s, i, r);
|
|
1769
1776
|
}
|
|
1770
1777
|
/**
|
|
1771
1778
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1899,9 +1906,9 @@ class At {
|
|
|
1899
1906
|
*/
|
|
1900
1907
|
equals = (e) => mt(this.left, e.left) && mt(this.top, e.top) && mt(this.width, e.width) && mt(this.height, e.height);
|
|
1901
1908
|
}
|
|
1902
|
-
function
|
|
1909
|
+
function se(t) {
|
|
1903
1910
|
const e = t.getBoundingClientRect();
|
|
1904
|
-
return
|
|
1911
|
+
return Rt.of({
|
|
1905
1912
|
top: e.top + window.scrollY,
|
|
1906
1913
|
left: e.left + window.scrollX,
|
|
1907
1914
|
width: e.width,
|
|
@@ -1910,32 +1917,32 @@ function oe(t) {
|
|
|
1910
1917
|
localTop: t.offsetTop
|
|
1911
1918
|
});
|
|
1912
1919
|
}
|
|
1913
|
-
const
|
|
1914
|
-
const { element: n } = e, o = M(
|
|
1920
|
+
const Fo = (t) => Fe((e) => {
|
|
1921
|
+
const { element: n } = e, o = M(se(n), (a, c) => a.equals(c)), s = de(t(o)).render(e), i = () => o.set(Rt.of(se(n)));
|
|
1915
1922
|
let r = null;
|
|
1916
1923
|
return typeof ResizeObserver < "u" && (r = new ResizeObserver(i)), r?.observe(n), N((a) => {
|
|
1917
1924
|
r?.disconnect(), s(a);
|
|
1918
1925
|
});
|
|
1919
1926
|
});
|
|
1920
|
-
function
|
|
1927
|
+
function re(t) {
|
|
1921
1928
|
return {
|
|
1922
1929
|
/* c8 ignore next 6 */
|
|
1923
1930
|
width: t?.innerWidth ?? 0,
|
|
1924
1931
|
height: t?.innerHeight ?? 0
|
|
1925
1932
|
};
|
|
1926
1933
|
}
|
|
1927
|
-
const
|
|
1934
|
+
const Mo = (t) => Me(() => {
|
|
1928
1935
|
const e = st(), n = M(
|
|
1929
|
-
|
|
1936
|
+
re(e),
|
|
1930
1937
|
(s, i) => s.width === i.width && s.height === i.height
|
|
1931
|
-
), o = () => n.set(
|
|
1932
|
-
return e?.addEventListener("resize", o),
|
|
1938
|
+
), o = () => n.set(re(e));
|
|
1939
|
+
return e?.addEventListener("resize", o), X(
|
|
1933
1940
|
N(() => {
|
|
1934
1941
|
e?.removeEventListener("resize", o);
|
|
1935
1942
|
}),
|
|
1936
1943
|
t(n)
|
|
1937
1944
|
);
|
|
1938
|
-
}),
|
|
1945
|
+
}), ao = (t, e) => {
|
|
1939
1946
|
const n = e.split("/").filter((i) => i !== ""), o = (i) => {
|
|
1940
1947
|
try {
|
|
1941
1948
|
return decodeURIComponent(i);
|
|
@@ -1969,27 +1976,27 @@ const Wo = (t) => Me(() => {
|
|
|
1969
1976
|
return n != "" ? { type: "catch-all", name: n } : { type: "catch-all" };
|
|
1970
1977
|
} else
|
|
1971
1978
|
return { type: "literal", value: e };
|
|
1972
|
-
}).filter((e) => e.type !== "literal" || e.value !== ""),
|
|
1979
|
+
}).filter((e) => e.type !== "literal" || e.value !== ""), No = (t) => {
|
|
1973
1980
|
const e = t.map((n) => {
|
|
1974
1981
|
const o = Te(n);
|
|
1975
1982
|
return { route: n, segments: o };
|
|
1976
1983
|
});
|
|
1977
1984
|
return function(o) {
|
|
1978
1985
|
for (const { segments: s, route: i } of e) {
|
|
1979
|
-
const r =
|
|
1986
|
+
const r = ao(s, o);
|
|
1980
1987
|
if (r)
|
|
1981
1988
|
return { ...r, route: i };
|
|
1982
1989
|
}
|
|
1983
1990
|
return null;
|
|
1984
1991
|
};
|
|
1985
|
-
},
|
|
1992
|
+
}, co = (t) => {
|
|
1986
1993
|
if (t == null)
|
|
1987
1994
|
throw new Error(
|
|
1988
1995
|
"NavigationService: no Location handle attached. Make sure to attach one before calling navigation helpers."
|
|
1989
1996
|
);
|
|
1990
1997
|
return t;
|
|
1991
1998
|
};
|
|
1992
|
-
class
|
|
1999
|
+
class lo {
|
|
1993
2000
|
handles = [];
|
|
1994
2001
|
attach(e) {
|
|
1995
2002
|
const n = this.handles.lastIndexOf(e);
|
|
@@ -2006,7 +2013,7 @@ class ao {
|
|
|
2006
2013
|
return this.handles[this.handles.length - 1];
|
|
2007
2014
|
}
|
|
2008
2015
|
getHandle() {
|
|
2009
|
-
return
|
|
2016
|
+
return co(this.current);
|
|
2010
2017
|
}
|
|
2011
2018
|
navigate(e, n) {
|
|
2012
2019
|
this.getHandle().navigate(e, n);
|
|
@@ -2045,8 +2052,8 @@ class ao {
|
|
|
2045
2052
|
this.getHandle().run(e, n);
|
|
2046
2053
|
}
|
|
2047
2054
|
}
|
|
2048
|
-
const
|
|
2049
|
-
mark:
|
|
2055
|
+
const Vo = new lo(), Ht = {
|
|
2056
|
+
mark: Mt("RouterContext"),
|
|
2050
2057
|
create: () => {
|
|
2051
2058
|
const t = M([]);
|
|
2052
2059
|
return {
|
|
@@ -2054,7 +2061,7 @@ const Mo = new ao(), Ht = {
|
|
|
2054
2061
|
dispose: () => t.dispose()
|
|
2055
2062
|
};
|
|
2056
2063
|
}
|
|
2057
|
-
},
|
|
2064
|
+
}, uo = (t, e, n) => {
|
|
2058
2065
|
const o = n.split("/").filter((r) => r !== ""), s = {};
|
|
2059
2066
|
let i = 0;
|
|
2060
2067
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -2095,18 +2102,18 @@ const Mo = new ao(), Ht = {
|
|
|
2095
2102
|
});
|
|
2096
2103
|
return function(o) {
|
|
2097
2104
|
for (const { segments: s, route: i } of e) {
|
|
2098
|
-
const r =
|
|
2105
|
+
const r = uo(s, i, o);
|
|
2099
2106
|
if (r)
|
|
2100
2107
|
return r;
|
|
2101
2108
|
}
|
|
2102
2109
|
return null;
|
|
2103
2110
|
};
|
|
2104
|
-
},
|
|
2111
|
+
}, $o = (t) => {
|
|
2105
2112
|
const e = Ce(Object.keys(t));
|
|
2106
2113
|
return Ne(
|
|
2107
2114
|
Ht,
|
|
2108
2115
|
{},
|
|
2109
|
-
() => ct(
|
|
2116
|
+
() => ct($t, (n) => ct(Ht, (o) => {
|
|
2110
2117
|
const s = n.location.map((i) => {
|
|
2111
2118
|
const r = e(i.pathname);
|
|
2112
2119
|
if (r == null)
|
|
@@ -2125,16 +2132,16 @@ const Mo = new ao(), Ht = {
|
|
|
2125
2132
|
hash: i.hash
|
|
2126
2133
|
};
|
|
2127
2134
|
});
|
|
2128
|
-
return
|
|
2135
|
+
return pe(
|
|
2129
2136
|
s.map((i) => [i.route, i]),
|
|
2130
2137
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2131
2138
|
t
|
|
2132
2139
|
);
|
|
2133
2140
|
}))
|
|
2134
2141
|
);
|
|
2135
|
-
},
|
|
2142
|
+
}, zo = (t) => {
|
|
2136
2143
|
const e = Ce(Object.keys(t));
|
|
2137
|
-
return ct(Ht, (n) => ct(
|
|
2144
|
+
return ct(Ht, (n) => ct($t, (o) => {
|
|
2138
2145
|
const s = n.map((i) => {
|
|
2139
2146
|
const r = i[i.length - 1];
|
|
2140
2147
|
if (r == null)
|
|
@@ -2151,13 +2158,13 @@ const Mo = new ao(), Ht = {
|
|
|
2151
2158
|
hash: o.location.value.hash
|
|
2152
2159
|
};
|
|
2153
2160
|
});
|
|
2154
|
-
return
|
|
2161
|
+
return pe(
|
|
2155
2162
|
s.map((i) => [i.route, i]),
|
|
2156
2163
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2157
2164
|
t
|
|
2158
2165
|
);
|
|
2159
2166
|
}));
|
|
2160
|
-
}, xt = 60 * 1e3,
|
|
2167
|
+
}, xt = 60 * 1e3, Ft = 60 * xt, ut = 24 * Ft, ie = 7 * ut, ae = 30 * ut, fo = 365 * ut, ho = [
|
|
2161
2168
|
{
|
|
2162
2169
|
max: xt * 90,
|
|
2163
2170
|
value: xt,
|
|
@@ -2166,8 +2173,8 @@ const Mo = new ao(), Ht = {
|
|
|
2166
2173
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
2167
2174
|
},
|
|
2168
2175
|
{
|
|
2169
|
-
max:
|
|
2170
|
-
value:
|
|
2176
|
+
max: Ft * 36,
|
|
2177
|
+
value: Ft,
|
|
2171
2178
|
name: "hour",
|
|
2172
2179
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
2173
2180
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
@@ -2180,28 +2187,28 @@ const Mo = new ao(), Ht = {
|
|
|
2180
2187
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
2181
2188
|
},
|
|
2182
2189
|
{
|
|
2183
|
-
max:
|
|
2184
|
-
value:
|
|
2190
|
+
max: ie * 6,
|
|
2191
|
+
value: ie,
|
|
2185
2192
|
name: "week",
|
|
2186
2193
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
2187
2194
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
2188
2195
|
},
|
|
2189
2196
|
{
|
|
2190
|
-
max:
|
|
2191
|
-
value:
|
|
2197
|
+
max: ae * 18,
|
|
2198
|
+
value: ae,
|
|
2192
2199
|
name: "month",
|
|
2193
2200
|
past: { singular: "last month", plural: "{} months ago" },
|
|
2194
2201
|
future: { singular: "in a month", plural: "in {} months" }
|
|
2195
2202
|
},
|
|
2196
2203
|
{
|
|
2197
2204
|
max: 1 / 0,
|
|
2198
|
-
value:
|
|
2205
|
+
value: fo,
|
|
2199
2206
|
name: "year",
|
|
2200
2207
|
past: { singular: "last year", plural: "{} years ago" },
|
|
2201
2208
|
future: { singular: "in a year", plural: "in {} years" }
|
|
2202
2209
|
}
|
|
2203
2210
|
];
|
|
2204
|
-
function
|
|
2211
|
+
function ce(t, e, n, o) {
|
|
2205
2212
|
const s = Math.round(t / e);
|
|
2206
2213
|
return s <= 1 ? n : o.replace(
|
|
2207
2214
|
"{}",
|
|
@@ -2211,86 +2218,86 @@ function ae(t, e, n, o) {
|
|
|
2211
2218
|
})
|
|
2212
2219
|
);
|
|
2213
2220
|
}
|
|
2214
|
-
const
|
|
2221
|
+
const mo = (t = 1e3) => {
|
|
2215
2222
|
const e = M(/* @__PURE__ */ new Date()), n = $e(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
2216
2223
|
return e.onDispose(n), e;
|
|
2217
|
-
},
|
|
2224
|
+
}, po = (t) => {
|
|
2218
2225
|
const e = Math.abs(t);
|
|
2219
2226
|
if (e < xt)
|
|
2220
2227
|
return t < 0 ? "just now" : "in a moment";
|
|
2221
|
-
for (const n of
|
|
2228
|
+
for (const n of ho)
|
|
2222
2229
|
if (e < n.max)
|
|
2223
|
-
return t < 0 ?
|
|
2230
|
+
return t < 0 ? ce(e, n.value, n.past.singular, n.past.plural) : ce(e, n.value, n.future.singular, n.future.plural);
|
|
2224
2231
|
throw new Error("unreachable");
|
|
2225
|
-
},
|
|
2226
|
-
const o = e != null ?
|
|
2232
|
+
}, go = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
2233
|
+
const o = e != null ? le.is(e) ? e.derive() : M(e) : mo(n), s = Nt(
|
|
2227
2234
|
t,
|
|
2228
2235
|
o
|
|
2229
2236
|
)((i, r) => i.getTime() - r.getTime());
|
|
2230
2237
|
return s.onDispose(() => C.dispose(o)), s;
|
|
2231
|
-
},
|
|
2232
|
-
const n =
|
|
2238
|
+
}, wo = (t, e = {}) => {
|
|
2239
|
+
const n = go(t, e), o = n.map(po);
|
|
2233
2240
|
return o.onDispose(n.dispose), o;
|
|
2234
|
-
},
|
|
2235
|
-
class
|
|
2241
|
+
}, Bo = (t, e = {}) => wo(t, e);
|
|
2242
|
+
class vo extends Ve {
|
|
2236
2243
|
/**
|
|
2237
2244
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
2238
2245
|
* @returns void
|
|
2239
2246
|
*/
|
|
2240
2247
|
tick = () => this.update((e) => e + 1);
|
|
2241
2248
|
}
|
|
2242
|
-
const
|
|
2249
|
+
const _o = (t = 0) => new vo(t, (e, n) => e === n);
|
|
2243
2250
|
export {
|
|
2244
2251
|
tn as Anchor,
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2252
|
+
bo as Appearance,
|
|
2253
|
+
ve as AsyncResultView,
|
|
2254
|
+
So as AutoFocus,
|
|
2255
|
+
Oo as AutoSelect,
|
|
2256
|
+
zo as ChildRouter,
|
|
2257
|
+
Fo as ElementRect,
|
|
2258
|
+
Eo as HTMLTitle,
|
|
2259
|
+
Ro as HiddenWhenEmpty,
|
|
2253
2260
|
sn as InViewport,
|
|
2254
|
-
|
|
2255
|
-
|
|
2261
|
+
$t as Location,
|
|
2262
|
+
To as Mutation,
|
|
2256
2263
|
ln as MutationDisplay,
|
|
2257
|
-
|
|
2264
|
+
Vo as NavigationService,
|
|
2258
2265
|
rn as OnClickOutside,
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2266
|
+
Lo as OnEnterKey,
|
|
2267
|
+
ko as OnEscapeKey,
|
|
2268
|
+
ye as OnKeyPressed,
|
|
2269
|
+
Do as PopOver,
|
|
2270
|
+
Wo as Query,
|
|
2271
|
+
ro as QueryDisplay,
|
|
2272
|
+
Rt as Rect,
|
|
2273
|
+
io as ResultView,
|
|
2274
|
+
$o as RootRouter,
|
|
2268
2275
|
Ht as RouterContextProvider,
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2276
|
+
Ho as SelectOnFocus,
|
|
2277
|
+
vo as Ticker,
|
|
2278
|
+
Po as WhenInViewport,
|
|
2279
|
+
Mo as WindowSize,
|
|
2273
2280
|
Be as _checkExtensionCondition,
|
|
2274
2281
|
ze as _getExtension,
|
|
2275
|
-
|
|
2282
|
+
No as _makeRouteMatcher,
|
|
2276
2283
|
Te as _parseRouteSegments,
|
|
2277
|
-
|
|
2284
|
+
Co as allPlacements,
|
|
2278
2285
|
Ke as areLocationsEqual,
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2286
|
+
Ao as classes,
|
|
2287
|
+
Yt as evaluateLocationMatch,
|
|
2288
|
+
se as getAbsoluteRect,
|
|
2282
2289
|
Ue as handleAnchorClick,
|
|
2283
|
-
|
|
2290
|
+
kt as locationFromURL,
|
|
2284
2291
|
cn as makeMutationResource,
|
|
2285
|
-
|
|
2292
|
+
so as makeQueryResource,
|
|
2286
2293
|
an as matchesKeyCombo,
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
+
ao as matchesRoute,
|
|
2295
|
+
mo as nowSignal,
|
|
2296
|
+
Bo as relativeTime,
|
|
2297
|
+
go as relativeTimeMillisSignal,
|
|
2298
|
+
wo as relativeTimeSignal,
|
|
2299
|
+
_o as ticker,
|
|
2300
|
+
po as timeDiffToString,
|
|
2294
2301
|
et as urlFromLocation,
|
|
2295
2302
|
en as useAppearance
|
|
2296
2303
|
};
|