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