@orchidui/dashboard 1.8.1-93 → 1.8.1-96

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.
Files changed (177) hide show
  1. package/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
  2. package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
  3. package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
  4. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
  5. package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
  6. package/dist/Collection-COudIl-A.js +55 -0
  7. package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
  8. package/dist/Dashboard/Card/OcCard.js +1 -1
  9. package/dist/Dashboard/Charts/BarChart/OcBarChart.js +1 -1
  10. package/dist/Dashboard/Charts/BarRaceChart/OcBarRaceChart.js +1 -1
  11. package/dist/Dashboard/Charts/LineChart/OcLineChart.js +1 -1
  12. package/dist/Dashboard/Charts/PieChart/OcPieChart.js +1 -1
  13. package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
  14. package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
  15. package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
  16. package/dist/DialogPortal-zAvO8zt4.js +23 -0
  17. package/dist/DialogTrigger-BIF1A4hk.js +72 -0
  18. package/dist/DismissableLayer-C7IJliOb.js +151 -0
  19. package/dist/FocusScope--pJ6bboI.js +121 -0
  20. package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
  21. package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
  22. package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
  23. package/dist/ListboxItem-CjMk-mEX.js +417 -0
  24. package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
  25. package/dist/{OcBarChart-CgKo9rAM.js → OcBarChart-DFnF2-u0.js} +2 -2
  26. package/dist/{OcBarRaceChart-D_XrqdiO.js → OcBarRaceChart-B6S4Rrlq.js} +3 -3
  27. package/dist/{OcCard-BpqC7suH.js → OcCard-B3SCzVwn.js} +54 -58
  28. package/dist/OcCodeBlock-CBdVqav7.js +37 -0
  29. package/dist/{OcLineChart-dAL6sRiP.js → OcLineChart-CTDLgo1v.js} +2 -2
  30. package/dist/OcLottieAnimation-DeMoIDaX.js +7747 -0
  31. package/dist/{OcPieChart-Kn-CkXip.js → OcPieChart-NSv6CW-L.js} +4 -4
  32. package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
  33. package/dist/PopperContent-BT3Svcc3.js +1465 -0
  34. package/dist/Presence-CxfTrw6l.js +133 -0
  35. package/dist/Primitive-B3twiLO1.js +44 -0
  36. package/dist/QuillEditor-hFQ0MJZO.js +9529 -0
  37. package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
  38. package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
  39. package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
  40. package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
  41. package/dist/Separator-DRam5i7g.js +54 -0
  42. package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
  43. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
  44. package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
  45. package/dist/Teleport-DnUewq5H.js +25 -0
  46. package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
  47. package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
  48. package/dist/VisuallyHidden-DMAU4heD.js +41 -0
  49. package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
  50. package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
  51. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  52. package/dist/array-CqVTtuYm.js +6 -0
  53. package/dist/arrays-4jDZqbdb.js +20 -0
  54. package/dist/check-C2tzJ0Gk.js +11 -0
  55. package/dist/chevron-down-CnpAlizg.js +13 -0
  56. package/dist/chevron-left-BOwFasou.js +13 -0
  57. package/dist/chevron-right-D308801z.js +13 -0
  58. package/dist/circle-A-6NpYiX.js +13 -0
  59. package/dist/clamp-BL1Rb24G.js +22 -0
  60. package/dist/constant-CuDQlTIy.js +3433 -0
  61. package/dist/createContext-CZEfaSVa.js +17 -0
  62. package/dist/createLucideIcon-eXqDwUWj.js +71 -0
  63. package/dist/ellipsis-CEG9G7eN.js +15 -0
  64. package/dist/getActiveElement-B-HWdUIb.js +11 -0
  65. package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
  66. package/dist/index-B3LW8uSH.js +133 -0
  67. package/dist/index-BIlpXuWX.js +3430 -0
  68. package/dist/index-BlGEiPHj.js +1246 -0
  69. package/dist/index-BwPb_idr.js +574 -0
  70. package/dist/index-C9julNQm.js +173 -0
  71. package/dist/index-C_aI-Wfj.js +34 -0
  72. package/dist/index-CumjCvqB.js +5703 -0
  73. package/dist/index-LqWMCtOd.js +809 -0
  74. package/dist/index-OpE2oGce.js +110 -0
  75. package/dist/index.js +14 -14
  76. package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
  77. package/dist/lib/utils.js +5 -0
  78. package/dist/nullish-CjWwlQS3.js +6 -0
  79. package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
  80. package/dist/plus-CgluTYQY.js +14 -0
  81. package/dist/text-zwICaAnx.js +743 -0
  82. package/dist/ui/accordion/index.js +7 -0
  83. package/dist/ui/alert/index.js +64 -0
  84. package/dist/ui/alert-dialog/index.js +356 -0
  85. package/dist/ui/aspect-ratio/index.js +50 -0
  86. package/dist/ui/auto-form/constant.js +5 -0
  87. package/dist/ui/auto-form/dependencies.js +61 -0
  88. package/dist/ui/auto-form/index.js +227 -0
  89. package/dist/ui/auto-form/interface.js +4 -0
  90. package/dist/ui/auto-form/utils.js +89 -0
  91. package/dist/ui/avatar/index.js +189 -0
  92. package/dist/ui/badge/index.js +37 -0
  93. package/dist/ui/breadcrumb/index.js +126 -0
  94. package/dist/ui/button/index.js +55 -0
  95. package/dist/ui/calendar/index.js +15 -0
  96. package/dist/ui/card/index.js +38 -0
  97. package/dist/ui/carousel/index.js +174 -0
  98. package/dist/ui/carousel/interface.js +1 -0
  99. package/dist/ui/carousel/useCarousel.js +1288 -0
  100. package/dist/ui/chart/index.js +8 -0
  101. package/dist/ui/chart/interface.js +1 -0
  102. package/dist/ui/chart-area/index.js +331 -0
  103. package/dist/ui/chart-bar/index.js +490 -0
  104. package/dist/ui/chart-donut/index.js +509 -0
  105. package/dist/ui/chart-line/index.js +110 -0
  106. package/dist/ui/checkbox/index.js +4 -0
  107. package/dist/ui/collapsible/index.js +60 -0
  108. package/dist/ui/combobox/index.js +877 -0
  109. package/dist/ui/command/index.js +323 -0
  110. package/dist/ui/context-menu/index.js +734 -0
  111. package/dist/ui/dialog/index.js +169 -0
  112. package/dist/ui/drawer/index.js +971 -0
  113. package/dist/ui/dropdown-menu/index.js +723 -0
  114. package/dist/ui/form/index.js +13 -0
  115. package/dist/ui/form/injectionKeys.js +4 -0
  116. package/dist/ui/form/useFormField.js +25 -0
  117. package/dist/ui/hover-card/index.js +331 -0
  118. package/dist/ui/input/index.js +4 -0
  119. package/dist/ui/label/index.js +4 -0
  120. package/dist/ui/menubar/index.js +862 -0
  121. package/dist/ui/navigation-menu/index.js +873 -0
  122. package/dist/ui/number-field/index.js +682 -0
  123. package/dist/ui/pagination/index.js +444 -0
  124. package/dist/ui/pin-input/index.js +308 -0
  125. package/dist/ui/popover/index.js +6 -0
  126. package/dist/ui/progress/index.js +137 -0
  127. package/dist/ui/radio-group/index.js +5 -0
  128. package/dist/ui/range-calendar/index.js +986 -0
  129. package/dist/ui/resizable/index.js +1432 -0
  130. package/dist/ui/scroll-area/index.js +775 -0
  131. package/dist/ui/select/index.js +135 -0
  132. package/dist/ui/separator/index.js +4 -0
  133. package/dist/ui/sheet/index.js +188 -0
  134. package/dist/ui/sidebar/index.js +652 -0
  135. package/dist/ui/sidebar/utils.js +12 -0
  136. package/dist/ui/skeleton/index.js +4 -0
  137. package/dist/ui/slider/index.js +478 -0
  138. package/dist/ui/sonner/index.js +892 -0
  139. package/dist/ui/stepper/index.js +442 -0
  140. package/dist/ui/switch/index.js +4 -0
  141. package/dist/ui/table/index.js +153 -0
  142. package/dist/ui/tabs/index.js +280 -0
  143. package/dist/ui/tags-input/index.js +449 -0
  144. package/dist/ui/textarea/index.js +4 -0
  145. package/dist/ui/toast/index.js +738 -0
  146. package/dist/ui/toast/use-toast.js +85 -0
  147. package/dist/ui/toggle/index.js +6 -0
  148. package/dist/ui/toggle-group/index.js +112 -0
  149. package/dist/ui/tooltip/index.js +29 -0
  150. package/dist/useArrowNavigation-BRMPveaB.js +49 -0
  151. package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
  152. package/dist/useDirection-C3C_TLKm.js +14 -0
  153. package/dist/useFocusGuards-CyjC9cG9.js +26 -0
  154. package/dist/useFormControl-CFVC51Lp.js +11 -0
  155. package/dist/useForwardExpose-DZT6mL_U.js +37 -0
  156. package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
  157. package/dist/useGraceArea-D7-GP1ii.js +137 -0
  158. package/dist/useId-reAg216X.js +13 -0
  159. package/dist/useKbd-BJNupnml.js +41 -0
  160. package/dist/useLocale-BfU0LC8Z.js +14 -0
  161. package/dist/useNonce-C1ZOgOp5.js +14 -0
  162. package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
  163. package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
  164. package/dist/useSize-BnyQ8FZF.js +37 -0
  165. package/dist/useTypeahead-oSidjyFF.js +40 -0
  166. package/dist/utils-DKNaYMZh.js +57 -0
  167. package/dist/utils-Dx9la83v.js +35 -0
  168. package/dist/utils-DxQ_ywGa.js +55 -0
  169. package/dist/utils-SFgRDk1R.js +2748 -0
  170. package/dist/utils-W-UiqiPE.js +1869 -0
  171. package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
  172. package/dist/x-Cl6YllUK.js +14 -0
  173. package/package.json +265 -3
  174. package/dist/OcCodeBlock-chTpuRDc.js +0 -63
  175. package/dist/OcLottieAnimation-EBkAB8-y.js +0 -7741
  176. package/dist/QuillEditor-BHWfmp5D.js +0 -9544
  177. /package/dist/{style.css → dashboard.css} +0 -0
