@theengineerguy/chronos-picker 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +386 -386
- package/dist/index.d.ts +1 -4
- package/dist/index.esm.js +346 -915
- package/dist/index.js +1 -30
- package/dist/{components → src/components}/Calendar.d.ts +4 -0
- package/dist/src/components/Calendar.d.ts.map +1 -0
- package/dist/src/components/DateTimePicker.d.ts.map +1 -0
- package/dist/src/components/TimePicker.d.ts.map +1 -0
- package/dist/src/components/TimezoneSelector.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/{types.d.ts → src/types.d.ts} +23 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/{utils → src/utils}/calendar.d.ts +1 -1
- package/dist/src/utils/calendar.d.ts.map +1 -0
- package/dist/src/utils/timezone.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/package.json +61 -60
- package/dist/components/Calendar.d.ts.map +0 -1
- package/dist/components/DateTimePicker.d.ts.map +0 -1
- package/dist/components/TimePicker.d.ts.map +0 -1
- package/dist/components/TimezoneSelector.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/calendar.d.ts.map +0 -1
- package/dist/utils/timezone.d.ts.map +0 -1
- /package/dist/{components → src/components}/DateTimePicker.d.ts +0 -0
- /package/dist/{components → src/components}/TimePicker.d.ts +0 -0
- /package/dist/{components → src/components}/TimezoneSelector.d.ts +0 -0
- /package/dist/{utils → src/utils}/timezone.d.ts +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,632 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @license React
|
|
6
|
-
* react-jsx-runtime.production.min.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var Ue;
|
|
14
|
-
function xr() {
|
|
15
|
-
if (Ue) return Q;
|
|
16
|
-
Ue = 1;
|
|
17
|
-
var o = Ke, l = Symbol.for("react.element"), d = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, b = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function v(k, y, w) {
|
|
19
|
-
var x, O = {}, C = null, E = null;
|
|
20
|
-
w !== void 0 && (C = "" + w), y.key !== void 0 && (C = "" + y.key), y.ref !== void 0 && (E = y.ref);
|
|
21
|
-
for (x in y) c.call(y, x) && !R.hasOwnProperty(x) && (O[x] = y[x]);
|
|
22
|
-
if (k && k.defaultProps) for (x in y = k.defaultProps, y) O[x] === void 0 && (O[x] = y[x]);
|
|
23
|
-
return { $$typeof: l, type: k, key: C, ref: E, props: O, _owner: b.current };
|
|
24
|
-
}
|
|
25
|
-
return Q.Fragment = d, Q.jsx = v, Q.jsxs = v, Q;
|
|
26
|
-
}
|
|
27
|
-
var ee = {};
|
|
28
|
-
/**
|
|
29
|
-
* @license React
|
|
30
|
-
* react-jsx-runtime.development.js
|
|
31
|
-
*
|
|
32
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the MIT license found in the
|
|
35
|
-
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/
|
|
37
|
-
var Ve;
|
|
38
|
-
function Er() {
|
|
39
|
-
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
-
var o = Ke, l = Symbol.for("react.element"), d = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), k = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), D = Symbol.iterator, F = "@@iterator";
|
|
41
|
-
function P(e) {
|
|
42
|
-
if (e === null || typeof e != "object")
|
|
43
|
-
return null;
|
|
44
|
-
var r = D && e[D] || e[F];
|
|
45
|
-
return typeof r == "function" ? r : null;
|
|
46
|
-
}
|
|
47
|
-
var i = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
-
function n(e) {
|
|
49
|
-
{
|
|
50
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
51
|
-
t[s - 1] = arguments[s];
|
|
52
|
-
T("error", e, t);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function T(e, r, t) {
|
|
56
|
-
{
|
|
57
|
-
var s = i.ReactDebugCurrentFrame, h = s.getStackAddendum();
|
|
58
|
-
h !== "" && (r += "%s", t = t.concat([h]));
|
|
59
|
-
var m = t.map(function(f) {
|
|
60
|
-
return String(f);
|
|
61
|
-
});
|
|
62
|
-
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
var p = !1, G = !1, q = !1, B = !1, Z = !1, X;
|
|
66
|
-
X = Symbol.for("react.module.reference");
|
|
67
|
-
function fe(e) {
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === R || Z || e === b || e === w || e === x || B || e === E || p || G || q || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === O || e.$$typeof === v || e.$$typeof === k || e.$$typeof === y || // This needs to include all possible module reference object
|
|
69
|
-
// types supported by any Flight configuration anywhere since
|
|
70
|
-
// we don't know which Flight build this will end up being used
|
|
71
|
-
// with.
|
|
72
|
-
e.$$typeof === X || e.getModuleId !== void 0));
|
|
73
|
-
}
|
|
74
|
-
function de(e, r, t) {
|
|
75
|
-
var s = e.displayName;
|
|
76
|
-
if (s)
|
|
77
|
-
return s;
|
|
78
|
-
var h = r.displayName || r.name || "";
|
|
79
|
-
return h !== "" ? t + "(" + h + ")" : t;
|
|
80
|
-
}
|
|
81
|
-
function re(e) {
|
|
82
|
-
return e.displayName || "Context";
|
|
83
|
-
}
|
|
84
|
-
function $(e) {
|
|
85
|
-
if (e == null)
|
|
86
|
-
return null;
|
|
87
|
-
if (typeof e.tag == "number" && n("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
|
-
return e.displayName || e.name || null;
|
|
89
|
-
if (typeof e == "string")
|
|
90
|
-
return e;
|
|
91
|
-
switch (e) {
|
|
92
|
-
case c:
|
|
93
|
-
return "Fragment";
|
|
94
|
-
case d:
|
|
95
|
-
return "Portal";
|
|
96
|
-
case R:
|
|
97
|
-
return "Profiler";
|
|
98
|
-
case b:
|
|
99
|
-
return "StrictMode";
|
|
100
|
-
case w:
|
|
101
|
-
return "Suspense";
|
|
102
|
-
case x:
|
|
103
|
-
return "SuspenseList";
|
|
104
|
-
}
|
|
105
|
-
if (typeof e == "object")
|
|
106
|
-
switch (e.$$typeof) {
|
|
107
|
-
case k:
|
|
108
|
-
var r = e;
|
|
109
|
-
return re(r) + ".Consumer";
|
|
110
|
-
case v:
|
|
111
|
-
var t = e;
|
|
112
|
-
return re(t._context) + ".Provider";
|
|
113
|
-
case y:
|
|
114
|
-
return de(e, e.render, "ForwardRef");
|
|
115
|
-
case O:
|
|
116
|
-
var s = e.displayName || null;
|
|
117
|
-
return s !== null ? s : $(e.type) || "Memo";
|
|
118
|
-
case C: {
|
|
119
|
-
var h = e, m = h._payload, f = h._init;
|
|
120
|
-
try {
|
|
121
|
-
return $(f(m));
|
|
122
|
-
} catch {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
var W = Object.assign, V = 0, te, ne, j, g, I, L, ae;
|
|
130
|
-
function Re() {
|
|
131
|
-
}
|
|
132
|
-
Re.__reactDisabledLog = !0;
|
|
133
|
-
function Je() {
|
|
134
|
-
{
|
|
135
|
-
if (V === 0) {
|
|
136
|
-
te = console.log, ne = console.info, j = console.warn, g = console.error, I = console.group, L = console.groupCollapsed, ae = console.groupEnd;
|
|
137
|
-
var e = {
|
|
138
|
-
configurable: !0,
|
|
139
|
-
enumerable: !0,
|
|
140
|
-
value: Re,
|
|
141
|
-
writable: !0
|
|
142
|
-
};
|
|
143
|
-
Object.defineProperties(console, {
|
|
144
|
-
info: e,
|
|
145
|
-
log: e,
|
|
146
|
-
warn: e,
|
|
147
|
-
error: e,
|
|
148
|
-
group: e,
|
|
149
|
-
groupCollapsed: e,
|
|
150
|
-
groupEnd: e
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
V++;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function Ge() {
|
|
157
|
-
{
|
|
158
|
-
if (V--, V === 0) {
|
|
159
|
-
var e = {
|
|
160
|
-
configurable: !0,
|
|
161
|
-
enumerable: !0,
|
|
162
|
-
writable: !0
|
|
163
|
-
};
|
|
164
|
-
Object.defineProperties(console, {
|
|
165
|
-
log: W({}, e, {
|
|
166
|
-
value: te
|
|
167
|
-
}),
|
|
168
|
-
info: W({}, e, {
|
|
169
|
-
value: ne
|
|
170
|
-
}),
|
|
171
|
-
warn: W({}, e, {
|
|
172
|
-
value: j
|
|
173
|
-
}),
|
|
174
|
-
error: W({}, e, {
|
|
175
|
-
value: g
|
|
176
|
-
}),
|
|
177
|
-
group: W({}, e, {
|
|
178
|
-
value: I
|
|
179
|
-
}),
|
|
180
|
-
groupCollapsed: W({}, e, {
|
|
181
|
-
value: L
|
|
182
|
-
}),
|
|
183
|
-
groupEnd: W({}, e, {
|
|
184
|
-
value: ae
|
|
185
|
-
})
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
V < 0 && n("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
var he = i.ReactCurrentDispatcher, ve;
|
|
192
|
-
function oe(e, r, t) {
|
|
193
|
-
{
|
|
194
|
-
if (ve === void 0)
|
|
195
|
-
try {
|
|
196
|
-
throw Error();
|
|
197
|
-
} catch (h) {
|
|
198
|
-
var s = h.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
-
ve = s && s[1] || "";
|
|
200
|
-
}
|
|
201
|
-
return `
|
|
202
|
-
` + ve + e;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
var pe = !1, se;
|
|
206
|
-
{
|
|
207
|
-
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
-
se = new qe();
|
|
209
|
-
}
|
|
210
|
-
function Se(e, r) {
|
|
211
|
-
if (!e || pe)
|
|
212
|
-
return "";
|
|
213
|
-
{
|
|
214
|
-
var t = se.get(e);
|
|
215
|
-
if (t !== void 0)
|
|
216
|
-
return t;
|
|
217
|
-
}
|
|
218
|
-
var s;
|
|
219
|
-
pe = !0;
|
|
220
|
-
var h = Error.prepareStackTrace;
|
|
221
|
-
Error.prepareStackTrace = void 0;
|
|
222
|
-
var m;
|
|
223
|
-
m = he.current, he.current = null, Je();
|
|
224
|
-
try {
|
|
225
|
-
if (r) {
|
|
226
|
-
var f = function() {
|
|
227
|
-
throw Error();
|
|
228
|
-
};
|
|
229
|
-
if (Object.defineProperty(f.prototype, "props", {
|
|
230
|
-
set: function() {
|
|
231
|
-
throw Error();
|
|
232
|
-
}
|
|
233
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
|
-
try {
|
|
235
|
-
Reflect.construct(f, []);
|
|
236
|
-
} catch (N) {
|
|
237
|
-
s = N;
|
|
238
|
-
}
|
|
239
|
-
Reflect.construct(e, [], f);
|
|
240
|
-
} else {
|
|
241
|
-
try {
|
|
242
|
-
f.call();
|
|
243
|
-
} catch (N) {
|
|
244
|
-
s = N;
|
|
245
|
-
}
|
|
246
|
-
e.call(f.prototype);
|
|
247
|
-
}
|
|
248
|
-
} else {
|
|
249
|
-
try {
|
|
250
|
-
throw Error();
|
|
251
|
-
} catch (N) {
|
|
252
|
-
s = N;
|
|
253
|
-
}
|
|
254
|
-
e();
|
|
255
|
-
}
|
|
256
|
-
} catch (N) {
|
|
257
|
-
if (N && s && typeof N.stack == "string") {
|
|
258
|
-
for (var u = N.stack.split(`
|
|
259
|
-
`), M = s.stack.split(`
|
|
260
|
-
`), _ = u.length - 1, S = M.length - 1; _ >= 1 && S >= 0 && u[_] !== M[S]; )
|
|
261
|
-
S--;
|
|
262
|
-
for (; _ >= 1 && S >= 0; _--, S--)
|
|
263
|
-
if (u[_] !== M[S]) {
|
|
264
|
-
if (_ !== 1 || S !== 1)
|
|
265
|
-
do
|
|
266
|
-
if (_--, S--, S < 0 || u[_] !== M[S]) {
|
|
267
|
-
var A = `
|
|
268
|
-
` + u[_].replace(" at new ", " at ");
|
|
269
|
-
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, A), A;
|
|
270
|
-
}
|
|
271
|
-
while (_ >= 1 && S >= 0);
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
} finally {
|
|
276
|
-
pe = !1, he.current = m, Ge(), Error.prepareStackTrace = h;
|
|
277
|
-
}
|
|
278
|
-
var J = e ? e.displayName || e.name : "", z = J ? oe(J) : "";
|
|
279
|
-
return typeof e == "function" && se.set(e, z), z;
|
|
280
|
-
}
|
|
281
|
-
function Ze(e, r, t) {
|
|
282
|
-
return Se(e, !1);
|
|
283
|
-
}
|
|
284
|
-
function Xe(e) {
|
|
285
|
-
var r = e.prototype;
|
|
286
|
-
return !!(r && r.isReactComponent);
|
|
287
|
-
}
|
|
288
|
-
function ie(e, r, t) {
|
|
289
|
-
if (e == null)
|
|
290
|
-
return "";
|
|
291
|
-
if (typeof e == "function")
|
|
292
|
-
return Se(e, Xe(e));
|
|
293
|
-
if (typeof e == "string")
|
|
294
|
-
return oe(e);
|
|
295
|
-
switch (e) {
|
|
296
|
-
case w:
|
|
297
|
-
return oe("Suspense");
|
|
298
|
-
case x:
|
|
299
|
-
return oe("SuspenseList");
|
|
300
|
-
}
|
|
301
|
-
if (typeof e == "object")
|
|
302
|
-
switch (e.$$typeof) {
|
|
303
|
-
case y:
|
|
304
|
-
return Ze(e.render);
|
|
305
|
-
case O:
|
|
306
|
-
return ie(e.type, r, t);
|
|
307
|
-
case C: {
|
|
308
|
-
var s = e, h = s._payload, m = s._init;
|
|
309
|
-
try {
|
|
310
|
-
return ie(m(h), r, t);
|
|
311
|
-
} catch {
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
return "";
|
|
316
|
-
}
|
|
317
|
-
var H = Object.prototype.hasOwnProperty, ke = {}, we = i.ReactDebugCurrentFrame;
|
|
318
|
-
function le(e) {
|
|
319
|
-
if (e) {
|
|
320
|
-
var r = e._owner, t = ie(e.type, e._source, r ? r.type : null);
|
|
321
|
-
we.setExtraStackFrame(t);
|
|
322
|
-
} else
|
|
323
|
-
we.setExtraStackFrame(null);
|
|
324
|
-
}
|
|
325
|
-
function He(e, r, t, s, h) {
|
|
326
|
-
{
|
|
327
|
-
var m = Function.call.bind(H);
|
|
328
|
-
for (var f in e)
|
|
329
|
-
if (m(e, f)) {
|
|
330
|
-
var u = void 0;
|
|
331
|
-
try {
|
|
332
|
-
if (typeof e[f] != "function") {
|
|
333
|
-
var M = Error((s || "React class") + ": " + t + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
-
throw M.name = "Invariant Violation", M;
|
|
335
|
-
}
|
|
336
|
-
u = e[f](r, f, s, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
-
} catch (_) {
|
|
338
|
-
u = _;
|
|
339
|
-
}
|
|
340
|
-
u && !(u instanceof Error) && (le(h), n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", t, f, typeof u), le(null)), u instanceof Error && !(u.message in ke) && (ke[u.message] = !0, le(h), n("Failed %s type: %s", t, u.message), le(null));
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
var Qe = Array.isArray;
|
|
345
|
-
function me(e) {
|
|
346
|
-
return Qe(e);
|
|
347
|
-
}
|
|
348
|
-
function er(e) {
|
|
349
|
-
{
|
|
350
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
|
-
return t;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function rr(e) {
|
|
355
|
-
try {
|
|
356
|
-
return Oe(e), !1;
|
|
357
|
-
} catch {
|
|
358
|
-
return !0;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
function Oe(e) {
|
|
362
|
-
return "" + e;
|
|
363
|
-
}
|
|
364
|
-
function Ce(e) {
|
|
365
|
-
if (rr(e))
|
|
366
|
-
return n("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Oe(e);
|
|
367
|
-
}
|
|
368
|
-
var Pe = i.ReactCurrentOwner, tr = {
|
|
369
|
-
key: !0,
|
|
370
|
-
ref: !0,
|
|
371
|
-
__self: !0,
|
|
372
|
-
__source: !0
|
|
373
|
-
}, Me, Ne;
|
|
374
|
-
function nr(e) {
|
|
375
|
-
if (H.call(e, "ref")) {
|
|
376
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
|
-
if (r && r.isReactWarning)
|
|
378
|
-
return !1;
|
|
379
|
-
}
|
|
380
|
-
return e.ref !== void 0;
|
|
381
|
-
}
|
|
382
|
-
function ar(e) {
|
|
383
|
-
if (H.call(e, "key")) {
|
|
384
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
|
-
if (r && r.isReactWarning)
|
|
386
|
-
return !1;
|
|
387
|
-
}
|
|
388
|
-
return e.key !== void 0;
|
|
389
|
-
}
|
|
390
|
-
function or(e, r) {
|
|
391
|
-
typeof e.ref == "string" && Pe.current;
|
|
392
|
-
}
|
|
393
|
-
function sr(e, r) {
|
|
394
|
-
{
|
|
395
|
-
var t = function() {
|
|
396
|
-
Me || (Me = !0, n("%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://reactjs.org/link/special-props)", r));
|
|
397
|
-
};
|
|
398
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
|
-
get: t,
|
|
400
|
-
configurable: !0
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
function ir(e, r) {
|
|
405
|
-
{
|
|
406
|
-
var t = function() {
|
|
407
|
-
Ne || (Ne = !0, n("%s: `ref` 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://reactjs.org/link/special-props)", r));
|
|
408
|
-
};
|
|
409
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
|
-
get: t,
|
|
411
|
-
configurable: !0
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
var lr = function(e, r, t, s, h, m, f) {
|
|
416
|
-
var u = {
|
|
417
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof: l,
|
|
419
|
-
// Built-in properties that belong on the element
|
|
420
|
-
type: e,
|
|
421
|
-
key: r,
|
|
422
|
-
ref: t,
|
|
423
|
-
props: f,
|
|
424
|
-
// Record the component responsible for creating this element.
|
|
425
|
-
_owner: m
|
|
426
|
-
};
|
|
427
|
-
return u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
428
|
-
configurable: !1,
|
|
429
|
-
enumerable: !1,
|
|
430
|
-
writable: !0,
|
|
431
|
-
value: !1
|
|
432
|
-
}), Object.defineProperty(u, "_self", {
|
|
433
|
-
configurable: !1,
|
|
434
|
-
enumerable: !1,
|
|
435
|
-
writable: !1,
|
|
436
|
-
value: s
|
|
437
|
-
}), Object.defineProperty(u, "_source", {
|
|
438
|
-
configurable: !1,
|
|
439
|
-
enumerable: !1,
|
|
440
|
-
writable: !1,
|
|
441
|
-
value: h
|
|
442
|
-
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
443
|
-
};
|
|
444
|
-
function cr(e, r, t, s, h) {
|
|
445
|
-
{
|
|
446
|
-
var m, f = {}, u = null, M = null;
|
|
447
|
-
t !== void 0 && (Ce(t), u = "" + t), ar(r) && (Ce(r.key), u = "" + r.key), nr(r) && (M = r.ref, or(r, h));
|
|
448
|
-
for (m in r)
|
|
449
|
-
H.call(r, m) && !tr.hasOwnProperty(m) && (f[m] = r[m]);
|
|
450
|
-
if (e && e.defaultProps) {
|
|
451
|
-
var _ = e.defaultProps;
|
|
452
|
-
for (m in _)
|
|
453
|
-
f[m] === void 0 && (f[m] = _[m]);
|
|
454
|
-
}
|
|
455
|
-
if (u || M) {
|
|
456
|
-
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
-
u && sr(f, S), M && ir(f, S);
|
|
458
|
-
}
|
|
459
|
-
return lr(e, u, M, h, s, Pe.current, f);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
var be = i.ReactCurrentOwner, De = i.ReactDebugCurrentFrame;
|
|
463
|
-
function K(e) {
|
|
464
|
-
if (e) {
|
|
465
|
-
var r = e._owner, t = ie(e.type, e._source, r ? r.type : null);
|
|
466
|
-
De.setExtraStackFrame(t);
|
|
467
|
-
} else
|
|
468
|
-
De.setExtraStackFrame(null);
|
|
469
|
-
}
|
|
470
|
-
var ye;
|
|
471
|
-
ye = !1;
|
|
472
|
-
function ge(e) {
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
474
|
-
}
|
|
475
|
-
function Ae() {
|
|
476
|
-
{
|
|
477
|
-
if (be.current) {
|
|
478
|
-
var e = $(be.current.type);
|
|
479
|
-
if (e)
|
|
480
|
-
return `
|
|
481
|
-
|
|
482
|
-
Check the render method of \`` + e + "`.";
|
|
483
|
-
}
|
|
484
|
-
return "";
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function ur(e) {
|
|
488
|
-
return "";
|
|
489
|
-
}
|
|
490
|
-
var $e = {};
|
|
491
|
-
function fr(e) {
|
|
492
|
-
{
|
|
493
|
-
var r = Ae();
|
|
494
|
-
if (!r) {
|
|
495
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
|
-
t && (r = `
|
|
497
|
-
|
|
498
|
-
Check the top-level render call using <` + t + ">.");
|
|
499
|
-
}
|
|
500
|
-
return r;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function Ie(e, r) {
|
|
504
|
-
{
|
|
505
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
506
|
-
return;
|
|
507
|
-
e._store.validated = !0;
|
|
508
|
-
var t = fr(r);
|
|
509
|
-
if ($e[t])
|
|
510
|
-
return;
|
|
511
|
-
$e[t] = !0;
|
|
512
|
-
var s = "";
|
|
513
|
-
e && e._owner && e._owner !== be.current && (s = " It was passed a child from " + $(e._owner.type) + "."), K(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, s), K(null);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
function Fe(e, r) {
|
|
517
|
-
{
|
|
518
|
-
if (typeof e != "object")
|
|
519
|
-
return;
|
|
520
|
-
if (me(e))
|
|
521
|
-
for (var t = 0; t < e.length; t++) {
|
|
522
|
-
var s = e[t];
|
|
523
|
-
ge(s) && Ie(s, r);
|
|
524
|
-
}
|
|
525
|
-
else if (ge(e))
|
|
526
|
-
e._store && (e._store.validated = !0);
|
|
527
|
-
else if (e) {
|
|
528
|
-
var h = P(e);
|
|
529
|
-
if (typeof h == "function" && h !== e.entries)
|
|
530
|
-
for (var m = h.call(e), f; !(f = m.next()).done; )
|
|
531
|
-
ge(f.value) && Ie(f.value, r);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
function dr(e) {
|
|
536
|
-
{
|
|
537
|
-
var r = e.type;
|
|
538
|
-
if (r == null || typeof r == "string")
|
|
539
|
-
return;
|
|
540
|
-
var t;
|
|
541
|
-
if (typeof r == "function")
|
|
542
|
-
t = r.propTypes;
|
|
543
|
-
else if (typeof r == "object" && (r.$$typeof === y || // Note: Memo only checks outer props here.
|
|
544
|
-
// Inner props are checked in the reconciler.
|
|
545
|
-
r.$$typeof === O))
|
|
546
|
-
t = r.propTypes;
|
|
547
|
-
else
|
|
548
|
-
return;
|
|
549
|
-
if (t) {
|
|
550
|
-
var s = $(r);
|
|
551
|
-
He(t, e.props, "prop", s, e);
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !ye) {
|
|
553
|
-
ye = !0;
|
|
554
|
-
var h = $(r);
|
|
555
|
-
n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
|
|
556
|
-
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && n("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
function hr(e) {
|
|
561
|
-
{
|
|
562
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
-
var s = r[t];
|
|
564
|
-
if (s !== "children" && s !== "key") {
|
|
565
|
-
K(e), n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), K(null);
|
|
566
|
-
break;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
e.ref !== null && (K(e), n("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
var We = {};
|
|
573
|
-
function Ye(e, r, t, s, h, m) {
|
|
574
|
-
{
|
|
575
|
-
var f = fe(e);
|
|
576
|
-
if (!f) {
|
|
577
|
-
var u = "";
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
-
var M = ur();
|
|
580
|
-
M ? u += M : u += Ae();
|
|
581
|
-
var _;
|
|
582
|
-
e === null ? _ = "null" : me(e) ? _ = "array" : e !== void 0 && e.$$typeof === l ? (_ = "<" + ($(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, u);
|
|
583
|
-
}
|
|
584
|
-
var S = cr(e, r, t, h, m);
|
|
585
|
-
if (S == null)
|
|
586
|
-
return S;
|
|
587
|
-
if (f) {
|
|
588
|
-
var A = r.children;
|
|
589
|
-
if (A !== void 0)
|
|
590
|
-
if (s)
|
|
591
|
-
if (me(A)) {
|
|
592
|
-
for (var J = 0; J < A.length; J++)
|
|
593
|
-
Fe(A[J], e);
|
|
594
|
-
Object.freeze && Object.freeze(A);
|
|
595
|
-
} else
|
|
596
|
-
n("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
|
-
else
|
|
598
|
-
Fe(A, e);
|
|
599
|
-
}
|
|
600
|
-
if (H.call(r, "key")) {
|
|
601
|
-
var z = $(e), N = Object.keys(r).filter(function(gr) {
|
|
602
|
-
return gr !== "key";
|
|
603
|
-
}), xe = N.length > 0 ? "{key: someKey, " + N.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
-
if (!We[z + xe]) {
|
|
605
|
-
var yr = N.length > 0 ? "{" + N.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
-
n(`A props object containing a "key" prop is being spread into JSX:
|
|
607
|
-
let props = %s;
|
|
608
|
-
<%s {...props} />
|
|
609
|
-
React keys must be passed directly to JSX without using spread:
|
|
610
|
-
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`, xe, z, yr, z), We[z + xe] = !0;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return e === c ? hr(S) : dr(S), S;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function vr(e, r, t) {
|
|
618
|
-
return Ye(e, r, t, !0);
|
|
619
|
-
}
|
|
620
|
-
function pr(e, r, t) {
|
|
621
|
-
return Ye(e, r, t, !1);
|
|
622
|
-
}
|
|
623
|
-
var mr = pr, br = vr;
|
|
624
|
-
ee.Fragment = c, ee.jsx = mr, ee.jsxs = br;
|
|
625
|
-
}()), ee;
|
|
626
|
-
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? _e.exports = xr() : _e.exports = Er();
|
|
628
|
-
var a = _e.exports;
|
|
629
|
-
const Tr = "Asia/Kolkata", ze = [
|
|
1
|
+
import { jsxs as h, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as j, useState as x, useEffect as Z, useRef as q, useCallback as _ } from "react";
|
|
3
|
+
import { DateTime as D } from "luxon";
|
|
4
|
+
const he = "Asia/Kolkata", H = [
|
|
630
5
|
{ value: "Asia/Kolkata", label: "India (IST)" },
|
|
631
6
|
{ value: "America/New_York", label: "Eastern Time (ET)" },
|
|
632
7
|
{ value: "America/Chicago", label: "Central Time (CT)" },
|
|
@@ -640,172 +15,193 @@ const Tr = "Asia/Kolkata", ze = [
|
|
|
640
15
|
{ value: "Australia/Sydney", label: "Sydney (AEDT)" },
|
|
641
16
|
{ value: "UTC", label: "UTC" }
|
|
642
17
|
];
|
|
643
|
-
function
|
|
644
|
-
return
|
|
18
|
+
function I(e, s) {
|
|
19
|
+
return D.isDateTime(e) ? e.setZone(s) : typeof e == "string" ? D.fromISO(e, { zone: s }) : D.fromJSDate(e, { zone: s });
|
|
645
20
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
21
|
+
function U(e) {
|
|
22
|
+
return D.now().setZone(e);
|
|
648
23
|
}
|
|
649
|
-
function
|
|
650
|
-
const
|
|
651
|
-
return `UTC${
|
|
24
|
+
function Q(e) {
|
|
25
|
+
const r = D.now().setZone(e).offset, a = Math.floor(Math.abs(r) / 60), c = Math.abs(r) % 60;
|
|
26
|
+
return `UTC${r >= 0 ? "+" : "-"}${a}${c > 0 ? `:${c.toString().padStart(2, "0")}` : ""}`;
|
|
652
27
|
}
|
|
653
|
-
function
|
|
654
|
-
const v =
|
|
655
|
-
{ year:
|
|
656
|
-
{ zone:
|
|
657
|
-
),
|
|
658
|
-
let
|
|
659
|
-
for (;
|
|
660
|
-
const
|
|
661
|
-
let i = !1;
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
28
|
+
function me(e, s, r, a, c, b, d, f) {
|
|
29
|
+
const v = D.fromObject(
|
|
30
|
+
{ year: e, month: s, day: 1 },
|
|
31
|
+
{ zone: r }
|
|
32
|
+
), M = v.startOf("week"), P = v.endOf("month").endOf("week"), z = D.now().setZone(r).startOf("day"), A = d != null && f != null, S = d == null ? void 0 : d.startOf("day"), C = f == null ? void 0 : f.endOf("day"), E = [];
|
|
33
|
+
let n = [], l = M;
|
|
34
|
+
for (; l <= P; ) {
|
|
35
|
+
const y = l.month === s, T = l.hasSame(z, "day"), g = l.startOf("day");
|
|
36
|
+
let t = !1, m = !1, i = !1, O = !1;
|
|
37
|
+
A && S && C ? (i = g.hasSame(S, "day"), O = g.hasSame(C, "day"), m = g >= S && g <= C || i || O, t = i || O) : a && (t = l.hasSame(a, "day"));
|
|
38
|
+
let N = !1;
|
|
39
|
+
c && l < c.startOf("day") && (N = !0), b && l > b.endOf("day") && (N = !0), n.push({
|
|
40
|
+
date: l,
|
|
41
|
+
isCurrentMonth: y,
|
|
42
|
+
isToday: T,
|
|
43
|
+
isSelected: t,
|
|
44
|
+
isDisabled: N,
|
|
45
|
+
isInRange: m,
|
|
46
|
+
isRangeStart: i,
|
|
47
|
+
isRangeEnd: O
|
|
48
|
+
}), n.length === 7 && (E.push(n), n = []), l = l.plus({ days: 1 });
|
|
669
49
|
}
|
|
670
|
-
return
|
|
50
|
+
return E;
|
|
671
51
|
}
|
|
672
|
-
function
|
|
673
|
-
const
|
|
674
|
-
for (let
|
|
675
|
-
const
|
|
676
|
-
|
|
52
|
+
function ue() {
|
|
53
|
+
const e = D.now().startOf("week"), s = [];
|
|
54
|
+
for (let r = 0; r < 7; r++) {
|
|
55
|
+
const a = e.plus({ days: r });
|
|
56
|
+
s.push(a.toFormat("ccc"));
|
|
677
57
|
}
|
|
678
|
-
return
|
|
58
|
+
return s;
|
|
679
59
|
}
|
|
680
|
-
function
|
|
681
|
-
const
|
|
682
|
-
for (let
|
|
683
|
-
const
|
|
684
|
-
|
|
60
|
+
function fe() {
|
|
61
|
+
const e = [];
|
|
62
|
+
for (let s = 1; s <= 12; s++) {
|
|
63
|
+
const r = D.fromObject({ month: s });
|
|
64
|
+
e.push(r.toFormat("MMMM"));
|
|
685
65
|
}
|
|
686
|
-
return
|
|
66
|
+
return e;
|
|
687
67
|
}
|
|
688
|
-
const
|
|
689
|
-
viewDate:
|
|
690
|
-
selectedDate:
|
|
691
|
-
onDateSelect:
|
|
692
|
-
onViewDateChange:
|
|
693
|
-
timezone:
|
|
694
|
-
minDate:
|
|
695
|
-
maxDate:
|
|
68
|
+
const pe = ({
|
|
69
|
+
viewDate: e,
|
|
70
|
+
selectedDate: s,
|
|
71
|
+
onDateSelect: r,
|
|
72
|
+
onViewDateChange: a,
|
|
73
|
+
timezone: c,
|
|
74
|
+
minDate: b,
|
|
75
|
+
maxDate: d,
|
|
76
|
+
selectedStart: f,
|
|
77
|
+
selectedEnd: v,
|
|
78
|
+
onRangeSelect: M
|
|
696
79
|
}) => {
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
|
|
80
|
+
const R = M != null, P = j(() => me(
|
|
81
|
+
e.year,
|
|
82
|
+
e.month,
|
|
83
|
+
c,
|
|
84
|
+
s ?? void 0,
|
|
700
85
|
b,
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
v
|
|
704
|
-
), [
|
|
705
|
-
|
|
706
|
-
},
|
|
707
|
-
|
|
708
|
-
},
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
},
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
},
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
86
|
+
d,
|
|
87
|
+
f ?? void 0,
|
|
88
|
+
v ?? void 0
|
|
89
|
+
), [e, s, c, b, d, f, v]), z = j(() => ue(), []), A = j(() => fe(), []), S = () => {
|
|
90
|
+
a(e.minus({ months: 1 }));
|
|
91
|
+
}, C = () => {
|
|
92
|
+
a(e.plus({ months: 1 }));
|
|
93
|
+
}, E = (t) => {
|
|
94
|
+
const m = parseInt(t.target.value, 10);
|
|
95
|
+
a(e.set({ month: m }));
|
|
96
|
+
}, n = (t) => {
|
|
97
|
+
const m = parseInt(t.target.value, 10);
|
|
98
|
+
a(e.set({ year: m }));
|
|
99
|
+
}, l = (t, m) => {
|
|
100
|
+
if (!m)
|
|
101
|
+
if (R && M) {
|
|
102
|
+
const i = t.startOf("day");
|
|
103
|
+
if (f == null)
|
|
104
|
+
M(t, t);
|
|
105
|
+
else if (v != null && f.hasSame(v, "day")) {
|
|
106
|
+
const O = f.startOf("day");
|
|
107
|
+
i < O ? M(t, f) : M(f, t);
|
|
108
|
+
} else
|
|
109
|
+
M(t, t);
|
|
110
|
+
} else
|
|
111
|
+
r(t);
|
|
112
|
+
}, y = (t, m, i) => {
|
|
113
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), l(m, i));
|
|
114
|
+
}, T = e.year, g = Array.from({ length: 21 }, (t, m) => T - 10 + m);
|
|
115
|
+
return /* @__PURE__ */ h("div", { className: "chronos-calendar", role: "region", "aria-label": "Calendar", children: [
|
|
116
|
+
/* @__PURE__ */ h("div", { className: "chronos-calendar-header", children: [
|
|
117
|
+
/* @__PURE__ */ o(
|
|
722
118
|
"button",
|
|
723
119
|
{
|
|
724
120
|
type: "button",
|
|
725
121
|
className: "chronos-nav-button",
|
|
726
|
-
onClick:
|
|
122
|
+
onClick: S,
|
|
727
123
|
"aria-label": "Previous month",
|
|
728
124
|
children: "‹"
|
|
729
125
|
}
|
|
730
126
|
),
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ h("div", { className: "chronos-month-year-selectors", children: [
|
|
128
|
+
/* @__PURE__ */ o(
|
|
733
129
|
"select",
|
|
734
130
|
{
|
|
735
131
|
className: "chronos-month-select",
|
|
736
|
-
value:
|
|
737
|
-
onChange:
|
|
132
|
+
value: e.month,
|
|
133
|
+
onChange: E,
|
|
738
134
|
"aria-label": "Select month",
|
|
739
|
-
children:
|
|
135
|
+
children: A.map((t, m) => /* @__PURE__ */ o("option", { value: m + 1, children: t }, m))
|
|
740
136
|
}
|
|
741
137
|
),
|
|
742
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ o(
|
|
743
139
|
"select",
|
|
744
140
|
{
|
|
745
141
|
className: "chronos-year-select",
|
|
746
|
-
value:
|
|
747
|
-
onChange:
|
|
142
|
+
value: e.year,
|
|
143
|
+
onChange: n,
|
|
748
144
|
"aria-label": "Select year",
|
|
749
|
-
children:
|
|
145
|
+
children: g.map((t) => /* @__PURE__ */ o("option", { value: t, children: t }, t))
|
|
750
146
|
}
|
|
751
147
|
)
|
|
752
148
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ o(
|
|
754
150
|
"button",
|
|
755
151
|
{
|
|
756
152
|
type: "button",
|
|
757
153
|
className: "chronos-nav-button",
|
|
758
|
-
onClick:
|
|
154
|
+
onClick: C,
|
|
759
155
|
"aria-label": "Next month",
|
|
760
156
|
children: "›"
|
|
761
157
|
}
|
|
762
158
|
)
|
|
763
159
|
] }),
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
|
|
160
|
+
/* @__PURE__ */ h("div", { className: "chronos-calendar-grid", children: [
|
|
161
|
+
/* @__PURE__ */ o("div", { className: "chronos-weekday-row", children: z.map((t) => /* @__PURE__ */ o("div", { className: "chronos-weekday", children: t }, t)) }),
|
|
162
|
+
P.map((t, m) => /* @__PURE__ */ o("div", { className: "chronos-week-row", children: t.map((i, O) => /* @__PURE__ */ o(
|
|
767
163
|
"button",
|
|
768
164
|
{
|
|
769
165
|
type: "button",
|
|
770
|
-
className: `chronos-day ${
|
|
771
|
-
onClick: () =>
|
|
772
|
-
onKeyDown: (
|
|
773
|
-
disabled:
|
|
774
|
-
"aria-label":
|
|
775
|
-
"aria-selected":
|
|
776
|
-
"aria-current":
|
|
777
|
-
children:
|
|
166
|
+
className: `chronos-day ${i.isSelected ? "selected" : ""} ${i.isToday ? "today" : ""} ${i.isCurrentMonth ? "" : "other-month"} ${i.isDisabled ? "disabled" : ""} ${i.isInRange ? "in-range" : ""} ${i.isRangeStart ? "range-start" : ""} ${i.isRangeEnd ? "range-end" : ""}`,
|
|
167
|
+
onClick: () => l(i.date, i.isDisabled),
|
|
168
|
+
onKeyDown: (N) => y(N, i.date, i.isDisabled),
|
|
169
|
+
disabled: i.isDisabled,
|
|
170
|
+
"aria-label": i.date.toFormat("MMMM d, yyyy"),
|
|
171
|
+
"aria-selected": i.isSelected,
|
|
172
|
+
"aria-current": i.isToday ? "date" : void 0,
|
|
173
|
+
children: i.date.day
|
|
778
174
|
},
|
|
779
|
-
|
|
780
|
-
)) },
|
|
175
|
+
O
|
|
176
|
+
)) }, m))
|
|
781
177
|
] })
|
|
782
178
|
] });
|
|
783
|
-
},
|
|
784
|
-
value:
|
|
785
|
-
onChange:
|
|
786
|
-
use24Hour:
|
|
179
|
+
}, ye = ({
|
|
180
|
+
value: e,
|
|
181
|
+
onChange: s,
|
|
182
|
+
use24Hour: r
|
|
787
183
|
}) => {
|
|
788
|
-
const [
|
|
789
|
-
|
|
184
|
+
const [a, c] = x((e == null ? void 0 : e.hour) ?? 12), [b, d] = x((e == null ? void 0 : e.minute) ?? 0), [f, v] = x(
|
|
185
|
+
e && e.hour >= 12 ? "PM" : "AM"
|
|
790
186
|
);
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}, [
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
let
|
|
797
|
-
|
|
798
|
-
},
|
|
799
|
-
|
|
800
|
-
},
|
|
801
|
-
const
|
|
802
|
-
|
|
803
|
-
let
|
|
804
|
-
|
|
805
|
-
},
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
187
|
+
Z(() => {
|
|
188
|
+
e && (c(e.hour), d(e.minute), v(e.hour >= 12 ? "PM" : "AM"));
|
|
189
|
+
}, [e]);
|
|
190
|
+
const M = (n) => {
|
|
191
|
+
c(n);
|
|
192
|
+
let l = n;
|
|
193
|
+
r || (f === "PM" && n !== 12 ? l = n + 12 : f === "AM" && n === 12 && (l = 0)), s(l, b);
|
|
194
|
+
}, R = (n) => {
|
|
195
|
+
d(n), s(a, n);
|
|
196
|
+
}, P = () => {
|
|
197
|
+
const n = f === "AM" ? "PM" : "AM";
|
|
198
|
+
v(n);
|
|
199
|
+
let l = a;
|
|
200
|
+
n === "PM" && a !== 12 ? l = a + 12 : n === "AM" && a === 12 ? l = 0 : n === "AM" && a > 12 && (l = a - 12), s(l, b);
|
|
201
|
+
}, z = r ? a : a % 12 || 12, A = r ? 23 : 12, S = r ? 0 : 1, C = Array.from({ length: A - S + 1 }, (n, l) => S + l), E = Array.from({ length: 60 }, (n, l) => l);
|
|
202
|
+
return /* @__PURE__ */ h("div", { className: "chronos-time-picker", role: "group", "aria-label": "Time picker", children: [
|
|
203
|
+
/* @__PURE__ */ h("div", { className: "chronos-time-header", children: [
|
|
204
|
+
/* @__PURE__ */ h(
|
|
809
205
|
"svg",
|
|
810
206
|
{
|
|
811
207
|
className: "chronos-clock-icon",
|
|
@@ -815,67 +211,67 @@ const Sr = ({
|
|
|
815
211
|
stroke: "currentColor",
|
|
816
212
|
strokeWidth: "2",
|
|
817
213
|
children: [
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10" }),
|
|
215
|
+
/* @__PURE__ */ o("polyline", { points: "12 6 12 12 16 14" })
|
|
820
216
|
]
|
|
821
217
|
}
|
|
822
218
|
),
|
|
823
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ o("span", { children: "Time" })
|
|
824
220
|
] }),
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ h("div", { className: "chronos-time-controls", children: [
|
|
222
|
+
/* @__PURE__ */ h("div", { className: "chronos-time-input-group", children: [
|
|
223
|
+
/* @__PURE__ */ o("label", { htmlFor: "chronos-hour-select", className: "chronos-time-label", children: "Hour" }),
|
|
224
|
+
/* @__PURE__ */ o(
|
|
829
225
|
"select",
|
|
830
226
|
{
|
|
831
227
|
id: "chronos-hour-select",
|
|
832
228
|
className: "chronos-time-select",
|
|
833
|
-
value:
|
|
834
|
-
onChange: (
|
|
229
|
+
value: z,
|
|
230
|
+
onChange: (n) => M(parseInt(n.target.value, 10)),
|
|
835
231
|
"aria-label": "Select hour",
|
|
836
|
-
children:
|
|
232
|
+
children: C.map((n) => /* @__PURE__ */ o("option", { value: n, children: n.toString().padStart(2, "0") }, n))
|
|
837
233
|
}
|
|
838
234
|
)
|
|
839
235
|
] }),
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ o("span", { className: "chronos-time-separator", children: ":" }),
|
|
237
|
+
/* @__PURE__ */ h("div", { className: "chronos-time-input-group", children: [
|
|
238
|
+
/* @__PURE__ */ o("label", { htmlFor: "chronos-minute-select", className: "chronos-time-label", children: "Minute" }),
|
|
239
|
+
/* @__PURE__ */ o(
|
|
844
240
|
"select",
|
|
845
241
|
{
|
|
846
242
|
id: "chronos-minute-select",
|
|
847
243
|
className: "chronos-time-select",
|
|
848
|
-
value:
|
|
849
|
-
onChange: (
|
|
244
|
+
value: b,
|
|
245
|
+
onChange: (n) => R(parseInt(n.target.value, 10)),
|
|
850
246
|
"aria-label": "Select minute",
|
|
851
|
-
children:
|
|
247
|
+
children: E.map((n) => /* @__PURE__ */ o("option", { value: n, children: n.toString().padStart(2, "0") }, n))
|
|
852
248
|
}
|
|
853
249
|
)
|
|
854
250
|
] }),
|
|
855
|
-
!
|
|
251
|
+
!r && /* @__PURE__ */ o(
|
|
856
252
|
"button",
|
|
857
253
|
{
|
|
858
254
|
type: "button",
|
|
859
255
|
className: "chronos-period-toggle",
|
|
860
|
-
onClick:
|
|
861
|
-
"aria-label": `Switch to ${
|
|
862
|
-
children:
|
|
256
|
+
onClick: P,
|
|
257
|
+
"aria-label": `Switch to ${f === "AM" ? "PM" : "AM"}`,
|
|
258
|
+
children: f
|
|
863
259
|
}
|
|
864
260
|
)
|
|
865
261
|
] })
|
|
866
262
|
] });
|
|
867
|
-
},
|
|
868
|
-
value:
|
|
869
|
-
onChange:
|
|
263
|
+
}, Me = ({
|
|
264
|
+
value: e,
|
|
265
|
+
onChange: s
|
|
870
266
|
}) => {
|
|
871
|
-
const [
|
|
872
|
-
label:
|
|
873
|
-
},
|
|
874
|
-
|
|
267
|
+
const [r, a] = x(!1), c = H.find((d) => d.value === e) || {
|
|
268
|
+
label: e
|
|
269
|
+
}, b = (d) => {
|
|
270
|
+
s(d), a(!1);
|
|
875
271
|
};
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ h("div", { className: "chronos-timezone-selector", children: [
|
|
273
|
+
/* @__PURE__ */ h("div", { className: "chronos-timezone-header", children: [
|
|
274
|
+
/* @__PURE__ */ h(
|
|
879
275
|
"svg",
|
|
880
276
|
{
|
|
881
277
|
className: "chronos-globe-icon",
|
|
@@ -885,167 +281,187 @@ const Sr = ({
|
|
|
885
281
|
stroke: "currentColor",
|
|
886
282
|
strokeWidth: "2",
|
|
887
283
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10" }),
|
|
285
|
+
/* @__PURE__ */ o("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
|
|
286
|
+
/* @__PURE__ */ o("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
891
287
|
]
|
|
892
288
|
}
|
|
893
289
|
),
|
|
894
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ o("span", { children: "Timezone" })
|
|
895
291
|
] }),
|
|
896
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ h(
|
|
897
293
|
"button",
|
|
898
294
|
{
|
|
899
295
|
type: "button",
|
|
900
296
|
className: "chronos-timezone-button",
|
|
901
|
-
onClick: () =>
|
|
902
|
-
"aria-expanded":
|
|
297
|
+
onClick: () => a(!r),
|
|
298
|
+
"aria-expanded": r,
|
|
903
299
|
"aria-label": "Select timezone",
|
|
904
300
|
children: [
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ o("span", { className: "chronos-timezone-label", children: c.label }),
|
|
302
|
+
/* @__PURE__ */ o("span", { className: "chronos-timezone-offset", children: Q(e) }),
|
|
303
|
+
/* @__PURE__ */ o(
|
|
908
304
|
"svg",
|
|
909
305
|
{
|
|
910
|
-
className: `chronos-chevron ${
|
|
306
|
+
className: `chronos-chevron ${r ? "expanded" : ""}`,
|
|
911
307
|
xmlns: "http://www.w3.org/2000/svg",
|
|
912
308
|
viewBox: "0 0 24 24",
|
|
913
309
|
fill: "none",
|
|
914
310
|
stroke: "currentColor",
|
|
915
311
|
strokeWidth: "2",
|
|
916
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ o("polyline", { points: "6 9 12 15 18 9" })
|
|
917
313
|
}
|
|
918
314
|
)
|
|
919
315
|
]
|
|
920
316
|
}
|
|
921
317
|
),
|
|
922
|
-
|
|
318
|
+
r && /* @__PURE__ */ o("div", { className: "chronos-timezone-list", role: "listbox", children: H.map((d) => /* @__PURE__ */ h(
|
|
923
319
|
"button",
|
|
924
320
|
{
|
|
925
321
|
type: "button",
|
|
926
|
-
className: `chronos-timezone-option ${
|
|
927
|
-
onClick: () =>
|
|
322
|
+
className: `chronos-timezone-option ${d.value === e ? "selected" : ""}`,
|
|
323
|
+
onClick: () => b(d.value),
|
|
928
324
|
role: "option",
|
|
929
|
-
"aria-selected":
|
|
325
|
+
"aria-selected": d.value === e,
|
|
930
326
|
children: [
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ o("span", { className: "chronos-timezone-option-label", children: d.label }),
|
|
328
|
+
/* @__PURE__ */ o("span", { className: "chronos-timezone-option-offset", children: Q(d.value) })
|
|
933
329
|
]
|
|
934
330
|
},
|
|
935
|
-
|
|
331
|
+
d.value
|
|
936
332
|
)) })
|
|
937
333
|
] });
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
334
|
+
};
|
|
335
|
+
function X(e, s, r) {
|
|
336
|
+
return {
|
|
337
|
+
iso: e.toISO() || "",
|
|
338
|
+
formatted: e.toFormat(`${s} ${r}`),
|
|
339
|
+
timestamp: e.toMillis(),
|
|
340
|
+
dateTime: e
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
const ke = ({
|
|
344
|
+
value: e,
|
|
345
|
+
onChange: s,
|
|
346
|
+
timezone: r = he,
|
|
347
|
+
dateFormat: a = "DD",
|
|
348
|
+
timeFormat: c = "HH:mm",
|
|
349
|
+
minDate: b,
|
|
350
|
+
maxDate: d,
|
|
351
|
+
placeholder: f = "Select date and time",
|
|
352
|
+
disabled: v = !1,
|
|
353
|
+
showTime: M = !0,
|
|
354
|
+
use24Hour: R = !0,
|
|
355
|
+
className: P = "",
|
|
356
|
+
ariaLabel: z = "Date and time picker",
|
|
357
|
+
showTimezoneSelector: A = !1,
|
|
358
|
+
theme: S = "light",
|
|
359
|
+
orientation: C = "portrait",
|
|
360
|
+
selectionMode: E = "single",
|
|
361
|
+
rangeValue: n,
|
|
362
|
+
onRangeChange: l
|
|
955
363
|
}) => {
|
|
956
|
-
const [
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}, [
|
|
960
|
-
|
|
961
|
-
|
|
364
|
+
const y = E === "range", [T, g] = x(!1), [t, m] = x(() => !y && e ? I(e, r) : null), [i, O] = x(() => y && (n != null && n.start) ? I(n.start, r) : null), [N, Y] = x(() => y && (n != null && n.end) ? I(n.end, r) : null), [k, F] = x(r), [V, W] = x(() => t || i || N || U(r)), K = q(null), G = q(null);
|
|
365
|
+
Z(() => {
|
|
366
|
+
!y && e && m(I(e, k));
|
|
367
|
+
}, [e, k, y]), Z(() => {
|
|
368
|
+
y && (n == null ? void 0 : n.start) != null && (n == null ? void 0 : n.end) != null && (O(I(n.start, k)), Y(I(n.end, k)));
|
|
369
|
+
}, [y, n, k]), Z(() => {
|
|
370
|
+
const p = (u) => {
|
|
371
|
+
K.current && !K.current.contains(u.target) && g(!1);
|
|
962
372
|
};
|
|
963
|
-
if (
|
|
964
|
-
return document.addEventListener("mousedown",
|
|
965
|
-
}, [
|
|
966
|
-
const
|
|
967
|
-
var
|
|
968
|
-
|
|
373
|
+
if (T)
|
|
374
|
+
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
375
|
+
}, [T]), Z(() => {
|
|
376
|
+
const p = (u) => {
|
|
377
|
+
var w;
|
|
378
|
+
u.key === "Escape" && T && (g(!1), (w = G.current) == null || w.focus());
|
|
969
379
|
};
|
|
970
|
-
return document.addEventListener("keydown",
|
|
971
|
-
}, [
|
|
972
|
-
const
|
|
973
|
-
let
|
|
974
|
-
if (
|
|
975
|
-
hour:
|
|
976
|
-
minute:
|
|
977
|
-
second:
|
|
978
|
-
})),
|
|
979
|
-
const
|
|
980
|
-
iso:
|
|
981
|
-
formatted:
|
|
982
|
-
timestamp:
|
|
983
|
-
dateTime:
|
|
380
|
+
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
381
|
+
}, [T]);
|
|
382
|
+
const ee = _((p) => {
|
|
383
|
+
let u = p;
|
|
384
|
+
if (t && (u = p.set({
|
|
385
|
+
hour: t.hour,
|
|
386
|
+
minute: t.minute,
|
|
387
|
+
second: t.second
|
|
388
|
+
})), m(u), W(u), M || g(!1), s) {
|
|
389
|
+
const w = {
|
|
390
|
+
iso: u.toISO() || "",
|
|
391
|
+
formatted: u.toFormat(`${a} ${c}`),
|
|
392
|
+
timestamp: u.toMillis(),
|
|
393
|
+
dateTime: u
|
|
984
394
|
};
|
|
985
|
-
|
|
986
|
-
}
|
|
987
|
-
}, [
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
const
|
|
991
|
-
iso:
|
|
992
|
-
formatted:
|
|
993
|
-
timestamp:
|
|
994
|
-
dateTime:
|
|
395
|
+
s(w);
|
|
396
|
+
}
|
|
397
|
+
}, [t, M, s, a, c]), ne = _((p, u) => {
|
|
398
|
+
const $ = (t || U(k)).set({ hour: p, minute: u, second: 0 });
|
|
399
|
+
if (m($), s) {
|
|
400
|
+
const L = {
|
|
401
|
+
iso: $.toISO() || "",
|
|
402
|
+
formatted: $.toFormat(`${a} ${c}`),
|
|
403
|
+
timestamp: $.toMillis(),
|
|
404
|
+
dateTime: $
|
|
995
405
|
};
|
|
996
|
-
|
|
997
|
-
}
|
|
998
|
-
}, [
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
406
|
+
s(L);
|
|
407
|
+
}
|
|
408
|
+
}, [t, k, s, a, c]), te = _((p, u) => {
|
|
409
|
+
const w = p.startOf("day"), $ = u.startOf("day"), [L, B] = w <= $ ? [w, $] : [$, w];
|
|
410
|
+
if (O(L), Y(B), W(L), l) {
|
|
411
|
+
const le = X(L, a, c), ce = X(B, a, c), de = Math.max(0, Math.ceil(B.diff(L, "days").days));
|
|
412
|
+
l({ start: le, end: ce, nights: de });
|
|
413
|
+
}
|
|
414
|
+
}, [l, a, c]), oe = _((p) => {
|
|
415
|
+
if (F(p), t) {
|
|
416
|
+
const u = t.setZone(p);
|
|
417
|
+
if (m(u), W(u), s) {
|
|
418
|
+
const w = {
|
|
419
|
+
iso: u.toISO() || "",
|
|
420
|
+
formatted: u.toFormat(`${a} ${c}`),
|
|
421
|
+
timestamp: u.toMillis(),
|
|
422
|
+
dateTime: u
|
|
1007
423
|
};
|
|
1008
|
-
|
|
424
|
+
s(w);
|
|
1009
425
|
}
|
|
1010
426
|
} else
|
|
1011
|
-
|
|
1012
|
-
}, [
|
|
1013
|
-
|
|
1014
|
-
},
|
|
1015
|
-
(
|
|
1016
|
-
},
|
|
1017
|
-
return /* @__PURE__ */
|
|
427
|
+
W(U(p));
|
|
428
|
+
}, [t, s, a, c]), J = () => {
|
|
429
|
+
v || g(!T);
|
|
430
|
+
}, se = (p) => {
|
|
431
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), J());
|
|
432
|
+
}, ae = y ? i && N ? `${i.toFormat("d MMM yyyy")} – ${N.toFormat("d MMM yyyy")}` : "" : t ? t.toFormat(`${a} ${M ? c : ""}`) : "", re = b ? I(b, k) : void 0, ie = d ? I(d, k) : void 0;
|
|
433
|
+
return /* @__PURE__ */ h(
|
|
1018
434
|
"div",
|
|
1019
435
|
{
|
|
1020
|
-
ref:
|
|
1021
|
-
className: `chronos-picker ${
|
|
1022
|
-
"data-disabled":
|
|
1023
|
-
"data-theme":
|
|
436
|
+
ref: K,
|
|
437
|
+
className: `chronos-picker ${P}`,
|
|
438
|
+
"data-disabled": v,
|
|
439
|
+
"data-theme": S,
|
|
1024
440
|
children: [
|
|
1025
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ h(
|
|
1026
442
|
"div",
|
|
1027
443
|
{
|
|
1028
444
|
className: "chronos-input-wrapper",
|
|
1029
|
-
onClick:
|
|
445
|
+
onClick: J,
|
|
1030
446
|
children: [
|
|
1031
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ o(
|
|
1032
448
|
"input",
|
|
1033
449
|
{
|
|
1034
|
-
ref:
|
|
450
|
+
ref: G,
|
|
1035
451
|
type: "text",
|
|
1036
452
|
className: "chronos-input",
|
|
1037
|
-
value:
|
|
1038
|
-
placeholder:
|
|
453
|
+
value: ae,
|
|
454
|
+
placeholder: f,
|
|
1039
455
|
readOnly: !0,
|
|
1040
|
-
disabled:
|
|
1041
|
-
onKeyDown:
|
|
1042
|
-
"aria-label":
|
|
1043
|
-
"aria-expanded":
|
|
456
|
+
disabled: v,
|
|
457
|
+
onKeyDown: se,
|
|
458
|
+
"aria-label": z,
|
|
459
|
+
"aria-expanded": T,
|
|
1044
460
|
"aria-haspopup": "dialog",
|
|
1045
461
|
role: "combobox"
|
|
1046
462
|
}
|
|
1047
463
|
),
|
|
1048
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ h(
|
|
1049
465
|
"svg",
|
|
1050
466
|
{
|
|
1051
467
|
className: "chronos-calendar-icon",
|
|
@@ -1055,51 +471,66 @@ const Sr = ({
|
|
|
1055
471
|
stroke: "currentColor",
|
|
1056
472
|
strokeWidth: "2",
|
|
1057
473
|
children: [
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ o("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
475
|
+
/* @__PURE__ */ o("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
|
476
|
+
/* @__PURE__ */ o("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
|
477
|
+
/* @__PURE__ */ o("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
1062
478
|
]
|
|
1063
479
|
}
|
|
1064
480
|
)
|
|
1065
481
|
]
|
|
1066
482
|
}
|
|
1067
483
|
),
|
|
1068
|
-
|
|
484
|
+
T && /* @__PURE__ */ o(
|
|
1069
485
|
"div",
|
|
1070
486
|
{
|
|
1071
487
|
className: "chronos-dropdown",
|
|
1072
|
-
"data-orientation":
|
|
488
|
+
"data-orientation": C,
|
|
489
|
+
"data-range-mode": y,
|
|
1073
490
|
role: "dialog",
|
|
1074
491
|
"aria-label": "Date and time picker dialog",
|
|
1075
|
-
children: /* @__PURE__ */
|
|
1076
|
-
/* @__PURE__ */
|
|
1077
|
-
|
|
492
|
+
children: /* @__PURE__ */ h("div", { className: "chronos-dropdown-content", children: [
|
|
493
|
+
y && i && N && /* @__PURE__ */ h("div", { className: "chronos-range-summary", children: [
|
|
494
|
+
/* @__PURE__ */ h("div", { className: "chronos-range-nights", children: [
|
|
495
|
+
Math.max(0, Math.ceil(N.diff(i, "days").days)),
|
|
496
|
+
" nights"
|
|
497
|
+
] }),
|
|
498
|
+
/* @__PURE__ */ h("div", { className: "chronos-range-dates", children: [
|
|
499
|
+
i.toFormat("d MMM yyyy"),
|
|
500
|
+
" – ",
|
|
501
|
+
N.toFormat("d MMM yyyy")
|
|
502
|
+
] })
|
|
503
|
+
] }),
|
|
504
|
+
/* @__PURE__ */ o(
|
|
505
|
+
pe,
|
|
1078
506
|
{
|
|
1079
|
-
viewDate:
|
|
1080
|
-
selectedDate:
|
|
1081
|
-
onDateSelect:
|
|
1082
|
-
onViewDateChange:
|
|
1083
|
-
timezone:
|
|
1084
|
-
minDate:
|
|
1085
|
-
maxDate:
|
|
507
|
+
viewDate: V,
|
|
508
|
+
selectedDate: y ? null : t,
|
|
509
|
+
onDateSelect: ee,
|
|
510
|
+
onViewDateChange: W,
|
|
511
|
+
timezone: k,
|
|
512
|
+
minDate: re,
|
|
513
|
+
maxDate: ie,
|
|
514
|
+
selectedStart: y ? i : void 0,
|
|
515
|
+
selectedEnd: y ? N : void 0,
|
|
516
|
+
onRangeSelect: y ? te : void 0
|
|
1086
517
|
}
|
|
1087
518
|
),
|
|
1088
|
-
(
|
|
1089
|
-
|
|
1090
|
-
|
|
519
|
+
!y && (M || A) && /* @__PURE__ */ h("div", { className: "chronos-sidebar", children: [
|
|
520
|
+
M && /* @__PURE__ */ o(
|
|
521
|
+
ye,
|
|
1091
522
|
{
|
|
1092
|
-
value:
|
|
1093
|
-
onChange:
|
|
1094
|
-
use24Hour:
|
|
1095
|
-
timezone:
|
|
523
|
+
value: t,
|
|
524
|
+
onChange: ne,
|
|
525
|
+
use24Hour: R,
|
|
526
|
+
timezone: k
|
|
1096
527
|
}
|
|
1097
528
|
),
|
|
1098
|
-
|
|
1099
|
-
|
|
529
|
+
A && /* @__PURE__ */ o(
|
|
530
|
+
Me,
|
|
1100
531
|
{
|
|
1101
|
-
value:
|
|
1102
|
-
onChange:
|
|
532
|
+
value: k,
|
|
533
|
+
onChange: oe
|
|
1103
534
|
}
|
|
1104
535
|
)
|
|
1105
536
|
] })
|
|
@@ -1111,9 +542,9 @@ const Sr = ({
|
|
|
1111
542
|
);
|
|
1112
543
|
};
|
|
1113
544
|
export {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
545
|
+
H as COMMON_TIMEZONES,
|
|
546
|
+
he as DEFAULT_TIMEZONE,
|
|
547
|
+
ke as DateTimePicker,
|
|
548
|
+
I as convertToTimezone,
|
|
549
|
+
U as nowInTimezone
|
|
1119
550
|
};
|