@uniquedj95/vform 3.4.1 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,202 +1,213 @@
1
- import { ref as E, computed as S, watch as D, defineComponent as T, createElementBlock as $, openBlock as f, normalizeClass as ne, createElementVNode as B, createCommentVNode as O, Fragment as M, renderList as K, toDisplayString as A, normalizeStyle as ve, createBlock as b, createVNode as I, unref as d, withCtx as k, resolveDynamicComponent as fe, createTextVNode as z, toRef as we, mergeModels as G, useModel as H, resolveDirective as Oe, withDirectives as Ee, onMounted as ge } from "vue";
2
- import { IonGrid as Ve, IonRow as le, IonCol as ae, IonButton as N, IonLabel as Y, IonText as xe, IonInput as _e, IonInputPasswordToggle as Re, IonChip as Ae, IonIcon as ce, IonList as $e, IonItem as Fe, IonCheckbox as be, actionSheetController as ze, alertController as Be, IonTextarea as Pe, IonRadioGroup as Ie, IonRadio as Ue } from "@ionic/vue";
3
- import { chevronDown as De, close as Te, add as qe, remove as Le } from "ionicons/icons";
4
- import { maskito as Me } from "@maskito/vue";
5
- function je(t) {
6
- return new Promise((u) => {
1
+ import { ref as E, computed as k, watch as T, defineComponent as D, createElementBlock as $, openBlock as v, normalizeClass as le, createElementVNode as I, createCommentVNode as O, Fragment as M, renderList as W, toDisplayString as A, normalizeStyle as fe, createBlock as b, createVNode as P, unref as c, withCtx as S, resolveDynamicComponent as me, createTextVNode as B, toRef as Ee, mergeModels as H, useModel as K, resolveDirective as xe, withDirectives as Re, onMounted as _e } from "vue";
2
+ import { IonGrid as be, IonRow as ue, IonCol as te, IonButton as j, IonLabel as ee, IonText as Fe, IonInput as Se, IonInputPasswordToggle as ze, IonChip as Ae, IonIcon as pe, IonList as $e, IonItem as Ie, IonCheckbox as ke, actionSheetController as Be, alertController as Pe, IonTextarea as Ue, IonRadioGroup as De, IonRadio as Te } from "@ionic/vue";
3
+ import { chevronDown as qe, close as Le, add as Me, remove as Ne } from "ionicons/icons";
4
+ import { maskito as je } from "@maskito/vue";
5
+ function Ge(t) {
6
+ return new Promise((r) => {
7
7
  requestAnimationFrame(async () => {
8
- const n = await t.getInputElement();
9
- u(n);
8
+ const l = await t.getInputElement();
9
+ r(l);
10
10
  });
11
11
  });
12
12
  }
13
- const Ne = {
13
+ const He = {
14
14
  d: /\d/,
15
15
  a: /[A-Za-z]/,
16
16
  "*": /[A-Za-z0-9]/
17
17
  // Default: alphanum, can customize if needed
18
- }, Ge = {
18
+ }, Ke = {
19
19
  d: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
20
20
  a: ["A", "B", "C", "x", "y", "z", "D", "f"],
21
21
  "*": ["A", "3", "b", "8", "z", "4", "D", "0"]
22
22
  };
23
- function He(t, u) {
24
- const n = Ge[t];
25
- return n[u % n.length];
23
+ function We(t, r) {
24
+ const l = Ke[t];
25
+ return l[r % l.length];
26
26
  }
27
- function Ke(t) {
28
- const u = [];
29
- let n = "", e = 0, l = 0;
27
+ function Ze(t) {
28
+ const r = [];
29
+ let l = "", e = 0, a = 0;
30
30
  for (; e < t.length; ) {
31
- const s = t[e];
32
- if (["d", "a", "*"].includes(s)) {
33
- let r = 1;
31
+ const o = t[e];
32
+ if (["d", "a", "*"].includes(o)) {
33
+ let s = 1;
34
34
  if (t[e + 1] === "{") {
35
- const o = t.indexOf("}", e + 2);
36
- if (o !== -1) {
37
- const y = t.slice(e + 2, o);
35
+ const n = t.indexOf("}", e + 2);
36
+ if (n !== -1) {
37
+ const y = t.slice(e + 2, n);
38
38
  if (y.includes(",")) {
39
- const [, p] = y.split(",").map((c) => parseInt(c.trim()));
40
- r = p || parseInt(y.split(",")[0]);
39
+ const [, d] = y.split(",").map((p) => parseInt(p.trim()));
40
+ s = d || parseInt(y.split(",")[0]);
41
41
  } else
42
- r = parseInt(y);
43
- e = o;
42
+ s = parseInt(y);
43
+ e = n;
44
44
  }
45
45
  } else {
46
- let o = e + 1;
47
- for (; t[o] === s; )
48
- r++, o++;
49
- e = o - 1;
46
+ let n = e + 1;
47
+ for (; t[n] === o; )
48
+ s++, n++;
49
+ e = n - 1;
50
50
  }
51
- for (let o = 0; o < r; o++)
52
- u.push(Ne[s]), n += He(s, l++);
51
+ for (let n = 0; n < s; n++)
52
+ r.push(He[o]), l += We(o, a++);
53
53
  } else
54
- u.push(s), n += s;
54
+ r.push(o), l += o;
55
55
  e++;
56
56
  }
57
57
  return {
58
- mask: u,
59
- placeholder: n,
60
- elementPredicate: je
58
+ mask: r,
59
+ placeholder: l,
60
+ elementPredicate: Ge
61
61
  };
62
62
  }
63
- function me(t) {
63
+ function he(t) {
64
64
  return t == null || Array.isArray(t) && !t.length || typeof t == "object" && !Object.keys(t).length || !t;
65
65
  }
66
- function ie(t, u, n) {
67
- return typeof t.condition == "function" ? t.condition(u, n) : !0;
66
+ function ge(t, r, l) {
67
+ return typeof t.condition == "function" ? t.condition(r, l) : !0;
68
68
  }
69
- function he(t) {
69
+ function ye(t) {
70
70
  if (typeof t != "object" || t === null)
71
71
  return t;
72
72
  if (Array.isArray(t))
73
- return t.map((n) => he(n));
74
- const u = {};
75
- return Object.entries(t).forEach(([n, e]) => {
76
- typeof e == "function" ? u[n] = e.bind(u) : u[n] = he(e);
77
- }), u;
73
+ return t.map((l) => ye(l));
74
+ const r = {};
75
+ return Object.entries(t).forEach(([l, e]) => {
76
+ typeof e == "function" ? r[l] = e.bind(r) : r[l] = ye(e);
77
+ }), r;
78
78
  }
79
- function ye(t, u) {
80
- return u.findIndex((n) => n.value === t.value || n.label === t.label || n.value === t.label || n.label === t.value);
79
+ function Ce(t, r) {
80
+ return r.findIndex((l) => l.value === t.value || l.label === t.label || l.value === t.label || l.label === t.value);
81
81
  }
82
- function X(t, u) {
83
- const n = ye(t, u);
84
- n >= 0 ? u[n].isChecked = !0 : u.push({ ...t, isChecked: !0 });
82
+ function Y(t, r) {
83
+ const l = Ce(t, r);
84
+ l >= 0 ? r[l].isChecked = !0 : r.push({ ...t, isChecked: !0 });
85
85
  }
86
- function We(t, u) {
87
- const n = ye(t, u);
88
- n >= 0 && (u[n].isChecked = !1);
86
+ function Je(t, r) {
87
+ const l = Ce(t, r);
88
+ l >= 0 && (r[l].isChecked = !1);
89
89
  }
90
- function Ze(t) {
91
- t.forEach((u) => {
92
- u.isChecked = !1;
90
+ function Qe(t) {
91
+ t.forEach((r) => {
92
+ r.isChecked = !1;
93
93
  });
94
94
  }
95
- function Je(t, u) {
96
- return u ? t.filter(
97
- (n) => JSON.stringify(n).toLowerCase().includes(u.toLowerCase())
95
+ function Xe(t, r) {
96
+ return r ? t.filter(
97
+ (l) => JSON.stringify(l).toLowerCase().includes(r.toLowerCase())
98
98
  ) : t;
99
99
  }
100
- function ke(t) {
101
- const u = t.label || "", n = t.required ? " *" : "";
102
- return u + n;
100
+ function we(t) {
101
+ const r = t.label || "", l = t.required ? " *" : "";
102
+ return r + l;
103
103
  }
104
- function oe(t, u) {
105
- if (t === u) return !0;
106
- if (t == null || u == null || typeof t != typeof u) return !1;
107
- if (typeof t != "object") return t === u;
108
- if (Array.isArray(t) && Array.isArray(u))
109
- return t.length !== u.length ? !1 : t.every((l, s) => oe(l, u[s]));
110
- if (Array.isArray(t) !== Array.isArray(u)) return !1;
111
- const n = Object.keys(t), e = Object.keys(u);
112
- return n.length !== e.length ? !1 : n.every(
113
- (l) => Object.prototype.hasOwnProperty.call(u, l) && oe(t[l], u[l])
104
+ function se(t, r) {
105
+ if (t === r) return !0;
106
+ if (t == null || r == null || typeof t != typeof r) return !1;
107
+ if (typeof t != "object") return t === r;
108
+ if (Array.isArray(t) && Array.isArray(r))
109
+ return t.length !== r.length ? !1 : t.every((a, o) => se(a, r[o]));
110
+ if (Array.isArray(t) !== Array.isArray(r)) return !1;
111
+ const l = Object.keys(t), e = Object.keys(r);
112
+ return l.length !== e.length ? !1 : l.every(
113
+ (a) => Object.prototype.hasOwnProperty.call(r, a) && se(t[a], r[a])
114
114
  );
115
115
  }
116
- function Se() {
116
+ function G(t) {
117
+ return t.type !== "FormSection";
118
+ }
119
+ function Ye(t) {
120
+ return t.type === "FormSection";
121
+ }
122
+ function Oe() {
117
123
  const t = E([]);
118
- async function u() {
124
+ async function r() {
119
125
  console.debug("Validating form inputs");
120
- const s = [];
121
- for (const r of t.value)
122
- if (typeof (r == null ? void 0 : r.onValueUpdate) == "function" && await r.onValueUpdate(), typeof (r == null ? void 0 : r.getErrors) == "function")
126
+ const o = [];
127
+ for (const s of t.value)
128
+ if (typeof (s == null ? void 0 : s.onValueUpdate) == "function" && await s.onValueUpdate(), typeof (s == null ? void 0 : s.getErrors) == "function")
123
129
  try {
124
- const o = r.getErrors();
125
- Array.isArray(o) ? s.push(...o) : console.warn("getErrors() returned non-array value:", o);
126
- } catch (o) {
127
- console.error("Error calling getErrors on component:", o, r);
130
+ const n = s.getErrors();
131
+ Array.isArray(n) ? o.push(...n) : console.warn("getErrors() returned non-array value:", n);
132
+ } catch (n) {
133
+ console.error("Error calling getErrors on component:", n, s);
128
134
  }
129
135
  else
130
- console.warn("Component does not have getErrors function:", r);
131
- return s.every(me);
136
+ console.warn("Component does not have getErrors function:", s);
137
+ return o.every(he);
132
138
  }
133
- function n() {
134
- t.value.forEach((s) => {
135
- typeof (s == null ? void 0 : s.onReset) == "function" && s.onReset();
139
+ function l() {
140
+ t.value.forEach((o) => {
141
+ typeof (o == null ? void 0 : o.onReset) == "function" && o.onReset();
136
142
  });
137
143
  }
138
144
  function e() {
139
- const s = [];
140
- for (const r of t.value)
141
- if (typeof (r == null ? void 0 : r.getErrors) == "function")
145
+ const o = [];
146
+ for (const s of t.value)
147
+ if (typeof (s == null ? void 0 : s.getErrors) == "function")
142
148
  try {
143
- const o = r.getErrors();
144
- Array.isArray(o) ? s.push(...o) : s.push(String(o));
145
- } catch (o) {
146
- console.error("Error calling getErrors on component:", o, r);
149
+ const n = s.getErrors();
150
+ Array.isArray(n) ? o.push(...n) : o.push(String(n));
151
+ } catch (n) {
152
+ console.error("Error calling getErrors on component:", n, s);
147
153
  }
148
- return s;
154
+ return o;
149
155
  }
150
- async function l() {
151
- for (const s of t.value)
152
- typeof (s == null ? void 0 : s.onValueUpdate) == "function" && await s.onValueUpdate();
156
+ async function a() {
157
+ for (const o of t.value)
158
+ typeof (o == null ? void 0 : o.onValueUpdate) == "function" && await o.onValueUpdate();
153
159
  }
154
160
  return {
155
161
  dynamicRefs: t,
156
- isFormValid: u,
157
- resetForm: n,
162
+ isFormValid: r,
163
+ resetForm: l,
158
164
  getFormErrors: e,
159
- updateFormValues: l
165
+ updateFormValues: a
160
166
  };
161
167
  }
162
- function Qe(t) {
163
- const u = S(
164
- () => Object.entries(t.value).reduce((p, [c, v]) => (v.value !== void 0 && (typeof v.onChange == "function" ? p[c] = v.onChange(v.value, t.value) : p[c] = v.value), p), {})
165
- ), n = E({}), e = (p, c, v) => {
166
- var i;
167
- return typeof ((i = t.value[p].children[c]) == null ? void 0 : i.computedValue) == "function" ? t.value[p].children[c].computedValue(v, t.value) : v;
168
- }, l = (p, c, v, i) => {
169
- n.value[p][i] || (n.value[p][i] = {}), Object.entries(c.other ?? {}).forEach(([h, C]) => {
168
+ function et(t) {
169
+ const r = k(
170
+ () => Object.entries(t.value).reduce((d, [p, f]) => (G(f) && f.value !== void 0 && (typeof f.onChange == "function" ? d[p] = f.onChange(f.value, t.value) : d[p] = f.value), d), {})
171
+ ), l = E({}), e = (d, p, f) => {
172
+ const i = t.value[d];
173
+ if (G(i) && i.children) {
174
+ const h = i.children[p];
175
+ if (h && G(h) && typeof h.computedValue == "function")
176
+ return h.computedValue(f, t.value);
177
+ }
178
+ return f;
179
+ }, a = (d, p, f, i) => {
180
+ l.value[d][i] || (l.value[d][i] = {}), Object.entries(p.other ?? {}).forEach(([h, C]) => {
170
181
  var w;
171
- !oe(C, (w = v.other) == null ? void 0 : w[h]) && (n.value[p][i][h] = e(p, h, C));
182
+ !se(C, (w = f.other) == null ? void 0 : w[h]) && (l.value[d][i][h] = e(d, h, C));
172
183
  });
173
- }, s = (p, c, v) => {
174
- c.forEach((i, h) => {
175
- const C = v[h] ?? { other: {} };
176
- l(p, i, C, h);
184
+ }, o = (d, p, f) => {
185
+ p.forEach((i, h) => {
186
+ const C = f[h] ?? { other: {} };
187
+ a(d, i, C, h);
177
188
  });
178
- }, r = (p, { other: c }) => Object.entries(c ?? {}).reduce(
179
- (v, [i, h]) => (v[i] = e(p, i, h), v),
189
+ }, s = (d, { other: p }) => Object.entries(p ?? {}).reduce(
190
+ (f, [i, h]) => (f[i] = e(d, i, h), f),
180
191
  {}
181
- ), o = (p, c, v) => {
182
- n.value[p] || (n.value[p] = []);
183
- const i = c;
184
- Array.isArray(v[p]) ? s(p, i, v[p]) : n.value[p] = i.map((h) => r(p, h));
185
- }, y = (p, c, v) => {
186
- if (!c) {
187
- delete n.value[p];
192
+ ), n = (d, p, f) => {
193
+ l.value[d] || (l.value[d] = []);
194
+ const i = p;
195
+ Array.isArray(f[d]) ? o(d, i, f[d]) : l.value[d] = i.map((h) => s(d, h));
196
+ }, y = (d, p, f) => {
197
+ if (!p) {
198
+ delete l.value[d];
188
199
  return;
189
200
  }
190
- const i = t.value[p];
191
- i.children !== void 0 ? o(p, c, v) : typeof i.computedValue == "function" && (n.value[p] = i.computedValue(c, t.value));
201
+ const i = t.value[d];
202
+ G(i) && (i.children !== void 0 ? n(d, p, f) : typeof i.computedValue == "function" && (l.value[d] = i.computedValue(p, t.value)));
192
203
  };
193
- return D(
194
- u,
195
- (p, c = {}) => {
196
- Object.keys(p).forEach((v) => {
197
- oe(p[v], c[v]) || y(v, p[v], c);
198
- }), Object.keys(c).forEach((v) => {
199
- !(v in p) && v in n.value && delete n.value[v];
204
+ return T(
205
+ r,
206
+ (d, p = {}) => {
207
+ Object.keys(d).forEach((f) => {
208
+ se(d[f], p[f]) || y(f, d[f], p);
209
+ }), Object.keys(p).forEach((f) => {
210
+ !(f in d) && f in l.value && delete l.value[f];
200
211
  });
201
212
  },
202
213
  {
@@ -204,84 +215,86 @@ function Qe(t) {
204
215
  deep: !0
205
216
  }
206
217
  ), {
207
- formData: u,
208
- computedData: n
218
+ formData: r,
219
+ computedData: l
209
220
  };
210
221
  }
211
- function Xe(t) {
212
- const u = E(0), n = E({}), e = E({}), l = E({});
213
- function s(V) {
214
- const a = {};
215
- return Object.entries(V.schema).forEach(([m, _]) => {
216
- a[m] = _.value;
217
- }), a;
222
+ function tt(t) {
223
+ const r = E(0), l = E({}), e = E({}), a = E({});
224
+ function o(V) {
225
+ const m = {};
226
+ return Object.entries(V.schema).forEach(
227
+ ([u, g]) => {
228
+ G(g) && (m[u] = g.value);
229
+ }
230
+ ), m;
218
231
  }
219
232
  t.steps.forEach((V) => {
220
- n.value[V.id] = s(V), e.value[V.id] = {}, l.value[V.id] = [];
233
+ l.value[V.id] = o(V), e.value[V.id] = {}, a.value[V.id] = [];
221
234
  });
222
- const r = S(() => t.steps[u.value]), o = S(() => u.value === 0), y = S(() => u.value === t.steps.length - 1), p = S(() => !y.value), c = S(() => !o.value), v = S(() => t.steps.length), i = S(() => v.value === 0 ? 0 : Math.round((u.value + 1) / v.value * 100)), h = S(() => {
235
+ const s = k(() => t.steps[r.value]), n = k(() => r.value === 0), y = k(() => r.value === t.steps.length - 1), d = k(() => !y.value), p = k(() => !n.value), f = k(() => t.steps.length), i = k(() => f.value === 0 ? 0 : Math.round((r.value + 1) / f.value * 100)), h = k(() => {
223
236
  const V = {};
224
- return Object.values(n.value).forEach((a) => {
225
- Object.assign(V, a);
237
+ return Object.values(l.value).forEach((m) => {
238
+ Object.assign(V, m);
226
239
  }), V;
227
- }), C = S(() => {
240
+ }), C = k(() => {
228
241
  const V = {};
229
- return Object.values(e.value).forEach((a) => {
230
- Object.assign(V, a);
242
+ return Object.values(e.value).forEach((m) => {
243
+ Object.assign(V, m);
231
244
  }), V;
232
245
  });
233
- function x(V, a) {
234
- n.value[V] = { ...n.value[V], ...a };
246
+ function F(V, m) {
247
+ l.value[V] = { ...l.value[V], ...m };
235
248
  }
236
- function w(V, a) {
237
- e.value[V] = { ...e.value[V], ...a };
249
+ function w(V, m) {
250
+ e.value[V] = { ...e.value[V], ...m };
238
251
  }
239
252
  function R(V) {
240
- const a = t.steps.find((m) => m.id === V);
241
- a && (n.value[V] = s(a), e.value[V] = {});
253
+ const m = t.steps.find((u) => u.id === V);
254
+ m && (l.value[V] = o(m), e.value[V] = {});
242
255
  }
243
- async function F() {
244
- const V = r.value;
256
+ async function z() {
257
+ const V = s.value;
245
258
  if (!V) return !0;
246
- const a = [];
259
+ const m = [];
247
260
  if (V.validation) {
248
- const m = await V.validation(
249
- n.value[V.id],
261
+ const u = await V.validation(
262
+ l.value[V.id],
250
263
  e.value[V.id]
251
264
  );
252
- m && a.push(...m);
265
+ u && m.push(...u);
253
266
  }
254
- return l.value[V.id] = a, a.length === 0;
267
+ return a.value[V.id] = m, m.length === 0;
255
268
  }
256
- async function j(V) {
257
- return V < 0 || V >= t.steps.length || V > u.value && !await F() ? !1 : (u.value = V, !0);
269
+ async function N(V) {
270
+ return V < 0 || V >= t.steps.length || V > r.value && !await z() ? !1 : (r.value = V, !0);
258
271
  }
259
- async function W() {
260
- return p.value ? j(u.value + 1) : !1;
272
+ async function Z() {
273
+ return d.value ? N(r.value + 1) : !1;
261
274
  }
262
- async function J() {
263
- return c.value ? j(u.value - 1) : !1;
275
+ async function Q() {
276
+ return p.value ? N(r.value - 1) : !1;
264
277
  }
265
- function Z() {
266
- u.value = 0, l.value = {}, t.steps.forEach((V) => {
267
- R(V.id), l.value[V.id] = [];
278
+ function J() {
279
+ r.value = 0, a.value = {}, t.steps.forEach((V) => {
280
+ R(V.id), a.value[V.id] = [];
268
281
  });
269
282
  }
270
283
  async function q() {
271
284
  let V = !0;
272
- for (const a of t.steps)
273
- if (a.validation) {
274
- const m = await a.validation(
275
- n.value[a.id],
276
- e.value[a.id]
285
+ for (const m of t.steps)
286
+ if (m.validation) {
287
+ const u = await m.validation(
288
+ l.value[m.id],
289
+ e.value[m.id]
277
290
  );
278
- l.value[a.id] = m || [], m && m.length > 0 && (V = !1);
291
+ a.value[m.id] = u || [], u && u.length > 0 && (V = !1);
279
292
  }
280
293
  return V;
281
294
  }
282
295
  function L() {
283
296
  return {
284
- steps: { ...n.value },
297
+ steps: { ...l.value },
285
298
  computedSteps: { ...e.value },
286
299
  allFormData: h.value,
287
300
  allComputedData: C.value
@@ -289,40 +302,40 @@ function Xe(t) {
289
302
  }
290
303
  return {
291
304
  // State
292
- currentStepIndex: u,
293
- currentStep: r,
294
- stepData: n,
305
+ currentStepIndex: r,
306
+ currentStep: s,
307
+ stepData: l,
295
308
  stepComputedData: e,
296
- stepValidationErrors: l,
309
+ stepValidationErrors: a,
297
310
  // Computed
298
- isFirstStep: o,
311
+ isFirstStep: n,
299
312
  isLastStep: y,
300
- canGoNext: p,
301
- canGoPrevious: c,
302
- totalSteps: v,
313
+ canGoNext: d,
314
+ canGoPrevious: p,
315
+ totalSteps: f,
303
316
  progressPercentage: i,
304
317
  allFormData: h,
305
318
  allComputedData: C,
306
319
  // Methods
307
- updateStepData: x,
320
+ updateStepData: F,
308
321
  updateStepComputedData: w,
309
322
  clearStepData: R,
310
- validateCurrentStep: F,
311
- goToStep: j,
312
- nextStep: W,
313
- previousStep: J,
314
- resetForm: Z,
323
+ validateCurrentStep: z,
324
+ goToStep: N,
325
+ nextStep: Z,
326
+ previousStep: Q,
327
+ resetForm: J,
315
328
  validateAllSteps: q,
316
329
  getMultiStepFormData: L
317
330
  };
318
331
  }
319
- const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { class: "step-indicator__step-content" }, lt = { class: "step-indicator__step-marker" }, at = { class: "step-indicator__step-info" }, nt = { class: "step-indicator__step-title" }, ot = {
332
+ const lt = { class: "step-indicator__container" }, at = ["onClick"], nt = { class: "step-indicator__step-content" }, ot = { class: "step-indicator__step-marker" }, ut = { class: "step-indicator__step-info" }, st = { class: "step-indicator__step-title" }, rt = {
320
333
  key: 0,
321
334
  class: "step-indicator__step-subtitle"
322
- }, ut = {
335
+ }, it = {
323
336
  key: 0,
324
337
  class: "step-indicator__progress"
325
- }, st = { class: "step-indicator__progress-bar" }, rt = { class: "step-indicator__progress-text" }, it = /* @__PURE__ */ T({
338
+ }, ct = { class: "step-indicator__progress-bar" }, dt = { class: "step-indicator__progress-text" }, pt = /* @__PURE__ */ D({
326
339
  __name: "StepIndicator",
327
340
  props: {
328
341
  steps: {},
@@ -332,62 +345,62 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
332
345
  allowNavigation: { type: Boolean, default: !1 }
333
346
  },
334
347
  emits: ["step-click"],
335
- setup(t, { emit: u }) {
336
- const n = t, e = u, l = S(() => n.steps.length === 0 ? 0 : (n.activeStepIndex + 1) / n.steps.length * 100);
337
- function s(r) {
338
- n.allowNavigation && e("step-click", r);
348
+ setup(t, { emit: r }) {
349
+ const l = t, e = r, a = k(() => l.steps.length === 0 ? 0 : (l.activeStepIndex + 1) / l.steps.length * 100);
350
+ function o(s) {
351
+ l.allowNavigation && e("step-click", s);
339
352
  }
340
- return (r, o) => (f(), $("div", {
341
- class: ne(["step-indicator", [`step-indicator--${r.position}`, { "step-indicator--clickable": r.allowNavigation }]])
353
+ return (s, n) => (v(), $("div", {
354
+ class: le(["step-indicator", [`step-indicator--${s.position}`, { "step-indicator--clickable": s.allowNavigation }]])
342
355
  }, [
343
- B("div", Ye, [
344
- (f(!0), $(M, null, K(r.steps, (y, p) => (f(), $("div", {
356
+ I("div", lt, [
357
+ (v(!0), $(M, null, W(s.steps, (y, d) => (v(), $("div", {
345
358
  key: y.id,
346
- class: ne(["step-indicator__step", {
347
- "step-indicator__step--active": p === r.activeStepIndex,
348
- "step-indicator__step--completed": p < r.activeStepIndex,
349
- "step-indicator__step--clickable": r.allowNavigation
359
+ class: le(["step-indicator__step", {
360
+ "step-indicator__step--active": d === s.activeStepIndex,
361
+ "step-indicator__step--completed": d < s.activeStepIndex,
362
+ "step-indicator__step--clickable": s.allowNavigation
350
363
  }]),
351
- onClick: (c) => s(p)
364
+ onClick: (p) => o(d)
352
365
  }, [
353
- B("div", tt, [
354
- B("div", lt, [
355
- B("span", null, A(p + 1), 1)
366
+ I("div", nt, [
367
+ I("div", ot, [
368
+ I("span", null, A(d + 1), 1)
356
369
  ]),
357
- B("div", at, [
358
- B("div", nt, A(y.title), 1),
359
- y.subtitle ? (f(), $("div", ot, A(y.subtitle), 1)) : O("", !0)
370
+ I("div", ut, [
371
+ I("div", st, A(y.title), 1),
372
+ y.subtitle ? (v(), $("div", rt, A(y.subtitle), 1)) : O("", !0)
360
373
  ])
361
374
  ]),
362
- p < r.steps.length - 1 ? (f(), $("div", {
375
+ d < s.steps.length - 1 ? (v(), $("div", {
363
376
  key: 0,
364
- class: ne(["step-indicator__connector", { "step-indicator__connector--completed": p < r.activeStepIndex }])
377
+ class: le(["step-indicator__connector", { "step-indicator__connector--completed": d < s.activeStepIndex }])
365
378
  }, null, 2)) : O("", !0)
366
- ], 10, et))), 128))
379
+ ], 10, at))), 128))
367
380
  ]),
368
- r.showProgress && (r.position === "top" || r.position === "bottom") ? (f(), $("div", ut, [
369
- B("div", st, [
370
- B("div", {
381
+ s.showProgress && (s.position === "top" || s.position === "bottom") ? (v(), $("div", it, [
382
+ I("div", ct, [
383
+ I("div", {
371
384
  class: "step-indicator__progress-fill",
372
- style: ve({ width: `${l.value}%` })
385
+ style: fe({ width: `${a.value}%` })
373
386
  }, null, 4)
374
387
  ]),
375
- B("div", rt, " Step " + A(r.activeStepIndex + 1) + " of " + A(r.steps.length), 1)
388
+ I("div", dt, " Step " + A(s.activeStepIndex + 1) + " of " + A(s.steps.length), 1)
376
389
  ])) : O("", !0)
377
390
  ], 2));
378
391
  }
379
- }), de = (t, u) => {
380
- const n = t.__vccOpts || t;
381
- for (const [e, l] of u)
382
- n[e] = l;
383
- return n;
384
- }, re = /* @__PURE__ */ de(it, [["__scopeId", "data-v-aca1a6d0"]]), ct = { class: "v-form-container" }, dt = {
392
+ }), re = (t, r) => {
393
+ const l = t.__vccOpts || t;
394
+ for (const [e, a] of r)
395
+ l[e] = a;
396
+ return l;
397
+ }, de = /* @__PURE__ */ re(pt, [["__scopeId", "data-v-aca1a6d0"]]), vt = { class: "v-form-container" }, ft = {
385
398
  key: 0,
386
399
  class: "multi-step-form"
387
- }, pt = { class: "multi-step-form-content" }, vt = { class: "step-nav-buttons" }, ft = { class: "step-action-buttons" }, mt = { class: "step-nav-buttons" }, ht = {
400
+ }, mt = { class: "multi-step-form-content" }, ht = { class: "step-nav-buttons" }, gt = { class: "step-action-buttons" }, yt = { class: "step-nav-buttons" }, _t = {
388
401
  key: 1,
389
402
  class: "step-progress-bottom"
390
- }, gt = { class: "step-progress-bar" }, yt = { class: "step-progress-text" }, Ct = /* @__PURE__ */ T({
403
+ }, Ct = { class: "step-progress-bar" }, Vt = { class: "step-progress-text" }, bt = /* @__PURE__ */ D({
391
404
  __name: "vForm",
392
405
  props: {
393
406
  schema: {},
@@ -403,86 +416,90 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
403
416
  customButtons: {}
404
417
  },
405
418
  emits: ["submit", "multi-step-submit", "step-change", "clear", "cancel"],
406
- setup(t, { expose: u, emit: n }) {
407
- const e = t, l = n, s = S(() => !!e.multiStepConfig), r = E(e.schema || {}), o = e.multiStepConfig ? Xe(e.multiStepConfig) : null, { dynamicRefs: y, isFormValid: p, resetForm: c } = Se(), { formData: v, computedData: i } = Qe(r), h = S(() => (o == null ? void 0 : o.currentStepIndex.value) ?? 0), C = S(() => o == null ? void 0 : o.currentStep.value), x = S(() => (o == null ? void 0 : o.isLastStep.value) ?? !0), w = S(() => (o == null ? void 0 : o.canGoNext.value) ?? !1), R = S(() => (o == null ? void 0 : o.canGoPrevious.value) ?? !1), F = S(() => !s.value || !o ? 0 : o.progressPercentage.value);
408
- D(
419
+ setup(t, { expose: r, emit: l }) {
420
+ const e = t, a = l, o = k(() => !!e.multiStepConfig), s = E(e.schema || {}), n = e.multiStepConfig ? tt(e.multiStepConfig) : null, { dynamicRefs: y, isFormValid: d, resetForm: p } = Oe(), { formData: f, computedData: i } = et(s), h = k(() => (n == null ? void 0 : n.currentStepIndex.value) ?? 0), C = k(() => n == null ? void 0 : n.currentStep.value), F = k(() => (n == null ? void 0 : n.isLastStep.value) ?? !0), w = k(() => (n == null ? void 0 : n.canGoNext.value) ?? !1), R = k(() => (n == null ? void 0 : n.canGoPrevious.value) ?? !1), z = k(() => !o.value || !n ? 0 : n.progressPercentage.value);
421
+ T(
409
422
  () => C.value,
410
- (a) => {
411
- a && s.value && (r.value = a.schema);
423
+ (u) => {
424
+ u && o.value && (s.value = u.schema);
412
425
  },
413
426
  { immediate: !0 }
414
- ), D(
415
- [v, i],
416
- ([a, m]) => {
417
- s.value && o && C.value && (o.updateStepData(C.value.id, a), o.updateStepComputedData(C.value.id, m));
427
+ ), T(
428
+ [f, i],
429
+ ([u, g]) => {
430
+ o.value && n && C.value && (n.updateStepData(C.value.id, u), n.updateStepComputedData(C.value.id, g));
418
431
  },
419
432
  { deep: !0 }
420
- ), D(
433
+ ), T(
421
434
  () => e.schema,
422
- (a) => {
423
- if (!s.value && a) {
424
- r.value = a;
425
- for (const [m, _] of Object.entries(a))
426
- _.value !== void 0 && (r.value[m].value = _.value);
435
+ (u) => {
436
+ if (!o.value && u) {
437
+ s.value = u;
438
+ for (const [g, x] of Object.entries(u))
439
+ G(x) && "value" in x && x.value !== void 0 && (s.value[g].value = x.value);
427
440
  }
428
441
  },
429
442
  { deep: !0, immediate: !0 }
430
443
  );
431
- async function j() {
432
- if (s.value && o) {
433
- if (!await o.validateAllSteps()) return;
434
- const m = o.getMultiStepFormData();
435
- l("multi-step-submit", m);
444
+ async function N() {
445
+ if (o.value && n) {
446
+ if (!await n.validateAllSteps()) return;
447
+ const g = n.getMultiStepFormData();
448
+ a("multi-step-submit", g);
436
449
  } else {
437
- if (!await p()) return;
438
- l("submit", v.value, i.value);
450
+ if (!await d()) return;
451
+ a("submit", f.value, i.value);
439
452
  }
440
453
  }
441
- function W() {
442
- s.value && o ? o.resetForm() : c(), l("clear");
454
+ function Z() {
455
+ o.value && n ? n.resetForm() : p(), a("clear");
443
456
  }
444
- function J() {
445
- s.value && o && C.value && o.clearStepData(C.value.id);
457
+ function Q() {
458
+ o.value && n && C.value && n.clearStepData(C.value.id);
446
459
  }
447
- function Z() {
448
- s.value && o ? o.resetForm() : c(), l("cancel");
460
+ function J() {
461
+ o.value && n ? n.resetForm() : p(), a("cancel");
449
462
  }
450
463
  async function q() {
451
- if (o) {
452
- if (!await p())
464
+ if (n) {
465
+ if (!await d())
453
466
  return;
454
- await o.nextStep() && C.value && l("step-change", h.value, C.value.id);
467
+ await n.nextStep() && C.value && a("step-change", h.value, C.value.id);
455
468
  }
456
469
  }
457
470
  async function L() {
458
- o && await o.previousStep() && C.value && l("step-change", h.value, C.value.id);
471
+ n && await n.previousStep() && C.value && a("step-change", h.value, C.value.id);
459
472
  }
460
- async function V(a) {
461
- if (o) {
462
- if (a > h.value && !await p())
473
+ async function V(u) {
474
+ if (n) {
475
+ if (u > h.value && !await d())
463
476
  return;
464
- await o.goToStep(a) && C.value && l("step-change", a, C.value.id);
477
+ await n.goToStep(u) && C.value && a("step-change", u, C.value.id);
465
478
  }
466
479
  }
467
- return D(
468
- v,
480
+ T(
481
+ f,
469
482
  async () => {
470
- var a;
471
- for (const [m, _] of Object.entries(r.value))
472
- if (!ie(_, v.value, i.value)) {
473
- const g = s.value && C.value ? C.value.schema[m] : (a = e.schema) == null ? void 0 : a[m];
474
- g && (_.value = g.value);
483
+ var u;
484
+ for (const [g, x] of Object.entries(s.value))
485
+ if (G(x) && !ge(x, f.value, i.value)) {
486
+ const _ = o.value && C.value ? C.value.schema[g] : (u = e.schema) == null ? void 0 : u[g];
487
+ _ && G(_) && "value" in _ && (x.value = _.value);
475
488
  }
476
489
  },
477
490
  {
478
491
  deep: !0,
479
492
  immediate: !0
480
493
  }
481
- ), u({
482
- resetForm: W,
483
- isFormValid: p,
484
- resolveData: () => s.value && o ? o.getMultiStepFormData() : {
485
- formData: v.value,
494
+ );
495
+ function m(u, g, x) {
496
+ return Ye(u) ? !0 : ge(u, g, x);
497
+ }
498
+ return r({
499
+ resetForm: Z,
500
+ isFormValid: d,
501
+ resolveData: () => o.value && n ? n.getMultiStepFormData() : {
502
+ formData: f.value,
486
503
  computedData: i.value
487
504
  },
488
505
  // Multi-step specific methods
@@ -491,143 +508,143 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
491
508
  goToStep: V,
492
509
  getCurrentStep: () => C.value,
493
510
  getCurrentStepIndex: () => h.value
494
- }), (a, m) => {
495
- var _;
496
- return f(), $("div", ct, [
497
- s.value ? (f(), $("div", dt, [
498
- a.multiStepConfig && a.multiStepConfig.stepPosition === "top" ? (f(), b(re, {
511
+ }), (u, g) => {
512
+ var x;
513
+ return v(), $("div", vt, [
514
+ o.value ? (v(), $("div", ft, [
515
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "top" ? (v(), b(de, {
499
516
  key: 0,
500
- steps: a.multiStepConfig.steps,
517
+ steps: u.multiStepConfig.steps,
501
518
  "active-step-index": h.value,
502
- position: a.multiStepConfig.stepPosition || "top",
503
- "show-progress": a.multiStepConfig.showProgress,
504
- "allow-navigation": a.multiStepConfig.allowStepNavigation,
519
+ position: u.multiStepConfig.stepPosition || "top",
520
+ "show-progress": u.multiStepConfig.showProgress,
521
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
505
522
  onStepClick: V
506
523
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0),
507
- B("div", {
508
- class: ne(["multi-step-content", `multi-step-content--${((_ = a.multiStepConfig) == null ? void 0 : _.stepPosition) || "top"}`])
524
+ I("div", {
525
+ class: le(["multi-step-content", `multi-step-content--${((x = u.multiStepConfig) == null ? void 0 : x.stepPosition) || "top"}`])
509
526
  }, [
510
- a.multiStepConfig && a.multiStepConfig.stepPosition === "left" ? (f(), b(re, {
527
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "left" ? (v(), b(de, {
511
528
  key: 0,
512
- steps: a.multiStepConfig.steps,
529
+ steps: u.multiStepConfig.steps,
513
530
  "active-step-index": h.value,
514
- position: a.multiStepConfig.stepPosition ?? "top",
515
- "show-progress": a.multiStepConfig.showProgress,
516
- "allow-navigation": a.multiStepConfig.allowStepNavigation,
531
+ position: u.multiStepConfig.stepPosition ?? "top",
532
+ "show-progress": u.multiStepConfig.showProgress,
533
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
517
534
  onStepClick: V,
518
535
  class: "multi-step-sidebar"
519
536
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0),
520
- B("div", pt, [
521
- I(d(Ve), null, {
522
- default: k(() => [
523
- I(d(le), null, {
524
- default: k(() => [
525
- (f(!0), $(M, null, K(Object.keys(r.value), (g) => {
526
- var P, U, Q, ee, te;
527
- return f(), $(M, null, [
528
- d(ie)(r.value[g], d(v), d(i)) ? (f(), b(d(ae), {
529
- key: g,
530
- size: ((P = r.value[g].grid) == null ? void 0 : P.xs) ?? "12",
531
- "size-sm": (U = r.value[g].grid) == null ? void 0 : U.sm,
532
- "size-md": (Q = r.value[g].grid) == null ? void 0 : Q.md,
533
- "size-lg": (ee = r.value[g].grid) == null ? void 0 : ee.lg,
534
- "size-xl": (te = r.value[g].grid) == null ? void 0 : te.xl,
537
+ I("div", mt, [
538
+ P(c(be), null, {
539
+ default: S(() => [
540
+ P(c(ue), null, {
541
+ default: S(() => [
542
+ (v(!0), $(M, null, W(Object.keys(s.value), (_) => {
543
+ var U, X, ae, ne, oe;
544
+ return v(), $(M, { key: _ }, [
545
+ m(s.value[_], c(f), c(i)) ? (v(), b(c(te), {
546
+ key: 0,
547
+ size: ((U = s.value[_].grid) == null ? void 0 : U.xs) ?? "12",
548
+ "size-sm": (X = s.value[_].grid) == null ? void 0 : X.sm,
549
+ "size-md": (ae = s.value[_].grid) == null ? void 0 : ae.md,
550
+ "size-lg": (ne = s.value[_].grid) == null ? void 0 : ne.lg,
551
+ "size-xl": (oe = s.value[_].grid) == null ? void 0 : oe.xl,
535
552
  class: "ion-margin-vertical"
536
553
  }, {
537
- default: k(() => [
538
- (f(), b(fe(r.value[g].type), {
539
- modelValue: r.value[g],
540
- "onUpdate:modelValue": (pe) => r.value[g] = pe,
541
- schema: r.value,
542
- "form-id": g,
554
+ default: S(() => [
555
+ (v(), b(me(s.value[_].type), {
556
+ modelValue: s.value[_],
557
+ "onUpdate:modelValue": (ve) => s.value[_] = ve,
558
+ schema: s.value,
559
+ "form-id": _,
543
560
  ref_for: !0,
544
561
  ref_key: "dynamicRefs",
545
562
  ref: y,
546
- "ref-key": g
563
+ "ref-key": _
547
564
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
548
565
  ]),
549
566
  _: 2
550
567
  }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : O("", !0)
551
568
  ], 64);
552
- }), 256))
569
+ }), 128))
553
570
  ]),
554
571
  _: 1
555
572
  })
556
573
  ]),
557
574
  _: 1
558
575
  }),
559
- a.hideButtons ? O("", !0) : (f(), b(d(le), {
576
+ u.hideButtons ? O("", !0) : (v(), b(c(ue), {
560
577
  key: 0,
561
578
  class: "multi-step-buttons"
562
579
  }, {
563
- default: k(() => [
564
- I(d(ae), {
580
+ default: S(() => [
581
+ P(c(te), {
565
582
  size: "12",
566
583
  class: "button-container"
567
584
  }, {
568
- default: k(() => [
569
- B("div", vt, [
570
- R.value ? (f(), b(d(N), {
585
+ default: S(() => [
586
+ I("div", ht, [
587
+ R.value ? (v(), b(c(j), {
571
588
  key: 0,
572
589
  onClick: L,
573
590
  fill: "outline"
574
591
  }, {
575
- default: k(() => m[0] || (m[0] = [
576
- z(" Previous ")
592
+ default: S(() => g[0] || (g[0] = [
593
+ B(" Previous ")
577
594
  ])),
578
595
  _: 1,
579
596
  __: [0]
580
597
  })) : O("", !0)
581
598
  ]),
582
- B("div", ft, [
583
- a.showCancelButton ? (f(), b(d(N), {
599
+ I("div", gt, [
600
+ u.showCancelButton ? (v(), b(c(j), {
584
601
  key: 0,
585
- onClick: Z,
602
+ onClick: J,
586
603
  fill: "outline"
587
604
  }, {
588
- default: k(() => [
589
- z(A(a.cancelButtonText ?? "Cancel"), 1)
605
+ default: S(() => [
606
+ B(A(u.cancelButtonText ?? "Cancel"), 1)
590
607
  ]),
591
608
  _: 1
592
609
  })) : O("", !0),
593
- a.showClearButton ? (f(), b(d(N), {
610
+ u.showClearButton ? (v(), b(c(j), {
594
611
  key: 1,
595
- onClick: J,
612
+ onClick: Q,
596
613
  fill: "outline"
597
614
  }, {
598
- default: k(() => [
599
- z(A(a.clearButtonText ?? "Reset"), 1)
615
+ default: S(() => [
616
+ B(A(u.clearButtonText ?? "Reset"), 1)
600
617
  ]),
601
618
  _: 1
602
619
  })) : O("", !0),
603
- (f(!0), $(M, null, K(a.customButtons, (g) => (f(), b(d(N), {
604
- key: g.label,
605
- onClick: g.action,
606
- color: g.color ?? "primary"
620
+ (v(!0), $(M, null, W(u.customButtons, (_) => (v(), b(c(j), {
621
+ key: _.label,
622
+ onClick: _.action,
623
+ color: _.color ?? "primary"
607
624
  }, {
608
- default: k(() => [
609
- z(A(g.label), 1)
625
+ default: S(() => [
626
+ B(A(_.label), 1)
610
627
  ]),
611
628
  _: 2
612
629
  }, 1032, ["onClick", "color"]))), 128))
613
630
  ]),
614
- B("div", mt, [
615
- w.value ? (f(), b(d(N), {
631
+ I("div", yt, [
632
+ w.value ? (v(), b(c(j), {
616
633
  key: 0,
617
634
  onClick: q
618
635
  }, {
619
- default: k(() => m[1] || (m[1] = [
620
- z(" Next ")
636
+ default: S(() => g[1] || (g[1] = [
637
+ B(" Next ")
621
638
  ])),
622
639
  _: 1,
623
640
  __: [1]
624
641
  })) : O("", !0),
625
- x.value ? (f(), b(d(N), {
642
+ F.value ? (v(), b(c(j), {
626
643
  key: 1,
627
- onClick: j
644
+ onClick: N
628
645
  }, {
629
- default: k(() => [
630
- z(A(a.submitButtonText ?? "Submit"), 1)
646
+ default: S(() => [
647
+ B(A(u.submitButtonText ?? "Submit"), 1)
631
648
  ]),
632
649
  _: 1
633
650
  })) : O("", !0)
@@ -638,109 +655,109 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
638
655
  ]),
639
656
  _: 1
640
657
  })),
641
- a.multiStepConfig && (a.multiStepConfig.stepPosition === "left" || a.multiStepConfig.stepPosition === "right") && a.multiStepConfig.showProgress ? (f(), $("div", ht, [
642
- B("div", gt, [
643
- B("div", {
658
+ u.multiStepConfig && (u.multiStepConfig.stepPosition === "left" || u.multiStepConfig.stepPosition === "right") && u.multiStepConfig.showProgress ? (v(), $("div", _t, [
659
+ I("div", Ct, [
660
+ I("div", {
644
661
  class: "step-progress-fill",
645
- style: ve({ width: `${F.value}%` })
662
+ style: fe({ width: `${z.value}%` })
646
663
  }, null, 4)
647
664
  ]),
648
- B("div", yt, " Step " + A(h.value + 1) + " of " + A(a.multiStepConfig.steps.length), 1)
665
+ I("div", Vt, " Step " + A(h.value + 1) + " of " + A(u.multiStepConfig.steps.length), 1)
649
666
  ])) : O("", !0)
650
667
  ]),
651
- a.multiStepConfig && a.multiStepConfig.stepPosition === "right" ? (f(), b(re, {
668
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "right" ? (v(), b(de, {
652
669
  key: 1,
653
- steps: a.multiStepConfig.steps,
670
+ steps: u.multiStepConfig.steps,
654
671
  "active-step-index": h.value,
655
- position: a.multiStepConfig.stepPosition,
656
- "show-progress": a.multiStepConfig.showProgress,
657
- "allow-navigation": a.multiStepConfig.allowStepNavigation,
672
+ position: u.multiStepConfig.stepPosition,
673
+ "show-progress": u.multiStepConfig.showProgress,
674
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
658
675
  onStepClick: V,
659
676
  class: "multi-step-sidebar"
660
677
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0)
661
678
  ], 2),
662
- a.multiStepConfig && a.multiStepConfig.stepPosition === "bottom" ? (f(), b(re, {
679
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "bottom" ? (v(), b(de, {
663
680
  key: 1,
664
- steps: a.multiStepConfig.steps,
681
+ steps: u.multiStepConfig.steps,
665
682
  "active-step-index": h.value,
666
- position: a.multiStepConfig.stepPosition,
667
- "show-progress": a.multiStepConfig.showProgress,
668
- "allow-navigation": a.multiStepConfig.allowStepNavigation,
683
+ position: u.multiStepConfig.stepPosition,
684
+ "show-progress": u.multiStepConfig.showProgress,
685
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
669
686
  onStepClick: V
670
687
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0)
671
- ])) : (f(), b(d(Ve), { key: 1 }, {
672
- default: k(() => [
673
- I(d(le), null, {
674
- default: k(() => [
675
- (f(!0), $(M, null, K(Object.keys(r.value), (g) => {
676
- var P, U, Q, ee, te;
677
- return f(), $(M, null, [
678
- d(ie)(r.value[g], d(v), d(i)) ? (f(), b(d(ae), {
679
- key: g,
680
- size: ((P = r.value[g].grid) == null ? void 0 : P.xs) ?? "12",
681
- "size-sm": (U = r.value[g].grid) == null ? void 0 : U.sm,
682
- "size-md": (Q = r.value[g].grid) == null ? void 0 : Q.md,
683
- "size-lg": (ee = r.value[g].grid) == null ? void 0 : ee.lg,
684
- "size-xl": (te = r.value[g].grid) == null ? void 0 : te.xl,
688
+ ])) : (v(), b(c(be), { key: 1 }, {
689
+ default: S(() => [
690
+ P(c(ue), null, {
691
+ default: S(() => [
692
+ (v(!0), $(M, null, W(Object.keys(s.value), (_) => {
693
+ var U, X, ae, ne, oe;
694
+ return v(), $(M, { key: _ }, [
695
+ m(s.value[_], c(f), c(i)) ? (v(), b(c(te), {
696
+ key: 0,
697
+ size: ((U = s.value[_].grid) == null ? void 0 : U.xs) ?? "12",
698
+ "size-sm": (X = s.value[_].grid) == null ? void 0 : X.sm,
699
+ "size-md": (ae = s.value[_].grid) == null ? void 0 : ae.md,
700
+ "size-lg": (ne = s.value[_].grid) == null ? void 0 : ne.lg,
701
+ "size-xl": (oe = s.value[_].grid) == null ? void 0 : oe.xl,
685
702
  class: "ion-margin-vertical"
686
703
  }, {
687
- default: k(() => [
688
- (f(), b(fe(r.value[g].type), {
689
- modelValue: r.value[g],
690
- "onUpdate:modelValue": (pe) => r.value[g] = pe,
691
- schema: r.value,
692
- "form-id": g,
704
+ default: S(() => [
705
+ (v(), b(me(s.value[_].type), {
706
+ modelValue: s.value[_],
707
+ "onUpdate:modelValue": (ve) => s.value[_] = ve,
708
+ schema: s.value,
709
+ "form-id": _,
693
710
  ref_for: !0,
694
711
  ref_key: "dynamicRefs",
695
712
  ref: y,
696
- "ref-key": g
713
+ "ref-key": _
697
714
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
698
715
  ]),
699
716
  _: 2
700
717
  }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : O("", !0)
701
718
  ], 64);
702
- }), 256))
719
+ }), 128))
703
720
  ]),
704
721
  _: 1
705
722
  }),
706
- a.hideButtons ? O("", !0) : (f(), b(d(le), { key: 0 }, {
707
- default: k(() => [
708
- I(d(ae), {
723
+ u.hideButtons ? O("", !0) : (v(), b(c(ue), { key: 0 }, {
724
+ default: S(() => [
725
+ P(c(te), {
709
726
  size: "12",
710
- style: ve([{ display: "flex" }, { justifyContent: a.buttonPlacement }])
727
+ style: fe([{ display: "flex" }, { justifyContent: u.buttonPlacement }])
711
728
  }, {
712
- default: k(() => [
713
- a.showCancelButton ? (f(), b(d(N), {
729
+ default: S(() => [
730
+ u.showCancelButton ? (v(), b(c(j), {
714
731
  key: 0,
715
- onClick: Z
732
+ onClick: J
716
733
  }, {
717
- default: k(() => [
718
- z(A(a.cancelButtonText ?? "Cancel"), 1)
734
+ default: S(() => [
735
+ B(A(u.cancelButtonText ?? "Cancel"), 1)
719
736
  ]),
720
737
  _: 1
721
738
  })) : O("", !0),
722
- a.showClearButton ? (f(), b(d(N), {
739
+ u.showClearButton ? (v(), b(c(j), {
723
740
  key: 1,
724
- onClick: W
741
+ onClick: Z
725
742
  }, {
726
- default: k(() => [
727
- z(A(a.clearButtonText ?? "Reset"), 1)
743
+ default: S(() => [
744
+ B(A(u.clearButtonText ?? "Reset"), 1)
728
745
  ]),
729
746
  _: 1
730
747
  })) : O("", !0),
731
- (f(!0), $(M, null, K(a.customButtons, (g) => (f(), b(d(N), {
732
- key: g.label,
733
- onClick: g.action,
734
- color: g.color ?? "primary"
748
+ (v(!0), $(M, null, W(u.customButtons, (_) => (v(), b(c(j), {
749
+ key: _.label,
750
+ onClick: _.action,
751
+ color: _.color ?? "primary"
735
752
  }, {
736
- default: k(() => [
737
- z(A(g.label), 1)
753
+ default: S(() => [
754
+ B(A(_.label), 1)
738
755
  ]),
739
756
  _: 2
740
757
  }, 1032, ["onClick", "color"]))), 128)),
741
- I(d(N), { onClick: j }, {
742
- default: k(() => [
743
- z(A(a.submitButtonText ?? "Submit"), 1)
758
+ P(c(j), { onClick: N }, {
759
+ default: S(() => [
760
+ B(A(u.submitButtonText ?? "Submit"), 1)
744
761
  ]),
745
762
  _: 1
746
763
  })
@@ -756,89 +773,89 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
756
773
  ]);
757
774
  };
758
775
  }
759
- }), Vt = /* @__PURE__ */ de(Ct, [["__scopeId", "data-v-3850cccc"]]);
760
- function _t(t) {
776
+ }), St = /* @__PURE__ */ re(bt, [["__scopeId", "data-v-74178f58"]]);
777
+ function kt(t) {
761
778
  return {
762
779
  applyValidationState: async (e) => {
763
- var l, s, r, o, y;
764
- (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (s = t.value) == null || s.$el.classList.remove("ion-valid"), e ? (r = t.value) == null || r.$el.classList.add("ion-valid") : (o = t.value) == null || o.$el.classList.add("ion-invalid"), (y = t.value) == null || y.$el.classList.add("ion-touched");
780
+ var a, o, s, n, y;
781
+ (a = t.value) == null || a.$el.classList.remove("ion-invalid"), (o = t.value) == null || o.$el.classList.remove("ion-valid"), e ? (s = t.value) == null || s.$el.classList.add("ion-valid") : (n = t.value) == null || n.$el.classList.add("ion-invalid"), (y = t.value) == null || y.$el.classList.add("ion-touched");
765
782
  },
766
783
  resetValidationState: () => {
767
- var e, l;
768
- (e = t.value) == null || e.$el.classList.remove("ion-touched"), (l = t.value) == null || l.$el.classList.remove("ion-invalid");
784
+ var e, a;
785
+ (e = t.value) == null || e.$el.classList.remove("ion-touched"), (a = t.value) == null || a.$el.classList.remove("ion-invalid");
769
786
  }
770
787
  };
771
788
  }
772
- function ue(t, u, n, e, l) {
773
- const { applyValidationState: s, resetValidationState: r } = _t(t);
774
- async function o() {
775
- if (u.value.required && !n.value)
776
- return u.value.error = "This field is required", !1;
777
- if (l) {
778
- const i = await l(n.value);
789
+ function ie(t, r, l, e, a) {
790
+ const { applyValidationState: o, resetValidationState: s } = kt(t);
791
+ async function n() {
792
+ if (r.value.required && !l.value)
793
+ return r.value.error = "This field is required", !1;
794
+ if (a) {
795
+ const i = await a(l.value);
779
796
  if (typeof i == "string")
780
- return u.value.error = i, !1;
797
+ return r.value.error = i, !1;
781
798
  if (i === !1)
782
799
  return !1;
783
800
  }
784
- if (u.value.validation) {
785
- const i = await u.value.validation(n.value, e == null ? void 0 : e.value);
801
+ if (r.value.validation) {
802
+ const i = await r.value.validation(l.value, e == null ? void 0 : e.value);
786
803
  if (i && i.length)
787
- return u.value.error = i.join(), !1;
804
+ return r.value.error = i.join(), !1;
788
805
  }
789
806
  return !0;
790
807
  }
791
808
  async function y() {
792
- const i = await o();
793
- i && (u.value.error = "", u.value.value = n.value), await s(i);
809
+ const i = await n();
810
+ i && (r.value.error = "", r.value.value = l.value), await o(i);
794
811
  }
795
- function p() {
796
- r(), u.value.error = "";
812
+ function d() {
813
+ s(), r.value.error = "";
797
814
  }
798
- function c(i = "") {
799
- n.value = i, u.value.error = "", u.value.value = i;
815
+ function p(i = "") {
816
+ l.value = i, r.value.error = "", r.value.value = i;
800
817
  }
801
- function v() {
802
- return u.value.error ? [u.value.error] : [];
818
+ function f() {
819
+ return r.value.error ? [r.value.error] : [];
803
820
  }
804
821
  return {
805
- isValid: o,
822
+ isValid: n,
806
823
  onValueUpdate: y,
807
- onFocus: p,
808
- onReset: c,
809
- getErrors: v,
810
- applyValidationState: s,
811
- resetValidationState: r
824
+ onFocus: d,
825
+ onReset: p,
826
+ getErrors: f,
827
+ applyValidationState: o,
828
+ resetValidationState: s
812
829
  };
813
830
  }
814
- function bt(t) {
815
- const u = S(() => !!t.value.label), n = S(() => !!t.value.required), e = S(() => t.value.label || "");
831
+ function wt(t) {
832
+ const r = k(() => !!t.value.label), l = k(() => !!t.value.required), e = k(() => t.value.label || "");
816
833
  return {
817
- showLabel: u,
818
- showRequired: n,
834
+ showLabel: r,
835
+ showRequired: l,
819
836
  labelText: e
820
837
  };
821
838
  }
822
- const Ce = /* @__PURE__ */ T({
839
+ const Ve = /* @__PURE__ */ D({
823
840
  __name: "InputLabel",
824
841
  props: {
825
842
  model: {}
826
843
  },
827
844
  setup(t) {
828
- const u = t, { showLabel: n, showRequired: e, labelText: l } = bt(we(u, "model"));
829
- return (s, r) => d(n) ? (f(), b(d(Y), {
845
+ const r = t, { showLabel: l, showRequired: e, labelText: a } = wt(Ee(r, "model"));
846
+ return (o, s) => c(l) ? (v(), b(c(ee), {
830
847
  key: 0,
831
848
  slot: "label",
832
849
  class: "input-label"
833
850
  }, {
834
- default: k(() => [
835
- z(A(d(l)) + " ", 1),
836
- d(e) ? (f(), b(d(xe), {
851
+ default: S(() => [
852
+ B(A(c(a)) + " ", 1),
853
+ c(e) ? (v(), b(c(Fe), {
837
854
  key: 0,
838
855
  color: "danger"
839
856
  }, {
840
- default: k(() => r[0] || (r[0] = [
841
- z("*")
857
+ default: S(() => s[0] || (s[0] = [
858
+ B("*")
842
859
  ])),
843
860
  _: 1,
844
861
  __: [0]
@@ -847,9 +864,9 @@ const Ce = /* @__PURE__ */ T({
847
864
  _: 1
848
865
  })) : O("", !0);
849
866
  }
850
- }), se = /* @__PURE__ */ T({
867
+ }), ce = /* @__PURE__ */ D({
851
868
  __name: "BaseInput",
852
- props: /* @__PURE__ */ G({
869
+ props: /* @__PURE__ */ H({
853
870
  schema: {},
854
871
  type: {}
855
872
  }, {
@@ -857,31 +874,31 @@ const Ce = /* @__PURE__ */ T({
857
874
  modelModifiers: {}
858
875
  }),
859
876
  emits: ["update:modelValue"],
860
- setup(t, { expose: u }) {
861
- const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), { isValid: o, onValueUpdate: y, onFocus: p, onReset: c, getErrors: v } = ue(
862
- l,
877
+ setup(t, { expose: r }) {
878
+ const l = t, e = K(t, "modelValue"), a = E(null), o = E(e.value.value), s = k(() => l.schema), { isValid: n, onValueUpdate: y, onFocus: d, onReset: p, getErrors: f } = ie(
879
+ a,
863
880
  e,
864
- s,
865
- r
866
- ), i = S(() => {
867
- if (e.value.pattern) return Ke(e.value.pattern);
881
+ o,
882
+ s
883
+ ), i = k(() => {
884
+ if (e.value.pattern) return Ze(e.value.pattern);
868
885
  });
869
- return D(
886
+ return T(
870
887
  () => e.value.value,
871
- (h) => s.value = h
872
- ), u({
888
+ (h) => o.value = h
889
+ ), r({
873
890
  onValueUpdate: y,
874
- onReset: c,
875
- getErrors: v,
876
- isValid: o
891
+ onReset: p,
892
+ getErrors: f,
893
+ isValid: n
877
894
  }), (h, C) => {
878
895
  var w;
879
- const x = Oe("maskito");
880
- return Ee((f(), b(d(_e), {
896
+ const F = xe("maskito");
897
+ return Re((v(), b(c(Se), {
881
898
  ref_key: "inputRef",
882
- ref: l,
883
- modelValue: s.value,
884
- "onUpdate:modelValue": C[0] || (C[0] = (R) => s.value = R),
899
+ ref: a,
900
+ modelValue: o.value,
901
+ "onUpdate:modelValue": C[0] || (C[0] = (R) => o.value = R),
885
902
  "clear-input": !0,
886
903
  fill: e.value.fill ?? "solid",
887
904
  "label-placement": e.value.labelPlacement ?? "stacked",
@@ -897,209 +914,209 @@ const Ce = /* @__PURE__ */ T({
897
914
  "max-length": e.value.maxLength,
898
915
  "min-length": e.value.minLength,
899
916
  pattern: e.value.pattern,
900
- onIonFocus: d(p),
901
- onIonChange: d(y),
902
- onIonBlur: d(y)
917
+ onIonFocus: c(d),
918
+ onIonChange: c(y),
919
+ onIonBlur: c(y)
903
920
  }, {
904
- default: k(() => [
905
- I(Ce, { model: e.value }, null, 8, ["model"]),
906
- e.value.prefix ? (f(), b(d(Y), {
921
+ default: S(() => [
922
+ P(Ve, { model: e.value }, null, 8, ["model"]),
923
+ e.value.prefix ? (v(), b(c(ee), {
907
924
  key: 0,
908
925
  slot: "start"
909
926
  }, {
910
- default: k(() => [
911
- z(A(e.value.prefix), 1)
927
+ default: S(() => [
928
+ B(A(e.value.prefix), 1)
912
929
  ]),
913
930
  _: 1
914
931
  })) : O("", !0),
915
- e.value.suffix ? (f(), b(d(Y), {
932
+ e.value.suffix ? (v(), b(c(ee), {
916
933
  key: 1,
917
934
  slot: "end"
918
935
  }, {
919
- default: k(() => [
920
- z(A(e.value.suffix), 1)
936
+ default: S(() => [
937
+ B(A(e.value.suffix), 1)
921
938
  ]),
922
939
  _: 1
923
940
  })) : O("", !0),
924
- h.type === "password" ? (f(), b(d(Re), {
941
+ h.type === "password" ? (v(), b(c(ze), {
925
942
  key: 2,
926
943
  slot: "end"
927
944
  })) : O("", !0)
928
945
  ]),
929
946
  _: 1
930
947
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"])), [
931
- [x, i.value]
948
+ [F, i.value]
932
949
  ]);
933
950
  };
934
951
  }
935
- }), kt = /* @__PURE__ */ T({
952
+ }), Ot = /* @__PURE__ */ D({
936
953
  __name: "TextInput",
937
- props: /* @__PURE__ */ G({
954
+ props: /* @__PURE__ */ H({
938
955
  schema: {}
939
956
  }, {
940
957
  modelValue: { type: Object, default: {} },
941
958
  modelModifiers: {}
942
959
  }),
943
960
  emits: ["update:modelValue"],
944
- setup(t, { expose: u }) {
945
- const n = H(t, "modelValue"), e = E(null);
946
- return u({
961
+ setup(t, { expose: r }) {
962
+ const l = K(t, "modelValue"), e = E(null);
963
+ return r({
947
964
  onReset: () => {
948
- var l;
949
- return (l = e.value) == null ? void 0 : l.onReset();
965
+ var a;
966
+ return (a = e.value) == null ? void 0 : a.onReset();
950
967
  },
951
968
  onValueUpdate: () => {
952
- var l;
953
- return (l = e.value) == null ? void 0 : l.onValueUpdate();
969
+ var a;
970
+ return (a = e.value) == null ? void 0 : a.onValueUpdate();
954
971
  },
955
972
  getErrors: () => {
956
- var l, s;
957
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
973
+ var a, o;
974
+ return ((o = (a = e.value) == null ? void 0 : a.getErrors) == null ? void 0 : o.call(a)) ?? [];
958
975
  }
959
- }), (l, s) => (f(), b(se, {
960
- modelValue: n.value,
961
- "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
976
+ }), (a, o) => (v(), b(ce, {
977
+ modelValue: l.value,
978
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => l.value = s),
962
979
  type: "text",
963
- schema: l.schema,
980
+ schema: a.schema,
964
981
  ref_key: "inputRef",
965
982
  ref: e
966
983
  }, null, 8, ["modelValue", "schema"]));
967
984
  }
968
- }), St = /* @__PURE__ */ T({
985
+ }), Et = /* @__PURE__ */ D({
969
986
  __name: "DateInput",
970
- props: /* @__PURE__ */ G({
987
+ props: /* @__PURE__ */ H({
971
988
  schema: {}
972
989
  }, {
973
990
  modelValue: { type: Object, default: {} },
974
991
  modelModifiers: {}
975
992
  }),
976
993
  emits: ["update:modelValue"],
977
- setup(t, { expose: u }) {
978
- const n = H(t, "modelValue"), e = E(null);
979
- return u({
994
+ setup(t, { expose: r }) {
995
+ const l = K(t, "modelValue"), e = E(null);
996
+ return r({
980
997
  onValueUpdate: () => {
981
- var l;
982
- return (l = e.value) == null ? void 0 : l.onValueUpdate();
998
+ var a;
999
+ return (a = e.value) == null ? void 0 : a.onValueUpdate();
983
1000
  },
984
1001
  onReset: () => {
985
- var l;
986
- return (l = e.value) == null ? void 0 : l.onReset();
1002
+ var a;
1003
+ return (a = e.value) == null ? void 0 : a.onReset();
987
1004
  },
988
1005
  getErrors: () => {
989
- var l, s;
990
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1006
+ var a, o;
1007
+ return ((o = (a = e.value) == null ? void 0 : a.getErrors) == null ? void 0 : o.call(a)) ?? [];
991
1008
  }
992
- }), (l, s) => (f(), b(se, {
993
- modelValue: n.value,
994
- "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
995
- type: n.value.enableTime ? "datetime-local" : "date",
996
- schema: l.schema,
1009
+ }), (a, o) => (v(), b(ce, {
1010
+ modelValue: l.value,
1011
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => l.value = s),
1012
+ type: l.value.enableTime ? "datetime-local" : "date",
1013
+ schema: a.schema,
997
1014
  ref_key: "inputRef",
998
1015
  ref: e
999
1016
  }, null, 8, ["modelValue", "type", "schema"]));
1000
1017
  }
1001
- }), wt = /* @__PURE__ */ T({
1018
+ }), xt = /* @__PURE__ */ D({
1002
1019
  __name: "NumberInput",
1003
- props: /* @__PURE__ */ G({
1020
+ props: /* @__PURE__ */ H({
1004
1021
  schema: {}
1005
1022
  }, {
1006
1023
  modelValue: { type: Object, default: {} },
1007
1024
  modelModifiers: {}
1008
1025
  }),
1009
1026
  emits: ["update:modelValue"],
1010
- setup(t, { expose: u }) {
1011
- const n = H(t, "modelValue"), e = E(null);
1012
- return u({
1027
+ setup(t, { expose: r }) {
1028
+ const l = K(t, "modelValue"), e = E(null);
1029
+ return r({
1013
1030
  onReset: () => {
1014
- var l;
1015
- return (l = e.value) == null ? void 0 : l.onReset();
1031
+ var a;
1032
+ return (a = e.value) == null ? void 0 : a.onReset();
1016
1033
  },
1017
1034
  onValueUpdate: () => {
1018
- var l;
1019
- return (l = e.value) == null ? void 0 : l.onValueUpdate();
1035
+ var a;
1036
+ return (a = e.value) == null ? void 0 : a.onValueUpdate();
1020
1037
  },
1021
1038
  getErrors: () => {
1022
- var l, s;
1023
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1039
+ var a, o;
1040
+ return ((o = (a = e.value) == null ? void 0 : a.getErrors) == null ? void 0 : o.call(a)) ?? [];
1024
1041
  }
1025
- }), (l, s) => (f(), b(se, {
1026
- modelValue: n.value,
1027
- "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1042
+ }), (a, o) => (v(), b(ce, {
1043
+ modelValue: l.value,
1044
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => l.value = s),
1028
1045
  type: "number",
1029
- schema: l.schema,
1046
+ schema: a.schema,
1030
1047
  ref_key: "inputRef",
1031
1048
  ref: e
1032
1049
  }, null, 8, ["modelValue", "schema"]));
1033
1050
  }
1034
- }), Ot = /* @__PURE__ */ T({
1051
+ }), Rt = /* @__PURE__ */ D({
1035
1052
  __name: "EmailInput",
1036
- props: /* @__PURE__ */ G({
1053
+ props: /* @__PURE__ */ H({
1037
1054
  schema: {}
1038
1055
  }, {
1039
1056
  modelValue: { type: Object, default: {} },
1040
1057
  modelModifiers: {}
1041
1058
  }),
1042
1059
  emits: ["update:modelValue"],
1043
- setup(t, { expose: u }) {
1044
- const n = H(t, "modelValue"), e = E(null);
1045
- return u({
1060
+ setup(t, { expose: r }) {
1061
+ const l = K(t, "modelValue"), e = E(null);
1062
+ return r({
1046
1063
  onReset: () => {
1047
- var l;
1048
- return (l = e.value) == null ? void 0 : l.onReset();
1064
+ var a;
1065
+ return (a = e.value) == null ? void 0 : a.onReset();
1049
1066
  },
1050
1067
  onValueUpdate: () => {
1051
- var l;
1052
- return (l = e.value) == null ? void 0 : l.onValueUpdate();
1068
+ var a;
1069
+ return (a = e.value) == null ? void 0 : a.onValueUpdate();
1053
1070
  },
1054
1071
  getErrors: () => {
1055
- var l, s;
1056
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1072
+ var a, o;
1073
+ return ((o = (a = e.value) == null ? void 0 : a.getErrors) == null ? void 0 : o.call(a)) ?? [];
1057
1074
  }
1058
- }), (l, s) => (f(), b(se, {
1059
- modelValue: n.value,
1060
- "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1075
+ }), (a, o) => (v(), b(ce, {
1076
+ modelValue: l.value,
1077
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => l.value = s),
1061
1078
  type: "email",
1062
- schema: l.schema,
1079
+ schema: a.schema,
1063
1080
  ref_key: "inputRef",
1064
1081
  ref: e
1065
1082
  }, null, 8, ["modelValue", "schema"]));
1066
1083
  }
1067
- }), Et = /* @__PURE__ */ T({
1084
+ }), Ft = /* @__PURE__ */ D({
1068
1085
  __name: "PasswordInput",
1069
- props: /* @__PURE__ */ G({
1086
+ props: /* @__PURE__ */ H({
1070
1087
  schema: {}
1071
1088
  }, {
1072
1089
  modelValue: { type: Object, default: {} },
1073
1090
  modelModifiers: {}
1074
1091
  }),
1075
1092
  emits: ["update:modelValue"],
1076
- setup(t, { expose: u }) {
1077
- const n = H(t, "modelValue"), e = E(null);
1078
- return u({
1093
+ setup(t, { expose: r }) {
1094
+ const l = K(t, "modelValue"), e = E(null);
1095
+ return r({
1079
1096
  onReset: () => {
1080
- var l;
1081
- return (l = e.value) == null ? void 0 : l.onReset();
1097
+ var a;
1098
+ return (a = e.value) == null ? void 0 : a.onReset();
1082
1099
  },
1083
1100
  onValueUpdate: () => {
1084
- var l;
1085
- return (l = e.value) == null ? void 0 : l.onValueUpdate();
1101
+ var a;
1102
+ return (a = e.value) == null ? void 0 : a.onValueUpdate();
1086
1103
  },
1087
1104
  getErrors: () => {
1088
- var l, s;
1089
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1105
+ var a, o;
1106
+ return ((o = (a = e.value) == null ? void 0 : a.getErrors) == null ? void 0 : o.call(a)) ?? [];
1090
1107
  }
1091
- }), (l, s) => (f(), b(se, {
1092
- modelValue: n.value,
1093
- "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1108
+ }), (a, o) => (v(), b(ce, {
1109
+ modelValue: l.value,
1110
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => l.value = s),
1094
1111
  type: "password",
1095
- schema: l.schema,
1112
+ schema: a.schema,
1096
1113
  ref_key: "inputRef",
1097
1114
  ref: e
1098
1115
  }, null, 8, ["modelValue", "schema"]));
1099
1116
  }
1100
- }), xt = /* @__PURE__ */ T({
1117
+ }), zt = /* @__PURE__ */ D({
1101
1118
  __name: "SelectInput",
1102
- props: /* @__PURE__ */ G({
1119
+ props: /* @__PURE__ */ H({
1103
1120
  schema: Object,
1104
1121
  type: String,
1105
1122
  formId: String
@@ -1108,62 +1125,62 @@ const Ce = /* @__PURE__ */ T({
1108
1125
  modelModifiers: {}
1109
1126
  }),
1110
1127
  emits: ["update:modelValue"],
1111
- setup(t, { expose: u }) {
1112
- const n = t, e = H(t, "modelValue"), l = E(null), s = E(null), r = E(!1), o = E([]), y = E(""), p = E(1), c = S(() => e.value.interface ?? "popover"), v = S(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), i = S(() => o.value.filter((a) => !!a.isChecked)), h = S(() => !y.value && me(i.value) && !r.value ? e.value.placeholder ?? "Select an option" : "");
1113
- D([y, () => e.value.options], L, {
1128
+ setup(t, { expose: r }) {
1129
+ const l = t, e = K(t, "modelValue"), a = E(null), o = E(null), s = E(!1), n = E([]), y = E(""), d = E(1), p = k(() => e.value.interface ?? "popover"), f = k(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), i = k(() => n.value.filter((m) => !!m.isChecked)), h = k(() => !y.value && he(i.value) && !s.value ? e.value.placeholder ?? "Select an option" : "");
1130
+ T([y, () => e.value.options], L, {
1114
1131
  immediate: !0,
1115
1132
  deep: !0
1116
- }), D(() => e.value.value, V, { immediate: !0, deep: !0 }), D(
1117
- () => !e.value.dependsOn || !n.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((m) => {
1118
- var _;
1119
- return (_ = n.schema[m]) == null ? void 0 : _.value;
1133
+ }), T(() => e.value.value, V, { immediate: !0, deep: !0 }), T(
1134
+ () => !e.value.dependsOn || !l.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((u) => {
1135
+ const g = l.schema[u];
1136
+ return G(g) ? g.value : void 0;
1120
1137
  }),
1121
- async (a, m) => {
1122
- a && m && !oe(a, m) && (C(), o.value = [], await L());
1138
+ async (m, u) => {
1139
+ m && u && !se(m, u) && (C(), n.value = [], await L());
1123
1140
  },
1124
1141
  { deep: !0 }
1125
1142
  );
1126
1143
  function C() {
1127
- e.value.error = "", y.value = "", p.value = 1, e.value.value = e.value.multiple ? [] : "", Ze(o.value);
1144
+ e.value.error = "", y.value = "", d.value = 1, e.value.value = e.value.multiple ? [] : "", Qe(n.value);
1128
1145
  }
1129
- function x(a) {
1130
- const m = o.value.findIndex((_) => _.value === a.value && _.isChecked);
1131
- if (m >= 0) {
1146
+ function F(m) {
1147
+ const u = n.value.findIndex((g) => g.value === m.value && g.isChecked);
1148
+ if (u >= 0) {
1132
1149
  if (Array.isArray(e.value.value)) {
1133
- const _ = ye(a, e.value.value);
1134
- _ >= 0 && e.value.value.splice(_, 1);
1150
+ const g = Ce(m, e.value.value);
1151
+ g >= 0 && e.value.value.splice(g, 1);
1135
1152
  }
1136
- o.value[m].isChecked = !1;
1153
+ n.value[u].isChecked = !1;
1137
1154
  } else
1138
- e.value.multiple || C(), X(a, o.value);
1155
+ e.value.multiple || C(), Y(m, n.value);
1139
1156
  q(), y.value = "";
1140
1157
  }
1141
1158
  function w() {
1142
- switch (c.value) {
1159
+ switch (p.value) {
1143
1160
  case "action-sheet":
1144
1161
  R();
1145
1162
  break;
1146
1163
  case "alert":
1147
- F();
1164
+ z();
1148
1165
  break;
1149
1166
  case "popover":
1150
1167
  default:
1151
- r.value = !0;
1168
+ s.value = !0;
1152
1169
  break;
1153
1170
  }
1154
1171
  }
1155
1172
  async function R() {
1156
1173
  if (await L(), e.value.multiple) {
1157
- r.value = !0;
1174
+ s.value = !0;
1158
1175
  return;
1159
1176
  }
1160
- await (await ze.create({
1177
+ await (await Be.create({
1161
1178
  header: e.value.label || "Select an option",
1162
1179
  buttons: [
1163
- ...o.value.map((m) => ({
1164
- text: m.label,
1165
- cssClass: m.isChecked ? "selected-option" : "",
1166
- handler: () => (x(m), !1)
1180
+ ...n.value.map((u) => ({
1181
+ text: u.label,
1182
+ cssClass: u.isChecked ? "selected-option" : "",
1183
+ handler: () => (F(u), !1)
1167
1184
  })),
1168
1185
  {
1169
1186
  text: "Cancel",
@@ -1172,17 +1189,17 @@ const Ce = /* @__PURE__ */ T({
1172
1189
  ]
1173
1190
  })).present();
1174
1191
  }
1175
- async function F() {
1192
+ async function z() {
1176
1193
  await L();
1177
- const a = o.value.map((_) => ({
1178
- label: _.label,
1194
+ const m = n.value.map((g) => ({
1195
+ label: g.label,
1179
1196
  type: e.value.multiple ? "checkbox" : "radio",
1180
- value: _,
1181
- checked: _.isChecked
1197
+ value: g,
1198
+ checked: g.isChecked
1182
1199
  }));
1183
- await (await Be.create({
1200
+ await (await Pe.create({
1184
1201
  header: e.value.label || "Select an option",
1185
- inputs: a,
1202
+ inputs: m,
1186
1203
  buttons: [
1187
1204
  {
1188
1205
  text: "Cancel",
@@ -1190,16 +1207,16 @@ const Ce = /* @__PURE__ */ T({
1190
1207
  },
1191
1208
  {
1192
1209
  text: "OK",
1193
- handler: (_) => {
1210
+ handler: (g) => {
1194
1211
  if (e.value.multiple)
1195
- o.value.forEach((g) => We(g, o.value)), _.forEach((g) => {
1196
- const P = o.value.find((U) => U.value === g.value);
1197
- P && X(P, o.value);
1212
+ n.value.forEach((x) => Je(x, n.value)), g.forEach((x) => {
1213
+ const _ = n.value.find((U) => U.value === x.value);
1214
+ _ && Y(_, n.value);
1198
1215
  });
1199
1216
  else {
1200
1217
  C();
1201
- const g = o.value.find((P) => P.value === _.value);
1202
- g && X(g, o.value);
1218
+ const x = n.value.find((_) => _.value === g.value);
1219
+ x && Y(x, n.value);
1203
1220
  }
1204
1221
  q();
1205
1222
  }
@@ -1207,92 +1224,92 @@ const Ce = /* @__PURE__ */ T({
1207
1224
  ]
1208
1225
  })).present();
1209
1226
  }
1210
- async function j() {
1211
- if (e.value.required && me(i.value))
1227
+ async function N() {
1228
+ if (e.value.required && he(i.value))
1212
1229
  return "This field is required";
1213
1230
  if (e.value.validation) {
1214
- const a = await e.value.validation(i.value, n == null ? void 0 : n.schema);
1215
- if (a && a.length)
1216
- return a.join();
1231
+ const m = await e.value.validation(i.value, l == null ? void 0 : l.schema);
1232
+ if (m && m.length)
1233
+ return m.join();
1217
1234
  }
1218
1235
  return !0;
1219
1236
  }
1220
- const { onFocus: W, applyValidationState: J } = ue(
1221
- l,
1237
+ const { onFocus: Z, applyValidationState: Q } = ie(
1238
+ a,
1222
1239
  e,
1223
- S(() => e.value.multiple ? i.value : i.value[0]),
1224
- S(() => n == null ? void 0 : n.schema),
1225
- j
1240
+ k(() => e.value.multiple ? i.value : i.value[0]),
1241
+ k(() => l == null ? void 0 : l.schema),
1242
+ N
1226
1243
  );
1227
- function Z(a) {
1228
- var m;
1229
- a.target === ((m = l.value) == null ? void 0 : m.$el) && (W(), c.value === "popover" && (r.value = !0));
1244
+ function J(m) {
1245
+ var u;
1246
+ m.target === ((u = a.value) == null ? void 0 : u.$el) && (Z(), p.value === "popover" && (s.value = !0));
1230
1247
  }
1231
- async function q(a) {
1232
- var _;
1233
- if ((_ = a == null ? void 0 : a.relatedTarget) != null && _.closest(".suggestions-list")) return;
1234
- r.value = !1;
1235
- const m = await j();
1236
- m === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? i.value : i.value[0]) : e.value.error = typeof m == "string" ? m : "Validation failed", await J(m === !0);
1248
+ async function q(m) {
1249
+ var g;
1250
+ if ((g = m == null ? void 0 : m.relatedTarget) != null && g.closest(".suggestions-list")) return;
1251
+ s.value = !1;
1252
+ const u = await N();
1253
+ u === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? i.value : i.value[0]) : e.value.error = typeof u == "string" ? u : "Validation failed", await Q(u === !0);
1237
1254
  }
1238
1255
  async function L() {
1239
- const a = [];
1256
+ const m = [];
1240
1257
  if (typeof e.value.options == "function") {
1241
- let m = {};
1242
- if (e.value.dependsOn && n.schema) {
1243
- const _ = Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn];
1244
- let g = !0;
1245
- if (m = _.reduce(
1246
- (P, U) => {
1247
- var Q;
1248
- return P[U] = (Q = n.schema[U]) == null ? void 0 : Q.value, (P[U] === void 0 || P[U] === null || P[U] === "") && (g = !1), P;
1258
+ let u = {};
1259
+ if (e.value.dependsOn && l.schema) {
1260
+ const g = Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn];
1261
+ let x = !0;
1262
+ if (u = g.reduce(
1263
+ (_, U) => {
1264
+ const X = l.schema[U];
1265
+ return _[U] = G(X) ? X.value : void 0, (_[U] === void 0 || _[U] === null || _[U] === "") && (x = !1), _;
1249
1266
  },
1250
1267
  {}
1251
- ), g) {
1252
- const P = await e.value.options(y.value, m);
1253
- a.push(...P.filter((U) => !!U.label));
1268
+ ), x) {
1269
+ const _ = await e.value.options(y.value, u);
1270
+ m.push(..._.filter((U) => !!U.label));
1254
1271
  }
1255
1272
  } else {
1256
- const _ = await e.value.options(y.value, {});
1257
- a.push(..._.filter((g) => !!g.label));
1273
+ const g = await e.value.options(y.value, {});
1274
+ m.push(...g.filter((x) => !!x.label));
1258
1275
  }
1259
- } else Array.isArray(e.value.options) && a.push(...Je(e.value.options, y.value));
1260
- i.value.forEach((m) => X(m, a)), o.value = a;
1276
+ } else Array.isArray(e.value.options) && m.push(...Xe(e.value.options, y.value));
1277
+ i.value.forEach((u) => Y(u, m)), n.value = m;
1261
1278
  }
1262
1279
  async function V() {
1263
- const a = e.value.value;
1264
- if (a) {
1265
- if (o.value.length === 0 && await L(), Array.isArray(a))
1266
- a.forEach((m) => X(m, o.value));
1267
- else if (typeof a == "object")
1268
- X(a, o.value);
1280
+ const m = e.value.value;
1281
+ if (m) {
1282
+ if (n.value.length === 0 && await L(), Array.isArray(m))
1283
+ m.forEach((u) => Y(u, n.value));
1284
+ else if (typeof m == "object")
1285
+ Y(m, n.value);
1269
1286
  else {
1270
- const m = o.value.find((_) => _.value === a);
1271
- X(m || {
1272
- value: a,
1273
- label: a
1274
- }, o.value);
1287
+ const u = n.value.find((g) => g.value === m);
1288
+ Y(u || {
1289
+ value: m,
1290
+ label: m
1291
+ }, n.value);
1275
1292
  }
1276
1293
  q();
1277
1294
  }
1278
1295
  }
1279
- return ge(async () => {
1296
+ return _e(async () => {
1280
1297
  await L(), await V();
1281
- }), u({
1298
+ }), r({
1282
1299
  onValueUpdate: q,
1283
1300
  onReset: C,
1284
1301
  getErrors: () => e.value.error ? [e.value.error] : []
1285
- }), (a, m) => (f(), $("div", {
1302
+ }), (m, u) => (v(), $("div", {
1286
1303
  class: "autocomplete-container",
1287
1304
  onFocusout: q,
1288
1305
  ref_key: "containerRef",
1289
- ref: s
1306
+ ref: o
1290
1307
  }, [
1291
- I(d(_e), {
1308
+ P(c(Se), {
1292
1309
  ref_key: "inputRef",
1293
- ref: l,
1310
+ ref: a,
1294
1311
  modelValue: y.value,
1295
- "onUpdate:modelValue": m[0] || (m[0] = (_) => y.value = _),
1312
+ "onUpdate:modelValue": u[0] || (u[0] = (g) => y.value = g),
1296
1313
  fill: e.value.fill ?? "solid",
1297
1314
  "label-placement": e.value.labelPlacement ?? "stacked",
1298
1315
  type: t.type ?? "text",
@@ -1302,23 +1319,23 @@ const Ce = /* @__PURE__ */ T({
1302
1319
  placeholder: h.value,
1303
1320
  disabled: e.value.disabled,
1304
1321
  counter: e.value.counter,
1305
- onIonFocus: Z,
1322
+ onIonFocus: J,
1306
1323
  debounce: 300,
1307
1324
  onClick: w
1308
1325
  }, {
1309
- default: k(() => [
1310
- I(Ce, { model: e.value }, null, 8, ["model"]),
1311
- e.value.multiple ? (f(), b(d(Y), {
1326
+ default: S(() => [
1327
+ P(Ve, { model: e.value }, null, 8, ["model"]),
1328
+ e.value.multiple ? (v(), b(c(ee), {
1312
1329
  key: 0,
1313
1330
  style: { width: "fit-content" },
1314
1331
  slot: "start"
1315
1332
  }, {
1316
- default: k(() => [
1317
- (f(!0), $(M, null, K(i.value, (_, g) => (f(), b(d(Ae), { key: g }, {
1318
- default: k(() => [
1319
- I(d(Y), null, {
1320
- default: k(() => [
1321
- z(A(_.label), 1)
1333
+ default: S(() => [
1334
+ (v(!0), $(M, null, W(i.value, (g, x) => (v(), b(c(Ae), { key: x }, {
1335
+ default: S(() => [
1336
+ P(c(ee), null, {
1337
+ default: S(() => [
1338
+ B(A(g.label), 1)
1322
1339
  ]),
1323
1340
  _: 2
1324
1341
  }, 1024)
@@ -1327,52 +1344,52 @@ const Ce = /* @__PURE__ */ T({
1327
1344
  }, 1024))), 128))
1328
1345
  ]),
1329
1346
  _: 1
1330
- })) : (f(), b(d(Y), {
1347
+ })) : (v(), b(c(ee), {
1331
1348
  key: 1,
1332
1349
  slot: "start",
1333
1350
  class: "ion-no-wrap"
1334
1351
  }, {
1335
- default: k(() => {
1336
- var _;
1352
+ default: S(() => {
1353
+ var g;
1337
1354
  return [
1338
- z(A(((_ = i.value[0]) == null ? void 0 : _.label) ?? ""), 1)
1355
+ B(A(((g = i.value[0]) == null ? void 0 : g.label) ?? ""), 1)
1339
1356
  ];
1340
1357
  }),
1341
1358
  _: 1
1342
1359
  })),
1343
- I(d(ce), {
1360
+ P(c(pe), {
1344
1361
  slot: "end",
1345
- icon: d(De)
1362
+ icon: c(qe)
1346
1363
  }, null, 8, ["icon"]),
1347
- i.value.length > 0 || y.value ? (f(), b(d(ce), {
1364
+ i.value.length > 0 || y.value ? (v(), b(c(pe), {
1348
1365
  key: 2,
1349
1366
  slot: "end",
1350
- icon: d(Te),
1367
+ icon: c(Le),
1351
1368
  onClick: C,
1352
1369
  style: { "z-index": "999999" }
1353
1370
  }, null, 8, ["icon"])) : O("", !0)
1354
1371
  ]),
1355
1372
  _: 1
1356
1373
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter"]),
1357
- r.value && o.value.length > 0 && c.value === "popover" ? (f(), b(d($e), {
1374
+ s.value && n.value.length > 0 && p.value === "popover" ? (v(), b(c($e), {
1358
1375
  key: 0,
1359
- class: ne(["suggestions-list", v.value])
1376
+ class: le(["suggestions-list", f.value])
1360
1377
  }, {
1361
- default: k(() => [
1362
- (f(!0), $(M, null, K(o.value, (_) => (f(), b(d(Fe), {
1378
+ default: S(() => [
1379
+ (v(!0), $(M, null, W(n.value, (g) => (v(), b(c(Ie), {
1363
1380
  button: "",
1364
- key: _.label,
1365
- onClick: (g) => x(_)
1381
+ key: g.label,
1382
+ onClick: (x) => F(g)
1366
1383
  }, {
1367
- default: k(() => [
1368
- e.value.multiple ? (f(), b(d(be), {
1384
+ default: S(() => [
1385
+ e.value.multiple ? (v(), b(c(ke), {
1369
1386
  key: 0,
1370
1387
  slot: "start",
1371
- checked: _.isChecked
1388
+ checked: g.isChecked
1372
1389
  }, null, 8, ["checked"])) : O("", !0),
1373
- I(d(Y), null, {
1374
- default: k(() => [
1375
- z(A(_.label), 1)
1390
+ P(c(ee), null, {
1391
+ default: S(() => [
1392
+ B(A(g.label), 1)
1376
1393
  ]),
1377
1394
  _: 2
1378
1395
  }, 1024)
@@ -1384,34 +1401,34 @@ const Ce = /* @__PURE__ */ T({
1384
1401
  }, 8, ["class"])) : O("", !0)
1385
1402
  ], 544));
1386
1403
  }
1387
- }), Rt = /* @__PURE__ */ de(xt, [["__scopeId", "data-v-8d55391c"]]), At = /* @__PURE__ */ T({
1404
+ }), At = /* @__PURE__ */ re(zt, [["__scopeId", "data-v-f96dd419"]]), $t = /* @__PURE__ */ D({
1388
1405
  __name: "TextAreaInput",
1389
- props: /* @__PURE__ */ G({
1406
+ props: /* @__PURE__ */ H({
1390
1407
  schema: {}
1391
1408
  }, {
1392
1409
  modelValue: { type: Object, default: {} },
1393
1410
  modelModifiers: {}
1394
1411
  }),
1395
1412
  emits: ["update:modelValue"],
1396
- setup(t, { expose: u }) {
1397
- const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), { onValueUpdate: o, onFocus: y, onReset: p, getErrors: c } = ue(
1398
- l,
1413
+ setup(t, { expose: r }) {
1414
+ const l = t, e = K(t, "modelValue"), a = E(null), o = E(e.value.value), s = k(() => l.schema), { onValueUpdate: n, onFocus: y, onReset: d, getErrors: p } = ie(
1415
+ a,
1399
1416
  e,
1400
- s,
1401
- r
1417
+ o,
1418
+ s
1402
1419
  );
1403
- return D(
1420
+ return T(
1404
1421
  () => e.value.value,
1405
- (v) => s.value = v
1406
- ), u({
1407
- onReset: p,
1408
- onValueUpdate: o,
1409
- getErrors: c
1410
- }), (v, i) => (f(), b(d(Pe), {
1422
+ (f) => o.value = f
1423
+ ), r({
1424
+ onReset: d,
1425
+ onValueUpdate: n,
1426
+ getErrors: p
1427
+ }), (f, i) => (v(), b(c(Ue), {
1411
1428
  ref_key: "inputRef",
1412
- ref: l,
1413
- modelValue: s.value,
1414
- "onUpdate:modelValue": i[0] || (i[0] = (h) => s.value = h),
1429
+ ref: a,
1430
+ modelValue: o.value,
1431
+ "onUpdate:modelValue": i[0] || (i[0] = (h) => o.value = h),
1415
1432
  "clear-input": !0,
1416
1433
  fill: e.value.fill ?? "solid",
1417
1434
  "label-placement": e.value.labelPlacement ?? "stacked",
@@ -1429,22 +1446,22 @@ const Ce = /* @__PURE__ */ T({
1429
1446
  "max-length": e.value.maxLength,
1430
1447
  "min-length": e.value.minLength,
1431
1448
  pattern: e.value.pattern,
1432
- onIonFocus: d(y),
1433
- onIonChange: d(o),
1434
- onIonBlur: d(o)
1449
+ onIonFocus: c(y),
1450
+ onIonChange: c(n),
1451
+ onIonBlur: c(n)
1435
1452
  }, {
1436
- default: k(() => [
1437
- I(Ce, { model: e.value }, null, 8, ["model"])
1453
+ default: S(() => [
1454
+ P(Ve, { model: e.value }, null, 8, ["model"])
1438
1455
  ]),
1439
1456
  _: 1
1440
1457
  }, 8, ["modelValue", "fill", "label-placement", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "rows", "cols", "auto-grow", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"]));
1441
1458
  }
1442
- }), $t = {
1459
+ }), It = {
1443
1460
  class: "ion-margin-end",
1444
1461
  style: { "flex-grow": "1" }
1445
- }, Ft = { style: { display: "flex", "justify-content": "flex-end" } }, zt = /* @__PURE__ */ T({
1462
+ }, Bt = { style: { display: "flex", "justify-content": "flex-end" } }, Pt = /* @__PURE__ */ D({
1446
1463
  __name: "RepeatInput",
1447
- props: /* @__PURE__ */ G({
1464
+ props: /* @__PURE__ */ H({
1448
1465
  schema: {},
1449
1466
  data: {},
1450
1467
  computedData: {}
@@ -1453,69 +1470,69 @@ const Ce = /* @__PURE__ */ T({
1453
1470
  modelModifiers: {}
1454
1471
  }),
1455
1472
  emits: ["update:modelValue"],
1456
- setup(t, { expose: u }) {
1457
- const n = H(t, "modelValue"), e = E([]), { dynamicRefs: l, resetForm: s, getFormErrors: r, updateFormValues: o } = Se(), y = S(() => e.value.map((C, x) => ({
1458
- label: `Set ${x + 1}`,
1459
- value: x,
1473
+ setup(t, { expose: r }) {
1474
+ const l = K(t, "modelValue"), e = E([]), { dynamicRefs: a, resetForm: o, getFormErrors: s, updateFormValues: n } = Oe(), y = k(() => e.value.map((C, F) => ({
1475
+ label: `Set ${F + 1}`,
1476
+ value: F,
1460
1477
  other: Object.entries(C).reduce(
1461
- (w, [R, F]) => (w[R] = F.value, w),
1478
+ (w, [R, z]) => (G(z) && (w[R] = z.value), w),
1462
1479
  {}
1463
1480
  )
1464
1481
  })));
1465
- D(
1482
+ T(
1466
1483
  y,
1467
1484
  (C) => {
1468
- n.value.value = C;
1485
+ l.value.value = C;
1469
1486
  },
1470
1487
  { deep: !0, immediate: !0 }
1471
- ), ge(p);
1472
- function p() {
1473
- n.value.children && e.value.push(he(n.value.children));
1488
+ ), _e(d);
1489
+ function d() {
1490
+ l.value.children && e.value.push(ye(l.value.children));
1474
1491
  }
1475
- function c(C) {
1492
+ function p(C) {
1476
1493
  e.value.splice(C, 1);
1477
1494
  }
1478
- function v() {
1479
- s();
1495
+ function f() {
1496
+ o();
1480
1497
  }
1481
1498
  function i() {
1482
- return r();
1499
+ return s();
1483
1500
  }
1484
1501
  async function h() {
1485
- await o();
1502
+ await n();
1486
1503
  }
1487
- return u({
1504
+ return r({
1488
1505
  onValueUpdate: h,
1489
- onReset: v,
1506
+ onReset: f,
1490
1507
  getErrors: i
1491
- }), (C, x) => (f(!0), $(M, null, K(e.value, (w, R) => (f(), $("div", {
1508
+ }), (C, F) => (v(!0), $(M, null, W(e.value, (w, R) => (v(), $("div", {
1492
1509
  class: "repeat-input-wrapper",
1493
1510
  key: R
1494
1511
  }, [
1495
- B("div", $t, [
1496
- I(d(le), null, {
1497
- default: k(() => [
1498
- (f(!0), $(M, null, K(Object.keys(w), (F) => {
1499
- var j, W, J, Z, q;
1500
- return f(), $(M, null, [
1501
- d(ie)(w[F], C.data, C.computedData) ? (f(), b(d(ae), {
1502
- key: `${R}-${F}`,
1503
- size: ((j = w[F].grid) == null ? void 0 : j.xs) ?? "12",
1504
- "size-sm": (W = w[F].grid) == null ? void 0 : W.sm,
1505
- "size-md": (J = w[F].grid) == null ? void 0 : J.md,
1506
- "size-lg": (Z = w[F].grid) == null ? void 0 : Z.lg,
1507
- "size-xl": (q = w[F].grid) == null ? void 0 : q.xl,
1512
+ I("div", It, [
1513
+ P(c(ue), null, {
1514
+ default: S(() => [
1515
+ (v(!0), $(M, null, W(Object.keys(w), (z) => {
1516
+ var N, Z, Q, J, q;
1517
+ return v(), $(M, null, [
1518
+ c(ge)(w[z], C.data, C.computedData) ? (v(), b(c(te), {
1519
+ key: `${R}-${z}`,
1520
+ size: ((N = w[z].grid) == null ? void 0 : N.xs) ?? "12",
1521
+ "size-sm": (Z = w[z].grid) == null ? void 0 : Z.sm,
1522
+ "size-md": (Q = w[z].grid) == null ? void 0 : Q.md,
1523
+ "size-lg": (J = w[z].grid) == null ? void 0 : J.lg,
1524
+ "size-xl": (q = w[z].grid) == null ? void 0 : q.xl,
1508
1525
  class: "ion-margin-bottom"
1509
1526
  }, {
1510
- default: k(() => [
1511
- (f(), b(fe(w[F].type), {
1512
- modelValue: w[F],
1513
- "onUpdate:modelValue": (L) => w[F] = L,
1527
+ default: S(() => [
1528
+ (v(), b(me(w[z].type), {
1529
+ modelValue: w[z],
1530
+ "onUpdate:modelValue": (L) => w[z] = L,
1514
1531
  schema: w,
1515
- "ref-key": `${R}-${F}`,
1532
+ "ref-key": `${R}-${z}`,
1516
1533
  ref_for: !0,
1517
1534
  ref_key: "dynamicRefs",
1518
- ref: l
1535
+ ref: a
1519
1536
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "ref-key"]))
1520
1537
  ]),
1521
1538
  _: 2
@@ -1526,29 +1543,29 @@ const Ce = /* @__PURE__ */ T({
1526
1543
  _: 2
1527
1544
  }, 1024)
1528
1545
  ]),
1529
- B("div", Ft, [
1530
- R === e.value.length - 1 ? (f(), b(d(N), {
1546
+ I("div", Bt, [
1547
+ R === e.value.length - 1 ? (v(), b(c(j), {
1531
1548
  key: 0,
1532
- onClick: p,
1549
+ onClick: d,
1533
1550
  color: "primary"
1534
1551
  }, {
1535
- default: k(() => [
1536
- I(d(ce), {
1552
+ default: S(() => [
1553
+ P(c(pe), {
1537
1554
  slot: "icon-only",
1538
- icon: d(qe)
1555
+ icon: c(Me)
1539
1556
  }, null, 8, ["icon"])
1540
1557
  ]),
1541
1558
  _: 1
1542
1559
  })) : O("", !0),
1543
- e.value.length > 1 ? (f(), b(d(N), {
1560
+ e.value.length > 1 ? (v(), b(c(j), {
1544
1561
  key: 1,
1545
- onClick: (F) => c(R),
1562
+ onClick: (z) => p(R),
1546
1563
  color: "warning"
1547
1564
  }, {
1548
- default: k(() => [
1549
- I(d(ce), {
1565
+ default: S(() => [
1566
+ P(c(pe), {
1550
1567
  slot: "icon-only",
1551
- icon: d(Le)
1568
+ icon: c(Ne)
1552
1569
  }, null, 8, ["icon"])
1553
1570
  ]),
1554
1571
  _: 2
@@ -1556,97 +1573,97 @@ const Ce = /* @__PURE__ */ T({
1556
1573
  ])
1557
1574
  ]))), 128));
1558
1575
  }
1559
- }), Bt = /* @__PURE__ */ de(zt, [["__scopeId", "data-v-060bdf58"]]), Pt = /* @__PURE__ */ T({
1576
+ }), Ut = /* @__PURE__ */ re(Pt, [["__scopeId", "data-v-5bad57e4"]]), Dt = /* @__PURE__ */ D({
1560
1577
  __name: "CheckboxInput",
1561
- props: /* @__PURE__ */ G({
1578
+ props: /* @__PURE__ */ H({
1562
1579
  schema: {}
1563
1580
  }, {
1564
1581
  modelValue: { type: Object, default: {} },
1565
1582
  modelModifiers: {}
1566
1583
  }),
1567
1584
  emits: ["update:modelValue"],
1568
- setup(t, { expose: u }) {
1569
- const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), o = S(() => ke(e.value)), { onValueUpdate: y, onFocus: p, getErrors: c } = ue(l, e, s, r);
1570
- function v() {
1571
- s.value = !1, e.value.error = "", e.value.value = !1;
1585
+ setup(t, { expose: r }) {
1586
+ const l = t, e = K(t, "modelValue"), a = E(null), o = E(e.value.value), s = k(() => l.schema), n = k(() => we(e.value)), { onValueUpdate: y, onFocus: d, getErrors: p } = ie(a, e, o, s);
1587
+ function f() {
1588
+ o.value = !1, e.value.error = "", e.value.value = !1;
1572
1589
  }
1573
- return D(
1590
+ return T(
1574
1591
  () => e.value.value,
1575
- (i) => s.value = i
1576
- ), u({
1592
+ (i) => o.value = i
1593
+ ), r({
1577
1594
  onValueUpdate: y,
1578
- onReset: v,
1579
- getErrors: c
1580
- }), (i, h) => (f(), b(d(be), {
1581
- modelValue: s.value,
1582
- "onUpdate:modelValue": h[0] || (h[0] = (C) => s.value = C),
1595
+ onReset: f,
1596
+ getErrors: p
1597
+ }), (i, h) => (v(), b(c(ke), {
1598
+ modelValue: o.value,
1599
+ "onUpdate:modelValue": h[0] || (h[0] = (C) => o.value = C),
1583
1600
  ref_key: "inputRef",
1584
- ref: l,
1601
+ ref: a,
1585
1602
  required: e.value.required,
1586
1603
  "error-text": e.value.error,
1587
1604
  disabled: e.value.disabled,
1588
- onIonFocus: d(p),
1589
- onIonChange: d(y),
1590
- onIonBlur: d(y)
1605
+ onIonFocus: c(d),
1606
+ onIonChange: c(y),
1607
+ onIonBlur: c(y)
1591
1608
  }, {
1592
- default: k(() => [
1593
- z(A(o.value), 1)
1609
+ default: S(() => [
1610
+ B(A(n.value), 1)
1594
1611
  ]),
1595
1612
  _: 1
1596
1613
  }, 8, ["modelValue", "required", "error-text", "disabled", "onIonFocus", "onIonChange", "onIonBlur"]));
1597
1614
  }
1598
- }), It = /* @__PURE__ */ T({
1615
+ }), Tt = /* @__PURE__ */ D({
1599
1616
  __name: "RadioInput",
1600
- props: /* @__PURE__ */ G({
1617
+ props: /* @__PURE__ */ H({
1601
1618
  schema: {}
1602
1619
  }, {
1603
1620
  modelValue: { type: Object, default: {} },
1604
1621
  modelModifiers: {}
1605
1622
  }),
1606
1623
  emits: ["update:modelValue"],
1607
- setup(t, { expose: u }) {
1608
- const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), o = E([]), y = S(() => ke(e.value)), { onValueUpdate: p, onFocus: c, getErrors: v } = ue(l, e, s, r);
1624
+ setup(t, { expose: r }) {
1625
+ const l = t, e = K(t, "modelValue"), a = E(null), o = E(e.value.value), s = k(() => l.schema), n = E([]), y = k(() => we(e.value)), { onValueUpdate: d, onFocus: p, getErrors: f } = ie(a, e, o, s);
1609
1626
  function i() {
1610
- e.value.error = "", s.value = void 0, e.value.value = void 0;
1627
+ e.value.error = "", o.value = void 0, e.value.value = void 0;
1611
1628
  }
1612
- function h(x, w) {
1613
- return x.value === w.value;
1629
+ function h(F, w) {
1630
+ return F.value === w.value;
1614
1631
  }
1615
1632
  async function C() {
1616
- typeof e.value.options == "function" ? o.value = await e.value.options() : o.value = e.value.options;
1633
+ typeof e.value.options == "function" ? n.value = await e.value.options() : n.value = e.value.options;
1617
1634
  }
1618
- return D(
1635
+ return T(
1619
1636
  () => e.value.value,
1620
- (x) => s.value = x
1621
- ), u({
1622
- onValueUpdate: p,
1637
+ (F) => o.value = F
1638
+ ), r({
1639
+ onValueUpdate: d,
1623
1640
  onReset: i,
1624
- getErrors: v
1625
- }), ge(C), (x, w) => (f(), b(d(Ie), {
1626
- modelValue: s.value,
1627
- "onUpdate:modelValue": w[0] || (w[0] = (R) => s.value = R),
1641
+ getErrors: f
1642
+ }), _e(C), (F, w) => (v(), b(c(De), {
1643
+ modelValue: o.value,
1644
+ "onUpdate:modelValue": w[0] || (w[0] = (R) => o.value = R),
1628
1645
  ref_key: "inputRef",
1629
- ref: l,
1646
+ ref: a,
1630
1647
  required: e.value.required,
1631
1648
  "helper-text": y.value,
1632
1649
  "error-text": e.value.error,
1633
1650
  disabled: e.value.disabled,
1634
1651
  compareWith: h,
1635
1652
  "allow-empty-selection": !e.value.required,
1636
- onIonFocus: d(c),
1637
- onIonChange: d(p),
1638
- onIonBlur: d(p)
1653
+ onIonFocus: c(p),
1654
+ onIonChange: c(d),
1655
+ onIonBlur: c(d)
1639
1656
  }, {
1640
- default: k(() => [
1641
- (f(!0), $(M, null, K(o.value, (R) => (f(), b(d(Ue), {
1657
+ default: S(() => [
1658
+ (v(!0), $(M, null, W(n.value, (R) => (v(), b(c(Te), {
1642
1659
  key: R.value,
1643
1660
  value: R,
1644
1661
  disabled: e.value.disabled,
1645
1662
  "label-placement": "end",
1646
1663
  justify: "start"
1647
1664
  }, {
1648
- default: k(() => [
1649
- z(A(R.label), 1)
1665
+ default: S(() => [
1666
+ B(A(R.label), 1)
1650
1667
  ]),
1651
1668
  _: 2
1652
1669
  }, 1032, ["value", "disabled"]))), 128))
@@ -1654,71 +1671,106 @@ const Ce = /* @__PURE__ */ T({
1654
1671
  _: 1
1655
1672
  }, 8, ["modelValue", "required", "helper-text", "error-text", "disabled", "allow-empty-selection", "onIonFocus", "onIonChange", "onIonBlur"]));
1656
1673
  }
1657
- });
1658
- function Lt(t, u, n) {
1659
- const e = E({}), l = E({});
1660
- function s(c, v, i) {
1661
- l.value[c] = i, v.forEach((h) => {
1674
+ }), qt = { class: "form-section-header" }, Lt = { class: "form-section-title" }, Mt = {
1675
+ key: 0,
1676
+ class: "form-section-subtitle"
1677
+ }, Nt = /* @__PURE__ */ D({
1678
+ __name: "SectionTitle",
1679
+ props: {
1680
+ modelValue: {},
1681
+ schema: {},
1682
+ formId: {},
1683
+ refKey: {}
1684
+ },
1685
+ setup(t) {
1686
+ const l = t.modelValue;
1687
+ return (e, a) => {
1688
+ var o, s, n, y, d;
1689
+ return v(), b(c(te), {
1690
+ size: ((o = c(l).grid) == null ? void 0 : o.xs) ?? "12",
1691
+ "size-sm": (s = c(l).grid) == null ? void 0 : s.sm,
1692
+ "size-md": (n = c(l).grid) == null ? void 0 : n.md,
1693
+ "size-lg": (y = c(l).grid) == null ? void 0 : y.lg,
1694
+ "size-xl": (d = c(l).grid) == null ? void 0 : d.xl,
1695
+ class: le(["form-section-container", c(l).className])
1696
+ }, {
1697
+ default: S(() => [
1698
+ I("div", qt, [
1699
+ I("h3", Lt, A(c(l).title), 1),
1700
+ c(l).subtitle ? (v(), $("p", Mt, A(c(l).subtitle), 1)) : O("", !0)
1701
+ ])
1702
+ ]),
1703
+ _: 1
1704
+ }, 8, ["size", "size-sm", "size-md", "size-lg", "size-xl", "class"]);
1705
+ };
1706
+ }
1707
+ }), jt = /* @__PURE__ */ re(Nt, [["__scopeId", "data-v-cf5d6e04"]]);
1708
+ function Zt(t, r, l) {
1709
+ const e = E({}), a = E({});
1710
+ function o(p, f, i) {
1711
+ a.value[p] = i, f.forEach((h) => {
1662
1712
  var C;
1663
- (C = e.value)[h] ?? (C[h] = []), e.value[h].includes(c) || e.value[h].push(c);
1664
- }), p(c);
1713
+ (C = e.value)[h] ?? (C[h] = []), e.value[h].includes(p) || e.value[h].push(p);
1714
+ }), d(p);
1665
1715
  }
1666
- function r(c) {
1667
- return Object.entries(e.value).filter(([, i]) => i.includes(c)).map(([i]) => i).reduce(
1668
- (i, h) => (i[h] = u.value[h] ?? n.value[h], i),
1716
+ function s(p) {
1717
+ return Object.entries(e.value).filter(([, i]) => i.includes(p)).map(([i]) => i).reduce(
1718
+ (i, h) => (i[h] = r.value[h] ?? l.value[h], i),
1669
1719
  {}
1670
1720
  );
1671
1721
  }
1672
- function o(c, v) {
1673
- return c ? Array.isArray(c) ? c.some((i) => v.some((h) => y(i, h.value))) : v.some((i) => y(c, i.value)) : !1;
1722
+ function n(p, f) {
1723
+ return p ? Array.isArray(p) ? p.some((i) => f.some((h) => y(i, h.value))) : f.some((i) => y(p, i.value)) : !1;
1674
1724
  }
1675
- function y(c, v) {
1676
- return typeof c == "object" && c !== null ? c.value === v : String(c) === String(v);
1725
+ function y(p, f) {
1726
+ return typeof p == "object" && p !== null ? p.value === f : String(p) === String(f);
1677
1727
  }
1678
- async function p(c, v) {
1679
- if (!l.value[c]) return;
1680
- const i = r(c), h = Object.keys(i);
1728
+ async function d(p, f) {
1729
+ if (!a.value[p]) return;
1730
+ const i = s(p), h = Object.keys(i);
1681
1731
  if (!(h.length === 0 || !h.every(
1682
- (x) => i[x] !== void 0 && i[x] !== null
1732
+ (F) => i[F] !== void 0 && i[F] !== null
1683
1733
  )))
1684
1734
  try {
1685
- const x = l.value[c], w = await x(v, i);
1686
- if (!t.value[c]) return;
1687
- t.value[c].options = w;
1688
- const R = t.value[c].value;
1689
- if (!R) return;
1690
- o(R, w) || (t.value[c].value = t.value[c].multiple ? [] : "");
1691
- } catch (x) {
1692
- console.error(`Error loading options for ${c}:`, x);
1735
+ const F = a.value[p], w = await F(f, i);
1736
+ if (!t.value[p]) return;
1737
+ const R = t.value[p];
1738
+ if (!G(R)) return;
1739
+ R.options = w;
1740
+ const z = R.value;
1741
+ if (!z) return;
1742
+ n(z, w) || (R.value = R.multiple ? [] : "");
1743
+ } catch (F) {
1744
+ console.error(`Error loading options for ${p}:`, F);
1693
1745
  }
1694
1746
  }
1695
- return D(
1696
- [u, n],
1747
+ return T(
1748
+ [r, l],
1697
1749
  () => {
1698
- Object.entries(e.value).forEach(([c, v]) => {
1699
- (u.value[c] !== void 0 || n.value[c] !== void 0) && v.forEach((i) => {
1700
- p(i);
1750
+ Object.entries(e.value).forEach(([p, f]) => {
1751
+ (r.value[p] !== void 0 || l.value[p] !== void 0) && f.forEach((i) => {
1752
+ d(i);
1701
1753
  });
1702
1754
  });
1703
1755
  },
1704
1756
  { deep: !0, immediate: !0 }
1705
1757
  ), {
1706
- registerDependency: s,
1707
- updateOptions: p
1758
+ registerDependency: o,
1759
+ updateOptions: d
1708
1760
  };
1709
1761
  }
1710
- const Mt = {
1762
+ const Jt = {
1711
1763
  install(t) {
1712
- t.component("VForm", Vt), t.component("TextInput", kt), t.component("DateInput", St), t.component("NumberInput", wt), t.component("EmailInput", Ot), t.component("PasswordInput", Et), t.component("SelectInput", Rt), t.component("TextAreaInput", At), t.component("RepeatInput", Bt), t.component("CheckboxInput", Pt), t.component("RadioInput", It), t.directive("maskito", Me);
1764
+ t.component("VForm", St), t.component("TextInput", Ot), t.component("DateInput", Et), t.component("NumberInput", xt), t.component("EmailInput", Rt), t.component("PasswordInput", Ft), t.component("SelectInput", At), t.component("TextAreaInput", $t), t.component("RepeatInput", Ut), t.component("CheckboxInput", Dt), t.component("RadioInput", Tt), t.component("FormSection", jt), t.directive("maskito", je);
1713
1765
  }
1714
1766
  };
1715
1767
  export {
1716
- Mt as VForm,
1717
- Mt as default,
1718
- Qe as useDataTransformation,
1719
- Lt as useDependentOptions,
1720
- Se as useFormValidation,
1721
- ue as useInputValidation,
1722
- Xe as useMultiStepForm
1768
+ Jt as VForm,
1769
+ Jt as default,
1770
+ et as useDataTransformation,
1771
+ Zt as useDependentOptions,
1772
+ Oe as useFormValidation,
1773
+ ie as useInputValidation,
1774
+ tt as useMultiStepForm
1723
1775
  };
1724
1776
  //# sourceMappingURL=index.es.js.map