@alfadocs/ui-kit 0.89.0 → 0.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/_chunks/{antenatal-schedule-timeline-UiZQze4P.js → antenatal-schedule-timeline-BMMpi2lb.js} +17 -17
  2. package/dist/_chunks/apexcharts-theme-fAQXLIMW.js +67 -0
  3. package/dist/_chunks/{appointment-timeline-CwpbQGC1.js → appointment-timeline-BB-c1LeR.js} +2 -2
  4. package/dist/_chunks/{ar-C9FRRqJs.js → ar-THMLfSoN.js} +22 -22
  5. package/dist/_chunks/{booking-DEwmDprH.js → booking-BSpSMmJ2.js} +4 -4
  6. package/dist/_chunks/{chart-CNaLgvx4.js → chart-DqxVCm1I.js} +288 -257
  7. package/dist/_chunks/{cycle-calculator-DXSNIWFk.js → cycle-calculator-DNvvr0bP.js} +3 -3
  8. package/dist/_chunks/date-picker-BP_W6VtE.js +265 -0
  9. package/dist/_chunks/{date-picker-variants-D9B6hg15.js → date-picker-variants-eL6HjWvw.js} +966 -841
  10. package/dist/_chunks/date-range-picker-Cfv4Sr63.js +832 -0
  11. package/dist/_chunks/{date-time-picker-BU-j0qj4.js → date-time-picker-695QvBGj.js} +2 -2
  12. package/dist/_chunks/{de-C3_KZ6mR.js → de-DmZ-8rTN.js} +4 -4
  13. package/dist/_chunks/{due-date-calculator-BR_GuqHH.js → due-date-calculator-BEcdoy_E.js} +3 -3
  14. package/dist/_chunks/{el-v9xDKHgu.js → el-Bela9mxs.js} +6 -6
  15. package/dist/_chunks/{es-Lgmjq9Rp.js → es-BNncHKex.js} +10 -10
  16. package/dist/_chunks/{fr-INS1OD7m.js → fr-CH8ADfhN.js} +12 -12
  17. package/dist/_chunks/{gestational-age-calculator-DBIcxfjP.js → gestational-age-calculator-CuGkVqKp.js} +5 -5
  18. package/dist/_chunks/{hcg-doubling-BgCkds8R.js → hcg-doubling-fZ6qQN08.js} +2 -2
  19. package/dist/_chunks/{hi-BUYtlosF.js → hi-Bppfxp8l.js} +16 -16
  20. package/dist/_chunks/{isSameWeek-BUNsv4OO.js → isSameWeek-CK4HS9lH.js} +2 -2
  21. package/dist/_chunks/{it-VfsdUqeV.js → it-B4ySaRyK.js} +24 -24
  22. package/dist/_chunks/{ja-Dfk9qwzE.js → ja-CGF6Io9P.js} +12 -12
  23. package/dist/_chunks/{link-cell-renderer-BzITwSXq.js → link-cell-renderer-_LDZhY4r.js} +214 -197
  24. package/dist/_chunks/{nl-Crxwg0IZ.js → nl-DuShqwuV.js} +12 -12
  25. package/dist/_chunks/parse-DvA97ro9.js +1601 -0
  26. package/dist/_chunks/{patient-details-Dggsz-ki.js → patient-details-DrhlTrLf.js} +2 -2
  27. package/dist/_chunks/{patient-table-ps4byVwA.js → patient-table-CFM92QqU.js} +2 -2
  28. package/dist/_chunks/{pl-IdHtxWTl.js → pl-CKQwX9Fk.js} +22 -22
  29. package/dist/_chunks/{pregnancy-dating-CvIRwWaG.js → pregnancy-dating-BdFl-rB1.js} +5 -5
  30. package/dist/_chunks/{pt-CY2m2bBz.js → pt-_njpXyOZ.js} +16 -16
  31. package/dist/_chunks/{radiograph-panel.agent-C93AXgtV.js → radiograph-panel.agent-DDnDGVpN.js} +3 -3
  32. package/dist/_chunks/{ro-qoxLkXED.js → ro-3X6_4FcN.js} +14 -14
  33. package/dist/_chunks/{ru-BVZlxoKf.js → ru-bAcgmnS-.js} +20 -20
  34. package/dist/_chunks/{sparkline-iOXYgvJe.js → sparkline-o6JH4O66.js} +2 -2
  35. package/dist/_chunks/{sq--eT8hIiD.js → sq-jYFqr4Ga.js} +6 -6
  36. package/dist/_chunks/subDays-BcNi04uf.js +8 -0
  37. package/dist/_chunks/{sv-BGNQ5gX6.js → sv-BSGEJ-8B.js} +10 -10
  38. package/dist/_chunks/{tr-B2NEu6Gy.js → tr-CTpgUtw6.js} +14 -14
  39. package/dist/_chunks/{zh-CN-DClT1wDk.js → zh-CN-BgM0Io2O.js} +22 -22
  40. package/dist/agent-catalog.json +101 -2
  41. package/dist/agent-i18n/en.json +8 -2
  42. package/dist/components/_shared/calendar-class-names.d.ts +5 -0
  43. package/dist/components/_shared/date-picker-variants.d.ts +23 -1
  44. package/dist/components/_shared/index.d.ts +2 -2
  45. package/dist/components/appointment-timeline/index.js +1 -1
  46. package/dist/components/booking/index.js +1 -1
  47. package/dist/components/chart/chart.d.ts +20 -0
  48. package/dist/components/chart/index.js +1 -1
  49. package/dist/components/cycle-calculator/index.js +1 -1
  50. package/dist/components/data-table/filters/date-range-filter.d.ts +13 -0
  51. package/dist/components/data-table/index.js +1 -1
  52. package/dist/components/date-picker/index.js +1 -1
  53. package/dist/components/date-range-picker/date-range-picker.d.ts +91 -1
  54. package/dist/components/date-range-picker/index.d.ts +1 -1
  55. package/dist/components/date-range-picker/index.js +1 -1
  56. package/dist/components/date-time-picker/index.js +1 -1
  57. package/dist/components/due-date-calculator/index.js +2 -2
  58. package/dist/components/gestational-age-calculator/index.js +1 -1
  59. package/dist/components/hcg-doubling/index.js +1 -1
  60. package/dist/components/patient-details/index.js +1 -1
  61. package/dist/components/patient-table/index.js +1 -1
  62. package/dist/components/pregnancy-dating/index.js +1 -1
  63. package/dist/components/radiograph-panel/index.js +1 -1
  64. package/dist/components/sparkline/index.js +1 -1
  65. package/dist/i18n/locales/ar.d.ts +24 -0
  66. package/dist/i18n/locales/ar.js +24 -0
  67. package/dist/i18n/locales/de.d.ts +24 -0
  68. package/dist/i18n/locales/de.js +24 -0
  69. package/dist/i18n/locales/el.d.ts +24 -0
  70. package/dist/i18n/locales/el.js +24 -0
  71. package/dist/i18n/locales/en.d.ts +24 -0
  72. package/dist/i18n/locales/en.js +24 -0
  73. package/dist/i18n/locales/es.d.ts +24 -0
  74. package/dist/i18n/locales/es.js +24 -0
  75. package/dist/i18n/locales/fr.d.ts +24 -0
  76. package/dist/i18n/locales/fr.js +24 -0
  77. package/dist/i18n/locales/hi.d.ts +24 -0
  78. package/dist/i18n/locales/hi.js +24 -0
  79. package/dist/i18n/locales/it.d.ts +24 -0
  80. package/dist/i18n/locales/it.js +24 -0
  81. package/dist/i18n/locales/ja.d.ts +24 -0
  82. package/dist/i18n/locales/ja.js +24 -0
  83. package/dist/i18n/locales/nl.d.ts +24 -0
  84. package/dist/i18n/locales/nl.js +24 -0
  85. package/dist/i18n/locales/pl.d.ts +24 -0
  86. package/dist/i18n/locales/pl.js +24 -0
  87. package/dist/i18n/locales/pt.d.ts +24 -0
  88. package/dist/i18n/locales/pt.js +24 -0
  89. package/dist/i18n/locales/ro.d.ts +24 -0
  90. package/dist/i18n/locales/ro.js +24 -0
  91. package/dist/i18n/locales/ru.d.ts +24 -0
  92. package/dist/i18n/locales/ru.js +24 -0
  93. package/dist/i18n/locales/sq.d.ts +24 -0
  94. package/dist/i18n/locales/sq.js +24 -0
  95. package/dist/i18n/locales/sv.d.ts +24 -0
  96. package/dist/i18n/locales/sv.js +24 -0
  97. package/dist/i18n/locales/tr.d.ts +24 -0
  98. package/dist/i18n/locales/tr.js +24 -0
  99. package/dist/i18n/locales/zh.d.ts +24 -0
  100. package/dist/i18n/locales/zh.js +24 -0
  101. package/dist/index.js +17 -17
  102. package/dist/locales/ar.json +24 -0
  103. package/dist/locales/de.json +24 -0
  104. package/dist/locales/el.json +24 -0
  105. package/dist/locales/en.json +24 -0
  106. package/dist/locales/es.json +24 -0
  107. package/dist/locales/fr.json +24 -0
  108. package/dist/locales/hi.json +24 -0
  109. package/dist/locales/it.json +24 -0
  110. package/dist/locales/ja.json +24 -0
  111. package/dist/locales/nl.json +24 -0
  112. package/dist/locales/pl.json +24 -0
  113. package/dist/locales/pt.json +24 -0
  114. package/dist/locales/ro.json +24 -0
  115. package/dist/locales/ru.json +24 -0
  116. package/dist/locales/sq.json +24 -0
  117. package/dist/locales/sv.json +24 -0
  118. package/dist/locales/tr.json +24 -0
  119. package/dist/locales/zh.json +24 -0
  120. package/dist/tokens/apexcharts-theme.d.ts +36 -1
  121. package/dist/tokens.css +1 -1
  122. package/package.json +1 -1
  123. package/dist/_chunks/apexcharts-theme-BJigns_V.js +0 -53
  124. package/dist/_chunks/date-picker-ffmyjvlI.js +0 -1845
  125. package/dist/_chunks/date-range-picker-DSOH50-f.js +0 -325
  126. package/dist/_chunks/subDays-fEHRx4hg.js +0 -8
