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