@sbb-esta/lyne-elements-experimental 1.12.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/core/datetime.js +3 -9
  2. package/core/timetable.js +10 -64
  3. package/custom-elements.json +90 -40
  4. package/development/core/datetime.js +4 -10
  5. package/development/core/timetable.js +11 -65
  6. package/development/differenceInMinutes-Cmyza6nm.js +1 -1
  7. package/development/format-DTy5_IOt.js +1 -1
  8. package/development/isValid-DO_pHwcW.js +1 -1
  9. package/development/journey-summary/journey-summary.d.ts +6 -6
  10. package/development/journey-summary/journey-summary.d.ts.map +1 -1
  11. package/development/journey-summary.js +180 -82
  12. package/development/pearl-chain/pearl-chain.d.ts +2 -2
  13. package/development/pearl-chain/pearl-chain.d.ts.map +1 -1
  14. package/development/pearl-chain-time/pearl-chain-time.d.ts +7 -7
  15. package/development/pearl-chain-time/pearl-chain-time.d.ts.map +1 -1
  16. package/development/pearl-chain-time.js +176 -68
  17. package/development/pearl-chain-vertical/pearl-chain-vertical.d.ts.map +1 -1
  18. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts +2 -2
  19. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts.map +1 -1
  20. package/development/pearl-chain-vertical-item.js +67 -30
  21. package/development/pearl-chain-vertical.js +22 -21
  22. package/development/pearl-chain.js +210 -166
  23. package/development/timetable-duration/timetable-duration.d.ts +1 -1
  24. package/development/timetable-duration/timetable-duration.d.ts.map +1 -1
  25. package/development/timetable-duration.js +72 -45
  26. package/development/timetable-row/timetable-row.d.ts +10 -10
  27. package/development/timetable-row/timetable-row.d.ts.map +1 -1
  28. package/development/timetable-row.js +337 -205
  29. package/journey-summary/journey-summary.d.ts +6 -6
  30. package/journey-summary/journey-summary.d.ts.map +1 -1
  31. package/journey-summary.js +156 -100
  32. package/package.json +4 -3
  33. package/pearl-chain/pearl-chain.d.ts +2 -2
  34. package/pearl-chain/pearl-chain.d.ts.map +1 -1
  35. package/pearl-chain-time/pearl-chain-time.d.ts +7 -7
  36. package/pearl-chain-time/pearl-chain-time.d.ts.map +1 -1
  37. package/pearl-chain-time.js +137 -78
  38. package/pearl-chain-vertical/pearl-chain-vertical.d.ts.map +1 -1
  39. package/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts +2 -2
  40. package/pearl-chain-vertical-item/pearl-chain-vertical-item.d.ts.map +1 -1
  41. package/pearl-chain-vertical-item.js +57 -34
  42. package/pearl-chain-vertical.js +17 -18
  43. package/pearl-chain.js +156 -131
  44. package/timetable-duration/timetable-duration.d.ts +1 -1
  45. package/timetable-duration/timetable-duration.d.ts.map +1 -1
  46. package/timetable-duration.js +48 -30
  47. package/timetable-row/timetable-row.d.ts +10 -10
  48. package/timetable-row/timetable-row.d.ts.map +1 -1
  49. package/timetable-row.js +331 -267
package/timetable-row.js CHANGED
@@ -1,56 +1,57 @@
1
- import { SbbLanguageController as fe } from "@sbb-esta/lyne-elements/core/controllers.js";
2
- import { defaultDateAdapter as Y } from "@sbb-esta/lyne-elements/core/datetime.js";
3
- import { setOrRemoveAttribute as ye } from "@sbb-esta/lyne-elements/core/dom.js";
4
- import { i18nTripQuayChange as ve, i18nFromPlatform as xe, i18nDeparture as X, i18nMeansOfTransport as O, i18nDirection as Z, i18nRealTimeInfo as G, i18nSupersaver as V, i18nTransferProcedures as we, i18nArrival as $e, i18nClass as ee, i18nOccupancy as te, i18nTravelhints as Te, i18nTripDuration as re, i18nNew as ae } from "@sbb-esta/lyne-elements/core/i18n.js";
5
- import { css as Ce, html as b, LitElement as Ne, nothing as c } from "lit";
6
- import { property as u, customElement as Ae } from "lit/decorators.js";
7
- import { removeTimezoneFromISOTimeString as se, durationToTime as ne } from "./core/datetime.js";
8
- import { isRideLeg as ce, getDepartureArrivalTimeAttribute as Me } from "./core/timetable.js";
1
+ var Qe = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var Ke = (e, i, s) => i.has(e) || Qe("Cannot " + s);
5
+ var T = (e, i, s) => (Ke(e, i, "read from private field"), s ? s.call(e) : i.get(e)), A = (e, i, s) => i.has(e) ? Qe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, s), h = (e, i, s, n) => (Ke(e, i, "write to private field"), n ? n.call(e, s) : i.set(e, s), s);
6
+ import { __runInitializers as d, __esDecorate as w } from "tslib";
7
+ import { SbbLanguageController as ft } from "@sbb-esta/lyne-elements/core/controllers.js";
8
+ import { defaultDateAdapter as Ye } from "@sbb-esta/lyne-elements/core/datetime.js";
9
+ import { forceType as I } from "@sbb-esta/lyne-elements/core/decorators.js";
10
+ import { setOrRemoveAttribute as yt } from "@sbb-esta/lyne-elements/core/dom.js";
11
+ import { i18nFromPlatform as vt, i18nDeparture as Xe, i18nMeansOfTransport as X, i18nDirection as Ze, i18nRealTimeInfo as Ge, i18nSupersaver as Ve, i18nTransferProcedures as xt, i18nArrival as wt, i18nClass as et, i18nOccupancy as tt, i18nTravelhints as $t, i18nTripDuration as at, i18nNew as it, i18nTripQuayChange as Tt } from "@sbb-esta/lyne-elements/core/i18n.js";
12
+ import { css as At, html as m, nothing as f, LitElement as Nt } from "lit";
13
+ import { customElement as Ct, property as N } from "lit/decorators.js";
14
+ import { removeTimezoneFromISOTimeString as st, durationToTime as rt } from "./core/datetime.js";
15
+ import { isRideLeg as bt, getDepartureArrivalTimeAttribute as kt } from "./core/timetable.js";
9
16
  import "@sbb-esta/lyne-elements/card.js";
10
17
  import "@sbb-esta/lyne-elements/icon.js";
11
18
  import "@sbb-esta/lyne-elements/timetable-occupancy.js";
12
19
  import "./pearl-chain-time.js";
