(() => { const mapping = {'webc_book_fxp_543':{'2': () => {(() => { (() => { let text = null; switch (document.location.hostname) { case 'shop.global.flixbus.com': case 'shop.flixbus.co.uk': text = `Want to book a return ride?`; break; case 'shop.flixbus.com': if(document.documentElement.lang == "en-US") text = `Want to book a return ride?`; break; case 'shop.flixbus.it': text = `Vuoi prenotare un viaggio di ritorno?`; break; case 'shop.flixbus.de': case 'shop.flixbus.at': text = `Möchtest Du eine Rückfahrt buchen?`; break; case 'shop.flixbus.es': text = `¿Quieres reservar la vuelta?`; break; case 'shop.flixbus.fr': text = `Envie de réserver un retour?`; break; case 'shop-de.stg1.staging.asgard-dev.flixtech.io': text = `Want to book a return ride?`; break; } let block = document.querySelector('#small_mask') || document.createElement("div"); block.id = "small_mask"; block.innerHTML = ' ' + text + ' '; let parent = document.querySelector('[class*="flix-booking-success__tickets"]'); if(!parent) return; parent.parentNode.insertBefore(block, parent.nextSibling);})(); })();(() => { if (!document.getElementById("fxp-97d665e6-6ea0-479f-b619-15fbb8c5dc66")) { var style = document.createElement("style"); style.id = "fxp-97d665e6-6ea0-479f-b619-15fbb8c5dc66"; document.head.appendChild(style).innerText='.fxp_543 { background-color: white; text-align: center; padding-top: 4px; padding-bottom: 4px; margin-bottom: 16px; font-weight: 700;}';} })();(() => { (() => { let event = [...window.globalEventsCache].find(e => e.name === 'booking.success'); if (!event) return; let departure_city = event.payload[0].items; departure_city = Object.values(departure_city)[0].stations.from.city_id; let arrival_city = event.payload[0].items; arrival_city = Object.values(arrival_city)[0].stations.to.city_id; let departure_date = event.payload[0].items; departure_date = Object.values(departure_date)[0].stations.from.departure_tz.timestamp ; const date = new Date(departure_date * 1000); const datevalues = { year: date.getFullYear().toString(), month: ("0" + (date.getMonth()+1)).slice(-2), day: ("0" + (date.getDate() + 2)).slice(-2) , }; let products = { adults: 0, children: 0 }; let passengers = event.payload[0].items; passengers = Object.values(passengers)[0].passengers_by_product; for(let i = 0; i < passengers.length; i++) { if(passengers[i].adult){ products.adults = products.adults + passengers[i].adult.length; } if(passengers[i].children){ products.children = products.children + passengers[i].children.length; } } var domain = window.location.hostname; var link = "https://" + domain + "/" + "search?departureCity=" + arrival_city + "&arrivalCity=" + departure_city + "&rideDate=" + datevalues.day + "." + datevalues.month + "." + datevalues.year + "&adult=" + ((products.adults === 0) ? 1 : products.adults) + "&children=" + products.children; var a = document.getElementById("small_mask_anchor"); a.target = '_blank'; a.href = link;})(); })();}},'webc_cms_fxp_864':{'1': () => {(() => { (() => { if (window.fxp864) return; const map = document.querySelector('#map-teaser-component'); if (!map) return; window.fxp864 = true; html = fxp864_get_html(); if (!html) return; const el = document.createElement('div'); el.innerHTML = html; map.insertBefore(el, map.firstChild);})();function fxp864_date_string() { const tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1); let date = tomorrow.getDate(); let month = tomorrow.getMonth() + 1; let year = tomorrow.getFullYear(); if (date < 10) { date = '0' + date; } if (month < 10) { month = '0' + month; } return `${date}.${month}.${year}`;}function fxp864_get_html() { const date = fxp864_date_string(); let html = null; switch (document.documentElement.lang.substring(0, 2)) { case 'pl': html = `
`; break; case 'en': html = `
`; break; case 'it': html = `
`; break; case 'de': html = `
`; break; case 'fr': html = `
`; break; case 'tr': html = `
`; break; } return html;} })();(() => { if (!document.getElementById("fxp-15df0716-0cf4-463b-b24f-bfd830df6cd3")) { var style = document.createElement("style"); style.id = "fxp-15df0716-0cf4-463b-b24f-bfd830df6cd3"; document.head.appendChild(style).innerText='.fxp864 { min-width: 1000px;}.fxp864-container { overflow-x: scroll; padding-bottom: var(--flix-spacing-2); margin-bottom: var(--flix-spacing-2);}/*@media (min-width: 600px) { padding-bottom: var(--flix-spacing-6); overflow-x: scroll; white-space: nowrap;}*/.popular-rides-item { flex-direction: row; justify-content: space-between; border: solid 1px var(--flix-grayscale-30-color); padding: var(--flix-spacing-2); background: #fff; border-radius: 6px;}.popular-rides-item { display: flex; align-items: center; text-align: left; height: 100%; min-height: 78px; text-decoration: none; transition: box-shadow .2s ease-in-out; color: var(--flix-grayscale-100-color);}.popular-rides-item:hover { box-shadow: var(--flix-primary-box-shadow);}.flix-connection { width: 100%; color: var(--flix-content-primary-color); font-family: inherit; border-collapse: collapse;}.flix-connection__station, .flix-connection__station-info, .flix-connection__station-toggler { position: relative; margin-left: calc(var(--flix-spacing-4) + 5px);}.flix-connection tr:first-child .flix-connection__station::before, .flix-connection tr:last-child .flix-connection__station::before { display: inline-block; top: var(--flix-spacing-2); left: calc(-1 * var(--flix-spacing-4) - 5px); width: 9px; height: 9px; margin-top: calc(-1 * 5px); border: 1px solid var(--flix-primary-icon-color); border-radius: 50%; background: var(--flix-primary-icon-color); content: "";}.flix-connection__station::before { position: absolute; top: calc(var(--flix-line-height-primary)/ 2); left: calc(-1 * var(--flix-spacing-4)); width: 7px; height: 1px; background: var(--flix-primary-icon-color); content: ""; vertical-align: middle; z-index: 2;}.flix-connection tr:first-child .flix-connection__station::after { top: var(--flix-spacing-2);}.flix-connection__station-info::after, .flix-connection__station-toggler::after, .flix-connection__station::after { display: block; position: absolute; top: calc(-1 * var(--flix-line-height-primary)/ 2); bottom: calc(-1 * var(--flix-line-height-primary)/ 2); left: calc(-1 * var(--flix-spacing-4) - 1px); width: 1px; background: var(--flix-primary-icon-color); content: ""; z-index: 1;}.flix-connection tr:first-child .flix-connection__station::before { background: var(--flix-primary-bg-color);}.flix-connection tr:last-child .flix-connection__station::after { bottom: calc(100% - var(--flix-spacing-2));}.popular-rides-icon { width: 2em; height: 2em; fill: var(--flix-grayscale-70-color);}';} })();},'2': () => {(() => { (() => { if (window.fxp864) return; const menu = document.querySelector('.service-menu-wrapper'); const map = document.querySelector('#map-teaser-component'); const services = document.querySelector('.service-menu-container'); if (!menu || !map || !services) return; window.fxp864 = true; html = fxp864_get_html(); if (!html) return; const el = document.createElement('div'); el.innerHTML = html; menu.insertBefore(el, menu.firstChild); map.insertBefore(services, map.firstChild);})();function fxp864_date_string() { const tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1); let date = tomorrow.getDate(); let month = tomorrow.getMonth() + 1; let year = tomorrow.getFullYear(); if (date < 10) { date = '0' + date; } if (month < 10) { month = '0' + month; } return `${date}.${month}.${year}`;}function fxp864_get_html() { const date = fxp864_date_string(); let html = null; switch (document.documentElement.lang.substring(0, 2)) { case 'pl': html = `
`; break; case 'en': html = `
`; break; case 'it': html = `
`; break; case 'de': html = `
`; break; case 'fr': html = `
`; break; case 'tr': html = `
`; break; } return html;} })();(() => { if (!document.getElementById("fxp-bddaa75b-20eb-4bdc-98a3-6345ce63cd0f")) { var style = document.createElement("style"); style.id = "fxp-bddaa75b-20eb-4bdc-98a3-6345ce63cd0f"; document.head.appendChild(style).innerText='.fxp864 { min-width: 1000px; margin-bottom: var(--flix-spacing-1);}.fxp864-container { overflow-x: scroll; padding-bottom: var(--flix-spacing-2); margin-bottom: var(--flix-spacing-4);}.popular-rides-item { flex-direction: row; justify-content: space-between; border: solid 1px var(--flix-grayscale-30-color); padding: var(--flix-spacing-2); background: #fff; border-radius: 6px;}.popular-rides-item { display: flex; align-items: center; text-align: left; height: 100%; min-height: 78px; text-decoration: none; transition: box-shadow .2s ease-in-out; color: var(--flix-grayscale-100-color);}.popular-rides-item:hover { box-shadow: var(--flix-primary-box-shadow);}.flix-connection { width: 100%; color: var(--flix-content-primary-color); font-family: inherit; border-collapse: collapse;}.flix-connection__station, .flix-connection__station-info, .flix-connection__station-toggler { position: relative; margin-left: calc(var(--flix-spacing-4) + 5px);}.flix-connection tr:first-child .flix-connection__station::before, .flix-connection tr:last-child .flix-connection__station::before { display: inline-block; top: var(--flix-spacing-2); left: calc(-1 * var(--flix-spacing-4) - 5px); width: 9px; height: 9px; margin-top: calc(-1 * 5px); border: 1px solid var(--flix-primary-icon-color); border-radius: 50%; background: var(--flix-primary-icon-color); content: "";}.flix-connection__station::before { position: absolute; top: calc(var(--flix-line-height-primary)/ 2); left: calc(-1 * var(--flix-spacing-4)); width: 7px; height: 1px; background: var(--flix-primary-icon-color); content: ""; vertical-align: middle; z-index: 2;}.flix-connection tr:first-child .flix-connection__station::after { top: var(--flix-spacing-2);}.flix-connection__station-info::after, .flix-connection__station-toggler::after, .flix-connection__station::after { display: block; position: absolute; top: calc(-1 * var(--flix-line-height-primary)/ 2); bottom: calc(-1 * var(--flix-line-height-primary)/ 2); left: calc(-1 * var(--flix-spacing-4) - 1px); width: 1px; background: var(--flix-primary-icon-color); content: ""; z-index: 1;}.flix-connection tr:first-child .flix-connection__station::before { background: var(--flix-primary-bg-color);}.flix-connection tr:last-child .flix-connection__station::after { bottom: calc(100% - var(--flix-spacing-2));}.popular-rides-icon { width: 2em; height: 2em; fill: var(--flix-grayscale-70-color);}@media (min-width: 1200px) { .service-menu-wrapper { margin-top: calc(var(--flix-spacing-4) + 69px); }}@media (max-width: 600px) { .fxp864 { margin-top: var(--flix-spacing-4); }}.service-menu-container { margin-top: 0;}';} })();}},'webc_search_fxp_956':{'1': () => {(() => { if (!document.getElementById("fxp-81cef911-d656-44e6-8da0-51380b7c58e5")) { var style = document.createElement("style"); style.id = "fxp-81cef911-d656-44e6-8da0-51380b7c58e5"; document.head.appendChild(style).innerText='.fxp956 { display: none !important;}.flix-select-group__items956 { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; position: relative; -ms-flex-wrap: wrap; flex-wrap: wrap; padding-top: 1px; list-style-type: none;}.fxp956-row { margin-bottom: var(--hcr-spacing-1);}@media (max-width: 1200px) { .fxp956-row { margin: var(--hcr-spacing-2) 0 var(--hcr-spacing-3) 0; }}@media (max-width: 600px) { .flix-select-group__item956 { width: 50%; } .flix-select-group__items956 { width: 100%; } [class*="OverlaySearchMask__searchMask___"] .fxp956-row { margin: var(--hcr-spacing-4) 0 var(--hcr-spacing-3) 0; }}@media (min-width: 1200px) { .flix-select-group__item956 { min-width: 36px; min-width: var(--flix-input-height-desktop); }}.flix-select-group__item956 { min-width: 44px; min-width: var(--flix-input-height-mobile); text-align: center;}.flix-select-group__item956 input { position: absolute; cursor: pointer; opacity: 0;}.flix-select-group__item956 input+label { border-bottom: 1px solid var(--hcr-primary-line-color)}.flix-select-group__item956 input:checked+label { border-bottom: 3px solid #73d700; border-bottom: var(--flix-spacing-half) solid var(--hcr-primary-ui-dark-color); color: var(--hcr-primary-ui-dark-color);}.flix-select-group__item956 label { display: block; height: 100%; padding: 0 18px; padding: 0 var(--flix-spacing-2); background: #fff; background: var(--flix-primary-bg-color); font-weight: 400; font-weight: var(--flix-font-weight-semibold); cursor: pointer;}.flix-select-group956 { position: relative; border: 0;}';} })();(() => { (() => { if (window.InitConnectionMap) return; const fxp956_switcher_0_check = document.querySelector('#fxp956_switcher_0'); const fxp956_switcher_1_check = document.querySelector('#fxp956_switcher_1'); if (fxp956_switcher_0_check && document.querySelector('#search-mask-trip-mode-oneway-toggle').checked) { fxp956_switcher_0_check.click(); } else if (fxp956_switcher_1_check && document.querySelector('#search-mask-trip-mode-roundtrip-toggle').checked) { fxp956_switcher_1_check.click(); } const switcher_old = document.querySelector('fieldset:has(#search-mask-trip-mode-oneway-toggle):not(.fxp956)'); if (!switcher_old) return; const oneway = document.querySelector('label[for="search-mask-trip-mode-oneway-toggle"]'); const roundtrip = document.querySelector('label[for="search-mask-trip-mode-roundtrip-toggle"]'); if (!oneway || !roundtrip) return; const container = switcher_old.parentNode; const el = document.createElement("div"); el.innerHTML = '
'; container.insertBefore(el, switcher_old); switcher_old.classList.add("fxp956"); document.querySelector('#fxp956_switcher_0').addEventListener('change', fxp956_checkbox_change); document.querySelector('#fxp956_switcher_1').addEventListener('change', fxp956_checkbox_change);})();function fxp956_checkbox_change() { if (document.querySelector('#fxp956_switcher_0').checked) { document.querySelector('#search-mask-trip-mode-oneway-toggle').click(); } else { document.querySelector('#search-mask-trip-mode-roundtrip-toggle').click(); }} })();}},'webc_book_fxp_973':{'0': () => {(() => { (() => { if (document.hidden && window.location.pathname == '/checkout' && !window.fxp973hidden) { window.fxp973hidden = true; dataLayer.push({ event: 'ga_event', eventCategory: 'ABTest', eventAction: 'fxp973_document_hidden', eventLabel: 'original', eventValue: undefined, eventProperty: undefined }); }})(); })();},'1': () => {(() => { (() => { if (window.location.pathname != '/checkout' || document.title == 'FlixBus') return; if (!window.fxp973title && document.title.match(/\|/)) { window.fxp973title = document.title; } if (!document.hidden && window.fxp973title && document.title != window.fxp973title && document.title.match(/^\d/)) { document.title = window.fxp973title; return; } if (!document.hidden) return; if (!window.fxp973hidden) { window.fxp973hidden = true; dataLayer.push({ event: 'ga_event', eventCategory: 'ABTest', eventAction: 'fxp973_document_hidden', eventLabel: 'var1', eventValue: undefined, eventProperty: undefined }); } let doctitle = null; switch (document.documentElement.lang.substring(0, 2)) { case 'en': doctitle = "Almost done!"; break; case 'it': doctitle = "Quasi finito!"; break; case 'de': doctitle = 'Fast fertig!'; break; case 'pl': doctitle = 'Prawie gotowe!'; break; case 'es': doctitle = '¡Ya casi terminamos!'; break; case 'fr': doctitle = "C'est presque fini!"; break; case 'cz': doctitle = 'Ještě jeden krok!'; break; default: return; } update_title(doctitle);})();function update_title(doctitle) { const node = document.querySelector('.cart-timer-container b'); if (!node) return; let time = node.innerText.match(/\d\d:\d\d/i)[0]; /* let title = document.title.replace(/(\d*:\d*(\ \-\ )*)*(\(\d*\)\ )* /g, ''); */ if (time == '00:00') { document.title = window.fxp973title; return; } time = time.replace(/^0/g, ''); let title = window.fxp973title; if (time.match(/\d$/g) < 5) { title = doctitle; } document.title = time + ' - ' + title;} })();},'2': () => {(() => { (() => { if (window.location.pathname != '/checkout' || document.title == 'FlixBus') return; if (!window.fxp973title && document.title.match(/\|/)) { window.fxp973title = document.title; } if (!document.hidden && window.fxp973title && document.title != window.fxp973title && document.title.match(/^\d/)) { document.title = window.fxp973title; return; } if (!document.hidden) return; if (!window.fxp973hidden) { window.fxp973hidden = true; dataLayer.push({ event: 'ga_event', eventCategory: 'ABTest', eventAction: 'fxp973_document_hidden', eventLabel: 'var2', eventValue: undefined, eventProperty: undefined }); } update_title();})();function update_title() { const node = document.querySelector('.cart-timer-container b'); if (!node) return; let time = node.innerText.match(/\d\d:\d\d/i)[0]; /* let title = document.title.replace(/(\d*:\d*(\ \-\ )*)*(\(\d*\)\ )* /g, ''); */ if (time == '00:00') { document.title = window.fxp973title; return; } time = time.replace(/^0/g, ''); document.title = time + ' - ' + window.fxp973title;} })();}},'webc_search_fxp_988':{'1': () => {(() => { if (!document.getElementById("fxp-057f0123-42ac-4de5-b85f-1efdafcdb833")) { var style = document.createElement("style"); style.id = "fxp-057f0123-42ac-4de5-b85f-1efdafcdb833"; document.head.appendChild(style).innerText='.search-results-main [data-e2e="button-reserve-trip"] { padding-left: 32px; padding-right: 26px;}';} })();},'2': () => {(() => { if (!document.getElementById("fxp-8c6d76a1-46c0-4d62-a027-50fca7da62f0")) { var style = document.createElement("style"); style.id = "fxp-8c6d76a1-46c0-4d62-a027-50fca7da62f0"; document.head.appendChild(style).innerText='.search-results-main [data-e2e="button-reserve-trip"] { padding-left: 52px; padding-right: 46px;}';} })();}},'webc_cms_fxp_990':{'1': () => {(() => { (() => { if (document.location.pathname != '/') return; if (window.screen.width < 1200) return; if ( document.location.hostname == 'es-us.flixbus.com' || document.location.hostname == 'zh-us.flixbus.com') return; if (document.querySelector('.fxp_990')) return; const blocks = document.querySelectorAll('.service-menu-col'); if (document.querySelectorAll('.service-menu-col').length == 0) return; blocks.forEach(e => { e.classList.remove('flix-col-4'); e.classList.add('flix-col-3'); }); let container = document.createElement("div"); container.classList.add('flix-col-3', 'service-menu-col', 'fxp_990'); let text = ""; let link = ""; switch (document.location.hostname) { case 'global.flixbus.com': text = "Find your bus stops"; link = "https://global.flixbus.com/bus?fxp990=true"; break; case 'www.flixbus.com': if(document.documentElement.lang == "en-us"){ text = "Find your bus stops"; link = "https://www.flixbus.com/bus?fxp990=true"; } break; case 'www.flixbus.de': console.log(document.location.hostname); text = "Finde Deine Haltestelle"; link = "https://www.flixbus.de/fernbus?fxp990=true"; break; } container.innerHTML = '' + '
' + '' + '
' + ' ' + text +' ' + '
'; const parent = document.querySelector('.service-menu-container > .flix-grid'); parent.insertBefore(container, blocks[blocks.length -1]);})(); })();(() => { (() => { if (document.location.pathname !='/') return; if (window.screen.width > 1199) return; let usp_target = document.querySelector('[data-testid="service-menu-2"]'); usp_target.removeAttribute("onclick"); let icon_target = document.querySelector('[data-testid="service-menu-2"] > div > flix-icon'); icon_target.name = "bus-stop"; let text = ""; let text_target = document.querySelector('[data-testid="service-menu-2"] > .service-menu-text'); switch (document.location.hostname) { case 'global.flixbus.com': text = "Find your bus stops"; link = "/bus?fxp990=true"; break; case 'www.flixbus.com': if(document.documentElement.lang == "en-us"){ text = "Find your bus stops"; link = "/bus?fxp990=true"; } break; case 'www.flixbus.de': text = "Finde Deine Haltestelle"; link = "/fernbus?fxp990=true"; break; } text_target.innerText = text; usp_target.href = link;})(); })();}},'webc_search_fxp_996':{'1': () => {(() => { if (!document.getElementById("fxp-88e8eb40-736a-4ddf-b09f-26902c7158bc")) { var style = document.createElement("style"); style.id = "fxp-88e8eb40-736a-4ddf-b09f-26902c7158bc"; document.head.appendChild(style).innerText='[data-e2e="search-results-amenities-icon search-results-amenities-icon-DISINFECTED"] { display: none !important;}.fxp996 { display: none !important;}';} })();(() => { (() => { const infos = document.querySelectorAll('[data-e2e="search-results-amenities-icon search-results-amenities-icon-DISINFECTED"]'); infos.forEach(info => { if (info.parentElement.tagName == 'BUTTON' || info.parentElement.getAttribute('data-e2e') == 'search-results-amenities') return; info.parentElement.classList.add('fxp996'); }); const extraicons = document.querySelectorAll('[data-e2e="search-results-amenities-extra-number-icon"]:not(.fxp996extra)'); extraicons.forEach(extraicon => { if (extraicon.innerText == '+1') { extraicon.style.display = 'none'; } else if (extraicon.innerText == '+2'){ extraicon.innerText = '+1'; } else if (extraicon.innerText == '+3'){ extraicon.innerText = '+2'; } else if (extraicon.innerText == '+4'){ extraicon.innerText = '+3'; } else if (extraicon.innerText == '+5'){ extraicon.innerText = '+4'; } else { return; } extraicon.classList.add('fxp996extra'); }); })(); })();}},'webc_search_fxp_997':{'1': () => {(() => { if (!document.getElementById("fxp-a89e2486-7c62-4ca4-a761-027f6a332a07")) { var style = document.createElement("style"); style.id = "fxp-a89e2486-7c62-4ca4-a761-027f6a332a07"; document.head.appendChild(style).innerText='[class*="ResultsList__title___"]:has([class*="ResultsList__currencySwitcherWrapper___"]) { display: none !important;}';} })();(() => { (() => { if (window.fxp997) return; if (window.location.hostname == 'shop.flixbus.cz') { const switcher = document.querySelector('[data-e2e="currency-selectable-CZK"]'); if (switcher) { switcher.click(); window.fxp997 = true; } /* document.cookie = 'currency=CZK'; */ } else if (window.location.hostname == 'shop.global.flixbus.com') { const switcher = document.querySelector('[data-e2e="currency-selectable-EUR"]'); if (switcher) { switcher.click(); window.fxp997 = true; } /* document.cookie = 'currency=EUR'; */ }})(); })();}},'webc_cms_fxp_1010':{'1': () => {(() => { (() => { const footer = document.getElementById('footer') || document.getElementsByClassName('footer-container')[0]; if (!footer) return; let banner = document.querySelector('.fxp_1010') || document.createElement("div"); let img = (window.screen.width < 768) ? '' : ''; banner.innerHTML = ''; footer.parentNode.insertBefore(banner, footer);})(); })();(() => { if (!document.getElementById("fxp-065625e7-1af8-45c7-8b7a-468f13e84fe3")) { var style = document.createElement("style"); style.id = "fxp-065625e7-1af8-45c7-8b7a-468f13e84fe3"; document.head.appendChild(style).innerText='.flix-footer > .flix-footer__img { width: 100%;}';} })();}},'webc_search_fxp_1015':{'1': () => {(() => { (() => { const prices = document.querySelectorAll('[class*="Price__priceWrapper___"]:not(.fxp1015)'); prices.forEach(price => { const tax = document.createElement('div'); tax.classList.add('fxp1015-tax'); tax.innerText = 'incl. tax'; price.append(tax); price.classList.add('fxp1015'); });})(); })();(() => { if (!document.getElementById("fxp-ba9eee49-14bf-4b48-b5bb-6b69196531ca")) { var style = document.createElement("style"); style.id = "fxp-ba9eee49-14bf-4b48-b5bb-6b69196531ca"; document.head.appendChild(style).innerText='.fxp1015-tax { font-size: var(--hcr-font-size-small); font-weight: var(--hcr-font-weight-normal); line-height: normal; text-align: start;}';} })();},'2': () => {(() => { (() => { const banner = document.querySelector('[data-e2e="search-results-extra-service-fee"]:not(.fxp1015)'); if (!banner) return; const infotext = banner.querySelector('[class*="InfoBox__text___"]'); if (!infotext) return; infotext.innerHTML = 'Prices are including tax.
' + infotext.innerText; banner.classList.add('fxp1015');})(); })();}},'webc_search_fxp_1053':{'1': () => {(() => { if (!document.getElementById("fxp-41aa100d-fb51-4184-a291-ea0b6eb6b64d")) { var style = document.createElement("style"); style.id = "fxp-41aa100d-fb51-4184-a291-ea0b6eb6b64d"; document.head.appendChild(style).innerText=':focus:focus-visible, #product-donation .flix-checkbox__input:focus+.flix-checkbox__label::before, .hcr-radio__input-4-5-2:focus+.hcr-radio__label-4-5-2::before, button:focus { outline-color: var(--fxp1053-outline) !important;}.hcr-radio__input-4-5-2:focus-visible+.hcr-radio__label-4-5-2::before, .flix-checkbox__input:focus-visible+.flix-checkbox__label::before { outline-color: var(--hcr-focus-outline-color) !important;}';} })();(() => { (() => { if (window.fxp1053) return; window.fxp1053 = true; window.onkeydown = function(e){ if (e.key != 'Tab' && e.key != 'ArrowLeft' && e.key != 'ArrowRight' && e.key != 'ArrowDown' && e.key != 'ArrowUp') return; document.querySelector(':root').style.setProperty('--fxp1053-outline', 'var(--hcr-focus-outline-color)'); }; document.addEventListener('mousedown', function (event) { document.querySelector(':root').style.setProperty('--fxp1053-outline', 'transparent'); }, false);})(); })();}},'webc_book_fxp_1072':{'1': () => {(() => { (() => { if (window.location.pathname != '/checkout' || document.title == 'FlixBus' || window.innerWidth > 1023) return; const element = document.querySelector('.flix-checkout-header-total'); const node = document.querySelector('.cart-timer-container b'); if (!element || !node) return; const time = node.innerText.match(/\d\d:\d\d/i)[0]; element.innerText = time;})(); })();},'2': () => {(() => { (() => { if (window.location.pathname != '/checkout' || document.title == 'FlixBus' || window.innerWidth > 1023) return; const element = document.querySelector('.flix-checkout-header-total'); const node = document.querySelector('.cart-timer-container b'); if (!element || !node) return; const time = node.innerText.match(/\d\d:\d\d/i)[0]; element.innerText = time;})(); })();(() => { if (!document.getElementById("fxp-9b24ce39-7bba-4ddd-ba05-6aaa98c0ecf7")) { var style = document.createElement("style"); style.id = "fxp-9b24ce39-7bba-4ddd-ba05-6aaa98c0ecf7"; document.head.appendChild(style).innerText='.cart-timer-box { display: none !important;}';} })();},'3': () => {(() => { if (!document.getElementById("fxp-59764324-e626-43cc-9c23-77412d10f67b")) { var style = document.createElement("style"); style.id = "fxp-59764324-e626-43cc-9c23-77412d10f67b"; document.head.appendChild(style).innerText='.flix-checkout-header-total { display: none !important;}';} })();}},'webc_cms_fxp_1074':{'1': () => {(() => { (() => { const footer = document.getElementsByClassName('footer')[0]; if (!footer) return; let banner = document.querySelector('.fxp_1074') || document.createElement("div"); let img = (window.screen.width < 768) ? '' : ''; banner.innerHTML = '
'; (document.location.pathname == "/checkout") ? banner.style.display = "none" : banner.style.display = "block"; if (document.querySelector('.fxp_1074')) {return;} else {footer.parentNode.insertBefore(banner, footer);}})(); })();(() => { if (!document.getElementById("fxp-1d3c8245-1b24-4d5e-9f3f-1ca1ef434ff9")) { var style = document.createElement("style"); style.id = "fxp-1d3c8245-1b24-4d5e-9f3f-1ca1ef434ff9"; document.head.appendChild(style).innerText='.flix-footer > .flix-footer__img { width: 100%;}@media only screen and (max-width: 768px) { /*#fxp_1074_img { preserveAspectRatio = slice; }*/}';} })();}},'webc_search_fxp_1082':{'1': () => {(() => { let warning_text = null;switch (document.documentElement.lang.substring(0, 2)) { case 'en': warning_text = "Only few seats left"; break; case 'it': warning_text = "Pochi posti disponibili"; break; case 'de': warning_text = 'Nur wenige Plätze übrig'; break; case 'es': warning_text = 'Pocos asientos disponibles'; break; case 'fr': warning_text = 'Peu de sièges restants'; break; case 'tr': warning_text = 'Birkaç koltuk kaldı'; break; }(() => { if (!warning_text) return; const warnings = document.querySelectorAll('[class*="SearchResult__rowInfo___"]'); let num_warnings = 0; warnings.forEach(warning => { if (!warning.querySelector('[class*="SearchResult__capacity___"]') || warning.parentNode.querySelector('.fxp1082')) return; warning.parentNode.classList.add("fxp1082_result"); num_warnings++; const el = document.createElement("span"); el.classList.add("fxp1082"); el.innerText = warning_text; warning.parentNode.insertBefore(el, warning); }); if (warnings && num_warnings > 0 && !window.tracking_1082) { window.tracking_1082 = true; dataLayer.push({ event: 'ga_event', eventCategory: 'ABTest', eventAction: 'fxp1082', eventValue: num_warnings, eventLabel: num_warnings, eventProperty: undefined }); }})(); })();(() => { if (!document.getElementById("fxp-6f6ea7c2-8f63-4b6a-95bc-8e1b7827f822")) { var style = document.createElement("style"); style.id = "fxp-6f6ea7c2-8f63-4b6a-95bc-8e1b7827f822"; document.head.appendChild(style).innerText='.fxp1082 { text-align: right; color: #c64300; color: var(--hcr-danger-content-color); font-size: 16px; font-size: var(--hcr-font-size-small); margin-bottom: var(--hcr-spacing-1); float: right;}[class*="SearchResult__capacity___"], .fxp1082_result [class*="SearchResult__rowMessage___"] { display: none !important;}';} })();}},'webc_search_fxp_1084':{'1': () => {(() => { (() => { const map = document.querySelector('[class*="TripDetailsContent__maps___"]:not(.fxp1084)'); if (!map) return; map.parentNode.insertBefore(map, map.parentNode.firstChild); map.classList.add('fxp1084'); })(); })();(() => { if (!document.getElementById("fxp-33cfacbd-3ce9-4dba-9da9-4a7493425460")) { var style = document.createElement("style"); style.id = "fxp-33cfacbd-3ce9-4dba-9da9-4a7493425460"; document.head.appendChild(style).innerText='[class*="TripDetailsContent__maps___"], [class*="StationMaps__stationMaps___"] { margin-top: 0 !important; margin-bottom: var(--hcr-spacing-4);}';} })();(() => { (() => { const map = document.querySelector('[class*="StationMaps__stationMaps___"]:not(.fxp1084)'); if (!map) return; map.parentNode.insertBefore(map, map.parentNode.children[1]); map.classList.add('fxp1084'); })();/*XMLHttpRequest.prototype._originalOpen = XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open = function(method, url, async, user, password) { ajaxCalls.push(this);this.onreadystatechange = function(e) { if (this.readyState == XMLHttpRequest.DONE && this.responseURL.startsWith('https://global.api.flixbus.com/search/service/v2/trip/details?')) { console.log(this.response); }} this._originalOpen(method, url, async, user, password);}*/ })();}},'webc_search_fxp_1095':{'1': () => {(() => { if (!document.getElementById("fxp-30d11544-9c80-4419-b399-afcc1db94161")) { var style = document.createElement("style"); style.id = "fxp-30d11544-9c80-4419-b399-afcc1db94161"; document.head.appendChild(style).innerText='#product-donation { display: none !important;}';} })();}},'webc_search_fxp_1100':{'1': () => {(() => { (() => { const confirm = document.querySelector('[class*="OverlaySearchMask__isFullScreen___"] [role="dialog"] .hcr-btn--primary-4-5-2:not(.fxp1100)'); if (!confirm) return; confirm.addEventListener('click', function(e) { const search = document.querySelector('[data-e2e="search-button"] button'); if (!search) return; search.click(); });})(); })();}},'webc_book_fxp_1109':{'1': () => {(() => { if (!document.getElementById("fxp-b7ac48b8-e4e7-4fca-97ed-29047ed259ef")) { var style = document.createElement("style"); style.id = "fxp-b7ac48b8-e4e7-4fca-97ed-29047ed259ef"; document.head.appendChild(style).innerText='.flix-checkout-section-footer{ display: none !important;}@media only screen and (min-width: 768px) { div.flix-checkout-main > div:nth-child(5) > div.flix-checkout-section-content > div.flix-checkout-contact-input-section > div:nth-child(2) > div { margin-bottom: 0px; }}@media only screen and (max-width: 767px) { div.flix-checkout-main > div:nth-child(4) > div.flix-checkout-section-content > div.flix-checkout-contact-input-section > div:nth-child(2) > div { margin-bottom: 0px; }}';} })();}},'webc_search_fxp_1124':{'1': () => {(() => { (() => { if (document.documentElement.lang.substring(0, 2) != 'de') return; const button = document.querySelector('[data-e2e="search-button"] button'); if (!button || button.innerText != 'Verbindung suchen') return; button.innerText = 'Suchen';})(); })();}}};const engaged = [];const config = { attributes: true, childList: true, subtree: true };const callback = (mutationsList, observer) => { observer.disconnect(); engaged.forEach(e => e()); observer.observe(document.body, config);};const observer = new MutationObserver(callback);observer.observe(document.body, config);const CChandler = payload => { Object.keys(payload).forEach(k => { const abTestId = String(k); const abTestVariation = String(payload[k]); if (!mapping[abTestId]) return; if (!mapping[abTestId][abTestVariation]) return; engaged.push(mapping[abTestId][abTestVariation]); }); engaged.forEach(e => e());};(() => { if (document.location.host.slice(0,5) === 'shop.' && document.location.pathname === '/') return; const attachGlobalEvents = () => window.globalEvents.on('*.ab_test_flags', payload => CChandler(payload)); const handleCacheEvents = () => { if (!window.globalEventsCache || !window.globalEventsCache.length) return false; window.globalEventsCache.filter(e => e.name.match(/ab_test_flags$/g)).forEach(event => CChandler(event.payload[0])); }; const checkGlobalEvents = () => { if (typeof window.globalEvents === 'object') { clearInterval(intervalGlobalEvents); attachGlobalEvents(); handleCacheEvents(); } }; const intervalGlobalEvents = setInterval(checkGlobalEvents, 200);})(); })();