@fewangsit/wangsvue-fats 1.0.1-alpha.55 → 1.0.1-alpha.56

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.
@@ -1,30 +1,32 @@
1
- import { defineComponent as Ct, onMounted as Ft, useAttrs as Vt, ref as I, shallowRef as x, computed as H, watch as be, createBlock as ke, openBlock as v, withCtx as Me, renderSlot as R, createVNode as S, createElementVNode as f, mergeProps as u, unref as j, createElementBlock as h, createCommentVNode as $, withDirectives as Yt, toDisplayString as C, Fragment as te, renderList as de, createTextVNode as Bt, normalizeProps as It, withKeys as b, vShow as Ht } from "vue";
2
- import { D as J } from "../vendor/luxon/src/datetime.es.js";
1
+ import { defineComponent as Ht, onMounted as At, useAttrs as Pt, ref as B, shallowRef as $, computed as x, watch as Se, createBlock as ae, openBlock as v, withCtx as $e, renderSlot as j, createVNode as S, createElementVNode as g, mergeProps as c, unref as q, createElementBlock as h, createCommentVNode as C, withDirectives as Nt, toDisplayString as P, Fragment as le, renderList as fe, createTextVNode as Ut, normalizeProps as Ot, withKeys as b, vShow as Jt } from "vue";
2
+ import { D as O } from "../vendor/luxon/src/datetime.es.js";
3
3
  import "../vendor/luxon/src/duration.es.js";
