@oneclick.dev/cms-core-modules 0.0.58 → 0.0.60

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 (147) hide show
  1. package/dist/{Components-D9yIIosM.mjs → Components-C83O-xlF.mjs} +1 -1
  2. package/dist/{ContentEditor-DCmt_y_R.js → ContentEditor-BAepN3Yd.js} +51 -34
  3. package/dist/{ContentEditor-CtGeIzC4.mjs → ContentEditor-BPjWW3d1.mjs} +12341 -10099
  4. package/dist/Create-Bh4g6QW4.js +1 -0
  5. package/dist/{Create-Bwf1RXdG.mjs → Create-Cf7pvh5G.mjs} +38 -39
  6. package/dist/DateFormatter-BPPBZp1j.js +1 -0
  7. package/dist/{CalendarDate-CRT2Viyt.mjs → DateFormatter-DsmlAuYV.mjs} +353 -256
  8. package/dist/{Detail-CpfOQChd.mjs → Detail-B4b_FLDa.mjs} +2 -2
  9. package/dist/{Detail-B-PnkcXD.mjs → Detail-BGD75ul4.mjs} +2 -2
  10. package/dist/{Detail-Dd_OkpcN.js → Detail-BayNaAg9.js} +1 -1
  11. package/dist/{Detail-C4E1T87K.mjs → Detail-Byk781b4.mjs} +3 -3
  12. package/dist/{Detail-Cd5CBVN0.js → Detail-CnK-qbhE.js} +1 -1
  13. package/dist/Detail-CtbWzq-R.js +1 -0
  14. package/dist/{Detail-CNfTDUE5.js → Detail-Cxd2VMOl.js} +1 -1
  15. package/dist/{Detail-BVlGSjOq.mjs → Detail-D10shmpK.mjs} +6 -7
  16. package/dist/{Detail-CwagT6gQ.mjs → Detail-U0mgLKt6.mjs} +2 -2
  17. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs +75 -0
  18. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js +1 -0
  19. package/dist/{Entries-zyhycw1M.mjs → Entries-C6Di46My.mjs} +1 -1
  20. package/dist/{Find-BPR0uU-Z.mjs → Find-B4sAEx0B.mjs} +2 -2
  21. package/dist/{Find-BidEQJxT.js → Find-Ds6OvuH6.js} +1 -1
  22. package/dist/{GlobalStyling-BLQ_1W2y.mjs → GlobalStyling-C9VthHWK.mjs} +1 -1
  23. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs +396 -0
  24. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +1 -0
  25. package/dist/Overview-B-8TLLjh.js +1 -0
  26. package/dist/{Overview-CDN88OSM.mjs → Overview-BCpJNiEB.mjs} +1 -1
  27. package/dist/Overview-B_99j5eA.js +1 -0
  28. package/dist/{Overview-BLsZMHNW.mjs → Overview-CIa1E-HH.mjs} +1 -1
  29. package/dist/{Overview-D1nJLBe1.mjs → Overview-CgViRnNc.mjs} +1 -1
  30. package/dist/Overview-DtWvKB3W.mjs +327 -0
  31. package/dist/Overview-HvlDEgqi.mjs +862 -0
  32. package/dist/{Overview-BH3NwvNX.mjs → Overview-Su8ZUbMs.mjs} +3 -3
  33. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +345 -0
  34. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +2093 -0
  35. package/dist/{TableView-CS13LLxk.mjs → TableView-B8iLWWcP.mjs} +48394 -36321
  36. package/dist/TableView-BxK6R8v3.js +312 -0
  37. package/dist/{TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs → TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs} +5 -5
  38. package/dist/{View-C7axVP9t.mjs → View-DDXN0tKD.mjs} +7 -7
  39. package/dist/View-DfzaVOzS.js +1 -0
  40. package/dist/agenda-D81m29_4.mjs +1135 -0
  41. package/dist/agenda-uzPPxgsW.js +1 -0
  42. package/dist/availability-B-tRp8hB.mjs +629 -0
  43. package/dist/availability-BiBbzEIM.js +1 -0
  44. package/dist/{exceptions-D3b18TiY.mjs → exceptions-BFchkR06.mjs} +70 -71
  45. package/dist/exceptions-C-DPRNQa.js +1 -0
  46. package/dist/index-4tjmIans.js +1 -0
  47. package/dist/index-AmUV8LZQ.mjs +176 -0
  48. package/dist/index-BDaVYdkD.mjs +7763 -0
  49. package/dist/{index-DT1wWnUk.mjs → index-BWDwEd8D.mjs} +1 -1
  50. package/dist/{index-CImCyE3L.mjs → index-BfBBm9uY.mjs} +1 -1
  51. package/dist/{index-DMoyoaks.mjs → index-Bkq58CeQ.mjs} +2 -2
  52. package/dist/{index-DI6mydpm.mjs → index-CABh6Qn6.mjs} +2 -2
  53. package/dist/{index-CQiY-oTN.mjs → index-CQkOH2_3.mjs} +1 -1
  54. package/dist/{index-Bwi1mtkq.mjs → index-CU-tbS5W.mjs} +1 -1
  55. package/dist/{index-BzuHN-r8.mjs → index-Cpnn_Pxd.mjs} +1 -1
  56. package/dist/index-CxETuRsG.js +1 -0
  57. package/dist/{index-DyCHxFp3.mjs → index-DRqJOqUR.mjs} +502 -449
  58. package/dist/index-DTago6vW-Bhr8E1Y6.js +88 -0
  59. package/dist/index-DTago6vW-CnomHQ_S.mjs +4123 -0
  60. package/dist/index-DfV8-6ON.js +245 -0
  61. package/dist/index-Dnn2SCSl.js +1 -0
  62. package/dist/{index-BEGU8Kme.mjs → index-Dpl9sU6a.mjs} +2 -2
  63. package/dist/index-Uf7TwBuW.mjs +110 -0
  64. package/dist/index-YMaY4uuk-BgpTtr73.js +1 -0
  65. package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +399 -363
  66. package/dist/{index--jjEzba7.mjs → index-cOnxXTbF.mjs} +1 -1
  67. package/dist/index-hlylYYgy.mjs +24 -0
  68. package/dist/index.cjs.js +1 -1
  69. package/dist/index.mjs +98 -81
  70. package/dist/orders-Bh8w0ueq.mjs +346 -0
  71. package/dist/orders-Dt0zMz97.js +1 -0
  72. package/dist/payment-BQaAqQ5q.js +1 -0
  73. package/dist/payment-BbWByERf.mjs +1080 -0
  74. package/dist/regular-1LXNPviB.js +1 -0
  75. package/dist/regular-_05oq5Tx.mjs +1101 -0
  76. package/dist/regular-slots-Bs3WJB3U.js +1 -0
  77. package/dist/regular-slots-C2NYxLPn.mjs +222 -0
  78. package/dist/resources-DgPnEv76.mjs +811 -0
  79. package/dist/resources-eb0pivDL.js +1 -0
  80. package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +2 -2
  81. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +92 -0
  82. package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
  83. package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +10 -0
  84. package/dist/src/appointments/components/edit/{EventDialog.vue.d.ts → EventDialog/ResendConfirmationDialog.vue.d.ts} +1 -1
  85. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +51 -0
  86. package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
  87. package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
  88. package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +15 -7
  89. package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +2 -0
  90. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +68 -0
  91. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +15 -0
  92. package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
  93. package/dist/src/appointments/config.d.ts +30 -0
  94. package/dist/src/appointments/index.d.ts +32 -5
  95. package/dist/src/appointments/pages/edit/agenda.vue.d.ts +1 -1
  96. package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -1
  97. package/dist/src/appointments/pages/edit/index.vue.d.ts +1 -1
  98. package/dist/src/appointments/pages/edit/orders.vue.d.ts +64 -0
  99. package/dist/src/appointments/pages/edit/payment.vue.d.ts +1 -1
  100. package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +1 -1
  101. package/dist/src/appointments/pages/edit/resources.vue.d.ts +1 -1
  102. package/dist/src/appointments/routes.d.ts +2 -5
  103. package/dist/src/appointments/types.d.ts +16 -0
  104. package/dist/src/appointments/utils/printReservation.d.ts +45 -0
  105. package/dist/src/content-manager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
  106. package/dist/src/content-manager/components/content-editor/PageSettings.vue.d.ts +2 -0
  107. package/dist/src/content-manager/components/content-editor/SidebarSectionWrapper.vue.d.ts +11 -1
  108. package/dist/src/content-manager/types.d.ts +5 -0
  109. package/dist/{vee-validate-zod-BPQyEfpF.js → vee-validate-zod-ByykgYKJ.js} +1 -1
  110. package/dist/{vee-validate-zod-IXkfh-6Q.mjs → vee-validate-zod-CcOwoF6y.mjs} +4 -4
  111. package/package.json +4 -2
  112. package/dist/CalendarDate-CWtpXgpD.js +0 -1
  113. package/dist/Create-BP8TX6rj.js +0 -1
  114. package/dist/DateFormatter-BbcSwTs4.js +0 -1
  115. package/dist/DateFormatter-CbO0PVUK.mjs +0 -99
  116. package/dist/Detail-DUo6qKqO.js +0 -1
  117. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +0 -1
  118. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +0 -55
  119. package/dist/Overview-BNMZ9MUK.js +0 -1
  120. package/dist/Overview-CEPodGCn.mjs +0 -311
  121. package/dist/Overview-CvquDPhB.js +0 -1
  122. package/dist/Overview-D67UjG6n.mjs +0 -947
  123. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +0 -1
  124. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +0 -392
  125. package/dist/TableView-Dv4YXBD1.js +0 -111
  126. package/dist/View-7qb_ohVo.js +0 -1
  127. package/dist/agenda-B49oKGeh.mjs +0 -706
  128. package/dist/agenda-DipQ5IWP.js +0 -1
  129. package/dist/availability-C7q9tq6l.js +0 -1
  130. package/dist/availability-DeCkqiu8.mjs +0 -613
  131. package/dist/exceptions-DJ9zWX3k.js +0 -1
  132. package/dist/index-CKPshlZ8-CIz1tDwX.js +0 -1
  133. package/dist/index-DUeFrD-B.js +0 -1
  134. package/dist/index-DsnoK4ia.mjs +0 -579
  135. package/dist/index-WL1P6d3j.js +0 -1
  136. package/dist/index-_mG-aU3Z.mjs +0 -87
  137. package/dist/index-_sQDF1pH.js +0 -1
  138. package/dist/index-klI238nT.mjs +0 -24
  139. package/dist/payment-kTjsV0Jj.js +0 -1
  140. package/dist/payment-zpCM0LD-.mjs +0 -981
  141. package/dist/regular-C4_3YXqx.mjs +0 -602
  142. package/dist/regular-DFwPEbZO.js +0 -1
  143. package/dist/regular-slots-4ooEpICB.mjs +0 -67
  144. package/dist/regular-slots-BAVGbomI.js +0 -1
  145. package/dist/resources-MpQkSstv.mjs +0 -563
  146. package/dist/resources-iM28T3dD.js +0 -1
  147. package/dist/src/appointments/components/edit/RegularSlotEditor.vue.d.ts +0 -16
