@sbb-esta/lyne-elements-experimental 4.7.0 → 4.8.1

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 (332) hide show
  1. package/README.md +2 -2
  2. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +66 -85
  3. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +72 -53
  4. package/autocomplete-grid/autocomplete-grid-button.js +4 -4
  5. package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -25
  6. package/autocomplete-grid/autocomplete-grid-cell.js +4 -4
  7. package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +20 -28
  8. package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
  9. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -41
  10. package/autocomplete-grid/autocomplete-grid-option.js +4 -5
  11. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -28
  12. package/autocomplete-grid/autocomplete-grid-row.js +4 -4
  13. package/autocomplete-grid/autocomplete-grid.js +4 -4
  14. package/autocomplete-grid-cell.component-Dak9wlBr.js +24 -0
  15. package/autocomplete-grid-option.component-DNRFHOwc.js +37 -0
  16. package/autocomplete-grid-row.component-DBHZQ0GQ.js +27 -0
  17. package/autocomplete-grid.js +10 -15
  18. package/autocomplete-grid.pure.js +7 -0
  19. package/core/datetime/date-helper.js +2 -191
  20. package/core/datetime.js +2 -5
  21. package/core/timetable/access-leg-helper.js +76 -71
  22. package/core/timetable/timetable-helper.js +9 -11
  23. package/core/timetable/timetable-properties.js +0 -1
  24. package/core/timetable.js +3 -7
  25. package/custom-elements.json +457 -368
  26. package/date-helper-CGproP5d.js +185 -0
  27. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +2 -1
  28. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
  29. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +115 -136
  30. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +3 -2
  31. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
  32. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +92 -71
  33. package/development/autocomplete-grid/autocomplete-grid-button.d.ts +0 -3
  34. package/development/autocomplete-grid/autocomplete-grid-button.d.ts.map +1 -1
  35. package/development/autocomplete-grid/autocomplete-grid-button.js +9 -4
  36. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts +4 -4
  37. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts.map +1 -1
  38. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -41
  39. package/development/autocomplete-grid/autocomplete-grid-cell.d.ts +0 -3
  40. package/development/autocomplete-grid/autocomplete-grid-cell.d.ts.map +1 -1
  41. package/development/autocomplete-grid/autocomplete-grid-cell.js +10 -5
  42. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts +3 -2
  43. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts.map +1 -1
  44. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +28 -38
  45. package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts +0 -3
  46. package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts.map +1 -1
  47. package/development/autocomplete-grid/autocomplete-grid-optgroup.js +9 -4
  48. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -0
  49. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
  50. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -121
  51. package/development/autocomplete-grid/autocomplete-grid-option.d.ts +0 -3
  52. package/development/autocomplete-grid/autocomplete-grid-option.d.ts.map +1 -1
  53. package/development/autocomplete-grid/autocomplete-grid-option.js +10 -6
  54. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts +4 -4
  55. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts.map +1 -1
  56. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -103
  57. package/development/autocomplete-grid/autocomplete-grid-row.d.ts +0 -3
  58. package/development/autocomplete-grid/autocomplete-grid-row.d.ts.map +1 -1
  59. package/development/autocomplete-grid/autocomplete-grid-row.js +10 -5
  60. package/development/autocomplete-grid/autocomplete-grid.d.ts +0 -3
  61. package/development/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
  62. package/development/autocomplete-grid/autocomplete-grid.js +9 -4
  63. package/development/autocomplete-grid-cell.component-BBvM4o2H.js +42 -0
  64. package/development/autocomplete-grid-option.component-QzfM5eIE.js +123 -0
  65. package/development/autocomplete-grid-row.component-H8sCTCkT.js +104 -0
  66. package/development/autocomplete-grid.d.ts +1 -9
  67. package/development/autocomplete-grid.d.ts.map +1 -1
  68. package/development/autocomplete-grid.js +17 -14
  69. package/development/autocomplete-grid.pure.d.ts +8 -0
  70. package/development/autocomplete-grid.pure.d.ts.map +1 -0
  71. package/development/autocomplete-grid.pure.js +7 -0
  72. package/development/core/datetime/date-helper.js +2 -285
  73. package/development/core/datetime.d.ts +1 -3
  74. package/development/core/datetime.d.ts.map +1 -1
  75. package/development/core/datetime.js +2 -6
  76. package/development/core/timetable/access-leg-helper.js +104 -82
  77. package/development/core/timetable/timetable-helper.js +16 -17
  78. package/development/core/timetable/timetable-properties.d.ts +30 -30
  79. package/development/core/timetable/timetable-properties.d.ts.map +1 -1
  80. package/development/core/timetable/timetable-properties.js +0 -2
  81. package/development/core/timetable.d.ts +1 -3
  82. package/development/core/timetable.d.ts.map +1 -1
  83. package/development/core/timetable.js +3 -8
  84. package/development/date-helper-8_Y-PuHh.js +520 -0
  85. package/development/differenceInMinutes-DN_1Rk3O.js +110 -0
  86. package/development/format-Bbrn2bgo.js +1848 -0
  87. package/development/isValid-C-HzKv4v.js +178 -0
  88. package/development/journey-summary/journey-summary.component.d.ts +4 -2
  89. package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
  90. package/development/journey-summary/journey-summary.component.js +2 -294
  91. package/development/journey-summary.component-uGhZvA4p.js +385 -0
  92. package/development/journey-summary.d.ts +1 -4
  93. package/development/journey-summary.d.ts.map +1 -1
  94. package/development/journey-summary.js +9 -5
  95. package/development/journey-summary.pure.d.ts +3 -0
  96. package/development/journey-summary.pure.d.ts.map +1 -0
  97. package/development/journey-summary.pure.js +2 -0
  98. package/development/mapper-hWWm7Uke.js +11454 -0
  99. package/development/pearl-chain/pearl-chain.component.d.ts +4 -2
  100. package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  101. package/development/pearl-chain/pearl-chain.component.js +2 -640
  102. package/development/pearl-chain-time/pearl-chain-time.component.d.ts +4 -2
  103. package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
  104. package/development/pearl-chain-time/pearl-chain-time.component.js +2 -312
  105. package/development/pearl-chain-time.component-B8mayTWD.js +415 -0
  106. package/development/pearl-chain-time.d.ts +1 -4
  107. package/development/pearl-chain-time.d.ts.map +1 -1
  108. package/development/pearl-chain-time.js +9 -5
  109. package/development/pearl-chain-time.pure.d.ts +3 -0
  110. package/development/pearl-chain-time.pure.d.ts.map +1 -0
  111. package/development/pearl-chain-time.pure.js +2 -0
  112. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts +4 -2
  113. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +1 -1
  114. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -40
  115. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts +4 -2
  116. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +1 -1
  117. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -399
  118. package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +435 -0
  119. package/development/pearl-chain-vertical-item.d.ts +1 -4
  120. package/development/pearl-chain-vertical-item.d.ts.map +1 -1
  121. package/development/pearl-chain-vertical-item.js +9 -5
  122. package/development/pearl-chain-vertical-item.pure.d.ts +3 -0
  123. package/development/pearl-chain-vertical-item.pure.d.ts.map +1 -0
  124. package/development/pearl-chain-vertical-item.pure.js +2 -0
  125. package/development/pearl-chain-vertical.component-CswE7b3M.js +39 -0
  126. package/development/pearl-chain-vertical.d.ts +1 -4
  127. package/development/pearl-chain-vertical.d.ts.map +1 -1
  128. package/development/pearl-chain-vertical.js +9 -5
  129. package/development/pearl-chain-vertical.pure.d.ts +3 -0
  130. package/development/pearl-chain-vertical.pure.d.ts.map +1 -0
  131. package/development/pearl-chain-vertical.pure.js +2 -0
  132. package/development/pearl-chain.component-wpsTvoSe.js +704 -0
  133. package/development/pearl-chain.d.ts +1 -4
  134. package/development/pearl-chain.d.ts.map +1 -1
  135. package/development/pearl-chain.js +9 -5
  136. package/development/pearl-chain.pure.d.ts +3 -0
  137. package/development/pearl-chain.pure.d.ts.map +1 -0
  138. package/development/pearl-chain.pure.js +2 -0
  139. package/development/seat-reservation/common/mapper/icon-mapper.d.ts +2 -2
  140. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  141. package/development/seat-reservation/common/mapper/icon-mapper.js +168 -71
  142. package/development/seat-reservation/common/mapper/mapper.js +2 -131
  143. package/development/seat-reservation/common/mapper.js +2 -9
  144. package/development/seat-reservation/common/svgs.js +2 -46
  145. package/development/seat-reservation/common/translations/i18n.js +1118 -900
  146. package/development/seat-reservation/common/translations.js +1 -4
  147. package/development/seat-reservation/common/types.d.ts +22 -22
  148. package/development/seat-reservation/common/types.d.ts.map +1 -1
  149. package/development/seat-reservation/common/types.js +0 -2
  150. package/development/seat-reservation/common.d.ts +1 -3
  151. package/development/seat-reservation/common.d.ts.map +1 -1
  152. package/development/seat-reservation/common.js +10 -12
  153. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +4 -3
  154. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  155. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1309 -1231
  156. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +1 -0
  157. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  158. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -867
  159. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +4 -2
  160. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -1
  161. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -112
  162. package/development/seat-reservation/seat-reservation-area.d.ts +0 -3
  163. package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -1
  164. package/development/seat-reservation/seat-reservation-area.js +10 -5
  165. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  166. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +39 -36
  167. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +4 -2
  168. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -1
  169. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -167
  170. package/development/seat-reservation/seat-reservation-graphic.d.ts +0 -3
  171. package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -1
  172. package/development/seat-reservation/seat-reservation-graphic.js +10 -5
  173. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +5 -3
  174. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  175. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -718
  176. package/development/seat-reservation/seat-reservation-navigation-coach.d.ts +0 -3
  177. package/development/seat-reservation/seat-reservation-navigation-coach.d.ts.map +1 -1
  178. package/development/seat-reservation/seat-reservation-navigation-coach.js +10 -5
  179. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +4 -2
  180. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
  181. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -136
  182. package/development/seat-reservation/seat-reservation-navigation-services.d.ts +0 -3
  183. package/development/seat-reservation/seat-reservation-navigation-services.d.ts.map +1 -1
  184. package/development/seat-reservation/seat-reservation-navigation-services.js +10 -5
  185. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +2 -1
  186. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
  187. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -607
  188. package/development/seat-reservation/seat-reservation-place-control.d.ts +0 -3
  189. package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -1
  190. package/development/seat-reservation/seat-reservation-place-control.js +10 -5
  191. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +4 -2
  192. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -1
  193. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -34
  194. package/development/seat-reservation/seat-reservation-scoped.d.ts +0 -3
  195. package/development/seat-reservation/seat-reservation-scoped.d.ts.map +1 -1
  196. package/development/seat-reservation/seat-reservation-scoped.js +10 -5
  197. package/development/seat-reservation/seat-reservation.d.ts +0 -3
  198. package/development/seat-reservation/seat-reservation.d.ts.map +1 -1
  199. package/development/seat-reservation/seat-reservation.js +10 -6
  200. package/development/seat-reservation-area.component-ORuli_DC.js +138 -0
  201. package/development/seat-reservation-graphic.component-lZXqHWIz.js +193 -0
  202. package/development/seat-reservation-navigation-coach.component-D2QXTMJJ.js +828 -0
  203. package/development/seat-reservation-navigation-services.component-Bg1adRlU.js +179 -0
  204. package/development/seat-reservation-place-control.component-CwUX-QYO.js +726 -0
  205. package/development/seat-reservation-scoped.component-uLT33P9y.js +31 -0
  206. package/development/seat-reservation.component-MOv5kHDC.js +821 -0
  207. package/development/seat-reservation.d.ts +1 -11
  208. package/development/seat-reservation.d.ts.map +1 -1
  209. package/development/seat-reservation.js +24 -27
  210. package/development/seat-reservation.pure.d.ts +15 -0
  211. package/development/seat-reservation.pure.d.ts.map +1 -0
  212. package/development/seat-reservation.pure.js +15 -0
  213. package/development/svgs-kDpBCto5.js +28 -0
  214. package/development/timetable-duration/timetable-duration.component.d.ts +4 -2
  215. package/development/timetable-duration/timetable-duration.component.d.ts.map +1 -1
  216. package/development/timetable-duration/timetable-duration.component.js +2 -114
  217. package/development/timetable-duration.component-D21SXsQq.js +125 -0
  218. package/development/timetable-duration.d.ts +1 -4
  219. package/development/timetable-duration.d.ts.map +1 -1
  220. package/development/timetable-duration.js +9 -5
  221. package/development/timetable-duration.pure.d.ts +3 -0
  222. package/development/timetable-duration.pure.d.ts.map +1 -0
  223. package/development/timetable-duration.pure.js +2 -0
  224. package/development/timetable-row/timetable-row.component.d.ts +4 -2
  225. package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
  226. package/development/timetable-row/timetable-row.component.js +2 -787
  227. package/development/timetable-row.component-Y5w8vEwP.js +932 -0
  228. package/development/timetable-row.d.ts +1 -4
  229. package/development/timetable-row.d.ts.map +1 -1
  230. package/development/timetable-row.js +9 -12
  231. package/development/timetable-row.pure.d.ts +3 -0
  232. package/development/timetable-row.pure.d.ts.map +1 -0
  233. package/development/timetable-row.pure.js +2 -0
  234. package/development/toDate-Biiv3kyf.js +150 -0
  235. package/differenceInMinutes-Dr9gRqtu.js +27 -0
  236. package/format-CM5exOsN.js +1103 -0
  237. package/index.d.ts +9 -20
  238. package/index.js +9 -20
  239. package/isValid-B9oVW3lA.js +36 -0
  240. package/journey-summary/journey-summary.component.js +2 -193
  241. package/journey-summary.component-Cq_4kaOp.js +264 -0
  242. package/journey-summary.js +6 -4
  243. package/journey-summary.pure.js +2 -0
  244. package/mapper-DkiDDseD.js +11382 -0
  245. package/package.json +47 -2
  246. package/pearl-chain/pearl-chain.component.js +2 -164
  247. package/pearl-chain-time/pearl-chain-time.component.js +2 -156
  248. package/pearl-chain-time.component-DGDW5S1c.js +239 -0
  249. package/pearl-chain-time.js +6 -4
  250. package/pearl-chain-time.pure.js +2 -0
  251. package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -24
  252. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -76
  253. package/pearl-chain-vertical-item.component-G22bWhLU.js +108 -0
  254. package/pearl-chain-vertical-item.js +6 -4
  255. package/pearl-chain-vertical-item.pure.js +2 -0
  256. package/pearl-chain-vertical.component-CXIDT5RD.js +21 -0
  257. package/pearl-chain-vertical.js +6 -4
  258. package/pearl-chain-vertical.pure.js +2 -0
  259. package/pearl-chain.component-DmjkVIva.js +194 -0
  260. package/pearl-chain.js +6 -4
  261. package/pearl-chain.pure.js +2 -0
  262. package/seat-reservation/common/mapper/icon-mapper.js +71 -71
  263. package/seat-reservation/common/mapper/mapper.js +2 -91
  264. package/seat-reservation/common/mapper.js +3 -9
  265. package/seat-reservation/common/svgs.js +2 -243
  266. package/seat-reservation/common/translations/i18n.js +1084 -891
  267. package/seat-reservation/common/translations.js +2 -4
  268. package/seat-reservation/common/types.js +0 -1
  269. package/seat-reservation/common.js +9 -13
  270. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +834 -809
  271. package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -422
  272. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -50
  273. package/seat-reservation/seat-reservation-area.js +4 -4
  274. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +69 -70
  275. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -73
  276. package/seat-reservation/seat-reservation-graphic.js +4 -4
  277. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -232
  278. package/seat-reservation/seat-reservation-navigation-coach.js +4 -4
  279. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -83
  280. package/seat-reservation/seat-reservation-navigation-services.js +4 -4
  281. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -202
  282. package/seat-reservation/seat-reservation-place-control.js +4 -4
  283. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -20
  284. package/seat-reservation/seat-reservation-scoped.js +4 -4
  285. package/seat-reservation/seat-reservation.js +5 -6
  286. package/seat-reservation-area.component-COD6CXhP.js +75 -0
  287. package/seat-reservation-graphic.component-BNfU5tQM.js +102 -0
  288. package/seat-reservation-navigation-coach.component-Bh9ILq60.js +333 -0
  289. package/seat-reservation-navigation-services.component-QL0UnilZ.js +127 -0
  290. package/seat-reservation-place-control.component-BfnZUyHv.js +322 -0
  291. package/seat-reservation-scoped.component-CY04BT_4.js +17 -0
  292. package/seat-reservation.component-zrQHTRl3.js +364 -0
  293. package/seat-reservation.js +17 -29
  294. package/seat-reservation.pure.js +15 -0
  295. package/svgs-D5DhLHxC.js +26 -0
  296. package/timetable-duration/timetable-duration.component.js +2 -56
  297. package/timetable-duration.component-DaYoJUGS.js +65 -0
  298. package/timetable-duration.js +6 -4
  299. package/timetable-duration.pure.js +2 -0
  300. package/timetable-row/timetable-row.component.js +2 -426
  301. package/timetable-row.component-BDMAEsbR.js +559 -0
  302. package/timetable-row.js +6 -11
  303. package/timetable-row.pure.js +2 -0
  304. package/toDate-p-Tpkb7t.js +16 -0
  305. package/development/differenceInMinutes-B0dawX-5.js +0 -26
  306. package/development/format-BMkeaqaF.js +0 -1433
  307. package/development/isValid-BYRch7pV.js +0 -53
  308. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.d.ts +0 -69
  309. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.d.ts.map +0 -1
  310. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +0 -559
  311. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.d.ts +0 -123
  312. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.d.ts.map +0 -1
  313. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +0 -972
  314. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.d.ts +0 -114
  315. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.d.ts.map +0 -1
  316. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +0 -20368
  317. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.d.ts +0 -85
  318. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.d.ts.map +0 -1
  319. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +0 -1739
  320. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.d.ts +0 -69
  321. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.d.ts.map +0 -1
  322. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +0 -9783
  323. package/development/toDate-BWb6Z1JD.js +0 -24
  324. package/differenceInMinutes-COvvdYsJ.js +0 -23
  325. package/format-CmKROkbc.js +0 -1186
  326. package/isValid-m3_OsPaB.js +0 -45
  327. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +0 -558
  328. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +0 -970
  329. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +0 -20367
  330. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +0 -1738
  331. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +0 -9782
  332. package/toDate-Bw2KTWeq.js +0 -15
