pdap-design-system 2.0.1 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,62 +1,62 @@
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 j, reactive as C, openBlock as v, createElementBlock as b, normalizeClass as G, renderSlot as K, createBlock as A, resolveDynamicComponent as fe, withCtx as E, inject as J, resolveComponent as Qe, createVNode as Y, createElementVNode as P, Fragment as ee, renderList as me, 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 = E({
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
15
  return (n, a) => (v(), b("button", {
16
- class: H(r)
16
+ class: G(r)
17
17
  }, [
18
- B(n.$slots, "default")
18
+ K(n.$slots, "default")
19
19
  ], 2));
20
20
  }
21
21
  });
22
- const nt = /* @__PURE__ */ C({
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 = E({
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(re(n.component), {
34
- class: H(r)
33
+ return (n, a) => (v(), A(fe(n.component), {
34
+ class: G(r)
35
35
  }, {
36
- default: I(() => [
37
- B(n.$slots, "default")
36
+ default: E(() => [
37
+ K(n.$slots, "default")
38
38
  ]),
39
39
  _: 3
40
40
  }, 8, ["class"]));
41
41
  }
42
42
  });
43
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"),
44
+ /* @__PURE__ */ B(" © 2023 Police Data Accessibility Project"),
45
45
  /* @__PURE__ */ P("br")
46
46
  ], -1), ut = /* @__PURE__ */ P("p", { class: "pdap-footer-copyright" }, [
47
- /* @__PURE__ */ G(" PDAP is a non-profit. EIN: 85-4207132. "),
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__ */ G(". "),
52
+ /* @__PURE__ */ B(". "),
53
53
  /* @__PURE__ */ P("a", { href: "mailto:contact@pdap.io" }, "contact@pdap.io")
54
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), dt = ["href"], pt = ["src"], mt = ["src"], nn = /* @__PURE__ */ C({
59
+ ], -1), dt = ["href"], pt = ["src"], ft = ["src"], Zr = /* @__PURE__ */ j({
60
60
  __name: "PdapFooter",
61
61
  props: {
62
62
  logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/acronym.svg" },
@@ -69,7 +69,7 @@ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" },
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,31 +82,31 @@ 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");
85
+ const i = Qe("router-link");
86
86
  return v(), b("footer", at, [
87
- me(nt, { alignment: "center" }, {
88
- default: I(() => [
87
+ Y(ke, { alignment: "center" }, {
88
+ default: E(() => [
89
89
  P("ul", st, [
90
- (v(!0), b(Q, null, fe(d(r), (i) => (v(), b("li", {
91
- key: i.text,
90
+ (v(!0), b(ee, null, me(c(r), (u) => (v(), b("li", {
91
+ key: u.text,
92
92
  class: "pdap-footer-link-container"
93
93
  }, [
94
- i.href ? (v(), b("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
- }, S(i.text), 9, ot)) : q("", !0),
101
- i.path ? (v(), j(u, {
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
- default: I(() => [
109
- G(S(i.text), 1)
108
+ default: E(() => [
109
+ B(D(u.text), 1)
110
110
  ]),
111
111
  _: 2
112
112
  }, 1032, ["to"])) : q("", !0)
@@ -116,18 +116,18 @@ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" },
116
116
  ut,
117
117
  P("div", lt, [
118
118
  ct,
119
- d(n) ? (v(), j(u, {
119
+ c(n) ? (v(), A(i, {
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, ft)
131
131
  ]),
132
132
  _: 1
133
133
  }, 8, ["to"])) : (v(), b("a", {
@@ -150,7 +150,7 @@ const at = { class: "pdap-footer" }, st = { 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
- ft(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
+ mt(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 ft(e, t, r) {
174
+ function mt(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 ft(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
- function ee(e) {
186
+ function re(e) {
187
187
  return typeof e == "function";
188
188
  }
189
189
  function $t(e) {
190
- return Ze(e) || Je(e);
190
+ return Je(e) || Ye(e);
191
191
  }
192
- function ke(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++) {
@@ -200,44 +200,44 @@ function ke(e, t, r) {
200
200
  return n;
201
201
  }
202
202
  function le(e, t, r) {
203
- return y(() => e.some((n) => ke(t, n, {
203
+ return _(() => e.some((n) => ze(t, n, {
204
204
  [r]: !1
205
205
  })[r]));
206
206
  }
207
207
  function Oe(e, t, r) {
208
- return y(() => e.reduce((n, a) => {
209
- const s = ke(t, a, {
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 Se(e) {
218
+ function De(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 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;
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, m = arguments.length > 9 ? arguments[9] : void 0, g = arguments.length > 10 ? arguments[10] : void 0;
226
226
  const h = x(!!n.value), o = x(0);
227
227
  r.value = !1;
228
- const m = U([t, n].concat(l, g), () => {
229
- if (i && !n.value || c && !f.value && !r.value)
228
+ const f = X([t, n].concat(p, g), () => {
229
+ if (u && !n.value || l && !m.value && !r.value)
230
230
  return;
231
231
  let $;
232
232
  try {
233
- $ = ze(e, t, p, u);
234
- } catch (_) {
235
- $ = Promise.reject(_);
233
+ $ = Me(e, t, d, i);
234
+ } catch (y) {
235
+ $ = Promise.reject(y);
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(_);
239
- }).catch((_) => {
240
- o.value--, r.value = !!o.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,
@@ -245,171 +245,171 @@ function gt(e, t, r, n, a, s, u) {
245
245
  });
246
246
  return {
247
247
  $invalid: h,
248
- $unwatch: m
248
+ $unwatch: f
249
249
  };
250
250
  }
251
- function ht(e, t, r, n, a, s, u, 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 = () => ({}), m = _(() => {
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, u, s);
262
- a.value = h, g = Se(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,
270
- $invalid: f
269
+ $unwatch: d,
270
+ $invalid: m
271
271
  };
272
272
  }
273
- function vt(e, t, r, n, a, s, u, i, c, l, p) {
274
- const f = x(!1), g = e.$params || {}, h = x(null);
275
- let o, m;
273
+ function vt(e, t, r, n, a, s, i, u, l, p, d) {
274
+ const m = x(!1), g = e.$params || {}, h = x(null);
275
+ let o, f;
276
276
  e.$async ? {
277
277
  $invalid: o,
278
- $unwatch: m
279
- } = gt(e.$validator, t, f, r, n, h, a, e.$watchTargets, c, l, p) : {
278
+ $unwatch: f
279
+ } = gt(e.$validator, t, m, r, n, h, a, e.$watchTargets, l, p, d) : {
280
280
  $invalid: o,
281
- $unwatch: m
282
- } = ht(e.$validator, t, r, n, h, a, c, l);
281
+ $unwatch: f
282
+ } = ht(e.$validator, t, r, n, h, a, l, p);
283
283
  const $ = e.$message;
284
284
  return {
285
- $message: ee($) ? y(() => $(xe({
286
- $pending: f,
285
+ $message: re($) ? _(() => $(Re({
286
+ $pending: m,
287
287
  $invalid: o,
288
- $params: xe(g),
288
+ $params: Re(g),
289
289
  $model: t,
290
290
  $response: h,
291
291
  $validator: s,
292
- $propertyPath: i,
293
- $property: u
292
+ $propertyPath: u,
293
+ $property: i
294
294
  }))) : $ || "",
295
295
  $params: g,
296
- $pending: f,
296
+ $pending: m,
297
297
  $invalid: o,
298
298
  $response: h,
299
- $unwatch: m
299
+ $unwatch: f
300
300
  };
301
301
  }
302
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 u = 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 ee(c.$validator):
310
- n[i] = c;
309
+ case re(l.$validator):
310
+ n[u] = l;
311
311
  break;
312
- case ee(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
- u = 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: u
330
+ validationGroups: i
331
331
  };
332
332
  }
333
333
  const _t = "__root";
334
- function wt(e, t, r, n, a, s, u, 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;
334
+ function wt(e, t, r, n, a, s, i, u, l) {
335
+ const p = Object.keys(e), d = n.get(a, e), m = x(!1), g = x(!1), h = x(0);
336
+ if (d) {
337
+ if (!d.$partial)
338
+ return d;
339
+ d.$unwatch(), m.value = d.$dirty.value;
340
340
  }
341
341
  const o = {
342
- $dirty: f,
342
+ $dirty: m,
343
343
  $path: a,
344
344
  $touch: () => {
345
- f.value || (f.value = !0);
345
+ m.value || (m.value = !0);
346
346
  },
347
347
  $reset: () => {
348
- f.value && (f.value = !1);
348
+ m.value && (m.value = !1);
349
349
  },
350
350
  $commit: () => {
351
351
  }
352
352
  };
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, $) => ({
353
+ return p.length ? (p.forEach((f) => {
354
+ o[f] = vt(e[f], t, o.$dirty, s, i, f, r, a, l, g, h);
355
+ }), o.$externalResults = _(() => u.value ? [].concat(u.value).map((f, $) => ({
356
356
  $propertyPath: a,
357
357
  $property: r,
358
358
  $validator: "$externalResults",
359
359
  $uid: `${a}-externalResult-${$}`,
360
- $message: m,
360
+ $message: f,
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
+ })) : []), o.$invalid = _(() => {
365
+ const f = p.some(($) => c(o[$].$invalid));
366
+ return g.value = f, !!o.$externalResults.value.length || f;
367
+ }), o.$pending = _(() => p.some((f) => c(o[f].$pending))), o.$error = _(() => o.$dirty.value ? o.$pending.value || o.$invalid.value : !1), o.$silentErrors = _(() => p.filter((f) => c(o[f].$invalid)).map((f) => {
368
+ const $ = o[f];
369
+ return C({
370
370
  $propertyPath: a,
371
371
  $property: r,
372
- $validator: m,
373
- $uid: `${a}-${m}`,
372
+ $validator: f,
373
+ $uid: `${a}-${f}`,
374
374
  $message: $.$message,
375
375
  $params: $.$params,
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();
379
+ }).concat(o.$externalResults.value)), o.$errors = _(() => o.$dirty.value ? o.$silentErrors.value : []), o.$unwatch = () => p.forEach((f) => {
380
+ o[f].$unwatch();
381
381
  }), o.$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, o), o) : (d && n.set(a, e, o), o);
384
384
  }
385
- function bt(e, t, r, n, a, s, u) {
386
- const i = Object.keys(e);
387
- return i.length ? i.reduce((c, l) => (c[l] = de({
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: u
396
- }), c), {}) : {};
395
+ externalResults: i
396
+ }), l), {}) : {};
397
397
  }
398
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({
399
+ const n = _(() => [t, r].filter((o) => o).reduce((o, f) => o.concat(Object.values(c(f))), [])), a = _({
400
400
  get() {
401
401
  return e.$dirty.value || (n.value.length ? n.value.every((o) => o.$dirty) : !1);
402
402
  },
403
403
  set(o) {
404
404
  e.$dirty.value = o;
405
405
  }
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 = () => {
406
+ }), s = _(() => {
407
+ const o = c(e.$silentErrors) || [], f = n.value.filter(($) => (c($).$silentErrors || []).length).reduce(($, y) => $.concat(...y.$silentErrors), []);
408
+ return o.concat(f);
409
+ }), i = _(() => {
410
+ const o = c(e.$errors) || [], f = n.value.filter(($) => (c($).$errors || []).length).reduce(($, y) => $.concat(...y.$errors), []);
411
+ return o.concat(f);
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), m = () => {
413
413
  e.$touch(), n.value.forEach((o) => {
414
414
  o.$touch();
415
415
  });
@@ -422,115 +422,115 @@ function Pt(e, t, r) {
422
422
  o.$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((o) => o.$dirty) && m(), {
426
426
  $dirty: a,
427
- $errors: u,
428
- $invalid: i,
429
- $anyDirty: l,
430
- $error: p,
431
- $pending: c,
432
- $touch: f,
427
+ $errors: i,
428
+ $invalid: u,
429
+ $anyDirty: p,
430
+ $error: d,
431
+ $pending: l,
432
+ $touch: m,
433
433
  $reset: h,
434
434
  $silentErrors: s,
435
435
  $commit: g
436
436
  };
437
437
  }
438
- function de(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: u,
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, {
451
- rules: f,
450
+ const d = a ? `${a}.${n}` : n, {
451
+ rules: m,
452
452
  nestedValidators: g,
453
453
  config: h,
454
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;
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 = {};
455
+ } = yt(t), f = 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(m, $, n, i, d, f, l, F, r), O = bt(g, $, d, i, f, l, F), z = {};
462
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")
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: X,
473
+ $dirty: I,
474
+ $errors: Q,
475
475
  $invalid: oe,
476
- $anyDirty: qe,
477
- $error: Fe,
476
+ $anyDirty: Fe,
477
+ $error: Be,
478
478
  $pending: ie,
479
479
  $touch: ue,
480
480
  $reset: He,
481
- $silentErrors: Be,
481
+ $silentErrors: Ge,
482
482
  $commit: we
483
- } = Pt(se, R, s), Ge = n ? y({
484
- get: () => d($),
483
+ } = Pt(se, O, s), Xe = n ? _({
484
+ get: () => c($),
485
485
  set: (w) => {
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;
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 && U($, () => {
492
- A.value || ue();
493
- const w = d(l);
494
- w && (w[n] = _[n]);
491
+ n && f.$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
- async function Ue() {
499
- return ue(), m.$rewardEarly && (we(), await Y()), await Y(), new Promise((w) => {
498
+ async function We() {
499
+ return ue(), f.$rewardEarly && (we(), await te()), await te(), new Promise((w) => {
500
500
  if (!ie.value)
501
501
  return w(!oe.value);
502
- const z = U(ie, () => {
503
- w(!oe.value), z();
502
+ const M = X(ie, () => {
503
+ w(!oe.value), M();
504
504
  });
505
505
  });
506
506
  }
507
- function We(w) {
507
+ function Ue(w) {
508
508
  return (s.value || {})[w];
509
509
  }
510
510
  function Ke() {
511
- ce(l) ? l.value = _ : Object.keys(_).length === 0 ? Object.keys(l).forEach((w) => {
512
- delete l[w];
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 E(L(L(L({}, se), {}, {
516
- $model: Ge,
517
- $dirty: A,
518
- $error: Fe,
519
- $errors: X,
515
+ return C(V(V(V({}, se), {}, {
516
+ $model: Xe,
517
+ $dirty: I,
518
+ $error: Be,
519
+ $errors: Q,
520
520
  $invalid: oe,
521
- $anyDirty: qe,
521
+ $anyDirty: Fe,
522
522
  $pending: ie,
523
523
  $touch: ue,
524
524
  $reset: He,
525
- $path: p || _t,
526
- $silentErrors: Be,
527
- $validate: Ue,
525
+ $path: d || _t,
526
+ $silentErrors: Ge,
527
+ $validate: We,
528
528
  $commit: we
529
529
  }, s && {
530
- $getResultsForChild: We,
530
+ $getResultsForChild: Ue,
531
531
  $clearExternalResults: Ke,
532
- $validationGroups: k
533
- }), R));
532
+ $validationGroups: z
533
+ }), O));
534
534
  }
535
535
  class xt {
536
536
  constructor() {
@@ -544,7 +544,7 @@ class xt {
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 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, 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
564
  const Z = {
565
565
  COLLECT_ALL: !0,
566
566
  COLLECT_NONE: !1
567
- }, Re = Symbol("vuelidate#injectChildResults"), Ce = Symbol("vuelidate#removeChildResults");
568
- function Ot(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 u(p, f) {
573
+ const n = {}, a = x([]), s = _(() => a.value.reduce((d, m) => (d[m] = c(n[m]), d), {}));
574
+ function i(d, m) {
575
575
  let {
576
576
  $registerAs: g,
577
577
  $scope: h,
578
578
  $stopPropagation: o
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));
579
+ } = m;
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 || [], u);
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((m) => m !== d), delete n[d];
585
585
  }
586
- r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], i);
587
- const c = J(Re, []);
588
- be(Re, r.__vuelidateInjectInstances);
589
- const l = J(Ce, []);
586
+ r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], u);
587
+ const l = J(Ee, []);
588
+ be(Ee, r.__vuelidateInjectInstances);
589
+ const p = J(Ce, []);
590
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 Me(e) {
596
+ function qe(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" ? qe(t[r]) : _(() => t[r]);
600
600
  }
601
601
  });
602
602
  }
603
- let Ee = 0;
604
- function Rt(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
610
  $scope: s = Z.COLLECT_ALL,
611
- $stopPropagation: u,
612
- $externalResults: i,
613
- currentVueInstance: c
611
+ $stopPropagation: i,
612
+ $externalResults: u,
613
+ currentVueInstance: l
614
614
  } = n;
615
- const l = c || ((r = Xe()) === 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 xt(), {
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 m = x({}), g = new xt(), {
618
618
  childResults: h,
619
619
  sendValidationResultsToParent: o,
620
- removeValidationResultsFromParent: m
621
- } = l ? Ot({
620
+ removeValidationResultsFromParent: f
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, U(() => ee($) ? $.call(t.value, new Me(t.value)) : $, (_) => {
631
- f.value = de({
632
- validations: _,
630
+ t.value = p, X(() => re($) ? $.call(t.value, new qe(t.value)) : $, (y) => {
631
+ m.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 $ = ce(e) || $t(e) ? e : E(e || {});
646
- U($, (_) => {
647
- f.value = de({
648
- validations: _,
645
+ const $ = ce(e) || $t(e) ? e : C(e || {});
646
+ X($, (y) => {
647
+ m.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 && (o.forEach(($) => $(f, {
660
+ return p && (o.forEach(($) => $(m, {
661
661
  $registerAs: a,
662
662
  $scope: s,
663
- $stopPropagation: u
664
- })), $e(() => m.forEach(($) => $(a)))), y(() => L(L({}, d(f.value)), h.value));
663
+ $stopPropagation: i
664
+ })), $e(() => f.forEach(($) => $(a)))), _(() => V(V({}, c(m.value)), h.value));
665
665
  }
666
- const Ct = ["for"], Et = ["id"], It = /* @__PURE__ */ C({
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 ne(() => {
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(), b("div", {
686
- class: H({
687
- "pdap-input": !0,
688
- "pdap-input-error": ((s = n.error) == null ? void 0 : s.length) >= 1
689
- })
690
- }, [
691
- B(n.$slots, "default"),
692
- P("label", {
693
- class: "pdap-input-label",
694
- for: n.id
695
- }, S(n.label), 9, Ct),
696
- n.error ? (v(), b("div", {
697
- key: 0,
698
- id: r.value,
699
- class: "pdap-input-error-message"
700
- }, S(n.error), 9, Et)) : q("", !0)
701
- ], 2);
702
- };
703
- }
704
- });
705
- const jt = ["id", "name", "value", "placeholder"], At = /* @__PURE__ */ C({
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 ne(() => {
722
- console.debug(
723
- `Hello from PDAP InputText ${r.name} rendered at ${window.location.pathname}`,
724
- {
725
- props: r
726
- }
727
- );
728
- }), (s, u) => (v(), b("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, jt));
736
- }
737
- }), Tt = ["id", "name", "checked", "value"], Lt = /* @__PURE__ */ C({
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 ne(() => {
754
- console.debug(
755
- `Hello from PDAP InputCheckbox ${r.name} rendered at ${window.location.pathname}`,
756
- {
757
- props: r
758
- }
759
- );
760
- }), (s, u) => (v(), b("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, Tt));
769
724
  }
770
725
  });
771
- var pe = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e))(pe || {});
772
- const Vt = {
773
- [pe.CHECKBOX]: "InputCheckbox",
774
- [pe.TEXT]: "InputText"
775
- }, Dt = {
776
- name: "InputsGenerator",
777
- components: { InputText: At, InputCheckbox: Lt, PdapInput: It },
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: Vt,
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
- }, kt = (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 zt(e, t, r, n, a, s) {
812
- const u = Le("PdapInput");
813
- return v(!0), b(Q, null, fe(r.schema, (i) => {
814
- var c, l, p, f;
815
- return v(), j(u, {
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: I(() => [
823
- (v(), j(re(a.INPUT_COMPONENT_MAP[i.type]), Qe(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 St = /* @__PURE__ */ kt(Dt, [["render", zt]]);
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);
@@ -841,18 +733,18 @@ function Ie(e, t) {
841
733
  }
842
734
  return r;
843
735
  }
844
- function F(e) {
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
- Mt(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 Mt(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,
@@ -863,91 +755,91 @@ function Mt(e, t, r) {
863
755
  function W(e) {
864
756
  return typeof e == "function";
865
757
  }
866
- function te(e) {
758
+ function ne(e) {
867
759
  return e !== null && typeof e == "object" && !Array.isArray(e);
868
760
  }
869
761
  function ae(e) {
870
- return W(e.$validator) ? F({}, e) : {
762
+ return W(e.$validator) ? H({}, e) : {
871
763
  $validator: e
872
764
  };
873
765
  }
874
- function Nt(e) {
875
- return te(e) && W(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
- if (!te(e))
776
+ if (!ne(e))
885
777
  throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
886
- if (!te(t) && !W(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
780
  const r = ae(t);
889
- return r.$params = F(F({}, r.$params || {}), e), r;
781
+ return r.$params = H(H({}, r.$params || {}), e), r;
890
782
  }
891
- function K(e, t) {
892
- if (!W(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 (!te(t) && !W(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
788
  const r = ae(t);
897
789
  return r.$message = e, r;
898
790
  }
899
- function qt(e) {
791
+ function Vt(e) {
900
792
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
901
793
  const r = ae(e);
902
- return F(F({}, r), {}, {
794
+ return H(H({}, r), {}, {
903
795
  $async: !0,
904
796
  $watchTargets: t
905
797
  });
906
798
  }
907
- function Ft(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, u, i) => {
913
- const c = Object.entries(u).reduce((l, p) => {
914
- let [f, g] = p;
915
- const h = e[f] || {}, o = Object.entries(h).reduce((m, $) => {
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) {
919
- let A = N.$message || "";
920
- const X = 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 [m, g] = d;
807
+ const h = e[m] || {}, o = Object.entries(h).reduce((f, $) => {
808
+ let [y, F] = $;
809
+ const O = N(F).call(this, g, i, u, ...n), z = S(O);
810
+ if (f.$data[y] = O, f.$data.$invalid = !z || !!f.$data.$invalid, f.$data.$error = f.$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: !k,
924
- $params: X,
815
+ $invalid: !z,
816
+ $params: Q,
925
817
  $model: g,
926
- $response: R
927
- })), m.$errors.push({
928
- $property: f,
929
- $message: A,
930
- $params: X,
931
- $response: R,
818
+ $response: O
819
+ })), f.$errors.push({
820
+ $property: m,
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 && k,
939
- $data: m.$data,
940
- $errors: m.$errors
830
+ $valid: f.$valid && z,
831
+ $data: f.$data,
832
+ $errors: f.$errors
941
833
  };
942
834
  }, {
943
835
  $valid: !0,
944
836
  $data: {},
945
837
  $errors: []
946
838
  });
947
- return l.$data[f] = o.$data, l.$errors[f] = o.$errors, {
948
- $valid: l.$valid && o.$valid,
949
- $data: l.$data,
950
- $errors: l.$errors
839
+ return p.$data[m] = o.$data, p.$errors[m] = 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 Ft(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 Ft(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);
992
- function D() {
883
+ }, ve = (e) => (e = c(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
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: Ft,
891
+ forEach: St,
1000
892
  len: ve,
1001
893
  normalizeValidatorObject: ae,
1002
- regex: D,
1003
- req: O,
1004
- unwrap: d,
1005
- unwrapNormalizedValidator: M,
1006
- unwrapValidatorResponse: V,
1007
- withAsync: qt,
1008
- withMessage: K,
894
+ regex: k,
895
+ req: R,
896
+ unwrap: c,
897
+ unwrapNormalizedValidator: N,
898
+ unwrapValidatorResponse: S,
899
+ withAsync: Vt,
900
+ withMessage: U,
1009
901
  withParams: he
1010
- }), Ht = D(/^[a-zA-Z]*$/), Bt = {
1011
- $validator: Ht,
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
- }, Gt = D(/^[a-zA-Z0-9]*$/), Ut = {
1017
- $validator: Gt,
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
- }, Wt = D(/^\d*(\.\d+)?$/), Kt = {
1023
- $validator: Wt,
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 Xt(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 Zt(e, t) {
924
+ function Bt(e, t) {
1033
925
  return {
1034
- $validator: Xt(e, t),
926
+ $validator: Ft(e, t),
1035
927
  $message: (r) => {
1036
928
  let {
1037
929
  $params: n
@@ -1045,62 +937,62 @@ function Zt(e, t) {
1045
937
  }
1046
938
  };
1047
939
  }
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,
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 er(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(tr);
954
+ return t.length === 4 && t.every(Ut);
1063
955
  }
1064
- const tr = (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 rr = {
1071
- $validator: er,
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 nr() {
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(ar);
977
+ return r !== null && (r.length === 6 || r.length === 8) && r.every(Zt);
1086
978
  };
1087
979
  }
1088
- const ar = (e) => e.toLowerCase().match(/^[0-9a-f]{2}$/);
1089
- function sr(e) {
980
+ const Zt = (e) => e.toLowerCase().match(/^[0-9a-f]{2}$/);
981
+ function Jt(e) {
1090
982
  return {
1091
- $validator: nr(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 or(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 ir(e) {
993
+ function er(e) {
1102
994
  return {
1103
- $validator: or(e),
995
+ $validator: Yt(e),
1104
996
  $message: (t) => {
1105
997
  let {
1106
998
  $params: r
@@ -1113,12 +1005,12 @@ function ir(e) {
1113
1005
  }
1114
1006
  };
1115
1007
  }
1116
- function ur(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 lr(e) {
1011
+ function rr(e) {
1120
1012
  return {
1121
- $validator: ur(e),
1013
+ $validator: tr(e),
1122
1014
  $message: (t) => {
1123
1015
  let {
1124
1016
  $params: r
@@ -1131,28 +1023,28 @@ function lr(e) {
1131
1023
  }
1132
1024
  };
1133
1025
  }
1134
- function cr(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: cr,
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 dr(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 pr(e) {
1045
+ function sr(e) {
1154
1046
  return {
1155
- $validator: dr(e),
1047
+ $validator: ar(e),
1156
1048
  $message: "The value is required",
1157
1049
  $params: {
1158
1050
  type: "requiredIf",
@@ -1160,18 +1052,18 @@ function pr(e) {
1160
1052
  }
1161
1053
  };
1162
1054
  }
1163
- const Ae = (e, t) => e ? !0 : O(typeof t == "string" ? t.trim() : t);
1164
- function mr(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 fr(e) {
1064
+ function ir(e) {
1173
1065
  return {
1174
- $validator: mr(e),
1066
+ $validator: or(e),
1175
1067
  $message: "The value is required",
1176
1068
  $params: {
1177
1069
  type: "requiredUnless",
@@ -1179,13 +1071,13 @@ function fr(e) {
1179
1071
  }
1180
1072
  };
1181
1073
  }
1182
- function $r(e) {
1183
- return (t) => d(t) === d(e);
1074
+ function ur(e) {
1075
+ return (t) => c(t) === c(e);
1184
1076
  }
1185
- function gr(e) {
1077
+ function lr(e) {
1186
1078
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "other";
1187
1079
  return {
1188
- $validator: $r(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 gr(e) {
1194
1086
  }
1195
1087
  };
1196
1088
  }
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,
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 _r(e) {
1097
+ function fr(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 wr(e) {
1104
+ function mr(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 u = await a;
1218
- return V(u) ? u : 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 br() {
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((u) => u.$async), a = t.reduce((u, i) => i.$watchTargets ? u.concat(i.$watchTargets) : u, []);
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 ? wr(t) : _r(t)), {
1119
+ return t.length && (s = n ? mr(t) : fr(t)), {
1228
1120
  $async: n,
1229
1121
  $validator: s,
1230
1122
  $watchTargets: a
1231
1123
  };
1232
1124
  }
1233
- function Pr() {
1125
+ function gr() {
1234
1126
  return he({
1235
1127
  type: "or"
1236
- }, K("The value does not match any of the provided validators", br(...arguments)));
1128
+ }, U("The value does not match any of the provided validators", $r(...arguments)));
1237
1129
  }
1238
- function xr(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 Or(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 u = await a;
1251
- return V(u) ? M(s).apply(this, r) : u;
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 Rr() {
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((u) => u.$async), a = t.reduce((u, i) => i.$watchTargets ? u.concat(i.$watchTargets) : u, []);
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 ? Or(t) : xr(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 Cr() {
1158
+ function _r() {
1267
1159
  return he({
1268
1160
  type: "and"
1269
- }, K("The value does not match all of the provided validators", Rr(...arguments)));
1161
+ }, U("The value does not match all of the provided validators", yr(...arguments)));
1270
1162
  }
1271
- function Er(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 Nt(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 Ir(e) {
1171
+ function br(e) {
1280
1172
  return {
1281
- $validator: Er(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 jr(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 Ar(e) {
1183
+ function xr(e) {
1292
1184
  return {
1293
- $validator: jr(e),
1185
+ $validator: Pr(e),
1294
1186
  $message: (t) => {
1295
1187
  let {
1296
1188
  $params: r
@@ -1303,11 +1195,11 @@ function Ar(e) {
1303
1195
  }
1304
1196
  };
1305
1197
  }
1306
- function Tr(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 Lr = (e) => ({
1310
- $validator: Tr(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 Lr = (e) => ({
1318
1210
  max: e,
1319
1211
  type: "maxValue"
1320
1212
  }
1321
- }), Vr = D(/(^[0-9]*$)|(^-[0-9]+$)/), Dr = {
1322
- $validator: Vr,
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
- }, kr = D(/^[-]?\d*(\.\d+)?$/), zr = {
1328
- $validator: kr,
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 Sr(e) {
1226
+ function Tr(e) {
1335
1227
  let {
1336
1228
  t,
1337
1229
  messagePath: r = (a) => {
@@ -1344,92 +1236,92 @@ function Sr(e) {
1344
1236
  } = e;
1345
1237
  return function(s) {
1346
1238
  let {
1347
- withArguments: u = !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(F({
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 u && typeof s == "function" ? function() {
1363
- return K(l, s(...arguments));
1364
- } : K(l, s);
1254
+ return i && typeof s == "function" ? function() {
1255
+ return U(p, s(...arguments));
1256
+ } : U(p, s);
1365
1257
  };
1366
1258
  }
1367
1259
  const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1368
1260
  __proto__: null,
1369
- alpha: Bt,
1370
- alphaNum: Ut,
1371
- and: Cr,
1372
- between: Zt,
1373
- createI18nMessage: Sr,
1374
- decimal: zr,
1375
- email: Yt,
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: 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,
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: pr,
1389
- requiredUnless: fr,
1390
- sameAs: gr,
1391
- url: yr
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 Mr(e, t) {
1288
+ function Ir(e, t) {
1397
1289
  return {
1398
1290
  [e]: Ne[e](t)
1399
1291
  };
1400
1292
  }
1401
- function Nr(e, t, r) {
1293
+ function Lr(e, t, r) {
1402
1294
  return {
1403
1295
  [e]: ye.withMessage(r, Ne[e](t))
1404
1296
  };
1405
1297
  }
1406
- function qr() {
1298
+ function Vr() {
1407
1299
  return { required: _e };
1408
1300
  }
1409
- function Fr(e) {
1301
+ function Sr(e) {
1410
1302
  return {
1411
1303
  required: ye.withMessage(e, _e)
1412
1304
  };
1413
1305
  }
1414
- function Hr(e, t) {
1415
- if (Te(e) && typeof t.message == "string" && typeof t.value == "number")
1416
- return Nr(
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 Mr(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 Fr(t.message);
1316
+ return Sr(t.message);
1425
1317
  if (e === "required" && typeof t.message > "u")
1426
- return qr();
1318
+ return Vr();
1427
1319
  throw new Error("No valid rule detected");
1428
1320
  }
1429
- const Br = {
1321
+ const zr = {
1430
1322
  key: 0,
1431
1323
  class: "pdap-form-error-message"
1432
- }, an = /* @__PURE__ */ C({
1324
+ }, Mr = /* @__PURE__ */ j({
1433
1325
  __name: "PdapForm",
1434
1326
  props: {
1435
1327
  error: { default: null },
@@ -1440,74 +1332,72 @@ const Br = {
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, m) => {
1336
+ switch (m.type) {
1337
+ case T.CHECKBOX:
1338
+ return { ...d, [m.name]: String(m.defaultChecked) };
1339
+ case T.TEXT:
1449
1340
  default:
1450
- return c;
1341
+ return { ...d, [m.name]: m.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
- ...Hr(g, h)
1344
+ ), s = r.schema.reduce((d, m) => {
1345
+ const g = Object.entries(m.validators ?? {}).reduce(
1346
+ (h, [o, f]) => ({
1347
+ ...h,
1348
+ ...kr(o, f)
1458
1349
  }),
1459
1350
  {}
1460
1351
  );
1461
1352
  return {
1462
- ...c,
1463
- [l.name]: {
1464
- ...p
1353
+ ...d,
1354
+ [m.name]: {
1355
+ ...g
1465
1356
  }
1466
1357
  };
1467
- }, {}), u = Rt(s, a, { $autoDirty: !1, $lazy: !1 });
1468
- ne(
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, m) {
1360
+ a.value[d] = m;
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: u.value
1371
+ v$: i
1476
1372
  }
1477
- )
1478
- );
1479
- async function i(c) {
1480
- const l = await u.value.$validate();
1481
- if (l) {
1482
- const p = c.target, f = new FormData(p), g = {};
1483
- for (const [h, o] of f)
1484
- Object.assign(g, { [h]: o });
1485
- console.debug("Hello from Form's onSubmit handler", {
1486
- values: g,
1487
- isCorrectSubmission: l,
1488
- vuelidate: u.value
1489
- }), n("submit", g), u.value.$reset(), p.reset();
1490
- return;
1491
- } else {
1492
- console.error("is invalid form data", { v$: u.value });
1373
+ });
1374
+ });
1375
+ async function p(d) {
1376
+ if (await i.value.$validate()) {
1377
+ n("submit", { ...a }), i.value.$reset(), d.target.reset(), a.value = Object.entries(a.value).reduce((h, [o, f]) => ({ ...h, [o]: ["true", "false"].includes(f) ? f : "" }), {});
1493
1378
  return;
1494
1379
  }
1495
1380
  }
1496
- return (c, l) => (v(), b("form", {
1381
+ return (d, m) => (v(), b("form", {
1497
1382
  class: "pdap-form",
1498
- onSubmit: l[0] || (l[0] = Ye((p) => i(p), ["prevent"]))
1383
+ onSubmit: m[0] || (m[0] = et((g) => p(g), ["prevent"]))
1499
1384
  }, [
1500
- typeof c.error == "string" && c.error.length > 0 ? (v(), b("div", Br, S(c.error), 1)) : q("", !0),
1501
- me(St, et(tt({
1502
- schema: c.schema,
1503
- values: a.value,
1504
- ...typeof d(u) < "u" ? { v$: d(u) } : {}
1505
- })), null, 16),
1506
- B(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, me(d.schema, (g) => {
1387
+ var h, o, f, $;
1388
+ return v(), A(Tt, de((delete g.validators, g), {
1389
+ key: g.name,
1390
+ error: (h = c(i)[g.name]) != null && h.$error ? ($ = (f = (o = c(i)[g.name]) == null ? void 0 : o.$errors) == null ? void 0 : f[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 sn = /* @__PURE__ */ C({
1400
+ const Dr = /* @__PURE__ */ j({
1511
1401
  __name: "GridContainer",
1512
1402
  props: {
1513
1403
  columns: { default: "auto" },
@@ -1517,27 +1407,27 @@ const sn = /* @__PURE__ */ C({
1517
1407
  templateRows: {}
1518
1408
  },
1519
1409
  setup(e) {
1520
- const t = e, r = E({
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 = E({
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 (u, i) => (v(), j(re(u.component), {
1530
- class: H(r),
1419
+ return (i, u) => (v(), A(fe(i.component), {
1420
+ class: G(r),
1531
1421
  style: ge(s)
1532
1422
  }, {
1533
- default: I(() => [
1534
- B(u.$slots, "default")
1423
+ default: E(() => [
1424
+ K(i.$slots, "default")
1535
1425
  ]),
1536
1426
  _: 3
1537
1427
  }, 8, ["class", "style"]));
1538
1428
  }
1539
1429
  });
1540
- const on = /* @__PURE__ */ C({
1430
+ const Jr = /* @__PURE__ */ j({
1541
1431
  __name: "GridItem",
1542
1432
  props: {
1543
1433
  component: { default: "div" },
@@ -1545,34 +1435,34 @@ const on = /* @__PURE__ */ C({
1545
1435
  spanRow: { default: 1 }
1546
1436
  },
1547
1437
  setup(e) {
1548
- const t = e, r = E({
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 = E({
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(re(a.component), {
1558
- class: H(r),
1447
+ return (a, s) => (v(), A(fe(a.component), {
1448
+ class: G(r),
1559
1449
  style: ge(n)
1560
1450
  }, {
1561
- default: I(() => [
1562
- B(a.$slots, "default")
1451
+ default: E(() => [
1452
+ K(a.$slots, "default")
1563
1453
  ]),
1564
1454
  _: 3
1565
1455
  }, 8, ["class", "style"]));
1566
1456
  }
1567
1457
  });
1568
- const Gr = /* @__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), Ur = [
1574
- Gr
1575
- ], Wr = ["aria-expanded"], Kr = ["href"], Xr = /* @__PURE__ */ C({
1463
+ ], -1), Nr = [
1464
+ qr
1465
+ ], Fr = ["aria-expanded"], Br = ["href"], Hr = /* @__PURE__ */ j({
1576
1466
  __name: "PdapNav",
1577
1467
  props: {
1578
1468
  topPosition: {}
@@ -1584,10 +1474,10 @@ const Gr = /* @__PURE__ */ P("svg", {
1584
1474
  `,
1585
1475
  "Did you forget to inject some linkData for the Nav component?"
1586
1476
  ));
1587
- const r = E({
1477
+ const r = C({
1588
1478
  isExpanded: !1,
1589
1479
  isMobile: !0
1590
- }), n = E({
1480
+ }), n = C({
1591
1481
  "pdap-nav": !0
1592
1482
  });
1593
1483
  Ve(() => {
@@ -1596,57 +1486,57 @@ const Gr = /* @__PURE__ */ P("svg", {
1596
1486
  window.removeEventListener("resize", a);
1597
1487
  });
1598
1488
  async function a() {
1599
- window.innerWidth <= 1024 ? r.isMobile = !0 : r.isMobile = !1, await Y();
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 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();
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 (u, i) => (v(), b(Q, 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
- }, Ur),
1502
+ }, Nr),
1613
1503
  P("nav", {
1614
1504
  id: "nav",
1615
1505
  "aria-expanded": r.isMobile && r.isExpanded || !r.isMobile,
1616
- class: H(n),
1617
- style: ge(r.isMobile ? { top: `${u.topPosition}px` } : {})
1506
+ class: G(n),
1507
+ style: ge(r.isMobile ? { top: `${i.topPosition}px` } : {})
1618
1508
  }, [
1619
- (v(!0), b(Q, null, fe(d(t), (c) => (v(), b("li", {
1620
- key: c.text,
1509
+ (v(!0), b(ee, null, me(c(t), (l) => (v(), b("li", {
1510
+ key: l.text,
1621
1511
  class: "pdap-nav-link-container"
1622
1512
  }, [
1623
- c.href ? (v(), b("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
- }, S(c.text), 9, Kr)) : q("", !0),
1631
- c.path ? (v(), j(d(De), {
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
- default: I(() => [
1640
- G(S(c.text), 1)
1529
+ default: E(() => [
1530
+ B(D(l.text), 1)
1641
1531
  ]),
1642
1532
  _: 2
1643
1533
  }, 1032, ["to"])) : q("", !0)
1644
1534
  ]))), 128))
1645
- ], 14, Wr)
1535
+ ], 14, Fr)
1646
1536
  ], 64));
1647
1537
  }
1648
1538
  });
1649
- const Zr = ["href"], Jr = ["src"], Qr = ["src"], un = /* @__PURE__ */ C({
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 Zr = ["href"], Jr = ["src"], Qr = ["src"], un = /* @__PURE__ */ C({
1654
1544
  },
1655
1545
  setup(e) {
1656
1546
  const t = e, r = x(), n = x(null), a = t.logoImageAnchorPath.startsWith("/");
1657
- rt(() => {
1547
+ tt(() => {
1658
1548
  s(), window.addEventListener("resize", s);
1659
1549
  }), $e(() => {
1660
1550
  window.removeEventListener("resize", s);
@@ -1662,42 +1552,105 @@ const Zr = ["href"], Jr = ["src"], Qr = ["src"], un = /* @__PURE__ */ C({
1662
1552
  function s() {
1663
1553
  n.value && (r.value = n.value.offsetHeight);
1664
1554
  }
1665
- return (u, i) => (v(), b("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(De), {
1560
+ c(a) ? (v(), A(c(Se), {
1671
1561
  key: 1,
1672
- to: u.logoImageAnchorPath,
1562
+ to: i.logoImageAnchorPath,
1673
1563
  class: "logo"
1674
1564
  }, {
1675
- default: I(() => [
1565
+ default: E(() => [
1676
1566
  P("img", {
1677
- src: u.logoImageSrc,
1567
+ src: i.logoImageSrc,
1678
1568
  loading: "lazy",
1679
1569
  width: "250",
1680
1570
  alt: "Police Data Accessibility Project Logo"
1681
- }, null, 8, Qr)
1571
+ }, null, 8, Wr)
1682
1572
  ]),
1683
1573
  _: 1
1684
1574
  }, 8, ["to"])) : (v(), b("a", {
1685
1575
  key: 0,
1686
- href: u.logoImageAnchorPath,
1576
+ href: i.logoImageAnchorPath,
1687
1577
  class: "logo"
1688
1578
  }, [
1689
1579
  P("img", {
1690
- src: u.logoImageSrc,
1580
+ src: i.logoImageSrc,
1691
1581
  loading: "lazy",
1692
1582
  width: "250",
1693
1583
  alt: "Police Data Accessibility Project Logo"
1694
- }, null, 8, Jr)
1695
- ], 8, Zr)),
1696
- me(Xr, { "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 Yr = ["alt", "src"], ln = /* @__PURE__ */ C({
1590
+ const en = /* @__PURE__ */ j({
1591
+ __name: "QuickSearchForm",
1592
+ props: {
1593
+ mode: { default: "prod" }
1594
+ },
1595
+ setup(e) {
1596
+ const t = rt(), r = e, n = [
1597
+ {
1598
+ id: "search-term",
1599
+ name: "searchTerm",
1600
+ label: "What are you looking for?",
1601
+ type: T.TEXT,
1602
+ placeholder: "Enter a keyword, type of public records, or 'all'",
1603
+ value: ""
1604
+ },
1605
+ {
1606
+ id: "location",
1607
+ name: "location",
1608
+ label: "From where?",
1609
+ type: T.TEXT,
1610
+ placeholder: "Enter a state, county, municipality, or 'all'",
1611
+ value: ""
1612
+ }
1613
+ ];
1614
+ function a({
1615
+ location: s,
1616
+ searchTerm: i
1617
+ }) {
1618
+ if (s = s && s.length > 0 ? s : "all", i = i && i.length > 0 ? i : "all", t.getRoutes().some((u) => u.path.includes("/search/")))
1619
+ t.push(`/search/${i}/${s}`);
1620
+ else {
1621
+ const u = r.mode === "prod" ? "https://data-sources.pdap.io" : "https://data-sources.pdap.dev";
1622
+ window.location.assign(`${u}/search/${i}/${s}`);
1623
+ }
1624
+ }
1625
+ return (s, i) => (v(), A(ke, {
1626
+ alignment: "center",
1627
+ component: "div",
1628
+ class: "pdap-quick-search-form"
1629
+ }, {
1630
+ default: E(() => [
1631
+ Y(Mr, {
1632
+ id: "quick-search-form",
1633
+ class: "small",
1634
+ schema: n,
1635
+ name: "quickSearchForm",
1636
+ onSubmit: a
1637
+ }, {
1638
+ default: E(() => [
1639
+ Y(nt, { type: "submit" }, {
1640
+ default: E(() => [
1641
+ B("Search Data Sources")
1642
+ ]),
1643
+ _: 1
1644
+ })
1645
+ ]),
1646
+ _: 1
1647
+ })
1648
+ ]),
1649
+ _: 1
1650
+ }));
1651
+ }
1652
+ });
1653
+ const Ur = ["alt", "src"], tn = /* @__PURE__ */ j({
1701
1654
  __name: "TileIcon",
1702
1655
  props: {
1703
1656
  imgAltText: {},
@@ -1708,21 +1661,20 @@ const Yr = ["alt", "src"], ln = /* @__PURE__ */ C({
1708
1661
  class: "pdap-tile-icon",
1709
1662
  alt: t.imgAltText,
1710
1663
  src: t.imgSrc
1711
- }, null, 8, Yr));
1664
+ }, null, 8, Ur));
1712
1665
  }
1713
1666
  });
1714
1667
  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
1668
+ nt as Button,
1669
+ ke as FlexContainer,
1670
+ Zr as Footer,
1671
+ Mr as Form,
1672
+ Dr as GridContainer,
1673
+ Jr as GridItem,
1674
+ Yr as Header,
1675
+ Tt as Input,
1676
+ Hr as Nav,
1677
+ T as PdapInputTypes,
1678
+ en as QuickSearchForm,
1679
+ tn as TileIcon
1728
1680
  };