v-float 0.4.0 → 0.6.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/LICENSE +20 -20
- package/dist/composables/index.d.ts +2 -3
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/interactions/index.d.ts +3 -3
- package/dist/composables/interactions/index.d.ts.map +1 -1
- package/dist/composables/interactions/polygon.d.ts +1 -1
- package/dist/composables/interactions/polygon.d.ts.map +1 -1
- package/dist/composables/interactions/use-click.d.ts +2 -2
- package/dist/composables/interactions/use-click.d.ts.map +1 -1
- package/dist/composables/interactions/use-client-point.d.ts +180 -20
- package/dist/composables/interactions/use-client-point.d.ts.map +1 -1
- package/dist/composables/interactions/use-escape-key.d.ts +37 -4
- package/dist/composables/interactions/use-escape-key.d.ts.map +1 -1
- package/dist/composables/interactions/use-focus.d.ts +2 -2
- package/dist/composables/interactions/use-focus.d.ts.map +1 -1
- package/dist/composables/interactions/use-hover.d.ts +1 -1
- package/dist/composables/interactions/use-hover.d.ts.map +1 -1
- package/dist/composables/interactions/utils/index.d.ts +3 -3
- package/dist/composables/interactions/utils/index.d.ts.map +1 -1
- package/dist/composables/interactions/utils/tree-context.d.ts +2 -2
- package/dist/composables/interactions/utils/tree-context.d.ts.map +1 -1
- package/dist/composables/middlewares/index.d.ts +1 -1
- package/dist/composables/middlewares/index.d.ts.map +1 -1
- package/dist/composables/use-arrow.d.ts +0 -5
- package/dist/composables/use-arrow.d.ts.map +1 -1
- package/dist/composables/use-floating-tree.d.ts +72 -10
- package/dist/composables/use-floating-tree.d.ts.map +1 -1
- package/dist/composables/use-floating.d.ts +1 -1
- package/dist/composables/use-floating.d.ts.map +1 -1
- package/dist/v-float.es.js +2313 -2166
- package/dist/v-float.umd.js +1 -1
- package/package.json +2 -2
- package/dist/composables/use-tree.d.ts +0 -144
- package/dist/composables/use-tree.d.ts.map +0 -1
package/dist/v-float.es.js
CHANGED
|
@@ -1,2345 +1,2492 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
left: "right",
|
|
14
|
-
right: "left",
|
|
15
|
-
bottom: "top",
|
|
16
|
-
top: "bottom"
|
|
17
|
-
}, an = {
|
|
18
|
-
start: "end",
|
|
19
|
-
end: "start"
|
|
20
|
-
};
|
|
21
|
-
function Ke(e, t, n) {
|
|
22
|
-
return fe(e, we(t, n));
|
|
1
|
+
var Yt = Object.defineProperty;
|
|
2
|
+
var zt = (e, t, n) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ve = (e, t, n) => zt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { watch as ne, getCurrentScope as _t, onScopeDispose as we, computed as N, toValue as A, unref as Ut, watchPostEffect as Ce, onWatcherCleanup as ue, ref as _, watchEffect as Kt, readonly as qt, onMounted as Gt, shallowRef as je, shallowReactive as Jt } from "vue";
|
|
5
|
+
function Qt(e) {
|
|
6
|
+
return _t() ? (we(e), !0) : !1;
|
|
7
|
+
}
|
|
8
|
+
const Zt = typeof window < "u" && typeof document < "u";
|
|
9
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
+
const en = Object.prototype.toString, tn = (e) => en.call(e) === "[object Object]";
|
|
11
|
+
function $e(e) {
|
|
12
|
+
return Array.isArray(e) ? e : [e];
|
|
23
13
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
14
|
+
function nn(e, t, n) {
|
|
15
|
+
return ne(
|
|
16
|
+
e,
|
|
17
|
+
t,
|
|
18
|
+
{
|
|
19
|
+
...n,
|
|
20
|
+
immediate: !0
|
|
21
|
+
}
|
|
22
|
+
);
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const on = Zt ? window : void 0;
|
|
25
|
+
function rn(e) {
|
|
26
|
+
var t;
|
|
27
|
+
const n = A(e);
|
|
28
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
30
|
+
function q(...e) {
|
|
31
|
+
const t = [], n = () => {
|
|
32
|
+
t.forEach((a) => a()), t.length = 0;
|
|
33
|
+
}, o = (a, f, c, u) => (a.addEventListener(f, c, u), () => a.removeEventListener(f, c, u)), i = N(() => {
|
|
34
|
+
const a = $e(A(e[0])).filter((f) => f != null);
|
|
35
|
+
return a.every((f) => typeof f != "string") ? a : void 0;
|
|
36
|
+
}), l = nn(
|
|
37
|
+
() => {
|
|
38
|
+
var a, f;
|
|
39
|
+
return [
|
|
40
|
+
(f = (a = i.value) == null ? void 0 : a.map((c) => rn(c))) != null ? f : [on].filter((c) => c != null),
|
|
41
|
+
$e(A(i.value ? e[1] : e[0])),
|
|
42
|
+
$e(Ut(i.value ? e[2] : e[1])),
|
|
43
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
44
|
+
A(i.value ? e[3] : e[2])
|
|
45
|
+
];
|
|
46
|
+
},
|
|
47
|
+
([a, f, c, u]) => {
|
|
48
|
+
if (n(), !(a != null && a.length) || !(f != null && f.length) || !(c != null && c.length))
|
|
49
|
+
return;
|
|
50
|
+
const p = tn(u) ? { ...u } : u;
|
|
51
|
+
t.push(
|
|
52
|
+
...a.flatMap(
|
|
53
|
+
(h) => f.flatMap(
|
|
54
|
+
(d) => c.map((m) => o(h, d, m, p))
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
{ flush: "post" }
|
|
60
|
+
), r = () => {
|
|
61
|
+
l(), n();
|
|
62
|
+
};
|
|
63
|
+
return Qt(n), r;
|
|
32
64
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
65
|
+
function st() {
|
|
66
|
+
return typeof navigator > "u" ? !1 : navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
35
67
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
68
|
+
function lt() {
|
|
69
|
+
return typeof navigator > "u" ? !1 : /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
38
70
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return cn.has(de(e)) ? "y" : "x";
|
|
71
|
+
function sn(e) {
|
|
72
|
+
return typeof (e == null ? void 0 : e.matches) != "function" ? !1 : e.matches(":focus-visible");
|
|
42
73
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
74
|
+
function St(e, t) {
|
|
75
|
+
if (e === void 0) return !1;
|
|
76
|
+
const n = e === "mouse";
|
|
77
|
+
return t ? n : n || e === "pen";
|
|
45
78
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
const o = Me(e), i = tt(e), r = et(i);
|
|
49
|
-
let l = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
50
|
-
return t.reference[r] > t.floating[r] && (l = ke(l)), [l, ke(l)];
|
|
79
|
+
function At(e) {
|
|
80
|
+
return !e || !(e instanceof HTMLElement) ? !1 : e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e.isContentEditable && e.contentEditable !== "false";
|
|
51
81
|
}
|
|
52
|
-
function
|
|
53
|
-
const t =
|
|
54
|
-
return
|
|
82
|
+
function at(e) {
|
|
83
|
+
const t = e.target;
|
|
84
|
+
return t instanceof HTMLElement ? t.tagName === "BUTTON" || t.tagName === "INPUT" && t.getAttribute("type") === "button" || t.getAttribute("role") === "button" : !1;
|
|
55
85
|
}
|
|
56
|
-
function
|
|
57
|
-
return e
|
|
86
|
+
function ct(e) {
|
|
87
|
+
return At(e);
|
|
58
88
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
function ln(e) {
|
|
90
|
+
return e instanceof Element && e instanceof HTMLElement;
|
|
91
|
+
}
|
|
92
|
+
function xo(e) {
|
|
93
|
+
return typeof e == "object" && e !== null && "contextElement" in e;
|
|
94
|
+
}
|
|
95
|
+
function ut(e, t) {
|
|
96
|
+
return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
|
|
97
|
+
}
|
|
98
|
+
function an(e, t) {
|
|
99
|
+
const n = t.getBoundingClientRect(), o = t.offsetWidth - t.clientWidth, i = t.offsetHeight - t.clientHeight, l = e.clientX - n.left, r = e.clientY - n.top;
|
|
100
|
+
if (o > 0) {
|
|
101
|
+
const a = t.clientWidth;
|
|
102
|
+
if (l >= a && l <= t.offsetWidth)
|
|
103
|
+
return !0;
|
|
104
|
+
}
|
|
105
|
+
if (i > 0) {
|
|
106
|
+
const a = t.clientHeight;
|
|
107
|
+
if (r >= a && r <= t.offsetHeight)
|
|
108
|
+
return !0;
|
|
70
109
|
}
|
|
110
|
+
return !1;
|
|
111
|
+
}
|
|
112
|
+
function Ve(e, t) {
|
|
113
|
+
return e.contains(t);
|
|
71
114
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
let r = mn(de(e), n === "start", o);
|
|
75
|
-
return i && (r = r.map((l) => l + "-" + i), t && (r = r.concat(r.map(Ge)))), r;
|
|
115
|
+
function cn(e) {
|
|
116
|
+
return e.target;
|
|
76
117
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
118
|
+
function ft() {
|
|
119
|
+
return typeof performance < "u" ? performance.now() : Date.now();
|
|
79
120
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
top: 0,
|
|
83
|
-
right: 0,
|
|
84
|
-
bottom: 0,
|
|
85
|
-
left: 0,
|
|
86
|
-
...e
|
|
87
|
-
};
|
|
121
|
+
function dt(e) {
|
|
122
|
+
e !== -1 && clearTimeout(e);
|
|
88
123
|
}
|
|
89
|
-
function
|
|
90
|
-
return typeof e
|
|
91
|
-
top: e,
|
|
92
|
-
right: e,
|
|
93
|
-
bottom: e,
|
|
94
|
-
left: e
|
|
95
|
-
};
|
|
124
|
+
function un(e) {
|
|
125
|
+
return e !== null && typeof e == "object" && "data" in e && "id" in e && "children" in e && "parent" in e;
|
|
96
126
|
}
|
|
97
127
|
function Fe(e) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return {
|
|
105
|
-
width: o,
|
|
106
|
-
height: i,
|
|
107
|
-
top: n,
|
|
108
|
-
left: t,
|
|
109
|
-
right: t + o,
|
|
110
|
-
bottom: n + i,
|
|
111
|
-
x: t,
|
|
112
|
-
y: n
|
|
128
|
+
return un(e) ? {
|
|
129
|
+
floatingContext: e.data,
|
|
130
|
+
treeContext: e
|
|
131
|
+
} : {
|
|
132
|
+
floatingContext: e,
|
|
133
|
+
treeContext: null
|
|
113
134
|
};
|
|
114
135
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const r = ne(t), l = tt(t), a = et(l), u = de(t), c = r === "y", h = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
|
|
121
|
-
let d;
|
|
122
|
-
switch (u) {
|
|
123
|
-
case "top":
|
|
124
|
-
d = {
|
|
125
|
-
x: h,
|
|
126
|
-
y: o.y - i.height
|
|
127
|
-
};
|
|
128
|
-
break;
|
|
129
|
-
case "bottom":
|
|
130
|
-
d = {
|
|
131
|
-
x: h,
|
|
132
|
-
y: o.y + o.height
|
|
133
|
-
};
|
|
134
|
-
break;
|
|
135
|
-
case "right":
|
|
136
|
-
d = {
|
|
137
|
-
x: o.x + o.width,
|
|
138
|
-
y: f
|
|
139
|
-
};
|
|
140
|
-
break;
|
|
141
|
-
case "left":
|
|
142
|
-
d = {
|
|
143
|
-
x: o.x - i.width,
|
|
144
|
-
y: f
|
|
145
|
-
};
|
|
146
|
-
break;
|
|
147
|
-
default:
|
|
148
|
-
d = {
|
|
149
|
-
x: o.x,
|
|
150
|
-
y: o.y
|
|
151
|
-
};
|
|
136
|
+
function J(e, t) {
|
|
137
|
+
if (!t) return !1;
|
|
138
|
+
if (typeof t == "object" && t !== null && "contextElement" in t) {
|
|
139
|
+
const n = t.contextElement;
|
|
140
|
+
return n instanceof Element ? n.contains(e) : !1;
|
|
152
141
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
142
|
+
return t instanceof Element ? t.contains(e) : !1;
|
|
143
|
+
}
|
|
144
|
+
function Ke(e, t) {
|
|
145
|
+
for (const n of e.children.value)
|
|
146
|
+
if (n.data.open.value) {
|
|
147
|
+
if (J(t, n.data.refs.anchorEl.value) || J(t, n.data.refs.floatingEl.value))
|
|
148
|
+
return n;
|
|
149
|
+
const o = Ke(n, t);
|
|
150
|
+
if (o) return o;
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
function Eo(e, t = {}) {
|
|
155
|
+
const { floatingContext: n, treeContext: o } = Fe(e), { open: i, setOpen: l, refs: r } = n, {
|
|
156
|
+
enabled: a = !0,
|
|
157
|
+
event: f = "click",
|
|
158
|
+
toggle: c = !0,
|
|
159
|
+
ignoreMouse: u = !1,
|
|
160
|
+
ignoreKeyboard: p = !1,
|
|
161
|
+
ignoreTouch: h = !1,
|
|
162
|
+
// Outside click options
|
|
163
|
+
outsideClick: d = !1,
|
|
164
|
+
outsideEvent: m = "pointerdown",
|
|
165
|
+
outsideCapture: g = !0,
|
|
166
|
+
onOutsideClick: v,
|
|
167
|
+
preventScrollbarClick: x = !0,
|
|
168
|
+
handleDragEvents: T = !0
|
|
169
|
+
} = t;
|
|
170
|
+
let C, S = !1, w = !1, b = !1;
|
|
171
|
+
const P = N(() => A(a)), F = N(() => A(d)), D = N(() => {
|
|
172
|
+
const O = r.anchorEl.value;
|
|
173
|
+
return O instanceof HTMLElement ? O : null;
|
|
174
|
+
}), M = N(() => r.floatingEl.value);
|
|
175
|
+
function B() {
|
|
176
|
+
b = !0;
|
|
177
|
+
try {
|
|
178
|
+
i.value ? A(c) && l(!1) : l(!0);
|
|
179
|
+
} finally {
|
|
180
|
+
Promise.resolve().then(() => {
|
|
181
|
+
b = !1;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
160
184
|
}
|
|
161
|
-
|
|
185
|
+
function W() {
|
|
186
|
+
C = void 0, S = !1, w = !1;
|
|
187
|
+
}
|
|
188
|
+
function X(O) {
|
|
189
|
+
C = O.pointerType;
|
|
190
|
+
}
|
|
191
|
+
function R(O) {
|
|
192
|
+
O.button === 0 && A(f) !== "click" && ($(C) || B());
|
|
193
|
+
}
|
|
194
|
+
function E() {
|
|
195
|
+
if (A(f) === "mousedown" && C) {
|
|
196
|
+
W();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if ($(C)) {
|
|
200
|
+
W();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
B(), W();
|
|
204
|
+
}
|
|
205
|
+
function s(O) {
|
|
206
|
+
if (C = void 0, O.defaultPrevented || A(p) || at(O))
|
|
207
|
+
return;
|
|
208
|
+
const V = D.value;
|
|
209
|
+
V && (O.key === " " && !ct(V) && (O.preventDefault(), S = !0), O.key === "Enter" && B());
|
|
210
|
+
}
|
|
211
|
+
function k(O) {
|
|
212
|
+
const V = D.value;
|
|
213
|
+
V && (O.defaultPrevented || A(p) || at(O) || ct(V) || O.key === " " && S && (S = !1, B()));
|
|
214
|
+
}
|
|
215
|
+
function y(O) {
|
|
216
|
+
if (!P.value || !F.value || !i.value)
|
|
217
|
+
return;
|
|
218
|
+
if (A(m) === "click" && A(T) && w) {
|
|
219
|
+
w = !1;
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (b)
|
|
223
|
+
return;
|
|
224
|
+
const V = O.target;
|
|
225
|
+
if (V && !(A(x) && ln(V) && M.value && an(O, V))) {
|
|
226
|
+
if (o) {
|
|
227
|
+
if (!fn(o, V))
|
|
228
|
+
return;
|
|
229
|
+
} else if (ut(O, D.value) || ut(O, M.value))
|
|
230
|
+
return;
|
|
231
|
+
v ? v(O, n) : l(!1);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
function H() {
|
|
235
|
+
w = !0;
|
|
236
|
+
}
|
|
237
|
+
function ee() {
|
|
238
|
+
setTimeout(() => {
|
|
239
|
+
w = !1;
|
|
240
|
+
}, 0);
|
|
241
|
+
}
|
|
242
|
+
function $(O) {
|
|
243
|
+
return !!(St(O, !0) && A(u) || O === "touch" && A(h));
|
|
244
|
+
}
|
|
245
|
+
Ce(() => {
|
|
246
|
+
const O = D.value;
|
|
247
|
+
!P.value || !O || (O.addEventListener("pointerdown", X), O.addEventListener("mousedown", R), O.addEventListener("click", E), O.addEventListener("keydown", s), O.addEventListener("keyup", k), ue(() => {
|
|
248
|
+
O.removeEventListener("pointerdown", X), O.removeEventListener("mousedown", R), O.removeEventListener("click", E), O.removeEventListener("keydown", s), O.removeEventListener("keyup", k), W();
|
|
249
|
+
}));
|
|
250
|
+
}), q(
|
|
251
|
+
() => P.value && F.value ? document : null,
|
|
252
|
+
() => A(m),
|
|
253
|
+
y,
|
|
254
|
+
{ capture: A(g) }
|
|
255
|
+
), q(
|
|
256
|
+
() => P.value && F.value && A(T) ? M.value : null,
|
|
257
|
+
"mousedown",
|
|
258
|
+
H,
|
|
259
|
+
{ capture: !0 }
|
|
260
|
+
), q(
|
|
261
|
+
() => P.value && F.value && A(T) ? M.value : null,
|
|
262
|
+
"mouseup",
|
|
263
|
+
ee,
|
|
264
|
+
{ capture: !0 }
|
|
265
|
+
);
|
|
162
266
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
floating: t
|
|
199
|
-
}
|
|
267
|
+
function fn(e, t) {
|
|
268
|
+
return !(J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) || Ke(e, t));
|
|
269
|
+
}
|
|
270
|
+
const Ae = (e) => typeof e == "number" && Number.isFinite(e) ? e : null, ce = class ce {
|
|
271
|
+
/**
|
|
272
|
+
* Create a virtual anchor element
|
|
273
|
+
*/
|
|
274
|
+
create(t) {
|
|
275
|
+
const n = this.buildConfiguration(t);
|
|
276
|
+
return {
|
|
277
|
+
contextElement: n.referenceElement || void 0,
|
|
278
|
+
getBoundingClientRect: () => this.buildBoundingRect(n)
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Build configuration from options with defaults
|
|
283
|
+
*/
|
|
284
|
+
buildConfiguration(t) {
|
|
285
|
+
return {
|
|
286
|
+
coordinates: t.coordinates,
|
|
287
|
+
referenceElement: t.referenceElement ?? null,
|
|
288
|
+
baselineCoordinates: t.baselineCoordinates ?? null,
|
|
289
|
+
axis: t.axis ?? "both"
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Build the bounding rectangle for the virtual element
|
|
294
|
+
*/
|
|
295
|
+
buildBoundingRect(t) {
|
|
296
|
+
const n = this.getReferenceRect(t.referenceElement), o = this.resolvePosition(t, n), i = this.calculateSize(t.axis, n);
|
|
297
|
+
return this.buildDOMRect({
|
|
298
|
+
x: o.x,
|
|
299
|
+
y: o.y,
|
|
300
|
+
width: i.width,
|
|
301
|
+
height: i.height
|
|
200
302
|
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Get reference element bounds with fallback
|
|
306
|
+
*/
|
|
307
|
+
getReferenceRect(t) {
|
|
308
|
+
if (t)
|
|
309
|
+
try {
|
|
310
|
+
return t.getBoundingClientRect();
|
|
311
|
+
} catch (n) {
|
|
312
|
+
console.warn("VirtualElementFactory: Failed to get element bounds", { element: t, error: n });
|
|
206
313
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
y: f
|
|
214
|
-
} = wt(c, p, u)), m = -1);
|
|
314
|
+
return this.buildDOMRect({
|
|
315
|
+
x: 0,
|
|
316
|
+
y: 0,
|
|
317
|
+
width: ce.DEFAULT_DIMENSIONS.width,
|
|
318
|
+
height: ce.DEFAULT_DIMENSIONS.height
|
|
319
|
+
});
|
|
215
320
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
middlewareData: d
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
async function He(e, t) {
|
|
225
|
-
var n;
|
|
226
|
-
t === void 0 && (t = {});
|
|
227
|
-
const {
|
|
228
|
-
x: o,
|
|
229
|
-
y: i,
|
|
230
|
-
platform: r,
|
|
231
|
-
rects: l,
|
|
232
|
-
elements: a,
|
|
233
|
-
strategy: u
|
|
234
|
-
} = e, {
|
|
235
|
-
boundary: c = "clippingAncestors",
|
|
236
|
-
rootBoundary: h = "viewport",
|
|
237
|
-
elementContext: f = "floating",
|
|
238
|
-
altBoundary: p = !1,
|
|
239
|
-
padding: d = 0
|
|
240
|
-
} = be(t, e), g = Wt(d), b = a[p ? f === "floating" ? "reference" : "floating" : f], w = Fe(await r.getClippingRect({
|
|
241
|
-
element: (n = await (r.isElement == null ? void 0 : r.isElement(b))) == null || n ? b : b.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
242
|
-
boundary: c,
|
|
243
|
-
rootBoundary: h,
|
|
244
|
-
strategy: u
|
|
245
|
-
})), y = f === "floating" ? {
|
|
246
|
-
x: o,
|
|
247
|
-
y: i,
|
|
248
|
-
width: l.floating.width,
|
|
249
|
-
height: l.floating.height
|
|
250
|
-
} : l.reference, C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), P = await (r.isElement == null ? void 0 : r.isElement(C)) ? await (r.getScale == null ? void 0 : r.getScale(C)) || {
|
|
251
|
-
x: 1,
|
|
252
|
-
y: 1
|
|
253
|
-
} : {
|
|
254
|
-
x: 1,
|
|
255
|
-
y: 1
|
|
256
|
-
}, E = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
257
|
-
elements: a,
|
|
258
|
-
rect: y,
|
|
259
|
-
offsetParent: C,
|
|
260
|
-
strategy: u
|
|
261
|
-
}) : y);
|
|
262
|
-
return {
|
|
263
|
-
top: (w.top - E.top + g.top) / P.y,
|
|
264
|
-
bottom: (E.bottom - w.bottom + g.bottom) / P.y,
|
|
265
|
-
left: (w.left - E.left + g.left) / P.x,
|
|
266
|
-
right: (E.right - w.right + g.right) / P.x
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
const wn = (e) => ({
|
|
270
|
-
name: "arrow",
|
|
271
|
-
options: e,
|
|
272
|
-
async fn(t) {
|
|
273
|
-
const {
|
|
274
|
-
x: n,
|
|
275
|
-
y: o,
|
|
276
|
-
placement: i,
|
|
277
|
-
rects: r,
|
|
278
|
-
platform: l,
|
|
279
|
-
elements: a,
|
|
280
|
-
middlewareData: u
|
|
281
|
-
} = t, {
|
|
282
|
-
element: c,
|
|
283
|
-
padding: h = 0
|
|
284
|
-
} = be(e, t) || {};
|
|
285
|
-
if (c == null)
|
|
286
|
-
return {};
|
|
287
|
-
const f = Wt(h), p = {
|
|
288
|
-
x: n,
|
|
289
|
-
y: o
|
|
290
|
-
}, d = tt(i), g = et(d), m = await l.getDimensions(c), b = d === "y", w = b ? "top" : "left", y = b ? "bottom" : "right", C = b ? "clientHeight" : "clientWidth", P = r.reference[g] + r.reference[d] - p[d] - r.floating[g], E = p[d] - r.reference[d], T = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(c));
|
|
291
|
-
let A = T ? T[C] : 0;
|
|
292
|
-
(!A || !await (l.isElement == null ? void 0 : l.isElement(T))) && (A = a.floating[C] || r.floating[g]);
|
|
293
|
-
const D = P / 2 - E / 2, R = A / 2 - m[g] / 2 - 1, N = we(f[w], R), M = we(f[y], R), k = N, V = A - m[g] - M, F = A / 2 - m[g] / 2 + D, Y = Ke(k, F, V), x = !u.arrow && Me(i) != null && F !== Y && r.reference[g] / 2 - (F < k ? N : M) - m[g] / 2 < 0, s = x ? F < k ? F - k : F - V : 0;
|
|
321
|
+
/**
|
|
322
|
+
* Resolve final position from coordinate sources
|
|
323
|
+
*/
|
|
324
|
+
resolvePosition(t, n) {
|
|
325
|
+
var o, i;
|
|
294
326
|
return {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
327
|
+
x: this.resolveAxisCoordinate({
|
|
328
|
+
current: t.coordinates.x,
|
|
329
|
+
baseline: ((o = t.baselineCoordinates) == null ? void 0 : o.x) ?? null,
|
|
330
|
+
fallback: n.x,
|
|
331
|
+
isAxisEnabled: t.axis === "x" || t.axis === "both"
|
|
332
|
+
}),
|
|
333
|
+
y: this.resolveAxisCoordinate({
|
|
334
|
+
current: t.coordinates.y,
|
|
335
|
+
baseline: ((i = t.baselineCoordinates) == null ? void 0 : i.y) ?? null,
|
|
336
|
+
fallback: n.y,
|
|
337
|
+
isAxisEnabled: t.axis === "y" || t.axis === "both"
|
|
338
|
+
})
|
|
304
339
|
};
|
|
305
340
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
if (N = [...N, {
|
|
339
|
-
placement: i,
|
|
340
|
-
overflows: R
|
|
341
|
-
}], !R.every((F) => F <= 0)) {
|
|
342
|
-
var M, k;
|
|
343
|
-
const F = (((M = r.flip) == null ? void 0 : M.index) || 0) + 1, Y = A[F];
|
|
344
|
-
if (Y && (!(f === "alignment" ? y !== ne(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
345
|
-
// overflows the main axis.
|
|
346
|
-
N.every((v) => ne(v.placement) === y ? v.overflows[0] > 0 : !0)))
|
|
347
|
-
return {
|
|
348
|
-
data: {
|
|
349
|
-
index: F,
|
|
350
|
-
overflows: N
|
|
351
|
-
},
|
|
352
|
-
reset: {
|
|
353
|
-
placement: Y
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
let x = (k = N.filter((s) => s.overflows[0] <= 0).sort((s, v) => s.overflows[1] - v.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
357
|
-
if (!x)
|
|
358
|
-
switch (d) {
|
|
359
|
-
case "bestFit": {
|
|
360
|
-
var V;
|
|
361
|
-
const s = (V = N.filter((v) => {
|
|
362
|
-
if (T) {
|
|
363
|
-
const H = ne(v.placement);
|
|
364
|
-
return H === y || // Create a bias to the `y` side axis due to horizontal
|
|
365
|
-
// reading directions favoring greater width.
|
|
366
|
-
H === "y";
|
|
367
|
-
}
|
|
368
|
-
return !0;
|
|
369
|
-
}).map((v) => [v.placement, v.overflows.filter((H) => H > 0).reduce((H, X) => H + X, 0)]).sort((v, H) => v[1] - H[1])[0]) == null ? void 0 : V[0];
|
|
370
|
-
s && (x = s);
|
|
371
|
-
break;
|
|
372
|
-
}
|
|
373
|
-
case "initialPlacement":
|
|
374
|
-
x = a;
|
|
375
|
-
break;
|
|
376
|
-
}
|
|
377
|
-
if (i !== x)
|
|
378
|
-
return {
|
|
379
|
-
reset: {
|
|
380
|
-
placement: x
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
return {};
|
|
341
|
+
/**
|
|
342
|
+
* Resolve coordinate for a single axis with clear precedence
|
|
343
|
+
*/
|
|
344
|
+
resolveAxisCoordinate(t) {
|
|
345
|
+
const { current: n, baseline: o, fallback: i, isAxisEnabled: l } = t;
|
|
346
|
+
return l && n !== null ? n : o !== null ? o : i;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Calculate virtual element size based on axis constraints
|
|
350
|
+
*/
|
|
351
|
+
calculateSize(t, n) {
|
|
352
|
+
const o = (i, l) => Math.max(0, i || l);
|
|
353
|
+
switch (t) {
|
|
354
|
+
case "both":
|
|
355
|
+
return { width: 0, height: 0 };
|
|
356
|
+
case "x":
|
|
357
|
+
return {
|
|
358
|
+
width: o(
|
|
359
|
+
n.width,
|
|
360
|
+
ce.DEFAULT_DIMENSIONS.width
|
|
361
|
+
),
|
|
362
|
+
height: 0
|
|
363
|
+
};
|
|
364
|
+
case "y":
|
|
365
|
+
return {
|
|
366
|
+
width: 0,
|
|
367
|
+
height: o(
|
|
368
|
+
n.height,
|
|
369
|
+
ce.DEFAULT_DIMENSIONS.height
|
|
370
|
+
)
|
|
371
|
+
};
|
|
385
372
|
}
|
|
386
|
-
}
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Build a DOMRect object
|
|
376
|
+
*/
|
|
377
|
+
buildDOMRect(t) {
|
|
378
|
+
const { x: n, y: o, width: i, height: l } = t, r = Math.max(0, i), a = Math.max(0, l);
|
|
379
|
+
return {
|
|
380
|
+
x: n,
|
|
381
|
+
y: o,
|
|
382
|
+
width: r,
|
|
383
|
+
height: a,
|
|
384
|
+
top: o,
|
|
385
|
+
right: n + r,
|
|
386
|
+
bottom: o + a,
|
|
387
|
+
left: n,
|
|
388
|
+
toJSON: () => ({ x: n, y: o, width: r, height: a })
|
|
389
|
+
};
|
|
390
|
+
}
|
|
387
391
|
};
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
392
|
+
ve(ce, "DEFAULT_DIMENSIONS", { width: 100, height: 30 });
|
|
393
|
+
let Ye = ce;
|
|
394
|
+
class Mt {
|
|
395
|
+
constructor() {
|
|
396
|
+
// The core state every strategy needs: the last known good coordinates
|
|
397
|
+
ve(this, "lastKnownCoordinates", null);
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Get coordinates to use when the floating element opens
|
|
401
|
+
* This lets each strategy decide its opening behavior without client code needing to know the details
|
|
402
|
+
*/
|
|
403
|
+
getCoordinatesForOpening() {
|
|
404
|
+
return this.lastKnownCoordinates;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Called when the floating element closes
|
|
408
|
+
* This is where strategies should clean up any temporary state
|
|
409
|
+
*/
|
|
410
|
+
onClose() {
|
|
411
|
+
this.lastKnownCoordinates = null;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Reset all strategy state - used when the composable is disabled or reset
|
|
415
|
+
*/
|
|
416
|
+
reset() {
|
|
417
|
+
this.lastKnownCoordinates = null;
|
|
418
|
+
}
|
|
395
419
|
}
|
|
396
|
-
|
|
397
|
-
|
|
420
|
+
class dn extends Mt {
|
|
421
|
+
constructor() {
|
|
422
|
+
super(...arguments);
|
|
423
|
+
ve(this, "name", "follow");
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Follow strategy needs all pointer events for continuous tracking
|
|
427
|
+
*/
|
|
428
|
+
getRequiredEvents() {
|
|
429
|
+
return ["pointerdown", "pointermove", "pointerenter"];
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Follow strategy: always update coordinates based on the current pointer position
|
|
433
|
+
* This creates smooth, continuous tracking behavior
|
|
434
|
+
*/
|
|
435
|
+
process(n, o) {
|
|
436
|
+
const i = n.coordinates;
|
|
437
|
+
switch (this.lastKnownCoordinates = i, n.type) {
|
|
438
|
+
case "pointerdown":
|
|
439
|
+
return i;
|
|
440
|
+
case "pointermove":
|
|
441
|
+
return o.isOpen && St(n.originalEvent.pointerType, !0) ? i : null;
|
|
442
|
+
case "pointerenter":
|
|
443
|
+
return i;
|
|
444
|
+
default:
|
|
445
|
+
return null;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
398
448
|
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
449
|
+
class hn extends Mt {
|
|
450
|
+
constructor() {
|
|
451
|
+
super(...arguments);
|
|
452
|
+
ve(this, "name", "static");
|
|
453
|
+
// Static strategy needs to remember the "trigger" coordinates from clicks
|
|
454
|
+
// These take priority over hover coordinates for positioning
|
|
455
|
+
ve(this, "triggerCoordinates", null);
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Static strategy only needs click events, not hover or continuous movement
|
|
459
|
+
* This optimization avoids registering unnecessary pointer events
|
|
460
|
+
*/
|
|
461
|
+
getRequiredEvents() {
|
|
462
|
+
return ["pointerdown"];
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Static strategy: capture coordinates from trigger events, ignore movement
|
|
466
|
+
* This creates stable positioning that doesn't jump around
|
|
467
|
+
*/
|
|
468
|
+
process(n, o) {
|
|
469
|
+
const i = n.coordinates;
|
|
470
|
+
return this.triggerCoordinates = i, this.lastKnownCoordinates = i, o.isOpen ? i : null;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Get coordinates to use when floating element opens
|
|
474
|
+
*/
|
|
475
|
+
getCoordinatesForOpening() {
|
|
476
|
+
return this.triggerCoordinates ? this.triggerCoordinates : this.lastKnownCoordinates;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Reset tracking state
|
|
480
|
+
*/
|
|
481
|
+
reset() {
|
|
482
|
+
super.reset(), this.triggerCoordinates = null;
|
|
483
|
+
}
|
|
484
|
+
onClose() {
|
|
485
|
+
this.triggerCoordinates = null;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
function Co(e, t, n = {}) {
|
|
489
|
+
const { open: o, refs: i } = t, l = new Ye(), r = _({ x: null, y: null }), a = _(null), f = N(() => A(n.axis ?? "both")), c = N(() => A(n.enabled ?? !0)), u = N(() => Ae(A(n.x ?? null))), p = N(() => Ae(A(n.y ?? null))), h = N(
|
|
490
|
+
() => u.value !== null && p.value !== null
|
|
491
|
+
), d = N(() => h.value ? {
|
|
492
|
+
x: u.value,
|
|
493
|
+
y: p.value
|
|
494
|
+
} : r.value), m = N(() => {
|
|
495
|
+
const b = d.value;
|
|
496
|
+
switch (f.value) {
|
|
497
|
+
case "x":
|
|
498
|
+
return { x: b.x, y: null };
|
|
499
|
+
case "y":
|
|
500
|
+
return { x: null, y: b.y };
|
|
501
|
+
case "both":
|
|
502
|
+
return b;
|
|
438
503
|
}
|
|
504
|
+
}), g = (n.trackingMode ?? "follow") === "follow" ? new dn() : new hn(), v = (b, P) => {
|
|
505
|
+
h.value || (r.value = {
|
|
506
|
+
x: Ae(b),
|
|
507
|
+
y: Ae(P)
|
|
508
|
+
});
|
|
509
|
+
}, x = () => {
|
|
510
|
+
h.value || (r.value = { x: null, y: null });
|
|
511
|
+
}, T = (b, P) => {
|
|
512
|
+
const F = {
|
|
513
|
+
type: P,
|
|
514
|
+
coordinates: { x: b.clientX, y: b.clientY },
|
|
515
|
+
originalEvent: b
|
|
516
|
+
}, D = g.process(F, {
|
|
517
|
+
isOpen: o.value
|
|
518
|
+
});
|
|
519
|
+
D && v(D.x, D.y);
|
|
439
520
|
};
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
521
|
+
ne(
|
|
522
|
+
[m, a, f, e],
|
|
523
|
+
() => {
|
|
524
|
+
i.anchorEl.value = l.create({
|
|
525
|
+
coordinates: m.value,
|
|
526
|
+
referenceElement: e.value,
|
|
527
|
+
baselineCoordinates: a.value,
|
|
528
|
+
axis: f.value
|
|
529
|
+
});
|
|
530
|
+
},
|
|
531
|
+
{ immediate: !0 }
|
|
532
|
+
), ne(o, (b) => {
|
|
533
|
+
if (!(!c.value || h.value))
|
|
534
|
+
if (b) {
|
|
535
|
+
const P = g.getCoordinatesForOpening();
|
|
536
|
+
P ? (v(P.x, P.y), a.value = { ...P }) : a.value = { ...r.value };
|
|
537
|
+
} else
|
|
538
|
+
g.onClose(), x(), a.value = null;
|
|
539
|
+
});
|
|
540
|
+
const C = (b) => {
|
|
541
|
+
T(b, "pointerdown");
|
|
542
|
+
}, S = (b) => {
|
|
543
|
+
T(b, "pointerenter");
|
|
544
|
+
}, w = (b) => {
|
|
545
|
+
T(b, "pointermove");
|
|
459
546
|
};
|
|
460
|
-
return
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
547
|
+
return Kt(() => {
|
|
548
|
+
if (h.value || !c.value) return;
|
|
549
|
+
const b = e.value;
|
|
550
|
+
if (!b) return;
|
|
551
|
+
const P = g.getRequiredEvents(), F = {
|
|
552
|
+
pointerenter: S,
|
|
553
|
+
pointerdown: C,
|
|
554
|
+
pointermove: w
|
|
555
|
+
};
|
|
556
|
+
P.forEach((D) => {
|
|
557
|
+
const M = F[D];
|
|
558
|
+
M && b.addEventListener(D, M);
|
|
559
|
+
}), ue(() => {
|
|
560
|
+
P.forEach((D) => {
|
|
561
|
+
const M = F[D];
|
|
562
|
+
M && b.removeEventListener(D, M);
|
|
563
|
+
});
|
|
564
|
+
});
|
|
565
|
+
}), {
|
|
566
|
+
coordinates: qt(m),
|
|
567
|
+
updatePosition: (b, P) => v(b, P)
|
|
466
568
|
};
|
|
467
569
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
async fn(t) {
|
|
473
|
-
var n, o;
|
|
474
|
-
const {
|
|
475
|
-
x: i,
|
|
476
|
-
y: r,
|
|
477
|
-
placement: l,
|
|
478
|
-
middlewareData: a
|
|
479
|
-
} = t, u = await En(t, e);
|
|
480
|
-
return l === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
481
|
-
x: i + u.x,
|
|
482
|
-
y: r + u.y,
|
|
483
|
-
data: {
|
|
484
|
-
...u,
|
|
485
|
-
placement: l
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
}, Cn = function(e) {
|
|
491
|
-
return e === void 0 && (e = {}), {
|
|
492
|
-
name: "shift",
|
|
493
|
-
options: e,
|
|
494
|
-
async fn(t) {
|
|
495
|
-
const {
|
|
496
|
-
x: n,
|
|
497
|
-
y: o,
|
|
498
|
-
placement: i
|
|
499
|
-
} = t, {
|
|
500
|
-
mainAxis: r = !0,
|
|
501
|
-
crossAxis: l = !1,
|
|
502
|
-
limiter: a = {
|
|
503
|
-
fn: (b) => {
|
|
504
|
-
let {
|
|
505
|
-
x: w,
|
|
506
|
-
y
|
|
507
|
-
} = b;
|
|
508
|
-
return {
|
|
509
|
-
x: w,
|
|
510
|
-
y
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
...u
|
|
515
|
-
} = be(e, t), c = {
|
|
516
|
-
x: n,
|
|
517
|
-
y: o
|
|
518
|
-
}, h = await He(t, u), f = ne(de(i)), p = It(f);
|
|
519
|
-
let d = c[p], g = c[f];
|
|
570
|
+
function To(e, t = {}) {
|
|
571
|
+
const { floatingContext: n, treeContext: o } = Fe(e), { enabled: i = !0, capture: l = !1, onEscape: r } = t, { isComposing: a } = pn();
|
|
572
|
+
q(document, "keydown", (c) => {
|
|
573
|
+
if (!(c.key !== "Escape" || !A(i) || a())) {
|
|
520
574
|
if (r) {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
if (l) {
|
|
525
|
-
const b = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", y = g + h[b], C = g - h[w];
|
|
526
|
-
g = Ke(y, g, C);
|
|
575
|
+
r(c);
|
|
576
|
+
return;
|
|
527
577
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
578
|
+
if (o) {
|
|
579
|
+
const u = mn(o);
|
|
580
|
+
u && u.data.setOpen(!1);
|
|
581
|
+
} else
|
|
582
|
+
n.setOpen(!1);
|
|
583
|
+
}
|
|
584
|
+
}, l);
|
|
585
|
+
}
|
|
586
|
+
function mn(e) {
|
|
587
|
+
let t = e;
|
|
588
|
+
for (; t.parent.value && !t.isRoot; )
|
|
589
|
+
t = t.parent.value;
|
|
590
|
+
let n = null, o = -1;
|
|
591
|
+
const i = (l) => {
|
|
592
|
+
if (l.data.open.value) {
|
|
593
|
+
const r = l.getPath().length;
|
|
594
|
+
r > o && (o = r, n = l);
|
|
544
595
|
}
|
|
596
|
+
for (const r of l.children.value)
|
|
597
|
+
i(r);
|
|
545
598
|
};
|
|
546
|
-
|
|
547
|
-
function Be() {
|
|
548
|
-
return typeof window < "u";
|
|
549
|
-
}
|
|
550
|
-
function xe(e) {
|
|
551
|
-
return Vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
552
|
-
}
|
|
553
|
-
function j(e) {
|
|
554
|
-
var t;
|
|
555
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
556
|
-
}
|
|
557
|
-
function Q(e) {
|
|
558
|
-
var t;
|
|
559
|
-
return (t = (Vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
560
|
-
}
|
|
561
|
-
function Vt(e) {
|
|
562
|
-
return Be() ? e instanceof Node || e instanceof j(e).Node : !1;
|
|
563
|
-
}
|
|
564
|
-
function _(e) {
|
|
565
|
-
return Be() ? e instanceof Element || e instanceof j(e).Element : !1;
|
|
566
|
-
}
|
|
567
|
-
function G(e) {
|
|
568
|
-
return Be() ? e instanceof HTMLElement || e instanceof j(e).HTMLElement : !1;
|
|
599
|
+
return i(t), n;
|
|
569
600
|
}
|
|
570
|
-
function
|
|
571
|
-
|
|
601
|
+
function pn() {
|
|
602
|
+
const e = _(!1);
|
|
603
|
+
return q(document, "compositionstart", () => {
|
|
604
|
+
e.value = !0;
|
|
605
|
+
}), q(document, "compositionend", () => {
|
|
606
|
+
e.value = !1;
|
|
607
|
+
}), {
|
|
608
|
+
isComposing: () => e.value
|
|
609
|
+
};
|
|
572
610
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
611
|
+
function Oo(e, t = {}) {
|
|
612
|
+
const { floatingContext: n, treeContext: o } = Fe(e), {
|
|
613
|
+
open: i,
|
|
614
|
+
setOpen: l,
|
|
615
|
+
refs: { floatingEl: r, anchorEl: a }
|
|
616
|
+
} = n, { enabled: f = !0, requireFocusVisible: c = !0 } = t, u = N(() => a.value ? a.value instanceof HTMLElement ? a.value : a.value.contextElement : null);
|
|
617
|
+
let p = !1, h = !0, d;
|
|
618
|
+
q(window, "blur", () => {
|
|
619
|
+
!i.value && u.value && u.value === document.activeElement && (p = !0);
|
|
620
|
+
}), q(window, "focus", () => {
|
|
621
|
+
p = !1;
|
|
622
|
+
}), Gt(() => {
|
|
623
|
+
st() && lt() && (q(
|
|
624
|
+
window,
|
|
625
|
+
"keydown",
|
|
626
|
+
() => {
|
|
627
|
+
h = !0;
|
|
628
|
+
},
|
|
629
|
+
{ capture: !0 }
|
|
630
|
+
), q(
|
|
631
|
+
window,
|
|
632
|
+
"pointerdown",
|
|
633
|
+
() => {
|
|
634
|
+
h = !1;
|
|
635
|
+
},
|
|
636
|
+
{ capture: !0 }
|
|
637
|
+
));
|
|
638
|
+
});
|
|
639
|
+
function m(v) {
|
|
640
|
+
if (p) {
|
|
641
|
+
p = !1;
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
const x = v.target;
|
|
645
|
+
if (A(c) && x) {
|
|
646
|
+
if (st() && lt() && !v.relatedTarget) {
|
|
647
|
+
if (!h && !At(x))
|
|
648
|
+
return;
|
|
649
|
+
} else if (!sn(x))
|
|
650
|
+
return;
|
|
594
651
|
}
|
|
652
|
+
l(!0);
|
|
653
|
+
}
|
|
654
|
+
function g(v) {
|
|
655
|
+
clearTimeout(d), d = window.setTimeout(() => {
|
|
656
|
+
var C;
|
|
657
|
+
const T = (((C = u.value) == null ? void 0 : C.ownerDocument) ?? document).activeElement;
|
|
658
|
+
if (!(!v.relatedTarget && T === u.value)) {
|
|
659
|
+
if (o) {
|
|
660
|
+
if (T && vn(o, T))
|
|
661
|
+
return;
|
|
662
|
+
} else if (r.value && T && r.value.contains(T))
|
|
663
|
+
return;
|
|
664
|
+
l(!1);
|
|
665
|
+
}
|
|
666
|
+
}, 0);
|
|
667
|
+
}
|
|
668
|
+
Ce(() => {
|
|
669
|
+
if (!A(f)) return;
|
|
670
|
+
const v = u.value;
|
|
671
|
+
!v || !(v instanceof HTMLElement) || (v.addEventListener("focus", m), v.addEventListener("blur", g), ue(() => {
|
|
672
|
+
v.removeEventListener("focus", m), v.removeEventListener("blur", g);
|
|
673
|
+
}));
|
|
674
|
+
}), we(() => {
|
|
675
|
+
clearTimeout(d);
|
|
595
676
|
});
|
|
596
677
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
const t = ot(), n = _(e) ? z(e) : e;
|
|
600
|
-
return Sn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || An.some((o) => (n.willChange || "").includes(o)) || Nn.some((o) => (n.contain || "").includes(o));
|
|
678
|
+
function vn(e, t) {
|
|
679
|
+
return J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) ? !0 : Dt(e, t) !== null;
|
|
601
680
|
}
|
|
602
|
-
function
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
return
|
|
609
|
-
|
|
610
|
-
}
|
|
681
|
+
function Dt(e, t) {
|
|
682
|
+
for (const n of e.children.value)
|
|
683
|
+
if (n.data.open.value) {
|
|
684
|
+
if (J(t, n.data.refs.anchorEl.value) || J(t, n.data.refs.floatingEl.value))
|
|
685
|
+
return n;
|
|
686
|
+
const o = Dt(n, t);
|
|
687
|
+
if (o) return o;
|
|
688
|
+
}
|
|
611
689
|
return null;
|
|
612
690
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
const Rn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
617
|
-
function ye(e) {
|
|
618
|
-
return Rn.has(xe(e));
|
|
619
|
-
}
|
|
620
|
-
function z(e) {
|
|
621
|
-
return j(e).getComputedStyle(e);
|
|
691
|
+
let gn = 0;
|
|
692
|
+
function wn() {
|
|
693
|
+
return `vfloat-id-${gn++}`;
|
|
622
694
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
625
|
-
scrollLeft: e.scrollLeft,
|
|
626
|
-
scrollTop: e.scrollTop
|
|
627
|
-
} : {
|
|
628
|
-
scrollLeft: e.scrollX,
|
|
629
|
-
scrollTop: e.scrollY
|
|
630
|
-
};
|
|
695
|
+
function ht(e) {
|
|
696
|
+
return typeof e == "object" && e instanceof HTMLElement;
|
|
631
697
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
const t = (
|
|
636
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
637
|
-
e.assignedSlot || // DOM Element detected.
|
|
638
|
-
e.parentNode || // ShadowRoot detected.
|
|
639
|
-
xt(e) && e.host || // Fallback.
|
|
640
|
-
Q(e)
|
|
698
|
+
function Nt(e) {
|
|
699
|
+
return e.children.value.some(
|
|
700
|
+
(t) => t.data.open.value || Nt(t)
|
|
641
701
|
);
|
|
642
|
-
return xt(t) ? t.host : t;
|
|
643
702
|
}
|
|
644
|
-
function
|
|
645
|
-
|
|
646
|
-
return ye(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : G(t) && Se(t) ? t : $t(t);
|
|
703
|
+
function yn(e, t) {
|
|
704
|
+
return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
|
|
647
705
|
}
|
|
648
|
-
function
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
|
|
706
|
+
function mt(e, t) {
|
|
707
|
+
const [n, o] = e;
|
|
708
|
+
let i = !1;
|
|
709
|
+
const l = t.length;
|
|
710
|
+
for (let r = 0, a = l - 1; r < l; a = r++) {
|
|
711
|
+
const [f, c] = t[r] || [0, 0], [u, p] = t[a] || [0, 0];
|
|
712
|
+
c >= o != p >= o && n <= (u - f) * (o - c) / (p - c) + f && (i = !i);
|
|
655
713
|
}
|
|
656
|
-
return
|
|
657
|
-
}
|
|
658
|
-
function Je(e) {
|
|
659
|
-
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
714
|
+
return i;
|
|
660
715
|
}
|
|
661
|
-
function
|
|
662
|
-
const t =
|
|
663
|
-
let
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
716
|
+
function bn(e = {}) {
|
|
717
|
+
const { blockPointerEvents: t = !1, requireIntent: n = !0 } = e;
|
|
718
|
+
let o = -1, i = !1;
|
|
719
|
+
function l(a, f, c, u, p) {
|
|
720
|
+
const h = ft(), d = h - p;
|
|
721
|
+
if (c === null || u === null || d === 0)
|
|
722
|
+
return {
|
|
723
|
+
speed: null,
|
|
724
|
+
lastX: a,
|
|
725
|
+
lastY: f,
|
|
726
|
+
lastCursorTime: h
|
|
727
|
+
};
|
|
728
|
+
const m = a - c, g = f - u;
|
|
729
|
+
return {
|
|
730
|
+
speed: Math.sqrt(m * m + g * g) / d,
|
|
731
|
+
lastX: a,
|
|
732
|
+
lastY: f,
|
|
733
|
+
lastCursorTime: h
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
const r = function(f) {
|
|
737
|
+
const { x: c, y: u, placement: p, elements: h, buffer: d, onClose: m, nodeId: g, tree: v } = f, x = N(() => {
|
|
738
|
+
const w = h.domReference;
|
|
739
|
+
return ht(w) ? w : (w == null ? void 0 : w.contextElement) ?? null;
|
|
740
|
+
});
|
|
741
|
+
let T = null, C = null, S = ft();
|
|
742
|
+
return function(b) {
|
|
743
|
+
var Se, et, tt, nt, ot, it, rt;
|
|
744
|
+
function P() {
|
|
745
|
+
dt(o), o = -1, m();
|
|
746
|
+
}
|
|
747
|
+
if (dt(o), o = -1, !h.domReference || !h.floating || p == null || c == null || u == null)
|
|
748
|
+
return;
|
|
749
|
+
const { clientX: F, clientY: D } = b, M = [F, D], B = cn(b), W = b.type === "mouseleave", X = h.floating && Ve(h.floating, B), R = x.value && Ve(x.value, B), E = (Se = x.value) == null ? void 0 : Se.getBoundingClientRect(), s = (et = h.floating) == null ? void 0 : et.getBoundingClientRect(), k = p.split("-")[0], y = c > ((s == null ? void 0 : s.right) ?? 0) - ((s == null ? void 0 : s.width) ?? 0) / 2, H = u > ((s == null ? void 0 : s.bottom) ?? 0) - ((s == null ? void 0 : s.height) ?? 0) / 2, ee = E ? yn(M, E) : !1, $ = ((s == null ? void 0 : s.width) ?? 0) > ((E == null ? void 0 : E.width) ?? 0), O = ((s == null ? void 0 : s.height) ?? 0) > ((E == null ? void 0 : E.height) ?? 0), V = ((tt = $ ? E : s) == null ? void 0 : tt.left) ?? 0, re = ((nt = $ ? E : s) == null ? void 0 : nt.right) ?? 0, z = ((ot = O ? E : s) == null ? void 0 : ot.top) ?? 0, se = ((it = O ? E : s) == null ? void 0 : it.bottom) ?? 0;
|
|
750
|
+
if (X && (i = !0, !W))
|
|
751
|
+
return;
|
|
752
|
+
if (R && (i = !1), R && !W) {
|
|
753
|
+
i = !0;
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
if (W && ht(b.relatedTarget) && h.floating && Ve(h.floating, b.relatedTarget))
|
|
757
|
+
return;
|
|
758
|
+
if (v && g) {
|
|
759
|
+
const I = v.nodes.get(g);
|
|
760
|
+
if (I && Nt(I))
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
if (k === "top" && u >= ((E == null ? void 0 : E.bottom) ?? 0) - 1 || k === "bottom" && u <= ((E == null ? void 0 : E.top) ?? 0) + 1 || k === "left" && c >= ((E == null ? void 0 : E.right) ?? 0) - 1 || k === "right" && c <= ((E == null ? void 0 : E.left) ?? 0) + 1)
|
|
764
|
+
return P();
|
|
765
|
+
let te = [];
|
|
766
|
+
switch (k) {
|
|
767
|
+
case "top":
|
|
768
|
+
te = [
|
|
769
|
+
[V, ((E == null ? void 0 : E.top) ?? 0) + 1],
|
|
770
|
+
[V, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
771
|
+
[re, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
772
|
+
[re, ((E == null ? void 0 : E.top) ?? 0) + 1]
|
|
773
|
+
];
|
|
774
|
+
break;
|
|
775
|
+
case "bottom":
|
|
776
|
+
te = [
|
|
777
|
+
[V, ((s == null ? void 0 : s.top) ?? 0) + 1],
|
|
778
|
+
[V, ((E == null ? void 0 : E.bottom) ?? 0) - 1],
|
|
779
|
+
[re, ((E == null ? void 0 : E.bottom) ?? 0) - 1],
|
|
780
|
+
[re, ((s == null ? void 0 : s.top) ?? 0) + 1]
|
|
781
|
+
];
|
|
782
|
+
break;
|
|
783
|
+
case "left":
|
|
784
|
+
te = [
|
|
785
|
+
[((s == null ? void 0 : s.right) ?? 0) - 1, se],
|
|
786
|
+
[((s == null ? void 0 : s.right) ?? 0) - 1, z],
|
|
787
|
+
[((E == null ? void 0 : E.left) ?? 0) + 1, z],
|
|
788
|
+
[((E == null ? void 0 : E.left) ?? 0) + 1, se]
|
|
789
|
+
];
|
|
790
|
+
break;
|
|
791
|
+
case "right":
|
|
792
|
+
te = [
|
|
793
|
+
[((E == null ? void 0 : E.right) ?? 0) - 1, se],
|
|
794
|
+
[((E == null ? void 0 : E.right) ?? 0) - 1, z],
|
|
795
|
+
[((s == null ? void 0 : s.left) ?? 0) + 1, z],
|
|
796
|
+
[((s == null ? void 0 : s.left) ?? 0) + 1, se]
|
|
797
|
+
];
|
|
798
|
+
break;
|
|
799
|
+
}
|
|
800
|
+
function Le([I, j]) {
|
|
801
|
+
const L = d;
|
|
802
|
+
switch (k) {
|
|
803
|
+
case "top": {
|
|
804
|
+
const le = [
|
|
805
|
+
$ ? I + L / 2 : y ? I + L * 4 : I - L * 4,
|
|
806
|
+
j + L + 1
|
|
807
|
+
], ae = [
|
|
808
|
+
$ ? I - L / 2 : y ? I + L * 4 : I - L * 4,
|
|
809
|
+
j + L + 1
|
|
810
|
+
], pe = [
|
|
811
|
+
[
|
|
812
|
+
(s == null ? void 0 : s.left) ?? 0,
|
|
813
|
+
y || $ ? ((s == null ? void 0 : s.bottom) ?? 0) - L : (s == null ? void 0 : s.top) ?? 0
|
|
814
|
+
],
|
|
815
|
+
[
|
|
816
|
+
(s == null ? void 0 : s.right) ?? 0,
|
|
817
|
+
y ? $ ? ((s == null ? void 0 : s.bottom) ?? 0) - L : (s == null ? void 0 : s.top) ?? 0 : ((s == null ? void 0 : s.bottom) ?? 0) - L
|
|
818
|
+
]
|
|
819
|
+
];
|
|
820
|
+
return [le, ae, ...pe];
|
|
821
|
+
}
|
|
822
|
+
case "bottom": {
|
|
823
|
+
const le = [
|
|
824
|
+
$ ? I + L / 2 : y ? I + L * 4 : I - L * 4,
|
|
825
|
+
j - L
|
|
826
|
+
], ae = [
|
|
827
|
+
$ ? I - L / 2 : y ? I + L * 4 : I - L * 4,
|
|
828
|
+
j - L
|
|
829
|
+
], pe = [
|
|
830
|
+
[
|
|
831
|
+
(s == null ? void 0 : s.left) ?? 0,
|
|
832
|
+
y || $ ? ((s == null ? void 0 : s.top) ?? 0) + L : (s == null ? void 0 : s.bottom) ?? 0
|
|
833
|
+
],
|
|
834
|
+
[
|
|
835
|
+
(s == null ? void 0 : s.right) ?? 0,
|
|
836
|
+
y ? $ ? ((s == null ? void 0 : s.top) ?? 0) + L : (s == null ? void 0 : s.bottom) ?? 0 : ((s == null ? void 0 : s.top) ?? 0) + L
|
|
837
|
+
]
|
|
838
|
+
];
|
|
839
|
+
return [le, ae, ...pe];
|
|
840
|
+
}
|
|
841
|
+
case "left": {
|
|
842
|
+
const le = [
|
|
843
|
+
I + L + 1,
|
|
844
|
+
O ? j + L / 2 : H ? j + L * 4 : j - L * 4
|
|
845
|
+
], ae = [
|
|
846
|
+
I + L + 1,
|
|
847
|
+
O ? j - L / 2 : H ? j + L * 4 : j - L * 4
|
|
848
|
+
];
|
|
849
|
+
return [...[
|
|
850
|
+
[
|
|
851
|
+
H || O ? ((s == null ? void 0 : s.right) ?? 0) - L : (s == null ? void 0 : s.left) ?? 0,
|
|
852
|
+
(s == null ? void 0 : s.top) ?? 0
|
|
853
|
+
],
|
|
854
|
+
[
|
|
855
|
+
H ? O ? ((s == null ? void 0 : s.right) ?? 0) - L : (s == null ? void 0 : s.left) ?? 0 : ((s == null ? void 0 : s.right) ?? 0) - L,
|
|
856
|
+
(s == null ? void 0 : s.bottom) ?? 0
|
|
857
|
+
]
|
|
858
|
+
], le, ae];
|
|
859
|
+
}
|
|
860
|
+
case "right": {
|
|
861
|
+
const le = [
|
|
862
|
+
I - L,
|
|
863
|
+
O ? j + L / 2 : H ? j + L * 4 : j - L * 4
|
|
864
|
+
], ae = [
|
|
865
|
+
I - L,
|
|
866
|
+
O ? j - L / 2 : H ? j + L * 4 : j - L * 4
|
|
867
|
+
], pe = [
|
|
868
|
+
[
|
|
869
|
+
H || O ? ((s == null ? void 0 : s.left) ?? 0) + L : (s == null ? void 0 : s.right) ?? 0,
|
|
870
|
+
(s == null ? void 0 : s.top) ?? 0
|
|
871
|
+
],
|
|
872
|
+
[
|
|
873
|
+
H ? O ? ((s == null ? void 0 : s.left) ?? 0) + L : (s == null ? void 0 : s.right) ?? 0 : ((s == null ? void 0 : s.left) ?? 0) + L,
|
|
874
|
+
(s == null ? void 0 : s.bottom) ?? 0
|
|
875
|
+
]
|
|
876
|
+
];
|
|
877
|
+
return [le, ae, ...pe];
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
const me = Le([c, u]);
|
|
882
|
+
if ((rt = e.onPolygonChange) == null || rt.call(e, me), !mt(M, te)) {
|
|
883
|
+
if (mt(M, me)) {
|
|
884
|
+
if (!i && n) {
|
|
885
|
+
const I = l(
|
|
886
|
+
b.clientX,
|
|
887
|
+
b.clientY,
|
|
888
|
+
T,
|
|
889
|
+
C,
|
|
890
|
+
S
|
|
891
|
+
);
|
|
892
|
+
T = I.lastX, C = I.lastY, S = I.lastCursorTime, I.speed !== null && I.speed < 0.1 && (o = window.setTimeout(P, 40));
|
|
893
|
+
}
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
if (i && !ee)
|
|
897
|
+
return P();
|
|
898
|
+
P();
|
|
899
|
+
}
|
|
900
|
+
};
|
|
669
901
|
};
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
let
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
y: a
|
|
902
|
+
return r.__options = {
|
|
903
|
+
blockPointerEvents: t
|
|
904
|
+
}, r;
|
|
905
|
+
}
|
|
906
|
+
const pt = 10;
|
|
907
|
+
function xn(e, t, n) {
|
|
908
|
+
const { delay: o } = n, i = N(() => {
|
|
909
|
+
const c = A(o);
|
|
910
|
+
return (typeof c == "number" ? c : c.open) ?? 0;
|
|
911
|
+
}), l = N(() => {
|
|
912
|
+
const c = A(o);
|
|
913
|
+
return (typeof c == "number" ? c : c.close) ?? 0;
|
|
914
|
+
});
|
|
915
|
+
let r, a;
|
|
916
|
+
const f = () => {
|
|
917
|
+
clearTimeout(r), clearTimeout(a);
|
|
687
918
|
};
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
919
|
+
return we(f), {
|
|
920
|
+
show: (c) => {
|
|
921
|
+
f();
|
|
922
|
+
const u = c ?? i.value;
|
|
923
|
+
u === 0 ? e() : r = setTimeout(e, u);
|
|
924
|
+
},
|
|
925
|
+
hide: (c) => {
|
|
926
|
+
f();
|
|
927
|
+
const u = c ?? l.value;
|
|
928
|
+
u === 0 ? t() : a = setTimeout(t, u);
|
|
929
|
+
},
|
|
930
|
+
showDelay: i,
|
|
931
|
+
hideDelay: l,
|
|
932
|
+
clearTimeouts: f
|
|
695
933
|
};
|
|
696
934
|
}
|
|
697
|
-
function
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
935
|
+
function Po(e, t = {}) {
|
|
936
|
+
const { floatingContext: n, treeContext: o } = Fe(e), {
|
|
937
|
+
open: i,
|
|
938
|
+
setOpen: l,
|
|
939
|
+
refs: { anchorEl: r, floatingEl: a }
|
|
940
|
+
} = n, {
|
|
941
|
+
enabled: f = !0,
|
|
942
|
+
delay: c = 0,
|
|
943
|
+
restMs: u = 0,
|
|
944
|
+
mouseOnly: p = !1,
|
|
945
|
+
safePolygon: h = !1
|
|
946
|
+
} = t, d = N(() => A(f)), m = N(() => A(u)), g = N(() => {
|
|
947
|
+
const y = r.value;
|
|
948
|
+
return !y || y instanceof HTMLElement ? y : y.contextElement ?? null;
|
|
949
|
+
}), { hide: v, show: x, showDelay: T, clearTimeouts: C } = xn(
|
|
950
|
+
() => {
|
|
951
|
+
i.value || l(!0);
|
|
952
|
+
},
|
|
953
|
+
() => {
|
|
954
|
+
i.value && l(!1);
|
|
955
|
+
},
|
|
956
|
+
{ delay: c }
|
|
957
|
+
);
|
|
958
|
+
let S = null, w;
|
|
959
|
+
const b = N(() => T.value === 0 && m.value > 0);
|
|
960
|
+
function P(y) {
|
|
961
|
+
if (!d.value || !M(y) || !b.value || !S) return;
|
|
962
|
+
const H = { x: y.clientX, y: y.clientY }, ee = Math.abs(H.x - S.x), $ = Math.abs(H.y - S.y);
|
|
963
|
+
(ee > pt || $ > pt) && (S = H, clearTimeout(w), w = setTimeout(() => {
|
|
964
|
+
x(0);
|
|
965
|
+
}, m.value));
|
|
966
|
+
}
|
|
967
|
+
function F(y) {
|
|
968
|
+
!d.value || !M(y) || !b.value || (S = { x: y.clientX, y: y.clientY }, w = setTimeout(() => {
|
|
969
|
+
x(0);
|
|
970
|
+
}, m.value));
|
|
971
|
+
}
|
|
972
|
+
function D() {
|
|
973
|
+
clearTimeout(w), S = null;
|
|
974
|
+
}
|
|
975
|
+
Ce(() => {
|
|
976
|
+
const y = g.value;
|
|
977
|
+
!y || !d.value || !b.value || (y.addEventListener("pointerenter", F), y.addEventListener("pointermove", P), y.addEventListener("pointerleave", D), ue(() => {
|
|
978
|
+
y.removeEventListener("pointerenter", F), y.removeEventListener("pointermove", P), y.removeEventListener("pointerleave", D);
|
|
979
|
+
}));
|
|
980
|
+
}), we(() => {
|
|
981
|
+
clearTimeout(w);
|
|
982
|
+
});
|
|
983
|
+
function M(y) {
|
|
984
|
+
return A(p) ? y.pointerType === "mouse" : !0;
|
|
985
|
+
}
|
|
986
|
+
function B(y) {
|
|
987
|
+
!d.value || !M(y) || b.value || (R(), x());
|
|
988
|
+
}
|
|
989
|
+
function W(y) {
|
|
990
|
+
!d.value || !M(y) || (C(), R());
|
|
991
|
+
}
|
|
992
|
+
let X = null;
|
|
993
|
+
function R() {
|
|
994
|
+
X && (document.removeEventListener("pointermove", X), X = null);
|
|
995
|
+
const y = s.value;
|
|
996
|
+
y != null && y.onPolygonChange && y.onPolygonChange([]);
|
|
997
|
+
}
|
|
998
|
+
const E = N(() => !!A(h)), s = N(() => {
|
|
999
|
+
const y = A(h);
|
|
1000
|
+
if (typeof y == "object" && y) return y;
|
|
1001
|
+
if (y === !0) return {};
|
|
1002
|
+
});
|
|
1003
|
+
function k(y) {
|
|
1004
|
+
var O;
|
|
1005
|
+
if (!d.value || !M(y)) return;
|
|
1006
|
+
const { clientX: H, clientY: ee } = y, $ = y.relatedTarget;
|
|
1007
|
+
if (E.value)
|
|
1008
|
+
setTimeout(() => {
|
|
1009
|
+
var te;
|
|
1010
|
+
R();
|
|
1011
|
+
const V = g.value, re = a.value;
|
|
1012
|
+
if (!V || !re) {
|
|
1013
|
+
v();
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
let z, se;
|
|
1017
|
+
if (o) {
|
|
1018
|
+
z = /* @__PURE__ */ new Map();
|
|
1019
|
+
const Le = (me) => {
|
|
1020
|
+
z == null || z.set(me.id, me);
|
|
1021
|
+
for (const Se of me.children.value)
|
|
1022
|
+
Le(Se);
|
|
1023
|
+
};
|
|
1024
|
+
Le(o), se = o.id;
|
|
1025
|
+
}
|
|
1026
|
+
X = bn(s.value)({
|
|
1027
|
+
x: H,
|
|
1028
|
+
y: ee,
|
|
1029
|
+
placement: n.placement.value,
|
|
1030
|
+
elements: {
|
|
1031
|
+
domReference: V,
|
|
1032
|
+
floating: re
|
|
1033
|
+
},
|
|
1034
|
+
buffer: ((te = s.value) == null ? void 0 : te.buffer) ?? 1,
|
|
1035
|
+
onClose: () => {
|
|
1036
|
+
R(), v();
|
|
1037
|
+
},
|
|
1038
|
+
nodeId: se,
|
|
1039
|
+
tree: z ? { nodes: z } : void 0
|
|
1040
|
+
}), X && document.addEventListener("pointermove", X);
|
|
1041
|
+
}, 0);
|
|
1042
|
+
else {
|
|
1043
|
+
if (o) {
|
|
1044
|
+
if (!En(o, $))
|
|
1045
|
+
return;
|
|
1046
|
+
} else if ((O = a.value) != null && O.contains($))
|
|
1047
|
+
return;
|
|
1048
|
+
v();
|
|
713
1049
|
}
|
|
714
1050
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
1051
|
+
Ce(() => {
|
|
1052
|
+
const y = g.value;
|
|
1053
|
+
!y || !d.value || (y.addEventListener("pointerenter", B), y.addEventListener("pointerleave", k), ue(() => {
|
|
1054
|
+
y.removeEventListener("pointerenter", B), y.removeEventListener("pointerleave", k);
|
|
1055
|
+
}));
|
|
1056
|
+
}), Ce(() => {
|
|
1057
|
+
const y = a.value;
|
|
1058
|
+
!y || !d.value || (y.addEventListener("pointerenter", W), y.addEventListener("pointerleave", k), ue(() => {
|
|
1059
|
+
y.removeEventListener("pointerenter", W), y.removeEventListener("pointerleave", k);
|
|
1060
|
+
}));
|
|
1061
|
+
}), we(() => {
|
|
1062
|
+
R();
|
|
720
1063
|
});
|
|
721
1064
|
}
|
|
722
|
-
function
|
|
723
|
-
|
|
724
|
-
return t ? t.left + n : he(Q(e)).left + n;
|
|
1065
|
+
function En(e, t) {
|
|
1066
|
+
return t ? !(J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) || Ke(e, t)) : !0;
|
|
725
1067
|
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
1068
|
+
const Cn = ["top", "right", "bottom", "left"], ye = Math.min, fe = Math.max, De = Math.round, Me = Math.floor, G = (e) => ({
|
|
1069
|
+
x: e,
|
|
1070
|
+
y: e
|
|
1071
|
+
}), Tn = {
|
|
1072
|
+
left: "right",
|
|
1073
|
+
right: "left",
|
|
1074
|
+
bottom: "top",
|
|
1075
|
+
top: "bottom"
|
|
1076
|
+
}, On = {
|
|
1077
|
+
start: "end",
|
|
1078
|
+
end: "start"
|
|
1079
|
+
};
|
|
1080
|
+
function ze(e, t, n) {
|
|
1081
|
+
return fe(e, ye(t, n));
|
|
732
1082
|
}
|
|
733
|
-
function
|
|
734
|
-
|
|
735
|
-
elements: t,
|
|
736
|
-
rect: n,
|
|
737
|
-
offsetParent: o,
|
|
738
|
-
strategy: i
|
|
739
|
-
} = e;
|
|
740
|
-
const r = i === "fixed", l = Q(o), a = t ? Ie(t.floating) : !1;
|
|
741
|
-
if (o === l || a && r)
|
|
742
|
-
return n;
|
|
743
|
-
let u = {
|
|
744
|
-
scrollLeft: 0,
|
|
745
|
-
scrollTop: 0
|
|
746
|
-
}, c = K(1);
|
|
747
|
-
const h = K(0), f = G(o);
|
|
748
|
-
if ((f || !f && !r) && ((xe(o) !== "body" || Se(l)) && (u = We(o)), G(o))) {
|
|
749
|
-
const d = he(o);
|
|
750
|
-
c = ve(o), h.x = d.x + o.clientLeft, h.y = d.y + o.clientTop;
|
|
751
|
-
}
|
|
752
|
-
const p = l && !f && !r ? jt(l, u) : K(0);
|
|
753
|
-
return {
|
|
754
|
-
width: n.width * c.x,
|
|
755
|
-
height: n.height * c.y,
|
|
756
|
-
x: n.x * c.x - u.scrollLeft * c.x + h.x + p.x,
|
|
757
|
-
y: n.y * c.y - u.scrollTop * c.y + h.y + p.y
|
|
758
|
-
};
|
|
1083
|
+
function xe(e, t) {
|
|
1084
|
+
return typeof e == "function" ? e(t) : e;
|
|
759
1085
|
}
|
|
760
|
-
function
|
|
761
|
-
return
|
|
1086
|
+
function de(e) {
|
|
1087
|
+
return e.split("-")[0];
|
|
762
1088
|
}
|
|
763
|
-
function
|
|
764
|
-
|
|
765
|
-
let l = -n.scrollLeft + Ve(e);
|
|
766
|
-
const a = -n.scrollTop;
|
|
767
|
-
return z(o).direction === "rtl" && (l += fe(t.clientWidth, o.clientWidth) - i), {
|
|
768
|
-
width: i,
|
|
769
|
-
height: r,
|
|
770
|
-
x: l,
|
|
771
|
-
y: a
|
|
772
|
-
};
|
|
1089
|
+
function Oe(e) {
|
|
1090
|
+
return e.split("-")[1];
|
|
773
1091
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
const n = j(e), o = Q(e), i = n.visualViewport;
|
|
777
|
-
let r = o.clientWidth, l = o.clientHeight, a = 0, u = 0;
|
|
778
|
-
if (i) {
|
|
779
|
-
r = i.width, l = i.height;
|
|
780
|
-
const h = ot();
|
|
781
|
-
(!h || h && t === "fixed") && (a = i.offsetLeft, u = i.offsetTop);
|
|
782
|
-
}
|
|
783
|
-
const c = Ve(o);
|
|
784
|
-
if (c <= 0) {
|
|
785
|
-
const h = o.ownerDocument, f = h.body, p = getComputedStyle(f), d = h.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, g = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
786
|
-
g <= Et && (r -= g);
|
|
787
|
-
} else c <= Et && (r += c);
|
|
788
|
-
return {
|
|
789
|
-
width: r,
|
|
790
|
-
height: l,
|
|
791
|
-
x: a,
|
|
792
|
-
y: u
|
|
793
|
-
};
|
|
1092
|
+
function Rt(e) {
|
|
1093
|
+
return e === "x" ? "y" : "x";
|
|
794
1094
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
const n = he(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = G(e) ? ve(e) : K(1), l = e.clientWidth * r.x, a = e.clientHeight * r.y, u = i * r.x, c = o * r.y;
|
|
798
|
-
return {
|
|
799
|
-
width: l,
|
|
800
|
-
height: a,
|
|
801
|
-
x: u,
|
|
802
|
-
y: c
|
|
803
|
-
};
|
|
1095
|
+
function qe(e) {
|
|
1096
|
+
return e === "y" ? "height" : "width";
|
|
804
1097
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
o = Wn(e, n);
|
|
809
|
-
else if (t === "document")
|
|
810
|
-
o = In(Q(e));
|
|
811
|
-
else if (_(t))
|
|
812
|
-
o = $n(t, n);
|
|
813
|
-
else {
|
|
814
|
-
const i = Yt(e);
|
|
815
|
-
o = {
|
|
816
|
-
x: t.x - i.x,
|
|
817
|
-
y: t.y - i.y,
|
|
818
|
-
width: t.width,
|
|
819
|
-
height: t.height
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
return Fe(o);
|
|
1098
|
+
const Pn = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1099
|
+
function oe(e) {
|
|
1100
|
+
return Pn.has(de(e)) ? "y" : "x";
|
|
823
1101
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
826
|
-
return n === t || !_(n) || ye(n) ? !1 : z(n).position === "fixed" || _t(n, t);
|
|
1102
|
+
function Ge(e) {
|
|
1103
|
+
return Rt(oe(e));
|
|
827
1104
|
}
|
|
828
|
-
function
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
const r = z(e).position === "fixed";
|
|
834
|
-
let l = r ? oe(e) : e;
|
|
835
|
-
for (; _(l) && !ye(l); ) {
|
|
836
|
-
const a = z(l), u = nt(l);
|
|
837
|
-
!u && a.position === "fixed" && (i = null), (r ? !u && !i : !u && a.position === "static" && !!i && Vn.has(i.position) || Se(l) && !u && _t(e, l)) ? o = o.filter((h) => h !== l) : i = a, l = oe(l);
|
|
838
|
-
}
|
|
839
|
-
return t.set(e, o), o;
|
|
1105
|
+
function Ln(e, t, n) {
|
|
1106
|
+
n === void 0 && (n = !1);
|
|
1107
|
+
const o = Oe(e), i = Ge(e), l = qe(i);
|
|
1108
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
1109
|
+
return t.reference[l] > t.floating[l] && (r = Ne(r)), [r, Ne(r)];
|
|
840
1110
|
}
|
|
841
|
-
function
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
boundary: n,
|
|
845
|
-
rootBoundary: o,
|
|
846
|
-
strategy: i
|
|
847
|
-
} = e;
|
|
848
|
-
const l = [...n === "clippingAncestors" ? Ie(t) ? [] : Xn(t, this._c) : [].concat(n), o], a = l[0], u = l.reduce((c, h) => {
|
|
849
|
-
const f = Tt(t, h, i);
|
|
850
|
-
return c.top = fe(f.top, c.top), c.right = we(f.right, c.right), c.bottom = we(f.bottom, c.bottom), c.left = fe(f.left, c.left), c;
|
|
851
|
-
}, Tt(t, a, i));
|
|
852
|
-
return {
|
|
853
|
-
width: u.right - u.left,
|
|
854
|
-
height: u.bottom - u.top,
|
|
855
|
-
x: u.left,
|
|
856
|
-
y: u.top
|
|
857
|
-
};
|
|
1111
|
+
function Sn(e) {
|
|
1112
|
+
const t = Ne(e);
|
|
1113
|
+
return [_e(e), t, _e(t)];
|
|
858
1114
|
}
|
|
859
|
-
function
|
|
860
|
-
|
|
861
|
-
width: t,
|
|
862
|
-
height: n
|
|
863
|
-
} = Xt(e);
|
|
864
|
-
return {
|
|
865
|
-
width: t,
|
|
866
|
-
height: n
|
|
867
|
-
};
|
|
1115
|
+
function _e(e) {
|
|
1116
|
+
return e.replace(/start|end/g, (t) => On[t]);
|
|
868
1117
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
1118
|
+
const vt = ["left", "right"], gt = ["right", "left"], An = ["top", "bottom"], Mn = ["bottom", "top"];
|
|
1119
|
+
function Dn(e, t, n) {
|
|
1120
|
+
switch (e) {
|
|
1121
|
+
case "top":
|
|
1122
|
+
case "bottom":
|
|
1123
|
+
return n ? t ? gt : vt : t ? vt : gt;
|
|
1124
|
+
case "left":
|
|
1125
|
+
case "right":
|
|
1126
|
+
return t ? An : Mn;
|
|
1127
|
+
default:
|
|
1128
|
+
return [];
|
|
878
1129
|
}
|
|
879
|
-
if (o || !o && !r)
|
|
880
|
-
if ((xe(t) !== "body" || Se(i)) && (a = We(t)), o) {
|
|
881
|
-
const d = he(t, !0, r, t);
|
|
882
|
-
u.x = d.x + t.clientLeft, u.y = d.y + t.clientTop;
|
|
883
|
-
} else i && c();
|
|
884
|
-
r && !o && i && c();
|
|
885
|
-
const h = i && !o && !r ? jt(i, a) : K(0), f = l.left + a.scrollLeft - u.x - h.x, p = l.top + a.scrollTop - u.y - h.y;
|
|
886
|
-
return {
|
|
887
|
-
x: f,
|
|
888
|
-
y: p,
|
|
889
|
-
width: l.width,
|
|
890
|
-
height: l.height
|
|
891
|
-
};
|
|
892
1130
|
}
|
|
893
|
-
function
|
|
894
|
-
|
|
1131
|
+
function Nn(e, t, n, o) {
|
|
1132
|
+
const i = Oe(e);
|
|
1133
|
+
let l = Dn(de(e), n === "start", o);
|
|
1134
|
+
return i && (l = l.map((r) => r + "-" + i), t && (l = l.concat(l.map(_e)))), l;
|
|
895
1135
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
return null;
|
|
899
|
-
if (t)
|
|
900
|
-
return t(e);
|
|
901
|
-
let n = e.offsetParent;
|
|
902
|
-
return Q(e) === n && (n = n.ownerDocument.body), n;
|
|
1136
|
+
function Ne(e) {
|
|
1137
|
+
return e.replace(/left|right|bottom|top/g, (t) => Tn[t]);
|
|
903
1138
|
}
|
|
904
|
-
function
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
return o && ye(o) && _e(o) && !nt(o) ? n : o || Dn(e) || n;
|
|
1139
|
+
function Rn(e) {
|
|
1140
|
+
return {
|
|
1141
|
+
top: 0,
|
|
1142
|
+
right: 0,
|
|
1143
|
+
bottom: 0,
|
|
1144
|
+
left: 0,
|
|
1145
|
+
...e
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
function kt(e) {
|
|
1149
|
+
return typeof e != "number" ? Rn(e) : {
|
|
1150
|
+
top: e,
|
|
1151
|
+
right: e,
|
|
1152
|
+
bottom: e,
|
|
1153
|
+
left: e
|
|
1154
|
+
};
|
|
921
1155
|
}
|
|
922
|
-
|
|
923
|
-
const
|
|
1156
|
+
function Re(e) {
|
|
1157
|
+
const {
|
|
1158
|
+
x: t,
|
|
1159
|
+
y: n,
|
|
1160
|
+
width: o,
|
|
1161
|
+
height: i
|
|
1162
|
+
} = e;
|
|
924
1163
|
return {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1164
|
+
width: o,
|
|
1165
|
+
height: i,
|
|
1166
|
+
top: n,
|
|
1167
|
+
left: t,
|
|
1168
|
+
right: t + o,
|
|
1169
|
+
bottom: n + i,
|
|
1170
|
+
x: t,
|
|
1171
|
+
y: n
|
|
932
1172
|
};
|
|
933
|
-
};
|
|
934
|
-
function Un(e) {
|
|
935
|
-
return z(e).direction === "rtl";
|
|
936
|
-
}
|
|
937
|
-
const qn = {
|
|
938
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Hn,
|
|
939
|
-
getDocumentElement: Q,
|
|
940
|
-
getClippingRect: Yn,
|
|
941
|
-
getOffsetParent: zt,
|
|
942
|
-
getElementRects: zn,
|
|
943
|
-
getClientRects: Bn,
|
|
944
|
-
getDimensions: jn,
|
|
945
|
-
getScale: ve,
|
|
946
|
-
isElement: _,
|
|
947
|
-
isRTL: Un
|
|
948
|
-
};
|
|
949
|
-
function Ut(e, t) {
|
|
950
|
-
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
951
1173
|
}
|
|
952
|
-
function
|
|
953
|
-
let
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1174
|
+
function wt(e, t, n) {
|
|
1175
|
+
let {
|
|
1176
|
+
reference: o,
|
|
1177
|
+
floating: i
|
|
1178
|
+
} = e;
|
|
1179
|
+
const l = oe(t), r = Ge(t), a = qe(r), f = de(t), c = l === "y", u = o.x + o.width / 2 - i.width / 2, p = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
|
|
1180
|
+
let d;
|
|
1181
|
+
switch (f) {
|
|
1182
|
+
case "top":
|
|
1183
|
+
d = {
|
|
1184
|
+
x: u,
|
|
1185
|
+
y: o.y - i.height
|
|
1186
|
+
};
|
|
1187
|
+
break;
|
|
1188
|
+
case "bottom":
|
|
1189
|
+
d = {
|
|
1190
|
+
x: u,
|
|
1191
|
+
y: o.y + o.height
|
|
1192
|
+
};
|
|
1193
|
+
break;
|
|
1194
|
+
case "right":
|
|
1195
|
+
d = {
|
|
1196
|
+
x: o.x + o.width,
|
|
1197
|
+
y: p
|
|
1198
|
+
};
|
|
1199
|
+
break;
|
|
1200
|
+
case "left":
|
|
1201
|
+
d = {
|
|
1202
|
+
x: o.x - i.width,
|
|
1203
|
+
y: p
|
|
1204
|
+
};
|
|
1205
|
+
break;
|
|
1206
|
+
default:
|
|
1207
|
+
d = {
|
|
1208
|
+
x: o.x,
|
|
1209
|
+
y: o.y
|
|
1210
|
+
};
|
|
958
1211
|
}
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
} = c;
|
|
967
|
-
if (a || t(), !p || !d)
|
|
968
|
-
return;
|
|
969
|
-
const g = De(f), m = De(i.clientWidth - (h + p)), b = De(i.clientHeight - (f + d)), w = De(h), C = {
|
|
970
|
-
rootMargin: -g + "px " + -m + "px " + -b + "px " + -w + "px",
|
|
971
|
-
threshold: fe(0, we(1, u)) || 1
|
|
972
|
-
};
|
|
973
|
-
let P = !0;
|
|
974
|
-
function E(T) {
|
|
975
|
-
const A = T[0].intersectionRatio;
|
|
976
|
-
if (A !== u) {
|
|
977
|
-
if (!P)
|
|
978
|
-
return l();
|
|
979
|
-
A ? l(!1, A) : o = setTimeout(() => {
|
|
980
|
-
l(!1, 1e-7);
|
|
981
|
-
}, 1e3);
|
|
982
|
-
}
|
|
983
|
-
A === 1 && !Ut(c, e.getBoundingClientRect()) && l(), P = !1;
|
|
984
|
-
}
|
|
985
|
-
try {
|
|
986
|
-
n = new IntersectionObserver(E, {
|
|
987
|
-
...C,
|
|
988
|
-
// Handle <iframe>s
|
|
989
|
-
root: i.ownerDocument
|
|
990
|
-
});
|
|
991
|
-
} catch {
|
|
992
|
-
n = new IntersectionObserver(E, C);
|
|
993
|
-
}
|
|
994
|
-
n.observe(e);
|
|
1212
|
+
switch (Oe(t)) {
|
|
1213
|
+
case "start":
|
|
1214
|
+
d[r] -= h * (n && c ? -1 : 1);
|
|
1215
|
+
break;
|
|
1216
|
+
case "end":
|
|
1217
|
+
d[r] += h * (n && c ? -1 : 1);
|
|
1218
|
+
break;
|
|
995
1219
|
}
|
|
996
|
-
return
|
|
1220
|
+
return d;
|
|
997
1221
|
}
|
|
998
|
-
|
|
999
|
-
o === void 0 && (o = {});
|
|
1222
|
+
const kn = async (e, t, n) => {
|
|
1000
1223
|
const {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1005
|
-
animationFrame: u = !1
|
|
1006
|
-
} = o, c = it(e), h = i || r ? [...c ? Ce(c) : [], ...Ce(t)] : [];
|
|
1007
|
-
h.forEach((w) => {
|
|
1008
|
-
i && w.addEventListener("scroll", n, {
|
|
1009
|
-
passive: !0
|
|
1010
|
-
}), r && w.addEventListener("resize", n);
|
|
1011
|
-
});
|
|
1012
|
-
const f = c && a ? Kn(c, n) : null;
|
|
1013
|
-
let p = -1, d = null;
|
|
1014
|
-
l && (d = new ResizeObserver((w) => {
|
|
1015
|
-
let [y] = w;
|
|
1016
|
-
y && y.target === c && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1017
|
-
var C;
|
|
1018
|
-
(C = d) == null || C.observe(t);
|
|
1019
|
-
})), n();
|
|
1020
|
-
}), c && !u && d.observe(c), d.observe(t));
|
|
1021
|
-
let g, m = u ? he(e) : null;
|
|
1022
|
-
u && b();
|
|
1023
|
-
function b() {
|
|
1024
|
-
const w = he(e);
|
|
1025
|
-
m && !Ut(m, w) && n(), m = w, g = requestAnimationFrame(b);
|
|
1026
|
-
}
|
|
1027
|
-
return n(), () => {
|
|
1028
|
-
var w;
|
|
1029
|
-
h.forEach((y) => {
|
|
1030
|
-
i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
|
|
1031
|
-
}), f == null || f(), (w = d) == null || w.disconnect(), d = null, u && cancelAnimationFrame(g);
|
|
1032
|
-
};
|
|
1033
|
-
}
|
|
1034
|
-
const Oo = Tn, Mo = Cn, So = yn, Ao = bn, Jn = wn, Qn = (e, t, n) => {
|
|
1035
|
-
const o = /* @__PURE__ */ new Map(), i = {
|
|
1036
|
-
platform: qn,
|
|
1037
|
-
...n
|
|
1038
|
-
}, r = {
|
|
1039
|
-
...i.platform,
|
|
1040
|
-
_c: o
|
|
1041
|
-
};
|
|
1042
|
-
return gn(e, t, {
|
|
1043
|
-
...i,
|
|
1224
|
+
placement: o = "bottom",
|
|
1225
|
+
strategy: i = "absolute",
|
|
1226
|
+
middleware: l = [],
|
|
1044
1227
|
platform: r
|
|
1045
|
-
});
|
|
1046
|
-
|
|
1047
|
-
|
|
1228
|
+
} = n, a = l.filter(Boolean), f = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
1229
|
+
let c = await r.getElementRects({
|
|
1230
|
+
reference: e,
|
|
1231
|
+
floating: t,
|
|
1232
|
+
strategy: i
|
|
1233
|
+
}), {
|
|
1234
|
+
x: u,
|
|
1235
|
+
y: p
|
|
1236
|
+
} = wt(c, o, f), h = o, d = {}, m = 0;
|
|
1237
|
+
for (let g = 0; g < a.length; g++) {
|
|
1238
|
+
const {
|
|
1239
|
+
name: v,
|
|
1240
|
+
fn: x
|
|
1241
|
+
} = a[g], {
|
|
1242
|
+
x: T,
|
|
1243
|
+
y: C,
|
|
1244
|
+
data: S,
|
|
1245
|
+
reset: w
|
|
1246
|
+
} = await x({
|
|
1247
|
+
x: u,
|
|
1248
|
+
y: p,
|
|
1249
|
+
initialPlacement: o,
|
|
1250
|
+
placement: h,
|
|
1251
|
+
strategy: i,
|
|
1252
|
+
middlewareData: d,
|
|
1253
|
+
rects: c,
|
|
1254
|
+
platform: r,
|
|
1255
|
+
elements: {
|
|
1256
|
+
reference: e,
|
|
1257
|
+
floating: t
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
u = T ?? u, p = C ?? p, d = {
|
|
1261
|
+
...d,
|
|
1262
|
+
[v]: {
|
|
1263
|
+
...d[v],
|
|
1264
|
+
...S
|
|
1265
|
+
}
|
|
1266
|
+
}, w && m <= 50 && (m++, typeof w == "object" && (w.placement && (h = w.placement), w.rects && (c = w.rects === !0 ? await r.getElementRects({
|
|
1267
|
+
reference: e,
|
|
1268
|
+
floating: t,
|
|
1269
|
+
strategy: i
|
|
1270
|
+
}) : w.rects), {
|
|
1271
|
+
x: u,
|
|
1272
|
+
y: p
|
|
1273
|
+
} = wt(c, h, f)), g = -1);
|
|
1274
|
+
}
|
|
1048
1275
|
return {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
}
|
|
1276
|
+
x: u,
|
|
1277
|
+
y: p,
|
|
1278
|
+
placement: h,
|
|
1279
|
+
strategy: i,
|
|
1280
|
+
middlewareData: d
|
|
1055
1281
|
};
|
|
1056
|
-
}
|
|
1057
|
-
function
|
|
1282
|
+
};
|
|
1283
|
+
async function ke(e, t) {
|
|
1284
|
+
var n;
|
|
1285
|
+
t === void 0 && (t = {});
|
|
1058
1286
|
const {
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
position: c.value,
|
|
1099
|
-
left: "0",
|
|
1100
|
-
top: "0"
|
|
1101
|
-
});
|
|
1102
|
-
return pe(
|
|
1103
|
-
[h, f, () => S(o)],
|
|
1104
|
-
([E, T, A]) => {
|
|
1105
|
-
const D = t.value;
|
|
1106
|
-
if (!D) return;
|
|
1107
|
-
const R = {
|
|
1108
|
-
position: d.value,
|
|
1109
|
-
left: "0",
|
|
1110
|
-
top: "0"
|
|
1111
|
-
}, N = Pt(D, E), M = Pt(D, T);
|
|
1112
|
-
A ? P.value = {
|
|
1113
|
-
...R,
|
|
1114
|
-
transform: `translate(${N}px, ${M}px)`,
|
|
1115
|
-
...qt(D) >= 1.5 && {
|
|
1116
|
-
"will-change": "transform"
|
|
1117
|
-
}
|
|
1118
|
-
} : P.value = {
|
|
1119
|
-
...R,
|
|
1120
|
-
left: `${N}px`,
|
|
1121
|
-
top: `${M}px`
|
|
1122
|
-
};
|
|
1123
|
-
},
|
|
1124
|
-
{ immediate: !0 }
|
|
1125
|
-
), {
|
|
1126
|
-
x: h,
|
|
1127
|
-
y: f,
|
|
1128
|
-
strategy: d,
|
|
1129
|
-
placement: p,
|
|
1130
|
-
middlewareData: g,
|
|
1131
|
-
isPositioned: m,
|
|
1132
|
-
floatingStyles: P,
|
|
1133
|
-
update: y,
|
|
1134
|
-
refs: {
|
|
1135
|
-
anchorEl: e,
|
|
1136
|
-
floatingEl: t,
|
|
1137
|
-
arrowEl: b
|
|
1138
|
-
},
|
|
1139
|
-
open: l,
|
|
1140
|
-
setOpen: a
|
|
1287
|
+
x: o,
|
|
1288
|
+
y: i,
|
|
1289
|
+
platform: l,
|
|
1290
|
+
rects: r,
|
|
1291
|
+
elements: a,
|
|
1292
|
+
strategy: f
|
|
1293
|
+
} = e, {
|
|
1294
|
+
boundary: c = "clippingAncestors",
|
|
1295
|
+
rootBoundary: u = "viewport",
|
|
1296
|
+
elementContext: p = "floating",
|
|
1297
|
+
altBoundary: h = !1,
|
|
1298
|
+
padding: d = 0
|
|
1299
|
+
} = xe(t, e), m = kt(d), v = a[h ? p === "floating" ? "reference" : "floating" : p], x = Re(await l.getClippingRect({
|
|
1300
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(v))) == null || n ? v : v.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(a.floating)),
|
|
1301
|
+
boundary: c,
|
|
1302
|
+
rootBoundary: u,
|
|
1303
|
+
strategy: f
|
|
1304
|
+
})), T = p === "floating" ? {
|
|
1305
|
+
x: o,
|
|
1306
|
+
y: i,
|
|
1307
|
+
width: r.floating.width,
|
|
1308
|
+
height: r.floating.height
|
|
1309
|
+
} : r.reference, C = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a.floating)), S = await (l.isElement == null ? void 0 : l.isElement(C)) ? await (l.getScale == null ? void 0 : l.getScale(C)) || {
|
|
1310
|
+
x: 1,
|
|
1311
|
+
y: 1
|
|
1312
|
+
} : {
|
|
1313
|
+
x: 1,
|
|
1314
|
+
y: 1
|
|
1315
|
+
}, w = Re(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1316
|
+
elements: a,
|
|
1317
|
+
rect: T,
|
|
1318
|
+
offsetParent: C,
|
|
1319
|
+
strategy: f
|
|
1320
|
+
}) : T);
|
|
1321
|
+
return {
|
|
1322
|
+
top: (x.top - w.top + m.top) / S.y,
|
|
1323
|
+
bottom: (w.bottom - x.bottom + m.bottom) / S.y,
|
|
1324
|
+
left: (x.left - w.left + m.left) / S.x,
|
|
1325
|
+
right: (w.right - x.right + m.right) / S.x
|
|
1141
1326
|
};
|
|
1142
1327
|
}
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
return ((f = r.value.arrow) == null ? void 0 : f.y) ?? 0;
|
|
1161
|
-
}), h = I(() => {
|
|
1162
|
-
if (!(e.value || a.arrowEl.value) || !r.value.arrow)
|
|
1328
|
+
const Fn = (e) => ({
|
|
1329
|
+
name: "arrow",
|
|
1330
|
+
options: e,
|
|
1331
|
+
async fn(t) {
|
|
1332
|
+
const {
|
|
1333
|
+
x: n,
|
|
1334
|
+
y: o,
|
|
1335
|
+
placement: i,
|
|
1336
|
+
rects: l,
|
|
1337
|
+
platform: r,
|
|
1338
|
+
elements: a,
|
|
1339
|
+
middlewareData: f
|
|
1340
|
+
} = t, {
|
|
1341
|
+
element: c,
|
|
1342
|
+
padding: u = 0
|
|
1343
|
+
} = xe(e, t) || {};
|
|
1344
|
+
if (c == null)
|
|
1163
1345
|
return {};
|
|
1164
|
-
const p =
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1346
|
+
const p = kt(u), h = {
|
|
1347
|
+
x: n,
|
|
1348
|
+
y: o
|
|
1349
|
+
}, d = Ge(i), m = qe(d), g = await r.getDimensions(c), v = d === "y", x = v ? "top" : "left", T = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", S = l.reference[m] + l.reference[d] - h[d] - l.floating[m], w = h[d] - l.reference[d], b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
|
|
1350
|
+
let P = b ? b[C] : 0;
|
|
1351
|
+
(!P || !await (r.isElement == null ? void 0 : r.isElement(b))) && (P = a.floating[C] || l.floating[m]);
|
|
1352
|
+
const F = S / 2 - w / 2, D = P / 2 - g[m] / 2 - 1, M = ye(p[x], D), B = ye(p[T], D), W = M, X = P - g[m] - B, R = P / 2 - g[m] / 2 + F, E = ze(W, R, X), s = !f.arrow && Oe(i) != null && R !== E && l.reference[m] / 2 - (R < W ? M : B) - g[m] / 2 < 0, k = s ? R < W ? R - W : R - X : 0;
|
|
1353
|
+
return {
|
|
1354
|
+
[d]: h[d] + k,
|
|
1355
|
+
data: {
|
|
1356
|
+
[d]: E,
|
|
1357
|
+
centerOffset: R - E - k,
|
|
1358
|
+
...s && {
|
|
1359
|
+
alignmentOffset: k
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
reset: s
|
|
1363
|
+
};
|
|
1364
|
+
}
|
|
1365
|
+
}), Hn = function(e) {
|
|
1366
|
+
return e === void 0 && (e = {}), {
|
|
1367
|
+
name: "flip",
|
|
1368
|
+
options: e,
|
|
1369
|
+
async fn(t) {
|
|
1370
|
+
var n, o;
|
|
1371
|
+
const {
|
|
1372
|
+
placement: i,
|
|
1373
|
+
middlewareData: l,
|
|
1374
|
+
rects: r,
|
|
1375
|
+
initialPlacement: a,
|
|
1376
|
+
platform: f,
|
|
1377
|
+
elements: c
|
|
1378
|
+
} = t, {
|
|
1379
|
+
mainAxis: u = !0,
|
|
1380
|
+
crossAxis: p = !0,
|
|
1381
|
+
fallbackPlacements: h,
|
|
1382
|
+
fallbackStrategy: d = "bestFit",
|
|
1383
|
+
fallbackAxisSideDirection: m = "none",
|
|
1384
|
+
flipAlignment: g = !0,
|
|
1385
|
+
...v
|
|
1386
|
+
} = xe(e, t);
|
|
1387
|
+
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
1388
|
+
return {};
|
|
1389
|
+
const x = de(i), T = oe(a), C = de(a) === a, S = await (f.isRTL == null ? void 0 : f.isRTL(c.floating)), w = h || (C || !g ? [Ne(a)] : Sn(a)), b = m !== "none";
|
|
1390
|
+
!h && b && w.push(...Nn(a, g, m, S));
|
|
1391
|
+
const P = [a, ...w], F = await ke(t, v), D = [];
|
|
1392
|
+
let M = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
1393
|
+
if (u && D.push(F[x]), p) {
|
|
1394
|
+
const R = Ln(i, r, S);
|
|
1395
|
+
D.push(F[R[0]], F[R[1]]);
|
|
1396
|
+
}
|
|
1397
|
+
if (M = [...M, {
|
|
1398
|
+
placement: i,
|
|
1399
|
+
overflows: D
|
|
1400
|
+
}], !D.every((R) => R <= 0)) {
|
|
1401
|
+
var B, W;
|
|
1402
|
+
const R = (((B = l.flip) == null ? void 0 : B.index) || 0) + 1, E = P[R];
|
|
1403
|
+
if (E && (!(p === "alignment" ? T !== oe(E) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1404
|
+
// overflows the main axis.
|
|
1405
|
+
M.every((y) => oe(y.placement) === T ? y.overflows[0] > 0 : !0)))
|
|
1406
|
+
return {
|
|
1407
|
+
data: {
|
|
1408
|
+
index: R,
|
|
1409
|
+
overflows: M
|
|
1410
|
+
},
|
|
1411
|
+
reset: {
|
|
1412
|
+
placement: E
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
let s = (W = M.filter((k) => k.overflows[0] <= 0).sort((k, y) => k.overflows[1] - y.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
1416
|
+
if (!s)
|
|
1417
|
+
switch (d) {
|
|
1418
|
+
case "bestFit": {
|
|
1419
|
+
var X;
|
|
1420
|
+
const k = (X = M.filter((y) => {
|
|
1421
|
+
if (b) {
|
|
1422
|
+
const H = oe(y.placement);
|
|
1423
|
+
return H === T || // Create a bias to the `y` side axis due to horizontal
|
|
1424
|
+
// reading directions favoring greater width.
|
|
1425
|
+
H === "y";
|
|
1426
|
+
}
|
|
1427
|
+
return !0;
|
|
1428
|
+
}).map((y) => [y.placement, y.overflows.filter((H) => H > 0).reduce((H, ee) => H + ee, 0)]).sort((y, H) => y[1] - H[1])[0]) == null ? void 0 : X[0];
|
|
1429
|
+
k && (s = k);
|
|
1430
|
+
break;
|
|
1431
|
+
}
|
|
1432
|
+
case "initialPlacement":
|
|
1433
|
+
s = a;
|
|
1434
|
+
break;
|
|
1435
|
+
}
|
|
1436
|
+
if (i !== s)
|
|
1437
|
+
return {
|
|
1438
|
+
reset: {
|
|
1439
|
+
placement: s
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
}
|
|
1443
|
+
return {};
|
|
1444
|
+
}
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
function yt(e, t) {
|
|
1179
1448
|
return {
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1449
|
+
top: e.top - t.height,
|
|
1450
|
+
right: e.right - t.width,
|
|
1451
|
+
bottom: e.bottom - t.height,
|
|
1452
|
+
left: e.left - t.width
|
|
1183
1453
|
};
|
|
1184
1454
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
return `vfloat-id-${eo++}`;
|
|
1188
|
-
}
|
|
1189
|
-
function Ot(e) {
|
|
1190
|
-
return typeof e == "object" && e instanceof HTMLElement;
|
|
1191
|
-
}
|
|
1192
|
-
function no(e) {
|
|
1193
|
-
return e !== null && typeof e == "object" && "data" in e && "id" in e && "children" in e && "parent" in e;
|
|
1455
|
+
function bt(e) {
|
|
1456
|
+
return Cn.some((t) => e[t] >= 0);
|
|
1194
1457
|
}
|
|
1195
|
-
function
|
|
1196
|
-
return
|
|
1197
|
-
|
|
1198
|
-
|
|
1458
|
+
const In = function(e) {
|
|
1459
|
+
return e === void 0 && (e = {}), {
|
|
1460
|
+
name: "hide",
|
|
1461
|
+
options: e,
|
|
1462
|
+
async fn(t) {
|
|
1463
|
+
const {
|
|
1464
|
+
rects: n
|
|
1465
|
+
} = t, {
|
|
1466
|
+
strategy: o = "referenceHidden",
|
|
1467
|
+
...i
|
|
1468
|
+
} = xe(e, t);
|
|
1469
|
+
switch (o) {
|
|
1470
|
+
case "referenceHidden": {
|
|
1471
|
+
const l = await ke(t, {
|
|
1472
|
+
...i,
|
|
1473
|
+
elementContext: "reference"
|
|
1474
|
+
}), r = yt(l, n.reference);
|
|
1475
|
+
return {
|
|
1476
|
+
data: {
|
|
1477
|
+
referenceHiddenOffsets: r,
|
|
1478
|
+
referenceHidden: bt(r)
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
case "escaped": {
|
|
1483
|
+
const l = await ke(t, {
|
|
1484
|
+
...i,
|
|
1485
|
+
altBoundary: !0
|
|
1486
|
+
}), r = yt(l, n.floating);
|
|
1487
|
+
return {
|
|
1488
|
+
data: {
|
|
1489
|
+
escapedOffsets: r,
|
|
1490
|
+
escaped: bt(r)
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
default:
|
|
1495
|
+
return {};
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
}, Bn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1500
|
+
async function Wn(e, t) {
|
|
1501
|
+
const {
|
|
1502
|
+
placement: n,
|
|
1503
|
+
platform: o,
|
|
1504
|
+
elements: i
|
|
1505
|
+
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = de(n), a = Oe(n), f = oe(n) === "y", c = Bn.has(r) ? -1 : 1, u = l && f ? -1 : 1, p = xe(t, e);
|
|
1506
|
+
let {
|
|
1507
|
+
mainAxis: h,
|
|
1508
|
+
crossAxis: d,
|
|
1509
|
+
alignmentAxis: m
|
|
1510
|
+
} = typeof p == "number" ? {
|
|
1511
|
+
mainAxis: p,
|
|
1512
|
+
crossAxis: 0,
|
|
1513
|
+
alignmentAxis: null
|
|
1199
1514
|
} : {
|
|
1200
|
-
|
|
1201
|
-
|
|
1515
|
+
mainAxis: p.mainAxis || 0,
|
|
1516
|
+
crossAxis: p.crossAxis || 0,
|
|
1517
|
+
alignmentAxis: p.alignmentAxis
|
|
1518
|
+
};
|
|
1519
|
+
return a && typeof m == "number" && (d = a === "end" ? m * -1 : m), f ? {
|
|
1520
|
+
x: d * u,
|
|
1521
|
+
y: h * c
|
|
1522
|
+
} : {
|
|
1523
|
+
x: h * c,
|
|
1524
|
+
y: d * u
|
|
1202
1525
|
};
|
|
1203
1526
|
}
|
|
1204
|
-
function
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1527
|
+
const $n = function(e) {
|
|
1528
|
+
return e === void 0 && (e = 0), {
|
|
1529
|
+
name: "offset",
|
|
1530
|
+
options: e,
|
|
1531
|
+
async fn(t) {
|
|
1532
|
+
var n, o;
|
|
1533
|
+
const {
|
|
1534
|
+
x: i,
|
|
1535
|
+
y: l,
|
|
1536
|
+
placement: r,
|
|
1537
|
+
middlewareData: a
|
|
1538
|
+
} = t, f = await Wn(t, e);
|
|
1539
|
+
return r === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
1540
|
+
x: i + f.x,
|
|
1541
|
+
y: l + f.y,
|
|
1542
|
+
data: {
|
|
1543
|
+
...f,
|
|
1544
|
+
placement: r
|
|
1545
|
+
}
|
|
1546
|
+
};
|
|
1219
1547
|
}
|
|
1220
|
-
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1548
|
+
};
|
|
1549
|
+
}, Vn = function(e) {
|
|
1550
|
+
return e === void 0 && (e = {}), {
|
|
1551
|
+
name: "shift",
|
|
1552
|
+
options: e,
|
|
1553
|
+
async fn(t) {
|
|
1554
|
+
const {
|
|
1555
|
+
x: n,
|
|
1556
|
+
y: o,
|
|
1557
|
+
placement: i
|
|
1558
|
+
} = t, {
|
|
1559
|
+
mainAxis: l = !0,
|
|
1560
|
+
crossAxis: r = !1,
|
|
1561
|
+
limiter: a = {
|
|
1562
|
+
fn: (v) => {
|
|
1563
|
+
let {
|
|
1564
|
+
x,
|
|
1565
|
+
y: T
|
|
1566
|
+
} = v;
|
|
1567
|
+
return {
|
|
1568
|
+
x,
|
|
1569
|
+
y: T
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
...f
|
|
1574
|
+
} = xe(e, t), c = {
|
|
1575
|
+
x: n,
|
|
1576
|
+
y: o
|
|
1577
|
+
}, u = await ke(t, f), p = oe(de(i)), h = Rt(p);
|
|
1578
|
+
let d = c[h], m = c[p];
|
|
1579
|
+
if (l) {
|
|
1580
|
+
const v = h === "y" ? "top" : "left", x = h === "y" ? "bottom" : "right", T = d + u[v], C = d - u[x];
|
|
1581
|
+
d = ze(T, d, C);
|
|
1582
|
+
}
|
|
1583
|
+
if (r) {
|
|
1584
|
+
const v = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", T = m + u[v], C = m - u[x];
|
|
1585
|
+
m = ze(T, m, C);
|
|
1586
|
+
}
|
|
1587
|
+
const g = a.fn({
|
|
1588
|
+
...t,
|
|
1589
|
+
[h]: d,
|
|
1590
|
+
[p]: m
|
|
1591
|
+
});
|
|
1592
|
+
return {
|
|
1593
|
+
...g,
|
|
1594
|
+
data: {
|
|
1595
|
+
x: g.x - n,
|
|
1596
|
+
y: g.y - o,
|
|
1597
|
+
enabled: {
|
|
1598
|
+
[h]: l,
|
|
1599
|
+
[p]: r
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1605
|
+
};
|
|
1606
|
+
function He() {
|
|
1607
|
+
return typeof window < "u";
|
|
1262
1608
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1609
|
+
function Ee(e) {
|
|
1610
|
+
return Ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1265
1611
|
}
|
|
1266
|
-
function
|
|
1267
|
-
|
|
1612
|
+
function Y(e) {
|
|
1613
|
+
var t;
|
|
1614
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1268
1615
|
}
|
|
1269
|
-
function
|
|
1270
|
-
|
|
1616
|
+
function Z(e) {
|
|
1617
|
+
var t;
|
|
1618
|
+
return (t = (Ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1271
1619
|
}
|
|
1272
|
-
function
|
|
1273
|
-
return e.
|
|
1620
|
+
function Ft(e) {
|
|
1621
|
+
return He() ? e instanceof Node || e instanceof Y(e).Node : !1;
|
|
1274
1622
|
}
|
|
1275
|
-
function
|
|
1276
|
-
return
|
|
1623
|
+
function U(e) {
|
|
1624
|
+
return He() ? e instanceof Element || e instanceof Y(e).Element : !1;
|
|
1277
1625
|
}
|
|
1278
|
-
function
|
|
1279
|
-
e
|
|
1626
|
+
function Q(e) {
|
|
1627
|
+
return He() ? e instanceof HTMLElement || e instanceof Y(e).HTMLElement : !1;
|
|
1280
1628
|
}
|
|
1281
|
-
function
|
|
1282
|
-
return e.
|
|
1283
|
-
(t) => t.data.open.value || Gt(t)
|
|
1284
|
-
);
|
|
1629
|
+
function xt(e) {
|
|
1630
|
+
return !He() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Y(e).ShadowRoot;
|
|
1285
1631
|
}
|
|
1286
|
-
|
|
1287
|
-
|
|
1632
|
+
const Xn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1633
|
+
function Pe(e) {
|
|
1634
|
+
const {
|
|
1635
|
+
overflow: t,
|
|
1636
|
+
overflowX: n,
|
|
1637
|
+
overflowY: o,
|
|
1638
|
+
display: i
|
|
1639
|
+
} = K(e);
|
|
1640
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Xn.has(i);
|
|
1288
1641
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
const r = t.length;
|
|
1293
|
-
for (let l = 0, a = r - 1; l < r; a = l++) {
|
|
1294
|
-
const [u, c] = t[l] || [0, 0], [h, f] = t[a] || [0, 0];
|
|
1295
|
-
c >= o != f >= o && n <= (h - u) * (o - c) / (f - c) + u && (i = !i);
|
|
1296
|
-
}
|
|
1297
|
-
return i;
|
|
1642
|
+
const jn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1643
|
+
function Yn(e) {
|
|
1644
|
+
return jn.has(Ee(e));
|
|
1298
1645
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
return
|
|
1306
|
-
|
|
1307
|
-
lastX: u,
|
|
1308
|
-
lastY: c,
|
|
1309
|
-
lastCursorTime: d
|
|
1310
|
-
};
|
|
1311
|
-
const m = u - h, b = c - f;
|
|
1312
|
-
return {
|
|
1313
|
-
speed: Math.sqrt(m * m + b * b) / g,
|
|
1314
|
-
lastX: u,
|
|
1315
|
-
lastY: c,
|
|
1316
|
-
lastCursorTime: d
|
|
1317
|
-
};
|
|
1318
|
-
}
|
|
1319
|
-
const a = function(c) {
|
|
1320
|
-
const { x: h, y: f, placement: p, elements: d, buffer: g, onClose: m, nodeId: b, tree: w } = c, y = I(() => {
|
|
1321
|
-
const T = d.domReference;
|
|
1322
|
-
return Ot(T) ? T : (T == null ? void 0 : T.contextElement) ?? null;
|
|
1323
|
-
});
|
|
1324
|
-
let C = null, P = null, E = Rt();
|
|
1325
|
-
return function(A) {
|
|
1326
|
-
var lt, at, ct, ut, ft, dt, ht;
|
|
1327
|
-
function D() {
|
|
1328
|
-
kt(i), i = -1, m();
|
|
1329
|
-
}
|
|
1330
|
-
if (kt(i), i = -1, !d.domReference || !d.floating || p == null || h == null || f == null)
|
|
1331
|
-
return;
|
|
1332
|
-
const { clientX: R, clientY: N } = A, M = [R, N], k = lo(A), V = A.type === "mouseleave", F = d.floating && ze(d.floating, k), Y = y.value && ze(y.value, k), x = (lt = y.value) == null ? void 0 : lt.getBoundingClientRect(), s = (at = d.floating) == null ? void 0 : at.getBoundingClientRect(), v = p.split("-")[0], H = h > ((s == null ? void 0 : s.right) ?? 0) - ((s == null ? void 0 : s.width) ?? 0) / 2, X = f > ((s == null ? void 0 : s.bottom) ?? 0) - ((s == null ? void 0 : s.height) ?? 0) / 2, Z = x ? ao(M, x) : !1, L = ((s == null ? void 0 : s.width) ?? 0) > ((x == null ? void 0 : x.width) ?? 0), W = ((s == null ? void 0 : s.height) ?? 0) > ((x == null ? void 0 : x.height) ?? 0), ie = ((ct = L ? x : s) == null ? void 0 : ct.left) ?? 0, ee = ((ut = L ? x : s) == null ? void 0 : ut.right) ?? 0, re = ((ft = W ? x : s) == null ? void 0 : ft.top) ?? 0, se = ((dt = W ? x : s) == null ? void 0 : dt.bottom) ?? 0;
|
|
1333
|
-
if (F && (r = !0, !V))
|
|
1334
|
-
return;
|
|
1335
|
-
if (Y && (r = !1), Y && !V) {
|
|
1336
|
-
r = !0;
|
|
1337
|
-
return;
|
|
1338
|
-
}
|
|
1339
|
-
if (V && Ot(A.relatedTarget) && d.floating && ze(d.floating, A.relatedTarget))
|
|
1340
|
-
return;
|
|
1341
|
-
if (w && b) {
|
|
1342
|
-
const B = w.nodes.get(b);
|
|
1343
|
-
if (B && Gt(B))
|
|
1344
|
-
return;
|
|
1345
|
-
}
|
|
1346
|
-
if (v === "top" && f >= ((x == null ? void 0 : x.bottom) ?? 0) - 1 || v === "bottom" && f <= ((x == null ? void 0 : x.top) ?? 0) + 1 || v === "left" && h >= ((x == null ? void 0 : x.right) ?? 0) - 1 || v === "right" && h <= ((x == null ? void 0 : x.left) ?? 0) + 1)
|
|
1347
|
-
return D();
|
|
1348
|
-
let te = [];
|
|
1349
|
-
switch (v) {
|
|
1350
|
-
case "top":
|
|
1351
|
-
te = [
|
|
1352
|
-
[ie, ((x == null ? void 0 : x.top) ?? 0) + 1],
|
|
1353
|
-
[ie, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
1354
|
-
[ee, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
1355
|
-
[ee, ((x == null ? void 0 : x.top) ?? 0) + 1]
|
|
1356
|
-
];
|
|
1357
|
-
break;
|
|
1358
|
-
case "bottom":
|
|
1359
|
-
te = [
|
|
1360
|
-
[ie, ((s == null ? void 0 : s.top) ?? 0) + 1],
|
|
1361
|
-
[ie, ((x == null ? void 0 : x.bottom) ?? 0) - 1],
|
|
1362
|
-
[ee, ((x == null ? void 0 : x.bottom) ?? 0) - 1],
|
|
1363
|
-
[ee, ((s == null ? void 0 : s.top) ?? 0) + 1]
|
|
1364
|
-
];
|
|
1365
|
-
break;
|
|
1366
|
-
case "left":
|
|
1367
|
-
te = [
|
|
1368
|
-
[((s == null ? void 0 : s.right) ?? 0) - 1, se],
|
|
1369
|
-
[((s == null ? void 0 : s.right) ?? 0) - 1, re],
|
|
1370
|
-
[((x == null ? void 0 : x.left) ?? 0) + 1, re],
|
|
1371
|
-
[((x == null ? void 0 : x.left) ?? 0) + 1, se]
|
|
1372
|
-
];
|
|
1373
|
-
break;
|
|
1374
|
-
case "right":
|
|
1375
|
-
te = [
|
|
1376
|
-
[((x == null ? void 0 : x.right) ?? 0) - 1, se],
|
|
1377
|
-
[((x == null ? void 0 : x.right) ?? 0) - 1, re],
|
|
1378
|
-
[((s == null ? void 0 : s.left) ?? 0) + 1, re],
|
|
1379
|
-
[((s == null ? void 0 : s.left) ?? 0) + 1, se]
|
|
1380
|
-
];
|
|
1381
|
-
break;
|
|
1382
|
-
}
|
|
1383
|
-
function Ee([B, $]) {
|
|
1384
|
-
const O = g;
|
|
1385
|
-
switch (v) {
|
|
1386
|
-
case "top": {
|
|
1387
|
-
const le = [
|
|
1388
|
-
L ? B + O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1389
|
-
$ + O + 1
|
|
1390
|
-
], ae = [
|
|
1391
|
-
L ? B - O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1392
|
-
$ + O + 1
|
|
1393
|
-
], me = [
|
|
1394
|
-
[
|
|
1395
|
-
(s == null ? void 0 : s.left) ?? 0,
|
|
1396
|
-
H || L ? ((s == null ? void 0 : s.bottom) ?? 0) - O : (s == null ? void 0 : s.top) ?? 0
|
|
1397
|
-
],
|
|
1398
|
-
[
|
|
1399
|
-
(s == null ? void 0 : s.right) ?? 0,
|
|
1400
|
-
H ? L ? ((s == null ? void 0 : s.bottom) ?? 0) - O : (s == null ? void 0 : s.top) ?? 0 : ((s == null ? void 0 : s.bottom) ?? 0) - O
|
|
1401
|
-
]
|
|
1402
|
-
];
|
|
1403
|
-
return [le, ae, ...me];
|
|
1404
|
-
}
|
|
1405
|
-
case "bottom": {
|
|
1406
|
-
const le = [
|
|
1407
|
-
L ? B + O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1408
|
-
$ - O
|
|
1409
|
-
], ae = [
|
|
1410
|
-
L ? B - O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1411
|
-
$ - O
|
|
1412
|
-
], me = [
|
|
1413
|
-
[
|
|
1414
|
-
(s == null ? void 0 : s.left) ?? 0,
|
|
1415
|
-
H || L ? ((s == null ? void 0 : s.top) ?? 0) + O : (s == null ? void 0 : s.bottom) ?? 0
|
|
1416
|
-
],
|
|
1417
|
-
[
|
|
1418
|
-
(s == null ? void 0 : s.right) ?? 0,
|
|
1419
|
-
H ? L ? ((s == null ? void 0 : s.top) ?? 0) + O : (s == null ? void 0 : s.bottom) ?? 0 : ((s == null ? void 0 : s.top) ?? 0) + O
|
|
1420
|
-
]
|
|
1421
|
-
];
|
|
1422
|
-
return [le, ae, ...me];
|
|
1423
|
-
}
|
|
1424
|
-
case "left": {
|
|
1425
|
-
const le = [
|
|
1426
|
-
B + O + 1,
|
|
1427
|
-
W ? $ + O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1428
|
-
], ae = [
|
|
1429
|
-
B + O + 1,
|
|
1430
|
-
W ? $ - O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1431
|
-
];
|
|
1432
|
-
return [...[
|
|
1433
|
-
[
|
|
1434
|
-
X || W ? ((s == null ? void 0 : s.right) ?? 0) - O : (s == null ? void 0 : s.left) ?? 0,
|
|
1435
|
-
(s == null ? void 0 : s.top) ?? 0
|
|
1436
|
-
],
|
|
1437
|
-
[
|
|
1438
|
-
X ? W ? ((s == null ? void 0 : s.right) ?? 0) - O : (s == null ? void 0 : s.left) ?? 0 : ((s == null ? void 0 : s.right) ?? 0) - O,
|
|
1439
|
-
(s == null ? void 0 : s.bottom) ?? 0
|
|
1440
|
-
]
|
|
1441
|
-
], le, ae];
|
|
1442
|
-
}
|
|
1443
|
-
case "right": {
|
|
1444
|
-
const le = [
|
|
1445
|
-
B - O,
|
|
1446
|
-
W ? $ + O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1447
|
-
], ae = [
|
|
1448
|
-
B - O,
|
|
1449
|
-
W ? $ - O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1450
|
-
], me = [
|
|
1451
|
-
[
|
|
1452
|
-
X || W ? ((s == null ? void 0 : s.left) ?? 0) + O : (s == null ? void 0 : s.right) ?? 0,
|
|
1453
|
-
(s == null ? void 0 : s.top) ?? 0
|
|
1454
|
-
],
|
|
1455
|
-
[
|
|
1456
|
-
X ? W ? ((s == null ? void 0 : s.left) ?? 0) + O : (s == null ? void 0 : s.right) ?? 0 : ((s == null ? void 0 : s.left) ?? 0) + O,
|
|
1457
|
-
(s == null ? void 0 : s.bottom) ?? 0
|
|
1458
|
-
]
|
|
1459
|
-
];
|
|
1460
|
-
return [le, ae, ...me];
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
const Ae = Ee([h, f]);
|
|
1465
|
-
if ((ht = e.onPolygonChange) == null || ht.call(e, Ae), !Ft(M, te)) {
|
|
1466
|
-
if (Ft(M, Ae)) {
|
|
1467
|
-
if (!r && o) {
|
|
1468
|
-
const B = l(
|
|
1469
|
-
A.clientX,
|
|
1470
|
-
A.clientY,
|
|
1471
|
-
C,
|
|
1472
|
-
P,
|
|
1473
|
-
E
|
|
1474
|
-
);
|
|
1475
|
-
C = B.lastX, P = B.lastY, E = B.lastCursorTime, B.speed !== null && B.speed < 0.1 && (i = window.setTimeout(D, 40));
|
|
1476
|
-
}
|
|
1477
|
-
return;
|
|
1478
|
-
}
|
|
1479
|
-
if (r && !Z)
|
|
1480
|
-
return D();
|
|
1481
|
-
D();
|
|
1482
|
-
}
|
|
1483
|
-
};
|
|
1484
|
-
};
|
|
1485
|
-
return a.__options = {
|
|
1486
|
-
blockPointerEvents: n
|
|
1487
|
-
}, a;
|
|
1488
|
-
}
|
|
1489
|
-
const Ht = 10;
|
|
1490
|
-
function uo(e, t, n) {
|
|
1491
|
-
const { delay: o } = n, i = I(() => {
|
|
1492
|
-
const c = S(o);
|
|
1493
|
-
return (typeof c == "number" ? c : c.open) ?? 0;
|
|
1494
|
-
}), r = I(() => {
|
|
1495
|
-
const c = S(o);
|
|
1496
|
-
return (typeof c == "number" ? c : c.close) ?? 0;
|
|
1646
|
+
const zn = [":popover-open", ":modal"];
|
|
1647
|
+
function Ie(e) {
|
|
1648
|
+
return zn.some((t) => {
|
|
1649
|
+
try {
|
|
1650
|
+
return e.matches(t);
|
|
1651
|
+
} catch {
|
|
1652
|
+
return !1;
|
|
1653
|
+
}
|
|
1497
1654
|
});
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
return
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1655
|
+
}
|
|
1656
|
+
const _n = ["transform", "translate", "scale", "rotate", "perspective"], Un = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Kn = ["paint", "layout", "strict", "content"];
|
|
1657
|
+
function Je(e) {
|
|
1658
|
+
const t = Qe(), n = U(e) ? K(e) : e;
|
|
1659
|
+
return _n.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Un.some((o) => (n.willChange || "").includes(o)) || Kn.some((o) => (n.contain || "").includes(o));
|
|
1660
|
+
}
|
|
1661
|
+
function qn(e) {
|
|
1662
|
+
let t = ie(e);
|
|
1663
|
+
for (; Q(t) && !be(t); ) {
|
|
1664
|
+
if (Je(t))
|
|
1665
|
+
return t;
|
|
1666
|
+
if (Ie(t))
|
|
1667
|
+
return null;
|
|
1668
|
+
t = ie(t);
|
|
1669
|
+
}
|
|
1670
|
+
return null;
|
|
1671
|
+
}
|
|
1672
|
+
function Qe() {
|
|
1673
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1674
|
+
}
|
|
1675
|
+
const Gn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1676
|
+
function be(e) {
|
|
1677
|
+
return Gn.has(Ee(e));
|
|
1678
|
+
}
|
|
1679
|
+
function K(e) {
|
|
1680
|
+
return Y(e).getComputedStyle(e);
|
|
1681
|
+
}
|
|
1682
|
+
function Be(e) {
|
|
1683
|
+
return U(e) ? {
|
|
1684
|
+
scrollLeft: e.scrollLeft,
|
|
1685
|
+
scrollTop: e.scrollTop
|
|
1686
|
+
} : {
|
|
1687
|
+
scrollLeft: e.scrollX,
|
|
1688
|
+
scrollTop: e.scrollY
|
|
1516
1689
|
};
|
|
1517
1690
|
}
|
|
1518
|
-
function
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
mouseOnly: f = !1,
|
|
1528
|
-
safePolygon: p = !1
|
|
1529
|
-
} = t, d = I(() => S(u)), g = I(() => S(h)), m = I(() => {
|
|
1530
|
-
const v = l.value;
|
|
1531
|
-
return !v || v instanceof HTMLElement ? v : v.contextElement ?? null;
|
|
1532
|
-
}), { hide: b, show: w, showDelay: y, clearTimeouts: C } = uo(
|
|
1533
|
-
() => {
|
|
1534
|
-
i.value || r(!0);
|
|
1535
|
-
},
|
|
1536
|
-
() => {
|
|
1537
|
-
i.value && r(!1);
|
|
1538
|
-
},
|
|
1539
|
-
{ delay: c }
|
|
1691
|
+
function ie(e) {
|
|
1692
|
+
if (Ee(e) === "html")
|
|
1693
|
+
return e;
|
|
1694
|
+
const t = (
|
|
1695
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1696
|
+
e.assignedSlot || // DOM Element detected.
|
|
1697
|
+
e.parentNode || // ShadowRoot detected.
|
|
1698
|
+
xt(e) && e.host || // Fallback.
|
|
1699
|
+
Z(e)
|
|
1540
1700
|
);
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1555
|
-
function R() {
|
|
1556
|
-
clearTimeout(E), P = null;
|
|
1557
|
-
}
|
|
1558
|
-
Te(() => {
|
|
1559
|
-
const v = m.value;
|
|
1560
|
-
!v || !d.value || !T.value || (v.addEventListener("pointerenter", D), v.addEventListener("pointermove", A), v.addEventListener("pointerleave", R), ue(() => {
|
|
1561
|
-
v.removeEventListener("pointerenter", D), v.removeEventListener("pointermove", A), v.removeEventListener("pointerleave", R);
|
|
1562
|
-
}));
|
|
1563
|
-
}), ge(() => {
|
|
1564
|
-
clearTimeout(E);
|
|
1565
|
-
});
|
|
1566
|
-
function N(v) {
|
|
1567
|
-
return S(f) ? v.pointerType === "mouse" : !0;
|
|
1568
|
-
}
|
|
1569
|
-
function M(v) {
|
|
1570
|
-
!d.value || !N(v) || T.value || (F(), w());
|
|
1571
|
-
}
|
|
1572
|
-
function k(v) {
|
|
1573
|
-
!d.value || !N(v) || (C(), F());
|
|
1574
|
-
}
|
|
1575
|
-
let V = null;
|
|
1576
|
-
function F() {
|
|
1577
|
-
V && (document.removeEventListener("pointermove", V), V = null);
|
|
1578
|
-
const v = x.value;
|
|
1579
|
-
v != null && v.onPolygonChange && v.onPolygonChange([]);
|
|
1701
|
+
return xt(t) ? t.host : t;
|
|
1702
|
+
}
|
|
1703
|
+
function Ht(e) {
|
|
1704
|
+
const t = ie(e);
|
|
1705
|
+
return be(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Q(t) && Pe(t) ? t : Ht(t);
|
|
1706
|
+
}
|
|
1707
|
+
function Te(e, t, n) {
|
|
1708
|
+
var o;
|
|
1709
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1710
|
+
const i = Ht(e), l = i === ((o = e.ownerDocument) == null ? void 0 : o.body), r = Y(i);
|
|
1711
|
+
if (l) {
|
|
1712
|
+
const a = Ue(r);
|
|
1713
|
+
return t.concat(r, r.visualViewport || [], Pe(i) ? i : [], a && n ? Te(a) : []);
|
|
1580
1714
|
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1715
|
+
return t.concat(i, Te(i, [], n));
|
|
1716
|
+
}
|
|
1717
|
+
function Ue(e) {
|
|
1718
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1719
|
+
}
|
|
1720
|
+
function It(e) {
|
|
1721
|
+
const t = K(e);
|
|
1722
|
+
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1723
|
+
const i = Q(e), l = i ? e.offsetWidth : n, r = i ? e.offsetHeight : o, a = De(n) !== l || De(o) !== r;
|
|
1724
|
+
return a && (n = l, o = r), {
|
|
1725
|
+
width: n,
|
|
1726
|
+
height: o,
|
|
1727
|
+
$: a
|
|
1728
|
+
};
|
|
1729
|
+
}
|
|
1730
|
+
function Ze(e) {
|
|
1731
|
+
return U(e) ? e : e.contextElement;
|
|
1732
|
+
}
|
|
1733
|
+
function ge(e) {
|
|
1734
|
+
const t = Ze(e);
|
|
1735
|
+
if (!Q(t))
|
|
1736
|
+
return G(1);
|
|
1737
|
+
const n = t.getBoundingClientRect(), {
|
|
1738
|
+
width: o,
|
|
1739
|
+
height: i,
|
|
1740
|
+
$: l
|
|
1741
|
+
} = It(t);
|
|
1742
|
+
let r = (l ? De(n.width) : n.width) / o, a = (l ? De(n.height) : n.height) / i;
|
|
1743
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1744
|
+
x: r,
|
|
1745
|
+
y: a
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
const Jn = /* @__PURE__ */ G(0);
|
|
1749
|
+
function Bt(e) {
|
|
1750
|
+
const t = Y(e);
|
|
1751
|
+
return !Qe() || !t.visualViewport ? Jn : {
|
|
1752
|
+
x: t.visualViewport.offsetLeft,
|
|
1753
|
+
y: t.visualViewport.offsetTop
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
function Qn(e, t, n) {
|
|
1757
|
+
return t === void 0 && (t = !1), !n || t && n !== Y(e) ? !1 : t;
|
|
1758
|
+
}
|
|
1759
|
+
function he(e, t, n, o) {
|
|
1760
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1761
|
+
const i = e.getBoundingClientRect(), l = Ze(e);
|
|
1762
|
+
let r = G(1);
|
|
1763
|
+
t && (o ? U(o) && (r = ge(o)) : r = ge(e));
|
|
1764
|
+
const a = Qn(l, n, o) ? Bt(l) : G(0);
|
|
1765
|
+
let f = (i.left + a.x) / r.x, c = (i.top + a.y) / r.y, u = i.width / r.x, p = i.height / r.y;
|
|
1766
|
+
if (l) {
|
|
1767
|
+
const h = Y(l), d = o && U(o) ? Y(o) : o;
|
|
1768
|
+
let m = h, g = Ue(m);
|
|
1769
|
+
for (; g && o && d !== m; ) {
|
|
1770
|
+
const v = ge(g), x = g.getBoundingClientRect(), T = K(g), C = x.left + (g.clientLeft + parseFloat(T.paddingLeft)) * v.x, S = x.top + (g.clientTop + parseFloat(T.paddingTop)) * v.y;
|
|
1771
|
+
f *= v.x, c *= v.y, u *= v.x, p *= v.y, f += C, c += S, m = Y(g), g = Ue(m);
|
|
1632
1772
|
}
|
|
1633
1773
|
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
}), Te(() => {
|
|
1640
|
-
const v = a.value;
|
|
1641
|
-
!v || !d.value || (v.addEventListener("pointerenter", k), v.addEventListener("pointerleave", s), ue(() => {
|
|
1642
|
-
v.removeEventListener("pointerenter", k), v.removeEventListener("pointerleave", s);
|
|
1643
|
-
}));
|
|
1644
|
-
}), ge(() => {
|
|
1645
|
-
F();
|
|
1774
|
+
return Re({
|
|
1775
|
+
width: u,
|
|
1776
|
+
height: p,
|
|
1777
|
+
x: f,
|
|
1778
|
+
y: c
|
|
1646
1779
|
});
|
|
1647
1780
|
}
|
|
1648
|
-
function
|
|
1649
|
-
|
|
1781
|
+
function We(e, t) {
|
|
1782
|
+
const n = Be(e).scrollLeft;
|
|
1783
|
+
return t ? t.left + n : he(Z(e)).left + n;
|
|
1650
1784
|
}
|
|
1651
|
-
function
|
|
1652
|
-
|
|
1785
|
+
function Wt(e, t) {
|
|
1786
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - We(e, n), i = n.top + t.scrollTop;
|
|
1787
|
+
return {
|
|
1788
|
+
x: o,
|
|
1789
|
+
y: i
|
|
1790
|
+
};
|
|
1653
1791
|
}
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1792
|
+
function Zn(e) {
|
|
1793
|
+
let {
|
|
1794
|
+
elements: t,
|
|
1795
|
+
rect: n,
|
|
1796
|
+
offsetParent: o,
|
|
1797
|
+
strategy: i
|
|
1798
|
+
} = e;
|
|
1799
|
+
const l = i === "fixed", r = Z(o), a = t ? Ie(t.floating) : !1;
|
|
1800
|
+
if (o === r || a && l)
|
|
1801
|
+
return n;
|
|
1802
|
+
let f = {
|
|
1803
|
+
scrollLeft: 0,
|
|
1804
|
+
scrollTop: 0
|
|
1805
|
+
}, c = G(1);
|
|
1806
|
+
const u = G(0), p = Q(o);
|
|
1807
|
+
if ((p || !p && !l) && ((Ee(o) !== "body" || Pe(r)) && (f = Be(o)), Q(o))) {
|
|
1808
|
+
const d = he(o);
|
|
1809
|
+
c = ge(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
1810
|
+
}
|
|
1811
|
+
const h = r && !p && !l ? Wt(r, f) : G(0);
|
|
1812
|
+
return {
|
|
1813
|
+
width: n.width * c.x,
|
|
1814
|
+
height: n.height * c.y,
|
|
1815
|
+
x: n.x * c.x - f.scrollLeft * c.x + u.x + h.x,
|
|
1816
|
+
y: n.y * c.y - f.scrollTop * c.y + u.y + h.y
|
|
1817
|
+
};
|
|
1659
1818
|
}
|
|
1660
|
-
function
|
|
1661
|
-
return
|
|
1662
|
-
e,
|
|
1663
|
-
t,
|
|
1664
|
-
{
|
|
1665
|
-
...n,
|
|
1666
|
-
immediate: !0
|
|
1667
|
-
}
|
|
1668
|
-
);
|
|
1819
|
+
function eo(e) {
|
|
1820
|
+
return Array.from(e.getClientRects());
|
|
1669
1821
|
}
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
const
|
|
1674
|
-
return (
|
|
1822
|
+
function to(e) {
|
|
1823
|
+
const t = Z(e), n = Be(e), o = e.ownerDocument.body, i = fe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), l = fe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1824
|
+
let r = -n.scrollLeft + We(e);
|
|
1825
|
+
const a = -n.scrollTop;
|
|
1826
|
+
return K(o).direction === "rtl" && (r += fe(t.clientWidth, o.clientWidth) - i), {
|
|
1827
|
+
width: i,
|
|
1828
|
+
height: l,
|
|
1829
|
+
x: r,
|
|
1830
|
+
y: a
|
|
1831
|
+
};
|
|
1675
1832
|
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
()
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
return;
|
|
1696
|
-
const f = vo(h) ? { ...h } : h;
|
|
1697
|
-
t.push(
|
|
1698
|
-
...a.flatMap(
|
|
1699
|
-
(p) => u.flatMap(
|
|
1700
|
-
(d) => c.map((g) => o(p, d, g, f))
|
|
1701
|
-
)
|
|
1702
|
-
)
|
|
1703
|
-
);
|
|
1704
|
-
},
|
|
1705
|
-
{ flush: "post" }
|
|
1706
|
-
), l = () => {
|
|
1707
|
-
r(), n();
|
|
1833
|
+
const Et = 25;
|
|
1834
|
+
function no(e, t) {
|
|
1835
|
+
const n = Y(e), o = Z(e), i = n.visualViewport;
|
|
1836
|
+
let l = o.clientWidth, r = o.clientHeight, a = 0, f = 0;
|
|
1837
|
+
if (i) {
|
|
1838
|
+
l = i.width, r = i.height;
|
|
1839
|
+
const u = Qe();
|
|
1840
|
+
(!u || u && t === "fixed") && (a = i.offsetLeft, f = i.offsetTop);
|
|
1841
|
+
}
|
|
1842
|
+
const c = We(o);
|
|
1843
|
+
if (c <= 0) {
|
|
1844
|
+
const u = o.ownerDocument, p = u.body, h = getComputedStyle(p), d = u.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - p.clientWidth - d);
|
|
1845
|
+
m <= Et && (l -= m);
|
|
1846
|
+
} else c <= Et && (l += c);
|
|
1847
|
+
return {
|
|
1848
|
+
width: l,
|
|
1849
|
+
height: r,
|
|
1850
|
+
x: a,
|
|
1851
|
+
y: f
|
|
1708
1852
|
};
|
|
1709
|
-
return ho(n), l;
|
|
1710
1853
|
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
));
|
|
1738
|
-
});
|
|
1739
|
-
function g(b) {
|
|
1740
|
-
if (f) {
|
|
1741
|
-
f = !1;
|
|
1742
|
-
return;
|
|
1743
|
-
}
|
|
1744
|
-
const w = b.target;
|
|
1745
|
-
if (S(c) && w) {
|
|
1746
|
-
if (Nt() && Dt() && !b.relatedTarget) {
|
|
1747
|
-
if (!p && !Kt(w))
|
|
1748
|
-
return;
|
|
1749
|
-
} else if (!so(w))
|
|
1750
|
-
return;
|
|
1751
|
-
}
|
|
1752
|
-
r(!0);
|
|
1854
|
+
const oo = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1855
|
+
function io(e, t) {
|
|
1856
|
+
const n = he(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, l = Q(e) ? ge(e) : G(1), r = e.clientWidth * l.x, a = e.clientHeight * l.y, f = i * l.x, c = o * l.y;
|
|
1857
|
+
return {
|
|
1858
|
+
width: r,
|
|
1859
|
+
height: a,
|
|
1860
|
+
x: f,
|
|
1861
|
+
y: c
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
function Ct(e, t, n) {
|
|
1865
|
+
let o;
|
|
1866
|
+
if (t === "viewport")
|
|
1867
|
+
o = no(e, n);
|
|
1868
|
+
else if (t === "document")
|
|
1869
|
+
o = to(Z(e));
|
|
1870
|
+
else if (U(t))
|
|
1871
|
+
o = io(t, n);
|
|
1872
|
+
else {
|
|
1873
|
+
const i = Bt(e);
|
|
1874
|
+
o = {
|
|
1875
|
+
x: t.x - i.x,
|
|
1876
|
+
y: t.y - i.y,
|
|
1877
|
+
width: t.width,
|
|
1878
|
+
height: t.height
|
|
1879
|
+
};
|
|
1753
1880
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1881
|
+
return Re(o);
|
|
1882
|
+
}
|
|
1883
|
+
function $t(e, t) {
|
|
1884
|
+
const n = ie(e);
|
|
1885
|
+
return n === t || !U(n) || be(n) ? !1 : K(n).position === "fixed" || $t(n, t);
|
|
1886
|
+
}
|
|
1887
|
+
function ro(e, t) {
|
|
1888
|
+
const n = t.get(e);
|
|
1889
|
+
if (n)
|
|
1890
|
+
return n;
|
|
1891
|
+
let o = Te(e, [], !1).filter((a) => U(a) && Ee(a) !== "body"), i = null;
|
|
1892
|
+
const l = K(e).position === "fixed";
|
|
1893
|
+
let r = l ? ie(e) : e;
|
|
1894
|
+
for (; U(r) && !be(r); ) {
|
|
1895
|
+
const a = K(r), f = Je(r);
|
|
1896
|
+
!f && a.position === "fixed" && (i = null), (l ? !f && !i : !f && a.position === "static" && !!i && oo.has(i.position) || Pe(r) && !f && $t(e, r)) ? o = o.filter((u) => u !== r) : i = a, r = ie(r);
|
|
1767
1897
|
}
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
}
|
|
1898
|
+
return t.set(e, o), o;
|
|
1899
|
+
}
|
|
1900
|
+
function so(e) {
|
|
1901
|
+
let {
|
|
1902
|
+
element: t,
|
|
1903
|
+
boundary: n,
|
|
1904
|
+
rootBoundary: o,
|
|
1905
|
+
strategy: i
|
|
1906
|
+
} = e;
|
|
1907
|
+
const r = [...n === "clippingAncestors" ? Ie(t) ? [] : ro(t, this._c) : [].concat(n), o], a = r[0], f = r.reduce((c, u) => {
|
|
1908
|
+
const p = Ct(t, u, i);
|
|
1909
|
+
return c.top = fe(p.top, c.top), c.right = ye(p.right, c.right), c.bottom = ye(p.bottom, c.bottom), c.left = fe(p.left, c.left), c;
|
|
1910
|
+
}, Ct(t, a, i));
|
|
1911
|
+
return {
|
|
1912
|
+
width: f.right - f.left,
|
|
1913
|
+
height: f.bottom - f.top,
|
|
1914
|
+
x: f.left,
|
|
1915
|
+
y: f.top
|
|
1916
|
+
};
|
|
1777
1917
|
}
|
|
1778
|
-
function
|
|
1779
|
-
|
|
1918
|
+
function lo(e) {
|
|
1919
|
+
const {
|
|
1920
|
+
width: t,
|
|
1921
|
+
height: n
|
|
1922
|
+
} = It(e);
|
|
1923
|
+
return {
|
|
1924
|
+
width: t,
|
|
1925
|
+
height: n
|
|
1926
|
+
};
|
|
1780
1927
|
}
|
|
1781
|
-
function
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1928
|
+
function ao(e, t, n) {
|
|
1929
|
+
const o = Q(t), i = Z(t), l = n === "fixed", r = he(e, !0, l, t);
|
|
1930
|
+
let a = {
|
|
1931
|
+
scrollLeft: 0,
|
|
1932
|
+
scrollTop: 0
|
|
1933
|
+
};
|
|
1934
|
+
const f = G(0);
|
|
1935
|
+
function c() {
|
|
1936
|
+
f.x = We(i);
|
|
1937
|
+
}
|
|
1938
|
+
if (o || !o && !l)
|
|
1939
|
+
if ((Ee(t) !== "body" || Pe(i)) && (a = Be(t)), o) {
|
|
1940
|
+
const d = he(t, !0, l, t);
|
|
1941
|
+
f.x = d.x + t.clientLeft, f.y = d.y + t.clientTop;
|
|
1942
|
+
} else i && c();
|
|
1943
|
+
l && !o && i && c();
|
|
1944
|
+
const u = i && !o && !l ? Wt(i, a) : G(0), p = r.left + a.scrollLeft - f.x - u.x, h = r.top + a.scrollTop - f.y - u.y;
|
|
1945
|
+
return {
|
|
1946
|
+
x: p,
|
|
1947
|
+
y: h,
|
|
1948
|
+
width: r.width,
|
|
1949
|
+
height: r.height
|
|
1950
|
+
};
|
|
1790
1951
|
}
|
|
1791
|
-
function
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
function M() {
|
|
1813
|
-
T = !0;
|
|
1814
|
-
try {
|
|
1815
|
-
i.value ? S(c) && r(!1) : r(!0);
|
|
1816
|
-
} finally {
|
|
1817
|
-
Promise.resolve().then(() => {
|
|
1818
|
-
T = !1;
|
|
1819
|
-
});
|
|
1952
|
+
function Xe(e) {
|
|
1953
|
+
return K(e).position === "static";
|
|
1954
|
+
}
|
|
1955
|
+
function Tt(e, t) {
|
|
1956
|
+
if (!Q(e) || K(e).position === "fixed")
|
|
1957
|
+
return null;
|
|
1958
|
+
if (t)
|
|
1959
|
+
return t(e);
|
|
1960
|
+
let n = e.offsetParent;
|
|
1961
|
+
return Z(e) === n && (n = n.ownerDocument.body), n;
|
|
1962
|
+
}
|
|
1963
|
+
function Vt(e, t) {
|
|
1964
|
+
const n = Y(e);
|
|
1965
|
+
if (Ie(e))
|
|
1966
|
+
return n;
|
|
1967
|
+
if (!Q(e)) {
|
|
1968
|
+
let i = ie(e);
|
|
1969
|
+
for (; i && !be(i); ) {
|
|
1970
|
+
if (U(i) && !Xe(i))
|
|
1971
|
+
return i;
|
|
1972
|
+
i = ie(i);
|
|
1820
1973
|
}
|
|
1974
|
+
return n;
|
|
1821
1975
|
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
if (Z(C)) {
|
|
1837
|
-
k();
|
|
1838
|
-
return;
|
|
1976
|
+
let o = Tt(e, t);
|
|
1977
|
+
for (; o && Yn(o) && Xe(o); )
|
|
1978
|
+
o = Tt(o, t);
|
|
1979
|
+
return o && be(o) && Xe(o) && !Je(o) ? n : o || qn(e) || n;
|
|
1980
|
+
}
|
|
1981
|
+
const co = async function(e) {
|
|
1982
|
+
const t = this.getOffsetParent || Vt, n = this.getDimensions, o = await n(e.floating);
|
|
1983
|
+
return {
|
|
1984
|
+
reference: ao(e.reference, await t(e.floating), e.strategy),
|
|
1985
|
+
floating: {
|
|
1986
|
+
x: 0,
|
|
1987
|
+
y: 0,
|
|
1988
|
+
width: o.width,
|
|
1989
|
+
height: o.height
|
|
1839
1990
|
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1991
|
+
};
|
|
1992
|
+
};
|
|
1993
|
+
function uo(e) {
|
|
1994
|
+
return K(e).direction === "rtl";
|
|
1995
|
+
}
|
|
1996
|
+
const fo = {
|
|
1997
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Zn,
|
|
1998
|
+
getDocumentElement: Z,
|
|
1999
|
+
getClippingRect: so,
|
|
2000
|
+
getOffsetParent: Vt,
|
|
2001
|
+
getElementRects: co,
|
|
2002
|
+
getClientRects: eo,
|
|
2003
|
+
getDimensions: lo,
|
|
2004
|
+
getScale: ge,
|
|
2005
|
+
isElement: U,
|
|
2006
|
+
isRTL: uo
|
|
2007
|
+
};
|
|
2008
|
+
function Xt(e, t) {
|
|
2009
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2010
|
+
}
|
|
2011
|
+
function ho(e, t) {
|
|
2012
|
+
let n = null, o;
|
|
2013
|
+
const i = Z(e);
|
|
2014
|
+
function l() {
|
|
2015
|
+
var a;
|
|
2016
|
+
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
1851
2017
|
}
|
|
1852
|
-
function
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2018
|
+
function r(a, f) {
|
|
2019
|
+
a === void 0 && (a = !1), f === void 0 && (f = 1), l();
|
|
2020
|
+
const c = e.getBoundingClientRect(), {
|
|
2021
|
+
left: u,
|
|
2022
|
+
top: p,
|
|
2023
|
+
width: h,
|
|
2024
|
+
height: d
|
|
2025
|
+
} = c;
|
|
2026
|
+
if (a || t(), !h || !d)
|
|
1857
2027
|
return;
|
|
2028
|
+
const m = Me(p), g = Me(i.clientWidth - (u + h)), v = Me(i.clientHeight - (p + d)), x = Me(u), C = {
|
|
2029
|
+
rootMargin: -m + "px " + -g + "px " + -v + "px " + -x + "px",
|
|
2030
|
+
threshold: fe(0, ye(1, f)) || 1
|
|
2031
|
+
};
|
|
2032
|
+
let S = !0;
|
|
2033
|
+
function w(b) {
|
|
2034
|
+
const P = b[0].intersectionRatio;
|
|
2035
|
+
if (P !== f) {
|
|
2036
|
+
if (!S)
|
|
2037
|
+
return r();
|
|
2038
|
+
P ? r(!1, P) : o = setTimeout(() => {
|
|
2039
|
+
r(!1, 1e-7);
|
|
2040
|
+
}, 1e3);
|
|
2041
|
+
}
|
|
2042
|
+
P === 1 && !Xt(c, e.getBoundingClientRect()) && r(), S = !1;
|
|
1858
2043
|
}
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
return;
|
|
1868
|
-
b ? b(L, n) : r(!1);
|
|
2044
|
+
try {
|
|
2045
|
+
n = new IntersectionObserver(w, {
|
|
2046
|
+
...C,
|
|
2047
|
+
// Handle <iframe>s
|
|
2048
|
+
root: i.ownerDocument
|
|
2049
|
+
});
|
|
2050
|
+
} catch {
|
|
2051
|
+
n = new IntersectionObserver(w, C);
|
|
1869
2052
|
}
|
|
2053
|
+
n.observe(e);
|
|
1870
2054
|
}
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
2055
|
+
return r(!0), l;
|
|
2056
|
+
}
|
|
2057
|
+
function mo(e, t, n, o) {
|
|
2058
|
+
o === void 0 && (o = {});
|
|
2059
|
+
const {
|
|
2060
|
+
ancestorScroll: i = !0,
|
|
2061
|
+
ancestorResize: l = !0,
|
|
2062
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
2063
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
2064
|
+
animationFrame: f = !1
|
|
2065
|
+
} = o, c = Ze(e), u = i || l ? [...c ? Te(c) : [], ...Te(t)] : [];
|
|
2066
|
+
u.forEach((x) => {
|
|
2067
|
+
i && x.addEventListener("scroll", n, {
|
|
2068
|
+
passive: !0
|
|
2069
|
+
}), l && x.addEventListener("resize", n);
|
|
2070
|
+
});
|
|
2071
|
+
const p = c && a ? ho(c, n) : null;
|
|
2072
|
+
let h = -1, d = null;
|
|
2073
|
+
r && (d = new ResizeObserver((x) => {
|
|
2074
|
+
let [T] = x;
|
|
2075
|
+
T && T.target === c && d && (d.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
2076
|
+
var C;
|
|
2077
|
+
(C = d) == null || C.observe(t);
|
|
2078
|
+
})), n();
|
|
2079
|
+
}), c && !f && d.observe(c), d.observe(t));
|
|
2080
|
+
let m, g = f ? he(e) : null;
|
|
2081
|
+
f && v();
|
|
2082
|
+
function v() {
|
|
2083
|
+
const x = he(e);
|
|
2084
|
+
g && !Xt(g, x) && n(), g = x, m = requestAnimationFrame(v);
|
|
1881
2085
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
}));
|
|
1887
|
-
}
|
|
1888
|
-
() => A.value && D.value ? document : null,
|
|
1889
|
-
() => S(g),
|
|
1890
|
-
v,
|
|
1891
|
-
{ capture: S(m) }
|
|
1892
|
-
), q(
|
|
1893
|
-
() => A.value && D.value && S(y) ? N.value : null,
|
|
1894
|
-
"mousedown",
|
|
1895
|
-
H,
|
|
1896
|
-
{ capture: !0 }
|
|
1897
|
-
), q(
|
|
1898
|
-
() => A.value && D.value && S(y) ? N.value : null,
|
|
1899
|
-
"mouseup",
|
|
1900
|
-
X,
|
|
1901
|
-
{ capture: !0 }
|
|
1902
|
-
);
|
|
2086
|
+
return n(), () => {
|
|
2087
|
+
var x;
|
|
2088
|
+
u.forEach((T) => {
|
|
2089
|
+
i && T.removeEventListener("scroll", n), l && T.removeEventListener("resize", n);
|
|
2090
|
+
}), p == null || p(), (x = d) == null || x.disconnect(), d = null, f && cancelAnimationFrame(m);
|
|
2091
|
+
};
|
|
1903
2092
|
}
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
l.value = {
|
|
1912
|
-
x: m,
|
|
1913
|
-
y: b
|
|
1914
|
-
}, o.value && (i.anchorEl.value = Eo(
|
|
1915
|
-
e.value,
|
|
1916
|
-
a.value,
|
|
1917
|
-
l.value
|
|
1918
|
-
));
|
|
2093
|
+
const Lo = $n, So = Vn, Ao = Hn, Mo = In, po = Fn, vo = (e, t, n) => {
|
|
2094
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
2095
|
+
platform: fo,
|
|
2096
|
+
...n
|
|
2097
|
+
}, l = {
|
|
2098
|
+
...i.platform,
|
|
2099
|
+
_c: o
|
|
1919
2100
|
};
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
2101
|
+
return kn(e, t, {
|
|
2102
|
+
...i,
|
|
2103
|
+
platform: l
|
|
1923
2104
|
});
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
},
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2105
|
+
};
|
|
2106
|
+
function Do(e, t, n = {}) {
|
|
2107
|
+
const { offset: o = "-4px" } = n, { middlewareData: i, placement: l, refs: r } = t;
|
|
2108
|
+
ne(e, (u) => {
|
|
2109
|
+
r.arrowEl.value = u;
|
|
2110
|
+
});
|
|
2111
|
+
const a = N(() => {
|
|
2112
|
+
var u;
|
|
2113
|
+
return ((u = i.value.arrow) == null ? void 0 : u.x) ?? 0;
|
|
2114
|
+
}), f = N(() => {
|
|
2115
|
+
var u;
|
|
2116
|
+
return ((u = i.value.arrow) == null ? void 0 : u.y) ?? 0;
|
|
2117
|
+
}), c = N(() => {
|
|
2118
|
+
if (!(e.value || r.arrowEl.value) || !i.value.arrow)
|
|
2119
|
+
return {};
|
|
2120
|
+
const p = A(l).split("-")[0], h = a.value, d = f.value;
|
|
2121
|
+
return p === "bottom" ? {
|
|
2122
|
+
"inset-inline-start": `${h}px`,
|
|
2123
|
+
"inset-block-start": o
|
|
2124
|
+
} : p === "top" ? {
|
|
2125
|
+
"inset-inline-start": `${h}px`,
|
|
2126
|
+
"inset-block-end": o
|
|
2127
|
+
} : p === "right" ? {
|
|
2128
|
+
"inset-block-start": `${d}px`,
|
|
2129
|
+
"inset-inline-start": o
|
|
2130
|
+
} : p === "left" ? {
|
|
2131
|
+
"inset-block-start": `${d}px`,
|
|
2132
|
+
"inset-inline-end": o
|
|
2133
|
+
} : {};
|
|
2134
|
+
});
|
|
2135
|
+
return {
|
|
2136
|
+
arrowX: a,
|
|
2137
|
+
arrowY: f,
|
|
2138
|
+
arrowStyles: c
|
|
1940
2139
|
};
|
|
1941
2140
|
}
|
|
1942
|
-
function
|
|
1943
|
-
let o = null, i = null;
|
|
1944
|
-
const r = e;
|
|
2141
|
+
function go(e) {
|
|
1945
2142
|
return {
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
x: 0,
|
|
1952
|
-
y: 0
|
|
1953
|
-
}, a = t === "x" || t === "both", u = t === "y" || t === "both";
|
|
1954
|
-
let c = 0, h = 0, f = l.x, p = l.y;
|
|
1955
|
-
return r && (o == null && n.x != null && a && (o = l.x - n.x), i == null && n.y != null && u && (i = l.y - n.y), f -= o || 0, p -= i || 0), a && n.x != null ? f = n.x : (o = null, c = l.width), u && n.y != null ? p = n.y : (i = null, h = l.height), t === "both" && (c = 0, h = 0), {
|
|
1956
|
-
width: c,
|
|
1957
|
-
height: h,
|
|
1958
|
-
x: f,
|
|
1959
|
-
y: p,
|
|
1960
|
-
top: p,
|
|
1961
|
-
right: f + c,
|
|
1962
|
-
bottom: p + h,
|
|
1963
|
-
left: f
|
|
1964
|
-
};
|
|
2143
|
+
name: "arrow",
|
|
2144
|
+
options: e,
|
|
2145
|
+
fn(t) {
|
|
2146
|
+
const n = A(e.element);
|
|
2147
|
+
return n == null ? {} : po({ element: n, padding: e.padding }).fn(t);
|
|
1965
2148
|
}
|
|
1966
2149
|
};
|
|
1967
2150
|
}
|
|
1968
|
-
function
|
|
1969
|
-
const {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2151
|
+
function Ot(e, t, n = {}) {
|
|
2152
|
+
const {
|
|
2153
|
+
transform: o = !0,
|
|
2154
|
+
middlewares: i,
|
|
2155
|
+
autoUpdate: l = !0,
|
|
2156
|
+
open: r = _(!1)
|
|
2157
|
+
} = n, a = (w) => {
|
|
2158
|
+
r.value = w;
|
|
2159
|
+
}, f = N(() => A(n.placement) ?? "bottom"), c = N(() => A(n.strategy) ?? "absolute"), u = _(0), p = _(0), h = _(f.value), d = _(c.value), m = je({}), g = _(!1), v = _(null), x = N(() => {
|
|
2160
|
+
const w = A(i) || [];
|
|
2161
|
+
return v.value && !w.some((P) => P.name === "arrow") ? [...w, go({ element: v })] : w;
|
|
2162
|
+
}), T = async () => {
|
|
2163
|
+
if (!e.value || !t.value) return;
|
|
2164
|
+
const w = await vo(e.value, t.value, {
|
|
2165
|
+
placement: f.value,
|
|
2166
|
+
strategy: c.value,
|
|
2167
|
+
middleware: x.value
|
|
2168
|
+
});
|
|
2169
|
+
u.value = w.x, p.value = w.y, h.value = w.placement, d.value = w.strategy, m.value = w.middlewareData, g.value = r.value;
|
|
2170
|
+
};
|
|
2171
|
+
ne([f, c, x], () => {
|
|
2172
|
+
r.value && T();
|
|
2173
|
+
});
|
|
2174
|
+
let C;
|
|
2175
|
+
ne(
|
|
2176
|
+
[e, t, r],
|
|
2177
|
+
([w, b, P]) => {
|
|
2178
|
+
!P || !w || !b || (l && (C = mo(
|
|
2179
|
+
w,
|
|
2180
|
+
b,
|
|
2181
|
+
T,
|
|
2182
|
+
typeof l == "object" ? l : void 0
|
|
2183
|
+
)), ue(() => {
|
|
2184
|
+
C == null || C(), C = void 0;
|
|
2185
|
+
}));
|
|
1975
2186
|
},
|
|
1976
|
-
|
|
1977
|
-
)
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
const
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
2187
|
+
{ immediate: !0 }
|
|
2188
|
+
), we(() => C == null ? void 0 : C()), ne(r, (w) => {
|
|
2189
|
+
w || (g.value = !1);
|
|
2190
|
+
});
|
|
2191
|
+
const S = _({
|
|
2192
|
+
position: c.value,
|
|
2193
|
+
left: "0",
|
|
2194
|
+
top: "0"
|
|
2195
|
+
});
|
|
2196
|
+
return ne(
|
|
2197
|
+
[u, p, () => A(o)],
|
|
2198
|
+
([w, b, P]) => {
|
|
2199
|
+
const F = t.value;
|
|
2200
|
+
if (!F) return;
|
|
2201
|
+
const D = {
|
|
2202
|
+
position: d.value,
|
|
2203
|
+
left: "0",
|
|
2204
|
+
top: "0"
|
|
2205
|
+
}, M = Pt(F, w), B = Pt(F, b);
|
|
2206
|
+
P ? S.value = {
|
|
2207
|
+
...D,
|
|
2208
|
+
transform: `translate(${M}px, ${B}px)`,
|
|
2209
|
+
...jt(F) >= 1.5 && {
|
|
2210
|
+
"will-change": "transform"
|
|
2211
|
+
}
|
|
2212
|
+
} : S.value = {
|
|
2213
|
+
...D,
|
|
2214
|
+
left: `${M}px`,
|
|
2215
|
+
top: `${B}px`
|
|
2216
|
+
};
|
|
2217
|
+
},
|
|
2218
|
+
{ immediate: !0 }
|
|
2219
|
+
), {
|
|
2220
|
+
x: u,
|
|
2221
|
+
y: p,
|
|
2222
|
+
strategy: d,
|
|
2223
|
+
placement: h,
|
|
2224
|
+
middlewareData: m,
|
|
2225
|
+
isPositioned: g,
|
|
2226
|
+
floatingStyles: S,
|
|
2227
|
+
update: T,
|
|
2228
|
+
refs: {
|
|
2229
|
+
anchorEl: e,
|
|
2230
|
+
floatingEl: t,
|
|
2231
|
+
arrowEl: v
|
|
2232
|
+
},
|
|
2233
|
+
open: r,
|
|
2234
|
+
setOpen: a
|
|
1987
2235
|
};
|
|
1988
2236
|
}
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
if (
|
|
2050
|
-
|
|
2051
|
-
|
|
2237
|
+
function Pt(e, t) {
|
|
2238
|
+
const n = jt(e);
|
|
2239
|
+
return Math.round(t * n) / n;
|
|
2240
|
+
}
|
|
2241
|
+
function jt(e) {
|
|
2242
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2243
|
+
}
|
|
2244
|
+
function No(e, t, n = {}, o = {}) {
|
|
2245
|
+
const { ...i } = n, l = Ot(e, t, i), r = wo(l, o);
|
|
2246
|
+
return {
|
|
2247
|
+
...r,
|
|
2248
|
+
addNode: (p, h, d = {}) => {
|
|
2249
|
+
const { parentId: m, ...g } = d, v = Ot(p, h, g);
|
|
2250
|
+
return r.addNode(v, m);
|
|
2251
|
+
},
|
|
2252
|
+
getAllOpenNodes: () => {
|
|
2253
|
+
const p = [];
|
|
2254
|
+
for (const h of r.nodeMap.values())
|
|
2255
|
+
h.data.open.value && p.push(h);
|
|
2256
|
+
return p;
|
|
2257
|
+
},
|
|
2258
|
+
getTopmostOpenNode: () => {
|
|
2259
|
+
let p = null, h = -1;
|
|
2260
|
+
for (const d of r.nodeMap.values())
|
|
2261
|
+
if (d.data.open.value) {
|
|
2262
|
+
const m = d.getPath().length;
|
|
2263
|
+
m > h && (h = m, p = d);
|
|
2264
|
+
}
|
|
2265
|
+
return p;
|
|
2266
|
+
},
|
|
2267
|
+
applyToNodes: (p, h, d = {}) => {
|
|
2268
|
+
const { relationship: m = "self-and-children", applyToMatching: g = !0 } = d, v = r.findNodeById(p);
|
|
2269
|
+
if (!v)
|
|
2270
|
+
return;
|
|
2271
|
+
const x = [], T = /* @__PURE__ */ new Set(), C = (w) => {
|
|
2272
|
+
w && !T.has(w.id) && (x.push(w), T.add(w.id));
|
|
2273
|
+
}, S = (w) => {
|
|
2274
|
+
for (const b of w)
|
|
2275
|
+
C(b);
|
|
2276
|
+
};
|
|
2277
|
+
if (m === "ancestors-only")
|
|
2278
|
+
for (const w of v.getPath())
|
|
2279
|
+
w.id !== v.id && C(w);
|
|
2280
|
+
else if (m === "siblings-only") {
|
|
2281
|
+
if (v.parent.value)
|
|
2282
|
+
for (const w of v.parent.value.children.value)
|
|
2283
|
+
w.id !== v.id && C(w);
|
|
2284
|
+
} else if (m === "descendants-only")
|
|
2285
|
+
for (const w of r.traverse("dfs", v))
|
|
2286
|
+
w.id !== v.id && C(w);
|
|
2287
|
+
else if (m === "children-only")
|
|
2288
|
+
S(v.children.value);
|
|
2289
|
+
else if (m === "self-and-ancestors")
|
|
2290
|
+
S(v.getPath());
|
|
2291
|
+
else if (m === "self-and-children")
|
|
2292
|
+
C(v), S(v.children.value);
|
|
2293
|
+
else if (m === "self-and-descendants")
|
|
2294
|
+
S(r.traverse("dfs", v));
|
|
2295
|
+
else if (m === "self-and-siblings")
|
|
2296
|
+
C(v), v.parent.value && S(v.parent.value.children.value);
|
|
2297
|
+
else if (m === "self-ancestors-and-children")
|
|
2298
|
+
S(v.getPath()), S(v.children.value);
|
|
2299
|
+
else if (m === "full-branch")
|
|
2300
|
+
S(v.getPath()), S(r.traverse("dfs", v));
|
|
2301
|
+
else if (m === "all-except-branch") {
|
|
2302
|
+
const w = /* @__PURE__ */ new Set();
|
|
2303
|
+
for (const b of v.getPath())
|
|
2304
|
+
w.add(b.id);
|
|
2305
|
+
for (const b of r.traverse("dfs", v))
|
|
2306
|
+
w.add(b.id);
|
|
2307
|
+
for (const b of r.nodeMap.values())
|
|
2308
|
+
!w.has(b.id) === g && h(b);
|
|
2309
|
+
return;
|
|
2310
|
+
} else {
|
|
2311
|
+
console.warn(`applyToNodes: Unknown relationship "${m}".`);
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2314
|
+
if (g)
|
|
2315
|
+
for (const w of x)
|
|
2316
|
+
h(w);
|
|
2317
|
+
else
|
|
2318
|
+
for (const w of r.nodeMap.values())
|
|
2319
|
+
T.has(w.id) || h(w);
|
|
2052
2320
|
}
|
|
2053
|
-
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* Gets the path of nodes from the root to this node.
|
|
2057
|
-
* @returns An array of nodes starting with the root and ending with this node.
|
|
2058
|
-
*/
|
|
2059
|
-
getPath() {
|
|
2060
|
-
const t = [];
|
|
2061
|
-
let n = this;
|
|
2062
|
-
for (; n; )
|
|
2063
|
-
t.push(n), n = n.parent.value;
|
|
2064
|
-
return t.reverse();
|
|
2065
|
-
}
|
|
2066
|
-
/** Checks if the node is the true root of the tree, distinct from an orphaned node. */
|
|
2067
|
-
get isRoot() {
|
|
2068
|
-
return Xe(this, Le);
|
|
2069
|
-
}
|
|
2070
|
-
/** Checks if the node is a leaf node (has no children). */
|
|
2071
|
-
get isLeaf() {
|
|
2072
|
-
return this.children.value.length === 0;
|
|
2073
|
-
}
|
|
2321
|
+
};
|
|
2074
2322
|
}
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
const
|
|
2130
|
-
if (!
|
|
2323
|
+
function Lt(e, t = null, n = {}, o = !1) {
|
|
2324
|
+
const i = n.id ?? wn(), l = je(t), r = je([]), a = N(() => r.value.length === 0), f = {
|
|
2325
|
+
id: i,
|
|
2326
|
+
data: e,
|
|
2327
|
+
parent: l,
|
|
2328
|
+
children: r,
|
|
2329
|
+
isRoot: o,
|
|
2330
|
+
isLeaf: a,
|
|
2331
|
+
addChild: (c) => {
|
|
2332
|
+
r.value = [...r.value, c];
|
|
2333
|
+
},
|
|
2334
|
+
_removeChildInstance: (c) => r.value.includes(c) ? (r.value = r.value.filter((u) => u.id !== c.id), c.parent.value = null, !0) : !1,
|
|
2335
|
+
findChild: (c) => r.value.find(c) ?? null,
|
|
2336
|
+
findDescendant: (c) => {
|
|
2337
|
+
const u = [f];
|
|
2338
|
+
for (; u.length > 0; ) {
|
|
2339
|
+
const p = u.pop();
|
|
2340
|
+
if (c(p))
|
|
2341
|
+
return p;
|
|
2342
|
+
for (let h = p.children.value.length - 1; h >= 0; h--)
|
|
2343
|
+
u.push(p.children.value[h]);
|
|
2344
|
+
}
|
|
2345
|
+
return null;
|
|
2346
|
+
},
|
|
2347
|
+
isDescendantOf: (c) => {
|
|
2348
|
+
let u = l.value;
|
|
2349
|
+
for (; u; ) {
|
|
2350
|
+
if (u.id === c.id)
|
|
2351
|
+
return !0;
|
|
2352
|
+
u = u.parent.value;
|
|
2353
|
+
}
|
|
2354
|
+
return !1;
|
|
2355
|
+
},
|
|
2356
|
+
getPath: () => {
|
|
2357
|
+
const c = [];
|
|
2358
|
+
let u = f;
|
|
2359
|
+
for (; u; )
|
|
2360
|
+
c.push(u), u = u.parent.value;
|
|
2361
|
+
return c.reverse();
|
|
2362
|
+
}
|
|
2363
|
+
};
|
|
2364
|
+
return Object.freeze(f);
|
|
2365
|
+
}
|
|
2366
|
+
function wo(e, t) {
|
|
2367
|
+
const n = (t == null ? void 0 : t.deleteStrategy) ?? "recursive", o = Jt(/* @__PURE__ */ new Map()), i = Lt(e, null, {}, !0);
|
|
2368
|
+
o.set(i.id, i);
|
|
2369
|
+
const l = (h) => o.get(h) ?? null, r = (h, d = null, m = {}) => {
|
|
2370
|
+
const g = d ? l(d) : i;
|
|
2371
|
+
if (!g)
|
|
2372
|
+
return console.error(`Tree addNode: Parent node with ID ${d} not found.`), null;
|
|
2373
|
+
m.id && o.has(m.id) && (m.id = void 0);
|
|
2374
|
+
const v = Lt(h, g, m);
|
|
2375
|
+
return o.set(v.id, v), g.addChild(v), v;
|
|
2376
|
+
}, a = (h, d) => {
|
|
2377
|
+
const m = d ?? n, g = l(h);
|
|
2378
|
+
if (!g)
|
|
2131
2379
|
return !1;
|
|
2132
|
-
if (
|
|
2380
|
+
if (g.isRoot)
|
|
2133
2381
|
return console.error("Tree removeNode: Cannot remove the root node."), !1;
|
|
2134
|
-
const
|
|
2135
|
-
if (
|
|
2136
|
-
|
|
2382
|
+
const v = g.parent.value;
|
|
2383
|
+
if (m === "recursive")
|
|
2384
|
+
p(g);
|
|
2137
2385
|
else {
|
|
2138
|
-
for (const
|
|
2139
|
-
|
|
2140
|
-
|
|
2386
|
+
for (const x of g.children.value)
|
|
2387
|
+
x.parent.value = null;
|
|
2388
|
+
g.children.value = [], o.delete(g.id);
|
|
2141
2389
|
}
|
|
2142
|
-
return
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
* @returns True if the node was successfully moved, false otherwise.
|
|
2149
|
-
*/
|
|
2150
|
-
moveNode(t, n) {
|
|
2151
|
-
const o = this.findNodeById(t);
|
|
2152
|
-
if (!o)
|
|
2153
|
-
return console.error(`Tree moveNode: Node with ID ${t} not found.`), !1;
|
|
2154
|
-
if (o.isRoot)
|
|
2390
|
+
return v._removeChildInstance(g);
|
|
2391
|
+
}, f = (h, d) => {
|
|
2392
|
+
const m = l(h);
|
|
2393
|
+
if (!m)
|
|
2394
|
+
return console.error(`Tree moveNode: Node with ID ${h} not found.`), !1;
|
|
2395
|
+
if (m.isRoot)
|
|
2155
2396
|
return console.error("Tree moveNode: Cannot move the root node."), !1;
|
|
2156
|
-
if (
|
|
2397
|
+
if (h === d)
|
|
2157
2398
|
return console.error("Tree moveNode: Cannot move a node to be a child of itself."), !1;
|
|
2158
|
-
const
|
|
2159
|
-
if (!
|
|
2160
|
-
return console.error(`Tree moveNode: New parent node with ID ${
|
|
2161
|
-
if (
|
|
2399
|
+
const g = d ? l(d) : i;
|
|
2400
|
+
if (!g)
|
|
2401
|
+
return console.error(`Tree moveNode: New parent node with ID ${d} not found.`), !1;
|
|
2402
|
+
if (g.isDescendantOf(m))
|
|
2162
2403
|
return console.error("Tree moveNode: Cannot move a node to become its own descendant."), !1;
|
|
2163
|
-
const
|
|
2164
|
-
if (
|
|
2165
|
-
if (!
|
|
2404
|
+
const v = m.parent.value;
|
|
2405
|
+
if (v) {
|
|
2406
|
+
if (!v._removeChildInstance(m))
|
|
2166
2407
|
return console.error("Tree moveNode: Failed to remove node from its original parent."), !1;
|
|
2167
|
-
} else if (
|
|
2168
|
-
if (
|
|
2408
|
+
} else if (m.isRoot) {
|
|
2409
|
+
if (m.isRoot)
|
|
2169
2410
|
return console.error("Tree moveNode: Attempting to move the root node, which is not allowed."), !1;
|
|
2170
2411
|
}
|
|
2171
|
-
return
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
if (t === "dfs") {
|
|
2184
|
-
const i = [n];
|
|
2185
|
-
for (; i.length > 0; ) {
|
|
2186
|
-
const r = i.pop();
|
|
2187
|
-
o.push(r);
|
|
2188
|
-
for (let l = r.children.value.length - 1; l >= 0; l--)
|
|
2189
|
-
i.push(r.children.value[l]);
|
|
2412
|
+
return g.addChild(m), m.parent.value = g, !0;
|
|
2413
|
+
}, c = (h = "dfs", d = i) => {
|
|
2414
|
+
const m = [];
|
|
2415
|
+
if (!d)
|
|
2416
|
+
return console.warn("Tree traverse: Start node is null, returning empty array."), m;
|
|
2417
|
+
if (h === "dfs") {
|
|
2418
|
+
const g = [d];
|
|
2419
|
+
for (; g.length > 0; ) {
|
|
2420
|
+
const v = g.pop();
|
|
2421
|
+
m.push(v);
|
|
2422
|
+
for (let x = v.children.value.length - 1; x >= 0; x--)
|
|
2423
|
+
g.push(v.children.value[x]);
|
|
2190
2424
|
}
|
|
2191
2425
|
} else {
|
|
2192
|
-
const
|
|
2193
|
-
for (;
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2196
|
-
for (const
|
|
2197
|
-
|
|
2426
|
+
const g = [d];
|
|
2427
|
+
for (; g.length > 0; ) {
|
|
2428
|
+
const v = g.shift();
|
|
2429
|
+
m.push(v);
|
|
2430
|
+
for (const x of v.children.value)
|
|
2431
|
+
g.push(x);
|
|
2198
2432
|
}
|
|
2199
2433
|
}
|
|
2200
|
-
return
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
Pe = new WeakMap(), Oe = new WeakSet(), // --- Internal Recursive Helper for Deletion/Cleanup ---
|
|
2213
|
-
Ze = function(t) {
|
|
2214
|
-
const n = [...t.children.value];
|
|
2215
|
-
for (const o of n)
|
|
2216
|
-
je(this, Oe, Ze).call(this, o);
|
|
2217
|
-
this.nodeMap.delete(t.id), t.children.value = [];
|
|
2218
|
-
};
|
|
2219
|
-
function Bo(e, t, n = {}, o = {}) {
|
|
2220
|
-
const { parentId: i, ...r } = n, l = Lt(e, t, r), a = new Co(l, o);
|
|
2221
|
-
return {
|
|
2222
|
-
// Wrap original Tree methods in arrow functions to preserve context
|
|
2223
|
-
get nodeMap() {
|
|
2224
|
-
return a.nodeMap;
|
|
2225
|
-
},
|
|
2434
|
+
return m;
|
|
2435
|
+
}, u = () => {
|
|
2436
|
+
o.clear();
|
|
2437
|
+
}, p = (h) => {
|
|
2438
|
+
const d = [...h.children.value];
|
|
2439
|
+
for (const m of d)
|
|
2440
|
+
p(m);
|
|
2441
|
+
o.delete(h.id), h.children.value = [];
|
|
2442
|
+
};
|
|
2443
|
+
return Object.freeze({
|
|
2226
2444
|
get root() {
|
|
2227
|
-
return
|
|
2228
|
-
},
|
|
2229
|
-
findNodeById: (w) => a.findNodeById(w),
|
|
2230
|
-
moveNode: (w, y) => a.moveNode(w, y),
|
|
2231
|
-
dispose: () => {
|
|
2232
|
-
a.dispose();
|
|
2445
|
+
return i;
|
|
2233
2446
|
},
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
return a.addNode(T, P);
|
|
2237
|
-
},
|
|
2238
|
-
removeNode: (w, y) => a.removeNode(w, y),
|
|
2239
|
-
traverse: (w, y) => a.traverse(w, y),
|
|
2240
|
-
getAllOpenNodes: () => {
|
|
2241
|
-
const w = [];
|
|
2242
|
-
for (const y of a.nodeMap.values())
|
|
2243
|
-
y.data.open.value && w.push(y);
|
|
2244
|
-
return w;
|
|
2245
|
-
},
|
|
2246
|
-
getTopmostOpenNode: () => {
|
|
2247
|
-
let w = null, y = -1;
|
|
2248
|
-
for (const C of a.nodeMap.values())
|
|
2249
|
-
if (C.data.open.value) {
|
|
2250
|
-
const P = C.getPath().length;
|
|
2251
|
-
P > y && (y = P, w = C);
|
|
2252
|
-
}
|
|
2253
|
-
return w;
|
|
2447
|
+
get nodeMap() {
|
|
2448
|
+
return o;
|
|
2254
2449
|
},
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
for (const k of M)
|
|
2263
|
-
R(k);
|
|
2264
|
-
};
|
|
2265
|
-
if (P === "ancestors-only")
|
|
2266
|
-
for (const M of T.getPath())
|
|
2267
|
-
M.id !== T.id && R(M);
|
|
2268
|
-
else if (P === "siblings-only") {
|
|
2269
|
-
if (T.parent.value)
|
|
2270
|
-
for (const M of T.parent.value.children.value)
|
|
2271
|
-
M.id !== T.id && R(M);
|
|
2272
|
-
} else if (P === "descendants-only")
|
|
2273
|
-
for (const M of a.traverse("dfs", T))
|
|
2274
|
-
M.id !== T.id && R(M);
|
|
2275
|
-
else if (P === "children-only")
|
|
2276
|
-
N(T.children.value);
|
|
2277
|
-
else if (P === "self-and-ancestors")
|
|
2278
|
-
N(T.getPath());
|
|
2279
|
-
else if (P === "self-and-children")
|
|
2280
|
-
R(T), N(T.children.value);
|
|
2281
|
-
else if (P === "self-and-descendants")
|
|
2282
|
-
N(a.traverse("dfs", T));
|
|
2283
|
-
else if (P === "self-and-siblings")
|
|
2284
|
-
R(T), T.parent.value && N(T.parent.value.children.value);
|
|
2285
|
-
else if (P === "self-ancestors-and-children")
|
|
2286
|
-
N(T.getPath()), N(T.children.value);
|
|
2287
|
-
else if (P === "full-branch")
|
|
2288
|
-
N(T.getPath()), N(a.traverse("dfs", T));
|
|
2289
|
-
else if (P === "all-except-branch") {
|
|
2290
|
-
const M = /* @__PURE__ */ new Set();
|
|
2291
|
-
for (const k of T.getPath())
|
|
2292
|
-
M.add(k.id);
|
|
2293
|
-
for (const k of a.traverse("dfs", T))
|
|
2294
|
-
M.add(k.id);
|
|
2295
|
-
for (const k of a.nodeMap.values())
|
|
2296
|
-
!M.has(k.id) === E && y(k);
|
|
2297
|
-
return;
|
|
2298
|
-
} else {
|
|
2299
|
-
console.warn(`forEach: Unknown relationship "${P}".`);
|
|
2300
|
-
return;
|
|
2301
|
-
}
|
|
2302
|
-
if (E)
|
|
2303
|
-
for (const M of A)
|
|
2304
|
-
y(M);
|
|
2305
|
-
else
|
|
2306
|
-
for (const M of a.nodeMap.values())
|
|
2307
|
-
D.has(M.id) || y(M);
|
|
2308
|
-
}
|
|
2309
|
-
};
|
|
2450
|
+
findNodeById: l,
|
|
2451
|
+
addNode: r,
|
|
2452
|
+
removeNode: a,
|
|
2453
|
+
moveNode: f,
|
|
2454
|
+
traverse: c,
|
|
2455
|
+
dispose: u
|
|
2456
|
+
});
|
|
2310
2457
|
}
|
|
2311
2458
|
export {
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2459
|
+
dt as clearTimeoutIfSet,
|
|
2460
|
+
Ve as contains,
|
|
2461
|
+
wo as createTree,
|
|
2462
|
+
Lt as createTreeNode,
|
|
2463
|
+
Ke as findDescendantContainingTarget,
|
|
2464
|
+
Ao as flip,
|
|
2465
|
+
Fe as getContextFromParameter,
|
|
2466
|
+
ft as getCurrentTime,
|
|
2467
|
+
cn as getTarget,
|
|
2468
|
+
Mo as hide,
|
|
2469
|
+
at as isButtonTarget,
|
|
2470
|
+
an as isClickOnScrollbar,
|
|
2471
|
+
ut as isEventTargetWithin,
|
|
2472
|
+
ln as isHTMLElement,
|
|
2473
|
+
st as isMac,
|
|
2474
|
+
St as isMouseLikePointerType,
|
|
2475
|
+
lt as isSafari,
|
|
2476
|
+
ct as isSpaceIgnored,
|
|
2330
2477
|
J as isTargetWithinElement,
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2478
|
+
un as isTreeNode,
|
|
2479
|
+
At as isTypeableElement,
|
|
2480
|
+
xo as isVirtualElement,
|
|
2481
|
+
sn as matchesFocusVisible,
|
|
2482
|
+
Lo as offset,
|
|
2483
|
+
So as shift,
|
|
2484
|
+
Do as useArrow,
|
|
2485
|
+
Eo as useClick,
|
|
2486
|
+
Co as useClientPoint,
|
|
2487
|
+
To as useEscapeKey,
|
|
2488
|
+
Ot as useFloating,
|
|
2489
|
+
No as useFloatingTree,
|
|
2490
|
+
Oo as useFocus,
|
|
2491
|
+
Po as useHover
|
|
2345
2492
|
};
|