13
- import { f as ie } from "./format-oBQcGL50.js";
14
- const Oe = Ce`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timetable-row-height: 1.5625rem;--sbb-timetable-row-height-header: 1.25rem;--sbb-timetable-row-height-footer: 1rem;--sbb-timetable-row-skeleton-pulse-duration: 1.8s;display:block}:host([disable-animation]){--sbb-timetable-row-skeleton-pulse-duration: 0}.sbb-timetable__row-transport-icon{--sbb-icon-svg-width: 1.25rem;--sbb-icon-svg-height: 1.25rem}.sbb-travel-hints__item{--sbb-icon-svg-height: .875rem}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.sbb-timetable__row--quay{margin-inline-end:var(--sbb-spacing-fixed-1x)}.sbb-timetable__row--quay-type{float:left}ul{list-style:none;margin:0;padding:0;font-size:inherit;display:inline-flex}li,.sbb-timetable__row-transport{display:inline-flex;align-self:center}.sbb-timetable__row-transportnumber,.sbb-timetable__row-time{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700;line-height:unset;white-space:nowrap;align-self:center}.sbb-timetable__row{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;flex-direction:column;gap:var(--sbb-timetable-row-gap)}.sbb-timetable__row-header,.sbb-timetable__row-footer{animation:none}.sbb-timetable__row-header{display:flex;gap:var(--sbb-spacing-fixed-2x);align-items:center;line-height:var(--sbb-timetable-row-height-header)}.sbb-timetable__row-details,.sbb-timetable__row-hints{display:inline-flex;gap:var(--sbb-spacing-fixed-1x);align-items:center}.sbb-timetable__row-header p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;align-self:center}.sbb-timetable__row-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--sbb-spacing-fixed-2x);line-height:var(--sbb-timetable-row-height-footer)}.sbb-timetable__row-footer>span{align-self:center}.sbb-timetable__row-footer :only-child{margin-inline-start:auto}.sbb-timetable__row-quay--changed{color:var(--sbb-color-red)}.sbb-timetable__row-transport-wrapper,.sbb-timetable__row-warning{display:inline-flex}.sbb-loading{pointer-events:none}.sbb-loading__wrapper{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-2x)}.sbb-loading__row{width:100%;border-radius:var(--sbb-border-radius-1x);height:var(--sbb-timetable-row-height)}@media (min-width: 52.5rem){.sbb-loading__row{height:1.75rem}}@media (forced-colors: active){.sbb-loading__row{border:var(--sbb-border-width-1x) solid ButtonBorder!important}}.sbb-loading__row,.sbb-loading__badge{background:var(--sbb-color-cloud);animation:skeleton-pulse var(--sbb-timetable-row-skeleton-pulse-duration) ease-out infinite}.sbb-loading__row:first-of-type{height:var(--sbb-timetable-row-height-header);width:50%}.sbb-loading__row:last-of-type{height:var(--sbb-timetable-row-height-footer)}.sbb-loading__badge{margin-inline:auto calc(var(--sbb-spacing-fixed-3x) * -1);padding-inline-end:var(--sbb-spacing-fixed-6x);border-end-start-radius:var(--sbb-border-radius-4x);transform:skew(16deg);width:7.1875rem;height:1.25rem}@keyframes skeleton-pulse{0%{background:var(--sbb-color-cloud)}17%{background:var(--sbb-color-cloud)}50%{background:var(--sbb-color-milk)}67%{background:var(--sbb-color-milk)}to{background:var(--sbb-color-cloud)}}`;
15
- var Re = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, m = (e, r, a, n) => {
16
- for (var t = n > 1 ? void 0 : n ? Se(r, a) : r, s = e.length - 1, i; s >= 0; s--)
17
- (i = e[s]) && (t = (n ? i(r, a, t) : i(t)) || t);
18
- return n && t && Re(r, a, t), t;
19
- };
20
- const Ie = (e, r) => b`<span class="sbb-timetable__row-transport">
20
+ import { f as nt } from "./format-oBQcGL50.js";
21
+ const zt = At`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-row-gap: var(--sbb-spacing-fixed-2x);--sbb-timetable-row-height: 1.5625rem;--sbb-timetable-row-height-header: 1.25rem;--sbb-timetable-row-height-footer: 1rem;--sbb-timetable-row-skeleton-pulse-duration: 1.8s;display:block}:host([disable-animation]){--sbb-timetable-row-skeleton-pulse-duration: 0}.sbb-timetable__row-transport-icon{--sbb-icon-svg-width: 1.25rem;--sbb-icon-svg-height: 1.25rem}.sbb-travel-hints__item{--sbb-icon-svg-height: .875rem}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.sbb-timetable__row--quay{margin-inline-end:var(--sbb-spacing-fixed-1x)}.sbb-timetable__row--quay-type{float:left}ul{list-style:none;margin:0;padding:0;font-size:inherit;display:inline-flex}li,.sbb-timetable__row-transport{display:inline-flex;align-self:center}.sbb-timetable__row-transportnumber,.sbb-timetable__row-time{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700;line-height:unset;white-space:nowrap;align-self:center}.sbb-timetable__row{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;flex-direction:column;gap:var(--sbb-timetable-row-gap)}.sbb-timetable__row-header,.sbb-timetable__row-footer{animation:none}.sbb-timetable__row-header{display:flex;gap:var(--sbb-spacing-fixed-2x);align-items:center;line-height:var(--sbb-timetable-row-height-header)}.sbb-timetable__row-details,.sbb-timetable__row-hints{display:inline-flex;gap:var(--sbb-spacing-fixed-1x);align-items:center}.sbb-timetable__row-header p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;align-self:center}.sbb-timetable__row-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--sbb-spacing-fixed-2x);line-height:var(--sbb-timetable-row-height-footer)}.sbb-timetable__row-footer>span{align-self:center}.sbb-timetable__row-footer :only-child{margin-inline-start:auto}.sbb-timetable__row-quay--changed{color:var(--sbb-color-red)}.sbb-timetable__row-transport-wrapper,.sbb-timetable__row-warning{display:inline-flex}.sbb-loading{pointer-events:none}.sbb-loading__wrapper{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-2x)}.sbb-loading__row{width:100%;border-radius:var(--sbb-border-radius-1x);height:var(--sbb-timetable-row-height)}@media (min-width: 52.5rem){.sbb-loading__row{height:1.75rem}}@media (forced-colors: active){.sbb-loading__row{border:var(--sbb-border-width-1x) solid ButtonBorder!important}}.sbb-loading__row,.sbb-loading__badge{background:var(--sbb-color-cloud);animation:skeleton-pulse var(--sbb-timetable-row-skeleton-pulse-duration) ease-out infinite}.sbb-loading__row:first-of-type{height:var(--sbb-timetable-row-height-header);width:50%}.sbb-loading__row:last-of-type{height:var(--sbb-timetable-row-height-footer)}.sbb-loading__badge{margin-inline:auto calc(var(--sbb-spacing-fixed-3x) * -1);padding-inline-end:var(--sbb-spacing-fixed-6x);border-end-start-radius:var(--sbb-border-radius-4x);transform:skew(16deg);width:7.1875rem;height:1.25rem}@keyframes skeleton-pulse{0%{background:var(--sbb-color-cloud)}17%{background:var(--sbb-color-cloud)}50%{background:var(--sbb-color-milk)}67%{background:var(--sbb-color-milk)}to{background:var(--sbb-color-cloud)}}`, It = (e, i) => m`<span class="sbb-timetable__row-transport">
21
22
  <sbb-icon name=${e}></sbb-icon>
