@stonecrop/aform 0.6.2 → 0.6.3

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