@rpcbase/ui 0.193.0 → 0.194.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.
Files changed (245) hide show
  1. package/dist/components/DayPickerField/index.d.ts.map +1 -1
  2. package/dist/components/HourPickerField/index.d.ts.map +1 -1
  3. package/dist/index100.js +4 -3
  4. package/dist/index100.js.map +1 -1
  5. package/dist/index101.js +4 -5
  6. package/dist/index101.js.map +1 -1
  7. package/dist/index102.js +8 -4
  8. package/dist/index102.js.map +1 -1
  9. package/dist/index103.js +5 -8
  10. package/dist/index103.js.map +1 -1
  11. package/dist/index104.js +4 -5
  12. package/dist/index104.js.map +1 -1
  13. package/dist/index105.js +3 -3
  14. package/dist/index105.js.map +1 -1
  15. package/dist/index106.js +6 -4
  16. package/dist/index106.js.map +1 -1
  17. package/dist/index107.js +145 -6
  18. package/dist/index107.js.map +1 -1
  19. package/dist/index108.js +38 -144
  20. package/dist/index108.js.map +1 -1
  21. package/dist/index109.js +4 -39
  22. package/dist/index109.js.map +1 -1
  23. package/dist/index110.js +7 -4
  24. package/dist/index110.js.map +1 -1
  25. package/dist/index111.js +12 -6
  26. package/dist/index111.js.map +1 -1
  27. package/dist/index112.js +13 -13
  28. package/dist/index112.js.map +1 -1
  29. package/dist/index113.js +7 -13
  30. package/dist/index113.js.map +1 -1
  31. package/dist/index114.js +30 -6
  32. package/dist/index114.js.map +1 -1
  33. package/dist/index115.js +10 -31
  34. package/dist/index115.js.map +1 -1
  35. package/dist/index116.js +10 -10
  36. package/dist/index116.js.map +1 -1
  37. package/dist/index117.js +8 -10
  38. package/dist/index117.js.map +1 -1
  39. package/dist/index118.js +13 -8
  40. package/dist/index118.js.map +1 -1
  41. package/dist/index119.js +101 -13
  42. package/dist/index119.js.map +1 -1
  43. package/dist/index12.js +421 -510
  44. package/dist/index12.js.map +1 -1
  45. package/dist/index120.js +20 -102
  46. package/dist/index120.js.map +1 -1
  47. package/dist/index121.js +54 -20
  48. package/dist/index121.js.map +1 -1
  49. package/dist/index122.js +70 -51
  50. package/dist/index122.js.map +1 -1
  51. package/dist/index123.js +9 -72
  52. package/dist/index123.js.map +1 -1
  53. package/dist/index124.js +20 -9
  54. package/dist/index124.js.map +1 -1
  55. package/dist/index125.js +16 -20
  56. package/dist/index125.js.map +1 -1
  57. package/dist/index126.js +23 -16
  58. package/dist/index126.js.map +1 -1
  59. package/dist/index127.js +6 -23
  60. package/dist/index127.js.map +1 -1
  61. package/dist/index128.js +5 -6
  62. package/dist/index128.js.map +1 -1
  63. package/dist/index129.js +23 -5
  64. package/dist/index129.js.map +1 -1
  65. package/dist/index130.js +35 -24
  66. package/dist/index130.js.map +1 -1
  67. package/dist/index131.js +16 -35
  68. package/dist/index131.js.map +1 -1
  69. package/dist/index132.js +7 -16
  70. package/dist/index132.js.map +1 -1
  71. package/dist/index133.js +4 -6
  72. package/dist/index133.js.map +1 -1
  73. package/dist/index134.js +4 -4
  74. package/dist/index134.js.map +1 -1
  75. package/dist/index135.js +4 -4
  76. package/dist/index135.js.map +1 -1
  77. package/dist/index136.js +4 -4
  78. package/dist/index136.js.map +1 -1
  79. package/dist/index137.js +3 -4
  80. package/dist/index137.js.map +1 -1
  81. package/dist/index138.js +6 -3
  82. package/dist/index138.js.map +1 -1
  83. package/dist/index139.js +24 -7
  84. package/dist/index139.js.map +1 -1
  85. package/dist/index140.js +8 -24
  86. package/dist/index140.js.map +1 -1
  87. package/dist/index141.js +6 -7
  88. package/dist/index141.js.map +1 -1
  89. package/dist/index142.js +5 -6
  90. package/dist/index142.js.map +1 -1
  91. package/dist/index143.js +3 -5
  92. package/dist/index143.js.map +1 -1
  93. package/dist/index144.js +3 -3
  94. package/dist/index144.js.map +1 -1
  95. package/dist/index145.js +4 -3
  96. package/dist/index145.js.map +1 -1
  97. package/dist/index146.js +3 -4
  98. package/dist/index146.js.map +1 -1
  99. package/dist/index147.js +4 -3
  100. package/dist/index147.js.map +1 -1
  101. package/dist/index148.js +3 -4
  102. package/dist/index148.js.map +1 -1
  103. package/dist/index149.js +3 -3
  104. package/dist/index149.js.map +1 -1
  105. package/dist/index150.js +3 -3
  106. package/dist/index150.js.map +1 -1
  107. package/dist/index151.js +46 -3
  108. package/dist/index151.js.map +1 -1
  109. package/dist/index152.js +599 -40
  110. package/dist/index152.js.map +1 -1
  111. package/dist/index153.js +41 -200
  112. package/dist/index153.js.map +1 -1
  113. package/dist/index154.js +204 -20
  114. package/dist/index154.js.map +1 -1
  115. package/dist/index155.js +22 -25
  116. package/dist/index155.js.map +1 -1
  117. package/dist/index156.js +23 -398
  118. package/dist/index156.js.map +1 -1
  119. package/dist/index157.js +383 -589
  120. package/dist/index157.js.map +1 -1
  121. package/dist/index183.js +1 -1
  122. package/dist/index19.js +505 -557
  123. package/dist/index19.js.map +1 -1
  124. package/dist/index230.js +1 -1
  125. package/dist/index233.js +1 -1
  126. package/dist/index235.js +1 -1
  127. package/dist/index236.js +1 -1
  128. package/dist/index237.js +3 -3
  129. package/dist/index238.js +2 -2
  130. package/dist/index239.js +65 -22
  131. package/dist/index239.js.map +1 -1
  132. package/dist/index24.js +1 -1
  133. package/dist/index240.js +179 -27
  134. package/dist/index240.js.map +1 -1
  135. package/dist/index241.js +47 -5
  136. package/dist/index241.js.map +1 -1
  137. package/dist/index242.js +22 -65
  138. package/dist/index242.js.map +1 -1
  139. package/dist/index243.js +27 -179
  140. package/dist/index243.js.map +1 -1
  141. package/dist/index244.js +5 -47
  142. package/dist/index244.js.map +1 -1
  143. package/dist/index276.js +1 -1
  144. package/dist/index277.js +1 -1
  145. package/dist/index299.js +1 -1
  146. package/dist/index31.js +5 -5
  147. package/dist/index32.js +24 -24
  148. package/dist/index33.js +3 -3
  149. package/dist/index41.js +20 -20
  150. package/dist/index45.js +1 -1
  151. package/dist/index46.js +1 -1
  152. package/dist/index49.js +1 -1
  153. package/dist/index50.js +1 -1
  154. package/dist/index51.js +205 -2
  155. package/dist/index51.js.map +1 -1
  156. package/dist/index52.js +2 -2
  157. package/dist/index53.js +2 -7
  158. package/dist/index53.js.map +1 -1
  159. package/dist/index54.js +6 -33
  160. package/dist/index54.js.map +1 -1
  161. package/dist/index55.js +33 -26
  162. package/dist/index55.js.map +1 -1
  163. package/dist/index56.js +26 -7
  164. package/dist/index56.js.map +1 -1
  165. package/dist/index57.js +7 -11
  166. package/dist/index57.js.map +1 -1
  167. package/dist/index58.js +12 -2
  168. package/dist/index58.js.map +1 -1
  169. package/dist/index59.js +4 -2
  170. package/dist/index59.js.map +1 -1
  171. package/dist/index60.js +44 -201
  172. package/dist/index60.js.map +1 -1
  173. package/dist/index61.js +50 -3
  174. package/dist/index61.js.map +1 -1
  175. package/dist/index62.js +7 -47
  176. package/dist/index62.js.map +1 -1
  177. package/dist/index63.js +12 -48
  178. package/dist/index63.js.map +1 -1
  179. package/dist/index64.js +133 -7
  180. package/dist/index64.js.map +1 -1
  181. package/dist/index65.js +10 -14
  182. package/dist/index65.js.map +1 -1
  183. package/dist/index66.js +210 -127
  184. package/dist/index66.js.map +1 -1
  185. package/dist/index67.js +12 -10
  186. package/dist/index67.js.map +1 -1
  187. package/dist/index68.js +44 -214
  188. package/dist/index68.js.map +1 -1
  189. package/dist/index69.js +49 -12
  190. package/dist/index69.js.map +1 -1
  191. package/dist/index70.js +4 -47
  192. package/dist/index70.js.map +1 -1
  193. package/dist/index71.js +5 -49
  194. package/dist/index71.js.map +1 -1
  195. package/dist/index72.js +28 -4
  196. package/dist/index72.js.map +1 -1
  197. package/dist/index73.js +50 -6
  198. package/dist/index73.js.map +1 -1
  199. package/dist/index74.js +9 -28
  200. package/dist/index74.js.map +1 -1
  201. package/dist/index75.js +2 -50
  202. package/dist/index75.js.map +1 -1
  203. package/dist/index76.js +2 -9
  204. package/dist/index76.js.map +1 -1
  205. package/dist/index80.js +52 -47
  206. package/dist/index80.js.map +1 -1
  207. package/dist/index81.js +5 -52
  208. package/dist/index81.js.map +1 -1
  209. package/dist/index82.js +4 -4
  210. package/dist/index82.js.map +1 -1
  211. package/dist/index83.js +15 -4
  212. package/dist/index83.js.map +1 -1
  213. package/dist/index84.js +5 -15
  214. package/dist/index84.js.map +1 -1
  215. package/dist/index85.js +7 -5
  216. package/dist/index85.js.map +1 -1
  217. package/dist/index86.js +15 -6
  218. package/dist/index86.js.map +1 -1
  219. package/dist/index87.js +4 -16
  220. package/dist/index87.js.map +1 -1
  221. package/dist/index88.js +1 -1
  222. package/dist/index88.js.map +1 -1
  223. package/dist/index89.js +5 -4
  224. package/dist/index89.js.map +1 -1
  225. package/dist/index90.js +4 -4
  226. package/dist/index90.js.map +1 -1
  227. package/dist/index91.js +4 -5
  228. package/dist/index91.js.map +1 -1
  229. package/dist/index92.js +2 -2
  230. package/dist/index92.js.map +1 -1
  231. package/dist/index93.js +5 -3
  232. package/dist/index93.js.map +1 -1
  233. package/dist/index94.js +24 -6
  234. package/dist/index94.js.map +1 -1
  235. package/dist/index95.js +6 -24
  236. package/dist/index95.js.map +1 -1
  237. package/dist/index96.js +4 -6
  238. package/dist/index96.js.map +1 -1
  239. package/dist/index97.js +5 -3
  240. package/dist/index97.js.map +1 -1
  241. package/dist/index98.js +5 -6
  242. package/dist/index98.js.map +1 -1
  243. package/dist/index99.js +4 -5
  244. package/dist/index99.js.map +1 -1
  245. package/package.json +1 -1
