@sbb-esta/lyne-elements-experimental 5.0.2 → 5.1.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 (256) hide show
  1. package/autocomplete-grid.js +1 -10
  2. package/autocomplete-grid.pure.js +12 -7
  3. package/core.js +31 -5
  4. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +0 -1
  5. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +4 -5
  6. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts +1 -2
  7. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts +2 -3
  8. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -2
  9. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts +1 -2
  10. package/development/autocomplete-grid.d.ts +0 -1
  11. package/development/autocomplete-grid.js +5 -10
  12. package/development/autocomplete-grid.pure.d.ts +0 -1
  13. package/development/autocomplete-grid.pure.js +328 -7
  14. package/development/core/datetime/date-helper.d.ts +0 -1
  15. package/development/core/timetable/access-leg-helper.d.ts +3 -3
  16. package/development/core/timetable/timetable-helper.d.ts +1 -2
  17. package/development/core/timetable/timetable-properties.d.ts +2 -1
  18. package/development/core.d.ts +0 -1
  19. package/development/core.js +1195 -5
  20. package/development/journey-summary/journey-summary.component.d.ts +3 -4
  21. package/development/journey-summary.d.ts +0 -1
  22. package/development/journey-summary.js +5 -5
  23. package/development/journey-summary.pure.d.ts +0 -1
  24. package/development/journey-summary.pure.js +2605 -2
  25. package/development/pearl-chain/pearl-chain.component.d.ts +2 -3
  26. package/development/pearl-chain-time/pearl-chain-time.component.d.ts +3 -4
  27. package/development/pearl-chain-time.d.ts +0 -1
  28. package/development/pearl-chain-time.js +5 -5
  29. package/development/pearl-chain-time.pure.d.ts +0 -1
  30. package/development/pearl-chain-time.pure.js +2582 -2
  31. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts +1 -2
  32. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts +1 -2
  33. package/development/pearl-chain-vertical-item.d.ts +0 -1
  34. package/development/pearl-chain-vertical-item.js +5 -5
  35. package/development/pearl-chain-vertical-item.pure.d.ts +0 -1
  36. package/development/pearl-chain-vertical-item.pure.js +132 -2
  37. package/development/pearl-chain-vertical.d.ts +0 -1
  38. package/development/pearl-chain-vertical.js +5 -5
  39. package/development/pearl-chain-vertical.pure.d.ts +0 -1
  40. package/development/pearl-chain-vertical.pure.js +31 -2
  41. package/development/pearl-chain.d.ts +0 -1
  42. package/development/pearl-chain.js +5 -5
  43. package/development/pearl-chain.pure.d.ts +0 -1
  44. package/development/pearl-chain.pure.js +619 -2
  45. package/development/seat-reservation/common/mapper/icon-mapper.d.ts +0 -1
  46. package/development/seat-reservation/common/mapper/mapper.d.ts +1 -2
  47. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.private.d.ts +68 -0
  48. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.private.d.ts +122 -0
  49. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.private.d.ts +68 -0
  50. package/development/seat-reservation/common/mapper.d.ts +0 -1
  51. package/development/seat-reservation/common/svgs.d.ts +20 -21
  52. package/development/seat-reservation/common/translations/i18n.d.ts +0 -1
  53. package/development/seat-reservation/common/translations.d.ts +0 -1
  54. package/development/seat-reservation/common/types.d.ts +0 -1
  55. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +2 -3
  56. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +2 -3
  57. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +1 -2
  58. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +2 -3
  59. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +3 -4
  60. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +2 -3
  61. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +3 -4
  62. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +1 -2
  63. package/development/seat-reservation.d.ts +0 -1
  64. package/development/seat-reservation.js +5 -16
  65. package/development/seat-reservation.pure.d.ts +0 -1
  66. package/development/seat-reservation.pure.js +16019 -14
  67. package/development/timetable-duration/timetable-duration.component.d.ts +1 -2
  68. package/development/timetable-duration.d.ts +0 -1
  69. package/development/timetable-duration.js +5 -5
  70. package/development/timetable-duration.pure.d.ts +0 -1
  71. package/development/timetable-duration.pure.js +97 -2
  72. package/development/timetable-row/timetable-row.component.d.ts +3 -4
  73. package/development/timetable-row.d.ts +0 -1
  74. package/development/timetable-row.js +5 -5
  75. package/development/timetable-row.pure.d.ts +0 -1
  76. package/development/timetable-row.pure.js +3005 -2
  77. package/journey-summary.js +1 -6
  78. package/journey-summary.pure.js +55 -2
  79. package/package.json +2 -2
  80. package/pearl-chain-time.js +1 -6
  81. package/pearl-chain-time.pure.js +28 -2
  82. package/pearl-chain-vertical-item.js +1 -6
  83. package/pearl-chain-vertical-item.pure.js +26 -2
  84. package/pearl-chain-vertical.js +1 -6
  85. package/pearl-chain-vertical.pure.js +6 -2
  86. package/pearl-chain.js +1 -6
  87. package/pearl-chain.pure.js +27 -2
  88. package/seat-reservation.js +1 -16
  89. package/seat-reservation.pure.js +468 -14
  90. package/timetable-duration.js +1 -6
  91. package/timetable-duration.pure.js +9 -2
  92. package/timetable-row.js +1 -6
  93. package/timetable-row.pure.js +113 -2
  94. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +0 -65
  95. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +0 -44
  96. package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +0 -2
  97. package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +0 -21
  98. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +0 -2
  99. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +0 -2
  100. package/autocomplete-grid-cell.component-79IjA__I.js +0 -23
  101. package/autocomplete-grid-option.component-DUFBhQwI.js +0 -35
  102. package/autocomplete-grid-row.component-B3U15Rwa.js +0 -26
  103. package/core/datetime/date-helper.js +0 -2
  104. package/core/timetable/access-leg-helper.js +0 -96
  105. package/core/timetable/timetable-helper.js +0 -10
  106. package/core/timetable/timetable-properties.js +0 -0
  107. package/date-helper-DNzMLcyb.js +0 -185
  108. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +0 -1
  109. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +0 -118
  110. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +0 -1
  111. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +0 -69
  112. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts.map +0 -1
  113. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +0 -2
  114. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts.map +0 -1
  115. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +0 -30
  116. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +0 -1
  117. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +0 -2
  118. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts.map +0 -1
  119. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +0 -2
  120. package/development/autocomplete-grid-cell.component-BbdELDro.js +0 -33
  121. package/development/autocomplete-grid-option.component-C7WuqRit.js +0 -57
  122. package/development/autocomplete-grid-row.component-DoXbOsQM.js +0 -38
  123. package/development/autocomplete-grid.d.ts.map +0 -1
  124. package/development/autocomplete-grid.pure.d.ts.map +0 -1
  125. package/development/core/datetime/date-helper.d.ts.map +0 -1
  126. package/development/core/datetime/date-helper.js +0 -2
  127. package/development/core/timetable/access-leg-helper.d.ts.map +0 -1
  128. package/development/core/timetable/access-leg-helper.js +0 -147
  129. package/development/core/timetable/timetable-helper.d.ts.map +0 -1
  130. package/development/core/timetable/timetable-helper.js +0 -19
  131. package/development/core/timetable/timetable-properties.d.ts.map +0 -1
  132. package/development/core/timetable/timetable-properties.js +0 -0
  133. package/development/core.d.ts.map +0 -1
  134. package/development/date-helper-BcTDWVeP.js +0 -539
  135. package/development/differenceInMinutes-CxAbGYQ3.js +0 -110
  136. package/development/format-Cx3zmmaF.js +0 -1848
  137. package/development/isValid-40Olgzo1.js +0 -178
  138. package/development/journey-summary/journey-summary.component.d.ts.map +0 -1
  139. package/development/journey-summary/journey-summary.component.js +0 -2
  140. package/development/journey-summary.component-BsC7wBIn.js +0 -341
  141. package/development/journey-summary.d.ts.map +0 -1
  142. package/development/journey-summary.pure.d.ts.map +0 -1
  143. package/development/mapper-BrZOqqfe.js +0 -11454
  144. package/development/pearl-chain/pearl-chain.component.d.ts.map +0 -1
  145. package/development/pearl-chain/pearl-chain.component.js +0 -2
  146. package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +0 -1
  147. package/development/pearl-chain-time/pearl-chain-time.component.js +0 -2
  148. package/development/pearl-chain-time.component-C-CuC1ke.js +0 -317
  149. package/development/pearl-chain-time.d.ts.map +0 -1
  150. package/development/pearl-chain-time.pure.d.ts.map +0 -1
  151. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +0 -1
  152. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +0 -2
  153. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +0 -1
  154. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +0 -2
  155. package/development/pearl-chain-vertical-item.component-CLu9QrqJ.js +0 -131
  156. package/development/pearl-chain-vertical-item.d.ts.map +0 -1
  157. package/development/pearl-chain-vertical-item.pure.d.ts.map +0 -1
  158. package/development/pearl-chain-vertical.component-DbPz5k_R.js +0 -30
  159. package/development/pearl-chain-vertical.d.ts.map +0 -1
  160. package/development/pearl-chain-vertical.pure.d.ts.map +0 -1
  161. package/development/pearl-chain.component-10OsJZIX.js +0 -318
  162. package/development/pearl-chain.d.ts.map +0 -1
  163. package/development/pearl-chain.pure.d.ts.map +0 -1
  164. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +0 -1
  165. package/development/seat-reservation/common/mapper/icon-mapper.js +0 -170
  166. package/development/seat-reservation/common/mapper/mapper.d.ts.map +0 -1
  167. package/development/seat-reservation/common/mapper/mapper.js +0 -2
  168. package/development/seat-reservation/common/mapper.d.ts.map +0 -1
  169. package/development/seat-reservation/common/mapper.js +0 -3
  170. package/development/seat-reservation/common/svgs.d.ts.map +0 -1
  171. package/development/seat-reservation/common/svgs.js +0 -2
  172. package/development/seat-reservation/common/translations/i18n.d.ts.map +0 -1
  173. package/development/seat-reservation/common/translations/i18n.js +0 -1120
  174. package/development/seat-reservation/common/translations.d.ts.map +0 -1
  175. package/development/seat-reservation/common/translations.js +0 -2
  176. package/development/seat-reservation/common/types.d.ts.map +0 -1
  177. package/development/seat-reservation/common/types.js +0 -0
  178. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +0 -1
  179. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +0 -1476
  180. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +0 -1
  181. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +0 -2
  182. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +0 -1
  183. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +0 -2
  184. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +0 -1
  185. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +0 -2
  186. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +0 -1
  187. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +0 -2
  188. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +0 -1
  189. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +0 -2
  190. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +0 -1
  191. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +0 -2
  192. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +0 -1
  193. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +0 -2
  194. package/development/seat-reservation-area.component-DPhQJFid.js +0 -94
  195. package/development/seat-reservation-graphic.component-0LYsmerm.js +0 -129
  196. package/development/seat-reservation-navigation-coach.component-B97jKD7Y.js +0 -438
  197. package/development/seat-reservation-navigation-services.component-Cx0Is97w.js +0 -159
  198. package/development/seat-reservation-place-control.component-DaL1g8WH.js +0 -431
  199. package/development/seat-reservation-scoped.component-BHbORVsR.js +0 -24
  200. package/development/seat-reservation.component-DI9pSlzt.js +0 -473
  201. package/development/seat-reservation.d.ts.map +0 -1
  202. package/development/seat-reservation.pure.d.ts.map +0 -1
  203. package/development/svgs-Dj-RKmRs.js +0 -28
  204. package/development/timetable-duration/timetable-duration.component.d.ts.map +0 -1
  205. package/development/timetable-duration/timetable-duration.component.js +0 -2
  206. package/development/timetable-duration.component-Chk5D4Is.js +0 -96
  207. package/development/timetable-duration.d.ts.map +0 -1
  208. package/development/timetable-duration.pure.d.ts.map +0 -1
  209. package/development/timetable-row/timetable-row.component.d.ts.map +0 -1
  210. package/development/timetable-row/timetable-row.component.js +0 -2
  211. package/development/timetable-row.component-nzrQzxL6.js +0 -736
  212. package/development/timetable-row.d.ts.map +0 -1
  213. package/development/timetable-row.pure.d.ts.map +0 -1
  214. package/development/toDate-CDWut5fS.js +0 -150
  215. package/differenceInMinutes-BAZ-Fham.js +0 -27
  216. package/format-DjgG1QPc.js +0 -1103
  217. package/isValid-CXnsFZVu.js +0 -36
  218. package/journey-summary/journey-summary.component.js +0 -2
  219. package/journey-summary.component-DNoO3OCf.js +0 -265
  220. package/mapper-Dcou8VEf.js +0 -11382
  221. package/pearl-chain/pearl-chain.component.js +0 -2
  222. package/pearl-chain-time/pearl-chain-time.component.js +0 -2
  223. package/pearl-chain-time.component-BuvA6IE1.js +0 -237
  224. package/pearl-chain-vertical/pearl-chain-vertical.component.js +0 -2
  225. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +0 -2
  226. package/pearl-chain-vertical-item.component-QZ4s8Jbv.js +0 -106
  227. package/pearl-chain-vertical.component-Dc3vaHsQ.js +0 -20
  228. package/pearl-chain.component-DtGXXkY6.js +0 -190
  229. package/seat-reservation/common/mapper/icon-mapper.js +0 -72
  230. package/seat-reservation/common/mapper/mapper.js +0 -2
  231. package/seat-reservation/common/mapper.js +0 -3
  232. package/seat-reservation/common/svgs.js +0 -2
  233. package/seat-reservation/common/translations/i18n.js +0 -1085
  234. package/seat-reservation/common/translations.js +0 -2
  235. package/seat-reservation/common/types.js +0 -0
  236. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +0 -926
  237. package/seat-reservation/seat-reservation/seat-reservation.component.js +0 -2
  238. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +0 -2
  239. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +0 -2
  240. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +0 -2
  241. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +0 -2
  242. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +0 -2
  243. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +0 -2
  244. package/seat-reservation-area.component-G9lHb7S8.js +0 -73
  245. package/seat-reservation-graphic.component-BXFcQDxY.js +0 -102
  246. package/seat-reservation-navigation-coach.component-BXy8EkJe.js +0 -338
  247. package/seat-reservation-navigation-services.component-49XmV9rv.js +0 -124
  248. package/seat-reservation-place-control.component-DToIW328.js +0 -317
  249. package/seat-reservation-scoped.component-D8dAmrP7.js +0 -16
  250. package/seat-reservation.component--0XnrCkk.js +0 -372
  251. package/svgs-D4fuYTHV.js +0 -26
  252. package/timetable-duration/timetable-duration.component.js +0 -2
  253. package/timetable-duration.component-iMCvh1zr.js +0 -61
  254. package/timetable-row/timetable-row.component.js +0 -2
  255. package/timetable-row.component-mNKmhRmP.js +0 -566
  256. package/toDate-BhNUyM4s.js +0 -16
