@serendie/ui 2.1.3-dev.202509030422 → 2.1.3-dev.202509040333

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,15 +1,17 @@
1
1
  import { createAnatomy as Qe } from "../../anatomy/dist/index.js";
2
- import { isEqualDay as De, isWeekend as ze, isToday as et } from "../../../@internationalized/date/dist/queries.js";
2
+ import { CalendarDate as ze } from "../../../@internationalized/date/dist/CalendarDate.js";
3
+ import { isEqualDay as De, isWeekend as et, isToday as tt } from "../../../@internationalized/date/dist/queries.js";
4
+ import { parseDate as at } from "../../../@internationalized/date/dist/string.js";
3
5
  import { DateFormatter as te } from "../../../@internationalized/date/dist/DateFormatter.js";
4
- import { getWeekDays as tt, getDateRangePreset as pe, getDecadeRange as ae, constrainValue as F, getTodayDate as U, getMonthFormatter as he, getDaysInWeek as at, isDateOutsideRange as $, getDayFormatter as nt, getUnitDuration as ot, isDateEqual as C, isDateUnavailable as we, getMonthNames as st, getYearsRange as rt, getMonthDays as it, getEndDate as lt, alignDate as Ce, getPreviousSection as ct, getNextSection as ut, getPreviousPage as dt, getNextPage as gt, formatSelectedDate as vt, isNextRangeInvalid as ft, isPreviousRangeInvalid as Vt, parseDateString as mt, getAdjustedDateFn as yt } from "../../date-utils/dist/index.js";
5
- import { getNativeEvent as Tt, dataAttr as u, ariaAttr as w, getEventKey as St, isComposingEvent as Et, queryAll as bt, setElementValue as j, raf as M, query as Dt, restoreTextSelection as pt, disableTextSelection as ht } from "../../dom-query/dist/index.js";
6
- import { getPlacementStyles as wt, getPlacement as Ct } from "../../popper/dist/index.js";
7
- import { chunk as Pe, isValueWithinRange as Oe, match as Q, clampValue as Pt } from "../../utils/dist/index.js";
8
- import { createMachine as Ot, createGuards as It } from "../../core/dist/index.js";
9
- import { trackDismissableElement as Rt } from "../../dismissable/dist/index.js";
10
- import { createLiveRegion as xt } from "../../live-region/dist/index.js";
6
+ import { getWeekDays as nt, getDateRangePreset as pe, getDecadeRange as ae, constrainValue as F, getTodayDate as U, getMonthFormatter as he, getDaysInWeek as ot, isDateOutsideRange as B, getDayFormatter as rt, getUnitDuration as st, isDateEqual as C, isDateUnavailable as we, getMonthNames as it, getYearsRange as lt, getMonthDays as ct, getEndDate as ut, alignDate as Ce, getPreviousSection as dt, getNextSection as gt, getPreviousPage as ft, getNextPage as vt, formatSelectedDate as Vt, isNextRangeInvalid as mt, isPreviousRangeInvalid as yt, parseDateString as Tt, getAdjustedDateFn as St } from "../../date-utils/dist/index.js";
7
+ import { getNativeEvent as Et, dataAttr as u, ariaAttr as w, getEventKey as bt, isComposingEvent as Dt, queryAll as pt, setElementValue as j, raf as M, query as ht, restoreTextSelection as wt, disableTextSelection as Ct } from "../../dom-query/dist/index.js";
8
+ import { getPlacementStyles as Pt, getPlacement as Ot } from "../../popper/dist/index.js";
9
+ import { chunk as Pe, isValueWithinRange as Oe, match as Q, clampValue as It } from "../../utils/dist/index.js";
10
+ import { createMachine as xt, createGuards as Rt } from "../../core/dist/index.js";
11
+ import { trackDismissableElement as At } from "../../dismissable/dist/index.js";
12
+ import { createLiveRegion as Lt } from "../../live-region/dist/index.js";
11
13
  import { createProps as H } from "../../types/dist/index.js";
