{"version":3,"names":["connectionsI18n","key","de","en","it","fr","nl","connectionsCss","Connections","constructor","hostRef","this","today","Date","travelDate","formatIsoDate","direction","onCountryBlur","refreshConnections","onDirectionSelect","e","target","value","updateSearchData","then","onDateChange","detail","onExpandableOpened","activeTrain","currentTarget","dataset","train","njBookingLink","undefined","partnerLink","destinationCountry","destinationCity","vehicleTransport","type","njBaseUrl","pvAppsBaseUrl","showBestPriceFinder","showAutoTrains","departureCountryCode","data","maxBookableDate","componentWillLoad","lang","findLocale","el","i18n","add","setLang","TrainService","instance","setNjBaseUrl","setPvAppsBaseUrl","searchData","carTransport","date","initConfig","componentDidLoad","initAutocomplete","loadConfig","console","log","getMaxBookableDate","_a","findConnectionsForType","originCountry","findConnectionsForDestinationStation","findConnectionsForDestinationCountry","length","trainNumber","findAvailableCountries","query","findCountriesForDestinationStation","findCountriesForDestinationCountry","countryInput","shadowRoot","querySelector","countryAutocomplete","OebbAutocomplete","withTemplate","item","getLocalizedString","name","onItemActive","index","selectCountry","onItemSelect","preventDefault","hideList","onKeyup","async","getValue","countries","trim","setData","render","withPanelOnFocus","userCountryIso","Promise","all","obtainLocation","userCountry","find","country","iso","setValue","eva","getData","resolve","getGeolocation","fromCountry","fromStation","toCountry","toStation","renderForm","h","class","get","htmlFor","id","mode","htmlId","autocomplete","onBlur","map","checked","onInput","label","disabledBefore","disabledAfter","startDate","onFormDataChanged","disabled","renderConnectionItem","connection","_b","isOpen","slot","stationFrom","stationTo","renderConnections","oebbTrains","filter","partnerTrain","partnerTrains","toString"],"sources":["node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/app-connections/connections-i18n.js","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/app-connections/connections.css?tag=oebbx-app-connections&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/app-connections/connections.js"],"sourcesContent":["export const connectionsI18n = [\n {\n key: 'connections.form.header',\n de: 'Verbindungen',\n en: 'Connections',\n it: 'Composti',\n fr: 'Correspondances',\n nl: 'Aansluitingen',\n },\n {\n key: 'connections.form.from',\n de: 'Abfahrt aus...',\n en: 'Departure from...',\n it: 'Partenza da...',\n fr: 'Départ de...',\n nl: 'Vertrek vanaf...',\n },\n {\n key: 'connections.form.outward',\n de: 'Hinfahrt',\n en: 'Outward',\n it: 'Andata',\n fr: 'Destination',\n nl: 'Heenreis',\n },\n {\n key: 'connections.form.return',\n de: 'Rückfahrt',\n en: 'Return',\n it: 'Ritorno',\n fr: 'Retour',\n nl: 'Terugreis',\n },\n {\n key: 'connections.form.date',\n de: 'Start der Reise',\n en: 'Start of the journey',\n it: 'Data del viaggio',\n fr: 'Début du voyage',\n nl: 'Start van de reis',\n },\n {\n key: 'connections.form.search',\n de: 'Suchen',\n en: 'Search',\n it: 'Search',\n fr: 'Chercher',\n nl: 'Zoeken',\n },\n {\n key: 'connections.cartransport.possible',\n de: 'Fahrzeugtransport möglich',\n en: 'Vehicle transport possible',\n it: 'Trasporto dei veicoli possibile',\n fr: 'Transport de véhicule possible',\n nl: 'Voertuigtransport mogelijk',\n },\n {\n key: 'connections.cartransport.notpossible',\n de: 'Fahrzeugtransport nicht möglich',\n en: 'Vehicle transport not possible',\n it: 'Trasporto dei veicoli non possibile',\n fr: 'Transport de véhicule impossible',\n nl: 'Voertuigtransport niet mogelijk',\n },\n {\n key: 'connections.none',\n de: 'Keine Verbindungen gefunden. Bitte versuchen Sie ein anderes Abfahrtsland.',\n en: 'No connections found. Please try another departure country.',\n it: 'Nessuna connessione trovata. Si prega di provare un altro paese di partenza.',\n fr: 'Aucune correspondance trouvée. Veuillez essayer une autre région de départ.',\n nl: 'Geen aansluitingen gevonden. Probeer het nog een keer met een ander land van vertrek.',\n },\n {\n key: \"connections.results.single\",\n de: \"1 Verbindung gefunden\",\n en: \"1 connection found\",\n it: \"1 connessione trovata\",\n fr: \"1 correspondance trouvée\",\n nl: \"1 aansluiting gevonden\",\n },\n {\n key: \"connections.results.multiple\",\n de: \"{0} Verbindungen gefunden\",\n en: \"{0} connections found\",\n it: \"{0} Composti trovati\",\n fr: \"{0} Correspondances trouvées\",\n nl: \"{0} Aansluitingen gevonden\",\n },\n {\n key: \"connections.oebb\",\n de: \"Verbindungen vom ÖBB Nightjet\",\n en: \"Connections of ÖBB Nightjet\",\n it: \"Collegamenti delle ÖBB Nightjet\",\n fr: \"Connexions de ÖBB Nightjet\",\n nl: \"Aansluitingen van ÖBB Nightjet\",\n },\n {\n key: \"connections.dani\",\n de: \"Verbindungen vom Nightjet der neuen Generation\",\n en: \"Connections of Nightjet of the new generation\",\n it: \"Collegamenti delle Nightjet di nuova generazione\",\n fr: \"Connexions de Nightjet nouvelle génération\",\n nl: \"Aansluitingen van Nightjet van de nieuwe generatie\",\n },\n {\n key: \"connections.partner\",\n de: \"Verbindungen von Partnerbahnen\",\n en: \"Connections of Nightjet partners\",\n it: \"Collegamenti delle ferrovie partner\",\n fr: \"Connexions de partenaires\",\n nl: \"Aansluitingen van partner-spoorwegmaatschappijen\",\n },\n];\n//# sourceMappingURL=connections-i18n.js.map\n","/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\n/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n.connection-none {\n padding: 1.5rem 8rem;\n}\n.connection-none p {\n margin: 0;\n}\n.connection-results {\n position: relative;\n z-index: 0;\n}\n.connection-results section {\n margin-bottom: 20px;\n}\n.connection-label {\n margin: 0 0 4px;\n font-size: inherit;\n font-weight: inherit;\n}\n.connection-header {\n display: grid;\n grid-template-columns: 4.75rem 1fr 20rem;\n gap: 2rem;\n flex-grow: 1;\n}\n.connection-header > * {\n align-self: center;\n}\n.connection-number {\n color: #e2002a;\n}\n.connection-title {\n color: #111B42;\n}\n.connection-vehicle-possible, .connection-vehicle-not-possible {\n display: flex;\n align-items: center;\n gap: 4px;\n font-weight: normal;\n}\n.connection-vehicle-possible oebbx-icon svg, .connection-vehicle-not-possible oebbx-icon svg {\n display: block;\n fill: currentColor;\n width: 26px;\n height: 22px;\n}\n.connection-vehicle-possible {\n color: #008039;\n}\n.connection-vehicle-not-possible {\n color: #6e6e6e;\n}\n@media screen and (max-width: 768px) {\n .connection-header {\n grid-template-columns: 4.75rem 1fr;\n gap: 0.25rem;\n margin-right: -1.5rem;\n }\n .connection-vehicle-possible, .connection-vehicle-not-possible {\n display: none;\n }\n}\n\n.connections-form {\n background: #ffffff;\n margin-bottom: 0.25rem;\n padding: 1.25rem;\n}\n.connections-form fieldset {\n padding: 0;\n border: none;\n}\n.connections-form-grid {\n display: grid;\n grid-template-columns: 11.5rem 1fr auto;\n gap: 1.25rem 0.75rem;\n}\n.connections-form-label {\n display: inline-block;\n font-weight: bold;\n padding-right: 1rem;\n}\n.connections-form-label span {\n position: relative;\n display: block;\n background: #e2002a;\n color: #ffffff;\n padding: 7px;\n}\n.connections-form-label span:after {\n content: \"\";\n position: absolute;\n top: 50%;\n right: 0;\n width: 22px;\n height: 22px;\n transform: translate(50%, -50%) rotate(45deg);\n transform-origin: 50% 50%;\n background: #e2002a;\n}\n.connections-form-country input {\n padding: 1.125rem 0.875rem;\n width: calc(100% - 35px);\n max-width: 285px;\n box-sizing: border-box;\n font-family: inherit;\n font-size: inherit;\n}\n.connections-form-date {\n width: 100%;\n max-width: 285px;\n min-width: unset;\n}\n.connections-form-radio {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n box-sizing: border-box;\n display: inline-block;\n margin: 0;\n width: 1.25rem;\n height: 1.25rem;\n border: 5px solid #BABDC0;\n background-color: #BABDC0;\n border-radius: 50%;\n}\n.connections-form-radio:checked {\n border-color: #e2002a;\n background-color: #ffffff;\n}\n.connections-form-radio-label {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n padding: 0.375rem;\n}\n.connections-form-radio-label:hover, .connections-form-radio-label:focus-within {\n background-color: #f5f5f5;\n}\n@media screen and (max-width: 540px) {\n .connections-form-grid {\n grid-template-columns: 1fr;\n }\n .connections-form-grid label {\n max-width: 11.5rem;\n }\n}\n@media screen and (min-width: 541px) and (max-width: 768px) {\n .connections-form-grid {\n grid-template-columns: 11.5rem 1fr;\n }\n .connections-form-direction {\n grid-column: 1/-1;\n }\n}\n@media screen and (max-width: 768px) {\n .connections-form-grid {\n gap: 0.5rem;\n }\n .connections-form-direction {\n margin-bottom: 1rem;\n }\n}\n\n.oebb-autocomplete-wrapper {\n position: relative;\n}\n.oebb-autocomplete-list {\n display: none;\n position: absolute;\n box-sizing: border-box;\n z-index: 15;\n min-width: 350px;\n max-height: 300px;\n margin: 0;\n padding: 0;\n background: #ffffff;\n border: 1px solid #babdc0;\n transform: translateY(2px);\n overflow-y: auto;\n box-shadow: -1px -1px 10px -2px rgba(0, 0, 0, 0.5);\n scrollbar-width: thin;\n scrollbar-color: #babdc0 #ffffff;\n}\n.oebb-autocomplete-list {\n scrollbar-face-color: #babdc0;\n scrollbar-track-color: #ffffff;\n}\n.oebb-autocomplete-list::-webkit-scrollbar {\n width: 14px;\n}\n.oebb-autocomplete-list::-webkit-scrollbar-track {\n background: #ffffff;\n}\n.oebb-autocomplete-list::-webkit-scrollbar-thumb {\n background-color: #babdc0;\n border-radius: 6px;\n border: 3px solid #ffffff;\n}\n.oebb-autocomplete-list .oebb-autocomplete-item {\n position: relative;\n padding: 0.75rem 1.25rem;\n cursor: pointer;\n}\n.oebb-autocomplete-list .oebb-autocomplete-item:not(:last-child) {\n border-bottom: 1px solid var(--form-input-border-color);\n}\n.oebb-autocomplete-list .oebb-autocomplete-item:hover, .oebb-autocomplete-list .oebb-autocomplete-item--active {\n background-color: #ebebeb;\n}","import { OebbAutocomplete } from '@oebb-web-team/oebb-web-library/dist/autocomplete/OebbAutocomplete';\nimport { h } from '@stencil/core';\nimport { TrainService } from \"../../service/train.service\";\nimport { findLocale, formatIsoDate, getLocalizedString, i18n } from '../../utils';\nimport { connectionsI18n } from './connections-i18n';\nexport class Connections {\n constructor() {\n this.today = new Date();\n this.travelDate = formatIsoDate(this.today);\n this.direction = 'outward';\n this.onCountryBlur = () => this.refreshConnections();\n this.onDirectionSelect = (e) => {\n const target = e.target;\n this.direction = target.value;\n this.updateSearchData();\n this.refreshConnections().then();\n };\n this.onDateChange = (e) => {\n this.travelDate = formatIsoDate(e.detail.value);\n this.updateSearchData();\n this.refreshConnections().then();\n };\n this.onExpandableOpened = (e) => {\n this.activeTrain = e.detail ? e.currentTarget.dataset.train : null;\n };\n this.njBookingLink = undefined;\n this.partnerLink = undefined;\n this.destinationCountry = undefined;\n this.destinationCity = undefined;\n this.vehicleTransport = false;\n this.type = undefined;\n this.njBaseUrl = undefined;\n this.pvAppsBaseUrl = undefined;\n this.showBestPriceFinder = true;\n this.showAutoTrains = true;\n this.departureCountryCode = undefined;\n this.data = undefined;\n this.maxBookableDate = undefined;\n this.activeTrain = undefined;\n }\n componentWillLoad() {\n this.lang = findLocale(this.el);\n i18n.add(connectionsI18n);\n i18n.setLang(this.lang);\n if (this.njBaseUrl) {\n TrainService.instance.setNjBaseUrl(this.njBaseUrl);\n }\n if (this.pvAppsBaseUrl) {\n TrainService.instance.setPvAppsBaseUrl(this.pvAppsBaseUrl);\n }\n if (this.type) {\n this.travelDate = formatIsoDate(new Date());\n this.searchData = {\n carTransport: this.vehicleTransport,\n date: this.travelDate,\n };\n }\n this.initConfig().then();\n this.refreshConnections().then();\n }\n componentDidLoad() {\n this.initAutocomplete().then();\n }\n async initConfig() {\n try {\n await TrainService.instance.loadConfig();\n }\n catch (e) {\n console.log(\"Error loading config\", e);\n }\n finally {\n // Set the date limit even when the request failed, at least we enforce the 180 day limit\n this.maxBookableDate = TrainService.instance.getMaxBookableDate();\n }\n }\n async refreshConnections() {\n var _a;\n try {\n if (this.type) {\n this.data = await TrainService.instance.findConnectionsForType(this.type, this.travelDate || formatIsoDate(new Date()), this.vehicleTransport);\n }\n else if (!this.originCountry || !this.travelDate) {\n this.data = [];\n }\n else if (this.destinationCity) {\n this.data = await TrainService.instance.findConnectionsForDestinationStation(this.originCountry, this.destinationCity, this.travelDate, this.vehicleTransport, this.direction);\n }\n else {\n this.data = await TrainService.instance.findConnectionsForDestinationCountry(this.originCountry, this.destinationCountry, this.travelDate, this.vehicleTransport, this.direction);\n }\n if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) === 1) {\n this.activeTrain = this.data[0].trainNumber;\n }\n }\n catch (e) {\n console.log(\"Error loading connections\", e);\n }\n }\n async findAvailableCountries(query = '') {\n try {\n if (this.destinationCity) {\n return await TrainService.instance.findCountriesForDestinationStation(this.destinationCity, this.vehicleTransport, this.direction, query);\n }\n else {\n return await TrainService.instance.findCountriesForDestinationCountry(this.destinationCountry, this.vehicleTransport, this.direction, query);\n }\n }\n catch (e) {\n console.log('Error loading country list', e);\n return [];\n }\n }\n async initAutocomplete() {\n if (this.type) {\n return;\n }\n const countryInput = this.el.shadowRoot.querySelector('#country-field');\n this.countryAutocomplete = new OebbAutocomplete(countryInput)\n .withTemplate(function (item) {\n return `
  • ${getLocalizedString(item.name)}
  • `;\n })\n .onItemActive((index) => this.selectCountry(index))\n .onItemSelect((index, e) => {\n e.preventDefault();\n this.selectCountry(index);\n this.countryAutocomplete.hideList();\n this.refreshConnections().then();\n })\n .onKeyup(async () => {\n const query = this.countryAutocomplete.getValue();\n const countries = await this.findAvailableCountries(query === null || query === void 0 ? void 0 : query.trim());\n this.countryAutocomplete.setData(countries);\n this.countryAutocomplete.render();\n })\n .withPanelOnFocus();\n // Load the country list and user country, but do it asynchronously\n const [userCountryIso, countries] = await Promise.all([\n this.obtainLocation(),\n this.findAvailableCountries(),\n ]);\n this.countryAutocomplete.setData(countries);\n if (userCountryIso) {\n const userCountry = countries.find(country => country.iso === userCountryIso);\n if (userCountry) {\n this.countryAutocomplete.setValue(getLocalizedString(userCountry.name));\n this.originCountry = userCountry.eva;\n this.updateSearchData();\n this.refreshConnections().then();\n }\n }\n }\n selectCountry(index) {\n const country = this.countryAutocomplete.getData()[index];\n this.countryAutocomplete.setValue(getLocalizedString(country === null || country === void 0 ? void 0 : country.name));\n this.originCountry = country === null || country === void 0 ? void 0 : country.eva;\n this.updateSearchData();\n }\n obtainLocation() {\n if (this.departureCountryCode !== undefined && this.departureCountryCode !== null) {\n return new Promise((resolve) => {\n resolve(this.departureCountryCode);\n });\n }\n else {\n return TrainService.instance.getGeolocation();\n }\n }\n updateSearchData() {\n this.searchData = this.direction === 'return' ? {\n fromCountry: this.destinationCountry,\n fromStation: this.destinationCity,\n toCountry: this.originCountry,\n carTransport: this.vehicleTransport,\n date: this.travelDate,\n } : {\n fromCountry: this.originCountry,\n toCountry: this.destinationCountry,\n toStation: this.destinationCity,\n carTransport: this.vehicleTransport,\n date: this.travelDate,\n };\n }\n renderForm() {\n if (this.type) {\n // Do not show form for partner train view\n return null;\n }\n return (h(\"form\", { class: \"connections-form\" }, h(\"fieldset\", null, h(\"legend\", { class: \"hidden\" }, i18n.get('connections.form.header')), h(\"div\", { class: \"connections-form-grid\" }, h(\"label\", { htmlFor: \"country-field\", id: \"country-label\", class: \"connections-form-label\" }, h(\"span\", null, i18n.get('connections.form.from'))), h(\"oebbx-input-field\", { type: \"text\", mode: \"2021\", htmlId: \"country-field\", class: \"connections-form-country\", autocomplete: \"off\", onBlur: this.onCountryBlur }), h(\"div\", { class: \"connections-form-direction\" }, ['outward', 'return'].map(direction => (h(\"label\", { class: \"connections-form-radio-label\" }, h(\"input\", { type: \"radio\", name: \"direction\", class: \"connections-form-radio\", value: direction, checked: this.direction === direction, onInput: this.onDirectionSelect }), h(\"span\", null, i18n.get(`connections.form.${direction}`)))))), h(\"label\", { htmlFor: \"date-field\", class: \"connections-form-label\" }, h(\"span\", null, i18n.get('connections.form.date'))), h(\"oebbx-date-field\", { \"html-id\": \"date-field\", mode: \"2021\", class: \"connections-form-date\", label: i18n.get('connections.form.date'), disabledBefore: this.today, disabledAfter: this.maxBookableDate, startDate: this.today, onFormDataChanged: this.onDateChange })), h(\"button\", { class: \"screen-reader-text\", disabled: true }, \"$\", i18n.get('connections.form.search')))));\n }\n renderConnectionItem(connection) {\n var _a, _b;\n const isOpen = connection.trainNumber === this.activeTrain;\n return (h(\"oebbx-expandable-item\", { isOpen: isOpen, \"data-train\": connection.trainNumber, onExpandableOpened: this.onExpandableOpened }, h(\"div\", { slot: \"header\", class: \"connection-header\" }, h(\"span\", { class: \"connection-number\" }, connection.trainNumber), h(\"span\", { class: \"connection-title\" }, getLocalizedString((_a = connection.stationFrom) === null || _a === void 0 ? void 0 : _a.name), \"\\u00A0\\u00A0-\\u00A0\\u00A0\", getLocalizedString((_b = connection.stationTo) === null || _b === void 0 ? void 0 : _b.name)), h(\"span\", { class: connection.carTransport ? 'connection-vehicle-possible' : 'connection-vehicle-not-possible' }, this.showAutoTrains\n ? [\n h(\"oebbx-icon\", { name: \"cartrain\", \"aria-hidden\": \"true\" }),\n h(\"span\", null, connection.carTransport\n ? i18n.get(\"connections.cartransport.possible\", \"Fahrzeugtransport möglich\")\n : i18n.get(\"connections.cartransport.notpossible\", \"Fahrzeugtransport nicht möglich\"))\n ]\n : null)), h(\"oebbx-train-details\", { connection: connection, searchData: this.searchData, njBookingLink: this.njBookingLink, partnerLink: this.partnerLink, showBestPriceFinder: this.showBestPriceFinder, showAutoTrains: this.showAutoTrains, isOpen: isOpen })));\n }\n renderConnections() {\n var _a;\n if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.length)) {\n return (h(\"div\", { class: \"connection-none\" }, h(\"p\", null, i18n.get('connections.none'))));\n }\n const oebbTrains = this.data.filter(train => !train.partnerTrain);\n const partnerTrains = this.data.filter(train => train.partnerTrain);\n return (h(\"div\", { class: \"connection-results\" }, h(\"div\", { class: \"screen-reader-text\", \"aria-live\": \"polite\" }, i18n.get(`connections.results.${this.data.length === 1 ? 'single' : 'multiple'}`, null, this.data.length.toString())), oebbTrains.length ? (h(\"section\", null, h(\"h3\", { class: \"connection-label screen-reader-text\", id: \"connections-oebb\" }, i18n.get(this.type === 'dani' ? 'connections.dani' : 'connections.oebb')), h(\"oebbx-expandable-list\", { \"aria-labelledby\": \"connections-oebb\" }, oebbTrains.map(item => this.renderConnectionItem(item))))) : null, partnerTrains.length ? (h(\"section\", null, h(\"h3\", { class: \"connection-label\", id: \"connections-partner\" }, i18n.get('connections.partner')), h(\"oebbx-expandable-list\", { \"aria-labelledby\": \"connections-partner\" }, partnerTrains.map(item => this.renderConnectionItem(item))))) : null));\n }\n render() {\n return (h(\"div\", null, this.renderForm(), this.renderConnections()));\n }\n static get is() { return \"oebbx-app-connections\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"connections.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"connections.css\"]\n };\n }\n static get properties() {\n return {\n \"njBookingLink\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"nj-booking-link\",\n \"reflect\": false\n },\n \"partnerLink\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"partner-link\",\n \"reflect\": false\n },\n \"destinationCountry\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"destination-country\",\n \"reflect\": false\n },\n \"destinationCity\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"destination-city\",\n \"reflect\": false\n },\n \"vehicleTransport\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"vehicle-transport\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ConnectionsType\",\n \"resolved\": \"\\\"dani\\\" | \\\"partner\\\"\",\n \"references\": {\n \"ConnectionsType\": {\n \"location\": \"import\",\n \"path\": \"../../models/nightjet\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"type\",\n \"reflect\": false\n },\n \"njBaseUrl\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"nj-base-url\",\n \"reflect\": false\n },\n \"pvAppsBaseUrl\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"pv-apps-base-url\",\n \"reflect\": false\n },\n \"showBestPriceFinder\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"show-best-price-finder\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"showAutoTrains\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"show-auto-trains\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"departureCountryCode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"departure-country-code\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"data\": {},\n \"maxBookableDate\": {},\n \"activeTrain\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=connections.js.map\n"],"mappings":"gQAAO,MAAMA,EAAkB,CAC7B,CACEC,IAAK,0BACLC,GAAI,eACJC,GAAI,cACJC,GAAI,WACJC,GAAI,kBACJC,GAAI,iBAEN,CACEL,IAAK,wBACLC,GAAI,iBACJC,GAAI,oBACJC,GAAI,iBACJC,GAAI,eACJC,GAAI,oBAEN,CACEL,IAAK,2BACLC,GAAI,WACJC,GAAI,UACJC,GAAI,SACJC,GAAI,cACJC,GAAI,YAEN,CACEL,IAAK,0BACLC,GAAI,YACJC,GAAI,SACJC,GAAI,UACJC,GAAI,SACJC,GAAI,aAEN,CACEL,IAAK,wBACLC,GAAI,kBACJC,GAAI,uBACJC,GAAI,mBACJC,GAAI,kBACJC,GAAI,qBAEN,CACEL,IAAK,0BACLC,GAAI,SACJC,GAAI,SACJC,GAAI,SACJC,GAAI,WACJC,GAAI,UAEN,CACEL,IAAK,oCACLC,GAAI,4BACJC,GAAI,6BACJC,GAAI,kCACJC,GAAI,iCACJC,GAAI,8BAEN,CACEL,IAAK,uCACLC,GAAI,kCACJC,GAAI,iCACJC,GAAI,sCACJC,GAAI,mCACJC,GAAI,mCAEN,CACEL,IAAK,mBACLC,GAAI,6EACJC,GAAI,8DACJC,GAAI,+EACJC,GAAI,8EACJC,GAAI,yFAEN,CACEL,IAAK,6BACLC,GAAI,wBACJC,GAAI,qBACJC,GAAI,w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