@vaebe/ccui 2.0.0-beta.0 → 2.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/button/index.es.js +28 -22
- package/button/index.umd.js +1 -1
- package/calendar/index.es.js +445 -90
- package/calendar/index.umd.js +1 -1
- package/ccui-cli.css +1 -1
- package/check-box/index.es.js +8 -2
- package/check-box/index.umd.js +1 -1
- package/chunk-Ndeg2fpE.js +20 -0
- package/collapse/index.es.js +10 -7
- package/collapse/index.umd.js +1 -1
- package/config-provider/chunk-C_CI6nMA.js +13 -0
- package/config-provider/en-BG83iZ_P.js +24 -0
- package/config-provider/index.es.js +408 -53
- package/config-provider/index.umd.js +1 -1
- package/config-provider/ja-B-93MQG5.js +56 -0
- package/config-provider/ko-86th3uXt.js +56 -0
- package/config-provider/zh-cn-BQE-LNg1.js +59 -0
- package/date-picker/ccui-cli.css +1 -1
- package/date-picker/index.es.js +664 -482
- package/date-picker/index.umd.js +1 -1
- package/drawer/index.es.js +271 -279
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +187 -171
- package/dropdown/index.umd.js +1 -1
- package/empty/index.es.js +341 -24
- package/empty/index.umd.js +1 -1
- package/en-BVwCvuzF.js +24 -0
- package/float-button/index.es.js +1134 -46
- package/float-button/index.umd.js +1 -1
- package/form/index.es.js +1357 -261
- package/form/index.umd.js +1 -1
- package/icon/index.es.js +93 -10
- package/icon/index.umd.js +1 -1
- package/image/index.es.js +353 -36
- package/image/index.umd.js +1 -1
- package/input/index.es.js +24 -15
- package/input/index.umd.js +1 -1
- package/input-number/index.es.js +45 -25
- package/input-number/index.umd.js +1 -1
- package/ja-B4U4rt8A.js +56 -0
- package/ko-BG35I8uK.js +56 -0
- package/menu/index.es.js +3 -1
- package/menu/index.umd.js +1 -1
- package/message/index.es.js +1179 -86
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +735 -335
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +1176 -83
- package/notification/index.umd.js +1 -1
- package/package.json +9 -9
- package/pagination/index.es.js +381 -60
- package/pagination/index.umd.js +1 -1
- package/popconfirm/index.es.js +469 -143
- package/popconfirm/index.umd.js +1 -1
- package/popover/index.es.js +192 -175
- package/popover/index.umd.js +1 -1
- package/radio/index.es.js +8 -2
- package/radio/index.umd.js +1 -1
- package/rate/index.es.js +22 -12
- package/rate/index.umd.js +1 -1
- package/select/index.es.js +135 -53
- package/select/index.umd.js +1 -1
- package/slider/index.es.js +165 -155
- package/slider/index.umd.js +1 -1
- package/steps/index.es.js +1140 -49
- package/steps/index.umd.js +1 -1
- package/switch/index.es.js +2 -0
- package/switch/index.umd.js +1 -1
- package/tabs/index.es.js +31 -5
- package/tabs/index.umd.js +1 -1
- package/tag/index.es.js +53 -35
- package/tag/index.umd.js +1 -1
- package/tooltip/index.es.js +78 -77
- package/tooltip/index.umd.js +1 -1
- package/tree/ccui-cli.css +1 -1
- package/tree/index.es.js +1491 -276
- package/tree/index.umd.js +1 -1
- package/typography/index.es.js +1213 -125
- package/typography/index.umd.js +1 -1
- package/vue-ccui.es.js +8726 -7604
- package/vue-ccui.umd.js +1 -1
- package/zh-cn-C8nbfD5S.js +59 -0
package/form/index.es.js
CHANGED
|
@@ -1,22 +1,38 @@
|
|
|
1
|
-
import { computed as e, defineComponent as t, getCurrentInstance as n, h as r, inject as i,
|
|
1
|
+
import { computed as e, defineComponent as t, getCurrentInstance as n, h as r, inject as i, nextTick as a, onMounted as o, onUnmounted as s, provide as c, reactive as l, ref as u, shallowRef as d, toRef as f, watch as p } from "vue";
|
|
2
2
|
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
3
|
-
function
|
|
3
|
+
function m(e, t, n) {
|
|
4
4
|
let r = e;
|
|
5
5
|
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function h(e, t = !1) {
|
|
8
8
|
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
9
9
|
return {
|
|
10
|
-
b: () =>
|
|
11
|
-
e: (e) => e ?
|
|
12
|
-
m: (e) => e ?
|
|
13
|
-
em: (e, t) => e && t ?
|
|
10
|
+
b: () => m(n),
|
|
11
|
+
e: (e) => e ? m(n, e) : "",
|
|
12
|
+
m: (e) => e ? m(n, "", e) : "",
|
|
13
|
+
em: (e, t) => e && t ? m(n, e, t) : "",
|
|
14
14
|
is: (e) => `is-${e}`
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
+
//#region ../ccui/ui/shared/utils/deprecated.ts
|
|
19
|
+
var g = /* @__PURE__ */ new Set();
|
|
20
|
+
function _() {
|
|
21
|
+
return globalThis.process?.env?.NODE_ENV !== "production";
|
|
22
|
+
}
|
|
23
|
+
function v(e, t, n) {
|
|
24
|
+
if (!_()) return;
|
|
25
|
+
let r = n ? `${n}.${e}` : e;
|
|
26
|
+
if (g.has(r) || (g.add(r), typeof console > "u")) return;
|
|
27
|
+
let i = n ? `[ccui][${n}]` : "[ccui]", a = t ? `,请改用 ${t}` : "";
|
|
28
|
+
console.warn(`${i} ${e} 已 deprecated${a}。`);
|
|
29
|
+
}
|
|
30
|
+
function ee(e, t, n) {
|
|
31
|
+
return e ? Object.prototype.hasOwnProperty.call(e, t) || Object.prototype.hasOwnProperty.call(e, n) : !1;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
18
34
|
//#region ../ccui/ui/form/src/form-types.ts
|
|
19
|
-
var
|
|
35
|
+
var te = Symbol("ccuiForm"), y = Symbol("ccuiFormItem"), b = Symbol("ccuiFormList"), x = Symbol("ccuiFormProvider"), S = {
|
|
20
36
|
model: {
|
|
21
37
|
type: Object,
|
|
22
38
|
default: () => ({})
|
|
@@ -85,7 +101,7 @@ var m = Symbol("ccuiForm"), h = Symbol("ccuiFormItem"), g = Symbol("ccuiFormList
|
|
|
85
101
|
type: Boolean,
|
|
86
102
|
default: !1
|
|
87
103
|
}
|
|
88
|
-
},
|
|
104
|
+
}, C = {
|
|
89
105
|
name: {
|
|
90
106
|
type: [
|
|
91
107
|
String,
|
|
@@ -182,7 +198,7 @@ var m = Symbol("ccuiForm"), h = Symbol("ccuiFormItem"), g = Symbol("ccuiFormList
|
|
|
182
198
|
type: Function,
|
|
183
199
|
default: void 0
|
|
184
200
|
}
|
|
185
|
-
},
|
|
201
|
+
}, ne = {
|
|
186
202
|
name: {
|
|
187
203
|
type: [
|
|
188
204
|
String,
|
|
@@ -195,27 +211,27 @@ var m = Symbol("ccuiForm"), h = Symbol("ccuiFormItem"), g = Symbol("ccuiFormList
|
|
|
195
211
|
type: Array,
|
|
196
212
|
default: void 0
|
|
197
213
|
}
|
|
198
|
-
},
|
|
214
|
+
}, w = {};
|
|
199
215
|
//#endregion
|
|
200
216
|
//#region ../ccui/ui/form/src/utils.ts
|
|
201
|
-
function
|
|
217
|
+
function T(e) {
|
|
202
218
|
return e == null || e === "" ? [] : Array.isArray(e) ? [...e] : typeof e == "number" ? [e] : e.replace(/\[(\w+)\]/g, ".$1").split(".").filter(Boolean);
|
|
203
219
|
}
|
|
204
|
-
function
|
|
205
|
-
return
|
|
220
|
+
function E(e) {
|
|
221
|
+
return T(e).join(".");
|
|
206
222
|
}
|
|
207
|
-
function
|
|
208
|
-
let n =
|
|
223
|
+
function D(e, t) {
|
|
224
|
+
let n = T(t);
|
|
209
225
|
if (n.length !== 0) return n.reduce((e, t) => e?.[t], e);
|
|
210
226
|
}
|
|
211
|
-
function
|
|
212
|
-
let r =
|
|
227
|
+
function O(e, t, n) {
|
|
228
|
+
let r = T(t), i = r.pop();
|
|
213
229
|
if (i === void 0) return;
|
|
214
230
|
let a = r.reduce((e, t) => ((!e[t] || typeof e[t] != "object") && (e[t] = {}), e[t]), e);
|
|
215
231
|
a[i] = n;
|
|
216
232
|
}
|
|
217
|
-
function
|
|
218
|
-
let n =
|
|
233
|
+
function re(e, t) {
|
|
234
|
+
let n = T(t);
|
|
219
235
|
if (n.length === 0) return;
|
|
220
236
|
let r = n.pop(), i = e;
|
|
221
237
|
for (let e of n) {
|
|
@@ -224,26 +240,26 @@ function E(e, t) {
|
|
|
224
240
|
}
|
|
225
241
|
i && typeof i == "object" && (Array.isArray(i) && typeof r == "number" ? i.splice(r, 1) : delete i[r]);
|
|
226
242
|
}
|
|
227
|
-
function
|
|
243
|
+
function k(e) {
|
|
228
244
|
if (e == null) return e;
|
|
229
245
|
if (typeof structuredClone == "function") try {
|
|
230
246
|
return structuredClone(e);
|
|
231
247
|
} catch {}
|
|
232
248
|
return JSON.parse(JSON.stringify(e));
|
|
233
249
|
}
|
|
234
|
-
function
|
|
250
|
+
function A(e) {
|
|
235
251
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
236
252
|
}
|
|
237
|
-
function
|
|
253
|
+
function ie(e, t) {
|
|
238
254
|
return t ? e.filter((e) => e.trigger ? (Array.isArray(e.trigger) ? e.trigger : [e.trigger]).includes(t) : !0) : e;
|
|
239
255
|
}
|
|
240
|
-
function
|
|
256
|
+
function j(e) {
|
|
241
257
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
242
258
|
}
|
|
243
|
-
function
|
|
244
|
-
return
|
|
259
|
+
function M(e, t) {
|
|
260
|
+
return j(t) || !e.type ? !0 : e.type === "email" ? typeof t == "string" && /^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t) : e.type === "url" ? typeof t == "string" && /^https?:\/\/\S+$/i.test(t) : e.type === "array" ? Array.isArray(t) : e.type === "object" ? typeof t == "object" && !Array.isArray(t) : typeof t === e.type;
|
|
245
261
|
}
|
|
246
|
-
function
|
|
262
|
+
function ae(e) {
|
|
247
263
|
if (typeof e == "string" || Array.isArray(e)) return e.length;
|
|
248
264
|
if (typeof e == "number") return e;
|
|
249
265
|
}
|
|
@@ -281,10 +297,10 @@ var N = {
|
|
|
281
297
|
range: "${label} must contain between ${min} and ${max} items"
|
|
282
298
|
}
|
|
283
299
|
};
|
|
284
|
-
function
|
|
300
|
+
function oe(e, t) {
|
|
285
301
|
return e.replace(/\$\{(\w+)\}/g, (e, n) => String(t[n] ?? ""));
|
|
286
302
|
}
|
|
287
|
-
function
|
|
303
|
+
function P(e, t, n, r, i, a) {
|
|
288
304
|
if (e.message) return e.message;
|
|
289
305
|
let o = {
|
|
290
306
|
...N,
|
|
@@ -306,7 +322,7 @@ function F(e, t, n, r, i, a) {
|
|
|
306
322
|
...r.array
|
|
307
323
|
}
|
|
308
324
|
};
|
|
309
|
-
return
|
|
325
|
+
return oe((a && i && typeof o[i] == "object" ? o[i]?.[a] : void 0) || (i === "types" && e.type ? o.types?.[e.type] : void 0) || (i ? o[i] : void 0) || o.default || "${label} is invalid", {
|
|
310
326
|
label: n || t,
|
|
311
327
|
name: t,
|
|
312
328
|
field: t,
|
|
@@ -316,55 +332,55 @@ function F(e, t, n, r, i, a) {
|
|
|
316
332
|
max: e.max
|
|
317
333
|
});
|
|
318
334
|
}
|
|
319
|
-
function
|
|
335
|
+
function se(e, t) {
|
|
320
336
|
return e.type === "array" || Array.isArray(t) ? "array" : typeof t == "number" ? "number" : "string";
|
|
321
337
|
}
|
|
322
|
-
async function
|
|
323
|
-
if (e.required &&
|
|
338
|
+
async function ce(e, t, n, r, i = r, a = {}) {
|
|
339
|
+
if (e.required && j(t)) return {
|
|
324
340
|
field: r,
|
|
325
|
-
message:
|
|
341
|
+
message: P(e, r, i, a, "required")
|
|
326
342
|
};
|
|
327
343
|
if (e.whitespace && typeof t == "string" && t.trim() === "") return {
|
|
328
344
|
field: r,
|
|
329
|
-
message:
|
|
345
|
+
message: P(e, r, i, a, "whitespace")
|
|
330
346
|
};
|
|
331
|
-
if (e.enum && !
|
|
347
|
+
if (e.enum && !j(t) && !e.enum.includes(t)) return {
|
|
332
348
|
field: r,
|
|
333
|
-
message:
|
|
349
|
+
message: P(e, r, i, a, "enum")
|
|
334
350
|
};
|
|
335
|
-
if (!
|
|
351
|
+
if (!M(e, t)) return {
|
|
336
352
|
field: r,
|
|
337
|
-
message:
|
|
353
|
+
message: P(e, r, i, a, "types")
|
|
338
354
|
};
|
|
339
|
-
let o =
|
|
355
|
+
let o = ae(t);
|
|
340
356
|
if (o !== void 0) {
|
|
341
|
-
let n =
|
|
357
|
+
let n = se(e, t);
|
|
342
358
|
if (e.len !== void 0 && o !== e.len) return {
|
|
343
359
|
field: r,
|
|
344
|
-
message:
|
|
360
|
+
message: P(e, r, i, a, n, "len")
|
|
345
361
|
};
|
|
346
362
|
if (e.min !== void 0 && e.max !== void 0 && (o < e.min || o > e.max)) return {
|
|
347
363
|
field: r,
|
|
348
|
-
message:
|
|
364
|
+
message: P(e, r, i, a, n, "range")
|
|
349
365
|
};
|
|
350
366
|
if (e.min !== void 0 && o < e.min) return {
|
|
351
367
|
field: r,
|
|
352
|
-
message:
|
|
368
|
+
message: P(e, r, i, a, n, "min")
|
|
353
369
|
};
|
|
354
370
|
if (e.max !== void 0 && o > e.max) return {
|
|
355
371
|
field: r,
|
|
356
|
-
message:
|
|
372
|
+
message: P(e, r, i, a, n, "max")
|
|
357
373
|
};
|
|
358
374
|
}
|
|
359
375
|
if (e.pattern && !e.pattern.test(String(t))) return {
|
|
360
376
|
field: r,
|
|
361
|
-
message:
|
|
377
|
+
message: P(e, r, i, a, "pattern")
|
|
362
378
|
};
|
|
363
379
|
if (e.validator) {
|
|
364
380
|
let o = await e.validator(e, t, n);
|
|
365
381
|
if (o === !1) return {
|
|
366
382
|
field: r,
|
|
367
|
-
message:
|
|
383
|
+
message: P(e, r, i, a)
|
|
368
384
|
};
|
|
369
385
|
if (typeof o == "string") return {
|
|
370
386
|
field: r,
|
|
@@ -379,321 +395,1401 @@ async function ee(e, t, n, r, i = r, a = {}) {
|
|
|
379
395
|
}
|
|
380
396
|
//#endregion
|
|
381
397
|
//#region ../ccui/ui/form/src/form.tsx
|
|
382
|
-
var
|
|
398
|
+
var F = /* @__PURE__ */ t({
|
|
383
399
|
name: "CForm",
|
|
384
|
-
props:
|
|
400
|
+
props: S,
|
|
385
401
|
emits: [
|
|
386
402
|
"submit",
|
|
387
403
|
"validate",
|
|
388
404
|
"validate-failed",
|
|
389
405
|
"values-change"
|
|
390
406
|
],
|
|
391
|
-
setup(t, { emit:
|
|
392
|
-
let
|
|
407
|
+
setup(t, { emit: a, expose: l, slots: d }) {
|
|
408
|
+
let m = h("form"), g = u([]), _ = i(x, null), y = n()?.vnode.props;
|
|
409
|
+
ee(y, "shouldUpdate", "should-update") && v("shouldUpdate", void 0, "Form");
|
|
410
|
+
let b = (e) => {
|
|
393
411
|
if (e === void 0) return g.value;
|
|
394
412
|
if (!Array.isArray(e)) {
|
|
395
|
-
let t =
|
|
413
|
+
let t = E(e);
|
|
396
414
|
return g.value.filter((e) => e.field === t);
|
|
397
415
|
}
|
|
398
|
-
let t =
|
|
416
|
+
let t = E(e);
|
|
399
417
|
if (g.value.some((e) => e.field === t)) return g.value.filter((e) => e.field === t);
|
|
400
|
-
let n = new Set(e.map((e) =>
|
|
418
|
+
let n = new Set(e.map((e) => E(e)));
|
|
401
419
|
return g.value.filter((e) => n.has(e.field));
|
|
402
|
-
},
|
|
420
|
+
}, S = (e) => {
|
|
403
421
|
e.field && !g.value.includes(e) && g.value.push(e);
|
|
404
|
-
},
|
|
422
|
+
}, C = (e) => {
|
|
405
423
|
g.value = g.value.filter((t) => t !== e);
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
}, w = (e,
|
|
409
|
-
|
|
424
|
+
}, ne = (e, t, n) => {
|
|
425
|
+
a("validate", e, t, n);
|
|
426
|
+
}, w = (e, n) => {
|
|
427
|
+
a("values-change", {
|
|
410
428
|
name: e,
|
|
411
|
-
value:
|
|
412
|
-
}, t.model), t.name &&
|
|
429
|
+
value: n
|
|
430
|
+
}, t.model), t.name && _ && _.triggerFormChange(t.name, [{
|
|
413
431
|
name: e,
|
|
414
|
-
value:
|
|
432
|
+
value: n
|
|
415
433
|
}]);
|
|
416
434
|
}, T = e(() => ({
|
|
417
|
-
[
|
|
418
|
-
[
|
|
419
|
-
[
|
|
420
|
-
[
|
|
421
|
-
})),
|
|
422
|
-
let
|
|
423
|
-
for (let e of g.value) !await e.validate() && e.prop &&
|
|
435
|
+
[m.b()]: !0,
|
|
436
|
+
[m.m(`label-${t.labelPosition}`)]: !!t.labelPosition,
|
|
437
|
+
[m.m(t.layout)]: !!t.layout,
|
|
438
|
+
[m.m("disabled")]: t.disabled
|
|
439
|
+
})), D = async (e) => {
|
|
440
|
+
let n = [];
|
|
441
|
+
for (let e of g.value) !await e.validate() && e.prop && n.push({
|
|
424
442
|
field: e.field,
|
|
425
443
|
message: e.getValidateMessage()
|
|
426
444
|
});
|
|
427
|
-
let
|
|
428
|
-
return e?.(
|
|
429
|
-
},
|
|
430
|
-
let n =
|
|
445
|
+
let r = n.length === 0;
|
|
446
|
+
return e?.(r, n), r || (a("validate-failed", n), t.scrollToFirstError && A(n[0].field, t.scrollToFirstError === !0 ? void 0 : t.scrollToFirstError)), r;
|
|
447
|
+
}, O = async (e, t) => {
|
|
448
|
+
let n = b(e);
|
|
431
449
|
return (await Promise.all(n.map((e) => e.validate(t)))).every(Boolean);
|
|
432
|
-
},
|
|
433
|
-
|
|
450
|
+
}, re = (e) => {
|
|
451
|
+
b(e).forEach((e) => e.resetField());
|
|
434
452
|
}, k = (e) => {
|
|
435
|
-
|
|
453
|
+
b(e).forEach((e) => e.clearValidate());
|
|
436
454
|
}, A = (e, t) => {
|
|
437
|
-
|
|
438
|
-
},
|
|
455
|
+
b(e)[0]?.getElement()?.scrollIntoView(t ?? { block: "nearest" });
|
|
456
|
+
}, ie = () => t.model, j = async (e) => {
|
|
439
457
|
e.preventDefault();
|
|
440
|
-
let
|
|
441
|
-
|
|
458
|
+
let n = await D();
|
|
459
|
+
a("submit", n, e), n && t.name && _ && _.triggerFormFinish(t.name, t.model);
|
|
442
460
|
};
|
|
443
|
-
|
|
461
|
+
p(() => t.rules, () => {
|
|
444
462
|
t.validateOnRuleChange && k();
|
|
445
|
-
}),
|
|
463
|
+
}), p(() => t.model, () => {
|
|
446
464
|
g.value.forEach((e) => {
|
|
447
465
|
e.dependencies.length > 0 && e.validate();
|
|
448
466
|
});
|
|
449
467
|
}, { deep: !0 });
|
|
450
|
-
let
|
|
451
|
-
validate:
|
|
452
|
-
validateField:
|
|
453
|
-
resetFields:
|
|
468
|
+
let M = {
|
|
469
|
+
validate: D,
|
|
470
|
+
validateField: O,
|
|
471
|
+
resetFields: re,
|
|
454
472
|
clearValidate: k,
|
|
455
473
|
scrollToField: A,
|
|
456
|
-
getFieldsValue:
|
|
474
|
+
getFieldsValue: ie
|
|
457
475
|
};
|
|
458
|
-
return
|
|
459
|
-
t.name &&
|
|
460
|
-
}),
|
|
461
|
-
t.name &&
|
|
462
|
-
}),
|
|
463
|
-
model:
|
|
464
|
-
rules:
|
|
465
|
-
initialValues:
|
|
466
|
-
validateMessages:
|
|
467
|
-
disabled:
|
|
468
|
-
labelWidth:
|
|
469
|
-
labelPosition:
|
|
470
|
-
layout:
|
|
471
|
-
colon:
|
|
472
|
-
requiredMark:
|
|
473
|
-
preserve:
|
|
474
|
-
labelCol:
|
|
475
|
-
wrapperCol:
|
|
476
|
-
hasFeedback:
|
|
477
|
-
addField:
|
|
478
|
-
removeField:
|
|
479
|
-
emitValidate:
|
|
480
|
-
validateField:
|
|
476
|
+
return l(M), o(() => {
|
|
477
|
+
t.name && _ && _.registerForm(t.name, M);
|
|
478
|
+
}), s(() => {
|
|
479
|
+
t.name && _ && _.unregisterForm(t.name);
|
|
480
|
+
}), c(te, {
|
|
481
|
+
model: f(t, "model"),
|
|
482
|
+
rules: f(t, "rules"),
|
|
483
|
+
initialValues: f(t, "initialValues"),
|
|
484
|
+
validateMessages: f(t, "validateMessages"),
|
|
485
|
+
disabled: f(t, "disabled"),
|
|
486
|
+
labelWidth: f(t, "labelWidth"),
|
|
487
|
+
labelPosition: f(t, "labelPosition"),
|
|
488
|
+
layout: f(t, "layout"),
|
|
489
|
+
colon: f(t, "colon"),
|
|
490
|
+
requiredMark: f(t, "requiredMark"),
|
|
491
|
+
preserve: f(t, "preserve"),
|
|
492
|
+
labelCol: f(t, "labelCol"),
|
|
493
|
+
wrapperCol: f(t, "wrapperCol"),
|
|
494
|
+
hasFeedback: f(t, "hasFeedback"),
|
|
495
|
+
addField: S,
|
|
496
|
+
removeField: C,
|
|
497
|
+
emitValidate: ne,
|
|
498
|
+
validateField: O,
|
|
481
499
|
notifyFieldChange: w
|
|
482
500
|
}), () => r("form", {
|
|
483
501
|
class: T.value,
|
|
484
502
|
novalidate: !0,
|
|
485
|
-
onSubmit:
|
|
486
|
-
},
|
|
503
|
+
onSubmit: j
|
|
504
|
+
}, d.default?.());
|
|
505
|
+
}
|
|
506
|
+
}), le = /^[a-z0-9]+(-[a-z0-9]+)*$/, I = (e, t, n, r = "") => {
|
|
507
|
+
let i = e.split(":");
|
|
508
|
+
if (e.slice(0, 1) === "@") {
|
|
509
|
+
if (i.length < 2 || i.length > 3) return null;
|
|
510
|
+
r = i.shift().slice(1);
|
|
511
|
+
}
|
|
512
|
+
if (i.length > 3 || !i.length) return null;
|
|
513
|
+
if (i.length > 1) {
|
|
514
|
+
let e = i.pop(), n = i.pop(), a = {
|
|
515
|
+
provider: i.length > 0 ? i[0] : r,
|
|
516
|
+
prefix: n,
|
|
517
|
+
name: e
|
|
518
|
+
};
|
|
519
|
+
return t && !L(a) ? null : a;
|
|
520
|
+
}
|
|
521
|
+
let a = i[0], o = a.split("-");
|
|
522
|
+
if (o.length > 1) {
|
|
523
|
+
let e = {
|
|
524
|
+
provider: r,
|
|
525
|
+
prefix: o.shift(),
|
|
526
|
+
name: o.join("-")
|
|
527
|
+
};
|
|
528
|
+
return t && !L(e) ? null : e;
|
|
529
|
+
}
|
|
530
|
+
if (n && r === "") {
|
|
531
|
+
let e = {
|
|
532
|
+
provider: r,
|
|
533
|
+
prefix: "",
|
|
534
|
+
name: a
|
|
535
|
+
};
|
|
536
|
+
return t && !L(e, n) ? null : e;
|
|
487
537
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
538
|
+
return null;
|
|
539
|
+
}, L = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
540
|
+
function ue(e, t) {
|
|
541
|
+
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
542
|
+
function a(e) {
|
|
543
|
+
if (n[e]) return i[e] = [];
|
|
544
|
+
if (!(e in i)) {
|
|
545
|
+
i[e] = null;
|
|
546
|
+
let t = r[e] && r[e].parent, n = t && a(t);
|
|
547
|
+
n && (i[e] = [t].concat(n));
|
|
548
|
+
}
|
|
549
|
+
return i[e];
|
|
550
|
+
}
|
|
551
|
+
return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
|
|
492
552
|
}
|
|
493
|
-
|
|
494
|
-
|
|
553
|
+
var de = Object.freeze({
|
|
554
|
+
left: 0,
|
|
555
|
+
top: 0,
|
|
556
|
+
width: 16,
|
|
557
|
+
height: 16
|
|
558
|
+
}), R = Object.freeze({
|
|
559
|
+
rotate: 0,
|
|
560
|
+
vFlip: !1,
|
|
561
|
+
hFlip: !1
|
|
562
|
+
}), z = Object.freeze({
|
|
563
|
+
...de,
|
|
564
|
+
...R
|
|
565
|
+
}), B = Object.freeze({
|
|
566
|
+
...z,
|
|
567
|
+
body: "",
|
|
568
|
+
hidden: !1
|
|
569
|
+
});
|
|
570
|
+
function fe(e, t) {
|
|
571
|
+
let n = {};
|
|
572
|
+
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
573
|
+
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
574
|
+
return r && (n.rotate = r), n;
|
|
575
|
+
}
|
|
576
|
+
function V(e, t) {
|
|
577
|
+
let n = fe(e, t);
|
|
578
|
+
for (let r in B) r in R ? r in e && !(r in n) && (n[r] = R[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
579
|
+
return n;
|
|
580
|
+
}
|
|
581
|
+
function H(e, t, n) {
|
|
582
|
+
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
583
|
+
function o(e) {
|
|
584
|
+
a = V(r[e] || i[e], a);
|
|
585
|
+
}
|
|
586
|
+
return o(t), n.forEach(o), V(e, a);
|
|
587
|
+
}
|
|
588
|
+
function U(e, t) {
|
|
589
|
+
let n = [];
|
|
590
|
+
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
591
|
+
e.not_found instanceof Array && e.not_found.forEach((e) => {
|
|
592
|
+
t(e, null), n.push(e);
|
|
593
|
+
});
|
|
594
|
+
let r = ue(e);
|
|
595
|
+
for (let i in r) {
|
|
596
|
+
let a = r[i];
|
|
597
|
+
a && (t(i, H(e, i, a)), n.push(i));
|
|
598
|
+
}
|
|
599
|
+
return n;
|
|
600
|
+
}
|
|
601
|
+
var pe = {
|
|
602
|
+
provider: "",
|
|
603
|
+
aliases: {},
|
|
604
|
+
not_found: {},
|
|
605
|
+
...de
|
|
606
|
+
};
|
|
607
|
+
function W(e, t) {
|
|
608
|
+
for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
609
|
+
return !0;
|
|
610
|
+
}
|
|
611
|
+
function G(e) {
|
|
612
|
+
if (typeof e != "object" || !e) return null;
|
|
613
|
+
let t = e;
|
|
614
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !W(e, pe)) return null;
|
|
615
|
+
let n = t.icons;
|
|
616
|
+
for (let e in n) {
|
|
617
|
+
let t = n[e];
|
|
618
|
+
if (!e || typeof t.body != "string" || !W(t, B)) return null;
|
|
619
|
+
}
|
|
620
|
+
let r = t.aliases || Object.create(null);
|
|
621
|
+
for (let e in r) {
|
|
622
|
+
let t = r[e], i = t.parent;
|
|
623
|
+
if (!e || typeof i != "string" || !n[i] && !r[i] || !W(t, B)) return null;
|
|
624
|
+
}
|
|
625
|
+
return t;
|
|
626
|
+
}
|
|
627
|
+
var K = Object.create(null);
|
|
628
|
+
function me(e, t) {
|
|
629
|
+
return {
|
|
630
|
+
provider: e,
|
|
631
|
+
prefix: t,
|
|
632
|
+
icons: Object.create(null),
|
|
633
|
+
missing: /* @__PURE__ */ new Set()
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function q(e, t) {
|
|
637
|
+
let n = K[e] || (K[e] = Object.create(null));
|
|
638
|
+
return n[t] || (n[t] = me(e, t));
|
|
639
|
+
}
|
|
640
|
+
function J(e, t) {
|
|
641
|
+
return G(t) ? U(t, (t, n) => {
|
|
642
|
+
n ? e.icons[t] = n : e.missing.add(t);
|
|
643
|
+
}) : [];
|
|
644
|
+
}
|
|
645
|
+
function he(e, t, n) {
|
|
646
|
+
try {
|
|
647
|
+
if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
|
|
648
|
+
} catch {}
|
|
649
|
+
return !1;
|
|
650
|
+
}
|
|
651
|
+
var Y = !1;
|
|
652
|
+
function ge(e) {
|
|
653
|
+
return typeof e == "boolean" && (Y = e), Y;
|
|
654
|
+
}
|
|
655
|
+
function _e(e) {
|
|
656
|
+
let t = typeof e == "string" ? I(e, !0, Y) : e;
|
|
657
|
+
if (t) {
|
|
658
|
+
let e = q(t.provider, t.prefix), n = t.name;
|
|
659
|
+
return e.icons[n] || (e.missing.has(n) ? null : void 0);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
function ve(e, t) {
|
|
663
|
+
let n = I(e, !0, Y);
|
|
664
|
+
if (!n) return !1;
|
|
665
|
+
let r = q(n.provider, n.prefix);
|
|
666
|
+
return t ? he(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
667
|
+
}
|
|
668
|
+
function ye(e, t) {
|
|
669
|
+
if (typeof e != "object") return !1;
|
|
670
|
+
if (typeof t != "string" && (t = e.provider || ""), Y && !t && !e.prefix) {
|
|
671
|
+
let t = !1;
|
|
672
|
+
return G(e) && (e.prefix = "", U(e, (e, n) => {
|
|
673
|
+
ve(e, n) && (t = !0);
|
|
674
|
+
})), t;
|
|
675
|
+
}
|
|
676
|
+
let n = e.prefix;
|
|
677
|
+
return L({
|
|
678
|
+
prefix: n,
|
|
679
|
+
name: "a"
|
|
680
|
+
}) ? !!J(q(t, n), e) : !1;
|
|
681
|
+
}
|
|
682
|
+
var be = Object.freeze({
|
|
683
|
+
width: null,
|
|
684
|
+
height: null
|
|
685
|
+
}), xe = Object.freeze({
|
|
686
|
+
...be,
|
|
687
|
+
...R
|
|
688
|
+
}), Se = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ce = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
689
|
+
function we(e, t, n) {
|
|
690
|
+
if (t === 1) return e;
|
|
691
|
+
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
692
|
+
if (typeof e != "string") return e;
|
|
693
|
+
let r = e.split(Se);
|
|
694
|
+
if (r === null || !r.length) return e;
|
|
695
|
+
let i = [], a = r.shift(), o = Ce.test(a);
|
|
696
|
+
for (;;) {
|
|
697
|
+
if (o) {
|
|
698
|
+
let e = parseFloat(a);
|
|
699
|
+
isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
|
|
700
|
+
} else i.push(a);
|
|
701
|
+
if (a = r.shift(), a === void 0) return i.join("");
|
|
702
|
+
o = !o;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
function Te(e, t = "defs") {
|
|
706
|
+
let n = "", r = e.indexOf("<" + t);
|
|
707
|
+
for (; r >= 0;) {
|
|
708
|
+
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
709
|
+
if (i === -1 || a === -1) break;
|
|
710
|
+
let o = e.indexOf(">", a);
|
|
711
|
+
if (o === -1) break;
|
|
712
|
+
n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
|
|
713
|
+
}
|
|
714
|
+
return {
|
|
715
|
+
defs: n,
|
|
716
|
+
content: e
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
function Ee(e, t) {
|
|
720
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
721
|
+
}
|
|
722
|
+
function De(e, t, n) {
|
|
723
|
+
let r = Te(e);
|
|
724
|
+
return Ee(r.defs, t + r.content + n);
|
|
725
|
+
}
|
|
726
|
+
var Oe = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
727
|
+
function ke(e, t) {
|
|
728
|
+
let n = {
|
|
729
|
+
...z,
|
|
730
|
+
...e
|
|
731
|
+
}, r = {
|
|
732
|
+
...xe,
|
|
733
|
+
...t
|
|
734
|
+
}, i = {
|
|
735
|
+
left: n.left,
|
|
736
|
+
top: n.top,
|
|
737
|
+
width: n.width,
|
|
738
|
+
height: n.height
|
|
739
|
+
}, a = n.body;
|
|
740
|
+
[n, r].forEach((e) => {
|
|
741
|
+
let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
|
|
742
|
+
n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
|
|
743
|
+
let s;
|
|
744
|
+
switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
|
|
745
|
+
case 1:
|
|
746
|
+
s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
|
|
747
|
+
break;
|
|
748
|
+
case 2:
|
|
749
|
+
t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
750
|
+
break;
|
|
751
|
+
case 3:
|
|
752
|
+
s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = De(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
756
|
+
});
|
|
757
|
+
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
758
|
+
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = we(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? we(u, l / c) : s === "auto" ? l : s);
|
|
759
|
+
let f = {}, p = (e, t) => {
|
|
760
|
+
Oe(t) || (f[e] = t.toString());
|
|
761
|
+
};
|
|
762
|
+
p("width", u), p("height", d);
|
|
763
|
+
let m = [
|
|
764
|
+
i.left,
|
|
765
|
+
i.top,
|
|
766
|
+
c,
|
|
767
|
+
l
|
|
768
|
+
];
|
|
769
|
+
return f.viewBox = m.join(" "), {
|
|
770
|
+
attributes: f,
|
|
771
|
+
viewBox: m,
|
|
772
|
+
body: a
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
var Ae = /\sid="(\S+)"/g, je = /* @__PURE__ */ new Map();
|
|
776
|
+
function Me(e) {
|
|
777
|
+
e = e.replace(/[0-9]+$/, "") || "a";
|
|
778
|
+
let t = je.get(e) || 0;
|
|
779
|
+
return je.set(e, t + 1), t ? `${e}${t}` : e;
|
|
780
|
+
}
|
|
781
|
+
function Ne(e) {
|
|
782
|
+
let t = [], n;
|
|
783
|
+
for (; n = Ae.exec(e);) t.push(n[1]);
|
|
784
|
+
if (!t.length) return e;
|
|
785
|
+
let r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
786
|
+
return t.forEach((t) => {
|
|
787
|
+
let n = Me(t), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
788
|
+
e = e.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + n + r + "$3");
|
|
789
|
+
}), e = e.replace(new RegExp(r, "g"), ""), e;
|
|
790
|
+
}
|
|
791
|
+
var Pe = Object.create(null);
|
|
792
|
+
function Fe(e, t) {
|
|
793
|
+
Pe[e] = t;
|
|
794
|
+
}
|
|
795
|
+
function Ie(e) {
|
|
796
|
+
return Pe[e] || Pe[""];
|
|
797
|
+
}
|
|
798
|
+
function Le(e) {
|
|
799
|
+
let t;
|
|
800
|
+
if (typeof e.resources == "string") t = [e.resources];
|
|
801
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
802
|
+
return {
|
|
803
|
+
resources: t,
|
|
804
|
+
path: e.path || "/",
|
|
805
|
+
maxURL: e.maxURL || 500,
|
|
806
|
+
rotate: e.rotate || 750,
|
|
807
|
+
timeout: e.timeout || 5e3,
|
|
808
|
+
random: e.random === !0,
|
|
809
|
+
index: e.index || 0,
|
|
810
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
for (var Re = Object.create(null), ze = ["https://api.simplesvg.com", "https://api.unisvg.com"], Be = []; ze.length > 0;) ze.length === 1 || Math.random() > .5 ? Be.push(ze.shift()) : Be.push(ze.pop());
|
|
814
|
+
Re[""] = Le({ resources: ["https://api.iconify.design"].concat(Be) });
|
|
815
|
+
function Ve(e, t) {
|
|
816
|
+
let n = Le(t);
|
|
817
|
+
return n === null ? !1 : (Re[e] = n, !0);
|
|
818
|
+
}
|
|
819
|
+
function He(e) {
|
|
820
|
+
return Re[e];
|
|
821
|
+
}
|
|
822
|
+
var Ue = (() => {
|
|
823
|
+
let e;
|
|
824
|
+
try {
|
|
825
|
+
if (e = fetch, typeof e == "function") return e;
|
|
826
|
+
} catch {}
|
|
827
|
+
})();
|
|
828
|
+
function We(e, t) {
|
|
829
|
+
let n = He(e);
|
|
830
|
+
if (!n) return 0;
|
|
831
|
+
let r;
|
|
832
|
+
if (!n.maxURL) r = 0;
|
|
833
|
+
else {
|
|
834
|
+
let e = 0;
|
|
835
|
+
n.resources.forEach((t) => {
|
|
836
|
+
e = Math.max(e, t.length);
|
|
837
|
+
});
|
|
838
|
+
let i = t + ".json?icons=";
|
|
839
|
+
r = n.maxURL - e - n.path.length - i.length;
|
|
840
|
+
}
|
|
841
|
+
return r;
|
|
842
|
+
}
|
|
843
|
+
function Ge(e) {
|
|
844
|
+
return e === 404;
|
|
845
|
+
}
|
|
846
|
+
var Ke = (e, t, n) => {
|
|
847
|
+
let r = [], i = We(e, t), a = "icons", o = {
|
|
848
|
+
type: a,
|
|
849
|
+
provider: e,
|
|
850
|
+
prefix: t,
|
|
851
|
+
icons: []
|
|
852
|
+
}, s = 0;
|
|
853
|
+
return n.forEach((n, c) => {
|
|
854
|
+
s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
|
|
855
|
+
type: a,
|
|
856
|
+
provider: e,
|
|
857
|
+
prefix: t,
|
|
858
|
+
icons: []
|
|
859
|
+
}, s = n.length), o.icons.push(n);
|
|
860
|
+
}), r.push(o), r;
|
|
861
|
+
};
|
|
862
|
+
function qe(e) {
|
|
863
|
+
if (typeof e == "string") {
|
|
864
|
+
let t = He(e);
|
|
865
|
+
if (t) return t.path;
|
|
866
|
+
}
|
|
867
|
+
return "/";
|
|
868
|
+
}
|
|
869
|
+
var Je = {
|
|
870
|
+
prepare: Ke,
|
|
871
|
+
send: (e, t, n) => {
|
|
872
|
+
if (!Ue) {
|
|
873
|
+
n("abort", 424);
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
let r = qe(t.provider);
|
|
877
|
+
switch (t.type) {
|
|
878
|
+
case "icons": {
|
|
879
|
+
let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
|
|
880
|
+
r += e + ".json?" + i.toString();
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
case "custom": {
|
|
884
|
+
let e = t.uri;
|
|
885
|
+
r += e.slice(0, 1) === "/" ? e.slice(1) : e;
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
default:
|
|
889
|
+
n("abort", 400);
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
let i = 503;
|
|
893
|
+
Ue(e + r).then((e) => {
|
|
894
|
+
let t = e.status;
|
|
895
|
+
if (t !== 200) {
|
|
896
|
+
setTimeout(() => {
|
|
897
|
+
n(Ge(t) ? "abort" : "next", t);
|
|
898
|
+
});
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
return i = 501, e.json();
|
|
902
|
+
}).then((e) => {
|
|
903
|
+
if (typeof e != "object" || !e) {
|
|
904
|
+
setTimeout(() => {
|
|
905
|
+
e === 404 ? n("abort", e) : n("next", i);
|
|
906
|
+
});
|
|
907
|
+
return;
|
|
908
|
+
}
|
|
909
|
+
setTimeout(() => {
|
|
910
|
+
n("success", e);
|
|
911
|
+
});
|
|
912
|
+
}).catch(() => {
|
|
913
|
+
n("next", i);
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
function Ye(e, t) {
|
|
918
|
+
e.forEach((e) => {
|
|
919
|
+
let n = e.loaderCallbacks;
|
|
920
|
+
n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
function Xe(e) {
|
|
924
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
925
|
+
e.pendingCallbacksFlag = !1;
|
|
926
|
+
let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
927
|
+
if (!t.length) return;
|
|
928
|
+
let n = !1, r = e.provider, i = e.prefix;
|
|
929
|
+
t.forEach((t) => {
|
|
930
|
+
let a = t.icons, o = a.pending.length;
|
|
931
|
+
a.pending = a.pending.filter((t) => {
|
|
932
|
+
if (t.prefix !== i) return !0;
|
|
933
|
+
let o = t.name;
|
|
934
|
+
if (e.icons[o]) a.loaded.push({
|
|
935
|
+
provider: r,
|
|
936
|
+
prefix: i,
|
|
937
|
+
name: o
|
|
938
|
+
});
|
|
939
|
+
else if (e.missing.has(o)) a.missing.push({
|
|
940
|
+
provider: r,
|
|
941
|
+
prefix: i,
|
|
942
|
+
name: o
|
|
943
|
+
});
|
|
944
|
+
else return n = !0, !0;
|
|
945
|
+
return !1;
|
|
946
|
+
}), a.pending.length !== o && (n || Ye([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
|
|
947
|
+
});
|
|
948
|
+
}));
|
|
949
|
+
}
|
|
950
|
+
var Ze = 0;
|
|
951
|
+
function Qe(e, t, n) {
|
|
952
|
+
let r = Ze++, i = Ye.bind(null, n, r);
|
|
953
|
+
if (!t.pending.length) return i;
|
|
954
|
+
let a = {
|
|
955
|
+
id: r,
|
|
956
|
+
icons: t,
|
|
957
|
+
callback: e,
|
|
958
|
+
abort: i
|
|
959
|
+
};
|
|
960
|
+
return n.forEach((e) => {
|
|
961
|
+
(e.loaderCallbacks ||= []).push(a);
|
|
962
|
+
}), i;
|
|
963
|
+
}
|
|
964
|
+
function $e(e) {
|
|
965
|
+
let t = {
|
|
966
|
+
loaded: [],
|
|
967
|
+
missing: [],
|
|
968
|
+
pending: []
|
|
969
|
+
}, n = Object.create(null);
|
|
970
|
+
e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
|
|
971
|
+
let r = {
|
|
972
|
+
provider: "",
|
|
973
|
+
prefix: "",
|
|
974
|
+
name: ""
|
|
975
|
+
};
|
|
976
|
+
return e.forEach((e) => {
|
|
977
|
+
if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
|
|
978
|
+
r = e;
|
|
979
|
+
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = q(i, a)), l;
|
|
980
|
+
l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
|
|
981
|
+
let u = {
|
|
982
|
+
provider: i,
|
|
983
|
+
prefix: a,
|
|
984
|
+
name: o
|
|
985
|
+
};
|
|
986
|
+
l.push(u);
|
|
987
|
+
}), t;
|
|
988
|
+
}
|
|
989
|
+
function et(e, t = !0, n = !1) {
|
|
990
|
+
let r = [];
|
|
991
|
+
return e.forEach((e) => {
|
|
992
|
+
let i = typeof e == "string" ? I(e, t, n) : e;
|
|
993
|
+
i && r.push(i);
|
|
994
|
+
}), r;
|
|
995
|
+
}
|
|
996
|
+
var tt = {
|
|
997
|
+
resources: [],
|
|
998
|
+
index: 0,
|
|
999
|
+
timeout: 2e3,
|
|
1000
|
+
rotate: 750,
|
|
1001
|
+
random: !1,
|
|
1002
|
+
dataAfterTimeout: !1
|
|
1003
|
+
};
|
|
1004
|
+
function nt(e, t, n, r) {
|
|
1005
|
+
let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
|
|
1006
|
+
if (e.random) {
|
|
1007
|
+
let t = e.resources.slice(0);
|
|
1008
|
+
for (o = []; t.length > 1;) {
|
|
1009
|
+
let e = Math.floor(Math.random() * t.length);
|
|
1010
|
+
o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
|
|
1011
|
+
}
|
|
1012
|
+
o = o.concat(t);
|
|
1013
|
+
} else o = e.resources.slice(a).concat(e.resources.slice(0, a));
|
|
1014
|
+
let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
|
|
1015
|
+
typeof r == "function" && p.push(r);
|
|
1016
|
+
function m() {
|
|
1017
|
+
d &&= (clearTimeout(d), null);
|
|
1018
|
+
}
|
|
1019
|
+
function h() {
|
|
1020
|
+
c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
|
|
1021
|
+
e.status === "pending" && (e.status = "aborted");
|
|
1022
|
+
}), f = [];
|
|
1023
|
+
}
|
|
1024
|
+
function g(e, t) {
|
|
1025
|
+
t && (p = []), typeof e == "function" && p.push(e);
|
|
1026
|
+
}
|
|
1027
|
+
function _() {
|
|
1028
|
+
return {
|
|
1029
|
+
startTime: s,
|
|
1030
|
+
payload: t,
|
|
1031
|
+
status: c,
|
|
1032
|
+
queriesSent: l,
|
|
1033
|
+
queriesPending: f.length,
|
|
1034
|
+
subscribe: g,
|
|
1035
|
+
abort: h
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
function v() {
|
|
1039
|
+
c = "failed", p.forEach((e) => {
|
|
1040
|
+
e(void 0, u);
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
function ee() {
|
|
1044
|
+
f.forEach((e) => {
|
|
1045
|
+
e.status === "pending" && (e.status = "aborted");
|
|
1046
|
+
}), f = [];
|
|
1047
|
+
}
|
|
1048
|
+
function te(t, n, r) {
|
|
1049
|
+
let i = n !== "success";
|
|
1050
|
+
switch (f = f.filter((e) => e !== t), c) {
|
|
1051
|
+
case "pending": break;
|
|
1052
|
+
case "failed":
|
|
1053
|
+
if (i || !e.dataAfterTimeout) return;
|
|
1054
|
+
break;
|
|
1055
|
+
default: return;
|
|
1056
|
+
}
|
|
1057
|
+
if (n === "abort") {
|
|
1058
|
+
u = r, v();
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
if (i) {
|
|
1062
|
+
u = r, f.length || (o.length ? y() : v());
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
if (m(), ee(), !e.random) {
|
|
1066
|
+
let n = e.resources.indexOf(t.resource);
|
|
1067
|
+
n !== -1 && n !== e.index && (e.index = n);
|
|
1068
|
+
}
|
|
1069
|
+
c = "completed", p.forEach((e) => {
|
|
1070
|
+
e(r);
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
function y() {
|
|
1074
|
+
if (c !== "pending") return;
|
|
1075
|
+
m();
|
|
1076
|
+
let r = o.shift();
|
|
1077
|
+
if (r === void 0) {
|
|
1078
|
+
if (f.length) {
|
|
1079
|
+
d = setTimeout(() => {
|
|
1080
|
+
m(), c === "pending" && (ee(), v());
|
|
1081
|
+
}, e.timeout);
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
v();
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
let i = {
|
|
1088
|
+
status: "pending",
|
|
1089
|
+
resource: r,
|
|
1090
|
+
callback: (e, t) => {
|
|
1091
|
+
te(i, e, t);
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
f.push(i), l++, d = setTimeout(y, e.rotate), n(r, t, i.callback);
|
|
1095
|
+
}
|
|
1096
|
+
return setTimeout(y), _;
|
|
1097
|
+
}
|
|
1098
|
+
function rt(e) {
|
|
1099
|
+
let t = {
|
|
1100
|
+
...tt,
|
|
1101
|
+
...e
|
|
1102
|
+
}, n = [];
|
|
1103
|
+
function r() {
|
|
1104
|
+
n = n.filter((e) => e().status === "pending");
|
|
1105
|
+
}
|
|
1106
|
+
function i(e, i, a) {
|
|
1107
|
+
let o = nt(t, e, i, (e, t) => {
|
|
1108
|
+
r(), a && a(e, t);
|
|
1109
|
+
});
|
|
1110
|
+
return n.push(o), o;
|
|
1111
|
+
}
|
|
1112
|
+
function a(e) {
|
|
1113
|
+
return n.find((t) => e(t)) || null;
|
|
1114
|
+
}
|
|
1115
|
+
return {
|
|
1116
|
+
query: i,
|
|
1117
|
+
find: a,
|
|
1118
|
+
setIndex: (e) => {
|
|
1119
|
+
t.index = e;
|
|
1120
|
+
},
|
|
1121
|
+
getIndex: () => t.index,
|
|
1122
|
+
cleanup: r
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
function it() {}
|
|
1126
|
+
var at = Object.create(null);
|
|
1127
|
+
function ot(e) {
|
|
1128
|
+
if (!at[e]) {
|
|
1129
|
+
let t = He(e);
|
|
1130
|
+
if (!t) return;
|
|
1131
|
+
at[e] = {
|
|
1132
|
+
config: t,
|
|
1133
|
+
redundancy: rt(t)
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
return at[e];
|
|
1137
|
+
}
|
|
1138
|
+
function st(e, t, n) {
|
|
1139
|
+
let r, i;
|
|
1140
|
+
if (typeof e == "string") {
|
|
1141
|
+
let t = Ie(e);
|
|
1142
|
+
if (!t) return n(void 0, 424), it;
|
|
1143
|
+
i = t.send;
|
|
1144
|
+
let a = ot(e);
|
|
1145
|
+
a && (r = a.redundancy);
|
|
1146
|
+
} else {
|
|
1147
|
+
let t = Le(e);
|
|
1148
|
+
if (t) {
|
|
1149
|
+
r = rt(t);
|
|
1150
|
+
let n = Ie(e.resources ? e.resources[0] : "");
|
|
1151
|
+
n && (i = n.send);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
return !r || !i ? (n(void 0, 424), it) : r.query(t, i, n)().abort;
|
|
1155
|
+
}
|
|
1156
|
+
function ct() {}
|
|
1157
|
+
function lt(e) {
|
|
1158
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
1159
|
+
e.iconsLoaderFlag = !1, Xe(e);
|
|
1160
|
+
}));
|
|
1161
|
+
}
|
|
1162
|
+
function ut(e) {
|
|
1163
|
+
let t = [], n = [];
|
|
1164
|
+
return e.forEach((e) => {
|
|
1165
|
+
(e.match(le) ? t : n).push(e);
|
|
1166
|
+
}), {
|
|
1167
|
+
valid: t,
|
|
1168
|
+
invalid: n
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
function X(e, t, n) {
|
|
1172
|
+
function r() {
|
|
1173
|
+
let n = e.pendingIcons;
|
|
1174
|
+
t.forEach((t) => {
|
|
1175
|
+
n && n.delete(t), e.icons[t] || e.missing.add(t);
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
if (n && typeof n == "object") try {
|
|
1179
|
+
if (!J(e, n).length) {
|
|
1180
|
+
r();
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1183
|
+
} catch (e) {
|
|
1184
|
+
console.error(e);
|
|
1185
|
+
}
|
|
1186
|
+
r(), lt(e);
|
|
1187
|
+
}
|
|
1188
|
+
function dt(e, t) {
|
|
1189
|
+
e instanceof Promise ? e.then((e) => {
|
|
1190
|
+
t(e);
|
|
1191
|
+
}).catch(() => {
|
|
1192
|
+
t(null);
|
|
1193
|
+
}) : t(e);
|
|
1194
|
+
}
|
|
1195
|
+
function ft(e, t) {
|
|
1196
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1197
|
+
e.iconsQueueFlag = !1;
|
|
1198
|
+
let { provider: t, prefix: n } = e, r = e.iconsToLoad;
|
|
1199
|
+
if (delete e.iconsToLoad, !r || !r.length) return;
|
|
1200
|
+
let i = e.loadIcon;
|
|
1201
|
+
if (e.loadIcons && (r.length > 1 || !i)) {
|
|
1202
|
+
dt(e.loadIcons(r, n, t), (t) => {
|
|
1203
|
+
X(e, r, t);
|
|
1204
|
+
});
|
|
1205
|
+
return;
|
|
1206
|
+
}
|
|
1207
|
+
if (i) {
|
|
1208
|
+
r.forEach((r) => {
|
|
1209
|
+
dt(i(r, n, t), (t) => {
|
|
1210
|
+
X(e, [r], t ? {
|
|
1211
|
+
prefix: n,
|
|
1212
|
+
icons: { [r]: t }
|
|
1213
|
+
} : null);
|
|
1214
|
+
});
|
|
1215
|
+
});
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
let { valid: a, invalid: o } = ut(r);
|
|
1219
|
+
if (o.length && X(e, o, null), !a.length) return;
|
|
1220
|
+
let s = n.match(le) ? Ie(t) : null;
|
|
1221
|
+
if (!s) {
|
|
1222
|
+
X(e, a, null);
|
|
1223
|
+
return;
|
|
1224
|
+
}
|
|
1225
|
+
s.prepare(t, n, a).forEach((n) => {
|
|
1226
|
+
st(t, n, (t) => {
|
|
1227
|
+
X(e, n.icons, t);
|
|
1228
|
+
});
|
|
1229
|
+
});
|
|
1230
|
+
}));
|
|
1231
|
+
}
|
|
1232
|
+
var pt = (e, t) => {
|
|
1233
|
+
let n = $e(et(e, !0, ge()));
|
|
1234
|
+
if (!n.pending.length) {
|
|
1235
|
+
let e = !0;
|
|
1236
|
+
return t && setTimeout(() => {
|
|
1237
|
+
e && t(n.loaded, n.missing, n.pending, ct);
|
|
1238
|
+
}), () => {
|
|
1239
|
+
e = !1;
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
let r = Object.create(null), i = [], a, o;
|
|
1243
|
+
return n.pending.forEach((e) => {
|
|
1244
|
+
let { provider: t, prefix: n } = e;
|
|
1245
|
+
if (n === o && t === a) return;
|
|
1246
|
+
a = t, o = n, i.push(q(t, n));
|
|
1247
|
+
let s = r[t] || (r[t] = Object.create(null));
|
|
1248
|
+
s[n] || (s[n] = []);
|
|
1249
|
+
}), n.pending.forEach((e) => {
|
|
1250
|
+
let { provider: t, prefix: n, name: i } = e, a = q(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
|
|
1251
|
+
o.has(i) || (o.add(i), r[t][n].push(i));
|
|
1252
|
+
}), i.forEach((e) => {
|
|
1253
|
+
let t = r[e.provider][e.prefix];
|
|
1254
|
+
t.length && ft(e, t);
|
|
1255
|
+
}), t ? Qe(t, n, i) : ct;
|
|
1256
|
+
};
|
|
1257
|
+
function mt(e, t) {
|
|
1258
|
+
let n = { ...e };
|
|
1259
|
+
for (let e in t) {
|
|
1260
|
+
let r = t[e], i = typeof r;
|
|
1261
|
+
e in be ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
|
|
1262
|
+
}
|
|
1263
|
+
return n;
|
|
1264
|
+
}
|
|
1265
|
+
var ht = /[\s,]+/;
|
|
1266
|
+
function gt(e, t) {
|
|
1267
|
+
t.split(ht).forEach((t) => {
|
|
1268
|
+
switch (t.trim()) {
|
|
1269
|
+
case "horizontal":
|
|
1270
|
+
e.hFlip = !0;
|
|
1271
|
+
break;
|
|
1272
|
+
case "vertical":
|
|
1273
|
+
e.vFlip = !0;
|
|
1274
|
+
break;
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
function _t(e, t = 0) {
|
|
1279
|
+
let n = e.replace(/^-?[0-9.]*/, "");
|
|
1280
|
+
function r(e) {
|
|
1281
|
+
for (; e < 0;) e += 4;
|
|
1282
|
+
return e % 4;
|
|
1283
|
+
}
|
|
1284
|
+
if (n === "") {
|
|
1285
|
+
let t = parseInt(e);
|
|
1286
|
+
return isNaN(t) ? 0 : r(t);
|
|
1287
|
+
} else if (n !== e) {
|
|
1288
|
+
let t = 0;
|
|
1289
|
+
switch (n) {
|
|
1290
|
+
case "%":
|
|
1291
|
+
t = 25;
|
|
1292
|
+
break;
|
|
1293
|
+
case "deg": t = 90;
|
|
1294
|
+
}
|
|
1295
|
+
if (t) {
|
|
1296
|
+
let i = parseFloat(e.slice(0, e.length - n.length));
|
|
1297
|
+
return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
return t;
|
|
1301
|
+
}
|
|
1302
|
+
function vt(e, t) {
|
|
1303
|
+
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
1304
|
+
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
1305
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
1306
|
+
}
|
|
1307
|
+
function yt(e) {
|
|
1308
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1309
|
+
}
|
|
1310
|
+
function bt(e) {
|
|
1311
|
+
return "data:image/svg+xml," + yt(e);
|
|
1312
|
+
}
|
|
1313
|
+
function xt(e) {
|
|
1314
|
+
return "url(\"" + bt(e) + "\")";
|
|
1315
|
+
}
|
|
1316
|
+
var St = {
|
|
1317
|
+
...xe,
|
|
1318
|
+
inline: !1
|
|
1319
|
+
}, Ct = {
|
|
1320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1321
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1322
|
+
"aria-hidden": !0,
|
|
1323
|
+
role: "img"
|
|
1324
|
+
}, wt = { display: "inline-block" }, Tt = { backgroundColor: "currentColor" }, Et = { backgroundColor: "transparent" }, Dt = {
|
|
1325
|
+
Image: "var(--svg)",
|
|
1326
|
+
Repeat: "no-repeat",
|
|
1327
|
+
Size: "100% 100%"
|
|
1328
|
+
}, Ot = {
|
|
1329
|
+
webkitMask: Tt,
|
|
1330
|
+
mask: Tt,
|
|
1331
|
+
background: Et
|
|
1332
|
+
};
|
|
1333
|
+
for (let e in Ot) {
|
|
1334
|
+
let t = Ot[e];
|
|
1335
|
+
for (let n in Dt) t[e + n] = Dt[n];
|
|
1336
|
+
}
|
|
1337
|
+
var kt = {};
|
|
1338
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
1339
|
+
let t = e.slice(0, 1) + "Flip";
|
|
1340
|
+
kt[e + "-flip"] = t, kt[e.slice(0, 1) + "-flip"] = t, kt[e + "Flip"] = t;
|
|
1341
|
+
});
|
|
1342
|
+
function At(e) {
|
|
1343
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1344
|
+
}
|
|
1345
|
+
var jt = (e, t) => {
|
|
1346
|
+
let n = mt(St, t), i = { ...Ct }, a = t.mode || "svg", o = {}, s = t.style, c = typeof s == "object" && !(s instanceof Array) ? s : {};
|
|
1347
|
+
for (let e in t) {
|
|
1348
|
+
let r = t[e];
|
|
1349
|
+
if (r !== void 0) switch (e) {
|
|
1350
|
+
case "icon":
|
|
1351
|
+
case "style":
|
|
1352
|
+
case "onLoad":
|
|
1353
|
+
case "mode":
|
|
1354
|
+
case "ssr":
|
|
1355
|
+
case "customise": break;
|
|
1356
|
+
case "inline":
|
|
1357
|
+
case "hFlip":
|
|
1358
|
+
case "vFlip":
|
|
1359
|
+
n[e] = r === !0 || r === "true" || r === 1;
|
|
1360
|
+
break;
|
|
1361
|
+
case "flip":
|
|
1362
|
+
typeof r == "string" && gt(n, r);
|
|
1363
|
+
break;
|
|
1364
|
+
case "color":
|
|
1365
|
+
o.color = r;
|
|
1366
|
+
break;
|
|
1367
|
+
case "rotate":
|
|
1368
|
+
typeof r == "string" ? n[e] = _t(r) : typeof r == "number" && (n[e] = r);
|
|
1369
|
+
break;
|
|
1370
|
+
case "ariaHidden":
|
|
1371
|
+
case "aria-hidden":
|
|
1372
|
+
r !== !0 && r !== "true" && delete i["aria-hidden"];
|
|
1373
|
+
break;
|
|
1374
|
+
default: {
|
|
1375
|
+
let t = kt[e];
|
|
1376
|
+
t ? (r === !0 || r === "true" || r === 1) && (n[t] = !0) : St[e] === void 0 && (i[e] = r);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
let l = ke(e, n), u = l.attributes;
|
|
1381
|
+
if (n.inline && (o.verticalAlign = "-0.125em"), a === "svg") return i.style = {
|
|
1382
|
+
...o,
|
|
1383
|
+
...c
|
|
1384
|
+
}, Object.assign(i, u), i.innerHTML = Ne(l.body), r("svg", i);
|
|
1385
|
+
let { body: d, width: f, height: p } = e, m = a === "mask" || (a === "bg" ? !1 : d.indexOf("currentColor") !== -1), h = vt(d, {
|
|
1386
|
+
...u,
|
|
1387
|
+
width: f + "",
|
|
1388
|
+
height: p + ""
|
|
1389
|
+
});
|
|
1390
|
+
return i.style = {
|
|
1391
|
+
...o,
|
|
1392
|
+
"--svg": xt(h),
|
|
1393
|
+
width: At(u.width),
|
|
1394
|
+
height: At(u.height),
|
|
1395
|
+
...wt,
|
|
1396
|
+
...m ? Tt : Et,
|
|
1397
|
+
...c
|
|
1398
|
+
}, r("span", i);
|
|
1399
|
+
};
|
|
1400
|
+
if (ge(!0), Fe("", Je), typeof document < "u" && typeof window < "u") {
|
|
1401
|
+
let e = window;
|
|
1402
|
+
if (e.IconifyPreload !== void 0) {
|
|
1403
|
+
let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
1404
|
+
typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
|
|
1405
|
+
try {
|
|
1406
|
+
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !ye(e)) && console.error(n);
|
|
1407
|
+
} catch {
|
|
1408
|
+
console.error(n);
|
|
1409
|
+
}
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
if (e.IconifyProviders !== void 0) {
|
|
1413
|
+
let t = e.IconifyProviders;
|
|
1414
|
+
if (typeof t == "object" && t) for (let e in t) {
|
|
1415
|
+
let n = "IconifyProviders[" + e + "] is invalid.";
|
|
1416
|
+
try {
|
|
1417
|
+
let r = t[e];
|
|
1418
|
+
if (typeof r != "object" || !r || r.resources === void 0) continue;
|
|
1419
|
+
Ve(e, r) || console.error(n);
|
|
1420
|
+
} catch {
|
|
1421
|
+
console.error(n);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
var Mt = {
|
|
1427
|
+
...z,
|
|
1428
|
+
body: ""
|
|
1429
|
+
}, Nt = t((e, { emit: t }) => {
|
|
1430
|
+
let n = u(null);
|
|
1431
|
+
function r() {
|
|
1432
|
+
n.value &&= (n.value.abort?.(), null);
|
|
1433
|
+
}
|
|
1434
|
+
let i = u(!!e.ssr), c = u(""), l = d(null);
|
|
1435
|
+
function f() {
|
|
1436
|
+
let i = e.icon;
|
|
1437
|
+
if (typeof i == "object" && i && typeof i.body == "string") return c.value = "", { data: i };
|
|
1438
|
+
let o;
|
|
1439
|
+
if (typeof i != "string" || (o = I(i, !1, !0)) === null) return null;
|
|
1440
|
+
let s = _e(o);
|
|
1441
|
+
if (!s) {
|
|
1442
|
+
let e = n.value;
|
|
1443
|
+
return (!e || e.name !== i) && (s === null ? n.value = { name: i } : n.value = {
|
|
1444
|
+
name: i,
|
|
1445
|
+
abort: pt([o], m)
|
|
1446
|
+
}), null;
|
|
1447
|
+
}
|
|
1448
|
+
r(), c.value !== i && (c.value = i, a(() => {
|
|
1449
|
+
t("load", i);
|
|
1450
|
+
}));
|
|
1451
|
+
let l = e.customise;
|
|
1452
|
+
if (l) {
|
|
1453
|
+
s = Object.assign({}, s);
|
|
1454
|
+
let e = l(s.body, o.name, o.prefix, o.provider);
|
|
1455
|
+
typeof e == "string" && (s.body = e);
|
|
1456
|
+
}
|
|
1457
|
+
let u = ["iconify"];
|
|
1458
|
+
return o.prefix !== "" && u.push("iconify--" + o.prefix), o.provider !== "" && u.push("iconify--" + o.provider), {
|
|
1459
|
+
data: s,
|
|
1460
|
+
classes: u
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
function m() {
|
|
1464
|
+
let e = f();
|
|
1465
|
+
e ? e.data !== l.value?.data && (l.value = e) : l.value = null;
|
|
1466
|
+
}
|
|
1467
|
+
return i.value ? m() : o(() => {
|
|
1468
|
+
i.value = !0, m();
|
|
1469
|
+
}), p(() => e.icon, m), s(r), () => {
|
|
1470
|
+
let t = l.value;
|
|
1471
|
+
if (!t) return jt(Mt, e);
|
|
1472
|
+
let n = e;
|
|
1473
|
+
return t.classes && (n = {
|
|
1474
|
+
...e,
|
|
1475
|
+
class: t.classes.join(" ")
|
|
1476
|
+
}), jt({
|
|
1477
|
+
...z,
|
|
1478
|
+
...t.data
|
|
1479
|
+
}, n);
|
|
1480
|
+
};
|
|
1481
|
+
}, {
|
|
1482
|
+
props: [
|
|
1483
|
+
"icon",
|
|
1484
|
+
"mode",
|
|
1485
|
+
"ssr",
|
|
1486
|
+
"width",
|
|
1487
|
+
"height",
|
|
1488
|
+
"style",
|
|
1489
|
+
"color",
|
|
1490
|
+
"inline",
|
|
1491
|
+
"rotate",
|
|
1492
|
+
"hFlip",
|
|
1493
|
+
"horizontalFlip",
|
|
1494
|
+
"vFlip",
|
|
1495
|
+
"verticalFlip",
|
|
1496
|
+
"flip",
|
|
1497
|
+
"id",
|
|
1498
|
+
"ariaHidden",
|
|
1499
|
+
"customise",
|
|
1500
|
+
"title"
|
|
1501
|
+
],
|
|
1502
|
+
emits: ["load"]
|
|
1503
|
+
}), Pt = {
|
|
1504
|
+
prefix: "mdi",
|
|
1505
|
+
icons: {
|
|
1506
|
+
"alert-circle": {
|
|
1507
|
+
width: 24,
|
|
1508
|
+
height: 24,
|
|
1509
|
+
body: "<path fill=\"currentColor\" d=\"M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2Z\"/>"
|
|
1510
|
+
},
|
|
1511
|
+
"arrow-up": {
|
|
1512
|
+
width: 24,
|
|
1513
|
+
height: 24,
|
|
1514
|
+
body: "<path fill=\"currentColor\" d=\"M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8v12Z\"/>"
|
|
1515
|
+
},
|
|
1516
|
+
"calendar-outline": {
|
|
1517
|
+
width: 24,
|
|
1518
|
+
height: 24,
|
|
1519
|
+
body: "<path fill=\"currentColor\" d=\"M12 12h5v5h-5v-5m7-9h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 2v2H5V5h14M5 19V9h14v10H5Z\"/>"
|
|
1520
|
+
},
|
|
1521
|
+
check: {
|
|
1522
|
+
width: 24,
|
|
1523
|
+
height: 24,
|
|
1524
|
+
body: "<path fill=\"currentColor\" d=\"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z\"/>"
|
|
1525
|
+
},
|
|
1526
|
+
"check-circle": {
|
|
1527
|
+
width: 24,
|
|
1528
|
+
height: 24,
|
|
1529
|
+
body: "<path fill=\"currentColor\" d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z\"/>"
|
|
1530
|
+
},
|
|
1531
|
+
"chevron-right": {
|
|
1532
|
+
width: 24,
|
|
1533
|
+
height: 24,
|
|
1534
|
+
body: "<path fill=\"currentColor\" d=\"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42Z\"/>"
|
|
1535
|
+
},
|
|
1536
|
+
"clock-outline": {
|
|
1537
|
+
width: 24,
|
|
1538
|
+
height: 24,
|
|
1539
|
+
body: "<path fill=\"currentColor\" d=\"M12 20a8 8 0 0 0 8-8a8 8 0 0 0-8-8a8 8 0 0 0-8 8a8 8 0 0 0 8 8m0-18a10 10 0 0 1 10 10a10 10 0 0 1-10 10C6.47 22 2 17.5 2 12A10 10 0 0 1 12 2m.5 5v5.25l4.5 2.67l-.75 1.23L11 13V7h1.5Z\"/>"
|
|
1540
|
+
},
|
|
1541
|
+
close: {
|
|
1542
|
+
width: 24,
|
|
1543
|
+
height: 24,
|
|
1544
|
+
body: "<path fill=\"currentColor\" d=\"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z\"/>"
|
|
1545
|
+
},
|
|
1546
|
+
"close-circle": {
|
|
1547
|
+
width: 24,
|
|
1548
|
+
height: 24,
|
|
1549
|
+
body: "<path fill=\"currentColor\" d=\"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z\"/>"
|
|
1550
|
+
},
|
|
1551
|
+
"content-copy": {
|
|
1552
|
+
width: 24,
|
|
1553
|
+
height: 24,
|
|
1554
|
+
body: "<path fill=\"currentColor\" d=\"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z\"/>"
|
|
1555
|
+
},
|
|
1556
|
+
loading: {
|
|
1557
|
+
width: 24,
|
|
1558
|
+
height: 24,
|
|
1559
|
+
body: "<path fill=\"currentColor\" d=\"M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8Z\"/>"
|
|
1560
|
+
},
|
|
1561
|
+
magnify: {
|
|
1562
|
+
width: 24,
|
|
1563
|
+
height: 24,
|
|
1564
|
+
body: "<path fill=\"currentColor\" d=\"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5Z\"/>"
|
|
1565
|
+
},
|
|
1566
|
+
"menu-down": {
|
|
1567
|
+
width: 24,
|
|
1568
|
+
height: 24,
|
|
1569
|
+
body: "<path fill=\"currentColor\" d=\"m7 10l5 5l5-5H7Z\"/>"
|
|
1570
|
+
},
|
|
1571
|
+
"menu-right": {
|
|
1572
|
+
width: 24,
|
|
1573
|
+
height: 24,
|
|
1574
|
+
body: "<path fill=\"currentColor\" d=\"m10 17l5-5l-5-5v10Z\"/>"
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
}, Ft = !1;
|
|
1578
|
+
function It() {
|
|
1579
|
+
Ft ||= (ye(Pt), !0);
|
|
1580
|
+
}
|
|
1581
|
+
//#endregion
|
|
1582
|
+
//#region ../icons/dist/install.js
|
|
1583
|
+
It();
|
|
1584
|
+
//#endregion
|
|
1585
|
+
//#region ../ccui/ui/shared/hooks/use-icon.ts
|
|
1586
|
+
function Lt(e) {
|
|
1587
|
+
return e.includes(":");
|
|
1588
|
+
}
|
|
1589
|
+
function Rt(e) {
|
|
1590
|
+
return e ? typeof e == "string" ? Lt(e) ? r(Nt, { icon: e }) : r("i", { class: e }) : e : null;
|
|
495
1591
|
}
|
|
496
1592
|
//#endregion
|
|
497
1593
|
//#region ../ccui/ui/form/src/form-item.tsx
|
|
498
|
-
function
|
|
1594
|
+
function zt(e) {
|
|
499
1595
|
if (!e) return {};
|
|
500
1596
|
let t = {};
|
|
501
1597
|
return e.flex !== void 0 && (t.flex = typeof e.flex == "number" ? `${e.flex} ${e.flex} auto` : e.flex), e.span !== void 0 && (t.width = `${e.span / 24 * 100}%`), e.offset !== void 0 && e.offset > 0 && (t.marginInlineStart = `${e.offset / 24 * 100}%`), t;
|
|
502
1598
|
}
|
|
503
|
-
var
|
|
1599
|
+
var Z = /* @__PURE__ */ t({
|
|
504
1600
|
name: "CFormItem",
|
|
505
|
-
props:
|
|
506
|
-
setup(t, { expose:
|
|
507
|
-
let
|
|
508
|
-
|
|
509
|
-
let
|
|
510
|
-
let e =
|
|
511
|
-
if (!
|
|
512
|
-
let t =
|
|
513
|
-
return e == null || e === "" ? t.length ? [...t] : void 0 : [...t, ...
|
|
514
|
-
}),
|
|
1601
|
+
props: C,
|
|
1602
|
+
setup(t, { expose: a, slots: l }) {
|
|
1603
|
+
let d = h("form-item"), f = n()?.vnode.props;
|
|
1604
|
+
ee(f, "prop", "prop") && v("prop", "name", "FormItem");
|
|
1605
|
+
let m = i(te, null), g = i(b, null), _ = u(""), x = u(""), S = u(!1), C = u(null), ne = e(() => t.name ?? t.prop), w = e(() => {
|
|
1606
|
+
let e = ne.value;
|
|
1607
|
+
if (!g) return e;
|
|
1608
|
+
let t = g.prefixName.value;
|
|
1609
|
+
return e == null || e === "" ? t.length ? [...t] : void 0 : [...t, ...T(e)];
|
|
1610
|
+
}), j = e(() => E(w.value)), M = e(() => t.label || j.value), ae = u(), N = () => {
|
|
515
1611
|
if (t.initialValue !== void 0) return t.initialValue;
|
|
516
|
-
let e =
|
|
517
|
-
return e === void 0 ?
|
|
518
|
-
},
|
|
1612
|
+
let e = m ? D(m.initialValues.value, w.value) : void 0;
|
|
1613
|
+
return e === void 0 ? m ? D(m.model.value, w.value) : void 0 : e;
|
|
1614
|
+
}, oe = () => {
|
|
519
1615
|
let e = t.rules;
|
|
520
|
-
return typeof e == "function" ? e(
|
|
521
|
-
},
|
|
522
|
-
let e = [...
|
|
1616
|
+
return typeof e == "function" ? e(m?.model.value ?? {}) : e;
|
|
1617
|
+
}, P = e(() => {
|
|
1618
|
+
let e = [...A(m?.rules.value?.[j.value]), ...A(oe())];
|
|
523
1619
|
return t.required && !e.some((e) => e.required) && e.unshift({ required: !0 }), e;
|
|
524
|
-
}),
|
|
525
|
-
[
|
|
526
|
-
[
|
|
527
|
-
[
|
|
528
|
-
[
|
|
529
|
-
[
|
|
530
|
-
[
|
|
531
|
-
[
|
|
532
|
-
})),
|
|
533
|
-
|
|
534
|
-
},
|
|
535
|
-
if (!
|
|
536
|
-
let t =
|
|
537
|
-
if (t.length === 0) return
|
|
538
|
-
|
|
539
|
-
let n =
|
|
1620
|
+
}), se = e(() => t.required || P.value.some((e) => e.required)), F = e(() => t.validateStatus ? t.validateStatus : S.value ? "warning" : _.value), le = e(() => x.value || t.help), I = e(() => !se.value && m?.requiredMark.value === "optional"), L = e(() => se.value && m?.requiredMark.value !== !1), ue = e(() => t.colon ?? m?.colon.value ?? !0), de = e(() => t.hasFeedback === void 0 ? !!m?.hasFeedback.value : t.hasFeedback), R = e(() => t.labelCol ?? m?.labelCol.value), z = e(() => t.wrapperCol ?? m?.wrapperCol.value), B = e(() => R.value ? zt(R.value) : !m?.labelWidth.value || m.labelPosition.value === "top" || m.layout.value === "vertical" ? {} : { width: typeof m.labelWidth.value == "number" ? `${m.labelWidth.value}px` : m.labelWidth.value }), fe = e(() => zt(z.value)), V = e(() => ({
|
|
1621
|
+
[d.b()]: !0,
|
|
1622
|
+
[d.m(F.value)]: !!F.value,
|
|
1623
|
+
[d.m("required")]: L.value,
|
|
1624
|
+
[d.m("optional")]: I.value,
|
|
1625
|
+
[d.m("no-style")]: t.noStyle,
|
|
1626
|
+
[d.m("hidden")]: t.hidden,
|
|
1627
|
+
[d.m("top")]: m?.labelPosition.value === "top" || m?.layout.value === "vertical"
|
|
1628
|
+
})), H = () => {
|
|
1629
|
+
_.value = "", x.value = "", S.value = !1;
|
|
1630
|
+
}, U = null, pe = async (e) => {
|
|
1631
|
+
if (!j.value || !m) return !0;
|
|
1632
|
+
let t = ie(P.value, e);
|
|
1633
|
+
if (t.length === 0) return H(), !0;
|
|
1634
|
+
_.value = "validating";
|
|
1635
|
+
let n = D(m.model.value, w.value), r = "";
|
|
540
1636
|
for (let e of t) {
|
|
541
|
-
let t = await
|
|
1637
|
+
let t = await ce(e, n, m.model.value, j.value, M.value, m.validateMessages.value);
|
|
542
1638
|
if (t) {
|
|
543
1639
|
if (e.warningOnly) {
|
|
544
1640
|
r = t.message;
|
|
545
1641
|
continue;
|
|
546
1642
|
}
|
|
547
|
-
return
|
|
1643
|
+
return _.value = "error", x.value = t.message, m.emitValidate(j.value, !1, t.message), !1;
|
|
548
1644
|
}
|
|
549
1645
|
}
|
|
550
|
-
return r ? (
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
|
|
1646
|
+
return r ? (_.value = "success", x.value = r, S.value = !0, m.emitValidate(j.value, !0, r), !0) : (S.value = !1, _.value = "success", x.value = "", m.emitValidate(j.value, !0, ""), !0);
|
|
1647
|
+
}, W = async (e) => t.validateDebounce > 0 ? (U && clearTimeout(U), new Promise((n) => {
|
|
1648
|
+
U = setTimeout(() => {
|
|
1649
|
+
pe(e).then(n);
|
|
554
1650
|
}, t.validateDebounce);
|
|
555
|
-
})) :
|
|
556
|
-
|
|
557
|
-
},
|
|
1651
|
+
})) : pe(e), G = () => {
|
|
1652
|
+
j.value && m && O(m.model.value, w.value, k(ae.value)), H();
|
|
1653
|
+
}, K = {
|
|
558
1654
|
get prop() {
|
|
559
|
-
return
|
|
1655
|
+
return w.value;
|
|
560
1656
|
},
|
|
561
1657
|
get field() {
|
|
562
|
-
return
|
|
1658
|
+
return j.value;
|
|
563
1659
|
},
|
|
564
1660
|
get dependencies() {
|
|
565
1661
|
return t.dependencies;
|
|
566
1662
|
},
|
|
567
|
-
validate:
|
|
568
|
-
resetField:
|
|
569
|
-
clearValidate:
|
|
1663
|
+
validate: W,
|
|
1664
|
+
resetField: G,
|
|
1665
|
+
clearValidate: H,
|
|
570
1666
|
getValidateMessage: () => x.value,
|
|
571
|
-
getElement: () =>
|
|
572
|
-
},
|
|
573
|
-
if (t.normalize &&
|
|
574
|
-
let e =
|
|
575
|
-
r !== e &&
|
|
1667
|
+
getElement: () => C.value
|
|
1668
|
+
}, me = (e) => {
|
|
1669
|
+
if (t.normalize && m && w.value !== void 0) {
|
|
1670
|
+
let e = D(m.model.value, w.value), n = k(e), r = t.normalize(e, n, m.model.value);
|
|
1671
|
+
r !== e && O(m.model.value, w.value, r);
|
|
576
1672
|
}
|
|
577
|
-
if (
|
|
578
|
-
let e =
|
|
579
|
-
|
|
1673
|
+
if (W("change"), m && w.value !== void 0) {
|
|
1674
|
+
let e = D(m.model.value, w.value);
|
|
1675
|
+
m.notifyFieldChange(w.value, e);
|
|
580
1676
|
}
|
|
581
|
-
},
|
|
582
|
-
|
|
1677
|
+
}, q = () => {
|
|
1678
|
+
W("blur");
|
|
583
1679
|
};
|
|
584
|
-
|
|
585
|
-
if (
|
|
586
|
-
let e =
|
|
587
|
-
e !== void 0 &&
|
|
1680
|
+
o(() => {
|
|
1681
|
+
if (ae.value = k(N()), w.value && m && D(m.model.value, w.value) === void 0) {
|
|
1682
|
+
let e = N();
|
|
1683
|
+
e !== void 0 && O(m.model.value, w.value, k(e));
|
|
588
1684
|
}
|
|
589
|
-
|
|
590
|
-
}),
|
|
591
|
-
|
|
592
|
-
let e = t.preserve, n =
|
|
593
|
-
!(e === void 0 ? n : e) &&
|
|
594
|
-
}),
|
|
595
|
-
validate:
|
|
596
|
-
resetField:
|
|
597
|
-
clearValidate:
|
|
598
|
-
}),
|
|
599
|
-
validateStatus:
|
|
600
|
-
isInsideForm: !!
|
|
601
|
-
validate:
|
|
1685
|
+
m?.addField(K);
|
|
1686
|
+
}), s(() => {
|
|
1687
|
+
m?.removeField(K);
|
|
1688
|
+
let e = t.preserve, n = m?.preserve.value ?? !0;
|
|
1689
|
+
!(e === void 0 ? n : e) && m && w.value !== void 0 && re(m.model.value, w.value);
|
|
1690
|
+
}), a({
|
|
1691
|
+
validate: W,
|
|
1692
|
+
resetField: G,
|
|
1693
|
+
clearValidate: H
|
|
1694
|
+
}), c(y, {
|
|
1695
|
+
validateStatus: F,
|
|
1696
|
+
isInsideForm: !!m,
|
|
1697
|
+
validate: W
|
|
602
1698
|
});
|
|
603
|
-
let
|
|
604
|
-
|
|
1699
|
+
let J;
|
|
1700
|
+
p(() => m?.model.value, (e) => {
|
|
605
1701
|
if (t.shouldUpdate !== void 0) {
|
|
606
1702
|
if (typeof t.shouldUpdate == "function") {
|
|
607
|
-
if (!t.shouldUpdate(
|
|
608
|
-
|
|
1703
|
+
if (!t.shouldUpdate(J, e)) {
|
|
1704
|
+
J = k(e);
|
|
609
1705
|
return;
|
|
610
1706
|
}
|
|
611
1707
|
} else if (!t.shouldUpdate) {
|
|
612
|
-
|
|
1708
|
+
J = k(e);
|
|
613
1709
|
return;
|
|
614
1710
|
}
|
|
615
1711
|
}
|
|
616
|
-
|
|
1712
|
+
J = k(e), t.dependencies.length > 0 && W();
|
|
617
1713
|
}, { deep: !0 });
|
|
618
|
-
let
|
|
619
|
-
if (!t.label && !
|
|
620
|
-
let e = [
|
|
1714
|
+
let he = () => {
|
|
1715
|
+
if (!t.label && !l.label) return null;
|
|
1716
|
+
let e = [l.label?.() || t.label, I.value ? r("span", { class: d.e("optional") }, " (optional)") : null];
|
|
621
1717
|
return r("label", {
|
|
622
|
-
class: [
|
|
623
|
-
style:
|
|
1718
|
+
class: [d.e("label"), ue.value && d.em("label", "colon")],
|
|
1719
|
+
style: B.value,
|
|
624
1720
|
for: t.htmlFor || void 0
|
|
625
1721
|
}, e);
|
|
626
|
-
},
|
|
627
|
-
if (!
|
|
628
|
-
let e =
|
|
1722
|
+
}, Y = () => {
|
|
1723
|
+
if (!de.value) return null;
|
|
1724
|
+
let e = F.value;
|
|
629
1725
|
if (!e) return null;
|
|
630
|
-
let t = e === "success" ? "
|
|
631
|
-
return
|
|
632
|
-
class: [
|
|
1726
|
+
let t = e === "success" ? "mdi:check-circle" : e === "error" ? "mdi:close-circle" : e === "warning" ? "mdi:alert-circle" : "", n = t ? Rt(t) : e === "validating" ? "◌" : "";
|
|
1727
|
+
return n ? r("span", {
|
|
1728
|
+
class: [d.e("feedback"), d.em("feedback", e)],
|
|
633
1729
|
"aria-hidden": "true"
|
|
634
|
-
},
|
|
635
|
-
},
|
|
636
|
-
class:
|
|
637
|
-
style:
|
|
1730
|
+
}, n) : null;
|
|
1731
|
+
}, ge = () => r("div", {
|
|
1732
|
+
class: d.e("content"),
|
|
1733
|
+
style: fe.value
|
|
638
1734
|
}, [
|
|
639
|
-
r("div", { class: [
|
|
640
|
-
|
|
641
|
-
class:
|
|
1735
|
+
r("div", { class: [d.e("control"), de.value && d.em("control", "has-feedback")] }, [l.default?.(), Y()]),
|
|
1736
|
+
le.value ? r("div", {
|
|
1737
|
+
class: d.e("message"),
|
|
642
1738
|
role: "alert"
|
|
643
|
-
},
|
|
644
|
-
t.extra ? r("div", { class:
|
|
1739
|
+
}, le.value) : null,
|
|
1740
|
+
t.extra ? r("div", { class: d.e("extra") }, t.extra) : null
|
|
645
1741
|
]);
|
|
646
1742
|
return () => t.noStyle ? r("div", {
|
|
647
|
-
ref:
|
|
648
|
-
class:
|
|
649
|
-
"data-field":
|
|
650
|
-
onChangeCapture:
|
|
651
|
-
onFocusoutCapture:
|
|
652
|
-
},
|
|
653
|
-
ref:
|
|
654
|
-
class:
|
|
655
|
-
"data-field":
|
|
656
|
-
"aria-invalid":
|
|
657
|
-
onChangeCapture:
|
|
658
|
-
onFocusoutCapture:
|
|
659
|
-
}, [
|
|
660
|
-
}
|
|
661
|
-
}),
|
|
1743
|
+
ref: C,
|
|
1744
|
+
class: V.value,
|
|
1745
|
+
"data-field": j.value || void 0,
|
|
1746
|
+
onChangeCapture: me,
|
|
1747
|
+
onFocusoutCapture: q
|
|
1748
|
+
}, l.default?.()) : r("div", {
|
|
1749
|
+
ref: C,
|
|
1750
|
+
class: V.value,
|
|
1751
|
+
"data-field": j.value || void 0,
|
|
1752
|
+
"aria-invalid": F.value === "error" ? "true" : void 0,
|
|
1753
|
+
onChangeCapture: me,
|
|
1754
|
+
onFocusoutCapture: q
|
|
1755
|
+
}, [he(), ge()]);
|
|
1756
|
+
}
|
|
1757
|
+
}), Q = /* @__PURE__ */ t({
|
|
662
1758
|
name: "CFormList",
|
|
663
|
-
props:
|
|
1759
|
+
props: ne,
|
|
664
1760
|
setup(t, { slots: n }) {
|
|
665
|
-
let r = i(
|
|
1761
|
+
let r = i(te, null), a = e(() => T(t.name)), s = () => {
|
|
666
1762
|
if (!r) return [];
|
|
667
|
-
let e =
|
|
1763
|
+
let e = D(r.model.value, t.name);
|
|
668
1764
|
if (Array.isArray(e)) return e;
|
|
669
|
-
let n = t.initialValue ??
|
|
670
|
-
return
|
|
671
|
-
}, u =
|
|
1765
|
+
let n = t.initialValue ?? D(r.initialValues.value, t.name), i = Array.isArray(n) ? k(n) : [];
|
|
1766
|
+
return O(r.model.value, t.name, i), i;
|
|
1767
|
+
}, u = l({
|
|
672
1768
|
keys: [],
|
|
673
1769
|
seed: 0
|
|
674
|
-
}),
|
|
1770
|
+
}), d = (e) => {
|
|
675
1771
|
for (; u.keys.length < e;) u.keys.push(u.seed++);
|
|
676
1772
|
u.keys.length > e && (u.keys.length = e);
|
|
677
1773
|
};
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}),
|
|
681
|
-
Array.isArray(e) && e.length !== u.keys.length &&
|
|
1774
|
+
o(() => {
|
|
1775
|
+
d(s().length);
|
|
1776
|
+
}), p(() => r ? D(r.model.value, t.name) : void 0, (e) => {
|
|
1777
|
+
Array.isArray(e) && e.length !== u.keys.length && d(e.length);
|
|
682
1778
|
}, { deep: !1 });
|
|
683
|
-
let
|
|
1779
|
+
let f = {
|
|
684
1780
|
add(e, t) {
|
|
685
1781
|
if (!r) return;
|
|
686
|
-
let n =
|
|
1782
|
+
let n = s(), i = k(e), a = t === void 0 ? n.length : Math.max(0, Math.min(t, n.length));
|
|
687
1783
|
n.splice(a, 0, i), u.keys.splice(a, 0, u.seed++);
|
|
688
1784
|
},
|
|
689
1785
|
remove(e) {
|
|
690
1786
|
if (!r) return;
|
|
691
|
-
let t =
|
|
1787
|
+
let t = s(), n = (Array.isArray(e) ? e : [e]).filter((e) => e >= 0 && e < t.length).sort((e, t) => t - e);
|
|
692
1788
|
for (let e of n) t.splice(e, 1), u.keys.splice(e, 1);
|
|
693
1789
|
},
|
|
694
1790
|
move(e, t) {
|
|
695
1791
|
if (!r) return;
|
|
696
|
-
let n =
|
|
1792
|
+
let n = s();
|
|
697
1793
|
if (e === t || e < 0 || t < 0 || e >= n.length || t >= n.length) return;
|
|
698
1794
|
let [i] = n.splice(e, 1);
|
|
699
1795
|
n.splice(t, 0, i);
|
|
@@ -701,21 +1797,21 @@ var B = /* @__PURE__ */ t({
|
|
|
701
1797
|
u.keys.splice(t, 0, a);
|
|
702
1798
|
}
|
|
703
1799
|
};
|
|
704
|
-
return
|
|
1800
|
+
return c(b, { prefixName: a }), () => {
|
|
705
1801
|
let e = u.keys.map((e, t) => ({
|
|
706
1802
|
key: e,
|
|
707
1803
|
name: t
|
|
708
1804
|
}));
|
|
709
|
-
return n.default?.(e,
|
|
1805
|
+
return n.default?.(e, f) ?? null;
|
|
710
1806
|
};
|
|
711
1807
|
}
|
|
712
|
-
}),
|
|
1808
|
+
}), $ = /* @__PURE__ */ t({
|
|
713
1809
|
name: "CFormProvider",
|
|
714
|
-
props:
|
|
1810
|
+
props: w,
|
|
715
1811
|
emits: ["form-change", "form-finish"],
|
|
716
1812
|
setup(e, { emit: t, slots: n }) {
|
|
717
1813
|
let r = {};
|
|
718
|
-
return
|
|
1814
|
+
return c(x, {
|
|
719
1815
|
registerForm: (e, t) => {
|
|
720
1816
|
e && (r[e] = t);
|
|
721
1817
|
},
|
|
@@ -736,17 +1832,17 @@ var B = /* @__PURE__ */ t({
|
|
|
736
1832
|
}
|
|
737
1833
|
}), () => n.default?.() ?? null;
|
|
738
1834
|
}
|
|
739
|
-
}),
|
|
740
|
-
|
|
741
|
-
e.component(
|
|
1835
|
+
}), Bt = F;
|
|
1836
|
+
Bt.install = function(e) {
|
|
1837
|
+
e.component(F.name, F), e.component(Z.name, Z), e.component(Q.name, Q), e.component($.name, $);
|
|
742
1838
|
};
|
|
743
|
-
var
|
|
1839
|
+
var Vt = {
|
|
744
1840
|
title: "Form 表单",
|
|
745
1841
|
category: "数据录入",
|
|
746
1842
|
status: "95%",
|
|
747
1843
|
install(e) {
|
|
748
|
-
e.component(
|
|
1844
|
+
e.component(F.name, F), e.component(Z.name, Z), e.component(Q.name, Q), e.component($.name, $);
|
|
749
1845
|
}
|
|
750
1846
|
};
|
|
751
1847
|
//#endregion
|
|
752
|
-
export {
|
|
1848
|
+
export { F as Form, Z as FormItem, Q as FormList, $ as FormProvider, Vt as default };
|