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