react-timezone-range-picker 0.1.0 → 0.1.1

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 (56) hide show
  1. package/README.md +8 -4
  2. package/dist/AroundTimePanel/index.d.ts +8 -0
  3. package/dist/AroundTimePanel/index.d.ts.map +1 -0
  4. package/dist/AroundTimePanel/util.d.ts +16 -0
  5. package/dist/AroundTimePanel/util.d.ts.map +1 -0
  6. package/dist/Footer/index.d.ts +2 -0
  7. package/dist/Footer/index.d.ts.map +1 -0
  8. package/dist/Provider/PopoverProvider.d.ts +12 -0
  9. package/dist/Provider/PopoverProvider.d.ts.map +1 -0
  10. package/dist/RelativeTimePanel/index.d.ts +7 -0
  11. package/dist/RelativeTimePanel/index.d.ts.map +1 -0
  12. package/dist/RelativeTimePanel/timeOptions.d.ts +9 -0
  13. package/dist/RelativeTimePanel/timeOptions.d.ts.map +1 -0
  14. package/dist/Sidebar/index.d.ts +10 -0
  15. package/dist/Sidebar/index.d.ts.map +1 -0
  16. package/dist/StartEndTimePanel/index.d.ts +8 -0
  17. package/dist/StartEndTimePanel/index.d.ts.map +1 -0
  18. package/dist/TimezonePanel/components/TimezoneList/index.d.ts +14 -0
  19. package/dist/TimezonePanel/components/TimezoneList/index.d.ts.map +1 -0
  20. package/dist/TimezonePanel/components/TimezoneSearch/index.d.ts +8 -0
  21. package/dist/TimezonePanel/components/TimezoneSearch/index.d.ts.map +1 -0
  22. package/dist/TimezonePanel/index.d.ts +8 -0
  23. package/dist/TimezonePanel/index.d.ts.map +1 -0
  24. package/dist/TimezonePanel/util/getBrowserTimezone.d.ts +8 -0
  25. package/dist/TimezonePanel/util/getBrowserTimezone.d.ts.map +1 -0
  26. package/dist/TimezonePanel/util/getTimezones.d.ts +8 -0
  27. package/dist/TimezonePanel/util/getTimezones.d.ts.map +1 -0
  28. package/dist/TimezonePanel/util/longTzName.d.ts +2 -0
  29. package/dist/TimezonePanel/util/longTzName.d.ts.map +1 -0
  30. package/dist/TimezonePanel/util/parseOffest.d.ts +2 -0
  31. package/dist/TimezonePanel/util/parseOffest.d.ts.map +1 -0
  32. package/dist/TimezoneRangePicker/index.d.ts +9 -0
  33. package/dist/TimezoneRangePicker/index.d.ts.map +1 -0
  34. package/dist/hooks/useAppTheme.d.ts +5 -0
  35. package/dist/hooks/useAppTheme.d.ts.map +1 -0
  36. package/dist/index.cjs.js +63 -0
  37. package/dist/index.cjs.js.map +1 -0
  38. package/dist/index.d.ts +4 -36
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.es.js +2301 -0
  41. package/dist/index.es.js.map +1 -0
  42. package/dist/interfaces/index.d.ts +21 -0
  43. package/dist/interfaces/index.d.ts.map +1 -0
  44. package/dist/style.css +1 -0
  45. package/dist/test.setup.d.ts +2 -0
  46. package/dist/test.setup.d.ts.map +1 -0
  47. package/dist/util/dateTime.d.ts +23 -0
  48. package/dist/util/dateTime.d.ts.map +1 -0
  49. package/package.json +11 -10
  50. package/dist/index.css +0 -80
  51. package/dist/index.css.map +0 -1
  52. package/dist/index.d.mts +0 -36
  53. package/dist/index.js +0 -1007
  54. package/dist/index.js.map +0 -1
  55. package/dist/index.mjs +0 -997
  56. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,2301 @@
