vx-vue 0.6.4 → 0.7.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,144 +1,144 @@
1
- import { getCurrentScope as xe, onScopeDispose as ye, unref as A, watch as j, useAttrs as q, ref as g, computed as S, onUpdated as we, openBlock as u, createElementBlock as c, normalizeClass as w, createElementVNode as i, mergeProps as Y, withKeys as H, withModifiers as P, createCommentVNode as C, Fragment as D, renderList as B, renderSlot as M, toDisplayString as _, createVNode as E, Transition as ee, withCtx as K, createTextVNode as F, nextTick as te, toValue as se, withDirectives as oe, vModelText as ke, createBlock as R, onMounted as re, pushScopeId as $e, popScopeId as _e, resolveDynamicComponent as ue, resolveComponent as Ce, vShow as Se } from "vue";
2
- function Me(e) {
3
- return xe() ? (ye(e), !0) : !1;
1
+ import { getCurrentScope as ye, onScopeDispose as we, unref as F, watch as Y, useAttrs as U, ref as y, computed as S, onUpdated as ke, openBlock as r, createElementBlock as c, normalizeClass as _, createElementVNode as i, mergeProps as O, withKeys as K, withModifiers as M, createCommentVNode as D, Fragment as A, renderList as B, renderSlot as P, toDisplayString as C, createVNode as z, Transition as te, withCtx as G, createTextVNode as E, nextTick as le, toValue as se, withDirectives as re, vModelText as $e, createBlock as W, onMounted as ue, pushScopeId as _e, popScopeId as Ce, resolveDynamicComponent as ie, resolveComponent as Se, vShow as Me, normalizeStyle as Ve } from "vue";
2
+ function De(e) {
3
+ return ye() ? (we(e), !0) : !1;
4
4
  }
5
- function ie(e) {
6
- return typeof e == "function" ? e() : A(e);
5
+ function ce(e) {
6
+ return typeof e == "function" ? e() : F(e);
7
7
  }
8
- const ce = typeof window < "u" && typeof document < "u", De = Object.prototype.toString, Ve = (e) => De.call(e) === "[object Object]", Q = () => {
9
- }, Pe = /* @__PURE__ */ Ae();
10
- function Ae() {
8
+ const de = typeof window < "u" && typeof document < "u", Ae = Object.prototype.toString, Pe = (e) => Ae.call(e) === "[object Object]", ee = () => {
9
+ }, Fe = /* @__PURE__ */ Te();
10
+ function Te() {
11
11
  var e;
12
- return ce && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
12
+ return de && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
13
13
  }
14
- const Be = /\[([^\]]+)]|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;
15
- function Ie(e, o, l, s) {
16
- let t = e < 12 ? "AM" : "PM";
17
- return s && (t = t.split("").reduce((r, n) => r += `${n}.`, "")), l ? t.toLowerCase() : t;
14
+ const Le = /\[([^\]]+)]|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;
15
+ function Be(e, m, t, s) {
16
+ let a = e < 12 ? "AM" : "PM";
17
+ return s && (a = a.split("").reduce((l, d) => l += `${d}.`, "")), t ? a.toLowerCase() : a;
18
18
  }
19
- function ae(e, o, l = {}) {
19
+ function ne(e, m, t = {}) {
20
20
  var s;
21
- const t = e.getFullYear(), r = e.getMonth(), n = e.getDate(), a = e.getHours(), d = e.getMinutes(), v = e.getSeconds(), h = e.getMilliseconds(), m = e.getDay(), f = (s = l.customMeridiem) != null ? s : Ie, p = {
22
- YY: () => String(t).slice(-2),
23
- YYYY: () => t,
24
- M: () => r + 1,
25
- MM: () => `${r + 1}`.padStart(2, "0"),
26
- MMM: () => e.toLocaleDateString(l.locales, { month: "short" }),
27
- MMMM: () => e.toLocaleDateString(l.locales, { month: "long" }),
28
- D: () => String(n),
29
- DD: () => `${n}`.padStart(2, "0"),
30
- H: () => String(a),
31
- HH: () => `${a}`.padStart(2, "0"),
32
- h: () => `${a % 12 || 12}`.padStart(1, "0"),
33
- hh: () => `${a % 12 || 12}`.padStart(2, "0"),
34
- m: () => String(d),
35
- mm: () => `${d}`.padStart(2, "0"),
21
+ const a = e.getFullYear(), l = e.getMonth(), d = e.getDate(), n = e.getHours(), o = e.getMinutes(), v = e.getSeconds(), u = e.getMilliseconds(), b = e.getDay(), f = (s = t.customMeridiem) != null ? s : Be, g = {
22
+ YY: () => String(a).slice(-2),
23
+ YYYY: () => a,
24
+ M: () => l + 1,
25
+ MM: () => `${l + 1}`.padStart(2, "0"),
26
+ MMM: () => e.toLocaleDateString(t.locales, { month: "short" }),
27
+ MMMM: () => e.toLocaleDateString(t.locales, { month: "long" }),
28
+ D: () => String(d),
29
+ DD: () => `${d}`.padStart(2, "0"),
30
+ H: () => String(n),
31
+ HH: () => `${n}`.padStart(2, "0"),
32
+ h: () => `${n % 12 || 12}`.padStart(1, "0"),
33
+ hh: () => `${n % 12 || 12}`.padStart(2, "0"),
34
+ m: () => String(o),
35
+ mm: () => `${o}`.padStart(2, "0"),
36
36
  s: () => String(v),
37
37
  ss: () => `${v}`.padStart(2, "0"),
38
- SSS: () => `${h}`.padStart(3, "0"),
39
- d: () => m,
40
- dd: () => e.toLocaleDateString(l.locales, { weekday: "narrow" }),
41
- ddd: () => e.toLocaleDateString(l.locales, { weekday: "short" }),
42
- dddd: () => e.toLocaleDateString(l.locales, { weekday: "long" }),
43
- A: () => f(a, d),
44
- AA: () => f(a, d, !1, !0),
45
- a: () => f(a, d, !0),
46
- aa: () => f(a, d, !0, !0)
38
+ SSS: () => `${u}`.padStart(3, "0"),
39
+ d: () => b,
40
+ dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
41
+ ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
42
+ dddd: () => e.toLocaleDateString(t.locales, { weekday: "long" }),
43
+ A: () => f(n, o),
44
+ AA: () => f(n, o, !1, !0),
45
+ a: () => f(n, o, !0),
46
+ aa: () => f(n, o, !0, !0)
47
47
  };
48
- return o.replace(Be, ($, N) => {
49
- var L, z;
50
- return (z = N ?? ((L = p[$]) == null ? void 0 : L.call(p))) != null ? z : $;
48
+ return m.replace(Le, (w, L) => {
49
+ var I, T;
50
+ return (T = L ?? ((I = g[w]) == null ? void 0 : I.call(g))) != null ? T : w;
51
51
  });
52
52
  }
53
- function W(e) {
54
- var o;
55
- const l = ie(e);
56
- return (o = l == null ? void 0 : l.$el) != null ? o : l;
53
+ function X(e) {
54
+ var m;
55
+ const t = ce(e);
56
+ return (m = t == null ? void 0 : t.$el) != null ? m : t;
57
57
  }
58
- const de = ce ? window : void 0;
59
- function J(...e) {
60
- let o, l, s, t;
61
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, s, t] = e, o = de) : [o, l, s, t] = e, !o)
62
- return Q;
63
- Array.isArray(l) || (l = [l]), Array.isArray(s) || (s = [s]);
64
- const r = [], n = () => {
65
- r.forEach((h) => h()), r.length = 0;
66
- }, a = (h, m, f, p) => (h.addEventListener(m, f, p), () => h.removeEventListener(m, f, p)), d = j(
67
- () => [W(o), ie(t)],
68
- ([h, m]) => {
69
- if (n(), !h)
58
+ const ve = de ? window : void 0;
59
+ function Q(...e) {
60
+ let m, t, s, a;
61
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, a] = e, m = ve) : [m, t, s, a] = e, !m)
62
+ return ee;
63
+ Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
64
+ const l = [], d = () => {
65
+ l.forEach((u) => u()), l.length = 0;
66
+ }, n = (u, b, f, g) => (u.addEventListener(b, f, g), () => u.removeEventListener(b, f, g)), o = Y(
67
+ () => [X(m), ce(a)],
68
+ ([u, b]) => {
69
+ if (d(), !u)
70
70
  return;
71
- const f = Ve(m) ? { ...m } : m;
72
- r.push(
73
- ...l.flatMap((p) => s.map(($) => a(h, p, $, f)))
71
+ const f = Pe(b) ? { ...b } : b;
72
+ l.push(
73
+ ...t.flatMap((g) => s.map((w) => n(u, g, w, f)))
74
74
  );
75
75
  },
76
76
  { immediate: !0, flush: "post" }
77
77
  ), v = () => {
78
- d(), n();
78
+ o(), d();
79
79
  };
80
- return Me(v), v;
80
+ return De(v), v;
81
81
  }
82
- let ne = !1;
83
- function le(e, o, l = {}) {
84
- const { window: s = de, ignore: t = [], capture: r = !0, detectIframe: n = !1 } = l;
82
+ let oe = !1;
83
+ function ae(e, m, t = {}) {
84
+ const { window: s = ve, ignore: a = [], capture: l = !0, detectIframe: d = !1 } = t;
85
85
  if (!s)
86
86
  return;
87
- Pe && !ne && (ne = !0, Array.from(s.document.body.children).forEach((f) => f.addEventListener("click", Q)), s.document.documentElement.addEventListener("click", Q));
88
- let a = !0;
89
- const d = (f) => t.some((p) => {
90
- if (typeof p == "string")
91
- return Array.from(s.document.querySelectorAll(p)).some(($) => $ === f.target || f.composedPath().includes($));
87
+ Fe && !oe && (oe = !0, Array.from(s.document.body.children).forEach((f) => f.addEventListener("click", ee)), s.document.documentElement.addEventListener("click", ee));
88
+ let n = !0;
89
+ const o = (f) => a.some((g) => {
90
+ if (typeof g == "string")
91
+ return Array.from(s.document.querySelectorAll(g)).some((w) => w === f.target || f.composedPath().includes(w));
92
92
  {
93
- const $ = W(p);
94
- return $ && (f.target === $ || f.composedPath().includes($));
93
+ const w = X(g);
94
+ return w && (f.target === w || f.composedPath().includes(w));
95
95
  }
96
- }), h = [
97
- J(s, "click", (f) => {
98
- const p = W(e);
99
- if (!(!p || p === f.target || f.composedPath().includes(p))) {
100
- if (f.detail === 0 && (a = !d(f)), !a) {
101
- a = !0;
96
+ }), u = [
97
+ Q(s, "click", (f) => {
98
+ const g = X(e);
99
+ if (!(!g || g === f.target || f.composedPath().includes(g))) {
100
+ if (f.detail === 0 && (n = !o(f)), !n) {
101
+ n = !0;
102
102
  return;
103
103
  }
104
- o(f);
104
+ m(f);
105
105
  }
106
- }, { passive: !0, capture: r }),
107
- J(s, "pointerdown", (f) => {
108
- const p = W(e);
109
- p && (a = !f.composedPath().includes(p) && !d(f));
106
+ }, { passive: !0, capture: l }),
107
+ Q(s, "pointerdown", (f) => {
108
+ const g = X(e);
109
+ g && (n = !f.composedPath().includes(g) && !o(f));
110
110
  }, { passive: !0 }),
111
- n && J(s, "blur", (f) => {
111
+ d && Q(s, "blur", (f) => {
112
112
  setTimeout(() => {
113
- var p;
114
- const $ = W(e);
115
- ((p = s.document.activeElement) == null ? void 0 : p.tagName) === "IFRAME" && !($ != null && $.contains(s.document.activeElement)) && o(f);
113
+ var g;
114
+ const w = X(e);
115
+ ((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(s.document.activeElement)) && m(f);
116
116
  }, 0);
117
117
  })
118
118
  ].filter(Boolean);
119
- return () => h.forEach((f) => f());
119
+ return () => u.forEach((f) => f());
120
120
  }
121
- const Fe = ["value", "onKeydown"], Le = { class: "absolute right-0 pr-3 flex items-center inset-y-0 text-vxvue-700" }, Te = {
121
+ const Ie = ["value", "onKeydown"], Oe = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, je = {
122
122
  key: 0,
123
- class: "animate-spin w-5 h-5",
123
+ class: "w-5 h-5 animate-spin",
124
124
  xmlns: "http://www.w3.org/2000/svg",
125
125
  fill: "none",
126
126
  viewBox: "0 0 24 24"
127
- }, Oe = /* @__PURE__ */ i("circle", {
127
+ }, Ee = /* @__PURE__ */ i("circle", {
128
128
  class: "opacity-25",
129
129
  cx: "12",
130
130
  cy: "12",
131
131
  r: "10",
132
132
  stroke: "currentColor",
133
133
  "stroke-width": "4"
134
- }, null, -1), je = /* @__PURE__ */ i("path", {
134
+ }, null, -1), Ne = /* @__PURE__ */ i("path", {
135
135
  class: "opacity-75",
136
136
  fill: "currentColor",
137
137
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
138
138
  }, null, -1), Ye = [
139
- Oe,
140
- je
141
- ], fl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
139
+ Ee,
140
+ Ne
141
+ ], pl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
142
142
  __name: "autocomplete",
143
143
  props: {
144
144
  modelValue: { type: String, default: "" },
@@ -151,19 +151,19 @@ const Fe = ["value", "onKeydown"], Le = { class: "absolute right-0 pr-3 flex ite
151
151
  getResultValue: { type: Function, default: (e) => e }
152
152
  },
153
153
  emits: ["update:modelValue", "blur", "submit"],
154
- setup(e, { emit: o }) {
155
- const l = e, s = q(), r = (() => {
156
- let b = 0;
157
- return (x) => (x || "") + ++b;
158
- })()((s.id || "autocomplete") + "-"), n = g([]), a = g(-1), d = g(0), v = g(!1), h = g(!1), m = g("top-0 translate-y-12"), f = g(!0), p = g(null), $ = g(null), N = g(null), L = S(
159
- () => n.value.map((b, x) => ({
160
- id: (s.id || "autocomplete") + "-item-" + x,
161
- class: ["autocomplete-item", l.resultItemClass, { "bg-vxvue-700 text-white": a.value === x }],
162
- "data-result-index": x,
154
+ setup(e, { emit: m }) {
155
+ const t = m, s = e, a = U(), d = (() => {
156
+ let k = 0;
157
+ return ($) => ($ || "") + ++k;
158
+ })()((a.id || "autocomplete") + "-"), n = y([]), o = y(-1), v = y(0), u = y(!1), b = y(!1), f = y("top-0 translate-y-12"), g = y(!0), w = y(null), L = y(null), I = y(null), T = S(
159
+ () => n.value.map((k, $) => ({
160
+ id: (a.id || "autocomplete") + "-item-" + $,
161
+ class: ["autocomplete-item", s.resultItemClass, { "bg-vxvue-700 text-white": o.value === $ }],
162
+ "data-result-index": $,
163
163
  role: "option",
164
- ...a.value === x ? { "aria-selected": "true" } : {}
164
+ ...o.value === $ ? { "aria-selected": "true" } : {}
165
165
  }))
166
- ), z = S(() => ({
166
+ ), H = S(() => ({
167
167
  role: "combobox",
168
168
  autocomplete: "off",
169
169
  autocapitalize: "off",
@@ -171,117 +171,117 @@ const Fe = ["value", "onKeydown"], Le = { class: "absolute right-0 pr-3 flex ite
171
171
  spellcheck: "false",
172
172
  "aria-autocomplete": "list",
173
173
  "aria-haspopup": "listbox",
174
- "aria-owns": r,
175
- "aria-expanded": v.value ? "true" : "false",
176
- "aria-activedescendant": a.value > -1 ? L.value[a.value].id : "",
177
- ...s
178
- })), y = S(() => ({
179
- id: r,
180
- class: ["autocomplete-list absolute min-w-full transform z-10", l.resultListClass, m.value],
174
+ "aria-owns": d,
175
+ "aria-expanded": u.value ? "true" : "false",
176
+ "aria-activedescendant": o.value > -1 ? T.value[o.value].id : "",
177
+ ...a
178
+ })), h = S(() => ({
179
+ id: d,
180
+ class: ["autocomplete-list absolute min-w-full transform z-10", s.resultListClass, f.value],
181
181
  role: "listbox"
182
- })), V = () => {
183
- a.value = -1, n.value = [], v.value = !1, f.value = !0;
184
- }, k = (b) => {
185
- const x = l.search(b);
186
- if (x instanceof Promise) {
187
- const O = ++d.value;
188
- h.value = !0, x.then((I) => {
189
- O === d.value && (n.value = I, h.value = !1, n.value.length ? (a.value = l.autoSelect ? 0 : -1, v.value = !0) : V());
182
+ })), p = () => {
183
+ o.value = -1, n.value = [], u.value = !1, g.value = !0;
184
+ }, x = (k) => {
185
+ const $ = s.search(k);
186
+ if ($ instanceof Promise) {
187
+ const N = ++v.value;
188
+ b.value = !0, $.then((j) => {
189
+ N === v.value && (n.value = j, b.value = !1, n.value.length ? (o.value = s.autoSelect ? 0 : -1, u.value = !0) : p());
190
190
  });
191
191
  } else
192
- n.value = x, n.value.length === 0 ? V() : (a.value = l.autoSelect ? 0 : -1, v.value = !0);
193
- }, T = () => {
194
- const b = n.value[a.value];
195
- return b && o("update:modelValue", l.getResultValue(b)), V(), b;
196
- }, X = (b) => {
197
- o("update:modelValue", b), k(b);
198
- }, G = (b) => k(b.target.value), U = () => {
199
- V(), o("blur");
200
- }, Z = () => {
201
- const b = n.value.length;
202
- a.value = ((a.value - 1) % b + b) % b;
203
- }, he = (b) => {
204
- v.value || G(b);
205
- const x = n.value.length;
206
- a.value = ((a.value + 1) % x + x) % x;
207
- }, me = () => {
208
- V(), o("update:modelValue", "");
209
- }, ge = () => o("submit", T()), be = (b) => {
210
- const x = b.target.closest("[data-result-index]");
211
- x && (a.value = parseInt(x.dataset.resultIndex, 10), o("submit", T()));
192
+ n.value = $, n.value.length === 0 ? p() : (o.value = s.autoSelect ? 0 : -1, u.value = !0);
193
+ }, V = () => {
194
+ const k = n.value[o.value];
195
+ return k && t("update:modelValue", s.getResultValue(k)), p(), k;
196
+ }, R = (k) => {
197
+ t("update:modelValue", k), x(k);
198
+ }, Z = (k) => x(k.target.value), q = () => {
199
+ p(), t("blur");
200
+ }, J = () => {
201
+ const k = n.value.length;
202
+ o.value = ((o.value - 1) % k + k) % k;
203
+ }, pe = (k) => {
204
+ u.value || Z(k);
205
+ const $ = n.value.length;
206
+ o.value = ((o.value + 1) % $ + $) % $;
207
+ }, ge = () => {
208
+ p(), t("update:modelValue", "");
209
+ }, be = () => t("submit", V()), xe = (k) => {
210
+ const $ = k.target.closest("[data-result-index]");
211
+ $ && (o.value = parseInt($.dataset.resultIndex, 10), t("submit", V()));
212
212
  };
213
- return le(N, V), we(() => {
214
- if (p.value) {
215
- const b = $.value.getBoundingClientRect(), x = p.value.getBoundingClientRect();
216
- f.value && n.value.length && (f.value = !1, m.value = b.bottom + x.height > window.innerHeight && window.innerHeight - b.bottom < b.top && window.pageYOffset + b.top - x.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
217
- const O = p.value.querySelector('[data-result-index="' + a.value + '"]');
218
- if (O) {
219
- let I = O.getBoundingClientRect();
220
- I.top < x.top ? p.value.scrollTop -= x.top - I.top : I.bottom > x.bottom && (p.value.scrollTop += I.bottom - x.bottom);
213
+ return ae(I, p), ke(() => {
214
+ if (w.value) {
215
+ const k = L.value.getBoundingClientRect(), $ = w.value.getBoundingClientRect();
216
+ g.value && n.value.length && (g.value = !1, f.value = k.bottom + $.height > window.innerHeight && window.innerHeight - k.bottom < k.top && window.pageYOffset + k.top - $.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
217
+ const N = w.value.querySelector('[data-result-index="' + o.value + '"]');
218
+ if (N) {
219
+ let j = N.getBoundingClientRect();
220
+ j.top < $.top ? w.value.scrollTop -= $.top - j.top : j.bottom > $.bottom && (w.value.scrollTop += j.bottom - $.bottom);
221
221
  }
222
222
  }
223
- }), (b, x) => (u(), c("div", {
224
- class: w(["relative inline-block", b.$attrs.class]),
223
+ }), (k, $) => (r(), c("div", {
224
+ class: _(["inline-block relative", k.$attrs.class]),
225
225
  ref_key: "container",
226
- ref: N
226
+ ref: I
227
227
  }, [
228
- i("input", Y({
228
+ i("input", O({
229
229
  ref_key: "input",
230
- ref: $,
231
- class: "form-input w-full block focus:border-vxvue pr-10",
230
+ ref: L,
231
+ class: "block pr-10 w-full form-input focus:border-vxvue",
232
232
  value: e.modelValue
233
- }, z.value, {
234
- onInput: x[0] || (x[0] = (O) => X(O.target.value)),
233
+ }, H.value, {
234
+ onInput: $[0] || ($[0] = (N) => R(N.target.value)),
235
235
  onKeydown: [
236
- H(ge, ["enter"]),
237
- H(me, ["esc"]),
238
- H(T, ["tab"]),
239
- H(P(Z, ["prevent"]), ["up"]),
240
- H(P(he, ["prevent"]), ["down"])
236
+ K(be, ["enter"]),
237
+ K(ge, ["esc"]),
238
+ K(V, ["tab"]),
239
+ K(M(J, ["prevent"]), ["up"]),
240
+ K(M(pe, ["prevent"]), ["down"])
241
241
  ],
242
- onFocus: G,
243
- onBlur: U
244
- }), null, 16, Fe),
245
- i("span", Le, [
246
- h.value ? (u(), c("svg", Te, Ye)) : C("", !0)
242
+ onFocus: Z,
243
+ onBlur: q
244
+ }), null, 16, Ie),
245
+ i("span", Oe, [
246
+ b.value ? (r(), c("svg", je, Ye)) : D("", !0)
247
247
  ]),
248
- n.value.length ? (u(), c("ul", Y({
248
+ n.value.length ? (r(), c("ul", O({
249
249
  key: 0,
250
250
  ref_key: "resultList",
251
- ref: p
252
- }, y.value, {
253
- onClick: be,
254
- onMousedown: x[1] || (x[1] = P(() => {
251
+ ref: w
252
+ }, h.value, {
253
+ onClick: xe,
254
+ onMousedown: $[1] || ($[1] = M(() => {
255
255
  }, ["prevent"]))
256
256
  }), [
257
- (u(!0), c(D, null, B(n.value, (O, I) => M(b.$slots, "result", {
258
- result: O,
259
- props: L.value[I]
257
+ (r(!0), c(A, null, B(n.value, (N, j) => P(k.$slots, "result", {
258
+ result: N,
259
+ props: T.value[j]
260
260
  }, () => [
261
- (u(), c("li", Y({
262
- key: L.value[I].id
263
- }, L.value[I]), _(e.getResultValue(O)), 17))
261
+ (r(), c("li", O({
262
+ key: T.value[j].id
263
+ }, T.value[j]), C(e.getResultValue(N)), 17))
264
264
  ])), 256))
265
- ], 16)) : C("", !0)
265
+ ], 16)) : D("", !0)
266
266
  ], 2));
267
267
  }
268
- }), Ee = {
268
+ }), ze = {
269
269
  key: 0,
270
270
  class: "fixed inset-0 z-50 bg-black bg-opacity-50 backdrop-blur-sm",
271
271
  "aria-hidden": "true"
272
- }, Ne = {
272
+ }, Re = {
273
273
  key: 0,
274
274
  class: "overflow-y-auto fixed inset-0 z-50"
275
- }, ze = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, Re = { key: 0 }, Ue = /* @__PURE__ */ i("span", {
275
+ }, He = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, Ue = { key: 0 }, We = /* @__PURE__ */ i("span", {
276
276
  class: "hidden sm:inline-block sm:h-screen sm:align-middle",
277
277
  "aria-hidden": "true"
278
- }, "​", -1), He = { 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" }, We = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, qe = { class: "flex flex-row items-center" }, Ke = { class: "flex-shrink-0" }, Ge = { class: "flex-grow text-center" }, Xe = ["onClick"], pl = {
278
+ }, "​", -1), qe = { 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" }, Ke = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, Xe = { class: "flex flex-row items-center" }, Ge = { class: "flex-shrink-0" }, Ze = { class: "flex-grow text-center" }, Je = ["onClick"], gl = {
279
279
  __name: "confirm",
280
280
  props: {
281
281
  buttons: {
282
282
  type: [Object, Array],
283
283
  default: { label: "Ok" },
284
- validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((o) => o.label !== "undefined" && o.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
284
+ validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((m) => m.label !== "undefined" && m.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
285
285
  },
286
286
  headerClass: {
287
287
  type: String,
@@ -292,37 +292,37 @@ const Fe = ["value", "onKeydown"], Le = { class: "absolute right-0 pr-3 flex ite
292
292
  default: "button"
293
293
  }
294
294
  },
295
- setup(e, { expose: o }) {
296
- const l = e, s = g(""), t = g(""), r = g(!1);
297
- let n = null, a = null;
298
- const d = S(() => Array.isArray(l.buttons) ? l.buttons : [l.buttons]), v = g(null);
299
- return o({ open: (m, f) => (s.value = m, t.value = f, r.value = !0, te(() => v.value.firstElementChild.focus()), new Promise((p, $) => {
300
- n = p, a = $;
301
- })) }), (m, f) => (u(), c(D, null, [
302
- r.value ? (u(), c("div", Ee)) : C("", !0),
303
- E(ee, { name: "appear" }, {
304
- default: K(() => [
305
- r.value ? (u(), c("div", Ne, [
306
- i("div", ze, [
307
- r.value ? (u(), c("div", Re, [
308
- Ue,
309
- i("div", He, [
310
- s.value ? (u(), c("h3", {
295
+ setup(e, { expose: m }) {
296
+ const t = e, s = y(""), a = y(""), l = y(!1);
297
+ let d = null, n = null;
298
+ const o = S(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), v = y(null);
299
+ return m({ open: (b, f) => (s.value = b, a.value = f, l.value = !0, le(() => v.value.firstElementChild.focus()), new Promise((g, w) => {
300
+ d = g, n = w;
301
+ })) }), (b, f) => (r(), c(A, null, [
302
+ l.value ? (r(), c("div", ze)) : D("", !0),
303
+ z(te, { name: "appear" }, {
304
+ default: G(() => [
305
+ l.value ? (r(), c("div", Re, [
306
+ i("div", He, [
307
+ l.value ? (r(), c("div", Ue, [
308
+ We,
309
+ i("div", qe, [
310
+ s.value ? (r(), c("h3", {
311
311
  key: 0,
312
- class: w(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
312
+ class: _(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
313
313
  }, [
314
- M(m.$slots, "title", { title: s.value }, () => [
315
- F(_(s.value), 1)
314
+ P(b.$slots, "title", { title: s.value }, () => [
315
+ E(C(s.value), 1)
316
316
  ])
317
- ], 2)) : C("", !0),
318
- i("div", We, [
319
- i("div", qe, [
320
- i("div", Ke, [
321
- M(m.$slots, "icon")
317
+ ], 2)) : D("", !0),
318
+ i("div", Ke, [
319
+ i("div", Xe, [
320
+ i("div", Ge, [
321
+ P(b.$slots, "icon")
322
322
  ]),
323
- i("p", Ge, [
324
- M(m.$slots, "default", { message: t.value }, () => [
325
- F(_(t.value), 1)
323
+ i("p", Ze, [
324
+ P(b.$slots, "default", { message: a.value }, () => [
325
+ E(C(a.value), 1)
326
326
  ])
327
327
  ])
328
328
  ]),
@@ -331,52 +331,52 @@ const Fe = ["value", "onKeydown"], Le = { class: "absolute right-0 pr-3 flex ite
331
331
  ref_key: "buttonsContainer",
332
332
  ref: v
333
333
  }, [
334
- (u(!0), c(D, null, B(d.value, (p, $) => (u(), c("button", {
335
- class: w([e.buttonClass, p.class]),
336
- onClick: P((N) => {
337
- r.value = !1, $ === 0 ? A(n)() : A(a)();
334
+ (r(!0), c(A, null, B(o.value, (g, w) => (r(), c("button", {
335
+ class: _([e.buttonClass, g.class]),
336
+ onClick: M((L) => {
337
+ l.value = !1, w === 0 ? F(d)() : F(n)();
338
338
  }, ["prevent"])
339
- }, _(p.label), 11, Xe))), 256))
339
+ }, C(g.label), 11, Je))), 256))
340
340
  ], 512)
341
341
  ])
342
342
  ])
343
- ])) : C("", !0)
343
+ ])) : D("", !0)
344
344
  ])
345
- ])) : C("", !0)
345
+ ])) : D("", !0)
346
346
  ]),
347
347
  _: 3
348
348
  })
349
349
  ], 64));
350
350
  }
351
351
  };
352
- function Ze(e, o) {
353
- const l = g(!1), s = se(o);
354
- let t, r = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = [];
355
- if ((t = s.match(/\bd\b/gi)) && t.length === 1)
356
- r = r.replace("d", "(\\d{1,2})");
357
- else if ((t = s.match(/\bdd\b/gi)) && t.length === 1)
358
- r = r.replace("dd", "(\\d{2})");
352
+ function Qe(e, m) {
353
+ const t = y(!1), s = se(m);
354
+ let a, l = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = [];
355
+ if ((a = s.match(/\bd\b/gi)) && a.length === 1)
356
+ l = l.replace("d", "(\\d{1,2})");
357
+ else if ((a = s.match(/\bdd\b/gi)) && a.length === 1)
358
+ l = l.replace("dd", "(\\d{2})");
359
359
  else
360
- return { date: l };
361
- if (n.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (t = s.match(/\bm\b/gi)) && t.length === 1)
362
- r = r.replace("m", "(\\d{1,2})");
363
- else if ((t = s.match(/\bmm\b/gi)) && t.length === 1)
364
- r = r.replace("mm", "(\\d{2})");
360
+ return { date: t };
361
+ if (d.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (a = s.match(/\bm\b/gi)) && a.length === 1)
362
+ l = l.replace("m", "(\\d{1,2})");
363
+ else if ((a = s.match(/\bmm\b/gi)) && a.length === 1)
364
+ l = l.replace("mm", "(\\d{2})");
365
365
  else
366
- return { date: l };
367
- if (n.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (t = s.match(/\byyyy\b/gi)) && t.length === 1)
368
- r = r.replace("yyyy", "(\\d{4})");
366
+ return { date: t };
367
+ if (d.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (a = s.match(/\byyyy\b/gi)) && a.length === 1)
368
+ l = l.replace("yyyy", "(\\d{4})");
369
369
  else
370
- return { date: l };
371
- if (n.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(t = se(e).match(r)))
372
- return { date: l };
373
- t.shift(), n.sort((h, m) => h.srcPos < m.srcPos ? -1 : 1);
374
- let a = [], d, v;
375
- for (; d = t.shift(); )
376
- v = n.shift(), a[v.destPos] = d;
377
- return a = Date.parse(a.join("-")), a && (a = new Date(a), l.value = new Date(a.getFullYear(), a.getMonth(), a.getDate(), 0, 0, 0)), { date: l };
370
+ return { date: t };
371
+ if (d.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(a = se(e).match(l)))
372
+ return { date: t };
373
+ a.shift(), d.sort((u, b) => u.srcPos < b.srcPos ? -1 : 1);
374
+ let n = [], o, v;
375
+ for (; o = a.shift(); )
376
+ v = d.shift(), n[v.destPos] = o;
377
+ 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 };
378
378
  }
379
- const Je = { key: 0 }, Qe = { class: "text-vxvue-700" }, et = /* @__PURE__ */ i("svg", {
379
+ const et = { key: 0 }, tt = { class: "text-vxvue-700" }, lt = /* @__PURE__ */ i("svg", {
380
380
  class: "w-2 h-2",
381
381
  stroke: "currentColor",
382
382
  fill: "none",
@@ -387,9 +387,9 @@ const Je = { key: 0 }, Qe = { class: "text-vxvue-700" }, et = /* @__PURE__ */ i(
387
387
  "stroke-width": "1.5",
388
388
  d: "M1 1l6 6m0-6L1 7"
389
389
  })
390
- ], -1), tt = [
391
- et
392
- ], lt = /* @__PURE__ */ i("svg", {
390
+ ], -1), at = [
391
+ lt
392
+ ], st = /* @__PURE__ */ i("svg", {
393
393
  xmlns: "http://www.w3.org/2000/svg",
394
394
  class: "w-6 h-6",
395
395
  fill: "none",
@@ -402,9 +402,9 @@ const Je = { key: 0 }, Qe = { class: "text-vxvue-700" }, et = /* @__PURE__ */ i(
402
402
  "stroke-width": "2",
403
403
  d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
404
404
  })
405
- ], -1), st = [
406
- lt
407
- ], at = {
405
+ ], -1), nt = [
406
+ st
407
+ ], ot = {
408
408
  __name: "date-input",
409
409
  props: {
410
410
  outputFormat: { type: String, default: "YYYY-MM-DD" },
@@ -414,49 +414,49 @@ const Je = { key: 0 }, Qe = { class: "text-vxvue-700" }, et = /* @__PURE__ */ i(
414
414
  modelValue: Date
415
415
  },
416
416
  emits: ["update:modelValue", "toggle-datepicker"],
417
- setup(e, { emit: o }) {
418
- const l = e, s = g(""), t = S(() => l.modelValue ? ae(l.modelValue, l.outputFormat) : ""), r = S(() => {
419
- let n = Object.assign({}, q());
417
+ setup(e, { emit: m }) {
418
+ const t = m, s = e, a = y(""), l = S(() => s.modelValue ? ne(s.modelValue, s.outputFormat) : ""), d = S(() => {
419
+ let n = Object.assign({}, U());
420
420
  return delete n.class, n;
421
421
  });
422
- return j(() => l.modelValue, (n) => s.value = n ? ae(n, l.outputFormat) : ""), (n, a) => (u(), c("div", {
423
- class: w(["inline-block relative", n.$attrs.class])
422
+ return Y(() => s.modelValue, (n) => a.value = n ? ne(n, s.outputFormat) : ""), (n, o) => (r(), c("div", {
423
+ class: _(["inline-block relative", n.$attrs.class])
424
424
  }, [
425
- t.value ? (u(), c("div", Je, [
425
+ l.value ? (r(), c("div", et, [
426
426
  i("div", {
427
- class: w(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
427
+ class: _(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
428
428
  }, [
429
- i("span", Qe, _(t.value), 1),
429
+ i("span", tt, C(l.value), 1),
430
430
  i("button", {
431
- onClick: a[0] || (a[0] = (d) => o("update:modelValue", null)),
431
+ onClick: o[0] || (o[0] = (v) => t("update:modelValue", null)),
432
432
  class: "inline-flex flex-shrink-0 justify-center items-center ml-2 w-4 h-4 rounded-full focus:text-white focus:outline-none text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
433
- }, tt)
433
+ }, at)
434
434
  ], 2)
435
- ])) : oe((u(), c("input", Y({
435
+ ])) : re((r(), c("input", O({
436
436
  key: 1,
437
437
  type: "text",
438
- class: ["block w-full form-input focus:border-vxvue peer", { "pr-10": e.showButton }],
439
- "onUpdate:modelValue": a[1] || (a[1] = (d) => s.value = d),
440
- onBlur: a[2] || (a[2] = (d) => {
441
- var v;
442
- return o("update:modelValue", ((v = A(Ze)(s.value, l.inputFormat).date) == null ? void 0 : v.value) || null);
438
+ class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showButton }],
439
+ "onUpdate:modelValue": o[1] || (o[1] = (v) => a.value = v),
440
+ onBlur: o[2] || (o[2] = (v) => {
441
+ var u;
442
+ return t("update:modelValue", ((u = F(Qe)(a.value, s.inputFormat).date) == null ? void 0 : u.value) || null);
443
443
  }),
444
- onInput: a[3] || (a[3] = P(() => {
444
+ onInput: o[3] || (o[3] = M(() => {
445
445
  }, ["prevent"]))
446
- }, r.value), null, 16)), [
447
- [ke, s.value]
446
+ }, d.value), null, 16)), [
447
+ [$e, a.value]
448
448
  ]),
449
- e.showButton ? (u(), c("button", {
449
+ e.showButton ? (r(), c("button", {
450
450
  key: 2,
451
451
  class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
452
- onClick: a[4] || (a[4] = P((d) => o("toggle-datepicker"), ["stop"]))
453
- }, st)) : C("", !0),
454
- M(n.$slots, "default")
452
+ onClick: o[4] || (o[4] = M((v) => t("toggle-datepicker"), ["stop"]))
453
+ }, nt)) : D("", !0),
454
+ P(n.$slots, "default")
455
455
  ], 2));
456
456
  }
457
457
  };
458
- function ve(e, o) {
459
- return u(), c("svg", {
458
+ function me(e, m) {
459
+ return r(), c("svg", {
460
460
  xmlns: "http://www.w3.org/2000/svg",
461
461
  viewBox: "0 0 24 24",
462
462
  fill: "currentColor",
@@ -469,8 +469,8 @@ function ve(e, o) {
469
469
  })
470
470
  ]);
471
471
  }
472
- function fe(e, o) {
473
- return u(), c("svg", {
472
+ function fe(e, m) {
473
+ return r(), c("svg", {
474
474
  xmlns: "http://www.w3.org/2000/svg",
475
475
  viewBox: "0 0 24 24",
476
476
  fill: "currentColor",
@@ -483,8 +483,8 @@ function fe(e, o) {
483
483
  })
484
484
  ]);
485
485
  }
486
- function nt(e, o) {
487
- return u(), c("svg", {
486
+ function rt(e, m) {
487
+ return r(), c("svg", {
488
488
  xmlns: "http://www.w3.org/2000/svg",
489
489
  viewBox: "0 0 24 24",
490
490
  fill: "currentColor",
@@ -497,8 +497,8 @@ function nt(e, o) {
497
497
  })
498
498
  ]);
499
499
  }
500
- function ot(e, o) {
501
- return u(), c("svg", {
500
+ function ut(e, m) {
501
+ return r(), c("svg", {
502
502
  xmlns: "http://www.w3.org/2000/svg",
503
503
  viewBox: "0 0 24 24",
504
504
  fill: "currentColor",
@@ -511,8 +511,8 @@ function ot(e, o) {
511
511
  })
512
512
  ]);
513
513
  }
514
- function rt(e, o) {
515
- return u(), c("svg", {
514
+ function it(e, m) {
515
+ return r(), c("svg", {
516
516
  xmlns: "http://www.w3.org/2000/svg",
517
517
  viewBox: "0 0 24 24",
518
518
  fill: "currentColor",
@@ -525,7 +525,7 @@ function rt(e, o) {
525
525
  })
526
526
  ]);
527
527
  }
528
- const ut = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-700" }, it = ["onClick"], ct = { class: "flex-grow text-center" }, dt = ["onClick"], vt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, ft = ["disabled", "onClick"], hl = {
528
+ const ct = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-700" }, dt = ["onClick"], vt = { class: "flex-grow text-center" }, mt = ["onClick"], ft = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, ht = ["disabled", "onClick"], bl = {
529
529
  __name: "datepicker",
530
530
  props: {
531
531
  modelValue: [Date, Boolean],
@@ -537,98 +537,98 @@ const ut = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-70
537
537
  hasInput: { type: Boolean, default: !0 }
538
538
  },
539
539
  emits: ["update:modelValue", "month-change"],
540
- setup(e, { emit: o }) {
541
- const l = e, s = (() => {
542
- let y = /* @__PURE__ */ new Date();
543
- return new Date(y.getFullYear(), y.getMonth(), y.getDate());
544
- })(), t = g(new Date(s.getFullYear(), s.getMonth(), 1)), r = g(null), n = g(!l.hasInput), a = g("left-0"), d = g("top-0"), v = g(null), h = g(null), m = S(() => l.hasInput ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), f = S(() => {
545
- const y = [], V = t.value.getFullYear(), k = t.value.getMonth(), T = new Date(V, k + 1, 0), X = new Date(V, k, 0).getDay() + 1 - l.startOfWeekIndex, G = (6 + l.startOfWeekIndex - T.getDay()) % 7;
546
- for (let U = -X, Z = T.getDate() + G; U < Z; ++U)
547
- y.push(new Date(V, k, U + 1));
548
- return y;
549
- }), p = S(() => l.startOfWeekIndex ? l.dayNames.slice(1).concat(l.dayNames[0]) : l.dayNames.slice());
550
- j(() => l.modelValue, (y) => {
551
- y ? (r.value = new Date(y.getFullYear(), y.getMonth(), y.getDate()), t.value = new Date(r.value.getTime())) : (r.value = null, t.value = new Date(s.getTime())), t.value.setDate(1);
552
- }, { immediate: !0 }), j(n, (y) => {
553
- y && l.hasInput && te(() => {
554
- const V = v.value.$el.getBoundingClientRect(), k = h.value.getBoundingClientRect();
555
- a.value = V.left + k.width > window.innerWidth ? "right-0" : "left-0", d.value = V.bottom + k.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
540
+ setup(e, { emit: m }) {
541
+ const t = e, s = m, a = (() => {
542
+ let h = /* @__PURE__ */ new Date();
543
+ return new Date(h.getFullYear(), h.getMonth(), h.getDate());
544
+ })(), l = y(new Date(a.getFullYear(), a.getMonth(), 1)), d = y(null), n = y(!t.hasInput), o = y("left-0"), v = y("top-0"), u = y(null), b = y(null), f = S(() => t.hasInput ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), g = S(() => {
545
+ const h = [], p = l.value.getFullYear(), x = l.value.getMonth(), V = new Date(p, x + 1, 0), R = new Date(p, x, 0).getDay() + 1 - t.startOfWeekIndex, Z = (6 + t.startOfWeekIndex - V.getDay()) % 7;
546
+ for (let q = -R, J = V.getDate() + Z; q < J; ++q)
547
+ h.push(new Date(p, x, q + 1));
548
+ return h;
549
+ }), w = S(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
550
+ Y(() => t.modelValue, (h) => {
551
+ h ? (d.value = new Date(h.getFullYear(), h.getMonth(), h.getDate()), l.value = new Date(d.value.getTime())) : (d.value = null, l.value = new Date(a.getTime())), l.value.setDate(1);
552
+ }, { immediate: !0 }), Y(n, (h) => {
553
+ h && t.hasInput && le(() => {
554
+ const p = u.value.$el.getBoundingClientRect(), x = b.value.getBoundingClientRect();
555
+ o.value = p.left + x.width > window.innerWidth ? "right-0" : "left-0", v.value = p.bottom + x.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
556
556
  });
557
- }), le(h, () => n.value = !1);
558
- const $ = () => {
559
- t.value = new Date(t.value.getFullYear(), t.value.getMonth() - 1, 1), o("month-change", t.value);
560
- }, N = () => {
561
- t.value = new Date(t.value.getFullYear(), t.value.getMonth() + 1, 1), o("month-change", t.value);
562
- }, L = (y) => {
563
- r.value = y, o("update:modelValue", y), n.value = !l.hasInput;
564
- }, z = (y) => {
565
- r.value = y, o("update:modelValue", y);
557
+ }), ae(b, () => n.value = !1);
558
+ const L = () => {
559
+ l.value = new Date(l.value.getFullYear(), l.value.getMonth() - 1, 1), s("month-change", l.value);
560
+ }, I = () => {
561
+ l.value = new Date(l.value.getFullYear(), l.value.getMonth() + 1, 1), s("month-change", l.value);
562
+ }, T = (h) => {
563
+ d.value = h, s("update:modelValue", h), n.value = !t.hasInput;
564
+ }, H = (h) => {
565
+ d.value = h, s("update:modelValue", h);
566
566
  };
567
- return (y, V) => (u(), c("div", {
568
- class: w(["relative", y.$attrs.class])
567
+ return (h, p) => (r(), c("div", {
568
+ class: _(["relative", h.$attrs.class])
569
569
  }, [
570
- e.hasInput ? (u(), R(at, Y({
570
+ e.hasInput ? (r(), W(ot, O({
571
571
  key: 0,
572
- modelValue: r.value,
573
- onToggleDatepicker: V[0] || (V[0] = (k) => n.value = !0),
574
- "onUpdate:modelValue": z
575
- }, y.$attrs, {
572
+ modelValue: d.value,
573
+ onToggleDatepicker: p[0] || (p[0] = (x) => n.value = !0),
574
+ "onUpdate:modelValue": H
575
+ }, h.$attrs, {
576
576
  ref_key: "input",
577
- ref: v,
577
+ ref: u,
578
578
  class: "w-full",
579
579
  locale: e.locale
580
580
  }), {
581
- default: K(() => [
582
- M(y.$slots, "default")
581
+ default: G(() => [
582
+ P(h.$slots, "default")
583
583
  ]),
584
584
  _: 3
585
- }, 16, ["modelValue", "locale"])) : C("", !0),
586
- i("div", Y({ class: "z-10 bg-white shadow-md" }, m.value, {
585
+ }, 16, ["modelValue", "locale"])) : D("", !0),
586
+ i("div", O({ class: "z-10 bg-white shadow-md" }, f.value, {
587
587
  ref_key: "calendar",
588
- ref: h,
589
- class: [a.value, d.value]
588
+ ref: b,
589
+ class: [o.value, v.value]
590
590
  }), [
591
- i("div", ut, [
591
+ i("div", ct, [
592
592
  i("button", {
593
- onClick: P($, ["stop"]),
593
+ onClick: M(L, ["stop"]),
594
594
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
595
595
  }, [
596
- E(A(ve), { class: "w-6 h-6" })
597
- ], 8, it),
598
- i("div", ct, _(t.value.toLocaleString(e.locale, { month: "long" })) + " " + _(t.value.getFullYear()), 1),
596
+ z(F(me), { class: "w-6 h-6" })
597
+ ], 8, dt),
598
+ i("div", vt, C(l.value.toLocaleString(e.locale, { month: "long" })) + " " + C(l.value.getFullYear()), 1),
599
599
  i("button", {
600
- onClick: P(N, ["stop"]),
600
+ onClick: M(I, ["stop"]),
601
601
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
602
602
  }, [
603
- E(A(fe), { class: "w-6 h-6" })
604
- ], 8, dt)
603
+ z(F(fe), { class: "w-6 h-6" })
604
+ ], 8, mt)
605
605
  ]),
606
- i("div", vt, [
607
- (u(!0), c(D, null, B(p.value, (k, T) => (u(), c("div", {
606
+ i("div", ft, [
607
+ (r(!0), c(A, null, B(w.value, (x, V) => (r(), c("div", {
608
608
  class: "py-2 text-center bg-gray-200",
609
- key: T
610
- }, _(k), 1))), 128)),
611
- (u(!0), c(D, null, B(f.value, (k) => (u(), c("div", {
612
- class: w(["text-center", k.getMonth() - t.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
609
+ key: V
610
+ }, C(x), 1))), 128)),
611
+ (r(!0), c(A, null, B(g.value, (x) => (r(), c("div", {
612
+ class: _(["text-center", x.getMonth() - l.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
613
613
  }, [
614
614
  i("button", {
615
- class: w([
615
+ class: _([
616
616
  {
617
- "bg-vxvue-700 text-white": r.value && k.getTime() === r.value.getTime(),
618
- "bg-gray-200": k.getTime() === A(s).getTime(),
619
- "text-red-400": e.validFrom && e.validFrom > k || e.validUntil && e.validUntil < k
617
+ "bg-vxvue-700 text-white": d.value && x.getTime() === d.value.getTime(),
618
+ "bg-gray-200": x.getTime() === F(a).getTime(),
619
+ "text-red-400": e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x
620
620
  },
621
621
  "py-2 px-3 rounded-sm"
622
622
  ]),
623
- disabled: e.validFrom && e.validFrom > k || e.validUntil && e.validUntil < k,
624
- onClick: P((T) => e.validFrom && e.validFrom > k || e.validUntil && e.validUntil < k ? null : L(k), ["stop"])
625
- }, _(k.getDate()), 11, ft)
623
+ disabled: e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x,
624
+ onClick: M((V) => e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x ? null : T(x), ["stop"])
625
+ }, C(x.getDate()), 11, ht)
626
626
  ], 2))), 256))
627
627
  ])
628
628
  ], 16)
629
629
  ], 2));
630
630
  }
631
- }, pt = ["for"], ht = ["id", "multiple", "accept"], ml = {
631
+ }, pt = ["for"], gt = ["id", "multiple", "accept"], xl = {
632
632
  __name: "form-file-button",
633
633
  props: {
634
634
  modelValue: { type: Array },
@@ -638,97 +638,98 @@ const ut = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-70
638
638
  id: { type: String, default: "form-file-button-" + Math.ceil(Math.random() * 1e3) }
639
639
  },
640
640
  emits: ["update:modelValue", "form-data"],
641
- setup(e, { emit: o }) {
642
- const l = e, s = (r) => {
641
+ setup(e, { emit: m }) {
642
+ const t = m, s = e, a = (d) => {
643
643
  const n = new FormData();
644
- for (let a of r)
645
- n.append(l.name, a, a.name);
644
+ for (let o of d)
645
+ n.append(s.name, o, o.name);
646
646
  return n;
647
- }, t = (r) => {
648
- const n = r.target.files || r.dataTransfer.files;
647
+ }, l = (d) => {
648
+ const n = d.target.files || d.dataTransfer.files;
649
649
  if (n) {
650
- const a = [...n];
651
- o("update:modelValue", a), o("form-data", s(a));
650
+ const o = [...n];
651
+ t("update:modelValue", o), t("form-data", a(o));
652
652
  }
653
653
  };
654
- return (r, n) => (u(), c("label", { for: e.id }, [
655
- M(r.$slots, "default", {}, () => [
656
- F("Upload")
654
+ return (d, n) => (r(), c("label", { for: e.id }, [
655
+ P(d.$slots, "default", {}, () => [
656
+ E("Upload")
657
657
  ]),
658
658
  i("input", {
659
659
  type: "file",
660
660
  id: e.id,
661
661
  multiple: e.multiple,
662
662
  accept: e.accept,
663
- onChange: t,
663
+ onChange: l,
664
664
  class: "hidden"
665
- }, null, 40, ht)
665
+ }, null, 40, gt)
666
666
  ], 8, pt));
667
667
  }
668
- }, mt = ["value"], gt = {
668
+ }, bt = ["value"], xt = {
669
669
  key: 0,
670
670
  disabled: "",
671
671
  value: ""
672
- }, bt = ["value", "selected"], xt = {
672
+ }, yt = ["value", "selected"], wt = {
673
673
  __name: "form-select",
674
674
  props: { options: Array, modelValue: [String, Number], disabledLabel: String },
675
675
  emits: ["update:modelValue"],
676
- setup(e, { emit: o }) {
677
- return (l, s) => (u(), c("select", Y(l.$attrs, {
676
+ setup(e, { emit: m }) {
677
+ const t = m;
678
+ return (s, a) => (r(), c("select", O(s.$attrs, {
678
679
  value: e.modelValue,
679
680
  class: "form-select",
680
- onChange: s[0] || (s[0] = (t) => o("update:modelValue", t.target.value))
681
+ onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
681
682
  }), [
682
- e.disabledLabel ? (u(), c("option", gt, _(e.disabledLabel), 1)) : C("", !0),
683
- (u(!0), c(D, null, B(e.options, (t) => (u(), c("option", {
684
- value: t.key !== void 0 ? t.key : t.label || t,
685
- selected: (t.key !== void 0 ? t.key : t.label || t) === e.modelValue
686
- }, _(t.label || t), 9, bt))), 256))
687
- ], 16, mt));
683
+ e.disabledLabel ? (r(), c("option", xt, C(e.disabledLabel), 1)) : D("", !0),
684
+ (r(!0), c(A, null, B(e.options, (l) => (r(), c("option", {
685
+ value: l.key !== void 0 ? l.key : l.label || l,
686
+ selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
687
+ }, C(l.label || l), 9, yt))), 256))
688
+ ], 16, bt));
688
689
  }
689
- }, yt = ["aria-checked"], wt = ["checked"], gl = {
690
+ }, kt = ["aria-checked"], $t = ["checked"], yl = {
690
691
  __name: "form-switch",
691
692
  props: ["modelValue"],
692
693
  emits: ["update:modelValue"],
693
- setup(e, { emit: o }) {
694
- const l = e, s = S(() => l.modelValue ? "bg-vxvue" : "bg-slate-200"), t = S(() => l.modelValue ? "translate-x-5" : "translate-x-0"), r = S(() => {
695
- let n = Object.assign({}, q());
694
+ setup(e, { emit: m }) {
695
+ const t = e, s = m, a = S(() => t.modelValue ? "bg-vxvue" : "bg-slate-200"), l = S(() => t.modelValue ? "translate-x-5" : "translate-x-0"), d = S(() => {
696
+ let n = Object.assign({}, U());
696
697
  return delete n.class, n;
697
698
  });
698
- return (n, a) => (u(), c(D, null, [
699
+ return (n, o) => (r(), c(A, null, [
699
700
  i("label", {
700
- class: w(n.$attrs.class)
701
+ class: _(n.$attrs.class)
701
702
  }, [
702
703
  i("span", {
703
- class: w([s.value, "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"]),
704
+ class: _([a.value, "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"]),
704
705
  role: "switch",
705
706
  "aria-checked": !!e.modelValue
706
707
  }, [
707
708
  i("span", {
708
709
  "aria-hidden": "true",
709
- class: w([t.value, "inline-block w-5 h-5 bg-white rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none"])
710
+ class: _([l.value, "inline-block w-5 h-5 bg-white rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none"])
710
711
  }, null, 2),
711
- i("input", Y({
712
+ i("input", O({
712
713
  class: "hidden",
713
714
  value: "1",
714
715
  type: "checkbox",
715
- onChange: a[0] || (a[0] = (d) => o("update:modelValue", d.target.checked))
716
- }, r.value, { checked: e.modelValue }), null, 16, wt)
717
- ], 10, yt)
716
+ onChange: o[0] || (o[0] = (v) => s("update:modelValue", v.target.checked))
717
+ }, d.value, { checked: e.modelValue }), null, 16, $t)
718
+ ], 10, kt)
718
719
  ], 2),
719
- M(n.$slots, "default")
720
+ P(n.$slots, "default")
720
721
  ], 64));
721
722
  }
722
723
  };
723
- const pe = (e, o) => {
724
- const l = e.__vccOpts || e;
725
- for (const [s, t] of o)
726
- l[s] = t;
727
- return l;
728
- }, kt = (e) => ($e("data-v-1be10676"), e = e(), _e(), e), $t = {
724
+ const he = (e, m) => {
725
+ const t = e.__vccOpts || e;
726
+ for (const [s, a] of m)
727
+ t[s] = a;
728
+ return t;
729
+ }, _t = (e) => (_e("data-v-1be10676"), e = e(), Ce(), e), Ct = {
729
730
  "aria-live": "assertive",
730
731
  class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
731
- }, _t = { class: "flex flex-col items-center space-y-4 w-full" }, Ct = { class: "p-4" }, St = { class: "flex items-start" }, Mt = { class: "flex-shrink-0" }, Dt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Vt = { class: "font-bold" }, Pt = { class: "mt-1" }, At = { class: "flex flex-shrink-0 ml-4" }, Bt = /* @__PURE__ */ kt(() => /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1)), It = /* @__PURE__ */ Object.assign({
732
+ }, St = { class: "flex flex-col items-center space-y-4 w-full" }, Mt = { class: "p-4" }, Vt = { class: "flex items-start" }, Dt = { class: "flex-shrink-0" }, At = { class: "flex-1 pt-0.5 ml-3 w-0" }, Pt = { class: "font-bold" }, Ft = { class: "mt-1" }, Tt = { class: "flex flex-shrink-0 ml-4" }, Lt = /* @__PURE__ */ _t(() => /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1)), Bt = /* @__PURE__ */ Object.assign({
732
733
  inheritAttrs: !1
733
734
  }, {
734
735
  __name: "message-toast",
@@ -739,63 +740,63 @@ const pe = (e, o) => {
739
740
  active: { type: Boolean, default: !1 }
740
741
  },
741
742
  emits: ["timeout", "close"],
742
- setup(e, { emit: o }) {
743
- const l = e, s = g(null), t = S(() => typeof l.message == "string" ? [l.message] : l.message), r = () => {
744
- window.clearTimeout(s.value), l.active && l.timeout && (s.value = window.setTimeout(() => {
745
- o("timeout");
746
- }, l.timeout));
743
+ setup(e, { emit: m }) {
744
+ const t = e, s = m, a = y(null), l = S(() => typeof t.message == "string" ? [t.message] : t.message), d = () => {
745
+ window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
746
+ s("timeout");
747
+ }, t.timeout));
747
748
  };
748
- return j(() => l.active, r), re(r), (n, a) => (u(), c("div", $t, [
749
- i("div", _t, [
750
- E(ee, { name: "messagetoast-fade" }, {
751
- default: K(() => [
752
- e.active ? (u(), c("div", {
749
+ return Y(() => t.active, d), ue(d), (n, o) => (r(), c("div", Ct, [
750
+ i("div", St, [
751
+ z(te, { name: "messagetoast-fade" }, {
752
+ default: G(() => [
753
+ e.active ? (r(), c("div", {
753
754
  key: 0,
754
- class: w(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", n.$attrs.class])
755
+ class: _(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", n.$attrs.class])
755
756
  }, [
756
- i("div", Ct, [
757
- i("div", St, [
758
- i("div", Mt, [
759
- M(n.$slots, "icon", {}, void 0, !0)
760
- ]),
757
+ i("div", Mt, [
758
+ i("div", Vt, [
761
759
  i("div", Dt, [
762
- i("p", Vt, [
763
- M(n.$slots, "title", {}, () => [
764
- F(_(e.title), 1)
760
+ P(n.$slots, "icon", {}, void 0, !0)
761
+ ]),
762
+ i("div", At, [
763
+ i("p", Pt, [
764
+ P(n.$slots, "title", {}, () => [
765
+ E(C(e.title), 1)
765
766
  ], !0)
766
767
  ]),
767
- (u(!0), c(D, null, B(t.value, (d) => (u(), c("p", Pt, [
768
- M(n.$slots, "default", {}, () => [
769
- F(_(d), 1)
768
+ (r(!0), c(A, null, B(l.value, (v) => (r(), c("p", Ft, [
769
+ P(n.$slots, "default", {}, () => [
770
+ E(C(v), 1)
770
771
  ], !0)
771
772
  ]))), 256))
772
773
  ]),
773
- i("div", At, [
774
+ i("div", Tt, [
774
775
  i("button", {
775
- onClick: a[0] || (a[0] = (d) => o("close")),
776
+ onClick: o[0] || (o[0] = (v) => s("close")),
776
777
  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"
777
778
  }, [
778
- Bt,
779
- E(A(rt), { class: "w-5 h-5" })
779
+ Lt,
780
+ z(F(it), { class: "w-5 h-5" })
780
781
  ])
781
782
  ])
782
783
  ])
783
784
  ])
784
- ], 2)) : C("", !0)
785
+ ], 2)) : D("", !0)
785
786
  ]),
786
787
  _: 3
787
788
  })
788
789
  ])
789
790
  ]));
790
791
  }
791
- }), bl = /* @__PURE__ */ pe(It, [["__scopeId", "data-v-1be10676"]]), Ft = {
792
+ }), wl = /* @__PURE__ */ he(Bt, [["__scopeId", "data-v-1be10676"]]), It = {
792
793
  key: 0,
793
794
  class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
794
795
  "aria-hidden": "true"
795
- }, Lt = {
796
+ }, Ot = {
796
797
  key: 0,
797
798
  class: "fixed inset-0 z-[9999]"
798
- }, Tt = { class: "flex justify-center items-center h-screen" }, xl = {
799
+ }, jt = { class: "flex justify-center items-center h-screen" }, kl = {
799
800
  __name: "modal",
800
801
  props: {
801
802
  show: Boolean,
@@ -804,38 +805,38 @@ const pe = (e, o) => {
804
805
  contentClass: { type: String, default: "" }
805
806
  },
806
807
  emits: ["clicked-outside"],
807
- setup(e, { emit: o }) {
808
- const l = g(null);
809
- return le(l, () => o("clicked-outside")), (s, t) => (u(), c(D, null, [
810
- e.show ? (u(), c("div", Ft)) : C("", !0),
811
- E(ee, { name: "appear" }, {
812
- default: K(() => [
813
- e.show ? (u(), c("div", Lt, [
814
- i("div", Tt, [
808
+ setup(e, { emit: m }) {
809
+ const t = m, s = y(null);
810
+ return ae(s, () => t("clicked-outside")), (a, l) => (r(), c(A, null, [
811
+ e.show ? (r(), c("div", It)) : D("", !0),
812
+ z(te, { name: "appear" }, {
813
+ default: G(() => [
814
+ e.show ? (r(), c("div", Ot, [
815
+ i("div", jt, [
815
816
  i("div", {
816
- class: w(["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]),
817
+ 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]),
817
818
  ref_key: "container",
818
- ref: l
819
+ ref: s
819
820
  }, [
820
821
  i("div", {
821
- class: w(e.headerClass)
822
+ class: _(e.headerClass)
822
823
  }, [
823
- M(s.$slots, "title")
824
+ P(a.$slots, "title")
824
825
  ], 2),
825
826
  i("div", {
826
- class: w(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
827
+ class: _(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
827
828
  }, [
828
- M(s.$slots, "default")
829
+ P(a.$slots, "default")
829
830
  ], 2)
830
831
  ], 2)
831
832
  ])
832
- ])) : C("", !0)
833
+ ])) : D("", !0)
833
834
  ]),
834
835
  _: 3
835
836
  })
836
837
  ], 64));
837
838
  }
838
- }, Ot = { class: "flex justify-between items-center px-4 sm:px-0" }, jt = { class: "flex flex-1 -mt-px w-0" }, Yt = ["onClick"], Et = { class: "hidden md:flex md:-mt-px" }, Nt = { class: "flex flex-1 justify-end -mt-px w-0" }, zt = ["onClick"], yl = {
839
+ }, Et = { class: "flex justify-between items-center px-4 sm:px-0" }, Nt = { class: "flex flex-1 -mt-px w-0" }, Yt = ["onClick"], zt = { class: "hidden md:flex md:-mt-px" }, Rt = { class: "flex flex-1 justify-end -mt-px w-0" }, Ht = ["onClick"], $l = {
839
840
  __name: "pagination",
840
841
  props: {
841
842
  page: { type: Number, default: 1 },
@@ -860,69 +861,69 @@ const pe = (e, o) => {
860
861
  }
861
862
  },
862
863
  emits: ["update:page"],
863
- setup(e, { emit: o }) {
864
- const l = e, s = g(Math.ceil(l.total / l.perPage)), t = g(null), r = S(() => l.markerPosition === "above" ? "border-t-2 pt-4" : "border-b-2 pb-4"), n = S(() => {
865
- let v = [1];
866
- if (l.showAllPages || s.value <= 7) {
867
- for (let h = 2; h <= s.value; ++h)
868
- v.push(h);
869
- return v;
864
+ setup(e, { emit: m }) {
865
+ const t = m, s = e, a = y(Math.ceil(s.total / s.perPage)), l = y(null), d = S(() => s.markerPosition === "above" ? "border-t-2 pt-4" : "border-b-2 pb-4"), n = S(() => {
866
+ let u = [1];
867
+ if (s.showAllPages || a.value <= 7) {
868
+ for (let b = 2; b <= a.value; ++b)
869
+ u.push(b);
870
+ return u;
870
871
  }
871
- return t.value >= s.value ? v.push("dots", t.value - 2, t.value - 1) : t.value - 1 && t.value - 1 > 1 && (t.value > 1 && v.push("dots"), v.push(t.value - 1)), t.value > 1 && v.push(t.value), t.value + 1 < s.value && (v.push(t.value + 1), t.value <= 1 && v.push(t.value + 2), t.value + 2 < s.value && v.push("dots")), t.value < s.value && v.push(s.value), v;
872
- }), a = () => {
873
- t.value > 1 && o("update:page", t.value - 1);
874
- }, d = () => {
875
- t.value < s.value && o("update:page", t.value + 1);
872
+ 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;
873
+ }), o = () => {
874
+ l.value > 1 && t("update:page", l.value - 1);
875
+ }, v = () => {
876
+ l.value < a.value && t("update:page", l.value + 1);
876
877
  };
877
- return j(() => l.page, (v) => t.value = Math.min(Math.max(v, 1), s.value), { immediate: !0 }), j(() => l.perPage, (v) => {
878
- s.value = Math.ceil(l.total / l.perPage), o("update:page", 1);
879
- }), j(() => l.total, (v) => {
880
- s.value = Math.ceil(l.total / l.perPage), t.value > s.value && o("update:page", 1);
881
- }), (v, h) => (u(), c("nav", Ot, [
882
- i("div", jt, [
883
- e.showNavButtons ? (u(), c("a", {
878
+ return Y(() => s.page, (u) => l.value = Math.min(Math.max(u, 1), a.value), { immediate: !0 }), Y(() => s.perPage, (u) => {
879
+ a.value = Math.ceil(s.total / s.perPage), t("update:page", 1);
880
+ }), Y(() => s.total, (u) => {
881
+ a.value = Math.ceil(s.total / s.perPage), l.value > a.value && t("update:page", 1);
882
+ }), (u, b) => (r(), c("nav", Et, [
883
+ i("div", Nt, [
884
+ e.showNavButtons ? (r(), c("a", {
884
885
  key: 0,
885
- onClick: P(a, ["prevent"]),
886
+ onClick: M(o, ["prevent"]),
886
887
  href: "#",
887
- class: w(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [{ "cursor-default pointer-events-none": t.value <= 1 }, r.value]])
888
+ class: _(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [{ "cursor-default pointer-events-none": l.value <= 1 }, d.value]])
888
889
  }, [
889
- E(A(ve), { class: "w-5 h-5" }),
890
- F(" " + _(e.prevText), 1)
891
- ], 10, Yt)) : C("", !0)
890
+ z(F(me), { class: "w-5 h-5" }),
891
+ E(" " + C(e.prevText), 1)
892
+ ], 10, Yt)) : D("", !0)
892
893
  ]),
893
- i("div", Et, [
894
- (u(!0), c(D, null, B(n.value, (m, f) => (u(), R(ue(m !== "dots" ? "a" : "span"), {
895
- onClick: P((p) => m !== "dots" ? o("update:page", m) : null, ["prevent"]),
896
- key: f,
897
- href: m !== "dots" ? "#" : null,
898
- class: w(["inline-flex items-center px-4 text-sm font-medium", [{
899
- "border-vxvue-500 text-vxvue-700": m === t.value,
900
- "border-transparent text-gray-500": m !== t.value,
901
- "hover:text-gray-700 hover:border-gray-300": m !== "dots"
902
- }, r.value]])
894
+ i("div", zt, [
895
+ (r(!0), c(A, null, B(n.value, (f, g) => (r(), W(ie(f !== "dots" ? "a" : "span"), {
896
+ onClick: M((w) => f !== "dots" ? t("update:page", f) : null, ["prevent"]),
897
+ key: g,
898
+ href: f !== "dots" ? "#" : null,
899
+ class: _(["inline-flex items-center px-4 text-sm font-medium", [{
900
+ "border-vxvue-500 text-vxvue-700": f === l.value,
901
+ "border-transparent text-gray-500": f !== l.value,
902
+ "hover:text-gray-700 hover:border-gray-300": f !== "dots"
903
+ }, d.value]])
903
904
  }, {
904
- default: K(() => [
905
- F(_(m !== "dots" ? m : "..."), 1)
905
+ default: G(() => [
906
+ E(C(f !== "dots" ? f : "..."), 1)
906
907
  ]),
907
908
  _: 2
908
909
  }, 1032, ["onClick", "href", "class"]))), 128))
909
910
  ]),
910
- i("div", Nt, [
911
- e.showNavButtons ? (u(), c("a", {
911
+ i("div", Rt, [
912
+ e.showNavButtons ? (r(), c("a", {
912
913
  key: 0,
913
- onClick: P(d, ["prevent"]),
914
+ onClick: M(v, ["prevent"]),
914
915
  href: "#",
915
- class: w(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [r.value, { "cursor-default pointer-events-none": t.value >= s.value }]])
916
+ class: _(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [d.value, { "cursor-default pointer-events-none": l.value >= a.value }]])
916
917
  }, [
917
- F(_(e.nextText) + " ", 1),
918
- E(A(fe), { class: "w-5 h-5" })
919
- ], 10, zt)) : C("", !0)
918
+ E(C(e.nextText) + " ", 1),
919
+ z(F(fe), { class: "w-5 h-5" })
920
+ ], 10, Ht)) : D("", !0)
920
921
  ])
921
922
  ]));
922
923
  }
923
924
  };
924
- function Rt(e, o) {
925
- return u(), c("svg", {
925
+ function Ut(e, m) {
926
+ return r(), c("svg", {
926
927
  xmlns: "http://www.w3.org/2000/svg",
927
928
  fill: "none",
928
929
  viewBox: "0 0 24 24",
@@ -937,8 +938,8 @@ function Rt(e, o) {
937
938
  })
938
939
  ]);
939
940
  }
940
- function Ut(e, o) {
941
- return u(), c("svg", {
941
+ function Wt(e, m) {
942
+ return r(), c("svg", {
942
943
  xmlns: "http://www.w3.org/2000/svg",
943
944
  fill: "none",
944
945
  viewBox: "0 0 24 24",
@@ -958,114 +959,222 @@ function Ut(e, o) {
958
959
  })
959
960
  ]);
960
961
  }
961
- const Ht = ["value", "type"], wl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
962
+ const qt = ["value", "type"], _l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
962
963
  __name: "password-input",
963
964
  props: ["modelValue"],
964
965
  emits: ["update:modelValue"],
965
- setup(e, { emit: o }) {
966
- const l = g(!1), s = S(() => {
967
- let t = Object.assign({}, q());
968
- return delete t.class, t;
966
+ setup(e, { emit: m }) {
967
+ const t = m, s = y(!1), a = S(() => {
968
+ let l = Object.assign({}, U());
969
+ return delete l.class, l;
969
970
  });
970
- return (t, r) => (u(), c("div", {
971
- class: w("inline-block relative " + q().class)
971
+ return (l, d) => (r(), c("div", {
972
+ class: _("inline-block relative " + U().class)
972
973
  }, [
973
- i("input", Y({
974
+ i("input", O({
974
975
  value: e.modelValue,
975
- type: l.value ? "text" : "password",
976
- onInput: r[0] || (r[0] = (n) => o("update:modelValue", n.target.value))
977
- }, s.value, { class: "block pr-10 w-full form-input peer" }), null, 16, Ht),
976
+ type: s.value ? "text" : "password",
977
+ onInput: d[0] || (d[0] = (n) => t("update:modelValue", n.target.value))
978
+ }, a.value, { class: "block pr-10 w-full form-input peer" }), null, 16, qt),
978
979
  i("button", {
979
- onClick: r[1] || (r[1] = P((n) => l.value = !l.value, ["stop"])),
980
+ onClick: d[1] || (d[1] = M((n) => s.value = !s.value, ["stop"])),
980
981
  class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand"
981
982
  }, [
982
- l.value ? (u(), R(A(Rt), {
983
+ s.value ? (r(), W(F(Ut), {
983
984
  key: 0,
984
985
  class: "w-5 h-5"
985
- })) : (u(), R(A(Ut), {
986
+ })) : (r(), W(F(Wt), {
986
987
  key: 1,
987
988
  class: "w-5 h-5"
988
989
  }))
989
990
  ]),
990
- M(t.$slots, "default")
991
+ P(l.$slots, "default")
991
992
  ], 2));
992
993
  }
993
- }), Wt = { class: "flex items-center pb-1" }, qt = ["id", "checked"], Kt = ["for"], Gt = { key: 1 }, Xt = ["href"], Zt = {
994
+ }), Kt = { class: "flex items-center pb-1" }, Xt = ["id", "checked"], Gt = ["for"], Zt = { key: 1 }, Jt = ["href"], Qt = {
994
995
  key: 0,
995
996
  class: "ml-6"
996
- }, kl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
997
+ }, Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
997
998
  __name: "simple-tree",
998
999
  props: { branch: { type: Object, default: {} } },
999
1000
  emits: ["branch-selected", "expand"],
1000
- setup(e, { emit: o }) {
1001
- const l = e, s = g(!1);
1002
- return re(() => {
1003
- l.branch.current && o("expand", !0);
1004
- }), (t, r) => {
1005
- const n = Ce("simple-tree", !0);
1006
- return u(), c("div", {
1007
- class: w([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", t.$attrs.class])
1001
+ setup(e, { emit: m }) {
1002
+ const t = e, s = m, a = y(!1);
1003
+ return ue(() => {
1004
+ t.branch.current && s("expand", !0);
1005
+ }), (l, d) => {
1006
+ const n = Se("simple-tree", !0);
1007
+ return r(), c("div", {
1008
+ class: _([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
1008
1009
  }, [
1009
- i("div", Wt, [
1010
- e.branch.branches && e.branch.branches.length ? (u(), c(D, { key: 0 }, [
1010
+ i("div", Kt, [
1011
+ e.branch.branches && e.branch.branches.length ? (r(), c(A, { key: 0 }, [
1011
1012
  i("input", {
1012
1013
  type: "checkbox",
1013
1014
  id: "branch-" + e.branch.id,
1014
- onClick: r[0] || (r[0] = (a) => s.value = !s.value),
1015
- checked: s.value,
1015
+ onClick: d[0] || (d[0] = (o) => a.value = !a.value),
1016
+ checked: a.value,
1016
1017
  class: "hidden"
1017
- }, null, 8, qt),
1018
+ }, null, 8, Xt),
1018
1019
  i("label", {
1019
1020
  for: "branch-" + e.branch.id,
1020
1021
  class: "mr-2"
1021
1022
  }, [
1022
- (u(), R(ue(s.value ? A(nt) : A(ot)), { class: "w-4 h-4 border" }))
1023
- ], 8, Kt)
1024
- ], 64)) : C("", !0),
1025
- e.branch.current ? (u(), c("strong", Gt, _(e.branch.label), 1)) : (u(), c("a", {
1023
+ (r(), W(ie(a.value ? F(rt) : F(ut)), { class: "w-4 h-4 border" }))
1024
+ ], 8, Gt)
1025
+ ], 64)) : D("", !0),
1026
+ e.branch.current ? (r(), c("strong", Zt, C(e.branch.label), 1)) : (r(), c("a", {
1026
1027
  key: 2,
1027
1028
  href: e.branch.path,
1028
- onClick: r[1] || (r[1] = P((a) => o("branch-selected", e.branch), ["prevent"]))
1029
- }, _(e.branch.label), 9, Xt))
1029
+ onClick: d[1] || (d[1] = M((o) => s("branch-selected", e.branch), ["prevent"]))
1030
+ }, C(e.branch.label), 9, Jt))
1030
1031
  ]),
1031
- e.branch.branches && e.branch.branches.length ? oe((u(), c("ul", Zt, [
1032
- (u(!0), c(D, null, B(e.branch.branches, (a) => (u(), R(n, {
1033
- branch: a,
1034
- key: a.id,
1035
- onBranchSelected: r[2] || (r[2] = (d) => o("branch-selected", d)),
1036
- onExpand: r[3] || (r[3] = (d) => {
1037
- s.value = d, o("expand", d);
1032
+ e.branch.branches && e.branch.branches.length ? re((r(), c("ul", Qt, [
1033
+ (r(!0), c(A, null, B(e.branch.branches, (o) => (r(), W(n, {
1034
+ branch: o,
1035
+ key: o.id,
1036
+ onBranchSelected: d[2] || (d[2] = (v) => s("branch-selected", v)),
1037
+ onExpand: d[3] || (d[3] = (v) => {
1038
+ a.value = v, s("expand", v);
1038
1039
  })
1039
1040
  }, null, 8, ["branch"]))), 128))
1040
1041
  ], 512)), [
1041
- [Se, s.value]
1042
- ]) : C("", !0)
1042
+ [Me, a.value]
1043
+ ]) : D("", !0)
1043
1044
  ], 2);
1044
1045
  };
1045
1046
  }
1047
+ }), el = ["id", "aria-valuenow"], tl = ["id", "aria-valuenow", "onFocus", "onMousedown", "onTouchstart"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1048
+ __name: "slider",
1049
+ props: {
1050
+ min: { type: Number, default: 0 },
1051
+ max: { type: Number, default: 100 },
1052
+ modelValue: { type: [Number, Array], validator(e) {
1053
+ return typeof e == "number" || e.every((m) => typeof m == "number");
1054
+ } }
1055
+ },
1056
+ emits: ["update:modelValue"],
1057
+ setup(e, { emit: m }) {
1058
+ const t = e, s = m, a = U(), l = y({ x: null, y: null }), d = y({ w: null, h: null }), n = y(!1), o = y(null), v = y(0), u = S(() => {
1059
+ const h = t.max, p = t.min;
1060
+ return t.modelValue instanceof Array ? t.modelValue.map((x) => Math.max(Math.min(x, h), p) * 100 / (h - p)) : Math.max(Math.min(t.modelValue, h), p) * 100 / (h - p);
1061
+ }), b = S(() => t.modelValue instanceof Array ? { left: Math.min(...u.value) + "%", width: Math.max(...u.value) - Math.min(...u.value) + "%" } : { width: u.value + "%" }), f = y({
1062
+ class: "absolute top-0 w-5 h-5 bg-white rounded-full border-2 transition-colors duration-200 -translate-x-2.5 -translate-y-1.5 focus:ring-4 focus:outline-none border-vxvue cursor-grab touch-none hover:bg-vxvue focus:ring-vxvue/50",
1063
+ tabindex: 0,
1064
+ role: "slider",
1065
+ "aria-valuemin": t.min,
1066
+ "aria-valuemax": t.max
1067
+ }), g = (h) => {
1068
+ let p = parseFloat(h.toFixed(10));
1069
+ if (p = Math.min(t.max, Math.max(t.min, p)), t.modelValue instanceof Array) {
1070
+ let x = [...t.modelValue];
1071
+ x[v.value] = p, s("update:modelValue", x);
1072
+ } else
1073
+ s("update:modelValue", p);
1074
+ }, w = (h) => {
1075
+ const { pageX: p, pageY: x } = h.touches ? h.touches[0] : h, V = (p - l.value.x) / d.value.w;
1076
+ g(Math.floor((t.max - t.min) * V + t.min));
1077
+ }, L = (h) => {
1078
+ n.value && (h.preventDefault(), w(h));
1079
+ }, I = (h) => {
1080
+ n.value = !0;
1081
+ const p = document.documentElement, x = o.value.getBoundingClientRect();
1082
+ l.value = {
1083
+ x: x.left + p.scrollLeft - p.clientLeft,
1084
+ y: x.top + p.scrollTop - p.clientTop
1085
+ }, d.value = {
1086
+ w: o.value.offsetWidth,
1087
+ h: o.value.offsetHeight
1088
+ }, h.currentTarget.focus(), document.addEventListener("mousemove", L), document.addEventListener("mouseup", T);
1089
+ }, T = () => {
1090
+ n.value && (n.value = !1, document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", T));
1091
+ }, H = (h) => {
1092
+ h.keyCode >= 33 && h.keyCode <= 40 && h.preventDefault();
1093
+ const p = t.modelValue[v.value] ?? t.modelValue;
1094
+ switch (h.keyCode) {
1095
+ case 37:
1096
+ g(p - 1);
1097
+ break;
1098
+ case 39:
1099
+ g(p + 1);
1100
+ break;
1101
+ case 33:
1102
+ g(p + (t.max - t.min) / 10);
1103
+ break;
1104
+ case 34:
1105
+ g(p - (t.max - t.min) / 10);
1106
+ break;
1107
+ case 36:
1108
+ g(t.min);
1109
+ break;
1110
+ case 35:
1111
+ g(t.max);
1112
+ }
1113
+ };
1114
+ return (h, p) => (r(), c("div", {
1115
+ class: "relative w-full h-2 rounded-r-full rounded-l-full bg-slate-300",
1116
+ ref_key: "track",
1117
+ ref: o
1118
+ }, [
1119
+ i("div", {
1120
+ class: "absolute h-full rounded-r-full rounded-l-full bg-vxvue",
1121
+ style: Ve(b.value)
1122
+ }, null, 4),
1123
+ e.modelValue.length ? (r(!0), c(A, { key: 1 }, B(e.modelValue, (x, V) => (r(), c("button", O({
1124
+ id: V ? null : F(a).id,
1125
+ style: { left: u.value[V] + "%" },
1126
+ "aria-valuenow": e.modelValue[V],
1127
+ onFocus: (R) => v.value = V,
1128
+ onKeydown: H,
1129
+ onMousedown: M((R) => {
1130
+ v.value = V, I(R);
1131
+ }, ["prevent"]),
1132
+ onTouchstart: M((R) => {
1133
+ v.value = V, I(R);
1134
+ }, ["prevent"]),
1135
+ onTouchmove: L,
1136
+ onTouchend: T
1137
+ }, f.value), null, 16, tl))), 256)) : (r(), c("button", O({
1138
+ key: 0,
1139
+ id: F(a).id,
1140
+ style: { left: u.value + "%" },
1141
+ "aria-valuenow": e.modelValue,
1142
+ onFocus: p[0] || (p[0] = (x) => v.value = 0),
1143
+ onKeydown: H,
1144
+ onMousedown: p[1] || (p[1] = M((x) => {
1145
+ v.value = 0, I(x);
1146
+ }, ["prevent"])),
1147
+ onTouchstart: p[2] || (p[2] = M((x) => {
1148
+ v.value = 0, I(x);
1149
+ }, ["prevent"])),
1150
+ onTouchmove: L,
1151
+ onTouchend: T
1152
+ }, f.value), null, 16, el))
1153
+ ], 512));
1154
+ }
1046
1155
  });
1047
- const Jt = { class: "overflow-hidden rounded ring-1 ring-opacity-10 shadow ring-slate-500" }, Qt = { class: "min-w-full divide-y divide-y-slate-900" }, el = { class: "text-white bg-slate-700" }, tl = ["onClick"], ll = { class: "flex items-center" }, sl = {
1156
+ const ll = { class: "w-full divide-y divide-y-slate-900" }, al = { class: "text-white bg-slate-700" }, sl = ["onClick"], nl = { class: "flex items-center" }, ol = {
1048
1157
  key: 0,
1049
1158
  xmlns: "http://www.w3.org/2000/svg",
1050
1159
  class: "flex-shrink-0 ml-2 w-4 h-4",
1051
1160
  fill: "none",
1052
1161
  viewBox: "0 0 24 24",
1053
1162
  stroke: "currentColor"
1054
- }, al = ["d"], nl = {
1163
+ }, rl = ["d"], ul = {
1055
1164
  key: 1,
1056
1165
  "stroke-linecap": "round",
1057
1166
  "stroke-linejoin": "round",
1058
1167
  "stroke-width": "2",
1059
1168
  d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
1060
- }, ol = {
1169
+ }, il = {
1061
1170
  __name: "sortable",
1062
1171
  props: {
1063
1172
  columns: {
1064
1173
  type: Array,
1065
1174
  required: !0,
1066
1175
  validator: (e) => {
1067
- for (const o of e)
1068
- if (o.label === void 0 || o.prop === void 0)
1176
+ for (const m of e)
1177
+ if (m.label === void 0 || m.prop === void 0)
1069
1178
  return !1;
1070
1179
  return !0;
1071
1180
  }
@@ -1078,125 +1187,123 @@ const Jt = { class: "overflow-hidden rounded ring-1 ring-opacity-10 shadow ring-
1078
1187
  keyProperty: { type: String, default: "key" }
1079
1188
  },
1080
1189
  emits: ["before-sort", "after-sort"],
1081
- setup(e, { emit: o }) {
1082
- const l = e, s = g(l.sortProp), t = g(l.sortDirection), r = S(() => {
1083
- let a = l.rows.slice();
1084
- const d = l.columns.find(({ prop: v }) => v === s.value);
1085
- return d && (t.value === "asc" && d.sortAscFunction ? a.sort(d.sortAscFunction) : t.value === "desc" && d.sortDescFunction ? a.sort(d.sortDescFunction) : a.sort((v, h) => v[s.value] < h[s.value] ? t.value === "asc" ? -1 : 1 : v[s.value] > h[s.value] ? t.value === "asc" ? 1 : -1 : 0)), a.slice(l.offset || 0, (l.offset || 0) + (l.count || a.length));
1086
- }), n = (a) => {
1087
- o("before-sort", { prop: s.value, dir: t.value }), s.value === a ? t.value = t.value === "asc" ? "desc" : "asc" : (s.value = a, t.value = t.value || "asc"), te(() => o("after-sort", { prop: s.value, dir: t.value }));
1190
+ setup(e, { emit: m }) {
1191
+ const t = e, s = m, a = y(t.sortProp), l = y(t.sortDirection), d = S(() => {
1192
+ let o = t.rows.slice();
1193
+ const v = t.columns.find(({ prop: u }) => u === a.value);
1194
+ return v && (l.value === "asc" && v.sortAscFunction ? o.sort(v.sortAscFunction) : l.value === "desc" && v.sortDescFunction ? o.sort(v.sortDescFunction) : o.sort((u, b) => u[a.value] < b[a.value] ? l.value === "asc" ? -1 : 1 : u[a.value] > b[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
1195
+ }), n = (o) => {
1196
+ 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"), le(() => s("after-sort", { prop: a.value, dir: l.value }));
1088
1197
  };
1089
- return (a, d) => (u(), c("div", Jt, [
1090
- i("table", Qt, [
1091
- i("thead", el, [
1092
- i("tr", null, [
1093
- (u(!0), c(D, null, B(e.columns, (v) => (u(), c("th", {
1094
- scope: "col",
1095
- class: w(["py-3 px-6 text-left", [
1096
- { "cursor-pointer": v.sortable, active: s.value === v.prop },
1097
- v.cssClass
1098
- ]]),
1099
- onClick: (h) => v.sortable ? n(v.prop) : null
1100
- }, [
1101
- M(a.$slots, v.prop + "-header", {
1102
- column: v,
1103
- sortDir: t.value,
1104
- sortProp: s.value
1105
- }, () => [
1106
- i("div", ll, [
1107
- i("span", null, _(v.label), 1),
1108
- v.sortable ? (u(), c("svg", sl, [
1109
- s.value === v.prop ? (u(), c("path", {
1110
- key: 0,
1111
- "stroke-linecap": "round",
1112
- "stroke-linejoin": "round",
1113
- "stroke-width": "2",
1114
- d: t.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
1115
- }, null, 8, al)) : (u(), c("path", nl))
1116
- ])) : C("", !0)
1117
- ])
1118
- ], !0)
1119
- ], 10, tl))), 256))
1120
- ])
1121
- ]),
1122
- i("tbody", null, [
1123
- (u(!0), c(D, null, B(r.value, (v) => (u(), c("tr", {
1124
- key: v[e.keyProperty],
1125
- class: w(v.cssClass)
1198
+ return (o, v) => (r(), c("table", ll, [
1199
+ i("thead", al, [
1200
+ i("tr", null, [
1201
+ (r(!0), c(A, null, B(e.columns, (u) => (r(), c("th", {
1202
+ scope: "col",
1203
+ class: _(["py-3 px-6 text-left", [
1204
+ { "cursor-pointer": u.sortable, active: a.value === u.prop },
1205
+ u.cssClass
1206
+ ]]),
1207
+ onClick: (b) => u.sortable ? n(u.prop) : null
1126
1208
  }, [
1127
- (u(!0), c(D, null, B(e.columns, (h) => (u(), c("td", {
1128
- class: w(["py-3 px-6 whitespace-nowrap", { active: s.value === h.prop }])
1129
- }, [
1130
- M(a.$slots, h.prop, { row: v }, () => [
1131
- F(_(v[h.prop]), 1)
1132
- ], !0)
1133
- ], 2))), 256))
1134
- ], 2))), 128))
1209
+ P(o.$slots, u.prop + "-header", {
1210
+ column: u,
1211
+ sortDir: l.value,
1212
+ sortProp: a.value
1213
+ }, () => [
1214
+ i("div", nl, [
1215
+ i("span", null, C(u.label), 1),
1216
+ u.sortable ? (r(), c("svg", ol, [
1217
+ a.value === u.prop ? (r(), c("path", {
1218
+ key: 0,
1219
+ "stroke-linecap": "round",
1220
+ "stroke-linejoin": "round",
1221
+ "stroke-width": "2",
1222
+ d: l.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
1223
+ }, null, 8, rl)) : (r(), c("path", ul))
1224
+ ])) : D("", !0)
1225
+ ])
1226
+ ], !0)
1227
+ ], 10, sl))), 256))
1135
1228
  ])
1229
+ ]),
1230
+ i("tbody", null, [
1231
+ (r(!0), c(A, null, B(d.value, (u) => (r(), c("tr", {
1232
+ key: u[e.keyProperty],
1233
+ class: _(u.cssClass)
1234
+ }, [
1235
+ (r(!0), c(A, null, B(e.columns, (b) => (r(), c("td", {
1236
+ class: _(["py-3 px-6 whitespace-nowrap", { active: a.value === b.prop }])
1237
+ }, [
1238
+ P(o.$slots, b.prop, { row: u }, () => [
1239
+ E(C(u[b.prop]), 1)
1240
+ ], !0)
1241
+ ], 2))), 256))
1242
+ ], 2))), 128))
1136
1243
  ])
1137
1244
  ]));
1138
1245
  }
1139
- }, $l = /* @__PURE__ */ pe(ol, [["__scopeId", "data-v-f0e4e642"]]), rl = { class: "sm:hidden" }, ul = { class: "hidden sm:block" }, il = { class: "border-b border-gray-200" }, cl = {
1246
+ }, Ml = /* @__PURE__ */ he(il, [["__scopeId", "data-v-1c751c5a"]]), cl = { class: "sm:hidden" }, dl = { class: "hidden sm:block" }, vl = { class: "border-b border-gray-200" }, ml = {
1140
1247
  class: "flex -mb-px space-x-8",
1141
1248
  "aria-label": "Tabs"
1142
- }, dl = ["onClick", "aria-current"], _l = {
1249
+ }, fl = ["onClick", "aria-current"], Vl = {
1143
1250
  __name: "tabs",
1144
1251
  props: {
1145
1252
  items: { type: Array, default: [] },
1146
1253
  activeIndex: { type: Number, default: 0 }
1147
1254
  },
1148
1255
  emits: ["update:active-index"],
1149
- setup(e, { emit: o }) {
1150
- const l = e, s = g(l.items[l.activeIndex] || {}), t = S(() => {
1256
+ setup(e, { emit: m }) {
1257
+ const t = e, s = m, a = y(t.items[t.activeIndex] || {}), l = S(() => {
1151
1258
  let n = [];
1152
- return l.items.forEach((a, d) => {
1153
- a.disabled || n.push({ label: a.name, key: d });
1259
+ return t.items.forEach((o, v) => {
1260
+ o.disabled || n.push({ label: o.name, key: v });
1154
1261
  }), n;
1155
1262
  });
1156
- j(() => l.activeIndex, (n) => {
1157
- s.value = l.items[n] || {};
1263
+ Y(() => t.activeIndex, (n) => {
1264
+ a.value = t.items[n] || {};
1158
1265
  });
1159
- const r = (n) => {
1160
- n.disabled || (s.value = n, o("update:active-index", l.items.indexOf(n)));
1266
+ const d = (n) => {
1267
+ n.disabled || (a.value = n, s("update:active-index", t.items.indexOf(n)));
1161
1268
  };
1162
- return (n, a) => (u(), c(D, null, [
1163
- i("div", rl, [
1164
- E(xt, {
1165
- options: t.value,
1269
+ return (n, o) => (r(), c(A, null, [
1270
+ i("div", cl, [
1271
+ z(wt, {
1272
+ options: l.value,
1166
1273
  "model-value": e.activeIndex,
1167
- "onUpdate:modelValue": a[0] || (a[0] = (d) => o("update:activeIndex", d)),
1274
+ "onUpdate:modelValue": o[0] || (o[0] = (v) => s("update:activeIndex", v)),
1168
1275
  class: "w-full"
1169
1276
  }, null, 8, ["options", "model-value"])
1170
1277
  ]),
1171
- i("div", ul, [
1172
- i("div", il, [
1173
- i("nav", cl, [
1174
- (u(!0), c(D, null, B(e.items, (d) => (u(), c("a", {
1175
- key: d.name,
1278
+ i("div", dl, [
1279
+ i("div", vl, [
1280
+ i("nav", ml, [
1281
+ (r(!0), c(A, null, B(e.items, (v) => (r(), c("a", {
1282
+ key: v.name,
1176
1283
  href: "#",
1177
- onClick: P((v) => r(d), ["prevent"]),
1178
- class: w([
1179
- s.value === d ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
1180
- d.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
1284
+ onClick: M((u) => d(v), ["prevent"]),
1285
+ class: _([
1286
+ a.value === v ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
1287
+ v.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
1181
1288
  "group inline-flex items-center py-4 px-1 border-b-4 font-medium"
1182
1289
  ]),
1183
- "aria-current": s.value === d ? "page" : void 0
1290
+ "aria-current": a.value === v ? "page" : void 0
1184
1291
  }, [
1185
- M(n.$slots, "icon", { tab: d }),
1292
+ P(n.$slots, "icon", { tab: v }),
1186
1293
  i("span", null, [
1187
- M(n.$slots, "default", { tab: d }, () => [
1188
- F(_(d.name), 1)
1294
+ P(n.$slots, "default", { tab: v }, () => [
1295
+ E(C(v.name), 1)
1189
1296
  ])
1190
1297
  ]),
1191
- d.badge ? (u(), c("span", {
1298
+ v.badge ? (r(), c("span", {
1192
1299
  key: 0,
1193
- class: w([
1194
- s.value === d ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
1195
- d.disabled ? "bg-gray-100 text-gray-400" : "",
1300
+ class: _([
1301
+ a.value === v ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
1302
+ v.disabled ? "bg-gray-100 text-gray-400" : "",
1196
1303
  "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
1197
1304
  ])
1198
- }, _(d.badge), 3)) : C("", !0)
1199
- ], 10, dl))), 128))
1305
+ }, C(v.badge), 3)) : D("", !0)
1306
+ ], 10, fl))), 128))
1200
1307
  ])
1201
1308
  ])
1202
1309
  ])
@@ -1204,18 +1311,19 @@ const Jt = { class: "overflow-hidden rounded ring-1 ring-opacity-10 shadow ring-
1204
1311
  }
1205
1312
  };
1206
1313
  export {
1207
- fl as Autocomplete,
1208
- pl as Confirm,
1209
- at as DateInput,
1210
- hl as Datepicker,
1211
- ml as FormFileButton,
1212
- xt as FormSelect,
1213
- gl as FormSwitch,
1214
- bl as MessageToast,
1215
- xl as Modal,
1216
- yl as Pagination,
1217
- wl as PasswordInput,
1218
- kl as SimpleTree,
1219
- $l as Sortable,
1220
- _l as Tabs
1314
+ pl as Autocomplete,
1315
+ gl as Confirm,
1316
+ ot as DateInput,
1317
+ bl as Datepicker,
1318
+ xl as FormFileButton,
1319
+ wt as FormSelect,
1320
+ yl as FormSwitch,
1321
+ wl as MessageToast,
1322
+ kl as Modal,
1323
+ $l as Pagination,
1324
+ _l as PasswordInput,
1325
+ Cl as SimpleTree,
1326
+ Sl as Slider,
1327
+ Ml as Sortable,
1328
+ Vl as Tabs
1221
1329
  };