energy-components 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.es.js +30 -27
- package/dist/components/actionButton.es.js +56 -11
- package/dist/components/avatar.es.js +24 -16
- package/dist/components/breadcrumbs.es.js +37 -29
- package/dist/components/button.es.js +31 -22
- package/dist/components/card.es.js +17 -9
- package/dist/components/checkbox.es.js +67 -56
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js → collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js} +1 -1
- package/dist/components/directAccess.es.js +26 -18
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +27 -27
- package/dist/components/fileUploadItem.es.js +23 -21
- package/dist/components/filterChip.es.js +22 -14
- package/dist/components/filterTag.es.js +27 -19
- package/dist/components/floating-ui.vue-7LKzPqHI.js +1148 -0
- package/dist/components/floatingActionButton.es.js +19 -11
- package/dist/components/{icon-svg-DuzOdbk1.js → icon-svg-BU0OQFKH.js} +990 -742
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +83 -77
- package/dist/components/indicator.es.js +37 -29
- package/dist/components/infoBox.es.js +47 -39
- package/dist/components/link.es.js +22 -13
- package/dist/components/loader.es.js +22 -21
- package/dist/components/modal.es.js +37 -28
- package/dist/components/overlay.es.js +21 -11
- package/dist/components/pagination.es.js +164 -109
- package/dist/components/persistentToast.es.js +32 -24
- package/dist/components/popover.es.js +166 -0
- package/dist/components/progressBar.es.js +30 -22
- package/dist/components/quantitySelector.es.js +60 -48
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +15 -7
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/snackBar.es.js +131 -0
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/loader.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/popover.css +1 -0
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/snackBar.css +1 -0
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +23 -15
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +31 -23
- package/dist/components/textArea.es.js +57 -57
- package/dist/components/textField.es.js +1 -1
- package/dist/components/toggle.es.js +20 -16
- package/dist/components/tooltip.es.js +71 -1019
- package/dist/energy-components.es.js +6825 -5824
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +47 -0
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +15 -0
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +15 -0
- package/dist/types/src/components/content/card/card.vue.d.ts +15 -0
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +180 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +15 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +24 -7
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +1 -1
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +15 -0
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +15 -0
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +4 -0
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +47 -0
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +35 -0
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +15 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,1148 @@
|
|
|
1
|
+
import { computed as I, ref as nt, shallowRef as jt, watch as dt, getCurrentScope as Yt, onScopeDispose as qt, shallowReadonly as G, unref as Xt } from "vue";
|
|
2
|
+
const j = Math.min, S = Math.max, rt = Math.round, st = Math.floor, k = (t) => ({
|
|
3
|
+
x: t,
|
|
4
|
+
y: t
|
|
5
|
+
}), Ut = {
|
|
6
|
+
left: "right",
|
|
7
|
+
right: "left",
|
|
8
|
+
bottom: "top",
|
|
9
|
+
top: "bottom"
|
|
10
|
+
}, Kt = {
|
|
11
|
+
start: "end",
|
|
12
|
+
end: "start"
|
|
13
|
+
};
|
|
14
|
+
function ht(t, e, n) {
|
|
15
|
+
return S(t, j(e, n));
|
|
16
|
+
}
|
|
17
|
+
function tt(t, e) {
|
|
18
|
+
return typeof t == "function" ? t(e) : t;
|
|
19
|
+
}
|
|
20
|
+
function Y(t) {
|
|
21
|
+
return t.split("-")[0];
|
|
22
|
+
}
|
|
23
|
+
function et(t) {
|
|
24
|
+
return t.split("-")[1];
|
|
25
|
+
}
|
|
26
|
+
function Ft(t) {
|
|
27
|
+
return t === "x" ? "y" : "x";
|
|
28
|
+
}
|
|
29
|
+
function xt(t) {
|
|
30
|
+
return t === "y" ? "height" : "width";
|
|
31
|
+
}
|
|
32
|
+
const Gt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
33
|
+
function $(t) {
|
|
34
|
+
return Gt.has(Y(t)) ? "y" : "x";
|
|
35
|
+
}
|
|
36
|
+
function yt(t) {
|
|
37
|
+
return Ft($(t));
|
|
38
|
+
}
|
|
39
|
+
function Jt(t, e, n) {
|
|
40
|
+
n === void 0 && (n = !1);
|
|
41
|
+
const o = et(t), i = yt(t), r = xt(i);
|
|
42
|
+
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
43
|
+
return e.reference[r] > e.floating[r] && (s = lt(s)), [s, lt(s)];
|
|
44
|
+
}
|
|
45
|
+
function Qt(t) {
|
|
46
|
+
const e = lt(t);
|
|
47
|
+
return [gt(t), e, gt(e)];
|
|
48
|
+
}
|
|
49
|
+
function gt(t) {
|
|
50
|
+
return t.replace(/start|end/g, (e) => Kt[e]);
|
|
51
|
+
}
|
|
52
|
+
const Et = ["left", "right"], St = ["right", "left"], Zt = ["top", "bottom"], te = ["bottom", "top"];
|
|
53
|
+
function ee(t, e, n) {
|
|
54
|
+
switch (t) {
|
|
55
|
+
case "top":
|
|
56
|
+
case "bottom":
|
|
57
|
+
return n ? e ? St : Et : e ? Et : St;
|
|
58
|
+
case "left":
|
|
59
|
+
case "right":
|
|
60
|
+
return e ? Zt : te;
|
|
61
|
+
default:
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function ne(t, e, n, o) {
|
|
66
|
+
const i = et(t);
|
|
67
|
+
let r = ee(Y(t), n === "start", o);
|
|
68
|
+
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(gt)))), r;
|
|
69
|
+
}
|
|
70
|
+
function lt(t) {
|
|
71
|
+
return t.replace(/left|right|bottom|top/g, (e) => Ut[e]);
|
|
72
|
+
}
|
|
73
|
+
function oe(t) {
|
|
74
|
+
return {
|
|
75
|
+
top: 0,
|
|
76
|
+
right: 0,
|
|
77
|
+
bottom: 0,
|
|
78
|
+
left: 0,
|
|
79
|
+
...t
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function Mt(t) {
|
|
83
|
+
return typeof t != "number" ? oe(t) : {
|
|
84
|
+
top: t,
|
|
85
|
+
right: t,
|
|
86
|
+
bottom: t,
|
|
87
|
+
left: t
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function ct(t) {
|
|
91
|
+
const {
|
|
92
|
+
x: e,
|
|
93
|
+
y: n,
|
|
94
|
+
width: o,
|
|
95
|
+
height: i
|
|
96
|
+
} = t;
|
|
97
|
+
return {
|
|
98
|
+
width: o,
|
|
99
|
+
height: i,
|
|
100
|
+
top: n,
|
|
101
|
+
left: e,
|
|
102
|
+
right: e + o,
|
|
103
|
+
bottom: n + i,
|
|
104
|
+
x: e,
|
|
105
|
+
y: n
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function Dt(t, e, n) {
|
|
109
|
+
let {
|
|
110
|
+
reference: o,
|
|
111
|
+
floating: i
|
|
112
|
+
} = t;
|
|
113
|
+
const r = $(e), s = yt(e), l = xt(s), f = Y(e), c = r === "y", a = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[l] / 2 - i[l] / 2;
|
|
114
|
+
let u;
|
|
115
|
+
switch (f) {
|
|
116
|
+
case "top":
|
|
117
|
+
u = {
|
|
118
|
+
x: a,
|
|
119
|
+
y: o.y - i.height
|
|
120
|
+
};
|
|
121
|
+
break;
|
|
122
|
+
case "bottom":
|
|
123
|
+
u = {
|
|
124
|
+
x: a,
|
|
125
|
+
y: o.y + o.height
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "right":
|
|
129
|
+
u = {
|
|
130
|
+
x: o.x + o.width,
|
|
131
|
+
y: d
|
|
132
|
+
};
|
|
133
|
+
break;
|
|
134
|
+
case "left":
|
|
135
|
+
u = {
|
|
136
|
+
x: o.x - i.width,
|
|
137
|
+
y: d
|
|
138
|
+
};
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
u = {
|
|
142
|
+
x: o.x,
|
|
143
|
+
y: o.y
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
switch (et(e)) {
|
|
147
|
+
case "start":
|
|
148
|
+
u[s] -= h * (n && c ? -1 : 1);
|
|
149
|
+
break;
|
|
150
|
+
case "end":
|
|
151
|
+
u[s] += h * (n && c ? -1 : 1);
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
return u;
|
|
155
|
+
}
|
|
156
|
+
const ie = async (t, e, n) => {
|
|
157
|
+
const {
|
|
158
|
+
placement: o = "bottom",
|
|
159
|
+
strategy: i = "absolute",
|
|
160
|
+
middleware: r = [],
|
|
161
|
+
platform: s
|
|
162
|
+
} = n, l = r.filter(Boolean), f = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
163
|
+
let c = await s.getElementRects({
|
|
164
|
+
reference: t,
|
|
165
|
+
floating: e,
|
|
166
|
+
strategy: i
|
|
167
|
+
}), {
|
|
168
|
+
x: a,
|
|
169
|
+
y: d
|
|
170
|
+
} = Dt(c, o, f), h = o, u = {}, m = 0;
|
|
171
|
+
for (let g = 0; g < l.length; g++) {
|
|
172
|
+
const {
|
|
173
|
+
name: p,
|
|
174
|
+
fn: w
|
|
175
|
+
} = l[g], {
|
|
176
|
+
x,
|
|
177
|
+
y: v,
|
|
178
|
+
data: O,
|
|
179
|
+
reset: b
|
|
180
|
+
} = await w({
|
|
181
|
+
x: a,
|
|
182
|
+
y: d,
|
|
183
|
+
initialPlacement: o,
|
|
184
|
+
placement: h,
|
|
185
|
+
strategy: i,
|
|
186
|
+
middlewareData: u,
|
|
187
|
+
rects: c,
|
|
188
|
+
platform: s,
|
|
189
|
+
elements: {
|
|
190
|
+
reference: t,
|
|
191
|
+
floating: e
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
a = x ?? a, d = v ?? d, u = {
|
|
195
|
+
...u,
|
|
196
|
+
[p]: {
|
|
197
|
+
...u[p],
|
|
198
|
+
...O
|
|
199
|
+
}
|
|
200
|
+
}, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (c = b.rects === !0 ? await s.getElementRects({
|
|
201
|
+
reference: t,
|
|
202
|
+
floating: e,
|
|
203
|
+
strategy: i
|
|
204
|
+
}) : b.rects), {
|
|
205
|
+
x: a,
|
|
206
|
+
y: d
|
|
207
|
+
} = Dt(c, h, f)), g = -1);
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
x: a,
|
|
211
|
+
y: d,
|
|
212
|
+
placement: h,
|
|
213
|
+
strategy: i,
|
|
214
|
+
middlewareData: u
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
async function vt(t, e) {
|
|
218
|
+
var n;
|
|
219
|
+
e === void 0 && (e = {});
|
|
220
|
+
const {
|
|
221
|
+
x: o,
|
|
222
|
+
y: i,
|
|
223
|
+
platform: r,
|
|
224
|
+
rects: s,
|
|
225
|
+
elements: l,
|
|
226
|
+
strategy: f
|
|
227
|
+
} = t, {
|
|
228
|
+
boundary: c = "clippingAncestors",
|
|
229
|
+
rootBoundary: a = "viewport",
|
|
230
|
+
elementContext: d = "floating",
|
|
231
|
+
altBoundary: h = !1,
|
|
232
|
+
padding: u = 0
|
|
233
|
+
} = tt(e, t), m = Mt(u), p = l[h ? d === "floating" ? "reference" : "floating" : d], w = ct(await r.getClippingRect({
|
|
234
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(p))) == null || n ? p : p.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
235
|
+
boundary: c,
|
|
236
|
+
rootBoundary: a,
|
|
237
|
+
strategy: f
|
|
238
|
+
})), x = d === "floating" ? {
|
|
239
|
+
x: o,
|
|
240
|
+
y: i,
|
|
241
|
+
width: s.floating.width,
|
|
242
|
+
height: s.floating.height
|
|
243
|
+
} : s.reference, v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), O = await (r.isElement == null ? void 0 : r.isElement(v)) ? await (r.getScale == null ? void 0 : r.getScale(v)) || {
|
|
244
|
+
x: 1,
|
|
245
|
+
y: 1
|
|
246
|
+
} : {
|
|
247
|
+
x: 1,
|
|
248
|
+
y: 1
|
|
249
|
+
}, b = ct(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
250
|
+
elements: l,
|
|
251
|
+
rect: x,
|
|
252
|
+
offsetParent: v,
|
|
253
|
+
strategy: f
|
|
254
|
+
}) : x);
|
|
255
|
+
return {
|
|
256
|
+
top: (w.top - b.top + m.top) / O.y,
|
|
257
|
+
bottom: (b.bottom - w.bottom + m.bottom) / O.y,
|
|
258
|
+
left: (w.left - b.left + m.left) / O.x,
|
|
259
|
+
right: (b.right - w.right + m.right) / O.x
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const se = (t) => ({
|
|
263
|
+
name: "arrow",
|
|
264
|
+
options: t,
|
|
265
|
+
async fn(e) {
|
|
266
|
+
const {
|
|
267
|
+
x: n,
|
|
268
|
+
y: o,
|
|
269
|
+
placement: i,
|
|
270
|
+
rects: r,
|
|
271
|
+
platform: s,
|
|
272
|
+
elements: l,
|
|
273
|
+
middlewareData: f
|
|
274
|
+
} = e, {
|
|
275
|
+
element: c,
|
|
276
|
+
padding: a = 0
|
|
277
|
+
} = tt(t, e) || {};
|
|
278
|
+
if (c == null)
|
|
279
|
+
return {};
|
|
280
|
+
const d = Mt(a), h = {
|
|
281
|
+
x: n,
|
|
282
|
+
y: o
|
|
283
|
+
}, u = yt(i), m = xt(u), g = await s.getDimensions(c), p = u === "y", w = p ? "top" : "left", x = p ? "bottom" : "right", v = p ? "clientHeight" : "clientWidth", O = r.reference[m] + r.reference[u] - h[u] - r.floating[m], b = h[u] - r.reference[u], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
284
|
+
let y = C ? C[v] : 0;
|
|
285
|
+
(!y || !await (s.isElement == null ? void 0 : s.isElement(C))) && (y = l.floating[v] || r.floating[m]);
|
|
286
|
+
const A = O / 2 - b / 2, E = y / 2 - g[m] / 2 - 1, T = j(d[w], E), _ = j(d[x], E), M = T, H = y - g[m] - _, R = y / 2 - g[m] / 2 + A, X = ht(M, R, H), N = !f.arrow && et(i) != null && R !== X && r.reference[m] / 2 - (R < M ? T : _) - g[m] / 2 < 0, L = N ? R < M ? R - M : R - H : 0;
|
|
287
|
+
return {
|
|
288
|
+
[u]: h[u] + L,
|
|
289
|
+
data: {
|
|
290
|
+
[u]: X,
|
|
291
|
+
centerOffset: R - X - L,
|
|
292
|
+
...N && {
|
|
293
|
+
alignmentOffset: L
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
reset: N
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
}), re = function(t) {
|
|
300
|
+
return t === void 0 && (t = {}), {
|
|
301
|
+
name: "flip",
|
|
302
|
+
options: t,
|
|
303
|
+
async fn(e) {
|
|
304
|
+
var n, o;
|
|
305
|
+
const {
|
|
306
|
+
placement: i,
|
|
307
|
+
middlewareData: r,
|
|
308
|
+
rects: s,
|
|
309
|
+
initialPlacement: l,
|
|
310
|
+
platform: f,
|
|
311
|
+
elements: c
|
|
312
|
+
} = e, {
|
|
313
|
+
mainAxis: a = !0,
|
|
314
|
+
crossAxis: d = !0,
|
|
315
|
+
fallbackPlacements: h,
|
|
316
|
+
fallbackStrategy: u = "bestFit",
|
|
317
|
+
fallbackAxisSideDirection: m = "none",
|
|
318
|
+
flipAlignment: g = !0,
|
|
319
|
+
...p
|
|
320
|
+
} = tt(t, e);
|
|
321
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
322
|
+
return {};
|
|
323
|
+
const w = Y(i), x = $(l), v = Y(l) === l, O = await (f.isRTL == null ? void 0 : f.isRTL(c.floating)), b = h || (v || !g ? [lt(l)] : Qt(l)), C = m !== "none";
|
|
324
|
+
!h && C && b.push(...ne(l, g, m, O));
|
|
325
|
+
const y = [l, ...b], A = await vt(e, p), E = [];
|
|
326
|
+
let T = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
327
|
+
if (a && E.push(A[w]), d) {
|
|
328
|
+
const R = Jt(i, s, O);
|
|
329
|
+
E.push(A[R[0]], A[R[1]]);
|
|
330
|
+
}
|
|
331
|
+
if (T = [...T, {
|
|
332
|
+
placement: i,
|
|
333
|
+
overflows: E
|
|
334
|
+
}], !E.every((R) => R <= 0)) {
|
|
335
|
+
var _, M;
|
|
336
|
+
const R = (((_ = r.flip) == null ? void 0 : _.index) || 0) + 1, X = y[R];
|
|
337
|
+
if (X && (!(d === "alignment" ? x !== $(X) : !1) || // We leave the current main axis only if every placement on that axis
|
|
338
|
+
// overflows the main axis.
|
|
339
|
+
T.every((P) => P.overflows[0] > 0 && $(P.placement) === x)))
|
|
340
|
+
return {
|
|
341
|
+
data: {
|
|
342
|
+
index: R,
|
|
343
|
+
overflows: T
|
|
344
|
+
},
|
|
345
|
+
reset: {
|
|
346
|
+
placement: X
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
let N = (M = T.filter((L) => L.overflows[0] <= 0).sort((L, P) => L.overflows[1] - P.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
350
|
+
if (!N)
|
|
351
|
+
switch (u) {
|
|
352
|
+
case "bestFit": {
|
|
353
|
+
var H;
|
|
354
|
+
const L = (H = T.filter((P) => {
|
|
355
|
+
if (C) {
|
|
356
|
+
const z = $(P.placement);
|
|
357
|
+
return z === x || // Create a bias to the `y` side axis due to horizontal
|
|
358
|
+
// reading directions favoring greater width.
|
|
359
|
+
z === "y";
|
|
360
|
+
}
|
|
361
|
+
return !0;
|
|
362
|
+
}).map((P) => [P.placement, P.overflows.filter((z) => z > 0).reduce((z, It) => z + It, 0)]).sort((P, z) => P[1] - z[1])[0]) == null ? void 0 : H[0];
|
|
363
|
+
L && (N = L);
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
case "initialPlacement":
|
|
367
|
+
N = l;
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
if (i !== N)
|
|
371
|
+
return {
|
|
372
|
+
reset: {
|
|
373
|
+
placement: N
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
return {};
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
}, le = /* @__PURE__ */ new Set(["left", "top"]);
|
|
381
|
+
async function ce(t, e) {
|
|
382
|
+
const {
|
|
383
|
+
placement: n,
|
|
384
|
+
platform: o,
|
|
385
|
+
elements: i
|
|
386
|
+
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = Y(n), l = et(n), f = $(n) === "y", c = le.has(s) ? -1 : 1, a = r && f ? -1 : 1, d = tt(e, t);
|
|
387
|
+
let {
|
|
388
|
+
mainAxis: h,
|
|
389
|
+
crossAxis: u,
|
|
390
|
+
alignmentAxis: m
|
|
391
|
+
} = typeof d == "number" ? {
|
|
392
|
+
mainAxis: d,
|
|
393
|
+
crossAxis: 0,
|
|
394
|
+
alignmentAxis: null
|
|
395
|
+
} : {
|
|
396
|
+
mainAxis: d.mainAxis || 0,
|
|
397
|
+
crossAxis: d.crossAxis || 0,
|
|
398
|
+
alignmentAxis: d.alignmentAxis
|
|
399
|
+
};
|
|
400
|
+
return l && typeof m == "number" && (u = l === "end" ? m * -1 : m), f ? {
|
|
401
|
+
x: u * a,
|
|
402
|
+
y: h * c
|
|
403
|
+
} : {
|
|
404
|
+
x: h * c,
|
|
405
|
+
y: u * a
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
const ae = function(t) {
|
|
409
|
+
return t === void 0 && (t = 0), {
|
|
410
|
+
name: "offset",
|
|
411
|
+
options: t,
|
|
412
|
+
async fn(e) {
|
|
413
|
+
var n, o;
|
|
414
|
+
const {
|
|
415
|
+
x: i,
|
|
416
|
+
y: r,
|
|
417
|
+
placement: s,
|
|
418
|
+
middlewareData: l
|
|
419
|
+
} = e, f = await ce(e, t);
|
|
420
|
+
return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
421
|
+
x: i + f.x,
|
|
422
|
+
y: r + f.y,
|
|
423
|
+
data: {
|
|
424
|
+
...f,
|
|
425
|
+
placement: s
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
}, fe = function(t) {
|
|
431
|
+
return t === void 0 && (t = {}), {
|
|
432
|
+
name: "shift",
|
|
433
|
+
options: t,
|
|
434
|
+
async fn(e) {
|
|
435
|
+
const {
|
|
436
|
+
x: n,
|
|
437
|
+
y: o,
|
|
438
|
+
placement: i
|
|
439
|
+
} = e, {
|
|
440
|
+
mainAxis: r = !0,
|
|
441
|
+
crossAxis: s = !1,
|
|
442
|
+
limiter: l = {
|
|
443
|
+
fn: (p) => {
|
|
444
|
+
let {
|
|
445
|
+
x: w,
|
|
446
|
+
y: x
|
|
447
|
+
} = p;
|
|
448
|
+
return {
|
|
449
|
+
x: w,
|
|
450
|
+
y: x
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
...f
|
|
455
|
+
} = tt(t, e), c = {
|
|
456
|
+
x: n,
|
|
457
|
+
y: o
|
|
458
|
+
}, a = await vt(e, f), d = $(Y(i)), h = Ft(d);
|
|
459
|
+
let u = c[h], m = c[d];
|
|
460
|
+
if (r) {
|
|
461
|
+
const p = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", x = u + a[p], v = u - a[w];
|
|
462
|
+
u = ht(x, u, v);
|
|
463
|
+
}
|
|
464
|
+
if (s) {
|
|
465
|
+
const p = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", x = m + a[p], v = m - a[w];
|
|
466
|
+
m = ht(x, m, v);
|
|
467
|
+
}
|
|
468
|
+
const g = l.fn({
|
|
469
|
+
...e,
|
|
470
|
+
[h]: u,
|
|
471
|
+
[d]: m
|
|
472
|
+
});
|
|
473
|
+
return {
|
|
474
|
+
...g,
|
|
475
|
+
data: {
|
|
476
|
+
x: g.x - n,
|
|
477
|
+
y: g.y - o,
|
|
478
|
+
enabled: {
|
|
479
|
+
[h]: r,
|
|
480
|
+
[d]: s
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
}, ue = function(t) {
|
|
487
|
+
return t === void 0 && (t = {}), {
|
|
488
|
+
name: "size",
|
|
489
|
+
options: t,
|
|
490
|
+
async fn(e) {
|
|
491
|
+
var n, o;
|
|
492
|
+
const {
|
|
493
|
+
placement: i,
|
|
494
|
+
rects: r,
|
|
495
|
+
platform: s,
|
|
496
|
+
elements: l
|
|
497
|
+
} = e, {
|
|
498
|
+
apply: f = () => {
|
|
499
|
+
},
|
|
500
|
+
...c
|
|
501
|
+
} = tt(t, e), a = await vt(e, c), d = Y(i), h = et(i), u = $(i) === "y", {
|
|
502
|
+
width: m,
|
|
503
|
+
height: g
|
|
504
|
+
} = r.floating;
|
|
505
|
+
let p, w;
|
|
506
|
+
d === "top" || d === "bottom" ? (p = d, w = h === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = d, p = h === "end" ? "top" : "bottom");
|
|
507
|
+
const x = g - a.top - a.bottom, v = m - a.left - a.right, O = j(g - a[p], x), b = j(m - a[w], v), C = !e.middlewareData.shift;
|
|
508
|
+
let y = O, A = b;
|
|
509
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (A = v), (o = e.middlewareData.shift) != null && o.enabled.y && (y = x), C && !h) {
|
|
510
|
+
const T = S(a.left, 0), _ = S(a.right, 0), M = S(a.top, 0), H = S(a.bottom, 0);
|
|
511
|
+
u ? A = m - 2 * (T !== 0 || _ !== 0 ? T + _ : S(a.left, a.right)) : y = g - 2 * (M !== 0 || H !== 0 ? M + H : S(a.top, a.bottom));
|
|
512
|
+
}
|
|
513
|
+
await f({
|
|
514
|
+
...e,
|
|
515
|
+
availableWidth: A,
|
|
516
|
+
availableHeight: y
|
|
517
|
+
});
|
|
518
|
+
const E = await s.getDimensions(l.floating);
|
|
519
|
+
return m !== E.width || g !== E.height ? {
|
|
520
|
+
reset: {
|
|
521
|
+
rects: !0
|
|
522
|
+
}
|
|
523
|
+
} : {};
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
function at() {
|
|
528
|
+
return typeof window < "u";
|
|
529
|
+
}
|
|
530
|
+
function K(t) {
|
|
531
|
+
return bt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
532
|
+
}
|
|
533
|
+
function D(t) {
|
|
534
|
+
var e;
|
|
535
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
536
|
+
}
|
|
537
|
+
function B(t) {
|
|
538
|
+
var e;
|
|
539
|
+
return (e = (bt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
540
|
+
}
|
|
541
|
+
function bt(t) {
|
|
542
|
+
return at() ? t instanceof Node || t instanceof D(t).Node : !1;
|
|
543
|
+
}
|
|
544
|
+
function V(t) {
|
|
545
|
+
return at() ? t instanceof Element || t instanceof D(t).Element : !1;
|
|
546
|
+
}
|
|
547
|
+
function W(t) {
|
|
548
|
+
return at() ? t instanceof HTMLElement || t instanceof D(t).HTMLElement : !1;
|
|
549
|
+
}
|
|
550
|
+
function Tt(t) {
|
|
551
|
+
return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof D(t).ShadowRoot;
|
|
552
|
+
}
|
|
553
|
+
const de = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
554
|
+
function it(t) {
|
|
555
|
+
const {
|
|
556
|
+
overflow: e,
|
|
557
|
+
overflowX: n,
|
|
558
|
+
overflowY: o,
|
|
559
|
+
display: i
|
|
560
|
+
} = F(t);
|
|
561
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !de.has(i);
|
|
562
|
+
}
|
|
563
|
+
const me = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
564
|
+
function he(t) {
|
|
565
|
+
return me.has(K(t));
|
|
566
|
+
}
|
|
567
|
+
const ge = [":popover-open", ":modal"];
|
|
568
|
+
function ft(t) {
|
|
569
|
+
return ge.some((e) => {
|
|
570
|
+
try {
|
|
571
|
+
return t.matches(e);
|
|
572
|
+
} catch {
|
|
573
|
+
return !1;
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
const pe = ["transform", "translate", "scale", "rotate", "perspective"], we = ["transform", "translate", "scale", "rotate", "perspective", "filter"], xe = ["paint", "layout", "strict", "content"];
|
|
578
|
+
function Ot(t) {
|
|
579
|
+
const e = At(), n = V(t) ? F(t) : t;
|
|
580
|
+
return pe.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || we.some((o) => (n.willChange || "").includes(o)) || xe.some((o) => (n.contain || "").includes(o));
|
|
581
|
+
}
|
|
582
|
+
function ye(t) {
|
|
583
|
+
let e = q(t);
|
|
584
|
+
for (; W(e) && !Z(e); ) {
|
|
585
|
+
if (Ot(e))
|
|
586
|
+
return e;
|
|
587
|
+
if (ft(e))
|
|
588
|
+
return null;
|
|
589
|
+
e = q(e);
|
|
590
|
+
}
|
|
591
|
+
return null;
|
|
592
|
+
}
|
|
593
|
+
function At() {
|
|
594
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
595
|
+
}
|
|
596
|
+
const ve = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
597
|
+
function Z(t) {
|
|
598
|
+
return ve.has(K(t));
|
|
599
|
+
}
|
|
600
|
+
function F(t) {
|
|
601
|
+
return D(t).getComputedStyle(t);
|
|
602
|
+
}
|
|
603
|
+
function ut(t) {
|
|
604
|
+
return V(t) ? {
|
|
605
|
+
scrollLeft: t.scrollLeft,
|
|
606
|
+
scrollTop: t.scrollTop
|
|
607
|
+
} : {
|
|
608
|
+
scrollLeft: t.scrollX,
|
|
609
|
+
scrollTop: t.scrollY
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
function q(t) {
|
|
613
|
+
if (K(t) === "html")
|
|
614
|
+
return t;
|
|
615
|
+
const e = (
|
|
616
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
617
|
+
t.assignedSlot || // DOM Element detected.
|
|
618
|
+
t.parentNode || // ShadowRoot detected.
|
|
619
|
+
Tt(t) && t.host || // Fallback.
|
|
620
|
+
B(t)
|
|
621
|
+
);
|
|
622
|
+
return Tt(e) ? e.host : e;
|
|
623
|
+
}
|
|
624
|
+
function kt(t) {
|
|
625
|
+
const e = q(t);
|
|
626
|
+
return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && it(e) ? e : kt(e);
|
|
627
|
+
}
|
|
628
|
+
function ot(t, e, n) {
|
|
629
|
+
var o;
|
|
630
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
631
|
+
const i = kt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = D(i);
|
|
632
|
+
if (r) {
|
|
633
|
+
const l = pt(s);
|
|
634
|
+
return e.concat(s, s.visualViewport || [], it(i) ? i : [], l && n ? ot(l) : []);
|
|
635
|
+
}
|
|
636
|
+
return e.concat(i, ot(i, [], n));
|
|
637
|
+
}
|
|
638
|
+
function pt(t) {
|
|
639
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
640
|
+
}
|
|
641
|
+
function Wt(t) {
|
|
642
|
+
const e = F(t);
|
|
643
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
644
|
+
const i = W(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = rt(n) !== r || rt(o) !== s;
|
|
645
|
+
return l && (n = r, o = s), {
|
|
646
|
+
width: n,
|
|
647
|
+
height: o,
|
|
648
|
+
$: l
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
function Rt(t) {
|
|
652
|
+
return V(t) ? t : t.contextElement;
|
|
653
|
+
}
|
|
654
|
+
function Q(t) {
|
|
655
|
+
const e = Rt(t);
|
|
656
|
+
if (!W(e))
|
|
657
|
+
return k(1);
|
|
658
|
+
const n = e.getBoundingClientRect(), {
|
|
659
|
+
width: o,
|
|
660
|
+
height: i,
|
|
661
|
+
$: r
|
|
662
|
+
} = Wt(e);
|
|
663
|
+
let s = (r ? rt(n.width) : n.width) / o, l = (r ? rt(n.height) : n.height) / i;
|
|
664
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
665
|
+
x: s,
|
|
666
|
+
y: l
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
const be = /* @__PURE__ */ k(0);
|
|
670
|
+
function Bt(t) {
|
|
671
|
+
const e = D(t);
|
|
672
|
+
return !At() || !e.visualViewport ? be : {
|
|
673
|
+
x: e.visualViewport.offsetLeft,
|
|
674
|
+
y: e.visualViewport.offsetTop
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
function Oe(t, e, n) {
|
|
678
|
+
return e === void 0 && (e = !1), !n || e && n !== D(t) ? !1 : e;
|
|
679
|
+
}
|
|
680
|
+
function U(t, e, n, o) {
|
|
681
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
682
|
+
const i = t.getBoundingClientRect(), r = Rt(t);
|
|
683
|
+
let s = k(1);
|
|
684
|
+
e && (o ? V(o) && (s = Q(o)) : s = Q(t));
|
|
685
|
+
const l = Oe(r, n, o) ? Bt(r) : k(0);
|
|
686
|
+
let f = (i.left + l.x) / s.x, c = (i.top + l.y) / s.y, a = i.width / s.x, d = i.height / s.y;
|
|
687
|
+
if (r) {
|
|
688
|
+
const h = D(r), u = o && V(o) ? D(o) : o;
|
|
689
|
+
let m = h, g = pt(m);
|
|
690
|
+
for (; g && o && u !== m; ) {
|
|
691
|
+
const p = Q(g), w = g.getBoundingClientRect(), x = F(g), v = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * p.x, O = w.top + (g.clientTop + parseFloat(x.paddingTop)) * p.y;
|
|
692
|
+
f *= p.x, c *= p.y, a *= p.x, d *= p.y, f += v, c += O, m = D(g), g = pt(m);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
return ct({
|
|
696
|
+
width: a,
|
|
697
|
+
height: d,
|
|
698
|
+
x: f,
|
|
699
|
+
y: c
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
function Ct(t, e) {
|
|
703
|
+
const n = ut(t).scrollLeft;
|
|
704
|
+
return e ? e.left + n : U(B(t)).left + n;
|
|
705
|
+
}
|
|
706
|
+
function Nt(t, e, n) {
|
|
707
|
+
n === void 0 && (n = !1);
|
|
708
|
+
const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
|
|
709
|
+
// RTL <body> scrollbar.
|
|
710
|
+
Ct(t, o)
|
|
711
|
+
)), r = o.top + e.scrollTop;
|
|
712
|
+
return {
|
|
713
|
+
x: i,
|
|
714
|
+
y: r
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
function Ae(t) {
|
|
718
|
+
let {
|
|
719
|
+
elements: e,
|
|
720
|
+
rect: n,
|
|
721
|
+
offsetParent: o,
|
|
722
|
+
strategy: i
|
|
723
|
+
} = t;
|
|
724
|
+
const r = i === "fixed", s = B(o), l = e ? ft(e.floating) : !1;
|
|
725
|
+
if (o === s || l && r)
|
|
726
|
+
return n;
|
|
727
|
+
let f = {
|
|
728
|
+
scrollLeft: 0,
|
|
729
|
+
scrollTop: 0
|
|
730
|
+
}, c = k(1);
|
|
731
|
+
const a = k(0), d = W(o);
|
|
732
|
+
if ((d || !d && !r) && ((K(o) !== "body" || it(s)) && (f = ut(o)), W(o))) {
|
|
733
|
+
const u = U(o);
|
|
734
|
+
c = Q(o), a.x = u.x + o.clientLeft, a.y = u.y + o.clientTop;
|
|
735
|
+
}
|
|
736
|
+
const h = s && !d && !r ? Nt(s, f, !0) : k(0);
|
|
737
|
+
return {
|
|
738
|
+
width: n.width * c.x,
|
|
739
|
+
height: n.height * c.y,
|
|
740
|
+
x: n.x * c.x - f.scrollLeft * c.x + a.x + h.x,
|
|
741
|
+
y: n.y * c.y - f.scrollTop * c.y + a.y + h.y
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
function Re(t) {
|
|
745
|
+
return Array.from(t.getClientRects());
|
|
746
|
+
}
|
|
747
|
+
function Ce(t) {
|
|
748
|
+
const e = B(t), n = ut(t), o = t.ownerDocument.body, i = S(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = S(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
749
|
+
let s = -n.scrollLeft + Ct(t);
|
|
750
|
+
const l = -n.scrollTop;
|
|
751
|
+
return F(o).direction === "rtl" && (s += S(e.clientWidth, o.clientWidth) - i), {
|
|
752
|
+
width: i,
|
|
753
|
+
height: r,
|
|
754
|
+
x: s,
|
|
755
|
+
y: l
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
function Ee(t, e) {
|
|
759
|
+
const n = D(t), o = B(t), i = n.visualViewport;
|
|
760
|
+
let r = o.clientWidth, s = o.clientHeight, l = 0, f = 0;
|
|
761
|
+
if (i) {
|
|
762
|
+
r = i.width, s = i.height;
|
|
763
|
+
const c = At();
|
|
764
|
+
(!c || c && e === "fixed") && (l = i.offsetLeft, f = i.offsetTop);
|
|
765
|
+
}
|
|
766
|
+
return {
|
|
767
|
+
width: r,
|
|
768
|
+
height: s,
|
|
769
|
+
x: l,
|
|
770
|
+
y: f
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
const Se = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
774
|
+
function De(t, e) {
|
|
775
|
+
const n = U(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = W(t) ? Q(t) : k(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, f = i * r.x, c = o * r.y;
|
|
776
|
+
return {
|
|
777
|
+
width: s,
|
|
778
|
+
height: l,
|
|
779
|
+
x: f,
|
|
780
|
+
y: c
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
function Lt(t, e, n) {
|
|
784
|
+
let o;
|
|
785
|
+
if (e === "viewport")
|
|
786
|
+
o = Ee(t, n);
|
|
787
|
+
else if (e === "document")
|
|
788
|
+
o = Ce(B(t));
|
|
789
|
+
else if (V(e))
|
|
790
|
+
o = De(e, n);
|
|
791
|
+
else {
|
|
792
|
+
const i = Bt(t);
|
|
793
|
+
o = {
|
|
794
|
+
x: e.x - i.x,
|
|
795
|
+
y: e.y - i.y,
|
|
796
|
+
width: e.width,
|
|
797
|
+
height: e.height
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
return ct(o);
|
|
801
|
+
}
|
|
802
|
+
function $t(t, e) {
|
|
803
|
+
const n = q(t);
|
|
804
|
+
return n === e || !V(n) || Z(n) ? !1 : F(n).position === "fixed" || $t(n, e);
|
|
805
|
+
}
|
|
806
|
+
function Te(t, e) {
|
|
807
|
+
const n = e.get(t);
|
|
808
|
+
if (n)
|
|
809
|
+
return n;
|
|
810
|
+
let o = ot(t, [], !1).filter((l) => V(l) && K(l) !== "body"), i = null;
|
|
811
|
+
const r = F(t).position === "fixed";
|
|
812
|
+
let s = r ? q(t) : t;
|
|
813
|
+
for (; V(s) && !Z(s); ) {
|
|
814
|
+
const l = F(s), f = Ot(s);
|
|
815
|
+
!f && l.position === "fixed" && (i = null), (r ? !f && !i : !f && l.position === "static" && !!i && Se.has(i.position) || it(s) && !f && $t(t, s)) ? o = o.filter((a) => a !== s) : i = l, s = q(s);
|
|
816
|
+
}
|
|
817
|
+
return e.set(t, o), o;
|
|
818
|
+
}
|
|
819
|
+
function Le(t) {
|
|
820
|
+
let {
|
|
821
|
+
element: e,
|
|
822
|
+
boundary: n,
|
|
823
|
+
rootBoundary: o,
|
|
824
|
+
strategy: i
|
|
825
|
+
} = t;
|
|
826
|
+
const s = [...n === "clippingAncestors" ? ft(e) ? [] : Te(e, this._c) : [].concat(n), o], l = s[0], f = s.reduce((c, a) => {
|
|
827
|
+
const d = Lt(e, a, i);
|
|
828
|
+
return c.top = S(d.top, c.top), c.right = j(d.right, c.right), c.bottom = j(d.bottom, c.bottom), c.left = S(d.left, c.left), c;
|
|
829
|
+
}, Lt(e, l, i));
|
|
830
|
+
return {
|
|
831
|
+
width: f.right - f.left,
|
|
832
|
+
height: f.bottom - f.top,
|
|
833
|
+
x: f.left,
|
|
834
|
+
y: f.top
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
function Pe(t) {
|
|
838
|
+
const {
|
|
839
|
+
width: e,
|
|
840
|
+
height: n
|
|
841
|
+
} = Wt(t);
|
|
842
|
+
return {
|
|
843
|
+
width: e,
|
|
844
|
+
height: n
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
function Ve(t, e, n) {
|
|
848
|
+
const o = W(e), i = B(e), r = n === "fixed", s = U(t, !0, r, e);
|
|
849
|
+
let l = {
|
|
850
|
+
scrollLeft: 0,
|
|
851
|
+
scrollTop: 0
|
|
852
|
+
};
|
|
853
|
+
const f = k(0);
|
|
854
|
+
function c() {
|
|
855
|
+
f.x = Ct(i);
|
|
856
|
+
}
|
|
857
|
+
if (o || !o && !r)
|
|
858
|
+
if ((K(e) !== "body" || it(i)) && (l = ut(e)), o) {
|
|
859
|
+
const u = U(e, !0, r, e);
|
|
860
|
+
f.x = u.x + e.clientLeft, f.y = u.y + e.clientTop;
|
|
861
|
+
} else i && c();
|
|
862
|
+
r && !o && i && c();
|
|
863
|
+
const a = i && !o && !r ? Nt(i, l) : k(0), d = s.left + l.scrollLeft - f.x - a.x, h = s.top + l.scrollTop - f.y - a.y;
|
|
864
|
+
return {
|
|
865
|
+
x: d,
|
|
866
|
+
y: h,
|
|
867
|
+
width: s.width,
|
|
868
|
+
height: s.height
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
function mt(t) {
|
|
872
|
+
return F(t).position === "static";
|
|
873
|
+
}
|
|
874
|
+
function Pt(t, e) {
|
|
875
|
+
if (!W(t) || F(t).position === "fixed")
|
|
876
|
+
return null;
|
|
877
|
+
if (e)
|
|
878
|
+
return e(t);
|
|
879
|
+
let n = t.offsetParent;
|
|
880
|
+
return B(t) === n && (n = n.ownerDocument.body), n;
|
|
881
|
+
}
|
|
882
|
+
function _t(t, e) {
|
|
883
|
+
const n = D(t);
|
|
884
|
+
if (ft(t))
|
|
885
|
+
return n;
|
|
886
|
+
if (!W(t)) {
|
|
887
|
+
let i = q(t);
|
|
888
|
+
for (; i && !Z(i); ) {
|
|
889
|
+
if (V(i) && !mt(i))
|
|
890
|
+
return i;
|
|
891
|
+
i = q(i);
|
|
892
|
+
}
|
|
893
|
+
return n;
|
|
894
|
+
}
|
|
895
|
+
let o = Pt(t, e);
|
|
896
|
+
for (; o && he(o) && mt(o); )
|
|
897
|
+
o = Pt(o, e);
|
|
898
|
+
return o && Z(o) && mt(o) && !Ot(o) ? n : o || ye(t) || n;
|
|
899
|
+
}
|
|
900
|
+
const Fe = async function(t) {
|
|
901
|
+
const e = this.getOffsetParent || _t, n = this.getDimensions, o = await n(t.floating);
|
|
902
|
+
return {
|
|
903
|
+
reference: Ve(t.reference, await e(t.floating), t.strategy),
|
|
904
|
+
floating: {
|
|
905
|
+
x: 0,
|
|
906
|
+
y: 0,
|
|
907
|
+
width: o.width,
|
|
908
|
+
height: o.height
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
};
|
|
912
|
+
function Me(t) {
|
|
913
|
+
return F(t).direction === "rtl";
|
|
914
|
+
}
|
|
915
|
+
const ke = {
|
|
916
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ae,
|
|
917
|
+
getDocumentElement: B,
|
|
918
|
+
getClippingRect: Le,
|
|
919
|
+
getOffsetParent: _t,
|
|
920
|
+
getElementRects: Fe,
|
|
921
|
+
getClientRects: Re,
|
|
922
|
+
getDimensions: Pe,
|
|
923
|
+
getScale: Q,
|
|
924
|
+
isElement: V,
|
|
925
|
+
isRTL: Me
|
|
926
|
+
};
|
|
927
|
+
function Ht(t, e) {
|
|
928
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
929
|
+
}
|
|
930
|
+
function We(t, e) {
|
|
931
|
+
let n = null, o;
|
|
932
|
+
const i = B(t);
|
|
933
|
+
function r() {
|
|
934
|
+
var l;
|
|
935
|
+
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
936
|
+
}
|
|
937
|
+
function s(l, f) {
|
|
938
|
+
l === void 0 && (l = !1), f === void 0 && (f = 1), r();
|
|
939
|
+
const c = t.getBoundingClientRect(), {
|
|
940
|
+
left: a,
|
|
941
|
+
top: d,
|
|
942
|
+
width: h,
|
|
943
|
+
height: u
|
|
944
|
+
} = c;
|
|
945
|
+
if (l || e(), !h || !u)
|
|
946
|
+
return;
|
|
947
|
+
const m = st(d), g = st(i.clientWidth - (a + h)), p = st(i.clientHeight - (d + u)), w = st(a), v = {
|
|
948
|
+
rootMargin: -m + "px " + -g + "px " + -p + "px " + -w + "px",
|
|
949
|
+
threshold: S(0, j(1, f)) || 1
|
|
950
|
+
};
|
|
951
|
+
let O = !0;
|
|
952
|
+
function b(C) {
|
|
953
|
+
const y = C[0].intersectionRatio;
|
|
954
|
+
if (y !== f) {
|
|
955
|
+
if (!O)
|
|
956
|
+
return s();
|
|
957
|
+
y ? s(!1, y) : o = setTimeout(() => {
|
|
958
|
+
s(!1, 1e-7);
|
|
959
|
+
}, 1e3);
|
|
960
|
+
}
|
|
961
|
+
y === 1 && !Ht(c, t.getBoundingClientRect()) && s(), O = !1;
|
|
962
|
+
}
|
|
963
|
+
try {
|
|
964
|
+
n = new IntersectionObserver(b, {
|
|
965
|
+
...v,
|
|
966
|
+
// Handle <iframe>s
|
|
967
|
+
root: i.ownerDocument
|
|
968
|
+
});
|
|
969
|
+
} catch {
|
|
970
|
+
n = new IntersectionObserver(b, v);
|
|
971
|
+
}
|
|
972
|
+
n.observe(t);
|
|
973
|
+
}
|
|
974
|
+
return s(!0), r;
|
|
975
|
+
}
|
|
976
|
+
function He(t, e, n, o) {
|
|
977
|
+
o === void 0 && (o = {});
|
|
978
|
+
const {
|
|
979
|
+
ancestorScroll: i = !0,
|
|
980
|
+
ancestorResize: r = !0,
|
|
981
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
982
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
983
|
+
animationFrame: f = !1
|
|
984
|
+
} = o, c = Rt(t), a = i || r ? [...c ? ot(c) : [], ...ot(e)] : [];
|
|
985
|
+
a.forEach((w) => {
|
|
986
|
+
i && w.addEventListener("scroll", n, {
|
|
987
|
+
passive: !0
|
|
988
|
+
}), r && w.addEventListener("resize", n);
|
|
989
|
+
});
|
|
990
|
+
const d = c && l ? We(c, n) : null;
|
|
991
|
+
let h = -1, u = null;
|
|
992
|
+
s && (u = new ResizeObserver((w) => {
|
|
993
|
+
let [x] = w;
|
|
994
|
+
x && x.target === c && u && (u.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
995
|
+
var v;
|
|
996
|
+
(v = u) == null || v.observe(e);
|
|
997
|
+
})), n();
|
|
998
|
+
}), c && !f && u.observe(c), u.observe(e));
|
|
999
|
+
let m, g = f ? U(t) : null;
|
|
1000
|
+
f && p();
|
|
1001
|
+
function p() {
|
|
1002
|
+
const w = U(t);
|
|
1003
|
+
g && !Ht(g, w) && n(), g = w, m = requestAnimationFrame(p);
|
|
1004
|
+
}
|
|
1005
|
+
return n(), () => {
|
|
1006
|
+
var w;
|
|
1007
|
+
a.forEach((x) => {
|
|
1008
|
+
i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
|
|
1009
|
+
}), d == null || d(), (w = u) == null || w.disconnect(), u = null, f && cancelAnimationFrame(m);
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
const ze = ae, Ie = fe, je = re, Ye = ue, Be = se, Ne = (t, e, n) => {
|
|
1013
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
1014
|
+
platform: ke,
|
|
1015
|
+
...n
|
|
1016
|
+
}, r = {
|
|
1017
|
+
...i.platform,
|
|
1018
|
+
_c: o
|
|
1019
|
+
};
|
|
1020
|
+
return ie(t, e, {
|
|
1021
|
+
...i,
|
|
1022
|
+
platform: r
|
|
1023
|
+
});
|
|
1024
|
+
};
|
|
1025
|
+
function $e(t) {
|
|
1026
|
+
return t != null && typeof t == "object" && "$el" in t;
|
|
1027
|
+
}
|
|
1028
|
+
function wt(t) {
|
|
1029
|
+
if ($e(t)) {
|
|
1030
|
+
const e = t.$el;
|
|
1031
|
+
return bt(e) && K(e) === "#comment" ? null : e;
|
|
1032
|
+
}
|
|
1033
|
+
return t;
|
|
1034
|
+
}
|
|
1035
|
+
function J(t) {
|
|
1036
|
+
return typeof t == "function" ? t() : Xt(t);
|
|
1037
|
+
}
|
|
1038
|
+
function qe(t) {
|
|
1039
|
+
return {
|
|
1040
|
+
name: "arrow",
|
|
1041
|
+
options: t,
|
|
1042
|
+
fn(e) {
|
|
1043
|
+
const n = wt(J(t.element));
|
|
1044
|
+
return n == null ? {} : Be({
|
|
1045
|
+
element: n,
|
|
1046
|
+
padding: t.padding
|
|
1047
|
+
}).fn(e);
|
|
1048
|
+
}
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
function zt(t) {
|
|
1052
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1053
|
+
}
|
|
1054
|
+
function Vt(t, e) {
|
|
1055
|
+
const n = zt(t);
|
|
1056
|
+
return Math.round(e * n) / n;
|
|
1057
|
+
}
|
|
1058
|
+
function Xe(t, e, n) {
|
|
1059
|
+
n === void 0 && (n = {});
|
|
1060
|
+
const o = n.whileElementsMounted, i = I(() => {
|
|
1061
|
+
var y;
|
|
1062
|
+
return (y = J(n.open)) != null ? y : !0;
|
|
1063
|
+
}), r = I(() => J(n.middleware)), s = I(() => {
|
|
1064
|
+
var y;
|
|
1065
|
+
return (y = J(n.placement)) != null ? y : "bottom";
|
|
1066
|
+
}), l = I(() => {
|
|
1067
|
+
var y;
|
|
1068
|
+
return (y = J(n.strategy)) != null ? y : "absolute";
|
|
1069
|
+
}), f = I(() => {
|
|
1070
|
+
var y;
|
|
1071
|
+
return (y = J(n.transform)) != null ? y : !0;
|
|
1072
|
+
}), c = I(() => wt(t.value)), a = I(() => wt(e.value)), d = nt(0), h = nt(0), u = nt(l.value), m = nt(s.value), g = jt({}), p = nt(!1), w = I(() => {
|
|
1073
|
+
const y = {
|
|
1074
|
+
position: u.value,
|
|
1075
|
+
left: "0",
|
|
1076
|
+
top: "0"
|
|
1077
|
+
};
|
|
1078
|
+
if (!a.value)
|
|
1079
|
+
return y;
|
|
1080
|
+
const A = Vt(a.value, d.value), E = Vt(a.value, h.value);
|
|
1081
|
+
return f.value ? {
|
|
1082
|
+
...y,
|
|
1083
|
+
transform: "translate(" + A + "px, " + E + "px)",
|
|
1084
|
+
...zt(a.value) >= 1.5 && {
|
|
1085
|
+
willChange: "transform"
|
|
1086
|
+
}
|
|
1087
|
+
} : {
|
|
1088
|
+
position: u.value,
|
|
1089
|
+
left: A + "px",
|
|
1090
|
+
top: E + "px"
|
|
1091
|
+
};
|
|
1092
|
+
});
|
|
1093
|
+
let x;
|
|
1094
|
+
function v() {
|
|
1095
|
+
if (c.value == null || a.value == null)
|
|
1096
|
+
return;
|
|
1097
|
+
const y = i.value;
|
|
1098
|
+
Ne(c.value, a.value, {
|
|
1099
|
+
middleware: r.value,
|
|
1100
|
+
placement: s.value,
|
|
1101
|
+
strategy: l.value
|
|
1102
|
+
}).then((A) => {
|
|
1103
|
+
d.value = A.x, h.value = A.y, u.value = A.strategy, m.value = A.placement, g.value = A.middlewareData, p.value = y !== !1;
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
function O() {
|
|
1107
|
+
typeof x == "function" && (x(), x = void 0);
|
|
1108
|
+
}
|
|
1109
|
+
function b() {
|
|
1110
|
+
if (O(), o === void 0) {
|
|
1111
|
+
v();
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
if (c.value != null && a.value != null) {
|
|
1115
|
+
x = o(c.value, a.value, v);
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
function C() {
|
|
1120
|
+
i.value || (p.value = !1);
|
|
1121
|
+
}
|
|
1122
|
+
return dt([r, s, l, i], v, {
|
|
1123
|
+
flush: "sync"
|
|
1124
|
+
}), dt([c, a], b, {
|
|
1125
|
+
flush: "sync"
|
|
1126
|
+
}), dt(i, C, {
|
|
1127
|
+
flush: "sync"
|
|
1128
|
+
}), Yt() && qt(O), {
|
|
1129
|
+
x: G(d),
|
|
1130
|
+
y: G(h),
|
|
1131
|
+
strategy: G(u),
|
|
1132
|
+
placement: G(m),
|
|
1133
|
+
middlewareData: G(g),
|
|
1134
|
+
isPositioned: G(p),
|
|
1135
|
+
floatingStyles: w,
|
|
1136
|
+
update: v
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
export {
|
|
1140
|
+
Ye as a,
|
|
1141
|
+
qe as b,
|
|
1142
|
+
Ne as c,
|
|
1143
|
+
He as d,
|
|
1144
|
+
je as f,
|
|
1145
|
+
ze as o,
|
|
1146
|
+
Ie as s,
|
|
1147
|
+
Xe as u
|
|
1148
|
+
};
|