package/dist/index19.js CHANGED
@@ -1,702 +1,650 @@
1
- import { j as g } from "./index30.js";
2
- import { c as Ie } from "./index28.js";
3
- import { Check as Be, ChevronUp as ze, ChevronDown as Ae } from "lucide-react";
4
- import * as c from "react";
5
- import { DismissableLayerBranch as $e } from "./index31.js";
6
- import { createPortal as qe } from "react-dom";
7
- import { IMaskInput as We } from "react-imask";
8
- import Ue, { InputMask as Ke } from "imask";
9
- import { SelectItem as Ye, SelectValue as _e, SelectTrigger as Ge, SelectContent as Xe, Select as Je } from "./index21.js";
10
- import { useIsTouchDevice as Qe } from "./index4.js";
11
- import { cn as Ee } from "./index2.js";
12
- const je = Ue;
13
- typeof je.InputMask != "function" && (je.InputMask = Ke);
14
- function Re(o) {
1
+ import { j as v } from "./index30.js";
2
+ import { c as we } from "./index28.js";
3
+ import { Check as Ee, ChevronUp as Re, ChevronDown as De } from "lucide-react";
4
+ import * as n from "react";
5
+ import { DismissableLayerBranch as He } from "./index31.js";
6
+ import { createPortal as Ie } from "react-dom";
7
+ import { IMaskInput as Ce } from "react-imask";
8
+ import Me, { InputMask as je } from "imask";
9
+ import { SelectItem as Ve, SelectValue as Pe, SelectTrigger as Oe, SelectContent as Ae, Select as Le } from "./index21.js";
10
+ import { useIsTouchDevice as Fe } from "./index4.js";
11
+ import { cn as ne } from "./index2.js";
12
+ const ke = Me;
13
+ typeof ke.InputMask != "function" && (ke.InputMask = je);
14
+ function be(o) {
15
15
  return String(o).padStart(2, "0");
16
16
  }
17
- function Ze(o) {
17
+ function Be(o) {
18
18
  const e = o.trim();
19
19
  if (!e) return null;
20
- const b = /^(\d{1,2}):(\d{2})$/.exec(e);
21
- if (!b)
20
+ const g = /^(\d{1,2}):(\d{2})$/.exec(e);
21
+ if (!g)
22
22
  return null;
23
- const a = Number(b[1]), t = Number(b[2]);
24
- return !Number.isFinite(a) || !Number.isFinite(t) || a < 0 || a > 23 || t < 0 || t > 59 ? null : `${Re(a)}:${Re(t)}`;
23
+ const l = Number(g[1]), t = Number(g[2]);
24
+ return !Number.isFinite(l) || !Number.isFinite(t) || l < 0 || l > 23 || t < 0 || t > 59 ? null : `${be(l)}:${be(t)}`;
25
25
  }
26
- function Ce(o, e) {
27
- const b = Ze(o);
28
- if (!b) return null;
29
- const a = e.find((t) => t.value === b);
30
- return ue(a) ? {
31
- parsed: b,
32
- selectableValue: b
26
+ function ve(o, e) {
27
+ const g = Be(o);
28
+ if (!g) return null;
29
+ const l = e.find((t) => t.value === g);
30
+ return _(l) ? {
31
+ parsed: g,
32
+ selectableValue: g
33
33
  } : {
34
- parsed: b,
34
+ parsed: g,
35
35
  selectableValue: null
36
36
  };
37
37
  }
38
- function Me(o) {
38
+ function xe(o) {
39
39
  const e = /^(\d{2}):(\d{2})$/.exec(o);
40
40
  if (!e)
41
41
  return null;
42
- const b = Number(e[1]), a = Number(e[2]);
43
- return !Number.isFinite(b) || !Number.isFinite(a) ? null : b * 60 + a;
42
+ const g = Number(e[1]), l = Number(e[2]);
43
+ return !Number.isFinite(g) || !Number.isFinite(l) ? null : g * 60 + l;
44
44
  }
45
- function ue(o) {
45
+ function _(o) {
46
46
  return o ? !o.disabled : !1;
47
47
  }
48
- function Oe(o, e) {
49
- let b = null, a = Number.POSITIVE_INFINITY, t = Number.NEGATIVE_INFINITY;
50
- for (const x of e) {
51
- if (!ue(x)) continue;
52
- const r = Me(x.value);
53
- if (r == null) continue;
54
- const u = Math.abs(r - o);
55
- (u < a || u === a && r > t) && (b = x, a = u, t = r);
48
+ function ye(o, e) {
49
+ let g = null, l = Number.POSITIVE_INFINITY, t = Number.NEGATIVE_INFINITY;
50
+ for (const M of e) {
51
+ if (!_(M)) continue;
52
+ const f = xe(M.value);
53
+ if (f == null) continue;
54
+ const c = Math.abs(f - o);
55
+ (c < l || c === l && f > t) && (g = M, l = c, t = f);
56
56
  }
57
- return b;
57
+ return g;
58
58
  }
59
- function Pe({
59
+ function Te({
60
60
  direction: o,
61
61
  viewportRef: e,
62
- speed: b = 400,
63
- className: a
62
+ speed: g = 400,
63
+ className: l
64
64
  }) {
65
- const [t, x] = c.useState(!0), r = c.useRef(void 0), u = c.useRef(void 0), p = c.useRef(!1), M = c.useCallback(() => {
66
- const k = e.current;
67
- if (!k) {
68
- x(!0);
65
+ const [t, M] = n.useState(!0), f = n.useRef(void 0), c = n.useRef(void 0), a = n.useRef(!1), j = n.useCallback(() => {
66
+ const E = e.current;
67
+ if (!E) {
68
+ M(!0);
69
69
  return;
70
70
  }
71
71
  const {
72
- scrollTop: V,
73
- scrollHeight: H,
74
- clientHeight: v
75
- } = k, S = 2, $ = V > S, T = V < H - v - S;
76
- if (!(H > v + S)) {
77
- x(!0);
72
+ scrollTop: C,
73
+ scrollHeight: V,
74
+ clientHeight: w
75
+ } = E, y = 2, z = C > y, N = C < V - w - y;
76
+ if (!(V > w + y)) {
77
+ M(!0);
78
78
  return;
79
79
  }
80
- x(o === "up" ? !$ : !T);
80
+ M(o === "up" ? !z : !N);
81
81
  }, [o, e]);
82
- c.useEffect(() => {
83
- const k = e.current;
84
- if (!k) return;
85
- M();
86
- const V = () => M(), H = () => M();
87
- k.addEventListener("scroll", V, {
82
+ n.useEffect(() => {
83
+ const E = e.current;
84
+ if (!E) return;
85
+ j();
86
+ const C = () => j(), V = () => j();
87
+ E.addEventListener("scroll", C, {
88
88
  passive: !0
89
89
  });
90
- const v = new ResizeObserver(H);
91
- v.observe(k);
92
- const S = new MutationObserver(H);
93
- return S.observe(k, {
90
+ const w = new ResizeObserver(V);
91
+ w.observe(E);
92
+ const y = new MutationObserver(V);
93
+ return y.observe(E, {
94
94
  childList: !0,
95
95
  subtree: !0
96
96
  }), () => {
97
- k.removeEventListener("scroll", V), v.disconnect(), S.disconnect();
97
+ E.removeEventListener("scroll", C), w.disconnect(), y.disconnect();
98
98
  };
99
- }, [e, M]);
100
- const i = c.useCallback(() => {
101
- r.current && (cancelAnimationFrame(r.current), r.current = void 0), p.current = !1, u.current = void 0;
102
- }, []), f = c.useCallback((k) => {
103
- const V = e.current;
104
- if (!V || t || !p.current) {
105
- i();
99
+ }, [e, j]);
100
+ const d = n.useCallback(() => {
101
+ f.current && (cancelAnimationFrame(f.current), f.current = void 0), a.current = !1, c.current = void 0;
102
+ }, []), p = n.useCallback((E) => {
103
+ const C = e.current;
104
+ if (!C || t || !a.current) {
105
+ d();
106
106
  return;
107
107
  }
108
- u.current || (u.current = k);
109
- const H = k - u.current, v = b * H / 1e3;
110
- if (v < 0.1) {
111
- r.current = requestAnimationFrame(f);
108
+ c.current || (c.current = E);
109
+ const V = E - c.current, w = g * V / 1e3;
110
+ if (w < 0.1) {
111
+ f.current = requestAnimationFrame(p);
112
112
  return;
113
113
  }
114
- const S = V.scrollTop, $ = V.scrollHeight - V.clientHeight;
115
- let T;
116
- o === "up" ? T = Math.max(0, S - v) : T = Math.min($, S + v), V.scrollTo({
117
- top: T
118
- }), u.current = k;
119
- const P = 1;
120
- (o === "up" ? T > P : T < $ - P) && Math.abs(T - S) > 0.01 ? r.current = requestAnimationFrame(f) : (i(), setTimeout(M, 16));
121
- }, [M, o, t, b, i, e]), A = c.useCallback(() => {
122
- t || !e.current || p.current || (p.current = !0, u.current = void 0, r.current = requestAnimationFrame(f));
123
- }, [t, f, e]);
124
- return c.useEffect(() => i, [i]), /* @__PURE__ */ g.jsx("div", { className: Ee("flex items-center justify-center py-1 select-none", t ? "cursor-default opacity-40" : "cursor-pointer opacity-100 hover:bg-accent/20", a), onPointerEnter: () => {
125
- t || A();
114
+ const y = C.scrollTop, z = C.scrollHeight - C.clientHeight;
115
+ let N;
116
+ o === "up" ? N = Math.max(0, y - w) : N = Math.min(z, y + w), C.scrollTo({
117
+ top: N
118
+ }), c.current = E;
119
+ const W = 1;
120
+ (o === "up" ? N > W : N < z - W) && Math.abs(N - y) > 0.01 ? f.current = requestAnimationFrame(p) : (d(), setTimeout(j, 16));
121
+ }, [j, o, t, g, d, e]), G = n.useCallback(() => {
122
+ t || !e.current || a.current || (a.current = !0, c.current = void 0, f.current = requestAnimationFrame(p));
123
+ }, [t, p, e]);
124
+ return n.useEffect(() => d, [d]), /* @__PURE__ */ v.jsx("div", { className: ne("flex items-center justify-center py-1 select-none", t ? "cursor-default opacity-40" : "cursor-pointer opacity-100 hover:bg-accent/20", l), onPointerEnter: () => {
125
+ t || G();
126
126
  }, onPointerMove: () => {
127
- !t && !p.current && A();
127
+ !t && !a.current && G();
128
128
  }, onPointerLeave: () => {
129
- i();
130
- }, children: o === "up" ? /* @__PURE__ */ g.jsx(ze, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) : /* @__PURE__ */ g.jsx(Ae, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) });
129
+ d();
130
+ }, children: o === "up" ? /* @__PURE__ */ v.jsx(Re, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) : /* @__PURE__ */ v.jsx(De, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) });
131
131
  }
132
- function Fe(o) {
133
- const e = Ie.c(79), {
134
- id: b,
135
- value: a,
136
- onChange: t,
137
- onValueUpdate: x,
138
- options: r,
139
- placeholder: u,
140
- className: p,
141
- inputClassName: M,
142
- disabled: i,
143
- readOnly: f,
144
- open: A,
145
- onOpenChange: k,
146
- triggerTestId: V,
147
- contentTestId: H,
148
- isHydrated: v
149
- } = o, S = u === void 0 ? "Select time" : u, $ = c.useId(), T = b ?? `hours-picker-${$}`, P = c.useRef(null), F = c.useRef(null);
150
- let U;
151
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = (n) => {
152
- F.current = n;
153
- }, e[0] = U) : U = e[0];
154
- const ae = U, se = c.useRef(null), j = c.useRef(!1), [I, N] = c.useState(null), E = c.useRef(null), L = c.useRef(null), O = c.useRef(null), [z, Y] = c.useState(nt), [we, ye] = c.useState(!1), s = A ?? we, C = k ?? ye;
155
- let fe, de;
156
- e[1] !== i || e[2] !== s || e[3] !== f ? (fe = () => {
157
- if (!s || i || f)
132
+ function Se({
133
+ id: o,
134
+ value: e,
135
+ onChange: g,
136
+ onValueUpdate: l,
137
+ options: t,
138
+ placeholder: M = "Select time",
139
+ className: f,
140
+ inputClassName: c,
141
+ disabled: a,
142
+ readOnly: j,
143
+ open: d,
144
+ onOpenChange: p,
145
+ triggerTestId: G,
146
+ contentTestId: E,
147
+ isHydrated: C
148
+ }) {
149
+ const V = n.useId(), w = o ?? `hours-picker-${V}`, y = n.useRef(null), z = n.useRef(null), N = n.useCallback((r) => {
150
+ z.current = r;
151
+ }, []), W = n.useRef(null), H = n.useRef(!1), [X, ee] = n.useState(null), J = n.useRef(null), A = n.useRef(null), P = n.useRef(null), [T, R] = n.useState(() => ({
152
+ left: 0,
153
+ top: 0,
154
+ width: 0
155
+ })), [K, Y] = n.useState(!1), b = d ?? K, L = p ?? Y, te = n.useRef(!1);
156
+ te.current = b, n.useEffect(() => {
157
+ if (!b || a || j)
158
158
  return;
159
- const n = P.current;
160
- n instanceof HTMLInputElement && (typeof document < "u" && document.activeElement === n || n.focus({
159
+ const r = y.current;
160
+ r instanceof HTMLInputElement && (typeof document < "u" && document.activeElement === r || r.focus({
161
161
  preventScroll: !0
162
162
  }));
163
- }, de = [i, s, f], e[1] = i, e[2] = s, e[3] = f, e[4] = fe, e[5] = de) : (fe = e[4], de = e[5]), c.useEffect(fe, de);
164
- let ke;
165
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ke = (n) => {
166
- se.current = n, N(n);
167
- }, e[6] = ke) : ke = e[6];
168
- const _ = ke;
169
- let me;
170
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (me = () => {
171
- j.current = !0;
172
- }, e[7] = me) : me = e[7];
173
- const Ve = me;
174
- let Te, pe;
175
- e[8] !== s || e[9] !== r || e[10] !== a ? (Te = () => {
176
- if (!s)
177
- return;
178
- const n = r.find((h) => h.value === a);
179
- if (n && ue(n)) {
180
- _(n.value);
163
+ }, [a, b, j]);
164
+ const $ = n.useCallback((r) => {
165
+ W.current = r, ee(r);
166
+ }, []), se = n.useCallback(() => {
167
+ H.current = !0;
168
+ }, []);
169
+ n.useEffect(() => {
170
+ if (!b) return;
171
+ const r = t.find((u) => u.value === e);
172
+ if (r && _(r)) {
173
+ $(r.value);
181
174
  return;
182
175
  }
183
- const d = r.find(tt);
184
- _(d?.value ?? null);
185
- }, pe = [s, r, _, a], e[8] = s, e[9] = r, e[10] = a, e[11] = Te, e[12] = pe) : (Te = e[11], pe = e[12]), c.useEffect(Te, pe);
186
- let G;
187
- e[13] !== x || e[14] !== r ? (G = (n) => {
188
- if (n === null) {
189
- x && x(null);
176
+ const s = t.find((u) => _(u));
177
+ $(s?.value ?? null);
178
+ }, [b, t, $, e]);
179
+ const ie = n.useCallback((r) => {
180
+ if (r === null) {
181
+ l && l(null);
190
182
  return;
191
183
  }
192
- const d = r.find((h) => h.value === n);
193
- ue(d) && x && x(n);
194
- }, e[13] = x, e[14] = r, e[15] = G) : G = e[15];
195
- const ie = G;
196
- let X;
197
- e[16] !== t || e[17] !== x || e[18] !== r ? (X = (n) => {
198
- if (n === null) {
199
- x && x(null), t(null);
184
+ const s = t.find((u) => u.value === r);
185
+ _(s) && l && l(r);
186
+ }, [l, t]), oe = n.useCallback((r) => {
187
+ if (r === null) {
188
+ l && l(null), g(null);
200
189
  return;
201
190
  }
202
- const d = r.find((h) => h.value === n);
203
- ue(d) && (x && x(n), t(n));
204
- }, e[16] = t, e[17] = x, e[18] = r, e[19] = X) : X = e[19];
205
- const q = X;
206
- let J, Q;
207
- e[20] !== s || e[21] !== C ? (J = () => {
208
- if (!s)
209
- return;
210
- const n = (d) => {
211
- const h = d.target;
212
- if (!(h instanceof Node))
191
+ const s = t.find((u) => u.value === r);
192
+ _(s) && (l && l(r), g(r));
193
+ }, [g, l, t]);
194
+ n.useEffect(() => {
195
+ if (!b) return;
196
+ const r = J.current?.ownerDocument ?? document, s = r.defaultView ?? window, u = (k) => {
197
+ const D = k.target;
198
+ if (!(D instanceof Node))
199
+ return;
200
+ const h = J.current;
201
+ !h || h.contains(D) || A.current?.contains(D) || L(!1);
202
+ }, m = (k) => {
203
+ if (k.key !== "Escape" || !te.current)
213
204
  return;
214
- const w = E.current;
215
- !w || w.contains(h) || L.current?.contains(h) || C(!1);
205
+ const D = k.target;
206
+ if (!(D instanceof Node))
207
+ return;
208
+ const h = J.current, B = A.current;
209
+ !h?.contains(D) && !B?.contains(D) || (k.preventDefault(), k.stopPropagation(), L(!1));
216
210
  };
217
- return document.addEventListener("pointerdown", n, !0), () => {
218
- document.removeEventListener("pointerdown", n, !0);
211
+ return r.addEventListener("pointerdown", u, !0), s.addEventListener("keydown", m, !0), () => {
212
+ r.removeEventListener("pointerdown", u, !0), s.removeEventListener("keydown", m, !0);
219
213
  };
220
- }, Q = [s, C], e[20] = s, e[21] = C, e[22] = J, e[23] = Q) : (J = e[22], Q = e[23]), c.useEffect(J, Q);
221
- let Z, ee;
222
- e[24] !== s ? (Z = () => {
223
- if (!s)
214
+ }, [b, L]), n.useEffect(() => {
215
+ if (!b)
224
216
  return;
225
- const n = L.current;
226
- if (!n)
217
+ const r = A.current;
218
+ if (!r)
227
219
  return;
228
- const d = (h) => {
229
- const w = O.current;
230
- if (!w)
220
+ const s = (u) => {
221
+ const m = P.current;
222
+ if (!m)
231
223
  return;
232
- const B = h.deltaY;
233
- if (B === 0)
224
+ const k = u.deltaY;
225
+ if (k === 0)
234
226
  return;
235
- const ce = Math.max(0, w.scrollHeight - w.clientHeight), be = w.scrollTop <= 0, Ne = w.scrollTop >= ce, K = h.target;
236
- if (K instanceof Node && w.contains(K)) {
237
- (B < 0 && be || B > 0 && Ne) && h.preventDefault();
227
+ const D = Math.max(0, m.scrollHeight - m.clientHeight), h = m.scrollTop <= 0, B = m.scrollTop >= D, F = u.target;
228
+ if (F instanceof Node && m.contains(F)) {
229
+ (k < 0 && h || k > 0 && B) && u.preventDefault();
238
230
  return;
239
231
  }
240
- h.preventDefault();
241
- const De = Math.min(ce, Math.max(0, w.scrollTop + B));
242
- w.scrollTop = De;
232
+ u.preventDefault();
233
+ const q = Math.min(D, Math.max(0, m.scrollTop + k));
234
+ m.scrollTop = q;
243
235
  };
244
- return n.addEventListener("wheel", d, {
236
+ return r.addEventListener("wheel", s, {
245
237
  passive: !1
246
238
  }), () => {
247
- n.removeEventListener("wheel", d);
239
+ r.removeEventListener("wheel", s);
248
240
  };
249
- }, ee = [s], e[24] = s, e[25] = Z, e[26] = ee) : (Z = e[25], ee = e[26]), c.useEffect(Z, ee);
250
- let te, ne;
251
- e[27] !== k || e[28] !== s || e[29] !== A || e[30] !== C ? (te = () => {
252
- if (!s || A !== void 0 && !k || typeof window > "u" || !("IntersectionObserver" in window))
241
+ }, [b]), n.useEffect(() => {
242
+ if (!b || d !== void 0 && !p || typeof window > "u" || !("IntersectionObserver" in window))
253
243
  return;
254
- const n = P.current;
255
- if (!(n instanceof HTMLElement))
244
+ const r = y.current;
245
+ if (!(r instanceof HTMLElement))
256
246
  return;
257
- let d = !0;
258
- const h = new IntersectionObserver((w) => {
259
- if (!d)
247
+ let s = !0;
248
+ const u = new IntersectionObserver((m) => {
249
+ if (!s)
260
250
  return;
261
- const B = w[0];
262
- B && !B.isIntersecting && C(!1);
251
+ const k = m[0];
252
+ k && !k.isIntersecting && L(!1);
263
253
  });
264
- return h.observe(n), () => {
265
- d = !1, h.disconnect();
254
+ return u.observe(r), () => {
255
+ s = !1, u.disconnect();
266
256
  };
267
- }, ne = [k, s, A, C], e[27] = k, e[28] = s, e[29] = A, e[30] = C, e[31] = te, e[32] = ne) : (te = e[31], ne = e[32]), c.useEffect(te, ne);
268
- let he;
269
- e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (he = () => {
270
- if (typeof window > "u")
271
- return;
272
- const n = P.current, d = L.current;
273
- if (!(n instanceof HTMLElement) || !d)
274
- return;
275
- const h = n.getBoundingClientRect(), w = d.offsetHeight, B = window.innerWidth ?? 0, ce = window.innerHeight ?? 0, be = h.width;
276
- let Ne = h.left;
277
- Ne + be > B - 8 && (Ne = Math.max(8, B - be - 8)), Ne < 8 && (Ne = 8);
278
- let K = h.bottom + 8;
279
- const xe = K + w > ce - 8, De = h.top - w - 8;
280
- xe && De >= 8 && (K = De), K < 8 && (K = 8), K + w > ce - 8 && (K = Math.max(8, ce - w - 8)), Y({
281
- left: Ne,
282
- top: K,
283
- width: be
257
+ }, [p, b, d, L]);
258
+ const Q = n.useCallback(() => {
259
+ if (typeof window > "u") return;
260
+ const r = y.current, s = A.current;
261
+ if (!(r instanceof HTMLElement) || !s) return;
262
+ const u = r.getBoundingClientRect(), m = s.offsetHeight, k = window.innerWidth ?? 0, D = window.innerHeight ?? 0, h = 8, B = u.width;
263
+ let F = u.left;
264
+ F + B > k - h && (F = Math.max(h, k - B - h)), F < h && (F = h);
265
+ let I = u.bottom + h;
266
+ const q = I + m > D - h, Z = u.top - m - h;
267
+ q && Z >= h && (I = Z), I < h && (I = h), I + m > D - h && (I = Math.max(h, D - m - h)), R({
268
+ left: F,
269
+ top: I,
270
+ width: B
284
271
  });
285
- }, e[33] = he) : he = e[33];
286
- const re = he;
287
- let oe, ge;
288
- e[34] !== i || e[35] !== s ? (oe = () => {
289
- if (!s || i || typeof window > "u")
290
- return;
291
- re();
292
- const n = window.requestAnimationFrame(re);
293
- return window.addEventListener("scroll", re, !0), window.addEventListener("resize", re), () => {
294
- window.cancelAnimationFrame(n), window.removeEventListener("scroll", re, !0), window.removeEventListener("resize", re);
272
+ }, []);
273
+ return n.useLayoutEffect(() => {
274
+ if (!b || a || typeof window > "u") return;
275
+ Q();
276
+ const r = window.requestAnimationFrame(Q);
277
+ return window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q), () => {
278
+ window.cancelAnimationFrame(r), window.removeEventListener("scroll", Q, !0), window.removeEventListener("resize", Q);
295
279
  };
296
- }, ge = [i, s, re], e[34] = i, e[35] = s, e[36] = oe, e[37] = ge) : (oe = e[36], ge = e[37]), c.useLayoutEffect(oe, ge);
297
- let le;
298
- e[38] !== s ? (le = () => {
299
- if (!s)
300
- return;
301
- const n = O.current;
302
- if (!n)
303
- return;
304
- const h = requestAnimationFrame(() => {
305
- const w = n.querySelector('[role="option"][data-state="checked"]');
306
- if (w instanceof HTMLElement) {
307
- const xe = w.offsetTop - 8, De = w.offsetTop + w.offsetHeight + 8;
308
- if (xe < n.scrollTop) {
309
- n.scrollTop = Math.max(0, xe);
280
+ }, [a, b, Q]), n.useEffect(() => {
281
+ if (!b) return;
282
+ const r = P.current;
283
+ if (!r) return;
284
+ const u = requestAnimationFrame(() => {
285
+ const m = r.querySelector('[role="option"][data-state="checked"]');
286
+ if (m instanceof HTMLElement) {
287
+ const q = m.offsetTop - 8, Z = m.offsetTop + m.offsetHeight + 8;
288
+ if (q < r.scrollTop) {
289
+ r.scrollTop = Math.max(0, q);
310
290
  return;
311
291
  }
312
- const Le = n.scrollTop + n.clientHeight;
313
- De > Le && (n.scrollTop = Math.max(0, De - n.clientHeight));
292
+ const re = r.scrollTop + r.clientHeight;
293
+ Z > re && (r.scrollTop = Math.max(0, Z - r.clientHeight));
314
294
  return;
315
295
  }
316
- const B = Array.from(n.querySelectorAll('[role="option"]'));
317
- if (!B.length)
318
- return;
319
- let ce, be;
320
- for (const xe of B) {
321
- if (!xe.hasAttribute("data-disabled")) {
322
- ce = xe;
296
+ const k = Array.from(r.querySelectorAll('[role="option"]'));
297
+ if (!k.length) return;
298
+ let D, h;
299
+ for (const I of k) {
300
+ if (!I.hasAttribute("data-disabled")) {
301
+ D = I;
323
302
  break;
324
303
  }
325
- be = xe;
304
+ h = I;
326
305
  }
327
- if (!ce)
328
- return;
329
- const K = Math.max(0, (be || ce).offsetTop - 8);
330
- n.scrollTop = K;
306
+ if (!D) return;
307
+ const F = Math.max(0, (h || D).offsetTop - 8);
308
+ r.scrollTop = F;
331
309
  });
332
- return () => cancelAnimationFrame(h);
333
- }, e[38] = s, e[39] = le) : le = e[39];
334
- let ve;
335
- e[40] !== s || e[41] !== r ? (ve = [s, r], e[40] = s, e[41] = r, e[42] = ve) : ve = e[42], c.useEffect(le, ve);
336
- let l, m;
337
- e[43] !== I || e[44] !== s ? (l = () => {
338
- if (!s || !I || !j.current)
339
- return;
340
- const n = O.current;
341
- if (!n)
342
- return;
343
- const d = n.querySelector(`[role="option"][data-value="${I}"]`);
344
- if (!(d instanceof HTMLElement))
345
- return;
346
- const h = d.offsetTop - 8, w = d.offsetTop + d.offsetHeight + 8;
347
- if (h < n.scrollTop) {
348
- n.scrollTop = Math.max(0, h);
310
+ return () => cancelAnimationFrame(u);
311
+ }, [b, t]), n.useEffect(() => {
312
+ if (!b || !X || !H.current) return;
313
+ const r = P.current;
314
+ if (!r) return;
315
+ const s = r.querySelector(`[role="option"][data-value="${X}"]`);
316
+ if (!(s instanceof HTMLElement)) return;
317
+ const u = 8, m = s.offsetTop - u, k = s.offsetTop + s.offsetHeight + u;
318
+ if (m < r.scrollTop) {
319
+ r.scrollTop = Math.max(0, m);
349
320
  return;
350
321
  }
351
- const B = n.scrollTop + n.clientHeight;
352
- w > B && (n.scrollTop = Math.max(0, w - n.clientHeight));
353
- }, m = [I, s], e[43] = I, e[44] = s, e[45] = l, e[46] = m) : (l = e[45], m = e[46]), c.useEffect(l, m);
354
- let y;
355
- e[47] !== p ? (y = Ee("w-[150px]", p), e[47] = p, e[48] = y) : y = e[48];
356
- let D;
357
- e[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = (n) => {
358
- P.current = n;
359
- }, e[49] = D) : D = e[49];
360
- let R;
361
- e[50] !== q || e[51] !== i || e[52] !== M || e[53] !== v || e[54] !== s || e[55] !== r || e[56] !== S || e[57] !== f || e[58] !== C || e[59] !== T || e[60] !== V || e[61] !== ie || e[62] !== a ? (R = /* @__PURE__ */ g.jsx(st, { id: T, placeholder: S, value: a, onValueUpdate: ie, onCommit: q, options: r, disabled: i, readOnly: f, open: s, setOpen: C, inputClassName: M, triggerTestId: V, isHydrated: v, highlightedValueRef: se, setHighlightedValue: _, markKeyboardNavigation: Ve, inputRef: D, onDraftValueHandlerChange: ae }), e[50] = q, e[51] = i, e[52] = M, e[53] = v, e[54] = s, e[55] = r, e[56] = S, e[57] = f, e[58] = C, e[59] = T, e[60] = V, e[61] = ie, e[62] = a, e[63] = R) : R = e[63];
362
- let W;
363
- e[64] !== q || e[65] !== H || e[66] !== z || e[67] !== I || e[68] !== s || e[69] !== r || e[70] !== C || e[71] !== a ? (W = s ? (() => {
364
- const n = /* @__PURE__ */ g.jsx($e, { children: /* @__PURE__ */ g.jsxs("div", { ref: L, "data-testid": H, "data-state": "open", className: Ee("pointer-events-auto fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"), style: {
365
- left: z.left,
366
- top: z.top,
367
- width: z.width
368
- }, children: [
369
- /* @__PURE__ */ g.jsx(Pe, { direction: "up", viewportRef: O }),
370
- /* @__PURE__ */ g.jsx("div", { ref: O, role: "listbox", className: "max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", children: r.map((d) => {
371
- const h = d.value === a;
372
- return /* @__PURE__ */ g.jsxs("div", { role: "option", "aria-selected": h, "data-value": d.value, "data-state": h ? "checked" : "unchecked", "data-disabled": d.disabled ? "" : void 0, className: Ee("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer", d.disabled && "pointer-events-none opacity-50", I === d.value && "bg-accent text-accent-foreground"), onMouseDown: et, onClick: () => {
373
- d.disabled || (F.current?.(d.value), _(d.value), P.current?.focus({
374
- preventScroll: !0
375
- }), q(d.value), C(!1));
376
- }, onPointerEnter: () => {
377
- j.current || (j.current = !1, _(d.value));
378
- }, onPointerMove: (w) => {
379
- j.current && w.movementX === 0 && w.movementY === 0 || (j.current = !1, _(d.value));
380
- }, children: [
381
- /* @__PURE__ */ g.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: h ? /* @__PURE__ */ g.jsx(Be, { "aria-hidden": !0, className: "h-4 w-4" }) : null }),
382
- /* @__PURE__ */ g.jsxs("div", { className: "flex flex-col", children: [
383
- /* @__PURE__ */ g.jsx("span", { children: d.label }),
384
- d.description != null ? /* @__PURE__ */ g.jsx("span", { "data-slot": "description", className: "text-xs text-muted-foreground", children: d.description }) : null
385
- ] })
386
- ] }, d.value);
387
- }) }),
388
- /* @__PURE__ */ g.jsx(Pe, { direction: "down", viewportRef: O })
389
- ] }) });
390
- return typeof document > "u" ? n : qe(n, document.body);
391
- })() : null, e[64] = q, e[65] = H, e[66] = z, e[67] = I, e[68] = s, e[69] = r, e[70] = C, e[71] = a, e[72] = W) : W = e[72];
392
- let Se;
393
- e[73] !== R || e[74] !== W ? (Se = /* @__PURE__ */ g.jsxs("div", { className: "relative", children: [
394
- R,
395
- W
396
- ] }), e[73] = R, e[74] = W, e[75] = Se) : Se = e[75];
397
- let He;
398
- return e[76] !== y || e[77] !== Se ? (He = /* @__PURE__ */ g.jsx("div", { "data-slot": "hours-picker-input", className: y, ref: E, children: Se }), e[76] = y, e[77] = Se, e[78] = He) : He = e[78], He;
399
- }
400
- function et(o) {
401
- o.preventDefault();
402
- }
403
- function tt(o) {
404
- return ue(o);
405
- }
406
- function nt() {
407
- return {
408
- left: 0,
409
- top: 0,
410
- width: 0
411
- };
322
+ const D = r.scrollTop + r.clientHeight;
323
+ k > D && (r.scrollTop = Math.max(0, k - r.clientHeight));
324
+ }, [X, b]), /* @__PURE__ */ v.jsx("div", { "data-slot": "hours-picker-input", className: ne("w-[150px]", f), ref: J, children: /* @__PURE__ */ v.jsxs("div", { className: "relative", children: [
325
+ /* @__PURE__ */ v.jsx(qe, { id: w, placeholder: M, value: e, onValueUpdate: ie, onCommit: oe, options: t, disabled: a, readOnly: j, open: b, setOpen: L, inputClassName: c, triggerTestId: G, isHydrated: C, highlightedValueRef: W, setHighlightedValue: $, markKeyboardNavigation: se, inputRef: (r) => {
326
+ y.current = r;
327
+ }, onDraftValueHandlerChange: N }),
328
+ b ? (() => {
329
+ const r = /* @__PURE__ */ v.jsx(He, { children: /* @__PURE__ */ v.jsxs("div", { ref: A, "data-testid": E, "data-state": "open", className: ne("pointer-events-auto fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"), style: {
330
+ left: T.left,
331
+ top: T.top,
332
+ width: T.width
333
+ }, children: [
334
+ /* @__PURE__ */ v.jsx(Te, { direction: "up", viewportRef: P }),
335
+ /* @__PURE__ */ v.jsx("div", { ref: P, role: "listbox", className: "max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", children: t.map((s) => {
336
+ const u = s.value === e;
337
+ return /* @__PURE__ */ v.jsxs("div", { role: "option", "aria-selected": u, "data-value": s.value, "data-state": u ? "checked" : "unchecked", "data-disabled": s.disabled ? "" : void 0, className: ne("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer", s.disabled && "pointer-events-none opacity-50", X === s.value && "bg-accent text-accent-foreground"), onMouseDown: (m) => {
338
+ m.preventDefault();
339
+ }, onClick: () => {
340
+ s.disabled || (z.current?.(s.value), $(s.value), y.current?.focus({
341
+ preventScroll: !0
342
+ }), oe(s.value), L(!1));
343
+ }, onPointerEnter: () => {
344
+ H.current || (H.current = !1, $(s.value));
345
+ }, onPointerMove: (m) => {
346
+ H.current && m.movementX === 0 && m.movementY === 0 || (H.current = !1, $(s.value));
347
+ }, children: [
348
+ /* @__PURE__ */ v.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: u ? /* @__PURE__ */ v.jsx(Ee, { "aria-hidden": !0, className: "h-4 w-4" }) : null }),
349
+ /* @__PURE__ */ v.jsxs("div", { className: "flex flex-col", children: [
350
+ /* @__PURE__ */ v.jsx("span", { children: s.label }),
351
+ s.description != null ? /* @__PURE__ */ v.jsx("span", { "data-slot": "description", className: "text-xs text-muted-foreground", children: s.description }) : null
352
+ ] })
353
+ ] }, s.value);
354
+ }) }),
355
+ /* @__PURE__ */ v.jsx(Te, { direction: "down", viewportRef: P })
356
+ ] }) });
357
+ return typeof document > "u" ? r : Ie(r, document.body);
358
+ })() : null
359
+ ] }) });
412
360
  }
413
- Fe.displayName = "HourPickerInput";
414
- function rt(o) {
415
- const e = Ie.c(36), {
416
- id: b,
417
- value: a,
361
+ Se.displayName = "HourPickerInput";
362
+ function ze(o) {
363
+ const e = we.c(36), {
364
+ id: g,
365
+ value: l,
418
366
  onChange: t,
419
- onValueUpdate: x,
420
- options: r,
421
- placeholder: u,
422
- className: p,
423
- inputClassName: M,
424
- disabled: i,
425
- open: f,
426
- onOpenChange: A,
427
- triggerTestId: k,
428
- contentTestId: V,
429
- isHydrated: H
430
- } = o, v = u === void 0 ? "Select time" : u;
431
- let S;
432
- e[0] !== t || e[1] !== x || e[2] !== r ? (S = (Y) => {
433
- const we = r.find((ye) => ye.value === Y);
434
- ue(we) && (x && x(Y), t(Y));
435
- }, e[0] = t, e[1] = x, e[2] = r, e[3] = S) : S = e[3];
436
- const $ = S;
437
- let T;
438
- e[4] !== p ? (T = Ee("w-[150px]", p), e[4] = p, e[5] = T) : T = e[5];
439
- const P = a ?? "";
440
- let F;
441
- e[6] !== $ ? (F = (Y) => $(Y), e[6] = $, e[7] = F) : F = e[7];
442
- const U = H ? "true" : void 0, ae = !a && "text-muted-foreground", se = f && "ring-2 ring-primary ring-offset-2";
443
- let j;
444
- e[8] !== M || e[9] !== ae || e[10] !== se ? (j = Ee("transition-colors hover:bg-accent hover:text-accent-foreground", ae, se, "[&_[data-slot='description']]:hidden", M), e[8] = M, e[9] = ae, e[10] = se, e[11] = j) : j = e[11];
445
- let I;
446
- e[12] !== v ? (I = /* @__PURE__ */ g.jsx(_e, { placeholder: v }), e[12] = v, e[13] = I) : I = e[13];
367
+ onValueUpdate: M,
368
+ options: f,
369
+ placeholder: c,
370
+ className: a,
371
+ inputClassName: j,
372
+ disabled: d,
373
+ open: p,
374
+ onOpenChange: G,
375
+ triggerTestId: E,
376
+ contentTestId: C,
377
+ isHydrated: V
378
+ } = o, w = c === void 0 ? "Select time" : c;
379
+ let y;
380
+ e[0] !== t || e[1] !== M || e[2] !== f ? (y = (L) => {
381
+ const te = f.find(($) => $.value === L);
382
+ _(te) && (M && M(L), t(L));
383
+ }, e[0] = t, e[1] = M, e[2] = f, e[3] = y) : y = e[3];
384
+ const z = y;
447
385
  let N;
448
- e[14] !== b || e[15] !== I || e[16] !== U || e[17] !== j || e[18] !== k ? (N = /* @__PURE__ */ g.jsx(Ge, { id: b, "data-testid": k, "data-hydrated": U, className: j, children: I }), e[14] = b, e[15] = I, e[16] = U, e[17] = j, e[18] = k, e[19] = N) : N = e[19];
449
- let E;
450
- e[20] !== r ? (E = r.map(ot), e[20] = r, e[21] = E) : E = e[21];
451
- let L;
452
- e[22] !== V || e[23] !== E ? (L = /* @__PURE__ */ g.jsx(Xe, { "data-testid": V, autoScroll: "firstEnabledWithContext", className: "max-h-64 overflow-y-auto", children: E }), e[22] = V, e[23] = E, e[24] = L) : L = e[24];
453
- let O;
454
- e[25] !== i || e[26] !== A || e[27] !== f || e[28] !== N || e[29] !== L || e[30] !== P || e[31] !== F ? (O = /* @__PURE__ */ g.jsxs(Je, { disabled: i, open: f, onOpenChange: A, value: P, onValueChange: F, children: [
455
- N,
456
- L
457
- ] }), e[25] = i, e[26] = A, e[27] = f, e[28] = N, e[29] = L, e[30] = P, e[31] = F, e[32] = O) : O = e[32];
458
- let z;
459
- return e[33] !== O || e[34] !== T ? (z = /* @__PURE__ */ g.jsx("div", { "data-slot": "hours-picker-field", className: T, children: O }), e[33] = O, e[34] = T, e[35] = z) : z = e[35], z;
386
+ e[4] !== a ? (N = ne("w-[150px]", a), e[4] = a, e[5] = N) : N = e[5];
387
+ const W = l ?? "";
388
+ let H;
389
+ e[6] !== z ? (H = (L) => z(L), e[6] = z, e[7] = H) : H = e[7];
390
+ const X = V ? "true" : void 0, ee = !l && "text-muted-foreground", J = p && "ring-2 ring-primary ring-offset-2";
391
+ let A;
392
+ e[8] !== j || e[9] !== ee || e[10] !== J ? (A = ne("transition-colors hover:bg-accent hover:text-accent-foreground", ee, J, "[&_[data-slot='description']]:hidden", j), e[8] = j, e[9] = ee, e[10] = J, e[11] = A) : A = e[11];
393
+ let P;
394
+ e[12] !== w ? (P = /* @__PURE__ */ v.jsx(Pe, { placeholder: w }), e[12] = w, e[13] = P) : P = e[13];
395
+ let T;
396
+ e[14] !== g || e[15] !== P || e[16] !== X || e[17] !== A || e[18] !== E ? (T = /* @__PURE__ */ v.jsx(Oe, { id: g, "data-testid": E, "data-hydrated": X, className: A, children: P }), e[14] = g, e[15] = P, e[16] = X, e[17] = A, e[18] = E, e[19] = T) : T = e[19];
397
+ let R;
398
+ e[20] !== f ? (R = f.map(We), e[20] = f, e[21] = R) : R = e[21];
399
+ let K;
400
+ e[22] !== C || e[23] !== R ? (K = /* @__PURE__ */ v.jsx(Ae, { "data-testid": C, autoScroll: "firstEnabledWithContext", className: "max-h-64 overflow-y-auto", children: R }), e[22] = C, e[23] = R, e[24] = K) : K = e[24];
401
+ let Y;
402
+ e[25] !== d || e[26] !== G || e[27] !== p || e[28] !== T || e[29] !== K || e[30] !== W || e[31] !== H ? (Y = /* @__PURE__ */ v.jsxs(Le, { disabled: d, open: p, onOpenChange: G, value: W, onValueChange: H, children: [
403
+ T,
404
+ K
405
+ ] }), e[25] = d, e[26] = G, e[27] = p, e[28] = T, e[29] = K, e[30] = W, e[31] = H, e[32] = Y) : Y = e[32];
406
+ let b;
407
+ return e[33] !== Y || e[34] !== N ? (b = /* @__PURE__ */ v.jsx("div", { "data-slot": "hours-picker-field", className: N, children: Y }), e[33] = Y, e[34] = N, e[35] = b) : b = e[35], b;
460
408
  }
461
- function ot(o) {
462
- return /* @__PURE__ */ g.jsxs(Ye, { value: o.value, disabled: o.disabled, children: [
463
- /* @__PURE__ */ g.jsx("span", { children: o.label }),
464
- o.description != null ? /* @__PURE__ */ g.jsx("span", { "data-slot": "description", className: "block text-xs text-muted-foreground", children: o.description }) : null
409
+ function We(o) {
410
+ return /* @__PURE__ */ v.jsxs(Ve, { value: o.value, disabled: o.disabled, children: [
411
+ /* @__PURE__ */ v.jsx("span", { children: o.label }),
412
+ o.description != null ? /* @__PURE__ */ v.jsx("span", { "data-slot": "description", className: "block text-xs text-muted-foreground", children: o.description }) : null
465
413
  ] }, o.value);
466
414
  }
467
- function lt(o) {
468
- const e = Ie.c(4);
469
- if (Qe()) {
415
+ function $e(o) {
416
+ const e = we.c(4);
417
+ if (Fe()) {
470
418
  let t;
471
- return e[0] !== o ? (t = /* @__PURE__ */ g.jsx(rt, { ...o }), e[0] = o, e[1] = t) : t = e[1], t;
419
+ return e[0] !== o ? (t = /* @__PURE__ */ v.jsx(ze, { ...o }), e[0] = o, e[1] = t) : t = e[1], t;
472
420
  }
473
- let a;
474
- return e[2] !== o ? (a = /* @__PURE__ */ g.jsx(Fe, { ...o }), e[2] = o, e[3] = a) : a = e[3], a;
421
+ let l;
422
+ return e[2] !== o ? (l = /* @__PURE__ */ v.jsx(Se, { ...o }), e[2] = o, e[3] = l) : l = e[3], l;
475
423
  }
476
- lt.displayName = "HourPickerField";
477
- function st(o) {
478
- const e = Ie.c(93), {
479
- id: b,
480
- placeholder: a,
424
+ $e.displayName = "HourPickerField";
425
+ function qe(o) {
426
+ const e = we.c(93), {
427
+ id: g,
428
+ placeholder: l,
481
429
  value: t,
482
- onValueUpdate: x,
483
- onCommit: r,
484
- options: u,
485
- disabled: p,
486
- readOnly: M,
487
- open: i,
488
- setOpen: f,
489
- inputClassName: A,
490
- triggerTestId: k,
491
- isHydrated: V,
492
- highlightedValueRef: H,
493
- setHighlightedValue: v,
494
- markKeyboardNavigation: S,
495
- inputRef: $,
496
- onDraftValueHandlerChange: T
497
- } = o, P = c.useRef(!1), F = c.useRef(!1), U = c.useRef(!1), ae = c.useRef(null), se = c.useRef(null), j = c.useRef(!1);
498
- let I;
499
- e[0] !== t ? (I = () => t || "", e[0] = t, e[1] = I) : I = e[1];
500
- const [N, E] = c.useState(I);
501
- let L, O;
502
- e[2] !== T ? (L = () => (T((l) => {
503
- E(l);
430
+ onValueUpdate: M,
431
+ onCommit: f,
432
+ options: c,
433
+ disabled: a,
434
+ readOnly: j,
435
+ open: d,
436
+ setOpen: p,
437
+ inputClassName: G,
438
+ triggerTestId: E,
439
+ isHydrated: C,
440
+ highlightedValueRef: V,
441
+ setHighlightedValue: w,
442
+ markKeyboardNavigation: y,
443
+ inputRef: z,
444
+ onDraftValueHandlerChange: N
445
+ } = o, W = n.useRef(!1), H = n.useRef(!1), X = n.useRef(!1), ee = n.useRef(null), J = n.useRef(null), A = n.useRef(!1);
446
+ let P;
447
+ e[0] !== t ? (P = () => t || "", e[0] = t, e[1] = P) : P = e[1];
448
+ const [T, R] = n.useState(P);
449
+ let K, Y;
450
+ e[2] !== N ? (K = () => (N((i) => {
451
+ R(i);
504
452
  }), () => {
505
- T(null);
506
- }), O = [T], e[2] = T, e[3] = L, e[4] = O) : (L = e[3], O = e[4]), c.useEffect(L, O);
507
- let z;
508
- e[5] !== H || e[6] !== x || e[7] !== u || e[8] !== v || e[9] !== t ? (z = (l) => {
509
- const m = H.current ?? t ?? "";
510
- let y = u.findIndex((D) => D.value === m);
511
- y === -1 && (y = l === 1 ? -1 : u.length);
512
- for (let D = y + l; D >= 0 && D < u.length; D = D + l, D) {
513
- const R = u[D];
514
- if (ue(R)) {
515
- v(R.value), ae.current = R.value, E(R.value), x(R.value);
453
+ N(null);
454
+ }), Y = [N], e[2] = N, e[3] = K, e[4] = Y) : (K = e[3], Y = e[4]), n.useEffect(K, Y);
455
+ let b;
456
+ e[5] !== V || e[6] !== M || e[7] !== c || e[8] !== w || e[9] !== t ? (b = (i) => {
457
+ const x = V.current ?? t ?? "";
458
+ let S = c.findIndex((O) => O.value === x);
459
+ S === -1 && (S = i === 1 ? -1 : c.length);
460
+ for (let O = S + i; O >= 0 && O < c.length; O = O + i, O) {
461
+ const U = c[O];
462
+ if (_(U)) {
463
+ w(U.value), ee.current = U.value, R(U.value), M(U.value);
516
464
  return;
517
465
  }
518
466
  }
519
- }, e[5] = H, e[6] = x, e[7] = u, e[8] = v, e[9] = t, e[10] = z) : z = e[10];
520
- const Y = z;
521
- let we, ye;
522
- e[11] !== t ? (we = () => {
523
- P.current || E(t || "");
524
- }, ye = [t], e[11] = t, e[12] = we, e[13] = ye) : (we = e[12], ye = e[13]), c.useEffect(we, ye);
525
- let s, C;
526
- e[14] !== N ? (s = () => {
527
- se.current = N;
528
- }, C = [N], e[14] = N, e[15] = s, e[16] = C) : (s = e[15], C = e[16]), c.useEffect(s, C);
529
- let fe, de;
530
- e[17] !== t ? (de = () => {
531
- t === null && (j.current = !1);
532
- }, fe = [t], e[17] = t, e[18] = fe, e[19] = de) : (fe = e[18], de = e[19]), c.useEffect(de, fe);
533
- const ke = !N && "text-muted-foreground", _ = i && "ring-2 ring-primary ring-offset-2";
534
- let me;
535
- e[20] !== A || e[21] !== ke || e[22] !== _ ? (me = Ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground", ke, _, "[&_[data-slot='description']]:hidden", A), e[20] = A, e[21] = ke, e[22] = _, e[23] = me) : me = e[23];
536
- const Ve = me, Te = V ? "true" : void 0;
537
- let pe;
538
- e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (pe = [{
467
+ }, e[5] = V, e[6] = M, e[7] = c, e[8] = w, e[9] = t, e[10] = b) : b = e[10];
468
+ const L = b;
469
+ let te, $;
470
+ e[11] !== t ? (te = () => {
471
+ W.current || R(t || "");
472
+ }, $ = [t], e[11] = t, e[12] = te, e[13] = $) : (te = e[12], $ = e[13]), n.useEffect(te, $);
473
+ let se, ie;
474
+ e[14] !== T ? (se = () => {
475
+ J.current = T.replace(/\D/g, "");
476
+ }, ie = [T], e[14] = T, e[15] = se, e[16] = ie) : (se = e[15], ie = e[16]), n.useEffect(se, ie);
477
+ let oe, Q;
478
+ e[17] !== t ? (Q = () => {
479
+ t === null && (A.current = !1);
480
+ }, oe = [t], e[17] = t, e[18] = oe, e[19] = Q) : (oe = e[18], Q = e[19]), n.useEffect(Q, oe);
481
+ const r = !T && "text-muted-foreground", s = d && "ring-2 ring-primary ring-offset-2";
482
+ let u;
483
+ e[20] !== G || e[21] !== r || e[22] !== s ? (u = ne("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground", r, s, "[&_[data-slot='description']]:hidden", G), e[20] = G, e[21] = r, e[22] = s, e[23] = u) : u = e[23];
484
+ const m = u, k = C ? "true" : void 0;
485
+ let D;
486
+ e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = [{
539
487
  mask: "00:00",
540
488
  lazy: !0
541
489
  }, {
542
490
  mask: "0:00",
543
491
  lazy: !0
544
- }], e[24] = pe) : pe = e[24];
545
- let G;
546
- e[25] !== u ? (G = (l, m) => {
547
- const y = (m.value + l).replace(/\D/g, "");
548
- if (y.length <= 2 || y.length >= 4)
549
- return m.compiledMasks[0];
550
- const D = Re(Number(y.slice(0, 2)));
551
- return u.some((W) => W.value.startsWith(`${D}:`)) ? m.compiledMasks[0] : m.compiledMasks[1];
552
- }, e[25] = u, e[26] = G) : G = e[26];
553
- let ie;
554
- e[27] !== r || e[28] !== t ? (ie = (l) => {
555
- const m = typeof l == "string" ? l : String(l ?? "");
556
- if (se.current !== m) {
557
- if (se.current = m, E(m), m.replace(/\D/g, "").length !== 0) {
558
- j.current = !1;
492
+ }], e[24] = D) : D = e[24];
493
+ let h;
494
+ e[25] !== c ? (h = (i, x) => {
495
+ const S = (x.value + i).replace(/\D/g, "");
496
+ if (S.length <= 2 || S.length >= 4)
497
+ return x.compiledMasks[0];
498
+ const O = be(Number(S.slice(0, 2)));
499
+ return c.some((de) => de.value.startsWith(`${O}:`)) ? x.compiledMasks[0] : x.compiledMasks[1];
500
+ }, e[25] = c, e[26] = h) : h = e[26];
501
+ let B;
502
+ e[27] !== f || e[28] !== t ? (B = (i) => {
503
+ const x = typeof i == "string" ? i : String(i ?? ""), S = x.replace(/\D/g, "");
504
+ if (J.current !== S) {
505
+ if (J.current = S, R(x), S.length !== 0) {
506
+ A.current = !1;
559
507
  return;
560
508
  }
561
- t && !j.current && (j.current = !0, r(null));
509
+ t && !A.current && (A.current = !0, f(null));
562
510
  }
563
- }, e[27] = r, e[28] = t, e[29] = ie) : ie = e[29];
564
- let X;
565
- e[30] !== r || e[31] !== u || e[32] !== v || e[33] !== t ? (X = (l) => {
566
- const m = typeof l == "string" ? l : String(l ?? "");
567
- if (ae.current === m) {
568
- ae.current = null;
511
+ }, e[27] = f, e[28] = t, e[29] = B) : B = e[29];
512
+ let F;
513
+ e[30] !== f || e[31] !== c || e[32] !== w || e[33] !== t ? (F = (i) => {
514
+ const x = typeof i == "string" ? i : String(i ?? "");
515
+ if (ee.current === x) {
516
+ ee.current = null;
569
517
  return;
570
518
  }
571
- const y = Ce(m, u);
572
- if (!y)
519
+ const S = ve(x, c);
520
+ if (!S)
573
521
  return;
574
- if (y.selectableValue) {
575
- if (v(y.selectableValue), E(y.selectableValue), t === y.selectableValue)
522
+ if (S.selectableValue) {
523
+ if (w(S.selectableValue), R(S.selectableValue), t === S.selectableValue)
576
524
  return;
577
- r(y.selectableValue);
525
+ f(S.selectableValue);
578
526
  return;
579
527
  }
580
- const D = Me(y.parsed);
581
- if (D == null)
528
+ const O = xe(S.parsed);
529
+ if (O == null)
582
530
  return;
583
- const R = Oe(D, u);
584
- R && v(R.value);
585
- }, e[30] = r, e[31] = u, e[32] = v, e[33] = t, e[34] = X) : X = e[34];
586
- let q, J, Q;
587
- e[35] !== p || e[36] !== i || e[37] !== f ? (q = () => {
588
- F.current = !0, !p && (i || f(!0));
589
- }, J = (l) => {
590
- F.current = !0, U.current = typeof document < "u" && document.activeElement === l.currentTarget, !p && (i || f(!0));
591
- }, Q = () => {
592
- p || i || f(!0);
593
- }, e[35] = p, e[36] = i, e[37] = f, e[38] = q, e[39] = J, e[40] = Q) : (q = e[38], J = e[39], Q = e[40]);
594
- let Z;
595
- e[41] !== p || e[42] !== N || e[43] !== H || e[44] !== S || e[45] !== Y || e[46] !== r || e[47] !== i || e[48] !== u || e[49] !== v || e[50] !== f ? (Z = (l) => {
596
- if (!p) {
597
- if (l.key === "Tab" && i && !l.defaultPrevented) {
598
- f(!1);
531
+ const U = ye(O, c);
532
+ U && w(U.value);
533
+ }, e[30] = f, e[31] = c, e[32] = w, e[33] = t, e[34] = F) : F = e[34];
534
+ let I, q, Z;
535
+ e[35] !== a || e[36] !== d || e[37] !== p ? (I = () => {
536
+ H.current = !0, !a && (d || p(!0));
537
+ }, q = (i) => {
538
+ H.current = !0, X.current = typeof document < "u" && document.activeElement === i.currentTarget, !a && (d || p(!0));
539
+ }, Z = () => {
540
+ a || d || p(!0);
541
+ }, e[35] = a, e[36] = d, e[37] = p, e[38] = I, e[39] = q, e[40] = Z) : (I = e[38], q = e[39], Z = e[40]);
542
+ let re;
543
+ e[41] !== a || e[42] !== T || e[43] !== V || e[44] !== y || e[45] !== L || e[46] !== f || e[47] !== d || e[48] !== c || e[49] !== w || e[50] !== p ? (re = (i) => {
544
+ if (!a) {
545
+ if (i.key === "Tab" && d && !i.defaultPrevented) {
546
+ p(!1);
599
547
  return;
600
548
  }
601
- if (l.key === "Escape") {
602
- if (!i)
549
+ if (i.key === "Escape") {
550
+ if (!d)
603
551
  return;
604
- l.preventDefault(), f(!1);
552
+ i.preventDefault(), p(!1);
605
553
  return;
606
554
  }
607
- if (!i && !l.defaultPrevented && (l.key.length === 1 || l.key === "Backspace" || l.key === "Delete") && !l.ctrlKey && !l.metaKey && !l.altKey && f(!0), l.key === "ArrowDown" || l.key === "ArrowUp") {
608
- if (S(), l.preventDefault(), !i) {
609
- f(!0);
555
+ if (!d && !i.defaultPrevented && (i.key.length === 1 || i.key === "Backspace" || i.key === "Delete") && !i.ctrlKey && !i.metaKey && !i.altKey && p(!0), i.key === "ArrowDown" || i.key === "ArrowUp") {
556
+ if (y(), i.preventDefault(), !d) {
557
+ p(!0);
610
558
  return;
611
559
  }
612
- Y(l.key === "ArrowDown" ? 1 : -1);
560
+ L(i.key === "ArrowDown" ? 1 : -1);
613
561
  return;
614
562
  }
615
- if (l.key === "Enter") {
616
- S();
617
- const m = Ce(N, u);
618
- if (!m) {
619
- if (!i || N.trim() !== "")
563
+ if (i.key === "Enter") {
564
+ y();
565
+ const x = ve(T, c);
566
+ if (!x) {
567
+ if (!d || T.trim() !== "")
620
568
  return;
621
- const R = u.find((Se) => Se.value === H.current), W = (ue(R) ? R?.value : void 0) ?? u.find(ut)?.value;
622
- if (!W)
569
+ const U = c.find((Ne) => Ne.value === V.current), de = (_(U) ? U?.value : void 0) ?? c.find(Ge)?.value;
570
+ if (!de)
623
571
  return;
624
- l.preventDefault(), v(W), E(W), r(W), f(!1);
572
+ i.preventDefault(), w(de), R(de), f(de), p(!1);
625
573
  return;
626
574
  }
627
- if (m.selectableValue) {
628
- l.preventDefault(), v(m.selectableValue), E(m.selectableValue), r(m.selectableValue), f(!1);
575
+ if (x.selectableValue) {
576
+ i.preventDefault(), w(x.selectableValue), R(x.selectableValue), f(x.selectableValue), p(!1);
629
577
  return;
630
578
  }
631
- const y = Me(m.parsed);
632
- if (y == null)
579
+ const S = xe(x.parsed);
580
+ if (S == null)
633
581
  return;
634
- const D = Oe(y, u);
635
- if (!D)
582
+ const O = ye(S, c);
583
+ if (!O)
636
584
  return;
637
- l.preventDefault(), v(D.value), E(D.value), r(D.value), f(!1);
585
+ i.preventDefault(), w(O.value), R(O.value), f(O.value), p(!1);
638
586
  return;
639
587
  }
640
588
  }
641
- }, e[41] = p, e[42] = N, e[43] = H, e[44] = S, e[45] = Y, e[46] = r, e[47] = i, e[48] = u, e[49] = v, e[50] = f, e[51] = Z) : Z = e[51];
642
- let ee;
643
- e[52] !== p || e[53] !== i || e[54] !== f ? (ee = (l) => {
644
- const m = !F.current || !U.current;
645
- if (F.current = !1, U.current = !1, P.current = !0, m) {
646
- const y = l.currentTarget;
647
- requestAnimationFrame(() => y.select());
589
+ }, e[41] = a, e[42] = T, e[43] = V, e[44] = y, e[45] = L, e[46] = f, e[47] = d, e[48] = c, e[49] = w, e[50] = p, e[51] = re) : re = e[51];
590
+ let le;
591
+ e[52] !== a || e[53] !== d || e[54] !== p ? (le = (i) => {
592
+ const x = !H.current || !X.current;
593
+ if (H.current = !1, X.current = !1, W.current = !0, x) {
594
+ const S = i.currentTarget;
595
+ requestAnimationFrame(() => S.select());
648
596
  }
649
- p || i || f(!0);
650
- }, e[52] = p, e[53] = i, e[54] = f, e[55] = ee) : ee = e[55];
651
- let te;
652
- e[56] !== N || e[57] !== r || e[58] !== u || e[59] !== t ? (te = () => {
653
- P.current = !1;
654
- const l = N.trim();
655
- if (!l) {
656
- E(t || "");
597
+ a || d || p(!0);
598
+ }, e[52] = a, e[53] = d, e[54] = p, e[55] = le) : le = e[55];
599
+ let ce;
600
+ e[56] !== T || e[57] !== f || e[58] !== c || e[59] !== t ? (ce = () => {
601
+ W.current = !1;
602
+ const i = T.trim();
603
+ if (!i) {
604
+ R(t || "");
657
605
  return;
658
606
  }
659
- const m = Ce(l, u);
660
- if (!m) {
661
- E(t || "");
607
+ const x = ve(i, c);
608
+ if (!x) {
609
+ R(t || "");
662
610
  return;
663
611
  }
664
- if (!m.selectableValue) {
665
- E(t || "");
612
+ if (!x.selectableValue) {
613
+ R(t || "");
666
614
  return;
667
615
  }
668
- E(m.selectableValue), t !== m.selectableValue && r(m.selectableValue);
669
- }, e[56] = N, e[57] = r, e[58] = u, e[59] = t, e[60] = te) : te = e[60];
670
- let ne;
671
- e[61] !== p || e[62] !== N || e[63] !== b || e[64] !== $ || e[65] !== a || e[66] !== M || e[67] !== Te || e[68] !== G || e[69] !== ie || e[70] !== X || e[71] !== q || e[72] !== J || e[73] !== Q || e[74] !== Z || e[75] !== ee || e[76] !== te || e[77] !== Ve || e[78] !== k ? (ne = /* @__PURE__ */ g.jsx(We, { id: b, "data-testid": k, "data-hydrated": Te, type: "text", disabled: p, readOnly: M, inputRef: $, autoComplete: "off", mask: pe, dispatch: G, placeholder: a, value: N, className: Ve, onAccept: ie, onComplete: X, onPointerDown: q, onMouseDown: J, onClick: Q, onKeyDown: Z, onFocus: ee, onBlur: te }), e[61] = p, e[62] = N, e[63] = b, e[64] = $, e[65] = a, e[66] = M, e[67] = Te, e[68] = G, e[69] = ie, e[70] = X, e[71] = q, e[72] = J, e[73] = Q, e[74] = Z, e[75] = ee, e[76] = te, e[77] = Ve, e[78] = k, e[79] = ne) : ne = e[79];
616
+ R(x.selectableValue), t !== x.selectableValue && f(x.selectableValue);
617
+ }, e[56] = T, e[57] = f, e[58] = c, e[59] = t, e[60] = ce) : ce = e[60];
618
+ let ue;
619
+ e[61] !== a || e[62] !== T || e[63] !== g || e[64] !== z || e[65] !== l || e[66] !== j || e[67] !== k || e[68] !== h || e[69] !== B || e[70] !== F || e[71] !== I || e[72] !== q || e[73] !== Z || e[74] !== re || e[75] !== le || e[76] !== ce || e[77] !== m || e[78] !== E ? (ue = /* @__PURE__ */ v.jsx(Ce, { id: g, "data-testid": E, "data-hydrated": k, type: "text", disabled: a, readOnly: j, inputRef: z, autoComplete: "off", mask: D, dispatch: h, placeholder: l, value: T, className: m, onAccept: B, onComplete: F, onPointerDown: I, onMouseDown: q, onClick: Z, onKeyDown: re, onFocus: le, onBlur: ce }), e[61] = a, e[62] = T, e[63] = g, e[64] = z, e[65] = l, e[66] = j, e[67] = k, e[68] = h, e[69] = B, e[70] = F, e[71] = I, e[72] = q, e[73] = Z, e[74] = re, e[75] = le, e[76] = ce, e[77] = m, e[78] = E, e[79] = ue) : ue = e[79];
620
+ let me;
621
+ e[80] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (me = ne("absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"), e[80] = me) : me = e[80];
622
+ const ge = d ? "Close time picker" : "Open time picker";
623
+ let ae;
624
+ e[81] !== a || e[82] !== d || e[83] !== p ? (ae = () => {
625
+ a || p(!d);
626
+ }, e[81] = a, e[82] = d, e[83] = p, e[84] = ae) : ae = e[84];
627
+ let pe;
628
+ e[85] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (pe = /* @__PURE__ */ v.jsx(De, { "aria-hidden": !0, className: "size-4" }), e[85] = pe) : pe = e[85];
629
+ let fe;
630
+ e[86] !== a || e[87] !== ge || e[88] !== ae ? (fe = /* @__PURE__ */ v.jsx("button", { type: "button", tabIndex: -1, disabled: a, "data-slot": "hours-picker-input-toggle", className: me, "aria-label": ge, onPointerDown: Ye, onMouseDown: Ke, onClick: ae, children: pe }), e[86] = a, e[87] = ge, e[88] = ae, e[89] = fe) : fe = e[89];
672
631
  let he;
673
- e[80] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (he = Ee("absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"), e[80] = he) : he = e[80];
674
- const re = i ? "Close time picker" : "Open time picker";
675
- let oe;
676
- e[81] !== p || e[82] !== i || e[83] !== f ? (oe = () => {
677
- p || f(!i);
678
- }, e[81] = p, e[82] = i, e[83] = f, e[84] = oe) : oe = e[84];
679
- let ge;
680
- e[85] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ge = /* @__PURE__ */ g.jsx(Ae, { "aria-hidden": !0, className: "size-4" }), e[85] = ge) : ge = e[85];
681
- let le;
682
- e[86] !== p || e[87] !== re || e[88] !== oe ? (le = /* @__PURE__ */ g.jsx("button", { type: "button", tabIndex: -1, disabled: p, "data-slot": "hours-picker-input-toggle", className: he, "aria-label": re, onPointerDown: ct, onMouseDown: it, onClick: oe, children: ge }), e[86] = p, e[87] = re, e[88] = oe, e[89] = le) : le = e[89];
683
- let ve;
684
- return e[90] !== ne || e[91] !== le ? (ve = /* @__PURE__ */ g.jsxs("div", { className: "relative group", children: [
685
- ne,
686
- le
687
- ] }), e[90] = ne, e[91] = le, e[92] = ve) : ve = e[92], ve;
632
+ return e[90] !== ue || e[91] !== fe ? (he = /* @__PURE__ */ v.jsxs("div", { className: "relative group", children: [
633
+ ue,
634
+ fe
635
+ ] }), e[90] = ue, e[91] = fe, e[92] = he) : he = e[92], he;
688
636
  }
689
- function it(o) {
637
+ function Ke(o) {
690
638
  o.preventDefault();
691
639
  }
692
- function ct(o) {
640
+ function Ye(o) {
693
641
  o.preventDefault();
694
642
  }
695
- function ut(o) {
696
- return ue(o);
643
+ function Ge(o) {
644
+ return _(o);
697
645
  }
698
646
  export {
699
- lt as HourPickerField,
700
- Fe as HourPickerInput
647
+ $e as HourPickerField,
648
+ Se as HourPickerInput
701
649
  };
702
650
  //# sourceMappingURL=index19.js.map