pdap-design-system 2.0.0 → 2.0.2

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