@sbb-esta/lyne-elements-experimental-dev 0.0.0 → 4.0.0-dev.1775550888

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 (331) hide show
  1. package/README.md +55 -0
  2. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +67 -0
  3. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +73 -0
  4. package/autocomplete-grid/autocomplete-grid-button.js +4 -0
  5. package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -0
  6. package/autocomplete-grid/autocomplete-grid-cell.js +4 -0
  7. package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +21 -0
  8. package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -0
  9. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -0
  10. package/autocomplete-grid/autocomplete-grid-option.js +4 -0
  11. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -0
  12. package/autocomplete-grid/autocomplete-grid-row.js +4 -0
  13. package/autocomplete-grid/autocomplete-grid.js +4 -0
  14. package/autocomplete-grid-cell.component-DkD9aFKc.js +24 -0
  15. package/autocomplete-grid-option.component-CtATJy7n.js +37 -0
  16. package/autocomplete-grid-row.component-6nJv5PMj.js +27 -0
  17. package/autocomplete-grid.js +10 -0
  18. package/autocomplete-grid.pure.js +7 -0
  19. package/core/datetime/date-helper.js +2 -0
  20. package/core/datetime.js +2 -0
  21. package/core/styles/core.scss +13 -0
  22. package/core/styles/lean-theme.scss +3 -0
  23. package/core/styles/off-brand-theme.scss +3 -0
  24. package/core/styles/safety-theme.scss +3 -0
  25. package/core/styles/standard-theme.scss +3 -0
  26. package/core/styles/theme.scss +5 -0
  27. package/core/timetable/access-leg-helper.js +96 -0
  28. package/core/timetable/timetable-helper.js +10 -0
  29. package/core/timetable/timetable-properties.js +0 -0
  30. package/core/timetable.js +4 -0
  31. package/core.css +13 -0
  32. package/custom-elements.json +8629 -0
  33. package/date-helper-CGproP5d.js +185 -0
  34. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +40 -0
  35. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -0
  36. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +120 -0
  37. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +32 -0
  38. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -0
  39. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +103 -0
  40. package/development/autocomplete-grid/autocomplete-grid-button.d.ts +2 -0
  41. package/development/autocomplete-grid/autocomplete-grid-button.d.ts.map +1 -0
  42. package/development/autocomplete-grid/autocomplete-grid-button.js +10 -0
  43. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts +19 -0
  44. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.d.ts.map +1 -0
  45. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -0
  46. package/development/autocomplete-grid/autocomplete-grid-cell.d.ts +2 -0
  47. package/development/autocomplete-grid/autocomplete-grid-cell.d.ts.map +1 -0
  48. package/development/autocomplete-grid/autocomplete-grid-cell.js +10 -0
  49. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts +20 -0
  50. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.d.ts.map +1 -0
  51. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +30 -0
  52. package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts +2 -0
  53. package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts.map +1 -0
  54. package/development/autocomplete-grid/autocomplete-grid-optgroup.js +10 -0
  55. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +27 -0
  56. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -0
  57. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -0
  58. package/development/autocomplete-grid/autocomplete-grid-option.d.ts +2 -0
  59. package/development/autocomplete-grid/autocomplete-grid-option.d.ts.map +1 -0
  60. package/development/autocomplete-grid/autocomplete-grid-option.js +10 -0
  61. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts +20 -0
  62. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.d.ts.map +1 -0
  63. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -0
  64. package/development/autocomplete-grid/autocomplete-grid-row.d.ts +2 -0
  65. package/development/autocomplete-grid/autocomplete-grid-row.d.ts.map +1 -0
  66. package/development/autocomplete-grid/autocomplete-grid-row.js +10 -0
  67. package/development/autocomplete-grid/autocomplete-grid.d.ts +2 -0
  68. package/development/autocomplete-grid/autocomplete-grid.d.ts.map +1 -0
  69. package/development/autocomplete-grid/autocomplete-grid.js +10 -0
  70. package/development/autocomplete-grid-cell.component-BxkWGaX0.js +34 -0
  71. package/development/autocomplete-grid-option.component-5mPGswUO.js +61 -0
  72. package/development/autocomplete-grid-row.component-DEm6zyHZ.js +39 -0
  73. package/development/autocomplete-grid.d.ts +2 -0
  74. package/development/autocomplete-grid.d.ts.map +1 -0
  75. package/development/autocomplete-grid.js +19 -0
  76. package/development/autocomplete-grid.pure.d.ts +8 -0
  77. package/development/autocomplete-grid.pure.d.ts.map +1 -0
  78. package/development/autocomplete-grid.pure.js +7 -0
  79. package/development/core/datetime/date-helper.d.ts +27 -0
  80. package/development/core/datetime/date-helper.d.ts.map +1 -0
  81. package/development/core/datetime/date-helper.js +2 -0
  82. package/development/core/datetime.d.ts +3 -0
  83. package/development/core/datetime.d.ts.map +1 -0
  84. package/development/core/datetime.js +2 -0
  85. package/development/core/timetable/access-leg-helper.d.ts +26 -0
  86. package/development/core/timetable/access-leg-helper.d.ts.map +1 -0
  87. package/development/core/timetable/access-leg-helper.js +147 -0
  88. package/development/core/timetable/timetable-helper.d.ts +12 -0
  89. package/development/core/timetable/timetable-helper.d.ts.map +1 -0
  90. package/development/core/timetable/timetable-helper.js +19 -0
  91. package/development/core/timetable/timetable-properties.d.ts +308 -0
  92. package/development/core/timetable/timetable-properties.d.ts.map +1 -0
  93. package/development/core/timetable/timetable-properties.js +0 -0
  94. package/development/core/timetable.d.ts +5 -0
  95. package/development/core/timetable.d.ts.map +1 -0
  96. package/development/core/timetable.js +4 -0
  97. package/development/date-helper-qNdwgC9O.js +520 -0
  98. package/development/differenceInMinutes-B7_GTDq7.js +110 -0
  99. package/development/format-DFx4997p.js +1848 -0
  100. package/development/isValid-JpZ7FphI.js +178 -0
  101. package/development/journey-summary/journey-summary.component.d.ts +67 -0
  102. package/development/journey-summary/journey-summary.component.d.ts.map +1 -0
  103. package/development/journey-summary/journey-summary.component.js +2 -0
  104. package/development/journey-summary.component-BZwgD4im.js +340 -0
  105. package/development/journey-summary.d.ts +2 -0
  106. package/development/journey-summary.d.ts.map +1 -0
  107. package/development/journey-summary.js +9 -0
  108. package/development/journey-summary.pure.d.ts +3 -0
  109. package/development/journey-summary.pure.d.ts.map +1 -0
  110. package/development/journey-summary.pure.js +2 -0
  111. package/development/mapper-hWWm7Uke.js +11454 -0
  112. package/development/pearl-chain/pearl-chain.component.d.ts +44 -0
  113. package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -0
  114. package/development/pearl-chain/pearl-chain.component.js +2 -0
  115. package/development/pearl-chain-time/pearl-chain-time.component.d.ts +49 -0
  116. package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -0
  117. package/development/pearl-chain-time/pearl-chain-time.component.js +2 -0
  118. package/development/pearl-chain-time.component-B2_BI6E_.js +319 -0
  119. package/development/pearl-chain-time.d.ts +2 -0
  120. package/development/pearl-chain-time.d.ts.map +1 -0
  121. package/development/pearl-chain-time.js +9 -0
  122. package/development/pearl-chain-time.pure.d.ts +3 -0
  123. package/development/pearl-chain-time.pure.d.ts.map +1 -0
  124. package/development/pearl-chain-time.pure.js +2 -0
  125. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts +18 -0
  126. package/development/pearl-chain-vertical/pearl-chain-vertical.component.d.ts.map +1 -0
  127. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -0
  128. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts +36 -0
  129. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.d.ts.map +1 -0
  130. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -0
  131. package/development/pearl-chain-vertical-item.component-DcmH13Vb.js +133 -0
  132. package/development/pearl-chain-vertical-item.d.ts +2 -0
  133. package/development/pearl-chain-vertical-item.d.ts.map +1 -0
  134. package/development/pearl-chain-vertical-item.js +9 -0
  135. package/development/pearl-chain-vertical-item.pure.d.ts +3 -0
  136. package/development/pearl-chain-vertical-item.pure.d.ts.map +1 -0
  137. package/development/pearl-chain-vertical-item.pure.js +2 -0
  138. package/development/pearl-chain-vertical.component-CpcNFl-x.js +31 -0
  139. package/development/pearl-chain-vertical.d.ts +2 -0
  140. package/development/pearl-chain-vertical.d.ts.map +1 -0
  141. package/development/pearl-chain-vertical.js +9 -0
  142. package/development/pearl-chain-vertical.pure.d.ts +3 -0
  143. package/development/pearl-chain-vertical.pure.d.ts.map +1 -0
  144. package/development/pearl-chain-vertical.pure.js +2 -0
  145. package/development/pearl-chain.component-oQZUzsyW.js +316 -0
  146. package/development/pearl-chain.d.ts +2 -0
  147. package/development/pearl-chain.d.ts.map +1 -0
  148. package/development/pearl-chain.js +9 -0
  149. package/development/pearl-chain.pure.d.ts +3 -0
  150. package/development/pearl-chain.pure.d.ts.map +1 -0
  151. package/development/pearl-chain.pure.js +2 -0
  152. package/development/seat-reservation/common/mapper/icon-mapper.d.ts +106 -0
  153. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -0
  154. package/development/seat-reservation/common/mapper/icon-mapper.js +170 -0
  155. package/development/seat-reservation/common/mapper/mapper.d.ts +34 -0
  156. package/development/seat-reservation/common/mapper/mapper.d.ts.map +1 -0
  157. package/development/seat-reservation/common/mapper/mapper.js +2 -0
  158. package/development/seat-reservation/common/mapper.d.ts +3 -0
  159. package/development/seat-reservation/common/mapper.d.ts.map +1 -0
  160. package/development/seat-reservation/common/mapper.js +3 -0
  161. package/development/seat-reservation/common/svgs.d.ts +24 -0
  162. package/development/seat-reservation/common/svgs.d.ts.map +1 -0
  163. package/development/seat-reservation/common/svgs.js +2 -0
  164. package/development/seat-reservation/common/translations/i18n.d.ts +28 -0
  165. package/development/seat-reservation/common/translations/i18n.d.ts.map +1 -0
  166. package/development/seat-reservation/common/translations/i18n.js +1120 -0
  167. package/development/seat-reservation/common/translations.d.ts +2 -0
  168. package/development/seat-reservation/common/translations.d.ts.map +1 -0
  169. package/development/seat-reservation/common/translations.js +2 -0
  170. package/development/seat-reservation/common/types.d.ts +102 -0
  171. package/development/seat-reservation/common/types.d.ts.map +1 -0
  172. package/development/seat-reservation/common/types.js +0 -0
  173. package/development/seat-reservation/common.d.ts +6 -0
  174. package/development/seat-reservation/common.d.ts.map +1 -0
  175. package/development/seat-reservation/common.js +12 -0
  176. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +294 -0
  177. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -0
  178. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1350 -0
  179. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts +77 -0
  180. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -0
  181. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -0
  182. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts +20 -0
  183. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.d.ts.map +1 -0
  184. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -0
  185. package/development/seat-reservation/seat-reservation-area.d.ts +2 -0
  186. package/development/seat-reservation/seat-reservation-area.d.ts.map +1 -0
  187. package/development/seat-reservation/seat-reservation-area.js +10 -0
  188. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts +9 -0
  189. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -0
  190. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +306 -0
  191. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts +22 -0
  192. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.d.ts.map +1 -0
  193. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -0
  194. package/development/seat-reservation/seat-reservation-graphic.d.ts +2 -0
  195. package/development/seat-reservation/seat-reservation-graphic.d.ts.map +1 -0
  196. package/development/seat-reservation/seat-reservation-graphic.js +10 -0
  197. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +56 -0
  198. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -0
  199. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -0
  200. package/development/seat-reservation/seat-reservation-navigation-coach.d.ts +2 -0
  201. package/development/seat-reservation/seat-reservation-navigation-coach.d.ts.map +1 -0
  202. package/development/seat-reservation/seat-reservation-navigation-coach.js +10 -0
  203. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts +25 -0
  204. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -0
  205. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -0
  206. package/development/seat-reservation/seat-reservation-navigation-services.d.ts +2 -0
  207. package/development/seat-reservation/seat-reservation-navigation-services.d.ts.map +1 -0
  208. package/development/seat-reservation/seat-reservation-navigation-services.js +10 -0
  209. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts +49 -0
  210. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -0
  211. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -0
  212. package/development/seat-reservation/seat-reservation-place-control.d.ts +2 -0
  213. package/development/seat-reservation/seat-reservation-place-control.d.ts.map +1 -0
  214. package/development/seat-reservation/seat-reservation-place-control.js +10 -0
  215. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts +16 -0
  216. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.d.ts.map +1 -0
  217. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -0
  218. package/development/seat-reservation/seat-reservation-scoped.d.ts +2 -0
  219. package/development/seat-reservation/seat-reservation-scoped.d.ts.map +1 -0
  220. package/development/seat-reservation/seat-reservation-scoped.js +10 -0
  221. package/development/seat-reservation/seat-reservation.d.ts +3 -0
  222. package/development/seat-reservation/seat-reservation.d.ts.map +1 -0
  223. package/development/seat-reservation/seat-reservation.js +11 -0
  224. package/development/seat-reservation-area.component-DbeuTnXT.js +96 -0
  225. package/development/seat-reservation-graphic.component-DlrHtlia.js +129 -0
  226. package/development/seat-reservation-navigation-coach.component-CjoDkcVU.js +428 -0
  227. package/development/seat-reservation-navigation-services.component-CGel7__P.js +159 -0
  228. package/development/seat-reservation-place-control.component-CM9efId7.js +429 -0
  229. package/development/seat-reservation-scoped.component-CFA_bJ3o.js +25 -0
  230. package/development/seat-reservation.component-DFJVFmrI.js +510 -0
  231. package/development/seat-reservation.d.ts +2 -0
  232. package/development/seat-reservation.d.ts.map +1 -0
  233. package/development/seat-reservation.js +27 -0
  234. package/development/seat-reservation.pure.d.ts +15 -0
  235. package/development/seat-reservation.pure.d.ts.map +1 -0
  236. package/development/seat-reservation.pure.js +15 -0
  237. package/development/svgs-kDpBCto5.js +28 -0
  238. package/development/timetable-duration/timetable-duration.component.d.ts +24 -0
  239. package/development/timetable-duration/timetable-duration.component.d.ts.map +1 -0
  240. package/development/timetable-duration/timetable-duration.component.js +2 -0
  241. package/development/timetable-duration.component-BhFlqYbV.js +100 -0
  242. package/development/timetable-duration.d.ts +2 -0
  243. package/development/timetable-duration.d.ts.map +1 -0
  244. package/development/timetable-duration.js +9 -0
  245. package/development/timetable-duration.pure.d.ts +3 -0
  246. package/development/timetable-duration.pure.d.ts.map +1 -0
  247. package/development/timetable-duration.pure.js +2 -0
  248. package/development/timetable-row/timetable-row.component.d.ts +89 -0
  249. package/development/timetable-row/timetable-row.component.d.ts.map +1 -0
  250. package/development/timetable-row/timetable-row.component.js +2 -0
  251. package/development/timetable-row.component-Dko8laRT.js +729 -0
  252. package/development/timetable-row.d.ts +2 -0
  253. package/development/timetable-row.d.ts.map +1 -0
  254. package/development/timetable-row.js +9 -0
  255. package/development/timetable-row.pure.d.ts +3 -0
  256. package/development/timetable-row.pure.d.ts.map +1 -0
  257. package/development/timetable-row.pure.js +2 -0
  258. package/development/toDate-DOFAOjP-.js +150 -0
  259. package/differenceInMinutes-Dr9gRqtu.js +27 -0
  260. package/format-CM5exOsN.js +1103 -0
  261. package/index.d.ts +33 -0
  262. package/index.js +32 -0
  263. package/isValid-B9oVW3lA.js +36 -0
  264. package/journey-summary/journey-summary.component.js +2 -0
  265. package/journey-summary.component-DC7-qPHY.js +264 -0
  266. package/journey-summary.js +6 -0
  267. package/journey-summary.pure.js +2 -0
  268. package/mapper-DkiDDseD.js +11382 -0
  269. package/off-brand-theme.css +13 -0
  270. package/package.json +222 -1
  271. package/pearl-chain/pearl-chain.component.js +2 -0
  272. package/pearl-chain-time/pearl-chain-time.component.js +2 -0
  273. package/pearl-chain-time.component-CkKsrbgQ.js +239 -0
  274. package/pearl-chain-time.js +6 -0
  275. package/pearl-chain-time.pure.js +2 -0
  276. package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -0
  277. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -0
  278. package/pearl-chain-vertical-item.component-BUqZ-3Ay.js +108 -0
  279. package/pearl-chain-vertical-item.js +6 -0
  280. package/pearl-chain-vertical-item.pure.js +2 -0
  281. package/pearl-chain-vertical.component-Df9CvRxo.js +21 -0
  282. package/pearl-chain-vertical.js +6 -0
  283. package/pearl-chain-vertical.pure.js +2 -0
  284. package/pearl-chain.component-CpISVoAu.js +194 -0
  285. package/pearl-chain.js +6 -0
  286. package/pearl-chain.pure.js +2 -0
  287. package/safety-theme.css +13 -0
  288. package/seat-reservation/common/mapper/icon-mapper.js +72 -0
  289. package/seat-reservation/common/mapper/mapper.js +2 -0
  290. package/seat-reservation/common/mapper.js +3 -0
  291. package/seat-reservation/common/svgs.js +2 -0
  292. package/seat-reservation/common/translations/i18n.js +1085 -0
  293. package/seat-reservation/common/translations.js +2 -0
  294. package/seat-reservation/common/types.js +0 -0
  295. package/seat-reservation/common.js +9 -0
  296. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +861 -0
  297. package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -0
  298. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -0
  299. package/seat-reservation/seat-reservation-area.js +4 -0
  300. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +291 -0
  301. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -0
  302. package/seat-reservation/seat-reservation-graphic.js +4 -0
  303. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -0
  304. package/seat-reservation/seat-reservation-navigation-coach.js +4 -0
  305. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -0
  306. package/seat-reservation/seat-reservation-navigation-services.js +4 -0
  307. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -0
  308. package/seat-reservation/seat-reservation-place-control.js +4 -0
  309. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -0
  310. package/seat-reservation/seat-reservation-scoped.js +4 -0
  311. package/seat-reservation/seat-reservation.js +5 -0
  312. package/seat-reservation-area.component-CtYawDjE.js +75 -0
  313. package/seat-reservation-graphic.component-Cm_pVxaB.js +102 -0
  314. package/seat-reservation-navigation-coach.component-sug9IBTH.js +333 -0
  315. package/seat-reservation-navigation-services.component-C9dDYD_M.js +127 -0
  316. package/seat-reservation-place-control.component-CE7d9M2b.js +322 -0
  317. package/seat-reservation-scoped.component-DVyP2JGE.js +17 -0
  318. package/seat-reservation.component-DajC6fqU.js +367 -0
  319. package/seat-reservation.js +17 -0
  320. package/seat-reservation.pure.js +15 -0
  321. package/standard-theme.css +13 -0
  322. package/svgs-D5DhLHxC.js +26 -0
  323. package/timetable-duration/timetable-duration.component.js +2 -0
  324. package/timetable-duration.component-BnJA8wSb.js +65 -0
  325. package/timetable-duration.js +6 -0
  326. package/timetable-duration.pure.js +2 -0
  327. package/timetable-row/timetable-row.component.js +2 -0
  328. package/timetable-row.component-DbzBCpKR.js +559 -0
  329. package/timetable-row.js +6 -0
  330. package/timetable-row.pure.js +2 -0
  331. package/toDate-p-Tpkb7t.js +16 -0