@@ -0,0 +1,1601 @@
1
+ var re = Object.defineProperty;
2
+ var te = (s, n, e) => n in s ? re(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
3
+ var i = (s, n, e) => te(s, typeof n != "symbol" ? n + "" : n, e);
4
+ import { I as K, J as se, s as H, K as $, L as ne, M as ae, a as V, N as j, O as ie, P as z, Q as oe, R as Z, S as ce } from "./date-picker-variants-eL6HjWvw.js";
5
+ import { t as p, c as k, m as ue, a as le, b as de } from "./isSameDay-DUEiAT0G.js";
6
+ function we() {
7
+ return Object.assign({}, K());
8
+ }
9
+ function fe(s, n) {
10
+ const e = p(s, n == null ? void 0 : n.in).getDay();
11
+ return e === 0 ? 7 : e;
12
+ }
13
+ function he(s, n) {
14
+ const e = ye(n) ? new n(0) : k(n, 0);
15
+ return e.setFullYear(s.getFullYear(), s.getMonth(), s.getDate()), e.setHours(
16
+ s.getHours(),
17
+ s.getMinutes(),
18
+ s.getSeconds(),
19
+ s.getMilliseconds()
20
+ ), e;
21
+ }
22
+ function ye(s) {
23
+ var n;
24
+ return typeof s == "function" && ((n = s.prototype) == null ? void 0 : n.constructor) === s;
25
+ }
26
+ const xe = 10;
27
+ class U {
28
+ constructor() {
29
+ i(this, "subPriority", 0);
30
+ }
31
+ validate(n, e) {
32
+ return !0;
33
+ }
34
+ }
35
+ class be extends U {
36
+ constructor(n, e, r, t, a) {
37
+ super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = t, a && (this.subPriority = a);
38
+ }
39
+ validate(n, e) {
40
+ return this.validateValue(n, this.value, e);
41
+ }
42
+ set(n, e, r) {
43
+ return this.setValue(n, e, this.value, r);
44
+ }
45
+ }
46
+ class me extends U {
47
+ constructor(e, r) {
48
+ super();
49
+ i(this, "priority", xe);
50
+ i(this, "subPriority", -1);
51
+ this.context = e || ((t) => k(r, t));
52
+ }
53
+ set(e, r) {
54
+ return r.timestampIsSet ? e : k(e, he(e, this.context));
55
+ }
56
+ }
57
+ class u {
58
+ run(n, e, r, t) {
59
+ const a = this.parse(n, e, r, t);
60
+ return a ? {
61
+ setter: new be(
62
+ a.value,
63
+ this.validate,
64
+ this.set,
65
+ this.priority,
66
+ this.subPriority
67
+ ),
68
+ rest: a.rest
69
+ } : null;
70
+ }
71
+ validate(n, e, r) {
72
+ return !0;
73
+ }
74
+ }
75
+ class Te extends u {
76
+ constructor() {
77
+ super(...arguments);
78
+ i(this, "priority", 140);
79
+ i(this, "incompatibleTokens", ["R", "u", "t", "T"]);
80
+ }
81
+ parse(e, r, t) {
82
+ switch (r) {
83
+ // AD, BC
84
+ case "G":
85
+ case "GG":
86
+ case "GGG":
87
+ return t.era(e, { width: "abbreviated" }) || t.era(e, { width: "narrow" });
88
+ // A, B
89
+ case "GGGGG":
90
+ return t.era(e, { width: "narrow" });
91
+ // Anno Domini, Before Christ
92
+ case "GGGG":
93
+ default:
94
+ return t.era(e, { width: "wide" }) || t.era(e, { width: "abbreviated" }) || t.era(e, { width: "narrow" });
95
+ }
96
+ }
97
+ set(e, r, t) {
98
+ return r.era = t, e.setFullYear(t, 0, 1), e.setHours(0, 0, 0, 0), e;
99
+ }
100
+ }
101
+ const f = {
102
+ month: /^(1[0-2]|0?\d)/,
103
+ // 0 to 12
104
+ date: /^(3[0-1]|[0-2]?\d)/,
105
+ // 0 to 31
106
+ dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
107
+ // 0 to 366
108
+ week: /^(5[0-3]|[0-4]?\d)/,
109
+ // 0 to 53
110
+ hour23h: /^(2[0-3]|[0-1]?\d)/,
111
+ // 0 to 23
112
+ hour24h: /^(2[0-4]|[0-1]?\d)/,
113
+ // 0 to 24
114
+ hour11h: /^(1[0-1]|0?\d)/,
115
+ // 0 to 11
116
+ hour12h: /^(1[0-2]|0?\d)/,
117
+ // 0 to 12
118
+ minute: /^[0-5]?\d/,
119
+ // 0 to 59
120
+ second: /^[0-5]?\d/,
121
+ // 0 to 59
122
+ singleDigit: /^\d/,
123
+ // 0 to 9
124
+ twoDigits: /^\d{1,2}/,
125
+ // 0 to 99
126
+ threeDigits: /^\d{1,3}/,
127
+ // 0 to 999
128
+ fourDigits: /^\d{1,4}/,
129
+ // 0 to 9999
130
+ anyDigitsSigned: /^-?\d+/,
131
+ singleDigitSigned: /^-?\d/,
132
+ // 0 to 9, -0 to -9
133
+ twoDigitsSigned: /^-?\d{1,2}/,
134
+ // 0 to 99, -0 to -99
135
+ threeDigitsSigned: /^-?\d{1,3}/,
136
+ // 0 to 999, -0 to -999
137
+ fourDigitsSigned: /^-?\d{1,4}/
138
+ // 0 to 9999, -0 to -9999
139
+ }, b = {
140
+ basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
141
+ basic: /^([+-])(\d{2})(\d{2})|Z/,
142
+ basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
143
+ extended: /^([+-])(\d{2}):(\d{2})|Z/,
144
+ extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
145
+ };
146
+ function h(s, n) {
147
+ return s && {
148
+ value: n(s.value),
149
+ rest: s.rest
150
+ };
151
+ }
152
+ function l(s, n) {
153
+ const e = n.match(s);
154
+ return e ? {
155
+ value: parseInt(e[0], 10),
156
+ rest: n.slice(e[0].length)
157
+ } : null;
158
+ }
159
+ function m(s, n) {
160
+ const e = n.match(s);
161
+ if (!e)
162
+ return null;
163
+ if (e[0] === "Z")
164
+ return {
165
+ value: 0,
166
+ rest: n.slice(1)
167
+ };
168
+ const r = e[1] === "+" ? 1 : -1, t = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, o = e[5] ? parseInt(e[5], 10) : 0;
169
+ return {
170
+ value: r * (t * ue + a * le + o * de),
171
+ rest: n.slice(e[0].length)
172
+ };
173
+ }
174
+ function J(s) {
175
+ return l(f.anyDigitsSigned, s);
176
+ }
177
+ function w(s, n) {
178
+ switch (s) {
179
+ case 1:
180
+ return l(f.singleDigit, n);
181
+ case 2:
182
+ return l(f.twoDigits, n);
183
+ case 3:
184
+ return l(f.threeDigits, n);
185
+ case 4:
186
+ return l(f.fourDigits, n);
187
+ default:
188
+ return l(new RegExp("^\\d{1," + s + "}"), n);
189
+ }
190
+ }
191
+ function O(s, n) {
192
+ switch (s) {
193
+ case 1:
194
+ return l(f.singleDigitSigned, n);
195
+ case 2:
196
+ return l(f.twoDigitsSigned, n);
197
+ case 3:
198
+ return l(f.threeDigitsSigned, n);
199
+ case 4:
200
+ return l(f.fourDigitsSigned, n);
201
+ default:
202
+ return l(new RegExp("^-?\\d{1," + s + "}"), n);
203
+ }
204
+ }
205
+ function I(s) {
206
+ switch (s) {
207
+ case "morning":
208
+ return 4;
209
+ case "evening":
210
+ return 17;
211
+ case "pm":
212
+ case "noon":
213
+ case "afternoon":
214
+ return 12;
215
+ case "am":
216
+ case "midnight":
217
+ case "night":
218
+ default:
219
+ return 0;
220
+ }
221
+ }
222
+ function S(s, n) {
223
+ const e = n > 0, r = e ? n : 1 - n;
224
+ let t;
225
+ if (r <= 50)
226
+ t = s || 100;
227
+ else {
228
+ const a = r + 50, o = Math.trunc(a / 100) * 100, y = s >= a % 100;
229
+ t = s + o - (y ? 100 : 0);
230
+ }
231
+ return e ? t : 1 - t;
232
+ }
233
+ function ee(s) {
234
+ return s % 400 === 0 || s % 4 === 0 && s % 100 !== 0;
235
+ }
236
+ class De extends u {
237
+ constructor() {
238
+ super(...arguments);
239
+ i(this, "priority", 130);
240
+ i(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
241
+ }
242
+ parse(e, r, t) {
243
+ const a = (o) => ({
244
+ year: o,
245
+ isTwoDigitYear: r === "yy"
246
+ });
247
+ switch (r) {
248
+ case "y":
249
+ return h(w(4, e), a);
250
+ case "yo":
251
+ return h(
252
+ t.ordinalNumber(e, {
253
+ unit: "year"
254
+ }),
255
+ a
256
+ );
257
+ default:
258
+ return h(w(r.length, e), a);
259
+ }
260
+ }
261
+ validate(e, r) {
262
+ return r.isTwoDigitYear || r.year > 0;
263
+ }
264
+ set(e, r, t) {
265
+ const a = e.getFullYear();
266
+ if (t.isTwoDigitYear) {
267
+ const y = S(
268
+ t.year,
269
+ a
270
+ );
271
+ return e.setFullYear(y, 0, 1), e.setHours(0, 0, 0, 0), e;
272
+ }
273
+ const o = !("era" in r) || r.era === 1 ? t.year : 1 - t.year;
274
+ return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
275
+ }
276
+ }
277
+ class ke extends u {
278
+ constructor() {
279
+ super(...arguments);
280
+ i(this, "priority", 130);
281
+ i(this, "incompatibleTokens", [
282
+ "y",
283
+ "R",
284
+ "u",
285
+ "Q",
286
+ "q",
287
+ "M",
288
+ "L",
289
+ "I",
290
+ "d",
291
+ "D",
292
+ "i",
293
+ "t",
294
+ "T"
295
+ ]);
296
+ }
297
+ parse(e, r, t) {
298
+ const a = (o) => ({
299
+ year: o,
300
+ isTwoDigitYear: r === "YY"
301
+ });
302
+ switch (r) {
303
+ case "Y":
304
+ return h(w(4, e), a);
305
+ case "Yo":
306
+ return h(
307
+ t.ordinalNumber(e, {
308
+ unit: "year"
309
+ }),
310
+ a
311
+ );
312
+ default:
313
+ return h(w(r.length, e), a);
314
+ }
315
+ }
316
+ validate(e, r) {
317
+ return r.isTwoDigitYear || r.year > 0;
318
+ }
319
+ set(e, r, t, a) {
320
+ const o = se(e, a);
321
+ if (t.isTwoDigitYear) {
322
+ const T = S(
323
+ t.year,
324
+ o
325
+ );
326
+ return e.setFullYear(
327
+ T,
328
+ 0,
329
+ a.firstWeekContainsDate
330
+ ), e.setHours(0, 0, 0, 0), H(e, a);
331
+ }
332
+ const y = !("era" in r) || r.era === 1 ? t.year : 1 - t.year;
333
+ return e.setFullYear(y, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), H(e, a);
334
+ }
335
+ }
336
+ class pe extends u {
337
+ constructor() {
338
+ super(...arguments);
339
+ i(this, "priority", 130);
340
+ i(this, "incompatibleTokens", [
341
+ "G",
342
+ "y",
343
+ "Y",
344
+ "u",
345
+ "Q",
346
+ "q",
347
+ "M",
348
+ "L",
349
+ "w",
350
+ "d",
351
+ "D",
352
+ "e",
353
+ "c",
354
+ "t",
355
+ "T"
356
+ ]);
357
+ }
358
+ parse(e, r) {
359
+ return O(r === "R" ? 4 : r.length, e);
360
+ }
361
+ set(e, r, t) {
362
+ const a = k(e, 0);
363
+ return a.setFullYear(t, 0, 4), a.setHours(0, 0, 0, 0), $(a);
364
+ }
365
+ }
366
+ class ge extends u {
367
+ constructor() {
368
+ super(...arguments);
369
+ i(this, "priority", 130);
370
+ i(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
371
+ }
372
+ parse(e, r) {
373
+ return O(r === "u" ? 4 : r.length, e);
374
+ }
375
+ set(e, r, t) {
376
+ return e.setFullYear(t, 0, 1), e.setHours(0, 0, 0, 0), e;
377
+ }
378
+ }
379
+ class Pe extends u {
380
+ constructor() {
381
+ super(...arguments);
382
+ i(this, "priority", 120);
383
+ i(this, "incompatibleTokens", [
384
+ "Y",
385
+ "R",
386
+ "q",
387
+ "M",
388
+ "L",
389
+ "w",
390
+ "I",
391
+ "d",
392
+ "D",
393
+ "i",
394
+ "e",
395
+ "c",
396
+ "t",
397
+ "T"
398
+ ]);
399
+ }
400
+ parse(e, r, t) {
401
+ switch (r) {
402
+ // 1, 2, 3, 4
403
+ case "Q":
404
+ case "QQ":
405
+ return w(r.length, e);
406
+ // 1st, 2nd, 3rd, 4th
407
+ case "Qo":
408
+ return t.ordinalNumber(e, { unit: "quarter" });
409
+ // Q1, Q2, Q3, Q4
410
+ case "QQQ":
411
+ return t.quarter(e, {
412
+ width: "abbreviated",
413
+ context: "formatting"
414
+ }) || t.quarter(e, {
415
+ width: "narrow",
416
+ context: "formatting"
417
+ });
418
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
419
+ case "QQQQQ":
420
+ return t.quarter(e, {
421
+ width: "narrow",
422
+ context: "formatting"
423
+ });
424
+ // 1st quarter, 2nd quarter, ...
425
+ case "QQQQ":
426
+ default:
427
+ return t.quarter(e, {
428
+ width: "wide",
429
+ context: "formatting"
430
+ }) || t.quarter(e, {
431
+ width: "abbreviated",
432
+ context: "formatting"
433
+ }) || t.quarter(e, {
434
+ width: "narrow",
435
+ context: "formatting"
436
+ });
437
+ }
438
+ }
439
+ validate(e, r) {
440
+ return r >= 1 && r <= 4;
441
+ }
442
+ set(e, r, t) {
443
+ return e.setMonth((t - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
444
+ }
445
+ }
446
+ class Me extends u {
447
+ constructor() {
448
+ super(...arguments);
449
+ i(this, "priority", 120);
450
+ i(this, "incompatibleTokens", [
451
+ "Y",
452
+ "R",
453
+ "Q",
454
+ "M",
455
+ "L",
456
+ "w",
457
+ "I",
458
+ "d",
459
+ "D",
460
+ "i",
461
+ "e",
462
+ "c",
463
+ "t",
464
+ "T"
465
+ ]);
466
+ }
467
+ parse(e, r, t) {
468
+ switch (r) {
469
+ // 1, 2, 3, 4
470
+ case "q":
471
+ case "qq":
472
+ return w(r.length, e);
473
+ // 1st, 2nd, 3rd, 4th
474
+ case "qo":
475
+ return t.ordinalNumber(e, { unit: "quarter" });
476
+ // Q1, Q2, Q3, Q4
477
+ case "qqq":
478
+ return t.quarter(e, {
479
+ width: "abbreviated",
480
+ context: "standalone"
481
+ }) || t.quarter(e, {
482
+ width: "narrow",
483
+ context: "standalone"
484
+ });
485
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
486
+ case "qqqqq":
487
+ return t.quarter(e, {
488
+ width: "narrow",
489
+ context: "standalone"
490
+ });
491
+ // 1st quarter, 2nd quarter, ...
492
+ case "qqqq":
493
+ default:
494
+ return t.quarter(e, {
495
+ width: "wide",
496
+ context: "standalone"
497
+ }) || t.quarter(e, {
498
+ width: "abbreviated",
499
+ context: "standalone"
500
+ }) || t.quarter(e, {
501
+ width: "narrow",
502
+ context: "standalone"
503
+ });
504
+ }
505
+ }
506
+ validate(e, r) {
507
+ return r >= 1 && r <= 4;
508
+ }
509
+ set(e, r, t) {
510
+ return e.setMonth((t - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
511
+ }
512
+ }
513
+ class _e extends u {
514
+ constructor() {
515
+ super(...arguments);
516
+ i(this, "incompatibleTokens", [
517
+ "Y",
518
+ "R",
519
+ "q",
520
+ "Q",
521
+ "L",
522
+ "w",
523
+ "I",
524
+ "D",
525
+ "i",
526
+ "e",
527
+ "c",
528
+ "t",
529
+ "T"
530
+ ]);
531
+ i(this, "priority", 110);
532
+ }
533
+ parse(e, r, t) {
534
+ const a = (o) => o - 1;
535
+ switch (r) {
536
+ // 1, 2, ..., 12
537
+ case "M":
538
+ return h(
539
+ l(f.month, e),
540
+ a
541
+ );
542
+ // 01, 02, ..., 12
543
+ case "MM":
544
+ return h(w(2, e), a);
545
+ // 1st, 2nd, ..., 12th
546
+ case "Mo":
547
+ return h(
548
+ t.ordinalNumber(e, {
549
+ unit: "month"
550
+ }),
551
+ a
552
+ );
553
+ // Jan, Feb, ..., Dec
554
+ case "MMM":
555
+ return t.month(e, {
556
+ width: "abbreviated",
557
+ context: "formatting"
558
+ }) || t.month(e, { width: "narrow", context: "formatting" });
559
+ // J, F, ..., D
560
+ case "MMMMM":
561
+ return t.month(e, {
562
+ width: "narrow",
563
+ context: "formatting"
564
+ });
565
+ // January, February, ..., December
566
+ case "MMMM":
567
+ default:
568
+ return t.month(e, { width: "wide", context: "formatting" }) || t.month(e, {
569
+ width: "abbreviated",
570
+ context: "formatting"
571
+ }) || t.month(e, { width: "narrow", context: "formatting" });
572
+ }
573
+ }
574
+ validate(e, r) {
575
+ return r >= 0 && r <= 11;
576
+ }
577
+ set(e, r, t) {
578
+ return e.setMonth(t, 1), e.setHours(0, 0, 0, 0), e;
579
+ }
580
+ }
581
+ class Ye extends u {
582
+ constructor() {
583
+ super(...arguments);
584
+ i(this, "priority", 110);
585
+ i(this, "incompatibleTokens", [
586
+ "Y",
587
+ "R",
588
+ "q",
589
+ "Q",
590
+ "M",
591
+ "w",
592
+ "I",
593
+ "D",
594
+ "i",
595
+ "e",
596
+ "c",
597
+ "t",
598
+ "T"
599
+ ]);
600
+ }
601
+ parse(e, r, t) {
602
+ const a = (o) => o - 1;
603
+ switch (r) {
604
+ // 1, 2, ..., 12
605
+ case "L":
606
+ return h(
607
+ l(f.month, e),
608
+ a
609
+ );
610
+ // 01, 02, ..., 12
611
+ case "LL":
612
+ return h(w(2, e), a);
613
+ // 1st, 2nd, ..., 12th
614
+ case "Lo":
615
+ return h(
616
+ t.ordinalNumber(e, {
617
+ unit: "month"
618
+ }),
619
+ a
620
+ );
621
+ // Jan, Feb, ..., Dec
622
+ case "LLL":
623
+ return t.month(e, {
624
+ width: "abbreviated",
625
+ context: "standalone"
626
+ }) || t.month(e, { width: "narrow", context: "standalone" });
627
+ // J, F, ..., D
628
+ case "LLLLL":
629
+ return t.month(e, {
630
+ width: "narrow",
631
+ context: "standalone"
632
+ });
633
+ // January, February, ..., December
634
+ case "LLLL":
635
+ default:
636
+ return t.month(e, { width: "wide", context: "standalone" }) || t.month(e, {
637
+ width: "abbreviated",
638
+ context: "standalone"
639
+ }) || t.month(e, { width: "narrow", context: "standalone" });
640
+ }
641
+ }
642
+ validate(e, r) {
643
+ return r >= 0 && r <= 11;
644
+ }
645
+ set(e, r, t) {
646
+ return e.setMonth(t, 1), e.setHours(0, 0, 0, 0), e;
647
+ }
648
+ }
649
+ function Oe(s, n, e) {
650
+ const r = p(s, e == null ? void 0 : e.in), t = ne(r, e) - n;
651
+ return r.setDate(r.getDate() - t * 7), p(r, e == null ? void 0 : e.in);
652
+ }
653
+ class Ee extends u {
654
+ constructor() {
655
+ super(...arguments);
656
+ i(this, "priority", 100);
657
+ i(this, "incompatibleTokens", [
658
+ "y",
659
+ "R",
660
+ "u",
661
+ "q",
662
+ "Q",
663
+ "M",
664
+ "L",
665
+ "I",
666
+ "d",
667
+ "D",
668
+ "i",
669
+ "t",
670
+ "T"
671
+ ]);
672
+ }
673
+ parse(e, r, t) {
674
+ switch (r) {
675
+ case "w":
676
+ return l(f.week, e);
677
+ case "wo":
678
+ return t.ordinalNumber(e, { unit: "week" });
679
+ default:
680
+ return w(r.length, e);
681
+ }
682
+ }
683
+ validate(e, r) {
684
+ return r >= 1 && r <= 53;
685
+ }
686
+ set(e, r, t, a) {
687
+ return H(Oe(e, t, a), a);
688
+ }
689
+ }
690
+ function He(s, n, e) {
691
+ const r = p(s, e == null ? void 0 : e.in), t = ae(r, e) - n;
692
+ return r.setDate(r.getDate() - t * 7), r;
693
+ }
694
+ class Ie extends u {
695
+ constructor() {
696
+ super(...arguments);
697
+ i(this, "priority", 100);
698
+ i(this, "incompatibleTokens", [
699
+ "y",
700
+ "Y",
701
+ "u",
702
+ "q",
703
+ "Q",
704
+ "M",
705
+ "L",
706
+ "w",
707
+ "d",
708
+ "D",
709
+ "e",
710
+ "c",
711
+ "t",
712
+ "T"
713
+ ]);
714
+ }
715
+ parse(e, r, t) {
716
+ switch (r) {
717
+ case "I":
718
+ return l(f.week, e);
719
+ case "Io":
720
+ return t.ordinalNumber(e, { unit: "week" });
721
+ default:
722
+ return w(r.length, e);
723
+ }
724
+ }
725
+ validate(e, r) {
726
+ return r >= 1 && r <= 53;
727
+ }
728
+ set(e, r, t) {
729
+ return $(He(e, t));
730
+ }
731
+ }
732
+ const qe = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Le = [
733
+ 31,
734
+ 29,
735
+ 31,
736
+ 30,
737
+ 31,
738
+ 30,
739
+ 31,
740
+ 31,
741
+ 30,
742
+ 31,
743
+ 30,
744
+ 31
745
+ ];
746
+ class Qe extends u {
747
+ constructor() {
748
+ super(...arguments);
749
+ i(this, "priority", 90);
750
+ i(this, "subPriority", 1);
751
+ i(this, "incompatibleTokens", [
752
+ "Y",
753
+ "R",
754
+ "q",
755
+ "Q",
756
+ "w",
757
+ "I",
758
+ "D",
759
+ "i",
760
+ "e",
761
+ "c",
762
+ "t",
763
+ "T"
764
+ ]);
765
+ }
766
+ parse(e, r, t) {
767
+ switch (r) {
768
+ case "d":
769
+ return l(f.date, e);
770
+ case "do":
771
+ return t.ordinalNumber(e, { unit: "date" });
772
+ default:
773
+ return w(r.length, e);
774
+ }
775
+ }
776
+ validate(e, r) {
777
+ const t = e.getFullYear(), a = ee(t), o = e.getMonth();
778
+ return a ? r >= 1 && r <= Le[o] : r >= 1 && r <= qe[o];
779
+ }
780
+ set(e, r, t) {
781
+ return e.setDate(t), e.setHours(0, 0, 0, 0), e;
782
+ }
783
+ }
784
+ class Ne extends u {
785
+ constructor() {
786
+ super(...arguments);
787
+ i(this, "priority", 90);
788
+ i(this, "subpriority", 1);
789
+ i(this, "incompatibleTokens", [
790
+ "Y",
791
+ "R",
792
+ "q",
793
+ "Q",
794
+ "M",
795
+ "L",
796
+ "w",
797
+ "I",
798
+ "d",
799
+ "E",
800
+ "i",
801
+ "e",
802
+ "c",
803
+ "t",
804
+ "T"
805
+ ]);
806
+ }
807
+ parse(e, r, t) {
808
+ switch (r) {
809
+ case "D":
810
+ case "DD":
811
+ return l(f.dayOfYear, e);
812
+ case "Do":
813
+ return t.ordinalNumber(e, { unit: "date" });
814
+ default:
815
+ return w(r.length, e);
816
+ }
817
+ }
818
+ validate(e, r) {
819
+ const t = e.getFullYear();
820
+ return ee(t) ? r >= 1 && r <= 366 : r >= 1 && r <= 365;
821
+ }
822
+ set(e, r, t) {
823
+ return e.setMonth(0, t), e.setHours(0, 0, 0, 0), e;
824
+ }
825
+ }
826
+ function q(s, n, e) {
827
+ var _, P, Y, D;
828
+ const r = K(), t = (e == null ? void 0 : e.weekStartsOn) ?? ((P = (_ = e == null ? void 0 : e.locale) == null ? void 0 : _.options) == null ? void 0 : P.weekStartsOn) ?? r.weekStartsOn ?? ((D = (Y = r.locale) == null ? void 0 : Y.options) == null ? void 0 : D.weekStartsOn) ?? 0, a = p(s, e == null ? void 0 : e.in), o = a.getDay(), T = (n % 7 + 7) % 7, g = 7 - t, M = n < 0 || n > 6 ? n - (o + g) % 7 : (T + g) % 7 - (o + g) % 7;
829
+ return V(a, M, e);
830
+ }
831
+ class ve extends u {
832
+ constructor() {
833
+ super(...arguments);
834
+ i(this, "priority", 90);
835
+ i(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
836
+ }
837
+ parse(e, r, t) {
838
+ switch (r) {
839
+ // Tue
840
+ case "E":
841
+ case "EE":
842
+ case "EEE":
843
+ return t.day(e, {
844
+ width: "abbreviated",
845
+ context: "formatting"
846
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
847
+ // T
848
+ case "EEEEE":
849
+ return t.day(e, {
850
+ width: "narrow",
851
+ context: "formatting"
852
+ });
853
+ // Tu
854
+ case "EEEEEE":
855
+ return t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
856
+ // Tuesday
857
+ case "EEEE":
858
+ default:
859
+ return t.day(e, { width: "wide", context: "formatting" }) || t.day(e, {
860
+ width: "abbreviated",
861
+ context: "formatting"
862
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
863
+ }
864
+ }
865
+ validate(e, r) {
866
+ return r >= 0 && r <= 6;
867
+ }
868
+ set(e, r, t, a) {
869
+ return e = q(e, t, a), e.setHours(0, 0, 0, 0), e;
870
+ }
871
+ }
872
+ class Re extends u {
873
+ constructor() {
874
+ super(...arguments);
875
+ i(this, "priority", 90);
876
+ i(this, "incompatibleTokens", [
877
+ "y",
878
+ "R",
879
+ "u",
880
+ "q",
881
+ "Q",
882
+ "M",
883
+ "L",
884
+ "I",
885
+ "d",
886
+ "D",
887
+ "E",
888
+ "i",
889
+ "c",
890
+ "t",
891
+ "T"
892
+ ]);
893
+ }
894
+ parse(e, r, t, a) {
895
+ const o = (y) => {
896
+ const T = Math.floor((y - 1) / 7) * 7;
897
+ return (y + a.weekStartsOn + 6) % 7 + T;
898
+ };
899
+ switch (r) {
900
+ // 3
901
+ case "e":
902
+ case "ee":
903
+ return h(w(r.length, e), o);
904
+ // 3rd
905
+ case "eo":
906
+ return h(
907
+ t.ordinalNumber(e, {
908
+ unit: "day"
909
+ }),
910
+ o
911
+ );
912
+ // Tue
913
+ case "eee":
914
+ return t.day(e, {
915
+ width: "abbreviated",
916
+ context: "formatting"
917
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
918
+ // T
919
+ case "eeeee":
920
+ return t.day(e, {
921
+ width: "narrow",
922
+ context: "formatting"
923
+ });
924
+ // Tu
925
+ case "eeeeee":
926
+ return t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
927
+ // Tuesday
928
+ case "eeee":
929
+ default:
930
+ return t.day(e, { width: "wide", context: "formatting" }) || t.day(e, {
931
+ width: "abbreviated",
932
+ context: "formatting"
933
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
934
+ }
935
+ }
936
+ validate(e, r) {
937
+ return r >= 0 && r <= 6;
938
+ }
939
+ set(e, r, t, a) {
940
+ return e = q(e, t, a), e.setHours(0, 0, 0, 0), e;
941
+ }
942
+ }
943
+ class We extends u {
944
+ constructor() {
945
+ super(...arguments);
946
+ i(this, "priority", 90);
947
+ i(this, "incompatibleTokens", [
948
+ "y",
949
+ "R",
950
+ "u",
951
+ "q",
952
+ "Q",
953
+ "M",
954
+ "L",
955
+ "I",
956
+ "d",
957
+ "D",
958
+ "E",
959
+ "i",
960
+ "e",
961
+ "t",
962
+ "T"
963
+ ]);
964
+ }
965
+ parse(e, r, t, a) {
966
+ const o = (y) => {
967
+ const T = Math.floor((y - 1) / 7) * 7;
968
+ return (y + a.weekStartsOn + 6) % 7 + T;
969
+ };
970
+ switch (r) {
971
+ // 3
972
+ case "c":
973
+ case "cc":
974
+ return h(w(r.length, e), o);
975
+ // 3rd
976
+ case "co":
977
+ return h(
978
+ t.ordinalNumber(e, {
979
+ unit: "day"
980
+ }),
981
+ o
982
+ );
983
+ // Tue
984
+ case "ccc":
985
+ return t.day(e, {
986
+ width: "abbreviated",
987
+ context: "standalone"
988
+ }) || t.day(e, { width: "short", context: "standalone" }) || t.day(e, { width: "narrow", context: "standalone" });
989
+ // T
990
+ case "ccccc":
991
+ return t.day(e, {
992
+ width: "narrow",
993
+ context: "standalone"
994
+ });
995
+ // Tu
996
+ case "cccccc":
997
+ return t.day(e, { width: "short", context: "standalone" }) || t.day(e, { width: "narrow", context: "standalone" });
998
+ // Tuesday
999
+ case "cccc":
1000
+ default:
1001
+ return t.day(e, { width: "wide", context: "standalone" }) || t.day(e, {
1002
+ width: "abbreviated",
1003
+ context: "standalone"
1004
+ }) || t.day(e, { width: "short", context: "standalone" }) || t.day(e, { width: "narrow", context: "standalone" });
1005
+ }
1006
+ }
1007
+ validate(e, r) {
1008
+ return r >= 0 && r <= 6;
1009
+ }
1010
+ set(e, r, t, a) {
1011
+ return e = q(e, t, a), e.setHours(0, 0, 0, 0), e;
1012
+ }
1013
+ }
1014
+ function Ce(s, n, e) {
1015
+ const r = p(s, e == null ? void 0 : e.in), t = fe(r, e), a = n - t;
1016
+ return V(r, a, e);
1017
+ }
1018
+ class Be extends u {
1019
+ constructor() {
1020
+ super(...arguments);
1021
+ i(this, "priority", 90);
1022
+ i(this, "incompatibleTokens", [
1023
+ "y",
1024
+ "Y",
1025
+ "u",
1026
+ "q",
1027
+ "Q",
1028
+ "M",
1029
+ "L",
1030
+ "w",
1031
+ "d",
1032
+ "D",
1033
+ "E",
1034
+ "e",
1035
+ "c",
1036
+ "t",
1037
+ "T"
1038
+ ]);
1039
+ }
1040
+ parse(e, r, t) {
1041
+ const a = (o) => o === 0 ? 7 : o;
1042
+ switch (r) {
1043
+ // 2
1044
+ case "i":
1045
+ case "ii":
1046
+ return w(r.length, e);
1047
+ // 2nd
1048
+ case "io":
1049
+ return t.ordinalNumber(e, { unit: "day" });
1050
+ // Tue
1051
+ case "iii":
1052
+ return h(
1053
+ t.day(e, {
1054
+ width: "abbreviated",
1055
+ context: "formatting"
1056
+ }) || t.day(e, {
1057
+ width: "short",
1058
+ context: "formatting"
1059
+ }) || t.day(e, {
1060
+ width: "narrow",
1061
+ context: "formatting"
1062
+ }),
1063
+ a
1064
+ );
1065
+ // T
1066
+ case "iiiii":
1067
+ return h(
1068
+ t.day(e, {
1069
+ width: "narrow",
1070
+ context: "formatting"
1071
+ }),
1072
+ a
1073
+ );
1074
+ // Tu
1075
+ case "iiiiii":
1076
+ return h(
1077
+ t.day(e, {
1078
+ width: "short",
1079
+ context: "formatting"
1080
+ }) || t.day(e, {
1081
+ width: "narrow",
1082
+ context: "formatting"
1083
+ }),
1084
+ a
1085
+ );
1086
+ // Tuesday
1087
+ case "iiii":
1088
+ default:
1089
+ return h(
1090
+ t.day(e, {
1091
+ width: "wide",
1092
+ context: "formatting"
1093
+ }) || t.day(e, {
1094
+ width: "abbreviated",
1095
+ context: "formatting"
1096
+ }) || t.day(e, {
1097
+ width: "short",
1098
+ context: "formatting"
1099
+ }) || t.day(e, {
1100
+ width: "narrow",
1101
+ context: "formatting"
1102
+ }),
1103
+ a
1104
+ );
1105
+ }
1106
+ }
1107
+ validate(e, r) {
1108
+ return r >= 1 && r <= 7;
1109
+ }
1110
+ set(e, r, t) {
1111
+ return e = Ce(e, t), e.setHours(0, 0, 0, 0), e;
1112
+ }
1113
+ }
1114
+ class Ge extends u {
1115
+ constructor() {
1116
+ super(...arguments);
1117
+ i(this, "priority", 80);
1118
+ i(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
1119
+ }
1120
+ parse(e, r, t) {
1121
+ switch (r) {
1122
+ case "a":
1123
+ case "aa":
1124
+ case "aaa":
1125
+ return t.dayPeriod(e, {
1126
+ width: "abbreviated",
1127
+ context: "formatting"
1128
+ }) || t.dayPeriod(e, {
1129
+ width: "narrow",
1130
+ context: "formatting"
1131
+ });
1132
+ case "aaaaa":
1133
+ return t.dayPeriod(e, {
1134
+ width: "narrow",
1135
+ context: "formatting"
1136
+ });
1137
+ case "aaaa":
1138
+ default:
1139
+ return t.dayPeriod(e, {
1140
+ width: "wide",
1141
+ context: "formatting"
1142
+ }) || t.dayPeriod(e, {
1143
+ width: "abbreviated",
1144
+ context: "formatting"
1145
+ }) || t.dayPeriod(e, {
1146
+ width: "narrow",
1147
+ context: "formatting"
1148
+ });
1149
+ }
1150
+ }
1151
+ set(e, r, t) {
1152
+ return e.setHours(I(t), 0, 0, 0), e;
1153
+ }
1154
+ }
1155
+ class Ae extends u {
1156
+ constructor() {
1157
+ super(...arguments);
1158
+ i(this, "priority", 80);
1159
+ i(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
1160
+ }
1161
+ parse(e, r, t) {
1162
+ switch (r) {
1163
+ case "b":
1164
+ case "bb":
1165
+ case "bbb":
1166
+ return t.dayPeriod(e, {
1167
+ width: "abbreviated",
1168
+ context: "formatting"
1169
+ }) || t.dayPeriod(e, {
1170
+ width: "narrow",
1171
+ context: "formatting"
1172
+ });
1173
+ case "bbbbb":
1174
+ return t.dayPeriod(e, {
1175
+ width: "narrow",
1176
+ context: "formatting"
1177
+ });
1178
+ case "bbbb":
1179
+ default:
1180
+ return t.dayPeriod(e, {
1181
+ width: "wide",
1182
+ context: "formatting"
1183
+ }) || t.dayPeriod(e, {
1184
+ width: "abbreviated",
1185
+ context: "formatting"
1186
+ }) || t.dayPeriod(e, {
1187
+ width: "narrow",
1188
+ context: "formatting"
1189
+ });
1190
+ }
1191
+ }
1192
+ set(e, r, t) {
1193
+ return e.setHours(I(t), 0, 0, 0), e;
1194
+ }
1195
+ }
1196
+ class Xe extends u {
1197
+ constructor() {
1198
+ super(...arguments);
1199
+ i(this, "priority", 80);
1200
+ i(this, "incompatibleTokens", ["a", "b", "t", "T"]);
1201
+ }
1202
+ parse(e, r, t) {
1203
+ switch (r) {
1204
+ case "B":
1205
+ case "BB":
1206
+ case "BBB":
1207
+ return t.dayPeriod(e, {
1208
+ width: "abbreviated",
1209
+ context: "formatting"
1210
+ }) || t.dayPeriod(e, {
1211
+ width: "narrow",
1212
+ context: "formatting"
1213
+ });
1214
+ case "BBBBB":
1215
+ return t.dayPeriod(e, {
1216
+ width: "narrow",
1217
+ context: "formatting"
1218
+ });
1219
+ case "BBBB":
1220
+ default:
1221
+ return t.dayPeriod(e, {
1222
+ width: "wide",
1223
+ context: "formatting"
1224
+ }) || t.dayPeriod(e, {
1225
+ width: "abbreviated",
1226
+ context: "formatting"
1227
+ }) || t.dayPeriod(e, {
1228
+ width: "narrow",
1229
+ context: "formatting"
1230
+ });
1231
+ }
1232
+ }
1233
+ set(e, r, t) {
1234
+ return e.setHours(I(t), 0, 0, 0), e;
1235
+ }
1236
+ }
1237
+ class Fe extends u {
1238
+ constructor() {
1239
+ super(...arguments);
1240
+ i(this, "priority", 70);
1241
+ i(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
1242
+ }
1243
+ parse(e, r, t) {
1244
+ switch (r) {
1245
+ case "h":
1246
+ return l(f.hour12h, e);
1247
+ case "ho":
1248
+ return t.ordinalNumber(e, { unit: "hour" });
1249
+ default:
1250
+ return w(r.length, e);
1251
+ }
1252
+ }
1253
+ validate(e, r) {
1254
+ return r >= 1 && r <= 12;
1255
+ }
1256
+ set(e, r, t) {
1257
+ const a = e.getHours() >= 12;
1258
+ return a && t < 12 ? e.setHours(t + 12, 0, 0, 0) : !a && t === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(t, 0, 0, 0), e;
1259
+ }
1260
+ }
1261
+ class ze extends u {
1262
+ constructor() {
1263
+ super(...arguments);
1264
+ i(this, "priority", 70);
1265
+ i(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
1266
+ }
1267
+ parse(e, r, t) {
1268
+ switch (r) {
1269
+ case "H":
1270
+ return l(f.hour23h, e);
1271
+ case "Ho":
1272
+ return t.ordinalNumber(e, { unit: "hour" });
1273
+ default:
1274
+ return w(r.length, e);
1275
+ }
1276
+ }
1277
+ validate(e, r) {
1278
+ return r >= 0 && r <= 23;
1279
+ }
1280
+ set(e, r, t) {
1281
+ return e.setHours(t, 0, 0, 0), e;
1282
+ }
1283
+ }
1284
+ class Ze extends u {
1285
+ constructor() {
1286
+ super(...arguments);
1287
+ i(this, "priority", 70);
1288
+ i(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
1289
+ }
1290
+ parse(e, r, t) {
1291
+ switch (r) {
1292
+ case "K":
1293
+ return l(f.hour11h, e);
1294
+ case "Ko":
1295
+ return t.ordinalNumber(e, { unit: "hour" });
1296
+ default:
1297
+ return w(r.length, e);
1298
+ }
1299
+ }
1300
+ validate(e, r) {
1301
+ return r >= 0 && r <= 11;
1302
+ }
1303
+ set(e, r, t) {
1304
+ return e.getHours() >= 12 && t < 12 ? e.setHours(t + 12, 0, 0, 0) : e.setHours(t, 0, 0, 0), e;
1305
+ }
1306
+ }
1307
+ class Ke extends u {
1308
+ constructor() {
1309
+ super(...arguments);
1310
+ i(this, "priority", 70);
1311
+ i(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
1312
+ }
1313
+ parse(e, r, t) {
1314
+ switch (r) {
1315
+ case "k":
1316
+ return l(f.hour24h, e);
1317
+ case "ko":
1318
+ return t.ordinalNumber(e, { unit: "hour" });
1319
+ default:
1320
+ return w(r.length, e);
1321
+ }
1322
+ }
1323
+ validate(e, r) {
1324
+ return r >= 1 && r <= 24;
1325
+ }
1326
+ set(e, r, t) {
1327
+ const a = t <= 24 ? t % 24 : t;
1328
+ return e.setHours(a, 0, 0, 0), e;
1329
+ }
1330
+ }
1331
+ class $e extends u {
1332
+ constructor() {
1333
+ super(...arguments);
1334
+ i(this, "priority", 60);
1335
+ i(this, "incompatibleTokens", ["t", "T"]);
1336
+ }
1337
+ parse(e, r, t) {
1338
+ switch (r) {
1339
+ case "m":
1340
+ return l(f.minute, e);
1341
+ case "mo":
1342
+ return t.ordinalNumber(e, { unit: "minute" });
1343
+ default:
1344
+ return w(r.length, e);
1345
+ }
1346
+ }
1347
+ validate(e, r) {
1348
+ return r >= 0 && r <= 59;
1349
+ }
1350
+ set(e, r, t) {
1351
+ return e.setMinutes(t, 0, 0), e;
1352
+ }
1353
+ }
1354
+ class Ve extends u {
1355
+ constructor() {
1356
+ super(...arguments);
1357
+ i(this, "priority", 50);
1358
+ i(this, "incompatibleTokens", ["t", "T"]);
1359
+ }
1360
+ parse(e, r, t) {
1361
+ switch (r) {
1362
+ case "s":
1363
+ return l(f.second, e);
1364
+ case "so":
1365
+ return t.ordinalNumber(e, { unit: "second" });
1366
+ default:
1367
+ return w(r.length, e);
1368
+ }
1369
+ }
1370
+ validate(e, r) {
1371
+ return r >= 0 && r <= 59;
1372
+ }
1373
+ set(e, r, t) {
1374
+ return e.setSeconds(t, 0), e;
1375
+ }
1376
+ }
1377
+ class je extends u {
1378
+ constructor() {
1379
+ super(...arguments);
1380
+ i(this, "priority", 30);
1381
+ i(this, "incompatibleTokens", ["t", "T"]);
1382
+ }
1383
+ parse(e, r) {
1384
+ const t = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
1385
+ return h(w(r.length, e), t);
1386
+ }
1387
+ set(e, r, t) {
1388
+ return e.setMilliseconds(t), e;
1389
+ }
1390
+ }
1391
+ class Ue extends u {
1392
+ constructor() {
1393
+ super(...arguments);
1394
+ i(this, "priority", 10);
1395
+ i(this, "incompatibleTokens", ["t", "T", "x"]);
1396
+ }
1397
+ parse(e, r) {
1398
+ switch (r) {
1399
+ case "X":
1400
+ return m(
1401
+ b.basicOptionalMinutes,
1402
+ e
1403
+ );
1404
+ case "XX":
1405
+ return m(b.basic, e);
1406
+ case "XXXX":
1407
+ return m(
1408
+ b.basicOptionalSeconds,
1409
+ e
1410
+ );
1411
+ case "XXXXX":
1412
+ return m(
1413
+ b.extendedOptionalSeconds,
1414
+ e
1415
+ );
1416
+ case "XXX":
1417
+ default:
1418
+ return m(b.extended, e);
1419
+ }
1420
+ }
1421
+ set(e, r, t) {
1422
+ return r.timestampIsSet ? e : k(
1423
+ e,
1424
+ e.getTime() - j(e) - t
1425
+ );
1426
+ }
1427
+ }
1428
+ class Je extends u {
1429
+ constructor() {
1430
+ super(...arguments);
1431
+ i(this, "priority", 10);
1432
+ i(this, "incompatibleTokens", ["t", "T", "X"]);
1433
+ }
1434
+ parse(e, r) {
1435
+ switch (r) {
1436
+ case "x":
1437
+ return m(
1438
+ b.basicOptionalMinutes,
1439
+ e
1440
+ );
1441
+ case "xx":
1442
+ return m(b.basic, e);
1443
+ case "xxxx":
1444
+ return m(
1445
+ b.basicOptionalSeconds,
1446
+ e
1447
+ );
1448
+ case "xxxxx":
1449
+ return m(
1450
+ b.extendedOptionalSeconds,
1451
+ e
1452
+ );
1453
+ case "xxx":
1454
+ default:
1455
+ return m(b.extended, e);
1456
+ }
1457
+ }
1458
+ set(e, r, t) {
1459
+ return r.timestampIsSet ? e : k(
1460
+ e,
1461
+ e.getTime() - j(e) - t
1462
+ );
1463
+ }
1464
+ }
1465
+ class Se extends u {
1466
+ constructor() {
1467
+ super(...arguments);
1468
+ i(this, "priority", 40);
1469
+ i(this, "incompatibleTokens", "*");
1470
+ }
1471
+ parse(e) {
1472
+ return J(e);
1473
+ }
1474
+ set(e, r, t) {
1475
+ return [k(e, t * 1e3), { timestampIsSet: !0 }];
1476
+ }
1477
+ }
1478
+ class er extends u {
1479
+ constructor() {
1480
+ super(...arguments);
1481
+ i(this, "priority", 20);
1482
+ i(this, "incompatibleTokens", "*");
1483
+ }
1484
+ parse(e) {
1485
+ return J(e);
1486
+ }
1487
+ set(e, r, t) {
1488
+ return [k(e, t), { timestampIsSet: !0 }];
1489
+ }
1490
+ }
1491
+ const rr = {
1492
+ G: new Te(),
1493
+ y: new De(),
1494
+ Y: new ke(),
1495
+ R: new pe(),
1496
+ u: new ge(),
1497
+ Q: new Pe(),
1498
+ q: new Me(),
1499
+ M: new _e(),
1500
+ L: new Ye(),
1501
+ w: new Ee(),
1502
+ I: new Ie(),
1503
+ d: new Qe(),
1504
+ D: new Ne(),
1505
+ E: new ve(),
1506
+ e: new Re(),
1507
+ c: new We(),
1508
+ i: new Be(),
1509
+ a: new Ge(),
1510
+ b: new Ae(),
1511
+ B: new Xe(),
1512
+ h: new Fe(),
1513
+ H: new ze(),
1514
+ K: new Ze(),
1515
+ k: new Ke(),
1516
+ m: new $e(),
1517
+ s: new Ve(),
1518
+ S: new je(),
1519
+ X: new Ue(),
1520
+ x: new Je(),
1521
+ t: new Se(),
1522
+ T: new er()
1523
+ }, tr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, sr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, nr = /^'([^]*?)'?$/, ar = /''/g, ir = /\S/, or = /[a-zA-Z]/;
1524
+ function wr(s, n, e, r) {
1525
+ var Q, N, v, R, W, C, B, G;
1526
+ const t = () => k((r == null ? void 0 : r.in) || e, NaN), a = we(), o = (r == null ? void 0 : r.locale) ?? a.locale ?? ie, y = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((N = (Q = r == null ? void 0 : r.locale) == null ? void 0 : Q.options) == null ? void 0 : N.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((R = (v = a.locale) == null ? void 0 : v.options) == null ? void 0 : R.firstWeekContainsDate) ?? 1, T = (r == null ? void 0 : r.weekStartsOn) ?? ((C = (W = r == null ? void 0 : r.locale) == null ? void 0 : W.options) == null ? void 0 : C.weekStartsOn) ?? a.weekStartsOn ?? ((G = (B = a.locale) == null ? void 0 : B.options) == null ? void 0 : G.weekStartsOn) ?? 0;
1527
+ if (!n)
1528
+ return s ? t() : p(e, r == null ? void 0 : r.in);
1529
+ const g = {
1530
+ firstWeekContainsDate: y,
1531
+ weekStartsOn: T,
1532
+ locale: o
1533
+ }, M = [new me(r == null ? void 0 : r.in, e)], _ = n.match(sr).map((c) => {
1534
+ const d = c[0];
1535
+ if (d in z) {
1536
+ const x = z[d];
1537
+ return x(c, o.formatLong);
1538
+ }
1539
+ return c;
1540
+ }).join("").match(tr), P = [];
1541
+ for (let c of _) {
1542
+ !(r != null && r.useAdditionalWeekYearTokens) && oe(c) && Z(c, n, s), !(r != null && r.useAdditionalDayOfYearTokens) && ce(c) && Z(c, n, s);
1543
+ const d = c[0], x = rr[d];
1544
+ if (x) {
1545
+ const { incompatibleTokens: A } = x;
1546
+ if (Array.isArray(A)) {
1547
+ const X = P.find(
1548
+ (F) => A.includes(F.token) || F.token === d
1549
+ );
1550
+ if (X)
1551
+ throw new RangeError(
1552
+ `The format string mustn't contain \`${X.fullToken}\` and \`${c}\` at the same time`
1553
+ );
1554
+ } else if (x.incompatibleTokens === "*" && P.length > 0)
1555
+ throw new RangeError(
1556
+ `The format string mustn't contain \`${c}\` and any other token at the same time`
1557
+ );
1558
+ P.push({ token: d, fullToken: c });
1559
+ const E = x.run(
1560
+ s,
1561
+ c,
1562
+ o.match,
1563
+ g
1564
+ );
1565
+ if (!E)
1566
+ return t();
1567
+ M.push(E.setter), s = E.rest;
1568
+ } else {
1569
+ if (d.match(or))
1570
+ throw new RangeError(
1571
+ "Format string contains an unescaped latin alphabet character `" + d + "`"
1572
+ );
1573
+ if (c === "''" ? c = "'" : d === "'" && (c = cr(c)), s.indexOf(c) === 0)
1574
+ s = s.slice(c.length);
1575
+ else
1576
+ return t();
1577
+ }
1578
+ }
1579
+ if (s.length > 0 && ir.test(s))
1580
+ return t();
1581
+ const Y = M.map((c) => c.priority).sort((c, d) => d - c).filter((c, d, x) => x.indexOf(c) === d).map(
1582
+ (c) => M.filter((d) => d.priority === c).sort((d, x) => x.subPriority - d.subPriority)
1583
+ ).map((c) => c[0]);
1584
+ let D = p(e, r == null ? void 0 : r.in);
1585
+ if (isNaN(+D)) return t();
1586
+ const L = {};
1587
+ for (const c of Y) {
1588
+ if (!c.validate(D, g))
1589
+ return t();
1590
+ const d = c.set(D, L, g);
1591
+ Array.isArray(d) ? (D = d[0], Object.assign(L, d[1])) : D = d;
1592
+ }
1593
+ return D;
1594
+ }
1595
+ function cr(s) {
1596
+ return s.match(nr)[1].replace(ar, "'");
1597
+ }
1598
+ export {
1599
+ wr as p
1600
+ };
1601
+ //# sourceMappingURL=parse-DvA97ro9.js.map