@@ -1,2 +1,2582 @@
1
- import { t as SbbPearlChainTimeElement } from "./pearl-chain-time.component-C-CuC1ke.js";
2
- export { SbbPearlChainTimeElement };
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
+ import { SbbElement, SbbLanguageController, defaultDateAdapter, forceType, i18nArrival, i18nDeparture, i18nTransferProcedures, screenReaderOnlyStyles } from "@sbb-esta/lyne-elements/core.js";
3
+ import { SbbIconElement } from "@sbb-esta/lyne-elements/icon.pure.js";
4
+ import { html, nothing, unsafeCSS } from "lit";
5
+ import { property } from "lit/decorators.js";
6
+ import { getDepartureArrivalTimeAttribute, isRideLeg, removeTimezoneFromISOTimeString } from "./core.js";
7
+ import { SbbPearlChainElement } from "./pearl-chain.pure.js";
8
+
9
+ //#region node_modules/date-fns/constants.js
10
+ /**
11
+ * @constant
12
+ * @name daysInYear
13
+ * @summary Days in 1 year.
14
+ *
15
+ * @description
16
+ * How many days in a year.
17
+ *
18
+ * One years equals 365.2425 days according to the formula:
19
+ *
20
+ * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
21
+ * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
22
+ */
23
+ const daysInYear = 365.2425;
24
+ /**
25
+ * @constant
26
+ * @name maxTime
27
+ * @summary Maximum allowed time.
28
+ *
29
+ * @example
30
+ * import { maxTime } from "./constants/date-fns/constants";
31
+ *
32
+ * const isValid = 8640000000000001 <= maxTime;
33
+ * //=> false
34
+ *
35
+ * new Date(8640000000000001);
36
+ * //=> Invalid Date
37
+ */
38
+ const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
39
+ /**
40
+ * @constant
41
+ * @name minTime
42
+ * @summary Minimum allowed time.
43
+ *
44
+ * @example
45
+ * import { minTime } from "./constants/date-fns/constants";
46
+ *
47
+ * const isValid = -8640000000000001 >= minTime;
48
+ * //=> false
49
+ *
50
+ * new Date(-8640000000000001)
51
+ * //=> Invalid Date
52
+ */
53
+ const minTime = -maxTime;
54
+ /**
55
+ * @constant
56
+ * @name millisecondsInWeek
57
+ * @summary Milliseconds in 1 week.
58
+ */
59
+ const millisecondsInWeek = 6048e5;
60
+ /**
61
+ * @constant
62
+ * @name millisecondsInDay
63
+ * @summary Milliseconds in 1 day.
64
+ */
65
+ const millisecondsInDay = 864e5;
66
+ /**
67
+ * @constant
68
+ * @name secondsInHour
69
+ * @summary Seconds in 1 hour.
70
+ */
71
+ const secondsInHour = 3600;
72
+ /**
73
+ * @constant
74
+ * @name secondsInDay
75
+ * @summary Seconds in 1 day.
76
+ */
77
+ const secondsInDay = secondsInHour * 24;
78
+ /**
79
+ * @constant
80
+ * @name secondsInWeek
81
+ * @summary Seconds in 1 week.
82
+ */
83
+ const secondsInWeek = secondsInDay * 7;
84
+ /**
85
+ * @constant
86
+ * @name secondsInYear
87
+ * @summary Seconds in 1 year.
88
+ */
89
+ const secondsInYear = secondsInDay * daysInYear;
90
+ /**
91
+ * @constant
92
+ * @name secondsInMonth
93
+ * @summary Seconds in 1 month
94
+ */
95
+ const secondsInMonth = secondsInYear / 12;
96
+ /**
97
+ * @constant
98
+ * @name secondsInQuarter
99
+ * @summary Seconds in 1 quarter.
100
+ */
101
+ const secondsInQuarter = secondsInMonth * 3;
102
+ /**
103
+ * @constant
104
+ * @name constructFromSymbol
105
+ * @summary Symbol enabling Date extensions to inherit properties from the reference date.
106
+ *
107
+ * The symbol is used to enable the `constructFrom` function to construct a date
108
+ * using a reference date and a value. It allows to transfer extra properties
109
+ * from the reference date to the new date. It's useful for extensions like
110
+ * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
111
+ * a constructor argument.
112
+ */
113
+ const constructFromSymbol = Symbol.for("constructDateFrom");
114
+
115
+ //#endregion
116
+ //#region node_modules/date-fns/constructFrom.js
117
+ /**
118
+ * @name constructFrom
119
+ * @category Generic Helpers
120
+ * @summary Constructs a date using the reference date and the value
121
+ *
122
+ * @description
123
+ * The function constructs a new date using the constructor from the reference
124
+ * date and the given value. It helps to build generic functions that accept
125
+ * date extensions.
126
+ *
127
+ * It defaults to `Date` if the passed reference date is a number or a string.
128
+ *
129
+ * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
130
+ * enabling to transfer extra properties from the reference date to the new date.
131
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
132
+ * that accept a time zone as a constructor argument.
133
+ *
134
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
135
+ *
136
+ * @param date - The reference date to take constructor from
137
+ * @param value - The value to create the date
138
+ *
139
+ * @returns Date initialized using the given date and value
140
+ *
141
+ * @example
142
+ * import { constructFrom } from "./constructFrom/date-fns";
143
+ *
144
+ * // A function that clones a date preserving the original type
145
+ * function cloneDate<DateType extends Date>(date: DateType): DateType {
146
+ * return constructFrom(
147
+ * date, // Use constructor from the given date
148
+ * date.getTime() // Use the date value to create a new date
149
+ * );
150
+ * }
151
+ */
152
+ function constructFrom(date, value) {
153
+ if (typeof date === "function") return date(value);
154
+ if (date && typeof date === "object" && constructFromSymbol in date) return date[constructFromSymbol](value);
155
+ if (date instanceof Date) return new date.constructor(value);
156
+ return new Date(value);
157
+ }
158
+
159
+ //#endregion
160
+ //#region node_modules/date-fns/toDate.js
161
+ /**
162
+ * @name toDate
163
+ * @category Common Helpers
164
+ * @summary Convert the given argument to an instance of Date.
165
+ *
166
+ * @description
167
+ * Convert the given argument to an instance of Date.
168
+ *
169
+ * If the argument is an instance of Date, the function returns its clone.
170
+ *
171
+ * If the argument is a number, it is treated as a timestamp.
172
+ *
173
+ * If the argument is none of the above, the function returns Invalid Date.
174
+ *
175
+ * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
176
+ * enabling to transfer extra properties from the reference date to the new date.
177
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
178
+ * that accept a time zone as a constructor argument.
179
+ *
180
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
181
+ *
182
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
183
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
184
+ *
185
+ * @param argument - The value to convert
186
+ *
187
+ * @returns The parsed date in the local time zone
188
+ *
189
+ * @example
190
+ * // Clone the date:
191
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
192
+ * //=> Tue Feb 11 2014 11:30:30
193
+ *
194
+ * @example
195
+ * // Convert the timestamp to date:
196
+ * const result = toDate(1392098430000)
197
+ * //=> Tue Feb 11 2014 11:30:30
198
+ */
199
+ function toDate(argument, context) {
200
+ return constructFrom(context || argument, argument);
201
+ }
202
+
203
+ //#endregion
204
+ //#region node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
205
+ /**
206
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
207
+ * They usually appear for dates that denote time before the timezones were introduced
208
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
209
+ * and GMT+01:00:00 after that date)
210
+ *
211
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
212
+ * which would lead to incorrect calculations.
213
+ *
214
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
215
+ */
216
+ function getTimezoneOffsetInMilliseconds(date) {
217
+ const _date = toDate(date);
218
+ const utcDate = new Date(Date.UTC(_date.getFullYear(), _date.getMonth(), _date.getDate(), _date.getHours(), _date.getMinutes(), _date.getSeconds(), _date.getMilliseconds()));
219
+ utcDate.setUTCFullYear(_date.getFullYear());
220
+ return +date - +utcDate;
221
+ }
222
+
223
+ //#endregion
224
+ //#region node_modules/date-fns/_lib/normalizeDates.js
225
+ function normalizeDates(context, ...dates) {
226
+ const normalize = constructFrom.bind(null, context || dates.find((date) => typeof date === "object"));
227
+ return dates.map(normalize);
228
+ }
229
+
230
+ //#endregion
231
+ //#region node_modules/date-fns/startOfDay.js
232
+ /**
233
+ * The {@link startOfDay} function options.
234
+ */
235
+ /**
236
+ * @name startOfDay
237
+ * @category Day Helpers
238
+ * @summary Return the start of a day for the given date.
239
+ *
240
+ * @description
241
+ * Return the start of a day for the given date.
242
+ * The result will be in the local timezone.
243
+ *
244
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
245
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
246
+ *
247
+ * @param date - The original date
248
+ * @param options - The options
249
+ *
250
+ * @returns The start of a day
251
+ *
252
+ * @example
253
+ * // The start of a day for 2 September 2014 11:55:00:
254
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
255
+ * //=> Tue Sep 02 2014 00:00:00
256
+ */
257
+ function startOfDay(date, options) {
258
+ const _date = toDate(date, options?.in);
259
+ _date.setHours(0, 0, 0, 0);
260
+ return _date;
261
+ }
262
+
263
+ //#endregion
264
+ //#region node_modules/date-fns/differenceInCalendarDays.js
265
+ /**
266
+ * The {@link differenceInCalendarDays} function options.
267
+ */
268
+ /**
269
+ * @name differenceInCalendarDays
270
+ * @category Day Helpers
271
+ * @summary Get the number of calendar days between the given dates.
272
+ *
273
+ * @description
274
+ * Get the number of calendar days between the given dates. This means that the times are removed
275
+ * from the dates and then the difference in days is calculated.
276
+ *
277
+ * @param laterDate - The later date
278
+ * @param earlierDate - The earlier date
279
+ * @param options - The options object
280
+ *
281
+ * @returns The number of calendar days
282
+ *
283
+ * @example
284
+ * // How many calendar days are between
285
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
286
+ * const result = differenceInCalendarDays(
287
+ * new Date(2012, 6, 2, 0, 0),
288
+ * new Date(2011, 6, 2, 23, 0)
289
+ * )
290
+ * //=> 366
291
+ * // How many calendar days are between
292
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
293
+ * const result = differenceInCalendarDays(
294
+ * new Date(2011, 6, 3, 0, 1),
295
+ * new Date(2011, 6, 2, 23, 59)
296
+ * )
297
+ * //=> 1
298
+ */
299
+ function differenceInCalendarDays(laterDate, earlierDate, options) {
300
+ const [laterDate_, earlierDate_] = normalizeDates(options?.in, laterDate, earlierDate);
301
+ const laterStartOfDay = startOfDay(laterDate_);
302
+ const earlierStartOfDay = startOfDay(earlierDate_);
303
+ const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
304
+ const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
305
+ return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
306
+ }
307
+
308
+ //#endregion
309
+ //#region node_modules/date-fns/locale/en-US/_lib/formatDistance.js
310
+ const formatDistanceLocale = {
311
+ lessThanXSeconds: {
312
+ one: "less than a second",
313
+ other: "less than {{count}} seconds"
314
+ },
315
+ xSeconds: {
316
+ one: "1 second",
317
+ other: "{{count}} seconds"
318
+ },
319
+ halfAMinute: "half a minute",
320
+ lessThanXMinutes: {
321
+ one: "less than a minute",
322
+ other: "less than {{count}} minutes"
323
+ },
324
+ xMinutes: {
325
+ one: "1 minute",
326
+ other: "{{count}} minutes"
327
+ },
328
+ aboutXHours: {
329
+ one: "about 1 hour",
330
+ other: "about {{count}} hours"
331
+ },
332
+ xHours: {
333
+ one: "1 hour",
334
+ other: "{{count}} hours"
335
+ },
336
+ xDays: {
337
+ one: "1 day",
338
+ other: "{{count}} days"
339
+ },
340
+ aboutXWeeks: {
341
+ one: "about 1 week",
342
+ other: "about {{count}} weeks"
343
+ },
344
+ xWeeks: {
345
+ one: "1 week",
346
+ other: "{{count}} weeks"
347
+ },
348
+ aboutXMonths: {
349
+ one: "about 1 month",
350
+ other: "about {{count}} months"
351
+ },
352
+ xMonths: {
353
+ one: "1 month",
354
+ other: "{{count}} months"
355
+ },
356
+ aboutXYears: {
357
+ one: "about 1 year",
358
+ other: "about {{count}} years"
359
+ },
360
+ xYears: {
361
+ one: "1 year",
362
+ other: "{{count}} years"
363
+ },
364
+ overXYears: {
365
+ one: "over 1 year",
366
+ other: "over {{count}} years"
367
+ },
368
+ almostXYears: {
369
+ one: "almost 1 year",
370
+ other: "almost {{count}} years"
371
+ }
372
+ };
373
+ const formatDistance = (token, count, options) => {
374
+ let result;
375
+ const tokenValue = formatDistanceLocale[token];
376
+ if (typeof tokenValue === "string") result = tokenValue;
377
+ else if (count === 1) result = tokenValue.one;
378
+ else result = tokenValue.other.replace("{{count}}", count.toString());
379
+ if (options?.addSuffix) if (options.comparison && options.comparison > 0) return "in " + result;
380
+ else return result + " ago";
381
+ return result;
382
+ };
383
+
384
+ //#endregion
385
+ //#region node_modules/date-fns/locale/_lib/buildFormatLongFn.js
386
+ function buildFormatLongFn(args) {
387
+ return (options = {}) => {
388
+ const width = options.width ? String(options.width) : args.defaultWidth;
389
+ return args.formats[width] || args.formats[args.defaultWidth];
390
+ };
391
+ }
392
+
393
+ //#endregion
394
+ //#region node_modules/date-fns/locale/en-US/_lib/formatLong.js
395
+ const dateFormats = {
396
+ full: "EEEE, MMMM do, y",
397
+ long: "MMMM do, y",
398
+ medium: "MMM d, y",
399
+ short: "MM/dd/yyyy"
400
+ };
401
+ const timeFormats = {
402
+ full: "h:mm:ss a zzzz",
403
+ long: "h:mm:ss a z",
404
+ medium: "h:mm:ss a",
405
+ short: "h:mm a"
406
+ };
407
+ const dateTimeFormats = {
408
+ full: "{{date}} 'at' {{time}}",
409
+ long: "{{date}} 'at' {{time}}",
410
+ medium: "{{date}}, {{time}}",
411
+ short: "{{date}}, {{time}}"
412
+ };
413
+ const formatLong = {
414
+ date: buildFormatLongFn({
415
+ formats: dateFormats,
416
+ defaultWidth: "full"
417
+ }),
418
+ time: buildFormatLongFn({
419
+ formats: timeFormats,
420
+ defaultWidth: "full"
421
+ }),
422
+ dateTime: buildFormatLongFn({
423
+ formats: dateTimeFormats,
424
+ defaultWidth: "full"
425
+ })
426
+ };
427
+
428
+ //#endregion
429
+ //#region node_modules/date-fns/locale/en-US/_lib/formatRelative.js
430
+ const formatRelativeLocale = {
431
+ lastWeek: "'last' eeee 'at' p",
432
+ yesterday: "'yesterday at' p",
433
+ today: "'today at' p",
434
+ tomorrow: "'tomorrow at' p",
435
+ nextWeek: "eeee 'at' p",
436
+ other: "P"
437
+ };
438
+ const formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
439
+
440
+ //#endregion
441
+ //#region node_modules/date-fns/locale/_lib/buildLocalizeFn.js
442
+ /**
443
+ * The localize function argument callback which allows to convert raw value to
444
+ * the actual type.
445
+ *
446
+ * @param value - The value to convert
447
+ *
448
+ * @returns The converted value
449
+ */
450
+ /**
451
+ * The map of localized values for each width.
452
+ */
453
+ /**
454
+ * The index type of the locale unit value. It types conversion of units of
455
+ * values that don't start at 0 (i.e. quarters).
456
+ */
457
+ /**
458
+ * Converts the unit value to the tuple of values.
459
+ */
460
+ /**
461
+ * The tuple of localized era values. The first element represents BC,
462
+ * the second element represents AD.
463
+ */
464
+ /**
465
+ * The tuple of localized quarter values. The first element represents Q1.
466
+ */
467
+ /**
468
+ * The tuple of localized day values. The first element represents Sunday.
469
+ */
470
+ /**
471
+ * The tuple of localized month values. The first element represents January.
472
+ */
473
+ function buildLocalizeFn(args) {
474
+ return (value, options) => {
475
+ const context = options?.context ? String(options.context) : "standalone";
476
+ let valuesArray;
477
+ if (context === "formatting" && args.formattingValues) {
478
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
479
+ const width = options?.width ? String(options.width) : defaultWidth;
480
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
481
+ } else {
482
+ const defaultWidth = args.defaultWidth;
483
+ const width = options?.width ? String(options.width) : args.defaultWidth;
484
+ valuesArray = args.values[width] || args.values[defaultWidth];
485
+ }
486
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
487
+ return valuesArray[index];
488
+ };
489
+ }
490
+
491
+ //#endregion
492
+ //#region node_modules/date-fns/locale/en-US/_lib/localize.js
493
+ const eraValues = {
494
+ narrow: ["B", "A"],
495
+ abbreviated: ["BC", "AD"],
496
+ wide: ["Before Christ", "Anno Domini"]
497
+ };
498
+ const quarterValues = {
499
+ narrow: [
500
+ "1",
501
+ "2",
502
+ "3",
503
+ "4"
504
+ ],
505
+ abbreviated: [
506
+ "Q1",
507
+ "Q2",
508
+ "Q3",
509
+ "Q4"
510
+ ],
511
+ wide: [
512
+ "1st quarter",
513
+ "2nd quarter",
514
+ "3rd quarter",
515
+ "4th quarter"
516
+ ]
517
+ };
518
+ const monthValues = {
519
+ narrow: [
520
+ "J",
521
+ "F",
522
+ "M",
523
+ "A",
524
+ "M",
525
+ "J",
526
+ "J",
527
+ "A",
528
+ "S",
529
+ "O",
530
+ "N",
531
+ "D"
532
+ ],
533
+ abbreviated: [
534
+ "Jan",
535
+ "Feb",
536
+ "Mar",
537
+ "Apr",
538
+ "May",
539
+ "Jun",
540
+ "Jul",
541
+ "Aug",
542
+ "Sep",
543
+ "Oct",
544
+ "Nov",
545
+ "Dec"
546
+ ],
547
+ wide: [
548
+ "January",
549
+ "February",
550
+ "March",
551
+ "April",
552
+ "May",
553
+ "June",
554
+ "July",
555
+ "August",
556
+ "September",
557
+ "October",
558
+ "November",
559
+ "December"
560
+ ]
561
+ };
562
+ const dayValues = {
563
+ narrow: [
564
+ "S",
565
+ "M",
566
+ "T",
567
+ "W",
568
+ "T",
569
+ "F",
570
+ "S"
571
+ ],
572
+ short: [
573
+ "Su",
574
+ "Mo",
575
+ "Tu",
576
+ "We",
577
+ "Th",
578
+ "Fr",
579
+ "Sa"
580
+ ],
581
+ abbreviated: [
582
+ "Sun",
583
+ "Mon",
584
+ "Tue",
585
+ "Wed",
586
+ "Thu",
587
+ "Fri",
588
+ "Sat"
589
+ ],
590
+ wide: [
591
+ "Sunday",
592
+ "Monday",
593
+ "Tuesday",
594
+ "Wednesday",
595
+ "Thursday",
596
+ "Friday",
597
+ "Saturday"
598
+ ]
599
+ };
600
+ const dayPeriodValues = {
601
+ narrow: {
602
+ am: "a",
603
+ pm: "p",
604
+ midnight: "mi",
605
+ noon: "n",
606
+ morning: "morning",
607
+ afternoon: "afternoon",
608
+ evening: "evening",
609
+ night: "night"
610
+ },
611
+ abbreviated: {
612
+ am: "AM",
613
+ pm: "PM",
614
+ midnight: "midnight",
615
+ noon: "noon",
616
+ morning: "morning",
617
+ afternoon: "afternoon",
618
+ evening: "evening",
619
+ night: "night"
620
+ },
621
+ wide: {
622
+ am: "a.m.",
623
+ pm: "p.m.",
624
+ midnight: "midnight",
625
+ noon: "noon",
626
+ morning: "morning",
627
+ afternoon: "afternoon",
628
+ evening: "evening",
629
+ night: "night"
630
+ }
631
+ };
632
+ const formattingDayPeriodValues = {
633
+ narrow: {
634
+ am: "a",
635
+ pm: "p",
636
+ midnight: "mi",
637
+ noon: "n",
638
+ morning: "in the morning",
639
+ afternoon: "in the afternoon",
640
+ evening: "in the evening",
641
+ night: "at night"
642
+ },
643
+ abbreviated: {
644
+ am: "AM",
645
+ pm: "PM",
646
+ midnight: "midnight",
647
+ noon: "noon",
648
+ morning: "in the morning",
649
+ afternoon: "in the afternoon",
650
+ evening: "in the evening",
651
+ night: "at night"
652
+ },
653
+ wide: {
654
+ am: "a.m.",
655
+ pm: "p.m.",
656
+ midnight: "midnight",
657
+ noon: "noon",
658
+ morning: "in the morning",
659
+ afternoon: "in the afternoon",
660
+ evening: "in the evening",
661
+ night: "at night"
662
+ }
663
+ };
664
+ const ordinalNumber = (dirtyNumber, _options) => {
665
+ const number = Number(dirtyNumber);
666
+ const rem100 = number % 100;
667
+ if (rem100 > 20 || rem100 < 10) switch (rem100 % 10) {
668
+ case 1: return number + "st";
669
+ case 2: return number + "nd";
670
+ case 3: return number + "rd";
671
+ }
672
+ return number + "th";
673
+ };
674
+ const localize = {
675
+ ordinalNumber,
676
+ era: buildLocalizeFn({
677
+ values: eraValues,
678
+ defaultWidth: "wide"
679
+ }),
680
+ quarter: buildLocalizeFn({
681
+ values: quarterValues,
682
+ defaultWidth: "wide",
683
+ argumentCallback: (quarter) => quarter - 1
684
+ }),
685
+ month: buildLocalizeFn({
686
+ values: monthValues,
687
+ defaultWidth: "wide"
688
+ }),
689
+ day: buildLocalizeFn({
690
+ values: dayValues,
691
+ defaultWidth: "wide"
692
+ }),
693
+ dayPeriod: buildLocalizeFn({
694
+ values: dayPeriodValues,
695
+ defaultWidth: "wide",
696
+ formattingValues: formattingDayPeriodValues,
697
+ defaultFormattingWidth: "wide"
698
+ })
699
+ };
700
+
701
+ //#endregion
702
+ //#region node_modules/date-fns/locale/_lib/buildMatchFn.js
703
+ function buildMatchFn(args) {
704
+ return (string, options = {}) => {
705
+ const width = options.width;
706
+ const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
707
+ const matchResult = string.match(matchPattern);
708
+ if (!matchResult) return null;
709
+ const matchedString = matchResult[0];
710
+ const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
711
+ const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : findKey(parsePatterns, (pattern) => pattern.test(matchedString));
712
+ let value;
713
+ value = args.valueCallback ? args.valueCallback(key) : key;
714
+ value = options.valueCallback ? options.valueCallback(value) : value;
715
+ const rest = string.slice(matchedString.length);
716
+ return {
717
+ value,
718
+ rest
719
+ };
720
+ };
721
+ }
722
+ function findKey(object, predicate) {
723
+ for (const key in object) if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) return key;
724
+ }
725
+ function findIndex(array, predicate) {
726
+ for (let key = 0; key < array.length; key++) if (predicate(array[key])) return key;
727
+ }
728
+
729
+ //#endregion
730
+ //#region node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
731
+ function buildMatchPatternFn(args) {
732
+ return (string, options = {}) => {
733
+ const matchResult = string.match(args.matchPattern);
734
+ if (!matchResult) return null;
735
+ const matchedString = matchResult[0];
736
+ const parseResult = string.match(args.parsePattern);
737
+ if (!parseResult) return null;
738
+ let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
739
+ value = options.valueCallback ? options.valueCallback(value) : value;
740
+ const rest = string.slice(matchedString.length);
741
+ return {
742
+ value,
743
+ rest
744
+ };
745
+ };
746
+ }
747
+
748
+ //#endregion
749
+ //#region node_modules/date-fns/locale/en-US/_lib/match.js
750
+ const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
751
+ const parseOrdinalNumberPattern = /\d+/i;
752
+ const matchEraPatterns = {
753
+ narrow: /^(b|a)/i,
754
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
755
+ wide: /^(before christ|before common era|anno domini|common era)/i
756
+ };
757
+ const parseEraPatterns = { any: [/^b/i, /^(a|c)/i] };
758
+ const matchQuarterPatterns = {
759
+ narrow: /^[1234]/i,
760
+ abbreviated: /^q[1234]/i,
761
+ wide: /^[1234](th|st|nd|rd)? quarter/i
762
+ };
763
+ const parseQuarterPatterns = { any: [
764
+ /1/i,
765
+ /2/i,
766
+ /3/i,
767
+ /4/i
768
+ ] };
769
+ const matchMonthPatterns = {
770
+ narrow: /^[jfmasond]/i,
771
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
772
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
773
+ };
774
+ const parseMonthPatterns = {
775
+ narrow: [
776
+ /^j/i,
777
+ /^f/i,
778
+ /^m/i,
779
+ /^a/i,
780
+ /^m/i,
781
+ /^j/i,
782
+ /^j/i,
783
+ /^a/i,
784
+ /^s/i,
785
+ /^o/i,
786
+ /^n/i,
787
+ /^d/i
788
+ ],
789
+ any: [
790
+ /^ja/i,
791
+ /^f/i,
792
+ /^mar/i,
793
+ /^ap/i,
794
+ /^may/i,
795
+ /^jun/i,
796
+ /^jul/i,
797
+ /^au/i,
798
+ /^s/i,
799
+ /^o/i,
800
+ /^n/i,
801
+ /^d/i
802
+ ]
803
+ };
804
+ const matchDayPatterns = {
805
+ narrow: /^[smtwf]/i,
806
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
807
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
808
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
809
+ };
810
+ const parseDayPatterns = {
811
+ narrow: [
812
+ /^s/i,
813
+ /^m/i,
814
+ /^t/i,
815
+ /^w/i,
816
+ /^t/i,
817
+ /^f/i,
818
+ /^s/i
819
+ ],
820
+ any: [
821
+ /^su/i,
822
+ /^m/i,
823
+ /^tu/i,
824
+ /^w/i,
825
+ /^th/i,
826
+ /^f/i,
827
+ /^sa/i
828
+ ]
829
+ };
830
+ const matchDayPeriodPatterns = {
831
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
832
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
833
+ };
834
+ const parseDayPeriodPatterns = { any: {
835
+ am: /^a/i,
836
+ pm: /^p/i,
837
+ midnight: /^mi/i,
838
+ noon: /^no/i,
839
+ morning: /morning/i,
840
+ afternoon: /afternoon/i,
841
+ evening: /evening/i,
842
+ night: /night/i
843
+ } };
844
+ const match = {
845
+ ordinalNumber: buildMatchPatternFn({
846
+ matchPattern: matchOrdinalNumberPattern,
847
+ parsePattern: parseOrdinalNumberPattern,
848
+ valueCallback: (value) => parseInt(value, 10)
849
+ }),
850
+ era: buildMatchFn({
851
+ matchPatterns: matchEraPatterns,
852
+ defaultMatchWidth: "wide",
853
+ parsePatterns: parseEraPatterns,
854
+ defaultParseWidth: "any"
855
+ }),
856
+ quarter: buildMatchFn({
857
+ matchPatterns: matchQuarterPatterns,
858
+ defaultMatchWidth: "wide",
859
+ parsePatterns: parseQuarterPatterns,
860
+ defaultParseWidth: "any",
861
+ valueCallback: (index) => index + 1
862
+ }),
863
+ month: buildMatchFn({
864
+ matchPatterns: matchMonthPatterns,
865
+ defaultMatchWidth: "wide",
866
+ parsePatterns: parseMonthPatterns,
867
+ defaultParseWidth: "any"
868
+ }),
869
+ day: buildMatchFn({
870
+ matchPatterns: matchDayPatterns,
871
+ defaultMatchWidth: "wide",
872
+ parsePatterns: parseDayPatterns,
873
+ defaultParseWidth: "any"
874
+ }),
875
+ dayPeriod: buildMatchFn({
876
+ matchPatterns: matchDayPeriodPatterns,
877
+ defaultMatchWidth: "any",
878
+ parsePatterns: parseDayPeriodPatterns,
879
+ defaultParseWidth: "any"
880
+ })
881
+ };
882
+
883
+ //#endregion
884
+ //#region node_modules/date-fns/locale/en-US.js
885
+ /**
886
+ * @category Locales
887
+ * @summary English locale (United States).
888
+ * @language English
889
+ * @iso-639-2 eng
890
+ * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
891
+ * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
892
+ */
893
+ const enUS = {
894
+ code: "en-US",
895
+ formatDistance,
896
+ formatLong,
897
+ formatRelative,
898
+ localize,
899
+ match,
900
+ options: {
901
+ weekStartsOn: 0,
902
+ firstWeekContainsDate: 1
903
+ }
904
+ };
905
+
906
+ //#endregion
907
+ //#region node_modules/date-fns/_lib/defaultOptions.js
908
+ let defaultOptions = {};
909
+ function getDefaultOptions() {
910
+ return defaultOptions;
911
+ }
912
+
913
+ //#endregion
914
+ //#region node_modules/date-fns/startOfYear.js
915
+ /**
916
+ * The {@link startOfYear} function options.
917
+ */
918
+ /**
919
+ * @name startOfYear
920
+ * @category Year Helpers
921
+ * @summary Return the start of a year for the given date.
922
+ *
923
+ * @description
924
+ * Return the start of a year for the given date.
925
+ * The result will be in the local timezone.
926
+ *
927
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
928
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
929
+ *
930
+ * @param date - The original date
931
+ * @param options - The options
932
+ *
933
+ * @returns The start of a year
934
+ *
935
+ * @example
936
+ * // The start of a year for 2 September 2014 11:55:00:
937
+ * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
938
+ * //=> Wed Jan 01 2014 00:00:00
939
+ */
940
+ function startOfYear(date, options) {
941
+ const date_ = toDate(date, options?.in);
942
+ date_.setFullYear(date_.getFullYear(), 0, 1);
943
+ date_.setHours(0, 0, 0, 0);
944
+ return date_;
945
+ }
946
+
947
+ //#endregion
948
+ //#region node_modules/date-fns/getDayOfYear.js
949
+ /**
950
+ * The {@link getDayOfYear} function options.
951
+ */
952
+ /**
953
+ * @name getDayOfYear
954
+ * @category Day Helpers
955
+ * @summary Get the day of the year of the given date.
956
+ *
957
+ * @description
958
+ * Get the day of the year of the given date.
959
+ *
960
+ * @param date - The given date
961
+ * @param options - The options
962
+ *
963
+ * @returns The day of year
964
+ *
965
+ * @example
966
+ * // Which day of the year is 2 July 2014?
967
+ * const result = getDayOfYear(new Date(2014, 6, 2))
968
+ * //=> 183
969
+ */
970
+ function getDayOfYear(date, options) {
971
+ const _date = toDate(date, options?.in);
972
+ return differenceInCalendarDays(_date, startOfYear(_date)) + 1;
973
+ }
974
+
975
+ //#endregion
976
+ //#region node_modules/date-fns/startOfWeek.js
977
+ /**
978
+ * The {@link startOfWeek} function options.
979
+ */
980
+ /**
981
+ * @name startOfWeek
982
+ * @category Week Helpers
983
+ * @summary Return the start of a week for the given date.
984
+ *
985
+ * @description
986
+ * Return the start of a week for the given date.
987
+ * The result will be in the local timezone.
988
+ *
989
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
990
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
991
+ *
992
+ * @param date - The original date
993
+ * @param options - An object with options
994
+ *
995
+ * @returns The start of a week
996
+ *
997
+ * @example
998
+ * // The start of a week for 2 September 2014 11:55:00:
999
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
1000
+ * //=> Sun Aug 31 2014 00:00:00
1001
+ *
1002
+ * @example
1003
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
1004
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
1005
+ * //=> Mon Sep 01 2014 00:00:00
1006
+ */
1007
+ function startOfWeek(date, options) {
1008
+ const defaultOptions = getDefaultOptions();
1009
+ const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
1010
+ const _date = toDate(date, options?.in);
1011
+ const day = _date.getDay();
1012
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
1013
+ _date.setDate(_date.getDate() - diff);
1014
+ _date.setHours(0, 0, 0, 0);
1015
+ return _date;
1016
+ }
1017
+
1018
+ //#endregion
1019
+ //#region node_modules/date-fns/startOfISOWeek.js
1020
+ /**
1021
+ * The {@link startOfISOWeek} function options.
1022
+ */
1023
+ /**
1024
+ * @name startOfISOWeek
1025
+ * @category ISO Week Helpers
1026
+ * @summary Return the start of an ISO week for the given date.
1027
+ *
1028
+ * @description
1029
+ * Return the start of an ISO week for the given date.
1030
+ * The result will be in the local timezone.
1031
+ *
1032
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1033
+ *
1034
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1035
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1036
+ *
1037
+ * @param date - The original date
1038
+ * @param options - An object with options
1039
+ *
1040
+ * @returns The start of an ISO week
1041
+ *
1042
+ * @example
1043
+ * // The start of an ISO week for 2 September 2014 11:55:00:
1044
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
1045
+ * //=> Mon Sep 01 2014 00:00:00
1046
+ */
1047
+ function startOfISOWeek(date, options) {
1048
+ return startOfWeek(date, {
1049
+ ...options,
1050
+ weekStartsOn: 1
1051
+ });
1052
+ }
1053
+
1054
+ //#endregion
1055
+ //#region node_modules/date-fns/getISOWeekYear.js
1056
+ /**
1057
+ * The {@link getISOWeekYear} function options.
1058
+ */
1059
+ /**
1060
+ * @name getISOWeekYear
1061
+ * @category ISO Week-Numbering Year Helpers
1062
+ * @summary Get the ISO week-numbering year of the given date.
1063
+ *
1064
+ * @description
1065
+ * Get the ISO week-numbering year of the given date,
1066
+ * which always starts 3 days before the year's first Thursday.
1067
+ *
1068
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1069
+ *
1070
+ * @param date - The given date
1071
+ *
1072
+ * @returns The ISO week-numbering year
1073
+ *
1074
+ * @example
1075
+ * // Which ISO-week numbering year is 2 January 2005?
1076
+ * const result = getISOWeekYear(new Date(2005, 0, 2))
1077
+ * //=> 2004
1078
+ */
1079
+ function getISOWeekYear(date, options) {
1080
+ const _date = toDate(date, options?.in);
1081
+ const year = _date.getFullYear();
1082
+ const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
1083
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
1084
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
1085
+ const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
1086
+ const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
1087
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
1088
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
1089
+ const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
1090
+ if (_date.getTime() >= startOfNextYear.getTime()) return year + 1;
1091
+ else if (_date.getTime() >= startOfThisYear.getTime()) return year;
1092
+ else return year - 1;
1093
+ }
1094
+
1095
+ //#endregion
1096
+ //#region node_modules/date-fns/startOfISOWeekYear.js
1097
+ /**
1098
+ * The {@link startOfISOWeekYear} function options.
1099
+ */
1100
+ /**
1101
+ * @name startOfISOWeekYear
1102
+ * @category ISO Week-Numbering Year Helpers
1103
+ * @summary Return the start of an ISO week-numbering year for the given date.
1104
+ *
1105
+ * @description
1106
+ * Return the start of an ISO week-numbering year,
1107
+ * which always starts 3 days before the year's first Thursday.
1108
+ * The result will be in the local timezone.
1109
+ *
1110
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1111
+ *
1112
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1113
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1114
+ *
1115
+ * @param date - The original date
1116
+ * @param options - An object with options
1117
+ *
1118
+ * @returns The start of an ISO week-numbering year
1119
+ *
1120
+ * @example
1121
+ * // The start of an ISO week-numbering year for 2 July 2005:
1122
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
1123
+ * //=> Mon Jan 03 2005 00:00:00
1124
+ */
1125
+ function startOfISOWeekYear(date, options) {
1126
+ const year = getISOWeekYear(date, options);
1127
+ const fourthOfJanuary = constructFrom(options?.in || date, 0);
1128
+ fourthOfJanuary.setFullYear(year, 0, 4);
1129
+ fourthOfJanuary.setHours(0, 0, 0, 0);
1130
+ return startOfISOWeek(fourthOfJanuary);
1131
+ }
1132
+
1133
+ //#endregion
1134
+ //#region node_modules/date-fns/getISOWeek.js
1135
+ /**
1136
+ * The {@link getISOWeek} function options.
1137
+ */
1138
+ /**
1139
+ * @name getISOWeek
1140
+ * @category ISO Week Helpers
1141
+ * @summary Get the ISO week of the given date.
1142
+ *
1143
+ * @description
1144
+ * Get the ISO week of the given date.
1145
+ *
1146
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1147
+ *
1148
+ * @param date - The given date
1149
+ * @param options - The options
1150
+ *
1151
+ * @returns The ISO week
1152
+ *
1153
+ * @example
1154
+ * // Which week of the ISO-week numbering year is 2 January 2005?
1155
+ * const result = getISOWeek(new Date(2005, 0, 2))
1156
+ * //=> 53
1157
+ */
1158
+ function getISOWeek(date, options) {
1159
+ const _date = toDate(date, options?.in);
1160
+ const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
1161
+ return Math.round(diff / millisecondsInWeek) + 1;
1162
+ }
1163
+
1164
+ //#endregion
1165
+ //#region node_modules/date-fns/getWeekYear.js
1166
+ /**
1167
+ * The {@link getWeekYear} function options.
1168
+ */
1169
+ /**
1170
+ * @name getWeekYear
1171
+ * @category Week-Numbering Year Helpers
1172
+ * @summary Get the local week-numbering year of the given date.
1173
+ *
1174
+ * @description
1175
+ * Get the local week-numbering year of the given date.
1176
+ * The exact calculation depends on the values of
1177
+ * `options.weekStartsOn` (which is the index of the first day of the week)
1178
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
1179
+ * the first week of the week-numbering year)
1180
+ *
1181
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
1182
+ *
1183
+ * @param date - The given date
1184
+ * @param options - An object with options.
1185
+ *
1186
+ * @returns The local week-numbering year
1187
+ *
1188
+ * @example
1189
+ * // Which week numbering year is 26 December 2004 with the default settings?
1190
+ * const result = getWeekYear(new Date(2004, 11, 26))
1191
+ * //=> 2005
1192
+ *
1193
+ * @example
1194
+ * // Which week numbering year is 26 December 2004 if week starts on Saturday?
1195
+ * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
1196
+ * //=> 2004
1197
+ *
1198
+ * @example
1199
+ * // Which week numbering year is 26 December 2004 if the first week contains 4 January?
1200
+ * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
1201
+ * //=> 2004
1202
+ */
1203
+ function getWeekYear(date, options) {
1204
+ const _date = toDate(date, options?.in);
1205
+ const year = _date.getFullYear();
1206
+ const defaultOptions = getDefaultOptions();
1207
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
1208
+ const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
1209
+ firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
1210
+ firstWeekOfNextYear.setHours(0, 0, 0, 0);
1211
+ const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
1212
+ const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
1213
+ firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
1214
+ firstWeekOfThisYear.setHours(0, 0, 0, 0);
1215
+ const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
1216
+ if (+_date >= +startOfNextYear) return year + 1;
1217
+ else if (+_date >= +startOfThisYear) return year;
1218
+ else return year - 1;
1219
+ }
1220
+
1221
+ //#endregion
1222
+ //#region node_modules/date-fns/startOfWeekYear.js
1223
+ /**
1224
+ * The {@link startOfWeekYear} function options.
1225
+ */
1226
+ /**
1227
+ * @name startOfWeekYear
1228
+ * @category Week-Numbering Year Helpers
1229
+ * @summary Return the start of a local week-numbering year for the given date.
1230
+ *
1231
+ * @description
1232
+ * Return the start of a local week-numbering year.
1233
+ * The exact calculation depends on the values of
1234
+ * `options.weekStartsOn` (which is the index of the first day of the week)
1235
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
1236
+ * the first week of the week-numbering year)
1237
+ *
1238
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
1239
+ *
1240
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1241
+ * @typeParam ResultDate - The result `Date` type.
1242
+ *
1243
+ * @param date - The original date
1244
+ * @param options - An object with options
1245
+ *
1246
+ * @returns The start of a week-numbering year
1247
+ *
1248
+ * @example
1249
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
1250
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
1251
+ * //=> Sun Dec 26 2004 00:00:00
1252
+ *
1253
+ * @example
1254
+ * // The start of a week-numbering year for 2 July 2005
1255
+ * // if Monday is the first day of week
1256
+ * // and 4 January is always in the first week of the year:
1257
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
1258
+ * weekStartsOn: 1,
1259
+ * firstWeekContainsDate: 4
1260
+ * })
1261
+ * //=> Mon Jan 03 2005 00:00:00
1262
+ */
1263
+ function startOfWeekYear(date, options) {
1264
+ const defaultOptions = getDefaultOptions();
1265
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
1266
+ const year = getWeekYear(date, options);
1267
+ const firstWeek = constructFrom(options?.in || date, 0);
1268
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
1269
+ firstWeek.setHours(0, 0, 0, 0);
1270
+ return startOfWeek(firstWeek, options);
1271
+ }
1272
+
1273
+ //#endregion
1274
+ //#region node_modules/date-fns/getWeek.js
1275
+ /**
1276
+ * The {@link getWeek} function options.
1277
+ */
1278
+ /**
1279
+ * @name getWeek
1280
+ * @category Week Helpers
1281
+ * @summary Get the local week index of the given date.
1282
+ *
1283
+ * @description
1284
+ * Get the local week index of the given date.
1285
+ * The exact calculation depends on the values of
1286
+ * `options.weekStartsOn` (which is the index of the first day of the week)
1287
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
1288
+ * the first week of the week-numbering year)
1289
+ *
1290
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
1291
+ *
1292
+ * @param date - The given date
1293
+ * @param options - An object with options
1294
+ *
1295
+ * @returns The week
1296
+ *
1297
+ * @example
1298
+ * // Which week of the local week numbering year is 2 January 2005 with default options?
1299
+ * const result = getWeek(new Date(2005, 0, 2))
1300
+ * //=> 2
1301
+ *
1302
+ * @example
1303
+ * // Which week of the local week numbering year is 2 January 2005,
1304
+ * // if Monday is the first day of the week,
1305
+ * // and the first week of the year always contains 4 January?
1306
+ * const result = getWeek(new Date(2005, 0, 2), {
1307
+ * weekStartsOn: 1,
1308
+ * firstWeekContainsDate: 4
1309
+ * })
1310
+ * //=> 53
1311
+ */
1312
+ function getWeek(date, options) {
1313
+ const _date = toDate(date, options?.in);
1314
+ const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
1315
+ return Math.round(diff / millisecondsInWeek) + 1;
1316
+ }
1317
+
1318
+ //#endregion
1319
+ //#region node_modules/date-fns/_lib/addLeadingZeros.js
1320
+ function addLeadingZeros(number, targetLength) {
1321
+ return (number < 0 ? "-" : "") + Math.abs(number).toString().padStart(targetLength, "0");
1322
+ }
1323
+
1324
+ //#endregion
1325
+ //#region node_modules/date-fns/_lib/format/lightFormatters.js
1326
+ const lightFormatters = {
1327
+ y(date, token) {
1328
+ const signedYear = date.getFullYear();
1329
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
1330
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
1331
+ },
1332
+ M(date, token) {
1333
+ const month = date.getMonth();
1334
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
1335
+ },
1336
+ d(date, token) {
1337
+ return addLeadingZeros(date.getDate(), token.length);
1338
+ },
1339
+ a(date, token) {
1340
+ const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
1341
+ switch (token) {
1342
+ case "a":
1343
+ case "aa": return dayPeriodEnumValue.toUpperCase();
1344
+ case "aaa": return dayPeriodEnumValue;
1345
+ case "aaaaa": return dayPeriodEnumValue[0];
1346
+ default: return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
1347
+ }
1348
+ },
1349
+ h(date, token) {
1350
+ return addLeadingZeros(date.getHours() % 12 || 12, token.length);
1351
+ },
1352
+ H(date, token) {
1353
+ return addLeadingZeros(date.getHours(), token.length);
1354
+ },
1355
+ m(date, token) {
1356
+ return addLeadingZeros(date.getMinutes(), token.length);
1357
+ },
1358
+ s(date, token) {
1359
+ return addLeadingZeros(date.getSeconds(), token.length);
1360
+ },
1361
+ S(date, token) {
1362
+ const numberOfDigits = token.length;
1363
+ const milliseconds = date.getMilliseconds();
1364
+ return addLeadingZeros(Math.trunc(milliseconds * Math.pow(10, numberOfDigits - 3)), token.length);
1365
+ }
1366
+ };
1367
+
1368
+ //#endregion
1369
+ //#region node_modules/date-fns/_lib/format/formatters.js
1370
+ const dayPeriodEnum = {
1371
+ am: "am",
1372
+ pm: "pm",
1373
+ midnight: "midnight",
1374
+ noon: "noon",
1375
+ morning: "morning",
1376
+ afternoon: "afternoon",
1377
+ evening: "evening",
1378
+ night: "night"
1379
+ };
1380
+ const formatters = {
1381
+ G: function(date, token, localize) {
1382
+ const era = date.getFullYear() > 0 ? 1 : 0;
1383
+ switch (token) {
1384
+ case "G":
1385
+ case "GG":
1386
+ case "GGG": return localize.era(era, { width: "abbreviated" });
1387
+ case "GGGGG": return localize.era(era, { width: "narrow" });
1388
+ default: return localize.era(era, { width: "wide" });
1389
+ }
1390
+ },
1391
+ y: function(date, token, localize) {
1392
+ if (token === "yo") {
1393
+ const signedYear = date.getFullYear();
1394
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
1395
+ return localize.ordinalNumber(year, { unit: "year" });
1396
+ }
1397
+ return lightFormatters.y(date, token);
1398
+ },
1399
+ Y: function(date, token, localize, options) {
1400
+ const signedWeekYear = getWeekYear(date, options);
1401
+ const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
1402
+ if (token === "YY") return addLeadingZeros(weekYear % 100, 2);
1403
+ if (token === "Yo") return localize.ordinalNumber(weekYear, { unit: "year" });
1404
+ return addLeadingZeros(weekYear, token.length);
1405
+ },
1406
+ R: function(date, token) {
1407
+ return addLeadingZeros(getISOWeekYear(date), token.length);
1408
+ },
1409
+ u: function(date, token) {
1410
+ return addLeadingZeros(date.getFullYear(), token.length);
1411
+ },
1412
+ Q: function(date, token, localize) {
1413
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
1414
+ switch (token) {
1415
+ case "Q": return String(quarter);
1416
+ case "QQ": return addLeadingZeros(quarter, 2);
1417
+ case "Qo": return localize.ordinalNumber(quarter, { unit: "quarter" });
1418
+ case "QQQ": return localize.quarter(quarter, {
1419
+ width: "abbreviated",
1420
+ context: "formatting"
1421
+ });
1422
+ case "QQQQQ": return localize.quarter(quarter, {
1423
+ width: "narrow",
1424
+ context: "formatting"
1425
+ });
1426
+ default: return localize.quarter(quarter, {
1427
+ width: "wide",
1428
+ context: "formatting"
1429
+ });
1430
+ }
1431
+ },
1432
+ q: function(date, token, localize) {
1433
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
1434
+ switch (token) {
1435
+ case "q": return String(quarter);
1436
+ case "qq": return addLeadingZeros(quarter, 2);
1437
+ case "qo": return localize.ordinalNumber(quarter, { unit: "quarter" });
1438
+ case "qqq": return localize.quarter(quarter, {
1439
+ width: "abbreviated",
1440
+ context: "standalone"
1441
+ });
1442
+ case "qqqqq": return localize.quarter(quarter, {
1443
+ width: "narrow",
1444
+ context: "standalone"
1445
+ });
1446
+ default: return localize.quarter(quarter, {
1447
+ width: "wide",
1448
+ context: "standalone"
1449
+ });
1450
+ }
1451
+ },
1452
+ M: function(date, token, localize) {
1453
+ const month = date.getMonth();
1454
+ switch (token) {
1455
+ case "M":
1456
+ case "MM": return lightFormatters.M(date, token);
1457
+ case "Mo": return localize.ordinalNumber(month + 1, { unit: "month" });
1458
+ case "MMM": return localize.month(month, {
1459
+ width: "abbreviated",
1460
+ context: "formatting"
1461
+ });
1462
+ case "MMMMM": return localize.month(month, {
1463
+ width: "narrow",
1464
+ context: "formatting"
1465
+ });
1466
+ default: return localize.month(month, {
1467
+ width: "wide",
1468
+ context: "formatting"
1469
+ });
1470
+ }
1471
+ },
1472
+ L: function(date, token, localize) {
1473
+ const month = date.getMonth();
1474
+ switch (token) {
1475
+ case "L": return String(month + 1);
1476
+ case "LL": return addLeadingZeros(month + 1, 2);
1477
+ case "Lo": return localize.ordinalNumber(month + 1, { unit: "month" });
1478
+ case "LLL": return localize.month(month, {
1479
+ width: "abbreviated",
1480
+ context: "standalone"
1481
+ });
1482
+ case "LLLLL": return localize.month(month, {
1483
+ width: "narrow",
1484
+ context: "standalone"
1485
+ });
1486
+ default: return localize.month(month, {
1487
+ width: "wide",
1488
+ context: "standalone"
1489
+ });
1490
+ }
1491
+ },
1492
+ w: function(date, token, localize, options) {
1493
+ const week = getWeek(date, options);
1494
+ if (token === "wo") return localize.ordinalNumber(week, { unit: "week" });
1495
+ return addLeadingZeros(week, token.length);
1496
+ },
1497
+ I: function(date, token, localize) {
1498
+ const isoWeek = getISOWeek(date);
1499
+ if (token === "Io") return localize.ordinalNumber(isoWeek, { unit: "week" });
1500
+ return addLeadingZeros(isoWeek, token.length);
1501
+ },
1502
+ d: function(date, token, localize) {
1503
+ if (token === "do") return localize.ordinalNumber(date.getDate(), { unit: "date" });
1504
+ return lightFormatters.d(date, token);
1505
+ },
1506
+ D: function(date, token, localize) {
1507
+ const dayOfYear = getDayOfYear(date);
1508
+ if (token === "Do") return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
1509
+ return addLeadingZeros(dayOfYear, token.length);
1510
+ },
1511
+ E: function(date, token, localize) {
1512
+ const dayOfWeek = date.getDay();
1513
+ switch (token) {
1514
+ case "E":
1515
+ case "EE":
1516
+ case "EEE": return localize.day(dayOfWeek, {
1517
+ width: "abbreviated",
1518
+ context: "formatting"
1519
+ });
1520
+ case "EEEEE": return localize.day(dayOfWeek, {
1521
+ width: "narrow",
1522
+ context: "formatting"
1523
+ });
1524
+ case "EEEEEE": return localize.day(dayOfWeek, {
1525
+ width: "short",
1526
+ context: "formatting"
1527
+ });
1528
+ default: return localize.day(dayOfWeek, {
1529
+ width: "wide",
1530
+ context: "formatting"
1531
+ });
1532
+ }
1533
+ },
1534
+ e: function(date, token, localize, options) {
1535
+ const dayOfWeek = date.getDay();
1536
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1537
+ switch (token) {
1538
+ case "e": return String(localDayOfWeek);
1539
+ case "ee": return addLeadingZeros(localDayOfWeek, 2);
1540
+ case "eo": return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
1541
+ case "eee": return localize.day(dayOfWeek, {
1542
+ width: "abbreviated",
1543
+ context: "formatting"
1544
+ });
1545
+ case "eeeee": return localize.day(dayOfWeek, {
1546
+ width: "narrow",
1547
+ context: "formatting"
1548
+ });
1549
+ case "eeeeee": return localize.day(dayOfWeek, {
1550
+ width: "short",
1551
+ context: "formatting"
1552
+ });
1553
+ default: return localize.day(dayOfWeek, {
1554
+ width: "wide",
1555
+ context: "formatting"
1556
+ });
1557
+ }
1558
+ },
1559
+ c: function(date, token, localize, options) {
1560
+ const dayOfWeek = date.getDay();
1561
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1562
+ switch (token) {
1563
+ case "c": return String(localDayOfWeek);
1564
+ case "cc": return addLeadingZeros(localDayOfWeek, token.length);
1565
+ case "co": return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
1566
+ case "ccc": return localize.day(dayOfWeek, {
1567
+ width: "abbreviated",
1568
+ context: "standalone"
1569
+ });
1570
+ case "ccccc": return localize.day(dayOfWeek, {
1571
+ width: "narrow",
1572
+ context: "standalone"
1573
+ });
1574
+ case "cccccc": return localize.day(dayOfWeek, {
1575
+ width: "short",
1576
+ context: "standalone"
1577
+ });
1578
+ default: return localize.day(dayOfWeek, {
1579
+ width: "wide",
1580
+ context: "standalone"
1581
+ });
1582
+ }
1583
+ },
1584
+ i: function(date, token, localize) {
1585
+ const dayOfWeek = date.getDay();
1586
+ const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
1587
+ switch (token) {
1588
+ case "i": return String(isoDayOfWeek);
1589
+ case "ii": return addLeadingZeros(isoDayOfWeek, token.length);
1590
+ case "io": return localize.ordinalNumber(isoDayOfWeek, { unit: "day" });
1591
+ case "iii": return localize.day(dayOfWeek, {
1592
+ width: "abbreviated",
1593
+ context: "formatting"
1594
+ });
1595
+ case "iiiii": return localize.day(dayOfWeek, {
1596
+ width: "narrow",
1597
+ context: "formatting"
1598
+ });
1599
+ case "iiiiii": return localize.day(dayOfWeek, {
1600
+ width: "short",
1601
+ context: "formatting"
1602
+ });
1603
+ default: return localize.day(dayOfWeek, {
1604
+ width: "wide",
1605
+ context: "formatting"
1606
+ });
1607
+ }
1608
+ },
1609
+ a: function(date, token, localize) {
1610
+ const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
1611
+ switch (token) {
1612
+ case "a":
1613
+ case "aa": return localize.dayPeriod(dayPeriodEnumValue, {
1614
+ width: "abbreviated",
1615
+ context: "formatting"
1616
+ });
1617
+ case "aaa": return localize.dayPeriod(dayPeriodEnumValue, {
1618
+ width: "abbreviated",
1619
+ context: "formatting"
1620
+ }).toLowerCase();
1621
+ case "aaaaa": return localize.dayPeriod(dayPeriodEnumValue, {
1622
+ width: "narrow",
1623
+ context: "formatting"
1624
+ });
1625
+ default: return localize.dayPeriod(dayPeriodEnumValue, {
1626
+ width: "wide",
1627
+ context: "formatting"
1628
+ });
1629
+ }
1630
+ },
1631
+ b: function(date, token, localize) {
1632
+ const hours = date.getHours();
1633
+ let dayPeriodEnumValue;
1634
+ if (hours === 12) dayPeriodEnumValue = dayPeriodEnum.noon;
1635
+ else if (hours === 0) dayPeriodEnumValue = dayPeriodEnum.midnight;
1636
+ else dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
1637
+ switch (token) {
1638
+ case "b":
1639
+ case "bb": return localize.dayPeriod(dayPeriodEnumValue, {
1640
+ width: "abbreviated",
1641
+ context: "formatting"
1642
+ });
1643
+ case "bbb": return localize.dayPeriod(dayPeriodEnumValue, {
1644
+ width: "abbreviated",
1645
+ context: "formatting"
1646
+ }).toLowerCase();
1647
+ case "bbbbb": return localize.dayPeriod(dayPeriodEnumValue, {
1648
+ width: "narrow",
1649
+ context: "formatting"
1650
+ });
1651
+ default: return localize.dayPeriod(dayPeriodEnumValue, {
1652
+ width: "wide",
1653
+ context: "formatting"
1654
+ });
1655
+ }
1656
+ },
1657
+ B: function(date, token, localize) {
1658
+ const hours = date.getHours();
1659
+ let dayPeriodEnumValue;
1660
+ if (hours >= 17) dayPeriodEnumValue = dayPeriodEnum.evening;
1661
+ else if (hours >= 12) dayPeriodEnumValue = dayPeriodEnum.afternoon;
1662
+ else if (hours >= 4) dayPeriodEnumValue = dayPeriodEnum.morning;
1663
+ else dayPeriodEnumValue = dayPeriodEnum.night;
1664
+ switch (token) {
1665
+ case "B":
1666
+ case "BB":
1667
+ case "BBB": return localize.dayPeriod(dayPeriodEnumValue, {
1668
+ width: "abbreviated",
1669
+ context: "formatting"
1670
+ });
1671
+ case "BBBBB": return localize.dayPeriod(dayPeriodEnumValue, {
1672
+ width: "narrow",
1673
+ context: "formatting"
1674
+ });
1675
+ default: return localize.dayPeriod(dayPeriodEnumValue, {
1676
+ width: "wide",
1677
+ context: "formatting"
1678
+ });
1679
+ }
1680
+ },
1681
+ h: function(date, token, localize) {
1682
+ if (token === "ho") {
1683
+ let hours = date.getHours() % 12;
1684
+ if (hours === 0) hours = 12;
1685
+ return localize.ordinalNumber(hours, { unit: "hour" });
1686
+ }
1687
+ return lightFormatters.h(date, token);
1688
+ },
1689
+ H: function(date, token, localize) {
1690
+ if (token === "Ho") return localize.ordinalNumber(date.getHours(), { unit: "hour" });
1691
+ return lightFormatters.H(date, token);
1692
+ },
1693
+ K: function(date, token, localize) {
1694
+ const hours = date.getHours() % 12;
1695
+ if (token === "Ko") return localize.ordinalNumber(hours, { unit: "hour" });
1696
+ return addLeadingZeros(hours, token.length);
1697
+ },
1698
+ k: function(date, token, localize) {
1699
+ let hours = date.getHours();
1700
+ if (hours === 0) hours = 24;
1701
+ if (token === "ko") return localize.ordinalNumber(hours, { unit: "hour" });
1702
+ return addLeadingZeros(hours, token.length);
1703
+ },
1704
+ m: function(date, token, localize) {
1705
+ if (token === "mo") return localize.ordinalNumber(date.getMinutes(), { unit: "minute" });
1706
+ return lightFormatters.m(date, token);
1707
+ },
1708
+ s: function(date, token, localize) {
1709
+ if (token === "so") return localize.ordinalNumber(date.getSeconds(), { unit: "second" });
1710
+ return lightFormatters.s(date, token);
1711
+ },
1712
+ S: function(date, token) {
1713
+ return lightFormatters.S(date, token);
1714
+ },
1715
+ X: function(date, token, _localize) {
1716
+ const timezoneOffset = date.getTimezoneOffset();
1717
+ if (timezoneOffset === 0) return "Z";
1718
+ switch (token) {
1719
+ case "X": return formatTimezoneWithOptionalMinutes(timezoneOffset);
1720
+ case "XXXX":
1721
+ case "XX": return formatTimezone(timezoneOffset);
1722
+ default: return formatTimezone(timezoneOffset, ":");
1723
+ }
1724
+ },
1725
+ x: function(date, token, _localize) {
1726
+ const timezoneOffset = date.getTimezoneOffset();
1727
+ switch (token) {
1728
+ case "x": return formatTimezoneWithOptionalMinutes(timezoneOffset);
1729
+ case "xxxx":
1730
+ case "xx": return formatTimezone(timezoneOffset);
1731
+ default: return formatTimezone(timezoneOffset, ":");
1732
+ }
1733
+ },
1734
+ O: function(date, token, _localize) {
1735
+ const timezoneOffset = date.getTimezoneOffset();
1736
+ switch (token) {
1737
+ case "O":
1738
+ case "OO":
1739
+ case "OOO": return "GMT" + formatTimezoneShort(timezoneOffset, ":");
1740
+ default: return "GMT" + formatTimezone(timezoneOffset, ":");
1741
+ }
1742
+ },
1743
+ z: function(date, token, _localize) {
1744
+ const timezoneOffset = date.getTimezoneOffset();
1745
+ switch (token) {
1746
+ case "z":
1747
+ case "zz":
1748
+ case "zzz": return "GMT" + formatTimezoneShort(timezoneOffset, ":");
1749
+ default: return "GMT" + formatTimezone(timezoneOffset, ":");
1750
+ }
1751
+ },
1752
+ t: function(date, token, _localize) {
1753
+ return addLeadingZeros(Math.trunc(+date / 1e3), token.length);
1754
+ },
1755
+ T: function(date, token, _localize) {
1756
+ return addLeadingZeros(+date, token.length);
1757
+ }
1758
+ };
1759
+ function formatTimezoneShort(offset, delimiter = "") {
1760
+ const sign = offset > 0 ? "-" : "+";
1761
+ const absOffset = Math.abs(offset);
1762
+ const hours = Math.trunc(absOffset / 60);
1763
+ const minutes = absOffset % 60;
1764
+ if (minutes === 0) return sign + String(hours);
1765
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1766
+ }
1767
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
1768
+ if (offset % 60 === 0) return (offset > 0 ? "-" : "+") + addLeadingZeros(Math.abs(offset) / 60, 2);
1769
+ return formatTimezone(offset, delimiter);
1770
+ }
1771
+ function formatTimezone(offset, delimiter = "") {
1772
+ const sign = offset > 0 ? "-" : "+";
1773
+ const absOffset = Math.abs(offset);
1774
+ const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
1775
+ const minutes = addLeadingZeros(absOffset % 60, 2);
1776
+ return sign + hours + delimiter + minutes;
1777
+ }
1778
+
1779
+ //#endregion
1780
+ //#region node_modules/date-fns/_lib/format/longFormatters.js
1781
+ const dateLongFormatter = (pattern, formatLong) => {
1782
+ switch (pattern) {
1783
+ case "P": return formatLong.date({ width: "short" });
1784
+ case "PP": return formatLong.date({ width: "medium" });
1785
+ case "PPP": return formatLong.date({ width: "long" });
1786
+ default: return formatLong.date({ width: "full" });
1787
+ }
1788
+ };
1789
+ const timeLongFormatter = (pattern, formatLong) => {
1790
+ switch (pattern) {
1791
+ case "p": return formatLong.time({ width: "short" });
1792
+ case "pp": return formatLong.time({ width: "medium" });
1793
+ case "ppp": return formatLong.time({ width: "long" });
1794
+ default: return formatLong.time({ width: "full" });
1795
+ }
1796
+ };
1797
+ const dateTimeLongFormatter = (pattern, formatLong) => {
1798
+ const matchResult = pattern.match(/(P+)(p+)?/) || [];
1799
+ const datePattern = matchResult[1];
1800
+ const timePattern = matchResult[2];
1801
+ if (!timePattern) return dateLongFormatter(pattern, formatLong);
1802
+ let dateTimeFormat;
1803
+ switch (datePattern) {
1804
+ case "P":
1805
+ dateTimeFormat = formatLong.dateTime({ width: "short" });
1806
+ break;
1807
+ case "PP":
1808
+ dateTimeFormat = formatLong.dateTime({ width: "medium" });
1809
+ break;
1810
+ case "PPP":
1811
+ dateTimeFormat = formatLong.dateTime({ width: "long" });
1812
+ break;
1813
+ default:
1814
+ dateTimeFormat = formatLong.dateTime({ width: "full" });
1815
+ break;
1816
+ }
1817
+ return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong)).replace("{{time}}", timeLongFormatter(timePattern, formatLong));
1818
+ };
1819
+ const longFormatters = {
1820
+ p: timeLongFormatter,
1821
+ P: dateTimeLongFormatter
1822
+ };
1823
+
1824
+ //#endregion
1825
+ //#region node_modules/date-fns/_lib/protectedTokens.js
1826
+ const dayOfYearTokenRE = /^D+$/;
1827
+ const weekYearTokenRE = /^Y+$/;
1828
+ const throwTokens = [
1829
+ "D",
1830
+ "DD",
1831
+ "YY",
1832
+ "YYYY"
1833
+ ];
1834
+ function isProtectedDayOfYearToken(token) {
1835
+ return dayOfYearTokenRE.test(token);
1836
+ }
1837
+ function isProtectedWeekYearToken(token) {
1838
+ return weekYearTokenRE.test(token);
1839
+ }
1840
+ function warnOrThrowProtectedError(token, format, input) {
1841
+ const _message = message(token, format, input);
1842
+ console.warn(_message);
1843
+ if (throwTokens.includes(token)) throw new RangeError(_message);
1844
+ }
1845
+ function message(token, format, input) {
1846
+ const subject = token[0] === "Y" ? "years" : "days of the month";
1847
+ return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1848
+ }
1849
+
1850
+ //#endregion
1851
+ //#region node_modules/date-fns/isDate.js
1852
+ /**
1853
+ * @name isDate
1854
+ * @category Common Helpers
1855
+ * @summary Is the given value a date?
1856
+ *
1857
+ * @description
1858
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
1859
+ *
1860
+ * @param value - The value to check
1861
+ *
1862
+ * @returns True if the given value is a date
1863
+ *
1864
+ * @example
1865
+ * // For a valid date:
1866
+ * const result = isDate(new Date())
1867
+ * //=> true
1868
+ *
1869
+ * @example
1870
+ * // For an invalid date:
1871
+ * const result = isDate(new Date(NaN))
1872
+ * //=> true
1873
+ *
1874
+ * @example
1875
+ * // For some value:
1876
+ * const result = isDate('2014-02-31')
1877
+ * //=> false
1878
+ *
1879
+ * @example
1880
+ * // For an object:
1881
+ * const result = isDate({})
1882
+ * //=> false
1883
+ */
1884
+ function isDate(value) {
1885
+ return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
1886
+ }
1887
+
1888
+ //#endregion
1889
+ //#region node_modules/date-fns/isValid.js
1890
+ /**
1891
+ * @name isValid
1892
+ * @category Common Helpers
1893
+ * @summary Is the given date valid?
1894
+ *
1895
+ * @description
1896
+ * Returns false if argument is Invalid Date and true otherwise.
1897
+ * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
1898
+ * Invalid Date is a Date, whose time value is NaN.
1899
+ *
1900
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
1901
+ *
1902
+ * @param date - The date to check
1903
+ *
1904
+ * @returns The date is valid
1905
+ *
1906
+ * @example
1907
+ * // For the valid date:
1908
+ * const result = isValid(new Date(2014, 1, 31))
1909
+ * //=> true
1910
+ *
1911
+ * @example
1912
+ * // For the value, convertible into a date:
1913
+ * const result = isValid(1393804800000)
1914
+ * //=> true
1915
+ *
1916
+ * @example
1917
+ * // For the invalid date:
1918
+ * const result = isValid(new Date(''))
1919
+ * //=> false
1920
+ */
1921
+ function isValid(date) {
1922
+ return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
1923
+ }
1924
+
1925
+ //#endregion
1926
+ //#region node_modules/date-fns/format.js
1927
+ const formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
1928
+ const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
1929
+ const escapedStringRegExp = /^'([^]*?)'?$/;
1930
+ const doubleQuoteRegExp = /''/g;
1931
+ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
1932
+ /**
1933
+ * The {@link format} function options.
1934
+ */
1935
+ /**
1936
+ * @name format
1937
+ * @alias formatDate
1938
+ * @category Common Helpers
1939
+ * @summary Format the date.
1940
+ *
1941
+ * @description
1942
+ * Return the formatted date string in the given format. The result may vary by locale.
1943
+ *
1944
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
1945
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1946
+ *
1947
+ * The characters wrapped between two single quotes characters (') are escaped.
1948
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
1949
+ * (see the last example)
1950
+ *
1951
+ * Format of the string is based on Unicode Technical Standard #35:
1952
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
1953
+ * with a few additions (see note 7 below the table).
1954
+ *
1955
+ * Accepted patterns:
1956
+ * | Unit | Pattern | Result examples | Notes |
1957
+ * |---------------------------------|---------|-----------------------------------|-------|
1958
+ * | Era | G..GGG | AD, BC | |
1959
+ * | | GGGG | Anno Domini, Before Christ | 2 |
1960
+ * | | GGGGG | A, B | |
1961
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
1962
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
1963
+ * | | yy | 44, 01, 00, 17 | 5 |
1964
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
1965
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
1966
+ * | | yyyyy | ... | 3,5 |
1967
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
1968
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
1969
+ * | | YY | 44, 01, 00, 17 | 5,8 |
1970
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
1971
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
1972
+ * | | YYYYY | ... | 3,5 |
1973
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
1974
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
1975
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
1976
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
1977
+ * | | RRRRR | ... | 3,5,7 |
1978
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
1979
+ * | | uu | -43, 01, 1900, 2017 | 5 |
1980
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
1981
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
1982
+ * | | uuuuu | ... | 3,5 |
1983
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
1984
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
1985
+ * | | QQ | 01, 02, 03, 04 | |
1986
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
1987
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
1988
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
1989
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
1990
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
1991
+ * | | qq | 01, 02, 03, 04 | |
1992
+ * | | qqq | Q1, Q2, Q3, Q4 | |
1993
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
1994
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
1995
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
1996
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
1997
+ * | | MM | 01, 02, ..., 12 | |
1998
+ * | | MMM | Jan, Feb, ..., Dec | |
1999
+ * | | MMMM | January, February, ..., December | 2 |
2000
+ * | | MMMMM | J, F, ..., D | |
2001
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
2002
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
2003
+ * | | LL | 01, 02, ..., 12 | |
2004
+ * | | LLL | Jan, Feb, ..., Dec | |
2005
+ * | | LLLL | January, February, ..., December | 2 |
2006
+ * | | LLLLL | J, F, ..., D | |
2007
+ * | Local week of year | w | 1, 2, ..., 53 | |
2008
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
2009
+ * | | ww | 01, 02, ..., 53 | |
2010
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
2011
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
2012
+ * | | II | 01, 02, ..., 53 | 7 |
2013
+ * | Day of month | d | 1, 2, ..., 31 | |
2014
+ * | | do | 1st, 2nd, ..., 31st | 7 |
2015
+ * | | dd | 01, 02, ..., 31 | |
2016
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
2017
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
2018
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
2019
+ * | | DDD | 001, 002, ..., 365, 366 | |
2020
+ * | | DDDD | ... | 3 |
2021
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
2022
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
2023
+ * | | EEEEE | M, T, W, T, F, S, S | |
2024
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
2025
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
2026
+ * | | io | 1st, 2nd, ..., 7th | 7 |
2027
+ * | | ii | 01, 02, ..., 07 | 7 |
2028
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
2029
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
2030
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
2031
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
2032
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
2033
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
2034
+ * | | ee | 02, 03, ..., 01 | |
2035
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
2036
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
2037
+ * | | eeeee | M, T, W, T, F, S, S | |
2038
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
2039
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
2040
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
2041
+ * | | cc | 02, 03, ..., 01 | |
2042
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
2043
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
2044
+ * | | ccccc | M, T, W, T, F, S, S | |
2045
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
2046
+ * | AM, PM | a..aa | AM, PM | |
2047
+ * | | aaa | am, pm | |
2048
+ * | | aaaa | a.m., p.m. | 2 |
2049
+ * | | aaaaa | a, p | |
2050
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
2051
+ * | | bbb | am, pm, noon, midnight | |
2052
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
2053
+ * | | bbbbb | a, p, n, mi | |
2054
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
2055
+ * | | BBBB | at night, in the morning, ... | 2 |
2056
+ * | | BBBBB | at night, in the morning, ... | |
2057
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
2058
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
2059
+ * | | hh | 01, 02, ..., 11, 12 | |
2060
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
2061
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
2062
+ * | | HH | 00, 01, 02, ..., 23 | |
2063
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
2064
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
2065
+ * | | KK | 01, 02, ..., 11, 00 | |
2066
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
2067
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
2068
+ * | | kk | 24, 01, 02, ..., 23 | |
2069
+ * | Minute | m | 0, 1, ..., 59 | |
2070
+ * | | mo | 0th, 1st, ..., 59th | 7 |
2071
+ * | | mm | 00, 01, ..., 59 | |
2072
+ * | Second | s | 0, 1, ..., 59 | |
2073
+ * | | so | 0th, 1st, ..., 59th | 7 |
2074
+ * | | ss | 00, 01, ..., 59 | |
2075
+ * | Fraction of second | S | 0, 1, ..., 9 | |
2076
+ * | | SS | 00, 01, ..., 99 | |
2077
+ * | | SSS | 000, 001, ..., 999 | |
2078
+ * | | SSSS | ... | 3 |
2079
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
2080
+ * | | XX | -0800, +0530, Z | |
2081
+ * | | XXX | -08:00, +05:30, Z | |
2082
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
2083
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
2084
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
2085
+ * | | xx | -0800, +0530, +0000 | |
2086
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
2087
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
2088
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
2089
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
2090
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
2091
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
2092
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
2093
+ * | Seconds timestamp | t | 512969520 | 7 |
2094
+ * | | tt | ... | 3,7 |
2095
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
2096
+ * | | TT | ... | 3,7 |
2097
+ * | Long localized date | P | 04/29/1453 | 7 |
2098
+ * | | PP | Apr 29, 1453 | 7 |
2099
+ * | | PPP | April 29th, 1453 | 7 |
2100
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
2101
+ * | Long localized time | p | 12:00 AM | 7 |
2102
+ * | | pp | 12:00:00 AM | 7 |
2103
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
2104
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
2105
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
2106
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
2107
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
2108
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
2109
+ * Notes:
2110
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
2111
+ * are the same as "stand-alone" units, but are different in some languages.
2112
+ * "Formatting" units are declined according to the rules of the language
2113
+ * in the context of a date. "Stand-alone" units are always nominative singular:
2114
+ *
2115
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
2116
+ *
2117
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
2118
+ *
2119
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
2120
+ * the single quote characters (see below).
2121
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
2122
+ * the output will be the same as default pattern for this unit, usually
2123
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
2124
+ * are marked with "2" in the last column of the table.
2125
+ *
2126
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
2127
+ *
2128
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
2129
+ *
2130
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
2131
+ *
2132
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
2133
+ *
2134
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
2135
+ *
2136
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
2137
+ * The output will be padded with zeros to match the length of the pattern.
2138
+ *
2139
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
2140
+ *
2141
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
2142
+ * These tokens represent the shortest form of the quarter.
2143
+ *
2144
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
2145
+ *
2146
+ * | Year | `y` | `u` |
2147
+ * |------|-----|-----|
2148
+ * | AC 1 | 1 | 1 |
2149
+ * | BC 1 | 1 | 0 |
2150
+ * | BC 2 | 2 | -1 |
2151
+ *
2152
+ * Also `yy` always returns the last two digits of a year,
2153
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
2154
+ *
2155
+ * | Year | `yy` | `uu` |
2156
+ * |------|------|------|
2157
+ * | 1 | 01 | 01 |
2158
+ * | 14 | 14 | 14 |
2159
+ * | 376 | 76 | 376 |
2160
+ * | 1453 | 53 | 1453 |
2161
+ *
2162
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
2163
+ * except local week-numbering years are dependent on `options.weekStartsOn`
2164
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
2165
+ * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
2166
+ *
2167
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
2168
+ * so right now these tokens fall back to GMT timezones.
2169
+ *
2170
+ * 7. These patterns are not in the Unicode Technical Standard #35:
2171
+ * - `i`: ISO day of week
2172
+ * - `I`: ISO week of year
2173
+ * - `R`: ISO week-numbering year
2174
+ * - `t`: seconds timestamp
2175
+ * - `T`: milliseconds timestamp
2176
+ * - `o`: ordinal number modifier
2177
+ * - `P`: long localized date
2178
+ * - `p`: long localized time
2179
+ *
2180
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
2181
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2182
+ *
2183
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
2184
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2185
+ *
2186
+ * @param date - The original date
2187
+ * @param format - The string of tokens
2188
+ * @param options - An object with options
2189
+ *
2190
+ * @returns The formatted date string
2191
+ *
2192
+ * @throws `date` must not be Invalid Date
2193
+ * @throws `options.locale` must contain `localize` property
2194
+ * @throws `options.locale` must contain `formatLong` property
2195
+ * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2196
+ * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2197
+ * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2198
+ * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2199
+ * @throws format string contains an unescaped latin alphabet character
2200
+ *
2201
+ * @example
2202
+ * // Represent 11 February 2014 in middle-endian format:
2203
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
2204
+ * //=> '02/11/2014'
2205
+ *
2206
+ * @example
2207
+ * // Represent 2 July 2014 in Esperanto:
2208
+ * import { eoLocale } from 'date-fns/locale/eo'
2209
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
2210
+ * locale: eoLocale
2211
+ * })
2212
+ * //=> '2-a de julio 2014'
2213
+ *
2214
+ * @example
2215
+ * // Escape string by single quote characters:
2216
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
2217
+ * //=> "3 o'clock"
2218
+ */
2219
+ function format(date, formatStr, options) {
2220
+ const defaultOptions = getDefaultOptions();
2221
+ const locale = options?.locale ?? defaultOptions.locale ?? enUS;
2222
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
2223
+ const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
2224
+ const originalDate = toDate(date, options?.in);
2225
+ if (!isValid(originalDate)) throw new RangeError("Invalid time value");
2226
+ let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
2227
+ const firstCharacter = substring[0];
2228
+ if (firstCharacter === "p" || firstCharacter === "P") {
2229
+ const longFormatter = longFormatters[firstCharacter];
2230
+ return longFormatter(substring, locale.formatLong);
2231
+ }
2232
+ return substring;
2233
+ }).join("").match(formattingTokensRegExp).map((substring) => {
2234
+ if (substring === "''") return {
2235
+ isToken: false,
2236
+ value: "'"
2237
+ };
2238
+ const firstCharacter = substring[0];
2239
+ if (firstCharacter === "'") return {
2240
+ isToken: false,
2241
+ value: cleanEscapedString(substring)
2242
+ };
2243
+ if (formatters[firstCharacter]) return {
2244
+ isToken: true,
2245
+ value: substring
2246
+ };
2247
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
2248
+ return {
2249
+ isToken: false,
2250
+ value: substring
2251
+ };
2252
+ });
2253
+ if (locale.localize.preprocessor) parts = locale.localize.preprocessor(originalDate, parts);
2254
+ const formatterOptions = {
2255
+ firstWeekContainsDate,
2256
+ weekStartsOn,
2257
+ locale
2258
+ };
2259
+ return parts.map((part) => {
2260
+ if (!part.isToken) return part.value;
2261
+ const token = part.value;
2262
+ if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) warnOrThrowProtectedError(token, formatStr, String(date));
2263
+ const formatter = formatters[token[0]];
2264
+ return formatter(originalDate, token, locale.localize, formatterOptions);
2265
+ }).join("");
2266
+ }
2267
+ function cleanEscapedString(input) {
2268
+ const matched = input.match(escapedStringRegExp);
2269
+ if (!matched) return input;
2270
+ return matched[1].replace(doubleQuoteRegExp, "'");
2271
+ }
2272
+
2273
+ //#endregion
2274
+ //#region src/elements-experimental/pearl-chain-time/pearl-chain-time.scss?inline
2275
+ var pearl_chain_time_default = ":host {\n display: block;\n --sbb-pearl-chain-time-height: auto;\n}\n@media (min-width: calc(37.5rem)) {\n :host {\n --sbb-pearl-chain-time-height: 1.5625rem;\n }\n}\n@media (min-width: calc(64rem)) {\n :host {\n --sbb-pearl-chain-time-height: 1.75rem;\n }\n}\n\n.sbb-pearl-chain__time {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: center;\n height: var(--sbb-pearl-chain-time-height);\n}\n\n.sbb-pearl-chain__time-walktime,\n.sbb-pearl-chain__time-transfer {\n --sbb-text-font-size: var(--sbb-text-font-size-xxs);\n font-family: var(--sbb-typo-font-family);\n font-weight: normal;\n line-height: var(--sbb-typo-line-height-text);\n letter-spacing: var(--sbb-typo-letter-spacing-text);\n font-size: var(--sbb-text-font-size);\n display: inline-flex;\n align-items: center;\n}\n\n.sbb-pearl-chain__time-walktime--walk-small-left {\n transform: translateX(-0.4375rem);\n margin-inline-end: calc(var(--sbb-spacing-fixed-2x) - 0.4375rem);\n}\n\n.sbb-pearl-chain__time-walktime--walk-small-right {\n margin-inline-start: calc(var(--sbb-spacing-fixed-2x) - 0.25rem);\n}\n\n.sbb-pearl-chain__time-walktime--wheelchair-small-left {\n transform: translateX(-0.375rem);\n margin-inline-end: calc(var(--sbb-spacing-fixed-2x) - 0.4375rem);\n}\n\n.sbb-pearl-chain__time-walktime--wheelchair-small-right {\n margin-inline-start: calc(var(--sbb-spacing-fixed-2x) - 0.25rem);\n}\n\n.sbb-pearl-chain__time-walktime-prime-symbol {\n float: right;\n}\n\n.sbb-pearl-chain__time-transfer {\n gap: var(--sbb-spacing-fixed-1x);\n}\n\n.sbb-pearl-chain__time-transfer--sa-ci-departure {\n margin-inline-end: var(--sbb-spacing-fixed-2x);\n}\n\n.sbb-pearl-chain__time-transfer--sa-ci-arrival {\n margin-inline-start: calc(var(--sbb-spacing-fixed-2x) - 0.25rem);\n}\n\n.sbb-pearl-chain__time-chain {\n flex: 1 1 auto;\n align-self: center;\n margin-inline: var(--sbb-spacing-fixed-3x);\n}\n\n.sbb-pearl-chain__time-time {\n --sbb-text-font-size: var(--sbb-text-font-size-s);\n font-family: var(--sbb-typo-font-family);\n font-weight: normal;\n line-height: var(--sbb-typo-line-height-text);\n letter-spacing: var(--sbb-typo-letter-spacing-text);\n font-size: var(--sbb-text-font-size);\n font-weight: bold;\n color: var(--sbb-color-2);\n}\n";
2276
+
2277
+ //#endregion
2278
+ //#region src/elements-experimental/pearl-chain-time/pearl-chain-time.component.ts
2279
+ /**
2280
+ * Combined with `sbb-pearl-chain`, it displays walk time information.
2281
+ */
2282
+ let SbbPearlChainTimeElement = (() => {
2283
+ let _classSuper = SbbElement;
2284
+ let _instanceExtraInitializers = [];
2285
+ let _legs_decorators;
2286
+ let _legs_initializers = [];
2287
+ let _legs_extraInitializers = [];
2288
+ let _departureTime_decorators;
2289
+ let _departureTime_initializers = [];
2290
+ let _departureTime_extraInitializers = [];
2291
+ let _arrivalTime_decorators;
2292
+ let _arrivalTime_initializers = [];
2293
+ let _arrivalTime_extraInitializers = [];
2294
+ let _departureWalk_decorators;
2295
+ let _departureWalk_initializers = [];
2296
+ let _departureWalk_extraInitializers = [];
2297
+ let _arrivalWalk_decorators;
2298
+ let _arrivalWalk_initializers = [];
2299
+ let _arrivalWalk_extraInitializers = [];
2300
+ let _disableAnimation_decorators;
2301
+ let _disableAnimation_initializers = [];
2302
+ let _disableAnimation_extraInitializers = [];
2303
+ let _a11yFootpath_decorators;
2304
+ let _a11yFootpath_initializers = [];
2305
+ let _a11yFootpath_extraInitializers = [];
2306
+ let _set_now_decorators;
2307
+ return class SbbPearlChainTimeElement extends _classSuper {
2308
+ constructor() {
2309
+ super(...arguments);
2310
+ this.#legs_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _legs_initializers, []));
2311
+ this.#departureTime_accessor_storage = (__runInitializers(this, _legs_extraInitializers), __runInitializers(this, _departureTime_initializers, ""));
2312
+ this.#arrivalTime_accessor_storage = (__runInitializers(this, _departureTime_extraInitializers), __runInitializers(this, _arrivalTime_initializers, ""));
2313
+ this.#departureWalk_accessor_storage = (__runInitializers(this, _arrivalTime_extraInitializers), __runInitializers(this, _departureWalk_initializers, NaN));
2314
+ this.#arrivalWalk_accessor_storage = (__runInitializers(this, _departureWalk_extraInitializers), __runInitializers(this, _arrivalWalk_initializers, NaN));
2315
+ this.#disableAnimation_accessor_storage = (__runInitializers(this, _arrivalWalk_extraInitializers), __runInitializers(this, _disableAnimation_initializers, false));
2316
+ this.#a11yFootpath_accessor_storage = (__runInitializers(this, _disableAnimation_extraInitializers), __runInitializers(this, _a11yFootpath_initializers, false));
2317
+ this._now = (__runInitializers(this, _a11yFootpath_extraInitializers), null);
2318
+ this._language = new SbbLanguageController(this);
2319
+ }
2320
+ static {
2321
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
2322
+ _legs_decorators = [property({ type: Array })];
2323
+ _departureTime_decorators = [forceType(), property({ attribute: "departure-time" })];
2324
+ _arrivalTime_decorators = [forceType(), property({ attribute: "arrival-time" })];
2325
+ _departureWalk_decorators = [forceType(), property({
2326
+ attribute: "departure-walk",
2327
+ type: Number
2328
+ })];
2329
+ _arrivalWalk_decorators = [forceType(), property({
2330
+ attribute: "arrival-walk",
2331
+ type: Number
2332
+ })];
2333
+ _disableAnimation_decorators = [forceType(), property({
2334
+ attribute: "disable-animation",
2335
+ type: Boolean
2336
+ })];
2337
+ _a11yFootpath_decorators = [forceType(), property({
2338
+ attribute: "a11y-footpath",
2339
+ type: Boolean
2340
+ })];
2341
+ _set_now_decorators = [property()];
2342
+ __esDecorate(this, null, _legs_decorators, {
2343
+ kind: "accessor",
2344
+ name: "legs",
2345
+ static: false,
2346
+ private: false,
2347
+ access: {
2348
+ has: (obj) => "legs" in obj,
2349
+ get: (obj) => obj.legs,
2350
+ set: (obj, value) => {
2351
+ obj.legs = value;
2352
+ }
2353
+ },
2354
+ metadata: _metadata
2355
+ }, _legs_initializers, _legs_extraInitializers);
2356
+ __esDecorate(this, null, _departureTime_decorators, {
2357
+ kind: "accessor",
2358
+ name: "departureTime",
2359
+ static: false,
2360
+ private: false,
2361
+ access: {
2362
+ has: (obj) => "departureTime" in obj,
2363
+ get: (obj) => obj.departureTime,
2364
+ set: (obj, value) => {
2365
+ obj.departureTime = value;
2366
+ }
2367
+ },
2368
+ metadata: _metadata
2369
+ }, _departureTime_initializers, _departureTime_extraInitializers);
2370
+ __esDecorate(this, null, _arrivalTime_decorators, {
2371
+ kind: "accessor",
2372
+ name: "arrivalTime",
2373
+ static: false,
2374
+ private: false,
2375
+ access: {
2376
+ has: (obj) => "arrivalTime" in obj,
2377
+ get: (obj) => obj.arrivalTime,
2378
+ set: (obj, value) => {
2379
+ obj.arrivalTime = value;
2380
+ }
2381
+ },
2382
+ metadata: _metadata
2383
+ }, _arrivalTime_initializers, _arrivalTime_extraInitializers);
2384
+ __esDecorate(this, null, _departureWalk_decorators, {
2385
+ kind: "accessor",
2386
+ name: "departureWalk",
2387
+ static: false,
2388
+ private: false,
2389
+ access: {
2390
+ has: (obj) => "departureWalk" in obj,
2391
+ get: (obj) => obj.departureWalk,
2392
+ set: (obj, value) => {
2393
+ obj.departureWalk = value;
2394
+ }
2395
+ },
2396
+ metadata: _metadata
2397
+ }, _departureWalk_initializers, _departureWalk_extraInitializers);
2398
+ __esDecorate(this, null, _arrivalWalk_decorators, {
2399
+ kind: "accessor",
2400
+ name: "arrivalWalk",
2401
+ static: false,
2402
+ private: false,
2403
+ access: {
2404
+ has: (obj) => "arrivalWalk" in obj,
2405
+ get: (obj) => obj.arrivalWalk,
2406
+ set: (obj, value) => {
2407
+ obj.arrivalWalk = value;
2408
+ }
2409
+ },
2410
+ metadata: _metadata
2411
+ }, _arrivalWalk_initializers, _arrivalWalk_extraInitializers);
2412
+ __esDecorate(this, null, _disableAnimation_decorators, {
2413
+ kind: "accessor",
2414
+ name: "disableAnimation",
2415
+ static: false,
2416
+ private: false,
2417
+ access: {
2418
+ has: (obj) => "disableAnimation" in obj,
2419
+ get: (obj) => obj.disableAnimation,
2420
+ set: (obj, value) => {
2421
+ obj.disableAnimation = value;
2422
+ }
2423
+ },
2424
+ metadata: _metadata
2425
+ }, _disableAnimation_initializers, _disableAnimation_extraInitializers);
2426
+ __esDecorate(this, null, _a11yFootpath_decorators, {
2427
+ kind: "accessor",
2428
+ name: "a11yFootpath",
2429
+ static: false,
2430
+ private: false,
2431
+ access: {
2432
+ has: (obj) => "a11yFootpath" in obj,
2433
+ get: (obj) => obj.a11yFootpath,
2434
+ set: (obj, value) => {
2435
+ obj.a11yFootpath = value;
2436
+ }
2437
+ },
2438
+ metadata: _metadata
2439
+ }, _a11yFootpath_initializers, _a11yFootpath_extraInitializers);
2440
+ __esDecorate(this, null, _set_now_decorators, {
2441
+ kind: "setter",
2442
+ name: "now",
2443
+ static: false,
2444
+ private: false,
2445
+ access: {
2446
+ has: (obj) => "now" in obj,
2447
+ set: (obj, value) => {
2448
+ obj.now = value;
2449
+ }
2450
+ },
2451
+ metadata: _metadata
2452
+ }, null, _instanceExtraInitializers);
2453
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, {
2454
+ enumerable: true,
2455
+ configurable: true,
2456
+ writable: true,
2457
+ value: _metadata
2458
+ });
2459
+ }
2460
+ static {
2461
+ this.elementName = "sbb-pearl-chain-time";
2462
+ }
2463
+ static {
2464
+ this.elementDependencies = [SbbIconElement, SbbPearlChainElement];
2465
+ }
2466
+ static {
2467
+ this.styles = [screenReaderOnlyStyles, unsafeCSS(pearl_chain_time_default)];
2468
+ }
2469
+ #legs_accessor_storage;
2470
+ /**
2471
+ * define the legs of the pearl-chain.
2472
+ * Format:
2473
+ * `{"legs": [{"duration": 25}, ...]}`
2474
+ * `duration` in minutes. Duration of the leg is relative
2475
+ * to the total travel time. Example: departure 16:30, change at 16:40,
2476
+ * arrival at 17:00. So the change should have a duration of 33.33%.
2477
+ */
2478
+ get legs() {
2479
+ return this.#legs_accessor_storage;
2480
+ }
2481
+ set legs(value) {
2482
+ this.#legs_accessor_storage = value;
2483
+ }
2484
+ #departureTime_accessor_storage;
2485
+ /** Prop to render the departure time - will be formatted as "H:mm" */
2486
+ get departureTime() {
2487
+ return this.#departureTime_accessor_storage;
2488
+ }
2489
+ set departureTime(value) {
2490
+ this.#departureTime_accessor_storage = value;
2491
+ }
2492
+ #arrivalTime_accessor_storage;
2493
+ /** Prop to render the arrival time - will be formatted as "H:mm" */
2494
+ get arrivalTime() {
2495
+ return this.#arrivalTime_accessor_storage;
2496
+ }
2497
+ set arrivalTime(value) {
2498
+ this.#arrivalTime_accessor_storage = value;
2499
+ }
2500
+ #departureWalk_accessor_storage;
2501
+ /** Optional prop to render the walk time (in minutes) before departure */
2502
+ get departureWalk() {
2503
+ return this.#departureWalk_accessor_storage;
2504
+ }
2505
+ set departureWalk(value) {
2506
+ this.#departureWalk_accessor_storage = value;
2507
+ }
2508
+ #arrivalWalk_accessor_storage;
2509
+ /** Optional prop to render the walk time (in minutes) after arrival */
2510
+ get arrivalWalk() {
2511
+ return this.#arrivalWalk_accessor_storage;
2512
+ }
2513
+ set arrivalWalk(value) {
2514
+ this.#arrivalWalk_accessor_storage = value;
2515
+ }
2516
+ #disableAnimation_accessor_storage;
2517
+ /**
2518
+ * Per default, the current location has a pulsating animation. You can
2519
+ * disable the animation with this property.
2520
+ */
2521
+ get disableAnimation() {
2522
+ return this.#disableAnimation_accessor_storage;
2523
+ }
2524
+ set disableAnimation(value) {
2525
+ this.#disableAnimation_accessor_storage = value;
2526
+ }
2527
+ #a11yFootpath_accessor_storage;
2528
+ /** Optional prop to render wheelchair-small instead of walk-small */
2529
+ get a11yFootpath() {
2530
+ return this.#a11yFootpath_accessor_storage;
2531
+ }
2532
+ set a11yFootpath(value) {
2533
+ this.#a11yFootpath_accessor_storage = value;
2534
+ }
2535
+ /**
2536
+ * A configured date which acts as the current date instead of the real current date.
2537
+ * Only recommended for testing purposes.
2538
+ */
2539
+ set now(value) {
2540
+ this._now = defaultDateAdapter.getValidDateOrNull(defaultDateAdapter.deserialize(value));
2541
+ }
2542
+ get now() {
2543
+ return this._now ?? /* @__PURE__ */ new Date();
2544
+ }
2545
+ render() {
2546
+ const departure = this.departureTime ? removeTimezoneFromISOTimeString(this.departureTime) : void 0;
2547
+ const arrival = this.arrivalTime ? removeTimezoneFromISOTimeString(this.arrivalTime) : void 0;
2548
+ const { renderDepartureTimeAttribute, renderArrivalTimeAttribute } = getDepartureArrivalTimeAttribute(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath);
2549
+ const rideLegs = this.legs?.filter((leg) => isRideLeg(leg));
2550
+ return html`
2551
+ <div class="sbb-pearl-chain__time">
2552
+ ${renderDepartureTimeAttribute()}
2553
+ ${departure ? html`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
2554
+ <span class="sbb-screen-reader-only"
2555
+ >${i18nDeparture[this._language.current]}:&nbsp;</span
2556
+ >
2557
+ ${format(departure, "HH:mm")}
2558
+ </time>` : nothing}
2559
+ ${rideLegs?.length > 1 ? html`<span class="sbb-screen-reader-only" role="paragraph">
2560
+ ${rideLegs?.length - 1} ${i18nTransferProcedures[this._language.current]}
2561
+ </span>` : nothing}
2562
+ <sbb-pearl-chain
2563
+ class="sbb-pearl-chain__time-chain"
2564
+ .legs=${this.legs}
2565
+ .disableAnimation=${this.disableAnimation}
2566
+ .now=${this.now}
2567
+ ></sbb-pearl-chain>
2568
+ ${arrival ? html`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
2569
+ <span class="sbb-screen-reader-only"
2570
+ >${i18nArrival[this._language.current]}:&nbsp;</span
2571
+ >
2572
+ ${format(arrival, "HH:mm")}
2573
+ </time>` : nothing}
2574
+ ${renderArrivalTimeAttribute()}
2575
+ </div>
2576
+ `;
2577
+ }
2578
+ };
2579
+ })();
2580
+
2581
+ //#endregion
2582
+ export { SbbPearlChainTimeElement };