pdap-design-system 2.0.2 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,75 +1,75 @@
1
- import { defineComponent as R, reactive as I, openBlock as v, createElementBlock as w, normalizeClass as B, renderSlot as G, createBlock as j, resolveDynamicComponent as ae, withCtx as E, inject as Y, resolveComponent as Le, createVNode as U, createElementVNode as P, Fragment as ee, renderList as fe, unref as d, toDisplayString as z, createCommentVNode as F, createTextVNode as q, getCurrentInstance as Qe, ref as x, onBeforeMount as Ve, watch as W, isRef as pe, onBeforeUnmount as $e, computed as y, isReactive as Ze, isReadonly as Je, provide as we, nextTick as te, watchEffect as se, mergeProps as Ye, withModifiers as et, normalizeProps as tt, guardReactiveProps as rt, normalizeStyle as ge, onMounted as nt } from "vue";
2
- import { RouterLink as ke, useRouter as at } from "vue-router";
3
- const st = /* @__PURE__ */ R({
1
+ import { defineComponent as j, reactive as C, openBlock as v, createElementBlock as b, normalizeClass as G, renderSlot as K, createBlock as A, resolveDynamicComponent as me, withCtx as E, inject as J, resolveComponent as Qe, createVNode as Y, createElementVNode as P, Fragment as ee, renderList as fe, unref as c, toDisplayString as D, createCommentVNode as q, createTextVNode as B, getCurrentInstance as Ze, ref as x, onBeforeMount as Ve, watch as X, isRef as ce, onBeforeUnmount as $e, computed as _, isReactive as Je, isReadonly as Ye, provide as be, nextTick as te, mergeProps as de, watchEffect as Pe, withModifiers as et, normalizeStyle as ge, onMounted as tt } from "vue";
2
+ import { RouterLink as Se, useRouter as rt } from "vue-router";
3
+ const nt = /* @__PURE__ */ j({
4
4
  __name: "PdapButton",
5
5
  props: {
6
6
  intent: { default: "primary" },
7
7
  isLoading: { type: Boolean, default: !1 }
8
8
  },
9
9
  setup(e) {
10
- const t = e, r = I({
10
+ const t = e, r = C({
11
11
  "pdap-button": !0,
12
12
  [`pdap-button-${t.intent}`]: !!t.intent,
13
13
  "pdap-button-loading": t.isLoading
14
14
  });
15
- return (n, a) => (v(), w("button", {
16
- class: B(r)
15
+ return (n, a) => (v(), b("button", {
16
+ class: G(r)
17
17
  }, [
18
- G(n.$slots, "default")
18
+ K(n.$slots, "default")
19
19
  ], 2));
20
20
  }
21
21
  });
22
- const Se = /* @__PURE__ */ R({
22
+ const ke = /* @__PURE__ */ j({
23
23
  __name: "FlexContainer",
24
24
  props: {
25
25
  alignment: { default: "start" },
26
26
  component: { default: "div" }
27
27
  },
28
28
  setup(e) {
29
- const r = I({
29
+ const r = C({
30
30
  "pdap-flex-container": !0,
31
31
  [`pdap-flex-container-${e.alignment}`]: !0
32
32
  });
33
- return (n, a) => (v(), j(ae(n.component), {
34
- class: B(r)
33
+ return (n, a) => (v(), A(me(n.component), {
34
+ class: G(r)
35
35
  }, {
36
36
  default: E(() => [
37
- G(n.$slots, "default")
37
+ K(n.$slots, "default")
38
38
  ]),
39
39
  _: 3
40
40
  }, 8, ["class"]));
41
41
  }
42
42
  });
43
- const ot = { class: "pdap-footer" }, it = { class: "pdap-footer-social-links" }, ut = ["href"], lt = /* @__PURE__ */ P("p", { class: "pdap-footer-copyright" }, [
44
- /* @__PURE__ */ q(" © 2023 Police Data Accessibility Project"),
43
+ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" }, ot = ["href"], it = /* @__PURE__ */ P("p", { class: "pdap-footer-copyright" }, [
44
+ /* @__PURE__ */ B(" © 2023 Police Data Accessibility Project"),
45
45
  /* @__PURE__ */ P("br")
46
- ], -1), ct = /* @__PURE__ */ P("p", { class: "pdap-footer-copyright" }, [
47
- /* @__PURE__ */ q(" PDAP is a non-profit. EIN: 85-4207132. "),
46
+ ], -1), ut = /* @__PURE__ */ P("p", { class: "pdap-footer-copyright" }, [
47
+ /* @__PURE__ */ B(" PDAP is a non-profit. EIN: 85-4207132. "),
48
48
  /* @__PURE__ */ P("a", {
49
49
  href: "https://docs.pdap.io/meta/policy/pdap-privacy-policy",
50
50
  alt: "Privacy Policy"
51
51
  }, " Privacy Policy"),
52
- /* @__PURE__ */ q(". "),
52
+ /* @__PURE__ */ B(". "),
53
53
  /* @__PURE__ */ P("a", { href: "mailto:contact@pdap.io" }, "contact@pdap.io")
54
- ], -1), dt = { class: "pdap-footer-widget-links" }, pt = /* @__PURE__ */ P("a", {
54
+ ], -1), lt = { class: "pdap-footer-widget-links" }, ct = /* @__PURE__ */ P("a", {
55
55
  href: "https://www.guidestar.org/profile/85-4207132",
56
56
  target: "_blank"
57
57
  }, [
58
58
  /* @__PURE__ */ P("img", { src: "https://widgets.guidestar.org/gximage2?o=9973356&l=v4" })
59
- ], -1), mt = ["href"], ft = ["src"], $t = ["src"], on = /* @__PURE__ */ R({
59
+ ], -1), dt = ["href"], pt = ["src"], mt = ["src"], Zr = /* @__PURE__ */ j({
60
60
  __name: "PdapFooter",
61
61
  props: {
62
62
  logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/acronym.svg" },
63
63
  logoImageAnchorPath: { default: "/" }
64
64
  },
65
65
  setup(e) {
66
- const t = e, r = Y("footerLinks", [
66
+ const t = e, r = J("footerLinks", [
67
67
  {
68
68
  href: "https://github.com/orgs/Police-Data-Accessibility-Project",
69
69
  text: "Github"
70
70
  },
71
71
  {
72
- href: "ttps://discord.gg/wMqex8nKZJ",
72
+ href: "https://discord.gg/wMqex8nKZJ",
73
73
  text: "Discord"
74
74
  },
75
75
  {
@@ -82,41 +82,41 @@ const ot = { class: "pdap-footer" }, it = { class: "pdap-footer-social-links" },
82
82
  }
83
83
  ]), n = t.logoImageAnchorPath.startsWith("/");
84
84
  return (a, s) => {
85
- const o = Le("router-link");
86
- return v(), w("footer", ot, [
87
- U(Se, { alignment: "center" }, {
85
+ const i = Qe("router-link");
86
+ return v(), b("footer", at, [
87
+ Y(ke, { alignment: "center" }, {
88
88
  default: E(() => [
89
- P("ul", it, [
90
- (v(!0), w(ee, null, fe(d(r), (i) => (v(), w("li", {
91
- key: i.text,
89
+ P("ul", st, [
90
+ (v(!0), b(ee, null, fe(c(r), (u) => (v(), b("li", {
91
+ key: u.text,
92
92
  class: "pdap-footer-link-container"
93
93
  }, [
94
- i.href ? (v(), w("a", {
94
+ u.href ? (v(), b("a", {
95
95
  key: 0,
96
96
  class: "pdap-footer-social-link",
97
- href: i.href,
97
+ href: u.href,
98
98
  target: "_blank",
99
99
  referrerpolicy: "no-referrer"
100
- }, z(i.text), 9, ut)) : F("", !0),
101
- i.path ? (v(), j(o, {
100
+ }, D(u.text), 9, ot)) : q("", !0),
101
+ u.path ? (v(), A(i, {
102
102
  key: 1,
103
103
  "active-class": "pdap-footer-social-link-current",
104
104
  "exact-active-class": "pdap-footer-social-link-current-exact",
105
105
  class: "pdap-footer-social-link",
106
- to: i.path
106
+ to: u.path
107
107
  }, {
108
108
  default: E(() => [
109
- q(z(i.text), 1)
109
+ B(D(u.text), 1)
110
110
  ]),
111
111
  _: 2
112
- }, 1032, ["to"])) : F("", !0)
112
+ }, 1032, ["to"])) : q("", !0)
113
113
  ]))), 128))
114
114
  ]),
115
- lt,
116
- ct,
117
- P("div", dt, [
118
- pt,
119
- d(n) ? (v(), j(o, {
115
+ it,
116
+ ut,
117
+ P("div", lt, [
118
+ ct,
119
+ c(n) ? (v(), A(i, {
120
120
  key: 1,
121
121
  to: a.logoImageAnchorPath,
122
122
  class: "pdap-footer-logo"
@@ -127,10 +127,10 @@ const ot = { class: "pdap-footer" }, it = { class: "pdap-footer-social-links" },
127
127
  loading: "lazy",
128
128
  width: "250",
129
129
  alt: "Police Data Accessibility Project Logo"
130
- }, null, 8, $t)
130
+ }, null, 8, mt)
131
131
  ]),
132
132
  _: 1
133
- }, 8, ["to"])) : (v(), w("a", {
133
+ }, 8, ["to"])) : (v(), b("a", {
134
134
  key: 0,
135
135
  href: a.logoImageAnchorPath,
136
136
  class: "pdap-footer-logo"
@@ -140,8 +140,8 @@ const ot = { class: "pdap-footer" }, it = { class: "pdap-footer-social-links" },
140
140
  loading: "lazy",
141
141
  width: "250",
142
142
  alt: "Police Data Accessibility Project Logo"
143
- }, null, 8, ft)
144
- ], 8, mt))
143
+ }, null, 8, pt)
144
+ ], 8, dt))
145
145
  ])
146
146
  ]),
147
147
  _: 1
@@ -150,7 +150,7 @@ const ot = { class: "pdap-footer" }, it = { class: "pdap-footer-social-links" },
150
150
  };
151
151
  }
152
152
  });
153
- function Pe(e, t) {
153
+ function xe(e, t) {
154
154
  var r = Object.keys(e);
155
155
  if (Object.getOwnPropertySymbols) {
156
156
  var n = Object.getOwnPropertySymbols(e);
@@ -160,18 +160,18 @@ function Pe(e, t) {
160
160
  }
161
161
  return r;
162
162
  }
163
- function L(e) {
163
+ function V(e) {
164
164
  for (var t = 1; t < arguments.length; t++) {
165
165
  var r = arguments[t] != null ? arguments[t] : {};
166
- t % 2 ? Pe(Object(r), !0).forEach(function(n) {
167
- gt(e, n, r[n]);
168
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Pe(Object(r)).forEach(function(n) {
166
+ t % 2 ? xe(Object(r), !0).forEach(function(n) {
167
+ ft(e, n, r[n]);
168
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : xe(Object(r)).forEach(function(n) {
169
169
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
170
170
  });
171
171
  }
172
172
  return e;
173
173
  }
174
- function gt(e, t, r) {
174
+ function ft(e, t, r) {
175
175
  return t in e ? Object.defineProperty(e, t, {
176
176
  value: r,
177
177
  enumerable: !0,
@@ -179,17 +179,17 @@ function gt(e, t, r) {
179
179
  writable: !0
180
180
  }) : e[t] = r, e;
181
181
  }
182
- function xe(e) {
182
+ function Re(e) {
183
183
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
184
- return Object.keys(e).reduce((r, n) => (t.includes(n) || (r[n] = d(e[n])), r), {});
184
+ return Object.keys(e).reduce((r, n) => (t.includes(n) || (r[n] = c(e[n])), r), {});
185
185
  }
186
186
  function re(e) {
187
187
  return typeof e == "function";
188
188
  }
189
- function ht(e) {
190
- return Ze(e) || Je(e);
189
+ function $t(e) {
190
+ return Je(e) || Ye(e);
191
191
  }
192
- function De(e, t, r) {
192
+ function ze(e, t, r) {
193
193
  let n = e;
194
194
  const a = t.split(".");
195
195
  for (let s = 0; s < a.length; s++) {
@@ -199,45 +199,45 @@ function De(e, t, r) {
199
199
  }
200
200
  return n;
201
201
  }
202
- function de(e, t, r) {
203
- return y(() => e.some((n) => De(t, n, {
202
+ function le(e, t, r) {
203
+ return _(() => e.some((n) => ze(t, n, {
204
204
  [r]: !1
205
205
  })[r]));
206
206
  }
207
- function Re(e, t, r) {
208
- return y(() => e.reduce((n, a) => {
209
- const s = De(t, a, {
207
+ function Oe(e, t, r) {
208
+ return _(() => e.reduce((n, a) => {
209
+ const s = ze(t, a, {
210
210
  [r]: !1
211
211
  })[r] || [];
212
212
  return n.concat(s);
213
213
  }, []));
214
214
  }
215
- function ze(e, t, r, n) {
216
- return e.call(n, d(t), d(r), n);
215
+ function Me(e, t, r, n) {
216
+ return e.call(n, c(t), c(r), n);
217
217
  }
218
- function Me(e) {
218
+ function De(e) {
219
219
  return e.$valid !== void 0 ? !e.$valid : !e;
220
220
  }
221
- function vt(e, t, r, n, a, s, o) {
221
+ function gt(e, t, r, n, a, s, i) {
222
222
  let {
223
- $lazy: i,
224
- $rewardEarly: c
225
- } = a, l = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], p = arguments.length > 8 ? arguments[8] : void 0, f = arguments.length > 9 ? arguments[9] : void 0, g = arguments.length > 10 ? arguments[10] : void 0;
226
- const h = x(!!n.value), u = x(0);
223
+ $lazy: u,
224
+ $rewardEarly: l
225
+ } = a, p = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], d = arguments.length > 8 ? arguments[8] : void 0, f = arguments.length > 9 ? arguments[9] : void 0, g = arguments.length > 10 ? arguments[10] : void 0;
226
+ const h = x(!!n.value), o = x(0);
227
227
  r.value = !1;
228
- const m = W([t, n].concat(l, g), () => {
229
- if (i && !n.value || c && !f.value && !r.value)
228
+ const m = X([t, n].concat(p, g), () => {
229
+ if (u && !n.value || l && !f.value && !r.value)
230
230
  return;
231
231
  let $;
232
232
  try {
233
- $ = ze(e, t, p, o);
234
- } catch (_) {
235
- $ = Promise.reject(_);
233
+ $ = Me(e, t, d, i);
234
+ } catch (y) {
235
+ $ = Promise.reject(y);
236
236
  }
237
- u.value++, r.value = !!u.value, h.value = !1, Promise.resolve($).then((_) => {
238
- u.value--, r.value = !!u.value, s.value = _, h.value = Me(_);
239
- }).catch((_) => {
240
- u.value--, r.value = !!u.value, s.value = _, h.value = !0;
237
+ o.value++, r.value = !!o.value, h.value = !1, Promise.resolve($).then((y) => {
238
+ o.value--, r.value = !!o.value, s.value = y, h.value = De(y);
239
+ }).catch((y) => {
240
+ o.value--, r.value = !!o.value, s.value = y, h.value = !0;
241
241
  });
242
242
  }, {
243
243
  immediate: !0,
@@ -248,97 +248,97 @@ function vt(e, t, r, n, a, s, o) {
248
248
  $unwatch: m
249
249
  };
250
250
  }
251
- function yt(e, t, r, n, a, s, o, i) {
251
+ function ht(e, t, r, n, a, s, i, u) {
252
252
  let {
253
- $lazy: c,
254
- $rewardEarly: l
253
+ $lazy: l,
254
+ $rewardEarly: p
255
255
  } = n;
256
- const p = () => ({}), f = y(() => {
257
- if (c && !r.value || l && !i.value)
256
+ const d = () => ({}), f = _(() => {
257
+ if (l && !r.value || p && !u.value)
258
258
  return !1;
259
259
  let g = !0;
260
260
  try {
261
- const h = ze(e, t, o, s);
262
- a.value = h, g = Me(h);
261
+ const h = Me(e, t, i, s);
262
+ a.value = h, g = De(h);
263
263
  } catch (h) {
264
264
  a.value = h;
265
265
  }
266
266
  return g;
267
267
  });
268
268
  return {
269
- $unwatch: p,
269
+ $unwatch: d,
270
270
  $invalid: f
271
271
  };
272
272
  }
273
- function _t(e, t, r, n, a, s, o, i, c, l, p) {
273
+ function vt(e, t, r, n, a, s, i, u, l, p, d) {
274
274
  const f = x(!1), g = e.$params || {}, h = x(null);
275
- let u, m;
275
+ let o, m;
276
276
  e.$async ? {
277
- $invalid: u,
277
+ $invalid: o,
278
278
  $unwatch: m
279
- } = vt(e.$validator, t, f, r, n, h, a, e.$watchTargets, c, l, p) : {
280
- $invalid: u,
279
+ } = gt(e.$validator, t, f, r, n, h, a, e.$watchTargets, l, p, d) : {
280
+ $invalid: o,
281
281
  $unwatch: m
282
- } = yt(e.$validator, t, r, n, h, a, c, l);
282
+ } = ht(e.$validator, t, r, n, h, a, l, p);
283
283
  const $ = e.$message;
284
284
  return {
285
- $message: re($) ? y(() => $(xe({
285
+ $message: re($) ? _(() => $(Re({
286
286
  $pending: f,
287
- $invalid: u,
288
- $params: xe(g),
287
+ $invalid: o,
288
+ $params: Re(g),
289
289
  $model: t,
290
290
  $response: h,
291
291
  $validator: s,
292
- $propertyPath: i,
293
- $property: o
292
+ $propertyPath: u,
293
+ $property: i
294
294
  }))) : $ || "",
295
295
  $params: g,
296
296
  $pending: f,
297
- $invalid: u,
297
+ $invalid: o,
298
298
  $response: h,
299
299
  $unwatch: m
300
300
  };
301
301
  }
302
- function bt() {
302
+ function yt() {
303
303
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
304
- const t = d(e), r = Object.keys(t), n = {}, a = {}, s = {};
305
- let o = null;
306
- return r.forEach((i) => {
307
- const c = t[i];
304
+ const t = c(e), r = Object.keys(t), n = {}, a = {}, s = {};
305
+ let i = null;
306
+ return r.forEach((u) => {
307
+ const l = t[u];
308
308
  switch (!0) {
309
- case re(c.$validator):
310
- n[i] = c;
309
+ case re(l.$validator):
310
+ n[u] = l;
311
311
  break;
312
- case re(c):
313
- n[i] = {
314
- $validator: c
312
+ case re(l):
313
+ n[u] = {
314
+ $validator: l
315
315
  };
316
316
  break;
317
- case i === "$validationGroups":
318
- o = c;
317
+ case u === "$validationGroups":
318
+ i = l;
319
319
  break;
320
- case i.startsWith("$"):
321
- s[i] = c;
320
+ case u.startsWith("$"):
321
+ s[u] = l;
322
322
  break;
323
323
  default:
324
- a[i] = c;
324
+ a[u] = l;
325
325
  }
326
326
  }), {
327
327
  rules: n,
328
328
  nestedValidators: a,
329
329
  config: s,
330
- validationGroups: o
330
+ validationGroups: i
331
331
  };
332
332
  }
333
- const wt = "__root";
334
- function Pt(e, t, r, n, a, s, o, i, c) {
335
- const l = Object.keys(e), p = n.get(a, e), f = x(!1), g = x(!1), h = x(0);
336
- if (p) {
337
- if (!p.$partial)
338
- return p;
339
- p.$unwatch(), f.value = p.$dirty.value;
333
+ const _t = "__root";
334
+ function wt(e, t, r, n, a, s, i, u, l) {
335
+ const p = Object.keys(e), d = n.get(a, e), f = x(!1), g = x(!1), h = x(0);
336
+ if (d) {
337
+ if (!d.$partial)
338
+ return d;
339
+ d.$unwatch(), f.value = d.$dirty.value;
340
340
  }
341
- const u = {
341
+ const o = {
342
342
  $dirty: f,
343
343
  $path: a,
344
344
  $touch: () => {
@@ -350,9 +350,9 @@ function Pt(e, t, r, n, a, s, o, i, c) {
350
350
  $commit: () => {
351
351
  }
352
352
  };
353
- return l.length ? (l.forEach((m) => {
354
- u[m] = _t(e[m], t, u.$dirty, s, o, m, r, a, c, g, h);
355
- }), u.$externalResults = y(() => i.value ? [].concat(i.value).map((m, $) => ({
353
+ return p.length ? (p.forEach((m) => {
354
+ o[m] = vt(e[m], t, o.$dirty, s, i, m, r, a, l, g, h);
355
+ }), o.$externalResults = _(() => u.value ? [].concat(u.value).map((m, $) => ({
356
356
  $propertyPath: a,
357
357
  $property: r,
358
358
  $validator: "$externalResults",
@@ -361,12 +361,12 @@ function Pt(e, t, r, n, a, s, o, i, c) {
361
361
  $params: {},
362
362
  $response: null,
363
363
  $pending: !1
364
- })) : []), u.$invalid = y(() => {
365
- const m = l.some(($) => d(u[$].$invalid));
366
- return g.value = m, !!u.$externalResults.value.length || m;
367
- }), u.$pending = y(() => l.some((m) => d(u[m].$pending))), u.$error = y(() => u.$dirty.value ? u.$pending.value || u.$invalid.value : !1), u.$silentErrors = y(() => l.filter((m) => d(u[m].$invalid)).map((m) => {
368
- const $ = u[m];
369
- return I({
364
+ })) : []), o.$invalid = _(() => {
365
+ const m = p.some(($) => c(o[$].$invalid));
366
+ return g.value = m, !!o.$externalResults.value.length || m;
367
+ }), o.$pending = _(() => p.some((m) => c(o[m].$pending))), o.$error = _(() => o.$dirty.value ? o.$pending.value || o.$invalid.value : !1), o.$silentErrors = _(() => p.filter((m) => c(o[m].$invalid)).map((m) => {
368
+ const $ = o[m];
369
+ return C({
370
370
  $propertyPath: a,
371
371
  $property: r,
372
372
  $validator: m,
@@ -376,163 +376,163 @@ function Pt(e, t, r, n, a, s, o, i, c) {
376
376
  $response: $.$response,
377
377
  $pending: $.$pending
378
378
  });
379
- }).concat(u.$externalResults.value)), u.$errors = y(() => u.$dirty.value ? u.$silentErrors.value : []), u.$unwatch = () => l.forEach((m) => {
380
- u[m].$unwatch();
381
- }), u.$commit = () => {
379
+ }).concat(o.$externalResults.value)), o.$errors = _(() => o.$dirty.value ? o.$silentErrors.value : []), o.$unwatch = () => p.forEach((m) => {
380
+ o[m].$unwatch();
381
+ }), o.$commit = () => {
382
382
  g.value = !0, h.value = Date.now();
383
- }, n.set(a, e, u), u) : (p && n.set(a, e, u), u);
383
+ }, n.set(a, e, o), o) : (d && n.set(a, e, o), o);
384
384
  }
385
- function xt(e, t, r, n, a, s, o) {
386
- const i = Object.keys(e);
387
- return i.length ? i.reduce((c, l) => (c[l] = me({
388
- validations: e[l],
385
+ function bt(e, t, r, n, a, s, i) {
386
+ const u = Object.keys(e);
387
+ return u.length ? u.reduce((l, p) => (l[p] = pe({
388
+ validations: e[p],
389
389
  state: t,
390
- key: l,
390
+ key: p,
391
391
  parentKey: r,
392
392
  resultsCache: n,
393
393
  globalConfig: a,
394
394
  instance: s,
395
- externalResults: o
396
- }), c), {}) : {};
395
+ externalResults: i
396
+ }), l), {}) : {};
397
397
  }
398
- function Rt(e, t, r) {
399
- const n = y(() => [t, r].filter((u) => u).reduce((u, m) => u.concat(Object.values(d(m))), [])), a = y({
398
+ function Pt(e, t, r) {
399
+ const n = _(() => [t, r].filter((o) => o).reduce((o, m) => o.concat(Object.values(c(m))), [])), a = _({
400
400
  get() {
401
- return e.$dirty.value || (n.value.length ? n.value.every((u) => u.$dirty) : !1);
401
+ return e.$dirty.value || (n.value.length ? n.value.every((o) => o.$dirty) : !1);
402
402
  },
403
- set(u) {
404
- e.$dirty.value = u;
403
+ set(o) {
404
+ e.$dirty.value = o;
405
405
  }
406
- }), s = y(() => {
407
- const u = d(e.$silentErrors) || [], m = n.value.filter(($) => (d($).$silentErrors || []).length).reduce(($, _) => $.concat(..._.$silentErrors), []);
408
- return u.concat(m);
409
- }), o = y(() => {
410
- const u = d(e.$errors) || [], m = n.value.filter(($) => (d($).$errors || []).length).reduce(($, _) => $.concat(..._.$errors), []);
411
- return u.concat(m);
412
- }), i = y(() => n.value.some((u) => u.$invalid) || d(e.$invalid) || !1), c = y(() => n.value.some((u) => d(u.$pending)) || d(e.$pending) || !1), l = y(() => n.value.some((u) => u.$dirty) || n.value.some((u) => u.$anyDirty) || a.value), p = y(() => a.value ? c.value || i.value : !1), f = () => {
413
- e.$touch(), n.value.forEach((u) => {
414
- u.$touch();
406
+ }), s = _(() => {
407
+ const o = c(e.$silentErrors) || [], m = n.value.filter(($) => (c($).$silentErrors || []).length).reduce(($, y) => $.concat(...y.$silentErrors), []);
408
+ return o.concat(m);
409
+ }), i = _(() => {
410
+ const o = c(e.$errors) || [], m = n.value.filter(($) => (c($).$errors || []).length).reduce(($, y) => $.concat(...y.$errors), []);
411
+ return o.concat(m);
412
+ }), u = _(() => n.value.some((o) => o.$invalid) || c(e.$invalid) || !1), l = _(() => n.value.some((o) => c(o.$pending)) || c(e.$pending) || !1), p = _(() => n.value.some((o) => o.$dirty) || n.value.some((o) => o.$anyDirty) || a.value), d = _(() => a.value ? l.value || u.value : !1), f = () => {
413
+ e.$touch(), n.value.forEach((o) => {
414
+ o.$touch();
415
415
  });
416
416
  }, g = () => {
417
- e.$commit(), n.value.forEach((u) => {
418
- u.$commit();
417
+ e.$commit(), n.value.forEach((o) => {
418
+ o.$commit();
419
419
  });
420
420
  }, h = () => {
421
- e.$reset(), n.value.forEach((u) => {
422
- u.$reset();
421
+ e.$reset(), n.value.forEach((o) => {
422
+ o.$reset();
423
423
  });
424
424
  };
425
- return n.value.length && n.value.every((u) => u.$dirty) && f(), {
425
+ return n.value.length && n.value.every((o) => o.$dirty) && f(), {
426
426
  $dirty: a,
427
- $errors: o,
428
- $invalid: i,
429
- $anyDirty: l,
430
- $error: p,
431
- $pending: c,
427
+ $errors: i,
428
+ $invalid: u,
429
+ $anyDirty: p,
430
+ $error: d,
431
+ $pending: l,
432
432
  $touch: f,
433
433
  $reset: h,
434
434
  $silentErrors: s,
435
435
  $commit: g
436
436
  };
437
437
  }
438
- function me(e) {
438
+ function pe(e) {
439
439
  let {
440
440
  validations: t,
441
441
  state: r,
442
442
  key: n,
443
443
  parentKey: a,
444
444
  childResults: s,
445
- resultsCache: o,
446
- globalConfig: i = {},
447
- instance: c,
448
- externalResults: l
445
+ resultsCache: i,
446
+ globalConfig: u = {},
447
+ instance: l,
448
+ externalResults: p
449
449
  } = e;
450
- const p = a ? `${a}.${n}` : n, {
450
+ const d = a ? `${a}.${n}` : n, {
451
451
  rules: f,
452
452
  nestedValidators: g,
453
453
  config: h,
454
- validationGroups: u
455
- } = bt(t), m = L(L({}, i), h), $ = n ? y(() => {
456
- const b = d(r);
457
- return b ? d(b[n]) : void 0;
458
- }) : r, _ = L({}, d(l) || {}), N = y(() => {
459
- const b = d(l);
460
- return n ? b ? d(b[n]) : void 0 : b;
461
- }), ie = Pt(f, $, n, o, p, m, c, N, r), C = xt(g, $, p, o, m, c, N), S = {};
462
- u && Object.entries(u).forEach((b) => {
463
- let [D, T] = b;
464
- S[D] = {
465
- $invalid: de(T, C, "$invalid"),
466
- $error: de(T, C, "$error"),
467
- $pending: de(T, C, "$pending"),
468
- $errors: Re(T, C, "$errors"),
469
- $silentErrors: Re(T, C, "$silentErrors")
454
+ validationGroups: o
455
+ } = yt(t), m = V(V({}, u), h), $ = n ? _(() => {
456
+ const w = c(r);
457
+ return w ? c(w[n]) : void 0;
458
+ }) : r, y = V({}, c(p) || {}), F = _(() => {
459
+ const w = c(p);
460
+ return n ? w ? c(w[n]) : void 0 : w;
461
+ }), se = wt(f, $, n, i, d, m, l, F, r), O = bt(g, $, d, i, m, l, F), z = {};
462
+ o && Object.entries(o).forEach((w) => {
463
+ let [M, L] = w;
464
+ z[M] = {
465
+ $invalid: le(L, O, "$invalid"),
466
+ $error: le(L, O, "$error"),
467
+ $pending: le(L, O, "$pending"),
468
+ $errors: Oe(L, O, "$errors"),
469
+ $silentErrors: Oe(L, O, "$silentErrors")
470
470
  };
471
471
  });
472
472
  const {
473
- $dirty: A,
474
- $errors: Z,
475
- $invalid: ue,
476
- $anyDirty: qe,
477
- $error: He,
478
- $pending: le,
479
- $touch: ce,
480
- $reset: Be,
473
+ $dirty: I,
474
+ $errors: Q,
475
+ $invalid: oe,
476
+ $anyDirty: Fe,
477
+ $error: Be,
478
+ $pending: ie,
479
+ $touch: ue,
480
+ $reset: He,
481
481
  $silentErrors: Ge,
482
- $commit: be
483
- } = Rt(ie, C, s), Ue = n ? y({
484
- get: () => d($),
485
- set: (b) => {
486
- A.value = !0;
487
- const D = d(r), T = d(l);
488
- T && (T[n] = _[n]), pe(D[n]) ? D[n].value = b : D[n] = b;
482
+ $commit: we
483
+ } = Pt(se, O, s), Xe = n ? _({
484
+ get: () => c($),
485
+ set: (w) => {
486
+ I.value = !0;
487
+ const M = c(r), L = c(p);
488
+ L && (L[n] = y[n]), ce(M[n]) ? M[n].value = w : M[n] = w;
489
489
  }
490
490
  }) : null;
491
- n && m.$autoDirty && W($, () => {
492
- A.value || ce();
493
- const b = d(l);
494
- b && (b[n] = _[n]);
491
+ n && m.$autoDirty && X($, () => {
492
+ I.value || ue();
493
+ const w = c(p);
494
+ w && (w[n] = y[n]);
495
495
  }, {
496
496
  flush: "sync"
497
497
  });
498
498
  async function We() {
499
- return ce(), m.$rewardEarly && (be(), await te()), await te(), new Promise((b) => {
500
- if (!le.value)
501
- return b(!ue.value);
502
- const D = W(le, () => {
503
- b(!ue.value), D();
499
+ return ue(), m.$rewardEarly && (we(), await te()), await te(), new Promise((w) => {
500
+ if (!ie.value)
501
+ return w(!oe.value);
502
+ const M = X(ie, () => {
503
+ w(!oe.value), M();
504
504
  });
505
505
  });
506
506
  }
507
- function Xe(b) {
508
- return (s.value || {})[b];
507
+ function Ue(w) {
508
+ return (s.value || {})[w];
509
509
  }
510
510
  function Ke() {
511
- pe(l) ? l.value = _ : Object.keys(_).length === 0 ? Object.keys(l).forEach((b) => {
512
- delete l[b];
513
- }) : Object.assign(l, _);
511
+ ce(p) ? p.value = y : Object.keys(y).length === 0 ? Object.keys(p).forEach((w) => {
512
+ delete p[w];
513
+ }) : Object.assign(p, y);
514
514
  }
515
- return I(L(L(L({}, ie), {}, {
516
- $model: Ue,
517
- $dirty: A,
518
- $error: He,
519
- $errors: Z,
520
- $invalid: ue,
521
- $anyDirty: qe,
522
- $pending: le,
523
- $touch: ce,
524
- $reset: Be,
525
- $path: p || wt,
515
+ return C(V(V(V({}, se), {}, {
516
+ $model: Xe,
517
+ $dirty: I,
518
+ $error: Be,
519
+ $errors: Q,
520
+ $invalid: oe,
521
+ $anyDirty: Fe,
522
+ $pending: ie,
523
+ $touch: ue,
524
+ $reset: He,
525
+ $path: d || _t,
526
526
  $silentErrors: Ge,
527
527
  $validate: We,
528
- $commit: be
528
+ $commit: we
529
529
  }, s && {
530
- $getResultsForChild: Xe,
530
+ $getResultsForChild: Ue,
531
531
  $clearExternalResults: Ke,
532
- $validationGroups: S
533
- }), C));
532
+ $validationGroups: z
533
+ }), O));
534
534
  }
535
- class Ot {
535
+ class xt {
536
536
  constructor() {
537
537
  this.storage = /* @__PURE__ */ new Map();
538
538
  }
@@ -544,7 +544,7 @@ class Ot {
544
544
  }
545
545
  checkRulesValidity(t, r, n) {
546
546
  const a = Object.keys(n), s = Object.keys(r);
547
- return s.length !== a.length || !s.every((i) => a.includes(i)) ? !1 : s.every((i) => r[i].$params ? Object.keys(r[i].$params).every((c) => d(n[i].$params[c]) === d(r[i].$params[c])) : !0);
547
+ return s.length !== a.length || !s.every((u) => a.includes(u)) ? !1 : s.every((u) => r[u].$params ? Object.keys(r[u].$params).every((l) => c(n[u].$params[l]) === c(r[u].$params[l])) : !0);
548
548
  }
549
549
  get(t, r) {
550
550
  const n = this.storage.get(t);
@@ -553,285 +553,177 @@ class Ot {
553
553
  const {
554
554
  rules: a,
555
555
  result: s
556
- } = n, o = this.checkRulesValidity(t, r, a), i = s.$unwatch ? s.$unwatch : () => ({});
557
- return o ? s : {
556
+ } = n, i = this.checkRulesValidity(t, r, a), u = s.$unwatch ? s.$unwatch : () => ({});
557
+ return i ? s : {
558
558
  $dirty: s.$dirty,
559
559
  $partial: !0,
560
- $unwatch: i
560
+ $unwatch: u
561
561
  };
562
562
  }
563
563
  }
564
- const J = {
564
+ const Z = {
565
565
  COLLECT_ALL: !0,
566
566
  COLLECT_NONE: !1
567
- }, Oe = Symbol("vuelidate#injectChildResults"), Ce = Symbol("vuelidate#removeChildResults");
568
- function Ct(e) {
567
+ }, Ee = Symbol("vuelidate#injectChildResults"), Ce = Symbol("vuelidate#removeChildResults");
568
+ function Rt(e) {
569
569
  let {
570
570
  $scope: t,
571
571
  instance: r
572
572
  } = e;
573
- const n = {}, a = x([]), s = y(() => a.value.reduce((p, f) => (p[f] = d(n[f]), p), {}));
574
- function o(p, f) {
573
+ const n = {}, a = x([]), s = _(() => a.value.reduce((d, f) => (d[f] = c(n[f]), d), {}));
574
+ function i(d, f) {
575
575
  let {
576
576
  $registerAs: g,
577
577
  $scope: h,
578
- $stopPropagation: u
578
+ $stopPropagation: o
579
579
  } = f;
580
- u || t === J.COLLECT_NONE || h === J.COLLECT_NONE || t !== J.COLLECT_ALL && t !== h || (n[g] = p, a.value.push(g));
580
+ o || t === Z.COLLECT_NONE || h === Z.COLLECT_NONE || t !== Z.COLLECT_ALL && t !== h || (n[g] = d, a.value.push(g));
581
581
  }
582
- r.__vuelidateInjectInstances = [].concat(r.__vuelidateInjectInstances || [], o);
583
- function i(p) {
584
- a.value = a.value.filter((f) => f !== p), delete n[p];
582
+ r.__vuelidateInjectInstances = [].concat(r.__vuelidateInjectInstances || [], i);
583
+ function u(d) {
584
+ a.value = a.value.filter((f) => f !== d), delete n[d];
585
585
  }
586
- r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], i);
587
- const c = Y(Oe, []);
588
- we(Oe, r.__vuelidateInjectInstances);
589
- const l = Y(Ce, []);
590
- return we(Ce, r.__vuelidateRemoveInstances), {
586
+ r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], u);
587
+ const l = J(Ee, []);
588
+ be(Ee, r.__vuelidateInjectInstances);
589
+ const p = J(Ce, []);
590
+ return be(Ce, r.__vuelidateRemoveInstances), {
591
591
  childResults: s,
592
- sendValidationResultsToParent: c,
593
- removeValidationResultsFromParent: l
592
+ sendValidationResultsToParent: l,
593
+ removeValidationResultsFromParent: p
594
594
  };
595
595
  }
596
- function Ne(e) {
596
+ function qe(e) {
597
597
  return new Proxy(e, {
598
598
  get(t, r) {
599
- return typeof t[r] == "object" ? Ne(t[r]) : y(() => t[r]);
599
+ return typeof t[r] == "object" ? qe(t[r]) : _(() => t[r]);
600
600
  }
601
601
  });
602
602
  }
603
- let Ee = 0;
604
- function Et(e, t) {
603
+ let je = 0;
604
+ function Ot(e, t) {
605
605
  var r;
606
606
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
607
607
  arguments.length === 1 && (n = e, e = void 0, t = void 0);
608
608
  let {
609
609
  $registerAs: a,
610
- $scope: s = J.COLLECT_ALL,
611
- $stopPropagation: o,
612
- $externalResults: i,
613
- currentVueInstance: c
610
+ $scope: s = Z.COLLECT_ALL,
611
+ $stopPropagation: i,
612
+ $externalResults: u,
613
+ currentVueInstance: l
614
614
  } = n;
615
- const l = c || ((r = Qe()) === null || r === void 0 ? void 0 : r.proxy), p = l ? l.$options : {};
616
- a || (Ee += 1, a = `_vuelidate_${Ee}`);
617
- const f = x({}), g = new Ot(), {
615
+ const p = l || ((r = Ze()) === null || r === void 0 ? void 0 : r.proxy), d = p ? p.$options : {};
616
+ a || (je += 1, a = `_vuelidate_${je}`);
617
+ const f = x({}), g = new xt(), {
618
618
  childResults: h,
619
- sendValidationResultsToParent: u,
619
+ sendValidationResultsToParent: o,
620
620
  removeValidationResultsFromParent: m
621
- } = l ? Ct({
621
+ } = p ? Rt({
622
622
  $scope: s,
623
- instance: l
623
+ instance: p
624
624
  }) : {
625
625
  childResults: x({})
626
626
  };
627
- if (!e && p.validations) {
628
- const $ = p.validations;
627
+ if (!e && d.validations) {
628
+ const $ = d.validations;
629
629
  t = x({}), Ve(() => {
630
- t.value = l, W(() => re($) ? $.call(t.value, new Ne(t.value)) : $, (_) => {
631
- f.value = me({
632
- validations: _,
630
+ t.value = p, X(() => re($) ? $.call(t.value, new qe(t.value)) : $, (y) => {
631
+ f.value = pe({
632
+ validations: y,
633
633
  state: t,
634
634
  childResults: h,
635
635
  resultsCache: g,
636
636
  globalConfig: n,
637
- instance: l,
638
- externalResults: i || l.vuelidateExternalResults
637
+ instance: p,
638
+ externalResults: u || p.vuelidateExternalResults
639
639
  });
640
640
  }, {
641
641
  immediate: !0
642
642
  });
643
- }), n = p.validationsConfig || n;
643
+ }), n = d.validationsConfig || n;
644
644
  } else {
645
- const $ = pe(e) || ht(e) ? e : I(e || {});
646
- W($, (_) => {
647
- f.value = me({
648
- validations: _,
645
+ const $ = ce(e) || $t(e) ? e : C(e || {});
646
+ X($, (y) => {
647
+ f.value = pe({
648
+ validations: y,
649
649
  state: t,
650
650
  childResults: h,
651
651
  resultsCache: g,
652
652
  globalConfig: n,
653
- instance: l ?? {},
654
- externalResults: i
653
+ instance: p ?? {},
654
+ externalResults: u
655
655
  });
656
656
  }, {
657
657
  immediate: !0
658
658
  });
659
659
  }
660
- return l && (u.forEach(($) => $(f, {
660
+ return p && (o.forEach(($) => $(f, {
661
661
  $registerAs: a,
662
662
  $scope: s,
663
- $stopPropagation: o
664
- })), $e(() => m.forEach(($) => $(a)))), y(() => L(L({}, d(f.value)), h.value));
663
+ $stopPropagation: i
664
+ })), $e(() => m.forEach(($) => $(a)))), _(() => V(V({}, c(f.value)), h.value));
665
665
  }
666
- const It = ["for"], jt = ["id"], At = /* @__PURE__ */ R({
666
+ var T = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e))(T || {});
667
+ const Et = ["id", "name", "placeholder", "value"], Ct = ["id", "name", "checked", "value"], jt = ["id"], At = ["for"], Tt = /* @__PURE__ */ j({
667
668
  __name: "PdapInput",
668
669
  props: {
670
+ error: {},
669
671
  id: {},
670
672
  label: {},
671
673
  name: {},
672
- error: {}
673
- },
674
- setup(e) {
675
- const t = e, r = y(() => `pdap-${t.name}-input-error`);
676
- return se(() => {
677
- console.debug(
678
- `Hello from PDAP Input ${t.name} rendered at ${window.location.pathname}`,
679
- {
680
- props: t
681
- }
682
- );
683
- }), (n, a) => {
684
- var s;
685
- return v(), w("div", {
686
- class: B({
687
- "pdap-input": !0,
688
- "pdap-input-error": ((s = n.error) == null ? void 0 : s.length) >= 1
689
- })
690
- }, [
691
- G(n.$slots, "default"),
692
- P("label", {
693
- class: "pdap-input-label",
694
- for: n.id
695
- }, z(n.label), 9, It),
696
- n.error ? (v(), w("div", {
697
- key: 0,
698
- id: r.value,
699
- class: "pdap-input-error-message"
700
- }, z(n.error), 9, jt)) : F("", !0)
701
- ], 2);
702
- };
703
- }
704
- });
705
- const Tt = ["id", "name", "value", "placeholder"], Lt = /* @__PURE__ */ R({
706
- __name: "InputText",
707
- props: {
708
674
  placeholder: {},
709
675
  type: {},
710
676
  value: {},
711
- id: {},
712
- label: {},
713
- name: {},
714
- error: {}
715
- },
716
- emits: ["input"],
717
- setup(e, { emit: t }) {
718
- const r = e, n = t, a = (s) => {
719
- n("input", s.target.value);
720
- };
721
- return se(() => {
722
- console.debug(
723
- `Hello from PDAP InputText ${r.name} rendered at ${window.location.pathname}`,
724
- {
725
- props: r
726
- }
727
- );
728
- }), (s, o) => (v(), w("input", {
729
- id: s.id,
730
- type: "text",
731
- name: s.name,
732
- value: s.value,
733
- placeholder: s.placeholder,
734
- onInput: a
735
- }, null, 40, Tt));
736
- }
737
- }), Vt = ["id", "name", "checked", "value"], kt = /* @__PURE__ */ R({
738
- __name: "InputCheckbox",
739
- props: {
740
- defaultChecked: { type: Boolean },
741
- type: {},
742
- value: {},
743
- id: {},
744
- label: {},
745
- name: {},
746
- error: {}
677
+ defaultChecked: { type: Boolean }
747
678
  },
748
- emits: ["change"],
679
+ emits: ["change", "input"],
749
680
  setup(e, { emit: t }) {
750
- const r = e, n = t, a = (s) => {
751
- n("change", s.target.checked.toString());
681
+ const r = e, n = t, a = () => {
682
+ i.value = !i.value, n("change", i.value.toString());
683
+ }, s = (l) => {
684
+ n("input", l.target.value);
685
+ }, i = x(r.defaultChecked), u = _(() => `pdap-${r.name}-input-error`);
686
+ return (l, p) => {
687
+ var d;
688
+ return v(), A(c(Dr), {
689
+ class: G({
690
+ "pdap-input": !0,
691
+ "pdap-input-error": Number((d = l.error) == null ? void 0 : d.length) >= 1
692
+ })
693
+ }, {
694
+ default: E(() => [
695
+ l.type === c(T).TEXT ? (v(), b("input", de({
696
+ key: 0,
697
+ id: l.id,
698
+ type: "text",
699
+ name: l.name,
700
+ placeholder: l.placeholder,
701
+ value: l.value
702
+ }, l.$attrs, { onInput: s }), null, 16, Et)) : l.type === c(T).CHECKBOX ? (v(), b("input", de({
703
+ key: 1,
704
+ id: l.id,
705
+ class: "pdap-input-checkbox",
706
+ name: l.name,
707
+ checked: i.value,
708
+ type: "checkbox",
709
+ value: l.value
710
+ }, l.$attrs, { onChange: a }), null, 16, Ct)) : q("", !0),
711
+ l.error ? (v(), b("div", {
712
+ key: 2,
713
+ id: u.value,
714
+ class: "pdap-input-error-message"
715
+ }, D(l.error), 9, jt)) : q("", !0),
716
+ P("label", {
717
+ class: "pdap-input-label",
718
+ for: l.id
719
+ }, D(l.label), 9, At)
720
+ ]),
721
+ _: 1
722
+ }, 8, ["class"]);
752
723
  };
753
- return se(() => {
754
- console.debug(
755
- `Hello from PDAP InputCheckbox ${r.name} rendered at ${window.location.pathname}`,
756
- {
757
- props: r
758
- }
759
- );
760
- }), (s, o) => (v(), w("input", {
761
- id: s.id,
762
- class: "pdap-input-checkbox",
763
- name: s.name,
764
- checked: s.defaultChecked,
765
- value: s.value,
766
- type: "checkbox",
767
- onChange: a
768
- }, null, 40, Vt));
769
724
  }
770
725
  });
771
- var X = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e))(X || {});
772
- const St = {
773
- [X.CHECKBOX]: "InputCheckbox",
774
- [X.TEXT]: "InputText"
775
- }, Dt = {
776
- name: "InputsGenerator",
777
- components: { InputText: Lt, InputCheckbox: kt, PdapInput: At },
778
- props: {
779
- schema: { type: Object },
780
- values: { type: Object },
781
- v$: {
782
- type: Object
783
- }
784
- },
785
- emits: ["blur", "input"],
786
- setup(e, { emit: t }) {
787
- t("input"), t("blur");
788
- },
789
- data() {
790
- return {
791
- formData: this.values || {},
792
- INPUT_COMPONENT_MAP: St,
793
- v: this.$props.v$
794
- };
795
- },
796
- methods: {
797
- updateForm(e, t) {
798
- this.formData[e] = t, this.$emit("input", this.formData);
799
- },
800
- updateValidations(e) {
801
- var t, r;
802
- (r = (t = this.v$) == null ? void 0 : t.value) == null || r[e].$touch;
803
- }
804
- }
805
- }, zt = (e, t) => {
806
- const r = e.__vccOpts || e;
807
- for (const [n, a] of t)
808
- r[n] = a;
809
- return r;
810
- };
811
- function Mt(e, t, r, n, a, s) {
812
- const o = Le("PdapInput");
813
- return v(!0), w(ee, null, fe(r.schema, (i) => {
814
- var c, l, p, f;
815
- return v(), j(o, {
816
- id: i.id,
817
- key: i.name,
818
- error: (f = (p = (l = (c = a.v) == null ? void 0 : c[i.name]) == null ? void 0 : l.$errors) == null ? void 0 : p[0]) == null ? void 0 : f.$message,
819
- name: i.name,
820
- label: i.label
821
- }, {
822
- default: E(() => [
823
- (v(), j(ae(a.INPUT_COMPONENT_MAP[i.type]), Ye(i, {
824
- value: a.formData[i.name],
825
- onBlur: (g) => s.updateValidations(i.name),
826
- onInput: (g) => s.updateForm(i.name, g)
827
- }), null, 16, ["value", "onBlur", "onInput"]))
828
- ]),
829
- _: 2
830
- }, 1032, ["id", "error", "name", "label"]);
831
- }), 128);
832
- }
833
- const Nt = /* @__PURE__ */ zt(Dt, [["render", Mt]]);
834
- function Ie(e, t) {
726
+ function Ae(e, t) {
835
727
  var r = Object.keys(e);
836
728
  if (Object.getOwnPropertySymbols) {
837
729
  var n = Object.getOwnPropertySymbols(e);
@@ -844,15 +736,15 @@ function Ie(e, t) {
844
736
  function H(e) {
845
737
  for (var t = 1; t < arguments.length; t++) {
846
738
  var r = arguments[t] != null ? arguments[t] : {};
847
- t % 2 ? Ie(Object(r), !0).forEach(function(n) {
848
- Ft(e, n, r[n]);
849
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ie(Object(r)).forEach(function(n) {
739
+ t % 2 ? Ae(Object(r), !0).forEach(function(n) {
740
+ It(e, n, r[n]);
741
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ae(Object(r)).forEach(function(n) {
850
742
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
851
743
  });
852
744
  }
853
745
  return e;
854
746
  }
855
- function Ft(e, t, r) {
747
+ function It(e, t, r) {
856
748
  return t in e ? Object.defineProperty(e, t, {
857
749
  value: r,
858
750
  enumerable: !0,
@@ -860,82 +752,82 @@ function Ft(e, t, r) {
860
752
  writable: !0
861
753
  }) : e[t] = r, e;
862
754
  }
863
- function K(e) {
755
+ function W(e) {
864
756
  return typeof e == "function";
865
757
  }
866
758
  function ne(e) {
867
759
  return e !== null && typeof e == "object" && !Array.isArray(e);
868
760
  }
869
- function oe(e) {
870
- return K(e.$validator) ? H({}, e) : {
761
+ function ae(e) {
762
+ return W(e.$validator) ? H({}, e) : {
871
763
  $validator: e
872
764
  };
873
765
  }
874
- function qt(e) {
875
- return ne(e) && K(e.then);
766
+ function Lt(e) {
767
+ return ne(e) && W(e.then);
876
768
  }
877
- function V(e) {
769
+ function S(e) {
878
770
  return typeof e == "object" ? e.$valid : e;
879
771
  }
880
- function M(e) {
772
+ function N(e) {
881
773
  return e.$validator || e;
882
774
  }
883
775
  function he(e, t) {
884
776
  if (!ne(e))
885
777
  throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
886
- if (!ne(t) && !K(t))
778
+ if (!ne(t) && !W(t))
887
779
  throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
888
- const r = oe(t);
780
+ const r = ae(t);
889
781
  return r.$params = H(H({}, r.$params || {}), e), r;
890
782
  }
891
- function Q(e, t) {
892
- if (!K(e) && typeof d(e) != "string")
783
+ function U(e, t) {
784
+ if (!W(e) && typeof c(e) != "string")
893
785
  throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);
894
- if (!ne(t) && !K(t))
786
+ if (!ne(t) && !W(t))
895
787
  throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
896
- const r = oe(t);
788
+ const r = ae(t);
897
789
  return r.$message = e, r;
898
790
  }
899
- function Ht(e) {
791
+ function Vt(e) {
900
792
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
901
- const r = oe(e);
793
+ const r = ae(e);
902
794
  return H(H({}, r), {}, {
903
795
  $async: !0,
904
796
  $watchTargets: t
905
797
  });
906
798
  }
907
- function Bt(e) {
799
+ function St(e) {
908
800
  return {
909
801
  $validator(t) {
910
802
  for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
911
803
  n[a - 1] = arguments[a];
912
- return d(t).reduce((s, o, i) => {
913
- const c = Object.entries(o).reduce((l, p) => {
914
- let [f, g] = p;
915
- const h = e[f] || {}, u = Object.entries(h).reduce((m, $) => {
916
- let [_, N] = $;
917
- const C = M(N).call(this, g, o, i, ...n), S = V(C);
918
- if (m.$data[_] = C, m.$data.$invalid = !S || !!m.$data.$invalid, m.$data.$error = m.$data.$invalid, !S) {
919
- let A = N.$message || "";
920
- const Z = N.$params || {};
921
- typeof A == "function" && (A = A({
804
+ return c(t).reduce((s, i, u) => {
805
+ const l = Object.entries(i).reduce((p, d) => {
806
+ let [f, g] = d;
807
+ const h = e[f] || {}, o = Object.entries(h).reduce((m, $) => {
808
+ let [y, F] = $;
809
+ const O = N(F).call(this, g, i, u, ...n), z = S(O);
810
+ if (m.$data[y] = O, m.$data.$invalid = !z || !!m.$data.$invalid, m.$data.$error = m.$data.$invalid, !z) {
811
+ let I = F.$message || "";
812
+ const Q = F.$params || {};
813
+ typeof I == "function" && (I = I({
922
814
  $pending: !1,
923
- $invalid: !S,
924
- $params: Z,
815
+ $invalid: !z,
816
+ $params: Q,
925
817
  $model: g,
926
- $response: C
818
+ $response: O
927
819
  })), m.$errors.push({
928
820
  $property: f,
929
- $message: A,
930
- $params: Z,
931
- $response: C,
821
+ $message: I,
822
+ $params: Q,
823
+ $response: O,
932
824
  $model: g,
933
825
  $pending: !1,
934
- $validator: _
826
+ $validator: y
935
827
  });
936
828
  }
937
829
  return {
938
- $valid: m.$valid && S,
830
+ $valid: m.$valid && z,
939
831
  $data: m.$data,
940
832
  $errors: m.$errors
941
833
  };
@@ -944,10 +836,10 @@ function Bt(e) {
944
836
  $data: {},
945
837
  $errors: []
946
838
  });
947
- return l.$data[f] = u.$data, l.$errors[f] = u.$errors, {
948
- $valid: l.$valid && u.$valid,
949
- $data: l.$data,
950
- $errors: l.$errors
839
+ return p.$data[f] = o.$data, p.$errors[f] = o.$errors, {
840
+ $valid: p.$valid && o.$valid,
841
+ $data: p.$data,
842
+ $errors: p.$errors
951
843
  };
952
844
  }, {
953
845
  $valid: !0,
@@ -955,9 +847,9 @@ function Bt(e) {
955
847
  $errors: {}
956
848
  });
957
849
  return {
958
- $valid: s.$valid && c.$valid,
959
- $data: s.$data.concat(c.$data),
960
- $errors: s.$errors.concat(c.$errors)
850
+ $valid: s.$valid && l.$valid,
851
+ $data: s.$data.concat(l.$data),
852
+ $errors: s.$errors.concat(l.$errors)
961
853
  };
962
854
  }, {
963
855
  $valid: !0,
@@ -973,8 +865,8 @@ function Bt(e) {
973
865
  }
974
866
  };
975
867
  }
976
- const O = (e) => {
977
- if (e = d(e), Array.isArray(e))
868
+ const R = (e) => {
869
+ if (e = c(e), Array.isArray(e))
978
870
  return !!e.length;
979
871
  if (e == null)
980
872
  return !1;
@@ -988,50 +880,50 @@ const O = (e) => {
988
880
  return !1;
989
881
  }
990
882
  return !!String(e).length;
991
- }, ve = (e) => (e = d(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
883
+ }, ve = (e) => (e = c(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
992
884
  function k() {
993
885
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
994
886
  t[r] = arguments[r];
995
- return (n) => (n = d(n), !O(n) || t.every((a) => (a.lastIndex = 0, a.test(n))));
887
+ return (n) => (n = c(n), !R(n) || t.every((a) => (a.lastIndex = 0, a.test(n))));
996
888
  }
997
889
  var ye = /* @__PURE__ */ Object.freeze({
998
890
  __proto__: null,
999
- forEach: Bt,
891
+ forEach: St,
1000
892
  len: ve,
1001
- normalizeValidatorObject: oe,
893
+ normalizeValidatorObject: ae,
1002
894
  regex: k,
1003
- req: O,
1004
- unwrap: d,
1005
- unwrapNormalizedValidator: M,
1006
- unwrapValidatorResponse: V,
1007
- withAsync: Ht,
1008
- withMessage: Q,
895
+ req: R,
896
+ unwrap: c,
897
+ unwrapNormalizedValidator: N,
898
+ unwrapValidatorResponse: S,
899
+ withAsync: Vt,
900
+ withMessage: U,
1009
901
  withParams: he
1010
- }), Gt = k(/^[a-zA-Z]*$/), Ut = {
1011
- $validator: Gt,
902
+ }), kt = k(/^[a-zA-Z]*$/), zt = {
903
+ $validator: kt,
1012
904
  $message: "The value is not alphabetical",
1013
905
  $params: {
1014
906
  type: "alpha"
1015
907
  }
1016
- }, Wt = k(/^[a-zA-Z0-9]*$/), Xt = {
1017
- $validator: Wt,
908
+ }, Mt = k(/^[a-zA-Z0-9]*$/), Dt = {
909
+ $validator: Mt,
1018
910
  $message: "The value must be alpha-numeric",
1019
911
  $params: {
1020
912
  type: "alphaNum"
1021
913
  }
1022
- }, Kt = k(/^\d*(\.\d+)?$/), Qt = {
1023
- $validator: Kt,
914
+ }, qt = k(/^\d*(\.\d+)?$/), Nt = {
915
+ $validator: qt,
1024
916
  $message: "Value must be numeric",
1025
917
  $params: {
1026
918
  type: "numeric"
1027
919
  }
1028
920
  };
1029
- function Zt(e, t) {
1030
- return (r) => !O(r) || (!/\s/.test(r) || r instanceof Date) && +d(e) <= +r && +d(t) >= +r;
921
+ function Ft(e, t) {
922
+ return (r) => !R(r) || (!/\s/.test(r) || r instanceof Date) && +c(e) <= +r && +c(t) >= +r;
1031
923
  }
1032
- function Jt(e, t) {
924
+ function Bt(e, t) {
1033
925
  return {
1034
- $validator: Zt(e, t),
926
+ $validator: Ft(e, t),
1035
927
  $message: (r) => {
1036
928
  let {
1037
929
  $params: n
@@ -1045,62 +937,62 @@ function Jt(e, t) {
1045
937
  }
1046
938
  };
1047
939
  }
1048
- const Yt = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
1049
- var er = k(Yt), tr = {
1050
- $validator: er,
940
+ const Ht = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
941
+ var Gt = k(Ht), Xt = {
942
+ $validator: Gt,
1051
943
  $message: "Value is not a valid email address",
1052
944
  $params: {
1053
945
  type: "email"
1054
946
  }
1055
947
  };
1056
- function rr(e) {
1057
- if (!O(e))
948
+ function Wt(e) {
949
+ if (!R(e))
1058
950
  return !0;
1059
951
  if (typeof e != "string")
1060
952
  return !1;
1061
953
  const t = e.split(".");
1062
- return t.length === 4 && t.every(nr);
954
+ return t.length === 4 && t.every(Ut);
1063
955
  }
1064
- const nr = (e) => {
956
+ const Ut = (e) => {
1065
957
  if (e.length > 3 || e.length === 0 || e[0] === "0" && e !== "0" || !e.match(/^\d+$/))
1066
958
  return !1;
1067
959
  const t = +e | 0;
1068
960
  return t >= 0 && t <= 255;
1069
961
  };
1070
- var ar = {
1071
- $validator: rr,
962
+ var Kt = {
963
+ $validator: Wt,
1072
964
  $message: "The value is not a valid IP address",
1073
965
  $params: {
1074
966
  type: "ipAddress"
1075
967
  }
1076
968
  };
1077
- function sr() {
969
+ function Qt() {
1078
970
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ":";
1079
971
  return (t) => {
1080
- if (e = d(e), !O(t))
972
+ if (e = c(e), !R(t))
1081
973
  return !0;
1082
974
  if (typeof t != "string")
1083
975
  return !1;
1084
976
  const r = typeof e == "string" && e !== "" ? t.split(e) : t.length === 12 || t.length === 16 ? t.match(/.{2}/g) : null;
1085
- return r !== null && (r.length === 6 || r.length === 8) && r.every(or);
977
+ return r !== null && (r.length === 6 || r.length === 8) && r.every(Zt);
1086
978
  };
1087
979
  }
1088
- const or = (e) => e.toLowerCase().match(/^[0-9a-f]{2}$/);
1089
- function ir(e) {
980
+ const Zt = (e) => e.toLowerCase().match(/^[0-9a-f]{2}$/);
981
+ function Jt(e) {
1090
982
  return {
1091
- $validator: sr(e),
983
+ $validator: Qt(e),
1092
984
  $message: "The value is not a valid MAC Address",
1093
985
  $params: {
1094
986
  type: "macAddress"
1095
987
  }
1096
988
  };
1097
989
  }
1098
- function ur(e) {
1099
- return (t) => !O(t) || ve(t) <= d(e);
990
+ function Yt(e) {
991
+ return (t) => !R(t) || ve(t) <= c(e);
1100
992
  }
1101
- function lr(e) {
993
+ function er(e) {
1102
994
  return {
1103
- $validator: ur(e),
995
+ $validator: Yt(e),
1104
996
  $message: (t) => {
1105
997
  let {
1106
998
  $params: r
@@ -1113,12 +1005,12 @@ function lr(e) {
1113
1005
  }
1114
1006
  };
1115
1007
  }
1116
- function cr(e) {
1117
- return (t) => !O(t) || ve(t) >= d(e);
1008
+ function tr(e) {
1009
+ return (t) => !R(t) || ve(t) >= c(e);
1118
1010
  }
1119
- function dr(e) {
1011
+ function rr(e) {
1120
1012
  return {
1121
- $validator: cr(e),
1013
+ $validator: tr(e),
1122
1014
  $message: (t) => {
1123
1015
  let {
1124
1016
  $params: r
@@ -1131,28 +1023,28 @@ function dr(e) {
1131
1023
  }
1132
1024
  };
1133
1025
  }
1134
- function pr(e) {
1135
- return typeof e == "string" && (e = e.trim()), O(e);
1026
+ function nr(e) {
1027
+ return typeof e == "string" && (e = e.trim()), R(e);
1136
1028
  }
1137
1029
  var _e = {
1138
- $validator: pr,
1030
+ $validator: nr,
1139
1031
  $message: "Value is required",
1140
1032
  $params: {
1141
1033
  type: "required"
1142
1034
  }
1143
1035
  };
1144
- const je = (e, t) => e ? O(typeof t == "string" ? t.trim() : t) : !0;
1145
- function mr(e) {
1036
+ const Te = (e, t) => e ? R(typeof t == "string" ? t.trim() : t) : !0;
1037
+ function ar(e) {
1146
1038
  return function(t, r) {
1147
1039
  if (typeof e != "function")
1148
- return je(d(e), t);
1040
+ return Te(c(e), t);
1149
1041
  const n = e.call(this, t, r);
1150
- return je(n, t);
1042
+ return Te(n, t);
1151
1043
  };
1152
1044
  }
1153
- function fr(e) {
1045
+ function sr(e) {
1154
1046
  return {
1155
- $validator: mr(e),
1047
+ $validator: ar(e),
1156
1048
  $message: "The value is required",
1157
1049
  $params: {
1158
1050
  type: "requiredIf",
@@ -1160,18 +1052,18 @@ function fr(e) {
1160
1052
  }
1161
1053
  };
1162
1054
  }
1163
- const Ae = (e, t) => e ? !0 : O(typeof t == "string" ? t.trim() : t);
1164
- function $r(e) {
1055
+ const Ie = (e, t) => e ? !0 : R(typeof t == "string" ? t.trim() : t);
1056
+ function or(e) {
1165
1057
  return function(t, r) {
1166
1058
  if (typeof e != "function")
1167
- return Ae(d(e), t);
1059
+ return Ie(c(e), t);
1168
1060
  const n = e.call(this, t, r);
1169
- return Ae(n, t);
1061
+ return Ie(n, t);
1170
1062
  };
1171
1063
  }
1172
- function gr(e) {
1064
+ function ir(e) {
1173
1065
  return {
1174
- $validator: $r(e),
1066
+ $validator: or(e),
1175
1067
  $message: "The value is required",
1176
1068
  $params: {
1177
1069
  type: "requiredUnless",
@@ -1179,13 +1071,13 @@ function gr(e) {
1179
1071
  }
1180
1072
  };
1181
1073
  }
1182
- function hr(e) {
1183
- return (t) => d(t) === d(e);
1074
+ function ur(e) {
1075
+ return (t) => c(t) === c(e);
1184
1076
  }
1185
- function vr(e) {
1077
+ function lr(e) {
1186
1078
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "other";
1187
1079
  return {
1188
- $validator: hr(e),
1080
+ $validator: ur(e),
1189
1081
  $message: (r) => `The value must be equal to the ${t} value`,
1190
1082
  $params: {
1191
1083
  equalTo: e,
@@ -1194,103 +1086,103 @@ function vr(e) {
1194
1086
  }
1195
1087
  };
1196
1088
  }
1197
- const yr = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
1198
- var _r = k(yr), br = {
1199
- $validator: _r,
1089
+ const cr = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
1090
+ var dr = k(cr), pr = {
1091
+ $validator: dr,
1200
1092
  $message: "The value is not a valid URL address",
1201
1093
  $params: {
1202
1094
  type: "url"
1203
1095
  }
1204
1096
  };
1205
- function wr(e) {
1097
+ function mr(e) {
1206
1098
  return function() {
1207
1099
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1208
1100
  r[n] = arguments[n];
1209
- return e.reduce((a, s) => V(a) ? a : M(s).apply(this, r), !1);
1101
+ return e.reduce((a, s) => S(a) ? a : N(s).apply(this, r), !1);
1210
1102
  };
1211
1103
  }
1212
- function Pr(e) {
1104
+ function fr(e) {
1213
1105
  return function() {
1214
1106
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1215
1107
  r[n] = arguments[n];
1216
1108
  return e.reduce(async (a, s) => {
1217
- const o = await a;
1218
- return V(o) ? o : M(s).apply(this, r);
1109
+ const i = await a;
1110
+ return S(i) ? i : N(s).apply(this, r);
1219
1111
  }, Promise.resolve(!1));
1220
1112
  };
1221
1113
  }
1222
- function xr() {
1114
+ function $r() {
1223
1115
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1224
1116
  t[r] = arguments[r];
1225
- const n = t.some((o) => o.$async), a = t.reduce((o, i) => i.$watchTargets ? o.concat(i.$watchTargets) : o, []);
1117
+ const n = t.some((i) => i.$async), a = t.reduce((i, u) => u.$watchTargets ? i.concat(u.$watchTargets) : i, []);
1226
1118
  let s = () => !1;
1227
- return t.length && (s = n ? Pr(t) : wr(t)), {
1119
+ return t.length && (s = n ? fr(t) : mr(t)), {
1228
1120
  $async: n,
1229
1121
  $validator: s,
1230
1122
  $watchTargets: a
1231
1123
  };
1232
1124
  }
1233
- function Rr() {
1125
+ function gr() {
1234
1126
  return he({
1235
1127
  type: "or"
1236
- }, Q("The value does not match any of the provided validators", xr(...arguments)));
1128
+ }, U("The value does not match any of the provided validators", $r(...arguments)));
1237
1129
  }
1238
- function Or(e) {
1130
+ function hr(e) {
1239
1131
  return function() {
1240
1132
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1241
1133
  r[n] = arguments[n];
1242
- return e.reduce((a, s) => V(a) ? M(s).apply(this, r) : a, !0);
1134
+ return e.reduce((a, s) => S(a) ? N(s).apply(this, r) : a, !0);
1243
1135
  };
1244
1136
  }
1245
- function Cr(e) {
1137
+ function vr(e) {
1246
1138
  return function() {
1247
1139
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1248
1140
  r[n] = arguments[n];
1249
1141
  return e.reduce(async (a, s) => {
1250
- const o = await a;
1251
- return V(o) ? M(s).apply(this, r) : o;
1142
+ const i = await a;
1143
+ return S(i) ? N(s).apply(this, r) : i;
1252
1144
  }, Promise.resolve(!0));
1253
1145
  };
1254
1146
  }
1255
- function Er() {
1147
+ function yr() {
1256
1148
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1257
1149
  t[r] = arguments[r];
1258
- const n = t.some((o) => o.$async), a = t.reduce((o, i) => i.$watchTargets ? o.concat(i.$watchTargets) : o, []);
1150
+ const n = t.some((i) => i.$async), a = t.reduce((i, u) => u.$watchTargets ? i.concat(u.$watchTargets) : i, []);
1259
1151
  let s = () => !1;
1260
- return t.length && (s = n ? Cr(t) : Or(t)), {
1152
+ return t.length && (s = n ? vr(t) : hr(t)), {
1261
1153
  $async: n,
1262
1154
  $validator: s,
1263
1155
  $watchTargets: a
1264
1156
  };
1265
1157
  }
1266
- function Ir() {
1158
+ function _r() {
1267
1159
  return he({
1268
1160
  type: "and"
1269
- }, Q("The value does not match all of the provided validators", Er(...arguments)));
1161
+ }, U("The value does not match all of the provided validators", yr(...arguments)));
1270
1162
  }
1271
- function jr(e) {
1163
+ function wr(e) {
1272
1164
  return function(t, r) {
1273
- if (!O(t))
1165
+ if (!R(t))
1274
1166
  return !0;
1275
- const n = M(e).call(this, t, r);
1276
- return qt(n) ? n.then((a) => !V(a)) : !V(n);
1167
+ const n = N(e).call(this, t, r);
1168
+ return Lt(n) ? n.then((a) => !S(a)) : !S(n);
1277
1169
  };
1278
1170
  }
1279
- function Ar(e) {
1171
+ function br(e) {
1280
1172
  return {
1281
- $validator: jr(e),
1173
+ $validator: wr(e),
1282
1174
  $message: "The value does not match the provided validator",
1283
1175
  $params: {
1284
1176
  type: "not"
1285
1177
  }
1286
1178
  };
1287
1179
  }
1288
- function Tr(e) {
1289
- return (t) => !O(t) || (!/\s/.test(t) || t instanceof Date) && +t >= +d(e);
1180
+ function Pr(e) {
1181
+ return (t) => !R(t) || (!/\s/.test(t) || t instanceof Date) && +t >= +c(e);
1290
1182
  }
1291
- function Lr(e) {
1183
+ function xr(e) {
1292
1184
  return {
1293
- $validator: Tr(e),
1185
+ $validator: Pr(e),
1294
1186
  $message: (t) => {
1295
1187
  let {
1296
1188
  $params: r
@@ -1303,11 +1195,11 @@ function Lr(e) {
1303
1195
  }
1304
1196
  };
1305
1197
  }
1306
- function Vr(e) {
1307
- return (t) => !O(t) || (!/\s/.test(t) || t instanceof Date) && +t <= +d(e);
1198
+ function Rr(e) {
1199
+ return (t) => !R(t) || (!/\s/.test(t) || t instanceof Date) && +t <= +c(e);
1308
1200
  }
1309
- var kr = (e) => ({
1310
- $validator: Vr(e),
1201
+ var Or = (e) => ({
1202
+ $validator: Rr(e),
1311
1203
  $message: (t) => {
1312
1204
  let {
1313
1205
  $params: r
@@ -1318,20 +1210,20 @@ var kr = (e) => ({
1318
1210
  max: e,
1319
1211
  type: "maxValue"
1320
1212
  }
1321
- }), Sr = k(/(^[0-9]*$)|(^-[0-9]+$)/), Dr = {
1322
- $validator: Sr,
1213
+ }), Er = k(/(^[0-9]*$)|(^-[0-9]+$)/), Cr = {
1214
+ $validator: Er,
1323
1215
  $message: "Value is not an integer",
1324
1216
  $params: {
1325
1217
  type: "integer"
1326
1218
  }
1327
- }, zr = k(/^[-]?\d*(\.\d+)?$/), Mr = {
1328
- $validator: zr,
1219
+ }, jr = k(/^[-]?\d*(\.\d+)?$/), Ar = {
1220
+ $validator: jr,
1329
1221
  $message: "Value must be decimal",
1330
1222
  $params: {
1331
1223
  type: "decimal"
1332
1224
  }
1333
1225
  };
1334
- function Nr(e) {
1226
+ function Tr(e) {
1335
1227
  let {
1336
1228
  t,
1337
1229
  messagePath: r = (a) => {
@@ -1344,92 +1236,92 @@ function Nr(e) {
1344
1236
  } = e;
1345
1237
  return function(s) {
1346
1238
  let {
1347
- withArguments: o = !1,
1348
- messagePath: i = r,
1349
- messageParams: c = n
1239
+ withArguments: i = !1,
1240
+ messagePath: u = r,
1241
+ messageParams: l = n
1350
1242
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1351
- function l(p) {
1352
- return t(i(p), c(H({
1353
- model: p.$model,
1354
- property: p.$property,
1355
- pending: p.$pending,
1356
- invalid: p.$invalid,
1357
- response: p.$response,
1358
- validator: p.$validator,
1359
- propertyPath: p.$propertyPath
1360
- }, p.$params)));
1243
+ function p(d) {
1244
+ return t(u(d), l(H({
1245
+ model: d.$model,
1246
+ property: d.$property,
1247
+ pending: d.$pending,
1248
+ invalid: d.$invalid,
1249
+ response: d.$response,
1250
+ validator: d.$validator,
1251
+ propertyPath: d.$propertyPath
1252
+ }, d.$params)));
1361
1253
  }
1362
- return o && typeof s == "function" ? function() {
1363
- return Q(l, s(...arguments));
1364
- } : Q(l, s);
1254
+ return i && typeof s == "function" ? function() {
1255
+ return U(p, s(...arguments));
1256
+ } : U(p, s);
1365
1257
  };
1366
1258
  }
1367
- const Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1259
+ const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1368
1260
  __proto__: null,
1369
- alpha: Ut,
1370
- alphaNum: Xt,
1371
- and: Ir,
1372
- between: Jt,
1373
- createI18nMessage: Nr,
1374
- decimal: Mr,
1375
- email: tr,
1261
+ alpha: zt,
1262
+ alphaNum: Dt,
1263
+ and: _r,
1264
+ between: Bt,
1265
+ createI18nMessage: Tr,
1266
+ decimal: Ar,
1267
+ email: Xt,
1376
1268
  helpers: ye,
1377
- integer: Dr,
1378
- ipAddress: ar,
1379
- macAddress: ir,
1380
- maxLength: lr,
1381
- maxValue: kr,
1382
- minLength: dr,
1383
- minValue: Lr,
1384
- not: Ar,
1385
- numeric: Qt,
1386
- or: Rr,
1269
+ integer: Cr,
1270
+ ipAddress: Kt,
1271
+ macAddress: Jt,
1272
+ maxLength: er,
1273
+ maxValue: Or,
1274
+ minLength: rr,
1275
+ minValue: xr,
1276
+ not: br,
1277
+ numeric: Nt,
1278
+ or: gr,
1387
1279
  required: _e,
1388
- requiredIf: fr,
1389
- requiredUnless: gr,
1390
- sameAs: vr,
1391
- url: br
1280
+ requiredIf: sr,
1281
+ requiredUnless: ir,
1282
+ sameAs: lr,
1283
+ url: pr
1392
1284
  }, Symbol.toStringTag, { value: "Module" }));
1393
- function Te(e) {
1285
+ function Le(e) {
1394
1286
  return ["maxLength", "minLength"].includes(e);
1395
1287
  }
1396
- function Fr(e, t) {
1288
+ function Ir(e, t) {
1397
1289
  return {
1398
- [e]: Fe[e](t)
1290
+ [e]: Ne[e](t)
1399
1291
  };
1400
1292
  }
1401
- function qr(e, t, r) {
1293
+ function Lr(e, t, r) {
1402
1294
  return {
1403
- [e]: ye.withMessage(r, Fe[e](t))
1295
+ [e]: ye.withMessage(r, Ne[e](t))
1404
1296
  };
1405
1297
  }
1406
- function Hr() {
1298
+ function Vr() {
1407
1299
  return { required: _e };
1408
1300
  }
1409
- function Br(e) {
1301
+ function Sr(e) {
1410
1302
  return {
1411
1303
  required: ye.withMessage(e, _e)
1412
1304
  };
1413
1305
  }
1414
- function Gr(e, t) {
1415
- if (Te(e) && typeof t.message == "string" && typeof t.value == "number")
1416
- return qr(
1306
+ function kr(e, t) {
1307
+ if (Le(e) && typeof t.message == "string" && typeof t.value == "number")
1308
+ return Lr(
1417
1309
  e,
1418
1310
  t.value,
1419
1311
  t.message
1420
1312
  );
1421
- if (Te(e) && typeof t.message > "u" && typeof t.value == "number")
1422
- return Fr(e, t.value);
1313
+ if (Le(e) && typeof t.message > "u" && typeof t.value == "number")
1314
+ return Ir(e, t.value);
1423
1315
  if (e === "required" && typeof t.message == "string")
1424
- return Br(t.message);
1316
+ return Sr(t.message);
1425
1317
  if (e === "required" && typeof t.message > "u")
1426
- return Hr();
1318
+ return Vr();
1427
1319
  throw new Error("No valid rule detected");
1428
1320
  }
1429
- const Ur = {
1321
+ const zr = {
1430
1322
  key: 0,
1431
1323
  class: "pdap-form-error-message"
1432
- }, Wr = /* @__PURE__ */ R({
1324
+ }, Mr = /* @__PURE__ */ j({
1433
1325
  __name: "PdapForm",
1434
1326
  props: {
1435
1327
  error: { default: null },
@@ -1440,74 +1332,72 @@ const Ur = {
1440
1332
  emits: ["submit"],
1441
1333
  setup(e, { emit: t }) {
1442
1334
  const r = e, n = t, a = x(
1443
- r.schema.reduce((c, l) => {
1444
- switch (l.type) {
1445
- case "checkbox":
1446
- return { ...c, [l.name]: l.defaultChecked };
1447
- case "text":
1448
- return { ...c, [l.name]: l.value };
1335
+ r.schema.reduce((d, f) => {
1336
+ switch (f.type) {
1337
+ case T.CHECKBOX:
1338
+ return { ...d, [f.name]: String(f.defaultChecked) };
1339
+ case T.TEXT:
1449
1340
  default:
1450
- return c;
1341
+ return { ...d, [f.name]: f.value };
1451
1342
  }
1452
1343
  }, {})
1453
- ), s = r.schema.reduce((c, l) => {
1454
- const p = Object.entries(l.validators ?? {}).reduce(
1455
- (f, [g, h]) => ({
1456
- ...f,
1457
- ...Gr(g, h)
1344
+ ), s = r.schema.reduce((d, f) => {
1345
+ const g = Object.entries(f.validators ?? {}).reduce(
1346
+ (h, [o, m]) => ({
1347
+ ...h,
1348
+ ...kr(o, m)
1458
1349
  }),
1459
1350
  {}
1460
1351
  );
1461
1352
  return {
1462
- ...c,
1463
- [l.name]: {
1464
- ...p
1353
+ ...d,
1354
+ [f.name]: {
1355
+ ...g
1465
1356
  }
1466
1357
  };
1467
- }, {}), o = Et(s, a, { $autoDirty: !1, $lazy: !1 });
1468
- se(
1469
- () => console.debug(
1470
- `Hello from PDAP Form ${r.name} rendered at ${window.location.pathname}`,
1471
- {
1472
- props: r,
1473
- values: a,
1358
+ }, {}), i = Ot(s, a, { $autoDirty: !1, $lazy: !0 }), u = x(r.error);
1359
+ function l(d, f) {
1360
+ a.value[d] = f;
1361
+ }
1362
+ Pe(() => {
1363
+ r.error ? u.value = r.error : u.value && i.value.$errors.length === 0 ? u.value = null : !u.value && i.value.$errors.length > 0 && (u.value = "Please update this form to correct the errors");
1364
+ }), Pe(() => {
1365
+ console.debug(`PdapForm ${r.name}
1366
+ `, {
1367
+ props: r,
1368
+ values: a,
1369
+ vuelidate: {
1474
1370
  rules: s,
1475
- vuelidate: o.value
1371
+ v$: i
1476
1372
  }
1477
- )
1478
- );
1479
- async function i(c) {
1480
- const l = await o.value.$validate();
1481
- if (l) {
1482
- const p = c.target, f = new FormData(p), g = {};
1483
- for (const [h, u] of f)
1484
- Object.assign(g, { [h]: u });
1485
- console.debug("Hello from Form's onSubmit handler", {
1486
- values: g,
1487
- isCorrectSubmission: l,
1488
- vuelidate: o.value
1489
- }), n("submit", g), o.value.$reset(), p.reset();
1490
- return;
1491
- } else {
1492
- console.error("is invalid form data", { v$: o.value });
1373
+ });
1374
+ });
1375
+ async function p(d) {
1376
+ if (await i.value.$validate()) {
1377
+ n("submit", { ...a.value }), i.value.$reset(), d.target.reset(), a.value = Object.entries(a.value).reduce((h, [o, m]) => ({ ...h, [o]: ["true", "false"].includes(m) ? m : "" }), {});
1493
1378
  return;
1494
1379
  }
1495
1380
  }
1496
- return (c, l) => (v(), w("form", {
1381
+ return (d, f) => (v(), b("form", {
1497
1382
  class: "pdap-form",
1498
- onSubmit: l[0] || (l[0] = et((p) => i(p), ["prevent"]))
1383
+ onSubmit: f[0] || (f[0] = et((g) => p(g), ["prevent"]))
1499
1384
  }, [
1500
- typeof c.error == "string" && c.error.length > 0 ? (v(), w("div", Ur, z(c.error), 1)) : F("", !0),
1501
- U(Nt, tt(rt({
1502
- schema: c.schema,
1503
- values: a.value,
1504
- ...typeof d(o) < "u" ? { v$: d(o) } : {}
1505
- })), null, 16),
1506
- G(c.$slots, "default")
1385
+ typeof u.value == "string" && u.value.length > 0 ? (v(), b("div", zr, D(u.value), 1)) : q("", !0),
1386
+ (v(!0), b(ee, null, fe(d.schema, (g) => {
1387
+ var h, o, m, $;
1388
+ return v(), A(Tt, de((delete g.validators, g), {
1389
+ key: g.name,
1390
+ error: (h = c(i)[g.name]) != null && h.$error ? ($ = (m = (o = c(i)[g.name]) == null ? void 0 : o.$errors) == null ? void 0 : m[0]) == null ? void 0 : $.$message : "",
1391
+ value: a.value[g.name],
1392
+ onChange: (y) => g.type !== c(T).TEXT ? l(g.name, y) : void 0,
1393
+ onInput: (y) => g.type === c(T).TEXT ? l(g.name, y) : void 0
1394
+ }), null, 16, ["error", "value", "onChange", "onInput"]);
1395
+ }), 128)),
1396
+ K(d.$slots, "default")
1507
1397
  ], 32));
1508
1398
  }
1509
1399
  });
1510
- const un = /* @__PURE__ */ R({
1400
+ const Dr = /* @__PURE__ */ j({
1511
1401
  __name: "GridContainer",
1512
1402
  props: {
1513
1403
  columns: { default: "auto" },
@@ -1517,27 +1407,27 @@ const un = /* @__PURE__ */ R({
1517
1407
  templateRows: {}
1518
1408
  },
1519
1409
  setup(e) {
1520
- const t = e, r = I({
1410
+ const t = e, r = C({
1521
1411
  "pdap-grid-container": !0,
1522
1412
  [`pdap-grid-container-column-${t.columns}`]: t.columns !== "auto"
1523
- }), n = t.templateRows || typeof t.rows == "number", a = t.templateRows ?? `repeat(${t.rows}, minmax(0, 1fr))`, s = I({
1413
+ }), n = t.templateRows || typeof t.rows == "number", a = t.templateRows ?? `repeat(${t.rows}, minmax(0, 1fr))`, s = C({
1524
1414
  ...n && {
1525
1415
  gridTemplateRows: a
1526
1416
  },
1527
1417
  ...t.templateColumns && { gridTemplateColumns: t.templateColumns }
1528
1418
  });
1529
- return (o, i) => (v(), j(ae(o.component), {
1530
- class: B(r),
1419
+ return (i, u) => (v(), A(me(i.component), {
1420
+ class: G(r),
1531
1421
  style: ge(s)
1532
1422
  }, {
1533
1423
  default: E(() => [
1534
- G(o.$slots, "default")
1424
+ K(i.$slots, "default")
1535
1425
  ]),
1536
1426
  _: 3
1537
1427
  }, 8, ["class", "style"]));
1538
1428
  }
1539
1429
  });
1540
- const ln = /* @__PURE__ */ R({
1430
+ const Jr = /* @__PURE__ */ j({
1541
1431
  __name: "GridItem",
1542
1432
  props: {
1543
1433
  component: { default: "div" },
@@ -1545,49 +1435,49 @@ const ln = /* @__PURE__ */ R({
1545
1435
  spanRow: { default: 1 }
1546
1436
  },
1547
1437
  setup(e) {
1548
- const t = e, r = I({
1438
+ const t = e, r = C({
1549
1439
  "pdap-grid-item": !0,
1550
1440
  [`pdap-grid-item-span-column-${t.spanColumn}`]: t.spanColumn > 1
1551
- }), n = I({
1441
+ }), n = C({
1552
1442
  // Only add inline property if it is passed and exceeds the default
1553
1443
  ...t.spanRow > 1 && {
1554
1444
  gridRow: `span ${t.spanRow} / span ${t.spanRow}`
1555
1445
  }
1556
1446
  });
1557
- return (a, s) => (v(), j(ae(a.component), {
1558
- class: B(r),
1447
+ return (a, s) => (v(), A(me(a.component), {
1448
+ class: G(r),
1559
1449
  style: ge(n)
1560
1450
  }, {
1561
1451
  default: E(() => [
1562
- G(a.$slots, "default")
1452
+ K(a.$slots, "default")
1563
1453
  ]),
1564
1454
  _: 3
1565
1455
  }, 8, ["class", "style"]));
1566
1456
  }
1567
1457
  });
1568
- const Xr = /* @__PURE__ */ P("svg", {
1458
+ const qr = /* @__PURE__ */ P("svg", {
1569
1459
  xmlns: "http://www.w3.org/2000/svg",
1570
1460
  viewBox: "0 0 448 512"
1571
1461
  }, [
1572
1462
  /* @__PURE__ */ P("path", { d: "M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z" })
1573
- ], -1), Kr = [
1574
- Xr
1575
- ], Qr = ["aria-expanded"], Zr = ["href"], Jr = /* @__PURE__ */ R({
1463
+ ], -1), Nr = [
1464
+ qr
1465
+ ], Fr = ["aria-expanded"], Br = ["href"], Hr = /* @__PURE__ */ j({
1576
1466
  __name: "PdapNav",
1577
1467
  props: {
1578
1468
  topPosition: {}
1579
1469
  },
1580
1470
  setup(e) {
1581
- let t = Y("navLinks");
1471
+ let t = J("navLinks");
1582
1472
  typeof t > "u" && (t = [], console.error(
1583
1473
  `Hey, PDAP developer
1584
1474
  `,
1585
1475
  "Did you forget to inject some linkData for the Nav component?"
1586
1476
  ));
1587
- const r = I({
1477
+ const r = C({
1588
1478
  isExpanded: !1,
1589
1479
  isMobile: !0
1590
- }), n = I({
1480
+ }), n = C({
1591
1481
  "pdap-nav": !0
1592
1482
  });
1593
1483
  Ve(() => {
@@ -1599,54 +1489,54 @@ const Xr = /* @__PURE__ */ P("svg", {
1599
1489
  window.innerWidth <= 1024 ? r.isMobile = !0 : r.isMobile = !1, await te();
1600
1490
  }
1601
1491
  async function s() {
1602
- var i, c;
1603
- const o = document.querySelector("body");
1604
- !r.isExpanded && r.isMobile ? (r.isExpanded = !0, o != null && o.classList.contains("lock-scroll") || (i = document.querySelector("body")) == null || i.classList.add("lock-scroll")) : r.isExpanded && r.isMobile && (r.isExpanded = !1, (c = document.querySelector("body")) == null || c.classList.remove("lock-scroll")), await te();
1492
+ var u, l;
1493
+ const i = document.querySelector("body");
1494
+ !r.isExpanded && r.isMobile ? (r.isExpanded = !0, i != null && i.classList.contains("lock-scroll") || (u = document.querySelector("body")) == null || u.classList.add("lock-scroll")) : r.isExpanded && r.isMobile && (r.isExpanded = !1, (l = document.querySelector("body")) == null || l.classList.remove("lock-scroll")), await te();
1605
1495
  }
1606
- return (o, i) => (v(), w(ee, null, [
1496
+ return (i, u) => (v(), b(ee, null, [
1607
1497
  P("div", {
1608
1498
  "aria-controls": "nav",
1609
1499
  class: "pdap-nav-open-button",
1610
1500
  role: "button",
1611
1501
  onClick: s
1612
- }, Kr),
1502
+ }, Nr),
1613
1503
  P("nav", {
1614
1504
  id: "nav",
1615
1505
  "aria-expanded": r.isMobile && r.isExpanded || !r.isMobile,
1616
- class: B(n),
1617
- style: ge(r.isMobile ? { top: `${o.topPosition}px` } : {})
1506
+ class: G(n),
1507
+ style: ge(r.isMobile ? { top: `${i.topPosition}px` } : {})
1618
1508
  }, [
1619
- (v(!0), w(ee, null, fe(d(t), (c) => (v(), w("li", {
1620
- key: c.text,
1509
+ (v(!0), b(ee, null, fe(c(t), (l) => (v(), b("li", {
1510
+ key: l.text,
1621
1511
  class: "pdap-nav-link-container"
1622
1512
  }, [
1623
- c.href ? (v(), w("a", {
1513
+ l.href ? (v(), b("a", {
1624
1514
  key: 0,
1625
1515
  class: "pdap-nav-link",
1626
- href: c.href,
1516
+ href: l.href,
1627
1517
  target: "_blank",
1628
1518
  referrerpolicy: "no-referrer",
1629
1519
  onClick: s
1630
- }, z(c.text), 9, Zr)) : F("", !0),
1631
- c.path ? (v(), j(d(ke), {
1520
+ }, D(l.text), 9, Br)) : q("", !0),
1521
+ l.path ? (v(), A(c(Se), {
1632
1522
  key: 1,
1633
1523
  "active-class": "pdap-nav-link-current",
1634
1524
  "exact-active-class": "pdap-nav-link-current-exact",
1635
1525
  class: "pdap-nav-link",
1636
- to: c.path,
1526
+ to: l.path,
1637
1527
  onClick: s
1638
1528
  }, {
1639
1529
  default: E(() => [
1640
- q(z(c.text), 1)
1530
+ B(D(l.text), 1)
1641
1531
  ]),
1642
1532
  _: 2
1643
- }, 1032, ["to"])) : F("", !0)
1533
+ }, 1032, ["to"])) : q("", !0)
1644
1534
  ]))), 128))
1645
- ], 14, Qr)
1535
+ ], 14, Fr)
1646
1536
  ], 64));
1647
1537
  }
1648
1538
  });
1649
- const Yr = ["href"], en = ["src"], tn = ["src"], cn = /* @__PURE__ */ R({
1539
+ const Gr = ["href"], Xr = ["src"], Wr = ["src"], Yr = /* @__PURE__ */ j({
1650
1540
  __name: "PdapHeader",
1651
1541
  props: {
1652
1542
  logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/lockup.svg" },
@@ -1654,7 +1544,7 @@ const Yr = ["href"], en = ["src"], tn = ["src"], cn = /* @__PURE__ */ R({
1654
1544
  },
1655
1545
  setup(e) {
1656
1546
  const t = e, r = x(), n = x(null), a = t.logoImageAnchorPath.startsWith("/");
1657
- nt(() => {
1547
+ tt(() => {
1658
1548
  s(), window.addEventListener("resize", s);
1659
1549
  }), $e(() => {
1660
1550
  window.removeEventListener("resize", s);
@@ -1662,53 +1552,53 @@ const Yr = ["href"], en = ["src"], tn = ["src"], cn = /* @__PURE__ */ R({
1662
1552
  function s() {
1663
1553
  n.value && (r.value = n.value.offsetHeight);
1664
1554
  }
1665
- return (o, i) => (v(), w("header", {
1555
+ return (i, u) => (v(), b("header", {
1666
1556
  ref_key: "el",
1667
1557
  ref: n,
1668
1558
  class: "pdap-header"
1669
1559
  }, [
1670
- d(a) ? (v(), j(d(ke), {
1560
+ c(a) ? (v(), A(c(Se), {
1671
1561
  key: 1,
1672
- to: o.logoImageAnchorPath,
1562
+ to: i.logoImageAnchorPath,
1673
1563
  class: "logo"
1674
1564
  }, {
1675
1565
  default: E(() => [
1676
1566
  P("img", {
1677
- src: o.logoImageSrc,
1567
+ src: i.logoImageSrc,
1678
1568
  loading: "lazy",
1679
1569
  width: "250",
1680
1570
  alt: "Police Data Accessibility Project Logo"
1681
- }, null, 8, tn)
1571
+ }, null, 8, Wr)
1682
1572
  ]),
1683
1573
  _: 1
1684
- }, 8, ["to"])) : (v(), w("a", {
1574
+ }, 8, ["to"])) : (v(), b("a", {
1685
1575
  key: 0,
1686
- href: o.logoImageAnchorPath,
1576
+ href: i.logoImageAnchorPath,
1687
1577
  class: "logo"
1688
1578
  }, [
1689
1579
  P("img", {
1690
- src: o.logoImageSrc,
1580
+ src: i.logoImageSrc,
1691
1581
  loading: "lazy",
1692
1582
  width: "250",
1693
1583
  alt: "Police Data Accessibility Project Logo"
1694
- }, null, 8, en)
1695
- ], 8, Yr)),
1696
- U(Jr, { "top-position": r.value }, null, 8, ["top-position"])
1584
+ }, null, 8, Xr)
1585
+ ], 8, Gr)),
1586
+ Y(Hr, { "top-position": r.value }, null, 8, ["top-position"])
1697
1587
  ], 512));
1698
1588
  }
1699
1589
  });
1700
- const rn = /* @__PURE__ */ P("p", { class: "quick-search-description" }, " We maintain a catalog of public records about police, court, and jail systems across the United States. ", -1), dn = /* @__PURE__ */ R({
1590
+ const en = /* @__PURE__ */ j({
1701
1591
  __name: "QuickSearchForm",
1702
1592
  props: {
1703
1593
  mode: { default: "prod" }
1704
1594
  },
1705
1595
  setup(e) {
1706
- const t = at(), r = e, n = [
1596
+ const t = rt(), r = e, n = [
1707
1597
  {
1708
1598
  id: "search-term",
1709
1599
  name: "searchTerm",
1710
1600
  label: "What are you looking for?",
1711
- type: X.TEXT,
1601
+ type: T.TEXT,
1712
1602
  placeholder: "Enter a keyword, type of public records, or 'all'",
1713
1603
  value: ""
1714
1604
  },
@@ -1716,31 +1606,27 @@ const rn = /* @__PURE__ */ P("p", { class: "quick-search-description" }, " We ma
1716
1606
  id: "location",
1717
1607
  name: "location",
1718
1608
  label: "From where?",
1719
- type: X.TEXT,
1609
+ type: T.TEXT,
1720
1610
  placeholder: "Enter a state, county, municipality, or 'all'",
1721
1611
  value: ""
1722
1612
  }
1723
- // TODO: Fix TS when form and form test refactor PR is merged
1724
1613
  ];
1725
- function a({
1726
- location: s,
1727
- searchTerm: o
1728
- }) {
1729
- if (s = s.length > 0 ? s : "all", o = o.length > 0 ? o : "all", t.getRoutes().some((i) => i.path.includes("/search/")))
1730
- t.push(`/search/${o}/${s}`);
1614
+ function a(s) {
1615
+ let { location: i, searchTerm: u } = s;
1616
+ if (i = i && i.length > 0 ? i : "all", u = u && u.length > 0 ? u : "all", t.getRoutes().some((l) => l.path.includes("/search/")))
1617
+ t.push(`/search/${u}/${i}`);
1731
1618
  else {
1732
- const i = r.mode === "prod" ? "https://data-sources.pdap.io" : "https://data-sources.pdap.dev";
1733
- window.location.assign(`${i}/search/${o}/${s}`);
1619
+ const l = r.mode === "prod" ? "https://data-sources.pdap.io" : "https://data-sources.pdap.dev";
1620
+ window.location.assign(`${l}/search/${u}/${i}`);
1734
1621
  }
1735
1622
  }
1736
- return (s, o) => (v(), j(Se, {
1623
+ return (s, i) => (v(), A(ke, {
1737
1624
  alignment: "center",
1738
1625
  component: "div",
1739
1626
  class: "pdap-quick-search-form"
1740
1627
  }, {
1741
1628
  default: E(() => [
1742
- rn,
1743
- U(Wr, {
1629
+ Y(Mr, {
1744
1630
  id: "quick-search-form",
1745
1631
  class: "small",
1746
1632
  schema: n,
@@ -1748,9 +1634,9 @@ const rn = /* @__PURE__ */ P("p", { class: "quick-search-description" }, " We ma
1748
1634
  onSubmit: a
1749
1635
  }, {
1750
1636
  default: E(() => [
1751
- U(st, { type: "submit" }, {
1637
+ Y(nt, { type: "submit" }, {
1752
1638
  default: E(() => [
1753
- q("Search Data Sources")
1639
+ B("Search Data Sources")
1754
1640
  ]),
1755
1641
  _: 1
1756
1642
  })
@@ -1762,33 +1648,31 @@ const rn = /* @__PURE__ */ P("p", { class: "quick-search-description" }, " We ma
1762
1648
  }));
1763
1649
  }
1764
1650
  });
1765
- const nn = ["alt", "src"], pn = /* @__PURE__ */ R({
1651
+ const Ur = ["alt", "src"], tn = /* @__PURE__ */ j({
1766
1652
  __name: "TileIcon",
1767
1653
  props: {
1768
1654
  imgAltText: {},
1769
1655
  imgSrc: {}
1770
1656
  },
1771
1657
  setup(e) {
1772
- return (t, r) => (v(), w("img", {
1658
+ return (t, r) => (v(), b("img", {
1773
1659
  class: "pdap-tile-icon",
1774
1660
  alt: t.imgAltText,
1775
1661
  src: t.imgSrc
1776
- }, null, 8, nn));
1662
+ }, null, 8, Ur));
1777
1663
  }
1778
1664
  });
1779
1665
  export {
1780
- st as Button,
1781
- Se as FlexContainer,
1782
- on as Footer,
1783
- Wr as Form,
1784
- un as GridContainer,
1785
- ln as GridItem,
1786
- cn as Header,
1787
- At as Input,
1788
- kt as InputCheckbox,
1789
- Lt as InputText,
1790
- Jr as Nav,
1791
- X as PdapInputTypes,
1792
- dn as QuickSearchForm,
1793
- pn as TileIcon
1666
+ nt as Button,
1667
+ ke as FlexContainer,
1668
+ Zr as Footer,
1669
+ Mr as Form,
1670
+ Dr as GridContainer,
1671
+ Jr as GridItem,
1672
+ Yr as Header,
1673
+ Tt as Input,
1674
+ Hr as Nav,
1675
+ T as PdapInputTypes,
1676
+ en as QuickSearchForm,
1677
+ tn as TileIcon
1794
1678
  };