22
- <span class="sbb-screen-reader-only">${r}</span>
23
- </span>`, ke = (e, r) => {
24
- const a = ["M", "B", "T"].includes(e) ? " " : "";
25
- return b`<span class="sbb-timetable__row-transportnumber">
26
- ${r !== null ? e + a + r : e}
23
+ <span class="sbb-screen-reader-only">${i}</span>
24
+ </span>`, Mt = (e, i) => {
25
+ const s = ["M", "B", "T"].includes(e) ? " " : "";
26
+ return m`<span class="sbb-timetable__row-transportnumber">
27
+ ${i !== null ? e + s + i : e}
27
28
  </span>`;
28
- }, oe = (e) => {
29
- var r, a, n;
30
- return (n = (a = (r = e == null ? void 0 : e.find((t) => {
31
- var s, i;
32
- return (i = (s = t.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : i.reachableText;
33
- })) == null ? void 0 : r.serviceJourney) == null ? void 0 : a.serviceAlteration) == null ? void 0 : n.reachableText;
34
- }, Le = (e) => {
35
- var r, a, n;
36
- return (n = (a = (r = e == null ? void 0 : e.find((t) => {
37
- var s, i;
38
- return (i = (s = t.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : i.delayText;
39
- })) == null ? void 0 : r.serviceJourney) == null ? void 0 : a.serviceAlteration) == null ? void 0 : n.delayText;
40
- }, le = (e) => {
41
- var r, a, n;
42
- return (n = (a = (r = e == null ? void 0 : e.find((t) => {
43
- var s, i;
44
- return !!((i = (s = t.serviceJourney) == null ? void 0 : s.serviceAlteration) != null && i.redirectedText);
45
- })) == null ? void 0 : r.serviceJourney) == null ? void 0 : a.serviceAlteration) == null ? void 0 : n.redirectedText;
46
- }, be = (e) => {
47
- var r, a, n;
48
- return (n = (a = (r = e == null ? void 0 : e.find((t) => {
49
- var s, i;
50
- return !!((i = (s = t.serviceJourney) == null ? void 0 : s.serviceAlteration) != null && i.unplannedStopPointsText);
51
- })) == null ? void 0 : r.serviceJourney) == null ? void 0 : a.serviceAlteration) == null ? void 0 : n.unplannedStopPointsText;
52
- }, Pe = (e) => {
53
- const r = {
29
+ }, ot = (e) => {
30
+ var i, s, n;
31
+ return (n = (s = (i = e == null ? void 0 : e.find((b) => {
32
+ var r, p;
33
+ return (p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) == null ? void 0 : p.reachableText;
34
+ })) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.reachableText;
35
+ }, Et = (e) => {
36
+ var i, s, n;
37
+ return (n = (s = (i = e == null ? void 0 : e.find((b) => {
38
+ var r, p;
39
+ return (p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) == null ? void 0 : p.delayText;
40
+ })) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.delayText;
41
+ }, lt = (e) => {
42
+ var i, s, n;
43
+ return (n = (s = (i = e == null ? void 0 : e.find((b) => {
44
+ var r, p;
45
+ return !!((p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) != null && p.redirectedText);
46
+ })) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.redirectedText;
47
+ }, ct = (e) => {
48
+ var i, s, n;
49
+ return (n = (s = (i = e == null ? void 0 : e.find((b) => {
50
+ var r, p;
51
+ return !!((p = (r = b.serviceJourney) == null ? void 0 : r.serviceAlteration) != null && p.unplannedStopPointsText);
52
+ })) == null ? void 0 : i.serviceJourney) == null ? void 0 : s.serviceAlteration) == null ? void 0 : n.unplannedStopPointsText;
53
+ }, Lt = (e) => {
54
+ const i = {
54
55
  DISTURBANCE: 0,
55
56
  INFORMATION: 1,
56
57
  DELAY: 2,
@@ -58,16 +59,14 @@ const Ie = (e, r) => b`<span class="sbb-timetable__row-transport">
58
59
  CONSTRUCTION_SITE: 4,
59
60
  END_MESSAGE: 5
60
61
  };
