ep-lib-ts 0.1.44 → 1.0.1
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/LICENSE +21 -0
- package/dist/BgAudio-C8bS54bl.js +4 -0
- package/dist/DisplayBox-BTPVW9_v.js +4 -0
- package/dist/EpAlert-Daji8LsR.js +4 -0
- package/dist/EpAudio-Dq7twl4x.js +4 -0
- package/dist/EpBadge-DBfMe1r_.js +4 -0
- package/dist/EpBarChart-cAlm0rKf.js +4 -0
- package/dist/EpBtn-S2VJnt--.js +4 -0
- package/dist/EpCard-SvaBmdDK.js +4 -0
- package/dist/EpChip-Chn_9bRP.js +4 -0
- package/dist/{EpCodeblock-4ac683f6.js → EpCodeblock-DVX2XFFj.js} +280 -270
- package/dist/EpContentSlider-Ds2GlrkO.js +4 -0
- package/dist/EpDarkmode--_9Qi6HH.js +19 -0
- package/dist/EpDivider-Bj4Zya_F.js +4 -0
- package/dist/EpEdu-Y7Lkf3Ew.js +4 -0
- package/dist/EpFlex-5yWhvYX7.js +4 -0
- package/dist/EpHeader-CEQBk1ah.js +4 -0
- package/dist/{EpHover-377ef256.js → EpHover-BL7JsbVZ.js} +3 -4
- package/dist/EpIcon-CuhZ90Zx.js +4 -0
- package/dist/EpIframe-DbPnkezB.js +4 -0
- package/dist/EpImg-DJ9gNwhJ.js +4 -0
- package/dist/{EpInput-c0096d40.js → EpInput-DMIxjwBM.js} +464 -459
- package/dist/EpLineChart-ALvSFQ-w.js +4 -0
- package/dist/EpLink-CQSfQHRj.js +4 -0
- package/dist/EpLinkVersion-VIxCHjDt.js +4 -0
- package/dist/{EpList-5211df15.js → EpList-BkH08ROd.js} +4 -5
- package/dist/EpModal-CYy1Iu1T.js +4 -0
- package/dist/EpNothing-IEAPsIPI.js +10 -0
- package/dist/EpPieChart-Cpxylmzw.js +4 -0
- package/dist/EpQuestion-gFjB_YVU.js +4 -0
- package/dist/EpQuote-C2WMKC8z.js +4 -0
- package/dist/EpRadio-CZu2BYd-.js +4 -0
- package/dist/EpRadioSummative-POEEv1YI.js +4 -0
- package/dist/EpReading-6LKvPJl5.js +4 -0
- package/dist/EpResource-Bqu38I44.js +4 -0
- package/dist/EpScope-B04S9t4O.js +4 -0
- package/dist/EpSection-B9obOS7v.js +4 -0
- package/dist/{EpSelect-78c9c0aa.js → EpSelect-DLGx5g-U.js} +3 -4
- package/dist/EpSkeleton-rkvPpE2y.js +4 -0
- package/dist/EpSoftware-DmH-rUDN.js +4 -0
- package/dist/EpSpinner-7XiNy9LV.js +4 -0
- package/dist/EpSummativeTable-JWOA25gE.js +4 -0
- package/dist/EpSvg-Dfvodejy.js +4 -0
- package/dist/EpTable-C0lD6aED.js +4 -0
- package/dist/EpTerm-XGV0Zf2w.js +4 -0
- package/dist/EpText-DhHXfEHv.js +4 -0
- package/dist/EpTimeLine-CDL7liGh.js +4 -0
- package/dist/{EpTooltip-05e1d8fe.js → EpTooltip-B4s0_PvZ.js} +4 -4
- package/dist/EpVideo-em0qb_rk.js +4 -0
- package/dist/EpVideoPanopto-DAMRV6HD.js +4 -0
- package/dist/EpWordDef-bLyQzqx8.js +4 -0
- package/dist/components/basics/EpAvatar.vue.d.ts +2 -2
- package/dist/components/basics/EpBadge.vue.d.ts +2 -2
- package/dist/components/basics/EpBtn.vue.d.ts +4 -3
- package/dist/components/basics/EpCard.vue.d.ts +4 -3
- package/dist/components/basics/EpChip.vue.d.ts +4 -3
- package/dist/components/basics/EpDivider.vue.d.ts +4 -3
- package/dist/components/basics/EpFlex.vue.d.ts +1 -1
- package/dist/components/basics/EpHover.vue.d.ts +2 -2
- package/dist/components/basics/EpIcon.vue.d.ts +2 -2
- package/dist/components/basics/EpImg.vue.d.ts +3 -2
- package/dist/components/basics/EpList.vue.d.ts +1 -1
- package/dist/components/basics/EpListitem.vue.d.ts +2 -2
- package/dist/components/basics/EpSection.vue.d.ts +2 -2
- package/dist/components/basics/EpSpinner.vue.d.ts +2 -2
- package/dist/components/basics/EpTable.vue.d.ts +1 -1
- package/dist/components/basics/EpText.vue.d.ts +2 -2
- package/dist/components/charts/EpBarChart.vue.d.ts +4 -3
- package/dist/components/charts/EpLineChart.vue.d.ts +4 -3
- package/dist/components/charts/EpPieChart.vue.d.ts +4 -3
- package/dist/components/educationals/EpCodeblock.vue.d.ts +5 -4
- package/dist/components/educationals/EpEdu.vue.d.ts +5 -4
- package/dist/components/educationals/EpReading.vue.d.ts +4 -3
- package/dist/components/educationals/EpResource.vue.d.ts +4 -3
- package/dist/components/educationals/EpScope.vue.d.ts +2 -2
- package/dist/components/forms/EpCheckbox.vue.d.ts +3 -3
- package/dist/components/forms/EpInput.vue.d.ts +3 -3
- package/dist/components/forms/EpRadio.vue.d.ts +5 -4
- package/dist/components/forms/EpRadioSummative.vue.d.ts +5 -4
- package/dist/components/forms/EpSelect.vue.d.ts +2 -2
- package/dist/components/forms/EpSwitch.vue.d.ts +5 -4
- package/dist/components/forms/EpTextarea.vue.d.ts +3 -3
- package/dist/components/forms/EpToggle.vue.d.ts +3 -3
- package/dist/components/interactions/EpAccordeon.vue.d.ts +4 -3
- package/dist/components/interactions/EpContentSlider.vue.d.ts +3 -2
- package/dist/components/interactions/EpDarkmode.vue.d.ts +3 -0
- package/dist/components/interactions/EpHotsPot.vue.d.ts +1 -1
- package/dist/components/interactions/EpModal.vue.d.ts +3 -3
- package/dist/components/interactions/EpQuestion.vue.d.ts +5 -4
- package/dist/components/interactions/EpSummativeTable.vue.d.ts +3 -2
- package/dist/components/interactions/EpTabs.vue.d.ts +1 -1
- package/dist/components/interactions/EpTooltip.vue.d.ts +4 -3
- package/dist/components/medias/EpAudio.vue.d.ts +4 -3
- package/dist/components/medias/EpCarousel.vue.d.ts +5 -4
- package/dist/components/medias/EpIframe.vue.d.ts +4 -3
- package/dist/components/medias/EpKatex.vue.d.ts +4 -3
- package/dist/components/medias/EpLink.vue.d.ts +4 -3
- package/dist/components/medias/EpLinkVersion.vue.d.ts +2 -2
- package/dist/components/medias/EpSoftware.vue.d.ts +4 -3
- package/dist/components/medias/EpSvg.vue.d.ts +4 -3
- package/dist/components/medias/EpTerm.vue.d.ts +2 -2
- package/dist/components/medias/EpTimeLine.vue.d.ts +2 -1
- package/dist/components/medias/EpVideo.vue.d.ts +4 -3
- package/dist/components/medias/EpVideoPanopto.vue.d.ts +5 -3
- package/dist/components/medias/EpWordDef.vue.d.ts +2 -1
- package/dist/components/signages/EpAlert.vue.d.ts +4 -3
- package/dist/components/signages/EpBadge.vue.d.ts +4 -3
- package/dist/components/signages/EpHeader.vue.d.ts +3 -3
- package/dist/components/signages/EpNothing.vue.d.ts +1 -1
- package/dist/components/signages/EpQuote.vue.d.ts +2 -2
- package/dist/components/signages/EpSkeleton.vue.d.ts +2 -2
- package/dist/components/tools/BgAudio.vue.d.ts +2 -2
- package/dist/components/tools/DisplayBox.vue.d.ts +1 -1
- package/dist/components/tools/SvgFilter.vue.d.ts +1 -1
- package/dist/components/tools/TimelineItem.vue.d.ts +4 -3
- package/dist/ep-lib-ts.js +40 -42
- package/dist/ep-lib-ts.umd.cjs +80 -81
- package/dist/index-Dl6z_ITi.js +18485 -0
- package/dist/{index-36787516.js → index-M54_P8uC.js} +1478 -1481
- package/dist/index.d.ts +43 -42
- package/dist/main.d.ts +1 -0
- package/dist/{prism-146a2db5.js → prism-B0q7vMaL.js} +2 -2
- package/dist/router.d.ts +1 -1
- package/dist/types/Answer.d.ts +1 -0
- package/package.json +26 -29
- package/src/components/interactions/EpDarkmode.vue +48 -0
- package/src/components/medias/EpLink.vue +30 -13
- package/src/components/medias/EpVideoPanopto.vue +10 -1
- package/dist/BgAudio-201834a5.js +0 -6
- package/dist/DisplayBox-171d0236.js +0 -6
- package/dist/EpAlert-b912c3ae.js +0 -6
- package/dist/EpAudio-2101bf81.js +0 -6
- package/dist/EpBadge-7247df23.js +0 -6
- package/dist/EpBarChart-607f1d3a.js +0 -6
- package/dist/EpBtn-c6ee3c06.js +0 -6
- package/dist/EpCard-17e2340f.js +0 -6
- package/dist/EpChip-fad19f38.js +0 -6
- package/dist/EpContentSlider-8445422f.js +0 -6
- package/dist/EpDivider-4fa1a100.js +0 -6
- package/dist/EpEdu-b733e904.js +0 -6
- package/dist/EpFlex-e6ffe678.js +0 -6
- package/dist/EpHeader-dcb977a2.js +0 -6
- package/dist/EpIcon-a64b1a32.js +0 -6
- package/dist/EpIframe-d14d7039.js +0 -6
- package/dist/EpImg-37e8c6da.js +0 -6
- package/dist/EpLineChart-78c50047.js +0 -6
- package/dist/EpLink-7a03f094.js +0 -6
- package/dist/EpLinkVersion-55282f69.js +0 -6
- package/dist/EpModal-d0e7bfe1.js +0 -6
- package/dist/EpNothing-c3bae89e.js +0 -11
- package/dist/EpPieChart-ccc6e9ea.js +0 -6
- package/dist/EpQuestion-1b0e98d9.js +0 -6
- package/dist/EpQuote-a3d9641f.js +0 -6
- package/dist/EpRadio-33311a7c.js +0 -6
- package/dist/EpRadioSummative-25f2d598.js +0 -6
- package/dist/EpReading-11835aac.js +0 -6
- package/dist/EpResource-d2707861.js +0 -6
- package/dist/EpScope-60c80551.js +0 -6
- package/dist/EpSection-9c54221c.js +0 -6
- package/dist/EpSkeleton-a40c904b.js +0 -6
- package/dist/EpSoftware-887b35ab.js +0 -6
- package/dist/EpSpinner-f7b9988b.js +0 -6
- package/dist/EpSummativeTable-1e759db5.js +0 -6
- package/dist/EpSvg-2a82f199.js +0 -6
- package/dist/EpTable-bc1744a8.js +0 -6
- package/dist/EpTerm-96482f48.js +0 -6
- package/dist/EpText-ab46371f.js +0 -6
- package/dist/EpTimeLine-67891a23.js +0 -6
- package/dist/EpVideo-8d575ce2.js +0 -6
- package/dist/EpVideoPanopto-716e3877.js +0 -6
- package/dist/EpWordDef-89e45463.js +0 -6
- package/dist/index-03f58de2.js +0 -19711
- /package/dist/{EpAvatar-1e55fdc7.js → EpAvatar-Dmpg0PFj.js} +0 -0
- /package/dist/{EpBadge-f5faab43.js → EpBadge-DqmSNdbi.js} +0 -0
- /package/dist/{EpCheckbox-b4696548.js → EpCheckbox-BtJRFbS_.js} +0 -0
- /package/dist/{EpHotsPot-f4deb558.js → EpHotsPot-NGjKJCc8.js} +0 -0
- /package/dist/{EpListitem-aa4a0f95.js → EpListitem-DzQrc-k2.js} +0 -0
- /package/dist/{EpSwitch-778610f4.js → EpSwitch-C7NMjBk9.js} +0 -0
- /package/dist/{EpTextarea-67f751e9.js → EpTextarea-DyMM95ER.js} +0 -0
- /package/dist/{EpToggle-79231e19.js → EpToggle-CfXYpI1b.js} +0 -0
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
import { computed as N, toValue as V, unref as f, onMounted as
|
|
2
|
-
import { c as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return Ee().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1
|
+
import { computed as N, toValue as V, unref as f, onMounted as Je, getCurrentInstance as $, provide as Ye, isRef as ue, watch as B, onBeforeUnmount as Xe, inject as Ze, ref as re, reactive as et, onUnmounted as tt, nextTick as rt, defineComponent as nt, toRefs as it, toRef as ot, openBlock as me, createElementBlock as be, Fragment as lt, createTextVNode as ge, toDisplayString as Y, createElementVNode as P, createVNode as at, withDirectives as ut, vModelText as st, createCommentVNode as dt } from "vue";
|
|
2
|
+
import { c as ct, v as ft } from "./index-Dl6z_ITi.js";
|
|
3
|
+
function vt() {
|
|
4
|
+
return xe().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof
|
|
6
|
+
function xe() {
|
|
7
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
9
8
|
}
|
|
10
|
-
const ht = typeof Proxy == "function",
|
|
11
|
-
let
|
|
12
|
-
function
|
|
9
|
+
const ht = typeof Proxy == "function", pt = "devtools-plugin:setup", mt = "plugin:settings:set";
|
|
10
|
+
let U, ne;
|
|
11
|
+
function bt() {
|
|
13
12
|
var e;
|
|
14
|
-
return
|
|
13
|
+
return U !== void 0 || (typeof window < "u" && window.performance ? (U = !0, ne = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (U = !0, ne = globalThis.perf_hooks.performance) : U = !1), U;
|
|
15
14
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
15
|
+
function gt() {
|
|
16
|
+
return bt() ? ne.now() : Date.now();
|
|
18
17
|
}
|
|
19
|
-
class
|
|
18
|
+
class yt {
|
|
20
19
|
constructor(t, r) {
|
|
21
20
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
|
|
22
21
|
const n = {};
|
|
23
22
|
if (t.settings)
|
|
24
|
-
for (const
|
|
25
|
-
const
|
|
26
|
-
n[
|
|
23
|
+
for (const l in t.settings) {
|
|
24
|
+
const a = t.settings[l];
|
|
25
|
+
n[l] = a.defaultValue;
|
|
27
26
|
}
|
|
28
|
-
const
|
|
29
|
-
let
|
|
27
|
+
const i = `__vue-devtools-plugin-settings__${t.id}`;
|
|
28
|
+
let o = Object.assign({}, n);
|
|
30
29
|
try {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(
|
|
30
|
+
const l = localStorage.getItem(i), a = JSON.parse(l);
|
|
31
|
+
Object.assign(o, a);
|
|
33
32
|
} catch {
|
|
34
33
|
}
|
|
35
34
|
this.fallbacks = {
|
|
36
35
|
getSettings() {
|
|
37
|
-
return
|
|
36
|
+
return o;
|
|
38
37
|
},
|
|
39
|
-
setSettings(
|
|
38
|
+
setSettings(l) {
|
|
40
39
|
try {
|
|
41
|
-
localStorage.setItem(
|
|
40
|
+
localStorage.setItem(i, JSON.stringify(l));
|
|
42
41
|
} catch {
|
|
43
42
|
}
|
|
44
|
-
|
|
43
|
+
o = l;
|
|
45
44
|
},
|
|
46
45
|
now() {
|
|
47
|
-
return
|
|
46
|
+
return gt();
|
|
48
47
|
}
|
|
49
|
-
}, r && r.on(
|
|
50
|
-
|
|
48
|
+
}, r && r.on(mt, (l, a) => {
|
|
49
|
+
l === this.plugin.id && this.fallbacks.setSettings(a);
|
|
51
50
|
}), this.proxiedOn = new Proxy({}, {
|
|
52
|
-
get: (
|
|
51
|
+
get: (l, a) => this.target ? this.target.on[a] : (...s) => {
|
|
53
52
|
this.onQueue.push({
|
|
54
|
-
method:
|
|
53
|
+
method: a,
|
|
55
54
|
args: s
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
}), this.proxiedTarget = new Proxy({}, {
|
|
59
|
-
get: (
|
|
60
|
-
method:
|
|
58
|
+
get: (l, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...s) => (this.targetQueue.push({
|
|
59
|
+
method: a,
|
|
61
60
|
args: s,
|
|
62
61
|
resolve: () => {
|
|
63
62
|
}
|
|
64
|
-
}), this.fallbacks[
|
|
63
|
+
}), this.fallbacks[a](...s)) : (...s) => new Promise((d) => {
|
|
65
64
|
this.targetQueue.push({
|
|
66
|
-
method:
|
|
65
|
+
method: a,
|
|
67
66
|
args: s,
|
|
68
67
|
resolve: d
|
|
69
68
|
});
|
|
@@ -78,45 +77,45 @@ class _t {
|
|
|
78
77
|
r.resolve(await this.target[r.method](...r.args));
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
|
-
function
|
|
82
|
-
const r = e, n =
|
|
83
|
-
if (
|
|
84
|
-
|
|
80
|
+
function _t(e, t) {
|
|
81
|
+
const r = e, n = xe(), i = vt(), o = ht && r.enableEarlyProxy;
|
|
82
|
+
if (i && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !o))
|
|
83
|
+
i.emit(pt, e, t);
|
|
85
84
|
else {
|
|
86
|
-
const
|
|
85
|
+
const l = o ? new yt(r, i) : null;
|
|
87
86
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
88
87
|
pluginDescriptor: r,
|
|
89
88
|
setupFn: t,
|
|
90
|
-
proxy:
|
|
91
|
-
}),
|
|
89
|
+
proxy: l
|
|
90
|
+
}), l && t(l.proxiedTarget);
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
|
-
* vee-validate v4.
|
|
96
|
-
* (c)
|
|
94
|
+
* vee-validate v4.12.6
|
|
95
|
+
* (c) 2024 Abdelrahman Awad
|
|
97
96
|
* @license MIT
|
|
98
97
|
*/
|
|
99
|
-
function
|
|
98
|
+
function T(e) {
|
|
100
99
|
return typeof e == "function";
|
|
101
100
|
}
|
|
102
|
-
function
|
|
101
|
+
function Vt(e) {
|
|
103
102
|
return e == null;
|
|
104
103
|
}
|
|
105
|
-
const
|
|
106
|
-
function
|
|
104
|
+
const z = (e) => e !== null && !!e && typeof e == "object" && !Array.isArray(e);
|
|
105
|
+
function Ee(e) {
|
|
107
106
|
return Number(e) >= 0;
|
|
108
107
|
}
|
|
109
|
-
function
|
|
108
|
+
function Ot(e) {
|
|
110
109
|
const t = parseFloat(e);
|
|
111
110
|
return isNaN(t) ? e : t;
|
|
112
111
|
}
|
|
113
|
-
function
|
|
112
|
+
function St(e) {
|
|
114
113
|
const t = e.split(".");
|
|
115
114
|
if (!t.length)
|
|
116
115
|
return "";
|
|
117
116
|
let r = String(t[0]);
|
|
118
117
|
for (let n = 1; n < t.length; n++) {
|
|
119
|
-
if (
|
|
118
|
+
if (Ee(t[n])) {
|
|
120
119
|
r += `[${t[n]}]`;
|
|
121
120
|
continue;
|
|
122
121
|
}
|
|
@@ -124,50 +123,69 @@ function wt(e) {
|
|
|
124
123
|
}
|
|
125
124
|
return r;
|
|
126
125
|
}
|
|
127
|
-
const
|
|
128
|
-
function
|
|
129
|
-
return
|
|
126
|
+
const wt = {};
|
|
127
|
+
function At(e) {
|
|
128
|
+
return wt[e];
|
|
130
129
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return F(e) && !!e.__locatorRef;
|
|
130
|
+
function ye(e, t, r) {
|
|
131
|
+
typeof r.value == "object" && (r.value = I(r.value)), !r.enumerable || r.get || r.set || !r.configurable || !r.writable || t === "__proto__" ? Object.defineProperty(e, t, r) : e[t] = r.value;
|
|
134
132
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
133
|
+
function I(e) {
|
|
134
|
+
if (typeof e != "object")
|
|
135
|
+
return e;
|
|
136
|
+
var t = 0, r, n, i, o = Object.prototype.toString.call(e);
|
|
137
|
+
if (o === "[object Object]" ? i = Object.create(e.__proto__ || null) : o === "[object Array]" ? i = Array(e.length) : o === "[object Set]" ? (i = /* @__PURE__ */ new Set(), e.forEach(function(l) {
|
|
138
|
+
i.add(I(l));
|
|
139
|
+
})) : o === "[object Map]" ? (i = /* @__PURE__ */ new Map(), e.forEach(function(l, a) {
|
|
140
|
+
i.set(I(a), I(l));
|
|
141
|
+
})) : o === "[object Date]" ? i = /* @__PURE__ */ new Date(+e) : o === "[object RegExp]" ? i = new RegExp(e.source, e.flags) : o === "[object DataView]" ? i = new e.constructor(I(e.buffer)) : o === "[object ArrayBuffer]" ? i = e.slice(0) : o.slice(-6) === "Array]" && (i = new e.constructor(e)), i) {
|
|
142
|
+
for (n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
143
|
+
ye(i, n[t], Object.getOwnPropertyDescriptor(e, n[t]));
|
|
144
|
+
for (t = 0, n = Object.getOwnPropertyNames(e); t < n.length; t++)
|
|
145
|
+
Object.hasOwnProperty.call(i, r = n[t]) && i[r] === e[r] || ye(i, r, Object.getOwnPropertyDescriptor(e, r));
|
|
146
|
+
}
|
|
147
|
+
return i || e;
|
|
137
148
|
}
|
|
149
|
+
const Ne = Symbol("vee-validate-form"), kt = Symbol("vee-validate-field-instance"), _e = Symbol("Default empty value"), xt = typeof window < "u";
|
|
138
150
|
function ie(e) {
|
|
139
|
-
return
|
|
151
|
+
return T(e) && !!e.__locatorRef;
|
|
140
152
|
}
|
|
141
|
-
function
|
|
153
|
+
function q(e) {
|
|
154
|
+
return !!e && T(e.parse) && e.__type === "VVTypedSchema";
|
|
155
|
+
}
|
|
156
|
+
function oe(e) {
|
|
157
|
+
return !!e && T(e.validate);
|
|
158
|
+
}
|
|
159
|
+
function je(e) {
|
|
142
160
|
return e === "checkbox" || e === "radio";
|
|
143
161
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
162
|
+
function Et(e) {
|
|
163
|
+
return z(e) || Array.isArray(e);
|
|
146
164
|
}
|
|
147
165
|
function se(e) {
|
|
148
166
|
return /^\[.+\]$/i.test(e);
|
|
149
167
|
}
|
|
150
|
-
function
|
|
151
|
-
return
|
|
168
|
+
function Nt(e) {
|
|
169
|
+
return Ce(e) && e.multiple;
|
|
152
170
|
}
|
|
153
|
-
function
|
|
171
|
+
function Ce(e) {
|
|
154
172
|
return e.tagName === "SELECT";
|
|
155
173
|
}
|
|
156
|
-
function
|
|
157
|
-
return e ? !!(typeof Event < "u" &&
|
|
174
|
+
function jt(e) {
|
|
175
|
+
return e ? !!(typeof Event < "u" && T(Event) && e instanceof Event || e && e.srcElement) : !1;
|
|
158
176
|
}
|
|
159
|
-
function
|
|
177
|
+
function k(e, t) {
|
|
160
178
|
if (e === t)
|
|
161
179
|
return !0;
|
|
162
180
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
163
181
|
if (e.constructor !== t.constructor)
|
|
164
182
|
return !1;
|
|
165
|
-
var r, n,
|
|
183
|
+
var r, n, i;
|
|
166
184
|
if (Array.isArray(e)) {
|
|
167
185
|
if (r = e.length, r != t.length)
|
|
168
186
|
return !1;
|
|
169
187
|
for (n = r; n-- !== 0; )
|
|
170
|
-
if (!
|
|
188
|
+
if (!k(e[n], t[n]))
|
|
171
189
|
return !1;
|
|
172
190
|
return !0;
|
|
173
191
|
}
|
|
@@ -178,7 +196,7 @@ function w(e, t) {
|
|
|
178
196
|
if (!t.has(n[0]))
|
|
179
197
|
return !1;
|
|
180
198
|
for (n of e.entries())
|
|
181
|
-
if (!
|
|
199
|
+
if (!k(n[1], t.get(n[0])))
|
|
182
200
|
return !1;
|
|
183
201
|
return !0;
|
|
184
202
|
}
|
|
@@ -206,9 +224,9 @@ function w(e, t) {
|
|
|
206
224
|
return e.valueOf() === t.valueOf();
|
|
207
225
|
if (e.toString !== Object.prototype.toString)
|
|
208
226
|
return e.toString() === t.toString();
|
|
209
|
-
for (
|
|
210
|
-
var
|
|
211
|
-
if (!
|
|
227
|
+
for (i = Object.keys(e), r = i.length, n = r; n-- !== 0; ) {
|
|
228
|
+
var o = i[n];
|
|
229
|
+
if (!k(e[o], t[o]))
|
|
212
230
|
return !1;
|
|
213
231
|
}
|
|
214
232
|
return !0;
|
|
@@ -216,135 +234,116 @@ function w(e, t) {
|
|
|
216
234
|
return e !== e && t !== t;
|
|
217
235
|
}
|
|
218
236
|
function Ve(e) {
|
|
219
|
-
return
|
|
220
|
-
}
|
|
221
|
-
function Oe(e, t, r) {
|
|
222
|
-
typeof r.value == "object" && (r.value = T(r.value)), !r.enumerable || r.get || r.set || !r.configurable || !r.writable || t === "__proto__" ? Object.defineProperty(e, t, r) : e[t] = r.value;
|
|
223
|
-
}
|
|
224
|
-
function T(e) {
|
|
225
|
-
if (typeof e != "object")
|
|
226
|
-
return e;
|
|
227
|
-
var t = 0, r, n, o, l = Object.prototype.toString.call(e);
|
|
228
|
-
if (l === "[object Object]" ? o = Object.create(e.__proto__ || null) : l === "[object Array]" ? o = Array(e.length) : l === "[object Set]" ? (o = /* @__PURE__ */ new Set(), e.forEach(function(i) {
|
|
229
|
-
o.add(T(i));
|
|
230
|
-
})) : l === "[object Map]" ? (o = /* @__PURE__ */ new Map(), e.forEach(function(i, u) {
|
|
231
|
-
o.set(T(u), T(i));
|
|
232
|
-
})) : l === "[object Date]" ? o = /* @__PURE__ */ new Date(+e) : l === "[object RegExp]" ? o = new RegExp(e.source, e.flags) : l === "[object DataView]" ? o = new e.constructor(T(e.buffer)) : l === "[object ArrayBuffer]" ? o = e.slice(0) : l.slice(-6) === "Array]" && (o = new e.constructor(e)), o) {
|
|
233
|
-
for (n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
234
|
-
Oe(o, n[t], Object.getOwnPropertyDescriptor(e, n[t]));
|
|
235
|
-
for (t = 0, n = Object.getOwnPropertyNames(e); t < n.length; t++)
|
|
236
|
-
Object.hasOwnProperty.call(o, r = n[t]) && o[r] === e[r] || Oe(o, r, Object.getOwnPropertyDescriptor(e, r));
|
|
237
|
-
}
|
|
238
|
-
return o || e;
|
|
237
|
+
return xt ? e instanceof File : !1;
|
|
239
238
|
}
|
|
240
|
-
function
|
|
239
|
+
function Pe(e) {
|
|
241
240
|
return se(e) ? e.replace(/\[|\]/gi, "") : e;
|
|
242
241
|
}
|
|
243
242
|
function G(e, t, r) {
|
|
244
|
-
return e ? se(t) ? e[
|
|
243
|
+
return e ? se(t) ? e[Pe(t)] : (t || "").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i, o) => Et(i) && o in i ? i[o] : r, e) : r;
|
|
245
244
|
}
|
|
246
|
-
function
|
|
245
|
+
function Ct(e, t, r) {
|
|
247
246
|
if (se(t)) {
|
|
248
|
-
e[
|
|
247
|
+
e[Pe(t)] = r;
|
|
249
248
|
return;
|
|
250
249
|
}
|
|
251
250
|
const n = t.split(/\.|\[(\d+)\]/).filter(Boolean);
|
|
252
|
-
let
|
|
253
|
-
for (let
|
|
254
|
-
if (
|
|
255
|
-
|
|
251
|
+
let i = e;
|
|
252
|
+
for (let o = 0; o < n.length; o++) {
|
|
253
|
+
if (o === n.length - 1) {
|
|
254
|
+
i[n[o]] = r;
|
|
256
255
|
return;
|
|
257
256
|
}
|
|
258
|
-
(!(n[
|
|
257
|
+
(!(n[o] in i) || Vt(i[n[o]])) && (i[n[o]] = Ee(n[o + 1]) ? [] : {}), i = i[n[o]];
|
|
259
258
|
}
|
|
260
259
|
}
|
|
261
|
-
function
|
|
260
|
+
function Ie(e) {
|
|
262
261
|
return Object.keys(e);
|
|
263
262
|
}
|
|
264
|
-
function
|
|
265
|
-
const r =
|
|
266
|
-
return (r == null ? void 0 : r.provides[e]) ||
|
|
263
|
+
function Te(e, t = void 0) {
|
|
264
|
+
const r = $();
|
|
265
|
+
return (r == null ? void 0 : r.provides[e]) || Ze(e, t);
|
|
267
266
|
}
|
|
268
|
-
function
|
|
267
|
+
function Oe(e, t, r) {
|
|
269
268
|
if (Array.isArray(e)) {
|
|
270
|
-
const n = [...e],
|
|
271
|
-
return
|
|
269
|
+
const n = [...e], i = n.findIndex((o) => k(o, t));
|
|
270
|
+
return i >= 0 ? n.splice(i, 1) : n.push(t), n;
|
|
272
271
|
}
|
|
273
|
-
return
|
|
272
|
+
return k(e, t) ? r : t;
|
|
274
273
|
}
|
|
275
|
-
function
|
|
274
|
+
function Pt(e, t) {
|
|
276
275
|
let r, n;
|
|
277
|
-
return function(...
|
|
278
|
-
const
|
|
279
|
-
return r || (r = !0, setTimeout(() => r = !1, t), n = e.apply(
|
|
276
|
+
return function(...i) {
|
|
277
|
+
const o = this;
|
|
278
|
+
return r || (r = !0, setTimeout(() => r = !1, t), n = e.apply(o, i)), n;
|
|
280
279
|
};
|
|
281
280
|
}
|
|
282
|
-
function
|
|
283
|
-
return
|
|
281
|
+
function It(e, t) {
|
|
282
|
+
return z(t) && t.number ? Ot(e) : e;
|
|
284
283
|
}
|
|
285
|
-
function
|
|
284
|
+
function Se(e, t) {
|
|
286
285
|
let r;
|
|
287
|
-
return async function(...
|
|
288
|
-
const
|
|
289
|
-
r =
|
|
290
|
-
const
|
|
291
|
-
return
|
|
286
|
+
return async function(...i) {
|
|
287
|
+
const o = e(...i);
|
|
288
|
+
r = o;
|
|
289
|
+
const l = await o;
|
|
290
|
+
return o !== r ? l : (r = void 0, t(l, i));
|
|
292
291
|
};
|
|
293
292
|
}
|
|
294
|
-
function
|
|
293
|
+
function Tt(e) {
|
|
295
294
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
296
295
|
}
|
|
297
296
|
function te(e) {
|
|
298
|
-
if (
|
|
297
|
+
if (Fe(e))
|
|
299
298
|
return e._value;
|
|
300
299
|
}
|
|
301
|
-
function
|
|
300
|
+
function Fe(e) {
|
|
302
301
|
return "_value" in e;
|
|
303
302
|
}
|
|
304
|
-
function
|
|
303
|
+
function Ft(e) {
|
|
305
304
|
return e.type === "number" || e.type === "range" ? Number.isNaN(e.valueAsNumber) ? e.value : e.valueAsNumber : e.value;
|
|
306
305
|
}
|
|
307
|
-
function
|
|
308
|
-
if (!
|
|
306
|
+
function De(e) {
|
|
307
|
+
if (!jt(e))
|
|
309
308
|
return e;
|
|
310
309
|
const t = e.target;
|
|
311
|
-
if (
|
|
310
|
+
if (je(t.type) && Fe(t))
|
|
312
311
|
return te(t);
|
|
313
312
|
if (t.type === "file" && t.files) {
|
|
314
313
|
const r = Array.from(t.files);
|
|
315
314
|
return t.multiple ? r : r[0];
|
|
316
315
|
}
|
|
317
|
-
if (
|
|
316
|
+
if (Nt(t))
|
|
318
317
|
return Array.from(t.options).filter((r) => r.selected && !r.disabled).map(te);
|
|
319
|
-
if (
|
|
318
|
+
if (Ce(t)) {
|
|
320
319
|
const r = Array.from(t.options).find((n) => n.selected);
|
|
321
320
|
return r ? te(r) : t.value;
|
|
322
321
|
}
|
|
323
|
-
return
|
|
322
|
+
return Ft(t);
|
|
324
323
|
}
|
|
325
|
-
function
|
|
324
|
+
function Me(e) {
|
|
326
325
|
const t = {};
|
|
327
326
|
return Object.defineProperty(t, "_$$isNormalized", {
|
|
328
327
|
value: !0,
|
|
329
328
|
writable: !1,
|
|
330
329
|
enumerable: !1,
|
|
331
330
|
configurable: !1
|
|
332
|
-
}), e ?
|
|
333
|
-
const
|
|
334
|
-
return e[n] !== !1 && (r[n] =
|
|
331
|
+
}), e ? z(e) && e._$$isNormalized ? e : z(e) ? Object.keys(e).reduce((r, n) => {
|
|
332
|
+
const i = Dt(e[n]);
|
|
333
|
+
return e[n] !== !1 && (r[n] = we(i)), r;
|
|
335
334
|
}, t) : typeof e != "string" ? t : e.split("|").reduce((r, n) => {
|
|
336
|
-
const
|
|
337
|
-
return
|
|
335
|
+
const i = Mt(n);
|
|
336
|
+
return i.name && (r[i.name] = we(i.params)), r;
|
|
338
337
|
}, t) : t;
|
|
339
338
|
}
|
|
340
|
-
function
|
|
341
|
-
return e === !0 ? [] : Array.isArray(e) ||
|
|
339
|
+
function Dt(e) {
|
|
340
|
+
return e === !0 ? [] : Array.isArray(e) || z(e) ? e : [e];
|
|
342
341
|
}
|
|
343
|
-
function
|
|
342
|
+
function we(e) {
|
|
344
343
|
const t = (r) => typeof r == "string" && r[0] === "@" ? Rt(r.slice(1)) : r;
|
|
345
344
|
return Array.isArray(e) ? e.map(t) : e instanceof RegExp ? [e] : Object.keys(e).reduce((r, n) => (r[n] = t(e[n]), r), {});
|
|
346
345
|
}
|
|
347
|
-
const
|
|
346
|
+
const Mt = (e) => {
|
|
348
347
|
let t = [];
|
|
349
348
|
const r = e.split(":")[0];
|
|
350
349
|
return e.includes(":") && (t = e.split(":").slice(1).join(":").split(",")), { name: r, params: t };
|
|
@@ -353,10 +352,10 @@ function Rt(e) {
|
|
|
353
352
|
const t = (r) => G(r, e) || r[e];
|
|
354
353
|
return t.__locatorRef = e, t;
|
|
355
354
|
}
|
|
356
|
-
function
|
|
357
|
-
return Array.isArray(e) ? e.filter(
|
|
355
|
+
function Ut(e) {
|
|
356
|
+
return Array.isArray(e) ? e.filter(ie) : Ie(e).filter((t) => ie(e[t])).map((t) => e[t]);
|
|
358
357
|
}
|
|
359
|
-
const
|
|
358
|
+
const Lt = {
|
|
360
359
|
generateMessage: ({ field: e }) => `${e} is not valid.`,
|
|
361
360
|
bails: !0,
|
|
362
361
|
validateOnBlur: !0,
|
|
@@ -364,39 +363,39 @@ const Bt = {
|
|
|
364
363
|
validateOnInput: !1,
|
|
365
364
|
validateOnModelUpdate: !0
|
|
366
365
|
};
|
|
367
|
-
let
|
|
368
|
-
const
|
|
369
|
-
async function
|
|
370
|
-
const n = r == null ? void 0 : r.bails,
|
|
366
|
+
let Bt = Object.assign({}, Lt);
|
|
367
|
+
const $t = () => Bt;
|
|
368
|
+
async function zt(e, t, r = {}) {
|
|
369
|
+
const n = r == null ? void 0 : r.bails, i = {
|
|
371
370
|
name: (r == null ? void 0 : r.name) || "{field}",
|
|
372
371
|
rules: t,
|
|
373
372
|
label: r == null ? void 0 : r.label,
|
|
374
373
|
bails: n ?? !0,
|
|
375
374
|
formData: (r == null ? void 0 : r.values) || {}
|
|
376
|
-
},
|
|
375
|
+
}, l = (await Gt(i, e)).errors;
|
|
377
376
|
return {
|
|
378
|
-
errors:
|
|
379
|
-
valid: !
|
|
377
|
+
errors: l,
|
|
378
|
+
valid: !l.length
|
|
380
379
|
};
|
|
381
380
|
}
|
|
382
|
-
async function
|
|
383
|
-
if (q(e.rules) ||
|
|
384
|
-
return
|
|
385
|
-
if (
|
|
386
|
-
const
|
|
381
|
+
async function Gt(e, t) {
|
|
382
|
+
if (q(e.rules) || oe(e.rules))
|
|
383
|
+
return qt(t, e.rules);
|
|
384
|
+
if (T(e.rules) || Array.isArray(e.rules)) {
|
|
385
|
+
const l = {
|
|
387
386
|
field: e.label || e.name,
|
|
388
387
|
name: e.name,
|
|
389
388
|
label: e.label,
|
|
390
389
|
form: e.formData,
|
|
391
390
|
value: t
|
|
392
|
-
},
|
|
391
|
+
}, a = Array.isArray(e.rules) ? e.rules : [e.rules], s = a.length, d = [];
|
|
393
392
|
for (let b = 0; b < s; b++) {
|
|
394
|
-
const
|
|
393
|
+
const h = a[b], y = await h(t, l);
|
|
395
394
|
if (!(typeof y != "string" && !Array.isArray(y) && y)) {
|
|
396
395
|
if (Array.isArray(y))
|
|
397
396
|
d.push(...y);
|
|
398
397
|
else {
|
|
399
|
-
const O = typeof y == "string" ? y : Re(
|
|
398
|
+
const O = typeof y == "string" ? y : Re(l);
|
|
400
399
|
d.push(O);
|
|
401
400
|
}
|
|
402
401
|
if (e.bails)
|
|
@@ -409,11 +408,11 @@ async function Qt(e, t) {
|
|
|
409
408
|
errors: d
|
|
410
409
|
};
|
|
411
410
|
}
|
|
412
|
-
const r = Object.assign(Object.assign({}, e), { rules:
|
|
413
|
-
for (let
|
|
414
|
-
const
|
|
415
|
-
name:
|
|
416
|
-
params: r.rules[
|
|
411
|
+
const r = Object.assign(Object.assign({}, e), { rules: Me(e.rules) }), n = [], i = Object.keys(r.rules), o = i.length;
|
|
412
|
+
for (let l = 0; l < o; l++) {
|
|
413
|
+
const a = i[l], s = await Ht(r, t, {
|
|
414
|
+
name: a,
|
|
415
|
+
params: r.rules[a]
|
|
417
416
|
});
|
|
418
417
|
if (s.error && (n.push(s.error), e.bails))
|
|
419
418
|
return {
|
|
@@ -424,10 +423,10 @@ async function Qt(e, t) {
|
|
|
424
423
|
errors: n
|
|
425
424
|
};
|
|
426
425
|
}
|
|
427
|
-
function
|
|
426
|
+
function Qt(e) {
|
|
428
427
|
return !!e && e.name === "ValidationError";
|
|
429
428
|
}
|
|
430
|
-
function
|
|
429
|
+
function Kt(e) {
|
|
431
430
|
return {
|
|
432
431
|
__type: "VVTypedSchema",
|
|
433
432
|
async parse(r) {
|
|
@@ -437,116 +436,117 @@ function Ht(e) {
|
|
|
437
436
|
output: await e.validate(r, { abortEarly: !1 }),
|
|
438
437
|
errors: []
|
|
439
438
|
};
|
|
440
|
-
} catch (
|
|
441
|
-
if (!
|
|
442
|
-
throw
|
|
443
|
-
if (!(!((n =
|
|
444
|
-
return { errors: [{ path:
|
|
445
|
-
const
|
|
446
|
-
const s =
|
|
447
|
-
return
|
|
439
|
+
} catch (i) {
|
|
440
|
+
if (!Qt(i))
|
|
441
|
+
throw i;
|
|
442
|
+
if (!(!((n = i.inner) === null || n === void 0) && n.length) && i.errors.length)
|
|
443
|
+
return { errors: [{ path: i.path, errors: i.errors }] };
|
|
444
|
+
const o = i.inner.reduce((l, a) => {
|
|
445
|
+
const s = a.path || "";
|
|
446
|
+
return l[s] || (l[s] = { errors: [], path: s }), l[s].errors.push(...a.errors), l;
|
|
448
447
|
}, {});
|
|
449
|
-
return { errors: Object.values(
|
|
448
|
+
return { errors: Object.values(o) };
|
|
450
449
|
}
|
|
451
450
|
}
|
|
452
451
|
};
|
|
453
452
|
}
|
|
454
|
-
async function
|
|
455
|
-
const n = await (q(t) ? t :
|
|
456
|
-
for (const
|
|
457
|
-
|
|
453
|
+
async function qt(e, t) {
|
|
454
|
+
const n = await (q(t) ? t : Kt(t)).parse(e), i = [];
|
|
455
|
+
for (const o of n.errors)
|
|
456
|
+
o.errors.length && i.push(...o.errors);
|
|
458
457
|
return {
|
|
459
|
-
errors:
|
|
458
|
+
errors: i
|
|
460
459
|
};
|
|
461
460
|
}
|
|
462
|
-
async function
|
|
463
|
-
const n =
|
|
461
|
+
async function Ht(e, t, r) {
|
|
462
|
+
const n = At(r.name);
|
|
464
463
|
if (!n)
|
|
465
464
|
throw new Error(`No such validator '${r.name}' exists.`);
|
|
466
|
-
const
|
|
465
|
+
const i = Wt(r.params, e.formData), o = {
|
|
467
466
|
field: e.label || e.name,
|
|
468
467
|
name: e.name,
|
|
469
468
|
label: e.label,
|
|
470
469
|
value: t,
|
|
471
470
|
form: e.formData,
|
|
472
|
-
rule: Object.assign(Object.assign({}, r), { params:
|
|
473
|
-
},
|
|
474
|
-
return typeof
|
|
475
|
-
error:
|
|
471
|
+
rule: Object.assign(Object.assign({}, r), { params: i })
|
|
472
|
+
}, l = await n(t, i, o);
|
|
473
|
+
return typeof l == "string" ? {
|
|
474
|
+
error: l
|
|
476
475
|
} : {
|
|
477
|
-
error:
|
|
476
|
+
error: l ? void 0 : Re(o)
|
|
478
477
|
};
|
|
479
478
|
}
|
|
480
479
|
function Re(e) {
|
|
481
|
-
const t =
|
|
480
|
+
const t = $t().generateMessage;
|
|
482
481
|
return t ? t(e) : "Field is invalid";
|
|
483
482
|
}
|
|
484
|
-
function
|
|
485
|
-
const r = (n) =>
|
|
486
|
-
return Array.isArray(e) ? e.map(r) : Object.keys(e).reduce((n,
|
|
483
|
+
function Wt(e, t) {
|
|
484
|
+
const r = (n) => ie(n) ? n(t) : n;
|
|
485
|
+
return Array.isArray(e) ? e.map(r) : Object.keys(e).reduce((n, i) => (n[i] = r(e[i]), n), {});
|
|
487
486
|
}
|
|
488
|
-
let
|
|
489
|
-
function
|
|
490
|
-
const { value: r, initialValue: n, setInitialValue:
|
|
487
|
+
let Ae = 0;
|
|
488
|
+
function Jt(e, t) {
|
|
489
|
+
const { value: r, initialValue: n, setInitialValue: i } = Yt(e, t.modelValue, t.form);
|
|
491
490
|
if (!t.form) {
|
|
492
|
-
let y = function(
|
|
491
|
+
let y = function(m) {
|
|
493
492
|
var O;
|
|
494
|
-
"value" in
|
|
493
|
+
"value" in m && (r.value = m.value), "errors" in m && d(m.errors), "touched" in m && (h.touched = (O = m.touched) !== null && O !== void 0 ? O : h.touched), "initialValue" in m && i(m.initialValue);
|
|
495
494
|
};
|
|
496
|
-
const { errors: s, setErrors: d } =
|
|
495
|
+
const { errors: s, setErrors: d } = er(), b = Ae >= Number.MAX_SAFE_INTEGER ? 0 : ++Ae, h = Zt(r, n, s, t.schema);
|
|
497
496
|
return {
|
|
498
497
|
id: b,
|
|
499
498
|
path: e,
|
|
500
499
|
value: r,
|
|
501
500
|
initialValue: n,
|
|
502
|
-
meta:
|
|
503
|
-
flags: { pendingUnmount: { [b]: !1 } },
|
|
501
|
+
meta: h,
|
|
502
|
+
flags: { pendingUnmount: { [b]: !1 }, pendingReset: !1 },
|
|
504
503
|
errors: s,
|
|
505
504
|
setState: y
|
|
506
505
|
};
|
|
507
506
|
}
|
|
508
|
-
const
|
|
507
|
+
const o = t.form.createPathState(e, {
|
|
509
508
|
bails: t.bails,
|
|
510
509
|
label: t.label,
|
|
511
510
|
type: t.type,
|
|
512
|
-
validate: t.validate
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
511
|
+
validate: t.validate,
|
|
512
|
+
schema: t.schema
|
|
513
|
+
}), l = N(() => o.errors);
|
|
514
|
+
function a(s) {
|
|
515
|
+
var d, b, h;
|
|
516
|
+
"value" in s && (r.value = s.value), "errors" in s && ((d = t.form) === null || d === void 0 || d.setFieldError(f(e), s.errors)), "touched" in s && ((b = t.form) === null || b === void 0 || b.setFieldTouched(f(e), (h = s.touched) !== null && h !== void 0 ? h : !1)), "initialValue" in s && i(s.initialValue);
|
|
517
517
|
}
|
|
518
518
|
return {
|
|
519
|
-
id: Array.isArray(
|
|
519
|
+
id: Array.isArray(o.id) ? o.id[o.id.length - 1] : o.id,
|
|
520
520
|
path: e,
|
|
521
521
|
value: r,
|
|
522
|
-
errors:
|
|
523
|
-
meta:
|
|
522
|
+
errors: l,
|
|
523
|
+
meta: o,
|
|
524
524
|
initialValue: n,
|
|
525
|
-
flags:
|
|
526
|
-
setState:
|
|
525
|
+
flags: o.__flags,
|
|
526
|
+
setState: a
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function Yt(e, t, r) {
|
|
530
530
|
const n = re(f(t));
|
|
531
|
-
function
|
|
531
|
+
function i() {
|
|
532
532
|
return r ? G(r.initialValues.value, f(e), f(n)) : f(n);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function o(d) {
|
|
535
535
|
if (!r) {
|
|
536
536
|
n.value = d;
|
|
537
537
|
return;
|
|
538
538
|
}
|
|
539
|
-
r.
|
|
539
|
+
r.setFieldInitialValue(f(e), d, !0);
|
|
540
540
|
}
|
|
541
|
-
const
|
|
541
|
+
const l = N(i);
|
|
542
542
|
if (!r)
|
|
543
543
|
return {
|
|
544
|
-
value: re(
|
|
545
|
-
initialValue:
|
|
546
|
-
setInitialValue:
|
|
544
|
+
value: re(i()),
|
|
545
|
+
initialValue: l,
|
|
546
|
+
setInitialValue: o
|
|
547
547
|
};
|
|
548
|
-
const
|
|
549
|
-
return r.stageInitialValue(f(e),
|
|
548
|
+
const a = Xt(t, r, l, e);
|
|
549
|
+
return r.stageInitialValue(f(e), a, !0), {
|
|
550
550
|
value: N({
|
|
551
551
|
get() {
|
|
552
552
|
return G(r.values, f(e));
|
|
@@ -555,68 +555,70 @@ function Xt(e, t, r) {
|
|
|
555
555
|
r.setFieldValue(f(e), d, !1);
|
|
556
556
|
}
|
|
557
557
|
}),
|
|
558
|
-
initialValue:
|
|
559
|
-
setInitialValue:
|
|
558
|
+
initialValue: l,
|
|
559
|
+
setInitialValue: o
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Xt(e, t, r, n) {
|
|
563
563
|
return ue(e) ? f(e) : e !== void 0 ? e : G(t.values, f(n), f(r));
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
565
|
+
function Zt(e, t, r, n) {
|
|
566
|
+
var i, o;
|
|
567
|
+
const l = (o = (i = n == null ? void 0 : n.describe) === null || i === void 0 ? void 0 : i.call(n).required) !== null && o !== void 0 ? o : !1, a = et({
|
|
567
568
|
touched: !1,
|
|
568
569
|
pending: !1,
|
|
569
570
|
valid: !0,
|
|
571
|
+
required: l,
|
|
570
572
|
validated: !!f(r).length,
|
|
571
573
|
initialValue: N(() => f(t)),
|
|
572
|
-
dirty: N(() => !
|
|
574
|
+
dirty: N(() => !k(f(e), f(t)))
|
|
573
575
|
});
|
|
574
|
-
return
|
|
575
|
-
|
|
576
|
+
return B(r, (s) => {
|
|
577
|
+
a.valid = !s.length;
|
|
576
578
|
}, {
|
|
577
579
|
immediate: !0,
|
|
578
580
|
flush: "sync"
|
|
579
|
-
}),
|
|
581
|
+
}), a;
|
|
580
582
|
}
|
|
581
|
-
function
|
|
583
|
+
function er() {
|
|
582
584
|
const e = re([]);
|
|
583
585
|
return {
|
|
584
586
|
errors: e,
|
|
585
587
|
setErrors: (t) => {
|
|
586
|
-
e.value =
|
|
588
|
+
e.value = Tt(t);
|
|
587
589
|
}
|
|
588
590
|
};
|
|
589
591
|
}
|
|
590
|
-
function
|
|
591
|
-
process.env.NODE_ENV !== "production" &&
|
|
592
|
+
function tr(e) {
|
|
593
|
+
process.env.NODE_ENV !== "production" && _t({
|
|
592
594
|
id: "vee-validate-devtools-plugin",
|
|
593
595
|
label: "VeeValidate Plugin",
|
|
594
596
|
packageName: "vee-validate",
|
|
595
597
|
homepage: "https://vee-validate.logaretm.com/v4",
|
|
596
598
|
app: e,
|
|
597
599
|
logo: "https://vee-validate.logaretm.com/v4/logo.png"
|
|
598
|
-
},
|
|
600
|
+
}, nr);
|
|
599
601
|
}
|
|
600
|
-
const
|
|
602
|
+
const Ue = {}, H = {};
|
|
601
603
|
let j;
|
|
602
|
-
const le =
|
|
604
|
+
const le = Pt(() => {
|
|
603
605
|
setTimeout(async () => {
|
|
604
|
-
await
|
|
606
|
+
await rt(), j == null || j.sendInspectorState(L), j == null || j.sendInspectorTree(L);
|
|
605
607
|
}, 100);
|
|
606
608
|
}, 100);
|
|
607
|
-
function
|
|
608
|
-
const t =
|
|
609
|
+
function rr(e) {
|
|
610
|
+
const t = $();
|
|
609
611
|
if (!j) {
|
|
610
612
|
const r = t == null ? void 0 : t.appContext.app;
|
|
611
613
|
if (!r)
|
|
612
614
|
return;
|
|
613
|
-
|
|
615
|
+
tr(r);
|
|
614
616
|
}
|
|
615
|
-
H[e.id] = Object.assign({}, e), H[e.id]._vm = t,
|
|
617
|
+
H[e.id] = Object.assign({}, e), H[e.id]._vm = t, tt(() => {
|
|
616
618
|
delete H[e.id], le();
|
|
617
619
|
}), le();
|
|
618
620
|
}
|
|
619
|
-
const
|
|
621
|
+
const L = "vee-validate-inspector", S = {
|
|
620
622
|
error: 12405579,
|
|
621
623
|
success: 448379,
|
|
622
624
|
unknown: 5522283,
|
|
@@ -628,9 +630,9 @@ const $ = "vee-validate-inspector", S = {
|
|
|
628
630
|
gray: 12304330
|
|
629
631
|
};
|
|
630
632
|
let g = null;
|
|
631
|
-
function
|
|
633
|
+
function nr(e) {
|
|
632
634
|
j = e, e.addInspector({
|
|
633
|
-
id:
|
|
635
|
+
id: L,
|
|
634
636
|
icon: "rule",
|
|
635
637
|
label: "vee-validate",
|
|
636
638
|
noSelectionText: "Select a vee-validate node to inspect",
|
|
@@ -671,61 +673,61 @@ function or(e) {
|
|
|
671
673
|
}
|
|
672
674
|
]
|
|
673
675
|
}), e.on.getInspectorTree((t) => {
|
|
674
|
-
if (t.inspectorId !==
|
|
676
|
+
if (t.inspectorId !== L)
|
|
675
677
|
return;
|
|
676
|
-
const r = Object.values(
|
|
678
|
+
const r = Object.values(Ue), n = Object.values(H);
|
|
677
679
|
t.rootNodes = [
|
|
678
680
|
...r.map(ir),
|
|
679
|
-
...n.map((
|
|
681
|
+
...n.map((i) => lr(i))
|
|
680
682
|
];
|
|
681
683
|
}), e.on.getInspectorState((t, r) => {
|
|
682
|
-
if (t.inspectorId !==
|
|
684
|
+
if (t.inspectorId !== L || r.currentTab !== `custom-inspector:${L}`)
|
|
683
685
|
return;
|
|
684
|
-
const { form: n, field:
|
|
685
|
-
if (n &&
|
|
686
|
-
t.state =
|
|
686
|
+
const { form: n, field: i, state: o, type: l } = ar(t.nodeId);
|
|
687
|
+
if (n && l === "form") {
|
|
688
|
+
t.state = ur(n), g = { type: "form", form: n };
|
|
687
689
|
return;
|
|
688
690
|
}
|
|
689
|
-
if (
|
|
690
|
-
t.state =
|
|
691
|
+
if (o && l === "pathState" && n) {
|
|
692
|
+
t.state = ke(o), g = { type: "pathState", state: o, form: n };
|
|
691
693
|
return;
|
|
692
694
|
}
|
|
693
|
-
if (
|
|
694
|
-
t.state =
|
|
695
|
-
errors:
|
|
696
|
-
dirty:
|
|
697
|
-
valid:
|
|
698
|
-
touched:
|
|
699
|
-
value:
|
|
700
|
-
initialValue:
|
|
701
|
-
}), g = { field:
|
|
695
|
+
if (i && l === "field") {
|
|
696
|
+
t.state = ke({
|
|
697
|
+
errors: i.errors.value,
|
|
698
|
+
dirty: i.meta.dirty,
|
|
699
|
+
valid: i.meta.valid,
|
|
700
|
+
touched: i.meta.touched,
|
|
701
|
+
value: i.value.value,
|
|
702
|
+
initialValue: i.meta.initialValue
|
|
703
|
+
}), g = { field: i, type: "field" };
|
|
702
704
|
return;
|
|
703
705
|
}
|
|
704
706
|
g = null;
|
|
705
707
|
});
|
|
706
708
|
}
|
|
707
709
|
function ir(e) {
|
|
708
|
-
const { textColor: t, bgColor: r } =
|
|
709
|
-
Object.values(e.getAllPathStates()).forEach((
|
|
710
|
-
|
|
710
|
+
const { textColor: t, bgColor: r } = Be(e.meta.value.valid), n = {};
|
|
711
|
+
Object.values(e.getAllPathStates()).forEach((l) => {
|
|
712
|
+
Ct(n, f(l.path), or(l, e));
|
|
711
713
|
});
|
|
712
|
-
function
|
|
713
|
-
const s = [...
|
|
714
|
-
return "id" in
|
|
715
|
-
id: `${
|
|
714
|
+
function i(l, a = []) {
|
|
715
|
+
const s = [...a].pop();
|
|
716
|
+
return "id" in l ? Object.assign(Object.assign({}, l), { label: s || l.label }) : z(l) ? {
|
|
717
|
+
id: `${a.join(".")}`,
|
|
716
718
|
label: s || "",
|
|
717
|
-
children: Object.keys(
|
|
718
|
-
} : Array.isArray(
|
|
719
|
-
id: `${
|
|
719
|
+
children: Object.keys(l).map((d) => i(l[d], [...a, d]))
|
|
720
|
+
} : Array.isArray(l) ? {
|
|
721
|
+
id: `${a.join(".")}`,
|
|
720
722
|
label: `${s}[]`,
|
|
721
|
-
children:
|
|
723
|
+
children: l.map((d, b) => i(d, [...a, String(b)]))
|
|
722
724
|
} : { id: "", label: "", children: [] };
|
|
723
725
|
}
|
|
724
|
-
const { children:
|
|
726
|
+
const { children: o } = i(n);
|
|
725
727
|
return {
|
|
726
|
-
id:
|
|
728
|
+
id: de(e),
|
|
727
729
|
label: "Form",
|
|
728
|
-
children:
|
|
730
|
+
children: o,
|
|
729
731
|
tags: [
|
|
730
732
|
{
|
|
731
733
|
label: "Form",
|
|
@@ -740,29 +742,29 @@ function ir(e) {
|
|
|
740
742
|
]
|
|
741
743
|
};
|
|
742
744
|
}
|
|
743
|
-
function
|
|
745
|
+
function or(e, t) {
|
|
744
746
|
return {
|
|
745
|
-
id:
|
|
747
|
+
id: de(t, e),
|
|
746
748
|
label: f(e.path),
|
|
747
|
-
tags:
|
|
749
|
+
tags: Le(e.multiple, e.fieldsCount, e.type, e.valid, t)
|
|
748
750
|
};
|
|
749
751
|
}
|
|
750
|
-
function
|
|
752
|
+
function lr(e, t) {
|
|
751
753
|
return {
|
|
752
|
-
id:
|
|
754
|
+
id: de(t, e),
|
|
753
755
|
label: f(e.name),
|
|
754
|
-
tags:
|
|
756
|
+
tags: Le(!1, 1, e.type, e.meta.valid, t)
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
|
-
function
|
|
758
|
-
const { textColor:
|
|
759
|
+
function Le(e, t, r, n, i) {
|
|
760
|
+
const { textColor: o, bgColor: l } = Be(n);
|
|
759
761
|
return [
|
|
760
762
|
e ? void 0 : {
|
|
761
763
|
label: "Field",
|
|
762
|
-
textColor:
|
|
763
|
-
backgroundColor:
|
|
764
|
+
textColor: o,
|
|
765
|
+
backgroundColor: l
|
|
764
766
|
},
|
|
765
|
-
|
|
767
|
+
i ? void 0 : {
|
|
766
768
|
label: "Standalone",
|
|
767
769
|
textColor: S.black,
|
|
768
770
|
backgroundColor: S.gray
|
|
@@ -784,18 +786,18 @@ function Be(e, t, r, n, o) {
|
|
|
784
786
|
} : void 0
|
|
785
787
|
].filter(Boolean);
|
|
786
788
|
}
|
|
787
|
-
function
|
|
788
|
-
const r = t ? "path" in t ? "pathState" : "field" : "form", n = t ? "path" in t ? t == null ? void 0 : t.path : f(t == null ? void 0 : t.name) : "",
|
|
789
|
-
return btoa(encodeURIComponent(JSON.stringify(
|
|
789
|
+
function de(e, t) {
|
|
790
|
+
const r = t ? "path" in t ? "pathState" : "field" : "form", n = t ? "path" in t ? t == null ? void 0 : t.path : f(t == null ? void 0 : t.name) : "", i = { f: e == null ? void 0 : e.formId, ff: n, type: r };
|
|
791
|
+
return btoa(encodeURIComponent(JSON.stringify(i)));
|
|
790
792
|
}
|
|
791
|
-
function
|
|
793
|
+
function ar(e) {
|
|
792
794
|
try {
|
|
793
|
-
const t = JSON.parse(decodeURIComponent(atob(e))), r =
|
|
795
|
+
const t = JSON.parse(decodeURIComponent(atob(e))), r = Ue[t.f];
|
|
794
796
|
if (!r && t.ff) {
|
|
795
|
-
const
|
|
796
|
-
return
|
|
797
|
+
const i = H[t.ff];
|
|
798
|
+
return i ? {
|
|
797
799
|
type: t.type,
|
|
798
|
-
field:
|
|
800
|
+
field: i
|
|
799
801
|
} : {};
|
|
800
802
|
}
|
|
801
803
|
if (!r)
|
|
@@ -810,7 +812,7 @@ function ur(e) {
|
|
|
810
812
|
}
|
|
811
813
|
return {};
|
|
812
814
|
}
|
|
813
|
-
function
|
|
815
|
+
function ke(e) {
|
|
814
816
|
return {
|
|
815
817
|
"Field state": [
|
|
816
818
|
{ key: "errors", value: e.errors },
|
|
@@ -837,21 +839,21 @@ function xe(e) {
|
|
|
837
839
|
]
|
|
838
840
|
};
|
|
839
841
|
}
|
|
840
|
-
function
|
|
841
|
-
const { errorBag: t, meta: r, values: n, isSubmitting:
|
|
842
|
+
function ur(e) {
|
|
843
|
+
const { errorBag: t, meta: r, values: n, isSubmitting: i, isValidating: o, submitCount: l } = e;
|
|
842
844
|
return {
|
|
843
845
|
"Form state": [
|
|
844
846
|
{
|
|
845
847
|
key: "submitCount",
|
|
846
|
-
value:
|
|
848
|
+
value: l.value
|
|
847
849
|
},
|
|
848
850
|
{
|
|
849
851
|
key: "isSubmitting",
|
|
850
|
-
value:
|
|
852
|
+
value: i.value
|
|
851
853
|
},
|
|
852
854
|
{
|
|
853
855
|
key: "isValidating",
|
|
854
|
-
value:
|
|
856
|
+
value: o.value
|
|
855
857
|
},
|
|
856
858
|
{
|
|
857
859
|
key: "touched",
|
|
@@ -875,165 +877,168 @@ function sr(e) {
|
|
|
875
877
|
},
|
|
876
878
|
{
|
|
877
879
|
key: "errors",
|
|
878
|
-
value:
|
|
880
|
+
value: Ie(t.value).reduce((a, s) => {
|
|
879
881
|
var d;
|
|
880
882
|
const b = (d = t.value[s]) === null || d === void 0 ? void 0 : d[0];
|
|
881
|
-
return b && (
|
|
883
|
+
return b && (a[s] = b), a;
|
|
882
884
|
}, {})
|
|
883
885
|
}
|
|
884
886
|
]
|
|
885
887
|
};
|
|
886
888
|
}
|
|
887
|
-
function
|
|
889
|
+
function Be(e) {
|
|
888
890
|
return {
|
|
889
891
|
bgColor: e ? S.success : S.error,
|
|
890
892
|
textColor: e ? S.black : S.white
|
|
891
893
|
};
|
|
892
894
|
}
|
|
893
|
-
function
|
|
894
|
-
return
|
|
895
|
+
function sr(e, t, r) {
|
|
896
|
+
return je(r == null ? void 0 : r.type) ? cr(e, t, r) : $e(e, t, r);
|
|
895
897
|
}
|
|
896
|
-
function
|
|
897
|
-
const { initialValue: n, validateOnMount:
|
|
898
|
+
function $e(e, t, r) {
|
|
899
|
+
const { initialValue: n, validateOnMount: i, bails: o, type: l, checkedValue: a, label: s, validateOnValueUpdate: d, uncheckedValue: b, controlled: h, keepValueOnUnmount: y, syncVModel: m, form: O } = dr(r), F = h ? Te(Ne) : void 0, c = O || F, E = N(() => St(V(e))), x = N(() => {
|
|
898
900
|
if (V(c == null ? void 0 : c.schema))
|
|
899
901
|
return;
|
|
900
902
|
const v = f(t);
|
|
901
|
-
return
|
|
902
|
-
}), { id:
|
|
903
|
+
return oe(v) || q(v) || T(v) || Array.isArray(v) ? v : Me(v);
|
|
904
|
+
}), { id: X, value: Q, initialValue: ze, meta: w, setState: W, errors: Z, flags: J } = Jt(E, {
|
|
903
905
|
modelValue: n,
|
|
904
906
|
form: c,
|
|
905
|
-
bails:
|
|
907
|
+
bails: o,
|
|
906
908
|
label: s,
|
|
907
|
-
type:
|
|
908
|
-
validate: x.value ? fe : void 0
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
909
|
+
type: l,
|
|
910
|
+
validate: x.value ? fe : void 0,
|
|
911
|
+
schema: q(t) ? t : void 0
|
|
912
|
+
}), Ge = N(() => Z.value[0]);
|
|
913
|
+
m && fr({
|
|
914
|
+
value: Q,
|
|
915
|
+
prop: m,
|
|
916
|
+
handleChange: ve,
|
|
917
|
+
shouldValidate: () => d && !J.pendingReset
|
|
918
|
+
});
|
|
919
|
+
const Qe = (u, v = !1) => {
|
|
920
|
+
w.touched = !0, v && D();
|
|
913
921
|
};
|
|
914
|
-
async function
|
|
922
|
+
async function ce(u) {
|
|
915
923
|
var v, _;
|
|
916
|
-
|
|
924
|
+
if (c != null && c.validateSchema) {
|
|
925
|
+
const { results: p } = await c.validateSchema(u);
|
|
926
|
+
return (v = p[V(E)]) !== null && v !== void 0 ? v : { valid: !0, errors: [] };
|
|
927
|
+
}
|
|
928
|
+
return x.value ? zt(Q.value, x.value, {
|
|
917
929
|
name: V(E),
|
|
918
930
|
label: V(s),
|
|
919
931
|
values: (_ = c == null ? void 0 : c.values) !== null && _ !== void 0 ? _ : {},
|
|
920
|
-
bails:
|
|
932
|
+
bails: o
|
|
921
933
|
}) : { valid: !0, errors: [] };
|
|
922
934
|
}
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
}), R = we(async () => de("silent"), (a) => (A.valid = a.valid, a));
|
|
927
|
-
function fe(a) {
|
|
928
|
-
return (a == null ? void 0 : a.mode) === "silent" ? R() : U();
|
|
935
|
+
const D = Se(async () => (w.pending = !0, w.validated = !0, ce("validated-only")), (u) => (J.pendingUnmount[A.id] || (W({ errors: u.errors }), w.pending = !1, w.valid = u.valid), u)), M = Se(async () => ce("silent"), (u) => (w.valid = u.valid, u));
|
|
936
|
+
function fe(u) {
|
|
937
|
+
return (u == null ? void 0 : u.mode) === "silent" ? M() : D();
|
|
929
938
|
}
|
|
930
|
-
function ve(
|
|
931
|
-
const _ =
|
|
939
|
+
function ve(u, v = !0) {
|
|
940
|
+
const _ = De(u);
|
|
932
941
|
ee(_, v);
|
|
933
942
|
}
|
|
934
|
-
|
|
935
|
-
if (
|
|
936
|
-
return
|
|
937
|
-
(!c || !c.validateSchema) &&
|
|
943
|
+
Je(() => {
|
|
944
|
+
if (i)
|
|
945
|
+
return D();
|
|
946
|
+
(!c || !c.validateSchema) && M();
|
|
938
947
|
});
|
|
939
|
-
function
|
|
940
|
-
|
|
948
|
+
function Ke(u) {
|
|
949
|
+
w.touched = u;
|
|
941
950
|
}
|
|
942
|
-
function
|
|
951
|
+
function he(u) {
|
|
943
952
|
var v;
|
|
944
|
-
const _ =
|
|
953
|
+
const _ = u && "value" in u ? u.value : ze.value;
|
|
945
954
|
W({
|
|
946
|
-
value:
|
|
947
|
-
initialValue:
|
|
948
|
-
touched: (v =
|
|
949
|
-
errors: (
|
|
950
|
-
}),
|
|
955
|
+
value: I(_),
|
|
956
|
+
initialValue: I(_),
|
|
957
|
+
touched: (v = u == null ? void 0 : u.touched) !== null && v !== void 0 ? v : !1,
|
|
958
|
+
errors: (u == null ? void 0 : u.errors) || []
|
|
959
|
+
}), w.pending = !1, w.validated = !1, M();
|
|
951
960
|
}
|
|
952
|
-
const
|
|
953
|
-
function ee(
|
|
954
|
-
Q.value =
|
|
961
|
+
const pe = $();
|
|
962
|
+
function ee(u, v = !0) {
|
|
963
|
+
Q.value = pe && m ? It(u, pe.props.modelModifiers) : u, (v ? D : M)();
|
|
955
964
|
}
|
|
956
|
-
function
|
|
957
|
-
W({ errors: Array.isArray(
|
|
965
|
+
function qe(u) {
|
|
966
|
+
W({ errors: Array.isArray(u) ? u : [u] });
|
|
958
967
|
}
|
|
959
|
-
const
|
|
968
|
+
const He = N({
|
|
960
969
|
get() {
|
|
961
970
|
return Q.value;
|
|
962
971
|
},
|
|
963
|
-
set(
|
|
964
|
-
ee(
|
|
972
|
+
set(u) {
|
|
973
|
+
ee(u, d);
|
|
965
974
|
}
|
|
966
|
-
})
|
|
967
|
-
|
|
968
|
-
D(a) && a === v && w(a, v) && Ye("Detected a possible deep change on field `value` ref, for nested changes please either set the entire ref value or use `setValue` or `handleChange`.");
|
|
969
|
-
}, { deep: !0 });
|
|
970
|
-
const k = {
|
|
971
|
-
id: Y,
|
|
975
|
+
}), A = {
|
|
976
|
+
id: X,
|
|
972
977
|
name: E,
|
|
973
978
|
label: s,
|
|
974
|
-
value:
|
|
975
|
-
meta:
|
|
976
|
-
errors:
|
|
977
|
-
errorMessage:
|
|
978
|
-
type:
|
|
979
|
-
checkedValue:
|
|
979
|
+
value: He,
|
|
980
|
+
meta: w,
|
|
981
|
+
errors: Z,
|
|
982
|
+
errorMessage: Ge,
|
|
983
|
+
type: l,
|
|
984
|
+
checkedValue: a,
|
|
980
985
|
uncheckedValue: b,
|
|
981
|
-
bails:
|
|
986
|
+
bails: o,
|
|
982
987
|
keepValueOnUnmount: y,
|
|
983
|
-
resetField:
|
|
984
|
-
handleReset: () =>
|
|
988
|
+
resetField: he,
|
|
989
|
+
handleReset: () => he(),
|
|
985
990
|
validate: fe,
|
|
986
991
|
handleChange: ve,
|
|
987
|
-
handleBlur:
|
|
992
|
+
handleBlur: Qe,
|
|
988
993
|
setState: W,
|
|
989
|
-
setTouched:
|
|
990
|
-
setErrors:
|
|
994
|
+
setTouched: Ke,
|
|
995
|
+
setErrors: qe,
|
|
991
996
|
setValue: ee
|
|
992
997
|
};
|
|
993
|
-
if (
|
|
994
|
-
|
|
998
|
+
if (Ye(kt, A), ue(t) && typeof f(t) != "function" && B(t, (u, v) => {
|
|
999
|
+
k(u, v) || (w.validated ? D() : M());
|
|
995
1000
|
}, {
|
|
996
1001
|
deep: !0
|
|
997
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
1002
|
+
}), process.env.NODE_ENV !== "production" && (A._vm = $(), B(() => Object.assign(Object.assign({ errors: Z.value }, w), { value: Q.value }), le, {
|
|
998
1003
|
deep: !0
|
|
999
|
-
}), c ||
|
|
1000
|
-
return
|
|
1001
|
-
const
|
|
1002
|
-
const
|
|
1003
|
-
return !
|
|
1004
|
-
const
|
|
1005
|
-
const C = G(c.values,
|
|
1006
|
-
return C !== void 0 && (K[
|
|
1004
|
+
}), c || rr(A)), !c)
|
|
1005
|
+
return A;
|
|
1006
|
+
const We = N(() => {
|
|
1007
|
+
const u = x.value;
|
|
1008
|
+
return !u || T(u) || oe(u) || q(u) || Array.isArray(u) ? {} : Object.keys(u).reduce((v, _) => {
|
|
1009
|
+
const p = Ut(u[_]).map((K) => K.__locatorRef).reduce((K, R) => {
|
|
1010
|
+
const C = G(c.values, R) || c.values[R];
|
|
1011
|
+
return C !== void 0 && (K[R] = C), K;
|
|
1007
1012
|
}, {});
|
|
1008
|
-
return Object.assign(v,
|
|
1013
|
+
return Object.assign(v, p), v;
|
|
1009
1014
|
}, {});
|
|
1010
1015
|
});
|
|
1011
|
-
return
|
|
1012
|
-
if (!Object.keys(
|
|
1016
|
+
return B(We, (u, v) => {
|
|
1017
|
+
if (!Object.keys(u).length)
|
|
1013
1018
|
return;
|
|
1014
|
-
!
|
|
1015
|
-
}),
|
|
1016
|
-
var
|
|
1017
|
-
const v = (
|
|
1018
|
-
if (v || !c ||
|
|
1019
|
-
c == null || c.removePathState(_,
|
|
1019
|
+
!k(u, v) && (w.validated ? D() : M());
|
|
1020
|
+
}), Xe(() => {
|
|
1021
|
+
var u;
|
|
1022
|
+
const v = (u = V(A.keepValueOnUnmount)) !== null && u !== void 0 ? u : V(c.keepValuesOnUnmount), _ = V(E);
|
|
1023
|
+
if (v || !c || J.pendingUnmount[A.id]) {
|
|
1024
|
+
c == null || c.removePathState(_, X);
|
|
1020
1025
|
return;
|
|
1021
1026
|
}
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
if (Array.isArray(
|
|
1025
|
-
if (
|
|
1026
|
-
const
|
|
1027
|
-
if (
|
|
1028
|
-
const C = [...
|
|
1029
|
-
C.splice(
|
|
1027
|
+
J.pendingUnmount[A.id] = !0;
|
|
1028
|
+
const p = c.getPathState(_);
|
|
1029
|
+
if (Array.isArray(p == null ? void 0 : p.id) && (p != null && p.multiple) ? p != null && p.id.includes(A.id) : (p == null ? void 0 : p.id) === A.id) {
|
|
1030
|
+
if (p != null && p.multiple && Array.isArray(p.value)) {
|
|
1031
|
+
const R = p.value.findIndex((C) => k(C, V(A.checkedValue)));
|
|
1032
|
+
if (R > -1) {
|
|
1033
|
+
const C = [...p.value];
|
|
1034
|
+
C.splice(R, 1), c.setFieldValue(_, C);
|
|
1030
1035
|
}
|
|
1031
|
-
Array.isArray(
|
|
1036
|
+
Array.isArray(p.id) && p.id.splice(p.id.indexOf(A.id), 1);
|
|
1032
1037
|
} else
|
|
1033
1038
|
c.unsetPathValue(V(E));
|
|
1034
|
-
c.removePathState(_,
|
|
1039
|
+
c.removePathState(_, X);
|
|
1035
1040
|
}
|
|
1036
|
-
}),
|
|
1041
|
+
}), A;
|
|
1037
1042
|
}
|
|
1038
1043
|
function dr(e) {
|
|
1039
1044
|
const t = () => ({
|
|
@@ -1045,64 +1050,64 @@ function dr(e) {
|
|
|
1045
1050
|
keepValueOnUnmount: void 0,
|
|
1046
1051
|
syncVModel: !1,
|
|
1047
1052
|
controlled: !0
|
|
1048
|
-
}), r = !!(e != null && e.syncVModel), n = typeof (e == null ? void 0 : e.syncVModel) == "string" ? e.syncVModel : (e == null ? void 0 : e.modelPropName) || "modelValue",
|
|
1053
|
+
}), r = !!(e != null && e.syncVModel), n = typeof (e == null ? void 0 : e.syncVModel) == "string" ? e.syncVModel : (e == null ? void 0 : e.modelPropName) || "modelValue", i = r && !("initialValue" in (e || {})) ? ae($(), n) : e == null ? void 0 : e.initialValue;
|
|
1049
1054
|
if (!e)
|
|
1050
|
-
return Object.assign(Object.assign({}, t()), { initialValue:
|
|
1051
|
-
const
|
|
1055
|
+
return Object.assign(Object.assign({}, t()), { initialValue: i });
|
|
1056
|
+
const o = "valueProp" in e ? e.valueProp : e.checkedValue, l = "standalone" in e ? !e.standalone : e.controlled, a = (e == null ? void 0 : e.modelPropName) || (e == null ? void 0 : e.syncVModel) || !1;
|
|
1052
1057
|
return Object.assign(Object.assign(Object.assign({}, t()), e || {}), {
|
|
1053
|
-
initialValue:
|
|
1054
|
-
controlled:
|
|
1055
|
-
checkedValue:
|
|
1056
|
-
syncVModel:
|
|
1058
|
+
initialValue: i,
|
|
1059
|
+
controlled: l ?? !0,
|
|
1060
|
+
checkedValue: o,
|
|
1061
|
+
syncVModel: a
|
|
1057
1062
|
});
|
|
1058
1063
|
}
|
|
1059
|
-
function
|
|
1060
|
-
const n = r != null && r.standalone ? void 0 :
|
|
1061
|
-
function
|
|
1062
|
-
const s =
|
|
1063
|
-
const
|
|
1064
|
-
return Array.isArray(
|
|
1064
|
+
function cr(e, t, r) {
|
|
1065
|
+
const n = r != null && r.standalone ? void 0 : Te(Ne), i = r == null ? void 0 : r.checkedValue, o = r == null ? void 0 : r.uncheckedValue;
|
|
1066
|
+
function l(a) {
|
|
1067
|
+
const s = a.handleChange, d = N(() => {
|
|
1068
|
+
const h = V(a.value), y = V(i);
|
|
1069
|
+
return Array.isArray(h) ? h.findIndex((m) => k(m, y)) >= 0 : k(y, h);
|
|
1065
1070
|
});
|
|
1066
|
-
function b(
|
|
1067
|
-
var
|
|
1068
|
-
if (d.value === ((
|
|
1069
|
-
y &&
|
|
1071
|
+
function b(h, y = !0) {
|
|
1072
|
+
var m, O;
|
|
1073
|
+
if (d.value === ((m = h == null ? void 0 : h.target) === null || m === void 0 ? void 0 : m.checked)) {
|
|
1074
|
+
y && a.validate();
|
|
1070
1075
|
return;
|
|
1071
1076
|
}
|
|
1072
|
-
const
|
|
1073
|
-
let x = (O = V(
|
|
1074
|
-
n && (c != null && c.multiple) && c.type === "checkbox" ? x =
|
|
1077
|
+
const F = V(e), c = n == null ? void 0 : n.getPathState(F), E = De(h);
|
|
1078
|
+
let x = (O = V(i)) !== null && O !== void 0 ? O : E;
|
|
1079
|
+
n && (c != null && c.multiple) && c.type === "checkbox" ? x = Oe(G(n.values, F) || [], x, void 0) : (r == null ? void 0 : r.type) === "checkbox" && (x = Oe(V(a.value), x, V(o))), s(x, y);
|
|
1075
1080
|
}
|
|
1076
|
-
return Object.assign(Object.assign({},
|
|
1081
|
+
return Object.assign(Object.assign({}, a), {
|
|
1077
1082
|
checked: d,
|
|
1078
|
-
checkedValue:
|
|
1079
|
-
uncheckedValue:
|
|
1083
|
+
checkedValue: i,
|
|
1084
|
+
uncheckedValue: o,
|
|
1080
1085
|
handleChange: b
|
|
1081
1086
|
});
|
|
1082
1087
|
}
|
|
1083
|
-
return
|
|
1088
|
+
return l($e(e, t, r));
|
|
1084
1089
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const
|
|
1087
|
-
if (!
|
|
1090
|
+
function fr({ prop: e, value: t, handleChange: r, shouldValidate: n }) {
|
|
1091
|
+
const i = $();
|
|
1092
|
+
if (!i || !e) {
|
|
1088
1093
|
process.env.NODE_ENV !== "production" && console.warn("Failed to setup model events because `useField` was not called in setup.");
|
|
1089
1094
|
return;
|
|
1090
1095
|
}
|
|
1091
1096
|
const o = typeof e == "string" ? e : "modelValue", l = `update:${o}`;
|
|
1092
|
-
o in
|
|
1093
|
-
|
|
1094
|
-
}),
|
|
1095
|
-
if (
|
|
1097
|
+
o in i.props && (B(t, (a) => {
|
|
1098
|
+
k(a, ae(i, o)) || i.emit(l, a);
|
|
1099
|
+
}), B(() => ae(i, o), (a) => {
|
|
1100
|
+
if (a === _e && t.value === void 0)
|
|
1096
1101
|
return;
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1102
|
+
const s = a === _e ? void 0 : a;
|
|
1103
|
+
k(s, t.value) || r(s, n());
|
|
1099
1104
|
}));
|
|
1100
1105
|
}
|
|
1101
1106
|
function ae(e, t) {
|
|
1102
1107
|
if (e)
|
|
1103
1108
|
return e.props[t];
|
|
1104
1109
|
}
|
|
1105
|
-
const
|
|
1110
|
+
const vr = { class: "w-72" }, hr = { class: "relative h-10 w-full min-w-[200px]" }, pr = /* @__PURE__ */ P("div", { class: "absolute top-2/4 right-3 grid h-5 w-5 -translate-y-2/4 place-items-center text-neutral-400" }, null, -1), mr = ["id", "type", "disabled"], br = ["for"], gr = { class: "my-3" }, yr = ["name", "id"], _r = { key: 0 }, Sr = /* @__PURE__ */ nt({
|
|
1106
1111
|
__name: "EpInput",
|
|
1107
1112
|
props: {
|
|
1108
1113
|
name: {},
|
|
@@ -1121,52 +1126,52 @@ const pr = { class: "w-72" }, hr = { class: "relative h-10 w-full min-w-[200px]"
|
|
|
1121
1126
|
const r = e, {
|
|
1122
1127
|
id: n,
|
|
1123
1128
|
// name,
|
|
1124
|
-
label:
|
|
1125
|
-
type:
|
|
1126
|
-
modelValue:
|
|
1127
|
-
placeholder:
|
|
1129
|
+
label: i,
|
|
1130
|
+
type: o,
|
|
1131
|
+
modelValue: l,
|
|
1132
|
+
placeholder: a,
|
|
1128
1133
|
iconPath: s,
|
|
1129
1134
|
disabled: d,
|
|
1130
1135
|
readonly: b
|
|
1131
|
-
} = it(r),
|
|
1136
|
+
} = it(r), h = ot(r, "name");
|
|
1132
1137
|
function y(c) {
|
|
1133
1138
|
return c ? c.length < 8 ? "this field must contain at least 8 characters" : !0 : "this field is required";
|
|
1134
1139
|
}
|
|
1135
|
-
const { value:
|
|
1136
|
-
return (c, E) => (
|
|
1137
|
-
|
|
1138
|
-
P("div",
|
|
1140
|
+
const { value: m, errorMessage: O, meta: F } = sr(h, y);
|
|
1141
|
+
return (c, E) => (me(), be(lt, null, [
|
|
1142
|
+
ge(Y(f(F)) + " ", 1),
|
|
1143
|
+
P("div", vr, [
|
|
1139
1144
|
P("div", hr, [
|
|
1140
|
-
|
|
1145
|
+
pr,
|
|
1141
1146
|
P("input", {
|
|
1142
1147
|
id: f(n),
|
|
1143
|
-
type: f(
|
|
1148
|
+
type: f(o),
|
|
1144
1149
|
class: "peer h-full w-full rounded-[7px] border border-blue-200 border-t-transparent bg-transparent px-3 py-2.5 !pr-9 font-sans text-sm font-normal text-neutral-700 outline outline-0 transition-all placeholder-shown:border placeholder-shown:border-neutral-200 placeholder-shown:border-t-neutral-200 focus:border-2 focus:border-blue-500 focus:border-t-transparent focus:outline-0 disabled:border-0 disabled:bg-neutral-100 disabled:cursor-not-allowed",
|
|
1145
1150
|
placeholder: " ",
|
|
1146
1151
|
disabled: f(d)
|
|
1147
|
-
}, null, 8,
|
|
1152
|
+
}, null, 8, mr),
|
|
1148
1153
|
P("label", {
|
|
1149
1154
|
for: f(n),
|
|
1150
1155
|
class: "before:content[' '] after:content[' '] pointer-events-none absolute left-0 -top-1.5 flex h-full w-full select-none text-[11px] font-normal leading-tight text-neutral-400 transition-all before:pointer-events-none before:mt-[6.5px] before:mr-1 before:box-border before:block before:h-1.5 before:w-2.5 before:rounded-tl-md before:border-t before:border-l before:border-blue-200 before:transition-all after:pointer-events-none after:mt-[6.5px] after:ml-1 after:box-border after:block after:h-1.5 after:w-2.5 after:flex-grow after:rounded-tr-md after:border-t after:border-r after:border-blue-200 after:transition-all peer-placeholder-shown:text-sm peer-placeholder-shown:leading-[3.75] peer-placeholder-shown:text-neutral-700 peer-placeholder-shown:before:border-transparent peer-placeholder-shown:after:border-transparent peer-focus:text-[11px] peer-focus:leading-tight peer-focus:text-blue-500 peer-focus:before:border-t-2 peer-focus:before:border-l-2 peer-focus:before:border-blue-500 peer-focus:after:border-t-2 peer-focus:after:border-r-2 peer-focus:after:border-blue-500 peer-disabled:text-transparent peer-disabled:before:border-transparent peer-disabled:after:border-transparent peer-disabled:peer-placeholder-shown:text-neutral-500"
|
|
1151
|
-
},
|
|
1152
|
-
|
|
1156
|
+
}, Y(f(i)), 9, br),
|
|
1157
|
+
at(ct, { iconPath: f(ft) }, null, 8, ["iconPath"])
|
|
1153
1158
|
])
|
|
1154
1159
|
]),
|
|
1155
|
-
P("div",
|
|
1156
|
-
|
|
1157
|
-
|
|
1160
|
+
P("div", gr, [
|
|
1161
|
+
ge(Y(h.value) + " ", 1),
|
|
1162
|
+
ut(P("input", {
|
|
1158
1163
|
type: "text",
|
|
1159
|
-
"onUpdate:modelValue": E[0] || (E[0] = (x) => ue(
|
|
1160
|
-
name:
|
|
1161
|
-
id:
|
|
1162
|
-
}, null, 8,
|
|
1163
|
-
[
|
|
1164
|
+
"onUpdate:modelValue": E[0] || (E[0] = (x) => ue(m) ? m.value = x : null),
|
|
1165
|
+
name: h.value,
|
|
1166
|
+
id: h.value
|
|
1167
|
+
}, null, 8, yr), [
|
|
1168
|
+
[st, f(m)]
|
|
1164
1169
|
]),
|
|
1165
|
-
f(O) ? (
|
|
1170
|
+
f(O) ? (me(), be("div", _r, Y(f(O)), 1)) : dt("", !0)
|
|
1166
1171
|
])
|
|
1167
1172
|
], 64));
|
|
1168
1173
|
}
|
|
1169
1174
|
});
|
|
1170
1175
|
export {
|
|
1171
|
-
|
|
1176
|
+
Sr as default
|
|
1172
1177
|
};
|