12
- var At = Qe("date-picker").parts(
14
+ var kt = Qe("date-picker").parts(
13
15
  "clearTrigger",
14
16
  "content",
15
17
  "control",
@@ -34,13 +36,13 @@ var At = Qe("date-picker").parts(
34
36
  "viewControl",
35
37
  "viewTrigger",
36
38
  "yearSelect"
37
- ), v = At.build(), Lt = (e, t) => {
39
+ ), f = kt.build(), Nt = (e, t) => {
38
40
  var a, n;
39
41
  return ((n = (a = e.ids) == null ? void 0 : a.label) == null ? void 0 : n.call(a, t)) ?? `datepicker:${e.id}:label:${t}`;
40
- }, kt = (e) => {
42
+ }, Ft = (e) => {
41
43
  var t;
42
44
  return ((t = e.ids) == null ? void 0 : t.root) ?? `datepicker:${e.id}`;
43
- }, Nt = (e, t) => {
45
+ }, Mt = (e, t) => {
44
46
  var a, n;
45
47
  return ((n = (a = e.ids) == null ? void 0 : a.table) == null ? void 0 : n.call(a, t)) ?? `datepicker:${e.id}:table:${t}`;
46
48
  }, de = (e) => {
@@ -49,13 +51,13 @@ var At = Qe("date-picker").parts(
49
51
  }, ue = (e, t) => {
50
52
  var a, n;
51
53
  return ((n = (a = e.ids) == null ? void 0 : a.cellTrigger) == null ? void 0 : n.call(a, t)) ?? `datepicker:${e.id}:cell-trigger:${t}`;
52
- }, Ft = (e, t) => {
54
+ }, $t = (e, t) => {
53
55
  var a, n;
54
56
  return ((n = (a = e.ids) == null ? void 0 : a.prevTrigger) == null ? void 0 : n.call(a, t)) ?? `datepicker:${e.id}:prev:${t}`;
55
- }, Mt = (e, t) => {
57
+ }, Bt = (e, t) => {
56
58
  var a, n;
57
59
  return ((n = (a = e.ids) == null ? void 0 : a.nextTrigger) == null ? void 0 : n.call(a, t)) ?? `datepicker:${e.id}:next:${t}`;
58
- }, Bt = (e, t) => {
60
+ }, Ut = (e, t) => {
59
61
  var a, n;
60
62
  return ((n = (a = e.ids) == null ? void 0 : a.viewTrigger) == null ? void 0 : n.call(a, t)) ?? `datepicker:${e.id}:view:${t}`;
61
63
  }, Le = (e) => {
@@ -76,42 +78,42 @@ var At = Qe("date-picker").parts(
76
78
  }, Me = (e) => {
77
79
  var t;
78
80
  return ((t = e.ids) == null ? void 0 : t.monthSelect) ?? `datepicker:${e.id}:month-select`;
79
- }, Be = (e) => {
81
+ }, $e = (e) => {
80
82
  var t;
81
83
  return ((t = e.ids) == null ? void 0 : t.yearSelect) ?? `datepicker:${e.id}:year-select`;
82
- }, Re = (e, t) => Dt(z(e), `[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`), xe = (e) => e.getById(Ne(e)), z = (e) => e.getById(de(e)), Y = (e) => bt($e(e), "[data-part=input]"), $t = (e) => e.getById(Be(e)), Ut = (e) => e.getById(Me(e)), Ht = (e) => e.getById(Le(e)), Wt = (e) => e.getById(Fe(e)), $e = (e) => e.getById(ke(e));
84
+ }, xe = (e, t) => ht(z(e), `[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`), Re = (e) => e.getById(Ne(e)), z = (e) => e.getById(de(e)), Y = (e) => pt(Be(e), "[data-part=input]"), Ht = (e) => e.getById($e(e)), Wt = (e) => e.getById(Me(e)), Yt = (e) => e.getById(Le(e)), Gt = (e) => e.getById(Fe(e)), Be = (e) => e.getById(ke(e));
83
85
  function ge(e) {
84
86
  const [t, a] = e;
85
87
  return !t || !a || t.compare(a) <= 0 ? e : [a, t];
86
88
  }
87
- function B(e, t) {
89
+ function $(e, t) {
88
90
  const [a, n] = t;
89
91
  return !a || !n ? !1 : a.compare(e) <= 0 && n.compare(e) >= 0;
90
92
  }
91
93
  function q(e) {
92
94
  return e.slice().sort((t, a) => t.compare(a));
93
95
  }
94
- function Yt(e) {
96
+ function _t(e) {
95
97
  return Q(e, {
96
98
  year: "calendar decade",
97
99
  month: "calendar year",
98
100
  day: "calendar month"
99
101
  });
100
102
  }
101
- var Gt = {
103
+ var Kt = {
102
104
  day: "dd",
103
105
  month: "mm",
104
106
  year: "yyyy"
105
107
  };
106
- function _t(e) {
107
- return new te(e).formatToParts(/* @__PURE__ */ new Date()).map((t) => Gt[t.type] ?? t.value).join("");
108
- }
109
- var Ue = (e, t) => e ? /\d/.test(e) || e === t || e.length !== 1 : !0, Ae = (e) => !Number.isNaN(e.day) && !Number.isNaN(e.month) && !Number.isNaN(e.year), Kt = (e, t) => e.split("").filter((a) => Ue(a, t)).join("");
110
108
  function Zt(e) {
111
- const n = new Intl.DateTimeFormat(e).formatToParts(/* @__PURE__ */ new Date()).find((s) => s.type === "literal");
109
+ return new te(e).formatToParts(/* @__PURE__ */ new Date()).map((t) => Kt[t.type] ?? t.value).join("");
110
+ }
111
+ var Ue = (e, t) => e ? /\d/.test(e) || e === t || e.length !== 1 : !0, Ae = (e) => !Number.isNaN(e.day) && !Number.isNaN(e.month) && !Number.isNaN(e.year), jt = (e, t) => e.split("").filter((a) => Ue(a, t)).join("");
112
+ function qt(e) {
113
+ const n = new Intl.DateTimeFormat(e).formatToParts(/* @__PURE__ */ new Date()).find((r) => r.type === "literal");
112
114
  return n ? n.value : "/";
113
115
  }
114
- var jt = {
116
+ var Xt = {
115
117
  dayCell(e) {
116
118
  return e.unavailable ? `Not available. ${e.formattedDate}` : e.selected ? `Selected date. ${e.formattedDate}` : `Choose ${e.formattedDate}`;
117
119
  },
@@ -154,76 +156,76 @@ var jt = {
154
156
  function A(e, t) {
155
157
  return e ? e === "day" ? 0 : e === "month" ? 1 : 2 : t || 0;
156
158
  }
157
- function ve(e) {
159
+ function fe(e) {
158
160
  return e === 0 ? "day" : e === 1 ? "month" : "year";
159
161
  }
160
- function fe(e, t, a) {
161
- return ve(
162
- Pt(A(e, 0), A(t, 0), A(a, 2))
162
+ function ve(e, t, a) {
163
+ return fe(
164
+ It(A(e, 0), A(t, 0), A(a, 2))
163
165
  );
164
166
  }
165
- function qt(e, t) {
167
+ function Jt(e, t) {
166
168
  return A(e, 0) > A(t, 0);
167
169
  }
168
- function Xt(e, t) {
170
+ function Qt(e, t) {
169
171
  return A(e, 0) < A(t, 0);
170
172
  }
171
- function Jt(e, t, a) {
173
+ function zt(e, t, a) {
172
174
  const n = A(e, 0) + 1;
173
- return fe(ve(n), t, a);
175
+ return ve(fe(n), t, a);
174
176
  }
175
- function Qt(e, t, a) {
177
+ function ea(e, t, a) {
176
178
  const n = A(e, 0) - 1;
177
- return fe(ve(n), t, a);
179
+ return ve(fe(n), t, a);
178
180
  }
179
- var zt = ["day", "month", "year"];
180
- function ea(e) {
181
- zt.forEach((t) => e(t));
181
+ var ta = ["day", "month", "year"];
182
+ function aa(e) {
183
+ ta.forEach((t) => e(t));
182
184
  }
183
- function va(e, t) {
184
- const { state: a, context: n, prop: s, send: l, computed: d, scope: g } = e, D = n.get("startValue"), G = d("endValue"), p = n.get("value"), f = n.get("focusedValue"), R = n.get("hoveredValue"), I = R ? ge([p[0], R]) : [], T = s("disabled"), _ = s("readOnly"), ne = d("isInteractive"), S = s("min"), E = s("max"), b = s("locale"), y = s("timeZone"), oe = s("startOfWeek"), He = a.matches("focused"), L = a.matches("open"), k = s("selectionMode") === "range", Ve = s("isDateUnavailable"), se = n.get("currentPlacement"), We = wt({
185
- ...s("positioning"),
186
- placement: se
187
- }), me = Zt(b), x = { ...jt, ...s("translations") };
188
- function re(r = D) {
189
- const o = s("fixedWeeks") ? 6 : void 0;
190
- return it(r, b, o, oe);
185
+ function Ta(e, t) {
186
+ const { state: a, context: n, prop: r, send: l, computed: d, scope: g } = e, D = n.get("startValue"), G = d("endValue"), p = n.get("value"), v = n.get("focusedValue"), x = n.get("hoveredValue"), I = x ? ge([p[0], x]) : [], T = r("disabled"), _ = r("readOnly"), ne = d("isInteractive"), S = r("min"), E = r("max"), b = r("locale"), y = r("timeZone"), oe = r("startOfWeek"), He = a.matches("focused"), L = a.matches("open"), k = r("selectionMode") === "range", Ve = r("isDateUnavailable"), re = n.get("currentPlacement"), We = Pt({
187
+ ...r("positioning"),
188
+ placement: re
189
+ }), me = qt(b), R = { ...Xt, ...r("translations") };
190
+ function se(s = D) {
191
+ const o = r("fixedWeeks") ? 6 : void 0;
192
+ return ct(s, b, o, oe);
191
193
  }
192
- function ye(r = {}) {
193
- const { format: o } = r;
194
- return st(b, o).map((i, c) => {
195
- const V = c + 1, P = f.set({ month: V }), h = $(P, S, E);
194
+ function ye(s = {}) {
195
+ const { format: o } = s;
196
+ return it(b, o).map((i, c) => {
197
+ const V = c + 1, P = v.set({ month: V }), h = B(P, S, E);
196
198
  return { label: i, value: V, disabled: h };
197
199
  });
198
200
  }
199
201
  function Ye() {
200
- return rt({ from: (S == null ? void 0 : S.year) ?? 1900, to: (E == null ? void 0 : E.year) ?? 2100 }).map((o) => ({
202
+ return lt({ from: (S == null ? void 0 : S.year) ?? 1900, to: (E == null ? void 0 : E.year) ?? 2100 }).map((o) => ({
201
203
  label: o.toString(),
202
204
  value: o,
203
205
  disabled: !Oe(o, S == null ? void 0 : S.year, E == null ? void 0 : E.year)
204
206
  }));
205
207
  }
206
- function Ge(r) {
207
- return ae(f.year).map((i) => ({ label: i.toString(), value: i }));
208
+ function Ge(s) {
209
+ return ae(v.year).map((i) => ({ label: i.toString(), value: i }));
208
210
  }
209
- function ie(r) {
210
- return we(r, Ve, b, S, E);
211
+ function ie(s) {
212
+ return we(s, Ve, b, S, E);
211
213
  }
212
- function Te(r) {
214
+ function Te(s) {
213
215
  const o = D ?? U(y);
214
- l({ type: "FOCUS.SET", value: o.set({ month: r }) });
216
+ l({ type: "FOCUS.SET", value: o.set({ month: s }) });
215
217
  }
216
- function Se(r) {
218
+ function Se(s) {
217
219
  const o = D ?? U(y);
218
- l({ type: "FOCUS.SET", value: o.set({ year: r }) });
220
+ l({ type: "FOCUS.SET", value: o.set({ year: s }) });
219
221
  }
220
- function K(r) {
221
- const { value: o, disabled: i } = r, c = f.set({ year: o }), V = {
222
- focused: f.year === r.value,
222
+ function K(s) {
223
+ const { value: o, disabled: i } = s, c = v.set({ year: o }), V = {
224
+ focused: v.year === s.value,
223
225
  selectable: Oe(o, S == null ? void 0 : S.year, E == null ? void 0 : E.year),
224
226
  selected: !!p.find((P) => P.year === o),
225
227
  valueText: o.toString(),
226
- inRange: k && (B(c, p) || B(c, I)),
228
+ inRange: k && ($(c, p) || $(c, I)),
227
229
  value: c,
228
230
  get disabled() {
229
231
  return i || !V.selectable;
@@ -231,13 +233,13 @@ function va(e, t) {
231
233
  };
232
234
  return V;
233
235
  }
234
- function Z(r) {
235
- const { value: o, disabled: i } = r, c = f.set({ month: o }), V = he(b, y), P = {
236
- focused: f.month === r.value,
237
- selectable: !$(c, S, E),
238
- selected: !!p.find((h) => h.month === o && h.year === f.year),
236
+ function Z(s) {
237
+ const { value: o, disabled: i } = s, c = v.set({ month: o }), V = he(b, y), P = {
238
+ focused: v.month === s.value,
239
+ selectable: !B(c, S, E),
240
+ selected: !!p.find((h) => h.month === o && h.year === v.year),
239
241
  valueText: V.format(c.toDate(y)),
240
- inRange: k && (B(c, p) || B(c, I)),
242
+ inRange: k && ($(c, p) || $(c, I)),
241
243
  value: c,
242
244
  get disabled() {
243
245
  return i || !P.selectable;
@@ -245,21 +247,21 @@ function va(e, t) {
245
247
  };
246
248
  return P;
247
249
  }
248
- function le(r) {
249
- const { value: o, disabled: i, visibleRange: c = d("visibleRange") } = r, V = nt(b, y), P = ot(d("visibleDuration")), h = s("outsideDaySelectable"), N = c.start.add(P).subtract({ days: 1 }), Ee = $(o, c.start, N), Ke = k && B(o, p), Ze = k && C(o, p[0]), je = k && C(o, p[1]), ce = k && I.length > 0, be = ce && B(o, I), qe = ce && C(o, I[0]), Xe = ce && C(o, I[1]), W = {
250
- invalid: $(o, S, E),
251
- disabled: i || !h && Ee || $(o, S, E),
250
+ function le(s) {
251
+ const { value: o, disabled: i, visibleRange: c = d("visibleRange") } = s, V = rt(b, y), P = st(d("visibleDuration")), h = r("outsideDaySelectable"), N = c.start.add(P).subtract({ days: 1 }), Ee = B(o, c.start, N), Ke = k && $(o, p), Ze = k && C(o, p[0]), je = k && C(o, p[1]), ce = k && I.length > 0, be = ce && $(o, I), qe = ce && C(o, I[0]), Xe = ce && C(o, I[1]), W = {
252
+ invalid: B(o, S, E),
253
+ disabled: i || !h && Ee || B(o, S, E),
252
254
  selected: p.some((Je) => C(o, Je)),
253
255
  unavailable: we(o, Ve, b, S, E) && !i,
254
256
  outsideRange: Ee,
255
- today: et(o, y),
256
- weekend: ze(o, b),
257
+ today: tt(o, y),
258
+ weekend: et(o, b),
257
259
  formattedDate: V.format(o.toDate(y)),
258
260
  get focused() {
259
- return C(o, f) && (!W.outsideRange || h);
261
+ return C(o, v) && (!W.outsideRange || h);
260
262
  },
261
263
  get ariaLabel() {
262
- return x.dayCell(W);
264
+ return R.dayCell(W);
263
265
  },
264
266
  get selectable() {
265
267
  return !W.disabled && !W.unavailable;
@@ -275,82 +277,82 @@ function va(e, t) {
275
277
  };
276
278
  return W;
277
279
  }
278
- function _e(r) {
279
- const { view: o = "day", id: i } = r;
280
+ function _e(s) {
281
+ const { view: o = "day", id: i } = s;
280
282
  return [o, i].filter(Boolean).join(" ");
281
283
  }
282
284
  return {
283
285
  focused: He,
284
286
  open: L,
285
- inline: !!s("inline"),
287
+ inline: !!r("inline"),
286
288
  view: n.get("view"),
287
- getRangePresetValue(r) {
288
- return pe(r, b, y);
289
+ getRangePresetValue(s) {
290
+ return pe(s, b, y);
289
291
  },
290
- getDaysInWeek(r, o = D) {
291
- return at(r, o, b, oe);
292
+ getDaysInWeek(s, o = D) {
293
+ return ot(s, o, b, oe);
292
294
  },
293
- getOffset(r) {
294
- const o = D.add(r), i = G.add(r), c = he(b, y);
295
+ getOffset(s) {
296
+ const o = D.add(s), i = G.add(s), c = he(b, y);
295
297
  return {
296
298
  visibleRange: { start: o, end: i },
297
- weeks: re(o),
299
+ weeks: se(o),
298
300
  visibleRangeText: {
299
301
  start: c.format(o.toDate(y)),
300
302
  end: c.format(i.toDate(y))
301
303
  }
302
304
  };
303
305
  },
304
- getMonthWeeks: re,
306
+ getMonthWeeks: se,
305
307
  isUnavailable: ie,
306
- weeks: re(),
307
- weekDays: tt(U(y), oe, y, b),
308
+ weeks: se(),
309
+ weekDays: nt(U(y), oe, y, b),
308
310
  visibleRangeText: d("visibleRangeText"),
309
311
  value: p,
310
- valueAsDate: p.map((r) => r.toDate(y)),
312
+ valueAsDate: p.map((s) => s.toDate(y)),
311
313
  valueAsString: d("valueAsString"),
312
- focusedValue: f,
313
- focusedValueAsDate: f == null ? void 0 : f.toDate(y),
314
- focusedValueAsString: s("format")(f, { locale: b, timeZone: y }),
314
+ focusedValue: v,
315
+ focusedValueAsDate: v == null ? void 0 : v.toDate(y),
316
+ focusedValueAsString: r("format")(v, { locale: b, timeZone: y }),
315
317
  visibleRange: d("visibleRange"),
316
318
  selectToday() {
317
- const r = F(U(y), S, E);
318
- l({ type: "VALUE.SET", value: r });
319
+ const s = F(U(y), S, E);
320
+ l({ type: "VALUE.SET", value: s });
319
321
  },
320
- setValue(r) {
321
- const o = r.map((i) => F(i, S, E));
322
+ setValue(s) {
323
+ const o = s.map((i) => F(i, S, E));
322
324
  l({ type: "VALUE.SET", value: o });
323
325
  },
324
326
  clearValue() {
325
327
  l({ type: "VALUE.CLEAR" });
326
328
  },
327
- setFocusedValue(r) {
328
- l({ type: "FOCUS.SET", value: r });
329
+ setFocusedValue(s) {
330
+ l({ type: "FOCUS.SET", value: s });
329
331
  },
330
- setOpen(r) {
331
- s("inline") || a.matches("open") === r || l({ type: r ? "OPEN" : "CLOSE" });
332
+ setOpen(s) {
333
+ r("inline") || a.matches("open") === s || l({ type: s ? "OPEN" : "CLOSE" });
332
334
  },
333
335
  focusMonth: Te,
334
336
  focusYear: Se,
335
337
  getYears: Ye,
336
338
  getMonths: ye,
337
- getYearsGrid(r = {}) {
338
- const { columns: o = 1 } = r;
339
+ getYearsGrid(s = {}) {
340
+ const { columns: o = 1 } = s;
339
341
  return Pe(Ge(), o);
340
342
  },
341
343
  getDecade() {
342
- const r = ae(f.year);
343
- return { start: r.at(0), end: r.at(-1) };
344
+ const s = ae(v.year);
345
+ return { start: s.at(0), end: s.at(-1) };
344
346
  },
345
- getMonthsGrid(r = {}) {
346
- const { columns: o = 1, format: i } = r;
347
+ getMonthsGrid(s = {}) {
348
+ const { columns: o = 1, format: i } = s;
347
349
  return Pe(ye({ format: i }), o);
348
350
  },
349
- format(r, o = { month: "long", year: "numeric" }) {
350
- return new te(b, o).format(r.toDate(y));
351
+ format(s, o = { month: "long", year: "numeric" }) {
352
+ return new te(b, o).format(s.toDate(y));
351
353
  },
352
- setView(r) {
353
- l({ type: "VIEW.SET", view: r });
354
+ setView(s) {
355
+ l({ type: "VIEW.SET", view: s });
354
356
  },
355
357
  goToNext() {
356
358
  l({ type: "GOTO.NEXT", view: n.get("view") });
@@ -360,20 +362,20 @@ function va(e, t) {
360
362
  },
361
363
  getRootProps() {
362
364
  return t.element({
363
- ...v.root.attrs,
364
- dir: s("dir"),
365
- id: kt(g),
365
+ ...f.root.attrs,
366
+ dir: r("dir"),
367
+ id: Ft(g),
366
368
  "data-state": L ? "open" : "closed",
367
369
  "data-disabled": u(T),
368
370
  "data-readonly": u(_)
369
371
  });
370
372
  },
371
- getLabelProps(r = {}) {
372
- const { index: o = 0 } = r;
373
+ getLabelProps(s = {}) {
374
+ const { index: o = 0 } = s;
373
375
  return t.label({
374
- ...v.label.attrs,
375
- id: Lt(g, o),
376
- dir: s("dir"),
376
+ ...f.label.attrs,
377
+ id: Nt(g, o),
378
+ dir: r("dir"),
377
379
  htmlFor: Ie(g, o),
378
380
  "data-state": L ? "open" : "closed",
379
381
  "data-index": o,
@@ -383,52 +385,52 @@ function va(e, t) {
383
385
  },
384
386
  getControlProps() {
385
387
  return t.element({
386
- ...v.control.attrs,
387
- dir: s("dir"),
388
+ ...f.control.attrs,
389
+ dir: r("dir"),
388
390
  id: ke(g),
389
391
  "data-disabled": u(T)
390
392
  });
391
393
  },
392
394
  getRangeTextProps() {
393
395
  return t.element({
394
- ...v.rangeText.attrs,
395
- dir: s("dir")
396
+ ...f.rangeText.attrs,
397
+ dir: r("dir")
396
398
  });
397
399
  },
398
400
  getContentProps() {
399
401
  return t.element({
400
- ...v.content.attrs,
402
+ ...f.content.attrs,
401
403
  hidden: !L,
402
- dir: s("dir"),
404
+ dir: r("dir"),
403
405
  "data-state": L ? "open" : "closed",
404
- "data-placement": se,
405
- "data-inline": u(s("inline")),
406
+ "data-placement": re,
407
+ "data-inline": u(r("inline")),
406
408
  id: de(g),
407
409
  tabIndex: -1,
408
410
  role: "application",
409
411
  "aria-roledescription": "datepicker",
410
- "aria-label": x.content
412
+ "aria-label": R.content
411
413
  });
412
414
  },
413
- getTableProps(r = {}) {
414
- const { view: o = "day", columns: i = o === "day" ? 7 : 4 } = r, c = _e(r);
415
+ getTableProps(s = {}) {
416
+ const { view: o = "day", columns: i = o === "day" ? 7 : 4 } = s, c = _e(s);
415
417
  return t.element({
416
- ...v.table.attrs,
418
+ ...f.table.attrs,
417
419
  role: "grid",
418
420
  "data-columns": i,
419
- "aria-roledescription": Yt(o),
420
- id: Nt(g, c),
421
+ "aria-roledescription": _t(o),
422
+ id: Mt(g, c),
421
423
  "aria-readonly": w(_),
422
424
  "aria-disabled": w(T),
423
- "aria-multiselectable": w(s("selectionMode") !== "single"),
425
+ "aria-multiselectable": w(r("selectionMode") !== "single"),
424
426
  "data-view": o,
425
- dir: s("dir"),
427
+ dir: r("dir"),
426
428
  tabIndex: -1,
427
429
  onKeyDown(V) {
428
430
  if (V.defaultPrevented) return;
429
431
  const h = {
430
432
  Enter() {
431
- o === "day" && ie(f) || o === "month" && !Z({ value: f.month }).selectable || o === "year" && !K({ value: f.year }).selectable || l({ type: "TABLE.ENTER", view: o, columns: i, focus: !0 });
433
+ o === "day" && ie(v) || o === "month" && !Z({ value: v.month }).selectable || o === "year" && !K({ value: v.year }).selectable || l({ type: "TABLE.ENTER", view: o, columns: i, focus: !0 });
432
434
  },
433
435
  ArrowLeft() {
434
436
  l({ type: "TABLE.ARROW_LEFT", view: o, columns: i, focus: !0 });
@@ -454,8 +456,8 @@ function va(e, t) {
454
456
  End() {
455
457
  l({ type: "TABLE.END", view: o, columns: i, focus: !0 });
456
458
  }
457
- }[St(V, {
458
- dir: s("dir")
459
+ }[bt(V, {
460
+ dir: r("dir")
459
461
  })];
460
462
  h && (h(V), V.preventDefault(), V.stopPropagation());
461
463
  },
@@ -470,47 +472,47 @@ function va(e, t) {
470
472
  }
471
473
  });
472
474
  },
473
- getTableHeadProps(r = {}) {
474
- const { view: o = "day" } = r;
475
+ getTableHeadProps(s = {}) {
476
+ const { view: o = "day" } = s;
475
477
  return t.element({
476
- ...v.tableHead.attrs,
478
+ ...f.tableHead.attrs,
477
479
  "aria-hidden": !0,
478
- dir: s("dir"),
480
+ dir: r("dir"),
479
481
  "data-view": o,
480
482
  "data-disabled": u(T)
481
483
  });
482
484
  },
483
- getTableHeaderProps(r = {}) {
484
- const { view: o = "day" } = r;
485
+ getTableHeaderProps(s = {}) {
486
+ const { view: o = "day" } = s;
485
487
  return t.element({
486
- ...v.tableHeader.attrs,
487
- dir: s("dir"),
488
+ ...f.tableHeader.attrs,
489
+ dir: r("dir"),
488
490
  "data-view": o,
489
491
  "data-disabled": u(T)
490
492
  });
491
493
  },
492
- getTableBodyProps(r = {}) {
493
- const { view: o = "day" } = r;
494
+ getTableBodyProps(s = {}) {
495
+ const { view: o = "day" } = s;
494
496
  return t.element({
495
- ...v.tableBody.attrs,
497
+ ...f.tableBody.attrs,
496
498
  "data-view": o,
497
499
  "data-disabled": u(T)
498
500
  });
499
501
  },
500
- getTableRowProps(r = {}) {
501
- const { view: o = "day" } = r;
502
+ getTableRowProps(s = {}) {
503
+ const { view: o = "day" } = s;
502
504
  return t.element({
503
- ...v.tableRow.attrs,
505
+ ...f.tableRow.attrs,
504
506
  "aria-disabled": w(T),
505
507
  "data-disabled": u(T),
506
508
  "data-view": o
507
509
  });
508
510
  },
509
511
  getDayTableCellState: le,
510
- getDayTableCellProps(r) {
511
- const { value: o } = r, i = le(r);
512
+ getDayTableCellProps(s) {
513
+ const { value: o } = s, i = le(s);
512
514
  return t.element({
513
- ...v.tableCell.attrs,
515
+ ...f.tableCell.attrs,
514
516
  role: "gridcell",
515
517
  "aria-disabled": w(!i.selectable),
516
518
  "aria-selected": i.selected || i.inRange,
@@ -519,13 +521,13 @@ function va(e, t) {
519
521
  "data-value": o.toString()
520
522
  });
521
523
  },
522
- getDayTableCellTriggerProps(r) {
523
- const { value: o } = r, i = le(r);
524
+ getDayTableCellTriggerProps(s) {
525
+ const { value: o } = s, i = le(s);
524
526
  return t.element({
525
- ...v.tableCellTrigger.attrs,
527
+ ...f.tableCellTrigger.attrs,
526
528
  id: ue(g, o.toString()),
527
529
  role: "button",
528
- dir: s("dir"),
530
+ dir: r("dir"),
529
531
  tabIndex: i.focused ? 0 : -1,
530
532
  "aria-label": i.ariaLabel,
531
533
  "aria-disabled": w(!i.selectable),
@@ -551,16 +553,16 @@ function va(e, t) {
551
553
  onPointerMove: k ? (c) => {
552
554
  if (c.pointerType === "touch" || !i.selectable) return;
553
555
  const V = c.currentTarget.ownerDocument.activeElement !== c.currentTarget;
554
- R && De(o, R) || l({ type: "CELL.POINTER_MOVE", cell: "day", value: o, focus: V });
556
+ x && De(o, x) || l({ type: "CELL.POINTER_MOVE", cell: "day", value: o, focus: V });
555
557
  } : void 0
556
558
  });
557
559
  },
558
560
  getMonthTableCellState: Z,
559
- getMonthTableCellProps(r) {
560
- const { value: o, columns: i } = r, c = Z(r);
561
+ getMonthTableCellProps(s) {
562
+ const { value: o, columns: i } = s, c = Z(s);
561
563
  return t.element({
562
- ...v.tableCell.attrs,
563
- dir: s("dir"),
564
+ ...f.tableCell.attrs,
565
+ dir: r("dir"),
564
566
  colSpan: i,
565
567
  role: "gridcell",
566
568
  "aria-selected": w(c.selected || c.inRange),
@@ -569,11 +571,11 @@ function va(e, t) {
569
571
  "data-value": o
570
572
  });
571
573
  },
572
- getMonthTableCellTriggerProps(r) {
573
- const { value: o } = r, i = Z(r);
574
+ getMonthTableCellTriggerProps(s) {
575
+ const { value: o } = s, i = Z(s);
574
576
  return t.element({
575
- ...v.tableCellTrigger.attrs,
576
- dir: s("dir"),
577
+ ...f.tableCellTrigger.attrs,
578
+ dir: r("dir"),
577
579
  role: "button",
578
580
  id: ue(g, o.toString()),
579
581
  "data-selected": u(i.selected),
@@ -591,16 +593,16 @@ function va(e, t) {
591
593
  onPointerMove: k ? (c) => {
592
594
  if (c.pointerType === "touch" || !i.selectable) return;
593
595
  const V = c.currentTarget.ownerDocument.activeElement !== c.currentTarget;
594
- R && i.value && De(i.value, R) || l({ type: "CELL.POINTER_MOVE", cell: "month", value: i.value, focus: V });
596
+ x && i.value && De(i.value, x) || l({ type: "CELL.POINTER_MOVE", cell: "month", value: i.value, focus: V });
595
597
  } : void 0
596
598
  });
597
599
  },
598
600
  getYearTableCellState: K,
599
- getYearTableCellProps(r) {
600
- const { value: o, columns: i } = r, c = K(r);
601
+ getYearTableCellProps(s) {
602
+ const { value: o, columns: i } = s, c = K(s);
601
603
  return t.element({
602
- ...v.tableCell.attrs,
603
- dir: s("dir"),
604
+ ...f.tableCell.attrs,
605
+ dir: r("dir"),
604
606
  colSpan: i,
605
607
  role: "gridcell",
606
608
  "aria-selected": w(c.selected),
@@ -609,11 +611,11 @@ function va(e, t) {
609
611
  "data-value": o
610
612
  });
611
613
  },
612
- getYearTableCellTriggerProps(r) {
613
- const { value: o } = r, i = K(r);
614
+ getYearTableCellTriggerProps(s) {
615
+ const { value: o } = s, i = K(s);
614
616
  return t.element({
615
- ...v.tableCellTrigger.attrs,
616
- dir: s("dir"),
617
+ ...f.tableCellTrigger.attrs,
618
+ dir: r("dir"),
617
619
  role: "button",
618
620
  id: ue(g, o.toString()),
619
621
  "data-selected": u(i.selected),
@@ -630,14 +632,14 @@ function va(e, t) {
630
632
  }
631
633
  });
632
634
  },
633
- getNextTriggerProps(r = {}) {
634
- const { view: o = "day" } = r, i = T || !d("isNextVisibleRangeValid");
635
+ getNextTriggerProps(s = {}) {
636
+ const { view: o = "day" } = s, i = T || !d("isNextVisibleRangeValid");
635
637
  return t.button({
636
- ...v.nextTrigger.attrs,
637
- dir: s("dir"),
638
- id: Mt(g, o),
638
+ ...f.nextTrigger.attrs,
639
+ dir: r("dir"),
640
+ id: Bt(g, o),
639
641
  type: "button",
640
- "aria-label": x.nextTrigger(o),
642
+ "aria-label": R.nextTrigger(o),
641
643
  disabled: i,
642
644
  "data-disabled": u(i),
643
645
  onClick(c) {
@@ -645,14 +647,14 @@ function va(e, t) {
645
647
  }
646
648
  });
647
649
  },
648
- getPrevTriggerProps(r = {}) {
649
- const { view: o = "day" } = r, i = T || !d("isPrevVisibleRangeValid");
650
+ getPrevTriggerProps(s = {}) {
651
+ const { view: o = "day" } = s, i = T || !d("isPrevVisibleRangeValid");
650
652
  return t.button({
651
- ...v.prevTrigger.attrs,
652
- dir: s("dir"),
653
- id: Ft(g, o),
653
+ ...f.prevTrigger.attrs,
654
+ dir: r("dir"),
655
+ id: $t(g, o),
654
656
  type: "button",
655
- "aria-label": x.prevTrigger(o),
657
+ "aria-label": R.prevTrigger(o),
656
658
  disabled: i,
657
659
  "data-disabled": u(i),
658
660
  onClick(c) {
@@ -662,83 +664,83 @@ function va(e, t) {
662
664
  },
663
665
  getClearTriggerProps() {
664
666
  return t.button({
665
- ...v.clearTrigger.attrs,
667
+ ...f.clearTrigger.attrs,
666
668
  id: Le(g),
667
- dir: s("dir"),
669
+ dir: r("dir"),
668
670
  type: "button",
669
- "aria-label": x.clearTrigger,
671
+ "aria-label": R.clearTrigger,
670
672
  hidden: !p.length,
671
- onClick(r) {
672
- r.defaultPrevented || l({ type: "VALUE.CLEAR" });
673
+ onClick(s) {
674
+ s.defaultPrevented || l({ type: "VALUE.CLEAR" });
673
675
  }
674
676
  });
675
677
  },
676
678
  getTriggerProps() {
677
679
  return t.button({
678
- ...v.trigger.attrs,
680
+ ...f.trigger.attrs,
679
681
  id: Ne(g),
680
- dir: s("dir"),
682
+ dir: r("dir"),
681
683
  type: "button",
682
- "data-placement": se,
683
- "aria-label": x.trigger(L),
684
+ "data-placement": re,
685
+ "aria-label": R.trigger(L),
684
686
  "aria-controls": de(g),
685
687
  "data-state": L ? "open" : "closed",
686
688
  "aria-haspopup": "grid",
687
689
  disabled: T,
688
- onClick(r) {
689
- r.defaultPrevented || ne && l({ type: "TRIGGER.CLICK" });
690
+ onClick(s) {
691
+ s.defaultPrevented || ne && l({ type: "TRIGGER.CLICK" });
690
692
  }
691
693
  });
692
694
  },
693
- getViewProps(r = {}) {
694
- const { view: o = "day" } = r;
695
+ getViewProps(s = {}) {
696
+ const { view: o = "day" } = s;
695
697
  return t.element({
696
- ...v.view.attrs,
698
+ ...f.view.attrs,
697
699
  "data-view": o,
698
700
  hidden: n.get("view") !== o
699
701
  });
700
702
  },
701
- getViewTriggerProps(r = {}) {
702
- const { view: o = "day" } = r;
703
+ getViewTriggerProps(s = {}) {
704
+ const { view: o = "day" } = s;
703
705
  return t.button({
704
- ...v.viewTrigger.attrs,
706
+ ...f.viewTrigger.attrs,
705
707
  "data-view": o,
706
- dir: s("dir"),
707
- id: Bt(g, o),
708
+ dir: r("dir"),
709
+ id: Ut(g, o),
708
710
  type: "button",
709
711
  disabled: T,
710
- "aria-label": x.viewTrigger(o),
712
+ "aria-label": R.viewTrigger(o),
711
713
  onClick(i) {
712
714
  i.defaultPrevented || ne && l({ type: "VIEW.TOGGLE", src: "viewTrigger" });
713
715
  }
714
716
  });
715
717
  },
716
- getViewControlProps(r = {}) {
717
- const { view: o = "day" } = r;
718
+ getViewControlProps(s = {}) {
719
+ const { view: o = "day" } = s;
718
720
  return t.element({
719
- ...v.viewControl.attrs,
721
+ ...f.viewControl.attrs,
720
722
  "data-view": o,
721
- dir: s("dir")
723
+ dir: r("dir")
722
724
  });
723
725
  },
724
- getInputProps(r = {}) {
725
- const { index: o = 0, fixOnBlur: i = !0 } = r;
726
+ getInputProps(s = {}) {
727
+ const { index: o = 0, fixOnBlur: i = !0 } = s;
726
728
  return t.input({
727
- ...v.input.attrs,
729
+ ...f.input.attrs,
728
730
  id: Ie(g, o),
729
731
  autoComplete: "off",
730
732
  autoCorrect: "off",
731
733
  spellCheck: "false",
732
- dir: s("dir"),
733
- name: s("name"),
734
+ dir: r("dir"),
735
+ name: r("name"),
734
736
  "data-index": o,
735
737
  "data-state": L ? "open" : "closed",
736
738
  readOnly: _,
737
739
  disabled: T,
738
- placeholder: s("placeholder") || _t(b),
740
+ placeholder: r("placeholder") || Zt(b),
739
741
  defaultValue: d("valueAsString")[o],
740
742
  onBeforeInput(c) {
741
- const { data: V } = Tt(c);
743
+ const { data: V } = Et(c);
742
744
  Ue(V, me) || c.preventDefault();
743
745
  },
744
746
  onFocus() {
@@ -752,56 +754,56 @@ function va(e, t) {
752
754
  if (c.defaultPrevented || !ne) return;
753
755
  const P = {
754
756
  Enter(h) {
755
- Et(h) || ie(f) || h.currentTarget.value.trim() !== "" && l({ type: "INPUT.ENTER", value: h.currentTarget.value, index: o });
757
+ Dt(h) || ie(v) || h.currentTarget.value.trim() !== "" && l({ type: "INPUT.ENTER", value: h.currentTarget.value, index: o });
756
758
  }
757
759
  }[c.key];
758
760
  P && (P(c), c.preventDefault());
759
761
  },
760
762
  onInput(c) {
761
763
  const V = c.currentTarget.value;
762
- l({ type: "INPUT.CHANGE", value: Kt(V, me), index: o });
764
+ l({ type: "INPUT.CHANGE", value: jt(V, me), index: o });
763
765
  }
764
766
  });
765
767
  },
766
768
  getMonthSelectProps() {
767
769
  return t.select({
768
- ...v.monthSelect.attrs,
770
+ ...f.monthSelect.attrs,
769
771
  id: Me(g),
770
- "aria-label": x.monthSelect,
772
+ "aria-label": R.monthSelect,
771
773
  disabled: T,
772
- dir: s("dir"),
774
+ dir: r("dir"),
773
775
  defaultValue: D.month,
774
- onChange(r) {
775
- Te(Number(r.currentTarget.value));
776
+ onChange(s) {
777
+ Te(Number(s.currentTarget.value));
776
778
  }
777
779
  });
778
780
  },
779
781
  getYearSelectProps() {
780
782
  return t.select({
781
- ...v.yearSelect.attrs,
782
- id: Be(g),
783
+ ...f.yearSelect.attrs,
784
+ id: $e(g),
783
785
  disabled: T,
784
- "aria-label": x.yearSelect,
785
- dir: s("dir"),
786
+ "aria-label": R.yearSelect,
787
+ dir: r("dir"),
786
788
  defaultValue: D.year,
787
- onChange(r) {
788
- Se(Number(r.currentTarget.value));
789
+ onChange(s) {
790
+ Se(Number(s.currentTarget.value));
789
791
  }
790
792
  });
791
793
  },
792
794
  getPositionerProps() {
793
795
  return t.element({
794
796
  id: Fe(g),
795
- ...v.positioner.attrs,
796
- dir: s("dir"),
797
+ ...f.positioner.attrs,
798
+ dir: r("dir"),
797
799
  style: We.floating
798
800
  });
799
801
  },
800
- getPresetTriggerProps(r) {
801
- const o = Array.isArray(r.value) ? r.value : pe(r.value, b, y), i = o.map((c) => c.toDate(y).toDateString());
802
+ getPresetTriggerProps(s) {
803
+ const o = Array.isArray(s.value) ? s.value : pe(s.value, b, y), i = o.map((c) => c.toDate(y).toDateString());
802
804
  return t.button({
803
- ...v.presetTrigger.attrs,
804
- "aria-label": x.presetTrigger(i),
805
+ ...f.presetTrigger.attrs,
806
+ "aria-label": R.presetTrigger(i),
805
807
  type: "button",
806
808
  onClick(c) {
807
809
  c.defaultPrevented || l({ type: "PRESET.CLICK", value: o });
@@ -810,8 +812,8 @@ function va(e, t) {
810
812
  }
811
813
  };
812
814
  }
813
- var { and: O } = It();
814
- function ta(e, t) {
815
+ var { and: O } = Rt();
816
+ function na(e, t) {
815
817
  if ((e == null ? void 0 : e.length) !== (t == null ? void 0 : t.length)) return !1;
816
818
  const a = Math.max(e.length, t.length);
817
819
  for (let n = 0; n < a; n++)
@@ -821,15 +823,15 @@ function ta(e, t) {
821
823
  function X(e, t) {
822
824
  return e.map((a) => t("format")(a, { locale: t("locale"), timeZone: t("timeZone") }));
823
825
  }
824
- var fa = Ot({
826
+ var Sa = xt({
825
827
  props({ props: e }) {
826
- const t = e.locale || "en-US", a = e.timeZone || "UTC", n = e.selectionMode || "single", s = e.numOfMonths || 1, l = e.defaultValue ? q(e.defaultValue).map((f) => F(f, e.min, e.max)) : void 0, d = e.value ? q(e.value).map((f) => F(f, e.min, e.max)) : void 0;
828
+ const t = e.locale || "en-US", a = e.timeZone || "UTC", n = e.selectionMode || "single", r = e.numOfMonths || 1, l = e.defaultValue ? q(e.defaultValue).map((v) => F(v, e.min, e.max)) : void 0, d = e.value ? q(e.value).map((v) => F(v, e.min, e.max)) : void 0;
827
829
  let g = e.focusedValue || e.defaultFocusedValue || (d == null ? void 0 : d[0]) || (l == null ? void 0 : l[0]) || U(a);
828
830
  g = F(g, e.min, e.max);
829
- const D = "day", G = "year", p = fe(e.view || D, D, G);
831
+ const D = "day", G = "year", p = ve(e.view || D, D, G);
830
832
  return {
831
833
  locale: t,
832
- numOfMonths: s,
834
+ numOfMonths: r,
833
835
  timeZone: a,
834
836
  selectionMode: n,
835
837
  defaultView: p,
@@ -837,11 +839,11 @@ var fa = Ot({
837
839
  maxView: G,
838
840
  outsideDaySelectable: !1,
839
841
  closeOnSelect: !0,
840
- format(f, { locale: R, timeZone: I }) {
841
- return new te(R, { timeZone: I, day: "2-digit", month: "2-digit", year: "numeric" }).format(f.toDate(I));
842
+ format(v, { locale: x, timeZone: I }) {
843
+ return new te(x, { timeZone: I, day: "2-digit", month: "2-digit", year: "numeric" }).format(v.toDate(I));
842
844
  },
843
- parse(f, { locale: R, timeZone: I }) {
844
- return mt(f, R, I);
845
+ parse(v, { locale: x, timeZone: I }) {
846
+ return Tt(v, x, I);
845
847
  },
846
848
  ...e,
847
849
  focusedValue: typeof e.focusedValue > "u" ? void 0 : g,
@@ -872,19 +874,19 @@ var fa = Ot({
872
874
  sync: !0,
873
875
  onChange(n) {
874
876
  var D;
875
- const s = a(), l = s.get("view"), d = s.get("value"), g = X(d, e);
877
+ const r = a(), l = r.get("view"), d = r.get("value"), g = X(d, e);
876
878
  (D = e("onFocusChange")) == null || D({ value: d, valueAsString: g, view: l, focusedValue: n });
877
879
  }
878
880
  })),
879
881
  value: t(() => ({
880
882
  defaultValue: e("defaultValue"),
881
883
  value: e("value"),
882
- isEqual: ta,
883
- hash: (n) => n.map((s) => s.toString()).join(","),
884
+ isEqual: na,
885
+ hash: (n) => n.map((r) => r.toString()).join(","),
884
886
  onChange(n) {
885
887
  var d;
886
- const s = a(), l = X(n, e);
887
- (d = e("onValueChange")) == null || d({ value: n, valueAsString: l, view: s.get("view") });
888
+ const r = a(), l = X(n, e);
889
+ (d = e("onValueChange")) == null || d({ value: n, valueAsString: l, view: r.get("view") });
888
890
  }
889
891
  })),
890
892
  inputValue: t(() => ({
@@ -896,14 +898,14 @@ var fa = Ot({
896
898
  })),
897
899
  hoveredValue: t(() => ({
898
900
  defaultValue: null,
899
- isEqual: (n, s) => s !== null && n !== null && C(n, s)
901
+ isEqual: (n, r) => r !== null && n !== null && C(n, r)
900
902
  })),
901
903
  view: t(() => ({
902
904
  defaultValue: e("defaultView"),
903
905
  value: e("view"),
904
906
  onChange(n) {
905
- var s;
906
- (s = e("onViewChange")) == null || s({ view: n });
907
+ var r;
908
+ (r = e("onViewChange")) == null || r({ view: n });
907
909
  }
908
910
  })),
909
911
  startValue: t(() => {
@@ -911,7 +913,7 @@ var fa = Ot({
911
913
  return {
912
914
  defaultValue: Ce(n, "start", { months: e("numOfMonths") }, e("locale")),
913
915
  isEqual: C,
914
- hash: (s) => s.toString()
916
+ hash: (r) => r.toString()
915
917
  };
916
918
  }),
917
919
  currentPlacement: t(() => ({
@@ -925,18 +927,18 @@ var fa = Ot({
925
927
  computed: {
926
928
  isInteractive: ({ prop: e }) => !e("disabled") && !e("readOnly"),
927
929
  visibleDuration: ({ prop: e }) => ({ months: e("numOfMonths") }),
928
- endValue: ({ context: e, computed: t }) => lt(e.get("startValue"), t("visibleDuration")),
930
+ endValue: ({ context: e, computed: t }) => ut(e.get("startValue"), t("visibleDuration")),
929
931
  visibleRange: ({ context: e, computed: t }) => ({ start: e.get("startValue"), end: t("endValue") }),
930
932
  visibleRangeText({ context: e, prop: t, computed: a }) {
931
- const n = t("timeZone"), s = new te(t("locale"), { month: "long", year: "numeric", timeZone: n }), l = s.format(e.get("startValue").toDate(n)), d = s.format(a("endValue").toDate(n)), g = t("selectionMode") === "range" ? `${l} - ${d}` : l;
933
+ const n = t("timeZone"), r = new te(t("locale"), { month: "long", year: "numeric", timeZone: n }), l = r.format(e.get("startValue").toDate(n)), d = r.format(a("endValue").toDate(n)), g = t("selectionMode") === "range" ? `${l} - ${d}` : l;
932
934
  return { start: l, end: d, formatted: g };
933
935
  },
934
- isPrevVisibleRangeValid: ({ context: e, prop: t }) => !Vt(e.get("startValue"), t("min"), t("max")),
935
- isNextVisibleRangeValid: ({ prop: e, computed: t }) => !ft(t("endValue"), e("min"), e("max")),
936
+ isPrevVisibleRangeValid: ({ context: e, prop: t }) => !yt(e.get("startValue"), t("min"), t("max")),
937
+ isNextVisibleRangeValid: ({ prop: e, computed: t }) => !mt(t("endValue"), e("min"), e("max")),
936
938
  valueAsString: ({ context: e, prop: t }) => X(e.get("value"), t)
937
939
  },
938
940
  effects: ["setupLiveRegion"],
939
- watch({ track: e, prop: t, context: a, action: n, computed: s }) {
941
+ watch({ track: e, prop: t, context: a, action: n, computed: r }) {
940
942
  e([() => t("locale")], () => {
941
943
  n(["setStartValue"]);
942
944
  }), e([() => a.hash("focusedValue")], () => {
@@ -947,7 +949,7 @@ var fa = Ot({
947
949
  n(["syncInputValue"]);
948
950
  }), e([() => a.hash("value")], () => {
949
951
  n(["syncInputElement"]);
950
- }), e([() => s("valueAsString").toString()], () => {
952
+ }), e([() => r("valueAsString").toString()], () => {
951
953
  n(["announceValueText"]);
952
954
  }), e([() => a.get("view")], () => {
953
955
  n(["focusActiveCell"]);
@@ -1373,7 +1375,7 @@ var fa = Ot({
1373
1375
  },
1374
1376
  implementations: {
1375
1377
  guards: {
1376
- isAboveMinView: ({ context: e, prop: t }) => qt(e.get("view"), t("minView")),
1378
+ isAboveMinView: ({ context: e, prop: t }) => Jt(e.get("view"), t("minView")),
1377
1379
  isDayView: ({ context: e, event: t }) => (t.view || e.get("view")) === "day",
1378
1380
  isMonthView: ({ context: e, event: t }) => (t.view || e.get("view")) === "month",
1379
1381
  isYearView: ({ context: e, event: t }) => (t.view || e.get("view")) === "year",
@@ -1395,8 +1397,8 @@ var fa = Ot({
1395
1397
  trackPositioning({ context: e, prop: t, scope: a }) {
1396
1398
  if (t("inline")) return;
1397
1399
  e.get("currentPlacement") || e.set("currentPlacement", t("positioning").placement);
1398
- const n = $e(a);
1399
- return Ct(n, () => Wt(a), {
1400
+ const n = Be(a);
1401
+ return Ot(n, () => Gt(a), {
1400
1402
  ...t("positioning"),
1401
1403
  defer: !0,
1402
1404
  onComplete(l) {
@@ -1406,15 +1408,15 @@ var fa = Ot({
1406
1408
  },
1407
1409
  setupLiveRegion({ scope: e, refs: t }) {
1408
1410
  const a = e.getDoc();
1409
- return t.set("announcer", xt({ level: "assertive", document: a })), () => {
1410
- var n, s;
1411
- return (s = (n = t.get("announcer")) == null ? void 0 : n.destroy) == null ? void 0 : s.call(n);
1411
+ return t.set("announcer", Lt({ level: "assertive", document: a })), () => {
1412
+ var n, r;
1413
+ return (r = (n = t.get("announcer")) == null ? void 0 : n.destroy) == null ? void 0 : r.call(n);
1412
1414
  };
1413
1415
  },
1414
1416
  trackDismissableElement({ scope: e, send: t, context: a, prop: n }) {
1415
- return n("inline") ? void 0 : Rt(() => z(e), {
1417
+ return n("inline") ? void 0 : At(() => z(e), {
1416
1418
  defer: !0,
1417
- exclude: [...Y(e), xe(e), Ht(e)],
1419
+ exclude: [...Y(e), Re(e), Yt(e)],
1418
1420
  onInteractOutside(l) {
1419
1421
  a.set("restoreFocus", !l.detail.focusable);
1420
1422
  },
@@ -1429,11 +1431,11 @@ var fa = Ot({
1429
1431
  },
1430
1432
  actions: {
1431
1433
  setNextView({ context: e, prop: t }) {
1432
- const a = Jt(e.get("view"), t("minView"), t("maxView"));
1434
+ const a = zt(e.get("view"), t("minView"), t("maxView"));
1433
1435
  e.set("view", a);
1434
1436
  },
1435
1437
  setPreviousView({ context: e, prop: t }) {
1436
- const a = Qt(e.get("view"), t("minView"), t("maxView"));
1438
+ const a = ea(e.get("view"), t("minView"), t("maxView"));
1437
1439
  e.set("view", a);
1438
1440
  },
1439
1441
  setView({ context: e, event: t }) {
@@ -1443,9 +1445,9 @@ var fa = Ot({
1443
1445
  e.set("restoreFocus", !0);
1444
1446
  },
1445
1447
  announceValueText({ context: e, prop: t, refs: a }) {
1446
- var s;
1447
- const n = e.get("value").map((l) => vt(l, null, t("locale"), t("timeZone")));
1448
- (s = a.get("announcer")) == null || s.announce(n.join(","), 3e3);
1448
+ var r;
1449
+ const n = e.get("value").map((l) => Vt(l, null, t("locale"), t("timeZone")));
1450
+ (r = a.get("announcer")) == null || r.announce(n.join(","), 3e3);
1449
1451
  },
1450
1452
  announceVisibleRange({ computed: e, refs: t }) {
1451
1453
  var n;
@@ -1453,10 +1455,10 @@ var fa = Ot({
1453
1455
  (n = t.get("announcer")) == null || n.announce(a);
1454
1456
  },
1455
1457
  disableTextSelection({ scope: e }) {
1456
- ht({ target: z(e), doc: e.getDoc() });
1458
+ Ct({ target: z(e), doc: e.getDoc() });
1457
1459
  },
1458
1460
  enableTextSelection({ scope: e }) {
1459
- pt({ doc: e.getDoc(), target: z(e) });
1461
+ wt({ doc: e.getDoc(), target: z(e) });
1460
1462
  },
1461
1463
  focusFirstSelectedDate(e) {
1462
1464
  const { context: t } = e;
@@ -1464,8 +1466,8 @@ var fa = Ot({
1464
1466
  },
1465
1467
  syncInputElement({ scope: e, computed: t }) {
1466
1468
  M(() => {
1467
- Y(e).forEach((n, s) => {
1468
- j(n, t("valueAsString")[s] || "");
1469
+ Y(e).forEach((n, r) => {
1470
+ j(n, t("valueAsString")[r] || "");
1469
1471
  });
1470
1472
  });
1471
1473
  },
@@ -1487,7 +1489,7 @@ var fa = Ot({
1487
1489
  },
1488
1490
  setDateValue({ context: e, event: t, prop: a }) {
1489
1491
  if (!Array.isArray(t.value)) return;
1490
- const n = t.value.map((s) => F(s, a("min"), a("max")));
1492
+ const n = t.value.map((r) => F(r, a("min"), a("max")));
1491
1493
  e.set("value", n);
1492
1494
  },
1493
1495
  clearDateValue({ context: e }) {
@@ -1502,13 +1504,13 @@ var fa = Ot({
1502
1504
  t.set("value", [n]);
1503
1505
  },
1504
1506
  toggleSelectedDate(e) {
1505
- const { context: t, event: a } = e, n = ee(e, a.value ?? t.get("focusedValue")), s = t.get("value").findIndex((l) => C(l, n));
1506
- if (s === -1) {
1507
+ const { context: t, event: a } = e, n = ee(e, a.value ?? t.get("focusedValue")), r = t.get("value").findIndex((l) => C(l, n));
1508
+ if (r === -1) {
1507
1509
  const l = [...t.get("value"), n];
1508
1510
  t.set("value", q(l));
1509
1511
  } else {
1510
1512
  const l = Array.from(t.get("value"));
1511
- l.splice(s, 1), t.set("value", q(l));
1513
+ l.splice(r, 1), t.set("value", q(l));
1512
1514
  }
1513
1515
  },
1514
1516
  setHoveredDate({ context: e, event: t }) {
@@ -1520,8 +1522,8 @@ var fa = Ot({
1520
1522
  selectFocusedDate({ context: e, computed: t }) {
1521
1523
  const a = Array.from(e.get("value")), n = e.get("activeIndex");
1522
1524
  a[n] = e.get("focusedValue").copy(), e.set("value", ge(a));
1523
- const s = t("valueAsString");
1524
- e.set("inputValue", s[n]);
1525
+ const r = t("valueAsString");
1526
+ e.set("inputValue", r[n]);
1525
1527
  },
1526
1528
  focusPreviousDay(e) {
1527
1529
  const { context: t } = e, a = t.get("focusedValue").subtract({ days: 1 });
@@ -1540,7 +1542,7 @@ var fa = Ot({
1540
1542
  m(e, a);
1541
1543
  },
1542
1544
  focusNextPage(e) {
1543
- const { context: t, computed: a, prop: n } = e, s = gt(
1545
+ const { context: t, computed: a, prop: n } = e, r = vt(
1544
1546
  t.get("focusedValue"),
1545
1547
  t.get("startValue"),
1546
1548
  a("visibleDuration"),
@@ -1548,10 +1550,10 @@ var fa = Ot({
1548
1550
  n("min"),
1549
1551
  n("max")
1550
1552
  );
1551
- J(e, s);
1553
+ J(e, r);
1552
1554
  },
1553
1555
  focusPreviousPage(e) {
1554
- const { context: t, computed: a, prop: n } = e, s = dt(
1556
+ const { context: t, computed: a, prop: n } = e, r = ft(
1555
1557
  t.get("focusedValue"),
1556
1558
  t.get("startValue"),
1557
1559
  a("visibleDuration"),
@@ -1559,7 +1561,7 @@ var fa = Ot({
1559
1561
  n("min"),
1560
1562
  n("max")
1561
1563
  );
1562
- J(e, s);
1564
+ J(e, r);
1563
1565
  },
1564
1566
  focusSectionStart(e) {
1565
1567
  const { context: t } = e;
@@ -1570,26 +1572,26 @@ var fa = Ot({
1570
1572
  m(e, t("endValue").copy());
1571
1573
  },
1572
1574
  focusNextSection(e) {
1573
- const { context: t, event: a, computed: n, prop: s } = e, l = ut(
1575
+ const { context: t, event: a, computed: n, prop: r } = e, l = gt(
1574
1576
  t.get("focusedValue"),
1575
1577
  t.get("startValue"),
1576
1578
  a.larger,
1577
1579
  n("visibleDuration"),
1578
- s("locale"),
1579
- s("min"),
1580
- s("max")
1580
+ r("locale"),
1581
+ r("min"),
1582
+ r("max")
1581
1583
  );
1582
1584
  l && J(e, l);
1583
1585
  },
1584
1586
  focusPreviousSection(e) {
1585
- const { context: t, event: a, computed: n, prop: s } = e, l = ct(
1587
+ const { context: t, event: a, computed: n, prop: r } = e, l = dt(
1586
1588
  t.get("focusedValue"),
1587
1589
  t.get("startValue"),
1588
1590
  a.larger,
1589
1591
  n("visibleDuration"),
1590
- s("locale"),
1591
- s("min"),
1592
- s("max")
1592
+ r("locale"),
1593
+ r("min"),
1594
+ r("max")
1593
1595
  );
1594
1596
  l && J(e, l);
1595
1597
  },
@@ -1658,14 +1660,14 @@ var fa = Ot({
1658
1660
  M(() => {
1659
1661
  var n;
1660
1662
  const a = t.get("view");
1661
- (n = Re(e, a)) == null || n.focus({ preventScroll: !0 });
1663
+ (n = xe(e, a)) == null || n.focus({ preventScroll: !0 });
1662
1664
  });
1663
1665
  },
1664
1666
  focusActiveCellIfNeeded({ scope: e, context: t, event: a }) {
1665
1667
  a.focus && M(() => {
1666
- var s;
1668
+ var r;
1667
1669
  const n = t.get("view");
1668
- (s = Re(e, n)) == null || s.focus({ preventScroll: !0 });
1670
+ (r = xe(e, n)) == null || r.focus({ preventScroll: !0 });
1669
1671
  });
1670
1672
  },
1671
1673
  setHoveredValueIfKeyboard({ context: e, event: t, prop: a }) {
@@ -1674,7 +1676,7 @@ var fa = Ot({
1674
1676
  focusTriggerElement({ scope: e }) {
1675
1677
  M(() => {
1676
1678
  var t;
1677
- (t = xe(e)) == null || t.focus({ preventScroll: !0 });
1679
+ (t = Re(e)) == null || t.focus({ preventScroll: !0 });
1678
1680
  });
1679
1681
  },
1680
1682
  focusFirstInputElement({ scope: e }) {
@@ -1685,16 +1687,16 @@ var fa = Ot({
1685
1687
  },
1686
1688
  focusInputElement({ scope: e }) {
1687
1689
  M(() => {
1688
- const t = Y(e), a = t.findLastIndex((l) => l.value !== ""), n = Math.max(a, 0), s = t[n];
1689
- s == null || s.focus({ preventScroll: !0 }), s == null || s.setSelectionRange(s.value.length, s.value.length);
1690
+ const t = Y(e), a = t.findLastIndex((l) => l.value !== ""), n = Math.max(a, 0), r = t[n];
1691
+ r == null || r.focus({ preventScroll: !0 }), r == null || r.setSelectionRange(r.value.length, r.value.length);
1690
1692
  });
1691
1693
  },
1692
1694
  syncMonthSelectElement({ scope: e, context: t }) {
1693
- const a = Ut(e);
1695
+ const a = Wt(e);
1694
1696
  j(a, t.get("startValue").month.toString());
1695
1697
  },
1696
1698
  syncYearSelectElement({ scope: e, context: t }) {
1697
- const a = $t(e);
1699
+ const a = Ht(e);
1698
1700
  j(a, t.get("startValue").year.toString());
1699
1701
  },
1700
1702
  setInputValue({ context: e, event: t }) {
@@ -1702,23 +1704,23 @@ var fa = Ot({
1702
1704
  },
1703
1705
  syncInputValue({ scope: e, context: t, event: a }) {
1704
1706
  queueMicrotask(() => {
1705
- const n = Y(e), s = a.index ?? t.get("activeIndex");
1706
- j(n[s], t.get("inputValue"));
1707
+ const n = Y(e), r = a.index ?? t.get("activeIndex");
1708
+ j(n[r], t.get("inputValue"));
1707
1709
  });
1708
1710
  },
1709
1711
  focusParsedDate(e) {
1710
1712
  const { event: t, prop: a } = e;
1711
1713
  if (t.index == null) return;
1712
- const s = a("parse")(t.value, { locale: a("locale"), timeZone: a("timeZone") });
1713
- !s || !Ae(s) || m(e, s);
1714
+ const r = a("parse")(t.value, { locale: a("locale"), timeZone: a("timeZone") });
1715
+ !r || !Ae(r) || m(e, r);
1714
1716
  },
1715
1717
  selectParsedDate({ context: e, event: t, prop: a }) {
1716
1718
  if (t.index == null) return;
1717
- let s = a("parse")(t.value, { locale: a("locale"), timeZone: a("timeZone") });
1718
- if ((!s || !Ae(s)) && t.value && (s = e.get("focusedValue").copy()), !s) return;
1719
- s = F(s, a("min"), a("max"));
1719
+ let r = a("parse")(t.value, { locale: a("locale"), timeZone: a("timeZone") });
1720
+ if ((!r || !Ae(r)) && t.value && (r = e.get("focusedValue").copy()), !r) return;
1721
+ r = F(r, a("min"), a("max"));
1720
1722
  const l = Array.from(e.get("value"));
1721
- l[t.index] = s, e.set("value", l);
1723
+ l[t.index] = r, e.set("value", l);
1722
1724
  const d = X(l, a);
1723
1725
  e.set("inputValue", d[t.index]);
1724
1726
  },
@@ -1727,7 +1729,7 @@ var fa = Ot({
1727
1729
  },
1728
1730
  setStartValue({ context: e, computed: t, prop: a }) {
1729
1731
  const n = e.get("focusedValue");
1730
- if (!$(n, e.get("startValue"), t("endValue"))) return;
1732
+ if (!B(n, e.get("startValue"), t("endValue"))) return;
1731
1733
  const l = Ce(n, "start", { months: a("numOfMonths") }, a("locale"));
1732
1734
  e.set("startValue", l);
1733
1735
  },
@@ -1745,18 +1747,18 @@ var fa = Ot({
1745
1747
  }
1746
1748
  }
1747
1749
  }), ee = (e, t) => {
1748
- const { context: a, prop: n } = e, s = a.get("view");
1749
- let l = typeof t == "number" ? a.get("focusedValue").set({ [s]: t }) : t;
1750
- return ea((d) => {
1751
- Xt(d, n("minView")) && (l = l.set({ [d]: d === "day" ? 1 : 0 }));
1750
+ const { context: a, prop: n } = e, r = a.get("view");
1751
+ let l = typeof t == "number" ? a.get("focusedValue").set({ [r]: t }) : t;
1752
+ return aa((d) => {
1753
+ Qt(d, n("minView")) && (l = l.set({ [d]: d === "day" ? 1 : 0 }));
1752
1754
  }), l;
1753
1755
  };
1754
1756
  function m(e, t) {
1755
- const { context: a, prop: n, computed: s } = e;
1757
+ const { context: a, prop: n, computed: r } = e;
1756
1758
  if (!t) return;
1757
1759
  const l = ee(e, t);
1758
1760
  if (C(a.get("focusedValue"), l)) return;
1759
- const g = yt(s("visibleDuration"), n("locale"), n("min"), n("max"))({
1761
+ const g = St(r("visibleDuration"), n("locale"), n("min"), n("max"))({
1760
1762
  focusedDate: l,
1761
1763
  startDate: a.get("startValue")
1762
1764
  });
@@ -1768,6 +1770,9 @@ function J(e, t) {
1768
1770
  const n = a.get("focusedValue");
1769
1771
  C(n, t.focusedDate) || a.set("focusedValue", t.focusedDate);
1770
1772
  }
1773
+ function oa(e) {
1774
+ return Array.isArray(e) ? e.map((t) => oa(t)) : e instanceof Date ? new ze(e.getFullYear(), e.getMonth() + 1, e.getDate()) : at(e);
1775
+ }
1771
1776
  H()([
1772
1777
  "closeOnSelect",
1773
1778
  "dir",
@@ -1814,7 +1819,8 @@ H()(["columns", "id", "view"]);
1814
1819
  H()(["disabled", "value", "columns"]);
1815
1820
  H()(["view"]);
1816
1821
  export {
1817
- At as anatomy,
1818
- va as connect,
1819
- fa as machine
1822
+ kt as anatomy,
1823
+ Ta as connect,
1824
+ Sa as machine,
1825
+ oa as parse
1820
1826
  };