@cregis/ui 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/cregis-ui.js +1175 -1129
- package/dist/index.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/dist/umd/index.css +1 -1
- package/package.json +1 -1
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as Q, useSlots as
|
|
2
|
-
import { EdsLoad as
|
|
3
|
-
const Ea = ["disabled"],
|
|
1
|
+
import { defineComponent as Q, useSlots as wa, ref as F, computed as p, createElementBlock as w, openBlock as f, normalizeClass as j, createElementVNode as P, createCommentVNode as _, mergeProps as Oe, createBlock as ve, resolveDynamicComponent as bt, normalizeStyle as ie, renderSlot as Y, toDisplayString as I, unref as te, watch as J, withDirectives as He, vModelDynamic as xa, withModifiers as yt, vModelText as ka, createVNode as G, withCtx as ae, createTextVNode as be, nextTick as Ce, reactive as Pe, provide as Qt, toRef as $a, Fragment as ft, renderList as pt, inject as Zt, onMounted as Ye, onUnmounted as Te, onBeforeUnmount as Jt, Transition as nt, render as Ae, h as wt, toHandlers as st, Teleport as ea, vShow as xt } from "vue";
|
|
2
|
+
import { EdsLoad as Oa, EdsCloseCircleFill as Ca, EdsTickFill as ta, EdsWarningFill as Ta, EdsSearch as aa, EdsArrowDownMiniIos as na, EdsArrowRightMiniIos as Sa, EdsAdd as Wt, EdsClose as Va, EdsWarningLonely as Ba } from "@cregis/icon";
|
|
3
|
+
const Ea = ["disabled"], Pa = ["disabled"], za = ["disabled"], ze = /* @__PURE__ */ Q({
|
|
4
4
|
name: "Button",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "Button",
|
|
@@ -21,14 +21,14 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
21
21
|
isActive: { type: Boolean }
|
|
22
22
|
},
|
|
23
23
|
setup(e) {
|
|
24
|
-
const a = e, t =
|
|
24
|
+
const a = e, t = wa(), r = F(null);
|
|
25
25
|
function n() {
|
|
26
26
|
a.disabled || a.loading || r.value?.click();
|
|
27
27
|
}
|
|
28
|
-
const i =
|
|
29
|
-
const c = a,
|
|
30
|
-
return !c.icon && typeof
|
|
31
|
-
}),
|
|
28
|
+
const i = p(() => {
|
|
29
|
+
const c = a, b = t.icon;
|
|
30
|
+
return !c.icon && typeof b == "function";
|
|
31
|
+
}), s = p(() => a.size === "large" ? "20px" : a.size === "medium" ? "16px" : "12px"), o = p(() => a.size === "large" || a.size === "medium" ? "16px" : "12px"), l = p(() => a.width ? { width: a.width } : void 0), d = p(() => {
|
|
32
32
|
if (a.plain || a.text)
|
|
33
33
|
switch (a.type) {
|
|
34
34
|
case "primary":
|
|
@@ -45,11 +45,11 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
45
45
|
else
|
|
46
46
|
return a.type === "secondary" ? "var(--material-base-secondary)" : a.type === "foreground" ? "var(--text-face-primary)" : a.type === "sameWhite" ? "var(--text-same-black-primary)" : "var(--material-same-white-primary)";
|
|
47
47
|
});
|
|
48
|
-
return (c,
|
|
48
|
+
return (c, b) => e.icon || c.$slots.icon ? (f(), w("div", {
|
|
49
49
|
key: 0,
|
|
50
|
-
class:
|
|
50
|
+
class: j(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
|
|
51
51
|
}, [
|
|
52
|
-
|
|
52
|
+
P("button", Oe({
|
|
53
53
|
ref_key: "iconButtonRef",
|
|
54
54
|
ref: r
|
|
55
55
|
}, c.$attrs, {
|
|
@@ -62,23 +62,23 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
62
62
|
}],
|
|
63
63
|
disabled: e.disabled || e.loading
|
|
64
64
|
}), [
|
|
65
|
-
e.icon ? (
|
|
65
|
+
e.icon ? (f(), ve(bt(e.icon), {
|
|
66
66
|
key: 0,
|
|
67
|
-
size:
|
|
68
|
-
}, null, 8, ["size"])) : (
|
|
67
|
+
size: s.value
|
|
68
|
+
}, null, 8, ["size"])) : (f(), w("span", {
|
|
69
69
|
key: 1,
|
|
70
70
|
class: "cregis-button__icon-slot-inner",
|
|
71
|
-
style:
|
|
71
|
+
style: ie({ "--cregis-btn-icon-slot-size": s.value })
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
Y(c.$slots, "icon")
|
|
74
74
|
], 4))
|
|
75
75
|
], 16, Ea),
|
|
76
|
-
e.iconText ? (
|
|
76
|
+
e.iconText ? (f(), w("span", {
|
|
77
77
|
key: 0,
|
|
78
|
-
class:
|
|
78
|
+
class: j(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
|
|
79
79
|
onClick: n
|
|
80
|
-
},
|
|
81
|
-
], 2)) : e.link ? (
|
|
80
|
+
}, I(e.iconText), 3)) : _("", !0)
|
|
81
|
+
], 2)) : e.link ? (f(), w("button", Oe({ key: 1 }, c.$attrs, {
|
|
82
82
|
class: ["cregis-button__link", {
|
|
83
83
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
84
84
|
[`cregis-button__link--${e.size}`]: e.size,
|
|
@@ -87,12 +87,12 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
87
87
|
}],
|
|
88
88
|
disabled: e.disabled || e.loading
|
|
89
89
|
}), [
|
|
90
|
-
|
|
91
|
-
], 16,
|
|
90
|
+
Y(c.$slots, "default")
|
|
91
|
+
], 16, Pa)) : (f(), w("button", Oe({
|
|
92
92
|
key: 2,
|
|
93
93
|
ref: "buttonRef"
|
|
94
94
|
}, c.$attrs, {
|
|
95
|
-
style:
|
|
95
|
+
style: l.value,
|
|
96
96
|
class: ["cregis-button", {
|
|
97
97
|
[`cregis-button--${e.type}`]: e.type,
|
|
98
98
|
[`cregis-button--${e.size}`]: e.size,
|
|
@@ -106,24 +106,24 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
106
106
|
}],
|
|
107
107
|
disabled: e.disabled || e.loading
|
|
108
108
|
}), [
|
|
109
|
-
e.loading ? (
|
|
109
|
+
e.loading ? (f(), ve(te(Oa), {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: "loading",
|
|
112
112
|
size: o.value,
|
|
113
113
|
color: d.value
|
|
114
|
-
}, null, 8, ["size", "color"])) :
|
|
115
|
-
], 16,
|
|
114
|
+
}, null, 8, ["size", "color"])) : Y(c.$slots, "default", { key: 1 })
|
|
115
|
+
], 16, za));
|
|
116
116
|
}
|
|
117
|
-
}),
|
|
117
|
+
}), Aa = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "cregis-input__prefix"
|
|
120
|
-
},
|
|
120
|
+
}, Da = ["type", "inputmode", "placeholder", "min", "disabled"], Ra = {
|
|
121
121
|
key: 2,
|
|
122
122
|
class: "cregis-input__suffix"
|
|
123
|
-
},
|
|
123
|
+
}, Wa = ["disabled", "placeholder", "rows"], La = {
|
|
124
124
|
key: 0,
|
|
125
125
|
class: "cregis-textarea__buttons"
|
|
126
|
-
},
|
|
126
|
+
}, ra = /* @__PURE__ */ Q({
|
|
127
127
|
name: "Input",
|
|
128
128
|
inheritAttrs: !1,
|
|
129
129
|
__name: "Input",
|
|
@@ -147,93 +147,93 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
147
147
|
setup(e, { expose: a, emit: t }) {
|
|
148
148
|
const r = e, n = t, i = (u) => {
|
|
149
149
|
if (u === "" || u === null || u === void 0) return "";
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
const z = Number(
|
|
150
|
+
const y = String(u).trim();
|
|
151
|
+
if (y === "") return "";
|
|
152
|
+
const z = Number(y.replace(/,/g, ""));
|
|
153
153
|
if (!Number.isNaN(z) && z < 0) return Math.abs(z);
|
|
154
|
-
if (/^-/.test(
|
|
155
|
-
const q =
|
|
154
|
+
if (/^-/.test(y)) {
|
|
155
|
+
const q = y.replace(/^-+/, "");
|
|
156
156
|
return q === "" ? "" : q;
|
|
157
157
|
}
|
|
158
158
|
return u;
|
|
159
|
-
},
|
|
159
|
+
}, s = p(() => {
|
|
160
160
|
const u = r.decimals;
|
|
161
161
|
return u === void 0 || !Number.isFinite(u) ? null : Math.max(0, Math.floor(u));
|
|
162
|
-
}), o =
|
|
163
|
-
() => r.type === "number" &&
|
|
164
|
-
),
|
|
162
|
+
}), o = p(
|
|
163
|
+
() => r.type === "number" && s.value !== null
|
|
164
|
+
), l = p(
|
|
165
165
|
() => o.value ? "text" : r.type
|
|
166
|
-
), d =
|
|
166
|
+
), d = p(() => o.value ? "decimal" : void 0), c = (u) => u.replace(/[,,。.]/g, "."), b = (u) => {
|
|
167
167
|
if (u === "" || u === null || u === void 0) return "";
|
|
168
|
-
let
|
|
169
|
-
if (
|
|
168
|
+
let y = c(String(u).trim());
|
|
169
|
+
if (y === "") return "";
|
|
170
170
|
let z = !1;
|
|
171
|
-
!r.nonNegative &&
|
|
172
|
-
const q =
|
|
173
|
-
return q !== -1 && (
|
|
171
|
+
!r.nonNegative && y.startsWith("-") && (z = !0, y = y.slice(1)), y = y.replace(/[^\d.]/g, "");
|
|
172
|
+
const q = y.indexOf(".");
|
|
173
|
+
return q !== -1 && (y = y.slice(0, q + 1) + y.slice(q + 1).replace(/\./g, "")), (z ? "-" : "") + y;
|
|
174
174
|
}, $ = (u) => {
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
175
|
+
const y = s.value;
|
|
176
|
+
if (y === null) return u;
|
|
177
177
|
if (u === "" || u === null || u === void 0) return "";
|
|
178
178
|
const z = String(u).trim();
|
|
179
179
|
if (z === "") return "";
|
|
180
180
|
const q = z.startsWith("-");
|
|
181
181
|
let re = q ? z.slice(1) : z;
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
return
|
|
186
|
-
},
|
|
187
|
-
let
|
|
188
|
-
return o.value && (
|
|
189
|
-
},
|
|
190
|
-
r.type === "number" ?
|
|
182
|
+
const ne = re.indexOf(".");
|
|
183
|
+
if (ne === -1) return u;
|
|
184
|
+
const ee = re.slice(0, ne), le = re.slice(ne + 1);
|
|
185
|
+
return y === 0 ? (q ? "-" : "") + ee : le.length <= y ? u : (q ? "-" : "") + ee + "." + le.slice(0, y);
|
|
186
|
+
}, h = (u) => {
|
|
187
|
+
let y = u;
|
|
188
|
+
return o.value && (y = b(y)), r.nonNegative && (y = i(y)), s.value !== null && (y = $(y)), y;
|
|
189
|
+
}, x = F(
|
|
190
|
+
r.type === "number" ? h(r.modelValue) : r.modelValue
|
|
191
191
|
);
|
|
192
192
|
J(
|
|
193
193
|
() => r.modelValue,
|
|
194
194
|
(u) => {
|
|
195
|
-
|
|
195
|
+
x.value = r.type === "number" ? h(u) : u;
|
|
196
196
|
}
|
|
197
197
|
);
|
|
198
|
-
const
|
|
199
|
-
let
|
|
200
|
-
const
|
|
201
|
-
await
|
|
202
|
-
},
|
|
198
|
+
const C = F(), V = F(0), k = F(!1);
|
|
199
|
+
let S = null;
|
|
200
|
+
const A = async () => {
|
|
201
|
+
await Ce(), C.value?.focus();
|
|
202
|
+
}, T = async () => {
|
|
203
203
|
if (r.type === "number") {
|
|
204
|
-
const u =
|
|
205
|
-
u !==
|
|
204
|
+
const u = h(x.value);
|
|
205
|
+
u !== x.value && (x.value = u);
|
|
206
206
|
}
|
|
207
|
-
n("update:modelValue",
|
|
207
|
+
n("update:modelValue", x.value), n("input", x.value), await Ce(), N();
|
|
208
208
|
}, E = () => {
|
|
209
|
-
n("change",
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
if (!
|
|
219
|
-
const u =
|
|
220
|
-
z.style.position = "absolute", z.style.visibility = "hidden", z.style.whiteSpace = "pre", z.style.font = window.getComputedStyle(u).font, z.style.letterSpacing = window.getComputedStyle(u).letterSpacing, z.textContent =
|
|
209
|
+
n("change", x.value);
|
|
210
|
+
}, v = (u) => {
|
|
211
|
+
k.value = !0, n("focus", u);
|
|
212
|
+
}, B = (u) => {
|
|
213
|
+
k.value = !1, n("blur", u);
|
|
214
|
+
}, R = p(() => r.clearable && !r.disabled && !!x.value && k.value), W = () => {
|
|
215
|
+
x.value = "", n("update:modelValue", ""), n("clear"), n("input", ""), n("change", "");
|
|
216
|
+
}, N = () => {
|
|
217
|
+
S && cancelAnimationFrame(S), S = requestAnimationFrame(() => {
|
|
218
|
+
if (!C.value || C.value.tagName !== "INPUT") return;
|
|
219
|
+
const u = C.value, y = u.value, z = document.createElement("span");
|
|
220
|
+
z.style.position = "absolute", z.style.visibility = "hidden", z.style.whiteSpace = "pre", z.style.font = window.getComputedStyle(u).font, z.style.letterSpacing = window.getComputedStyle(u).letterSpacing, z.textContent = y || " ", document.body.appendChild(z), V.value = z.getBoundingClientRect().width, document.body.removeChild(z);
|
|
221
221
|
});
|
|
222
|
-
},
|
|
222
|
+
}, M = p(() => {
|
|
223
223
|
const u = {};
|
|
224
224
|
return V.value > 0 && (u.position = "absolute", u.left = `${V.value + 16}px`), u;
|
|
225
|
-
}),
|
|
225
|
+
}), U = async () => {
|
|
226
226
|
try {
|
|
227
|
-
|
|
227
|
+
x.value = await navigator.clipboard.readText(), n("update:modelValue", x.value);
|
|
228
228
|
} catch (u) {
|
|
229
229
|
console.error("paste error:", u);
|
|
230
230
|
}
|
|
231
|
-
},
|
|
231
|
+
}, O = p(
|
|
232
232
|
() => r.type === "number" && r.nonNegative ? 0 : void 0
|
|
233
|
-
),
|
|
233
|
+
), D = (u) => u === "." || u === "," || u === "," || u === "。" || u === "." || u === "Decimal", X = (u) => {
|
|
234
234
|
if (r.type !== "number" || u.isComposing) return;
|
|
235
|
-
const
|
|
236
|
-
if ((r.nonNegative ||
|
|
235
|
+
const y = s.value;
|
|
236
|
+
if ((r.nonNegative || y !== null) && (u.key === "e" || u.key === "E")) {
|
|
237
237
|
u.preventDefault();
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
@@ -241,119 +241,119 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
241
241
|
u.preventDefault();
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
if (
|
|
244
|
+
if (y === 0 && D(u.key)) {
|
|
245
245
|
u.preventDefault();
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
if (
|
|
248
|
+
if (y !== null && y > 0 && D(u.key)) {
|
|
249
249
|
const z = u.target;
|
|
250
250
|
c(z.value).includes(".") && u.preventDefault();
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
|
-
if (
|
|
254
|
-
const z = u.target, q = c(z.value), re = z.selectionStart,
|
|
255
|
-
if (re === null ||
|
|
256
|
-
const
|
|
257
|
-
|
|
253
|
+
if (y !== null && y > 0 && u.key !== "." && /^\d$/.test(u.key)) {
|
|
254
|
+
const z = u.target, q = c(z.value), re = z.selectionStart, ne = z.selectionEnd;
|
|
255
|
+
if (re === null || ne === null) return;
|
|
256
|
+
const ee = q.slice(0, re) + u.key + q.slice(ne), le = ee.indexOf(".");
|
|
257
|
+
le !== -1 && ee.slice(le + 1).replace(/\D/g, "").length > y && u.preventDefault();
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
return a({
|
|
261
|
-
focus:
|
|
262
|
-
updateTextWidth:
|
|
263
|
-
}), (u,
|
|
261
|
+
focus: A,
|
|
262
|
+
updateTextWidth: N
|
|
263
|
+
}), (u, y) => e.type !== "textarea" ? (f(), w("div", {
|
|
264
264
|
key: 0,
|
|
265
|
-
class:
|
|
265
|
+
class: j(["cregis-input", {
|
|
266
266
|
[`cregis-input--${e.size}`]: e.size,
|
|
267
267
|
"is-disabled": e.disabled,
|
|
268
268
|
"is-prefix": u.$slots.prefix,
|
|
269
269
|
"is-suffix": u.$slots.suffix
|
|
270
270
|
}]),
|
|
271
|
-
style:
|
|
271
|
+
style: ie([{ width: e.width }, e.inputStyle])
|
|
272
272
|
}, [
|
|
273
|
-
|
|
274
|
-
class:
|
|
273
|
+
P("div", {
|
|
274
|
+
class: j(["cregis-input__wrapper", { "is-focus": k.value }])
|
|
275
275
|
}, [
|
|
276
|
-
u.$slots.prefix ? (
|
|
277
|
-
|
|
278
|
-
])) :
|
|
279
|
-
|
|
276
|
+
u.$slots.prefix ? (f(), w("span", Aa, [
|
|
277
|
+
Y(u.$slots, "prefix")
|
|
278
|
+
])) : _("", !0),
|
|
279
|
+
He(P("input", Oe({
|
|
280
280
|
class: "cregis-input__inner",
|
|
281
|
-
"onUpdate:modelValue":
|
|
281
|
+
"onUpdate:modelValue": y[0] || (y[0] = (z) => x.value = z),
|
|
282
282
|
ref_key: "inputRef",
|
|
283
|
-
ref:
|
|
284
|
-
type:
|
|
283
|
+
ref: C,
|
|
284
|
+
type: l.value,
|
|
285
285
|
inputmode: d.value,
|
|
286
286
|
placeholder: e.placeholder
|
|
287
287
|
}, u.$attrs, {
|
|
288
|
-
min:
|
|
288
|
+
min: O.value,
|
|
289
289
|
spellcheck: "false",
|
|
290
290
|
disabled: e.disabled,
|
|
291
|
-
onInput:
|
|
291
|
+
onInput: T,
|
|
292
292
|
onChange: E,
|
|
293
|
-
onFocus:
|
|
294
|
-
onBlur:
|
|
295
|
-
onKeydown:
|
|
296
|
-
}), null, 16,
|
|
297
|
-
[
|
|
293
|
+
onFocus: v,
|
|
294
|
+
onBlur: B,
|
|
295
|
+
onKeydown: X
|
|
296
|
+
}), null, 16, Da), [
|
|
297
|
+
[xa, x.value]
|
|
298
298
|
]),
|
|
299
|
-
e.unit &&
|
|
299
|
+
e.unit && x.value ? (f(), w("span", {
|
|
300
300
|
key: 1,
|
|
301
|
-
style:
|
|
301
|
+
style: ie(M.value),
|
|
302
302
|
class: "cregis-input__unit"
|
|
303
|
-
},
|
|
304
|
-
u.$slots.suffix ||
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
}, I(e.unit), 5)) : _("", !0),
|
|
304
|
+
u.$slots.suffix || R.value ? (f(), w("span", Ra, [
|
|
305
|
+
Y(u.$slots, "suffix"),
|
|
306
|
+
R.value ? (f(), ve(ze, {
|
|
307
307
|
key: 0,
|
|
308
|
-
icon:
|
|
308
|
+
icon: te(Ca),
|
|
309
309
|
"icon-type": "square",
|
|
310
|
-
onClick:
|
|
311
|
-
onMousedown:
|
|
310
|
+
onClick: W,
|
|
311
|
+
onMousedown: y[1] || (y[1] = yt(() => {
|
|
312
312
|
}, ["prevent"]))
|
|
313
|
-
}, null, 8, ["icon"])) :
|
|
314
|
-
])) :
|
|
313
|
+
}, null, 8, ["icon"])) : _("", !0)
|
|
314
|
+
])) : _("", !0)
|
|
315
315
|
], 2)
|
|
316
|
-
], 6)) : (
|
|
316
|
+
], 6)) : (f(), w("div", {
|
|
317
317
|
key: 1,
|
|
318
|
-
class:
|
|
319
|
-
style:
|
|
318
|
+
class: j(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
319
|
+
style: ie([{ width: e.width }, e.inputStyle])
|
|
320
320
|
}, [
|
|
321
|
-
|
|
321
|
+
He(P("textarea", Oe({ class: "cregis-textarea__wrapper" }, u.$attrs, {
|
|
322
322
|
spellcheck: "false",
|
|
323
323
|
ref_key: "inputRef",
|
|
324
|
-
ref:
|
|
324
|
+
ref: C,
|
|
325
325
|
disabled: e.disabled,
|
|
326
326
|
placeholder: e.placeholder,
|
|
327
327
|
rows: e.rows,
|
|
328
|
-
"onUpdate:modelValue":
|
|
329
|
-
onInput:
|
|
328
|
+
"onUpdate:modelValue": y[2] || (y[2] = (z) => x.value = z),
|
|
329
|
+
onInput: T,
|
|
330
330
|
onChange: E,
|
|
331
|
-
onFocus:
|
|
332
|
-
onBlur:
|
|
333
|
-
}), null, 16,
|
|
334
|
-
[
|
|
331
|
+
onFocus: v,
|
|
332
|
+
onBlur: B
|
|
333
|
+
}), null, 16, Wa), [
|
|
334
|
+
[ka, x.value]
|
|
335
335
|
]),
|
|
336
|
-
e.disabled ?
|
|
337
|
-
|
|
336
|
+
e.disabled ? _("", !0) : (f(), w("div", La, [
|
|
337
|
+
G(ze, {
|
|
338
338
|
class: "cregis-textarea__button",
|
|
339
339
|
link: "",
|
|
340
340
|
size: "small",
|
|
341
|
-
onClick:
|
|
341
|
+
onClick: U
|
|
342
342
|
}, {
|
|
343
|
-
default:
|
|
344
|
-
|
|
343
|
+
default: ae(() => [
|
|
344
|
+
be(I(e.pasteText), 1)
|
|
345
345
|
]),
|
|
346
346
|
_: 1
|
|
347
347
|
}),
|
|
348
|
-
|
|
348
|
+
G(ze, {
|
|
349
349
|
class: "cregis-textarea__button",
|
|
350
350
|
link: "",
|
|
351
351
|
size: "small",
|
|
352
|
-
disabled: !
|
|
353
|
-
onClick:
|
|
352
|
+
disabled: !x.value,
|
|
353
|
+
onClick: W
|
|
354
354
|
}, {
|
|
355
|
-
default:
|
|
356
|
-
|
|
355
|
+
default: ae(() => [
|
|
356
|
+
be(I(e.clearText), 1)
|
|
357
357
|
]),
|
|
358
358
|
_: 1
|
|
359
359
|
}, 8, ["disabled"])
|
|
@@ -371,7 +371,7 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
371
371
|
size: { default: "16px" }
|
|
372
372
|
},
|
|
373
373
|
setup(e) {
|
|
374
|
-
return (a, t) => (
|
|
374
|
+
return (a, t) => (f(), w("svg", {
|
|
375
375
|
width: e.size,
|
|
376
376
|
height: e.size,
|
|
377
377
|
viewBox: "0 0 16 16",
|
|
@@ -379,16 +379,16 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
379
379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
380
380
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
381
381
|
}, [
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
382
|
+
P("g", ja, [
|
|
383
|
+
P("g", Na, [
|
|
384
|
+
P("g", Ia, [
|
|
385
|
+
P("rect", {
|
|
386
386
|
x: "0",
|
|
387
387
|
y: "0",
|
|
388
388
|
width: e.size,
|
|
389
389
|
height: e.size
|
|
390
390
|
}, null, 8, _a),
|
|
391
|
-
t[0] || (t[0] =
|
|
391
|
+
t[0] || (t[0] = P("path", {
|
|
392
392
|
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",
|
|
393
393
|
fill: "currentColor",
|
|
394
394
|
"fill-rule": "nonzero"
|
|
@@ -413,7 +413,7 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
413
413
|
},
|
|
414
414
|
emits: ["update:modelValue", "change"],
|
|
415
415
|
setup(e, { emit: a }) {
|
|
416
|
-
const t = e, r = a, n =
|
|
416
|
+
const t = e, r = a, n = p(() => t.modelValue), i = () => {
|
|
417
417
|
t.disabled || r("update:modelValue", !n.value);
|
|
418
418
|
};
|
|
419
419
|
return J(
|
|
@@ -421,34 +421,34 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
421
421
|
() => {
|
|
422
422
|
r("change", n.value);
|
|
423
423
|
}
|
|
424
|
-
), (
|
|
424
|
+
), (s, o) => (f(), w("div", {
|
|
425
425
|
class: "cregis-checkbox__wrapper",
|
|
426
426
|
onClick: i
|
|
427
427
|
}, [
|
|
428
|
-
|
|
429
|
-
class:
|
|
428
|
+
P("div", {
|
|
429
|
+
class: j(["cregis-checkbox", {
|
|
430
430
|
"is-disabled": e.disabled,
|
|
431
431
|
"is-checked": n.value,
|
|
432
432
|
"is-circle": e.circle,
|
|
433
433
|
"is-indeterminate": e.indeterminate
|
|
434
434
|
}])
|
|
435
435
|
}, [
|
|
436
|
-
e.indeterminate ? (
|
|
436
|
+
e.indeterminate ? (f(), w("div", Ha)) : (f(), ve(Fa, {
|
|
437
437
|
key: 1,
|
|
438
438
|
size: "10px"
|
|
439
439
|
}))
|
|
440
440
|
], 2),
|
|
441
|
-
|
|
441
|
+
s.$slots.default || e.label ? (f(), w("span", {
|
|
442
442
|
key: 0,
|
|
443
|
-
class:
|
|
443
|
+
class: j(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
444
444
|
}, [
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
Y(s.$slots, "default", {}, () => [
|
|
446
|
+
be(I(e.label), 1)
|
|
447
447
|
])
|
|
448
|
-
], 2)) :
|
|
448
|
+
], 2)) : _("", !0)
|
|
449
449
|
]));
|
|
450
450
|
}
|
|
451
|
-
}),
|
|
451
|
+
}), Ci = /* @__PURE__ */ Q({
|
|
452
452
|
name: "Radio",
|
|
453
453
|
__name: "Radio",
|
|
454
454
|
props: {
|
|
@@ -459,29 +459,29 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
459
459
|
},
|
|
460
460
|
emits: ["update:modelValue", "change"],
|
|
461
461
|
setup(e, { emit: a }) {
|
|
462
|
-
const t = e, r = a, n =
|
|
462
|
+
const t = e, r = a, n = p(() => t.modelValue === t.value), i = () => {
|
|
463
463
|
t.disabled || (r("update:modelValue", t.value), r("change", t.value));
|
|
464
464
|
};
|
|
465
|
-
return (
|
|
465
|
+
return (s, o) => (f(), w("div", {
|
|
466
466
|
class: "cregis-radio__wrapper",
|
|
467
467
|
onClick: i
|
|
468
468
|
}, [
|
|
469
|
-
|
|
470
|
-
class:
|
|
469
|
+
P("div", {
|
|
470
|
+
class: j(["cregis-radio", {
|
|
471
471
|
"is-disabled": e.disabled,
|
|
472
472
|
"is-checked": n.value
|
|
473
473
|
}])
|
|
474
474
|
}, [...o[0] || (o[0] = [
|
|
475
|
-
|
|
475
|
+
P("div", { class: "cregis-radio__inner" }, null, -1)
|
|
476
476
|
])], 2),
|
|
477
|
-
|
|
477
|
+
s.$slots.default || e.label ? (f(), w("span", {
|
|
478
478
|
key: 0,
|
|
479
|
-
class:
|
|
479
|
+
class: j(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
480
480
|
}, [
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
Y(s.$slots, "default", {}, () => [
|
|
482
|
+
be(I(e.label), 1)
|
|
483
483
|
])
|
|
484
|
-
], 2)) :
|
|
484
|
+
], 2)) : _("", !0)
|
|
485
485
|
]));
|
|
486
486
|
}
|
|
487
487
|
}), Ti = /* @__PURE__ */ Q({
|
|
@@ -496,13 +496,13 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
496
496
|
length: {}
|
|
497
497
|
},
|
|
498
498
|
setup(e) {
|
|
499
|
-
const a = e, t =
|
|
499
|
+
const a = e, t = p(() => {
|
|
500
500
|
if (Array.isArray(a.margin)) {
|
|
501
501
|
const [n, i] = a.margin;
|
|
502
502
|
return a.direction === "horizontal" ? `${n} 0 ${i} 0` : `0 ${i} 0 ${n}`;
|
|
503
503
|
} else
|
|
504
504
|
return a.direction === "horizontal" ? `${a.margin} 0` : `0 ${a.margin}`;
|
|
505
|
-
}), r =
|
|
505
|
+
}), r = p(() => a.direction === "horizontal" ? {
|
|
506
506
|
width: a.length || "100%",
|
|
507
507
|
borderTopWidth: a.lineThickness,
|
|
508
508
|
borderTopStyle: a.borderStyle,
|
|
@@ -515,14 +515,14 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
515
515
|
borderLeftColor: a.color,
|
|
516
516
|
margin: t.value
|
|
517
517
|
});
|
|
518
|
-
return (n, i) => (
|
|
519
|
-
class:
|
|
518
|
+
return (n, i) => (f(), w("div", {
|
|
519
|
+
class: j(["cregis-divider", {
|
|
520
520
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
521
521
|
}]),
|
|
522
|
-
style:
|
|
522
|
+
style: ie(r.value)
|
|
523
523
|
}, null, 6));
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
525
|
+
}), ia = Symbol("TABS_KEY"), qa = ["onClick"], Ya = { style: { display: "none" } }, Si = /* @__PURE__ */ Q({
|
|
526
526
|
name: "Tabs",
|
|
527
527
|
__name: "Tabs",
|
|
528
528
|
props: {
|
|
@@ -532,12 +532,12 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
532
532
|
},
|
|
533
533
|
emits: ["update:modelValue"],
|
|
534
534
|
setup(e) {
|
|
535
|
-
const a = e, t =
|
|
536
|
-
t.some((o) => o.name ===
|
|
537
|
-
}, n = (
|
|
538
|
-
const o = t.findIndex((
|
|
535
|
+
const a = e, t = Pe([]), r = (s) => {
|
|
536
|
+
t.some((o) => o.name === s.name) || t.push(s);
|
|
537
|
+
}, n = (s) => {
|
|
538
|
+
const o = t.findIndex((l) => l.name === s);
|
|
539
539
|
o !== -1 && t.splice(o, 1);
|
|
540
|
-
}, i =
|
|
540
|
+
}, i = p(() => a.type === "card" ? a.size === "large" ? {
|
|
541
541
|
borderRadius: "13px"
|
|
542
542
|
} : a.size === "medium" ? {
|
|
543
543
|
borderRadius: "11px"
|
|
@@ -546,30 +546,30 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
546
546
|
} : {
|
|
547
547
|
borderRadius: 0
|
|
548
548
|
});
|
|
549
|
-
return Qt(
|
|
550
|
-
activeName:
|
|
549
|
+
return Qt(ia, {
|
|
550
|
+
activeName: $a(a, "modelValue"),
|
|
551
551
|
registerTab: r,
|
|
552
552
|
unregisterTab: n
|
|
553
|
-
}), (
|
|
554
|
-
class:
|
|
553
|
+
}), (s, o) => (f(), w("div", {
|
|
554
|
+
class: j(["cregis-tabs", {
|
|
555
555
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
556
556
|
[`cregis-tabs--${e.size}`]: e.size
|
|
557
557
|
}])
|
|
558
558
|
}, [
|
|
559
|
-
(
|
|
560
|
-
key:
|
|
561
|
-
class:
|
|
562
|
-
style:
|
|
563
|
-
onClick: (d) =>
|
|
559
|
+
(f(!0), w(ft, null, pt(t, (l) => (f(), w("div", {
|
|
560
|
+
key: l.name,
|
|
561
|
+
class: j(["cregis-tabs__item", { "is-active": e.modelValue === l.name }]),
|
|
562
|
+
style: ie(i.value),
|
|
563
|
+
onClick: (d) => s.$emit("update:modelValue", l.name)
|
|
564
564
|
}, [
|
|
565
|
-
|
|
565
|
+
P("span", null, I(l.label), 1)
|
|
566
566
|
], 14, qa))), 128)),
|
|
567
|
-
|
|
568
|
-
|
|
567
|
+
P("div", Ya, [
|
|
568
|
+
Y(s.$slots, "default")
|
|
569
569
|
])
|
|
570
570
|
], 2));
|
|
571
571
|
}
|
|
572
|
-
}),
|
|
572
|
+
}), Vi = /* @__PURE__ */ Q({
|
|
573
573
|
name: "TabPane",
|
|
574
574
|
__name: "TabPane",
|
|
575
575
|
props: {
|
|
@@ -577,16 +577,16 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
577
577
|
name: {}
|
|
578
578
|
},
|
|
579
579
|
setup(e) {
|
|
580
|
-
const a = e, t = Zt(
|
|
580
|
+
const a = e, t = Zt(ia);
|
|
581
581
|
if (!t) throw new Error("TabPane must be used within Tabs");
|
|
582
|
-
return
|
|
582
|
+
return Ye(() => {
|
|
583
583
|
t.registerTab({ label: a.label, name: a.name });
|
|
584
584
|
}), J(
|
|
585
585
|
() => a.label,
|
|
586
586
|
(r) => {
|
|
587
587
|
t.unregisterTab(a.name), t.registerTab({ label: r, name: a.name });
|
|
588
588
|
}
|
|
589
|
-
),
|
|
589
|
+
), Te(() => {
|
|
590
590
|
t.unregisterTab(a.name);
|
|
591
591
|
}), (r, n) => null;
|
|
592
592
|
}
|
|
@@ -616,31 +616,31 @@ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__
|
|
|
616
616
|
};
|
|
617
617
|
return Jt(() => {
|
|
618
618
|
r !== void 0 && clearTimeout(r);
|
|
619
|
-
}),
|
|
619
|
+
}), Ce(() => {
|
|
620
620
|
t.value = !0;
|
|
621
|
-
}), (
|
|
622
|
-
class:
|
|
621
|
+
}), (s, o) => (f(), w("div", {
|
|
622
|
+
class: j(["cregis-message__wrapper", { "cregis-message__wrapper--success": e.type === "success" }])
|
|
623
623
|
}, [
|
|
624
|
-
|
|
624
|
+
G(nt, {
|
|
625
625
|
name: "cregis-message",
|
|
626
626
|
onAfterEnter: n,
|
|
627
627
|
onAfterLeave: i
|
|
628
628
|
}, {
|
|
629
|
-
default:
|
|
630
|
-
t.value && e.type !== "success" ? (
|
|
629
|
+
default: ae(() => [
|
|
630
|
+
t.value && e.type !== "success" ? (f(), w("div", {
|
|
631
631
|
key: 0,
|
|
632
|
-
class:
|
|
632
|
+
class: j(["cregis-message", { "cregis-message--danger": e.type === "danger" }]),
|
|
633
633
|
role: "status",
|
|
634
634
|
"aria-live": "polite"
|
|
635
|
-
},
|
|
636
|
-
|
|
637
|
-
|
|
635
|
+
}, I(e.message), 3)) : t.value && e.type === "success" ? (f(), w("div", Xa, [
|
|
636
|
+
P("div", Ka, [
|
|
637
|
+
G(te(ta), {
|
|
638
638
|
size: "16px",
|
|
639
639
|
color: "var(--material-same-white-primary)"
|
|
640
640
|
})
|
|
641
641
|
]),
|
|
642
|
-
|
|
643
|
-
])) :
|
|
642
|
+
P("p", null, I(e.message), 1)
|
|
643
|
+
])) : _("", !0)
|
|
644
644
|
]),
|
|
645
645
|
_: 1
|
|
646
646
|
})
|
|
@@ -660,13 +660,13 @@ function Lt(e) {
|
|
|
660
660
|
const { message: a, duration: t, type: r } = Qa(e);
|
|
661
661
|
ct = !0;
|
|
662
662
|
const n = document.createElement("div");
|
|
663
|
-
document.body.appendChild(n),
|
|
664
|
-
|
|
663
|
+
document.body.appendChild(n), Ae(
|
|
664
|
+
wt(Ga, {
|
|
665
665
|
message: a,
|
|
666
666
|
duration: t,
|
|
667
667
|
type: r,
|
|
668
668
|
onVanish: () => {
|
|
669
|
-
ct = !1,
|
|
669
|
+
ct = !1, Ae(null, n), n.remove();
|
|
670
670
|
}
|
|
671
671
|
}),
|
|
672
672
|
n
|
|
@@ -694,33 +694,33 @@ const Za = { class: "cregis-notification__wrapper" }, Ja = {
|
|
|
694
694
|
a.onVanish?.();
|
|
695
695
|
};
|
|
696
696
|
return Jt(() => {
|
|
697
|
-
}),
|
|
697
|
+
}), Ce(() => {
|
|
698
698
|
t.value = !0;
|
|
699
|
-
}), (i,
|
|
700
|
-
|
|
699
|
+
}), (i, s) => (f(), w("div", Za, [
|
|
700
|
+
G(nt, {
|
|
701
701
|
name: "cregis-notification",
|
|
702
702
|
onAfterLeave: n
|
|
703
703
|
}, {
|
|
704
|
-
default:
|
|
705
|
-
t.value ? (
|
|
706
|
-
(
|
|
704
|
+
default: ae(() => [
|
|
705
|
+
t.value ? (f(), w("div", Ja, [
|
|
706
|
+
(f(), ve(bt(te(Ta)), {
|
|
707
707
|
size: "18px",
|
|
708
708
|
color: "var(--material-danger-primary)"
|
|
709
709
|
})),
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
P("div", en, [
|
|
711
|
+
P("div", tn, I(e.title), 1),
|
|
712
|
+
P("div", an, I(e.message), 1)
|
|
713
713
|
]),
|
|
714
|
-
|
|
714
|
+
G(ze, {
|
|
715
715
|
type: "sameWhite",
|
|
716
716
|
onClick: r
|
|
717
717
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
|
|
718
|
+
default: ae(() => [
|
|
719
|
+
be(I(e.btnText), 1)
|
|
720
720
|
]),
|
|
721
721
|
_: 1
|
|
722
722
|
})
|
|
723
|
-
])) :
|
|
723
|
+
])) : _("", !0)
|
|
724
724
|
]),
|
|
725
725
|
_: 1
|
|
726
726
|
})
|
|
@@ -728,19 +728,19 @@ const Za = { class: "cregis-notification__wrapper" }, Ja = {
|
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
730
|
let ut = !1;
|
|
731
|
-
function
|
|
731
|
+
function Bi(e) {
|
|
732
732
|
if (ut) return;
|
|
733
733
|
const { title: a, message: t, type: r, btnText: n } = e;
|
|
734
734
|
ut = !0;
|
|
735
735
|
const i = document.createElement("div");
|
|
736
|
-
document.body.appendChild(i),
|
|
737
|
-
|
|
736
|
+
document.body.appendChild(i), Ae(
|
|
737
|
+
wt(nn, {
|
|
738
738
|
title: a,
|
|
739
739
|
message: t,
|
|
740
740
|
type: r,
|
|
741
741
|
btnText: n,
|
|
742
742
|
onVanish: () => {
|
|
743
|
-
ut = !1,
|
|
743
|
+
ut = !1, Ae(null, i), i.remove();
|
|
744
744
|
}
|
|
745
745
|
}),
|
|
746
746
|
i
|
|
@@ -749,7 +749,7 @@ function Ei(e) {
|
|
|
749
749
|
const rn = { class: "cregis-progress__wrapper" }, on = { class: "cregis-progress__track-wrap" }, ln = { class: "cregis-progress cregis-progress--striped active" }, sn = {
|
|
750
750
|
key: 0,
|
|
751
751
|
class: "cregis-progress__sliding-block"
|
|
752
|
-
},
|
|
752
|
+
}, Ei = /* @__PURE__ */ Q({
|
|
753
753
|
name: "Progress",
|
|
754
754
|
__name: "Progress",
|
|
755
755
|
props: {
|
|
@@ -759,40 +759,40 @@ const rn = { class: "cregis-progress__wrapper" }, on = { class: "cregis-progress
|
|
|
759
759
|
loading: { type: Boolean, default: !1 }
|
|
760
760
|
},
|
|
761
761
|
setup(e) {
|
|
762
|
-
const a = e, t =
|
|
762
|
+
const a = e, t = p(() => Math.min(100, Math.max(0, a.percentage - 1))), r = p(() => ({
|
|
763
763
|
width: `${a.percentage}%`,
|
|
764
764
|
height: `${a.strokeWidth}px`
|
|
765
|
-
})), n =
|
|
765
|
+
})), n = p(() => ({
|
|
766
766
|
"--cregis-progress-tip-left": `${t.value}%`
|
|
767
|
-
})), i =
|
|
768
|
-
return (
|
|
769
|
-
|
|
770
|
-
e.showPercentage && !a.loading ? (
|
|
767
|
+
})), i = p(() => `${Math.round(a.percentage)}%`);
|
|
768
|
+
return (s, o) => (f(), w("div", rn, [
|
|
769
|
+
P("div", on, [
|
|
770
|
+
e.showPercentage && !a.loading ? (f(), w("div", {
|
|
771
771
|
key: 0,
|
|
772
772
|
class: "cregis-progress__tip",
|
|
773
|
-
style:
|
|
773
|
+
style: ie(n.value),
|
|
774
774
|
"aria-live": "polite"
|
|
775
|
-
},
|
|
776
|
-
|
|
777
|
-
|
|
775
|
+
}, I(i.value), 5)) : _("", !0),
|
|
776
|
+
P("div", ln, [
|
|
777
|
+
P("div", {
|
|
778
778
|
class: "cregis-progress__bar",
|
|
779
|
-
style:
|
|
779
|
+
style: ie(r.value)
|
|
780
780
|
}, null, 4),
|
|
781
|
-
a.loading ? (
|
|
781
|
+
a.loading ? (f(), w("div", sn)) : _("", !0)
|
|
782
782
|
])
|
|
783
783
|
])
|
|
784
784
|
]));
|
|
785
785
|
}
|
|
786
786
|
});
|
|
787
|
-
var
|
|
788
|
-
return e.concat([a + "-" +
|
|
789
|
-
}, []),
|
|
790
|
-
return e.concat([a, a + "-" +
|
|
787
|
+
var se = "top", ge = "bottom", he = "right", ce = "left", kt = "auto", Xe = [se, ge, he, ce], De = "start", Ue = "end", cn = "clippingParents", oa = "viewport", je = "popper", un = "reference", Mt = /* @__PURE__ */ Xe.reduce(function(e, a) {
|
|
788
|
+
return e.concat([a + "-" + De, a + "-" + Ue]);
|
|
789
|
+
}, []), la = /* @__PURE__ */ [].concat(Xe, [kt]).reduce(function(e, a) {
|
|
790
|
+
return e.concat([a, a + "-" + De, a + "-" + Ue]);
|
|
791
791
|
}, []), dn = "beforeRead", fn = "read", pn = "afterRead", vn = "beforeMain", mn = "main", gn = "afterMain", hn = "beforeWrite", bn = "write", yn = "afterWrite", wn = [dn, fn, pn, vn, mn, gn, hn, bn, yn];
|
|
792
|
-
function
|
|
792
|
+
function xe(e) {
|
|
793
793
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function de(e) {
|
|
796
796
|
if (e == null)
|
|
797
797
|
return window;
|
|
798
798
|
if (e.toString() !== "[object Window]") {
|
|
@@ -801,27 +801,27 @@ function se(e) {
|
|
|
801
801
|
}
|
|
802
802
|
return e;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
var a =
|
|
804
|
+
function Ee(e) {
|
|
805
|
+
var a = de(e).Element;
|
|
806
806
|
return e instanceof a || e instanceof Element;
|
|
807
807
|
}
|
|
808
|
-
function
|
|
809
|
-
var a =
|
|
808
|
+
function me(e) {
|
|
809
|
+
var a = de(e).HTMLElement;
|
|
810
810
|
return e instanceof a || e instanceof HTMLElement;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function $t(e) {
|
|
813
813
|
if (typeof ShadowRoot > "u")
|
|
814
814
|
return !1;
|
|
815
|
-
var a =
|
|
815
|
+
var a = de(e).ShadowRoot;
|
|
816
816
|
return e instanceof a || e instanceof ShadowRoot;
|
|
817
817
|
}
|
|
818
818
|
function xn(e) {
|
|
819
819
|
var a = e.state;
|
|
820
820
|
Object.keys(a.elements).forEach(function(t) {
|
|
821
821
|
var r = a.styles[t] || {}, n = a.attributes[t] || {}, i = a.elements[t];
|
|
822
|
-
!
|
|
823
|
-
var o = n[
|
|
824
|
-
o === !1 ? i.removeAttribute(
|
|
822
|
+
!me(i) || !xe(i) || (Object.assign(i.style, r), Object.keys(n).forEach(function(s) {
|
|
823
|
+
var o = n[s];
|
|
824
|
+
o === !1 ? i.removeAttribute(s) : i.setAttribute(s, o === !0 ? "" : o);
|
|
825
825
|
}));
|
|
826
826
|
});
|
|
827
827
|
}
|
|
@@ -840,11 +840,11 @@ function kn(e) {
|
|
|
840
840
|
};
|
|
841
841
|
return Object.assign(a.elements.popper.style, t.popper), a.styles = t, a.elements.arrow && Object.assign(a.elements.arrow.style, t.arrow), function() {
|
|
842
842
|
Object.keys(a.elements).forEach(function(r) {
|
|
843
|
-
var n = a.elements[r], i = a.attributes[r] || {},
|
|
844
|
-
return
|
|
843
|
+
var n = a.elements[r], i = a.attributes[r] || {}, s = Object.keys(a.styles.hasOwnProperty(r) ? a.styles[r] : t[r]), o = s.reduce(function(l, d) {
|
|
844
|
+
return l[d] = "", l;
|
|
845
845
|
}, {});
|
|
846
|
-
!
|
|
847
|
-
n.removeAttribute(
|
|
846
|
+
!me(n) || !xe(n) || (Object.assign(n.style, o), Object.keys(i).forEach(function(l) {
|
|
847
|
+
n.removeAttribute(l);
|
|
848
848
|
}));
|
|
849
849
|
});
|
|
850
850
|
};
|
|
@@ -857,37 +857,37 @@ const $n = {
|
|
|
857
857
|
effect: kn,
|
|
858
858
|
requires: ["computeStyles"]
|
|
859
859
|
};
|
|
860
|
-
function
|
|
860
|
+
function we(e) {
|
|
861
861
|
return e.split("-")[0];
|
|
862
862
|
}
|
|
863
|
-
var
|
|
863
|
+
var Be = Math.max, Je = Math.min, Re = Math.round;
|
|
864
864
|
function vt() {
|
|
865
865
|
var e = navigator.userAgentData;
|
|
866
866
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(a) {
|
|
867
867
|
return a.brand + "/" + a.version;
|
|
868
868
|
}).join(" ") : navigator.userAgent;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function sa() {
|
|
871
871
|
return !/^((?!chrome|android).)*safari/i.test(vt());
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function We(e, a, t) {
|
|
874
874
|
a === void 0 && (a = !1), t === void 0 && (t = !1);
|
|
875
875
|
var r = e.getBoundingClientRect(), n = 1, i = 1;
|
|
876
|
-
a &&
|
|
877
|
-
var
|
|
876
|
+
a && me(e) && (n = e.offsetWidth > 0 && Re(r.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && Re(r.height) / e.offsetHeight || 1);
|
|
877
|
+
var s = Ee(e) ? de(e) : window, o = s.visualViewport, l = !sa() && t, d = (r.left + (l && o ? o.offsetLeft : 0)) / n, c = (r.top + (l && o ? o.offsetTop : 0)) / i, b = r.width / n, $ = r.height / i;
|
|
878
878
|
return {
|
|
879
|
-
width:
|
|
879
|
+
width: b,
|
|
880
880
|
height: $,
|
|
881
881
|
top: c,
|
|
882
|
-
right: d +
|
|
882
|
+
right: d + b,
|
|
883
883
|
bottom: c + $,
|
|
884
884
|
left: d,
|
|
885
885
|
x: d,
|
|
886
886
|
y: c
|
|
887
887
|
};
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
var a =
|
|
889
|
+
function Ot(e) {
|
|
890
|
+
var a = We(e), t = e.offsetWidth, r = e.offsetHeight;
|
|
891
891
|
return Math.abs(a.width - t) <= 1 && (t = a.width), Math.abs(a.height - r) <= 1 && (r = a.height), {
|
|
892
892
|
x: e.offsetLeft,
|
|
893
893
|
y: e.offsetTop,
|
|
@@ -895,11 +895,11 @@ function $t(e) {
|
|
|
895
895
|
height: r
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function ca(e, a) {
|
|
899
899
|
var t = a.getRootNode && a.getRootNode();
|
|
900
900
|
if (e.contains(a))
|
|
901
901
|
return !0;
|
|
902
|
-
if (t &&
|
|
902
|
+
if (t && $t(t)) {
|
|
903
903
|
var r = a;
|
|
904
904
|
do {
|
|
905
905
|
if (r && e.isSameNode(r))
|
|
@@ -909,66 +909,66 @@ function sa(e, a) {
|
|
|
909
909
|
}
|
|
910
910
|
return !1;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return
|
|
912
|
+
function $e(e) {
|
|
913
|
+
return de(e).getComputedStyle(e);
|
|
914
914
|
}
|
|
915
915
|
function On(e) {
|
|
916
|
-
return ["table", "td", "th"].indexOf(
|
|
916
|
+
return ["table", "td", "th"].indexOf(xe(e)) >= 0;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return ((
|
|
918
|
+
function Se(e) {
|
|
919
|
+
return ((Ee(e) ? e.ownerDocument : (
|
|
920
920
|
// $FlowFixMe[prop-missing]
|
|
921
921
|
e.document
|
|
922
922
|
)) || window.document).documentElement;
|
|
923
923
|
}
|
|
924
924
|
function rt(e) {
|
|
925
|
-
return
|
|
925
|
+
return xe(e) === "html" ? e : (
|
|
926
926
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
927
927
|
// $FlowFixMe[incompatible-return]
|
|
928
928
|
// $FlowFixMe[prop-missing]
|
|
929
929
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
930
930
|
e.parentNode || // DOM Element detected
|
|
931
|
-
(
|
|
931
|
+
($t(e) ? e.host : null) || // ShadowRoot detected
|
|
932
932
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
933
|
-
|
|
933
|
+
Se(e)
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return !
|
|
938
|
-
|
|
936
|
+
function jt(e) {
|
|
937
|
+
return !me(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
938
|
+
$e(e).position === "fixed" ? null : e.offsetParent;
|
|
939
939
|
}
|
|
940
940
|
function Cn(e) {
|
|
941
941
|
var a = /firefox/i.test(vt()), t = /Trident/i.test(vt());
|
|
942
|
-
if (t &&
|
|
943
|
-
var r =
|
|
942
|
+
if (t && me(e)) {
|
|
943
|
+
var r = $e(e);
|
|
944
944
|
if (r.position === "fixed")
|
|
945
945
|
return null;
|
|
946
946
|
}
|
|
947
947
|
var n = rt(e);
|
|
948
|
-
for (
|
|
949
|
-
var i =
|
|
948
|
+
for ($t(n) && (n = n.host); me(n) && ["html", "body"].indexOf(xe(n)) < 0; ) {
|
|
949
|
+
var i = $e(n);
|
|
950
950
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || a && i.willChange === "filter" || a && i.filter && i.filter !== "none")
|
|
951
951
|
return n;
|
|
952
952
|
n = n.parentNode;
|
|
953
953
|
}
|
|
954
954
|
return null;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
for (var a =
|
|
958
|
-
t =
|
|
959
|
-
return t && (
|
|
956
|
+
function Ke(e) {
|
|
957
|
+
for (var a = de(e), t = jt(e); t && On(t) && $e(t).position === "static"; )
|
|
958
|
+
t = jt(t);
|
|
959
|
+
return t && (xe(t) === "html" || xe(t) === "body" && $e(t).position === "static") ? a : t || Cn(e) || a;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Ct(e) {
|
|
962
962
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return
|
|
964
|
+
function Ie(e, a, t) {
|
|
965
|
+
return Be(e, Je(a, t));
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
var r =
|
|
967
|
+
function Tn(e, a, t) {
|
|
968
|
+
var r = Ie(e, a, t);
|
|
969
969
|
return r > t ? t : r;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function ua() {
|
|
972
972
|
return {
|
|
973
973
|
top: 0,
|
|
974
974
|
right: 0,
|
|
@@ -976,29 +976,29 @@ function ca() {
|
|
|
976
976
|
left: 0
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
return Object.assign({},
|
|
979
|
+
function da(e) {
|
|
980
|
+
return Object.assign({}, ua(), e);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function fa(e, a) {
|
|
983
983
|
return a.reduce(function(t, r) {
|
|
984
984
|
return t[r] = e, t;
|
|
985
985
|
}, {});
|
|
986
986
|
}
|
|
987
|
-
var
|
|
987
|
+
var Sn = function(a, t) {
|
|
988
988
|
return a = typeof a == "function" ? a(Object.assign({}, t.rects, {
|
|
989
989
|
placement: t.placement
|
|
990
|
-
})) : a,
|
|
990
|
+
})) : a, da(typeof a != "number" ? a : fa(a, Xe));
|
|
991
991
|
};
|
|
992
992
|
function Vn(e) {
|
|
993
|
-
var a, t = e.state, r = e.name, n = e.options, i = t.elements.arrow,
|
|
994
|
-
if (!(!i || !
|
|
995
|
-
var
|
|
996
|
-
t.modifiersData[r] = (a = {}, a[
|
|
993
|
+
var a, t = e.state, r = e.name, n = e.options, i = t.elements.arrow, s = t.modifiersData.popperOffsets, o = we(t.placement), l = Ct(o), d = [ce, he].indexOf(o) >= 0, c = d ? "height" : "width";
|
|
994
|
+
if (!(!i || !s)) {
|
|
995
|
+
var b = Sn(n.padding, t), $ = Ot(i), h = l === "y" ? se : ce, x = l === "y" ? ge : he, C = t.rects.reference[c] + t.rects.reference[l] - s[l] - t.rects.popper[c], V = s[l] - t.rects.reference[l], k = Ke(i), S = k ? l === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, A = C / 2 - V / 2, T = b[h], E = S - $[c] - b[x], v = S / 2 - $[c] / 2 + A, B = Ie(T, v, E), R = l;
|
|
996
|
+
t.modifiersData[r] = (a = {}, a[R] = B, a.centerOffset = B - v, a);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
function Bn(e) {
|
|
1000
1000
|
var a = e.state, t = e.options, r = t.element, n = r === void 0 ? "[data-popper-arrow]" : r;
|
|
1001
|
-
n != null && (typeof n == "string" && (n = a.elements.popper.querySelector(n), !n) ||
|
|
1001
|
+
n != null && (typeof n == "string" && (n = a.elements.popper.querySelector(n), !n) || ca(a.elements.popper, n) && (a.elements.arrow = n));
|
|
1002
1002
|
}
|
|
1003
1003
|
const En = {
|
|
1004
1004
|
name: "arrow",
|
|
@@ -1009,110 +1009,110 @@ const En = {
|
|
|
1009
1009
|
requires: ["popperOffsets"],
|
|
1010
1010
|
requiresIfExists: ["preventOverflow"]
|
|
1011
1011
|
};
|
|
1012
|
-
function
|
|
1012
|
+
function Le(e) {
|
|
1013
1013
|
return e.split("-")[1];
|
|
1014
1014
|
}
|
|
1015
|
-
var
|
|
1015
|
+
var Pn = {
|
|
1016
1016
|
top: "auto",
|
|
1017
1017
|
right: "auto",
|
|
1018
1018
|
bottom: "auto",
|
|
1019
1019
|
left: "auto"
|
|
1020
1020
|
};
|
|
1021
|
-
function
|
|
1021
|
+
function zn(e, a) {
|
|
1022
1022
|
var t = e.x, r = e.y, n = a.devicePixelRatio || 1;
|
|
1023
1023
|
return {
|
|
1024
|
-
x:
|
|
1025
|
-
y:
|
|
1024
|
+
x: Re(t * n) / n || 0,
|
|
1025
|
+
y: Re(r * n) / n || 0
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1029
|
-
var a, t = e.popper, r = e.popperRect, n = e.placement, i = e.variation,
|
|
1030
|
-
x:
|
|
1031
|
-
y:
|
|
1028
|
+
function Nt(e) {
|
|
1029
|
+
var a, t = e.popper, r = e.popperRect, n = e.placement, i = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, b = e.isFixed, $ = s.x, h = $ === void 0 ? 0 : $, x = s.y, C = x === void 0 ? 0 : x, V = typeof c == "function" ? c({
|
|
1030
|
+
x: h,
|
|
1031
|
+
y: C
|
|
1032
1032
|
}) : {
|
|
1033
|
-
x:
|
|
1034
|
-
y:
|
|
1033
|
+
x: h,
|
|
1034
|
+
y: C
|
|
1035
1035
|
};
|
|
1036
|
-
|
|
1037
|
-
var
|
|
1036
|
+
h = V.x, C = V.y;
|
|
1037
|
+
var k = s.hasOwnProperty("x"), S = s.hasOwnProperty("y"), A = ce, T = se, E = window;
|
|
1038
1038
|
if (d) {
|
|
1039
|
-
var
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1042
|
-
var
|
|
1039
|
+
var v = Ke(t), B = "clientHeight", R = "clientWidth";
|
|
1040
|
+
if (v === de(t) && (v = Se(t), $e(v).position !== "static" && o === "absolute" && (B = "scrollHeight", R = "scrollWidth")), v = v, n === se || (n === ce || n === he) && i === Ue) {
|
|
1041
|
+
T = ge;
|
|
1042
|
+
var W = b && v === E && E.visualViewport ? E.visualViewport.height : (
|
|
1043
1043
|
// $FlowFixMe[prop-missing]
|
|
1044
|
-
|
|
1044
|
+
v[B]
|
|
1045
1045
|
);
|
|
1046
|
-
|
|
1046
|
+
C -= W - r.height, C *= l ? 1 : -1;
|
|
1047
1047
|
}
|
|
1048
|
-
if (n ===
|
|
1049
|
-
|
|
1050
|
-
var
|
|
1048
|
+
if (n === ce || (n === se || n === ge) && i === Ue) {
|
|
1049
|
+
A = he;
|
|
1050
|
+
var N = b && v === E && E.visualViewport ? E.visualViewport.width : (
|
|
1051
1051
|
// $FlowFixMe[prop-missing]
|
|
1052
|
-
|
|
1052
|
+
v[R]
|
|
1053
1053
|
);
|
|
1054
|
-
|
|
1054
|
+
h -= N - r.width, h *= l ? 1 : -1;
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
var
|
|
1057
|
+
var M = Object.assign({
|
|
1058
1058
|
position: o
|
|
1059
|
-
}, d &&
|
|
1060
|
-
x:
|
|
1061
|
-
y:
|
|
1062
|
-
},
|
|
1063
|
-
x:
|
|
1064
|
-
y:
|
|
1059
|
+
}, d && Pn), U = c === !0 ? zn({
|
|
1060
|
+
x: h,
|
|
1061
|
+
y: C
|
|
1062
|
+
}, de(t)) : {
|
|
1063
|
+
x: h,
|
|
1064
|
+
y: C
|
|
1065
1065
|
};
|
|
1066
|
-
if (
|
|
1067
|
-
var
|
|
1068
|
-
return Object.assign({},
|
|
1066
|
+
if (h = U.x, C = U.y, l) {
|
|
1067
|
+
var O;
|
|
1068
|
+
return Object.assign({}, M, (O = {}, O[T] = S ? "0" : "", O[A] = k ? "0" : "", O.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + C + "px)" : "translate3d(" + h + "px, " + C + "px, 0)", O));
|
|
1069
1069
|
}
|
|
1070
|
-
return Object.assign({},
|
|
1070
|
+
return Object.assign({}, M, (a = {}, a[T] = S ? C + "px" : "", a[A] = k ? h + "px" : "", a.transform = "", a));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
var a = e.state, t = e.options, r = t.gpuAcceleration, n = r === void 0 ? !0 : r, i = t.adaptive,
|
|
1074
|
-
placement:
|
|
1075
|
-
variation:
|
|
1072
|
+
function An(e) {
|
|
1073
|
+
var a = e.state, t = e.options, r = t.gpuAcceleration, n = r === void 0 ? !0 : r, i = t.adaptive, s = i === void 0 ? !0 : i, o = t.roundOffsets, l = o === void 0 ? !0 : o, d = {
|
|
1074
|
+
placement: we(a.placement),
|
|
1075
|
+
variation: Le(a.placement),
|
|
1076
1076
|
popper: a.elements.popper,
|
|
1077
1077
|
popperRect: a.rects.popper,
|
|
1078
1078
|
gpuAcceleration: n,
|
|
1079
1079
|
isFixed: a.options.strategy === "fixed"
|
|
1080
1080
|
};
|
|
1081
|
-
a.modifiersData.popperOffsets != null && (a.styles.popper = Object.assign({}, a.styles.popper,
|
|
1081
|
+
a.modifiersData.popperOffsets != null && (a.styles.popper = Object.assign({}, a.styles.popper, Nt(Object.assign({}, d, {
|
|
1082
1082
|
offsets: a.modifiersData.popperOffsets,
|
|
1083
1083
|
position: a.options.strategy,
|
|
1084
|
-
adaptive:
|
|
1085
|
-
roundOffsets:
|
|
1086
|
-
})))), a.modifiersData.arrow != null && (a.styles.arrow = Object.assign({}, a.styles.arrow,
|
|
1084
|
+
adaptive: s,
|
|
1085
|
+
roundOffsets: l
|
|
1086
|
+
})))), a.modifiersData.arrow != null && (a.styles.arrow = Object.assign({}, a.styles.arrow, Nt(Object.assign({}, d, {
|
|
1087
1087
|
offsets: a.modifiersData.arrow,
|
|
1088
1088
|
position: "absolute",
|
|
1089
1089
|
adaptive: !1,
|
|
1090
|
-
roundOffsets:
|
|
1090
|
+
roundOffsets: l
|
|
1091
1091
|
})))), a.attributes.popper = Object.assign({}, a.attributes.popper, {
|
|
1092
1092
|
"data-popper-placement": a.placement
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
|
-
const
|
|
1095
|
+
const Dn = {
|
|
1096
1096
|
name: "computeStyles",
|
|
1097
1097
|
enabled: !0,
|
|
1098
1098
|
phase: "beforeWrite",
|
|
1099
|
-
fn:
|
|
1099
|
+
fn: An,
|
|
1100
1100
|
data: {}
|
|
1101
1101
|
};
|
|
1102
|
-
var
|
|
1102
|
+
var Qe = {
|
|
1103
1103
|
passive: !0
|
|
1104
1104
|
};
|
|
1105
1105
|
function Rn(e) {
|
|
1106
|
-
var a = e.state, t = e.instance, r = e.options, n = r.scroll, i = n === void 0 ? !0 : n,
|
|
1106
|
+
var a = e.state, t = e.instance, r = e.options, n = r.scroll, i = n === void 0 ? !0 : n, s = r.resize, o = s === void 0 ? !0 : s, l = de(a.elements.popper), d = [].concat(a.scrollParents.reference, a.scrollParents.popper);
|
|
1107
1107
|
return i && d.forEach(function(c) {
|
|
1108
|
-
c.addEventListener("scroll", t.update,
|
|
1109
|
-
}), o &&
|
|
1108
|
+
c.addEventListener("scroll", t.update, Qe);
|
|
1109
|
+
}), o && l.addEventListener("resize", t.update, Qe), function() {
|
|
1110
1110
|
i && d.forEach(function(c) {
|
|
1111
|
-
c.removeEventListener("scroll", t.update,
|
|
1112
|
-
}), o &&
|
|
1111
|
+
c.removeEventListener("scroll", t.update, Qe);
|
|
1112
|
+
}), o && l.removeEventListener("resize", t.update, Qe);
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1115
|
+
const Wn = {
|
|
1116
1116
|
name: "eventListeners",
|
|
1117
1117
|
enabled: !0,
|
|
1118
1118
|
phase: "write",
|
|
@@ -1121,73 +1121,73 @@ const Ln = {
|
|
|
1121
1121
|
effect: Rn,
|
|
1122
1122
|
data: {}
|
|
1123
1123
|
};
|
|
1124
|
-
var
|
|
1124
|
+
var Ln = {
|
|
1125
1125
|
left: "right",
|
|
1126
1126
|
right: "left",
|
|
1127
1127
|
bottom: "top",
|
|
1128
1128
|
top: "bottom"
|
|
1129
1129
|
};
|
|
1130
|
-
function
|
|
1130
|
+
function Ze(e) {
|
|
1131
1131
|
return e.replace(/left|right|bottom|top/g, function(a) {
|
|
1132
|
-
return
|
|
1132
|
+
return Ln[a];
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
1135
|
var Mn = {
|
|
1136
1136
|
start: "end",
|
|
1137
1137
|
end: "start"
|
|
1138
1138
|
};
|
|
1139
|
-
function
|
|
1139
|
+
function It(e) {
|
|
1140
1140
|
return e.replace(/start|end/g, function(a) {
|
|
1141
1141
|
return Mn[a];
|
|
1142
1142
|
});
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
var a =
|
|
1144
|
+
function Tt(e) {
|
|
1145
|
+
var a = de(e), t = a.pageXOffset, r = a.pageYOffset;
|
|
1146
1146
|
return {
|
|
1147
1147
|
scrollLeft: t,
|
|
1148
1148
|
scrollTop: r
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
1151
|
function St(e) {
|
|
1152
|
-
return
|
|
1152
|
+
return We(Se(e)).left + Tt(e).scrollLeft;
|
|
1153
1153
|
}
|
|
1154
1154
|
function jn(e, a) {
|
|
1155
|
-
var t =
|
|
1155
|
+
var t = de(e), r = Se(e), n = t.visualViewport, i = r.clientWidth, s = r.clientHeight, o = 0, l = 0;
|
|
1156
1156
|
if (n) {
|
|
1157
|
-
i = n.width,
|
|
1158
|
-
var d =
|
|
1159
|
-
(d || !d && a === "fixed") && (o = n.offsetLeft,
|
|
1157
|
+
i = n.width, s = n.height;
|
|
1158
|
+
var d = sa();
|
|
1159
|
+
(d || !d && a === "fixed") && (o = n.offsetLeft, l = n.offsetTop);
|
|
1160
1160
|
}
|
|
1161
1161
|
return {
|
|
1162
1162
|
width: i,
|
|
1163
|
-
height:
|
|
1163
|
+
height: s,
|
|
1164
1164
|
x: o + St(e),
|
|
1165
|
-
y:
|
|
1165
|
+
y: l
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
1168
|
function Nn(e) {
|
|
1169
|
-
var a, t =
|
|
1170
|
-
return
|
|
1169
|
+
var a, t = Se(e), r = Tt(e), n = (a = e.ownerDocument) == null ? void 0 : a.body, i = Be(t.scrollWidth, t.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), s = Be(t.scrollHeight, t.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), o = -r.scrollLeft + St(e), l = -r.scrollTop;
|
|
1170
|
+
return $e(n || t).direction === "rtl" && (o += Be(t.clientWidth, n ? n.clientWidth : 0) - i), {
|
|
1171
1171
|
width: i,
|
|
1172
|
-
height:
|
|
1172
|
+
height: s,
|
|
1173
1173
|
x: o,
|
|
1174
|
-
y:
|
|
1174
|
+
y: l
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1178
|
-
var a =
|
|
1177
|
+
function Vt(e) {
|
|
1178
|
+
var a = $e(e), t = a.overflow, r = a.overflowX, n = a.overflowY;
|
|
1179
1179
|
return /auto|scroll|overlay|hidden/.test(t + n + r);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return ["html", "body", "#document"].indexOf(
|
|
1181
|
+
function pa(e) {
|
|
1182
|
+
return ["html", "body", "#document"].indexOf(xe(e)) >= 0 ? e.ownerDocument.body : me(e) && Vt(e) ? e : pa(rt(e));
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function _e(e, a) {
|
|
1185
1185
|
var t;
|
|
1186
1186
|
a === void 0 && (a = []);
|
|
1187
|
-
var r =
|
|
1187
|
+
var r = pa(e), n = r === ((t = e.ownerDocument) == null ? void 0 : t.body), i = de(r), s = n ? [i].concat(i.visualViewport || [], Vt(r) ? r : []) : r, o = a.concat(s);
|
|
1188
1188
|
return n ? o : (
|
|
1189
1189
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1190
|
-
o.concat(
|
|
1190
|
+
o.concat(_e(rt(s)))
|
|
1191
1191
|
);
|
|
1192
1192
|
}
|
|
1193
1193
|
function mt(e) {
|
|
@@ -1199,165 +1199,165 @@ function mt(e) {
|
|
|
1199
1199
|
});
|
|
1200
1200
|
}
|
|
1201
1201
|
function In(e, a) {
|
|
1202
|
-
var t =
|
|
1202
|
+
var t = We(e, !1, a === "fixed");
|
|
1203
1203
|
return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return a ===
|
|
1205
|
+
function _t(e, a, t) {
|
|
1206
|
+
return a === oa ? mt(jn(e, t)) : Ee(a) ? In(a, t) : mt(Nn(Se(e)));
|
|
1207
1207
|
}
|
|
1208
1208
|
function _n(e) {
|
|
1209
|
-
var a =
|
|
1210
|
-
return
|
|
1211
|
-
return
|
|
1209
|
+
var a = _e(rt(e)), t = ["absolute", "fixed"].indexOf($e(e).position) >= 0, r = t && me(e) ? Ke(e) : e;
|
|
1210
|
+
return Ee(r) ? a.filter(function(n) {
|
|
1211
|
+
return Ee(n) && ca(n, r) && xe(n) !== "body";
|
|
1212
1212
|
}) : [];
|
|
1213
1213
|
}
|
|
1214
1214
|
function Fn(e, a, t, r) {
|
|
1215
|
-
var n = a === "clippingParents" ? _n(e) : [].concat(a), i = [].concat(n, [t]),
|
|
1216
|
-
var c =
|
|
1217
|
-
return
|
|
1218
|
-
},
|
|
1215
|
+
var n = a === "clippingParents" ? _n(e) : [].concat(a), i = [].concat(n, [t]), s = i[0], o = i.reduce(function(l, d) {
|
|
1216
|
+
var c = _t(e, d, r);
|
|
1217
|
+
return l.top = Be(c.top, l.top), l.right = Je(c.right, l.right), l.bottom = Je(c.bottom, l.bottom), l.left = Be(c.left, l.left), l;
|
|
1218
|
+
}, _t(e, s, r));
|
|
1219
1219
|
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
var a = e.reference, t = e.element, r = e.placement, n = r ?
|
|
1221
|
+
function va(e) {
|
|
1222
|
+
var a = e.reference, t = e.element, r = e.placement, n = r ? we(r) : null, i = r ? Le(r) : null, s = a.x + a.width / 2 - t.width / 2, o = a.y + a.height / 2 - t.height / 2, l;
|
|
1223
1223
|
switch (n) {
|
|
1224
|
-
case
|
|
1225
|
-
|
|
1226
|
-
x:
|
|
1224
|
+
case se:
|
|
1225
|
+
l = {
|
|
1226
|
+
x: s,
|
|
1227
1227
|
y: a.y - t.height
|
|
1228
1228
|
};
|
|
1229
1229
|
break;
|
|
1230
|
-
case
|
|
1231
|
-
|
|
1232
|
-
x:
|
|
1230
|
+
case ge:
|
|
1231
|
+
l = {
|
|
1232
|
+
x: s,
|
|
1233
1233
|
y: a.y + a.height
|
|
1234
1234
|
};
|
|
1235
1235
|
break;
|
|
1236
|
-
case
|
|
1237
|
-
|
|
1236
|
+
case he:
|
|
1237
|
+
l = {
|
|
1238
1238
|
x: a.x + a.width,
|
|
1239
1239
|
y: o
|
|
1240
1240
|
};
|
|
1241
1241
|
break;
|
|
1242
|
-
case
|
|
1243
|
-
|
|
1242
|
+
case ce:
|
|
1243
|
+
l = {
|
|
1244
1244
|
x: a.x - t.width,
|
|
1245
1245
|
y: o
|
|
1246
1246
|
};
|
|
1247
1247
|
break;
|
|
1248
1248
|
default:
|
|
1249
|
-
|
|
1249
|
+
l = {
|
|
1250
1250
|
x: a.x,
|
|
1251
1251
|
y: a.y
|
|
1252
1252
|
};
|
|
1253
1253
|
}
|
|
1254
|
-
var d = n ?
|
|
1254
|
+
var d = n ? Ct(n) : null;
|
|
1255
1255
|
if (d != null) {
|
|
1256
1256
|
var c = d === "y" ? "height" : "width";
|
|
1257
1257
|
switch (i) {
|
|
1258
|
-
case
|
|
1259
|
-
|
|
1258
|
+
case De:
|
|
1259
|
+
l[d] = l[d] - (a[c] / 2 - t[c] / 2);
|
|
1260
1260
|
break;
|
|
1261
|
-
case
|
|
1262
|
-
|
|
1261
|
+
case Ue:
|
|
1262
|
+
l[d] = l[d] + (a[c] / 2 - t[c] / 2);
|
|
1263
1263
|
break;
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
return
|
|
1266
|
+
return l;
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function qe(e, a) {
|
|
1269
1269
|
a === void 0 && (a = {});
|
|
1270
|
-
var t = a, r = t.placement, n = r === void 0 ? e.placement : r, i = t.strategy,
|
|
1271
|
-
reference:
|
|
1272
|
-
element:
|
|
1270
|
+
var t = a, r = t.placement, n = r === void 0 ? e.placement : r, i = t.strategy, s = i === void 0 ? e.strategy : i, o = t.boundary, l = o === void 0 ? cn : o, d = t.rootBoundary, c = d === void 0 ? oa : d, b = t.elementContext, $ = b === void 0 ? je : b, h = t.altBoundary, x = h === void 0 ? !1 : h, C = t.padding, V = C === void 0 ? 0 : C, k = da(typeof V != "number" ? V : fa(V, Xe)), S = $ === je ? un : je, A = e.rects.popper, T = e.elements[x ? S : $], E = Fn(Ee(T) ? T : T.contextElement || Se(e.elements.popper), l, c, s), v = We(e.elements.reference), B = va({
|
|
1271
|
+
reference: v,
|
|
1272
|
+
element: A,
|
|
1273
1273
|
placement: n
|
|
1274
|
-
}),
|
|
1275
|
-
top: E.top -
|
|
1276
|
-
bottom:
|
|
1277
|
-
left: E.left -
|
|
1278
|
-
right:
|
|
1279
|
-
},
|
|
1280
|
-
if ($ ===
|
|
1281
|
-
var
|
|
1282
|
-
Object.keys(
|
|
1283
|
-
var
|
|
1284
|
-
|
|
1274
|
+
}), R = mt(Object.assign({}, A, B)), W = $ === je ? R : v, N = {
|
|
1275
|
+
top: E.top - W.top + k.top,
|
|
1276
|
+
bottom: W.bottom - E.bottom + k.bottom,
|
|
1277
|
+
left: E.left - W.left + k.left,
|
|
1278
|
+
right: W.right - E.right + k.right
|
|
1279
|
+
}, M = e.modifiersData.offset;
|
|
1280
|
+
if ($ === je && M) {
|
|
1281
|
+
var U = M[n];
|
|
1282
|
+
Object.keys(N).forEach(function(O) {
|
|
1283
|
+
var D = [he, ge].indexOf(O) >= 0 ? 1 : -1, X = [se, ge].indexOf(O) >= 0 ? "y" : "x";
|
|
1284
|
+
N[O] += U[X] * D;
|
|
1285
1285
|
});
|
|
1286
1286
|
}
|
|
1287
|
-
return
|
|
1287
|
+
return N;
|
|
1288
1288
|
}
|
|
1289
1289
|
function Hn(e, a) {
|
|
1290
1290
|
a === void 0 && (a = {});
|
|
1291
|
-
var t = a, r = t.placement, n = t.boundary, i = t.rootBoundary,
|
|
1292
|
-
return
|
|
1293
|
-
}) :
|
|
1294
|
-
return d.indexOf(
|
|
1291
|
+
var t = a, r = t.placement, n = t.boundary, i = t.rootBoundary, s = t.padding, o = t.flipVariations, l = t.allowedAutoPlacements, d = l === void 0 ? la : l, c = Le(r), b = c ? o ? Mt : Mt.filter(function(x) {
|
|
1292
|
+
return Le(x) === c;
|
|
1293
|
+
}) : Xe, $ = b.filter(function(x) {
|
|
1294
|
+
return d.indexOf(x) >= 0;
|
|
1295
1295
|
});
|
|
1296
|
-
$.length === 0 && ($ =
|
|
1297
|
-
var
|
|
1298
|
-
return
|
|
1299
|
-
placement:
|
|
1296
|
+
$.length === 0 && ($ = b);
|
|
1297
|
+
var h = $.reduce(function(x, C) {
|
|
1298
|
+
return x[C] = qe(e, {
|
|
1299
|
+
placement: C,
|
|
1300
1300
|
boundary: n,
|
|
1301
1301
|
rootBoundary: i,
|
|
1302
|
-
padding:
|
|
1303
|
-
})[
|
|
1302
|
+
padding: s
|
|
1303
|
+
})[we(C)], x;
|
|
1304
1304
|
}, {});
|
|
1305
|
-
return Object.keys(
|
|
1306
|
-
return
|
|
1305
|
+
return Object.keys(h).sort(function(x, C) {
|
|
1306
|
+
return h[x] - h[C];
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
1309
|
function Un(e) {
|
|
1310
|
-
if (
|
|
1310
|
+
if (we(e) === kt)
|
|
1311
1311
|
return [];
|
|
1312
|
-
var a =
|
|
1313
|
-
return [
|
|
1312
|
+
var a = Ze(e);
|
|
1313
|
+
return [It(e), a, It(a)];
|
|
1314
1314
|
}
|
|
1315
1315
|
function qn(e) {
|
|
1316
1316
|
var a = e.state, t = e.options, r = e.name;
|
|
1317
1317
|
if (!a.modifiersData[r]._skip) {
|
|
1318
|
-
for (var n = t.mainAxis, i = n === void 0 ? !0 : n,
|
|
1319
|
-
return
|
|
1320
|
-
placement:
|
|
1318
|
+
for (var n = t.mainAxis, i = n === void 0 ? !0 : n, s = t.altAxis, o = s === void 0 ? !0 : s, l = t.fallbackPlacements, d = t.padding, c = t.boundary, b = t.rootBoundary, $ = t.altBoundary, h = t.flipVariations, x = h === void 0 ? !0 : h, C = t.allowedAutoPlacements, V = a.options.placement, k = we(V), S = k === V, A = l || (S || !x ? [Ze(V)] : Un(V)), T = [V].concat(A).reduce(function(ye, ue) {
|
|
1319
|
+
return ye.concat(we(ue) === kt ? Hn(a, {
|
|
1320
|
+
placement: ue,
|
|
1321
1321
|
boundary: c,
|
|
1322
|
-
rootBoundary:
|
|
1322
|
+
rootBoundary: b,
|
|
1323
1323
|
padding: d,
|
|
1324
|
-
flipVariations:
|
|
1325
|
-
allowedAutoPlacements:
|
|
1326
|
-
}) :
|
|
1327
|
-
}, []), E = a.rects.reference,
|
|
1328
|
-
var
|
|
1329
|
-
placement:
|
|
1324
|
+
flipVariations: x,
|
|
1325
|
+
allowedAutoPlacements: C
|
|
1326
|
+
}) : ue);
|
|
1327
|
+
}, []), E = a.rects.reference, v = a.rects.popper, B = /* @__PURE__ */ new Map(), R = !0, W = T[0], N = 0; N < T.length; N++) {
|
|
1328
|
+
var M = T[N], U = we(M), O = Le(M) === De, D = [se, ge].indexOf(U) >= 0, X = D ? "width" : "height", u = qe(a, {
|
|
1329
|
+
placement: M,
|
|
1330
1330
|
boundary: c,
|
|
1331
|
-
rootBoundary:
|
|
1331
|
+
rootBoundary: b,
|
|
1332
1332
|
altBoundary: $,
|
|
1333
1333
|
padding: d
|
|
1334
|
-
}),
|
|
1335
|
-
E[
|
|
1336
|
-
var z =
|
|
1337
|
-
if (i && q.push(u[
|
|
1338
|
-
return
|
|
1334
|
+
}), y = D ? O ? he : ce : O ? ge : se;
|
|
1335
|
+
E[X] > v[X] && (y = Ze(y));
|
|
1336
|
+
var z = Ze(y), q = [];
|
|
1337
|
+
if (i && q.push(u[U] <= 0), o && q.push(u[y] <= 0, u[z] <= 0), q.every(function(ye) {
|
|
1338
|
+
return ye;
|
|
1339
1339
|
})) {
|
|
1340
|
-
|
|
1340
|
+
W = M, R = !1;
|
|
1341
1341
|
break;
|
|
1342
1342
|
}
|
|
1343
|
-
|
|
1343
|
+
B.set(M, q);
|
|
1344
1344
|
}
|
|
1345
|
-
if (
|
|
1346
|
-
for (var re =
|
|
1347
|
-
var
|
|
1348
|
-
var
|
|
1349
|
-
if (
|
|
1350
|
-
return
|
|
1351
|
-
return
|
|
1345
|
+
if (R)
|
|
1346
|
+
for (var re = x ? 3 : 1, ne = function(ue) {
|
|
1347
|
+
var ke = T.find(function(m) {
|
|
1348
|
+
var K = B.get(m);
|
|
1349
|
+
if (K)
|
|
1350
|
+
return K.slice(0, ue).every(function(Z) {
|
|
1351
|
+
return Z;
|
|
1352
1352
|
});
|
|
1353
1353
|
});
|
|
1354
|
-
if (
|
|
1355
|
-
return
|
|
1356
|
-
},
|
|
1357
|
-
var
|
|
1358
|
-
if (
|
|
1354
|
+
if (ke)
|
|
1355
|
+
return W = ke, "break";
|
|
1356
|
+
}, ee = re; ee > 0; ee--) {
|
|
1357
|
+
var le = ne(ee);
|
|
1358
|
+
if (le === "break") break;
|
|
1359
1359
|
}
|
|
1360
|
-
a.placement !==
|
|
1360
|
+
a.placement !== W && (a.modifiersData[r]._skip = !0, a.placement = W, a.reset = !0);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
const Yn = {
|
|
@@ -1370,7 +1370,7 @@ const Yn = {
|
|
|
1370
1370
|
_skip: !1
|
|
1371
1371
|
}
|
|
1372
1372
|
};
|
|
1373
|
-
function
|
|
1373
|
+
function Ft(e, a, t) {
|
|
1374
1374
|
return t === void 0 && (t = {
|
|
1375
1375
|
x: 0,
|
|
1376
1376
|
y: 0
|
|
@@ -1381,25 +1381,25 @@ function _t(e, a, t) {
|
|
|
1381
1381
|
left: e.left - a.width - t.x
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return [
|
|
1384
|
+
function Ht(e) {
|
|
1385
|
+
return [se, he, ge, ce].some(function(a) {
|
|
1386
1386
|
return e[a] >= 0;
|
|
1387
1387
|
});
|
|
1388
1388
|
}
|
|
1389
1389
|
function Xn(e) {
|
|
1390
|
-
var a = e.state, t = e.name, r = a.rects.reference, n = a.rects.popper, i = a.modifiersData.preventOverflow,
|
|
1390
|
+
var a = e.state, t = e.name, r = a.rects.reference, n = a.rects.popper, i = a.modifiersData.preventOverflow, s = qe(a, {
|
|
1391
1391
|
elementContext: "reference"
|
|
1392
|
-
}), o =
|
|
1392
|
+
}), o = qe(a, {
|
|
1393
1393
|
altBoundary: !0
|
|
1394
|
-
}),
|
|
1394
|
+
}), l = Ft(s, r), d = Ft(o, n, i), c = Ht(l), b = Ht(d);
|
|
1395
1395
|
a.modifiersData[t] = {
|
|
1396
|
-
referenceClippingOffsets:
|
|
1396
|
+
referenceClippingOffsets: l,
|
|
1397
1397
|
popperEscapeOffsets: d,
|
|
1398
1398
|
isReferenceHidden: c,
|
|
1399
|
-
hasPopperEscaped:
|
|
1399
|
+
hasPopperEscaped: b
|
|
1400
1400
|
}, a.attributes.popper = Object.assign({}, a.attributes.popper, {
|
|
1401
1401
|
"data-popper-reference-hidden": c,
|
|
1402
|
-
"data-popper-escaped":
|
|
1402
|
+
"data-popper-escaped": b
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
1405
|
const Kn = {
|
|
@@ -1410,22 +1410,22 @@ const Kn = {
|
|
|
1410
1410
|
fn: Xn
|
|
1411
1411
|
};
|
|
1412
1412
|
function Gn(e, a, t) {
|
|
1413
|
-
var r =
|
|
1413
|
+
var r = we(e), n = [ce, se].indexOf(r) >= 0 ? -1 : 1, i = typeof t == "function" ? t(Object.assign({}, a, {
|
|
1414
1414
|
placement: e
|
|
1415
|
-
})) : t,
|
|
1416
|
-
return
|
|
1415
|
+
})) : t, s = i[0], o = i[1];
|
|
1416
|
+
return s = s || 0, o = (o || 0) * n, [ce, he].indexOf(r) >= 0 ? {
|
|
1417
1417
|
x: o,
|
|
1418
|
-
y:
|
|
1418
|
+
y: s
|
|
1419
1419
|
} : {
|
|
1420
|
-
x:
|
|
1420
|
+
x: s,
|
|
1421
1421
|
y: o
|
|
1422
1422
|
};
|
|
1423
1423
|
}
|
|
1424
1424
|
function Qn(e) {
|
|
1425
|
-
var a = e.state, t = e.options, r = e.name, n = t.offset, i = n === void 0 ? [0, 0] : n,
|
|
1426
|
-
return c[
|
|
1427
|
-
}, {}), o =
|
|
1428
|
-
a.modifiersData.popperOffsets != null && (a.modifiersData.popperOffsets.x +=
|
|
1425
|
+
var a = e.state, t = e.options, r = e.name, n = t.offset, i = n === void 0 ? [0, 0] : n, s = la.reduce(function(c, b) {
|
|
1426
|
+
return c[b] = Gn(b, a.rects, i), c;
|
|
1427
|
+
}, {}), o = s[a.placement], l = o.x, d = o.y;
|
|
1428
|
+
a.modifiersData.popperOffsets != null && (a.modifiersData.popperOffsets.x += l, a.modifiersData.popperOffsets.y += d), a.modifiersData[r] = s;
|
|
1429
1429
|
}
|
|
1430
1430
|
const Zn = {
|
|
1431
1431
|
name: "offset",
|
|
@@ -1436,7 +1436,7 @@ const Zn = {
|
|
|
1436
1436
|
};
|
|
1437
1437
|
function Jn(e) {
|
|
1438
1438
|
var a = e.state, t = e.name;
|
|
1439
|
-
a.modifiersData[t] =
|
|
1439
|
+
a.modifiersData[t] = va({
|
|
1440
1440
|
reference: a.rects.reference,
|
|
1441
1441
|
element: a.rects.popper,
|
|
1442
1442
|
placement: a.placement
|
|
@@ -1453,36 +1453,36 @@ function tr(e) {
|
|
|
1453
1453
|
return e === "x" ? "y" : "x";
|
|
1454
1454
|
}
|
|
1455
1455
|
function ar(e) {
|
|
1456
|
-
var a = e.state, t = e.options, r = e.name, n = t.mainAxis, i = n === void 0 ? !0 : n,
|
|
1457
|
-
boundary:
|
|
1456
|
+
var a = e.state, t = e.options, r = e.name, n = t.mainAxis, i = n === void 0 ? !0 : n, s = t.altAxis, o = s === void 0 ? !1 : s, l = t.boundary, d = t.rootBoundary, c = t.altBoundary, b = t.padding, $ = t.tether, h = $ === void 0 ? !0 : $, x = t.tetherOffset, C = x === void 0 ? 0 : x, V = qe(a, {
|
|
1457
|
+
boundary: l,
|
|
1458
1458
|
rootBoundary: d,
|
|
1459
|
-
padding:
|
|
1459
|
+
padding: b,
|
|
1460
1460
|
altBoundary: c
|
|
1461
|
-
}),
|
|
1461
|
+
}), k = we(a.placement), S = Le(a.placement), A = !S, T = Ct(k), E = tr(T), v = a.modifiersData.popperOffsets, B = a.rects.reference, R = a.rects.popper, W = typeof C == "function" ? C(Object.assign({}, a.rects, {
|
|
1462
1462
|
placement: a.placement
|
|
1463
|
-
})) :
|
|
1464
|
-
mainAxis:
|
|
1465
|
-
altAxis:
|
|
1463
|
+
})) : C, N = typeof W == "number" ? {
|
|
1464
|
+
mainAxis: W,
|
|
1465
|
+
altAxis: W
|
|
1466
1466
|
} : Object.assign({
|
|
1467
1467
|
mainAxis: 0,
|
|
1468
1468
|
altAxis: 0
|
|
1469
|
-
},
|
|
1469
|
+
}, W), M = a.modifiersData.offset ? a.modifiersData.offset[a.placement] : null, U = {
|
|
1470
1470
|
x: 0,
|
|
1471
1471
|
y: 0
|
|
1472
1472
|
};
|
|
1473
|
-
if (
|
|
1473
|
+
if (v) {
|
|
1474
1474
|
if (i) {
|
|
1475
|
-
var
|
|
1475
|
+
var O, D = T === "y" ? se : ce, X = T === "y" ? ge : he, u = T === "y" ? "height" : "width", y = v[T], z = y + V[D], q = y - V[X], re = h ? -R[u] / 2 : 0, ne = S === De ? B[u] : R[u], ee = S === De ? -R[u] : -B[u], le = a.elements.arrow, ye = h && le ? Ot(le) : {
|
|
1476
1476
|
width: 0,
|
|
1477
1477
|
height: 0
|
|
1478
|
-
},
|
|
1479
|
-
|
|
1478
|
+
}, ue = a.modifiersData["arrow#persistent"] ? a.modifiersData["arrow#persistent"].padding : ua(), ke = ue[D], m = ue[X], K = Ie(0, B[u], ye[u]), Z = A ? B[u] / 2 - re - K - ke - N.mainAxis : ne - K - ke - N.mainAxis, fe = A ? -B[u] / 2 + re + K + m + N.mainAxis : ee + K + m + N.mainAxis, Me = a.elements.arrow && Ke(a.elements.arrow), it = Me ? T === "y" ? Me.clientTop || 0 : Me.clientLeft || 0 : 0, g = (O = M?.[T]) != null ? O : 0, H = y + Z - g - it, L = y + fe - g, pe = Ie(h ? Je(z, H) : z, y, h ? Be(q, L) : q);
|
|
1479
|
+
v[T] = pe, U[T] = pe - y;
|
|
1480
1480
|
}
|
|
1481
1481
|
if (o) {
|
|
1482
|
-
var
|
|
1483
|
-
|
|
1482
|
+
var oe, ot = T === "x" ? se : ce, Bt = T === "x" ? ge : he, Ve = v[E], Ge = E === "y" ? "height" : "width", Et = Ve + V[ot], Pt = Ve - V[Bt], lt = [se, ce].indexOf(k) !== -1, zt = (oe = M?.[E]) != null ? oe : 0, At = lt ? Et : Ve - B[Ge] - R[Ge] - zt + N.altAxis, Dt = lt ? Ve + B[Ge] + R[Ge] - zt - N.altAxis : Pt, Rt = h && lt ? Tn(At, Ve, Dt) : Ie(h ? At : Et, Ve, h ? Dt : Pt);
|
|
1483
|
+
v[E] = Rt, U[E] = Rt - Ve;
|
|
1484
1484
|
}
|
|
1485
|
-
a.modifiersData[r] =
|
|
1485
|
+
a.modifiersData[r] = U;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
const nr = {
|
|
@@ -1499,27 +1499,27 @@ function rr(e) {
|
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
1501
|
function ir(e) {
|
|
1502
|
-
return e ===
|
|
1502
|
+
return e === de(e) || !me(e) ? Tt(e) : rr(e);
|
|
1503
1503
|
}
|
|
1504
1504
|
function or(e) {
|
|
1505
|
-
var a = e.getBoundingClientRect(), t =
|
|
1505
|
+
var a = e.getBoundingClientRect(), t = Re(a.width) / e.offsetWidth || 1, r = Re(a.height) / e.offsetHeight || 1;
|
|
1506
1506
|
return t !== 1 || r !== 1;
|
|
1507
1507
|
}
|
|
1508
1508
|
function lr(e, a, t) {
|
|
1509
1509
|
t === void 0 && (t = !1);
|
|
1510
|
-
var r =
|
|
1510
|
+
var r = me(a), n = me(a) && or(a), i = Se(a), s = We(e, n, t), o = {
|
|
1511
1511
|
scrollLeft: 0,
|
|
1512
1512
|
scrollTop: 0
|
|
1513
|
-
},
|
|
1513
|
+
}, l = {
|
|
1514
1514
|
x: 0,
|
|
1515
1515
|
y: 0
|
|
1516
1516
|
};
|
|
1517
|
-
return (r || !r && !t) && ((
|
|
1518
|
-
|
|
1519
|
-
x:
|
|
1520
|
-
y:
|
|
1521
|
-
width:
|
|
1522
|
-
height:
|
|
1517
|
+
return (r || !r && !t) && ((xe(a) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1518
|
+
Vt(i)) && (o = ir(a)), me(a) ? (l = We(a, !0), l.x += a.clientLeft, l.y += a.clientTop) : i && (l.x = St(i))), {
|
|
1519
|
+
x: s.left + o.scrollLeft - l.x,
|
|
1520
|
+
y: s.top + o.scrollTop - l.y,
|
|
1521
|
+
width: s.width,
|
|
1522
|
+
height: s.height
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
1525
|
function sr(e) {
|
|
@@ -1529,11 +1529,11 @@ function sr(e) {
|
|
|
1529
1529
|
});
|
|
1530
1530
|
function n(i) {
|
|
1531
1531
|
t.add(i.name);
|
|
1532
|
-
var
|
|
1533
|
-
|
|
1532
|
+
var s = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1533
|
+
s.forEach(function(o) {
|
|
1534
1534
|
if (!t.has(o)) {
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1535
|
+
var l = a.get(o);
|
|
1536
|
+
l && n(l);
|
|
1537
1537
|
}
|
|
1538
1538
|
}), r.push(i);
|
|
1539
1539
|
}
|
|
@@ -1571,12 +1571,12 @@ function dr(e) {
|
|
|
1571
1571
|
return a[t];
|
|
1572
1572
|
});
|
|
1573
1573
|
}
|
|
1574
|
-
var
|
|
1574
|
+
var Ut = {
|
|
1575
1575
|
placement: "bottom",
|
|
1576
1576
|
modifiers: [],
|
|
1577
1577
|
strategy: "absolute"
|
|
1578
1578
|
};
|
|
1579
|
-
function
|
|
1579
|
+
function qt() {
|
|
1580
1580
|
for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
|
|
1581
1581
|
a[t] = arguments[t];
|
|
1582
1582
|
return !a.some(function(r) {
|
|
@@ -1585,32 +1585,32 @@ function Ut() {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
function fr(e) {
|
|
1587
1587
|
e === void 0 && (e = {});
|
|
1588
|
-
var a = e, t = a.defaultModifiers, r = t === void 0 ? [] : t, n = a.defaultOptions, i = n === void 0 ?
|
|
1589
|
-
return function(o,
|
|
1588
|
+
var a = e, t = a.defaultModifiers, r = t === void 0 ? [] : t, n = a.defaultOptions, i = n === void 0 ? Ut : n;
|
|
1589
|
+
return function(o, l, d) {
|
|
1590
1590
|
d === void 0 && (d = i);
|
|
1591
1591
|
var c = {
|
|
1592
1592
|
placement: "bottom",
|
|
1593
1593
|
orderedModifiers: [],
|
|
1594
|
-
options: Object.assign({},
|
|
1594
|
+
options: Object.assign({}, Ut, i),
|
|
1595
1595
|
modifiersData: {},
|
|
1596
1596
|
elements: {
|
|
1597
1597
|
reference: o,
|
|
1598
|
-
popper:
|
|
1598
|
+
popper: l
|
|
1599
1599
|
},
|
|
1600
1600
|
attributes: {},
|
|
1601
1601
|
styles: {}
|
|
1602
|
-
},
|
|
1602
|
+
}, b = [], $ = !1, h = {
|
|
1603
1603
|
state: c,
|
|
1604
|
-
setOptions: function(
|
|
1605
|
-
var
|
|
1606
|
-
|
|
1607
|
-
reference:
|
|
1608
|
-
popper:
|
|
1604
|
+
setOptions: function(k) {
|
|
1605
|
+
var S = typeof k == "function" ? k(c.options) : k;
|
|
1606
|
+
C(), c.options = Object.assign({}, i, c.options, S), c.scrollParents = {
|
|
1607
|
+
reference: Ee(o) ? _e(o) : o.contextElement ? _e(o.contextElement) : [],
|
|
1608
|
+
popper: _e(l)
|
|
1609
1609
|
};
|
|
1610
|
-
var
|
|
1611
|
-
return c.orderedModifiers =
|
|
1612
|
-
return
|
|
1613
|
-
}),
|
|
1610
|
+
var A = cr(dr([].concat(r, c.options.modifiers)));
|
|
1611
|
+
return c.orderedModifiers = A.filter(function(T) {
|
|
1612
|
+
return T.enabled;
|
|
1613
|
+
}), x(), h.update();
|
|
1614
1614
|
},
|
|
1615
1615
|
// Sync update – it will always be executed, even if not necessary. This
|
|
1616
1616
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -1619,25 +1619,25 @@ function fr(e) {
|
|
|
1619
1619
|
// prefer the async Popper#update method
|
|
1620
1620
|
forceUpdate: function() {
|
|
1621
1621
|
if (!$) {
|
|
1622
|
-
var
|
|
1623
|
-
if (
|
|
1622
|
+
var k = c.elements, S = k.reference, A = k.popper;
|
|
1623
|
+
if (qt(S, A)) {
|
|
1624
1624
|
c.rects = {
|
|
1625
|
-
reference: lr(
|
|
1626
|
-
popper:
|
|
1627
|
-
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(
|
|
1628
|
-
return c.modifiersData[
|
|
1625
|
+
reference: lr(S, Ke(A), c.options.strategy === "fixed"),
|
|
1626
|
+
popper: Ot(A)
|
|
1627
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(N) {
|
|
1628
|
+
return c.modifiersData[N.name] = Object.assign({}, N.data);
|
|
1629
1629
|
});
|
|
1630
|
-
for (var
|
|
1630
|
+
for (var T = 0; T < c.orderedModifiers.length; T++) {
|
|
1631
1631
|
if (c.reset === !0) {
|
|
1632
|
-
c.reset = !1,
|
|
1632
|
+
c.reset = !1, T = -1;
|
|
1633
1633
|
continue;
|
|
1634
1634
|
}
|
|
1635
|
-
var E = c.orderedModifiers[
|
|
1636
|
-
typeof
|
|
1635
|
+
var E = c.orderedModifiers[T], v = E.fn, B = E.options, R = B === void 0 ? {} : B, W = E.name;
|
|
1636
|
+
typeof v == "function" && (c = v({
|
|
1637
1637
|
state: c,
|
|
1638
|
-
options:
|
|
1639
|
-
name:
|
|
1640
|
-
instance:
|
|
1638
|
+
options: R,
|
|
1639
|
+
name: W,
|
|
1640
|
+
instance: h
|
|
1641
1641
|
}) || c);
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
@@ -1647,68 +1647,68 @@ function fr(e) {
|
|
|
1647
1647
|
// not necessary (debounced to run at most once-per-tick)
|
|
1648
1648
|
update: ur(function() {
|
|
1649
1649
|
return new Promise(function(V) {
|
|
1650
|
-
|
|
1650
|
+
h.forceUpdate(), V(c);
|
|
1651
1651
|
});
|
|
1652
1652
|
}),
|
|
1653
1653
|
destroy: function() {
|
|
1654
|
-
|
|
1654
|
+
C(), $ = !0;
|
|
1655
1655
|
}
|
|
1656
1656
|
};
|
|
1657
|
-
if (!
|
|
1658
|
-
return
|
|
1659
|
-
|
|
1657
|
+
if (!qt(o, l))
|
|
1658
|
+
return h;
|
|
1659
|
+
h.setOptions(d).then(function(V) {
|
|
1660
1660
|
!$ && d.onFirstUpdate && d.onFirstUpdate(V);
|
|
1661
1661
|
});
|
|
1662
|
-
function
|
|
1662
|
+
function x() {
|
|
1663
1663
|
c.orderedModifiers.forEach(function(V) {
|
|
1664
|
-
var
|
|
1665
|
-
if (typeof
|
|
1666
|
-
var E =
|
|
1664
|
+
var k = V.name, S = V.options, A = S === void 0 ? {} : S, T = V.effect;
|
|
1665
|
+
if (typeof T == "function") {
|
|
1666
|
+
var E = T({
|
|
1667
1667
|
state: c,
|
|
1668
|
-
name:
|
|
1669
|
-
instance:
|
|
1670
|
-
options:
|
|
1671
|
-
}),
|
|
1668
|
+
name: k,
|
|
1669
|
+
instance: h,
|
|
1670
|
+
options: A
|
|
1671
|
+
}), v = function() {
|
|
1672
1672
|
};
|
|
1673
|
-
|
|
1673
|
+
b.push(E || v);
|
|
1674
1674
|
}
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1678
|
-
|
|
1677
|
+
function C() {
|
|
1678
|
+
b.forEach(function(V) {
|
|
1679
1679
|
return V();
|
|
1680
|
-
}),
|
|
1680
|
+
}), b = [];
|
|
1681
1681
|
}
|
|
1682
|
-
return
|
|
1682
|
+
return h;
|
|
1683
1683
|
};
|
|
1684
1684
|
}
|
|
1685
|
-
var pr = [
|
|
1685
|
+
var pr = [Wn, er, Dn, $n, Zn, Yn, nr, En, Kn], vr = /* @__PURE__ */ fr({
|
|
1686
1686
|
defaultModifiers: pr
|
|
1687
|
-
}), mr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self,
|
|
1687
|
+
}), mr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self, ma = mr || gr || Function("return this")(), et = ma.Symbol, ga = Object.prototype, hr = ga.hasOwnProperty, br = ga.toString, Ne = et ? et.toStringTag : void 0;
|
|
1688
1688
|
function yr(e) {
|
|
1689
|
-
var a = hr.call(e,
|
|
1689
|
+
var a = hr.call(e, Ne), t = e[Ne];
|
|
1690
1690
|
try {
|
|
1691
|
-
e[
|
|
1691
|
+
e[Ne] = void 0;
|
|
1692
1692
|
var r = !0;
|
|
1693
1693
|
} catch {
|
|
1694
1694
|
}
|
|
1695
1695
|
var n = br.call(e);
|
|
1696
|
-
return r && (a ? e[
|
|
1696
|
+
return r && (a ? e[Ne] = t : delete e[Ne]), n;
|
|
1697
1697
|
}
|
|
1698
1698
|
var wr = Object.prototype, xr = wr.toString;
|
|
1699
1699
|
function kr(e) {
|
|
1700
1700
|
return xr.call(e);
|
|
1701
1701
|
}
|
|
1702
|
-
var $r = "[object Null]", Or = "[object Undefined]",
|
|
1702
|
+
var $r = "[object Null]", Or = "[object Undefined]", Yt = et ? et.toStringTag : void 0;
|
|
1703
1703
|
function Cr(e) {
|
|
1704
|
-
return e == null ? e === void 0 ? Or : $r :
|
|
1704
|
+
return e == null ? e === void 0 ? Or : $r : Yt && Yt in Object(e) ? yr(e) : kr(e);
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function Tr(e) {
|
|
1707
1707
|
return e != null && typeof e == "object";
|
|
1708
1708
|
}
|
|
1709
|
-
var
|
|
1709
|
+
var Sr = "[object Symbol]";
|
|
1710
1710
|
function Vr(e) {
|
|
1711
|
-
return typeof e == "symbol" ||
|
|
1711
|
+
return typeof e == "symbol" || Tr(e) && Cr(e) == Sr;
|
|
1712
1712
|
}
|
|
1713
1713
|
var Br = /\s/;
|
|
1714
1714
|
function Er(e) {
|
|
@@ -1716,86 +1716,86 @@ function Er(e) {
|
|
|
1716
1716
|
;
|
|
1717
1717
|
return a;
|
|
1718
1718
|
}
|
|
1719
|
-
var
|
|
1720
|
-
function
|
|
1721
|
-
return e && e.slice(0, Er(e) + 1).replace(
|
|
1719
|
+
var Pr = /^\s+/;
|
|
1720
|
+
function zr(e) {
|
|
1721
|
+
return e && e.slice(0, Er(e) + 1).replace(Pr, "");
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function tt(e) {
|
|
1724
1724
|
var a = typeof e;
|
|
1725
1725
|
return e != null && (a == "object" || a == "function");
|
|
1726
1726
|
}
|
|
1727
|
-
var
|
|
1728
|
-
function
|
|
1727
|
+
var Xt = NaN, Ar = /^[-+]0x[0-9a-f]+$/i, Dr = /^0b[01]+$/i, Rr = /^0o[0-7]+$/i, Wr = parseInt;
|
|
1728
|
+
function Kt(e) {
|
|
1729
1729
|
if (typeof e == "number")
|
|
1730
1730
|
return e;
|
|
1731
1731
|
if (Vr(e))
|
|
1732
|
-
return
|
|
1733
|
-
if (
|
|
1732
|
+
return Xt;
|
|
1733
|
+
if (tt(e)) {
|
|
1734
1734
|
var a = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
1735
|
-
e =
|
|
1735
|
+
e = tt(a) ? a + "" : a;
|
|
1736
1736
|
}
|
|
1737
1737
|
if (typeof e != "string")
|
|
1738
1738
|
return e === 0 ? e : +e;
|
|
1739
|
-
e =
|
|
1740
|
-
var t =
|
|
1741
|
-
return t || Rr.test(e) ?
|
|
1739
|
+
e = zr(e);
|
|
1740
|
+
var t = Dr.test(e);
|
|
1741
|
+
return t || Rr.test(e) ? Wr(e.slice(2), t ? 2 : 8) : Ar.test(e) ? Xt : +e;
|
|
1742
1742
|
}
|
|
1743
1743
|
var dt = function() {
|
|
1744
|
-
return
|
|
1745
|
-
},
|
|
1744
|
+
return ma.Date.now();
|
|
1745
|
+
}, Lr = "Expected a function", Mr = Math.max, jr = Math.min;
|
|
1746
1746
|
function gt(e, a, t) {
|
|
1747
|
-
var r, n, i,
|
|
1747
|
+
var r, n, i, s, o, l, d = 0, c = !1, b = !1, $ = !0;
|
|
1748
1748
|
if (typeof e != "function")
|
|
1749
|
-
throw new TypeError(
|
|
1750
|
-
a =
|
|
1751
|
-
function
|
|
1752
|
-
var
|
|
1753
|
-
return r = n = void 0, d =
|
|
1749
|
+
throw new TypeError(Lr);
|
|
1750
|
+
a = Kt(a) || 0, tt(t) && (c = !!t.leading, b = "maxWait" in t, i = b ? Mr(Kt(t.maxWait) || 0, a) : i, $ = "trailing" in t ? !!t.trailing : $);
|
|
1751
|
+
function h(v) {
|
|
1752
|
+
var B = r, R = n;
|
|
1753
|
+
return r = n = void 0, d = v, s = e.apply(R, B), s;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1756
|
-
return d =
|
|
1755
|
+
function x(v) {
|
|
1756
|
+
return d = v, o = setTimeout(k, a), c ? h(v) : s;
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1759
|
-
var
|
|
1760
|
-
return
|
|
1758
|
+
function C(v) {
|
|
1759
|
+
var B = v - l, R = v - d, W = a - B;
|
|
1760
|
+
return b ? jr(W, i - R) : W;
|
|
1761
1761
|
}
|
|
1762
|
-
function V(
|
|
1763
|
-
var
|
|
1764
|
-
return
|
|
1762
|
+
function V(v) {
|
|
1763
|
+
var B = v - l, R = v - d;
|
|
1764
|
+
return l === void 0 || B >= a || B < 0 || b && R >= i;
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1767
|
-
var
|
|
1768
|
-
if (V(
|
|
1769
|
-
return
|
|
1770
|
-
o = setTimeout(
|
|
1766
|
+
function k() {
|
|
1767
|
+
var v = dt();
|
|
1768
|
+
if (V(v))
|
|
1769
|
+
return S(v);
|
|
1770
|
+
o = setTimeout(k, C(v));
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
return o = void 0, $ && r ?
|
|
1772
|
+
function S(v) {
|
|
1773
|
+
return o = void 0, $ && r ? h(v) : (r = n = void 0, s);
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1776
|
-
o !== void 0 && clearTimeout(o), d = 0, r =
|
|
1775
|
+
function A() {
|
|
1776
|
+
o !== void 0 && clearTimeout(o), d = 0, r = l = n = o = void 0;
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1779
|
-
return o === void 0 ?
|
|
1778
|
+
function T() {
|
|
1779
|
+
return o === void 0 ? s : S(dt());
|
|
1780
1780
|
}
|
|
1781
1781
|
function E() {
|
|
1782
|
-
var
|
|
1783
|
-
if (r = arguments, n = this,
|
|
1782
|
+
var v = dt(), B = V(v);
|
|
1783
|
+
if (r = arguments, n = this, l = v, B) {
|
|
1784
1784
|
if (o === void 0)
|
|
1785
|
-
return
|
|
1786
|
-
if (
|
|
1787
|
-
return clearTimeout(o), o = setTimeout(
|
|
1785
|
+
return x(l);
|
|
1786
|
+
if (b)
|
|
1787
|
+
return clearTimeout(o), o = setTimeout(k, a), h(l);
|
|
1788
1788
|
}
|
|
1789
|
-
return o === void 0 && (o = setTimeout(
|
|
1789
|
+
return o === void 0 && (o = setTimeout(k, a)), s;
|
|
1790
1790
|
}
|
|
1791
|
-
return E.cancel =
|
|
1791
|
+
return E.cancel = A, E.flush = T, E;
|
|
1792
1792
|
}
|
|
1793
1793
|
var Nr = "Expected a function";
|
|
1794
1794
|
function Ir(e, a, t) {
|
|
1795
1795
|
var r = !0, n = !0;
|
|
1796
1796
|
if (typeof e != "function")
|
|
1797
1797
|
throw new TypeError(Nr);
|
|
1798
|
-
return
|
|
1798
|
+
return tt(t) && (r = "leading" in t ? !!t.leading : r, n = "trailing" in t ? !!t.trailing : n), gt(e, a, {
|
|
1799
1799
|
leading: r,
|
|
1800
1800
|
maxWait: a,
|
|
1801
1801
|
trailing: n
|
|
@@ -1806,9 +1806,9 @@ const _r = (e, a) => {
|
|
|
1806
1806
|
const n = e.value, i = r.target;
|
|
1807
1807
|
!n || !i || !(i instanceof Node) || n.contains(i) || a(r);
|
|
1808
1808
|
};
|
|
1809
|
-
|
|
1809
|
+
Ye(() => {
|
|
1810
1810
|
document.addEventListener("click", t, !0);
|
|
1811
|
-
}),
|
|
1811
|
+
}), Te(() => {
|
|
1812
1812
|
document.removeEventListener("click", t, !0);
|
|
1813
1813
|
});
|
|
1814
1814
|
}, Fr = 80, ht = /* @__PURE__ */ Q({
|
|
@@ -1831,19 +1831,24 @@ const _r = (e, a) => {
|
|
|
1831
1831
|
},
|
|
1832
1832
|
emits: ["visible-change", "click-outside", "scroll"],
|
|
1833
1833
|
setup(e, { expose: a, emit: t }) {
|
|
1834
|
-
const r = F(!1), n = e, i =
|
|
1835
|
-
let
|
|
1836
|
-
const
|
|
1837
|
-
const
|
|
1838
|
-
return
|
|
1839
|
-
}),
|
|
1840
|
-
const
|
|
1841
|
-
if (D != null && D !== "" && (
|
|
1834
|
+
const r = F(!1), n = e, i = p(() => n.preserveContentMount || r.value), s = p(() => !n.preserveContentMount || r.value), o = t, l = F(null), d = F(), c = F();
|
|
1835
|
+
let b = null, $ = Pe({}), h = Pe({}), x = Pe({});
|
|
1836
|
+
const C = (O) => typeof O == "number" ? `${O}px` : O, V = p(() => {
|
|
1837
|
+
const O = n.maxPopperHeight;
|
|
1838
|
+
return O != null && O !== "";
|
|
1839
|
+
}), k = p(() => {
|
|
1840
|
+
const O = {}, D = n.popperWidth;
|
|
1841
|
+
if (D != null && D !== "" && (O.width = C(D)), V.value) {
|
|
1842
1842
|
const X = n.maxPopperHeight;
|
|
1843
|
-
|
|
1843
|
+
O.maxHeight = C(X), O.overflowY = "auto", O.scrollbarWidth = "none", O.msOverflowStyle = "none";
|
|
1844
1844
|
}
|
|
1845
|
-
return
|
|
1846
|
-
}),
|
|
1845
|
+
return O.padding = C(n.padding), O;
|
|
1846
|
+
}), S = () => {
|
|
1847
|
+
const O = d.value;
|
|
1848
|
+
if (!O) return null;
|
|
1849
|
+
const D = O.firstElementChild;
|
|
1850
|
+
return D instanceof HTMLElement ? D : O;
|
|
1851
|
+
}, A = p(() => ({
|
|
1847
1852
|
placement: n.placement,
|
|
1848
1853
|
modifiers: [
|
|
1849
1854
|
{
|
|
@@ -1854,102 +1859,105 @@ const _r = (e, a) => {
|
|
|
1854
1859
|
}
|
|
1855
1860
|
],
|
|
1856
1861
|
...n.popoverOptions
|
|
1857
|
-
})),
|
|
1862
|
+
})), T = () => {
|
|
1858
1863
|
n.disabled || (r.value = !0, o("visible-change", !0));
|
|
1859
|
-
},
|
|
1864
|
+
}, E = () => {
|
|
1860
1865
|
r.value = !1, o("visible-change", !1);
|
|
1861
|
-
},
|
|
1862
|
-
n.disabled || (
|
|
1863
|
-
},
|
|
1864
|
-
|
|
1866
|
+
}, v = gt(T, n.openDelay), B = gt(E, n.closeDelay), R = () => {
|
|
1867
|
+
n.disabled || (B.cancel(), v());
|
|
1868
|
+
}, W = () => {
|
|
1869
|
+
v.cancel(), B();
|
|
1865
1870
|
};
|
|
1866
|
-
_r(
|
|
1867
|
-
const D =
|
|
1868
|
-
D instanceof Node && c.value?.contains(D) || (n.trigger === "click" && r.value && !n.manual &&
|
|
1871
|
+
_r(l, (O) => {
|
|
1872
|
+
const D = O.target;
|
|
1873
|
+
D instanceof Node && c.value?.contains(D) || (n.trigger === "click" && r.value && !n.manual && W(), r.value && o("click-outside", !0));
|
|
1869
1874
|
});
|
|
1870
1875
|
const N = () => {
|
|
1871
|
-
n.disabled || (r.value ?
|
|
1872
|
-
},
|
|
1873
|
-
|
|
1876
|
+
n.disabled || (r.value ? W() : R());
|
|
1877
|
+
}, M = () => {
|
|
1878
|
+
x = {}, n.trigger === "hover" ? (h.mouseenter = R, $.mouseleave = W, n.teleport && (x.mouseenter = R, x.mouseleave = W)) : n.trigger === "click" && (h.click = N);
|
|
1874
1879
|
};
|
|
1875
1880
|
J(
|
|
1876
1881
|
() => r.value,
|
|
1877
|
-
(
|
|
1878
|
-
|
|
1882
|
+
(O) => {
|
|
1883
|
+
if (O) {
|
|
1884
|
+
const D = S();
|
|
1885
|
+
D && c.value ? b = vr(D, c.value, A.value) : b?.destroy();
|
|
1886
|
+
}
|
|
1879
1887
|
},
|
|
1880
1888
|
{ flush: "post" }
|
|
1881
1889
|
), J(
|
|
1882
1890
|
() => n.manual,
|
|
1883
|
-
(
|
|
1884
|
-
|
|
1891
|
+
(O) => {
|
|
1892
|
+
O ? (h = {}, $ = {}, x = {}) : M();
|
|
1885
1893
|
}
|
|
1886
1894
|
), J(
|
|
1887
1895
|
() => n.trigger,
|
|
1888
|
-
(
|
|
1889
|
-
|
|
1896
|
+
(O, D) => {
|
|
1897
|
+
O !== D && (h = {}, $ = {}, x = {}, M());
|
|
1890
1898
|
}
|
|
1891
1899
|
), J(
|
|
1892
1900
|
() => n.teleport,
|
|
1893
1901
|
() => {
|
|
1894
|
-
n.manual ||
|
|
1902
|
+
n.manual || M();
|
|
1895
1903
|
}
|
|
1896
1904
|
), J(
|
|
1897
1905
|
() => n.disabled,
|
|
1898
|
-
(
|
|
1899
|
-
|
|
1906
|
+
(O) => {
|
|
1907
|
+
O && W();
|
|
1900
1908
|
}
|
|
1901
|
-
),
|
|
1902
|
-
n.manual ||
|
|
1909
|
+
), Ye(() => {
|
|
1910
|
+
n.manual || M();
|
|
1903
1911
|
});
|
|
1904
|
-
const
|
|
1905
|
-
const D =
|
|
1912
|
+
const U = Ir((O) => {
|
|
1913
|
+
const D = O.target;
|
|
1906
1914
|
o("scroll", { scrollTop: D.scrollTop, scrollLeft: D.scrollLeft });
|
|
1907
1915
|
}, Fr);
|
|
1908
|
-
return
|
|
1909
|
-
|
|
1916
|
+
return Te(() => {
|
|
1917
|
+
U.cancel(), b?.destroy();
|
|
1910
1918
|
}), a({
|
|
1911
1919
|
isOpen: r,
|
|
1912
|
-
open:
|
|
1913
|
-
close:
|
|
1914
|
-
}), (
|
|
1920
|
+
open: R,
|
|
1921
|
+
close: W
|
|
1922
|
+
}), (O, D) => (f(), w("div", Oe({
|
|
1915
1923
|
class: "cregis-popover",
|
|
1916
1924
|
ref_key: "popoverRef",
|
|
1917
|
-
ref:
|
|
1918
|
-
}, st(
|
|
1919
|
-
|
|
1925
|
+
ref: l
|
|
1926
|
+
}, st(te($), !0)), [
|
|
1927
|
+
P("div", Oe({
|
|
1920
1928
|
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
1921
1929
|
ref_key: "popoverTriggerRef",
|
|
1922
1930
|
ref: d
|
|
1923
|
-
}, st(
|
|
1924
|
-
|
|
1931
|
+
}, st(te(h), !0)), [
|
|
1932
|
+
Y(O.$slots, "reference")
|
|
1925
1933
|
], 16),
|
|
1926
|
-
(
|
|
1934
|
+
(f(), ve(ea, {
|
|
1927
1935
|
to: "body",
|
|
1928
1936
|
disabled: !e.teleport
|
|
1929
1937
|
}, [
|
|
1930
|
-
|
|
1931
|
-
default:
|
|
1932
|
-
i.value ?
|
|
1938
|
+
G(nt, { name: "fade" }, {
|
|
1939
|
+
default: ae(() => [
|
|
1940
|
+
i.value ? He((f(), w("div", Oe({
|
|
1933
1941
|
key: 0,
|
|
1934
1942
|
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": V.value }],
|
|
1935
1943
|
ref_key: "popoverContentRef",
|
|
1936
1944
|
ref: c,
|
|
1937
|
-
style:
|
|
1938
|
-
}, st(
|
|
1945
|
+
style: k.value
|
|
1946
|
+
}, st(te(x), !0), {
|
|
1939
1947
|
onScroll: D[0] || (D[0] = //@ts-ignore
|
|
1940
|
-
(...X) =>
|
|
1948
|
+
(...X) => te(U) && te(U)(...X))
|
|
1941
1949
|
}), [
|
|
1942
|
-
|
|
1950
|
+
Y(O.$slots, "default")
|
|
1943
1951
|
], 16)), [
|
|
1944
|
-
[
|
|
1945
|
-
]) :
|
|
1952
|
+
[xt, s.value]
|
|
1953
|
+
]) : _("", !0)
|
|
1946
1954
|
]),
|
|
1947
1955
|
_: 3
|
|
1948
1956
|
})
|
|
1949
1957
|
], 8, ["disabled"]))
|
|
1950
1958
|
], 16));
|
|
1951
1959
|
}
|
|
1952
|
-
}),
|
|
1960
|
+
}), ha = Symbol("CregisSelect"), Hr = { class: "cregis-select__selected" }, Ur = {
|
|
1953
1961
|
key: 0,
|
|
1954
1962
|
class: "cregis-select__count"
|
|
1955
1963
|
}, qr = {
|
|
@@ -1961,7 +1969,7 @@ const _r = (e, a) => {
|
|
|
1961
1969
|
}, Xr = {
|
|
1962
1970
|
key: 2,
|
|
1963
1971
|
class: "cregis-select__dropdown-filter-empty"
|
|
1964
|
-
}, Kr = { class: "cregis-select__dropdown-content" },
|
|
1972
|
+
}, Kr = { class: "cregis-select__dropdown-content" }, Pi = /* @__PURE__ */ Q({
|
|
1965
1973
|
name: "Select",
|
|
1966
1974
|
__name: "Select",
|
|
1967
1975
|
props: {
|
|
@@ -1983,164 +1991,193 @@ const _r = (e, a) => {
|
|
|
1983
1991
|
},
|
|
1984
1992
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
1985
1993
|
setup(e, { emit: a }) {
|
|
1986
|
-
const t = e, r = a, n = F(null), i = F(!1);
|
|
1987
|
-
let l = null;
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
},
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1994
|
+
const t = e, r = a, n = F(null), i = F(null), s = F(!1), o = F();
|
|
1995
|
+
let l = null, d = null;
|
|
1996
|
+
const c = () => {
|
|
1997
|
+
d !== null && (clearTimeout(d), d = null);
|
|
1998
|
+
}, b = (m) => typeof m == "string" && m.trim().endsWith("%"), $ = () => {
|
|
1999
|
+
if (!b(t.triggerWidth) || t.popperWidth) return;
|
|
2000
|
+
const m = i.value;
|
|
2001
|
+
m && (o.value = m.offsetWidth + 8);
|
|
2002
|
+
}, h = async (m) => {
|
|
2003
|
+
s.value = m, r("visible-change", m), m && b(t.triggerWidth) && (await Ce(), $()), !m && t.filterable && (N.value = "", M.value = "", c());
|
|
2004
|
+
}, x = (m) => typeof m == "number" ? `n:${m}` : `s:${m}`, C = Pe({}), V = Pe({}), k = F(0), S = F(null), A = (m, K, Z) => {
|
|
2005
|
+
const fe = x(m);
|
|
2006
|
+
return k.value++, C[fe] = K, V[fe] = Z ?? K, () => {
|
|
2007
|
+
k.value--, delete C[fe], delete V[fe];
|
|
1996
2008
|
};
|
|
1997
|
-
},
|
|
2009
|
+
}, T = p(() => k.value === 0);
|
|
1998
2010
|
J(
|
|
1999
2011
|
() => t.modelValue,
|
|
2000
|
-
(
|
|
2012
|
+
(m) => {
|
|
2001
2013
|
if (!t.multiple) {
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
2014
|
+
if (m == null || m === "") {
|
|
2015
|
+
S.value = null;
|
|
2004
2016
|
return;
|
|
2005
2017
|
}
|
|
2006
|
-
|
|
2018
|
+
S.value && S.value.value !== m && (S.value = null);
|
|
2007
2019
|
}
|
|
2008
2020
|
}
|
|
2009
2021
|
);
|
|
2010
|
-
const
|
|
2022
|
+
const E = p(() => {
|
|
2011
2023
|
if (t.multiple)
|
|
2012
2024
|
return Array.isArray(t.modelValue) && t.modelValue.length > 0;
|
|
2013
|
-
const
|
|
2014
|
-
return
|
|
2015
|
-
}),
|
|
2016
|
-
if (!
|
|
2025
|
+
const m = t.modelValue;
|
|
2026
|
+
return m != null && m !== "";
|
|
2027
|
+
}), v = p(() => !t.multiple || !Array.isArray(t.modelValue) ? 0 : t.modelValue.length), B = p(() => {
|
|
2028
|
+
if (!E.value) return "";
|
|
2017
2029
|
if (t.multiple)
|
|
2018
|
-
return t.modelValue.map((
|
|
2019
|
-
const
|
|
2020
|
-
return
|
|
2021
|
-
}), R = (
|
|
2030
|
+
return t.modelValue.map((Z) => C[x(Z)] ?? String(Z)).join("、");
|
|
2031
|
+
const m = t.modelValue;
|
|
2032
|
+
return S.value?.value === m ? S.value.label : C[x(m)] ?? String(m);
|
|
2033
|
+
}), R = (m) => t.multiple ? Array.isArray(t.modelValue) && t.modelValue.includes(m) : t.modelValue === m, W = (m, K) => {
|
|
2022
2034
|
if (!t.disabled) {
|
|
2023
2035
|
if (t.multiple) {
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2036
|
+
const Z = Array.isArray(t.modelValue) ? [...t.modelValue] : [], fe = Z.indexOf(m);
|
|
2037
|
+
fe >= 0 ? Z.splice(fe, 1) : Z.push(m), r("update:modelValue", Z), r("change", Z);
|
|
2026
2038
|
return;
|
|
2027
2039
|
}
|
|
2028
|
-
|
|
2040
|
+
S.value = { value: m, label: K }, r("update:modelValue", m), r("change", m), n.value?.close();
|
|
2029
2041
|
}
|
|
2030
|
-
},
|
|
2031
|
-
const
|
|
2032
|
-
return !t.filterable || !
|
|
2033
|
-
}),
|
|
2034
|
-
() => t.filterable && !!
|
|
2035
|
-
),
|
|
2036
|
-
t.filterable && (
|
|
2037
|
-
|
|
2042
|
+
}, N = F(""), M = F(""), U = p(() => M.value.trim().toLowerCase()), O = p(() => {
|
|
2043
|
+
const m = U.value;
|
|
2044
|
+
return !t.filterable || !m ? !0 : Object.keys(C).some((K) => (V[K] ?? C[K] ?? "").toLowerCase().includes(m));
|
|
2045
|
+
}), D = p(
|
|
2046
|
+
() => t.filterable && !!U.value && !O.value && !T.value
|
|
2047
|
+
), X = () => {
|
|
2048
|
+
t.filterable && (c(), d = setTimeout(() => {
|
|
2049
|
+
M.value = N.value.trim(), d = null;
|
|
2038
2050
|
}, t.filterDebounceMs));
|
|
2039
2051
|
};
|
|
2040
|
-
J(
|
|
2041
|
-
t.filterable &&
|
|
2052
|
+
J(N, () => {
|
|
2053
|
+
t.filterable && X();
|
|
2042
2054
|
}), J(
|
|
2043
2055
|
() => t.filterable,
|
|
2044
|
-
(
|
|
2045
|
-
|
|
2056
|
+
(m) => {
|
|
2057
|
+
m || (N.value = "", M.value = "", c());
|
|
2046
2058
|
}
|
|
2047
|
-
)
|
|
2048
|
-
const
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2059
|
+
);
|
|
2060
|
+
const u = () => {
|
|
2061
|
+
l?.disconnect(), l = null, !(!b(t.triggerWidth) || !i.value) && (l = new ResizeObserver(() => {
|
|
2062
|
+
$();
|
|
2063
|
+
}), l.observe(i.value));
|
|
2052
2064
|
};
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2065
|
+
J(
|
|
2066
|
+
() => t.triggerWidth,
|
|
2067
|
+
() => {
|
|
2068
|
+
b(t.triggerWidth) ? Ce(() => {
|
|
2069
|
+
$(), u();
|
|
2070
|
+
}) : (o.value = void 0, l?.disconnect(), l = null);
|
|
2071
|
+
}
|
|
2072
|
+
), Ye(() => {
|
|
2073
|
+
b(t.triggerWidth) && Ce(() => {
|
|
2074
|
+
$(), u();
|
|
2075
|
+
});
|
|
2076
|
+
}), Te(() => {
|
|
2077
|
+
c(), l?.disconnect();
|
|
2078
|
+
});
|
|
2079
|
+
const y = (m) => {
|
|
2080
|
+
r("filter-input", String(m ?? ""));
|
|
2081
|
+
}, z = () => {
|
|
2082
|
+
M.value = "", c(), r("filter-clear");
|
|
2083
|
+
};
|
|
2084
|
+
Qt(ha, {
|
|
2085
|
+
modelValue: p(() => t.modelValue),
|
|
2086
|
+
multiple: p(() => !!t.multiple),
|
|
2087
|
+
disabled: p(() => !!t.disabled),
|
|
2088
|
+
selectOption: W,
|
|
2058
2089
|
isOptionSelected: R,
|
|
2059
|
-
registerOption:
|
|
2060
|
-
filterQuery:
|
|
2090
|
+
registerOption: A,
|
|
2091
|
+
filterQuery: U
|
|
2061
2092
|
});
|
|
2062
|
-
const
|
|
2063
|
-
if (t.popperWidth) return
|
|
2064
|
-
const
|
|
2065
|
-
return typeof
|
|
2066
|
-
}),
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2093
|
+
const q = (m) => typeof m == "number" ? `${m}px` : m, re = p(() => {
|
|
2094
|
+
if (t.popperWidth) return q(t.popperWidth);
|
|
2095
|
+
const m = t.triggerWidth;
|
|
2096
|
+
return b(m) ? o.value : typeof m == "number" ? m + 8 : `calc(${m} + 8px)`;
|
|
2097
|
+
}), ne = p(() => {
|
|
2098
|
+
const m = re.value;
|
|
2099
|
+
if (!(m == null || m === ""))
|
|
2100
|
+
return typeof m == "number" ? `${m - 12}px` : `calc(${m} - 12px)`;
|
|
2101
|
+
}), ee = p(() => t.align === "center" ? "bottom" : t.align === "left" ? "bottom-start" : "bottom-end"), le = p(() => ({
|
|
2102
|
+
width: q(t.triggerWidth)
|
|
2103
|
+
})), ye = p(() => t.size === "large" ? "20px" : t.size === "medium" ? "14px" : "12px"), ue = F(0), ke = (m) => {
|
|
2104
|
+
ue.value = m.scrollTop;
|
|
2070
2105
|
};
|
|
2071
|
-
return (
|
|
2072
|
-
class:
|
|
2106
|
+
return (m, K) => (f(), w("div", {
|
|
2107
|
+
class: j(["cregis-select", { "is-disabled": e.disabled, "is-percent-width": b(e.triggerWidth) }])
|
|
2073
2108
|
}, [
|
|
2074
|
-
|
|
2109
|
+
G(ht, {
|
|
2075
2110
|
ref_key: "popoverRef",
|
|
2076
2111
|
ref: n,
|
|
2077
2112
|
"preserve-content-mount": "",
|
|
2078
|
-
"popper-width":
|
|
2079
|
-
placement:
|
|
2113
|
+
"popper-width": re.value,
|
|
2114
|
+
placement: ee.value,
|
|
2080
2115
|
disabled: !!e.disabled,
|
|
2081
2116
|
padding: 0,
|
|
2082
2117
|
"max-popper-height": e.maxPopperHeight,
|
|
2083
|
-
onVisibleChange:
|
|
2084
|
-
onScroll:
|
|
2118
|
+
onVisibleChange: h,
|
|
2119
|
+
onScroll: ke
|
|
2085
2120
|
}, {
|
|
2086
|
-
reference:
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2121
|
+
reference: ae(() => [
|
|
2122
|
+
P("div", {
|
|
2123
|
+
ref_key: "triggerRef",
|
|
2124
|
+
ref: i,
|
|
2125
|
+
class: j(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
2126
|
+
style: ie(le.value)
|
|
2090
2127
|
}, [
|
|
2091
|
-
|
|
2092
|
-
class:
|
|
2128
|
+
P("div", {
|
|
2129
|
+
class: j(["cregis-select__trigger-label", { "is-multiple": e.multiple }])
|
|
2093
2130
|
}, [
|
|
2094
|
-
|
|
2131
|
+
E.value ? Y(m.$slots, "label", {
|
|
2095
2132
|
key: 0,
|
|
2096
2133
|
modelValue: e.modelValue,
|
|
2097
2134
|
displayText: B.value,
|
|
2098
|
-
selectedCount:
|
|
2135
|
+
selectedCount: v.value,
|
|
2099
2136
|
placeholder: e.placeholder,
|
|
2100
|
-
hasSelection:
|
|
2137
|
+
hasSelection: E.value
|
|
2101
2138
|
}, () => [
|
|
2102
|
-
|
|
2103
|
-
e.multiple ? (
|
|
2104
|
-
]) : (
|
|
2139
|
+
P("p", Hr, I(B.value), 1),
|
|
2140
|
+
e.multiple ? (f(), w("span", Ur, I(v.value), 1)) : _("", !0)
|
|
2141
|
+
]) : (f(), w("p", qr, I(e.placeholder), 1))
|
|
2105
2142
|
], 2),
|
|
2106
|
-
|
|
2107
|
-
class:
|
|
2143
|
+
P("span", {
|
|
2144
|
+
class: j(["cregis-select__icon", { "is-open": s.value }])
|
|
2108
2145
|
}, [
|
|
2109
|
-
|
|
2110
|
-
size:
|
|
2146
|
+
G(te(na), {
|
|
2147
|
+
size: ye.value,
|
|
2111
2148
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2112
2149
|
}, null, 8, ["size", "color"])
|
|
2113
2150
|
], 2)
|
|
2114
2151
|
], 6)
|
|
2115
2152
|
]),
|
|
2116
|
-
default:
|
|
2117
|
-
|
|
2118
|
-
class:
|
|
2153
|
+
default: ae(() => [
|
|
2154
|
+
P("div", {
|
|
2155
|
+
class: j(["cregis-select__dropdown", { "is-empty": T.value }])
|
|
2119
2156
|
}, [
|
|
2120
|
-
|
|
2121
|
-
e.filterable && !
|
|
2157
|
+
T.value ? (f(), w("p", Yr, I(e.noDataText), 1)) : _("", !0),
|
|
2158
|
+
e.filterable && !T.value ? (f(), w("div", {
|
|
2122
2159
|
key: 1,
|
|
2123
|
-
class:
|
|
2160
|
+
class: j(["cregis-select__dropdown-filter", { "backdrop-fixed-header": ue.value > 10 }])
|
|
2124
2161
|
}, [
|
|
2125
|
-
|
|
2126
|
-
modelValue:
|
|
2127
|
-
"onUpdate:modelValue":
|
|
2162
|
+
G(ra, {
|
|
2163
|
+
modelValue: N.value,
|
|
2164
|
+
"onUpdate:modelValue": K[0] || (K[0] = (Z) => N.value = Z),
|
|
2128
2165
|
placeholder: e.searchText,
|
|
2129
|
-
width:
|
|
2166
|
+
width: ne.value,
|
|
2130
2167
|
size: "small",
|
|
2131
2168
|
clearable: "",
|
|
2132
|
-
onInput:
|
|
2133
|
-
onClear:
|
|
2169
|
+
onInput: y,
|
|
2170
|
+
onClear: z
|
|
2134
2171
|
}, {
|
|
2135
|
-
prefix:
|
|
2136
|
-
|
|
2172
|
+
prefix: ae(() => [
|
|
2173
|
+
G(te(aa), { size: "14px" })
|
|
2137
2174
|
]),
|
|
2138
2175
|
_: 1
|
|
2139
2176
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2140
|
-
], 2)) :
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2177
|
+
], 2)) : _("", !0),
|
|
2178
|
+
D.value ? (f(), w("p", Xr, I(e.noMatchText), 1)) : _("", !0),
|
|
2179
|
+
P("div", Kr, [
|
|
2180
|
+
Y(m.$slots, "default")
|
|
2144
2181
|
])
|
|
2145
2182
|
], 2)
|
|
2146
2183
|
]),
|
|
@@ -2151,7 +2188,7 @@ const _r = (e, a) => {
|
|
|
2151
2188
|
}), Gr = ["aria-selected"], Qr = {
|
|
2152
2189
|
key: 1,
|
|
2153
2190
|
class: "cregis-select__option-content"
|
|
2154
|
-
},
|
|
2191
|
+
}, zi = /* @__PURE__ */ Q({
|
|
2155
2192
|
name: "Option",
|
|
2156
2193
|
__name: "Option",
|
|
2157
2194
|
props: {
|
|
@@ -2161,58 +2198,58 @@ const _r = (e, a) => {
|
|
|
2161
2198
|
filterText: {}
|
|
2162
2199
|
},
|
|
2163
2200
|
setup(e) {
|
|
2164
|
-
const a = e, t = Zt(
|
|
2201
|
+
const a = e, t = Zt(ha, null);
|
|
2165
2202
|
let r;
|
|
2166
2203
|
const n = () => a.filterText ?? a.label, i = () => {
|
|
2167
2204
|
r?.(), t && (r = t.registerOption(a.value, a.label, n()));
|
|
2168
2205
|
};
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2206
|
+
Ye(i), Te(() => r?.()), J(() => [a.value, a.label, a.filterText], i);
|
|
2207
|
+
const s = p(() => t?.multiple.value ?? !1), o = p(() => t?.isOptionSelected(a.value) ?? !1), l = () => {
|
|
2171
2208
|
a.disabled || t?.disabled.value || t?.selectOption(a.value, a.label);
|
|
2172
2209
|
}, d = () => {
|
|
2173
|
-
|
|
2174
|
-
}, c =
|
|
2210
|
+
l();
|
|
2211
|
+
}, c = p(() => t?.filterQuery?.value ?? ""), b = p(() => {
|
|
2175
2212
|
const $ = c.value;
|
|
2176
2213
|
return $ ? n().toLowerCase().includes($) : !0;
|
|
2177
2214
|
});
|
|
2178
|
-
return ($,
|
|
2179
|
-
class:
|
|
2180
|
-
"is-selected": o.value && !
|
|
2215
|
+
return ($, h) => He((f(), w("div", {
|
|
2216
|
+
class: j(["cregis-select__option", {
|
|
2217
|
+
"is-selected": o.value && !s.value,
|
|
2181
2218
|
"is-disabled": e.disabled,
|
|
2182
|
-
"cregis-select__option--multiple":
|
|
2219
|
+
"cregis-select__option--multiple": s.value
|
|
2183
2220
|
}]),
|
|
2184
2221
|
role: "option",
|
|
2185
2222
|
"aria-selected": o.value,
|
|
2186
|
-
onClick:
|
|
2223
|
+
onClick: l
|
|
2187
2224
|
}, [
|
|
2188
|
-
|
|
2225
|
+
s.value ? (f(), ve(Ua, {
|
|
2189
2226
|
key: 0,
|
|
2190
2227
|
"model-value": o.value,
|
|
2191
|
-
disabled: e.disabled || !!
|
|
2192
|
-
onClick:
|
|
2228
|
+
disabled: e.disabled || !!te(t)?.disabled.value,
|
|
2229
|
+
onClick: h[0] || (h[0] = yt(() => {
|
|
2193
2230
|
}, ["stop"])),
|
|
2194
2231
|
"onUpdate:modelValue": d
|
|
2195
|
-
}, null, 8, ["model-value", "disabled"])) :
|
|
2196
|
-
|
|
2197
|
-
|
|
2232
|
+
}, null, 8, ["model-value", "disabled"])) : _("", !0),
|
|
2233
|
+
s.value ? (f(), w("div", Qr, [
|
|
2234
|
+
Y($.$slots, "default", {
|
|
2198
2235
|
label: e.label,
|
|
2199
2236
|
value: e.value,
|
|
2200
2237
|
disabled: !!e.disabled,
|
|
2201
2238
|
selected: o.value
|
|
2202
2239
|
}, () => [
|
|
2203
|
-
|
|
2240
|
+
be(I(e.label), 1)
|
|
2204
2241
|
])
|
|
2205
|
-
])) :
|
|
2242
|
+
])) : Y($.$slots, "default", {
|
|
2206
2243
|
key: 2,
|
|
2207
2244
|
label: e.label,
|
|
2208
2245
|
value: e.value,
|
|
2209
2246
|
disabled: !!e.disabled,
|
|
2210
2247
|
selected: o.value
|
|
2211
2248
|
}, () => [
|
|
2212
|
-
|
|
2249
|
+
be(I(e.label), 1)
|
|
2213
2250
|
])
|
|
2214
2251
|
], 10, Gr)), [
|
|
2215
|
-
[
|
|
2252
|
+
[xt, b.value]
|
|
2216
2253
|
]);
|
|
2217
2254
|
}
|
|
2218
2255
|
}), Zr = { class: "cregis-cascader__trigger-label" }, Jr = { class: "cregis-cascader__selected" }, ei = {
|
|
@@ -2230,7 +2267,7 @@ const _r = (e, a) => {
|
|
|
2230
2267
|
}, ii = { class: "cregis-cascader__suboption-amount-container" }, oi = {
|
|
2231
2268
|
key: 0,
|
|
2232
2269
|
class: "cregis-cascader__suboption-amount"
|
|
2233
|
-
}, li = { class: "cregis-cascader__suboption-panel" }, si = ["onClick"], ci = ["onClick"],
|
|
2270
|
+
}, li = { class: "cregis-cascader__suboption-panel" }, si = ["onClick"], ci = ["onClick"], Ai = /* @__PURE__ */ Q({
|
|
2234
2271
|
name: "Cascader",
|
|
2235
2272
|
__name: "Cascader",
|
|
2236
2273
|
props: {
|
|
@@ -2256,53 +2293,53 @@ const _r = (e, a) => {
|
|
|
2256
2293
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2257
2294
|
setup(e, { emit: a }) {
|
|
2258
2295
|
const t = e, r = a, n = F(null), i = F(!1);
|
|
2259
|
-
let
|
|
2296
|
+
let s = null;
|
|
2260
2297
|
const o = () => {
|
|
2261
|
-
|
|
2262
|
-
},
|
|
2263
|
-
t.filterable && (o(),
|
|
2264
|
-
d.value =
|
|
2298
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2299
|
+
}, l = F(""), d = F(""), c = p(() => d.value.trim().toLowerCase()), b = () => {
|
|
2300
|
+
t.filterable && (o(), s = setTimeout(() => {
|
|
2301
|
+
d.value = l.value.trim(), s = null;
|
|
2265
2302
|
}, t.filterDebounceMs));
|
|
2266
2303
|
};
|
|
2267
|
-
J(
|
|
2268
|
-
t.filterable &&
|
|
2304
|
+
J(l, () => {
|
|
2305
|
+
t.filterable && b();
|
|
2269
2306
|
}), J(
|
|
2270
2307
|
() => t.filterable,
|
|
2271
2308
|
(g) => {
|
|
2272
|
-
g || (
|
|
2309
|
+
g || (l.value = "", d.value = "", o());
|
|
2273
2310
|
}
|
|
2274
|
-
),
|
|
2311
|
+
), Te(() => o());
|
|
2275
2312
|
const $ = (g) => {
|
|
2276
2313
|
r("filter-input", String(g ?? ""));
|
|
2277
|
-
},
|
|
2314
|
+
}, h = () => {
|
|
2278
2315
|
d.value = "", o(), r("filter-clear");
|
|
2279
|
-
},
|
|
2280
|
-
const
|
|
2281
|
-
return !
|
|
2282
|
-
}, V = (g,
|
|
2316
|
+
}, x = (g) => (g.filterText ?? g.label).toLowerCase(), C = (g) => {
|
|
2317
|
+
const H = c.value;
|
|
2318
|
+
return !H || x(g).includes(H) ? !0 : (g.children ?? []).some((pe) => x(pe).includes(H));
|
|
2319
|
+
}, V = (g, H) => {
|
|
2283
2320
|
const L = c.value;
|
|
2284
|
-
return !L ||
|
|
2285
|
-
},
|
|
2286
|
-
() => t.filterable && !!d.value.trim() && !
|
|
2321
|
+
return !L || x(g).includes(L) ? !0 : x(H).includes(L);
|
|
2322
|
+
}, k = p(() => t.options.filter((g) => C(g))), S = p(() => t.options.length === 0), A = p(() => (c.value, t.options.some((g) => C(g)))), T = p(
|
|
2323
|
+
() => t.filterable && !!d.value.trim() && !A.value && !S.value
|
|
2287
2324
|
), E = (g) => {
|
|
2288
|
-
i.value = g, r("visible-change", g), !g && t.filterable && (
|
|
2289
|
-
},
|
|
2290
|
-
const
|
|
2291
|
-
if (
|
|
2325
|
+
i.value = g, r("visible-change", g), !g && t.filterable && (l.value = "", d.value = "", o());
|
|
2326
|
+
}, v = F(null), B = (g) => {
|
|
2327
|
+
const H = t.options.find((L) => L.value === g);
|
|
2328
|
+
if (H)
|
|
2292
2329
|
return {
|
|
2293
2330
|
level: 1,
|
|
2294
|
-
label:
|
|
2295
|
-
primary:
|
|
2331
|
+
label: H.label,
|
|
2332
|
+
primary: H,
|
|
2296
2333
|
sub: void 0
|
|
2297
2334
|
};
|
|
2298
2335
|
for (const L of t.options) {
|
|
2299
|
-
const
|
|
2300
|
-
if (
|
|
2336
|
+
const pe = L.children?.find((oe) => oe.value === g);
|
|
2337
|
+
if (pe)
|
|
2301
2338
|
return {
|
|
2302
2339
|
level: 2,
|
|
2303
|
-
label:
|
|
2340
|
+
label: pe.label,
|
|
2304
2341
|
primary: L,
|
|
2305
|
-
sub:
|
|
2342
|
+
sub: pe
|
|
2306
2343
|
};
|
|
2307
2344
|
}
|
|
2308
2345
|
return {
|
|
@@ -2311,230 +2348,230 @@ const _r = (e, a) => {
|
|
|
2311
2348
|
primary: void 0,
|
|
2312
2349
|
sub: void 0
|
|
2313
2350
|
};
|
|
2314
|
-
},
|
|
2351
|
+
}, R = p(() => {
|
|
2315
2352
|
const g = t.modelValue;
|
|
2316
2353
|
return g == null || g === "" ? {
|
|
2317
2354
|
level: 0,
|
|
2318
2355
|
label: "",
|
|
2319
2356
|
primary: void 0,
|
|
2320
2357
|
sub: void 0
|
|
2321
|
-
} :
|
|
2322
|
-
level:
|
|
2323
|
-
label:
|
|
2324
|
-
primary:
|
|
2325
|
-
sub:
|
|
2326
|
-
} :
|
|
2358
|
+
} : v.value !== null && v.value.value === g ? {
|
|
2359
|
+
level: v.value.level,
|
|
2360
|
+
label: v.value.label,
|
|
2361
|
+
primary: v.value.primary,
|
|
2362
|
+
sub: v.value.sub
|
|
2363
|
+
} : B(g);
|
|
2327
2364
|
});
|
|
2328
2365
|
J(
|
|
2329
2366
|
() => t.modelValue,
|
|
2330
2367
|
(g) => {
|
|
2331
2368
|
if (g == null || g === "") {
|
|
2332
|
-
|
|
2369
|
+
v.value = null;
|
|
2333
2370
|
return;
|
|
2334
2371
|
}
|
|
2335
|
-
|
|
2372
|
+
v.value !== null && v.value.value !== g && (v.value = null);
|
|
2336
2373
|
}
|
|
2337
2374
|
);
|
|
2338
|
-
const
|
|
2339
|
-
const
|
|
2340
|
-
return
|
|
2341
|
-
}, q = (g,
|
|
2342
|
-
t.disabled || g.disabled ||
|
|
2375
|
+
const W = p(() => R.value.level > 0), N = p(() => R.value.label), M = p(() => t.modelValue), U = p(() => N.value), O = p(() => R.value.level), D = p(() => R.value.primary), X = p(() => R.value.sub), u = (g) => (g.children?.length ?? 0) > 0, y = (g) => t.modelValue === g, z = (g) => {
|
|
2376
|
+
const H = t.modelValue;
|
|
2377
|
+
return H == null || H === "" ? !1 : (g.children ?? []).some((L) => L.value === H);
|
|
2378
|
+
}, q = (g, H) => {
|
|
2379
|
+
t.disabled || g.disabled || H.disabled || (v.value = { value: H.value, label: H.label, level: 2, primary: g, sub: H }, r("update:modelValue", H.value), r("change", H.value), n.value?.close());
|
|
2343
2380
|
}, re = (g) => {
|
|
2344
|
-
t.disabled || g.disabled || u(g) || (
|
|
2345
|
-
},
|
|
2381
|
+
t.disabled || g.disabled || u(g) || (v.value = { value: g.value, label: g.label, level: 1, primary: g }, r("update:modelValue", g.value), r("change", g.value), n.value?.close());
|
|
2382
|
+
}, ne = (g) => typeof g == "number" ? `${g}px` : g, ee = p(() => {
|
|
2346
2383
|
if (t.popperWidth !== void 0 && t.popperWidth !== null && t.popperWidth !== "")
|
|
2347
|
-
return
|
|
2384
|
+
return ne(t.popperWidth);
|
|
2348
2385
|
const g = t.triggerWidth;
|
|
2349
2386
|
return typeof g == "number" ? `${g + 8}px` : `calc(${g} + 8px)`;
|
|
2350
|
-
}),
|
|
2351
|
-
maxHeight:
|
|
2387
|
+
}), le = p(() => ne(t.subPopperWidth)), ye = p(() => typeof ee.value == "number" ? `${ee.value - 12}px` : `calc(${ee.value} - 12px)`), ue = p(() => ({
|
|
2388
|
+
maxHeight: ne(t.maxPopperHeight),
|
|
2352
2389
|
overflowY: "auto"
|
|
2353
|
-
})),
|
|
2354
|
-
width:
|
|
2355
|
-
})),
|
|
2356
|
-
const
|
|
2357
|
-
|
|
2390
|
+
})), ke = { strategy: "fixed" }, m = p(() => t.align === "center" ? "bottom" : t.align === "left" ? "bottom-start" : "bottom-end"), K = p(() => ({
|
|
2391
|
+
width: ne(t.triggerWidth)
|
|
2392
|
+
})), Z = p(() => t.size === "large" ? "20px" : t.size === "medium" ? "14px" : "12px"), fe = F(0), Me = (g) => {
|
|
2393
|
+
const H = g.target;
|
|
2394
|
+
fe.value = H.scrollTop;
|
|
2358
2395
|
}, it = [-16, -8];
|
|
2359
|
-
return (g,
|
|
2360
|
-
class:
|
|
2396
|
+
return (g, H) => (f(), w("div", {
|
|
2397
|
+
class: j(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2361
2398
|
}, [
|
|
2362
|
-
|
|
2399
|
+
G(ht, {
|
|
2363
2400
|
ref_key: "popoverRef",
|
|
2364
2401
|
ref: n,
|
|
2365
2402
|
"preserve-content-mount": "",
|
|
2366
|
-
"popper-width":
|
|
2367
|
-
placement:
|
|
2403
|
+
"popper-width": ee.value,
|
|
2404
|
+
placement: m.value,
|
|
2368
2405
|
offset: e.offset,
|
|
2369
2406
|
disabled: !!e.disabled,
|
|
2370
2407
|
padding: 0,
|
|
2371
2408
|
onVisibleChange: E
|
|
2372
2409
|
}, {
|
|
2373
|
-
reference:
|
|
2374
|
-
g.$slots.trigger ?
|
|
2410
|
+
reference: ae(() => [
|
|
2411
|
+
g.$slots.trigger ? Y(g.$slots, "trigger", {
|
|
2375
2412
|
key: 0,
|
|
2376
|
-
modelValue:
|
|
2377
|
-
selectedLabel:
|
|
2378
|
-
level:
|
|
2379
|
-
primaryOption:
|
|
2380
|
-
subOption:
|
|
2413
|
+
modelValue: M.value,
|
|
2414
|
+
selectedLabel: U.value,
|
|
2415
|
+
level: O.value,
|
|
2416
|
+
primaryOption: D.value,
|
|
2417
|
+
subOption: X.value,
|
|
2381
2418
|
placeholder: e.placeholder,
|
|
2382
|
-
hasSelection:
|
|
2419
|
+
hasSelection: W.value,
|
|
2383
2420
|
open: i.value,
|
|
2384
2421
|
disabled: !!e.disabled
|
|
2385
|
-
}) : (
|
|
2422
|
+
}) : (f(), w("div", {
|
|
2386
2423
|
key: 1,
|
|
2387
|
-
class:
|
|
2388
|
-
style:
|
|
2424
|
+
class: j(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2425
|
+
style: ie(K.value)
|
|
2389
2426
|
}, [
|
|
2390
|
-
|
|
2391
|
-
|
|
2427
|
+
P("div", Zr, [
|
|
2428
|
+
W.value ? Y(g.$slots, "label", {
|
|
2392
2429
|
key: 0,
|
|
2393
|
-
modelValue:
|
|
2394
|
-
selectedLabel:
|
|
2395
|
-
level:
|
|
2396
|
-
primaryOption:
|
|
2397
|
-
subOption:
|
|
2430
|
+
modelValue: M.value,
|
|
2431
|
+
selectedLabel: U.value,
|
|
2432
|
+
level: O.value,
|
|
2433
|
+
primaryOption: D.value,
|
|
2434
|
+
subOption: X.value,
|
|
2398
2435
|
placeholder: e.placeholder,
|
|
2399
|
-
hasSelection:
|
|
2436
|
+
hasSelection: W.value
|
|
2400
2437
|
}, () => [
|
|
2401
|
-
|
|
2402
|
-
]) : (
|
|
2438
|
+
P("p", Jr, I(N.value), 1)
|
|
2439
|
+
]) : (f(), w("p", ei, I(e.placeholder), 1))
|
|
2403
2440
|
]),
|
|
2404
|
-
|
|
2405
|
-
class:
|
|
2441
|
+
P("span", {
|
|
2442
|
+
class: j(["cregis-cascader__icon", { "is-open": i.value }])
|
|
2406
2443
|
}, [
|
|
2407
|
-
|
|
2408
|
-
size:
|
|
2444
|
+
G(te(na), {
|
|
2445
|
+
size: Z.value,
|
|
2409
2446
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2410
2447
|
}, null, 8, ["size", "color"])
|
|
2411
2448
|
], 2)
|
|
2412
2449
|
], 6))
|
|
2413
2450
|
]),
|
|
2414
|
-
default:
|
|
2415
|
-
|
|
2416
|
-
class:
|
|
2417
|
-
style:
|
|
2418
|
-
onScroll:
|
|
2451
|
+
default: ae(() => [
|
|
2452
|
+
P("div", {
|
|
2453
|
+
class: j(["cregis-cascader__dropdown", { "is-empty": S.value }]),
|
|
2454
|
+
style: ie(ue.value),
|
|
2455
|
+
onScroll: Me
|
|
2419
2456
|
}, [
|
|
2420
|
-
|
|
2421
|
-
e.filterable && !
|
|
2457
|
+
S.value ? (f(), w("p", ti, I(e.noDataText), 1)) : _("", !0),
|
|
2458
|
+
e.filterable && !S.value ? (f(), w("div", {
|
|
2422
2459
|
key: 1,
|
|
2423
|
-
class:
|
|
2460
|
+
class: j(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": fe.value > 10 }])
|
|
2424
2461
|
}, [
|
|
2425
|
-
|
|
2426
|
-
modelValue:
|
|
2427
|
-
"onUpdate:modelValue":
|
|
2462
|
+
G(ra, {
|
|
2463
|
+
modelValue: l.value,
|
|
2464
|
+
"onUpdate:modelValue": H[0] || (H[0] = (L) => l.value = L),
|
|
2428
2465
|
placeholder: e.searchText,
|
|
2429
|
-
width:
|
|
2466
|
+
width: ye.value,
|
|
2430
2467
|
size: "small",
|
|
2431
2468
|
clearable: "",
|
|
2432
2469
|
onInput: $,
|
|
2433
|
-
onClear:
|
|
2470
|
+
onClear: h
|
|
2434
2471
|
}, {
|
|
2435
|
-
prefix:
|
|
2436
|
-
|
|
2472
|
+
prefix: ae(() => [
|
|
2473
|
+
G(te(aa), { size: "14px" })
|
|
2437
2474
|
]),
|
|
2438
2475
|
_: 1
|
|
2439
2476
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2440
|
-
], 2)) :
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
(
|
|
2477
|
+
], 2)) : _("", !0),
|
|
2478
|
+
T.value ? (f(), w("p", ai, I(e.noMatchText), 1)) : _("", !0),
|
|
2479
|
+
P("ul", ni, [
|
|
2480
|
+
(f(!0), w(ft, null, pt(k.value, (L, pe) => (f(), w("li", {
|
|
2444
2481
|
key: L.value,
|
|
2445
|
-
class:
|
|
2482
|
+
class: j(["cregis-cascader__dropdown-item", { "is-disabled": L.disabled }])
|
|
2446
2483
|
}, [
|
|
2447
|
-
u(L) ? (
|
|
2448
|
-
|
|
2484
|
+
u(L) ? (f(), w("div", ri, [
|
|
2485
|
+
G(ht, {
|
|
2449
2486
|
trigger: "hover",
|
|
2450
2487
|
placement: "right-start",
|
|
2451
2488
|
offset: it,
|
|
2452
|
-
"popover-options":
|
|
2453
|
-
"popper-width":
|
|
2489
|
+
"popover-options": ke,
|
|
2490
|
+
"popper-width": le.value,
|
|
2454
2491
|
padding: 4,
|
|
2455
2492
|
disabled: !!L.disabled || !!e.disabled
|
|
2456
2493
|
}, {
|
|
2457
|
-
reference:
|
|
2458
|
-
|
|
2459
|
-
class:
|
|
2494
|
+
reference: ae(() => [
|
|
2495
|
+
P("div", {
|
|
2496
|
+
class: j(["cregis-cascader__suboption-trigger", {
|
|
2460
2497
|
"is-disabled": L.disabled,
|
|
2461
2498
|
"is-parent-active": z(L)
|
|
2462
2499
|
}])
|
|
2463
2500
|
}, [
|
|
2464
|
-
|
|
2465
|
-
modelValue:
|
|
2466
|
-
selectedLabel:
|
|
2467
|
-
level:
|
|
2468
|
-
primaryOption:
|
|
2469
|
-
subOption:
|
|
2501
|
+
Y(g.$slots, "option", {
|
|
2502
|
+
modelValue: M.value,
|
|
2503
|
+
selectedLabel: U.value,
|
|
2504
|
+
level: O.value,
|
|
2505
|
+
primaryOption: D.value,
|
|
2506
|
+
subOption: X.value,
|
|
2470
2507
|
option: L,
|
|
2471
|
-
index:
|
|
2508
|
+
index: pe,
|
|
2472
2509
|
disabled: !!L.disabled,
|
|
2473
|
-
selected:
|
|
2510
|
+
selected: y(L.value),
|
|
2474
2511
|
isParentOfSelected: z(L)
|
|
2475
2512
|
}, () => [
|
|
2476
|
-
|
|
2513
|
+
P("p", null, I(L.label), 1)
|
|
2477
2514
|
]),
|
|
2478
|
-
|
|
2479
|
-
e.showSubOptionAmount ? (
|
|
2480
|
-
|
|
2515
|
+
P("div", ii, [
|
|
2516
|
+
e.showSubOptionAmount ? (f(), w("div", oi, I(L.children.length), 1)) : _("", !0),
|
|
2517
|
+
G(te(Sa), {
|
|
2481
2518
|
size: "14px",
|
|
2482
2519
|
color: "currentColor"
|
|
2483
2520
|
})
|
|
2484
2521
|
])
|
|
2485
2522
|
], 2)
|
|
2486
2523
|
]),
|
|
2487
|
-
default:
|
|
2488
|
-
|
|
2489
|
-
(
|
|
2490
|
-
key:
|
|
2491
|
-
class:
|
|
2492
|
-
"is-active":
|
|
2493
|
-
"is-disabled":
|
|
2524
|
+
default: ae(() => [
|
|
2525
|
+
P("div", li, [
|
|
2526
|
+
(f(!0), w(ft, null, pt(L.children, (oe, ot) => He((f(), w("div", {
|
|
2527
|
+
key: oe.value,
|
|
2528
|
+
class: j(["cregis-cascader__suboption-row", {
|
|
2529
|
+
"is-active": y(oe.value),
|
|
2530
|
+
"is-disabled": oe.disabled
|
|
2494
2531
|
}]),
|
|
2495
2532
|
role: "menuitem",
|
|
2496
|
-
onClick: (
|
|
2533
|
+
onClick: (Bt) => q(L, oe)
|
|
2497
2534
|
}, [
|
|
2498
|
-
|
|
2499
|
-
modelValue:
|
|
2500
|
-
selectedLabel:
|
|
2501
|
-
level:
|
|
2502
|
-
primaryOption:
|
|
2503
|
-
subOption:
|
|
2504
|
-
option:
|
|
2535
|
+
Y(g.$slots, "subOption", {
|
|
2536
|
+
modelValue: M.value,
|
|
2537
|
+
selectedLabel: U.value,
|
|
2538
|
+
level: O.value,
|
|
2539
|
+
primaryOption: D.value,
|
|
2540
|
+
subOption: X.value,
|
|
2541
|
+
option: oe,
|
|
2505
2542
|
index: ot,
|
|
2506
2543
|
parent: L,
|
|
2507
|
-
parentIndex:
|
|
2508
|
-
selected:
|
|
2509
|
-
disabled: !!
|
|
2544
|
+
parentIndex: pe,
|
|
2545
|
+
selected: y(oe.value),
|
|
2546
|
+
disabled: !!oe.disabled
|
|
2510
2547
|
}, () => [
|
|
2511
|
-
|
|
2548
|
+
be(I(oe.label), 1)
|
|
2512
2549
|
])
|
|
2513
2550
|
], 10, si)), [
|
|
2514
|
-
[
|
|
2551
|
+
[xt, V(L, oe)]
|
|
2515
2552
|
])), 128))
|
|
2516
2553
|
])
|
|
2517
2554
|
]),
|
|
2518
2555
|
_: 2
|
|
2519
2556
|
}, 1032, ["popper-width", "disabled"])
|
|
2520
|
-
])) : (
|
|
2557
|
+
])) : (f(), w("div", {
|
|
2521
2558
|
key: 1,
|
|
2522
2559
|
class: "cregis-cascader__leaf-only",
|
|
2523
|
-
onClick: (
|
|
2560
|
+
onClick: (oe) => re(L)
|
|
2524
2561
|
}, [
|
|
2525
|
-
|
|
2526
|
-
modelValue:
|
|
2527
|
-
selectedLabel:
|
|
2528
|
-
level:
|
|
2529
|
-
primaryOption:
|
|
2530
|
-
subOption:
|
|
2562
|
+
Y(g.$slots, "option", {
|
|
2563
|
+
modelValue: M.value,
|
|
2564
|
+
selectedLabel: U.value,
|
|
2565
|
+
level: O.value,
|
|
2566
|
+
primaryOption: D.value,
|
|
2567
|
+
subOption: X.value,
|
|
2531
2568
|
option: L,
|
|
2532
|
-
index:
|
|
2569
|
+
index: pe,
|
|
2533
2570
|
disabled: !!L.disabled,
|
|
2534
|
-
selected:
|
|
2571
|
+
selected: y(L.value),
|
|
2535
2572
|
isParentOfSelected: !1
|
|
2536
2573
|
}, () => [
|
|
2537
|
-
|
|
2574
|
+
P("p", null, I(L.label), 1)
|
|
2538
2575
|
])
|
|
2539
2576
|
], 8, ci))
|
|
2540
2577
|
], 2))), 128))
|
|
@@ -2545,7 +2582,7 @@ const _r = (e, a) => {
|
|
|
2545
2582
|
}, 8, ["popper-width", "placement", "offset", "disabled"])
|
|
2546
2583
|
], 2));
|
|
2547
2584
|
}
|
|
2548
|
-
}),
|
|
2585
|
+
}), Di = /* @__PURE__ */ Q({
|
|
2549
2586
|
name: "Tag",
|
|
2550
2587
|
__name: "Tag",
|
|
2551
2588
|
props: {
|
|
@@ -2554,15 +2591,15 @@ const _r = (e, a) => {
|
|
|
2554
2591
|
text: {}
|
|
2555
2592
|
},
|
|
2556
2593
|
setup(e) {
|
|
2557
|
-
return (a, t) => (
|
|
2558
|
-
class:
|
|
2594
|
+
return (a, t) => (f(), w("div", {
|
|
2595
|
+
class: j(["cregis-tag", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`]])
|
|
2559
2596
|
}, [
|
|
2560
|
-
|
|
2561
|
-
|
|
2597
|
+
Y(a.$slots, "default", {}, () => [
|
|
2598
|
+
be(I(e.text), 1)
|
|
2562
2599
|
])
|
|
2563
2600
|
], 2));
|
|
2564
2601
|
}
|
|
2565
|
-
}),
|
|
2602
|
+
}), Ri = /* @__PURE__ */ Q({
|
|
2566
2603
|
name: "Switch",
|
|
2567
2604
|
__name: "Switch",
|
|
2568
2605
|
props: {
|
|
@@ -2575,7 +2612,7 @@ const _r = (e, a) => {
|
|
|
2575
2612
|
},
|
|
2576
2613
|
emits: ["update:modelValue", "change"],
|
|
2577
2614
|
setup(e, { emit: a }) {
|
|
2578
|
-
const t = e, r = a, n = F(!1), i =
|
|
2615
|
+
const t = e, r = a, n = F(!1), i = p(() => t.modelValue === t.activeValue), s = async () => {
|
|
2579
2616
|
if (t.disabled || n.value) return;
|
|
2580
2617
|
const o = i.value ? t.inactiveValue : t.activeValue;
|
|
2581
2618
|
if (t.beforeChange) {
|
|
@@ -2595,14 +2632,14 @@ const _r = (e, a) => {
|
|
|
2595
2632
|
(o) => {
|
|
2596
2633
|
r("change", o);
|
|
2597
2634
|
}
|
|
2598
|
-
), (o,
|
|
2599
|
-
class:
|
|
2635
|
+
), (o, l) => (f(), w("div", {
|
|
2636
|
+
class: j(["cregis-switch", [
|
|
2600
2637
|
`cregis-switch--${e.size}`,
|
|
2601
2638
|
{ "is-checked": i.value, "is-disabled": e.disabled || n.value }
|
|
2602
2639
|
]]),
|
|
2603
|
-
onClick:
|
|
2604
|
-
}, [...
|
|
2605
|
-
|
|
2640
|
+
onClick: s
|
|
2641
|
+
}, [...l[0] || (l[0] = [
|
|
2642
|
+
P("div", { class: "cregis-switch__circle" }, null, -1)
|
|
2606
2643
|
])], 2));
|
|
2607
2644
|
}
|
|
2608
2645
|
}), ui = { class: "cregis-badge__wrapper" }, Wi = /* @__PURE__ */ Q({
|
|
@@ -2620,23 +2657,23 @@ const _r = (e, a) => {
|
|
|
2620
2657
|
const a = {
|
|
2621
2658
|
normal: [-8, -10],
|
|
2622
2659
|
dot: [-2, -2]
|
|
2623
|
-
}, t = e, r =
|
|
2660
|
+
}, t = e, r = p(() => t.offset ?? (t.isDot ? a.dot : a.normal)), n = p(() => ({
|
|
2624
2661
|
top: `${r.value[0]}px`,
|
|
2625
2662
|
right: `${r.value[1]}px`
|
|
2626
2663
|
}));
|
|
2627
|
-
return (i,
|
|
2628
|
-
e.hidden ?
|
|
2664
|
+
return (i, s) => (f(), w("div", ui, [
|
|
2665
|
+
e.hidden ? _("", !0) : (f(), w("div", {
|
|
2629
2666
|
key: 0,
|
|
2630
|
-
class:
|
|
2631
|
-
style:
|
|
2632
|
-
},
|
|
2633
|
-
|
|
2667
|
+
class: j(["cregis-badge", [`cregis-badge--${e.type}`, { "cregis-badge--dot": e.isDot }]]),
|
|
2668
|
+
style: ie(n.value)
|
|
2669
|
+
}, I(e.isDot ? "" : Number(e.value) > e.max ? `${e.max}+` : e.value), 7)),
|
|
2670
|
+
Y(i.$slots, "default")
|
|
2634
2671
|
]));
|
|
2635
2672
|
}
|
|
2636
2673
|
}), di = ["accept", "disabled"], fi = ["src"], pi = {
|
|
2637
2674
|
key: 2,
|
|
2638
2675
|
class: "cregis-upload__mask"
|
|
2639
|
-
},
|
|
2676
|
+
}, Li = /* @__PURE__ */ Q({
|
|
2640
2677
|
name: "Upload",
|
|
2641
2678
|
__name: "Upload",
|
|
2642
2679
|
props: {
|
|
@@ -2651,105 +2688,105 @@ const _r = (e, a) => {
|
|
|
2651
2688
|
},
|
|
2652
2689
|
emits: ["update:modelValue"],
|
|
2653
2690
|
setup(e, { emit: a }) {
|
|
2654
|
-
const t = e, r = a, n = F(0), i = F(""),
|
|
2655
|
-
if (!
|
|
2656
|
-
if (
|
|
2691
|
+
const t = e, r = a, n = F(0), i = F(""), s = ["http:", "https:", "blob:"], o = (k) => {
|
|
2692
|
+
if (!k) return !1;
|
|
2693
|
+
if (k.toLowerCase().startsWith("data:image/")) return !0;
|
|
2657
2694
|
try {
|
|
2658
|
-
const { protocol:
|
|
2659
|
-
return
|
|
2695
|
+
const { protocol: S } = new URL(k, window.location.origin);
|
|
2696
|
+
return s.includes(S);
|
|
2660
2697
|
} catch {
|
|
2661
|
-
return
|
|
2698
|
+
return k.startsWith("/") && !k.startsWith("//");
|
|
2662
2699
|
}
|
|
2663
|
-
},
|
|
2700
|
+
}, l = p(() => o(i.value) ? i.value : ""), d = p(() => ({
|
|
2664
2701
|
width: typeof t.width == "number" ? `${t.width}px` : t.width,
|
|
2665
2702
|
height: typeof t.width == "number" ? `${t.width}px` : t.width
|
|
2666
|
-
})), c = (
|
|
2667
|
-
const
|
|
2668
|
-
return
|
|
2669
|
-
},
|
|
2670
|
-
const
|
|
2671
|
-
if (!
|
|
2672
|
-
const
|
|
2673
|
-
return
|
|
2674
|
-
const
|
|
2675
|
-
return
|
|
2703
|
+
})), c = (k) => {
|
|
2704
|
+
const S = k.lastIndexOf(".");
|
|
2705
|
+
return S === -1 ? "" : k.slice(S + 1).toLowerCase();
|
|
2706
|
+
}, b = (k, S) => {
|
|
2707
|
+
const A = S.split(",").map((v) => v.trim()).filter(Boolean);
|
|
2708
|
+
if (!A.length) return !0;
|
|
2709
|
+
const T = c(k.name), E = k.type.toLowerCase();
|
|
2710
|
+
return A.some((v) => {
|
|
2711
|
+
const B = v.toLowerCase();
|
|
2712
|
+
return B.startsWith(".") ? T === B.slice(1) : B.includes("/") ? B.endsWith("/*") ? E.startsWith(B.slice(0, -1)) : E === B : T === B;
|
|
2676
2713
|
});
|
|
2677
|
-
}, $ = (
|
|
2678
|
-
|
|
2714
|
+
}, $ = (k) => {
|
|
2715
|
+
k.value = "";
|
|
2679
2716
|
};
|
|
2680
|
-
let
|
|
2681
|
-
const
|
|
2682
|
-
const
|
|
2683
|
-
if (!
|
|
2684
|
-
if (t.accept && !
|
|
2685
|
-
Lt(t.exceedAcceptTip ?? "The file format does not meet the requirements."), $(
|
|
2717
|
+
let h;
|
|
2718
|
+
const x = (k) => {
|
|
2719
|
+
const S = k.target, A = S.files?.[0];
|
|
2720
|
+
if (!A) return;
|
|
2721
|
+
if (t.accept && !b(A, t.accept)) {
|
|
2722
|
+
Lt(t.exceedAcceptTip ?? "The file format does not meet the requirements."), $(S);
|
|
2686
2723
|
return;
|
|
2687
2724
|
}
|
|
2688
|
-
if (t.size !== void 0 &&
|
|
2689
|
-
Lt(t.exceedSizeTip ?? `The file size cannot exceed ${t.size} MB.`), $(
|
|
2725
|
+
if (t.size !== void 0 && A.size > t.size * 1024 * 1024) {
|
|
2726
|
+
Lt(t.exceedSizeTip ?? `The file size cannot exceed ${t.size} MB.`), $(S);
|
|
2690
2727
|
return;
|
|
2691
2728
|
}
|
|
2692
2729
|
r("update:modelValue", "");
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
n.value += 30, n.value >= 90 && clearInterval(
|
|
2730
|
+
const T = new FormData();
|
|
2731
|
+
T.append("file", A, A.name), t.onChange?.(T), h = setInterval(() => {
|
|
2732
|
+
n.value += 30, n.value >= 90 && clearInterval(h);
|
|
2696
2733
|
}, 200);
|
|
2697
2734
|
};
|
|
2698
2735
|
J(
|
|
2699
2736
|
() => t.modelValue,
|
|
2700
|
-
(
|
|
2701
|
-
|
|
2737
|
+
(k) => {
|
|
2738
|
+
k ? (n.value = 100, i.value = k) : (n.value = 0, i.value = "");
|
|
2702
2739
|
},
|
|
2703
2740
|
{
|
|
2704
2741
|
immediate: !0
|
|
2705
2742
|
}
|
|
2706
2743
|
);
|
|
2707
|
-
const
|
|
2744
|
+
const C = p(() => ({
|
|
2708
2745
|
width: `${n.value}%`,
|
|
2709
2746
|
borderRadius: n.value === 100 ? "0 0 6px 6px" : "0 0 0 6px"
|
|
2710
|
-
})), V =
|
|
2711
|
-
return
|
|
2712
|
-
|
|
2713
|
-
}), (
|
|
2714
|
-
class:
|
|
2715
|
-
style:
|
|
2747
|
+
})), V = p(() => t.disabled || n.value > 0 && n.value < 100);
|
|
2748
|
+
return Te(() => {
|
|
2749
|
+
h && clearInterval(h);
|
|
2750
|
+
}), (k, S) => (f(), w("div", {
|
|
2751
|
+
class: j(["cregis-upload", { "cregis-upload--disabled": V.value }]),
|
|
2752
|
+
style: ie(d.value)
|
|
2716
2753
|
}, [
|
|
2717
|
-
|
|
2754
|
+
G(te(Wt), {
|
|
2718
2755
|
size: "16px",
|
|
2719
2756
|
color: "var(--stroke-base-secondary)"
|
|
2720
2757
|
}),
|
|
2721
|
-
|
|
2758
|
+
P("input", {
|
|
2722
2759
|
type: "file",
|
|
2723
2760
|
title: "",
|
|
2724
2761
|
accept: e.accept,
|
|
2725
2762
|
disabled: V.value,
|
|
2726
|
-
onChange:
|
|
2763
|
+
onChange: x
|
|
2727
2764
|
}, null, 40, di),
|
|
2728
|
-
n.value > 0 && n.value < 100 ? (
|
|
2765
|
+
n.value > 0 && n.value < 100 ? (f(), w("div", {
|
|
2729
2766
|
key: 0,
|
|
2730
2767
|
class: "cregis-upload__progress",
|
|
2731
|
-
style:
|
|
2732
|
-
}, null, 4)) :
|
|
2733
|
-
|
|
2768
|
+
style: ie(C.value)
|
|
2769
|
+
}, null, 4)) : _("", !0),
|
|
2770
|
+
l.value ? (f(), w("img", {
|
|
2734
2771
|
key: 1,
|
|
2735
|
-
src:
|
|
2772
|
+
src: l.value,
|
|
2736
2773
|
alt: ""
|
|
2737
|
-
}, null, 8, fi)) :
|
|
2738
|
-
|
|
2739
|
-
|
|
2774
|
+
}, null, 8, fi)) : _("", !0),
|
|
2775
|
+
l.value ? (f(), w("div", pi, [
|
|
2776
|
+
G(te(Wt), {
|
|
2740
2777
|
size: "16px",
|
|
2741
2778
|
color: "var(--text-same-white-primary)"
|
|
2742
2779
|
})
|
|
2743
|
-
])) :
|
|
2780
|
+
])) : _("", !0)
|
|
2744
2781
|
], 6));
|
|
2745
2782
|
}
|
|
2746
2783
|
});
|
|
2747
|
-
let
|
|
2784
|
+
let Fe = 0, ba = "";
|
|
2748
2785
|
const vi = () => {
|
|
2749
|
-
|
|
2750
|
-
},
|
|
2751
|
-
|
|
2752
|
-
},
|
|
2786
|
+
Fe === 0 && (ba = document.body.style.overflow, document.body.style.overflow = "hidden"), Fe++;
|
|
2787
|
+
}, Gt = () => {
|
|
2788
|
+
Fe <= 0 || (Fe--, Fe === 0 && (document.body.style.overflow = ba));
|
|
2789
|
+
}, at = /* @__PURE__ */ Q({
|
|
2753
2790
|
name: "Dialog",
|
|
2754
2791
|
__name: "Dialog",
|
|
2755
2792
|
props: {
|
|
@@ -2767,75 +2804,75 @@ const vi = () => {
|
|
|
2767
2804
|
const t = e, r = a;
|
|
2768
2805
|
let n = !1;
|
|
2769
2806
|
J(() => [t.modelValue, t.lockScroll], () => {
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2772
|
-
}, { immediate: !0 }),
|
|
2773
|
-
n && (
|
|
2807
|
+
const b = t.modelValue && t.lockScroll;
|
|
2808
|
+
b && !n ? (vi(), n = !0) : !b && n && (Gt(), n = !1);
|
|
2809
|
+
}, { immediate: !0 }), Te(() => {
|
|
2810
|
+
n && (Gt(), n = !1);
|
|
2774
2811
|
});
|
|
2775
|
-
const
|
|
2812
|
+
const s = p(() => ({
|
|
2776
2813
|
width: typeof t.width == "number" ? `${t.width}px` : t.width
|
|
2777
|
-
})), o =
|
|
2814
|
+
})), o = p(() => {
|
|
2778
2815
|
if (!t.alignCenter)
|
|
2779
2816
|
return {
|
|
2780
2817
|
paddingTop: t.top
|
|
2781
2818
|
};
|
|
2782
|
-
}),
|
|
2819
|
+
}), l = () => {
|
|
2783
2820
|
r("update:modelValue", !1);
|
|
2784
2821
|
}, d = () => {
|
|
2785
|
-
t.closeOnClickModal &&
|
|
2822
|
+
t.closeOnClickModal && l();
|
|
2786
2823
|
}, c = () => {
|
|
2787
2824
|
r("after-leave");
|
|
2788
2825
|
};
|
|
2789
|
-
return (
|
|
2790
|
-
|
|
2826
|
+
return (b, $) => (f(), ve(ea, { to: "body" }, [
|
|
2827
|
+
G(nt, {
|
|
2791
2828
|
name: "cregis-dialog-fade",
|
|
2792
2829
|
onAfterLeave: c
|
|
2793
2830
|
}, {
|
|
2794
|
-
default:
|
|
2795
|
-
e.modelValue ? (
|
|
2831
|
+
default: ae(() => [
|
|
2832
|
+
e.modelValue ? (f(), w("div", {
|
|
2796
2833
|
key: 0,
|
|
2797
|
-
class:
|
|
2834
|
+
class: j(["cregis-dialog__wrapper", {
|
|
2798
2835
|
"cregis-dialog__wrapper--center": e.alignCenter,
|
|
2799
2836
|
"cregis-dialog__wrapper--no-modal": !e.modal
|
|
2800
2837
|
}]),
|
|
2801
|
-
style:
|
|
2838
|
+
style: ie(o.value)
|
|
2802
2839
|
}, [
|
|
2803
|
-
e.modal ? (
|
|
2840
|
+
e.modal ? (f(), w("div", {
|
|
2804
2841
|
key: 0,
|
|
2805
2842
|
class: "cregis-dialog__mask",
|
|
2806
2843
|
onClick: d
|
|
2807
|
-
})) :
|
|
2808
|
-
|
|
2844
|
+
})) : _("", !0),
|
|
2845
|
+
P("div", {
|
|
2809
2846
|
class: "cregis-dialog",
|
|
2810
|
-
style:
|
|
2811
|
-
onClick: $[0] || ($[0] =
|
|
2847
|
+
style: ie(s.value),
|
|
2848
|
+
onClick: $[0] || ($[0] = yt(() => {
|
|
2812
2849
|
}, ["stop"]))
|
|
2813
2850
|
}, [
|
|
2814
|
-
e.showClose ? (
|
|
2851
|
+
e.showClose ? (f(), w("div", {
|
|
2815
2852
|
key: 0,
|
|
2816
2853
|
class: "cregis-dialog__close",
|
|
2817
|
-
onClick:
|
|
2854
|
+
onClick: l
|
|
2818
2855
|
}, [
|
|
2819
|
-
|
|
2856
|
+
G(te(Va), {
|
|
2820
2857
|
size: "10px",
|
|
2821
2858
|
color: "var(--material-same-white-primary)"
|
|
2822
2859
|
})
|
|
2823
|
-
])) :
|
|
2824
|
-
|
|
2860
|
+
])) : _("", !0),
|
|
2861
|
+
Y(b.$slots, "default")
|
|
2825
2862
|
], 4)
|
|
2826
|
-
], 6)) :
|
|
2863
|
+
], 6)) : _("", !0)
|
|
2827
2864
|
]),
|
|
2828
2865
|
_: 3
|
|
2829
2866
|
})
|
|
2830
2867
|
]));
|
|
2831
2868
|
}
|
|
2832
|
-
}), mi = { class: "cregis-dialog-confirm" }, gi = { class: "cregis-dialog-confirm__icon-wrapper" }, hi = {
|
|
2869
|
+
}), mi = { class: "cregis-dialog-confirm" }, gi = { class: "cregis-dialog-confirm__icon-wrapper" }, hi = {
|
|
2833
2870
|
key: 0,
|
|
2834
2871
|
class: "cregis-dialog-confirm__title"
|
|
2835
|
-
},
|
|
2872
|
+
}, bi = {
|
|
2836
2873
|
key: 1,
|
|
2837
2874
|
class: "cregis-dialog-confirm__message"
|
|
2838
|
-
},
|
|
2875
|
+
}, yi = { class: "cregis-dialog-confirm__footer" }, wi = /* @__PURE__ */ Q({
|
|
2839
2876
|
name: "ConfirmDialog",
|
|
2840
2877
|
__name: "ConfirmDialog",
|
|
2841
2878
|
props: {
|
|
@@ -2848,73 +2885,82 @@ const vi = () => {
|
|
|
2848
2885
|
closeOnClickModal: { type: Boolean, default: !0 },
|
|
2849
2886
|
lockScroll: { type: Boolean, default: !0 },
|
|
2850
2887
|
width: { default: "280px" },
|
|
2888
|
+
type: { default: "info" },
|
|
2851
2889
|
onConfirm: {},
|
|
2852
2890
|
onCancel: {}
|
|
2853
2891
|
},
|
|
2854
2892
|
emits: ["after-leave"],
|
|
2855
2893
|
setup(e, { emit: a }) {
|
|
2856
|
-
const t = e, r = a, n = F(!1), i = F(null),
|
|
2894
|
+
const t = e, r = a, n = F(!1), i = F(null), s = F(null), o = p(() => t.type === "success" ? {
|
|
2895
|
+
component: ta,
|
|
2896
|
+
color: "var(--text-same-white-primary)"
|
|
2897
|
+
} : {
|
|
2898
|
+
component: Ba,
|
|
2899
|
+
color: "var(--text-base-primary)"
|
|
2900
|
+
}), l = async ($) => {
|
|
2857
2901
|
if (!i.value) {
|
|
2858
|
-
i.value =
|
|
2902
|
+
i.value = $;
|
|
2859
2903
|
try {
|
|
2860
|
-
await (
|
|
2904
|
+
await ($ === "confirm" ? t.onConfirm : t.onCancel)?.(), s.value = $, n.value = !1;
|
|
2861
2905
|
} catch {
|
|
2862
2906
|
i.value = null;
|
|
2863
2907
|
}
|
|
2864
2908
|
}
|
|
2865
|
-
},
|
|
2866
|
-
|
|
2909
|
+
}, d = () => l("confirm"), c = () => l("cancel"), b = () => {
|
|
2910
|
+
s.value || t.onCancel?.(), i.value = null, s.value = null, r("after-leave");
|
|
2867
2911
|
};
|
|
2868
|
-
return
|
|
2912
|
+
return Ce(() => {
|
|
2869
2913
|
n.value = !0;
|
|
2870
|
-
}), (
|
|
2914
|
+
}), ($, h) => (f(), ve(at, {
|
|
2871
2915
|
modelValue: n.value,
|
|
2872
|
-
"onUpdate:modelValue":
|
|
2916
|
+
"onUpdate:modelValue": h[0] || (h[0] = (x) => n.value = x),
|
|
2873
2917
|
width: e.width,
|
|
2874
2918
|
"show-close": !1,
|
|
2875
2919
|
"close-on-click-modal": e.closeOnClickModal,
|
|
2876
2920
|
"lock-scroll": e.lockScroll,
|
|
2877
|
-
onAfterLeave:
|
|
2921
|
+
onAfterLeave: b
|
|
2878
2922
|
}, {
|
|
2879
|
-
default:
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2923
|
+
default: ae(() => [
|
|
2924
|
+
P("div", mi, [
|
|
2925
|
+
P("div", gi, [
|
|
2926
|
+
P("div", {
|
|
2927
|
+
class: j(`cregis-dialog-confirm__icon cregis-dialog-confirm__icon--${e.type}`)
|
|
2928
|
+
}, [
|
|
2929
|
+
(f(), ve(bt(o.value.component), {
|
|
2884
2930
|
"stroke-width": 3.4,
|
|
2885
2931
|
size: "24px",
|
|
2886
|
-
color:
|
|
2887
|
-
})
|
|
2888
|
-
])
|
|
2932
|
+
color: o.value.color
|
|
2933
|
+
}, null, 8, ["color"]))
|
|
2934
|
+
], 2)
|
|
2889
2935
|
]),
|
|
2890
|
-
e.title ? (
|
|
2891
|
-
e.message ? (
|
|
2892
|
-
|
|
2893
|
-
e.showConfirmButton ? (
|
|
2936
|
+
e.title ? (f(), w("div", hi, I(e.title), 1)) : _("", !0),
|
|
2937
|
+
e.message ? (f(), w("div", bi, I(e.message), 1)) : _("", !0),
|
|
2938
|
+
P("div", yi, [
|
|
2939
|
+
e.showConfirmButton ? (f(), ve(ze, {
|
|
2894
2940
|
key: 0,
|
|
2895
2941
|
type: "foreground",
|
|
2896
2942
|
block: "",
|
|
2897
2943
|
loading: i.value === "confirm",
|
|
2898
|
-
onClick:
|
|
2944
|
+
onClick: d
|
|
2899
2945
|
}, {
|
|
2900
|
-
default:
|
|
2901
|
-
|
|
2946
|
+
default: ae(() => [
|
|
2947
|
+
be(I(e.confirmButtonText), 1)
|
|
2902
2948
|
]),
|
|
2903
2949
|
_: 1
|
|
2904
|
-
}, 8, ["loading"])) :
|
|
2905
|
-
e.showCancelButton ? (
|
|
2950
|
+
}, 8, ["loading"])) : _("", !0),
|
|
2951
|
+
e.showCancelButton ? (f(), ve(ze, {
|
|
2906
2952
|
key: 1,
|
|
2907
2953
|
type: "secondary",
|
|
2908
2954
|
text: "",
|
|
2909
2955
|
block: "",
|
|
2910
2956
|
loading: i.value === "cancel",
|
|
2911
|
-
onClick:
|
|
2957
|
+
onClick: c
|
|
2912
2958
|
}, {
|
|
2913
|
-
default:
|
|
2914
|
-
|
|
2959
|
+
default: ae(() => [
|
|
2960
|
+
be(I(e.cancelButtonText), 1)
|
|
2915
2961
|
]),
|
|
2916
2962
|
_: 1
|
|
2917
|
-
}, 8, ["loading"])) :
|
|
2963
|
+
}, 8, ["loading"])) : _("", !0)
|
|
2918
2964
|
])
|
|
2919
2965
|
])
|
|
2920
2966
|
]),
|
|
@@ -2922,65 +2968,65 @@ const vi = () => {
|
|
|
2922
2968
|
}, 8, ["modelValue", "width", "close-on-click-modal", "lock-scroll"]));
|
|
2923
2969
|
}
|
|
2924
2970
|
});
|
|
2925
|
-
function
|
|
2971
|
+
function xi(e) {
|
|
2926
2972
|
return typeof e == "string" ? { message: e } : e;
|
|
2927
2973
|
}
|
|
2928
|
-
function
|
|
2974
|
+
function ki(e) {
|
|
2929
2975
|
return new Promise((a, t) => {
|
|
2930
|
-
const r =
|
|
2976
|
+
const r = xi(e), n = document.createElement("div");
|
|
2931
2977
|
document.body.appendChild(n);
|
|
2932
2978
|
const i = () => {
|
|
2933
|
-
|
|
2979
|
+
Ae(null, n), n.remove();
|
|
2934
2980
|
};
|
|
2935
|
-
let
|
|
2981
|
+
let s = !1;
|
|
2936
2982
|
const o = () => {
|
|
2937
|
-
|
|
2938
|
-
},
|
|
2939
|
-
|
|
2983
|
+
s || (s = !0, a());
|
|
2984
|
+
}, l = (d) => {
|
|
2985
|
+
s || (s = !0, t(d));
|
|
2940
2986
|
};
|
|
2941
|
-
|
|
2942
|
-
|
|
2987
|
+
Ae(
|
|
2988
|
+
wt(wi, {
|
|
2943
2989
|
...r,
|
|
2944
2990
|
onConfirm: async () => {
|
|
2945
2991
|
await r.onConfirm?.(), o();
|
|
2946
2992
|
},
|
|
2947
2993
|
onCancel: async () => {
|
|
2948
|
-
await r.onCancel?.(),
|
|
2994
|
+
await r.onCancel?.(), l("cancel");
|
|
2949
2995
|
},
|
|
2950
2996
|
onAfterLeave: () => {
|
|
2951
|
-
i(),
|
|
2997
|
+
i(), s || l("cancel");
|
|
2952
2998
|
}
|
|
2953
2999
|
}),
|
|
2954
3000
|
n
|
|
2955
3001
|
);
|
|
2956
3002
|
});
|
|
2957
3003
|
}
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2960
|
-
e.component(
|
|
3004
|
+
const ya = at;
|
|
3005
|
+
ya.install = (e) => {
|
|
3006
|
+
e.component(at.name, at);
|
|
2961
3007
|
};
|
|
2962
|
-
|
|
3008
|
+
ya.confirm = ki;
|
|
2963
3009
|
export {
|
|
2964
3010
|
Wi as Badge,
|
|
2965
|
-
|
|
2966
|
-
|
|
3011
|
+
ze as Button,
|
|
3012
|
+
Ai as Cascader,
|
|
2967
3013
|
Ua as Checkbox,
|
|
2968
|
-
|
|
3014
|
+
ya as Dialog,
|
|
2969
3015
|
Ti as Divider,
|
|
2970
|
-
|
|
3016
|
+
ra as Input,
|
|
2971
3017
|
Lt as Message,
|
|
2972
|
-
|
|
2973
|
-
|
|
3018
|
+
Bi as Notification,
|
|
3019
|
+
zi as Option,
|
|
2974
3020
|
ht as Popover,
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
3021
|
+
Ei as Progress,
|
|
3022
|
+
Ci as Radio,
|
|
3023
|
+
Pi as Select,
|
|
3024
|
+
Ri as Switch,
|
|
3025
|
+
ia as TABS_KEY,
|
|
3026
|
+
Vi as TabPane,
|
|
3027
|
+
Si as Tabs,
|
|
3028
|
+
Di as Tag,
|
|
3029
|
+
Li as Upload,
|
|
3030
|
+
ki as confirm,
|
|
3031
|
+
ha as selectInjectKey
|
|
2986
3032
|
};
|