@@ -1,26 +1,26 @@
1
- function O(e, t) {
1
+ function U(e, t) {
2
2
  return e - t * Math.floor(e / t);
3
3
  }
4
- const Q = 1721426;
4
+ const te = 1721426;
5
5
  function C(e, t, r, n) {
6
- t = N(e, t);
7
- let a = t - 1, c = -2;
8
- return r <= 2 ? c = 0 : Y(t) && (c = -1), Q - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * r - 362) / 12 + c + n);
6
+ t = W(e, t);
7
+ let a = t - 1, o = -2;
8
+ return r <= 2 ? o = 0 : R(t) && (o = -1), te - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * r - 362) / 12 + o + n);
9
9
  }
10
- function Y(e) {
10
+ function R(e) {
11
11
  return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
12
12
  }
13
- function N(e, t) {
13
+ function W(e, t) {
14
14
  return e === "BC" ? 1 - t : t;
15
15
  }
16
- function $e(e) {
16
+ function Me(e) {
17
17
  let t = "AD";
18
18
  return e <= 0 && (t = "BC", e = 1 - e), [
19
19
  t,
20
20
  e
21
21
  ];
22
22
  }
23
- const ye = {
23
+ const pe = {
24
24
  standard: [
25
25
  31,
26
26
  28,
@@ -50,25 +50,25 @@ const ye = {
50
50
  31
51
51
  ]
52
52
  };
53
- class D {
53
+ class w {
54
54
  fromJulianDay(t) {
55
- let r = t, n = r - Q, a = Math.floor(n / 146097), c = O(n, 146097), o = Math.floor(c / 36524), i = O(c, 36524), s = Math.floor(i / 1461), h = O(i, 1461), M = Math.floor(h / 365), p = a * 400 + o * 100 + s * 4 + M + (o !== 4 && M !== 4 ? 1 : 0), [w, m] = $e(p), y = r - C(w, m, 1, 1), B = 2;
56
- r < C(w, m, 3, 1) ? B = 0 : Y(m) && (B = 1);
57
- let V = Math.floor(((y + B) * 12 + 373) / 367), ue = r - C(w, m, V, 1) + 1;
58
- return new I(w, m, V, ue);
55
+ let r = t, n = r - te, a = Math.floor(n / 146097), o = U(n, 146097), i = Math.floor(o / 36524), c = U(o, 36524), s = Math.floor(c / 1461), h = U(c, 1461), M = Math.floor(h / 365), p = a * 400 + i * 100 + s * 4 + M + (i !== 4 && M !== 4 ? 1 : 0), [g, m] = Me(p), y = r - C(g, m, 1, 1), T = 2;
56
+ r < C(g, m, 3, 1) ? T = 0 : R(m) && (T = 1);
57
+ let G = Math.floor(((y + T) * 12 + 373) / 367), be = r - C(g, m, G, 1) + 1;
58
+ return new I(g, m, G, be);
59
59
  }
60
60
  toJulianDay(t) {
61
61
  return C(t.era, t.year, t.month, t.day);
62
62
  }
63
63
  getDaysInMonth(t) {
64
- return ye[Y(t.year) ? "leapyear" : "standard"][t.month - 1];
64
+ return pe[R(t.year) ? "leapyear" : "standard"][t.month - 1];
65
65
  }
66
66
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
67
  getMonthsInYear(t) {
68
68
  return 12;
69
69
  }
70
70
  getDaysInYear(t) {
71
- return Y(t.year) ? 366 : 365;
71
+ return R(t.year) ? 366 : 365;
72
72
  }
73
73
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
74
74
  getYearsInEra(t) {
@@ -90,7 +90,7 @@ class D {
90
90
  this.identifier = "gregory";
91
91
  }
92
92
  }
93
- const me = {
93
+ const ge = {
94
94
  "001": 1,
95
95
  AD: 1,
96
96
  AE: 6,
@@ -187,76 +187,76 @@ const me = {
187
187
  VN: 1,
188
188
  XK: 1
189
189
  };
190
- function X(e, t) {
190
+ function re(e, t) {
191
191
  return t = l(t, e.calendar), e.era === t.era && e.year === t.year && e.month === t.month && e.day === t.day;
192
192
  }
193
- function be(e, t) {
194
- return t = l(t, e.calendar), e = K(e), t = K(t), e.era === t.era && e.year === t.year && e.month === t.month;
193
+ function we(e, t) {
194
+ return t = l(t, e.calendar), e = z(e), t = z(t), e.era === t.era && e.year === t.year && e.month === t.month;
195
195
  }
196
- function Pe(e, t) {
197
- return W(e.calendar, t.calendar) && X(e, t);
196
+ function Xe(e, t) {
197
+ return J(e.calendar, t.calendar) && re(e, t);
198
198
  }
199
- function Ve(e, t) {
200
- return W(e.calendar, t.calendar) && be(e, t);
199
+ function et(e, t) {
200
+ return J(e.calendar, t.calendar) && we(e, t);
201
201
  }
202
- function W(e, t) {
203
- var r, n, a, c;
204
- return (c = (a = (r = e.isEqual) === null || r === void 0 ? void 0 : r.call(e, t)) !== null && a !== void 0 ? a : (n = t.isEqual) === null || n === void 0 ? void 0 : n.call(t, e)) !== null && c !== void 0 ? c : e.identifier === t.identifier;
202
+ function J(e, t) {
203
+ var r, n, a, o;
204
+ return (o = (a = (r = e.isEqual) === null || r === void 0 ? void 0 : r.call(e, t)) !== null && a !== void 0 ? a : (n = t.isEqual) === null || n === void 0 ? void 0 : n.call(t, e)) !== null && o !== void 0 ? o : e.identifier === t.identifier;
205
205
  }
206
- function Ge(e, t) {
207
- return X(e, pe(t));
206
+ function tt(e, t) {
207
+ return re(e, ve(t));
208
208
  }
209
- function Ke(e, t, r) {
210
- let n = e.calendar.toJulianDay(e), a = ge(t), c = Math.ceil(n + 1 - a) % 7;
211
- return c < 0 && (c += 7), c;
209
+ function rt(e, t, r) {
210
+ let n = e.calendar.toJulianDay(e), a = Ee(t), o = Math.ceil(n + 1 - a) % 7;
211
+ return o < 0 && (o += 7), o;
212
212
  }
213
- function Me(e) {
214
- return u(Date.now(), e);
213
+ function De(e) {
214
+ return d(Date.now(), e);
215
215
  }
216
- function pe(e) {
217
- return ve(Me(e));
216
+ function ve(e) {
217
+ return Ae(De(e));
218
218
  }
219
- function ee(e, t) {
219
+ function ne(e, t) {
220
220
  return e.calendar.toJulianDay(e) - t.calendar.toJulianDay(t);
221
221
  }
222
- function we(e, t) {
223
- return G(e) - G(t);
222
+ function Ie(e, t) {
223
+ return _(e) - _(t);
224
224
  }
225
- function G(e) {
225
+ function _(e) {
226
226
  return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
227
227
  }
228
- let Z = null;
229
- function te() {
230
- return Z == null && (Z = new Intl.DateTimeFormat().resolvedOptions().timeZone), Z;
228
+ let k = null;
229
+ function ae() {
230
+ return k == null && (k = new Intl.DateTimeFormat().resolvedOptions().timeZone), k;
231
231
  }
232
- function K(e) {
232
+ function z(e) {
233
233
  return e.subtract({
234
234
  days: e.day - 1
235
235
  });
236
236
  }
237
- function je(e) {
237
+ function nt(e) {
238
238
  return e.add({
239
239
  days: e.calendar.getDaysInMonth(e) - e.day
240
240
  });
241
241
  }
242
- const j = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
243
- function De(e) {
242
+ const Q = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
243
+ function xe(e) {
244
244
  if (Intl.Locale) {
245
- let r = j.get(e);
246
- return r || (r = new Intl.Locale(e).maximize().region, r && j.set(e, r)), r;
245
+ let r = Q.get(e);
246
+ return r || (r = new Intl.Locale(e).maximize().region, r && Q.set(e, r)), r;
247
247
  }
248
248
  let t = e.split("-")[1];
249
249
  return t === "u" ? void 0 : t;
250
250
  }
251
- function ge(e) {
252
- let t = R.get(e);
251
+ function Ee(e) {
252
+ let t = O.get(e);
253
253
  if (!t) {
254
254
  if (Intl.Locale) {
255
255
  let n = new Intl.Locale(e);
256
256
  if ("getWeekInfo" in n && (t = n.getWeekInfo(), t))
257
- return R.set(e, t), t.firstDay;
257
+ return O.set(e, t), t.firstDay;
258
258
  }
259
- let r = De(e);
259
+ let r = xe(e);
260
260
  if (e.includes("-fw-")) {
261
261
  let n = e.split("-fw-")[1].split("-")[0];
262
262
  n === "mon" ? t = {
@@ -277,30 +277,30 @@ function ge(e) {
277
277
  } else e.includes("-ca-iso8601") ? t = {
278
278
  firstDay: 1
279
279
  } : t = {
280
- firstDay: r && me[r] || 0
280
+ firstDay: r && ge[r] || 0
281
281
  };
282
- R.set(e, t);
282
+ O.set(e, t);
283
283
  }
284
284
  return t.firstDay;
285
285
  }
286
- function g(e) {
287
- e = l(e, new D());
288
- let t = N(e.era, e.year);
289
- return re(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
286
+ function D(e) {
287
+ e = l(e, new w());
288
+ let t = W(e.era, e.year);
289
+ return oe(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
290
290
  }
291
- function re(e, t, r, n, a, c, o) {
292
- let i = /* @__PURE__ */ new Date();
293
- return i.setUTCHours(n, a, c, o), i.setUTCFullYear(e, t - 1, r), i.getTime();
291
+ function oe(e, t, r, n, a, o, i) {
292
+ let c = /* @__PURE__ */ new Date();
293
+ return c.setUTCHours(n, a, o, i), c.setUTCFullYear(e, t - 1, r), c.getTime();
294
294
  }
295
- function L(e, t) {
295
+ function F(e, t) {
296
296
  if (t === "UTC") return 0;
297
- if (e > 0 && t === te()) return new Date(e).getTimezoneOffset() * -6e4;
298
- let { year: r, month: n, day: a, hour: c, minute: o, second: i } = ne(e, t);
299
- return re(r, n, a, c, o, i, 0) - Math.floor(e / 1e3) * 1e3;
297
+ if (e > 0 && t === ae()) return new Date(e).getTimezoneOffset() * -6e4;
298
+ let { year: r, month: n, day: a, hour: o, minute: i, second: c } = ie(e, t);
299
+ return oe(r, n, a, o, i, c, 0) - Math.floor(e / 1e3) * 1e3;
300
300
  }
301
- const _ = /* @__PURE__ */ new Map();
302
- function ne(e, t) {
303
- let r = _.get(t);
301
+ const X = /* @__PURE__ */ new Map();
302
+ function ie(e, t) {
303
+ let r = X.get(t);
304
304
  r || (r = new Intl.DateTimeFormat("en-US", {
305
305
  timeZone: t,
306
306
  hour12: !1,
@@ -311,9 +311,9 @@ function ne(e, t) {
311
311
  hour: "numeric",
312
312
  minute: "numeric",
313
313
  second: "numeric"
314
- }), _.set(t, r));
314
+ }), X.set(t, r));
315
315
  let n = r.formatToParts(new Date(e)), a = {};
316
- for (let c of n) c.type !== "literal" && (a[c.type] = c.value);
316
+ for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
317
317
  return {
318
318
  // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
319
319
  year: a.era === "BC" || a.era === "B" ? -a.year + 1 : +a.year,
@@ -324,139 +324,139 @@ function ne(e, t) {
324
324
  second: +a.second
325
325
  };
326
326
  }
327
- const z = 864e5;
328
- function xe(e, t, r, n) {
327
+ const ee = 864e5;
328
+ function Se(e, t, r, n) {
329
329
  return (r === n ? [
330
330
  r
331
331
  ] : [
332
332
  r,
333
333
  n
334
- ]).filter((c) => Ie(e, t, c));
334
+ ]).filter((o) => Ce(e, t, o));
335
335
  }
336
- function Ie(e, t, r) {
337
- let n = ne(r, t);
336
+ function Ce(e, t, r) {
337
+ let n = ie(r, t);
338
338
  return e.year === n.year && e.month === n.month && e.day === n.day && e.hour === n.hour && e.minute === n.minute && e.second === n.second;
339
339
  }
340
- function d(e, t, r = "compatible") {
341
- let n = x(e);
342
- if (t === "UTC") return g(n);
343
- if (t === te() && r === "compatible") {
344
- n = l(n, new D());
345
- let s = /* @__PURE__ */ new Date(), h = N(n.era, n.year);
340
+ function u(e, t, r = "compatible") {
341
+ let n = v(e);
342
+ if (t === "UTC") return D(n);
343
+ if (t === ae() && r === "compatible") {
344
+ n = l(n, new w());
345
+ let s = /* @__PURE__ */ new Date(), h = W(n.era, n.year);
346
346
  return s.setFullYear(h, n.month - 1, n.day), s.setHours(n.hour, n.minute, n.second, n.millisecond), s.getTime();
347
347
  }
348
- let a = g(n), c = L(a - z, t), o = L(a + z, t), i = xe(n, t, a - c, a - o);
349
- if (i.length === 1) return i[0];
350
- if (i.length > 1) switch (r) {
348
+ let a = D(n), o = F(a - ee, t), i = F(a + ee, t), c = Se(n, t, a - o, a - i);
349
+ if (c.length === 1) return c[0];
350
+ if (c.length > 1) switch (r) {
351
351
  // 'compatible' means 'earlier' for "fall back" transitions
352
352
  case "compatible":
353
353
  case "earlier":
354
- return i[0];
354
+ return c[0];
355
355
  case "later":
356
- return i[i.length - 1];
356
+ return c[c.length - 1];
357
357
  case "reject":
358
358
  throw new RangeError("Multiple possible absolute times found");
359
359
  }
360
360
  switch (r) {
361
361
  case "earlier":
362
- return Math.min(a - c, a - o);
362
+ return Math.min(a - o, a - i);
363
363
  // 'compatible' means 'later' for "spring forward" transitions
364
364
  case "compatible":
365
365
  case "later":
366
- return Math.max(a - c, a - o);
366
+ return Math.max(a - o, a - i);
367
367
  case "reject":
368
368
  throw new RangeError("No such absolute time found");
369
369
  }
370
370
  }
371
- function ae(e, t, r = "compatible") {
372
- return new Date(d(e, t, r));
371
+ function ce(e, t, r = "compatible") {
372
+ return new Date(u(e, t, r));
373
373
  }
374
- function u(e, t) {
375
- let r = L(e, t), n = new Date(e + r), a = n.getUTCFullYear(), c = n.getUTCMonth() + 1, o = n.getUTCDate(), i = n.getUTCHours(), s = n.getUTCMinutes(), h = n.getUTCSeconds(), M = n.getUTCMilliseconds();
376
- return new E(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, c, o, t, r, i, s, h, M);
374
+ function d(e, t) {
375
+ let r = F(e, t), n = new Date(e + r), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, i = n.getUTCDate(), c = n.getUTCHours(), s = n.getUTCMinutes(), h = n.getUTCSeconds(), M = n.getUTCMilliseconds();
376
+ return new S(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, t, r, c, s, h, M);
377
377
  }
378
- function ve(e) {
378
+ function Ae(e) {
379
379
  return new I(e.calendar, e.era, e.year, e.month, e.day);
380
380
  }
381
- function x(e, t) {
382
- let r = 0, n = 0, a = 0, c = 0;
383
- if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond: c } = e);
381
+ function v(e, t) {
382
+ let r = 0, n = 0, a = 0, o = 0;
383
+ if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond: o } = e);
384
384
  else if ("hour" in e && !t) return e;
385
- return t && ({ hour: r, minute: n, second: a, millisecond: c } = t), new S(e.calendar, e.era, e.year, e.month, e.day, r, n, a, c);
385
+ return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new E(e.calendar, e.era, e.year, e.month, e.day, r, n, a, o);
386
386
  }
387
387
  function l(e, t) {
388
- if (W(e.calendar, t)) return e;
388
+ if (J(e.calendar, t)) return e;
389
389
  let r = t.fromJulianDay(e.calendar.toJulianDay(e)), n = e.copy();
390
390
  return n.calendar = t, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, b(n), n;
391
391
  }
392
- function Se(e, t, r) {
393
- if (e instanceof E)
394
- return e.timeZone === t ? e : Ce(e, t);
395
- let n = d(e, t, r);
396
- return u(n, t);
392
+ function Re(e, t, r) {
393
+ if (e instanceof S)
394
+ return e.timeZone === t ? e : Be(e, t);
395
+ let n = u(e, t, r);
396
+ return d(n, t);
397
397
  }
398
- function Ee(e) {
399
- let t = g(e) - e.offset;
398
+ function Ye(e) {
399
+ let t = D(e) - e.offset;
400
400
  return new Date(t);
401
401
  }
402
- function Ce(e, t) {
403
- let r = g(e) - e.offset;
404
- return l(u(r, t), e.calendar);
402
+ function Be(e, t) {
403
+ let r = D(e) - e.offset;
404
+ return l(d(r, t), e.calendar);
405
405
  }
406
- const v = 36e5;
407
- function U(e, t) {
408
- let r = e.copy(), n = "hour" in r ? Ue(r, t) : 0;
409
- T(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0, F(r), ce(r), r.day += (t.weeks || 0) * 7, r.day += t.days || 0, r.day += n, Ae(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
406
+ const x = 36e5;
407
+ function B(e, t) {
408
+ let r = e.copy(), n = "hour" in r ? Oe(r, t) : 0;
409
+ L(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0, N(r), se(r), r.day += (t.weeks || 0) * 7, r.day += t.days || 0, r.day += n, Te(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
410
410
  let a = r.calendar.getYearsInEra(r);
411
411
  if (r.year > a) {
412
- var c, o;
413
- let s = (c = (o = r.calendar).isInverseEra) === null || c === void 0 ? void 0 : c.call(o, r);
412
+ var o, i;
413
+ let s = (o = (i = r.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(i, r);
414
414
  r.year = a, r.month = s ? 1 : r.calendar.getMonthsInYear(r), r.day = s ? 1 : r.calendar.getDaysInMonth(r);
415
415
  }
416
416
  r.month < 1 && (r.month = 1, r.day = 1);
417
- let i = r.calendar.getMonthsInYear(r);
418
- return r.month > i && (r.month = i, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
417
+ let c = r.calendar.getMonthsInYear(r);
418
+ return r.month > c && (r.month = c, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
419
419
  }
420
- function T(e, t) {
420
+ function L(e, t) {
421
421
  var r, n;
422
422
  !((r = (n = e.calendar).isInverseEra) === null || r === void 0) && r.call(n, e) && (t = -t), e.year += t;
423
423
  }
424
- function F(e) {
424
+ function N(e) {
425
425
  for (; e.month < 1; )
426
- T(e, -1), e.month += e.calendar.getMonthsInYear(e);
426
+ L(e, -1), e.month += e.calendar.getMonthsInYear(e);
427
427
  let t = 0;
428
428
  for (; e.month > (t = e.calendar.getMonthsInYear(e)); )
429
- e.month -= t, T(e, 1);
429
+ e.month -= t, L(e, 1);
430
430
  }
431
- function Ae(e) {
431
+ function Te(e) {
432
432
  for (; e.day < 1; )
433
- e.month--, F(e), e.day += e.calendar.getDaysInMonth(e);
433
+ e.month--, N(e), e.day += e.calendar.getDaysInMonth(e);
434
434
  for (; e.day > e.calendar.getDaysInMonth(e); )
435
- e.day -= e.calendar.getDaysInMonth(e), e.month++, F(e);
435
+ e.day -= e.calendar.getDaysInMonth(e), e.month++, N(e);
436
436
  }
437
- function ce(e) {
437
+ function se(e) {
438
438
  e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
439
439
  }
440
440
  function b(e) {
441
- e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), ce(e);
441
+ e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), se(e);
442
442
  }
443
- function oe(e) {
443
+ function le(e) {
444
444
  let t = {};
445
445
  for (let r in e) typeof e[r] == "number" && (t[r] = -e[r]);
446
446
  return t;
447
447
  }
448
- function ie(e, t) {
449
- return U(e, oe(t));
448
+ function fe(e, t) {
449
+ return B(e, le(t));
450
450
  }
451
- function J(e, t) {
451
+ function j(e, t) {
452
452
  let r = e.copy();
453
453
  return t.era != null && (r.era = t.era), t.year != null && (r.year = t.year), t.month != null && (r.month = t.month), t.day != null && (r.day = t.day), b(r), r;
454
454
  }
455
- function k(e, t) {
455
+ function Y(e, t) {
456
456
  let r = e.copy();
457
457
  return t.hour != null && (r.hour = t.hour), t.minute != null && (r.minute = t.minute), t.second != null && (r.second = t.second), t.millisecond != null && (r.millisecond = t.millisecond), ke(r), r;
458
458
  }
459
- function Ye(e) {
459
+ function Ue(e) {
460
460
  e.second += Math.floor(e.millisecond / 1e3), e.millisecond = A(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = A(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = A(e.minute, 60);
461
461
  let t = Math.floor(e.hour / 24);
462
462
  return e.hour = A(e.hour, 24), t;
@@ -468,21 +468,21 @@ function A(e, t) {
468
468
  let r = e % t;
469
469
  return r < 0 && (r += t), r;
470
470
  }
471
- function Ue(e, t) {
472
- return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, Ye(e);
471
+ function Oe(e, t) {
472
+ return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, Ue(e);
473
473
  }
474
474
  function q(e, t, r, n) {
475
475
  let a = e.copy();
476
476
  switch (t) {
477
477
  case "era": {
478
- let i = e.calendar.getEras(), s = i.indexOf(e.era);
478
+ let c = e.calendar.getEras(), s = c.indexOf(e.era);
479
479
  if (s < 0) throw new Error("Invalid era: " + e.era);
480
- s = $(s, r, 0, i.length - 1, n?.round), a.era = i[s], b(a);
480
+ s = $(s, r, 0, c.length - 1, n?.round), a.era = c[s], b(a);
481
481
  break;
482
482
  }
483
483
  case "year":
484
- var c, o;
485
- !((c = (o = a.calendar).isInverseEra) === null || c === void 0) && c.call(o, a) && (r = -r), a.year = $(e.year, r, -1 / 0, 9999, n?.round), a.year === -1 / 0 && (a.year = 1), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, e);
484
+ var o, i;
485
+ !((o = (i = a.calendar).isInverseEra) === null || o === void 0) && o.call(i, a) && (r = -r), a.year = $(e.year, r, -1 / 0, 9999, n?.round), a.year === -1 / 0 && (a.year = 1), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, e);
486
486
  break;
487
487
  case "month":
488
488
  a.month = $(e.month, r, 1, e.calendar.getMonthsInYear(e), n?.round);
@@ -495,16 +495,16 @@ function q(e, t, r, n) {
495
495
  }
496
496
  return e.calendar.balanceDate && e.calendar.balanceDate(a), b(a), a;
497
497
  }
498
- function se(e, t, r, n) {
498
+ function he(e, t, r, n) {
499
499
  let a = e.copy();
500
500
  switch (t) {
501
501
  case "hour": {
502
- let c = e.hour, o = 0, i = 23;
502
+ let o = e.hour, i = 0, c = 23;
503
503
  if (n?.hourCycle === 12) {
504
- let s = c >= 12;
505
- o = s ? 12 : 0, i = s ? 23 : 11;
504
+ let s = o >= 12;
505
+ i = s ? 12 : 0, c = s ? 23 : 11;
506
506
  }
507
- a.hour = $(c, r, o, i, n?.round);
507
+ a.hour = $(o, r, i, c, n?.round);
508
508
  break;
509
509
  }
510
510
  case "minute":
@@ -524,86 +524,86 @@ function se(e, t, r, n) {
524
524
  function $(e, t, r, n, a = !1) {
525
525
  if (a) {
526
526
  e += Math.sign(t), e < r && (e = n);
527
- let c = Math.abs(t);
528
- t > 0 ? e = Math.ceil(e / c) * c : e = Math.floor(e / c) * c, e > n && (e = r);
527
+ let o = Math.abs(t);
528
+ t > 0 ? e = Math.ceil(e / o) * o : e = Math.floor(e / o) * o, e > n && (e = r);
529
529
  } else
530
530
  e += t, e < r ? e = n - (r - e - 1) : e > n && (e = r + (e - n - 1));
531
531
  return e;
532
532
  }
533
- function le(e, t) {
533
+ function ue(e, t) {
534
534
  let r;
535
535
  if (t.years != null && t.years !== 0 || t.months != null && t.months !== 0 || t.weeks != null && t.weeks !== 0 || t.days != null && t.days !== 0) {
536
- let a = U(x(e), {
536
+ let a = B(v(e), {
537
537
  years: t.years,
538
538
  months: t.months,
539
539
  weeks: t.weeks,
540
540
  days: t.days
541
541
  });
542
- r = d(a, e.timeZone);
542
+ r = u(a, e.timeZone);
543
543
  } else
544
- r = g(e) - e.offset;
544
+ r = D(e) - e.offset;
545
545
  r += t.milliseconds || 0, r += (t.seconds || 0) * 1e3, r += (t.minutes || 0) * 6e4, r += (t.hours || 0) * 36e5;
546
- let n = u(r, e.timeZone);
546
+ let n = d(r, e.timeZone);
547
547
  return l(n, e.calendar);
548
548
  }
549
- function Be(e, t) {
550
- return le(e, oe(t));
549
+ function Ze(e, t) {
550
+ return ue(e, le(t));
551
551
  }
552
- function Oe(e, t, r, n) {
552
+ function He(e, t, r, n) {
553
553
  switch (t) {
554
554
  case "hour": {
555
- let a = 0, c = 23;
555
+ let a = 0, o = 23;
556
556
  if (n?.hourCycle === 12) {
557
557
  let y = e.hour >= 12;
558
- a = y ? 12 : 0, c = y ? 23 : 11;
558
+ a = y ? 12 : 0, o = y ? 23 : 11;
559
559
  }
560
- let o = x(e), i = l(k(o, {
560
+ let i = v(e), c = l(Y(i, {
561
561
  hour: a
562
- }), new D()), s = [
563
- d(i, e.timeZone, "earlier"),
564
- d(i, e.timeZone, "later")
565
- ].filter((y) => u(y, e.timeZone).day === i.day)[0], h = l(k(o, {
566
- hour: c
567
- }), new D()), M = [
568
- d(h, e.timeZone, "earlier"),
569
- d(h, e.timeZone, "later")
570
- ].filter((y) => u(y, e.timeZone).day === h.day).pop(), p = g(e) - e.offset, w = Math.floor(p / v), m = p % v;
571
- return p = $(w, r, Math.floor(s / v), Math.floor(M / v), n?.round) * v + m, l(u(p, e.timeZone), e.calendar);
562
+ }), new w()), s = [
563
+ u(c, e.timeZone, "earlier"),
564
+ u(c, e.timeZone, "later")
565
+ ].filter((y) => d(y, e.timeZone).day === c.day)[0], h = l(Y(i, {
566
+ hour: o
567
+ }), new w()), M = [
568
+ u(h, e.timeZone, "earlier"),
569
+ u(h, e.timeZone, "later")
570
+ ].filter((y) => d(y, e.timeZone).day === h.day).pop(), p = D(e) - e.offset, g = Math.floor(p / x), m = p % x;
571
+ return p = $(g, r, Math.floor(s / x), Math.floor(M / x), n?.round) * x + m, l(d(p, e.timeZone), e.calendar);
572
572
  }
573
573
  case "minute":
574
574
  case "second":
575
575
  case "millisecond":
576
- return se(e, t, r, n);
576
+ return he(e, t, r, n);
577
577
  case "era":
578
578
  case "year":
579
579
  case "month":
580
580
  case "day": {
581
- let a = q(x(e), t, r, n), c = d(a, e.timeZone);
582
- return l(u(c, e.timeZone), e.calendar);
581
+ let a = q(v(e), t, r, n), o = u(a, e.timeZone);
582
+ return l(d(o, e.timeZone), e.calendar);
583
583
  }
584
584
  default:
585
585
  throw new Error("Unsupported field " + t);
586
586
  }
587
587
  }
588
- function Ze(e, t, r) {
589
- let n = x(e), a = k(J(n, t), t);
588
+ function Pe(e, t, r) {
589
+ let n = v(e), a = Y(j(n, t), t);
590
590
  if (a.compare(n) === 0) return e;
591
- let c = d(a, e.timeZone, r);
592
- return l(u(c, e.timeZone), e.calendar);
591
+ let o = u(a, e.timeZone, r);
592
+ return l(d(o, e.timeZone), e.calendar);
593
593
  }
594
- const Re = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Le = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, fe = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
595
- function _e(e) {
596
- let t = e.match(Re);
594
+ const Fe = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Le = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, de = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
595
+ function at(e) {
596
+ let t = e.match(Fe);
597
597
  if (!t)
598
- throw fe.test(e) ? new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date string: " + e);
598
+ throw de.test(e) ? new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date string: " + e);
599
599
  let r = new I(f(t[1], 0, 9999), f(t[2], 1, 12), 1);
600
600
  return r.day = f(t[3], 1, r.calendar.getDaysInMonth(r)), r;
601
601
  }
602
- function ze(e) {
602
+ function ot(e) {
603
603
  let t = e.match(Le);
604
604
  if (!t)
605
- throw fe.test(e) ? new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date time string: " + e);
606
- let r = f(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new S(n, r < 1 ? -r + 1 : r, f(t[2], 1, 12), 1, t[4] ? f(t[4], 0, 23) : 0, t[5] ? f(t[5], 0, 59) : 0, t[6] ? f(t[6], 0, 59) : 0, t[7] ? f(t[7], 0, 1 / 0) * 1e3 : 0);
605
+ throw de.test(e) ? new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date time string: " + e);
606
+ let r = f(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new E(n, r < 1 ? -r + 1 : r, f(t[2], 1, 12), 1, t[4] ? f(t[4], 0, 23) : 0, t[5] ? f(t[5], 0, 59) : 0, t[6] ? f(t[6], 0, 59) : 0, t[7] ? f(t[7], 0, 1 / 0) * 1e3 : 0);
607
607
  return a.day = f(t[3], 0, a.calendar.getDaysInMonth(a)), a;
608
608
  }
609
609
  function f(e, t, r) {
@@ -611,49 +611,49 @@ function f(e, t, r) {
611
611
  if (n < t || n > r) throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);
612
612
  return n;
613
613
  }
614
- function Te(e) {
614
+ function Ne(e) {
615
615
  return `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${e.millisecond ? String(e.millisecond / 1e3).slice(1) : ""}`;
616
616
  }
617
- function he(e) {
618
- let t = l(e, new D()), r;
617
+ function $e(e) {
618
+ let t = l(e, new w()), r;
619
619
  return t.era === "BC" ? r = t.year === 1 ? "0000" : "-" + String(Math.abs(1 - t.year)).padStart(6, "00") : r = String(t.year).padStart(4, "0"), `${r}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
620
620
  }
621
- function de(e) {
622
- return `${he(e)}T${Te(e)}`;
621
+ function ye(e) {
622
+ return `${$e(e)}T${Ne(e)}`;
623
623
  }
624
- function Fe(e) {
624
+ function We(e) {
625
625
  let t = Math.sign(e) < 0 ? "-" : "+";
626
626
  e = Math.abs(e);
627
- let r = Math.floor(e / 36e5), n = Math.floor(e % 36e5 / 6e4), a = Math.floor(e % 36e5 % 6e4 / 1e3), c = `${t}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
628
- return a !== 0 && (c += `:${String(a).padStart(2, "0")}`), c;
627
+ let r = Math.floor(e / 36e5), n = Math.floor(e % 36e5 / 6e4), a = Math.floor(e % 36e5 % 6e4 / 1e3), o = `${t}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
628
+ return a !== 0 && (o += `:${String(a).padStart(2, "0")}`), o;
629
629
  }
630
- function Ne(e) {
631
- return `${de(e)}${Fe(e.offset)}[${e.timeZone}]`;
630
+ function Je(e) {
631
+ return `${ye(e)}${We(e.offset)}[${e.timeZone}]`;
632
632
  }
633
- function We(e, t) {
633
+ function je(e, t) {
634
634
  if (t.has(e))
635
635
  throw new TypeError("Cannot initialize the same private elements twice on an object");
636
636
  }
637
- function H(e, t, r) {
638
- We(e, t), t.set(e, r);
637
+ function K(e, t, r) {
638
+ je(e, t), t.set(e, r);
639
639
  }
640
- function P(e) {
641
- let t = typeof e[0] == "object" ? e.shift() : new D(), r;
640
+ function V(e) {
641
+ let t = typeof e[0] == "object" ? e.shift() : new w(), r;
642
642
  if (typeof e[0] == "string") r = e.shift();
643
643
  else {
644
- let o = t.getEras();
645
- r = o[o.length - 1];
644
+ let i = t.getEras();
645
+ r = i[i.length - 1];
646
646
  }
647
- let n = e.shift(), a = e.shift(), c = e.shift();
647
+ let n = e.shift(), a = e.shift(), o = e.shift();
648
648
  return [
649
649
  t,
650
650
  r,
651
651
  n,
652
652
  a,
653
- c
653
+ o
654
654
  ];
655
655
  }
656
- var Je = /* @__PURE__ */ new WeakMap();
656
+ var qe = /* @__PURE__ */ new WeakMap();
657
657
  class I {
658
658
  /** Returns a copy of this date. */
659
659
  copy() {
@@ -661,15 +661,15 @@ class I {
661
661
  }
662
662
  /** Returns a new `CalendarDate` with the given duration added to it. */
663
663
  add(t) {
664
- return U(this, t);
664
+ return B(this, t);
665
665
  }
666
666
  /** Returns a new `CalendarDate` with the given duration subtracted from it. */
667
667
  subtract(t) {
668
- return ie(this, t);
668
+ return fe(this, t);
669
669
  }
670
670
  /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
671
671
  set(t) {
672
- return J(this, t);
672
+ return j(this, t);
673
673
  }
674
674
  /**
675
675
  * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
@@ -680,42 +680,42 @@ class I {
680
680
  }
681
681
  /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
682
682
  toDate(t) {
683
- return ae(this, t);
683
+ return ce(this, t);
684
684
  }
685
685
  /** Converts the date to an ISO 8601 formatted string. */
686
686
  toString() {
687
- return he(this);
687
+ return $e(this);
688
688
  }
689
689
  /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
690
690
  compare(t) {
691
- return ee(this, t);
691
+ return ne(this, t);
692
692
  }
693
693
  constructor(...t) {
694
- H(this, Je, {
694
+ K(this, qe, {
695
695
  writable: !0,
696
696
  value: void 0
697
697
  });
698
- let [r, n, a, c, o] = P(t);
699
- this.calendar = r, this.era = n, this.year = a, this.month = c, this.day = o, b(this);
698
+ let [r, n, a, o, i] = V(t);
699
+ this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, b(this);
700
700
  }
701
701
  }
702
- var qe = /* @__PURE__ */ new WeakMap();
703
- class S {
702
+ var Ke = /* @__PURE__ */ new WeakMap();
703
+ class E {
704
704
  /** Returns a copy of this date. */
705
705
  copy() {
706
- return this.era ? new S(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new S(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
706
+ return this.era ? new E(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new E(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
707
707
  }
708
708
  /** Returns a new `CalendarDateTime` with the given duration added to it. */
709
709
  add(t) {
710
- return U(this, t);
710
+ return B(this, t);
711
711
  }
712
712
  /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
713
713
  subtract(t) {
714
- return ie(this, t);
714
+ return fe(this, t);
715
715
  }
716
716
  /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
717
717
  set(t) {
718
- return J(k(this, t), t);
718
+ return j(Y(this, t), t);
719
719
  }
720
720
  /**
721
721
  * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
@@ -729,63 +729,63 @@ class S {
729
729
  case "day":
730
730
  return q(this, t, r, n);
731
731
  default:
732
- return se(this, t, r, n);
732
+ return he(this, t, r, n);
733
733
  }
734
734
  }
735
735
  /** Converts the date to a native JavaScript Date object in the given time zone. */
736
736
  toDate(t, r) {
737
- return ae(this, t, r);
737
+ return ce(this, t, r);
738
738
  }
739
739
  /** Converts the date to an ISO 8601 formatted string. */
740
740
  toString() {
741
- return de(this);
741
+ return ye(this);
742
742
  }
743
743
  /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
744
744
  compare(t) {
745
- let r = ee(this, t);
746
- return r === 0 ? we(this, x(t)) : r;
745
+ let r = ne(this, t);
746
+ return r === 0 ? Ie(this, v(t)) : r;
747
747
  }
748
748
  constructor(...t) {
749
- H(this, qe, {
749
+ K(this, Ke, {
750
750
  writable: !0,
751
751
  value: void 0
752
752
  });
753
- let [r, n, a, c, o] = P(t);
754
- this.calendar = r, this.era = n, this.year = a, this.month = c, this.day = o, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
753
+ let [r, n, a, o, i] = V(t);
754
+ this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
755
755
  }
756
756
  }
757
- var He = /* @__PURE__ */ new WeakMap();
758
- class E {
757
+ var Ve = /* @__PURE__ */ new WeakMap();
758
+ class S {
759
759
  /** Returns a copy of this date. */
760
760
  copy() {
761
- return this.era ? new E(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new E(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
761
+ return this.era ? new S(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new S(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
762
762
  }
763
763
  /** Returns a new `ZonedDateTime` with the given duration added to it. */
764
764
  add(t) {
765
- return le(this, t);
765
+ return ue(this, t);
766
766
  }
767
767
  /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
768
768
  subtract(t) {
769
- return Be(this, t);
769
+ return Ze(this, t);
770
770
  }
771
771
  /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
772
772
  set(t, r) {
773
- return Ze(this, t, r);
773
+ return Pe(this, t, r);
774
774
  }
775
775
  /**
776
776
  * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
777
777
  * When the resulting value reaches the limits of the field, it wraps around.
778
778
  */
779
779
  cycle(t, r, n) {
780
- return Oe(this, t, r, n);
780
+ return He(this, t, r, n);
781
781
  }
782
782
  /** Converts the date to a native JavaScript Date object. */
783
783
  toDate() {
784
- return Ee(this);
784
+ return Ye(this);
785
785
  }
786
786
  /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
787
787
  toString() {
788
- return Ne(this);
788
+ return Je(this);
789
789
  }
790
790
  /** Converts the date to an ISO 8601 formatted string in UTC. */
791
791
  toAbsoluteString() {
@@ -793,38 +793,135 @@ class E {
793
793
  }
794
794
  /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
795
795
  compare(t) {
796
- return this.toDate().getTime() - Se(t, this.timeZone).toDate().getTime();
796
+ return this.toDate().getTime() - Re(t, this.timeZone).toDate().getTime();
797
797
  }
798
798
  constructor(...t) {
799
- H(this, He, {
799
+ K(this, Ve, {
800
800
  writable: !0,
801
801
  value: void 0
802
802
  });
803
- let [r, n, a, c, o] = P(t), i = t.shift(), s = t.shift();
804
- this.calendar = r, this.era = n, this.year = a, this.month = c, this.day = o, this.timeZone = i, this.offset = s, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
803
+ let [r, n, a, o, i] = V(t), c = t.shift(), s = t.shift();
804
+ this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = c, this.offset = s, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
805
+ }
806
+ }
807
+ let Z = /* @__PURE__ */ new Map();
808
+ class it {
809
+ /** Formats a date as a string according to the locale and format options passed to the constructor. */
810
+ format(t) {
811
+ return this.formatter.format(t);
812
+ }
813
+ /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
814
+ formatToParts(t) {
815
+ return this.formatter.formatToParts(t);
816
+ }
817
+ /** Formats a date range as a string. */
818
+ formatRange(t, r) {
819
+ if (typeof this.formatter.formatRange == "function")
820
+ return this.formatter.formatRange(t, r);
821
+ if (r < t) throw new RangeError("End date must be >= start date");
822
+ return `${this.formatter.format(t)} – ${this.formatter.format(r)}`;
823
+ }
824
+ /** Formats a date range as an array of parts. */
825
+ formatRangeToParts(t, r) {
826
+ if (typeof this.formatter.formatRangeToParts == "function")
827
+ return this.formatter.formatRangeToParts(t, r);
828
+ if (r < t) throw new RangeError("End date must be >= start date");
829
+ let n = this.formatter.formatToParts(t), a = this.formatter.formatToParts(r);
830
+ return [
831
+ ...n.map((o) => ({
832
+ ...o,
833
+ source: "startRange"
834
+ })),
835
+ {
836
+ type: "literal",
837
+ value: " – ",
838
+ source: "shared"
839
+ },
840
+ ...a.map((o) => ({
841
+ ...o,
842
+ source: "endRange"
843
+ }))
844
+ ];
845
+ }
846
+ /** Returns the resolved formatting options based on the values passed to the constructor. */
847
+ resolvedOptions() {
848
+ let t = this.formatter.resolvedOptions();
849
+ return ze() && (this.resolvedHourCycle || (this.resolvedHourCycle = Qe(t.locale, this.options)), t.hourCycle = this.resolvedHourCycle, t.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), t.calendar === "ethiopic-amete-alem" && (t.calendar = "ethioaa"), t;
805
850
  }
851
+ constructor(t, r = {}) {
852
+ this.formatter = me(t, r), this.options = r;
853
+ }
854
+ }
855
+ const Ge = {
856
+ true: {
857
+ // Only Japanese uses the h11 style for 12 hour time. All others use h12.
858
+ ja: "h11"
859
+ },
860
+ false: {}
861
+ };
862
+ function me(e, t = {}) {
863
+ if (typeof t.hour12 == "boolean" && _e()) {
864
+ t = {
865
+ ...t
866
+ };
867
+ let a = Ge[String(t.hour12)][e.split("-")[0]], o = t.hour12 ? "h12" : "h23";
868
+ t.hourCycle = a ?? o, delete t.hour12;
869
+ }
870
+ let r = e + (t ? Object.entries(t).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
871
+ if (Z.has(r)) return Z.get(r);
872
+ let n = new Intl.DateTimeFormat(e, t);
873
+ return Z.set(r, n), n;
874
+ }
875
+ let H = null;
876
+ function _e() {
877
+ return H == null && (H = new Intl.DateTimeFormat("en-US", {
878
+ hour: "numeric",
879
+ hour12: !1
880
+ }).format(new Date(2020, 2, 3, 0)) === "24"), H;
881
+ }
882
+ let P = null;
883
+ function ze() {
884
+ return P == null && (P = new Intl.DateTimeFormat("fr", {
885
+ hour: "numeric",
886
+ hour12: !1
887
+ }).resolvedOptions().hourCycle === "h12"), P;
888
+ }
889
+ function Qe(e, t) {
890
+ if (!t.timeStyle && !t.hour) return;
891
+ e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
892
+ let r = me(e, {
893
+ ...t,
894
+ timeZone: void 0
895
+ // use local timezone
896
+ }), n = parseInt(r.formatToParts(new Date(2020, 2, 3, 0)).find((o) => o.type === "hour").value, 10), a = parseInt(r.formatToParts(new Date(2020, 2, 3, 23)).find((o) => o.type === "hour").value, 10);
897
+ if (n === 0 && a === 23) return "h23";
898
+ if (n === 24 && a === 23) return "h24";
899
+ if (n === 0 && a === 11) return "h11";
900
+ if (n === 12 && a === 11) return "h12";
901
+ throw new Error("Unexpected hour cycle result");
806
902
  }
807
903
  export {
808
- D as $,
904
+ w as $,
809
905
  I as a,
810
- N as b,
811
- $e as c,
812
- O as d,
906
+ W as b,
907
+ Me as c,
908
+ U as d,
813
909
  C as e,
814
- Y as f,
815
- te as g,
816
- l as h,
817
- S as i,
910
+ R as f,
911
+ ae as g,
912
+ it as h,
913
+ l as i,
818
914
  E as j,
819
- Ke as k,
820
- K as l,
821
- je as m,
822
- pe as n,
823
- Ve as o,
824
- X as p,
825
- Pe as q,
826
- Ge as r,
827
- be as s,
828
- ze as t,
829
- _e as u
915
+ S as k,
916
+ rt as l,
917
+ z as m,
918
+ nt as n,
919
+ ve as o,
920
+ et as p,
921
+ re as q,
922
+ Xe as r,
923
+ tt as s,
924
+ we as t,
925
+ ot as u,
926
+ at as v
830
927
  };