@cregis/ui 0.1.11 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -6
- package/dist/es/cregis-ui.js +2064 -208
- package/dist/index.css +1 -1
- package/dist/types/index.d.ts +272 -5
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/dist/umd/index.css +1 -1
- package/package.json +6 -1
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { EdsLoad as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as Y, computed as h, createElementBlock as O, openBlock as y, createElementVNode as E, createCommentVNode as I, mergeProps as xe, createBlock as We, renderSlot as q, resolveDynamicComponent as It, normalizeClass as j, toDisplayString as _, unref as ae, ref as M, watch as J, normalizeStyle as pe, withDirectives as Le, vModelDynamic as ur, withModifiers as dr, vModelText as fr, createVNode as U, withCtx as Z, createTextVNode as Oe, nextTick as Ye, reactive as je, provide as Nt, toRef as pr, Fragment as st, renderList as lt, inject as Ft, onMounted as Je, onUnmounted as Ve, onBeforeUnmount as Ht, Transition as pt, render as Ke, h as qt, toHandlers as Pt, vShow as vt } from "vue";
|
|
2
|
+
import { EdsLoad as vr, EdsCloseCircleFill as mr, EdsWarningFill as gr, EdsSearch as Ut, EdsArrowDownMiniIos as Xt, EdsArrowRightMiniIos as hr } from "@cregis/icon";
|
|
3
|
+
const br = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "cregis-button__icon-wrapper"
|
|
6
|
-
},
|
|
6
|
+
}, yr = ["disabled"], wr = ["disabled"], xr = ["disabled"], Ue = /* @__PURE__ */ Y({
|
|
7
7
|
name: "Button",
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "Button",
|
|
10
10
|
props: {
|
|
11
11
|
type: { default: "primary" },
|
|
12
12
|
size: { default: "medium" },
|
|
13
|
+
width: {},
|
|
13
14
|
plain: { type: Boolean },
|
|
14
15
|
text: { type: Boolean },
|
|
15
16
|
disabled: { type: Boolean },
|
|
@@ -23,7 +24,7 @@ const ne = {
|
|
|
23
24
|
isActive: { type: Boolean }
|
|
24
25
|
},
|
|
25
26
|
setup(e) {
|
|
26
|
-
const t = e,
|
|
27
|
+
const t = e, r = h(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), n = h(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), a = h(() => t.width ? { width: t.width } : void 0), i = h(() => {
|
|
27
28
|
if (t.plain || t.text)
|
|
28
29
|
switch (t.type) {
|
|
29
30
|
case "primary":
|
|
@@ -40,8 +41,8 @@ const ne = {
|
|
|
40
41
|
else
|
|
41
42
|
return t.type === "secondary" ? "var(--material-foreground-base-secondary)" : t.type === "foreground" ? "var(--text-face-primary)" : t.type === "sameWhite" ? "var(--text-same-black)" : "var(--material-same-white)";
|
|
42
43
|
});
|
|
43
|
-
return (
|
|
44
|
-
|
|
44
|
+
return (s, o) => e.icon || s.$slots.icon ? (y(), O("div", br, [
|
|
45
|
+
E("button", xe(s.$attrs, {
|
|
45
46
|
class: ["cregis-button__icon", {
|
|
46
47
|
[`cregis-button__icon--${e.iconType}`]: e.iconType,
|
|
47
48
|
[`cregis-button__icon--${e.size}`]: e.size,
|
|
@@ -50,16 +51,16 @@ const ne = {
|
|
|
50
51
|
}],
|
|
51
52
|
disabled: e.disabled || e.loading
|
|
52
53
|
}), [
|
|
53
|
-
e.icon ? (
|
|
54
|
+
e.icon ? (y(), We(It(e.icon), {
|
|
54
55
|
key: 0,
|
|
55
|
-
size:
|
|
56
|
-
}, null, 8, ["size"])) :
|
|
57
|
-
], 16,
|
|
58
|
-
e.iconText ? (
|
|
56
|
+
size: r.value
|
|
57
|
+
}, null, 8, ["size"])) : q(s.$slots, "icon", { key: 1 })
|
|
58
|
+
], 16, yr),
|
|
59
|
+
e.iconText ? (y(), O("span", {
|
|
59
60
|
key: 0,
|
|
60
|
-
class:
|
|
61
|
-
},
|
|
62
|
-
])) : e.link ? (
|
|
61
|
+
class: j(["cregis-button__icon-text", { "is-disabled": e.disabled }])
|
|
62
|
+
}, _(e.iconText), 3)) : I("", !0)
|
|
63
|
+
])) : e.link ? (y(), O("button", xe({ key: 1 }, s.$attrs, {
|
|
63
64
|
class: ["cregis-button__link", {
|
|
64
65
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
65
66
|
[`cregis-button__link--${e.size}`]: e.size,
|
|
@@ -68,11 +69,12 @@ const ne = {
|
|
|
68
69
|
}],
|
|
69
70
|
disabled: e.disabled || e.loading
|
|
70
71
|
}), [
|
|
71
|
-
|
|
72
|
-
], 16,
|
|
72
|
+
q(s.$slots, "default")
|
|
73
|
+
], 16, wr)) : (y(), O("button", xe({
|
|
73
74
|
key: 2,
|
|
74
75
|
ref: "buttonRef"
|
|
75
|
-
},
|
|
76
|
+
}, s.$attrs, {
|
|
77
|
+
style: a.value,
|
|
76
78
|
class: ["cregis-button", {
|
|
77
79
|
[`cregis-button--${e.type}`]: e.type,
|
|
78
80
|
[`cregis-button--${e.size}`]: e.size,
|
|
@@ -86,24 +88,24 @@ const ne = {
|
|
|
86
88
|
}],
|
|
87
89
|
disabled: e.disabled || e.loading
|
|
88
90
|
}), [
|
|
89
|
-
e.loading ? (
|
|
91
|
+
e.loading ? (y(), We(ae(vr), {
|
|
90
92
|
key: 0,
|
|
91
93
|
class: "loading",
|
|
92
|
-
size:
|
|
93
|
-
color:
|
|
94
|
-
}, null, 8, ["size", "color"])) :
|
|
95
|
-
], 16,
|
|
94
|
+
size: n.value,
|
|
95
|
+
color: i.value
|
|
96
|
+
}, null, 8, ["size", "color"])) : q(s.$slots, "default", { key: 1 })
|
|
97
|
+
], 16, xr));
|
|
96
98
|
}
|
|
97
|
-
}),
|
|
99
|
+
}), $r = {
|
|
98
100
|
key: 0,
|
|
99
101
|
class: "cregis-input__prefix"
|
|
100
|
-
},
|
|
102
|
+
}, Or = ["type", "placeholder", "disabled"], kr = {
|
|
101
103
|
key: 2,
|
|
102
104
|
class: "cregis-input__suffix"
|
|
103
|
-
},
|
|
105
|
+
}, Tr = ["disabled", "placeholder", "rows"], Cr = {
|
|
104
106
|
key: 0,
|
|
105
107
|
class: "cregis-textarea__buttons"
|
|
106
|
-
},
|
|
108
|
+
}, Yt = /* @__PURE__ */ Y({
|
|
107
109
|
name: "Input",
|
|
108
110
|
inheritAttrs: !1,
|
|
109
111
|
__name: "Input",
|
|
@@ -120,154 +122,154 @@ const ne = {
|
|
|
120
122
|
rows: { default: 3 }
|
|
121
123
|
},
|
|
122
124
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
|
|
123
|
-
setup(e, { expose: t, emit:
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
() =>
|
|
127
|
-
(
|
|
128
|
-
|
|
125
|
+
setup(e, { expose: t, emit: r }) {
|
|
126
|
+
const n = e, a = r, i = M(n.modelValue);
|
|
127
|
+
J(
|
|
128
|
+
() => n.modelValue,
|
|
129
|
+
(f) => {
|
|
130
|
+
i.value = f;
|
|
129
131
|
}
|
|
130
132
|
);
|
|
131
|
-
const
|
|
132
|
-
let
|
|
133
|
-
const
|
|
134
|
-
await
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
if (!
|
|
148
|
-
const
|
|
149
|
-
|
|
133
|
+
const s = M(), o = M(0), l = M(!1);
|
|
134
|
+
let d = null;
|
|
135
|
+
const c = async () => {
|
|
136
|
+
await Ye(), s.value?.focus();
|
|
137
|
+
}, w = async () => {
|
|
138
|
+
a("update:modelValue", i.value), a("input", i.value), await Ye(), S();
|
|
139
|
+
}, k = () => {
|
|
140
|
+
a("change", i.value);
|
|
141
|
+
}, v = (f) => {
|
|
142
|
+
l.value = !0, a("focus", f);
|
|
143
|
+
}, C = (f) => {
|
|
144
|
+
l.value = !1, a("blur", f);
|
|
145
|
+
}, x = h(() => n.clearable && !n.disabled && !!i.value && l.value), $ = () => {
|
|
146
|
+
i.value = "", a("update:modelValue", ""), a("clear"), a("input", ""), a("change", "");
|
|
147
|
+
}, S = () => {
|
|
148
|
+
d && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
149
|
+
if (!s.value || s.value.tagName !== "INPUT") return;
|
|
150
|
+
const f = s.value, m = f.value, u = document.createElement("span");
|
|
151
|
+
u.style.position = "absolute", u.style.visibility = "hidden", u.style.whiteSpace = "pre", u.style.font = window.getComputedStyle(f).font, u.style.letterSpacing = window.getComputedStyle(f).letterSpacing, u.textContent = m || " ", document.body.appendChild(u), o.value = u.getBoundingClientRect().width, document.body.removeChild(u);
|
|
150
152
|
});
|
|
151
|
-
},
|
|
152
|
-
const
|
|
153
|
-
return
|
|
154
|
-
}),
|
|
153
|
+
}, V = h(() => {
|
|
154
|
+
const f = {};
|
|
155
|
+
return o.value > 0 && (f.position = "absolute", f.left = `${o.value + 16}px`), f;
|
|
156
|
+
}), A = async () => {
|
|
155
157
|
try {
|
|
156
|
-
|
|
157
|
-
} catch (
|
|
158
|
-
console.error("paste error:",
|
|
158
|
+
i.value = await navigator.clipboard.readText();
|
|
159
|
+
} catch (f) {
|
|
160
|
+
console.error("paste error:", f);
|
|
159
161
|
}
|
|
160
162
|
};
|
|
161
163
|
return t({
|
|
162
|
-
focus:
|
|
163
|
-
updateTextWidth:
|
|
164
|
-
}), (
|
|
164
|
+
focus: c,
|
|
165
|
+
updateTextWidth: S
|
|
166
|
+
}), (f, m) => e.type !== "textarea" ? (y(), O("div", {
|
|
165
167
|
key: 0,
|
|
166
|
-
class:
|
|
168
|
+
class: j(["cregis-input", {
|
|
167
169
|
[`cregis-input--${e.size}`]: e.size,
|
|
168
170
|
"is-disabled": e.disabled,
|
|
169
|
-
"is-prefix":
|
|
170
|
-
"is-suffix":
|
|
171
|
+
"is-prefix": f.$slots.prefix,
|
|
172
|
+
"is-suffix": f.$slots.suffix
|
|
171
173
|
}]),
|
|
172
|
-
style:
|
|
174
|
+
style: pe([{ width: e.width }, e.inputStyle])
|
|
173
175
|
}, [
|
|
174
|
-
|
|
175
|
-
class:
|
|
176
|
+
E("div", {
|
|
177
|
+
class: j(["cregis-input__wrapper", { "is-focus": l.value }])
|
|
176
178
|
}, [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
])) :
|
|
180
|
-
|
|
179
|
+
f.$slots.prefix ? (y(), O("span", $r, [
|
|
180
|
+
q(f.$slots, "prefix")
|
|
181
|
+
])) : I("", !0),
|
|
182
|
+
Le(E("input", xe({
|
|
181
183
|
class: "cregis-input__inner",
|
|
182
|
-
"onUpdate:modelValue":
|
|
184
|
+
"onUpdate:modelValue": m[0] || (m[0] = (u) => i.value = u),
|
|
183
185
|
ref_key: "inputRef",
|
|
184
|
-
ref:
|
|
186
|
+
ref: s,
|
|
185
187
|
type: e.type,
|
|
186
188
|
placeholder: e.placeholder
|
|
187
|
-
},
|
|
189
|
+
}, f.$attrs, {
|
|
188
190
|
disabled: e.disabled,
|
|
189
|
-
onInput:
|
|
190
|
-
onChange:
|
|
191
|
-
onFocus:
|
|
192
|
-
onBlur:
|
|
193
|
-
}), null, 16,
|
|
194
|
-
[
|
|
191
|
+
onInput: w,
|
|
192
|
+
onChange: k,
|
|
193
|
+
onFocus: v,
|
|
194
|
+
onBlur: C
|
|
195
|
+
}), null, 16, Or), [
|
|
196
|
+
[ur, i.value]
|
|
195
197
|
]),
|
|
196
|
-
e.unit &&
|
|
198
|
+
e.unit && i.value ? (y(), O("span", {
|
|
197
199
|
key: 1,
|
|
198
|
-
style:
|
|
200
|
+
style: pe(V.value),
|
|
199
201
|
class: "cregis-input__unit"
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
}, _(e.unit), 5)) : I("", !0),
|
|
203
|
+
f.$slots.suffix || x.value ? (y(), O("span", kr, [
|
|
204
|
+
q(f.$slots, "suffix"),
|
|
205
|
+
x.value ? (y(), We(Ue, {
|
|
204
206
|
key: 0,
|
|
205
|
-
icon:
|
|
207
|
+
icon: ae(mr),
|
|
206
208
|
"icon-type": "square",
|
|
207
|
-
onClick:
|
|
208
|
-
onMousedown:
|
|
209
|
+
onClick: $,
|
|
210
|
+
onMousedown: m[1] || (m[1] = dr(() => {
|
|
209
211
|
}, ["prevent"]))
|
|
210
|
-
}, null, 8, ["icon"])) :
|
|
211
|
-
])) :
|
|
212
|
+
}, null, 8, ["icon"])) : I("", !0)
|
|
213
|
+
])) : I("", !0)
|
|
212
214
|
], 2)
|
|
213
|
-
], 6)) : (
|
|
215
|
+
], 6)) : (y(), O("div", {
|
|
214
216
|
key: 1,
|
|
215
|
-
class:
|
|
216
|
-
style:
|
|
217
|
+
class: j(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
218
|
+
style: pe([{ width: e.width }, e.inputStyle])
|
|
217
219
|
}, [
|
|
218
|
-
|
|
220
|
+
Le(E("textarea", xe({ class: "cregis-textarea__wrapper" }, f.$attrs, {
|
|
219
221
|
ref_key: "inputRef",
|
|
220
|
-
ref:
|
|
222
|
+
ref: s,
|
|
221
223
|
disabled: e.disabled,
|
|
222
224
|
placeholder: e.placeholder,
|
|
223
225
|
rows: e.rows,
|
|
224
|
-
"onUpdate:modelValue":
|
|
225
|
-
onInput:
|
|
226
|
-
onChange:
|
|
227
|
-
onFocus:
|
|
228
|
-
onBlur:
|
|
229
|
-
}), null, 16,
|
|
230
|
-
[
|
|
226
|
+
"onUpdate:modelValue": m[2] || (m[2] = (u) => i.value = u),
|
|
227
|
+
onInput: w,
|
|
228
|
+
onChange: k,
|
|
229
|
+
onFocus: v,
|
|
230
|
+
onBlur: C
|
|
231
|
+
}), null, 16, Tr), [
|
|
232
|
+
[fr, i.value]
|
|
231
233
|
]),
|
|
232
|
-
e.disabled ?
|
|
233
|
-
|
|
234
|
+
e.disabled ? I("", !0) : (y(), O("div", Cr, [
|
|
235
|
+
U(Ue, {
|
|
234
236
|
class: "cregis-textarea__button",
|
|
235
237
|
link: "",
|
|
236
238
|
size: "small",
|
|
237
|
-
onClick:
|
|
239
|
+
onClick: A
|
|
238
240
|
}, {
|
|
239
|
-
default:
|
|
240
|
-
|
|
241
|
+
default: Z(() => [...m[3] || (m[3] = [
|
|
242
|
+
Oe(" Paste ", -1)
|
|
241
243
|
])]),
|
|
242
244
|
_: 1
|
|
243
245
|
}),
|
|
244
|
-
|
|
246
|
+
U(Ue, {
|
|
245
247
|
class: "cregis-textarea__button",
|
|
246
248
|
link: "",
|
|
247
249
|
size: "small",
|
|
248
|
-
disabled: !
|
|
249
|
-
onClick:
|
|
250
|
+
disabled: !i.value,
|
|
251
|
+
onClick: $
|
|
250
252
|
}, {
|
|
251
|
-
default:
|
|
252
|
-
|
|
253
|
+
default: Z(() => [...m[4] || (m[4] = [
|
|
254
|
+
Oe(" Clear ", -1)
|
|
253
255
|
])]),
|
|
254
256
|
_: 1
|
|
255
257
|
}, 8, ["disabled"])
|
|
256
258
|
]))
|
|
257
259
|
], 6));
|
|
258
260
|
}
|
|
259
|
-
}),
|
|
261
|
+
}), Sr = ["width", "height"], Pr = {
|
|
260
262
|
stroke: "none",
|
|
261
263
|
"stroke-width": "1",
|
|
262
264
|
fill: "none",
|
|
263
265
|
"fill-rule": "evenodd"
|
|
264
|
-
},
|
|
266
|
+
}, Er = { transform: "translate(-394.000000, -457.000000)" }, Vr = { transform: "translate(394.000000, 457.000000)" }, Br = ["width", "height"], Rr = /* @__PURE__ */ Y({
|
|
265
267
|
__name: "checked-basis",
|
|
266
268
|
props: {
|
|
267
269
|
size: { default: "16px" }
|
|
268
270
|
},
|
|
269
271
|
setup(e) {
|
|
270
|
-
return (t,
|
|
272
|
+
return (t, r) => (y(), O("svg", {
|
|
271
273
|
width: e.size,
|
|
272
274
|
height: e.size,
|
|
273
275
|
viewBox: "0 0 16 16",
|
|
@@ -275,16 +277,16 @@ const ne = {
|
|
|
275
277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
276
278
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
277
279
|
}, [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
E("g", Pr, [
|
|
281
|
+
E("g", Er, [
|
|
282
|
+
E("g", Vr, [
|
|
283
|
+
E("rect", {
|
|
282
284
|
x: "0",
|
|
283
285
|
y: "0",
|
|
284
286
|
width: e.size,
|
|
285
287
|
height: e.size
|
|
286
|
-
}, null, 8,
|
|
287
|
-
|
|
288
|
+
}, null, 8, Br),
|
|
289
|
+
r[0] || (r[0] = E("path", {
|
|
288
290
|
d: "M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",
|
|
289
291
|
fill: "currentColor",
|
|
290
292
|
"fill-rule": "nonzero"
|
|
@@ -292,12 +294,12 @@ const ne = {
|
|
|
292
294
|
])
|
|
293
295
|
])
|
|
294
296
|
])
|
|
295
|
-
], 8,
|
|
297
|
+
], 8, Sr));
|
|
296
298
|
}
|
|
297
|
-
}),
|
|
299
|
+
}), Ar = {
|
|
298
300
|
key: 0,
|
|
299
301
|
class: "cregis-checkbox--indeterminate"
|
|
300
|
-
},
|
|
302
|
+
}, Gn = /* @__PURE__ */ Y({
|
|
301
303
|
name: "Checkbox",
|
|
302
304
|
__name: "Checkbox",
|
|
303
305
|
props: {
|
|
@@ -309,42 +311,42 @@ const ne = {
|
|
|
309
311
|
},
|
|
310
312
|
emits: ["update:modelValue", "change"],
|
|
311
313
|
setup(e, { emit: t }) {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
+
const r = e, n = t, a = h(() => r.modelValue), i = () => {
|
|
315
|
+
r.disabled || n("update:modelValue", !a.value);
|
|
314
316
|
};
|
|
315
|
-
return
|
|
316
|
-
() =>
|
|
317
|
+
return J(
|
|
318
|
+
() => a.value,
|
|
317
319
|
() => {
|
|
318
|
-
|
|
320
|
+
n("change", a.value);
|
|
319
321
|
}
|
|
320
|
-
), (
|
|
322
|
+
), (s, o) => (y(), O("div", {
|
|
321
323
|
class: "cregis-checkbox__wrapper",
|
|
322
|
-
onClick:
|
|
324
|
+
onClick: i
|
|
323
325
|
}, [
|
|
324
|
-
|
|
325
|
-
class:
|
|
326
|
+
E("div", {
|
|
327
|
+
class: j(["cregis-checkbox", {
|
|
326
328
|
"is-disabled": e.disabled,
|
|
327
|
-
"is-checked":
|
|
329
|
+
"is-checked": a.value,
|
|
328
330
|
"is-circle": e.circle,
|
|
329
331
|
"is-indeterminate": e.indeterminate
|
|
330
332
|
}])
|
|
331
333
|
}, [
|
|
332
|
-
e.indeterminate ? (
|
|
334
|
+
e.indeterminate ? (y(), O("div", Ar)) : (y(), We(Rr, {
|
|
333
335
|
key: 1,
|
|
334
336
|
size: "10px"
|
|
335
337
|
}))
|
|
336
338
|
], 2),
|
|
337
|
-
|
|
339
|
+
s.$slots.default || e.label ? (y(), O("span", {
|
|
338
340
|
key: 0,
|
|
339
|
-
class:
|
|
341
|
+
class: j(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
340
342
|
}, [
|
|
341
|
-
|
|
342
|
-
|
|
343
|
+
q(s.$slots, "default", {}, () => [
|
|
344
|
+
Oe(_(e.label), 1)
|
|
343
345
|
])
|
|
344
|
-
], 2)) :
|
|
346
|
+
], 2)) : I("", !0)
|
|
345
347
|
]));
|
|
346
348
|
}
|
|
347
|
-
}),
|
|
349
|
+
}), Zn = /* @__PURE__ */ Y({
|
|
348
350
|
name: "Radio",
|
|
349
351
|
__name: "Radio",
|
|
350
352
|
props: {
|
|
@@ -355,32 +357,32 @@ const ne = {
|
|
|
355
357
|
},
|
|
356
358
|
emits: ["update:modelValue", "change"],
|
|
357
359
|
setup(e, { emit: t }) {
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
+
const r = e, n = t, a = h(() => r.modelValue === r.value), i = () => {
|
|
361
|
+
r.disabled || (n("update:modelValue", r.value), n("change", r.value));
|
|
360
362
|
};
|
|
361
|
-
return (
|
|
363
|
+
return (s, o) => (y(), O("div", {
|
|
362
364
|
class: "cregis-radio__wrapper",
|
|
363
|
-
onClick:
|
|
365
|
+
onClick: i
|
|
364
366
|
}, [
|
|
365
|
-
|
|
366
|
-
class:
|
|
367
|
+
E("div", {
|
|
368
|
+
class: j(["cregis-radio", {
|
|
367
369
|
"is-disabled": e.disabled,
|
|
368
|
-
"is-checked":
|
|
370
|
+
"is-checked": a.value
|
|
369
371
|
}])
|
|
370
|
-
}, [...
|
|
371
|
-
|
|
372
|
+
}, [...o[0] || (o[0] = [
|
|
373
|
+
E("div", { class: "cregis-radio__inner" }, null, -1)
|
|
372
374
|
])], 2),
|
|
373
|
-
|
|
375
|
+
s.$slots.default || e.label ? (y(), O("span", {
|
|
374
376
|
key: 0,
|
|
375
|
-
class:
|
|
377
|
+
class: j(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
376
378
|
}, [
|
|
377
|
-
|
|
378
|
-
|
|
379
|
+
q(s.$slots, "default", {}, () => [
|
|
380
|
+
Oe(_(e.label), 1)
|
|
379
381
|
])
|
|
380
|
-
], 2)) :
|
|
382
|
+
], 2)) : I("", !0)
|
|
381
383
|
]));
|
|
382
384
|
}
|
|
383
|
-
}),
|
|
385
|
+
}), Jn = /* @__PURE__ */ Y({
|
|
384
386
|
name: "Divider",
|
|
385
387
|
__name: "Divider",
|
|
386
388
|
props: {
|
|
@@ -392,33 +394,33 @@ const ne = {
|
|
|
392
394
|
length: {}
|
|
393
395
|
},
|
|
394
396
|
setup(e) {
|
|
395
|
-
const t = e,
|
|
397
|
+
const t = e, r = h(() => {
|
|
396
398
|
if (Array.isArray(t.margin)) {
|
|
397
|
-
const [
|
|
398
|
-
return t.direction === "horizontal" ? `${
|
|
399
|
+
const [a, i] = t.margin;
|
|
400
|
+
return t.direction === "horizontal" ? `${a} 0 ${i} 0` : `0 ${i} 0 ${a}`;
|
|
399
401
|
} else
|
|
400
402
|
return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
|
|
401
|
-
}),
|
|
403
|
+
}), n = h(() => t.direction === "horizontal" ? {
|
|
402
404
|
width: t.length || "100%",
|
|
403
405
|
borderTopWidth: t.lineThickness,
|
|
404
406
|
borderTopStyle: t.borderStyle,
|
|
405
407
|
borderTopColor: t.color,
|
|
406
|
-
margin:
|
|
408
|
+
margin: r.value
|
|
407
409
|
} : {
|
|
408
410
|
height: t.length || "1rem",
|
|
409
411
|
borderLeftWidth: t.lineThickness,
|
|
410
412
|
borderLeftStyle: t.borderStyle,
|
|
411
413
|
borderLeftColor: t.color,
|
|
412
|
-
margin:
|
|
414
|
+
margin: r.value
|
|
413
415
|
});
|
|
414
|
-
return (
|
|
415
|
-
class:
|
|
416
|
+
return (a, i) => (y(), O("div", {
|
|
417
|
+
class: j(["cregis-divider", {
|
|
416
418
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
417
419
|
}]),
|
|
418
|
-
style:
|
|
420
|
+
style: pe(n.value)
|
|
419
421
|
}, null, 6));
|
|
420
422
|
}
|
|
421
|
-
}),
|
|
423
|
+
}), Kt = Symbol("TABS_KEY"), Dr = ["onClick"], zr = { style: { display: "none" } }, ei = /* @__PURE__ */ Y({
|
|
422
424
|
name: "Tabs",
|
|
423
425
|
__name: "Tabs",
|
|
424
426
|
props: {
|
|
@@ -428,12 +430,12 @@ const ne = {
|
|
|
428
430
|
},
|
|
429
431
|
emits: ["update:modelValue"],
|
|
430
432
|
setup(e) {
|
|
431
|
-
const t = e,
|
|
432
|
-
|
|
433
|
-
},
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
},
|
|
433
|
+
const t = e, r = je([]), n = (s) => {
|
|
434
|
+
r.some((o) => o.name === s.name) || r.push(s);
|
|
435
|
+
}, a = (s) => {
|
|
436
|
+
const o = r.findIndex((l) => l.name === s);
|
|
437
|
+
o !== -1 && r.splice(o, 1);
|
|
438
|
+
}, i = h(() => t.type === "card" ? t.size === "large" ? {
|
|
437
439
|
borderRadius: "13px"
|
|
438
440
|
} : t.size === "medium" ? {
|
|
439
441
|
borderRadius: "11px"
|
|
@@ -442,30 +444,30 @@ const ne = {
|
|
|
442
444
|
} : {
|
|
443
445
|
borderRadius: 0
|
|
444
446
|
});
|
|
445
|
-
return
|
|
446
|
-
activeName:
|
|
447
|
-
registerTab:
|
|
448
|
-
unregisterTab:
|
|
449
|
-
}), (
|
|
450
|
-
class:
|
|
447
|
+
return Nt(Kt, {
|
|
448
|
+
activeName: pr(t, "modelValue"),
|
|
449
|
+
registerTab: n,
|
|
450
|
+
unregisterTab: a
|
|
451
|
+
}), (s, o) => (y(), O("div", {
|
|
452
|
+
class: j(["cregis-tabs", {
|
|
451
453
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
452
454
|
[`cregis-tabs--${e.size}`]: e.size
|
|
453
455
|
}])
|
|
454
456
|
}, [
|
|
455
|
-
(
|
|
456
|
-
key:
|
|
457
|
-
class:
|
|
458
|
-
style:
|
|
459
|
-
onClick: (
|
|
457
|
+
(y(!0), O(st, null, lt(r, (l) => (y(), O("div", {
|
|
458
|
+
key: l.name,
|
|
459
|
+
class: j(["cregis-tabs__item", { "is-active": e.modelValue === l.name }]),
|
|
460
|
+
style: pe(i.value),
|
|
461
|
+
onClick: (d) => s.$emit("update:modelValue", l.name)
|
|
460
462
|
}, [
|
|
461
|
-
|
|
462
|
-
], 14,
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
E("span", null, _(l.label), 1)
|
|
464
|
+
], 14, Dr))), 128)),
|
|
465
|
+
E("div", zr, [
|
|
466
|
+
q(s.$slots, "default")
|
|
465
467
|
])
|
|
466
468
|
], 2));
|
|
467
469
|
}
|
|
468
|
-
}),
|
|
470
|
+
}), ti = /* @__PURE__ */ Y({
|
|
469
471
|
name: "TabPane",
|
|
470
472
|
__name: "TabPane",
|
|
471
473
|
props: {
|
|
@@ -473,28 +475,1882 @@ const ne = {
|
|
|
473
475
|
name: {}
|
|
474
476
|
},
|
|
475
477
|
setup(e) {
|
|
476
|
-
const t = e,
|
|
477
|
-
if (!
|
|
478
|
-
return
|
|
479
|
-
|
|
480
|
-
}),
|
|
478
|
+
const t = e, r = Ft(Kt);
|
|
479
|
+
if (!r) throw new Error("TabPane must be used within Tabs");
|
|
480
|
+
return Je(() => {
|
|
481
|
+
r.registerTab({ label: t.label, name: t.name });
|
|
482
|
+
}), J(
|
|
481
483
|
() => t.label,
|
|
482
|
-
(
|
|
483
|
-
|
|
484
|
+
(n) => {
|
|
485
|
+
r.unregisterTab(t.name), r.registerTab({ label: n, name: t.name });
|
|
486
|
+
}
|
|
487
|
+
), Ve(() => {
|
|
488
|
+
r.unregisterTab(t.name);
|
|
489
|
+
}), (n, a) => null;
|
|
490
|
+
}
|
|
491
|
+
}), Wr = { class: "cregis-message__wrapper" }, Lr = {
|
|
492
|
+
key: 0,
|
|
493
|
+
class: "cregis-message",
|
|
494
|
+
role: "status",
|
|
495
|
+
"aria-live": "polite"
|
|
496
|
+
}, jr = /* @__PURE__ */ Y({
|
|
497
|
+
name: "Message",
|
|
498
|
+
__name: "Message",
|
|
499
|
+
props: {
|
|
500
|
+
message: {},
|
|
501
|
+
duration: { default: 1e3 },
|
|
502
|
+
onVanish: {}
|
|
503
|
+
},
|
|
504
|
+
setup(e) {
|
|
505
|
+
const t = e, r = M(!1);
|
|
506
|
+
let n;
|
|
507
|
+
const a = () => {
|
|
508
|
+
n = window.setTimeout(() => {
|
|
509
|
+
r.value = !1;
|
|
510
|
+
}, t.duration);
|
|
511
|
+
}, i = () => {
|
|
512
|
+
t.onVanish?.();
|
|
513
|
+
};
|
|
514
|
+
return Ht(() => {
|
|
515
|
+
n !== void 0 && clearTimeout(n);
|
|
516
|
+
}), Ye(() => {
|
|
517
|
+
r.value = !0;
|
|
518
|
+
}), (s, o) => (y(), O("div", Wr, [
|
|
519
|
+
U(pt, {
|
|
520
|
+
name: "cregis-message",
|
|
521
|
+
onAfterEnter: a,
|
|
522
|
+
onAfterLeave: i
|
|
523
|
+
}, {
|
|
524
|
+
default: Z(() => [
|
|
525
|
+
r.value ? (y(), O("div", Lr, _(e.message), 1)) : I("", !0)
|
|
526
|
+
]),
|
|
527
|
+
_: 1
|
|
528
|
+
})
|
|
529
|
+
]));
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
let nt = !1;
|
|
533
|
+
function Mr(e) {
|
|
534
|
+
return typeof e == "string" ? { message: e, duration: 1e3 } : {
|
|
535
|
+
message: e.message,
|
|
536
|
+
duration: e.duration ?? 1e3
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
function ri(e) {
|
|
540
|
+
if (nt) return;
|
|
541
|
+
const { message: t, duration: r } = Mr(e);
|
|
542
|
+
nt = !0;
|
|
543
|
+
const n = document.createElement("div");
|
|
544
|
+
document.body.appendChild(n), Ke(
|
|
545
|
+
qt(jr, {
|
|
546
|
+
message: t,
|
|
547
|
+
duration: r,
|
|
548
|
+
onVanish: () => {
|
|
549
|
+
nt = !1, Ke(null, n), n.remove();
|
|
550
|
+
}
|
|
551
|
+
}),
|
|
552
|
+
n
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
const _r = { class: "cregis-notification__wrapper" }, Ir = {
|
|
556
|
+
key: 0,
|
|
557
|
+
class: "cregis-notification",
|
|
558
|
+
role: "status",
|
|
559
|
+
"aria-live": "polite"
|
|
560
|
+
}, Nr = { class: "cregis-notification__content" }, Fr = { class: "cregis-notification__title" }, Hr = { class: "cregis-notification__message" }, qr = /* @__PURE__ */ Y({
|
|
561
|
+
name: "Notification",
|
|
562
|
+
__name: "Notification",
|
|
563
|
+
props: {
|
|
564
|
+
title: {},
|
|
565
|
+
message: {},
|
|
566
|
+
btnText: {},
|
|
567
|
+
type: { default: "error" },
|
|
568
|
+
onVanish: {}
|
|
569
|
+
},
|
|
570
|
+
setup(e) {
|
|
571
|
+
const t = e, r = M(!1), n = () => {
|
|
572
|
+
r.value = !1;
|
|
573
|
+
}, a = () => {
|
|
574
|
+
t.onVanish?.();
|
|
575
|
+
};
|
|
576
|
+
return Ht(() => {
|
|
577
|
+
}), Ye(() => {
|
|
578
|
+
r.value = !0;
|
|
579
|
+
}), (i, s) => (y(), O("div", _r, [
|
|
580
|
+
U(pt, {
|
|
581
|
+
name: "cregis-notification",
|
|
582
|
+
onAfterLeave: a
|
|
583
|
+
}, {
|
|
584
|
+
default: Z(() => [
|
|
585
|
+
r.value ? (y(), O("div", Ir, [
|
|
586
|
+
(y(), We(It(ae(gr)), {
|
|
587
|
+
size: "18px",
|
|
588
|
+
color: "var(--material-vibrant-error-primary)"
|
|
589
|
+
})),
|
|
590
|
+
E("div", Nr, [
|
|
591
|
+
E("div", Fr, _(e.title), 1),
|
|
592
|
+
E("div", Hr, _(e.message), 1)
|
|
593
|
+
]),
|
|
594
|
+
U(Ue, {
|
|
595
|
+
type: "sameWhite",
|
|
596
|
+
onClick: n
|
|
597
|
+
}, {
|
|
598
|
+
default: Z(() => [
|
|
599
|
+
Oe(_(e.btnText), 1)
|
|
600
|
+
]),
|
|
601
|
+
_: 1
|
|
602
|
+
})
|
|
603
|
+
])) : I("", !0)
|
|
604
|
+
]),
|
|
605
|
+
_: 1
|
|
606
|
+
})
|
|
607
|
+
]));
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
let it = !1;
|
|
611
|
+
function ai(e) {
|
|
612
|
+
if (it) return;
|
|
613
|
+
const { title: t, message: r, type: n, btnText: a } = e;
|
|
614
|
+
it = !0;
|
|
615
|
+
const i = document.createElement("div");
|
|
616
|
+
document.body.appendChild(i), Ke(
|
|
617
|
+
qt(qr, {
|
|
618
|
+
title: t,
|
|
619
|
+
message: r,
|
|
620
|
+
type: n,
|
|
621
|
+
btnText: a,
|
|
622
|
+
onVanish: () => {
|
|
623
|
+
it = !1, Ke(null, i), i.remove();
|
|
624
|
+
}
|
|
625
|
+
}),
|
|
626
|
+
i
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
const Ur = { class: "cregis-progress__wrapper" }, Xr = { class: "cregis-progress__track-wrap" }, Yr = { class: "cregis-progress cregis-progress--striped active" }, Kr = {
|
|
630
|
+
key: 0,
|
|
631
|
+
class: "cregis-progress__sliding-block"
|
|
632
|
+
}, ni = /* @__PURE__ */ Y({
|
|
633
|
+
name: "Progress",
|
|
634
|
+
__name: "Progress",
|
|
635
|
+
props: {
|
|
636
|
+
percentage: {},
|
|
637
|
+
strokeWidth: { default: 12 },
|
|
638
|
+
showPercentage: { type: Boolean, default: !0 }
|
|
639
|
+
},
|
|
640
|
+
setup(e) {
|
|
641
|
+
const t = e, r = h(() => Math.min(100, Math.max(0, t.percentage - 1))), n = h(() => ({
|
|
642
|
+
width: `${t.percentage}%`,
|
|
643
|
+
height: `${t.strokeWidth}px`
|
|
644
|
+
})), a = h(() => ({
|
|
645
|
+
"--cregis-progress-tip-left": `${r.value}%`
|
|
646
|
+
})), i = h(() => `${Math.round(t.percentage)}%`);
|
|
647
|
+
return (s, o) => (y(), O("div", Ur, [
|
|
648
|
+
E("div", Xr, [
|
|
649
|
+
e.showPercentage && t.percentage > 0 ? (y(), O("div", {
|
|
650
|
+
key: 0,
|
|
651
|
+
class: "cregis-progress__tip",
|
|
652
|
+
style: pe(a.value),
|
|
653
|
+
"aria-live": "polite"
|
|
654
|
+
}, _(i.value), 5)) : I("", !0),
|
|
655
|
+
E("div", Yr, [
|
|
656
|
+
E("div", {
|
|
657
|
+
class: "cregis-progress__bar",
|
|
658
|
+
style: pe(n.value)
|
|
659
|
+
}, null, 4),
|
|
660
|
+
t.percentage === 0 ? (y(), O("div", Kr)) : I("", !0)
|
|
661
|
+
])
|
|
662
|
+
])
|
|
663
|
+
]));
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
var ee = "top", ie = "bottom", oe = "right", te = "left", mt = "auto", Ie = [ee, ie, oe, te], Ce = "start", Me = "end", Qr = "clippingParents", Qt = "viewport", Re = "popper", Gr = "reference", Et = /* @__PURE__ */ Ie.reduce(function(e, t) {
|
|
667
|
+
return e.concat([t + "-" + Ce, t + "-" + Me]);
|
|
668
|
+
}, []), Gt = /* @__PURE__ */ [].concat(Ie, [mt]).reduce(function(e, t) {
|
|
669
|
+
return e.concat([t, t + "-" + Ce, t + "-" + Me]);
|
|
670
|
+
}, []), Zr = "beforeRead", Jr = "read", ea = "afterRead", ta = "beforeMain", ra = "main", aa = "afterMain", na = "beforeWrite", ia = "write", oa = "afterWrite", sa = [Zr, Jr, ea, ta, ra, aa, na, ia, oa];
|
|
671
|
+
function me(e) {
|
|
672
|
+
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
673
|
+
}
|
|
674
|
+
function re(e) {
|
|
675
|
+
if (e == null)
|
|
676
|
+
return window;
|
|
677
|
+
if (e.toString() !== "[object Window]") {
|
|
678
|
+
var t = e.ownerDocument;
|
|
679
|
+
return t && t.defaultView || window;
|
|
680
|
+
}
|
|
681
|
+
return e;
|
|
682
|
+
}
|
|
683
|
+
function ke(e) {
|
|
684
|
+
var t = re(e).Element;
|
|
685
|
+
return e instanceof t || e instanceof Element;
|
|
686
|
+
}
|
|
687
|
+
function ne(e) {
|
|
688
|
+
var t = re(e).HTMLElement;
|
|
689
|
+
return e instanceof t || e instanceof HTMLElement;
|
|
690
|
+
}
|
|
691
|
+
function gt(e) {
|
|
692
|
+
if (typeof ShadowRoot > "u")
|
|
693
|
+
return !1;
|
|
694
|
+
var t = re(e).ShadowRoot;
|
|
695
|
+
return e instanceof t || e instanceof ShadowRoot;
|
|
696
|
+
}
|
|
697
|
+
function la(e) {
|
|
698
|
+
var t = e.state;
|
|
699
|
+
Object.keys(t.elements).forEach(function(r) {
|
|
700
|
+
var n = t.styles[r] || {}, a = t.attributes[r] || {}, i = t.elements[r];
|
|
701
|
+
!ne(i) || !me(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(s) {
|
|
702
|
+
var o = a[s];
|
|
703
|
+
o === !1 ? i.removeAttribute(s) : i.setAttribute(s, o === !0 ? "" : o);
|
|
704
|
+
}));
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
function ca(e) {
|
|
708
|
+
var t = e.state, r = {
|
|
709
|
+
popper: {
|
|
710
|
+
position: t.options.strategy,
|
|
711
|
+
left: "0",
|
|
712
|
+
top: "0",
|
|
713
|
+
margin: "0"
|
|
714
|
+
},
|
|
715
|
+
arrow: {
|
|
716
|
+
position: "absolute"
|
|
717
|
+
},
|
|
718
|
+
reference: {}
|
|
719
|
+
};
|
|
720
|
+
return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
|
|
721
|
+
Object.keys(t.elements).forEach(function(n) {
|
|
722
|
+
var a = t.elements[n], i = t.attributes[n] || {}, s = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), o = s.reduce(function(l, d) {
|
|
723
|
+
return l[d] = "", l;
|
|
724
|
+
}, {});
|
|
725
|
+
!ne(a) || !me(a) || (Object.assign(a.style, o), Object.keys(i).forEach(function(l) {
|
|
726
|
+
a.removeAttribute(l);
|
|
727
|
+
}));
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
const ua = {
|
|
732
|
+
name: "applyStyles",
|
|
733
|
+
enabled: !0,
|
|
734
|
+
phase: "write",
|
|
735
|
+
fn: la,
|
|
736
|
+
effect: ca,
|
|
737
|
+
requires: ["computeStyles"]
|
|
738
|
+
};
|
|
739
|
+
function ve(e) {
|
|
740
|
+
return e.split("-")[0];
|
|
741
|
+
}
|
|
742
|
+
var $e = Math.max, Qe = Math.min, Se = Math.round;
|
|
743
|
+
function ct() {
|
|
744
|
+
var e = navigator.userAgentData;
|
|
745
|
+
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
746
|
+
return t.brand + "/" + t.version;
|
|
747
|
+
}).join(" ") : navigator.userAgent;
|
|
748
|
+
}
|
|
749
|
+
function Zt() {
|
|
750
|
+
return !/^((?!chrome|android).)*safari/i.test(ct());
|
|
751
|
+
}
|
|
752
|
+
function Pe(e, t, r) {
|
|
753
|
+
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
754
|
+
var n = e.getBoundingClientRect(), a = 1, i = 1;
|
|
755
|
+
t && ne(e) && (a = e.offsetWidth > 0 && Se(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && Se(n.height) / e.offsetHeight || 1);
|
|
756
|
+
var s = ke(e) ? re(e) : window, o = s.visualViewport, l = !Zt() && r, d = (n.left + (l && o ? o.offsetLeft : 0)) / a, c = (n.top + (l && o ? o.offsetTop : 0)) / i, w = n.width / a, k = n.height / i;
|
|
757
|
+
return {
|
|
758
|
+
width: w,
|
|
759
|
+
height: k,
|
|
760
|
+
top: c,
|
|
761
|
+
right: d + w,
|
|
762
|
+
bottom: c + k,
|
|
763
|
+
left: d,
|
|
764
|
+
x: d,
|
|
765
|
+
y: c
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
function ht(e) {
|
|
769
|
+
var t = Pe(e), r = e.offsetWidth, n = e.offsetHeight;
|
|
770
|
+
return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
|
|
771
|
+
x: e.offsetLeft,
|
|
772
|
+
y: e.offsetTop,
|
|
773
|
+
width: r,
|
|
774
|
+
height: n
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
function Jt(e, t) {
|
|
778
|
+
var r = t.getRootNode && t.getRootNode();
|
|
779
|
+
if (e.contains(t))
|
|
780
|
+
return !0;
|
|
781
|
+
if (r && gt(r)) {
|
|
782
|
+
var n = t;
|
|
783
|
+
do {
|
|
784
|
+
if (n && e.isSameNode(n))
|
|
785
|
+
return !0;
|
|
786
|
+
n = n.parentNode || n.host;
|
|
787
|
+
} while (n);
|
|
788
|
+
}
|
|
789
|
+
return !1;
|
|
790
|
+
}
|
|
791
|
+
function ge(e) {
|
|
792
|
+
return re(e).getComputedStyle(e);
|
|
793
|
+
}
|
|
794
|
+
function da(e) {
|
|
795
|
+
return ["table", "td", "th"].indexOf(me(e)) >= 0;
|
|
796
|
+
}
|
|
797
|
+
function be(e) {
|
|
798
|
+
return ((ke(e) ? e.ownerDocument : (
|
|
799
|
+
// $FlowFixMe[prop-missing]
|
|
800
|
+
e.document
|
|
801
|
+
)) || window.document).documentElement;
|
|
802
|
+
}
|
|
803
|
+
function et(e) {
|
|
804
|
+
return me(e) === "html" ? e : (
|
|
805
|
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
806
|
+
// $FlowFixMe[incompatible-return]
|
|
807
|
+
// $FlowFixMe[prop-missing]
|
|
808
|
+
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
809
|
+
e.parentNode || // DOM Element detected
|
|
810
|
+
(gt(e) ? e.host : null) || // ShadowRoot detected
|
|
811
|
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
812
|
+
be(e)
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
function Vt(e) {
|
|
816
|
+
return !ne(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
817
|
+
ge(e).position === "fixed" ? null : e.offsetParent;
|
|
818
|
+
}
|
|
819
|
+
function fa(e) {
|
|
820
|
+
var t = /firefox/i.test(ct()), r = /Trident/i.test(ct());
|
|
821
|
+
if (r && ne(e)) {
|
|
822
|
+
var n = ge(e);
|
|
823
|
+
if (n.position === "fixed")
|
|
824
|
+
return null;
|
|
825
|
+
}
|
|
826
|
+
var a = et(e);
|
|
827
|
+
for (gt(a) && (a = a.host); ne(a) && ["html", "body"].indexOf(me(a)) < 0; ) {
|
|
828
|
+
var i = ge(a);
|
|
829
|
+
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
|
|
830
|
+
return a;
|
|
831
|
+
a = a.parentNode;
|
|
832
|
+
}
|
|
833
|
+
return null;
|
|
834
|
+
}
|
|
835
|
+
function Ne(e) {
|
|
836
|
+
for (var t = re(e), r = Vt(e); r && da(r) && ge(r).position === "static"; )
|
|
837
|
+
r = Vt(r);
|
|
838
|
+
return r && (me(r) === "html" || me(r) === "body" && ge(r).position === "static") ? t : r || fa(e) || t;
|
|
839
|
+
}
|
|
840
|
+
function bt(e) {
|
|
841
|
+
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
842
|
+
}
|
|
843
|
+
function De(e, t, r) {
|
|
844
|
+
return $e(e, Qe(t, r));
|
|
845
|
+
}
|
|
846
|
+
function pa(e, t, r) {
|
|
847
|
+
var n = De(e, t, r);
|
|
848
|
+
return n > r ? r : n;
|
|
849
|
+
}
|
|
850
|
+
function er() {
|
|
851
|
+
return {
|
|
852
|
+
top: 0,
|
|
853
|
+
right: 0,
|
|
854
|
+
bottom: 0,
|
|
855
|
+
left: 0
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
function tr(e) {
|
|
859
|
+
return Object.assign({}, er(), e);
|
|
860
|
+
}
|
|
861
|
+
function rr(e, t) {
|
|
862
|
+
return t.reduce(function(r, n) {
|
|
863
|
+
return r[n] = e, r;
|
|
864
|
+
}, {});
|
|
865
|
+
}
|
|
866
|
+
var va = function(t, r) {
|
|
867
|
+
return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
|
|
868
|
+
placement: r.placement
|
|
869
|
+
})) : t, tr(typeof t != "number" ? t : rr(t, Ie));
|
|
870
|
+
};
|
|
871
|
+
function ma(e) {
|
|
872
|
+
var t, r = e.state, n = e.name, a = e.options, i = r.elements.arrow, s = r.modifiersData.popperOffsets, o = ve(r.placement), l = bt(o), d = [te, oe].indexOf(o) >= 0, c = d ? "height" : "width";
|
|
873
|
+
if (!(!i || !s)) {
|
|
874
|
+
var w = va(a.padding, r), k = ht(i), v = l === "y" ? ee : te, C = l === "y" ? ie : oe, x = r.rects.reference[c] + r.rects.reference[l] - s[l] - r.rects.popper[c], $ = s[l] - r.rects.reference[l], S = Ne(i), V = S ? l === "y" ? S.clientHeight || 0 : S.clientWidth || 0 : 0, A = x / 2 - $ / 2, f = w[v], m = V - k[c] - w[C], u = V / 2 - k[c] / 2 + A, T = De(f, u, m), B = l;
|
|
875
|
+
r.modifiersData[n] = (t = {}, t[B] = T, t.centerOffset = T - u, t);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
function ga(e) {
|
|
879
|
+
var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
|
|
880
|
+
a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || Jt(t.elements.popper, a) && (t.elements.arrow = a));
|
|
881
|
+
}
|
|
882
|
+
const ha = {
|
|
883
|
+
name: "arrow",
|
|
884
|
+
enabled: !0,
|
|
885
|
+
phase: "main",
|
|
886
|
+
fn: ma,
|
|
887
|
+
effect: ga,
|
|
888
|
+
requires: ["popperOffsets"],
|
|
889
|
+
requiresIfExists: ["preventOverflow"]
|
|
890
|
+
};
|
|
891
|
+
function Ee(e) {
|
|
892
|
+
return e.split("-")[1];
|
|
893
|
+
}
|
|
894
|
+
var ba = {
|
|
895
|
+
top: "auto",
|
|
896
|
+
right: "auto",
|
|
897
|
+
bottom: "auto",
|
|
898
|
+
left: "auto"
|
|
899
|
+
};
|
|
900
|
+
function ya(e, t) {
|
|
901
|
+
var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
|
|
902
|
+
return {
|
|
903
|
+
x: Se(r * a) / a || 0,
|
|
904
|
+
y: Se(n * a) / a || 0
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
function Bt(e) {
|
|
908
|
+
var t, r = e.popper, n = e.popperRect, a = e.placement, i = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, w = e.isFixed, k = s.x, v = k === void 0 ? 0 : k, C = s.y, x = C === void 0 ? 0 : C, $ = typeof c == "function" ? c({
|
|
909
|
+
x: v,
|
|
910
|
+
y: x
|
|
911
|
+
}) : {
|
|
912
|
+
x: v,
|
|
913
|
+
y: x
|
|
914
|
+
};
|
|
915
|
+
v = $.x, x = $.y;
|
|
916
|
+
var S = s.hasOwnProperty("x"), V = s.hasOwnProperty("y"), A = te, f = ee, m = window;
|
|
917
|
+
if (d) {
|
|
918
|
+
var u = Ne(r), T = "clientHeight", B = "clientWidth";
|
|
919
|
+
if (u === re(r) && (u = be(r), ge(u).position !== "static" && o === "absolute" && (T = "scrollHeight", B = "scrollWidth")), u = u, a === ee || (a === te || a === oe) && i === Me) {
|
|
920
|
+
f = ie;
|
|
921
|
+
var D = w && u === m && m.visualViewport ? m.visualViewport.height : (
|
|
922
|
+
// $FlowFixMe[prop-missing]
|
|
923
|
+
u[T]
|
|
924
|
+
);
|
|
925
|
+
x -= D - n.height, x *= l ? 1 : -1;
|
|
926
|
+
}
|
|
927
|
+
if (a === te || (a === ee || a === ie) && i === Me) {
|
|
928
|
+
A = oe;
|
|
929
|
+
var W = w && u === m && m.visualViewport ? m.visualViewport.width : (
|
|
930
|
+
// $FlowFixMe[prop-missing]
|
|
931
|
+
u[B]
|
|
932
|
+
);
|
|
933
|
+
v -= W - n.width, v *= l ? 1 : -1;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
var b = Object.assign({
|
|
937
|
+
position: o
|
|
938
|
+
}, d && ba), R = c === !0 ? ya({
|
|
939
|
+
x: v,
|
|
940
|
+
y: x
|
|
941
|
+
}, re(r)) : {
|
|
942
|
+
x: v,
|
|
943
|
+
y: x
|
|
944
|
+
};
|
|
945
|
+
if (v = R.x, x = R.y, l) {
|
|
946
|
+
var z;
|
|
947
|
+
return Object.assign({}, b, (z = {}, z[f] = V ? "0" : "", z[A] = S ? "0" : "", z.transform = (m.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + x + "px)" : "translate3d(" + v + "px, " + x + "px, 0)", z));
|
|
948
|
+
}
|
|
949
|
+
return Object.assign({}, b, (t = {}, t[f] = V ? x + "px" : "", t[A] = S ? v + "px" : "", t.transform = "", t));
|
|
950
|
+
}
|
|
951
|
+
function wa(e) {
|
|
952
|
+
var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, i = r.adaptive, s = i === void 0 ? !0 : i, o = r.roundOffsets, l = o === void 0 ? !0 : o, d = {
|
|
953
|
+
placement: ve(t.placement),
|
|
954
|
+
variation: Ee(t.placement),
|
|
955
|
+
popper: t.elements.popper,
|
|
956
|
+
popperRect: t.rects.popper,
|
|
957
|
+
gpuAcceleration: a,
|
|
958
|
+
isFixed: t.options.strategy === "fixed"
|
|
959
|
+
};
|
|
960
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Bt(Object.assign({}, d, {
|
|
961
|
+
offsets: t.modifiersData.popperOffsets,
|
|
962
|
+
position: t.options.strategy,
|
|
963
|
+
adaptive: s,
|
|
964
|
+
roundOffsets: l
|
|
965
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Bt(Object.assign({}, d, {
|
|
966
|
+
offsets: t.modifiersData.arrow,
|
|
967
|
+
position: "absolute",
|
|
968
|
+
adaptive: !1,
|
|
969
|
+
roundOffsets: l
|
|
970
|
+
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
971
|
+
"data-popper-placement": t.placement
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
const xa = {
|
|
975
|
+
name: "computeStyles",
|
|
976
|
+
enabled: !0,
|
|
977
|
+
phase: "beforeWrite",
|
|
978
|
+
fn: wa,
|
|
979
|
+
data: {}
|
|
980
|
+
};
|
|
981
|
+
var qe = {
|
|
982
|
+
passive: !0
|
|
983
|
+
};
|
|
984
|
+
function $a(e) {
|
|
985
|
+
var t = e.state, r = e.instance, n = e.options, a = n.scroll, i = a === void 0 ? !0 : a, s = n.resize, o = s === void 0 ? !0 : s, l = re(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
986
|
+
return i && d.forEach(function(c) {
|
|
987
|
+
c.addEventListener("scroll", r.update, qe);
|
|
988
|
+
}), o && l.addEventListener("resize", r.update, qe), function() {
|
|
989
|
+
i && d.forEach(function(c) {
|
|
990
|
+
c.removeEventListener("scroll", r.update, qe);
|
|
991
|
+
}), o && l.removeEventListener("resize", r.update, qe);
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
const Oa = {
|
|
995
|
+
name: "eventListeners",
|
|
996
|
+
enabled: !0,
|
|
997
|
+
phase: "write",
|
|
998
|
+
fn: function() {
|
|
999
|
+
},
|
|
1000
|
+
effect: $a,
|
|
1001
|
+
data: {}
|
|
1002
|
+
};
|
|
1003
|
+
var ka = {
|
|
1004
|
+
left: "right",
|
|
1005
|
+
right: "left",
|
|
1006
|
+
bottom: "top",
|
|
1007
|
+
top: "bottom"
|
|
1008
|
+
};
|
|
1009
|
+
function Xe(e) {
|
|
1010
|
+
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1011
|
+
return ka[t];
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
var Ta = {
|
|
1015
|
+
start: "end",
|
|
1016
|
+
end: "start"
|
|
1017
|
+
};
|
|
1018
|
+
function Rt(e) {
|
|
1019
|
+
return e.replace(/start|end/g, function(t) {
|
|
1020
|
+
return Ta[t];
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
function yt(e) {
|
|
1024
|
+
var t = re(e), r = t.pageXOffset, n = t.pageYOffset;
|
|
1025
|
+
return {
|
|
1026
|
+
scrollLeft: r,
|
|
1027
|
+
scrollTop: n
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
function wt(e) {
|
|
1031
|
+
return Pe(be(e)).left + yt(e).scrollLeft;
|
|
1032
|
+
}
|
|
1033
|
+
function Ca(e, t) {
|
|
1034
|
+
var r = re(e), n = be(e), a = r.visualViewport, i = n.clientWidth, s = n.clientHeight, o = 0, l = 0;
|
|
1035
|
+
if (a) {
|
|
1036
|
+
i = a.width, s = a.height;
|
|
1037
|
+
var d = Zt();
|
|
1038
|
+
(d || !d && t === "fixed") && (o = a.offsetLeft, l = a.offsetTop);
|
|
1039
|
+
}
|
|
1040
|
+
return {
|
|
1041
|
+
width: i,
|
|
1042
|
+
height: s,
|
|
1043
|
+
x: o + wt(e),
|
|
1044
|
+
y: l
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
function Sa(e) {
|
|
1048
|
+
var t, r = be(e), n = yt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, i = $e(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), s = $e(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), o = -n.scrollLeft + wt(e), l = -n.scrollTop;
|
|
1049
|
+
return ge(a || r).direction === "rtl" && (o += $e(r.clientWidth, a ? a.clientWidth : 0) - i), {
|
|
1050
|
+
width: i,
|
|
1051
|
+
height: s,
|
|
1052
|
+
x: o,
|
|
1053
|
+
y: l
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
function xt(e) {
|
|
1057
|
+
var t = ge(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
|
|
1058
|
+
return /auto|scroll|overlay|hidden/.test(r + a + n);
|
|
1059
|
+
}
|
|
1060
|
+
function ar(e) {
|
|
1061
|
+
return ["html", "body", "#document"].indexOf(me(e)) >= 0 ? e.ownerDocument.body : ne(e) && xt(e) ? e : ar(et(e));
|
|
1062
|
+
}
|
|
1063
|
+
function ze(e, t) {
|
|
1064
|
+
var r;
|
|
1065
|
+
t === void 0 && (t = []);
|
|
1066
|
+
var n = ar(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = re(n), s = a ? [i].concat(i.visualViewport || [], xt(n) ? n : []) : n, o = t.concat(s);
|
|
1067
|
+
return a ? o : (
|
|
1068
|
+
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1069
|
+
o.concat(ze(et(s)))
|
|
1070
|
+
);
|
|
1071
|
+
}
|
|
1072
|
+
function ut(e) {
|
|
1073
|
+
return Object.assign({}, e, {
|
|
1074
|
+
left: e.x,
|
|
1075
|
+
top: e.y,
|
|
1076
|
+
right: e.x + e.width,
|
|
1077
|
+
bottom: e.y + e.height
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
function Pa(e, t) {
|
|
1081
|
+
var r = Pe(e, !1, t === "fixed");
|
|
1082
|
+
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
1083
|
+
}
|
|
1084
|
+
function At(e, t, r) {
|
|
1085
|
+
return t === Qt ? ut(Ca(e, r)) : ke(t) ? Pa(t, r) : ut(Sa(be(e)));
|
|
1086
|
+
}
|
|
1087
|
+
function Ea(e) {
|
|
1088
|
+
var t = ze(et(e)), r = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, n = r && ne(e) ? Ne(e) : e;
|
|
1089
|
+
return ke(n) ? t.filter(function(a) {
|
|
1090
|
+
return ke(a) && Jt(a, n) && me(a) !== "body";
|
|
1091
|
+
}) : [];
|
|
1092
|
+
}
|
|
1093
|
+
function Va(e, t, r, n) {
|
|
1094
|
+
var a = t === "clippingParents" ? Ea(e) : [].concat(t), i = [].concat(a, [r]), s = i[0], o = i.reduce(function(l, d) {
|
|
1095
|
+
var c = At(e, d, n);
|
|
1096
|
+
return l.top = $e(c.top, l.top), l.right = Qe(c.right, l.right), l.bottom = Qe(c.bottom, l.bottom), l.left = $e(c.left, l.left), l;
|
|
1097
|
+
}, At(e, s, n));
|
|
1098
|
+
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
1099
|
+
}
|
|
1100
|
+
function nr(e) {
|
|
1101
|
+
var t = e.reference, r = e.element, n = e.placement, a = n ? ve(n) : null, i = n ? Ee(n) : null, s = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l;
|
|
1102
|
+
switch (a) {
|
|
1103
|
+
case ee:
|
|
1104
|
+
l = {
|
|
1105
|
+
x: s,
|
|
1106
|
+
y: t.y - r.height
|
|
1107
|
+
};
|
|
1108
|
+
break;
|
|
1109
|
+
case ie:
|
|
1110
|
+
l = {
|
|
1111
|
+
x: s,
|
|
1112
|
+
y: t.y + t.height
|
|
1113
|
+
};
|
|
1114
|
+
break;
|
|
1115
|
+
case oe:
|
|
1116
|
+
l = {
|
|
1117
|
+
x: t.x + t.width,
|
|
1118
|
+
y: o
|
|
1119
|
+
};
|
|
1120
|
+
break;
|
|
1121
|
+
case te:
|
|
1122
|
+
l = {
|
|
1123
|
+
x: t.x - r.width,
|
|
1124
|
+
y: o
|
|
1125
|
+
};
|
|
1126
|
+
break;
|
|
1127
|
+
default:
|
|
1128
|
+
l = {
|
|
1129
|
+
x: t.x,
|
|
1130
|
+
y: t.y
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
var d = a ? bt(a) : null;
|
|
1134
|
+
if (d != null) {
|
|
1135
|
+
var c = d === "y" ? "height" : "width";
|
|
1136
|
+
switch (i) {
|
|
1137
|
+
case Ce:
|
|
1138
|
+
l[d] = l[d] - (t[c] / 2 - r[c] / 2);
|
|
1139
|
+
break;
|
|
1140
|
+
case Me:
|
|
1141
|
+
l[d] = l[d] + (t[c] / 2 - r[c] / 2);
|
|
1142
|
+
break;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
return l;
|
|
1146
|
+
}
|
|
1147
|
+
function _e(e, t) {
|
|
1148
|
+
t === void 0 && (t = {});
|
|
1149
|
+
var r = t, n = r.placement, a = n === void 0 ? e.placement : n, i = r.strategy, s = i === void 0 ? e.strategy : i, o = r.boundary, l = o === void 0 ? Qr : o, d = r.rootBoundary, c = d === void 0 ? Qt : d, w = r.elementContext, k = w === void 0 ? Re : w, v = r.altBoundary, C = v === void 0 ? !1 : v, x = r.padding, $ = x === void 0 ? 0 : x, S = tr(typeof $ != "number" ? $ : rr($, Ie)), V = k === Re ? Gr : Re, A = e.rects.popper, f = e.elements[C ? V : k], m = Va(ke(f) ? f : f.contextElement || be(e.elements.popper), l, c, s), u = Pe(e.elements.reference), T = nr({
|
|
1150
|
+
reference: u,
|
|
1151
|
+
element: A,
|
|
1152
|
+
placement: a
|
|
1153
|
+
}), B = ut(Object.assign({}, A, T)), D = k === Re ? B : u, W = {
|
|
1154
|
+
top: m.top - D.top + S.top,
|
|
1155
|
+
bottom: D.bottom - m.bottom + S.bottom,
|
|
1156
|
+
left: m.left - D.left + S.left,
|
|
1157
|
+
right: D.right - m.right + S.right
|
|
1158
|
+
}, b = e.modifiersData.offset;
|
|
1159
|
+
if (k === Re && b) {
|
|
1160
|
+
var R = b[a];
|
|
1161
|
+
Object.keys(W).forEach(function(z) {
|
|
1162
|
+
var K = [oe, ie].indexOf(z) >= 0 ? 1 : -1, Q = [ee, ie].indexOf(z) >= 0 ? "y" : "x";
|
|
1163
|
+
W[z] += R[Q] * K;
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
return W;
|
|
1167
|
+
}
|
|
1168
|
+
function Ba(e, t) {
|
|
1169
|
+
t === void 0 && (t = {});
|
|
1170
|
+
var r = t, n = r.placement, a = r.boundary, i = r.rootBoundary, s = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, d = l === void 0 ? Gt : l, c = Ee(n), w = c ? o ? Et : Et.filter(function(C) {
|
|
1171
|
+
return Ee(C) === c;
|
|
1172
|
+
}) : Ie, k = w.filter(function(C) {
|
|
1173
|
+
return d.indexOf(C) >= 0;
|
|
1174
|
+
});
|
|
1175
|
+
k.length === 0 && (k = w);
|
|
1176
|
+
var v = k.reduce(function(C, x) {
|
|
1177
|
+
return C[x] = _e(e, {
|
|
1178
|
+
placement: x,
|
|
1179
|
+
boundary: a,
|
|
1180
|
+
rootBoundary: i,
|
|
1181
|
+
padding: s
|
|
1182
|
+
})[ve(x)], C;
|
|
1183
|
+
}, {});
|
|
1184
|
+
return Object.keys(v).sort(function(C, x) {
|
|
1185
|
+
return v[C] - v[x];
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
function Ra(e) {
|
|
1189
|
+
if (ve(e) === mt)
|
|
1190
|
+
return [];
|
|
1191
|
+
var t = Xe(e);
|
|
1192
|
+
return [Rt(e), t, Rt(t)];
|
|
1193
|
+
}
|
|
1194
|
+
function Aa(e) {
|
|
1195
|
+
var t = e.state, r = e.options, n = e.name;
|
|
1196
|
+
if (!t.modifiersData[n]._skip) {
|
|
1197
|
+
for (var a = r.mainAxis, i = a === void 0 ? !0 : a, s = r.altAxis, o = s === void 0 ? !0 : s, l = r.fallbackPlacements, d = r.padding, c = r.boundary, w = r.rootBoundary, k = r.altBoundary, v = r.flipVariations, C = v === void 0 ? !0 : v, x = r.allowedAutoPlacements, $ = t.options.placement, S = ve($), V = S === $, A = l || (V || !C ? [Xe($)] : Ra($)), f = [$].concat(A).reduce(function(he, de) {
|
|
1198
|
+
return he.concat(ve(de) === mt ? Ba(t, {
|
|
1199
|
+
placement: de,
|
|
1200
|
+
boundary: c,
|
|
1201
|
+
rootBoundary: w,
|
|
1202
|
+
padding: d,
|
|
1203
|
+
flipVariations: C,
|
|
1204
|
+
allowedAutoPlacements: x
|
|
1205
|
+
}) : de);
|
|
1206
|
+
}, []), m = t.rects.reference, u = t.rects.popper, T = /* @__PURE__ */ new Map(), B = !0, D = f[0], W = 0; W < f.length; W++) {
|
|
1207
|
+
var b = f[W], R = ve(b), z = Ee(b) === Ce, K = [ee, ie].indexOf(R) >= 0, Q = K ? "width" : "height", N = _e(t, {
|
|
1208
|
+
placement: b,
|
|
1209
|
+
boundary: c,
|
|
1210
|
+
rootBoundary: w,
|
|
1211
|
+
altBoundary: k,
|
|
1212
|
+
padding: d
|
|
1213
|
+
}), F = K ? z ? oe : te : z ? ie : ee;
|
|
1214
|
+
m[Q] > u[Q] && (F = Xe(F));
|
|
1215
|
+
var ue = Xe(F), se = [];
|
|
1216
|
+
if (i && se.push(N[R] <= 0), o && se.push(N[F] <= 0, N[ue] <= 0), se.every(function(he) {
|
|
1217
|
+
return he;
|
|
1218
|
+
})) {
|
|
1219
|
+
D = b, B = !1;
|
|
1220
|
+
break;
|
|
1221
|
+
}
|
|
1222
|
+
T.set(b, se);
|
|
1223
|
+
}
|
|
1224
|
+
if (B)
|
|
1225
|
+
for (var g = C ? 3 : 1, H = function(de) {
|
|
1226
|
+
var ye = f.find(function(Te) {
|
|
1227
|
+
var fe = T.get(Te);
|
|
1228
|
+
if (fe)
|
|
1229
|
+
return fe.slice(0, de).every(function(Be) {
|
|
1230
|
+
return Be;
|
|
1231
|
+
});
|
|
1232
|
+
});
|
|
1233
|
+
if (ye)
|
|
1234
|
+
return D = ye, "break";
|
|
1235
|
+
}, X = g; X > 0; X--) {
|
|
1236
|
+
var le = H(X);
|
|
1237
|
+
if (le === "break") break;
|
|
1238
|
+
}
|
|
1239
|
+
t.placement !== D && (t.modifiersData[n]._skip = !0, t.placement = D, t.reset = !0);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
const Da = {
|
|
1243
|
+
name: "flip",
|
|
1244
|
+
enabled: !0,
|
|
1245
|
+
phase: "main",
|
|
1246
|
+
fn: Aa,
|
|
1247
|
+
requiresIfExists: ["offset"],
|
|
1248
|
+
data: {
|
|
1249
|
+
_skip: !1
|
|
1250
|
+
}
|
|
1251
|
+
};
|
|
1252
|
+
function Dt(e, t, r) {
|
|
1253
|
+
return r === void 0 && (r = {
|
|
1254
|
+
x: 0,
|
|
1255
|
+
y: 0
|
|
1256
|
+
}), {
|
|
1257
|
+
top: e.top - t.height - r.y,
|
|
1258
|
+
right: e.right - t.width + r.x,
|
|
1259
|
+
bottom: e.bottom - t.height + r.y,
|
|
1260
|
+
left: e.left - t.width - r.x
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
function zt(e) {
|
|
1264
|
+
return [ee, oe, ie, te].some(function(t) {
|
|
1265
|
+
return e[t] >= 0;
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
function za(e) {
|
|
1269
|
+
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, i = t.modifiersData.preventOverflow, s = _e(t, {
|
|
1270
|
+
elementContext: "reference"
|
|
1271
|
+
}), o = _e(t, {
|
|
1272
|
+
altBoundary: !0
|
|
1273
|
+
}), l = Dt(s, n), d = Dt(o, a, i), c = zt(l), w = zt(d);
|
|
1274
|
+
t.modifiersData[r] = {
|
|
1275
|
+
referenceClippingOffsets: l,
|
|
1276
|
+
popperEscapeOffsets: d,
|
|
1277
|
+
isReferenceHidden: c,
|
|
1278
|
+
hasPopperEscaped: w
|
|
1279
|
+
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1280
|
+
"data-popper-reference-hidden": c,
|
|
1281
|
+
"data-popper-escaped": w
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
const Wa = {
|
|
1285
|
+
name: "hide",
|
|
1286
|
+
enabled: !0,
|
|
1287
|
+
phase: "main",
|
|
1288
|
+
requiresIfExists: ["preventOverflow"],
|
|
1289
|
+
fn: za
|
|
1290
|
+
};
|
|
1291
|
+
function La(e, t, r) {
|
|
1292
|
+
var n = ve(e), a = [te, ee].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
|
|
1293
|
+
placement: e
|
|
1294
|
+
})) : r, s = i[0], o = i[1];
|
|
1295
|
+
return s = s || 0, o = (o || 0) * a, [te, oe].indexOf(n) >= 0 ? {
|
|
1296
|
+
x: o,
|
|
1297
|
+
y: s
|
|
1298
|
+
} : {
|
|
1299
|
+
x: s,
|
|
1300
|
+
y: o
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
function ja(e) {
|
|
1304
|
+
var t = e.state, r = e.options, n = e.name, a = r.offset, i = a === void 0 ? [0, 0] : a, s = Gt.reduce(function(c, w) {
|
|
1305
|
+
return c[w] = La(w, t.rects, i), c;
|
|
1306
|
+
}, {}), o = s[t.placement], l = o.x, d = o.y;
|
|
1307
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += d), t.modifiersData[n] = s;
|
|
1308
|
+
}
|
|
1309
|
+
const Ma = {
|
|
1310
|
+
name: "offset",
|
|
1311
|
+
enabled: !0,
|
|
1312
|
+
phase: "main",
|
|
1313
|
+
requires: ["popperOffsets"],
|
|
1314
|
+
fn: ja
|
|
1315
|
+
};
|
|
1316
|
+
function _a(e) {
|
|
1317
|
+
var t = e.state, r = e.name;
|
|
1318
|
+
t.modifiersData[r] = nr({
|
|
1319
|
+
reference: t.rects.reference,
|
|
1320
|
+
element: t.rects.popper,
|
|
1321
|
+
placement: t.placement
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
const Ia = {
|
|
1325
|
+
name: "popperOffsets",
|
|
1326
|
+
enabled: !0,
|
|
1327
|
+
phase: "read",
|
|
1328
|
+
fn: _a,
|
|
1329
|
+
data: {}
|
|
1330
|
+
};
|
|
1331
|
+
function Na(e) {
|
|
1332
|
+
return e === "x" ? "y" : "x";
|
|
1333
|
+
}
|
|
1334
|
+
function Fa(e) {
|
|
1335
|
+
var t = e.state, r = e.options, n = e.name, a = r.mainAxis, i = a === void 0 ? !0 : a, s = r.altAxis, o = s === void 0 ? !1 : s, l = r.boundary, d = r.rootBoundary, c = r.altBoundary, w = r.padding, k = r.tether, v = k === void 0 ? !0 : k, C = r.tetherOffset, x = C === void 0 ? 0 : C, $ = _e(t, {
|
|
1336
|
+
boundary: l,
|
|
1337
|
+
rootBoundary: d,
|
|
1338
|
+
padding: w,
|
|
1339
|
+
altBoundary: c
|
|
1340
|
+
}), S = ve(t.placement), V = Ee(t.placement), A = !V, f = bt(S), m = Na(f), u = t.modifiersData.popperOffsets, T = t.rects.reference, B = t.rects.popper, D = typeof x == "function" ? x(Object.assign({}, t.rects, {
|
|
1341
|
+
placement: t.placement
|
|
1342
|
+
})) : x, W = typeof D == "number" ? {
|
|
1343
|
+
mainAxis: D,
|
|
1344
|
+
altAxis: D
|
|
1345
|
+
} : Object.assign({
|
|
1346
|
+
mainAxis: 0,
|
|
1347
|
+
altAxis: 0
|
|
1348
|
+
}, D), b = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, R = {
|
|
1349
|
+
x: 0,
|
|
1350
|
+
y: 0
|
|
1351
|
+
};
|
|
1352
|
+
if (u) {
|
|
1353
|
+
if (i) {
|
|
1354
|
+
var z, K = f === "y" ? ee : te, Q = f === "y" ? ie : oe, N = f === "y" ? "height" : "width", F = u[f], ue = F + $[K], se = F - $[Q], g = v ? -B[N] / 2 : 0, H = V === Ce ? T[N] : B[N], X = V === Ce ? -B[N] : -T[N], le = t.elements.arrow, he = v && le ? ht(le) : {
|
|
1355
|
+
width: 0,
|
|
1356
|
+
height: 0
|
|
1357
|
+
}, de = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : er(), ye = de[K], Te = de[Q], fe = De(0, T[N], he[N]), Be = A ? T[N] / 2 - g - fe - ye - W.mainAxis : H - fe - ye - W.mainAxis, tt = A ? -T[N] / 2 + g + fe + Te + W.mainAxis : X + fe + Te + W.mainAxis, p = t.elements.arrow && Ne(t.elements.arrow), L = p ? f === "y" ? p.clientTop || 0 : p.clientLeft || 0 : 0, P = (z = b?.[f]) != null ? z : 0, ce = F + Be - P - L, G = F + tt - P, Fe = De(v ? Qe(ue, ce) : ue, F, v ? $e(se, G) : se);
|
|
1358
|
+
u[f] = Fe, R[f] = Fe - F;
|
|
1359
|
+
}
|
|
1360
|
+
if (o) {
|
|
1361
|
+
var rt, lr = f === "x" ? ee : te, cr = f === "x" ? ie : oe, we = u[m], He = m === "y" ? "height" : "width", $t = we + $[lr], Ot = we - $[cr], at = [ee, te].indexOf(S) !== -1, kt = (rt = b?.[m]) != null ? rt : 0, Tt = at ? $t : we - T[He] - B[He] - kt + W.altAxis, Ct = at ? we + T[He] + B[He] - kt - W.altAxis : Ot, St = v && at ? pa(Tt, we, Ct) : De(v ? Tt : $t, we, v ? Ct : Ot);
|
|
1362
|
+
u[m] = St, R[m] = St - we;
|
|
1363
|
+
}
|
|
1364
|
+
t.modifiersData[n] = R;
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
const Ha = {
|
|
1368
|
+
name: "preventOverflow",
|
|
1369
|
+
enabled: !0,
|
|
1370
|
+
phase: "main",
|
|
1371
|
+
fn: Fa,
|
|
1372
|
+
requiresIfExists: ["offset"]
|
|
1373
|
+
};
|
|
1374
|
+
function qa(e) {
|
|
1375
|
+
return {
|
|
1376
|
+
scrollLeft: e.scrollLeft,
|
|
1377
|
+
scrollTop: e.scrollTop
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
function Ua(e) {
|
|
1381
|
+
return e === re(e) || !ne(e) ? yt(e) : qa(e);
|
|
1382
|
+
}
|
|
1383
|
+
function Xa(e) {
|
|
1384
|
+
var t = e.getBoundingClientRect(), r = Se(t.width) / e.offsetWidth || 1, n = Se(t.height) / e.offsetHeight || 1;
|
|
1385
|
+
return r !== 1 || n !== 1;
|
|
1386
|
+
}
|
|
1387
|
+
function Ya(e, t, r) {
|
|
1388
|
+
r === void 0 && (r = !1);
|
|
1389
|
+
var n = ne(t), a = ne(t) && Xa(t), i = be(t), s = Pe(e, a, r), o = {
|
|
1390
|
+
scrollLeft: 0,
|
|
1391
|
+
scrollTop: 0
|
|
1392
|
+
}, l = {
|
|
1393
|
+
x: 0,
|
|
1394
|
+
y: 0
|
|
1395
|
+
};
|
|
1396
|
+
return (n || !n && !r) && ((me(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1397
|
+
xt(i)) && (o = Ua(t)), ne(t) ? (l = Pe(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : i && (l.x = wt(i))), {
|
|
1398
|
+
x: s.left + o.scrollLeft - l.x,
|
|
1399
|
+
y: s.top + o.scrollTop - l.y,
|
|
1400
|
+
width: s.width,
|
|
1401
|
+
height: s.height
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
function Ka(e) {
|
|
1405
|
+
var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
|
|
1406
|
+
e.forEach(function(i) {
|
|
1407
|
+
t.set(i.name, i);
|
|
1408
|
+
});
|
|
1409
|
+
function a(i) {
|
|
1410
|
+
r.add(i.name);
|
|
1411
|
+
var s = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1412
|
+
s.forEach(function(o) {
|
|
1413
|
+
if (!r.has(o)) {
|
|
1414
|
+
var l = t.get(o);
|
|
1415
|
+
l && a(l);
|
|
1416
|
+
}
|
|
1417
|
+
}), n.push(i);
|
|
1418
|
+
}
|
|
1419
|
+
return e.forEach(function(i) {
|
|
1420
|
+
r.has(i.name) || a(i);
|
|
1421
|
+
}), n;
|
|
1422
|
+
}
|
|
1423
|
+
function Qa(e) {
|
|
1424
|
+
var t = Ka(e);
|
|
1425
|
+
return sa.reduce(function(r, n) {
|
|
1426
|
+
return r.concat(t.filter(function(a) {
|
|
1427
|
+
return a.phase === n;
|
|
1428
|
+
}));
|
|
1429
|
+
}, []);
|
|
1430
|
+
}
|
|
1431
|
+
function Ga(e) {
|
|
1432
|
+
var t;
|
|
1433
|
+
return function() {
|
|
1434
|
+
return t || (t = new Promise(function(r) {
|
|
1435
|
+
Promise.resolve().then(function() {
|
|
1436
|
+
t = void 0, r(e());
|
|
1437
|
+
});
|
|
1438
|
+
})), t;
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
function Za(e) {
|
|
1442
|
+
var t = e.reduce(function(r, n) {
|
|
1443
|
+
var a = r[n.name];
|
|
1444
|
+
return r[n.name] = a ? Object.assign({}, a, n, {
|
|
1445
|
+
options: Object.assign({}, a.options, n.options),
|
|
1446
|
+
data: Object.assign({}, a.data, n.data)
|
|
1447
|
+
}) : n, r;
|
|
1448
|
+
}, {});
|
|
1449
|
+
return Object.keys(t).map(function(r) {
|
|
1450
|
+
return t[r];
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
var Wt = {
|
|
1454
|
+
placement: "bottom",
|
|
1455
|
+
modifiers: [],
|
|
1456
|
+
strategy: "absolute"
|
|
1457
|
+
};
|
|
1458
|
+
function Lt() {
|
|
1459
|
+
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
1460
|
+
t[r] = arguments[r];
|
|
1461
|
+
return !t.some(function(n) {
|
|
1462
|
+
return !(n && typeof n.getBoundingClientRect == "function");
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
function Ja(e) {
|
|
1466
|
+
e === void 0 && (e = {});
|
|
1467
|
+
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, i = a === void 0 ? Wt : a;
|
|
1468
|
+
return function(o, l, d) {
|
|
1469
|
+
d === void 0 && (d = i);
|
|
1470
|
+
var c = {
|
|
1471
|
+
placement: "bottom",
|
|
1472
|
+
orderedModifiers: [],
|
|
1473
|
+
options: Object.assign({}, Wt, i),
|
|
1474
|
+
modifiersData: {},
|
|
1475
|
+
elements: {
|
|
1476
|
+
reference: o,
|
|
1477
|
+
popper: l
|
|
1478
|
+
},
|
|
1479
|
+
attributes: {},
|
|
1480
|
+
styles: {}
|
|
1481
|
+
}, w = [], k = !1, v = {
|
|
1482
|
+
state: c,
|
|
1483
|
+
setOptions: function(S) {
|
|
1484
|
+
var V = typeof S == "function" ? S(c.options) : S;
|
|
1485
|
+
x(), c.options = Object.assign({}, i, c.options, V), c.scrollParents = {
|
|
1486
|
+
reference: ke(o) ? ze(o) : o.contextElement ? ze(o.contextElement) : [],
|
|
1487
|
+
popper: ze(l)
|
|
1488
|
+
};
|
|
1489
|
+
var A = Qa(Za([].concat(n, c.options.modifiers)));
|
|
1490
|
+
return c.orderedModifiers = A.filter(function(f) {
|
|
1491
|
+
return f.enabled;
|
|
1492
|
+
}), C(), v.update();
|
|
1493
|
+
},
|
|
1494
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
1495
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
1496
|
+
// logic.
|
|
1497
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1498
|
+
// prefer the async Popper#update method
|
|
1499
|
+
forceUpdate: function() {
|
|
1500
|
+
if (!k) {
|
|
1501
|
+
var S = c.elements, V = S.reference, A = S.popper;
|
|
1502
|
+
if (Lt(V, A)) {
|
|
1503
|
+
c.rects = {
|
|
1504
|
+
reference: Ya(V, Ne(A), c.options.strategy === "fixed"),
|
|
1505
|
+
popper: ht(A)
|
|
1506
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(W) {
|
|
1507
|
+
return c.modifiersData[W.name] = Object.assign({}, W.data);
|
|
1508
|
+
});
|
|
1509
|
+
for (var f = 0; f < c.orderedModifiers.length; f++) {
|
|
1510
|
+
if (c.reset === !0) {
|
|
1511
|
+
c.reset = !1, f = -1;
|
|
1512
|
+
continue;
|
|
1513
|
+
}
|
|
1514
|
+
var m = c.orderedModifiers[f], u = m.fn, T = m.options, B = T === void 0 ? {} : T, D = m.name;
|
|
1515
|
+
typeof u == "function" && (c = u({
|
|
1516
|
+
state: c,
|
|
1517
|
+
options: B,
|
|
1518
|
+
name: D,
|
|
1519
|
+
instance: v
|
|
1520
|
+
}) || c);
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
1526
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
1527
|
+
update: Ga(function() {
|
|
1528
|
+
return new Promise(function($) {
|
|
1529
|
+
v.forceUpdate(), $(c);
|
|
1530
|
+
});
|
|
1531
|
+
}),
|
|
1532
|
+
destroy: function() {
|
|
1533
|
+
x(), k = !0;
|
|
1534
|
+
}
|
|
1535
|
+
};
|
|
1536
|
+
if (!Lt(o, l))
|
|
1537
|
+
return v;
|
|
1538
|
+
v.setOptions(d).then(function($) {
|
|
1539
|
+
!k && d.onFirstUpdate && d.onFirstUpdate($);
|
|
1540
|
+
});
|
|
1541
|
+
function C() {
|
|
1542
|
+
c.orderedModifiers.forEach(function($) {
|
|
1543
|
+
var S = $.name, V = $.options, A = V === void 0 ? {} : V, f = $.effect;
|
|
1544
|
+
if (typeof f == "function") {
|
|
1545
|
+
var m = f({
|
|
1546
|
+
state: c,
|
|
1547
|
+
name: S,
|
|
1548
|
+
instance: v,
|
|
1549
|
+
options: A
|
|
1550
|
+
}), u = function() {
|
|
1551
|
+
};
|
|
1552
|
+
w.push(m || u);
|
|
1553
|
+
}
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
function x() {
|
|
1557
|
+
w.forEach(function($) {
|
|
1558
|
+
return $();
|
|
1559
|
+
}), w = [];
|
|
1560
|
+
}
|
|
1561
|
+
return v;
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
var en = [Oa, Ia, xa, ua, Ma, Da, Ha, ha, Wa], tn = /* @__PURE__ */ Ja({
|
|
1565
|
+
defaultModifiers: en
|
|
1566
|
+
}), rn = typeof global == "object" && global && global.Object === Object && global, an = typeof self == "object" && self && self.Object === Object && self, ir = rn || an || Function("return this")(), Ge = ir.Symbol, or = Object.prototype, nn = or.hasOwnProperty, on = or.toString, Ae = Ge ? Ge.toStringTag : void 0;
|
|
1567
|
+
function sn(e) {
|
|
1568
|
+
var t = nn.call(e, Ae), r = e[Ae];
|
|
1569
|
+
try {
|
|
1570
|
+
e[Ae] = void 0;
|
|
1571
|
+
var n = !0;
|
|
1572
|
+
} catch {
|
|
1573
|
+
}
|
|
1574
|
+
var a = on.call(e);
|
|
1575
|
+
return n && (t ? e[Ae] = r : delete e[Ae]), a;
|
|
1576
|
+
}
|
|
1577
|
+
var ln = Object.prototype, cn = ln.toString;
|
|
1578
|
+
function un(e) {
|
|
1579
|
+
return cn.call(e);
|
|
1580
|
+
}
|
|
1581
|
+
var dn = "[object Null]", fn = "[object Undefined]", jt = Ge ? Ge.toStringTag : void 0;
|
|
1582
|
+
function pn(e) {
|
|
1583
|
+
return e == null ? e === void 0 ? fn : dn : jt && jt in Object(e) ? sn(e) : un(e);
|
|
1584
|
+
}
|
|
1585
|
+
function vn(e) {
|
|
1586
|
+
return e != null && typeof e == "object";
|
|
1587
|
+
}
|
|
1588
|
+
var mn = "[object Symbol]";
|
|
1589
|
+
function gn(e) {
|
|
1590
|
+
return typeof e == "symbol" || vn(e) && pn(e) == mn;
|
|
1591
|
+
}
|
|
1592
|
+
var hn = /\s/;
|
|
1593
|
+
function bn(e) {
|
|
1594
|
+
for (var t = e.length; t-- && hn.test(e.charAt(t)); )
|
|
1595
|
+
;
|
|
1596
|
+
return t;
|
|
1597
|
+
}
|
|
1598
|
+
var yn = /^\s+/;
|
|
1599
|
+
function wn(e) {
|
|
1600
|
+
return e && e.slice(0, bn(e) + 1).replace(yn, "");
|
|
1601
|
+
}
|
|
1602
|
+
function Ze(e) {
|
|
1603
|
+
var t = typeof e;
|
|
1604
|
+
return e != null && (t == "object" || t == "function");
|
|
1605
|
+
}
|
|
1606
|
+
var Mt = NaN, xn = /^[-+]0x[0-9a-f]+$/i, $n = /^0b[01]+$/i, On = /^0o[0-7]+$/i, kn = parseInt;
|
|
1607
|
+
function _t(e) {
|
|
1608
|
+
if (typeof e == "number")
|
|
1609
|
+
return e;
|
|
1610
|
+
if (gn(e))
|
|
1611
|
+
return Mt;
|
|
1612
|
+
if (Ze(e)) {
|
|
1613
|
+
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
1614
|
+
e = Ze(t) ? t + "" : t;
|
|
1615
|
+
}
|
|
1616
|
+
if (typeof e != "string")
|
|
1617
|
+
return e === 0 ? e : +e;
|
|
1618
|
+
e = wn(e);
|
|
1619
|
+
var r = $n.test(e);
|
|
1620
|
+
return r || On.test(e) ? kn(e.slice(2), r ? 2 : 8) : xn.test(e) ? Mt : +e;
|
|
1621
|
+
}
|
|
1622
|
+
var ot = function() {
|
|
1623
|
+
return ir.Date.now();
|
|
1624
|
+
}, Tn = "Expected a function", Cn = Math.max, Sn = Math.min;
|
|
1625
|
+
function dt(e, t, r) {
|
|
1626
|
+
var n, a, i, s, o, l, d = 0, c = !1, w = !1, k = !0;
|
|
1627
|
+
if (typeof e != "function")
|
|
1628
|
+
throw new TypeError(Tn);
|
|
1629
|
+
t = _t(t) || 0, Ze(r) && (c = !!r.leading, w = "maxWait" in r, i = w ? Cn(_t(r.maxWait) || 0, t) : i, k = "trailing" in r ? !!r.trailing : k);
|
|
1630
|
+
function v(u) {
|
|
1631
|
+
var T = n, B = a;
|
|
1632
|
+
return n = a = void 0, d = u, s = e.apply(B, T), s;
|
|
1633
|
+
}
|
|
1634
|
+
function C(u) {
|
|
1635
|
+
return d = u, o = setTimeout(S, t), c ? v(u) : s;
|
|
1636
|
+
}
|
|
1637
|
+
function x(u) {
|
|
1638
|
+
var T = u - l, B = u - d, D = t - T;
|
|
1639
|
+
return w ? Sn(D, i - B) : D;
|
|
1640
|
+
}
|
|
1641
|
+
function $(u) {
|
|
1642
|
+
var T = u - l, B = u - d;
|
|
1643
|
+
return l === void 0 || T >= t || T < 0 || w && B >= i;
|
|
1644
|
+
}
|
|
1645
|
+
function S() {
|
|
1646
|
+
var u = ot();
|
|
1647
|
+
if ($(u))
|
|
1648
|
+
return V(u);
|
|
1649
|
+
o = setTimeout(S, x(u));
|
|
1650
|
+
}
|
|
1651
|
+
function V(u) {
|
|
1652
|
+
return o = void 0, k && n ? v(u) : (n = a = void 0, s);
|
|
1653
|
+
}
|
|
1654
|
+
function A() {
|
|
1655
|
+
o !== void 0 && clearTimeout(o), d = 0, n = l = a = o = void 0;
|
|
1656
|
+
}
|
|
1657
|
+
function f() {
|
|
1658
|
+
return o === void 0 ? s : V(ot());
|
|
1659
|
+
}
|
|
1660
|
+
function m() {
|
|
1661
|
+
var u = ot(), T = $(u);
|
|
1662
|
+
if (n = arguments, a = this, l = u, T) {
|
|
1663
|
+
if (o === void 0)
|
|
1664
|
+
return C(l);
|
|
1665
|
+
if (w)
|
|
1666
|
+
return clearTimeout(o), o = setTimeout(S, t), v(l);
|
|
1667
|
+
}
|
|
1668
|
+
return o === void 0 && (o = setTimeout(S, t)), s;
|
|
1669
|
+
}
|
|
1670
|
+
return m.cancel = A, m.flush = f, m;
|
|
1671
|
+
}
|
|
1672
|
+
var Pn = "Expected a function";
|
|
1673
|
+
function En(e, t, r) {
|
|
1674
|
+
var n = !0, a = !0;
|
|
1675
|
+
if (typeof e != "function")
|
|
1676
|
+
throw new TypeError(Pn);
|
|
1677
|
+
return Ze(r) && (n = "leading" in r ? !!r.leading : n, a = "trailing" in r ? !!r.trailing : a), dt(e, t, {
|
|
1678
|
+
leading: n,
|
|
1679
|
+
maxWait: t,
|
|
1680
|
+
trailing: a
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
const Vn = (e, t) => {
|
|
1684
|
+
const r = (n) => {
|
|
1685
|
+
const a = e.value, i = n.target;
|
|
1686
|
+
!a || !i || !(i instanceof Node) || a.contains(i) || t(n);
|
|
1687
|
+
};
|
|
1688
|
+
Je(() => {
|
|
1689
|
+
document.addEventListener("click", r, !0);
|
|
1690
|
+
}), Ve(() => {
|
|
1691
|
+
document.removeEventListener("click", r, !0);
|
|
1692
|
+
});
|
|
1693
|
+
}, Bn = 80, ft = /* @__PURE__ */ Y({
|
|
1694
|
+
name: "Popover",
|
|
1695
|
+
__name: "Popover",
|
|
1696
|
+
props: {
|
|
1697
|
+
preserveContentMount: { type: Boolean, default: !1 },
|
|
1698
|
+
trigger: { default: "click" },
|
|
1699
|
+
placement: { default: "bottom-start" },
|
|
1700
|
+
manual: { type: Boolean, default: !1 },
|
|
1701
|
+
disabled: { type: Boolean, default: !1 },
|
|
1702
|
+
popoverOptions: {},
|
|
1703
|
+
openDelay: { default: 0 },
|
|
1704
|
+
closeDelay: { default: 0 },
|
|
1705
|
+
popperWidth: {},
|
|
1706
|
+
maxPopperHeight: {},
|
|
1707
|
+
offset: { default: () => [0, 0] },
|
|
1708
|
+
padding: { default: 4 }
|
|
1709
|
+
},
|
|
1710
|
+
emits: ["visible-change", "click-outside", "scroll"],
|
|
1711
|
+
setup(e, { expose: t, emit: r }) {
|
|
1712
|
+
const n = M(!1), a = e, i = h(() => a.preserveContentMount || n.value), s = h(() => !a.preserveContentMount || n.value), o = r, l = M(), d = M(), c = M();
|
|
1713
|
+
let w = null, k = je({}), v = je({});
|
|
1714
|
+
const C = (b) => typeof b == "number" ? `${b}px` : b, x = h(() => {
|
|
1715
|
+
const b = a.maxPopperHeight;
|
|
1716
|
+
return b != null && b !== "";
|
|
1717
|
+
}), $ = h(() => {
|
|
1718
|
+
const b = {}, R = a.popperWidth;
|
|
1719
|
+
if (R != null && R !== "" && (b.width = C(R)), x.value) {
|
|
1720
|
+
const z = a.maxPopperHeight;
|
|
1721
|
+
b.maxHeight = C(z), b.overflowY = "auto", b.scrollbarWidth = "none", b.msOverflowStyle = "none";
|
|
1722
|
+
}
|
|
1723
|
+
return b.padding = C(a.padding), b;
|
|
1724
|
+
}), S = h(() => ({
|
|
1725
|
+
placement: a.placement,
|
|
1726
|
+
modifiers: [
|
|
1727
|
+
{
|
|
1728
|
+
name: "offset",
|
|
1729
|
+
options: {
|
|
1730
|
+
offset: a.offset
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
],
|
|
1734
|
+
...a.popoverOptions
|
|
1735
|
+
})), V = () => {
|
|
1736
|
+
a.disabled || (n.value = !0, o("visible-change", !0));
|
|
1737
|
+
}, A = () => {
|
|
1738
|
+
n.value = !1, o("visible-change", !1);
|
|
1739
|
+
}, f = dt(V, a.openDelay), m = dt(A, a.closeDelay), u = () => {
|
|
1740
|
+
a.disabled || (m.cancel(), f());
|
|
1741
|
+
}, T = () => {
|
|
1742
|
+
f.cancel(), m();
|
|
1743
|
+
};
|
|
1744
|
+
Vn(l, () => {
|
|
1745
|
+
a.trigger === "click" && n.value && !a.manual && T(), n.value && o("click-outside", !0);
|
|
1746
|
+
});
|
|
1747
|
+
const B = () => {
|
|
1748
|
+
a.disabled || (n.value ? T() : u());
|
|
1749
|
+
}, D = () => {
|
|
1750
|
+
a.trigger === "hover" ? (v.mouseenter = u, k.mouseleave = T) : a.trigger === "click" && (v.click = B);
|
|
1751
|
+
};
|
|
1752
|
+
J(
|
|
1753
|
+
() => n.value,
|
|
1754
|
+
(b) => {
|
|
1755
|
+
b && (d.value && c.value ? w = tn(d.value, c.value, S.value) : w?.destroy());
|
|
1756
|
+
},
|
|
1757
|
+
{ flush: "post" }
|
|
1758
|
+
), J(
|
|
1759
|
+
() => a.manual,
|
|
1760
|
+
(b) => {
|
|
1761
|
+
b ? (v = {}, k = {}) : D();
|
|
1762
|
+
}
|
|
1763
|
+
), J(
|
|
1764
|
+
() => a.trigger,
|
|
1765
|
+
(b, R) => {
|
|
1766
|
+
b !== R && (v = {}, k = {}, D());
|
|
1767
|
+
}
|
|
1768
|
+
), J(
|
|
1769
|
+
() => a.disabled,
|
|
1770
|
+
(b) => {
|
|
1771
|
+
b && T();
|
|
1772
|
+
}
|
|
1773
|
+
), Je(() => {
|
|
1774
|
+
a.manual || D();
|
|
1775
|
+
});
|
|
1776
|
+
const W = En((b) => {
|
|
1777
|
+
const R = b.target;
|
|
1778
|
+
o("scroll", { scrollTop: R.scrollTop, scrollLeft: R.scrollLeft });
|
|
1779
|
+
}, Bn);
|
|
1780
|
+
return Ve(() => {
|
|
1781
|
+
W.cancel(), w?.destroy();
|
|
1782
|
+
}), t({
|
|
1783
|
+
isOpen: n,
|
|
1784
|
+
open: u,
|
|
1785
|
+
close: T
|
|
1786
|
+
}), (b, R) => (y(), O("div", xe({
|
|
1787
|
+
class: "cregis-popover",
|
|
1788
|
+
ref_key: "popoverRef",
|
|
1789
|
+
ref: l
|
|
1790
|
+
}, Pt(ae(k), !0)), [
|
|
1791
|
+
E("div", xe({
|
|
1792
|
+
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
1793
|
+
ref_key: "popoverTriggerRef",
|
|
1794
|
+
ref: d
|
|
1795
|
+
}, Pt(ae(v), !0)), [
|
|
1796
|
+
q(b.$slots, "reference")
|
|
1797
|
+
], 16),
|
|
1798
|
+
U(pt, { name: "fade" }, {
|
|
1799
|
+
default: Z(() => [
|
|
1800
|
+
i.value ? Le((y(), O("div", {
|
|
1801
|
+
key: 0,
|
|
1802
|
+
class: j(["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": x.value }]),
|
|
1803
|
+
ref_key: "popoverContentRef",
|
|
1804
|
+
ref: c,
|
|
1805
|
+
style: pe($.value),
|
|
1806
|
+
onScroll: R[0] || (R[0] = //@ts-ignore
|
|
1807
|
+
(...z) => ae(W) && ae(W)(...z))
|
|
1808
|
+
}, [
|
|
1809
|
+
q(b.$slots, "default")
|
|
1810
|
+
], 38)), [
|
|
1811
|
+
[vt, s.value]
|
|
1812
|
+
]) : I("", !0)
|
|
1813
|
+
]),
|
|
1814
|
+
_: 3
|
|
1815
|
+
})
|
|
1816
|
+
], 16));
|
|
1817
|
+
}
|
|
1818
|
+
}), sr = Symbol("CregisSelect"), Rn = { class: "cregis-select__trigger-label" }, An = { class: "cregis-select__selected" }, Dn = {
|
|
1819
|
+
key: 1,
|
|
1820
|
+
class: "cregis-select__placeholder"
|
|
1821
|
+
}, zn = {
|
|
1822
|
+
key: 0,
|
|
1823
|
+
class: "cregis-select__dropdown-empty"
|
|
1824
|
+
}, Wn = {
|
|
1825
|
+
key: 2,
|
|
1826
|
+
class: "cregis-select__dropdown-filter-empty"
|
|
1827
|
+
}, Ln = { class: "cregis-select__dropdown-content" }, ii = /* @__PURE__ */ Y({
|
|
1828
|
+
name: "Select",
|
|
1829
|
+
__name: "Select",
|
|
1830
|
+
props: {
|
|
1831
|
+
modelValue: {},
|
|
1832
|
+
type: { default: "default" },
|
|
1833
|
+
size: { default: "large" },
|
|
1834
|
+
align: { default: "center" },
|
|
1835
|
+
placeholder: { default: "Please select" },
|
|
1836
|
+
disabled: { type: Boolean },
|
|
1837
|
+
filterable: { type: Boolean },
|
|
1838
|
+
filterDebounceMs: { default: 200 },
|
|
1839
|
+
noDataText: { default: "No data" },
|
|
1840
|
+
noMatchText: { default: "No matching data" },
|
|
1841
|
+
triggerWidth: { default: "296px" },
|
|
1842
|
+
popperWidth: {},
|
|
1843
|
+
maxPopperHeight: {}
|
|
1844
|
+
},
|
|
1845
|
+
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
1846
|
+
setup(e, { emit: t }) {
|
|
1847
|
+
const r = e, n = t, a = M(null), i = M(!1);
|
|
1848
|
+
let s = null;
|
|
1849
|
+
const o = () => {
|
|
1850
|
+
s !== null && (clearTimeout(s), s = null);
|
|
1851
|
+
}, l = (g) => {
|
|
1852
|
+
i.value = g, n("visible-change", g), !g && r.filterable && (f.value = "", m.value = "", o());
|
|
1853
|
+
}, d = (g) => typeof g == "number" ? `n:${g}` : `s:${g}`, c = je({}), w = je({}), k = M(0), v = M(null), C = (g, H, X) => {
|
|
1854
|
+
const le = d(g);
|
|
1855
|
+
return k.value++, c[le] = H, w[le] = X ?? H, () => {
|
|
1856
|
+
k.value--, delete c[le], delete w[le];
|
|
1857
|
+
};
|
|
1858
|
+
}, x = h(() => k.value === 0);
|
|
1859
|
+
J(
|
|
1860
|
+
() => r.modelValue,
|
|
1861
|
+
(g) => {
|
|
1862
|
+
if (g == null || g === "") {
|
|
1863
|
+
v.value = null;
|
|
1864
|
+
return;
|
|
1865
|
+
}
|
|
1866
|
+
v.value && v.value.value !== g && (v.value = null);
|
|
1867
|
+
}
|
|
1868
|
+
);
|
|
1869
|
+
const $ = h(() => {
|
|
1870
|
+
const g = r.modelValue;
|
|
1871
|
+
return g != null && g !== "";
|
|
1872
|
+
}), S = h(() => {
|
|
1873
|
+
if (!$.value) return "";
|
|
1874
|
+
const g = r.modelValue;
|
|
1875
|
+
return v.value?.value === g ? v.value.label : c[d(g)] ?? String(g);
|
|
1876
|
+
}), V = (g) => r.modelValue === g, A = (g, H) => {
|
|
1877
|
+
r.disabled || (v.value = { value: g, label: H }, n("update:modelValue", g), n("change", g), a.value?.close());
|
|
1878
|
+
}, f = M(""), m = M(""), u = h(() => m.value.trim().toLowerCase()), T = h(() => {
|
|
1879
|
+
const g = u.value;
|
|
1880
|
+
return !r.filterable || !g ? !0 : Object.keys(c).some((H) => (w[H] ?? c[H]).toLowerCase().includes(g));
|
|
1881
|
+
}), B = h(
|
|
1882
|
+
() => r.filterable && !!u.value && !T.value && !x.value
|
|
1883
|
+
), D = () => {
|
|
1884
|
+
r.filterable && (o(), s = setTimeout(() => {
|
|
1885
|
+
m.value = f.value.trim(), s = null;
|
|
1886
|
+
}, r.filterDebounceMs));
|
|
1887
|
+
};
|
|
1888
|
+
J(f, () => {
|
|
1889
|
+
r.filterable && D();
|
|
1890
|
+
}), J(
|
|
1891
|
+
() => r.filterable,
|
|
1892
|
+
(g) => {
|
|
1893
|
+
g || (f.value = "", m.value = "", o());
|
|
484
1894
|
}
|
|
485
|
-
),
|
|
486
|
-
|
|
487
|
-
|
|
1895
|
+
), Ve(() => o());
|
|
1896
|
+
const W = (g) => {
|
|
1897
|
+
n("filter-input", String(g ?? ""));
|
|
1898
|
+
}, b = () => {
|
|
1899
|
+
m.value = "", o(), n("filter-clear");
|
|
1900
|
+
};
|
|
1901
|
+
Nt(sr, {
|
|
1902
|
+
modelValue: h(() => r.modelValue),
|
|
1903
|
+
disabled: h(() => !!r.disabled),
|
|
1904
|
+
selectOption: A,
|
|
1905
|
+
isOptionSelected: V,
|
|
1906
|
+
registerOption: C,
|
|
1907
|
+
filterQuery: u
|
|
1908
|
+
});
|
|
1909
|
+
const R = (g) => typeof g == "number" ? `${g}px` : g, z = h(() => {
|
|
1910
|
+
if (r.popperWidth) return R(r.popperWidth);
|
|
1911
|
+
const g = r.triggerWidth;
|
|
1912
|
+
return typeof g == "number" ? g + 8 : `calc(${g} + 8px)`;
|
|
1913
|
+
}), K = h(() => typeof z.value == "number" ? `${z.value - 12}px` : `calc(${z.value} - 12px)`), Q = h(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), N = h(() => ({
|
|
1914
|
+
width: R(r.triggerWidth)
|
|
1915
|
+
})), F = h(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), ue = M(0), se = (g) => {
|
|
1916
|
+
ue.value = g.scrollTop;
|
|
1917
|
+
};
|
|
1918
|
+
return (g, H) => (y(), O("div", {
|
|
1919
|
+
class: j(["cregis-select", { "is-disabled": e.disabled }])
|
|
1920
|
+
}, [
|
|
1921
|
+
U(ft, {
|
|
1922
|
+
ref_key: "popoverRef",
|
|
1923
|
+
ref: a,
|
|
1924
|
+
"preserve-content-mount": "",
|
|
1925
|
+
"popper-width": z.value,
|
|
1926
|
+
placement: Q.value,
|
|
1927
|
+
disabled: !!e.disabled,
|
|
1928
|
+
padding: 0,
|
|
1929
|
+
"max-popper-height": e.maxPopperHeight,
|
|
1930
|
+
onVisibleChange: l,
|
|
1931
|
+
onScroll: se
|
|
1932
|
+
}, {
|
|
1933
|
+
reference: Z(() => [
|
|
1934
|
+
E("div", {
|
|
1935
|
+
class: j(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
1936
|
+
style: pe(N.value)
|
|
1937
|
+
}, [
|
|
1938
|
+
E("div", Rn, [
|
|
1939
|
+
$.value ? q(g.$slots, "label", {
|
|
1940
|
+
key: 0,
|
|
1941
|
+
modelValue: e.modelValue,
|
|
1942
|
+
displayText: S.value,
|
|
1943
|
+
placeholder: e.placeholder,
|
|
1944
|
+
hasSelection: $.value
|
|
1945
|
+
}, () => [
|
|
1946
|
+
E("p", An, _(S.value), 1)
|
|
1947
|
+
]) : (y(), O("p", Dn, _(e.placeholder), 1))
|
|
1948
|
+
]),
|
|
1949
|
+
E("span", {
|
|
1950
|
+
class: j(["cregis-select__icon", { "is-open": i.value }])
|
|
1951
|
+
}, [
|
|
1952
|
+
U(ae(Xt), {
|
|
1953
|
+
size: F.value,
|
|
1954
|
+
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
|
|
1955
|
+
}, null, 8, ["size", "color"])
|
|
1956
|
+
], 2)
|
|
1957
|
+
], 6)
|
|
1958
|
+
]),
|
|
1959
|
+
default: Z(() => [
|
|
1960
|
+
E("div", {
|
|
1961
|
+
class: j(["cregis-select__dropdown", { "is-empty": x.value }])
|
|
1962
|
+
}, [
|
|
1963
|
+
x.value ? (y(), O("p", zn, _(e.noDataText), 1)) : I("", !0),
|
|
1964
|
+
e.filterable ? (y(), O("div", {
|
|
1965
|
+
key: 1,
|
|
1966
|
+
class: j(["cregis-select__dropdown-filter", { "backdrop-fixed-header": ue.value > 10 }])
|
|
1967
|
+
}, [
|
|
1968
|
+
U(Yt, {
|
|
1969
|
+
modelValue: f.value,
|
|
1970
|
+
"onUpdate:modelValue": H[0] || (H[0] = (X) => f.value = X),
|
|
1971
|
+
placeholder: "search",
|
|
1972
|
+
width: K.value,
|
|
1973
|
+
size: "small",
|
|
1974
|
+
clearable: "",
|
|
1975
|
+
onInput: W,
|
|
1976
|
+
onClear: b
|
|
1977
|
+
}, {
|
|
1978
|
+
prefix: Z(() => [
|
|
1979
|
+
U(ae(Ut), { size: "14px" })
|
|
1980
|
+
]),
|
|
1981
|
+
_: 1
|
|
1982
|
+
}, 8, ["modelValue", "width"])
|
|
1983
|
+
], 2)) : I("", !0),
|
|
1984
|
+
B.value ? (y(), O("p", Wn, _(e.noMatchText), 1)) : I("", !0),
|
|
1985
|
+
E("div", Ln, [
|
|
1986
|
+
q(g.$slots, "default")
|
|
1987
|
+
])
|
|
1988
|
+
], 2)
|
|
1989
|
+
]),
|
|
1990
|
+
_: 3
|
|
1991
|
+
}, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
|
|
1992
|
+
], 2));
|
|
1993
|
+
}
|
|
1994
|
+
}), jn = ["aria-selected"], oi = /* @__PURE__ */ Y({
|
|
1995
|
+
name: "Option",
|
|
1996
|
+
__name: "Option",
|
|
1997
|
+
props: {
|
|
1998
|
+
label: {},
|
|
1999
|
+
value: {},
|
|
2000
|
+
disabled: { type: Boolean },
|
|
2001
|
+
filterText: {}
|
|
2002
|
+
},
|
|
2003
|
+
setup(e) {
|
|
2004
|
+
const t = e, r = Ft(sr, null);
|
|
2005
|
+
let n;
|
|
2006
|
+
const a = () => t.filterText ?? t.label, i = () => {
|
|
2007
|
+
n?.(), r && (n = r.registerOption(t.value, t.label, a()));
|
|
2008
|
+
};
|
|
2009
|
+
Je(i), Ve(() => n?.()), J(() => [t.value, t.label, t.filterText], i);
|
|
2010
|
+
const s = h(() => r?.isOptionSelected(t.value) ?? !1), o = () => {
|
|
2011
|
+
t.disabled || r?.disabled.value || r?.selectOption(t.value, t.label);
|
|
2012
|
+
}, l = h(() => r?.filterQuery?.value ?? ""), d = h(() => {
|
|
2013
|
+
const c = l.value;
|
|
2014
|
+
return c ? a().toLowerCase().includes(c) : !0;
|
|
2015
|
+
});
|
|
2016
|
+
return (c, w) => Le((y(), O("div", {
|
|
2017
|
+
class: j(["cregis-select__option", { "is-selected": s.value, "is-disabled": e.disabled }]),
|
|
2018
|
+
role: "option",
|
|
2019
|
+
"aria-selected": s.value,
|
|
2020
|
+
onClick: o
|
|
2021
|
+
}, [
|
|
2022
|
+
q(c.$slots, "default", {
|
|
2023
|
+
label: e.label,
|
|
2024
|
+
value: e.value,
|
|
2025
|
+
disabled: !!e.disabled,
|
|
2026
|
+
selected: s.value
|
|
2027
|
+
}, () => [
|
|
2028
|
+
Oe(_(e.label), 1)
|
|
2029
|
+
])
|
|
2030
|
+
], 10, jn)), [
|
|
2031
|
+
[vt, d.value]
|
|
2032
|
+
]);
|
|
2033
|
+
}
|
|
2034
|
+
}), Mn = { class: "cregis-cascader__trigger-label" }, _n = { class: "cregis-cascader__selected" }, In = {
|
|
2035
|
+
key: 1,
|
|
2036
|
+
class: "cregis-cascader__placeholder"
|
|
2037
|
+
}, Nn = {
|
|
2038
|
+
key: 0,
|
|
2039
|
+
class: "cregis-cascader__dropdown-empty"
|
|
2040
|
+
}, Fn = {
|
|
2041
|
+
key: 2,
|
|
2042
|
+
class: "cregis-cascader__dropdown-filter-empty"
|
|
2043
|
+
}, Hn = { class: "cregis-cascader__dropdown-content" }, qn = {
|
|
2044
|
+
key: 0,
|
|
2045
|
+
class: "cregis-cascader__dropdown-item-popover"
|
|
2046
|
+
}, Un = { class: "cregis-cascader__suboption-panel" }, Xn = ["onClick"], Yn = ["onClick"], si = /* @__PURE__ */ Y({
|
|
2047
|
+
name: "Cascader",
|
|
2048
|
+
__name: "Cascader",
|
|
2049
|
+
props: {
|
|
2050
|
+
modelValue: {},
|
|
2051
|
+
options: { default: () => [] },
|
|
2052
|
+
type: { default: "default" },
|
|
2053
|
+
size: { default: "large" },
|
|
2054
|
+
align: { default: "center" },
|
|
2055
|
+
placeholder: { default: "Please select" },
|
|
2056
|
+
disabled: { type: Boolean },
|
|
2057
|
+
filterable: { type: Boolean },
|
|
2058
|
+
filterDebounceMs: { default: 200 },
|
|
2059
|
+
noDataText: { default: "No data" },
|
|
2060
|
+
noMatchText: { default: "No matching data" },
|
|
2061
|
+
triggerWidth: { default: "296px" },
|
|
2062
|
+
popperWidth: {},
|
|
2063
|
+
subPopperWidth: { default: "200px" },
|
|
2064
|
+
maxPopperHeight: {}
|
|
2065
|
+
},
|
|
2066
|
+
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2067
|
+
setup(e, { emit: t }) {
|
|
2068
|
+
const r = e, n = t, a = M(null), i = M(!1);
|
|
2069
|
+
let s = null;
|
|
2070
|
+
const o = () => {
|
|
2071
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2072
|
+
}, l = M(""), d = M(""), c = h(() => d.value.trim().toLowerCase()), w = () => {
|
|
2073
|
+
r.filterable && (o(), s = setTimeout(() => {
|
|
2074
|
+
d.value = l.value.trim(), s = null;
|
|
2075
|
+
}, r.filterDebounceMs));
|
|
488
2076
|
};
|
|
2077
|
+
J(l, () => {
|
|
2078
|
+
r.filterable && w();
|
|
2079
|
+
}), J(
|
|
2080
|
+
() => r.filterable,
|
|
2081
|
+
(p) => {
|
|
2082
|
+
p || (l.value = "", d.value = "", o());
|
|
2083
|
+
}
|
|
2084
|
+
), Ve(() => o());
|
|
2085
|
+
const k = (p) => {
|
|
2086
|
+
n("filter-input", String(p ?? ""));
|
|
2087
|
+
}, v = () => {
|
|
2088
|
+
d.value = "", o(), n("filter-clear");
|
|
2089
|
+
}, C = (p) => (p.filterText ?? p.label).toLowerCase(), x = (p) => {
|
|
2090
|
+
const L = c.value;
|
|
2091
|
+
return !L || C(p).includes(L) ? !0 : (p.children ?? []).some((ce) => C(ce).includes(L));
|
|
2092
|
+
}, $ = (p, L) => {
|
|
2093
|
+
const P = c.value;
|
|
2094
|
+
return !P || C(p).includes(P) ? !0 : C(L).includes(P);
|
|
2095
|
+
}, S = h(() => r.options.filter((p) => x(p))), V = h(() => r.options.length === 0), A = h(() => (c.value, r.options.some((p) => x(p)))), f = h(
|
|
2096
|
+
() => r.filterable && !!d.value.trim() && !A.value && !V.value
|
|
2097
|
+
), m = (p) => {
|
|
2098
|
+
i.value = p, n("visible-change", p), !p && r.filterable && (l.value = "", d.value = "", o());
|
|
2099
|
+
}, u = M(null), T = (p) => {
|
|
2100
|
+
const L = r.options.find((P) => P.value === p);
|
|
2101
|
+
if (L)
|
|
2102
|
+
return {
|
|
2103
|
+
level: 1,
|
|
2104
|
+
label: L.label,
|
|
2105
|
+
primary: L,
|
|
2106
|
+
sub: void 0
|
|
2107
|
+
};
|
|
2108
|
+
for (const P of r.options) {
|
|
2109
|
+
const ce = P.children?.find((G) => G.value === p);
|
|
2110
|
+
if (ce)
|
|
2111
|
+
return {
|
|
2112
|
+
level: 2,
|
|
2113
|
+
label: ce.label,
|
|
2114
|
+
primary: P,
|
|
2115
|
+
sub: ce
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
return {
|
|
2119
|
+
level: 0,
|
|
2120
|
+
label: String(p),
|
|
2121
|
+
primary: void 0,
|
|
2122
|
+
sub: void 0
|
|
2123
|
+
};
|
|
2124
|
+
}, B = h(() => {
|
|
2125
|
+
const p = r.modelValue;
|
|
2126
|
+
return p == null || p === "" ? {
|
|
2127
|
+
level: 0,
|
|
2128
|
+
label: "",
|
|
2129
|
+
primary: void 0,
|
|
2130
|
+
sub: void 0
|
|
2131
|
+
} : u.value !== null && u.value.value === p ? {
|
|
2132
|
+
level: u.value.level,
|
|
2133
|
+
label: u.value.label,
|
|
2134
|
+
primary: u.value.primary,
|
|
2135
|
+
sub: u.value.sub
|
|
2136
|
+
} : T(p);
|
|
2137
|
+
});
|
|
2138
|
+
J(
|
|
2139
|
+
() => r.modelValue,
|
|
2140
|
+
(p) => {
|
|
2141
|
+
if (p == null || p === "") {
|
|
2142
|
+
u.value = null;
|
|
2143
|
+
return;
|
|
2144
|
+
}
|
|
2145
|
+
u.value !== null && u.value.value !== p && (u.value = null);
|
|
2146
|
+
}
|
|
2147
|
+
);
|
|
2148
|
+
const D = h(() => B.value.level > 0), W = h(() => B.value.label), b = h(() => r.modelValue), R = h(() => W.value), z = h(() => B.value.level), K = h(() => B.value.primary), Q = h(() => B.value.sub), N = (p) => (p.children?.length ?? 0) > 0, F = (p) => r.modelValue === p, ue = (p) => {
|
|
2149
|
+
const L = r.modelValue;
|
|
2150
|
+
return L == null || L === "" ? !1 : (p.children ?? []).some((P) => P.value === L);
|
|
2151
|
+
}, se = (p, L) => {
|
|
2152
|
+
r.disabled || p.disabled || L.disabled || (u.value = { value: L.value, label: L.label, level: 2, primary: p, sub: L }, n("update:modelValue", L.value), n("change", L.value), a.value?.close());
|
|
2153
|
+
}, g = (p) => {
|
|
2154
|
+
r.disabled || p.disabled || N(p) || (u.value = { value: p.value, label: p.label, level: 1, primary: p }, n("update:modelValue", p.value), n("change", p.value), a.value?.close());
|
|
2155
|
+
}, H = (p) => typeof p == "number" ? `${p}px` : p, X = h(() => {
|
|
2156
|
+
if (r.popperWidth !== void 0 && r.popperWidth !== null && r.popperWidth !== "")
|
|
2157
|
+
return H(r.popperWidth);
|
|
2158
|
+
const p = r.triggerWidth;
|
|
2159
|
+
return typeof p == "number" ? `${p + 8}px` : `calc(${p} + 8px)`;
|
|
2160
|
+
}), le = h(() => H(r.subPopperWidth)), he = h(() => typeof X.value == "number" ? `${X.value - 12}px` : `calc(${X.value} - 12px)`), de = h(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), ye = h(() => ({
|
|
2161
|
+
width: H(r.triggerWidth)
|
|
2162
|
+
})), Te = h(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), fe = M(0), Be = (p) => {
|
|
2163
|
+
fe.value = p.scrollTop;
|
|
2164
|
+
}, tt = [-16, -8];
|
|
2165
|
+
return (p, L) => (y(), O("div", {
|
|
2166
|
+
class: j(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2167
|
+
}, [
|
|
2168
|
+
U(ft, {
|
|
2169
|
+
ref_key: "popoverRef",
|
|
2170
|
+
ref: a,
|
|
2171
|
+
"preserve-content-mount": "",
|
|
2172
|
+
"popper-width": X.value,
|
|
2173
|
+
placement: de.value,
|
|
2174
|
+
disabled: !!e.disabled,
|
|
2175
|
+
padding: 0,
|
|
2176
|
+
"max-popper-height": e.maxPopperHeight,
|
|
2177
|
+
onVisibleChange: m,
|
|
2178
|
+
onScroll: Be
|
|
2179
|
+
}, {
|
|
2180
|
+
reference: Z(() => [
|
|
2181
|
+
E("div", {
|
|
2182
|
+
class: j(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2183
|
+
style: pe(ye.value)
|
|
2184
|
+
}, [
|
|
2185
|
+
E("div", Mn, [
|
|
2186
|
+
D.value ? q(p.$slots, "label", {
|
|
2187
|
+
key: 0,
|
|
2188
|
+
modelValue: b.value,
|
|
2189
|
+
selectedLabel: R.value,
|
|
2190
|
+
level: z.value,
|
|
2191
|
+
primaryOption: K.value,
|
|
2192
|
+
subOption: Q.value,
|
|
2193
|
+
placeholder: e.placeholder,
|
|
2194
|
+
hasSelection: D.value
|
|
2195
|
+
}, () => [
|
|
2196
|
+
E("p", _n, _(W.value), 1)
|
|
2197
|
+
]) : (y(), O("p", In, _(e.placeholder), 1))
|
|
2198
|
+
]),
|
|
2199
|
+
E("span", {
|
|
2200
|
+
class: j(["cregis-cascader__icon", { "is-open": i.value }])
|
|
2201
|
+
}, [
|
|
2202
|
+
U(ae(Xt), {
|
|
2203
|
+
size: Te.value,
|
|
2204
|
+
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
|
|
2205
|
+
}, null, 8, ["size", "color"])
|
|
2206
|
+
], 2)
|
|
2207
|
+
], 6)
|
|
2208
|
+
]),
|
|
2209
|
+
default: Z(() => [
|
|
2210
|
+
E("div", {
|
|
2211
|
+
class: j(["cregis-cascader__dropdown", { "is-empty": V.value }])
|
|
2212
|
+
}, [
|
|
2213
|
+
V.value ? (y(), O("p", Nn, _(e.noDataText), 1)) : I("", !0),
|
|
2214
|
+
e.filterable ? (y(), O("div", {
|
|
2215
|
+
key: 1,
|
|
2216
|
+
class: j(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": fe.value > 10 }])
|
|
2217
|
+
}, [
|
|
2218
|
+
U(Yt, {
|
|
2219
|
+
modelValue: l.value,
|
|
2220
|
+
"onUpdate:modelValue": L[0] || (L[0] = (P) => l.value = P),
|
|
2221
|
+
placeholder: "search",
|
|
2222
|
+
width: he.value,
|
|
2223
|
+
size: "small",
|
|
2224
|
+
clearable: "",
|
|
2225
|
+
onInput: k,
|
|
2226
|
+
onClear: v
|
|
2227
|
+
}, {
|
|
2228
|
+
prefix: Z(() => [
|
|
2229
|
+
U(ae(Ut), { size: "14px" })
|
|
2230
|
+
]),
|
|
2231
|
+
_: 1
|
|
2232
|
+
}, 8, ["modelValue", "width"])
|
|
2233
|
+
], 2)) : I("", !0),
|
|
2234
|
+
f.value ? (y(), O("p", Fn, _(e.noMatchText), 1)) : I("", !0),
|
|
2235
|
+
E("ul", Hn, [
|
|
2236
|
+
(y(!0), O(st, null, lt(S.value, (P, ce) => (y(), O("li", {
|
|
2237
|
+
key: P.value,
|
|
2238
|
+
class: j(["cregis-cascader__dropdown-item", { "is-disabled": P.disabled }])
|
|
2239
|
+
}, [
|
|
2240
|
+
N(P) ? (y(), O("div", qn, [
|
|
2241
|
+
U(ft, {
|
|
2242
|
+
trigger: "hover",
|
|
2243
|
+
placement: "right-start",
|
|
2244
|
+
offset: tt,
|
|
2245
|
+
"popper-width": le.value,
|
|
2246
|
+
padding: 4,
|
|
2247
|
+
disabled: !!P.disabled || !!e.disabled
|
|
2248
|
+
}, {
|
|
2249
|
+
reference: Z(() => [
|
|
2250
|
+
E("div", {
|
|
2251
|
+
class: j(["cregis-cascader__suboption-trigger", {
|
|
2252
|
+
"is-disabled": P.disabled,
|
|
2253
|
+
"is-parent-active": ue(P)
|
|
2254
|
+
}])
|
|
2255
|
+
}, [
|
|
2256
|
+
q(p.$slots, "option", {
|
|
2257
|
+
modelValue: b.value,
|
|
2258
|
+
selectedLabel: R.value,
|
|
2259
|
+
level: z.value,
|
|
2260
|
+
primaryOption: K.value,
|
|
2261
|
+
subOption: Q.value,
|
|
2262
|
+
option: P,
|
|
2263
|
+
index: ce,
|
|
2264
|
+
disabled: !!P.disabled,
|
|
2265
|
+
selected: F(P.value),
|
|
2266
|
+
isParentOfSelected: ue(P)
|
|
2267
|
+
}, () => [
|
|
2268
|
+
E("p", null, _(P.label), 1)
|
|
2269
|
+
]),
|
|
2270
|
+
U(ae(hr), {
|
|
2271
|
+
class: "arrow",
|
|
2272
|
+
size: "14px",
|
|
2273
|
+
color: "currentColor"
|
|
2274
|
+
})
|
|
2275
|
+
], 2)
|
|
2276
|
+
]),
|
|
2277
|
+
default: Z(() => [
|
|
2278
|
+
E("div", Un, [
|
|
2279
|
+
(y(!0), O(st, null, lt(P.children, (G, Fe) => Le((y(), O("div", {
|
|
2280
|
+
key: G.value,
|
|
2281
|
+
class: j(["cregis-cascader__suboption-row", {
|
|
2282
|
+
"is-active": F(G.value),
|
|
2283
|
+
"is-disabled": G.disabled
|
|
2284
|
+
}]),
|
|
2285
|
+
role: "menuitem",
|
|
2286
|
+
onClick: (rt) => se(P, G)
|
|
2287
|
+
}, [
|
|
2288
|
+
q(p.$slots, "subOption", {
|
|
2289
|
+
modelValue: b.value,
|
|
2290
|
+
selectedLabel: R.value,
|
|
2291
|
+
level: z.value,
|
|
2292
|
+
primaryOption: K.value,
|
|
2293
|
+
subOption: Q.value,
|
|
2294
|
+
option: G,
|
|
2295
|
+
index: Fe,
|
|
2296
|
+
parent: P,
|
|
2297
|
+
parentIndex: ce,
|
|
2298
|
+
selected: F(G.value),
|
|
2299
|
+
disabled: !!G.disabled
|
|
2300
|
+
}, () => [
|
|
2301
|
+
Oe(_(G.label), 1)
|
|
2302
|
+
])
|
|
2303
|
+
], 10, Xn)), [
|
|
2304
|
+
[vt, $(P, G)]
|
|
2305
|
+
])), 128))
|
|
2306
|
+
])
|
|
2307
|
+
]),
|
|
2308
|
+
_: 2
|
|
2309
|
+
}, 1032, ["popper-width", "disabled"])
|
|
2310
|
+
])) : (y(), O("div", {
|
|
2311
|
+
key: 1,
|
|
2312
|
+
class: "cregis-cascader__leaf-only",
|
|
2313
|
+
onClick: (G) => g(P)
|
|
2314
|
+
}, [
|
|
2315
|
+
q(p.$slots, "option", {
|
|
2316
|
+
modelValue: b.value,
|
|
2317
|
+
selectedLabel: R.value,
|
|
2318
|
+
level: z.value,
|
|
2319
|
+
primaryOption: K.value,
|
|
2320
|
+
subOption: Q.value,
|
|
2321
|
+
option: P,
|
|
2322
|
+
index: ce,
|
|
2323
|
+
disabled: !!P.disabled,
|
|
2324
|
+
selected: F(P.value),
|
|
2325
|
+
isParentOfSelected: !1
|
|
2326
|
+
}, () => [
|
|
2327
|
+
E("p", null, _(P.label), 1)
|
|
2328
|
+
])
|
|
2329
|
+
], 8, Yn))
|
|
2330
|
+
], 2))), 128))
|
|
2331
|
+
])
|
|
2332
|
+
], 2)
|
|
2333
|
+
]),
|
|
2334
|
+
_: 3
|
|
2335
|
+
}, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
|
|
2336
|
+
], 2));
|
|
489
2337
|
}
|
|
490
2338
|
});
|
|
491
2339
|
export {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
2340
|
+
Ue as Button,
|
|
2341
|
+
si as Cascader,
|
|
2342
|
+
Gn as Checkbox,
|
|
2343
|
+
Jn as Divider,
|
|
2344
|
+
Yt as Input,
|
|
2345
|
+
ri as Message,
|
|
2346
|
+
ai as Notification,
|
|
2347
|
+
oi as Option,
|
|
2348
|
+
ft as Popover,
|
|
2349
|
+
ni as Progress,
|
|
2350
|
+
Zn as Radio,
|
|
2351
|
+
ii as Select,
|
|
2352
|
+
Kt as TABS_KEY,
|
|
2353
|
+
ti as TabPane,
|
|
2354
|
+
ei as Tabs,
|
|
2355
|
+
sr as selectInjectKey
|
|
500
2356
|
};
|