@squirrel-cloud/ui-vue 0.2.3 → 0.2.4
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
1
|
+
import { createElementBlock as T, openBlock as R, createElementVNode as J, defineComponent as M, computed as w, normalizeClass as D, createVNode as Xt, unref as H, withCtx as dt, createBlock as Q, createCommentVNode as st, renderSlot as _, resolveDynamicComponent as bt, useSlots as Ut, toDisplayString as le, mergeModels as St, useModel as Yt, useTemplateRef as ce, withDirectives as Kt, vModelText as ae, ref as nt, shallowRef as Ct, watch as wt, getCurrentScope as ue, onScopeDispose as fe, shallowReadonly as Y, onBeforeUnmount as de, Fragment as pe, withModifiers as qt, normalizeStyle as ct, Teleport as me, Transition as he, vShow as ge } from "vue";
|
|
2
2
|
const ve = (t, e) => {
|
|
3
3
|
const n = t.__vccOpts || t;
|
|
4
4
|
for (const [o, s] of e)
|
|
@@ -9,7 +9,7 @@ const ve = (t, e) => {
|
|
|
9
9
|
"data-icon": "loading"
|
|
10
10
|
};
|
|
11
11
|
function xe(t, e) {
|
|
12
|
-
return
|
|
12
|
+
return R(), T("span", we, e[0] || (e[0] = [
|
|
13
13
|
J("svg", {
|
|
14
14
|
viewBox: "0 0 48 48",
|
|
15
15
|
version: "1.1",
|
|
@@ -39,28 +39,28 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
|
|
|
39
39
|
const i = [];
|
|
40
40
|
return e.size !== "md" && i.push(`sq-button--${e.size}`), e.type && i.push(`is-${e.type}`), e.round && i.push("is-round"), e.text && i.push("is-text"), i;
|
|
41
41
|
}), o = w(() => e.loading ? be : e.icon), s = w(() => e.loading || e.disabled);
|
|
42
|
-
return (i, r) => (
|
|
42
|
+
return (i, r) => (R(), T("button", {
|
|
43
43
|
class: D(["sq-button", n.value]),
|
|
44
44
|
disabled: s.value
|
|
45
45
|
}, [
|
|
46
46
|
Xt(H(kt), {
|
|
47
47
|
size: e.size
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
o.value ? (
|
|
51
|
-
|
|
49
|
+
default: dt(() => [
|
|
50
|
+
o.value ? (R(), Q(bt(o.value), { key: 0 })) : st("", !0),
|
|
51
|
+
_(i.$slots, "default")
|
|
52
52
|
]),
|
|
53
53
|
_: 3
|
|
54
54
|
}, 8, ["size"])
|
|
55
55
|
], 10, Se));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), Ce = { class: "sq-card" }, Re = {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "sq-card-header"
|
|
60
60
|
}, Le = ["textContent"], Ae = {
|
|
61
61
|
key: 1,
|
|
62
62
|
class: "sq-card-footer"
|
|
63
|
-
},
|
|
63
|
+
}, Tn = /* @__PURE__ */ M({
|
|
64
64
|
__name: "SqCard",
|
|
65
65
|
props: {
|
|
66
66
|
title: {},
|
|
@@ -68,29 +68,29 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
|
|
|
68
68
|
},
|
|
69
69
|
setup(t) {
|
|
70
70
|
const e = Ut(), n = t;
|
|
71
|
-
return (o, s) => (
|
|
72
|
-
n.title || H(e).title ? (
|
|
71
|
+
return (o, s) => (R(), T("div", Ce, [
|
|
72
|
+
n.title || H(e).title ? (R(), T("div", Re, [
|
|
73
73
|
J("h2", {
|
|
74
74
|
class: D({ "has-decorative": n.decorative }),
|
|
75
75
|
textContent: le(n.title)
|
|
76
76
|
}, null, 10, Le),
|
|
77
|
-
|
|
77
|
+
_(o.$slots, "title")
|
|
78
78
|
])) : st("", !0),
|
|
79
|
-
|
|
80
|
-
H(e).footer ? (
|
|
81
|
-
|
|
79
|
+
_(o.$slots, "default"),
|
|
80
|
+
H(e).footer ? (R(), T("div", Ae, [
|
|
81
|
+
_(o.$slots, "footer")
|
|
82
82
|
])) : st("", !0)
|
|
83
83
|
]));
|
|
84
84
|
}
|
|
85
85
|
}), Oe = {
|
|
86
86
|
key: 0,
|
|
87
87
|
class: "sq-input-prefix"
|
|
88
|
-
},
|
|
88
|
+
}, Te = ["disabled", "readonly"], _e = {
|
|
89
89
|
key: 1,
|
|
90
90
|
class: "sq-input-suffix"
|
|
91
|
-
},
|
|
91
|
+
}, _n = /* @__PURE__ */ M({
|
|
92
92
|
__name: "SqInput",
|
|
93
|
-
props: /* @__PURE__ */
|
|
93
|
+
props: /* @__PURE__ */ St({
|
|
94
94
|
status: {},
|
|
95
95
|
round: { type: Boolean },
|
|
96
96
|
showStatusIcon: { type: Boolean },
|
|
@@ -103,29 +103,29 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
|
|
|
103
103
|
value: { type: String, default: "" },
|
|
104
104
|
valueModifiers: {}
|
|
105
105
|
}),
|
|
106
|
-
emits: /* @__PURE__ */
|
|
106
|
+
emits: /* @__PURE__ */ St(["focus", "blur", "input", "change"], ["update:value"]),
|
|
107
107
|
setup(t, { expose: e, emit: n }) {
|
|
108
|
-
const o = Ut(), s = n, i = t, r = Yt(t, "value"), l =
|
|
108
|
+
const o = Ut(), s = n, i = t, r = Yt(t, "value"), l = ce("inputRef"), a = w(() => {
|
|
109
109
|
const p = [];
|
|
110
110
|
return i.size !== "md" && p.push(`sq-input--${i.size}`), i.status && p.push(`is-${i.status}`), i.round && p.push("is-round"), i.disabled && p.push("is-disabled"), p;
|
|
111
|
-
}), c = w(() => o.prefix || i.prefixIcon),
|
|
111
|
+
}), c = w(() => o.prefix || i.prefixIcon), f = w(() => {
|
|
112
112
|
const p = i.showStatusIcon && i.status;
|
|
113
113
|
return o.suffix || p || i.suffixIcon;
|
|
114
|
-
}),
|
|
114
|
+
}), d = w(() => i.suffixIcon);
|
|
115
115
|
function m() {
|
|
116
116
|
var p;
|
|
117
117
|
(p = l.value) == null || p.focus();
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function u() {
|
|
120
120
|
var p;
|
|
121
121
|
(p = l.value) == null || p.blur();
|
|
122
122
|
}
|
|
123
|
-
return e({ focus: m, blur:
|
|
123
|
+
return e({ focus: m, blur: u }), (p, h) => (R(), T("section", {
|
|
124
124
|
class: D(["sq-input", a.value])
|
|
125
125
|
}, [
|
|
126
|
-
c.value ? (
|
|
127
|
-
|
|
128
|
-
(
|
|
126
|
+
c.value ? (R(), T("span", Oe, [
|
|
127
|
+
_(p.$slots, "prefix", {}, () => [
|
|
128
|
+
(R(), Q(bt(i.prefixIcon)))
|
|
129
129
|
])
|
|
130
130
|
])) : st("", !0),
|
|
131
131
|
Kt(J("input", {
|
|
@@ -139,17 +139,17 @@ const be = /* @__PURE__ */ ve(ye, [["render", xe]]), Se = ["disabled"], On = /*
|
|
|
139
139
|
onBlur: h[2] || (h[2] = (g) => s("blur", g)),
|
|
140
140
|
onInput: h[3] || (h[3] = (g) => s("input", g)),
|
|
141
141
|
onChange: h[4] || (h[4] = (g) => s("change", g))
|
|
142
|
-
}, null, 40,
|
|
143
|
-
[
|
|
142
|
+
}, null, 40, Te), [
|
|
143
|
+
[ae, r.value]
|
|
144
144
|
]),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
(
|
|
145
|
+
f.value ? (R(), T("span", _e, [
|
|
146
|
+
_(p.$slots, "suffix", {}, () => [
|
|
147
|
+
(R(), Q(bt(d.value)))
|
|
148
148
|
])
|
|
149
149
|
])) : st("", !0)
|
|
150
150
|
], 2));
|
|
151
151
|
}
|
|
152
|
-
}), Rt = Math.min, K = Math.max,
|
|
152
|
+
}), Rt = Math.min, K = Math.max, at = Math.round, lt = Math.floor, k = (t) => ({
|
|
153
153
|
x: t,
|
|
154
154
|
y: t
|
|
155
155
|
}), Ee = {
|
|
@@ -167,7 +167,7 @@ function Ot(t, e) {
|
|
|
167
167
|
function Z(t) {
|
|
168
168
|
return t.split("-")[0];
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function pt(t) {
|
|
171
171
|
return t.split("-")[1];
|
|
172
172
|
}
|
|
173
173
|
function ke(t) {
|
|
@@ -185,15 +185,15 @@ function Jt(t) {
|
|
|
185
185
|
}
|
|
186
186
|
function Pe(t, e, n) {
|
|
187
187
|
n === void 0 && (n = !1);
|
|
188
|
-
const o =
|
|
188
|
+
const o = pt(t), s = Jt(t), i = Gt(s);
|
|
189
189
|
let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
190
|
-
return e.reference[i] > e.floating[i] && (r =
|
|
190
|
+
return e.reference[i] > e.floating[i] && (r = ut(r)), [r, ut(r)];
|
|
191
191
|
}
|
|
192
192
|
function De(t) {
|
|
193
|
-
const e =
|
|
194
|
-
return [
|
|
193
|
+
const e = ut(t);
|
|
194
|
+
return [Lt(t), e, Lt(e)];
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Lt(t) {
|
|
197
197
|
return t.replace(/start|end/g, (e) => $e[e]);
|
|
198
198
|
}
|
|
199
199
|
const zt = ["left", "right"], Mt = ["right", "left"], qe = ["top", "bottom"], ze = ["bottom", "top"];
|
|
@@ -210,11 +210,11 @@ function Me(t, e, n) {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
function Ve(t, e, n, o) {
|
|
213
|
-
const s =
|
|
213
|
+
const s = pt(t);
|
|
214
214
|
let i = Me(Z(t), n === "start", o);
|
|
215
|
-
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(
|
|
215
|
+
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(Lt)))), i;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function ut(t) {
|
|
218
218
|
return t.replace(/left|right|bottom|top/g, (e) => Ee[e]);
|
|
219
219
|
}
|
|
220
220
|
function Fe(t) {
|
|
@@ -234,7 +234,7 @@ function Ne(t) {
|
|
|
234
234
|
left: t
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function ft(t) {
|
|
238
238
|
const {
|
|
239
239
|
x: e,
|
|
240
240
|
y: n,
|
|
@@ -257,48 +257,48 @@ function Vt(t, e, n) {
|
|
|
257
257
|
reference: o,
|
|
258
258
|
floating: s
|
|
259
259
|
} = t;
|
|
260
|
-
const i = W(e), r = Jt(e), l = Gt(r), a = Z(e), c = i === "y",
|
|
261
|
-
let
|
|
260
|
+
const i = W(e), r = Jt(e), l = Gt(r), a = Z(e), c = i === "y", f = o.x + o.width / 2 - s.width / 2, d = o.y + o.height / 2 - s.height / 2, m = o[l] / 2 - s[l] / 2;
|
|
261
|
+
let u;
|
|
262
262
|
switch (a) {
|
|
263
263
|
case "top":
|
|
264
|
-
|
|
265
|
-
x:
|
|
264
|
+
u = {
|
|
265
|
+
x: f,
|
|
266
266
|
y: o.y - s.height
|
|
267
267
|
};
|
|
268
268
|
break;
|
|
269
269
|
case "bottom":
|
|
270
|
-
|
|
271
|
-
x:
|
|
270
|
+
u = {
|
|
271
|
+
x: f,
|
|
272
272
|
y: o.y + o.height
|
|
273
273
|
};
|
|
274
274
|
break;
|
|
275
275
|
case "right":
|
|
276
|
-
|
|
276
|
+
u = {
|
|
277
277
|
x: o.x + o.width,
|
|
278
|
-
y:
|
|
278
|
+
y: d
|
|
279
279
|
};
|
|
280
280
|
break;
|
|
281
281
|
case "left":
|
|
282
|
-
|
|
282
|
+
u = {
|
|
283
283
|
x: o.x - s.width,
|
|
284
|
-
y:
|
|
284
|
+
y: d
|
|
285
285
|
};
|
|
286
286
|
break;
|
|
287
287
|
default:
|
|
288
|
-
|
|
288
|
+
u = {
|
|
289
289
|
x: o.x,
|
|
290
290
|
y: o.y
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
switch (
|
|
293
|
+
switch (pt(e)) {
|
|
294
294
|
case "start":
|
|
295
|
-
|
|
295
|
+
u[r] -= m * (n && c ? -1 : 1);
|
|
296
296
|
break;
|
|
297
297
|
case "end":
|
|
298
|
-
|
|
298
|
+
u[r] += m * (n && c ? -1 : 1);
|
|
299
299
|
break;
|
|
300
300
|
}
|
|
301
|
-
return
|
|
301
|
+
return u;
|
|
302
302
|
}
|
|
303
303
|
const Ie = async (t, e, n) => {
|
|
304
304
|
const {
|
|
@@ -312,9 +312,9 @@ const Ie = async (t, e, n) => {
|
|
|
312
312
|
floating: e,
|
|
313
313
|
strategy: s
|
|
314
314
|
}), {
|
|
315
|
-
x:
|
|
316
|
-
y:
|
|
317
|
-
} = Vt(c, o, a), m = o,
|
|
315
|
+
x: f,
|
|
316
|
+
y: d
|
|
317
|
+
} = Vt(c, o, a), m = o, u = {}, p = 0;
|
|
318
318
|
for (let h = 0; h < l.length; h++) {
|
|
319
319
|
const {
|
|
320
320
|
name: g,
|
|
@@ -322,15 +322,15 @@ const Ie = async (t, e, n) => {
|
|
|
322
322
|
} = l[h], {
|
|
323
323
|
x: y,
|
|
324
324
|
y: b,
|
|
325
|
-
data:
|
|
325
|
+
data: C,
|
|
326
326
|
reset: S
|
|
327
327
|
} = await v({
|
|
328
|
-
x:
|
|
329
|
-
y:
|
|
328
|
+
x: f,
|
|
329
|
+
y: d,
|
|
330
330
|
initialPlacement: o,
|
|
331
331
|
placement: m,
|
|
332
332
|
strategy: s,
|
|
333
|
-
middlewareData:
|
|
333
|
+
middlewareData: u,
|
|
334
334
|
rects: c,
|
|
335
335
|
platform: r,
|
|
336
336
|
elements: {
|
|
@@ -338,27 +338,27 @@ const Ie = async (t, e, n) => {
|
|
|
338
338
|
floating: e
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
|
-
|
|
342
|
-
...
|
|
341
|
+
f = y ?? f, d = b ?? d, u = {
|
|
342
|
+
...u,
|
|
343
343
|
[g]: {
|
|
344
|
-
...
|
|
345
|
-
...
|
|
344
|
+
...u[g],
|
|
345
|
+
...C
|
|
346
346
|
}
|
|
347
347
|
}, S && p <= 50 && (p++, typeof S == "object" && (S.placement && (m = S.placement), S.rects && (c = S.rects === !0 ? await r.getElementRects({
|
|
348
348
|
reference: t,
|
|
349
349
|
floating: e,
|
|
350
350
|
strategy: s
|
|
351
351
|
}) : S.rects), {
|
|
352
|
-
x:
|
|
353
|
-
y:
|
|
352
|
+
x: f,
|
|
353
|
+
y: d
|
|
354
354
|
} = Vt(c, m, a)), h = -1);
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
|
-
x:
|
|
358
|
-
y:
|
|
357
|
+
x: f,
|
|
358
|
+
y: d,
|
|
359
359
|
placement: m,
|
|
360
360
|
strategy: s,
|
|
361
|
-
middlewareData:
|
|
361
|
+
middlewareData: u
|
|
362
362
|
};
|
|
363
363
|
};
|
|
364
364
|
async function We(t, e) {
|
|
@@ -373,37 +373,37 @@ async function We(t, e) {
|
|
|
373
373
|
strategy: a
|
|
374
374
|
} = t, {
|
|
375
375
|
boundary: c = "clippingAncestors",
|
|
376
|
-
rootBoundary:
|
|
377
|
-
elementContext:
|
|
376
|
+
rootBoundary: f = "viewport",
|
|
377
|
+
elementContext: d = "floating",
|
|
378
378
|
altBoundary: m = !1,
|
|
379
|
-
padding:
|
|
380
|
-
} = Ot(e, t), p = Ne(
|
|
379
|
+
padding: u = 0
|
|
380
|
+
} = Ot(e, t), p = Ne(u), g = l[m ? d === "floating" ? "reference" : "floating" : d], v = ft(await i.getClippingRect({
|
|
381
381
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(g))) == null || n ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
382
382
|
boundary: c,
|
|
383
|
-
rootBoundary:
|
|
383
|
+
rootBoundary: f,
|
|
384
384
|
strategy: a
|
|
385
|
-
})), y =
|
|
385
|
+
})), y = d === "floating" ? {
|
|
386
386
|
x: o,
|
|
387
387
|
y: s,
|
|
388
388
|
width: r.floating.width,
|
|
389
389
|
height: r.floating.height
|
|
390
|
-
} : r.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)),
|
|
390
|
+
} : r.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), C = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
391
391
|
x: 1,
|
|
392
392
|
y: 1
|
|
393
393
|
} : {
|
|
394
394
|
x: 1,
|
|
395
395
|
y: 1
|
|
396
|
-
}, S =
|
|
396
|
+
}, S = ft(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
397
397
|
elements: l,
|
|
398
398
|
rect: y,
|
|
399
399
|
offsetParent: b,
|
|
400
400
|
strategy: a
|
|
401
401
|
}) : y);
|
|
402
402
|
return {
|
|
403
|
-
top: (v.top - S.top + p.top) /
|
|
404
|
-
bottom: (S.bottom - v.bottom + p.bottom) /
|
|
405
|
-
left: (v.left - S.left + p.left) /
|
|
406
|
-
right: (S.right - v.right + p.right) /
|
|
403
|
+
top: (v.top - S.top + p.top) / C.y,
|
|
404
|
+
bottom: (S.bottom - v.bottom + p.bottom) / C.y,
|
|
405
|
+
left: (v.left - S.left + p.left) / C.x,
|
|
406
|
+
right: (S.right - v.right + p.right) / C.x
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
const He = function(t) {
|
|
@@ -420,22 +420,22 @@ const He = function(t) {
|
|
|
420
420
|
platform: a,
|
|
421
421
|
elements: c
|
|
422
422
|
} = e, {
|
|
423
|
-
mainAxis:
|
|
424
|
-
crossAxis:
|
|
423
|
+
mainAxis: f = !0,
|
|
424
|
+
crossAxis: d = !0,
|
|
425
425
|
fallbackPlacements: m,
|
|
426
|
-
fallbackStrategy:
|
|
426
|
+
fallbackStrategy: u = "bestFit",
|
|
427
427
|
fallbackAxisSideDirection: p = "none",
|
|
428
428
|
flipAlignment: h = !0,
|
|
429
429
|
...g
|
|
430
430
|
} = Ot(t, e);
|
|
431
431
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
432
432
|
return {};
|
|
433
|
-
const v = Z(s), y = W(l), b = Z(l) === l,
|
|
434
|
-
!m && V && S.push(...Ve(l, h, p,
|
|
433
|
+
const v = Z(s), y = W(l), b = Z(l) === l, C = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), S = m || (b || !h ? [ut(l)] : De(l)), V = p !== "none";
|
|
434
|
+
!m && V && S.push(...Ve(l, h, p, C));
|
|
435
435
|
const x = [l, ...S], A = await We(e, g), F = [];
|
|
436
436
|
let U = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
437
|
-
if (
|
|
438
|
-
const N = Pe(s, r,
|
|
437
|
+
if (f && F.push(A[v]), d) {
|
|
438
|
+
const N = Pe(s, r, C);
|
|
439
439
|
F.push(A[N[0]], A[N[1]]);
|
|
440
440
|
}
|
|
441
441
|
if (U = [...U, {
|
|
@@ -443,8 +443,8 @@ const He = function(t) {
|
|
|
443
443
|
overflows: F
|
|
444
444
|
}], !F.every((N) => N <= 0)) {
|
|
445
445
|
var Bt, Pt;
|
|
446
|
-
const N = (((Bt = i.flip) == null ? void 0 : Bt.index) || 0) + 1,
|
|
447
|
-
if (
|
|
446
|
+
const N = (((Bt = i.flip) == null ? void 0 : Bt.index) || 0) + 1, yt = x[N];
|
|
447
|
+
if (yt && (!(d === "alignment" ? y !== W(yt) : !1) || // We leave the current main axis only if every placement on that axis
|
|
448
448
|
// overflows the main axis.
|
|
449
449
|
U.every((O) => W(O.placement) === y ? O.overflows[0] > 0 : !0)))
|
|
450
450
|
return {
|
|
@@ -453,12 +453,12 @@ const He = function(t) {
|
|
|
453
453
|
overflows: U
|
|
454
454
|
},
|
|
455
455
|
reset: {
|
|
456
|
-
placement:
|
|
456
|
+
placement: yt
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
let et = (Pt = U.filter((I) => I.overflows[0] <= 0).sort((I, O) => I.overflows[1] - O.overflows[1])[0]) == null ? void 0 : Pt.placement;
|
|
460
460
|
if (!et)
|
|
461
|
-
switch (
|
|
461
|
+
switch (u) {
|
|
462
462
|
case "bestFit": {
|
|
463
463
|
var Dt;
|
|
464
464
|
const I = (Dt = U.filter((O) => {
|
|
@@ -493,26 +493,26 @@ async function Xe(t, e) {
|
|
|
493
493
|
placement: n,
|
|
494
494
|
platform: o,
|
|
495
495
|
elements: s
|
|
496
|
-
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = Z(n), l =
|
|
496
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = Z(n), l = pt(n), a = W(n) === "y", c = je.has(r) ? -1 : 1, f = i && a ? -1 : 1, d = Ot(e, t);
|
|
497
497
|
let {
|
|
498
498
|
mainAxis: m,
|
|
499
|
-
crossAxis:
|
|
499
|
+
crossAxis: u,
|
|
500
500
|
alignmentAxis: p
|
|
501
|
-
} = typeof
|
|
502
|
-
mainAxis:
|
|
501
|
+
} = typeof d == "number" ? {
|
|
502
|
+
mainAxis: d,
|
|
503
503
|
crossAxis: 0,
|
|
504
504
|
alignmentAxis: null
|
|
505
505
|
} : {
|
|
506
|
-
mainAxis:
|
|
507
|
-
crossAxis:
|
|
508
|
-
alignmentAxis:
|
|
506
|
+
mainAxis: d.mainAxis || 0,
|
|
507
|
+
crossAxis: d.crossAxis || 0,
|
|
508
|
+
alignmentAxis: d.alignmentAxis
|
|
509
509
|
};
|
|
510
|
-
return l && typeof p == "number" && (
|
|
511
|
-
x:
|
|
510
|
+
return l && typeof p == "number" && (u = l === "end" ? p * -1 : p), a ? {
|
|
511
|
+
x: u * f,
|
|
512
512
|
y: m * c
|
|
513
513
|
} : {
|
|
514
514
|
x: m * c,
|
|
515
|
-
y:
|
|
515
|
+
y: u * f
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
const Ue = function(t) {
|
|
@@ -538,11 +538,11 @@ const Ue = function(t) {
|
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
};
|
|
541
|
-
function
|
|
541
|
+
function mt() {
|
|
542
542
|
return typeof window < "u";
|
|
543
543
|
}
|
|
544
544
|
function X(t) {
|
|
545
|
-
return
|
|
545
|
+
return Tt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
546
546
|
}
|
|
547
547
|
function L(t) {
|
|
548
548
|
var e;
|
|
@@ -550,19 +550,19 @@ function L(t) {
|
|
|
550
550
|
}
|
|
551
551
|
function P(t) {
|
|
552
552
|
var e;
|
|
553
|
-
return (e = (
|
|
553
|
+
return (e = (Tt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
return
|
|
555
|
+
function Tt(t) {
|
|
556
|
+
return mt() ? t instanceof Node || t instanceof L(t).Node : !1;
|
|
557
557
|
}
|
|
558
558
|
function E(t) {
|
|
559
|
-
return
|
|
559
|
+
return mt() ? t instanceof Element || t instanceof L(t).Element : !1;
|
|
560
560
|
}
|
|
561
561
|
function B(t) {
|
|
562
|
-
return
|
|
562
|
+
return mt() ? t instanceof HTMLElement || t instanceof L(t).HTMLElement : !1;
|
|
563
563
|
}
|
|
564
564
|
function Ft(t) {
|
|
565
|
-
return !
|
|
565
|
+
return !mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof L(t).ShadowRoot;
|
|
566
566
|
}
|
|
567
567
|
const Ye = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
568
568
|
function rt(t) {
|
|
@@ -579,7 +579,7 @@ function Ge(t) {
|
|
|
579
579
|
return Ke.has(X(t));
|
|
580
580
|
}
|
|
581
581
|
const Je = [":popover-open", ":modal"];
|
|
582
|
-
function
|
|
582
|
+
function ht(t) {
|
|
583
583
|
return Je.some((e) => {
|
|
584
584
|
try {
|
|
585
585
|
return t.matches(e);
|
|
@@ -589,16 +589,16 @@ function mt(t) {
|
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
const Qe = ["transform", "translate", "scale", "rotate", "perspective"], Ze = ["transform", "translate", "scale", "rotate", "perspective", "filter"], tn = ["paint", "layout", "strict", "content"];
|
|
592
|
-
function
|
|
592
|
+
function _t(t) {
|
|
593
593
|
const e = Et(), n = E(t) ? $(t) : t;
|
|
594
594
|
return Qe.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) || Ze.some((o) => (n.willChange || "").includes(o)) || tn.some((o) => (n.contain || "").includes(o));
|
|
595
595
|
}
|
|
596
596
|
function en(t) {
|
|
597
597
|
let e = z(t);
|
|
598
598
|
for (; B(e) && !tt(e); ) {
|
|
599
|
-
if (
|
|
599
|
+
if (_t(e))
|
|
600
600
|
return e;
|
|
601
|
-
if (
|
|
601
|
+
if (ht(e))
|
|
602
602
|
return null;
|
|
603
603
|
e = z(e);
|
|
604
604
|
}
|
|
@@ -614,7 +614,7 @@ function tt(t) {
|
|
|
614
614
|
function $(t) {
|
|
615
615
|
return L(t).getComputedStyle(t);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function gt(t) {
|
|
618
618
|
return E(t) ? {
|
|
619
619
|
scrollLeft: t.scrollLeft,
|
|
620
620
|
scrollTop: t.scrollTop
|
|
@@ -644,18 +644,18 @@ function it(t, e, n) {
|
|
|
644
644
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
645
645
|
const s = Qt(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r = L(s);
|
|
646
646
|
if (i) {
|
|
647
|
-
const l =
|
|
647
|
+
const l = At(r);
|
|
648
648
|
return e.concat(r, r.visualViewport || [], rt(s) ? s : [], l && n ? it(l) : []);
|
|
649
649
|
}
|
|
650
650
|
return e.concat(s, it(s, [], n));
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function At(t) {
|
|
653
653
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
654
654
|
}
|
|
655
655
|
function Zt(t) {
|
|
656
656
|
const e = $(t);
|
|
657
657
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
658
|
-
const s = B(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, l =
|
|
658
|
+
const s = B(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, l = at(n) !== i || at(o) !== r;
|
|
659
659
|
return l && (n = i, o = r), {
|
|
660
660
|
width: n,
|
|
661
661
|
height: o,
|
|
@@ -674,7 +674,7 @@ function G(t) {
|
|
|
674
674
|
height: s,
|
|
675
675
|
$: i
|
|
676
676
|
} = Zt(e);
|
|
677
|
-
let r = (i ?
|
|
677
|
+
let r = (i ? at(n.width) : n.width) / o, l = (i ? at(n.height) : n.height) / s;
|
|
678
678
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
679
679
|
x: r,
|
|
680
680
|
y: l
|
|
@@ -697,28 +697,28 @@ function j(t, e, n, o) {
|
|
|
697
697
|
let r = k(1);
|
|
698
698
|
e && (o ? E(o) && (r = G(o)) : r = G(t));
|
|
699
699
|
const l = sn(i, n, o) ? te(i) : k(0);
|
|
700
|
-
let a = (s.left + l.x) / r.x, c = (s.top + l.y) / r.y,
|
|
700
|
+
let a = (s.left + l.x) / r.x, c = (s.top + l.y) / r.y, f = s.width / r.x, d = s.height / r.y;
|
|
701
701
|
if (i) {
|
|
702
|
-
const m = L(i),
|
|
703
|
-
let p = m, h =
|
|
704
|
-
for (; h && o &&
|
|
705
|
-
const g = G(h), v = h.getBoundingClientRect(), y = $(h), b = v.left + (h.clientLeft + parseFloat(y.paddingLeft)) * g.x,
|
|
706
|
-
a *= g.x, c *= g.y,
|
|
702
|
+
const m = L(i), u = o && E(o) ? L(o) : o;
|
|
703
|
+
let p = m, h = At(p);
|
|
704
|
+
for (; h && o && u !== p; ) {
|
|
705
|
+
const g = G(h), v = h.getBoundingClientRect(), y = $(h), b = v.left + (h.clientLeft + parseFloat(y.paddingLeft)) * g.x, C = v.top + (h.clientTop + parseFloat(y.paddingTop)) * g.y;
|
|
706
|
+
a *= g.x, c *= g.y, f *= g.x, d *= g.y, a += b, c += C, p = L(h), h = At(p);
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
return
|
|
710
|
-
width:
|
|
711
|
-
height:
|
|
709
|
+
return ft({
|
|
710
|
+
width: f,
|
|
711
|
+
height: d,
|
|
712
712
|
x: a,
|
|
713
713
|
y: c
|
|
714
714
|
});
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
const n =
|
|
716
|
+
function vt(t, e) {
|
|
717
|
+
const n = gt(t).scrollLeft;
|
|
718
718
|
return e ? e.left + n : j(P(t)).left + n;
|
|
719
719
|
}
|
|
720
720
|
function ee(t, e) {
|
|
721
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft -
|
|
721
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - vt(t, n), s = n.top + e.scrollTop;
|
|
722
722
|
return {
|
|
723
723
|
x: o,
|
|
724
724
|
y: s
|
|
@@ -731,32 +731,32 @@ function rn(t) {
|
|
|
731
731
|
offsetParent: o,
|
|
732
732
|
strategy: s
|
|
733
733
|
} = t;
|
|
734
|
-
const i = s === "fixed", r = P(o), l = e ?
|
|
734
|
+
const i = s === "fixed", r = P(o), l = e ? ht(e.floating) : !1;
|
|
735
735
|
if (o === r || l && i)
|
|
736
736
|
return n;
|
|
737
737
|
let a = {
|
|
738
738
|
scrollLeft: 0,
|
|
739
739
|
scrollTop: 0
|
|
740
740
|
}, c = k(1);
|
|
741
|
-
const
|
|
742
|
-
if ((
|
|
743
|
-
const
|
|
744
|
-
c = G(o),
|
|
741
|
+
const f = k(0), d = B(o);
|
|
742
|
+
if ((d || !d && !i) && ((X(o) !== "body" || rt(r)) && (a = gt(o)), B(o))) {
|
|
743
|
+
const u = j(o);
|
|
744
|
+
c = G(o), f.x = u.x + o.clientLeft, f.y = u.y + o.clientTop;
|
|
745
745
|
}
|
|
746
|
-
const m = r && !
|
|
746
|
+
const m = r && !d && !i ? ee(r, a) : k(0);
|
|
747
747
|
return {
|
|
748
748
|
width: n.width * c.x,
|
|
749
749
|
height: n.height * c.y,
|
|
750
|
-
x: n.x * c.x - a.scrollLeft * c.x +
|
|
751
|
-
y: n.y * c.y - a.scrollTop * c.y +
|
|
750
|
+
x: n.x * c.x - a.scrollLeft * c.x + f.x + m.x,
|
|
751
|
+
y: n.y * c.y - a.scrollTop * c.y + f.y + m.y
|
|
752
752
|
};
|
|
753
753
|
}
|
|
754
754
|
function ln(t) {
|
|
755
755
|
return Array.from(t.getClientRects());
|
|
756
756
|
}
|
|
757
757
|
function cn(t) {
|
|
758
|
-
const e = P(t), n =
|
|
759
|
-
let r = -n.scrollLeft +
|
|
758
|
+
const e = P(t), n = gt(t), o = t.ownerDocument.body, s = K(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = K(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
759
|
+
let r = -n.scrollLeft + vt(t);
|
|
760
760
|
const l = -n.scrollTop;
|
|
761
761
|
return $(o).direction === "rtl" && (r += K(e.clientWidth, o.clientWidth) - s), {
|
|
762
762
|
width: s,
|
|
@@ -771,12 +771,12 @@ function an(t, e) {
|
|
|
771
771
|
let i = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
772
772
|
if (s) {
|
|
773
773
|
i = s.width, r = s.height;
|
|
774
|
-
const
|
|
775
|
-
(!
|
|
774
|
+
const f = Et();
|
|
775
|
+
(!f || f && e === "fixed") && (l = s.offsetLeft, a = s.offsetTop);
|
|
776
776
|
}
|
|
777
|
-
const c =
|
|
777
|
+
const c = vt(o);
|
|
778
778
|
if (c <= 0) {
|
|
779
|
-
const
|
|
779
|
+
const f = o.ownerDocument, d = f.body, m = getComputedStyle(d), u = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(o.clientWidth - d.clientWidth - u);
|
|
780
780
|
p <= Nt && (i -= p);
|
|
781
781
|
} else c <= Nt && (i += c);
|
|
782
782
|
return {
|
|
@@ -813,7 +813,7 @@ function It(t, e, n) {
|
|
|
813
813
|
height: e.height
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
return
|
|
816
|
+
return ft(o);
|
|
817
817
|
}
|
|
818
818
|
function ne(t, e) {
|
|
819
819
|
const n = z(t);
|
|
@@ -827,8 +827,8 @@ function dn(t, e) {
|
|
|
827
827
|
const i = $(t).position === "fixed";
|
|
828
828
|
let r = i ? z(t) : t;
|
|
829
829
|
for (; E(r) && !tt(r); ) {
|
|
830
|
-
const l = $(r), a =
|
|
831
|
-
!a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && un.has(s.position) || rt(r) && !a && ne(t, r)) ? o = o.filter((
|
|
830
|
+
const l = $(r), a = _t(r);
|
|
831
|
+
!a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && un.has(s.position) || rt(r) && !a && ne(t, r)) ? o = o.filter((f) => f !== r) : s = l, r = z(r);
|
|
832
832
|
}
|
|
833
833
|
return e.set(t, o), o;
|
|
834
834
|
}
|
|
@@ -839,9 +839,9 @@ function pn(t) {
|
|
|
839
839
|
rootBoundary: o,
|
|
840
840
|
strategy: s
|
|
841
841
|
} = t;
|
|
842
|
-
const r = [...n === "clippingAncestors" ?
|
|
843
|
-
const
|
|
844
|
-
return c.top = K(
|
|
842
|
+
const r = [...n === "clippingAncestors" ? ht(e) ? [] : dn(e, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, f) => {
|
|
843
|
+
const d = It(e, f, s);
|
|
844
|
+
return c.top = K(d.top, c.top), c.right = Rt(d.right, c.right), c.bottom = Rt(d.bottom, c.bottom), c.left = K(d.left, c.left), c;
|
|
845
845
|
}, It(e, l, s));
|
|
846
846
|
return {
|
|
847
847
|
width: a.right - a.left,
|
|
@@ -868,23 +868,23 @@ function hn(t, e, n) {
|
|
|
868
868
|
};
|
|
869
869
|
const a = k(0);
|
|
870
870
|
function c() {
|
|
871
|
-
a.x =
|
|
871
|
+
a.x = vt(s);
|
|
872
872
|
}
|
|
873
873
|
if (o || !o && !i)
|
|
874
|
-
if ((X(e) !== "body" || rt(s)) && (l =
|
|
875
|
-
const
|
|
876
|
-
a.x =
|
|
874
|
+
if ((X(e) !== "body" || rt(s)) && (l = gt(e)), o) {
|
|
875
|
+
const u = j(e, !0, i, e);
|
|
876
|
+
a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
|
|
877
877
|
} else s && c();
|
|
878
878
|
i && !o && s && c();
|
|
879
|
-
const
|
|
879
|
+
const f = s && !o && !i ? ee(s, l) : k(0), d = r.left + l.scrollLeft - a.x - f.x, m = r.top + l.scrollTop - a.y - f.y;
|
|
880
880
|
return {
|
|
881
|
-
x:
|
|
881
|
+
x: d,
|
|
882
882
|
y: m,
|
|
883
883
|
width: r.width,
|
|
884
884
|
height: r.height
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function xt(t) {
|
|
888
888
|
return $(t).position === "static";
|
|
889
889
|
}
|
|
890
890
|
function Wt(t, e) {
|
|
@@ -897,21 +897,21 @@ function Wt(t, e) {
|
|
|
897
897
|
}
|
|
898
898
|
function oe(t, e) {
|
|
899
899
|
const n = L(t);
|
|
900
|
-
if (
|
|
900
|
+
if (ht(t))
|
|
901
901
|
return n;
|
|
902
902
|
if (!B(t)) {
|
|
903
903
|
let s = z(t);
|
|
904
904
|
for (; s && !tt(s); ) {
|
|
905
|
-
if (E(s) && !
|
|
905
|
+
if (E(s) && !xt(s))
|
|
906
906
|
return s;
|
|
907
907
|
s = z(s);
|
|
908
908
|
}
|
|
909
909
|
return n;
|
|
910
910
|
}
|
|
911
911
|
let o = Wt(t, e);
|
|
912
|
-
for (; o && Ge(o) &&
|
|
912
|
+
for (; o && Ge(o) && xt(o); )
|
|
913
913
|
o = Wt(o, e);
|
|
914
|
-
return o && tt(o) &&
|
|
914
|
+
return o && tt(o) && xt(o) && !_t(o) ? n : o || en(t) || n;
|
|
915
915
|
}
|
|
916
916
|
const gn = async function(t) {
|
|
917
917
|
const e = this.getOffsetParent || oe, n = this.getDimensions, o = await n(t.floating);
|
|
@@ -953,28 +953,28 @@ function wn(t, e) {
|
|
|
953
953
|
function r(l, a) {
|
|
954
954
|
l === void 0 && (l = !1), a === void 0 && (a = 1), i();
|
|
955
955
|
const c = t.getBoundingClientRect(), {
|
|
956
|
-
left:
|
|
957
|
-
top:
|
|
956
|
+
left: f,
|
|
957
|
+
top: d,
|
|
958
958
|
width: m,
|
|
959
|
-
height:
|
|
959
|
+
height: u
|
|
960
960
|
} = c;
|
|
961
|
-
if (l || e(), !m || !
|
|
961
|
+
if (l || e(), !m || !u)
|
|
962
962
|
return;
|
|
963
|
-
const p = lt(
|
|
963
|
+
const p = lt(d), h = lt(s.clientWidth - (f + m)), g = lt(s.clientHeight - (d + u)), v = lt(f), b = {
|
|
964
964
|
rootMargin: -p + "px " + -h + "px " + -g + "px " + -v + "px",
|
|
965
965
|
threshold: K(0, Rt(1, a)) || 1
|
|
966
966
|
};
|
|
967
|
-
let
|
|
967
|
+
let C = !0;
|
|
968
968
|
function S(V) {
|
|
969
969
|
const x = V[0].intersectionRatio;
|
|
970
970
|
if (x !== a) {
|
|
971
|
-
if (!
|
|
971
|
+
if (!C)
|
|
972
972
|
return r();
|
|
973
973
|
x ? r(!1, x) : o = setTimeout(() => {
|
|
974
974
|
r(!1, 1e-7);
|
|
975
975
|
}, 1e3);
|
|
976
976
|
}
|
|
977
|
-
x === 1 && !se(c, t.getBoundingClientRect()) && r(),
|
|
977
|
+
x === 1 && !se(c, t.getBoundingClientRect()) && r(), C = !1;
|
|
978
978
|
}
|
|
979
979
|
try {
|
|
980
980
|
n = new IntersectionObserver(S, {
|
|
@@ -997,21 +997,21 @@ function xn(t, e, n, o) {
|
|
|
997
997
|
elementResize: r = typeof ResizeObserver == "function",
|
|
998
998
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
999
999
|
animationFrame: a = !1
|
|
1000
|
-
} = o, c = $t(t),
|
|
1001
|
-
|
|
1000
|
+
} = o, c = $t(t), f = s || i ? [...c ? it(c) : [], ...it(e)] : [];
|
|
1001
|
+
f.forEach((v) => {
|
|
1002
1002
|
s && v.addEventListener("scroll", n, {
|
|
1003
1003
|
passive: !0
|
|
1004
1004
|
}), i && v.addEventListener("resize", n);
|
|
1005
1005
|
});
|
|
1006
|
-
const
|
|
1007
|
-
let m = -1,
|
|
1008
|
-
r && (
|
|
1006
|
+
const d = c && l ? wn(c, n) : null;
|
|
1007
|
+
let m = -1, u = null;
|
|
1008
|
+
r && (u = new ResizeObserver((v) => {
|
|
1009
1009
|
let [y] = v;
|
|
1010
|
-
y && y.target === c &&
|
|
1010
|
+
y && y.target === c && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1011
1011
|
var b;
|
|
1012
|
-
(b =
|
|
1012
|
+
(b = u) == null || b.observe(e);
|
|
1013
1013
|
})), n();
|
|
1014
|
-
}), c && !a &&
|
|
1014
|
+
}), c && !a && u.observe(c), u.observe(e));
|
|
1015
1015
|
let p, h = a ? j(t) : null;
|
|
1016
1016
|
a && g();
|
|
1017
1017
|
function g() {
|
|
@@ -1020,12 +1020,12 @@ function xn(t, e, n, o) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
return n(), () => {
|
|
1022
1022
|
var v;
|
|
1023
|
-
|
|
1023
|
+
f.forEach((y) => {
|
|
1024
1024
|
s && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
|
|
1025
|
-
}),
|
|
1025
|
+
}), d == null || d(), (v = u) == null || v.disconnect(), u = null, a && cancelAnimationFrame(p);
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
|
-
const bn = Ue, Sn = He,
|
|
1028
|
+
const bn = Ue, Sn = He, Cn = (t, e, n) => {
|
|
1029
1029
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1030
1030
|
platform: yn,
|
|
1031
1031
|
...n
|
|
@@ -1038,13 +1038,13 @@ const bn = Ue, Sn = He, Rn = (t, e, n) => {
|
|
|
1038
1038
|
platform: i
|
|
1039
1039
|
});
|
|
1040
1040
|
};
|
|
1041
|
-
function
|
|
1041
|
+
function Rn(t) {
|
|
1042
1042
|
return t != null && typeof t == "object" && "$el" in t;
|
|
1043
1043
|
}
|
|
1044
1044
|
function Ht(t) {
|
|
1045
|
-
if (
|
|
1045
|
+
if (Rn(t)) {
|
|
1046
1046
|
const e = t.$el;
|
|
1047
|
-
return
|
|
1047
|
+
return Tt(e) && X(e) === "#comment" ? null : e;
|
|
1048
1048
|
}
|
|
1049
1049
|
return t;
|
|
1050
1050
|
}
|
|
@@ -1072,66 +1072,66 @@ function Ln(t, e, n) {
|
|
|
1072
1072
|
}), a = w(() => {
|
|
1073
1073
|
var x;
|
|
1074
1074
|
return (x = ot(n.transform)) != null ? x : !0;
|
|
1075
|
-
}), c = w(() => Ht(t.value)),
|
|
1075
|
+
}), c = w(() => Ht(t.value)), f = w(() => Ht(e.value)), d = nt(0), m = nt(0), u = nt(l.value), p = nt(r.value), h = Ct({}), g = nt(!1), v = w(() => {
|
|
1076
1076
|
const x = {
|
|
1077
|
-
position:
|
|
1077
|
+
position: u.value,
|
|
1078
1078
|
left: "0",
|
|
1079
1079
|
top: "0"
|
|
1080
1080
|
};
|
|
1081
|
-
if (!
|
|
1081
|
+
if (!f.value)
|
|
1082
1082
|
return x;
|
|
1083
|
-
const A = jt(
|
|
1083
|
+
const A = jt(f.value, d.value), F = jt(f.value, m.value);
|
|
1084
1084
|
return a.value ? {
|
|
1085
1085
|
...x,
|
|
1086
1086
|
transform: "translate(" + A + "px, " + F + "px)",
|
|
1087
|
-
...ie(
|
|
1087
|
+
...ie(f.value) >= 1.5 && {
|
|
1088
1088
|
willChange: "transform"
|
|
1089
1089
|
}
|
|
1090
1090
|
} : {
|
|
1091
|
-
position:
|
|
1091
|
+
position: u.value,
|
|
1092
1092
|
left: A + "px",
|
|
1093
1093
|
top: F + "px"
|
|
1094
1094
|
};
|
|
1095
1095
|
});
|
|
1096
1096
|
let y;
|
|
1097
1097
|
function b() {
|
|
1098
|
-
if (c.value == null ||
|
|
1098
|
+
if (c.value == null || f.value == null)
|
|
1099
1099
|
return;
|
|
1100
1100
|
const x = s.value;
|
|
1101
|
-
|
|
1101
|
+
Cn(c.value, f.value, {
|
|
1102
1102
|
middleware: i.value,
|
|
1103
1103
|
placement: r.value,
|
|
1104
1104
|
strategy: l.value
|
|
1105
1105
|
}).then((A) => {
|
|
1106
|
-
|
|
1106
|
+
d.value = A.x, m.value = A.y, u.value = A.strategy, p.value = A.placement, h.value = A.middlewareData, g.value = x !== !1;
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function C() {
|
|
1110
1110
|
typeof y == "function" && (y(), y = void 0);
|
|
1111
1111
|
}
|
|
1112
1112
|
function S() {
|
|
1113
|
-
if (
|
|
1113
|
+
if (C(), o === void 0) {
|
|
1114
1114
|
b();
|
|
1115
1115
|
return;
|
|
1116
1116
|
}
|
|
1117
|
-
if (c.value != null &&
|
|
1118
|
-
y = o(c.value,
|
|
1117
|
+
if (c.value != null && f.value != null) {
|
|
1118
|
+
y = o(c.value, f.value, b);
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
1122
|
function V() {
|
|
1123
1123
|
s.value || (g.value = !1);
|
|
1124
1124
|
}
|
|
1125
|
-
return
|
|
1125
|
+
return wt([i, r, l, s], b, {
|
|
1126
1126
|
flush: "sync"
|
|
1127
|
-
}),
|
|
1127
|
+
}), wt([c, f], S, {
|
|
1128
1128
|
flush: "sync"
|
|
1129
|
-
}),
|
|
1129
|
+
}), wt(s, V, {
|
|
1130
1130
|
flush: "sync"
|
|
1131
|
-
}), ue() && fe(
|
|
1132
|
-
x: Y(
|
|
1131
|
+
}), ue() && fe(C), {
|
|
1132
|
+
x: Y(d),
|
|
1133
1133
|
y: Y(m),
|
|
1134
|
-
strategy: Y(
|
|
1134
|
+
strategy: Y(u),
|
|
1135
1135
|
placement: Y(p),
|
|
1136
1136
|
middlewareData: Y(h),
|
|
1137
1137
|
isPositioned: Y(g),
|
|
@@ -1141,7 +1141,7 @@ function Ln(t, e, n) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
const En = /* @__PURE__ */ M({
|
|
1143
1143
|
__name: "SqPopover",
|
|
1144
|
-
props: /* @__PURE__ */
|
|
1144
|
+
props: /* @__PURE__ */ St({
|
|
1145
1145
|
placement: { default: "top" },
|
|
1146
1146
|
offset: { default: 10 },
|
|
1147
1147
|
teleported: { type: Boolean, default: !0 },
|
|
@@ -1151,69 +1151,70 @@ const En = /* @__PURE__ */ M({
|
|
|
1151
1151
|
disabled: { type: Boolean },
|
|
1152
1152
|
popoverClass: {}
|
|
1153
1153
|
}, {
|
|
1154
|
-
visible: { type: Boolean },
|
|
1154
|
+
visible: { type: Boolean, default: !1 },
|
|
1155
1155
|
visibleModifiers: {}
|
|
1156
1156
|
}),
|
|
1157
1157
|
emits: ["update:visible"],
|
|
1158
1158
|
setup(t) {
|
|
1159
1159
|
let e;
|
|
1160
|
-
const n = t, o =
|
|
1160
|
+
const n = t, o = Ct(null), s = Ct(null), i = Yt(t, "visible"), { floatingStyles: r } = Ln(o, s, {
|
|
1161
1161
|
placement: n.placement,
|
|
1162
1162
|
whileElementsMounted: xn,
|
|
1163
1163
|
transform: !1,
|
|
1164
1164
|
middleware: [bn(n.offset), Sn()]
|
|
1165
1165
|
});
|
|
1166
1166
|
de(() => {
|
|
1167
|
-
m(), document.removeEventListener("click",
|
|
1167
|
+
m(), document.removeEventListener("click", d);
|
|
1168
1168
|
});
|
|
1169
1169
|
function l() {
|
|
1170
1170
|
n.trigger !== "hover" || n.disabled || (m(), e = setTimeout(() => {
|
|
1171
|
-
|
|
1171
|
+
f(!1);
|
|
1172
1172
|
}, n.showAfter));
|
|
1173
1173
|
}
|
|
1174
1174
|
function a() {
|
|
1175
1175
|
n.trigger === "hover" && (m(), e = setTimeout(() => {
|
|
1176
|
-
|
|
1176
|
+
d();
|
|
1177
1177
|
}, n.hideAfter));
|
|
1178
1178
|
}
|
|
1179
1179
|
function c() {
|
|
1180
|
-
n.trigger === "click" && (i.value ?
|
|
1180
|
+
n.trigger === "click" && (i.value ? d() : n.disabled || f());
|
|
1181
1181
|
}
|
|
1182
|
-
function u
|
|
1183
|
-
i.value = !0, document.addEventListener("click",
|
|
1182
|
+
function f(u = !0) {
|
|
1183
|
+
i.value = !0, u && document.addEventListener("click", d);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1186
|
-
i.value = !1, document.removeEventListener("click",
|
|
1185
|
+
function d() {
|
|
1186
|
+
i.value = !1, document.removeEventListener("click", d);
|
|
1187
1187
|
}
|
|
1188
1188
|
function m() {
|
|
1189
1189
|
e && (clearTimeout(e), e = void 0);
|
|
1190
1190
|
}
|
|
1191
|
-
return (
|
|
1191
|
+
return (u, p) => (R(), T(pe, null, [
|
|
1192
1192
|
J("span", {
|
|
1193
|
-
class: D(["sq-popover-trigger",
|
|
1193
|
+
class: D(["sq-popover-trigger", u.$attrs.class]),
|
|
1194
|
+
style: ct(u.$attrs.style),
|
|
1194
1195
|
ref_key: "triggerRef",
|
|
1195
1196
|
ref: o,
|
|
1196
1197
|
onMouseenter: l,
|
|
1197
1198
|
onMouseleave: a,
|
|
1198
1199
|
onClick: qt(c, ["stop"])
|
|
1199
1200
|
}, [
|
|
1200
|
-
|
|
1201
|
-
],
|
|
1202
|
-
(
|
|
1201
|
+
_(u.$slots, "reference")
|
|
1202
|
+
], 38),
|
|
1203
|
+
(R(), Q(me, {
|
|
1203
1204
|
to: "body",
|
|
1204
1205
|
disabled: !n.teleported
|
|
1205
1206
|
}, [
|
|
1206
1207
|
Xt(he, { name: "sq-fade" }, {
|
|
1207
|
-
default:
|
|
1208
|
+
default: dt(() => [
|
|
1208
1209
|
Kt(J("div", {
|
|
1209
|
-
class: D(["sq-popover",
|
|
1210
|
+
class: D(["sq-popover", u.popoverClass]),
|
|
1210
1211
|
ref_key: "popverRef",
|
|
1211
1212
|
ref: s,
|
|
1212
|
-
style:
|
|
1213
|
+
style: ct(H(r)),
|
|
1213
1214
|
onClick: p[0] || (p[0] = qt(() => {
|
|
1214
1215
|
}, ["stop"]))
|
|
1215
1216
|
}, [
|
|
1216
|
-
|
|
1217
|
+
_(u.$slots, "default")
|
|
1217
1218
|
], 6), [
|
|
1218
1219
|
[ge, i.value]
|
|
1219
1220
|
])
|
|
@@ -1244,9 +1245,9 @@ const En = /* @__PURE__ */ M({
|
|
|
1244
1245
|
}
|
|
1245
1246
|
return i;
|
|
1246
1247
|
});
|
|
1247
|
-
return (i, r) => (
|
|
1248
|
+
return (i, r) => (R(), T("div", {
|
|
1248
1249
|
class: D(["sq-progress", n.value]),
|
|
1249
|
-
style:
|
|
1250
|
+
style: ct(s.value)
|
|
1250
1251
|
}, null, 6));
|
|
1251
1252
|
}
|
|
1252
1253
|
}), kn = /* @__PURE__ */ M({
|
|
@@ -1262,12 +1263,12 @@ const En = /* @__PURE__ */ M({
|
|
|
1262
1263
|
const s = [];
|
|
1263
1264
|
return e.size !== "md" && s.push(`sq-tag--${e.size}`), e.theme !== "materialize" && e.type && s.push(`is-${e.theme}`), e.type && s.push(`is-${e.type}`), e.round && s.push("is-round"), s;
|
|
1264
1265
|
}), o = w(() => e.size === "lg" ? "md" : "sm");
|
|
1265
|
-
return (s, i) => (
|
|
1266
|
+
return (s, i) => (R(), Q(H(kt), {
|
|
1266
1267
|
class: D(["sq-tag", n.value]),
|
|
1267
1268
|
size: o.value
|
|
1268
1269
|
}, {
|
|
1269
|
-
default:
|
|
1270
|
-
|
|
1270
|
+
default: dt(() => [
|
|
1271
|
+
_(s.$slots, "default")
|
|
1271
1272
|
]),
|
|
1272
1273
|
_: 3
|
|
1273
1274
|
}, 8, ["class", "size"]));
|
|
@@ -1286,13 +1287,13 @@ const En = /* @__PURE__ */ M({
|
|
|
1286
1287
|
const r = [];
|
|
1287
1288
|
return o.size !== "md" && r.push(`sq-tag--${o.size}`), o.type && r.push(`is-${o.type}`), o.round && r.push("is-round"), o.checked && r.push("is-checked"), r;
|
|
1288
1289
|
}), i = w(() => o.size === "lg" ? "md" : "sm");
|
|
1289
|
-
return (r, l) => (
|
|
1290
|
+
return (r, l) => (R(), Q(H(kt), {
|
|
1290
1291
|
class: D(["sq-check-tag", s.value]),
|
|
1291
1292
|
size: i.value,
|
|
1292
1293
|
onClick: l[0] || (l[0] = (a) => n("change", !o.checked))
|
|
1293
1294
|
}, {
|
|
1294
|
-
default:
|
|
1295
|
-
|
|
1295
|
+
default: dt(() => [
|
|
1296
|
+
_(r.$slots, "default")
|
|
1296
1297
|
]),
|
|
1297
1298
|
_: 3
|
|
1298
1299
|
}, 8, ["class", "size"]));
|
|
@@ -1311,19 +1312,19 @@ const En = /* @__PURE__ */ M({
|
|
|
1311
1312
|
}), o = w(
|
|
1312
1313
|
() => e.ellipsis ? `--row-num: ${e.rowNum}` : ""
|
|
1313
1314
|
);
|
|
1314
|
-
return (s, i) => (
|
|
1315
|
+
return (s, i) => (R(), T("span", {
|
|
1315
1316
|
class: D(["sq-text", n.value]),
|
|
1316
|
-
style:
|
|
1317
|
+
style: ct(o.value)
|
|
1317
1318
|
}, [
|
|
1318
|
-
|
|
1319
|
+
_(s.$slots, "default")
|
|
1319
1320
|
], 6));
|
|
1320
1321
|
}
|
|
1321
1322
|
});
|
|
1322
1323
|
export {
|
|
1323
1324
|
On as SqButton,
|
|
1324
|
-
|
|
1325
|
+
Tn as SqCard,
|
|
1325
1326
|
Bn as SqCheckTag,
|
|
1326
|
-
|
|
1327
|
+
_n as SqInput,
|
|
1327
1328
|
En as SqPopover,
|
|
1328
1329
|
$n as SqProgress,
|
|
1329
1330
|
kn as SqTag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(k,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(k=typeof globalThis<"u"?globalThis:k||self,i(k.SquirrelCloudUIVue={},k.Vue))})(this,(function(k,i){"use strict";const qt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Nt={},Ft={class:"sq-icon is-loading","data-icon":"loading"};function It(t,e){return i.openBlock(),i.createElementBlock("span",Ft,e[0]||(e[0]=[i.createElementVNode("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("circle",{cx:"24",cy:"24",r:"20"})],-1)]))}const Wt=qt(Nt,[["render",It]]),Ht=["disabled"],jt=i.defineComponent({__name:"SqButton",props:{type:{},round:{type:Boolean},text:{type:Boolean},icon:{},loading:{type:Boolean},disabled:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-button--${e.size}`),e.type&&r.push(`is-${e.type}`),e.round&&r.push("is-round"),e.text&&r.push("is-text"),r}),o=i.computed(()=>e.loading?Wt:e.icon),s=i.computed(()=>e.loading||e.disabled);return(r,l)=>(i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sq-button",n.value]),disabled:s.value},[i.createVNode(i.unref(rt),{size:e.size},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(o.value),{key:0})):i.createCommentVNode("",!0),i.renderSlot(r.$slots,"default")]),_:3},8,["size"])],10,Ht))}}),Xt={class:"sq-card"},Ut={key:0,class:"sq-card-header"},Yt=["textContent"],Kt={key:1,class:"sq-card-footer"},Gt=i.defineComponent({__name:"SqCard",props:{title:{},decorative:{type:Boolean,default:!1}},setup(t){const e=i.useSlots(),n=t;return(o,s)=>(i.openBlock(),i.createElementBlock("div",Xt,[n.title||i.unref(e).title?(i.openBlock(),i.createElementBlock("div",Ut,[i.createElementVNode("h2",{class:i.normalizeClass({"has-decorative":n.decorative}),textContent:i.toDisplayString(n.title)},null,10,Yt),i.renderSlot(o.$slots,"title")])):i.createCommentVNode("",!0),i.renderSlot(o.$slots,"default"),i.unref(e).footer?(i.openBlock(),i.createElementBlock("div",Kt,[i.renderSlot(o.$slots,"footer")])):i.createCommentVNode("",!0)]))}}),Jt={key:0,class:"sq-input-prefix"},Qt=["disabled","readonly"],Zt={key:1,class:"sq-input-suffix"},te=i.defineComponent({__name:"SqInput",props:i.mergeModels({status:{},round:{type:Boolean},showStatusIcon:{type:Boolean},prefixIcon:{},suffixIcon:{},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"md"}},{value:{type:String,default:""},valueModifiers:{}}),emits:i.mergeModels(["focus","blur","input","change"],["update:value"]),setup(t,{expose:e,emit:n}){const o=i.useSlots(),s=n,r=t,l=i.useModel(t,"value"),c=i.useTemplateRef("inputRef"),f=i.computed(()=>{const m=[];return r.size!=="md"&&m.push(`sq-input--${r.size}`),r.status&&m.push(`is-${r.status}`),r.round&&m.push("is-round"),r.disabled&&m.push("is-disabled"),m}),a=i.computed(()=>o.prefix||r.prefixIcon),u=i.computed(()=>{const m=r.showStatusIcon&&r.status;return o.suffix||m||r.suffixIcon}),d=i.computed(()=>r.suffixIcon);function h(){var m;(m=c.value)==null||m.focus()}function p(){var m;(m=c.value)==null||m.blur()}return e({focus:h,blur:p}),(m,g)=>(i.openBlock(),i.createElementBlock("section",{class:i.normalizeClass(["sq-input",f.value])},[a.value?(i.openBlock(),i.createElementBlock("span",Jt,[i.renderSlot(m.$slots,"prefix",{},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.prefixIcon)))])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>l.value=y),class:"sq-input-inner",disabled:r.disabled,readonly:r.readonly,ref_key:"inputRef",ref:c,onFocus:g[1]||(g[1]=y=>s("focus",y)),onBlur:g[2]||(g[2]=y=>s("blur",y)),onInput:g[3]||(g[3]=y=>s("input",y)),onChange:g[4]||(g[4]=y=>s("change",y))},null,40,Qt),[[i.vModelText,l.value]]),u.value?(i.openBlock(),i.createElementBlock("span",Zt,[i.renderSlot(m.$slots,"suffix",{},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value)))])])):i.createCommentVNode("",!0)],2))}}),lt=Math.min,I=Math.max,J=Math.round,Q=Math.floor,O=t=>({x:t,y:t}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"};function ct(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function oe(t){return t==="x"?"y":"x"}function yt(t){return t==="y"?"height":"width"}const ie=new Set(["top","bottom"]);function V(t){return ie.has(W(t))?"y":"x"}function wt(t){return oe(V(t))}function se(t,e,n){n===void 0&&(n=!1);const o=Z(t),s=wt(t),r=yt(s);let l=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=tt(l)),[l,tt(l)]}function re(t){const e=tt(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>ne[e])}const xt=["left","right"],bt=["right","left"],le=["top","bottom"],ce=["bottom","top"];function ae(t,e,n){switch(t){case"top":case"bottom":return n?e?bt:xt:e?xt:bt;case"left":case"right":return e?le:ce;default:return[]}}function fe(t,e,n,o){const s=Z(t);let r=ae(W(t),n==="start",o);return s&&(r=r.map(l=>l+"-"+s),e&&(r=r.concat(r.map(at)))),r}function tt(t){return t.replace(/left|right|bottom|top/g,e=>ee[e])}function ue(t){return{top:0,right:0,bottom:0,left:0,...t}}function de(t){return typeof t!="number"?ue(t):{top:t,right:t,bottom:t,left:t}}function et(t){const{x:e,y:n,width:o,height:s}=t;return{width:o,height:s,top:n,left:e,right:e+o,bottom:n+s,x:e,y:n}}function St(t,e,n){let{reference:o,floating:s}=t;const r=V(e),l=wt(e),c=yt(l),f=W(e),a=r==="y",u=o.x+o.width/2-s.width/2,d=o.y+o.height/2-s.height/2,h=o[c]/2-s[c]/2;let p;switch(f){case"top":p={x:u,y:o.y-s.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-s.width,y:d};break;default:p={x:o.x,y:o.y}}switch(Z(e)){case"start":p[l]-=h*(n&&a?-1:1);break;case"end":p[l]+=h*(n&&a?-1:1);break}return p}const pe=async(t,e,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=St(a,o,f),h=o,p={},m=0;for(let g=0;g<c.length;g++){const{name:y,fn:w}=c[g],{x,y:S,data:R,reset:C}=await w({x:u,y:d,initialPlacement:o,placement:h,strategy:s,middlewareData:p,rects:a,platform:l,elements:{reference:t,floating:e}});u=x??u,d=S??d,p={...p,[y]:{...p[y],...R}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(a=C.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:s}):C.rects),{x:u,y:d}=St(a,h,f)),g=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:p}};async function me(t,e){var n;e===void 0&&(e={});const{x:o,y:s,platform:r,rects:l,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ct(e,t),m=de(p),y=c[h?d==="floating"?"reference":"floating":d],w=et(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:f})),x=d==="floating"?{x:o,y:s,width:l.floating.width,height:l.floating.height}:l.reference,S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),R=await(r.isElement==null?void 0:r.isElement(S))?await(r.getScale==null?void 0:r.getScale(S))||{x:1,y:1}:{x:1,y:1},C=et(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:S,strategy:f}):x);return{top:(w.top-C.top+m.top)/R.y,bottom:(C.bottom-w.bottom+m.bottom)/R.y,left:(w.left-C.left+m.left)/R.x,right:(C.right-w.right+m.right)/R.x}}const he=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:s,middlewareData:r,rects:l,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=ct(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(s),x=V(c),S=W(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(a.floating)),C=h||(S||!g?[tt(c)]:re(c)),P=m!=="none";!h&&P&&C.push(...fe(c,g,m,R));const b=[c,...C],v=await me(e,y),q=[];let X=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&q.push(v[w]),d){const N=se(s,l,R);q.push(v[N[0]],v[N[1]])}if(X=[...X,{placement:s,overflows:q}],!q.every(N=>N<=0)){var Dt,Mt;const N=(((Dt=r.flip)==null?void 0:Dt.index)||0)+1,gt=b[N];if(gt&&(!(d==="alignment"?x!==V(gt):!1)||X.every(L=>V(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:N,overflows:X},reset:{placement:gt}};let G=(Mt=X.filter(F=>F.overflows[0]<=0).sort((F,L)=>F.overflows[1]-L.overflows[1])[0])==null?void 0:Mt.placement;if(!G)switch(p){case"bestFit":{var Pt;const F=(Pt=X.filter(L=>{if(P){const z=V(L.placement);return z===x||z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,tn)=>z+tn,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:Pt[0];F&&(G=F);break}case"initialPlacement":G=c;break}if(s!==G)return{reset:{placement:G}}}return{}}}},ge=new Set(["left","top"]);async function ye(t,e){const{placement:n,platform:o,elements:s}=t,r=await(o.isRTL==null?void 0:o.isRTL(s.floating)),l=W(n),c=Z(n),f=V(n)==="y",a=ge.has(l)?-1:1,u=r&&f?-1:1,d=ct(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof m=="number"&&(p=c==="end"?m*-1:m),f?{x:p*u,y:h*a}:{x:h*a,y:p*u}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:s,y:r,placement:l,middlewareData:c}=e,f=await ye(e,t);return l===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:s+f.x,y:r+f.y,data:{...f,placement:l}}}}};function nt(){return typeof window<"u"}function D(t){return ft(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function A(t){var e;return(e=(ft(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ft(t){return nt()?t instanceof Node||t instanceof B(t).Node:!1}function E(t){return nt()?t instanceof Element||t instanceof B(t).Element:!1}function _(t){return nt()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Ct(t){return!nt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}const xe=new Set(["inline","contents"]);function U(t){const{overflow:e,overflowX:n,overflowY:o,display:s}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!xe.has(s)}const be=new Set(["table","td","th"]);function Se(t){return be.has(D(t))}const Ce=[":popover-open",":modal"];function ot(t){return Ce.some(e=>{try{return t.matches(e)}catch{return!1}})}const Re=["transform","translate","scale","rotate","perspective"],ke=["transform","translate","scale","rotate","perspective","filter"],Be=["paint","layout","strict","content"];function ut(t){const e=dt(),n=E(t)?T(t):t;return Re.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)||ke.some(o=>(n.willChange||"").includes(o))||Be.some(o=>(n.contain||"").includes(o))}function ve(t){let e=$(t);for(;_(e)&&!H(e);){if(ut(e))return e;if(ot(e))return null;e=$(e)}return null}function dt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ee=new Set(["html","body","#document"]);function H(t){return Ee.has(D(t))}function T(t){return B(t).getComputedStyle(t)}function it(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(D(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||A(t);return Ct(e)?e.host:e}function Rt(t){const e=$(t);return H(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&U(e)?e:Rt(e)}function Y(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Rt(t),r=s===((o=t.ownerDocument)==null?void 0:o.body),l=B(s);if(r){const c=pt(l);return e.concat(l,l.visualViewport||[],U(s)?s:[],c&&n?Y(c):[])}return e.concat(s,Y(s,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const e=T(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const s=_(t),r=s?t.offsetWidth:n,l=s?t.offsetHeight:o,c=J(n)!==r||J(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function mt(t){return E(t)?t:t.contextElement}function j(t){const e=mt(t);if(!_(e))return O(1);const n=e.getBoundingClientRect(),{width:o,height:s,$:r}=kt(e);let l=(r?J(n.width):n.width)/o,c=(r?J(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Te=O(0);function Bt(t){const e=B(t);return!dt()||!e.visualViewport?Te:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Le(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function M(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=mt(t);let l=O(1);e&&(o?E(o)&&(l=j(o)):l=j(t));const c=Le(r,n,o)?Bt(r):O(0);let f=(s.left+c.x)/l.x,a=(s.top+c.y)/l.y,u=s.width/l.x,d=s.height/l.y;if(r){const h=B(r),p=o&&E(o)?B(o):o;let m=h,g=pt(m);for(;g&&o&&p!==m;){const y=j(g),w=g.getBoundingClientRect(),x=T(g),S=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,R=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,a*=y.y,u*=y.x,d*=y.y,f+=S,a+=R,m=B(g),g=pt(m)}}return et({width:u,height:d,x:f,y:a})}function st(t,e){const n=it(t).scrollLeft;return e?e.left+n:M(A(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-st(t,n),s=n.top+e.scrollTop;return{x:o,y:s}}function Oe(t){let{elements:e,rect:n,offsetParent:o,strategy:s}=t;const r=s==="fixed",l=A(o),c=e?ot(e.floating):!1;if(o===l||c&&r)return n;let f={scrollLeft:0,scrollTop:0},a=O(1);const u=O(0),d=_(o);if((d||!d&&!r)&&((D(o)!=="body"||U(l))&&(f=it(o)),_(o))){const p=M(o);a=j(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const h=l&&!d&&!r?vt(l,f):O(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+u.x+h.x,y:n.y*a.y-f.scrollTop*a.y+u.y+h.y}}function Ae(t){return Array.from(t.getClientRects())}function _e(t){const e=A(t),n=it(t),o=t.ownerDocument.body,s=I(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=I(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+st(t);const c=-n.scrollTop;return T(o).direction==="rtl"&&(l+=I(e.clientWidth,o.clientWidth)-s),{width:s,height:r,x:l,y:c}}const Et=25;function $e(t,e){const n=B(t),o=A(t),s=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,f=0;if(s){r=s.width,l=s.height;const u=dt();(!u||u&&e==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}const a=st(o);if(a<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=Et&&(r-=m)}else a<=Et&&(r+=a);return{width:r,height:l,x:c,y:f}}const ze=new Set(["absolute","fixed"]);function Ve(t,e){const n=M(t,!0,e==="fixed"),o=n.top+t.clientTop,s=n.left+t.clientLeft,r=_(t)?j(t):O(1),l=t.clientWidth*r.x,c=t.clientHeight*r.y,f=s*r.x,a=o*r.y;return{width:l,height:c,x:f,y:a}}function Tt(t,e,n){let o;if(e==="viewport")o=$e(t,n);else if(e==="document")o=_e(A(t));else if(E(e))o=Ve(e,n);else{const s=Bt(t);o={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return et(o)}function Lt(t,e){const n=$(t);return n===e||!E(n)||H(n)?!1:T(n).position==="fixed"||Lt(n,e)}function De(t,e){const n=e.get(t);if(n)return n;let o=Y(t,[],!1).filter(c=>E(c)&&D(c)!=="body"),s=null;const r=T(t).position==="fixed";let l=r?$(t):t;for(;E(l)&&!H(l);){const c=T(l),f=ut(l);!f&&c.position==="fixed"&&(s=null),(r?!f&&!s:!f&&c.position==="static"&&!!s&&ze.has(s.position)||U(l)&&!f&&Lt(t,l))?o=o.filter(u=>u!==l):s=c,l=$(l)}return e.set(t,o),o}function Me(t){let{element:e,boundary:n,rootBoundary:o,strategy:s}=t;const l=[...n==="clippingAncestors"?ot(e)?[]:De(e,this._c):[].concat(n),o],c=l[0],f=l.reduce((a,u)=>{const d=Tt(e,u,s);return a.top=I(d.top,a.top),a.right=lt(d.right,a.right),a.bottom=lt(d.bottom,a.bottom),a.left=I(d.left,a.left),a},Tt(e,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Pe(t){const{width:e,height:n}=kt(t);return{width:e,height:n}}function qe(t,e,n){const o=_(e),s=A(e),r=n==="fixed",l=M(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=O(0);function a(){f.x=st(s)}if(o||!o&&!r)if((D(e)!=="body"||U(s))&&(c=it(e)),o){const p=M(e,!0,r,e);f.x=p.x+e.clientLeft,f.y=p.y+e.clientTop}else s&&a();r&&!o&&s&&a();const u=s&&!o&&!r?vt(s,c):O(0),d=l.left+c.scrollLeft-f.x-u.x,h=l.top+c.scrollTop-f.y-u.y;return{x:d,y:h,width:l.width,height:l.height}}function ht(t){return T(t).position==="static"}function Ot(t,e){if(!_(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return A(t)===n&&(n=n.ownerDocument.body),n}function At(t,e){const n=B(t);if(ot(t))return n;if(!_(t)){let s=$(t);for(;s&&!H(s);){if(E(s)&&!ht(s))return s;s=$(s)}return n}let o=Ot(t,e);for(;o&&Se(o)&&ht(o);)o=Ot(o,e);return o&&H(o)&&ht(o)&&!ut(o)?n:o||ve(t)||n}const Ne=async function(t){const e=this.getOffsetParent||At,n=this.getDimensions,o=await n(t.floating);return{reference:qe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Fe(t){return T(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:A,getClippingRect:Me,getOffsetParent:At,getElementRects:Ne,getClientRects:Ae,getDimensions:Pe,getScale:j,isElement:E,isRTL:Fe};function _t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,o;const s=A(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const a=t.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=a;if(c||e(),!h||!p)return;const m=Q(d),g=Q(s.clientWidth-(u+h)),y=Q(s.clientHeight-(d+p)),w=Q(u),S={rootMargin:-m+"px "+-g+"px "+-y+"px "+-w+"px",threshold:I(0,lt(1,f))||1};let R=!0;function C(P){const b=P[0].intersectionRatio;if(b!==f){if(!R)return l();b?l(!1,b):o=setTimeout(()=>{l(!1,1e-7)},1e3)}b===1&&!_t(a,t.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(t)}return l(!0),r}function He(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,a=mt(t),u=s||r?[...a?Y(a):[],...Y(e)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const d=a&&c?We(a,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),n()}),a&&!f&&p.observe(a),p.observe(e));let m,g=f?M(t):null;f&&y();function y(){const w=M(t);g&&!_t(g,w)&&n(),g=w,m=requestAnimationFrame(y)}return n(),()=>{var w;u.forEach(x=>{s&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d==null||d(),(w=p)==null||w.disconnect(),p=null,f&&cancelAnimationFrame(m)}}const je=we,Xe=he,Ue=(t,e,n)=>{const o=new Map,s={platform:Ie,...n},r={...s.platform,_c:o};return pe(t,e,{...s,platform:r})};function Ye(t){return t!=null&&typeof t=="object"&&"$el"in t}function $t(t){if(Ye(t)){const e=t.$el;return ft(e)&&D(e)==="#comment"?null:e}return t}function K(t){return typeof t=="function"?t():i.unref(t)}function zt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Vt(t,e){const n=zt(t);return Math.round(e*n)/n}function Ke(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,s=i.computed(()=>{var b;return(b=K(n.open))!=null?b:!0}),r=i.computed(()=>K(n.middleware)),l=i.computed(()=>{var b;return(b=K(n.placement))!=null?b:"bottom"}),c=i.computed(()=>{var b;return(b=K(n.strategy))!=null?b:"absolute"}),f=i.computed(()=>{var b;return(b=K(n.transform))!=null?b:!0}),a=i.computed(()=>$t(t.value)),u=i.computed(()=>$t(e.value)),d=i.ref(0),h=i.ref(0),p=i.ref(c.value),m=i.ref(l.value),g=i.shallowRef({}),y=i.ref(!1),w=i.computed(()=>{const b={position:p.value,left:"0",top:"0"};if(!u.value)return b;const v=Vt(u.value,d.value),q=Vt(u.value,h.value);return f.value?{...b,transform:"translate("+v+"px, "+q+"px)",...zt(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:v+"px",top:q+"px"}});let x;function S(){if(a.value==null||u.value==null)return;const b=s.value;Ue(a.value,u.value,{middleware:r.value,placement:l.value,strategy:c.value}).then(v=>{d.value=v.x,h.value=v.y,p.value=v.strategy,m.value=v.placement,g.value=v.middlewareData,y.value=b!==!1})}function R(){typeof x=="function"&&(x(),x=void 0)}function C(){if(R(),o===void 0){S();return}if(a.value!=null&&u.value!=null){x=o(a.value,u.value,S);return}}function P(){s.value||(y.value=!1)}return i.watch([r,l,c,s],S,{flush:"sync"}),i.watch([a,u],C,{flush:"sync"}),i.watch(s,P,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(R),{x:i.shallowReadonly(d),y:i.shallowReadonly(h),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(m),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(y),floatingStyles:w,update:S}}const Ge=i.defineComponent({__name:"SqPopover",props:i.mergeModels({placement:{default:"top"},offset:{default:10},teleported:{type:Boolean,default:!0},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:300},disabled:{type:Boolean},popoverClass:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){let e;const n=t,o=i.useTemplateRef("triggerRef"),s=i.useTemplateRef("popverRef"),r=i.useModel(t,"visible"),{floatingStyles:l}=Ke(o,s,{placement:n.placement,whileElementsMounted:He,transform:!1,middleware:[je(n.offset),Xe()]});i.onBeforeUnmount(()=>{h(),document.removeEventListener("click",d)});function c(){n.trigger!=="hover"||n.disabled||(h(),e=setTimeout(()=>{u()},n.showAfter))}function f(){n.trigger==="hover"&&(h(),e=setTimeout(()=>{d()},n.hideAfter))}function a(){n.trigger==="click"&&(r.value?d():n.disabled||u())}function u(){r.value=!0,document.addEventListener("click",d)}function d(){r.value=!1,document.removeEventListener("click",d)}function h(){e&&(clearTimeout(e),e=void 0)}return(p,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("span",{class:i.normalizeClass(["sq-popover-trigger",p.$attrs.class]),ref_key:"triggerRef",ref:o,onMouseenter:c,onMouseleave:f,onClick:i.withModifiers(a,["stop"])},[i.renderSlot(p.$slots,"reference")],34),(i.openBlock(),i.createBlock(i.Teleport,{to:"body",disabled:!n.teleported},[i.createVNode(i.Transition,{name:"sq-fade"},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(["sq-popover",p.popoverClass]),ref_key:"popverRef",ref:s,style:i.normalizeStyle(i.unref(l)),onClick:m[0]||(m[0]=i.withModifiers(()=>{},["stop"]))},[i.renderSlot(p.$slots,"default")],6),[[i.vShow,r.value]])]),_:3})],8,["disabled"]))],64))}}),Je=i.defineComponent({__name:"SqProgress",props:{value:{},min:{default:0},max:{default:100},color:{},type:{default:"primary"}},setup(t){const e=t,n=i.computed(()=>e.color?[]:[`is-${e.type}`]),o=i.computed(()=>{const r=e.max-e.min;return(e.value-e.min)*100/r}),s=i.computed(()=>{const r={};if(r["--progress-value"]=`${o.value}%`,e.color){const c=typeof e.color=="string"?e.color:e.color(o.value);r["--progress-color"]=c}return r});return(r,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sq-progress",n.value]),style:i.normalizeStyle(s.value)},null,6))}}),Qe=i.defineComponent({__name:"SqTag",props:{type:{},theme:{default:"materialize"},round:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const s=[];return e.size!=="md"&&s.push(`sq-tag--${e.size}`),e.theme!=="materialize"&&e.type&&s.push(`is-${e.theme}`),e.type&&s.push(`is-${e.type}`),e.round&&s.push("is-round"),s}),o=i.computed(()=>e.size==="lg"?"md":"sm");return(s,r)=>(i.openBlock(),i.createBlock(i.unref(rt),{class:i.normalizeClass(["sq-tag",n.value]),size:o.value},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},8,["class","size"]))}}),Ze=i.defineComponent({__name:"SqCheckTag",props:{checked:{type:Boolean,default:!1},type:{default:"primary"},round:{type:Boolean},size:{default:"md"}},emits:["change"],setup(t,{emit:e}){const n=e,o=t,s=i.computed(()=>{const l=[];return o.size!=="md"&&l.push(`sq-tag--${o.size}`),o.type&&l.push(`is-${o.type}`),o.round&&l.push("is-round"),o.checked&&l.push("is-checked"),l}),r=i.computed(()=>o.size==="lg"?"md":"sm");return(l,c)=>(i.openBlock(),i.createBlock(i.unref(rt),{class:i.normalizeClass(["sq-check-tag",s.value]),size:r.value,onClick:c[0]||(c[0]=f=>n("change",!o.checked))},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["class","size"]))}}),rt=i.defineComponent({__name:"SqText",props:{rowNum:{default:1},ellipsis:{type:Boolean,default:!1},size:{default:"md"}},setup(t){const e=t,n=i.computed(()=>{const s=[];return e.size!=="md"&&s.push(`s-text--${e.size}`),e.ellipsis&&s.push(e.rowNum>1?"multi-line":"single-line"),s}),o=i.computed(()=>e.ellipsis?`--row-num: ${e.rowNum}`:"");return(s,r)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["sq-text",n.value]),style:i.normalizeStyle(o.value)},[i.renderSlot(s.$slots,"default")],6))}});k.SqButton=jt,k.SqCard=Gt,k.SqCheckTag=Ze,k.SqInput=te,k.SqPopover=Ge,k.SqProgress=Je,k.SqTag=Qe,k.SqText=rt,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(k,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(k=typeof globalThis<"u"?globalThis:k||self,s(k.SquirrelCloudUIVue={},k.Vue))})(this,(function(k,s){"use strict";const qt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Nt={},Ft={class:"sq-icon is-loading","data-icon":"loading"};function It(t,e){return s.openBlock(),s.createElementBlock("span",Ft,e[0]||(e[0]=[s.createElementVNode("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("circle",{cx:"24",cy:"24",r:"20"})],-1)]))}const Wt=qt(Nt,[["render",It]]),Ht=["disabled"],jt=s.defineComponent({__name:"SqButton",props:{type:{},round:{type:Boolean},text:{type:Boolean},icon:{},loading:{type:Boolean},disabled:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=s.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-button--${e.size}`),e.type&&r.push(`is-${e.type}`),e.round&&r.push("is-round"),e.text&&r.push("is-text"),r}),o=s.computed(()=>e.loading?Wt:e.icon),i=s.computed(()=>e.loading||e.disabled);return(r,l)=>(s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["sq-button",n.value]),disabled:i.value},[s.createVNode(s.unref(rt),{size:e.size},{default:s.withCtx(()=>[o.value?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.value),{key:0})):s.createCommentVNode("",!0),s.renderSlot(r.$slots,"default")]),_:3},8,["size"])],10,Ht))}}),Xt={class:"sq-card"},Ut={key:0,class:"sq-card-header"},Yt=["textContent"],Kt={key:1,class:"sq-card-footer"},Gt=s.defineComponent({__name:"SqCard",props:{title:{},decorative:{type:Boolean,default:!1}},setup(t){const e=s.useSlots(),n=t;return(o,i)=>(s.openBlock(),s.createElementBlock("div",Xt,[n.title||s.unref(e).title?(s.openBlock(),s.createElementBlock("div",Ut,[s.createElementVNode("h2",{class:s.normalizeClass({"has-decorative":n.decorative}),textContent:s.toDisplayString(n.title)},null,10,Yt),s.renderSlot(o.$slots,"title")])):s.createCommentVNode("",!0),s.renderSlot(o.$slots,"default"),s.unref(e).footer?(s.openBlock(),s.createElementBlock("div",Kt,[s.renderSlot(o.$slots,"footer")])):s.createCommentVNode("",!0)]))}}),Jt={key:0,class:"sq-input-prefix"},Qt=["disabled","readonly"],Zt={key:1,class:"sq-input-suffix"},te=s.defineComponent({__name:"SqInput",props:s.mergeModels({status:{},round:{type:Boolean},showStatusIcon:{type:Boolean},prefixIcon:{},suffixIcon:{},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"md"}},{value:{type:String,default:""},valueModifiers:{}}),emits:s.mergeModels(["focus","blur","input","change"],["update:value"]),setup(t,{expose:e,emit:n}){const o=s.useSlots(),i=n,r=t,l=s.useModel(t,"value"),c=s.useTemplateRef("inputRef"),f=s.computed(()=>{const m=[];return r.size!=="md"&&m.push(`sq-input--${r.size}`),r.status&&m.push(`is-${r.status}`),r.round&&m.push("is-round"),r.disabled&&m.push("is-disabled"),m}),a=s.computed(()=>o.prefix||r.prefixIcon),d=s.computed(()=>{const m=r.showStatusIcon&&r.status;return o.suffix||m||r.suffixIcon}),p=s.computed(()=>r.suffixIcon);function h(){var m;(m=c.value)==null||m.focus()}function u(){var m;(m=c.value)==null||m.blur()}return e({focus:h,blur:u}),(m,g)=>(s.openBlock(),s.createElementBlock("section",{class:s.normalizeClass(["sq-input",f.value])},[a.value?(s.openBlock(),s.createElementBlock("span",Jt,[s.renderSlot(m.$slots,"prefix",{},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.prefixIcon)))])])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>l.value=y),class:"sq-input-inner",disabled:r.disabled,readonly:r.readonly,ref_key:"inputRef",ref:c,onFocus:g[1]||(g[1]=y=>i("focus",y)),onBlur:g[2]||(g[2]=y=>i("blur",y)),onInput:g[3]||(g[3]=y=>i("input",y)),onChange:g[4]||(g[4]=y=>i("change",y))},null,40,Qt),[[s.vModelText,l.value]]),d.value?(s.openBlock(),s.createElementBlock("span",Zt,[s.renderSlot(m.$slots,"suffix",{},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(p.value)))])])):s.createCommentVNode("",!0)],2))}}),lt=Math.min,I=Math.max,J=Math.round,Q=Math.floor,A=t=>({x:t,y:t}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"};function ct(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function oe(t){return t==="x"?"y":"x"}function yt(t){return t==="y"?"height":"width"}const se=new Set(["top","bottom"]);function V(t){return se.has(W(t))?"y":"x"}function wt(t){return oe(V(t))}function ie(t,e,n){n===void 0&&(n=!1);const o=Z(t),i=wt(t),r=yt(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=tt(l)),[l,tt(l)]}function re(t){const e=tt(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>ne[e])}const xt=["left","right"],bt=["right","left"],le=["top","bottom"],ce=["bottom","top"];function ae(t,e,n){switch(t){case"top":case"bottom":return n?e?bt:xt:e?xt:bt;case"left":case"right":return e?le:ce;default:return[]}}function fe(t,e,n,o){const i=Z(t);let r=ae(W(t),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),e&&(r=r.concat(r.map(at)))),r}function tt(t){return t.replace(/left|right|bottom|top/g,e=>ee[e])}function ue(t){return{top:0,right:0,bottom:0,left:0,...t}}function de(t){return typeof t!="number"?ue(t):{top:t,right:t,bottom:t,left:t}}function et(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function St(t,e,n){let{reference:o,floating:i}=t;const r=V(e),l=wt(e),c=yt(l),f=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let u;switch(f){case"top":u={x:d,y:o.y-i.height};break;case"bottom":u={x:d,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:p};break;case"left":u={x:o.x-i.width,y:p};break;default:u={x:o.x,y:o.y}}switch(Z(e)){case"start":u[l]-=h*(n&&a?-1:1);break;case"end":u[l]+=h*(n&&a?-1:1);break}return u}const pe=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:p}=St(a,o,f),h=o,u={},m=0;for(let g=0;g<c.length;g++){const{name:y,fn:w}=c[g],{x,y:S,data:R,reset:C}=await w({x:d,y:p,initialPlacement:o,placement:h,strategy:i,middlewareData:u,rects:a,platform:l,elements:{reference:t,floating:e}});d=x??d,p=S??p,u={...u,[y]:{...u[y],...R}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(a=C.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:d,y:p}=St(a,h,f)),g=-1)}return{x:d,y:p,placement:h,strategy:i,middlewareData:u}};async function me(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:l,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:u=0}=ct(e,t),m=de(u),y=c[h?p==="floating"?"reference":"floating":p],w=et(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:f})),x=p==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),R=await(r.isElement==null?void 0:r.isElement(S))?await(r.getScale==null?void 0:r.getScale(S))||{x:1,y:1}:{x:1,y:1},C=et(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:S,strategy:f}):x);return{top:(w.top-C.top+m.top)/R.y,bottom:(C.bottom-w.bottom+m.bottom)/R.y,left:(w.left-C.left+m.left)/R.x,right:(C.right-w.right+m.right)/R.x}}const he=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=ct(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),x=V(c),S=W(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(a.floating)),C=h||(S||!g?[tt(c)]:re(c)),P=m!=="none";!h&&P&&C.push(...fe(c,g,m,R));const b=[c,...C],E=await me(e,y),q=[];let X=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&q.push(E[w]),p){const N=ie(i,l,R);q.push(E[N[0]],E[N[1]])}if(X=[...X,{placement:i,overflows:q}],!q.every(N=>N<=0)){var Dt,Mt;const N=(((Dt=r.flip)==null?void 0:Dt.index)||0)+1,gt=b[N];if(gt&&(!(p==="alignment"?x!==V(gt):!1)||X.every(O=>V(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:N,overflows:X},reset:{placement:gt}};let G=(Mt=X.filter(F=>F.overflows[0]<=0).sort((F,O)=>F.overflows[1]-O.overflows[1])[0])==null?void 0:Mt.placement;if(!G)switch(u){case"bestFit":{var Pt;const F=(Pt=X.filter(O=>{if(P){const z=V(O.placement);return z===x||z==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(z=>z>0).reduce((z,tn)=>z+tn,0)]).sort((O,z)=>O[1]-z[1])[0])==null?void 0:Pt[0];F&&(G=F);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}},ge=new Set(["left","top"]);async function ye(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=W(n),c=Z(n),f=V(n)==="y",a=ge.has(l)?-1:1,d=r&&f?-1:1,p=ct(e,t);let{mainAxis:h,crossAxis:u,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof m=="number"&&(u=c==="end"?m*-1:m),f?{x:u*d,y:h*a}:{x:h*a,y:u*d}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:c}=e,f=await ye(e,t);return l===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:r+f.y,data:{...f,placement:l}}}}};function nt(){return typeof window<"u"}function D(t){return ft(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function T(t){var e;return(e=(ft(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ft(t){return nt()?t instanceof Node||t instanceof B(t).Node:!1}function v(t){return nt()?t instanceof Element||t instanceof B(t).Element:!1}function _(t){return nt()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Ct(t){return!nt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}const xe=new Set(["inline","contents"]);function U(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=L(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!xe.has(i)}const be=new Set(["table","td","th"]);function Se(t){return be.has(D(t))}const Ce=[":popover-open",":modal"];function ot(t){return Ce.some(e=>{try{return t.matches(e)}catch{return!1}})}const Re=["transform","translate","scale","rotate","perspective"],ke=["transform","translate","scale","rotate","perspective","filter"],Be=["paint","layout","strict","content"];function ut(t){const e=dt(),n=v(t)?L(t):t;return Re.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)||ke.some(o=>(n.willChange||"").includes(o))||Be.some(o=>(n.contain||"").includes(o))}function Ee(t){let e=$(t);for(;_(e)&&!H(e);){if(ut(e))return e;if(ot(e))return null;e=$(e)}return null}function dt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ve=new Set(["html","body","#document"]);function H(t){return ve.has(D(t))}function L(t){return B(t).getComputedStyle(t)}function st(t){return v(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(D(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||T(t);return Ct(e)?e.host:e}function Rt(t){const e=$(t);return H(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&U(e)?e:Rt(e)}function Y(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Rt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),l=B(i);if(r){const c=pt(l);return e.concat(l,l.visualViewport||[],U(i)?i:[],c&&n?Y(c):[])}return e.concat(i,Y(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const e=L(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=_(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,c=J(n)!==r||J(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function mt(t){return v(t)?t:t.contextElement}function j(t){const e=mt(t);if(!_(e))return A(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=kt(e);let l=(r?J(n.width):n.width)/o,c=(r?J(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Le=A(0);function Bt(t){const e=B(t);return!dt()||!e.visualViewport?Le:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Oe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function M(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=mt(t);let l=A(1);e&&(o?v(o)&&(l=j(o)):l=j(t));const c=Oe(r,n,o)?Bt(r):A(0);let f=(i.left+c.x)/l.x,a=(i.top+c.y)/l.y,d=i.width/l.x,p=i.height/l.y;if(r){const h=B(r),u=o&&v(o)?B(o):o;let m=h,g=pt(m);for(;g&&o&&u!==m;){const y=j(g),w=g.getBoundingClientRect(),x=L(g),S=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,R=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,a*=y.y,d*=y.x,p*=y.y,f+=S,a+=R,m=B(g),g=pt(m)}}return et({width:d,height:p,x:f,y:a})}function it(t,e){const n=st(t).scrollLeft;return e?e.left+n:M(T(t)).left+n}function Et(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-it(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Ae(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",l=T(o),c=e?ot(e.floating):!1;if(o===l||c&&r)return n;let f={scrollLeft:0,scrollTop:0},a=A(1);const d=A(0),p=_(o);if((p||!p&&!r)&&((D(o)!=="body"||U(l))&&(f=st(o)),_(o))){const u=M(o);a=j(o),d.x=u.x+o.clientLeft,d.y=u.y+o.clientTop}const h=l&&!p&&!r?Et(l,f):A(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+d.x+h.x,y:n.y*a.y-f.scrollTop*a.y+d.y+h.y}}function Te(t){return Array.from(t.getClientRects())}function _e(t){const e=T(t),n=st(t),o=t.ownerDocument.body,i=I(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=I(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+it(t);const c=-n.scrollTop;return L(o).direction==="rtl"&&(l+=I(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:c}}const vt=25;function $e(t,e){const n=B(t),o=T(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,f=0;if(i){r=i.width,l=i.height;const d=dt();(!d||d&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const a=it(o);if(a<=0){const d=o.ownerDocument,p=d.body,h=getComputedStyle(p),u=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-p.clientWidth-u);m<=vt&&(r-=m)}else a<=vt&&(r+=a);return{width:r,height:l,x:c,y:f}}const ze=new Set(["absolute","fixed"]);function Ve(t,e){const n=M(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=_(t)?j(t):A(1),l=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,a=o*r.y;return{width:l,height:c,x:f,y:a}}function Lt(t,e,n){let o;if(e==="viewport")o=$e(t,n);else if(e==="document")o=_e(T(t));else if(v(e))o=Ve(e,n);else{const i=Bt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return et(o)}function Ot(t,e){const n=$(t);return n===e||!v(n)||H(n)?!1:L(n).position==="fixed"||Ot(n,e)}function De(t,e){const n=e.get(t);if(n)return n;let o=Y(t,[],!1).filter(c=>v(c)&&D(c)!=="body"),i=null;const r=L(t).position==="fixed";let l=r?$(t):t;for(;v(l)&&!H(l);){const c=L(l),f=ut(l);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&ze.has(i.position)||U(l)&&!f&&Ot(t,l))?o=o.filter(d=>d!==l):i=c,l=$(l)}return e.set(t,o),o}function Me(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?ot(e)?[]:De(e,this._c):[].concat(n),o],c=l[0],f=l.reduce((a,d)=>{const p=Lt(e,d,i);return a.top=I(p.top,a.top),a.right=lt(p.right,a.right),a.bottom=lt(p.bottom,a.bottom),a.left=I(p.left,a.left),a},Lt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Pe(t){const{width:e,height:n}=kt(t);return{width:e,height:n}}function qe(t,e,n){const o=_(e),i=T(e),r=n==="fixed",l=M(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=A(0);function a(){f.x=it(i)}if(o||!o&&!r)if((D(e)!=="body"||U(i))&&(c=st(e)),o){const u=M(e,!0,r,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else i&&a();r&&!o&&i&&a();const d=i&&!o&&!r?Et(i,c):A(0),p=l.left+c.scrollLeft-f.x-d.x,h=l.top+c.scrollTop-f.y-d.y;return{x:p,y:h,width:l.width,height:l.height}}function ht(t){return L(t).position==="static"}function At(t,e){if(!_(t)||L(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return T(t)===n&&(n=n.ownerDocument.body),n}function Tt(t,e){const n=B(t);if(ot(t))return n;if(!_(t)){let i=$(t);for(;i&&!H(i);){if(v(i)&&!ht(i))return i;i=$(i)}return n}let o=At(t,e);for(;o&&Se(o)&&ht(o);)o=At(o,e);return o&&H(o)&&ht(o)&&!ut(o)?n:o||Ee(t)||n}const Ne=async function(t){const e=this.getOffsetParent||Tt,n=this.getDimensions,o=await n(t.floating);return{reference:qe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Fe(t){return L(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Ae,getDocumentElement:T,getClippingRect:Me,getOffsetParent:Tt,getElementRects:Ne,getClientRects:Te,getDimensions:Pe,getScale:j,isElement:v,isRTL:Fe};function _t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,o;const i=T(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const a=t.getBoundingClientRect(),{left:d,top:p,width:h,height:u}=a;if(c||e(),!h||!u)return;const m=Q(p),g=Q(i.clientWidth-(d+h)),y=Q(i.clientHeight-(p+u)),w=Q(d),S={rootMargin:-m+"px "+-g+"px "+-y+"px "+-w+"px",threshold:I(0,lt(1,f))||1};let R=!0;function C(P){const b=P[0].intersectionRatio;if(b!==f){if(!R)return l();b?l(!1,b):o=setTimeout(()=>{l(!1,1e-7)},1e3)}b===1&&!_t(a,t.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(t)}return l(!0),r}function He(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,a=mt(t),d=i||r?[...a?Y(a):[],...Y(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const p=a&&c?We(a,n):null;let h=-1,u=null;l&&(u=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=u)==null||S.observe(e)})),n()}),a&&!f&&u.observe(a),u.observe(e));let m,g=f?M(t):null;f&&y();function y(){const w=M(t);g&&!_t(g,w)&&n(),g=w,m=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),p==null||p(),(w=u)==null||w.disconnect(),u=null,f&&cancelAnimationFrame(m)}}const je=we,Xe=he,Ue=(t,e,n)=>{const o=new Map,i={platform:Ie,...n},r={...i.platform,_c:o};return pe(t,e,{...i,platform:r})};function Ye(t){return t!=null&&typeof t=="object"&&"$el"in t}function $t(t){if(Ye(t)){const e=t.$el;return ft(e)&&D(e)==="#comment"?null:e}return t}function K(t){return typeof t=="function"?t():s.unref(t)}function zt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Vt(t,e){const n=zt(t);return Math.round(e*n)/n}function Ke(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=s.computed(()=>{var b;return(b=K(n.open))!=null?b:!0}),r=s.computed(()=>K(n.middleware)),l=s.computed(()=>{var b;return(b=K(n.placement))!=null?b:"bottom"}),c=s.computed(()=>{var b;return(b=K(n.strategy))!=null?b:"absolute"}),f=s.computed(()=>{var b;return(b=K(n.transform))!=null?b:!0}),a=s.computed(()=>$t(t.value)),d=s.computed(()=>$t(e.value)),p=s.ref(0),h=s.ref(0),u=s.ref(c.value),m=s.ref(l.value),g=s.shallowRef({}),y=s.ref(!1),w=s.computed(()=>{const b={position:u.value,left:"0",top:"0"};if(!d.value)return b;const E=Vt(d.value,p.value),q=Vt(d.value,h.value);return f.value?{...b,transform:"translate("+E+"px, "+q+"px)",...zt(d.value)>=1.5&&{willChange:"transform"}}:{position:u.value,left:E+"px",top:q+"px"}});let x;function S(){if(a.value==null||d.value==null)return;const b=i.value;Ue(a.value,d.value,{middleware:r.value,placement:l.value,strategy:c.value}).then(E=>{p.value=E.x,h.value=E.y,u.value=E.strategy,m.value=E.placement,g.value=E.middlewareData,y.value=b!==!1})}function R(){typeof x=="function"&&(x(),x=void 0)}function C(){if(R(),o===void 0){S();return}if(a.value!=null&&d.value!=null){x=o(a.value,d.value,S);return}}function P(){i.value||(y.value=!1)}return s.watch([r,l,c,i],S,{flush:"sync"}),s.watch([a,d],C,{flush:"sync"}),s.watch(i,P,{flush:"sync"}),s.getCurrentScope()&&s.onScopeDispose(R),{x:s.shallowReadonly(p),y:s.shallowReadonly(h),strategy:s.shallowReadonly(u),placement:s.shallowReadonly(m),middlewareData:s.shallowReadonly(g),isPositioned:s.shallowReadonly(y),floatingStyles:w,update:S}}const Ge=s.defineComponent({__name:"SqPopover",props:s.mergeModels({placement:{default:"top"},offset:{default:10},teleported:{type:Boolean,default:!0},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:300},disabled:{type:Boolean},popoverClass:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(t){let e;const n=t,o=s.shallowRef(null),i=s.shallowRef(null),r=s.useModel(t,"visible"),{floatingStyles:l}=Ke(o,i,{placement:n.placement,whileElementsMounted:He,transform:!1,middleware:[je(n.offset),Xe()]});s.onBeforeUnmount(()=>{h(),document.removeEventListener("click",p)});function c(){n.trigger!=="hover"||n.disabled||(h(),e=setTimeout(()=>{d(!1)},n.showAfter))}function f(){n.trigger==="hover"&&(h(),e=setTimeout(()=>{p()},n.hideAfter))}function a(){n.trigger==="click"&&(r.value?p():n.disabled||d())}function d(u=!0){r.value=!0,u&&document.addEventListener("click",p)}function p(){r.value=!1,document.removeEventListener("click",p)}function h(){e&&(clearTimeout(e),e=void 0)}return(u,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("span",{class:s.normalizeClass(["sq-popover-trigger",u.$attrs.class]),style:s.normalizeStyle(u.$attrs.style),ref_key:"triggerRef",ref:o,onMouseenter:c,onMouseleave:f,onClick:s.withModifiers(a,["stop"])},[s.renderSlot(u.$slots,"reference")],38),(s.openBlock(),s.createBlock(s.Teleport,{to:"body",disabled:!n.teleported},[s.createVNode(s.Transition,{name:"sq-fade"},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",{class:s.normalizeClass(["sq-popover",u.popoverClass]),ref_key:"popverRef",ref:i,style:s.normalizeStyle(s.unref(l)),onClick:m[0]||(m[0]=s.withModifiers(()=>{},["stop"]))},[s.renderSlot(u.$slots,"default")],6),[[s.vShow,r.value]])]),_:3})],8,["disabled"]))],64))}}),Je=s.defineComponent({__name:"SqProgress",props:{value:{},min:{default:0},max:{default:100},color:{},type:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>e.color?[]:[`is-${e.type}`]),o=s.computed(()=>{const r=e.max-e.min;return(e.value-e.min)*100/r}),i=s.computed(()=>{const r={};if(r["--progress-value"]=`${o.value}%`,e.color){const c=typeof e.color=="string"?e.color:e.color(o.value);r["--progress-color"]=c}return r});return(r,l)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["sq-progress",n.value]),style:s.normalizeStyle(i.value)},null,6))}}),Qe=s.defineComponent({__name:"SqTag",props:{type:{},theme:{default:"materialize"},round:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=s.computed(()=>{const i=[];return e.size!=="md"&&i.push(`sq-tag--${e.size}`),e.theme!=="materialize"&&e.type&&i.push(`is-${e.theme}`),e.type&&i.push(`is-${e.type}`),e.round&&i.push("is-round"),i}),o=s.computed(()=>e.size==="lg"?"md":"sm");return(i,r)=>(s.openBlock(),s.createBlock(s.unref(rt),{class:s.normalizeClass(["sq-tag",n.value]),size:o.value},{default:s.withCtx(()=>[s.renderSlot(i.$slots,"default")]),_:3},8,["class","size"]))}}),Ze=s.defineComponent({__name:"SqCheckTag",props:{checked:{type:Boolean,default:!1},type:{default:"primary"},round:{type:Boolean},size:{default:"md"}},emits:["change"],setup(t,{emit:e}){const n=e,o=t,i=s.computed(()=>{const l=[];return o.size!=="md"&&l.push(`sq-tag--${o.size}`),o.type&&l.push(`is-${o.type}`),o.round&&l.push("is-round"),o.checked&&l.push("is-checked"),l}),r=s.computed(()=>o.size==="lg"?"md":"sm");return(l,c)=>(s.openBlock(),s.createBlock(s.unref(rt),{class:s.normalizeClass(["sq-check-tag",i.value]),size:r.value,onClick:c[0]||(c[0]=f=>n("change",!o.checked))},{default:s.withCtx(()=>[s.renderSlot(l.$slots,"default")]),_:3},8,["class","size"]))}}),rt=s.defineComponent({__name:"SqText",props:{rowNum:{default:1},ellipsis:{type:Boolean,default:!1},size:{default:"md"}},setup(t){const e=t,n=s.computed(()=>{const i=[];return e.size!=="md"&&i.push(`s-text--${e.size}`),e.ellipsis&&i.push(e.rowNum>1?"multi-line":"single-line"),i}),o=s.computed(()=>e.ellipsis?`--row-num: ${e.rowNum}`:"");return(i,r)=>(s.openBlock(),s.createElementBlock("span",{class:s.normalizeClass(["sq-text",n.value]),style:s.normalizeStyle(o.value)},[s.renderSlot(i.$slots,"default")],6))}});k.SqButton=jt,k.SqCard=Gt,k.SqCheckTag=Ze,k.SqInput=te,k.SqPopover=Ge,k.SqProgress=Je,k.SqTag=Qe,k.SqText=rt,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|