@@ -0,0 +1,2232 @@
1
+ import { defineComponent as Je, computed as N, inject as Ue, toValue as v, resolveDynamicComponent as gn, h as qe, toRef as Ee, unref as T, onMounted as $n, getCurrentInstance as je, provide as fn, isRef as xe, watch as de, onBeforeUnmount as zn, warn as Ln, ref as ue, reactive as He, readonly as ct, onUnmounted as Wn, watchEffect as ft, nextTick as fe, shallowRef as vt } from "vue";
2
+ /**
3
+ * vee-validate v4.15.1
4
+ * (c) 2025 Abdelrahman Awad
5
+ * @license MIT
6
+ */
7
+ function Z(e) {
8
+ return typeof e == "function";
9
+ }
10
+ function Ie(e) {
11
+ return e == null;
12
+ }
13
+ const Ve = (e) => e !== null && !!e && typeof e == "object" && !Array.isArray(e);
14
+ function pn(e) {
15
+ return Number(e) >= 0;
16
+ }
17
+ function mt(e) {
18
+ const n = parseFloat(e);
19
+ return isNaN(n) ? e : n;
20
+ }
21
+ function ht(e) {
22
+ return typeof e == "object" && e !== null;
23
+ }
24
+ function yt(e) {
25
+ return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
26
+ }
27
+ function Cn(e) {
28
+ if (!ht(e) || yt(e) !== "[object Object]")
29
+ return !1;
30
+ if (Object.getPrototypeOf(e) === null)
31
+ return !0;
32
+ let n = e;
33
+ for (; Object.getPrototypeOf(n) !== null; )
34
+ n = Object.getPrototypeOf(n);
35
+ return Object.getPrototypeOf(e) === n;
36
+ }
37
+ function De(e, n) {
38
+ return Object.keys(n).forEach((t) => {
39
+ if (Cn(n[t]) && Cn(e[t])) {
40
+ e[t] || (e[t] = {}), De(e[t], n[t]);
41
+ return;
42
+ }
43
+ e[t] = n[t];
44
+ }), e;
45
+ }
46
+ function Pe(e) {
47
+ const n = e.split(".");
48
+ if (!n.length)
49
+ return "";
50
+ let t = String(n[0]);
51
+ for (let r = 1; r < n.length; r++) {
52
+ if (pn(n[r])) {
53
+ t += `[${n[r]}]`;
54
+ continue;
55
+ }
56
+ t += `.${n[r]}`;
57
+ }
58
+ return t;
59
+ }
60
+ const gt = {};
61
+ function pt(e) {
62
+ return gt[e];
63
+ }
64
+ function In(e, n, t) {
65
+ typeof t.value == "object" && (t.value = k(t.value)), !t.enumerable || t.get || t.set || !t.configurable || !t.writable || n === "__proto__" ? Object.defineProperty(e, n, t) : e[n] = t.value;
66
+ }
67
+ function k(e) {
68
+ if (typeof e != "object") return e;
69
+ var n = 0, t, r, l, a = Object.prototype.toString.call(e);
70
+ if (a === "[object Object]" ? l = Object.create(e.__proto__ || null) : a === "[object Array]" ? l = Array(e.length) : a === "[object Set]" ? (l = /* @__PURE__ */ new Set(), e.forEach(function(o) {
71
+ l.add(k(o));
72
+ })) : a === "[object Map]" ? (l = /* @__PURE__ */ new Map(), e.forEach(function(o, d) {
73
+ l.set(k(d), k(o));
74
+ })) : a === "[object Date]" ? l = /* @__PURE__ */ new Date(+e) : a === "[object RegExp]" ? l = new RegExp(e.source, e.flags) : a === "[object DataView]" ? l = new e.constructor(k(e.buffer)) : a === "[object ArrayBuffer]" ? l = e.slice(0) : a.slice(-6) === "Array]" && (l = new e.constructor(e)), l) {
75
+ for (r = Object.getOwnPropertySymbols(e); n < r.length; n++)
76
+ In(l, r[n], Object.getOwnPropertyDescriptor(e, r[n]));
77
+ for (n = 0, r = Object.getOwnPropertyNames(e); n < r.length; n++)
78
+ Object.hasOwnProperty.call(l, t = r[n]) && l[t] === e[t] || In(l, t, Object.getOwnPropertyDescriptor(e, t));
79
+ }
80
+ return l || e;
81
+ }
82
+ const be = Symbol("vee-validate-form"), bt = Symbol("vee-validate-form-context"), Xe = Symbol("vee-validate-field-instance"), Ge = Symbol("Default empty value"), qn = typeof window < "u";
83
+ function vn(e) {
84
+ return Z(e) && !!e.__locatorRef;
85
+ }
86
+ function ve(e) {
87
+ return !!e && Z(e.parse) && e.__type === "VVTypedSchema";
88
+ }
89
+ function Ke(e) {
90
+ return !!e && Z(e.validate);
91
+ }
92
+ function $e(e) {
93
+ return e === "checkbox" || e === "radio";
94
+ }
95
+ function Vt(e) {
96
+ return Ve(e) || Array.isArray(e);
97
+ }
98
+ function Ot(e) {
99
+ return Array.isArray(e) ? e.length === 0 : Ve(e) && Object.keys(e).length === 0;
100
+ }
101
+ function Qe(e) {
102
+ return /^\[.+\]$/i.test(e);
103
+ }
104
+ function St(e) {
105
+ return xn(e) && e.multiple;
106
+ }
107
+ function xn(e) {
108
+ return e.tagName === "SELECT";
109
+ }
110
+ function _t(e, n) {
111
+ const t = ![!1, null, void 0, 0].includes(n.multiple) && !Number.isNaN(n.multiple);
112
+ return e === "select" && "multiple" in n && t;
113
+ }
114
+ function Et(e, n) {
115
+ return !_t(e, n) && n.type !== "file" && !$e(n.type);
116
+ }
117
+ function Hn(e) {
118
+ return bn(e) && e.target && "submit" in e.target;
119
+ }
120
+ function bn(e) {
121
+ return e ? !!(typeof Event < "u" && Z(Event) && e instanceof Event || e && e.srcElement) : !1;
122
+ }
123
+ function wn(e, n) {
124
+ return n in e && e[n] !== Ge;
125
+ }
126
+ function X(e, n) {
127
+ if (e === n)
128
+ return !0;
129
+ if (e && n && typeof e == "object" && typeof n == "object") {
130
+ if (e.constructor !== n.constructor)
131
+ return !1;
132
+ var t, r, l;
133
+ if (Array.isArray(e)) {
134
+ if (t = e.length, t != n.length)
135
+ return !1;
136
+ for (r = t; r-- !== 0; )
137
+ if (!X(e[r], n[r]))
138
+ return !1;
139
+ return !0;
140
+ }
141
+ if (e instanceof Map && n instanceof Map) {
142
+ if (e.size !== n.size)
143
+ return !1;
144
+ for (r of e.entries())
145
+ if (!n.has(r[0]))
146
+ return !1;
147
+ for (r of e.entries())
148
+ if (!X(r[1], n.get(r[0])))
149
+ return !1;
150
+ return !0;
151
+ }
152
+ if (kn(e) && kn(n))
153
+ return !(e.size !== n.size || e.name !== n.name || e.lastModified !== n.lastModified || e.type !== n.type);
154
+ if (e instanceof Set && n instanceof Set) {
155
+ if (e.size !== n.size)
156
+ return !1;
157
+ for (r of e.entries())
158
+ if (!n.has(r[0]))
159
+ return !1;
160
+ return !0;
161
+ }
162
+ if (ArrayBuffer.isView(e) && ArrayBuffer.isView(n)) {
163
+ if (t = e.length, t != n.length)
164
+ return !1;
165
+ for (r = t; r-- !== 0; )
166
+ if (e[r] !== n[r])
167
+ return !1;
168
+ return !0;
169
+ }
170
+ if (e.constructor === RegExp)
171
+ return e.source === n.source && e.flags === n.flags;
172
+ if (e.valueOf !== Object.prototype.valueOf)
173
+ return e.valueOf() === n.valueOf();
174
+ if (e.toString !== Object.prototype.toString)
175
+ return e.toString() === n.toString();
176
+ if (e = Nn(e), n = Nn(n), l = Object.keys(e), t = l.length, t !== Object.keys(n).length)
177
+ return !1;
178
+ for (r = t; r-- !== 0; )
179
+ if (!Object.prototype.hasOwnProperty.call(n, l[r]))
180
+ return !1;
181
+ for (r = t; r-- !== 0; ) {
182
+ var a = l[r];
183
+ if (!X(e[a], n[a]))
184
+ return !1;
185
+ }
186
+ return !0;
187
+ }
188
+ return e !== e && n !== n;
189
+ }
190
+ function Nn(e) {
191
+ return Object.fromEntries(Object.entries(e).filter(([, n]) => n !== void 0));
192
+ }
193
+ function kn(e) {
194
+ return qn ? e instanceof File : !1;
195
+ }
196
+ function Vn(e) {
197
+ return Qe(e) ? e.replace(/\[|\]/gi, "") : e;
198
+ }
199
+ function z(e, n, t) {
200
+ return e ? Qe(n) ? e[Vn(n)] : (n || "").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((l, a) => Vt(l) && a in l ? l[a] : t, e) : t;
201
+ }
202
+ function J(e, n, t) {
203
+ if (Qe(n)) {
204
+ e[Vn(n)] = t;
205
+ return;
206
+ }
207
+ const r = n.split(/\.|\[(\d+)\]/).filter(Boolean);
208
+ let l = e;
209
+ for (let a = 0; a < r.length; a++) {
210
+ if (a === r.length - 1) {
211
+ l[r[a]] = t;
212
+ return;
213
+ }
214
+ (!(r[a] in l) || Ie(l[r[a]])) && (l[r[a]] = pn(r[a + 1]) ? [] : {}), l = l[r[a]];
215
+ }
216
+ }
217
+ function dn(e, n) {
218
+ if (Array.isArray(e) && pn(n)) {
219
+ e.splice(Number(n), 1);
220
+ return;
221
+ }
222
+ Ve(e) && delete e[n];
223
+ }
224
+ function Pn(e, n) {
225
+ if (Qe(n)) {
226
+ delete e[Vn(n)];
227
+ return;
228
+ }
229
+ const t = n.split(/\.|\[(\d+)\]/).filter(Boolean);
230
+ let r = e;
231
+ for (let a = 0; a < t.length; a++) {
232
+ if (a === t.length - 1) {
233
+ dn(r, t[a]);
234
+ break;
235
+ }
236
+ if (!(t[a] in r) || Ie(r[t[a]]))
237
+ break;
238
+ r = r[t[a]];
239
+ }
240
+ const l = t.map((a, o) => z(e, t.slice(0, o).join(".")));
241
+ for (let a = l.length - 1; a >= 0; a--)
242
+ if (Ot(l[a])) {
243
+ if (a === 0) {
244
+ dn(e, t[0]);
245
+ continue;
246
+ }
247
+ dn(l[a - 1], t[a - 1]);
248
+ }
249
+ }
250
+ function re(e) {
251
+ return Object.keys(e);
252
+ }
253
+ function Fe(e, n = void 0) {
254
+ const t = je();
255
+ return (t == null ? void 0 : t.provides[e]) || Ue(e, n);
256
+ }
257
+ function Me(e) {
258
+ Ln(`[vee-validate]: ${e}`);
259
+ }
260
+ function Mn(e, n, t) {
261
+ if (Array.isArray(e)) {
262
+ const r = [...e], l = r.findIndex((a) => X(a, n));
263
+ return l >= 0 ? r.splice(l, 1) : r.push(n), r;
264
+ }
265
+ return X(e, n) ? t : n;
266
+ }
267
+ function At(e, n) {
268
+ let t, r;
269
+ return function(...l) {
270
+ const a = this;
271
+ return t || (t = !0, setTimeout(() => t = !1, n), r = e.apply(a, l)), r;
272
+ };
273
+ }
274
+ function Tn(e, n = 0) {
275
+ let t = null, r = [];
276
+ return function(...l) {
277
+ return t && clearTimeout(t), t = setTimeout(() => {
278
+ const a = e(...l);
279
+ r.forEach((o) => o(a)), r = [];
280
+ }, n), new Promise((a) => r.push(a));
281
+ };
282
+ }
283
+ function jt(e, n) {
284
+ return Ve(n) && n.number ? mt(e) : e;
285
+ }
286
+ function mn(e, n) {
287
+ let t;
288
+ return async function(...l) {
289
+ const a = e(...l);
290
+ t = a;
291
+ const o = await a;
292
+ return a !== t ? o : (t = void 0, n(o, l));
293
+ };
294
+ }
295
+ function Ft({ get: e, set: n }) {
296
+ const t = ue(k(e()));
297
+ return de(e, (r) => {
298
+ X(r, t.value) || (t.value = k(r));
299
+ }, {
300
+ deep: !0
301
+ }), de(t, (r) => {
302
+ X(r, e()) || n(k(r));
303
+ }, {
304
+ deep: !0
305
+ }), t;
306
+ }
307
+ function hn(e) {
308
+ return Array.isArray(e) ? e : e ? [e] : [];
309
+ }
310
+ function On(e) {
311
+ const n = Fe(be), t = e ? N(() => n == null ? void 0 : n.getPathState(v(e))) : void 0, r = e ? void 0 : Ue(Xe);
312
+ return !r && !(t != null && t.value) && process.env.NODE_ENV !== "production" && Me(`field with name ${v(e)} was not found`), t || r;
313
+ }
314
+ function Le(e, n) {
315
+ const t = {};
316
+ for (const r in e)
317
+ n.includes(r) || (t[r] = e[r]);
318
+ return t;
319
+ }
320
+ function Ct(e) {
321
+ let n = null, t = [];
322
+ return function(...r) {
323
+ const l = fe(() => {
324
+ if (n !== l)
325
+ return;
326
+ const a = e(...r);
327
+ t.forEach((o) => o(a)), t = [], n = null;
328
+ });
329
+ return n = l, new Promise((a) => t.push(a));
330
+ };
331
+ }
332
+ function Ze(e, n, t) {
333
+ return n.slots.default ? typeof e == "string" || !e ? n.slots.default(t()) : {
334
+ default: () => {
335
+ var r, l;
336
+ return (l = (r = n.slots).default) === null || l === void 0 ? void 0 : l.call(r, t());
337
+ }
338
+ } : n.slots.default;
339
+ }
340
+ function cn(e) {
341
+ if (Gn(e))
342
+ return e._value;
343
+ }
344
+ function Gn(e) {
345
+ return "_value" in e;
346
+ }
347
+ function It(e) {
348
+ return e.type === "number" || e.type === "range" ? Number.isNaN(e.valueAsNumber) ? e.value : e.valueAsNumber : e.value;
349
+ }
350
+ function Ye(e) {
351
+ if (!bn(e))
352
+ return e;
353
+ const n = e.target;
354
+ if ($e(n.type) && Gn(n))
355
+ return cn(n);
356
+ if (n.type === "file" && n.files) {
357
+ const t = Array.from(n.files);
358
+ return n.multiple ? t : t[0];
359
+ }
360
+ if (St(n))
361
+ return Array.from(n.options).filter((t) => t.selected && !t.disabled).map(cn);
362
+ if (xn(n)) {
363
+ const t = Array.from(n.options).find((r) => r.selected);
364
+ return t ? cn(t) : n.value;
365
+ }
366
+ return It(n);
367
+ }
368
+ function Kn(e) {
369
+ const n = {};
370
+ return Object.defineProperty(n, "_$$isNormalized", {
371
+ value: !0,
372
+ writable: !1,
373
+ enumerable: !1,
374
+ configurable: !1
375
+ }), e ? Ve(e) && e._$$isNormalized ? e : Ve(e) ? Object.keys(e).reduce((t, r) => {
376
+ const l = wt(e[r]);
377
+ return e[r] !== !1 && (t[r] = Bn(l)), t;
378
+ }, n) : typeof e != "string" ? n : e.split("|").reduce((t, r) => {
379
+ const l = Nt(r);
380
+ return l.name && (t[l.name] = Bn(l.params)), t;
381
+ }, n) : n;
382
+ }
383
+ function wt(e) {
384
+ return e === !0 ? [] : Array.isArray(e) || Ve(e) ? e : [e];
385
+ }
386
+ function Bn(e) {
387
+ const n = (t) => typeof t == "string" && t[0] === "@" ? kt(t.slice(1)) : t;
388
+ return Array.isArray(e) ? e.map(n) : e instanceof RegExp ? [e] : Object.keys(e).reduce((t, r) => (t[r] = n(e[r]), t), {});
389
+ }
390
+ const Nt = (e) => {
391
+ let n = [];
392
+ const t = e.split(":")[0];
393
+ return e.includes(":") && (n = e.split(":").slice(1).join(":").split(",")), { name: t, params: n };
394
+ };
395
+ function kt(e) {
396
+ const n = (t) => {
397
+ var r;
398
+ return (r = z(t, e)) !== null && r !== void 0 ? r : t[e];
399
+ };
400
+ return n.__locatorRef = e, n;
401
+ }
402
+ function Pt(e) {
403
+ return Array.isArray(e) ? e.filter(vn) : re(e).filter((n) => vn(e[n])).map((n) => e[n]);
404
+ }
405
+ const Mt = {
406
+ generateMessage: ({ field: e }) => `${e} is not valid.`,
407
+ bails: !0,
408
+ validateOnBlur: !0,
409
+ validateOnChange: !0,
410
+ validateOnInput: !1,
411
+ validateOnModelUpdate: !0
412
+ };
413
+ let Tt = Object.assign({}, Mt);
414
+ const Ae = () => Tt;
415
+ async function Yn(e, n, t = {}) {
416
+ const r = t == null ? void 0 : t.bails, l = {
417
+ name: (t == null ? void 0 : t.name) || "{field}",
418
+ rules: n,
419
+ label: t == null ? void 0 : t.label,
420
+ bails: r ?? !0,
421
+ formData: (t == null ? void 0 : t.values) || {}
422
+ }, a = await Bt(l, e);
423
+ return Object.assign(Object.assign({}, a), { valid: !a.errors.length });
424
+ }
425
+ async function Bt(e, n) {
426
+ const t = e.rules;
427
+ if (ve(t) || Ke(t))
428
+ return Dt(n, Object.assign(Object.assign({}, e), { rules: t }));
429
+ if (Z(t) || Array.isArray(t)) {
430
+ const d = {
431
+ field: e.label || e.name,
432
+ name: e.name,
433
+ label: e.label,
434
+ form: e.formData,
435
+ value: n
436
+ }, f = Array.isArray(t) ? t : [t], c = f.length, h = [];
437
+ for (let V = 0; V < c; V++) {
438
+ const P = f[V], _ = await P(n, d);
439
+ if (!(typeof _ != "string" && !Array.isArray(_) && _)) {
440
+ if (Array.isArray(_))
441
+ h.push(..._);
442
+ else {
443
+ const G = typeof _ == "string" ? _ : Xn(d);
444
+ h.push(G);
445
+ }
446
+ if (e.bails)
447
+ return {
448
+ errors: h
449
+ };
450
+ }
451
+ }
452
+ return {
453
+ errors: h
454
+ };
455
+ }
456
+ const r = Object.assign(Object.assign({}, e), { rules: Kn(t) }), l = [], a = Object.keys(r.rules), o = a.length;
457
+ for (let d = 0; d < o; d++) {
458
+ const f = a[d], c = await Ut(r, n, {
459
+ name: f,
460
+ params: r.rules[f]
461
+ });
462
+ if (c.error && (l.push(c.error), e.bails))
463
+ return {
464
+ errors: l
465
+ };
466
+ }
467
+ return {
468
+ errors: l
469
+ };
470
+ }
471
+ function Rt(e) {
472
+ return !!e && e.name === "ValidationError";
473
+ }
474
+ function Jn(e) {
475
+ return {
476
+ __type: "VVTypedSchema",
477
+ async parse(t, r) {
478
+ var l;
479
+ try {
480
+ return {
481
+ output: await e.validate(t, { abortEarly: !1, context: (r == null ? void 0 : r.formData) || {} }),
482
+ errors: []
483
+ };
484
+ } catch (a) {
485
+ if (!Rt(a))
486
+ throw a;
487
+ if (!(!((l = a.inner) === null || l === void 0) && l.length) && a.errors.length)
488
+ return { errors: [{ path: a.path, errors: a.errors }] };
489
+ const o = a.inner.reduce((d, f) => {
490
+ const c = f.path || "";
491
+ return d[c] || (d[c] = { errors: [], path: c }), d[c].errors.push(...f.errors), d;
492
+ }, {});
493
+ return { errors: Object.values(o) };
494
+ }
495
+ }
496
+ };
497
+ }
498
+ async function Dt(e, n) {
499
+ const r = await (ve(n.rules) ? n.rules : Jn(n.rules)).parse(e, { formData: n.formData }), l = [];
500
+ for (const a of r.errors)
501
+ a.errors.length && l.push(...a.errors);
502
+ return {
503
+ value: r.value,
504
+ errors: l
505
+ };
506
+ }
507
+ async function Ut(e, n, t) {
508
+ const r = pt(t.name);
509
+ if (!r)
510
+ throw new Error(`No such validator '${t.name}' exists.`);
511
+ const l = $t(t.params, e.formData), a = {
512
+ field: e.label || e.name,
513
+ name: e.name,
514
+ label: e.label,
515
+ value: n,
516
+ form: e.formData,
517
+ rule: Object.assign(Object.assign({}, t), { params: l })
518
+ }, o = await r(n, l, a);
519
+ return typeof o == "string" ? {
520
+ error: o
521
+ } : {
522
+ error: o ? void 0 : Xn(a)
523
+ };
524
+ }
525
+ function Xn(e) {
526
+ const n = Ae().generateMessage;
527
+ return n ? n(e) : "Field is invalid";
528
+ }
529
+ function $t(e, n) {
530
+ const t = (r) => vn(r) ? r(n) : r;
531
+ return Array.isArray(e) ? e.map(t) : Object.keys(e).reduce((r, l) => (r[l] = t(e[l]), r), {});
532
+ }
533
+ async function zt(e, n) {
534
+ const r = await (ve(e) ? e : Jn(e)).parse(k(n), { formData: k(n) }), l = {}, a = {};
535
+ for (const o of r.errors) {
536
+ const d = o.errors, f = (o.path || "").replace(/\["(\d+)"\]/g, (c, h) => `[${h}]`);
537
+ l[f] = { valid: !d.length, errors: d }, d.length && (a[f] = d[0]);
538
+ }
539
+ return {
540
+ valid: !r.errors.length,
541
+ results: l,
542
+ errors: a,
543
+ values: r.value,
544
+ source: "schema"
545
+ };
546
+ }
547
+ async function Lt(e, n, t) {
548
+ const l = re(e).map(async (c) => {
549
+ var h, V, P;
550
+ const _ = (h = t == null ? void 0 : t.names) === null || h === void 0 ? void 0 : h[c], B = await Yn(z(n, c), e[c], {
551
+ name: (_ == null ? void 0 : _.name) || c,
552
+ label: _ == null ? void 0 : _.label,
553
+ values: n,
554
+ bails: (P = (V = t == null ? void 0 : t.bailsMap) === null || V === void 0 ? void 0 : V[c]) !== null && P !== void 0 ? P : !0
555
+ });
556
+ return Object.assign(Object.assign({}, B), { path: c });
557
+ });
558
+ let a = !0;
559
+ const o = await Promise.all(l), d = {}, f = {};
560
+ for (const c of o)
561
+ d[c.path] = {
562
+ valid: c.valid,
563
+ errors: c.errors
564
+ }, c.valid || (a = !1, f[c.path] = c.errors[0]);
565
+ return {
566
+ valid: a,
567
+ results: d,
568
+ errors: f,
569
+ source: "schema"
570
+ };
571
+ }
572
+ let Rn = 0;
573
+ function Wt(e, n) {
574
+ const { value: t, initialValue: r, setInitialValue: l } = qt(e, n.modelValue, n.form);
575
+ if (!n.form) {
576
+ let P = function(_) {
577
+ var B;
578
+ "value" in _ && (t.value = _.value), "errors" in _ && c(_.errors), "touched" in _ && (V.touched = (B = _.touched) !== null && B !== void 0 ? B : V.touched), "initialValue" in _ && l(_.initialValue);
579
+ };
580
+ const { errors: f, setErrors: c } = Gt(), h = Rn >= Number.MAX_SAFE_INTEGER ? 0 : ++Rn, V = Ht(t, r, f, n.schema);
581
+ return {
582
+ id: h,
583
+ path: e,
584
+ value: t,
585
+ initialValue: r,
586
+ meta: V,
587
+ flags: { pendingUnmount: { [h]: !1 }, pendingReset: !1 },
588
+ errors: f,
589
+ setState: P
590
+ };
591
+ }
592
+ const a = n.form.createPathState(e, {
593
+ bails: n.bails,
594
+ label: n.label,
595
+ type: n.type,
596
+ validate: n.validate,
597
+ schema: n.schema
598
+ }), o = N(() => a.errors);
599
+ function d(f) {
600
+ var c, h, V;
601
+ "value" in f && (t.value = f.value), "errors" in f && ((c = n.form) === null || c === void 0 || c.setFieldError(T(e), f.errors)), "touched" in f && ((h = n.form) === null || h === void 0 || h.setFieldTouched(T(e), (V = f.touched) !== null && V !== void 0 ? V : !1)), "initialValue" in f && l(f.initialValue);
602
+ }
603
+ return {
604
+ id: Array.isArray(a.id) ? a.id[a.id.length - 1] : a.id,
605
+ path: e,
606
+ value: t,
607
+ errors: o,
608
+ meta: a,
609
+ initialValue: r,
610
+ flags: a.__flags,
611
+ setState: d
612
+ };
613
+ }
614
+ function qt(e, n, t) {
615
+ const r = ue(T(n));
616
+ function l() {
617
+ return t ? z(t.initialValues.value, T(e), T(r)) : T(r);
618
+ }
619
+ function a(c) {
620
+ if (!t) {
621
+ r.value = c;
622
+ return;
623
+ }
624
+ t.setFieldInitialValue(T(e), c, !0);
625
+ }
626
+ const o = N(l);
627
+ if (!t)
628
+ return {
629
+ value: ue(l()),
630
+ initialValue: o,
631
+ setInitialValue: a
632
+ };
633
+ const d = xt(n, t, o, e);
634
+ return t.stageInitialValue(T(e), d, !0), {
635
+ value: N({
636
+ get() {
637
+ return z(t.values, T(e));
638
+ },
639
+ set(c) {
640
+ t.setFieldValue(T(e), c, !1);
641
+ }
642
+ }),
643
+ initialValue: o,
644
+ setInitialValue: a
645
+ };
646
+ }
647
+ function xt(e, n, t, r) {
648
+ return xe(e) ? T(e) : e !== void 0 ? e : z(n.values, T(r), T(t));
649
+ }
650
+ function Ht(e, n, t, r) {
651
+ const l = N(() => {
652
+ var o, d, f;
653
+ return (f = (d = (o = v(r)) === null || o === void 0 ? void 0 : o.describe) === null || d === void 0 ? void 0 : d.call(o).required) !== null && f !== void 0 ? f : !1;
654
+ }), a = He({
655
+ touched: !1,
656
+ pending: !1,
657
+ valid: !0,
658
+ required: l,
659
+ validated: !!T(t).length,
660
+ initialValue: N(() => T(n)),
661
+ dirty: N(() => !X(T(e), T(n)))
662
+ });
663
+ return de(t, (o) => {
664
+ a.valid = !o.length;
665
+ }, {
666
+ immediate: !0,
667
+ flush: "sync"
668
+ }), a;
669
+ }
670
+ function Gt() {
671
+ const e = ue([]);
672
+ return {
673
+ errors: e,
674
+ setErrors: (n) => {
675
+ e.value = hn(n);
676
+ }
677
+ };
678
+ }
679
+ const Te = {}, Be = {}, Re = "vee-validate-inspector", ie = {
680
+ error: 12405579,
681
+ success: 448379,
682
+ unknown: 5522283,
683
+ white: 16777215,
684
+ black: 0,
685
+ blue: 218007,
686
+ purple: 12157168,
687
+ orange: 16099682,
688
+ gray: 12304330
689
+ };
690
+ let H = null, pe;
691
+ async function Qn(e) {
692
+ if (process.env.NODE_ENV !== "production") {
693
+ if (!qn)
694
+ return;
695
+ (await import("./index-BIlpXuWX.js")).setupDevtoolsPlugin({
696
+ id: "vee-validate-devtools-plugin",
697
+ label: "VeeValidate Plugin",
698
+ packageName: "vee-validate",
699
+ homepage: "https://vee-validate.logaretm.com/v4",
700
+ app: e,
701
+ logo: "https://vee-validate.logaretm.com/v4/logo.png"
702
+ }, (t) => {
703
+ pe = t, t.addInspector({
704
+ id: Re,
705
+ icon: "rule",
706
+ label: "vee-validate",
707
+ noSelectionText: "Select a vee-validate node to inspect",
708
+ actions: [
709
+ {
710
+ icon: "done_outline",
711
+ tooltip: "Validate selected item",
712
+ action: async () => {
713
+ if (!H) {
714
+ console.error("There is not a valid selected vee-validate node or component");
715
+ return;
716
+ }
717
+ if (H.type === "field") {
718
+ await H.field.validate();
719
+ return;
720
+ }
721
+ if (H.type === "form") {
722
+ await H.form.validate();
723
+ return;
724
+ }
725
+ H.type === "pathState" && await H.form.validateField(H.state.path);
726
+ }
727
+ },
728
+ {
729
+ icon: "delete_sweep",
730
+ tooltip: "Clear validation state of the selected item",
731
+ action: () => {
732
+ if (!H) {
733
+ console.error("There is not a valid selected vee-validate node or component");
734
+ return;
735
+ }
736
+ if (H.type === "field") {
737
+ H.field.resetField();
738
+ return;
739
+ }
740
+ H.type === "form" && H.form.resetForm(), H.type === "pathState" && H.form.resetField(H.state.path);
741
+ }
742
+ }
743
+ ]
744
+ }), t.on.getInspectorTree((r) => {
745
+ if (r.inspectorId !== Re)
746
+ return;
747
+ const l = Object.values(Te), a = Object.values(Be);
748
+ r.rootNodes = [
749
+ ...l.map(Jt),
750
+ ...a.map((o) => Qt(o))
751
+ ];
752
+ }), t.on.getInspectorState((r) => {
753
+ if (r.inspectorId !== Re)
754
+ return;
755
+ const { form: l, field: a, state: o, type: d } = Zt(r.nodeId);
756
+ if (t.unhighlightElement(), l && d === "form") {
757
+ r.state = er(l), H = { type: "form", form: l }, t.highlightElement(l._vm);
758
+ return;
759
+ }
760
+ if (o && d === "pathState" && l) {
761
+ r.state = Dn(o), H = { type: "pathState", state: o, form: l };
762
+ return;
763
+ }
764
+ if (a && d === "field") {
765
+ r.state = Dn({
766
+ errors: a.errors.value,
767
+ dirty: a.meta.dirty,
768
+ valid: a.meta.valid,
769
+ touched: a.meta.touched,
770
+ value: a.value.value,
771
+ initialValue: a.meta.initialValue
772
+ }), H = { field: a, type: "field" }, t.highlightElement(a._vm);
773
+ return;
774
+ }
775
+ H = null, t.unhighlightElement();
776
+ });
777
+ });
778
+ }
779
+ }
780
+ const we = At(() => {
781
+ setTimeout(async () => {
782
+ await fe(), pe == null || pe.sendInspectorState(Re), pe == null || pe.sendInspectorTree(Re);
783
+ }, 100);
784
+ }, 100);
785
+ function Kt(e) {
786
+ const n = je();
787
+ if (!pe) {
788
+ const t = n == null ? void 0 : n.appContext.app;
789
+ if (!t)
790
+ return;
791
+ Qn(t);
792
+ }
793
+ Te[e.formId] = Object.assign({}, e), Te[e.formId]._vm = n, Wn(() => {
794
+ delete Te[e.formId], we();
795
+ }), we();
796
+ }
797
+ function Yt(e) {
798
+ const n = je();
799
+ if (!pe) {
800
+ const t = n == null ? void 0 : n.appContext.app;
801
+ if (!t)
802
+ return;
803
+ Qn(t);
804
+ }
805
+ Be[e.id] = Object.assign({}, e), Be[e.id]._vm = n, Wn(() => {
806
+ delete Be[e.id], we();
807
+ }), we();
808
+ }
809
+ function Jt(e) {
810
+ const { textColor: n, bgColor: t } = et(e.meta.value.valid), r = {};
811
+ Object.values(e.getAllPathStates()).forEach((o) => {
812
+ J(r, v(o.path), Xt(o, e));
813
+ });
814
+ function l(o, d = []) {
815
+ const f = [...d].pop();
816
+ return "id" in o ? Object.assign(Object.assign({}, o), { label: f || o.label }) : Ve(o) ? {
817
+ id: `${d.join(".")}`,
818
+ label: f || "",
819
+ children: Object.keys(o).map((c) => l(o[c], [...d, c]))
820
+ } : Array.isArray(o) ? {
821
+ id: `${d.join(".")}`,
822
+ label: `${f}[]`,
823
+ children: o.map((c, h) => l(c, [...d, String(h)]))
824
+ } : { id: "", label: "", children: [] };
825
+ }
826
+ const { children: a } = l(r);
827
+ return {
828
+ id: Sn(e),
829
+ label: e.name,
830
+ children: a,
831
+ tags: [
832
+ {
833
+ label: "Form",
834
+ textColor: n,
835
+ backgroundColor: t
836
+ },
837
+ {
838
+ label: `${e.getAllPathStates().length} fields`,
839
+ textColor: ie.white,
840
+ backgroundColor: ie.unknown
841
+ }
842
+ ]
843
+ };
844
+ }
845
+ function Xt(e, n) {
846
+ return {
847
+ id: Sn(n, e),
848
+ label: v(e.path),
849
+ tags: Zn(e.multiple, e.fieldsCount, e.type, e.valid, n)
850
+ };
851
+ }
852
+ function Qt(e, n) {
853
+ return {
854
+ id: Sn(n, e),
855
+ label: T(e.name),
856
+ tags: Zn(!1, 1, e.type, e.meta.valid, n)
857
+ };
858
+ }
859
+ function Zn(e, n, t, r, l) {
860
+ const { textColor: a, bgColor: o } = et(r);
861
+ return [
862
+ e ? void 0 : {
863
+ label: "Field",
864
+ textColor: a,
865
+ backgroundColor: o
866
+ },
867
+ l ? void 0 : {
868
+ label: "Standalone",
869
+ textColor: ie.black,
870
+ backgroundColor: ie.gray
871
+ },
872
+ t === "checkbox" ? {
873
+ label: "Checkbox",
874
+ textColor: ie.white,
875
+ backgroundColor: ie.blue
876
+ } : void 0,
877
+ t === "radio" ? {
878
+ label: "Radio",
879
+ textColor: ie.white,
880
+ backgroundColor: ie.purple
881
+ } : void 0,
882
+ e ? {
883
+ label: "Multiple",
884
+ textColor: ie.black,
885
+ backgroundColor: ie.orange
886
+ } : void 0
887
+ ].filter(Boolean);
888
+ }
889
+ function Sn(e, n) {
890
+ const t = n ? "path" in n ? "pathState" : "field" : "form", r = n ? "path" in n ? n == null ? void 0 : n.path : v(n == null ? void 0 : n.name) : "", l = { f: e == null ? void 0 : e.formId, ff: (n == null ? void 0 : n.id) || r, type: t };
891
+ return btoa(encodeURIComponent(JSON.stringify(l)));
892
+ }
893
+ function Zt(e) {
894
+ try {
895
+ const n = JSON.parse(decodeURIComponent(atob(e))), t = Te[n.f];
896
+ if (!t && n.ff) {
897
+ const l = Be[n.ff];
898
+ return l ? {
899
+ type: n.type,
900
+ field: l
901
+ } : {};
902
+ }
903
+ if (!t)
904
+ return {};
905
+ const r = t.getPathState(n.ff);
906
+ return {
907
+ type: n.type,
908
+ form: t,
909
+ state: r
910
+ };
911
+ } catch {
912
+ }
913
+ return {};
914
+ }
915
+ function Dn(e) {
916
+ return {
917
+ "Field state": [
918
+ { key: "errors", value: e.errors },
919
+ {
920
+ key: "initialValue",
921
+ value: e.initialValue
922
+ },
923
+ {
924
+ key: "currentValue",
925
+ value: e.value
926
+ },
927
+ {
928
+ key: "touched",
929
+ value: e.touched
930
+ },
931
+ {
932
+ key: "dirty",
933
+ value: e.dirty
934
+ },
935
+ {
936
+ key: "valid",
937
+ value: e.valid
938
+ }
939
+ ]
940
+ };
941
+ }
942
+ function er(e) {
943
+ const { errorBag: n, meta: t, values: r, isSubmitting: l, isValidating: a, submitCount: o } = e;
944
+ return {
945
+ "Form state": [
946
+ {
947
+ key: "submitCount",
948
+ value: o.value
949
+ },
950
+ {
951
+ key: "isSubmitting",
952
+ value: l.value
953
+ },
954
+ {
955
+ key: "isValidating",
956
+ value: a.value
957
+ },
958
+ {
959
+ key: "touched",
960
+ value: t.value.touched
961
+ },
962
+ {
963
+ key: "dirty",
964
+ value: t.value.dirty
965
+ },
966
+ {
967
+ key: "valid",
968
+ value: t.value.valid
969
+ },
970
+ {
971
+ key: "initialValues",
972
+ value: t.value.initialValues
973
+ },
974
+ {
975
+ key: "currentValues",
976
+ value: r
977
+ },
978
+ {
979
+ key: "errors",
980
+ value: re(n.value).reduce((d, f) => {
981
+ var c;
982
+ const h = (c = n.value[f]) === null || c === void 0 ? void 0 : c[0];
983
+ return h && (d[f] = h), d;
984
+ }, {})
985
+ }
986
+ ]
987
+ };
988
+ }
989
+ function et(e) {
990
+ return {
991
+ bgColor: e ? ie.success : ie.error,
992
+ textColor: e ? ie.black : ie.white
993
+ };
994
+ }
995
+ function nr(e, n, t) {
996
+ return $e(t == null ? void 0 : t.type) ? rr(e, n, t) : nt(e, n, t);
997
+ }
998
+ function nt(e, n, t) {
999
+ const { initialValue: r, validateOnMount: l, bails: a, type: o, checkedValue: d, label: f, validateOnValueUpdate: c, uncheckedValue: h, controlled: V, keepValueOnUnmount: P, syncVModel: _, form: B } = tr(t), G = V ? Fe(be) : void 0, A = B || G, L = N(() => Pe(v(e))), W = N(() => {
1000
+ if (v(A == null ? void 0 : A.schema))
1001
+ return;
1002
+ const I = T(n);
1003
+ return Ke(I) || ve(I) || Z(I) || Array.isArray(I) ? I : Kn(I);
1004
+ }), ce = !Z(W.value) && ve(v(n)), { id: Y, value: y, initialValue: p, meta: g, setState: C, errors: E, flags: j } = Wt(L, {
1005
+ modelValue: r,
1006
+ form: A,
1007
+ bails: a,
1008
+ label: f,
1009
+ type: o,
1010
+ validate: W.value ? q : void 0,
1011
+ schema: ce ? n : void 0
1012
+ }), M = N(() => E.value[0]);
1013
+ _ && ir({
1014
+ value: y,
1015
+ prop: _,
1016
+ handleChange: w,
1017
+ shouldValidate: () => c && !j.pendingReset
1018
+ });
1019
+ const K = (b, I = !1) => {
1020
+ g.touched = !0, I && le();
1021
+ };
1022
+ async function he(b) {
1023
+ var I, D;
1024
+ if (A != null && A.validateSchema) {
1025
+ const { results: R } = await A.validateSchema(b);
1026
+ return (I = R[v(L)]) !== null && I !== void 0 ? I : { valid: !0, errors: [] };
1027
+ }
1028
+ return W.value ? Yn(y.value, W.value, {
1029
+ name: v(L),
1030
+ label: v(f),
1031
+ values: (D = A == null ? void 0 : A.values) !== null && D !== void 0 ? D : {},
1032
+ bails: a
1033
+ }) : { valid: !0, errors: [] };
1034
+ }
1035
+ const le = mn(async () => (g.pending = !0, g.validated = !0, he("validated-only")), (b) => (j.pendingUnmount[Q.id] || (C({ errors: b.errors }), g.pending = !1, g.valid = b.valid), b)), ae = mn(async () => he("silent"), (b) => (g.valid = b.valid, b));
1036
+ function q(b) {
1037
+ return (b == null ? void 0 : b.mode) === "silent" ? ae() : le();
1038
+ }
1039
+ function w(b, I = !0) {
1040
+ const D = Ye(b);
1041
+ Ne(D, I);
1042
+ }
1043
+ $n(() => {
1044
+ if (l)
1045
+ return le();
1046
+ (!A || !A.validateSchema) && ae();
1047
+ });
1048
+ function Oe(b) {
1049
+ g.touched = b;
1050
+ }
1051
+ function ye(b) {
1052
+ var I;
1053
+ const D = b && "value" in b ? b.value : p.value;
1054
+ C({
1055
+ value: k(D),
1056
+ initialValue: k(D),
1057
+ touched: (I = b == null ? void 0 : b.touched) !== null && I !== void 0 ? I : !1,
1058
+ errors: (b == null ? void 0 : b.errors) || []
1059
+ }), g.pending = !1, g.validated = !1, ae();
1060
+ }
1061
+ const Se = je();
1062
+ function Ne(b, I = !0) {
1063
+ y.value = Se && _ ? jt(b, Se.props.modelModifiers) : b, (I ? le : ae)();
1064
+ }
1065
+ function ze(b) {
1066
+ C({ errors: Array.isArray(b) ? b : [b] });
1067
+ }
1068
+ const _n = N({
1069
+ get() {
1070
+ return y.value;
1071
+ },
1072
+ set(b) {
1073
+ Ne(b, c);
1074
+ }
1075
+ }), Q = {
1076
+ id: Y,
1077
+ name: L,
1078
+ label: f,
1079
+ value: _n,
1080
+ meta: g,
1081
+ errors: E,
1082
+ errorMessage: M,
1083
+ type: o,
1084
+ checkedValue: d,
1085
+ uncheckedValue: h,
1086
+ bails: a,
1087
+ keepValueOnUnmount: P,
1088
+ resetField: ye,
1089
+ handleReset: () => ye(),
1090
+ validate: q,
1091
+ handleChange: w,
1092
+ handleBlur: K,
1093
+ setState: C,
1094
+ setTouched: Oe,
1095
+ setErrors: ze,
1096
+ setValue: Ne
1097
+ };
1098
+ if (fn(Xe, Q), xe(n) && typeof T(n) != "function" && de(n, (b, I) => {
1099
+ X(b, I) || (g.validated ? le() : ae());
1100
+ }, {
1101
+ deep: !0
1102
+ }), process.env.NODE_ENV !== "production" && (Q._vm = je(), de(() => Object.assign(Object.assign({ errors: E.value }, g), { value: y.value }), we, {
1103
+ deep: !0
1104
+ }), A || Yt(Q)), !A)
1105
+ return Q;
1106
+ const en = N(() => {
1107
+ const b = W.value;
1108
+ return !b || Z(b) || Ke(b) || ve(b) || Array.isArray(b) ? {} : Object.keys(b).reduce((I, D) => {
1109
+ const R = Pt(b[D]).map((ge) => ge.__locatorRef).reduce((ge, me) => {
1110
+ const oe = z(A.values, me) || A.values[me];
1111
+ return oe !== void 0 && (ge[me] = oe), ge;
1112
+ }, {});
1113
+ return Object.assign(I, R), I;
1114
+ }, {});
1115
+ });
1116
+ return de(en, (b, I) => {
1117
+ if (!Object.keys(b).length)
1118
+ return;
1119
+ !X(b, I) && (g.validated ? le() : ae());
1120
+ }), zn(() => {
1121
+ var b;
1122
+ const I = (b = v(Q.keepValueOnUnmount)) !== null && b !== void 0 ? b : v(A.keepValuesOnUnmount), D = v(L);
1123
+ if (I || !A || j.pendingUnmount[Q.id]) {
1124
+ A == null || A.removePathState(D, Y);
1125
+ return;
1126
+ }
1127
+ j.pendingUnmount[Q.id] = !0;
1128
+ const R = A.getPathState(D);
1129
+ if (Array.isArray(R == null ? void 0 : R.id) && (R != null && R.multiple) ? R != null && R.id.includes(Q.id) : (R == null ? void 0 : R.id) === Q.id) {
1130
+ if (R != null && R.multiple && Array.isArray(R.value)) {
1131
+ const me = R.value.findIndex((oe) => X(oe, v(Q.checkedValue)));
1132
+ if (me > -1) {
1133
+ const oe = [...R.value];
1134
+ oe.splice(me, 1), A.setFieldValue(D, oe);
1135
+ }
1136
+ Array.isArray(R.id) && R.id.splice(R.id.indexOf(Q.id), 1);
1137
+ } else
1138
+ A.unsetPathValue(v(L));
1139
+ A.removePathState(D, Y);
1140
+ }
1141
+ }), Q;
1142
+ }
1143
+ function tr(e) {
1144
+ const n = () => ({
1145
+ initialValue: void 0,
1146
+ validateOnMount: !1,
1147
+ bails: !0,
1148
+ label: void 0,
1149
+ validateOnValueUpdate: !0,
1150
+ keepValueOnUnmount: void 0,
1151
+ syncVModel: !1,
1152
+ controlled: !0
1153
+ }), t = !!(e != null && e.syncVModel), r = typeof (e == null ? void 0 : e.syncVModel) == "string" ? e.syncVModel : (e == null ? void 0 : e.modelPropName) || "modelValue", l = t && !("initialValue" in (e || {})) ? yn(je(), r) : e == null ? void 0 : e.initialValue;
1154
+ if (!e)
1155
+ return Object.assign(Object.assign({}, n()), { initialValue: l });
1156
+ const a = "valueProp" in e ? e.valueProp : e.checkedValue, o = "standalone" in e ? !e.standalone : e.controlled, d = (e == null ? void 0 : e.modelPropName) || (e == null ? void 0 : e.syncVModel) || !1;
1157
+ return Object.assign(Object.assign(Object.assign({}, n()), e || {}), {
1158
+ initialValue: l,
1159
+ controlled: o ?? !0,
1160
+ checkedValue: a,
1161
+ syncVModel: d
1162
+ });
1163
+ }
1164
+ function rr(e, n, t) {
1165
+ const r = t != null && t.standalone ? void 0 : Fe(be), l = t == null ? void 0 : t.checkedValue, a = t == null ? void 0 : t.uncheckedValue;
1166
+ function o(d) {
1167
+ const f = d.handleChange, c = N(() => {
1168
+ const V = v(d.value), P = v(l);
1169
+ return Array.isArray(V) ? V.findIndex((_) => X(_, P)) >= 0 : X(P, V);
1170
+ });
1171
+ function h(V, P = !0) {
1172
+ var _, B;
1173
+ if (c.value === ((_ = V == null ? void 0 : V.target) === null || _ === void 0 ? void 0 : _.checked)) {
1174
+ P && d.validate();
1175
+ return;
1176
+ }
1177
+ const G = v(e), A = r == null ? void 0 : r.getPathState(G), L = Ye(V);
1178
+ let W = (B = v(l)) !== null && B !== void 0 ? B : L;
1179
+ r && (A != null && A.multiple) && A.type === "checkbox" ? W = Mn(z(r.values, G) || [], W, void 0) : (t == null ? void 0 : t.type) === "checkbox" && (W = Mn(v(d.value), W, v(a))), f(W, P);
1180
+ }
1181
+ return Object.assign(Object.assign({}, d), {
1182
+ checked: c,
1183
+ checkedValue: l,
1184
+ uncheckedValue: a,
1185
+ handleChange: h
1186
+ });
1187
+ }
1188
+ return o(nt(e, n, t));
1189
+ }
1190
+ function ir({ prop: e, value: n, handleChange: t, shouldValidate: r }) {
1191
+ const l = je();
1192
+ if (!l || !e) {
1193
+ process.env.NODE_ENV !== "production" && console.warn("Failed to setup model events because `useField` was not called in setup.");
1194
+ return;
1195
+ }
1196
+ const a = typeof e == "string" ? e : "modelValue", o = `update:${a}`;
1197
+ a in l.props && (de(n, (d) => {
1198
+ X(d, yn(l, a)) || l.emit(o, d);
1199
+ }), de(() => yn(l, a), (d) => {
1200
+ if (d === Ge && n.value === void 0)
1201
+ return;
1202
+ const f = d === Ge ? void 0 : d;
1203
+ X(f, n.value) || t(f, r());
1204
+ }));
1205
+ }
1206
+ function yn(e, n) {
1207
+ if (e)
1208
+ return e.props[n];
1209
+ }
1210
+ const lr = /* @__PURE__ */ Je({
1211
+ name: "Field",
1212
+ inheritAttrs: !1,
1213
+ props: {
1214
+ as: {
1215
+ type: [String, Object],
1216
+ default: void 0
1217
+ },
1218
+ name: {
1219
+ type: String,
1220
+ required: !0
1221
+ },
1222
+ rules: {
1223
+ type: [Object, String, Function],
1224
+ default: void 0
1225
+ },
1226
+ validateOnMount: {
1227
+ type: Boolean,
1228
+ default: !1
1229
+ },
1230
+ validateOnBlur: {
1231
+ type: Boolean,
1232
+ default: void 0
1233
+ },
1234
+ validateOnChange: {
1235
+ type: Boolean,
1236
+ default: void 0
1237
+ },
1238
+ validateOnInput: {
1239
+ type: Boolean,
1240
+ default: void 0
1241
+ },
1242
+ validateOnModelUpdate: {
1243
+ type: Boolean,
1244
+ default: void 0
1245
+ },
1246
+ bails: {
1247
+ type: Boolean,
1248
+ default: () => Ae().bails
1249
+ },
1250
+ label: {
1251
+ type: String,
1252
+ default: void 0
1253
+ },
1254
+ uncheckedValue: {
1255
+ type: null,
1256
+ default: void 0
1257
+ },
1258
+ modelValue: {
1259
+ type: null,
1260
+ default: Ge
1261
+ },
1262
+ modelModifiers: {
1263
+ type: null,
1264
+ default: () => ({})
1265
+ },
1266
+ "onUpdate:modelValue": {
1267
+ type: null,
1268
+ default: void 0
1269
+ },
1270
+ standalone: {
1271
+ type: Boolean,
1272
+ default: !1
1273
+ },
1274
+ keepValue: {
1275
+ type: Boolean,
1276
+ default: void 0
1277
+ }
1278
+ },
1279
+ setup(e, n) {
1280
+ const t = Ee(e, "rules"), r = Ee(e, "name"), l = Ee(e, "label"), a = Ee(e, "uncheckedValue"), o = Ee(e, "keepValue"), { errors: d, value: f, errorMessage: c, validate: h, handleChange: V, handleBlur: P, setTouched: _, resetField: B, handleReset: G, meta: A, checked: L, setErrors: W, setValue: ce } = nr(r, t, {
1281
+ validateOnMount: e.validateOnMount,
1282
+ bails: e.bails,
1283
+ standalone: e.standalone,
1284
+ type: n.attrs.type,
1285
+ initialValue: ur(e, n),
1286
+ // Only for checkboxes and radio buttons
1287
+ checkedValue: n.attrs.value,
1288
+ uncheckedValue: a,
1289
+ label: l,
1290
+ validateOnValueUpdate: e.validateOnModelUpdate,
1291
+ keepValueOnUnmount: o,
1292
+ syncVModel: !0
1293
+ }), Y = function(j, M = !0) {
1294
+ V(j, M);
1295
+ }, y = N(() => {
1296
+ const { validateOnInput: E, validateOnChange: j, validateOnBlur: M, validateOnModelUpdate: K } = ar(e);
1297
+ function he(w) {
1298
+ P(w, M), Z(n.attrs.onBlur) && n.attrs.onBlur(w);
1299
+ }
1300
+ function le(w) {
1301
+ Y(w, E), Z(n.attrs.onInput) && n.attrs.onInput(w);
1302
+ }
1303
+ function ae(w) {
1304
+ Y(w, j), Z(n.attrs.onChange) && n.attrs.onChange(w);
1305
+ }
1306
+ const q = {
1307
+ name: e.name,
1308
+ onBlur: he,
1309
+ onInput: le,
1310
+ onChange: ae
1311
+ };
1312
+ return q["onUpdate:modelValue"] = (w) => Y(w, K), q;
1313
+ }), p = N(() => {
1314
+ const E = Object.assign({}, y.value);
1315
+ $e(n.attrs.type) && L && (E.checked = L.value);
1316
+ const j = Un(e, n);
1317
+ return Et(j, n.attrs) && (E.value = f.value), E;
1318
+ }), g = N(() => Object.assign(Object.assign({}, y.value), { modelValue: f.value }));
1319
+ function C() {
1320
+ return {
1321
+ field: p.value,
1322
+ componentField: g.value,
1323
+ value: f.value,
1324
+ meta: A,
1325
+ errors: d.value,
1326
+ errorMessage: c.value,
1327
+ validate: h,
1328
+ resetField: B,
1329
+ handleChange: Y,
1330
+ handleInput: (E) => Y(E, !1),
1331
+ handleReset: G,
1332
+ handleBlur: y.value.onBlur,
1333
+ setTouched: _,
1334
+ setErrors: W,
1335
+ setValue: ce
1336
+ };
1337
+ }
1338
+ return n.expose({
1339
+ value: f,
1340
+ meta: A,
1341
+ errors: d,
1342
+ errorMessage: c,
1343
+ setErrors: W,
1344
+ setTouched: _,
1345
+ setValue: ce,
1346
+ reset: B,
1347
+ validate: h,
1348
+ handleChange: V
1349
+ }), () => {
1350
+ const E = gn(Un(e, n)), j = Ze(E, n, C);
1351
+ return E ? qe(E, Object.assign(Object.assign({}, n.attrs), p.value), j) : j;
1352
+ };
1353
+ }
1354
+ });
1355
+ function Un(e, n) {
1356
+ let t = e.as || "";
1357
+ return !e.as && !n.slots.default && (t = "input"), t;
1358
+ }
1359
+ function ar(e) {
1360
+ var n, t, r, l;
1361
+ const { validateOnInput: a, validateOnChange: o, validateOnBlur: d, validateOnModelUpdate: f } = Ae();
1362
+ return {
1363
+ validateOnInput: (n = e.validateOnInput) !== null && n !== void 0 ? n : a,
1364
+ validateOnChange: (t = e.validateOnChange) !== null && t !== void 0 ? t : o,
1365
+ validateOnBlur: (r = e.validateOnBlur) !== null && r !== void 0 ? r : d,
1366
+ validateOnModelUpdate: (l = e.validateOnModelUpdate) !== null && l !== void 0 ? l : f
1367
+ };
1368
+ }
1369
+ function ur(e, n) {
1370
+ return $e(n.attrs.type) ? wn(e, "modelValue") ? e.modelValue : void 0 : wn(e, "modelValue") ? e.modelValue : n.attrs.value;
1371
+ }
1372
+ const pr = lr;
1373
+ let or = 0;
1374
+ const We = ["bails", "fieldsCount", "id", "multiple", "type", "validate"];
1375
+ function tt(e) {
1376
+ const n = (e == null ? void 0 : e.initialValues) || {}, t = Object.assign({}, v(n)), r = T(e == null ? void 0 : e.validationSchema);
1377
+ return r && ve(r) && Z(r.cast) ? k(r.cast(t) || {}) : k(t);
1378
+ }
1379
+ function sr(e) {
1380
+ var n;
1381
+ const t = or++, r = (e == null ? void 0 : e.name) || "Form";
1382
+ let l = 0;
1383
+ const a = ue(!1), o = ue(!1), d = ue(0), f = [], c = He(tt(e)), h = ue([]), V = ue({}), P = ue({}), _ = Ct(() => {
1384
+ P.value = h.value.reduce((u, i) => (u[Pe(v(i.path))] = i, u), {});
1385
+ });
1386
+ function B(u, i) {
1387
+ const s = w(u);
1388
+ if (!s) {
1389
+ typeof u == "string" && (V.value[Pe(u)] = hn(i));
1390
+ return;
1391
+ }
1392
+ if (typeof u == "string") {
1393
+ const m = Pe(u);
1394
+ V.value[m] && delete V.value[m];
1395
+ }
1396
+ s.errors = hn(i), s.valid = !s.errors.length;
1397
+ }
1398
+ function G(u) {
1399
+ re(u).forEach((i) => {
1400
+ B(i, u[i]);
1401
+ });
1402
+ }
1403
+ e != null && e.initialErrors && G(e.initialErrors);
1404
+ const A = N(() => {
1405
+ const u = h.value.reduce((i, s) => (s.errors.length && (i[v(s.path)] = s.errors), i), {});
1406
+ return Object.assign(Object.assign({}, V.value), u);
1407
+ }), L = N(() => re(A.value).reduce((u, i) => {
1408
+ const s = A.value[i];
1409
+ return s != null && s.length && (u[i] = s[0]), u;
1410
+ }, {})), W = N(() => h.value.reduce((u, i) => (u[v(i.path)] = { name: v(i.path) || "", label: i.label || "" }, u), {})), ce = N(() => h.value.reduce((u, i) => {
1411
+ var s;
1412
+ return u[v(i.path)] = (s = i.bails) !== null && s !== void 0 ? s : !0, u;
1413
+ }, {})), Y = Object.assign({}, (e == null ? void 0 : e.initialErrors) || {}), y = (n = e == null ? void 0 : e.keepValuesOnUnmount) !== null && n !== void 0 ? n : !1, { initialValues: p, originalInitialValues: g, setInitialValues: C } = cr(h, c, e), E = dr(h, c, g, L), j = N(() => h.value.reduce((u, i) => {
1414
+ const s = z(c, v(i.path));
1415
+ return J(u, v(i.path), s), u;
1416
+ }, {})), M = e == null ? void 0 : e.validationSchema;
1417
+ function K(u, i) {
1418
+ var s, m;
1419
+ const S = N(() => z(p.value, v(u))), F = P.value[v(u)], O = (i == null ? void 0 : i.type) === "checkbox" || (i == null ? void 0 : i.type) === "radio";
1420
+ if (F && O) {
1421
+ F.multiple = !0;
1422
+ const se = l++;
1423
+ return Array.isArray(F.id) ? F.id.push(se) : F.id = [F.id, se], F.fieldsCount++, F.__flags.pendingUnmount[se] = !1, F;
1424
+ }
1425
+ const $ = N(() => z(c, v(u))), x = v(u), ee = ye.findIndex((se) => se === x);
1426
+ ee !== -1 && ye.splice(ee, 1);
1427
+ const U = N(() => {
1428
+ var se, ke, an, un;
1429
+ const on = v(M);
1430
+ if (ve(on))
1431
+ return (ke = (se = on.describe) === null || se === void 0 ? void 0 : se.call(on, v(u)).required) !== null && ke !== void 0 ? ke : !1;
1432
+ const sn = v(i == null ? void 0 : i.schema);
1433
+ return ve(sn) && (un = (an = sn.describe) === null || an === void 0 ? void 0 : an.call(sn).required) !== null && un !== void 0 ? un : !1;
1434
+ }), ne = l++, te = He({
1435
+ id: ne,
1436
+ path: u,
1437
+ touched: !1,
1438
+ pending: !1,
1439
+ valid: !0,
1440
+ validated: !!(!((s = Y[x]) === null || s === void 0) && s.length),
1441
+ required: U,
1442
+ initialValue: S,
1443
+ errors: vt([]),
1444
+ bails: (m = i == null ? void 0 : i.bails) !== null && m !== void 0 ? m : !1,
1445
+ label: i == null ? void 0 : i.label,
1446
+ type: (i == null ? void 0 : i.type) || "default",
1447
+ value: $,
1448
+ multiple: !1,
1449
+ __flags: {
1450
+ pendingUnmount: { [ne]: !1 },
1451
+ pendingReset: !1
1452
+ },
1453
+ fieldsCount: 1,
1454
+ validate: i == null ? void 0 : i.validate,
1455
+ dirty: N(() => !X(T($), T(S)))
1456
+ });
1457
+ return h.value.push(te), P.value[x] = te, _(), L.value[x] && !Y[x] && fe(() => {
1458
+ _e(x, { mode: "silent" });
1459
+ }), xe(u) && de(u, (se) => {
1460
+ _();
1461
+ const ke = k($.value);
1462
+ P.value[se] = te, fe(() => {
1463
+ J(c, se, ke);
1464
+ });
1465
+ }), te;
1466
+ }
1467
+ const he = Tn(jn, 5), le = Tn(jn, 5), ae = mn(async (u) => await (u === "silent" ? he() : le()), (u, [i]) => {
1468
+ const s = re(I.errorBag.value), S = [
1469
+ .../* @__PURE__ */ new Set([...re(u.results), ...h.value.map((F) => F.path), ...s])
1470
+ ].sort().reduce((F, O) => {
1471
+ var $;
1472
+ const x = O, ee = w(x) || Oe(x), U = (($ = u.results[x]) === null || $ === void 0 ? void 0 : $.errors) || [], ne = v(ee == null ? void 0 : ee.path) || x, te = fr({ errors: U, valid: !U.length }, F.results[ne]);
1473
+ return F.results[ne] = te, te.valid || (F.errors[ne] = te.errors[0]), ee && V.value[ne] && delete V.value[ne], ee ? (ee.valid = te.valid, i === "silent" || i === "validated-only" && !ee.validated || B(ee, te.errors), F) : (B(ne, U), F);
1474
+ }, {
1475
+ valid: u.valid,
1476
+ results: {},
1477
+ errors: {},
1478
+ source: u.source
1479
+ });
1480
+ return u.values && (S.values = u.values, S.source = u.source), re(S.results).forEach((F) => {
1481
+ var O;
1482
+ const $ = w(F);
1483
+ $ && i !== "silent" && (i === "validated-only" && !$.validated || B($, (O = S.results[F]) === null || O === void 0 ? void 0 : O.errors));
1484
+ }), S;
1485
+ });
1486
+ function q(u) {
1487
+ h.value.forEach(u);
1488
+ }
1489
+ function w(u) {
1490
+ const i = typeof u == "string" ? Pe(u) : u;
1491
+ return typeof i == "string" ? P.value[i] : i;
1492
+ }
1493
+ function Oe(u) {
1494
+ return h.value.filter((s) => u.startsWith(v(s.path))).reduce((s, m) => s ? m.path.length > s.path.length ? m : s : m, void 0);
1495
+ }
1496
+ let ye = [], Se;
1497
+ function Ne(u) {
1498
+ return ye.push(u), Se || (Se = fe(() => {
1499
+ [...ye].sort().reverse().forEach((s) => {
1500
+ Pn(c, s);
1501
+ }), ye = [], Se = null;
1502
+ })), Se;
1503
+ }
1504
+ function ze(u) {
1505
+ return function(s, m) {
1506
+ return function(F) {
1507
+ return F instanceof Event && (F.preventDefault(), F.stopPropagation()), q((O) => O.touched = !0), a.value = !0, d.value++, Ce().then((O) => {
1508
+ const $ = k(c);
1509
+ if (O.valid && typeof s == "function") {
1510
+ const x = k(j.value);
1511
+ let ee = u ? x : $;
1512
+ return O.values && (ee = O.source === "schema" ? O.values : Object.assign({}, ee, O.values)), s(ee, {
1513
+ evt: F,
1514
+ controlledValues: x,
1515
+ setErrors: G,
1516
+ setFieldError: B,
1517
+ setTouched: nn,
1518
+ setFieldTouched: oe,
1519
+ setValues: ge,
1520
+ setFieldValue: D,
1521
+ resetForm: tn,
1522
+ resetField: En
1523
+ });
1524
+ }
1525
+ !O.valid && typeof m == "function" && m({
1526
+ values: $,
1527
+ evt: F,
1528
+ errors: O.errors,
1529
+ results: O.results
1530
+ });
1531
+ }).then((O) => (a.value = !1, O), (O) => {
1532
+ throw a.value = !1, O;
1533
+ });
1534
+ };
1535
+ };
1536
+ }
1537
+ const Q = ze(!1);
1538
+ Q.withControlled = ze(!0);
1539
+ function en(u, i) {
1540
+ const s = h.value.findIndex((S) => S.path === u && (Array.isArray(S.id) ? S.id.includes(i) : S.id === i)), m = h.value[s];
1541
+ if (!(s === -1 || !m)) {
1542
+ if (fe(() => {
1543
+ _e(u, { mode: "silent", warn: !1 });
1544
+ }), m.multiple && m.fieldsCount && m.fieldsCount--, Array.isArray(m.id)) {
1545
+ const S = m.id.indexOf(i);
1546
+ S >= 0 && m.id.splice(S, 1), delete m.__flags.pendingUnmount[i];
1547
+ }
1548
+ (!m.multiple || m.fieldsCount <= 0) && (h.value.splice(s, 1), An(u), _(), delete P.value[u]);
1549
+ }
1550
+ }
1551
+ function b(u) {
1552
+ re(P.value).forEach((i) => {
1553
+ i.startsWith(u) && delete P.value[i];
1554
+ }), h.value = h.value.filter((i) => !i.path.startsWith(u)), fe(() => {
1555
+ _();
1556
+ });
1557
+ }
1558
+ const I = {
1559
+ name: r,
1560
+ formId: t,
1561
+ values: c,
1562
+ controlledValues: j,
1563
+ errorBag: A,
1564
+ errors: L,
1565
+ schema: M,
1566
+ submitCount: d,
1567
+ meta: E,
1568
+ isSubmitting: a,
1569
+ isValidating: o,
1570
+ fieldArrays: f,
1571
+ keepValuesOnUnmount: y,
1572
+ validateSchema: T(M) ? ae : void 0,
1573
+ validate: Ce,
1574
+ setFieldError: B,
1575
+ validateField: _e,
1576
+ setFieldValue: D,
1577
+ setValues: ge,
1578
+ setErrors: G,
1579
+ setFieldTouched: oe,
1580
+ setTouched: nn,
1581
+ resetForm: tn,
1582
+ resetField: En,
1583
+ handleSubmit: Q,
1584
+ useFieldModel: ot,
1585
+ defineInputBinds: st,
1586
+ defineComponentBinds: dt,
1587
+ defineField: ln,
1588
+ stageInitialValue: at,
1589
+ unsetInitialValue: An,
1590
+ setFieldInitialValue: rn,
1591
+ createPathState: K,
1592
+ getPathState: w,
1593
+ unsetPathValue: Ne,
1594
+ removePathState: en,
1595
+ initialValues: p,
1596
+ getAllPathStates: () => h.value,
1597
+ destroyPath: b,
1598
+ isFieldTouched: rt,
1599
+ isFieldDirty: it,
1600
+ isFieldValid: lt
1601
+ };
1602
+ function D(u, i, s = !0) {
1603
+ const m = k(i), S = typeof u == "string" ? u : u.path;
1604
+ w(S) || K(S), J(c, S, m), s && _e(S);
1605
+ }
1606
+ function R(u, i = !0) {
1607
+ re(c).forEach((s) => {
1608
+ delete c[s];
1609
+ }), re(u).forEach((s) => {
1610
+ D(s, u[s], !1);
1611
+ }), i && Ce();
1612
+ }
1613
+ function ge(u, i = !0) {
1614
+ De(c, u), f.forEach((s) => s && s.reset()), i && Ce();
1615
+ }
1616
+ function me(u, i) {
1617
+ const s = w(v(u)) || K(u);
1618
+ return N({
1619
+ get() {
1620
+ return s.value;
1621
+ },
1622
+ set(m) {
1623
+ var S;
1624
+ const F = v(u);
1625
+ D(F, m, (S = v(i)) !== null && S !== void 0 ? S : !1);
1626
+ }
1627
+ });
1628
+ }
1629
+ function oe(u, i) {
1630
+ const s = w(u);
1631
+ s && (s.touched = i);
1632
+ }
1633
+ function rt(u) {
1634
+ const i = w(u);
1635
+ return i ? i.touched : h.value.filter((s) => s.path.startsWith(u)).some((s) => s.touched);
1636
+ }
1637
+ function it(u) {
1638
+ const i = w(u);
1639
+ return i ? i.dirty : h.value.filter((s) => s.path.startsWith(u)).some((s) => s.dirty);
1640
+ }
1641
+ function lt(u) {
1642
+ const i = w(u);
1643
+ return i ? i.valid : h.value.filter((s) => s.path.startsWith(u)).every((s) => s.valid);
1644
+ }
1645
+ function nn(u) {
1646
+ if (typeof u == "boolean") {
1647
+ q((i) => {
1648
+ i.touched = u;
1649
+ });
1650
+ return;
1651
+ }
1652
+ re(u).forEach((i) => {
1653
+ oe(i, !!u[i]);
1654
+ });
1655
+ }
1656
+ function En(u, i) {
1657
+ var s;
1658
+ const m = i && "value" in i ? i.value : z(p.value, u), S = w(u);
1659
+ S && (S.__flags.pendingReset = !0), rn(u, k(m), !0), D(u, m, !1), oe(u, (s = i == null ? void 0 : i.touched) !== null && s !== void 0 ? s : !1), B(u, (i == null ? void 0 : i.errors) || []), fe(() => {
1660
+ S && (S.__flags.pendingReset = !1);
1661
+ });
1662
+ }
1663
+ function tn(u, i) {
1664
+ let s = k(u != null && u.values ? u.values : g.value);
1665
+ s = i != null && i.force ? s : De(g.value, s), s = ve(M) && Z(M.cast) ? M.cast(s) : s, C(s, { force: i == null ? void 0 : i.force }), q((m) => {
1666
+ var S;
1667
+ m.__flags.pendingReset = !0, m.validated = !1, m.touched = ((S = u == null ? void 0 : u.touched) === null || S === void 0 ? void 0 : S[v(m.path)]) || !1, D(v(m.path), z(s, v(m.path)), !1), B(v(m.path), void 0);
1668
+ }), i != null && i.force ? R(s, !1) : ge(s, !1), G((u == null ? void 0 : u.errors) || {}), d.value = (u == null ? void 0 : u.submitCount) || 0, fe(() => {
1669
+ Ce({ mode: "silent" }), q((m) => {
1670
+ m.__flags.pendingReset = !1;
1671
+ });
1672
+ });
1673
+ }
1674
+ async function Ce(u) {
1675
+ const i = (u == null ? void 0 : u.mode) || "force";
1676
+ if (i === "force" && q((O) => O.validated = !0), I.validateSchema)
1677
+ return I.validateSchema(i);
1678
+ o.value = !0;
1679
+ const s = await Promise.all(h.value.map((O) => O.validate ? O.validate(u).then(($) => ({
1680
+ key: v(O.path),
1681
+ valid: $.valid,
1682
+ errors: $.errors,
1683
+ value: $.value
1684
+ })) : Promise.resolve({
1685
+ key: v(O.path),
1686
+ valid: !0,
1687
+ errors: [],
1688
+ value: void 0
1689
+ })));
1690
+ o.value = !1;
1691
+ const m = {}, S = {}, F = {};
1692
+ for (const O of s)
1693
+ m[O.key] = {
1694
+ valid: O.valid,
1695
+ errors: O.errors
1696
+ }, O.value && J(F, O.key, O.value), O.errors.length && (S[O.key] = O.errors[0]);
1697
+ return {
1698
+ valid: s.every((O) => O.valid),
1699
+ results: m,
1700
+ errors: S,
1701
+ values: F,
1702
+ source: "fields"
1703
+ };
1704
+ }
1705
+ async function _e(u, i) {
1706
+ var s;
1707
+ const m = w(u);
1708
+ if (m && (i == null ? void 0 : i.mode) !== "silent" && (m.validated = !0), M) {
1709
+ const { results: F } = await ae((i == null ? void 0 : i.mode) || "validated-only");
1710
+ return F[u] || { errors: [], valid: !0 };
1711
+ }
1712
+ return m != null && m.validate ? m.validate(i) : (!m && ((s = i == null ? void 0 : i.warn) !== null && s !== void 0 ? s : !0) && process.env.NODE_ENV !== "production" && Ln(`field with path ${u} was not found`), Promise.resolve({ errors: [], valid: !0 }));
1713
+ }
1714
+ function An(u) {
1715
+ Pn(p.value, u);
1716
+ }
1717
+ function at(u, i, s = !1) {
1718
+ rn(u, i), J(c, u, i), s && !(e != null && e.initialValues) && J(g.value, u, k(i));
1719
+ }
1720
+ function rn(u, i, s = !1) {
1721
+ J(p.value, u, k(i)), s && J(g.value, u, k(i));
1722
+ }
1723
+ async function jn() {
1724
+ const u = T(M);
1725
+ if (!u)
1726
+ return { valid: !0, results: {}, errors: {}, source: "none" };
1727
+ o.value = !0;
1728
+ const i = Ke(u) || ve(u) ? await zt(u, c) : await Lt(u, c, {
1729
+ names: W.value,
1730
+ bailsMap: ce.value
1731
+ });
1732
+ return o.value = !1, i;
1733
+ }
1734
+ const ut = Q((u, { evt: i }) => {
1735
+ Hn(i) && i.target.submit();
1736
+ });
1737
+ $n(() => {
1738
+ if (e != null && e.initialErrors && G(e.initialErrors), e != null && e.initialTouched && nn(e.initialTouched), e != null && e.validateOnMount) {
1739
+ Ce();
1740
+ return;
1741
+ }
1742
+ I.validateSchema && I.validateSchema("silent");
1743
+ }), xe(M) && de(M, () => {
1744
+ var u;
1745
+ (u = I.validateSchema) === null || u === void 0 || u.call(I, "validated-only");
1746
+ }), fn(be, I), process.env.NODE_ENV !== "production" && (Kt(I), de(() => Object.assign(Object.assign({ errors: A.value }, E.value), { values: c, isSubmitting: a.value, isValidating: o.value, submitCount: d.value }), we, {
1747
+ deep: !0
1748
+ }));
1749
+ function ln(u, i) {
1750
+ const s = Z(i) || i == null ? void 0 : i.label, m = w(v(u)) || K(u, { label: s }), S = () => Z(i) ? i(Le(m, We)) : i || {};
1751
+ function F() {
1752
+ var U;
1753
+ m.touched = !0, ((U = S().validateOnBlur) !== null && U !== void 0 ? U : Ae().validateOnBlur) && _e(v(m.path));
1754
+ }
1755
+ function O() {
1756
+ var U;
1757
+ ((U = S().validateOnInput) !== null && U !== void 0 ? U : Ae().validateOnInput) && fe(() => {
1758
+ _e(v(m.path));
1759
+ });
1760
+ }
1761
+ function $() {
1762
+ var U;
1763
+ ((U = S().validateOnChange) !== null && U !== void 0 ? U : Ae().validateOnChange) && fe(() => {
1764
+ _e(v(m.path));
1765
+ });
1766
+ }
1767
+ const x = N(() => {
1768
+ const U = {
1769
+ onChange: $,
1770
+ onInput: O,
1771
+ onBlur: F
1772
+ };
1773
+ return Z(i) ? Object.assign(Object.assign({}, U), i(Le(m, We)).props || {}) : i != null && i.props ? Object.assign(Object.assign({}, U), i.props(Le(m, We))) : U;
1774
+ });
1775
+ return [me(u, () => {
1776
+ var U, ne, te;
1777
+ return (te = (U = S().validateOnModelUpdate) !== null && U !== void 0 ? U : (ne = Ae()) === null || ne === void 0 ? void 0 : ne.validateOnModelUpdate) !== null && te !== void 0 ? te : !0;
1778
+ }), x];
1779
+ }
1780
+ function ot(u) {
1781
+ return Array.isArray(u) ? u.map((i) => me(i, !0)) : me(u);
1782
+ }
1783
+ function st(u, i) {
1784
+ const [s, m] = ln(u, i);
1785
+ function S() {
1786
+ m.value.onBlur();
1787
+ }
1788
+ function F($) {
1789
+ const x = Ye($);
1790
+ D(v(u), x, !1), m.value.onInput();
1791
+ }
1792
+ function O($) {
1793
+ const x = Ye($);
1794
+ D(v(u), x, !1), m.value.onChange();
1795
+ }
1796
+ return N(() => Object.assign(Object.assign({}, m.value), {
1797
+ onBlur: S,
1798
+ onInput: F,
1799
+ onChange: O,
1800
+ value: s.value
1801
+ }));
1802
+ }
1803
+ function dt(u, i) {
1804
+ const [s, m] = ln(u, i), S = w(v(u));
1805
+ function F(O) {
1806
+ s.value = O;
1807
+ }
1808
+ return N(() => {
1809
+ const O = Z(i) ? i(Le(S, We)) : i || {};
1810
+ return Object.assign({ [O.model || "modelValue"]: s.value, [`onUpdate:${O.model || "modelValue"}`]: F }, m.value);
1811
+ });
1812
+ }
1813
+ const Fn = Object.assign(Object.assign({}, I), { values: ct(c), handleReset: () => tn(), submitForm: ut });
1814
+ return fn(bt, Fn), Fn;
1815
+ }
1816
+ function dr(e, n, t, r) {
1817
+ const l = {
1818
+ touched: "some",
1819
+ pending: "some",
1820
+ valid: "every"
1821
+ }, a = N(() => !X(n, T(t)));
1822
+ function o() {
1823
+ const f = e.value;
1824
+ return re(l).reduce((c, h) => {
1825
+ const V = l[h];
1826
+ return c[h] = f[V]((P) => P[h]), c;
1827
+ }, {});
1828
+ }
1829
+ const d = He(o());
1830
+ return ft(() => {
1831
+ const f = o();
1832
+ d.touched = f.touched, d.valid = f.valid, d.pending = f.pending;
1833
+ }), N(() => Object.assign(Object.assign({ initialValues: T(t) }, d), { valid: d.valid && !re(r.value).length, dirty: a.value }));
1834
+ }
1835
+ function cr(e, n, t) {
1836
+ const r = tt(t), l = ue(r), a = ue(k(r));
1837
+ function o(d, f) {
1838
+ f != null && f.force ? (l.value = k(d), a.value = k(d)) : (l.value = De(k(l.value) || {}, k(d)), a.value = De(k(a.value) || {}, k(d))), f != null && f.updateFields && e.value.forEach((c) => {
1839
+ if (c.touched)
1840
+ return;
1841
+ const V = z(l.value, v(c.path));
1842
+ J(n, v(c.path), k(V));
1843
+ });
1844
+ }
1845
+ return {
1846
+ initialValues: l,
1847
+ originalInitialValues: a,
1848
+ setInitialValues: o
1849
+ };
1850
+ }
1851
+ function fr(e, n) {
1852
+ return n ? {
1853
+ valid: e.valid && n.valid,
1854
+ errors: [...e.errors, ...n.errors]
1855
+ } : e;
1856
+ }
1857
+ const vr = /* @__PURE__ */ Je({
1858
+ name: "Form",
1859
+ inheritAttrs: !1,
1860
+ props: {
1861
+ as: {
1862
+ type: null,
1863
+ default: "form"
1864
+ },
1865
+ validationSchema: {
1866
+ type: Object,
1867
+ default: void 0
1868
+ },
1869
+ initialValues: {
1870
+ type: Object,
1871
+ default: void 0
1872
+ },
1873
+ initialErrors: {
1874
+ type: Object,
1875
+ default: void 0
1876
+ },
1877
+ initialTouched: {
1878
+ type: Object,
1879
+ default: void 0
1880
+ },
1881
+ validateOnMount: {
1882
+ type: Boolean,
1883
+ default: !1
1884
+ },
1885
+ onSubmit: {
1886
+ type: Function,
1887
+ default: void 0
1888
+ },
1889
+ onInvalidSubmit: {
1890
+ type: Function,
1891
+ default: void 0
1892
+ },
1893
+ keepValues: {
1894
+ type: Boolean,
1895
+ default: !1
1896
+ },
1897
+ name: {
1898
+ type: String,
1899
+ default: "Form"
1900
+ }
1901
+ },
1902
+ setup(e, n) {
1903
+ const t = Ee(e, "validationSchema"), r = Ee(e, "keepValues"), { errors: l, errorBag: a, values: o, meta: d, isSubmitting: f, isValidating: c, submitCount: h, controlledValues: V, validate: P, validateField: _, handleReset: B, resetForm: G, handleSubmit: A, setErrors: L, setFieldError: W, setFieldValue: ce, setValues: Y, setFieldTouched: y, setTouched: p, resetField: g } = sr({
1904
+ validationSchema: t.value ? t : void 0,
1905
+ initialValues: e.initialValues,
1906
+ initialErrors: e.initialErrors,
1907
+ initialTouched: e.initialTouched,
1908
+ validateOnMount: e.validateOnMount,
1909
+ keepValuesOnUnmount: r,
1910
+ name: e.name
1911
+ }), C = A((q, { evt: w }) => {
1912
+ Hn(w) && w.target.submit();
1913
+ }, e.onInvalidSubmit), E = e.onSubmit ? A(e.onSubmit, e.onInvalidSubmit) : C;
1914
+ function j(q) {
1915
+ bn(q) && q.preventDefault(), B(), typeof n.attrs.onReset == "function" && n.attrs.onReset();
1916
+ }
1917
+ function M(q, w) {
1918
+ return A(typeof q == "function" && !w ? q : w, e.onInvalidSubmit)(q);
1919
+ }
1920
+ function K() {
1921
+ return k(o);
1922
+ }
1923
+ function he() {
1924
+ return k(d.value);
1925
+ }
1926
+ function le() {
1927
+ return k(l.value);
1928
+ }
1929
+ function ae() {
1930
+ return {
1931
+ meta: d.value,
1932
+ errors: l.value,
1933
+ errorBag: a.value,
1934
+ values: o,
1935
+ isSubmitting: f.value,
1936
+ isValidating: c.value,
1937
+ submitCount: h.value,
1938
+ controlledValues: V.value,
1939
+ validate: P,
1940
+ validateField: _,
1941
+ handleSubmit: M,
1942
+ handleReset: B,
1943
+ submitForm: C,
1944
+ setErrors: L,
1945
+ setFieldError: W,
1946
+ setFieldValue: ce,
1947
+ setValues: Y,
1948
+ setFieldTouched: y,
1949
+ setTouched: p,
1950
+ resetForm: G,
1951
+ resetField: g,
1952
+ getValues: K,
1953
+ getMeta: he,
1954
+ getErrors: le
1955
+ };
1956
+ }
1957
+ return n.expose({
1958
+ setFieldError: W,
1959
+ setErrors: L,
1960
+ setFieldValue: ce,
1961
+ setValues: Y,
1962
+ setFieldTouched: y,
1963
+ setTouched: p,
1964
+ resetForm: G,
1965
+ validate: P,
1966
+ validateField: _,
1967
+ resetField: g,
1968
+ getValues: K,
1969
+ getMeta: he,
1970
+ getErrors: le,
1971
+ values: o,
1972
+ meta: d,
1973
+ errors: l
1974
+ }), function() {
1975
+ const w = e.as === "form" ? e.as : e.as ? gn(e.as) : null, Oe = Ze(w, n, ae);
1976
+ return w ? qe(w, Object.assign(Object.assign(Object.assign({}, w === "form" ? {
1977
+ // Disables native validation as vee-validate will handle it.
1978
+ novalidate: !0
1979
+ } : {}), n.attrs), { onSubmit: E, onReset: j }), Oe) : Oe;
1980
+ };
1981
+ }
1982
+ }), br = vr;
1983
+ function mr(e) {
1984
+ const n = Fe(be, void 0), t = ue([]), r = () => {
1985
+ }, l = {
1986
+ fields: t,
1987
+ remove: r,
1988
+ push: r,
1989
+ swap: r,
1990
+ insert: r,
1991
+ update: r,
1992
+ replace: r,
1993
+ prepend: r,
1994
+ move: r
1995
+ };
1996
+ if (!n)
1997
+ return process.env.NODE_ENV !== "production" && Me("FieldArray requires being a child of `<Form/>` or `useForm` being called before it. Array fields may not work correctly"), l;
1998
+ if (!T(e))
1999
+ return process.env.NODE_ENV !== "production" && Me("FieldArray requires a field path to be provided, did you forget to pass the `name` prop?"), l;
2000
+ const a = n.fieldArrays.find((y) => T(y.path) === T(e));
2001
+ if (a)
2002
+ return a;
2003
+ let o = 0;
2004
+ function d() {
2005
+ return z(n == null ? void 0 : n.values, v(e), []) || [];
2006
+ }
2007
+ function f() {
2008
+ const y = d();
2009
+ Array.isArray(y) && (t.value = y.map((p, g) => h(p, g, t.value)), c());
2010
+ }
2011
+ f();
2012
+ function c() {
2013
+ const y = t.value.length;
2014
+ for (let p = 0; p < y; p++) {
2015
+ const g = t.value[p];
2016
+ g.isFirst = p === 0, g.isLast = p === y - 1;
2017
+ }
2018
+ }
2019
+ function h(y, p, g) {
2020
+ if (g && !Ie(p) && g[p])
2021
+ return g[p];
2022
+ const C = o++;
2023
+ return {
2024
+ key: C,
2025
+ value: Ft({
2026
+ get() {
2027
+ const j = z(n == null ? void 0 : n.values, v(e), []) || [], M = t.value.findIndex((K) => K.key === C);
2028
+ return M === -1 ? y : j[M];
2029
+ },
2030
+ set(j) {
2031
+ const M = t.value.findIndex((K) => K.key === C);
2032
+ if (M === -1) {
2033
+ process.env.NODE_ENV !== "production" && Me("Attempting to update a non-existent array item");
2034
+ return;
2035
+ }
2036
+ L(M, j);
2037
+ }
2038
+ }),
2039
+ // will be auto unwrapped
2040
+ isFirst: !1,
2041
+ isLast: !1
2042
+ };
2043
+ }
2044
+ function V() {
2045
+ c(), n == null || n.validate({ mode: "silent" });
2046
+ }
2047
+ function P(y) {
2048
+ const p = v(e), g = z(n == null ? void 0 : n.values, p);
2049
+ if (!g || !Array.isArray(g))
2050
+ return;
2051
+ const C = [...g];
2052
+ C.splice(y, 1);
2053
+ const E = p + `[${y}]`;
2054
+ n.destroyPath(E), n.unsetInitialValue(E), J(n.values, p, C), t.value.splice(y, 1), V();
2055
+ }
2056
+ function _(y) {
2057
+ const p = k(y), g = v(e), C = z(n == null ? void 0 : n.values, g), E = Ie(C) ? [] : C;
2058
+ if (!Array.isArray(E))
2059
+ return;
2060
+ const j = [...E];
2061
+ j.push(p), n.stageInitialValue(g + `[${j.length - 1}]`, p), J(n.values, g, j), t.value.push(h(p)), V();
2062
+ }
2063
+ function B(y, p) {
2064
+ const g = v(e), C = z(n == null ? void 0 : n.values, g);
2065
+ if (!Array.isArray(C) || !(y in C) || !(p in C))
2066
+ return;
2067
+ const E = [...C], j = [...t.value], M = E[y];
2068
+ E[y] = E[p], E[p] = M;
2069
+ const K = j[y];
2070
+ j[y] = j[p], j[p] = K, J(n.values, g, E), t.value = j, c();
2071
+ }
2072
+ function G(y, p) {
2073
+ const g = k(p), C = v(e), E = z(n == null ? void 0 : n.values, C);
2074
+ if (!Array.isArray(E) || E.length < y)
2075
+ return;
2076
+ const j = [...E], M = [...t.value];
2077
+ j.splice(y, 0, g), M.splice(y, 0, h(g)), J(n.values, C, j), t.value = M, V();
2078
+ }
2079
+ function A(y) {
2080
+ const p = v(e);
2081
+ n.stageInitialValue(p, y), J(n.values, p, y), f(), V();
2082
+ }
2083
+ function L(y, p) {
2084
+ const g = v(e), C = z(n == null ? void 0 : n.values, g);
2085
+ !Array.isArray(C) || C.length - 1 < y || (J(n.values, `${g}[${y}]`, p), n == null || n.validate({ mode: "validated-only" }));
2086
+ }
2087
+ function W(y) {
2088
+ const p = k(y), g = v(e), C = z(n == null ? void 0 : n.values, g), E = Ie(C) ? [] : C;
2089
+ if (!Array.isArray(E))
2090
+ return;
2091
+ const j = [p, ...E];
2092
+ J(n.values, g, j), n.stageInitialValue(g + "[0]", p), t.value.unshift(h(p)), V();
2093
+ }
2094
+ function ce(y, p) {
2095
+ const g = v(e), C = z(n == null ? void 0 : n.values, g), E = Ie(C) ? [] : [...C];
2096
+ if (!Array.isArray(C) || !(y in C) || !(p in C))
2097
+ return;
2098
+ const j = [...t.value], M = j[y];
2099
+ j.splice(y, 1), j.splice(p, 0, M);
2100
+ const K = E[y];
2101
+ E.splice(y, 1), E.splice(p, 0, K), J(n.values, g, E), t.value = j, V();
2102
+ }
2103
+ const Y = {
2104
+ fields: t,
2105
+ remove: P,
2106
+ push: _,
2107
+ swap: B,
2108
+ insert: G,
2109
+ update: L,
2110
+ replace: A,
2111
+ prepend: W,
2112
+ move: ce
2113
+ };
2114
+ return n.fieldArrays.push(Object.assign({ path: e, reset: f }, Y)), zn(() => {
2115
+ const y = n.fieldArrays.findIndex((p) => v(p.path) === v(e));
2116
+ y >= 0 && n.fieldArrays.splice(y, 1);
2117
+ }), de(d, (y) => {
2118
+ const p = t.value.map((g) => g.value);
2119
+ X(y, p) || f();
2120
+ }), Y;
2121
+ }
2122
+ const hr = /* @__PURE__ */ Je({
2123
+ name: "FieldArray",
2124
+ inheritAttrs: !1,
2125
+ props: {
2126
+ name: {
2127
+ type: String,
2128
+ required: !0
2129
+ }
2130
+ },
2131
+ setup(e, n) {
2132
+ const { push: t, remove: r, swap: l, insert: a, replace: o, update: d, prepend: f, move: c, fields: h } = mr(() => e.name);
2133
+ function V() {
2134
+ return {
2135
+ fields: h.value,
2136
+ push: t,
2137
+ remove: r,
2138
+ swap: l,
2139
+ insert: a,
2140
+ update: d,
2141
+ replace: o,
2142
+ prepend: f,
2143
+ move: c
2144
+ };
2145
+ }
2146
+ return n.expose({
2147
+ push: t,
2148
+ remove: r,
2149
+ swap: l,
2150
+ insert: a,
2151
+ update: d,
2152
+ replace: o,
2153
+ prepend: f,
2154
+ move: c
2155
+ }), () => Ze(void 0, n, V);
2156
+ }
2157
+ }), Vr = hr, yr = /* @__PURE__ */ Je({
2158
+ name: "ErrorMessage",
2159
+ props: {
2160
+ as: {
2161
+ type: String,
2162
+ default: void 0
2163
+ },
2164
+ name: {
2165
+ type: String,
2166
+ required: !0
2167
+ }
2168
+ },
2169
+ setup(e, n) {
2170
+ const t = Ue(be, void 0), r = N(() => t == null ? void 0 : t.errors.value[e.name]);
2171
+ function l() {
2172
+ return {
2173
+ message: r.value
2174
+ };
2175
+ }
2176
+ return () => {
2177
+ if (!r.value)
2178
+ return;
2179
+ const a = e.as ? gn(e.as) : e.as, o = Ze(a, n, l), d = Object.assign({ role: "alert" }, n.attrs);
2180
+ return !a && (Array.isArray(o) || !o) && (o != null && o.length) ? o : (Array.isArray(o) || !o) && !(o != null && o.length) ? qe(a || "span", d, r.value) : qe(a, d, o);
2181
+ };
2182
+ }
2183
+ }), Or = yr;
2184
+ function Sr(e) {
2185
+ const n = On(e);
2186
+ return N(() => {
2187
+ var t, r;
2188
+ return n && (r = "meta" in n ? n.meta.dirty : (t = n == null ? void 0 : n.value) === null || t === void 0 ? void 0 : t.dirty) !== null && r !== void 0 ? r : !1;
2189
+ });
2190
+ }
2191
+ function _r(e) {
2192
+ const n = On(e);
2193
+ return N(() => {
2194
+ var t, r;
2195
+ return n && (r = "meta" in n ? n.meta.touched : (t = n == null ? void 0 : n.value) === null || t === void 0 ? void 0 : t.touched) !== null && r !== void 0 ? r : !1;
2196
+ });
2197
+ }
2198
+ function Er(e) {
2199
+ const n = On(e);
2200
+ return N(() => {
2201
+ var t, r;
2202
+ return n && (r = "meta" in n ? n.meta.valid : (t = n == null ? void 0 : n.value) === null || t === void 0 ? void 0 : t.valid) !== null && r !== void 0 ? r : !1;
2203
+ });
2204
+ }
2205
+ function Ar(e) {
2206
+ const n = Fe(be), t = e ? void 0 : Ue(Xe);
2207
+ return N(() => e ? z(n == null ? void 0 : n.values, v(e)) : v(t == null ? void 0 : t.value));
2208
+ }
2209
+ function jr() {
2210
+ const e = Fe(be);
2211
+ return e || process.env.NODE_ENV !== "production" && Me("No vee-validate <Form /> or `useForm` was detected in the component tree"), N(() => (e == null ? void 0 : e.values) || {});
2212
+ }
2213
+ function Fr(e) {
2214
+ const n = Fe(be), t = e ? void 0 : Ue(Xe);
2215
+ return N(() => e ? n == null ? void 0 : n.errors.value[v(e)] : t == null ? void 0 : t.errorMessage.value);
2216
+ }
2217
+ export {
2218
+ Or as E,
2219
+ br as F,
2220
+ pr as a,
2221
+ Ar as b,
2222
+ Xe as c,
2223
+ Fr as d,
2224
+ _r as e,
2225
+ Sr as f,
2226
+ Er as g,
2227
+ Vn as h,
2228
+ Qe as i,
2229
+ nr as j,
2230
+ Vr as k,
2231
+ jr as u
2232
+ };