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