@xuda.io/xuda-widget-plugin-xuda-drive 1.0.63 → 1.0.65
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/floating-ui/core@1.1.1.js +763 -0
- package/floating-ui/dom@1.1.1.js +504 -0
- package/floating-vue@5.2.2/floating-vue.umd.js +1751 -0
- package/floating-vue@5.2.2/style.css +181 -0
- package/moment.min.2.30.1.js +3381 -0
- package/package.json +1 -1
- package/runtime.mjs +54 -138
- package/swiper-bundle.min.11.1.14.css +705 -0
- package/swiper-bundle.min.11.1.14.js +7572 -0
- package/tailwind.cdn.js +27199 -0
- package/vue.global.3.5.6.js +19299 -0
- package/vuewuse/core.js +6715 -0
- package/vuewuse/shared.js +1461 -0
|
@@ -0,0 +1,763 @@
|
|
|
1
|
+
!(function (t, e) {
|
|
2
|
+
"object" == typeof exports && "undefined" != typeof module
|
|
3
|
+
? e(exports)
|
|
4
|
+
: "function" == typeof define && define.amd
|
|
5
|
+
? define(["exports"], e)
|
|
6
|
+
: e(
|
|
7
|
+
((t =
|
|
8
|
+
"undefined" != typeof globalThis
|
|
9
|
+
? globalThis
|
|
10
|
+
: t || self).FloatingUICore = {})
|
|
11
|
+
);
|
|
12
|
+
})(this, function (t) {
|
|
13
|
+
"use strict";
|
|
14
|
+
function e(t) {
|
|
15
|
+
return t.split("-")[1];
|
|
16
|
+
}
|
|
17
|
+
function n(t) {
|
|
18
|
+
return "y" === t ? "height" : "width";
|
|
19
|
+
}
|
|
20
|
+
function i(t) {
|
|
21
|
+
return t.split("-")[0];
|
|
22
|
+
}
|
|
23
|
+
function o(t) {
|
|
24
|
+
return ["top", "bottom"].includes(i(t)) ? "x" : "y";
|
|
25
|
+
}
|
|
26
|
+
function r(t, r, a) {
|
|
27
|
+
let { reference: l, floating: s } = t;
|
|
28
|
+
const f = l.x + l.width / 2 - s.width / 2,
|
|
29
|
+
c = l.y + l.height / 2 - s.height / 2,
|
|
30
|
+
u = o(r),
|
|
31
|
+
m = n(u),
|
|
32
|
+
d = l[m] / 2 - s[m] / 2,
|
|
33
|
+
g = "x" === u;
|
|
34
|
+
let p;
|
|
35
|
+
switch (i(r)) {
|
|
36
|
+
case "top":
|
|
37
|
+
p = { x: f, y: l.y - s.height };
|
|
38
|
+
break;
|
|
39
|
+
case "bottom":
|
|
40
|
+
p = { x: f, y: l.y + l.height };
|
|
41
|
+
break;
|
|
42
|
+
case "right":
|
|
43
|
+
p = { x: l.x + l.width, y: c };
|
|
44
|
+
break;
|
|
45
|
+
case "left":
|
|
46
|
+
p = { x: l.x - s.width, y: c };
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
p = { x: l.x, y: l.y };
|
|
50
|
+
}
|
|
51
|
+
switch (e(r)) {
|
|
52
|
+
case "start":
|
|
53
|
+
p[u] -= d * (a && g ? -1 : 1);
|
|
54
|
+
break;
|
|
55
|
+
case "end":
|
|
56
|
+
p[u] += d * (a && g ? -1 : 1);
|
|
57
|
+
}
|
|
58
|
+
return p;
|
|
59
|
+
}
|
|
60
|
+
function a(t) {
|
|
61
|
+
return "number" != typeof t
|
|
62
|
+
? (function (t) {
|
|
63
|
+
return { top: 0, right: 0, bottom: 0, left: 0, ...t };
|
|
64
|
+
})(t)
|
|
65
|
+
: { top: t, right: t, bottom: t, left: t };
|
|
66
|
+
}
|
|
67
|
+
function l(t) {
|
|
68
|
+
return {
|
|
69
|
+
...t,
|
|
70
|
+
top: t.y,
|
|
71
|
+
left: t.x,
|
|
72
|
+
right: t.x + t.width,
|
|
73
|
+
bottom: t.y + t.height,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async function s(t, e) {
|
|
77
|
+
var n;
|
|
78
|
+
void 0 === e && (e = {});
|
|
79
|
+
const { x: i, y: o, platform: r, rects: s, elements: f, strategy: c } = t,
|
|
80
|
+
{
|
|
81
|
+
boundary: u = "clippingAncestors",
|
|
82
|
+
rootBoundary: m = "viewport",
|
|
83
|
+
elementContext: d = "floating",
|
|
84
|
+
altBoundary: g = !1,
|
|
85
|
+
padding: p = 0,
|
|
86
|
+
} = e,
|
|
87
|
+
h = a(p),
|
|
88
|
+
y = f[g ? ("floating" === d ? "reference" : "floating") : d],
|
|
89
|
+
x = l(
|
|
90
|
+
await r.getClippingRect({
|
|
91
|
+
element:
|
|
92
|
+
null ==
|
|
93
|
+
(n = await (null == r.isElement ? void 0 : r.isElement(y))) || n
|
|
94
|
+
? y
|
|
95
|
+
: y.contextElement ||
|
|
96
|
+
(await (null == r.getDocumentElement
|
|
97
|
+
? void 0
|
|
98
|
+
: r.getDocumentElement(f.floating))),
|
|
99
|
+
boundary: u,
|
|
100
|
+
rootBoundary: m,
|
|
101
|
+
strategy: c,
|
|
102
|
+
})
|
|
103
|
+
),
|
|
104
|
+
w = "floating" === d ? { ...s.floating, x: i, y: o } : s.reference,
|
|
105
|
+
v = await (null == r.getOffsetParent
|
|
106
|
+
? void 0
|
|
107
|
+
: r.getOffsetParent(f.floating)),
|
|
108
|
+
b = ((await (null == r.isElement ? void 0 : r.isElement(v))) &&
|
|
109
|
+
(await (null == r.getScale ? void 0 : r.getScale(v)))) || {
|
|
110
|
+
x: 1,
|
|
111
|
+
y: 1,
|
|
112
|
+
},
|
|
113
|
+
R = l(
|
|
114
|
+
r.convertOffsetParentRelativeRectToViewportRelativeRect
|
|
115
|
+
? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
116
|
+
rect: w,
|
|
117
|
+
offsetParent: v,
|
|
118
|
+
strategy: c,
|
|
119
|
+
})
|
|
120
|
+
: w
|
|
121
|
+
);
|
|
122
|
+
return {
|
|
123
|
+
top: (x.top - R.top + h.top) / b.y,
|
|
124
|
+
bottom: (R.bottom - x.bottom + h.bottom) / b.y,
|
|
125
|
+
left: (x.left - R.left + h.left) / b.x,
|
|
126
|
+
right: (R.right - x.right + h.right) / b.x,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
const f = Math.min,
|
|
130
|
+
c = Math.max;
|
|
131
|
+
function u(t, e, n) {
|
|
132
|
+
return c(t, f(e, n));
|
|
133
|
+
}
|
|
134
|
+
const m = ["top", "right", "bottom", "left"],
|
|
135
|
+
d = m.reduce((t, e) => t.concat(e, e + "-start", e + "-end"), []),
|
|
136
|
+
g = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
137
|
+
function p(t) {
|
|
138
|
+
return t.replace(/left|right|bottom|top/g, (t) => g[t]);
|
|
139
|
+
}
|
|
140
|
+
function h(t, i, r) {
|
|
141
|
+
void 0 === r && (r = !1);
|
|
142
|
+
const a = e(t),
|
|
143
|
+
l = o(t),
|
|
144
|
+
s = n(l);
|
|
145
|
+
let f =
|
|
146
|
+
"x" === l
|
|
147
|
+
? a === (r ? "end" : "start")
|
|
148
|
+
? "right"
|
|
149
|
+
: "left"
|
|
150
|
+
: "start" === a
|
|
151
|
+
? "bottom"
|
|
152
|
+
: "top";
|
|
153
|
+
return (
|
|
154
|
+
i.reference[s] > i.floating[s] && (f = p(f)), { main: f, cross: p(f) }
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
const y = { start: "end", end: "start" };
|
|
158
|
+
function x(t) {
|
|
159
|
+
return t.replace(/start|end/g, (t) => y[t]);
|
|
160
|
+
}
|
|
161
|
+
function w(t, e) {
|
|
162
|
+
return {
|
|
163
|
+
top: t.top - e.height,
|
|
164
|
+
right: t.right - e.width,
|
|
165
|
+
bottom: t.bottom - e.height,
|
|
166
|
+
left: t.left - e.width,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function v(t) {
|
|
170
|
+
return m.some((e) => t[e] >= 0);
|
|
171
|
+
}
|
|
172
|
+
function b(t) {
|
|
173
|
+
return "x" === t ? "y" : "x";
|
|
174
|
+
}
|
|
175
|
+
(t.arrow = (t) => ({
|
|
176
|
+
name: "arrow",
|
|
177
|
+
options: t,
|
|
178
|
+
async fn(i) {
|
|
179
|
+
const { element: r, padding: l = 0 } = t || {},
|
|
180
|
+
{ x: s, y: f, placement: c, rects: m, platform: d } = i;
|
|
181
|
+
if (null == r) return {};
|
|
182
|
+
const g = a(l),
|
|
183
|
+
p = { x: s, y: f },
|
|
184
|
+
h = o(c),
|
|
185
|
+
y = n(h),
|
|
186
|
+
x = await d.getDimensions(r),
|
|
187
|
+
w = "y" === h ? "top" : "left",
|
|
188
|
+
v = "y" === h ? "bottom" : "right",
|
|
189
|
+
b = m.reference[y] + m.reference[h] - p[h] - m.floating[y],
|
|
190
|
+
R = p[h] - m.reference[h],
|
|
191
|
+
A = await (null == d.getOffsetParent ? void 0 : d.getOffsetParent(r));
|
|
192
|
+
let P = A ? ("y" === h ? A.clientHeight || 0 : A.clientWidth || 0) : 0;
|
|
193
|
+
0 === P && (P = m.floating[y]);
|
|
194
|
+
const T = b / 2 - R / 2,
|
|
195
|
+
O = g[w],
|
|
196
|
+
D = P - x[y] - g[v],
|
|
197
|
+
E = P / 2 - x[y] / 2 + T,
|
|
198
|
+
L = u(O, E, D),
|
|
199
|
+
k =
|
|
200
|
+
null != e(c) &&
|
|
201
|
+
E != L &&
|
|
202
|
+
m.reference[y] / 2 - (E < O ? g[w] : g[v]) - x[y] / 2 < 0;
|
|
203
|
+
return {
|
|
204
|
+
[h]: p[h] - (k ? (E < O ? O - E : D - E) : 0),
|
|
205
|
+
data: { [h]: L, centerOffset: E - L },
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
})),
|
|
209
|
+
(t.autoPlacement = function (t) {
|
|
210
|
+
return (
|
|
211
|
+
void 0 === t && (t = {}),
|
|
212
|
+
{
|
|
213
|
+
name: "autoPlacement",
|
|
214
|
+
options: t,
|
|
215
|
+
async fn(n) {
|
|
216
|
+
var o, r, a;
|
|
217
|
+
const {
|
|
218
|
+
rects: l,
|
|
219
|
+
middlewareData: f,
|
|
220
|
+
placement: c,
|
|
221
|
+
platform: u,
|
|
222
|
+
elements: m,
|
|
223
|
+
} = n,
|
|
224
|
+
{
|
|
225
|
+
alignment: g,
|
|
226
|
+
allowedPlacements: p = d,
|
|
227
|
+
autoAlignment: y = !0,
|
|
228
|
+
...w
|
|
229
|
+
} = t,
|
|
230
|
+
v =
|
|
231
|
+
void 0 !== g || p === d
|
|
232
|
+
? (function (t, n, o) {
|
|
233
|
+
return (
|
|
234
|
+
t
|
|
235
|
+
? [
|
|
236
|
+
...o.filter((n) => e(n) === t),
|
|
237
|
+
...o.filter((n) => e(n) !== t),
|
|
238
|
+
]
|
|
239
|
+
: o.filter((t) => i(t) === t)
|
|
240
|
+
).filter((i) => !t || e(i) === t || (!!n && x(i) !== i));
|
|
241
|
+
})(g || null, y, p)
|
|
242
|
+
: p,
|
|
243
|
+
b = await s(n, w),
|
|
244
|
+
R = (null == (o = f.autoPlacement) ? void 0 : o.index) || 0,
|
|
245
|
+
A = v[R];
|
|
246
|
+
if (null == A) return {};
|
|
247
|
+
const { main: P, cross: T } = h(
|
|
248
|
+
A,
|
|
249
|
+
l,
|
|
250
|
+
await (null == u.isRTL ? void 0 : u.isRTL(m.floating))
|
|
251
|
+
);
|
|
252
|
+
if (c !== A) return { reset: { placement: v[0] } };
|
|
253
|
+
const O = [b[i(A)], b[P], b[T]],
|
|
254
|
+
D = [
|
|
255
|
+
...((null == (r = f.autoPlacement) ? void 0 : r.overflows) ||
|
|
256
|
+
[]),
|
|
257
|
+
{ placement: A, overflows: O },
|
|
258
|
+
],
|
|
259
|
+
E = v[R + 1];
|
|
260
|
+
if (E)
|
|
261
|
+
return {
|
|
262
|
+
data: { index: R + 1, overflows: D },
|
|
263
|
+
reset: { placement: E },
|
|
264
|
+
};
|
|
265
|
+
const L = D.slice().sort((t, e) => t.overflows[0] - e.overflows[0]),
|
|
266
|
+
k =
|
|
267
|
+
null ==
|
|
268
|
+
(a = L.find((t) => {
|
|
269
|
+
let { overflows: e } = t;
|
|
270
|
+
return e.every((t) => t <= 0);
|
|
271
|
+
}))
|
|
272
|
+
? void 0
|
|
273
|
+
: a.placement,
|
|
274
|
+
C = k || L[0].placement;
|
|
275
|
+
return C !== c
|
|
276
|
+
? {
|
|
277
|
+
data: { index: R + 1, overflows: D },
|
|
278
|
+
reset: { placement: C },
|
|
279
|
+
}
|
|
280
|
+
: {};
|
|
281
|
+
},
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
}),
|
|
285
|
+
(t.computePosition = async (t, e, n) => {
|
|
286
|
+
const {
|
|
287
|
+
placement: i = "bottom",
|
|
288
|
+
strategy: o = "absolute",
|
|
289
|
+
middleware: a = [],
|
|
290
|
+
platform: l,
|
|
291
|
+
} = n,
|
|
292
|
+
s = a.filter(Boolean),
|
|
293
|
+
f = await (null == l.isRTL ? void 0 : l.isRTL(e));
|
|
294
|
+
let c = await l.getElementRects({
|
|
295
|
+
reference: t,
|
|
296
|
+
floating: e,
|
|
297
|
+
strategy: o,
|
|
298
|
+
}),
|
|
299
|
+
{ x: u, y: m } = r(c, i, f),
|
|
300
|
+
d = i,
|
|
301
|
+
g = {},
|
|
302
|
+
p = 0;
|
|
303
|
+
for (let n = 0; n < s.length; n++) {
|
|
304
|
+
const { name: a, fn: h } = s[n],
|
|
305
|
+
{
|
|
306
|
+
x: y,
|
|
307
|
+
y: x,
|
|
308
|
+
data: w,
|
|
309
|
+
reset: v,
|
|
310
|
+
} = await h({
|
|
311
|
+
x: u,
|
|
312
|
+
y: m,
|
|
313
|
+
initialPlacement: i,
|
|
314
|
+
placement: d,
|
|
315
|
+
strategy: o,
|
|
316
|
+
middlewareData: g,
|
|
317
|
+
rects: c,
|
|
318
|
+
platform: l,
|
|
319
|
+
elements: { reference: t, floating: e },
|
|
320
|
+
});
|
|
321
|
+
(u = null != y ? y : u),
|
|
322
|
+
(m = null != x ? x : m),
|
|
323
|
+
(g = { ...g, [a]: { ...g[a], ...w } }),
|
|
324
|
+
v &&
|
|
325
|
+
p <= 50 &&
|
|
326
|
+
(p++,
|
|
327
|
+
"object" == typeof v &&
|
|
328
|
+
(v.placement && (d = v.placement),
|
|
329
|
+
v.rects &&
|
|
330
|
+
(c =
|
|
331
|
+
!0 === v.rects
|
|
332
|
+
? await l.getElementRects({
|
|
333
|
+
reference: t,
|
|
334
|
+
floating: e,
|
|
335
|
+
strategy: o,
|
|
336
|
+
})
|
|
337
|
+
: v.rects),
|
|
338
|
+
({ x: u, y: m } = r(c, d, f))),
|
|
339
|
+
(n = -1));
|
|
340
|
+
}
|
|
341
|
+
return { x: u, y: m, placement: d, strategy: o, middlewareData: g };
|
|
342
|
+
}),
|
|
343
|
+
(t.detectOverflow = s),
|
|
344
|
+
(t.flip = function (t) {
|
|
345
|
+
return (
|
|
346
|
+
void 0 === t && (t = {}),
|
|
347
|
+
{
|
|
348
|
+
name: "flip",
|
|
349
|
+
options: t,
|
|
350
|
+
async fn(n) {
|
|
351
|
+
var o;
|
|
352
|
+
const {
|
|
353
|
+
placement: r,
|
|
354
|
+
middlewareData: a,
|
|
355
|
+
rects: l,
|
|
356
|
+
initialPlacement: f,
|
|
357
|
+
platform: c,
|
|
358
|
+
elements: u,
|
|
359
|
+
} = n,
|
|
360
|
+
{
|
|
361
|
+
mainAxis: m = !0,
|
|
362
|
+
crossAxis: d = !0,
|
|
363
|
+
fallbackPlacements: g,
|
|
364
|
+
fallbackStrategy: y = "bestFit",
|
|
365
|
+
fallbackAxisSideDirection: w = "none",
|
|
366
|
+
flipAlignment: v = !0,
|
|
367
|
+
...b
|
|
368
|
+
} = t,
|
|
369
|
+
R = i(r),
|
|
370
|
+
A = i(f) === f,
|
|
371
|
+
P = await (null == c.isRTL ? void 0 : c.isRTL(u.floating)),
|
|
372
|
+
T =
|
|
373
|
+
g ||
|
|
374
|
+
(A || !v
|
|
375
|
+
? [p(f)]
|
|
376
|
+
: (function (t) {
|
|
377
|
+
const e = p(t);
|
|
378
|
+
return [x(t), e, x(e)];
|
|
379
|
+
})(f));
|
|
380
|
+
g ||
|
|
381
|
+
"none" === w ||
|
|
382
|
+
T.push(
|
|
383
|
+
...(function (t, n, o, r) {
|
|
384
|
+
const a = e(t);
|
|
385
|
+
let l = (function (t, e, n) {
|
|
386
|
+
const i = ["left", "right"],
|
|
387
|
+
o = ["right", "left"],
|
|
388
|
+
r = ["top", "bottom"],
|
|
389
|
+
a = ["bottom", "top"];
|
|
390
|
+
switch (t) {
|
|
391
|
+
case "top":
|
|
392
|
+
case "bottom":
|
|
393
|
+
return n ? (e ? o : i) : e ? i : o;
|
|
394
|
+
case "left":
|
|
395
|
+
case "right":
|
|
396
|
+
return e ? r : a;
|
|
397
|
+
default:
|
|
398
|
+
return [];
|
|
399
|
+
}
|
|
400
|
+
})(i(t), "start" === o, r);
|
|
401
|
+
return (
|
|
402
|
+
a &&
|
|
403
|
+
((l = l.map((t) => t + "-" + a)),
|
|
404
|
+
n && (l = l.concat(l.map(x)))),
|
|
405
|
+
l
|
|
406
|
+
);
|
|
407
|
+
})(f, v, w, P)
|
|
408
|
+
);
|
|
409
|
+
const O = [f, ...T],
|
|
410
|
+
D = await s(n, b),
|
|
411
|
+
E = [];
|
|
412
|
+
let L = (null == (o = a.flip) ? void 0 : o.overflows) || [];
|
|
413
|
+
if ((m && E.push(D[R]), d)) {
|
|
414
|
+
const { main: t, cross: e } = h(r, l, P);
|
|
415
|
+
E.push(D[t], D[e]);
|
|
416
|
+
}
|
|
417
|
+
if (
|
|
418
|
+
((L = [...L, { placement: r, overflows: E }]),
|
|
419
|
+
!E.every((t) => t <= 0))
|
|
420
|
+
) {
|
|
421
|
+
var k, C;
|
|
422
|
+
const t = ((null == (k = a.flip) ? void 0 : k.index) || 0) + 1,
|
|
423
|
+
e = O[t];
|
|
424
|
+
if (e)
|
|
425
|
+
return {
|
|
426
|
+
data: { index: t, overflows: L },
|
|
427
|
+
reset: { placement: e },
|
|
428
|
+
};
|
|
429
|
+
let n =
|
|
430
|
+
null == (C = L.find((t) => t.overflows[0] <= 0))
|
|
431
|
+
? void 0
|
|
432
|
+
: C.placement;
|
|
433
|
+
if (!n)
|
|
434
|
+
switch (y) {
|
|
435
|
+
case "bestFit": {
|
|
436
|
+
var B;
|
|
437
|
+
const t =
|
|
438
|
+
null ==
|
|
439
|
+
(B = L.map((t) => [
|
|
440
|
+
t.placement,
|
|
441
|
+
t.overflows
|
|
442
|
+
.filter((t) => t > 0)
|
|
443
|
+
.reduce((t, e) => t + e, 0),
|
|
444
|
+
]).sort((t, e) => t[1] - e[1])[0])
|
|
445
|
+
? void 0
|
|
446
|
+
: B[0];
|
|
447
|
+
t && (n = t);
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
case "initialPlacement":
|
|
451
|
+
n = f;
|
|
452
|
+
}
|
|
453
|
+
if (r !== n) return { reset: { placement: n } };
|
|
454
|
+
}
|
|
455
|
+
return {};
|
|
456
|
+
},
|
|
457
|
+
}
|
|
458
|
+
);
|
|
459
|
+
}),
|
|
460
|
+
(t.hide = function (t) {
|
|
461
|
+
return (
|
|
462
|
+
void 0 === t && (t = {}),
|
|
463
|
+
{
|
|
464
|
+
name: "hide",
|
|
465
|
+
options: t,
|
|
466
|
+
async fn(e) {
|
|
467
|
+
const { strategy: n = "referenceHidden", ...i } = t,
|
|
468
|
+
{ rects: o } = e;
|
|
469
|
+
switch (n) {
|
|
470
|
+
case "referenceHidden": {
|
|
471
|
+
const t = w(
|
|
472
|
+
await s(e, { ...i, elementContext: "reference" }),
|
|
473
|
+
o.reference
|
|
474
|
+
);
|
|
475
|
+
return {
|
|
476
|
+
data: { referenceHiddenOffsets: t, referenceHidden: v(t) },
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
case "escaped": {
|
|
480
|
+
const t = w(await s(e, { ...i, altBoundary: !0 }), o.floating);
|
|
481
|
+
return { data: { escapedOffsets: t, escaped: v(t) } };
|
|
482
|
+
}
|
|
483
|
+
default:
|
|
484
|
+
return {};
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
}),
|
|
490
|
+
(t.inline = function (t) {
|
|
491
|
+
return (
|
|
492
|
+
void 0 === t && (t = {}),
|
|
493
|
+
{
|
|
494
|
+
name: "inline",
|
|
495
|
+
options: t,
|
|
496
|
+
async fn(e) {
|
|
497
|
+
const {
|
|
498
|
+
placement: n,
|
|
499
|
+
elements: r,
|
|
500
|
+
rects: s,
|
|
501
|
+
platform: u,
|
|
502
|
+
strategy: m,
|
|
503
|
+
} = e,
|
|
504
|
+
{ padding: d = 2, x: g, y: p } = t,
|
|
505
|
+
h = l(
|
|
506
|
+
u.convertOffsetParentRelativeRectToViewportRelativeRect
|
|
507
|
+
? await u.convertOffsetParentRelativeRectToViewportRelativeRect(
|
|
508
|
+
{
|
|
509
|
+
rect: s.reference,
|
|
510
|
+
offsetParent: await (null == u.getOffsetParent
|
|
511
|
+
? void 0
|
|
512
|
+
: u.getOffsetParent(r.floating)),
|
|
513
|
+
strategy: m,
|
|
514
|
+
}
|
|
515
|
+
)
|
|
516
|
+
: s.reference
|
|
517
|
+
),
|
|
518
|
+
y =
|
|
519
|
+
(await (null == u.getClientRects
|
|
520
|
+
? void 0
|
|
521
|
+
: u.getClientRects(r.reference))) || [],
|
|
522
|
+
x = a(d);
|
|
523
|
+
const w = await u.getElementRects({
|
|
524
|
+
reference: {
|
|
525
|
+
getBoundingClientRect: function () {
|
|
526
|
+
if (
|
|
527
|
+
2 === y.length &&
|
|
528
|
+
y[0].left > y[1].right &&
|
|
529
|
+
null != g &&
|
|
530
|
+
null != p
|
|
531
|
+
)
|
|
532
|
+
return (
|
|
533
|
+
y.find(
|
|
534
|
+
(t) =>
|
|
535
|
+
g > t.left - x.left &&
|
|
536
|
+
g < t.right + x.right &&
|
|
537
|
+
p > t.top - x.top &&
|
|
538
|
+
p < t.bottom + x.bottom
|
|
539
|
+
) || h
|
|
540
|
+
);
|
|
541
|
+
if (y.length >= 2) {
|
|
542
|
+
if ("x" === o(n)) {
|
|
543
|
+
const t = y[0],
|
|
544
|
+
e = y[y.length - 1],
|
|
545
|
+
o = "top" === i(n),
|
|
546
|
+
r = t.top,
|
|
547
|
+
a = e.bottom,
|
|
548
|
+
l = o ? t.left : e.left,
|
|
549
|
+
s = o ? t.right : e.right;
|
|
550
|
+
return {
|
|
551
|
+
top: r,
|
|
552
|
+
bottom: a,
|
|
553
|
+
left: l,
|
|
554
|
+
right: s,
|
|
555
|
+
width: s - l,
|
|
556
|
+
height: a - r,
|
|
557
|
+
x: l,
|
|
558
|
+
y: r,
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
const t = "left" === i(n),
|
|
562
|
+
e = c(...y.map((t) => t.right)),
|
|
563
|
+
r = f(...y.map((t) => t.left)),
|
|
564
|
+
a = y.filter((n) => (t ? n.left === r : n.right === e)),
|
|
565
|
+
l = a[0].top,
|
|
566
|
+
s = a[a.length - 1].bottom;
|
|
567
|
+
return {
|
|
568
|
+
top: l,
|
|
569
|
+
bottom: s,
|
|
570
|
+
left: r,
|
|
571
|
+
right: e,
|
|
572
|
+
width: e - r,
|
|
573
|
+
height: s - l,
|
|
574
|
+
x: r,
|
|
575
|
+
y: l,
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
return h;
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
floating: r.floating,
|
|
582
|
+
strategy: m,
|
|
583
|
+
});
|
|
584
|
+
return s.reference.x !== w.reference.x ||
|
|
585
|
+
s.reference.y !== w.reference.y ||
|
|
586
|
+
s.reference.width !== w.reference.width ||
|
|
587
|
+
s.reference.height !== w.reference.height
|
|
588
|
+
? { reset: { rects: w } }
|
|
589
|
+
: {};
|
|
590
|
+
},
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
}),
|
|
594
|
+
(t.limitShift = function (t) {
|
|
595
|
+
return (
|
|
596
|
+
void 0 === t && (t = {}),
|
|
597
|
+
{
|
|
598
|
+
options: t,
|
|
599
|
+
fn(e) {
|
|
600
|
+
const { x: n, y: r, placement: a, rects: l, middlewareData: s } = e,
|
|
601
|
+
{ offset: f = 0, mainAxis: c = !0, crossAxis: u = !0 } = t,
|
|
602
|
+
m = { x: n, y: r },
|
|
603
|
+
d = o(a),
|
|
604
|
+
g = b(d);
|
|
605
|
+
let p = m[d],
|
|
606
|
+
h = m[g];
|
|
607
|
+
const y = "function" == typeof f ? f(e) : f,
|
|
608
|
+
x =
|
|
609
|
+
"number" == typeof y
|
|
610
|
+
? { mainAxis: y, crossAxis: 0 }
|
|
611
|
+
: { mainAxis: 0, crossAxis: 0, ...y };
|
|
612
|
+
if (c) {
|
|
613
|
+
const t = "y" === d ? "height" : "width",
|
|
614
|
+
e = l.reference[d] - l.floating[t] + x.mainAxis,
|
|
615
|
+
n = l.reference[d] + l.reference[t] - x.mainAxis;
|
|
616
|
+
p < e ? (p = e) : p > n && (p = n);
|
|
617
|
+
}
|
|
618
|
+
if (u) {
|
|
619
|
+
var w, v;
|
|
620
|
+
const t = "y" === d ? "width" : "height",
|
|
621
|
+
e = ["top", "left"].includes(i(a)),
|
|
622
|
+
n =
|
|
623
|
+
l.reference[g] -
|
|
624
|
+
l.floating[t] +
|
|
625
|
+
((e && (null == (w = s.offset) ? void 0 : w[g])) || 0) +
|
|
626
|
+
(e ? 0 : x.crossAxis),
|
|
627
|
+
o =
|
|
628
|
+
l.reference[g] +
|
|
629
|
+
l.reference[t] +
|
|
630
|
+
(e ? 0 : (null == (v = s.offset) ? void 0 : v[g]) || 0) -
|
|
631
|
+
(e ? x.crossAxis : 0);
|
|
632
|
+
h < n ? (h = n) : h > o && (h = o);
|
|
633
|
+
}
|
|
634
|
+
return { [d]: p, [g]: h };
|
|
635
|
+
},
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
}),
|
|
639
|
+
(t.offset = function (t) {
|
|
640
|
+
return (
|
|
641
|
+
void 0 === t && (t = 0),
|
|
642
|
+
{
|
|
643
|
+
name: "offset",
|
|
644
|
+
options: t,
|
|
645
|
+
async fn(n) {
|
|
646
|
+
const { x: r, y: a } = n,
|
|
647
|
+
l = await (async function (t, n) {
|
|
648
|
+
const { placement: r, platform: a, elements: l } = t,
|
|
649
|
+
s = await (null == a.isRTL ? void 0 : a.isRTL(l.floating)),
|
|
650
|
+
f = i(r),
|
|
651
|
+
c = e(r),
|
|
652
|
+
u = "x" === o(r),
|
|
653
|
+
m = ["left", "top"].includes(f) ? -1 : 1,
|
|
654
|
+
d = s && u ? -1 : 1,
|
|
655
|
+
g = "function" == typeof n ? n(t) : n;
|
|
656
|
+
let {
|
|
657
|
+
mainAxis: p,
|
|
658
|
+
crossAxis: h,
|
|
659
|
+
alignmentAxis: y,
|
|
660
|
+
} = "number" == typeof g
|
|
661
|
+
? { mainAxis: g, crossAxis: 0, alignmentAxis: null }
|
|
662
|
+
: { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...g };
|
|
663
|
+
return (
|
|
664
|
+
c && "number" == typeof y && (h = "end" === c ? -1 * y : y),
|
|
665
|
+
u ? { x: h * d, y: p * m } : { x: p * m, y: h * d }
|
|
666
|
+
);
|
|
667
|
+
})(n, t);
|
|
668
|
+
return { x: r + l.x, y: a + l.y, data: l };
|
|
669
|
+
},
|
|
670
|
+
}
|
|
671
|
+
);
|
|
672
|
+
}),
|
|
673
|
+
(t.rectToClientRect = l),
|
|
674
|
+
(t.shift = function (t) {
|
|
675
|
+
return (
|
|
676
|
+
void 0 === t && (t = {}),
|
|
677
|
+
{
|
|
678
|
+
name: "shift",
|
|
679
|
+
options: t,
|
|
680
|
+
async fn(e) {
|
|
681
|
+
const { x: n, y: r, placement: a } = e,
|
|
682
|
+
{
|
|
683
|
+
mainAxis: l = !0,
|
|
684
|
+
crossAxis: f = !1,
|
|
685
|
+
limiter: c = {
|
|
686
|
+
fn: (t) => {
|
|
687
|
+
let { x: e, y: n } = t;
|
|
688
|
+
return { x: e, y: n };
|
|
689
|
+
},
|
|
690
|
+
},
|
|
691
|
+
...m
|
|
692
|
+
} = t,
|
|
693
|
+
d = { x: n, y: r },
|
|
694
|
+
g = await s(e, m),
|
|
695
|
+
p = o(i(a)),
|
|
696
|
+
h = b(p);
|
|
697
|
+
let y = d[p],
|
|
698
|
+
x = d[h];
|
|
699
|
+
if (l) {
|
|
700
|
+
const t = "y" === p ? "bottom" : "right";
|
|
701
|
+
y = u(y + g["y" === p ? "top" : "left"], y, y - g[t]);
|
|
702
|
+
}
|
|
703
|
+
if (f) {
|
|
704
|
+
const t = "y" === h ? "bottom" : "right";
|
|
705
|
+
x = u(x + g["y" === h ? "top" : "left"], x, x - g[t]);
|
|
706
|
+
}
|
|
707
|
+
const w = c.fn({ ...e, [p]: y, [h]: x });
|
|
708
|
+
return { ...w, data: { x: w.x - n, y: w.y - r } };
|
|
709
|
+
},
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
}),
|
|
713
|
+
(t.size = function (t) {
|
|
714
|
+
return (
|
|
715
|
+
void 0 === t && (t = {}),
|
|
716
|
+
{
|
|
717
|
+
name: "size",
|
|
718
|
+
options: t,
|
|
719
|
+
async fn(n) {
|
|
720
|
+
const { placement: o, rects: r, platform: a, elements: l } = n,
|
|
721
|
+
{ apply: f = () => {}, ...u } = t,
|
|
722
|
+
m = await s(n, u),
|
|
723
|
+
d = i(o),
|
|
724
|
+
g = e(o);
|
|
725
|
+
let p, h;
|
|
726
|
+
"top" === d || "bottom" === d
|
|
727
|
+
? ((p = d),
|
|
728
|
+
(h =
|
|
729
|
+
g ===
|
|
730
|
+
((await (null == a.isRTL ? void 0 : a.isRTL(l.floating)))
|
|
731
|
+
? "start"
|
|
732
|
+
: "end")
|
|
733
|
+
? "left"
|
|
734
|
+
: "right"))
|
|
735
|
+
: ((h = d), (p = "end" === g ? "top" : "bottom"));
|
|
736
|
+
const y = c(m.left, 0),
|
|
737
|
+
x = c(m.right, 0),
|
|
738
|
+
w = c(m.top, 0),
|
|
739
|
+
v = c(m.bottom, 0),
|
|
740
|
+
b = {
|
|
741
|
+
availableHeight:
|
|
742
|
+
r.floating.height -
|
|
743
|
+
(["left", "right"].includes(o)
|
|
744
|
+
? 2 * (0 !== w || 0 !== v ? w + v : c(m.top, m.bottom))
|
|
745
|
+
: m[p]),
|
|
746
|
+
availableWidth:
|
|
747
|
+
r.floating.width -
|
|
748
|
+
(["top", "bottom"].includes(o)
|
|
749
|
+
? 2 * (0 !== y || 0 !== x ? y + x : c(m.left, m.right))
|
|
750
|
+
: m[h]),
|
|
751
|
+
};
|
|
752
|
+
await f({ ...n, ...b });
|
|
753
|
+
const R = await a.getDimensions(l.floating);
|
|
754
|
+
return r.floating.width !== R.width ||
|
|
755
|
+
r.floating.height !== R.height
|
|
756
|
+
? { reset: { rects: !0 } }
|
|
757
|
+
: {};
|
|
758
|
+
},
|
|
759
|
+
}
|
|
760
|
+
);
|
|
761
|
+
}),
|
|
762
|
+
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
763
|
+
});
|