@quidgest/ui 0.17.1 → 0.17.2

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,23 +1,23 @@
1
- import { defineComponent as Yn, mergeModels as Pn, useModel as An, computed as s, ref as R, useTemplateRef as ie, watch as se, onBeforeUnmount as Ln, createElementBlock as H, openBlock as f, Fragment as Y, createVNode as i, createBlock as U, createCommentVNode as M, unref as o, normalizeClass as kt, createSlots as On, withCtx as b, mergeProps as te, renderSlot as Bn, createElementVNode as k, normalizeProps as W, guardReactiveProps as j, renderList as ge, toDisplayString as ze, nextTick as F } from "vue";
2
- import { WEEKDAY_NAMES as Ue, MONTH_NAMES as We, DEFAULT_TEXTS as Kn, DEFAULT_ICONS as $n } from "./constants.js";
1
+ import { defineComponent as Gn, mergeModels as Xn, useModel as Zn, computed as s, ref as C, useTemplateRef as ce, watch as fe, onBeforeUnmount as Jn, createElementBlock as S, openBlock as m, Fragment as Y, createVNode as i, createBlock as W, createCommentVNode as x, unref as o, mergeProps as Q, createSlots as ea, withCtx as b, renderSlot as ta, createElementVNode as k, normalizeProps as G, guardReactiveProps as X, renderList as _e, toDisplayString as Xe, normalizeClass as na, nextTick as q } from "vue";
2
+ import { WEEKDAY_NAMES as Ze, MONTH_NAMES as Je, DEFAULT_TEXTS as aa, DEFAULT_ICONS as ra } from "./constants.js";
3
3
  import { QButton as p } from "../QButton/index.js";