@@ -1,1186 +0,0 @@
1
- import { d as q, i as C } from "./isValid-m3_OsPaB.js";
2
- import { t as l, c as y, d as D } from "./toDate-Bw2KTWeq.js";
3
- let N = {};
4
- function O() {
5
- return N;
6
- }
7
- function p(t, e) {
8
- const n = O(), r = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = l(t, e?.in), o = a.getDay(), s = (o < r ? 7 : 0) + o - r;
9
- return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
10
- }
11
- function M(t, e) {
12
- return p(t, { ...e, weekStartsOn: 1 });
13
- }
14
- function T(t, e) {
15
- const n = l(t, e?.in), r = n.getFullYear(), a = y(n, 0);
16
- a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
17
- const o = M(a), s = y(n, 0);
18
- s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0);
19
- const c = M(s);
20
- return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= c.getTime() ? r : r - 1;
21
- }
22
- function H(t, e) {
23
- const n = T(t, e), r = y(t, 0);
24
- return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), M(r);
25
- }
26
- function Q(t, e) {
27
- const n = l(t, e?.in);
28
- return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
29
- }
30
- const X = {
31
- lessThanXSeconds: {
32
- one: "less than a second",
33
- other: "less than {{count}} seconds"
34
- },
35
- xSeconds: {
36
- one: "1 second",
37
- other: "{{count}} seconds"
38
- },
39
- halfAMinute: "half a minute",
40
- lessThanXMinutes: {
41
- one: "less than a minute",
42
- other: "less than {{count}} minutes"
43
- },
44
- xMinutes: {
45
- one: "1 minute",
46
- other: "{{count}} minutes"
47
- },
48
- aboutXHours: {
49
- one: "about 1 hour",
50
- other: "about {{count}} hours"
51
- },
52
- xHours: {
53
- one: "1 hour",
54
- other: "{{count}} hours"
55
- },
56
- xDays: {
57
- one: "1 day",
58
- other: "{{count}} days"
59
- },
60
- aboutXWeeks: {
61
- one: "about 1 week",
62
- other: "about {{count}} weeks"
63
- },
64
- xWeeks: {
65
- one: "1 week",
66
- other: "{{count}} weeks"
67
- },
68
- aboutXMonths: {
69
- one: "about 1 month",
70
- other: "about {{count}} months"
71
- },
72
- xMonths: {
73
- one: "1 month",
74
- other: "{{count}} months"
75
- },
76
- aboutXYears: {
77
- one: "about 1 year",
78
- other: "about {{count}} years"
79
- },
80
- xYears: {
81
- one: "1 year",
82
- other: "{{count}} years"
83
- },
84
- overXYears: {
85
- one: "over 1 year",
86
- other: "over {{count}} years"
87
- },
88
- almostXYears: {
89
- one: "almost 1 year",
90
- other: "almost {{count}} years"
91
- }
92
- }, L = (t, e, n) => {
93
- let r;
94
- const a = X[t];
95
- return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
96
- };
97
- function k(t) {
98
- return (e = {}) => {
99
- const n = e.width ? String(e.width) : t.defaultWidth;
100
- return t.formats[n] || t.formats[t.defaultWidth];
101
- };
102
- }
103
- const G = {
104
- full: "EEEE, MMMM do, y",
105
- long: "MMMM do, y",
106
- medium: "MMM d, y",
107
- short: "MM/dd/yyyy"
108
- }, _ = {
109
- full: "h:mm:ss a zzzz",
110
- long: "h:mm:ss a z",
111
- medium: "h:mm:ss a",
112
- short: "h:mm a"
113
- }, B = {
114
- full: "{{date}} 'at' {{time}}",
115
- long: "{{date}} 'at' {{time}}",
116
- medium: "{{date}}, {{time}}",
117
- short: "{{date}}, {{time}}"
118
- }, R = {
119
- date: k({
120
- formats: G,
121
- defaultWidth: "full"
122
- }),
123
- time: k({
124
- formats: _,
125
- defaultWidth: "full"
126
- }),
127
- dateTime: k({
128
- formats: B,
129
- defaultWidth: "full"
130
- })
131
- }, A = {
132
- lastWeek: "'last' eeee 'at' p",
133
- yesterday: "'yesterday at' p",
134
- today: "'today at' p",
135
- tomorrow: "'tomorrow at' p",
136
- nextWeek: "eeee 'at' p",
137
- other: "P"
138
- }, V = (t, e, n, r) => A[t];
139
- function b(t) {
140
- return (e, n) => {
141
- const r = n?.context ? String(n.context) : "standalone";
142
- let a;
143
- if (r === "formatting" && t.formattingValues) {
144
- const s = t.defaultFormattingWidth || t.defaultWidth, c = n?.width ? String(n.width) : s;
145
- a = t.formattingValues[c] || t.formattingValues[s];
146
- } else {
147
- const s = t.defaultWidth, c = n?.width ? String(n.width) : t.defaultWidth;
148
- a = t.values[c] || t.values[s];
149
- }
150
- const o = t.argumentCallback ? t.argumentCallback(e) : e;
151
- return a[o];
152
- };
153
- }
154
- const j = {
155
- narrow: ["B", "A"],
156
- abbreviated: ["BC", "AD"],
157
- wide: ["Before Christ", "Anno Domini"]
158
- }, I = {
159
- narrow: ["1", "2", "3", "4"],
160
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
161
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
162
- }, J = {
163
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
164
- abbreviated: [
165
- "Jan",
166
- "Feb",
167
- "Mar",
168
- "Apr",
169
- "May",
170
- "Jun",
171
- "Jul",
172
- "Aug",
173
- "Sep",
174
- "Oct",
175
- "Nov",
176
- "Dec"
177
- ],
178
- wide: [
179
- "January",
180
- "February",
181
- "March",
182
- "April",
183
- "May",
184
- "June",
185
- "July",
186
- "August",
187
- "September",
188
- "October",
189
- "November",
190
- "December"
191
- ]
192
- }, $ = {
193
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
194
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
195
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
196
- wide: [
197
- "Sunday",
198
- "Monday",
199
- "Tuesday",
200
- "Wednesday",
201
- "Thursday",
202
- "Friday",
203
- "Saturday"
204
- ]
205
- }, K = {
206
- narrow: {
207
- am: "a",
208
- pm: "p",
209
- midnight: "mi",
210
- noon: "n",
211
- morning: "morning",
212
- afternoon: "afternoon",
213
- evening: "evening",
214
- night: "night"
215
- },
216
- abbreviated: {
217
- am: "AM",
218
- pm: "PM",
219
- midnight: "midnight",
220
- noon: "noon",
221
- morning: "morning",
222
- afternoon: "afternoon",
223
- evening: "evening",
224
- night: "night"
225
- },
226
- wide: {
227
- am: "a.m.",
228
- pm: "p.m.",
229
- midnight: "midnight",
230
- noon: "noon",
231
- morning: "morning",
232
- afternoon: "afternoon",
233
- evening: "evening",
234
- night: "night"
235
- }
236
- }, U = {
237
- narrow: {
238
- am: "a",
239
- pm: "p",
240
- midnight: "mi",
241
- noon: "n",
242
- morning: "in the morning",
243
- afternoon: "in the afternoon",
244
- evening: "in the evening",
245
- night: "at night"
246
- },
247
- abbreviated: {
248
- am: "AM",
249
- pm: "PM",
250
- midnight: "midnight",
251
- noon: "noon",
252
- morning: "in the morning",
253
- afternoon: "in the afternoon",
254
- evening: "in the evening",
255
- night: "at night"
256
- },
257
- wide: {
258
- am: "a.m.",
259
- pm: "p.m.",
260
- midnight: "midnight",
261
- noon: "noon",
262
- morning: "in the morning",
263
- afternoon: "in the afternoon",
264
- evening: "in the evening",
265
- night: "at night"
266
- }
267
- }, z = (t, e) => {
268
- const n = Number(t), r = n % 100;
269
- if (r > 20 || r < 10)
270
- switch (r % 10) {
271
- case 1:
272
- return n + "st";
273
- case 2:
274
- return n + "nd";
275
- case 3:
276
- return n + "rd";
277
- }
278
- return n + "th";
279
- }, Z = {
280
- ordinalNumber: z,
281
- era: b({
282
- values: j,
283
- defaultWidth: "wide"
284
- }),
285
- quarter: b({
286
- values: I,
287
- defaultWidth: "wide",
288
- argumentCallback: (t) => t - 1
289
- }),
290
- month: b({
291
- values: J,
292
- defaultWidth: "wide"
293
- }),
294
- day: b({
295
- values: $,
296
- defaultWidth: "wide"
297
- }),
298
- dayPeriod: b({
299
- values: K,
300
- defaultWidth: "wide",
301
- formattingValues: U,
302
- defaultFormattingWidth: "wide"
303
- })
304
- };
305
- function P(t) {
306
- return (e, n = {}) => {
307
- const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], o = e.match(a);
308
- if (!o)
309
- return null;
310
- const s = o[0], c = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], h = Array.isArray(c) ? et(c, (u) => u.test(s)) : (
311
- // [TODO] -- I challenge you to fix the type
312
- tt(c, (u) => u.test(s))
313
- );
314
- let f;
315
- f = t.valueCallback ? t.valueCallback(h) : h, f = n.valueCallback ? (
316
- // [TODO] -- I challenge you to fix the type
317
- n.valueCallback(f)
318
- ) : f;
319
- const d = e.slice(s.length);
320
- return { value: f, rest: d };
321
- };
322
- }
323
- function tt(t, e) {
324
- for (const n in t)
325
- if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
326
- return n;
327
- }
328
- function et(t, e) {
329
- for (let n = 0; n < t.length; n++)
330
- if (e(t[n]))
331
- return n;
332
- }
333
- function nt(t) {
334
- return (e, n = {}) => {
335
- const r = e.match(t.matchPattern);
336
- if (!r) return null;
337
- const a = r[0], o = e.match(t.parsePattern);
338
- if (!o) return null;
339
- let s = t.valueCallback ? t.valueCallback(o[0]) : o[0];
340
- s = n.valueCallback ? n.valueCallback(s) : s;
341
- const c = e.slice(a.length);
342
- return { value: s, rest: c };
343
- };
344
- }
345
- const rt = /^(\d+)(th|st|nd|rd)?/i, at = /\d+/i, ot = {
346
- narrow: /^(b|a)/i,
347
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
348
- wide: /^(before christ|before common era|anno domini|common era)/i
349
- }, it = {
350
- any: [/^b/i, /^(a|c)/i]
351
- }, st = {
352
- narrow: /^[1234]/i,
353
- abbreviated: /^q[1234]/i,
354
- wide: /^[1234](th|st|nd|rd)? quarter/i
355
- }, ut = {
356
- any: [/1/i, /2/i, /3/i, /4/i]
357
- }, ct = {
358
- narrow: /^[jfmasond]/i,
359
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
360
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
361
- }, dt = {
362
- narrow: [
363
- /^j/i,
364
- /^f/i,
365
- /^m/i,
366
- /^a/i,
367
- /^m/i,
368
- /^j/i,
369
- /^j/i,
370
- /^a/i,
371
- /^s/i,
372
- /^o/i,
373
- /^n/i,
374
- /^d/i
375
- ],
376
- any: [
377
- /^ja/i,
378
- /^f/i,
379
- /^mar/i,
380
- /^ap/i,
381
- /^may/i,
382
- /^jun/i,
383
- /^jul/i,
384
- /^au/i,
385
- /^s/i,
386
- /^o/i,
387
- /^n/i,
388
- /^d/i
389
- ]
390
- }, ht = {
391
- narrow: /^[smtwf]/i,
392
- short: /^(su|mo|tu|we|th|fr|sa)/i,
393
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
394
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
395
- }, ft = {
396
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
397
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
398
- }, mt = {
399
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
400
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
401
- }, lt = {
402
- any: {
403
- am: /^a/i,
404
- pm: /^p/i,
405
- midnight: /^mi/i,
406
- noon: /^no/i,
407
- morning: /morning/i,
408
- afternoon: /afternoon/i,
409
- evening: /evening/i,
410
- night: /night/i
411
- }
412
- }, gt = {
413
- ordinalNumber: nt({
414
- matchPattern: rt,
415
- parsePattern: at,
416
- valueCallback: (t) => parseInt(t, 10)
417
- }),
418
- era: P({
419
- matchPatterns: ot,
420
- defaultMatchWidth: "wide",
421
- parsePatterns: it,
422
- defaultParseWidth: "any"
423
- }),
424
- quarter: P({
425
- matchPatterns: st,
426
- defaultMatchWidth: "wide",
427
- parsePatterns: ut,
428
- defaultParseWidth: "any",
429
- valueCallback: (t) => t + 1
430
- }),
431
- month: P({
432
- matchPatterns: ct,
433
- defaultMatchWidth: "wide",
434
- parsePatterns: dt,
435
- defaultParseWidth: "any"
436
- }),
437
- day: P({
438
- matchPatterns: ht,
439
- defaultMatchWidth: "wide",
440
- parsePatterns: ft,
441
- defaultParseWidth: "any"
442
- }),
443
- dayPeriod: P({
444
- matchPatterns: mt,
445
- defaultMatchWidth: "any",
446
- parsePatterns: lt,
447
- defaultParseWidth: "any"
448
- })
449
- }, wt = {
450
- code: "en-US",
451
- formatDistance: L,
452
- formatLong: R,
453
- formatRelative: V,
454
- localize: Z,
455
- match: gt,
456
- options: {
457
- weekStartsOn: 0,
458
- firstWeekContainsDate: 1
459
- }
460
- };
461
- function yt(t, e) {
462
- const n = l(t, e?.in);
463
- return q(n, Q(n)) + 1;
464
- }
465
- function bt(t, e) {
466
- const n = l(t, e?.in), r = +M(n) - +H(n);
467
- return Math.round(r / D) + 1;
468
- }
469
- function E(t, e) {
470
- const n = l(t, e?.in), r = n.getFullYear(), a = O(), o = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, s = y(e?.in || t, 0);
471
- s.setFullYear(r + 1, 0, o), s.setHours(0, 0, 0, 0);
472
- const c = p(s, e), h = y(e?.in || t, 0);
473
- h.setFullYear(r, 0, o), h.setHours(0, 0, 0, 0);
474
- const f = p(h, e);
475
- return +n >= +c ? r + 1 : +n >= +f ? r : r - 1;
476
- }
477
- function Pt(t, e) {
478
- const n = O(), r = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = E(t, e), o = y(e?.in || t, 0);
479
- return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), p(o, e);
480
- }
481
- function pt(t, e) {
482
- const n = l(t, e?.in), r = +p(n, e) - +Pt(n, e);
483
- return Math.round(r / D) + 1;
484
- }
485
- function i(t, e) {
486
- const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
487
- return n + r;
488
- }
489
- const m = {
490
- // Year
491
- y(t, e) {
492
- const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
493
- return i(e === "yy" ? r % 100 : r, e.length);
494
- },
495
- // Month
496
- M(t, e) {
497
- const n = t.getMonth();
498
- return e === "M" ? String(n + 1) : i(n + 1, 2);
499
- },
500
- // Day of the month
501
- d(t, e) {
502
- return i(t.getDate(), e.length);
503
- },
504
- // AM or PM
505
- a(t, e) {
506
- const n = t.getHours() / 12 >= 1 ? "pm" : "am";
507
- switch (e) {
508
- case "a":
509
- case "aa":
510
- return n.toUpperCase();
511
- case "aaa":
512
- return n;
513
- case "aaaaa":
514
- return n[0];
515
- default:
516
- return n === "am" ? "a.m." : "p.m.";
517
- }
518
- },
519
- // Hour [1-12]
520
- h(t, e) {
521
- return i(t.getHours() % 12 || 12, e.length);
522
- },
523
- // Hour [0-23]
524
- H(t, e) {
525
- return i(t.getHours(), e.length);
526
- },
527
- // Minute
528
- m(t, e) {
529
- return i(t.getMinutes(), e.length);
530
- },
531
- // Second
532
- s(t, e) {
533
- return i(t.getSeconds(), e.length);
534
- },
535
- // Fraction of second
536
- S(t, e) {
537
- const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
538
- r * Math.pow(10, n - 3)
539
- );
540
- return i(a, e.length);
541
- }
542
- }, w = {
543
- midnight: "midnight",
544
- noon: "noon",
545
- morning: "morning",
546
- afternoon: "afternoon",
547
- evening: "evening",
548
- night: "night"
549
- }, x = {
550
- // Era
551
- G: function(t, e, n) {
552
- const r = t.getFullYear() > 0 ? 1 : 0;
553
- switch (e) {
554
- // AD, BC
555
- case "G":
556
- case "GG":
557
- case "GGG":
558
- return n.era(r, { width: "abbreviated" });
559
- // A, B
560
- case "GGGGG":
561
- return n.era(r, { width: "narrow" });
562
- default:
563
- return n.era(r, { width: "wide" });
564
- }
565
- },
566
- // Year
567
- y: function(t, e, n) {
568
- if (e === "yo") {
569
- const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
570
- return n.ordinalNumber(a, { unit: "year" });
571
- }
572
- return m.y(t, e);
573
- },
574
- // Local week-numbering year
575
- Y: function(t, e, n, r) {
576
- const a = E(t, r), o = a > 0 ? a : 1 - a;
577
- if (e === "YY") {
578
- const s = o % 100;
579
- return i(s, 2);
580
- }
581
- return e === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : i(o, e.length);
582
- },
583
- // ISO week-numbering year
584
- R: function(t, e) {
585
- const n = T(t);
586
- return i(n, e.length);
587
- },
588
- // Extended year. This is a single number designating the year of this calendar system.
589
- // The main difference between `y` and `u` localizers are B.C. years:
590
- // | Year | `y` | `u` |
591
- // |------|-----|-----|
592
- // | AC 1 | 1 | 1 |
593
- // | BC 1 | 1 | 0 |
594
- // | BC 2 | 2 | -1 |
595
- // Also `yy` always returns the last two digits of a year,
596
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
597
- u: function(t, e) {
598
- const n = t.getFullYear();
599
- return i(n, e.length);
600
- },
601
- // Quarter
602
- Q: function(t, e, n) {
603
- const r = Math.ceil((t.getMonth() + 1) / 3);
604
- switch (e) {
605
- // 1, 2, 3, 4
606
- case "Q":
607
- return String(r);
608
- // 01, 02, 03, 04
609
- case "QQ":
610
- return i(r, 2);
611
- // 1st, 2nd, 3rd, 4th
612
- case "Qo":
613
- return n.ordinalNumber(r, { unit: "quarter" });
614
- // Q1, Q2, Q3, Q4
615
- case "QQQ":
616
- return n.quarter(r, {
617
- width: "abbreviated",
618
- context: "formatting"
619
- });
620
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
621
- case "QQQQQ":
622
- return n.quarter(r, {
623
- width: "narrow",
624
- context: "formatting"
625
- });
626
- default:
627
- return n.quarter(r, {
628
- width: "wide",
629
- context: "formatting"
630
- });
631
- }
632
- },
633
- // Stand-alone quarter
634
- q: function(t, e, n) {
635
- const r = Math.ceil((t.getMonth() + 1) / 3);
636
- switch (e) {
637
- // 1, 2, 3, 4
638
- case "q":
639
- return String(r);
640
- // 01, 02, 03, 04
641
- case "qq":
642
- return i(r, 2);
643
- // 1st, 2nd, 3rd, 4th
644
- case "qo":
645
- return n.ordinalNumber(r, { unit: "quarter" });
646
- // Q1, Q2, Q3, Q4
647
- case "qqq":
648
- return n.quarter(r, {
649
- width: "abbreviated",
650
- context: "standalone"
651
- });
652
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
653
- case "qqqqq":
654
- return n.quarter(r, {
655
- width: "narrow",
656
- context: "standalone"
657
- });
658
- default:
659
- return n.quarter(r, {
660
- width: "wide",
661
- context: "standalone"
662
- });
663
- }
664
- },
665
- // Month
666
- M: function(t, e, n) {
667
- const r = t.getMonth();
668
- switch (e) {
669
- case "M":
670
- case "MM":
671
- return m.M(t, e);
672
- // 1st, 2nd, ..., 12th
673
- case "Mo":
674
- return n.ordinalNumber(r + 1, { unit: "month" });
675
- // Jan, Feb, ..., Dec
676
- case "MMM":
677
- return n.month(r, {
678
- width: "abbreviated",
679
- context: "formatting"
680
- });
681
- // J, F, ..., D
682
- case "MMMMM":
683
- return n.month(r, {
684
- width: "narrow",
685
- context: "formatting"
686
- });
687
- default:
688
- return n.month(r, { width: "wide", context: "formatting" });
689
- }
690
- },
691
- // Stand-alone month
692
- L: function(t, e, n) {
693
- const r = t.getMonth();
694
- switch (e) {
695
- // 1, 2, ..., 12
696
- case "L":
697
- return String(r + 1);
698
- // 01, 02, ..., 12
699
- case "LL":
700
- return i(r + 1, 2);
701
- // 1st, 2nd, ..., 12th
702
- case "Lo":
703
- return n.ordinalNumber(r + 1, { unit: "month" });
704
- // Jan, Feb, ..., Dec
705
- case "LLL":
706
- return n.month(r, {
707
- width: "abbreviated",
708
- context: "standalone"
709
- });
710
- // J, F, ..., D
711
- case "LLLLL":
712
- return n.month(r, {
713
- width: "narrow",
714
- context: "standalone"
715
- });
716
- default:
717
- return n.month(r, { width: "wide", context: "standalone" });
718
- }
719
- },
720
- // Local week of year
721
- w: function(t, e, n, r) {
722
- const a = pt(t, r);
723
- return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : i(a, e.length);
724
- },
725
- // ISO week of year
726
- I: function(t, e, n) {
727
- const r = bt(t);
728
- return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : i(r, e.length);
729
- },
730
- // Day of the month
731
- d: function(t, e, n) {
732
- return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : m.d(t, e);
733
- },
734
- // Day of year
735
- D: function(t, e, n) {
736
- const r = yt(t);
737
- return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : i(r, e.length);
738
- },
739
- // Day of week
740
- E: function(t, e, n) {
741
- const r = t.getDay();
742
- switch (e) {
743
- // Tue
744
- case "E":
745
- case "EE":
746
- case "EEE":
747
- return n.day(r, {
748
- width: "abbreviated",
749
- context: "formatting"
750
- });
751
- // T
752
- case "EEEEE":
753
- return n.day(r, {
754
- width: "narrow",
755
- context: "formatting"
756
- });
757
- // Tu
758
- case "EEEEEE":
759
- return n.day(r, {
760
- width: "short",
761
- context: "formatting"
762
- });
763
- default:
764
- return n.day(r, {
765
- width: "wide",
766
- context: "formatting"
767
- });
768
- }
769
- },
770
- // Local day of week
771
- e: function(t, e, n, r) {
772
- const a = t.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
773
- switch (e) {
774
- // Numerical value (Nth day of week with current locale or weekStartsOn)
775
- case "e":
776
- return String(o);
777
- // Padded numerical value
778
- case "ee":
779
- return i(o, 2);
780
- // 1st, 2nd, ..., 7th
781
- case "eo":
782
- return n.ordinalNumber(o, { unit: "day" });
783
- case "eee":
784
- return n.day(a, {
785
- width: "abbreviated",
786
- context: "formatting"
787
- });
788
- // T
789
- case "eeeee":
790
- return n.day(a, {
791
- width: "narrow",
792
- context: "formatting"
793
- });
794
- // Tu
795
- case "eeeeee":
796
- return n.day(a, {
797
- width: "short",
798
- context: "formatting"
799
- });
800
- default:
801
- return n.day(a, {
802
- width: "wide",
803
- context: "formatting"
804
- });
805
- }
806
- },
807
- // Stand-alone local day of week
808
- c: function(t, e, n, r) {
809
- const a = t.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
810
- switch (e) {
811
- // Numerical value (same as in `e`)
812
- case "c":
813
- return String(o);
814
- // Padded numerical value
815
- case "cc":
816
- return i(o, e.length);
817
- // 1st, 2nd, ..., 7th
818
- case "co":
819
- return n.ordinalNumber(o, { unit: "day" });
820
- case "ccc":
821
- return n.day(a, {
822
- width: "abbreviated",
823
- context: "standalone"
824
- });
825
- // T
826
- case "ccccc":
827
- return n.day(a, {
828
- width: "narrow",
829
- context: "standalone"
830
- });
831
- // Tu
832
- case "cccccc":
833
- return n.day(a, {
834
- width: "short",
835
- context: "standalone"
836
- });
837
- default:
838
- return n.day(a, {
839
- width: "wide",
840
- context: "standalone"
841
- });
842
- }
843
- },
844
- // ISO day of week
845
- i: function(t, e, n) {
846
- const r = t.getDay(), a = r === 0 ? 7 : r;
847
- switch (e) {
848
- // 2
849
- case "i":
850
- return String(a);
851
- // 02
852
- case "ii":
853
- return i(a, e.length);
854
- // 2nd
855
- case "io":
856
- return n.ordinalNumber(a, { unit: "day" });
857
- // Tue
858
- case "iii":
859
- return n.day(r, {
860
- width: "abbreviated",
861
- context: "formatting"
862
- });
863
- // T
864
- case "iiiii":
865
- return n.day(r, {
866
- width: "narrow",
867
- context: "formatting"
868
- });
869
- // Tu
870
- case "iiiiii":
871
- return n.day(r, {
872
- width: "short",
873
- context: "formatting"
874
- });
875
- default:
876
- return n.day(r, {
877
- width: "wide",
878
- context: "formatting"
879
- });
880
- }
881
- },
882
- // AM or PM
883
- a: function(t, e, n) {
884
- const a = t.getHours() / 12 >= 1 ? "pm" : "am";
885
- switch (e) {
886
- case "a":
887
- case "aa":
888
- return n.dayPeriod(a, {
889
- width: "abbreviated",
890
- context: "formatting"
891
- });
892
- case "aaa":
893
- return n.dayPeriod(a, {
894
- width: "abbreviated",
895
- context: "formatting"
896
- }).toLowerCase();
897
- case "aaaaa":
898
- return n.dayPeriod(a, {
899
- width: "narrow",
900
- context: "formatting"
901
- });
902
- default:
903
- return n.dayPeriod(a, {
904
- width: "wide",
905
- context: "formatting"
906
- });
907
- }
908
- },
909
- // AM, PM, midnight, noon
910
- b: function(t, e, n) {
911
- const r = t.getHours();
912
- let a;
913
- switch (r === 12 ? a = w.noon : r === 0 ? a = w.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
914
- case "b":
915
- case "bb":
916
- return n.dayPeriod(a, {
917
- width: "abbreviated",
918
- context: "formatting"
919
- });
920
- case "bbb":
921
- return n.dayPeriod(a, {
922
- width: "abbreviated",
923
- context: "formatting"
924
- }).toLowerCase();
925
- case "bbbbb":
926
- return n.dayPeriod(a, {
927
- width: "narrow",
928
- context: "formatting"
929
- });
930
- default:
931
- return n.dayPeriod(a, {
932
- width: "wide",
933
- context: "formatting"
934
- });
935
- }
936
- },
937
- // in the morning, in the afternoon, in the evening, at night
938
- B: function(t, e, n) {
939
- const r = t.getHours();
940
- let a;
941
- switch (r >= 17 ? a = w.evening : r >= 12 ? a = w.afternoon : r >= 4 ? a = w.morning : a = w.night, e) {
942
- case "B":
943
- case "BB":
944
- case "BBB":
945
- return n.dayPeriod(a, {
946
- width: "abbreviated",
947
- context: "formatting"
948
- });
949
- case "BBBBB":
950
- return n.dayPeriod(a, {
951
- width: "narrow",
952
- context: "formatting"
953
- });
954
- default:
955
- return n.dayPeriod(a, {
956
- width: "wide",
957
- context: "formatting"
958
- });
959
- }
960
- },
961
- // Hour [1-12]
962
- h: function(t, e, n) {
963
- if (e === "ho") {
964
- let r = t.getHours() % 12;
965
- return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
966
- }
967
- return m.h(t, e);
968
- },
969
- // Hour [0-23]
970
- H: function(t, e, n) {
971
- return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : m.H(t, e);
972
- },
973
- // Hour [0-11]
974
- K: function(t, e, n) {
975
- const r = t.getHours() % 12;
976
- return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : i(r, e.length);
977
- },
978
- // Hour [1-24]
979
- k: function(t, e, n) {
980
- let r = t.getHours();
981
- return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : i(r, e.length);
982
- },
983
- // Minute
984
- m: function(t, e, n) {
985
- return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : m.m(t, e);
986
- },
987
- // Second
988
- s: function(t, e, n) {
989
- return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : m.s(t, e);
990
- },
991
- // Fraction of second
992
- S: function(t, e) {
993
- return m.S(t, e);
994
- },
995
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
996
- X: function(t, e, n) {
997
- const r = t.getTimezoneOffset();
998
- if (r === 0)
999
- return "Z";
1000
- switch (e) {
1001
- // Hours and optional minutes
1002
- case "X":
1003
- return S(r);
1004
- // Hours, minutes and optional seconds without `:` delimiter
1005
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1006
- // so this token always has the same output as `XX`
1007
- case "XXXX":
1008
- case "XX":
1009
- return g(r);
1010
- // Hours and minutes with `:` delimiter
1011
- default:
1012
- return g(r, ":");
1013
- }
1014
- },
1015
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1016
- x: function(t, e, n) {
1017
- const r = t.getTimezoneOffset();
1018
- switch (e) {
1019
- // Hours and optional minutes
1020
- case "x":
1021
- return S(r);
1022
- // Hours, minutes and optional seconds without `:` delimiter
1023
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1024
- // so this token always has the same output as `xx`
1025
- case "xxxx":
1026
- case "xx":
1027
- return g(r);
1028
- // Hours and minutes with `:` delimiter
1029
- default:
1030
- return g(r, ":");
1031
- }
1032
- },
1033
- // Timezone (GMT)
1034
- O: function(t, e, n) {
1035
- const r = t.getTimezoneOffset();
1036
- switch (e) {
1037
- // Short
1038
- case "O":
1039
- case "OO":
1040
- case "OOO":
1041
- return "GMT" + W(r, ":");
1042
- default:
1043
- return "GMT" + g(r, ":");
1044
- }
1045
- },
1046
- // Timezone (specific non-location)
1047
- z: function(t, e, n) {
1048
- const r = t.getTimezoneOffset();
1049
- switch (e) {
1050
- // Short
1051
- case "z":
1052
- case "zz":
1053
- case "zzz":
1054
- return "GMT" + W(r, ":");
1055
- default:
1056
- return "GMT" + g(r, ":");
1057
- }
1058
- },
1059
- // Seconds timestamp
1060
- t: function(t, e, n) {
1061
- const r = Math.trunc(+t / 1e3);
1062
- return i(r, e.length);
1063
- },
1064
- // Milliseconds timestamp
1065
- T: function(t, e, n) {
1066
- return i(+t, e.length);
1067
- }
1068
- };
1069
- function W(t, e = "") {
1070
- const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), o = r % 60;
1071
- return o === 0 ? n + String(a) : n + String(a) + e + i(o, 2);
1072
- }
1073
- function S(t, e) {
1074
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + i(Math.abs(t) / 60, 2) : g(t, e);
1075
- }
1076
- function g(t, e = "") {
1077
- const n = t > 0 ? "-" : "+", r = Math.abs(t), a = i(Math.trunc(r / 60), 2), o = i(r % 60, 2);
1078
- return n + a + e + o;
1079
- }
1080
- const Y = (t, e) => {
1081
- switch (t) {
1082
- case "P":
1083
- return e.date({ width: "short" });
1084
- case "PP":
1085
- return e.date({ width: "medium" });
1086
- case "PPP":
1087
- return e.date({ width: "long" });
1088
- default:
1089
- return e.date({ width: "full" });
1090
- }
1091
- }, F = (t, e) => {
1092
- switch (t) {
1093
- case "p":
1094
- return e.time({ width: "short" });
1095
- case "pp":
1096
- return e.time({ width: "medium" });
1097
- case "ppp":
1098
- return e.time({ width: "long" });
1099
- default:
1100
- return e.time({ width: "full" });
1101
- }
1102
- }, Mt = (t, e) => {
1103
- const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1104
- if (!a)
1105
- return Y(t, e);
1106
- let o;
1107
- switch (r) {
1108
- case "P":
1109
- o = e.dateTime({ width: "short" });
1110
- break;
1111
- case "PP":
1112
- o = e.dateTime({ width: "medium" });
1113
- break;
1114
- case "PPP":
1115
- o = e.dateTime({ width: "long" });
1116
- break;
1117
- default:
1118
- o = e.dateTime({ width: "full" });
1119
- break;
1120
- }
1121
- return o.replace("{{date}}", Y(r, e)).replace("{{time}}", F(a, e));
1122
- }, Ot = {
1123
- p: F,
1124
- P: Mt
1125
- }, vt = /^D+$/, kt = /^Y+$/, xt = ["D", "DD", "YY", "YYYY"];
1126
- function Wt(t) {
1127
- return vt.test(t);
1128
- }
1129
- function St(t) {
1130
- return kt.test(t);
1131
- }
1132
- function Yt(t, e, n) {
1133
- const r = Dt(t, e, n);
1134
- if (console.warn(r), xt.includes(t)) throw new RangeError(r);
1135
- }
1136
- function Dt(t, e, n) {
1137
- const r = t[0] === "Y" ? "years" : "days of the month";
1138
- return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1139
- }
1140
- const Tt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Et = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ft = /^'([^]*?)'?$/, qt = /''/g, Ct = /[a-zA-Z]/;
1141
- function Xt(t, e, n) {
1142
- const r = O(), a = r.locale ?? wt, o = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, c = l(t, n?.in);
1143
- if (!C(c))
1144
- throw new RangeError("Invalid time value");
1145
- let h = e.match(Et).map((d) => {
1146
- const u = d[0];
1147
- if (u === "p" || u === "P") {
1148
- const v = Ot[u];
1149
- return v(d, a.formatLong);
1150
- }
1151
- return d;
1152
- }).join("").match(Tt).map((d) => {
1153
- if (d === "''")
1154
- return { isToken: !1, value: "'" };
1155
- const u = d[0];
1156
- if (u === "'")
1157
- return { isToken: !1, value: Nt(d) };
1158
- if (x[u])
1159
- return { isToken: !0, value: d };
1160
- if (u.match(Ct))
1161
- throw new RangeError(
1162
- "Format string contains an unescaped latin alphabet character `" + u + "`"
1163
- );
1164
- return { isToken: !1, value: d };
1165
- });
1166
- a.localize.preprocessor && (h = a.localize.preprocessor(c, h));
1167
- const f = {
1168
- firstWeekContainsDate: o,
1169
- weekStartsOn: s,
1170
- locale: a
1171
- };
1172
- return h.map((d) => {
1173
- if (!d.isToken) return d.value;
1174
- const u = d.value;
1175
- (St(u) || Wt(u)) && Yt(u, e, String(t));
1176
- const v = x[u[0]];
1177
- return v(c, u, a.localize, f);
1178
- }).join("");
1179
- }
1180
- function Nt(t) {
1181
- const e = t.match(Ft);
1182
- return e ? e[1].replace(qt, "'") : t;
1183
- }
1184
- export {
1185
- Xt as f
1186
- };