@@ -0,0 +1,861 @@
1
+ import { __esDecorate as e, __runInitializers as t } from "tslib";
2
+ import { SbbElement as n } from "@sbb-esta/lyne-elements/core/base-elements.js";
3
+ import { forceType as r } from "@sbb-esta/lyne-elements/core/decorators.js";
4
+ import { isServer as i } from "lit";
5
+ import { isArrowKeyOrPageKeysPressed as a } from "@sbb-esta/lyne-elements/core/a11y.js";
6
+ import { eventOptions as ee, property as o, state as s } from "lit/decorators.js";
7
+ import { mapCoachInfosToCoachSelection as te, mapIconToSvg as c, mapPlaceAndCoachToSeatReservationPlaceSelection as ne, mapPlaceInfosToPlaceSelection as re } from "../common/mapper.js";
8
+ //#region src/elements-experimental/seat-reservation/seat-reservation/seat-reservation-base-element.ts
9
+ var l;
10
+ (function(e) {
11
+ e.right = "right", e.left = "left";
12
+ })(l ||= {});
13
+ var ie = 3, ae = [
14
+ "sa-vo",
15
+ "sa-rs",
16
+ "sa-abteilkinderwagen",
17
+ "sa-wr",
18
+ "sa-fa",
19
+ "sa-bz",
20
+ "sa-rz"
21
+ ], u = (() => {
22
+ let u = n, d = [], f, p = [], m = [], h, g = [], _ = [], v, y = [], b = [], x, S = [], C = [], w, T = [], E = [], D, O = [], oe = [], k, A = [], j = [], M, N = [], P = [], F, I = [], L = [], R, z = [], B = [], V, H = [], U = [], W, G = [], K = [], q, J = [], Y = [], X, Z = [], Q = [], $;
23
+ return class extends u {
24
+ static {
25
+ let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
26
+ f = [o({
27
+ attribute: "seat-reservations",
28
+ type: Array
29
+ })], h = [o({
30
+ attribute: "travel-direction",
31
+ type: String
32
+ })], v = [r(), o({
33
+ attribute: "has-navigation",
34
+ type: Boolean
35
+ })], x = [r(), o({
36
+ attribute: "align-vertical",
37
+ type: Boolean,
38
+ reflect: !0,
39
+ useDefault: !0
40
+ })], w = [r(), o({
41
+ attribute: "base-grid-size",
42
+ type: Number
43
+ })], D = [r(), o({
44
+ attribute: "height",
45
+ type: Number
46
+ })], k = [r(), o({
47
+ attribute: "max-seat-reservations",
48
+ type: Number
49
+ })], M = [r(), o({
50
+ attribute: "max-bicycle-reservations",
51
+ type: Number
52
+ })], F = [r(), o({
53
+ attribute: "prevent-place-click",
54
+ type: Boolean
55
+ })], R = [r(), o({
56
+ attribute: "preselect-coach-index",
57
+ type: Number
58
+ })], V = [r(), o({
59
+ attribute: "show-title-info",
60
+ type: Boolean
61
+ })], W = [s()], q = [s()], X = [s()], $ = [ee({ passive: !0 })], e(this, null, f, {
62
+ kind: "accessor",
63
+ name: "seatReservations",
64
+ static: !1,
65
+ private: !1,
66
+ access: {
67
+ has: (e) => "seatReservations" in e,
68
+ get: (e) => e.seatReservations,
69
+ set: (e, t) => {
70
+ e.seatReservations = t;
71
+ }
72
+ },
73
+ metadata: t
74
+ }, p, m), e(this, null, h, {
75
+ kind: "accessor",
76
+ name: "travelDirection",
77
+ static: !1,
78
+ private: !1,
79
+ access: {
80
+ has: (e) => "travelDirection" in e,
81
+ get: (e) => e.travelDirection,
82
+ set: (e, t) => {
83
+ e.travelDirection = t;
84
+ }
85
+ },
86
+ metadata: t
87
+ }, g, _), e(this, null, v, {
88
+ kind: "accessor",
89
+ name: "hasNavigation",
90
+ static: !1,
91
+ private: !1,
92
+ access: {
93
+ has: (e) => "hasNavigation" in e,
94
+ get: (e) => e.hasNavigation,
95
+ set: (e, t) => {
96
+ e.hasNavigation = t;
97
+ }
98
+ },
99
+ metadata: t
100
+ }, y, b), e(this, null, x, {
101
+ kind: "accessor",
102
+ name: "alignVertical",
103
+ static: !1,
104
+ private: !1,
105
+ access: {
106
+ has: (e) => "alignVertical" in e,
107
+ get: (e) => e.alignVertical,
108
+ set: (e, t) => {
109
+ e.alignVertical = t;
110
+ }
111
+ },
112
+ metadata: t
113
+ }, S, C), e(this, null, w, {
114
+ kind: "accessor",
115
+ name: "baseGridSize",
116
+ static: !1,
117
+ private: !1,
118
+ access: {
119
+ has: (e) => "baseGridSize" in e,
120
+ get: (e) => e.baseGridSize,
121
+ set: (e, t) => {
122
+ e.baseGridSize = t;
123
+ }
124
+ },
125
+ metadata: t
126
+ }, T, E), e(this, null, D, {
127
+ kind: "accessor",
128
+ name: "height",
129
+ static: !1,
130
+ private: !1,
131
+ access: {
132
+ has: (e) => "height" in e,
133
+ get: (e) => e.height,
134
+ set: (e, t) => {
135
+ e.height = t;
136
+ }
137
+ },
138
+ metadata: t
139
+ }, O, oe), e(this, null, k, {
140
+ kind: "accessor",
141
+ name: "maxSeatReservations",
142
+ static: !1,
143
+ private: !1,
144
+ access: {
145
+ has: (e) => "maxSeatReservations" in e,
146
+ get: (e) => e.maxSeatReservations,
147
+ set: (e, t) => {
148
+ e.maxSeatReservations = t;
149
+ }
150
+ },
151
+ metadata: t
152
+ }, A, j), e(this, null, M, {
153
+ kind: "accessor",
154
+ name: "maxBicycleReservations",
155
+ static: !1,
156
+ private: !1,
157
+ access: {
158
+ has: (e) => "maxBicycleReservations" in e,
159
+ get: (e) => e.maxBicycleReservations,
160
+ set: (e, t) => {
161
+ e.maxBicycleReservations = t;
162
+ }
163
+ },
164
+ metadata: t
165
+ }, N, P), e(this, null, F, {
166
+ kind: "accessor",
167
+ name: "preventPlaceClick",
168
+ static: !1,
169
+ private: !1,
170
+ access: {
171
+ has: (e) => "preventPlaceClick" in e,
172
+ get: (e) => e.preventPlaceClick,
173
+ set: (e, t) => {
174
+ e.preventPlaceClick = t;
175
+ }
176
+ },
177
+ metadata: t
178
+ }, I, L), e(this, null, R, {
179
+ kind: "accessor",
180
+ name: "preselectCoachIndex",
181
+ static: !1,
182
+ private: !1,
183
+ access: {
184
+ has: (e) => "preselectCoachIndex" in e,
185
+ get: (e) => e.preselectCoachIndex,
186
+ set: (e, t) => {
187
+ e.preselectCoachIndex = t;
188
+ }
189
+ },
190
+ metadata: t
191
+ }, z, B), e(this, null, V, {
192
+ kind: "accessor",
193
+ name: "showTitleInfo",
194
+ static: !1,
195
+ private: !1,
196
+ access: {
197
+ has: (e) => "showTitleInfo" in e,
198
+ get: (e) => e.showTitleInfo,
199
+ set: (e, t) => {
200
+ e.showTitleInfo = t;
201
+ }
202
+ },
203
+ metadata: t
204
+ }, H, U), e(this, null, W, {
205
+ kind: "accessor",
206
+ name: "selectedCoachIndex",
207
+ static: !1,
208
+ private: !1,
209
+ access: {
210
+ has: (e) => "selectedCoachIndex" in e,
211
+ get: (e) => e.selectedCoachIndex,
212
+ set: (e, t) => {
213
+ e.selectedCoachIndex = t;
214
+ }
215
+ },
216
+ metadata: t
217
+ }, G, K), e(this, null, q, {
218
+ kind: "accessor",
219
+ name: "focusedCoachIndex",
220
+ static: !1,
221
+ private: !1,
222
+ access: {
223
+ has: (e) => "focusedCoachIndex" in e,
224
+ get: (e) => e.focusedCoachIndex,
225
+ set: (e, t) => {
226
+ e.focusedCoachIndex = t;
227
+ }
228
+ },
229
+ metadata: t
230
+ }, J, Y), e(this, null, X, {
231
+ kind: "accessor",
232
+ name: "hoveredCoachIndex",
233
+ static: !1,
234
+ private: !1,
235
+ access: {
236
+ has: (e) => "hoveredCoachIndex" in e,
237
+ get: (e) => e.hoveredCoachIndex,
238
+ set: (e, t) => {
239
+ e.hoveredCoachIndex = t;
240
+ }
241
+ },
242
+ metadata: t
243
+ }, Z, Q), e(this, null, $, {
244
+ kind: "method",
245
+ name: "coachAreaScrollend",
246
+ static: !1,
247
+ private: !1,
248
+ access: {
249
+ has: (e) => "coachAreaScrollend" in e,
250
+ get: (e) => e.coachAreaScrollend
251
+ },
252
+ metadata: t
253
+ }, null, d), t && Object.defineProperty(this, Symbol.metadata, {
254
+ enumerable: !0,
255
+ configurable: !0,
256
+ writable: !0,
257
+ value: t
258
+ });
259
+ }
260
+ static {
261
+ this.events = {
262
+ selectedplaces: "selectedplaces",
263
+ selectedcoach: "selectedcoach"
264
+ };
265
+ }
266
+ #e;
267
+ get seatReservations() {
268
+ return this.#e;
269
+ }
270
+ set seatReservations(e) {
271
+ this.#e = e;
272
+ }
273
+ #t;
274
+ get travelDirection() {
275
+ return this.#t;
276
+ }
277
+ set travelDirection(e) {
278
+ this.#t = e;
279
+ }
280
+ #n;
281
+ get hasNavigation() {
282
+ return this.#n;
283
+ }
284
+ set hasNavigation(e) {
285
+ this.#n = e;
286
+ }
287
+ #r;
288
+ get alignVertical() {
289
+ return this.#r;
290
+ }
291
+ set alignVertical(e) {
292
+ this.#r = e;
293
+ }
294
+ #i;
295
+ get baseGridSize() {
296
+ return this.#i;
297
+ }
298
+ set baseGridSize(e) {
299
+ this.#i = e;
300
+ }
301
+ #a;
302
+ get height() {
303
+ return this.#a;
304
+ }
305
+ set height(e) {
306
+ this.#a = e;
307
+ }
308
+ #o;
309
+ get maxSeatReservations() {
310
+ return this.#o;
311
+ }
312
+ set maxSeatReservations(e) {
313
+ this.#o = e;
314
+ }
315
+ #s;
316
+ get maxBicycleReservations() {
317
+ return this.#s;
318
+ }
319
+ set maxBicycleReservations(e) {
320
+ this.#s = e;
321
+ }
322
+ #c;
323
+ get preventPlaceClick() {
324
+ return this.#c;
325
+ }
326
+ set preventPlaceClick(e) {
327
+ this.#c = e;
328
+ }
329
+ #l;
330
+ get preselectCoachIndex() {
331
+ return this.#l;
332
+ }
333
+ set preselectCoachIndex(e) {
334
+ this.#l = e;
335
+ }
336
+ #u;
337
+ get showTitleInfo() {
338
+ return this.#u;
339
+ }
340
+ set showTitleInfo(e) {
341
+ this.#u = e;
342
+ }
343
+ #d;
344
+ get selectedCoachIndex() {
345
+ return this.#d;
346
+ }
347
+ set selectedCoachIndex(e) {
348
+ this.#d = e;
349
+ }
350
+ #f;
351
+ get focusedCoachIndex() {
352
+ return this.#f;
353
+ }
354
+ set focusedCoachIndex(e) {
355
+ this.#f = e;
356
+ }
357
+ #p;
358
+ get hoveredCoachIndex() {
359
+ return this.#p;
360
+ }
361
+ set hoveredCoachIndex(e) {
362
+ this.#p = e;
363
+ }
364
+ constructor() {
365
+ super(), this.#e = (t(this, d), t(this, p, null)), this.#t = (t(this, m), t(this, g, "NONE")), this.#n = (t(this, _), t(this, y, !0)), this.#r = (t(this, b), t(this, S, !1)), this.#i = (t(this, C), t(this, T, 16)), this.#a = (t(this, E), t(this, O, null)), this.#o = (t(this, oe), t(this, A, -1)), this.#s = (t(this, j), t(this, N, -1)), this.#c = (t(this, P), t(this, I, !1)), this.#l = (t(this, L), t(this, z, -1)), this.#u = (t(this, B), t(this, H, !1)), this.#d = (t(this, U), t(this, G, -1)), this.#f = (t(this, K), t(this, J, -1)), this.#p = (t(this, Y), t(this, Z, -1)), this.coachBorderPadding = (t(this, Q), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.globalAreaIconDim = {
366
+ w: 2,
367
+ h: 2
368
+ }, this.globalAreaIconPadding = .8, this.coachItemDetailsElements = [], this.currScrollDirection = l.right, this.maxCalcCoachesWidth = 0, this.scrollCoachesAreaWidth = 0, this.scrollNavigationAreaDim = 0, this.triggerCoachPositionsCollection = [], this.navigationScrollArea = null, this.coachScrollArea = null, this.currSelectedPlace = null, this.currSelectedPlaceElementId = null, this.currSelectedCoachIndex = -1, this.currSelectedDeckIndex = 0, this.preventCoachScrollByPlaceClick = !1, this.selectedSeatReservationPlaces = {
369
+ seats: [],
370
+ bicycles: []
371
+ }, this.seatReservationWithoutNavigationHasFocus = !1, this.isCoachGridFocusable = !1, this.isAutoScrolling = !1, this.isKeyboardNavigation = !1, this.hasMultipleDecks = !1, this.hasSeatReservationNativeFocus = !1, this.keyboardNavigationEvents = {
372
+ ArrowLeft: "ArrowLeft",
373
+ ArrowRight: "ArrowRight",
374
+ ArrowUp: "ArrowUp",
375
+ ArrowDown: "ArrowDown",
376
+ Tab: "Tab",
377
+ Enter: "Enter"
378
+ }, this.notAreaElements = [
379
+ "DRIVER_AREA",
380
+ "DRIVER_AREA_NO_VERTICAL_WALL",
381
+ "COACH_PASSAGE",
382
+ "COACH_WALL_NO_PASSAGE",
383
+ "COMPARTMENT_PASSAGE",
384
+ "COMPARTMENT_PASSAGE_HIGH",
385
+ "COMPARTMENT_PASSAGE_MIDDLE",
386
+ "COMPARTMENT_PASSAGE_LOW",
387
+ "COMPARTMENT_WALL"
388
+ ], this.overHangingElementInformation = [], this._isRunningInitPreselectCoachIndex = !1, this._lastStartScrollPos = -1, this._prepareServiceIconsNavigation = (e) => e && e?.map(function(e) {
389
+ return {
390
+ pId: e,
391
+ svgName: c[e]?.svgName ? c[e]?.svgName : ""
392
+ };
393
+ }).filter((e) => ae.indexOf(e.svgName) !== -1).filter((e, t, n) => n.map((e) => e.svgName).indexOf(e.svgName) === t).map((e) => e.pId).slice(0, ie) || [], this.addEventListener("blur", () => this._onLeaveSeatReservationComponent());
394
+ }
395
+ willUpdate(e) {
396
+ if (super.willUpdate(e), e.has("seatReservations") && (this.hasMultipleDecks = this.seatReservations?.length > 1, this._initPrepareSeatReservationData(), this._prepareCoachWidthAndGapCalculations(), this._initSeatReservationPlaceSelection(), this.initNavigationSelectionByScrollEvent()), e.has("baseGridSize") && (this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent()), e.has("height") && this.height) {
397
+ let e = this.seatReservations[this.currSelectedDeckIndex] || null;
398
+ e?.coachItems.length && (this.baseGridSize = this.height / e.coachItems[0].dimension.h, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this._initPrepareSeatReservationData(), this.initNavigationSelectionByScrollEvent());
399
+ }
400
+ e.has("alignVertical") && this.alignVertical && this.initNavigationSelectionByScrollEvent(), e.has("preselectCoachIndex") && (this._isRunningInitPreselectCoachIndex = !0, setTimeout(() => this.scrollToSelectedNavCoach(this.preselectCoachIndex), 1));
401
+ }
402
+ navigateByDirectionBtn(e) {
403
+ this.unfocusPlaceElement();
404
+ let t = this.currSelectedCoachIndex;
405
+ e == "DIRECTION_LEFT" && t > 0 ? t = this.currSelectedCoachIndex == -1 ? 0 : this.currSelectedCoachIndex - 1 : e == "DIRECTION_RIGHT" && t < this.seatReservations[this.currSelectedDeckIndex]?.coachItems.length - 1 && (t = this.currSelectedCoachIndex == -1 ? 0 : this.currSelectedCoachIndex + 1), this.scrollToSelectedNavCoach(t);
406
+ }
407
+ _initPrepareSeatReservationData() {
408
+ this._determineBaseFontSize(), this.hasMultipleDecks && this._initEmptyCoachDeckOffsets(), this._prepareCoachItemDetailsData(), this._prepareOptimizeAreaIconDimensionByMedian();
409
+ }
410
+ initNavigationSelectionByScrollEvent() {
411
+ this.coachScrollArea = this.shadowRoot?.querySelector("#sbb-sr__wrapper-scrollarea"), this.navigationScrollArea = this.shadowRoot?.querySelector("#sbb-sr__navigation-list-coaches");
412
+ let e = this.seatReservations ? this.seatReservations[this.currSelectedDeckIndex] : null;
413
+ if (e && e.coachItems.length > 0) {
414
+ let t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding, n = (this.seatReservations.length - 1) * this.gapBetweenCoachDecks;
415
+ this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length + n}`), this.style?.setProperty("--sbb-seat-reservation-decks", `${this.seatReservations.length}`);
416
+ }
417
+ if (this.navigationScrollArea) {
418
+ this.scrollNavigationAreaDim = this.alignVertical ? this.navigationScrollArea.getBoundingClientRect().height : this.navigationScrollArea.getBoundingClientRect().width;
419
+ let e = this.navigationScrollArea.querySelector("ul > li");
420
+ if (e) {
421
+ let t = e?.getBoundingClientRect();
422
+ this.coachNavButtonDim = this.alignVertical ? t.height : t.width;
423
+ }
424
+ }
425
+ if (this.coachScrollArea && e) {
426
+ let t = 0;
427
+ this.scrollCoachesAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((e) => {
428
+ let n = t, r = this.getCalculatedDimension(e.dimension).w, i = this.overHangingElementInformation.find((t) => t.coachId === e.id), a = i?.overhangingPlaces || i?.overhangingGraphicAreas;
429
+ return t += r + (a ? 2 * this.gapBetweenCoaches : this.gapBetweenCoaches), {
430
+ start: n,
431
+ end: t,
432
+ width: r
433
+ };
434
+ }), this.maxCalcCoachesWidth = t - this.gapBetweenCoaches;
435
+ }
436
+ }
437
+ coachAreaScrollend() {
438
+ this._scrollTimeout && clearTimeout(this._scrollTimeout), this._scrollTimeout = setTimeout(() => this._handleCoachAreaScrollendEvent(), 150);
439
+ }
440
+ onFocusTableCoachAndPreselectPlace(e) {
441
+ !this.seatReservationWithoutNavigationHasFocus && !this.hasNavigation && (this.seatReservationWithoutNavigationHasFocus = !0, this.currSelectedCoachIndex = e === 0 ? this.getNextAvailableCoachIndex(-1) : this.getPrevAvailableCoachIndex(e), this.preselectPlaceInCoach());
442
+ }
443
+ onFocusNavDirectionButton() {
444
+ this.focusedCoachIndex = -1;
445
+ }
446
+ onKeyNavigationNavCoachButton(e, t) {
447
+ if (e.key === this.keyboardNavigationEvents.Tab) {
448
+ this._handleTabKeyNavigation(e, "navigation", t);
449
+ return;
450
+ }
451
+ a(e) && this.keyboardSeatmapEventHandling(e);
452
+ }
453
+ _handleTabKeyNavigation(e, t, n) {
454
+ let r = e.key, i = e.shiftKey;
455
+ r === this.keyboardNavigationEvents.Tab && (t == "navigation" ? (n == this.currSelectedCoachIndex ? !this.currSelectedPlace || !i || this.coachItemDetailsElements[n].isDriverArea || this.focusedCoachIndex == -1 ? this.focusedCoachIndex = n : i && this.currSelectedPlace && (this.focusedCoachIndex = -1, this.focusPlaceElement(this.currSelectedPlace)) : this.focusedCoachIndex = n, this._scrollToSelectedNavigationButton(n)) : t == "seatmap" && (e.preventDefault(), i ? this._navigateCoachNavigationByKeyboard("PREV_TAB") : this._navigateCoachNavigationByKeyboard("NEXT_TAB")));
456
+ }
457
+ keyboardSeatmapEventHandling(e) {
458
+ let t = e.key === this.keyboardNavigationEvents.Tab, n = e.shiftKey && t;
459
+ if (!this.hasNavigation && this.currSelectedCoachIndex === 0 && n || this.currSelectedCoachIndex === this.coachItemDetailsElements.length - 1 && t) return;
460
+ let r = e.key;
461
+ if (this.preventCoachScrollByPlaceClick = !1, !this.hasSeatReservationNativeFocus && (t || n) && (this.hasSeatReservationNativeFocus = !0), t) {
462
+ this._handleTabKeyNavigation(e, "seatmap");
463
+ return;
464
+ }
465
+ if (this.currSelectedCoachIndex !== -1 && a(e)) switch (e.preventDefault(), r) {
466
+ case this.keyboardNavigationEvents.ArrowLeft:
467
+ {
468
+ let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown : r;
469
+ this._navigateToPlaceByKeyboard(e);
470
+ }
471
+ break;
472
+ case this.keyboardNavigationEvents.ArrowRight:
473
+ {
474
+ let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp : r;
475
+ this._navigateToPlaceByKeyboard(e);
476
+ }
477
+ break;
478
+ case this.keyboardNavigationEvents.ArrowUp:
479
+ {
480
+ let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft : r;
481
+ this._navigateToPlaceByKeyboard(e);
482
+ }
483
+ break;
484
+ case this.keyboardNavigationEvents.ArrowDown:
485
+ {
486
+ let e = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight : r;
487
+ this._navigateToPlaceByKeyboard(e);
488
+ }
489
+ break;
490
+ default: break;
491
+ }
492
+ }
493
+ preselectPlaceInCoach() {
494
+ if (this.isAutoScrolling) {
495
+ if (this._isRunningInitPreselectCoachIndex) {
496
+ this._isRunningInitPreselectCoachIndex = !1;
497
+ return;
498
+ }
499
+ if (this.coachItemDetailsElements[this.currSelectedCoachIndex] && this.coachItemDetailsElements[this.currSelectedCoachIndex].isDriverArea) {
500
+ this._setFocusToSelectedCoachGrid();
501
+ return;
502
+ }
503
+ if (this.isKeyboardNavigation && this.isAutoScrolling) {
504
+ let e = this._getClosestPlaceByKeyDirection();
505
+ e ? (this.unfocusPlaceElement(), this.focusPlaceElement(e), this.focusedCoachIndex = -1) : this._setFocusToSelectedCoachGrid();
506
+ } else this.unfocusPlaceElement(), this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid();
507
+ }
508
+ }
509
+ scrollToSelectedNavCoach(e) {
510
+ if (this._isValidCoachIndex(e) && e !== this.currSelectedCoachIndex) {
511
+ this.hoveredCoachIndex = e, this.isAutoScrolling = !0, this.isCoachGridFocusable = !0, this.currSelectedCoachIndex = e, this.currSelectedDeckIndex = this._getExistingCoachDeckIndex(), this._setScrollDirectionByCoachIndex();
512
+ let t = this._getCoachScrollPositionX();
513
+ (this.selectedCoachIndex !== -1 || this.currSelectedCoachIndex > 0) && this._isScrollableToSelectedCoach() ? (this._lastStartScrollPos = this.coachScrollArea.scrollLeft, this.coachScrollArea.scrollTo({
514
+ top: this.alignVertical ? t : 0,
515
+ left: this.alignVertical ? 0 : t,
516
+ behavior: "smooth"
517
+ })) : this.updateCurrentSelectedCoach(), this._scrollToSelectedNavigationButton(e);
518
+ }
519
+ }
520
+ focusPlaceElement(e) {
521
+ if (this.unfocusPlaceElement(), e) {
522
+ this.currSelectedPlace = e, this._setCurrSelectedPlaceElementId(e);
523
+ let t = this._getPlaceHtmlElement();
524
+ if (t) {
525
+ t.setAttribute("keyfocus", "focus");
526
+ let n = setTimeout(() => {
527
+ let t = this.getPlaceElementId(this.currSelectedDeckIndex, this.currSelectedCoachIndex, e.number);
528
+ this._scrollPlaceIntoNearestViewport(t), clearTimeout(n);
529
+ }, 0);
530
+ }
531
+ }
532
+ }
533
+ unfocusPlaceElement() {
534
+ let e = this._getPlaceHtmlElement();
535
+ e && (e.setAttribute("keyfocus", "unfocus"), this._setCurrSelectedPlaceElementId(null), this.currSelectedPlace = null);
536
+ }
537
+ getCalculatedDimension(e, t, n, r) {
538
+ return t && !n && (e.h += this.coachBorderOffset * 2), r && (e.h += this.coachBorderOffset), {
539
+ w: this.baseGridSize * e.w,
540
+ h: this.baseGridSize * e.h
541
+ };
542
+ }
543
+ getCalculatedPosition(e, t, n, r) {
544
+ if (n && t) {
545
+ let i = r ? n.h : n.h + this.coachBorderOffset;
546
+ e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === i && (e.y += this.coachBorderOffset);
547
+ }
548
+ return {
549
+ x: this.baseGridSize * e.x,
550
+ y: this.baseGridSize * e.y,
551
+ z: e.z
552
+ };
553
+ }
554
+ isElementDirectlyOnBorder(e, t) {
555
+ return e.position.y === 0 || e.position.y + e.dimension.h === t.h;
556
+ }
557
+ getAvailableFreePlacesNumFromCoach(e) {
558
+ let t = {
559
+ seats: 0,
560
+ bicycles: 0
561
+ };
562
+ return e?.reduce((e, t) => (t.state === "FREE" && (t.type === "SEAT" ? e.seats++ : e.bicycles++), e), t) || t;
563
+ }
564
+ _handleCoachAreaScrollendEvent() {
565
+ let e = this.isAutoScrolling ? this.currSelectedCoachIndex : this._getCoachIndexByScrollTriggerPosition();
566
+ if (this.preventCoachScrollByPlaceClick) {
567
+ Math.abs(this._lastStartScrollPos - this.coachScrollArea.scrollLeft) > this.baseGridSize * 2 && (this.selectedCoachIndex = e), this.preventCoachScrollByPlaceClick = !1;
568
+ return;
569
+ }
570
+ this._lastStartScrollPos = this.coachScrollArea.scrollLeft, this.hoveredCoachIndex = -1, this.currSelectedCoachIndex === -1 && (this.currSelectedCoachIndex = e), this._isScrollableToSelectedCoach() ? this.currSelectedCoachIndex = e : this.currSelectedCoachIndex = e < this.currSelectedCoachIndex ? this.currSelectedCoachIndex : e, this.isAutoScrolling || this._scrollToSelectedNavigationButton(e), this.preventCoachScrollByPlaceClick = !1, this.updateCurrentSelectedCoach(), this.hasNavigation || (this.preselectPlaceInCoach(), this.isAutoScrolling = !1);
571
+ }
572
+ _scrollToSelectedNavigationButton(e) {
573
+ setTimeout(() => {
574
+ if (this.hasNavigation && this.navigationScrollArea) {
575
+ let t = this.scrollNavigationAreaDim / 2, n = e * this.coachNavButtonDim - t + this.coachNavButtonDim;
576
+ this.navigationScrollArea.scrollTo({
577
+ top: this.alignVertical ? n : 0,
578
+ left: this.alignVertical ? 0 : n,
579
+ behavior: "smooth"
580
+ });
581
+ }
582
+ }, 10);
583
+ }
584
+ _setScrollDirectionByCoachIndex() {
585
+ this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ? l.right : l.left;
586
+ }
587
+ _getCoachScrollPositionX() {
588
+ let e = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex];
589
+ return this.isKeyboardNavigation && this.currScrollDirection === l.left && e.width > this.scrollCoachesAreaWidth ? e.end - this.scrollCoachesAreaWidth : e.start;
590
+ }
591
+ _setFocusToSelectedCoachGrid() {
592
+ if (this.isCoachGridFocusable && this.hasSeatReservationNativeFocus) {
593
+ this.isCoachGridFocusable = !1;
594
+ let e = this.shadowRoot?.querySelector("#sbb-sr-coach-caption-" + this.currSelectedCoachIndex);
595
+ e && e.focus();
596
+ }
597
+ }
598
+ _isScrollableToSelectedCoach() {
599
+ let e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, n = this.maxCalcCoachesWidth - t, r = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex], i = e === this.triggerCoachPositionsCollection[this.currSelectedCoachIndex].start;
600
+ return (e < n || e > r.start) && !i;
601
+ }
602
+ _getCoachIndexByScrollTriggerPosition() {
603
+ let e = (this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft) + this.scrollCoachesAreaWidth / 2;
604
+ return this.triggerCoachPositionsCollection.findIndex((t) => e >= t.start && e <= t.end);
605
+ }
606
+ _getFirstPlaceInSelectedCoach() {
607
+ let e = null, t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], n = "cell-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-0-0", r = this.shadowRoot?.querySelector("#" + n)?.querySelector("sbb-seat-reservation-place-control")?.getAttribute("text") || null;
608
+ return t && r && (e = t.places?.find((e) => e.number === r) || null), e;
609
+ }
610
+ _getSwitchedCoachDeckIndexByKeyNavigation(e, t) {
611
+ return !this.currSelectedPlace || e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft ? null : e === this.keyboardNavigationEvents.ArrowDown && this.currSelectedPlace.position.y + 2 === t.dimension.h && this.seatReservations[this.currSelectedDeckIndex + 1] ? this.currSelectedDeckIndex + 1 : e === this.keyboardNavigationEvents.ArrowUp && this.currSelectedPlace.position.y === 0 && this.seatReservations[this.currSelectedDeckIndex - 1] ? this.currSelectedDeckIndex - 1 : null;
612
+ }
613
+ _getClosestPlaceByKeyDirection(e) {
614
+ let t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], n = null, r = t.places, i = null;
615
+ if (r) {
616
+ if (!this.currSelectedPlaceElementId) return this._getFirstPlaceInSelectedCoach();
617
+ if (this.currSelectedPlace) {
618
+ let a = { ...this.currSelectedPlace.position };
619
+ e && (i = this._getSwitchedCoachDeckIndexByKeyNavigation(e, t), i !== null && (r = this.seatReservations[i].coachItems[this.currSelectedCoachIndex].places || [], a.y = i < this.currSelectedDeckIndex ? t.dimension.h : -1));
620
+ for (let t of r) e ? t.number !== this.currSelectedPlace?.number && (e === this.keyboardNavigationEvents.ArrowRight && (t.position.y === a.y || t.position.y === a.y - 1) && t.position.x > a.x && (!n || t.position.x < n.position.x) || e === this.keyboardNavigationEvents.ArrowDown && (t.position.x === a.x || t.position.x === a.x + 1) && t.position.y > a.y && (!n || t.position.y < n.position.y) || e === this.keyboardNavigationEvents.ArrowLeft && (t.position.y === a.y || t.position.y === a.y + 1) && t.position.x < a.x && (!n || t.position.x > n.position.x) || e === this.keyboardNavigationEvents.ArrowUp && (t.position.x === a.x || t.position.x === a.x - 1) && t.position.y < a.y && (!n || t.position.y > n.position.y)) && (n = t) : (this.currScrollDirection === l.right && t.position.y === a.y && (!n || t.position.x < n.position.x) || this.currScrollDirection === l.left && t.position.y === a.y && (!n || t.position.x > n.position.x)) && (n = t);
621
+ i !== null && n && (this.currSelectedDeckIndex = i);
622
+ }
623
+ }
624
+ return n;
625
+ }
626
+ _navigateCoachNavigationByKeyboard(e) {
627
+ let t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex, n = e === "NEXT_TAB" ? this.getNextAvailableCoachIndex(t) : this.getPrevAvailableCoachIndex(t);
628
+ if (this.hasNavigation) {
629
+ let r = this._getPlaceHtmlElement(), i = r ? r.getAttribute("keyfocus") === "focus" : !1;
630
+ if (e === "PREV_TAB" && this.selectedCoachIndex === t) if (i || this.currSelectedPlace !== null) {
631
+ this.focusedCoachIndex = t, this.unfocusPlaceElement();
632
+ return;
633
+ } else t === 0 ? this._refocusCurrentFocusedNavCoach(t) : this.focusedCoachIndex = n;
634
+ else n === this.currSelectedCoachIndex ? e === "NEXT_TAB" && n === this.coachItemDetailsElements.length - 1 ? this._refocusCurrentFocusedNavCoach(t) : (this.focusedCoachIndex = -1, this.selectedCoachIndex = n, i ? this.focusPlaceElement(this.currSelectedPlace) : (this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid())) : this.focusedCoachIndex = n;
635
+ this._scrollToSelectedNavigationButton(n);
636
+ } else this.scrollToSelectedNavCoach(n);
637
+ }
638
+ _refocusCurrentFocusedNavCoach(e) {
639
+ this.focusedCoachIndex = -1, setTimeout(() => this.focusedCoachIndex = e, 0);
640
+ }
641
+ _navigateToPlaceByKeyboard(e) {
642
+ if (this.isKeyboardNavigation = !0, this.focusedCoachIndex !== -1 && (this.focusedCoachIndex = -1), !this.preventPlaceClick) {
643
+ let t = this._getClosestPlaceByKeyDirection(e);
644
+ if (t) this.focusPlaceElement(t);
645
+ else if (e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft || this.alignVertical && (e === this.keyboardNavigationEvents.ArrowUp || e === this.keyboardNavigationEvents.ArrowDown)) {
646
+ let t = e === this.keyboardNavigationEvents.ArrowRight ? this.getNextAvailableCoachIndex() : this.getPrevAvailableCoachIndex();
647
+ this.scrollToSelectedNavCoach(t);
648
+ }
649
+ }
650
+ }
651
+ getNextAvailableCoachIndex(e) {
652
+ let t = e ?? this.currSelectedCoachIndex;
653
+ return t < this.seatReservations[this.currSelectedDeckIndex].coachItems.length - 1 ? t + 1 : t;
654
+ }
655
+ getPrevAvailableCoachIndex(e) {
656
+ let t = e ?? this.currSelectedCoachIndex;
657
+ return t > 0 ? t - 1 : t;
658
+ }
659
+ updateSelectedSeatReservationPlaces(e) {
660
+ let t = e.placeType === "SEAT" ? "seats" : "bicycles", n = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, r = this.selectedSeatReservationPlaces[t];
661
+ this.selectedSeatReservationPlaces[t] = this._updateSelectedSeatReservationPlaces(r, n, e), this.dispatchEvent(new CustomEvent("selectedplaces", {
662
+ bubbles: !0,
663
+ composed: !0,
664
+ detail: this.selectedSeatReservationPlaces
665
+ }));
666
+ }
667
+ _updateSelectedSeatReservationPlaces(e, t, n) {
668
+ if (n.state === "SELECTED") {
669
+ let t = this._getDeckIndexByPlaceId(n.id), r = this._getSeatReservationPlaceSelection(n, t);
670
+ r && e.push(r);
671
+ } else e = e.filter((e) => e.id !== n.id);
672
+ if (t > -1 && e.length > t) {
673
+ let r = t > 0 ? n : void 0;
674
+ e = this._resetAllPlaceSelections(e, r);
675
+ }
676
+ return e;
677
+ }
678
+ updateCurrentSelectedPlaceInCoach(e) {
679
+ let t = this._getDeckIndexByPlaceId(e.id), n = e.coachIndex;
680
+ if (t === null) return;
681
+ let r = this.seatReservations[t].coachItems[n].places?.find((t) => t.number == e.number);
682
+ if (!r) return;
683
+ this.currSelectedDeckIndex = t, this.currSelectedCoachIndex = n, this.currSelectedPlace = r, this.currSelectedCoachIndex !== this.selectedCoachIndex && this.updateCurrentSelectedCoach(), this._setCurrSelectedPlaceElementId(r);
684
+ let i = setTimeout(() => {
685
+ this._scrollPlaceIntoNearestViewport(e.id), clearTimeout(i);
686
+ }, 0);
687
+ }
688
+ updateCurrentSelectedCoach() {
689
+ if (this.currSelectedCoachIndex == this.selectedCoachIndex) return;
690
+ this.focusedCoachIndex != -1 && (this.focusedCoachIndex = this.currSelectedCoachIndex), this.selectedCoachIndex = this.currSelectedCoachIndex;
691
+ let e = this._getSeatReservationSelectedCoach(this.selectedCoachIndex);
692
+ e && this.dispatchEvent(new CustomEvent("selectedcoach", {
693
+ bubbles: !0,
694
+ composed: !0,
695
+ detail: e
696
+ }));
697
+ }
698
+ getPlaceElementId(e, t, n) {
699
+ return "seat-reservation__place-button-" + e + "-" + t + "-" + n;
700
+ }
701
+ _initEmptyCoachDeckOffsets() {
702
+ let e = Array(this.seatReservations.length - 1).fill(0);
703
+ this.seatReservations[this.seatReservations.length - 1].coachItems.forEach((t) => {
704
+ for (let n = 0; n < this.seatReservations.length - 1; n++) {
705
+ let r = this.seatReservations[n].coachItems[e[n]];
706
+ if (t.id != r?.id) {
707
+ let r = {
708
+ ...t,
709
+ places: void 0,
710
+ propertyIds: void 0,
711
+ graphicElements: void 0,
712
+ serviceElements: void 0,
713
+ travelClass: []
714
+ };
715
+ this.seatReservations[n].coachItems.splice(e[n], 0, r);
716
+ }
717
+ e[n]++;
718
+ }
719
+ });
720
+ }
721
+ _initSeatReservationPlaceSelection() {
722
+ this.selectedSeatReservationPlaces.seats = [], this.selectedSeatReservationPlaces.bicycles = [], this.seatReservations?.forEach((e, t) => e.coachItems.map((n, r) => {
723
+ n.places?.filter((e) => e.state === "SELECTED")?.forEach((n) => {
724
+ let i = re(n, this.getPlaceElementId(t, r, n.number), e.deckCoachIndex, r), a = this._getSeatReservationPlaceSelection(i, t);
725
+ a && (a.placeType === "SEAT" ? this.selectedSeatReservationPlaces.seats.push(a) : this.selectedSeatReservationPlaces.bicycles.push(a));
726
+ });
727
+ }));
728
+ }
729
+ _resetAllPlaceSelections(e, t) {
730
+ for (let n of e) if (!t || t.id !== n.id) {
731
+ let e = this.shadowRoot?.getElementById(n.id);
732
+ e && e.setAttribute("state", "FREE");
733
+ }
734
+ return e = t ? e.filter((e) => e.id === t.id) : [], e;
735
+ }
736
+ _getSeatReservationPlaceSelection(e, t) {
737
+ if (t === null) return null;
738
+ let n = this.seatReservations[t].coachItems[e.coachIndex], r = n.places?.find((t) => t.number === e.number);
739
+ return r ? ne(r, n, e.id, e.deckIndex, e.coachIndex) : null;
740
+ }
741
+ _getSeatReservationSelectedCoach(e) {
742
+ if (!this.seatReservations[this.currSelectedDeckIndex].coachItems[e]) return null;
743
+ let t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e];
744
+ return te(e, t, this.getAvailableFreePlacesNumFromCoach(t.places));
745
+ }
746
+ _setCurrSelectedPlaceElementId(e) {
747
+ this.currSelectedPlaceElementId = e ? this.getPlaceElementId(this.currSelectedDeckIndex, this.currSelectedCoachIndex, e.number) : null;
748
+ }
749
+ _determineBaseFontSize() {
750
+ if (!i) {
751
+ let e = 1 / parseInt(window.getComputedStyle(document.body).fontSize, 10);
752
+ this.style?.setProperty("--sbb-seat-reservation-one-px-rem", `${e + "rem"}`);
753
+ }
754
+ }
755
+ _prepareCoachItemDetailsData() {
756
+ if (this.seatReservations) {
757
+ let e = this.seatReservations[this.seatReservations.length - 1].coachItems;
758
+ this.coachItemDetailsElements = [], e.forEach((e, t) => {
759
+ let n = [], r = [], i = [];
760
+ this.seatReservations.map((e) => e.coachItems[t]).forEach((e) => {
761
+ n.push(...e.travelClass), r.push(...e.propertyIds ? e.propertyIds : []), i.push(...e.places ? e.places : []);
762
+ }), this.coachItemDetailsElements.push({
763
+ id: e.id,
764
+ travelClass: this._prepareTravelClassNavigation(n),
765
+ propertyIds: this._prepareServiceIconsNavigation(r),
766
+ isDriverArea: e.places ? e.places.length === 0 : !0,
767
+ driverAreaSide: this._prepareDriverAreaSideNavigation(e),
768
+ freePlaces: this.getAvailableFreePlacesNumFromCoach(i),
769
+ driverAreaElements: this._setDriverAreasElements(e)
770
+ });
771
+ });
772
+ }
773
+ }
774
+ _prepareOptimizeAreaIconDimensionByMedian() {
775
+ if (this.seatReservations) {
776
+ let e = [];
777
+ if (this.seatReservations.forEach((t) => t.coachItems.forEach((t) => t.serviceElements?.forEach((t) => e.push(t.dimension)))), e.length) {
778
+ e.sort((e, t) => {
779
+ if (e && t) {
780
+ let n = e.w + e.h, r = t.w + t.h;
781
+ return n > r ? 1 : n < r ? -1 : 0;
782
+ }
783
+ return 0;
784
+ });
785
+ let t = e[Math.floor(e.length / 2)];
786
+ this.globalAreaIconDim = this.getCalculatedDimension(t);
787
+ } else {
788
+ let e = this.seatReservations.flatMap((e) => e.coachItems.map((e) => e.dimension.h)).reduce((e, t) => Math.max(e, t), 0), t = Math.floor(e * .2);
789
+ this.globalAreaIconDim = this.getCalculatedDimension({
790
+ w: t,
791
+ h: t
792
+ });
793
+ }
794
+ }
795
+ }
796
+ _prepareTravelClassNavigation(e) {
797
+ return e.indexOf("FIRST") === -1 ? e.indexOf("SECOND") === -1 ? "ANY_CLASS" : "SECOND" : "FIRST";
798
+ }
799
+ _prepareDriverAreaSideNavigation(e) {
800
+ let t = e.graphicElements?.filter((e) => e.icon === "DRIVER_AREA");
801
+ if (t && t.length > 0) {
802
+ let e = t.find((e) => e.position.x === 0) || !1, n = t.find((e) => e.position.x > 0) || !1;
803
+ return {
804
+ left: !!e,
805
+ right: !!n
806
+ };
807
+ }
808
+ }
809
+ _prepareCoachWidthAndGapCalculations() {
810
+ this.seatReservations && this.seatReservations.forEach((e) => {
811
+ e?.coachItems?.forEach((e) => {
812
+ let t = this._isOverhangingElementsPresent(e.dimension.w, e.places), n = e.graphicElements?.filter((e) => e.icon && !this.notAreaElements.includes(e.icon)), r = this._isOverhangingElementsPresent(e.dimension.w, n);
813
+ this.overHangingElementInformation.push({
814
+ coachId: e.id,
815
+ overhangingPlaces: t,
816
+ overhangingGraphicAreas: r
817
+ });
818
+ });
819
+ });
820
+ }
821
+ _getPlaceHtmlElement() {
822
+ return this.currSelectedPlaceElementId && this.shadowRoot?.getElementById(this.currSelectedPlaceElementId) || null;
823
+ }
824
+ _getDeckIndexByPlaceId(e) {
825
+ let t = this.shadowRoot?.querySelector("#" + e)?.getAttribute("data-deck-index");
826
+ return t && !isNaN(+t) ? +t : null;
827
+ }
828
+ _isValidCoachIndex(e) {
829
+ return e >= 0 && e <= this.seatReservations[this.seatReservations.length - 1].coachItems.length;
830
+ }
831
+ _getExistingCoachDeckIndex() {
832
+ if (this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex].places !== void 0) return this.currSelectedDeckIndex;
833
+ let e = this.seatReservations.findIndex((e) => e.coachItems[this.currSelectedCoachIndex].places !== void 0);
834
+ return this.currSelectedDeckIndex >= e ? this.currSelectedDeckIndex : e;
835
+ }
836
+ _scrollPlaceIntoNearestViewport(e) {
837
+ this.shadowRoot?.getElementById(e)?.scrollIntoView({
838
+ behavior: "smooth",
839
+ block: "nearest",
840
+ inline: "nearest"
841
+ });
842
+ }
843
+ _isOverhangingElementsPresent(e, t) {
844
+ return t?.some((t) => t.position.x === 0 || t.position.x + t.dimension.w >= e) ?? !1;
845
+ }
846
+ _setDriverAreasElements(e) {
847
+ return e ? {
848
+ driverArea: e.graphicElements?.find((e) => e.icon === "DRIVER_AREA"),
849
+ driverAreaNoVerticalWall: e.type === "LOCOMOTIVE_COACH" ? e.graphicElements?.find((e) => e.icon === "DRIVER_AREA_NO_VERTICAL_WALL") : void 0
850
+ } : {
851
+ driverArea: void 0,
852
+ driverAreaNoVerticalWall: void 0
853
+ };
854
+ }
855
+ _onLeaveSeatReservationComponent() {
856
+ this.hasNavigation && (this.focusedCoachIndex = -1), this.unfocusPlaceElement();
857
+ }
858
+ };
859
+ })();
860
+ //#endregion
861
+ export { u as SeatReservationBaseElement };