4
- import { QIcon as w } from "../QIcon/index.js";
5
- import { QOverlay as zn } from "../QOverlay/index.js";
6
- import { QSwitch as Un } from "../QSwitch/index.js";
7
- import { QTextField as Te } from "../QTextField/index.js";
8
- import { useInputMask as Wn, applyMask as xe, clampNumericSegments as _t, resolveCursorPosition as jn } from "../../composables/useInputMask/index.js";
9
- import { formatUsesTime as Qn, formatUsesSeconds as Gn, uses12HourFormat as Xn, isTimeOnlyFormat as Zn, parseDate as O, formatDate as Q, getFirstDayOfMonth as Jn, getDaysInMonth as Dt, isBetween as ea, isSameDay as He, convertDatePatternToMask as ta, padNumber as je, parseDateWithCompletion as Qe, inputIncludesTimePortion as Mt } from "../../utils/date.js";
10
- const na = {
4
+ import { QIcon as I } from "../QIcon/index.js";
5
+ import { QOverlay as la } from "../QOverlay/index.js";
6
+ import { QSwitch as ua } from "../QSwitch/index.js";
7
+ import { QTextField as Fe } from "../QTextField/index.js";
8
+ import { useInputMask as oa, applyMask as Re, clampNumericSegments as St, resolveCursorPosition as ia } from "../../composables/useInputMask/index.js";
9
+ import { formatUsesTime as sa, formatUsesSeconds as ca, uses12HourFormat as fa, isTimeOnlyFormat as da, formatDate as V, getFirstDayOfMonth as va, getDaysInMonth as Ct, isBetween as ma, isSameDay as Ne, convertDatePatternToMask as pa, parseDate as de, parseIsoDate as et, padNumber as tt, parseDateWithCompletion as nt, inputIncludesTimePortion as qt } from "../../utils/date.js";
10
+ const ga = {
11
11
  key: 0,
12
12
  ref: "calendar",
13
13
  class: "q-date-time-picker__calendar"
14
- }, aa = { class: "q-date-time-picker__header" }, la = { class: "q-date-time-picker__weekdays" }, ra = { class: "q-date-time-picker__time" }, ua = {
14
+ }, ya = { class: "q-date-time-picker__header" }, ha = { class: "q-date-time-picker__weekdays" }, ba = { class: "q-date-time-picker__time" }, ka = {
15
15
  key: 0,
16
16
  class: "q-date-time-picker__time-period"
17
- }, oa = { class: "q-date-time-picker__time-inputs" }, ia = { class: "q-date-time-picker__time-input-group" }, sa = { class: "q-date-time-picker__time-input-group" }, ca = { class: "q-date-time-picker__time-input-group" }, da = { class: "q-date-time-picker__month-grid" }, fa = { class: "q-date-time-picker__year" }, va = { class: "q-date-time-picker__year-change" }, ma = { class: "q-date-time-picker__year-interval" }, pa = { class: "q-date-time-picker__year-grid" }, ga = { class: "q-date-time-picker__bottom-bar" }, G = 1001, X = 9999, ce = 26, wt = 'a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]', xa = /* @__PURE__ */ Yn({
17
+ }, _a = { class: "q-date-time-picker__time-inputs" }, Da = { class: "q-date-time-picker__time-input-group" }, wa = { class: "q-date-time-picker__time-input-group" }, Ma = { class: "q-date-time-picker__time-input-group" }, Ta = { class: "q-date-time-picker__month-grid" }, xa = { class: "q-date-time-picker__year" }, Ia = { class: "q-date-time-picker__year-change" }, Ha = { class: "q-date-time-picker__year-interval" }, Sa = { class: "q-date-time-picker__year-grid" }, Ca = { class: "q-date-time-picker__bottom-bar" }, Z = 1001, J = 9999, ve = 26, Ft = 'a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]', La = /* @__PURE__ */ Gn({
18
18
  inheritAttrs: !1,
19
19
  __name: "QDateTimePicker",
20
- props: /* @__PURE__ */ Pn({
20
+ props: /* @__PURE__ */ Xn({
21
21
  id: {},
22
22
  class: {},
23
23
  label: {},
@@ -33,40 +33,36 @@ const na = {
33
33
  clearable: { type: Boolean },
34
34
  format: { default: "dd/MM/yyyy HH:mm" },
35
35
  range: { type: Boolean },
36
- icons: { default: () => $n },
37
- texts: { default: () => Kn }
36
+ icons: { default: () => ra },
37
+ texts: { default: () => aa }
38
38
  }, {
39
39
  modelValue: {},
40
40
  modelModifiers: {}
41
41
  }),
42
42
  emits: ["update:modelValue"],
43
- setup(Ge) {
44
- const l = Ge, Xe = An(Ge, "modelValue"), v = s({
45
- get: () => Xe.value,
46
- set: (e) => Xe.value = e || void 0
47
- }), Tt = s(
48
- () => l.readonly || l.disabled ? void 0 : l.placeholder
49
- ), ne = s(() => Qn(l.format)), ye = s(() => Gn(l.format)), Z = s(() => Xn(l.format)), J = s(() => Zn(l.format)), xt = s(
50
- () => g.value === (/* @__PURE__ */ new Date()).getMonth() && h.value === (/* @__PURE__ */ new Date()).getFullYear()
51
- ), T = R(!1), Se = R(!1), _ = R(""), S = R(null), P = R(!1);
52
- let de = 0;
53
- const D = R("date"), g = R((/* @__PURE__ */ new Date()).getMonth()), h = R((/* @__PURE__ */ new Date()).getFullYear()), ae = R((/* @__PURE__ */ new Date()).getFullYear());
54
- let le = null, B = !1, fe = !1, Ce = !1;
55
- function Ze() {
43
+ setup(at) {
44
+ const r = at, rt = Zn(at, "modelValue"), c = s({
45
+ get: () => rt.value,
46
+ set: (e) => rt.value = e || void 0
47
+ }), Rt = s(
48
+ () => r.readonly || r.disabled ? void 0 : r.placeholder
49
+ ), re = s(() => sa(r.format)), De = s(() => ca(r.format)), ee = s(() => fa(r.format)), E = s(() => da(r.format)), Nt = s(
50
+ () => y.value === (/* @__PURE__ */ new Date()).getMonth() && h.value === (/* @__PURE__ */ new Date()).getFullYear()
51
+ ), H = C(!1), Ve = C(!1), g = C(""), D = C(null), F = C(!1);
52
+ let me = 0;
53
+ const w = C("date"), y = C((/* @__PURE__ */ new Date()).getMonth()), h = C((/* @__PURE__ */ new Date()).getFullYear()), le = C((/* @__PURE__ */ new Date()).getFullYear());
54
+ let ue = null, A = !1, pe = !1, te = !1, oe = null;
55
+ function lt() {
56
56
  queueMicrotask(() => {
57
57
  requestAnimationFrame(() => {
58
- var a, n;
59
- const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
60
- if (e && (t === e || t instanceof Node && ((n = E.value) != null && n.contains(t)))) {
61
- B = !0;
62
- return;
63
- }
64
- B = !1;
58
+ var a;
59
+ const e = ae(), t = document.activeElement;
60
+ e && (t === e || t instanceof Node && ((a = R.value) != null && a.contains(t))) && (A = !0);
65
61
  });
66
62
  });
67
63
  }
68
- const C = ie("field"), E = ie("menu"), Ie = ie("calendar"), Ht = ie("monthHeader"), St = ie("yearHeader"), Ct = ie("toggleTime"), Re = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
69
- function Ee(e) {
64
+ const L = ce("field"), R = ce("menu"), Ee = ce("calendar"), Vt = ce("monthHeader"), Et = ce("yearHeader"), Pt = ce("toggleTime"), Pe = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Map();
65
+ function we(e) {
70
66
  if (!e) return null;
71
67
  if (e instanceof HTMLElement) return e;
72
68
  if (typeof e == "object" && "$el" in e) {
@@ -75,739 +71,826 @@ const na = {
75
71
  }
76
72
  return null;
77
73
  }
78
- function It(e, t) {
79
- const a = Ee(e);
80
- a ? Re.set(t, a) : Re.delete(t);
74
+ function Yt(e, t) {
75
+ const a = we(e);
76
+ a ? Pe.set(t, a) : Pe.delete(t);
81
77
  }
82
- function Rt(e, t) {
83
- const a = Ee(e);
84
- a ? qe.set(t, a) : qe.delete(t);
78
+ function At(e, t) {
79
+ const a = we(e);
80
+ a ? Ye.set(t, a) : Ye.delete(t);
85
81
  }
86
- function qt(e) {
82
+ function Lt(e) {
87
83
  var t;
88
- (t = Ee(e)) == null || t.focus();
84
+ (t = we(e)) == null || t.focus();
89
85
  }
90
- const q = s(() => ({
86
+ const O = s(() => ({
91
87
  getMonthIndex: (e, t) => {
92
88
  const a = e.toLowerCase();
93
- return We.findIndex((n) => {
94
- const r = l.texts[n] ?? n;
95
- return (t ? r.substring(0, 3) : r).toLowerCase() === a;
89
+ return Je.findIndex((n) => {
90
+ const l = r.texts[n] ?? n;
91
+ return (t ? l.substring(0, 3) : l).toLowerCase() === a;
96
92
  });
97
93
  },
98
94
  getWeekdayIndex: (e, t) => {
99
95
  const a = e.toLowerCase();
100
96
  for (let n = 0; n < 7; n++) {
101
- const r = (n + 6) % 7, u = Ue[r], c = l.texts[u] ?? u;
102
- if ((t ? c.substring(0, 3) : c).toLowerCase() === a) return n;
97
+ const l = (n + 6) % 7, u = Ze[l], f = r.texts[u] ?? u;
98
+ if ((t ? f.substring(0, 3) : f).toLowerCase() === a) return n;
103
99
  }
104
100
  return null;
105
101
  }
106
- })), x = s(() => {
107
- const e = v.value;
108
- return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? O(e, l.format, q.value) : null : null;
109
- }), Fe = s(() => {
110
- const e = v.value;
102
+ })), M = s(() => {
103
+ const e = c.value;
104
+ return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? ne(e) : null : null;
105
+ }), Me = s(() => {
106
+ const e = c.value;
111
107
  return Array.isArray(e) && e.length > 1 ? e[1] : null;
112
- }), m = R(null), ee = R(null), N = R(null), A = R(!1), Et = s(() => !A.value || !m.value ? x.value : N.value && N.value < m.value ? N.value : m.value), Ft = s(() => {
113
- if (!l.range) return x.value;
114
- if (!A.value || !m.value)
115
- return Fe.value;
116
- const e = N.value ?? ee.value;
117
- return e ? e < m.value ? m.value : e : null;
118
- }), K = s(() => ({
108
+ }), v = C(null), ie = C(null), B = C(null), $ = C(!1), Ot = s(() => !$.value || !v.value ? M.value : B.value && B.value < v.value ? B.value : v.value), Bt = s(() => {
109
+ if (!r.range) return M.value;
110
+ if (!$.value || !v.value)
111
+ return Me.value;
112
+ const e = B.value ?? ie.value;
113
+ return e ? e < v.value ? v.value : e : null;
114
+ }), N = s(() => ({
119
115
  getMonthName: (e, t) => {
120
- const a = be(e);
116
+ const a = xe(e);
121
117
  return t ? a.substring(0, 3) : a;
122
118
  },
123
119
  getWeekdayName: (e, t) => {
124
- const a = (e + 6) % 7, n = Ue[a], r = l.texts[n] ?? n;
125
- return t ? r.substring(0, 3) : r;
120
+ const a = (e + 6) % 7, n = Ze[a], l = r.texts[n] ?? n;
121
+ return t ? l.substring(0, 3) : l;
122
+ }
123
+ })), $t = s(() => {
124
+ const e = c.value;
125
+ if (!e) return "";
126
+ if (Array.isArray(e))
127
+ return e.map(
128
+ (t) => t instanceof Date ? V(t, r.format, N.value) : t
129
+ ).join(" - ");
130
+ if (e instanceof Date)
131
+ return V(e, r.format, N.value);
132
+ if (typeof e == "string") {
133
+ const t = ne(e);
134
+ return t ? V(t, r.format, N.value) : String(e);
126
135
  }
127
- })), Nt = s(() => {
128
- const e = v.value;
129
- return e ? Array.isArray(e) ? e.map(
130
- (t) => t instanceof Date ? Q(t, l.format, K.value) : t
131
- ).join(" - ") : e instanceof Date ? Q(e, l.format, K.value) : String(e) : "";
132
- }), Je = s(() => S.value ?? Nt.value);
133
- function he() {
134
- _.value = Je.value;
135
- }
136
- se(
137
- Je,
136
+ return String(e);
137
+ }), ut = s(() => D.value ?? $t.value);
138
+ function Te() {
139
+ g.value = ut.value;
140
+ }
141
+ fe(
142
+ ut,
138
143
  () => {
139
- Se.value || he();
144
+ Ve.value || Te();
140
145
  },
141
146
  { immediate: !0 }
142
147
  );
143
- const et = s(() => {
144
- const e = Jn(new Date(h.value, g.value, 1)), t = Dt(g.value, h.value), a = (e.getDay() + 6) % 7, n = [], r = g.value === 0 ? 11 : g.value - 1, u = g.value === 0 ? h.value - 1 : h.value, c = Dt(r, u);
148
+ const ot = s(() => {
149
+ const e = va(new Date(h.value, y.value, 1)), t = Ct(y.value, h.value), a = (e.getDay() + 6) % 7, n = [], l = y.value === 0 ? 11 : y.value - 1, u = y.value === 0 ? h.value - 1 : h.value, f = Ct(l, u);
145
150
  for (let d = a - 1; d >= 0; d--) {
146
- const I = new Date(u, r, c - d);
147
- Ne(n, I, !1);
151
+ const T = new Date(u, l, f - d);
152
+ Ae(n, T, !1);
148
153
  }
149
154
  for (let d = 1; d <= t; d++) {
150
- const I = new Date(h.value, g.value, d);
151
- Ne(n, I, !0);
155
+ const T = new Date(h.value, y.value, d);
156
+ Ae(n, T, !0);
152
157
  }
153
- const y = 7 - n.length % 7, L = y === 7 ? 0 : y;
154
- for (let d = 1; d <= L; d++) {
155
- const I = new Date(h.value, g.value + 1, d);
156
- Ne(n, I, !1);
158
+ const _ = 7 - n.length % 7, j = _ === 7 ? 0 : _;
159
+ for (let d = 1; d <= j; d++) {
160
+ const T = new Date(h.value, y.value + 1, d);
161
+ Ae(n, T, !1);
157
162
  }
158
163
  return n;
159
164
  });
160
- function Ne(e, t, a) {
161
- const n = Et.value, r = Ft.value, u = t.getFullYear(), c = u < G || u > X;
165
+ function Ae(e, t, a) {
166
+ const n = Ot.value, l = Bt.value, u = t.getFullYear(), f = u < Z || u > J;
162
167
  e.push({
163
168
  date: t,
164
169
  isCurrentMonth: a,
165
- isToday: He(t, /* @__PURE__ */ new Date()),
166
- isSelected: n ? He(t, n) : !1,
167
- isRangeStart: !!n && He(t, n),
168
- isRangeEnd: !!r && He(t, r),
169
- isInRange: n && r ? ea(t, n, r) : !1,
170
- isDisabled: c
170
+ isToday: Ne(t, /* @__PURE__ */ new Date()),
171
+ isSelected: n ? Ne(t, n) : !1,
172
+ isRangeStart: !!n && Ne(t, n),
173
+ isRangeEnd: !!l && Ne(t, l),
174
+ isInRange: n && l ? ma(t, n, l) : !1,
175
+ isDisabled: f
171
176
  });
172
177
  }
173
- const Vt = s(() => Ue.map((e) => {
178
+ const zt = s(() => Ze.map((e) => {
174
179
  var a;
175
180
  const t = e;
176
- return ((a = l.texts[t]) == null ? void 0 : a.substring(0, 2)) ?? e;
177
- })), Yt = s(
178
- () => Array.from({ length: 12 }, (e, t) => be(t, 3))
181
+ return ((a = r.texts[t]) == null ? void 0 : a.substring(0, 2)) ?? e;
182
+ })), Kt = s(
183
+ () => Array.from({ length: 12 }, (e, t) => xe(t, 3))
179
184
  );
180
- function be(e, t = 0) {
181
- const a = We[e], n = l.texts[a] ?? We[e];
185
+ function xe(e, t = 0) {
186
+ const a = Je[e], n = r.texts[a] ?? Je[e];
182
187
  return t <= 0 ? n : n.substring(0, t);
183
188
  }
184
- function tt(e) {
185
- const t = Math.floor(ce / 2);
186
- let a = e - t, n = a + ce;
187
- return a < G && (a = G, n = Math.min(a + ce, X)), n > X && (n = X, a = Math.max(G, n - ce)), { startYear: a, endYear: n };
189
+ function it(e) {
190
+ const t = Math.floor(ve / 2);
191
+ let a = e - t, n = a + ve;
192
+ return a < Z && (a = Z, n = Math.min(a + ve, J)), n > J && (n = J, a = Math.max(Z, n - ve)), { startYear: a, endYear: n };
188
193
  }
189
- function Pt(e) {
190
- const { startYear: t, endYear: a } = tt(e);
191
- return Array.from({ length: a - t + 1 }, (n, r) => t + r);
194
+ function Ut(e) {
195
+ const { startYear: t, endYear: a } = it(e);
196
+ return Array.from({ length: a - t + 1 }, (n, l) => t + l);
192
197
  }
193
- function At() {
194
- nt.value && (ae.value -= ce);
198
+ function jt() {
199
+ st.value && (le.value -= ve);
195
200
  }
196
- function Lt() {
197
- at.value && (ae.value += ce);
201
+ function Wt() {
202
+ ct.value && (le.value += ve);
198
203
  }
199
- const ke = s(() => tt(ae.value)), nt = s(
200
- () => ke.value.startYear > G
201
- ), at = s(() => ke.value.endYear < X), Ot = s(() => g.value === 0 ? h.value - 1 : h.value), Bt = s(() => g.value === 11 ? h.value + 1 : h.value), lt = s(() => Ot.value >= G), rt = s(() => Bt.value <= X), Kt = s(() => Pt(ae.value)), $t = s(() => J.value ? l.icons.clock : l.icons.calendar), ve = s(() => ta(l.format)), Ve = s(
202
- () => `${ve.value} - ${ve.value}`
204
+ const Ie = s(() => it(le.value)), st = s(
205
+ () => Ie.value.startYear > Z
206
+ ), ct = s(() => Ie.value.endYear < J), Qt = s(() => y.value === 0 ? h.value - 1 : h.value), Gt = s(() => y.value === 11 ? h.value + 1 : h.value), ft = s(() => Qt.value >= Z), dt = s(() => Gt.value <= J), Xt = s(() => Ut(le.value)), Zt = s(() => E.value ? r.icons.clock : r.icons.calendar), ge = s(() => pa(r.format)), Le = s(
207
+ () => `${ge.value} - ${ge.value}`
203
208
  );
204
- Wn(
209
+ oa(
205
210
  () => {
206
211
  var e;
207
- return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
212
+ return (e = L == null ? void 0 : L.value) == null ? void 0 : e.inputRef;
208
213
  },
209
- () => l.range ? Ve.value : ve.value
210
- ), se(
214
+ () => r.range ? Le.value : ge.value
215
+ ), fe(
211
216
  () => {
212
217
  var e;
213
- return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
218
+ return (e = L == null ? void 0 : L.value) == null ? void 0 : e.inputRef;
214
219
  },
215
220
  (e, t, a) => {
216
- const n = oe(e);
217
- n && (n.addEventListener("click", gt), n.addEventListener("paste", mt, !0), a(() => {
218
- n.removeEventListener("click", gt), n.removeEventListener("paste", mt, !0);
221
+ const n = Tt(e);
222
+ oe = n, n && (n.addEventListener("click", wt), n.addEventListener("paste", _t, !0), a(() => {
223
+ oe = null, n.removeEventListener("click", wt), n.removeEventListener("paste", _t, !0);
219
224
  }));
220
225
  },
221
226
  { flush: "post" }
222
- ), se(v, () => {
223
- S.value = null, he();
227
+ ), fe(c, () => {
228
+ D.value = null, Te();
224
229
  });
225
- function zt(e) {
230
+ function Jt(e) {
226
231
  return e === void 0 ? !1 : typeof e == "string" ? e.trim().length > 0 : e instanceof Date ? !0 : Array.isArray(e) ? e.length > 0 : !1;
227
232
  }
228
- const Ye = s(
229
- () => l.clearable && !l.readonly && !l.disabled && zt(v.value)
233
+ const Oe = s(
234
+ () => r.clearable && !r.readonly && !r.disabled && Jt(c.value)
230
235
  );
231
- function Ut() {
232
- Ye.value && (m.value = null, ee.value = null, N.value = null, A.value = !1, v.value = void 0, _.value = "", we());
236
+ function en() {
237
+ Oe.value && ($e(), c.value = void 0, g.value = "", We());
233
238
  }
234
- function Pe(e) {
235
- !l.range || !A.value || !m.value || e.getFullYear() < G || e.getFullYear() > X || (N.value = new Date(e));
239
+ function Be(e) {
240
+ !r.range || !$.value || !v.value || e.getFullYear() < Z || e.getFullYear() > J || (B.value = new Date(e));
236
241
  }
237
- function ut() {
238
- N.value = null;
242
+ function vt() {
243
+ B.value = null;
239
244
  }
240
- function Wt(e) {
245
+ function tn(e) {
241
246
  const t = e.currentTarget, a = e.relatedTarget;
242
- !t || a && t.contains(a) || ut();
247
+ !t || a && t.contains(a) || vt();
243
248
  }
244
- function ot(e) {
245
- if (!l.range || !A.value || !m.value) return;
249
+ function mt(e) {
250
+ if (!r.range || !$.value || !v.value) return;
246
251
  const t = e.touches.item(0);
247
252
  if (!t) return;
248
253
  const a = document.elementFromPoint(t.clientX, t.clientY), n = a == null ? void 0 : a.closest("[data-day-index]");
249
254
  if (!n) return;
250
- const r = Number(n.dataset.dayIndex);
251
- if (Number.isNaN(r)) return;
252
- const u = et.value[r];
253
- u && Pe(u.date);
254
- }
255
- function jt(e) {
256
- if (!(l.readonly || l.disabled) && !(e.getFullYear() < G || e.getFullYear() > X))
257
- if (l.range)
258
- if (A.value) {
259
- const t = m.value ?? new Date(e), a = new Date(e), [n, r] = a < t ? [a, t] : [t, a];
260
- ne.value && r.setHours(23, 59, ye.value ? 59 : 0, 0), v.value = [n, r], m.value = null, ee.value = null, N.value = null, A.value = !1;
255
+ const l = Number(n.dataset.dayIndex);
256
+ if (Number.isNaN(l)) return;
257
+ const u = ot.value[l];
258
+ u && Be(u.date);
259
+ }
260
+ function nn(e) {
261
+ if (!(r.readonly || r.disabled) && !(e.getFullYear() < Z || e.getFullYear() > J))
262
+ if (r.range)
263
+ if ($.value) {
264
+ const t = v.value ?? new Date(e), a = new Date(e), [n, l] = a < t ? [a, t] : [t, a];
265
+ re.value && l.setHours(23, 59, De.value ? 59 : 0, 0), c.value = [n, l], v.value = null, ie.value = null, B.value = null, $.value = !1;
261
266
  } else {
262
267
  const t = new Date(e);
263
- ne.value && m.value && t.setHours(
264
- m.value.getHours(),
265
- m.value.getMinutes(),
266
- m.value.getSeconds(),
267
- m.value.getMilliseconds()
268
- ), m.value = t, ee.value = null, N.value = null, A.value = !0;
268
+ re.value && v.value && t.setHours(
269
+ v.value.getHours(),
270
+ v.value.getMinutes(),
271
+ v.value.getSeconds(),
272
+ v.value.getMilliseconds()
273
+ ), v.value = t, ie.value = null, B.value = null, $.value = !0;
269
274
  }
270
275
  else {
271
276
  const t = new Date(e);
272
- x.value && !hn(x.value) ? t.setHours(
273
- x.value.getHours(),
274
- x.value.getMinutes(),
275
- x.value.getSeconds()
276
- ) : ne.value && vt(t), v.value = t;
277
+ M.value && !Hn(M.value) ? t.setHours(
278
+ M.value.getHours(),
279
+ M.value.getMinutes(),
280
+ M.value.getSeconds()
281
+ ) : re.value && kt(t), c.value = t;
277
282
  }
278
283
  }
279
- function re(e, t) {
280
- h.value = e, t && Me("year");
284
+ function se(e, t) {
285
+ h.value = e, t && qe("year");
281
286
  }
282
- function $(e, t) {
283
- g.value = e, t && Me("month");
287
+ function z(e, t) {
288
+ y.value = e, t && qe("month");
284
289
  }
285
- function Qt() {
286
- lt.value && (g.value === 0 ? ($(11), re(h.value - 1)) : $(g.value - 1));
290
+ function an() {
291
+ ft.value && (y.value === 0 ? (z(11), se(h.value - 1)) : z(y.value - 1));
287
292
  }
288
- function Gt() {
289
- rt.value && (g.value === 11 ? ($(0), re(h.value + 1)) : $(g.value + 1));
293
+ function rn() {
294
+ dt.value && (y.value === 11 ? (z(0), se(h.value + 1)) : z(y.value + 1));
290
295
  }
291
- function Xt() {
292
- $((/* @__PURE__ */ new Date()).getMonth()), re((/* @__PURE__ */ new Date()).getFullYear()), De();
296
+ function ln() {
297
+ z((/* @__PURE__ */ new Date()).getMonth()), se((/* @__PURE__ */ new Date()).getFullYear()), Ce();
293
298
  }
294
- function Zt() {
295
- let e = x.value;
296
- const t = v.value;
297
- if (l.range && Array.isArray(t) && t.length > 0) {
299
+ function un() {
300
+ let e = M.value;
301
+ const t = c.value;
302
+ if (r.range && Array.isArray(t) && t.length > 0) {
298
303
  const a = t[0];
299
- a instanceof Date ? e = a : typeof a == "string" && (e = O(a, l.format, q.value));
304
+ a instanceof Date ? e = a : typeof a == "string" && (e = de(a, r.format, O.value));
300
305
  }
301
- e = e ?? /* @__PURE__ */ new Date(), $(e.getMonth()), re(e.getFullYear()), De();
306
+ e = e ?? /* @__PURE__ */ new Date(), z(e.getMonth()), se(e.getFullYear()), Ce();
302
307
  }
303
- function me(e) {
304
- return l.range ? e === 1 ? Fe.value ?? ee.value : x.value ?? m.value : x.value;
308
+ function ye(e) {
309
+ return r.range ? e === 1 ? Me.value ?? ie.value : M.value ?? v.value : M.value;
305
310
  }
306
- function Jt(e, t) {
307
- if (!l.range) {
308
- v.value = t;
311
+ function $e() {
312
+ v.value = null, ie.value = null, B.value = null, $.value = !1;
313
+ }
314
+ function on(e, t) {
315
+ return t < e ? [new Date(t), new Date(e)] : [new Date(e), new Date(t)];
316
+ }
317
+ function sn() {
318
+ if (!r.range || !E.value) return;
319
+ const e = c.value;
320
+ if (!Array.isArray(e) || e.length < 2) return;
321
+ const t = e[0], a = e[1];
322
+ !(t instanceof Date) || !(a instanceof Date) || a >= t || (c.value = on(t, a));
323
+ }
324
+ function cn(e, t) {
325
+ if (!r.range) {
326
+ c.value = t;
327
+ return;
328
+ }
329
+ if (E.value) {
330
+ e === 0 ? v.value = t : ie.value = t;
331
+ const l = e === 0 ? t : M.value ?? v.value, u = e === 1 ? t : Me.value;
332
+ if (!l || !u) return;
333
+ c.value = [new Date(l), new Date(u)], $e();
309
334
  return;
310
335
  }
311
- const a = x.value, n = Fe.value;
312
- if (!a || !n) {
313
- e === 1 ? ee.value = t : m.value = t;
336
+ if ($.value) {
337
+ e === 0 && (v.value = t);
314
338
  return;
315
339
  }
316
- v.value = e === 1 ? [a, t] : [t, n];
340
+ const a = M.value, n = Me.value;
341
+ !a || !n || (c.value = e === 1 ? [a, t] : [t, n]);
317
342
  }
318
- function V(e, t) {
319
- const a = me(e) ?? (() => {
320
- const r = /* @__PURE__ */ new Date();
321
- return r.setHours(0, 0, 0, 0), r;
343
+ function P(e, t) {
344
+ const a = ye(e) ?? (() => {
345
+ const l = /* @__PURE__ */ new Date();
346
+ return l.setHours(0, 0, 0, 0), l;
322
347
  })(), n = new Date(a);
323
- t(n), Jt(e, n);
348
+ t(n), cn(e, n);
324
349
  }
325
- function en(e) {
326
- const t = me(e);
327
- if (!t) return Z.value ? 12 : 0;
350
+ function fn(e) {
351
+ const t = ye(e);
352
+ if (!t) return ee.value ? 12 : 0;
328
353
  const a = t.getHours();
329
- return Z.value ? a % 12 || 12 : a;
354
+ return ee.value ? a % 12 || 12 : a;
330
355
  }
331
- function tn(e) {
356
+ function dn(e) {
332
357
  var t;
333
- return ((t = me(e)) == null ? void 0 : t.getMinutes()) ?? 0;
358
+ return ((t = ye(e)) == null ? void 0 : t.getMinutes()) ?? 0;
334
359
  }
335
- function nn(e) {
360
+ function vn(e) {
336
361
  var t;
337
- return ((t = me(e)) == null ? void 0 : t.getSeconds()) ?? 0;
362
+ return ((t = ye(e)) == null ? void 0 : t.getSeconds()) ?? 0;
338
363
  }
339
- function an(e) {
340
- const t = me(e);
364
+ function mn(e) {
365
+ const t = ye(e);
341
366
  return t ? t.getHours() >= 12 : !1;
342
367
  }
343
- function _e(e, t) {
368
+ function He(e, t) {
344
369
  return t ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e;
345
370
  }
346
- function ln(e) {
347
- V(e, (t) => {
348
- if (Z.value) {
349
- const a = t.getHours() % 12 || 12, n = a >= 12 ? 1 : a + 1, r = t.getHours() >= 12;
350
- t.setHours(_e(n, r));
371
+ function pn(e) {
372
+ P(e, (t) => {
373
+ if (ee.value) {
374
+ const a = t.getHours() % 12 || 12, n = a >= 12 ? 1 : a + 1, l = t.getHours() >= 12;
375
+ t.setHours(He(n, l));
351
376
  } else
352
377
  t.setHours(t.getHours() >= 23 ? 0 : t.getHours() + 1);
353
378
  });
354
379
  }
355
- function rn(e) {
356
- V(e, (t) => {
357
- if (Z.value) {
358
- const a = t.getHours() % 12 || 12, n = a <= 1 ? 12 : a - 1, r = t.getHours() >= 12;
359
- t.setHours(_e(n, r));
380
+ function gn(e) {
381
+ P(e, (t) => {
382
+ if (ee.value) {
383
+ const a = t.getHours() % 12 || 12, n = a <= 1 ? 12 : a - 1, l = t.getHours() >= 12;
384
+ t.setHours(He(n, l));
360
385
  } else
361
386
  t.setHours(t.getHours() <= 0 ? 23 : t.getHours() - 1);
362
387
  });
363
388
  }
364
- function un(e) {
365
- V(e, (t) => {
389
+ function yn(e) {
390
+ P(e, (t) => {
366
391
  t.setMinutes(t.getMinutes() >= 59 ? 0 : t.getMinutes() + 1);
367
392
  });
368
393
  }
369
- function on(e) {
370
- V(e, (t) => {
394
+ function hn(e) {
395
+ P(e, (t) => {
371
396
  t.setMinutes(t.getMinutes() <= 0 ? 59 : t.getMinutes() - 1);
372
397
  });
373
398
  }
374
- function sn(e) {
375
- V(e, (t) => {
399
+ function bn(e) {
400
+ P(e, (t) => {
376
401
  t.setSeconds(t.getSeconds() >= 59 ? 0 : t.getSeconds() + 1);
377
402
  });
378
403
  }
379
- function cn(e) {
380
- V(e, (t) => {
404
+ function kn(e) {
405
+ P(e, (t) => {
381
406
  t.setSeconds(t.getSeconds() <= 0 ? 59 : t.getSeconds() - 1);
382
407
  });
383
408
  }
384
- function Ae(e) {
409
+ function ze(e) {
385
410
  return (e ?? "").replace(/\D/g, "");
386
411
  }
387
- function dn(e) {
412
+ function _n(e) {
388
413
  return Math.min(23, Math.max(0, e));
389
414
  }
390
- function fn(e) {
415
+ function Dn(e) {
391
416
  return Math.min(12, Math.max(1, e));
392
417
  }
393
- function it(e) {
418
+ function pt(e) {
394
419
  return Math.min(59, Math.max(0, e));
395
420
  }
396
- function st(e, t) {
397
- const a = Ae(e).slice(0, 2);
421
+ function gt(e, t) {
422
+ const a = ze(e).slice(0, 2);
398
423
  if (a === "") return;
399
424
  const n = Number.parseInt(a, 10);
400
425
  if (Number.isNaN(n)) return;
401
- const r = Z.value ? fn(n) : dn(n);
402
- V(t, (u) => {
403
- Z.value ? u.setHours(_e(r, u.getHours() >= 12)) : u.setHours(r);
426
+ const l = ee.value ? Dn(n) : _n(n);
427
+ P(t, (u) => {
428
+ ee.value ? u.setHours(He(l, u.getHours() >= 12)) : u.setHours(l);
404
429
  });
405
430
  }
406
- function ct(e, t) {
407
- const a = Ae(e).slice(0, 2);
431
+ function yt(e, t) {
432
+ const a = ze(e).slice(0, 2);
408
433
  if (a === "") return;
409
434
  const n = Number.parseInt(a, 10);
410
435
  if (Number.isNaN(n)) return;
411
- const r = it(n);
412
- V(t, (u) => {
413
- u.setMinutes(r);
436
+ const l = pt(n);
437
+ P(t, (u) => {
438
+ u.setMinutes(l);
414
439
  });
415
440
  }
416
- function dt(e, t) {
417
- const a = Ae(e).slice(0, 2);
441
+ function ht(e, t) {
442
+ const a = ze(e).slice(0, 2);
418
443
  if (a === "") return;
419
444
  const n = Number.parseInt(a, 10);
420
445
  if (Number.isNaN(n)) return;
421
- const r = it(n);
422
- V(t, (u) => {
423
- u.setSeconds(r);
446
+ const l = pt(n);
447
+ P(t, (u) => {
448
+ u.setSeconds(l);
424
449
  });
425
450
  }
426
- async function Le(e, t, a) {
451
+ async function Ke(e, t, a) {
427
452
  if (e.ctrlKey || e.altKey || e.metaKey || !/^\d$/.test(e.key)) return;
428
453
  const n = e.target;
429
454
  if (!n) return;
430
- const r = n.selectionStart, u = n.selectionEnd;
431
- if (r === null || u === null || r !== u || n.maxLength <= 0 || n.value.length < n.maxLength || r >= n.value.length)
455
+ const l = n.selectionStart, u = n.selectionEnd;
456
+ if (l === null || u === null || l !== u || n.maxLength <= 0 || n.value.length < n.maxLength || l >= n.value.length)
432
457
  return;
433
458
  e.preventDefault();
434
- const c = `${n.value.slice(0, r)}${e.key}${n.value.slice(r + 1)}`;
435
- t === "hours" ? st(c, a) : t === "minutes" ? ct(c, a) : dt(c, a);
436
- const y = Math.min(r + 1, n.maxLength);
437
- await F(), n.setSelectionRange(y, y);
459
+ const f = `${n.value.slice(0, l)}${e.key}${n.value.slice(l + 1)}`;
460
+ t === "hours" ? gt(f, a) : t === "minutes" ? yt(f, a) : ht(f, a);
461
+ const _ = Math.min(l + 1, n.maxLength);
462
+ await q(), n.setSelectionRange(_, _);
438
463
  }
439
- function vn(e, t) {
440
- V(t, (a) => {
464
+ function wn(e, t) {
465
+ P(t, (a) => {
441
466
  const n = a.getHours() % 12 || 12;
442
- a.setHours(_e(n, e));
467
+ a.setHours(He(n, e));
443
468
  });
444
469
  }
445
- async function Oe(e, t, a, n) {
470
+ async function Ue(e, t, a, n) {
446
471
  if (!e) return;
447
- const r = jn(t, a, n), u = () => e.setSelectionRange(r, r);
448
- u(), await F(), u(), await new Promise((c) => {
472
+ const l = ia(t, a, n), u = () => e.setSelectionRange(l, l);
473
+ u(), await q(), u(), await new Promise((f) => {
449
474
  requestAnimationFrame(() => {
450
- u(), c();
475
+ u(), f();
451
476
  });
452
477
  });
453
478
  }
454
- async function ft(e, t, a, n) {
479
+ async function bt(e, t, a, n) {
455
480
  if (a === t) {
456
- _.value !== a && (_.value = a);
481
+ g.value !== a && (g.value = a);
457
482
  return;
458
483
  }
459
- _.value = a, await Oe(e, t, a, n);
460
- }
461
- async function mn(e) {
462
- var L;
463
- if (de > 0) return;
464
- if (l.readonly || l.disabled) {
465
- he();
484
+ g.value = a, await Ue(e, t, a, n);
485
+ }
486
+ function ne(e, t) {
487
+ const a = e.trim();
488
+ if (!a) return null;
489
+ const n = de(a, r.format, O.value);
490
+ if (n) return n;
491
+ const l = et(a);
492
+ if (l) return l;
493
+ const u = Mt(a);
494
+ return u || (t != null && t.complete ? nt(a, r.format, O.value) : null);
495
+ }
496
+ async function Mn(e) {
497
+ if (me > 0) return;
498
+ if (r.readonly || r.disabled) {
499
+ Te();
466
500
  return;
467
501
  }
468
- const t = oe((L = C.value) == null ? void 0 : L.inputRef), a = (t == null ? void 0 : t.selectionStart) ?? 0, n = e ?? "";
502
+ const t = ae(), a = (t == null ? void 0 : t.selectionStart) ?? 0, n = e ?? "";
469
503
  if (!n) {
470
- v.value = void 0, S.value = null, _.value = "", P.value = !1;
504
+ c.value = void 0, D.value = null, g.value = "", F.value = !1;
471
505
  return;
472
506
  }
473
- if (l.range) {
474
- const d = xe(n, Ve.value);
475
- await ft(t, n, d, a), S.value = d;
476
- const I = Be(d);
477
- if (I) {
478
- v.value = I, S.value = null;
479
- const $e = I.map((Vn) => Q(Vn, l.format, K.value)).join(" - ");
480
- $e !== d && (_.value = $e, await Oe(t, d, $e, a)), P.value = !1;
507
+ if (r.range) {
508
+ const d = Se(n);
509
+ if (d) {
510
+ c.value = d, D.value = null, g.value = d.map((ke) => V(ke, r.format, N.value)).join(" - "), F.value = !1;
511
+ return;
512
+ }
513
+ const T = Re(n, Le.value);
514
+ await bt(t, n, T, a), D.value = T;
515
+ const Ge = Se(T);
516
+ if (Ge) {
517
+ c.value = Ge, D.value = null;
518
+ const ke = Ge.map((Qn) => V(Qn, r.format, N.value)).join(" - ");
519
+ ke !== T && (g.value = ke, await Ue(t, T, ke, a)), F.value = !1;
481
520
  }
482
521
  return;
483
522
  }
484
- const r = xe(n, ve.value), u = _t(r, l.format);
485
- let c = u, y = O(u, l.format, q.value);
486
- if (!y) {
487
- const d = O(n, l.format, q.value);
488
- d && (c = n, y = d);
523
+ const l = ne(n);
524
+ if (l) {
525
+ const d = K(l, n);
526
+ c.value = d, D.value = null, g.value = V(d, r.format, N.value), F.value = !1;
527
+ return;
528
+ }
529
+ const u = Re(n, ge.value), f = St(u, r.format);
530
+ let _ = f, j = de(f, r.format, O.value);
531
+ if (!j) {
532
+ const d = de(n, r.format, O.value);
533
+ d && (_ = n, j = d);
489
534
  }
490
- if (await ft(t, n, c, a), S.value = c, y) {
491
- const d = ue(y, n);
492
- v.value = d, S.value = null;
493
- const I = Q(d, l.format, K.value);
494
- I !== c && (_.value = I, await Oe(t, c, I, a)), P.value = !1;
535
+ if (await bt(t, n, _, a), D.value = _, j) {
536
+ const d = K(j, n);
537
+ c.value = d, D.value = null;
538
+ const T = V(d, r.format, N.value);
539
+ T !== _ && (g.value = T, await Ue(t, _, T, a)), F.value = !1;
495
540
  }
496
541
  }
497
- function Be(e, t) {
542
+ function Se(e, t) {
498
543
  const a = e.split(" - ");
499
544
  if (a.length !== 2) return null;
500
- const n = (c) => {
501
- const y = c.trim(), L = O(y, l.format, q.value);
502
- return L || (t != null && t.complete ? Qe(y, l.format, q.value) : null);
503
- }, r = n(a[0] ?? ""), u = n(a[1] ?? "");
504
- return !r || !u ? null : u < r ? [u, r] : [r, u];
505
- }
506
- function pn() {
507
- if (l.readonly || l.disabled) return !1;
508
- const e = S.value ?? _.value;
545
+ const n = (f) => ne(f, t), l = n(a[0] ?? ""), u = n(a[1] ?? "");
546
+ return !l || !u ? null : u < l ? [u, l] : [l, u];
547
+ }
548
+ function Tn() {
549
+ if (r.readonly || r.disabled) return !1;
550
+ const e = D.value ?? g.value;
509
551
  if (!e) return !1;
510
- if (l.range) {
511
- const c = xe(e, Ve.value), y = Be(c, { complete: !0 });
512
- return y ? (v.value = y, S.value = null, P.value = !1, _.value = y.map((L) => Q(L, l.format, K.value)).join(" - "), !0) : (S.value = null, v.value = void 0, P.value = !0, _.value = "", !1);
552
+ if (r.range) {
553
+ const f = Re(e, Le.value), _ = Se(f, { complete: !0 });
554
+ return _ ? (c.value = _, D.value = null, F.value = !1, g.value = _.map((j) => V(j, r.format, N.value)).join(" - "), !0) : (D.value = null, c.value = void 0, F.value = !0, g.value = "", !1);
513
555
  }
514
- const t = xe(e, ve.value), a = _t(t, l.format), n = Qe(
515
- a,
516
- l.format,
517
- q.value
518
- );
556
+ const t = Re(e, ge.value), a = St(t, r.format), n = ne(e, { complete: !0 }) ?? nt(a, r.format, O.value);
519
557
  if (!n)
520
- return S.value = null, v.value = void 0, P.value = !0, _.value = "", !1;
521
- const u = !!O(a, l.format, q.value) || Mt(a, l.format) ? n : ue(n, a);
522
- return v.value = u, S.value = null, P.value = !1, _.value = Q(u, l.format, K.value), !0;
558
+ return D.value = null, c.value = void 0, F.value = !0, g.value = "", !1;
559
+ const u = !!ne(e) || qt(a, r.format) ? n : K(n, a);
560
+ return c.value = u, D.value = null, F.value = !1, g.value = V(u, r.format, N.value), !0;
523
561
  }
524
- function gn(e) {
562
+ function xn(e) {
525
563
  const t = e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i, "").trim();
526
564
  return t && t !== e ? t : null;
527
565
  }
528
- function yn(e) {
529
- return !ne.value || O(e, l.format, q.value) || Mt(e, l.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
566
+ function In(e) {
567
+ return !re.value || ne(e) || qt(e, r.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
530
568
  }
531
- function hn(e) {
569
+ function Hn(e) {
532
570
  return e.getHours() === 0 && e.getMinutes() === 0 && e.getSeconds() === 0 && e.getMilliseconds() === 0;
533
571
  }
534
- function vt(e) {
572
+ function kt(e) {
535
573
  const t = /* @__PURE__ */ new Date();
536
574
  e.setHours(
537
575
  t.getHours(),
538
576
  t.getMinutes(),
539
- ye.value ? t.getSeconds() : 0,
540
- ye.value ? t.getMilliseconds() : 0
577
+ De.value ? t.getSeconds() : 0,
578
+ De.value ? t.getMilliseconds() : 0
541
579
  );
542
580
  }
543
- function ue(e, t) {
544
- if (l.range || !ne.value || t !== void 0 && yn(t)) return e;
581
+ function K(e, t) {
582
+ if (r.range || !re.value || t !== void 0 && In(t)) return e;
545
583
  const a = new Date(e);
546
- return vt(a), a;
547
- }
548
- function bn(e) {
549
- if (l.range)
550
- return Be(e);
551
- const t = O(e, l.format, q.value);
552
- if (t) return ue(t, e);
553
- const a = In(e);
554
- if (a) return ue(a, e);
555
- const n = Qe(e, l.format, q.value);
556
- if (n) return ue(n, e);
557
- const r = gn(l.format);
558
- if (r) {
559
- const u = O(e, r, q.value);
560
- if (u) return ue(u, e);
584
+ return kt(a), a;
585
+ }
586
+ function Sn(e) {
587
+ if (r.range)
588
+ return Se(e);
589
+ const t = de(e, r.format, O.value);
590
+ if (t) return K(t, e);
591
+ const a = et(e);
592
+ if (a) return K(a, e);
593
+ const n = Mt(e);
594
+ if (n) return K(n, e);
595
+ const l = nt(e, r.format, O.value);
596
+ if (l) return K(l, e);
597
+ const u = xn(r.format);
598
+ if (u) {
599
+ const f = de(e, u, O.value);
600
+ if (f) return K(f, e);
561
601
  }
562
602
  return null;
563
603
  }
564
- function kn(e) {
565
- if (P.value = !1, S.value = null, Array.isArray(e)) {
566
- const a = e.map((n) => Q(n, l.format, K.value)).join(" - ");
567
- de += 1, v.value = e, _.value = a, F(() => {
568
- de -= 1;
569
- });
604
+ async function Cn(e) {
605
+ if (F.value = !1, D.value = null, Array.isArray(e)) {
606
+ const a = e.map((n) => V(n, r.format, N.value)).join(" - ");
607
+ me += 1, c.value = e, g.value = a, await q(), me -= 1;
570
608
  return;
571
609
  }
572
- const t = Q(e, l.format, K.value);
573
- de += 1, v.value = e, _.value = t, F(() => {
574
- de -= 1;
575
- });
610
+ const t = V(e, r.format, N.value);
611
+ me += 1, c.value = e, g.value = t, await q(), me -= 1;
576
612
  }
577
- function mt(e) {
578
- var n, r, u, c;
579
- if (l.readonly || l.disabled) {
613
+ function _t(e) {
614
+ var n, l, u, f;
615
+ if (r.readonly || r.disabled) {
580
616
  e.preventDefault();
581
617
  return;
582
618
  }
583
- const t = ((r = (n = e.clipboardData) == null ? void 0 : n.getData("text/plain")) == null ? void 0 : r.trim()) || ((c = (u = e.clipboardData) == null ? void 0 : u.getData("text")) == null ? void 0 : c.trim()) || "";
619
+ const t = ((l = (n = e.clipboardData) == null ? void 0 : n.getData("text/plain")) == null ? void 0 : l.trim()) || ((f = (u = e.clipboardData) == null ? void 0 : u.getData("text")) == null ? void 0 : f.trim()) || "";
584
620
  if (!t) {
585
621
  e.preventDefault();
586
622
  return;
587
623
  }
588
- const a = bn(t);
624
+ const a = Sn(t);
589
625
  if (!a) {
590
626
  e.preventDefault();
591
627
  return;
592
628
  }
593
- e.preventDefault(), kn(a);
629
+ e.preventDefault(), Cn(a);
594
630
  }
595
- function _n(e) {
631
+ function qn(e) {
596
632
  const t = e.target;
597
- if (!(t instanceof Element) || !E.value) return null;
633
+ if (!(t instanceof Element) || !R.value) return null;
598
634
  const a = t.closest(
599
635
  "button, input, select, textarea, a[href], [tabindex], [contenteditable]"
600
636
  );
601
- return a && E.value.contains(a) ? a : null;
637
+ return a && R.value.contains(a) ? a : null;
602
638
  }
603
- function Dn(e) {
639
+ function Fn(e) {
604
640
  return !(e.matches(":disabled") || e.getAttribute("aria-disabled") === "true" || e.getAttribute("tabindex") === "-1");
605
641
  }
606
- function Mn(e) {
642
+ function Rn(e) {
607
643
  var a;
608
- if (!(e.target instanceof Node) || !((a = E.value) != null && a.contains(e.target))) return;
609
- fe = !0;
610
- const t = _n(e);
611
- t && !Dn(t) && e.preventDefault();
644
+ if (!(e.target instanceof Node) || !((a = R.value) != null && a.contains(e.target))) return;
645
+ pe = !0;
646
+ const t = qn(e);
647
+ t && !Fn(t) && e.preventDefault();
612
648
  }
613
- function pt() {
614
- return E.value ? Array.from(E.value.querySelectorAll(wt)).filter(
649
+ function Dt() {
650
+ return R.value ? Array.from(R.value.querySelectorAll(Ft)).filter(
615
651
  (e) => e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0
616
652
  ) : [];
617
653
  }
618
- function wn() {
619
- var n, r;
620
- const e = oe((n = C.value) == null ? void 0 : n.inputRef);
654
+ function Nn() {
655
+ var n;
656
+ const e = ae();
621
657
  if (!e) return;
622
658
  const t = Array.from(
623
- document.querySelectorAll(wt)
659
+ document.querySelectorAll(Ft)
624
660
  ).filter(
625
- (u) => u.offsetWidth > 0 || u.offsetHeight > 0 || u.getClientRects().length > 0
661
+ (l) => l.offsetWidth > 0 || l.offsetHeight > 0 || l.getClientRects().length > 0
626
662
  ), a = t.indexOf(e);
627
- a >= 0 && a < t.length - 1 && ((r = t[a + 1]) == null || r.focus());
663
+ a >= 0 && a < t.length - 1 && ((n = t[a + 1]) == null || n.focus());
628
664
  }
629
- function Tn(e) {
630
- if (e.key !== "Tab" || !T.value || l.readonly || l.disabled) return;
665
+ function Vn(e) {
666
+ if (e.key !== "Tab" || !H.value || r.readonly || r.disabled) return;
631
667
  if (e.shiftKey) {
632
- B = !1, T.value = !1;
668
+ A = !1, H.value = !1;
633
669
  return;
634
670
  }
635
- const [t] = pt();
636
- t && (e.preventDefault(), fe = !0, t.focus());
671
+ const [t] = Dt();
672
+ t && (e.preventDefault(), pe = !0, t.focus());
637
673
  }
638
- async function xn(e) {
674
+ async function En(e) {
639
675
  if (e.key !== "Tab") return;
640
- const t = pt();
676
+ const t = Dt();
641
677
  if (!t.length) return;
642
- const a = t[0], n = t[t.length - 1], r = document.activeElement;
678
+ const a = t[0], n = t[t.length - 1], l = document.activeElement;
643
679
  if (e.shiftKey) {
644
- if (r !== a) return;
645
- e.preventDefault(), fe = !0, we();
680
+ if (l !== a) return;
681
+ e.preventDefault(), pe = !0, We();
646
682
  return;
647
683
  }
648
- r === n && (e.preventDefault(), Ce = !0, T.value = !1, await F(), wn());
684
+ l === n && (e.preventDefault(), te = !0, H.value = !1, await q(), Nn());
649
685
  }
650
- async function Hn(e) {
651
- var r, u, c;
652
- if (pn(), fe) {
653
- fe = !1;
686
+ async function Pn(e) {
687
+ var l, u;
688
+ if (Tn(), pe) {
689
+ pe = !1;
654
690
  return;
655
691
  }
656
692
  const t = e == null ? void 0 : e.relatedTarget;
657
- if (t instanceof Node && ((r = E.value) != null && r.contains(t)))
693
+ if (t instanceof Node && ((l = R.value) != null && l.contains(t)))
658
694
  return;
659
- await F();
660
- const a = oe((u = C.value) == null ? void 0 : u.inputRef), n = document.activeElement;
661
- a !== n && (n instanceof Node && ((c = E.value) != null && c.contains(n)) || (B = !1, T.value = !1, Se.value = !1, he()));
662
- }
663
- function Sn() {
664
- if (!(l.readonly || l.disabled)) {
665
- if (Se.value = !0, B) {
666
- B = !1;
695
+ await q();
696
+ const a = ae(), n = document.activeElement;
697
+ a !== n && (n instanceof Node && ((u = R.value) != null && u.contains(n)) || (A = !1, H.value = !1, Ve.value = !1, Te()));
698
+ }
699
+ function Yn() {
700
+ if (!(r.readonly || r.disabled)) {
701
+ if (Ve.value = !0, A) {
702
+ A = !1;
667
703
  return;
668
704
  }
669
- T.value || (T.value = !0);
705
+ H.value || (H.value = !0);
670
706
  }
671
707
  }
672
- function gt() {
673
- l.readonly || l.disabled || (B = !1, T.value = !0);
708
+ function wt() {
709
+ r.readonly || r.disabled || (A = !1, H.value = !0);
674
710
  }
675
- function Cn(e) {
676
- e || Ze(), T.value = e;
711
+ function An(e) {
712
+ e || lt(), H.value = e;
677
713
  }
678
- function In(e) {
679
- const t = /[A-Za-z]/.test(e), a = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(
714
+ function Mt(e) {
715
+ const t = et(e);
716
+ if (t) return t;
717
+ const a = /[A-Za-z]/.test(e), n = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(
680
718
  e
681
719
  );
682
- if (!t && !a) return null;
683
- const n = new Date(e);
684
- return Number.isNaN(n.getTime()) ? null : n;
720
+ if (!a && !n) return null;
721
+ const l = new Date(e);
722
+ return Number.isNaN(l.getTime()) ? null : l;
685
723
  }
686
- function oe(e) {
724
+ function Tt(e) {
687
725
  return e instanceof HTMLInputElement ? e : typeof e == "object" && e !== null && "value" in e && e.value instanceof HTMLInputElement ? e.value : null;
688
726
  }
689
- function Rn(e) {
727
+ function ae() {
728
+ var n, l;
729
+ if (oe) return oe;
730
+ const e = Tt((n = L.value) == null ? void 0 : n.inputRef);
731
+ if (e)
732
+ return oe = e, e;
733
+ const t = we(
734
+ (l = L.value) == null ? void 0 : l.fieldRef
735
+ ), a = (t == null ? void 0 : t.querySelector(".q-text-field__input")) ?? null;
736
+ return a ? (oe = a, a) : null;
737
+ }
738
+ function Ln(e) {
690
739
  return e.isSelected || e.isRangeStart || e.isRangeEnd ? "bold" : e.isInRange ? "tonal" : "ghost";
691
740
  }
692
- function pe(e) {
741
+ function he(e) {
693
742
  var t;
694
- (t = E.value) == null || t.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
743
+ (t = R.value) == null || t.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
695
744
  }
696
- async function yt() {
745
+ async function xt() {
697
746
  var e;
698
- if (!T.value || J.value) {
699
- pe(0);
747
+ if (!H.value || E.value) {
748
+ he(0);
700
749
  return;
701
750
  }
702
- D.value === "date" && (await F(), pe(((e = Ie.value) == null ? void 0 : e.getBoundingClientRect().height) ?? 0));
751
+ w.value === "date" && (await q(), he(((e = Ee.value) == null ? void 0 : e.getBoundingClientRect().height) ?? 0));
703
752
  }
704
- function z() {
705
- le == null || le.disconnect(), le = null;
753
+ function U() {
754
+ ue == null || ue.disconnect(), ue = null;
706
755
  }
707
- async function ht() {
708
- !T.value || J.value || D.value !== "date" || (await F(), Ie.value && (z(), le = new MutationObserver(() => {
709
- yt();
710
- }), le.observe(Ie.value, {
756
+ async function It() {
757
+ !H.value || E.value || w.value !== "date" || (await q(), Ee.value && (U(), ue = new MutationObserver(() => {
758
+ xt();
759
+ }), ue.observe(Ee.value, {
711
760
  childList: !0,
712
761
  subtree: !0,
713
762
  attributes: !0,
714
763
  characterData: !0
715
- }), yt()));
764
+ }), xt()));
716
765
  }
717
- function bt() {
718
- D.value = "time", z();
766
+ function je() {
767
+ w.value = "time", U();
719
768
  }
720
- function De() {
721
- D.value = "date", ht();
769
+ function Ce() {
770
+ w.value = "date", It();
722
771
  }
723
- async function Me(e) {
772
+ async function qe(e) {
724
773
  var a;
725
- (a = E.value) == null || a.focus(), De(), await F();
726
- const t = e === "year" ? St.value : e === "month" ? Ht.value : e === "time" ? Ct.value : null;
727
- qt(t);
774
+ (a = R.value) == null || a.focus(), Ce(), await q();
775
+ const t = e === "year" ? Et.value : e === "month" ? Vt.value : e === "time" ? Pt.value : null;
776
+ Lt(t);
728
777
  }
729
- function qn() {
730
- const e = D.value;
731
- e !== "date" && Me(e);
778
+ function On() {
779
+ const e = w.value;
780
+ e !== "date" && qe(e);
732
781
  }
733
- async function En() {
734
- z(), D.value = "month", await F();
735
- const e = Re.get(g.value);
782
+ async function Bn() {
783
+ U(), w.value = "month", await q();
784
+ const e = Pe.get(y.value);
736
785
  e == null || e.scrollIntoView({ block: "center" }), e == null || e.focus();
737
786
  }
738
- async function Fn() {
787
+ async function $n() {
739
788
  var e;
740
- z(), ae.value = h.value, D.value = "year", await F(), (e = qe.get(ae.value)) == null || e.scrollIntoView({ block: "center" });
789
+ U(), le.value = h.value, w.value = "year", await q(), (e = Ye.get(le.value)) == null || e.scrollIntoView({ block: "center" });
741
790
  }
742
- async function Ke(e) {
791
+ async function be(e) {
743
792
  if (e.key !== "Escape") return;
744
- if (B = !0, D.value === "date") {
745
- e.preventDefault(), T.value = !1;
793
+ if (A = !0, w.value === "date" || E.value) {
794
+ e.preventDefault(), H.value = !1, await q(), Qe();
746
795
  return;
747
796
  }
748
797
  e.preventDefault();
749
- const t = D.value;
750
- await Me(t);
798
+ const t = w.value;
799
+ await qe(t);
800
+ }
801
+ function We() {
802
+ var e;
803
+ (e = ae()) == null || e.focus();
751
804
  }
752
- function we() {
753
- var e, t;
754
- (t = (e = C.value) == null ? void 0 : e.inputRef) == null || t.focus();
805
+ function zn(e) {
806
+ return !e || e === document.body || e === document.documentElement;
755
807
  }
756
- function Nn() {
757
- var a, n;
758
- if (Ce) {
759
- Ce = !1;
808
+ function Kn(e, t) {
809
+ if (e.closest(".q-date-time-picker__menu")) return !1;
810
+ const a = t.closest(".q-date-time-picker");
811
+ return a != null && a.contains(e) || !(e instanceof HTMLElement) ? !1 : e.tabIndex >= 0 || e.matches(
812
+ 'input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'
813
+ );
814
+ }
815
+ function Un(e) {
816
+ var a;
817
+ const t = ae();
818
+ return t ? e === t || !e || !e.isConnected || zn(e) || (a = R.value) != null && a.contains(e) ? !0 : !Kn(e, t) : !1;
819
+ }
820
+ function jn() {
821
+ if (te) return;
822
+ const e = ae();
823
+ !e || !Un(document.activeElement) || (A = !0, e.focus());
824
+ }
825
+ function Qe() {
826
+ q().then(() => {
827
+ requestAnimationFrame(() => {
828
+ requestAnimationFrame(() => {
829
+ jn();
830
+ });
831
+ });
832
+ });
833
+ }
834
+ function Wn() {
835
+ if (te) {
836
+ te = !1;
760
837
  return;
761
838
  }
762
- const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
763
- e && t !== e && !(t instanceof Node && ((n = E.value) != null && n.contains(t))) || we();
764
- }
765
- return se(v, () => {
766
- x.value && ($(x.value.getMonth()), re(x.value.getFullYear()));
767
- }), se(T, (e, t) => {
768
- if (J.value) {
769
- z(), pe(0);
839
+ Qe();
840
+ }
841
+ function Ht() {
842
+ lt();
843
+ const e = te;
844
+ te && (te = !1), e || (A = !0, Qe());
845
+ }
846
+ return fe(c, () => {
847
+ M.value && (z(M.value.getMonth()), se(M.value.getFullYear()));
848
+ }), fe(H, (e, t) => {
849
+ if (E.value) {
850
+ U(), he(0), e ? (document.addEventListener("keydown", be, { capture: !0 }), je()) : (t && (sn(), Ht()), document.removeEventListener("keydown", be, { capture: !0 }));
770
851
  return;
771
852
  }
772
- m.value = null, ee.value = null, N.value = null, A.value = !1, e ? (document.addEventListener("keydown", Ke, { capture: !0 }), Zt(), ht()) : (t && Ze(), document.removeEventListener("keydown", Ke, { capture: !0 }), z(), pe(0));
773
- }), se(
774
- J,
853
+ $e(), e ? (document.addEventListener("keydown", be, { capture: !0 }), un(), It()) : (t && Ht(), document.removeEventListener("keydown", be, { capture: !0 }), U(), he(0));
854
+ }), fe(
855
+ E,
775
856
  (e) => {
776
- e && z(), T.value = !1, e && pe(0), e ? bt() : De();
857
+ e && U(), H.value = !1, e && he(0), e ? je() : Ce();
777
858
  },
778
859
  { immediate: !0 }
779
- ), Ln(() => {
780
- z(), document.removeEventListener("keydown", Ke, { capture: !0 });
860
+ ), Jn(() => {
861
+ U(), document.removeEventListener("keydown", be, { capture: !0 });
781
862
  }), (e, t) => {
782
863
  var a;
783
- return f(), H(
864
+ return m(), S(
784
865
  Y,
785
866
  null,
786
867
  [
787
- i(o(Te), {
788
- id: l.id,
868
+ i(o(Fe), Q({
869
+ id: r.id,
789
870
  ref: "field",
790
- "model-value": _.value,
791
- class: kt(["q-date-time-picker", l.class]),
792
- clearable: Ye.value,
793
- label: l.label,
794
- "label-position": l.labelPosition,
795
- readonly: l.readonly,
796
- disabled: l.disabled,
797
- placeholder: Tt.value,
798
- required: l.required,
799
- size: l.size,
800
- invalid: l.invalid || P.value,
801
- "onClick:clear": we,
802
- onFocusin: Sn,
803
- onKeydown: Tn,
804
- onBlur: Hn,
805
- "onUpdate:modelValue": mn
806
- }, On({
871
+ "model-value": g.value,
872
+ class: ["q-date-time-picker", r.class],
873
+ clearable: Oe.value,
874
+ "aria-label": r.label,
875
+ label: r.label,
876
+ "label-position": r.labelPosition,
877
+ readonly: r.readonly,
878
+ disabled: r.disabled,
879
+ placeholder: Rt.value,
880
+ required: r.required,
881
+ size: r.size,
882
+ invalid: r.invalid || F.value
883
+ }, e.$attrs, {
884
+ onBlur: Pn,
885
+ "onClick:clear": We,
886
+ onFocusin: Yn,
887
+ onKeydown: Vn,
888
+ "onUpdate:modelValue": Mn
889
+ }), ea({
807
890
  prepend: b(() => [
808
891
  i(
809
- o(w),
810
- te({ class: "q-date-time-picker__input-icon" }, $t.value),
892
+ o(I),
893
+ Q({ class: "q-date-time-picker__input-icon" }, Zt.value),
811
894
  null,
812
895
  16
813
896
  /* FULL_PROPS */
@@ -819,24 +902,24 @@ const na = {
819
902
  e.$slots.extras ? {
820
903
  name: "extras",
821
904
  fn: b(() => [
822
- Bn(e.$slots, "extras")
905
+ ta(e.$slots, "extras")
823
906
  ]),
824
907
  key: "0"
825
908
  } : void 0
826
- ]), 1032, ["id", "model-value", "class", "clearable", "label", "label-position", "readonly", "disabled", "placeholder", "required", "size", "invalid"]),
827
- !l.readonly && !l.disabled ? (f(), U(o(zn), {
909
+ ]), 1040, ["id", "model-value", "class", "clearable", "aria-label", "label", "label-position", "readonly", "disabled", "placeholder", "required", "size", "invalid"]),
910
+ !r.readonly && !r.disabled ? (m(), W(o(la), {
828
911
  key: 0,
829
- "model-value": T.value,
830
- anchor: (a = C.value) == null ? void 0 : a.fieldRef,
831
- inline: l.inline,
912
+ "model-value": H.value,
913
+ anchor: (a = L.value) == null ? void 0 : a.fieldRef,
914
+ inline: r.inline,
832
915
  offset: 8,
833
916
  placement: "bottom",
834
917
  trigger: "manual",
835
918
  arrow: "",
836
919
  "non-modal": "",
837
920
  spy: "",
838
- onLeave: Nn,
839
- "onUpdate:modelValue": Cn
921
+ onLeave: Wn,
922
+ "onUpdate:modelValue": An
840
923
  }, {
841
924
  default: b(() => [
842
925
  k(
@@ -845,27 +928,27 @@ const na = {
845
928
  ref: "menu",
846
929
  class: "q-date-time-picker__menu",
847
930
  tabindex: "-1",
848
- onPointerdownCapture: Mn,
849
- onKeydown: xn
931
+ onPointerdownCapture: Rn,
932
+ onKeydown: En
850
933
  },
851
934
  [
852
- M(" Calendar View "),
853
- D.value === "date" ? (f(), H(
935
+ x(" Calendar View "),
936
+ w.value === "date" ? (m(), S(
854
937
  "div",
855
- na,
938
+ ga,
856
939
  [
857
- M(" Header "),
858
- k("div", aa, [
940
+ x(" Header "),
941
+ k("div", ya, [
859
942
  i(o(p), {
860
943
  variant: "ghost",
861
- disabled: !lt.value,
862
- title: l.texts.previousMonth,
863
- onClick: Qt
944
+ disabled: !ft.value,
945
+ title: r.texts.previousMonth,
946
+ onClick: an
864
947
  }, {
865
948
  default: b(() => [
866
949
  i(
867
- o(w),
868
- W(j(l.icons.back)),
950
+ o(I),
951
+ G(X(r.icons.back)),
869
952
  null,
870
953
  16
871
954
  /* FULL_PROPS */
@@ -878,28 +961,28 @@ const na = {
878
961
  ref: "monthHeader",
879
962
  "data-testid": "q-date-time-picker-month-header",
880
963
  variant: "ghost",
881
- label: be(g.value, 3),
882
- title: l.texts.pickMonth,
883
- onClick: En
964
+ label: xe(y.value, 3),
965
+ title: r.texts.pickMonth,
966
+ onClick: Bn
884
967
  }, null, 8, ["label", "title"]),
885
968
  i(o(p), {
886
969
  ref: "yearHeader",
887
970
  "data-testid": "q-date-time-picker-year-header",
888
971
  variant: "ghost",
889
972
  label: h.value.toString(),
890
- title: l.texts.pickYear,
891
- onClick: Fn
973
+ title: r.texts.pickYear,
974
+ onClick: $n
892
975
  }, null, 8, ["label", "title"]),
893
976
  i(o(p), {
894
977
  variant: "ghost",
895
- disabled: !rt.value,
896
- title: l.texts.nextMonth,
897
- onClick: Gt
978
+ disabled: !dt.value,
979
+ title: r.texts.nextMonth,
980
+ onClick: rn
898
981
  }, {
899
982
  default: b(() => [
900
983
  i(
901
- o(w),
902
- W(j(l.icons.forward)),
984
+ o(I),
985
+ G(X(r.icons.forward)),
903
986
  null,
904
987
  16
905
988
  /* FULL_PROPS */
@@ -909,18 +992,18 @@ const na = {
909
992
  /* STABLE */
910
993
  }, 8, ["disabled", "title"])
911
994
  ]),
912
- M(" Weekday Headers "),
913
- k("div", la, [
914
- (f(!0), H(
995
+ x(" Weekday Headers "),
996
+ k("div", ha, [
997
+ (m(!0), S(
915
998
  Y,
916
999
  null,
917
- ge(Vt.value, (n) => (f(), H(
1000
+ _e(zt.value, (n) => (m(), S(
918
1001
  "div",
919
1002
  {
920
1003
  key: n,
921
1004
  class: "q-date-time-picker__weekday"
922
1005
  },
923
- ze(n),
1006
+ Xe(n),
924
1007
  1
925
1008
  /* TEXT */
926
1009
  ))),
@@ -928,24 +1011,24 @@ const na = {
928
1011
  /* KEYED_FRAGMENT */
929
1012
  ))
930
1013
  ]),
931
- M(" Days Grid "),
1014
+ x(" Days Grid "),
932
1015
  k(
933
1016
  "div",
934
1017
  {
935
1018
  class: "q-date-time-picker__days",
936
- onMouseleave: ut,
937
- onFocusout: Wt,
938
- onTouchstartPassive: ot,
939
- onTouchmovePassive: ot
1019
+ onMouseleave: vt,
1020
+ onFocusout: tn,
1021
+ onTouchstartPassive: mt,
1022
+ onTouchmovePassive: mt
940
1023
  },
941
1024
  [
942
- (f(!0), H(
1025
+ (m(!0), S(
943
1026
  Y,
944
1027
  null,
945
- ge(et.value, (n, r) => (f(), U(o(p), {
946
- key: r,
947
- "data-day-index": r,
948
- class: kt([
1028
+ _e(ot.value, (n, l) => (m(), W(o(p), {
1029
+ key: l,
1030
+ "data-day-index": l,
1031
+ class: na([
949
1032
  "q-date-time-picker__day",
950
1033
  {
951
1034
  "q-date-time-picker__day--other-month": !n.isCurrentMonth,
@@ -957,11 +1040,11 @@ const na = {
957
1040
  }
958
1041
  ]),
959
1042
  label: n.date.getDate().toString(),
960
- variant: Rn(n),
1043
+ variant: Ln(n),
961
1044
  disabled: n.isDisabled,
962
- onMouseenter: () => Pe(n.date),
963
- onFocus: () => Pe(n.date),
964
- onClick: () => jt(n.date)
1045
+ onMouseenter: () => Be(n.date),
1046
+ onFocus: () => Be(n.date),
1047
+ onClick: () => nn(n.date)
965
1048
  }, null, 8, ["data-day-index", "class", "label", "variant", "disabled", "onMouseenter", "onFocus", "onClick"]))),
966
1049
  128
967
1050
  /* KEYED_FRAGMENT */
@@ -973,41 +1056,41 @@ const na = {
973
1056
  ],
974
1057
  512
975
1058
  /* NEED_PATCH */
976
- )) : D.value === "time" ? (f(), H(
1059
+ )) : w.value === "time" ? (m(), S(
977
1060
  Y,
978
1061
  { key: 1 },
979
1062
  [
980
- M(" Time View "),
981
- k("div", ra, [
982
- (f(!0), H(
1063
+ x(" Time View "),
1064
+ k("div", ba, [
1065
+ (m(!0), S(
983
1066
  Y,
984
1067
  null,
985
- ge(l.range ? 2 : 1, (n) => (f(), H("div", {
1068
+ _e(r.range ? 2 : 1, (n) => (m(), S("div", {
986
1069
  key: n,
987
1070
  class: "q-date-time-picker__time-group"
988
1071
  }, [
989
- Z.value ? (f(), H("div", ua, [
990
- i(o(Un), {
991
- "model-value": an(n - 1),
1072
+ ee.value ? (m(), S("div", ka, [
1073
+ i(o(ua), {
1074
+ "model-value": mn(n - 1),
992
1075
  "show-state-labels": "",
993
1076
  size: "small",
994
- "false-label": l.texts.am,
995
- "true-label": l.texts.pm,
996
- "onUpdate:modelValue": (r) => vn(r ?? !1, n - 1)
1077
+ "false-label": r.texts.am,
1078
+ "true-label": r.texts.pm,
1079
+ "onUpdate:modelValue": (l) => wn(l ?? !1, n - 1)
997
1080
  }, null, 8, ["model-value", "false-label", "true-label", "onUpdate:modelValue"])
998
- ])) : M("v-if", !0),
999
- M(" Time Inputs "),
1000
- k("div", oa, [
1001
- k("div", ia, [
1081
+ ])) : x("v-if", !0),
1082
+ x(" Time Inputs "),
1083
+ k("div", _a, [
1084
+ k("div", Da, [
1002
1085
  i(o(p), {
1003
1086
  variant: "ghost",
1004
- title: l.texts.increaseHour,
1005
- onClick: (r) => ln(n - 1)
1087
+ title: r.texts.increaseHour,
1088
+ onClick: (l) => pn(n - 1)
1006
1089
  }, {
1007
1090
  default: b(() => [
1008
1091
  i(
1009
- o(w),
1010
- te({ ref_for: !0 }, l.icons.up),
1092
+ o(I),
1093
+ Q({ ref_for: !0 }, r.icons.up),
1011
1094
  null,
1012
1095
  16
1013
1096
  /* FULL_PROPS */
@@ -1016,24 +1099,24 @@ const na = {
1016
1099
  _: 1
1017
1100
  /* STABLE */
1018
1101
  }, 8, ["title", "onClick"]),
1019
- i(o(Te), {
1102
+ i(o(Fe), {
1020
1103
  class: "q-date-time-picker__time-number",
1021
1104
  size: "small",
1022
1105
  inputmode: "numeric",
1023
1106
  "max-length": 2,
1024
- "model-value": o(je)(en(n - 1)),
1025
- onKeydown: (r) => Le(r, "hours", n - 1),
1026
- "onUpdate:modelValue": (r) => st(r, n - 1)
1107
+ "model-value": o(tt)(fn(n - 1)),
1108
+ onKeydown: (l) => Ke(l, "hours", n - 1),
1109
+ "onUpdate:modelValue": (l) => gt(l, n - 1)
1027
1110
  }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1028
1111
  i(o(p), {
1029
1112
  variant: "ghost",
1030
- title: l.texts.decreaseHour,
1031
- onClick: (r) => rn(n - 1)
1113
+ title: r.texts.decreaseHour,
1114
+ onClick: (l) => gn(n - 1)
1032
1115
  }, {
1033
1116
  default: b(() => [
1034
1117
  i(
1035
- o(w),
1036
- te({ ref_for: !0 }, l.icons.down),
1118
+ o(I),
1119
+ Q({ ref_for: !0 }, r.icons.down),
1037
1120
  null,
1038
1121
  16
1039
1122
  /* FULL_PROPS */
@@ -1050,16 +1133,16 @@ const na = {
1050
1133
  -1
1051
1134
  /* CACHED */
1052
1135
  )),
1053
- k("div", sa, [
1136
+ k("div", wa, [
1054
1137
  i(o(p), {
1055
1138
  variant: "ghost",
1056
- title: l.texts.increaseMinute,
1057
- onClick: (r) => un(n - 1)
1139
+ title: r.texts.increaseMinute,
1140
+ onClick: (l) => yn(n - 1)
1058
1141
  }, {
1059
1142
  default: b(() => [
1060
1143
  i(
1061
- o(w),
1062
- te({ ref_for: !0 }, l.icons.up),
1144
+ o(I),
1145
+ Q({ ref_for: !0 }, r.icons.up),
1063
1146
  null,
1064
1147
  16
1065
1148
  /* FULL_PROPS */
@@ -1068,24 +1151,24 @@ const na = {
1068
1151
  _: 1
1069
1152
  /* STABLE */
1070
1153
  }, 8, ["title", "onClick"]),
1071
- i(o(Te), {
1154
+ i(o(Fe), {
1072
1155
  class: "q-date-time-picker__time-number",
1073
1156
  size: "small",
1074
1157
  inputmode: "numeric",
1075
1158
  "max-length": 2,
1076
- "model-value": o(je)(tn(n - 1)),
1077
- onKeydown: (r) => Le(r, "minutes", n - 1),
1078
- "onUpdate:modelValue": (r) => ct(r, n - 1)
1159
+ "model-value": o(tt)(dn(n - 1)),
1160
+ onKeydown: (l) => Ke(l, "minutes", n - 1),
1161
+ "onUpdate:modelValue": (l) => yt(l, n - 1)
1079
1162
  }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1080
1163
  i(o(p), {
1081
1164
  variant: "ghost",
1082
- title: l.texts.decreaseMinute,
1083
- onClick: (r) => on(n - 1)
1165
+ title: r.texts.decreaseMinute,
1166
+ onClick: (l) => hn(n - 1)
1084
1167
  }, {
1085
1168
  default: b(() => [
1086
1169
  i(
1087
- o(w),
1088
- te({ ref_for: !0 }, l.icons.down),
1170
+ o(I),
1171
+ Q({ ref_for: !0 }, r.icons.down),
1089
1172
  null,
1090
1173
  16
1091
1174
  /* FULL_PROPS */
@@ -1095,7 +1178,7 @@ const na = {
1095
1178
  /* STABLE */
1096
1179
  }, 8, ["title", "onClick"])
1097
1180
  ]),
1098
- ye.value ? (f(), H(
1181
+ De.value ? (m(), S(
1099
1182
  Y,
1100
1183
  { key: 0 },
1101
1184
  [
@@ -1106,16 +1189,16 @@ const na = {
1106
1189
  -1
1107
1190
  /* CACHED */
1108
1191
  )),
1109
- k("div", ca, [
1192
+ k("div", Ma, [
1110
1193
  i(o(p), {
1111
1194
  variant: "ghost",
1112
- title: l.texts.increaseSecond,
1113
- onClick: (r) => sn(n - 1)
1195
+ title: r.texts.increaseSecond,
1196
+ onClick: (l) => bn(n - 1)
1114
1197
  }, {
1115
1198
  default: b(() => [
1116
1199
  i(
1117
- o(w),
1118
- te({ ref_for: !0 }, l.icons.up),
1200
+ o(I),
1201
+ Q({ ref_for: !0 }, r.icons.up),
1119
1202
  null,
1120
1203
  16
1121
1204
  /* FULL_PROPS */
@@ -1124,24 +1207,24 @@ const na = {
1124
1207
  _: 1
1125
1208
  /* STABLE */
1126
1209
  }, 8, ["title", "onClick"]),
1127
- i(o(Te), {
1210
+ i(o(Fe), {
1128
1211
  class: "q-date-time-picker__time-number",
1129
1212
  size: "small",
1130
1213
  inputmode: "numeric",
1131
1214
  "max-length": 2,
1132
- "model-value": o(je)(nn(n - 1)),
1133
- onKeydown: (r) => Le(r, "seconds", n - 1),
1134
- "onUpdate:modelValue": (r) => dt(r, n - 1)
1215
+ "model-value": o(tt)(vn(n - 1)),
1216
+ onKeydown: (l) => Ke(l, "seconds", n - 1),
1217
+ "onUpdate:modelValue": (l) => ht(l, n - 1)
1135
1218
  }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1136
1219
  i(o(p), {
1137
1220
  variant: "ghost",
1138
- title: l.texts.decreaseSecond,
1139
- onClick: (r) => cn(n - 1)
1221
+ title: r.texts.decreaseSecond,
1222
+ onClick: (l) => kn(n - 1)
1140
1223
  }, {
1141
1224
  default: b(() => [
1142
1225
  i(
1143
- o(w),
1144
- te({ ref_for: !0 }, l.icons.down),
1226
+ o(I),
1227
+ Q({ ref_for: !0 }, r.icons.down),
1145
1228
  null,
1146
1229
  16
1147
1230
  /* FULL_PROPS */
@@ -1154,7 +1237,7 @@ const na = {
1154
1237
  ],
1155
1238
  64
1156
1239
  /* STABLE_FRAGMENT */
1157
- )) : M("v-if", !0)
1240
+ )) : x("v-if", !0)
1158
1241
  ])
1159
1242
  ]))),
1160
1243
  128
@@ -1164,26 +1247,26 @@ const na = {
1164
1247
  ],
1165
1248
  2112
1166
1249
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1167
- )) : D.value === "month" ? (f(), H(
1250
+ )) : w.value === "month" ? (m(), S(
1168
1251
  Y,
1169
1252
  { key: 2 },
1170
1253
  [
1171
- M(" Month View "),
1172
- k("div", da, [
1173
- (f(!0), H(
1254
+ x(" Month View "),
1255
+ k("div", Ta, [
1256
+ (m(!0), S(
1174
1257
  Y,
1175
1258
  null,
1176
- ge(Yt.value, (n, r) => (f(), U(o(p), {
1177
- key: r,
1259
+ _e(Kt.value, (n, l) => (m(), W(o(p), {
1260
+ key: l,
1178
1261
  ref_for: !0,
1179
- ref: (u) => It(u, r),
1262
+ ref: (u) => Yt(u, l),
1180
1263
  "data-testid": "q-date-time-picker-month-option",
1181
- "data-month-index": r,
1182
- disabled: g.value === r,
1264
+ "data-month-index": l,
1265
+ disabled: y.value === l,
1183
1266
  label: n,
1184
- title: be(r),
1267
+ title: xe(l),
1185
1268
  variant: "ghost",
1186
- onClick: () => $(r, !0)
1269
+ onClick: () => z(l, !0)
1187
1270
  }, null, 8, ["data-month-index", "disabled", "label", "title", "onClick"]))),
1188
1271
  128
1189
1272
  /* KEYED_FRAGMENT */
@@ -1192,23 +1275,23 @@ const na = {
1192
1275
  ],
1193
1276
  2112
1194
1277
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1195
- )) : D.value === "year" ? (f(), H(
1278
+ )) : w.value === "year" ? (m(), S(
1196
1279
  Y,
1197
1280
  { key: 3 },
1198
1281
  [
1199
- M(" Year View "),
1200
- k("div", fa, [
1201
- k("div", va, [
1282
+ x(" Year View "),
1283
+ k("div", xa, [
1284
+ k("div", Ia, [
1202
1285
  i(o(p), {
1203
1286
  variant: "ghost",
1204
- disabled: !nt.value,
1205
- title: l.texts.previousYears,
1206
- onClick: At
1287
+ disabled: !st.value,
1288
+ title: r.texts.previousYears,
1289
+ onClick: jt
1207
1290
  }, {
1208
1291
  default: b(() => [
1209
1292
  i(
1210
- o(w),
1211
- W(j(l.icons.back)),
1293
+ o(I),
1294
+ G(X(r.icons.back)),
1212
1295
  null,
1213
1296
  16
1214
1297
  /* FULL_PROPS */
@@ -1219,21 +1302,21 @@ const na = {
1219
1302
  }, 8, ["disabled", "title"]),
1220
1303
  k(
1221
1304
  "div",
1222
- ma,
1223
- ze(ke.value.startYear) + " - " + ze(ke.value.endYear),
1305
+ Ha,
1306
+ Xe(Ie.value.startYear) + " - " + Xe(Ie.value.endYear),
1224
1307
  1
1225
1308
  /* TEXT */
1226
1309
  ),
1227
1310
  i(o(p), {
1228
1311
  variant: "ghost",
1229
- disabled: !at.value,
1230
- title: l.texts.nextYears,
1231
- onClick: Lt
1312
+ disabled: !ct.value,
1313
+ title: r.texts.nextYears,
1314
+ onClick: Wt
1232
1315
  }, {
1233
1316
  default: b(() => [
1234
1317
  i(
1235
- o(w),
1236
- W(j(l.icons.forward)),
1318
+ o(I),
1319
+ G(X(r.icons.forward)),
1237
1320
  null,
1238
1321
  16
1239
1322
  /* FULL_PROPS */
@@ -1243,21 +1326,21 @@ const na = {
1243
1326
  /* STABLE */
1244
1327
  }, 8, ["disabled", "title"])
1245
1328
  ]),
1246
- k("div", pa, [
1247
- (f(!0), H(
1329
+ k("div", Sa, [
1330
+ (m(!0), S(
1248
1331
  Y,
1249
1332
  null,
1250
- ge(Kt.value, (n, r) => (f(), U(o(p), {
1251
- key: r,
1333
+ _e(Xt.value, (n, l) => (m(), W(o(p), {
1334
+ key: l,
1252
1335
  ref_for: !0,
1253
- ref: (u) => Rt(u, n),
1336
+ ref: (u) => At(u, n),
1254
1337
  "data-testid": "q-date-time-picker-year-option",
1255
1338
  "data-year": n,
1256
1339
  disabled: h.value === n,
1257
1340
  label: n.toString(),
1258
1341
  title: n,
1259
1342
  variant: "ghost",
1260
- onClick: () => re(n, !0)
1343
+ onClick: () => se(n, !0)
1261
1344
  }, null, 8, ["data-year", "disabled", "label", "title", "onClick"]))),
1262
1345
  128
1263
1346
  /* KEYED_FRAGMENT */
@@ -1267,19 +1350,19 @@ const na = {
1267
1350
  ],
1268
1351
  2112
1269
1352
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1270
- )) : M("v-if", !0),
1271
- k("div", ga, [
1272
- J.value ? M("v-if", !0) : (f(), U(o(p), {
1353
+ )) : x("v-if", !0),
1354
+ k("div", Ca, [
1355
+ E.value ? x("v-if", !0) : (m(), W(o(p), {
1273
1356
  key: 0,
1274
1357
  variant: "ghost",
1275
- disabled: xt.value,
1276
- title: l.texts.today,
1277
- onClick: Xt
1358
+ disabled: Nt.value,
1359
+ title: r.texts.today,
1360
+ onClick: ln
1278
1361
  }, {
1279
1362
  default: b(() => [
1280
1363
  i(
1281
- o(w),
1282
- W(j(l.icons.today)),
1364
+ o(I),
1365
+ G(X(r.icons.today)),
1283
1366
  null,
1284
1367
  16
1285
1368
  /* FULL_PROPS */
@@ -1288,18 +1371,18 @@ const na = {
1288
1371
  _: 1
1289
1372
  /* STABLE */
1290
1373
  }, 8, ["disabled", "title"])),
1291
- ne.value && D.value === "date" ? (f(), U(o(p), {
1374
+ re.value && w.value === "date" ? (m(), W(o(p), {
1292
1375
  key: 1,
1293
1376
  ref: "toggleTime",
1294
1377
  "data-testid": "q-date-time-picker-toggle-time",
1295
1378
  variant: "ghost",
1296
- title: l.texts.toggleMode,
1297
- onClick: bt
1379
+ title: r.texts.toggleMode,
1380
+ onClick: je
1298
1381
  }, {
1299
1382
  default: b(() => [
1300
1383
  i(
1301
- o(w),
1302
- W(j(l.icons.clock)),
1384
+ o(I),
1385
+ G(X(r.icons.clock)),
1303
1386
  null,
1304
1387
  16
1305
1388
  /* FULL_PROPS */
@@ -1307,17 +1390,17 @@ const na = {
1307
1390
  ]),
1308
1391
  _: 1
1309
1392
  /* STABLE */
1310
- }, 8, ["title"])) : D.value !== "date" && !J.value ? (f(), U(o(p), {
1393
+ }, 8, ["title"])) : w.value !== "date" && !E.value ? (m(), W(o(p), {
1311
1394
  key: 2,
1312
1395
  "data-testid": "q-date-time-picker-toggle-date",
1313
1396
  variant: "ghost",
1314
- title: l.texts.toggleMode,
1315
- onClick: qn
1397
+ title: r.texts.toggleMode,
1398
+ onClick: On
1316
1399
  }, {
1317
1400
  default: b(() => [
1318
1401
  i(
1319
- o(w),
1320
- W(j(l.icons.calendar)),
1402
+ o(I),
1403
+ G(X(r.icons.calendar)),
1321
1404
  null,
1322
1405
  16
1323
1406
  /* FULL_PROPS */
@@ -1325,19 +1408,19 @@ const na = {
1325
1408
  ]),
1326
1409
  _: 1
1327
1410
  /* STABLE */
1328
- }, 8, ["title"])) : M("v-if", !0),
1329
- l.clearable ? (f(), U(o(p), {
1411
+ }, 8, ["title"])) : x("v-if", !0),
1412
+ r.clearable ? (m(), W(o(p), {
1330
1413
  key: 3,
1331
1414
  "data-testid": "q-date-time-picker-clear",
1332
1415
  variant: "ghost",
1333
- disabled: !Ye.value,
1334
- title: l.texts.clearValue,
1335
- onClick: Ut
1416
+ disabled: !Oe.value,
1417
+ title: r.texts.clearValue,
1418
+ onClick: en
1336
1419
  }, {
1337
1420
  default: b(() => [
1338
1421
  i(
1339
- o(w),
1340
- W(j(l.icons.delete)),
1422
+ o(I),
1423
+ G(X(r.icons.delete)),
1341
1424
  null,
1342
1425
  16
1343
1426
  /* FULL_PROPS */
@@ -1345,7 +1428,7 @@ const na = {
1345
1428
  ]),
1346
1429
  _: 1
1347
1430
  /* STABLE */
1348
- }, 8, ["disabled", "title"])) : M("v-if", !0)
1431
+ }, 8, ["disabled", "title"])) : x("v-if", !0)
1349
1432
  ])
1350
1433
  ],
1351
1434
  544
@@ -1354,7 +1437,7 @@ const na = {
1354
1437
  ]),
1355
1438
  _: 1
1356
1439
  /* STABLE */
1357
- }, 8, ["model-value", "anchor", "inline"])) : M("v-if", !0)
1440
+ }, 8, ["model-value", "anchor", "inline"])) : x("v-if", !0)
1358
1441
  ],
1359
1442
  64
1360
1443
  /* STABLE_FRAGMENT */
@@ -1363,5 +1446,5 @@ const na = {
1363
1446
  }
1364
1447
  });
1365
1448
  export {
1366
- xa as default
1449
+ La as default
1367
1450
  };