vx-vue 1.1.1 → 1.2.0

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/vxvue.es.js CHANGED
@@ -1,44 +1,44 @@
1
- import { useSlots as Ce, ref as w, computed as L, onBeforeUpdate as Ve, openBlock as u, createElementBlock as m, Fragment as O, renderList as _, createBlock as H, resolveDynamicComponent as ie, createElementVNode as v, useAttrs as U, normalizeClass as $, unref as M, renderSlot as A, getCurrentScope as Me, onScopeDispose as De, watch as K, onUpdated as Ae, mergeProps as j, withKeys as ae, withModifiers as N, createCommentVNode as P, toDisplayString as B, createVNode as E, Transition as ce, withCtx as te, createTextVNode as X, nextTick as ve, toValue as ge, withDirectives as xe, vModelText as Be, onMounted as me, normalizeStyle as ye, resolveComponent as Le, createSlots as Pe, vShow as Te, toHandlers as oe } from "vue";
2
- const wl = {
1
+ import { useSlots as Se, ref as $, computed as L, onBeforeUpdate as Ce, openBlock as i, createElementBlock as m, Fragment as z, renderList as j, createBlock as W, resolveDynamicComponent as ie, createElementVNode as v, useAttrs as q, unref as A, normalizeClass as C, renderSlot as P, toValue as _, getCurrentScope as Me, onScopeDispose as Ve, watch as X, onUpdated as De, mergeProps as R, withKeys as ae, withModifiers as E, createCommentVNode as I, toDisplayString as T, createVNode as Y, Transition as ve, withCtx as te, createTextVNode as J, nextTick as me, withDirectives as xe, vModelText as Ae, onMounted as fe, normalizeStyle as ye, resolveComponent as Be, createSlots as Pe, vShow as Te, toHandlers as re } from "vue";
2
+ const yl = {
3
3
  __name: "accordion",
4
- props: { activeIndex: [Number, Array] },
4
+ props: { activeIndex: { type: [Number, Array], default: null } },
5
5
  emits: ["update:activeIndex"],
6
6
  setup(e, { emit: d }) {
7
- const t = e, s = d, a = Ce(), l = w([]), c = (f) => l.value.push(f), n = L(() => (l.value = [], a.default().reduce((f, x) => ((x.type.__name || x.type.name) === "accordion-panel" && f.push(x), f), []))), o = (f) => {
7
+ const t = e, o = d, a = Se(), l = $([]), c = (f) => l.value.push(f), s = L(() => a.default().reduce((f, b) => ((b.type.__name || b.type.name) === "accordion-panel" && f.push(b), f), [])), n = (f) => {
8
8
  if (Array.isArray(t.activeIndex)) {
9
- let x = [].concat(t.activeIndex), h = x.findIndex((g) => g === f);
10
- h === -1 ? s("update:activeIndex", [...x, f]) : (x.splice(h, 1), s("update:activeIndex", x));
9
+ let b = [].concat(t.activeIndex), k = b.findIndex((x) => x === f);
10
+ k === -1 ? o("update:activeIndex", [...b, f]) : (b.splice(k, 1), o("update:activeIndex", b));
11
11
  } else
12
- s("update:activeIndex", f === t.activeIndex ? -1 : f);
13
- }, i = (f) => {
14
- if (f = ++f % n.value.length, !l.value[f].disabled) {
15
- o(f), l.value[f].focus();
16
- return;
17
- }
18
- i(f);
12
+ o("update:activeIndex", f === t.activeIndex ? -1 : f);
19
13
  }, r = (f) => {
20
- if (f = (f || n.value.length) - 1, !l.value[f].disabled) {
21
- o(f), l.value[f].focus();
14
+ if (f = ++f % s.value.length, !l.value[f].disabled) {
15
+ n(f), l.value[f].focus();
22
16
  return;
23
17
  }
24
18
  r(f);
19
+ }, u = (f) => {
20
+ if (f = (f || s.value.length) - 1, !l.value[f].disabled) {
21
+ n(f), l.value[f].focus();
22
+ return;
23
+ }
24
+ u(f);
25
25
  };
26
- return Ve(() => l.value = []), (f, x) => (u(!0), m(O, null, _(n.value, (h, g) => {
27
- var S;
28
- return u(), H(ie(h), {
29
- key: g,
30
- show: Array.isArray(e.activeIndex) ? (S = e.activeIndex) == null ? void 0 : S.includes(g) : e.activeIndex === g,
31
- onSelect: (I) => o(g),
32
- onKeydown: (I) => i(g),
33
- onKeyup: (I) => r(g),
26
+ return Ce(() => l.value = []), (f, b) => (i(!0), m(z, null, j(s.value, (k, x) => {
27
+ var g;
28
+ return i(), W(ie(k), {
29
+ key: x,
34
30
  ref_for: !0,
35
- ref: c
31
+ ref: c,
32
+ show: Array.isArray(e.activeIndex) ? (g = e.activeIndex) == null ? void 0 : g.includes(x) : e.activeIndex === x,
33
+ onSelect: (w) => n(x),
34
+ onKeydown: (w) => r(x),
35
+ onKeyup: (w) => u(x)
36
36
  }, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
37
37
  }), 128));
38
38
  }
39
39
  };
40
- function Ie(e, d) {
41
- return u(), m("svg", {
40
+ function Le(e, d) {
41
+ return i(), m("svg", {
42
42
  xmlns: "http://www.w3.org/2000/svg",
43
43
  viewBox: "0 0 24 24",
44
44
  fill: "currentColor",
@@ -52,8 +52,8 @@ function Ie(e, d) {
52
52
  })
53
53
  ]);
54
54
  }
55
- function Oe(e, d) {
56
- return u(), m("svg", {
55
+ function Ie(e, d) {
56
+ return i(), m("svg", {
57
57
  xmlns: "http://www.w3.org/2000/svg",
58
58
  viewBox: "0 0 24 24",
59
59
  fill: "currentColor",
@@ -67,8 +67,8 @@ function Oe(e, d) {
67
67
  })
68
68
  ]);
69
69
  }
70
- function re(e, d) {
71
- return u(), m("svg", {
70
+ function ue(e, d) {
71
+ return i(), m("svg", {
72
72
  xmlns: "http://www.w3.org/2000/svg",
73
73
  viewBox: "0 0 24 24",
74
74
  fill: "currentColor",
@@ -82,8 +82,8 @@ function re(e, d) {
82
82
  })
83
83
  ]);
84
84
  }
85
- function ne(e, d) {
86
- return u(), m("svg", {
85
+ function oe(e, d) {
86
+ return i(), m("svg", {
87
87
  xmlns: "http://www.w3.org/2000/svg",
88
88
  viewBox: "0 0 24 24",
89
89
  fill: "currentColor",
@@ -97,8 +97,8 @@ function ne(e, d) {
97
97
  })
98
98
  ]);
99
99
  }
100
- function ze(e, d) {
101
- return u(), m("svg", {
100
+ function Oe(e, d) {
101
+ return i(), m("svg", {
102
102
  xmlns: "http://www.w3.org/2000/svg",
103
103
  viewBox: "0 0 24 24",
104
104
  fill: "currentColor",
@@ -112,8 +112,8 @@ function ze(e, d) {
112
112
  })
113
113
  ]);
114
114
  }
115
- function Fe(e, d) {
116
- return u(), m("svg", {
115
+ function ze(e, d) {
116
+ return i(), m("svg", {
117
117
  xmlns: "http://www.w3.org/2000/svg",
118
118
  viewBox: "0 0 24 24",
119
119
  fill: "currentColor",
@@ -127,8 +127,8 @@ function Fe(e, d) {
127
127
  })
128
128
  ]);
129
129
  }
130
- function Ne(e, d) {
131
- return u(), m("svg", {
130
+ function Fe(e, d) {
131
+ return i(), m("svg", {
132
132
  xmlns: "http://www.w3.org/2000/svg",
133
133
  viewBox: "0 0 24 24",
134
134
  fill: "currentColor",
@@ -142,8 +142,8 @@ function Ne(e, d) {
142
142
  })
143
143
  ]);
144
144
  }
145
- function _e(e, d) {
146
- return u(), m("svg", {
145
+ function Ne(e, d) {
146
+ return i(), m("svg", {
147
147
  xmlns: "http://www.w3.org/2000/svg",
148
148
  viewBox: "0 0 24 24",
149
149
  fill: "currentColor",
@@ -157,8 +157,8 @@ function _e(e, d) {
157
157
  })
158
158
  ]);
159
159
  }
160
- function fe(e, d) {
161
- return u(), m("svg", {
160
+ function he(e, d) {
161
+ return i(), m("svg", {
162
162
  xmlns: "http://www.w3.org/2000/svg",
163
163
  viewBox: "0 0 24 24",
164
164
  fill: "currentColor",
@@ -172,67 +172,67 @@ function fe(e, d) {
172
172
  })
173
173
  ]);
174
174
  }
175
- const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["aria-labelledby", "id"], Ye = { class: "overflow-hidden rounded-b" }, kl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
175
+ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["id", "aria-labelledby"], Ye = { class: "overflow-hidden rounded-b" }, wl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
176
176
  __name: "accordion-panel",
177
177
  props: { show: Boolean, disabled: Boolean },
178
178
  emits: ["select", "keyup", "keydown"],
179
179
  setup(e, { expose: d, emit: t }) {
180
- const s = t, a = e, l = U(), c = w(null), n = Math.random().toString(20).substring(2, 8), o = (r) => {
180
+ const o = t, a = e, l = q(), c = $(null), s = Math.random().toString(20).substring(2, 8), n = (u) => {
181
181
  if (!a.disabled) {
182
- const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(r.keyCode);
183
- f && (s(f), r.preventDefault());
182
+ const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(u.keyCode);
183
+ f && (o(f), u.preventDefault());
184
184
  }
185
185
  };
186
- return d({ focus: () => c.value.focus(), disabled: a.disabled }), (r, f) => (u(), m("div", null, [
186
+ return d({ focus: () => c.value.focus(), disabled: a.disabled }), (u, f) => (i(), m("div", null, [
187
187
  v("button", {
188
- onClick: f[0] || (f[0] = (x) => s("select")),
189
- onKeydown: o,
190
- class: $([
188
+ id: "ap-control-" + A(s),
189
+ ref_key: "btn",
190
+ ref: c,
191
+ class: C([
191
192
  "flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",
192
- e.show ? "rounded-t" : "rounded",
193
+ e.show ? "rounded-t" : "rounded-sm",
193
194
  e.disabled ? "bg-slate-300 text-slate-700" : "bg-vxvue hover:bg-vxvue-600 text-white",
194
- M(l).class
195
+ A(l).class
195
196
  ]),
196
- id: "ap-control-" + M(n),
197
197
  disabled: e.disabled,
198
198
  "aria-expanded": e.show,
199
- "aria-controls": "ap-" + M(n),
200
- ref_key: "btn",
201
- ref: c,
202
- tabindex: "0"
199
+ "aria-controls": "ap-" + A(s),
200
+ tabindex: "0",
201
+ onClick: f[0] || (f[0] = (b) => o("select")),
202
+ onKeydown: n
203
203
  }, [
204
- e.disabled ? (u(), H(M(fe), {
204
+ e.disabled ? (i(), W(A(he), {
205
205
  key: 0,
206
206
  class: "size-5"
207
- })) : (u(), H(M(ne), {
207
+ })) : (i(), W(A(oe), {
208
208
  key: 1,
209
- class: $(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
209
+ class: C(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
210
210
  }, null, 8, ["class"])),
211
211
  v("span", null, [
212
- A(r.$slots, "header")
212
+ P(u.$slots, "header")
213
213
  ])
214
214
  ], 42, Ee),
215
215
  v("div", {
216
- class: $(["grid transition-[grid-template-rows] duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-[repeat(1,minmax(0,0fr))]"]),
217
- "aria-labelledby": "ap-control-" + M(n),
218
- id: "ap-" + M(n)
216
+ id: "ap-" + A(s),
217
+ class: C(["grid transition-[grid-template-rows] duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-[repeat(1,minmax(0,0fr))]"]),
218
+ "aria-labelledby": "ap-control-" + A(s)
219
219
  }, [
220
220
  v("div", Ye, [
221
- A(r.$slots, "default")
221
+ P(u.$slots, "default")
222
222
  ])
223
223
  ], 10, je)
224
224
  ]));
225
225
  }
226
- }), Re = ["viewBox"], He = ["cx", "cy", "r", "stroke-width"], We = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], we = {
226
+ }), _e = ["viewBox"], Re = ["cx", "cy", "r", "stroke-width"], He = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], we = {
227
227
  __name: "spinner",
228
228
  props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
229
229
  setup(e) {
230
- const d = e, t = L(() => d.radius + d.strokeWidth / 2), s = L(() => d.radius * 2 + d.strokeWidth), a = L(() => d.radius * Math.PI / 1.5);
231
- return (l, c) => (u(), m("svg", {
230
+ const d = e, t = L(() => d.radius + d.strokeWidth / 2), o = L(() => d.radius * 2 + d.strokeWidth), a = L(() => d.radius * Math.PI / 1.5);
231
+ return (l, c) => (i(), m("svg", {
232
232
  class: "animate-spin",
233
233
  xmlns: "http://www.w3.org/2000/svg",
234
234
  fill: "none",
235
- viewBox: "0 0 " + s.value + " " + s.value,
235
+ viewBox: "0 0 " + o.value + " " + o.value,
236
236
  role: "progressbar"
237
237
  }, [
238
238
  v("circle", {
@@ -242,7 +242,7 @@ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["aria-lab
242
242
  r: e.radius,
243
243
  stroke: "currentColor",
244
244
  "stroke-width": e.strokeWidth
245
- }, null, 8, He),
245
+ }, null, 8, Re),
246
246
  v("circle", {
247
247
  cx: t.value,
248
248
  cy: t.value,
@@ -251,149 +251,184 @@ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["aria-lab
251
251
  "stroke-width": e.strokeWidth,
252
252
  "stroke-dasharray": a.value + " " + e.radius * 100,
253
253
  "stroke-linecap": "round"
254
- }, null, 8, We)
255
- ], 8, Re));
254
+ }, null, 8, He)
255
+ ], 8, _e));
256
256
  }
257
257
  };
258
- function Ze(e) {
259
- return Me() ? (De(e), !0) : !1;
260
- }
261
- function J(e) {
262
- return typeof e == "function" ? e() : M(e);
258
+ function We(e) {
259
+ return Me() ? (Ve(e), !0) : !1;
263
260
  }
264
261
  const ke = typeof window < "u" && typeof document < "u";
265
262
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
266
- const Ue = Object.prototype.toString, Ke = (e) => Ue.call(e) === "[object Object]", ue = () => {
267
- }, qe = /* @__PURE__ */ Xe();
268
- function Xe() {
263
+ const Ze = Object.prototype.toString, Ue = (e) => Ze.call(e) === "[object Object]", de = () => {
264
+ }, Ke = /* @__PURE__ */ qe();
265
+ function qe() {
269
266
  var e, d;
270
267
  return ke && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((d = window == null ? void 0 : window.navigator) == null ? void 0 : d.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
271
268
  }
272
- const Ge = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
273
- function Je(e, d, t, s) {
269
+ function ce(e) {
270
+ return Array.isArray(e) ? e : [e];
271
+ }
272
+ const Xe = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
273
+ function Ge(e, d, t, o) {
274
274
  let a = e < 12 ? "AM" : "PM";
275
- return s && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
275
+ return o && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
276
276
  }
277
277
  function ee(e) {
278
278
  const d = ["th", "st", "nd", "rd"], t = e % 100;
279
279
  return e + (d[(t - 20) % 10] || d[t] || d[0]);
280
280
  }
281
- function pe(e, d, t = {}) {
282
- var s;
283
- const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), n = e.getHours(), o = e.getMinutes(), i = e.getSeconds(), r = e.getMilliseconds(), f = e.getDay(), x = (s = t.customMeridiem) != null ? s : Je, h = {
281
+ function ge(e, d, t = {}) {
282
+ var o;
283
+ const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), n = e.getMinutes(), r = e.getSeconds(), u = e.getMilliseconds(), f = e.getDay(), b = (o = t.customMeridiem) != null ? o : Ge, k = {
284
284
  Yo: () => ee(a),
285
285
  YY: () => String(a).slice(-2),
286
286
  YYYY: () => a,
287
287
  M: () => l + 1,
288
288
  Mo: () => ee(l + 1),
289
289
  MM: () => `${l + 1}`.padStart(2, "0"),
290
- MMM: () => e.toLocaleDateString(J(t.locales), { month: "short" }),
291
- MMMM: () => e.toLocaleDateString(J(t.locales), { month: "long" }),
290
+ MMM: () => e.toLocaleDateString(_(t.locales), { month: "short" }),
291
+ MMMM: () => e.toLocaleDateString(_(t.locales), { month: "long" }),
292
292
  D: () => String(c),
293
293
  Do: () => ee(c),
294
294
  DD: () => `${c}`.padStart(2, "0"),
295
- H: () => String(n),
296
- Ho: () => ee(n),
297
- HH: () => `${n}`.padStart(2, "0"),
298
- h: () => `${n % 12 || 12}`.padStart(1, "0"),
299
- ho: () => ee(n % 12 || 12),
300
- hh: () => `${n % 12 || 12}`.padStart(2, "0"),
301
- m: () => String(o),
302
- mo: () => ee(o),
303
- mm: () => `${o}`.padStart(2, "0"),
304
- s: () => String(i),
305
- so: () => ee(i),
306
- ss: () => `${i}`.padStart(2, "0"),
307
- SSS: () => `${r}`.padStart(3, "0"),
295
+ H: () => String(s),
296
+ Ho: () => ee(s),
297
+ HH: () => `${s}`.padStart(2, "0"),
298
+ h: () => `${s % 12 || 12}`.padStart(1, "0"),
299
+ ho: () => ee(s % 12 || 12),
300
+ hh: () => `${s % 12 || 12}`.padStart(2, "0"),
301
+ m: () => String(n),
302
+ mo: () => ee(n),
303
+ mm: () => `${n}`.padStart(2, "0"),
304
+ s: () => String(r),
305
+ so: () => ee(r),
306
+ ss: () => `${r}`.padStart(2, "0"),
307
+ SSS: () => `${u}`.padStart(3, "0"),
308
308
  d: () => f,
309
- dd: () => e.toLocaleDateString(J(t.locales), { weekday: "narrow" }),
310
- ddd: () => e.toLocaleDateString(J(t.locales), { weekday: "short" }),
311
- dddd: () => e.toLocaleDateString(J(t.locales), { weekday: "long" }),
312
- A: () => x(n, o),
313
- AA: () => x(n, o, !1, !0),
314
- a: () => x(n, o, !0),
315
- aa: () => x(n, o, !0, !0)
309
+ dd: () => e.toLocaleDateString(_(t.locales), { weekday: "narrow" }),
310
+ ddd: () => e.toLocaleDateString(_(t.locales), { weekday: "short" }),
311
+ dddd: () => e.toLocaleDateString(_(t.locales), { weekday: "long" }),
312
+ A: () => b(s, n),
313
+ AA: () => b(s, n, !1, !0),
314
+ a: () => b(s, n, !0),
315
+ aa: () => b(s, n, !0, !0)
316
316
  };
317
- return d.replace(Ge, (g, S) => {
318
- var I, z;
319
- return (z = S ?? ((I = h[g]) == null ? void 0 : I.call(h))) != null ? z : g;
317
+ return d.replace(Xe, (x, g) => {
318
+ var w, M;
319
+ return (M = g ?? ((w = k[x]) == null ? void 0 : w.call(k))) != null ? M : x;
320
320
  });
321
321
  }
322
+ function Je(e, d, t) {
323
+ return X(
324
+ e,
325
+ d,
326
+ {
327
+ ...t,
328
+ immediate: !0
329
+ }
330
+ );
331
+ }
322
332
  const $e = ke ? window : void 0;
323
- function se(e) {
333
+ function ne(e) {
324
334
  var d;
325
- const t = J(e);
335
+ const t = _(e);
326
336
  return (d = t == null ? void 0 : t.$el) != null ? d : t;
327
337
  }
328
- function de(...e) {
329
- let d, t, s, a;
330
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, a] = e, d = $e) : [d, t, s, a] = e, !d)
331
- return ue;
332
- Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
333
- const l = [], c = () => {
334
- l.forEach((r) => r()), l.length = 0;
335
- }, n = (r, f, x, h) => (r.addEventListener(f, x, h), () => r.removeEventListener(f, x, h)), o = K(
336
- () => [se(d), J(a)],
337
- ([r, f]) => {
338
- if (c(), !r)
338
+ function se(...e) {
339
+ const d = [], t = () => {
340
+ d.forEach((s) => s()), d.length = 0;
341
+ }, o = (s, n, r, u) => (s.addEventListener(n, r, u), () => s.removeEventListener(n, r, u)), a = L(() => {
342
+ const s = ce(_(e[0])).filter((n) => n != null);
343
+ return s.every((n) => typeof n != "string") ? s : void 0;
344
+ }), l = Je(
345
+ () => {
346
+ var s, n;
347
+ return [
348
+ (n = (s = a.value) == null ? void 0 : s.map((r) => ne(r))) != null ? n : [$e].filter((r) => r != null),
349
+ ce(_(a.value ? e[1] : e[0])),
350
+ ce(A(a.value ? e[2] : e[1])),
351
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
352
+ _(a.value ? e[3] : e[2])
353
+ ];
354
+ },
355
+ ([s, n, r, u]) => {
356
+ if (t(), !(s != null && s.length) || !(n != null && n.length) || !(r != null && r.length))
339
357
  return;
340
- const x = Ke(f) ? { ...f } : f;
341
- l.push(
342
- ...t.flatMap((h) => s.map((g) => n(r, h, g, x)))
358
+ const f = Ue(u) ? { ...u } : u;
359
+ d.push(
360
+ ...s.flatMap(
361
+ (b) => n.flatMap(
362
+ (k) => r.map((x) => o(b, k, x, f))
363
+ )
364
+ )
343
365
  );
344
366
  },
345
- { immediate: !0, flush: "post" }
346
- ), i = () => {
347
- o(), c();
367
+ { flush: "post" }
368
+ ), c = () => {
369
+ l(), t();
348
370
  };
349
- return Ze(i), i;
371
+ return We(t), c;
350
372
  }
351
373
  let be = !1;
352
- function he(e, d, t = {}) {
353
- const { window: s = $e, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
354
- if (!s)
355
- return ue;
356
- qe && !be && (be = !0, Array.from(s.document.body.children).forEach((h) => h.addEventListener("click", ue)), s.document.documentElement.addEventListener("click", ue));
357
- let n = !0;
358
- const o = (h) => J(a).some((g) => {
359
- if (typeof g == "string")
360
- return Array.from(s.document.querySelectorAll(g)).some((S) => S === h.target || h.composedPath().includes(S));
374
+ function pe(e, d, t = {}) {
375
+ const { window: o = $e, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
376
+ if (!o)
377
+ return de;
378
+ if (Ke && !be) {
379
+ be = !0;
380
+ const g = { passive: !0 };
381
+ Array.from(o.document.body.children).forEach((w) => se(w, "click", de, g)), se(o.document.documentElement, "click", de, g);
382
+ }
383
+ let s = !0;
384
+ const n = (g) => _(a).some((w) => {
385
+ if (typeof w == "string")
386
+ return Array.from(o.document.querySelectorAll(w)).some((M) => M === g.target || g.composedPath().includes(M));
361
387
  {
362
- const S = se(g);
363
- return S && (h.target === S || h.composedPath().includes(S));
388
+ const M = ne(w);
389
+ return M && (g.target === M || g.composedPath().includes(M));
364
390
  }
365
- }), i = (h) => {
366
- const g = se(e);
367
- if (!(!g || g === h.target || h.composedPath().includes(g))) {
368
- if (h.detail === 0 && (n = !o(h)), !n) {
369
- n = !0;
391
+ });
392
+ function r(g) {
393
+ const w = _(g);
394
+ return w && w.$.subTree.shapeFlag === 16;
395
+ }
396
+ function u(g, w) {
397
+ const M = _(g), F = M.$.subTree && M.$.subTree.children;
398
+ return F == null || !Array.isArray(F) ? !1 : F.some((Z) => Z.el === w.target || w.composedPath().includes(Z.el));
399
+ }
400
+ const f = (g) => {
401
+ const w = ne(e);
402
+ if (g.target != null && !(!(w instanceof Element) && r(e) && u(e, g)) && !(!w || w === g.target || g.composedPath().includes(w))) {
403
+ if (g.detail === 0 && (s = !n(g)), !s) {
404
+ s = !0;
370
405
  return;
371
406
  }
372
- d(h);
407
+ d(g);
373
408
  }
374
409
  };
375
- let r = !1;
376
- const f = [
377
- de(s, "click", (h) => {
378
- r || (r = !0, setTimeout(() => {
379
- r = !1;
380
- }, 0), i(h));
410
+ let b = !1;
411
+ const k = [
412
+ se(o, "click", (g) => {
413
+ b || (b = !0, setTimeout(() => {
414
+ b = !1;
415
+ }, 0), f(g));
381
416
  }, { passive: !0, capture: l }),
382
- de(s, "pointerdown", (h) => {
383
- const g = se(e);
384
- n = !o(h) && !!(g && !h.composedPath().includes(g));
417
+ se(o, "pointerdown", (g) => {
418
+ const w = ne(e);
419
+ s = !n(g) && !!(w && !g.composedPath().includes(w));
385
420
  }, { passive: !0 }),
386
- c && de(s, "blur", (h) => {
421
+ c && se(o, "blur", (g) => {
387
422
  setTimeout(() => {
388
- var g;
389
- const S = se(e);
390
- ((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(S != null && S.contains(s.document.activeElement)) && d(h);
423
+ var w;
424
+ const M = ne(e);
425
+ ((w = o.document.activeElement) == null ? void 0 : w.tagName) === "IFRAME" && !(M != null && M.contains(o.document.activeElement)) && d(g);
391
426
  }, 0);
392
- })
427
+ }, { passive: !0 })
393
428
  ].filter(Boolean);
394
- return () => f.forEach((h) => h());
429
+ return () => k.forEach((g) => g());
395
430
  }
396
- const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, tt = ["data-result-index"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
431
+ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, tt = ["data-result-index"], kl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
397
432
  __name: "autocomplete",
398
433
  props: {
399
434
  modelValue: { type: String, default: "" },
@@ -403,19 +438,19 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
403
438
  getResultValue: { type: Function, default: (e) => e },
404
439
  autoSelect: Boolean
405
440
  },
406
- emits: ["update:modelValue", "blur", "submit"],
441
+ emits: ["update:modelValue", "blur-sm", "submit"],
407
442
  setup(e, { emit: d }) {
408
- const t = d, s = e, a = U(), c = (/* @__PURE__ */ (() => {
409
- let V = 0;
410
- return (D) => (D || "") + ++V;
411
- })())((a.id || "autocomplete") + "-"), n = w([]), o = w(-1), i = w(0), r = w(!1), f = w(!1), x = w("top-0 translate-y-12"), h = w(!0), g = w(null), S = w(null), I = w(null), z = L(
412
- () => n.value.map((V, D) => ({
413
- id: (a.id || "autocomplete") + "-item-" + D,
414
- class: [s.resultItemClass, { "bg-vxvue-700 text-white": o.value === D }],
443
+ const t = d, o = e, a = q(), c = (/* @__PURE__ */ (() => {
444
+ let D = 0;
445
+ return (B) => (B || "") + ++D;
446
+ })())((a.id || "autocomplete") + "-"), s = $([]), n = $(-1), r = $(0), u = $(!1), f = $(!1), b = $("top-0 translate-y-12"), k = $(!0), x = $(null), g = $(null), w = $(null), M = L(
447
+ () => s.value.map((D, B) => ({
448
+ id: (a.id || "autocomplete") + "-item-" + B,
449
+ class: [o.resultItemClass, { "bg-vxvue-700 text-white": n.value === B }],
415
450
  role: "option",
416
- ...o.value === D ? { "aria-selected": "true" } : {}
451
+ ...n.value === B ? { "aria-selected": "true" } : {}
417
452
  }))
418
- ), Y = L(() => ({
453
+ ), F = L(() => ({
419
454
  role: "combobox",
420
455
  autocomplete: "off",
421
456
  autocapitalize: "off",
@@ -424,118 +459,118 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
424
459
  "aria-autocomplete": "list",
425
460
  "aria-haspopup": "listbox",
426
461
  "aria-owns": c,
427
- "aria-expanded": r.value ? "true" : "false",
428
- "aria-activedescendant": o.value > -1 ? z.value[o.value].id : "",
462
+ "aria-expanded": u.value ? "true" : "false",
463
+ "aria-activedescendant": n.value > -1 ? M.value[n.value].id : "",
429
464
  ...a
430
- })), G = L(() => ({
465
+ })), Z = L(() => ({
431
466
  id: c,
432
- class: ["absolute min-w-full transform z-10", s.resultListClass, x.value],
467
+ class: ["absolute min-w-full transform z-10", o.resultListClass, b.value],
433
468
  role: "listbox"
434
- })), Z = () => {
435
- o.value = -1, n.value = [], r.value = !1, h.value = !0;
436
- }, k = (V) => {
437
- const D = s.search(V);
438
- if (D instanceof Promise) {
439
- const q = ++i.value;
440
- f.value = !0, D.then((W) => {
441
- q === i.value && (n.value = W, f.value = !1, n.value.length ? (o.value = s.autoSelect ? 0 : -1, r.value = !0) : Z());
469
+ })), K = () => {
470
+ n.value = -1, s.value = [], u.value = !1, k.value = !0;
471
+ }, S = (D) => {
472
+ const B = o.search(D);
473
+ if (B instanceof Promise) {
474
+ const G = ++r.value;
475
+ f.value = !0, B.then((U) => {
476
+ G === r.value && (s.value = U, f.value = !1, s.value.length ? (n.value = o.autoSelect ? 0 : -1, u.value = !0) : K());
442
477
  });
443
478
  } else
444
- n.value = D, n.value.length === 0 ? Z() : (o.value = s.autoSelect ? 0 : -1, r.value = !0);
445
- }, C = () => {
446
- const V = n.value[o.value];
447
- return V && t("update:modelValue", s.getResultValue(V)), Z(), V;
448
- }, F = (V) => {
449
- t("update:modelValue", V), k(V);
450
- }, p = (V) => k(V.target.value), b = () => {
451
- Z(), t("blur");
479
+ s.value = B, s.value.length === 0 ? K() : (n.value = o.autoSelect ? 0 : -1, u.value = !0);
480
+ }, V = () => {
481
+ const D = s.value[n.value];
482
+ return D && t("update:modelValue", o.getResultValue(D)), K(), D;
483
+ }, N = (D) => {
484
+ t("update:modelValue", D), S(D);
485
+ }, h = (D) => S(D.target.value), p = () => {
486
+ K(), t("blur-sm");
452
487
  }, y = () => {
453
- const V = n.value.length;
454
- o.value = ((o.value - 1) % V + V) % V;
455
- }, T = (V) => {
456
- r.value || p(V);
457
- const D = n.value.length;
458
- o.value = ((o.value + 1) % D + D) % D;
459
- }, R = () => {
460
- Z(), t("update:modelValue", "");
461
- }, le = () => t("submit", C()), Q = (V) => {
462
- const D = V.target.closest("[data-result-index]");
463
- D && (o.value = parseInt(D.dataset.resultIndex, 10), t("submit", C()));
488
+ const D = s.value.length;
489
+ n.value = ((n.value - 1) % D + D) % D;
490
+ }, O = (D) => {
491
+ u.value || h(D);
492
+ const B = s.value.length;
493
+ n.value = ((n.value + 1) % B + B) % B;
494
+ }, H = () => {
495
+ K(), t("update:modelValue", "");
496
+ }, le = () => t("submit", V()), Q = (D) => {
497
+ const B = D.target.closest("[data-result-index]");
498
+ B && (n.value = parseInt(B.dataset.resultIndex, 10), t("submit", V()));
464
499
  };
465
- return he(I, Z), Ae(() => {
466
- if (g.value) {
467
- const V = S.value.getBoundingClientRect(), D = g.value.getBoundingClientRect();
468
- h.value && n.value.length && (h.value = !1, x.value = V.bottom + D.height > window.innerHeight && window.innerHeight - V.bottom < V.top && window.pageYOffset + V.top - D.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
469
- const q = g.value.querySelector('[data-result-index="' + o.value + '"]');
470
- if (q) {
471
- let W = q.getBoundingClientRect();
472
- W.top < D.top ? g.value.scrollTop -= D.top - W.top : W.bottom > D.bottom && (g.value.scrollTop += W.bottom - D.bottom);
500
+ return pe(w, K), De(() => {
501
+ if (x.value) {
502
+ const D = g.value.getBoundingClientRect(), B = x.value.getBoundingClientRect();
503
+ k.value && s.value.length && (k.value = !1, b.value = D.bottom + B.height > window.innerHeight && window.innerHeight - D.bottom < D.top && window.pageYOffset + D.top - B.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
504
+ const G = x.value.querySelector('[data-result-index="' + n.value + '"]');
505
+ if (G) {
506
+ let U = G.getBoundingClientRect();
507
+ U.top < B.top ? x.value.scrollTop -= B.top - U.top : U.bottom > B.bottom && (x.value.scrollTop += U.bottom - B.bottom);
473
508
  }
474
509
  }
475
- }), (V, D) => (u(), m("div", {
476
- class: $(["inline-block relative", V.$attrs.class]),
510
+ }), (D, B) => (i(), m("div", {
477
511
  ref_key: "container",
478
- ref: I
512
+ ref: w,
513
+ class: C(["inline-block relative", D.$attrs.class])
479
514
  }, [
480
- v("input", j({
515
+ v("input", R({
481
516
  ref_key: "input",
482
- ref: S,
517
+ ref: g,
483
518
  class: "block pr-10 w-full form-input focus:border-vxvue",
484
519
  value: e.modelValue
485
- }, Y.value, {
486
- onInput: D[0] || (D[0] = (q) => F(q.target.value)),
520
+ }, F.value, {
521
+ onInput: B[0] || (B[0] = (G) => N(G.target.value)),
487
522
  onKeydown: [
488
523
  ae(le, ["enter"]),
489
- ae(R, ["esc"]),
490
- ae(C, ["tab"]),
491
- ae(N(y, ["prevent"]), ["up"]),
492
- ae(N(T, ["prevent"]), ["down"])
524
+ ae(H, ["esc"]),
525
+ ae(V, ["tab"]),
526
+ ae(E(y, ["prevent"]), ["up"]),
527
+ ae(E(O, ["prevent"]), ["down"])
493
528
  ],
494
- onFocus: p,
495
- onBlur: b
529
+ onFocus: h,
530
+ onBlur: p
496
531
  }), null, 16, Qe),
497
532
  v("span", et, [
498
- f.value ? (u(), H(we, {
533
+ f.value ? (i(), W(we, {
499
534
  key: 0,
500
535
  class: "size-5"
501
- })) : P("", !0)
536
+ })) : I("", !0)
502
537
  ]),
503
- n.value.length ? (u(), m("div", j({
538
+ s.value.length ? (i(), m("div", R({
504
539
  key: 0,
505
540
  ref_key: "resultList",
506
- ref: g
507
- }, G.value, {
541
+ ref: x
542
+ }, Z.value, {
508
543
  onClick: Q,
509
- onMousedown: D[1] || (D[1] = N(() => {
544
+ onMousedown: B[1] || (B[1] = E(() => {
510
545
  }, ["prevent"]))
511
546
  }), [
512
- (u(!0), m(O, null, _(n.value, (q, W) => (u(), m("div", { "data-result-index": W }, [
513
- A(V.$slots, "result", {
514
- result: q,
515
- props: z.value[W]
547
+ (i(!0), m(z, null, j(s.value, (G, U) => (i(), m("div", { "data-result-index": U }, [
548
+ P(D.$slots, "result", {
549
+ result: G,
550
+ props: M.value[U]
516
551
  }, () => [
517
- (u(), m("div", j({
518
- key: z.value[W].id,
552
+ (i(), m("div", R({
553
+ key: M.value[U].id,
519
554
  ref_for: !0
520
- }, z.value[W]), B(e.getResultValue(q)), 17))
555
+ }, M.value[U]), T(e.getResultValue(G)), 17))
521
556
  ])
522
557
  ], 8, tt))), 256))
523
- ], 16)) : P("", !0)
558
+ ], 16)) : I("", !0)
524
559
  ], 2));
525
560
  }
526
561
  }), lt = {
527
562
  key: 0,
528
- class: "fixed inset-0 z-50 bg-black bg-opacity-50 backdrop-blur-sm",
563
+ class: "fixed inset-0 z-50 bg-black/50 backdrop-blur-xs",
529
564
  "aria-hidden": "true"
530
565
  }, at = {
531
566
  key: 0,
532
567
  class: "overflow-y-auto fixed inset-0 z-50"
533
- }, st = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, nt = { key: 0 }, ot = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, rt = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, ut = { class: "flex flex-row items-center" }, it = { class: "flex-shrink-0" }, dt = { class: "flex-grow text-center" }, ct = ["onClick"], Sl = {
568
+ }, st = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, nt = { key: 0 }, ot = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded-sm shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, rt = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, ut = { class: "flex flex-row items-center" }, it = { class: "shrink-0" }, dt = { class: "grow text-center" }, ct = ["onClick"], $l = {
534
569
  __name: "confirm",
535
570
  props: {
536
571
  buttons: {
537
572
  type: [Object, Array],
538
- default: { label: "Ok" },
573
+ default: () => ({ label: "Ok" }),
539
574
  validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((d) => d.label !== "undefined" && d.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
540
575
  },
541
576
  headerClass: {
@@ -548,59 +583,60 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
548
583
  }
549
584
  },
550
585
  setup(e, { expose: d }) {
551
- const t = e, s = w(""), a = w(""), l = w(!1);
552
- let c = null, n = null;
553
- const o = L(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), i = w(null), r = (x, h) => {
554
- l.value = !1, x.value !== void 0 ? x.value ? c() : n() : h ? n() : c();
586
+ const t = e, o = $(""), a = $(""), l = $(!1);
587
+ let c = null, s = null;
588
+ const n = L(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), r = $(null), u = (b, k) => {
589
+ l.value = !1, b.value !== void 0 ? b.value ? c() : s() : k ? s() : c();
555
590
  };
556
- return d({ open: (x, h) => (s.value = x, a.value = h, l.value = !0, ve(() => i.value.firstElementChild.focus()), new Promise((g, S) => {
557
- c = g, n = S;
558
- })) }), (x, h) => (u(), m(O, null, [
559
- l.value ? (u(), m("div", lt)) : P("", !0),
560
- E(ce, { name: "appear" }, {
591
+ return d({ open: (b, k) => (o.value = b, a.value = k, l.value = !0, me(() => r.value.firstElementChild.focus()), new Promise((x, g) => {
592
+ c = x, s = g;
593
+ })) }), (b, k) => (i(), m(z, null, [
594
+ l.value ? (i(), m("div", lt)) : I("", !0),
595
+ Y(ve, { name: "appear" }, {
561
596
  default: te(() => [
562
- l.value ? (u(), m("div", at, [
597
+ l.value ? (i(), m("div", at, [
563
598
  v("div", st, [
564
- l.value ? (u(), m("div", nt, [
565
- h[0] || (h[0] = v("span", {
599
+ l.value ? (i(), m("div", nt, [
600
+ k[0] || (k[0] = v("span", {
566
601
  class: "hidden sm:inline-block sm:h-screen sm:align-middle",
567
602
  "aria-hidden": "true"
568
603
  }, "​", -1)),
569
604
  v("div", ot, [
570
- s.value || x.$slots.title ? (u(), m("h3", {
605
+ o.value || b.$slots.title ? (i(), m("h3", {
571
606
  key: 0,
572
- class: $(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
607
+ class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
573
608
  }, [
574
- A(x.$slots, "title", {}, () => [
575
- X(B(s.value), 1)
609
+ P(b.$slots, "title", {}, () => [
610
+ J(T(o.value), 1)
576
611
  ])
577
- ], 2)) : P("", !0),
612
+ ], 2)) : I("", !0),
578
613
  v("div", rt, [
579
614
  v("div", ut, [
580
615
  v("div", it, [
581
- A(x.$slots, "icon")
616
+ P(b.$slots, "icon")
582
617
  ]),
583
618
  v("p", dt, [
584
- A(x.$slots, "default", {}, () => [
585
- X(B(a.value), 1)
619
+ P(b.$slots, "default", {}, () => [
620
+ J(T(a.value), 1)
586
621
  ])
587
622
  ])
588
623
  ]),
589
624
  v("div", {
590
- class: "flex justify-center mt-5 space-x-2 sm:mt-6",
591
625
  ref_key: "buttonsContainer",
592
- ref: i
626
+ ref: r,
627
+ class: "flex justify-center mt-5 space-x-2 sm:mt-6"
593
628
  }, [
594
- (u(!0), m(O, null, _(o.value, (g, S) => (u(), m("button", {
595
- class: $([e.buttonClass, g.class]),
596
- onClick: N((I) => r(g, S), ["prevent"])
597
- }, B(g.label), 11, ct))), 256))
629
+ (i(!0), m(z, null, j(n.value, (x, g) => (i(), m("button", {
630
+ key: x.label,
631
+ class: C([e.buttonClass, x.class]),
632
+ onClick: E((w) => u(x, g), ["prevent"])
633
+ }, T(x.label), 11, ct))), 128))
598
634
  ], 512)
599
635
  ])
600
636
  ])
601
- ])) : P("", !0)
637
+ ])) : I("", !0)
602
638
  ])
603
- ])) : P("", !0)
639
+ ])) : I("", !0)
604
640
  ]),
605
641
  _: 3
606
642
  })
@@ -608,33 +644,33 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
608
644
  }
609
645
  };
610
646
  function vt(e, d) {
611
- const t = w(!1), s = ge(d);
612
- let a, l = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
613
- if ((a = s.match(/\bd\b/gi)) && a.length === 1)
647
+ const t = $(!1), o = _(d);
648
+ let a, l = o.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
649
+ if ((a = o.match(/\bd\b/gi)) && a.length === 1)
614
650
  l = l.replace("d", "(\\d{1,2})");
615
- else if ((a = s.match(/\bdd\b/gi)) && a.length === 1)
651
+ else if ((a = o.match(/\bdd\b/gi)) && a.length === 1)
616
652
  l = l.replace("dd", "(\\d{2})");
617
653
  else
618
654
  return { date: t };
619
- if (c.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (a = s.match(/\bm\b/gi)) && a.length === 1)
655
+ if (c.push({ srcPos: o.toLowerCase().indexOf("d"), destPos: 2 }), (a = o.match(/\bm\b/gi)) && a.length === 1)
620
656
  l = l.replace("m", "(\\d{1,2})");
621
- else if ((a = s.match(/\bmm\b/gi)) && a.length === 1)
657
+ else if ((a = o.match(/\bmm\b/gi)) && a.length === 1)
622
658
  l = l.replace("mm", "(\\d{2})");
623
659
  else
624
660
  return { date: t };
625
- if (c.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (a = s.match(/\byyyy\b/gi)) && a.length === 1)
661
+ if (c.push({ srcPos: o.toLowerCase().indexOf("m"), destPos: 1 }), (a = o.match(/\byyyy\b/gi)) && a.length === 1)
626
662
  l = l.replace("yyyy", "(\\d{4})");
627
663
  else
628
664
  return { date: t };
629
- if (c.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(a = ge(e).match(l)))
665
+ if (c.push({ srcPos: o.toLowerCase().indexOf("y"), destPos: 0 }), !(a = _(e).match(l)))
630
666
  return { date: t };
631
- a.shift(), c.sort((r, f) => r.srcPos < f.srcPos ? -1 : 1);
632
- let n = [], o, i;
633
- for (; o = a.shift(); )
634
- i = c.shift(), n[i.destPos] = o;
635
- return n = Date.parse(n.join("-")), n && (n = new Date(n), t.value = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0)), { date: t };
667
+ a.shift(), c.sort((u, f) => u.srcPos < f.srcPos ? -1 : 1);
668
+ let s = [], n, r;
669
+ for (; n = a.shift(); )
670
+ r = c.shift(), s[r.destPos] = n;
671
+ return s = Date.parse(s.join("-")), s && (s = new Date(s), t.value = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 0, 0, 0)), { date: t };
636
672
  }
637
- const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
673
+ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
638
674
  __name: "date-input",
639
675
  props: {
640
676
  outputFormat: { type: String, default: "YYYY-MM-DD" },
@@ -644,54 +680,55 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
644
680
  },
645
681
  emits: ["update:modelValue", "toggle-datepicker"],
646
682
  setup(e, { emit: d }) {
647
- const t = d, s = e, a = w(""), l = L(() => s.modelValue ? pe(s.modelValue, s.outputFormat) : ""), c = L(() => {
648
- let n = Object.assign({}, U());
649
- return delete n.class, n;
683
+ const t = d, o = e, a = $(""), l = L(() => o.modelValue ? ge(o.modelValue, o.outputFormat) : ""), c = L(() => {
684
+ let s = Object.assign({}, q());
685
+ return delete s.class, s;
650
686
  });
651
- return K(() => s.modelValue, (n) => a.value = n ? pe(n, s.outputFormat) : ""), (n, o) => (u(), m("div", {
652
- class: $(["inline-block relative", n.$attrs.class])
687
+ return X(() => o.modelValue, (s) => a.value = s ? ge(s, o.outputFormat) : ""), (s, n) => (i(), m("div", {
688
+ class: C(["inline-block relative", s.$attrs.class])
653
689
  }, [
654
- l.value ? (u(), m("div", mt, [
690
+ l.value ? (i(), m("div", mt, [
655
691
  v("div", {
656
- class: $(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
692
+ class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
657
693
  }, [
658
- v("span", ft, B(l.value), 1),
659
- c.value.disabled ? P("", !0) : (u(), m("button", {
694
+ v("span", ft, T(l.value), 1),
695
+ c.value.disabled ? I("", !0) : (i(), m("button", {
660
696
  key: 0,
661
- onClick: o[0] || (o[0] = (i) => t("update:modelValue", null)),
662
- class: "inline-flex flex-shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-none size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
697
+ class: "inline-flex shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-hidden size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700",
698
+ onClick: n[0] || (n[0] = (r) => t("update:modelValue", null))
663
699
  }, [
664
- E(M(fe), { class: "size-4" })
700
+ Y(A(he), { class: "size-4" })
665
701
  ]))
666
702
  ], 2)
667
- ])) : xe((u(), m("input", j({
703
+ ])) : xe((i(), m("input", R({
668
704
  key: 1,
705
+ "onUpdate:modelValue": n[1] || (n[1] = (r) => a.value = r),
669
706
  type: "text",
670
- class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showToggle }],
671
- "onUpdate:modelValue": o[1] || (o[1] = (i) => a.value = i),
672
- onBlur: o[2] || (o[2] = (i) => {
673
- var r;
674
- return t("update:modelValue", ((r = M(vt)(a.value, s.inputFormat).date) == null ? void 0 : r.value) || null);
707
+ class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showToggle }]
708
+ }, c.value, {
709
+ onBlur: n[2] || (n[2] = (r) => {
710
+ var u;
711
+ return t("update:modelValue", ((u = A(vt)(a.value, o.inputFormat).date) == null ? void 0 : u.value) || null);
675
712
  }),
676
- onInput: o[3] || (o[3] = N(() => {
713
+ onInput: n[3] || (n[3] = E(() => {
677
714
  }, ["prevent"]))
678
- }, c.value), null, 16)), [
679
- [Be, a.value]
715
+ }), null, 16)), [
716
+ [Ae, a.value]
680
717
  ]),
681
- e.showToggle ? (u(), m("button", {
718
+ e.showToggle ? (i(), m("button", {
682
719
  key: 2,
683
- class: $(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700", c.value.disabled ? "cursor-not-allowed" : "hover:text-vxvue"]),
684
- disabled: c.value.disabled,
685
- onClick: o[4] || (o[4] = N((i) => t("toggle-datepicker"), ["stop"])),
686
720
  ref: "toggleButton",
687
- "aria-label": "datepicker-toggle"
721
+ class: C(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700", c.value.disabled ? "cursor-not-allowed" : "hover:text-vxvue"]),
722
+ disabled: c.value.disabled,
723
+ "aria-label": "datepicker-toggle",
724
+ onClick: n[4] || (n[4] = E((r) => t("toggle-datepicker"), ["stop"]))
688
725
  }, [
689
- E(M(Ie), { class: "size-6" })
690
- ], 10, ht)) : P("", !0),
691
- A(n.$slots, "default")
726
+ Y(A(Le), { class: "size-6" })
727
+ ], 10, ht)) : I("", !0),
728
+ P(s.$slots, "default")
692
729
  ], 2));
693
730
  }
694
- }), pt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, bt = { class: "flex justify-between w-1/2" }, xt = { class: "flex justify-between w-1/2" }, yt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, wt = ["disabled", "onClick"], kt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, $t = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, St = { class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue" }, Ct = ["onClick"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
731
+ }), gt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, bt = { class: "flex justify-between w-1/2" }, xt = { class: "flex justify-between w-1/2" }, yt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, wt = ["disabled", "onClick"], kt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, $t = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, St = ["onClick"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
695
732
  __name: "datepicker",
696
733
  props: {
697
734
  modelValue: { type: [Date, Array], default: null, validator: (e, d) => e instanceof Date && d.maxNumberOfValues === 1 || e.every((t) => t instanceof Date || t === null) && e.length <= d.maxNumberOfValues },
@@ -707,175 +744,177 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
707
744
  },
708
745
  emits: ["update:modelValue", "month-change", "year-change"],
709
746
  setup(e, { emit: d }) {
710
- const t = e, s = d, a = (() => {
711
- const p = /* @__PURE__ */ new Date();
712
- return new Date(p.getFullYear(), p.getMonth(), p.getDate());
713
- })(), l = w(null), c = w([]), n = w(!1), o = w("days"), i = w(0), r = w({ horiz: "left-0", vert: "top-0" }), f = w(null), x = w(null), h = w(null), g = L(() => t.hasInput && t.maxNumberOfValues === 1), S = L(() => g.value ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), I = L(() => {
714
- const p = [], b = l.value.getFullYear(), y = l.value.getMonth(), T = new Date(b, y + 1, 0), R = new Date(b, y, 0).getDay() + 1 - t.startOfWeekIndex, le = (6 + t.startOfWeekIndex - T.getDay()) % 7;
715
- for (let Q = -R, V = T.getDate() + le; Q < V; ++Q)
716
- p.push(new Date(b, y, Q + 1));
717
- return p;
718
- }), z = L(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames);
719
- K(() => t.modelValue, (p) => {
720
- if (p)
721
- if (Array.isArray(p)) {
722
- const b = [], y = c.value;
723
- p.forEach((T) => {
724
- T && b.push(new Date(T.getFullYear(), T.getMonth(), T.getDate()));
725
- }), (b.length !== y.length || ![.../* @__PURE__ */ new Set([...b, ...y])].every((T) => b.filter((R) => R.getTime() === T.getTime()).length === y.filter((R) => R.getTime() === T.getTime()).length)) && (c.value = b, l.value = new Date((b[0] || a).getTime()), l.value.setDate(1));
747
+ const t = e, o = d, a = (() => {
748
+ const h = /* @__PURE__ */ new Date();
749
+ return new Date(h.getFullYear(), h.getMonth(), h.getDate());
750
+ })(), l = $(null), c = $([]), s = $(!1), n = $("days"), r = $(0), u = $({ horiz: "left-0", vert: "top-0" }), f = $(null), b = $(null), k = $(null), x = L(() => t.hasInput && t.maxNumberOfValues === 1), g = L(() => x.value ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), w = L(() => {
751
+ const h = [], p = l.value.getFullYear(), y = l.value.getMonth(), O = new Date(p, y + 1, 0), H = new Date(p, y, 0).getDay() + 1 - t.startOfWeekIndex, le = (6 + t.startOfWeekIndex - O.getDay()) % 7;
752
+ for (let Q = -H, D = O.getDate() + le; Q < D; ++Q)
753
+ h.push(new Date(p, y, Q + 1));
754
+ return h;
755
+ }), M = L(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames);
756
+ X(() => t.modelValue, (h) => {
757
+ if (h)
758
+ if (Array.isArray(h)) {
759
+ const p = [], y = c.value;
760
+ h.forEach((O) => {
761
+ O && p.push(new Date(O.getFullYear(), O.getMonth(), O.getDate()));
762
+ }), (p.length !== y.length || ![.../* @__PURE__ */ new Set([...p, ...y])].every((O) => p.filter((H) => H.getTime() === O.getTime()).length === y.filter((H) => H.getTime() === O.getTime()).length)) && (c.value = p, l.value = new Date((p[0] || a).getTime()), l.value.setDate(1));
726
763
  } else
727
- c.value = [new Date(p.getFullYear(), p.getMonth(), p.getDate())], l.value = new Date(p.getFullYear(), p.getMonth(), 1);
764
+ c.value = [new Date(h.getFullYear(), h.getMonth(), h.getDate())], l.value = new Date(h.getFullYear(), h.getMonth(), 1);
728
765
  else
729
766
  c.value = [], l.value = new Date(a.getFullYear(), a.getMonth(), 1);
730
- }, { immediate: !0 }), K(() => t.shownMonth, (p) => {
731
- l.value = new Date((p || a).getTime()), l.value.setDate(1);
732
- }, { immediate: !0 }), K(n, (p) => {
733
- p && g.value && ve(() => {
734
- const b = f.value.$el.getBoundingClientRect(), y = x.value.getBoundingClientRect();
735
- r.value = {
736
- horiz: b.right - y.width < 0 ? "left-0" : "right-0",
737
- vert: b.bottom + y.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
767
+ }, { immediate: !0 }), X(() => t.shownMonth, (h) => {
768
+ l.value = new Date((h || a).getTime()), l.value.setDate(1);
769
+ }, { immediate: !0 }), X(s, (h) => {
770
+ h && x.value && me(() => {
771
+ const p = f.value.$el.getBoundingClientRect(), y = b.value.getBoundingClientRect();
772
+ u.value = {
773
+ horiz: p.right - y.width < 0 ? "left-0" : "right-0",
774
+ vert: p.bottom + y.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
738
775
  };
739
776
  });
740
- }), he(x, () => {
741
- n.value = !1, o.value = "days";
742
- }, { ignore: [h] });
743
- const Y = (p) => {
744
- l.value = new Date(l.value.getFullYear(), p, 1), s("month-change", l.value);
745
- }, G = (p) => {
746
- l.value = new Date(p, l.value.getMonth(), 1), s("year-change", l.value);
747
- }, Z = (p) => s("update:modelValue", p), k = (p) => {
748
- if (n.value = !1, t.maxNumberOfValues === 1)
749
- s("update:modelValue", p);
777
+ }), pe(b, () => {
778
+ s.value = !1, n.value = "days";
779
+ }, { ignore: [k] });
780
+ const F = (h) => {
781
+ l.value = new Date(l.value.getFullYear(), h, 1), o("month-change", l.value);
782
+ }, Z = (h) => {
783
+ l.value = new Date(h, l.value.getMonth(), 1), o("year-change", l.value);
784
+ }, K = (h) => o("update:modelValue", h), S = (h) => {
785
+ if (s.value = !1, t.maxNumberOfValues === 1)
786
+ o("update:modelValue", h);
750
787
  else {
751
- const b = c.value;
752
- let y = b.findIndex((T) => T.getTime() === p.getTime());
753
- y !== -1 ? b.splice(y, 1) : b.length < t.maxNumberOfValues && b.push(p), s("update:modelValue", b);
788
+ const p = c.value;
789
+ let y = p.findIndex((O) => O.getTime() === h.getTime());
790
+ y !== -1 ? p.splice(y, 1) : p.length < t.maxNumberOfValues && p.push(h), o("update:modelValue", p);
754
791
  }
755
- }, C = (p) => c.value.find((b) => (b == null ? void 0 : b.getTime()) === p.getTime()), F = (p) => {
756
- const b = p.getMonth() !== l.value.getMonth(), y = C(p), T = p.getTime() === a.getTime(), R = t.validFrom && t.validFrom > p || t.validUntil && t.validUntil < p, le = !y && t.maxNumberOfValues > 1 && c.value.length === t.maxNumberOfValues, Q = t.highlightRange && p > Math.min(...c.value) && p < Math.max(...c.value);
792
+ }, V = (h) => c.value.find((p) => (p == null ? void 0 : p.getTime()) === h.getTime()), N = (h) => {
793
+ const p = h.getMonth() !== l.value.getMonth(), y = V(h), O = h.getTime() === a.getTime(), H = t.validFrom && t.validFrom > h || t.validUntil && t.validUntil < h, le = !y && t.maxNumberOfValues > 1 && c.value.length === t.maxNumberOfValues, Q = t.highlightRange && h > Math.min(...c.value) && h < Math.max(...c.value);
757
794
  return {
758
- "cursor-not-allowed": R || le,
759
- "text-vxvue-700": !R && !b && !T && !y,
760
- "text-error": R && !b,
761
- "text-gray-400": b && !T && !y,
762
- "bg-vxvue-alt-300 font-bold": T && !y,
795
+ "cursor-not-allowed": H || le,
796
+ "text-vxvue-700": !H && !p && !O && !y,
797
+ "text-error": H && !p,
798
+ "text-gray-400": p && !O && !y,
799
+ "bg-vxvue-alt-300 font-bold": O && !y,
763
800
  "bg-vxvue-700 text-white": y,
764
- "hover:ring-2 hover:ring-vxvue": !R,
765
- "bg-vxvue-100/50": Q && !T && !y
801
+ "hover:ring-2 hover:ring-vxvue": !H,
802
+ "bg-vxvue-100/50": Q && !O && !y
766
803
  };
767
804
  };
768
- return me(() => {
769
- var p;
770
- return h.value = (p = f.value) == null ? void 0 : p.$refs.toggleButton;
771
- }), (p, b) => (u(), m("div", {
772
- class: $(["relative", p.$attrs.class])
805
+ return fe(() => {
806
+ var h;
807
+ return k.value = (h = f.value) == null ? void 0 : h.$refs.toggleButton;
808
+ }), (h, p) => (i(), m("div", {
809
+ class: C(["relative", h.$attrs.class])
773
810
  }, [
774
- g.value ? (u(), H(gt, j({
775
- key: 0,
776
- modelValue: c.value[0],
777
- "show-toggle": !0,
778
- onToggleDatepicker: b[0] || (b[0] = (y) => n.value = !n.value),
779
- "onUpdate:modelValue": Z
780
- }, p.$attrs, {
811
+ x.value ? (i(), W(pt, R({ key: 0 }, h.$attrs, {
781
812
  ref_key: "input",
782
813
  ref: f,
783
- class: "w-full"
814
+ "model-value": c.value[0],
815
+ "show-toggle": !0,
816
+ class: "w-full",
817
+ onToggleDatepicker: p[0] || (p[0] = (y) => s.value = !s.value),
818
+ "onUpdate:modelValue": K
784
819
  }), {
785
820
  default: te(() => [
786
- A(p.$slots, "default")
821
+ P(h.$slots, "default")
787
822
  ]),
788
823
  _: 3
789
- }, 16, ["modelValue"])) : P("", !0),
790
- v("div", j({ class: "overflow-hidden z-10 bg-white rounded shadow-md min-w-72 sm:min-w-80" }, S.value, {
824
+ }, 16, ["model-value"])) : I("", !0),
825
+ v("div", R(g.value, {
791
826
  ref_key: "calendar",
792
- ref: x,
793
- class: [r.value.horiz, r.value.vert]
827
+ ref: b,
828
+ class: ["overflow-hidden z-10 bg-white rounded-sm shadow-md min-w-72 sm:min-w-80", [u.value.horiz, u.value.vert]]
794
829
  }), [
795
- o.value === "days" ? (u(), m(O, { key: 0 }, [
796
- v("div", pt, [
830
+ n.value === "days" ? (i(), m(z, { key: 0 }, [
831
+ v("div", gt, [
797
832
  v("div", bt, [
798
833
  v("button", {
799
- onClick: b[1] || (b[1] = N((y) => Y(l.value.getMonth() - 1), ["stop"])),
800
- class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
834
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
835
+ onClick: p[1] || (p[1] = E((y) => F(l.value.getMonth() - 1), ["stop"]))
801
836
  }, [
802
- E(M(re), { class: "size-6" })
837
+ Y(A(ue), { class: "size-6" })
803
838
  ]),
804
- v("span", null, B(l.value.toLocaleString(e.locale, { month: "long" })), 1),
839
+ v("span", null, T(l.value.toLocaleString(e.locale, { month: "long" })), 1),
805
840
  v("button", {
806
- onClick: b[2] || (b[2] = N((y) => Y(l.value.getMonth() + 1), ["stop"])),
807
- class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
841
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
842
+ onClick: p[2] || (p[2] = E((y) => F(l.value.getMonth() + 1), ["stop"]))
808
843
  }, [
809
- E(M(ne), { class: "size-6" })
844
+ Y(A(oe), { class: "size-6" })
810
845
  ])
811
846
  ]),
812
847
  v("div", xt, [
813
848
  v("button", {
814
- onClick: b[3] || (b[3] = N((y) => G(l.value.getFullYear() - 1), ["stop"])),
815
- class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
849
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
850
+ onClick: p[3] || (p[3] = E((y) => Z(l.value.getFullYear() - 1), ["stop"]))
816
851
  }, [
817
- E(M(re), { class: "size-6" })
852
+ Y(A(ue), { class: "size-6" })
818
853
  ]),
819
854
  v("button", {
820
855
  class: "text-vxvue-100 hover:text-vxvue-50",
821
- onClick: b[4] || (b[4] = (y) => {
822
- o.value = "years", i.value = l.value.getFullYear();
856
+ onClick: p[4] || (p[4] = (y) => {
857
+ n.value = "years", r.value = l.value.getFullYear();
823
858
  })
824
- }, B(l.value.getFullYear()), 1),
859
+ }, T(l.value.getFullYear()), 1),
825
860
  v("button", {
826
- onClick: b[5] || (b[5] = N((y) => G(l.value.getFullYear() + 1), ["stop"])),
827
- class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
861
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
862
+ onClick: p[5] || (p[5] = E((y) => Z(l.value.getFullYear() + 1), ["stop"]))
828
863
  }, [
829
- E(M(ne), { class: "size-6" })
864
+ Y(A(oe), { class: "size-6" })
830
865
  ])
831
866
  ])
832
867
  ]),
833
868
  v("div", yt, [
834
- (u(!0), m(O, null, _(z.value, (y, T) => (u(), m("div", {
835
- class: "py-2 text-center bg-gray-200",
836
- key: T
837
- }, B(y), 1))), 128)),
838
- (u(!0), m(O, null, _(I.value, (y) => (u(), m("button", {
839
- class: $(["py-2 rounded-sm block text-center", F(y)]),
840
- disabled: e.validFrom && e.validFrom > y || e.validUntil && e.validUntil < y || e.maxNumberOfValues > 1 && c.value.length === e.maxNumberOfValues && !C(y),
841
- onClick: N((T) => k(y), ["stop"])
842
- }, B(y.getDate()), 11, wt))), 256))
869
+ (i(!0), m(z, null, j(M.value, (y, O) => (i(), m("div", {
870
+ key: O,
871
+ class: "py-2 text-center bg-gray-200"
872
+ }, T(y), 1))), 128)),
873
+ (i(!0), m(z, null, j(w.value, (y) => (i(), m("button", {
874
+ key: y,
875
+ class: C(["py-2 rounded-xs block text-center", N(y)]),
876
+ disabled: e.validFrom && e.validFrom > y || e.validUntil && e.validUntil < y || e.maxNumberOfValues > 1 && c.value.length === e.maxNumberOfValues && !V(y),
877
+ onClick: E((O) => S(y), ["stop"])
878
+ }, T(y.getDate()), 11, wt))), 128))
843
879
  ])
844
- ], 64)) : P("", !0),
845
- o.value === "years" ? (u(), m(O, { key: 1 }, [
880
+ ], 64)) : I("", !0),
881
+ n.value === "years" ? (i(), m(z, { key: 1 }, [
846
882
  v("div", kt, [
847
883
  v("button", {
848
- onClick: b[6] || (b[6] = N((y) => i.value -= 10, ["stop"])),
849
- class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
884
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
885
+ onClick: p[6] || (p[6] = E((y) => r.value -= 10, ["stop"]))
850
886
  }, [
851
- E(M(re), { class: "size-6" })
887
+ Y(A(ue), { class: "size-6" })
852
888
  ]),
853
- v("span", null, B(i.value) + " - " + B(i.value + 9), 1),
889
+ v("span", null, T(r.value) + " - " + T(r.value + 9), 1),
854
890
  v("button", {
855
- onClick: b[7] || (b[7] = N((y) => i.value += 10, ["stop"])),
856
- class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
891
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
892
+ onClick: p[7] || (p[7] = E((y) => r.value += 10, ["stop"]))
857
893
  }, [
858
- E(M(ne), { class: "size-6" })
894
+ Y(A(oe), { class: "size-6" })
859
895
  ])
860
896
  ]),
861
897
  v("div", $t, [
862
- (u(), m(O, null, _(10, (y) => v("div", St, [
898
+ (i(), m(z, null, j(10, (y) => v("div", {
899
+ key: y,
900
+ class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"
901
+ }, [
863
902
  v("button", {
864
903
  class: "py-2 px-3",
865
- onClick: N((T) => {
866
- G(i.value + y - 1), o.value = "days";
904
+ onClick: E((O) => {
905
+ Z(r.value + y - 1), n.value = "days";
867
906
  }, ["stop"])
868
- }, B(i.value + y - 1), 9, Ct)
907
+ }, T(r.value + y - 1), 9, St)
869
908
  ])), 64))
870
909
  ])
871
- ], 64)) : P("", !0)
910
+ ], 64)) : I("", !0)
872
911
  ], 16)
873
912
  ], 2));
874
913
  }
875
- }), Vt = ["for"], Mt = ["id", "multiple", "accept"], Vl = {
914
+ }), Ct = ["for"], Mt = ["id", "multiple", "accept"], Cl = {
876
915
  __name: "form-file-button",
877
916
  props: {
878
- modelValue: { type: Array },
917
+ modelValue: { type: Array, default: () => [] },
879
918
  accept: { type: String, default: "*" },
880
919
  multiple: { type: Boolean, default: !1 },
881
920
  name: { type: String, default: "file" },
@@ -883,71 +922,76 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
883
922
  },
884
923
  emits: ["update:modelValue", "form-data"],
885
924
  setup(e, { emit: d }) {
886
- const t = d, s = e, a = (c) => {
887
- const n = new FormData();
888
- for (let o of c)
889
- n.append(s.name, o, o.name);
890
- return n;
925
+ const t = d, o = e, a = (c) => {
926
+ const s = new FormData();
927
+ for (let n of c)
928
+ s.append(o.name, n, n.name);
929
+ return s;
891
930
  }, l = (c) => {
892
- const n = c.target.files || c.dataTransfer.files;
893
- if (n) {
894
- const o = [...n];
895
- t("update:modelValue", o), t("form-data", a(o));
931
+ const s = c.target.files || c.dataTransfer.files;
932
+ if (s) {
933
+ const n = [...s];
934
+ t("update:modelValue", n), t("form-data", a(n));
896
935
  }
897
936
  };
898
- return (c, n) => (u(), m("label", { for: e.id }, [
899
- A(c.$slots, "default", {}, () => [
900
- n[0] || (n[0] = X("Upload"))
937
+ return (c, s) => (i(), m("label", { for: e.id }, [
938
+ P(c.$slots, "default", {}, () => [
939
+ s[0] || (s[0] = J("Upload"))
901
940
  ]),
902
941
  v("input", {
903
- type: "file",
904
942
  id: e.id,
943
+ type: "file",
905
944
  multiple: e.multiple,
906
945
  accept: e.accept,
907
- onChange: l,
908
- class: "hidden"
946
+ class: "hidden",
947
+ onChange: l
909
948
  }, null, 40, Mt)
910
- ], 8, Vt));
949
+ ], 8, Ct));
911
950
  }
912
- }, Dt = ["value"], At = {
951
+ }, Vt = ["value"], Dt = {
913
952
  key: 0,
914
953
  disabled: "",
915
954
  value: ""
916
- }, Bt = ["value", "selected"], Lt = {
955
+ }, At = ["selected", "value"], Bt = {
917
956
  __name: "form-select",
918
- props: { options: Array, modelValue: [String, Number], disabledLabel: String },
957
+ props: {
958
+ options: { type: Array, default: () => [] },
959
+ modelValue: { type: [String, Number], default: null },
960
+ disabledLabel: { type: String, default: "" }
961
+ },
919
962
  emits: ["update:modelValue"],
920
963
  setup(e, { emit: d }) {
921
964
  const t = d;
922
- return (s, a) => (u(), m("select", j(s.$attrs, {
965
+ return (o, a) => (i(), m("select", R(o.$attrs, {
923
966
  value: e.modelValue,
924
967
  class: "form-select",
925
968
  onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
926
969
  }), [
927
- e.disabledLabel ? (u(), m("option", At, B(e.disabledLabel), 1)) : P("", !0),
928
- (u(!0), m(O, null, _(e.options, (l) => (u(), m("option", {
929
- value: l.key !== void 0 ? l.key : l.label || l,
930
- selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
931
- }, B(l.label || l), 9, Bt))), 256))
932
- ], 16, Dt));
970
+ e.disabledLabel ? (i(), m("option", Dt, T(e.disabledLabel), 1)) : I("", !0),
971
+ (i(!0), m(z, null, j(e.options, (l) => (i(), m("option", {
972
+ key: l.key !== void 0 ? l.key : l.label || l,
973
+ selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue,
974
+ value: l.key !== void 0 ? l.key : l.label || l
975
+ }, T(l.label || l), 9, At))), 128))
976
+ ], 16, Vt));
933
977
  }
934
- }, Pt = ["aria-checked", "aria-label"], Tt = ["d"], It = ["checked"], Ml = {
978
+ }, Pt = ["aria-checked", "aria-label"], Tt = ["d"], Lt = ["checked"], Ml = {
935
979
  __name: "form-switch",
936
980
  props: { modelValue: Boolean },
937
981
  emits: ["update:modelValue"],
938
982
  setup(e, { emit: d }) {
939
- const t = d, s = L(() => {
940
- let l = Object.assign({}, U());
983
+ const t = d, o = L(() => {
984
+ let l = Object.assign({}, q());
941
985
  return delete l.class, l;
942
- }), a = L(() => U().disabled || U().disabled === "");
943
- return (l, c) => (u(), m("label", {
944
- class: $(l.$attrs.class),
986
+ }), a = L(() => q().disabled || q().disabled === "");
987
+ return (l, c) => (i(), m("label", {
988
+ class: C(l.$attrs.class),
945
989
  tabindex: "0"
946
990
  }, [
947
991
  v("span", {
948
992
  role: "switch",
949
- class: $([
950
- "inline-flex relative flex-shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-vxvue",
993
+ class: C([
994
+ "inline-flex relative shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-vxvue",
951
995
  a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
952
996
  ]),
953
997
  "aria-checked": e.modelValue,
@@ -955,20 +999,20 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
955
999
  }, [
956
1000
  v("span", {
957
1001
  "aria-hidden": "true",
958
- class: $([
959
- "block relative size-5 rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none",
1002
+ class: C([
1003
+ "block relative size-5 rounded-full ring-0 shadow-sm transition duration-200 ease-in-out transform pointer-events-none",
960
1004
  e.modelValue ? "translate-x-5" : "translate-x-0",
961
1005
  a.value ? "bg-slate-100" : "bg-white"
962
1006
  ])
963
1007
  }, [
964
- A(l.$slots, "handle", {}, () => [
965
- (u(), m("svg", {
1008
+ P(l.$slots, "handle", {}, () => [
1009
+ (i(), m("svg", {
966
1010
  xmlns: "http://www.w3.org/2000/svg",
967
1011
  fill: "none",
968
1012
  viewBox: "0 0 24 24",
969
1013
  "stroke-width": "5",
970
1014
  stroke: "currentColor",
971
- class: $(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3", e.modelValue && !a.value ? "text-vxvue" : "text-slate-300"])
1015
+ class: C(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3", e.modelValue && !a.value ? "text-vxvue" : "text-slate-300"])
972
1016
  }, [
973
1017
  v("path", {
974
1018
  "stroke-linecap": "round",
@@ -978,78 +1022,74 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
978
1022
  ], 2))
979
1023
  ])
980
1024
  ], 2),
981
- v("input", j(s.value, {
1025
+ v("input", R(o.value, {
982
1026
  checked: e.modelValue,
983
1027
  class: "hidden",
984
1028
  value: "1",
985
1029
  type: "checkbox",
986
- onChange: c[0] || (c[0] = (n) => t("update:modelValue", n.target.checked))
987
- }), null, 16, It)
1030
+ onChange: c[0] || (c[0] = (s) => t("update:modelValue", s.target.checked))
1031
+ }), null, 16, Lt)
988
1032
  ], 10, Pt),
989
- A(l.$slots, "default")
1033
+ P(l.$slots, "default")
990
1034
  ], 2));
991
1035
  }
992
- }, Se = (e, d) => {
993
- const t = e.__vccOpts || e;
994
- for (const [s, a] of d)
995
- t[s] = a;
996
- return t;
997
- }, Ot = {
1036
+ }, It = {
998
1037
  "aria-live": "assertive",
999
1038
  class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
1000
- }, zt = { class: "flex flex-col items-center space-y-4 w-full" }, Ft = { class: "p-4" }, Nt = { class: "flex items-start" }, _t = { class: "flex-shrink-0" }, Et = { class: "flex-1 pt-0.5 ml-3 w-0" }, jt = { class: "font-bold" }, Yt = { class: "mt-1" }, Rt = { class: "flex flex-shrink-0 ml-4" }, Ht = /* @__PURE__ */ Object.assign({
1039
+ }, Ot = { class: "flex flex-col items-center space-y-4 w-full" }, zt = { class: "p-4" }, Ft = { class: "flex items-start" }, Nt = { class: "shrink-0" }, Et = { class: "flex-1 pt-0.5 ml-3 w-0" }, jt = { class: "font-bold" }, Yt = { class: "mt-1" }, _t = { class: "flex shrink-0 ml-4" }, Vl = /* @__PURE__ */ Object.assign({
1001
1040
  inheritAttrs: !1
1002
1041
  }, {
1003
1042
  __name: "message-toast",
1004
1043
  props: {
1005
- title: String,
1006
- message: [String, Array],
1044
+ title: { type: String, default: "" },
1045
+ message: { type: [String, Array], default: null },
1007
1046
  timeout: { type: Number, default: 5e3 },
1008
1047
  active: { type: Boolean, default: !1 },
1048
+ transition: { type: String, default: "vert-fade" },
1009
1049
  showTimeoutProgress: { type: Boolean, default: !1 }
1010
1050
  },
1011
1051
  emits: ["timeout", "close"],
1012
1052
  setup(e, { emit: d }) {
1013
- const t = e, s = d, a = L(() => typeof t.message == "string" ? [t.message] : t.message), l = w(0);
1053
+ const t = e, o = d, a = L(() => typeof t.message == "string" ? [t.message] : t.message), l = $(0);
1014
1054
  let c = null;
1015
- const n = () => {
1055
+ const s = () => {
1016
1056
  window.clearTimeout(c), l.value = 100, t.active && t.timeout && (c = window.setTimeout(() => {
1017
- s("timeout");
1057
+ o("timeout");
1018
1058
  }, t.timeout), window.setTimeout(() => l.value = 0, 0));
1019
1059
  };
1020
- return K(() => t.active, n), me(n), (o, i) => (u(), m("div", Ot, [
1021
- v("div", zt, [
1022
- E(ce, { name: "messagetoast-fade" }, {
1060
+ return X(() => t.active, s), fe(s), (n, r) => (i(), m("div", It, [
1061
+ v("div", Ot, [
1062
+ Y(ve, { name: e.transition }, {
1023
1063
  default: te(() => [
1024
- e.active ? (u(), m("div", {
1064
+ e.active ? (i(), m("div", {
1025
1065
  key: 0,
1026
- class: $(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", o.$attrs.class])
1066
+ class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto", n.$attrs.class])
1027
1067
  }, [
1028
- v("div", Ft, [
1029
- v("div", Nt, [
1030
- v("div", _t, [
1031
- A(o.$slots, "icon", {}, void 0, !0)
1068
+ v("div", zt, [
1069
+ v("div", Ft, [
1070
+ v("div", Nt, [
1071
+ P(n.$slots, "icon")
1032
1072
  ]),
1033
1073
  v("div", Et, [
1034
- A(o.$slots, "title", {}, () => [
1035
- v("div", jt, B(e.title), 1)
1036
- ], !0),
1037
- A(o.$slots, "default", {}, () => [
1038
- (u(!0), m(O, null, _(a.value, (r) => (u(), m("p", Yt, B(r), 1))), 256))
1039
- ], !0)
1074
+ P(n.$slots, "title", {}, () => [
1075
+ v("div", jt, T(e.title), 1)
1076
+ ]),
1077
+ P(n.$slots, "default", {}, () => [
1078
+ (i(!0), m(z, null, j(a.value, (u) => (i(), m("p", Yt, T(u), 1))), 256))
1079
+ ])
1040
1080
  ]),
1041
- v("div", Rt, [
1081
+ v("div", _t, [
1042
1082
  v("button", {
1043
- onClick: i[0] || (i[0] = (r) => s("close")),
1044
- class: "inline-flex text-white bg-black bg-opacity-20 rounded-sm focus:ring-2 focus:outline-none hover:text-stone-200 focus:ring-stone-200"
1083
+ class: "inline-flex text-white bg-black/20 rounded-xs focus:ring-2 focus:outline-hidden hover:text-stone-200 focus:ring-stone-200",
1084
+ onClick: r[0] || (r[0] = (u) => o("close"))
1045
1085
  }, [
1046
- i[1] || (i[1] = v("span", { class: "sr-only" }, "Close", -1)),
1047
- E(M(fe), { class: "size-5" })
1086
+ r[1] || (r[1] = v("span", { class: "sr-only" }, "Close", -1)),
1087
+ Y(A(he), { class: "size-5" })
1048
1088
  ])
1049
1089
  ])
1050
1090
  ])
1051
1091
  ]),
1052
- e.showTimeoutProgress && e.timeout ? (u(), m("div", {
1092
+ e.showTimeoutProgress && e.timeout ? (i(), m("div", {
1053
1093
  key: 0,
1054
1094
  class: "h-1 transition-all ease-linear bg-vxvue-alt",
1055
1095
  style: ye({
@@ -1059,22 +1099,22 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
1059
1099
  role: "progressbar",
1060
1100
  "aria-hidden": "false",
1061
1101
  "aria-label": "notification timer"
1062
- }, null, 4)) : P("", !0)
1063
- ], 2)) : P("", !0)
1102
+ }, null, 4)) : I("", !0)
1103
+ ], 2)) : I("", !0)
1064
1104
  ]),
1065
1105
  _: 3
1066
- })
1106
+ }, 8, ["name"])
1067
1107
  ])
1068
1108
  ]));
1069
1109
  }
1070
- }), Dl = /* @__PURE__ */ Se(Ht, [["__scopeId", "data-v-49feefa9"]]), Wt = {
1110
+ }), Rt = {
1071
1111
  key: 0,
1072
- class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
1112
+ class: "fixed inset-0 z-9998 bg-white/50 backdrop-blur-xs",
1073
1113
  "aria-hidden": "true"
1074
- }, Zt = {
1114
+ }, Ht = {
1075
1115
  key: 0,
1076
- class: "fixed inset-0 z-[9999]"
1077
- }, Ut = { class: "flex justify-center items-center h-screen" }, Al = {
1116
+ class: "fixed inset-0 z-9999"
1117
+ }, Wt = { class: "flex justify-center items-center h-screen" }, Dl = {
1078
1118
  __name: "modal",
1079
1119
  props: {
1080
1120
  show: Boolean,
@@ -1084,37 +1124,37 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
1084
1124
  },
1085
1125
  emits: ["clicked-outside"],
1086
1126
  setup(e, { emit: d }) {
1087
- const t = d, s = w(null);
1088
- return he(s, () => t("clicked-outside")), (a, l) => (u(), m(O, null, [
1089
- e.show ? (u(), m("div", Wt)) : P("", !0),
1090
- E(ce, { name: "appear" }, {
1127
+ const t = d, o = $(null);
1128
+ return pe(o, () => t("clicked-outside")), (a, l) => (i(), m(z, null, [
1129
+ e.show ? (i(), m("div", Rt)) : I("", !0),
1130
+ Y(ve, { name: "appear" }, {
1091
1131
  default: te(() => [
1092
- e.show ? (u(), m("div", Zt, [
1093
- v("div", Ut, [
1132
+ e.show ? (i(), m("div", Ht, [
1133
+ v("div", Wt, [
1094
1134
  v("div", {
1095
- class: $(["overflow-hidden relative max-w-full bg-white rounded ring-1 ring-black ring-opacity-10 shadow-xl transition-all transform xl:max-w-screen-xl", e.containerClass]),
1096
1135
  ref_key: "container",
1097
- ref: s
1136
+ ref: o,
1137
+ class: C(["overflow-hidden relative max-w-full bg-white rounded-sm ring-1 ring-black/10 shadow-xl transition-all transform xl:max-w-(--breakpoint-xl)", e.containerClass])
1098
1138
  }, [
1099
1139
  v("div", {
1100
- class: $(e.headerClass)
1140
+ class: C(e.headerClass)
1101
1141
  }, [
1102
- A(a.$slots, "title")
1142
+ P(a.$slots, "title")
1103
1143
  ], 2),
1104
1144
  v("div", {
1105
- class: $(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
1145
+ class: C(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
1106
1146
  }, [
1107
- A(a.$slots, "default")
1147
+ P(a.$slots, "default")
1108
1148
  ], 2)
1109
1149
  ], 2)
1110
1150
  ])
1111
- ])) : P("", !0)
1151
+ ])) : I("", !0)
1112
1152
  ]),
1113
1153
  _: 3
1114
1154
  })
1115
1155
  ], 64));
1116
1156
  }
1117
- }, Kt = { class: "flex justify-between items-center px-4 sm:px-0" }, qt = { class: "flex flex-1 -mt-px w-0" }, Xt = ["disabled"], Gt = { class: "hidden md:flex md:-mt-px" }, Jt = { class: "flex flex-1 justify-end -mt-px w-0" }, Qt = ["disabled"], Bl = {
1157
+ }, Zt = { class: "flex justify-between items-center px-4 sm:px-0" }, Ut = { class: "flex flex-1 -mt-px w-0" }, Kt = ["disabled"], qt = { class: "hidden md:flex md:-mt-px" }, Xt = { class: "flex flex-1 justify-end -mt-px w-0" }, Gt = ["disabled"], Al = {
1118
1158
  __name: "pagination",
1119
1159
  props: {
1120
1160
  page: { type: Number, default: 1 },
@@ -1128,74 +1168,74 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], gt =
1128
1168
  },
1129
1169
  emits: ["update:page"],
1130
1170
  setup(e, { emit: d }) {
1131
- const t = d, s = e, a = w(Math.ceil(s.total / s.perPage)), l = w(null), c = L(() => (s.markerPosition === "above" ? "border-t-4 -mt-[4px]" : "border-b-4 -mb-[4px]") + " py-4"), n = L(() => {
1132
- let r = [1];
1133
- if (s.showAllPages || a.value <= 7) {
1171
+ const t = d, o = e, a = $(Math.ceil(o.total / o.perPage)), l = $(null), c = L(() => (o.markerPosition === "above" ? "border-t-4 -mt-[4px]" : "border-b-4 -mb-[4px]") + " py-4"), s = L(() => {
1172
+ let u = [1];
1173
+ if (o.showAllPages || a.value <= 7) {
1134
1174
  for (let f = 2; f <= a.value; ++f)
1135
- r.push(f);
1136
- return r;
1175
+ u.push(f);
1176
+ return u;
1137
1177
  }
1138
- return l.value >= a.value ? r.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && r.push("dots"), r.push(l.value - 1)), l.value > 1 && r.push(l.value), l.value + 1 < a.value && (r.push(l.value + 1), l.value <= 1 && r.push(l.value + 2), l.value + 2 < a.value && r.push("dots")), l.value < a.value && r.push(a.value), r;
1139
- }), o = () => {
1178
+ return l.value >= a.value ? u.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && u.push("dots"), u.push(l.value - 1)), l.value > 1 && u.push(l.value), l.value + 1 < a.value && (u.push(l.value + 1), l.value <= 1 && u.push(l.value + 2), l.value + 2 < a.value && u.push("dots")), l.value < a.value && u.push(a.value), u;
1179
+ }), n = () => {
1140
1180
  l.value > 1 && t("update:page", l.value - 1);
1141
- }, i = () => {
1181
+ }, r = () => {
1142
1182
  l.value < a.value && t("update:page", l.value + 1);
1143
1183
  };
1144
- return K(() => s.page, (r) => l.value = Math.min(Math.max(r, 1), a.value), { immediate: !0 }), K(() => s.perPage, (r) => {
1145
- a.value = Math.ceil(s.total / s.perPage), t("update:page", 1);
1146
- }), K(() => s.total, (r) => {
1147
- a.value = Math.ceil(s.total / s.perPage), l.value > a.value && t("update:page", a.value);
1148
- }), (r, f) => (u(), m("nav", Kt, [
1149
- v("div", qt, [
1150
- e.showNavButtons ? (u(), m("button", {
1184
+ return X(() => o.page, (u) => l.value = Math.min(Math.max(u, 1), a.value), { immediate: !0 }), X(() => o.perPage, (u) => {
1185
+ a.value = Math.ceil(o.total / o.perPage), t("update:page", 1);
1186
+ }), X(() => o.total, (u) => {
1187
+ a.value = Math.ceil(o.total / o.perPage), l.value > a.value && t("update:page", a.value);
1188
+ }), (u, f) => (i(), m("nav", Zt, [
1189
+ v("div", Ut, [
1190
+ e.showNavButtons ? (i(), m("button", {
1151
1191
  key: 0,
1152
- onClick: o,
1153
1192
  disabled: l.value <= 1,
1154
- class: $([
1193
+ class: C([
1155
1194
  l.value <= 1 ? "pointer-events-none text-gray-500" : "text-vxvue-700",
1156
1195
  "inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"
1157
- ])
1196
+ ]),
1197
+ onClick: n
1158
1198
  }, [
1159
- E(M(re), { class: "size-5" }),
1160
- X(" " + B(e.prevText), 1)
1161
- ], 10, Xt)) : P("", !0)
1199
+ Y(A(ue), { class: "size-5" }),
1200
+ J(" " + T(e.prevText), 1)
1201
+ ], 10, Kt)) : I("", !0)
1162
1202
  ]),
1163
- v("div", Gt, [
1164
- (u(!0), m(O, null, _(n.value, (x, h) => (u(), H(ie(x !== "dots" ? "button" : "span"), {
1165
- onClick: (g) => x !== "dots" ? t("update:page", x) : null,
1166
- key: h,
1167
- class: $([
1168
- { "pointer-events-none": x === "dots" },
1169
- x === l.value ? "border-vxvue text-vxvue font-bold" : "border-transparent text-gray-500 hover:border-gray-300",
1203
+ v("div", qt, [
1204
+ (i(!0), m(z, null, j(s.value, (b, k) => (i(), W(ie(e.page !== "dots" ? "button" : "span"), {
1205
+ key: k,
1206
+ class: C([
1207
+ { "pointer-events-none": b === "dots" },
1208
+ b === l.value ? "border-vxvue text-vxvue font-bold" : "border-transparent text-gray-500 hover:border-gray-300",
1170
1209
  c.value,
1171
1210
  "inline-flex items-center px-4 text-sm"
1172
- ])
1211
+ ]),
1212
+ onClick: (x) => b !== "dots" ? t("update:page", b) : null
1173
1213
  }, {
1174
1214
  default: te(() => [
1175
- X(B(x !== "dots" ? x : "…"), 1)
1215
+ J(T(b !== "dots" ? b : "…"), 1)
1176
1216
  ]),
1177
1217
  _: 2
1178
- }, 1032, ["onClick", "class"]))), 128))
1218
+ }, 1032, ["class", "onClick"]))), 128))
1179
1219
  ]),
1180
- v("div", Jt, [
1181
- e.showNavButtons ? (u(), m("button", {
1220
+ v("div", Xt, [
1221
+ e.showNavButtons ? (i(), m("button", {
1182
1222
  key: 0,
1183
- onClick: i,
1184
1223
  disabled: l.value >= a.value,
1185
- class: $([
1224
+ class: C([
1186
1225
  l.value >= a.value ? "pointer-events-none text-gray-500" : "text-vxvue-700",
1187
1226
  "inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"
1188
- ])
1227
+ ]),
1228
+ onClick: r
1189
1229
  }, [
1190
- X(B(e.nextText) + " ", 1),
1191
- E(M(ne), { class: "size-5" })
1192
- ], 10, Qt)) : P("", !0)
1230
+ J(T(e.nextText) + " ", 1),
1231
+ Y(A(oe), { class: "size-5" })
1232
+ ], 10, Gt)) : I("", !0)
1193
1233
  ])
1194
1234
  ]));
1195
1235
  }
1196
1236
  };
1197
- function el(e, d) {
1198
- return u(), m("svg", {
1237
+ function Jt(e, d) {
1238
+ return i(), m("svg", {
1199
1239
  xmlns: "http://www.w3.org/2000/svg",
1200
1240
  fill: "none",
1201
1241
  viewBox: "0 0 24 24",
@@ -1211,8 +1251,8 @@ function el(e, d) {
1211
1251
  })
1212
1252
  ]);
1213
1253
  }
1214
- function tl(e, d) {
1215
- return u(), m("svg", {
1254
+ function Qt(e, d) {
1255
+ return i(), m("svg", {
1216
1256
  xmlns: "http://www.w3.org/2000/svg",
1217
1257
  fill: "none",
1218
1258
  viewBox: "0 0 24 24",
@@ -1233,105 +1273,107 @@ function tl(e, d) {
1233
1273
  })
1234
1274
  ]);
1235
1275
  }
1236
- const ll = ["value", "type"], al = ["disabled"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1276
+ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1237
1277
  __name: "password-input",
1238
- props: ["modelValue"],
1278
+ props: { modelValue: { type: String, default: "" } },
1239
1279
  emits: ["update:modelValue"],
1240
1280
  setup(e, { emit: d }) {
1241
- const t = d, s = w(!1), a = L(() => {
1242
- let l = Object.assign({}, U());
1281
+ const t = d, o = $(!1), a = L(() => {
1282
+ let l = Object.assign({}, q());
1243
1283
  return delete l.class, l;
1244
1284
  });
1245
- return (l, c) => (u(), m("div", {
1246
- class: $("inline-block relative " + U().class)
1285
+ return (l, c) => (i(), m("div", {
1286
+ class: C("inline-block relative " + q().class)
1247
1287
  }, [
1248
- v("input", j({
1288
+ v("input", R({
1249
1289
  value: e.modelValue,
1250
- type: s.value ? "text" : "password",
1251
- onInput: c[0] || (c[0] = (n) => t("update:modelValue", n.target.value))
1252
- }, a.value, { class: "block pr-12 w-full form-input peer" }), null, 16, ll),
1290
+ type: o.value ? "text" : "password"
1291
+ }, a.value, {
1292
+ class: "block pr-12 w-full form-input peer",
1293
+ onInput: c[0] || (c[0] = (s) => t("update:modelValue", s.target.value))
1294
+ }), null, 16, el),
1253
1295
  v("button", {
1254
1296
  class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
1255
1297
  "aria-label": "show-password-toggle",
1256
- disabled: U().disabled ?? !1,
1257
- onClick: c[1] || (c[1] = N((n) => s.value = !s.value, ["stop"]))
1298
+ disabled: q().disabled ?? !1,
1299
+ onClick: c[1] || (c[1] = E((s) => o.value = !o.value, ["stop"]))
1258
1300
  }, [
1259
- s.value ? (u(), H(M(el), {
1301
+ o.value ? (i(), W(A(Jt), {
1260
1302
  key: 0,
1261
1303
  class: "size-5"
1262
- })) : (u(), H(M(tl), {
1304
+ })) : (i(), W(A(Qt), {
1263
1305
  key: 1,
1264
1306
  class: "size-5"
1265
1307
  }))
1266
- ], 8, al)
1308
+ ], 8, tl)
1267
1309
  ], 2));
1268
1310
  }
1269
- }), sl = { class: "flex items-center pb-1" }, nl = {
1311
+ }), ll = { class: "flex items-center pb-1" }, al = {
1270
1312
  key: 0,
1271
1313
  class: "ml-6"
1272
1314
  }, Pl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1273
1315
  __name: "simple-tree",
1274
1316
  props: {
1275
- branch: { type: Object, default: {} },
1317
+ branch: { type: Object, default: () => ({}) },
1276
1318
  modelValue: { type: Object, default: null }
1277
1319
  },
1278
1320
  emits: ["update:modelValue", "expand"],
1279
1321
  setup(e, { emit: d }) {
1280
- const t = e, s = d, a = w(!1);
1281
- return me(() => {
1282
- t.branch === t.modelValue && s("expand", !0);
1322
+ const t = e, o = d, a = $(!1);
1323
+ return fe(() => {
1324
+ t.branch === t.modelValue && o("expand", !0);
1283
1325
  }), (l, c) => {
1284
- const n = Le("simple-tree", !0);
1285
- return u(), m("div", {
1286
- class: $([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
1326
+ const s = Be("simple-tree", !0);
1327
+ return i(), m("div", {
1328
+ class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
1287
1329
  }, [
1288
- v("div", sl, [
1289
- e.branch.branches && e.branch.branches.length ? (u(), m("button", {
1330
+ v("div", ll, [
1331
+ e.branch.branches && e.branch.branches.length ? (i(), m("button", {
1290
1332
  key: 0,
1291
- onClick: c[0] || (c[0] = (o) => a.value = !a.value),
1292
- class: "mr-2"
1333
+ class: "mr-2",
1334
+ onClick: c[0] || (c[0] = (n) => a.value = !a.value)
1293
1335
  }, [
1294
- A(l.$slots, "toggle", {
1336
+ P(l.$slots, "toggle", {
1295
1337
  branch: e.branch,
1296
1338
  expanded: a.value
1297
1339
  }, () => [
1298
- (u(), H(ie(a.value ? M(Ne) : M(_e)), { class: "p-1 text-white rounded-sm size-5 bg-vxvue-700 hover:bg-vxvue" }))
1340
+ (i(), W(ie(a.value ? A(Fe) : A(Ne)), { class: "p-1 text-white rounded-xs size-5 bg-vxvue-700 hover:bg-vxvue" }))
1299
1341
  ])
1300
- ])) : P("", !0),
1301
- e.branch === e.modelValue ? A(l.$slots, "label-selected", {
1342
+ ])) : I("", !0),
1343
+ e.branch === e.modelValue ? P(l.$slots, "label-selected", {
1302
1344
  key: 1,
1303
1345
  branch: e.branch
1304
1346
  }, () => [
1305
- v("strong", null, B(e.branch.label), 1)
1306
- ]) : (u(), m("button", {
1347
+ v("strong", null, T(e.branch.label), 1)
1348
+ ]) : (i(), m("button", {
1307
1349
  key: 2,
1308
- onClick: c[1] || (c[1] = (o) => s("update:modelValue", e.branch))
1350
+ onClick: c[1] || (c[1] = (n) => o("update:modelValue", e.branch))
1309
1351
  }, [
1310
- A(l.$slots, "label", { branch: e.branch }, () => [
1311
- X(B(e.branch.label), 1)
1352
+ P(l.$slots, "label", { branch: e.branch }, () => [
1353
+ J(T(e.branch.label), 1)
1312
1354
  ])
1313
1355
  ]))
1314
1356
  ]),
1315
- e.branch.branches && e.branch.branches.length ? xe((u(), m("div", nl, [
1316
- (u(!0), m(O, null, _(e.branch.branches, (o) => (u(), H(n, {
1317
- key: o.id || o.key || null,
1318
- branch: o,
1357
+ e.branch.branches && e.branch.branches.length ? xe((i(), m("div", al, [
1358
+ (i(!0), m(z, null, j(e.branch.branches, (n) => (i(), W(s, {
1359
+ key: n.id || n.key || null,
1360
+ branch: n,
1319
1361
  "model-value": e.modelValue,
1320
- "onUpdate:modelValue": c[2] || (c[2] = (i) => s("update:modelValue", i)),
1321
- onExpand: c[3] || (c[3] = (i) => {
1322
- a.value = i, s("expand", i);
1362
+ "onUpdate:modelValue": c[2] || (c[2] = (r) => o("update:modelValue", r)),
1363
+ onExpand: c[3] || (c[3] = (r) => {
1364
+ a.value = r, o("expand", r);
1323
1365
  })
1324
1366
  }, Pe({ _: 2 }, [
1325
- _(l.$slots, (i, r) => ({
1326
- name: r,
1367
+ j(l.$slots, (r, u) => ({
1368
+ name: u,
1327
1369
  fn: te((f) => [
1328
- A(l.$slots, r, j({ ref_for: !0 }, f))
1370
+ P(l.$slots, u, R({ ref_for: !0 }, f))
1329
1371
  ])
1330
1372
  }))
1331
1373
  ]), 1032, ["branch", "model-value"]))), 128))
1332
1374
  ], 512)), [
1333
1375
  [Te, a.value]
1334
- ]) : P("", !0)
1376
+ ]) : I("", !0)
1335
1377
  ], 2);
1336
1378
  };
1337
1379
  }
@@ -1340,174 +1382,174 @@ const ll = ["value", "type"], al = ["disabled"], Ll = /* @__PURE__ */ Object.ass
1340
1382
  props: { vertical: Boolean },
1341
1383
  emits: ["dragStart", "dragStop"],
1342
1384
  setup(e, { emit: d }) {
1343
- const t = e, s = d, a = w(null), l = w(null);
1344
- let c = !1, n = {}, o = null, i = null, r = null;
1345
- const f = (g) => {
1346
- var S;
1385
+ const t = e, o = d, a = $(null), l = $(null);
1386
+ let c = !1, s = {}, n = null, r = null, u = null;
1387
+ const f = (x) => {
1388
+ var g;
1347
1389
  if (c) {
1348
- g.preventDefault();
1349
- const { pageX: I, pageY: z } = ((S = g.touches) == null ? void 0 : S[0]) ?? g;
1350
- t.vertical ? a.value.style.height = Math.min(i.height - r.height - (o.y - i.y), Math.max(0, o.height + z - n.y)) + "px" : a.value.style.width = Math.min(i.width - r.width - (o.x - i.x), Math.max(0, o.width + I - n.x)) + "px";
1390
+ x.preventDefault();
1391
+ const { pageX: w, pageY: M } = ((g = x.touches) == null ? void 0 : g[0]) ?? x;
1392
+ t.vertical ? a.value.style.height = Math.min(r.height - u.height - (n.y - r.y), Math.max(0, n.height + M - s.y)) + "px" : a.value.style.width = Math.min(r.width - u.width - (n.x - r.x), Math.max(0, n.width + w - s.x)) + "px";
1351
1393
  }
1352
- }, x = (g) => {
1353
- var z;
1354
- g.preventDefault(), g.currentTarget.focus(), c = !0;
1355
- const { pageX: S, pageY: I } = ((z = g.touches) == null ? void 0 : z[0]) ?? g;
1356
- n = { x: S, y: I }, r = l.value.getBoundingClientRect(), o = a.value.getBoundingClientRect(), i = a.value.parentElement.getBoundingClientRect(), g.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", h)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", h)), s("dragStart");
1357
- }, h = (g) => {
1358
- c && (c = !1, g.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", h)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", h)), setTimeout(() => s("dragStop"), 0));
1394
+ }, b = (x) => {
1395
+ var M;
1396
+ x.preventDefault(), x.currentTarget.focus(), c = !0;
1397
+ const { pageX: g, pageY: w } = ((M = x.touches) == null ? void 0 : M[0]) ?? x;
1398
+ s = { x: g, y: w }, u = l.value.getBoundingClientRect(), n = a.value.getBoundingClientRect(), r = a.value.parentElement.getBoundingClientRect(), x.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", k)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", k)), o("dragStart");
1399
+ }, k = (x) => {
1400
+ c && (c = !1, x.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", k)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", k)), setTimeout(() => o("dragStop"), 0));
1359
1401
  };
1360
- return (g, S) => (u(), m("div", {
1361
- class: "relative",
1402
+ return (x, g) => (i(), m("div", {
1362
1403
  ref_key: "box",
1363
- ref: a
1404
+ ref: a,
1405
+ class: "relative"
1364
1406
  }, [
1365
- A(g.$slots, "default"),
1366
- v("div", j({
1367
- class: ["absolute flex", t.vertical ? "inset-x-0 top-full justify-center py-1 cursor-ns-resize" : "inset-y-0 left-full items-center px-1 cursor-ew-resize"]
1368
- }, oe({
1369
- touchstart: x,
1370
- mousedown: x,
1371
- touchend: h,
1372
- mouseup: h
1373
- }, !0), {
1407
+ P(x.$slots, "default"),
1408
+ v("div", R({
1374
1409
  ref_key: "handle",
1375
- ref: l
1376
- }), [
1377
- A(g.$slots, "handle", {}, () => [
1410
+ ref: l,
1411
+ class: ["absolute flex", t.vertical ? "inset-x-0 top-full justify-center py-1 cursor-ns-resize" : "inset-y-0 left-full items-center px-1 cursor-ew-resize"]
1412
+ }, re({
1413
+ touchstart: b,
1414
+ mousedown: b,
1415
+ touchend: k,
1416
+ mouseup: k
1417
+ }, !0)), [
1418
+ P(x.$slots, "handle", {}, () => [
1378
1419
  v("div", {
1379
- class: $(["rounded-full bg-vxvue", t.vertical ? "h-1.5 w-8" : "h-8 w-1.5"])
1420
+ class: C(["rounded-full bg-vxvue", t.vertical ? "h-1.5 w-8" : "h-8 w-1.5"])
1380
1421
  }, null, 2)
1381
1422
  ])
1382
1423
  ], 16)
1383
1424
  ], 512));
1384
1425
  }
1385
- }, ol = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], rl = ["id"], ul = ["id", "aria-label"], Il = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1426
+ }, sl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], nl = ["id"], ol = ["id", "aria-label"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1386
1427
  __name: "slider",
1387
1428
  props: {
1388
1429
  min: { type: Number, default: 0 },
1389
1430
  max: { type: Number, default: 100 },
1390
1431
  vertical: Boolean,
1391
1432
  disabled: Boolean,
1392
- modelValue: { type: [Number, Array], validator(e) {
1433
+ modelValue: { type: [Number, Array], default: null, validator(e) {
1393
1434
  return typeof e == "number" || e.every((d) => typeof d == "number");
1394
1435
  } }
1395
1436
  },
1396
1437
  emits: ["update:modelValue", "dragStart", "dragStop"],
1397
1438
  setup(e, { emit: d }) {
1398
- const t = e, s = d, a = U(), l = { x: null, y: null }, c = { w: null, h: null };
1399
- let n = !1;
1400
- const o = w(null), i = w(0), r = L(() => {
1401
- const k = t.max, C = t.min;
1402
- return t.modelValue instanceof Array ? t.modelValue.map((F) => (Math.max(Math.min(F, k), C) - C) * 100 / (k - C)) : (Math.max(Math.min(t.modelValue, k), C) - C) * 100 / (k - C);
1439
+ const t = e, o = d, a = q(), l = { x: null, y: null }, c = { w: null, h: null };
1440
+ let s = !1;
1441
+ const n = $(null), r = $(0), u = L(() => {
1442
+ const S = t.max, V = t.min;
1443
+ return t.modelValue instanceof Array ? t.modelValue.map((N) => (Math.max(Math.min(N, S), V) - V) * 100 / (S - V)) : (Math.max(Math.min(t.modelValue, S), V) - V) * 100 / (S - V);
1403
1444
  }), f = L(() => {
1404
1445
  if (t.modelValue instanceof Array) {
1405
- const k = Math.min(...r.value) + "%", C = Math.max(...r.value) - Math.min(...r.value) + "%";
1406
- return t.vertical ? { bottom: k, height: C } : { left: k, width: C };
1446
+ const S = Math.min(...u.value) + "%", V = Math.max(...u.value) - Math.min(...u.value) + "%";
1447
+ return t.vertical ? { bottom: S, height: V } : { left: S, width: V };
1407
1448
  }
1408
- return t.vertical ? { bottom: 0, height: r.value + "%" } : { width: r.value + "%" };
1409
- }), x = w({
1410
- class: (t.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 " + (t.disabled ? "" : " focus:ring-4 focus:outline-none border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
1449
+ return t.vertical ? { bottom: 0, height: u.value + "%" } : { width: u.value + "%" };
1450
+ }), b = $({
1451
+ class: (t.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 " + (t.disabled ? "" : " focus:ring-4 focus:outline-hidden border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
1411
1452
  tabindex: 0
1412
- }), h = (k) => {
1413
- let C = parseFloat(k.toFixed(10));
1414
- if (C = Math.min(t.max, Math.max(t.min, C)), t.modelValue instanceof Array) {
1415
- let F = [...t.modelValue];
1416
- F[i.value] = C, s("update:modelValue", F);
1453
+ }), k = (S) => {
1454
+ let V = parseFloat(S.toFixed(10));
1455
+ if (V = Math.min(t.max, Math.max(t.min, V)), t.modelValue instanceof Array) {
1456
+ let N = [...t.modelValue];
1457
+ N[r.value] = V, o("update:modelValue", N);
1417
1458
  } else
1418
- s("update:modelValue", C);
1419
- }, g = (k) => {
1420
- const { pageX: C, pageY: F } = k.touches ? k.touches[0] : k, p = t.vertical ? (-F + l.y) / c.h : (C - l.x) / c.w;
1421
- h(Math.floor((t.max - t.min) * p + t.min));
1422
- }, S = () => {
1423
- const { clientLeft: k, clientTop: C, scrollLeft: F, scrollTop: p } = document.documentElement, b = o.value.getBoundingClientRect();
1424
- l.x = b.left + F - k, l.y = b.bottom + p - C, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
1425
- }, I = (k) => {
1426
- n && (k.preventDefault(), g(k));
1427
- }, z = (k) => {
1428
- k.preventDefault(), k.currentTarget.focus(), S(), n = !0, k.type === "mousedown" ? (document.addEventListener("mousemove", I), document.addEventListener("mouseup", Y)) : (document.addEventListener("touchmove", I), document.addEventListener("touchend", Y)), s("dragStart");
1429
- }, Y = (k) => {
1430
- n && (n = !1, k.type === "mouseup" ? (document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", Y)) : (document.removeEventListener("touchmove", I), document.removeEventListener("touchend", Y)), setTimeout(() => s("dragStop"), 0));
1431
- }, G = (k) => {
1432
- k.keyCode >= 33 && k.keyCode <= 40 && k.preventDefault();
1433
- const C = t.modelValue[i.value] ?? t.modelValue;
1434
- switch (k.keyCode) {
1459
+ o("update:modelValue", V);
1460
+ }, x = (S) => {
1461
+ const { pageX: V, pageY: N } = S.touches ? S.touches[0] : S, h = t.vertical ? (-N + l.y) / c.h : (V - l.x) / c.w;
1462
+ k(Math.floor((t.max - t.min) * h + t.min));
1463
+ }, g = () => {
1464
+ const { clientLeft: S, clientTop: V, scrollLeft: N, scrollTop: h } = document.documentElement, p = n.value.getBoundingClientRect();
1465
+ l.x = p.left + N - S, l.y = p.bottom + h - V, c.w = n.value.offsetWidth, c.h = n.value.offsetHeight;
1466
+ }, w = (S) => {
1467
+ s && (S.preventDefault(), x(S));
1468
+ }, M = (S) => {
1469
+ S.preventDefault(), S.currentTarget.focus(), g(), s = !0, S.type === "mousedown" ? (document.addEventListener("mousemove", w), document.addEventListener("mouseup", F)) : (document.addEventListener("touchmove", w), document.addEventListener("touchend", F)), o("dragStart");
1470
+ }, F = (S) => {
1471
+ s && (s = !1, S.type === "mouseup" ? (document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", F)) : (document.removeEventListener("touchmove", w), document.removeEventListener("touchend", F)), setTimeout(() => o("dragStop"), 0));
1472
+ }, Z = (S) => {
1473
+ S.keyCode >= 33 && S.keyCode <= 40 && S.preventDefault();
1474
+ const V = t.modelValue[r.value] ?? t.modelValue;
1475
+ switch (S.keyCode) {
1435
1476
  case 37:
1436
1477
  case 40:
1437
- h(C - 1);
1478
+ k(V - 1);
1438
1479
  break;
1439
1480
  case 39:
1440
1481
  case 38:
1441
- h(C + 1);
1482
+ k(V + 1);
1442
1483
  break;
1443
1484
  case 33:
1444
- h(C + (t.max - t.min) / 10);
1485
+ k(V + (t.max - t.min) / 10);
1445
1486
  break;
1446
1487
  case 34:
1447
- h(C - (t.max - t.min) / 10);
1488
+ k(V - (t.max - t.min) / 10);
1448
1489
  break;
1449
1490
  case 36:
1450
- h(t.min);
1491
+ k(t.min);
1451
1492
  break;
1452
1493
  case 35:
1453
- h(t.max);
1494
+ k(t.max);
1454
1495
  }
1455
- }, Z = (k) => {
1456
- S(), g(k);
1496
+ }, K = (S) => {
1497
+ g(), x(S);
1457
1498
  };
1458
- return (k, C) => (u(), m("div", j({
1459
- class: ["relative bg-slate-300", e.vertical ? "h-full w-2 rounded-t-full rounded-b-full" : "w-full h-2 rounded-r-full rounded-l-full"],
1499
+ return (S, V) => (i(), m("div", R({
1460
1500
  ref_key: "track",
1461
- ref: o,
1501
+ ref: n,
1502
+ class: ["relative bg-slate-300", e.vertical ? "h-full w-2 rounded-t-full rounded-b-full" : "w-full h-2 rounded-r-full rounded-l-full"],
1462
1503
  role: "slider",
1463
1504
  "aria-label": "slider-thumb",
1464
1505
  "aria-valuemin": e.min,
1465
1506
  "aria-valuemax": t.max,
1466
1507
  "aria-valuenow": e.modelValue[0] ?? e.modelValue,
1467
1508
  "aria-valuetext": e.modelValue
1468
- }, oe(e.disabled ? {} : {
1469
- click: Z
1509
+ }, re(e.disabled ? {} : {
1510
+ click: K
1470
1511
  }, !0)), [
1471
- e.disabled ? P("", !0) : (u(), m("div", {
1512
+ e.disabled ? I("", !0) : (i(), m("div", {
1472
1513
  key: 0,
1473
- class: $(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
1514
+ class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
1474
1515
  style: ye(f.value)
1475
1516
  }, null, 6)),
1476
- e.modelValue.length ? (u(!0), m(O, { key: 2 }, _(e.modelValue, (F, p) => (u(), m("button", j({
1477
- id: p ? null : M(a).id,
1478
- style: e.vertical ? { bottom: r.value[p] + "%" } : { left: r.value[p] + "%" },
1479
- "aria-label": "slider-thumb-" + (p + 1)
1480
- }, oe(e.disabled ? {} : {
1481
- focus: () => i.value = p,
1482
- keydown: G,
1483
- touchstart: (b) => {
1484
- i.value = p, z(b);
1517
+ e.modelValue.length ? (i(!0), m(z, { key: 2 }, j(e.modelValue, (N, h) => (i(), m("button", R({
1518
+ id: h ? null : A(a).id,
1519
+ style: e.vertical ? { bottom: u.value[h] + "%" } : { left: u.value[h] + "%" },
1520
+ "aria-label": "slider-thumb-" + (h + 1),
1521
+ ref_for: !0
1522
+ }, b.value, re(e.disabled ? {} : {
1523
+ focus: () => r.value = h,
1524
+ keydown: Z,
1525
+ touchstart: (p) => {
1526
+ r.value = h, M(p);
1485
1527
  },
1486
- mousedown: (b) => {
1487
- i.value = p, z(b);
1528
+ mousedown: (p) => {
1529
+ r.value = h, M(p);
1488
1530
  },
1489
- touchend: Y,
1490
- mouseup: Y
1491
- }, !0), { ref_for: !0 }, x.value), null, 16, ul))), 256)) : (u(), m("button", j({
1531
+ touchend: F,
1532
+ mouseup: F
1533
+ }, !0)), null, 16, ol))), 256)) : (i(), m("button", R({
1492
1534
  key: 1,
1493
- id: M(a).id,
1494
- style: e.vertical ? { bottom: r.value + "%" } : { left: r.value + "%" },
1535
+ id: A(a).id,
1536
+ style: e.vertical ? { bottom: u.value + "%" } : { left: u.value + "%" },
1495
1537
  "aria-label": "slider-thumb"
1496
- }, oe(e.disabled ? {} : {
1497
- focus: () => i.value = 0,
1498
- keydown: G,
1499
- touchstart: (F) => {
1500
- i.value = 0, z(F);
1538
+ }, b.value, re(e.disabled ? {} : {
1539
+ focus: () => r.value = 0,
1540
+ keydown: Z,
1541
+ touchstart: (N) => {
1542
+ r.value = 0, M(N);
1501
1543
  },
1502
- mousedown: (F) => {
1503
- i.value = 0, z(F);
1544
+ mousedown: (N) => {
1545
+ r.value = 0, M(N);
1504
1546
  },
1505
- touchend: Y,
1506
- mouseup: Y
1507
- }, !0), x.value), null, 16, rl))
1508
- ], 16, ol));
1547
+ touchend: F,
1548
+ mouseup: F
1549
+ }, !0)), null, 16, nl))
1550
+ ], 16, sl));
1509
1551
  }
1510
- }), il = ["data-active", "onClick"], dl = { class: "flex items-center space-x-1" }, cl = ["data-active"], Ol = {
1552
+ }), rl = ["data-active", "onClick"], ul = { class: "flex items-center space-x-1" }, il = ["data-active"], Il = {
1511
1553
  __name: "sortable",
1512
1554
  props: {
1513
1555
  columns: {
@@ -1523,163 +1565,174 @@ const ll = ["value", "type"], al = ["disabled"], Ll = /* @__PURE__ */ Object.ass
1523
1565
  rows: { type: Array, required: !0 },
1524
1566
  offset: { type: Number, default: null },
1525
1567
  count: { type: Number, default: null },
1526
- sortProp: { type: String },
1527
- sortDirection: { type: String, validator: (e) => !e || ["asc", "desc"].includes(e) },
1568
+ sortProp: { type: String, default: null },
1569
+ sortDirection: { type: String, default: null, validator: (e) => !e || ["asc", "desc"].includes(e) },
1528
1570
  keyProperty: { type: String, default: "key" },
1529
1571
  headerClass: { type: String, default: "text-white bg-vxvue-700 [&_*[data-active]]:bg-vxvue-alt-800" },
1530
1572
  bodyClass: { type: String, default: "[&>*:nth-child(even)]:bg-vxvue-50 [&>*:nth-child(even)_*[data-active]]:bg-vxvue-alt-100 [&>*:nth-child(odd)_*[data-active]]:bg-vxvue-alt-50" }
1531
1573
  },
1532
1574
  emits: ["before-sort", "after-sort"],
1533
1575
  setup(e, { emit: d }) {
1534
- const t = e, s = d, a = w(t.sortProp), l = w(t.sortDirection), c = L(() => {
1535
- let o = t.rows.slice();
1536
- const i = t.columns.find(({ prop: r }) => r === a.value);
1537
- return i && (l.value === "asc" && i.sortAscFunction ? o.sort(i.sortAscFunction) : l.value === "desc" && i.sortDescFunction ? o.sort(i.sortDescFunction) : o.sort((r, f) => r[a.value] < f[a.value] ? l.value === "asc" ? -1 : 1 : r[a.value] > f[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
1538
- }), n = (o) => {
1539
- s("before-sort", { prop: a.value, dir: l.value }), a.value === o ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = o, l.value = l.value || "asc"), ve(() => s("after-sort", { prop: a.value, dir: l.value }));
1576
+ const t = e, o = d, a = $(t.sortProp), l = $(t.sortDirection), c = L(() => {
1577
+ let n = t.rows.slice();
1578
+ const r = t.columns.find(({ prop: u }) => u === a.value);
1579
+ return r && (l.value === "asc" && r.sortAscFunction ? n.sort(r.sortAscFunction) : l.value === "desc" && r.sortDescFunction ? n.sort(r.sortDescFunction) : n.sort((u, f) => u[a.value] < f[a.value] ? l.value === "asc" ? -1 : 1 : u[a.value] > f[a.value] ? l.value === "asc" ? 1 : -1 : 0)), n.slice(t.offset || 0, (t.offset || 0) + (t.count || n.length));
1580
+ }), s = (n) => {
1581
+ o("before-sort", { prop: a.value, dir: l.value }), a.value === n ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = n, l.value = l.value || "asc"), me(() => o("after-sort", { prop: a.value, dir: l.value }));
1540
1582
  };
1541
- return (o, i) => (u(), m("table", {
1542
- class: $(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
1583
+ return (n, r) => (i(), m("table", {
1584
+ class: C(n.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
1543
1585
  }, [
1544
1586
  v("thead", {
1545
- class: $(e.headerClass)
1587
+ class: C(e.headerClass)
1546
1588
  }, [
1547
1589
  v("tr", null, [
1548
- (u(!0), m(O, null, _(e.columns, (r) => (u(), m("th", {
1590
+ (i(!0), m(z, null, j(e.columns, (u) => (i(), m("th", {
1591
+ key: u.prop,
1549
1592
  scope: "col",
1550
- "data-active": a.value === r.prop ? "active" : null,
1551
- class: $([
1593
+ "data-active": a.value === u.prop ? "active" : null,
1594
+ class: C([
1552
1595
  "py-3 px-6 text-left",
1553
- { "cursor-pointer": r.sortable },
1554
- r.cssClass
1596
+ { "cursor-pointer": u.sortable },
1597
+ u.cssClass
1555
1598
  ]),
1556
- onClick: (f) => r.sortable ? n(r.prop) : null
1599
+ onClick: (f) => u.sortable ? s(u.prop) : null
1557
1600
  }, [
1558
- A(o.$slots, r.prop + "-header", {
1559
- column: r,
1601
+ P(n.$slots, u.prop + "-header", {
1602
+ column: u,
1560
1603
  sortDir: l.value,
1561
1604
  sortProp: a.value
1562
1605
  }, () => [
1563
- v("div", dl, [
1564
- v("span", null, B(r.label), 1),
1565
- r.sortable ? (u(), H(ie(a.value !== r.prop ? M(ze) : l.value === "asc" ? M(Oe) : M(Fe)), {
1606
+ v("div", ul, [
1607
+ v("span", null, T(u.label), 1),
1608
+ u.sortable ? (i(), W(ie(a.value !== u.prop ? A(Oe) : l.value === "asc" ? A(Ie) : A(ze)), {
1566
1609
  key: 0,
1567
1610
  class: "size-4"
1568
- })) : P("", !0)
1611
+ })) : I("", !0)
1569
1612
  ])
1570
1613
  ])
1571
- ], 10, il))), 256))
1614
+ ], 10, rl))), 128))
1572
1615
  ])
1573
1616
  ], 2),
1574
1617
  v("tbody", {
1575
- class: $(e.bodyClass)
1618
+ class: C(e.bodyClass)
1576
1619
  }, [
1577
- (u(!0), m(O, null, _(c.value, (r) => (u(), m("tr", {
1578
- key: r[e.keyProperty],
1579
- class: $(r.cssClass)
1620
+ (i(!0), m(z, null, j(c.value, (u) => (i(), m("tr", {
1621
+ key: u[e.keyProperty],
1622
+ class: C(u.cssClass)
1580
1623
  }, [
1581
- (u(!0), m(O, null, _(e.columns, (f) => (u(), m("td", {
1582
- class: "overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis",
1583
- "data-active": a.value === f.prop ? "active" : null
1624
+ (i(!0), m(z, null, j(e.columns, (f) => (i(), m("td", {
1625
+ key: f.prop,
1626
+ "data-active": a.value === f.prop ? "active" : null,
1627
+ class: "overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"
1584
1628
  }, [
1585
- A(o.$slots, f.prop, { row: r }, () => [
1586
- X(B(r[f.prop]), 1)
1629
+ P(n.$slots, f.prop, { row: u }, () => [
1630
+ J(T(u[f.prop]), 1)
1587
1631
  ])
1588
- ], 8, cl))), 256))
1632
+ ], 8, il))), 128))
1589
1633
  ], 2))), 128))
1590
1634
  ], 2)
1591
1635
  ], 2));
1592
1636
  }
1593
- }, vl = { class: "flex items-center space-x-2" }, ml = ["disabled"], fl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1637
+ }, dl = (e, d) => {
1638
+ const t = e.__vccOpts || e;
1639
+ for (const [o, a] of d)
1640
+ t[o] = a;
1641
+ return t;
1642
+ }, cl = { class: "flex items-center space-x-2" }, vl = ["disabled"], ml = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1594
1643
  __name: "submit-button",
1595
- props: { busy: Boolean, spinnerClass: String, theme: String },
1644
+ props: {
1645
+ busy: Boolean,
1646
+ spinnerClass: { type: String, default: null },
1647
+ theme: { type: String, default: null }
1648
+ },
1596
1649
  emits: ["submit"],
1597
1650
  setup(e, { emit: d }) {
1598
1651
  const t = d;
1599
- return (s, a) => (u(), m("div", vl, [
1652
+ return (o, a) => (i(), m("div", cl, [
1600
1653
  v("button", {
1601
- class: $([s.$attrs.class, e.theme]),
1602
- disabled: s.$attrs.disabled || e.busy,
1654
+ class: C([o.$attrs.class, e.theme]),
1655
+ disabled: o.$attrs.disabled || e.busy,
1603
1656
  type: "button",
1604
1657
  onClick: a[0] || (a[0] = (l) => t("submit"))
1605
1658
  }, [
1606
- A(s.$slots, "default", {}, void 0, !0)
1607
- ], 10, ml),
1608
- e.busy ? (u(), H(we, {
1659
+ P(o.$slots, "default", {}, void 0, !0)
1660
+ ], 10, vl),
1661
+ e.busy ? (i(), W(we, {
1609
1662
  key: 0,
1610
- class: $(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
1611
- }, null, 8, ["class"])) : P("", !0)
1663
+ class: C(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
1664
+ }, null, 8, ["class"])) : I("", !0)
1612
1665
  ]));
1613
1666
  }
1614
- }), zl = /* @__PURE__ */ Se(fl, [["__scopeId", "data-v-6ed8744e"]]), hl = { class: "sm:hidden" }, gl = { class: "hidden sm:block" }, pl = { class: "border-b border-gray-200" }, bl = {
1667
+ }), Ol = /* @__PURE__ */ dl(ml, [["__scopeId", "data-v-9f360713"]]), fl = { class: "sm:hidden" }, hl = { class: "hidden sm:block" }, pl = { class: "border-b border-gray-200" }, gl = {
1615
1668
  class: "flex -mb-px space-x-8",
1616
1669
  "aria-label": "Tabs"
1617
- }, xl = ["onClick", "aria-current"], Fl = {
1670
+ }, bl = ["aria-current", "onClick"], zl = {
1618
1671
  __name: "tabs",
1619
1672
  props: {
1620
- items: { type: Array, default: [] },
1673
+ items: { type: Array, default: () => [] },
1621
1674
  activeIndex: { type: Number, default: 0 }
1622
1675
  },
1623
- emits: ["update:active-index"],
1676
+ emits: ["update:activeIndex"],
1624
1677
  setup(e, { emit: d }) {
1625
- const t = e, s = d, a = w(t.items[t.activeIndex] || {}), l = L(() => {
1626
- let n = [];
1627
- return t.items.forEach((o, i) => {
1628
- o.disabled || n.push({ label: o.name, key: i });
1629
- }), n;
1678
+ const t = e, o = d, a = $(t.items[t.activeIndex] || {}), l = L(() => {
1679
+ let s = [];
1680
+ return t.items.forEach((n, r) => {
1681
+ n.disabled || s.push({ label: n.name, key: r });
1682
+ }), s;
1630
1683
  });
1631
- K(() => t.activeIndex, (n) => {
1632
- a.value = t.items[n] || {};
1684
+ X(() => t.activeIndex, (s) => {
1685
+ a.value = t.items[s] || {};
1633
1686
  });
1634
- const c = (n) => {
1635
- n.disabled || (a.value = n, s("update:active-index", t.items.indexOf(n)));
1687
+ const c = (s) => {
1688
+ s.disabled || (a.value = s, o("update:activeIndex", t.items.indexOf(s)));
1636
1689
  };
1637
- return (n, o) => (u(), m(O, null, [
1638
- v("div", hl, [
1639
- E(Lt, {
1690
+ return (s, n) => (i(), m(z, null, [
1691
+ v("div", fl, [
1692
+ Y(Bt, {
1640
1693
  options: l.value,
1641
1694
  "model-value": e.activeIndex,
1642
- "onUpdate:modelValue": o[0] || (o[0] = (i) => s("update:activeIndex", i)),
1643
- class: "w-full"
1695
+ class: "w-full",
1696
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o("update:activeIndex", r))
1644
1697
  }, null, 8, ["options", "model-value"])
1645
1698
  ]),
1646
- v("div", gl, [
1699
+ v("div", hl, [
1647
1700
  v("div", pl, [
1648
- v("nav", bl, [
1649
- (u(!0), m(O, null, _(e.items, (i) => (u(), m("a", {
1650
- key: i.name,
1701
+ v("nav", gl, [
1702
+ (i(!0), m(z, null, j(e.items, (r) => (i(), m("a", {
1703
+ key: r.name,
1651
1704
  href: "#",
1652
- onClick: N((r) => c(i), ["prevent"]),
1653
- class: $([
1654
- "group inline-flex items-center py-4 px-1 border-b-4 font-medium !no-underline border-transparent",
1705
+ class: C([
1706
+ "group inline-flex items-center py-4 px-1 border-b-4 font-medium no-underline! border-transparent",
1655
1707
  {
1656
- "border-vxvue text-vxvue": a.value === i,
1657
- "cursor-not-allowed text-gray-400": i.disabled,
1658
- "text-gray-900 hover:text-vxvue-600 hover:border-vxvue-600": a.value !== i && !i.disabled
1708
+ "border-vxvue text-vxvue": a.value === r,
1709
+ "cursor-not-allowed text-gray-400": r.disabled,
1710
+ "text-gray-900 hover:text-vxvue-600 hover:border-vxvue-600": a.value !== r && !r.disabled
1659
1711
  }
1660
1712
  ]),
1661
- "aria-current": a.value === i ? "page" : void 0
1713
+ "aria-current": a.value === r ? "page" : void 0,
1714
+ onClick: E((u) => c(r), ["prevent"])
1662
1715
  }, [
1663
- A(n.$slots, "icon", { tab: i }),
1716
+ P(s.$slots, "icon", { tab: r }),
1664
1717
  v("span", null, [
1665
- A(n.$slots, "default", { tab: i }, () => [
1666
- X(B(i.name), 1)
1718
+ P(s.$slots, "default", { tab: r }, () => [
1719
+ J(T(r.name), 1)
1667
1720
  ])
1668
1721
  ]),
1669
- A(n.$slots, "badge", { tab: i }, () => [
1670
- i.badge ? (u(), m("span", {
1722
+ P(s.$slots, "badge", { tab: r }, () => [
1723
+ r.badge ? (i(), m("span", {
1671
1724
  key: 0,
1672
- class: $([
1725
+ class: C([
1673
1726
  "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block text-current",
1674
1727
  {
1675
- "bg-gray-100": i.disabled,
1676
- "bg-vxvue-50": a.value === i,
1677
- "bg-gray-200": a.value !== i && !i.disabled
1728
+ "bg-gray-100": r.disabled,
1729
+ "bg-vxvue-50": a.value === r,
1730
+ "bg-gray-200": a.value !== r && !r.disabled
1678
1731
  }
1679
1732
  ])
1680
- }, B(i.badge), 3)) : P("", !0)
1733
+ }, T(r.badge), 3)) : I("", !0)
1681
1734
  ])
1682
- ], 10, xl))), 128))
1735
+ ], 10, bl))), 128))
1683
1736
  ])
1684
1737
  ])
1685
1738
  ])
@@ -1687,24 +1740,24 @@ const ll = ["value", "type"], al = ["disabled"], Ll = /* @__PURE__ */ Object.ass
1687
1740
  }
1688
1741
  };
1689
1742
  export {
1690
- wl as Accordion,
1691
- kl as AccordionPanel,
1692
- $l as Autocomplete,
1693
- Sl as Confirm,
1694
- gt as DateInput,
1695
- Cl as Datepicker,
1696
- Vl as FormFileButton,
1697
- Lt as FormSelect,
1743
+ yl as Accordion,
1744
+ wl as AccordionPanel,
1745
+ kl as Autocomplete,
1746
+ $l as Confirm,
1747
+ pt as DateInput,
1748
+ Sl as Datepicker,
1749
+ Cl as FormFileButton,
1750
+ Bt as FormSelect,
1698
1751
  Ml as FormSwitch,
1699
- Dl as MessageToast,
1700
- Al as Modal,
1701
- Bl as Pagination,
1702
- Ll as PasswordInput,
1752
+ Vl as MessageToast,
1753
+ Dl as Modal,
1754
+ Al as Pagination,
1755
+ Bl as PasswordInput,
1703
1756
  Pl as SimpleTree,
1704
1757
  Tl as Sizable,
1705
- Il as Slider,
1706
- Ol as Sortable,
1758
+ Ll as Slider,
1759
+ Il as Sortable,
1707
1760
  we as Spinner,
1708
- zl as SubmitButton,
1709
- Fl as Tabs
1761
+ Ol as SubmitButton,
1762
+ zl as Tabs
1710
1763
  };