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