@stonecrop/aform 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/aform.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as D, mergeModels as H, useModel as F, openBlock as p, createElementBlock as g, createElementVNode as i, toDisplayString as k, withDirectives as w, vModelCheckbox as be, vShow as B, resolveComponent as _e, createBlock as j, withCtx as ke, useTemplateRef as de, vModelText as P, ref as v, onMounted as N, onUnmounted as we, normalizeClass as z, withKeys as K, Fragment as q, renderList as O, watch as W, onBeforeUnmount as De, computed as V, unref as I, getCurrentScope as fe, onScopeDispose as me, getCurrentInstance as Ae, nextTick as Me, withModifiers as Ee, resolveDynamicComponent as Ce, mergeProps as Te, createTextVNode as pe, createCommentVNode as J, renderSlot as Se, createVNode as $e, readonly as Le } from "vue";
2
- import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["for"], xe = { class: "aform_checkbox-container aform_input-field" }, He = ["id", "readonly", "required"], Pe = ["innerHTML"], Fe = /* @__PURE__ */ D({
1
+ import { defineComponent as M, mergeModels as G, useModel as H, openBlock as g, createElementBlock as b, createElementVNode as d, toDisplayString as D, withDirectives as E, vModelCheckbox as Pe, vShow as R, resolveComponent as Oe, createBlock as te, withCtx as Fe, useTemplateRef as Ae, vModelText as F, getCurrentScope as ne, onScopeDispose as oe, toRef as He, readonly as De, customRef as Re, ref as y, watch as P, toValue as V, computed as I, reactive as Be, normalizeClass as J, withKeys as O, Fragment as U, renderList as N, withModifiers as Ee, unref as x, onMounted as le, onBeforeUnmount as qe, getCurrentInstance as We, nextTick as Ue, resolveDynamicComponent as Ne, mergeProps as Ye, createTextVNode as Me, createCommentVNode as se, renderSlot as je, createVNode as Ge } from "vue";
2
+ import './assets/index.css';const Ke = { class: "aform_form-element" }, ze = ["for"], Xe = { class: "aform_checkbox-container aform_input-field" }, Je = ["id", "readonly", "required"], Qe = ["innerHTML"], Ze = /* @__PURE__ */ M({
3
3
  __name: "ACheckbox",
4
- props: /* @__PURE__ */ H({
4
+ props: /* @__PURE__ */ G({
5
5
  schema: {},
6
6
  label: {},
7
7
  mask: {},
@@ -15,29 +15,29 @@ import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["f
15
15
  }),
16
16
  emits: ["update:modelValue"],
17
17
  setup(e) {
18
- const t = F(e, "modelValue");
19
- return (n, o) => (p(), g("div", Ve, [
20
- i("label", {
18
+ const t = H(e, "modelValue");
19
+ return (n, o) => (g(), b("div", Ke, [
20
+ d("label", {
21
21
  class: "aform_field-label",
22
22
  for: n.uuid
23
- }, k(n.label), 9, Ie),
24
- i("span", xe, [
25
- w(i("input", {
23
+ }, D(n.label), 9, ze),
24
+ d("span", Xe, [
25
+ E(d("input", {
26
26
  "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
27
27
  type: "checkbox",
28
28
  id: n.uuid,
29
29
  class: "aform_checkbox",
30
30
  readonly: n.readonly,
31
31
  required: n.required
32
- }, null, 8, He), [
33
- [be, t.value]
32
+ }, null, 8, Je), [
33
+ [Pe, t.value]
34
34
  ])
35
35
  ]),
36
- w(i("p", {
36
+ E(d("p", {
37
37
  class: "aform_error",
38
38
  innerHTML: n.validation.errorMessage
39
- }, null, 8, Pe), [
40
- [B, n.validation.errorMessage]
39
+ }, null, 8, Qe), [
40
+ [R, n.validation.errorMessage]
41
41
  ])
42
42
  ]));
43
43
  }
@@ -46,31 +46,31 @@ import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["f
46
46
  for (const [o, l] of t)
47
47
  n[o] = l;
48
48
  return n;
49
- }, Be = /* @__PURE__ */ T(Fe, [["__scopeId", "data-v-9f382ad4"]]), qe = /* @__PURE__ */ D({
49
+ }, et = /* @__PURE__ */ T(Ze, [["__scopeId", "data-v-9f382ad4"]]), tt = /* @__PURE__ */ M({
50
50
  __name: "AComboBox",
51
51
  props: ["event", "cellData", "tableID"],
52
52
  setup(e) {
53
53
  return (t, n) => {
54
- const o = _e("ATableModal");
55
- return p(), j(o, {
54
+ const o = Oe("ATableModal");
55
+ return g(), te(o, {
56
56
  event: e.event,
57
57
  cellData: e.cellData,
58
58
  class: "amodal"
59
59
  }, {
60
- default: ke(() => n[0] || (n[0] = [
61
- i("div", null, [
62
- i("input", { type: "text" }),
63
- i("input", { type: "text" }),
64
- i("input", { type: "text" })
60
+ default: Fe(() => n[0] || (n[0] = [
61
+ d("div", null, [
62
+ d("input", { type: "text" }),
63
+ d("input", { type: "text" }),
64
+ d("input", { type: "text" })
65
65
  ], -1)
66
66
  ])),
67
67
  _: 1
68
68
  }, 8, ["event", "cellData"]);
69
69
  };
70
70
  }
71
- }), Oe = ["id", "disabled", "required"], Re = ["for"], Ue = ["innerHTML"], We = /* @__PURE__ */ D({
71
+ }), nt = ["id", "disabled", "required"], ot = ["for"], lt = ["innerHTML"], st = /* @__PURE__ */ M({
72
72
  __name: "ADate",
73
- props: /* @__PURE__ */ H({
73
+ props: /* @__PURE__ */ G({
74
74
  schema: {},
75
75
  label: { default: "Date" },
76
76
  mask: {},
@@ -86,235 +86,453 @@ import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["f
86
86
  }),
87
87
  emits: ["update:modelValue"],
88
88
  setup(e) {
89
- const t = F(e, "modelValue", {
89
+ const t = H(e, "modelValue", {
90
90
  // format the date to be compatible with the native input datepicker
91
91
  set: (l) => new Date(l).toISOString().split("T")[0]
92
- }), n = de("date"), o = () => {
92
+ }), n = Ae("date"), o = () => {
93
93
  n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
94
94
  };
95
- return (l, s) => (p(), g("div", null, [
96
- w(i("input", {
97
- "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
95
+ return (l, a) => (g(), b("div", null, [
96
+ E(d("input", {
97
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => t.value = s),
98
98
  ref: "date",
99
99
  type: "date",
100
100
  id: l.uuid,
101
101
  disabled: l.readonly,
102
102
  required: l.required,
103
103
  onClick: o
104
- }, null, 8, Oe), [
105
- [P, t.value]
104
+ }, null, 8, nt), [
105
+ [F, t.value]
106
106
  ]),
107
- i("label", { for: l.uuid }, k(l.label), 9, Re),
108
- w(i("p", {
107
+ d("label", { for: l.uuid }, D(l.label), 9, ot),
108
+ E(d("p", {
109
109
  innerHTML: l.validation.errorMessage
110
- }, null, 8, Ue), [
111
- [B, l.validation.errorMessage]
110
+ }, null, 8, lt), [
111
+ [R, l.validation.errorMessage]
112
112
  ])
113
113
  ]));
114
114
  }
115
- }), Ye = /* @__PURE__ */ T(We, [["__scopeId", "data-v-280b3d1a"]]), Ge = { class: "input-wrapper" }, Ke = {
115
+ }), at = /* @__PURE__ */ T(st, [["__scopeId", "data-v-280b3d1a"]]);
116
+ function Ce(e) {
117
+ return ne() ? (oe(e), !0) : !1;
118
+ }
119
+ const Ie = typeof window < "u" && typeof document < "u";
120
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
121
+ const rt = Object.prototype.toString, it = (e) => rt.call(e) === "[object Object]", W = () => {
122
+ }, ee = /* @__PURE__ */ ut();
123
+ function ut() {
124
+ var e, t;
125
+ return Ie && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
126
+ }
127
+ function de(e) {
128
+ return Array.isArray(e) ? e : [e];
129
+ }
130
+ function ct(...e) {
131
+ if (e.length !== 1)
132
+ return He(...e);
133
+ const t = e[0];
134
+ return typeof t == "function" ? De(Re(() => ({ get: t, set: W }))) : y(t);
135
+ }
136
+ const Te = Ie ? window : void 0;
137
+ function q(e) {
138
+ var t;
139
+ const n = V(e);
140
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
141
+ }
142
+ function X(...e) {
143
+ let t, n, o, l;
144
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = Te) : [t, n, o, l] = e, !t)
145
+ return W;
146
+ n = de(n), o = de(o);
147
+ const a = [], s = () => {
148
+ a.forEach((c) => c()), a.length = 0;
149
+ }, r = (c, m, f, p) => (c.addEventListener(m, f, p), () => c.removeEventListener(m, f, p)), u = P(
150
+ () => [q(t), V(l)],
151
+ ([c, m]) => {
152
+ if (s(), !c)
153
+ return;
154
+ const f = it(m) ? { ...m } : m;
155
+ a.push(
156
+ ...n.flatMap((p) => o.map((w) => r(c, p, w, f)))
157
+ );
158
+ },
159
+ { immediate: !0, flush: "post" }
160
+ ), i = () => {
161
+ u(), s();
162
+ };
163
+ return Ce(i), i;
164
+ }
165
+ let fe = !1;
166
+ function me(e, t, n = {}) {
167
+ const { window: o = Te, ignore: l = [], capture: a = !0, detectIframe: s = !1 } = n;
168
+ if (!o)
169
+ return W;
170
+ ee && !fe && (fe = !0, Array.from(o.document.body.children).forEach((v) => v.addEventListener("click", W)), o.document.documentElement.addEventListener("click", W));
171
+ let r = !0;
172
+ const u = (v) => V(l).some((h) => {
173
+ if (typeof h == "string")
174
+ return Array.from(o.document.querySelectorAll(h)).some((_) => _ === v.target || v.composedPath().includes(_));
175
+ {
176
+ const _ = q(h);
177
+ return _ && (v.target === _ || v.composedPath().includes(_));
178
+ }
179
+ });
180
+ function i(v) {
181
+ const h = V(v);
182
+ return h && h.$.subTree.shapeFlag === 16;
183
+ }
184
+ function c(v, h) {
185
+ const _ = V(v), B = _.$.subTree && _.$.subTree.children;
186
+ return B == null || !Array.isArray(B) ? !1 : B.some((k) => k.el === h.target || h.composedPath().includes(k.el));
187
+ }
188
+ const m = (v) => {
189
+ const h = q(e);
190
+ if (v.target != null && !(!(h instanceof Element) && i(e) && c(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
191
+ if (v.detail === 0 && (r = !u(v)), !r) {
192
+ r = !0;
193
+ return;
194
+ }
195
+ t(v);
196
+ }
197
+ };
198
+ let f = !1;
199
+ const p = [
200
+ X(o, "click", (v) => {
201
+ f || (f = !0, setTimeout(() => {
202
+ f = !1;
203
+ }, 0), m(v));
204
+ }, { passive: !0, capture: a }),
205
+ X(o, "pointerdown", (v) => {
206
+ const h = q(e);
207
+ r = !u(v) && !!(h && !v.composedPath().includes(h));
208
+ }, { passive: !0 }),
209
+ s && X(o, "blur", (v) => {
210
+ setTimeout(() => {
211
+ var h;
212
+ const _ = q(e);
213
+ ((h = o.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(_ != null && _.contains(o.document.activeElement)) && t(v);
214
+ }, 0);
215
+ }, { passive: !0 })
216
+ ].filter(Boolean);
217
+ return () => p.forEach((v) => v());
218
+ }
219
+ const dt = {
220
+ mounted(e, t) {
221
+ const n = !t.modifiers.bubble;
222
+ if (typeof t.value == "function")
223
+ e.__onClickOutside_stop = me(e, t.value, { capture: n });
224
+ else {
225
+ const [o, l] = t.value;
226
+ e.__onClickOutside_stop = me(e, o, Object.assign({ capture: n }, l));
227
+ }
228
+ },
229
+ unmounted(e) {
230
+ e.__onClickOutside_stop();
231
+ }
232
+ };
233
+ function Q(e) {
234
+ return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
235
+ }
236
+ function Se(e) {
237
+ const t = window.getComputedStyle(e);
238
+ if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
239
+ return !0;
240
+ {
241
+ const n = e.parentNode;
242
+ return !n || n.tagName === "BODY" ? !1 : Se(n);
243
+ }
244
+ }
245
+ function ft(e) {
246
+ const t = e || window.event, n = t.target;
247
+ return Se(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
248
+ }
249
+ const Z = /* @__PURE__ */ new WeakMap();
250
+ function mt(e, t = !1) {
251
+ const n = y(t);
252
+ let o = null, l = "";
253
+ P(ct(e), (r) => {
254
+ const u = Q(V(r));
255
+ if (u) {
256
+ const i = u;
257
+ if (Z.get(i) || Z.set(i, i.style.overflow), i.style.overflow !== "hidden" && (l = i.style.overflow), i.style.overflow === "hidden")
258
+ return n.value = !0;
259
+ if (n.value)
260
+ return i.style.overflow = "hidden";
261
+ }
262
+ }, {
263
+ immediate: !0
264
+ });
265
+ const a = () => {
266
+ const r = Q(V(e));
267
+ !r || n.value || (ee && (o = X(
268
+ r,
269
+ "touchmove",
270
+ (u) => {
271
+ ft(u);
272
+ },
273
+ { passive: !1 }
274
+ )), r.style.overflow = "hidden", n.value = !0);
275
+ }, s = () => {
276
+ const r = Q(V(e));
277
+ !r || !n.value || (ee && (o == null || o()), r.style.overflow = l, Z.delete(r), n.value = !1);
278
+ };
279
+ return Ce(s), I({
280
+ get() {
281
+ return n.value;
282
+ },
283
+ set(r) {
284
+ r ? a() : s();
285
+ }
286
+ });
287
+ }
288
+ function pt() {
289
+ let e = !1;
290
+ const t = y(!1);
291
+ return (n, o) => {
292
+ if (t.value = o.value, e)
293
+ return;
294
+ e = !0;
295
+ const l = mt(n, o.value);
296
+ P(t, (a) => l.value = a);
297
+ };
298
+ }
299
+ pt();
300
+ const vt = { class: "input-wrapper" }, ht = {
116
301
  id: "autocomplete-results",
117
302
  class: "autocomplete-results"
118
- }, ze = {
303
+ }, gt = {
119
304
  key: 0,
120
305
  class: "loading autocomplete-result"
121
- }, Ne = ["onClick"], je = /* @__PURE__ */ D({
306
+ }, yt = ["onClick"], bt = /* @__PURE__ */ M({
122
307
  __name: "ADropdown",
123
- props: /* @__PURE__ */ H({
308
+ props: /* @__PURE__ */ G({
124
309
  label: {},
125
310
  items: {},
126
- isAsync: { type: Boolean }
311
+ isAsync: { type: Boolean },
312
+ filterFunction: { type: Function }
127
313
  }, {
128
314
  modelValue: {},
129
315
  modelModifiers: {}
130
316
  }),
131
- emits: /* @__PURE__ */ H(["filterChanged"], ["update:modelValue"]),
132
- setup(e, { emit: t }) {
133
- const n = t, o = v(e.items), l = F(e, "modelValue"), s = v(!1), a = v(0), r = v(!1);
134
- N(() => {
135
- document.addEventListener("click", f), u();
136
- }), we(() => {
137
- document.removeEventListener("click", f);
138
- });
139
- const c = (y) => {
140
- l.value = y, m();
317
+ emits: ["update:modelValue"],
318
+ setup(e) {
319
+ const t = H(e, "modelValue"), n = Be({
320
+ activeItemIndex: null,
321
+ open: !1,
322
+ loading: !1,
323
+ results: e.items
324
+ }), o = () => r(), l = async () => {
325
+ if (n.open = !0, e.filterFunction) {
326
+ e.isAsync && (n.loading = !0);
327
+ try {
328
+ const f = await e.filterFunction(t.value || "");
329
+ n.results = f;
330
+ } catch {
331
+ n.results = [];
332
+ } finally {
333
+ e.isAsync && (n.loading = !1);
334
+ }
335
+ } else
336
+ u();
337
+ }, a = (f) => {
338
+ t.value = f, r(f);
339
+ }, s = () => {
340
+ var f;
341
+ n.activeItemIndex = e.isAsync ? null : t.value && ((f = e.items) == null ? void 0 : f.indexOf(t.value)) || null, n.open = !0, n.results = e.isAsync ? [] : e.items;
342
+ }, r = (f) => {
343
+ var p;
344
+ n.activeItemIndex = null, n.open = !1, (p = e.items) != null && p.includes(f || t.value || "") || (t.value = "");
141
345
  }, u = () => {
142
- l.value ? o.value = e.items.filter((y) => y.toLowerCase().indexOf(l.value.toLowerCase()) > -1) : o.value = e.items;
143
- }, d = () => {
144
- r.value = !0, e.isAsync ? (s.value = !0, n("filterChanged", l.value)) : u();
145
- }, f = () => {
146
- m(), a.value = 0;
346
+ var f;
347
+ t.value ? n.results = (f = e.items) == null ? void 0 : f.filter((p) => p.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
348
+ }, i = () => {
349
+ var p;
350
+ const f = ((p = n.results) == null ? void 0 : p.length) || 0;
351
+ if (n.activeItemIndex != null) {
352
+ const w = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
353
+ n.activeItemIndex = (w + 1) % f;
354
+ } else
355
+ n.activeItemIndex = 0;
356
+ }, c = () => {
357
+ var p;
358
+ const f = ((p = n.results) == null ? void 0 : p.length) || 0;
359
+ if (n.activeItemIndex != null) {
360
+ const w = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
361
+ n.activeItemIndex = (w - 1 + f) % f;
362
+ } else
363
+ n.activeItemIndex = f - 1;
147
364
  }, m = () => {
148
- r.value = !1, e.items.includes(l.value) || (l.value = "");
149
- }, b = () => {
150
- a.value < o.value.length && (a.value = a.value + 1);
151
- }, A = () => {
152
- a.value > 0 && (a.value = a.value - 1);
153
- }, M = () => {
154
- l.value = o.value[a.value], m(), a.value = 0;
365
+ if (n.results) {
366
+ const f = n.activeItemIndex || 0, p = n.results[f];
367
+ a(p);
368
+ }
369
+ n.activeItemIndex = 0;
155
370
  };
156
- return (y, E) => (p(), g("div", {
157
- class: z(["autocomplete", { isOpen: r.value }])
371
+ return (f, p) => E((g(), b("div", {
372
+ class: J(["autocomplete", { isOpen: n.open }])
158
373
  }, [
159
- i("div", Ge, [
160
- w(i("input", {
161
- ref: "mopInput",
374
+ d("div", vt, [
375
+ E(d("input", {
376
+ "onUpdate:modelValue": p[0] || (p[0] = (w) => t.value = w),
162
377
  type: "text",
163
- onInput: d,
164
- onFocus: d,
165
- "onUpdate:modelValue": E[0] || (E[0] = (x) => l.value = x),
378
+ onInput: l,
379
+ onFocus: s,
166
380
  onKeydown: [
167
- K(b, ["down"]),
168
- K(A, ["up"]),
169
- K(M, ["enter"])
381
+ O(i, ["down"]),
382
+ O(c, ["up"]),
383
+ O(m, ["enter"]),
384
+ O(o, ["esc"]),
385
+ O(o, ["tab"])
170
386
  ]
171
387
  }, null, 544), [
172
- [P, l.value]
388
+ [F, t.value]
173
389
  ]),
174
- w(i("ul", Ke, [
175
- s.value ? (p(), g("li", ze, "Loading results...")) : (p(!0), g(q, { key: 1 }, O(o.value, (x, h) => (p(), g("li", {
176
- key: h,
177
- onClick: (_) => c(x),
178
- class: z(["autocomplete-result", { "is-active": h === a.value }])
179
- }, k(x), 11, Ne))), 128))
390
+ E(d("ul", ht, [
391
+ n.loading ? (g(), b("li", gt, "Loading results...")) : (g(!0), b(U, { key: 1 }, N(n.results, (w, v) => (g(), b("li", {
392
+ key: w,
393
+ onClick: Ee((h) => a(w), ["stop"]),
394
+ class: J(["autocomplete-result", { "is-active": v === n.activeItemIndex }])
395
+ }, D(w), 11, yt))), 128))
180
396
  ], 512), [
181
- [B, r.value]
397
+ [R, n.open]
182
398
  ]),
183
- i("label", null, k(y.label), 1)
399
+ d("label", null, D(f.label), 1)
184
400
  ])
185
- ], 2));
401
+ ], 2)), [
402
+ [x(dt), o]
403
+ ]);
186
404
  }
187
- }), Je = /* @__PURE__ */ T(je, [["__scopeId", "data-v-4e77785f"]]);
188
- function ve(e) {
189
- return fe() ? (me(e), !0) : !1;
405
+ }), wt = /* @__PURE__ */ T(bt, [["__scopeId", "data-v-16c329d1"]]);
406
+ function $e(e) {
407
+ return ne() ? (oe(e), !0) : !1;
190
408
  }
191
- function Q(e) {
192
- return typeof e == "function" ? e() : I(e);
409
+ function ae(e) {
410
+ return typeof e == "function" ? e() : x(e);
193
411
  }
194
- const Qe = typeof window < "u" && typeof document < "u";
412
+ const kt = typeof window < "u" && typeof document < "u";
195
413
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
196
- const Xe = (e) => e != null, Ze = Object.prototype.toString, et = (e) => Ze.call(e) === "[object Object]", tt = () => {
197
- }, Y = Qe ? window : void 0;
198
- function R(e) {
414
+ const _t = (e) => e != null, At = Object.prototype.toString, Dt = (e) => At.call(e) === "[object Object]", Et = () => {
415
+ }, K = kt ? window : void 0;
416
+ function Y(e) {
199
417
  var t;
200
- const n = Q(e);
418
+ const n = ae(e);
201
419
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
202
420
  }
203
- function U(...e) {
421
+ function j(...e) {
204
422
  let t, n, o, l;
205
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = Y) : [t, n, o, l] = e, !t)
206
- return tt;
423
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = K) : [t, n, o, l] = e, !t)
424
+ return Et;
207
425
  Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
208
- const s = [], a = () => {
209
- s.forEach((d) => d()), s.length = 0;
210
- }, r = (d, f, m, b) => (d.addEventListener(f, m, b), () => d.removeEventListener(f, m, b)), c = W(
211
- () => [R(t), Q(l)],
212
- ([d, f]) => {
213
- if (a(), !d)
426
+ const a = [], s = () => {
427
+ a.forEach((c) => c()), a.length = 0;
428
+ }, r = (c, m, f, p) => (c.addEventListener(m, f, p), () => c.removeEventListener(m, f, p)), u = P(
429
+ () => [Y(t), ae(l)],
430
+ ([c, m]) => {
431
+ if (s(), !c)
214
432
  return;
215
- const m = et(f) ? { ...f } : f;
216
- s.push(
217
- ...n.flatMap((b) => o.map((A) => r(d, b, A, m)))
433
+ const f = Dt(m) ? { ...m } : m;
434
+ a.push(
435
+ ...n.flatMap((p) => o.map((w) => r(c, p, w, f)))
218
436
  );
219
437
  },
220
438
  { immediate: !0, flush: "post" }
221
- ), u = () => {
222
- c(), a();
439
+ ), i = () => {
440
+ u(), s();
223
441
  };
224
- return ve(u), u;
442
+ return $e(i), i;
225
443
  }
226
- function nt() {
227
- const e = v(!1), t = Ae();
228
- return t && N(() => {
444
+ function Mt() {
445
+ const e = y(!1), t = We();
446
+ return t && le(() => {
229
447
  e.value = !0;
230
448
  }, t), e;
231
449
  }
232
- function ot(e) {
233
- const t = nt();
234
- return V(() => (t.value, !!e()));
450
+ function Ct(e) {
451
+ const t = Mt();
452
+ return I(() => (t.value, !!e()));
235
453
  }
236
- function lt(e, t, n = {}) {
237
- const { window: o = Y, ...l } = n;
238
- let s;
239
- const a = ot(() => o && "MutationObserver" in o), r = () => {
240
- s && (s.disconnect(), s = void 0);
241
- }, c = V(() => {
242
- const m = Q(e), b = (Array.isArray(m) ? m : [m]).map(R).filter(Xe);
243
- return new Set(b);
244
- }), u = W(
245
- () => c.value,
246
- (m) => {
247
- r(), a.value && m.size && (s = new MutationObserver(t), m.forEach((b) => s.observe(b, l)));
454
+ function It(e, t, n = {}) {
455
+ const { window: o = K, ...l } = n;
456
+ let a;
457
+ const s = Ct(() => o && "MutationObserver" in o), r = () => {
458
+ a && (a.disconnect(), a = void 0);
459
+ }, u = I(() => {
460
+ const f = ae(e), p = (Array.isArray(f) ? f : [f]).map(Y).filter(_t);
461
+ return new Set(p);
462
+ }), i = P(
463
+ () => u.value,
464
+ (f) => {
465
+ r(), s.value && f.size && (a = new MutationObserver(t), f.forEach((p) => a.observe(p, l)));
248
466
  },
249
467
  { immediate: !0, flush: "post" }
250
- ), d = () => s == null ? void 0 : s.takeRecords(), f = () => {
251
- u(), r();
468
+ ), c = () => a == null ? void 0 : a.takeRecords(), m = () => {
469
+ i(), r();
252
470
  };
253
- return ve(f), {
254
- isSupported: a,
255
- stop: f,
256
- takeRecords: d
471
+ return $e(m), {
472
+ isSupported: s,
473
+ stop: m,
474
+ takeRecords: c
257
475
  };
258
476
  }
259
- function at(e = {}) {
477
+ function Tt(e = {}) {
260
478
  var t;
261
479
  const {
262
- window: n = Y,
480
+ window: n = K,
263
481
  deep: o = !0,
264
482
  triggerOnRemoval: l = !1
265
- } = e, s = (t = e.document) != null ? t : n == null ? void 0 : n.document, a = () => {
266
- var u;
267
- let d = s == null ? void 0 : s.activeElement;
483
+ } = e, a = (t = e.document) != null ? t : n == null ? void 0 : n.document, s = () => {
484
+ var i;
485
+ let c = a == null ? void 0 : a.activeElement;
268
486
  if (o)
269
- for (; d != null && d.shadowRoot; )
270
- d = (u = d == null ? void 0 : d.shadowRoot) == null ? void 0 : u.activeElement;
271
- return d;
272
- }, r = v(), c = () => {
273
- r.value = a();
487
+ for (; c != null && c.shadowRoot; )
488
+ c = (i = c == null ? void 0 : c.shadowRoot) == null ? void 0 : i.activeElement;
489
+ return c;
490
+ }, r = y(), u = () => {
491
+ r.value = s();
274
492
  };
275
- return n && (U(n, "blur", (u) => {
276
- u.relatedTarget === null && c();
277
- }, !0), U(n, "focus", c, !0)), l && lt(s, (u) => {
278
- u.filter((d) => d.removedNodes.length).map((d) => Array.from(d.removedNodes)).flat().forEach((d) => {
279
- d === r.value && c();
493
+ return n && (j(n, "blur", (i) => {
494
+ i.relatedTarget === null && u();
495
+ }, !0), j(n, "focus", u, !0)), l && It(a, (i) => {
496
+ i.filter((c) => c.removedNodes.length).map((c) => Array.from(c.removedNodes)).flat().forEach((c) => {
497
+ c === r.value && u();
280
498
  });
281
499
  }, {
282
500
  childList: !0,
283
501
  subtree: !0
284
- }), c(), r;
502
+ }), u(), r;
285
503
  }
286
- const st = "focusin", rt = "focusout";
287
- function it(e, t = {}) {
288
- const { window: n = Y } = t, o = V(() => R(e)), l = v(!1), s = V(() => l.value), a = at(t);
289
- return !n || !a.value ? { focused: s } : (U(o, st, () => l.value = !0), U(o, rt, () => l.value = !1), { focused: s });
504
+ const St = "focusin", $t = "focusout";
505
+ function Lt(e, t = {}) {
506
+ const { window: n = K } = t, o = I(() => Y(e)), l = y(!1), a = I(() => l.value), s = Tt(t);
507
+ return !n || !s.value ? { focused: a } : (j(o, St, () => l.value = !0), j(o, $t, () => l.value = !1), { focused: a });
290
508
  }
291
- function ut(e, { window: t = Y, scrollTarget: n } = {}) {
292
- const o = v(!1), l = () => {
509
+ function xt(e, { window: t = K, scrollTarget: n } = {}) {
510
+ const o = y(!1), l = () => {
293
511
  if (!t) return;
294
- const s = t.document, a = R(e);
295
- if (!a)
512
+ const a = t.document, s = Y(e);
513
+ if (!s)
296
514
  o.value = !1;
297
515
  else {
298
- const r = a.getBoundingClientRect();
299
- o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
516
+ const r = s.getBoundingClientRect();
517
+ o.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
300
518
  }
301
519
  };
302
- return W(
303
- () => R(e),
520
+ return P(
521
+ () => Y(e),
304
522
  () => l(),
305
523
  { immediate: !0, flush: "post" }
306
- ), t && U(n || t, "scroll", l, {
524
+ ), t && j(n || t, "scroll", l, {
307
525
  capture: !1,
308
526
  passive: !0
309
527
  }), o;
310
528
  }
311
529
  const S = (e) => {
312
- let t = ut(e).value;
530
+ let t = xt(e).value;
313
531
  return t = t && e.offsetHeight > 0, t;
314
- }, $ = (e) => e.tabIndex >= 0, ne = (e) => {
532
+ }, $ = (e) => e.tabIndex >= 0, pe = (e) => {
315
533
  const t = e.target;
316
- return X(t);
317
- }, X = (e) => {
534
+ return re(t);
535
+ }, re = (e) => {
318
536
  var t;
319
537
  let n;
320
538
  if (e instanceof HTMLTableCellElement) {
@@ -327,29 +545,29 @@ const S = (e) => {
327
545
  const o = e.previousElementSibling;
328
546
  o && (n = o);
329
547
  }
330
- return n && (!$(n) || !S(n)) ? X(n) : n;
331
- }, ct = (e) => {
548
+ return n && (!$(n) || !S(n)) ? re(n) : n;
549
+ }, Vt = (e) => {
332
550
  var t;
333
551
  const n = e.target;
334
552
  let o;
335
553
  if (n instanceof HTMLTableCellElement) {
336
554
  const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
337
555
  if (l) {
338
- const s = l.firstElementChild, a = s == null ? void 0 : s.children[n.cellIndex];
339
- a && (o = a);
556
+ const a = l.firstElementChild, s = a == null ? void 0 : a.children[n.cellIndex];
557
+ s && (o = s);
340
558
  }
341
559
  } else if (n instanceof HTMLTableRowElement) {
342
560
  const l = n.parentElement;
343
561
  if (l) {
344
- const s = l.firstElementChild;
345
- s && (o = s);
562
+ const a = l.firstElementChild;
563
+ a && (o = a);
346
564
  }
347
565
  }
348
- return o && (!$(o) || !S(o)) ? Z(o) : o;
349
- }, oe = (e) => {
566
+ return o && (!$(o) || !S(o)) ? ie(o) : o;
567
+ }, ve = (e) => {
350
568
  const t = e.target;
351
- return Z(t);
352
- }, Z = (e) => {
569
+ return ie(t);
570
+ }, ie = (e) => {
353
571
  var t;
354
572
  let n;
355
573
  if (e instanceof HTMLTableCellElement) {
@@ -362,29 +580,29 @@ const S = (e) => {
362
580
  const o = e.nextElementSibling;
363
581
  o && (n = o);
364
582
  }
365
- return n && (!$(n) || !S(n)) ? Z(n) : n;
366
- }, dt = (e) => {
583
+ return n && (!$(n) || !S(n)) ? ie(n) : n;
584
+ }, Pt = (e) => {
367
585
  var t;
368
586
  const n = e.target;
369
587
  let o;
370
588
  if (n instanceof HTMLTableCellElement) {
371
589
  const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
372
590
  if (l) {
373
- const s = l.lastElementChild, a = s == null ? void 0 : s.children[n.cellIndex];
374
- a && (o = a);
591
+ const a = l.lastElementChild, s = a == null ? void 0 : a.children[n.cellIndex];
592
+ s && (o = s);
375
593
  }
376
594
  } else if (n instanceof HTMLTableRowElement) {
377
595
  const l = n.parentElement;
378
596
  if (l) {
379
- const s = l.lastElementChild;
380
- s && (o = s);
597
+ const a = l.lastElementChild;
598
+ a && (o = a);
381
599
  }
382
600
  }
383
- return o && (!$(o) || !S(o)) ? X(o) : o;
384
- }, le = (e) => {
601
+ return o && (!$(o) || !S(o)) ? re(o) : o;
602
+ }, he = (e) => {
385
603
  const t = e.target;
386
- return ee(t);
387
- }, ee = (e) => {
604
+ return ue(t);
605
+ }, ue = (e) => {
388
606
  var t;
389
607
  let n;
390
608
  if (e.previousElementSibling)
@@ -393,11 +611,11 @@ const S = (e) => {
393
611
  const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
394
612
  n = o == null ? void 0 : o.lastElementChild;
395
613
  }
396
- return n && (!$(n) || !S(n)) ? ee(n) : n;
397
- }, ae = (e) => {
614
+ return n && (!$(n) || !S(n)) ? ue(n) : n;
615
+ }, ge = (e) => {
398
616
  const t = e.target;
399
- return te(t);
400
- }, te = (e) => {
617
+ return ce(t);
618
+ }, ce = (e) => {
401
619
  var t;
402
620
  let n;
403
621
  if (e.nextElementSibling)
@@ -406,155 +624,155 @@ const S = (e) => {
406
624
  const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
407
625
  n = o == null ? void 0 : o.firstElementChild;
408
626
  }
409
- return n && (!$(n) || !S(n)) ? te(n) : n;
410
- }, se = (e) => {
627
+ return n && (!$(n) || !S(n)) ? ce(n) : n;
628
+ }, ye = (e) => {
411
629
  const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
412
- return n && (!$(n) || !S(n)) ? te(n) : n;
413
- }, re = (e) => {
630
+ return n && (!$(n) || !S(n)) ? ce(n) : n;
631
+ }, be = (e) => {
414
632
  const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
415
- return n && (!$(n) || !S(n)) ? ee(n) : n;
416
- }, G = ["alt", "control", "shift", "meta"], ft = {
633
+ return n && (!$(n) || !S(n)) ? ue(n) : n;
634
+ }, z = ["alt", "control", "shift", "meta"], Ot = {
417
635
  ArrowUp: "up",
418
636
  ArrowDown: "down",
419
637
  ArrowLeft: "left",
420
638
  ArrowRight: "right"
421
- }, ge = {
639
+ }, Le = {
422
640
  "keydown.up": (e) => {
423
- const t = ne(e);
641
+ const t = pe(e);
424
642
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
425
643
  },
426
644
  "keydown.down": (e) => {
427
- const t = oe(e);
645
+ const t = ve(e);
428
646
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
429
647
  },
430
648
  "keydown.left": (e) => {
431
- const t = le(e);
649
+ const t = he(e);
432
650
  e.preventDefault(), e.stopPropagation(), t && t.focus();
433
651
  },
434
652
  "keydown.right": (e) => {
435
- const t = ae(e);
653
+ const t = ge(e);
436
654
  e.preventDefault(), e.stopPropagation(), t && t.focus();
437
655
  },
438
656
  "keydown.control.up": (e) => {
439
- const t = ct(e);
657
+ const t = Vt(e);
440
658
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
441
659
  },
442
660
  "keydown.control.down": (e) => {
443
- const t = dt(e);
661
+ const t = Pt(e);
444
662
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
445
663
  },
446
664
  "keydown.control.left": (e) => {
447
- const t = se(e);
665
+ const t = ye(e);
448
666
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
449
667
  },
450
668
  "keydown.control.right": (e) => {
451
- const t = re(e);
669
+ const t = be(e);
452
670
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
453
671
  },
454
672
  "keydown.end": (e) => {
455
- const t = re(e);
673
+ const t = be(e);
456
674
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
457
675
  },
458
676
  "keydown.enter": (e) => {
459
677
  if (e.target instanceof HTMLTableCellElement) {
460
678
  e.preventDefault(), e.stopPropagation();
461
- const t = oe(e);
679
+ const t = ve(e);
462
680
  t && t.focus();
463
681
  }
464
682
  },
465
683
  "keydown.shift.enter": (e) => {
466
684
  if (e.target instanceof HTMLTableCellElement) {
467
685
  e.preventDefault(), e.stopPropagation();
468
- const t = ne(e);
686
+ const t = pe(e);
469
687
  t && t.focus();
470
688
  }
471
689
  },
472
690
  "keydown.home": (e) => {
473
- const t = se(e);
691
+ const t = ye(e);
474
692
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
475
693
  },
476
694
  "keydown.tab": (e) => {
477
- const t = ae(e);
695
+ const t = ge(e);
478
696
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
479
697
  },
480
698
  "keydown.shift.tab": (e) => {
481
- const t = le(e);
699
+ const t = he(e);
482
700
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
483
701
  }
484
702
  };
485
- function mt(e) {
486
- const t = (a) => {
703
+ function Ft(e) {
704
+ const t = (s) => {
487
705
  let r = null;
488
- return a.parent && (typeof a.parent == "string" ? r = document.querySelector(a.parent) : a.parent instanceof HTMLElement ? r = a.parent : r = a.parent.value), r;
489
- }, n = (a) => {
706
+ return s.parent && (typeof s.parent == "string" ? r = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? r = s.parent : r = s.parent.value), r;
707
+ }, n = (s) => {
490
708
  var r;
491
- const c = t(a);
492
- let u = [];
493
- if (typeof a.selectors == "string")
494
- u = c ? Array.from(c.querySelectorAll(a.selectors)) : Array.from(document.querySelectorAll(a.selectors));
495
- else if (Array.isArray(a.selectors))
496
- for (const d of a.selectors)
497
- d instanceof HTMLElement ? u.push(d) : u.push(d.$el);
498
- else if (a.selectors instanceof HTMLElement)
499
- u.push(a.selectors);
500
- else if ((r = a.selectors) != null && r.value)
501
- if (Array.isArray(a.selectors.value))
502
- for (const d of a.selectors.value)
503
- d instanceof HTMLElement ? u.push(d) : u.push(d.$el);
709
+ const u = t(s);
710
+ let i = [];
711
+ if (typeof s.selectors == "string")
712
+ i = u ? Array.from(u.querySelectorAll(s.selectors)) : Array.from(document.querySelectorAll(s.selectors));
713
+ else if (Array.isArray(s.selectors))
714
+ for (const c of s.selectors)
715
+ c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
716
+ else if (s.selectors instanceof HTMLElement)
717
+ i.push(s.selectors);
718
+ else if ((r = s.selectors) != null && r.value)
719
+ if (Array.isArray(s.selectors.value))
720
+ for (const c of s.selectors.value)
721
+ c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
504
722
  else
505
- u.push(a.selectors.value);
506
- return u;
507
- }, o = (a) => {
508
- const r = t(a);
509
- let c = [];
510
- return a.selectors ? c = n(a) : r && (c = Array.from(r.children).filter((u) => $(u) && S(u))), c;
511
- }, l = (a) => (r) => {
512
- const c = ft[r.key] || r.key.toLowerCase();
513
- if (G.includes(c)) return;
514
- const u = a.handlers || ge;
515
- for (const d of Object.keys(u)) {
516
- const [f, ...m] = d.split(".");
517
- if (f === "keydown" && m.includes(c)) {
518
- const b = u[d], A = m.filter((y) => G.includes(y)), M = G.some((y) => {
519
- const E = y.charAt(0).toUpperCase() + y.slice(1);
520
- return r.getModifierState(E);
723
+ i.push(s.selectors.value);
724
+ return i;
725
+ }, o = (s) => {
726
+ const r = t(s);
727
+ let u = [];
728
+ return s.selectors ? u = n(s) : r && (u = Array.from(r.children).filter((i) => $(i) && S(i))), u;
729
+ }, l = (s) => (r) => {
730
+ const u = Ot[r.key] || r.key.toLowerCase();
731
+ if (z.includes(u)) return;
732
+ const i = s.handlers || Le;
733
+ for (const c of Object.keys(i)) {
734
+ const [m, ...f] = c.split(".");
735
+ if (m === "keydown" && f.includes(u)) {
736
+ const p = i[c], w = f.filter((h) => z.includes(h)), v = z.some((h) => {
737
+ const _ = h.charAt(0).toUpperCase() + h.slice(1);
738
+ return r.getModifierState(_);
521
739
  });
522
- if (A.length > 0) {
523
- if (M) {
524
- for (const y of G)
525
- if (m.includes(y)) {
526
- const E = y.charAt(0).toUpperCase() + y.slice(1);
527
- r.getModifierState(E) && b(r);
740
+ if (w.length > 0) {
741
+ if (v) {
742
+ for (const h of z)
743
+ if (f.includes(h)) {
744
+ const _ = h.charAt(0).toUpperCase() + h.slice(1);
745
+ r.getModifierState(_) && p(r);
528
746
  }
529
747
  }
530
748
  } else
531
- M || b(r);
749
+ v || p(r);
532
750
  }
533
751
  }
534
- }, s = [];
535
- N(() => {
536
- for (const a of e) {
537
- const r = t(a), c = o(a), u = l(a), d = r ? [r] : c;
538
- for (const f of d) {
539
- const { focused: m } = it(v(f)), b = W(m, (A) => {
540
- A ? f.addEventListener("keydown", u) : f.removeEventListener("keydown", u);
752
+ }, a = [];
753
+ le(() => {
754
+ for (const s of e) {
755
+ const r = t(s), u = o(s), i = l(s), c = r ? [r] : u;
756
+ for (const m of c) {
757
+ const { focused: f } = Lt(y(m)), p = P(f, (w) => {
758
+ w ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
541
759
  });
542
- s.push(b);
760
+ a.push(p);
543
761
  }
544
762
  }
545
- }), De(() => {
546
- for (const a of s)
547
- a();
763
+ }), qe(() => {
764
+ for (const s of a)
765
+ s();
548
766
  });
549
767
  }
550
- const pt = {
768
+ const Ht = {
551
769
  class: "adatepicker",
552
770
  tabindex: "0",
553
771
  ref: "datepicker"
554
- }, vt = {
772
+ }, Rt = {
555
773
  colspan: "5",
556
774
  tabindex: -1
557
- }, gt = ["onClick", "onKeydown"], ht = 6, ie = 7, yt = /* @__PURE__ */ D({
775
+ }, Bt = ["onClick", "onKeydown"], qt = 6, we = 7, Wt = /* @__PURE__ */ M({
558
776
  __name: "ADatePicker",
559
777
  props: {
560
778
  modelValue: { default: /* @__PURE__ */ new Date() },
@@ -562,48 +780,48 @@ const pt = {
562
780
  },
563
781
  emits: ["update:modelValue"],
564
782
  setup(e, { expose: t }) {
565
- const n = F(e, "modelValue"), o = v(new Date(n.value)), l = v(o.value.getMonth()), s = v(o.value.getFullYear()), a = v([]), r = de("datepicker");
566
- N(async () => {
567
- c(), await Me();
568
- const h = document.getElementsByClassName("selectedDate");
569
- if (h.length > 0)
570
- h[0].focus();
783
+ const n = H(e, "modelValue"), o = y(new Date(n.value)), l = y(o.value.getMonth()), a = y(o.value.getFullYear()), s = y([]), r = Ae("datepicker");
784
+ le(async () => {
785
+ u(), await Ue();
786
+ const k = document.getElementsByClassName("selectedDate");
787
+ if (k.length > 0)
788
+ k[0].focus();
571
789
  else {
572
- const _ = document.getElementsByClassName("todaysDate");
573
- _.length > 0 && _[0].focus();
790
+ const A = document.getElementsByClassName("todaysDate");
791
+ A.length > 0 && A[0].focus();
574
792
  }
575
793
  });
576
- const c = () => {
577
- a.value = [];
578
- const h = new Date(s.value, l.value, 1), _ = h.getDay(), C = h.setDate(h.getDate() - _);
794
+ const u = () => {
795
+ s.value = [];
796
+ const k = new Date(a.value, l.value, 1), A = k.getDay(), C = k.setDate(k.getDate() - A);
579
797
  for (const L of Array(43).keys())
580
- a.value.push(C + L * 864e5);
798
+ s.value.push(C + L * 864e5);
581
799
  };
582
- W([l, s], c);
583
- const u = () => s.value -= 1, d = () => s.value += 1, f = () => {
584
- l.value == 0 ? (l.value = 11, u()) : l.value -= 1;
585
- }, m = () => {
586
- l.value == 11 ? (l.value = 0, d()) : l.value += 1;
587
- }, b = (h) => {
588
- const _ = /* @__PURE__ */ new Date();
589
- if (l.value === _.getMonth())
590
- return _.toDateString() === new Date(h).toDateString();
591
- }, A = (h) => new Date(h).toDateString() === new Date(o.value).toDateString(), M = (h, _) => (h - 1) * ie + _, y = (h, _) => a.value[M(h, _)], E = (h) => {
592
- n.value = o.value = new Date(a.value[h]);
593
- }, x = V(() => new Date(s.value, l.value, 1).toLocaleDateString(void 0, {
800
+ P([l, a], u);
801
+ const i = () => a.value -= 1, c = () => a.value += 1, m = () => {
802
+ l.value == 0 ? (l.value = 11, i()) : l.value -= 1;
803
+ }, f = () => {
804
+ l.value == 11 ? (l.value = 0, c()) : l.value += 1;
805
+ }, p = (k) => {
806
+ const A = /* @__PURE__ */ new Date();
807
+ if (l.value === A.getMonth())
808
+ return A.toDateString() === new Date(k).toDateString();
809
+ }, w = (k) => new Date(k).toDateString() === new Date(o.value).toDateString(), v = (k, A) => (k - 1) * we + A, h = (k, A) => s.value[v(k, A)], _ = (k) => {
810
+ n.value = o.value = new Date(s.value[k]);
811
+ }, B = I(() => new Date(a.value, l.value, 1).toLocaleDateString(void 0, {
594
812
  year: "numeric",
595
813
  month: "long"
596
814
  }));
597
- return mt([
815
+ return Ft([
598
816
  {
599
817
  parent: r,
600
818
  selectors: "td",
601
819
  handlers: {
602
- ...ge,
603
- "keydown.pageup": f,
604
- "keydown.shift.pageup": u,
605
- "keydown.pagedown": m,
606
- "keydown.shift.pagedown": d,
820
+ ...Le,
821
+ "keydown.pageup": m,
822
+ "keydown.shift.pageup": i,
823
+ "keydown.pagedown": f,
824
+ "keydown.shift.pagedown": c,
607
825
  // TODO: this is a hack to override the stonecrop enter handler;
608
826
  // store context inside the component so that handlers can be setup consistently
609
827
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -611,62 +829,62 @@ const pt = {
611
829
  }
612
830
  }
613
831
  }
614
- ]), t({ currentMonth: l, currentYear: s, selectedDate: o }), (h, _) => (p(), g("div", pt, [
615
- i("table", null, [
616
- i("tbody", null, [
617
- i("tr", null, [
618
- i("td", {
832
+ ]), t({ currentMonth: l, currentYear: a, selectedDate: o }), (k, A) => (g(), b("div", Ht, [
833
+ d("table", null, [
834
+ d("tbody", null, [
835
+ d("tr", null, [
836
+ d("td", {
619
837
  id: "previous-month-btn",
620
- onClick: f,
838
+ onClick: m,
621
839
  tabindex: -1
622
840
  }, "<"),
623
- i("th", vt, k(x.value), 1),
624
- i("td", {
841
+ d("th", Rt, D(B.value), 1),
842
+ d("td", {
625
843
  id: "next-month-btn",
626
- onClick: m,
844
+ onClick: f,
627
845
  tabindex: -1
628
846
  }, ">")
629
847
  ]),
630
- _[0] || (_[0] = i("tr", { class: "days-header" }, [
631
- i("td", null, "M"),
632
- i("td", null, "T"),
633
- i("td", null, "W"),
634
- i("td", null, "T"),
635
- i("td", null, "F"),
636
- i("td", null, "S"),
637
- i("td", null, "S")
848
+ A[0] || (A[0] = d("tr", { class: "days-header" }, [
849
+ d("td", null, "M"),
850
+ d("td", null, "T"),
851
+ d("td", null, "W"),
852
+ d("td", null, "T"),
853
+ d("td", null, "F"),
854
+ d("td", null, "S"),
855
+ d("td", null, "S")
638
856
  ], -1)),
639
- (p(), g(q, null, O(ht, (C) => i("tr", { key: C }, [
640
- (p(), g(q, null, O(ie, (L) => i("td", {
857
+ (g(), b(U, null, N(qt, (C) => d("tr", { key: C }, [
858
+ (g(), b(U, null, N(we, (L) => d("td", {
641
859
  ref_for: !0,
642
860
  ref: "celldate",
643
- key: M(C, L),
861
+ key: v(C, L),
644
862
  contenteditable: !1,
645
863
  spellcheck: !1,
646
864
  tabindex: 0,
647
- onClick: Ee((ye) => E(M(C, L)), ["prevent", "stop"]),
648
- onKeydown: K((ye) => E(M(C, L)), ["enter"]),
649
- class: z({
650
- todaysDate: b(y(C, L)),
651
- selectedDate: A(y(C, L))
865
+ onClick: Ee((Ve) => _(v(C, L)), ["prevent", "stop"]),
866
+ onKeydown: O((Ve) => _(v(C, L)), ["enter"]),
867
+ class: J({
868
+ todaysDate: p(h(C, L)),
869
+ selectedDate: w(h(C, L))
652
870
  })
653
- }, k(new Date(y(C, L)).getDate()), 43, gt)), 64))
871
+ }, D(new Date(h(C, L)).getDate()), 43, Bt)), 64))
654
872
  ])), 64))
655
873
  ])
656
874
  ])
657
875
  ], 512));
658
876
  }
659
- }), bt = /* @__PURE__ */ T(yt, [["__scopeId", "data-v-f49cfd40"]]), _t = /* @__PURE__ */ D({
877
+ }), Ut = /* @__PURE__ */ T(Wt, [["__scopeId", "data-v-f49cfd40"]]), Nt = /* @__PURE__ */ M({
660
878
  __name: "CollapseButton",
661
879
  props: {
662
880
  collapsed: { type: Boolean }
663
881
  },
664
882
  setup(e) {
665
- return (t, n) => (p(), g("button", {
666
- class: z(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
883
+ return (t, n) => (g(), b("button", {
884
+ class: J(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
667
885
  }, "×", 2));
668
886
  }
669
- }), kt = /* @__PURE__ */ T(_t, [["__scopeId", "data-v-6f1c1b45"]]), wt = { class: "aform" }, Dt = /* @__PURE__ */ D({
887
+ }), Yt = /* @__PURE__ */ T(Nt, [["__scopeId", "data-v-6f1c1b45"]]), jt = { class: "aform" }, Gt = /* @__PURE__ */ M({
670
888
  __name: "AForm",
671
889
  props: {
672
890
  modelValue: {},
@@ -675,36 +893,36 @@ const pt = {
675
893
  },
676
894
  emits: ["update:modelValue"],
677
895
  setup(e, { emit: t }) {
678
- const n = t, o = v(e.data || {}), l = (a) => {
896
+ const n = t, o = y(e.data || {}), l = (s) => {
679
897
  let r = {};
680
- for (const [c, u] of Object.entries(a))
681
- ["component", "fieldtype"].includes(c) || (r[c] = u), c === "rows" && u && u.length === 0 && (r.rows = o.value[a.fieldname]);
898
+ for (const [u, i] of Object.entries(s))
899
+ ["component", "fieldtype"].includes(u) || (r[u] = i), u === "rows" && i && i.length === 0 && (r.rows = o.value[s.fieldname]);
682
900
  return r;
683
- }, s = V({
684
- get: () => e.modelValue.map((a, r) => V({
901
+ }, a = I({
902
+ get: () => e.modelValue.map((s, r) => I({
685
903
  get() {
686
- return a.value;
904
+ return s.value;
687
905
  },
688
- set: (c) => {
689
- e.modelValue[r].value = c, n("update:modelValue", e.modelValue);
906
+ set: (u) => {
907
+ e.modelValue[r].value = u, n("update:modelValue", e.modelValue);
690
908
  }
691
909
  })),
692
910
  set: () => {
693
911
  }
694
912
  });
695
- return (a, r) => (p(), g("form", wt, [
696
- (p(!0), g(q, null, O(a.modelValue, (c, u) => (p(), j(Ce(c.component), Te({
697
- key: u,
698
- schema: c,
699
- modelValue: s.value[u].value,
700
- "onUpdate:modelValue": (d) => s.value[u].value = d,
701
- data: o.value[c.fieldname],
702
- readonly: a.readonly,
913
+ return (s, r) => (g(), b("form", jt, [
914
+ (g(!0), b(U, null, N(s.modelValue, (u, i) => (g(), te(Ne(u.component), Ye({
915
+ key: i,
916
+ schema: u,
917
+ modelValue: a.value[i].value,
918
+ "onUpdate:modelValue": (c) => a.value[i].value = c,
919
+ data: o.value[u.fieldname],
920
+ readonly: s.readonly,
703
921
  ref_for: !0
704
- }, l(c)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
922
+ }, l(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
705
923
  ]));
706
924
  }
707
- }), he = /* @__PURE__ */ T(Dt, [["__scopeId", "data-v-68845234"]]), At = /* @__PURE__ */ D({
925
+ }), xe = /* @__PURE__ */ T(Gt, [["__scopeId", "data-v-68845234"]]), Kt = /* @__PURE__ */ M({
708
926
  __name: "AFieldset",
709
927
  props: {
710
928
  schema: {},
@@ -713,126 +931,126 @@ const pt = {
713
931
  data: {}
714
932
  },
715
933
  setup(e, { expose: t }) {
716
- const n = v(!1), o = v(e.data || []), l = v(e.schema), s = (a) => {
717
- a.preventDefault(), e.collapsible && (n.value = !n.value);
934
+ const n = y(!1), o = y(e.data || []), l = y(e.schema), a = (s) => {
935
+ s.preventDefault(), e.collapsible && (n.value = !n.value);
718
936
  };
719
- return t({ collapsed: n }), (a, r) => (p(), g("fieldset", null, [
720
- i("legend", {
721
- onClick: s,
722
- onSubmit: s
937
+ return t({ collapsed: n }), (s, r) => (g(), b("fieldset", null, [
938
+ d("legend", {
939
+ onClick: a,
940
+ onSubmit: a
723
941
  }, [
724
- pe(k(a.label) + " ", 1),
725
- a.collapsible ? (p(), j(kt, {
942
+ Me(D(s.label) + " ", 1),
943
+ s.collapsible ? (g(), te(Yt, {
726
944
  key: 0,
727
945
  collapsed: n.value
728
- }, null, 8, ["collapsed"])) : J("", !0)
946
+ }, null, 8, ["collapsed"])) : se("", !0)
729
947
  ], 32),
730
- Se(a.$slots, "default", { collapsed: n.value }, () => [
731
- w($e(he, {
948
+ je(s.$slots, "default", { collapsed: n.value }, () => [
949
+ E(Ge(xe, {
732
950
  modelValue: l.value,
733
- "onUpdate:modelValue": r[0] || (r[0] = (c) => l.value = c),
951
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => l.value = u),
734
952
  data: o.value
735
953
  }, null, 8, ["modelValue", "data"]), [
736
- [B, !n.value]
954
+ [R, !n.value]
737
955
  ])
738
956
  ], !0)
739
957
  ]));
740
958
  }
741
- }), Mt = /* @__PURE__ */ T(At, [["__scopeId", "data-v-e7ea7e12"]]);
742
- function Et(e) {
743
- return fe() ? (me(e), !0) : !1;
959
+ }), zt = /* @__PURE__ */ T(Kt, [["__scopeId", "data-v-e7ea7e12"]]);
960
+ function Xt(e) {
961
+ return ne() ? (oe(e), !0) : !1;
744
962
  }
745
- function ue() {
963
+ function ke() {
746
964
  const e = /* @__PURE__ */ new Set(), t = (l) => {
747
965
  e.delete(l);
748
966
  };
749
967
  return {
750
968
  on: (l) => {
751
969
  e.add(l);
752
- const s = () => t(l);
753
- return Et(s), {
754
- off: s
970
+ const a = () => t(l);
971
+ return Xt(a), {
972
+ off: a
755
973
  };
756
974
  },
757
975
  off: t,
758
- trigger: (...l) => Promise.all(Array.from(e).map((s) => s(...l)))
976
+ trigger: (...l) => Promise.all(Array.from(e).map((a) => a(...l)))
759
977
  };
760
978
  }
761
- const Ct = typeof window < "u" && typeof document < "u";
979
+ const Jt = typeof window < "u" && typeof document < "u";
762
980
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
763
- const Tt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), St = Ct ? window.document : void 0, $t = {
981
+ const Qt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Zt = Jt ? window.document : void 0, en = {
764
982
  multiple: !0,
765
983
  accept: "*",
766
984
  reset: !1,
767
985
  directory: !1
768
986
  };
769
- function Lt(e = {}) {
987
+ function tn(e = {}) {
770
988
  const {
771
- document: t = St
772
- } = e, n = v(null), { on: o, trigger: l } = ue(), { on: s, trigger: a } = ue();
989
+ document: t = Zt
990
+ } = e, n = y(null), { on: o, trigger: l } = ke(), { on: a, trigger: s } = ke();
773
991
  let r;
774
- t && (r = t.createElement("input"), r.type = "file", r.onchange = (d) => {
775
- const f = d.target;
776
- n.value = f.files, l(n.value);
992
+ t && (r = t.createElement("input"), r.type = "file", r.onchange = (c) => {
993
+ const m = c.target;
994
+ n.value = m.files, l(n.value);
777
995
  }, r.oncancel = () => {
778
- a();
996
+ s();
779
997
  });
780
- const c = () => {
998
+ const u = () => {
781
999
  n.value = null, r && r.value && (r.value = "", l(null));
782
- }, u = (d) => {
1000
+ }, i = (c) => {
783
1001
  if (!r)
784
1002
  return;
785
- const f = {
786
- ...$t,
1003
+ const m = {
1004
+ ...en,
787
1005
  ...e,
788
- ...d
1006
+ ...c
789
1007
  };
790
- r.multiple = f.multiple, r.accept = f.accept, r.webkitdirectory = f.directory, Tt(f, "capture") && (r.capture = f.capture), f.reset && c(), r.click();
1008
+ r.multiple = m.multiple, r.accept = m.accept, r.webkitdirectory = m.directory, Qt(m, "capture") && (r.capture = m.capture), m.reset && u(), r.click();
791
1009
  };
792
1010
  return {
793
- files: Le(n),
794
- open: u,
795
- reset: c,
796
- onCancel: s,
1011
+ files: De(n),
1012
+ open: i,
1013
+ reset: u,
1014
+ onCancel: a,
797
1015
  onChange: o
798
1016
  };
799
1017
  }
800
- const Vt = { class: "aform_form-element aform_file-attach aform__grid--full" }, It = {
1018
+ const nn = { class: "aform_form-element aform_file-attach aform__grid--full" }, on = {
801
1019
  key: 0,
802
1020
  class: "aform_file-attach-feedback"
803
- }, xt = ["disabled"], Ht = /* @__PURE__ */ D({
1021
+ }, ln = ["disabled"], sn = /* @__PURE__ */ M({
804
1022
  __name: "AFileAttach",
805
1023
  props: {
806
1024
  label: {}
807
1025
  },
808
1026
  setup(e) {
809
- const { files: t, open: n, reset: o, onChange: l } = Lt(), s = V(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
810
- return l((a) => a), (a, r) => (p(), g("div", Vt, [
811
- I(t) ? (p(), g("div", It, [
812
- i("p", null, [
813
- r[2] || (r[2] = pe(" You have selected: ")),
814
- i("b", null, k(s.value), 1)
1027
+ const { files: t, open: n, reset: o, onChange: l } = tn(), a = I(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
1028
+ return l((s) => s), (s, r) => (g(), b("div", nn, [
1029
+ x(t) ? (g(), b("div", on, [
1030
+ d("p", null, [
1031
+ r[2] || (r[2] = Me(" You have selected: ")),
1032
+ d("b", null, D(a.value), 1)
815
1033
  ]),
816
- (p(!0), g(q, null, O(I(t), (c) => (p(), g("li", {
817
- key: c.name
818
- }, k(c.name), 1))), 128))
819
- ])) : J("", !0),
820
- i("button", {
1034
+ (g(!0), b(U, null, N(x(t), (u) => (g(), b("li", {
1035
+ key: u.name
1036
+ }, D(u.name), 1))), 128))
1037
+ ])) : se("", !0),
1038
+ d("button", {
821
1039
  type: "button",
822
- onClick: r[0] || (r[0] = (c) => I(n)()),
1040
+ onClick: r[0] || (r[0] = (u) => x(n)()),
823
1041
  class: "aform_form-btn"
824
- }, k(a.label), 1),
825
- i("button", {
1042
+ }, D(s.label), 1),
1043
+ d("button", {
826
1044
  type: "button",
827
- disabled: !I(t),
828
- onClick: r[1] || (r[1] = (c) => I(o)()),
1045
+ disabled: !x(t),
1046
+ onClick: r[1] || (r[1] = (u) => x(o)()),
829
1047
  class: "aform_form-btn"
830
- }, "Reset", 8, xt)
1048
+ }, "Reset", 8, ln)
831
1049
  ]));
832
1050
  }
833
- }), Pt = /* @__PURE__ */ T(Ht, [["__scopeId", "data-v-0b3a11cc"]]), Ft = { class: "aform_form-element" }, Bt = ["id", "disabled", "required"], qt = ["for"], Ot = ["innerHTML"], Rt = /* @__PURE__ */ D({
1051
+ }), an = /* @__PURE__ */ T(sn, [["__scopeId", "data-v-0b3a11cc"]]), rn = { class: "aform_form-element" }, un = ["id", "disabled", "required"], cn = ["for"], dn = ["innerHTML"], fn = /* @__PURE__ */ M({
834
1052
  __name: "ANumericInput",
835
- props: /* @__PURE__ */ H({
1053
+ props: /* @__PURE__ */ G({
836
1054
  schema: {},
837
1055
  label: {},
838
1056
  mask: {},
@@ -846,31 +1064,31 @@ const Vt = { class: "aform_form-element aform_file-attach aform__grid--full" },
846
1064
  }),
847
1065
  emits: ["update:modelValue"],
848
1066
  setup(e) {
849
- const t = F(e, "modelValue");
850
- return (n, o) => (p(), g("div", Ft, [
851
- w(i("input", {
1067
+ const t = H(e, "modelValue");
1068
+ return (n, o) => (g(), b("div", rn, [
1069
+ E(d("input", {
852
1070
  class: "aform_input-field",
853
1071
  "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
854
1072
  type: "number",
855
1073
  id: n.uuid,
856
1074
  disabled: n.readonly,
857
1075
  required: n.required
858
- }, null, 8, Bt), [
859
- [P, t.value]
1076
+ }, null, 8, un), [
1077
+ [F, t.value]
860
1078
  ]),
861
- i("label", {
1079
+ d("label", {
862
1080
  class: "aform_field-label",
863
1081
  for: n.uuid
864
- }, k(n.label), 9, qt),
865
- w(i("p", {
1082
+ }, D(n.label), 9, cn),
1083
+ E(d("p", {
866
1084
  class: "aform_error",
867
1085
  innerHTML: n.validation.errorMessage
868
- }, null, 8, Ot), [
869
- [B, n.validation.errorMessage]
1086
+ }, null, 8, dn), [
1087
+ [R, n.validation.errorMessage]
870
1088
  ])
871
1089
  ]));
872
1090
  }
873
- }), ce = {
1091
+ }), _e = {
874
1092
  date: "##/##/####",
875
1093
  datetime: "####/##/## ##:##",
876
1094
  time: "##:##",
@@ -878,59 +1096,59 @@ const Vt = { class: "aform_form-element aform_file-attach aform__grid--full" },
878
1096
  phone: "(###) ### - ####",
879
1097
  card: "#### #### #### ####"
880
1098
  };
881
- function Ut(e) {
1099
+ function mn(e) {
882
1100
  try {
883
1101
  return Function(`"use strict";return (${e})`)();
884
1102
  } catch {
885
1103
  }
886
1104
  }
887
- function Wt(e) {
1105
+ function pn(e) {
888
1106
  var n, o, l;
889
1107
  let t = e.value;
890
1108
  if (t) {
891
- const s = Ut(t);
892
- if (s) {
893
- const a = (n = e.instance) == null ? void 0 : n.locale;
894
- t = s(a);
1109
+ const a = mn(t);
1110
+ if (a) {
1111
+ const s = (n = e.instance) == null ? void 0 : n.locale;
1112
+ t = a(s);
895
1113
  }
896
1114
  } else {
897
- const s = (o = e.instance) == null ? void 0 : o.schema, a = (l = s == null ? void 0 : s.fieldtype) == null ? void 0 : l.toLowerCase();
898
- a && ce[a] && (t = ce[a]);
1115
+ const a = (o = e.instance) == null ? void 0 : o.schema, s = (l = a == null ? void 0 : a.fieldtype) == null ? void 0 : l.toLowerCase();
1116
+ s && _e[s] && (t = _e[s]);
899
1117
  }
900
1118
  return t;
901
1119
  }
902
- function Yt(e, t) {
1120
+ function vn(e, t) {
903
1121
  let n = e;
904
1122
  const o = [t, "/", "-", "(", ")", " "];
905
1123
  for (const l of o)
906
1124
  n = n.replaceAll(l, "");
907
1125
  return n;
908
1126
  }
909
- function Gt(e, t, n) {
1127
+ function hn(e, t, n) {
910
1128
  let o = t;
911
1129
  for (const l of e) {
912
- const s = o.indexOf(n);
913
- if (s !== -1) {
914
- const a = o.substring(0, s), r = o.substring(s + 1);
915
- o = a + l + r;
1130
+ const a = o.indexOf(n);
1131
+ if (a !== -1) {
1132
+ const s = o.substring(0, a), r = o.substring(a + 1);
1133
+ o = s + l + r;
916
1134
  }
917
1135
  }
918
1136
  return o.slice(0, t.length);
919
1137
  }
920
- function Kt(e, t) {
921
- var a;
922
- const n = Wt(t);
1138
+ function gn(e, t) {
1139
+ var s;
1140
+ const n = pn(t);
923
1141
  if (!n) return;
924
- const o = "#", l = e.value, s = Yt(l, o);
925
- if (s) {
926
- const r = Gt(s, n, o);
927
- (a = t.instance) != null && a.maskFilled && (t.instance.maskFilled = !r.includes(o)), e.value = r;
1142
+ const o = "#", l = e.value, a = vn(l, o);
1143
+ if (a) {
1144
+ const r = hn(a, n, o);
1145
+ (s = t.instance) != null && s.maskFilled && (t.instance.maskFilled = !r.includes(o)), e.value = r;
928
1146
  } else
929
1147
  e.value = n;
930
1148
  }
931
- const zt = { class: "aform_form-element" }, Nt = ["id", "disabled", "maxlength", "required"], jt = ["for"], Jt = ["innerHTML"], Qt = /* @__PURE__ */ D({
1149
+ const yn = { class: "aform_form-element" }, bn = ["id", "disabled", "maxlength", "required"], wn = ["for"], kn = ["innerHTML"], _n = /* @__PURE__ */ M({
932
1150
  __name: "ATextInput",
933
- props: /* @__PURE__ */ H({
1151
+ props: /* @__PURE__ */ G({
934
1152
  schema: {},
935
1153
  label: {},
936
1154
  mask: {},
@@ -944,35 +1162,35 @@ const zt = { class: "aform_form-element" }, Nt = ["id", "disabled", "maxlength",
944
1162
  }),
945
1163
  emits: ["update:modelValue"],
946
1164
  setup(e) {
947
- const t = v(!0), n = F(e, "modelValue");
948
- return (o, l) => (p(), g("div", zt, [
949
- w(i("input", {
1165
+ const t = y(!0), n = H(e, "modelValue");
1166
+ return (o, l) => (g(), b("div", yn, [
1167
+ E(d("input", {
950
1168
  class: "aform_input-field",
951
- "onUpdate:modelValue": l[0] || (l[0] = (s) => n.value = s),
1169
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => n.value = a),
952
1170
  id: o.uuid,
953
1171
  disabled: o.readonly,
954
1172
  maxlength: o.mask ? t.value && o.mask.length : void 0,
955
1173
  required: o.required
956
- }, null, 8, Nt), [
957
- [P, n.value],
958
- [I(Kt), o.mask]
1174
+ }, null, 8, bn), [
1175
+ [F, n.value],
1176
+ [x(gn), o.mask]
959
1177
  ]),
960
- i("label", {
1178
+ d("label", {
961
1179
  class: "aform_field-label",
962
1180
  for: o.uuid
963
- }, k(o.label), 9, jt),
964
- w(i("p", {
1181
+ }, D(o.label), 9, wn),
1182
+ E(d("p", {
965
1183
  class: "aform_error",
966
1184
  innerHTML: o.validation.errorMessage
967
- }, null, 8, Jt), [
968
- [B, o.validation.errorMessage]
1185
+ }, null, 8, kn), [
1186
+ [R, o.validation.errorMessage]
969
1187
  ])
970
1188
  ]));
971
1189
  }
972
- }), Xt = { class: "login-container" }, Zt = { class: "account-container" }, en = { class: "account-header" }, tn = { id: "account-title" }, nn = { id: "account-subtitle" }, on = { class: "login-form-container" }, ln = { class: "login-form-email aform_form-element" }, an = ["disabled"], sn = { class: "login-form-password aform_form-element" }, rn = ["disabled"], un = ["disabled"], cn = {
1190
+ }), An = { class: "login-container" }, Dn = { class: "account-container" }, En = { class: "account-header" }, Mn = { id: "account-title" }, Cn = { id: "account-subtitle" }, In = { class: "login-form-container" }, Tn = { class: "login-form-email aform_form-element" }, Sn = ["disabled"], $n = { class: "login-form-password aform_form-element" }, Ln = ["disabled"], xn = ["disabled"], Vn = {
973
1191
  key: 0,
974
1192
  class: "material-symbols-outlined loading-icon"
975
- }, dn = /* @__PURE__ */ D({
1193
+ }, Pn = /* @__PURE__ */ M({
976
1194
  __name: "Login",
977
1195
  props: {
978
1196
  headerTitle: { default: "Login" },
@@ -980,94 +1198,94 @@ const zt = { class: "aform_form-element" }, Nt = ["id", "disabled", "maxlength",
980
1198
  },
981
1199
  emits: ["loginFailed", "loginSuccess"],
982
1200
  setup(e, { emit: t }) {
983
- const n = t, o = v(""), l = v(""), s = v(!1), a = v(!1);
984
- function r(c) {
985
- if (c.preventDefault(), s.value = !0, a.value) {
986
- s.value = !1, n("loginFailed");
1201
+ const n = t, o = y(""), l = y(""), a = y(!1), s = y(!1);
1202
+ function r(u) {
1203
+ if (u.preventDefault(), a.value = !0, s.value) {
1204
+ a.value = !1, n("loginFailed");
987
1205
  return;
988
1206
  }
989
- s.value = !1, n("loginSuccess");
1207
+ a.value = !1, n("loginSuccess");
990
1208
  }
991
- return (c, u) => (p(), g("div", Xt, [
992
- i("div", null, [
993
- i("div", Zt, [
994
- i("div", en, [
995
- i("h1", tn, k(c.headerTitle), 1),
996
- i("p", nn, k(c.headerSubtitle), 1)
1209
+ return (u, i) => (g(), b("div", An, [
1210
+ d("div", null, [
1211
+ d("div", Dn, [
1212
+ d("div", En, [
1213
+ d("h1", Mn, D(u.headerTitle), 1),
1214
+ d("p", Cn, D(u.headerSubtitle), 1)
997
1215
  ]),
998
- i("form", { onSubmit: r }, [
999
- i("div", on, [
1000
- i("div", ln, [
1001
- u[2] || (u[2] = i("label", {
1216
+ d("form", { onSubmit: r }, [
1217
+ d("div", In, [
1218
+ d("div", Tn, [
1219
+ i[2] || (i[2] = d("label", {
1002
1220
  id: "login-email",
1003
1221
  for: "email",
1004
1222
  class: "aform_field-label"
1005
1223
  }, "Email", -1)),
1006
- w(i("input", {
1224
+ E(d("input", {
1007
1225
  id: "email",
1008
1226
  class: "aform_input-field",
1009
1227
  name: "email",
1010
1228
  placeholder: "name@example.com",
1011
1229
  type: "email",
1012
- "onUpdate:modelValue": u[0] || (u[0] = (d) => o.value = d),
1230
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => o.value = c),
1013
1231
  "auto-capitalize": "none",
1014
1232
  "auto-complete": "email",
1015
1233
  "auto-correct": "off",
1016
- disabled: s.value
1017
- }, null, 8, an), [
1018
- [P, o.value]
1234
+ disabled: a.value
1235
+ }, null, 8, Sn), [
1236
+ [F, o.value]
1019
1237
  ])
1020
1238
  ]),
1021
- i("div", sn, [
1022
- u[3] || (u[3] = i("label", {
1239
+ d("div", $n, [
1240
+ i[3] || (i[3] = d("label", {
1023
1241
  id: "login-password",
1024
1242
  for: "password",
1025
1243
  class: "aform_field-label"
1026
1244
  }, "Password", -1)),
1027
- w(i("input", {
1245
+ E(d("input", {
1028
1246
  id: "password",
1029
1247
  class: "aform_input-field",
1030
1248
  name: "password",
1031
1249
  type: "password",
1032
- "onUpdate:modelValue": u[1] || (u[1] = (d) => l.value = d),
1033
- disabled: s.value
1034
- }, null, 8, rn), [
1035
- [P, l.value]
1250
+ "onUpdate:modelValue": i[1] || (i[1] = (c) => l.value = c),
1251
+ disabled: a.value
1252
+ }, null, 8, Ln), [
1253
+ [F, l.value]
1036
1254
  ])
1037
1255
  ]),
1038
- i("button", {
1256
+ d("button", {
1039
1257
  class: "btn",
1040
1258
  onClick: r,
1041
- disabled: s.value || !o.value || !l.value
1259
+ disabled: a.value || !o.value || !l.value
1042
1260
  }, [
1043
- s.value ? (p(), g("span", cn, "progress_activity")) : J("", !0),
1044
- u[4] || (u[4] = i("span", { id: "login-form-button" }, "Login", -1))
1045
- ], 8, un)
1261
+ a.value ? (g(), b("span", Vn, "progress_activity")) : se("", !0),
1262
+ i[4] || (i[4] = d("span", { id: "login-form-button" }, "Login", -1))
1263
+ ], 8, xn)
1046
1264
  ])
1047
1265
  ], 32),
1048
- u[5] || (u[5] = i("button", { class: "btn" }, [
1049
- i("span", { id: "forgot-password-button" }, "Forgot password?")
1266
+ i[5] || (i[5] = d("button", { class: "btn" }, [
1267
+ d("span", { id: "forgot-password-button" }, "Forgot password?")
1050
1268
  ], -1))
1051
1269
  ])
1052
1270
  ])
1053
1271
  ]));
1054
1272
  }
1055
- }), mn = /* @__PURE__ */ T(dn, [["__scopeId", "data-v-6cbd3add"]]);
1056
- function pn(e) {
1057
- e.component("ACheckbox", Be), e.component("ACombobox", qe), e.component("ADate", Ye), e.component("ADropdown", Je), e.component("ADatePicker", bt), e.component("AFieldset", Mt), e.component("AFileAttach", Pt), e.component("AForm", he), e.component("ANumericInput", Rt), e.component("ATextInput", Qt);
1273
+ }), Fn = /* @__PURE__ */ T(Pn, [["__scopeId", "data-v-6cbd3add"]]);
1274
+ function Hn(e) {
1275
+ e.component("ACheckbox", et), e.component("ACombobox", tt), e.component("ADate", at), e.component("ADropdown", wt), e.component("ADatePicker", Ut), e.component("AFieldset", zt), e.component("AFileAttach", an), e.component("AForm", xe), e.component("ANumericInput", fn), e.component("ATextInput", _n);
1058
1276
  }
1059
1277
  export {
1060
- Be as ACheckbox,
1061
- qe as AComboBox,
1062
- Ye as ADate,
1063
- bt as ADatePicker,
1064
- Je as ADropdown,
1065
- Mt as AFieldset,
1066
- Pt as AFileAttach,
1067
- he as AForm,
1068
- Rt as ANumericInput,
1069
- Qt as ATextInput,
1070
- mn as Login,
1071
- pn as install
1278
+ et as ACheckbox,
1279
+ tt as AComboBox,
1280
+ at as ADate,
1281
+ Ut as ADatePicker,
1282
+ wt as ADropdown,
1283
+ zt as AFieldset,
1284
+ an as AFileAttach,
1285
+ xe as AForm,
1286
+ fn as ANumericInput,
1287
+ _n as ATextInput,
1288
+ Fn as Login,
1289
+ Hn as install
1072
1290
  };
1073
1291
  //# sourceMappingURL=aform.js.map