@himanshu-sorathiya/react-kit 1.0.18 → 1.0.20

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.
@@ -0,0 +1,594 @@
1
+ //#region src/datetime/core.ts
2
+ function e(e) {
3
+ return e instanceof Date ? new Date(e.getTime()) : typeof e != "number" && typeof e != "string" ? /* @__PURE__ */ new Date(NaN) : new Date(e);
4
+ }
5
+ function t(e) {
6
+ return e instanceof Date;
7
+ }
8
+ function n(e) {
9
+ return t(e) && !isNaN(e.getTime());
10
+ }
11
+ function r(e, t, n = 1) {
12
+ let r = new Date(e, t - 1, n);
13
+ return r.getMonth() === t - 1 ? r : new Date(e, t, 0);
14
+ }
15
+ function i(t) {
16
+ return e(t).getFullYear();
17
+ }
18
+ function a(t) {
19
+ return e(t).getMonth() + 1;
20
+ }
21
+ function o(t) {
22
+ return e(t).getDate();
23
+ }
24
+ function s(t) {
25
+ return e(t).getHours();
26
+ }
27
+ function c(t) {
28
+ return e(t).getMinutes();
29
+ }
30
+ function l(t) {
31
+ return e(t).getSeconds();
32
+ }
33
+ function u(t) {
34
+ return e(t).getMilliseconds();
35
+ }
36
+ function d(t) {
37
+ return e(t).getTime();
38
+ }
39
+ function f(t) {
40
+ return e(t).getDay();
41
+ }
42
+ function p(t) {
43
+ let n = e(t);
44
+ return new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate();
45
+ }
46
+ function m(t) {
47
+ return Math.ceil((e(t).getMonth() + 1) / 3);
48
+ }
49
+ function h(t) {
50
+ let n = e(t), r = new Date(n.getFullYear(), 0, 1, 0, 0, 0, 0), i = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0, 0);
51
+ return Math.round((i.getTime() - r.getTime()) / 864e5) + 1;
52
+ }
53
+ //#endregion
54
+ //#region src/datetime/manipulation.ts
55
+ var g = 1e3, _ = 6e4, v = 36e5, y = 864e5;
56
+ function b(t, n) {
57
+ return new Date(e(t).getTime() + n);
58
+ }
59
+ function x(t, n) {
60
+ return new Date(e(t).getTime() + n * g);
61
+ }
62
+ function S(t, n) {
63
+ return new Date(e(t).getTime() + n * _);
64
+ }
65
+ function C(t, n) {
66
+ return new Date(e(t).getTime() + n * v);
67
+ }
68
+ function w(t, n) {
69
+ let r = e(t);
70
+ return r.setDate(r.getDate() + n), r;
71
+ }
72
+ function T(e, t) {
73
+ return w(e, t * 7);
74
+ }
75
+ function E(t, n) {
76
+ let r = e(t), i = r.getDate();
77
+ return r.setDate(1), r.setMonth(r.getMonth() + n), r.setDate(Math.min(i, p(r))), r;
78
+ }
79
+ function D(t, n) {
80
+ let r = e(t), i = r.getMonth();
81
+ return r.setFullYear(r.getFullYear() + n), r.getMonth() !== i && r.setDate(0), r;
82
+ }
83
+ function ee(e, t) {
84
+ return b(e, -t);
85
+ }
86
+ function te(e, t) {
87
+ return x(e, -t);
88
+ }
89
+ function O(e, t) {
90
+ return S(e, -t);
91
+ }
92
+ function ne(e, t) {
93
+ return C(e, -t);
94
+ }
95
+ function re(e, t) {
96
+ return w(e, -t);
97
+ }
98
+ function ie(e, t) {
99
+ return T(e, -t);
100
+ }
101
+ function ae(e, t) {
102
+ return E(e, -t);
103
+ }
104
+ function oe(e, t) {
105
+ return D(e, -t);
106
+ }
107
+ function se(t, n) {
108
+ let r = e(t), i = r.getMonth();
109
+ return r.setFullYear(n), r.getMonth() !== i && r.setDate(0), r;
110
+ }
111
+ function ce(t, n) {
112
+ let r = e(t), i = r.getDate();
113
+ return r.setDate(1), r.setMonth(n - 1), r.setDate(Math.min(i, p(r))), r;
114
+ }
115
+ function le(t, n) {
116
+ let r = e(t), i = p(r);
117
+ return r.setDate(Math.min(Math.max(1, n), i)), r;
118
+ }
119
+ function ue(t, n) {
120
+ let r = e(t);
121
+ return r.setHours(n), r;
122
+ }
123
+ function de(t, n) {
124
+ let r = e(t);
125
+ return r.setMinutes(n), r;
126
+ }
127
+ function fe(t, n) {
128
+ let r = e(t);
129
+ return r.setSeconds(n), r;
130
+ }
131
+ function pe(t, n) {
132
+ let r = e(t);
133
+ return r.setMilliseconds(n), r;
134
+ }
135
+ function k(t) {
136
+ let n = e(t);
137
+ return n.setHours(0, 0, 0, 0), n;
138
+ }
139
+ function me(t) {
140
+ let n = e(t);
141
+ return n.setHours(23, 59, 59, 999), n;
142
+ }
143
+ function he(t) {
144
+ let n = e(t);
145
+ return n.setMinutes(0, 0, 0), n;
146
+ }
147
+ function ge(t) {
148
+ let n = e(t);
149
+ return n.setMinutes(59, 59, 999), n;
150
+ }
151
+ function _e(t) {
152
+ let n = e(t);
153
+ return n.setSeconds(0, 0), n;
154
+ }
155
+ function ve(t) {
156
+ let n = e(t);
157
+ return n.setSeconds(59, 999), n;
158
+ }
159
+ function A(t, n = 0) {
160
+ let r = e(t), i = (r.getDay() - n + 7) % 7;
161
+ return r.setDate(r.getDate() - i), r.setHours(0, 0, 0, 0), r;
162
+ }
163
+ function j(e, t = 0) {
164
+ let n = A(e, t);
165
+ return n.setDate(n.getDate() + 6), n.setHours(23, 59, 59, 999), n;
166
+ }
167
+ function M(t) {
168
+ let n = e(t);
169
+ return n.setDate(1), n.setHours(0, 0, 0, 0), n;
170
+ }
171
+ function N(t) {
172
+ let n = e(t);
173
+ return new Date(n.getFullYear(), n.getMonth() + 1, 0, 23, 59, 59, 999);
174
+ }
175
+ function P(t) {
176
+ let n = e(t), r = n.getMonth() - n.getMonth() % 3;
177
+ return new Date(n.getFullYear(), r, 1, 0, 0, 0, 0);
178
+ }
179
+ function F(t) {
180
+ let n = e(t), r = n.getMonth() - n.getMonth() % 3 + 2;
181
+ return new Date(n.getFullYear(), r + 1, 0, 23, 59, 59, 999);
182
+ }
183
+ function I(t) {
184
+ let n = e(t);
185
+ return new Date(n.getFullYear(), 0, 1, 0, 0, 0, 0);
186
+ }
187
+ function ye(t) {
188
+ let n = e(t);
189
+ return new Date(n.getFullYear(), 11, 31, 23, 59, 59, 999);
190
+ }
191
+ function L(t, n) {
192
+ return e(t).getTime() - e(n).getTime();
193
+ }
194
+ function R(e, t) {
195
+ return Math.trunc(L(e, t) / g);
196
+ }
197
+ function z(e, t) {
198
+ return Math.trunc(L(e, t) / _);
199
+ }
200
+ function B(e, t) {
201
+ return Math.trunc(L(e, t) / v);
202
+ }
203
+ function V(t, n) {
204
+ let r = k(e(t)), i = k(e(n));
205
+ return Math.round((r.getTime() - i.getTime()) / y);
206
+ }
207
+ function be(e, t) {
208
+ return Math.trunc(V(e, t) / 7);
209
+ }
210
+ function H(t, n) {
211
+ let r = e(t), i = e(n), a = r.getFullYear() - i.getFullYear(), o = r.getMonth() - i.getMonth(), s = a * 12 + o, c = E(i, s);
212
+ return s > 0 && c.getTime() > r.getTime() ? s - 1 : s < 0 && c.getTime() < r.getTime() ? s + 1 : s;
213
+ }
214
+ function U(t, n) {
215
+ let r = e(t), i = e(n), a = r.getFullYear() - i.getFullYear(), o = D(i, a);
216
+ return a > 0 && o.getTime() > r.getTime() ? a - 1 : a < 0 && o.getTime() < r.getTime() ? a + 1 : a;
217
+ }
218
+ function xe(t, n) {
219
+ let r = e(t), i = n < 0 ? -1 : 1, a = Math.abs(n);
220
+ for (; a > 0;) {
221
+ r.setDate(r.getDate() + i);
222
+ let e = r.getDay();
223
+ e !== 0 && e !== 6 && a--;
224
+ }
225
+ return r;
226
+ }
227
+ function Se(t, n) {
228
+ let r = k(e(t)), i = k(e(n)), a = V(r, i);
229
+ if (a === 0) return 0;
230
+ let o = a > 0 ? 1 : -1, s = Math.abs(a), c = Math.floor(s / 7) * 5, l = new Date(i);
231
+ for (let e = 0; e < s % 7; e++) {
232
+ l.setDate(l.getDate() + o);
233
+ let e = l.getDay();
234
+ e !== 0 && e !== 6 && c++;
235
+ }
236
+ return c * o;
237
+ }
238
+ function Ce(t, r, i) {
239
+ let a = e(t), o = e(r), s = e(i);
240
+ return !n(a) || !n(o) || !n(s) ? /* @__PURE__ */ new Date(NaN) : a.getTime() < o.getTime() ? o : a.getTime() > s.getTime() ? s : a;
241
+ }
242
+ function we(e) {
243
+ return e.length === 0 ? null : new Date(Math.min(...e.map((e) => e.getTime())));
244
+ }
245
+ function Te(e) {
246
+ return e.length === 0 ? null : new Date(Math.max(...e.map((e) => e.getTime())));
247
+ }
248
+ function Ee(t, r) {
249
+ if (r.length === 0) return null;
250
+ let i = e(t);
251
+ if (!n(i)) return /* @__PURE__ */ new Date(NaN);
252
+ let a = i.getTime();
253
+ return r.reduce((e, t) => n(t) && Math.abs(t.getTime() - a) < Math.abs(e.getTime() - a) ? t : e);
254
+ }
255
+ function De(t) {
256
+ let n = [], r = k(e(t.start)), i = k(e(t.end)), a = new Date(r);
257
+ for (; a.getTime() <= i.getTime();) n.push(new Date(a)), a.setDate(a.getDate() + 1);
258
+ return n;
259
+ }
260
+ function Oe(t) {
261
+ let n = [], r = M(e(t.start)), i = M(e(t.end)), a = new Date(r);
262
+ for (; a.getTime() <= i.getTime();) n.push(new Date(a)), a.setMonth(a.getMonth() + 1);
263
+ return n;
264
+ }
265
+ function ke(t) {
266
+ let n = [], r = I(e(t.start)), i = I(e(t.end)), a = new Date(r);
267
+ for (; a.getTime() <= i.getTime();) n.push(new Date(a)), a.setFullYear(a.getFullYear() + 1);
268
+ return n;
269
+ }
270
+ function Ae(e) {
271
+ return /* @__PURE__ */ new Date(e * 1e3);
272
+ }
273
+ function je(t) {
274
+ return Math.floor(e(t).getTime() / 1e3);
275
+ }
276
+ function Me(t, n) {
277
+ let r = n * _;
278
+ return new Date(Math.round(e(t).getTime() / r) * r);
279
+ }
280
+ function W(t) {
281
+ let n = e(t), r = n.getDay() || 7;
282
+ n.setDate(n.getDate() + 4 - r);
283
+ let i = new Date(n.getFullYear(), 0, 1);
284
+ return Math.ceil(((n.getTime() - i.getTime()) / y + 1) / 7);
285
+ }
286
+ function Ne(t, n) {
287
+ let r = e(t), i = W(r);
288
+ return r.setDate(r.getDate() + (n - i) * 7), r;
289
+ }
290
+ function Pe(t) {
291
+ let n = e(t.start), r = e(t.end), [i, a] = n.getTime() <= r.getTime() ? [n, r] : [r, n], o = U(a, i), s = D(i, o), c = H(a, s), l = E(s, c), u = V(a, l), d = w(l, u), f = B(a, d), p = C(d, f), m = z(a, p);
292
+ return {
293
+ years: o,
294
+ months: c,
295
+ days: u,
296
+ hours: f,
297
+ minutes: m,
298
+ seconds: R(a, S(p, m))
299
+ };
300
+ }
301
+ function Fe(e) {
302
+ return (e.years ?? 0) * 315576e5 + (e.months ?? 0) * 26298e5 + (e.weeks ?? 0) * 7 * y + (e.days ?? 0) * y + (e.hours ?? 0) * v + (e.minutes ?? 0) * _ + (e.seconds ?? 0) * g;
303
+ }
304
+ //#endregion
305
+ //#region src/datetime/format.ts
306
+ function G(e) {
307
+ let t = e.getTimezoneOffset(), n = t <= 0 ? "+" : "-", r = Math.abs(t);
308
+ return {
309
+ sign: n,
310
+ hours: String(Math.floor(r / 60)).padStart(2, "0"),
311
+ minutes: String(r % 60).padStart(2, "0")
312
+ };
313
+ }
314
+ var K = {
315
+ yyyy: (e) => String(e.getFullYear()).padStart(4, "0"),
316
+ yy: (e) => String(e.getFullYear()).slice(-2),
317
+ MMMM: (e, t) => new Intl.DateTimeFormat(t, { month: "long" }).format(e),
318
+ MMM: (e, t) => new Intl.DateTimeFormat(t, { month: "short" }).format(e),
319
+ MM: (e) => String(e.getMonth() + 1).padStart(2, "0"),
320
+ M: (e) => String(e.getMonth() + 1),
321
+ dd: (e) => String(e.getDate()).padStart(2, "0"),
322
+ d: (e) => String(e.getDate()),
323
+ EEEE: (e, t) => new Intl.DateTimeFormat(t, { weekday: "long" }).format(e),
324
+ EEE: (e, t) => new Intl.DateTimeFormat(t, { weekday: "short" }).format(e),
325
+ E: (e, t) => new Intl.DateTimeFormat(t, { weekday: "short" }).format(e),
326
+ HH: (e) => String(e.getHours()).padStart(2, "0"),
327
+ H: (e) => String(e.getHours()),
328
+ hh: (e) => String(e.getHours() % 12 || 12).padStart(2, "0"),
329
+ h: (e) => String(e.getHours() % 12 || 12),
330
+ mm: (e) => String(e.getMinutes()).padStart(2, "0"),
331
+ ss: (e) => String(e.getSeconds()).padStart(2, "0"),
332
+ SSS: (e) => String(e.getMilliseconds()).padStart(3, "0"),
333
+ a: (e, t) => new Intl.DateTimeFormat(t, {
334
+ hour: "numeric",
335
+ hour12: !0
336
+ }).formatToParts(e).find((e) => e.type === "dayPeriod")?.value ?? "",
337
+ Q: (e) => String(Math.ceil((e.getMonth() + 1) / 3)),
338
+ w: (e) => String(W(e)),
339
+ D: (e) => String(h(e)),
340
+ xxx: (e) => {
341
+ let t = G(e);
342
+ return `${t.sign}${t.hours}:${t.minutes}`;
343
+ },
344
+ xx: (e) => {
345
+ let t = G(e);
346
+ return `${t.sign}${t.hours}${t.minutes}`;
347
+ },
348
+ x: (e) => {
349
+ let t = G(e);
350
+ return `${t.sign}${t.hours}`;
351
+ }
352
+ }, Ie = RegExp("'[^']*'|" + Object.keys(K).sort((e, t) => t.length - e.length).join("|"), "g");
353
+ function Le(t, r, i) {
354
+ let a = e(t);
355
+ if (!n(a)) return "Invalid Date";
356
+ let o = i?.locale ?? "default";
357
+ return r.replace(Ie, (e) => {
358
+ if (e.startsWith("'")) {
359
+ let t = e.slice(1, -1);
360
+ return t === "" ? "'" : t;
361
+ }
362
+ let t = K[e];
363
+ return t(a, o);
364
+ });
365
+ }
366
+ function Re(t, r = "default", i = {}) {
367
+ let a = e(t);
368
+ return n(a) ? new Intl.DateTimeFormat(r, i).format(a) : "Invalid Date";
369
+ }
370
+ function ze(t, r = /* @__PURE__ */ new Date(), i = "default") {
371
+ let a = e(t), o = e(r);
372
+ if (!n(a) || !n(o)) return "Invalid Date";
373
+ let s = new Intl.RelativeTimeFormat(i, { numeric: "auto" }), c = Math.abs.bind(Math), l = R(a, o), u = z(a, o), d = B(a, o), f = V(a, o), p = Math.trunc(f / 7), m = Math.round(f / 30.4375), h = Math.round(f / 365.25);
374
+ return c(l) < 60 ? s.format(l, "second") : c(u) < 60 ? s.format(u, "minute") : c(d) < 24 ? s.format(d, "hour") : c(f) < 7 ? s.format(f, "day") : c(p) < 4 ? s.format(p, "week") : c(m) < 12 ? s.format(m, "month") : s.format(h, "year");
375
+ }
376
+ function Be(t, r) {
377
+ let i = e(t);
378
+ if (!n(i)) return "Invalid Date";
379
+ let a = r?.format ?? "extended", o = r?.representation ?? "complete", s = a === "extended" ? "-" : "", c = a === "extended" ? ":" : "", l = String(i.getFullYear()).padStart(4, "0"), u = String(i.getMonth() + 1).padStart(2, "0"), d = String(i.getDate()).padStart(2, "0"), f = String(i.getHours()).padStart(2, "0"), p = String(i.getMinutes()).padStart(2, "0"), m = String(i.getSeconds()).padStart(2, "0"), h = G(i), g = `${h.sign}${h.hours}${c}${h.minutes}`, _ = `${l}${s}${u}${s}${d}`, v = `${f}${c}${p}${c}${m}`;
380
+ return o === "date" ? _ : o === "time" ? `${v}${g}` : `${_}T${v}${g}`;
381
+ }
382
+ function Ve(t, r) {
383
+ let i = e(t);
384
+ if (!n(i)) return "Invalid Date";
385
+ let a = r?.fractionDigits ?? 0;
386
+ return `${String(i.getFullYear()).padStart(4, "0")}-${String(i.getMonth() + 1).padStart(2, "0")}-${String(i.getDate()).padStart(2, "0")}T${String(i.getHours()).padStart(2, "0")}:${String(i.getMinutes()).padStart(2, "0")}:${String(i.getSeconds()).padStart(2, "0")}${a > 0 ? "." + String(i.getMilliseconds()).padStart(3, "0").slice(0, a) : ""}${i.getTimezoneOffset() === 0 ? "Z" : (() => {
387
+ let e = G(i);
388
+ return `${e.sign}${e.hours}:${e.minutes}`;
389
+ })()}`;
390
+ }
391
+ function He(t, r) {
392
+ let i = e(t);
393
+ if (!n(i)) return "Invalid Date";
394
+ let a = r?.representation ?? "complete", o = String(i.getFullYear()).padStart(4, "0"), s = String(i.getMonth() + 1).padStart(2, "0"), c = String(i.getDate()).padStart(2, "0"), l = String(i.getHours()).padStart(2, "0"), u = String(i.getMinutes()).padStart(2, "0"), d = String(i.getSeconds()).padStart(2, "0");
395
+ return a === "date" ? `${o}-${s}-${c}` : a === "time" ? `${l}:${u}:${d}` : `${o}-${s}-${c} ${l}:${u}:${d}`;
396
+ }
397
+ var Ue = [
398
+ "Sun",
399
+ "Mon",
400
+ "Tue",
401
+ "Wed",
402
+ "Thu",
403
+ "Fri",
404
+ "Sat"
405
+ ], We = [
406
+ "Jan",
407
+ "Feb",
408
+ "Mar",
409
+ "Apr",
410
+ "May",
411
+ "Jun",
412
+ "Jul",
413
+ "Aug",
414
+ "Sep",
415
+ "Oct",
416
+ "Nov",
417
+ "Dec"
418
+ ];
419
+ function Ge(t) {
420
+ let r = e(t);
421
+ if (!n(r)) return "Invalid Date";
422
+ let i = Ue[r.getDay()], a = String(r.getDate()).padStart(2, "0"), o = We[r.getMonth()], s = r.getFullYear(), c = String(r.getHours()).padStart(2, "0"), l = String(r.getMinutes()).padStart(2, "0"), u = String(r.getSeconds()).padStart(2, "0"), d = G(r);
423
+ return `${i}, ${a} ${o} ${s} ${c}:${l}:${u} ${d.sign}${d.hours}${d.minutes}`;
424
+ }
425
+ var Ke = [
426
+ "years",
427
+ "months",
428
+ "weeks",
429
+ "days",
430
+ "hours",
431
+ "minutes",
432
+ "seconds"
433
+ ], qe = {
434
+ years: ["year", "years"],
435
+ months: ["month", "months"],
436
+ weeks: ["week", "weeks"],
437
+ days: ["day", "days"],
438
+ hours: ["hour", "hours"],
439
+ minutes: ["minute", "minutes"],
440
+ seconds: ["second", "seconds"]
441
+ };
442
+ function Je(e, t) {
443
+ let n = t?.zero ?? !1, r = t?.delimiter ?? ", ", i = t?.locale ?? "default", a = t?.format ?? Ke, o = new Intl.PluralRules(i), s = new Intl.NumberFormat(i), c = [];
444
+ for (let t of a) {
445
+ let r = e[t] ?? 0;
446
+ if (r === 0 && !n) continue;
447
+ let [i, a] = qe[t], l = o.select(r) === "one" ? i : a;
448
+ c.push(`${s.format(r)} ${l}`);
449
+ }
450
+ return c.join(r);
451
+ }
452
+ function Ye(t) {
453
+ let r = e(t);
454
+ return n(r) ? r.toISOString() : "Invalid Date";
455
+ }
456
+ var Xe = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/;
457
+ function Ze(e) {
458
+ return Xe.test(e.trim()) ? new Date(e) : /* @__PURE__ */ new Date(NaN);
459
+ }
460
+ //#endregion
461
+ //#region src/datetime/queries.ts
462
+ function q(e, t) {
463
+ let n = new Date(e), r = (n.getDay() - t + 7) % 7;
464
+ return n.setDate(n.getDate() - r), n.setHours(0, 0, 0, 0), n;
465
+ }
466
+ function J(t, r) {
467
+ let i = e(t), a = e(r);
468
+ return !n(i) || !n(a) ? !1 : i.getFullYear() === a.getFullYear() && i.getMonth() === a.getMonth() && i.getDate() === a.getDate();
469
+ }
470
+ function Y(t, r) {
471
+ let i = e(t), a = e(r);
472
+ return !n(i) || !n(a) ? !1 : i.getFullYear() === a.getFullYear() && i.getMonth() === a.getMonth();
473
+ }
474
+ function X(t, r) {
475
+ let i = e(t), a = e(r);
476
+ return !n(i) || !n(a) ? !1 : i.getFullYear() === a.getFullYear();
477
+ }
478
+ function Qe(t, r) {
479
+ let i = e(t), a = e(r);
480
+ if (!n(i) || !n(a)) return !1;
481
+ let o = Math.ceil((i.getMonth() + 1) / 3), s = Math.ceil((a.getMonth() + 1) / 3);
482
+ return i.getFullYear() === a.getFullYear() && o === s;
483
+ }
484
+ function Z(t, r, i = 0) {
485
+ let a = e(t), o = e(r);
486
+ return !n(a) || !n(o) ? !1 : q(a, i).getTime() === q(o, i).getTime();
487
+ }
488
+ function $e(t, r) {
489
+ let i = e(t), a = e(r);
490
+ return !n(i) || !n(a) ? !1 : i.getFullYear() === a.getFullYear() && i.getMonth() === a.getMonth() && i.getDate() === a.getDate() && i.getHours() === a.getHours();
491
+ }
492
+ function et(t, r) {
493
+ let i = e(t), a = e(r);
494
+ return !n(i) || !n(a) ? !1 : i.getFullYear() === a.getFullYear() && i.getMonth() === a.getMonth() && i.getDate() === a.getDate() && i.getHours() === a.getHours() && i.getMinutes() === a.getMinutes();
495
+ }
496
+ function tt(t, r) {
497
+ let i = e(t), a = e(r);
498
+ return !n(i) || !n(a) ? !1 : i.getFullYear() === a.getFullYear() && i.getMonth() === a.getMonth() && i.getDate() === a.getDate() && i.getHours() === a.getHours() && i.getMinutes() === a.getMinutes() && i.getSeconds() === a.getSeconds();
499
+ }
500
+ function nt(t, r) {
501
+ let i = e(t), a = e(r);
502
+ return !n(i) || !n(a) ? !1 : i.getHours() === a.getHours() && i.getMinutes() === a.getMinutes() && i.getSeconds() === a.getSeconds();
503
+ }
504
+ function rt(t, r) {
505
+ let i = e(t), a = e(r);
506
+ return !n(i) || !n(a) ? !1 : i.getTime() < a.getTime();
507
+ }
508
+ function it(t, r) {
509
+ let i = e(t), a = e(r);
510
+ return !n(i) || !n(a) ? !1 : i.getTime() > a.getTime();
511
+ }
512
+ function at(t, r) {
513
+ let i = e(t), a = e(r);
514
+ return !n(i) || !n(a) ? !1 : i.getTime() === a.getTime();
515
+ }
516
+ function ot(t, r, i) {
517
+ let a = e(t), o = e(r), s = e(i);
518
+ return !n(a) || !n(o) || !n(s) ? !1 : (o.getTime() > s.getTime() && ([o, s] = [s, o]), a.getTime() >= o.getTime() && a.getTime() <= s.getTime());
519
+ }
520
+ function st(e, t) {
521
+ return !n(e.start) || !n(e.end) || !n(t.start) || !n(t.end) ? !1 : e.start.getTime() < t.end.getTime() && e.end.getTime() > t.start.getTime();
522
+ }
523
+ function ct(e) {
524
+ return J(e, /* @__PURE__ */ new Date());
525
+ }
526
+ function lt(e) {
527
+ let t = /* @__PURE__ */ new Date();
528
+ return t.setDate(t.getDate() - 1), J(e, t);
529
+ }
530
+ function ut(e) {
531
+ let t = /* @__PURE__ */ new Date();
532
+ return t.setDate(t.getDate() + 1), J(e, t);
533
+ }
534
+ function dt(t) {
535
+ let r = e(t);
536
+ return n(r) ? r.getTime() < Date.now() : !1;
537
+ }
538
+ function ft(t) {
539
+ let r = e(t);
540
+ return n(r) ? r.getTime() > Date.now() : !1;
541
+ }
542
+ function pt(e, t = 0) {
543
+ return Z(e, /* @__PURE__ */ new Date(), t);
544
+ }
545
+ function Q(e) {
546
+ return Y(e, /* @__PURE__ */ new Date());
547
+ }
548
+ function mt(e) {
549
+ return X(e, /* @__PURE__ */ new Date());
550
+ }
551
+ function ht(t) {
552
+ let r = e(t);
553
+ return n(r) ? r.getDate() === 1 : !1;
554
+ }
555
+ function gt(t) {
556
+ let r = e(t);
557
+ if (!n(r)) return !1;
558
+ let i = new Date(r);
559
+ return i.setDate(i.getDate() + 1), i.getMonth() !== r.getMonth();
560
+ }
561
+ function _t(t) {
562
+ let r = e(t);
563
+ if (!n(r)) return !1;
564
+ let i = r.getDay();
565
+ return i === 0 || i === 6;
566
+ }
567
+ function vt(t) {
568
+ let r = e(t);
569
+ if (!n(r)) return !1;
570
+ let i = r.getDay();
571
+ return i >= 1 && i <= 5;
572
+ }
573
+ function yt(t) {
574
+ let r = e(t);
575
+ return n(r) ? r.getHours() < 12 : !1;
576
+ }
577
+ function bt(t) {
578
+ let r = e(t);
579
+ return n(r) ? r.getHours() >= 12 : !1;
580
+ }
581
+ function $(e) {
582
+ let t;
583
+ if (e instanceof Date) {
584
+ if (!n(e)) return !1;
585
+ t = e.getFullYear();
586
+ } else t = e;
587
+ return t % 4 == 0 && t % 100 != 0 || t % 400 == 0;
588
+ }
589
+ function xt(t) {
590
+ let r = e(t);
591
+ return n(r) ? $(r.getFullYear()) : !1;
592
+ }
593
+ //#endregion
594
+ export { xe as addBusinessDays, w as addDays, C as addHours, b as addMilliseconds, S as addMinutes, E as addMonths, x as addSeconds, T as addWeeks, D as addYears, Ce as clampDate, Ee as closestTo, r as createDate, Se as differenceInBusinessDays, V as differenceInDays, B as differenceInHours, L as differenceInMilliseconds, z as differenceInMinutes, H as differenceInMonths, R as differenceInSeconds, be as differenceInWeeks, U as differenceInYears, Fe as durationToMilliseconds, De as eachDayOfInterval, Oe as eachMonthOfInterval, ke as eachYearOfInterval, me as endOfDay, ge as endOfHour, ve as endOfMinute, N as endOfMonth, F as endOfQuarter, j as endOfWeek, ye as endOfYear, Le as format, Re as formatDate, Je as formatDuration, Be as formatISO, He as formatISO9075, Ge as formatRFC2822, Ve as formatRFC3339, ze as formatRelativeTime, Ae as fromUnixTime, o as getDate, f as getDayOfWeek, h as getDayOfYear, p as getDaysInMonth, s as getHours, W as getISOWeek, u as getMilliseconds, c as getMinutes, a as getMonth, m as getQuarter, l as getSeconds, d as getTimestamp, i as getYear, Pe as intervalToDuration, yt as isAM, it as isAfter, rt as isBefore, t as isDate, at as isEqual, ht as isFirstDayOfMonth, ft as isFuture, xt as isInLeapYear, gt as isLastDayOfMonth, $ as isLeapYear, st as isOverlapping, bt as isPM, dt as isPast, J as isSameDay, $e as isSameHour, et as isSameMinute, Y as isSameMonth, Qe as isSameQuarter, tt as isSameSecond, nt as isSameTime, Z as isSameWeek, X as isSameYear, Q as isThisMonth, pt as isThisWeek, mt as isThisYear, ct as isToday, ut as isTomorrow, n as isValid, vt as isWeekday, _t as isWeekend, ot as isWithinRange, lt as isYesterday, Te as max, we as min, Ze as parseISO, Me as roundToNearestMinutes, le as setDate, ue as setHours, Ne as setISOWeek, pe as setMilliseconds, de as setMinutes, ce as setMonth, fe as setSeconds, se as setYear, k as startOfDay, he as startOfHour, _e as startOfMinute, M as startOfMonth, P as startOfQuarter, A as startOfWeek, I as startOfYear, re as subDays, ne as subHours, ee as subMilliseconds, O as subMinutes, ae as subMonths, te as subSeconds, ie as subWeeks, oe as subYears, e as toDate, Ye as toISOString, je as toUnixTime };