/*! For license information please see main.js.LICENSE.txt */ (function() { var __webpack_modules__ = { 78079: function() { !function() { function e() { angular.bootstrap(document.body, ["xenaApp"]) } "complete" === document.readyState || "loading" !== document.readyState && !document.documentElement.doScroll ? e() : angular.element(document.body).ready((function() { e() } )) }() }, 64025: function() { "use strict"; angular.module("xenaApp").controller("BookingAncillariesEnterDetailsController", ["$scope", "AncillaryService", "BookingPriceService", function(e, t, i) { window.ancillarieDataModule && (t.updateAncillaryData(window.ancillarieDataModule.ancillaryData), e.$watch(t.getAncillaries, (function(t) { return e.ancillariesChanged() } ), !0), e.$watch(t.orderHasAncillaryWithDeliveryTime, (function(t) { return e.showAncillaryOrderMessage = t } ), !0)), e.hiddenInputKey = "BookingModule.Rooms[0].AncillaryOrder.", e.hiddenInputCollection = {}, e.showAncillaryOrderMessage = !0, e.bookingPrice = i.priceObject, e.init = function() { return e.showAncillaryOrderMessage = t.orderHasAncillaryWithDeliveryTime() } , e.ancillariesChanged = function() { e.hiddenInputCollection = {}; var i = 0 , n = 0; t.ancillaryData.ancillaries.forEach((function(t) { t.Variants.forEach((function(t) { t.Quantity && (e.addHiddenInput(n, i, t.Id, t.Quantity, t.PriceString), i++) } )), i > 0 && n++, i = 0 } )) } , e.addHiddenInput = function(t, i, n, a, o) { var r = e.hiddenInputKey + "Ancillaries[" + t + "].Variants[" + i + "].Id" , s = e.hiddenInputKey + "Ancillaries[" + t + "].Variants[" + i + "].Quantity" , l = e.hiddenInputKey + "Ancillaries[" + t + "].Variants[" + i + "].Price"; e.hiddenInputCollection[r] = n, e.hiddenInputCollection[s] = a, e.hiddenInputCollection[l] = o } , e.setFirstRoomPrice = function(e) { i.priceObject.roomPriceHtmlString = e } } ]) }, 17618: function(e, t, i) { var n = i(19755) , a = i(19755); function o(e, t) { var i = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter((function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable } ))), i.push.apply(i, n) } return i } function r(e) { for (var t = 1; t < arguments.length; t++) { var i = null != arguments[t] ? arguments[t] : {}; t % 2 ? o(Object(i), !0).forEach((function(t) { s(e, t, i[t]) } )) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : o(Object(i)).forEach((function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(i, t)) } )) } return e } function s(e, t, i) { return t in e ? Object.defineProperty(e, t, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = i, e } var l = i(93748) , c = i(17970); !function() { "use strict"; function e(e, t, i) { function o() { n("body").toggleClass("popover-is-open") } e.showQuantityPickerTakeOwer = !1, e.ancillary = void 0, e.ancillaryTrackingObject = void 0, e.bookingId = "", e.quantityObject = { maxQuantity: 6, pointsQuantity: 0, fiatQuantity: 0 }, e.isMyBookingPage = !1, e.isConfirmationPage = !1, e.productViewTrackingObj = { trackingInformation: { productid: "" }, trackingEvent: "productview", trackEvent: !1 }, e.productViewTrackingObjString = function() { return JSON.stringify(e.productViewTrackingObj) } , e.onLoginLinkClick = l.onClickFunction, e.init = function(t, i, n) { var a, o, s, l; e.hotelReservationTrackingData = hotelReservationDataObj, e.ancillary = t, e.isMyBookingPage = i, e.isConfirmationPage = n, e.quantityObject = (a = e.ancillary.QuantityInStock < e.quantityObject.maxQuantity, e.quantityObject.maxQuantity = a ? e.ancillary.QuantityInStock : e.quantityObject.maxQuantity, e.ancillary.Variants.reduce((function(e, t) { return t.Id.includes("_LOY") ? e.pointsQuantity = t.Quantity : e.fiatQuantity = t.Quantity, e } ), r({}, e.quantityObject))), e.productViewTrackingObj = (o = e.productViewTrackingObj, s = t.Id, l = i, r(r({}, o), {}, { trackingInformation: r(r({}, o.trackingInformation), {}, { productid: s }), trackEvent: l })), e.ancillaryTrackingObject = { trackEvent: !1, trackingEvent: "scchange", trackingInformation: {} } } , e.ancillaryTrackingObjectString = function() { return JSON.stringify(e.ancillaryTrackingObject) } , e.showAncillary = function() { a(".navigation-bar").addClass("force-to-bottom"), navigator.userAgent.toLowerCase().indexOf("iphone") > -1 && a(".navigation-bar").addClass("absolute-position"), o(), e.showQuantityPickerTakeOwer = !0, e.updateTrackingInformation(), e.$broadcast("updateQuantityPickerBroadcast"), setTimeout((function() { a(".quantity-picker .custom-select:visible").focus() } ), 200) } , e.hideAncillary = function() { a(".navigation-bar").removeClass("force-to-bottom"), a(".navigation-bar .absolute-position") && a(".navigation-bar").removeClass("absolute-position"), i.notifyUpdateAncillaryOptionsObservers(e.ancillary.Id), o(), e.showQuantityPickerTakeOwer = !1 } , e.updateSelectedAncillaries = function() { e.$broadcast("updateSelectedAncillariesBroadcast"), o(), e.showQuantityPickerTakeOwer = !1 } , e.redirectToAncillaryPage = function() { if (e.$broadcast("updateSelectedAncillariesBroadcast"), e.totalQuantity() > 0) { var n = function() { var t = ""; t = "True" === i.ancillaryData.bookingInformation.urlEncryptionEnabled ? "" === i.ancillaryData.bookingInformation.refId ? "?bookingId=" + i.ancillaryData.bookingInformation.bookingId : "?RefId=" + i.ancillaryData.bookingInformation.refId : "?bookingId=" + i.ancillaryData.bookingInformation.bookingId; t += "&hotel=" + i.ancillaryData.bookingInformation.hotelOperaId, e.ancillary.Variants.forEach((function(e) { if (e.Quantity > 0) { var i = e.Id.includes("_LOY"); t += (i ? "&variantIdLoy=" : "&variantId=") + e.Id, t += (i ? "&quantityLoy=" : "&quantity=") + e.Quantity } } )), e.isConfirmationPage && (t += "&isConfirmationPage=" + e.isConfirmationPage); return e.$parent.ancillaryPagePathName + t }(); c.toggle((function() { t.location.href = n } )) } o(), e.showQuantityPickerTakeOwer = !1 } , e.ancillaryIsSelected = function() { return e.totalQuantity() > 0 } , e.totalQuantity = function() { return e.ancillary.Variants.reduce((function(e, t) { return e + t.Quantity } ), 0) } , e.updateTrackingInformation = function() { var t = i.getCurrentTrackingInfo(e.ancillary.Id) , n = { trackEvent: !1, trackingEvent: "scchange", trackingInformation: {} }; n.trackingInformation = t.trackingInfo, n.trackingInformation.productcategory = e.$parent.trackingFilterName, n.trackingInformation.hotelbnr = i.ancillaryData.bookingInformation ? i.ancillaryData.bookingInformation.bookingId : "", n.trackingInformation.hotelid = i.ancillaryData.bookingInformation ? i.ancillaryData.bookingInformation.hotelOperaId : "", n.trackEvent = t.trackEvent, Object.keys(e.hotelReservationTrackingData).forEach((function(t) { var i = t.toLowerCase(); n.trackingInformation[i] = e.hotelReservationTrackingData[t] } )), n.trackingInformation.hotelpagetype = e.isConfirmationPage ? "hotelconfirmationpage" : "addonpurchase", e.ancillaryTrackingObject = n } } angular.module("xenaApp").controller("BookingAncillaryController", e), e.$inject = ["$scope", "$window", "AncillaryService"] }() }, 82672: function(e, t, i) { var n = i(19755) , a = i(17970) , o = i(86455); !function() { "use strict"; function e(e, t, i) { e.circularLoader = '
', e.warningIcon = '', e.priceHtmlStringOnError = "Error, please reload this page", e.hiddenIds = [], e.hiddenInDom = !1, e.showAncillaryOrderMessage = !0, e.init = function(i) { e.ancillary = t.getAncillaryById(i), null !== window.sweetAlertJson && (e.cancelAlertData = window.sweetAlertJson) } , e.totalQuantity = function() { return this.ancillary.Variants.reduce((function(e, t) { return e + t.Quantity } ), 0) } , e.isHidden = function(t) { return e.hiddenIds.indexOf(t) > -1 } , e.totalAncillaryPriceString = function(e, t) { if (this.ancillary.Variants.length < 1) return ""; var i = this.ancillary.Variants.filter((function(e) { return e.Quantity > 0 } )) , n = i.filter((function(e) { return e.Price.Points > 0 } )) , a = i.filter((function(e) { return e.Price.Amount >= 0 } )) , o = ""; return o += n.length > 0 ? n[0].Price.Points * n[0].Quantity + " " + e : "", o += i.length > 1 ? " + " : "", o += a.length && t.length > 0 ? a[0].Price.Amount * a[0].Quantity + " " + t : "" } , e.deleteAncillary = function(n) { o.fire({ title: e.cancelAlertData.Title, html: e.cancelAlertData.Text, showCancelButton: !0, confirmButtonText: e.cancelAlertData.ConfirmButtonText, confirmButtonColor: null, cancelButtonText: e.cancelAlertData.CancelButtonText, animation: "slide-from-top", customClass: "remove-ancillary", allowOutsideClick: !0, preconfirm: function() { e.showSpinner() } }).then((function(r) { if (r.value) if (e.thisIsTheLastAncillary()) { var s = document.getElementById("my-booking-page-url"); s ? a.toggle((function() { window.location.href = s.value } )) : t.ClearAncillariesFromUrlAndReload() } else e.thisIsTheLastAncillaryForCash(n) ? (t.ClearAncillaryVariantFromUrlById(n), a.toggle((function() { window.location.reload() } ))) : (!function(i) { t.clearAncillaryById(i), t.ClearAncillaryVariantFromUrlById(i), t.saveToSessionStorage(), function(t) { e.hiddenIds.push(t), e.ancillary.Variants.some((function(e) { return !!e.Quantity } )) || (e.hiddenInDom = !0) }(i), e.showAncillaryOrderMessage = t.orderHasAncillaryWithDeliveryTime() }(n), t.ancillaryData.isPostBooking ? (e.hideSpinner(), o.close()) : (i.priceObject.totalPriceHtmlString = e.circularLoader, i.getTotEnterDetailsPrice(window.location.search).then((function(t) { e.hideSpinner(), t.data.Success ? (i.priceObject.totalPriceHtmlString = t.data.FormattedPrice, i.priceObject.firstRoomPriceHtmlString = t.data.FormattedRoomPrice, o.close()) : (i.priceObject.totalPriceHtmlString = e.priceHtmlStringOnError, o.fire({ title: e.cancelAlertData.ErrorTitle, text: e.cancelAlertData.ErrorText })) } ), (function(t) { e.hideSpinner(), i.priceObject.totalPriceHtmlString = e.priceHtmlStringOnError, o.fire({ title: e.cancelAlertData.ErrorTitle, text: e.cancelAlertData.ErrorText }) } ))), a.toggle((function() { window.location.reload() } ))) } )) } , e.thisIsTheLastAncillary = function() { return 1 === t.getNumberOfSelectedVariants() } , e.thisIsTheLastAncillaryForCash = function(e) { return !e.includes("_LOY") && 1 === t.getNumberOfAncillariesForCash() } , e.showSpinner = function() { window.Scandic.DisableEnableButton.disable(n("button.swal2-confirm")), n("button.swal2-cancel").attr("disabled", !0) } , e.hideSpinner = function() { window.Scandic.DisableEnableButton.enable(n("button.swal2-confirm")), n("button.swal2-cancel").attr("disabled", !1) } } angular.module("xenaApp").controller("BookingAncillaryEnterDetailsController", e), e.$inject = ["$scope", "AncillaryService", "BookingPriceService"] }() }, 93951: function() { !function() { "use strict"; function e(e, t) { function i() { if (void 0 !== e.options && e.options.length >= e.quantityObject.maxQuantity) for (var t = e.isPointsQuantityPicker ? e.quantityObject.fiatQuantity : e.quantityObject.pointsQuantity, i = 0; i < e.quantityObject.maxQuantity + 1; i++) i > e.quantityObject.maxQuantity - t ? e.options[i].disabled = !0 : e.isPointsQuantityPicker && i <= e.pointsOptionsToShow ? e.options[i].disabled = !1 : e.isPointsQuantityPicker || (e.options[i].disabled = !1) } function n(t) { if (e.ancillaryVariant.Id.includes(t)) { var i = e.options.selectedOption.name; return { productId: e.ancillaryVariant.Id, productPriceOut: e.ancillaryVariant.Price.Amount * i, productPointsOut: e.ancillaryVariant.Price.Points * i, productUnitsOut: i, productPriceIn: e.ancillaryVariant.Price.Amount * e.ancillaryVariant.Quantity, productPointsIn: e.ancillaryVariant.Price.Points * e.ancillaryVariant.Quantity, productUnitsIn: e.ancillaryVariant.Quantity, productcurrency: e.ancillaryVariant.CurrencyTracking, quantityHasChanged: e.ancillaryVariant.Quantity !== i } } return null } e.ancillaryVariant = void 0, e.options = [], e.notEnoughPointsLeft = !1, e.quantityOfAncillaryICanAfford = 0, e.emphasizeDropDown = !1, e.isPointsQuantityPicker = !1, e.userIsAuthenticated = !1, e.isLoggedIn = !1, e.isBookingOfLoggedInProfile = !1, e.isMemberBooking = !1, e.showPointsSectionForMember = !1, e.showPointsSectionForGuest = !1, e.isRoomCancellable = !1, e.ancillariesPointsTracker = t.ancillariesPointsTracker, e.quantityObject = e.$parent.quantityObject, e.$on("updateSelectedAncillariesBroadcast", (function() { var i = e.ancillaryVariant.Quantity * e.ancillaryVariant.Price.Points; t.setAncillaryQuantity(e.options.selectedOption.id, e.ancillaryVariant.Id), e.setEmphasizeDropDown(e.options.selectedOption.id), e.updateMyTotalPointsLeft(i) } )), e.$on("updateQuantityPickerBroadcast", (function() { if (e.isPointsQuantityPicker) { e.quantityOfAncillaryICanAfford = e.getQuantityOfAncillaryICanAfford(), e.notEnoughPointsLeft = e.quantityOfAncillaryICanAfford <= 0; var n = t.ancillariesPointsTracker.totalPointsLeft , a = e.ancillaryVariant.Quantity * e.ancillaryVariant.Price.Points , o = n + a; e.pointsOptionsToShow = Math.floor(o / e.ancillaryVariant.Price.Points), e.pointsOptionsToShow = e.pointsOptionsToShow < 6 ? e.pointsOptionsToShow : 6; for (var r = 6; r >= e.pointsOptionsToShow; r--) e.options[r].disabled = r > e.quantityOfAncillaryICanAfford; i() } } )), e.initQuantityPicker = function(i, a, o) { e.isPointsQuantityPicker = i.Id.includes("_LOY"), e.isRoomCancellable = o.IsRoomCancellable, e.userIsAuthenticated = a, e.isLoggedIn = o.IsLoggedIn, e.isBookingOfLoggedInProfile = o.IsBookingOfLoggedInProfile, e.isMemberBooking = o.IsMemberBooking, e.showPointsSectionForMember = e.isLoggedIn && e.isMemberBooking && e.isBookingOfLoggedInProfile, e.showPointsSectionForGuest = !e.isLoggedIn && e.isMemberBooking, e.ancillaryVariant = i, e.setOptions(), e.setEmphasizeDropDown(e.ancillaryVariant.Quantity), t.registerVariantQuantityCallback(n, e.ancillaryVariant.Id), t.registerUpdateAncillaryOptionsObservers(e.updateSelectedOptionCallback) } , e.onOptionChanged = function(t) { e.updateOptionQuantityTracker(t), e.$parent.updateTrackingInformation() } , e.$watch("quantityObject.fiatQuantity", i), e.$watch("quantityObject.pointsQuantity", i), e.variantIsDisabled = function() { return e.notEnoughPointsLeft || e.isPointsQuantityPicker && !e.userIsAuthenticated } , e.notLogedInAndVariantIsForPoints = function() { return e.isPointsQuantityPicker && !e.userIsAuthenticated } , e.showPointsSection = function() { return !e.isPointsQuantityPicker || !(!e.showPointsSectionForMember && !e.showPointsSectionForGuest) } , e.updateOptionQuantityTracker = function(t) { e.isPointsQuantityPicker ? e.quantityObject.pointsQuantity = t.id : e.quantityObject.fiatQuantity = t.id } , e.setEmphasizeDropDown = function(t) { e.emphasizeDropDown = !!t } , e.setOptions = function() { var t = !1; e.quantityOfAncillaryICanAfford = e.isPointsQuantityPicker ? e.getQuantityOfAncillaryICanAfford() : e.quantityObject.maxQuantity, e.notEnoughPointsLeft = e.quantityOfAncillaryICanAfford <= 0; for (var i = 0; i < e.quantityObject.maxQuantity + 1; i++) i > e.quantityOfAncillaryICanAfford && (t = !0), e.options.push({ id: i, name: i, disabled: t }); e.options.selectedOption = e.options[e.ancillaryVariant.Quantity] } , e.setAncillaryQuantity = function() { t.setAncillaryQuantity(e.options.selectedOption.id, e.ancillaryVariant.Id), e.setEmphasizeDropDown(e.options.selectedOption.id) } , e.updateSelectedOptionCallback = function(t) { e.ancillaryVariant.Id.indexOf(t) > -1 && (e.options.selectedOption = e.options[e.ancillaryVariant.Quantity]) } , e.getQuantityOfAncillaryICanAfford = function() { var i = 0; if (e.ancillaryVariant.Price.Points) { var n = e.ancillaryVariant.Quantity * e.ancillaryVariant.Price.Points , a = t.ancillariesPointsTracker.totalPointsLeft + n; i = (i = Math.floor(a / e.ancillaryVariant.Price.Points)) > e.$parent.quantityObject.maxQuantity ? e.$parent.quantityObject.maxQuantity : i } return i } , e.updateMyTotalPointsLeft = function(i) { var n = e.ancillaryVariant.Quantity * e.ancillaryVariant.Price.Points - i; t.ancillariesPointsTracker.totalPointsLeft -= n } , e.getAncillary = function(t) { e.ancillaryVariant = t, e.setOptions(), e.setEmphasizeDropDown(e.ancillaryVariant.Quantity) } } angular.module("xenaApp").controller("BookingAncillaryQuantityPickerController", e), e.$inject = ["$scope", "AncillaryService"] }() }, 26953: function(e, t, i) { var n = i(19755); function a(e) { return function(e) { if (Array.isArray(e)) return o(e) }(e) || function(e) { if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e) }(e) || function(e, t) { if (!e) return; if ("string" == typeof e) return o(e, t); var i = Object.prototype.toString.call(e).slice(8, -1); "Object" === i && e.constructor && (i = e.constructor.name); if ("Map" === i || "Set" === i) return Array.from(e); if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return o(e, t) }(e) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function o(e, t) { (null == t || t > e.length) && (t = e.length); for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i]; return n } angular.module("xenaApp").controller("BookingEnterDetailsController", ["$scope", "BookingPriceService", "AncillaryService", function(e, t, o) { e.bookingPrice = t.priceObject, e.bookingHasNoAncillaries = function() { return !o.ancillaryData.ancillaries || !o.ancillaryData.ancillaries.some((function(e) { return e.Variants.some((function(e) { return !!e.Quantity } )) } )) } , e.bookingHasAncillaryForCash = function() { return e.bookingPrice.totalCash() >= 0 } , e.bookingHasAncillaryForCashLabelSection = function() { return e.bookingPrice.totalCash() > 0 } , e.bookingHasAncillaryForPoints = function() { return e.bookingPrice.totalPoints() > 0 } , e.init = function(e) { return t.priceObject.totalPriceHtmlString = e } ; var r = i(86455) , s = /^30812(?!(0|1|2))[0-9]{9}$/; window.Scandic.runOnDocumentReady.push((function() { document.querySelector(".signup-form-section") && !document.querySelector(".signup-form-section").classList.contains("hidden") && document.querySelector("#member-input-group input") && (document.querySelector("#member-input-group input").value = "", document.getElementById("memebershipNumber").checked = !1), document.querySelector(".membership-input-hidden") && function(e) { var t = document.querySelector(".membership-top-input-placehoder").value , i = document.querySelector(".membership-bottom-input-placehoder").value , a = document.querySelector(".memberShipNumberInput"); if ("memberTopInputField" === e) var o = document.querySelector("#member-input-group .small-text"); else o = document.querySelector(".membership-input-hidden"); o.parentNode.insertBefore(a, o), "memberTopInputField" === e ? n("#member-input-group input").attr("placeholder", t) : n(".form-section .memberShipNumberInput input").attr("placeholder", i) }("memberTopInputField"), document.querySelector("#member-input-group input") && document.querySelector("#member-input-group input").value && (document.getElementById("memebershipNumber").checked = !0, n("#member-input-group").removeClass("hidden"), n(".member-input .member-subtext").addClass("hidden")), document.querySelector('input[name="memebershipNumber"]') && document.querySelector('input[name="memebershipNumber"]').checked && s.test(document.querySelector("#member-input-group input").value) && d(), document.querySelector(".booking-summary-list__totalPrice__item") && document.querySelector(".booking-summary-list__totalPrice__item .price--offer span > span:first-child").classList.contains("bc") && document.querySelector(".booking-summary-list__totalPrice__item .price--offer").classList.add("price--offer-bonus"), document.querySelector(".booking-member-price-details__container .price--offer span.price__currency") && document.querySelector(".booking-member-price-details__container .price--offer span > span:first-child").classList.contains("voucher") && document.querySelector(".booking-member-price-details__container .price--offer").classList.add("price--offer-voucher"), document.querySelector(".booking-member-price-details .price--offer span.voucher") && document.querySelector(".booking-member-price-details .price--offer span > span:first-child").classList.contains("voucher") && document.querySelector(".booking-member-price-details").classList.add("voucher--price"), document.querySelector(".booking-member-price-details .price--offer span.bc") && document.querySelector(".booking-member-price-details .price--offer span > span:first-child").classList.contains("bc") && document.querySelector(".booking-member-price-details").classList.add("bonus--price") } )), n('input[name="memebershipNumber"]').on("click", (function() { document.querySelector('input[name="memebershipNumber"]').checked ? (document.querySelector(".joinScandicFriendsCheck-checkbox").checked && n(".joinScandicFriendsCheck-checkbox").trigger("click"), document.querySelector("#member-input-group").classList.contains("hidden") && (n("#member-input-group").removeClass("hidden"), n(".member-input .member-subtext").addClass("hidden"))) : (c(), m()) } )); var l = null; function c() { document.querySelector("#member-input-group input").value = "", n("#member-input-group").addClass("hidden"), n(".member-input .member-subtext").removeClass("hidden"), n("#member-input-group #membership-number-0").trigger("change") } function d() { document.querySelector("#booking-member-price--details") && document.querySelector("#booking-member-price--details").classList.contains("hidden") && (n("#booking-member-price--details").removeClass("hidden"), document.querySelector("#booking--price--details").classList.add("hidden"), document.querySelector("#booking-member-price--details .price--offer span > span:first-child").classList.contains("bc") && n("#booking-member-price--details .price--offer").addClass("price--offer-bonus")), function() { u || (n(".room-price-info__rate-ribbon").toggleClass("hidden"), n(".room__body .pipe-separated-list-item .price").toggleClass("price--switch"), n(".room-price-info__rate").toggleClass("hidden"), n(".terms--list").toggleClass("hidden"), n(".room__rates .room__long-price").toggleClass("price--switch"), u = !0, p = !1); document.querySelector(".booking-details-footer") && h("add") }(), document.querySelector(".join-scandic-form-section") && document.querySelector(".joinScandicFriendsCheck-checkbox").checked && document.querySelector(".join-scandic-form-section").classList.remove("hidden"), document.querySelector("#booking-total-price") && (n("#booking-total-price.price.price--logout-member-price").addClass("price--offer"), n(".strike-logout-member-total-price").removeClass("hidden")), document.querySelector(".price--logout-member-price.price--offer span.price__currency") && document.querySelector(".price--logout-member-price.price--offer span > span:first-child").classList.contains("voucher") && document.querySelector(".price--logout-member-price.price--offer").classList.add("price--offer-voucher") } if (n(document).on("blur", "#member-input-group input", (function() { if (s.test(document.querySelector("#member-input-group input").value) && document.querySelector('input[name="memebershipNumber"]').checked) { var e = n("#member-input-group input").val(); l !== e && (document.querySelector("#multipleRoomsMemberDiscountAppliedModal") ? b() : g()), d(), l = e } else m() } )), n(".joinScandicFriendsCheck-checkbox").on("click", (function() { document.querySelector(".joinScandicFriendsCheck-checkbox").checked ? (document.querySelector('input[name="memebershipNumber"]') && (document.querySelector('input[name="memebershipNumber"]').checked = !1, c()), document.querySelector(".joinScandicFriendsCheck-checkbox").previousElementSibling.setAttribute("disabled", ""), document.querySelector(".userWantsToJoinScandicFriendsValue") && a(document.querySelectorAll(".userWantsToJoinScandicFriendsValue")).forEach((function(e) { e.value = "true" } )), document.querySelector("#multipleRoomsMemberDiscountAppliedModal") ? v() : f(), d()) : (document.querySelector(".joinScandicFriendsCheck-checkbox").previousElementSibling.removeAttribute("disabled"), document.querySelector(".userWantsToJoinScandicFriendsValue") && a(document.querySelectorAll(".userWantsToJoinScandicFriendsValue")).forEach((function(e) { e.value = "false" } )), m()) } )), window.addEventListener("pageshow", (function(e) { if ((e.persisted || void 0 !== window.performance && 2 === window.performance.navigation.type || this.sessionStorage.getItem("loginTrackData")) && ("logged in" == JSON.parse(this.sessionStorage.getItem("loginTrackData")).LoginStatus && document.querySelector(".price--offer span:nth-child(1)") && document.querySelector(".price--offer span:nth-child(2)"))) { var t = document.querySelector(".price--offer > span:nth-child(1)") , i = document.querySelector(".price--offer > span:nth-child(2)") , n = "#text" == t.childNodes[0].nodeName ? t.childNodes[0].nodeValue.trim() : t.childNodes[3].nodeValue.trim(); if (null != i) { var a = "#text" == i.childNodes[0].nodeName ? i.childNodes[0].nodeValue.trim() : i.childNodes[3].nodeValue.trim(); if (parseInt(n) > parseInt(a)) { for (var o = new URLSearchParams(window.location.search), r = decodeURI(window.location.href), s = 0; s < 4 && null != o.get("room[" + s + "].ratecode"); ) { if (o.get("room[" + s + "].ratecode") && o.get("room[" + s + "].counterratecode")) { o.get("room[" + s + "].ratecode"); r = (r = r.replace("room[" + s + "].ratecode=" + o.get("room[" + s + "].ratecode"), "room[" + s + "].ratecode=" + o.get("room[" + s + "].counterratecode"))).replace("room[" + s + "].counterratecode=" + o.get("room[" + s + "].counterratecode"), "room[" + s + "].counterratecode=" + o.get("room[" + s + "].ratecode")) } s++ } r = r.replace("#modal", ""), window.location.href = r } } } } )), document.querySelector(".member-price-shown")) var u = document.querySelector(".member-price-shown").value; var p = !u; function m() { p || (n(".room-price-info__rate-ribbon").toggleClass("hidden"), n(".room__body .pipe-separated-list-item .price").toggleClass("price--switch"), n(".room-price-info__rate").toggleClass("hidden"), n(".terms--list").toggleClass("hidden"), n(".room__rates .room__long-price").toggleClass("price--switch"), p = !0, u = !1), document.querySelector("#booking--price--details") && document.querySelector("#booking--price--details").classList.remove("hidden"), document.querySelector("#booking-member-price--details") && document.querySelector("#booking-member-price--details").classList.add("hidden"), document.querySelector(".join-scandic-form-section") && document.querySelector(".join-scandic-form-section").classList.add("hidden"), h("remove"), document.querySelector("#booking-total-price") && (n("#booking-total-price.price.price--logout-member-price").removeClass("price--offer"), n(".strike-logout-member-total-price").addClass("hidden")), document.querySelector(".price--logout-member-price.price--offer-voucher span.price__currency") && document.querySelector(".price--logout-member-price.price--offer-voucher span > span:first-child").classList.contains("voucher") && document.querySelector(".price--logout-member-price").classList.remove("price--offer-voucher") } function h(e) { "add" === e ? a(document.querySelectorAll(".booking-details-footer li.booking-price-details__item .price.price--member")).forEach((function(e) { 2 === e.children.length && e.classList.add("price--offer") } )) : "remove" === e && document.querySelector(".booking-details-footer") && a(document.querySelectorAll(".booking-details-footer li.booking-price-details__item .price.price--member")).forEach((function(e) { e.classList.remove("price--offer") } )) } var f = function(e) { r.fire({ title: n("#memberDiscountAppliedModal").attr("data-js-confirm"), html: n("#memberDiscountAppliedModal").attr("data-confirm-text") + '

' + n("#memberDiscountAppliedModal").attr("data-confirm-price-text") + '

' + n(".booking-member-price-details .price--offer").html() + '

' + n(".booking-member-price-details .price--offer-original").html() + "

", imageUrl: "/Static/img/icons/checkmark-circle.svg", showConfirmButton: !0, buttonsStyling: !0, confirmButtonColor: null, customClass: n("#memberDiscountAppliedModal").attr("data-class"), allowOutsideClick: !0, animation: !1 }) } , g = function(e) { r.fire({ title: n("#memberShipNumberDiscountAppliedModal").attr("data-js-confirm"), html: '

' + n("#memberDiscountAppliedModal").attr("data-confirm-price-text") + '

' + n(".booking-member-price-details .price--offer").html() + '

' + n(".booking-member-price-details .price--offer-original").html() + "

", imageUrl: "/Static/img/icons/checkmark-circle.svg", showConfirmButton: !0, buttonsStyling: !0, confirmButtonColor: null, customClass: n("#memberShipNumberDiscountAppliedModal").attr("data-class"), allowOutsideClick: !0, animation: !1 }) } , v = function(e) { r.fire({ title: n("#multipleRoomsMemberDiscountAppliedModal").attr("data-js-confirm"), html: n("#multipleRoomsMemberDiscountAppliedModal").attr("data-confirm-text") + '

' + n("#multipleRoomsMemberDiscountAppliedModal").attr("data-confirm-price-text") + '

' + n(".booking-member-price-details .price--offer").html() + '

' + n(".booking-member-price-details .price--offer-original").html() + '

' + n("#multipleRoomsMemberDiscountAppliedModal").attr("data-conform-multiroom-note-label") + " " + n("#multipleRoomsMemberDiscountAppliedModal").attr("data-conform-multiroom-note-text") + "

", imageUrl: "/Static/img/icons/checkmark-circle.svg", showConfirmButton: !0, buttonsStyling: !0, confirmButtonColor: null, customClass: n("#multipleRoomsMemberDiscountAppliedModal").attr("data-class"), allowOutsideClick: !0, animation: !1 }) } , b = function(e) { r.fire({ title: n("#multipleRoomsmemberShipNumberDiscountAppliedModal").attr("data-js-confirm"), html: '

' + n("#multipleRoomsMemberDiscountAppliedModal").attr("data-confirm-price-text") + '

' + n(".booking-member-price-details .price--offer").html() + '

' + n(".booking-member-price-details .price--offer-original").html() + '

' + n("#multipleRoomsMemberDiscountAppliedModal").attr("data-conform-multiroom-note-label") + " " + n("#multipleRoomsmemberShipNumberDiscountAppliedModal").attr("data-conform-multiroom-note-text") + "

", imageUrl: "/Static/img/icons/checkmark-circle.svg", showConfirmButton: !0, buttonsStyling: !0, confirmButtonColor: null, customClass: n("#multipleRoomsMemberDiscountAppliedModal").attr("data-class"), allowOutsideClick: !0, animation: !1 }) } } ]) }, 50972: function() { angular.module("xenaApp").controller("BookingModuleController", ["$scope", "$http", "BookingPriceService", function(e, t, i) { e.priceObject = i.priceObject, e.init = function(e) { "" !== e && (i.priceObject.totalPriceHtmlString = e) } } ]) }, 27903: function(e, t, i) { var n = i(19755); angular.module("xenaApp").controller("BookingRoomsAndRatesController", ["$scope", "$sce", "$timeout", function(e, t, i) { function a(t) { return void 0 !== e.legData[t] } function o(t, i) { var a = Number(i.currentTarget.dataset.dtmAvailableRooms) , o = t.rate.roomType; if (window.Scandic.roomAvailableData["room" + e.currentLegNumber] !== o) { var r = document.querySelectorAll(".booking__room__box") , s = t.roomTypeName.toLowerCase().replace(/[^a-z0-9]+/g, "_"); if (document.querySelector("input[name='singleAvailableRoom']")) var l = document.querySelector("input[name='singleAvailableRoom']").value; if (document.querySelector("input[name='pluralAvailableRooms']")) var c = document.querySelector("input[name='pluralAvailableRooms']").value; window.Scandic.roomAvailableData[o] || (window.Scandic.roomAvailableData[o] = a); var d = window.Scandic.roomAvailableData["room" + e.currentLegNumber]; d && d != o && (window.Scandic.roomAvailableData[d] = window.Scandic.roomAvailableData[d] + 1), window.Scandic.roomAvailableData["room" + e.currentLegNumber] = o; var u = window.Scandic.roomAvailableData["room" + e.currentLegNumber + "_roomType"]; window.Scandic.roomAvailableData["room" + e.currentLegNumber + "_roomType"] = s, window.Scandic.roomAvailableData[o] = window.Scandic.roomAvailableData[o] - 1, e.legNumbers.forEach((function(e) { var t = n(r[e]).find("#" + s + " .room-pay__btn"); if (s) var i = r[e].querySelector("#" + s + " .room__available-rooms"); window.Scandic.roomAvailableData[o] >= 0 && i && (1 === window.Scandic.roomAvailableData[o] ? i.innerHTML = l.replace(/\d/g, window.Scandic.roomAvailableData[o]) : (i.innerHTML = c.replace(/\d/g, window.Scandic.roomAvailableData[o]), 0 === window.Scandic.roomAvailableData[o] && t.each((function(e) { n(this).attr("disabled", "disabled") } )))); var a = n(r[e]).find("#" + u + " .room-pay__btn"); if (u) var p = r[e].querySelector("#" + u + " .room__available-rooms"); d && d != o && p && (1 === window.Scandic.roomAvailableData[d] ? p.innerHTML = l.replace(/\d/g, window.Scandic.roomAvailableData[d]) : p.innerHTML = c.replace(/\d/g, window.Scandic.roomAvailableData[d]), a.each((function(e) { n(this).removeAttr("disabled") } ))) } )) } } e.currentLegNumber = 0, e.legNumbers = [], e.legData = [], e.allRoomsSelected = !1, e.registerSelectableRoom = function(t) { -1 === e.legNumbers.indexOf(t) && e.legNumbers.push(t), e.isMultiRoomBooking() && (e.currentLegNumber = null) } , e.selectRate = function(t, r) { e.legData[e.currentLegNumber] = t, function(t) { n("#room-ribbon-image-" + e.currentLegNumber).html(n("#room-media-" + t.roomDomId).html()), e.legData[e.currentLegNumber].roomTypeHeading = n("#room-heading-" + t.roomDomId).text(), e.legData[e.currentLegNumber].rateTooltipId = t.rateConditionsTooltip }(t), e.isSingleRoomBooking() ? i((function() { n("#rooms-and-rates-form").submit() } )) : e.legNumbers.every((function(e) { return a(e) } )) ? (o(t, r), e.currentLegNumber = null, e.allRoomsSelected = !0, e.allRoomsSelected && (n(window).width() < 950 ? n("body, html").animate({ scrollTop: n("#hotel_body").offset().top - 60 }, "slow") : n("body, html").animate({ scrollTop: n("#hotel_body").offset().top }, "slow"))) : (o(t, r), e.currentLegNumber = function() { var t = e.legNumbers.filter((function(e) { return !a(e) } )); if (t.sort(), e.currentLegNumber < Math.max.apply(this, t)) for (; t[0] < e.currentLegNumber; ) t.push(t.shift()); return t[0] }(), i((function() { window.Scandic.ensureElementIsVisible(n("#booking-leg-" + e.currentLegNumber)) } ))) } , e.hasSelectedRateForCurrentRoom = function() { return void 0 !== e.legData[e.currentLegNumber] } , e.getSelectedRateCode = function() { return e.hasSelectedRateForCurrentRoom() ? e.legData[e.currentLegNumber].rate.rateCode : void 0 } , e.getSelectedRoomType = function() { return e.hasSelectedRateForCurrentRoom() ? e.legData[e.currentLegNumber].rate.roomType : void 0 } , e.selectedRoomTypeIn = function(t) { return t.indexOf(e.getSelectedRoomType()) > -1 } , e.multiRoomFormData = function() { var t = {}; return e.legData.forEach((function(e) { for (var i in e.params) e.params.hasOwnProperty(i) && (t[i] = e.params[i]) } )), t } , e.toggleLeg = function(t) { e.currentLegNumber === t ? e.currentLegNumber = null : e.currentLegNumber = t } , e.formattedPriceForLeg = function(t) { if (!e.legData[t]) return ""; var i = e.legData[t].rate , n = i.price + " " + i.currency; return i.numberOfBonusCheques > 0 ? i.numberOfBonusCheques + " BC + " + n : n } , e.totalPrice = function() { return e.legData.reduce((function(e, t) { return e + t.rate.price } ), 0) } , e.formattedTotalPrice = function() { var i = { numberOfBonusCheques: 0, price: 0, currency: void 0 }; e.legData.forEach((function(e) { e && (i.numberOfBonusCheques += e.rate.numberOfBonusCheques, i.price += e.rate.price, i.currency = i.currency || e.rate.currency) } )); var n = i.price + ' ' + i.currency + ""; return i.numberOfBonusCheques > 0 ? t.trustAsHtml(i.numberOfBonusCheques + ' BC + ' + n) : t.trustAsHtml(n) } , e.rateConditionsText = function() { var t, i = e.legData.map((function(e) { return e.rate.rateConditions } )); return (t = i).every((function(e) { return e === t[0] } )) ? i[0] : e.termsDifferCondition || "" } , e.isSingleRoomBooking = function() { return 1 === e.legNumbers.length } , e.isMultiRoomBooking = function() { return e.legNumbers.length > 1 } , e.submitBooking = function() { i((function() { n("#rooms-and-rates-form").submit() } )) } , window.Scandic.roomAvailableData = {} } ]) }, 62865: function() { angular.module("xenaApp").controller("BookingRoomsAndRatesLegController", ["$scope", function(e) { e.legNumber = void 0, e.isSelected = !1, e.showRates = !1, e.roomRateData = { params: [] }, e.rateModel = { index: null }, e.$parent.$watch("currentLegNumber", (function(t) { e.editingLeg = t === e.legNumber } )), e.selectRate = function(t, i) { e.isSelected = !0, e.data = t, e.$parent.selectRate(t, i) } , e.toggleLegEditing = function() { e.$parent.toggleLeg(e.legNumber), e.editingLeg = !e.editingLeg } , e.shouldShowSpeechBubble = function() { return null === e.currentLegNumber ? 0 === e.legNumber && !e.isSelected : e.editingLeg && !e.isSelected } , e.toggleRates = function() { return e.showRates = !e.showRates } , e.initSetPreSelected = function(t, i) { e.roomRateData.params = t, e.rateModel.index = i } , e.roomRatesChanged = function(t) { return e.roomRateData.params = t } , e.submitPartialPaymentBooking = function() { e.$parent.legData[0] = e.roomRateData, e.$parent.submitBooking() } } ]) }, 3620: function(e, t, i) { var n = i(19755); !function() { "use strict"; function e(e, t, i) { e.circularLoader = '
', e.userPoints = new Number(i.userData.points).formatNumberThousandDelimiter(), e.donationWasSuccess = !1, e.donationHasError = !1, e.donationAmount = 0, e.sendingDonation = !1, e.charity = { id: null }, e.init = function() { i.registerResetCharityObserver(e.resetCharity) } , e.setDonationAmount = function(t) { e.donationAmount = t } , e.setDonation = function() { i.chosenCharity.id = e.charity.id } , e.addHashToUrlForHistoryNavigation = function() { var e = window.location.href + "#"; window.history.pushState(null, "", e) } , e.resetAll = function() { e.donationWasSuccess = !1, e.donationHasError = !1, i.chosenCharity.id = null, i.notifyResetCharityObservers() } , e.resetCharity = function() { e.charity.id = null } , e.postDonation = function() { e.sendingDonation = !0, t.post("/ajax/donate", e.charity).then((function(t) { e.sendingDonation = !1, e.updatePoints(), e.donationWasSuccess = t.data.Success, e.donationHasError = !t.data.Success, i.donationsData.donationWasSuccess = t.data.Success } ), (function(t) { e.sendingDonation = !1, e.donationHasError = !0 } )) } , e.updatePoints = function() { n("#my-pages-hero-area__points-section").html(e.circularLoader), i.getAvailablePoints().then((function(e) { var t = new Number(e.data.Points).formatNumberThousandDelimiter(); n("#my-pages-hero-area__points-section").html(t) } ), (function() { i.userData.points = "" } )) } , e.notEnoughPoints = function(e) { return i.userData.points < e } , e.noCharitySelected = function() { return null === e.charity.id } , e.otherCharityIsChosen = function() { return null !== i.chosenCharity.id && !e.thisCharityIsChosen() } , e.thisCharityIsChosen = function() { return null !== e.charity.id && e.charity.id === i.chosenCharity.id } , e.getPointsLeft = function() { return i.userData.points - e.donationAmount } } angular.module("xenaApp").controller("CharityController", e), e.$inject = ["$scope", "$http", "DonationsService"] }() }, 88154: function() { angular.module("xenaApp").controller("CreditCardController", ["$scope", "creditCardService", function(e, t) { function i(t) { e.creditCardRequired = a(), n(t) } function n(t) { var i = !e.creditCardRequired || !e.cardIsExpired(); t.MonthField && (t.MonthField.$setValidity("expiration", i), t.YearField.$setValidity("expiration", i)) } function a() { return e.creditCardData.creditCardIsInRequiredContext && "saved" !== e.useFlexCard && e.captureCreditCardDetails } e.creditCardData = t.data, e.useFlexCard = void 0, e.creditCardRequired = a(), e.currentFormData = function() { return { YearField: e.creditCardForm[e.expirationYearFieldName], MonthField: e.creditCardForm[e.expirationMonthFieldName], ExpirationYear: e.expirationYear, ExpirationMonth: e.expirationMonth } } , e.$watch("guaranteeForLateArrival", (function() { e.creditCardData.creditCardIsInRequiredContext = void 0 === e.guaranteeForLateArrival || e.guaranteeForLateArrival, i(e.currentFormData()) } )), e.$watch("useFlexCard", (function() { return i(e.currentFormData) } )), e.$watch("expirationMonth", (function() { return n(e.currentFormData()) } )), e.$watch("expirationYear", (function() { return n(e.currentFormData()) } )), e.cardIsExpired = function() { var t = new Date , i = t.getMonth() + 1; return e.expirationYear < t.getFullYear() || parseInt(e.expirationYear) === t.getFullYear() && e.expirationMonth < i } } ]) }, 76114: function() { !function() { "use strict"; function e(e, t) { e.donationPageTitle = "", e.donationConfirmTitle = "", e.donationReciptTitle = "", e.init = function(i, n, a, o) { e.donationPageTitle = i, e.donationConfirmTitle = n, e.donationReciptTitle = a, t.userData.points = o } , e.noCharityIsChosen = function() { return null === t.chosenCharity.id } , e.donationWasSuccess = function() { return t.donationsData.donationWasSuccess } , e.getDonationsTitle = function() { return e.noCharityIsChosen() ? e.donationPageTitle : t.donationsData.donationWasSuccess ? e.donationReciptTitle : e.donationConfirmTitle } , e.charityIsChosen = function() { return null !== t.chosenCharity.id } } angular.module("xenaApp").controller("DonationsPageController", e), e.$inject = ["$scope", "DonationsService"] }() }, 73986: function(e, t, i) { var n = i(19755) , a = i(86455); angular.module("xenaApp").controller("MyBookingAncillaryController", ["$scope", "$http", "AncillaryService", "BookingPriceService", "$window", function(e, t, i, o, r) { e.spinner = '
', e.ancillaryId = 0, e.ancillariesToShow = i.ShowAncillariesObject.ancillaries, e.cancelAlertData = {}, e.ancillaryTrackingData = {}, e.ancillaryVariantIds = [], e.init = function(e) { i.ShowAncillariesObject.ancillaries.indexOf(e) < 0 && i.ShowAncillariesObject.ancillaries.push(e), this.ancillaryId = e, this.cancelAlertData = r.sweetAlertJson } , e.initSetTrackingData = function(e, t, n, a, o, s, l) { this.ancillaryVariantIds = e.split(","), angular.forEach(this.ancillaryVariantIds, (function(e) { i.ShowAncillariesObject.ancillaries.indexOf(e) < 0 && i.ShowAncillariesObject.ancillaries.push(e) } )), this.ancillaryId = this.ancillaryVariantIds[0], this.cancelAlertData = r.sweetAlertJson; var c = {}; c = { hotelId: s, hotelbnr: o, productid: e, productunits: t, productprice: n, productcurrencycode: a, event: "scremove" }, (c = Object.assign(c, hotelReservationDataObj)).HotelPageType = l ? "hotelconfirmationpage" : "addonpurchase"; var d = this; Object.keys(c).forEach((function(e) { var t = e.toLowerCase(); d.ancillaryTrackingData[t] = c[e] } )) } , e.showAncillary = function() { return e.ancillariesToShow.indexOf(e.ancillaryId) > -1 } , e.cancelAncillary = function(t, s) { a.fire({ title: e.cancelAlertData.Title, html: e.cancelAlertData.Text, confirmButtonText: e.cancelAlertData.ConfirmButtonText, confirmButtonColor: null, showCancelButton: !0, cancelButtonText: e.cancelAlertData.CancelButtonText, animation: "slide-from-top", allowOutsideClick: function() { return !a.isLoading() }, customClass: "remove-ancillary", preConfirm: function() { return e.showSpinner(), i.cancelAncillaryFromBookingPut(t, e.ancillaryVariantIds, s).then((function(e) { return e } ), (function(t) { e.hideSpinner(), a.fire({ title: e.cancelAlertData.ErrorTitle, text: e.cancelAlertData.ErrorText, customClass: "remove-ancillary" }) } )) } }).then((function(l) { if (l.value) if (l.value.data.Success) { e.hideSpinner(), r.datalayer.push(e.ancillaryTrackingData), a.fire({ title: e.cancelAlertData.SuccessTitle, text: e.cancelAlertData.SuccessText, customClass: "remove-ancillary" }), o.priceObject.totalPriceHtmlString = e.spinner, angular.forEach(e.ancillaryVariantIds, (function(e) { var t = i.ShowAncillariesObject.ancillaries.indexOf(e); i.ShowAncillariesObject.ancillaries[t] = "" } )), o.getTotalPrice(t, s).then((function(e) { o.priceObject.totalPriceHtmlString = e.data.FormattedPrice } )); var c = n(".l-booking-panel.l-booking-panel--my-booking"); c && c.hide() } else a.fire({ title: e.cancelAlertData.ErrorTitle, text: e.cancelAlertData.ErrorText, customClass: "remove-ancillary" }) } )) } , e.showSpinner = function() { window.Scandic.DisableEnableButton.disable(n("button.swal2-confirm")), n("button.swal2-cancel").attr("disabled", !0) } , e.hideSpinner = function() { window.Scandic.DisableEnableButton.enable(n("button.swal2-confirm")), n("button.swal2-cancel").attr("disabled", !1) } } ]) }, 81222: function(e, t, i) { var n = i(86455); angular.module("xenaApp").controller("ProfileMembershipCardsController", ["$scope", function(e) { function t(t) { e.profileMembershipCardsDetails.splice(t, 1), e.$apply() } e.maxCards = 9, e.profileMembershipCardsDetails = [], e.$watch("profileMembershipCardsDetails", (function(t) { e.profileMembershipCardsDetailsJson = angular.toJson(e.profileMembershipCardsDetails) } ), !0), e.loadCardDetails = function(t) { t && t.length > 0 && t.forEach((function(t) { e.profileMembershipCardsDetails.push({ cardtype: t.cardtype, cardnumber: t.cardnumber, operaid: t.operaid }) } )) } , e.addNewCard = function() { if (e.profileMembershipCardsDetails.length < e.maxCards) { e.profileMembershipCardsDetails.push({ cardtype: "", cardnumber: "", operaid: "" }) } } , e.isCardtypeMissing = function(e) { return "" === e.cardtype && "" !== e.cardnumber } , e.isCardnumberMissing = function(e) { return "" !== e.cardtype && "" === e.cardnumber } , e.removeCardWithConfirmation = function(e, i, a) { var o = a.currentTarget; "" !== e.cardtype || "" !== e.cardnumber ? n.fire({ title: o.getAttribute("data-js-confirm-title"), html: o.getAttribute("data-confirm-text"), showCancelButton: !0, confirmButtonText: o.getAttribute("data-confirm-ok"), cancelButtonText: o.getAttribute("data-confirm-cancel"), confirmButtonColor: "#00838e", animation: "slide-from-top", allowOutsideClick: !0, buttonsStyling: !0, customClass: "remove-card", showLoaderOnConfirm: !1 }).then((function(e) { e.value && t(i) } )) : t(i) } } ]) }, 10712: function(e, t, i) { var n = i(19755); !function() { "use strict"; function e(e, t) { e.showInformationMessage = !1, e.init = function(t) { e.showMoreShowLessLabel = t } , e.toggleCreditCardInformation = function(i, a) { e.showInformationMessage = !e.showInformationMessage; var o = n("[data-expandable]") , r = o.outerHeight(); e.showInformationMessage || o.parent().css("height", r), o.parent().css({ height: e.showInformationMessage ? r : 0, opacity: e.showInformationMessage ? 1 : 0 }), e.showMoreShowLessLabel = e.showInformationMessage ? a : i, e.showInformationMessage && t((function() { o.parent().css("height", "") } ), 200) } } angular.module("xenaApp").controller("ScandicInformationAlertController", e), e.$inject = ["$scope", "$timeout"] }() }, 95454: function() { !function() { "use strict"; function e(e) { e.showMoreText = "", e.showLessText = "", e.showAll = !1, e.showMoreShowLessText = e.showMoreText, e.isExpandedClass = "", e.ShowMoreClick = function(t) { t.stopPropagation(), e.showAll = !e.showAll, e.showMoreShowLessText = e.showAll ? e.showLessText : e.showMoreText, e.isExpandedClass = e.showAll ? "is-expanded" : "" } , e.init = function(t, i) { e.showMoreText = t, e.showLessText = i, e.showMoreShowLessText = e.showMoreText } } angular.module("xenaApp").controller("ShowMoreController", e), e.$inject = ["$scope"] }() }, 1466: function(e, t, i) { var n = i(19755); !function() { "use strict"; function e(e) { e.isOpen = !1, e.toggleContainer = function() { e.isOpen = !e.isOpen, setTimeout((function() { n(".hotel-slider.royalSlider").data("royalSlider").updateSliderSize() } ), 30) } , e.toggleContainerDown = function(t) { e.isOpen = !e.isOpen; var i = n("#" + t).offset() , a = "none" == n(".navigation-bar__main__expander").css("display") ? i.top : i.top - n(".navigation-bar__main").height(); n("html, body").animate({ scrollTop: a }, 800) } , e.toggleContainerHotelBlock = function() { e.toggleContainer(); var t = n("#hotel_block").offset() , i = "none" == n(".navigation-bar__main__expander").css("display") ? t.top : t.top - n(".navigation-bar__main").height(); setTimeout((function() { n("html, body").animate({ scrollTop: i }, 500) } ), 100) } , e.init = function(t) { e.roomLabel = t } } angular.module("xenaApp").controller("ToggleController", e), e.$inject = ["$scope"] }() }, 91519: function() { angular.module("xenaApp").directive("blacklist", (function() { return { require: "ngModel", link: function(e, t, i, n) { var a = i.blacklist.split(","); n.$parsers.unshift((function(e) { var t = i.blacklistIdentifier ? !a.includes(e[i.blacklistIdentifier]) : !a.includes(e); return n.$setValidity("blacklist", t), t ? e : void 0 } )), n.$formatters.unshift((function(e) { return n.$setValidity("blacklist", i.blacklistIdentifier && e ? !a.includes(e[i.blacklistIdentifier]) : !a.includes(e)), e } )) } } } )) }, 99492: function() { angular.module("xenaApp").directive("errorMessageFor", (function() { return { link: function(e, t, i) { var n = i.errorMessageFor.split(/,\s+/) , a = t.closest("[data-ng-form]") , o = ""; function r() { return e.showAllValidations || c((function(e) { return e.$touched } )) } function s() { return i.error.match(/\(\)/) ? e.$eval(i.error) : c((function(e) { return !!e.$error[i.error] } )) } function l() { r() && s() ? t.show() : t.hide() } function c(t) { return n.some((function(i) { return t(e[o][i]) } )) } o = 0 !== a.length ? a.attr("data-ng-form") : t.closest("form").attr("name"), e.$watch((function() { return r() } ), (function() { l() } )), e.$watch((function() { return s() } ), (function() { l() } )) } } } )) }, 36185: function() { angular.module("xenaApp").directive("legNumber", (function() { return { link: function(e, t, i) {} } } )) }, 17163: function(e, t, i) { var n = i(19755); angular.module("xenaApp").directive("scrollTo", [function() { return { restrict: "A", link: function(e, t, i) { t.click(function(e) { return function() { n("html, body").animate({ scrollTop: n(e.scrollTo).offset().top - 100 }, 300) } }(i)) } } } ]) }, 21306: function() { angular.module("xenaApp").directive("showWithEventTrigger", (function() { return { link: function(e, t, i) { var n = i.showWithEventTrigger; e.$watch(n, (function(e, i) { e ? (t.show(), t.trigger("show")) : t.hide() } )) } } } )) }, 6762: function() { angular.module("xenaApp").directive("slideable", (function() { return { restrict: "C", compile: function(e, t) { var i = e.html(); return e.html('
' + i + "
"), function(e, t, i) { i.duration = i.duration ? i.duration : "1s", i.easing = i.easing ? i.easing : "ease-in-out", t.css({ overflow: "hidden", height: "0px", transitionProperty: "height", transitionDuration: i.duration, transitionTimingFunction: i.easing }) } } } } )).directive("slideToggle", (function() { return { restrict: "A", link: function(e, t, i) { var n, a; i.expanded = !1, t.bind("click", (function() { if (n || (n = document.querySelector(i.slideToggle)), a || (a = n.querySelector(".slideable_content")), i.expanded) n.style.height = "0px"; else { a.style.border = "1px solid rgba(0,0,0,0)"; var e = a.clientHeight; a.style.border = 0, n.style.height = e + "px" } i.expanded = !i.expanded } )) } } } )) }, 50867: function(e, t, i) { var n = i(19755); angular.module("xenaApp").directive("tabLoop", ["$log", "$templateCache", "$compile", function(e, t, i) { return { restrict: "A", link: function(e, t, i) { !function(e) { var t = e.slice(0, 2) , i = e.slice(-2) , a = t.first() , o = i.last() , r = t.last() , s = i.first(); n(o).focus((function() { n(r).focus() } )), n(a).focus((function() { n(s).focus() } )) }(n("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]", t)) } } } ]) }, 60979: function(e, t, i) { var n = i(19755); angular.module("xenaApp").directive("toolTip", ["$log", "$templateCache", "$compile", function(e, t, i) { return { restrict: "A", link: function(e, t, i) { i.$$element.click(function(e, t) { return function() { n(".custom-select option:enabled").each((function() { var e = n(this); "" !== e.attr("title") && e.attr("title", "") } )), n(".custom-select option[disabled]").each((function() { var e = n(this); e.attr("title") !== t.toolTip && e.attr("title", t.toolTip) } )) } }(0, i)) } } } ]) }, 20905: function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(19755); angular.module("xenaApp").directive("form", (function() { "use strict"; function scrollToFirstError(e) { var t = getHighestPosition(e.closest("form").find(".ng-invalid")); void 0 === t || withinViewportHeight(t) || $("html, body").animate({ scrollTop: t - 120 + "px" }) } function getHighestPosition(e) { var t; return $.each(e, (function(e, i) { var n = $(i).offset().top; (void 0 === t || n < t) && (t = n) } )), t } function withinViewportHeight(e) { var t = $(window); return !(e < t.scrollTop()) && e <= t.scrollTop() + t.height() } return { restrict: "E", require: "?ngController", link: function link(scope, elm, attrs) { var onSubmitHandler = attrs.onsubmit; elm.attr("onsubmit", null), elm.attr("data-angular-validation", !0), void 0 !== elm.attr("name") && elm.on("submit", (function(event) { return scope[elm.attr("name")].$valid ? (void 0 !== onSubmitHandler && eval(onSubmitHandler), elm.trigger("submitValidForm"), !0) : void 0 !== elm.closest("form").attr("data-skip-validation") && "false" !== elm.closest("form").attr("data-skip-validation") ? (elm.trigger("submitValidForm"), !0) : (event.preventDefault(), event.stopPropagation(), scope.showAllValidations = !0, scope.$apply(), void scrollToFirstError(elm)) } )) } } } )) }, 70579: function() { angular.module("xenaApp").directive("validateUniqueness", ["uniquenessService", function(e) { return { require: "ngModel", link: function(t, i, n, a) { a.$validators.unique = function(i, o) { return !!a.$isEmpty(i) || e.isUnique(t, n.ngModel, o) } } } } ]) }, 62485: function() { angular.module("xenaApp").directive("valueType", (function() { var e = { string: function(e) { return e.value }, int: function(e) { return parseInt(e.value) }, float: function(e) { return parseFloat(e.value) }, date: function(e) { return Date.parse(e.value) }, checkbox: function(e) { return !!e.checked }, select: function(e, t) { return t.val() } }; function t(t, i, n) { return "function" == typeof e[t] ? e[t](i, n) : (console.warn('No parser available for type "' + t + '", assuming type "string"'), e.string(i, n)) } return { require: "ngModel", restrict: "A", link: function(e, i, n, a) { void 0 !== n.pickADate ? e[n.pickADate] = t(n.valueType, n, i) : e[n.ngModel] = t(n.valueType, n, i) } } } )) }, 68095: function(e, t, i) { var n = i(19755); function a(e, t) { var i = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter((function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable } ))), i.push.apply(i, n) } return i } function o(e) { for (var t = 1; t < arguments.length; t++) { var i = null != arguments[t] ? arguments[t] : {}; t % 2 ? a(Object(i), !0).forEach((function(t) { r(e, t, i[t]) } )) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : a(Object(i)).forEach((function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(i, t)) } )) } return e } function r(e, t, i) { return t in e ? Object.defineProperty(e, t, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = i, e } !function() { "use strict"; function e(e, t) { var i = this; function a(e) { return e.reduce((function(e, t) { return e + t.Variants.reduce((function(e, t) { return e + t.Price.Points * t.Quantity } ), 0) } ), 0) } function r() { var e = null; if ("sessionStorage"in window && null !== window.sessionStorage) { var t = window.sessionStorage.getItem("ancillaryData"); t && (e = JSON.parse(t)) } return e } this.ancillaryData = { ancillaries: [] }, this.setAncillaryData = function(e) { return i.ancillaryData = e ? JSON.parse(JSON.stringify(e)) : {} } , this.ShowAncillariesObject = { ancillaries: [] }, this.ancillariesPointsTracker = { totalPointsLeft: 0, totalInitialPoints: 0 }, this.getVariantQuantityCallbacks = [], this.updateAncillaryOptionsObservers = [], this.registerVariantQuantityCallback = function(e, t) { for (var n = 0; n < i.getVariantQuantityCallbacks.length; n++) { i.getVariantQuantityCallbacks[n].id === t && i.getVariantQuantityCallbacks.splice(n, 1) } var a = { callback: e, id: t }; i.getVariantQuantityCallbacks.push(a) } , this.getCurrentTrackingInfo = function(e) { var t = { trackingInfo: { productid: "", productpriceout: "", productpointsout: "", productunitsout: "", productpricein: "", productpointsin: "", productunitsin: "", productcurrency: "" }, trackEvent: !1 }; return angular.forEach(i.getVariantQuantityCallbacks, (function(i) { var n = i.callback(e) , a = ","; null != n && (t.trackingInfo.productid && (a = ""), t.trackingInfo.productid += n.productId + a, t.trackingInfo.productpriceout += n.productPriceOut.toString() + a, t.trackingInfo.productpointsout += n.productPointsOut.toString() + a, t.trackingInfo.productunitsout += n.productUnitsOut.toString() + a, t.trackingInfo.productpricein += n.productPriceIn.toString() + a, t.trackingInfo.productpointsin += n.productPointsIn.toString() + a, t.trackingInfo.productunitsin += n.productUnitsIn.toString() + a, t.trackingInfo.productcurrency += n.productcurrency, t.trackEvent = t.trackEvent || n.quantityHasChanged) } )), t } , this.registerUpdateAncillaryOptionsObservers = function(e) { return i.updateAncillaryOptionsObservers.push(e) } , this.notifyUpdateAncillaryOptionsObservers = function(e) { return angular.forEach(i.updateAncillaryOptionsObservers, (function(t) { t(e) } )) } , this.setAncillaryQuantity = function(e, t) { i.ancillaryData.ancillaries.forEach((function(i) { i.Variants.forEach((function(i) { return i.Quantity = i.Id === t ? e : i.Quantity } )) } )) } , this.calculateTotalPointsLeftFromAncillaryData = function() { var e = i.ancillariesPointsTracker.totalInitialPoints - a(i.ancillaryData.ancillaries); e >= 0 ? i.ancillariesPointsTracker.totalPointsLeft = e : (i.ancillaryData.ancillaries = i.ancillaryData.ancillaries.map((function(e) { return e.Variants.map((function(e) { return e.Id.includes("LOY") ? o(o({}, e), {}, { Quantity: 0 }) : e } )) } )), i.ancillariesPointsTracker.totalPointsLeft = i.ancillariesPointsTracker.totalInitialPoints) } , this.getTotalSelectedPoints = function() { return a(i.ancillaryData.ancillaries) } , this.getTotalSelectedCash = function() { return i.ancillaryData.ancillaries.reduce((function(e, t) { return e + t.Variants.reduce((function(e, t) { return e + t.Price.Amount * t.Quantity } ), 0) } ), 0) } , this.setAncillaryDataFromSessionStorage = function(e) { var t = r(); null !== t ? null === t.isAuthenticated || t.isAuthenticated !== e.isAuthenticated ? (i.setAncillaryData(e), i.saveToSessionStorage()) : i.setAncillaryData(t) : i.setAncillaryData(e) } , this.updateAncillaryData = function(e) { var t, n, a = r(); null != a ? (t = e, function(e) { e.ancillaries = e.ancillaries.map((function(e) { return e.Variants = e.Variants.map((function(e) { return o(o({}, e), {}, { Quantity: 0 }) } )), e } )) }(n = a), n = n.ancillaries.map((function(e) { var i = t.ancillaries.find((function(t) { return t.Id === e.Id } )); return i && (e.Variants = e.Variants.map((function(e) { var t = i.Variants.find((function(t) { return t.Id === e.Id } )); return t ? o(o({}, e), {}, { Quantity: t.Quantity }) : e } ))), e } )), i.setAncillaryData(a), i.saveToSessionStorage()) : i.setAncillaryData(e) } , this.getNumberOfSelectedVariants = function() { return i.ancillaryData.ancillaries.flatMap((function(e) { return e.Variants } )).filter((function(e) { return !!e.Quantity } )).length } , this.getNumberOfAncillariesForCash = function() { return i.ancillaryData.ancillaries.reduce((function(e, t) { return t.Variants.some((function(e) { return !!e.Quantity && !!e.Price.Amount } )) ? e + 1 : e } ), 0) } , this.orderHasAncillaryWithDeliveryTime = function() { return i.ancillaryData.ancillaries.some((function(e) { return function(e) { return !e.DeliveryTimeOptional && e.Variants.some((function(e) { return !!e.Quantity } )) }(e) } )) } , this.cancelAncillaryFromBookingPut = function(e, i, n) { var a = "/ajax/bookings/" + e + "/ancillary/cancel" , o = { Ids: i, LastName: n }; return t.post(a, o) } , this.getAncillary = function(e) { return i.ancillaryData.ancillaries[e] } , this.getAncillaryById = function(e) { return i.ancillaryData.ancillaries.find((function(t) { return t.Id === e } )) } , this.getAncillaries = function() { return i.ancillaryData.ancillaries } , this.saveToSessionStorage = function() { "sessionStorage"in window && null !== window.sessionStorage && window.sessionStorage.setItem("ancillaryData", JSON.stringify(i.ancillaryData)) } , this.deleteFromSessionStorage = function() { "sessionStorage"in window && null !== window.sessionStorage && window.sessionStorage.removeItem("ancillaryData") } , this.clearAncillaryById = function(e) { i.ancillaryData.ancillaries = function(e, t) { return e.map((function(e) { return e.Variants = e.Variants.map((function(e) { return e.Id === t ? o(o({}, e), {}, { Quantity: 0 }) : e } )), e } )) }(i.ancillaryData.ancillaries, e) } , this.ClearAncillaryVariantFromUrlById = function(e) { var t = window.location.search.split("&") , i = "" , a = t.find((function(t) { return t.endsWith(e) } )); if (a) { var o = a.indexOf(e); i = a.slice(0, o - 3) + "quantity" } i && (t = t.map((function(e) { return e.includes(i) ? e.slice(0, e.indexOf("=")) + "=0" : e } ))); var r, s, l = window.location.pathname + t.join("&"), c = window.location.protocol + "//" + window.location.host + l; window.history.replaceState({ path: c }, "", c), r = l, (s = n("#loginform-returnurl")) && s.val(r) } , this.ClearAncillariesFromUrlAndReload = function() { var e = window.location.search.split("&").filter((function(e) { return !e.includes("ancillaries") } )) , t = window.location.protocol + "//" + window.location.host + window.location.pathname + e.join("&"); window.location.href = t } } angular.module("xenaApp").service("AncillaryService", e), e.$inject = ["$rootScope", "$http"], document.querySelector("#adm-ancillaries") && (window.ancillarieDataModule = function() { var e = JSON.parse(document.querySelector("#adm-ancillaries").value) , t = {}; if (e = e || [], document.querySelector("#adm-bookingId")) t = { ancillaries: e, bookingInformation: { bookingId: JSON.parse(document.querySelector("#adm-bookingId").value), hotelOperaId: JSON.parse(document.querySelector("#adm-hotelOperaId").value), refId: document.querySelector("#adm-refId").value, urlEncryptionEnabled: document.querySelector("#adm-urlEncryptionEnabled").value } }; else { var i = document.querySelector("#adm-deliveryTimeOptions") ? JSON.parse(document.querySelector("#adm-deliveryTimeOptions").value) : [] , n = document.querySelector("#adm-ancillariesFilterCategories") ? JSON.parse(document.querySelector("#adm-ancillariesFilterCategories").value) : ""; t = { ancillaries: e, message: "", deliveryTimes: { options: i || [], selectedDeliveryTime: JSON.parse(document.querySelector("#adm-selectedDeliveryTime").value) }, isAuthenticated: JSON.parse(document.querySelector("#adm-isAuthenticated").value), isPostBooking: JSON.parse(document.querySelector("#adm-isPostBooking").value), ancillariesFilterCategories: n } } return { ancillaryData: t } }()), document.querySelector("#hotel-reservation-data") && (window.hotelReservationDataObj = JSON.parse(document.querySelector("#hotel-reservation-data").value)), document.querySelector("#HRD-hotelbnr") && hotelReservationDataObj && (hotelReservationDataObj.hotelbnr = document.querySelector("#HRD-hotelbnr").value), document.querySelector("#HRD-hotelid") && hotelReservationDataObj && (hotelReservationDataObj.hotelid = document.querySelector("#HRD-hotelid").value), window.sweetAlertJson = document.querySelector("#sweetAlertLbls") ? JSON.parse(document.querySelector("#sweetAlertLbls").value) : "" }() }, 84887: function() { !function() { "use strict"; function e(e, t, i) { this.spinner = '
', this.priceObject = { totalPriceHtmlString: this.spinner, firstRoomPriceHtmlString: this.spinner, totalPoints: i.getTotalSelectedPoints, totalCash: i.getTotalSelectedCash }, this.getTotalPrice = function(e, i) { var n = "/ajax/bookings/" + e + "/totalprice" , a = { Id: 0, LastName: i }; return t.post(n, a) } , this.getTotEnterDetailsPrice = function(e) { var i = "/ajax/enterdetails/totalprice/" + e; return t.get(i) } } angular.module("xenaApp").service("BookingPriceService", e), e.$inject = ["$rootScope", "$http", "AncillaryService"] }() }, 60530: function(e, t, i) { var n = i(19755) , a = i(19755); window.xenaApp.factory("calendarService", (function() { var e = {}; function t(e) { return 60 * e * 1e3 } return e.data = { maxFromDate: new Date, minToDate: new Date, maxToDate: new Date, today: new Date((new Date).getTime() + t((new Date).getTimezoneOffset())) }, e.init = function(i, n, a, o, r) { e.initCalendarLanguage(), e.addcalendarOpenCallback(); var s = t(new Date(a || e.data.today).getTimezoneOffset()) , l = t(new Date(o || e.data.today).getTimezoneOffset()); r && (i.fromDate = a ? new Date(new Date(a).getTime() + s) : e.data.today, i.toDate = o ? new Date(new Date(o).getTime() + l) : e.data.today), n.fromDate = i.fromDate, e.setDateRangeValues(new Date(i.fromDate)) } , e.getDateDayDifference = function(e, t) { var i = Math.abs(t.getTime() - e.getTime()); return Math.ceil(i / 864e5) } , e.setDateRangeValues = function(t) { e.data.maxFromDate = (new Date).addDays(395), e.furthestLimit = e.data.maxFromDate.addDays(1), e.data.minToDate = t.addDays(1), e.data.maxToDate = t.addDays(99), e.data.maxToDate > e.furthestLimit && (e.data.maxToDate = new Date(e.furthestLimit.getTime())) } , e.initCalendarLanguage = function() { n.fn.pickadate = n.fn.pickadate || { defaults: {} }; var e = n("html").attr("lang"); void 0 !== PICKADATE_TRANSLATIONS[e] && a.extend(a.fn.pickadate.defaults, PICKADATE_TRANSLATIONS[e]) } , e.addcalendarOpenCallback = function() { a.extend(a.fn.pickadate.defaults, { onOpen: function() { var e = n(this.$holder[0]); e.one("transitionend", (function() { e.focus() } )) } }) } , e.adjustDates = function(t, i, n) { var a; t !== i && (e.setDateRangeValues(new Date(t)), a = e.getDateDayDifference(i, n.toDate), n.toDate = t.addDays(a), n.toDate < e.data.minToDate && (n.toDate = new Date(e.data.minToDate.getTime())), n.toDate > e.data.maxToDate && (n.toDate = new Date(e.data.maxToDate.getTime())), n.fromDate = t) } , e } )) }, 6430: function() { window.xenaApp.factory("creditCardService", (function() { var e = { data: { creditCardIsInRequiredContext: !0 } }; return e } )) }, 46934: function() { !function() { "use strict"; function e(e, t) { this.resetCharitytObserverCallbacks = [], this.chosenCharity = { id: null }, this.userData = { points: 0 }, this.donationsData = { donationWasSuccess: !1 }, this.registerResetCharityObserver = function(e) { this.resetCharitytObserverCallbacks.push(e) } , this.notifyResetCharityObservers = function() { angular.forEach(this.resetCharitytObserverCallbacks, (function(e) { e() } )) } , this.getAvailablePoints = function() { return t.get("/ajax/getPoints/") } } angular.module("xenaApp").service("DonationsService", e), e.$inject = ["$rootScope", "$http"] }() }, 53129: function() { window.xenaApp.factory("uniquenessService", (function() { var e = {} , t = {}; return e.isUnique = function(e, i, n) { return function(e, i) { t[i] = t[i] || [], -1 === t[i].indexOf(e) && t[i].push(e) }(e, i), !t[i].some((function(t) { return t !== e && "" !== t.$eval(i) && t.$eval(i) === n } )) } , e } )) }, 20419: function() { "use strict"; angular.module("xenaApp").service("UserService", ["$rootScope", "$http", function() { this.UserData = { userIsAuthenticated: !1 }, this.setUserData = function(e) { this.UserData = e } } ]) }, 17970: function(e, t, i) { "use strict"; i.r(t), i.d(t, { init: function() { return r }, toggle: function() { return s }, show: function() { return l }, hide: function() { return c } }); var n = i(19755) , a = !1 , o = !1 , r = function() { n("#loader".length < 1) && n("body").append('\n \n '), n(document).on("keyup", (function(e) { 27 === e.keyCode && c() } )), o = !0 } , s = function(e) { o || r(), (a = !a) ? l() : c(), "function" == typeof e && (-1 != navigator.userAgent.indexOf("Safari") && -1 == navigator.userAgent.indexOf("Chrome") ? setTimeout((function() { e() } ), 500) : e()) } , l = function() { a = !0, n("#loader").show() } , c = function() { a = !1, n("#loader").hide() } }, 93748: function(e, t, i) { "use strict"; i.r(t), i.d(t, { init: function() { return p }, initLoginPopup: function() { return C }, onClickFunction: function() { return m } }); var n, a, o, r = i(15898), s = i(98780), l = i(19755), c = "#js-login-modal", d = "js-login"; l(window).on("load", (function() { var e = decodeURIComponent(window.location.href).split("?registration="); e[1] && ("" !== e[1] && "success" === e[1] || "success" === e[1]) && (0, s.fR)() } )); var u = function() { window.sessionStorage.removeItem("userHtmlForLoggedInOrLoggedOut"), window.sessionStorage.removeItem("loginTrackData"), window.localStorage.removeItem("loginTrackData"), window.localStorage.removeItem("userLoggedInId") } , p = function() { l('*[data-js="login-modal-open"]').off("click"), l('*[data-js="login-modal-open"]').on("click", m); var e = (o = l(c)).data("js-action"); if (e) switch (e) { case "activate-login": u(), window.location.search.indexOf("uppd=1") > -1 ? b() : h(); break; case "activate-verify-email": f(), u() } l('*[data-js="unlock-profile-modal-open"]').on("click", (function(e) { e.preventDefault(); var t = e.target , i = l("#js-mfa-modal").data("js-unlock-profile"); v(i, t) } )) } , m = function(e) { l(e.currentTarget).attr("data-js-trigger-promotion") && localStorage.setItem("data-js-trigger-promotion", !0), e.target.classList.contains("nav-secondary__item__link") ? (0, s.ay)("member-login-top") : e.target.classList.contains("member-banner-login-btn") && (0, s.ay)("member-login-banner"), e.preventDefault(), g(e), u(), l.ajax({ type: "POST", url: "/ajax/startpage/setsessionredirecturl" }) } , h = function() { var e = o.data(d); v(e) } , f = function() { setTimeout((function() { var e = o.data("js-verify-email"); v(e) } ), 1e3) } , g = function(e) { var t = e.target , i = l(c).data(d); v(i, t) } , v = function(e, t) { t = t || null; var i = ''; n = new r.Z({ width: 454, height: 657, content: i, contentBackground: !1, triggerObject: t, showLoadingSpinner: !0, fullscreenInSmallDown: !0, closeOnBackgroundClick: !1 }), window.addEventListener("message", y, !1) } , b = function() { var e = document.querySelector(".pwd-change-msg"); e.classList.remove("hidden"), a = new r.Z({ width: 400, height: 380, content: e, contentBackground: !1, showLoadingSpinner: !0, fullscreenInSmallDown: !0, closeOnBackBtn: !1, closeOnBackgroundClick: !1 }), l(".pwd-change-msg button.login-button").on("click", (function() { a.close(), h() } )), l(".pwd-change-msg .close").on("click", (function() { a.close() } )) } , y = function(e) { if (e.data && "function" == typeof e.data.split) switch (e.data.split(":")[0]) { case "setFrameHeight": var t = e.data.split(":")[1]; S(t); break; case "closeLoginModal": w(), l("body").removeClass("scrollable-body"); break; case "showLoginPage": _(); break; case "authenticating": l("body").addClass("scrollable-body"); var i = l("body").find(".modal.modal--fullscreen-in-small-down")[0]; l(i).addClass("scrollable"); break; case "error": var n = e.data.replace("error", "loginfailure"); n = (n = -1 != n.indexOf(". ") ? n.split(". ")[0] : n).replace(/\s/g, ""), (0, s.ay)("loginfail", { errorcode: n, loginaction: "login fail" }) } } , w = function(e) { window.removeEventListener("message", y, !1), n.close(), null !== localStorage.getItem("data-js-trigger-promotion") && localStorage.removeItem("data-js-trigger-promotion") } , S = function(e) { n.setHeight(e) } , _ = function() { var e = o.data(d); l("#login-iframe").attr("src", e) } , C = function(e) { g(e), u() } }, 15898: function(e, t, i) { "use strict"; i.d(t, { Z: function() { return a } }); var n = i(19755); function a(e) { var t, i, a, o; e = n.extend({ width: 500, height: 250, content: null, contentBackground: !0, contentBackgroundColor: "#FFF", overlay: !0, autoOpen: !0, triggerObject: null, closeOnBackBtn: !0, showLoadingSpinner: !1, closeOnBackgroundClick: !0, fullscreenInSmallDown: !1, customClass: "" }, e); function r(e) { o.html(e) } function s() { var i, a, r; e.closeOnBackBtn && history.pushState(null, null, "#modal"), e.parentElement ? parentElement.append(t) : n("body").append(t), i = o.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]"), a = i.first(), r = i.last(), a.focus(), r.on("keydown", (function(e) { 9 !== e.which || e.shiftKey || (e.preventDefault(), a.focus()) } )), a.on("keydown", (function(e) { 9 === e.which && e.shiftKey && (e.preventDefault(), r.focus()) } )), t.fadeIn("fast", l) } function l() { n(document).on("keyup.modal", c), e.closeOnBackBtn && Modernizr.history && n(window).one("popstate.modal", d), n("body").addClass("modal-is-open"), o.focus() } function c(e) { 27 === e.keyCode && (e.preventDefault(), e.stopPropagation(), u()) } function d() { h(), p() } function u() { if (h(), e.closeOnBackBtn && Modernizr.history) { "" === window.location.search || window.location.search; history.back() } p() } function p() { t.fadeOut("fast", m) } function m() { n("body").removeClass("modal-is-open"), t.trigger("modalIsClosed"), t.remove(), null !== e.triggerObject && e.triggerObject.focus() } function h() { i.off("click", u), n(document).off("keyup.modal", c) } t = n('