@featherk/composables 0.12.4 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +1,40 @@
1
- import { ref as Y, onBeforeUnmount as Ve, nextTick as H, computed as h, watchEffect as Fe, toValue as re, reactive as Ne, watch as se, useId as Oe, unref as Ke, onUnmounted as Ce, shallowRef as Ae, shallowReactive as qe, readonly as Q, onMounted as Te } from "vue";
1
+ import { ref as Z, onBeforeUnmount as Ve, nextTick as j, computed as h, watchEffect as Fe, toValue as ae, reactive as Oe, watch as se, useId as Ne, unref as Ke, onUnmounted as Ce, shallowRef as be, shallowReactive as qe, readonly as ne, onMounted as Te } from "vue";
2
2
  import { useFocusTrap as Ue } from "@vueuse/integrations/useFocusTrap";
3
3
  const vt = (e, t) => {
4
- const r = Y(null);
5
- let g = !1, s = null, f = null;
6
- const A = [], I = ".k-table-row[data-grid-row-index] [tabindex]", F = () => {
7
- const u = e?.value?.$el;
8
- return u ? u.closest(".k-grid") : null;
9
- }, N = (u) => {
10
- const k = F();
4
+ const r = Z(null);
5
+ let v = !1, l = null, d = null;
6
+ const w = [], D = ".k-table-row[data-grid-row-index] [tabindex]", P = () => {
7
+ const s = e?.value?.$el;
8
+ return s ? s.closest(".k-grid") : null;
9
+ }, N = (s) => {
10
+ const k = P();
11
11
  if (!k) return !1;
12
- const y = u.closest(".k-grid-aria-root");
13
- if (y)
14
- return k.contains(y);
15
- const w = u.closest(
12
+ const g = s.closest(".k-grid-aria-root");
13
+ if (g)
14
+ return k.contains(g);
15
+ const b = s.closest(
16
16
  ".k-grid-header, .k-grid-content, .k-grid-content-locked"
17
17
  );
18
- return w ? k.contains(w) : !1;
19
- }, E = (u) => u.key === "Enter" || u.code === "Enter" || u.code === "NumpadEnter", $ = () => e?.value?.columns, x = (u) => {
20
- const k = u.key || u.code;
21
- ([" ", "Spacebar", "Space"].includes(k) || E(u)) && (u.preventDefault(), u.stopPropagation(), r.value = u.target, u.target.click());
22
- }, D = (u) => {
18
+ return b ? k.contains(b) : !1;
19
+ }, x = (s) => s.key === "Enter" || s.code === "Enter" || s.code === "NumpadEnter", V = () => e?.value?.columns, M = (s) => {
20
+ const k = s.key || s.code;
21
+ ([" ", "Spacebar", "Space"].includes(k) || x(s)) && (s.preventDefault(), s.stopPropagation(), r.value = s.target, s.target.click());
22
+ }, E = (s) => {
23
23
  if (!r.value) return;
24
- if (u.code === "Escape") {
25
- u.stopPropagation(), r.value && r.value.focus();
24
+ if (s.code === "Escape") {
25
+ s.stopPropagation(), r.value && r.value.focus();
26
26
  return;
27
27
  }
28
28
  const k = Array.from(
29
29
  document.querySelectorAll(
30
30
  ".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"
31
31
  )
32
- ), y = document.querySelector(
32
+ ), g = document.querySelector(
33
33
  ".k-animation-container .k-popup .k-column-menu .k-filter-menu-container"
34
34
  );
35
- if (y) {
36
- if (u.code === "Tab") {
37
- const w = [
35
+ if (g) {
36
+ if (s.code === "Tab") {
37
+ const b = [
38
38
  // ".k-filter-menu-container .k-dropdownlist[tabindex='0']",
39
39
  // ".k-filter-menu-container input.k-input-inner:not([tabindex='-1']):not([disabled])",
40
40
  // ".k-filter-menu-container button:not([tabindex='-1']):not([disabled])",
@@ -43,129 +43,129 @@ const vt = (e, t) => {
43
43
  "input.k-input-inner:not([tabindex='-1']):not([disabled])",
44
44
  "button:not([tabindex='-1']):not([disabled])",
45
45
  ".k-checkbox"
46
- ], T = t?.focusableMenuSelectors ?? w, l = Array.from(
47
- y.querySelectorAll(T.join(","))
46
+ ], R = t?.focusableMenuSelectors ?? b, A = Array.from(
47
+ g.querySelectorAll(R.join(","))
48
48
  );
49
- if (l.length === 0) return;
50
- const p = l.findIndex(
51
- (U) => U === document.activeElement
49
+ if (A.length === 0) return;
50
+ const $ = A.findIndex(
51
+ (f) => f === document.activeElement
52
52
  );
53
- let V;
54
- p === -1 ? V = 0 : u.shiftKey ? V = (p - 1 + l.length) % l.length : V = (p + 1) % l.length, u.preventDefault(), u.stopPropagation(), l[V]?.focus();
53
+ let B;
54
+ $ === -1 ? B = 0 : s.shiftKey ? B = ($ - 1 + A.length) % A.length : B = ($ + 1) % A.length, s.preventDefault(), s.stopPropagation(), A[B]?.focus();
55
55
  }
56
- } else if (u.code === "ArrowUp" || u.code === "ArrowDown") {
57
- u.preventDefault(), u.stopPropagation();
58
- const w = k.findIndex(
59
- (l) => l === document.activeElement
56
+ } else if (s.code === "ArrowUp" || s.code === "ArrowDown") {
57
+ s.preventDefault(), s.stopPropagation();
58
+ const b = k.findIndex(
59
+ (A) => A === document.activeElement
60
60
  );
61
- let T = w;
62
- u.code === "ArrowUp" ? T = w > 0 ? w - 1 : k.length - 1 : u.code === "ArrowDown" && (T = w < k.length - 1 ? w + 1 : 0), k[T]?.focus();
61
+ let R = b;
62
+ s.code === "ArrowUp" ? R = b > 0 ? b - 1 : k.length - 1 : s.code === "ArrowDown" && (R = b < k.length - 1 ? b + 1 : 0), k[R]?.focus();
63
63
  return;
64
64
  }
65
- if (u.code === "Tab") {
66
- u.preventDefault(), u.stopPropagation();
67
- const w = r.value?.parentElement;
68
- (u.shiftKey ? w?.previousElementSibling : w?.nextElementSibling)?.querySelector(
65
+ if (s.code === "Tab") {
66
+ s.preventDefault(), s.stopPropagation();
67
+ const b = r.value?.parentElement;
68
+ (s.shiftKey ? b?.previousElementSibling : b?.nextElementSibling)?.querySelector(
69
69
  "button, [role='button'], .k-link"
70
70
  )?.focus();
71
71
  }
72
- }, C = () => {
73
- s = new MutationObserver((u) => {
74
- u.forEach((k) => {
75
- k.addedNodes.forEach((y) => {
76
- if (y.nodeType === Node.ELEMENT_NODE) {
77
- const w = y;
78
- if (w.classList.contains("k-animation-container")) {
79
- const l = r.value;
80
- l && (l.dataset.featherKSortable === "true" || H(() => {
81
- w.querySelectorAll(
72
+ }, F = () => {
73
+ l = new MutationObserver((s) => {
74
+ s.forEach((k) => {
75
+ k.addedNodes.forEach((g) => {
76
+ if (g.nodeType === Node.ELEMENT_NODE) {
77
+ const b = g;
78
+ if (b.classList.contains("k-animation-container")) {
79
+ const A = r.value;
80
+ A && (A.dataset.featherKSortable === "true" || j(() => {
81
+ b.querySelectorAll(
82
82
  ".k-columnmenu-item-wrapper"
83
- ).forEach((U) => {
84
- U.textContent?.toLowerCase().includes("sort") && U.remove();
83
+ ).forEach((f) => {
84
+ f.textContent?.toLowerCase().includes("sort") && f.remove();
85
85
  });
86
- })), w.addEventListener(
86
+ })), b.addEventListener(
87
87
  "keydown",
88
- D
89
- ), H(() => {
90
- const p = () => {
91
- const V = Array.from(
92
- w.querySelectorAll(
88
+ E
89
+ ), j(() => {
90
+ const $ = () => {
91
+ const B = Array.from(
92
+ b.querySelectorAll(
93
93
  ".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"
94
94
  )
95
95
  );
96
- if (V.length === 1)
97
- V[0].focus(), V[0].click(), p.attempts = 0;
98
- else if (V.length > 1) {
99
- p.attempts = 0;
96
+ if (B.length === 1)
97
+ B[0].focus(), B[0].click(), $.attempts = 0;
98
+ else if (B.length > 1) {
99
+ $.attempts = 0;
100
100
  return;
101
101
  } else
102
- p.attempts === void 0 && (p.attempts = 0), p.attempts++ < 3 && setTimeout(p, 200);
102
+ $.attempts === void 0 && ($.attempts = 0), $.attempts++ < 3 && setTimeout($, 200);
103
103
  };
104
- p();
104
+ $();
105
105
  });
106
106
  }
107
- w.querySelectorAll(
107
+ b.querySelectorAll(
108
108
  ".k-animation-container"
109
- ).forEach((l) => {
110
- l.addEventListener(
109
+ ).forEach((A) => {
110
+ A.addEventListener(
111
111
  "keydown",
112
- D
112
+ E
113
113
  );
114
114
  });
115
115
  }
116
- }), k.removedNodes.forEach((y) => {
117
- if (y.nodeType === Node.ELEMENT_NODE) {
118
- const w = y;
119
- w.classList.contains("k-animation-container") && w.removeEventListener(
116
+ }), k.removedNodes.forEach((g) => {
117
+ if (g.nodeType === Node.ELEMENT_NODE) {
118
+ const b = g;
119
+ b.classList.contains("k-animation-container") && b.removeEventListener(
120
120
  "keydown",
121
- D
122
- ), w.querySelectorAll(
121
+ E
122
+ ), b.querySelectorAll(
123
123
  ".k-animation-container"
124
- ).forEach((l) => {
125
- l.removeEventListener(
124
+ ).forEach((A) => {
125
+ A.removeEventListener(
126
126
  "keydown",
127
- D
127
+ E
128
128
  );
129
129
  });
130
130
  }
131
131
  });
132
132
  });
133
- }), s.observe(document.body, {
133
+ }), l.observe(document.body, {
134
134
  childList: !0,
135
135
  subtree: !0
136
136
  });
137
- }, c = (u) => {
138
- const k = u.tagName.toLowerCase();
139
- return !!(["input", "textarea", "select", "button"].includes(k) || u.closest(
137
+ }, u = (s) => {
138
+ const k = s.tagName.toLowerCase();
139
+ return !!(["input", "textarea", "select", "button"].includes(k) || s.closest(
140
140
  '.k-picker-wrap, .k-input-inner, .k-textbox, [role="combobox"]'
141
141
  ));
142
- }, i = (u) => {
143
- if (!u.type || !u)
142
+ }, i = (s) => {
143
+ if (!s.type || !s)
144
144
  return;
145
- const k = u.target;
145
+ const k = s.target;
146
146
  if (!k) return;
147
- const y = k.closest(
147
+ const g = k.closest(
148
148
  ".k-table-row[data-grid-row-index]"
149
149
  );
150
150
  if (!N(k))
151
151
  return;
152
- const w = ["ArrowLeft", "ArrowRight"].includes(
153
- u.code
152
+ const b = ["ArrowLeft", "ArrowRight"].includes(
153
+ s.code
154
154
  );
155
- if (!(c(k) && !(y && w))) {
156
- if (u.code === "Escape") {
157
- const T = document.activeElement?.closest(".k-table-row[data-grid-row-index]");
158
- if (T) {
159
- u.preventDefault(), u.stopPropagation();
155
+ if (!(u(k) && !(g && b))) {
156
+ if (s.code === "Escape") {
157
+ const R = document.activeElement?.closest(".k-table-row[data-grid-row-index]");
158
+ if (R) {
159
+ s.preventDefault(), s.stopPropagation();
160
160
  try {
161
161
  Array.from(
162
162
  e?.value.$el.querySelectorAll(
163
163
  ".k-table-row[data-grid-row-index]"
164
164
  )
165
- ).forEach((p) => p.setAttribute("tabindex", "-1"));
165
+ ).forEach(($) => $.setAttribute("tabindex", "-1"));
166
166
  } catch {
167
167
  }
168
- T.setAttribute("tabindex", "0"), T.focus();
168
+ R.setAttribute("tabindex", "0"), R.focus();
169
169
  return;
170
170
  }
171
171
  }
@@ -177,219 +177,219 @@ const vt = (e, t) => {
177
177
  "Enter",
178
178
  "NumpadEnter",
179
179
  "Space"
180
- ].includes(u.code)) {
180
+ ].includes(s.code)) {
181
181
  if (k.classList.contains("k-grid-header-menu") && k.classList.contains("k-grid-column-menu")) {
182
182
  r.value = k;
183
183
  return;
184
184
  }
185
- if (y) {
186
- if (["ArrowDown", "ArrowUp"].includes(u.code)) {
187
- u.preventDefault(), u.stopPropagation();
188
- const T = (p, V) => {
189
- let U = V === "next" ? p.nextElementSibling : p.previousElementSibling;
190
- for (; U; ) {
191
- const ae = U;
185
+ if (g) {
186
+ if (["ArrowDown", "ArrowUp"].includes(s.code)) {
187
+ s.preventDefault(), s.stopPropagation();
188
+ const R = ($, B) => {
189
+ let f = B === "next" ? $.nextElementSibling : $.previousElementSibling;
190
+ for (; f; ) {
191
+ const I = f;
192
192
  try {
193
- if (ae.classList.contains("k-table-row"))
194
- return ae;
193
+ if (I.classList.contains("k-table-row"))
194
+ return I;
195
195
  } catch {
196
196
  }
197
- U = V === "next" ? U.nextElementSibling : U.previousElementSibling;
197
+ f = B === "next" ? f.nextElementSibling : f.previousElementSibling;
198
198
  }
199
199
  return null;
200
- }, l = u.code === "ArrowDown" ? T(y, "next") : T(y, "previous");
201
- l && (y.setAttribute("tabindex", "-1"), l.setAttribute("tabindex", "0"), l.focus());
200
+ }, A = s.code === "ArrowDown" ? R(g, "next") : R(g, "previous");
201
+ A && (g.setAttribute("tabindex", "-1"), A.setAttribute("tabindex", "0"), A.focus());
202
202
  return;
203
203
  }
204
- if (["ArrowLeft", "ArrowRight"].includes(u.code)) {
205
- u.preventDefault(), u.stopPropagation();
206
- const T = y.querySelectorAll(
207
- I
204
+ if (["ArrowLeft", "ArrowRight"].includes(s.code)) {
205
+ s.preventDefault(), s.stopPropagation();
206
+ const R = g.querySelectorAll(
207
+ D
208
208
  );
209
- if (T.length === 0) return;
210
- let l = Array.from(T).findIndex(
211
- (p) => p === document.activeElement
209
+ if (R.length === 0) return;
210
+ let A = Array.from(R).findIndex(
211
+ ($) => $ === document.activeElement
212
212
  );
213
- if (l === -1 && document.activeElement === y) {
214
- T[0].focus();
213
+ if (A === -1 && document.activeElement === g) {
214
+ R[0].focus();
215
215
  return;
216
216
  }
217
- u.code === "ArrowRight" ? l = l === T.length - 1 ? 0 : l + 1 : u.code === "ArrowLeft" && (l = l === 0 ? T.length - 1 : l - 1), T[l].focus();
217
+ s.code === "ArrowRight" ? A = A === R.length - 1 ? 0 : A + 1 : s.code === "ArrowLeft" && (A = A === 0 ? R.length - 1 : A - 1), R[A].focus();
218
218
  return;
219
219
  }
220
220
  }
221
221
  }
222
222
  }
223
- }, m = () => {
224
- H(() => {
225
- const u = e.value?.$el;
226
- if (!u || typeof u.closest != "function") return;
227
- const k = u.closest(".k-grid");
223
+ }, p = () => {
224
+ j(() => {
225
+ const s = e.value?.$el;
226
+ if (!s || typeof s.closest != "function") return;
227
+ const k = s.closest(".k-grid");
228
228
  k && k.classList.add("fk-grid");
229
229
  });
230
230
  }, S = () => {
231
- if (!f)
231
+ if (!d)
232
232
  try {
233
- const u = () => {
233
+ const s = () => {
234
234
  try {
235
- const w = Array.from(
235
+ const b = Array.from(
236
236
  e.value.$el.querySelectorAll(
237
237
  ".k-table-row[data-grid-row-index]"
238
238
  )
239
239
  );
240
- if (!w || w.length === 0 || w.filter(
241
- (p) => p.getAttribute("tabindex") === "0"
240
+ if (!b || b.length === 0 || b.filter(
241
+ ($) => $.getAttribute("tabindex") === "0"
242
242
  ).length === 1) return;
243
- const l = w.find(
244
- (p) => p === document.activeElement || p.contains(document.activeElement)
243
+ const A = b.find(
244
+ ($) => $ === document.activeElement || $.contains(document.activeElement)
245
245
  );
246
- if (w.forEach((p) => p.setAttribute("tabindex", "-1")), l) {
247
- l.setAttribute("tabindex", "0");
246
+ if (b.forEach(($) => $.setAttribute("tabindex", "-1")), A) {
247
+ A.setAttribute("tabindex", "0");
248
248
  return;
249
249
  }
250
- w[0].setAttribute("tabindex", "0");
251
- } catch (w) {
252
- console.error("ensureSingleTabindex error:", w);
250
+ b[0].setAttribute("tabindex", "0");
251
+ } catch (b) {
252
+ console.error("ensureSingleTabindex error:", b);
253
253
  }
254
254
  }, k = Array.from(
255
255
  e.value.$el.querySelectorAll(
256
256
  ".k-table-row[data-grid-row-index]"
257
257
  )
258
258
  );
259
- k.length > 0 && k.forEach((w, T) => {
260
- w.setAttribute("tabindex", T === 0 ? "0" : "-1");
259
+ k.length > 0 && k.forEach((b, R) => {
260
+ b.setAttribute("tabindex", R === 0 ? "0" : "-1");
261
261
  });
262
- const y = e.value.$el.querySelector(".k-table-tbody");
263
- y && (f = new MutationObserver(() => {
264
- u();
265
- }), f.observe(y, { childList: !0, subtree: !0 }));
266
- } catch (u) {
267
- console.error("Error setting up row navigation:", u);
262
+ const g = e.value.$el.querySelector(".k-table-tbody");
263
+ g && (d = new MutationObserver(() => {
264
+ s();
265
+ }), d.observe(g, { childList: !0, subtree: !0 }));
266
+ } catch (s) {
267
+ console.error("Error setting up row navigation:", s);
268
268
  }
269
- }, R = () => {
270
- H(() => {
269
+ }, L = () => {
270
+ j(() => {
271
271
  const k = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
272
- k && k.forEach((y) => {
273
- y.setAttribute("role", "button"), y.addEventListener(
272
+ k && k.forEach((g) => {
273
+ g.setAttribute("role", "button"), g.addEventListener(
274
274
  "keydown",
275
- x
275
+ M
276
276
  );
277
- }), C(), q();
277
+ }), F(), q();
278
278
  });
279
- }, K = () => {
279
+ }, H = () => {
280
280
  const k = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
281
- k && k.forEach((y) => {
282
- y.removeEventListener(
281
+ k && k.forEach((g) => {
282
+ g.removeEventListener(
283
283
  "keydown",
284
- x
284
+ M
285
285
  );
286
- }), s && (s.disconnect(), s = null), f && (f.disconnect(), f = null), A.forEach((y) => y()), A.length = 0;
286
+ }), l && (l.disconnect(), l = null), d && (d.disconnect(), d = null), w.forEach((g) => g()), w.length = 0;
287
287
  }, q = () => {
288
288
  document.querySelectorAll(
289
289
  ".k-grid-header .k-table-thead th"
290
- ).forEach((y, w) => {
291
- if (y.dataset.featherKHeaderBound === "true")
290
+ ).forEach((g, b) => {
291
+ if (g.dataset.featherKHeaderBound === "true")
292
292
  return;
293
- const T = y.querySelector(
293
+ const R = g.querySelector(
294
294
  ".k-grid-header-menu.k-grid-column-menu"
295
295
  );
296
- if (!T) return;
297
- const l = $();
298
- if (l && l[w]) {
299
- const a = l[w].field ?? "";
300
- y.setAttribute("data-feather-k-field", a), y.setAttribute(
296
+ if (!R) return;
297
+ const A = V();
298
+ if (A && A[b]) {
299
+ const n = A[b].field ?? "";
300
+ g.setAttribute("data-feather-k-field", n), g.setAttribute(
301
301
  "data-feather-k-filterable",
302
- l[w].filterable === !1 ? "false" : "true"
303
- ), y.setAttribute(
302
+ A[b].filterable === !1 ? "false" : "true"
303
+ ), g.setAttribute(
304
304
  "data-feather-k-sortable",
305
- l[w].sortable === !1 ? "false" : "true"
305
+ A[b].sortable === !1 ? "false" : "true"
306
306
  );
307
307
  }
308
- const p = y.dataset.featherKFilterable !== "false", V = y.dataset.featherKSortable !== "false";
309
- T.setAttribute("tabindex", "-1"), p || V ? y.style.cursor = "pointer" : y.style.cursor = "default", p ? (y.setAttribute("tabindex", "0"), y.setAttribute("role", "button"), y.setAttribute("aria-haspopup", "menu")) : (y.setAttribute("tabindex", "0"), y.setAttribute("role", "columnheader"), y.removeAttribute("aria-haspopup"));
310
- const U = (a) => {
311
- a.target?.closest(".k-column-resizer") || (r.value = y, T.click());
312
- }, ae = (a) => {
313
- if (p)
314
- r.value = y, a.preventDefault(), a.stopPropagation(), U(a);
315
- else if (V) {
316
- r.value = y;
317
- const b = y.querySelector(".k-link");
318
- b && b.click();
308
+ const $ = g.dataset.featherKFilterable !== "false", B = g.dataset.featherKSortable !== "false";
309
+ R.setAttribute("tabindex", "-1"), $ || B ? g.style.cursor = "pointer" : g.style.cursor = "default", $ ? (g.setAttribute("tabindex", "0"), g.setAttribute("role", "button"), g.setAttribute("aria-haspopup", "menu")) : (g.setAttribute("tabindex", "0"), g.setAttribute("role", "columnheader"), g.removeAttribute("aria-haspopup"));
310
+ const f = (n) => {
311
+ n.target?.closest(".k-column-resizer") || (r.value = g, R.click());
312
+ }, I = (n) => {
313
+ if ($)
314
+ r.value = g, n.preventDefault(), n.stopPropagation(), f(n);
315
+ else if (B) {
316
+ r.value = g;
317
+ const y = g.querySelector(".k-link");
318
+ y && y.click();
319
319
  }
320
320
  };
321
- y.addEventListener("click", ae), A.push(() => {
322
- y.removeEventListener("click", ae);
321
+ g.addEventListener("click", I), w.push(() => {
322
+ g.removeEventListener("click", I);
323
323
  });
324
- const ne = (a) => {
325
- if ((E(a) || a.code === "Space") && (p || V)) {
326
- if (a.preventDefault(), a.stopPropagation(), r.value = y, r.value.focus(), p)
327
- U(a);
328
- else if (V) {
329
- const b = y.querySelector(".k-link");
330
- b && b.click();
324
+ const ee = (n) => {
325
+ if ((x(n) || n.code === "Space") && ($ || B)) {
326
+ if (n.preventDefault(), n.stopPropagation(), r.value = g, r.value.focus(), $)
327
+ f(n);
328
+ else if (B) {
329
+ const y = g.querySelector(".k-link");
330
+ y && y.click();
331
331
  }
332
332
  }
333
333
  };
334
- y.addEventListener("keydown", ne, !0), A.push(() => {
335
- y.removeEventListener("keydown", ne, !0);
336
- }), y.dataset.featherKHeaderBound = "true";
334
+ g.addEventListener("keydown", ee, !0), w.push(() => {
335
+ g.removeEventListener("keydown", ee, !0);
336
+ }), g.dataset.featherKHeaderBound = "true";
337
337
  });
338
338
  const k = document.querySelector(".k-grid-header .k-table-thead");
339
339
  if (k && k.dataset.featherKHeaderBound !== "true") {
340
- const y = (w) => {
341
- const T = w.target.closest("th");
342
- T && (E(w) || w.code === "Space") && T.dataset.featherKFilterable === "false" && T.dataset.featherKSortable === "false" && (w.preventDefault(), w.stopImmediatePropagation());
340
+ const g = (b) => {
341
+ const R = b.target.closest("th");
342
+ R && (x(b) || b.code === "Space") && R.dataset.featherKFilterable === "false" && R.dataset.featherKSortable === "false" && (b.preventDefault(), b.stopImmediatePropagation());
343
343
  };
344
344
  k.addEventListener(
345
345
  "keydown",
346
- y,
346
+ g,
347
347
  !0
348
348
  // NOTE: capture phase
349
- ), A.push(() => {
349
+ ), w.push(() => {
350
350
  k.removeEventListener(
351
351
  "keydown",
352
- y,
352
+ g,
353
353
  !0
354
354
  );
355
355
  }), k.dataset.featherKHeaderBound = "true";
356
356
  }
357
- }, X = function(u, k) {
358
- const y = u?.event?.event.target, w = $();
359
- if (!y || !w) return;
360
- const T = y.classList.contains("k-grid-header-menu"), l = y.classList.contains("k-columnmenu-item"), p = w.find((V) => V.field === u?.event?.field)?.sortable && !0;
361
- if (!T) {
362
- if (l && !p) {
363
- u?.event?.sort?.filter(
364
- (U) => U.field !== u?.event?.field
357
+ }, Y = function(s, k) {
358
+ const g = s?.event?.event.target, b = V();
359
+ if (!g || !b) return;
360
+ const R = g.classList.contains("k-grid-header-menu"), A = g.classList.contains("k-columnmenu-item"), $ = b.find((B) => B.field === s?.event?.field)?.sortable && !0;
361
+ if (!R) {
362
+ if (A && !$) {
363
+ s?.event?.sort?.filter(
364
+ (f) => f.field !== s?.event?.field
365
365
  );
366
366
  return;
367
367
  }
368
- typeof k == "function" && H(() => {
369
- r.value && r.value.focus(), k(u), H(() => {
368
+ typeof k == "function" && j(() => {
369
+ r.value && r.value.focus(), k(s), j(() => {
370
370
  q();
371
371
  });
372
372
  });
373
373
  }
374
- }, ee = () => {
375
- if (!g)
374
+ }, J = () => {
375
+ if (!v)
376
376
  try {
377
- m(), S(), R(), g = !0;
378
- } catch (u) {
379
- console.error("initA11y failed:", u), K();
377
+ p(), S(), L(), v = !0;
378
+ } catch (s) {
379
+ console.error("initA11y failed:", s), H();
380
380
  }
381
381
  };
382
382
  return Ve(() => {
383
- K();
383
+ H();
384
384
  }), {
385
385
  activeFilterButton: r,
386
386
  handleGridKeyDown: i,
387
- handleSortChange: X,
388
- initA11y: ee
387
+ handleSortChange: Y,
388
+ initA11y: J
389
389
  };
390
- }, Be = (e) => !!e && typeof e == "object" && "filters" in e && Array.isArray(e.filters), Ye = (e) => !!e && typeof e == "object" && "field" in e, $e = (e, t) => !e || typeof e != "object" ? !1 : Be(e) ? e.filters.some(
390
+ }, Ye = (e) => !!e && typeof e == "object" && "filters" in e && Array.isArray(e.filters), Be = (e) => !!e && typeof e == "object" && "field" in e, $e = (e, t) => !e || typeof e != "object" ? !1 : Ye(e) ? e.filters.some(
391
391
  (r) => $e(r, t)
392
- ) : Ye(e) ? e.field === t : !1, gt = (e) => (t) => e.value?.filters && e.value.filters.some(
392
+ ) : Be(e) ? e.field === t : !1, gt = (e) => (t) => e.value?.filters && e.value.filters.some(
393
393
  (r) => $e(r, t)
394
394
  ) ? "active" : "", ze = [
395
395
  "button",
@@ -413,220 +413,220 @@ const vt = (e, t) => {
413
413
  const {
414
414
  onRowAction: t,
415
415
  gridRef: r,
416
- dataItems: g,
417
- ignoreSelectors: s = [],
418
- shouldIgnoreTarget: f,
419
- enableKeyboardAction: A = !0
420
- } = e, I = [
416
+ dataItems: v,
417
+ ignoreSelectors: l = [],
418
+ shouldIgnoreTarget: d,
419
+ enableKeyboardAction: w = !0
420
+ } = e, D = [
421
421
  ...ze,
422
- ...s
423
- ], F = (c, i) => {
424
- if (!c) return !1;
425
- const m = I.join(",");
426
- return c.closest && c.closest(m) ? !0 : f && i ? f(c, i) : !1;
427
- }, N = (c) => {
428
- const m = c?.closest?.(
422
+ ...l
423
+ ], P = (u, i) => {
424
+ if (!u) return !1;
425
+ const p = D.join(",");
426
+ return u.closest && u.closest(p) ? !0 : d && i ? d(u, i) : !1;
427
+ }, N = (u) => {
428
+ const p = u?.closest?.(
429
429
  ".k-table-row[data-grid-row-index]"
430
430
  )?.getAttribute("data-grid-row-index");
431
- if (m == null) return;
432
- const S = parseInt(m, 10);
431
+ if (p == null) return;
432
+ const S = parseInt(p, 10);
433
433
  return Number.isNaN(S) ? void 0 : S;
434
- }, E = (c) => {
435
- if (!c || typeof c.clientX != "number")
434
+ }, x = (u) => {
435
+ if (!u || typeof u.clientX != "number")
436
436
  return;
437
- const i = typeof window < "u" && window.scrollX || 0, m = typeof window < "u" && window.scrollY || 0, S = typeof window < "u" && window.screenX || 0, R = typeof window < "u" && window.screenY || 0;
437
+ const i = typeof window < "u" && window.scrollX || 0, p = typeof window < "u" && window.scrollY || 0, S = typeof window < "u" && window.screenX || 0, L = typeof window < "u" && window.screenY || 0;
438
438
  return {
439
- clientX: c.clientX,
440
- clientY: c.clientY,
441
- pageX: typeof c.pageX == "number" ? c.pageX : c.clientX + i,
442
- pageY: typeof c.pageY == "number" ? c.pageY : c.clientY + m,
443
- screenX: typeof c.screenX == "number" ? c.screenX : c.clientX + S,
444
- screenY: typeof c.screenY == "number" ? c.screenY : c.clientY + R
439
+ clientX: u.clientX,
440
+ clientY: u.clientY,
441
+ pageX: typeof u.pageX == "number" ? u.pageX : u.clientX + i,
442
+ pageY: typeof u.pageY == "number" ? u.pageY : u.clientY + p,
443
+ screenX: typeof u.screenX == "number" ? u.screenX : u.clientX + S,
444
+ screenY: typeof u.screenY == "number" ? u.screenY : u.clientY + L
445
445
  };
446
- }, $ = (c) => {
447
- if (!c || typeof c.getBoundingClientRect != "function")
446
+ }, V = (u) => {
447
+ if (!u || typeof u.getBoundingClientRect != "function")
448
448
  return;
449
- const i = c.getBoundingClientRect();
449
+ const i = u.getBoundingClientRect();
450
450
  if (!i) return;
451
- const m = i.left, S = i.bottom, R = typeof window < "u" && window.scrollX || 0, K = typeof window < "u" && window.scrollY || 0;
451
+ const p = i.left, S = i.bottom, L = typeof window < "u" && window.scrollX || 0, H = typeof window < "u" && window.scrollY || 0;
452
452
  return {
453
- clientX: m,
453
+ clientX: p,
454
454
  clientY: S,
455
- pageX: m + R,
456
- pageY: S + K,
457
- screenX: m,
455
+ pageX: p + L,
456
+ pageY: S + H,
457
+ screenX: p,
458
458
  screenY: S
459
459
  };
460
- }, x = (c) => {
460
+ }, M = (u) => {
461
461
  if (typeof window > "u") return !1;
462
462
  const i = window.getSelection();
463
463
  if (!i || i.isCollapsed || !i.toString().trim())
464
464
  return !1;
465
- if (c && i.anchorNode && i.focusNode) {
466
- const m = c.closest(".k-table-row") || c.closest(".k-grid") || c, S = i.anchorNode.nodeType === Node.ELEMENT_NODE ? i.anchorNode : i.anchorNode.parentElement, R = i.focusNode.nodeType === Node.ELEMENT_NODE ? i.focusNode : i.focusNode.parentElement, K = !!(S && m.contains(S)), q = !!(R && m.contains(R));
467
- return K || q;
465
+ if (u && i.anchorNode && i.focusNode) {
466
+ const p = u.closest(".k-table-row") || u.closest(".k-grid") || u, S = i.anchorNode.nodeType === Node.ELEMENT_NODE ? i.anchorNode : i.anchorNode.parentElement, L = i.focusNode.nodeType === Node.ELEMENT_NODE ? i.focusNode : i.focusNode.parentElement, H = !!(S && p.contains(S)), q = !!(L && p.contains(L));
467
+ return H || q;
468
468
  }
469
469
  return !0;
470
470
  };
471
471
  return {
472
- handleRowClick: (c) => {
473
- const i = c?.htmlEvent || c?.event || c?.nativeEvent || (c instanceof Event ? c : void 0);
472
+ handleRowClick: (u) => {
473
+ const i = u?.htmlEvent || u?.event || u?.nativeEvent || (u instanceof Event ? u : void 0);
474
474
  if (i && i.button !== void 0 && i.button !== 0)
475
475
  return;
476
- const m = i?.target || c?.target;
477
- if (m && F(m, i || c) || x(m))
476
+ const p = i?.target || u?.target;
477
+ if (p && P(p, i || u) || M(p))
478
478
  return;
479
479
  const S = {
480
- dataItem: c.dataItem,
481
- rowIndex: c.rowIndex ?? N(m),
482
- field: c.field,
483
- event: i || c,
480
+ dataItem: u.dataItem,
481
+ rowIndex: u.rowIndex ?? N(p),
482
+ field: u.field,
483
+ event: i || u,
484
484
  triggerType: "click",
485
485
  ctrlKey: !!i?.ctrlKey,
486
486
  shiftKey: !!i?.shiftKey,
487
487
  metaKey: !!i?.metaKey,
488
488
  altKey: !!i?.altKey,
489
- coordinates: E(i) ?? $(m)
489
+ coordinates: x(i) ?? V(p)
490
490
  };
491
- t(c.dataItem, S);
491
+ t(u.dataItem, S);
492
492
  },
493
- handleRowKeyDown: (c, i) => {
494
- if (!A) return;
495
- const m = c.key || c.code;
496
- if (!(m === "Enter" || m === "NumpadEnter" || m === " " || m === "Space" || c.code === "Enter" || c.code === "NumpadEnter" || c.code === "Space")) return;
497
- const R = c.target;
498
- if (!R) return;
499
- const K = R.closest(
493
+ handleRowKeyDown: (u, i) => {
494
+ if (!w) return;
495
+ const p = u.key || u.code;
496
+ if (!(p === "Enter" || p === "NumpadEnter" || p === " " || p === "Space" || u.code === "Enter" || u.code === "NumpadEnter" || u.code === "Space")) return;
497
+ const L = u.target;
498
+ if (!L) return;
499
+ const H = L.closest(
500
500
  ".k-table-row[data-grid-row-index], .k-table-row"
501
501
  );
502
- if (!K || F(R, c))
502
+ if (!H || P(L, u))
503
503
  return;
504
- c.preventDefault(), c.stopPropagation();
505
- const q = K.getAttribute("data-grid-row-index"), X = q !== null ? parseInt(q, 10) : void 0;
506
- let ee = i;
507
- if (ee === void 0) {
508
- const k = (Array.isArray(g) ? g : g?.value) || r?.value?.props?.dataItems || r?.value?.dataItems;
509
- k && X !== void 0 && X >= 0 && X < k.length && (ee = k[X]);
504
+ u.preventDefault(), u.stopPropagation();
505
+ const q = H.getAttribute("data-grid-row-index"), Y = q !== null ? parseInt(q, 10) : void 0;
506
+ let J = i;
507
+ if (J === void 0) {
508
+ const k = (Array.isArray(v) ? v : v?.value) || r?.value?.props?.dataItems || r?.value?.dataItems;
509
+ k && Y !== void 0 && Y >= 0 && Y < k.length && (J = k[Y]);
510
510
  }
511
- if (ee === void 0) return;
512
- const u = {
513
- dataItem: ee,
514
- rowIndex: X,
515
- event: c,
511
+ if (J === void 0) return;
512
+ const s = {
513
+ dataItem: J,
514
+ rowIndex: Y,
515
+ event: u,
516
516
  triggerType: "keyboard",
517
- ctrlKey: !!c.ctrlKey,
518
- shiftKey: !!c.shiftKey,
519
- metaKey: !!c.metaKey,
520
- altKey: !!c.altKey,
521
- coordinates: $(K)
517
+ ctrlKey: !!u.ctrlKey,
518
+ shiftKey: !!u.shiftKey,
519
+ metaKey: !!u.metaKey,
520
+ altKey: !!u.altKey,
521
+ coordinates: V(H)
522
522
  };
523
- t(ee, u);
523
+ t(J, s);
524
524
  },
525
- isIgnoredTarget: F
525
+ isIgnoredTarget: P
526
526
  };
527
527
  }, He = "Enter a valid ZIP code with exactly 5 or 9 digits.", Re = (e) => {
528
528
  const t = e.replace(/\D/g, "").slice(0, 9);
529
529
  return t.length > 5 ? `${t.slice(0, 5)}-${t.slice(5)}` : t;
530
530
  }, Xe = (e, t) => e.slice(0, Math.max(0, t)).replace(/\D/g, "").length, Ze = (e) => e <= 5 ? e : Math.min(e + 1, 10), We = (e) => {
531
- const t = Y(Re(e.initialValue ?? "")), r = Y(!1), g = Y(
531
+ const t = Z(Re(e.initialValue ?? "")), r = Z(!1), v = Z(
532
532
  e.errorMessage?.trim() || He
533
- ), s = h(() => t.value.replace(/\D/g, "")), f = h(() => {
534
- const D = s.value.length;
535
- return D === 5 || D === 9;
536
- }), A = h(() => r.value && !f.value), I = h(() => !r.value || f.value), F = h(() => r.value), N = (D, C) => {
537
- const c = Ze(C);
538
- H(() => {
539
- D.isConnected && D.setSelectionRange(c, c);
533
+ ), l = h(() => t.value.replace(/\D/g, "")), d = h(() => {
534
+ const E = l.value.length;
535
+ return E === 5 || E === 9;
536
+ }), w = h(() => r.value && !d.value), D = h(() => !r.value || d.value), P = h(() => r.value), N = (E, F) => {
537
+ const u = Ze(F);
538
+ j(() => {
539
+ E.isConnected && E.setSelectionRange(u, u);
540
540
  });
541
541
  };
542
542
  return {
543
543
  // writable state
544
544
  zipDisplay: t,
545
545
  submitted: r,
546
- errorMessage: g,
546
+ errorMessage: v,
547
547
  // bindings
548
548
  wrapperClass: "fk-zip-textbox",
549
549
  // derived state
550
- zipRaw: s,
551
- isZipValid: f,
552
- showZipError: A,
553
- textBoxValid: I,
554
- textBoxValidate: F,
550
+ zipRaw: l,
551
+ isZipValid: d,
552
+ showZipError: w,
553
+ textBoxValid: D,
554
+ textBoxValidate: P,
555
555
  // actions
556
- handleZipInput: (...D) => {
557
- const C = D[0], i = C?.event?.target, m = C?.value, S = Array.isArray(m) ? m.join("") : String(m ?? ""), R = i?.selectionStart !== void 0 && i.selectionStart !== null ? Xe(
556
+ handleZipInput: (...E) => {
557
+ const F = E[0], i = F?.event?.target, p = F?.value, S = Array.isArray(p) ? p.join("") : String(p ?? ""), L = i?.selectionStart !== void 0 && i.selectionStart !== null ? Xe(
558
558
  i.value,
559
559
  i.selectionStart
560
560
  ) : S.replace(/\D/g, "").length;
561
- t.value = Re(S), i && N(i, R);
561
+ t.value = Re(S), i && N(i, L);
562
562
  },
563
- submitAndValidate: (D) => {
563
+ submitAndValidate: (E) => {
564
564
  r.value = !0;
565
- const C = f.value;
566
- return !C && D?.focus && H(() => {
565
+ const F = d.value;
566
+ return !F && E?.focus && j(() => {
567
567
  document.getElementById(
568
568
  e.id
569
569
  )?.focus();
570
- }), C;
570
+ }), F;
571
571
  },
572
- buildPayload: () => ({ zip: s.value })
572
+ buildPayload: () => ({ zip: l.value })
573
573
  };
574
574
  };
575
575
  function _e(e, t) {
576
- const r = Y(!1);
576
+ const r = Z(!1);
577
577
  Fe(() => {
578
578
  e.value?.setAttribute("aria-invalid", String(!t.isValid()));
579
579
  });
580
- function g(f) {
581
- const A = e.value ?? f.currentTarget, I = f.relatedTarget;
582
- (!A || !A.contains(I)) && (r.value = !0);
580
+ function v(d) {
581
+ const w = e.value ?? d.currentTarget, D = d.relatedTarget;
582
+ (!w || !w.contains(D)) && (r.value = !0);
583
583
  }
584
- function s() {
584
+ function l() {
585
585
  r.value = !1;
586
586
  }
587
- return { touched: r, onFocusout: g, reset: s };
587
+ return { touched: r, onFocusout: v, reset: l };
588
588
  }
589
589
  function je(e, t) {
590
- const r = Y(!1), g = Y(!1), s = h(
591
- () => re(t.submitted) || r.value
592
- ), f = h(() => !s.value || t.isValid()), A = _e(e, {
593
- isValid: () => f.value
590
+ const r = Z(!1), v = Z(!1), l = h(
591
+ () => ae(t.submitted) || r.value
592
+ ), d = h(() => !l.value || t.isValid()), w = _e(e, {
593
+ isValid: () => d.value
594
594
  });
595
- function I(x) {
596
- return h(() => !s.value || re(x));
595
+ function D(M) {
596
+ return h(() => !l.value || ae(M));
597
597
  }
598
- function F(x) {
598
+ function P(M) {
599
599
  return Object.fromEntries(
600
- Object.entries(x).map(([D, C]) => [
601
- D,
602
- I(C)
600
+ Object.entries(M).map(([E, F]) => [
601
+ E,
602
+ D(F)
603
603
  ])
604
604
  );
605
605
  }
606
- function N(x) {
607
- const D = re(x);
608
- if (!D) return;
609
- D.querySelector(
606
+ function N(M) {
607
+ const E = ae(M);
608
+ if (!E) return;
609
+ E.querySelector(
610
610
  '.k-invalid input, .k-invalid[tabindex="0"]'
611
611
  )?.focus();
612
612
  }
613
- function E(x) {
614
- if (g.value) {
615
- g.value = !1;
613
+ function x(M) {
614
+ if (v.value) {
615
+ v.value = !1;
616
616
  return;
617
617
  }
618
- A.onFocusout(x), A.touched.value && (r.value = !0);
618
+ w.onFocusout(M), w.touched.value && (r.value = !0);
619
619
  }
620
- function $() {
621
- r.value = !1, g.value = !0, A.reset();
620
+ function V() {
621
+ r.value = !1, v.value = !0, w.reset();
622
622
  }
623
623
  return {
624
624
  touched: r,
625
- fieldsetValidate: s,
626
- onFocusout: E,
627
- reset: $,
628
- createFieldValidity: I,
629
- createFieldValidationsMap: F,
625
+ fieldsetValidate: l,
626
+ onFocusout: x,
627
+ reset: V,
628
+ createFieldValidity: D,
629
+ createFieldValidationsMap: P,
630
630
  focusFirstInvalidField: N
631
631
  };
632
632
  }
@@ -690,7 +690,7 @@ function Ie(e) {
690
690
  return "";
691
691
  }
692
692
  function Je() {
693
- const e = Ne({
693
+ const e = Oe({
694
694
  address1: "",
695
695
  address2: "",
696
696
  city: "",
@@ -699,17 +699,17 @@ function Je() {
699
699
  });
700
700
  return {
701
701
  formData: e,
702
- onAddress1Input: (...A) => {
703
- e.address1 = Ie(A[0]);
702
+ onAddress1Input: (...w) => {
703
+ e.address1 = Ie(w[0]);
704
704
  },
705
- onAddress2Input: (...A) => {
706
- e.address2 = Ie(A[0]);
705
+ onAddress2Input: (...w) => {
706
+ e.address2 = Ie(w[0]);
707
707
  },
708
- onCityInput: (...A) => {
709
- e.city = Ie(A[0]);
708
+ onCityInput: (...w) => {
709
+ e.city = Ie(w[0]);
710
710
  },
711
- onStateChange: (A) => {
712
- e.state = A.value;
711
+ onStateChange: (w) => {
712
+ e.state = w.value;
713
713
  },
714
714
  resetFormData: () => {
715
715
  e.address1 = "", e.address2 = "", e.city = "", e.state = null, e.zip = "";
@@ -718,36 +718,36 @@ function Je() {
718
718
  }
719
719
  function Qe(e, t = "zip") {
720
720
  const r = We({ id: t }), {
721
- zipDisplay: g,
722
- zipRaw: s,
723
- isZipValid: f,
724
- wrapperClass: A,
725
- handleZipInput: I
721
+ zipDisplay: v,
722
+ zipRaw: l,
723
+ isZipValid: d,
724
+ wrapperClass: w,
725
+ handleZipInput: D
726
726
  } = r;
727
- return se(s, (N) => {
727
+ return se(l, (N) => {
728
728
  e.zip = N;
729
729
  }), {
730
- zipDisplay: g,
731
- isZipValid: f,
732
- zipWrapperClass: A,
733
- onZipInput: I,
730
+ zipDisplay: v,
731
+ isZipValid: d,
732
+ zipWrapperClass: w,
733
+ onZipInput: D,
734
734
  resetZip: () => {
735
- g.value = "", e.zip = "";
735
+ v.value = "", e.zip = "";
736
736
  }
737
737
  };
738
738
  }
739
739
  function et(e) {
740
740
  const t = h(
741
741
  () => e.formData.address1.trim() !== ""
742
- ), r = h(() => e.formData.city.trim() !== ""), g = h(() => !!e.formData.state), s = h(() => re(e.isZipValid)), f = h(
743
- () => t.value && r.value && g.value && s.value
742
+ ), r = h(() => e.formData.city.trim() !== ""), v = h(() => !!e.formData.state), l = h(() => ae(e.isZipValid)), d = h(
743
+ () => t.value && r.value && v.value && l.value
744
744
  );
745
745
  return {
746
746
  strictAddress1Valid: t,
747
747
  strictCityValid: r,
748
- strictStateValid: g,
749
- strictZipValid: s,
750
- strictAddressValid: f
748
+ strictStateValid: v,
749
+ strictZipValid: l,
750
+ strictAddressValid: d
751
751
  };
752
752
  }
753
753
  function tt(e) {
@@ -757,122 +757,122 @@ function tt(e) {
757
757
  )?.focus();
758
758
  }
759
759
  function nt(e, t) {
760
- const r = e ?? t.currentTarget, g = t.relatedTarget;
761
- return !r || !r.contains(g);
760
+ const r = e ?? t.currentTarget, v = t.relatedTarget;
761
+ return !r || !r.contains(v);
762
762
  }
763
763
  function ht(e) {
764
- const t = Y(
765
- re(e.fieldsetRef)
764
+ const t = Z(
765
+ ae(e.fieldsetRef)
766
766
  );
767
767
  Fe(() => {
768
- t.value = re(e.fieldsetRef);
768
+ t.value = ae(e.fieldsetRef);
769
769
  });
770
- const r = Y(!1), g = Y(!1), s = h(() => re(e.required) ?? !0), {
771
- formData: f,
772
- onAddress1Input: A,
773
- onAddress2Input: I,
774
- onCityInput: F,
770
+ const r = Z(!1), v = Z(!1), l = h(() => ae(e.required) ?? !0), {
771
+ formData: d,
772
+ onAddress1Input: w,
773
+ onAddress2Input: D,
774
+ onCityInput: P,
775
775
  onStateChange: N,
776
- resetFormData: E
777
- } = Je(), $ = `${e.addressId}-zip`, { zipDisplay: x, isZipValid: D, zipWrapperClass: C, onZipInput: c, resetZip: i } = Qe(f, $), {
778
- strictAddress1Valid: m,
776
+ resetFormData: x
777
+ } = Je(), V = `${e.addressId}-zip`, { zipDisplay: M, isZipValid: E, zipWrapperClass: F, onZipInput: u, resetZip: i } = Qe(d, V), {
778
+ strictAddress1Valid: p,
779
779
  strictCityValid: S,
780
- strictStateValid: R,
781
- strictZipValid: K,
780
+ strictStateValid: L,
781
+ strictZipValid: H,
782
782
  strictAddressValid: q
783
783
  } = et({
784
- formData: f,
785
- isZipValid: D
786
- }), X = je(t, {
784
+ formData: d,
785
+ isZipValid: E
786
+ }), Y = je(t, {
787
787
  submitted: r,
788
788
  isValid: () => q.value
789
- }), { touched: ee, fieldsetValidate: u, onFocusout: k, reset: y } = X, w = X.createFieldValidationsMap({
790
- address1: m,
789
+ }), { touched: J, fieldsetValidate: s, onFocusout: k, reset: g } = Y, b = Y.createFieldValidationsMap({
790
+ address1: p,
791
791
  city: S,
792
- state: R,
793
- zip: K,
792
+ state: L,
793
+ zip: H,
794
794
  address: q
795
795
  }), {
796
- address1: T,
797
- city: l,
798
- state: p,
799
- zip: V,
800
- address: U
801
- } = w, ae = h(
802
- () => s.value ? u.value : !1
803
- ), ne = h(
804
- () => s.value ? T.value : !0
805
- ), a = h(
806
- () => s.value ? l.value : !0
807
- ), b = h(
808
- () => s.value ? p.value : !0
809
- ), L = h(
810
- () => s.value ? V.value : !0
811
- ), Z = h(
812
- () => s.value ? U.value : !0
813
- ), W = { value: null, label: "State" }, j = Ge.map(({ label: v, value: M }) => ({
814
- label: v,
815
- value: M
816
- })), n = h(() => ({
817
- address1: f.address1.trim(),
818
- address2: f.address2.trim(),
819
- city: f.city.trim(),
820
- state: (f.state ?? "").trim().toUpperCase(),
821
- zip: f.zip.replace(/\D/g, "")
822
- })), d = h(() => f.address1.trim() === "" && f.address2.trim() === "" && f.city.trim() === "" && (f.state ?? "").trim() === "" && f.zip.replace(/\D/g, "") === ""), P = h(() => !d.value), B = h(() => !s.value && P.value && (!m.value || !S.value || !R.value)), G = h(() => {
823
- const v = f.zip.replace(/\D/g, "");
824
- return !s.value && P.value && v.length !== 5 && v.length !== 9;
825
- }), te = h(() => !s.value && P.value && !q.value), z = h(() => !s.value && te.value && (g.value || r.value));
826
- return se(n, () => {
827
- s.value || (g.value = !1);
828
- }), se(s, (v) => {
829
- v || (r.value = !1, g.value = !1, y());
796
+ address1: R,
797
+ city: A,
798
+ state: $,
799
+ zip: B,
800
+ address: f
801
+ } = b, I = h(
802
+ () => l.value ? s.value : !1
803
+ ), ee = h(
804
+ () => l.value ? R.value : !0
805
+ ), n = h(
806
+ () => l.value ? A.value : !0
807
+ ), y = h(
808
+ () => l.value ? $.value : !0
809
+ ), C = h(
810
+ () => l.value ? B.value : !0
811
+ ), z = h(
812
+ () => l.value ? f.value : !0
813
+ ), K = { value: null, label: "State" }, _ = Ge.map(({ label: m, value: T }) => ({
814
+ label: m,
815
+ value: T
816
+ })), a = h(() => ({
817
+ address1: d.address1.trim(),
818
+ address2: d.address2.trim(),
819
+ city: d.city.trim(),
820
+ state: (d.state ?? "").trim().toUpperCase(),
821
+ zip: d.zip.replace(/\D/g, "")
822
+ })), c = h(() => d.address1.trim() === "" && d.address2.trim() === "" && d.city.trim() === "" && (d.state ?? "").trim() === "" && d.zip.replace(/\D/g, "") === ""), O = h(() => !c.value), X = h(() => !l.value && O.value && (!p.value || !S.value || !L.value)), Q = h(() => {
823
+ const m = d.zip.replace(/\D/g, "");
824
+ return !l.value && O.value && m.length !== 5 && m.length !== 9;
825
+ }), re = h(() => !l.value && O.value && !q.value), W = h(() => !l.value && re.value && (v.value || r.value));
826
+ return se(a, () => {
827
+ l.value || (v.value = !1);
828
+ }), se(l, (m) => {
829
+ m || (r.value = !1, v.value = !1, g());
830
830
  }), {
831
- formData: f,
831
+ formData: d,
832
832
  submitted: r,
833
- touched: ee,
834
- addressValidate: ae,
835
- address1Valid: ne,
836
- cityValid: a,
837
- stateValid: b,
838
- zipValid: L,
839
- addressValid: Z,
840
- optionalFeedbackActive: z,
841
- optionalPartialInvalid: te,
842
- optionalMissingRequiredFields: B,
843
- optionalZipInvalid: G,
844
- stateDefaultItem: W,
845
- stateOptions: j,
846
- zipDisplay: x,
847
- zipWrapperClass: C,
848
- onAddress1Input: A,
849
- onAddress2Input: I,
850
- onCityInput: F,
833
+ touched: J,
834
+ addressValidate: I,
835
+ address1Valid: ee,
836
+ cityValid: n,
837
+ stateValid: y,
838
+ zipValid: C,
839
+ addressValid: z,
840
+ optionalFeedbackActive: W,
841
+ optionalPartialInvalid: re,
842
+ optionalMissingRequiredFields: X,
843
+ optionalZipInvalid: Q,
844
+ stateDefaultItem: K,
845
+ stateOptions: _,
846
+ zipDisplay: M,
847
+ zipWrapperClass: F,
848
+ onAddress1Input: w,
849
+ onAddress2Input: D,
850
+ onCityInput: P,
851
851
  onStateChange: N,
852
- onZipInput: c,
853
- onFieldsetFocusout: (v) => {
854
- const M = nt(t.value, v);
855
- k(v), !s.value && M && (g.value = !0);
852
+ onZipInput: u,
853
+ onFieldsetFocusout: (m) => {
854
+ const T = nt(t.value, m);
855
+ k(m), !l.value && T && (v.value = !0);
856
856
  },
857
- normalizedPayload: n,
858
- validateForSubmit: async () => s.value ? (r.value = !0, q.value ? {
857
+ normalizedPayload: a,
858
+ validateForSubmit: async () => l.value ? (r.value = !0, q.value ? {
859
859
  isValid: !0,
860
- payload: n.value
861
- } : (await H(), tt(t.value), { isValid: !1, payload: null })) : d.value || q.value ? (r.value = !1, {
860
+ payload: a.value
861
+ } : (await j(), tt(t.value), { isValid: !1, payload: null })) : c.value || q.value ? (r.value = !1, {
862
862
  isValid: !0,
863
- payload: n.value
863
+ payload: a.value
864
864
  }) : (r.value = !0, { isValid: !1, payload: null }),
865
865
  reset: () => {
866
- r.value = !1, g.value = !1, y(), E(), i();
866
+ r.value = !1, v.value = !1, g(), x(), i();
867
867
  }
868
868
  };
869
869
  }
870
870
  const bt = (e = "fkid") => {
871
- const t = `${e}-${Oe()}`;
872
- return { instanceId: t, compose: (...g) => [t, ...g].filter((s) => s != null).map(String).join("-") };
871
+ const t = `${e}-${Ne()}`;
872
+ return { instanceId: t, compose: (...v) => [t, ...v].filter((l) => l != null).map(String).join("-") };
873
873
  }, rt = typeof window < "u" && typeof document < "u";
874
874
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
875
- const at = Object.prototype.toString, ot = (e) => at.call(e) === "[object Object]", we = () => {
875
+ const at = Object.prototype.toString, ot = (e) => at.call(e) === "[object Object]", ke = () => {
876
876
  };
877
877
  function xe(e) {
878
878
  return Array.isArray(e) ? e : [e];
@@ -884,97 +884,97 @@ function lt(e, t, r) {
884
884
  });
885
885
  }
886
886
  const Pe = rt ? window : void 0;
887
- function he(e) {
887
+ function we(e) {
888
888
  var t;
889
- const r = re(e);
889
+ const r = ae(e);
890
890
  return (t = r?.$el) !== null && t !== void 0 ? t : r;
891
891
  }
892
892
  function Me(...e) {
893
- const t = (g, s, f, A) => (g.addEventListener(s, f, A), () => g.removeEventListener(s, f, A)), r = h(() => {
894
- const g = xe(re(e[0])).filter((s) => s != null);
895
- return g.every((s) => typeof s != "string") ? g : void 0;
893
+ const t = (v, l, d, w) => (v.addEventListener(l, d, w), () => v.removeEventListener(l, d, w)), r = h(() => {
894
+ const v = xe(ae(e[0])).filter((l) => l != null);
895
+ return v.every((l) => typeof l != "string") ? v : void 0;
896
896
  });
897
897
  return lt(() => {
898
- var g, s;
898
+ var v, l;
899
899
  return [
900
- (g = (s = r.value) === null || s === void 0 ? void 0 : s.map((f) => he(f))) !== null && g !== void 0 ? g : [Pe].filter((f) => f != null),
901
- xe(re(r.value ? e[1] : e[0])),
900
+ (v = (l = r.value) === null || l === void 0 ? void 0 : l.map((d) => we(d))) !== null && v !== void 0 ? v : [Pe].filter((d) => d != null),
901
+ xe(ae(r.value ? e[1] : e[0])),
902
902
  xe(Ke(r.value ? e[2] : e[1])),
903
- re(r.value ? e[3] : e[2])
903
+ ae(r.value ? e[3] : e[2])
904
904
  ];
905
- }, ([g, s, f, A], I, F) => {
906
- if (!g?.length || !s?.length || !f?.length) return;
907
- const N = ot(A) ? { ...A } : A, E = g.flatMap(($) => s.flatMap((x) => f.map((D) => t($, x, D, N))));
908
- F(() => {
909
- E.forEach(($) => $());
905
+ }, ([v, l, d, w], D, P) => {
906
+ if (!v?.length || !l?.length || !d?.length) return;
907
+ const N = ot(w) ? { ...w } : w, x = v.flatMap((V) => l.flatMap((M) => d.map((E) => t(V, M, E, N))));
908
+ P(() => {
909
+ x.forEach((V) => V());
910
910
  });
911
911
  }, { flush: "post" });
912
912
  }
913
913
  function Le(e, t, r = {}) {
914
- const { window: g = Pe, ignore: s = [], capture: f = !0, detectIframe: A = !1, controls: I = !1 } = r;
915
- if (!g) return I ? {
916
- stop: we,
917
- cancel: we,
918
- trigger: we
919
- } : we;
920
- let F = !0;
921
- const N = (i) => re(s).some((m) => {
922
- if (typeof m == "string") return Array.from(g.document.querySelectorAll(m)).some((S) => S === i.target || i.composedPath().includes(S));
914
+ const { window: v = Pe, ignore: l = [], capture: d = !0, detectIframe: w = !1, controls: D = !1 } = r;
915
+ if (!v) return D ? {
916
+ stop: ke,
917
+ cancel: ke,
918
+ trigger: ke
919
+ } : ke;
920
+ let P = !0;
921
+ const N = (i) => ae(l).some((p) => {
922
+ if (typeof p == "string") return Array.from(v.document.querySelectorAll(p)).some((S) => S === i.target || i.composedPath().includes(S));
923
923
  {
924
- const S = he(m);
924
+ const S = we(p);
925
925
  return S && (i.target === S || i.composedPath().includes(S));
926
926
  }
927
927
  });
928
- function E(i) {
929
- const m = re(i);
930
- return m && m.$.subTree.shapeFlag === 16;
928
+ function x(i) {
929
+ const p = ae(i);
930
+ return p && p.$.subTree.shapeFlag === 16;
931
931
  }
932
- function $(i, m) {
933
- const S = re(i), R = S.$.subTree && S.$.subTree.children;
934
- return R == null || !Array.isArray(R) ? !1 : R.some((K) => K.el === m.target || m.composedPath().includes(K.el));
932
+ function V(i, p) {
933
+ const S = ae(i), L = S.$.subTree && S.$.subTree.children;
934
+ return L == null || !Array.isArray(L) ? !1 : L.some((H) => H.el === p.target || p.composedPath().includes(H.el));
935
935
  }
936
- const x = (i) => {
937
- const m = he(e);
938
- if (i.target != null && !(!(m instanceof Element) && E(e) && $(e, i)) && !(!m || m === i.target || i.composedPath().includes(m))) {
939
- if ("detail" in i && i.detail === 0 && (F = !N(i)), !F) {
940
- F = !0;
936
+ const M = (i) => {
937
+ const p = we(e);
938
+ if (i.target != null && !(!(p instanceof Element) && x(e) && V(e, i)) && !(!p || p === i.target || i.composedPath().includes(p))) {
939
+ if ("detail" in i && i.detail === 0 && (P = !N(i)), !P) {
940
+ P = !0;
941
941
  return;
942
942
  }
943
943
  t(i);
944
944
  }
945
945
  };
946
- let D = !1;
947
- const C = [
948
- Me(g, "click", (i) => {
949
- D || (D = !0, setTimeout(() => {
950
- D = !1;
951
- }, 0), x(i));
946
+ let E = !1;
947
+ const F = [
948
+ Me(v, "click", (i) => {
949
+ E || (E = !0, setTimeout(() => {
950
+ E = !1;
951
+ }, 0), M(i));
952
952
  }, {
953
953
  passive: !0,
954
- capture: f
954
+ capture: d
955
955
  }),
956
- Me(g, "pointerdown", (i) => {
957
- const m = he(e);
958
- F = !N(i) && !!(m && !i.composedPath().includes(m));
956
+ Me(v, "pointerdown", (i) => {
957
+ const p = we(e);
958
+ P = !N(i) && !!(p && !i.composedPath().includes(p));
959
959
  }, { passive: !0 }),
960
- A && Me(g, "blur", (i) => {
960
+ w && Me(v, "blur", (i) => {
961
961
  setTimeout(() => {
962
- const m = he(e);
963
- let S = g.document.activeElement;
962
+ const p = we(e);
963
+ let S = v.document.activeElement;
964
964
  for (; S?.shadowRoot; ) S = S.shadowRoot.activeElement;
965
- S?.tagName === "IFRAME" && !m?.contains(g.document.activeElement) && t(i);
965
+ S?.tagName === "IFRAME" && !p?.contains(v.document.activeElement) && t(i);
966
966
  }, 0);
967
967
  }, { passive: !0 })
968
- ].filter(Boolean), c = () => C.forEach((i) => i());
969
- return I ? {
970
- stop: c,
968
+ ].filter(Boolean), u = () => F.forEach((i) => i());
969
+ return D ? {
970
+ stop: u,
971
971
  cancel: () => {
972
- F = !1;
972
+ P = !1;
973
973
  },
974
974
  trigger: (i) => {
975
- F = !0, x(i), F = !1;
975
+ P = !0, M(i), P = !1;
976
976
  }
977
- } : c;
977
+ } : u;
978
978
  }
979
979
  const it = (e) => {
980
980
  let t = null;
@@ -983,17 +983,17 @@ const it = (e) => {
983
983
  };
984
984
  return typeof window < "u" && typeof window.IntersectionObserver == "function" && se(
985
985
  [e.target, () => e.root()],
986
- ([s, f]) => {
987
- r(), s && (t = new IntersectionObserver(
988
- ([A]) => {
989
- A && e.onChange(A);
986
+ ([l, d]) => {
987
+ r(), l && (t = new IntersectionObserver(
988
+ ([w]) => {
989
+ w && e.onChange(w);
990
990
  },
991
- { root: f, threshold: e.threshold ?? 1 }
992
- ), t.observe(s));
991
+ { root: d, threshold: e.threshold ?? 1 }
992
+ ), t.observe(l));
993
993
  },
994
994
  { immediate: !0 }
995
995
  ), Ce(r), { disconnect: r };
996
- }, st = ".k-table-row", Se = (e) => {
996
+ }, st = ".k-table-row", he = (e) => {
997
997
  if (e instanceof HTMLElement) return e;
998
998
  const t = e?.$el;
999
999
  return t instanceof HTMLElement ? t : null;
@@ -1002,165 +1002,210 @@ const it = (e) => {
1002
1002
  `usePopupMenu: triggerMode "${t}" does not match resolved element <${e.tagName.toLowerCase()}${e.className ? `.${e.className.split(" ").join(".")}` : ""}>; ARIA management skipped.`
1003
1003
  );
1004
1004
  }, dt = (e) => {
1005
- let t = e.parentElement;
1005
+ let t = e.parentElement, r = null;
1006
1006
  for (; t; ) {
1007
- const { overflow: r, overflowX: g, overflowY: s } = window.getComputedStyle(t);
1008
- if ([r, g, s].some(
1009
- (f) => /auto|scroll|overlay/.test(f)
1010
- ))
1007
+ const { overflow: v, overflowX: l, overflowY: d } = window.getComputedStyle(t), w = /auto|scroll|overlay/.test(`${v} ${l}`), D = /auto|scroll|overlay/.test(`${v} ${d}`);
1008
+ if ((w || D) && (r ??= t), w && t.scrollWidth > t.clientWidth || D && t.scrollHeight > t.clientHeight)
1011
1009
  return t;
1012
1010
  t = t.parentElement;
1013
1011
  }
1014
- return null;
1012
+ return r;
1015
1013
  }, wt = (e) => {
1016
- const t = Y(null), r = e.menuItemSelector ?? ".k-menu-item:not(.k-disabled)", g = e.triggerMode, s = e.anchor === !0 ? {} : e.anchor, f = Ae(null), A = () => Se(e.triggerRef.value), I = h(() => A()), F = h(
1017
- () => s && s.hideWhenAnchorClipped !== !1 ? I.value : null
1018
- ), N = h(() => {
1019
- const l = f.value;
1020
- return !e.isOpen.value || !l ? { left: 0, top: 0 } : {
1021
- left: l.left + window.scrollX,
1022
- top: l.bottom + window.scrollY
1014
+ const t = Z(null), r = e.menuItemSelector ?? ".k-menu-item:not(.k-disabled)", v = e.triggerMode, l = e.anchor === !0 ? {} : e.anchor, d = l?.activationPoint ? l.activationPoint === !0 ? {} : l.activationPoint : null, w = be(null), D = be(null), P = () => he(e.triggerRef.value), N = h(() => P()), x = h(
1015
+ () => l && l.hideWhenAnchorClipped !== !1 ? N.value : null
1016
+ ), V = h(() => {
1017
+ const f = w.value;
1018
+ return !e.isOpen.value || !f ? { left: 0, top: 0 } : {
1019
+ left: f.left + window.scrollX,
1020
+ top: f.bottom + window.scrollY
1023
1021
  };
1024
- }), E = () => e.resolveFocusTarget?.() ?? Se(e.focusTargetRef?.value), $ = () => {
1025
- if (g !== "button") return null;
1022
+ }), M = () => {
1023
+ const f = e.resolveFocusTarget?.() ?? he(e.focusTargetRef?.value);
1024
+ return f || (e.focusTargetContainerSelector ? P()?.closest(
1025
+ e.focusTargetContainerSelector
1026
+ ) ?? null : null);
1027
+ }, E = (f, I) => {
1028
+ if (!d) return !1;
1029
+ const ee = he(f);
1030
+ if (!ee)
1031
+ return D.value = null, !1;
1032
+ const n = ee.getBoundingClientRect();
1033
+ if (I.triggerType === "keyboard") {
1034
+ const y = d.keyboardPosition, C = y?.y ?? "center", z = typeof C == "number" ? C : C === "top" ? 0 : C === "bottom" ? n.height : n.height / 2;
1035
+ return D.value = {
1036
+ trigger: ee,
1037
+ point: { x: y?.x ?? 8, y: z },
1038
+ hasMatchedTrigger: !1
1039
+ }, !0;
1040
+ }
1041
+ return I.coordinates ? (D.value = {
1042
+ trigger: ee,
1043
+ point: {
1044
+ x: I.coordinates.clientX - n.left + (d.pointerOffset?.x ?? 0),
1045
+ y: I.coordinates.clientY - n.top + (d.pointerOffset?.y ?? 0)
1046
+ },
1047
+ hasMatchedTrigger: !1
1048
+ }, !0) : (D.value = null, !1);
1049
+ }, F = () => {
1050
+ if (v !== "button") return null;
1026
1051
  if (e.escapeFocusTarget) return e.escapeFocusTarget();
1027
- const l = e.escapeFocusContainerSelector ?? st;
1028
- return (A() ?? document.activeElement)?.closest(l) ?? null;
1029
- }, x = () => {
1030
- const l = E() ?? $();
1031
- if (l)
1032
- return l.focus(), !0;
1033
- const p = A();
1034
- return p?.focus(), !!p;
1035
- }, D = () => {
1036
- Se(e.menuRef.value)?.querySelector(r)?.focus({ preventScroll: !0 });
1037
- }, C = Ae(null), c = Ae(null);
1038
- let i = !1;
1039
- const m = () => {
1040
- const l = t.value;
1041
- if (l === "keyboard" || l === "escape") {
1042
- const p = C.value ?? c.value;
1043
- p?.focus(), l === "keyboard" && p && p === c.value && (i = !0);
1044
- } else t.value === "mouse-selection" && c.value?.focus();
1045
- t.value = null, C.value = null, c.value = null;
1046
- }, S = (l) => {
1047
- e.isOpen.value && (t.value = l, C.value = E() ?? (l === "escape" ? $() : null), c.value = A(), X(!1), e.requestHide(), H(m));
1052
+ const f = e.escapeFocusContainerSelector ?? st;
1053
+ return (P() ?? document.activeElement)?.closest(f) ?? null;
1054
+ }, u = () => {
1055
+ const f = M() ?? F();
1056
+ if (f)
1057
+ return f.focus(), !0;
1058
+ const I = P();
1059
+ return I?.focus(), !!I;
1060
+ }, i = () => {
1061
+ he(e.menuRef.value)?.querySelector(r)?.focus({ preventScroll: !0 });
1062
+ }, p = be(null), S = be(null);
1063
+ let L = !1;
1064
+ const H = () => {
1065
+ const f = t.value;
1066
+ if (f === "keyboard" || f === "escape") {
1067
+ const I = p.value ?? S.value;
1068
+ I?.focus(), f === "keyboard" && I && I === S.value && (L = !0);
1069
+ } else t.value === "mouse-selection" && S.value?.focus();
1070
+ t.value = null, p.value = null, S.value = null;
1071
+ }, q = (f) => {
1072
+ e.isOpen.value && (t.value = f, p.value = M() ?? (f === "escape" ? F() : null), S.value = P(), k(!1), e.requestHide(), j(H));
1048
1073
  };
1049
1074
  se(
1050
- I,
1051
- (l, p, V) => {
1052
- if (!s || !l) {
1053
- f.value = null;
1075
+ [N, D],
1076
+ ([f], I, ee) => {
1077
+ if (!l || !f) {
1078
+ w.value = null;
1054
1079
  return;
1055
1080
  }
1056
- let U = null;
1057
- const ae = () => {
1058
- U = null, f.value = s.getRect?.() ?? l.getBoundingClientRect();
1059
- }, ne = () => {
1060
- U === null && (U = window.requestAnimationFrame(ae));
1061
- }, a = typeof window.ResizeObserver == "function" ? new window.ResizeObserver(ne) : null;
1062
- a?.observe(l), window.addEventListener("scroll", ne, {
1081
+ let n = null;
1082
+ const y = () => {
1083
+ n = null;
1084
+ const K = D.value;
1085
+ if (d) {
1086
+ K && K.trigger === f ? K.hasMatchedTrigger = !0 : K?.hasMatchedTrigger && (K.trigger = f);
1087
+ const _ = f.getBoundingClientRect();
1088
+ w.value = K?.trigger === f ? new DOMRect(
1089
+ _.left + K.point.x,
1090
+ _.top + K.point.y,
1091
+ 0,
1092
+ 0
1093
+ ) : null;
1094
+ return;
1095
+ }
1096
+ w.value = l.getRect?.(f) ?? f.getBoundingClientRect();
1097
+ }, C = () => {
1098
+ n === null && (n = window.requestAnimationFrame(y));
1099
+ }, z = typeof window.ResizeObserver == "function" ? new window.ResizeObserver(C) : null;
1100
+ z?.observe(f), window.addEventListener("scroll", C, {
1063
1101
  capture: !0,
1064
1102
  passive: !0
1065
- }), window.addEventListener("resize", ne, { passive: !0 }), ne(), V(() => {
1066
- U !== null && window.cancelAnimationFrame(U), a?.disconnect(), window.removeEventListener("scroll", ne, !0), window.removeEventListener("resize", ne);
1103
+ }), window.addEventListener("resize", C, { passive: !0 }), C(), ee(() => {
1104
+ n !== null && window.cancelAnimationFrame(n), z?.disconnect(), window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
1067
1105
  });
1068
1106
  },
1069
1107
  { immediate: !0, flush: "post" }
1070
1108
  ), it({
1071
- target: F,
1072
- root: () => s?.clipRoot ? re(s.clipRoot) : I.value ? dt(I.value) : null,
1073
- threshold: s?.intersectionThreshold ?? 0.5,
1074
- onChange: (l) => {
1075
- l.isIntersecting || S("anchor-hidden");
1109
+ target: x,
1110
+ root: () => l?.clipRoot ? ae(l.clipRoot) : N.value ? dt(N.value) : null,
1111
+ threshold: l?.intersectionThreshold ?? (d ? 0 : 0.5),
1112
+ onChange: (f) => {
1113
+ f.isIntersecting || q("anchor-hidden");
1076
1114
  }
1077
- }), Le(e.menuRef, () => S("outside-click"), {
1078
- ignore: [I]
1115
+ }), Le(e.menuRef, () => q("outside-click"), {
1116
+ ignore: [N]
1079
1117
  });
1080
- let R = null, K = null;
1081
- const q = () => {
1082
- R?.isConnected && R.setAttribute("aria-expanded", "false"), R = null;
1083
- }, X = (l) => {
1118
+ let Y = null, J = null;
1119
+ const s = () => {
1120
+ Y?.isConnected && Y.setAttribute("aria-expanded", "false"), Y = null;
1121
+ }, k = (f) => {
1084
1122
  if (e.manageMenuTriggerAria === !1) return;
1085
- const p = I.value;
1086
- if (!p) {
1087
- R?.isConnected && R.setAttribute("aria-expanded", l ? "true" : "false");
1123
+ const I = N.value;
1124
+ if (!I) {
1125
+ Y?.isConnected && Y.setAttribute("aria-expanded", f ? "true" : "false");
1088
1126
  return;
1089
1127
  }
1090
- if (!ut(p, g)) {
1091
- ct(p, g), q();
1128
+ if (!ut(I, v)) {
1129
+ ct(I, v), s();
1092
1130
  return;
1093
1131
  }
1094
- R && R !== p && q(), p.setAttribute("aria-expanded", l ? "true" : "false"), R = p;
1095
- }, ee = () => {
1096
- const l = Se(e.menuRef.value), p = l?.matches('[role="menubar"]') ? l : l?.querySelector('[role="menubar"]'), V = re(e.menuLabel)?.trim();
1097
- K && K !== p && K.removeAttribute("aria-label"), p && (V ? p.setAttribute("aria-label", V) : p.removeAttribute("aria-label")), K = p ?? null;
1132
+ Y && Y !== I && s(), I.setAttribute("aria-expanded", f ? "true" : "false"), Y = I;
1133
+ }, g = () => {
1134
+ const f = he(e.menuRef.value), I = f?.matches('[role="menubar"]') ? f : f?.querySelector('[role="menubar"]'), ee = ae(e.menuLabel)?.trim();
1135
+ J && J !== I && J.removeAttribute("aria-label"), I && (ee ? I.setAttribute("aria-label", ee) : I.removeAttribute("aria-label")), J = I ?? null;
1098
1136
  };
1099
1137
  se(
1100
1138
  [e.isOpen, e.triggerRef],
1101
- ([l]) => X(l),
1139
+ ([f]) => {
1140
+ k(f), !f && d && (D.value = null, w.value = null);
1141
+ },
1102
1142
  { immediate: !0, flush: "post" }
1103
1143
  ), se(
1104
- [e.isOpen, e.menuRef, () => re(e.menuLabel)],
1105
- ee,
1144
+ [e.isOpen, e.menuRef, () => ae(e.menuLabel)],
1145
+ g,
1106
1146
  { immediate: !0, flush: "post" }
1107
1147
  ), Ce(() => {
1108
- q(), K?.removeAttribute("aria-label");
1148
+ D.value = null, s(), J?.removeAttribute("aria-label");
1109
1149
  }), se(
1110
1150
  e.isOpen,
1111
- (l) => {
1112
- l && D();
1151
+ (f) => {
1152
+ f && i();
1113
1153
  },
1114
1154
  { flush: "post" }
1115
1155
  );
1116
- const u = (...l) => {
1117
- const p = l[0];
1118
- if (i) {
1119
- i = !1;
1156
+ const b = (...f) => {
1157
+ const I = f[0];
1158
+ if (L) {
1159
+ L = !1;
1120
1160
  return;
1121
1161
  }
1122
1162
  if (e.isOpen.value) {
1123
- S("trigger-click");
1163
+ q("trigger-click");
1124
1164
  return;
1125
1165
  }
1126
- e.requestShow(p);
1166
+ e.requestShow(I);
1127
1167
  };
1128
1168
  return {
1169
+ /**
1170
+ * Sets the anchor activation state, controlling whether the popup menu
1171
+ * should respond to trigger interactions.
1172
+ */
1173
+ setAnchorActivation: E,
1129
1174
  /**
1130
1175
  * Handles Kendo Menu selection: records keyboard or mouse modality,
1131
1176
  * requests popup close, then runs the optional caller-owned action.
1132
1177
  */
1133
- handleMenuSelect: (l, p) => {
1134
- p?.(l), S(
1135
- l.event?.type?.startsWith("key") ? "keyboard" : "mouse-selection"
1178
+ handleMenuSelect: (f, I) => {
1179
+ I?.(f), q(
1180
+ f.event?.type?.startsWith("key") ? "keyboard" : "mouse-selection"
1136
1181
  );
1137
1182
  },
1138
1183
  /**
1139
1184
  * Toggles the action menu. When opening, focuses the first enabled Kendo
1140
1185
  * Menu item after Vue renders the popup.
1141
1186
  */
1142
- handleActionButtonClick: u,
1187
+ handleTriggerClick: b,
1143
1188
  /**
1144
1189
  * Handles trigger keyboard input: Enter and Space toggle the menu; Escape
1145
1190
  * closes an open menu or focuses the configured target when already closed.
1146
1191
  */
1147
- handleActionButtonKeydown: (...l) => {
1148
- const p = l[0], V = l[1];
1149
- if (p.key === "Enter" || p.code === "Space") {
1150
- p.preventDefault(), u(V);
1192
+ handleTriggerKeydown: (...f) => {
1193
+ const I = f[0], ee = f[1];
1194
+ if (I.key === "Enter" || I.code === "Space") {
1195
+ I.preventDefault(), b(ee);
1151
1196
  return;
1152
1197
  }
1153
- if (p.key === "Escape") {
1154
- if (p.preventDefault(), p.stopPropagation(), e.isOpen.value) {
1155
- S("escape");
1198
+ if (I.key === "Escape") {
1199
+ if (I.preventDefault(), I.stopPropagation(), e.isOpen.value) {
1200
+ q("escape");
1156
1201
  return;
1157
1202
  }
1158
- x();
1203
+ u();
1159
1204
  }
1160
1205
  },
1161
1206
  /** Closes the open menu through the keyboard path when Escape is pressed inside it. */
1162
- handleActionMenuEscape: (l) => {
1163
- l.preventDefault(), l.stopPropagation(), S("escape");
1207
+ handleMenuEscape: (f) => {
1208
+ f.preventDefault(), f.stopPropagation(), q("escape");
1164
1209
  },
1165
1210
  /**
1166
1211
  * Restores focus after Kendo Popup closes: keyboard menu selection and
@@ -1169,202 +1214,202 @@ const it = (e) => {
1169
1214
  * outside clicks do not move focus.
1170
1215
  */
1171
1216
  handlePopupClose: () => {
1172
- H(m);
1217
+ j(H);
1173
1218
  },
1174
- offset: N
1219
+ offset: V
1175
1220
  };
1176
1221
  }, St = () => {
1177
1222
  const e = /* @__PURE__ */ new Set();
1178
- return { register: (s) => {
1179
- e.add(s), Ce(() => e.delete(s));
1180
- }, deactivateOthers: (s) => {
1181
- e.forEach((f) => {
1182
- f !== s && f.deactivate();
1223
+ return { register: (l) => {
1224
+ e.add(l), Ce(() => e.delete(l));
1225
+ }, deactivateOthers: (l) => {
1226
+ e.forEach((d) => {
1227
+ d !== l && d.deactivate();
1183
1228
  });
1184
1229
  }, deactivateAll: () => {
1185
- e.forEach((s) => s.deactivate());
1230
+ e.forEach((l) => l.deactivate());
1186
1231
  } };
1187
1232
  }, ft = (e) => {
1188
1233
  if (e instanceof HTMLElement) return e;
1189
1234
  const t = e && "$el" in e ? e.$el : null;
1190
1235
  return t instanceof HTMLElement ? t : null;
1191
- }, At = () => {
1192
- const e = qe(/* @__PURE__ */ new Map()), t = Y(null), r = (I, F) => {
1193
- const N = ft(F);
1194
- N ? e.set(I, N) : e.delete(I);
1195
- }, g = (I) => e.get(I) ?? null, s = (I) => {
1196
- t.value = I;
1197
- }, f = () => {
1236
+ }, kt = () => {
1237
+ const e = qe(/* @__PURE__ */ new Map()), t = Z(null), r = (D, P) => {
1238
+ const N = ft(P);
1239
+ N ? e.set(D, N) : e.delete(D);
1240
+ }, v = (D) => e.get(D) ?? null, l = (D) => {
1241
+ t.value = D;
1242
+ }, d = () => {
1198
1243
  t.value = null;
1199
- }, A = (I) => t.value === I;
1244
+ }, w = (D) => t.value === D;
1200
1245
  return {
1201
- activeId: Q(t),
1246
+ activeId: ne(t),
1202
1247
  isActive: h(() => t.value !== null),
1203
1248
  activeElement: h(
1204
- () => t.value !== null ? g(t.value) : null
1249
+ () => t.value !== null ? v(t.value) : null
1205
1250
  ),
1206
1251
  register: r,
1207
- resolve: g,
1208
- activate: s,
1209
- deactivate: f,
1210
- isIdActive: A
1252
+ resolve: v,
1253
+ activate: l,
1254
+ deactivate: d,
1255
+ isIdActive: w
1211
1256
  };
1212
1257
  };
1213
- function kt(e) {
1214
- const t = Y(""), r = Y(void 0), g = Y(!!e.debug), s = Y(e.dateFormat ?? "mm/dd/yyyy"), f = h(() => !!e.required), A = 1e3, I = Y(!1), F = ["ArrowUp", "ArrowDown"], N = ["ArrowLeft", "ArrowRight"], E = h(() => (t.value ?? "").replace(/\D/g, "")), $ = (a) => a <= 2 ? "mm" : a <= 5 ? "dd" : E.value.length <= 10 ? "yyyy" : "mm", x = h(() => {
1215
- const a = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0";
1216
- return parseInt(a).toString().padStart(2, "0");
1217
- }), D = h(() => {
1218
- const a = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0";
1219
- return parseInt(a).toString().padStart(2, "0");
1220
- }), C = h(() => {
1221
- const a = t.value && t.value.substring(6, 10).replace(/\D/g, "0") || "0";
1222
- return parseInt(a).toString().padStart(4, "0");
1223
- }), c = (a) => {
1224
- if (E.value.length === 0) {
1225
- e.onChange({ value: null, event: a });
1258
+ function At(e) {
1259
+ const t = Z(""), r = Z(void 0), v = Z(!!e.debug), l = Z(e.dateFormat ?? "mm/dd/yyyy"), d = h(() => !!e.required), w = 1e3, D = Z(!1), P = ["ArrowUp", "ArrowDown"], N = ["ArrowLeft", "ArrowRight"], x = h(() => (t.value ?? "").replace(/\D/g, "")), V = (n) => n <= 2 ? "mm" : n <= 5 ? "dd" : x.value.length <= 10 ? "yyyy" : "mm", M = h(() => {
1260
+ const n = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0";
1261
+ return parseInt(n).toString().padStart(2, "0");
1262
+ }), E = h(() => {
1263
+ const n = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0";
1264
+ return parseInt(n).toString().padStart(2, "0");
1265
+ }), F = h(() => {
1266
+ const n = t.value && t.value.substring(6, 10).replace(/\D/g, "0") || "0";
1267
+ return parseInt(n).toString().padStart(4, "0");
1268
+ }), u = (n) => {
1269
+ if (x.value.length === 0) {
1270
+ e.onChange({ value: null, event: n });
1226
1271
  return;
1227
1272
  }
1228
- if (E.value.length < 8) {
1229
- e.onChange({ value: null, event: a });
1273
+ if (x.value.length < 8) {
1274
+ e.onChange({ value: null, event: n });
1230
1275
  return;
1231
1276
  }
1232
- if ((t.value ?? "").length === 10 && E.value.length === 8) {
1233
- const [b, L, Z] = t.value.split("/"), W = parseInt(b), j = parseInt(L), n = parseInt(Z);
1234
- if (q(n, W, j)) {
1235
- const d = R(n, W, j);
1236
- i(d) ? e.onChange({ value: d, event: a }) : e.onChange({ value: null, event: a });
1277
+ if ((t.value ?? "").length === 10 && x.value.length === 8) {
1278
+ const [y, C, z] = t.value.split("/"), K = parseInt(y), _ = parseInt(C), a = parseInt(z);
1279
+ if (q(a, K, _)) {
1280
+ const c = L(a, K, _);
1281
+ i(c) ? e.onChange({ value: c, event: n }) : e.onChange({ value: null, event: n });
1237
1282
  } else
1238
- e.onChange({ value: null, event: a });
1283
+ e.onChange({ value: null, event: n });
1239
1284
  }
1240
- }, i = (a) => {
1241
- const b = e.min ?? void 0, L = e.max ?? void 0;
1242
- return !(b && a < b || L && a > L);
1243
- }, m = h(() => {
1244
- if ((t.value ?? "").length === 10 && E.value.length === 8) {
1245
- const [a, b, L] = (t.value ?? "").split("/"), Z = parseInt(a), W = parseInt(b), j = parseInt(L);
1246
- if (q(j, Z, W))
1247
- return R(j, Z, W);
1285
+ }, i = (n) => {
1286
+ const y = e.min ?? void 0, C = e.max ?? void 0;
1287
+ return !(y && n < y || C && n > C);
1288
+ }, p = h(() => {
1289
+ if ((t.value ?? "").length === 10 && x.value.length === 8) {
1290
+ const [n, y, C] = (t.value ?? "").split("/"), z = parseInt(n), K = parseInt(y), _ = parseInt(C);
1291
+ if (q(_, z, K))
1292
+ return L(_, z, K);
1248
1293
  }
1249
1294
  return null;
1250
- }), S = h(() => (t.value ?? "").length === 10 && E.value.length === 8), R = (a, b, L) => {
1251
- const Z = /* @__PURE__ */ new Date(0);
1252
- return Z.setFullYear(a, b - 1, L), Z.setHours(0, 0, 0, 0), Z;
1253
- }, K = (a, b) => R(a, b + 1, 0).getDate(), q = (a, b, L) => b >= 1 && b <= 12 && a >= A && L >= 1 && L <= K(a, b), X = (a) => {
1254
- t.value = a.value;
1255
- const b = a.event?.target;
1256
- r.value = b?.selectionStart ?? 0, c(a);
1257
- }, ee = (a) => {
1258
- r.value = a.target.selectionStart ?? 0;
1259
- }, u = (a, b, L) => {
1260
- const Z = b?.selectionStart ?? r.value ?? 0;
1261
- r.value = Z;
1262
- let W = parseInt(x.value), j = parseInt(D.value), n = parseInt(C.value);
1263
- if (!(E.value.length >= 8) || !q(n, W, j)) {
1264
- const _ = e.defaultValue ?? /* @__PURE__ */ new Date();
1265
- W = _.getMonth() + 1, j = _.getDate(), n = _.getFullYear(), t.value = `${String(W).padStart(2, "0")}/${String(j).padStart(
1295
+ }), S = h(() => (t.value ?? "").length === 10 && x.value.length === 8), L = (n, y, C) => {
1296
+ const z = /* @__PURE__ */ new Date(0);
1297
+ return z.setFullYear(n, y - 1, C), z.setHours(0, 0, 0, 0), z;
1298
+ }, H = (n, y) => L(n, y + 1, 0).getDate(), q = (n, y, C) => y >= 1 && y <= 12 && n >= w && C >= 1 && C <= H(n, y), Y = (n) => {
1299
+ t.value = n.value;
1300
+ const y = n.event?.target;
1301
+ r.value = y?.selectionStart ?? 0, u(n);
1302
+ }, J = (n) => {
1303
+ r.value = n.target.selectionStart ?? 0;
1304
+ }, s = (n, y, C) => {
1305
+ const z = y?.selectionStart ?? r.value ?? 0;
1306
+ r.value = z;
1307
+ let K = parseInt(M.value), _ = parseInt(E.value), a = parseInt(F.value);
1308
+ if (!(x.value.length >= 8) || !q(a, K, _)) {
1309
+ const G = e.defaultValue ?? /* @__PURE__ */ new Date();
1310
+ K = G.getMonth() + 1, _ = G.getDate(), a = G.getFullYear(), t.value = `${String(K).padStart(2, "0")}/${String(_).padStart(
1266
1311
  2,
1267
1312
  "0"
1268
- )}/${String(n)}`;
1269
- const ce = R(n, W, j);
1270
- e.onChange({ value: i(ce) ? ce : null, event: L }), l({ useRAF: !0 });
1313
+ )}/${String(a)}`;
1314
+ const ce = L(a, K, _);
1315
+ e.onChange({ value: i(ce) ? ce : null, event: C }), A({ useRAF: !0 });
1271
1316
  return;
1272
1317
  }
1273
- const P = $(Z);
1274
- if (P === "mm")
1275
- W = a === "ArrowUp" ? W < 12 ? W + 1 : 1 : W > 1 ? W - 1 : 12;
1276
- else if (P === "dd") {
1277
- const _ = new Date(n, W, 0).getDate();
1278
- j = a === "ArrowUp" ? j < _ ? j + 1 : 1 : j > 1 ? j - 1 : _;
1279
- } else P === "yyyy" && (n = a === "ArrowUp" ? n + 1 : Math.max(1, n - 1));
1280
- t.value = `${String(W).padStart(2, "0")}/${String(j).padStart(
1318
+ const O = V(z);
1319
+ if (O === "mm")
1320
+ K = n === "ArrowUp" ? K < 12 ? K + 1 : 1 : K > 1 ? K - 1 : 12;
1321
+ else if (O === "dd") {
1322
+ const G = new Date(a, K, 0).getDate();
1323
+ _ = n === "ArrowUp" ? _ < G ? _ + 1 : 1 : _ > 1 ? _ - 1 : G;
1324
+ } else O === "yyyy" && (a = n === "ArrowUp" ? a + 1 : Math.max(1, a - 1));
1325
+ t.value = `${String(K).padStart(2, "0")}/${String(_).padStart(
1281
1326
  2,
1282
1327
  "0"
1283
- )}/${String(n)}`;
1284
- const [B, G, te] = t.value.split("/"), z = R(
1285
- parseInt(te),
1286
- parseInt(B),
1287
- parseInt(G)
1328
+ )}/${String(a)}`;
1329
+ const [X, Q, re] = t.value.split("/"), W = L(
1330
+ parseInt(re),
1331
+ parseInt(X),
1332
+ parseInt(Q)
1288
1333
  );
1289
- z.toString() !== "Invalid Date" && parseInt(te) >= 1e3 ? e.onChange({
1290
- value: i(z) ? z : null,
1291
- event: L
1292
- }) : e.onChange({ value: null, event: L }), l({ useRAF: !0 });
1293
- }, k = (a) => {
1294
- if (a.code === "Space" || a.key === " ") {
1295
- a.preventDefault(), a.stopPropagation(), e.onShowCalendar(a);
1334
+ W.toString() !== "Invalid Date" && parseInt(re) >= 1e3 ? e.onChange({
1335
+ value: i(W) ? W : null,
1336
+ event: C
1337
+ }) : e.onChange({ value: null, event: C }), A({ useRAF: !0 });
1338
+ }, k = (n) => {
1339
+ if (n.code === "Space" || n.key === " ") {
1340
+ n.preventDefault(), n.stopPropagation(), e.onShowCalendar(n);
1296
1341
  return;
1297
1342
  }
1298
- if (a.key === "ArrowDown" && a.altKey) {
1299
- a.preventDefault(), a.stopPropagation(), e.onShowCalendar(a);
1343
+ if (n.key === "ArrowDown" && n.altKey) {
1344
+ n.preventDefault(), n.stopPropagation(), e.onShowCalendar(n);
1300
1345
  return;
1301
1346
  }
1302
- if (F.includes(a.key)) {
1303
- if (a.altKey) return;
1304
- a.preventDefault(), a.stopPropagation();
1305
- const b = a.target;
1306
- u(a.key, b, a);
1347
+ if (P.includes(n.key)) {
1348
+ if (n.altKey) return;
1349
+ n.preventDefault(), n.stopPropagation();
1350
+ const y = n.target;
1351
+ s(n.key, y, n);
1307
1352
  return;
1308
1353
  }
1309
- }, y = (a) => {
1310
- a.preventDefault();
1311
- const b = a.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1312
- u(b, a.target, a);
1313
- }, w = (a) => {
1314
- const b = a.target;
1315
- if (N.includes(a.key)) {
1316
- r.value = b?.selectionStart ?? 0;
1354
+ }, g = (n) => {
1355
+ n.preventDefault();
1356
+ const y = n.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1357
+ s(y, n.target, n);
1358
+ }, b = (n) => {
1359
+ const y = n.target;
1360
+ if (N.includes(n.key)) {
1361
+ r.value = y?.selectionStart ?? 0;
1317
1362
  return;
1318
1363
  }
1319
- if (F.includes(a.key)) {
1320
- if (a.altKey) return;
1321
- r.value = b?.selectionStart ?? 0;
1364
+ if (P.includes(n.key)) {
1365
+ if (n.altKey) return;
1366
+ r.value = y?.selectionStart ?? 0;
1322
1367
  }
1323
- }, T = (a) => {
1324
- I.value = !0, f.value && !e.defaultValue && e.externalValue && e.externalValue.value === void 0 && E.value.length === 0 && (e.externalValue.value = "");
1325
- const b = a.target;
1326
- b && (r.value = b.selectionStart ?? 0);
1327
- }, l = (a) => {
1328
- const b = () => {
1329
- const L = document.getElementById(
1368
+ }, R = (n) => {
1369
+ D.value = !0, d.value && !e.defaultValue && e.externalValue && e.externalValue.value === void 0 && x.value.length === 0 && (e.externalValue.value = "");
1370
+ const y = n.target;
1371
+ y && (r.value = y.selectionStart ?? 0);
1372
+ }, A = (n) => {
1373
+ const y = () => {
1374
+ const C = document.getElementById(
1330
1375
  e.id
1331
1376
  );
1332
- if (!L) return;
1333
- const Z = a?.pos ?? r.value ?? L.value.length;
1377
+ if (!C) return;
1378
+ const z = n?.pos ?? r.value ?? C.value.length;
1334
1379
  try {
1335
- L.focus(), L.setSelectionRange(Z, Z);
1380
+ C.focus(), C.setSelectionRange(z, z);
1336
1381
  } catch {
1337
1382
  }
1338
1383
  };
1339
- H(() => {
1340
- if (a?.delay && a.delay > 0) {
1341
- setTimeout(b, a.delay);
1384
+ j(() => {
1385
+ if (n?.delay && n.delay > 0) {
1386
+ setTimeout(y, n.delay);
1342
1387
  return;
1343
1388
  }
1344
- if (a?.useRAF) {
1345
- requestAnimationFrame(b);
1389
+ if (n?.useRAF) {
1390
+ requestAnimationFrame(y);
1346
1391
  return;
1347
1392
  }
1348
- b();
1393
+ y();
1349
1394
  });
1350
1395
  };
1351
1396
  e.externalValue && se(
1352
1397
  e.externalValue,
1353
- (a) => {
1354
- if (a) {
1355
- const b = new Date(a);
1356
- if (b.toString() !== "Invalid Date") {
1357
- const L = (b.getMonth() + 1).toString().padStart(2, "0"), Z = b.getDate().toString().padStart(2, "0"), W = b.getFullYear().toString();
1358
- t.value = `${L}/${Z}/${W}`, l({ delay: 50 });
1398
+ (n) => {
1399
+ if (n) {
1400
+ const y = new Date(n);
1401
+ if (y.toString() !== "Invalid Date") {
1402
+ const C = (y.getMonth() + 1).toString().padStart(2, "0"), z = y.getDate().toString().padStart(2, "0"), K = y.getFullYear().toString();
1403
+ t.value = `${C}/${z}/${K}`, A({ delay: 50 });
1359
1404
  return;
1360
1405
  }
1361
1406
  }
1362
1407
  },
1363
1408
  { immediate: !0 }
1364
1409
  );
1365
- const p = h(() => [
1366
- ["Date", `${x.value} / ${D.value} / ${C.value}`],
1367
- ["Digits only", E.value],
1410
+ const $ = h(() => [
1411
+ ["Date", `${M.value} / ${E.value} / ${F.value}`],
1412
+ ["Digits only", x.value],
1368
1413
  [
1369
1414
  "min",
1370
1415
  e.min?.toLocaleDateString("en-US", {
@@ -1381,67 +1426,67 @@ function kt(e) {
1381
1426
  day: "2-digit"
1382
1427
  }) ?? null
1383
1428
  ]
1384
- ]), V = h(() => {
1385
- if (!f.value) {
1429
+ ]), B = h(() => {
1430
+ if (!d.value) {
1386
1431
  if (!S.value) return !0;
1387
- const b = m.value;
1388
- return b ? i(b) : !1;
1432
+ const y = p.value;
1433
+ return y ? i(y) : !1;
1389
1434
  }
1390
- if (!I.value) return !0;
1391
- const a = m.value;
1392
- return !S.value || !a ? !1 : i(a);
1393
- }), U = h(() => {
1394
- if (!f.value) {
1435
+ if (!D.value) return !0;
1436
+ const n = p.value;
1437
+ return !S.value || !n ? !1 : i(n);
1438
+ }), f = h(() => {
1439
+ if (!d.value) {
1395
1440
  if (!S.value) return;
1396
- const b = m.value;
1397
- return b ? i(b) ? "valid" : "out-of-bounds" : "invalid-date";
1441
+ const y = p.value;
1442
+ return y ? i(y) ? "valid" : "out-of-bounds" : "invalid-date";
1398
1443
  }
1399
- if (!I.value) return;
1400
- if (E.value.length === 0 || !S.value)
1444
+ if (!D.value) return;
1445
+ if (x.value.length === 0 || !S.value)
1401
1446
  return "incomplete";
1402
- const a = m.value;
1403
- return a ? i(a) ? "valid" : "out-of-bounds" : "invalid-date";
1404
- }), ae = h(() => {
1405
- const a = U.value;
1406
- if (!a || a === "valid") return "";
1407
- if (a === "incomplete")
1447
+ const n = p.value;
1448
+ return n ? i(n) ? "valid" : "out-of-bounds" : "invalid-date";
1449
+ }), I = h(() => {
1450
+ const n = f.value;
1451
+ if (!n || n === "valid") return "";
1452
+ if (n === "incomplete")
1408
1453
  return "Required";
1409
- if (a === "invalid-date")
1410
- return `Must be in ${s.value} format.`;
1411
- const b = e.min ? e.min.toLocaleDateString("en-US", {
1454
+ if (n === "invalid-date")
1455
+ return `Must be in ${l.value} format.`;
1456
+ const y = e.min ? e.min.toLocaleDateString("en-US", {
1412
1457
  year: "numeric",
1413
1458
  month: "2-digit",
1414
1459
  day: "2-digit"
1415
- }) : null, L = e.max ? e.max.toLocaleDateString("en-US", {
1460
+ }) : null, C = e.max ? e.max.toLocaleDateString("en-US", {
1416
1461
  year: "numeric",
1417
1462
  month: "2-digit",
1418
1463
  day: "2-digit"
1419
1464
  }) : null;
1420
- if (a === "out-of-bounds") {
1421
- if (b && L) return `Must be between ${b} and ${L}.`;
1422
- if (b) return `Must be on or after ${b}.`;
1423
- if (L) return `Must be on or before ${L}.`;
1465
+ if (n === "out-of-bounds") {
1466
+ if (y && C) return `Must be between ${y} and ${C}.`;
1467
+ if (y) return `Must be on or after ${y}.`;
1468
+ if (C) return `Must be on or before ${C}.`;
1424
1469
  }
1425
1470
  return "";
1426
- }), ne = () => {
1427
- H(() => {
1428
- const a = document.getElementById(
1471
+ }), ee = () => {
1472
+ j(() => {
1473
+ const n = document.getElementById(
1429
1474
  e.id
1430
1475
  );
1431
- if (!a) {
1476
+ if (!n) {
1432
1477
  console.warn(`ID (#${e.id}) not found for styling.`);
1433
1478
  return;
1434
1479
  }
1435
- const b = a.closest(".k-datepicker");
1436
- if (!b) {
1480
+ const y = n.closest(".k-datepicker");
1481
+ if (!y) {
1437
1482
  console.warn(`.k-datepicker parent not found for #${e.id} styling.`);
1438
1483
  return;
1439
1484
  }
1440
- const L = b.parentElement;
1441
- if (L) {
1442
- if (L.classList.contains("fk-datepicker"))
1485
+ const C = y.parentElement;
1486
+ if (C) {
1487
+ if (C.classList.contains("fk-datepicker"))
1443
1488
  return;
1444
- L.classList.add("fk-datepicker");
1489
+ C.classList.add("fk-datepicker");
1445
1490
  } else
1446
1491
  console.warn(
1447
1492
  `Parent of .k-datepicker not found for #${e.id} styling.`
@@ -1449,67 +1494,67 @@ function kt(e) {
1449
1494
  });
1450
1495
  };
1451
1496
  return Te(() => {
1452
- ne();
1497
+ ee();
1453
1498
  }), {
1454
1499
  raw: t,
1455
1500
  cursorPos: r,
1456
- debugEnabled: g,
1457
- debugLines: p,
1458
- placeholder: s,
1459
- isValid: V,
1460
- reason: Q(U),
1461
- validationMessage: ae,
1462
- digitsOnly: E,
1463
- month: Q(x),
1464
- day: Q(D),
1465
- year: Q(C),
1466
- datePart: $,
1467
- handleChange: X,
1501
+ debugEnabled: v,
1502
+ debugLines: $,
1503
+ placeholder: l,
1504
+ isValid: B,
1505
+ reason: ne(f),
1506
+ validationMessage: I,
1507
+ digitsOnly: x,
1508
+ month: ne(M),
1509
+ day: ne(E),
1510
+ year: ne(F),
1511
+ datePart: V,
1512
+ handleChange: Y,
1468
1513
  handleKeyDown: k,
1469
- handleWheel: y,
1470
- handleKeyUp: w,
1471
- handleClick: ee,
1472
- handleBlur: T,
1514
+ handleWheel: g,
1515
+ handleKeyUp: b,
1516
+ handleClick: J,
1517
+ handleBlur: R,
1473
1518
  // Expose so consumers can re-run styling when needed
1474
- initStyling: ne
1519
+ initStyling: ee
1475
1520
  };
1476
1521
  }
1477
1522
  function Dt(e) {
1478
- const t = Y(""), r = Y(void 0), g = Y(!!e.debug), s = Y(!1), f = 1440 * 60 * 1e3, A = 365 * f, I = /* @__PURE__ */ new Date(), F = new Date(I.getTime() - A), N = new Date(I.getTime() + A);
1479
- e.min = e.min ?? F, e.max = e.max ?? N;
1480
- const E = h(() => (t.value ?? "").replace(/\D/g, "")), $ = (o, v) => new Date(o, v, 0).getDate(), x = (o, v, M) => v >= 1 && v <= 12 && o >= 1e3 && M >= 1 && M <= $(o, v), D = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), C = (o) => {
1523
+ const t = Z(""), r = Z(void 0), v = Z(!!e.debug), l = Z(!1), d = 1440 * 60 * 1e3, w = 365 * d, D = /* @__PURE__ */ new Date(), P = new Date(D.getTime() - w), N = new Date(D.getTime() + w);
1524
+ e.min = e.min ?? P, e.max = e.max ?? N;
1525
+ const x = h(() => (t.value ?? "").replace(/\D/g, "")), V = (o, m) => new Date(o, m, 0).getDate(), M = (o, m, T) => m >= 1 && m <= 12 && o >= 1e3 && T >= 1 && T <= V(o, m), E = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), F = (o) => {
1481
1526
  if (!o) return null;
1482
- const v = e.min ?? new Date(Date.now() - 90 * f), M = e.max ?? /* @__PURE__ */ new Date(), O = D(o);
1483
- return O < D(v) || O > D(M) ? null : o;
1484
- }, c = (o, v) => e.allowReverse ?? !1 ? !0 : o <= v, i = h(() => (t.value?.length ?? 0) >= 23 && E.value.length >= 16), m = (o) => {
1485
- if ((o ?? "").length < 23 || E.value.length < 16)
1527
+ const m = e.min ?? new Date(Date.now() - 90 * d), T = e.max ?? /* @__PURE__ */ new Date(), U = E(o);
1528
+ return U < E(m) || U > E(T) ? null : o;
1529
+ }, u = (o, m) => e.allowReverse ?? !1 ? !0 : o <= m, i = h(() => (t.value?.length ?? 0) >= 23 && x.value.length >= 16), p = (o) => {
1530
+ if ((o ?? "").length < 23 || x.value.length < 16)
1486
1531
  return { start: null, end: null };
1487
- const v = o.substring(0, 10), M = o.substring(13, 23), [O, oe, le] = v.split("/").map((pe) => parseInt(pe || "0", 10)), [fe, me, ve] = M.split("/").map((pe) => parseInt(pe || "0", 10)), ge = new Date(le, O - 1, oe), ye = new Date(ve, fe - 1, me), ke = x(le, O, oe) && ge.toString() !== "Invalid Date", De = x(ve, fe, me) && ye.toString() !== "Invalid Date";
1488
- return { start: ke ? ge : null, end: De ? ye : null };
1489
- }, S = e.externalValid ?? Y(!0), R = h(() => m(t.value)), K = h(() => {
1490
- const o = C(R.value.start), v = C(R.value.end);
1491
- return { start: o, end: v };
1532
+ const m = o.substring(0, 10), T = o.substring(13, 23), [U, oe, le] = m.split("/").map((pe) => parseInt(pe || "0", 10)), [fe, me, ve] = T.split("/").map((pe) => parseInt(pe || "0", 10)), ge = new Date(le, U - 1, oe), ye = new Date(ve, fe - 1, me), Ae = M(le, U, oe) && ge.toString() !== "Invalid Date", De = M(ve, fe, me) && ye.toString() !== "Invalid Date";
1533
+ return { start: Ae ? ge : null, end: De ? ye : null };
1534
+ }, S = e.externalValid ?? Z(!0), L = h(() => p(t.value)), H = h(() => {
1535
+ const o = F(L.value.start), m = F(L.value.end);
1536
+ return { start: o, end: m };
1492
1537
  }), q = h(() => {
1493
1538
  if (!i.value) return;
1494
- const o = K.value.start, v = K.value.end;
1495
- if (!o || !v) return;
1496
- const M = Math.abs(D(v) - D(o));
1497
- return Math.round(M / 864e5 + 1);
1498
- }), X = Y(!1), ee = h(() => {
1499
- if (!X.value) return;
1500
- const { start: o, end: v } = R.value;
1539
+ const o = H.value.start, m = H.value.end;
1540
+ if (!o || !m) return;
1541
+ const T = Math.abs(E(m) - E(o));
1542
+ return Math.round(T / 864e5 + 1);
1543
+ }), Y = Z(!1), J = h(() => {
1544
+ if (!Y.value) return;
1545
+ const { start: o, end: m } = L.value;
1501
1546
  if (!i.value) return "incomplete";
1502
- if (!o || !v) return "invalid-date";
1503
- if (!K.value.start || !K.value.end) return "out-of-bounds";
1504
- const M = K.value.start, O = K.value.end;
1505
- return c(M, O) ? typeof e.maxSpanDays == "number" && q.value !== void 0 && q.value > e.maxSpanDays ? "span-exceeds-limit" : "valid" : "reversed-range";
1506
- }), u = h(() => {
1507
- const o = ee.value;
1547
+ if (!o || !m) return "invalid-date";
1548
+ if (!H.value.start || !H.value.end) return "out-of-bounds";
1549
+ const T = H.value.start, U = H.value.end;
1550
+ return u(T, U) ? typeof e.maxSpanDays == "number" && q.value !== void 0 && q.value > e.maxSpanDays ? "span-exceeds-limit" : "valid" : "reversed-range";
1551
+ }), s = h(() => {
1552
+ const o = J.value;
1508
1553
  return o === void 0 || o === "valid";
1509
1554
  }), k = h(() => {
1510
- const { min: o, max: v } = e, M = ee.value;
1511
- if (!M) return "";
1512
- switch (M) {
1555
+ const { min: o, max: m } = e, T = J.value;
1556
+ if (!T) return "";
1557
+ switch (T) {
1513
1558
  case "incomplete":
1514
1559
  return "Required";
1515
1560
  case "invalid-date":
@@ -1517,22 +1562,22 @@ function Dt(e) {
1517
1562
  case "reversed-range":
1518
1563
  return "End Date must be on or after Start Date.";
1519
1564
  case "out-of-bounds":
1520
- return o && v ? `Dates must be between ${l(o)} and ${l(v)}.` : "Dates must be within the allowed range.";
1565
+ return o && m ? `Dates must be between ${A(o)} and ${A(m)}.` : "Dates must be within the allowed range.";
1521
1566
  case "span-exceeds-limit":
1522
1567
  return typeof e.maxSpanDays == "number" ? `Date range exceeds ${e.maxSpanDays} days.` : "Date range exceeds maximum allowed span.";
1523
1568
  default:
1524
1569
  return "";
1525
1570
  }
1526
- }), y = ["ArrowUp", "ArrowDown"], w = ["ArrowLeft", "ArrowRight"], T = (o, v) => String(o).padStart(v, "0"), l = (o) => `${T(o.getMonth() + 1, 2)}/${T(o.getDate(), 2)}/${T(
1571
+ }), g = ["ArrowUp", "ArrowDown"], b = ["ArrowLeft", "ArrowRight"], R = (o, m) => String(o).padStart(m, "0"), A = (o) => `${R(o.getMonth() + 1, 2)}/${R(o.getDate(), 2)}/${R(
1527
1572
  o.getFullYear(),
1528
1573
  4
1529
- )}`, p = (o) => o <= 2 ? { side: "start", part: "mm" } : o <= 5 ? { side: "start", part: (o <= 3, "dd") } : o <= 11 ? { side: "start", part: "yyyy" } : o <= 15 ? { side: "end", part: "mm" } : o <= 18 ? { side: "end", part: "dd" } : { side: "end", part: "yyyy" }, V = (o, v, M) => {
1530
- const O = v?.selectionStart ?? r.value ?? 0;
1531
- r.value = O;
1532
- const { start: oe, end: le } = m(t.value);
1574
+ )}`, $ = (o) => o <= 2 ? { side: "start", part: "mm" } : o <= 5 ? { side: "start", part: (o <= 3, "dd") } : o <= 11 ? { side: "start", part: "yyyy" } : o <= 15 ? { side: "end", part: "mm" } : o <= 18 ? { side: "end", part: "dd" } : { side: "end", part: "yyyy" }, B = (o, m, T) => {
1575
+ const U = m?.selectionStart ?? r.value ?? 0;
1576
+ r.value = U;
1577
+ const { start: oe, end: le } = p(t.value);
1533
1578
  if (!oe && !le) {
1534
- const J = /* @__PURE__ */ new Date(), de = l(J);
1535
- t.value = `${de} - ${de}`, e.onChange({ value: { start: J, end: J }, event: M }), H(() => {
1579
+ const te = /* @__PURE__ */ new Date(), de = A(te);
1580
+ t.value = `${de} - ${de}`, e.onChange({ value: { start: te, end: te }, event: T }), j(() => {
1536
1581
  requestAnimationFrame(() => {
1537
1582
  const ie = document.getElementById(
1538
1583
  e.id
@@ -1542,64 +1587,64 @@ function Dt(e) {
1542
1587
  });
1543
1588
  return;
1544
1589
  }
1545
- const fe = /* @__PURE__ */ new Date(), me = p(O);
1590
+ const fe = /* @__PURE__ */ new Date(), me = $(U);
1546
1591
  let ve = oe ? new Date(oe) : new Date(fe), ge = le ? new Date(le) : new Date(fe);
1547
- const ye = (J, de) => {
1592
+ const ye = (te, de) => {
1548
1593
  if (de === "mm") {
1549
- const ie = J.getMonth() + 1, ue = o === "ArrowUp" ? ie < 12 ? ie + 1 : 1 : ie > 1 ? ie - 1 : 12;
1550
- J.setMonth(ue - 1);
1551
- const be = $(J.getFullYear(), ue);
1552
- J.getDate() > be && J.setDate(be);
1594
+ const ie = te.getMonth() + 1, ue = o === "ArrowUp" ? ie < 12 ? ie + 1 : 1 : ie > 1 ? ie - 1 : 12;
1595
+ te.setMonth(ue - 1);
1596
+ const Se = V(te.getFullYear(), ue);
1597
+ te.getDate() > Se && te.setDate(Se);
1553
1598
  } else if (de === "dd") {
1554
- const ie = $(J.getFullYear(), J.getMonth() + 1), ue = J.getDate(), be = o === "ArrowUp" ? ue < ie ? ue + 1 : 1 : ue > 1 ? ue - 1 : ie;
1555
- J.setDate(be);
1599
+ const ie = V(te.getFullYear(), te.getMonth() + 1), ue = te.getDate(), Se = o === "ArrowUp" ? ue < ie ? ue + 1 : 1 : ue > 1 ? ue - 1 : ie;
1600
+ te.setDate(Se);
1556
1601
  } else if (de === "yyyy") {
1557
- const ie = J.getFullYear();
1558
- J.setFullYear(o === "ArrowUp" ? ie + 1 : Math.max(1, ie - 1));
1559
- const ue = $(J.getFullYear(), J.getMonth() + 1);
1560
- J.getDate() > ue && J.setDate(ue);
1602
+ const ie = te.getFullYear();
1603
+ te.setFullYear(o === "ArrowUp" ? ie + 1 : Math.max(1, ie - 1));
1604
+ const ue = V(te.getFullYear(), te.getMonth() + 1);
1605
+ te.getDate() > ue && te.setDate(ue);
1561
1606
  }
1562
1607
  };
1563
1608
  me.side === "start" ? ye(ve, me.part) : ye(ge, me.part);
1564
- const ke = l(ve), De = l(ge);
1565
- t.value = `${ke} - ${De}`;
1566
- const pe = C(ve), Ee = C(ge);
1567
- pe && Ee && c(pe, Ee) ? e.onChange({ value: { start: pe, end: Ee }, event: M }) : e.onChange({ value: null, event: M }), H(() => {
1609
+ const Ae = A(ve), De = A(ge);
1610
+ t.value = `${Ae} - ${De}`;
1611
+ const pe = F(ve), Ee = F(ge);
1612
+ pe && Ee && u(pe, Ee) ? e.onChange({ value: { start: pe, end: Ee }, event: T }) : e.onChange({ value: null, event: T }), j(() => {
1568
1613
  requestAnimationFrame(() => {
1569
- const J = document.getElementById(
1614
+ const te = document.getElementById(
1570
1615
  e.id
1571
1616
  ), de = r.value ?? 0;
1572
- J && (J.focus(), J.setSelectionRange(de, de));
1617
+ te && (te.focus(), te.setSelectionRange(de, de));
1573
1618
  });
1574
1619
  });
1575
- }, U = (o) => {
1576
- const { start: v, end: M } = m(t.value);
1577
- if (!v || !M) {
1620
+ }, f = (o) => {
1621
+ const { start: m, end: T } = p(t.value);
1622
+ if (!m || !T) {
1578
1623
  e.onChange({ value: null, event: o });
1579
1624
  return;
1580
1625
  }
1581
- const O = C(v), oe = C(M);
1582
- if (!O || !oe) {
1626
+ const U = F(m), oe = F(T);
1627
+ if (!U || !oe) {
1583
1628
  e.onChange({ value: null, event: o });
1584
1629
  return;
1585
1630
  }
1586
- if (!c(O, oe)) {
1631
+ if (!u(U, oe)) {
1587
1632
  e.onChange({ value: null, event: o });
1588
1633
  return;
1589
1634
  }
1590
- e.onChange({ value: { start: O, end: oe }, event: o });
1591
- }, ae = (o) => {
1592
- const v = o.value ?? "", M = o.event;
1593
- if (!v && M && M.type === "click") {
1594
- j(M);
1635
+ e.onChange({ value: { start: U, end: oe }, event: o });
1636
+ }, I = (o) => {
1637
+ const m = o.value ?? "", T = o.event;
1638
+ if (!m && T && T.type === "click") {
1639
+ _(T);
1595
1640
  return;
1596
1641
  }
1597
- t.value = v;
1598
- const O = M?.target;
1599
- r.value = O?.selectionStart ?? 0, U(o);
1600
- }, ne = (o) => {
1642
+ t.value = m;
1643
+ const U = T?.target;
1644
+ r.value = U?.selectionStart ?? 0, f(o);
1645
+ }, ee = (o) => {
1601
1646
  r.value = o.target.selectionStart ?? 0;
1602
- }, a = (o) => {
1647
+ }, n = (o) => {
1603
1648
  if (o.code === "Space" || o.key === " ") {
1604
1649
  o.preventDefault(), o.stopPropagation(), e.onShowCalendar(o);
1605
1650
  return;
@@ -1608,63 +1653,63 @@ function Dt(e) {
1608
1653
  o.preventDefault(), o.stopPropagation(), e.onShowCalendar(o);
1609
1654
  return;
1610
1655
  }
1611
- if (y.includes(o.key)) {
1656
+ if (g.includes(o.key)) {
1612
1657
  o.preventDefault(), o.stopPropagation();
1613
- const v = o.target;
1614
- V(o.key, v, o);
1658
+ const m = o.target;
1659
+ B(o.key, m, o);
1615
1660
  return;
1616
1661
  }
1617
- }, b = (o) => {
1662
+ }, y = (o) => {
1618
1663
  o.preventDefault();
1619
- const v = o.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1620
- V(v, o.target, o);
1621
- }, L = (o) => {
1622
- if (w.includes(o.key) || y.includes(o.key)) {
1623
- const v = o.target;
1624
- r.value = v?.selectionStart ?? 0;
1664
+ const m = o.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1665
+ B(m, o.target, o);
1666
+ }, C = (o) => {
1667
+ if (b.includes(o.key) || g.includes(o.key)) {
1668
+ const m = o.target;
1669
+ r.value = m?.selectionStart ?? 0;
1625
1670
  }
1626
- }, Z = () => {
1627
- X.value = !0, (e.manageValid ?? !0) && (S.value = u.value);
1628
- }, W = (o) => {
1629
- Z();
1630
- }, j = (o) => {
1631
- t.value = "", r.value = 0, e.onChange({ value: null, event: o }), Z(), H(() => {
1632
- const v = document.getElementById(
1671
+ }, z = () => {
1672
+ Y.value = !0, (e.manageValid ?? !0) && (S.value = s.value);
1673
+ }, K = (o) => {
1674
+ z();
1675
+ }, _ = (o) => {
1676
+ t.value = "", r.value = 0, e.onChange({ value: null, event: o }), z(), j(() => {
1677
+ const m = document.getElementById(
1633
1678
  e.id
1634
1679
  );
1635
- v && (v.focus(), v.setSelectionRange(0, 0));
1680
+ m && (m.focus(), m.setSelectionRange(0, 0));
1636
1681
  });
1637
1682
  };
1638
1683
  e.externalValue && se(
1639
1684
  e.externalValue,
1640
1685
  (o) => {
1641
- const v = o?.start ?? null, M = o?.end ?? null;
1642
- if (v && M) {
1643
- if (t.value = `${l(v)} - ${l(M)}`, e.isOpen?.value && s.value && e.onRequestClose) {
1644
- const O = typeof e.closeDelay == "number" ? e.closeDelay : e.closeDelay?.value ?? 0;
1686
+ const m = o?.start ?? null, T = o?.end ?? null;
1687
+ if (m && T) {
1688
+ if (t.value = `${A(m)} - ${A(T)}`, e.isOpen?.value && l.value && e.onRequestClose) {
1689
+ const U = typeof e.closeDelay == "number" ? e.closeDelay : e.closeDelay?.value ?? 0;
1645
1690
  setTimeout(() => {
1646
- e.onRequestClose?.(), s.value = !1, Z();
1647
- }, O);
1691
+ e.onRequestClose?.(), l.value = !1, z();
1692
+ }, U);
1648
1693
  }
1649
1694
  return;
1650
1695
  }
1651
1696
  },
1652
1697
  { immediate: !0 }
1653
1698
  );
1654
- const n = h(
1699
+ const a = h(
1655
1700
  () => t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0"
1656
- ), d = h(
1701
+ ), c = h(
1657
1702
  () => t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0"
1658
- ), P = h(
1703
+ ), O = h(
1659
1704
  () => t.value && t.value.substring(6, 10).replace(/\D/g, "0") || "0"
1660
- ), B = h(
1705
+ ), X = h(
1661
1706
  () => t.value && t.value.substring(13, 15).replace(/\D/g, "0") || "0"
1662
- ), G = h(
1707
+ ), Q = h(
1663
1708
  () => t.value && t.value.substring(16, 18).replace(/\D/g, "0") || "0"
1664
- ), te = h(
1709
+ ), re = h(
1665
1710
  () => t.value && t.value.substring(19, 23).replace(/\D/g, "0") || "0"
1666
- ), z = h(() => {
1667
- const { start: o, end: v } = m(t.value);
1711
+ ), W = h(() => {
1712
+ const { start: o, end: m } = p(t.value);
1668
1713
  return [
1669
1714
  {
1670
1715
  label: "Raw",
@@ -1680,21 +1725,21 @@ function Dt(e) {
1680
1725
  },
1681
1726
  {
1682
1727
  label: "Start",
1683
- value: `${String(n.value).padStart(2, "0")} / ${String(
1684
- d.value
1685
- ).padStart(2, "0")} / ${String(P.value).padStart(4, "0")}`
1728
+ value: `${String(a.value).padStart(2, "0")} / ${String(
1729
+ c.value
1730
+ ).padStart(2, "0")} / ${String(O.value).padStart(4, "0")}`
1686
1731
  },
1687
1732
  {
1688
1733
  label: "End",
1689
- value: `${String(B.value).padStart(2, "0")} / ${String(
1690
- G.value
1691
- ).padStart(2, "0")} / ${String(te.value).padStart(4, "0")}`
1734
+ value: `${String(X.value).padStart(2, "0")} / ${String(
1735
+ Q.value
1736
+ ).padStart(2, "0")} / ${String(re.value).padStart(4, "0")}`
1692
1737
  },
1693
- { label: "Digits only", value: E.value },
1738
+ { label: "Digits only", value: x.value },
1694
1739
  { label: "Mask complete", value: `${i.value}` },
1695
1740
  {
1696
1741
  label: "Parsed",
1697
- value: `${o ? o.toDateString() : "-"} | ${v ? v.toDateString() : "-"}`
1742
+ value: `${o ? o.toDateString() : "-"} | ${m ? m.toDateString() : "-"}`
1698
1743
  },
1699
1744
  {
1700
1745
  label: "Valid (managed)",
@@ -1703,50 +1748,50 @@ function Dt(e) {
1703
1748
  { label: "Span (days)", value: `${q.value ?? "-"}` },
1704
1749
  {
1705
1750
  label: "Reason",
1706
- value: `${ee.value ?? "-"}`
1751
+ value: `${J.value ?? "-"}`
1707
1752
  },
1708
1753
  {
1709
1754
  label: "Cursor in",
1710
1755
  value: `${r.value ?? "-"} (${(() => {
1711
- const M = r.value ?? 0, O = p(M);
1712
- return `${O.side}.${O.part}`;
1756
+ const T = r.value ?? 0, U = $(T);
1757
+ return `${U.side}.${U.part}`;
1713
1758
  })()})`
1714
1759
  }
1715
1760
  ];
1716
- }), _ = () => {
1717
- H(() => {
1761
+ }), G = () => {
1762
+ j(() => {
1718
1763
  const o = document.getElementById(e.id);
1719
1764
  if (!o) {
1720
1765
  console.warn(`#${e.id} not found for styling.`);
1721
1766
  return;
1722
1767
  }
1723
- const v = o.closest("div");
1724
- if (!v) {
1768
+ const m = o.closest("div");
1769
+ if (!m) {
1725
1770
  console.warn(`Parent div of #${e.id} not found for styling.`);
1726
1771
  return;
1727
1772
  }
1728
- v.classList.contains("fk-daterangepicker") || v.classList.add("fk-daterangepicker");
1773
+ m.classList.contains("fk-daterangepicker") || m.classList.add("fk-daterangepicker");
1729
1774
  });
1730
1775
  };
1731
1776
  Te(() => {
1732
- _();
1777
+ G();
1733
1778
  });
1734
1779
  const ce = () => {
1735
- H(() => {
1780
+ j(() => {
1736
1781
  try {
1737
1782
  const o = Array.from(
1738
1783
  document.querySelectorAll(".k-animation-container")
1739
1784
  );
1740
1785
  if (!o.length) return;
1741
- const M = [...o].reverse().find((le) => le.querySelector(".k-calendar"))?.querySelector(
1786
+ const T = [...o].reverse().find((le) => le.querySelector(".k-calendar"))?.querySelector(
1742
1787
  ".k-calendar"
1743
1788
  );
1744
- if (!M) return;
1745
- const O = M.querySelectorAll(
1789
+ if (!T) return;
1790
+ const U = T.querySelectorAll(
1746
1791
  ".k-calendar-table"
1747
1792
  );
1748
1793
  let oe = !1;
1749
- O.forEach((le) => {
1794
+ U.forEach((le) => {
1750
1795
  le.tabIndex === 0 && (oe ? le.tabIndex = -1 : oe = !0);
1751
1796
  });
1752
1797
  } catch (o) {
@@ -1763,170 +1808,170 @@ function Dt(e) {
1763
1808
  ), {
1764
1809
  raw: t,
1765
1810
  cursorPos: r,
1766
- debugEnabled: g,
1767
- debugLines: z,
1768
- digitsOnly: E,
1811
+ debugEnabled: v,
1812
+ debugLines: W,
1813
+ digitsOnly: x,
1769
1814
  valid: S,
1770
- validComputed: Q(u),
1771
- reason: Q(ee),
1772
- validationMessage: Q(k),
1773
- spanDays: Q(q),
1774
- month1: Q(n),
1775
- day1: Q(d),
1776
- year1: Q(P),
1777
- month2: Q(B),
1778
- day2: Q(G),
1779
- year2: Q(te),
1780
- handleChange: ae,
1781
- handleKeyDown: a,
1782
- handleWheel: b,
1783
- handleKeyUp: L,
1784
- handleClick: ne,
1785
- handleBlur: W,
1786
- handleClear: j,
1815
+ validComputed: ne(s),
1816
+ reason: ne(J),
1817
+ validationMessage: ne(k),
1818
+ spanDays: ne(q),
1819
+ month1: ne(a),
1820
+ day1: ne(c),
1821
+ year1: ne(O),
1822
+ month2: ne(X),
1823
+ day2: ne(Q),
1824
+ year2: ne(re),
1825
+ handleChange: I,
1826
+ handleKeyDown: n,
1827
+ handleWheel: y,
1828
+ handleKeyUp: C,
1829
+ handleClick: ee,
1830
+ handleBlur: K,
1831
+ handleClear: _,
1787
1832
  onCalendarChange: () => {
1788
- s.value = !0;
1833
+ l.value = !0;
1789
1834
  },
1790
- initStyling: _
1835
+ initStyling: G
1791
1836
  };
1792
1837
  }
1793
1838
  function Et(e) {
1794
- const t = Y(""), r = Y(void 0), g = Y(!!e.debug), s = Y(e.timeFormat ?? "hh:mm AM"), f = h(() => !!e.required), A = Y(!1), I = ["ArrowUp", "ArrowDown"], F = ["ArrowLeft", "ArrowRight"], N = h(() => (t.value ?? "").replace(/\D/g, "")), E = {
1839
+ const t = Z(""), r = Z(void 0), v = Z(!!e.debug), l = Z(e.timeFormat ?? "hh:mm AM"), d = h(() => !!e.required), w = Z(!1), D = ["ArrowUp", "ArrowDown"], P = ["ArrowLeft", "ArrowRight"], N = h(() => (t.value ?? "").replace(/\D/g, "")), x = {
1795
1840
  H: /[0-9]/,
1796
1841
  h: /[0-9]/,
1797
1842
  M: /[0-9]/,
1798
1843
  m: /[0-9]/,
1799
1844
  A: /[AaPp]/,
1800
1845
  a: /[Mm]/
1801
- }, $ = (n) => n <= 2 ? "hh" : n <= 5 ? "mm" : "ampm", x = h(() => {
1802
- const n = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0", d = parseInt(n);
1803
- return Math.min(Math.max(d, 0), 23);
1804
- }), D = h(() => {
1805
- const n = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0", d = parseInt(n);
1806
- return Math.min(Math.max(d, 0), 59);
1807
- }), C = h(() => (t.value?.substring(6, 8) || "AM").toUpperCase().startsWith("P") ? "PM" : "AM"), c = h(() => {
1808
- const n = parseInt(t.value?.substring(0, 2).replace(/\D/g, "0") || "0"), d = C.value;
1809
- return n === 12 ? d === "AM" ? 0 : 12 : d === "PM" ? n + 12 : n;
1810
- }), i = h(() => m.value ? `${String(c.value).padStart(2, "0")}:${String(D.value).padStart(2, "0")}:00` : null), m = h(
1846
+ }, V = (a) => a <= 2 ? "hh" : a <= 5 ? "mm" : "ampm", M = h(() => {
1847
+ const a = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0", c = parseInt(a);
1848
+ return Math.min(Math.max(c, 0), 23);
1849
+ }), E = h(() => {
1850
+ const a = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0", c = parseInt(a);
1851
+ return Math.min(Math.max(c, 0), 59);
1852
+ }), F = h(() => (t.value?.substring(6, 8) || "AM").toUpperCase().startsWith("P") ? "PM" : "AM"), u = h(() => {
1853
+ const a = parseInt(t.value?.substring(0, 2).replace(/\D/g, "0") || "0"), c = F.value;
1854
+ return a === 12 ? c === "AM" ? 0 : 12 : c === "PM" ? a + 12 : a;
1855
+ }), i = h(() => p.value ? `${String(u.value).padStart(2, "0")}:${String(E.value).padStart(2, "0")}:00` : null), p = h(
1811
1856
  () => /^(\d{2}):(\d{2})\s([AP]M)$/i.test(t.value ?? "")
1812
- ), S = (n, d, P) => {
1813
- let B = n % 12;
1814
- return B === 0 && (B = 12), `${String(B).padStart(2, "0")}:${String(d).padStart(
1857
+ ), S = (a, c, O) => {
1858
+ let X = a % 12;
1859
+ return X === 0 && (X = 12), `${String(X).padStart(2, "0")}:${String(c).padStart(
1815
1860
  2,
1816
1861
  "0"
1817
- )} ${P}`;
1818
- }, R = (n) => {
1819
- const d = n.match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
1820
- if (!d) return null;
1821
- const P = parseInt(d[1]), B = parseInt(d[2]), G = d[3].toUpperCase();
1822
- if (P < 1 || P > 12 || B < 0 || B > 59) return null;
1823
- let te = P % 12;
1824
- G === "PM" && (te += 12);
1825
- const z = /* @__PURE__ */ new Date();
1826
- return z.setSeconds(0, 0), z.setHours(te), z.setMinutes(B), z;
1827
- }, K = (n) => {
1862
+ )} ${O}`;
1863
+ }, L = (a) => {
1864
+ const c = a.match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
1865
+ if (!c) return null;
1866
+ const O = parseInt(c[1]), X = parseInt(c[2]), Q = c[3].toUpperCase();
1867
+ if (O < 1 || O > 12 || X < 0 || X > 59) return null;
1868
+ let re = O % 12;
1869
+ Q === "PM" && (re += 12);
1870
+ const W = /* @__PURE__ */ new Date();
1871
+ return W.setSeconds(0, 0), W.setHours(re), W.setMinutes(X), W;
1872
+ }, H = (a) => {
1828
1873
  if (N.value.length === 0) {
1829
- e.onChange({ value: null, event: n });
1874
+ e.onChange({ value: null, event: a });
1830
1875
  return;
1831
1876
  }
1832
- if (!m.value) {
1833
- e.onChange({ value: null, event: n });
1877
+ if (!p.value) {
1878
+ e.onChange({ value: null, event: a });
1834
1879
  return;
1835
1880
  }
1836
- const d = R(t.value);
1837
- d && X(d) ? e.onChange({ value: d, event: n }) : e.onChange({ value: null, event: n });
1838
- }, q = (n) => n.getHours() * 60 + n.getMinutes(), X = (n) => {
1839
- const d = e.min ?? void 0, P = e.max ?? void 0, B = q(n);
1840
- if (d) {
1841
- const G = q(d);
1842
- if (B < G) return !1;
1881
+ const c = L(t.value);
1882
+ c && Y(c) ? e.onChange({ value: c, event: a }) : e.onChange({ value: null, event: a });
1883
+ }, q = (a) => a.getHours() * 60 + a.getMinutes(), Y = (a) => {
1884
+ const c = e.min ?? void 0, O = e.max ?? void 0, X = q(a);
1885
+ if (c) {
1886
+ const Q = q(c);
1887
+ if (X < Q) return !1;
1843
1888
  }
1844
- if (P) {
1845
- const G = q(P);
1846
- if (B > G) return !1;
1889
+ if (O) {
1890
+ const Q = q(O);
1891
+ if (X > Q) return !1;
1847
1892
  }
1848
1893
  return !0;
1849
- }, ee = (n) => {
1850
- const d = n.getHours(), P = d >= 12 ? "PM" : "AM";
1851
- t.value = S(d, n.getMinutes(), P);
1852
- }, u = (n, d) => {
1853
- e.onChange({ value: n, event: d });
1894
+ }, J = (a) => {
1895
+ const c = a.getHours(), O = c >= 12 ? "PM" : "AM";
1896
+ t.value = S(c, a.getMinutes(), O);
1897
+ }, s = (a, c) => {
1898
+ e.onChange({ value: a, event: c });
1854
1899
  }, k = () => {
1855
- H(() => {
1900
+ j(() => {
1856
1901
  requestAnimationFrame(() => {
1857
1902
  requestAnimationFrame(() => {
1858
- const n = document.getElementById(
1903
+ const a = document.getElementById(
1859
1904
  e.id
1860
1905
  );
1861
- if (n) {
1862
- n.focus();
1863
- const d = (n.value ?? "").length;
1864
- n.setSelectionRange(d, d);
1906
+ if (a) {
1907
+ a.focus();
1908
+ const c = (a.value ?? "").length;
1909
+ a.setSelectionRange(c, c);
1865
1910
  }
1866
1911
  });
1867
1912
  });
1868
1913
  });
1869
- }, y = (n) => {
1870
- const d = n?.event?.target;
1871
- return d ? d.closest(".k-time-now") ? "now" : d.closest(".k-time-accept") ? "set" : null : null;
1872
- }, w = (n, d) => {
1873
- n && X(n) ? u(n, d) : u(null, d);
1874
- }, T = (...n) => {
1875
- const d = n[0];
1876
- if (!d) return;
1877
- const P = y(d);
1878
- if (P === "now") {
1879
- const G = /* @__PURE__ */ new Date();
1880
- ee(G), w(G, d), k();
1914
+ }, g = (a) => {
1915
+ const c = a?.event?.target;
1916
+ return c ? c.closest(".k-time-now") ? "now" : c.closest(".k-time-accept") ? "set" : null : null;
1917
+ }, b = (a, c) => {
1918
+ a && Y(a) ? s(a, c) : s(null, c);
1919
+ }, R = (...a) => {
1920
+ const c = a[0];
1921
+ if (!c) return;
1922
+ const O = g(c);
1923
+ if (O === "now") {
1924
+ const Q = /* @__PURE__ */ new Date();
1925
+ J(Q), b(Q, c), k();
1881
1926
  return;
1882
1927
  }
1883
- if (d?.value instanceof Date) {
1884
- const G = new Date(d.value);
1885
- ee(G), w(G, d), P === "set" && k();
1928
+ if (c?.value instanceof Date) {
1929
+ const Q = new Date(c.value);
1930
+ J(Q), b(Q, c), O === "set" && k();
1886
1931
  return;
1887
1932
  }
1888
- if (d?.value === null) {
1889
- t.value = "", u(null, d);
1933
+ if (c?.value === null) {
1934
+ t.value = "", s(null, c);
1890
1935
  return;
1891
1936
  }
1892
- t.value = d.value;
1893
- const B = d.event?.target;
1894
- r.value = B?.selectionStart ?? 0;
1937
+ t.value = c.value;
1938
+ const X = c.event?.target;
1939
+ r.value = X?.selectionStart ?? 0;
1895
1940
  try {
1896
- const G = r.value ?? 0;
1897
- if ($(G) === "ampm" && (t.value ?? "").length >= 8) {
1898
- const te = t.value.charAt(6);
1899
- /[Aa]/.test(te) ? (t.value = `${t.value.slice(0, 6)}AM${t.value.slice(8)}`, H(() => {
1941
+ const Q = r.value ?? 0;
1942
+ if (V(Q) === "ampm" && (t.value ?? "").length >= 8) {
1943
+ const re = t.value.charAt(6);
1944
+ /[Aa]/.test(re) ? (t.value = `${t.value.slice(0, 6)}AM${t.value.slice(8)}`, j(() => {
1900
1945
  requestAnimationFrame(() => {
1901
- const z = document.getElementById(
1946
+ const W = document.getElementById(
1902
1947
  e.id
1903
1948
  );
1904
- z && (z.focus(), z.setSelectionRange(8, 8));
1949
+ W && (W.focus(), W.setSelectionRange(8, 8));
1905
1950
  });
1906
- })) : /[Pp]/.test(te) && (t.value = `${t.value.slice(0, 6)}PM${t.value.slice(8)}`, H(() => {
1951
+ })) : /[Pp]/.test(re) && (t.value = `${t.value.slice(0, 6)}PM${t.value.slice(8)}`, j(() => {
1907
1952
  requestAnimationFrame(() => {
1908
- const z = document.getElementById(
1953
+ const W = document.getElementById(
1909
1954
  e.id
1910
1955
  );
1911
- z && (z.focus(), z.setSelectionRange(8, 8));
1956
+ W && (W.focus(), W.setSelectionRange(8, 8));
1912
1957
  });
1913
1958
  }));
1914
1959
  }
1915
1960
  } catch {
1916
1961
  }
1917
- K(d);
1918
- }, l = (n) => {
1919
- r.value = n.target.selectionStart ?? 0;
1920
- }, p = (n, d, P) => {
1921
- const B = d?.selectionStart ?? r.value ?? 0;
1922
- r.value = B;
1923
- const G = $(B), te = (t.value ?? "").match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
1924
- if (!te) {
1962
+ H(c);
1963
+ }, A = (a) => {
1964
+ r.value = a.target.selectionStart ?? 0;
1965
+ }, $ = (a, c, O) => {
1966
+ const X = c?.selectionStart ?? r.value ?? 0;
1967
+ r.value = X;
1968
+ const Q = V(X), re = (t.value ?? "").match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
1969
+ if (!re) {
1925
1970
  if ((t.value ?? "").length === 0 || N.value.length === 0) {
1926
- const v = /* @__PURE__ */ new Date(), M = v.getHours(), O = M >= 12 ? "PM" : "AM";
1927
- t.value = S(M, v.getMinutes(), O);
1928
- const oe = R(t.value);
1929
- w(oe, P), H(() => {
1971
+ const m = /* @__PURE__ */ new Date(), T = m.getHours(), U = T >= 12 ? "PM" : "AM";
1972
+ t.value = S(T, m.getMinutes(), U);
1973
+ const oe = L(t.value);
1974
+ b(oe, O), j(() => {
1930
1975
  requestAnimationFrame(() => {
1931
1976
  const le = document.getElementById(
1932
1977
  e.id
@@ -1937,96 +1982,96 @@ function Et(e) {
1937
1982
  }
1938
1983
  return;
1939
1984
  }
1940
- let z = parseInt(te[1]), _ = parseInt(te[2]), ce = te[3].toUpperCase();
1941
- if (G === "hh")
1942
- n === "ArrowUp" ? z = z < 12 ? z + 1 : 1 : z = z > 1 ? z - 1 : 12;
1943
- else if (G === "mm") {
1944
- const v = e.minuteStepRef?.value ?? e.minuteStep ?? 1;
1945
- if (v === 1)
1946
- n === "ArrowUp" ? _ = _ < 59 ? _ + 1 : 0 : _ = _ > 0 ? _ - 1 : 59;
1947
- else if (n === "ArrowUp") {
1948
- const M = _ % v;
1949
- let O = M === 0 ? _ + v : _ + (v - M);
1950
- O >= 60 && (O = 0), _ = O;
1985
+ let W = parseInt(re[1]), G = parseInt(re[2]), ce = re[3].toUpperCase();
1986
+ if (Q === "hh")
1987
+ a === "ArrowUp" ? W = W < 12 ? W + 1 : 1 : W = W > 1 ? W - 1 : 12;
1988
+ else if (Q === "mm") {
1989
+ const m = e.minuteStepRef?.value ?? e.minuteStep ?? 1;
1990
+ if (m === 1)
1991
+ a === "ArrowUp" ? G = G < 59 ? G + 1 : 0 : G = G > 0 ? G - 1 : 59;
1992
+ else if (a === "ArrowUp") {
1993
+ const T = G % m;
1994
+ let U = T === 0 ? G + m : G + (m - T);
1995
+ U >= 60 && (U = 0), G = U;
1951
1996
  } else {
1952
- const M = _ % v;
1953
- let O = M === 0 ? _ - v : _ - M;
1954
- O < 0 && (O = 60 - v), _ = O;
1997
+ const T = G % m;
1998
+ let U = T === 0 ? G - m : G - T;
1999
+ U < 0 && (U = 60 - m), G = U;
1955
2000
  }
1956
- } else G === "ampm" && (ce = ce === "AM" ? "PM" : "AM");
1957
- t.value = `${String(z).padStart(2, "0")}:${String(_).padStart(
2001
+ } else Q === "ampm" && (ce = ce === "AM" ? "PM" : "AM");
2002
+ t.value = `${String(W).padStart(2, "0")}:${String(G).padStart(
1958
2003
  2,
1959
2004
  "0"
1960
2005
  )} ${ce}`;
1961
- const o = R(t.value);
1962
- w(o, P), H(() => {
2006
+ const o = L(t.value);
2007
+ b(o, O), j(() => {
1963
2008
  requestAnimationFrame(() => {
1964
- const v = document.getElementById(
2009
+ const m = document.getElementById(
1965
2010
  e.id
1966
- ), M = r.value ?? 0;
1967
- v && (v.focus(), v.setSelectionRange(M, M));
2011
+ ), T = r.value ?? 0;
2012
+ m && (m.focus(), m.setSelectionRange(T, T));
1968
2013
  });
1969
2014
  });
1970
- }, V = (n) => {
1971
- if (n.code === "Space" || n.key === " ") {
1972
- n.preventDefault(), n.stopPropagation(), e.onShowPicker(n);
2015
+ }, B = (a) => {
2016
+ if (a.code === "Space" || a.key === " ") {
2017
+ a.preventDefault(), a.stopPropagation(), e.onShowPicker(a);
1973
2018
  return;
1974
2019
  }
1975
- if (n.key === "ArrowDown" && n.altKey) {
1976
- n.preventDefault(), n.stopPropagation(), e.onShowPicker(n);
2020
+ if (a.key === "ArrowDown" && a.altKey) {
2021
+ a.preventDefault(), a.stopPropagation(), e.onShowPicker(a);
1977
2022
  return;
1978
2023
  }
1979
- if (I.includes(n.key)) {
1980
- if (n.altKey) return;
1981
- n.preventDefault(), n.stopPropagation();
1982
- const d = n.target;
1983
- p(n.key, d, n);
2024
+ if (D.includes(a.key)) {
2025
+ if (a.altKey) return;
2026
+ a.preventDefault(), a.stopPropagation();
2027
+ const c = a.target;
2028
+ $(a.key, c, a);
1984
2029
  return;
1985
2030
  }
1986
- }, U = (n) => {
1987
- n.preventDefault();
1988
- const d = n.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1989
- p(d, n.target, n);
1990
- }, ae = (n) => {
1991
- const d = n.target;
1992
- if (F.includes(n.key)) {
1993
- r.value = d?.selectionStart ?? 0;
2031
+ }, f = (a) => {
2032
+ a.preventDefault();
2033
+ const c = a.deltaY < 0 ? "ArrowUp" : "ArrowDown";
2034
+ $(c, a.target, a);
2035
+ }, I = (a) => {
2036
+ const c = a.target;
2037
+ if (P.includes(a.key)) {
2038
+ r.value = c?.selectionStart ?? 0;
1994
2039
  return;
1995
2040
  }
1996
- if (I.includes(n.key)) {
1997
- if (n.altKey) return;
1998
- r.value = d?.selectionStart ?? 0;
2041
+ if (D.includes(a.key)) {
2042
+ if (a.altKey) return;
2043
+ r.value = c?.selectionStart ?? 0;
1999
2044
  }
2000
- }, ne = (n) => {
2001
- A.value = !0, f.value && e.externalValue && e.externalValue.value === void 0 && N.value.length === 0 && (e.externalValue.value = "");
2002
- const d = n.target;
2003
- d && (r.value = d.selectionStart ?? 0);
2045
+ }, ee = (a) => {
2046
+ w.value = !0, d.value && e.externalValue && e.externalValue.value === void 0 && N.value.length === 0 && (e.externalValue.value = "");
2047
+ const c = a.target;
2048
+ c && (r.value = c.selectionStart ?? 0);
2004
2049
  };
2005
2050
  e.externalValue && se(
2006
2051
  e.externalValue,
2007
- (n) => {
2008
- if (n) {
2009
- const d = new Date(n);
2010
- if (d.toString() !== "Invalid Date") {
2011
- const P = d.getHours(), B = P >= 12 ? "PM" : "AM";
2012
- t.value = S(P, d.getMinutes(), B);
2052
+ (a) => {
2053
+ if (a) {
2054
+ const c = new Date(a);
2055
+ if (c.toString() !== "Invalid Date") {
2056
+ const O = c.getHours(), X = O >= 12 ? "PM" : "AM";
2057
+ t.value = S(O, c.getMinutes(), X);
2013
2058
  return;
2014
2059
  }
2015
2060
  }
2016
2061
  },
2017
2062
  { immediate: !0 }
2018
2063
  );
2019
- const a = h(() => [
2064
+ const n = h(() => [
2020
2065
  ["Time", t.value || "--:-- --"],
2021
- ["Hour (12h)", x.value],
2022
- ["Hour (24h)", c.value],
2023
- ["Minute", D.value],
2024
- ["Period", C.value],
2066
+ ["Hour (12h)", M.value],
2067
+ ["Hour (24h)", u.value],
2068
+ ["Minute", E.value],
2069
+ ["Period", F.value],
2025
2070
  ["Time (24h)", i.value ?? "--:--:--"],
2026
2071
  ["Digits only", N.value],
2027
2072
  [
2028
2073
  "Parsed Date",
2029
- b.value?.toLocaleDateString("en-US", {
2074
+ y.value?.toLocaleDateString("en-US", {
2030
2075
  hour: "2-digit",
2031
2076
  minute: "2-digit"
2032
2077
  }) ?? null
@@ -2045,173 +2090,173 @@ function Et(e) {
2045
2090
  minute: "2-digit"
2046
2091
  }) ?? null
2047
2092
  ],
2048
- ["valid", L.value],
2049
- ["reason", Z.value],
2050
- ["validationMessage", W.value]
2051
- ]), b = h(
2052
- () => R(t.value) ?? null
2053
- ), L = h(() => {
2054
- if (!f.value) {
2055
- if (!m.value) return !0;
2056
- const d = b.value;
2057
- return d ? X(d) : !1;
2093
+ ["valid", C.value],
2094
+ ["reason", z.value],
2095
+ ["validationMessage", K.value]
2096
+ ]), y = h(
2097
+ () => L(t.value) ?? null
2098
+ ), C = h(() => {
2099
+ if (!d.value) {
2100
+ if (!p.value) return !0;
2101
+ const c = y.value;
2102
+ return c ? Y(c) : !1;
2058
2103
  }
2059
- if (!A.value) return !0;
2060
- const n = b.value;
2061
- return !m.value || !n ? !1 : X(n);
2062
- }), Z = h(() => {
2063
- if (!f.value) {
2064
- if (!m.value) return;
2065
- const d = b.value;
2066
- return d ? X(d) ? "valid" : "out-of-bounds" : "invalid-time";
2104
+ if (!w.value) return !0;
2105
+ const a = y.value;
2106
+ return !p.value || !a ? !1 : Y(a);
2107
+ }), z = h(() => {
2108
+ if (!d.value) {
2109
+ if (!p.value) return;
2110
+ const c = y.value;
2111
+ return c ? Y(c) ? "valid" : "out-of-bounds" : "invalid-time";
2067
2112
  }
2068
- if (!A.value) return;
2069
- if (N.value.length === 0 || !m.value)
2113
+ if (!w.value) return;
2114
+ if (N.value.length === 0 || !p.value)
2070
2115
  return "incomplete";
2071
- const n = b.value;
2072
- return n ? X(n) ? "valid" : "out-of-bounds" : "invalid-time";
2073
- }), W = h(() => {
2074
- const n = Z.value;
2075
- if (!n || n === "valid") return "";
2076
- if (n === "incomplete")
2116
+ const a = y.value;
2117
+ return a ? Y(a) ? "valid" : "out-of-bounds" : "invalid-time";
2118
+ }), K = h(() => {
2119
+ const a = z.value;
2120
+ if (!a || a === "valid") return "";
2121
+ if (a === "incomplete")
2077
2122
  return "Required";
2078
- if (n === "invalid-time")
2079
- return `Must be in ${s.value} format.`;
2080
- const d = {
2123
+ if (a === "invalid-time")
2124
+ return `Must be in ${l.value} format.`;
2125
+ const c = {
2081
2126
  hour: "2-digit",
2082
2127
  minute: "2-digit"
2083
- }, P = e.min ? e.min.toLocaleTimeString("en-US", d) : null, B = e.max ? e.max.toLocaleTimeString("en-US", d) : null;
2084
- if (n === "out-of-bounds") {
2085
- if (P && B) return `Must be between ${P} and ${B}.`;
2086
- if (P) return `Must be ${P} or later.`;
2087
- if (B) return `Must be ${B} or earlier.`;
2128
+ }, O = e.min ? e.min.toLocaleTimeString("en-US", c) : null, X = e.max ? e.max.toLocaleTimeString("en-US", c) : null;
2129
+ if (a === "out-of-bounds") {
2130
+ if (O && X) return `Must be between ${O} and ${X}.`;
2131
+ if (O) return `Must be ${O} or later.`;
2132
+ if (X) return `Must be ${X} or earlier.`;
2088
2133
  }
2089
2134
  return "";
2090
- }), j = () => {
2091
- H(() => {
2092
- const n = document.getElementById(e.id);
2093
- if (!n) {
2135
+ }), _ = () => {
2136
+ j(() => {
2137
+ const a = document.getElementById(e.id);
2138
+ if (!a) {
2094
2139
  console.warn(`#${e.id} not found for styling.`);
2095
2140
  return;
2096
2141
  }
2097
- const d = n.closest(".k-timepicker");
2098
- if (!d) {
2142
+ const c = a.closest(".k-timepicker");
2143
+ if (!c) {
2099
2144
  console.warn(
2100
2145
  `.k-timepicker parent of #${e.id} not found for styling.`
2101
2146
  );
2102
2147
  return;
2103
2148
  }
2104
- const P = d.parentElement;
2105
- if (!P) {
2149
+ const O = c.parentElement;
2150
+ if (!O) {
2106
2151
  console.warn(
2107
2152
  `Parent of .k-timepicker not found for #${e.id} styling.`
2108
2153
  );
2109
2154
  return;
2110
2155
  }
2111
- P.classList.contains("fk-timepicker") || P.classList.add("fk-timepicker");
2156
+ O.classList.contains("fk-timepicker") || O.classList.add("fk-timepicker");
2112
2157
  });
2113
2158
  };
2114
2159
  return Te(() => {
2115
- j();
2160
+ _();
2116
2161
  }), {
2117
2162
  raw: t,
2118
- rules: E,
2119
- debugEnabled: g,
2120
- debugLines: a,
2121
- placeholder: s,
2122
- isValid: L,
2123
- reason: Q(Z),
2124
- validationMessage: W,
2125
- isComplete: m,
2126
- inRangeTime: X,
2163
+ rules: x,
2164
+ debugEnabled: v,
2165
+ debugLines: n,
2166
+ placeholder: l,
2167
+ isValid: C,
2168
+ reason: ne(z),
2169
+ validationMessage: K,
2170
+ isComplete: p,
2171
+ inRangeTime: Y,
2127
2172
  cursorPos: r,
2128
- hour: Q(x),
2129
- hour24: Q(c),
2130
- minute: Q(D),
2131
- period: Q(C),
2132
- time24: Q(i),
2133
- parsedRawTime: Q(b),
2134
- handleChange: T,
2135
- handleKeyDown: V,
2136
- handleKeyUp: ae,
2137
- handleClick: l,
2138
- handleWheel: U,
2139
- handleBlur: ne,
2173
+ hour: ne(M),
2174
+ hour24: ne(u),
2175
+ minute: ne(E),
2176
+ period: ne(F),
2177
+ time24: ne(i),
2178
+ parsedRawTime: ne(y),
2179
+ handleChange: R,
2180
+ handleKeyDown: B,
2181
+ handleKeyUp: I,
2182
+ handleClick: A,
2183
+ handleWheel: f,
2184
+ handleBlur: ee,
2140
2185
  // Expose so consumers can reapply theming when Kendo updates DOM
2141
- initStyling: j
2186
+ initStyling: _
2142
2187
  };
2143
2188
  }
2144
2189
  function It(e) {
2145
- const t = Ae(null), r = [
2190
+ const t = be(null), r = [
2146
2191
  ".k-animation-container .k-popup",
2147
2192
  ".k-popup",
2148
2193
  ".k-timepicker-popup",
2149
2194
  ".k-menu-popup"
2150
- ], g = Array.isArray(e.popupSelector) ? e.popupSelector : [e.popupSelector ?? r].flat(), s = (E) => E ? typeof e.initialFocus == "string" ? E.querySelector(e.initialFocus) ?? E : typeof e.initialFocus == "function" ? e.initialFocus(E) ?? E : E.querySelector(
2195
+ ], v = Array.isArray(e.popupSelector) ? e.popupSelector : [e.popupSelector ?? r].flat(), l = (x) => x ? typeof e.initialFocus == "string" ? x.querySelector(e.initialFocus) ?? x : typeof e.initialFocus == "function" ? e.initialFocus(x) ?? x : x.querySelector(
2151
2196
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
2152
- ) ?? E : null, { activate: f, deactivate: A } = Ue(t, {
2197
+ ) ?? x : null, { activate: d, deactivate: w } = Ue(t, {
2153
2198
  escapeDeactivates: !1,
2154
2199
  clickOutsideDeactivates: !1,
2155
2200
  fallbackFocus: () => t.value,
2156
- initialFocus: () => s(t.value),
2201
+ initialFocus: () => l(t.value),
2157
2202
  ...e.focusTrapOptions ?? {}
2158
2203
  });
2159
- let I = null, F = Y(null);
2204
+ let D = null, P = Z(null);
2160
2205
  const N = () => {
2161
2206
  if (e.resolvePopupEl) return e.resolvePopupEl();
2162
- const E = (x, D) => {
2163
- const C = Array.from(x.querySelectorAll(D));
2164
- if (!C.length) return null;
2165
- const c = C.filter(
2207
+ const x = (M, E) => {
2208
+ const F = Array.from(M.querySelectorAll(E));
2209
+ if (!F.length) return null;
2210
+ const u = F.filter(
2166
2211
  (i) => i.offsetParent !== null || i.getClientRects().length > 0
2167
2212
  );
2168
- return c[c.length - 1] ?? C[C.length - 1] ?? null;
2169
- }, $ = e.triggerEl?.value?.closest?.(".k-animation-container") ?? document.body;
2170
- for (const x of g) {
2171
- const D = E($, x);
2172
- if (D) return D;
2213
+ return u[u.length - 1] ?? F[F.length - 1] ?? null;
2214
+ }, V = e.triggerEl?.value?.closest?.(".k-animation-container") ?? document.body;
2215
+ for (const M of v) {
2216
+ const E = x(V, M);
2217
+ if (E) return E;
2173
2218
  }
2174
- for (const x of g) {
2175
- const D = E(document, x);
2176
- if (D) return D;
2219
+ for (const M of v) {
2220
+ const E = x(document, M);
2221
+ if (E) return E;
2177
2222
  }
2178
2223
  return null;
2179
2224
  };
2180
- return Le(t, (E) => {
2181
- F.value = "outside", e.isOpen.value && e.onRequestClose?.("outside", E);
2225
+ return Le(t, (x) => {
2226
+ P.value = "outside", e.isOpen.value && e.onRequestClose?.("outside", x);
2182
2227
  }), se(
2183
2228
  () => e.isOpen.value,
2184
- (E) => {
2185
- E ? (F.value = null, H(() => {
2186
- const $ = N();
2187
- $ && (t.value = $, setTimeout(() => f(), 0), I || (I = (x) => {
2188
- x.key === "Escape" && (F.value = "escape", e.isOpen.value && e.onRequestClose?.("escape", x));
2189
- }, document.addEventListener("keydown", I, !0)));
2190
- })) : (A(), I && (document.removeEventListener("keydown", I, !0), I = null), t.value = null, F.value === "outside" && H(() => {
2191
- const $ = () => {
2192
- const x = e.triggerEl?.value, D = x?.querySelector("input"), C = document.activeElement;
2193
- C && (C === D || x && x.contains(C)) && (D ?? x)?.blur?.();
2229
+ (x) => {
2230
+ x ? (P.value = null, j(() => {
2231
+ const V = N();
2232
+ V && (t.value = V, setTimeout(() => d(), 0), D || (D = (M) => {
2233
+ M.key === "Escape" && (P.value = "escape", e.isOpen.value && e.onRequestClose?.("escape", M));
2234
+ }, document.addEventListener("keydown", D, !0)));
2235
+ })) : (w(), D && (document.removeEventListener("keydown", D, !0), D = null), t.value = null, P.value === "outside" && j(() => {
2236
+ const V = () => {
2237
+ const M = e.triggerEl?.value, E = M?.querySelector("input"), F = document.activeElement;
2238
+ F && (F === E || M && M.contains(F)) && (E ?? M)?.blur?.();
2194
2239
  };
2195
- requestAnimationFrame(() => setTimeout($, 0));
2196
- }), e.returnFocusToTrigger !== !1 && F.value === "escape" && e.triggerEl?.value && H(() => {
2197
- const $ = () => {
2198
- const x = e.triggerEl?.value;
2199
- if (!x) return;
2200
- (x.querySelector("input") ?? x)?.focus?.();
2240
+ requestAnimationFrame(() => setTimeout(V, 0));
2241
+ }), e.returnFocusToTrigger !== !1 && P.value === "escape" && e.triggerEl?.value && j(() => {
2242
+ const V = () => {
2243
+ const M = e.triggerEl?.value;
2244
+ if (!M) return;
2245
+ (M.querySelector("input") ?? M)?.focus?.();
2201
2246
  };
2202
- requestAnimationFrame(() => setTimeout($, 0));
2247
+ requestAnimationFrame(() => setTimeout(V, 0));
2203
2248
  }));
2204
2249
  }
2205
2250
  ), {
2206
2251
  popupRef: t,
2207
- activate: f,
2208
- deactivate: A,
2209
- lastCloseReason: Q(F),
2210
- setPopupEl: (E) => t.value = E
2252
+ activate: d,
2253
+ deactivate: w,
2254
+ lastCloseReason: ne(P),
2255
+ setPopupEl: (x) => t.value = x
2211
2256
  };
2212
2257
  }
2213
2258
  export {
2214
- At as useActiveIdRegistry,
2259
+ kt as useActiveIdRegistry,
2215
2260
  bt as useCompositeId,
2216
2261
  St as useExclusiveGroup,
2217
2262
  _e as useFieldsetTouchTracker,
@@ -2220,7 +2265,7 @@ export {
2220
2265
  gt as useGridActiveFilter,
2221
2266
  yt as useGridRowAction,
2222
2267
  it as useIntersectionObserver,
2223
- kt as useMaskedDateInput,
2268
+ At as useMaskedDateInput,
2224
2269
  Dt as useMaskedDateRangeInput,
2225
2270
  Et as useMaskedTimeInput,
2226
2271
  wt as usePopupMenu,