@leancodepl/api-date-dayjs 9.7.1 → 9.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,689 @@
1
+ function st(l) {
2
+ return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
3
+ }
4
+ var tt = { exports: {} }, $t = tt.exports, ct;
5
+ function vt() {
6
+ return ct || (ct = 1, (function(l, Z) {
7
+ (function(k, y) {
8
+ l.exports = y();
9
+ })($t, (function() {
10
+ var k = 1e3, y = 6e4, P = 36e5, W = "millisecond", O = "second", H = "minute", D = "hour", A = "day", w = "week", L = "month", I = "quarter", _ = "year", U = "date", c = "Invalid Date", u = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m = /\[([^\]]+)]|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, g = { 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(s) {
11
+ var n = ["th", "st", "nd", "rd"], t = s % 100;
12
+ return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
13
+ } }, v = function(s, n, t) {
14
+ var o = String(s);
15
+ return !o || o.length >= n ? s : "" + Array(n + 1 - o.length).join(t) + s;
16
+ }, j = { s: v, z: function(s) {
17
+ var n = -s.utcOffset(), t = Math.abs(n), o = Math.floor(t / 60), r = t % 60;
18
+ return (n <= 0 ? "+" : "-") + v(o, 2, "0") + ":" + v(r, 2, "0");
19
+ }, m: function s(n, t) {
20
+ if (n.date() < t.date()) return -s(t, n);
21
+ var o = 12 * (t.year() - n.year()) + (t.month() - n.month()), r = n.clone().add(o, L), f = t - r < 0, h = n.clone().add(o + (f ? -1 : 1), L);
22
+ return +(-(o + (t - r) / (f ? r - h : h - r)) || 0);
23
+ }, a: function(s) {
24
+ return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
25
+ }, p: function(s) {
26
+ return { M: L, y: _, w, d: A, D: U, h: D, m: H, s: O, ms: W, Q: I }[s] || String(s || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(s) {
28
+ return s === void 0;
29
+ } }, b = "en", M = {};
30
+ M[b] = g;
31
+ var i = "$isDayjsObject", e = function(s) {
32
+ return s instanceof S || !(!s || !s[i]);
33
+ }, $ = function s(n, t, o) {
34
+ var r;
35
+ if (!n) return b;
36
+ if (typeof n == "string") {
37
+ var f = n.toLowerCase();
38
+ M[f] && (r = f), t && (M[f] = t, r = f);
39
+ var h = n.split("-");
40
+ if (!r && h.length > 1) return s(h[0]);
41
+ } else {
42
+ var p = n.name;
43
+ M[p] = n, r = p;
44
+ }
45
+ return !o && r && (b = r), r || !o && b;
46
+ }, d = function(s, n) {
47
+ if (e(s)) return s.clone();
48
+ var t = typeof n == "object" ? n : {};
49
+ return t.date = s, t.args = arguments, new S(t);
50
+ }, a = j;
51
+ a.l = $, a.i = e, a.w = function(s, n) {
52
+ return d(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
53
+ };
54
+ var S = (function() {
55
+ function s(t) {
56
+ this.$L = $(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[i] = !0;
57
+ }
58
+ var n = s.prototype;
59
+ return n.parse = function(t) {
60
+ this.$d = (function(o) {
61
+ var r = o.date, f = o.utc;
62
+ if (r === null) return /* @__PURE__ */ new Date(NaN);
63
+ if (a.u(r)) return /* @__PURE__ */ new Date();
64
+ if (r instanceof Date) return new Date(r);
65
+ if (typeof r == "string" && !/Z$/i.test(r)) {
66
+ var h = r.match(u);
67
+ if (h) {
68
+ var p = h[2] - 1 || 0, x = (h[7] || "0").substring(0, 3);
69
+ return f ? new Date(Date.UTC(h[1], p, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, x)) : new Date(h[1], p, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, x);
70
+ }
71
+ }
72
+ return new Date(r);
73
+ })(t), this.init();
74
+ }, n.init = function() {
75
+ var t = this.$d;
76
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
77
+ }, n.$utils = function() {
78
+ return a;
79
+ }, n.isValid = function() {
80
+ return this.$d.toString() !== c;
81
+ }, n.isSame = function(t, o) {
82
+ var r = d(t);
83
+ return this.startOf(o) <= r && r <= this.endOf(o);
84
+ }, n.isAfter = function(t, o) {
85
+ return d(t) < this.startOf(o);
86
+ }, n.isBefore = function(t, o) {
87
+ return this.endOf(o) < d(t);
88
+ }, n.$g = function(t, o, r) {
89
+ return a.u(t) ? this[o] : this.set(r, t);
90
+ }, n.unix = function() {
91
+ return Math.floor(this.valueOf() / 1e3);
92
+ }, n.valueOf = function() {
93
+ return this.$d.getTime();
94
+ }, n.startOf = function(t, o) {
95
+ var r = this, f = !!a.u(o) || o, h = a.p(t), p = function(E, F) {
96
+ var z = a.w(r.$u ? Date.UTC(r.$y, F, E) : new Date(r.$y, F, E), r);
97
+ return f ? z : z.endOf(A);
98
+ }, x = function(E, F) {
99
+ return a.w(r.toDate()[E].apply(r.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), r);
100
+ }, T = this.$W, C = this.$M, N = this.$D, V = "set" + (this.$u ? "UTC" : "");
101
+ switch (h) {
102
+ case _:
103
+ return f ? p(1, 0) : p(31, 11);
104
+ case L:
105
+ return f ? p(1, C) : p(0, C + 1);
106
+ case w:
107
+ var J = this.$locale().weekStart || 0, X = (T < J ? T + 7 : T) - J;
108
+ return p(f ? N - X : N + (6 - X), C);
109
+ case A:
110
+ case U:
111
+ return x(V + "Hours", 0);
112
+ case D:
113
+ return x(V + "Minutes", 1);
114
+ case H:
115
+ return x(V + "Seconds", 2);
116
+ case O:
117
+ return x(V + "Milliseconds", 3);
118
+ default:
119
+ return this.clone();
120
+ }
121
+ }, n.endOf = function(t) {
122
+ return this.startOf(t, !1);
123
+ }, n.$set = function(t, o) {
124
+ var r, f = a.p(t), h = "set" + (this.$u ? "UTC" : ""), p = (r = {}, r[A] = h + "Date", r[U] = h + "Date", r[L] = h + "Month", r[_] = h + "FullYear", r[D] = h + "Hours", r[H] = h + "Minutes", r[O] = h + "Seconds", r[W] = h + "Milliseconds", r)[f], x = f === A ? this.$D + (o - this.$W) : o;
125
+ if (f === L || f === _) {
126
+ var T = this.clone().set(U, 1);
127
+ T.$d[p](x), T.init(), this.$d = T.set(U, Math.min(this.$D, T.daysInMonth())).$d;
128
+ } else p && this.$d[p](x);
129
+ return this.init(), this;
130
+ }, n.set = function(t, o) {
131
+ return this.clone().$set(t, o);
132
+ }, n.get = function(t) {
133
+ return this[a.p(t)]();
134
+ }, n.add = function(t, o) {
135
+ var r, f = this;
136
+ t = Number(t);
137
+ var h = a.p(o), p = function(C) {
138
+ var N = d(f);
139
+ return a.w(N.date(N.date() + Math.round(C * t)), f);
140
+ };
141
+ if (h === L) return this.set(L, this.$M + t);
142
+ if (h === _) return this.set(_, this.$y + t);
143
+ if (h === A) return p(1);
144
+ if (h === w) return p(7);
145
+ var x = (r = {}, r[H] = y, r[D] = P, r[O] = k, r)[h] || 1, T = this.$d.getTime() + t * x;
146
+ return a.w(T, this);
147
+ }, n.subtract = function(t, o) {
148
+ return this.add(-1 * t, o);
149
+ }, n.format = function(t) {
150
+ var o = this, r = this.$locale();
151
+ if (!this.isValid()) return r.invalidDate || c;
152
+ var f = t || "YYYY-MM-DDTHH:mm:ssZ", h = a.z(this), p = this.$H, x = this.$m, T = this.$M, C = r.weekdays, N = r.months, V = r.meridiem, J = function(F, z, R, Q) {
153
+ return F && (F[z] || F(o, f)) || R[z].slice(0, Q);
154
+ }, X = function(F) {
155
+ return a.s(p % 12 || 12, F, "0");
156
+ }, E = V || function(F, z, R) {
157
+ var Q = F < 12 ? "AM" : "PM";
158
+ return R ? Q.toLowerCase() : Q;
159
+ };
160
+ return f.replace(m, (function(F, z) {
161
+ return z || (function(R) {
162
+ switch (R) {
163
+ case "YY":
164
+ return String(o.$y).slice(-2);
165
+ case "YYYY":
166
+ return a.s(o.$y, 4, "0");
167
+ case "M":
168
+ return T + 1;
169
+ case "MM":
170
+ return a.s(T + 1, 2, "0");
171
+ case "MMM":
172
+ return J(r.monthsShort, T, N, 3);
173
+ case "MMMM":
174
+ return J(N, T);
175
+ case "D":
176
+ return o.$D;
177
+ case "DD":
178
+ return a.s(o.$D, 2, "0");
179
+ case "d":
180
+ return String(o.$W);
181
+ case "dd":
182
+ return J(r.weekdaysMin, o.$W, C, 2);
183
+ case "ddd":
184
+ return J(r.weekdaysShort, o.$W, C, 3);
185
+ case "dddd":
186
+ return C[o.$W];
187
+ case "H":
188
+ return String(p);
189
+ case "HH":
190
+ return a.s(p, 2, "0");
191
+ case "h":
192
+ return X(1);
193
+ case "hh":
194
+ return X(2);
195
+ case "a":
196
+ return E(p, x, !0);
197
+ case "A":
198
+ return E(p, x, !1);
199
+ case "m":
200
+ return String(x);
201
+ case "mm":
202
+ return a.s(x, 2, "0");
203
+ case "s":
204
+ return String(o.$s);
205
+ case "ss":
206
+ return a.s(o.$s, 2, "0");
207
+ case "SSS":
208
+ return a.s(o.$ms, 3, "0");
209
+ case "Z":
210
+ return h;
211
+ }
212
+ return null;
213
+ })(F) || h.replace(":", "");
214
+ }));
215
+ }, n.utcOffset = function() {
216
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
+ }, n.diff = function(t, o, r) {
218
+ var f, h = this, p = a.p(o), x = d(t), T = (x.utcOffset() - this.utcOffset()) * y, C = this - x, N = function() {
219
+ return a.m(h, x);
220
+ };
221
+ switch (p) {
222
+ case _:
223
+ f = N() / 12;
224
+ break;
225
+ case L:
226
+ f = N();
227
+ break;
228
+ case I:
229
+ f = N() / 3;
230
+ break;
231
+ case w:
232
+ f = (C - T) / 6048e5;
233
+ break;
234
+ case A:
235
+ f = (C - T) / 864e5;
236
+ break;
237
+ case D:
238
+ f = C / P;
239
+ break;
240
+ case H:
241
+ f = C / y;
242
+ break;
243
+ case O:
244
+ f = C / k;
245
+ break;
246
+ default:
247
+ f = C;
248
+ }
249
+ return r ? f : a.a(f);
250
+ }, n.daysInMonth = function() {
251
+ return this.endOf(L).$D;
252
+ }, n.$locale = function() {
253
+ return M[this.$L];
254
+ }, n.locale = function(t, o) {
255
+ if (!t) return this.$L;
256
+ var r = this.clone(), f = $(t, o, !0);
257
+ return f && (r.$L = f), r;
258
+ }, n.clone = function() {
259
+ return a.w(this.$d, this);
260
+ }, n.toDate = function() {
261
+ return new Date(this.valueOf());
262
+ }, n.toJSON = function() {
263
+ return this.isValid() ? this.toISOString() : null;
264
+ }, n.toISOString = function() {
265
+ return this.$d.toISOString();
266
+ }, n.toString = function() {
267
+ return this.$d.toUTCString();
268
+ }, s;
269
+ })(), Y = S.prototype;
270
+ return d.prototype = Y, [["$ms", W], ["$s", O], ["$m", H], ["$H", D], ["$W", A], ["$M", L], ["$y", _], ["$D", U]].forEach((function(s) {
271
+ Y[s[1]] = function(n) {
272
+ return this.$g(n, s[0], s[1]);
273
+ };
274
+ })), d.extend = function(s, n) {
275
+ return s.$i || (s(n, S, d), s.$i = !0), d;
276
+ }, d.locale = $, d.isDayjs = e, d.unix = function(s) {
277
+ return d(1e3 * s);
278
+ }, d.en = M[b], d.Ls = M, d.p = {}, d;
279
+ }));
280
+ })(tt)), tt.exports;
281
+ }
282
+ var Mt = vt();
283
+ const q = /* @__PURE__ */ st(Mt);
284
+ var et = { exports: {} }, pt = et.exports, ft;
285
+ function Dt() {
286
+ return ft || (ft = 1, (function(l, Z) {
287
+ (function(k, y) {
288
+ l.exports = y();
289
+ })(pt, (function() {
290
+ var k = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, y = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, P = /\d/, W = /\d\d/, O = /\d\d?/, H = /\d*[^-_:/,()\s\d]+/, D = {}, A = function(u) {
291
+ return (u = +u) + (u > 68 ? 1900 : 2e3);
292
+ }, w = function(u) {
293
+ return function(m) {
294
+ this[u] = +m;
295
+ };
296
+ }, L = [/[+-]\d\d:?(\d\d)?|Z/, function(u) {
297
+ (this.zone || (this.zone = {})).offset = (function(m) {
298
+ if (!m || m === "Z") return 0;
299
+ var g = m.match(/([+-]|\d\d)/g), v = 60 * g[1] + (+g[2] || 0);
300
+ return v === 0 ? 0 : g[0] === "+" ? -v : v;
301
+ })(u);
302
+ }], I = function(u) {
303
+ var m = D[u];
304
+ return m && (m.indexOf ? m : m.s.concat(m.f));
305
+ }, _ = function(u, m) {
306
+ var g, v = D.meridiem;
307
+ if (v) {
308
+ for (var j = 1; j <= 24; j += 1) if (u.indexOf(v(j, 0, m)) > -1) {
309
+ g = j > 12;
310
+ break;
311
+ }
312
+ } else g = u === (m ? "pm" : "PM");
313
+ return g;
314
+ }, U = { A: [H, function(u) {
315
+ this.afternoon = _(u, !1);
316
+ }], a: [H, function(u) {
317
+ this.afternoon = _(u, !0);
318
+ }], Q: [P, function(u) {
319
+ this.month = 3 * (u - 1) + 1;
320
+ }], S: [P, function(u) {
321
+ this.milliseconds = 100 * +u;
322
+ }], SS: [W, function(u) {
323
+ this.milliseconds = 10 * +u;
324
+ }], SSS: [/\d{3}/, function(u) {
325
+ this.milliseconds = +u;
326
+ }], s: [O, w("seconds")], ss: [O, w("seconds")], m: [O, w("minutes")], mm: [O, w("minutes")], H: [O, w("hours")], h: [O, w("hours")], HH: [O, w("hours")], hh: [O, w("hours")], D: [O, w("day")], DD: [W, w("day")], Do: [H, function(u) {
327
+ var m = D.ordinal, g = u.match(/\d+/);
328
+ if (this.day = g[0], m) for (var v = 1; v <= 31; v += 1) m(v).replace(/\[|\]/g, "") === u && (this.day = v);
329
+ }], w: [O, w("week")], ww: [W, w("week")], M: [O, w("month")], MM: [W, w("month")], MMM: [H, function(u) {
330
+ var m = I("months"), g = (I("monthsShort") || m.map((function(v) {
331
+ return v.slice(0, 3);
332
+ }))).indexOf(u) + 1;
333
+ if (g < 1) throw new Error();
334
+ this.month = g % 12 || g;
335
+ }], MMMM: [H, function(u) {
336
+ var m = I("months").indexOf(u) + 1;
337
+ if (m < 1) throw new Error();
338
+ this.month = m % 12 || m;
339
+ }], Y: [/[+-]?\d+/, w("year")], YY: [W, function(u) {
340
+ this.year = A(u);
341
+ }], YYYY: [/\d{4}/, w("year")], Z: L, ZZ: L };
342
+ function c(u) {
343
+ var m, g;
344
+ m = u, g = D && D.formats;
345
+ for (var v = (u = m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(d, a, S) {
346
+ var Y = S && S.toUpperCase();
347
+ return a || g[S] || k[S] || g[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(s, n, t) {
348
+ return n || t.slice(1);
349
+ }));
350
+ }))).match(y), j = v.length, b = 0; b < j; b += 1) {
351
+ var M = v[b], i = U[M], e = i && i[0], $ = i && i[1];
352
+ v[b] = $ ? { regex: e, parser: $ } : M.replace(/^\[|\]$/g, "");
353
+ }
354
+ return function(d) {
355
+ for (var a = {}, S = 0, Y = 0; S < j; S += 1) {
356
+ var s = v[S];
357
+ if (typeof s == "string") Y += s.length;
358
+ else {
359
+ var n = s.regex, t = s.parser, o = d.slice(Y), r = n.exec(o)[0];
360
+ t.call(a, r), d = d.replace(r, "");
361
+ }
362
+ }
363
+ return (function(f) {
364
+ var h = f.afternoon;
365
+ if (h !== void 0) {
366
+ var p = f.hours;
367
+ h ? p < 12 && (f.hours += 12) : p === 12 && (f.hours = 0), delete f.afternoon;
368
+ }
369
+ })(a), a;
370
+ };
371
+ }
372
+ return function(u, m, g) {
373
+ g.p.customParseFormat = !0, u && u.parseTwoDigitYear && (A = u.parseTwoDigitYear);
374
+ var v = m.prototype, j = v.parse;
375
+ v.parse = function(b) {
376
+ var M = b.date, i = b.utc, e = b.args;
377
+ this.$u = i;
378
+ var $ = e[1];
379
+ if (typeof $ == "string") {
380
+ var d = e[2] === !0, a = e[3] === !0, S = d || a, Y = e[2];
381
+ a && (Y = e[2]), D = this.$locale(), !d && Y && (D = g.Ls[Y]), this.$d = (function(o, r, f, h) {
382
+ try {
383
+ if (["x", "X"].indexOf(r) > -1) return new Date((r === "X" ? 1e3 : 1) * o);
384
+ var p = c(r)(o), x = p.year, T = p.month, C = p.day, N = p.hours, V = p.minutes, J = p.seconds, X = p.milliseconds, E = p.zone, F = p.week, z = /* @__PURE__ */ new Date(), R = C || (x || T ? 1 : z.getDate()), Q = x || z.getFullYear(), G = 0;
385
+ x && !T || (G = T > 0 ? T - 1 : z.getMonth());
386
+ var K, it = N || 0, ot = V || 0, ut = J || 0, at = X || 0;
387
+ return E ? new Date(Date.UTC(Q, G, R, it, ot, ut, at + 60 * E.offset * 1e3)) : f ? new Date(Date.UTC(Q, G, R, it, ot, ut, at)) : (K = new Date(Q, G, R, it, ot, ut, at), F && (K = h(K).week(F).toDate()), K);
388
+ } catch {
389
+ return /* @__PURE__ */ new Date("");
390
+ }
391
+ })(M, $, i, g), this.init(), Y && Y !== !0 && (this.$L = this.locale(Y).$L), S && M != this.format($) && (this.$d = /* @__PURE__ */ new Date("")), D = {};
392
+ } else if ($ instanceof Array) for (var s = $.length, n = 1; n <= s; n += 1) {
393
+ e[1] = $[n - 1];
394
+ var t = g.apply(this, e);
395
+ if (t.isValid()) {
396
+ this.$d = t.$d, this.$L = t.$L, this.init();
397
+ break;
398
+ }
399
+ n === s && (this.$d = /* @__PURE__ */ new Date(""));
400
+ }
401
+ else j.call(this, b);
402
+ };
403
+ };
404
+ }));
405
+ })(et)), et.exports;
406
+ }
407
+ var yt = Dt();
408
+ const lt = /* @__PURE__ */ st(yt);
409
+ q.extend(lt);
410
+ function Lt(l) {
411
+ if (l)
412
+ return q(l, "HH:mm:ss.SSS");
413
+ }
414
+ function _t(l) {
415
+ if (l)
416
+ return l.format("HH:mm:ss.SSS");
417
+ }
418
+ function Ct(l) {
419
+ if (l)
420
+ return q(l);
421
+ }
422
+ var nt = { exports: {} }, gt = nt.exports, ht;
423
+ function St() {
424
+ return ht || (ht = 1, (function(l, Z) {
425
+ (function(k, y) {
426
+ l.exports = y();
427
+ })(gt, (function() {
428
+ var k = "minute", y = /[+-]\d\d(?::?\d\d)?/g, P = /([+-]|\d\d)/g;
429
+ return function(W, O, H) {
430
+ var D = O.prototype;
431
+ H.utc = function(c) {
432
+ var u = { date: c, utc: !0, args: arguments };
433
+ return new O(u);
434
+ }, D.utc = function(c) {
435
+ var u = H(this.toDate(), { locale: this.$L, utc: !0 });
436
+ return c ? u.add(this.utcOffset(), k) : u;
437
+ }, D.local = function() {
438
+ return H(this.toDate(), { locale: this.$L, utc: !1 });
439
+ };
440
+ var A = D.parse;
441
+ D.parse = function(c) {
442
+ c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), A.call(this, c);
443
+ };
444
+ var w = D.init;
445
+ D.init = function() {
446
+ if (this.$u) {
447
+ var c = this.$d;
448
+ this.$y = c.getUTCFullYear(), this.$M = c.getUTCMonth(), this.$D = c.getUTCDate(), this.$W = c.getUTCDay(), this.$H = c.getUTCHours(), this.$m = c.getUTCMinutes(), this.$s = c.getUTCSeconds(), this.$ms = c.getUTCMilliseconds();
449
+ } else w.call(this);
450
+ };
451
+ var L = D.utcOffset;
452
+ D.utcOffset = function(c, u) {
453
+ var m = this.$utils().u;
454
+ if (m(c)) return this.$u ? 0 : m(this.$offset) ? L.call(this) : this.$offset;
455
+ if (typeof c == "string" && (c = (function(b) {
456
+ b === void 0 && (b = "");
457
+ var M = b.match(y);
458
+ if (!M) return null;
459
+ var i = ("" + M[0]).match(P) || ["-", 0, 0], e = i[0], $ = 60 * +i[1] + +i[2];
460
+ return $ === 0 ? 0 : e === "+" ? $ : -$;
461
+ })(c), c === null)) return this;
462
+ var g = Math.abs(c) <= 16 ? 60 * c : c, v = this;
463
+ if (u) return v.$offset = g, v.$u = c === 0, v;
464
+ if (c !== 0) {
465
+ var j = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
466
+ (v = this.local().add(g + j, k)).$offset = g, v.$x.$localOffset = j;
467
+ } else v = this.utc();
468
+ return v;
469
+ };
470
+ var I = D.format;
471
+ D.format = function(c) {
472
+ var u = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
473
+ return I.call(this, u);
474
+ }, D.valueOf = function() {
475
+ var c = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
476
+ return this.$d.valueOf() - 6e4 * c;
477
+ }, D.isUTC = function() {
478
+ return !!this.$u;
479
+ }, D.toISOString = function() {
480
+ return this.toDate().toISOString();
481
+ }, D.toString = function() {
482
+ return this.toDate().toUTCString();
483
+ };
484
+ var _ = D.toDate;
485
+ D.toDate = function(c) {
486
+ return c === "s" && this.$offset ? H(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : _.call(this);
487
+ };
488
+ var U = D.diff;
489
+ D.diff = function(c, u, m) {
490
+ if (c && this.$u === c.$u) return U.call(this, c, u, m);
491
+ var g = this.local(), v = H(c).local();
492
+ return U.call(g, v, u, m);
493
+ };
494
+ };
495
+ }));
496
+ })(nt)), nt.exports;
497
+ }
498
+ var Yt = St();
499
+ const wt = /* @__PURE__ */ st(Yt);
500
+ q.extend(wt);
501
+ function Ot(l) {
502
+ return l.clone().utc(!0);
503
+ }
504
+ function At(l) {
505
+ if (l)
506
+ return Ot(l).startOf("day").format("YYYY-MM-DD");
507
+ }
508
+ q.extend(lt);
509
+ function Ut(l) {
510
+ if (l)
511
+ return q(l, "YYYY-MM-DDTHH:mm:ss.SSSZ");
512
+ }
513
+ function jt(l) {
514
+ if (l)
515
+ return l.format("YYYY-MM-DDTHH:mm:ss.SSSZ");
516
+ }
517
+ var rt = { exports: {} }, xt = rt.exports, dt;
518
+ function Tt() {
519
+ return dt || (dt = 1, (function(l, Z) {
520
+ (function(k, y) {
521
+ l.exports = y();
522
+ })(xt, (function() {
523
+ var k, y, P = 1e3, W = 6e4, O = 36e5, H = 864e5, 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, A = 31536e6, w = 2628e6, L = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, I = { years: A, months: w, days: H, hours: O, minutes: W, seconds: P, milliseconds: 1, weeks: 6048e5 }, _ = function(M) {
524
+ return M instanceof j;
525
+ }, U = function(M, i, e) {
526
+ return new j(M, e, i.$l);
527
+ }, c = function(M) {
528
+ return y.p(M) + "s";
529
+ }, u = function(M) {
530
+ return M < 0;
531
+ }, m = function(M) {
532
+ return u(M) ? Math.ceil(M) : Math.floor(M);
533
+ }, g = function(M) {
534
+ return Math.abs(M);
535
+ }, v = function(M, i) {
536
+ return M ? u(M) ? { negative: !0, format: "" + g(M) + i } : { negative: !1, format: "" + M + i } : { negative: !1, format: "" };
537
+ }, j = (function() {
538
+ function M(e, $, d) {
539
+ var a = this;
540
+ if (this.$d = {}, this.$l = d, e === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), $) return U(e * I[c($)], this);
541
+ if (typeof e == "number") return this.$ms = e, this.parseFromMilliseconds(), this;
542
+ if (typeof e == "object") return Object.keys(e).forEach((function(s) {
543
+ a.$d[c(s)] = e[s];
544
+ })), this.calMilliseconds(), this;
545
+ if (typeof e == "string") {
546
+ var S = e.match(L);
547
+ if (S) {
548
+ var Y = S.slice(2).map((function(s) {
549
+ return s != null ? Number(s) : 0;
550
+ }));
551
+ return this.$d.years = Y[0], this.$d.months = Y[1], this.$d.weeks = Y[2], this.$d.days = Y[3], this.$d.hours = Y[4], this.$d.minutes = Y[5], this.$d.seconds = Y[6], this.calMilliseconds(), this;
552
+ }
553
+ }
554
+ return this;
555
+ }
556
+ var i = M.prototype;
557
+ return i.calMilliseconds = function() {
558
+ var e = this;
559
+ this.$ms = Object.keys(this.$d).reduce((function($, d) {
560
+ return $ + (e.$d[d] || 0) * I[d];
561
+ }), 0);
562
+ }, i.parseFromMilliseconds = function() {
563
+ var e = this.$ms;
564
+ this.$d.years = m(e / A), e %= A, this.$d.months = m(e / w), e %= w, this.$d.days = m(e / H), e %= H, this.$d.hours = m(e / O), e %= O, this.$d.minutes = m(e / W), e %= W, this.$d.seconds = m(e / P), e %= P, this.$d.milliseconds = e;
565
+ }, i.toISOString = function() {
566
+ var e = v(this.$d.years, "Y"), $ = v(this.$d.months, "M"), d = +this.$d.days || 0;
567
+ this.$d.weeks && (d += 7 * this.$d.weeks);
568
+ var a = v(d, "D"), S = v(this.$d.hours, "H"), Y = v(this.$d.minutes, "M"), s = this.$d.seconds || 0;
569
+ this.$d.milliseconds && (s += this.$d.milliseconds / 1e3, s = Math.round(1e3 * s) / 1e3);
570
+ var n = v(s, "S"), t = e.negative || $.negative || a.negative || S.negative || Y.negative || n.negative, o = S.format || Y.format || n.format ? "T" : "", r = (t ? "-" : "") + "P" + e.format + $.format + a.format + o + S.format + Y.format + n.format;
571
+ return r === "P" || r === "-P" ? "P0D" : r;
572
+ }, i.toJSON = function() {
573
+ return this.toISOString();
574
+ }, i.format = function(e) {
575
+ var $ = e || "YYYY-MM-DDTHH:mm:ss", d = { Y: this.$d.years, YY: y.s(this.$d.years, 2, "0"), YYYY: y.s(this.$d.years, 4, "0"), M: this.$d.months, MM: y.s(this.$d.months, 2, "0"), D: this.$d.days, DD: y.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: y.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: y.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: y.s(this.$d.seconds, 2, "0"), SSS: y.s(this.$d.milliseconds, 3, "0") };
576
+ return $.replace(D, (function(a, S) {
577
+ return S || String(d[a]);
578
+ }));
579
+ }, i.as = function(e) {
580
+ return this.$ms / I[c(e)];
581
+ }, i.get = function(e) {
582
+ var $ = this.$ms, d = c(e);
583
+ return d === "milliseconds" ? $ %= 1e3 : $ = d === "weeks" ? m($ / I[d]) : this.$d[d], $ || 0;
584
+ }, i.add = function(e, $, d) {
585
+ var a;
586
+ return a = $ ? e * I[c($)] : _(e) ? e.$ms : U(e, this).$ms, U(this.$ms + a * (d ? -1 : 1), this);
587
+ }, i.subtract = function(e, $) {
588
+ return this.add(e, $, !0);
589
+ }, i.locale = function(e) {
590
+ var $ = this.clone();
591
+ return $.$l = e, $;
592
+ }, i.clone = function() {
593
+ return U(this.$ms, this);
594
+ }, i.humanize = function(e) {
595
+ return k().add(this.$ms, "ms").locale(this.$l).fromNow(!e);
596
+ }, i.valueOf = function() {
597
+ return this.asMilliseconds();
598
+ }, i.milliseconds = function() {
599
+ return this.get("milliseconds");
600
+ }, i.asMilliseconds = function() {
601
+ return this.as("milliseconds");
602
+ }, i.seconds = function() {
603
+ return this.get("seconds");
604
+ }, i.asSeconds = function() {
605
+ return this.as("seconds");
606
+ }, i.minutes = function() {
607
+ return this.get("minutes");
608
+ }, i.asMinutes = function() {
609
+ return this.as("minutes");
610
+ }, i.hours = function() {
611
+ return this.get("hours");
612
+ }, i.asHours = function() {
613
+ return this.as("hours");
614
+ }, i.days = function() {
615
+ return this.get("days");
616
+ }, i.asDays = function() {
617
+ return this.as("days");
618
+ }, i.weeks = function() {
619
+ return this.get("weeks");
620
+ }, i.asWeeks = function() {
621
+ return this.as("weeks");
622
+ }, i.months = function() {
623
+ return this.get("months");
624
+ }, i.asMonths = function() {
625
+ return this.as("months");
626
+ }, i.years = function() {
627
+ return this.get("years");
628
+ }, i.asYears = function() {
629
+ return this.as("years");
630
+ }, M;
631
+ })(), b = function(M, i, e) {
632
+ return M.add(i.years() * e, "y").add(i.months() * e, "M").add(i.days() * e, "d").add(i.hours() * e, "h").add(i.minutes() * e, "m").add(i.seconds() * e, "s").add(i.milliseconds() * e, "ms");
633
+ };
634
+ return function(M, i, e) {
635
+ k = e, y = e().$utils(), e.duration = function(a, S) {
636
+ var Y = e.locale();
637
+ return U(a, { $l: Y }, S);
638
+ }, e.isDuration = _;
639
+ var $ = i.prototype.add, d = i.prototype.subtract;
640
+ i.prototype.add = function(a, S) {
641
+ return _(a) ? b(this, a, 1) : $.bind(this)(a, S);
642
+ }, i.prototype.subtract = function(a, S) {
643
+ return _(a) ? b(this, a, -1) : d.bind(this)(a, S);
644
+ };
645
+ };
646
+ }));
647
+ })(rt)), rt.exports;
648
+ }
649
+ var Ht = Tt();
650
+ const mt = /* @__PURE__ */ st(Ht), B = (l) => Number.parseInt(l ?? "0");
651
+ function bt(l) {
652
+ const Z = l.match(/^(-)?(\d+)?\.?(\d{2}):(\d{2}):(\d{2})\.?(\d{3})?$/);
653
+ return {
654
+ sign: Z?.[1],
655
+ values: {
656
+ days: B(Z?.[2]),
657
+ hours: B(Z?.[3]),
658
+ minutes: B(Z?.[4]),
659
+ seconds: B(Z?.[5]),
660
+ milliseconds: B(Z?.[6])
661
+ }
662
+ };
663
+ }
664
+ q.extend(mt);
665
+ function Ft(l) {
666
+ if (!l)
667
+ return;
668
+ const Z = bt(l), k = Z.sign === "-", y = q.duration(Z.values);
669
+ return k ? q.duration(-y.asMilliseconds()) : y;
670
+ }
671
+ q.extend(mt);
672
+ function Pt(l) {
673
+ if (!l)
674
+ return;
675
+ const Z = l.asMilliseconds() < 0, k = q.duration(Math.abs(l.asMilliseconds())), y = Math.floor(k.asDays());
676
+ let P = "";
677
+ return Z && (P += "-"), y > 0 && (P += `${y}.`), P += k.format("HH:mm:ss.SSS"), P;
678
+ }
679
+ export {
680
+ Ot as dropLocalOffset,
681
+ Ct as fromApiDate,
682
+ Ut as fromApiDateTimeOffset,
683
+ Lt as fromApiTime,
684
+ Ft as fromApiTimeSpan,
685
+ At as toApiDate,
686
+ jt as toApiDateTimeOffset,
687
+ _t as toApiTime,
688
+ Pt as toApiTimeSpan
689
+ };