1
+ import $t, { useRef as se, useCallback as P, useEffect as ie, forwardRef as St, createElement as Ae, useState as ee, createContext as xt, useContext as Dt, useMemo as lt, useLayoutEffect as jt } from "react";
2
+ import { useMantineColorScheme as wt, useMantineTheme as Et, Flex as H, Text as X, Input as dt, Button as Le, Box as oe, Select as _t, Popover as Fe } from "@mantine/core";
3
+ import { DatePickerInput as ze, TimeInput as Re } from "@mantine/dates";
4
+ function Ve(e) {
5
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
+ }
7
+ var Se = { exports: {} }, fe = {};
8
+ /**
9
+ * @license React
10
+ * react-jsx-runtime.production.js
11
+ *
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ */
17
+ var Be;
18
+ function kt() {
19
+ if (Be) return fe;
20
+ Be = 1;
21
+ var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
22
+ function r(n, s, i) {
23
+ var a = null;
24
+ if (i !== void 0 && (a = "" + i), s.key !== void 0 && (a = "" + s.key), "key" in s) {
25
+ i = {};
26
+ for (var c in s)
27
+ c !== "key" && (i[c] = s[c]);
28
+ } else i = s;
29
+ return s = i.ref, {
30
+ $$typeof: e,
31
+ type: n,
32
+ key: a,
33
+ ref: s !== void 0 ? s : null,
34
+ props: i
35
+ };
36
+ }
37
+ return fe.Fragment = t, fe.jsx = r, fe.jsxs = r, fe;
38
+ }
39
+ var me = {};
40
+ /**
41
+ * @license React
42
+ * react-jsx-runtime.development.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */
49
+ var Je;
50
+ function Ot() {
51
+ return Je || (Je = 1, process.env.NODE_ENV !== "production" && (function() {
52
+ function e(o) {
53
+ if (o == null) return null;
54
+ if (typeof o == "function")
55
+ return o.$$typeof === L ? null : o.displayName || o.name || null;
56
+ if (typeof o == "string") return o;
57
+ switch (o) {
58
+ case T:
59
+ return "Fragment";
60
+ case $:
61
+ return "Profiler";
62
+ case h:
63
+ return "StrictMode";
64
+ case R:
65
+ return "Suspense";
66
+ case S:
67
+ return "SuspenseList";
68
+ case N:
69
+ return "Activity";
70
+ }
71
+ if (typeof o == "object")
72
+ switch (typeof o.tag == "number" && console.error(
73
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
74
+ ), o.$$typeof) {
75
+ case _:
76
+ return "Portal";
77
+ case z:
78
+ return (o.displayName || "Context") + ".Provider";
79
+ case k:
80
+ return (o._context.displayName || "Context") + ".Consumer";
81
+ case Y:
82
+ var b = o.render;
83
+ return o = o.displayName, o || (o = b.displayName || b.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
84
+ case A:
85
+ return b = o.displayName || null, b !== null ? b : e(o.type) || "Memo";
86
+ case I:
87
+ b = o._payload, o = o._init;
88
+ try {
89
+ return e(o(b));
90
+ } catch {
91
+ }
92
+ }
93
+ return null;
94
+ }
95
+ function t(o) {
96
+ return "" + o;
97
+ }
98
+ function r(o) {
99
+ try {
100
+ t(o);
101
+ var b = !1;
102
+ } catch {
103
+ b = !0;
104
+ }
105
+ if (b) {
106
+ b = console;
107
+ var O = b.error, C = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
108
+ return O.call(
109
+ b,
110
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
111
+ C
112
+ ), t(o);
113
+ }
114
+ }
115
+ function n(o) {
116
+ if (o === T) return "<>";
117
+ if (typeof o == "object" && o !== null && o.$$typeof === I)
118
+ return "<...>";
119
+ try {
120
+ var b = e(o);
121
+ return b ? "<" + b + ">" : "<...>";
122
+ } catch {
123
+ return "<...>";
124
+ }
125
+ }
126
+ function s() {
127
+ var o = F.A;
128
+ return o === null ? null : o.getOwner();
129
+ }
130
+ function i() {
131
+ return Error("react-stack-top-frame");
132
+ }
133
+ function a(o) {
134
+ if (te.call(o, "key")) {
135
+ var b = Object.getOwnPropertyDescriptor(o, "key").get;
136
+ if (b && b.isReactWarning) return !1;
137
+ }
138
+ return o.key !== void 0;
139
+ }
140
+ function c(o, b) {
141
+ function O() {
142
+ v || (v = !0, console.error(
143
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
144
+ b
145
+ ));
146
+ }
147
+ O.isReactWarning = !0, Object.defineProperty(o, "key", {
148
+ get: O,
149
+ configurable: !0
150
+ });
151
+ }
152
+ function u() {
153
+ var o = e(this.type);
154
+ return m[o] || (m[o] = !0, console.error(
155
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
156
+ )), o = this.props.ref, o !== void 0 ? o : null;
157
+ }
158
+ function f(o, b, O, C, W, q, Q, p) {
159
+ return O = q.ref, o = {
160
+ $$typeof: V,
161
+ type: o,
162
+ key: b,
163
+ props: q,
164
+ _owner: W
165
+ }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(o, "ref", {
166
+ enumerable: !1,
167
+ get: u
168
+ }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
169
+ configurable: !1,
170
+ enumerable: !1,
171
+ writable: !0,
172
+ value: 0
173
+ }), Object.defineProperty(o, "_debugInfo", {
174
+ configurable: !1,
175
+ enumerable: !1,
176
+ writable: !0,
177
+ value: null
178
+ }), Object.defineProperty(o, "_debugStack", {
179
+ configurable: !1,
180
+ enumerable: !1,
181
+ writable: !0,
182
+ value: Q
183
+ }), Object.defineProperty(o, "_debugTask", {
184
+ configurable: !1,
185
+ enumerable: !1,
186
+ writable: !0,
187
+ value: p
188
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
189
+ }
190
+ function D(o, b, O, C, W, q, Q, p) {
191
+ var E = b.children;
192
+ if (E !== void 0)
193
+ if (C)
194
+ if (ae(E)) {
195
+ for (C = 0; C < E.length; C++)
196
+ g(E[C]);
197
+ Object.freeze && Object.freeze(E);
198
+ } else
199
+ console.error(
200
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
201
+ );
202
+ else g(E);
203
+ if (te.call(b, "key")) {
204
+ E = e(o);
205
+ var U = Object.keys(b).filter(function(B) {
206
+ return B !== "key";
207
+ });
208
+ C = 0 < U.length ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}", M[E + C] || (U = 0 < U.length ? "{" + U.join(": ..., ") + ": ...}" : "{}", console.error(
209
+ `A props object containing a "key" prop is being spread into JSX:
210
+ let props = %s;
211
+ <%s {...props} />
212
+ React keys must be passed directly to JSX without using spread:
213
+ let props = %s;
214
+ <%s key={someKey} {...props} />`,
215
+ C,
216
+ E,
217
+ U,
218
+ E
219
+ ), M[E + C] = !0);
220
+ }
221
+ if (E = null, O !== void 0 && (r(O), E = "" + O), a(b) && (r(b.key), E = "" + b.key), "key" in b) {
222
+ O = {};
223
+ for (var K in b)
224
+ K !== "key" && (O[K] = b[K]);
225
+ } else O = b;
226
+ return E && c(
227
+ O,
228
+ typeof o == "function" ? o.displayName || o.name || "Unknown" : o
229
+ ), f(
230
+ o,
231
+ E,
232
+ q,
233
+ W,
234
+ s(),
235
+ O,
236
+ Q,
237
+ p
238
+ );
239
+ }
240
+ function g(o) {
241
+ typeof o == "object" && o !== null && o.$$typeof === V && o._store && (o._store.validated = 1);
242
+ }
243
+ var j = $t, V = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), z = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), F = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, ae = Array.isArray, w = console.createTask ? console.createTask : function() {
244
+ return null;
245
+ };
246
+ j = {
247
+ react_stack_bottom_frame: function(o) {
248
+ return o();
249
+ }
250
+ };
251
+ var v, m = {}, x = j.react_stack_bottom_frame.bind(
252
+ j,
253
+ i
254
+ )(), y = w(n(i)), M = {};
255
+ me.Fragment = T, me.jsx = function(o, b, O, C, W) {
256
+ var q = 1e4 > F.recentlyCreatedOwnerStacks++;
257
+ return D(
258
+ o,
259
+ b,
260
+ O,
261
+ !1,
262
+ C,
263
+ W,
264
+ q ? Error("react-stack-top-frame") : x,
265
+ q ? w(n(o)) : y
266
+ );
267
+ }, me.jsxs = function(o, b, O, C, W) {
268
+ var q = 1e4 > F.recentlyCreatedOwnerStacks++;
269
+ return D(
270
+ o,
271
+ b,
272
+ O,
273
+ !0,
274
+ C,
275
+ W,
276
+ q ? Error("react-stack-top-frame") : x,
277
+ q ? w(n(o)) : y
278
+ );
279
+ };
280
+ })()), me;
281
+ }
282
+ var Ge;
283
+ function Mt() {
284
+ return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? Se.exports = kt() : Se.exports = Ot()), Se.exports;
285
+ }
286
+ var l = Mt();
287
+ function Pt(e, t) {
288
+ var r = se(!1), n = se(), s = se(e), i = P(function() {
289
+ return r.current;
290
+ }, []), a = P(function() {
291
+ r.current = !1, n.current && clearTimeout(n.current), n.current = setTimeout(function() {
292
+ r.current = !0, s.current();
293
+ }, t);
294
+ }, [t]), c = P(function() {
295
+ r.current = null, n.current && clearTimeout(n.current);
296
+ }, []);
297
+ return ie(function() {
298
+ s.current = e;
299
+ }, [e]), ie(function() {
300
+ return a(), c;
301
+ }, [t]), [i, c, a];
302
+ }
303
+ function ft(e, t, r) {
304
+ r === void 0 && (r = []);
305
+ var n = Pt(e, t), s = n[0], i = n[1], a = n[2];
306
+ return ie(a, r), [s, i];
307
+ }
308
+ function mt(e) {
309
+ var t, r, n = "";
310
+ if (typeof e == "string" || typeof e == "number") n += e;
311
+ else if (typeof e == "object") if (Array.isArray(e)) {
312
+ var s = e.length;
313
+ for (t = 0; t < s; t++) e[t] && (r = mt(e[t])) && (n && (n += " "), n += r);
314
+ } else for (r in e) e[r] && (n && (n += " "), n += r);
315
+ return n;
316
+ }
317
+ function ht() {
318
+ for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = mt(e)) && (n && (n += " "), n += t);
319
+ return n;
320
+ }
321
+ const Vt = "_row_550mo_1", he = {
322
+ row: Vt,
323
+ "row-dark": "_row-dark_550mo_5",
324
+ "row-light": "_row-light_550mo_12",
325
+ "row-selected-dark": "_row-selected-dark_550mo_19",
326
+ "row-selected-light": "_row-selected-light_550mo_27"
327
+ }, qe = () => {
328
+ const { colorScheme: e } = wt(), t = Et();
329
+ return { colorScheme: e, theme: t };
330
+ }, Xe = ({
331
+ name: e,
332
+ longName: t,
333
+ currentTime: r,
334
+ utcOffset: n,
335
+ selectedTimezone: s,
336
+ isBrowserTimezone: i = !1,
337
+ handleTimezoneMouseClick: a = void 0
338
+ }) => {
339
+ const { colorScheme: c } = qe(), u = () => {
340
+ i || a({
341
+ name: e,
342
+ longName: t,
343
+ utcOffset: n
344
+ });
345
+ };
346
+ return /* @__PURE__ */ l.jsxs(
347
+ H,
348
+ {
349
+ direction: "column",
350
+ className: ht(
351
+ he.row,
352
+ i ? void 0 : c === "dark" ? he["row-dark"] : he["row-light"],
353
+ s?.name === e ? c === "dark" ? he["row-selected-dark"] : he["row-selected-light"] : void 0
354
+ ),
355
+ onClick: u,
356
+ children: [
357
+ /* @__PURE__ */ l.jsxs(H, { justify: "space-between", children: [
358
+ /* @__PURE__ */ l.jsx(X, { size: "sm", children: e }),
359
+ /* @__PURE__ */ l.jsxs(X, { size: "sm", children: [
360
+ r,
361
+ " • UTC",
362
+ n
363
+ ] })
364
+ ] }),
365
+ /* @__PURE__ */ l.jsx(X, { size: "sm", children: t })
366
+ ]
367
+ }
368
+ );
369
+ };
370
+ /**
371
+ * @license @tabler/icons-react v3.35.0 - MIT
372
+ *
373
+ * This source code is licensed under the MIT license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */
376
+ var At = {
377
+ outline: {
378
+ xmlns: "http://www.w3.org/2000/svg",
379
+ width: 24,
380
+ height: 24,
381
+ viewBox: "0 0 24 24",
382
+ fill: "none",
383
+ stroke: "currentColor",
384
+ strokeWidth: 2,
385
+ strokeLinecap: "round",
386
+ strokeLinejoin: "round"
387
+ },
388
+ filled: {
389
+ xmlns: "http://www.w3.org/2000/svg",
390
+ width: 24,
391
+ height: 24,
392
+ viewBox: "0 0 24 24",
393
+ fill: "currentColor",
394
+ stroke: "none"
395
+ }
396
+ };
397
+ /**
398
+ * @license @tabler/icons-react v3.35.0 - MIT
399
+ *
400
+ * This source code is licensed under the MIT license.
401
+ * See the LICENSE file in the root directory of this source tree.
402
+ */
403
+ const de = (e, t, r, n) => {
404
+ const s = St(
405
+ ({ color: i = "currentColor", size: a = 24, stroke: c = 2, title: u, className: f, children: D, ...g }, j) => Ae(
406
+ "svg",
407
+ {
408
+ ref: j,
409
+ ...At[e],
410
+ width: a,
411
+ height: a,
412
+ className: ["tabler-icon", `tabler-icon-${t}`, f].join(" "),
413
+ ...e === "filled" ? {
414
+ fill: i
415
+ } : {
416
+ strokeWidth: c,
417
+ stroke: i
418
+ },
419
+ ...g
420
+ },
421
+ [
422
+ u && Ae("title", { key: "svg-title" }, u),
423
+ ...n.map(([V, _]) => Ae(V, _)),
424
+ ...Array.isArray(D) ? D : [D]
425
+ ]
426
+ )
427
+ );
428
+ return s.displayName = `${r}`, s;
429
+ };
430
+ /**
431
+ * @license @tabler/icons-react v3.35.0 - MIT
432
+ *
433
+ * This source code is licensed under the MIT license.
434
+ * See the LICENSE file in the root directory of this source tree.
435
+ */
436
+ const Ft = [["path", { d: "M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z", key: "svg-0" }], ["path", { d: "M16 3v4", key: "svg-1" }], ["path", { d: "M8 3v4", key: "svg-2" }], ["path", { d: "M4 11h16", key: "svg-3" }], ["path", { d: "M11 15h1", key: "svg-4" }], ["path", { d: "M12 15v3", key: "svg-5" }]], Ye = de("outline", "calendar", "Calendar", Ft);
437
+ /**
438
+ * @license @tabler/icons-react v3.35.0 - MIT
439
+ *
440
+ * This source code is licensed under the MIT license.
441
+ * See the LICENSE file in the root directory of this source tree.
442
+ */
443
+ const Ct = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], Ce = de("outline", "chevron-right", "ChevronRight", Ct);
444
+ /**
445
+ * @license @tabler/icons-react v3.35.0 - MIT
446
+ *
447
+ * This source code is licensed under the MIT license.
448
+ * See the LICENSE file in the root directory of this source tree.
449
+ */
450
+ const It = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 7v5l3 3", key: "svg-1" }]], Pe = de("outline", "clock", "Clock", It);
451
+ /**
452
+ * @license @tabler/icons-react v3.35.0 - MIT
453
+ *
454
+ * This source code is licensed under the MIT license.
455
+ * See the LICENSE file in the root directory of this source tree.
456
+ */
457
+ const Lt = [["path", { d: "M4 6h16", key: "svg-0" }], ["path", { d: "M6 12h12", key: "svg-1" }], ["path", { d: "M9 18h6", key: "svg-2" }]], zt = de("outline", "filter-2", "Filter2", Lt);
458
+ /**
459
+ * @license @tabler/icons-react v3.35.0 - MIT
460
+ *
461
+ * This source code is licensed under the MIT license.
462
+ * See the LICENSE file in the root directory of this source tree.
463
+ */
464
+ const Rt = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M3.6 9h16.8", key: "svg-1" }], ["path", { d: "M3.6 15h16.8", key: "svg-2" }], ["path", { d: "M11.5 3a17 17 0 0 0 0 18", key: "svg-3" }], ["path", { d: "M12.5 3a17 17 0 0 1 0 18", key: "svg-4" }]], Yt = de("outline", "world", "World", Rt);
465
+ /**
466
+ * @license @tabler/icons-react v3.35.0 - MIT
467
+ *
468
+ * This source code is licensed under the MIT license.
469
+ * See the LICENSE file in the root directory of this source tree.
470
+ */
471
+ const Kt = [["path", { d: "M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z", key: "svg-0" }], ["path", { d: "M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1", key: "svg-1" }], ["path", { d: "M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1", key: "svg-2" }], ["path", { d: "M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1", key: "svg-3" }], ["path", { d: "M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z", key: "svg-4" }], ["path", { d: "M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1", key: "svg-5" }]], Ut = de("filled", "calendar-week-filled", "CalendarWeekFilled", Kt), Wt = ({ searchText: e, setSearchText: t }) => /* @__PURE__ */ l.jsx(
472
+ dt,
473
+ {
474
+ placeholder: "Timezone search (Asia, Tokyo, +09:00, etc)",
475
+ leftSection: /* @__PURE__ */ l.jsx(zt, { stroke: 2 }),
476
+ value: e,
477
+ onChange: (r) => t(r.currentTarget.value)
478
+ }
479
+ );
480
+ var _e = { exports: {} }, Nt = _e.exports, Qe;
481
+ function qt() {
482
+ return Qe || (Qe = 1, (function(e, t) {
483
+ (function(r, n) {
484
+ e.exports = n();
485
+ })(Nt, (function() {
486
+ var r = 1e3, n = 6e4, s = 36e5, i = "millisecond", a = "second", c = "minute", u = "hour", f = "day", D = "week", g = "month", j = "quarter", V = "year", _ = "date", T = "Invalid Date", h = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, $ = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, k = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(w) {
487
+ var v = ["th", "st", "nd", "rd"], m = w % 100;
488
+ return "[" + w + (v[(m - 20) % 10] || v[m] || v[0]) + "]";
489
+ } }, z = function(w, v, m) {
490
+ var x = String(w);
491
+ return !x || x.length >= v ? w : "" + Array(v + 1 - x.length).join(m) + w;
492
+ }, Y = { s: z, z: function(w) {
493
+ var v = -w.utcOffset(), m = Math.abs(v), x = Math.floor(m / 60), y = m % 60;
494
+ return (v <= 0 ? "+" : "-") + z(x, 2, "0") + ":" + z(y, 2, "0");
495
+ }, m: function w(v, m) {
496
+ if (v.date() < m.date()) return -w(m, v);
497
+ var x = 12 * (m.year() - v.year()) + (m.month() - v.month()), y = v.clone().add(x, g), M = m - y < 0, o = v.clone().add(x + (M ? -1 : 1), g);
498
+ return +(-(x + (m - y) / (M ? y - o : o - y)) || 0);
499
+ }, a: function(w) {
500
+ return w < 0 ? Math.ceil(w) || 0 : Math.floor(w);
501
+ }, p: function(w) {
502
+ return { M: g, y: V, w: D, d: f, D: _, h: u, m: c, s: a, ms: i, Q: j }[w] || String(w || "").toLowerCase().replace(/s$/, "");
503
+ }, u: function(w) {
504
+ return w === void 0;
505
+ } }, R = "en", S = {};
506
+ S[R] = k;
507
+ var A = "$isDayjsObject", I = function(w) {
508
+ return w instanceof te || !(!w || !w[A]);
509
+ }, N = function w(v, m, x) {
510
+ var y;
511
+ if (!v) return R;
512
+ if (typeof v == "string") {
513
+ var M = v.toLowerCase();
514
+ S[M] && (y = M), m && (S[M] = m, y = M);
515
+ var o = v.split("-");
516
+ if (!y && o.length > 1) return w(o[0]);
517
+ } else {
518
+ var b = v.name;
519
+ S[b] = v, y = b;
520
+ }
521
+ return !x && y && (R = y), y || !x && R;
522
+ }, L = function(w, v) {
523
+ if (I(w)) return w.clone();
524
+ var m = typeof v == "object" ? v : {};
525
+ return m.date = w, m.args = arguments, new te(m);
526
+ }, F = Y;
527
+ F.l = N, F.i = I, F.w = function(w, v) {
528
+ return L(w, { locale: v.$L, utc: v.$u, x: v.$x, $offset: v.$offset });
529
+ };
530
+ var te = (function() {
531
+ function w(m) {
532
+ this.$L = N(m.locale, null, !0), this.parse(m), this.$x = this.$x || m.x || {}, this[A] = !0;
533
+ }
534
+ var v = w.prototype;
535
+ return v.parse = function(m) {
536
+ this.$d = (function(x) {
537
+ var y = x.date, M = x.utc;
538
+ if (y === null) return /* @__PURE__ */ new Date(NaN);
539
+ if (F.u(y)) return /* @__PURE__ */ new Date();
540
+ if (y instanceof Date) return new Date(y);
541
+ if (typeof y == "string" && !/Z$/i.test(y)) {
542
+ var o = y.match(h);
543
+ if (o) {
544
+ var b = o[2] - 1 || 0, O = (o[7] || "0").substring(0, 3);
545
+ return M ? new Date(Date.UTC(o[1], b, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, O)) : new Date(o[1], b, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, O);
546
+ }
547
+ }
548
+ return new Date(y);
549
+ })(m), this.init();
550
+ }, v.init = function() {
551
+ var m = this.$d;
552
+ this.$y = m.getFullYear(), this.$M = m.getMonth(), this.$D = m.getDate(), this.$W = m.getDay(), this.$H = m.getHours(), this.$m = m.getMinutes(), this.$s = m.getSeconds(), this.$ms = m.getMilliseconds();
553
+ }, v.$utils = function() {
554
+ return F;
555
+ }, v.isValid = function() {
556
+ return this.$d.toString() !== T;
557
+ }, v.isSame = function(m, x) {
558
+ var y = L(m);
559
+ return this.startOf(x) <= y && y <= this.endOf(x);
560
+ }, v.isAfter = function(m, x) {
561
+ return L(m) < this.startOf(x);
562
+ }, v.isBefore = function(m, x) {
563
+ return this.endOf(x) < L(m);
564
+ }, v.$g = function(m, x, y) {
565
+ return F.u(m) ? this[x] : this.set(y, m);
566
+ }, v.unix = function() {
567
+ return Math.floor(this.valueOf() / 1e3);
568
+ }, v.valueOf = function() {
569
+ return this.$d.getTime();
570
+ }, v.startOf = function(m, x) {
571
+ var y = this, M = !!F.u(x) || x, o = F.p(m), b = function(U, K) {
572
+ var B = F.w(y.$u ? Date.UTC(y.$y, K, U) : new Date(y.$y, K, U), y);
573
+ return M ? B : B.endOf(f);
574
+ }, O = function(U, K) {
575
+ return F.w(y.toDate()[U].apply(y.toDate("s"), (M ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), y);
576
+ }, C = this.$W, W = this.$M, q = this.$D, Q = "set" + (this.$u ? "UTC" : "");
577
+ switch (o) {
578
+ case V:
579
+ return M ? b(1, 0) : b(31, 11);
580
+ case g:
581
+ return M ? b(1, W) : b(0, W + 1);
582
+ case D:
583
+ var p = this.$locale().weekStart || 0, E = (C < p ? C + 7 : C) - p;
584
+ return b(M ? q - E : q + (6 - E), W);
585
+ case f:
586
+ case _:
587
+ return O(Q + "Hours", 0);
588
+ case u:
589
+ return O(Q + "Minutes", 1);
590
+ case c:
591
+ return O(Q + "Seconds", 2);
592
+ case a:
593
+ return O(Q + "Milliseconds", 3);
594
+ default:
595
+ return this.clone();
596
+ }
597
+ }, v.endOf = function(m) {
598
+ return this.startOf(m, !1);
599
+ }, v.$set = function(m, x) {
600
+ var y, M = F.p(m), o = "set" + (this.$u ? "UTC" : ""), b = (y = {}, y[f] = o + "Date", y[_] = o + "Date", y[g] = o + "Month", y[V] = o + "FullYear", y[u] = o + "Hours", y[c] = o + "Minutes", y[a] = o + "Seconds", y[i] = o + "Milliseconds", y)[M], O = M === f ? this.$D + (x - this.$W) : x;
601
+ if (M === g || M === V) {
602
+ var C = this.clone().set(_, 1);
603
+ C.$d[b](O), C.init(), this.$d = C.set(_, Math.min(this.$D, C.daysInMonth())).$d;
604
+ } else b && this.$d[b](O);
605
+ return this.init(), this;
606
+ }, v.set = function(m, x) {
607
+ return this.clone().$set(m, x);
608
+ }, v.get = function(m) {
609
+ return this[F.p(m)]();
610
+ }, v.add = function(m, x) {
611
+ var y, M = this;
612
+ m = Number(m);
613
+ var o = F.p(x), b = function(W) {
614
+ var q = L(M);
615
+ return F.w(q.date(q.date() + Math.round(W * m)), M);
616
+ };
617
+ if (o === g) return this.set(g, this.$M + m);
618
+ if (o === V) return this.set(V, this.$y + m);
619
+ if (o === f) return b(1);
620
+ if (o === D) return b(7);
621
+ var O = (y = {}, y[c] = n, y[u] = s, y[a] = r, y)[o] || 1, C = this.$d.getTime() + m * O;
622
+ return F.w(C, this);
623
+ }, v.subtract = function(m, x) {
624
+ return this.add(-1 * m, x);
625
+ }, v.format = function(m) {
626
+ var x = this, y = this.$locale();
627
+ if (!this.isValid()) return y.invalidDate || T;
628
+ var M = m || "YYYY-MM-DDTHH:mm:ssZ", o = F.z(this), b = this.$H, O = this.$m, C = this.$M, W = y.weekdays, q = y.months, Q = y.meridiem, p = function(K, B, re, G) {
629
+ return K && (K[B] || K(x, M)) || re[B].slice(0, G);
630
+ }, E = function(K) {
631
+ return F.s(b % 12 || 12, K, "0");
632
+ }, U = Q || function(K, B, re) {
633
+ var G = K < 12 ? "AM" : "PM";
634
+ return re ? G.toLowerCase() : G;
635
+ };
636
+ return M.replace($, (function(K, B) {
637
+ return B || (function(re) {
638
+ switch (re) {
639
+ case "YY":
640
+ return String(x.$y).slice(-2);
641
+ case "YYYY":
642
+ return F.s(x.$y, 4, "0");
643
+ case "M":
644
+ return C + 1;
645
+ case "MM":
646
+ return F.s(C + 1, 2, "0");
647
+ case "MMM":
648
+ return p(y.monthsShort, C, q, 3);
649
+ case "MMMM":
650
+ return p(q, C);
651
+ case "D":
652
+ return x.$D;
653
+ case "DD":
654
+ return F.s(x.$D, 2, "0");
655
+ case "d":
656
+ return String(x.$W);
657
+ case "dd":
658
+ return p(y.weekdaysMin, x.$W, W, 2);
659
+ case "ddd":
660
+ return p(y.weekdaysShort, x.$W, W, 3);
661
+ case "dddd":
662
+ return W[x.$W];
663
+ case "H":
664
+ return String(b);
665
+ case "HH":
666
+ return F.s(b, 2, "0");
667
+ case "h":
668
+ return E(1);
669
+ case "hh":
670
+ return E(2);
671
+ case "a":
672
+ return U(b, O, !0);
673
+ case "A":
674
+ return U(b, O, !1);
675
+ case "m":
676
+ return String(O);
677
+ case "mm":
678
+ return F.s(O, 2, "0");
679
+ case "s":
680
+ return String(x.$s);
681
+ case "ss":
682
+ return F.s(x.$s, 2, "0");
683
+ case "SSS":
684
+ return F.s(x.$ms, 3, "0");
685
+ case "Z":
686
+ return o;
687
+ }
688
+ return null;
689
+ })(K) || o.replace(":", "");
690
+ }));
691
+ }, v.utcOffset = function() {
692
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
693
+ }, v.diff = function(m, x, y) {
694
+ var M, o = this, b = F.p(x), O = L(m), C = (O.utcOffset() - this.utcOffset()) * n, W = this - O, q = function() {
695
+ return F.m(o, O);
696
+ };
697
+ switch (b) {
698
+ case V:
699
+ M = q() / 12;
700
+ break;
701
+ case g:
702
+ M = q();
703
+ break;
704
+ case j:
705
+ M = q() / 3;
706
+ break;
707
+ case D:
708
+ M = (W - C) / 6048e5;
709
+ break;
710
+ case f:
711
+ M = (W - C) / 864e5;
712
+ break;
713
+ case u:
714
+ M = W / s;
715
+ break;
716
+ case c:
717
+ M = W / n;
718
+ break;
719
+ case a:
720
+ M = W / r;
721
+ break;
722
+ default:
723
+ M = W;
724
+ }
725
+ return y ? M : F.a(M);
726
+ }, v.daysInMonth = function() {
727
+ return this.endOf(g).$D;
728
+ }, v.$locale = function() {
729
+ return S[this.$L];
730
+ }, v.locale = function(m, x) {
731
+ if (!m) return this.$L;
732
+ var y = this.clone(), M = N(m, x, !0);
733
+ return M && (y.$L = M), y;
734
+ }, v.clone = function() {
735
+ return F.w(this.$d, this);
736
+ }, v.toDate = function() {
737
+ return new Date(this.valueOf());
738
+ }, v.toJSON = function() {
739
+ return this.isValid() ? this.toISOString() : null;
740
+ }, v.toISOString = function() {
741
+ return this.$d.toISOString();
742
+ }, v.toString = function() {
743
+ return this.$d.toUTCString();
744
+ }, w;
745
+ })(), ae = te.prototype;
746
+ return L.prototype = ae, [["$ms", i], ["$s", a], ["$m", c], ["$H", u], ["$W", f], ["$M", g], ["$y", V], ["$D", _]].forEach((function(w) {
747
+ ae[w[1]] = function(v) {
748
+ return this.$g(v, w[0], w[1]);
749
+ };
750
+ })), L.extend = function(w, v) {
751
+ return w.$i || (w(v, te, L), w.$i = !0), L;
752
+ }, L.locale = N, L.isDayjs = I, L.unix = function(w) {
753
+ return L(1e3 * w);
754
+ }, L.en = S[R], L.Ls = S, L.p = {}, L;
755
+ }));
756
+ })(_e)), _e.exports;
757
+ }
758
+ var Ht = qt();
759
+ const d = /* @__PURE__ */ Ve(Ht);
760
+ var ke = { exports: {} }, Zt = ke.exports, et;
761
+ function Bt() {
762
+ return et || (et = 1, (function(e, t) {
763
+ (function(r, n) {
764
+ e.exports = n();
765
+ })(Zt, (function() {
766
+ var r = "minute", n = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
767
+ return function(i, a, c) {
768
+ var u = a.prototype;
769
+ c.utc = function(T) {
770
+ var h = { date: T, utc: !0, args: arguments };
771
+ return new a(h);
772
+ }, u.utc = function(T) {
773
+ var h = c(this.toDate(), { locale: this.$L, utc: !0 });
774
+ return T ? h.add(this.utcOffset(), r) : h;
775
+ }, u.local = function() {
776
+ return c(this.toDate(), { locale: this.$L, utc: !1 });
777
+ };
778
+ var f = u.parse;
779
+ u.parse = function(T) {
780
+ T.utc && (this.$u = !0), this.$utils().u(T.$offset) || (this.$offset = T.$offset), f.call(this, T);
781
+ };
782
+ var D = u.init;
783
+ u.init = function() {
784
+ if (this.$u) {
785
+ var T = this.$d;
786
+ this.$y = T.getUTCFullYear(), this.$M = T.getUTCMonth(), this.$D = T.getUTCDate(), this.$W = T.getUTCDay(), this.$H = T.getUTCHours(), this.$m = T.getUTCMinutes(), this.$s = T.getUTCSeconds(), this.$ms = T.getUTCMilliseconds();
787
+ } else D.call(this);
788
+ };
789
+ var g = u.utcOffset;
790
+ u.utcOffset = function(T, h) {
791
+ var $ = this.$utils().u;
792
+ if ($(T)) return this.$u ? 0 : $(this.$offset) ? g.call(this) : this.$offset;
793
+ if (typeof T == "string" && (T = (function(R) {
794
+ R === void 0 && (R = "");
795
+ var S = R.match(n);
796
+ if (!S) return null;
797
+ var A = ("" + S[0]).match(s) || ["-", 0, 0], I = A[0], N = 60 * +A[1] + +A[2];
798
+ return N === 0 ? 0 : I === "+" ? N : -N;
799
+ })(T), T === null)) return this;
800
+ var k = Math.abs(T) <= 16 ? 60 * T : T;
801
+ if (k === 0) return this.utc(h);
802
+ var z = this.clone();
803
+ if (h) return z.$offset = k, z.$u = !1, z;
804
+ var Y = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
805
+ return (z = this.local().add(k + Y, r)).$offset = k, z.$x.$localOffset = Y, z;
806
+ };
807
+ var j = u.format;
808
+ u.format = function(T) {
809
+ var h = T || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
810
+ return j.call(this, h);
811
+ }, u.valueOf = function() {
812
+ var T = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
813
+ return this.$d.valueOf() - 6e4 * T;
814
+ }, u.isUTC = function() {
815
+ return !!this.$u;
816
+ }, u.toISOString = function() {
817
+ return this.toDate().toISOString();
818
+ }, u.toString = function() {
819
+ return this.toDate().toUTCString();
820
+ };
821
+ var V = u.toDate;
822
+ u.toDate = function(T) {
823
+ return T === "s" && this.$offset ? c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : V.call(this);
824
+ };
825
+ var _ = u.diff;
826
+ u.diff = function(T, h, $) {
827
+ if (T && this.$u === T.$u) return _.call(this, T, h, $);
828
+ var k = this.local(), z = c(T).local();
829
+ return _.call(k, z, h, $);
830
+ };
831
+ };
832
+ }));
833
+ })(ke)), ke.exports;
834
+ }
835
+ var Jt = Bt();
836
+ const Gt = /* @__PURE__ */ Ve(Jt);
837
+ var Oe = { exports: {} }, Xt = Oe.exports, tt;
838
+ function Qt() {
839
+ return tt || (tt = 1, (function(e, t) {
840
+ (function(r, n) {
841
+ e.exports = n();
842
+ })(Xt, (function() {
843
+ var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
844
+ return function(s, i, a) {
845
+ var c, u = function(j, V, _) {
846
+ _ === void 0 && (_ = {});
847
+ var T = new Date(j), h = (function($, k) {
848
+ k === void 0 && (k = {});
849
+ var z = k.timeZoneName || "short", Y = $ + "|" + z, R = n[Y];
850
+ return R || (R = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: $, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: z }), n[Y] = R), R;
851
+ })(V, _);
852
+ return h.formatToParts(T);
853
+ }, f = function(j, V) {
854
+ for (var _ = u(j, V), T = [], h = 0; h < _.length; h += 1) {
855
+ var $ = _[h], k = $.type, z = $.value, Y = r[k];
856
+ Y >= 0 && (T[Y] = parseInt(z, 10));
857
+ }
858
+ var R = T[3], S = R === 24 ? 0 : R, A = T[0] + "-" + T[1] + "-" + T[2] + " " + S + ":" + T[4] + ":" + T[5] + ":000", I = +j;
859
+ return (a.utc(A).valueOf() - (I -= I % 1e3)) / 6e4;
860
+ }, D = i.prototype;
861
+ D.tz = function(j, V) {
862
+ j === void 0 && (j = c);
863
+ var _, T = this.utcOffset(), h = this.toDate(), $ = h.toLocaleString("en-US", { timeZone: j }), k = Math.round((h - new Date($)) / 1e3 / 60), z = 15 * -Math.round(h.getTimezoneOffset() / 15) - k;
864
+ if (!Number(z)) _ = this.utcOffset(0, V);
865
+ else if (_ = a($, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(z, !0), V) {
866
+ var Y = _.utcOffset();
867
+ _ = _.add(T - Y, "minute");
868
+ }
869
+ return _.$x.$timezone = j, _;
870
+ }, D.offsetName = function(j) {
871
+ var V = this.$x.$timezone || a.tz.guess(), _ = u(this.valueOf(), V, { timeZoneName: j }).find((function(T) {
872
+ return T.type.toLowerCase() === "timezonename";
873
+ }));
874
+ return _ && _.value;
875
+ };
876
+ var g = D.startOf;
877
+ D.startOf = function(j, V) {
878
+ if (!this.$x || !this.$x.$timezone) return g.call(this, j, V);
879
+ var _ = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
880
+ return g.call(_, j, V).tz(this.$x.$timezone, !0);
881
+ }, a.tz = function(j, V, _) {
882
+ var T = _ && V, h = _ || V || c, $ = f(+a(), h);
883
+ if (typeof j != "string") return a(j).tz(h);
884
+ var k = (function(S, A, I) {
885
+ var N = S - 60 * A * 1e3, L = f(N, I);
886
+ if (A === L) return [N, A];
887
+ var F = f(N -= 60 * (L - A) * 1e3, I);
888
+ return L === F ? [N, L] : [S - 60 * Math.min(L, F) * 1e3, Math.max(L, F)];
889
+ })(a.utc(j, T).valueOf(), $, h), z = k[0], Y = k[1], R = a(z).utcOffset(Y);
890
+ return R.$x.$timezone = h, R;
891
+ }, a.tz.guess = function() {
892
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
893
+ }, a.tz.setDefault = function(j) {
894
+ c = j;
895
+ };
896
+ };
897
+ }));
898
+ })(Oe)), Oe.exports;
899
+ }
900
+ var er = Qt();
901
+ const tr = /* @__PURE__ */ Ve(er), rr = (e, t = "en-US") => new Intl.DateTimeFormat(t, {
902
+ timeZone: e,
903
+ timeZoneName: "long"
904
+ }).formatToParts(/* @__PURE__ */ new Date()).find((r) => r.type === "timeZoneName")?.value || "", nr = (e) => {
905
+ const t = e[0] === "-" ? -1 : 1, [r, n] = e.slice(1).split(":").map(Number);
906
+ return t * (r * 60 + n);
907
+ };
908
+ d.extend(Gt);
909
+ d.extend(tr);
910
+ const sr = () => Intl.supportedValuesOf("timeZone").map((t) => {
911
+ const r = d().tz(t).format("Z");
912
+ return {
913
+ name: t,
914
+ longName: rr(t),
915
+ currentTime: d().tz(t).format("h:mm A"),
916
+ utcOffset: r,
917
+ offsetMinutes: nr(r)
918
+ };
919
+ }).sort((t, r) => t.offsetMinutes - r.offsetMinutes), or = {
920
+ "list-container": "_list-container_jrnm0_5"
921
+ }, He = {
922
+ "form-container": "_form-container_1xxf4_1"
923
+ }, yt = xt(void 0), pt = () => {
924
+ const e = Dt(yt);
925
+ if (!e) throw new Error("usePopoverContext must be used within a PopoverProvider");
926
+ return e;
927
+ }, ir = ({ children: e }) => {
928
+ const [t, r] = ee(!1), n = () => {
929
+ r(!1);
930
+ };
931
+ return /* @__PURE__ */ l.jsx(yt.Provider, { value: { popoverOpened: t, setPopoverOpened: r, closePopover: n }, children: e });
932
+ }, Ze = () => {
933
+ const { theme: e } = qe(), { closePopover: t } = pt();
934
+ return /* @__PURE__ */ l.jsx(H, { justify: "flex-end", children: /* @__PURE__ */ l.jsxs(H, { columnGap: 16, children: [
935
+ /* @__PURE__ */ l.jsx(Le, { size: "xs", variant: "subtle", color: e.primaryColor, onClick: t, children: "Cancel" }),
936
+ /* @__PURE__ */ l.jsx(Le, { type: "submit", size: "xs", color: e.primaryColor, children: "Apply" })
937
+ ] }) });
938
+ }, ne = "YYYY/MM/DD", be = "HH:mm:ss", pe = () => d().format(be), Tt = () => d().format(ne), ar = (e) => d().add(e, "day").format(ne), cr = (e) => e && d().tz(e).format("Z"), ur = (e) => `${d(e.startDate).format(ne)} ${e.startTime} - ${d(
939
+ e.endDate
940
+ ).format(ne)} ${e.endTime} (${cr(e.timezone.name)})`, ce = (e, t, r, n) => {
941
+ const s = d(`${e} ${t}`).subtract(r, n);
942
+ return {
943
+ date: s.format(ne),
944
+ time: s.format(be)
945
+ };
946
+ }, ue = (e, t, r, n) => {
947
+ const s = d(`${e} ${t}`).add(r, n);
948
+ return {
949
+ date: s.format(ne),
950
+ time: s.format(be)
951
+ };
952
+ }, Te = (e, t, r) => d.tz(`${e} ${t}`, `${ne} ${be}`, r).utc().toISOString(), ve = (e, t) => {
953
+ const r = d.utc(e).tz(t);
954
+ return { date: r.format(ne), time: r.format(be) };
955
+ }, lr = ({ tzRange: e }) => {
956
+ const [t, r] = ee(e.timezone), [n, s] = ee([]), [i, a] = ee(""), c = lt(() => sr(), []);
957
+ ie(() => {
958
+ s(c);
959
+ }, []), ft(
960
+ () => {
961
+ if (i === "") {
962
+ s(c);
963
+ return;
964
+ }
965
+ s(
966
+ c.filter(
967
+ (g) => g.name.toLowerCase().includes(i.toLocaleLowerCase()) || g.longName.toLowerCase().includes(i.toLocaleLowerCase()) || g.currentTime.toLowerCase().includes(i.toLocaleLowerCase()) || g.utcOffset.toLowerCase().includes(i.toLocaleLowerCase())
968
+ )
969
+ );
970
+ },
971
+ 250,
972
+ [i]
973
+ );
974
+ const u = (g) => {
975
+ r(g);
976
+ }, f = (g) => {
977
+ if (g.preventDefault(), !t?.name || !e.timezone.name || !e.startDate || !e.startTime || !e.endDate || !e.endTime)
978
+ return;
979
+ const j = Te(e.startDate, e.startTime, e.timezone.name), V = Te(e.endDate, e.endTime, e.timezone.name), _ = ve(j, t.name), T = ve(V, t.name);
980
+ e.onApply({
981
+ startDate: _.date,
982
+ startTime: _.time,
983
+ endDate: T.date,
984
+ endTime: T.time,
985
+ timezone: t || {
986
+ name: null,
987
+ longName: null,
988
+ utcOffset: null
989
+ }
990
+ });
991
+ }, D = (g) => g ? d().tz(g).format("h:mm A") : "";
992
+ return /* @__PURE__ */ l.jsxs("form", { className: He["form-container"], onSubmit: f, children: [
993
+ /* @__PURE__ */ l.jsxs(H, { direction: "column", style: { height: "calc(100% - 40px)" }, children: [
994
+ /* @__PURE__ */ l.jsx(oe, { style: { width: "95%" }, mx: "auto", children: /* @__PURE__ */ l.jsx(Wt, { searchText: i, setSearchText: a }) }),
995
+ /* @__PURE__ */ l.jsxs(oe, { style: { overflowY: "scroll" }, children: [
996
+ /* @__PURE__ */ l.jsx(X, { fw: 600, px: 12, children: "My Location" }),
997
+ /* @__PURE__ */ l.jsx(H, { direction: "column", children: /* @__PURE__ */ l.jsx(
998
+ Xe,
999
+ {
1000
+ isBrowserTimezone: !0,
1001
+ name: e.timezone?.name,
1002
+ longName: e.timezone?.longName,
1003
+ currentTime: D(e.timezone?.name),
1004
+ utcOffset: e.timezone?.utcOffset,
1005
+ selectedTimezone: t
1006
+ }
1007
+ ) }),
1008
+ /* @__PURE__ */ l.jsx(X, { fw: 600, px: 12, children: "Locations" }),
1009
+ /* @__PURE__ */ l.jsx(H, { direction: "column", className: or["list-container"], children: n.map((g, j) => /* @__PURE__ */ l.jsx(
1010
+ Xe,
1011
+ {
1012
+ name: g.name,
1013
+ longName: g.longName,
1014
+ currentTime: g.currentTime,
1015
+ utcOffset: g.utcOffset,
1016
+ selectedTimezone: t,
1017
+ handleTimezoneMouseClick: u
1018
+ },
1019
+ j
1020
+ )) })
1021
+ ] })
1022
+ ] }),
1023
+ /* @__PURE__ */ l.jsx(oe, { px: 12, children: /* @__PURE__ */ l.jsx(Ze, {}) })
1024
+ ] });
1025
+ }, xe = {
1026
+ "sidebar-container": "_sidebar-container_e18ka_1",
1027
+ "sidebar-row": "_sidebar-row_e18ka_5"
1028
+ }, rt = (e) => [
1029
+ {
1030
+ label: "Today",
1031
+ searchKey: "today",
1032
+ startTime: d().tz(e).startOf("day").format(),
1033
+ endTime: d().tz(e).endOf("day").format()
1034
+ },
1035
+ {
1036
+ label: "Tomorrow",
1037
+ searchKey: "tomorrow",
1038
+ startTime: d().tz(e).add(1, "day").startOf("day").format(),
1039
+ endTime: d().tz(e).add(1, "day").endOf("day").format()
1040
+ },
1041
+ {
1042
+ label: "Yesterday",
1043
+ searchKey: "yesterday",
1044
+ startTime: d().tz(e).subtract(1, "day").startOf("day").format(),
1045
+ endTime: d().tz(e).subtract(1, "day").endOf("day").format(),
1046
+ lineBreak: !0
1047
+ },
1048
+ {
1049
+ label: "Last 15 seconds",
1050
+ searchKey: "-15s",
1051
+ startTime: d().tz(e).subtract(15, "second").format(),
1052
+ endTime: d().tz(e).format()
1053
+ },
1054
+ {
1055
+ label: "Last 30 seconds",
1056
+ searchKey: "-30s",
1057
+ startTime: d().tz(e).subtract(30, "second").format(),
1058
+ endTime: d().tz(e).format()
1059
+ },
1060
+ {
1061
+ label: "Next 15 seconds",
1062
+ searchKey: "+15s",
1063
+ startTime: d().tz(e).format(),
1064
+ endTime: d().tz(e).add(15, "second").format()
1065
+ },
1066
+ {
1067
+ label: "Next 30 seconds",
1068
+ searchKey: "+30s",
1069
+ startTime: d().tz(e).format(),
1070
+ endTime: d().tz(e).add(30, "second").format(),
1071
+ lineBreak: !0
1072
+ },
1073
+ {
1074
+ label: "Last 5 minutes",
1075
+ searchKey: "-5m",
1076
+ startTime: d().tz(e).subtract(5, "minute").format(),
1077
+ endTime: d().tz(e).format()
1078
+ },
1079
+ {
1080
+ label: "Last 10 minutes",
1081
+ searchKey: "-10m",
1082
+ startTime: d().tz(e).subtract(10, "minute").format(),
1083
+ endTime: d().tz(e).format()
1084
+ },
1085
+ {
1086
+ label: "Last 15 minutes",
1087
+ searchKey: "-15m",
1088
+ startTime: d().tz(e).subtract(15, "minute").format(),
1089
+ endTime: d().tz(e).format()
1090
+ },
1091
+ {
1092
+ label: "Last 30 minutes",
1093
+ searchKey: "-30m",
1094
+ startTime: d().tz(e).subtract(30, "minute").format(),
1095
+ endTime: d().tz(e).format()
1096
+ },
1097
+ {
1098
+ label: "Last 45 minutes",
1099
+ searchKey: "-45m",
1100
+ startTime: d().tz(e).subtract(45, "minute").format(),
1101
+ endTime: d().tz(e).format()
1102
+ },
1103
+ {
1104
+ label: "Next 5 minutes",
1105
+ searchKey: "+5m",
1106
+ startTime: d().tz(e).format(),
1107
+ endTime: d().tz(e).add(5, "minute").format()
1108
+ },
1109
+ {
1110
+ label: "Next 10 minutes",
1111
+ searchKey: "+10m",
1112
+ startTime: d().tz(e).format(),
1113
+ endTime: d().tz(e).add(10, "minute").format()
1114
+ },
1115
+ {
1116
+ label: "Next 15 minutes",
1117
+ searchKey: "+15m",
1118
+ startTime: d().tz(e).format(),
1119
+ endTime: d().tz(e).add(15, "minute").format()
1120
+ },
1121
+ {
1122
+ label: "Next 30 minutes",
1123
+ searchKey: "+30m",
1124
+ startTime: d().tz(e).format(),
1125
+ endTime: d().tz(e).add(30, "minute").format()
1126
+ },
1127
+ {
1128
+ label: "Next 45 minutes",
1129
+ searchKey: "+45m",
1130
+ startTime: d().tz(e).format(),
1131
+ endTime: d().tz(e).add(45, "minute").format(),
1132
+ lineBreak: !0
1133
+ },
1134
+ {
1135
+ label: "Last 1 hour",
1136
+ searchKey: "-1h",
1137
+ startTime: d().tz(e).subtract(1, "hour").format(),
1138
+ endTime: d().tz(e).format()
1139
+ },
1140
+ {
1141
+ label: "Last 3 hours",
1142
+ searchKey: "-3h",
1143
+ startTime: d().tz(e).subtract(3, "hour").format(),
1144
+ endTime: d().tz(e).format()
1145
+ },
1146
+ {
1147
+ label: "Last 6 hours",
1148
+ searchKey: "-6h",
1149
+ startTime: d().tz(e).subtract(6, "hour").format(),
1150
+ endTime: d().tz(e).format()
1151
+ },
1152
+ {
1153
+ label: "Last 12 hours",
1154
+ searchKey: "-12h",
1155
+ startTime: d().tz(e).subtract(12, "hour").format(),
1156
+ endTime: d().tz(e).format()
1157
+ },
1158
+ {
1159
+ label: "Next 1 hour",
1160
+ searchKey: "+1h",
1161
+ startTime: d().tz(e).format(),
1162
+ endTime: d().tz(e).add(1, "hour").format()
1163
+ },
1164
+ {
1165
+ label: "Next 3 hours",
1166
+ searchKey: "+3h",
1167
+ startTime: d().tz(e).format(),
1168
+ endTime: d().tz(e).add(3, "hour").format()
1169
+ },
1170
+ {
1171
+ label: "Next 6 hours",
1172
+ searchKey: "+6h",
1173
+ startTime: d().tz(e).format(),
1174
+ endTime: d().tz(e).add(6, "hour").format()
1175
+ },
1176
+ {
1177
+ label: "Next 12 hours",
1178
+ searchKey: "+12h",
1179
+ startTime: d().tz(e).format(),
1180
+ endTime: d().tz(e).add(12, "hour").format(),
1181
+ lineBreak: !0
1182
+ },
1183
+ {
1184
+ label: "Last 1 day",
1185
+ searchKey: "-1d",
1186
+ startTime: d().tz(e).subtract(1, "day").format(),
1187
+ endTime: d().tz(e).format()
1188
+ },
1189
+ {
1190
+ label: "Last 2 days",
1191
+ searchKey: "-2d",
1192
+ startTime: d().tz(e).subtract(2, "day").format(),
1193
+ endTime: d().tz(e).format()
1194
+ },
1195
+ {
1196
+ label: "Last 7 days",
1197
+ searchKey: "-7d",
1198
+ startTime: d().tz(e).subtract(7, "day").format(),
1199
+ endTime: d().tz(e).format()
1200
+ },
1201
+ {
1202
+ label: "Last 14 days",
1203
+ searchKey: "-14d",
1204
+ startTime: d().tz(e).subtract(14, "day").format(),
1205
+ endTime: d().tz(e).format()
1206
+ },
1207
+ {
1208
+ label: "Last 30 days",
1209
+ searchKey: "-30d",
1210
+ startTime: d().tz(e).subtract(30, "day").format(),
1211
+ endTime: d().tz(e).format()
1212
+ },
1213
+ {
1214
+ label: "Next 1 day",
1215
+ searchKey: "+1d",
1216
+ startTime: d().tz(e).format(),
1217
+ endTime: d().tz(e).add(1, "day").format()
1218
+ },
1219
+ {
1220
+ label: "Next 2 days",
1221
+ searchKey: "+2d",
1222
+ startTime: d().tz(e).format(),
1223
+ endTime: d().tz(e).add(2, "day").format()
1224
+ },
1225
+ {
1226
+ label: "Next 7 days",
1227
+ searchKey: "+7d",
1228
+ startTime: d().tz(e).format(),
1229
+ endTime: d().tz(e).add(7, "day").format()
1230
+ },
1231
+ {
1232
+ label: "Next 14 days",
1233
+ searchKey: "+14d",
1234
+ startTime: d().tz(e).format(),
1235
+ endTime: d().tz(e).add(14, "day").format()
1236
+ },
1237
+ {
1238
+ label: "Next 30 days",
1239
+ searchKey: "+30d",
1240
+ startTime: d().tz(e).format(),
1241
+ endTime: d().tz(e).add(30, "day").format()
1242
+ }
1243
+ ], De = {
1244
+ "relative-time-panel-container": "_relative-time-panel-container_jsk5z_1",
1245
+ "time-row": "_time-row_jsk5z_6",
1246
+ "time-row-dark": "_time-row-dark_jsk5z_10",
1247
+ "time-row-light": "_time-row-light_jsk5z_16"
1248
+ }, dr = ({ tzRange: e }) => {
1249
+ const [t, r] = ee([]), [n, s] = ee(""), { colorScheme: i } = qe();
1250
+ ie(() => {
1251
+ if (e.timezone.name !== null) {
1252
+ const c = rt(e.timezone.name);
1253
+ r(c);
1254
+ }
1255
+ }, [e.timezone]), ft(
1256
+ () => {
1257
+ if (n === "") {
1258
+ r(rt(e.timezone.name));
1259
+ return;
1260
+ }
1261
+ const c = t.filter(
1262
+ (u) => u.searchKey.includes(n)
1263
+ );
1264
+ r(c);
1265
+ },
1266
+ 250,
1267
+ [n]
1268
+ );
1269
+ const a = (c) => {
1270
+ const [u, f] = c.startTime.split("T"), [D, g] = c.endTime.split("T");
1271
+ e.onApply({
1272
+ startDate: u,
1273
+ startTime: f.slice(0, 8),
1274
+ endDate: D,
1275
+ endTime: g.slice(0, 8),
1276
+ timezone: e.timezone
1277
+ });
1278
+ };
1279
+ return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1280
+ /* @__PURE__ */ l.jsx(oe, { style: { width: "90%" }, mx: "auto", children: /* @__PURE__ */ l.jsx(
1281
+ dt,
1282
+ {
1283
+ placeholder: "Relative time (15m, 1h, 1d, 1w)",
1284
+ value: n,
1285
+ onChange: (c) => s(c.currentTarget.value)
1286
+ }
1287
+ ) }),
1288
+ /* @__PURE__ */ l.jsx(H, { direction: "column", className: De["relative-time-panel-container"], children: t.map((c) => /* @__PURE__ */ l.jsxs(
1289
+ H,
1290
+ {
1291
+ align: "center",
1292
+ justify: "space-between",
1293
+ className: ht(
1294
+ i === "dark" ? De["time-row-dark"] : De["time-row-light"],
1295
+ De["time-row"]
1296
+ ),
1297
+ py: 4,
1298
+ px: 12,
1299
+ mb: c.lineBreak ? 8 : 0,
1300
+ onClick: () => a(c),
1301
+ children: [
1302
+ /* @__PURE__ */ l.jsx(X, { size: "sm", children: c.label }),
1303
+ /* @__PURE__ */ l.jsx(X, { size: "xs", c: "#5f6368", children: c.searchKey })
1304
+ ]
1305
+ },
1306
+ c.label
1307
+ )) })
1308
+ ] });
1309
+ }, fr = ({ setSelectedPanel: e, tzRange: t }) => /* @__PURE__ */ l.jsxs(oe, { className: xe["sidebar-container"], flex: 1, children: [
1310
+ /* @__PURE__ */ l.jsx(dr, { tzRange: t }),
1311
+ /* @__PURE__ */ l.jsxs(H, { direction: "column", rowGap: 16, py: 8, style: { borderTop: "1px solid #ddd" }, children: [
1312
+ /* @__PURE__ */ l.jsxs(
1313
+ H,
1314
+ {
1315
+ className: xe["sidebar-row"],
1316
+ justify: "space-between",
1317
+ align: "center",
1318
+ px: 12,
1319
+ onClick: () => e(Me.START_END_TIME),
1320
+ children: [
1321
+ /* @__PURE__ */ l.jsxs(H, { align: "center", children: [
1322
+ /* @__PURE__ */ l.jsx(Ut, { stroke: 1.5 }),
1323
+ /* @__PURE__ */ l.jsx(X, { size: "sm", children: "Start and end times" })
1324
+ ] }),
1325
+ /* @__PURE__ */ l.jsx(Ce, { stroke: 1.5 })
1326
+ ]
1327
+ }
1328
+ ),
1329
+ /* @__PURE__ */ l.jsxs(
1330
+ H,
1331
+ {
1332
+ className: xe["sidebar-row"],
1333
+ justify: "space-between",
1334
+ align: "center",
1335
+ px: 12,
1336
+ onClick: () => e(Me.AROUND_TIME),
1337
+ children: [
1338
+ /* @__PURE__ */ l.jsxs(H, { align: "center", children: [
1339
+ /* @__PURE__ */ l.jsx(Pe, { stroke: 1.5 }),
1340
+ /* @__PURE__ */ l.jsx(X, { size: "sm", children: "Around a time" })
1341
+ ] }),
1342
+ /* @__PURE__ */ l.jsx(Ce, { stroke: 1.5 })
1343
+ ]
1344
+ }
1345
+ ),
1346
+ /* @__PURE__ */ l.jsxs(
1347
+ H,
1348
+ {
1349
+ className: xe["sidebar-row"],
1350
+ justify: "space-between",
1351
+ align: "center",
1352
+ px: 12,
1353
+ onClick: () => e(Me.TIMEZONE),
1354
+ children: [
1355
+ /* @__PURE__ */ l.jsxs(H, { align: "center", children: [
1356
+ /* @__PURE__ */ l.jsx(Yt, { stroke: 1.5 }),
1357
+ /* @__PURE__ */ l.jsx(X, { size: "sm", children: "Time zone" })
1358
+ ] }),
1359
+ /* @__PURE__ */ l.jsx(Ce, { stroke: 1.5 })
1360
+ ]
1361
+ }
1362
+ )
1363
+ ] })
1364
+ ] });
1365
+ var vt = /* @__PURE__ */ ((e) => (e.ThirtySeconds = "± 30 seconds", e.OneMinute = "± 1 minute", e.FifteenMinutes = "± 15 minutes", e.ThirtyMinutes = "± 30 minutes", e.OneHour = "± 1 hour", e.OneDay = "± 1 day", e))(vt || {});
1366
+ const mr = [
1367
+ "± 30 seconds",
1368
+ "± 1 minute",
1369
+ "± 15 minutes",
1370
+ "± 30 minutes",
1371
+ "± 1 hour",
1372
+ "± 1 day"
1373
+ /* OneDay */
1374
+ ], hr = (e, t, r) => {
1375
+ switch (r) {
1376
+ case "± 30 seconds":
1377
+ const n = ce(e, t, 30, "second"), s = ue(e, t, 30, "second");
1378
+ return {
1379
+ startDate: n.date,
1380
+ startTime: n.time,
1381
+ endDate: s.date,
1382
+ endTime: s.time
1383
+ };
1384
+ case "± 1 minute":
1385
+ const i = ce(e, t, 1, "minute"), a = ue(e, t, 1, "minute");
1386
+ return {
1387
+ startDate: i.date,
1388
+ startTime: i.time,
1389
+ endDate: a.date,
1390
+ endTime: a.time
1391
+ };
1392
+ case "± 15 minutes":
1393
+ const c = ce(e, t, 15, "minute"), u = ue(e, t, 15, "minute");
1394
+ return {
1395
+ startDate: c.date,
1396
+ startTime: c.time,
1397
+ endDate: u.date,
1398
+ endTime: u.time
1399
+ };
1400
+ case "± 30 minutes":
1401
+ const f = ce(e, t, 30, "minute"), D = ue(e, t, 30, "minute");
1402
+ return {
1403
+ startDate: f.date,
1404
+ startTime: f.time,
1405
+ endDate: D.date,
1406
+ endTime: D.time
1407
+ };
1408
+ case "± 1 hour":
1409
+ const g = ce(e, t, 1, "hour"), j = ue(e, t, 1, "hour");
1410
+ return {
1411
+ startDate: g.date,
1412
+ startTime: g.time,
1413
+ endDate: j.date,
1414
+ endTime: j.time
1415
+ };
1416
+ case "± 1 day":
1417
+ const V = ce(e, t, 1, "day"), _ = ue(e, t, 1, "day");
1418
+ return {
1419
+ startDate: V.date,
1420
+ startTime: V.time,
1421
+ endDate: _.date,
1422
+ endTime: _.time
1423
+ };
1424
+ default:
1425
+ return {
1426
+ startDate: e,
1427
+ startTime: t,
1428
+ endDate: e,
1429
+ endTime: t
1430
+ };
1431
+ }
1432
+ };
1433
+ function yr(e) {
1434
+ if (!/^[0-9a-zA-Z-]+$/.test(e))
1435
+ throw new Error(
1436
+ `[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`
1437
+ );
1438
+ }
1439
+ const pr = typeof window < "u" ? jt : ie;
1440
+ function J(e, t) {
1441
+ pr(() => {
1442
+ if (e)
1443
+ return window.addEventListener(e, t), () => window.removeEventListener(e, t);
1444
+ }, [e]);
1445
+ }
1446
+ function Tr(e, t) {
1447
+ e && yr(e), J(
1448
+ `mantine-form:${e}:set-field-value`,
1449
+ (r) => t.setFieldValue(r.detail.path, r.detail.value)
1450
+ ), J(
1451
+ `mantine-form:${e}:set-values`,
1452
+ (r) => t.setValues(r.detail)
1453
+ ), J(
1454
+ `mantine-form:${e}:set-initial-values`,
1455
+ (r) => t.setInitialValues(r.detail)
1456
+ ), J(
1457
+ `mantine-form:${e}:set-errors`,
1458
+ (r) => t.setErrors(r.detail)
1459
+ ), J(
1460
+ `mantine-form:${e}:set-field-error`,
1461
+ (r) => t.setFieldError(r.detail.path, r.detail.error)
1462
+ ), J(
1463
+ `mantine-form:${e}:clear-field-error`,
1464
+ (r) => t.clearFieldError(r.detail)
1465
+ ), J(`mantine-form:${e}:clear-errors`, t.clearErrors), J(`mantine-form:${e}:reset`, t.reset), J(`mantine-form:${e}:validate`, t.validate), J(
1466
+ `mantine-form:${e}:validate-field`,
1467
+ (r) => t.validateField(r.detail)
1468
+ ), J(
1469
+ `mantine-form:${e}:reorder-list-item`,
1470
+ (r) => t.reorderListItem(r.detail.path, r.detail.payload)
1471
+ ), J(
1472
+ `mantine-form:${e}:remove-list-item`,
1473
+ (r) => t.removeListItem(r.detail.path, r.detail.index)
1474
+ ), J(
1475
+ `mantine-form:${e}:insert-list-item`,
1476
+ (r) => t.insertListItem(r.detail.path, r.detail.item, r.detail.index)
1477
+ ), J(
1478
+ `mantine-form:${e}:set-dirty`,
1479
+ (r) => t.setDirty(r.detail)
1480
+ ), J(
1481
+ `mantine-form:${e}:set-touched`,
1482
+ (r) => t.setTouched(r.detail)
1483
+ ), J(
1484
+ `mantine-form:${e}:reset-dirty`,
1485
+ (r) => t.resetDirty(r.detail)
1486
+ ), J(`mantine-form:${e}:reset-touched`, t.resetTouched);
1487
+ }
1488
+ function vr(e) {
1489
+ return (t) => {
1490
+ if (!t)
1491
+ e(t);
1492
+ else if (typeof t == "function")
1493
+ e(t);
1494
+ else if (typeof t == "object" && "nativeEvent" in t) {
1495
+ const { currentTarget: r } = t;
1496
+ r instanceof HTMLInputElement ? r.type === "checkbox" ? e(r.checked) : e(r.value) : (r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement) && e(r.value);
1497
+ } else
1498
+ e(t);
1499
+ };
1500
+ }
1501
+ function Ke(e) {
1502
+ return e === null || typeof e != "object" ? {} : Object.keys(e).reduce((t, r) => {
1503
+ const n = e[r];
1504
+ return n != null && n !== !1 && (t[r] = n), t;
1505
+ }, {});
1506
+ }
1507
+ function br(e) {
1508
+ const [t, r] = ee(Ke(e)), n = se(t), s = P((u) => {
1509
+ r((f) => {
1510
+ const D = Ke(typeof u == "function" ? u(f) : u);
1511
+ return n.current = D, D;
1512
+ });
1513
+ }, []), i = P(() => s({}), []), a = P(
1514
+ (u) => {
1515
+ n.current[u] !== void 0 && s((f) => {
1516
+ const D = { ...f };
1517
+ return delete D[u], D;
1518
+ });
1519
+ },
1520
+ [t]
1521
+ ), c = P(
1522
+ (u, f) => {
1523
+ f == null || f === !1 ? a(u) : n.current[u] !== f && s((D) => ({ ...D, [u]: f }));
1524
+ },
1525
+ [t]
1526
+ );
1527
+ return {
1528
+ errorsState: t,
1529
+ setErrors: s,
1530
+ clearErrors: i,
1531
+ setFieldError: c,
1532
+ clearFieldError: a
1533
+ };
1534
+ }
1535
+ function Ue(e, t) {
1536
+ if (t === null || typeof t != "object")
1537
+ return {};
1538
+ const r = { ...t };
1539
+ return Object.keys(t).forEach((n) => {
1540
+ n.includes(`${String(e)}.`) && delete r[n];
1541
+ }), r;
1542
+ }
1543
+ function nt(e, t) {
1544
+ const r = e.substring(t.length + 1).split(".")[0];
1545
+ return parseInt(r, 10);
1546
+ }
1547
+ function st(e, t, r, n) {
1548
+ if (t === void 0)
1549
+ return r;
1550
+ const s = `${String(e)}`;
1551
+ let i = r;
1552
+ n === -1 && (i = Ue(`${s}.${t}`, i));
1553
+ const a = { ...i }, c = /* @__PURE__ */ new Set();
1554
+ return Object.entries(i).filter(([u]) => {
1555
+ if (!u.startsWith(`${s}.`))
1556
+ return !1;
1557
+ const f = nt(u, s);
1558
+ return Number.isNaN(f) ? !1 : f >= t;
1559
+ }).forEach(([u, f]) => {
1560
+ const D = nt(u, s), g = u.replace(
1561
+ `${s}.${D}`,
1562
+ `${s}.${D + n}`
1563
+ );
1564
+ a[g] = f, c.add(g), c.has(u) || delete a[u];
1565
+ }), a;
1566
+ }
1567
+ function gr(e, { from: t, to: r }, n) {
1568
+ const s = `${e}.${t}`, i = `${e}.${r}`, a = { ...n }, c = /* @__PURE__ */ new Set();
1569
+ return Object.keys(n).forEach((u) => {
1570
+ if (c.has(u))
1571
+ return;
1572
+ let f, D;
1573
+ if (u.startsWith(s) ? (f = u, D = u.replace(s, i)) : u.startsWith(i) && (f = u.replace(i, s), D = u), f && D) {
1574
+ const g = a[f], j = a[D];
1575
+ j === void 0 ? delete a[f] : a[f] = j, g === void 0 ? delete a[D] : a[D] = g, c.add(f), c.add(D);
1576
+ }
1577
+ }), a;
1578
+ }
1579
+ function ot(e, t, r) {
1580
+ typeof r.value == "object" && (r.value = le(r.value)), !r.enumerable || r.get || r.set || !r.configurable || !r.writable || t === "__proto__" ? Object.defineProperty(e, t, r) : e[t] = r.value;
1581
+ }
1582
+ function le(e) {
1583
+ if (typeof e != "object") return e;
1584
+ var t = 0, r, n, s, i = Object.prototype.toString.call(e);
1585
+ if (i === "[object Object]" ? s = Object.create(e.__proto__ || null) : i === "[object Array]" ? s = Array(e.length) : i === "[object Set]" ? (s = /* @__PURE__ */ new Set(), e.forEach(function(a) {
1586
+ s.add(le(a));
1587
+ })) : i === "[object Map]" ? (s = /* @__PURE__ */ new Map(), e.forEach(function(a, c) {
1588
+ s.set(le(c), le(a));
1589
+ })) : i === "[object Date]" ? s = /* @__PURE__ */ new Date(+e) : i === "[object RegExp]" ? s = new RegExp(e.source, e.flags) : i === "[object DataView]" ? s = new e.constructor(le(e.buffer)) : i === "[object ArrayBuffer]" ? s = e.slice(0) : i.slice(-6) === "Array]" && (s = new e.constructor(e)), s) {
1590
+ for (n = Object.getOwnPropertySymbols(e); t < n.length; t++)
1591
+ ot(s, n[t], Object.getOwnPropertyDescriptor(e, n[t]));
1592
+ for (t = 0, n = Object.getOwnPropertyNames(e); t < n.length; t++)
1593
+ Object.hasOwnProperty.call(s, r = n[t]) && s[r] === e[r] || ot(s, r, Object.getOwnPropertyDescriptor(e, r));
1594
+ }
1595
+ return s || e;
1596
+ }
1597
+ function bt(e) {
1598
+ return typeof e != "string" ? [] : e.split(".");
1599
+ }
1600
+ function Z(e, t) {
1601
+ const r = bt(e);
1602
+ if (r.length === 0 || typeof t != "object" || t === null)
1603
+ return;
1604
+ let n = t[r[0]];
1605
+ for (let s = 1; s < r.length && n != null; s += 1)
1606
+ n = n[r[s]];
1607
+ return n;
1608
+ }
1609
+ function ge(e, t, r) {
1610
+ const n = bt(e);
1611
+ if (n.length === 0)
1612
+ return r;
1613
+ const s = le(r);
1614
+ if (n.length === 1)
1615
+ return s[n[0]] = t, s;
1616
+ let i = s[n[0]];
1617
+ for (let a = 1; a < n.length - 1; a += 1) {
1618
+ if (i === void 0)
1619
+ return s;
1620
+ i = i[n[a]];
1621
+ }
1622
+ return i[n[n.length - 1]] = t, s;
1623
+ }
1624
+ function $r(e, { from: t, to: r }, n) {
1625
+ const s = Z(e, n);
1626
+ if (!Array.isArray(s))
1627
+ return n;
1628
+ const i = [...s], a = s[t];
1629
+ return i.splice(t, 1), i.splice(r, 0, a), ge(e, i, n);
1630
+ }
1631
+ function Sr(e, t, r, n) {
1632
+ const s = Z(e, n);
1633
+ if (!Array.isArray(s))
1634
+ return n;
1635
+ const i = [...s];
1636
+ return i.splice(typeof r == "number" ? r : i.length, 0, t), ge(e, i, n);
1637
+ }
1638
+ function xr(e, t, r) {
1639
+ const n = Z(e, r);
1640
+ return Array.isArray(n) ? ge(
1641
+ e,
1642
+ n.filter((s, i) => i !== t),
1643
+ r
1644
+ ) : r;
1645
+ }
1646
+ function Dr(e, t, r, n) {
1647
+ const s = Z(e, n);
1648
+ if (!Array.isArray(s) || s.length <= r)
1649
+ return n;
1650
+ const i = [...s];
1651
+ return i[r] = t, ge(e, i, n);
1652
+ }
1653
+ function jr({
1654
+ $values: e,
1655
+ $errors: t,
1656
+ $status: r
1657
+ }) {
1658
+ const n = P((c, u) => {
1659
+ r.clearFieldDirty(c), t.setErrors((f) => gr(c, u, f)), e.setValues({
1660
+ values: $r(c, u, e.refValues.current),
1661
+ updateState: !0
1662
+ });
1663
+ }, []), s = P((c, u) => {
1664
+ r.clearFieldDirty(c), t.setErrors((f) => st(c, u, f, -1)), e.setValues({
1665
+ values: xr(c, u, e.refValues.current),
1666
+ updateState: !0
1667
+ });
1668
+ }, []), i = P((c, u, f) => {
1669
+ r.clearFieldDirty(c), t.setErrors((D) => st(c, f, D, 1)), e.setValues({
1670
+ values: Sr(c, u, f, e.refValues.current),
1671
+ updateState: !0
1672
+ });
1673
+ }, []), a = P((c, u, f) => {
1674
+ r.clearFieldDirty(c), e.setValues({
1675
+ values: Dr(c, f, u, e.refValues.current),
1676
+ updateState: !0
1677
+ });
1678
+ }, []);
1679
+ return { reorderListItem: n, removeListItem: s, insertListItem: i, replaceListItem: a };
1680
+ }
1681
+ var Ie, it;
1682
+ function wr() {
1683
+ return it || (it = 1, Ie = function e(t, r) {
1684
+ if (t === r) return !0;
1685
+ if (t && r && typeof t == "object" && typeof r == "object") {
1686
+ if (t.constructor !== r.constructor) return !1;
1687
+ var n, s, i;
1688
+ if (Array.isArray(t)) {
1689
+ if (n = t.length, n != r.length) return !1;
1690
+ for (s = n; s-- !== 0; )
1691
+ if (!e(t[s], r[s])) return !1;
1692
+ return !0;
1693
+ }
1694
+ if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;
1695
+ if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf();
1696
+ if (t.toString !== Object.prototype.toString) return t.toString() === r.toString();
1697
+ if (i = Object.keys(t), n = i.length, n !== Object.keys(r).length) return !1;
1698
+ for (s = n; s-- !== 0; )
1699
+ if (!Object.prototype.hasOwnProperty.call(r, i[s])) return !1;
1700
+ for (s = n; s-- !== 0; ) {
1701
+ var a = i[s];
1702
+ if (!e(t[a], r[a])) return !1;
1703
+ }
1704
+ return !0;
1705
+ }
1706
+ return t !== t && r !== r;
1707
+ }), Ie;
1708
+ }
1709
+ var Er = wr();
1710
+ const je = /* @__PURE__ */ Ve(Er);
1711
+ function ye(e, t) {
1712
+ const r = Object.keys(e);
1713
+ if (typeof t == "string") {
1714
+ const n = r.filter((s) => s.startsWith(`${t}.`));
1715
+ return e[t] || n.some((s) => e[s]) || !1;
1716
+ }
1717
+ return r.some((n) => e[n]);
1718
+ }
1719
+ function _r({
1720
+ initialDirty: e,
1721
+ initialTouched: t,
1722
+ mode: r,
1723
+ $values: n
1724
+ }) {
1725
+ const [s, i] = ee(t), [a, c] = ee(e), u = se(t), f = se(e), D = P((S) => {
1726
+ const A = typeof S == "function" ? S(u.current) : S;
1727
+ u.current = A, r === "controlled" && i(A);
1728
+ }, []), g = P(
1729
+ (S, A = !1) => {
1730
+ const I = typeof S == "function" ? S(f.current) : S;
1731
+ f.current = I, (r === "controlled" || A) && c(I);
1732
+ },
1733
+ []
1734
+ ), j = P(() => D({}), []), V = P((S) => {
1735
+ const A = S ? { ...n.refValues.current, ...S } : n.refValues.current;
1736
+ n.setValuesSnapshot(A), g({});
1737
+ }, []), _ = P((S, A) => {
1738
+ D((I) => ye(I, S) === A ? I : { ...I, [S]: A });
1739
+ }, []), T = P((S, A, I) => {
1740
+ g((N) => ye(N, S) === A ? N : { ...N, [S]: A }, I);
1741
+ }, []), h = P((S, A) => {
1742
+ const I = ye(f.current, S), N = !je(Z(S, n.getValuesSnapshot()), A), L = Ue(S, f.current);
1743
+ L[S] = N, g(L, I !== N);
1744
+ }, []), $ = P(
1745
+ (S) => ye(u.current, S),
1746
+ []
1747
+ ), k = P(
1748
+ (S) => g((A) => {
1749
+ if (typeof S != "string")
1750
+ return A;
1751
+ const I = Ue(S, A);
1752
+ return delete I[S], je(I, A) ? A : I;
1753
+ }),
1754
+ []
1755
+ ), z = P((S) => {
1756
+ if (S) {
1757
+ const I = Z(S, f.current);
1758
+ if (typeof I == "boolean")
1759
+ return I;
1760
+ const N = Z(S, n.refValues.current), L = Z(S, n.valuesSnapshot.current);
1761
+ return !je(N, L);
1762
+ }
1763
+ return Object.keys(f.current).length > 0 ? ye(f.current) : !je(n.refValues.current, n.valuesSnapshot.current);
1764
+ }, []), Y = P(() => f.current, []), R = P(() => u.current, []);
1765
+ return {
1766
+ touchedState: s,
1767
+ dirtyState: a,
1768
+ touchedRef: u,
1769
+ dirtyRef: f,
1770
+ setTouched: D,
1771
+ setDirty: g,
1772
+ resetDirty: V,
1773
+ resetTouched: j,
1774
+ isTouched: $,
1775
+ setFieldTouched: _,
1776
+ setFieldDirty: T,
1777
+ setTouchedState: i,
1778
+ setDirtyState: c,
1779
+ clearFieldDirty: k,
1780
+ isDirty: z,
1781
+ getDirty: Y,
1782
+ getTouched: R,
1783
+ setCalculatedFieldDirty: h
1784
+ };
1785
+ }
1786
+ function kr({
1787
+ initialValues: e,
1788
+ onValuesChange: t,
1789
+ mode: r
1790
+ }) {
1791
+ const n = se(!1), [s, i] = ee(e || {}), a = se(s), c = se(s), u = P(
1792
+ ({
1793
+ values: h,
1794
+ subscribers: $,
1795
+ updateState: k = !0,
1796
+ mergeWithPreviousValues: z = !0
1797
+ }) => {
1798
+ const Y = a.current, R = h instanceof Function ? h(a.current) : h, S = z ? { ...Y, ...R } : R;
1799
+ a.current = S, k && (i(S), r === "uncontrolled" && (a.current = S)), t?.(S, Y), $?.filter(Boolean).forEach((A) => A({ updatedValues: S, previousValues: Y }));
1800
+ },
1801
+ [t]
1802
+ ), f = P(
1803
+ (h) => {
1804
+ const $ = Z(h.path, a.current), k = h.value instanceof Function ? h.value($) : h.value;
1805
+ if ($ !== k) {
1806
+ const z = a.current, Y = ge(h.path, k, a.current);
1807
+ u({ values: Y, updateState: h.updateState }), h.subscribers?.filter(Boolean).forEach(
1808
+ (R) => R({ path: h.path, updatedValues: Y, previousValues: z })
1809
+ );
1810
+ }
1811
+ },
1812
+ [u]
1813
+ ), D = P((h) => {
1814
+ c.current = h;
1815
+ }, []), g = P(
1816
+ (h, $) => {
1817
+ n.current || (n.current = !0, u({ values: h, updateState: r === "controlled" }), D(h), $());
1818
+ },
1819
+ [u]
1820
+ ), j = P(() => {
1821
+ u({
1822
+ values: c.current,
1823
+ updateState: !0,
1824
+ mergeWithPreviousValues: !1
1825
+ });
1826
+ }, [u]), V = P(() => a.current, []), _ = P(() => c.current, []), T = P(
1827
+ (h, $) => {
1828
+ const k = Z(h, c.current);
1829
+ typeof k > "u" || f({
1830
+ path: h,
1831
+ value: k,
1832
+ updateState: r === "controlled",
1833
+ subscribers: $
1834
+ });
1835
+ },
1836
+ [f, r]
1837
+ );
1838
+ return {
1839
+ initialized: n,
1840
+ stateValues: s,
1841
+ refValues: a,
1842
+ valuesSnapshot: c,
1843
+ setValues: u,
1844
+ setFieldValue: f,
1845
+ resetValues: j,
1846
+ setValuesSnapshot: D,
1847
+ initialize: g,
1848
+ getValues: V,
1849
+ getValuesSnapshot: _,
1850
+ resetField: T
1851
+ };
1852
+ }
1853
+ function Or({
1854
+ $status: e,
1855
+ cascadeUpdates: t
1856
+ }) {
1857
+ const r = se(
1858
+ {}
1859
+ ), n = P((i, a) => {
1860
+ ie(() => (r.current[i] = r.current[i] || [], r.current[i].push(a), () => {
1861
+ r.current[i] = r.current[i].filter((c) => c !== a);
1862
+ }), [a]);
1863
+ }, []), s = P((i) => {
1864
+ const a = r.current[i]?.map(
1865
+ (c) => (u) => c({
1866
+ previousValue: Z(i, u.previousValues),
1867
+ value: Z(i, u.updatedValues),
1868
+ touched: e.isTouched(i),
1869
+ dirty: e.isDirty(i)
1870
+ })
1871
+ ) ?? [];
1872
+ if (t)
1873
+ for (const c in r.current)
1874
+ (c.startsWith(`${i}.`) || i.startsWith(`${c}.`)) && a.push(
1875
+ ...r.current[c].map(
1876
+ (u) => (f) => u({
1877
+ previousValue: Z(c, f.previousValues),
1878
+ value: Z(c, f.updatedValues),
1879
+ touched: e.isTouched(c),
1880
+ dirty: e.isDirty(c)
1881
+ })
1882
+ )
1883
+ );
1884
+ return a;
1885
+ }, []);
1886
+ return {
1887
+ subscribers: r,
1888
+ watch: n,
1889
+ getFieldSubscribers: s
1890
+ };
1891
+ }
1892
+ function at(e, t) {
1893
+ return e ? `${e}-${t.toString()}` : t.toString();
1894
+ }
1895
+ const we = Symbol("root-rule");
1896
+ function ct(e) {
1897
+ const t = Ke(e);
1898
+ return { hasErrors: Object.keys(t).length > 0, errors: t };
1899
+ }
1900
+ function We(e, t, r = "", n = {}) {
1901
+ return typeof e != "object" || e === null ? n : Object.keys(e).reduce((s, i) => {
1902
+ const a = e[i], c = `${r === "" ? "" : `${r}.`}${i}`, u = Z(c, t);
1903
+ let f = !1;
1904
+ return typeof a == "function" && (s[c] = a(u, t, c)), typeof a == "object" && Array.isArray(u) && (f = !0, u.forEach(
1905
+ (D, g) => We(a, t, `${c}.${g}`, s)
1906
+ ), we in a && (s[c] = a[we](u, t, c))), typeof a == "object" && typeof u == "object" && u !== null && (f || We(a, t, c, s), we in a && (s[c] = a[we](u, t, c))), s;
1907
+ }, n);
1908
+ }
1909
+ function Ne(e, t) {
1910
+ return ct(typeof e == "function" ? e(t) : We(e, t));
1911
+ }
1912
+ function Ee(e, t, r) {
1913
+ if (typeof e != "string")
1914
+ return { hasError: !1, error: null };
1915
+ const n = Ne(t, r), s = Object.keys(n.errors).find(
1916
+ (i) => e.split(".").every((a, c) => a === i.split(".")[c])
1917
+ );
1918
+ return { hasError: !!s, error: s ? n.errors[s] : null };
1919
+ }
1920
+ const Mr = "__MANTINE_FORM_INDEX__";
1921
+ function ut(e, t) {
1922
+ return t ? typeof t == "boolean" ? t : Array.isArray(t) ? t.includes(e.replace(/[.][0-9]+/g, `.${Mr}`)) : !1 : !1;
1923
+ }
1924
+ function gt({
1925
+ name: e,
1926
+ mode: t = "controlled",
1927
+ initialValues: r,
1928
+ initialErrors: n = {},
1929
+ initialDirty: s = {},
1930
+ initialTouched: i = {},
1931
+ clearInputErrorOnChange: a = !0,
1932
+ validateInputOnChange: c = !1,
1933
+ validateInputOnBlur: u = !1,
1934
+ onValuesChange: f,
1935
+ transformValues: D = ((h) => h),
1936
+ enhanceGetInputProps: g,
1937
+ validate: j,
1938
+ onSubmitPreventDefault: V = "always",
1939
+ touchTrigger: _ = "change",
1940
+ cascadeUpdates: T = !1
1941
+ } = {}) {
1942
+ const h = br(n), $ = kr({ initialValues: r, onValuesChange: f, mode: t }), k = _r({ initialDirty: s, initialTouched: i, $values: $, mode: t }), z = jr({ $values: $, $errors: h, $status: k }), Y = Or({ $status: k, cascadeUpdates: T }), [R, S] = ee(0), [A, I] = ee({}), [N, L] = ee(!1), F = P(() => {
1943
+ $.resetValues(), h.clearErrors(), k.resetDirty(), k.resetTouched(), t === "uncontrolled" && S((p) => p + 1);
1944
+ }, []), te = P(
1945
+ (p) => {
1946
+ a && h.clearErrors(), t === "uncontrolled" && S((E) => E + 1), Object.keys(Y.subscribers.current).forEach((E) => {
1947
+ const U = Z(E, $.refValues.current), K = Z(E, p);
1948
+ U !== K && Y.getFieldSubscribers(E).forEach((B) => B({ previousValues: p, updatedValues: $.refValues.current }));
1949
+ });
1950
+ },
1951
+ [a]
1952
+ ), ae = P(
1953
+ (p) => {
1954
+ const E = $.refValues.current;
1955
+ $.initialize(p, () => t === "uncontrolled" && S((U) => U + 1)), te(E);
1956
+ },
1957
+ [te]
1958
+ ), w = P(
1959
+ (p, E, U) => {
1960
+ const K = ut(p, c), B = E instanceof Function ? E(Z(p, $.refValues.current)) : E;
1961
+ k.setCalculatedFieldDirty(p, B), _ === "change" && k.setFieldTouched(p, !0), !K && a && h.clearFieldError(p), $.setFieldValue({
1962
+ path: p,
1963
+ value: E,
1964
+ updateState: t === "controlled",
1965
+ subscribers: [
1966
+ ...Y.getFieldSubscribers(p),
1967
+ K ? (re) => {
1968
+ const G = Ee(p, j, re.updatedValues);
1969
+ G.hasError ? h.setFieldError(p, G.error) : h.clearFieldError(p);
1970
+ } : null,
1971
+ U?.forceUpdate !== !1 && t !== "controlled" ? () => I((re) => ({
1972
+ ...re,
1973
+ [p]: (re[p] || 0) + 1
1974
+ })) : null
1975
+ ]
1976
+ });
1977
+ },
1978
+ [f, j]
1979
+ ), v = P(
1980
+ (p) => {
1981
+ const E = $.refValues.current;
1982
+ $.setValues({ values: p, updateState: t === "controlled" }), te(E);
1983
+ },
1984
+ [f, te]
1985
+ ), m = P(() => {
1986
+ const p = Ne(j, $.refValues.current);
1987
+ return h.setErrors(p.errors), p;
1988
+ }, [j]), x = P(
1989
+ (p) => {
1990
+ const E = Ee(p, j, $.refValues.current);
1991
+ return E.hasError ? h.setFieldError(p, E.error) : h.clearFieldError(p), E;
1992
+ },
1993
+ [j]
1994
+ ), y = (p, { type: E = "input", withError: U = !0, withFocus: K = !0, ...B } = {}) => {
1995
+ const G = { onChange: vr(
1996
+ ($e) => w(p, $e, { forceUpdate: !1 })
1997
+ ), "data-path": at(e, p) };
1998
+ return U && (G.error = h.errorsState[p]), E === "checkbox" ? G[t === "controlled" ? "checked" : "defaultChecked"] = Z(
1999
+ p,
2000
+ $.refValues.current
2001
+ ) : G[t === "controlled" ? "value" : "defaultValue"] = Z(
2002
+ p,
2003
+ $.refValues.current
2004
+ ), K && (G.onFocus = () => k.setFieldTouched(p, !0), G.onBlur = () => {
2005
+ if (ut(p, u)) {
2006
+ const $e = Ee(p, j, $.refValues.current);
2007
+ $e.hasError ? h.setFieldError(p, $e.error) : h.clearFieldError(p);
2008
+ }
2009
+ }), Object.assign(
2010
+ G,
2011
+ g?.({
2012
+ inputProps: G,
2013
+ field: p,
2014
+ options: { type: E, withError: U, withFocus: K, ...B },
2015
+ form: Q
2016
+ })
2017
+ );
2018
+ }, M = (p, E) => (U) => {
2019
+ V === "always" && U?.preventDefault();
2020
+ const K = m();
2021
+ if (K.hasErrors)
2022
+ V === "validation-failed" && U?.preventDefault(), E?.(K.errors, $.refValues.current, U);
2023
+ else {
2024
+ const B = p?.(
2025
+ D($.refValues.current),
2026
+ U
2027
+ );
2028
+ B instanceof Promise && (L(!0), B.finally(() => L(!1)));
2029
+ }
2030
+ }, o = (p) => D(p || $.refValues.current), b = P((p) => {
2031
+ p.preventDefault(), F();
2032
+ }, []), O = P(
2033
+ (p) => p ? !Ee(p, j, $.refValues.current).hasError : !Ne(j, $.refValues.current).hasErrors,
2034
+ [j]
2035
+ ), C = (p) => `${R}-${String(p)}-${A[String(p)] || 0}`, W = P(
2036
+ (p) => document.querySelector(`[data-path="${at(e, p)}"]`),
2037
+ []
2038
+ ), q = P(
2039
+ (p) => {
2040
+ $.resetField(p, [
2041
+ t !== "controlled" ? () => I((E) => ({
2042
+ ...E,
2043
+ [p]: (E[p] || 0) + 1
2044
+ })) : null
2045
+ ]);
2046
+ },
2047
+ [$.resetField, t, I]
2048
+ ), Q = {
2049
+ watch: Y.watch,
2050
+ initialized: $.initialized.current,
2051
+ values: t === "uncontrolled" ? $.refValues.current : $.stateValues,
2052
+ getValues: $.getValues,
2053
+ getInitialValues: $.getValuesSnapshot,
2054
+ setInitialValues: $.setValuesSnapshot,
2055
+ resetField: q,
2056
+ initialize: ae,
2057
+ setValues: v,
2058
+ setFieldValue: w,
2059
+ submitting: N,
2060
+ setSubmitting: L,
2061
+ errors: h.errorsState,
2062
+ setErrors: h.setErrors,
2063
+ setFieldError: h.setFieldError,
2064
+ clearFieldError: h.clearFieldError,
2065
+ clearErrors: h.clearErrors,
2066
+ resetDirty: k.resetDirty,
2067
+ setTouched: k.setTouched,
2068
+ setDirty: k.setDirty,
2069
+ isTouched: k.isTouched,
2070
+ resetTouched: k.resetTouched,
2071
+ isDirty: k.isDirty,
2072
+ getTouched: k.getTouched,
2073
+ getDirty: k.getDirty,
2074
+ reorderListItem: z.reorderListItem,
2075
+ insertListItem: z.insertListItem,
2076
+ removeListItem: z.removeListItem,
2077
+ replaceListItem: z.replaceListItem,
2078
+ reset: F,
2079
+ validate: m,
2080
+ validateField: x,
2081
+ getInputProps: y,
2082
+ onSubmit: M,
2083
+ onReset: b,
2084
+ isValid: O,
2085
+ getTransformedValues: o,
2086
+ key: C,
2087
+ getInputNode: W
2088
+ };
2089
+ return Tr(e, Q), Q;
2090
+ }
2091
+ const Pr = ({ tzRange: e }) => {
2092
+ const t = gt({
2093
+ initialValues: {
2094
+ date: Tt(),
2095
+ time: pe(),
2096
+ duration: vt.OneDay
2097
+ },
2098
+ validate: {
2099
+ date: (n) => n ? null : "Date is required",
2100
+ time: (n) => n ? null : "Time is required",
2101
+ duration: (n) => n ? null : "Duration is required"
2102
+ }
2103
+ }), r = (n) => {
2104
+ if (!e.timezone.name) return;
2105
+ const s = Te(n.date, n.time, e.timezone.name), i = ve(s, e.timezone.name), { startDate: a, startTime: c, endDate: u, endTime: f } = hr(
2106
+ i.date,
2107
+ i.time,
2108
+ n.duration
2109
+ );
2110
+ e.onApply({
2111
+ startDate: a,
2112
+ startTime: c,
2113
+ endDate: u,
2114
+ endTime: f,
2115
+ timezone: e.timezone
2116
+ });
2117
+ };
2118
+ return /* @__PURE__ */ l.jsx(H, { direction: "column", flex: 2, justify: "space-between", style: { height: "100%" }, px: 12, children: /* @__PURE__ */ l.jsxs("form", { className: He["form-container"], onSubmit: t.onSubmit(r), children: [
2119
+ /* @__PURE__ */ l.jsxs(oe, { children: [
2120
+ /* @__PURE__ */ l.jsx(X, { fw: 600, children: "Around a time" }),
2121
+ /* @__PURE__ */ l.jsxs(H, { direction: "column", gap: 8, mt: 12, children: [
2122
+ /* @__PURE__ */ l.jsx(
2123
+ ze,
2124
+ {
2125
+ label: "Pick date",
2126
+ placeholder: "Pick date",
2127
+ ...t.getInputProps("date"),
2128
+ popoverProps: { withinPortal: !1 },
2129
+ valueFormat: ne,
2130
+ leftSection: /* @__PURE__ */ l.jsx(Ye, { stroke: 1.5 })
2131
+ },
2132
+ t.key("date")
2133
+ ),
2134
+ /* @__PURE__ */ l.jsx(
2135
+ Re,
2136
+ {
2137
+ label: "Pick time",
2138
+ placeholder: "Pick time",
2139
+ withSeconds: !0,
2140
+ ...t.getInputProps("time"),
2141
+ leftSection: /* @__PURE__ */ l.jsx(Pe, { stroke: 1.5 }),
2142
+ rightSection: /* @__PURE__ */ l.jsx(X, { style: { fontSize: 12, fontStyle: "italic", textAlign: "right" }, children: e.timezone?.longName }),
2143
+ rightSectionWidth: 180,
2144
+ rightSectionProps: {
2145
+ style: {
2146
+ paddingRight: 1
2147
+ }
2148
+ }
2149
+ },
2150
+ t.key("time")
2151
+ ),
2152
+ /* @__PURE__ */ l.jsx(
2153
+ _t,
2154
+ {
2155
+ label: "Duration",
2156
+ placeholder: "Pick value",
2157
+ data: mr,
2158
+ ...t.getInputProps("duration"),
2159
+ comboboxProps: { withinPortal: !1 }
2160
+ },
2161
+ t.key("duration")
2162
+ )
2163
+ ] })
2164
+ ] }),
2165
+ /* @__PURE__ */ l.jsx(Ze, {})
2166
+ ] }) });
2167
+ }, Vr = ({ tzRange: e }) => {
2168
+ const t = gt({
2169
+ mode: "uncontrolled",
2170
+ initialValues: {
2171
+ startDate: Tt(),
2172
+ startTime: pe(),
2173
+ endDate: ar(30),
2174
+ endTime: pe()
2175
+ },
2176
+ validate: {
2177
+ startDate: (n) => n ? null : "Start date is required",
2178
+ startTime: (n) => n ? null : "Start time is required",
2179
+ endDate: (n, s) => {
2180
+ if (!n) return "End date is required";
2181
+ const i = d(`${s.startDate} ${s.startTime}`), a = d(`${n} ${s.endTime}`);
2182
+ return a.isAfter(i) || a.isSame(i) ? null : "End time must be after start time";
2183
+ },
2184
+ endTime: (n, s) => {
2185
+ if (!n) return "End time is required";
2186
+ const i = d(`${s.startDate} ${s.startTime}`), a = d(`${s.endDate} ${n}`);
2187
+ return a.isAfter(i) || a.isSame(i) ? null : "End time must be after start time";
2188
+ }
2189
+ }
2190
+ }), r = (n) => {
2191
+ if (!e.timezone.name) return;
2192
+ const s = Te(n.startDate, n.startTime, e.timezone.name), i = Te(n.endDate, n.endTime, e.timezone.name), a = ve(s, e.timezone.name), c = ve(i, e.timezone.name);
2193
+ e.onApply({
2194
+ startDate: a.date,
2195
+ startTime: a.time,
2196
+ endDate: c.date,
2197
+ endTime: c.time,
2198
+ timezone: e.timezone
2199
+ });
2200
+ };
2201
+ return /* @__PURE__ */ l.jsx(H, { direction: "column", flex: 2, style: { height: "100%" }, px: 12, children: /* @__PURE__ */ l.jsxs("form", { className: He["form-container"], onSubmit: t.onSubmit(r), children: [
2202
+ /* @__PURE__ */ l.jsxs(oe, { children: [
2203
+ /* @__PURE__ */ l.jsx(X, { fw: 600, children: "Start and end times" }),
2204
+ /* @__PURE__ */ l.jsxs(H, { direction: "column", gap: 8, mt: 12, children: [
2205
+ /* @__PURE__ */ l.jsx(
2206
+ ze,
2207
+ {
2208
+ label: "Start time",
2209
+ ...t.getInputProps("startDate"),
2210
+ popoverProps: { withinPortal: !1 },
2211
+ valueFormat: ne,
2212
+ leftSection: /* @__PURE__ */ l.jsx(Ye, { stroke: 1.5 })
2213
+ },
2214
+ t.key("startDate")
2215
+ ),
2216
+ /* @__PURE__ */ l.jsx(
2217
+ Re,
2218
+ {
2219
+ withSeconds: !0,
2220
+ defaultValue: pe(),
2221
+ ...t.getInputProps("startTime"),
2222
+ leftSection: /* @__PURE__ */ l.jsx(Pe, { stroke: 1.5 }),
2223
+ rightSection: /* @__PURE__ */ l.jsx(X, { style: { fontSize: 12, fontStyle: "italic" }, children: e.timezone?.longName }),
2224
+ rightSectionWidth: 180,
2225
+ rightSectionProps: {
2226
+ style: {
2227
+ paddingRight: 1
2228
+ }
2229
+ }
2230
+ },
2231
+ t.key("startTime")
2232
+ ),
2233
+ /* @__PURE__ */ l.jsx(
2234
+ ze,
2235
+ {
2236
+ label: "End time",
2237
+ ...t.getInputProps("endDate"),
2238
+ popoverProps: { withinPortal: !1 },
2239
+ valueFormat: ne,
2240
+ leftSection: /* @__PURE__ */ l.jsx(Ye, { stroke: 1.5 })
2241
+ },
2242
+ t.key("endDate")
2243
+ ),
2244
+ /* @__PURE__ */ l.jsx(
2245
+ Re,
2246
+ {
2247
+ withSeconds: !0,
2248
+ defaultValue: pe(),
2249
+ ...t.getInputProps("endTime"),
2250
+ leftSection: /* @__PURE__ */ l.jsx(Pe, { stroke: 1.5 }),
2251
+ rightSection: /* @__PURE__ */ l.jsx(X, { style: { fontSize: 12, fontStyle: "italic" }, children: e.timezone?.longName }),
2252
+ rightSectionWidth: 180,
2253
+ rightSectionProps: {
2254
+ style: {
2255
+ paddingRight: 1
2256
+ }
2257
+ }
2258
+ },
2259
+ t.key("endTime")
2260
+ )
2261
+ ] })
2262
+ ] }),
2263
+ /* @__PURE__ */ l.jsx(Ze, {})
2264
+ ] }) });
2265
+ };
2266
+ var Me = /* @__PURE__ */ ((e) => (e.START_END_TIME = "Start and end times", e.AROUND_TIME = "Around a time", e.TIMEZONE = "Time zone", e))(Me || {});
2267
+ const Ar = (e) => {
2268
+ const [t, r] = ee(
2269
+ "Start and end times"
2270
+ /* START_END_TIME */
2271
+ ), { popoverOpened: n, setPopoverOpened: s } = pt(), i = () => {
2272
+ switch (t) {
2273
+ case "Start and end times":
2274
+ return /* @__PURE__ */ l.jsx(Vr, { tzRange: e });
2275
+ case "Around a time":
2276
+ return /* @__PURE__ */ l.jsx(Pr, { tzRange: e });
2277
+ case "Time zone":
2278
+ return /* @__PURE__ */ l.jsx(lr, { tzRange: e });
2279
+ default:
2280
+ return null;
2281
+ }
2282
+ }, a = () => {
2283
+ s((u) => !u);
2284
+ }, c = lt(
2285
+ () => ur(e),
2286
+ [e.startDate, e.startTime, e.endDate, e.endTime, e.timezone]
2287
+ );
2288
+ return /* @__PURE__ */ l.jsxs(Fe, { position: "bottom", shadow: "md", opened: n, onChange: s, children: [
2289
+ /* @__PURE__ */ l.jsx(Fe.Target, { children: /* @__PURE__ */ l.jsx(Le, { onClick: a, children: c }) }),
2290
+ /* @__PURE__ */ l.jsx(Fe.Dropdown, { style: { width: 700, height: 400, padding: 0 }, py: 8, children: /* @__PURE__ */ l.jsxs(H, { style: { height: "100%" }, children: [
2291
+ /* @__PURE__ */ l.jsx(fr, { tzRange: e, setSelectedPanel: r }),
2292
+ i()
2293
+ ] }) })
2294
+ ] });
2295
+ }, Lr = (e) => /* @__PURE__ */ l.jsx(ir, { children: /* @__PURE__ */ l.jsx(Ar, { ...e }) });
2296
+ export {
2297
+ Me as Panel,
2298
+ lr as TimezonePanel,
2299
+ Lr as TimezoneRangePicker
2300
+ };
2301
+ //# sourceMappingURL=index.es.js.map