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