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