61
- return [...e].sort(
62
- (a, n) => r[a.cause] - r[n.cause]
63
- );
64
- }, Ee = (e) => {
65
- var r;
62
+ return [...e].sort((s, n) => i[s.cause] - i[n.cause]);
63
+ }, Rt = (e) => {
64
+ var i;
66
65
  switch (e == null ? void 0 : e.cause) {
67
66
  case "DISTURBANCE":
68
67
  return {
69
68
  name: "disruption",
70
- text: (r = e == null ? void 0 : e.broadcastMessages) != null && r.length ? e == null ? void 0 : e.broadcastMessages[0].title : ""
69
+ text: (i = e == null ? void 0 : e.broadcastMessages) != null && i.length ? e == null ? void 0 : e.broadcastMessages[0].title : ""
71
70
  };
72
71
  case "INFORMATION":
73
72
  return {
@@ -95,59 +94,159 @@ const Ie = (e, r) => b`<span class="sbb-timetable__row-transport">
95
94
  text: e != null && e.broadcastMessages.length ? e == null ? void 0 : e.broadcastMessages[0].title : ""
96
95
  };
97
96
  }
98
- }, De = (e, r) => {
99
- const { summary: a, legs: n } = e || {}, t = n == null ? void 0 : n.filter((i) => ce(i)), { tripStatus: s } = a || {};
100
- if (s != null && s.cancelled || s != null && s.partiallyCancelled)
101
- return { name: "cancellation", text: s == null ? void 0 : s.cancelledText };
102
- if (oe(t))
103
- return { name: "missed-connection", text: oe(t) };
104
- if (s != null && s.alternative) return { name: "alternative", text: s.alternativeText };
105
- if (le(t)) return { name: "reroute", text: le(t) };
106
- if (be(t)) return { name: "add-stop", text: be(t) };
107
- if (s != null && s.delayed || s != null && s.delayedUnknown)
108
- return { name: "delay", text: Le(t) };
109
- if (s != null && s.quayChanged) {
110
- const i = t[0].departure;
97
+ }, St = (e, i) => {
98
+ const { summary: s, legs: n } = e || {}, b = n == null ? void 0 : n.filter((p) => bt(p)), { tripStatus: r } = s || {};
99
+ if (r != null && r.cancelled || r != null && r.partiallyCancelled)
100
+ return { name: "cancellation", text: r == null ? void 0 : r.cancelledText };
101
+ if (ot(b))
102
+ return { name: "missed-connection", text: ot(b) };
103
+ if (r != null && r.alternative)
104
+ return { name: "alternative", text: r.alternativeText };
105
+ if (lt(b))
106
+ return { name: "reroute", text: lt(b) };
107
+ if (ct(b))
108
+ return { name: "add-stop", text: ct(b) };
109
+ if (r != null && r.delayed || r != null && r.delayedUnknown)
110
+ return { name: "delay", text: Et(b) };
111
+ if (r != null && r.quayChanged) {
112
+ const p = b[0].departure;
111
113
  return {
112
114
  name: "platform-change",
113
- text: i.quayChanged ? i.quayChangedText : ve[r]
115
+ text: p.quayChanged ? p.quayChangedText : Tt[i]
114
116
  };
115
117
  }
116
118
  return {};
117
- }, Be = (e) => {
118
- const r = ["RR", "RK", "RC", "RL", "RM", "RS", "RU", "XP", "XR", "XT"];
119
- return e.reduce((a, n) => {
120
- if (a) return a;
121
- if (r.includes(n.name))
119
+ }, Ot = (e) => {
120
+ const i = ["RR", "RK", "RC", "RL", "RM", "RS", "RU", "XP", "XR", "XT"];
121
+ return e.reduce((s, n) => {
122
+ if (s)
123
+ return s;
124
+ if (i.includes(n.name))
122
125
  return { ...n, name: "RR" };
123
126
  }, void 0);
124
- }, qe = (e) => {
125
- const r = ["Z", "SB", "SZ", "VR", "TG"];
126
- return e.filter((n, t) => e.findIndex((s) => s.name === n.name) === t).filter((n) => r.includes(n.name)).sort((n, t) => r.indexOf(n.name) - r.indexOf(t.name));
127
- }, k = (e) => {
128
- const r = Be(e), a = qe(e);
129
- return r === void 0 ? a : a.length ? a[0].name === "Z" && a[1] ? [a[0], r, a[1]].concat(
130
- a.slice(2)
131
- ) : [r, ...a] : [r];
127
+ }, Pt = (e) => {
128
+ const i = ["Z", "SB", "SZ", "VR", "TG"];
129
+ return e.filter((n, b) => e.findIndex((r) => r.name === n.name) === b).filter((n) => i.includes(n.name)).sort((n, b) => i.indexOf(n.name) - i.indexOf(b.name));
130
+ }, ee = (e) => {
131
+ const i = Ot(e), s = Pt(e);
132
+ return i === void 0 ? s : s.length ? s[0].name === "Z" && s[1] ? [s[0], i, s[1]].concat(s.slice(2)) : [i, ...s] : [i];
132
133
  };
133
- let p = class extends Ne {
134
- constructor() {
135
- super(...arguments), this.loadingTrip = !1, this.loadingPrice = !1, this._now = null, this._language = new fe(this);
136
- }
137
- set now(e) {
138
- this._now = Y.getValidDateOrNull(Y.deserialize(e));
139
- }
140
- get now() {
141
- return this._now ?? /* @__PURE__ */ new Date();
142
- }
143
- willUpdate(e) {
144
- super.willUpdate(e), e.has("loadingTrip") && ye(this, "role", this.loadingTrip ? null : "rowgroup");
145
- }
146
- /** The skeleton render function for the loading state */
147
- _renderSkeleton() {
148
- return b`
134
+ let ta = (() => {
135
+ var M, E, L, R, S, O, P, D, F, B, _;
136
+ let e = [Ct("sbb-timetable-row")], i, s = [], n, b = Nt, r = [], p, te = [], ae = [], ie, se = [], re = [], ne, oe = [], le = [], ce, be = [], de = [], he, ge = [], me = [], pe, _e = [], ue = [], fe, ye = [], ve = [], xe, we = [], $e = [], Te, Ae = [], Ne = [], Ce, ke = [], ze = [], Ie;
137
+ return _ = class extends b {
138
+ constructor() {
139
+ super(...arguments);
140
+ A(this, M);
141
+ A(this, E);
142
+ A(this, L);
143
+ A(this, R);
144
+ A(this, S);
145
+ A(this, O);
146
+ A(this, P);
147
+ A(this, D);
148
+ A(this, F);
149
+ A(this, B);
150
+ h(this, M, (d(this, r), d(this, te, null))), h(this, E, (d(this, ae), d(this, se, null))), h(this, L, (d(this, re), d(this, oe, !1))), h(this, R, (d(this, le), d(this, be, null))), h(this, S, (d(this, de), d(this, ge, !1))), h(this, O, (d(this, me), d(this, _e, !1))), h(this, P, (d(this, ue), d(this, ye, !1))), h(this, D, (d(this, ve), d(this, we, ""))), h(this, F, (d(this, $e), d(this, Ae, !1))), h(this, B, (d(this, Ne), d(this, ke, !1))), this._now = (d(this, ze), null), this._language = new ft(this);
151
+ }
152
+ /** The trip Prop. */
153
+ get trip() {
154
+ return T(this, M);
155
+ }
156
+ set trip(a) {
157
+ h(this, M, a);
158
+ }
159
+ /** The price Prop, which consists of the data for the badge. */
160
+ get price() {
161
+ return T(this, E);
162
+ }
163
+ set price(a) {
164
+ h(this, E, a);
165
+ }
166
+ /** This will be forwarded to the sbb-pearl-chain component - if true the position won't be animated. */
167
+ get disableAnimation() {
168
+ return T(this, L);
169
+ }
170
+ set disableAnimation(a) {
171
+ h(this, L, a);
172
+ }
173
+ /** This will be forwarded to the notices section */
174
+ get boarding() {
175
+ return T(this, R);
176
+ }
177
+ set boarding(a) {
178
+ h(this, R, a);
179
+ }
180
+ /**
181
+ * The loading state -
182
+ * when this is true it will be render skeleton with an idling animation
183
+ */
184
+ get loadingTrip() {
185
+ return T(this, S);
186
+ }
187
+ set loadingTrip(a) {
188
+ h(this, S, a);
189
+ }
190
+ /**
191
+ * The Footpath attribute for rendering different icons
192
+ * true: render a11y-icon
193
+ * false: render walk-icon
194
+ * default: render walk-icon
195
+ */
196
+ get a11yFootpath() {
197
+ return T(this, O);
198
+ }
199
+ set a11yFootpath(a) {
200
+ h(this, O, a);
201
+ }
202
+ /**
203
+ * The loading state -
204
+ * when this is true it will be render skeleton with an idling animation
205
+ */
206
+ get loadingPrice() {
207
+ return T(this, P);
208
+ }
209
+ set loadingPrice(a) {
210
+ h(this, P, a);
211
+ }
212
+ /**
213
+ * Hidden label for the card action. It overrides the automatically generated accessibility text for the component. Use this prop to provide custom accessibility information for the component.
214
+ */
215
+ get cardActionLabel() {
216
+ return T(this, D);
217
+ }
218
+ set cardActionLabel(a) {
219
+ h(this, D, a);
220
+ }
221
+ /** This will be forwarded to the sbb-card component as aria-expanded. */
222
+ get accessibilityExpanded() {
223
+ return T(this, F);
224
+ }
225
+ set accessibilityExpanded(a) {
226
+ h(this, F, a);
227
+ }
228
+ /** When this prop is true the sbb-card will be in the active state. */
229
+ get active() {
230
+ return T(this, B);
231
+ }
232
+ set active(a) {
233
+ h(this, B, a);
234
+ }
235
+ /** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
236
+ set now(a) {
237
+ this._now = Ye.getValidDateOrNull(Ye.deserialize(a));
238
+ }
239
+ get now() {
240
+ return this._now ?? /* @__PURE__ */ new Date();
241
+ }
242
+ willUpdate(a) {
243
+ super.willUpdate(a), a.has("loadingTrip") && yt(this, "role", this.loadingTrip ? null : "rowgroup");
244
+ }
245
+ /** The skeleton render function for the loading state */
246
+ _renderSkeleton() {
247
+ return m`
149
248
  <sbb-card size="l" class="sbb-loading">
150
- ${this.loadingPrice ? b`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : c}
249
+ ${this.loadingPrice ? m`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : f}
151
250
  <div class="sbb-loading__wrapper">
152
251
  <div class="sbb-loading__row"></div>
153
252
  <div class="sbb-loading__row"></div>
@@ -155,223 +254,188 @@ let p = class extends Ne {
155
254
  </div>
156
255
  </sbb-card>
157
256
  `;
158
- }
159
- _getQuayTypeStrings() {
160
- var n, t, s;
161
- if (!((n = this.trip.summary) != null && n.product)) return null;
162
- const e = (t = this.trip.legs) == null ? void 0 : t.filter((i) => ce(i)), a = ((s = this.trip.summary.product) == null ? void 0 : s.vehicleMode) === "TRAIN" ? e[0].serviceJourney.quayTypeShortName || "" : e[0].serviceJourney.quayTypeName || "";
163
- return {
164
- long: xe[this._language.current] + " " + a,
165
- short: a
166
- };
167
- }
168
- /** map Quay */
169
- _renderQuayType() {
170
- var r;
171
- if (!((r = this.trip.summary) != null && r.product)) return;
172
- const e = this._getQuayTypeStrings();
173
- return b`
257
+ }
258
+ _getQuayTypeStrings() {
259
+ var $, l, z;
260
+ if (!(($ = this.trip.summary) != null && $.product))
261
+ return null;
262
+ const a = (l = this.trip.legs) == null ? void 0 : l.filter((u) => bt(u)), o = ((z = this.trip.summary.product) == null ? void 0 : z.vehicleMode) === "TRAIN" ? a[0].serviceJourney.quayTypeShortName || "" : a[0].serviceJourney.quayTypeName || "";
263
+ return {
264
+ long: vt[this._language.current] + " " + o,
265
+ short: o
266
+ };
267
+ }
268
+ /** map Quay */
269
+ _renderQuayType() {
270
+ var t;
271
+ if (!((t = this.trip.summary) != null && t.product))
272
+ return;
273
+ const a = this._getQuayTypeStrings();
274
+ return m`
174
275
  <span class="sbb-timetable__row--quay">
175
- <span class="sbb-screen-reader-only">${e == null ? void 0 : e.long}&nbsp;</span>
276
+ <span class="sbb-screen-reader-only">${a == null ? void 0 : a.long}&nbsp;</span>
176
277
  <span class="sbb-timetable__row--quay-type" aria-hidden="true"
177
- >${e == null ? void 0 : e.short}</span
278
+ >${a == null ? void 0 : a.short}</span
178
279
  >
179
280
  </span>
180
281
  `;
181
- }
182
- _handleHimCus(e) {
183
- var t;
184
- const { situations: r } = e || {}, a = r && Pe(r), n = De(e, this._language.current);
185
- return {
186
- cus: (t = Object.keys(n)) != null && t.length ? n : null,
187
- him: r != null && r.length ? Ee(a[0]) : null
188
- };
189
- }
190
- _getAccessibilityText(e) {
191
- var P, E, D, B, q, U, z, W, F, J, j, H;
192
- const { summary: r, legs: a, notices: n } = e || {}, {
193
- departureWalk: t,
194
- arrivalWalk: s,
195
- departure: i,
196
- arrival: l,
197
- product: g,
198
- direction: R,
199
- occupancy: o,
200
- duration: _
201
- } = r || {}, { departureTimeAttribute: h, arrivalTimeAttribute: y } = Me(
202
- a,
203
- t || 0,
204
- s || 0,
205
- this._language.current,
206
- this.a11yFootpath
207
- ), f = i != null && i.time ? se(i.time) : void 0, v = l != null && l.time ? se(l.time) : void 0, w = h ? `${h.text} ${h.duration}, ` : "", $ = y ? `${y.text} ${y.duration}, ` : "", T = f ? `${X[this._language.current]}: ${ie(f, "HH:mm")}, ` : "", C = () => {
208
- var M;
209
- return i != null && i.quayFormatted ? `${i != null && i.quayChanged ? `${ae[this._language.current]} ` : ""}${(M = this._getQuayTypeStrings()) == null ? void 0 : M.long} ${i == null ? void 0 : i.quayFormatted}, ` : "";
210
- }, N = g && g.vehicleMode ? O[g.vehicleMode.toLowerCase()] && `${O[g.vehicleMode.toLowerCase()][this._language.current]}, ` : "", A = g != null && g.vehicleSubModeShortName ? `${g.vehicleSubModeShortName} ${g.line || ""}, ` : "", S = `${Z[this._language.current]} ${R}, `, d = this._handleHimCus(e), x = (P = d == null ? void 0 : d.cus) != null && P.text ? `${G[this._language.current]}: ${(E = d == null ? void 0 : d.cus) == null ? void 0 : E.text}, ` : "", de = (D = d == null ? void 0 : d.him) != null && D.text ? `${G[this._language.current]}: ${(B = d == null ? void 0 : d.him) == null ? void 0 : B.text}, ` : "", pe = this.boarding ? `${this.boarding.text}, ` : "", ge = `${(q = this.price) != null && q.isDiscount ? V[this._language.current] : ""} ${(U = this.price) != null && U.text && ((z = this.price) != null && z.price) ? (((W = this.price) == null ? void 0 : W.text) || "") + " " + (((F = this.price) == null ? void 0 : F.price) || "") + ", " : ""}`, he = (a == null ? void 0 : a.length) > 1 ? `${(a == null ? void 0 : a.length) - 1} ${we[this._language.current]}, ` : "", me = v ? `${$e[this._language.current]}: ${ie(v, "HH:mm")}, ` : "";
211
- let I = "";
212
- o && (o.firstClass && o.firstClass !== "UNKNOWN" && (I += `${ee.first[this._language.current]} ${(J = te[o.firstClass.toLowerCase()]) == null ? void 0 : J[this._language.current]}.`), o.secondClass && o.secondClass !== "UNKNOWN" && (I += ` ${ee.second[this._language.current]} ${(j = te[o.secondClass.toLowerCase()]) == null ? void 0 : j[this._language.current]}.`));
213
- const L = n && k(n).length && ((H = k(n)) == null ? void 0 : H.map((Q, M) => {
214
- var K;
215
- return M < 4 && ((K = Q.text) == null ? void 0 : K.template);
216
- }).join(", ")) + ", ", ue = L ? `${Te[this._language.current]}: ${L}` : "", _e = _ && _ > 0 ? `${re[this._language.current]} ${ne(_, this._language.current).long}, ` : "";
217
- return `${w} ${T} ${C()} ${N} ${A} ${S} ${x} ${pe} ${ge} ${x ? "" : de} ${me} ${$} ${_e} ${he} ${I} ${ue}`;
218
- }
219
- render() {
220
- var w, $, T, C, N;
221
- if (this.loadingTrip)
222
- return this._renderSkeleton();
223
- const { legs: e, id: r, notices: a, summary: n } = this.trip || {}, {
224
- product: t,
225
- direction: s,
226
- departureWalk: i,
227
- departure: l,
228
- arrival: g,
229
- arrivalWalk: R,
230
- occupancy: o,
231
- duration: _
232
- } = n || {}, h = this._handleHimCus(this.trip), y = !!h.cus || !!h.him, f = a && k(a), v = _ ? ne(_, this._language.current) : null;
233
- return b`
234
- <sbb-card size="l" id=${r}>
282
+ }
283
+ _handleHimCus(a) {
284
+ var l;
285
+ const { situations: t } = a || {}, o = t && Lt(t), $ = St(a, this._language.current);
286
+ return {
287
+ cus: (l = Object.keys($)) != null && l.length ? $ : null,
288
+ him: t != null && t.length ? Rt(o[0]) : null
289
+ };
290
+ }
291
+ _getAccessibilityText(a) {
292
+ var Le, Re, Se, Oe, Pe, De, Fe, Be, qe, Ue, We, Je;
293
+ const { summary: t, legs: o, notices: $ } = a || {}, { departureWalk: l, arrivalWalk: z, departure: u, arrival: g, product: v, direction: Z, occupancy: c, duration: C } = t || {}, { departureTimeAttribute: x, arrivalTimeAttribute: q } = kt(o, l || 0, z || 0, this._language.current, this.a11yFootpath), k = u != null && u.time ? st(u.time) : void 0, U = g != null && g.time ? st(g.time) : void 0, W = x ? `${x.text} ${x.duration}, ` : "", J = q ? `${q.text} ${q.duration}, ` : "", j = k ? `${Xe[this._language.current]}: ${nt(k, "HH:mm")}, ` : "", H = () => {
294
+ var Y;
295
+ return u != null && u.quayFormatted ? `${u != null && u.quayChanged ? `${it[this._language.current]} ` : ""}${(Y = this._getQuayTypeStrings()) == null ? void 0 : Y.long} ${u == null ? void 0 : u.quayFormatted}, ` : "";
296
+ }, Q = v && v.vehicleMode ? X[v.vehicleMode.toLowerCase()] && `${X[v.vehicleMode.toLowerCase()][this._language.current]}, ` : "", G = v != null && v.vehicleSubModeShortName ? `${v.vehicleSubModeShortName} ${v.line || ""}, ` : "", K = `${Ze[this._language.current]} ${Z}, `, y = this._handleHimCus(a), Me = (Le = y == null ? void 0 : y.cus) != null && Le.text ? `${Ge[this._language.current]}: ${(Re = y == null ? void 0 : y.cus) == null ? void 0 : Re.text}, ` : "", dt = (Se = y == null ? void 0 : y.him) != null && Se.text ? `${Ge[this._language.current]}: ${(Oe = y == null ? void 0 : y.him) == null ? void 0 : Oe.text}, ` : "", ht = this.boarding ? `${this.boarding.text}, ` : "", gt = `${(Pe = this.price) != null && Pe.isDiscount ? Ve[this._language.current] : ""} ${(De = this.price) != null && De.text && ((Fe = this.price) != null && Fe.price) ? (((Be = this.price) == null ? void 0 : Be.text) || "") + " " + (((qe = this.price) == null ? void 0 : qe.price) || "") + ", " : ""}`, mt = (o == null ? void 0 : o.length) > 1 ? `${(o == null ? void 0 : o.length) - 1} ${xt[this._language.current]}, ` : "", pt = U ? `${wt[this._language.current]}: ${nt(U, "HH:mm")}, ` : "";
297
+ let V = "";
298
+ c && (c.firstClass && c.firstClass !== "UNKNOWN" && (V += `${et.first[this._language.current]} ${(Ue = tt[c.firstClass.toLowerCase()]) == null ? void 0 : Ue[this._language.current]}.`), c.secondClass && c.secondClass !== "UNKNOWN" && (V += ` ${et.second[this._language.current]} ${(We = tt[c.secondClass.toLowerCase()]) == null ? void 0 : We[this._language.current]}.`));
299
+ const Ee = $ && ee($).length && ((Je = ee($)) == null ? void 0 : Je.map((je, Y) => {
300
+ var He;
301
+ return Y < 4 && ((He = je.text) == null ? void 0 : He.template);
302
+ }).join(", ")) + ", ", _t = Ee ? `${$t[this._language.current]}: ${Ee}` : "", ut = C && C > 0 ? `${at[this._language.current]} ${rt(C, this._language.current).long}, ` : "";
303
+ return `${W} ${j} ${H()} ${Q} ${G} ${K} ${Me} ${ht} ${gt} ${Me ? "" : dt} ${pt} ${J} ${ut} ${mt} ${V} ${_t}`;
304
+ }
305
+ render() {
306
+ var W, J, j, H;
307
+ if (this.loadingTrip)
308
+ return this._renderSkeleton();
309
+ const { legs: a, id: t, notices: o, summary: $ } = this.trip || {}, { product: l, direction: z, departureWalk: u, departure: g, arrival: v, arrivalWalk: Z, occupancy: c, duration: C } = $ || {}, x = this._handleHimCus(this.trip), q = !!x.cus || !!x.him, k = o && ee(o), U = C ? rt(C, this._language.current) : null;
310
+ return m`
311
+ <sbb-card size="l" id=${t}>
235
312
  <sbb-card-button
236
313
  ?active=${this.active}
237
- aria-expanded=${((w = this.accessibilityExpanded) == null ? void 0 : w.toString()) ?? c}
314
+ aria-expanded=${this.accessibilityExpanded ? "true" : f}
238
315
  >
239
316
  ${this.cardActionLabel ? this.cardActionLabel : this._getAccessibilityText(this.trip)}
240
317
  </sbb-card-button>
241
- ${this.loadingPrice ? b`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : c}
242
- ${this.price && !this.loadingPrice ? b`<sbb-card-badge color=${this.price.isDiscount ? "charcoal" : "white"}>
243
- ${this.price.isDiscount ? b`<span aria-hidden="true">
318
+ ${this.loadingPrice ? m`<sbb-card-badge class="sbb-loading__badge"></sbb-card-badge>` : f}
319
+ ${this.price && !this.loadingPrice ? m`<sbb-card-badge color=${this.price.isDiscount ? "charcoal" : "white"}>
320
+ ${this.price.isDiscount ? m`<span aria-hidden="true">
244
321
  %<span class="sbb-screen-reader-only"
245
- >${V[this._language.current]}</span
322
+ >${Ve[this._language.current]}</span
246
323
  >
247
- </span>` : c}
248
- ${this.price.text ? b`<span>${this.price.text}</span>` : c}
249
- ${this.price.price ? b`<span>${this.price.price}</span>` : c}
250
- </sbb-card-badge>` : c}
324
+ </span>` : f}
325
+ ${this.price.text ? m`<span>${this.price.text}</span>` : f}
326
+ ${this.price.price ? m`<span>${this.price.price}</span>` : f}
327
+ </sbb-card-badge>` : f}
251
328
  <div class="sbb-timetable__row" role="row">
252
329
  <div class="sbb-timetable__row-header" role="gridcell">
253
330
  <div class="sbb-timetable__row-details">
254
- ${(t == null ? void 0 : t.corporateIdentityPictogram) && b`<span class="sbb-timetable__row-transport-wrapper">
331
+ ${(l == null ? void 0 : l.corporateIdentityPictogram) && m`<span class="sbb-timetable__row-transport-wrapper">
255
332
  <sbb-icon
256
333
  class="sbb-timetable__row-transport-icon"
257
- name="picto:${t.corporateIdentityPictogram}"
334
+ name="picto:${l.corporateIdentityPictogram}"
258
335
  ></sbb-icon>
259
336
  <span class="sbb-screen-reader-only">
260
- ${t && t.vehicleMode && O[t.vehicleMode.toLowerCase()] && O[t.vehicleMode.toLowerCase()][this._language.current]}
337
+ ${l && l.vehicleMode && X[l.vehicleMode.toLowerCase()] && X[l.vehicleMode.toLowerCase()][this._language.current]}
261
338
  &nbsp;
262
339
  </span>
263
340
  </span>`}
264
- ${t && (t.corporateIdentityIcon ? Ie(t.corporateIdentityIcon, t.name) : t.vehicleSubModeShortName && ke(t.vehicleSubModeShortName, t == null ? void 0 : t.line))}
341
+ ${l && (l.corporateIdentityIcon ? It(l.corporateIdentityIcon, l.name) : l.vehicleSubModeShortName && Mt(l.vehicleSubModeShortName, l == null ? void 0 : l.line))}
265
342
  </div>
266
- ${s ? b`<p>${`${Z[this._language.current]} ${s}`}</p>` : c}
343
+ ${z ? m`<p>${`${Ze[this._language.current]} ${z}`}</p>` : f}
267
344
  </div>
268
345
  <sbb-pearl-chain-time
269
346
  role="gridcell"
270
- .legs=${e}
271
- .departureTime=${l == null ? void 0 : l.time}
272
- .arrivalTime=${g == null ? void 0 : g.time}
273
- .departureWalk=${i}
274
- .arrivalWalk=${R}
347
+ .legs=${a}
348
+ .departureTime=${g == null ? void 0 : g.time}
349
+ .arrivalTime=${v == null ? void 0 : v.time}
350
+ .departureWalk=${u}
351
+ .arrivalWalk=${Z}
275
352
  ?disable-animation=${this.disableAnimation}
276
353
  ?a11y-footpath=${this.a11yFootpath}
277
354
  .now=${this.now}
278
355
  ></sbb-pearl-chain-time>
279
356
  <div class="sbb-timetable__row-footer" role="gridcell">
280
- ${t && (l != null && l.quayFormatted) ? b`<span
281
- class=${l != null && l.quayChanged ? "sbb-timetable__row-quay--changed" : c}
357
+ ${l && (g != null && g.quayFormatted) ? m`<span
358
+ class=${g != null && g.quayChanged ? "sbb-timetable__row-quay--changed" : f}
282
359
  >
283
360
  <span class="sbb-screen-reader-only">
284
- ${`${X[this._language.current]} ${l != null && l.quayChanged ? ae[this._language.current] : ""}`}
361
+ ${`${Xe[this._language.current]} ${g != null && g.quayChanged ? it[this._language.current] : ""}`}
285
362
  &nbsp;
286
363
  </span>
287
- ${this._renderQuayType()} ${l == null ? void 0 : l.quayFormatted}
288
- </span>` : c}
289
- ${o != null && o.firstClass && (o == null ? void 0 : o.firstClass) !== "UNKNOWN" || o != null && o.secondClass && o.secondClass !== "UNKNOWN" ? b`<sbb-timetable-occupancy
290
- .firstClassOccupancy=${($ = o == null ? void 0 : o.firstClass) == null ? void 0 : $.toLowerCase()}
291
- .secondClassOccupancy=${(T = o == null ? void 0 : o.secondClass) == null ? void 0 : T.toLowerCase()}
292
- ></sbb-timetable-occupancy>` : c}
293
- ${f && f.length || this.boarding ? b`<ul class="sbb-timetable__row-hints" role="list">
294
- ${f == null ? void 0 : f.map(
295
- (A, S) => {
296
- var d, x;
297
- return S < 4 ? b`<li>
364
+ ${this._renderQuayType()} ${g == null ? void 0 : g.quayFormatted}
365
+ </span>` : f}
366
+ ${c != null && c.firstClass && (c == null ? void 0 : c.firstClass) !== "UNKNOWN" || c != null && c.secondClass && c.secondClass !== "UNKNOWN" ? m`<sbb-timetable-occupancy
367
+ .firstClassOccupancy=${(W = c == null ? void 0 : c.firstClass) == null ? void 0 : W.toLowerCase()}
368
+ .secondClassOccupancy=${(J = c == null ? void 0 : c.secondClass) == null ? void 0 : J.toLowerCase()}
369
+ ></sbb-timetable-occupancy>` : f}
370
+ ${k && k.length || this.boarding ? m`<ul class="sbb-timetable__row-hints" role="list">
371
+ ${k == null ? void 0 : k.map((Q, G) => {
372
+ var K, y;
373
+ return G < 4 ? m`<li>
298
374
  <sbb-icon
299
375
  class="sbb-travel-hints__item"
300
- name=${"sa-" + ((d = A.name) == null ? void 0 : d.toLowerCase())}
376
+ name=${"sa-" + ((K = Q.name) == null ? void 0 : K.toLowerCase())}
301
377
  ></sbb-icon>
302
- <span class="sbb-screen-reader-only">${(x = A.text) == null ? void 0 : x.template}</span>
303
- </li>` : c;
304
- }
305
- )}
306
- ${this.boarding ? b`<li>
378
+ <span class="sbb-screen-reader-only">${(y = Q.text) == null ? void 0 : y.template}</span>
379
+ </li>` : f;
380
+ })}
381
+ ${this.boarding ? m`<li>
307
382
  <sbb-icon
308
383
  class="sbb-travel-hints__item"
309
- name=${(C = this.boarding) == null ? void 0 : C.name}
310
- aria-label=${(N = this.boarding) == null ? void 0 : N.text}
384
+ name=${(j = this.boarding) == null ? void 0 : j.name}
385
+ aria-label=${(H = this.boarding) == null ? void 0 : H.text}
311
386
  aria-hidden="false"
312
387
  ></sbb-icon>
313
- </li>` : c}
314
- </ul>` : c}
315
- ${_ && _ > 0 ? b`<time>
388
+ </li>` : f}
389
+ </ul>` : f}
390
+ ${C && C > 0 ? m`<time>
316
391
  <span class="sbb-screen-reader-only">
317
- ${`${re[this._language.current]} ${v.long}`}
392
+ ${`${at[this._language.current]} ${U.long}`}
318
393
  </span>
319
- <span aria-hidden="true">${v.short}</span>
320
- </time>` : c}
321
- ${y && (h.cus || h.him) ? b`<span class="sbb-timetable__row-warning">
322
- <sbb-icon name=${(h.cus || h.him).name}></sbb-icon>
323
- <span class="sbb-screen-reader-only">${(h.cus || h.him).text}</span>
324
- </span>` : c}
394
+ <span aria-hidden="true">${U.short}</span>
395
+ </time>` : f}
396
+ ${q && (x.cus || x.him) ? m`<span class="sbb-timetable__row-warning">
397
+ <sbb-icon name=${(x.cus || x.him).name}></sbb-icon>
398
+ <span class="sbb-screen-reader-only">${(x.cus || x.him).text}</span>
399
+ </span>` : f}
325
400
  </div>
326
401
  </div>
327
402
  </sbb-card>
328
403
  `;
329
- }
330
- };
331
- p.styles = Oe;
332
- m([
333
- u({ type: Object })
334
- ], p.prototype, "trip", 2);
335
- m([
336
- u({ type: Object })
337
- ], p.prototype, "price", 2);
338
- m([
339
- u({ attribute: "disable-animation", reflect: !0, type: Boolean })
340
- ], p.prototype, "disableAnimation", 2);
341
- m([
342
- u({ type: Object })
343
- ], p.prototype, "boarding", 2);
344
- m([
345
- u({ attribute: "loading-trip", type: Boolean })
346
- ], p.prototype, "loadingTrip", 2);
347
- m([
348
- u({ attribute: "a11y-footpath", type: Boolean })
349
- ], p.prototype, "a11yFootpath", 2);
350
- m([
351
- u({ attribute: "loading-price", type: Boolean })
352
- ], p.prototype, "loadingPrice", 2);
353
- m([
354
- u({ attribute: "card-action-label" })
355
- ], p.prototype, "cardActionLabel", 2);
356
- m([
357
- u({ attribute: "accessibility-expanded", type: Boolean })
358
- ], p.prototype, "accessibilityExpanded", 2);
359
- m([
360
- u({ type: Boolean })
361
- ], p.prototype, "active", 2);
362
- m([
363
- u()
364
- ], p.prototype, "now", 1);
365
- p = m([
366
- Ae("sbb-timetable-row")
367
- ], p);
404
+ }
405
+ }, M = new WeakMap(), E = new WeakMap(), L = new WeakMap(), R = new WeakMap(), S = new WeakMap(), O = new WeakMap(), P = new WeakMap(), D = new WeakMap(), F = new WeakMap(), B = new WeakMap(), n = _, (() => {
406
+ const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(b[Symbol.metadata] ?? null) : void 0;
407
+ p = [N({ type: Object })], ie = [N({ type: Object })], ne = [I(), N({ attribute: "disable-animation", reflect: !0, type: Boolean })], ce = [N({ type: Object })], he = [I(), N({ attribute: "loading-trip", type: Boolean })], pe = [I(), N({ attribute: "a11y-footpath", type: Boolean })], fe = [I(), N({ attribute: "loading-price", type: Boolean })], xe = [I(), N({ attribute: "card-action-label" })], Te = [I(), N({ attribute: "accessibility-expanded", type: Boolean })], Ce = [I(), N({ type: Boolean })], Ie = [N()], w(_, null, p, { kind: "accessor", name: "trip", static: !1, private: !1, access: { has: (t) => "trip" in t, get: (t) => t.trip, set: (t, o) => {
408
+ t.trip = o;
409
+ } }, metadata: a }, te, ae), w(_, null, ie, { kind: "accessor", name: "price", static: !1, private: !1, access: { has: (t) => "price" in t, get: (t) => t.price, set: (t, o) => {
410
+ t.price = o;
411
+ } }, metadata: a }, se, re), w(_, null, ne, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (t) => "disableAnimation" in t, get: (t) => t.disableAnimation, set: (t, o) => {
412
+ t.disableAnimation = o;
413
+ } }, metadata: a }, oe, le), w(_, null, ce, { kind: "accessor", name: "boarding", static: !1, private: !1, access: { has: (t) => "boarding" in t, get: (t) => t.boarding, set: (t, o) => {
414
+ t.boarding = o;
415
+ } }, metadata: a }, be, de), w(_, null, he, { kind: "accessor", name: "loadingTrip", static: !1, private: !1, access: { has: (t) => "loadingTrip" in t, get: (t) => t.loadingTrip, set: (t, o) => {
416
+ t.loadingTrip = o;
417
+ } }, metadata: a }, ge, me), w(_, null, pe, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (t) => "a11yFootpath" in t, get: (t) => t.a11yFootpath, set: (t, o) => {
418
+ t.a11yFootpath = o;
419
+ } }, metadata: a }, _e, ue), w(_, null, fe, { kind: "accessor", name: "loadingPrice", static: !1, private: !1, access: { has: (t) => "loadingPrice" in t, get: (t) => t.loadingPrice, set: (t, o) => {
420
+ t.loadingPrice = o;
421
+ } }, metadata: a }, ye, ve), w(_, null, xe, { kind: "accessor", name: "cardActionLabel", static: !1, private: !1, access: { has: (t) => "cardActionLabel" in t, get: (t) => t.cardActionLabel, set: (t, o) => {
422
+ t.cardActionLabel = o;
423
+ } }, metadata: a }, we, $e), w(_, null, Te, { kind: "accessor", name: "accessibilityExpanded", static: !1, private: !1, access: { has: (t) => "accessibilityExpanded" in t, get: (t) => t.accessibilityExpanded, set: (t, o) => {
424
+ t.accessibilityExpanded = o;
425
+ } }, metadata: a }, Ae, Ne), w(_, null, Ce, { kind: "accessor", name: "active", static: !1, private: !1, access: { has: (t) => "active" in t, get: (t) => t.active, set: (t, o) => {
426
+ t.active = o;
427
+ } }, metadata: a }, ke, ze), w(_, null, Ie, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (t) => "now" in t, set: (t, o) => {
428
+ t.now = o;
429
+ } }, metadata: a }, null, r), w(null, i = { value: n }, e, { kind: "class", name: n.name, metadata: a }, null, s), n = i.value, a && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
430
+ })(), _.styles = zt, d(n, s), n;
431
+ })();
368
432
  export {
369
- p as SbbTimetableRowElement,
370
- qe as filterNotices,
371
- De as getCus,
372
- Ee as getHimIcon,
373
- k as handleNotices,
374
- Ie as renderIconProduct,
375
- ke as renderStringProduct,
376
- Pe as sortSituation
433
+ ta as SbbTimetableRowElement,
434
+ Pt as filterNotices,
435
+ St as getCus,
436
+ Rt as getHimIcon,
437
+ ee as handleNotices,
438
+ It as renderIconProduct,
439
+ Mt as renderStringProduct,
440
+ Lt as sortSituation
377
441
  };