4
- import { u as At } from "../plugins/WangsVue.es.js";
5
- import { s as Pt } from "../vendor/primevue/overlaypanel/overlaypanel.esm.es.js";
6
- import { s as xt } from "../vendor/primevue/selectbutton/selectbutton.esm.es.js";
7
- import { s as Nt } from "../vendor/primevue/skeleton/skeleton.esm.es.js";
8
- import { _ as ce } from "../button/index.es.js";
9
- import { _ as Ot } from "../fieldwrapper/index.es.js";
10
- import { _ as ae } from "../icon/index.es.js";
11
- import { _ as Jt } from "../inputgroup/index.es.js";
12
- import { _ as Ut } from "../validatormessage/index.es.js";
13
- const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value"], Kt = { class: "flex gap-1" }, zt = { key: 2 }, Wt = {
4
+ import { u as Kt } from "../plugins/WangsVue.es.js";
5
+ import { s as Zt } from "../vendor/primevue/overlaypanel/overlaypanel.esm.es.js";
6
+ import { s as zt } from "../vendor/primevue/selectbutton/selectbutton.esm.es.js";
7
+ import { s as Et } from "../vendor/primevue/skeleton/skeleton.esm.es.js";
8
+ import { _ as pe } from "../button/index.es.js";
9
+ import { _ as Wt } from "../fieldwrapper/index.es.js";
10
+ import { _ as ne } from "../icon/index.es.js";
11
+ import { _ as Lt } from "../inputgroup/index.es.js";
12
+ import { _ as Le } from "../inputtext/index.es.js";
13
+ import { _ as Rt } from "../validatormessage/index.es.js";
14
+ import { d as jt } from "../vendor/lodash-es/debounce.es.js";
15
+ const qt = ["id"], Gt = ["id", "aria-invalid", "disabled", "placeholder", "value"], Qt = { class: "flex gap-1" }, Xt = { key: 2 }, _t = {
14
16
  key: 0,
15
17
  class: "flex flex-col",
16
18
  "data-wv-section": "datepicker"
17
- }, Lt = { "data-wv-section": "tableheader" }, Rt = {
19
+ }, ea = { "data-wv-section": "tableheader" }, ta = {
18
20
  class: "grid grid-cols-7 justify-between h-[26.8px] items-center",
19
21
  "data-wv-section": "weekdays"
20
- }, jt = {
22
+ }, aa = {
21
23
  class: "grid grid-cols-7",
22
24
  "data-wv-section": "tablebody"
23
- }, qt = ["aria-label", "data-wv-other-month", "data-wv-today"], Gt = ["aria-disabled", "data-p-disabled", "onClick"], Qt = ["data-p-disabled", "data-p-highlight", "onClick"], Xt = ["data-p-disabled", "data-p-highlight", "onClick"], _t = ["aria-label", "disabled"], ea = ["aria-label", "disabled"], ta = ["aria-label", "disabled"], aa = ["aria-label", "disabled"], la = {
25
+ }, la = ["aria-label", "data-wv-other-month", "data-wv-today"], na = ["aria-disabled", "data-p-disabled", "onClick"], oa = ["data-p-disabled", "data-p-highlight", "onClick"], ra = ["data-p-disabled", "data-p-highlight", "onClick"], sa = ["aria-label", "disabled"], ia = ["aria-label", "disabled"], ua = ["aria-label", "disabled"], da = ["aria-label", "disabled"], ca = {
24
26
  key: 1,
25
27
  class: "w-full flex items-center justify-end gap-1",
26
28
  "data-wv-section": "calendarbuttons"
27
- }, ha = /* @__PURE__ */ Ct({
29
+ }, $a = /* @__PURE__ */ Ht({
28
30
  __name: "BaseCalendarTimeZone",
29
31
  props: {
30
32
  modelValue: {},
@@ -69,16 +71,16 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
69
71
  exactSelection: { type: Boolean, default: !1 }
70
72
  },
71
73
  emits: ["update:modelValue", "update:epochTimeMillis", "monthChange", "yearChange", "dateSelect"],
72
- setup(Ee, { emit: Ke }) {
73
- var Ze;
74
- const l = Ee, N = Ke;
75
- Ft(() => {
76
- W();
74
+ setup(Re, { emit: je }) {
75
+ var We;
76
+ const l = Re, N = je;
77
+ At(() => {
78
+ L();
77
79
  });
78
- const ze = Vt(), F = At("Calendar"), We = (1969 * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7, ve = JSON.parse(localStorage.getItem("user") || "{}"), A = (Ze = ve == null ? void 0 : ve.generalSetting) == null ? void 0 : Ze.timezone, g = (e) => {
79
- const t = A && J.local().setZone(A).isValid, a = e instanceof Date && !isNaN(e.getTime());
80
+ const qe = Pt(), F = Kt("Calendar"), Ge = (1969 * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7, he = JSON.parse(localStorage.getItem("user") || "{}"), H = (We = he == null ? void 0 : he.generalSetting) == null ? void 0 : We.timezone, y = (e) => {
81
+ const t = H && O.local().setZone(H).isValid, a = e instanceof Date && !isNaN(e.getTime());
80
82
  if (t) {
81
- const o = a ? J.fromJSDate(e).setZone(A) : J.now().setZone(A);
83
+ const o = a ? O.fromJSDate(e).setZone(H) : O.now().setZone(H);
82
84
  return {
83
85
  Date: o.toJSDate(),
84
86
  date: o.day,
@@ -106,22 +108,22 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
106
108
  minute: n.getMinutes(),
107
109
  second: n.getSeconds()
108
110
  };
109
- }, Te = I(), le = I(), me = I(), Le = g().Date, y = I(g().month), d = I(g().year), c = I(g().hour), D = I(g().minute), V = I(g().second), U = I(l.modelValue), ne = I(!1), fe = x(), p = x(l.view ?? "date"), Se = x([]), $e = x(!1), w = x(!1), pe = x(), Ce = x(!1), he = x(), Fe = x([]), r = H(() => l.showButtons || l.showTime ? U.value : l.modelValue), oe = H(() => Se.value.flatMap((e) => e)), Re = H(() => c.value < 10 ? "0" + c.value : c.value), je = H(() => D.value < 10 ? "0" + D.value : D.value), qe = H(() => l.dateFormat || F.locale.global.dateFormat), Ge = H(() => {
111
+ }, Ce = B(), oe = B(), ge = B(), Qe = y().Date, D = B(y().month), u = B(y().year), d = B(y().hour), f = B(y().minute), I = B(y().second), J = B(l.modelValue), re = B(!1), Fe = $(0), Ie = $(0), ye = $(), p = $(l.view ?? "date"), Ve = $([]), Ye = $(!1), w = $(!1), De = $(), Be = $(!1), we = $(), xe = $([]), r = x(() => l.showButtons || l.showTime ? J.value : l.modelValue), se = x(() => Ve.value.flatMap((e) => e)), Xe = x(() => d.value < 10 ? "0" + d.value : d.value), _e = x(() => f.value < 10 ? "0" + f.value : f.value), et = x(() => l.dateFormat || F.locale.global.dateFormat), tt = x(() => {
110
112
  const e = [], t = (a) => {
111
113
  if (l.minDate) {
112
114
  const n = l.minDate.getMonth(), o = l.minDate.getFullYear();
113
- if (d.value < o || d.value === o && a < n)
115
+ if (u.value < o || u.value === o && a < n)
114
116
  return !1;
115
117
  }
116
118
  if (l.maxDate) {
117
119
  const n = l.maxDate.getMonth(), o = l.maxDate.getFullYear();
118
- if (d.value > o || d.value === o && a > n)
120
+ if (u.value > o || u.value === o && a > n)
119
121
  return !1;
120
122
  }
121
123
  if (l.maxMonth && l.maxMonth === "current") {
122
124
  const n = /* @__PURE__ */ new Date(), o = n.getMonth(), s = n.getFullYear();
123
- return a <= o && d.value == s || // In current year
124
- d.value < s;
125
+ return a <= o && u.value == s || // In current year
126
+ u.value < s;
125
127
  }
126
128
  return !0;
127
129
  };
@@ -131,8 +133,8 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
131
133
  selectable: t(a)
132
134
  });
133
135
  return e;
134
- }), re = H(() => {
135
- const e = [], t = d.value - d.value % 10, a = (n) => {
136
+ }), ie = x(() => {
137
+ const e = [], t = u.value - u.value % 10, a = (n) => {
136
138
  if (l.minDate && l.minDate.getFullYear() > n || l.maxDate && l.maxDate.getFullYear() < n)
137
139
  return !1;
138
140
  if (l.maxYear && l.maxYear === "current") {
@@ -147,70 +149,70 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
147
149
  selectable: a(t + n)
148
150
  });
149
151
  return e;
150
- }), q = H(() => {
152
+ }), G = x(() => {
151
153
  let e;
152
- if (r.value && Q(r.value) ? e = r.value[k(r.value)] || r.value[0] : e = r.value, e && typeof e != "string" && e.toString() !== "Invalid Date")
154
+ if (r.value && Q(r.value) ? e = r.value[M(r.value)] || r.value[0] : e = r.value, e && typeof e != "string" && e.toString() !== "Invalid Date")
153
155
  return e;
154
- const t = J.now().setZone(A).toUTC().toJSDate();
156
+ const t = O.now().setZone(H).toUTC().toJSDate();
155
157
  return l.maxDate && l.maxDate < t ? l.maxDate : l.minDate && l.minDate > t ? l.minDate : t;
156
- }), Qe = H(() => l.invalid || !!ze["error-message"]), G = H(() => {
158
+ }), at = x(() => l.invalid || !!qe["error-message"]), K = x(() => {
157
159
  var e;
158
160
  return Q(r.value) ? !r.value || ((e = r.value) == null ? void 0 : e.length) === 0 : !1;
159
- }), k = (e) => (e == null ? void 0 : e.length) > 2 ? (e == null ? void 0 : e.length) - 1 : 1, Xe = () => {
160
- const e = new Date(d.value, y.value, 1), t = new Date(d.value, y.value + 1, 0), a = t.getDate(), n = e.getDay(), o = t.getDay(), s = [];
161
+ }), M = (e) => (e == null ? void 0 : e.length) > 2 ? (e == null ? void 0 : e.length) - 1 : 1, lt = () => {
162
+ const e = new Date(u.value, D.value, 1), t = new Date(u.value, D.value + 1, 0), a = t.getDate(), n = e.getDay(), o = t.getDay(), s = [];
161
163
  let m = 1 - n;
162
164
  for (; m <= a; ) {
163
165
  const i = [];
164
- for (let O = 0; O < 7; O++)
166
+ for (let U = 0; U < 7; U++)
165
167
  i.push({
166
168
  day: m,
167
- month: y.value,
168
- year: d.value,
169
+ month: D.value,
170
+ year: u.value,
169
171
  otherMonth: m < 1 || m > a,
170
- today: m === Le.getDate() && y.value === (/* @__PURE__ */ new Date()).getMonth() && d.value === (/* @__PURE__ */ new Date()).getFullYear(),
171
- selectable: ut(
172
+ today: m === Qe.getDate() && D.value === (/* @__PURE__ */ new Date()).getMonth() && u.value === (/* @__PURE__ */ new Date()).getFullYear(),
173
+ selectable: ft(
172
174
  m,
173
- y.value,
174
- d.value
175
+ D.value,
176
+ u.value
175
177
  )
176
178
  }), m++;
177
179
  s.push(i);
178
180
  }
179
181
  if (o !== 6) {
180
182
  const i = s[s.length - 1];
181
- let O = 1;
182
- for (let B = o + 1; B < 7; B++)
183
- i[B].day = O++, i[B].otherMonth = !0;
183
+ let U = 1;
184
+ for (let Y = o + 1; Y < 7; Y++)
185
+ i[Y].day = U++, i[Y].otherMonth = !0;
184
186
  }
185
187
  return s;
186
- }, _e = () => {
187
- y.value === 0 ? (d.value--, y.value = 11) : y.value--, W();
188
- }, et = () => {
189
- d.value--;
190
- }, Ve = () => {
191
- d.value++;
192
- }, tt = () => {
193
- y.value === 11 ? (Ve(), y.value = 0) : y.value++, W();
194
- }, at = () => {
195
- d.value -= 10;
196
- }, lt = () => {
197
- d.value += 10;
198
188
  }, nt = () => {
199
- p.value === "date" ? _e() : p.value === "month" ? et() : at();
189
+ D.value === 0 ? (u.value--, D.value = 11) : D.value--, L();
200
190
  }, ot = () => {
201
- p.value === "date" ? tt() : p.value === "month" ? Ve() : lt();
202
- }, W = () => {
203
- Se.value = Xe();
204
- }, Z = () => r.value != null && typeof r.value != "string", E = (e) => l.selectionMode === "single" && (!Array.isArray(r.value) || r.value == null), Y = () => l.selectionMode === "range" && (Array.isArray(r.value) || r.value == null), P = () => l.selectionMode === "multiple" && (Array.isArray(r.value) || r.value == null), Q = (e) => P() || Y(), K = (e, t) => {
191
+ u.value--;
192
+ }, He = () => {
193
+ u.value++;
194
+ }, rt = () => {
195
+ D.value === 11 ? (He(), D.value = 0) : D.value++, L();
196
+ }, st = () => {
197
+ u.value -= 10;
198
+ }, it = () => {
199
+ u.value += 10;
200
+ }, ut = () => {
201
+ p.value === "date" ? nt() : p.value === "month" ? ot() : st();
202
+ }, dt = () => {
203
+ p.value === "date" ? rt() : p.value === "month" ? He() : it();
204
+ }, L = () => {
205
+ Ve.value = lt();
206
+ }, Z = () => r.value != null && typeof r.value != "string", z = (e) => l.selectionMode === "single" && (!Array.isArray(r.value) || r.value == null), V = () => l.selectionMode === "range" && (Array.isArray(r.value) || r.value == null), A = () => l.selectionMode === "multiple" && (Array.isArray(r.value) || r.value == null), Q = (e) => A() || V(), E = (e, t) => {
205
207
  if (e) {
206
- if (A) {
207
- const a = J.fromJSDate(e).setZone(A);
208
+ if (H) {
209
+ const a = O.fromJSDate(e).setZone(H);
208
210
  return a.day === t.day && a.month === t.month + 1 && a.year === t.year;
209
211
  }
210
212
  return e.getDate() === t.day && e.getMonth() === t.month && e.getFullYear() === t.year;
211
213
  }
212
214
  return !1;
213
- }, rt = (e, t, a) => {
215
+ }, ct = (e, t, a) => {
214
216
  if (e && t) {
215
217
  const o = new Date(a.year, a.month, a.day);
216
218
  return e.getTime() <= o.getTime() && t.getTime() >= o.getTime();
@@ -220,65 +222,65 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
220
222
  if (!Z())
221
223
  return !1;
222
224
  if (r.value) {
223
- if (E(r.value))
224
- return K(r.value, e);
225
- if (P())
225
+ if (z(r.value))
226
+ return E(r.value, e);
227
+ if (A())
226
228
  return r.value.some(
227
- (t) => K(t, e)
229
+ (t) => E(t, e)
228
230
  );
229
- if (Y())
230
- return r.value[k(r.value)] ? K(r.value[0], e) || K(
231
- r.value[k(r.value)],
231
+ if (V())
232
+ return r.value[M(r.value)] ? E(r.value[0], e) || E(
233
+ r.value[M(r.value)],
232
234
  e
233
- ) || rt(
235
+ ) || ct(
234
236
  r.value[0],
235
- r.value[k(r.value)],
237
+ r.value[M(r.value)],
236
238
  e
237
- ) : K(r.value[0], e);
239
+ ) : E(r.value[0], e);
238
240
  }
239
241
  return !1;
240
- }, st = (e) => E(r.value) || P() ? X(e) : Y() ? X(e) && (K(r.value[0], e) || r.value[0] == null) : !1, it = (e) => E(r.value) || P() ? X(e) : Y() ? X(e) && (K(
241
- r.value[k(r.value)],
242
+ }, vt = (e) => z(r.value) || A() ? X(e) : V() ? X(e) && (E(r.value[0], e) || r.value[0] == null) : !1, mt = (e) => z(r.value) || A() ? X(e) : V() ? X(e) && (E(
243
+ r.value[M(r.value)],
242
244
  e
243
- ) || r.value[k(r.value)] == null) : !1, Ye = (e) => {
245
+ ) || r.value[M(r.value)] == null) : !1, Ae = (e) => {
244
246
  if (Z()) {
245
- if (E(r.value))
246
- return r.value.getMonth() === e && r.value.getFullYear() === d.value;
247
- if (P())
247
+ if (z(r.value))
248
+ return r.value.getMonth() === e && r.value.getFullYear() === u.value;
249
+ if (A())
248
250
  return r.value.some(
249
- (t) => t.getMonth() === e && t.getFullYear() === d.value
251
+ (t) => t.getMonth() === e && t.getFullYear() === u.value
250
252
  );
251
- if (Y()) {
253
+ if (V()) {
252
254
  const [t, a] = r.value;
253
255
  if (t && a) {
254
256
  const n = new Date(
255
- g(t).year,
256
- g(t).month
257
+ y(t).year,
258
+ y(t).month
257
259
  ), o = new Date(
258
- g(a).year,
259
- g(a).month
260
- ), s = new Date(d.value, e);
260
+ y(a).year,
261
+ y(a).month
262
+ ), s = new Date(u.value, e);
261
263
  return s >= n && s <= o;
262
264
  }
263
265
  }
264
266
  }
265
267
  return !1;
266
- }, Be = (e) => {
268
+ }, Pe = (e) => {
267
269
  var t;
268
270
  if (Z()) {
269
- if (E(r.value))
271
+ if (z(r.value))
270
272
  return ((t = r.value) == null ? void 0 : t.getFullYear()) === e;
271
- if (P())
273
+ if (A())
272
274
  return r.value.some(
273
275
  (a) => a.getFullYear() === e
274
276
  );
275
- if (Y()) {
277
+ if (V()) {
276
278
  const [a, n] = r.value;
277
279
  return e >= a.getFullYear() && e <= (n ?? a).getFullYear();
278
280
  }
279
281
  }
280
282
  return !1;
281
- }, ut = (e, t, a) => {
283
+ }, ft = (e, t, a) => {
282
284
  let n = !0, o = !0, s = !0, m = !0;
283
285
  if (l.onlyWeekdays) {
284
286
  const i = new Date(a, t, e).getDay();
@@ -287,182 +289,182 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
287
289
  return l.excludeDates && (m = !l.excludeDates.some(
288
290
  (i) => i.getFullYear() === a && i.getMonth() === t && i.getDate() === e
289
291
  )), l.minDate && (l.minDate.getFullYear() > a || l.minDate.getFullYear() === a && (l.minDate.getMonth() > t || l.minDate.getMonth() === t && l.minDate.getDate() > e)) && (n = !1), l.maxDate && (l.maxDate.getFullYear() < a || l.maxDate.getFullYear() === a && (l.maxDate.getMonth() < t || l.maxDate.getMonth() === t && l.maxDate.getDate() < e)) && (o = !1), n && o && s && m;
290
- }, ge = (e, t) => {
291
- e.currentTarget instanceof HTMLElement && e.currentTarget.focus(), t.selectable && Tt(t), l.selectionMode === "single" && (!l.showTime || l.hideOnDateTimeSelect) && ee();
292
- }, dt = (e, t) => {
293
- t.selectable && (l.view === "month" ? ge(e, {
294
- year: d.value,
292
+ }, be = (e, t) => {
293
+ e.currentTarget instanceof HTMLElement && e.currentTarget.focus(), t.selectable && It(t), l.selectionMode === "single" && (!l.showTime || l.hideOnDateTimeSelect) && te();
294
+ }, pt = (e, t) => {
295
+ t.selectable && (l.view === "month" ? be(e, {
296
+ year: u.value,
295
297
  month: t.value,
296
298
  day: 1,
297
299
  selectable: !0,
298
300
  today: !1,
299
301
  otherMonth: !1
300
- }) : (y.value = t.value, p.value = "date", N("monthChange", {
301
- month: y.value,
302
- year: d.value
303
- })), W());
304
- }, ct = (e, t) => {
305
- t.selectable && (l.view === "year" ? ge(e, {
302
+ }) : (D.value = t.value, p.value = "date", N("monthChange", {
303
+ month: D.value,
304
+ year: u.value
305
+ })), L());
306
+ }, ht = (e, t) => {
307
+ t.selectable && (l.view === "year" ? be(e, {
306
308
  year: t.value,
307
309
  month: 0,
308
310
  day: 1,
309
311
  selectable: !0,
310
312
  otherMonth: !1,
311
313
  today: !1
312
- }) : (d.value = t.value, p.value = "month", N("yearChange", {
313
- month: y.value + 1,
314
- year: d.value
315
- })), W());
316
- }, M = (e, t, a) => {
317
- !l.disabled && !l.readonly && (Ae(e, null, t, a), e.preventDefault());
314
+ }) : (u.value = t.value, p.value = "month", N("yearChange", {
315
+ month: D.value + 1,
316
+ year: u.value
317
+ })), L());
318
+ }, k = (e, t, a) => {
319
+ !l.disabled && !l.readonly && (Oe(e, null, t, a), e.preventDefault());
318
320
  }, T = (e) => {
319
- !l.disabled && !l.readonly && (ye(), Pe(), e.preventDefault());
320
- }, se = () => {
321
- ye();
322
- }, ie = (e) => {
321
+ !l.disabled && !l.readonly && (Me(), ee(), e.preventDefault());
322
+ }, ue = () => {
323
+ Me();
324
+ }, de = (e) => {
323
325
  switch (e.code) {
324
326
  case "Tab":
325
327
  break;
326
328
  case "Escape":
327
- ee(), e.preventDefault();
329
+ te(), e.preventDefault();
328
330
  break;
329
331
  }
330
- }, Ie = (e) => {
332
+ }, Ne = (e) => {
331
333
  l.disabled || setTimeout(() => {
332
- le.value.show(e, He(e));
334
+ oe.value.show(e, Ue(e));
333
335
  }, 0);
334
- }, vt = (e) => {
336
+ }, gt = (e) => {
335
337
  l.disabled || setTimeout(() => {
336
338
  var t;
337
- (t = le.value) == null || t.toggle(e, He(e));
339
+ (t = oe.value) == null || t.toggle(e, Ue(e));
338
340
  }, 0);
339
- }, mt = () => {
340
- p.value = l.view, De(), ne.value || Oe();
341
- }, He = (e) => ("$el" in me.value ? me.value.$el : Te.value) ?? e.currentTarget, Ae = (e, t, a, n) => {
342
- switch (t || (t = 500), ye(), pe.value = setTimeout(() => {
343
- Ae(e, 100, a, n);
341
+ }, yt = () => {
342
+ p.value = l.view, ke(), re.value || Ze();
343
+ }, Ue = (e) => ("$el" in ge.value ? ge.value.$el : Ce.value) ?? e.currentTarget, Oe = (e, t, a, n) => {
344
+ switch (t || (t = 500), Me(), De.value = setTimeout(() => {
345
+ Oe(e, 100, a, n);
344
346
  }, t), a) {
345
347
  case 0:
346
- n === 1 ? ft(e) : pt(e);
348
+ n === 1 ? Dt(e) : wt(e);
347
349
  break;
348
350
  case 1:
349
- n === 1 ? ht(e) : gt(e);
351
+ n === 1 ? bt(e) : Mt(e);
350
352
  break;
351
353
  }
352
- }, ft = (e) => {
353
- const t = c.value;
354
- let a = c.value + Number(l.stepHour), n = w.value;
355
- l.hourFormat == "24" ? a = a >= 24 ? a - 24 : a : l.hourFormat == "12" && (t < 12 && a > 11 && (n = !w.value), a = a >= 13 ? a - 12 : a), _(a, D.value, V.value, n) && (c.value = a, w.value = n), e.preventDefault();
356
- }, pt = (e) => {
357
- let t = c.value - l.stepHour, a = w.value;
358
- l.hourFormat == "24" ? t = t < 0 ? 24 + t : t : l.hourFormat == "12" && (c.value === 12 && (a = !w.value), t = t <= 0 ? 12 + t : t), _(t, D.value, V.value, a) && (c.value = t, w.value = a), e.preventDefault();
359
- }, ht = (e) => {
360
- const t = D.value + Number(l.stepMinute);
361
- _(c.value, t, V.value, w.value) && (D.value = t > 59 ? t - 60 : t), e.preventDefault();
362
- }, gt = (e) => {
363
- let t = D.value - l.stepMinute;
364
- t = t < 0 ? 60 + t : t, _(c.value, t, V.value, w.value) && (D.value = t), e.preventDefault();
365
- }, ye = () => {
366
- pe.value && clearInterval(pe.value);
354
+ }, Dt = (e) => {
355
+ const t = d.value;
356
+ let a = d.value + Number(l.stepHour), n = w.value;
357
+ l.hourFormat == "24" ? a = a >= 24 ? a - 24 : a : l.hourFormat == "12" && (t < 12 && a > 11 && (n = !w.value), a = a >= 13 ? a - 12 : a), _(a, f.value, I.value, n) && (d.value = a, w.value = n), e.preventDefault();
358
+ }, wt = (e) => {
359
+ let t = d.value - l.stepHour, a = w.value;
360
+ l.hourFormat == "24" ? t = t < 0 ? 24 + t : t : l.hourFormat == "12" && (d.value === 12 && (a = !w.value), t = t <= 0 ? 12 + t : t), _(t, f.value, I.value, a) && (d.value = t, w.value = a), e.preventDefault();
361
+ }, bt = (e) => {
362
+ const t = f.value + Number(l.stepMinute);
363
+ _(d.value, t, I.value, w.value) && (f.value = t > 59 ? t - 60 : t), e.preventDefault();
364
+ }, Mt = (e) => {
365
+ let t = f.value - l.stepMinute;
366
+ t = t < 0 ? 60 + t : t, _(d.value, t, I.value, w.value) && (f.value = t), e.preventDefault();
367
+ }, Me = () => {
368
+ De.value && clearInterval(De.value);
367
369
  }, _ = (e, t, a, n) => {
368
370
  let o;
369
- const s = yt(e, n);
371
+ const s = kt(e, n);
370
372
  if (Q(r.value)) {
371
- const i = Z() ? r.value : q.value;
372
- o = i[k(i)] || i[0];
373
+ const i = Z() ? r.value : G.value;
374
+ o = i[M(i)] || i[0];
373
375
  } else
374
- o = Z() ? r.value : q.value;
376
+ o = Z() ? r.value : G.value;
375
377
  const m = o ? o.toDateString() : null;
376
378
  return !(l.minDate && m && l.minDate.toDateString() === m && (l.minDate.getHours() > s || l.minDate.getHours() === s && (l.minDate.getMinutes() > t || l.minDate.getMinutes() === t && l.minDate.getSeconds() > a)) || l.maxDate && m && l.maxDate.toDateString() === m && (l.maxDate.getHours() < s || l.maxDate.getHours() === s && (l.maxDate.getMinutes() < t || l.maxDate.getMinutes() === t && l.maxDate.getSeconds() < a)));
377
- }, yt = (e, t) => l.hourFormat == "12" ? e === 12 ? t ? 12 : 0 : t ? e + 12 : e : e, Pe = () => {
379
+ }, kt = (e, t) => l.hourFormat == "12" ? e === 12 ? t ? 12 : 0 : t ? e + 12 : e : e, ee = () => {
378
380
  const e = (o) => {
379
- const s = g(o);
380
- return Ue({
381
+ const s = y(o);
382
+ return Ee({
381
383
  day: s.date,
382
384
  // Use dateTz.date to match Date.getDate(), because dateTz.day is 0-6 (Sunday-Saturday)
383
385
  month: s.month,
384
386
  year: s.year
385
387
  });
386
388
  };
387
- Ce.value = !0;
389
+ Be.value = !0;
388
390
  let t;
389
391
  const a = Array.isArray(r.value) ? r.value.map((o) => e(o)) : e(r.value);
390
392
  if (Q(r.value)) {
391
- const o = Z() ? a : e(q.value);
392
- t = o[k(o)] || o[0];
393
+ const o = Z() ? a : e(G.value);
394
+ t = o[M(o)] || o[0];
393
395
  } else
394
- t = Z() ? a : e(q.value);
395
- t = t && !Array.isArray(t) ? t : e(), l.hourFormat == "12" ? c.value === 12 ? t = t.set({ hour: w.value ? 12 : 0 }) : t = t.set({
396
- hour: w.value ? c.value + 12 : c.value
397
- }) : t = t.set({ hour: c.value }), t = t.set({
398
- minute: D.value,
399
- second: V.value
400
- }), Q(r.value) && (P() ? t = a == null ? void 0 : a.map(
401
- (o) => J.fromISO(o.toISO())
402
- ) : Y() && (r.value[k(r.value)] ? t = [a[0], t] : t = [t, null]));
396
+ t = Z() ? a : e(G.value);
397
+ t = t && !Array.isArray(t) ? t : e(), l.hourFormat == "12" ? d.value === 12 ? t = t.set({ hour: w.value ? 12 : 0 }) : t = t.set({
398
+ hour: w.value ? d.value + 12 : d.value
399
+ }) : t = t.set({ hour: d.value }), t = t.set({
400
+ minute: f.value,
401
+ second: I.value
402
+ }), Q(r.value) && (A() ? t = a == null ? void 0 : a.map(
403
+ (o) => O.fromISO(o.toISO())
404
+ ) : V() && (r.value[M(r.value)] ? t = [a[0], t] : t = [t, null]));
403
405
  const n = Array.isArray(t) ? t.map((o) => o == null ? void 0 : o.toJSDate()) : t.toJSDate();
404
- Ne(n), N("dateSelect", n), setTimeout(() => Ce.value = !1, 0);
405
- }, xe = (e) => e ? Array.isArray(e) ? e.map((a) => a == null ? void 0 : a.getTime()) : e.getTime() : null, Ne = (e) => {
406
- l.showButtons || l.showTime ? (U.value = e, ne.value = !1) : (N("update:epochTimeMillis", xe(e)), N("update:modelValue", e));
407
- }, Dt = () => {
408
- N("update:epochTimeMillis", xe(U.value)), N("update:modelValue", U.value), ne.value = !0, ee();
409
- }, Oe = () => {
410
- U.value = l.modelValue, ne.value = !0, ee();
411
- }, wt = () => {
406
+ Ke(n), N("dateSelect", n), setTimeout(() => Be.value = !1, 0);
407
+ }, Je = (e) => e ? Array.isArray(e) ? e.map((a) => a == null ? void 0 : a.getTime()) : e.getTime() : null, Ke = (e) => {
408
+ l.showButtons || l.showTime ? (J.value = e, re.value = !1) : (N("update:epochTimeMillis", Je(e)), N("update:modelValue", e));
409
+ }, Tt = () => {
410
+ N("update:epochTimeMillis", Je(J.value)), N("update:modelValue", J.value), re.value = !0, te();
411
+ }, Ze = () => {
412
+ J.value = l.modelValue, re.value = !0, te();
413
+ }, St = () => {
412
414
  !_(
413
- c.value,
414
- D.value,
415
- V.value,
415
+ d.value,
416
+ f.value,
417
+ I.value,
416
418
  !w.value
417
- ) && (l.maxDate || l.minDate) || (w.value = !w.value, Pe());
418
- }, De = () => {
419
- const e = g(q.value);
420
- y.value = e.month, d.value = e.year, l.showTime && bt(e);
421
- }, bt = (e) => {
419
+ ) && (l.maxDate || l.minDate) || (w.value = !w.value, ee());
420
+ }, ke = () => {
421
+ const e = y(G.value);
422
+ D.value = e.month, u.value = e.year, l.showTime && $t(e);
423
+ }, $t = (e) => {
422
424
  let { hour: t } = e;
423
- l.hourFormat === "12" && (w.value = t > 11, t >= 12 ? t = t == 12 ? 12 : t - 12 : t = t == 0 ? 12 : t), c.value = Math.floor(t / l.stepHour) * l.stepHour, D.value = Math.floor(e.minute / l.stepMinute) * l.stepMinute;
424
- }, Je = () => {
425
- const e = l.showButtons || l.showTime ? U.value : r.value;
425
+ l.hourFormat === "12" && (w.value = t > 11, t >= 12 ? t = t == 12 ? 12 : t - 12 : t = t == 0 ? 12 : t), d.value = Math.floor(t / l.stepHour) * l.stepHour, f.value = Math.floor(e.minute / l.stepMinute) * l.stepMinute;
426
+ }, ze = () => {
427
+ const e = l.showButtons || l.showTime ? J.value : r.value;
426
428
  if (typeof e == "string")
427
429
  return e;
428
430
  let t = "";
429
431
  if (e)
430
432
  try {
431
- if (E(e))
432
- e.toString() !== "Invalid Date" && (t = ue(e));
433
- else if (P())
434
- e && e.length && (t = e.map((a) => ue(a)).join(", "));
435
- else if (Y() && e && e.length) {
436
- const a = e[0], n = e[k(e)];
437
- a.toString() !== "Invalid Date" && (t = ue(a)), n && n.toString() !== "Invalid Date" && (t += " - " + ue(n));
433
+ if (z(e))
434
+ e.toString() !== "Invalid Date" && (t = ce(e));
435
+ else if (A())
436
+ e && e.length && (t = e.map((a) => ce(a)).join(", "));
437
+ else if (V() && e && e.length) {
438
+ const a = e[0], n = e[M(e)];
439
+ a.toString() !== "Invalid Date" && (t = ce(a)), n && n.toString() !== "Invalid Date" && (t += " - " + ce(n));
438
440
  }
439
441
  } catch {
440
442
  t = e.toString();
441
443
  }
442
444
  return t;
443
- }, ue = (e) => {
445
+ }, ce = (e) => {
444
446
  let t = null;
445
- return e && (t = kt(e, qe.value), l.showTime && (t += " " + Mt(e))), t;
446
- }, kt = (e, t) => {
447
+ return e && (t = Ct(e, et.value), l.showTime && (t += " " + Ft(e))), t;
448
+ }, Ct = (e, t) => {
447
449
  if (!e)
448
450
  return "";
449
- const a = g(e);
451
+ const a = y(e);
450
452
  let n;
451
- const o = (B) => {
452
- const z = n + 1 < t.length && t.charAt(n + 1) === B;
453
- return z && n++, z;
454
- }, s = (B, z, we) => {
455
- let L = "" + z;
456
- if (o(B))
457
- for (; L.length < we; )
458
- L = "0" + L;
459
- return L;
460
- }, m = (B, z, we, L) => o(B) ? L[z] : we[z];
461
- let i = "", O = !1;
453
+ const o = (Y) => {
454
+ const W = n + 1 < t.length && t.charAt(n + 1) === Y;
455
+ return W && n++, W;
456
+ }, s = (Y, W, Te) => {
457
+ let R = "" + W;
458
+ if (o(Y))
459
+ for (; R.length < Te; )
460
+ R = "0" + R;
461
+ return R;
462
+ }, m = (Y, W, Te, R) => o(Y) ? R[W] : Te[W];
463
+ let i = "", U = !1;
462
464
  if (e)
463
465
  for (n = 0; n < t.length; n++)
464
- if (O)
465
- t.charAt(n) === "'" && !o("'") ? O = !1 : i += t.charAt(n);
466
+ if (U)
467
+ t.charAt(n) === "'" && !o("'") ? U = !1 : i += t.charAt(n);
466
468
  else
467
469
  switch (t.charAt(n)) {
468
470
  case "d":
@@ -507,43 +509,43 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
507
509
  i += a.time;
508
510
  break;
509
511
  case "!":
510
- i += a.time * 1e4 + We;
512
+ i += a.time * 1e4 + Ge;
511
513
  break;
512
514
  case "'":
513
- o("'") ? i += "'" : O = !0;
515
+ o("'") ? i += "'" : U = !0;
514
516
  break;
515
517
  default:
516
518
  i += t.charAt(n);
517
519
  }
518
520
  return i;
519
- }, Mt = (e) => {
521
+ }, Ft = (e) => {
520
522
  if (!e)
521
523
  return "";
522
- const t = g(e);
524
+ const t = y(e);
523
525
  let a = "", n = t.hour;
524
526
  const o = t.minute;
525
527
  return l.hourFormat === "12" && n > 11 && n !== 12 && (n -= 12), l.hourFormat === "12" ? a += n === 0 ? 12 : n < 10 ? "0" + n : n : a += n < 10 ? "0" + n : n, a += ":", a += o < 10 ? "0" + o : o, l.hourFormat === "12" && (a += t.hour > 11 ? ` ${F.locale.global.pm}` : ` ${F.locale.global.am}`), a;
526
- }, Ue = (e) => {
527
- const { year: t, month: a, day: n } = e, o = J.local().setZone(A).isValid ? A : Intl.DateTimeFormat().resolvedOptions().timeZone;
528
- return J.fromObject(
528
+ }, Ee = (e) => {
529
+ const { year: t, month: a, day: n } = e, o = O.local().setZone(H).isValid ? H : Intl.DateTimeFormat().resolvedOptions().timeZone;
530
+ return O.fromObject(
529
531
  {
530
532
  year: t,
531
533
  month: a + 1,
532
534
  day: n,
533
- hour: l.showTime ? c.value : 0,
534
- minute: l.showTime ? D.value : 0,
535
- second: l.showTime ? V.value : 0
535
+ hour: l.showTime ? d.value : 0,
536
+ minute: l.showTime ? f.value : 0,
537
+ second: l.showTime ? I.value : 0
536
538
  },
537
539
  { zone: o }
538
540
  );
539
- }, Tt = (e) => {
540
- const t = Ue(e);
541
+ }, It = (e) => {
542
+ const t = Ee(e);
541
543
  if (l.showTime && t.set({
542
- hour: c.value + (l.hourFormat === "12" && c.value !== 12 && w.value ? 12 : 0),
543
- minute: D.value,
544
- second: V.value
544
+ hour: d.value + (l.hourFormat === "12" && d.value !== 12 && w.value ? 12 : 0),
545
+ minute: f.value,
546
+ second: I.value
545
547
  }), l.minDate && l.minDate > t.toUTC().toJSDate()) {
546
- const n = g(l.minDate);
548
+ const n = y(l.minDate);
547
549
  t.set({
548
550
  year: n.year,
549
551
  month: n.month,
@@ -551,10 +553,10 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
551
553
  hour: n.hour,
552
554
  minute: n.minute,
553
555
  second: n.second
554
- }), c.value = t.hour, D.value = t.minute, V.value = t.second;
556
+ }), d.value = t.hour, f.value = t.minute, I.value = t.second;
555
557
  }
556
558
  if (l.maxDate && l.maxDate < t.toUTC().toJSDate()) {
557
- const n = g(l.maxDate);
559
+ const n = y(l.maxDate);
558
560
  t.set({
559
561
  year: n.year,
560
562
  month: n.month,
@@ -562,12 +564,12 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
562
564
  hour: n.hour,
563
565
  minute: n.minute,
564
566
  second: n.second
565
- }), c.value = t.hour, D.value = t.minute, V.value = t.second;
567
+ }), d.value = t.hour, f.value = t.minute, I.value = t.second;
566
568
  }
567
569
  let a = null;
568
- if (E(r.value))
570
+ if (z(r.value))
569
571
  a = t.toUTC().toJSDate();
570
- else if (P()) {
572
+ else if (A()) {
571
573
  let n = r.value;
572
574
  if (n && n.length) {
573
575
  const o = n.findIndex(
@@ -577,37 +579,59 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
577
579
  } else n = [t.toUTC().toJSDate()];
578
580
  a = n;
579
581
  } else if (l.exactSelection)
580
- a = $t(e, t.toUTC().toJSDate());
581
- else if (Y())
582
+ a = Yt(e, t.toUTC().toJSDate());
583
+ else if (V())
582
584
  if (r.value && r.value.length) {
583
- let n = r.value[0], o = r.value[k(r.value)];
585
+ let n = r.value[0], o = r.value[M(r.value)];
584
586
  !o && t.toMillis() >= n.getTime() ? o = t.toUTC().toJSDate() : (n = t.toUTC().toJSDate(), o = null), a = [n, o];
585
587
  } else
586
588
  a = [t.toUTC().toJSDate(), null];
587
- a !== null && Ne(a), St(a), N("dateSelect", t.toUTC().toJSDate());
588
- }, St = (e) => {
589
- const t = l.exactSelection ? e.length > 1 : e && e[k(e)] !== null;
590
- Y() && l.hideOnRangeSelection && !l.showButtons && !l.showTime && t && ee();
591
- }, $t = (e, t) => {
592
- const a = he.value;
593
- if (!he.value || a.day === e.day)
594
- return he.value = e, Fe.value = oe.value, [t];
595
- const n = a.month === e.month ? oe.value.filter((o) => o.day > a.day && o.day < e.day).map((o) => new Date(o.year, o.month, o.day)) : [
596
- ...Fe.value.filter((o) => !o.otherMonth && o.day > a.day).map((o) => new Date(o.year, o.month, o.day)),
597
- ...oe.value.filter((o) => !o.otherMonth && o.day < e.day).map((o) => new Date(o.year, o.month, o.day))
589
+ a !== null && Ke(a), Vt(a), N("dateSelect", t.toUTC().toJSDate());
590
+ }, Vt = (e) => {
591
+ const t = l.exactSelection ? e.length > 1 : e && e[M(e)] !== null;
592
+ V() && l.hideOnRangeSelection && !l.showButtons && !l.showTime && t && te();
593
+ }, Yt = (e, t) => {
594
+ const a = we.value;
595
+ if (!we.value || a.day === e.day)
596
+ return we.value = e, xe.value = se.value, [t];
597
+ const n = a.month === e.month ? se.value.filter((o) => o.day > a.day && o.day < e.day).map((o) => new Date(o.year, o.month, o.day)) : [
598
+ ...xe.value.filter((o) => !o.otherMonth && o.day > a.day).map((o) => new Date(o.year, o.month, o.day)),
599
+ ...se.value.filter((o) => !o.otherMonth && o.day < e.day).map((o) => new Date(o.year, o.month, o.day))
598
600
  ];
599
601
  return [
600
602
  new Date(a.year, a.month, a.day),
601
603
  ...n,
602
604
  t
603
605
  ];
604
- }, ee = () => {
606
+ }, te = () => {
605
607
  setTimeout(() => {
606
608
  var e;
607
- (e = le.value) == null || e.hide();
609
+ (e = oe.value) == null || e.hide();
608
610
  }, 150);
609
- };
610
- return be(
611
+ }, ve = (e) => {
612
+ e === "hour" ? Fe.value++ : Ie.value++, ee();
613
+ }, Bt = (e) => {
614
+ const t = "hour";
615
+ if (!e || parseInt(e) === 0)
616
+ me(t, e);
617
+ else {
618
+ me.cancel();
619
+ const a = parseInt(e);
620
+ l.hourFormat === "12" && a > 12 ? (d.value = Math.min(Math.max(a, 1), 12), ve(t)) : l.hourFormat === "24" && a > 23 ? (d.value = Math.min(Math.max(a, 0), 23), ve(t)) : (d.value = a, ee());
621
+ }
622
+ }, xt = (e) => {
623
+ const t = "minute";
624
+ if (!e || parseInt(e) === 0)
625
+ me(t, e);
626
+ else {
627
+ me.cancel();
628
+ const a = parseInt(e);
629
+ a > 59 ? (f.value = Math.min(Math.max(a, 0), 59), ve(t)) : (f.value = a, ee());
630
+ }
631
+ }, me = jt((e, t) => {
632
+ (!t || parseInt(t) === 0) && (e === "hour" ? d.value = l.hourFormat === "12" ? 1 : 0 : f.value = 0, ve(e));
633
+ }, 2e3);
634
+ return Se(
611
635
  () => [
612
636
  l.minDate,
613
637
  l.maxDate,
@@ -615,86 +639,86 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
615
639
  l.maxYear,
616
640
  l.maxMonth
617
641
  ],
618
- () => W()
619
- ), be(
642
+ () => L()
643
+ ), Se(
620
644
  () => r.value,
621
645
  () => {
622
- De(), fe.value = Je();
646
+ ke(), ye.value = ze();
623
647
  },
624
648
  {
625
649
  immediate: !0
626
650
  }
627
- ), (l.showButtons || l.showTime) && be(
628
- U,
651
+ ), (l.showButtons || l.showTime) && Se(
652
+ J,
629
653
  () => {
630
- De(), fe.value = Je();
654
+ ke(), ye.value = ze();
631
655
  },
632
656
  {
633
657
  immediate: !0,
634
658
  deep: !0
635
659
  }
636
- ), (e, t) => (v(), ke(Ot, {
660
+ ), (e, t) => (v(), ae(Wt, {
637
661
  ref_key: "wrapper",
638
- ref: me,
662
+ ref: ge,
639
663
  info: e.fieldInfo,
640
664
  label: e.label,
641
665
  mandatory: e.mandatory,
642
666
  "show-optional-text": e.showOptionalText
643
667
  }, {
644
- default: Me(() => [
645
- R(e.$slots, "default", { onClick: Ie }, () => [
646
- S(Jt, {
668
+ default: $e(() => [
669
+ j(e.$slots, "default", { onClick: Ne }, () => [
670
+ S(Lt, {
647
671
  disabled: e.disabled,
648
- invalid: Qe.value
672
+ invalid: at.value
649
673
  }, {
650
- default: Me(() => [
651
- f("span", u(e.$preset.calendar.root({ props: l }), {
674
+ default: $e(() => [
675
+ g("span", c(e.$preset.calendar.root({ props: l }), {
652
676
  id: e.id,
653
677
  "data-wv-name": "calendar",
654
678
  "data-wv-section": "root"
655
679
  }), [
656
- f("input", u({
680
+ g("input", c({
657
681
  id: e.inputId,
658
682
  ref_key: "input",
659
- ref: Te,
683
+ ref: Ce,
660
684
  "aria-invalid": e.invalid || void 0,
661
685
  disabled: e.disabled,
662
- placeholder: e.placeholder ?? j(F).locale.defaultPlaceholder,
686
+ placeholder: e.placeholder ?? q(F).locale.defaultPlaceholder,
663
687
  tabindex: 0,
664
- value: fe.value,
665
- onClick: Ie,
688
+ value: ye.value,
689
+ onClick: Ne,
666
690
  "aria-autocomplete": "none",
667
691
  autocomplete: "off",
668
692
  inputmode: "none",
669
693
  readonly: "",
670
694
  role: "combobox",
671
695
  type: "text"
672
- }, e.$preset.calendar.input({ props: l })), null, 16, Et),
673
- S(ae, u({
674
- onClick: vt,
696
+ }, e.$preset.calendar.input({ props: l })), null, 16, Gt),
697
+ S(ne, c({
698
+ onClick: gt,
675
699
  icon: "calendar"
676
700
  }, e.$preset.calendar.inputicon), null, 16)
677
- ], 16, Zt)
701
+ ], 16, qt)
678
702
  ]),
679
703
  _: 1
680
704
  }, 8, ["disabled", "invalid"])
681
705
  ]),
682
- S(j(Pt), {
706
+ S(q(Zt), {
683
707
  ref_key: "overlayPanel",
684
- ref: le,
708
+ ref: oe,
685
709
  pt: {
686
710
  root: {
687
711
  class: [e.$preset.overlaypanel.root.class, "!mt-0", l.overlayClass]
688
712
  }
689
713
  },
690
- onHide: mt
714
+ onHide: yt
691
715
  }, {
692
- default: Me(() => [
693
- f("div", u(e.$preset.calendar.panel({ props: l }), { "data-wv-section": "panel" }), [
694
- f("div", u(e.$preset.calendar.container, { "data-wv-section": "container" }), [
695
- f("div", u(e.$preset.calendar.header({ props: l, state: { currentView: p.value } }), { "data-wv-section": "navigation" }), [
696
- S(ce, {
697
- onClick: nt,
716
+ default: $e(() => [
717
+ g("div", c(e.$preset.calendar.panel({ props: l }), { "data-wv-section": "panel" }), [
718
+ g("div", c(e.$preset.calendar.container, { "data-wv-section": "container" }), [
719
+ g("div", c(e.$preset.calendar.header({ props: l, state: { currentView: p.value } }), { "data-wv-section": "navigation" }), [
720
+ S(pe, {
721
+ onClick: ut,
698
722
  class: "rotate-180 !p-1",
699
723
  "data-wv-section": "prevbutton",
700
724
  icon: "arrow-right",
@@ -702,17 +726,17 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
702
726
  severity: "secondary",
703
727
  text: ""
704
728
  }),
705
- f("div", Kt, [
706
- p.value == "date" ? (v(), h("button", u({ key: 0 }, e.$preset.calendar.monthTitle, {
729
+ g("div", Qt, [
730
+ p.value == "date" ? (v(), h("button", c({ key: 0 }, e.$preset.calendar.monthTitle, {
707
731
  onClick: t[0] || (t[0] = (a) => p.value = "month")
708
- }), C(e.$wangsvue.config.locale.global.monthNamesShort[y.value]), 17)) : $("", !0),
709
- p.value != "year" ? (v(), h("button", u({ key: 1 }, e.$preset.calendar.yearTitle({ props: l }), {
732
+ }), P(e.$wangsvue.config.locale.global.monthNamesShort[D.value]), 17)) : C("", !0),
733
+ p.value != "year" ? (v(), h("button", c({ key: 1 }, e.$preset.calendar.yearTitle({ props: l }), {
710
734
  onClick: t[1] || (t[1] = (a) => p.value = "year")
711
- }), C(d.value), 17)) : $("", !0),
712
- p.value == "year" ? (v(), h("span", zt, C(re.value[0].value) + " - " + C(re.value[re.value.length - 1].value), 1)) : $("", !0)
735
+ }), P(u.value), 17)) : C("", !0),
736
+ p.value == "year" ? (v(), h("span", Xt, P(ie.value[0].value) + " - " + P(ie.value[ie.value.length - 1].value), 1)) : C("", !0)
713
737
  ]),
714
- S(ce, {
715
- onClick: ot,
738
+ S(pe, {
739
+ onClick: dt,
716
740
  class: "!p-1",
717
741
  "data-wv-section": "nextbutton",
718
742
  icon: "arrow-right",
@@ -721,35 +745,35 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
721
745
  text: ""
722
746
  })
723
747
  ], 16),
724
- p.value === "date" ? (v(), h("div", Wt, [
725
- f("div", Lt, [
726
- f("div", Rt, [
727
- (v(!0), h(te, null, de(e.$wangsvue.config.locale.global.dayNamesShort, (a) => (v(), h("span", {
748
+ p.value === "date" ? (v(), h("div", _t, [
749
+ g("div", ea, [
750
+ g("div", ta, [
751
+ (v(!0), h(le, null, fe(e.$wangsvue.config.locale.global.dayNamesShort, (a) => (v(), h("span", {
728
752
  key: a,
729
753
  abbr: "day",
730
754
  class: "text-center",
731
755
  "data-wv-section": "weekday"
732
- }, C(a), 1))), 128))
756
+ }, P(a), 1))), 128))
733
757
  ])
734
758
  ]),
735
- f("div", jt, [
736
- (v(!0), h(te, null, de(oe.value, (a, n) => (v(), h("span", {
759
+ g("div", aa, [
760
+ (v(!0), h(le, null, fe(se.value, (a, n) => (v(), h("span", {
737
761
  key: n,
738
762
  "aria-label": a.day.toString(),
739
763
  "data-wv-other-month": a.otherMonth,
740
764
  "data-wv-today": a.today,
741
765
  "data-wv-section": "day"
742
766
  }, [
743
- $e.value && !a.otherMonth ? (v(), ke(j(Nt), {
767
+ Ye.value && !a.otherMonth ? (v(), ae(q(Et), {
744
768
  key: 0,
745
769
  class: "!w-8 !h-8",
746
770
  shape: "circle"
747
- })) : $e.value ? $("", !0) : (v(), h("span", u(
771
+ })) : Ye.value ? C("", !0) : (v(), h("span", c(
748
772
  {
749
773
  key: 1,
750
774
  "aria-disabled": !a.selectable,
751
775
  "data-p-disabled": a.otherMonth || !a.selectable,
752
- onClick: (o) => ge(o, a),
776
+ onClick: (o) => be(o, a),
753
777
  ref_for: !0
754
778
  },
755
779
  e.$preset.calendar.daylabel({
@@ -758,8 +782,8 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
758
782
  today: a.today,
759
783
  otherMonth: a.otherMonth,
760
784
  selected: X(a),
761
- firstSelected: st(a),
762
- lastSelected: it(a),
785
+ firstSelected: vt(a),
786
+ lastSelected: mt(a),
763
787
  disabled: !a.selectable
764
788
  }
765
789
  }),
@@ -769,18 +793,18 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
769
793
  tabindex: "0"
770
794
  }
771
795
  ), [
772
- a.otherMonth ? $("", !0) : (v(), h(te, { key: 0 }, [
773
- Bt(C(a.day), 1)
796
+ a.otherMonth ? C("", !0) : (v(), h(le, { key: 0 }, [
797
+ Ut(P(a.day), 1)
774
798
  ], 64))
775
- ], 16, Gt))
776
- ], 8, qt))), 128))
799
+ ], 16, na))
800
+ ], 8, la))), 128))
777
801
  ])
778
- ])) : $("", !0),
779
- p.value === "month" ? (v(), h("div", u({
802
+ ])) : C("", !0),
803
+ p.value === "month" ? (v(), h("div", c({
780
804
  key: 1,
781
805
  "data-wv-section": "monthpicker"
782
806
  }, e.$preset.calendar.monthpicker), [
783
- (v(!0), h(te, null, de(Ge.value, (a, n) => (v(), h("span", u(
807
+ (v(!0), h(le, null, fe(tt.value, (a, n) => (v(), h("span", c(
784
808
  {
785
809
  key: a.value,
786
810
  ref_for: !0
@@ -789,19 +813,19 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
789
813
  context: {
790
814
  month: a,
791
815
  monthIndex: n,
792
- selected: Ye(n),
816
+ selected: Ae(n),
793
817
  disabled: !a.selectable
794
818
  }
795
819
  }),
796
820
  {
797
821
  "data-p-disabled": !a.selectable,
798
- "data-p-highlight": Ye(n),
799
- onClick: (o) => dt(o, a)
822
+ "data-p-highlight": Ae(n),
823
+ onClick: (o) => pt(o, a)
800
824
  }
801
- ), C(e.$wangsvue.config.locale.global.monthNamesShort[a.value]), 17, Qt))), 128))
802
- ], 16)) : $("", !0),
803
- p.value === "year" ? (v(), h("div", It(u({ key: 2 }, e.$preset.calendar.yearpicker)), [
804
- (v(!0), h(te, null, de(re.value, (a) => (v(), h("span", u(
825
+ ), P(e.$wangsvue.config.locale.global.monthNamesShort[a.value]), 17, oa))), 128))
826
+ ], 16)) : C("", !0),
827
+ p.value === "year" ? (v(), h("div", Ot(c({ key: 2 }, e.$preset.calendar.yearpicker)), [
828
+ (v(!0), h(le, null, fe(ie.value, (a) => (v(), h("span", c(
805
829
  {
806
830
  key: a.value,
807
831
  ref_for: !0
@@ -809,177 +833,194 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
809
833
  e.$preset.calendar.year({
810
834
  context: {
811
835
  year: a,
812
- selected: Be(a.value),
836
+ selected: Pe(a.value),
813
837
  disabled: !a.selectable
814
838
  }
815
839
  }),
816
840
  {
817
841
  "data-p-disabled": !a.selectable,
818
- "data-p-highlight": Be(a.value),
819
- onClick: (n) => ct(n, a)
842
+ "data-p-highlight": Pe(a.value),
843
+ onClick: (n) => ht(n, a)
820
844
  }
821
- ), C(a.value), 17, Xt))), 128))
822
- ], 16)) : $("", !0)
845
+ ), P(a.value), 17, ra))), 128))
846
+ ], 16)) : C("", !0)
823
847
  ], 16),
824
- e.showTime && p.value === "date" ? (v(), h("div", u({ key: 0 }, e.$preset.calendar.timepicker, { "data-wv-section": "timepicker" }), [
825
- f("div", u(e.$preset.calendar.hourpicker, { "data-wv-section": "hourpicker" }), [
826
- f("button", u({
848
+ e.showTime && p.value === "date" ? (v(), h("div", c({ key: 0 }, e.$preset.calendar.timepicker, { "data-wv-section": "timepicker" }), [
849
+ g("div", c(e.$preset.calendar.hourpicker, { "data-wv-section": "hourpicker" }), [
850
+ g("button", c({
827
851
  "aria-label": e.$wangsvue.config.locale.global.nextHour,
828
- disabled: G.value,
852
+ disabled: K.value,
829
853
  onKeydown: [
830
- ie,
831
- t[2] || (t[2] = b((a) => M(a, 0, 1), ["enter"])),
832
- t[3] || (t[3] = b((a) => M(a, 0, 1), ["space"]))
854
+ de,
855
+ t[2] || (t[2] = b((a) => k(a, 0, 1), ["enter"])),
856
+ t[3] || (t[3] = b((a) => k(a, 0, 1), ["space"]))
833
857
  ],
834
858
  onKeyup: [
835
859
  t[4] || (t[4] = b((a) => T(a), ["enter"])),
836
860
  t[5] || (t[5] = b((a) => T(a), ["space"]))
837
861
  ],
838
- onMousedown: t[6] || (t[6] = (a) => M(a, 0, 1)),
839
- onMouseleave: t[7] || (t[7] = (a) => se()),
862
+ onMousedown: t[6] || (t[6] = (a) => k(a, 0, 1)),
863
+ onMouseleave: t[7] || (t[7] = (a) => ue()),
840
864
  onMouseup: t[8] || (t[8] = (a) => T(a))
841
865
  }, e.$preset.calendar.incrementbutton, {
842
866
  "data-wv-group-section": "hourpicker",
843
867
  "data-wv-section": "incrementbutton",
844
868
  type: "button"
845
869
  }), [
846
- R(e.$slots, "incrementicon", {}, () => [
847
- S(ae, u({
870
+ j(e.$slots, "incrementicon", {}, () => [
871
+ S(ne, c({
848
872
  "data-wv-group-section": "hourpicker",
849
873
  "data-wv-section": "incrementicon",
850
874
  icon: "arrow-up-s"
851
875
  }, e.$preset.calendar.incrementicon), null, 16)
852
876
  ])
853
- ], 16, _t),
854
- f("span", u(e.$preset.calendar.timepickerlabel, {
855
- "data-wv-group-section": "hourpicker",
856
- "data-wv-section": "timepickerlabel"
857
- }), C(Re.value), 17),
858
- f("button", u({
877
+ ], 16, sa),
878
+ (v(), ae(Le, {
879
+ key: Fe.value,
880
+ "allowed-characters": /^\d+$/,
881
+ disabled: K.value,
882
+ "max-length": 2,
883
+ "model-value": Xe.value.toString(),
884
+ "onUpdate:modelValue": Bt,
885
+ class: "!w-[39px]",
886
+ placeholder: "",
887
+ "prevent-input-on-max-length": ""
888
+ }, null, 8, ["disabled", "model-value"])),
889
+ g("button", c({
859
890
  "aria-label": e.$wangsvue.config.locale.global.prevHour,
860
- disabled: G.value,
891
+ disabled: K.value,
861
892
  onKeydown: [
862
- ie,
863
- t[9] || (t[9] = b((a) => M(a, 0, -1), ["enter"])),
864
- t[10] || (t[10] = b((a) => M(a, 0, -1), ["space"]))
893
+ de,
894
+ t[9] || (t[9] = b((a) => k(a, 0, -1), ["enter"])),
895
+ t[10] || (t[10] = b((a) => k(a, 0, -1), ["space"]))
865
896
  ],
866
897
  onKeyup: [
867
898
  t[11] || (t[11] = b((a) => T(a), ["enter"])),
868
899
  t[12] || (t[12] = b((a) => T(a), ["space"]))
869
900
  ],
870
- onMousedown: t[13] || (t[13] = (a) => M(a, 0, -1)),
871
- onMouseleave: t[14] || (t[14] = (a) => se()),
901
+ onMousedown: t[13] || (t[13] = (a) => k(a, 0, -1)),
902
+ onMouseleave: t[14] || (t[14] = (a) => ue()),
872
903
  onMouseup: t[15] || (t[15] = (a) => T(a))
873
904
  }, e.$preset.calendar.decrementbutton, {
874
905
  "data-wv-group-section": "hourpicker",
875
906
  "data-wv-section": "decrementbutton",
876
907
  type: "button"
877
908
  }), [
878
- R(e.$slots, "decrementicon", {}, () => [
879
- S(ae, u({
909
+ j(e.$slots, "decrementicon", {}, () => [
910
+ S(ne, c({
880
911
  "data-wv-group-section": "hourpicker",
881
912
  "data-wv-section": "decrementicon",
882
913
  icon: "arrow-down"
883
914
  }, e.$preset.calendar.decrementicon), null, 16)
884
915
  ])
885
- ], 16, ea)
916
+ ], 16, ia)
886
917
  ], 16),
887
- f("div", u(e.$preset.calendar.separatorcontainer, { "data-wv-section": "separatorcontainer" }), [
888
- f("span", u(e.$preset.calendar.separator, { "data-wv-section": "separator" }), C(e.timeSeparator), 17)
918
+ g("div", c(e.$preset.calendar.separatorcontainer, { "data-wv-section": "separatorcontainer" }), [
919
+ g("span", c(e.$preset.calendar.separator, { "data-wv-section": "separator" }), P(e.timeSeparator), 17)
889
920
  ], 16),
890
- f("div", u(e.$preset.calendar.minutepicker, { "data-wv-section": "minutepicker" }), [
891
- f("button", u({
921
+ g("div", c(e.$preset.calendar.minutepicker, { "data-wv-section": "minutepicker" }), [
922
+ g("button", c({
892
923
  "aria-label": e.$wangsvue.config.locale.global.nextMinute,
893
- disabled: e.disabled || G.value,
924
+ disabled: e.disabled || K.value,
894
925
  onKeydown: [
895
- ie,
896
- t[16] || (t[16] = b((a) => M(a, 1, 1), ["enter"])),
897
- t[17] || (t[17] = b((a) => M(a, 1, 1), ["space"]))
926
+ de,
927
+ t[16] || (t[16] = b((a) => k(a, 1, 1), ["enter"])),
928
+ t[17] || (t[17] = b((a) => k(a, 1, 1), ["space"]))
898
929
  ],
899
930
  onKeyup: [
900
931
  t[18] || (t[18] = b((a) => T(a), ["enter"])),
901
932
  t[19] || (t[19] = b((a) => T(a), ["space"]))
902
933
  ],
903
- onMousedown: t[20] || (t[20] = (a) => M(a, 1, 1)),
904
- onMouseleave: t[21] || (t[21] = (a) => se()),
934
+ onMousedown: t[20] || (t[20] = (a) => k(a, 1, 1)),
935
+ onMouseleave: t[21] || (t[21] = (a) => ue()),
905
936
  onMouseup: t[22] || (t[22] = (a) => T(a))
906
937
  }, e.$preset.calendar.incrementbutton, {
907
938
  "data-wv-group-section": "minutepicker",
908
939
  "data-wv-section": "incrementbutton",
909
940
  type: "button"
910
941
  }), [
911
- R(e.$slots, "incrementicon", {}, () => [
912
- S(ae, u({
942
+ j(e.$slots, "incrementicon", {}, () => [
943
+ S(ne, c({
913
944
  "data-wv-group-section": "minutepicker",
914
945
  "data-wv-section": "incrementicon",
915
946
  icon: "arrow-up-s"
916
947
  }, e.$preset.calendar.incrementicon), null, 16)
917
948
  ])
918
- ], 16, ta),
919
- f("span", u(e.$preset.calendar.timepickerlabel, { "data-wv-section": "timepickerlabel" }), C(je.value), 17),
920
- f("button", u({
949
+ ], 16, ua),
950
+ (v(), ae(Le, {
951
+ key: Ie.value,
952
+ "allowed-characters": /^\d+$/,
953
+ disabled: K.value,
954
+ "max-length": 2,
955
+ "model-value": _e.value.toString(),
956
+ "onUpdate:modelValue": xt,
957
+ class: "!w-[39px]",
958
+ placeholder: "",
959
+ "prevent-input-on-max-length": ""
960
+ }, null, 8, ["disabled", "model-value"])),
961
+ g("button", c({
921
962
  "aria-label": e.$wangsvue.config.locale.global.prevMinute,
922
- disabled: e.disabled || G.value,
963
+ disabled: e.disabled || K.value,
923
964
  onKeydown: [
924
- ie,
925
- t[23] || (t[23] = b((a) => M(a, 1, -1), ["enter"])),
926
- t[24] || (t[24] = b((a) => M(a, 1, -1), ["space"]))
965
+ de,
966
+ t[23] || (t[23] = b((a) => k(a, 1, -1), ["enter"])),
967
+ t[24] || (t[24] = b((a) => k(a, 1, -1), ["space"]))
927
968
  ],
928
969
  onKeyup: [
929
970
  t[25] || (t[25] = b((a) => T(a), ["enter"])),
930
971
  t[26] || (t[26] = b((a) => T(a), ["space"]))
931
972
  ],
932
- onMousedown: t[27] || (t[27] = (a) => M(a, 1, -1)),
933
- onMouseleave: t[28] || (t[28] = (a) => se()),
973
+ onMousedown: t[27] || (t[27] = (a) => k(a, 1, -1)),
974
+ onMouseleave: t[28] || (t[28] = (a) => ue()),
934
975
  onMouseup: t[29] || (t[29] = (a) => T(a))
935
976
  }, e.$preset.calendar.decrementbutton, {
936
977
  "data-wv-group-section": "minutepicker",
937
978
  "data-wv-section": "decrementbutton",
938
979
  type: "button"
939
980
  }), [
940
- R(e.$slots, "decrementicon", {}, () => [
941
- S(ae, u({
981
+ j(e.$slots, "decrementicon", {}, () => [
982
+ S(ne, c({
942
983
  "data-wv-group-section": "minutepicker",
943
984
  "data-wv-section": "decrementicon",
944
985
  icon: "arrow-down"
945
986
  }, e.$preset.calendar.decrementicon), null, 16)
946
987
  ])
947
- ], 16, aa)
988
+ ], 16, da)
948
989
  ], 16),
949
- e.hourFormat === "12" ? (v(), ke(j(xt), {
990
+ e.hourFormat === "12" ? (v(), ae(q(zt), {
950
991
  key: 0,
951
- disabled: G.value,
992
+ disabled: K.value,
952
993
  "model-value": w.value,
953
994
  options: [
954
995
  { label: "AM", value: !1 },
955
996
  { label: "PM", value: !0 }
956
997
  ],
957
- "onUpdate:modelValue": wt,
998
+ "onUpdate:modelValue": St,
958
999
  "option-label": "label",
959
1000
  "option-value": "value"
960
- }, null, 8, ["disabled", "model-value"])) : $("", !0)
961
- ], 16)) : $("", !0),
962
- R(e.$slots, "addon-overlay"),
963
- e.showButtons || e.showTime ? Yt((v(), h("div", la, [
964
- S(ce, {
965
- label: j(F).locale.cancelFooterButtonLabel,
966
- onClick: Oe,
1001
+ }, null, 8, ["disabled", "model-value"])) : C("", !0)
1002
+ ], 16)) : C("", !0),
1003
+ j(e.$slots, "addon-overlay"),
1004
+ e.showButtons || e.showTime ? Nt((v(), h("div", ca, [
1005
+ S(pe, {
1006
+ label: q(F).locale.cancelFooterButtonLabel,
1007
+ onClick: Ze,
967
1008
  severity: "secondary",
968
1009
  text: ""
969
1010
  }, null, 8, ["label"]),
970
- S(ce, {
1011
+ S(pe, {
971
1012
  disabled: !r.value,
972
- label: j(F).locale.applyFooterButtonLabel,
973
- onClick: Dt
1013
+ label: q(F).locale.applyFooterButtonLabel,
1014
+ onClick: Tt
974
1015
  }, null, 8, ["disabled", "label"])
975
1016
  ], 512)), [
976
- [Ht, p.value === "date"]
977
- ]) : $("", !0)
1017
+ [Jt, p.value === "date"]
1018
+ ]) : C("", !0)
978
1019
  ], 16)
979
1020
  ]),
980
1021
  _: 3
981
1022
  }, 8, ["pt"]),
982
- S(Ut, {
1023
+ S(Rt, {
983
1024
  message: e.$attrs["error-message"]
984
1025
  }, null, 8, ["message"])
985
1026
  ]),
@@ -988,5 +1029,5 @@ const Zt = ["id"], Et = ["id", "aria-invalid", "disabled", "placeholder", "value
988
1029
  }
989
1030
  });
990
1031
  export {
991
- ha as _
1032
+ $a as _
992
1033
  };