@aiquants/period-slider 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as K, jsxs as $e, Fragment as Po } from "react/jsx-runtime";
2
- import { parseISO as Nc } from "date-fns";
3
- import { useMemo as Y, useRef as de, memo as Gn, useId as pl, useCallback as A, useState as Be, useLayoutEffect as at, useEffect as $t, useInsertionEffect as wl, useReducer as bl } from "react";
4
- import { VIRTUAL_SCROLL_LABEL_KEYS as li, VIRTUAL_SCROLL_LABEL_CATALOGS as Ms, resolveVirtualScrollLabels as Cc, resolveVirtualScrollLocale as Oc, VirtualScroll as Vc } from "@aiquants/virtualscroll";
5
- import { createPortal as kc } from "react-dom";
6
- const ci = "an object that cannot be converted to a string", _c = 3, ye = (e) => {
1
+ import { jsx as K, jsxs as $e, Fragment as Eo } from "react/jsx-runtime";
2
+ import { parseISO as Cc } from "date-fns";
3
+ import { useMemo as Y, useRef as de, memo as jn, useId as wl, useCallback as A, useState as We, useLayoutEffect as at, useEffect as $t, useInsertionEffect as bl, useReducer as vl } from "react";
4
+ import { VIRTUAL_SCROLL_LABEL_KEYS as di, VIRTUAL_SCROLL_LABEL_CATALOGS as ys, resolveVirtualScrollLabels as Oc, resolveVirtualScrollLocale as Vc, VirtualScroll as kc } from "@aiquants/virtualscroll";
5
+ import { createPortal as _c } from "react-dom";
6
+ const ui = "an object that cannot be converted to a string", Yc = 3, ye = (e) => {
7
7
  try {
8
8
  return e instanceof Date && !Number.isNaN(Date.prototype.getTime.call(e));
9
9
  } catch {
@@ -15,120 +15,120 @@ const ci = "an object that cannot be converted to a string", _c = 3, ye = (e) =>
15
15
  } catch {
16
16
  return !1;
17
17
  }
18
- }, Yc = (e) => e === void 0 || Ht(e);
18
+ }, Hc = (e) => e === void 0 || Ht(e);
19
19
  function mn(e, t, r) {
20
- if (!Yc(r))
20
+ if (!Hc(r))
21
21
  throw new RangeError(`${e}: ${t} must be an array of Dates (received: ${M(r)})`);
22
22
  }
23
23
  const M = (e) => {
24
24
  if (typeof e == "string") return JSON.stringify(e);
25
25
  if (ye(e)) return Date.prototype.toISOString.call(e);
26
- if (Ht(e)) return Hc(e);
26
+ if (Ht(e)) return Fc(e);
27
27
  try {
28
28
  return String(e);
29
29
  } catch {
30
- return ci;
30
+ return ui;
31
31
  }
32
- }, Hc = (e) => {
32
+ }, Fc = (e) => {
33
33
  let t;
34
34
  try {
35
35
  t = e.length;
36
36
  } catch {
37
- return ci;
37
+ return ui;
38
38
  }
39
- const r = Math.min(t, _c), n = [];
40
- for (let a = 0; a < r; a++) n.push(Fc(e, a));
39
+ const r = Math.min(t, Yc), n = [];
40
+ for (let a = 0; a < r; a++) n.push(Uc(e, a));
41
41
  const o = t - r;
42
42
  return `[${n.join(", ")}${o > 0 ? `, ... ${o} more` : ""}]`;
43
- }, Fc = (e, t) => {
43
+ }, Uc = (e, t) => {
44
44
  try {
45
45
  if (!(t in e)) return "empty";
46
46
  const r = e[t];
47
47
  return Ht(r) ? `Array(${r.length})` : M(r);
48
48
  } catch {
49
- return ci;
49
+ return ui;
50
50
  }
51
- }, At = (e, t) => ye(e) ? t(e) : Number.NaN, St = (e, t) => e === void 0 ? null : At(e, t), ys = 120, Ca = "data-drag-snap", Oa = "--ps-drag-snap-duration", An = {
51
+ }, At = (e, t) => ye(e) ? t(e) : Number.NaN, St = (e, t) => e === void 0 ? null : At(e, t), Ps = 120, Va = "data-drag-snap", ka = "--ps-drag-snap-duration", An = {
52
52
  flat: ["--ps-drag-low", "--ps-drag-high"],
53
53
  macro: ["--ps-drag-macro-low", "--ps-drag-macro-high"],
54
54
  micro: ["--ps-drag-micro-low", "--ps-drag-micro-high"]
55
- }, vl = ["low", "high"], Sl = ["tx", "ty", "rot", "leader-length", "leader-angle"], jo = {
55
+ }, Sl = ["low", "high"], Dl = ["tx", "ty", "rot", "leader-length", "leader-angle"], qo = {
56
56
  flat: { low: "--ps-drag-label-low", high: "--ps-drag-label-high" },
57
57
  macro: { low: "--ps-drag-macro-label-low", high: "--ps-drag-macro-label-high" },
58
58
  micro: { low: "--ps-drag-micro-label-low", high: "--ps-drag-micro-label-high" }
59
- }, di = (e, t) => `${e}-${t}`, Nn = (e, t, r) => `var(${di(e, t)}, ${r})`, Uc = (e, t, r) => {
60
- const n = jo[t];
61
- for (const o of vl)
62
- for (const a of Sl) e.style.setProperty(di(n[o], a), r[o][a]);
63
- }, Dl = (e) => Math.max(0, Math.min(1, e)), Vo = (e, t, r, n) => {
64
- const o = Dl(t);
59
+ }, mi = (e, t) => `${e}-${t}`, Nn = (e, t, r) => `var(${mi(e, t)}, ${r})`, zc = (e, t, r) => {
60
+ const n = qo[t];
61
+ for (const o of Sl)
62
+ for (const a of Dl) e.style.setProperty(mi(n[o], a), r[o][a]);
63
+ }, Rl = (e) => Math.max(0, Math.min(1, e)), ko = (e, t, r, n) => {
64
+ const o = Rl(t);
65
65
  if (e === "point") return [o, o];
66
66
  const a = e === "low" ? n : r;
67
67
  return [Math.min(o, a), Math.max(o, a)];
68
- }, ui = (e, t, r) => {
68
+ }, fi = (e, t, r) => {
69
69
  const n = r - t, o = Math.max(0, Math.min(1 - n, t + e));
70
70
  return [o, o + n];
71
- }, mi = (e, t, r, n) => {
72
- const o = Dl(t);
71
+ }, hi = (e, t, r, n) => {
72
+ const o = Rl(t);
73
73
  return e === "low" ? o > n ? "high" : "low" : o < r ? "low" : "high";
74
- }, Va = (e, t, r, n) => {
74
+ }, _a = (e, t, r, n) => {
75
75
  if (r) {
76
76
  const i = (1 - e) * 100, s = (1 - t) * 100;
77
77
  return n ? `M 12 ${s} L 12 ${i} L 20 100 L 20 0 Z` : `M 12 0 L 12 100 L 20 ${i} L 20 ${s} Z`;
78
78
  }
79
79
  const o = e * 100, a = t * 100;
80
80
  return n ? `M ${o} 12 L ${a} 12 L 100 20 L 0 20 Z` : `M 0 12 L 100 12 L ${a} 20 L ${o} 20 Z`;
81
- }, fr = (e, t) => `var(${e}, ${t}%)`, zc = (e, t, r, n) => {
81
+ }, fr = (e, t) => `var(${e}, ${t}%)`, Bc = (e, t, r, n) => {
82
82
  const [o, a] = An[t];
83
83
  e.style.setProperty(o, `${r * 100}%`), e.style.setProperty(a, `${n * 100}%`);
84
- }, Bc = (e) => {
84
+ }, Wc = (e) => {
85
85
  for (const [t, r] of Object.values(An))
86
86
  e.style.removeProperty(t), e.style.removeProperty(r);
87
- for (const t of Object.values(jo))
88
- for (const r of vl)
89
- for (const n of Sl) e.style.removeProperty(di(t[r], n));
90
- }, Wc = ["transform", "translate", "scale", "rotate", "perspective", "filter", "backdrop-filter"], Gc = ["transform", "translate", "scale", "rotate", "perspective", "filter"], jc = ["paint", "layout", "strict", "content"], Kc = ["paint", "strict", "content"], qc = /* @__PURE__ */ new Set(["hidden", "clip", "auto", "scroll", "overlay"]), Xc = (e, t) => {
87
+ for (const t of Object.values(qo))
88
+ for (const r of Sl)
89
+ for (const n of Dl) e.style.removeProperty(mi(t[r], n));
90
+ }, Gc = ["transform", "translate", "scale", "rotate", "perspective", "filter", "backdrop-filter"], jc = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Kc = ["paint", "layout", "strict", "content"], qc = ["paint", "strict", "content"], Xc = /* @__PURE__ */ new Set(["hidden", "clip", "auto", "scroll", "overlay"]), Zc = (e, t) => {
91
91
  const r = e.getPropertyValue("position");
92
- if (t === "absolute" && r !== "" && r !== "static" || Wc.some((a) => !["", "none"].includes(e.getPropertyValue(a))) || !["", "normal"].includes(e.getPropertyValue("container-type"))) return !0;
92
+ if (t === "absolute" && r !== "" && r !== "static" || Gc.some((a) => !["", "none"].includes(e.getPropertyValue(a))) || !["", "normal"].includes(e.getPropertyValue("container-type"))) return !0;
93
93
  const n = e.getPropertyValue("will-change");
94
- if (Gc.some((a) => n.includes(a))) return !0;
94
+ if (jc.some((a) => n.includes(a))) return !0;
95
95
  const o = e.getPropertyValue("contain");
96
- return jc.some((a) => o.includes(a));
97
- }, Zc = (e) => {
96
+ return Kc.some((a) => o.includes(a));
97
+ }, Qc = (e) => {
98
98
  const t = e.getPropertyValue("display");
99
99
  if (t === "contents" || t === "inline") return !1;
100
- if (qc.has(e.getPropertyValue("overflow-y"))) return !0;
100
+ if (Xc.has(e.getPropertyValue("overflow-y"))) return !0;
101
101
  const r = e.getPropertyValue("contain");
102
- return Kc.some((n) => r.includes(n));
103
- }, Ps = (e) => {
102
+ return qc.some((n) => r.includes(n));
103
+ }, Es = (e) => {
104
104
  if (e.assignedSlot !== null) return e.assignedSlot;
105
105
  if (e.parentElement !== null) return e.parentElement;
106
106
  const t = e.parentNode;
107
107
  return t !== null && t.nodeType === 11 && "host" in t ? t.host : null;
108
- }, Qc = (e) => {
108
+ }, Jc = (e) => {
109
109
  const t = e.ownerDocument, r = t.defaultView;
110
110
  if (r === null) return [];
111
111
  const n = [];
112
112
  let o = r.getComputedStyle(e).getPropertyValue("position");
113
- for (let a = Ps(e); a !== null && a !== t.documentElement && a !== t.body; a = Ps(a)) {
113
+ for (let a = Es(e); a !== null && a !== t.documentElement && a !== t.body; a = Es(a)) {
114
114
  const i = r.getComputedStyle(a);
115
- (o === "absolute" || o === "fixed") && !Xc(i, o) || (Zc(i) && n.push(a), o = i.getPropertyValue("position"));
115
+ (o === "absolute" || o === "fixed") && !Zc(i, o) || (Qc(i) && n.push(a), o = i.getPropertyValue("position"));
116
116
  }
117
117
  return n;
118
- }, Jc = (e) => {
118
+ }, ed = (e) => {
119
119
  const t = e.getBoundingClientRect(), r = "offsetHeight" in e && typeof e.offsetHeight == "number" ? e.offsetHeight : 0, n = r > 0 ? t.height / r : 1, o = t.top + e.clientTop * n;
120
120
  return { top: o, bottom: o + e.clientHeight * n };
121
- }, ed = (e, t, r) => {
121
+ }, td = (e, t, r) => {
122
122
  const n = e.getBoundingClientRect(), o = e.ownerDocument.documentElement.clientHeight;
123
123
  if (!(n.height > 0 && o > 0)) return null;
124
124
  const a = n.top + n.height / 2;
125
125
  let i = 0, s = o;
126
- for (const c of Qc(e)) {
127
- const d = Jc(c);
126
+ for (const c of Jc(e)) {
127
+ const d = ed(c);
128
128
  i = Math.max(i, d.top), s = Math.min(s, d.bottom);
129
129
  }
130
130
  return t?.isConnected && (i = Math.max(i, t.getBoundingClientRect().bottom)), r?.isConnected && (s = Math.min(s, r.getBoundingClientRect().top)), { topPx: Math.max(0, a - i), bottomPx: Math.max(0, s - a) };
131
- }, td = (e, t, r, n) => {
131
+ }, rd = (e, t, r, n) => {
132
132
  const o = e.ownerDocument.defaultView;
133
133
  if (o === null) return null;
134
134
  const a = e.getBoundingClientRect(), i = t.getBoundingClientRect();
@@ -140,7 +140,7 @@ const M = (e) => {
140
140
  anchorPx: Math.abs(d - s),
141
141
  knobCentrePx: Math.abs(i.top + i.height / 2 - s)
142
142
  };
143
- }, Rl = [
143
+ }, xl = [
144
144
  "rangeStart",
145
145
  "rangeEnd",
146
146
  "selectedDate",
@@ -163,7 +163,7 @@ const M = (e) => {
163
163
  "splitYear",
164
164
  "splitMonth",
165
165
  "splitDay"
166
- ], fi = [...li, ...Rl], Ka = Object.freeze({
166
+ ], gi = [...di, ...xl], Xa = Object.freeze({
167
167
  en: Object.freeze({
168
168
  rangeStart: "Range start",
169
169
  rangeEnd: "Range end",
@@ -212,61 +212,61 @@ const M = (e) => {
212
212
  splitMonth: "月",
213
213
  splitDay: "日"
214
214
  })
215
- }), rd = Object.freeze({
216
- en: Object.freeze({ ...Ms.en, ...Ka.en }),
217
- ja: Object.freeze({ ...Ms.ja, ...Ka.ja })
218
- }), Es = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, nd = (e) => fi.includes(e), od = (e, t) => {
215
+ }), nd = Object.freeze({
216
+ en: Object.freeze({ ...ys.en, ...Xa.en }),
217
+ ja: Object.freeze({ ...ys.ja, ...Xa.ja })
218
+ }), Ls = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, od = (e) => gi.includes(e), ad = (e, t) => {
219
219
  const r = {};
220
220
  let n = !1;
221
- for (const o of li) {
221
+ for (const o of di) {
222
222
  const a = t.has(o) ? e[o] : void 0;
223
223
  a !== void 0 && (r[o] = a, n = !0);
224
224
  }
225
225
  return n ? r : void 0;
226
- }, ad = (e) => {
226
+ }, id = (e) => {
227
227
  try {
228
- return Oc(e);
228
+ return Vc(e);
229
229
  } catch (t) {
230
230
  throw t instanceof RangeError ? new RangeError(`[period-slider] locale is the UI language, not a BCP 47 tag (date formatting reads formatLocale): ${t.message}`, { cause: t }) : t;
231
231
  }
232
- }, id = (e, t) => {
233
- const r = ad(e);
234
- if (t === void 0) return rd[r];
232
+ }, sd = (e, t) => {
233
+ const r = id(e);
234
+ if (t === void 0) return nd[r];
235
235
  if (t === null || typeof t != "object")
236
- throw new RangeError(`[period-slider] labels must be an object; got ${Es(t)}`);
236
+ throw new RangeError(`[period-slider] labels must be an object; got ${Ls(t)}`);
237
237
  const n = Object.getPrototypeOf(t);
238
238
  if (n !== Object.prototype && n !== null)
239
239
  throw new RangeError(`[period-slider] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(t) ? "an array" : "an object with a non-plain prototype"}`);
240
240
  const o = new Set(Object.keys(t));
241
241
  for (const s of o)
242
- if (!nd(s))
243
- throw new RangeError(`[period-slider] labels.${s} is not a known label key; expected one of ${fi.join(", ")}`);
244
- const i = { ...Cc(r, od(t, o)), ...Ka[r] };
245
- for (const s of Rl) {
242
+ if (!od(s))
243
+ throw new RangeError(`[period-slider] labels.${s} is not a known label key; expected one of ${gi.join(", ")}`);
244
+ const i = { ...Oc(r, ad(t, o)), ...Xa[r] };
245
+ for (const s of xl) {
246
246
  const c = o.has(s) ? t[s] : void 0;
247
247
  if (c !== void 0) {
248
248
  if (typeof c != "string" || c.trim() === "")
249
- throw new RangeError(`[period-slider] labels.${s} must be a non-blank string; got ${Es(c)}`);
249
+ throw new RangeError(`[period-slider] labels.${s} must be a non-blank string; got ${Ls(c)}`);
250
250
  i[s] = c;
251
251
  }
252
252
  }
253
253
  return Object.freeze(i);
254
- }, sd = (e) => {
254
+ }, ld = (e) => {
255
255
  const t = {};
256
- for (const r of li)
256
+ for (const r of di)
257
257
  t[r] = e[r];
258
258
  return Object.freeze(t);
259
- }, ld = (e, t) => e === t || fi.every((r) => e[r] === t[r]), Ko = (e, t) => {
259
+ }, cd = (e, t) => e === t || gi.every((r) => e[r] === t[r]), Xo = (e, t) => {
260
260
  if (e === t) return !0;
261
261
  if (e === void 0 || t === void 0 || e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
262
262
  const r = new Set(Object.keys(e)), n = Object.keys(t);
263
263
  if (r.size !== n.length) return !1;
264
264
  const o = e, a = t;
265
265
  return n.every((i) => r.has(i) && Object.is(o[i], a[i]));
266
- }, ka = (e, t) => e !== null && t !== null && "nodeType" in t && e.contains(t), Ls = /* @__PURE__ */ new Set(["hidden", "clip", "scroll", "auto", "overlay"]), $s = ["paint", "strict", "content"], cd = ["layout", "paint", "strict", "content"], dd = ["transform", "perspective", "filter"], Mn = (e) => e !== void 0 && e !== "" && e !== "none", ud = (e) => e !== void 0 && e !== "" && e !== "normal", go = (e) => {
266
+ }, Ya = (e, t) => e !== null && t !== null && "nodeType" in t && e.contains(t), $s = /* @__PURE__ */ new Set(["hidden", "clip", "scroll", "auto", "overlay"]), Ts = ["paint", "strict", "content"], dd = ["layout", "paint", "strict", "content"], ud = ["transform", "perspective", "filter"], Mn = (e) => e !== void 0 && e !== "" && e !== "none", md = (e) => e !== void 0 && e !== "" && e !== "normal", po = (e) => {
267
267
  const t = Number.parseFloat(e ?? "");
268
268
  return Number.isFinite(t) ? t : 0;
269
- }, md = (e) => e.position === "fixed" ? "fixed" : e.position === "absolute" ? "absolute" : null, fd = (e, t) => t === "absolute" && Mn(e.position) && e.position !== "static" || Mn(e.transform) || Mn(e.perspective) || Mn(e.filter) || Mn(e.backdropFilter) || ud(e.containerType) || cd.some((r) => e.contain.includes(r)) ? !0 : dd.some((r) => e.willChange.includes(r)), hd = (e, t, r, n, o, a) => {
269
+ }, fd = (e) => e.position === "fixed" ? "fixed" : e.position === "absolute" ? "absolute" : null, hd = (e, t) => t === "absolute" && Mn(e.position) && e.position !== "static" || Mn(e.transform) || Mn(e.perspective) || Mn(e.filter) || Mn(e.backdropFilter) || md(e.containerType) || dd.some((r) => e.contain.includes(r)) ? !0 : ud.some((r) => e.willChange.includes(r)), gd = (e, t, r, n, o, a) => {
270
270
  const i = t.ownerDocument.defaultView;
271
271
  if (i === null) return !1;
272
272
  const s = e.getBoundingClientRect();
@@ -278,16 +278,16 @@ const M = (e) => {
278
278
  let S = null;
279
279
  for (let E = t; E !== null; E = E.parentElement) {
280
280
  const $ = E === t ? u : i.getComputedStyle(E);
281
- if (S !== null && !fd($, S)) continue;
282
- const p = Ls.has($.overflowX) || $s.some((w) => $.contain.includes(w)), h = Ls.has($.overflowY) || $s.some((w) => $.contain.includes(w));
281
+ if (S !== null && !hd($, S)) continue;
282
+ const p = $s.has($.overflowX) || Ts.some((w) => $.contain.includes(w)), h = $s.has($.overflowY) || Ts.some((w) => $.contain.includes(w));
283
283
  if (p || h) {
284
284
  const w = E.getBoundingClientRect();
285
- if (p && (o < w.left + go($.borderLeftWidth) || o >= w.right - go($.borderRightWidth)) || h && (a < w.top + go($.borderTopWidth) || a >= w.bottom - go($.borderBottomWidth))) return !1;
285
+ if (p && (o < w.left + po($.borderLeftWidth) || o >= w.right - po($.borderRightWidth)) || h && (a < w.top + po($.borderTopWidth) || a >= w.bottom - po($.borderBottomWidth))) return !1;
286
286
  }
287
- S = md($);
287
+ S = fd($);
288
288
  }
289
289
  return !0;
290
- }, _a = /* @__PURE__ */ new Map(), gd = (e, t) => {
290
+ }, Ha = /* @__PURE__ */ new Map(), pd = (e, t) => {
291
291
  if (!(t.shiftKey && t.cancelable)) return;
292
292
  for (const o of e)
293
293
  if (o.ownsHit(t.target)) {
@@ -300,18 +300,18 @@ const M = (e) => {
300
300
  a === null || a >= n || (r = o, n = a);
301
301
  }
302
302
  r?.step(t);
303
- }, pd = (e, t) => {
304
- let r = _a.get(e);
303
+ }, wd = (e, t) => {
304
+ let r = Ha.get(e);
305
305
  if (r === void 0) {
306
- const a = /* @__PURE__ */ new Set(), i = (s) => gd(a, s);
307
- r = { participants: a, listener: i }, _a.set(e, r), e.addEventListener("wheel", i, { passive: !1, capture: !0 });
306
+ const a = /* @__PURE__ */ new Set(), i = (s) => pd(a, s);
307
+ r = { participants: a, listener: i }, Ha.set(e, r), e.addEventListener("wheel", i, { passive: !1, capture: !0 });
308
308
  }
309
309
  const { participants: n, listener: o } = r;
310
310
  return n.add(t), () => {
311
- n.delete(t), !(n.size > 0) && (_a.delete(e), e.removeEventListener("wheel", o, { capture: !0 }));
311
+ n.delete(t), !(n.size > 0) && (Ha.delete(e), e.removeEventListener("wheel", o, { capture: !0 }));
312
312
  };
313
- }, On = "gap-[11px]", wd = { single: 1, double: 2 }, Tn = 6, Tr = Tn * 2, po = (e, t) => {
314
- const r = wd[e], n = (r - 1) * Tn + Tn * 4 / 3, o = Tr / 2, a = Array.from({ length: r }, (s, c) => {
313
+ }, Vn = "gap-[11px]", bd = { single: 1, double: 2 }, Tn = 6, Tr = Tn * 2, wo = (e, t) => {
314
+ const r = bd[e], n = (r - 1) * Tn + Tn * 4 / 3, o = Tr / 2, a = Array.from({ length: r }, (s, c) => {
315
315
  const d = c * Tn, u = d + Tn;
316
316
  return {
317
317
  left: `${d},${o} ${u},0 ${u},${Tr}`,
@@ -321,30 +321,30 @@ const M = (e) => {
321
321
  }[t];
322
322
  }), i = t === "up" || t === "down";
323
323
  return { widthPx: i ? Tr : n, heightPx: i ? n : Tr, triangles: a };
324
- }, Ts = (e) => ({
325
- left: po(e, "left"),
326
- right: po(e, "right"),
327
- up: po(e, "up"),
328
- down: po(e, "down")
329
- }), bd = { single: Ts("single"), double: Ts("double") }, hi = (e, t) => {
324
+ }, Is = (e) => ({
325
+ left: wo(e, "left"),
326
+ right: wo(e, "right"),
327
+ up: wo(e, "up"),
328
+ down: wo(e, "down")
329
+ }), vd = { single: Is("single"), double: Is("double") }, pi = (e, t) => {
330
330
  if (t === void 0) return "single";
331
331
  if (t === "single" || t === "double") return t;
332
332
  throw new RangeError(`${e}: stepGlyph must be "single" or "double" (received: ${M(t)})`);
333
- }, Ya = (e) => {
333
+ }, Fa = (e) => {
334
334
  e.preventDefault(), e.stopPropagation();
335
- }, vd = {
336
- onMouseDownCapture: Ya,
337
- onMouseUpCapture: Ya,
338
- onClickCapture: Ya
339
- }, Sd = "period-slider-step", Dd = `${Sd} relative inline-flex size-[22px] shrink-0 items-center justify-center rounded-md after:absolute after:content-['']`, Rd = "transition-colors motion-reduce:transition-none not-aria-disabled:cursor-pointer aria-disabled:cursor-not-allowed focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-600 dark:focus-visible:ring-blue-400 forced-colors:not-aria-disabled:hover:text-[Highlight] forced-colors:aria-disabled:text-[GrayText]", xd = {
335
+ }, Sd = {
336
+ onMouseDownCapture: Fa,
337
+ onMouseUpCapture: Fa,
338
+ onClickCapture: Fa
339
+ }, Dd = "period-slider-step", Rd = `${Dd} relative inline-flex size-[22px] shrink-0 items-center justify-center rounded-md after:absolute after:content-['']`, xd = "transition-colors motion-reduce:transition-none not-aria-disabled:cursor-pointer aria-disabled:cursor-not-allowed focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-600 dark:focus-visible:ring-blue-400 forced-colors:not-aria-disabled:hover:text-[Highlight] forced-colors:aria-disabled:text-[GrayText]", Md = {
340
340
  control: "text-slate-500 not-aria-disabled:hover:bg-slate-500/15 not-aria-disabled:hover:text-slate-900 not-aria-disabled:active:bg-slate-500/25 aria-disabled:text-slate-500/40 dark:text-slate-400 dark:not-aria-disabled:hover:text-slate-50 dark:aria-disabled:text-slate-400/40",
341
341
  rail: "border border-slate-300 bg-white text-slate-700 shadow-2xs not-aria-disabled:hover:border-slate-400 not-aria-disabled:hover:bg-slate-100 not-aria-disabled:hover:text-slate-900 not-aria-disabled:active:bg-slate-200 aria-disabled:border-slate-300/40 aria-disabled:bg-white/40 aria-disabled:text-slate-700/40 aria-disabled:shadow-none dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200 dark:not-aria-disabled:hover:border-slate-500 dark:not-aria-disabled:hover:bg-slate-700 dark:not-aria-disabled:hover:text-white dark:not-aria-disabled:active:bg-slate-600 dark:aria-disabled:border-slate-700/40 dark:aria-disabled:bg-slate-800/40 dark:aria-disabled:text-slate-200/40"
342
- }, wo = "after:inset-[calc((100%-var(--ps-target-size))/2)]", Is = { horizontal: "px-[19px]", vertical: "py-[19px]" }, Md = {
342
+ }, bo = "after:inset-[calc((100%-var(--ps-target-size))/2)]", As = { horizontal: "px-[19px]", vertical: "py-[19px]" }, yd = {
343
343
  control: {
344
- left: wo,
345
- right: wo,
346
- up: wo,
347
- down: wo
344
+ left: bo,
345
+ right: bo,
346
+ up: bo,
347
+ down: bo
348
348
  },
349
349
  rail: {
350
350
  left: "after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:left-[calc(100%-var(--ps-target-size)+4px)] after:-right-[4px]",
@@ -353,7 +353,7 @@ const M = (e) => {
353
353
  down: "after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:-top-[4px] after:bottom-[calc(100%-var(--ps-target-size)+4px)]"
354
354
  }
355
355
  }, Cr = ({ direction: e, glyph: t, neighbour: r, disabled: n, canStep: o, onStep: a, ariaLabel: i, className: s, ref: c }) => {
356
- const { widthPx: d, heightPx: u, triangles: S } = bd[t][e], E = n || !o;
356
+ const { widthPx: d, heightPx: u, triangles: S } = vd[t][e], E = n || !o;
357
357
  return /* @__PURE__ */ K(
358
358
  "button",
359
359
  {
@@ -362,15 +362,15 @@ const M = (e) => {
362
362
  "aria-label": i,
363
363
  disabled: n,
364
364
  "aria-disabled": E ? !0 : void 0,
365
- ...E ? vd : null,
365
+ ...E ? Sd : null,
366
366
  onClick: E ? void 0 : a,
367
- className: `${s === void 0 ? "" : `${s} `}${Dd} ${Rd} ${xd[r]} ${Md[r][e]}`,
367
+ className: `${s === void 0 ? "" : `${s} `}${Rd} ${xd} ${Md[r]} ${yd[r][e]}`,
368
368
  children: /* @__PURE__ */ K("svg", { "aria-hidden": "true", focusable: "false", "data-arrow": e, "data-glyph": t, width: d, height: u, viewBox: `0 0 ${d} ${u}`, fill: "currentColor", className: "pointer-events-none block shrink-0", children: S.map(($) => /* @__PURE__ */ K("polygon", { points: $ }, $)) })
369
369
  }
370
370
  );
371
- }, qo = (e, t) => {
372
- const r = Y(() => id(e, t), [e, t]), n = de(r);
373
- return ld(n.current, r) || (n.current = r), n.current;
371
+ }, Zo = (e, t) => {
372
+ const r = Y(() => sd(e, t), [e, t]), n = de(r);
373
+ return cd(n.current, r) || (n.current = r), n.current;
374
374
  }, pt = (e, t, r) => {
375
375
  if (!Number.isInteger(r))
376
376
  throw new RangeError(`${e}: ${t} must be a finite integer (received: ${M(r)})`);
@@ -381,24 +381,24 @@ const M = (e) => {
381
381
  return;
382
382
  }
383
383
  pt(e, "values.loIndex", t.loIndex), pt(e, "values.hiIndex", t.hiIndex);
384
- }, jn = (e) => e.kind === "candidates" && e.hiIndex < e.loIndex, Xo = (e, t) => {
384
+ }, Kn = (e) => e.kind === "candidates" && e.hiIndex < e.loIndex, Qo = (e, t) => {
385
385
  let r = e.loIndex, n = e.hiIndex + 1;
386
386
  for (; r < n; ) {
387
387
  const o = r + n >> 1;
388
388
  e.ascending[o] < t ? r = o + 1 : n = o;
389
389
  }
390
390
  return r;
391
- }, Vn = (e, t) => (br("drawnValuesEdge", e), e.kind === "range" ? t === -1 ? e.min : e.max : jn(e) ? null : e.ascending[t === -1 ? e.loIndex : e.hiIndex]), kn = (e, t) => {
391
+ }, kn = (e, t) => (br("drawnValuesEdge", e), e.kind === "range" ? t === -1 ? e.min : e.max : Kn(e) ? null : e.ascending[t === -1 ? e.loIndex : e.hiIndex]), _n = (e, t) => {
392
392
  if (br("drawnValuesHas", e), pt("drawnValuesHas", "value", t), e.kind === "range")
393
393
  return (e.min === null || t >= e.min) && (e.max === null || t <= e.max);
394
- if (jn(e)) return !1;
395
- const r = Xo(e, t);
394
+ if (Kn(e)) return !1;
395
+ const r = Qo(e, t);
396
396
  return r <= e.hiIndex && e.ascending[r] === t;
397
- }, _n = (e, t) => {
397
+ }, Yn = (e, t) => {
398
398
  if (br("drawnValuesNearest", e), pt("drawnValuesNearest", "value", t), e.kind === "range")
399
399
  return e.min !== null && t < e.min ? e.min : e.max !== null && t > e.max ? e.max : t;
400
- if (jn(e)) return null;
401
- const r = Xo(e, t);
400
+ if (Kn(e)) return null;
401
+ const r = Qo(e, t);
402
402
  if (r > e.hiIndex) return e.ascending[e.hiIndex];
403
403
  if (e.ascending[r] === t || r === e.loIndex) return e.ascending[r];
404
404
  const n = e.ascending[r - 1], o = e.ascending[r];
@@ -412,26 +412,26 @@ const M = (e) => {
412
412
  const a = e.min === null ? t + 1 : Math.max(t + 1, e.min);
413
413
  return e.max !== null && a > e.max ? null : a;
414
414
  }
415
- if (jn(e)) return null;
416
- const n = Xo(e, t);
415
+ if (Kn(e)) return null;
416
+ const n = Qo(e, t);
417
417
  if (r === -1) {
418
418
  const a = n - 1;
419
419
  return a < e.loIndex ? null : e.ascending[a];
420
420
  }
421
421
  const o = n <= e.hiIndex && e.ascending[n] === t ? n + 1 : n;
422
422
  return o > e.hiIndex ? null : e.ascending[o];
423
- }, Eo = (e, t, r) => {
423
+ }, Lo = (e, t, r) => {
424
424
  if (br("clampPairIntoDrawnValues", e), pt("clampPairIntoDrawnValues", "low", t), pt("clampPairIntoDrawnValues", "high", r), r < t)
425
425
  throw new RangeError(`clampPairIntoDrawnValues: high must not precede low (low: ${t}, high: ${r})`);
426
- const n = _n(e, t), o = _n(e, r);
426
+ const n = Yn(e, t), o = Yn(e, r);
427
427
  return n === null || o === null ? null : [n, Math.max(n, o)];
428
- }, yd = (e, t, r) => {
428
+ }, Pd = (e, t, r) => {
429
429
  if (br("carryPairIntoDrawnValues", e), pt("carryPairIntoDrawnValues", "low", t), pt("carryPairIntoDrawnValues", "high", r), r < t)
430
430
  throw new RangeError(`carryPairIntoDrawnValues: high must not precede low (low: ${t}, high: ${r})`);
431
- if (jn(e)) return null;
432
- const n = Vn(e, -1), o = Vn(e, 1), a = r - t;
433
- return o !== null && r > o ? Eo(e, o - a, o) : n !== null && t < n ? Eo(e, n, n + a) : Eo(e, t, r);
434
- }, Lo = (e, t, r) => (br("drawnValuesAtOrBeyond", e), pt("drawnValuesAtOrBeyond", "target", t), nr(e, t - r, r)), fn = (e, t, r) => {
431
+ if (Kn(e)) return null;
432
+ const n = kn(e, -1), o = kn(e, 1), a = r - t;
433
+ return o !== null && r > o ? Lo(e, o - a, o) : n !== null && t < n ? Lo(e, n, n + a) : Lo(e, t, r);
434
+ }, $o = (e, t, r) => (br("drawnValuesAtOrBeyond", e), pt("drawnValuesAtOrBeyond", "target", t), nr(e, t - r, r)), fn = (e, t, r) => {
435
435
  if (t !== null && pt("drawnValuesWithin", "min", t), r !== null && pt("drawnValuesWithin", "max", r), t !== null && r !== null && r < t)
436
436
  throw new RangeError(`drawnValuesWithin: max must not precede min (min: ${t}, max: ${r})`);
437
437
  const n = { ascending: e, loIndex: 0, hiIndex: e.length - 1 };
@@ -443,8 +443,8 @@ const M = (e) => {
443
443
  e[i] <= r ? a = i + 1 : o = i;
444
444
  }
445
445
  }
446
- return { kind: "candidates", ascending: e, loIndex: t === null ? 0 : Xo(n, t), hiIndex: o - 1 };
447
- }, $o = (e) => (br("drawnValuesStepGeometry", e), { stepEnd: (t, r) => nr(e, t, r), edge: (t) => Vn(e, t) }), qa = (e, t, r, n, o) => {
446
+ return { kind: "candidates", ascending: e, loIndex: t === null ? 0 : Qo(n, t), hiIndex: o - 1 };
447
+ }, To = (e) => (br("drawnValuesStepGeometry", e), { stepEnd: (t, r) => nr(e, t, r), edge: (t) => kn(e, t) }), Za = (e, t, r, n, o) => {
448
448
  if (pt("stepPair", "low", t), pt("stepPair", "high", r), r < t)
449
449
  throw new RangeError(`stepPair: high must not precede low (low: ${t}, high: ${r})`);
450
450
  if (n !== -1 && n !== 1)
@@ -480,7 +480,7 @@ const M = (e) => {
480
480
  default:
481
481
  throw new RangeError(`stepPair: rule.motion must be one of "shift", "start", "end", "single" (received: ${M(o.motion)})`);
482
482
  }
483
- }, Pd = {
483
+ }, Ed = {
484
484
  "blue-rose": {
485
485
  macro: "#0284c7",
486
486
  macroLight: "#38bdf8",
@@ -523,30 +523,30 @@ const M = (e) => {
523
523
  microLight: "#71717a",
524
524
  accent: "#27272a"
525
525
  }
526
- }, xl = (e) => typeof e == "number" && Number.isInteger(e) && e >= 0 && e <= 11, Ft = (e, t) => {
527
- if (!xl(t))
526
+ }, Ml = (e) => typeof e == "number" && Number.isInteger(e) && e >= 0 && e <= 11, Ft = (e, t) => {
527
+ if (!Ml(t))
528
528
  throw new RangeError(`${e}: yearStartMonth must be an integer between 0 and 11 (received: ${M(t)})`);
529
529
  }, vr = (e, t) => t === void 0 ? 0 : (Ft(e, t), t), Ie = (e, t, r) => {
530
530
  if (r !== "year" && r !== "month" && r !== "day")
531
531
  throw new RangeError(`${e}: ${t} must be one of "year", "month", "day" (received: ${M(r)})`);
532
- }, or = (e, t, r, n) => r === void 0 ? n : (Ie(e, t, r), r), Ed = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ml = 719468, To = 146097, Xa = (e, t) => t !== 1 ? Ed[t] : e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0) ? 29 : 28, gi = (e, t, r, n) => {
532
+ }, or = (e, t, r, n) => r === void 0 ? n : (Ie(e, t, r), r), Ld = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], yl = 719468, Io = 146097, Qa = (e, t) => t !== 1 ? Ld[t] : e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0) ? 29 : 28, wi = (e, t, r, n) => {
533
533
  const o = e * 12 + t + n, a = Math.floor(o / 12), i = o - a * 12;
534
- return [a, i, Math.min(r, Xa(a, i))];
535
- }, Yn = (e, t, r) => {
534
+ return [a, i, Math.min(r, Qa(a, i))];
535
+ }, Hn = (e, t, r) => {
536
536
  const n = t < 2 ? e - 1 : e, o = Math.floor(n / 400), a = n - o * 400, i = t < 2 ? t + 10 : t - 2, s = Math.floor((153 * i + 2) / 5) + r - 1, c = a * 365 + Math.floor(a / 4) - Math.floor(a / 100) + s;
537
- return o * To + c - Ml;
538
- }, As = (e) => {
539
- const t = e + Ml, r = Math.floor(t / To), n = t - r * To, o = Math.floor((n - Math.floor(n / 1460) + Math.floor(n / 36524) - Math.floor(n / (To - 1))) / 365), a = n - (o * 365 + Math.floor(o / 4) - Math.floor(o / 100)), i = Math.floor((5 * a + 2) / 153), s = i < 10 ? i + 2 : i - 10;
537
+ return o * Io + c - yl;
538
+ }, Ns = (e) => {
539
+ const t = e + yl, r = Math.floor(t / Io), n = t - r * Io, o = Math.floor((n - Math.floor(n / 1460) + Math.floor(n / 36524) - Math.floor(n / (Io - 1))) / 365), a = n - (o * 365 + Math.floor(o / 4) - Math.floor(o / 100)), i = Math.floor((5 * a + 2) / 153), s = i < 10 ? i + 2 : i - 10;
540
540
  return [r * 400 + o + (s < 2 ? 1 : 0), s, a - Math.floor((153 * i + 2) / 5) + 1];
541
- }, Zo = (e, t, r) => e - (t < r ? 1 : 0), Ct = (e, t, r = 0) => {
541
+ }, Jo = (e, t, r) => e - (t < r ? 1 : 0), Ct = (e, t, r = 0) => {
542
542
  if (Ie("normalizeDateByUnit", "unit", e), !ye(t)) throw new RangeError(`normalizeDateByUnit: d must be a valid Date (received: ${M(t)})`);
543
543
  Ft("normalizeDateByUnit", r);
544
544
  const n = new Date(t.getTime());
545
- return e === "year" ? (n.setFullYear(Zo(n.getFullYear(), n.getMonth(), r), r, 1), n.setHours(0, 0, 0, 0)) : (e === "month" && n.setDate(1), n.setHours(0, 0, 0, 0)), n;
545
+ return e === "year" ? (n.setFullYear(Jo(n.getFullYear(), n.getMonth(), r), r, 1), n.setHours(0, 0, 0, 0)) : (e === "month" && n.setDate(1), n.setHours(0, 0, 0, 0)), n;
546
546
  }, z = (e, t, r = 0) => {
547
547
  Ie("encode", "unit", e), Ft("encode", r);
548
548
  const n = Ct(e, t, r), o = n.getFullYear(), a = n.getMonth();
549
- return e === "year" ? o : e === "month" ? o * 12 + a : Yn(o, a, n.getDate());
549
+ return e === "year" ? o : e === "month" ? o * 12 + a : Hn(o, a, n.getDate());
550
550
  }, le = (e, t, r = 0) => {
551
551
  Ie("decode", "unit", e), Ft("decode", r);
552
552
  const n = /* @__PURE__ */ new Date(0);
@@ -558,73 +558,73 @@ const M = (e) => {
558
558
  }
559
559
  const o = new Date(t * 24 * 60 * 60 * 1e3);
560
560
  return n.setFullYear(o.getUTCFullYear(), o.getUTCMonth(), o.getUTCDate()), n;
561
- }, Kn = (e) => `; ${e} instead of a sentinel for "no bound"`, yl = Kn("minDate is required, so pass the earliest date to offer"), Qe = (e, t, r, n, o, a) => {
562
- const i = qn(r, n, o);
561
+ }, qn = (e) => `; ${e} instead of a sentinel for "no bound"`, Pl = qn("minDate is required, so pass the earliest date to offer"), Qe = (e, t, r, n, o, a) => {
562
+ const i = Xn(r, n, o);
563
563
  if (i === null)
564
564
  throw new RangeError(`${e}: ${t} must fall in a ${n} that starts inside the Date range (received: ${M(r)})${a}`);
565
565
  return i;
566
- }, qn = (e, t, r) => {
566
+ }, Xn = (e, t, r) => {
567
567
  const n = z(t, e, r);
568
568
  return Number.isInteger(n) ? n : null;
569
- }, Ld = (e, t, r) => {
569
+ }, $d = (e, t, r) => {
570
570
  if (Ie("addUnit", "unit", e), !ye(t)) throw new RangeError(`addUnit: d must be a valid Date (received: ${M(t)})`);
571
571
  if (!Number.isInteger(r)) throw new RangeError(`addUnit: amount must be an integer number of units (received: ${M(r)})`);
572
572
  const n = new Date(t.getTime());
573
- return r === 0 ? n : e === "year" || e === "month" ? (n.setFullYear(...gi(n.getFullYear(), n.getMonth(), n.getDate(), e === "year" ? r * 12 : r)), n) : (n.setDate(n.getDate() + r), n);
574
- }, Ns = (e, t, r, n, o) => {
575
- const a = Math.floor(t / 12), [i, s, c] = e === "year" ? [t, o, 1] : e === "month" ? [a, t - a * 12, 1] : As(t), [d, u, S] = r === "year" || r === "month" ? gi(i, s, c, r === "year" ? n * 12 : n) : As(Yn(i, s, c) + n);
576
- return e === "year" ? Zo(d, u, o) : e === "month" ? d * 12 + u : Yn(d, u, S);
577
- }, $d = (e, t, r, n = 0) => {
573
+ return r === 0 ? n : e === "year" || e === "month" ? (n.setFullYear(...wi(n.getFullYear(), n.getMonth(), n.getDate(), e === "year" ? r * 12 : r)), n) : (n.setDate(n.getDate() + r), n);
574
+ }, Cs = (e, t, r, n, o) => {
575
+ const a = Math.floor(t / 12), [i, s, c] = e === "year" ? [t, o, 1] : e === "month" ? [a, t - a * 12, 1] : Ns(t), [d, u, S] = r === "year" || r === "month" ? wi(i, s, c, r === "year" ? n * 12 : n) : Ns(Hn(i, s, c) + n);
576
+ return e === "year" ? Jo(d, u, o) : e === "month" ? d * 12 + u : Hn(d, u, S);
577
+ }, Td = (e, t, r, n = 0) => {
578
578
  if (Ie("getMacroWindowStartDate", "macroUnit", e), Ie("getMacroWindowStartDate", "microUnit", t), !ye(r)) throw new RangeError(`getMacroWindowStartDate: d must be a valid Date (received: ${M(r)})`);
579
579
  return Ft("getMacroWindowStartDate", n), Qe("getMacroWindowStartDate", "d", r, e, n, ""), Qe("getMacroWindowStartDate", "d", r, t, n, ""), Ct(t, Ct(e, r, n), n);
580
- }, Td = (e, t, r, n = 0) => {
580
+ }, Id = (e, t, r, n = 0) => {
581
581
  if (Ie("getMacroWindowEndDate", "macroUnit", e), Ie("getMacroWindowEndDate", "microUnit", t), !ye(r)) throw new RangeError(`getMacroWindowEndDate: d must be a valid Date (received: ${M(r)})`);
582
582
  Ft("getMacroWindowEndDate", n);
583
583
  let o;
584
584
  const a = new Date(r.getTime());
585
585
  if (e === "year" && t !== "year") {
586
- const [s, c] = gi(Zo(a.getFullYear(), a.getMonth(), n), n, 1, 11);
587
- o = t === "month" ? s * 12 + c : Yn(s, c, Xa(s, c));
586
+ const [s, c] = wi(Jo(a.getFullYear(), a.getMonth(), n), n, 1, 11);
587
+ o = t === "month" ? s * 12 + c : Hn(s, c, Qa(s, c));
588
588
  } else if (e === "month" && t === "day")
589
- o = Yn(a.getFullYear(), a.getMonth(), Xa(a.getFullYear(), a.getMonth()));
589
+ o = Hn(a.getFullYear(), a.getMonth(), Qa(a.getFullYear(), a.getMonth()));
590
590
  else
591
591
  return Qe("getMacroWindowEndDate", "d", r, t, n, ""), Ct(t, r, n);
592
592
  const i = le(t, o, n);
593
593
  if (!ye(i))
594
594
  throw new RangeError(`getMacroWindowEndDate: d must fall in a ${e} whose last ${t} starts inside the Date range (received: ${M(r)})`);
595
595
  return i;
596
- }, Cs = (e, t, r) => e < t ? t : e > r ? r : e, Yt = (e, t, r, n, o, a = 0) => {
597
- if (Ie("resolveMacroWindow", "macroUnit", e), Ie("resolveMacroWindow", "microUnit", t), Ft("resolveMacroWindow", a), _o("macroRange", r, !0, "resolveMacroWindow"), !ye(n)) throw new RangeError(`resolveMacroWindow: minDate must be a valid Date (received: ${M(n)})`);
596
+ }, Os = (e, t, r) => e < t ? t : e > r ? r : e, Yt = (e, t, r, n, o, a = 0) => {
597
+ if (Ie("resolveMacroWindow", "macroUnit", e), Ie("resolveMacroWindow", "microUnit", t), Ft("resolveMacroWindow", a), Yo("macroRange", r, !0, "resolveMacroWindow"), !ye(n)) throw new RangeError(`resolveMacroWindow: minDate must be a valid Date (received: ${M(n)})`);
598
598
  if (!ye(o)) throw new RangeError(`resolveMacroWindow: maxDate must be a valid Date (received: ${M(o)})`);
599
599
  if (o.getTime() < n.getTime()) throw new RangeError(`resolveMacroWindow: maxDate must not precede minDate (minDate: ${M(n)}, maxDate: ${M(o)})`);
600
600
  Qe("resolveMacroWindow", "maxDate", o, t, a, ""), Qe("resolveMacroWindow", "macroRange[0]", r[0], e, a, ""), Qe("resolveMacroWindow", "macroRange[0]", r[0], t, a, "");
601
- const i = z(e, r[1], a) < z(e, o, a) ? Cs(Td(e, t, r[1], a), n, o) : o;
602
- return [Ct(t, Cs($d(e, t, r[0], a), n, o), a), Ct(t, i, a)];
603
- }, Id = (e, t) => {
601
+ const i = z(e, r[1], a) < z(e, o, a) ? Os(Id(e, t, r[1], a), n, o) : o;
602
+ return [Ct(t, Os(Td(e, t, r[0], a), n, o), a), Ct(t, i, a)];
603
+ }, Ad = (e, t) => {
604
604
  if (!ye(e)) throw new RangeError(`resolveQuarter: d must be a valid Date (received: ${M(e)})`);
605
605
  Ft("resolveQuarter", t);
606
606
  const r = Ct("year", e, t).getFullYear(), n = new Date(e.getTime()), o = ((n.getMonth() - t) % 12 + 12) % 12, a = Math.floor(o / 3) + 1;
607
607
  return n.setFullYear(r, t + 3 * (a - 1), 1), n.setHours(0, 0, 0, 0), { year: r, quarter: a, startDate: n };
608
- }, Ad = {
608
+ }, Nd = {
609
609
  year: { year: "numeric" },
610
610
  month: { year: "numeric", month: "2-digit" },
611
611
  day: { year: "numeric", month: "2-digit", day: "2-digit" }
612
- }, Os = /* @__PURE__ */ new Map(), Nd = (e, t) => {
613
- const r = `${e}\0${t}`, n = Os.get(r);
612
+ }, Vs = /* @__PURE__ */ new Map(), Cd = (e, t) => {
613
+ const r = `${e}\0${t}`, n = Vs.get(r);
614
614
  if (n !== void 0) return n;
615
- const o = new Intl.DateTimeFormat(t, Ad[e]);
616
- return Os.set(r, o), o;
617
- }, Cd = 4, Od = 6, Qo = (e) => e >= 0 ? String(e).padStart(Cd, "0") : `-${String(-e).padStart(Od, "0")}`, Vd = (e, t) => {
618
- const r = new Date(t.getTime()), n = Qo(r.getFullYear());
615
+ const o = new Intl.DateTimeFormat(t, Nd[e]);
616
+ return Vs.set(r, o), o;
617
+ }, Od = 4, Vd = 6, ea = (e) => e >= 0 ? String(e).padStart(Od, "0") : `-${String(-e).padStart(Vd, "0")}`, kd = (e, t) => {
618
+ const r = new Date(t.getTime()), n = ea(r.getFullYear());
619
619
  if (e === "year") return n;
620
620
  const o = String(r.getMonth() + 1).padStart(2, "0");
621
621
  if (e === "month") return `${n}-${o}`;
622
622
  const a = String(r.getDate()).padStart(2, "0");
623
623
  return `${n}-${o}-${a}`;
624
- }, gt = (e, t, r, n) => (Ie("formatLabel", "unit", e), ye(t) ? r ? r(t, e, "period") : n === void 0 ? Vd(e, t) : Nd(e, n).format(t) : ""), en = (e, t, r, n) => (Ie("formatScreenReaderLabel", "unit", e), gt(e, t, r, n)), Sm = (e, t) => {
624
+ }, gt = (e, t, r, n) => (Ie("formatLabel", "unit", e), ye(t) ? r ? r(t, e, "period") : n === void 0 ? kd(e, t) : Cd(e, n).format(t) : ""), en = (e, t, r, n) => (Ie("formatScreenReaderLabel", "unit", e), gt(e, t, r, n)), Rm = (e, t) => {
625
625
  if (!ye(e)) return "";
626
626
  Ft("formatQuarterLabel", t);
627
- const { quarter: r } = Id(e, t);
627
+ const { quarter: r } = Ad(e, t);
628
628
  return `${gt("year", Ct("year", e, t))}-Q${r}`;
629
629
  }, Pe = (e, t, r, n = 0) => {
630
630
  if (Ie("findNearestDateIndex", "unit", r), Ft("findNearestDateIndex", n), !e || e.length === 0 || e.length === 1) return 0;
@@ -640,7 +640,7 @@ const M = (e) => {
640
640
  }
641
641
  const s = Math.abs(z(r, e[a], n) - o), c = Math.abs(z(r, e[i], n) - o);
642
642
  return s < c ? a : i;
643
- }, Dm = (e, t, r, n, o = 0) => (Ie("getSortedAllowedDates", "unit", t), wr("getSortedAllowedDates", Jo(e), t, r, n, o).dates), Jo = (e) => ({ list: e, path: "allowedDates", inheritedBy: null }), wr = (e, t, r, n, o, a) => {
643
+ }, xm = (e, t, r, n, o = 0) => (Ie("getSortedAllowedDates", "unit", t), wr("getSortedAllowedDates", ta(e), t, r, n, o).dates), ta = (e) => ({ list: e, path: "allowedDates", inheritedBy: null }), wr = (e, t, r, n, o, a) => {
644
644
  Ft(e, a);
645
645
  const { list: i, path: s } = t, c = t.inheritedBy === null ? "" : ` (inherited by the ${t.inheritedBy} row)`;
646
646
  if (mn(e, `${s}${c}`, i), i === void 0 || i.length === 0) return { keys: [], dates: [] };
@@ -660,10 +660,10 @@ const M = (e) => {
660
660
  throw new RangeError(`${e}: every ${s} entry${c} falls outside [minDate, maxDate] (minDate: ${M(n)}, maxDate: ${M(o)}, entries: ${i.length})`);
661
661
  const E = Array.from(S.keys()).sort(($, p) => $ - p);
662
662
  return { keys: E, dates: E.map(($) => S.get($)) };
663
- }, pi = (e, t, r, n, o, a) => {
663
+ }, bi = (e, t, r, n, o, a) => {
664
664
  const { keys: i, dates: s } = wr(e, t, r, n, o, a);
665
665
  return s.length === 0 ? null : { ...fn(i, null, null), dates: s };
666
- }, Hn = (e, t) => e === null ? [] : e.dates.slice(t.loIndex, t.hiIndex + 1), bo = (e, t, r, n, o) => {
666
+ }, Fn = (e, t) => e === null ? [] : e.dates.slice(t.loIndex, t.hiIndex + 1), vo = (e, t, r, n, o) => {
667
667
  const a = e.length - 1;
668
668
  if (a <= 0) return 0;
669
669
  const i = Pe(e, n, t, o);
@@ -672,7 +672,7 @@ const M = (e) => {
672
672
  return c <= 0 ? 0 : Math.max(0, Math.min(1, (e[i].getTime() - s) / c));
673
673
  }
674
674
  return i / a;
675
- }, vo = (e, t, r, n, o) => {
675
+ }, So = (e, t, r, n, o) => {
676
676
  const a = e.length - 1;
677
677
  if (a <= 0) return 0;
678
678
  const i = Math.max(0, Math.min(1, n));
@@ -681,10 +681,10 @@ const M = (e) => {
681
681
  return c <= 0 ? 0 : Pe(e, new Date(s + i * c), t, o);
682
682
  }
683
683
  return Math.max(0, Math.min(a, Math.round(i * a)));
684
- }, Vs = (e, t, r, n, o, a, i) => {
684
+ }, ks = (e, t, r, n, o, a, i) => {
685
685
  let s = r, c = n;
686
686
  return i ? (s = t, c = t) : e === "low" ? t > n ? (s = n, c = t) : s = t : t < r ? (c = r, s = t) : c = t, [Math.max(o, Math.min(a, s)), Math.max(o, Math.min(a, c))];
687
- }, kd = ({ posDiffPct: e, startLowVal: t, startHighVal: r, rangeMin: n, rangeMax: o, isDiscrete: a, sortedAllowedDates: i, snapMode: s, unit: c, yearStartMonth: d = 0 }) => {
687
+ }, _d = ({ posDiffPct: e, startLowVal: t, startHighVal: r, rangeMin: n, rangeMax: o, isDiscrete: a, sortedAllowedDates: i, snapMode: s, unit: c, yearStartMonth: d = 0 }) => {
688
688
  if (Ie("calculateConnectDragValues", "unit", c), a) {
689
689
  const h = i.length - 1;
690
690
  if (h <= 0) return [0, 0];
@@ -705,7 +705,7 @@ const M = (e) => {
705
705
  const E = Math.round(e * S);
706
706
  let $ = t + E, p = r + E;
707
707
  return $ < n && (p += n - $, $ = n), p > o && ($ -= p - o, p = o), [u($), u(p)];
708
- }, _d = (e, t, r, n, o, a, i, s) => {
708
+ }, Yd = (e, t, r, n, o, a, i, s) => {
709
709
  let c = 0, d = !1, u = !1;
710
710
  switch (e) {
711
711
  case "ArrowRight":
@@ -737,11 +737,11 @@ const M = (e) => {
737
737
  }
738
738
  let S = r, E = n;
739
739
  return t === "low" ? d ? S = o : u ? S = n : S = Math.max(o, Math.min(n, r + c)) : d ? E = r : u ? E = a : E = Math.max(r, Math.min(a, n + c)), [S, E];
740
- }, Pl = 8, El = 2, Ll = 16, Yd = 12, Hd = 90, wi = 1.15, ea = (e, t, r) => {
740
+ }, El = 8, Ll = 2, $l = 16, Hd = 12, Fd = 90, ra = (e, t, r) => {
741
741
  const n = r * Math.PI / 180, o = Math.abs(Math.sin(n)), a = Math.abs(Math.cos(n));
742
742
  return { alongPx: (e * a + t * o) / 2, acrossPx: (e * o + t * a) / 2 };
743
- }, ko = (e) => Pl + (e?.anchorGapY ?? El), ta = (e, t) => {
744
- const r = t?.estimatedHeightPx ?? Ll, o = ko(t) + r / 2, a = e === "top" ? -o : o;
743
+ }, _o = (e) => El + (e?.anchorGapY ?? Ll), na = (e, t) => {
744
+ const r = t?.estimatedHeightPx ?? $l, o = _o(t) + r / 2, a = e === "top" ? -o : o;
745
745
  return {
746
746
  lowAngleDeg: 0,
747
747
  highAngleDeg: 0,
@@ -753,35 +753,35 @@ const M = (e) => {
753
753
  isFlipped: !1,
754
754
  proximity: 0
755
755
  };
756
- }, Fd = (e) => {
756
+ }, Ud = (e) => {
757
757
  for (const t of ["topPx", "bottomPx"]) {
758
758
  const r = e[t];
759
759
  if (typeof r != "number" || Number.isNaN(r) || r < 0)
760
760
  throw new RangeError(`calculateLabelSlant: config.room.${t} must be a number of pixels, zero or more (Infinity for unbounded) (received: ${M(r)})`);
761
761
  }
762
- }, Ud = (e, t, r) => {
762
+ }, zd = (e, t, r) => {
763
763
  if (r <= t / 2) return 0;
764
764
  const n = Math.min(1, 2 * r / Math.hypot(e, t));
765
765
  return (Math.asin(n) - Math.atan2(t, e)) * 180 / Math.PI;
766
- }, zd = (e, t, r, n, o, a, i, s) => {
766
+ }, Bd = (e, t, r, n, o, a, i, s) => {
767
767
  if (i === void 0) return { side: t, angleDeg: e };
768
- const c = t === "top" ? "bottom" : "top", d = (p) => p === "top" ? i.topPx : i.bottomPx, u = (p) => p === t ? o : a, S = (p) => u(p) + (1 + s) * ea(r, n, e).acrossPx;
768
+ const c = t === "top" ? "bottom" : "top", d = (p) => p === "top" ? i.topPx : i.bottomPx, u = (p) => p === t ? o : a, S = (p) => u(p) + (1 + s) * ra(r, n, e).acrossPx;
769
769
  if (S(t) <= d(t)) return { side: t, angleDeg: e };
770
770
  if (S(c) <= d(c)) return { side: c, angleDeg: e };
771
771
  const E = d(c) - u(c) > d(t) - u(t) ? c : t, $ = (d(E) - u(E)) / (1 + s);
772
- return { side: E, angleDeg: Math.min(e, Ud(r, n, $)) };
773
- }, Bd = (e, t, r, n = "top", o) => {
774
- const a = o?.estimatedWidthPx, i = o?.estimatedHeightPx ?? Ll, s = o?.paddingPx ?? Yd, c = o?.maxAngleDeg ?? Hd, d = o?.room, u = o?.drawnScale ?? 1;
775
- if (d !== void 0 && Fd(d), typeof u != "number" || !Number.isFinite(u) || u <= 0)
772
+ return { side: E, angleDeg: Math.min(e, zd(r, n, $)) };
773
+ }, Wd = (e, t, r, n = "top", o) => {
774
+ const a = o?.estimatedWidthPx, i = o?.estimatedHeightPx ?? $l, s = o?.paddingPx ?? Hd, c = o?.maxAngleDeg ?? Fd, d = o?.room, u = o?.drawnScale ?? 1;
775
+ if (d !== void 0 && Ud(d), typeof u != "number" || !Number.isFinite(u) || u <= 0)
776
776
  throw new RangeError(`calculateLabelSlant: config.drawnScale must be a positive finite number (received: ${M(u)})`);
777
- const S = ko(o), E = o?.flipClearancePx ?? S;
777
+ const S = _o(o), E = o?.flipClearancePx ?? S;
778
778
  if (typeof E != "number" || !Number.isFinite(E) || E < 0)
779
779
  throw new RangeError(`calculateLabelSlant: config.flipClearancePx must be a finite number of pixels, zero or more (received: ${M(E)})`);
780
- const $ = ta(n, o);
780
+ const $ = na(n, o);
781
781
  if (!(Number.isFinite(r) && r > 0) || a === void 0 || !Number.isFinite(a) || a <= 0) return $;
782
782
  const p = Math.max(0, t - e) / 100 * r, h = a + s;
783
783
  if (p >= h) return $;
784
- const w = Math.max(0, Math.min(1, (h - p) / h)), f = w * w * w * (w * (w * 6 - 15) + 10), x = zd(f * c, n, a, i, S, E, d, u), R = x.angleDeg === 0 ? 0 : x.side === "top" ? -x.angleDeg : x.angleDeg, b = ea(a, i, x.angleDeg), m = (x.side === n ? S : E) + b.acrossPx, me = x.side === "top" ? -m : +m, q = 2 * b.alongPx, ne = Math.max(0, (q + s - p) / 2);
784
+ const w = Math.max(0, Math.min(1, (h - p) / h)), f = w * w * w * (w * (w * 6 - 15) + 10), x = Bd(f * c, n, a, i, S, E, d, u), R = x.angleDeg === 0 ? 0 : x.side === "top" ? -x.angleDeg : x.angleDeg, b = ra(a, i, x.angleDeg), m = (x.side === n ? S : E) + b.acrossPx, me = x.side === "top" ? -m : +m, q = 2 * b.alongPx, ne = Math.max(0, (q + s - p) / 2);
785
785
  return {
786
786
  lowAngleDeg: R,
787
787
  highAngleDeg: R,
@@ -793,22 +793,22 @@ const M = (e) => {
793
793
  isFlipped: x.side !== n,
794
794
  proximity: w
795
795
  };
796
- }, Wd = (e) => ({ ...e, lowOffsetX: 0, highOffsetX: 0 }), bi = (e, t, r, n) => {
797
- if (r.isMerged && r.keepMergedLabelUpright) return ta(r.labelPosition, n);
798
- const o = Bd(e, t, r.trackLengthPx, r.labelPosition, n);
799
- return r.isMerged ? Wd(o) : o;
800
- }, Gt = (e, t) => (e === "macro" ? t.macroIsDiscrete : t.microIsDiscrete) === !0, Nt = (e, t) => {
796
+ }, Gd = (e) => ({ ...e, lowOffsetX: 0, highOffsetX: 0 }), vi = (e, t, r, n) => {
797
+ if (r.isMerged && r.keepMergedLabelUpright) return na(r.labelPosition, n);
798
+ const o = Wd(e, t, r.trackLengthPx, r.labelPosition, n);
799
+ return r.isMerged ? Gd(o) : o;
800
+ }, jt = (e, t) => (e === "macro" ? t.macroIsDiscrete : t.microIsDiscrete) === !0, Nt = (e, t) => {
801
801
  const r = e === "macro" ? t.macroAllowedDates : t.microAllowedDates;
802
802
  return r !== void 0 ? { list: r, path: e === "macro" ? "macroAllowedDates" : "microAllowedDates", inheritedBy: null } : { list: t.allowedDates, path: "allowedDates", inheritedBy: e };
803
- }, Io = (e, t, r, n) => e === "pan" ? yd(t, r, Math.max(r, n)) : Eo(t, r, Math.max(r, n)), $l = (e, t) => {
803
+ }, Ao = (e, t, r, n) => e === "pan" ? Pd(t, r, Math.max(r, n)) : Lo(t, r, Math.max(r, n)), Tl = (e, t) => {
804
804
  const r = t === "macro-top" || t === "macro-left", n = e < 0;
805
805
  return r && n || !(r || n) ? "macro" : "micro";
806
- }, Gd = (e, t, r) => {
806
+ }, jd = (e, t, r) => {
807
807
  const n = Math.abs(e) > Math.abs(t) ? e : t;
808
808
  return !Number.isFinite(n) || n === 0 ? 0 : (r ? n < 0 : n > 0) ? 1 : -1;
809
809
  };
810
- function jd(e, t, r, n, o, a, i = "macro-top", s = 0.05, c = !0, d = "range") {
811
- if ($l(t, i) === "macro") {
810
+ function Kd(e, t, r, n, o, a, i = "macro-top", s = 0.05, c = !0, d = "range") {
811
+ if (Tl(t, i) === "macro") {
812
812
  const E = Math.abs(e - r), $ = Math.abs(e - n);
813
813
  return E <= s && E <= $ ? "macro-low" : $ <= s && $ < E ? "macro-high" : c && e >= r && e <= n ? "macro-connect" : E < $ ? "macro-low" : "macro-high";
814
814
  }
@@ -817,38 +817,38 @@ function jd(e, t, r, n, o, a, i = "macro-top", s = 0.05, c = !0, d = "range") {
817
817
  const u = Math.abs(e - o), S = Math.abs(e - a);
818
818
  return u <= s && u <= S ? "micro-low" : S <= s && S < u ? "micro-high" : c && e >= o && e <= a ? "micro-connect" : u < S ? "micro-low" : "micro-high";
819
819
  }
820
- function Kd(e, t, r, n, o) {
820
+ function qd(e, t, r, n, o) {
821
821
  if (e === "macro-connect") {
822
- const [d, u] = ui(t - r, n, o);
822
+ const [d, u] = fi(t - r, n, o);
823
823
  return [d, u, "macro-connect"];
824
824
  }
825
- const a = e === "macro-low" ? "low" : "high", [i, s] = Vo(a, t, n, o), c = mi(a, t, n, o);
825
+ const a = e === "macro-low" ? "low" : "high", [i, s] = ko(a, t, n, o), c = hi(a, t, n, o);
826
826
  return [i, s, c === "low" ? "macro-low" : "macro-high"];
827
827
  }
828
- function qd(e, t, r, n, o) {
828
+ function Xd(e, t, r, n, o) {
829
829
  if (e === "micro-point") {
830
- const [d] = Vo("point", t, n, o);
830
+ const [d] = ko("point", t, n, o);
831
831
  return [d, d, "micro-point"];
832
832
  }
833
833
  if (e === "micro-connect") {
834
- const [d, u] = ui(t - r, n, o);
834
+ const [d, u] = fi(t - r, n, o);
835
835
  return [d, u, "micro-connect"];
836
836
  }
837
- const a = e === "micro-low" ? "low" : "high", [i, s] = Vo(a, t, n, o), c = mi(a, t, n, o);
837
+ const a = e === "micro-low" ? "low" : "high", [i, s] = ko(a, t, n, o), c = hi(a, t, n, o);
838
838
  return [i, s, c === "low" ? "micro-low" : "micro-high"];
839
839
  }
840
- const In = Gn(({ type: e, isTop: t = !0, isVertical: r = !1, isLeft: n = !0 }) => {
840
+ const In = jn(({ type: e, isTop: t = !0, isVertical: r = !1, isLeft: n = !0 }) => {
841
841
  let o, a;
842
842
  return r ? (o = n ? "M 7.375 0.625 A 7.375 7.375 0 0 0 7.375 15.375 Z" : "M 0.625 0.625 A 7.375 7.375 0 0 1 0.625 15.375 Z", a = `period-slider-knob period-slider-knob-svg is-vertical ${n ? "is-semicircle-left" : "is-semicircle-right"}`) : (o = t ? "M 0.625 7.375 A 7.375 7.375 0 0 1 15.375 7.375 Z" : "M 0.625 0.625 A 7.375 7.375 0 0 0 15.375 0.625 Z", a = `period-slider-knob period-slider-knob-svg ${t ? "is-semicircle-top" : "is-semicircle-bottom"}`), /* @__PURE__ */ K("svg", { className: a, width: r ? "8" : "16", height: r ? "16" : "8", viewBox: r ? "0 0 8 16" : "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ K("path", { d: o, className: e === "macro" ? "period-slider-knob-path-macro" : "period-slider-knob-path-micro", shapeRendering: "geometricPrecision", strokeWidth: "1.25" }) });
843
843
  });
844
844
  In.displayName = "VernierKnobSvg";
845
- const Xd = (e, t, r, n) => {
845
+ const Zd = (e, t, r, n) => {
846
846
  if (!ye(e)) throw new RangeError(`PeriodSlider: minDate is required and must be a valid Date (received: ${M(e)})`);
847
847
  if (!ye(t)) throw new RangeError(`PeriodSlider: maxDate is required and must be a valid Date (received: ${M(t)})`);
848
848
  if (t.getTime() <= e.getTime())
849
849
  throw new RangeError(`PeriodSlider: maxDate must be strictly later than minDate (minDate: ${M(e)}, maxDate: ${M(t)})`);
850
- for (const o of r) Qe("PeriodSlider", "minDate", e, o, n, yl);
851
- }, _o = (e, t, r, n = "PeriodSlider") => {
850
+ for (const o of r) Qe("PeriodSlider", "minDate", e, o, n, Pl);
851
+ }, Yo = (e, t, r, n = "PeriodSlider") => {
852
852
  if (!Ht(t) || t.length !== 2) {
853
853
  const i = r ? "is required and must" : "must";
854
854
  throw new RangeError(`${n}: ${e} ${i} be a [start, end] Date tuple (received: ${M(t)})`);
@@ -858,36 +858,36 @@ const Xd = (e, t, r, n) => {
858
858
  if (!ye(a)) throw new RangeError(`${n}: ${e}[1] must be a valid Date (received: ${M(a)})`);
859
859
  if (a.getTime() < o.getTime())
860
860
  throw new RangeError(`${n}: ${e} must not be inverted (start: ${M(o)}, end: ${M(a)})`);
861
- }, Tl = (e, t) => {
861
+ }, Il = (e, t) => {
862
862
  if (!ye(t)) throw new RangeError(`PeriodSlider: ${e} must be a valid Date (received: ${M(t)})`);
863
863
  }, nn = (e, t, r, n, o, a) => {
864
864
  const i = Qe("PeriodSlider", e, t, r, a, "");
865
865
  if (i < z(r, n, a) || i > z(r, o, a))
866
866
  throw new RangeError(`PeriodSlider: ${e} must lie within [minDate, maxDate] (received: ${M(t)}, minDate: ${M(n)}, maxDate: ${M(o)})`);
867
- }, Zd = (e, t, r) => {
867
+ }, Qd = (e, t, r) => {
868
868
  const n = e.yearStartMonth ?? 0;
869
869
  if (e.mode === "range") {
870
870
  for (const o of ["range", "defaultRange"]) {
871
871
  const a = e[o];
872
- a !== void 0 && (_o(o, a, !1), nn(`${o}[0]`, a[0], e.unit, t, r, n), nn(`${o}[1]`, a[1], e.unit, t, r, n));
872
+ a !== void 0 && (Yo(o, a, !1), nn(`${o}[0]`, a[0], e.unit, t, r, n), nn(`${o}[1]`, a[1], e.unit, t, r, n));
873
873
  }
874
874
  return;
875
875
  }
876
876
  if (e.mode === "point")
877
877
  for (const o of ["value", "defaultValue"]) {
878
878
  const a = e[o];
879
- a !== void 0 && (Tl(o, a), nn(o, a, e.unit, t, r, n));
879
+ a !== void 0 && (Il(o, a), nn(o, a, e.unit, t, r, n));
880
880
  }
881
- }, Qd = (e, t, r) => {
881
+ }, Jd = (e, t, r) => {
882
882
  const n = e.yearStartMonth ?? 0;
883
- _o("macroRange", e.macroRange, !0), Qe("PeriodSlider", "macroRange[0]", e.macroRange[0], or("PeriodSlider", "macroUnit", e.macroUnit, e.unit), n, "");
883
+ Yo("macroRange", e.macroRange, !0), Qe("PeriodSlider", "macroRange[0]", e.macroRange[0], or("PeriodSlider", "macroUnit", e.macroUnit, e.unit), n, "");
884
884
  const o = or("PeriodSlider", "microUnit", e.microUnit, e.unit), a = e.microRange !== void 0 || e.defaultMicroRange !== void 0 || e.onChangeMicroRange !== void 0, i = e.microValue !== void 0 || e.defaultMicroValue !== void 0 || e.onChangeMicroPoint !== void 0;
885
885
  if (a && i)
886
886
  throw new RangeError("PeriodSlider: vernier mode takes either a micro range (microRange / defaultMicroRange / onChangeMicroRange) or a micro point (microValue / defaultMicroValue / onChangeMicroPoint), never both");
887
887
  if (i) {
888
888
  for (const d of ["microValue", "defaultMicroValue"]) {
889
889
  const u = e[d];
890
- u !== void 0 && (Tl(d, u), nn(d, u, o, t, r, n));
890
+ u !== void 0 && (Il(d, u), nn(d, u, o, t, r, n));
891
891
  }
892
892
  const c = e.microValue !== void 0 ? e.microValue : e.defaultMicroValue;
893
893
  if (c === void 0)
@@ -896,7 +896,7 @@ const Xd = (e, t, r, n) => {
896
896
  }
897
897
  for (const c of ["microRange", "defaultMicroRange"]) {
898
898
  const d = e[c];
899
- d !== void 0 && (_o(c, d, !1), nn(`${c}[0]`, d[0], o, t, r, n), nn(`${c}[1]`, d[1], o, t, r, n));
899
+ d !== void 0 && (Yo(c, d, !1), nn(`${c}[0]`, d[0], o, t, r, n), nn(`${c}[1]`, d[1], o, t, r, n));
900
900
  }
901
901
  const s = e.microRange !== void 0 ? e.microRange : e.defaultMicroRange;
902
902
  if (s !== void 0) return { shape: "range", selection: s };
@@ -904,17 +904,17 @@ const Xd = (e, t, r, n) => {
904
904
  }, yn = (e, t, r, n, o, a, i, s, c) => {
905
905
  const d = Pe(e, n, t, c), u = Pe(e, o, t, c);
906
906
  return i ? d : s ? u : Math.max(d, Math.min(u, Pe(e, r, t, c) + a));
907
- }, Ha = (e) => {
907
+ }, Ua = (e) => {
908
908
  e.timerId !== null && clearTimeout(e.timerId), e.timerId = null, e.emit = null;
909
909
  };
910
- function Jd(e, t) {
910
+ function eu(e, t) {
911
911
  return t && e[0].getTime() !== e[1].getTime() ? [e[0], e[0]] : e;
912
912
  }
913
- function eu(e, t) {
913
+ function tu(e, t) {
914
914
  return t ? e === "micro-low" || e === "micro-high" || e === "micro-connect" ? "micro-point" : e : e === "micro-point" ? "micro-high" : e;
915
915
  }
916
- const ks = () => {
917
- const [e, t] = Be(null), r = de(null), n = A((a, i) => {
916
+ const _s = () => {
917
+ const [e, t] = We(null), r = de(null), n = A((a, i) => {
918
918
  const s = r.current;
919
919
  if (s !== null && s[0].getTime() === a.getTime() && s[1].getTime() === i.getTime()) return;
920
920
  const c = [a, i];
@@ -923,22 +923,22 @@ const ks = () => {
923
923
  r.current !== null && (r.current = null, t(null));
924
924
  }, []);
925
925
  return { shown: e, show: n, release: o };
926
- }, ra = (e, t, r) => {
926
+ }, oa = (e, t, r) => {
927
927
  try {
928
928
  Intl.DateTimeFormat.supportedLocalesOf([r]);
929
929
  } catch {
930
930
  throw new RangeError(`${e}: ${t} must be a valid BCP 47 language tag (received: ${M(r)})`);
931
931
  }
932
- }, tu = (e) => {
932
+ }, ru = (e) => {
933
933
  if (typeof e != "object" || e === null) return !1;
934
934
  try {
935
935
  return e.nodeType === 1 && typeof e.getBoundingClientRect == "function";
936
936
  } catch {
937
937
  return !1;
938
938
  }
939
- }, _s = (e, t) => {
939
+ }, Ys = (e, t) => {
940
940
  if (t == null) return null;
941
- if (tu(t)) return t;
941
+ if (ru(t)) return t;
942
942
  let r = !1;
943
943
  try {
944
944
  r = typeof t == "object" && "current" in t;
@@ -947,7 +947,7 @@ const ks = () => {
947
947
  }
948
948
  throw new RangeError(`PeriodSlider: ${e} must be an Element or null (received: ${M(t)})${r ? "; pass the element itself (ref.current), not the ref object" : ""}`);
949
949
  }, tn = () => {
950
- const [e, t] = Be(null), r = de(null), n = A((o) => {
950
+ const [e, t] = We(null), r = de(null), n = A((o) => {
951
951
  if (r.current?.disconnect(), r.current = null, o === null) {
952
952
  t(null);
953
953
  return;
@@ -967,15 +967,15 @@ const ks = () => {
967
967
  },
968
968
  []
969
969
  ), [n, e];
970
- }, Ys = (e, t) => {
970
+ }, Hs = (e, t) => {
971
971
  const r = e.querySelector(`[data-handle-type^="${t}-"]`);
972
972
  if (r === null) return null;
973
973
  const n = r.querySelector("[data-tooltip-style]"), o = r.getAttribute("data-vernier-pos");
974
- return n === null || o !== "top" && o !== "bottom" ? null : td(e, r, n, o);
975
- }, ru = (e, t, r) => {
976
- const n = ed(e, t, r);
977
- return n === null ? null : { room: n, macro: Ys(e, "macro"), micro: Ys(e, "micro") };
978
- }, nu = 0.5, Yo = (e, t) => e === t || Math.abs(e - t) < nu, Hs = (e, t) => e === null || t === null ? e === t : Yo(e.anchorPx, t.anchorPx) && Yo(e.knobCentrePx, t.knobCentrePx), ou = (e, t) => e === null || t === null ? e === t : Yo(e.room.topPx, t.room.topPx) && Yo(e.room.bottomPx, t.room.bottomPx) && Hs(e.macro, t.macro) && Hs(e.micro, t.micro), au = (e, t) => Ao(No(e, t)), Ao = (e) => e === null ? void 0 : { estimatedWidthPx: e.widthPx, estimatedHeightPx: e.heightPx }, No = (e, t) => e === null || t === null ? null : { widthPx: Math.max(e.widthPx, t.widthPx), heightPx: Math.max(e.heightPx, t.heightPx) }, iu = (e) => {
974
+ return n === null || o !== "top" && o !== "bottom" ? null : rd(e, r, n, o);
975
+ }, nu = (e, t, r) => {
976
+ const n = td(e, t, r);
977
+ return n === null ? null : { room: n, macro: Hs(e, "macro"), micro: Hs(e, "micro") };
978
+ }, ou = 0.5, Ho = (e, t) => e === t || Math.abs(e - t) < ou, Fs = (e, t) => e === null || t === null ? e === t : Ho(e.anchorPx, t.anchorPx) && Ho(e.knobCentrePx, t.knobCentrePx), au = (e, t) => e === null || t === null ? e === t : Ho(e.room.topPx, t.room.topPx) && Ho(e.room.bottomPx, t.room.bottomPx) && Fs(e.macro, t.macro) && Fs(e.micro, t.micro), iu = (e, t) => No(Co(e, t)), No = (e) => e === null ? void 0 : { estimatedWidthPx: e.widthPx, estimatedHeightPx: e.heightPx }, Co = (e, t) => e === null || t === null ? null : { widthPx: Math.max(e.widthPx, t.widthPx), heightPx: Math.max(e.heightPx, t.heightPx) }, su = (e) => {
979
979
  const t = /* @__PURE__ */ new Map();
980
980
  let r = 0;
981
981
  for (const a of e) {
@@ -985,7 +985,7 @@ const ks = () => {
985
985
  if (a.reach === "inline-size")
986
986
  c = s.widthPx, r = Math.max(r, s.heightPx / 2);
987
987
  else {
988
- const u = ea(s.widthPx, s.heightPx, a.angleDeg);
988
+ const u = ra(s.widthPx, s.heightPx, a.angleDeg);
989
989
  c = a.centreFromAnchorPx + u.acrossPx, r = Math.max(r, u.alongPx + Math.abs(a.alongPushPx));
990
990
  }
991
991
  const d = t.get(i);
@@ -996,97 +996,96 @@ const ks = () => {
996
996
  for (const [a, i] of t) n[`--ps-label-reach-${a}`] = `${Math.ceil(i)}px`;
997
997
  const o = Math.ceil(r);
998
998
  return n["--ps-label-reach-main"] = `${o}px`, { style: n, mainPx: o };
999
- }, Za = (e, t, r) => ({
999
+ }, Ja = (e, t, r) => ({
1000
1000
  "leader-length": `${r ? Math.hypot(e, t) : 0}px`,
1001
1001
  "leader-angle": `${Math.atan2(t, e) * 180 / Math.PI}deg`
1002
- }), Fs = (e, t, r, n) => ({
1002
+ }), Us = (e, t, r, n) => ({
1003
1003
  tx: `calc(-50% + ${e}px)`,
1004
1004
  ty: `${t}px`,
1005
1005
  rot: `${r}deg`,
1006
1006
  ...n
1007
- }), Us = (e, t, r, n) => ({
1007
+ }), zs = (e, t, r, n) => ({
1008
1008
  tx: `calc(-50% + ${e}px)`,
1009
1009
  ty: `calc(-50% + ${t}px)`,
1010
1010
  rot: `${r}deg`,
1011
1011
  // 平レールのラベルはつまみの中心から配置されるため、ラベルの中心のずれがそのまま線になる
1012
- ...Za(e, t, n)
1013
- }), Ho = (e, t) => ({
1012
+ ...Ja(e, t, n)
1013
+ }), Fo = (e, t) => ({
1014
1014
  "--ps-tooltip-tx": Nn(e, "tx", t.tx),
1015
1015
  "--ps-tooltip-ty": Nn(e, "ty", t.ty),
1016
1016
  "--ps-tooltip-rot": Nn(e, "rot", t.rot)
1017
- }), Fo = (e, t) => ({
1017
+ }), Uo = (e, t) => ({
1018
1018
  "--ps-label-leader-length": Nn(e, "leader-length", t["leader-length"]),
1019
1019
  "--ps-label-leader-angle": Nn(e, "leader-angle", t["leader-angle"])
1020
- }), Fa = (e, t, r, n) => {
1021
- const o = su(n), a = o === null ? n.config : o.config, i = ta(n.labelPosition, a);
1022
- if (!n.isSlantable) return { slant: i, lowStyle: void 0, highStyle: void 0, lowLeaderStyle: void 0, highLeaderStyle: void 0, centreFromAnchorPx: Math.abs(i.lowOffsetY) - ko(a), placements: null };
1023
- const s = bi(t * 100, r * 100, n, a), c = jo[e], d = o !== null && s.isFlipped ? o.oppositeAnchorPx : ko(a), u = n.anchor === null ? 0 : (n.labelPosition === "top" ? -1 : 1) * n.anchor.knobCentrePx, S = {
1024
- low: Fs(s.lowOffsetX, s.lowOffsetY - i.lowOffsetY, s.lowAngleDeg, Za(s.lowOffsetX, s.lowOffsetY - u, s.isFlipped)),
1025
- high: Fs(s.highOffsetX, s.highOffsetY - i.highOffsetY, s.highAngleDeg, Za(s.highOffsetX, s.highOffsetY - u, s.isFlipped))
1020
+ }), za = (e, t, r, n) => {
1021
+ const o = lu(n), a = o === null ? n.config : o.config, i = na(n.labelPosition, a);
1022
+ if (!n.isSlantable) return { slant: i, lowStyle: void 0, highStyle: void 0, lowLeaderStyle: void 0, highLeaderStyle: void 0, centreFromAnchorPx: Math.abs(i.lowOffsetY) - _o(a), placements: null };
1023
+ const s = vi(t * 100, r * 100, n, a), c = qo[e], d = o !== null && s.isFlipped ? o.oppositeAnchorPx : _o(a), u = n.anchor === null ? 0 : (n.labelPosition === "top" ? -1 : 1) * n.anchor.knobCentrePx, S = {
1024
+ low: Us(s.lowOffsetX, s.lowOffsetY - i.lowOffsetY, s.lowAngleDeg, Ja(s.lowOffsetX, s.lowOffsetY - u, s.isFlipped)),
1025
+ high: Us(s.highOffsetX, s.highOffsetY - i.highOffsetY, s.highAngleDeg, Ja(s.highOffsetX, s.highOffsetY - u, s.isFlipped))
1026
1026
  };
1027
1027
  return {
1028
1028
  slant: s,
1029
- lowStyle: Ho(c.low, S.low),
1030
- highStyle: Ho(c.high, S.high),
1031
- lowLeaderStyle: Fo(c.low, S.low),
1032
- highLeaderStyle: Fo(c.high, S.high),
1029
+ lowStyle: Fo(c.low, S.low),
1030
+ highStyle: Fo(c.high, S.high),
1031
+ lowLeaderStyle: Uo(c.low, S.low),
1032
+ highLeaderStyle: Uo(c.high, S.high),
1033
1033
  centreFromAnchorPx: Math.abs(s.lowOffsetY) - d,
1034
1034
  placements: S
1035
1035
  };
1036
- }, su = (e) => e.config === void 0 || e.anchor === null || e.opposite === null || e.room === void 0 ? null : {
1036
+ }, lu = (e) => e.config === void 0 || e.anchor === null || e.opposite === null || e.room === void 0 ? null : {
1037
1037
  config: {
1038
1038
  ...e.config,
1039
- anchorGapY: e.anchor.anchorPx - Pl,
1040
- flipClearancePx: e.opposite.anchorPx + e.opposite.reachPx + El,
1041
- room: e.room,
1042
- drawnScale: wi
1039
+ anchorGapY: e.anchor.anchorPx - El,
1040
+ flipClearancePx: e.opposite.anchorPx + e.opposite.reachPx + Ll,
1041
+ room: e.room
1043
1042
  },
1044
1043
  oppositeAnchorPx: e.opposite.anchorPx
1045
- }, zs = (e, t, r, n) => {
1044
+ }, Bs = (e, t, r, n) => {
1046
1045
  if (r.anchor === null || n === null) return null;
1047
- const o = r.isSlantable ? bi(e * 100, t * 100, r, r.config).lowAngleDeg : 0;
1048
- return { anchorPx: r.anchor.anchorPx, reachPx: (1 + wi) * ea(n.widthPx, n.heightPx, o).acrossPx };
1049
- }, Bs = {
1046
+ const o = r.isSlantable ? vi(e * 100, t * 100, r, r.config).lowAngleDeg : 0;
1047
+ return { anchorPx: r.anchor.anchorPx, reachPx: 2 * ra(n.widthPx, n.heightPx, o).acrossPx };
1048
+ }, Ws = {
1050
1049
  "--ps-tooltip-origin": "100% 50%",
1051
1050
  "--ps-tooltip-tx": "0px",
1052
1051
  "--ps-tooltip-ty": "-50%",
1053
1052
  "--ps-tooltip-rot": "0deg"
1054
- }, Ws = (e, t, r) => {
1055
- const n = ta(r.labelPosition, r.config);
1056
- if (r.isVertical) return { slant: n, lowStyle: Bs, highStyle: Bs, lowLeaderStyle: void 0, highLeaderStyle: void 0, placements: null };
1053
+ }, Gs = (e, t, r) => {
1054
+ const n = na(r.labelPosition, r.config);
1055
+ if (r.isVertical) return { slant: n, lowStyle: Ws, highStyle: Ws, lowLeaderStyle: void 0, highLeaderStyle: void 0, placements: null };
1057
1056
  const o = r.autoSlantLabels && !r.isPointMode;
1058
1057
  let a = n;
1059
1058
  if (o) {
1060
- const c = r.config === void 0 || r.room === void 0 ? r.config : { ...r.config, room: r.room, drawnScale: wi };
1061
- a = bi(e, t, r, c);
1059
+ const c = r.config === void 0 || r.room === void 0 ? r.config : { ...r.config, room: r.room };
1060
+ a = vi(e, t, r, c);
1062
1061
  }
1063
- const i = jo.flat, s = {
1064
- low: Us(a.lowOffsetX, a.lowOffsetY, a.lowAngleDeg, a.isFlipped),
1065
- high: Us(a.highOffsetX, a.highOffsetY, a.highAngleDeg, a.isFlipped)
1062
+ const i = qo.flat, s = {
1063
+ low: zs(a.lowOffsetX, a.lowOffsetY, a.lowAngleDeg, a.isFlipped),
1064
+ high: zs(a.highOffsetX, a.highOffsetY, a.highAngleDeg, a.isFlipped)
1066
1065
  };
1067
1066
  return {
1068
1067
  slant: a,
1069
- lowStyle: { "--ps-tooltip-origin": "50% 50%", ...Ho(i.low, s.low) },
1070
- highStyle: { "--ps-tooltip-origin": "50% 50%", ...Ho(i.high, s.high) },
1071
- lowLeaderStyle: o ? Fo(i.low, s.low) : void 0,
1072
- highLeaderStyle: o ? Fo(i.high, s.high) : void 0,
1068
+ lowStyle: { "--ps-tooltip-origin": "50% 50%", ...Fo(i.low, s.low) },
1069
+ highStyle: { "--ps-tooltip-origin": "50% 50%", ...Fo(i.high, s.high) },
1070
+ lowLeaderStyle: o ? Uo(i.low, s.low) : void 0,
1071
+ highLeaderStyle: o ? Uo(i.high, s.high) : void 0,
1073
1072
  placements: o ? s : null
1074
1073
  };
1075
- }, lu = {
1074
+ }, cu = {
1076
1075
  horizontal: { decrease: "left", increase: "right" },
1077
1076
  vertical: { decrease: "down", increase: "up" }
1078
- }, cu = {
1077
+ }, du = {
1079
1078
  horizontal: { decrease: "period-slider-stepper-prev", increase: "period-slider-stepper-next" },
1080
1079
  vertical: { decrease: "period-slider-stepper-prev period-slider-stepper-down", increase: "period-slider-stepper-next period-slider-stepper-up" }
1081
- }, Gs = { horizontal: "px-[calc(var(--ps-target-size)/2)]", vertical: "py-[calc(var(--ps-target-size)/2)]" }, du = {
1082
- horizontal: { withSteppers: `grid-cols-[auto_minmax(0,1fr)_auto] ${On} ${Is.horizontal}`, railOnly: `grid-cols-[minmax(0,1fr)] ${Gs.horizontal}` },
1083
- vertical: { withSteppers: `grid-rows-[auto_minmax(0,1fr)_auto] ${On} ${Is.vertical}`, railOnly: `grid-rows-[minmax(0,1fr)] ${Gs.vertical}` }
1084
- }, js = {
1080
+ }, js = { horizontal: "px-[calc(var(--ps-target-size)/2)]", vertical: "py-[calc(var(--ps-target-size)/2)]" }, uu = {
1081
+ horizontal: { withSteppers: `grid-cols-[auto_minmax(0,1fr)_auto] ${Vn} ${As.horizontal}`, railOnly: `grid-cols-[minmax(0,1fr)] ${js.horizontal}` },
1082
+ vertical: { withSteppers: `grid-rows-[auto_minmax(0,1fr)_auto] ${Vn} ${As.vertical}`, railOnly: `grid-rows-[minmax(0,1fr)] ${js.vertical}` }
1083
+ }, Ks = {
1085
1084
  horizontal: { leading: "col-start-1 row-start-1", rail: "col-start-2 row-start-1", railOnly: "col-start-1 row-start-1", trailing: "col-start-3 row-start-1" },
1086
1085
  vertical: { leading: "col-start-1 row-start-1", rail: "col-start-1 row-start-2", railOnly: "col-start-1 row-start-1", trailing: "col-start-1 row-start-3" }
1087
- }, Ks = (e, t) => {
1086
+ }, qs = (e, t) => {
1088
1087
  e.setPointerCapture(t);
1089
- }, uu = (e) => {
1088
+ }, mu = (e) => {
1090
1089
  const {
1091
1090
  unit: t,
1092
1091
  minDate: r,
@@ -1109,8 +1108,8 @@ const ks = () => {
1109
1108
  } = e;
1110
1109
  Ie("PeriodSlider", "unit", t);
1111
1110
  const R = e.mode === "vernier" ? or("PeriodSlider", "macroUnit", e.macroUnit, t) : t, b = e.mode === "vernier" ? or("PeriodSlider", "microUnit", e.microUnit, t) : t, m = vr("PeriodSlider", e.yearStartMonth);
1112
- Xd(r, n, e.mode === "vernier" ? [R, b, t] : [t], m), Zd(e, r, n), x !== void 0 && ra("PeriodSlider", "formatLocale", x);
1113
- const me = _s("labelCeiling", e.labelCeiling), q = _s("labelFloor", e.labelFloor), ne = e.mode === "vernier" ? Qd(e, r, n) : null, te = ne !== null && ne.shape === "point", W = qo(e.locale, e.labels), oe = Pd[f], N = pl(), X = de(e), F = r.getTime(), I = n.getTime(), L = e.mode === "vernier", H = Y(() => L ? [] : wr("PeriodSlider", Jo(o), t, r, n, m).dates, [L, o, t, F, I, m]), _ = H.length > 0, { rangeMin: C, rangeMax: U } = Y(() => _ ? { rangeMin: 0, rangeMax: H.length - 1 } : { rangeMin: z(t, r, m), rangeMax: z(t, n, m) }, [_, H, t, F, I, m]), j = e.mode === "point", pe = A(
1111
+ Zd(r, n, e.mode === "vernier" ? [R, b, t] : [t], m), Qd(e, r, n), x !== void 0 && oa("PeriodSlider", "formatLocale", x);
1112
+ const me = Ys("labelCeiling", e.labelCeiling), q = Ys("labelFloor", e.labelFloor), ne = e.mode === "vernier" ? Jd(e, r, n) : null, te = ne !== null && ne.shape === "point", W = Zo(e.locale, e.labels), oe = Ed[f], N = wl(), X = de(e), F = r.getTime(), I = n.getTime(), L = e.mode === "vernier", H = Y(() => L ? [] : wr("PeriodSlider", ta(o), t, r, n, m).dates, [L, o, t, F, I, m]), _ = H.length > 0, { rangeMin: C, rangeMax: U } = Y(() => _ ? { rangeMin: 0, rangeMax: H.length - 1 } : { rangeMin: z(t, r, m), rangeMax: z(t, n, m) }, [_, H, t, F, I, m]), j = e.mode === "point", pe = A(
1114
1113
  (l) => {
1115
1114
  if (_) {
1116
1115
  const g = Math.max(0, Math.min(H.length - 1, Math.round(l)));
@@ -1126,37 +1125,37 @@ const ks = () => {
1126
1125
  return _ ? Pe(H, g, t, m) : z(t, g, m);
1127
1126
  },
1128
1127
  [_, H, t, C, m]
1129
- ), [ce, Re] = Be(() => ne === null ? null : ne.selection), ie = ce ?? (ne === null ? null : ne.selection), se = ie === null ? null : Jd(ie, te);
1128
+ ), [ce, Re] = We(() => ne === null ? null : ne.selection), ie = ce ?? (ne === null ? null : ne.selection), se = ie === null ? null : eu(ie, te);
1130
1129
  at(() => {
1131
1130
  se !== ie && Re((l) => l === ce ? se : l);
1132
1131
  });
1133
- const be = e.mode === "vernier" ? e.microValue?.getTime() : void 0, We = Y(() => e.mode !== "vernier" || e.microValue === void 0 ? null : [e.microValue, e.microValue], [e.mode, be]), bt = ks(), we = ks(), O = e.mode !== "vernier" ? null : te ? We ?? se : e.microRange !== void 0 ? e.microRange : se, Z = O === null ? null : we.shown ?? O, fe = e.mode === "range" ? e.range?.[0] ?? e.defaultRange?.[0] : e.mode === "vernier" ? Z?.[0] : void 0, He = e.mode === "range" ? e.range?.[1] ?? e.defaultRange?.[1] : e.mode === "vernier" ? Z?.[1] : void 0, Se = e.mode === "point" ? e.value ?? e.defaultValue : void 0, it = e.mode === "point" ? Se?.getTime() : fe?.getTime(), Je = e.mode === "range" ? He?.getTime() : it, [Ge, ut] = Y(() => {
1132
+ const be = e.mode === "vernier" ? e.microValue?.getTime() : void 0, Ge = Y(() => e.mode !== "vernier" || e.microValue === void 0 ? null : [e.microValue, e.microValue], [e.mode, be]), bt = _s(), we = _s(), O = e.mode !== "vernier" ? null : te ? Ge ?? se : e.microRange !== void 0 ? e.microRange : se, Z = O === null ? null : we.shown ?? O, fe = e.mode === "range" ? e.range?.[0] ?? e.defaultRange?.[0] : e.mode === "vernier" ? Z?.[0] : void 0, He = e.mode === "range" ? e.range?.[1] ?? e.defaultRange?.[1] : e.mode === "vernier" ? Z?.[1] : void 0, Se = e.mode === "point" ? e.value ?? e.defaultValue : void 0, it = e.mode === "point" ? Se?.getTime() : fe?.getTime(), Je = e.mode === "range" ? He?.getTime() : it, [je, ut] = Y(() => {
1134
1133
  if (e.mode === "point") {
1135
1134
  const v = re(Se);
1136
1135
  return [v, v];
1137
1136
  }
1138
1137
  const l = re(fe), g = re(He);
1139
1138
  return [Math.min(l, g), Math.max(l, g)];
1140
- }, [e.mode, it, Je, re, Se, fe, He]), ae = e.mode === "point" ? e.value !== void 0 : e.mode === "range" ? e.range !== void 0 : te ? e.microValue !== void 0 : e.microRange !== void 0, [Dt, et] = Be(() => L ? null : [Ge, ut]), vt = Dt ?? [Ge, ut], [ke, Xe] = Be(null), [Ee, Rt] = Be(null), st = de(null), [qt, T] = Be("high"), [ee, je] = Be(null), [mt, Ze] = Be(null), Me = ke ? ke[0] : ae ? Ge : vt[0], Ae = ke ? ke[1] : ae ? ut : vt[1], Vr = de([Me, Ae]), k = e.mode === "vernier" ? e.vernierOrientation ?? (p ? "macro-left" : "macro-top") : "macro-top", P = k === "macro-top" || k === "macro-left", xe = e.mode === "vernier" ? e.showVernierProjection ?? !0 : !1, Fe = e.mode === "vernier" ? e.showVernierTicks ?? !0 : !1, y = e.mode === "vernier" ? e.showHairline ?? !0 : !1, B = L ? Gt("macro", e) : _, ue = L ? Gt("micro", e) : _, _e = L ? Nt("macro", e).list : o, Ne = L ? Nt("micro", e).list : o, Ye = L ? e.formatMacroLabel ?? e.formatLabel : e.formatLabel, Ue = L ? e.formatMicroLabel ?? e.formatLabel : e.formatLabel, Ot = fe?.getTime(), ar = He?.getTime(), [lt, Sr] = Be(null), ir = de(null), [sa, kr] = Be(() => te ? "micro-point" : "micro-high"), tt = eu(sa, te);
1139
+ }, [e.mode, it, Je, re, Se, fe, He]), ae = e.mode === "point" ? e.value !== void 0 : e.mode === "range" ? e.range !== void 0 : te ? e.microValue !== void 0 : e.microRange !== void 0, [Dt, et] = We(() => L ? null : [je, ut]), vt = Dt ?? [je, ut], [ke, Ze] = We(null), [Ee, Rt] = We(null), st = de(null), [Ut, T] = We("high"), [ee, Ue] = We(null), [mt, Ke] = We(null), Me = ke ? ke[0] : ae ? je : vt[0], Ae = ke ? ke[1] : ae ? ut : vt[1], Vr = de([Me, Ae]), k = e.mode === "vernier" ? e.vernierOrientation ?? (p ? "macro-left" : "macro-top") : "macro-top", P = k === "macro-top" || k === "macro-left", xe = e.mode === "vernier" ? e.showVernierProjection ?? !0 : !1, Fe = e.mode === "vernier" ? e.showVernierTicks ?? !0 : !1, y = e.mode === "vernier" ? e.showHairline ?? !0 : !1, B = L ? jt("macro", e) : _, ue = L ? jt("micro", e) : _, _e = L ? Nt("macro", e).list : o, Ne = L ? Nt("micro", e).list : o, Ye = L ? e.formatMacroLabel ?? e.formatLabel : e.formatLabel, ze = L ? e.formatMicroLabel ?? e.formatLabel : e.formatLabel, Ot = fe?.getTime(), ar = He?.getTime(), [lt, Sr] = We(null), ir = de(null), [ca, kr] = We(() => te ? "micro-point" : "micro-high"), tt = tu(ca, te);
1141
1140
  at(() => {
1142
- tt !== sa && kr((l) => l === sa ? tt : l);
1141
+ tt !== ca && kr((l) => l === ca ? tt : l);
1143
1142
  });
1144
- const xt = Y(() => z(R, r, m), [F, R, m]), Ut = Y(() => z(R, n, m), [I, R, m]), Zn = Y(
1145
- () => L && ue ? pi("PeriodSlider", Nt("micro", e), b, r, n, m) : null,
1143
+ const xt = Y(() => z(R, r, m), [F, R, m]), zt = Y(() => z(R, n, m), [I, R, m]), Qn = Y(
1144
+ () => L && ue ? bi("PeriodSlider", Nt("micro", e), b, r, n, m) : null,
1146
1145
  [L, ue, Ne, b, F, I, m]
1147
- ), Ce = Y(() => L && B ? wr("PeriodSlider", Nt("macro", e), R, r, n, m).dates : [], [L, B, _e, R, F, I, m]), Mi = (l) => [
1148
- Math.max(xt, Math.min(Ut, z(R, l[0], m))),
1149
- Math.max(xt, Math.min(Ut, z(R, l[1], m)))
1150
- ], [yi, Pi] = e.mode !== "vernier" ? [xt, Ut] : Mi(e.macroRange), [rt, ft] = bt.shown === null ? [yi, Pi] : Mi(bt.shown), Dr = Y(() => le(R, rt, m), [R, rt, m]), Rr = Y(() => le(R, ft, m), [R, ft, m]), Qn = Y(() => e.mode !== "vernier" ? [r, n] : Yt(R, b, [Dr, Rr], r, n, m), [e.mode, Dr, Rr, R, b, F, I, m]), ze = Y(() => z(b, Qn[0], m), [b, Qn, m]), ct = Y(() => z(b, Qn[1], m), [b, Qn, m]), la = (l, g) => Zn === null ? [] : Hn(Zn, fn(Zn.ascending, l, g)), ve = Y(() => la(ze, ct), [Zn, ze, ct]), sr = B && Ce.length > 0, Vt = ue && ve.length > 0, Ei = sr ? z(R, Ce[0], m) : xt, Li = sr ? z(R, Ce[Ce.length - 1], m) : Ut, $i = Vt ? z(b, ve[0], m) : ze, ca = Vt ? z(b, ve[ve.length - 1], m) : ct, Fl = Math.min(Ei, rt), Ul = Math.max(Li, ft), lr = (l, g, v, D) => g.length > 0 ? z(b, g[Pe(g, l, b, m)], m) : Math.max(v, Math.min(D, z(b, l, m))), _r = Vt ? ve : [], Ke = Y(() => Z === null ? ze : lr(Z[0], _r, ze, ct), [Ot, ze, ct, b, Z, _r]), dt = Y(() => Z === null ? ct : lr(Z[1], _r, ze, ct), [ar, ze, ct, b, Z, _r]), Yr = Y(() => le(b, Ke, m), [b, Ke, m]), Hr = Y(() => le(b, dt, m), [b, dt, m]), Ti = !L || O === null ? null : { macroUnit: R, macroLowEnc: yi, macroHighEnc: Pi, microUnit: b, microLowEnc: z(b, O[0], m), microHighEnc: z(b, O[1], m) }, da = de(Ti), ua = Math.max(1, Ut - xt), Et = sr ? bo(Ce, R, a, Dr, m) : Math.max(0, Math.min(1, (rt - xt) / ua)), kt = Math.max(Et, sr ? bo(Ce, R, a, Rr, m) : Math.min(1, (ft - xt) / ua)), Ii = (l) => Math.max(Ei, Math.min(Li, Math.round(xt + l * ua))), Jn = Math.max(1, ct - ze), xr = Vt ? bo(ve, b, a, Yr, m) : Math.max(0, Math.min(1, (Ke - ze) / Jn)), Fr = Math.max(xr, Vt ? bo(ve, b, a, Hr, m) : Math.min(1, (dt - ze) / Jn)), ma = de({ timerId: null, emit: null }), eo = de({ timerId: null, emit: null }), to = de({ timerId: null, emit: null });
1146
+ ), Ce = Y(() => L && B ? wr("PeriodSlider", Nt("macro", e), R, r, n, m).dates : [], [L, B, _e, R, F, I, m]), yi = (l) => [
1147
+ Math.max(xt, Math.min(zt, z(R, l[0], m))),
1148
+ Math.max(xt, Math.min(zt, z(R, l[1], m)))
1149
+ ], [Pi, Ei] = e.mode !== "vernier" ? [xt, zt] : yi(e.macroRange), [rt, ft] = bt.shown === null ? [Pi, Ei] : yi(bt.shown), Dr = Y(() => le(R, rt, m), [R, rt, m]), Rr = Y(() => le(R, ft, m), [R, ft, m]), Jn = Y(() => e.mode !== "vernier" ? [r, n] : Yt(R, b, [Dr, Rr], r, n, m), [e.mode, Dr, Rr, R, b, F, I, m]), Be = Y(() => z(b, Jn[0], m), [b, Jn, m]), ct = Y(() => z(b, Jn[1], m), [b, Jn, m]), da = (l, g) => Qn === null ? [] : Fn(Qn, fn(Qn.ascending, l, g)), ve = Y(() => da(Be, ct), [Qn, Be, ct]), sr = B && Ce.length > 0, Vt = ue && ve.length > 0, Li = sr ? z(R, Ce[0], m) : xt, $i = sr ? z(R, Ce[Ce.length - 1], m) : zt, Ti = Vt ? z(b, ve[0], m) : Be, ua = Vt ? z(b, ve[ve.length - 1], m) : ct, Ul = Math.min(Li, rt), zl = Math.max($i, ft), lr = (l, g, v, D) => g.length > 0 ? z(b, g[Pe(g, l, b, m)], m) : Math.max(v, Math.min(D, z(b, l, m))), _r = Vt ? ve : [], qe = Y(() => Z === null ? Be : lr(Z[0], _r, Be, ct), [Ot, Be, ct, b, Z, _r]), dt = Y(() => Z === null ? ct : lr(Z[1], _r, Be, ct), [ar, Be, ct, b, Z, _r]), Yr = Y(() => le(b, qe, m), [b, qe, m]), Hr = Y(() => le(b, dt, m), [b, dt, m]), Ii = !L || O === null ? null : { macroUnit: R, macroLowEnc: Pi, macroHighEnc: Ei, microUnit: b, microLowEnc: z(b, O[0], m), microHighEnc: z(b, O[1], m) }, ma = de(Ii), fa = Math.max(1, zt - xt), Et = sr ? vo(Ce, R, a, Dr, m) : Math.max(0, Math.min(1, (rt - xt) / fa)), kt = Math.max(Et, sr ? vo(Ce, R, a, Rr, m) : Math.min(1, (ft - xt) / fa)), Ai = (l) => Math.max(Li, Math.min($i, Math.round(xt + l * fa))), eo = Math.max(1, ct - Be), xr = Vt ? vo(ve, b, a, Yr, m) : Math.max(0, Math.min(1, (qe - Be) / eo)), Fr = Math.max(xr, Vt ? vo(ve, b, a, Hr, m) : Math.min(1, (dt - Be) / eo)), ha = de({ timerId: null, emit: null }), to = de({ timerId: null, emit: null }), ro = de({ timerId: null, emit: null });
1151
1150
  $t(() => {
1152
- const l = [ma, eo, to];
1151
+ const l = [ha, to, ro];
1153
1152
  return () => {
1154
1153
  for (const g of l)
1155
- Ha(g.current);
1154
+ Ua(g.current);
1156
1155
  };
1157
1156
  }, []);
1158
1157
  const Ur = A((l, g, v) => {
1159
- Ha(l);
1158
+ Ua(l);
1160
1159
  const { debounceMs: D } = X.current;
1161
1160
  if (v || !D || D <= 0) {
1162
1161
  g();
@@ -1165,28 +1164,28 @@ const ks = () => {
1165
1164
  l.emit = g, l.timerId = setTimeout(() => {
1166
1165
  l.timerId = null, l.emit = null, g();
1167
1166
  }, D);
1168
- }, []), Ai = A((l) => {
1167
+ }, []), Ni = A((l) => {
1169
1168
  const g = l.emit;
1170
- Ha(l), g?.();
1169
+ Ua(l), g?.();
1171
1170
  }, []), zr = A((l) => new Date(Math.min(Math.max(l.getTime(), F), I)), [F, I]), cr = A(
1172
1171
  (l, g, v = !1) => {
1173
1172
  const [D, V] = Vr.current;
1174
- if ((X.current.mode === "point" ? l === D : l === D && g === V) && ma.current.timerId === null)
1173
+ if ((X.current.mode === "point" ? l === D : l === D && g === V) && ha.current.timerId === null)
1175
1174
  return;
1176
1175
  const Q = pe(l), J = pe(g), ge = () => {
1177
1176
  const De = X.current;
1178
1177
  De.mode === "point" ? De.onChangePoint?.(Q) : De.mode === "range" && De.onChangeRange?.(Q, J);
1179
1178
  };
1180
- Ur(ma.current, ge, v);
1179
+ Ur(ha.current, ge, v);
1181
1180
  },
1182
1181
  [pe, Ur]
1183
1182
  ), Mr = A(
1184
1183
  (l, g, v = !1) => {
1185
- const D = da.current;
1184
+ const D = ma.current;
1186
1185
  if (X.current.mode !== "vernier" || D === null) return;
1187
1186
  const V = zr(l), G = zr(g);
1188
- z(D.macroUnit, V, m) === D.macroLowEnc && z(D.macroUnit, G, m) === D.macroHighEnc && eo.current.timerId === null || Ur(
1189
- eo.current,
1187
+ z(D.macroUnit, V, m) === D.macroLowEnc && z(D.macroUnit, G, m) === D.macroHighEnc && to.current.timerId === null || Ur(
1188
+ to.current,
1190
1189
  () => {
1191
1190
  const Q = X.current;
1192
1191
  Q.mode === "vernier" && Q.onChangeMacroRange?.(V, G);
@@ -1197,11 +1196,11 @@ const ks = () => {
1197
1196
  [zr, Ur, m]
1198
1197
  ), Lt = A(
1199
1198
  (l, g, v = !1) => {
1200
- const D = X.current, V = da.current;
1199
+ const D = X.current, V = ma.current;
1201
1200
  if (D.mode !== "vernier" || V === null) return;
1202
1201
  const G = zr(l), Q = zr(g);
1203
- z(V.microUnit, G, m) === V.microLowEnc && z(V.microUnit, Q, m) === V.microHighEnc && to.current.timerId === null || ((te ? D.microValue === void 0 : D.microRange === void 0) && Re([G, Q]), Ur(
1204
- to.current,
1202
+ z(V.microUnit, G, m) === V.microLowEnc && z(V.microUnit, Q, m) === V.microHighEnc && ro.current.timerId === null || ((te ? D.microValue === void 0 : D.microRange === void 0) && Re([G, Q]), Ur(
1203
+ ro.current,
1205
1204
  () => {
1206
1205
  const J = X.current;
1207
1206
  if (J.mode === "vernier") {
@@ -1216,7 +1215,7 @@ const ks = () => {
1216
1215
  ));
1217
1216
  },
1218
1217
  [zr, Ur, te, m]
1219
- ), Ni = A(
1218
+ ), Ci = A(
1220
1219
  (l, g = !1) => {
1221
1220
  Lt(l, l, g);
1222
1221
  },
@@ -1235,7 +1234,7 @@ const ks = () => {
1235
1234
  return Math.max(0, Math.min(100, v));
1236
1235
  },
1237
1236
  [_, a, H, C, U]
1238
- ), fa = A(
1237
+ ), ga = A(
1239
1238
  (l) => {
1240
1239
  const g = Math.max(0, Math.min(100, l));
1241
1240
  if (_) {
@@ -1250,37 +1249,37 @@ const ks = () => {
1250
1249
  return Math.round(v);
1251
1250
  },
1252
1251
  [_, a, H, C, U, t, m]
1253
- ), hn = de(null), Ci = de(null), Oi = de(0), ht = de(null), ha = de(null), Vi = de(null), ki = de(null), [ga, _i] = Be(0), [zl, ro] = tn(), [Bl, Yi] = tn(), [Wl, Gl] = tn(), [jl, Kl] = tn(), [ql, Hi] = tn(), [Xl, Zl] = tn(), [Ql, Jl] = Be(null), pa = !p && d !== "hover", Br = pa ? Ql : null, ec = j ? Ao(ro) : au(ro, Yi), wa = !j && Me === Ae, ba = rt === ft, va = !te && Ke === dt, tc = P ? "top" : "bottom", rc = P ? "bottom" : "top", Fi = S && !p, nc = Fi && !te, Sa = Br === null ? void 0 : Br.room, Da = { isPointMode: j, isVertical: p, autoSlantLabels: S, isMerged: wa, keepMergedLabelUpright: E, trackLengthPx: ga, labelPosition: u, config: ec, room: Sa }, Ra = No(Gl, Kl), xa = te ? Hi : No(Hi, Zl), Ui = {
1254
- trackLengthPx: ga,
1255
- labelPosition: tc,
1256
- config: Ao(Ra),
1257
- isMerged: ba,
1252
+ ), hn = de(null), Oi = de(null), Vi = de(0), ht = de(null), pa = de(null), ki = de(null), _i = de(null), [wa, Yi] = We(0), [Bl, no] = tn(), [Wl, Hi] = tn(), [Gl, jl] = tn(), [Kl, ql] = tn(), [Xl, Fi] = tn(), [Zl, Ql] = tn(), [Jl, ec] = We(null), ba = !p && d !== "hover", Br = ba ? Jl : null, tc = j ? No(no) : iu(no, Hi), va = !j && Me === Ae, Sa = rt === ft, Da = !te && qe === dt, rc = P ? "top" : "bottom", nc = P ? "bottom" : "top", Ui = S && !p, oc = Ui && !te, Ra = Br === null ? void 0 : Br.room, xa = { isPointMode: j, isVertical: p, autoSlantLabels: S, isMerged: va, keepMergedLabelUpright: E, trackLengthPx: wa, labelPosition: u, config: tc, room: Ra }, Ma = Co(jl, ql), ya = te ? Fi : Co(Fi, Ql), zi = {
1253
+ trackLengthPx: wa,
1254
+ labelPosition: rc,
1255
+ config: No(Ma),
1256
+ isMerged: Sa,
1258
1257
  keepMergedLabelUpright: E,
1259
- isSlantable: Fi,
1260
- room: Sa,
1258
+ isSlantable: Ui,
1259
+ room: Ra,
1261
1260
  anchor: Br === null ? null : Br.macro
1262
- }, zi = {
1263
- trackLengthPx: ga,
1264
- labelPosition: rc,
1265
- config: Ao(xa),
1266
- isMerged: va,
1261
+ }, Bi = {
1262
+ trackLengthPx: wa,
1263
+ labelPosition: nc,
1264
+ config: No(ya),
1265
+ isMerged: Da,
1267
1266
  keepMergedLabelUpright: E,
1268
- isSlantable: nc,
1269
- room: Sa,
1267
+ isSlantable: oc,
1268
+ room: Ra,
1270
1269
  anchor: Br === null ? null : Br.micro
1271
- }, Ma = { ...Ui, opposite: zs(xr, Fr, zi, xa) }, ya = { ...zi, opposite: zs(Et, kt, Ui, Ra) };
1270
+ }, Pa = { ...zi, opposite: Bs(xr, Fr, Bi, ya) }, Ea = { ...Bi, opposite: Bs(Et, kt, zi, Ma) };
1272
1271
  $t(() => {
1273
1272
  const l = ht.current;
1274
1273
  if (!l) return;
1275
1274
  const g = () => {
1276
1275
  const D = l.getBoundingClientRect(), V = p ? D.height : D.width;
1277
- V > 0 && _i((G) => Math.abs(G - V) < 0.5 ? G : V);
1276
+ V > 0 && Yi((G) => Math.abs(G - V) < 0.5 ? G : V);
1278
1277
  };
1279
1278
  if (g(), typeof ResizeObserver < "u") {
1280
1279
  const D = new ResizeObserver((V) => {
1281
1280
  for (const G of V) {
1282
1281
  const Q = p ? G.contentRect.height : G.contentRect.width;
1283
- Q > 0 && _i((J) => Math.abs(J - Q) < 0.5 ? J : Q);
1282
+ Q > 0 && Yi((J) => Math.abs(J - Q) < 0.5 ? J : Q);
1284
1283
  }
1285
1284
  });
1286
1285
  return D.observe(l), () => D.disconnect();
@@ -1297,7 +1296,7 @@ const ks = () => {
1297
1296
  return Number.isFinite(V) ? Math.max(0, Math.min(1, V / D)) : null;
1298
1297
  },
1299
1298
  [p]
1300
- ), Bi = A(
1299
+ ), Wi = A(
1301
1300
  (l, g) => {
1302
1301
  const v = ht.current;
1303
1302
  if (!v) return null;
@@ -1305,40 +1304,40 @@ const ks = () => {
1305
1304
  return D === null ? null : D * 100;
1306
1305
  },
1307
1306
  [Wr]
1308
- ), gn = de(null), Xt = de(null), no = de({ macroLowRatio: Et, macroHighRatio: kt, isVertical: p, isMacroFirstRail: P }), Wi = de({ flat: Da, macro: Ma, micro: ya }), Gi = de({ ceiling: me, floor: q, isMeasured: pa });
1307
+ ), gn = de(null), Xt = de(null), oo = de({ macroLowRatio: Et, macroHighRatio: kt, isVertical: p, isMacroFirstRail: P }), Gi = de({ flat: xa, macro: Pa, micro: Ea }), ji = de({ ceiling: me, floor: q, isMeasured: ba });
1309
1308
  at(() => {
1310
- no.current = { macroLowRatio: Et, macroHighRatio: kt, isVertical: p, isMacroFirstRail: P }, Wi.current = { flat: Da, macro: Ma, micro: ya }, Gi.current = { ceiling: me, floor: q, isMeasured: pa }, X.current = e, Vr.current = [Me, Ae], da.current = Ti, st.current = Ee, ir.current = lt;
1309
+ oo.current = { macroLowRatio: Et, macroHighRatio: kt, isVertical: p, isMacroFirstRail: P }, Gi.current = { flat: xa, macro: Pa, micro: Ea }, ji.current = { ceiling: me, floor: q, isMeasured: ba }, X.current = e, Vr.current = [Me, Ae], ma.current = Ii, st.current = Ee, ir.current = lt;
1311
1310
  });
1312
- const ji = (l, g) => {
1313
- const v = no.current;
1314
- ha.current?.setAttribute("d", Va(l, g, v.isVertical, v.isMacroFirstRail));
1315
- }, oc = (l, g, v) => {
1316
- const D = Wi.current;
1317
- return l === "flat" ? Ws(g * 100, v * 100, D.flat).placements : Fa(l, g, v, l === "macro" ? D.macro : D.micro).placements;
1311
+ const Ki = (l, g) => {
1312
+ const v = oo.current;
1313
+ pa.current?.setAttribute("d", _a(l, g, v.isVertical, v.isMacroFirstRail));
1314
+ }, ac = (l, g, v) => {
1315
+ const D = Gi.current;
1316
+ return l === "flat" ? Gs(g * 100, v * 100, D.flat).placements : za(l, g, v, l === "macro" ? D.macro : D.micro).placements;
1318
1317
  }, pn = A(() => {
1319
- const l = ht.current, g = Gi.current;
1318
+ const l = ht.current, g = ji.current;
1320
1319
  if (l === null || !g.isMeasured) return;
1321
- const v = ru(l, g.ceiling, g.floor);
1322
- Jl((D) => ou(D, v) ? D : v);
1320
+ const v = nu(l, g.ceiling, g.floor);
1321
+ ec((D) => au(D, v) ? D : v);
1323
1322
  }, []), wn = (l, g, v) => {
1324
1323
  const D = ht.current;
1325
1324
  if (!D) return;
1326
- gn.current = { rail: l, lowRatio: g, highRatio: v }, zc(D, l, g, v);
1327
- const V = oc(l, g, v);
1328
- V !== null && Uc(D, l, V), l === "macro" && ji(g, v);
1325
+ gn.current = { rail: l, lowRatio: g, highRatio: v }, Bc(D, l, g, v);
1326
+ const V = ac(l, g, v);
1327
+ V !== null && zc(D, l, V), l === "macro" && Ki(g, v);
1329
1328
  }, Pr = A(() => {
1330
1329
  Xt.current !== null && (clearTimeout(Xt.current), Xt.current = null);
1331
1330
  const l = ht.current;
1332
- l && (l.removeAttribute(Ca), l.style.removeProperty(Oa));
1333
- }, []), Ki = () => {
1331
+ l && (l.removeAttribute(Va), l.style.removeProperty(ka));
1332
+ }, []), qi = () => {
1334
1333
  const l = ht.current;
1335
1334
  if (gn.current === null || !l) {
1336
1335
  gn.current = null;
1337
1336
  return;
1338
1337
  }
1339
- gn.current = null, Xt.current !== null && clearTimeout(Xt.current), l.style.setProperty(Oa, `${ys}ms`), l.setAttribute(Ca, "true"), Bc(l), ji(no.current.macroLowRatio, no.current.macroHighRatio), Xt.current = setTimeout(() => {
1340
- Xt.current = null, l.removeAttribute(Ca), l.style.removeProperty(Oa);
1341
- }, ys);
1338
+ gn.current = null, Xt.current !== null && clearTimeout(Xt.current), l.style.setProperty(ka, `${Ps}ms`), l.setAttribute(Va, "true"), Wc(l), Ki(oo.current.macroLowRatio, oo.current.macroHighRatio), Xt.current = setTimeout(() => {
1339
+ Xt.current = null, l.removeAttribute(Va), l.style.removeProperty(ka);
1340
+ }, Ps);
1342
1341
  };
1343
1342
  at(() => {
1344
1343
  const l = gn.current;
@@ -1349,7 +1348,7 @@ const ks = () => {
1349
1348
  },
1350
1349
  []
1351
1350
  );
1352
- const Gr = de(null), jr = de(null), zt = de(null), Pa = de(null), bn = de(null), dr = A(() => Gr.current !== null || jr.current !== null, []), qi = (l) => {
1351
+ const Gr = de(null), jr = de(null), Bt = de(null), La = de(null), bn = de(null), dr = A(() => Gr.current !== null || jr.current !== null, []), Xi = (l) => {
1353
1352
  if (i) return;
1354
1353
  if (L) {
1355
1354
  const he = jr.current;
@@ -1357,46 +1356,46 @@ const ks = () => {
1357
1356
  const _t = Wr(l.clientX, l.clientY, ht.current.getBoundingClientRect());
1358
1357
  if (_t === null) return;
1359
1358
  if (he.handle === "macro-low" || he.handle === "macro-high" || he.handle === "macro-connect") {
1360
- const [nt, qe, Zt] = Kd(he.handle, _t, he.startPointerRatio, he.startMacroLowRatio, he.startMacroHighRatio);
1361
- wn("macro", nt, qe), Zt !== ir.current && (ir.current = Zt, Sr(Zt), kr(Zt));
1362
- let Wt, Pt, Qt;
1359
+ const [nt, Xe, Zt] = qd(he.handle, _t, he.startPointerRatio, he.startMacroLowRatio, he.startMacroHighRatio);
1360
+ wn("macro", nt, Xe), Zt !== ir.current && (ir.current = Zt, Sr(Zt), kr(Zt));
1361
+ let Gt, Pt, Qt;
1363
1362
  if (sr) {
1364
- const Jt = vo(Ce, R, a, nt, m), xn = Math.max(Jt, vo(Ce, R, a, qe, m));
1365
- Pt = Ce[Jt], Qt = Ce[xn], Wt = z(R, Pt, m);
1363
+ const Jt = So(Ce, R, a, nt, m), xn = Math.max(Jt, So(Ce, R, a, Xe, m));
1364
+ Pt = Ce[Jt], Qt = Ce[xn], Gt = z(R, Pt, m);
1366
1365
  } else
1367
- Wt = Ii(nt), Pt = le(R, Wt, m), Qt = le(R, Ii(qe), m);
1366
+ Gt = Ai(nt), Pt = le(R, Gt, m), Qt = le(R, Ai(Xe), m);
1368
1367
  bt.show(Pt, Qt);
1369
1368
  const mr = `${Pt.getTime()}_${Qt.getTime()}`;
1370
- mr !== Pa.current && (Pa.current = mr, Mr(Pt, Qt));
1371
- const [Rn, Ic] = Yt(R, b, [Pt, Qt], r, n, m), fo = z(b, Rn, m), ho = z(b, Ic, m), Ss = ue ? la(fo, ho) : [], Ds = { kind: "range", min: fo, max: ho };
1369
+ mr !== La.current && (La.current = mr, Mr(Pt, Qt));
1370
+ const [Rn, Ac] = Yt(R, b, [Pt, Qt], r, n, m), ho = z(b, Rn, m), go = z(b, Ac, m), Ds = ue ? da(ho, go) : [], Rs = { kind: "range", min: ho, max: go };
1372
1371
  let Lr, $r;
1373
1372
  if (he.handle === "macro-connect") {
1374
- const Jt = Wt - he.startMacroLowEnc, xn = Io("pan", Ds, Ns(b, he.initialMicroLowEnc, R, Jt, m), Ns(b, he.initialMicroHighEnc, R, Jt, m));
1373
+ const Jt = Gt - he.startMacroLowEnc, xn = Ao("pan", Rs, Cs(b, he.initialMicroLowEnc, R, Jt, m), Cs(b, he.initialMicroHighEnc, R, Jt, m));
1375
1374
  if (xn === null) return;
1376
1375
  Lr = le(b, xn[0], m), $r = le(b, xn[1], m);
1377
1376
  } else {
1378
- const Jt = Io("resize", Ds, he.initialMicroLowEnc, he.initialMicroHighEnc);
1377
+ const Jt = Ao("resize", Rs, he.initialMicroLowEnc, he.initialMicroHighEnc);
1379
1378
  if (Jt === null) return;
1380
1379
  Lr = le(b, Jt[0], m), $r = le(b, Jt[1], m);
1381
1380
  }
1382
- const Rs = lr(Lr, Ss, fo, ho), Ac = Math.max(Rs, lr($r, Ss, fo, ho));
1383
- Lr = le(b, Rs, m), $r = le(b, Ac, m), we.show(Lr, $r);
1384
- const xs = `${Lr.getTime()}_${$r.getTime()}`;
1385
- xs !== bn.current && (bn.current = xs, Lt(Lr, $r));
1381
+ const xs = lr(Lr, Ds, ho, go), Nc = Math.max(xs, lr($r, Ds, ho, go));
1382
+ Lr = le(b, xs, m), $r = le(b, Nc, m), we.show(Lr, $r);
1383
+ const Ms = `${Lr.getTime()}_${$r.getTime()}`;
1384
+ Ms !== bn.current && (bn.current = Ms, Lt(Lr, $r));
1386
1385
  } else if (he.handle === "micro-low" || he.handle === "micro-high" || he.handle === "micro-connect" || he.handle === "micro-point") {
1387
- const [nt, qe, Zt] = qd(he.handle, _t, he.startPointerRatio, he.startMicroLowRatio, he.startMicroHighRatio);
1388
- wn("micro", nt, qe), Zt !== ir.current && (ir.current = Zt, Sr(Zt), kr(Zt));
1389
- let Wt, Pt;
1386
+ const [nt, Xe, Zt] = Xd(he.handle, _t, he.startPointerRatio, he.startMicroLowRatio, he.startMicroHighRatio);
1387
+ wn("micro", nt, Xe), Zt !== ir.current && (ir.current = Zt, Sr(Zt), kr(Zt));
1388
+ let Gt, Pt;
1390
1389
  if (Vt) {
1391
- const mr = vo(ve, b, a, nt, m), Rn = Math.max(mr, vo(ve, b, a, qe, m));
1392
- Wt = ve[mr], Pt = ve[Rn];
1390
+ const mr = So(ve, b, a, nt, m), Rn = Math.max(mr, So(ve, b, a, Xe, m));
1391
+ Gt = ve[mr], Pt = ve[Rn];
1393
1392
  } else {
1394
- const mr = lr(le(b, Math.round(ze + nt * Jn), m), _r, ze, ct), Rn = Math.max(mr, lr(le(b, Math.round(ze + qe * Jn), m), _r, ze, ct));
1395
- Wt = le(b, mr, m), Pt = le(b, Rn, m);
1393
+ const mr = lr(le(b, Math.round(Be + nt * eo), m), _r, Be, ct), Rn = Math.max(mr, lr(le(b, Math.round(Be + Xe * eo), m), _r, Be, ct));
1394
+ Gt = le(b, mr, m), Pt = le(b, Rn, m);
1396
1395
  }
1397
- we.show(Wt, Pt);
1398
- const Qt = `${Wt.getTime()}_${Pt.getTime()}`;
1399
- Qt !== bn.current && (bn.current = Qt, Lt(Wt, Pt));
1396
+ we.show(Gt, Pt);
1397
+ const Qt = `${Gt.getTime()}_${Pt.getTime()}`;
1398
+ Qt !== bn.current && (bn.current = Qt, Lt(Gt, Pt));
1400
1399
  }
1401
1400
  return;
1402
1401
  }
@@ -1405,9 +1404,9 @@ const ks = () => {
1405
1404
  const v = ht.current.getBoundingClientRect(), D = p ? l.clientY : l.clientX, V = p ? v.height : v.width;
1406
1405
  if (!(Number.isFinite(V) && V > 0)) return;
1407
1406
  if (g.handle === "connect") {
1408
- const he = p ? (g.startPointerPos - D) / V : (D - g.startPointerPos) / V, [_t, nt] = ui(he, g.startLowRatio, g.startHighRatio);
1407
+ const he = p ? (g.startPointerPos - D) / V : (D - g.startPointerPos) / V, [_t, nt] = fi(he, g.startLowRatio, g.startHighRatio);
1409
1408
  wn("flat", _t, nt);
1410
- const qe = kd({
1409
+ const Xe = _d({
1411
1410
  posDiffPct: he,
1412
1411
  startLowVal: g.startLowVal,
1413
1412
  startHighVal: g.startHighVal,
@@ -1419,58 +1418,58 @@ const ks = () => {
1419
1418
  unit: t,
1420
1419
  yearStartMonth: m
1421
1420
  });
1422
- if (zt.current && zt.current[0] === qe[0] && zt.current[1] === qe[1])
1421
+ if (Bt.current && Bt.current[0] === Xe[0] && Bt.current[1] === Xe[1])
1423
1422
  return;
1424
- zt.current = qe, Xe(qe), cr(qe[0], qe[1], !1);
1423
+ Bt.current = Xe, Ze(Xe), cr(Xe[0], Xe[1], !1);
1425
1424
  return;
1426
1425
  }
1427
1426
  const G = Wr(l.clientX, l.clientY, v);
1428
1427
  if (G === null) return;
1429
- const [Q, J] = Vo(j ? "point" : g.handle, G, g.startLowRatio, g.startHighRatio);
1428
+ const [Q, J] = ko(j ? "point" : g.handle, G, g.startLowRatio, g.startHighRatio);
1430
1429
  wn("flat", Q, J);
1431
- const ge = fa(G * 100), [De, Oe] = Vs(g.handle, ge, g.startLowVal, g.startHighVal, C, U, j);
1432
- if ((!zt.current || zt.current[0] !== De || zt.current[1] !== Oe) && (zt.current = [De, Oe], Xe([De, Oe]), cr(De, Oe, !1)), !j && (g.handle === "low" || g.handle === "high")) {
1433
- const he = mi(g.handle, G, g.startLowRatio, g.startHighRatio);
1430
+ const ge = ga(G * 100), [De, Oe] = ks(g.handle, ge, g.startLowVal, g.startHighVal, C, U, j);
1431
+ if ((!Bt.current || Bt.current[0] !== De || Bt.current[1] !== Oe) && (Bt.current = [De, Oe], Ze([De, Oe]), cr(De, Oe, !1)), !j && (g.handle === "low" || g.handle === "high")) {
1432
+ const he = hi(g.handle, G, g.startLowRatio, g.startHighRatio);
1434
1433
  st.current !== he && (st.current = he, Rt(he), T(he));
1435
1434
  }
1436
- }, Xi = () => {
1437
- Ki(), Pa.current = null, bn.current = null, jr.current = null, ir.current = null, Sr(null), bt.release(), we.release(), Ai(eo.current), Ai(to.current);
1438
1435
  }, Zi = () => {
1439
- Ki();
1440
- const l = zt.current ?? ke;
1441
- l && (cr(l[0], l[1], !0), et(l)), zt.current = null, Xe(null), Gr.current = null, st.current = null, Rt(null);
1442
- }, Qi = (l) => {
1436
+ qi(), La.current = null, bn.current = null, jr.current = null, ir.current = null, Sr(null), bt.release(), we.release(), Ni(to.current), Ni(ro.current);
1437
+ }, Qi = () => {
1438
+ qi();
1439
+ const l = Bt.current ?? ke;
1440
+ l && (cr(l[0], l[1], !0), et(l)), Bt.current = null, Ze(null), Gr.current = null, st.current = null, Rt(null);
1441
+ }, Ji = (l) => {
1443
1442
  if (L) {
1444
1443
  const v = jr.current;
1445
1444
  if (!v || l.pointerId !== v.pointerId) return;
1446
- Xi();
1445
+ Zi();
1447
1446
  return;
1448
1447
  }
1449
1448
  const g = Gr.current;
1450
- !g || l.pointerId !== g.pointerId || Zi();
1451
- }, Ji = () => {
1452
- jr.current !== null && Xi(), Gr.current !== null && Zi();
1453
- }, Ea = de(qi), es = de(Qi), ts = de(Ji);
1449
+ !g || l.pointerId !== g.pointerId || Qi();
1450
+ }, es = () => {
1451
+ jr.current !== null && Zi(), Gr.current !== null && Qi();
1452
+ }, $a = de(Xi), ts = de(Ji), rs = de(es);
1454
1453
  at(() => {
1455
- Ea.current = qi, es.current = Qi, ts.current = Ji;
1454
+ $a.current = Xi, ts.current = Ji, rs.current = es;
1456
1455
  });
1457
- const rs = de(L);
1456
+ const ns = de(L);
1458
1457
  $t(() => {
1459
- rs.current !== L && (rs.current = L, ts.current());
1458
+ ns.current !== L && (ns.current = L, rs.current());
1460
1459
  }, [L]);
1461
- const La = Ee !== null || lt !== null;
1460
+ const Ta = Ee !== null || lt !== null;
1462
1461
  $t(() => {
1463
- if (!La) return;
1462
+ if (!Ta) return;
1464
1463
  const l = hn.current?.ownerDocument.defaultView;
1465
1464
  if (!l) return;
1466
- const g = (D) => Ea.current(D), v = (D) => es.current(D);
1465
+ const g = (D) => $a.current(D), v = (D) => ts.current(D);
1467
1466
  return l.addEventListener("pointermove", g), l.addEventListener("pointerup", v), l.addEventListener("pointercancel", v), l.addEventListener("lostpointercapture", v), () => {
1468
1467
  l.removeEventListener("pointermove", g), l.removeEventListener("pointerup", v), l.removeEventListener("pointercancel", v), l.removeEventListener("lostpointercapture", v);
1469
1468
  };
1470
- }, [La]);
1471
- const $a = A(
1469
+ }, [Ta]);
1470
+ const Ia = A(
1472
1471
  (l, g, v, D) => {
1473
- Pr(), Ks(l, g), pn(), Gr.current = {
1472
+ Pr(), qs(l, g), Ue(null), Ke(null), pn(), Gr.current = {
1474
1473
  pointerId: g,
1475
1474
  handle: v,
1476
1475
  startPointerPos: D,
@@ -1483,9 +1482,9 @@ const ks = () => {
1483
1482
  }, st.current = v, Rt(v), v !== "connect" && T(v);
1484
1483
  },
1485
1484
  [Me, Ae, yr]
1486
- ), ns = A(
1485
+ ), os = A(
1487
1486
  (l, g, v, D) => {
1488
- X.current.mode === "vernier" && (Pr(), Ks(l, g), pn(), jr.current = {
1487
+ X.current.mode === "vernier" && (Pr(), qs(l, g), pn(), jr.current = {
1489
1488
  pointerId: g,
1490
1489
  handle: v,
1491
1490
  startPointerRatio: D,
@@ -1496,19 +1495,19 @@ const ks = () => {
1496
1495
  // 平行移動量はマクロのキーの差分で求めるため、基準は表示しているマクロ値 (定義域へ畳んだ値) のキーでなければならない。
1497
1496
  // 生の Props を基準にすると、定義域の外を指す開始日との差分が畳んだ分だけ混ざり、動いていない押下でも選択がずれる
1498
1497
  startMacroLowEnc: rt,
1499
- initialMicroLowEnc: Ke,
1498
+ initialMicroLowEnc: qe,
1500
1499
  initialMicroHighEnc: dt
1501
1500
  }, ir.current = v, Sr(v), kr(v));
1502
1501
  },
1503
- [Et, kt, xr, Fr, rt, Ke, dt]
1504
- ), os = (l) => (g) => {
1502
+ [Et, kt, xr, Fr, rt, qe, dt]
1503
+ ), as = (l) => (g) => {
1505
1504
  if (i || dr()) return;
1506
1505
  g.stopPropagation(), g.preventDefault(), T(l);
1507
1506
  const v = p ? g.clientY : g.clientX;
1508
- $a(g.currentTarget, g.pointerId, l, v);
1509
- }, as = (l) => () => {
1507
+ Ia(g.currentTarget, g.pointerId, l, v);
1508
+ }, is = (l) => () => {
1510
1509
  i || st.current !== null || T(l);
1511
- }, oo = (l) => () => {
1510
+ }, ao = (l) => () => {
1512
1511
  i || ir.current !== null || kr(l);
1513
1512
  }, Kr = (l) => (g) => {
1514
1513
  if (i || dr()) return;
@@ -1516,56 +1515,56 @@ const ks = () => {
1516
1515
  const v = ht.current;
1517
1516
  if (!v) return;
1518
1517
  const D = Wr(g.clientX, g.clientY, v.getBoundingClientRect());
1519
- D !== null && ns(g.currentTarget, g.pointerId, l, D);
1520
- }, ac = (l) => {
1518
+ D !== null && os(g.currentTarget, g.pointerId, l, D);
1519
+ }, ic = (l) => {
1521
1520
  if (i || h || dr()) return;
1522
1521
  l.stopPropagation(), l.preventDefault();
1523
1522
  const g = p ? l.clientY : l.clientX;
1524
- $a(l.currentTarget, l.pointerId, "connect", g);
1525
- }, ic = (l) => {
1523
+ Ia(l.currentTarget, l.pointerId, "connect", g);
1524
+ }, sc = (l) => {
1526
1525
  if (i || dr()) return;
1527
1526
  if (L) {
1528
1527
  const J = ht.current;
1529
1528
  if (!J) return;
1530
1529
  const ge = J.getBoundingClientRect(), De = Wr(l.clientX, l.clientY, ge);
1531
1530
  if (De === null) return;
1532
- const Oe = p ? l.clientX - (ge.left + ge.width / 2) : l.clientY - (ge.top + ge.height / 2), he = jd(De, Oe, Et, kt, xr, Fr, k, void 0, !h, te ? "point" : "range");
1533
- ns(l.currentTarget, l.pointerId, he, De), Ea.current(l.nativeEvent);
1531
+ const Oe = p ? l.clientX - (ge.left + ge.width / 2) : l.clientY - (ge.top + ge.height / 2), he = Kd(De, Oe, Et, kt, xr, Fr, k, void 0, !h, te ? "point" : "range");
1532
+ os(l.currentTarget, l.pointerId, he, De), $a.current(l.nativeEvent);
1534
1533
  return;
1535
1534
  }
1536
- const g = Bi(l.clientX, l.clientY);
1535
+ const g = Wi(l.clientX, l.clientY);
1537
1536
  if (g === null) return;
1538
- const v = fa(g);
1537
+ const v = ga(g);
1539
1538
  let D = "low";
1540
1539
  if (!j) {
1541
1540
  const J = Math.abs(v - Me), ge = Math.abs(v - Ae);
1542
1541
  J < ge ? D = "low" : ge < J ? D = "high" : D = v > Ae ? "high" : "low";
1543
1542
  }
1544
1543
  T(D);
1545
- const [V, G] = Vs(D, v, Me, Ae, C, U, j);
1546
- Xe([V, G]), cr(V, G, !0);
1544
+ const [V, G] = ks(D, v, Me, Ae, C, U, j);
1545
+ Ze([V, G]), cr(V, G, !0);
1547
1546
  const Q = p ? l.clientY : l.clientX;
1548
- $a(l.currentTarget, l.pointerId, D, Q);
1549
- }, sc = (l) => {
1547
+ Ia(l.currentTarget, l.pointerId, D, Q);
1548
+ }, lc = (l) => {
1550
1549
  if (i || L || Ee !== null) return;
1551
- const g = Bi(l.clientX, l.clientY);
1550
+ const g = Wi(l.clientX, l.clientY);
1552
1551
  if (g === null) return;
1553
- const v = fa(g);
1554
- je(v), Ze(yr(v));
1555
- }, lc = () => {
1556
- je(null), Ze(null);
1557
- }, is = (l) => (g) => {
1552
+ const v = ga(g);
1553
+ Ue(v), Ke(yr(v));
1554
+ }, cc = () => {
1555
+ Ue(null), Ke(null);
1556
+ }, ss = (l) => (g) => {
1558
1557
  if (i || dr()) return;
1559
1558
  T(l);
1560
- const v = _d(g.key, l, Me, Ae, C, U, j, 1);
1559
+ const v = Yd(g.key, l, Me, Ae, C, U, j, 1);
1561
1560
  v && (g.preventDefault(), Pr(), ae || et(v), cr(v[0], v[1], !0));
1562
1561
  }, qr = (l, g, v) => {
1563
1562
  if (O === null) return;
1564
- const [D, V] = Yt(R, b, [l, g], r, n, m), G = z(b, D, m), Q = z(b, V, m), J = ue ? la(G, Q) : [], ge = Io(v, { kind: "range", min: G, max: Q }, z(b, O[0], m), z(b, O[1], m));
1563
+ const [D, V] = Yt(R, b, [l, g], r, n, m), G = z(b, D, m), Q = z(b, V, m), J = ue ? da(G, Q) : [], ge = Ao(v, { kind: "range", min: G, max: Q }, z(b, O[0], m), z(b, O[1], m));
1565
1564
  if (ge === null) return;
1566
1565
  const De = lr(le(b, ge[0], m), J, G, Q), Oe = Math.max(De, lr(le(b, ge[1], m), J, G, Q));
1567
1566
  Lt(le(b, De, m), le(b, Oe, m), !0);
1568
- }, ao = (l) => (g) => {
1567
+ }, io = (l) => (g) => {
1569
1568
  if (i || !L || e.mode !== "vernier" || dr()) return;
1570
1569
  kr(l);
1571
1570
  let v = 0, D = !1, V = !1;
@@ -1616,11 +1615,11 @@ const ks = () => {
1616
1615
  return;
1617
1616
  }
1618
1617
  let J;
1619
- if (D ? J = rt : V ? J = Ut : J = Math.max(rt, Math.min(Ut, ft + v)), J === ft) return;
1618
+ if (D ? J = rt : V ? J = zt : J = Math.max(rt, Math.min(zt, ft + v)), J === ft) return;
1620
1619
  const ge = le(R, J, m);
1621
1620
  Mr(G, ge, !0), qr(G, ge, "resize");
1622
1621
  } else if (l === "micro-low") {
1623
- const G = le(b, Ke, m), Q = le(b, dt, m);
1622
+ const G = le(b, qe, m), Q = le(b, dt, m);
1624
1623
  if (Vt) {
1625
1624
  const ge = yn(ve, b, G, ve[0], Q, v, D, V, m);
1626
1625
  if (ge === Pe(ve, G, b, m)) return;
@@ -1628,10 +1627,10 @@ const ks = () => {
1628
1627
  return;
1629
1628
  }
1630
1629
  let J;
1631
- if (D ? J = ze : V ? J = dt : J = Math.max(ze, Math.min(dt, Ke + v)), J === Ke) return;
1630
+ if (D ? J = Be : V ? J = dt : J = Math.max(Be, Math.min(dt, qe + v)), J === qe) return;
1632
1631
  Lt(le(b, J, m), Q, !0);
1633
1632
  } else if (l === "micro-high") {
1634
- const G = le(b, Ke, m), Q = le(b, dt, m);
1633
+ const G = le(b, qe, m), Q = le(b, dt, m);
1635
1634
  if (Vt) {
1636
1635
  const ge = yn(ve, b, Q, G, ve[ve.length - 1], v, D, V, m);
1637
1636
  if (ge === Pe(ve, Q, b, m)) return;
@@ -1639,21 +1638,21 @@ const ks = () => {
1639
1638
  return;
1640
1639
  }
1641
1640
  let J;
1642
- if (D ? J = Ke : V ? J = ct : J = Math.max(Ke, Math.min(ct, dt + v)), J === dt) return;
1641
+ if (D ? J = qe : V ? J = ct : J = Math.max(qe, Math.min(ct, dt + v)), J === dt) return;
1643
1642
  Lt(G, le(b, J, m), !0);
1644
1643
  } else if (l === "micro-point") {
1645
- const G = le(b, Ke, m);
1644
+ const G = le(b, qe, m);
1646
1645
  if (Vt) {
1647
1646
  const J = yn(ve, b, G, ve[0], ve[ve.length - 1], v, D, V, m);
1648
1647
  if (J === Pe(ve, G, b, m)) return;
1649
- Ni(ve[J], !0);
1648
+ Ci(ve[J], !0);
1650
1649
  return;
1651
1650
  }
1652
1651
  let Q;
1653
- if (D ? Q = ze : V ? Q = ct : Q = Math.max(ze, Math.min(ct, Ke + v)), Q === Ke) return;
1654
- Ni(le(b, Q, m), !0);
1652
+ if (D ? Q = Be : V ? Q = ct : Q = Math.max(Be, Math.min(ct, qe + v)), Q === qe) return;
1653
+ Ci(le(b, Q, m), !0);
1655
1654
  }
1656
- }, cc = (l) => {
1655
+ }, dc = (l) => {
1657
1656
  if (e.mode !== "vernier") return;
1658
1657
  if (Pr(), sr) {
1659
1658
  const Q = Ce.length - 1, J = Pe(Ce, Dr, R, m), ge = Pe(Ce, Rr, R, m), De = ge - J;
@@ -1665,10 +1664,10 @@ const ks = () => {
1665
1664
  }
1666
1665
  const g = ft - rt;
1667
1666
  let v = rt + l, D = ft + l;
1668
- if (l < 0 && v < xt ? (v = xt, D = Math.min(Ut, v + g)) : l > 0 && D > Ut && (D = Ut, v = Math.max(xt, D - g)), v === rt && D === ft) return;
1667
+ if (l < 0 && v < xt ? (v = xt, D = Math.min(zt, v + g)) : l > 0 && D > zt && (D = zt, v = Math.max(xt, D - g)), v === rt && D === ft) return;
1669
1668
  const V = le(R, v, m), G = le(R, D, m);
1670
1669
  Mr(V, G, !0), qr(V, G, "pan");
1671
- }, Ta = A(
1670
+ }, Aa = A(
1672
1671
  (l) => {
1673
1672
  const g = X.current;
1674
1673
  if (!(g.disabled || dr()))
@@ -1678,11 +1677,11 @@ const ks = () => {
1678
1677
  } else if (g.mode === "vernier") {
1679
1678
  if (Vt) {
1680
1679
  const De = ve.length - 1, Oe = Pe(ve, Yr, b, m), he = Pe(ve, Hr, b, m), _t = he - Oe;
1681
- let nt = Oe + l, qe = he + l;
1682
- l < 0 && nt < 0 ? (nt = 0, qe = Math.min(De, _t)) : l > 0 && qe > De && (qe = De, nt = Math.max(0, De - _t)), (nt !== Oe || qe !== he) && Lt(ve[nt], ve[qe], !0);
1680
+ let nt = Oe + l, Xe = he + l;
1681
+ l < 0 && nt < 0 ? (nt = 0, Xe = Math.min(De, _t)) : l > 0 && Xe > De && (Xe = De, nt = Math.max(0, De - _t)), (nt !== Oe || Xe !== he) && Lt(ve[nt], ve[Xe], !0);
1683
1682
  return;
1684
1683
  }
1685
- const v = Ke, D = dt, V = ze, G = ct, Q = D - v;
1684
+ const v = qe, D = dt, V = Be, G = ct, Q = D - v;
1686
1685
  let J = v + l, ge = D + l;
1687
1686
  l < 0 && J < V ? (J = V, ge = Math.min(G, J + Q)) : l > 0 && ge > G && (ge = G, J = Math.max(V, ge - Q)), (J !== v || ge !== D) && Lt(le(b, J, m), le(b, ge, m), !0);
1688
1687
  } else {
@@ -1699,9 +1698,9 @@ const ks = () => {
1699
1698
  ae,
1700
1699
  cr,
1701
1700
  Lt,
1702
- Ke,
1701
+ qe,
1703
1702
  dt,
1704
- ze,
1703
+ Be,
1705
1704
  ct,
1706
1705
  b,
1707
1706
  Vt,
@@ -1711,32 +1710,32 @@ const ks = () => {
1711
1710
  Pr,
1712
1711
  m
1713
1712
  ]
1714
- ), ss = (l) => !i && ka(hn.current, l), ls = (l, g) => {
1715
- const v = Ci.current, D = ht.current, V = hn.current;
1716
- if (i || v === null || D === null || V === null || !hd(v, V, Oi.current, p, l, g)) return null;
1713
+ ), ls = (l) => !i && Ya(hn.current, l), cs = (l, g) => {
1714
+ const v = Oi.current, D = ht.current, V = hn.current;
1715
+ if (i || v === null || D === null || V === null || !gd(v, V, Vi.current, p, l, g)) return null;
1717
1716
  const G = D.getBoundingClientRect();
1718
1717
  return Math.abs(p ? l - (G.left + G.width / 2) : g - (G.top + G.height / 2));
1719
- }, cs = (l) => {
1718
+ }, ds = (l) => {
1720
1719
  if (i || dr()) return;
1721
- const g = Gd(l.deltaX, l.deltaY, p);
1720
+ const g = jd(l.deltaX, l.deltaY, p);
1722
1721
  if (g === 0) return;
1723
1722
  l.preventDefault();
1724
- const v = l.target, D = ka(Vi.current, v) || ka(ki.current, v);
1723
+ const v = l.target, D = Ya(ki.current, v) || Ya(_i.current, v);
1725
1724
  if (!L || D) {
1726
- Ta(g);
1725
+ Aa(g);
1727
1726
  return;
1728
1727
  }
1729
1728
  const V = ht.current;
1730
1729
  if (!V) return;
1731
1730
  const G = V.getBoundingClientRect(), Q = p ? l.clientX - (G.left + G.width / 2) : l.clientY - (G.top + G.height / 2);
1732
- if ($l(Q, k) === "macro") {
1733
- cc(g);
1731
+ if (Tl(Q, k) === "macro") {
1732
+ dc(g);
1734
1733
  return;
1735
1734
  }
1736
- Ta(g);
1737
- }, io = de({ ownsWheelHit: ss, distanceToRailPx: ls, stepFromRangeAreaWheel: cs });
1735
+ Aa(g);
1736
+ }, so = de({ ownsWheelHit: ls, distanceToRailPx: cs, stepFromRangeAreaWheel: ds });
1738
1737
  at(() => {
1739
- io.current = { ownsWheelHit: ss, distanceToRailPx: ls, stepFromRangeAreaWheel: cs };
1738
+ so.current = { ownsWheelHit: ls, distanceToRailPx: cs, stepFromRangeAreaWheel: ds };
1740
1739
  });
1741
1740
  const vn = de(null);
1742
1741
  $t(() => {
@@ -1746,10 +1745,10 @@ const ks = () => {
1746
1745
  vn.current = null;
1747
1746
  return;
1748
1747
  }
1749
- const v = pd(l, {
1750
- ownsHit: (D) => io.current.ownsWheelHit(D),
1751
- distanceToRailPx: (D, V) => io.current.distanceToRailPx(D, V),
1752
- step: (D) => io.current.stepFromRangeAreaWheel(D)
1748
+ const v = wd(l, {
1749
+ ownsHit: (D) => so.current.ownsWheelHit(D),
1750
+ distanceToRailPx: (D, V) => so.current.distanceToRailPx(D, V),
1751
+ step: (D) => so.current.stepFromRangeAreaWheel(D)
1753
1752
  });
1754
1753
  vn.current = { view: l, unregister: v };
1755
1754
  }), $t(
@@ -1758,13 +1757,13 @@ const ks = () => {
1758
1757
  },
1759
1758
  []
1760
1759
  );
1761
- const so = yr(Me), lo = yr(Ae), Ia = pe(Me), Aa = pe(Ae), Xr = Ws(so, lo, Da), ur = Xr.slant, Sn = Ee === "low" || Ee !== "high" && qt === "low", Dn = !j && (Ee === "high" || Ee !== "low" && qt === "high"), dc = ba && tt !== "macro-low", uc = ba && tt === "macro-low", mc = va && tt !== "micro-low", fc = va && tt === "micro-low", Mt = Fa("macro", Et, kt, Ma), yt = Fa("micro", xr, Fr, ya), ds = Xr.slant.isSlanted || Mt.slant.isSlanted || yt.slant.isSlanted;
1760
+ const lo = yr(Me), co = yr(Ae), Na = pe(Me), Ca = pe(Ae), Xr = Gs(lo, co, xa), ur = Xr.slant, Sn = Ee === "low" || Ee !== "high" && Ut === "low", Dn = !j && (Ee === "high" || Ee !== "low" && Ut === "high"), uc = Sa && tt !== "macro-low", mc = Sa && tt === "macro-low", fc = Da && tt !== "micro-low", hc = Da && tt === "micro-low", Mt = za("macro", Et, kt, Pa), yt = za("micro", xr, Fr, Ea), us = Xr.slant.isSlanted || Mt.slant.isSlanted || yt.slant.isSlanted;
1762
1761
  at(() => {
1763
- ds && pn();
1762
+ us && pn();
1764
1763
  });
1765
- const us = ds || La;
1764
+ const ms = us || Ta;
1766
1765
  $t(() => {
1767
- if (!us) return;
1766
+ if (!ms) return;
1768
1767
  const l = ht.current, g = l === null ? null : l.ownerDocument.defaultView;
1769
1768
  if (l === null || g === null) return;
1770
1769
  const v = l.ownerDocument;
@@ -1781,57 +1780,57 @@ const ks = () => {
1781
1780
  return () => {
1782
1781
  v.removeEventListener("scroll", V, { capture: !0 }), g.removeEventListener("resize", V), G?.disconnect(), D !== null && g.cancelAnimationFrame(D);
1783
1782
  };
1784
- }, [us, me, q, pn]);
1785
- const hc = Math.min(so, lo), gc = Math.max(so, lo), [ms, fs] = An.flat, [pc, wc] = An.macro, [bc, vc] = An.micro, hs = fr(ms, so), gs = fr(fs, lo), Na = fr(ms, hc), ps = `calc(${fr(fs, gc)} - ${Na})`, Zr = fr(pc, Et * 100), co = fr(wc, kt * 100), Qr = fr(bc, xr * 100), uo = fr(vc, Fr * 100), Sc = p ? {
1786
- bottom: Na,
1787
- height: ps,
1783
+ }, [ms, me, q, pn]);
1784
+ const gc = Math.min(lo, co), pc = Math.max(lo, co), [fs, hs] = An.flat, [wc, bc] = An.macro, [vc, Sc] = An.micro, gs = fr(fs, lo), ps = fr(hs, co), Oa = fr(fs, gc), ws = `calc(${fr(hs, pc)} - ${Oa})`, Zr = fr(wc, Et * 100), uo = fr(bc, kt * 100), Qr = fr(vc, xr * 100), mo = fr(Sc, Fr * 100), Dc = p ? {
1785
+ bottom: Oa,
1786
+ height: ws,
1788
1787
  top: "auto",
1789
1788
  left: "0",
1790
1789
  right: "0"
1791
1790
  } : {
1792
- left: Na,
1793
- width: ps,
1791
+ left: Oa,
1792
+ width: ws,
1794
1793
  top: "0",
1795
1794
  bottom: "0"
1796
- }, Dc = Math.max(0.01, kt - Et), ws = Math.max(0.06, Math.min(0.25, 0.28 * Math.sqrt(Dc))), Rc = p ? { bottom: hs, left: "50%", transform: "translate(-50%, 50%)", zIndex: Sn ? 40 : 30 } : { left: hs, top: "50%", transform: "translate(-50%, -50%)", zIndex: Sn ? 40 : 30 }, xc = p ? { bottom: gs, left: "50%", transform: "translate(-50%, 50%)", zIndex: Dn ? 40 : 30 } : { left: gs, top: "50%", transform: "translate(-50%, -50%)", zIndex: Dn ? 40 : 30 }, Mc = p ? { bottom: `${mt}%`, left: "50%", transform: "translate(-50%, 50%)" } : { left: `${mt}%`, top: "50%", transform: "translate(-50%, -50%)" }, bs = ee !== null ? pe(ee) : null, yc = d !== "hover" && ee !== null && (ee === Me || !j && ee === Ae), Pc = L ? Ke > $i : Me > C, Ec = L ? dt < ca : Ae < U, Lc = P !== Mt.slant.isFlipped ? "before" : "after", $c = P === yt.slant.isFlipped ? "before" : "after", mo = iu(
1795
+ }, Rc = Math.max(0.01, kt - Et), bs = Math.max(0.06, Math.min(0.25, 0.28 * Math.sqrt(Rc))), xc = p ? { bottom: gs, left: "50%", transform: "translate(-50%, 50%)", zIndex: Sn ? 40 : 30 } : { left: gs, top: "50%", transform: "translate(-50%, -50%)", zIndex: Sn ? 40 : 30 }, Mc = p ? { bottom: ps, left: "50%", transform: "translate(-50%, 50%)", zIndex: Dn ? 40 : 30 } : { left: ps, top: "50%", transform: "translate(-50%, -50%)", zIndex: Dn ? 40 : 30 }, yc = p ? { bottom: `${mt}%`, left: "50%", transform: "translate(-50%, 50%)" } : { left: `${mt}%`, top: "50%", transform: "translate(-50%, -50%)" }, vs = ee !== null ? pe(ee) : null, Pc = d !== "hover" && ee !== null && (ee === Me || !j && ee === Ae), Ec = L ? qe > Ti : Me > C, Lc = L ? dt < ua : Ae < U, $c = P !== Mt.slant.isFlipped ? "before" : "after", Tc = P === yt.slant.isFlipped ? "before" : "after", fo = su(
1797
1796
  L ? [
1798
1797
  {
1799
- side: Lc,
1800
- box: Ra,
1798
+ side: $c,
1799
+ box: Ma,
1801
1800
  ...p ? { reach: "inline-size" } : { reach: "rotated", angleDeg: Mt.slant.lowAngleDeg, centreFromAnchorPx: Mt.centreFromAnchorPx, alongPushPx: Mt.slant.lowOffsetX }
1802
1801
  },
1803
1802
  {
1804
- side: $c,
1805
- box: xa,
1803
+ side: Tc,
1804
+ box: ya,
1806
1805
  ...p ? { reach: "inline-size" } : { reach: "rotated", angleDeg: yt.slant.lowAngleDeg, centreFromAnchorPx: yt.centreFromAnchorPx, alongPushPx: yt.slant.lowOffsetX }
1807
1806
  }
1808
1807
  ] : [
1809
1808
  {
1810
1809
  // 縦向きのラベルは labelPosition に関わらずスタイルシートが左へ置く
1811
1810
  side: p || u === "top" !== ur.isFlipped ? "before" : "after",
1812
- box: j ? ro : No(ro, Yi),
1811
+ box: j ? no : Co(no, Hi),
1813
1812
  // 平レールの基準線は中心線そのものであり、ラベルの中心のずれがそのまま基準線からの距離になる
1814
1813
  ...p ? { reach: "inline-size" } : { reach: "rotated", angleDeg: ur.lowAngleDeg, centreFromAnchorPx: Math.abs(ur.lowOffsetY), alongPushPx: ur.lowOffsetX }
1815
1814
  }
1816
1815
  ]
1817
- ), Tc = mo === void 0 ? e.style : { ...e.style, ...mo.style };
1816
+ ), Ic = fo === void 0 ? e.style : { ...e.style, ...fo.style };
1818
1817
  at(() => {
1819
- Oi.current = mo === void 0 ? 0 : mo.mainPx;
1818
+ Vi.current = fo === void 0 ? 0 : fo.mainPx;
1820
1819
  });
1821
- const Bt = te ? "micro-point" : "micro-low", Er = i ? "cursor-not-allowed opacity-50" : "cursor-pointer", Jr = (l) => d === "hover" || !$ || l === void 0 ? null : /* @__PURE__ */ K("span", { "data-label-leader": "true", "aria-hidden": "true", className: "period-slider-label-leader", style: l }), vs = (l) => {
1820
+ const Wt = te ? "micro-point" : "micro-low", Er = i ? "cursor-not-allowed opacity-50" : "cursor-pointer", Jr = (l) => d === "hover" || !$ || l === void 0 ? null : /* @__PURE__ */ K("span", { "data-label-leader": "true", "aria-hidden": "true", className: "period-slider-label-leader", style: l }), Ss = (l) => {
1822
1821
  const g = p ? "vertical" : "horizontal", v = l === "decrease", D = p ? !v : v;
1823
1822
  return /* @__PURE__ */ K(
1824
1823
  Cr,
1825
1824
  {
1826
- ref: v ? Vi : ki,
1825
+ ref: v ? ki : _i,
1827
1826
  neighbour: "rail",
1828
- direction: lu[g][l],
1827
+ direction: cu[g][l],
1829
1828
  glyph: "single",
1830
1829
  disabled: i,
1831
- canStep: v ? Pc : Ec,
1832
- onStep: () => Ta(v ? -1 : 1),
1830
+ canStep: v ? Ec : Lc,
1831
+ onStep: () => Aa(v ? -1 : 1),
1833
1832
  ariaLabel: v ? W.decrease : W.increase,
1834
- className: `period-slider-stepper-btn ${cu[g][l]} ${js[g][D ? "leading" : "trailing"]}`
1833
+ className: `period-slider-stepper-btn ${du[g][l]} ${Ks[g][D ? "leading" : "trailing"]}`
1835
1834
  }
1836
1835
  );
1837
1836
  };
@@ -1839,8 +1838,8 @@ const ks = () => {
1839
1838
  "div",
1840
1839
  {
1841
1840
  ref: hn,
1842
- style: Tc,
1843
- className: `period-slider grid select-none place-items-center ${du[p ? "vertical" : "horizontal"][c ? "withSteppers" : "railOnly"]} ${s}`,
1841
+ style: Ic,
1842
+ className: `period-slider grid select-none place-items-center ${uu[p ? "vertical" : "horizontal"][c ? "withSteppers" : "railOnly"]} ${s}`,
1844
1843
  "data-disabled": i ? "true" : void 0,
1845
1844
  "data-unit": t,
1846
1845
  "data-mode": e.mode,
@@ -1848,8 +1847,8 @@ const ks = () => {
1848
1847
  "data-label-position": u,
1849
1848
  "data-color-scheme": f,
1850
1849
  children: [
1851
- /* @__PURE__ */ K("div", { ref: Ci, "data-range-area": "true", "aria-hidden": "true", className: "period-slider-range-area" }),
1852
- c && vs(p ? "increase" : "decrease"),
1850
+ /* @__PURE__ */ K("div", { ref: Oi, "data-range-area": "true", "aria-hidden": "true", className: "period-slider-range-area" }),
1851
+ c && Ss(p ? "increase" : "decrease"),
1853
1852
  /* @__PURE__ */ K(
1854
1853
  "div",
1855
1854
  {
@@ -1857,25 +1856,25 @@ const ks = () => {
1857
1856
  "data-testid": "period-slider-track",
1858
1857
  "data-orientation": p ? "vertical" : "horizontal",
1859
1858
  "data-vernier-orientation": L ? k : void 0,
1860
- className: `period-slider-track relative touch-none rounded-full ${js[p ? "vertical" : "horizontal"][c ? "rail" : "railOnly"]} ${Er}`,
1861
- onPointerDown: ic,
1862
- onPointerMove: sc,
1863
- onPointerLeave: lc,
1864
- children: L ? /* @__PURE__ */ $e(Po, { children: [
1859
+ className: `period-slider-track relative touch-none rounded-full ${Ks[p ? "vertical" : "horizontal"][c ? "rail" : "railOnly"]} ${Er}`,
1860
+ onPointerDown: sc,
1861
+ onPointerMove: lc,
1862
+ onPointerLeave: cc,
1863
+ children: L ? /* @__PURE__ */ $e(Eo, { children: [
1865
1864
  xe && (p ? /* @__PURE__ */ $e("svg", { className: "period-slider-vernier-projection is-vertical", role: "presentation", "aria-hidden": "true", width: "32", height: "100%", viewBox: "0 0 32 100", preserveAspectRatio: "none", children: [
1866
1865
  /* @__PURE__ */ K("defs", { children: /* @__PURE__ */ $e("linearGradient", { id: N, x1: "0", y1: "0", x2: "1", y2: "0", children: [
1867
1866
  /* @__PURE__ */ K("stop", { offset: "0%", stopColor: P ? oe.macro : oe.micro, stopOpacity: "0.28" }),
1868
- /* @__PURE__ */ K("stop", { offset: "100%", stopColor: P ? oe.micro : oe.macro, stopOpacity: ws })
1867
+ /* @__PURE__ */ K("stop", { offset: "100%", stopColor: P ? oe.micro : oe.macro, stopOpacity: bs })
1869
1868
  ] }) }),
1870
- /* @__PURE__ */ K("path", { ref: ha, "data-testid": "period-slider-vernier-projection", d: Va(Et, kt, p, P), fill: `url(#${N})` })
1869
+ /* @__PURE__ */ K("path", { ref: pa, "data-testid": "period-slider-vernier-projection", d: _a(Et, kt, p, P), fill: `url(#${N})` })
1871
1870
  ] }) : /* @__PURE__ */ $e("svg", { className: "period-slider-vernier-projection", role: "presentation", "aria-hidden": "true", width: "100%", height: "32", viewBox: "0 0 100 32", preserveAspectRatio: "none", children: [
1872
1871
  /* @__PURE__ */ K("defs", { children: /* @__PURE__ */ $e("linearGradient", { id: N, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1873
1872
  /* @__PURE__ */ K("stop", { offset: "0%", stopColor: P ? oe.macro : oe.micro, stopOpacity: "0.28" }),
1874
- /* @__PURE__ */ K("stop", { offset: "100%", stopColor: P ? oe.micro : oe.macro, stopOpacity: ws })
1873
+ /* @__PURE__ */ K("stop", { offset: "100%", stopColor: P ? oe.micro : oe.macro, stopOpacity: bs })
1875
1874
  ] }) }),
1876
- /* @__PURE__ */ K("path", { ref: ha, "data-testid": "period-slider-vernier-projection", d: Va(Et, kt, p, P), fill: `url(#${N})` })
1875
+ /* @__PURE__ */ K("path", { ref: pa, "data-testid": "period-slider-vernier-projection", d: _a(Et, kt, p, P), fill: `url(#${N})` })
1877
1876
  ] })),
1878
- !h && /* @__PURE__ */ $e(Po, { children: [
1877
+ !h && /* @__PURE__ */ $e(Eo, { children: [
1879
1878
  /* @__PURE__ */ K(
1880
1879
  "div",
1881
1880
  {
@@ -1883,10 +1882,10 @@ const ks = () => {
1883
1882
  className: "period-slider-connect-macro",
1884
1883
  style: p ? {
1885
1884
  bottom: `calc(${Zr} - 8px)`,
1886
- height: `calc(${co} - ${Zr} + 16px)`
1885
+ height: `calc(${uo} - ${Zr} + 16px)`
1887
1886
  } : {
1888
1887
  left: `calc(${Zr} - 8px)`,
1889
- width: `calc(${co} - ${Zr} + 16px)`
1888
+ width: `calc(${uo} - ${Zr} + 16px)`
1890
1889
  },
1891
1890
  onPointerDown: Kr("macro-connect")
1892
1891
  }
@@ -1898,10 +1897,10 @@ const ks = () => {
1898
1897
  className: "period-slider-connect-micro",
1899
1898
  style: p ? {
1900
1899
  bottom: `calc(${Qr} - 8px)`,
1901
- height: `calc(${uo} - ${Qr} + 16px)`
1900
+ height: `calc(${mo} - ${Qr} + 16px)`
1902
1901
  } : {
1903
1902
  left: `calc(${Qr} - 8px)`,
1904
- width: `calc(${uo} - ${Qr} + 16px)`
1903
+ width: `calc(${mo} - ${Qr} + 16px)`
1905
1904
  },
1906
1905
  onPointerDown: Kr("micro-connect")
1907
1906
  }
@@ -1918,7 +1917,7 @@ const ks = () => {
1918
1917
  role: "slider",
1919
1918
  "aria-label": W.macroRangeStart,
1920
1919
  "aria-disabled": i ? "true" : void 0,
1921
- "aria-valuemin": Fl,
1920
+ "aria-valuemin": Ul,
1922
1921
  "aria-valuemax": ft,
1923
1922
  "aria-valuenow": rt,
1924
1923
  "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Dr, R, "period") : en(R, Dr, Ye, x),
@@ -1938,8 +1937,8 @@ const ks = () => {
1938
1937
  zIndex: lt === "macro-low" || tt === "macro-low" ? 30 : 15
1939
1938
  },
1940
1939
  onPointerDown: Kr("macro-low"),
1941
- onKeyDown: ao("macro-low"),
1942
- onFocus: oo("macro-low"),
1940
+ onKeyDown: io("macro-low"),
1941
+ onFocus: ao("macro-low"),
1943
1942
  "data-active": lt === "macro-low" ? "true" : void 0,
1944
1943
  "data-front": tt === "macro-low" ? "true" : void 0,
1945
1944
  "data-vernier-pos": p ? P ? "left" : "right" : P ? "top" : "bottom",
@@ -1952,10 +1951,10 @@ const ks = () => {
1952
1951
  {
1953
1952
  className: `period-slider-tooltip absolute whitespace-nowrap font-medium shadow-md ${d === "balloon" ? "period-slider-tooltip-balloon" : ""}`,
1954
1953
  "data-tooltip-style": d,
1955
- "data-duplicate": dc ? "true" : void 0,
1954
+ "data-duplicate": uc ? "true" : void 0,
1956
1955
  "data-slanted": Mt.slant.isSlanted ? "true" : void 0,
1957
1956
  "data-flipped": Mt.slant.isFlipped ? "true" : void 0,
1958
- ref: Wl,
1957
+ ref: Gl,
1959
1958
  style: Mt.lowStyle,
1960
1959
  children: gt(R, Dr, Ye, x)
1961
1960
  }
@@ -1972,27 +1971,27 @@ const ks = () => {
1972
1971
  "aria-label": W.macroRangeEnd,
1973
1972
  "aria-disabled": i ? "true" : void 0,
1974
1973
  "aria-valuemin": rt,
1975
- "aria-valuemax": Ul,
1974
+ "aria-valuemax": zl,
1976
1975
  "aria-valuenow": ft,
1977
1976
  "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Rr, R, "period") : en(R, Rr, Ye, x),
1978
1977
  "aria-orientation": p ? "vertical" : "horizontal",
1979
1978
  className: `period-slider-handle period-slider-handle-vernier ${p ? "is-vertical" : ""} group absolute touch-none ${p ? P ? "after:absolute after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:right-0 after:-left-4" : "after:absolute after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:-right-4 after:left-0" : P ? "after:absolute after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:-top-4 after:bottom-0" : "after:absolute after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:top-0 after:-bottom-4"} after:content-[''] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 dark:focus-visible:ring-blue-400 ${Er}`,
1980
1979
  style: p ? {
1981
- bottom: co,
1980
+ bottom: uo,
1982
1981
  left: P ? 0 : "auto",
1983
1982
  right: P ? "auto" : 0,
1984
1983
  transform: P ? "translate(-100%, 50%)" : "translate(100%, 50%)",
1985
1984
  zIndex: lt === "macro-high" || tt === "macro-high" ? 30 : 15
1986
1985
  } : {
1987
- left: co,
1986
+ left: uo,
1988
1987
  top: P ? 0 : "auto",
1989
1988
  bottom: P ? "auto" : 0,
1990
1989
  transform: P ? "translate(-50%, -100%)" : "translate(-50%, 100%)",
1991
1990
  zIndex: lt === "macro-high" || tt === "macro-high" ? 30 : 15
1992
1991
  },
1993
1992
  onPointerDown: Kr("macro-high"),
1994
- onKeyDown: ao("macro-high"),
1995
- onFocus: oo("macro-high"),
1993
+ onKeyDown: io("macro-high"),
1994
+ onFocus: ao("macro-high"),
1996
1995
  "data-active": lt === "macro-high" ? "true" : void 0,
1997
1996
  "data-front": tt === "macro-high" ? "true" : void 0,
1998
1997
  "data-vernier-pos": p ? P ? "left" : "right" : P ? "top" : "bottom",
@@ -2005,10 +2004,10 @@ const ks = () => {
2005
2004
  {
2006
2005
  className: `period-slider-tooltip absolute whitespace-nowrap font-medium shadow-md ${d === "balloon" ? "period-slider-tooltip-balloon" : ""}`,
2007
2006
  "data-tooltip-style": d,
2008
- "data-duplicate": uc ? "true" : void 0,
2007
+ "data-duplicate": mc ? "true" : void 0,
2009
2008
  "data-slanted": Mt.slant.isSlanted ? "true" : void 0,
2010
2009
  "data-flipped": Mt.slant.isFlipped ? "true" : void 0,
2011
- ref: jl,
2010
+ ref: Kl,
2012
2011
  style: Mt.highStyle,
2013
2012
  children: gt(R, Rr, Ye, x)
2014
2013
  }
@@ -2024,10 +2023,10 @@ const ks = () => {
2024
2023
  role: "slider",
2025
2024
  "aria-label": te ? W.microSelectedDate : W.microRangeStart,
2026
2025
  "aria-disabled": i ? "true" : void 0,
2027
- "aria-valuemin": $i,
2028
- "aria-valuemax": te ? ca : dt,
2029
- "aria-valuenow": Ke,
2030
- "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Yr, b, "period") : en(b, Yr, Ue, x),
2026
+ "aria-valuemin": Ti,
2027
+ "aria-valuemax": te ? ua : dt,
2028
+ "aria-valuenow": qe,
2029
+ "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Yr, b, "period") : en(b, Yr, ze, x),
2031
2030
  "aria-orientation": p ? "vertical" : "horizontal",
2032
2031
  className: `period-slider-handle period-slider-handle-vernier ${p ? "is-vertical" : ""} group absolute touch-none ${p ? P ? "after:absolute after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:-right-4 after:left-0" : "after:absolute after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:right-0 after:-left-4" : P ? "after:absolute after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:top-0 after:-bottom-4" : "after:absolute after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:-top-4 after:bottom-0"} after:content-[''] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 dark:focus-visible:ring-blue-400 ${Er}`,
2033
2032
  style: p ? {
@@ -2035,21 +2034,21 @@ const ks = () => {
2035
2034
  left: P ? "auto" : 0,
2036
2035
  right: P ? 0 : "auto",
2037
2036
  transform: P ? "translate(100%, 50%)" : "translate(-100%, 50%)",
2038
- zIndex: lt === Bt || tt === Bt ? 30 : 20
2037
+ zIndex: lt === Wt || tt === Wt ? 30 : 20
2039
2038
  } : {
2040
2039
  left: Qr,
2041
2040
  top: P ? "auto" : 0,
2042
2041
  bottom: P ? 0 : "auto",
2043
2042
  transform: P ? "translate(-50%, 100%)" : "translate(-50%, -100%)",
2044
- zIndex: lt === Bt || tt === Bt ? 30 : 20
2043
+ zIndex: lt === Wt || tt === Wt ? 30 : 20
2045
2044
  },
2046
- onPointerDown: Kr(Bt),
2047
- onKeyDown: ao(Bt),
2048
- onFocus: oo(Bt),
2049
- "data-active": lt === Bt ? "true" : void 0,
2050
- "data-front": tt === Bt ? "true" : void 0,
2045
+ onPointerDown: Kr(Wt),
2046
+ onKeyDown: io(Wt),
2047
+ onFocus: ao(Wt),
2048
+ "data-active": lt === Wt ? "true" : void 0,
2049
+ "data-front": tt === Wt ? "true" : void 0,
2051
2050
  "data-vernier-pos": p ? P ? "right" : "left" : P ? "bottom" : "top",
2052
- "data-handle-type": Bt,
2051
+ "data-handle-type": Wt,
2053
2052
  children: [
2054
2053
  /* @__PURE__ */ K(In, { type: "micro", isTop: !P, isVertical: p, isLeft: !P }),
2055
2054
  y && /* @__PURE__ */ K("div", { "data-testid": "period-slider-hairline", className: "period-slider-hairline" }),
@@ -2058,12 +2057,12 @@ const ks = () => {
2058
2057
  {
2059
2058
  className: `period-slider-tooltip absolute whitespace-nowrap font-medium shadow-md ${d === "balloon" ? "period-slider-tooltip-balloon" : ""}`,
2060
2059
  "data-tooltip-style": d,
2061
- "data-duplicate": mc ? "true" : void 0,
2060
+ "data-duplicate": fc ? "true" : void 0,
2062
2061
  "data-slanted": yt.slant.isSlanted ? "true" : void 0,
2063
2062
  "data-flipped": yt.slant.isFlipped ? "true" : void 0,
2064
- ref: ql,
2063
+ ref: Xl,
2065
2064
  style: yt.lowStyle,
2066
- children: gt(b, Yr, Ue, x)
2065
+ children: gt(b, Yr, ze, x)
2067
2066
  }
2068
2067
  ),
2069
2068
  Jr(yt.lowLeaderStyle)
@@ -2077,28 +2076,28 @@ const ks = () => {
2077
2076
  role: "slider",
2078
2077
  "aria-label": W.microRangeEnd,
2079
2078
  "aria-disabled": i ? "true" : void 0,
2080
- "aria-valuemin": Ke,
2081
- "aria-valuemax": ca,
2079
+ "aria-valuemin": qe,
2080
+ "aria-valuemax": ua,
2082
2081
  "aria-valuenow": dt,
2083
- "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Hr, b, "period") : en(b, Hr, Ue, x),
2082
+ "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Hr, b, "period") : en(b, Hr, ze, x),
2084
2083
  "aria-orientation": p ? "vertical" : "horizontal",
2085
2084
  className: `period-slider-handle period-slider-handle-vernier ${p ? "is-vertical" : ""} group absolute touch-none ${p ? P ? "after:absolute after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:-right-4 after:left-0" : "after:absolute after:inset-y-[calc((100%-var(--ps-target-size))/2)] after:right-0 after:-left-4" : P ? "after:absolute after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:top-0 after:-bottom-4" : "after:absolute after:inset-x-[calc((100%-var(--ps-target-size))/2)] after:-top-4 after:bottom-0"} after:content-[''] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 dark:focus-visible:ring-blue-400 ${Er}`,
2086
2085
  style: p ? {
2087
- bottom: uo,
2086
+ bottom: mo,
2088
2087
  left: P ? "auto" : 0,
2089
2088
  right: P ? 0 : "auto",
2090
2089
  transform: P ? "translate(100%, 50%)" : "translate(-100%, 50%)",
2091
2090
  zIndex: lt === "micro-high" || tt === "micro-high" ? 30 : 20
2092
2091
  } : {
2093
- left: uo,
2092
+ left: mo,
2094
2093
  top: P ? "auto" : 0,
2095
2094
  bottom: P ? 0 : "auto",
2096
2095
  transform: P ? "translate(-50%, 100%)" : "translate(-50%, -100%)",
2097
2096
  zIndex: lt === "micro-high" || tt === "micro-high" ? 30 : 20
2098
2097
  },
2099
2098
  onPointerDown: Kr("micro-high"),
2100
- onKeyDown: ao("micro-high"),
2101
- onFocus: oo("micro-high"),
2099
+ onKeyDown: io("micro-high"),
2100
+ onFocus: ao("micro-high"),
2102
2101
  "data-active": lt === "micro-high" ? "true" : void 0,
2103
2102
  "data-front": tt === "micro-high" ? "true" : void 0,
2104
2103
  "data-vernier-pos": p ? P ? "right" : "left" : P ? "bottom" : "top",
@@ -2111,33 +2110,33 @@ const ks = () => {
2111
2110
  {
2112
2111
  className: `period-slider-tooltip absolute whitespace-nowrap font-medium shadow-md ${d === "balloon" ? "period-slider-tooltip-balloon" : ""}`,
2113
2112
  "data-tooltip-style": d,
2114
- "data-duplicate": fc ? "true" : void 0,
2113
+ "data-duplicate": hc ? "true" : void 0,
2115
2114
  "data-slanted": yt.slant.isSlanted ? "true" : void 0,
2116
2115
  "data-flipped": yt.slant.isFlipped ? "true" : void 0,
2117
- ref: Xl,
2116
+ ref: Zl,
2118
2117
  style: yt.highStyle,
2119
- children: gt(b, Hr, Ue, x)
2118
+ children: gt(b, Hr, ze, x)
2120
2119
  }
2121
2120
  ),
2122
2121
  Jr(yt.highLeaderStyle)
2123
2122
  ]
2124
2123
  }
2125
2124
  )
2126
- ] }) : /* @__PURE__ */ $e(Po, { children: [
2127
- !h && /* @__PURE__ */ K("div", { "data-testid": "period-slider-connect", className: "period-slider-connect absolute rounded-full", style: Sc, onPointerDown: ac }),
2125
+ ] }) : /* @__PURE__ */ $e(Eo, { children: [
2126
+ !h && /* @__PURE__ */ K("div", { "data-testid": "period-slider-connect", className: "period-slider-connect absolute rounded-full", style: Dc, onPointerDown: ic }),
2128
2127
  w && _ && H.length > 1 && /* @__PURE__ */ K("div", { className: "period-slider-ticks pointer-events-none absolute inset-0", children: H.map((l, g) => {
2129
2128
  const v = z(t, l, m), D = yr(g), V = p ? { bottom: `${D}%`, left: "50%", transform: "translate(-50%, 50%)" } : { left: `${D}%`, top: "50%", transform: "translate(-50%, -50%)" };
2130
2129
  return /* @__PURE__ */ K("div", { "data-testid": "period-slider-tick", className: "period-slider-tick absolute h-1.5 w-1.5 rounded-full", style: V }, `tick-${v}`);
2131
2130
  }) }),
2132
- !i && ee !== null && mt !== null && Ee === null && bs && /* @__PURE__ */ $e("div", { "data-testid": "period-slider-hover-guide", className: "period-slider-hover-guide pointer-events-none absolute h-2 w-2", style: Mc, children: [
2131
+ !i && ee !== null && mt !== null && Ee === null && vs && /* @__PURE__ */ $e("div", { "data-testid": "period-slider-hover-guide", className: "period-slider-hover-guide pointer-events-none absolute h-2 w-2", style: yc, children: [
2133
2132
  /* @__PURE__ */ K("div", { "data-testid": "period-slider-hover-dot", className: "period-slider-hover-dot h-full w-full rounded-full border border-white/80 bg-[var(--aqps-accent-light)] shadow-[0_0_6px_var(--aqps-accent-glow)] dark:border-slate-800" }),
2134
2133
  /* @__PURE__ */ K(
2135
2134
  "div",
2136
2135
  {
2137
2136
  "data-testid": "period-slider-hover-tooltip",
2138
- "data-duplicate": yc ? "true" : void 0,
2137
+ "data-duplicate": Pc ? "true" : void 0,
2139
2138
  className: `period-slider-hover-tooltip ${u === "bottom" && !p ? "period-slider-hover-tooltip-bottom" : ""} rounded bg-slate-800/90 px-2 py-0.5 font-medium text-white text-xs shadow-lg backdrop-blur-xs dark:bg-slate-900/90`,
2140
- children: gt(t, bs, e.formatLabel, x)
2139
+ children: gt(t, vs, e.formatLabel, x)
2141
2140
  }
2142
2141
  )
2143
2142
  ] }),
@@ -2151,13 +2150,13 @@ const ks = () => {
2151
2150
  "aria-valuemin": C,
2152
2151
  "aria-valuemax": j ? U : Ae,
2153
2152
  "aria-valuenow": Me,
2154
- "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Ia, t, "period") : en(t, Ia, e.formatLabel, x),
2153
+ "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Na, t, "period") : en(t, Na, e.formatLabel, x),
2155
2154
  "aria-orientation": p ? "vertical" : "horizontal",
2156
2155
  className: `period-slider-handle group absolute h-4 w-4 touch-none after:absolute after:inset-[calc((100%-var(--ps-target-size))/2)] after:content-[''] focus-visible:outline-hidden ${Er}`,
2157
- style: Rc,
2158
- onPointerDown: os("low"),
2159
- onKeyDown: is("low"),
2160
- onFocus: as("low"),
2156
+ style: xc,
2157
+ onPointerDown: as("low"),
2158
+ onKeyDown: ss("low"),
2159
+ onFocus: is("low"),
2161
2160
  "data-active": Ee === "low" ? "true" : void 0,
2162
2161
  "data-front": Sn ? "true" : void 0,
2163
2162
  children: [
@@ -2177,10 +2176,10 @@ const ks = () => {
2177
2176
  "data-slanted": ur.isSlanted ? "true" : void 0,
2178
2177
  "data-flipped": ur.isFlipped ? "true" : void 0,
2179
2178
  "data-front": Sn ? "true" : void 0,
2180
- "data-duplicate": wa && !Sn ? "true" : void 0,
2181
- ref: zl,
2179
+ "data-duplicate": va && !Sn ? "true" : void 0,
2180
+ ref: Bl,
2182
2181
  style: Xr.lowStyle,
2183
- children: gt(t, Ia, e.formatLabel, x)
2182
+ children: gt(t, Na, e.formatLabel, x)
2184
2183
  }
2185
2184
  ),
2186
2185
  Jr(Xr.lowLeaderStyle)
@@ -2197,13 +2196,13 @@ const ks = () => {
2197
2196
  "aria-valuemin": Me,
2198
2197
  "aria-valuemax": U,
2199
2198
  "aria-valuenow": Ae,
2200
- "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Aa, t, "period") : en(t, Aa, e.formatLabel, x),
2199
+ "aria-valuetext": e.formatAriaValueText ? e.formatAriaValueText(Ca, t, "period") : en(t, Ca, e.formatLabel, x),
2201
2200
  "aria-orientation": p ? "vertical" : "horizontal",
2202
2201
  className: `period-slider-handle group absolute h-4 w-4 touch-none after:absolute after:inset-[calc((100%-var(--ps-target-size))/2)] after:content-[''] focus-visible:outline-hidden ${Er}`,
2203
- style: xc,
2204
- onPointerDown: os("high"),
2205
- onKeyDown: is("high"),
2206
- onFocus: as("high"),
2202
+ style: Mc,
2203
+ onPointerDown: as("high"),
2204
+ onKeyDown: ss("high"),
2205
+ onFocus: is("high"),
2207
2206
  "data-active": Ee === "high" ? "true" : void 0,
2208
2207
  "data-front": Dn ? "true" : void 0,
2209
2208
  children: [
@@ -2223,10 +2222,10 @@ const ks = () => {
2223
2222
  "data-slanted": ur.isSlanted ? "true" : void 0,
2224
2223
  "data-flipped": ur.isFlipped ? "true" : void 0,
2225
2224
  "data-front": Dn ? "true" : void 0,
2226
- "data-duplicate": wa && !Dn ? "true" : void 0,
2227
- ref: Bl,
2225
+ "data-duplicate": va && !Dn ? "true" : void 0,
2226
+ ref: Wl,
2228
2227
  style: Xr.highStyle,
2229
- children: gt(t, Aa, e.formatLabel, x)
2228
+ children: gt(t, Ca, e.formatLabel, x)
2230
2229
  }
2231
2230
  ),
2232
2231
  Jr(Xr.highLeaderStyle)
@@ -2236,17 +2235,17 @@ const ks = () => {
2236
2235
  ] })
2237
2236
  }
2238
2237
  ),
2239
- c && vs(p ? "decrease" : "increase")
2238
+ c && Ss(p ? "decrease" : "increase")
2240
2239
  ]
2241
2240
  }
2242
2241
  );
2243
- }, ot = (e) => e.getTime(), Il = (e, t) => !(Ht(e) && Ht(t)) || e.length !== 2 || t.length !== 2 ? !1 : At(e[0], ot) === At(t[0], ot) && At(e[1], ot) === At(t[1], ot), So = (e, t) => e === void 0 || t === void 0 ? e === t : Il(e, t), Ua = (e, t) => {
2242
+ }, ot = (e) => e.getTime(), Al = (e, t) => !(Ht(e) && Ht(t)) || e.length !== 2 || t.length !== 2 ? !1 : At(e[0], ot) === At(t[0], ot) && At(e[1], ot) === At(t[1], ot), Do = (e, t) => e === void 0 || t === void 0 ? e === t : Al(e, t), Ba = (e, t) => {
2244
2243
  if (e === t) return !0;
2245
2244
  if (!(Ht(e) && Ht(t)) || e.length !== t.length) return !1;
2246
2245
  for (let r = 0; r < e.length; r++)
2247
2246
  if (At(e[r], ot) !== At(t[r], ot)) return !1;
2248
2247
  return !0;
2249
- }, mu = (e, t) => {
2248
+ }, fu = (e, t) => {
2250
2249
  if (e === t) return !0;
2251
2250
  if (!(e && t)) return !1;
2252
2251
  const r = Object.keys(e), n = Object.keys(t);
@@ -2254,11 +2253,11 @@ const ks = () => {
2254
2253
  for (const o of r)
2255
2254
  if (e[o] !== t[o]) return !1;
2256
2255
  return !0;
2257
- }, fu = (e, t) => e === t ? !0 : e.mode !== t.mode || e.unit !== t.unit || e.yearStartMonth !== t.yearStartMonth || At(e.minDate, ot) !== At(t.minDate, ot) || At(e.maxDate, ot) !== At(t.maxDate, ot) || e.labelPosition !== t.labelPosition || e.autoSlantLabels !== t.autoSlantLabels || e.keepMergedLabelUpright !== t.keepMergedLabelUpright || // 境の要素は同一性で比べる。同じ要素の中身や位置の変化は Props ではなく測定が追う
2258
- e.labelCeiling !== t.labelCeiling || e.labelFloor !== t.labelFloor || e.showLabelLeaderLines !== t.showLabelLeaderLines || e.isVertical !== t.isVertical || e.hideConnectBar !== t.hideConnectBar || e.showTicks !== t.showTicks || e.disabled !== t.disabled || e.showStepper !== t.showStepper || e.debounceMs !== t.debounceMs || e.tooltipStyle !== t.tooltipStyle || e.colorScheme !== t.colorScheme || e.className !== t.className || !mu(e.style, t.style) || e.snapMode !== t.snapMode || e.formatLabel !== t.formatLabel || e.formatLocale !== t.formatLocale || e.locale !== t.locale || !Ko(e.labels, t.labels) || e.formatAriaValueText !== t.formatAriaValueText || !Ua(e.allowedDates, t.allowedDates) ? !1 : e.mode === "point" && t.mode === "point" ? !(St(e.value, ot) !== St(t.value, ot) || St(e.defaultValue, ot) !== St(t.defaultValue, ot) || e.onChangePoint !== t.onChangePoint) : e.mode === "range" && t.mode === "range" ? !(!So(e.range, t.range) || !So(e.defaultRange, t.defaultRange) || e.onChangeRange !== t.onChangeRange) : e.mode === "vernier" && t.mode === "vernier" ? !(!So(e.microRange, t.microRange) || !So(e.defaultMicroRange, t.defaultMicroRange) || St(e.microValue, ot) !== St(t.microValue, ot) || St(e.defaultMicroValue, ot) !== St(t.defaultMicroValue, ot) || !Il(e.macroRange, t.macroRange) || e.vernierOrientation !== t.vernierOrientation || e.showVernierProjection !== t.showVernierProjection || e.showVernierTicks !== t.showVernierTicks || e.showHairline !== t.showHairline || e.macroUnit !== t.macroUnit || e.microUnit !== t.microUnit || e.macroIsDiscrete !== t.macroIsDiscrete || e.microIsDiscrete !== t.microIsDiscrete || e.formatMacroLabel !== t.formatMacroLabel || e.formatMicroLabel !== t.formatMicroLabel || e.onChangeMicroRange !== t.onChangeMicroRange || e.onChangeMicroPoint !== t.onChangeMicroPoint || e.onChangeMacroRange !== t.onChangeMacroRange || !Ua(e.macroAllowedDates, t.macroAllowedDates) || !Ua(e.microAllowedDates, t.microAllowedDates)) : !1, hu = Gn(uu, fu);
2259
- hu.displayName = "PeriodSlider";
2260
- const qs = 2, Te = -1, Tt = (e) => z("day", e), Fn = (e) => le("day", e), Pn = (e) => `${Qo(e.getFullYear())}-${String(e.getMonth() + 1).padStart(qs, "0")}-${String(e.getDate()).padStart(qs, "0")}`, gu = (e, t, r, n) => {
2261
- const o = Tt(e), a = Tt(t), i = a >= o ? a - o + 1 : 0, s = (d) => Fn(a - d), c = { kind: "range", min: o, max: a };
2256
+ }, hu = (e, t) => e === t ? !0 : e.mode !== t.mode || e.unit !== t.unit || e.yearStartMonth !== t.yearStartMonth || At(e.minDate, ot) !== At(t.minDate, ot) || At(e.maxDate, ot) !== At(t.maxDate, ot) || e.labelPosition !== t.labelPosition || e.autoSlantLabels !== t.autoSlantLabels || e.keepMergedLabelUpright !== t.keepMergedLabelUpright || // 境の要素は同一性で比べる。同じ要素の中身や位置の変化は Props ではなく測定が追う
2257
+ e.labelCeiling !== t.labelCeiling || e.labelFloor !== t.labelFloor || e.showLabelLeaderLines !== t.showLabelLeaderLines || e.isVertical !== t.isVertical || e.hideConnectBar !== t.hideConnectBar || e.showTicks !== t.showTicks || e.disabled !== t.disabled || e.showStepper !== t.showStepper || e.debounceMs !== t.debounceMs || e.tooltipStyle !== t.tooltipStyle || e.colorScheme !== t.colorScheme || e.className !== t.className || !fu(e.style, t.style) || e.snapMode !== t.snapMode || e.formatLabel !== t.formatLabel || e.formatLocale !== t.formatLocale || e.locale !== t.locale || !Xo(e.labels, t.labels) || e.formatAriaValueText !== t.formatAriaValueText || !Ba(e.allowedDates, t.allowedDates) ? !1 : e.mode === "point" && t.mode === "point" ? !(St(e.value, ot) !== St(t.value, ot) || St(e.defaultValue, ot) !== St(t.defaultValue, ot) || e.onChangePoint !== t.onChangePoint) : e.mode === "range" && t.mode === "range" ? !(!Do(e.range, t.range) || !Do(e.defaultRange, t.defaultRange) || e.onChangeRange !== t.onChangeRange) : e.mode === "vernier" && t.mode === "vernier" ? !(!Do(e.microRange, t.microRange) || !Do(e.defaultMicroRange, t.defaultMicroRange) || St(e.microValue, ot) !== St(t.microValue, ot) || St(e.defaultMicroValue, ot) !== St(t.defaultMicroValue, ot) || !Al(e.macroRange, t.macroRange) || e.vernierOrientation !== t.vernierOrientation || e.showVernierProjection !== t.showVernierProjection || e.showVernierTicks !== t.showVernierTicks || e.showHairline !== t.showHairline || e.macroUnit !== t.macroUnit || e.microUnit !== t.microUnit || e.macroIsDiscrete !== t.macroIsDiscrete || e.microIsDiscrete !== t.microIsDiscrete || e.formatMacroLabel !== t.formatMacroLabel || e.formatMicroLabel !== t.formatMicroLabel || e.onChangeMicroRange !== t.onChangeMicroRange || e.onChangeMicroPoint !== t.onChangeMicroPoint || e.onChangeMacroRange !== t.onChangeMacroRange || !Ba(e.macroAllowedDates, t.macroAllowedDates) || !Ba(e.microAllowedDates, t.microAllowedDates)) : !1, gu = jn(mu, hu);
2258
+ gu.displayName = "PeriodSlider";
2259
+ const Xs = 2, Te = -1, Tt = (e) => z("day", e), Un = (e) => le("day", e), Pn = (e) => `${ea(e.getFullYear())}-${String(e.getMonth() + 1).padStart(Xs, "0")}-${String(e.getDate()).padStart(Xs, "0")}`, pu = (e, t, r, n) => {
2260
+ const o = Tt(e), a = Tt(t), i = a >= o ? a - o + 1 : 0, s = (d) => Un(a - d), c = { kind: "range", min: o, max: a };
2262
2261
  return {
2263
2262
  count: i,
2264
2263
  dateAt: s,
@@ -2269,11 +2268,11 @@ const qs = 2, Te = -1, Tt = (e) => z("day", e), Fn = (e) => le("day", e), Pn = (
2269
2268
  },
2270
2269
  nearestIndexOf: (d) => {
2271
2270
  if (i === 0) return Te;
2272
- const u = _n(c, Tt(d));
2271
+ const u = Yn(c, Tt(d));
2273
2272
  return u === null ? Te : a - u;
2274
2273
  }
2275
2274
  };
2276
- }, pu = (e, t, r, n, o, a) => {
2275
+ }, wu = (e, t, r, n, o, a) => {
2277
2276
  const i = n >= r ? n - r + 1 : 0, s = (S) => e[n - S], c = { kind: "candidates", ascending: t, loIndex: r, hiIndex: n }, d = (S) => {
2278
2277
  const E = S.getTime();
2279
2278
  let $ = r, p = n;
@@ -2283,15 +2282,15 @@ const qs = 2, Te = -1, Tt = (e) => z("day", e), Fn = (e) => le("day", e), Pn = (
2283
2282
  w < E ? $ = h + 1 : p = h - 1;
2284
2283
  }
2285
2284
  return Te;
2286
- }, u = (S) => S === null ? Te : d(Fn(S));
2285
+ }, u = (S) => S === null ? Te : d(Un(S));
2287
2286
  return {
2288
2287
  count: i,
2289
2288
  dateAt: s,
2290
2289
  labelAt: (S) => gt("day", s(S), a, o),
2291
2290
  indexOf: d,
2292
- nearestIndexOf: (S) => u(_n(c, Tt(S)))
2291
+ nearestIndexOf: (S) => u(Yn(c, Tt(S)))
2293
2292
  };
2294
- }, wu = {
2293
+ }, bu = {
2295
2294
  count: 0,
2296
2295
  dateAt: (e) => {
2297
2296
  throw new RangeError(`DateSelector: the option domain is empty (requested index ${M(e)})`);
@@ -2301,7 +2300,7 @@ const qs = 2, Te = -1, Tt = (e) => z("day", e), Fn = (e) => le("day", e), Pn = (
2301
2300
  },
2302
2301
  indexOf: () => Te,
2303
2302
  nearestIndexOf: () => Te
2304
- }, bu = (e, t, r) => {
2303
+ }, vu = (e, t, r) => {
2305
2304
  const n = (s) => {
2306
2305
  let c = 0, d = e.length;
2307
2306
  for (; c < d; ) {
@@ -2318,7 +2317,7 @@ const qs = 2, Te = -1, Tt = (e) => z("day", e), Fn = (e) => le("day", e), Pn = (
2318
2317
  return c;
2319
2318
  }, a = t === null ? 0 : n(t.getTime()), i = (r === null ? e.length : o(r.getTime())) - 1;
2320
2319
  return { loIndex: a, hiIndex: i };
2321
- }, vu = (e, t) => {
2320
+ }, Su = (e, t) => {
2322
2321
  const r = /* @__PURE__ */ new Map();
2323
2322
  for (let n = 0; n < e.length; n++) {
2324
2323
  const o = e[n];
@@ -2329,38 +2328,38 @@ const qs = 2, Te = -1, Tt = (e) => z("day", e), Fn = (e) => le("day", e), Pn = (
2329
2328
  r.has(i) || r.set(i, a);
2330
2329
  }
2331
2330
  return Array.from(r.keys()).sort((n, o) => n - o).map((n) => r.get(n));
2332
- }, Su = {
2331
+ }, Du = {
2333
2332
  year: { year: "numeric" },
2334
2333
  month: { month: "2-digit" },
2335
2334
  day: { day: "2-digit" }
2336
- }, Du = {
2335
+ }, Ru = {
2337
2336
  month: 2,
2338
2337
  day: 2
2339
- }, Xs = {
2338
+ }, Zs = {
2340
2339
  year: (e) => e.getFullYear(),
2341
2340
  month: (e) => e.getMonth() + 1,
2342
2341
  day: (e) => e.getDate()
2343
- }, Zs = /* @__PURE__ */ new Map(), Ru = (e, t) => {
2344
- const r = `${e}\0${t}`, n = Zs.get(r);
2342
+ }, Qs = /* @__PURE__ */ new Map(), xu = (e, t) => {
2343
+ const r = `${e}\0${t}`, n = Qs.get(r);
2345
2344
  if (n !== void 0) return n;
2346
- const o = new Intl.DateTimeFormat(t, Su[e]);
2347
- return Zs.set(r, o), o;
2348
- }, xu = (e, t, r) => {
2349
- if (r !== void 0) return Ru(e, r).format(t);
2345
+ const o = new Intl.DateTimeFormat(t, Du[e]);
2346
+ return Qs.set(r, o), o;
2347
+ }, Mu = (e, t, r) => {
2348
+ if (r !== void 0) return xu(e, r).format(t);
2350
2349
  const n = new Date(t.getTime());
2351
- return e === "year" ? Qo(Xs.year(n)) : String(Xs[e](n)).padStart(Du[e], "0");
2352
- }, Mu = (e, t, r, n) => {
2350
+ return e === "year" ? ea(Zs.year(n)) : String(Zs[e](n)).padStart(Ru[e], "0");
2351
+ }, yu = (e, t, r, n) => {
2353
2352
  if (Ie("formatOptionText", "unit", t), r !== "period" && r !== "part")
2354
2353
  throw new RangeError(`formatOptionText: scope must be "period" or "part" (received: ${M(r)})`);
2355
- return ye(e) ? r === "part" ? xu(t, e, n) : gt(t, e, void 0, n) : "";
2356
- }, yu = 12, na = (e, t, r) => {
2357
- const n = qn(e, t, r);
2358
- return n === null ? Number.NaN : n * yu + r;
2359
- }, vi = (e, t, r) => {
2354
+ return ye(e) ? r === "part" ? Mu(t, e, n) : gt(t, e, void 0, n) : "";
2355
+ }, Cn = "period-slider-selector-field", Pu = `${Cn} period-slider-selector-field-year`, zo = `${Cn} period-slider-selector-field-date`, Eu = 12, aa = (e, t, r) => {
2356
+ const n = Xn(e, t, r);
2357
+ return n === null ? Number.NaN : n * Eu + r;
2358
+ }, Si = (e, t, r) => {
2360
2359
  const n = (o) => o.value !== void 0 ? o.value : o.initialDate;
2361
2360
  return St(n(e), r) !== St(n(t), r) || t.value !== void 0 && Number.isNaN(St(t.initialDate, r)) || St(e.minDate, r) !== St(t.minDate, r) ? !1 : St(e.maxDate, r) === St(t.maxDate, r);
2362
2361
  };
2363
- class Al {
2362
+ class Nl {
2364
2363
  /** Held value / 保持する値 */
2365
2364
  held;
2366
2365
  /** Writes made through `current` so far / これまでに `current` を通して書かれた回数 */
@@ -2413,48 +2412,48 @@ class Al {
2413
2412
  this.writeCount === r && (this.held = t);
2414
2413
  }
2415
2414
  }
2416
- function Nl(e, t) {
2417
- const [r] = Be(() => t(e)), n = r.writes;
2418
- return wl(() => {
2415
+ function Cl(e, t) {
2416
+ const [r] = We(() => t(e)), n = r.writes;
2417
+ return bl(() => {
2419
2418
  r.commit(e, n);
2420
2419
  }), r;
2421
2420
  }
2422
2421
  function wt(e) {
2423
- return Nl(e, (t) => new Al(t));
2422
+ return Cl(e, (t) => new Nl(t));
2424
2423
  }
2425
- const Pu = {
2424
+ const Lu = {
2426
2425
  motion: ["motion", "edge"],
2427
2426
  vernierRange: ["motion", "edge", "window"],
2428
2427
  vernierPoint: ["window"]
2429
- }, Eu = ["shift", "start", "end", "single"], Lu = ["disable", "clamp"], $u = ["follow", "keep"], Qs = {
2428
+ }, $u = ["shift", "start", "end", "single"], Tu = ["disable", "clamp"], Iu = ["follow", "keep"], Js = {
2430
2429
  day: { day: 1 },
2431
2430
  month: { month: 1, year: 12 },
2432
2431
  year: { year: 1 }
2433
- }, Js = /* @__PURE__ */ new WeakMap(), Qa = (e, t, r) => {
2432
+ }, el = /* @__PURE__ */ new WeakMap(), ei = (e, t, r) => {
2434
2433
  if (typeof r != "object" || r === null)
2435
2434
  throw new RangeError(`${e}: ${t} must be an object (received: ${M(r)})`);
2436
- }, el = (e, t, r, n) => {
2435
+ }, tl = (e, t, r, n) => {
2437
2436
  for (const [o, a] of Object.entries(r))
2438
2437
  if (!(a === void 0 || n.includes(o)))
2439
2438
  throw new RangeError(`${e}: ${t}.${o} is not read here; the accepted keys are ${n.map((i) => `"${i}"`).join(", ")} (received: ${M(a)})`);
2440
2439
  }, Or = (e, t, r, n) => {
2441
- Qa(e, t, r), el(e, t, r, ["previous", "next"]);
2440
+ ei(e, t, r), tl(e, t, r, ["previous", "next"]);
2442
2441
  for (const o of ["previous", "next"]) {
2443
2442
  const a = `${t}.${o}`, i = r[o];
2444
- Qa(e, a, i), el(e, a, i, Pu[n]);
2443
+ ei(e, a, i), tl(e, a, i, Lu[n]);
2445
2444
  const { motion: s, edge: c, window: d } = i;
2446
- if (n !== "vernierPoint" && (typeof s != "string" || !Eu.includes(s)))
2445
+ if (n !== "vernierPoint" && (typeof s != "string" || !$u.includes(s)))
2447
2446
  throw new RangeError(`${e}: ${a}.motion must be one of "shift", "start", "end", "single" (received: ${M(s)})`);
2448
2447
  if (c !== void 0) {
2449
2448
  if (s !== "shift")
2450
2449
  throw new RangeError(`${e}: ${a}.edge applies to motion "shift" only; a motion that moves one value either can move or cannot (received: edge ${M(c)} with motion ${M(s)})`);
2451
- if (typeof c != "string" || !Lu.includes(c))
2450
+ if (typeof c != "string" || !Tu.includes(c))
2452
2451
  throw new RangeError(`${e}: ${a}.edge must be "disable" or "clamp" (received: ${M(c)})`);
2453
2452
  }
2454
- if (d !== void 0 && (typeof d != "string" || !$u.includes(d)))
2453
+ if (d !== void 0 && (typeof d != "string" || !Iu.includes(d)))
2455
2454
  throw new RangeError(`${e}: ${a}.window must be "follow" or "keep" (received: ${M(d)})`);
2456
2455
  }
2457
- }, Si = (e, t, r) => {
2456
+ }, Di = (e, t, r) => {
2458
2457
  if (typeof t != "object" || t === null) throw new RangeError(`${e}: stepper must be an object (received: ${M(t)})`);
2459
2458
  const { onStep: n, canStepPrevious: o, canStepNext: a } = t;
2460
2459
  if (typeof n != "function") throw new RangeError(`${e}: stepper.onStep must be a function (received: ${M(n)})`);
@@ -2466,32 +2465,32 @@ const Pu = {
2466
2465
  if (!ye(r))
2467
2466
  throw new RangeError(`${e}: ${t} must be a valid Date (received: ${M(r)})`);
2468
2467
  return Qe(e, t, r, n, o, "");
2469
- }, Cl = (e, t, r, n, o) => {
2470
- const a = `${n}:${o}`, i = Js.get(r), s = i?.get(a);
2468
+ }, Ol = (e, t, r, n, o) => {
2469
+ const a = `${n}:${o}`, i = el.get(r), s = i?.get(a);
2471
2470
  if (s !== void 0) return s;
2472
2471
  const c = [];
2473
2472
  for (let u = 0; u < r.length; u++)
2474
2473
  c.push(er(e, `${t}[${u}]`, r[u], n, o));
2475
2474
  const d = Array.from(new Set(c)).sort((u, S) => u - S);
2476
- return i === void 0 ? Js.set(r, /* @__PURE__ */ new Map([[a, d]])) : i.set(a, d), d;
2477
- }, Tu = (e, t) => t === 1 ? $o(e) : {
2478
- stepEnd: (r, n) => Lo(e, r + t * n, n),
2479
- edge: (r) => Vn(e, r)
2480
- }, Ja = (e, t) => e.motion === "shift" ? { motion: "shift", edge: e.edge === "clamp" ? "clamp" : "disable" } : e.motion === "single" ? { motion: "single", shows: t } : { motion: e.motion }, ei = (e, t, r, n, o, a) => {
2475
+ return i === void 0 ? el.set(r, /* @__PURE__ */ new Map([[a, d]])) : i.set(a, d), d;
2476
+ }, Au = (e, t) => t === 1 ? To(e) : {
2477
+ stepEnd: (r, n) => $o(e, r + t * n, n),
2478
+ edge: (r) => kn(e, r)
2479
+ }, ti = (e, t) => e.motion === "shift" ? { motion: "shift", edge: e.edge === "clamp" ? "clamp" : "disable" } : e.motion === "single" ? { motion: "single", shows: t } : { motion: e.motion }, ri = (e, t, r, n, o, a) => {
2481
2480
  if (a) {
2482
2481
  const c = e[0] === t[0] ? r[0] : e[0] === t[1] ? r[1] : le(n, e[0], o);
2483
2482
  return Number.isNaN(c.getTime()) ? null : [c, c];
2484
2483
  }
2485
2484
  const i = e[0] === t[0] ? r[0] : le(n, e[0], o), s = e[1] === t[1] ? r[1] : le(n, e[1], o);
2486
2485
  return Number.isNaN(i.getTime()) || Number.isNaN(s.getTime()) ? null : [i, s.getTime() < i.getTime() ? i : s];
2487
- }, tl = (e) => {
2486
+ }, rl = (e) => {
2488
2487
  const t = "resolveSelectorSteps";
2489
- Qa(t, "options", e);
2488
+ ei(t, "options", e);
2490
2489
  const { selection: r, shows: n, unit: o, minDate: a, maxDate: i, allowedDates: s, rules: c } = e;
2491
2490
  Ie(t, "unit", o);
2492
- const d = or(t, "stepUnit", e.stepUnit, o), u = Qs[o][d];
2491
+ const d = or(t, "stepUnit", e.stepUnit, o), u = Js[o][d];
2493
2492
  if (u === void 0) {
2494
- const R = Object.keys(Qs[o]).map((b) => `"${b}"`).join(" or ");
2493
+ const R = Object.keys(Js[o]).map((b) => `"${b}"`).join(" or ");
2495
2494
  throw new RangeError(`${t}: stepUnit must be ${R} for a ${o} selection, the steps that move every ${o} by a whole number of ${o}s (received: ${M(d)})`);
2496
2495
  }
2497
2496
  const S = vr(t, e.yearStartMonth);
@@ -2507,9 +2506,9 @@ const Pu = {
2507
2506
  if (p !== null && h !== null && h < p)
2508
2507
  throw new RangeError(`${t}: maxDate must not precede minDate at ${o} resolution (minDate: ${M(a)}, maxDate: ${M(i)})`);
2509
2508
  mn(t, "allowedDates", s);
2510
- const w = s === void 0 ? { kind: "range", min: p, max: h } : fn(Cl(t, "allowedDates", s, o, S), p, h), f = Tu(w, u), x = (R, b) => {
2511
- const m = qa(f, E, $, R, Ja(b, n));
2512
- return m === null ? null : ei(m, [E, $], r, o, S, b.motion === "single");
2509
+ const w = s === void 0 ? { kind: "range", min: p, max: h } : fn(Ol(t, "allowedDates", s, o, S), p, h), f = Au(w, u), x = (R, b) => {
2510
+ const m = Za(f, E, $, R, ti(b, n));
2511
+ return m === null ? null : ri(m, [E, $], r, o, S, b.motion === "single");
2513
2512
  };
2514
2513
  return { previous: x(-1, c.previous), next: x(1, c.next) };
2515
2514
  }, tr = (e, t) => {
@@ -2519,44 +2518,44 @@ const Pu = {
2519
2518
  }, []), o = e.previous !== null, a = e.next !== null;
2520
2519
  return Y(() => ({ onStep: n, canStepPrevious: o, canStepNext: a }), [n, o, a]);
2521
2520
  };
2522
- function Iu(e, t, r, n) {
2521
+ function Nu(e, t, r, n) {
2523
2522
  return e.source === t ? e : t === null ? { source: t, held: e.held } : { source: t, held: n(r) };
2524
2523
  }
2525
- function Di(e, t, r, n) {
2526
- const o = t ? null : r(e), [a, i] = Be(() => ({ source: o, held: n(e) })), s = A((d) => i((u) => ({ source: u.source, held: d })), []), c = Iu(a, o, e, n);
2524
+ function Ri(e, t, r, n) {
2525
+ const o = t ? null : r(e), [a, i] = We(() => ({ source: o, held: n(e) })), s = A((d) => i((u) => ({ source: u.source, held: d })), []), c = Nu(a, o, e, n);
2527
2526
  return at(() => {
2528
2527
  c !== a && i((d) => d === a ? c : d);
2529
2528
  }), [c.held, s];
2530
2529
  }
2531
- const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4, Wa = 12, En = (e, t) => {
2530
+ const Oo = 44, nl = 7, Ro = 8, Cu = 2, Vl = 10, Ou = 1e3, ni = 8, Wa = 6, Ga = 4, ja = 12, En = (e, t) => {
2532
2531
  const r = new Date(e, t - 1, 1);
2533
2532
  return r.setFullYear(e), Tt(r);
2534
- }, Cu = (e, t) => {
2535
- if (e.length < Ba || t.count === 0) return Te;
2536
- const r = Number(e.slice(0, Ba));
2533
+ }, Vu = (e, t) => {
2534
+ if (e.length < Ga || t.count === 0) return Te;
2535
+ const r = Number(e.slice(0, Ga));
2537
2536
  if (!Number.isInteger(r)) return Te;
2538
- const n = e.length >= za, o = n ? Number(e.slice(Ba, za)) : Wa;
2539
- if (o < 1 || o > Wa) return Te;
2540
- const a = e.length >= ti, i = a ? Number(e.slice(za, ti)) : 0, s = En(r, o), c = (o === Wa ? En(r + 1, 1) : En(r, o + 1)) - 1, d = a ? s + i - 1 : n ? s : En(r, 1), u = a ? d : n ? c : En(r + 1, 1) - 1;
2537
+ const n = e.length >= Wa, o = n ? Number(e.slice(Ga, Wa)) : ja;
2538
+ if (o < 1 || o > ja) return Te;
2539
+ const a = e.length >= ni, i = a ? Number(e.slice(Wa, ni)) : 0, s = En(r, o), c = (o === ja ? En(r + 1, 1) : En(r, o + 1)) - 1, d = a ? s + i - 1 : n ? s : En(r, 1), u = a ? d : n ? c : En(r + 1, 1) - 1;
2541
2540
  if (a && (i < 1 || d > c)) return Te;
2542
2541
  for (let S = u; S >= d; S--) {
2543
- const E = t.indexOf(Fn(S));
2542
+ const E = t.indexOf(Un(S));
2544
2543
  if (E !== Te) return E;
2545
2544
  }
2546
2545
  return Te;
2547
- }, Ou = (e) => e.closest(".dark") === null ? "light" : "dark", Vu = (e, t, r, n) => {
2548
- const o = r - e.bottom - Do, a = e.top - Do, i = o >= t || o >= a, c = Math.max(Co, Math.min(t, i ? o : a)), d = i ? e.bottom : e.top - c, u = e.width + Ol, S = Math.max(Do, Math.min(e.left, n - u - Do));
2546
+ }, ku = (e) => e.closest(".dark") === null ? "light" : "dark", _u = (e, t, r, n) => {
2547
+ const o = r - e.bottom - Ro, a = e.top - Ro, i = o >= t || o >= a, c = Math.max(Oo, Math.min(t, i ? o : a)), d = i ? e.bottom : e.top - c, u = e.width + Vl, S = Math.max(Ro, Math.min(e.left, n - u - Ro));
2549
2548
  return { top: d, left: S, width: u, height: c };
2550
- }, ku = (e, t) => e < t ? e : t > 0 ? t - 1 : Te, Vl = ({ domain: e, selectedIndex: t, openAnchorIndex: r, displayLabel: n, machineValue: o, disabled: a, ariaLabel: i, locale: s, labels: c, onCommitIndex: d, controlClassName: u }) => {
2551
- const S = pl(), E = Y(() => sd(c), [c]), $ = `period-slider-date-listbox-${S}`, p = A((O) => `period-slider-date-option-${S}-${O}`, [S]), [h, w] = Be(!1), [f, x] = Be(Te), [R, b] = Be(null), [m, me] = Be(null), q = de(null), ne = de(null), te = de(null), W = de({ buffer: "", at: 0 }), oe = e.count, N = ku(f, oe), X = wt(N);
2549
+ }, Yu = (e, t) => e < t ? e : t > 0 ? t - 1 : Te, kl = ({ domain: e, selectedIndex: t, openAnchorIndex: r, displayLabel: n, machineValue: o, disabled: a, ariaLabel: i, locale: s, labels: c, onCommitIndex: d, controlClassName: u }) => {
2550
+ const S = wl(), E = Y(() => ld(c), [c]), $ = `period-slider-date-listbox-${S}`, p = A((O) => `period-slider-date-option-${S}-${O}`, [S]), [h, w] = We(!1), [f, x] = We(Te), [R, b] = We(null), [m, me] = We(null), q = de(null), ne = de(null), te = de(null), W = de({ buffer: "", at: 0 }), oe = e.count, N = Yu(f, oe), X = wt(N);
2552
2551
  at(() => {
2553
2552
  N !== f && x((O) => O === f ? N : O);
2554
2553
  });
2555
- const F = Math.min(oe, rl) * Co, I = Math.max(1, Math.min(oe, rl)), L = A(() => {
2554
+ const F = Math.min(oe, nl) * Oo, I = Math.max(1, Math.min(oe, nl)), L = A(() => {
2556
2555
  const O = q.current;
2557
2556
  if (O === null) return;
2558
2557
  const Z = O.getBoundingClientRect();
2559
- b(Vu(Z, F, window.innerHeight, window.innerWidth));
2558
+ b(_u(Z, F, window.innerHeight, window.innerWidth));
2560
2559
  }, [F]), H = wt(h), _ = A(() => {
2561
2560
  w(!1), x(Te), W.current = { buffer: "", at: 0 }, H.current = !1;
2562
2561
  }, [H]);
@@ -2578,7 +2577,7 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2578
2577
  return;
2579
2578
  }
2580
2579
  const O = q.current;
2581
- return O !== null && me(Ou(O)), L(), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L), () => {
2580
+ return O !== null && me(ku(O)), L(), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L), () => {
2582
2581
  window.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L);
2583
2582
  };
2584
2583
  }, [h, L]), $t(() => {
@@ -2654,17 +2653,17 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2654
2653
  const fe = O.key >= "0" && O.key <= "9", He = O.key === "-" || O.key === "/" || O.key === ".";
2655
2654
  if (!(fe || He)) return;
2656
2655
  O.preventDefault();
2657
- const Se = Date.now(), it = Se - W.current.at > Nu ? "" : W.current.buffer, Je = fe ? `${it}${O.key}`.slice(0, ti) : it;
2656
+ const Se = Date.now(), it = Se - W.current.at > Ou ? "" : W.current.buffer, Je = fe ? `${it}${O.key}`.slice(0, ni) : it;
2658
2657
  W.current = { buffer: Je, at: Se };
2659
- const Ge = Cu(Je, e);
2660
- if (Ge !== Te) {
2658
+ const je = Vu(Je, e);
2659
+ if (je !== Te) {
2661
2660
  if (!h) {
2662
- C(Ge);
2661
+ C(je);
2663
2662
  return;
2664
2663
  }
2665
- U(Ge);
2664
+ U(je);
2666
2665
  }
2667
- }, ce = A((O) => O, []), Re = A(() => Co, []), ie = N === Te ? null : p(N), se = A(() => {
2666
+ }, ce = A((O) => O, []), Re = A(() => Oo, []), ie = N === Te ? null : p(N), se = A(() => {
2668
2667
  const O = q.current;
2669
2668
  if (O === null || ie === null) throw new Error("VirtualDateDropdown: the active row attached without its combobox control or an active option id, so aria-activedescendant has nothing to name it on");
2670
2669
  return O.setAttribute("aria-activedescendant", ie), () => {
@@ -2688,7 +2687,7 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2688
2687
  "data-active": fe ? "true" : void 0,
2689
2688
  ref: fe ? se : void 0,
2690
2689
  className: "period-slider-date-option",
2691
- style: { height: Co },
2690
+ style: { height: Oo },
2692
2691
  onClick: () => pe.current(O),
2693
2692
  children: e.labelAt(O)
2694
2693
  }
@@ -2696,14 +2695,14 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2696
2695
  );
2697
2696
  },
2698
2697
  [e, t, N, p, pe, se]
2699
- ), We = A((O) => (ne.current = O, O.style.removeProperty("display"), () => {
2698
+ ), Ge = A((O) => (ne.current = O, O.style.removeProperty("display"), () => {
2700
2699
  ne.current = null, O.style.setProperty("display", "none", "important");
2701
2700
  }), []), bt = h && R !== null && m !== null && oe > 0, we = bt ? (
2702
2701
  // biome-ignore lint/a11y/noStaticElementInteractions: ポップアップの外枠が拾うのは「フォーカスを奪わせない」ための mousedown 抑止だけで、操作機能は持たない。操作は内側の role="option" と操作要素が担う
2703
2702
  /* @__PURE__ */ K(
2704
2703
  "div",
2705
2704
  {
2706
- ref: We,
2705
+ ref: Ge,
2707
2706
  className: "period-slider-date-popup",
2708
2707
  "data-testid": "period-slider-date-popup",
2709
2708
  "data-color-mode": m,
@@ -2712,13 +2711,13 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2712
2711
  O.preventDefault();
2713
2712
  },
2714
2713
  children: /* @__PURE__ */ K(
2715
- Vc,
2714
+ kc,
2716
2715
  {
2717
2716
  ref: te,
2718
2717
  itemCount: oe,
2719
2718
  getItem: ce,
2720
2719
  getItemHeight: Re,
2721
- viewportSize: R.height - Au,
2720
+ viewportSize: R.height - Cu,
2722
2721
  initialScrollIndex: N !== Te ? N : void 0,
2723
2722
  className: "h-full w-full",
2724
2723
  testId: "period-slider-date-listbox-pane",
@@ -2730,7 +2729,7 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2730
2729
  "aria-label": i
2731
2730
  },
2732
2731
  scrollBarOptions: {
2733
- width: Ol,
2732
+ width: Vl,
2734
2733
  // ポップアップとその子孫はページのタブ順から除外する (APG)。
2735
2734
  // 未指定だと矢印ボタンが tabIndex=0 のままポップアップのタブ順へ露出する
2736
2735
  enableArrowButtons: !1,
@@ -2757,7 +2756,7 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2757
2756
  }
2758
2757
  )
2759
2758
  ) : null;
2760
- return /* @__PURE__ */ $e(Po, { children: [
2759
+ return /* @__PURE__ */ $e(Eo, { children: [
2761
2760
  /* @__PURE__ */ K(
2762
2761
  "input",
2763
2762
  {
@@ -2784,24 +2783,24 @@ const Co = 44, rl = 7, Do = 8, Au = 2, Ol = 10, Nu = 1e3, ti = 8, za = 6, Ba = 4
2784
2783
  }
2785
2784
  }
2786
2785
  ),
2787
- we === null ? null : kc(we, document.body)
2786
+ we === null ? null : _c(we, document.body)
2788
2787
  ] });
2789
2788
  };
2790
- Vl.displayName = "VirtualDateDropdown";
2789
+ kl.displayName = "VirtualDateDropdown";
2791
2790
  const Ln = (e) => {
2792
2791
  const t = new Date(e);
2793
2792
  return t.setHours(0, 0, 0, 0), t;
2794
- }, _u = Kn("leave the bound out where the variant allows it, or declare the days to offer with minYear / maxYear or allowedDates"), Yu = Kn('variant="split-dropdown" requires both bounds, so declare the years to offer with minYear / maxYear'), Hu = 31, $n = (e, t, r) => {
2793
+ }, Hu = qn("leave the bound out where the variant allows it, or declare the days to offer with minYear / maxYear or allowedDates"), Fu = qn('variant="split-dropdown" requires both bounds, so declare the years to offer with minYear / maxYear'), Uu = 31, $n = (e, t, r) => {
2795
2794
  if (!ye(t))
2796
2795
  throw new RangeError(`DateSelector: ${e} must be a valid Date (received: ${M(t)})`);
2797
2796
  Qe("DateSelector", e, t, "day", 0, r);
2798
2797
  }, hr = (e, t, r) => {
2799
2798
  const n = /* @__PURE__ */ new Date(0);
2800
2799
  return n.setHours(0, 0, 0, 0), n.setFullYear(e, t - 1, r), n;
2801
- }, Ro = (e) => hr(e, 1, 1), nl = (e) => hr(e, 12, 31), kl = (e, t, r) => e.getFullYear() === t && e.getMonth() + 1 === r, ol = (e, t, r, n) => kl(e, t, r) && e.getDate() === n, Ri = (e) => qn(e, "year", 0) !== null, xi = (e) => na(e, "day", 0), Fu = (e) => Ri(e) ? xi(e) : Number.NaN, xo = (e, t, r) => {
2802
- if (!Ri(t))
2800
+ }, xo = (e) => hr(e, 1, 1), ol = (e) => hr(e, 12, 31), _l = (e, t, r) => e.getFullYear() === t && e.getMonth() + 1 === r, al = (e, t, r, n) => _l(e, t, r) && e.getDate() === n, xi = (e) => Xn(e, "year", 0) !== null, Mi = (e) => aa(e, "day", 0), zu = (e) => xi(e) ? Mi(e) : Number.NaN, Mo = (e, t, r) => {
2801
+ if (!xi(t))
2803
2802
  throw new RangeError(`DateSelector: ${e} must fall in a year that starts inside the Date range, because variant="split-dropdown" draws its year (received: ${M(t)})${r}`);
2804
- }, al = (e, t, r, n, o) => {
2803
+ }, il = (e, t, r, n, o) => {
2805
2804
  const a = [];
2806
2805
  for (let i = e; i <= t; i++) {
2807
2806
  const s = r(i);
@@ -2809,17 +2808,17 @@ const Ln = (e) => {
2809
2808
  n(s, i) && a.push({ value: i, label: o(s) });
2810
2809
  }
2811
2810
  return a;
2812
- }, Uu = (e) => {
2811
+ }, Bu = (e) => {
2813
2812
  const { value: t, initialDate: r, onChange: n, stepper: o, stepGlyph: a, children: i, minYear: s, maxYear: c, minDate: d, maxDate: u, allowedDates: S, variant: E = "date", className: $ = "", style: p, disabled: h = !1, locale: w, labels: f, formatLocale: x, formatOption: R } = e;
2814
- x !== void 0 && ra("DateSelector", "formatLocale", x);
2815
- const b = E === "split-dropdown" ? Yu : _u;
2816
- if (t !== void 0 && $n("value", t, ""), r !== void 0 && $n("initialDate", r, ""), d !== void 0 && $n("minDate", d, b), u !== void 0 && $n("maxDate", u, b), E === "split-dropdown" && (t !== void 0 && xo("value", t, ""), r !== void 0 && xo("initialDate", r, ""), d !== void 0 && xo("minDate", d, b), u !== void 0 && xo("maxDate", u, b)), s !== void 0 && !Number.isInteger(s))
2813
+ x !== void 0 && oa("DateSelector", "formatLocale", x);
2814
+ const b = E === "split-dropdown" ? Fu : Hu;
2815
+ if (t !== void 0 && $n("value", t, ""), r !== void 0 && $n("initialDate", r, ""), d !== void 0 && $n("minDate", d, b), u !== void 0 && $n("maxDate", u, b), E === "split-dropdown" && (t !== void 0 && Mo("value", t, ""), r !== void 0 && Mo("initialDate", r, ""), d !== void 0 && Mo("minDate", d, b), u !== void 0 && Mo("maxDate", u, b)), s !== void 0 && !Number.isInteger(s))
2817
2816
  throw new RangeError(`DateSelector: minYear must be an integer year (received: ${M(s)})`);
2818
2817
  if (c !== void 0 && !Number.isInteger(c))
2819
2818
  throw new RangeError(`DateSelector: maxYear must be an integer year (received: ${M(c)})`);
2820
- if (s !== void 0 && Number.isNaN(Ro(s).getTime()))
2819
+ if (s !== void 0 && Number.isNaN(xo(s).getTime()))
2821
2820
  throw new RangeError(`DateSelector: minYear must name a year whose first day starts inside the Date range (received: ${M(s)})`);
2822
- if (c !== void 0 && Number.isNaN(nl(c).getTime()))
2821
+ if (c !== void 0 && Number.isNaN(ol(c).getTime()))
2823
2822
  throw new RangeError(`DateSelector: maxYear must name a year whose last day starts inside the Date range (received: ${M(c)})`);
2824
2823
  if (E === "split-dropdown" && S !== void 0)
2825
2824
  throw new RangeError('DateSelector: variant="split-dropdown" cannot honour allowedDates; use variant="dropdown" or variant="date" for a discrete date set');
@@ -2827,17 +2826,17 @@ const Ln = (e) => {
2827
2826
  const m = t ?? r;
2828
2827
  if (m === void 0)
2829
2828
  throw new RangeError("DateSelector: either value (controlled) or initialDate (uncontrolled) is required; the selected date is never inferred from the wall clock");
2830
- o !== void 0 && Si("DateSelector", o, t !== void 0);
2831
- const me = hi("DateSelector", a), q = qo(w, f), ne = t !== void 0, [te, W] = Di(m, ne, xi, Ln), oe = t?.getTime(), N = Y(() => t !== void 0 ? Ln(t) : te, [oe, te]);
2832
- if (E === "split-dropdown" && !ne && !Ri(N))
2829
+ o !== void 0 && Di("DateSelector", o, t !== void 0);
2830
+ const me = pi("DateSelector", a), q = Zo(w, f), ne = t !== void 0, [te, W] = Ri(m, ne, Mi, Ln), oe = t?.getTime(), N = Y(() => t !== void 0 ? Ln(t) : te, [oe, te]);
2831
+ if (E === "split-dropdown" && !ne && !xi(N))
2833
2832
  throw new RangeError(
2834
2833
  `DateSelector: variant="split-dropdown" cannot draw the uncontrolled selection held from an earlier render (holding ${M(N)}), because that selection's year starts outside the Date range; control the date with value to decide what the split dropdown holds`
2835
2834
  );
2836
2835
  const X = d?.getTime(), F = u?.getTime(), I = Y(() => {
2837
- const T = d ? Ln(d) : null, ee = s !== void 0 ? Ro(s) : null;
2836
+ const T = d ? Ln(d) : null, ee = s !== void 0 ? xo(s) : null;
2838
2837
  return T === null ? ee : ee === null || T.getTime() >= ee.getTime() ? T : ee;
2839
2838
  }, [X, s]), L = Y(() => {
2840
- const T = u ? Ln(u) : null, ee = c !== void 0 ? nl(c) : null;
2839
+ const T = u ? Ln(u) : null, ee = c !== void 0 ? ol(c) : null;
2841
2840
  return T === null ? ee : ee === null || T.getTime() <= ee.getTime() ? T : ee;
2842
2841
  }, [F, c]), H = I?.getTime() ?? null, _ = L?.getTime() ?? null;
2843
2842
  if (I !== null && L !== null && I.getTime() > L.getTime())
@@ -2846,21 +2845,21 @@ const Ln = (e) => {
2846
2845
  throw new RangeError(`DateSelector: variant=${M(E)} requires a lower bound (minYear or minDate) and an upper bound (maxYear or maxDate)${E === "dropdown" ? ", or allowedDates" : ""}; the option list is never invented`);
2847
2846
  const C = Y(() => S === void 0 ? null : S.map((T) => At(T, (ee) => ee.getTime())).join(","), [S]), U = Y(() => {
2848
2847
  if (S === void 0) return null;
2849
- const T = vu(S, (ee, je) => $n(`allowedDates[${ee}]`, je, ""));
2848
+ const T = Su(S, (ee, Ue) => $n(`allowedDates[${ee}]`, Ue, ""));
2850
2849
  return { ascending: T, ascendingSerials: T.map(Tt) };
2851
- }, [C]), j = Y(() => U === null ? null : { ...U, ...bu(U.ascending, I, L) }, [U, H, _]), pe = Y(() => j !== null ? pu(j.ascending, j.ascendingSerials, j.loIndex, j.hiIndex, x, R) : I === null || L === null ? wu : gu(I, L, x, R), [j, H, _, x, R]), re = Y(() => j !== null ? { kind: "candidates", ascending: j.ascendingSerials, loIndex: j.loIndex, hiIndex: j.hiIndex } : { kind: "range", min: I === null ? null : Tt(I), max: L === null ? null : Tt(L) }, [j, H, _]), ce = (T) => !Number.isNaN(T.getTime()) && kn(re, Tt(T)), Re = (T) => {
2850
+ }, [C]), j = Y(() => U === null ? null : { ...U, ...vu(U.ascending, I, L) }, [U, H, _]), pe = Y(() => j !== null ? wu(j.ascending, j.ascendingSerials, j.loIndex, j.hiIndex, x, R) : I === null || L === null ? bu : pu(I, L, x, R), [j, H, _, x, R]), re = Y(() => j !== null ? { kind: "candidates", ascending: j.ascendingSerials, loIndex: j.loIndex, hiIndex: j.hiIndex } : { kind: "range", min: I === null ? null : Tt(I), max: L === null ? null : Tt(L) }, [j, H, _]), ce = (T) => !Number.isNaN(T.getTime()) && _n(re, Tt(T)), Re = (T) => {
2852
2851
  if (h) return;
2853
2852
  const ee = Ln(T);
2854
2853
  ce(ee) && (ne || W(ee), n?.(ee));
2855
2854
  }, ie = N.getTime(), se = ce(N), be = Y(() => {
2856
2855
  const T = nr(re, Tt(N), -1);
2857
2856
  if (T === null) return null;
2858
- const ee = Fn(T);
2857
+ const ee = Un(T);
2859
2858
  return Number.isNaN(ee.getTime()) ? null : ee;
2860
- }, [re, ie]), We = Y(() => {
2859
+ }, [re, ie]), Ge = Y(() => {
2861
2860
  const T = nr(re, Tt(N), 1);
2862
2861
  if (T === null) return null;
2863
- const ee = Fn(T);
2862
+ const ee = Un(T);
2864
2863
  return Number.isNaN(ee.getTime()) ? null : ee;
2865
2864
  }, [re, ie]), bt = () => {
2866
2865
  if (o !== void 0) {
@@ -2873,60 +2872,60 @@ const Ln = (e) => {
2873
2872
  o.onStep("next");
2874
2873
  return;
2875
2874
  }
2876
- We !== null && Re(We);
2875
+ Ge !== null && Re(Ge);
2877
2876
  }, O = (T) => {
2878
2877
  if (T.target.value) {
2879
- const ee = Nc(T.target.value);
2878
+ const ee = Cc(T.target.value);
2880
2879
  Number.isNaN(ee.getTime()) || Re(ee);
2881
2880
  }
2882
- }, Z = N.getFullYear(), fe = N.getMonth() + 1, He = N.getDate(), Se = A((T, ee) => R ? R(ee, T, "part") : Mu(ee, T, "part", x), [R, x]), it = Y(() => {
2881
+ }, Z = N.getFullYear(), fe = N.getMonth() + 1, He = N.getDate(), Se = A((T, ee) => R ? R(ee, T, "part") : yu(ee, T, "part", x), [R, x]), it = Y(() => {
2883
2882
  if (E !== "split-dropdown" || I === null || L === null) return [];
2884
2883
  const T = [];
2885
2884
  for (let ee = L.getFullYear(); ee >= I.getFullYear(); ee--)
2886
- T.push({ value: ee, label: Se("year", Ro(ee)) });
2885
+ T.push({ value: ee, label: Se("year", xo(ee)) });
2887
2886
  return T;
2888
2887
  }, [E, H, _, Se]), Je = Y(() => {
2889
2888
  if (E !== "split-dropdown" || I === null || L === null) return [];
2890
- const T = I, ee = L, je = Z === T.getFullYear() ? T.getMonth() + 1 : 1, mt = Z === ee.getFullYear() ? ee.getMonth() + 1 : 12;
2891
- return al(
2892
- je,
2889
+ const T = I, ee = L, Ue = Z === T.getFullYear() ? T.getMonth() + 1 : 1, mt = Z === ee.getFullYear() ? ee.getMonth() + 1 : 12;
2890
+ return il(
2891
+ Ue,
2893
2892
  mt,
2894
- (Ze) => hr(Z, Ze, 1),
2895
- (Ze, Me) => kl(Ze, Z, Me),
2896
- (Ze) => Se("month", Ze)
2893
+ (Ke) => hr(Z, Ke, 1),
2894
+ (Ke, Me) => _l(Ke, Z, Me),
2895
+ (Ke) => Se("month", Ke)
2897
2896
  );
2898
- }, [E, H, _, Z, Se]), Ge = Y(() => {
2897
+ }, [E, H, _, Z, Se]), je = Y(() => {
2899
2898
  if (E !== "split-dropdown" || I === null || L === null) return [];
2900
- const T = I, ee = L, je = Z === T.getFullYear() && fe === T.getMonth() + 1 ? T.getDate() : 1, mt = Z === ee.getFullYear() && fe === ee.getMonth() + 1 ? ee.getDate() : Hu;
2901
- return al(
2902
- je,
2899
+ const T = I, ee = L, Ue = Z === T.getFullYear() && fe === T.getMonth() + 1 ? T.getDate() : 1, mt = Z === ee.getFullYear() && fe === ee.getMonth() + 1 ? ee.getDate() : Uu;
2900
+ return il(
2901
+ Ue,
2903
2902
  mt,
2904
- (Ze) => hr(Z, fe, Ze),
2905
- (Ze, Me) => ol(Ze, Z, fe, Me),
2906
- (Ze) => Se("day", Ze)
2903
+ (Ke) => hr(Z, fe, Ke),
2904
+ (Ke, Me) => al(Ke, Z, fe, Me),
2905
+ (Ke) => Se("day", Ke)
2907
2906
  );
2908
- }, [E, H, _, Z, fe, Se]), ut = (T, ee, je) => {
2909
- const mt = hr(T, ee, je);
2910
- return ol(mt, T, ee, je) && ce(mt);
2911
- }, ae = (T, ee, je) => {
2912
- ut(T, ee, je) && Re(hr(T, ee, je));
2913
- }, Dt = it.some((T) => T.value === Z), et = Je.some((T) => T.value === fe), vt = Ge.some((T) => T.value === He), ke = Pn(N), Xe = E === "dropdown" ? gt("day", N, R, x) : "", Ee = I ? Pn(I) : void 0, Rt = L ? Pn(L) : void 0, st = "text-center font-mono text-gray-500 tabular-nums [text-align-last:center] [text-align:center] dark:bg-slate-700 dark:text-slate-400";
2914
- return /* @__PURE__ */ $e("div", { className: `inline-flex items-center ${On} ${$}`, style: p, "data-variant": E, "data-out-of-range": se ? void 0 : "true", children: [
2907
+ }, [E, H, _, Z, fe, Se]), ut = (T, ee, Ue) => {
2908
+ const mt = hr(T, ee, Ue);
2909
+ return al(mt, T, ee, Ue) && ce(mt);
2910
+ }, ae = (T, ee, Ue) => {
2911
+ ut(T, ee, Ue) && Re(hr(T, ee, Ue));
2912
+ }, Dt = it.some((T) => T.value === Z), et = Je.some((T) => T.value === fe), vt = je.some((T) => T.value === He), ke = Pn(N), Ze = E === "dropdown" ? gt("day", N, R, x) : "", Ee = I ? Pn(I) : void 0, Rt = L ? Pn(L) : void 0, st = "text-center font-mono text-gray-500 tabular-nums [text-align-last:center] [text-align:center] dark:bg-slate-700 dark:text-slate-400", Ut = `period-slider-date-combobox-field ${zo} appearance-none rounded-md border border-gray-300 bg-gray-100 px-1 py-0.5 text-center font-mono text-gray-900 tabular-nums [text-align-last:center] [text-align:center] focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500`;
2913
+ return /* @__PURE__ */ $e("div", { className: `inline-flex items-center ${Vn} ${$}`, style: p, "data-variant": E, "data-out-of-range": se ? void 0 : "true", children: [
2915
2914
  /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "left", glyph: me, disabled: h, canStep: o === void 0 ? be !== null : o.canStepPrevious, onStep: bt, ariaLabel: q.previousDay }),
2916
2915
  E === "dropdown" ? /* @__PURE__ */ K(
2917
- Vl,
2916
+ kl,
2918
2917
  {
2919
2918
  domain: pe,
2920
2919
  selectedIndex: se ? pe.indexOf(N) : Te,
2921
2920
  openAnchorIndex: pe.nearestIndexOf(N),
2922
- displayLabel: Xe,
2921
+ displayLabel: Ze,
2923
2922
  machineValue: ke,
2924
2923
  disabled: h,
2925
2924
  ariaLabel: q.dateSelect,
2926
2925
  locale: w,
2927
2926
  labels: q,
2928
2927
  onCommitIndex: (T) => Re(pe.dateAt(T)),
2929
- controlClassName: "period-slider-date-combobox-field w-28 appearance-none rounded-md border border-gray-300 bg-gray-100 px-1 py-0.5 text-center font-mono text-gray-900 text-xs tabular-nums [text-align-last:center] [text-align:center] focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500"
2928
+ controlClassName: Ut
2930
2929
  }
2931
2930
  ) : E === "split-dropdown" ? /* @__PURE__ */ $e("div", { className: "inline-flex items-center gap-1", children: [
2932
2931
  /* @__PURE__ */ $e(
@@ -2934,11 +2933,11 @@ const Ln = (e) => {
2934
2933
  {
2935
2934
  "aria-label": q.splitYear,
2936
2935
  disabled: h,
2937
- className: "rounded-md border border-gray-300 bg-gray-50 px-1 py-0.5 text-center font-mono text-gray-900 text-xs tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100",
2936
+ className: `${Cn} rounded-md border border-gray-300 bg-gray-50 px-1 py-0.5 text-center font-mono text-gray-900 tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100`,
2938
2937
  value: Dt ? Z : "",
2939
2938
  onChange: (T) => ae(Number(T.target.value), fe, He),
2940
2939
  children: [
2941
- Dt ? null : /* @__PURE__ */ K("option", { value: "", disabled: !0, className: st, children: Se("year", Ro(Z)) }),
2940
+ Dt ? null : /* @__PURE__ */ K("option", { value: "", disabled: !0, className: st, children: Se("year", xo(Z)) }),
2942
2941
  it.map((T) => /* @__PURE__ */ K("option", { value: T.value, disabled: !ut(T.value, fe, He), className: "dark:bg-slate-700 dark:text-slate-100", children: T.label }, T.value))
2943
2942
  ]
2944
2943
  }
@@ -2948,7 +2947,7 @@ const Ln = (e) => {
2948
2947
  {
2949
2948
  "aria-label": q.splitMonth,
2950
2949
  disabled: h,
2951
- className: "rounded-md border border-gray-300 bg-gray-50 px-1 py-0.5 text-center font-mono text-gray-900 text-xs tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100",
2950
+ className: `${Cn} rounded-md border border-gray-300 bg-gray-50 px-1 py-0.5 text-center font-mono text-gray-900 tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100`,
2952
2951
  value: et ? fe : "",
2953
2952
  onChange: (T) => ae(Z, Number(T.target.value), He),
2954
2953
  children: [
@@ -2962,12 +2961,12 @@ const Ln = (e) => {
2962
2961
  {
2963
2962
  "aria-label": q.splitDay,
2964
2963
  disabled: h,
2965
- className: "rounded-md border border-gray-300 bg-gray-50 px-1 py-0.5 text-center font-mono text-gray-900 text-xs tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100",
2964
+ className: `${Cn} rounded-md border border-gray-300 bg-gray-50 px-1 py-0.5 text-center font-mono text-gray-900 tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100`,
2966
2965
  value: vt ? He : "",
2967
2966
  onChange: (T) => ae(Z, fe, Number(T.target.value)),
2968
2967
  children: [
2969
2968
  vt ? null : /* @__PURE__ */ K("option", { value: "", disabled: !0, className: st, children: Se("day", hr(Z, fe, He)) }),
2970
- Ge.map((T) => /* @__PURE__ */ K("option", { value: T.value, disabled: !ut(Z, fe, T.value), className: "dark:bg-slate-700 dark:text-slate-100", children: T.label }, T.value))
2969
+ je.map((T) => /* @__PURE__ */ K("option", { value: T.value, disabled: !ut(Z, fe, T.value), className: "dark:bg-slate-700 dark:text-slate-100", children: T.label }, T.value))
2971
2970
  ]
2972
2971
  }
2973
2972
  )
@@ -2976,7 +2975,7 @@ const Ln = (e) => {
2976
2975
  {
2977
2976
  "aria-label": q.dateSelect,
2978
2977
  disabled: h,
2979
- className: "period-slider-native-date-field w-28 rounded-md border border-gray-300 bg-gray-100 px-1 py-0.5 text-center font-mono text-gray-900 text-xs tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500 dark:placeholder:text-gray-400",
2978
+ className: `period-slider-native-date-field ${zo} rounded-md border border-gray-300 bg-gray-100 px-1 py-0.5 text-center font-mono text-gray-900 tabular-nums focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500 dark:placeholder:text-gray-400`,
2980
2979
  value: ke,
2981
2980
  min: Ee,
2982
2981
  max: Rt,
@@ -2984,98 +2983,98 @@ const Ln = (e) => {
2984
2983
  type: "date"
2985
2984
  }
2986
2985
  ),
2987
- /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "right", glyph: me, disabled: h, canStep: o === void 0 ? We !== null : o.canStepNext, onStep: we, ariaLabel: q.nextDay }),
2986
+ /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "right", glyph: me, disabled: h, canStep: o === void 0 ? Ge !== null : o.canStepNext, onStep: we, ariaLabel: q.nextDay }),
2988
2987
  i
2989
2988
  ] });
2990
- }, zu = (e, t) => !(!vi(e, t, t.variant === "split-dropdown" ? Fu : xi) || e.variant !== t.variant || e.disabled !== t.disabled || e.className !== t.className || e.style !== t.style || e.minYear !== t.minYear || e.maxYear !== t.maxYear || e.onChange !== t.onChange || e.stepper === void 0 != (t.stepper === void 0) || e.value === void 0 != (t.value === void 0) || e.stepper?.onStep !== t.stepper?.onStep || e.stepper?.canStepPrevious !== t.stepper?.canStepPrevious || e.stepper?.canStepNext !== t.stepper?.canStepNext || e.stepGlyph !== t.stepGlyph || e.allowedDates !== t.allowedDates || e.children !== t.children || e.locale !== t.locale || !Ko(e.labels, t.labels) || e.formatLocale !== t.formatLocale || e.formatOption !== t.formatOption), Bu = Gn(Uu, zu);
2991
- Bu.displayName = "DateSelector";
2992
- function Xn(e, t) {
2989
+ }, Wu = (e, t) => !(!Si(e, t, t.variant === "split-dropdown" ? zu : Mi) || e.variant !== t.variant || e.disabled !== t.disabled || e.className !== t.className || e.style !== t.style || e.minYear !== t.minYear || e.maxYear !== t.maxYear || e.onChange !== t.onChange || e.stepper === void 0 != (t.stepper === void 0) || e.value === void 0 != (t.value === void 0) || e.stepper?.onStep !== t.stepper?.onStep || e.stepper?.canStepPrevious !== t.stepper?.canStepPrevious || e.stepper?.canStepNext !== t.stepper?.canStepNext || e.stepGlyph !== t.stepGlyph || e.allowedDates !== t.allowedDates || e.children !== t.children || e.locale !== t.locale || !Xo(e.labels, t.labels) || e.formatLocale !== t.formatLocale || e.formatOption !== t.formatOption), Gu = jn(Bu, Wu);
2990
+ Gu.displayName = "DateSelector";
2991
+ function Zn(e, t) {
2993
2992
  const r = e + Math.floor(t / 12), n = (t % 12 + 12) % 12, o = /* @__PURE__ */ new Date(0);
2994
2993
  return o.setHours(0, 0, 0, 0), o.setFullYear(r, n, 1), o;
2995
2994
  }
2996
- function Un(e) {
2997
- const t = qn(e, "month", 0);
2995
+ function zn(e) {
2996
+ const t = Xn(e, "month", 0);
2998
2997
  return le("month", t === null ? Number.NaN : t, 0);
2999
2998
  }
3000
- const _l = (e) => na(e, "month", 0);
2999
+ const Yl = (e) => aa(e, "month", 0);
3001
3000
  function Ir(e) {
3002
- return `${Qo(e.getFullYear())}-${String(e.getMonth() + 1).padStart(2, "0")}`;
3001
+ return `${ea(e.getFullYear())}-${String(e.getMonth() + 1).padStart(2, "0")}`;
3003
3002
  }
3004
- const il = Kn("leave the bound out where the variant allows it, or declare the months to offer with minYear / maxYear or allowedMonths");
3005
- function Mo(e, t, r) {
3006
- e !== void 0 && Yl(e, t, r);
3003
+ const sl = qn("leave the bound out where the variant allows it, or declare the months to offer with minYear / maxYear or allowedMonths");
3004
+ function yo(e, t, r) {
3005
+ e !== void 0 && Hl(e, t, r);
3007
3006
  }
3008
- function Yl(e, t, r) {
3007
+ function Hl(e, t, r) {
3009
3008
  if (!ye(e))
3010
3009
  throw new RangeError(`MonthSelector: ${t} must be a valid Date (received: ${M(e)})`);
3011
3010
  Qe("MonthSelector", t, e, "month", 0, r);
3012
3011
  }
3013
- function sl(e, t, r) {
3012
+ function ll(e, t, r) {
3014
3013
  if (e !== void 0) {
3015
3014
  if (!Number.isInteger(e))
3016
3015
  throw new RangeError(`MonthSelector: ${t} must be an integer year (received: ${M(e)})`);
3017
- if (Number.isNaN(Xn(e, r).getTime()))
3016
+ if (Number.isNaN(Zn(e, r).getTime()))
3018
3017
  throw new RangeError(`MonthSelector: ${t} must name a year whose ${r === 0 ? "January" : "December"} starts inside the Date range (received: ${M(e)})`);
3019
3018
  }
3020
3019
  }
3021
- function Wu(e, t) {
3022
- const r = e === void 0 ? null : Xn(e, 0), n = t === void 0 ? null : Un(t);
3020
+ function ju(e, t) {
3021
+ const r = e === void 0 ? null : Zn(e, 0), n = t === void 0 ? null : zn(t);
3023
3022
  return r !== null && n !== null ? r >= n ? r : n : r !== null ? r : n;
3024
3023
  }
3025
- function Gu(e, t) {
3026
- const r = e === void 0 ? null : Xn(e, 11), n = t === void 0 ? null : Un(t);
3024
+ function Ku(e, t) {
3025
+ const r = e === void 0 ? null : Zn(e, 11), n = t === void 0 ? null : zn(t);
3027
3026
  return r !== null && n !== null ? r <= n ? r : n : r !== null ? r : n;
3028
3027
  }
3029
3028
  function gr(e) {
3030
3029
  return e.getFullYear() * 12 + e.getMonth();
3031
3030
  }
3032
- function ri(e) {
3033
- return Xn(Math.floor(e / 12), (e % 12 + 12) % 12);
3031
+ function oi(e) {
3032
+ return Zn(Math.floor(e / 12), (e % 12 + 12) % 12);
3034
3033
  }
3035
- function ll(e) {
3034
+ function cl(e) {
3036
3035
  return Number.isNaN(e.getTime()) ? null : e;
3037
3036
  }
3038
- function ju(e, t, r) {
3037
+ function qu(e, t, r) {
3039
3038
  const n = /* @__PURE__ */ new Map();
3040
3039
  for (const o of e) {
3041
- const a = Un(o);
3040
+ const a = zn(o);
3042
3041
  t !== null && a < t || r !== null && a > r || n.has(a.getTime()) || n.set(a.getTime(), a);
3043
3042
  }
3044
3043
  return Array.from(n.values()).sort((o, a) => o.getTime() - a.getTime());
3045
3044
  }
3046
- function Ku(e, t) {
3045
+ function Xu(e, t) {
3047
3046
  const r = [];
3048
3047
  for (let n = gr(e); n <= gr(t); n++)
3049
- r.push(ri(n));
3048
+ r.push(oi(n));
3050
3049
  return r;
3051
3050
  }
3052
- function cl(e, t, r) {
3051
+ function dl(e, t, r) {
3053
3052
  const n = [];
3054
3053
  for (let o = e.length - 1; o >= 0; o--)
3055
3054
  n.push({ label: gt("month", e[o], r, t), value: Ir(e[o]) });
3056
3055
  return n;
3057
3056
  }
3058
- const qu = (e) => {
3057
+ const Zu = (e) => {
3059
3058
  const { value: t, initialDate: r, onChange: n, stepper: o, stepGlyph: a, children: i, variant: s = "date", minYear: c, maxYear: d, minDate: u, maxDate: S, allowedMonths: E, isWarning: $ = !1, className: p = "", style: h, disabled: w = !1, locale: f, labels: x, formatLocale: R, formatOption: b } = e;
3060
- if (R !== void 0 && ra("MonthSelector", "formatLocale", R), Mo(t, "value", ""), Mo(r, "initialDate", ""), Mo(u, "minDate", il), Mo(S, "maxDate", il), sl(c, "minYear", 0), sl(d, "maxYear", 11), mn("MonthSelector", "allowedMonths", E), E !== void 0)
3059
+ if (R !== void 0 && oa("MonthSelector", "formatLocale", R), yo(t, "value", ""), yo(r, "initialDate", ""), yo(u, "minDate", sl), yo(S, "maxDate", sl), ll(c, "minYear", 0), ll(d, "maxYear", 11), mn("MonthSelector", "allowedMonths", E), E !== void 0)
3061
3060
  for (let ae = 0; ae < E.length; ae++)
3062
- Yl(E[ae], `allowedMonths[${ae}]`, "");
3061
+ Hl(E[ae], `allowedMonths[${ae}]`, "");
3063
3062
  const m = t ?? r;
3064
3063
  if (m === void 0)
3065
3064
  throw new RangeError("MonthSelector: either value (controlled) or initialDate (uncontrolled) is required; the selected month is never inferred from the wall clock");
3066
- o !== void 0 && Si("MonthSelector", o, t !== void 0);
3067
- const me = hi("MonthSelector", a), q = qo(f, x), ne = t !== void 0, [te, W] = Di(m, ne, _l, Un), oe = Y(() => t !== void 0 ? Un(t) : te, [t?.getTime(), te]), N = u?.getTime(), X = S?.getTime(), F = Y(() => Wu(c, u), [c, N]), I = Y(() => Gu(d, S), [d, X]), L = F?.getTime() ?? null, H = I?.getTime() ?? null;
3065
+ o !== void 0 && Di("MonthSelector", o, t !== void 0);
3066
+ const me = pi("MonthSelector", a), q = Zo(f, x), ne = t !== void 0, [te, W] = Ri(m, ne, Yl, zn), oe = Y(() => t !== void 0 ? zn(t) : te, [t?.getTime(), te]), N = u?.getTime(), X = S?.getTime(), F = Y(() => ju(c, u), [c, N]), I = Y(() => Ku(d, S), [d, X]), L = F?.getTime() ?? null, H = I?.getTime() ?? null;
3068
3067
  if (F !== null && I !== null && F > I)
3069
3068
  throw new RangeError(`MonthSelector: the resolved upper bound must not precede the resolved lower bound (lower: ${Ir(F)}, upper: ${Ir(I)})`);
3070
3069
  if (s === "dropdown" && E === void 0 && (F === null || I === null))
3071
3070
  throw new RangeError('MonthSelector: variant="dropdown" requires a lower bound (minYear or minDate) and an upper bound (maxYear or maxDate), or allowedMonths; the option list is never invented');
3072
- const _ = E === void 0 ? null : E.map((ae) => ae.getTime()).join(","), C = Y(() => E === void 0 ? null : ju(E, F, I), [_, L, H]), U = Y(() => {
3071
+ const _ = E === void 0 ? null : E.map((ae) => ae.getTime()).join(","), C = Y(() => E === void 0 ? null : qu(E, F, I), [_, L, H]), U = Y(() => {
3073
3072
  if (C !== null) {
3074
3073
  const ae = C.map(gr);
3075
3074
  return { kind: "candidates", ascending: ae, loIndex: 0, hiIndex: ae.length - 1 };
3076
3075
  }
3077
3076
  return { kind: "range", min: F === null ? null : gr(F), max: I === null ? null : gr(I) };
3078
- }, [C, L, H]), j = (ae) => !Number.isNaN(ae.getTime()) && kn(U, gr(ae)), pe = (ae) => {
3077
+ }, [C, L, H]), j = (ae) => !Number.isNaN(ae.getTime()) && _n(U, gr(ae)), pe = (ae) => {
3079
3078
  if (w) return;
3080
3079
  if (!j(ae))
3081
3080
  throw new RangeError(`MonthSelector: refusing to emit ${Ir(ae)}, which lies outside the selectable months`);
@@ -3084,10 +3083,10 @@ const qu = (e) => {
3084
3083
  n?.(ae, Dt);
3085
3084
  }, re = oe.getTime(), ce = j(oe), Re = Y(() => {
3086
3085
  const ae = nr(U, gr(oe), -1);
3087
- return ae === null ? null : ll(ri(ae));
3086
+ return ae === null ? null : cl(oi(ae));
3088
3087
  }, [U, re]), ie = Y(() => {
3089
3088
  const ae = nr(U, gr(oe), 1);
3090
- return ae === null ? null : ll(ri(ae));
3089
+ return ae === null ? null : cl(oi(ae));
3091
3090
  }, [U, re]), se = () => {
3092
3091
  if (o !== void 0) {
3093
3092
  o.onStep("previous");
@@ -3100,33 +3099,33 @@ const qu = (e) => {
3100
3099
  return;
3101
3100
  }
3102
3101
  ie !== null && pe(ie);
3103
- }, We = (ae) => {
3102
+ }, Ge = (ae) => {
3104
3103
  if (!ae) return;
3105
3104
  const Dt = ae.lastIndexOf("-");
3106
3105
  if (Dt <= 0) return;
3107
- const et = ae.slice(0, Dt), vt = ae.slice(Dt + 1), ke = Number(et), Xe = Number(vt) - 1;
3108
- if (!(Number.isInteger(ke) && Number.isInteger(Xe))) return;
3109
- const Ee = Xn(ke, Xe);
3106
+ const et = ae.slice(0, Dt), vt = ae.slice(Dt + 1), ke = Number(et), Ze = Number(vt) - 1;
3107
+ if (!(Number.isInteger(ke) && Number.isInteger(Ze))) return;
3108
+ const Ee = Zn(ke, Ze);
3110
3109
  j(Ee) && pe(Ee);
3111
3110
  }, bt = (ae) => {
3112
- We(ae.target.value);
3111
+ Ge(ae.target.value);
3113
3112
  }, we = (ae) => {
3114
- We(ae.target.value);
3115
- }, O = Ir(oe), Z = s === "dropdown" && !ce ? gt("month", oe, b, R) : "", fe = F ? Ir(F) : void 0, He = I ? Ir(I) : void 0, Se = Y(() => s !== "dropdown" ? [] : C !== null ? cl(C, R, b) : F === null || I === null ? [] : cl(Ku(F, I), R, b), [s, C, L, H, R, b]), it = ce ? O : "", Je = $ ? "border-amber-300 bg-amber-50 text-amber-900 focus:border-amber-500 focus:ring-amber-500 dark:border-amber-900/50 dark:bg-amber-950/20 dark:text-amber-200" : "border-gray-300 bg-gray-100 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500", Ge = `period-slider-native-date-field w-28 rounded-md border py-0.5 px-1 text-center font-mono text-xs tabular-nums dark:placeholder:text-gray-400 disabled:opacity-50 ${Je}`, ut = `w-28 appearance-none rounded-md border px-1 py-0.5 text-center font-mono text-xs tabular-nums [text-align-last:center] [text-align:center] disabled:opacity-50 ${Je}`;
3116
- return /* @__PURE__ */ $e("div", { className: `inline-flex items-center ${On} ${p}`, style: h, "data-out-of-range": ce ? void 0 : "true", children: [
3113
+ Ge(ae.target.value);
3114
+ }, O = Ir(oe), Z = s === "dropdown" && !ce ? gt("month", oe, b, R) : "", fe = F ? Ir(F) : void 0, He = I ? Ir(I) : void 0, Se = Y(() => s !== "dropdown" ? [] : C !== null ? dl(C, R, b) : F === null || I === null ? [] : dl(Xu(F, I), R, b), [s, C, L, H, R, b]), it = ce ? O : "", Je = $ ? "border-amber-300 bg-amber-50 text-amber-900 focus:border-amber-500 focus:ring-amber-500 dark:border-amber-900/50 dark:bg-amber-950/20 dark:text-amber-200" : "border-gray-300 bg-gray-100 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500", je = `period-slider-native-date-field ${zo} rounded-md border py-0.5 px-1 text-center font-mono tabular-nums dark:placeholder:text-gray-400 disabled:opacity-50 ${Je}`, ut = `${zo} appearance-none rounded-md border px-1 py-0.5 text-center font-mono tabular-nums [text-align-last:center] [text-align:center] disabled:opacity-50 ${Je}`;
3115
+ return /* @__PURE__ */ $e("div", { className: `inline-flex items-center ${Vn} ${p}`, style: h, "data-out-of-range": ce ? void 0 : "true", children: [
3117
3116
  /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "left", glyph: me, disabled: w, canStep: o === void 0 ? Re !== null : o.canStepPrevious, onStep: se, ariaLabel: q.previousMonth }),
3118
3117
  s === "dropdown" ? /* @__PURE__ */ $e("select", { "aria-label": q.monthSelect, disabled: w, className: ut, value: it, onChange: we, children: [
3119
3118
  ce ? null : /* @__PURE__ */ K("option", { value: "", disabled: !0, className: "text-center font-mono text-gray-500 tabular-nums [text-align-last:center] [text-align:center] dark:bg-slate-700 dark:text-slate-400", children: Z }),
3120
3119
  Se.map((ae) => /* @__PURE__ */ K("option", { value: ae.value, className: "text-center font-mono text-gray-900 tabular-nums [text-align-last:center] [text-align:center] dark:bg-slate-700 dark:text-slate-100", children: ae.label }, ae.value))
3121
- ] }) : /* @__PURE__ */ K("input", { "aria-label": q.monthSelect, disabled: w, className: Ge, value: O, min: fe, max: He, onChange: bt, type: "month" }),
3120
+ ] }) : /* @__PURE__ */ K("input", { "aria-label": q.monthSelect, disabled: w, className: je, value: O, min: fe, max: He, onChange: bt, type: "month" }),
3122
3121
  /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "right", glyph: me, disabled: w, canStep: o === void 0 ? ie !== null : o.canStepNext, onStep: be, ariaLabel: q.nextMonth }),
3123
3122
  i
3124
3123
  ] });
3125
- }, Xu = (e, t) => !(!vi(e, t, _l) || e.variant !== t.variant || e.disabled !== t.disabled || e.className !== t.className || e.style !== t.style || e.isWarning !== t.isWarning || e.minYear !== t.minYear || e.maxYear !== t.maxYear || e.allowedMonths !== t.allowedMonths || e.onChange !== t.onChange || e.stepper === void 0 != (t.stepper === void 0) || e.value === void 0 != (t.value === void 0) || e.stepper?.onStep !== t.stepper?.onStep || e.stepper?.canStepPrevious !== t.stepper?.canStepPrevious || e.stepper?.canStepNext !== t.stepper?.canStepNext || e.stepGlyph !== t.stepGlyph || e.children !== t.children || e.locale !== t.locale || !Ko(e.labels, t.labels) || e.formatLocale !== t.formatLocale || e.formatOption !== t.formatOption), Zu = Gn(qu, Xu);
3126
- Zu.displayName = "MonthSelector";
3127
- const ni = /* @__PURE__ */ Symbol("nothing handed");
3128
- let Ga = 0;
3129
- class Qu {
3124
+ }, Qu = (e, t) => !(!Si(e, t, Yl) || e.variant !== t.variant || e.disabled !== t.disabled || e.className !== t.className || e.style !== t.style || e.isWarning !== t.isWarning || e.minYear !== t.minYear || e.maxYear !== t.maxYear || e.allowedMonths !== t.allowedMonths || e.onChange !== t.onChange || e.stepper === void 0 != (t.stepper === void 0) || e.value === void 0 != (t.value === void 0) || e.stepper?.onStep !== t.stepper?.onStep || e.stepper?.canStepPrevious !== t.stepper?.canStepPrevious || e.stepper?.canStepNext !== t.stepper?.canStepNext || e.stepGlyph !== t.stepGlyph || e.children !== t.children || e.locale !== t.locale || !Xo(e.labels, t.labels) || e.formatLocale !== t.formatLocale || e.formatOption !== t.formatOption), Ju = jn(Zu, Qu);
3125
+ Ju.displayName = "MonthSelector";
3126
+ const ai = /* @__PURE__ */ Symbol("nothing handed");
3127
+ let Ka = 0;
3128
+ class em {
3130
3129
  /**
3131
3130
  * Opens the pass.
3132
3131
  * 描画の範囲を開くコンストラクタ。
@@ -3255,7 +3254,7 @@ class Qu {
3255
3254
  this.closed = !0;
3256
3255
  }
3257
3256
  }
3258
- class Ju {
3257
+ class tm {
3259
3258
  /**
3260
3259
  * Creates the scope with a pass opened over the first render's states; no mark names that pass, so the first body run opens its own (begin).
3261
3260
  * 最初の描画のステートで開いた範囲を持つ描画の範囲を作るコンストラクタ (どの印もその範囲を指さないため、最初の本体の実行は自分の範囲を開く。begin)。
@@ -3265,7 +3264,7 @@ class Ju {
3265
3264
  * @param setMark - Dispatches the host's render-phase mark, with an identity stable for the life of the component; each pass calls it the first time a call records something into the pass (RenderPass, useRenderScope) / ホストへ描画中の印を付ける関数 (同一性はコンポーネントの存続中ずっと変わらない。各範囲は、呼び出しが範囲へ初めて何かを記録したときに呼ぶ。RenderPass・useRenderScope)
3266
3265
  */
3267
3266
  constructor(t, r, n) {
3268
- this.owner = t, this.setMark = n, this.slotWrites = r.map(() => 0), this.records = r.map(() => ni), this.latest = this.open(r);
3267
+ this.owner = t, this.setMark = n, this.slotWrites = r.map(() => 0), this.records = r.map(() => ai), this.latest = this.open(r);
3269
3268
  }
3270
3269
  owner;
3271
3270
  setMark;
@@ -3305,11 +3304,11 @@ class Ju {
3305
3304
  const r = this.latest;
3306
3305
  if (r.closed) throw new Error(`${this.owner}: duringRender(action) must be called during the host's render, after the hook call (call the returned functions directly from event handlers and effects)`);
3307
3306
  const n = this.active;
3308
- this.active = r, Ga += 1;
3307
+ this.active = r, Ka += 1;
3309
3308
  try {
3310
3309
  t();
3311
3310
  } finally {
3312
- Ga -= 1, this.active = n;
3311
+ Ka -= 1, this.active = n;
3313
3312
  }
3314
3313
  };
3315
3314
  /**
@@ -3320,7 +3319,7 @@ class Ju {
3320
3319
  * @throws {Error} While another instance runs an action and this scope runs none, before the call does anything (`<owner>: a returned function was called during another hook's duringRender(action); ...`) / ほかのインスタンスが動作を走らせ、この範囲が走らせていない間 (呼び出しが何かをする前に送出)
3321
3320
  */
3322
3321
  get pass() {
3323
- if (this.active === null && Ga > 0) throw new Error(`${this.owner}: a returned function was called during another hook's duringRender(action); call it inside this hook's own duringRender(action)`);
3322
+ if (this.active === null && Ka > 0) throw new Error(`${this.owner}: a returned function was called during another hook's duringRender(action); call it inside this hook's own duringRender(action)`);
3324
3323
  return this.active;
3325
3324
  }
3326
3325
  /**
@@ -3374,7 +3373,7 @@ class Ju {
3374
3373
  * @returns The new pass / 新しい範囲
3375
3374
  */
3376
3375
  open(t) {
3377
- const r = t.map((o, a) => this.records[a] !== ni && this.records[a] !== o), n = new Qu(t, [...this.slotWrites], r, this.setMark);
3376
+ const r = t.map((o, a) => this.records[a] !== ai && this.records[a] !== o), n = new em(t, [...this.slotWrites], r, this.setMark);
3378
3377
  return this.closeAtEndOfRun(n), n;
3379
3378
  }
3380
3379
  /**
@@ -3450,7 +3449,7 @@ class Ju {
3450
3449
  this.deliver(), r();
3451
3450
  }
3452
3451
  }
3453
- class em extends Al {
3452
+ class rm extends Nl {
3454
3453
  /**
3455
3454
  * Creates the mirror with the first render's value.
3456
3455
  * 最初の描画の値で写しを作るコンストラクタ。
@@ -3523,7 +3522,7 @@ class em extends Al {
3523
3522
  * @returns Nothing / なし
3524
3523
  */
3525
3524
  forgetHanded(t) {
3526
- this.scope.wrote(this.slot), this.scope.handedTo(this.slot) === t && this.scope.recordHanded(this.slot, ni);
3525
+ this.scope.wrote(this.slot), this.scope.handedTo(this.slot) === t && this.scope.recordHanded(this.slot, ai);
3527
3526
  }
3528
3527
  /**
3529
3528
  * Records the object a committed pass handed to the state, when the committed state is that object, and keeps the hand-off until the host's layout effect records it into the state's queue (recordAdopted).
@@ -3566,7 +3565,7 @@ class em extends Al {
3566
3565
  r !== null && (this.adopted = null, t((n) => n === r.opening ? r.handed : n));
3567
3566
  }
3568
3567
  }
3569
- class tm {
3568
+ class nm {
3570
3569
  /**
3571
3570
  * Creates the ref.
3572
3571
  * ref を作るコンストラクタ。
@@ -3617,52 +3616,52 @@ class tm {
3617
3616
  this.held = t.read(this, this.held);
3618
3617
  }
3619
3618
  }
3620
- const rm = (e, t) => t;
3621
- function oa(e, t) {
3622
- const [r, n] = bl(rm, null), [o] = Be(() => new Ju(e, t, n)), a = o.begin(t, r);
3623
- return wl(() => {
3619
+ const om = (e, t) => t;
3620
+ function ia(e, t) {
3621
+ const [r, n] = vl(om, null), [o] = We(() => new tm(e, t, n)), a = o.begin(t, r);
3622
+ return bl(() => {
3624
3623
  o.commit(a, t);
3625
3624
  }), at(() => {
3626
3625
  o.deliver();
3627
3626
  }), o;
3628
3627
  }
3629
3628
  function on(e, t, r, n) {
3630
- const o = Nl(r, (a) => new em(a, e, t));
3629
+ const o = Cl(r, (a) => new rm(a, e, t));
3631
3630
  return at(() => {
3632
3631
  o.recordAdopted(n);
3633
3632
  }), o;
3634
3633
  }
3635
3634
  function an(e, t, r) {
3636
- const [n] = Be(() => new tm(r, e, t));
3635
+ const [n] = We(() => new nm(r, e, t));
3637
3636
  return n;
3638
3637
  }
3639
3638
  function Ve(e, t, r) {
3640
3639
  return e < t ? t : e > r ? r : e;
3641
3640
  }
3642
- const nm = fn([], null, null);
3643
- function zn(e, t, r, n) {
3644
- return r === null ? nm : oi(r, z(t, e[0], n), z(t, e[1], n));
3641
+ const am = fn([], null, null);
3642
+ function Bn(e, t, r, n) {
3643
+ return r === null ? am : ii(r, z(t, e[0], n), z(t, e[1], n));
3645
3644
  }
3646
3645
  function Ar(e, t, r, n, o) {
3647
- const a = z(t, e, o), i = ai(n) ? null : _n(n, a);
3646
+ const a = z(t, e, o), i = si(n) ? null : Yn(n, a);
3648
3647
  return i === null ? a < z(t, r[0], o) ? r[0] : a > z(t, r[1], o) ? r[1] : e : i === a ? e : le(t, i, o);
3649
3648
  }
3650
3649
  function rn(e, t, r, n, o, a) {
3651
- const i = z(t, e[0], o), s = z(t, e[1], o), c = Io(a, { kind: "range", min: z(t, r[0], o), max: z(t, r[1], o) }, i, s);
3650
+ const i = z(t, e[0], o), s = z(t, e[1], o), c = Ao(a, { kind: "range", min: z(t, r[0], o), max: z(t, r[1], o) }, i, s);
3652
3651
  if (c === null) return e;
3653
3652
  const d = Ar(c[0] === i ? e[0] : le(t, c[0], o), t, r, n, o), u = Ar(c[1] === s ? e[1] : le(t, c[1], o), t, r, n, o);
3654
3653
  return [d, u < d ? d : u];
3655
3654
  }
3656
- const dl = (e, t, r, n, o, a, i) => {
3655
+ const ul = (e, t, r, n, o, a, i) => {
3657
3656
  if (mn(e, t, r), r === void 0 || r.length === 0) return null;
3658
- const s = fn(Cl(e, t, r, n, i), z(n, o, i), z(n, a, i));
3657
+ const s = fn(Ol(e, t, r, n, i), z(n, o, i), z(n, a, i));
3659
3658
  if (s.hiIndex < s.loIndex)
3660
3659
  throw new RangeError(`${e}: every ${t} entry falls outside [minDate, maxDate] (minDate: ${M(o)}, maxDate: ${M(a)}, entries: ${r.length})`);
3661
3660
  return s;
3662
- }, oi = (e, t, r) => {
3661
+ }, ii = (e, t, r) => {
3663
3662
  const n = fn(e.ascending, t, r);
3664
3663
  return { kind: "candidates", ascending: e.ascending, loIndex: Math.max(e.loIndex, n.loIndex), hiIndex: Math.min(e.hiIndex, n.hiIndex) };
3665
- }, ai = (e) => e.hiIndex < e.loIndex, om = (e) => ({
3664
+ }, si = (e) => e.hiIndex < e.loIndex, im = (e) => ({
3666
3665
  stepEnd: (t, r) => {
3667
3666
  let n = null;
3668
3667
  for (const o of e) {
@@ -3674,12 +3673,12 @@ const dl = (e, t, r, n, o, a, i) => {
3674
3673
  edge: (t) => {
3675
3674
  let r = null;
3676
3675
  for (const n of e) {
3677
- const o = Vn(n, t);
3676
+ const o = kn(n, t);
3678
3677
  o !== null && (r === null || (t === 1 ? o > r : o < r)) && (r = o);
3679
3678
  }
3680
3679
  return r;
3681
3680
  }
3682
- }), It = (e, t) => e[0].getTime() === t[0].getTime() && e[1].getTime() === t[1].getTime(), ul = (e, t, r, n, o) => {
3681
+ }), It = (e, t) => e[0].getTime() === t[0].getTime() && e[1].getTime() === t[1].getTime(), ml = (e, t, r, n, o) => {
3683
3682
  if (!Ht(r) || r.length !== 2)
3684
3683
  throw new RangeError(`${e}: ${t} must be a [start, end] tuple of Dates (received: ${M(r)})`);
3685
3684
  const a = er(e, `${t}[0]`, r[0], n, o), i = er(e, `${t}[1]`, r[1], n, o);
@@ -3706,16 +3705,16 @@ const dl = (e, t, r, n, o, a, i) => {
3706
3705
  if (s.getTime() <= i.getTime())
3707
3706
  throw new RangeError(`${t}: maxDate must be strictly later than minDate (minDate: ${M(i)}, maxDate: ${M(s)})`);
3708
3707
  er(t, "minDate", i, o, u), er(t, "minDate", i, a, u), Or(t, "rules", e.rules, r === "macro" ? "motion" : "vernierRange");
3709
- const S = ul(t, "macroRange", c, o, u);
3708
+ const S = ml(t, "macroRange", c, o, u);
3710
3709
  if (c[1].getTime() < c[0].getTime())
3711
3710
  throw new RangeError(`${t}: macroRange must not be inverted (start: ${M(c[0])}, end: ${M(c[1])})`);
3712
- const E = ul(t, "microSelection", d, a, u), $ = dl(t, "macroAllowedDates", e.macroAllowedDates, o, i, s, u), p = dl(t, "microAllowedDates", e.microAllowedDates, a, i, s, u), h = [c[0], c[1]], w = [d[0], d[1]], f = (N) => {
3711
+ const E = ml(t, "microSelection", d, a, u), $ = ul(t, "macroAllowedDates", e.macroAllowedDates, o, i, s, u), p = ul(t, "microAllowedDates", e.microAllowedDates, a, i, s, u), h = [c[0], c[1]], w = [d[0], d[1]], f = (N) => {
3713
3712
  const X = Yt(o, a, [N[0], N[1]], i, s, u);
3714
3713
  return [z(a, X[0], u), z(a, X[1], u)];
3715
3714
  }, x = (N, X) => {
3716
3715
  if (p !== null) {
3717
- const F = oi(p, N, X);
3718
- if (!ai(F)) return F;
3716
+ const F = ii(p, N, X);
3717
+ if (!si(F)) return F;
3719
3718
  }
3720
3719
  return { kind: "range", min: N, max: X };
3721
3720
  }, R = (N, X) => {
@@ -3723,13 +3722,13 @@ const dl = (e, t, r, n, o, a, i) => {
3723
3722
  return F === h && It(X, w) ? null : { macroRange: F, microSelection: X };
3724
3723
  };
3725
3724
  if (e.row === "macro") {
3726
- const N = $ ?? { kind: "range", min: z(o, i, u), max: z(o, s, u) }, X = $o(N), F = (L, H) => {
3725
+ const N = $ ?? { kind: "range", min: z(o, i, u), max: z(o, s, u) }, X = To(N), F = (L, H) => {
3727
3726
  const _ = Yt(o, a, L, i, s, u);
3728
- return rn(w, a, _, zn(_, a, p, u), u, H);
3727
+ return rn(w, a, _, Bn(_, a, p, u), u, H);
3729
3728
  }, I = (L, H) => {
3730
- const _ = qa(X, S[0], S[1], L, Ja(H, n));
3729
+ const _ = Za(X, S[0], S[1], L, ti(H, n));
3731
3730
  if (_ === null) return null;
3732
- const C = ei(_, S, h, o, u, H.motion === "single");
3731
+ const C = ri(_, S, h, o, u, H.motion === "single");
3733
3732
  if (C === null) return null;
3734
3733
  const U = [Ve(C[0], i, s), Ve(C[1], i, s)], j = Math.sign(_[0] - S[0]) === L && Math.sign(_[1] - S[1]) === L;
3735
3734
  return R(U, F(U, j ? "pan" : "resize"));
@@ -3742,29 +3741,29 @@ const dl = (e, t, r, n, o, a, i) => {
3742
3741
  const N = f([le(o, $.ascending[$.loIndex], u), le(o, $.ascending[$.hiIndex], u)]);
3743
3742
  m = [Math.min(N[0], b[0]), Math.max(N[1], b[1])];
3744
3743
  }
3745
- const me = p === null ? null : oi(p, m[0], m[1]);
3746
- let q = $o({ kind: "range", min: m[0], max: m[1] });
3747
- if (me !== null && !ai(me)) {
3744
+ const me = p === null ? null : ii(p, m[0], m[1]);
3745
+ let q = To({ kind: "range", min: m[0], max: m[1] });
3746
+ if (me !== null && !si(me)) {
3748
3747
  const N = x(b[0], b[1]);
3749
- q = N.kind === "candidates" ? $o(me) : om([me, N]);
3748
+ q = N.kind === "candidates" ? To(me) : im([me, N]);
3750
3749
  }
3751
3750
  const ne = (N) => {
3752
3751
  if ($ === null)
3753
3752
  return [Ve(Ct(o, N[0], u), i, s), Ve(Ct(o, N[1], u), i, s)];
3754
- const X = Lo($, z(o, N[0], u), -1), F = Lo($, z(o, N[1], u), 1);
3753
+ const X = $o($, z(o, N[0], u), -1), F = $o($, z(o, N[1], u), 1);
3755
3754
  return X === null || F === null ? null : [Ve(le(o, X, u), i, s), Ve(le(o, F, u), i, s)];
3756
3755
  }, te = (N, X, F) => {
3757
3756
  const [I, L] = f(N), H = x(I, L), _ = (j) => {
3758
3757
  const pe = z(a, j, u);
3759
- if (kn(H, pe)) return j;
3760
- const re = Lo(H, pe, F);
3758
+ if (_n(H, pe)) return j;
3759
+ const re = $o(H, pe, F);
3761
3760
  return re === null ? null : le(a, re, u);
3762
3761
  }, C = _(X[0]), U = _(X[1]);
3763
3762
  return C === null || U === null ? null : [C, U.getTime() < C.getTime() ? C : U];
3764
3763
  }, W = (N, X) => N >= b[0] && X <= b[1], oe = (N, X) => {
3765
- const F = qa(q, E[0], E[1], N, Ja(X, n));
3764
+ const F = Za(q, E[0], E[1], N, ti(X, n));
3766
3765
  if (F === null) return null;
3767
- const I = ei(F, E, w, a, u, X.motion === "single");
3766
+ const I = ri(F, E, w, a, u, X.motion === "single");
3768
3767
  if (I === null) return null;
3769
3768
  const L = X.window !== "follow", H = L && W(F[0], F[1]) ? h : ne(I);
3770
3769
  if (H === null) return null;
@@ -3775,17 +3774,17 @@ const dl = (e, t, r, n, o, a, i) => {
3775
3774
  };
3776
3775
  return { previous: oe(-1, e.rules.previous), next: oe(1, e.rules.next) };
3777
3776
  };
3778
- function ii(e, t, r) {
3777
+ function li(e, t, r) {
3779
3778
  if (!ye(r))
3780
3779
  throw new RangeError(`${e}: ${t} is required and must be a valid Date (received: ${M(r)})`);
3781
3780
  }
3782
3781
  function Le(e, t, r, n, o) {
3783
- ii(e, t, r), Qe(e, t, r, n, o, "");
3782
+ li(e, t, r), Qe(e, t, r, n, o, "");
3784
3783
  }
3785
- function aa(e, t, r, n, o) {
3786
- if (ii(e, "minDate", t), ii(e, "maxDate", r), r.getTime() <= t.getTime())
3784
+ function sa(e, t, r, n, o) {
3785
+ if (li(e, "minDate", t), li(e, "maxDate", r), r.getTime() <= t.getTime())
3787
3786
  throw new RangeError(`${e}: maxDate must be strictly later than minDate (minDate: ${M(t)}, maxDate: ${M(r)})`);
3788
- for (const a of n) Qe(e, "minDate", t, a, o, yl);
3787
+ for (const a of n) Qe(e, "minDate", t, a, o, Pl);
3789
3788
  }
3790
3789
  function pr(e, t, r, n, o) {
3791
3790
  if (!Ht(r) || r.length !== 2)
@@ -3793,15 +3792,15 @@ function pr(e, t, r, n, o) {
3793
3792
  if (Le(e, `${t}[0]`, r[0], n, o), Le(e, `${t}[1]`, r[1], n, o), r[0].getTime() > r[1].getTime())
3794
3793
  throw new RangeError(`${e}: ${t} upper must not be earlier than lower (lower: ${M(r[0])}, upper: ${M(r[1])})`);
3795
3794
  }
3796
- function Uo(e, t, r, n, o, a, i, s) {
3795
+ function Bo(e, t, r, n, o, a, i, s) {
3797
3796
  const c = z(r, n, s);
3798
3797
  if (c < z(r, o, s) || c > z(r, a, s))
3799
3798
  throw new RangeError(`${e}: ${t} must lie within ${i} (value: ${M(n)}, lower: ${M(o)}, upper: ${M(a)})`);
3800
3799
  }
3801
- function zo(e, t, r, n, o, a, i, s) {
3802
- Uo(e, `${t}[0]`, r, n[0], o, a, i, s), Uo(e, `${t}[1]`, r, n[1], o, a, i, s);
3800
+ function Wo(e, t, r, n, o, a, i, s) {
3801
+ Bo(e, `${t}[0]`, r, n[0], o, a, i, s), Bo(e, `${t}[1]`, r, n[1], o, a, i, s);
3803
3802
  }
3804
- function Bo(e, t, r, n) {
3803
+ function Go(e, t, r, n) {
3805
3804
  if (n.getTime() < r.getTime())
3806
3805
  throw new RangeError(`${e}: ${t}(upper) must not be earlier than lower (lower: ${M(r)}, upper: ${M(n)})`);
3807
3806
  }
@@ -3809,41 +3808,41 @@ function sn(e, t, r) {
3809
3808
  if (!Number.isInteger(r))
3810
3809
  throw new RangeError(`${e}: ${t}(delta) must be an integer number of units (received: ${M(r)})`);
3811
3810
  }
3812
- function jt(e, t, r, n, o, a) {
3813
- const i = Ld(e, t, r);
3814
- return ye(i) && qn(i, e, a) !== null ? { date: i, pastDateRange: !1 } : { date: r > 0 ? o : n, pastDateRange: !0 };
3811
+ function Kt(e, t, r, n, o, a) {
3812
+ const i = $d(e, t, r);
3813
+ return ye(i) && Xn(i, e, a) !== null ? { date: i, pastDateRange: !1 } : { date: r > 0 ? o : n, pastDateRange: !0 };
3815
3814
  }
3816
- function Wo(e, t, r, n, o) {
3815
+ function jo(e, t, r, n, o) {
3817
3816
  const a = Pe(e, r, t, o) + n;
3818
3817
  return e[Math.max(0, Math.min(e.length - 1, a))];
3819
3818
  }
3820
- function Cn(e, t, r, n, o, a) {
3819
+ function On(e, t, r, n, o, a) {
3821
3820
  const i = Ve(e, r, n);
3822
3821
  if (o.length === 0) return i;
3823
3822
  const s = o[Pe(o, i, t, a)];
3824
3823
  return z(t, s, a) === z(t, i, a) ? i : Ve(s, r, n);
3825
3824
  }
3826
- function ja(e, t, r, n, o, a) {
3827
- const i = Cn(e[0], t, r, n, o, a), s = Cn(e[1], t, r, n, o, a);
3825
+ function qa(e, t, r, n, o, a) {
3826
+ const i = On(e[0], t, r, n, o, a), s = On(e[1], t, r, n, o, a);
3828
3827
  return [i, s < i ? i : s];
3829
3828
  }
3830
- function Bn(e, t) {
3829
+ function Wn(e, t) {
3831
3830
  return t[0] === e[0] && t[1] === e[1] ? e : t;
3832
3831
  }
3833
- const am = { year: "allowedYears", month: "allowedMonths", day: "allowedDates" };
3834
- function Kt(e, t) {
3835
- return t.length === 0 ? {} : { [am[e]]: t };
3832
+ const sm = { year: "allowedYears", month: "allowedMonths", day: "allowedDates" };
3833
+ function qt(e, t) {
3834
+ return t.length === 0 ? {} : { [sm[e]]: t };
3836
3835
  }
3837
- function ia(e) {
3836
+ function la(e) {
3838
3837
  const t = de(e), r = t.current, n = e, o = Object.keys(r), a = Object.keys(n);
3839
3838
  return o.length === a.length && a.every((s) => Object.is(r[s], n[s])) || (t.current = e), t.current;
3840
3839
  }
3841
- const rr = { previous: null, next: null }, im = ["motion", "edge", "window"];
3842
- function Wn(e) {
3840
+ const rr = { previous: null, next: null }, lm = ["motion", "edge", "window"];
3841
+ function Gn(e) {
3843
3842
  const t = de(e), r = t.current;
3844
- return r === e || r !== void 0 && e !== void 0 && ["previous", "next"].every((o) => im.every((a) => r[o][a] === e[o][a])) || (t.current = e), t.current;
3843
+ return r === e || r !== void 0 && e !== void 0 && ["previous", "next"].every((o) => lm.every((a) => r[o][a] === e[o][a])) || (t.current = e), t.current;
3845
3844
  }
3846
- const Oo = (e, t) => e.getTime() === t.getTime();
3845
+ const Vo = (e, t) => e.getTime() === t.getTime();
3847
3846
  function ln(e, t, r, n) {
3848
3847
  if (!r(e.current, t)) e.current = t;
3849
3848
  else if (e.holdsHanded) return;
@@ -3852,29 +3851,29 @@ function ln(e, t, r, n) {
3852
3851
  function cn(e, t, r) {
3853
3852
  e.current = t, e.hand(t), r(t);
3854
3853
  }
3855
- function sm(e, t) {
3854
+ function cm(e, t) {
3856
3855
  return typeof t == "function" ? t(e) : t;
3857
3856
  }
3858
3857
  function dn(e) {
3859
- return bl(sm, void 0, e);
3858
+ return vl(cm, void 0, e);
3860
3859
  }
3861
3860
  function un(e, t, r, n) {
3862
3861
  r === t || e.current !== r || (e.forgetHanded(t), n((o) => o === t ? r : o));
3863
3862
  }
3864
- function Rm(e) {
3863
+ function Mm(e) {
3865
3864
  const { unit: t, minDate: r, maxDate: n, initialRange: o, onChangeRange: a, yearStartMonth: i, formatOption: s, selectorStep: c, ...d } = e;
3866
3865
  Ie("usePeriodSliderRange", "unit", t);
3867
3866
  const u = vr("usePeriodSliderRange", i);
3868
- aa("usePeriodSliderRange", r, n, [t], u), pr("usePeriodSliderRange", "initialRange", o, t, u), c !== void 0 && Or("usePeriodSliderRange", "selectorStep", c, "motion");
3869
- const S = ia(d), E = r.getTime(), $ = n.getTime(), p = Y(() => wr("usePeriodSliderRange", Jo(S.allowedDates), t, r, n, u).dates, [S.allowedDates, t, E, $, u]), h = de(o), [w, f] = dn(() => (zo("usePeriodSliderRange", "initialRange", t, o, r, n, "[minDate, maxDate]", u), Bn(o, ja(o, t, r, n, p, u)))), x = oa("usePeriodSliderRange", [w]);
3867
+ sa("usePeriodSliderRange", r, n, [t], u), pr("usePeriodSliderRange", "initialRange", o, t, u), c !== void 0 && Or("usePeriodSliderRange", "selectorStep", c, "motion");
3868
+ const S = la(d), E = r.getTime(), $ = n.getTime(), p = Y(() => wr("usePeriodSliderRange", ta(S.allowedDates), t, r, n, u).dates, [S.allowedDates, t, E, $, u]), h = de(o), [w, f] = dn(() => (Wo("usePeriodSliderRange", "initialRange", t, o, r, n, "[minDate, maxDate]", u), Wn(o, qa(o, t, r, n, p, u)))), x = ia("usePeriodSliderRange", [w]);
3870
3869
  pr("usePeriodSliderRange", "range", w, t, u);
3871
- const R = Bn(w, ja(w, t, r, n, p, u)), b = on(x, 0, R, f);
3870
+ const R = Wn(w, qa(w, t, r, n, p, u)), b = on(x, 0, R, f);
3872
3871
  at(() => {
3873
3872
  un(b, w, R, f);
3874
3873
  });
3875
3874
  const m = an(x, 0, o), me = wt({ minDate: r, maxDate: n, candidates: p }), q = wt(a), ne = A(
3876
3875
  (re) => {
3877
- const { minDate: ce, maxDate: Re, candidates: ie } = me.current, se = ja(re, t, ce, Re, ie, u);
3876
+ const { minDate: ce, maxDate: Re, candidates: ie } = me.current, se = qa(re, t, ce, Re, ie, u);
3878
3877
  ln(b, se, It, f);
3879
3878
  const be = m.current;
3880
3879
  se[0].getTime() === be[0].getTime() && se[1].getTime() === be[1].getTime() || (m.current = se, x.notify(0, () => q.current?.(se[0], se[1])));
@@ -3899,7 +3898,7 @@ function Rm(e) {
3899
3898
  [ne, t, u]
3900
3899
  ), N = A(
3901
3900
  (re, ce) => {
3902
- Le("usePeriodSliderRange", "sliderProps.onChangeRange(lower)", re, t, u), Le("usePeriodSliderRange", "sliderProps.onChangeRange(upper)", ce, t, u), Bo("usePeriodSliderRange", "sliderProps.onChangeRange", re, ce), ne([re, ce]);
3901
+ Le("usePeriodSliderRange", "sliderProps.onChangeRange(lower)", re, t, u), Le("usePeriodSliderRange", "sliderProps.onChangeRange(upper)", ce, t, u), Go("usePeriodSliderRange", "sliderProps.onChangeRange", re, ce), ne([re, ce]);
3903
3902
  },
3904
3903
  [ne, t, u]
3905
3904
  ), X = A(
@@ -3907,18 +3906,18 @@ function Rm(e) {
3907
3906
  sn("usePeriodSliderRange", "shiftRange", re);
3908
3907
  const { minDate: ce, maxDate: Re, candidates: ie } = me.current, se = b.current;
3909
3908
  if (ie.length > 0) {
3910
- ne([Wo(ie, t, se[0], re, u), Wo(ie, t, se[1], re, u)]);
3909
+ ne([jo(ie, t, se[0], re, u), jo(ie, t, se[1], re, u)]);
3911
3910
  return;
3912
3911
  }
3913
- ne([jt(t, se[0], re, ce, Re, u).date, jt(t, se[1], re, ce, Re, u).date]);
3912
+ ne([Kt(t, se[0], re, ce, Re, u).date, Kt(t, se[1], re, ce, Re, u).date]);
3914
3913
  },
3915
3914
  [t, ne, u]
3916
3915
  ), F = A(() => {
3917
3916
  ne(h.current);
3918
- }, [ne]), I = Wn(c), L = I !== void 0, H = Y(() => {
3917
+ }, [ne]), I = Gn(c), L = I !== void 0, H = Y(() => {
3919
3918
  if (I === void 0) return { start: rr, end: rr };
3920
3919
  const re = p.length > 0 ? S.allowedDates : void 0, ce = { selection: R, unit: t, yearStartMonth: u, minDate: r, maxDate: n, allowedDates: re, rules: I };
3921
- return { start: tl({ ...ce, shows: "start" }), end: tl({ ...ce, shows: "end" }) };
3920
+ return { start: rl({ ...ce, shows: "start" }), end: rl({ ...ce, shows: "end" }) };
3922
3921
  }, [I, R, t, u, E, $, p, S.allowedDates]), _ = tr(H.start, ne), C = tr(H.end, ne), U = Y(
3923
3922
  () => ({
3924
3923
  value: R[0],
@@ -3927,7 +3926,7 @@ function Rm(e) {
3927
3926
  maxDate: R[1],
3928
3927
  unit: t,
3929
3928
  yearStartMonth: u,
3930
- ...Kt(t, p),
3929
+ ...qt(t, p),
3931
3930
  formatLocale: e.formatLocale,
3932
3931
  locale: e.locale,
3933
3932
  labels: e.labels,
@@ -3943,7 +3942,7 @@ function Rm(e) {
3943
3942
  maxDate: n,
3944
3943
  unit: t,
3945
3944
  yearStartMonth: u,
3946
- ...Kt(t, p),
3945
+ ...qt(t, p),
3947
3946
  formatLocale: e.formatLocale,
3948
3947
  locale: e.locale,
3949
3948
  labels: e.labels,
@@ -3979,21 +3978,21 @@ function Rm(e) {
3979
3978
  duringRender: x.duringRender
3980
3979
  };
3981
3980
  }
3982
- function xm(e) {
3981
+ function ym(e) {
3983
3982
  const { unit: t, minDate: r, maxDate: n, initialValue: o, onChangePoint: a, yearStartMonth: i, formatOption: s, ...c } = e;
3984
3983
  Ie("usePeriodSliderPoint", "unit", t);
3985
3984
  const d = vr("usePeriodSliderPoint", i);
3986
- aa("usePeriodSliderPoint", r, n, [t], d), Le("usePeriodSliderPoint", "initialValue", o, t, d);
3987
- const u = ia(c), S = r.getTime(), E = n.getTime(), $ = Y(() => wr("usePeriodSliderPoint", Jo(u.allowedDates), t, r, n, d).dates, [u.allowedDates, t, S, E, d]), p = de(o), [h, w] = dn(() => (Uo("usePeriodSliderPoint", "initialValue", t, o, r, n, "[minDate, maxDate]", d), Cn(o, t, r, n, $, d))), f = oa("usePeriodSliderPoint", [h]);
3985
+ sa("usePeriodSliderPoint", r, n, [t], d), Le("usePeriodSliderPoint", "initialValue", o, t, d);
3986
+ const u = la(c), S = r.getTime(), E = n.getTime(), $ = Y(() => wr("usePeriodSliderPoint", ta(u.allowedDates), t, r, n, d).dates, [u.allowedDates, t, S, E, d]), p = de(o), [h, w] = dn(() => (Bo("usePeriodSliderPoint", "initialValue", t, o, r, n, "[minDate, maxDate]", d), On(o, t, r, n, $, d))), f = ia("usePeriodSliderPoint", [h]);
3988
3987
  Le("usePeriodSliderPoint", "value", h, t, d);
3989
- const x = Cn(h, t, r, n, $, d), R = on(f, 0, x, w);
3988
+ const x = On(h, t, r, n, $, d), R = on(f, 0, x, w);
3990
3989
  at(() => {
3991
3990
  un(R, h, x, w);
3992
3991
  });
3993
3992
  const b = an(f, 0, o), m = wt({ minDate: r, maxDate: n, candidates: $ }), me = wt(a), q = A(
3994
3993
  (I) => {
3995
- const { minDate: L, maxDate: H, candidates: _ } = m.current, C = Cn(I, t, L, H, _, d);
3996
- ln(R, C, Oo, w), C.getTime() !== b.current.getTime() && (b.current = C, f.notify(0, () => me.current?.(C)));
3994
+ const { minDate: L, maxDate: H, candidates: _ } = m.current, C = On(I, t, L, H, _, d);
3995
+ ln(R, C, Vo, w), C.getTime() !== b.current.getTime() && (b.current = C, f.notify(0, () => me.current?.(C)));
3997
3996
  },
3998
3997
  [t, d]
3999
3998
  ), ne = A((I) => {
@@ -4014,10 +4013,10 @@ function xm(e) {
4014
4013
  sn("usePeriodSliderPoint", "shiftValue", I);
4015
4014
  const { minDate: L, maxDate: H, candidates: _ } = m.current;
4016
4015
  if (_.length > 0) {
4017
- q(Wo(_, t, R.current, I, d));
4016
+ q(jo(_, t, R.current, I, d));
4018
4017
  return;
4019
4018
  }
4020
- q(jt(t, R.current, I, L, H, d).date);
4019
+ q(Kt(t, R.current, I, L, H, d).date);
4021
4020
  },
4022
4021
  [t, q, d]
4023
4022
  ), N = A(() => {
@@ -4030,7 +4029,7 @@ function xm(e) {
4030
4029
  maxDate: n,
4031
4030
  unit: t,
4032
4031
  yearStartMonth: d,
4033
- ...Kt(t, $),
4032
+ ...qt(t, $),
4034
4033
  formatLocale: e.formatLocale,
4035
4034
  locale: e.locale,
4036
4035
  labels: e.labels,
@@ -4060,7 +4059,7 @@ function xm(e) {
4060
4059
  duringRender: f.duringRender
4061
4060
  };
4062
4061
  }
4063
- function Mm(e) {
4062
+ function Pm(e) {
4064
4063
  const {
4065
4064
  unit: t,
4066
4065
  minDate: r,
@@ -4079,21 +4078,21 @@ function Mm(e) {
4079
4078
  } = e;
4080
4079
  Ie("useVernierSliderRange", "unit", t);
4081
4080
  const h = or("useVernierSliderRange", "macroUnit", i, t), w = or("useVernierSliderRange", "microUnit", s, t), f = vr("useVernierSliderRange", u);
4082
- aa("useVernierSliderRange", r, n, [h, w, t], f), pr("useVernierSliderRange", "initialMacroRange", o, h, f), pr("useVernierSliderRange", "initialMicroRange", a, w, f), E !== void 0 && Or("useVernierSliderRange", "macroSelectorStep", E, "motion"), $ !== void 0 && Or("useVernierSliderRange", "microSelectorStep", $, "vernierRange");
4083
- const x = ia(p), R = de(o), b = de(a), [m, me] = dn(() => (zo("useVernierSliderRange", "initialMacroRange", h, o, r, n, "[minDate, maxDate]", f), o)), [q, ne] = dn(() => {
4081
+ sa("useVernierSliderRange", r, n, [h, w, t], f), pr("useVernierSliderRange", "initialMacroRange", o, h, f), pr("useVernierSliderRange", "initialMicroRange", a, w, f), E !== void 0 && Or("useVernierSliderRange", "macroSelectorStep", E, "motion"), $ !== void 0 && Or("useVernierSliderRange", "microSelectorStep", $, "vernierRange");
4082
+ const x = la(p), R = de(o), b = de(a), [m, me] = dn(() => (Wo("useVernierSliderRange", "initialMacroRange", h, o, r, n, "[minDate, maxDate]", f), o)), [q, ne] = dn(() => {
4084
4083
  const y = Yt(h, w, o, r, n, f);
4085
- return zo("useVernierSliderRange", "initialMicroRange", w, a, y[0], y[1], "the initial macro window", f), a;
4086
- }), te = oa("useVernierSliderRange", [m, q]);
4084
+ return Wo("useVernierSliderRange", "initialMicroRange", w, a, y[0], y[1], "the initial macro window", f), a;
4085
+ }), te = ia("useVernierSliderRange", [m, q]);
4087
4086
  pr("useVernierSliderRange", "macroRange", m, h, f);
4088
- const W = Bn(m, [Ve(m[0], r, n), Ve(m[1], r, n)]), oe = r.getTime(), N = n.getTime(), X = Y(() => Yt(h, w, W, r, n, f), [h, w, W, oe, N, f]), F = Y(
4089
- () => Gt("micro", x) ? pi("useVernierSliderRange", Nt("micro", x), w, r, n, f) : null,
4087
+ const W = Wn(m, [Ve(m[0], r, n), Ve(m[1], r, n)]), oe = r.getTime(), N = n.getTime(), X = Y(() => Yt(h, w, W, r, n, f), [h, w, W, oe, N, f]), F = Y(
4088
+ () => jt("micro", x) ? bi("useVernierSliderRange", Nt("micro", x), w, r, n, f) : null,
4090
4089
  [x.microIsDiscrete, x.microAllowedDates, x.allowedDates, w, oe, N, f]
4091
4090
  ), I = Y(
4092
- () => Gt("macro", x) ? wr("useVernierSliderRange", Nt("macro", x), h, r, n, f).dates : [],
4091
+ () => jt("macro", x) ? wr("useVernierSliderRange", Nt("macro", x), h, r, n, f).dates : [],
4093
4092
  [x.macroIsDiscrete, x.macroAllowedDates, x.allowedDates, h, oe, N, f]
4094
- ), L = wt(I), H = Y(() => zn(X, w, F, f), [X, w, F, f]), _ = Y(() => Hn(F, H), [F, H]);
4093
+ ), L = wt(I), H = Y(() => Bn(X, w, F, f), [X, w, F, f]), _ = Y(() => Fn(F, H), [F, H]);
4095
4094
  pr("useVernierSliderRange", "microRange", q, w, f);
4096
- const C = Bn(q, rn(q, w, X, H, f, "resize")), U = on(te, 0, W, me), j = on(te, 1, C, ne);
4095
+ const C = Wn(q, rn(q, w, X, H, f, "resize")), U = on(te, 0, W, me), j = on(te, 1, C, ne);
4097
4096
  at(() => {
4098
4097
  un(U, m, W, me), un(j, q, C, ne);
4099
4098
  });
@@ -4103,7 +4102,7 @@ function Mm(e) {
4103
4102
  return Yt(h, w, y, B, ue, f);
4104
4103
  },
4105
4104
  [h, w, f]
4106
- ), be = A((y) => zn(y, w, F, f), [w, F, f]), We = A((y) => {
4105
+ ), be = A((y) => Bn(y, w, F, f), [w, F, f]), Ge = A((y) => {
4107
4106
  ln(U, y, It, me);
4108
4107
  const B = re.current;
4109
4108
  y[0].getTime() === B[0].getTime() && y[1].getTime() === B[1].getTime() || (re.current = y, te.notify(0, () => Re.current?.(y[0], y[1])));
@@ -4113,32 +4112,32 @@ function Mm(e) {
4113
4112
  }, []), we = A(
4114
4113
  (y, B, ue) => {
4115
4114
  const _e = ue === "micro" && It(U.current, y) && It(re.current, y), Ne = ue === "macro" && It(j.current, B) && It(pe.current, B);
4116
- if (_e || We(y), Ne) return;
4115
+ if (_e || Ge(y), Ne) return;
4117
4116
  ln(j, B, It, ne);
4118
4117
  const Ye = pe.current;
4119
4118
  (B[0].getTime() !== Ye[0].getTime() || B[1].getTime() !== Ye[1].getTime()) && (pe.current = B, te.notify(1, () => ie.current?.(B[0], B[1])));
4120
4119
  },
4121
- [We]
4120
+ [Ge]
4122
4121
  ), O = A((y) => {
4123
4122
  const B = typeof y == "function" ? y(j.current) : y;
4124
4123
  pe.current = B, cn(j, B, ne);
4125
4124
  }, []), Z = A(
4126
4125
  (y, B, ue) => {
4127
- const { minDate: _e, maxDate: Ne } = ce.current, Ye = [Ve(y, _e, Ne), Ve(B, _e, Ne)], Ue = se(Ye);
4128
- we(Ye, rn(j.current, w, Ue, be(Ue), f, ue), "macro");
4126
+ const { minDate: _e, maxDate: Ne } = ce.current, Ye = [Ve(y, _e, Ne), Ve(B, _e, Ne)], ze = se(Ye);
4127
+ we(Ye, rn(j.current, w, ze, be(ze), f, ue), "macro");
4129
4128
  },
4130
4129
  [w, se, be, we, f]
4131
4130
  ), fe = A((y, B) => Z(y, B, "resize"), [Z]), He = A(
4132
4131
  (y, B) => {
4133
- Le("useVernierSliderRange", "sliderProps.onChangeMacroRange(lower)", y, h, f), Le("useVernierSliderRange", "sliderProps.onChangeMacroRange(upper)", B, h, f), Bo("useVernierSliderRange", "sliderProps.onChangeMacroRange", y, B);
4134
- const { minDate: ue, maxDate: _e } = ce.current, Ne = [Ve(y, ue, _e), Ve(B, ue, _e)], Ye = j.current, Ue = se(Ne), Ot = rn(Ye, w, Ue, be(Ue), f, "resize");
4132
+ Le("useVernierSliderRange", "sliderProps.onChangeMacroRange(lower)", y, h, f), Le("useVernierSliderRange", "sliderProps.onChangeMacroRange(upper)", B, h, f), Go("useVernierSliderRange", "sliderProps.onChangeMacroRange", y, B);
4133
+ const { minDate: ue, maxDate: _e } = ce.current, Ne = [Ve(y, ue, _e), Ve(B, ue, _e)], Ye = j.current, ze = se(Ne), Ot = rn(Ye, w, ze, be(ze), f, "resize");
4135
4134
  if (Ot[0].getTime() !== Ye[0].getTime() || Ot[1].getTime() !== Ye[1].getTime()) {
4136
- We(Ne);
4135
+ Ge(Ne);
4137
4136
  return;
4138
4137
  }
4139
4138
  we(Ne, Ye, "macro");
4140
4139
  },
4141
- [h, w, se, be, We, we, f]
4140
+ [h, w, se, be, Ge, we, f]
4142
4141
  ), Se = A(
4143
4142
  (y, B) => {
4144
4143
  const ue = se(U.current);
@@ -4147,7 +4146,7 @@ function Mm(e) {
4147
4146
  [w, se, be, we, f]
4148
4147
  ), it = A(
4149
4148
  (y, B) => {
4150
- Le("useVernierSliderRange", "sliderProps.onChangeMicroRange(lower)", y, w, f), Le("useVernierSliderRange", "sliderProps.onChangeMicroRange(upper)", B, w, f), Bo("useVernierSliderRange", "sliderProps.onChangeMicroRange", y, B), Se(y, B);
4149
+ Le("useVernierSliderRange", "sliderProps.onChangeMicroRange(lower)", y, w, f), Le("useVernierSliderRange", "sliderProps.onChangeMicroRange(upper)", B, w, f), Go("useVernierSliderRange", "sliderProps.onChangeMicroRange", y, B), Se(y, B);
4151
4150
  },
4152
4151
  [Se, w, f]
4153
4152
  ), Je = A(
@@ -4157,7 +4156,7 @@ function Mm(e) {
4157
4156
  fe(y, ue);
4158
4157
  },
4159
4158
  [fe, h, f]
4160
- ), Ge = A(
4159
+ ), je = A(
4161
4160
  (y) => {
4162
4161
  Le("useVernierSliderRange", "setMacroUpperDate(date)", y, h, f);
4163
4162
  const B = U.current[0], ue = y < B ? y : B;
@@ -4188,28 +4187,28 @@ function Mm(e) {
4188
4187
  Z(Ne[Ot], Ne[ar], "pan");
4189
4188
  return;
4190
4189
  }
4191
- const Ye = jt(h, _e[0], y, B, ue, f), Ue = jt(h, _e[1], y, B, ue, f);
4192
- Ye.pastDateRange || Ue.pastDateRange || Ye.date < B || Ue.date > ue || Z(Ye.date, Ue.date, "pan");
4190
+ const Ye = Kt(h, _e[0], y, B, ue, f), ze = Kt(h, _e[1], y, B, ue, f);
4191
+ Ye.pastDateRange || ze.pastDateRange || Ye.date < B || ze.date > ue || Z(Ye.date, ze.date, "pan");
4193
4192
  },
4194
4193
  [h, Z, f]
4195
4194
  ), et = A(
4196
4195
  (y) => {
4197
4196
  sn("useVernierSliderRange", "shiftMicroRange", y);
4198
- const B = U.current, ue = j.current, _e = se(B), [Ne, Ye] = _e, Ue = Hn(F, be(_e));
4199
- if (Ue.length > 0) {
4200
- const lt = Pe(Ue, ue[0], w, f) + y, Sr = Pe(Ue, ue[1], w, f) + y;
4201
- if (lt < 0 || Sr > Ue.length - 1) return;
4202
- Se(Ue[lt], Ue[Sr]);
4197
+ const B = U.current, ue = j.current, _e = se(B), [Ne, Ye] = _e, ze = Fn(F, be(_e));
4198
+ if (ze.length > 0) {
4199
+ const lt = Pe(ze, ue[0], w, f) + y, Sr = Pe(ze, ue[1], w, f) + y;
4200
+ if (lt < 0 || Sr > ze.length - 1) return;
4201
+ Se(ze[lt], ze[Sr]);
4203
4202
  return;
4204
4203
  }
4205
- const Ot = jt(w, ue[0], y, Ne, Ye, f), ar = jt(w, ue[1], y, Ne, Ye, f);
4204
+ const Ot = Kt(w, ue[0], y, Ne, Ye, f), ar = Kt(w, ue[1], y, Ne, Ye, f);
4206
4205
  Ot.pastDateRange || ar.pastDateRange || z(w, Ot.date, f) < z(w, Ne, f) || z(w, ar.date, f) > z(w, Ye, f) || Se(Ot.date, ar.date);
4207
4206
  },
4208
4207
  [w, F, se, be, Se, f]
4209
4208
  ), vt = A(() => {
4210
4209
  const { minDate: y, maxDate: B } = ce.current, ue = [Ve(R.current[0], y, B), Ve(R.current[1], y, B)], _e = se(ue);
4211
4210
  we(ue, rn(b.current, w, _e, be(_e), f, "resize"), "both");
4212
- }, [w, se, be, we, f]), ke = Wn(E), Xe = Wn($), Ee = ke !== void 0, Rt = Xe !== void 0, st = Y(() => {
4211
+ }, [w, se, be, we, f]), ke = Gn(E), Ze = Gn($), Ee = ke !== void 0, Rt = Ze !== void 0, st = Y(() => {
4213
4212
  const y = {
4214
4213
  macroUnit: h,
4215
4214
  microUnit: w,
@@ -4218,16 +4217,16 @@ function Mm(e) {
4218
4217
  maxDate: n,
4219
4218
  macroRange: W,
4220
4219
  microSelection: C,
4221
- macroAllowedDates: Gt("macro", x) ? Nt("macro", x).list : void 0,
4222
- microAllowedDates: Gt("micro", x) ? Nt("micro", x).list : void 0
4220
+ macroAllowedDates: jt("macro", x) ? Nt("macro", x).list : void 0,
4221
+ microAllowedDates: jt("micro", x) ? Nt("micro", x).list : void 0
4223
4222
  };
4224
4223
  return {
4225
4224
  macroStart: ke === void 0 ? rr : Nr({ ...y, row: "macro", shows: "start", rules: ke }),
4226
4225
  macroEnd: ke === void 0 ? rr : Nr({ ...y, row: "macro", shows: "end", rules: ke }),
4227
- microStart: Xe === void 0 ? rr : Nr({ ...y, row: "micro", shows: "start", rules: Xe }),
4228
- microEnd: Xe === void 0 ? rr : Nr({ ...y, row: "micro", shows: "end", rules: Xe })
4226
+ microStart: Ze === void 0 ? rr : Nr({ ...y, row: "micro", shows: "start", rules: Ze }),
4227
+ microEnd: Ze === void 0 ? rr : Nr({ ...y, row: "micro", shows: "end", rules: Ze })
4229
4228
  };
4230
- }, [ke, Xe, h, w, f, oe, N, W, C, x.macroIsDiscrete, x.macroAllowedDates, x.microIsDiscrete, x.microAllowedDates, x.allowedDates]), qt = A((y) => we(y.macroRange, y.microSelection, "macro"), [we]), T = A((y) => we(y.macroRange, y.microSelection, "micro"), [we]), ee = tr(st.macroStart, qt), je = tr(st.macroEnd, qt), mt = tr(st.microStart, T), Ze = tr(st.microEnd, T), [Me, Ae] = X, Vr = Y(
4229
+ }, [ke, Ze, h, w, f, oe, N, W, C, x.macroIsDiscrete, x.macroAllowedDates, x.microIsDiscrete, x.microAllowedDates, x.allowedDates]), Ut = A((y) => we(y.macroRange, y.microSelection, "macro"), [we]), T = A((y) => we(y.macroRange, y.microSelection, "micro"), [we]), ee = tr(st.macroStart, Ut), Ue = tr(st.macroEnd, Ut), mt = tr(st.microStart, T), Ke = tr(st.microEnd, T), [Me, Ae] = X, Vr = Y(
4231
4230
  () => ({
4232
4231
  value: W[0],
4233
4232
  onChange: Je,
@@ -4235,7 +4234,7 @@ function Mm(e) {
4235
4234
  maxDate: W[1],
4236
4235
  unit: h,
4237
4236
  yearStartMonth: f,
4238
- ...Kt(h, I),
4237
+ ...qt(h, I),
4239
4238
  formatLocale: e.formatLocale,
4240
4239
  locale: e.locale,
4241
4240
  labels: e.labels,
@@ -4246,19 +4245,19 @@ function Mm(e) {
4246
4245
  ), k = Y(
4247
4246
  () => ({
4248
4247
  value: W[1],
4249
- onChange: Ge,
4248
+ onChange: je,
4250
4249
  minDate: W[0],
4251
4250
  maxDate: n,
4252
4251
  unit: h,
4253
4252
  yearStartMonth: f,
4254
- ...Kt(h, I),
4253
+ ...qt(h, I),
4255
4254
  formatLocale: e.formatLocale,
4256
4255
  locale: e.locale,
4257
4256
  labels: e.labels,
4258
4257
  formatOption: S,
4259
- ...Ee ? { stepper: je } : {}
4258
+ ...Ee ? { stepper: Ue } : {}
4260
4259
  }),
4261
- [W, Ge, n, h, f, I, e.formatLocale, e.locale, e.labels, S, Ee, je]
4260
+ [W, je, n, h, f, I, e.formatLocale, e.locale, e.labels, S, Ee, Ue]
4262
4261
  ), P = Y(
4263
4262
  () => ({
4264
4263
  value: C[0],
@@ -4267,7 +4266,7 @@ function Mm(e) {
4267
4266
  maxDate: C[1],
4268
4267
  unit: w,
4269
4268
  yearStartMonth: f,
4270
- ...Kt(w, _),
4269
+ ...qt(w, _),
4271
4270
  formatLocale: e.formatLocale,
4272
4271
  locale: e.locale,
4273
4272
  labels: e.labels,
@@ -4283,14 +4282,14 @@ function Mm(e) {
4283
4282
  maxDate: Ae,
4284
4283
  unit: w,
4285
4284
  yearStartMonth: f,
4286
- ...Kt(w, _),
4285
+ ...qt(w, _),
4287
4286
  formatLocale: e.formatLocale,
4288
4287
  locale: e.locale,
4289
4288
  labels: e.labels,
4290
4289
  formatOption: S,
4291
- ...Rt ? { stepper: Ze } : {}
4290
+ ...Rt ? { stepper: Ke } : {}
4292
4291
  }),
4293
- [C, ae, Ae, w, f, _, e.formatLocale, e.locale, e.labels, S, Rt, Ze]
4292
+ [C, ae, Ae, w, f, _, e.formatLocale, e.locale, e.labels, S, Rt, Ke]
4294
4293
  ), Fe = Y(
4295
4294
  () => ({
4296
4295
  ...x,
@@ -4314,7 +4313,7 @@ function Mm(e) {
4314
4313
  microRange: C,
4315
4314
  setMicroRange: O,
4316
4315
  setMacroLowerDate: Je,
4317
- setMacroUpperDate: Ge,
4316
+ setMacroUpperDate: je,
4318
4317
  setMicroLowerDate: ut,
4319
4318
  setMicroUpperDate: ae,
4320
4319
  shiftMacroRange: Dt,
@@ -4328,7 +4327,7 @@ function Mm(e) {
4328
4327
  duringRender: te.duringRender
4329
4328
  };
4330
4329
  }
4331
- function ym(e) {
4330
+ function Em(e) {
4332
4331
  const {
4333
4332
  unit: t,
4334
4333
  minDate: r,
@@ -4347,19 +4346,19 @@ function ym(e) {
4347
4346
  } = e;
4348
4347
  Ie("useVernierSliderPoint", "unit", t);
4349
4348
  const h = or("useVernierSliderPoint", "macroUnit", i, t), w = or("useVernierSliderPoint", "microUnit", s, t), f = vr("useVernierSliderPoint", u);
4350
- aa("useVernierSliderPoint", r, n, [h, w, t], f), pr("useVernierSliderPoint", "initialMacroRange", o, h, f), Le("useVernierSliderPoint", "initialMicroValue", a, w, f), E !== void 0 && Or("useVernierSliderPoint", "macroSelectorStep", E, "motion"), $ !== void 0 && Or("useVernierSliderPoint", "microSelectorStep", $, "vernierPoint");
4351
- const x = ia(p), R = de(o), b = de(a), [m, me] = dn(() => (zo("useVernierSliderPoint", "initialMacroRange", h, o, r, n, "[minDate, maxDate]", f), o)), [q, ne] = dn(() => {
4349
+ sa("useVernierSliderPoint", r, n, [h, w, t], f), pr("useVernierSliderPoint", "initialMacroRange", o, h, f), Le("useVernierSliderPoint", "initialMicroValue", a, w, f), E !== void 0 && Or("useVernierSliderPoint", "macroSelectorStep", E, "motion"), $ !== void 0 && Or("useVernierSliderPoint", "microSelectorStep", $, "vernierPoint");
4350
+ const x = la(p), R = de(o), b = de(a), [m, me] = dn(() => (Wo("useVernierSliderPoint", "initialMacroRange", h, o, r, n, "[minDate, maxDate]", f), o)), [q, ne] = dn(() => {
4352
4351
  const k = Yt(h, w, o, r, n, f);
4353
- return Uo("useVernierSliderPoint", "initialMicroValue", w, a, k[0], k[1], "the initial macro window", f), a;
4354
- }), te = oa("useVernierSliderPoint", [m, q]);
4352
+ return Bo("useVernierSliderPoint", "initialMicroValue", w, a, k[0], k[1], "the initial macro window", f), a;
4353
+ }), te = ia("useVernierSliderPoint", [m, q]);
4355
4354
  pr("useVernierSliderPoint", "macroRange", m, h, f);
4356
- const W = Bn(m, [Ve(m[0], r, n), Ve(m[1], r, n)]), oe = r.getTime(), N = n.getTime(), X = Y(() => Yt(h, w, W, r, n, f), [h, w, W, oe, N, f]), F = Y(
4357
- () => Gt("micro", x) ? pi("useVernierSliderPoint", Nt("micro", x), w, r, n, f) : null,
4355
+ const W = Wn(m, [Ve(m[0], r, n), Ve(m[1], r, n)]), oe = r.getTime(), N = n.getTime(), X = Y(() => Yt(h, w, W, r, n, f), [h, w, W, oe, N, f]), F = Y(
4356
+ () => jt("micro", x) ? bi("useVernierSliderPoint", Nt("micro", x), w, r, n, f) : null,
4358
4357
  [x.microIsDiscrete, x.microAllowedDates, x.allowedDates, w, oe, N, f]
4359
4358
  ), I = Y(
4360
- () => Gt("macro", x) ? wr("useVernierSliderPoint", Nt("macro", x), h, r, n, f).dates : [],
4359
+ () => jt("macro", x) ? wr("useVernierSliderPoint", Nt("macro", x), h, r, n, f).dates : [],
4361
4360
  [x.macroIsDiscrete, x.macroAllowedDates, x.allowedDates, h, oe, N, f]
4362
- ), L = wt(I), H = Y(() => zn(X, w, F, f), [X, w, F, f]), _ = Y(() => Hn(F, H), [F, H]);
4361
+ ), L = wt(I), H = Y(() => Bn(X, w, F, f), [X, w, F, f]), _ = Y(() => Fn(F, H), [F, H]);
4363
4362
  Le("useVernierSliderPoint", "microValue", q, w, f);
4364
4363
  const C = Ar(q, w, X, H, f), U = on(te, 0, W, me), j = on(te, 1, C, ne);
4365
4364
  at(() => {
@@ -4371,7 +4370,7 @@ function ym(e) {
4371
4370
  return Yt(h, w, k, P, xe, f);
4372
4371
  },
4373
4372
  [h, w, f]
4374
- ), be = A((k) => zn(k, w, F, f), [w, F, f]), We = A((k) => {
4373
+ ), be = A((k) => Bn(k, w, F, f), [w, F, f]), Ge = A((k) => {
4375
4374
  ln(U, k, It, me);
4376
4375
  const P = re.current;
4377
4376
  k[0].getTime() === P[0].getTime() && k[1].getTime() === P[1].getTime() || (re.current = k, te.notify(0, () => Re.current?.(k[0], k[1])));
@@ -4380,10 +4379,10 @@ function ym(e) {
4380
4379
  re.current = P, cn(U, P, me);
4381
4380
  }, []), we = A(
4382
4381
  (k, P, xe) => {
4383
- const Fe = xe === "micro" && It(U.current, k) && It(re.current, k), y = xe === "macro" && Oo(j.current, P) && Oo(pe.current, P);
4384
- Fe || We(k), !y && (ln(j, P, Oo, ne), P.getTime() !== pe.current.getTime() && (pe.current = P, te.notify(1, () => ie.current?.(P))));
4382
+ const Fe = xe === "micro" && It(U.current, k) && It(re.current, k), y = xe === "macro" && Vo(j.current, P) && Vo(pe.current, P);
4383
+ Fe || Ge(k), !y && (ln(j, P, Vo, ne), P.getTime() !== pe.current.getTime() && (pe.current = P, te.notify(1, () => ie.current?.(P))));
4385
4384
  },
4386
- [We]
4385
+ [Ge]
4387
4386
  ), O = A((k) => {
4388
4387
  const P = typeof k == "function" ? k(j.current) : k;
4389
4388
  pe.current = P, cn(j, P, ne);
@@ -4401,15 +4400,15 @@ function ym(e) {
4401
4400
  [w, se, be, we, f]
4402
4401
  ), He = A(
4403
4402
  (k, P) => {
4404
- Le("useVernierSliderPoint", "sliderProps.onChangeMacroRange(lower)", k, h, f), Le("useVernierSliderPoint", "sliderProps.onChangeMacroRange(upper)", P, h, f), Bo("useVernierSliderPoint", "sliderProps.onChangeMacroRange", k, P);
4403
+ Le("useVernierSliderPoint", "sliderProps.onChangeMacroRange(lower)", k, h, f), Le("useVernierSliderPoint", "sliderProps.onChangeMacroRange(upper)", P, h, f), Go("useVernierSliderPoint", "sliderProps.onChangeMacroRange", k, P);
4405
4404
  const { minDate: xe, maxDate: Fe } = ce.current, y = [Ve(k, xe, Fe), Ve(P, xe, Fe)], B = j.current, ue = se(y);
4406
4405
  if (Ar(B, w, ue, be(ue), f).getTime() !== B.getTime()) {
4407
- We(y);
4406
+ Ge(y);
4408
4407
  return;
4409
4408
  }
4410
4409
  we(y, B, "macro");
4411
4410
  },
4412
- [h, w, se, be, We, we, f]
4411
+ [h, w, se, be, Ge, we, f]
4413
4412
  ), Se = A(
4414
4413
  (k) => {
4415
4414
  Le("useVernierSliderPoint", "sliderProps.onChangeMicroPoint(value)", k, w, f), fe(k);
@@ -4429,7 +4428,7 @@ function ym(e) {
4429
4428
  Z(xe, k);
4430
4429
  },
4431
4430
  [Z, h, f]
4432
- ), Ge = A(
4431
+ ), je = A(
4433
4432
  (k) => {
4434
4433
  Le("useVernierSliderPoint", "setMicroDate(date)", k, w, f), fe(k);
4435
4434
  },
@@ -4444,25 +4443,25 @@ function ym(e) {
4444
4443
  Z(y[_e], y[Ne]);
4445
4444
  return;
4446
4445
  }
4447
- const B = jt(h, Fe[0], k, P, xe, f), ue = jt(h, Fe[1], k, P, xe, f);
4446
+ const B = Kt(h, Fe[0], k, P, xe, f), ue = Kt(h, Fe[1], k, P, xe, f);
4448
4447
  B.pastDateRange || ue.pastDateRange || B.date < P || ue.date > xe || Z(B.date, ue.date);
4449
4448
  },
4450
4449
  [h, Z, f]
4451
4450
  ), ae = A(
4452
4451
  (k) => {
4453
4452
  sn("useVernierSliderPoint", "shiftMicroValue", k);
4454
- const P = U.current, xe = se(P), Fe = Hn(F, be(xe));
4453
+ const P = U.current, xe = se(P), Fe = Fn(F, be(xe));
4455
4454
  if (Fe.length > 0) {
4456
- fe(Wo(Fe, w, j.current, k, f));
4455
+ fe(jo(Fe, w, j.current, k, f));
4457
4456
  return;
4458
4457
  }
4459
- fe(jt(w, j.current, k, xe[0], xe[1], f).date);
4458
+ fe(Kt(w, j.current, k, xe[0], xe[1], f).date);
4460
4459
  },
4461
4460
  [w, F, se, be, fe, f]
4462
4461
  ), Dt = A(() => {
4463
4462
  const { minDate: k, maxDate: P } = ce.current, xe = [Ve(R.current[0], k, P), Ve(R.current[1], k, P)], Fe = se(xe);
4464
4463
  we(xe, Ar(b.current, w, Fe, be(Fe), f), "both");
4465
- }, [w, se, be, we, f]), et = Wn(E), vt = Wn($), ke = et !== void 0, Xe = vt !== void 0, Ee = Y(() => {
4464
+ }, [w, se, be, we, f]), et = Gn(E), vt = Gn($), ke = et !== void 0, Ze = vt !== void 0, Ee = Y(() => {
4466
4465
  const k = {
4467
4466
  macroUnit: h,
4468
4467
  microUnit: w,
@@ -4471,8 +4470,8 @@ function ym(e) {
4471
4470
  maxDate: n,
4472
4471
  macroRange: W,
4473
4472
  microSelection: [C, C],
4474
- macroAllowedDates: Gt("macro", x) ? Nt("macro", x).list : void 0,
4475
- microAllowedDates: Gt("micro", x) ? Nt("micro", x).list : void 0
4473
+ macroAllowedDates: jt("macro", x) ? Nt("macro", x).list : void 0,
4474
+ microAllowedDates: jt("micro", x) ? Nt("micro", x).list : void 0
4476
4475
  };
4477
4476
  return {
4478
4477
  macroStart: et === void 0 ? rr : Nr({ ...k, row: "macro", shows: "start", rules: et }),
@@ -4480,7 +4479,7 @@ function ym(e) {
4480
4479
  // 時点は幅 0 の選択で、両端を隣へ送る shift がそのまま「時点を隣へ」になる (start / end は幅を開くため使えない)
4481
4480
  micro: vt === void 0 ? rr : Nr({ ...k, row: "micro", shows: "end", rules: { previous: { motion: "shift", window: vt.previous.window }, next: { motion: "shift", window: vt.next.window } } })
4482
4481
  };
4483
- }, [et, vt, h, w, f, oe, N, W, C, x.macroIsDiscrete, x.macroAllowedDates, x.microIsDiscrete, x.microAllowedDates, x.allowedDates]), Rt = A((k) => we(k.macroRange, k.microSelection[0], "macro"), [we]), st = A((k) => we(k.macroRange, k.microSelection[0], "micro"), [we]), qt = tr(Ee.macroStart, Rt), T = tr(Ee.macroEnd, Rt), ee = tr(Ee.micro, st), [je, mt] = X, Ze = Y(
4482
+ }, [et, vt, h, w, f, oe, N, W, C, x.macroIsDiscrete, x.macroAllowedDates, x.microIsDiscrete, x.microAllowedDates, x.allowedDates]), Rt = A((k) => we(k.macroRange, k.microSelection[0], "macro"), [we]), st = A((k) => we(k.macroRange, k.microSelection[0], "micro"), [we]), Ut = tr(Ee.macroStart, Rt), T = tr(Ee.macroEnd, Rt), ee = tr(Ee.micro, st), [Ue, mt] = X, Ke = Y(
4484
4483
  () => ({
4485
4484
  value: W[0],
4486
4485
  onChange: it,
@@ -4488,14 +4487,14 @@ function ym(e) {
4488
4487
  maxDate: W[1],
4489
4488
  unit: h,
4490
4489
  yearStartMonth: f,
4491
- ...Kt(h, I),
4490
+ ...qt(h, I),
4492
4491
  formatLocale: e.formatLocale,
4493
4492
  locale: e.locale,
4494
4493
  labels: e.labels,
4495
4494
  formatOption: S,
4496
- ...ke ? { stepper: qt } : {}
4495
+ ...ke ? { stepper: Ut } : {}
4497
4496
  }),
4498
- [W, it, r, h, f, I, e.formatLocale, e.locale, e.labels, S, ke, qt]
4497
+ [W, it, r, h, f, I, e.formatLocale, e.locale, e.labels, S, ke, Ut]
4499
4498
  ), Me = Y(
4500
4499
  () => ({
4501
4500
  value: W[1],
@@ -4504,7 +4503,7 @@ function ym(e) {
4504
4503
  maxDate: n,
4505
4504
  unit: h,
4506
4505
  yearStartMonth: f,
4507
- ...Kt(h, I),
4506
+ ...qt(h, I),
4508
4507
  formatLocale: e.formatLocale,
4509
4508
  locale: e.locale,
4510
4509
  labels: e.labels,
@@ -4515,19 +4514,19 @@ function ym(e) {
4515
4514
  ), Ae = Y(
4516
4515
  () => ({
4517
4516
  value: C,
4518
- onChange: Ge,
4519
- minDate: je,
4517
+ onChange: je,
4518
+ minDate: Ue,
4520
4519
  maxDate: mt,
4521
4520
  unit: w,
4522
4521
  yearStartMonth: f,
4523
- ...Kt(w, _),
4522
+ ...qt(w, _),
4524
4523
  formatLocale: e.formatLocale,
4525
4524
  locale: e.locale,
4526
4525
  labels: e.labels,
4527
4526
  formatOption: S,
4528
- ...Xe ? { stepper: ee } : {}
4527
+ ...Ze ? { stepper: ee } : {}
4529
4528
  }),
4530
- [C, Ge, je, mt, w, f, _, e.formatLocale, e.locale, e.labels, S, Xe, ee]
4529
+ [C, je, Ue, mt, w, f, _, e.formatLocale, e.locale, e.labels, S, Ze, ee]
4531
4530
  ), Vr = Y(
4532
4531
  () => ({
4533
4532
  ...x,
@@ -4552,92 +4551,92 @@ function ym(e) {
4552
4551
  setMicroValue: O,
4553
4552
  setMacroLowerDate: it,
4554
4553
  setMacroUpperDate: Je,
4555
- setMicroDate: Ge,
4554
+ setMicroDate: je,
4556
4555
  shiftMacroRange: ut,
4557
4556
  shiftMicroValue: ae,
4558
4557
  resetVernier: Dt,
4559
- macroStartSelectorProps: Ze,
4558
+ macroStartSelectorProps: Ke,
4560
4559
  macroEndSelectorProps: Me,
4561
4560
  microSelectorProps: Ae,
4562
4561
  sliderProps: Vr,
4563
4562
  duringRender: te.duringRender
4564
4563
  };
4565
4564
  }
4566
- function si(e, t) {
4565
+ function ci(e, t) {
4567
4566
  const r = /* @__PURE__ */ new Date(0);
4568
4567
  return r.setHours(0, 0, 0, 0), r.setFullYear(e, t, 1), r;
4569
4568
  }
4570
- function Go(e, t) {
4569
+ function Ko(e, t) {
4571
4570
  const r = new Date(e.getTime());
4572
- return Zo(r.getFullYear(), r.getMonth(), t);
4571
+ return Jo(r.getFullYear(), r.getMonth(), t);
4573
4572
  }
4574
- function ml(e) {
4575
- return e === void 0 ? 0 : xl(e) ? e : Number.NaN;
4573
+ function fl(e) {
4574
+ return e === void 0 ? 0 : Ml(e) ? e : Number.NaN;
4576
4575
  }
4577
- const fl = Kn("declare the years to offer with minYear / maxYear or allowedYears");
4578
- function yo(e, t, r, n) {
4579
- e !== void 0 && Hl(e, t, r, n);
4576
+ const hl = qn("declare the years to offer with minYear / maxYear or allowedYears");
4577
+ function Po(e, t, r, n) {
4578
+ e !== void 0 && Fl(e, t, r, n);
4580
4579
  }
4581
- function Hl(e, t, r, n) {
4580
+ function Fl(e, t, r, n) {
4582
4581
  if (!ye(e))
4583
4582
  throw new RangeError(`YearSelector: ${t} must be a valid Date (received: ${M(e)})`);
4584
4583
  Qe("YearSelector", t, e, "year", r, n);
4585
4584
  }
4586
- function hl(e, t, r) {
4585
+ function gl(e, t, r) {
4587
4586
  if (e !== void 0) {
4588
4587
  if (!Number.isInteger(e))
4589
4588
  throw new RangeError(`YearSelector: ${t} must be an integer year (received: ${M(e)})`);
4590
- if (Number.isNaN(si(e, r).getTime()))
4589
+ if (Number.isNaN(ci(e, r).getTime()))
4591
4590
  throw new RangeError(`YearSelector: ${t} must name a year that starts inside the Date range (received: ${M(e)}); under yearStartMonth ${r} that year starts on month ${r + 1}, day 1`);
4592
4591
  }
4593
4592
  }
4594
- function gl(e, t, r, n) {
4595
- const o = e === void 0 ? null : e, a = t === void 0 ? null : Go(t, n);
4593
+ function pl(e, t, r, n) {
4594
+ const o = e === void 0 ? null : e, a = t === void 0 ? null : Ko(t, n);
4596
4595
  return o !== null && a !== null ? r(o, a) : o !== null ? o : a;
4597
4596
  }
4598
- function lm(e, t, r, n) {
4597
+ function dm(e, t, r, n) {
4599
4598
  const o = /* @__PURE__ */ new Set();
4600
4599
  for (const a of e) {
4601
- const i = Go(a, n);
4600
+ const i = Ko(a, n);
4602
4601
  t !== null && i < t || r !== null && i > r || o.add(i);
4603
4602
  }
4604
4603
  return Array.from(o).sort((a, i) => a - i);
4605
4604
  }
4606
- function cm(e, t, r, n) {
4607
- return e !== void 0 ? { kind: "discrete", ascending: lm(e, t, r, n) } : t === null || r === null ? null : { kind: "bounded", minYear: t, maxYear: r };
4605
+ function um(e, t, r, n) {
4606
+ return e !== void 0 ? { kind: "discrete", ascending: dm(e, t, r, n) } : t === null || r === null ? null : { kind: "bounded", minYear: t, maxYear: r };
4608
4607
  }
4609
- function dm(e, t) {
4608
+ function mm(e, t) {
4610
4609
  const r = [];
4611
4610
  for (let n = t; n >= e; n--)
4612
4611
  r.push(n);
4613
4612
  return r;
4614
4613
  }
4615
- const um = (e) => {
4614
+ const fm = (e) => {
4616
4615
  const { value: t, initialDate: r, onChange: n, stepper: o, stepGlyph: a, children: i, minYear: s, maxYear: c, minDate: d, maxDate: u, allowedYears: S, className: E = "", style: $, disabled: p = !1, locale: h, labels: w, formatLocale: f, formatOption: x, yearStartMonth: R } = e, b = vr("YearSelector", R);
4617
- if (yo(t, "value", b, ""), yo(r, "initialDate", b, ""), yo(d, "minDate", b, fl), yo(u, "maxDate", b, fl), hl(s, "minYear", b), hl(c, "maxYear", b), mn("YearSelector", "allowedYears", S), S !== void 0)
4616
+ if (Po(t, "value", b, ""), Po(r, "initialDate", b, ""), Po(d, "minDate", b, hl), Po(u, "maxDate", b, hl), gl(s, "minYear", b), gl(c, "maxYear", b), mn("YearSelector", "allowedYears", S), S !== void 0)
4618
4617
  for (let ie = 0; ie < S.length; ie++)
4619
- Hl(S[ie], `allowedYears[${ie}]`, b, "");
4620
- f !== void 0 && ra("YearSelector", "formatLocale", f);
4618
+ Fl(S[ie], `allowedYears[${ie}]`, b, "");
4619
+ f !== void 0 && oa("YearSelector", "formatLocale", f);
4621
4620
  const m = t ?? r;
4622
4621
  if (m === void 0)
4623
4622
  throw new RangeError("YearSelector: either value (controlled) or initialDate (uncontrolled) is required; the selected year is never inferred from the wall clock");
4624
- o !== void 0 && Si("YearSelector", o, t !== void 0);
4625
- const me = hi("YearSelector", a), q = qo(h, w), ne = t !== void 0, [te, W] = Di(
4623
+ o !== void 0 && Di("YearSelector", o, t !== void 0);
4624
+ const me = pi("YearSelector", a), q = Zo(h, w), ne = t !== void 0, [te, W] = Ri(
4626
4625
  m,
4627
4626
  ne,
4628
- (ie) => na(ie, "year", b),
4629
- (ie) => Go(ie, b)
4630
- ), oe = d?.getTime(), N = u?.getTime(), X = Y(() => gl(s, d, Math.max, b), [s, oe, b]), F = Y(() => gl(c, u, Math.min, b), [c, N, b]);
4627
+ (ie) => aa(ie, "year", b),
4628
+ (ie) => Ko(ie, b)
4629
+ ), oe = d?.getTime(), N = u?.getTime(), X = Y(() => pl(s, d, Math.max, b), [s, oe, b]), F = Y(() => pl(c, u, Math.min, b), [c, N, b]);
4631
4630
  if (X !== null && F !== null && X > F)
4632
4631
  throw new RangeError(`YearSelector: the resolved upper bound must not precede the resolved lower bound (lower: ${X}, upper: ${F})`);
4633
- const I = S === void 0 ? null : S.map((ie) => ie.getTime()).join(","), L = Y(() => cm(S, X, F, b), [I, X, F, b]);
4632
+ const I = S === void 0 ? null : S.map((ie) => ie.getTime()).join(","), L = Y(() => um(S, X, F, b), [I, X, F, b]);
4634
4633
  if (L === null)
4635
4634
  throw new RangeError("YearSelector: a lower bound (minYear or minDate) and an upper bound (maxYear or maxDate), or allowedYears, are required; the option list is never invented");
4636
- const H = Y(() => L.kind === "discrete" ? { kind: "candidates", ascending: L.ascending, loIndex: 0, hiIndex: L.ascending.length - 1 } : { kind: "range", min: L.minYear, max: L.maxYear }, [L]), _ = t !== void 0 ? Go(t, b) : te, C = !kn(H, _), U = (ie) => {
4635
+ const H = Y(() => L.kind === "discrete" ? { kind: "candidates", ascending: L.ascending, loIndex: 0, hiIndex: L.ascending.length - 1 } : { kind: "range", min: L.minYear, max: L.maxYear }, [L]), _ = t !== void 0 ? Ko(t, b) : te, C = !_n(H, _), U = (ie) => {
4637
4636
  if (!p) {
4638
- if (!kn(H, ie))
4637
+ if (!_n(H, ie))
4639
4638
  throw new RangeError(`YearSelector: refusing to emit ${ie}, which lies outside the selectable years`);
4640
- ne || W(ie), n?.(si(ie, b), ie);
4639
+ ne || W(ie), n?.(ci(ie, b), ie);
4641
4640
  }
4642
4641
  }, j = nr(H, _, -1), pe = nr(H, _, 1), re = () => {
4643
4642
  if (o !== void 0) {
@@ -4652,17 +4651,17 @@ const um = (e) => {
4652
4651
  }
4653
4652
  pe !== null && U(pe);
4654
4653
  }, Re = Y(() => {
4655
- const ie = L.kind === "discrete" ? [...L.ascending].reverse() : dm(L.minYear, L.maxYear);
4656
- return C && (ie.push(_), ie.sort((se, be) => be - se)), ie.map((se) => ({ value: se, label: gt("year", si(se, b), x, f) }));
4654
+ const ie = L.kind === "discrete" ? [...L.ascending].reverse() : mm(L.minYear, L.maxYear);
4655
+ return C && (ie.push(_), ie.sort((se, be) => be - se)), ie.map((se) => ({ value: se, label: gt("year", ci(se, b), x, f) }));
4657
4656
  }, [L, C, _, b, f, x]);
4658
- return /* @__PURE__ */ $e("div", { className: `inline-flex items-center ${On} ${E}`, style: $, "data-out-of-range": C ? "true" : void 0, children: [
4657
+ return /* @__PURE__ */ $e("div", { className: `inline-flex items-center ${Vn} ${E}`, style: $, "data-out-of-range": C ? "true" : void 0, children: [
4659
4658
  /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "left", glyph: me, disabled: p, canStep: o === void 0 ? j !== null : o.canStepPrevious, onStep: re, ariaLabel: q.previousYear }),
4660
4659
  /* @__PURE__ */ K(
4661
4660
  "select",
4662
4661
  {
4663
4662
  "aria-label": q.yearSelect,
4664
4663
  disabled: p,
4665
- className: "w-18 appearance-none rounded-md border border-gray-300 bg-gray-100 px-1 py-0.5 text-center font-mono text-gray-900 text-xs tabular-nums [text-align-last:center] [text-align:center] focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500",
4664
+ className: `${Pu} appearance-none rounded-md border border-gray-300 bg-gray-100 px-1 py-0.5 text-center font-mono text-gray-900 tabular-nums [text-align-last:center] [text-align:center] focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-100 dark:focus:border-blue-500 dark:focus:ring-blue-500`,
4666
4665
  value: _,
4667
4666
  onChange: (ie) => {
4668
4667
  if (!ie.target.value) return;
@@ -4675,50 +4674,50 @@ const um = (e) => {
4675
4674
  /* @__PURE__ */ K(Cr, { neighbour: "control", direction: "right", glyph: me, disabled: p, canStep: o === void 0 ? pe !== null : o.canStepNext, onStep: ce, ariaLabel: q.nextYear }),
4676
4675
  i
4677
4676
  ] });
4678
- }, mm = (e, t) => {
4679
- const r = ml(t.yearStartMonth);
4680
- return !(ml(e.yearStartMonth) !== r || !vi(e, t, (n) => na(n, "year", r)) || e.disabled !== t.disabled || e.className !== t.className || e.style !== t.style || e.minYear !== t.minYear || e.maxYear !== t.maxYear || e.allowedYears !== t.allowedYears || e.onChange !== t.onChange || e.stepper === void 0 != (t.stepper === void 0) || e.value === void 0 != (t.value === void 0) || e.stepper?.onStep !== t.stepper?.onStep || e.stepper?.canStepPrevious !== t.stepper?.canStepPrevious || e.stepper?.canStepNext !== t.stepper?.canStepNext || e.stepGlyph !== t.stepGlyph || e.children !== t.children || e.locale !== t.locale || !Ko(e.labels, t.labels) || e.formatLocale !== t.formatLocale || e.formatOption !== t.formatOption);
4681
- }, fm = Gn(um, mm);
4682
- fm.displayName = "YearSelector";
4677
+ }, hm = (e, t) => {
4678
+ const r = fl(t.yearStartMonth);
4679
+ return !(fl(e.yearStartMonth) !== r || !Si(e, t, (n) => aa(n, "year", r)) || e.disabled !== t.disabled || e.className !== t.className || e.style !== t.style || e.minYear !== t.minYear || e.maxYear !== t.maxYear || e.allowedYears !== t.allowedYears || e.onChange !== t.onChange || e.stepper === void 0 != (t.stepper === void 0) || e.value === void 0 != (t.value === void 0) || e.stepper?.onStep !== t.stepper?.onStep || e.stepper?.canStepPrevious !== t.stepper?.canStepPrevious || e.stepper?.canStepNext !== t.stepper?.canStepNext || e.stepGlyph !== t.stepGlyph || e.children !== t.children || e.locale !== t.locale || !Xo(e.labels, t.labels) || e.formatLocale !== t.formatLocale || e.formatOption !== t.formatOption);
4680
+ }, gm = jn(fm, hm);
4681
+ gm.displayName = "YearSelector";
4683
4682
  export {
4684
- Pd as COLOR_SCHEME_PALETTES,
4685
- Bu as DateSelector,
4686
- Zu as MonthSelector,
4687
- rd as PERIOD_SLIDER_LABEL_CATALOGS,
4688
- fi as PERIOD_SLIDER_LABEL_KEYS,
4689
- hu as PeriodSlider,
4690
- fm as YearSelector,
4691
- Ld as addUnit,
4692
- mu as areStylesEqual,
4693
- kd as calculateConnectDragValues,
4694
- Vs as calculateHandleDragValues,
4695
- _d as calculateKeyboardActionValues,
4696
- Bd as calculateLabelSlant,
4697
- Kd as calculateVernierMacroDrag,
4698
- qd as calculateVernierMicroDrag,
4683
+ Ed as COLOR_SCHEME_PALETTES,
4684
+ Gu as DateSelector,
4685
+ Ju as MonthSelector,
4686
+ nd as PERIOD_SLIDER_LABEL_CATALOGS,
4687
+ gi as PERIOD_SLIDER_LABEL_KEYS,
4688
+ gu as PeriodSlider,
4689
+ gm as YearSelector,
4690
+ $d as addUnit,
4691
+ fu as areStylesEqual,
4692
+ _d as calculateConnectDragValues,
4693
+ ks as calculateHandleDragValues,
4694
+ Yd as calculateKeyboardActionValues,
4695
+ Wd as calculateLabelSlant,
4696
+ qd as calculateVernierMacroDrag,
4697
+ Xd as calculateVernierMicroDrag,
4699
4698
  le as decode,
4700
4699
  z as encode,
4701
4700
  Pe as findNearestDateIndex,
4702
4701
  gt as formatLabel,
4703
- Mu as formatOptionText,
4704
- Sm as formatQuarterLabel,
4702
+ yu as formatOptionText,
4703
+ Rm as formatQuarterLabel,
4705
4704
  en as formatScreenReaderLabel,
4706
- Td as getMacroWindowEndDate,
4707
- $d as getMacroWindowStartDate,
4708
- Dm as getSortedAllowedDates,
4705
+ Id as getMacroWindowEndDate,
4706
+ Td as getMacroWindowStartDate,
4707
+ xm as getSortedAllowedDates,
4709
4708
  Ct as normalizeDateByUnit,
4710
- mi as resolveDraggedEdge,
4709
+ hi as resolveDraggedEdge,
4711
4710
  Yt as resolveMacroWindow,
4712
- id as resolvePeriodSliderLabels,
4713
- Id as resolveQuarter,
4714
- tl as resolveSelectorSteps,
4715
- $l as resolveVernierRailZone,
4711
+ sd as resolvePeriodSliderLabels,
4712
+ Ad as resolveQuarter,
4713
+ rl as resolveSelectorSteps,
4714
+ Tl as resolveVernierRailZone,
4716
4715
  Nr as resolveVernierSelectorSteps,
4717
- jd as resolveVernierTargetHandle,
4718
- Gd as resolveWheelStep,
4719
- xm as usePeriodSliderPoint,
4720
- Rm as usePeriodSliderRange,
4716
+ Kd as resolveVernierTargetHandle,
4717
+ jd as resolveWheelStep,
4718
+ ym as usePeriodSliderPoint,
4719
+ Mm as usePeriodSliderRange,
4721
4720
  tr as useSelectorStepper,
4722
- ym as useVernierSliderPoint,
4723
- Mm as useVernierSliderRange
4721
+ Em as useVernierSliderPoint,
4722
+ Pm as useVernierSliderRange
4724
4723
  };