(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{123:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),l=n(12),c=n(1);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t767&&t.css({"backdrop-filter":"blur(20px)"}))})),O(E(r),"toggleLoginComponent",(function(e){if(window.matchMedia("(max-width: 767px)").matches){var t=a()(".cmp-login-cruise-detail");t&&(e?t.css({display:"none"}):t.css({display:"block"}))}})),O(E(r),"getPricingData",(function(){var e=m.a.getItem(c.Gg),t=Object(v.V)(e).lowestPrice,n=void 0===t?{}:t,r=n.basePrice,o=void 0===r?0:r,i=n.tax,a=void 0===i?0:i,l=n.price;return{cruiseFare:o,taxesAndFees:a,totalFare:void 0===l?0:l}})),r.state={allTaxesAndFeesIncludedData:{},modelData:{},isModalOpen:!1},r.toggleAllTaxesAndFeesIncludedModal=r.toggleAllTaxesAndFeesIncludedModal.bind(E(r)),r.closeAllTaxesAndFeesIncludedModal=r.closeAllTaxesAndFeesIncludedModal.bind(E(r)),r.handleFocus=r.handleFocus.bind(E(r)),r.handleKeyDown=r.handleKeyDown.bind(E(r)),r.toggleLoginComponent=r.toggleLoginComponent.bind(E(r)),r.handleHeaderBackdrop=r.handleHeaderBackdrop.bind(E(r)),r}return function(e,t,n){t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){var e=this;Object(l.a)("#all-taxes-and-fees-included-tool-tip-".concat(this.props.uniqueKey||"default")).then((function(){var t,n,r=document.querySelectorAll("#all-taxes-and-fees-included-tool-tip-".concat(e.props.uniqueKey||"default"));null===(t=a()(r))||void 0===t||t.on("click",(function(t){return e.toggleAllTaxesAndFeesIncludedModal()})),null===(n=a()(r))||void 0===n||n.on("keydown",e.handleKeyDown)})),document.addEventListener("keydown",this.closeAllTaxesAndFeesIncludedModal),this.fetchAllTaxesAndFeesIncludedData(),this.fetchModalData()}},{key:"componentWillUnmount",value:function(){var e=document.querySelectorAll("#all-taxes-and-fees-included-tool-tip-".concat(this.props.uniqueKey||"default"));a()(e).off("keydown",this.handleKeyDown),document.removeEventListener("keydown",this.closeAllTaxesAndFeesIncludedModal)}},{key:"closeAllTaxesAndFeesIncludedModal",value:function(e){(null==e?void 0:e.keyCode)===c.Aj&&(this.setState({isModalOpen:!1}),this.toggleLoginComponent(!1),this.handleHeaderBackdrop(!1),this.handleFocus())}},{key:"toggleAllTaxesAndFeesIncludedModal",value:function(){this.toggleLoginComponent(!this.state.isModalOpen),this.handleHeaderBackdrop(!this.state.isModalOpen),this.state.isModalOpen&&this.handleFocus(),this.setState({isModalOpen:!this.state.isModalOpen})}},{key:"render",value:function(){return o.a.createElement("div",{className:"all-taxes-and-fees-included-container"},o.a.createElement(d,b({uniqueKey:this.props.uniqueKey||"default"},this.state.allTaxesAndFeesIncludedData)),this.state.isModalOpen&&o.a.createElement(f.a,{isModalOpen:this.state.isModalOpen,modelData:this.state.modelData,handleModal:this.toggleAllTaxesAndFeesIncludedModal,pricingData:this.getPricingData(),isRcfe:!1}))}}]),n}(r.Component);t.a=C;Object(l.a)(".all-taxes-and-fees-included").then((function(){Object(h.a)(C,".all-taxes-and-fees-included")}))},125:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(25),a=n.n(i),l=n(85),c=n(1),u=n(3),s=n(15),d=["isModalOpen","data","width"];function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,d),f=null!==(e=null===(n=window)||void 0===n||null===(r=n.configs)||void 0===r?void 0:r.brand)&&void 0!==e?e:c.Zi;return a?o.a.createElement(o.a.Suspense,{fallback:null},o.a.createElement(S,v({isOpen:a,overlayStyle:{height:u<1025?"100%":"100vh"},containerStyle:{maxHeight:"90%",height:"auto",width:u<=600?"335px":"556px",borderRadius:f===c.Zi?"14px":"0px",overflowY:"auto"},closeButtonStyle:{border:"0px",top:"5px",right:"5px",height:"44px",width:"44px"},data:l,onLogin:t.onLoginSuccess,onClose:t.closeLoginModal},s))):null})),w(g(t),"closeLoginModal",(function(){t.setState({isModalOpen:!1},(function(){t.loginButtonRef.current&&t.loginButtonRef.current.focus()}))})),w(g(t),"openLoginModal",(function(){t.setState({isModalOpen:!0})})),w(g(t),"onKeyDown",(function(e){e.stopPropagation(),e.keyCode!==c.yj&&e.keyCode!==c.Bk||t.openLoginModal()})),t.loginRef=o.a.createRef(),t.loginButtonRef=o.a.createRef(),document.querySelectorAll(".cmp-login-modal-component").forEach((function(e){var t,n;a.a.render(o.a.createElement(o.a.Fragment,null,o.a.createElement(l.OwnIDInit,{config:{appId:null===(t=window)||void 0===t||null===(n=t.configs)||void 0===n?void 0:n.ownIdIdentifier}}),o.a.createElement(f,null)),e)})),t.state={accountUrl:"",data:{},fccUrl:"",isModalOpen:!1,loginUrl:"",validatorUrl:"",width:0,isOwnIdEnabled:!1,ownIdIdentifier:""},t}return t=f,(n=[{key:"componentDidMount",value:function(){var e=this;this.updateWindowDimensions(),this.fetchLoginData();var t=this.loginButtonRef.current;t&&(this.observer=new MutationObserver(this.handleMutation),this.observer.observe(t,{attributes:!0})),window.addEventListener("resize",this.updateWindowDimensions),this.ownIdObserver=new MutationObserver((function(){var t,n,r,o;(null===(t=window)||void 0===t||null===(n=t.ownid)||void 0===n?void 0:n.length)>0&&null!==(r=window)&&void 0!==r&&null!==(o=r.configs)&&void 0!==o&&o.isOwnIdEnabled&&(Object(u.Nb)(),e.ownIdObserver.disconnect())})),this.ownIdObserver.observe(document.documentElement,{childList:!0,subtree:!0})}},{key:"componentDidUpdate",value:function(){var e=this.loginButtonRef.current;e&&this.observer&&(this.observer.disconnect(),this.observer.observe(e,{attributes:!0}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateWindowDimensions),this.observer&&this.observer.disconnect(),this.ownIdObserver&&this.ownIdObserver.disconnect()}},{key:"render",value:function(){var e,t,n;return o.a.createElement("div",{className:"login-modal-component-container",ref:this.loginRef},o.a.createElement("div",{id:"loginModalComponentButton",ref:this.loginButtonRef,"aria-label":"Login opens a dialog",role:"button",className:"cmp-global-header__menu-link login-icon",onClick:this.openLoginModal,tabIndex:"0",onKeyDown:this.onKeyDown},null!==(e=null===(t=this.state.data)||void 0===t||null===(n=t.loginButton)||void 0===n?void 0:n.label)&&void 0!==e?e:"Log in"),this.renderLoginModal())}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.a.Component);t.a=L},169:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(1),o=n(3),i=n(16),a=n(12);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),l=new I(r||[]);return o(a,"_invoke",{value:x(e,n,l)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",h="executing",p="completed",b={};function g(){}function y(){}function w(){}var _={};d(_,a,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(A([])));L&&L!==n&&r.call(L,a)&&(_=L);var E=w.prototype=g.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,c){var u=v(e[o],e,i);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==l(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,n,r){var o=m;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=C(l,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var u=v(t,n,r);if("normal"===u.type){if(o=r.done?p:"suspendedYield",u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=p,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var i=v(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function d(e,t){for(var n=0;n0&&(window.matchMedia("(max-width: 1024px)").matches?(D[1].style.display="none",R&&(R.style.marginBottom="1.5rem")):D[0].style.display="none","undefined"!=typeof sessionStorage&&null!==sessionStorage.getItem(r.Fi)&&(D[0].style.display="none",D[1].style.display="none")),this.nldeProcessing(),P.forEach((function(e){"undefined"!=typeof sessionStorage&&null!==sessionStorage.getItem(r.Fi)?(null!=e&&e.classList.contains("cmp-nav-item-post-login")&&(e.style.display="block"),null!=e&&e.classList.contains("cmp-nav-item-before-login-hide")&&(e.style.display="none")):null!=e&&e.classList.contains("cmp-nav-item-post-login")&&(e.style.display="none"),e.getAttribute("id")&&g.upDateNavigationUrl(e),e.addEventListener("click",(function(e){var t,n,o,i=null==e||null===(t=e.currentTarget)||void 0===t?void 0:t.getAttribute("id");i&&null!==(n=window.configs)&&void 0!==n&&n.redirectUrl[i]&&sessionStorage.setItem(r.uf,JSON.stringify(null===(o=window.configs)||void 0===o?void 0:o.redirectUrl[i]))}))})),S&&S.addEventListener("click",(function(e){e.preventDefault(),function(e,t){var n,r,o,i,a,l;"true"==(null==e?void 0:e.getAttribute("aria-expanded"))?(null===(n=t.classList)||void 0===n||n.remove("active"),null==e||e.setAttribute("aria-expanded","false"),null==E||null===(r=E.classList)||void 0===r||r.remove("cmp-global-header__nav--active"),document.body.classList.remove("no-scroll"),null==E||null===(o=E.classList)||void 0===o||o.add("cmp-global-header__nav--collapse")):(null==e||e.setAttribute("aria-expanded","true"),null==E||null===(i=E.classList)||void 0===i||i.add("cmp-global-header__nav--active"),document.body.classList.add("no-scroll"),null==E||null===(a=E.classList)||void 0===a||a.remove("cmp-global-header__nav--collapse"),null===(l=t.classList)||void 0===l||l.add("active"))}(S,L),q(y)})),E&&E.addEventListener("transitionend",function(e){var t,n,r,o,i;e.currentTarget.classList.contains("cmp-global-header__nav--active")?null!=e&&null!==(t=e.currentTarget)&&void 0!==t&&null!==(n=t.querySelector(".cmp-global-header__nav-drawer.active"))&&void 0!==n&&null!==(r=n.classList)&&void 0!==r&&r.contains("active")?null==e||null===(o=e.currentTarget)||void 0===o||null===(i=o.querySelector(".cmp-global-header__nav-drawer.active"))||void 0===i||i.querySelector(".cmp-global-header__nav-back").focus():k[0].focus():S.focus()}.bind(this)),x&&x.addEventListener("click",function(e){var t,n,r,o;e.preventDefault();var i=null===(t=this.el)||void 0===t?void 0:t.querySelector(".cmp-global-header__dropdown-chat-overlay"),a=null===(n=this.el)||void 0===n?void 0:n.querySelector(".cmp-global-header__chat-icon");null==a||a.setAttribute("aria-expanded","false"),null==a||null===(r=a.classList)||void 0===r||r.remove("active"),null==i||null===(o=i.classList)||void 0===o||o.remove("active"),document.querySelector(".cmp-global-header__nav").style.overflow="scroll",null==i||i.setAttribute("aria-hidden","true"),a.focus()}.bind(this)),y&&Array.from(y).forEach((function(e){null==e||e.addEventListener("click",(function(t){t.preventDefault(),M(e,y)})),null==e||e.addEventListener("keydown",(function(t){t.keyCode===r.Bk&&(t.preventDefault(),M(e,y))}))})),k&&Array.from(k).forEach((function(e){null==e||e.addEventListener("click",(function(e){var t,n,r;e.preventDefault(),null==S||S.setAttribute("aria-expanded","false"),null==E||null===(t=E.classList)||void 0===t||t.remove("cmp-global-header__nav--active"),document.body.classList.remove("no-scroll"),null==E||null===(n=E.classList)||void 0===n||n.add("cmp-global-header__nav--collapse"),null===(r=L.classList)||void 0===r||r.remove("active"),q(y)}))})),_&&Array.from(_).forEach((function(e){null==e||e.addEventListener("click",(function(e){e.preventDefault(),q(y)}))})),A&&A.addEventListener("click",function(e){var t,n,r,o;e.preventDefault(),null==A||A.setAttribute("aria-expanded","true"),null==A||null===(t=A.classList)||void 0===t||t.add("active");var i=null===(n=this.el)||void 0===n?void 0:n.querySelector(".cmp-global-header__dropdown-chat-overlay");null==i||null===(r=i.classList)||void 0===r||r.add("active"),this.el.querySelector(".cmp-global-header__nav").style.overflow="hidden",null==i||i.setAttribute("aria-hidden","false"),(null===(o=this.el)||void 0===o?void 0:o.querySelector(".cmp-global-header__dropdown-chat-overlay .popup-close-icon")).focus()}.bind(this)),document.onkeydown=function(e){if((e=e||window.event).keyCode==r.Aj||e.key===r.Aj){e.preventDefault();var t=null==this?void 0:this.querySelector(".cmp-global-header__dropdown.active"),n=null==this?void 0:this.querySelector(".cmp-global-header__nav-drawer.active");q(y),F(O),n&&(null==n||n.previousElementSibling.focus()),t&&(null==t||t.previousElementSibling.focus())}},O&&Array.from(O).forEach((function(e){null==e||e.addEventListener("click",(function(t){T(e,O)})),null==e||e.addEventListener("keydown",(function(t){t.keyCode===r.Bk&&T(e,O)}))})),N){var U,B,Y,J=null===(U=Object(o.M)())||void 0===U?void 0:U.toLowerCase(),G=null===(B=window)||void 0===B||null===(Y=B.configs)||void 0===Y?void 0:Y.enableCXChat;N.forEach((function(e){e.classList.contains("live-chat")&&"true"==G&&"en"==J&&e.addEventListener("click",(function(e){e.preventDefault(),brandembassy("openChatWindow")}))}))}j&&j.forEach((function(e){e.addEventListener("click",(function(t){j.forEach((function(e){e.classList.remove("selected"),e.setAttribute("aria-label",e.textContent+" "+(null==w?void 0:w.notSelectedLabel))})),this.classList.add("selected"),this.setAttribute("aria-label",e.textContent+" "+(null==w?void 0:w.selectedLabel)),this.closest(".language-dropdown").querySelector(".cmp-global-header__selected-value").setAttribute("aria-label",e.textContent+" "+(null==w?void 0:w.languageSelected)),this.closest(".cmp-global-header__navigation-items-top-row").querySelector(".cmp-global-header__selected-value").textContent="".concat(this.getAttribute("data-value"))})),e.classList.contains("selected")?(e.setAttribute("aria-label",e.textContent+" "+(null==w?void 0:w.selectedLabel)),e.closest(".language-dropdown").querySelector(".cmp-global-header__selected-value").setAttribute("aria-label",e.textContent+" "+(null==w?void 0:w.languageSelected))):e.setAttribute("aria-label",e.textContent+" "+(null==w?void 0:w.notSelectedLabel))})),document.addEventListener("keyup",(function(e){var t,n,o,i;window.innerWidth>=r.fd&&e.key===r.Fk&&("cmp-global-header__navlink"==(null===(t=document)||void 0===t||null===(n=t.activeElement)||void 0===n?void 0:n.getAttribute("class"))&&q(y),null!==(o=document)&&void 0!==o&&null!==(i=o.activeElement)&&void 0!==i&&i.classList.contains("cmp-global-header__menu-link")&&F(O))})),document.addEventListener("keydown",(function(e){if(e.key===r.Fk){var t=C.querySelectorAll("a[href], button, input, select, textarea"),n=t[0],o=t[t.length-1];e.shiftKey||document.activeElement!==o?e.shiftKey&&document.activeElement===n&&(e.preventDefault(),o.focus()):(e.preventDefault(),n.focus())}if(e.key===r.Ok||e.key===r.tj){var i=null==I?void 0:I.querySelectorAll("a[href], button, input, select, textarea"),a=Array.from(i).findIndex((function(e){return e===document.activeElement}));i[e.key===r.Ok?a>0?a-1:i.length-1:a=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function g(e,t){for(var n=0;n0&&null!==(o=window)&&void 0!==o&&null!==(i=o.configs)&&void 0!==i&&i.isOwnIdEnabled&&(Object(d.Nb)(),n.ownIdLogin(t,_),n.ownIdObserver.disconnect())})),this.ownIdObserver.observe(document.documentElement,{childList:!0,subtree:!0})}var t,n,r;return t=e,(n=[{key:"ownIdLogin",value:function(e,t){var n,r,i=this,a=t.attr("data-valiator-api-url"),l=t.attr("data-me-api-url");null!==(n=window)&&void 0!==n&&null!==(r=n.configs)&&void 0!==r&&r.isOwnIdEnabled&&(ownid("login",{loginIdField:document.getElementById("form-text-email"),passwordField:document.getElementById("form-text-password"),widgetPosition:"start",onError:function(e){var n;t.find(".cmp-form__api-error").show(),t.find(".cmp-form__api-error").text(e),Object(s.f)(null==t||null===(n=t.find(".cmp-form__api-error"))||void 0===n?void 0:n.text())},onLogin:function(e){Object(m.a)(e,(function(){try{i.loginCruiseDetail()}catch(e){console.error("Error in loginCruiseDetail:",e)}}),(function(e){console.error(e)}),l,a,null)},onLoginIdError:function(){return t.find("#form-text-email").valid(),t.find("#form-text-email").focus(),{hideTooltip:!0}}}),o()(e).find(".password--label").css("margin-left","89px"),o()(e).find(".cmp-form__container > .password").children(".error").css("margin-left","89px"))}},{key:"initializeLoginCruiseForm",value:function(){var e,t=o()(this.el).attr("data-currentPage")?o()(this.el).attr("data-currentPage")+"-LoginLink":"";o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").attr("data-automation-id",t),o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").attr("tabindex",0),o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").attr("aria-label","log in"),o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__login").attr("role","link"),o()(this.el).find(".cmp-login-cruise-detail-v2__link__logout").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__logout").attr("tabindex",0),o()(this.el).find(".cmp-login-cruise-detail-v2__link__logout").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__logout").attr("aria-label","log out"),o()(this.el).find(".cmp-login-cruise-detail-v2__link__logout").length&&o()(this.el).find(".cmp-login-cruise-detail-v2__link__logout").attr("role","link"),(null===(e=JSON.parse(sessionStorage.getItem(l.Fi)))||void 0===e?void 0:e.firstName)&&(this.isUserLogin=!0,this.loginAndLogout())}},{key:"loginCruiseDetail",value:function(){var e;this.isExpandLogin=!0,this.expandAndCollapseLoginForm(),this.isUserLogin=!0;var t=window.location.href,n=window.configs.country,r=null===(e=v.a.get(l.Ne))||void 0===e?void 0:e[0];if(sessionStorage.removeItem(l.h),n==r)window.location.reload();else{var o=Object(d.rc)(t);window.location.href=o}}},{key:"initializeApiCalls",value:function(e,t,n,r,o,i){var a=this;u.a.post(e,r).then((function(e){200!==e.status||i.email?200===e.status&&i.email&&a.handleApiResponse(n,i,o):u.a.post(t,{}).then((function(e){var t,r;200===e.status&&(i.email=null===(t=e.data)||void 0===t||null===(r=t.profile)||void 0===r?void 0:r.webUserInfo.username,a.handleApiResponse(n,i,o))}))})).catch((function(e){var t;o.find(".cmp-form__api-error").show(),o.find(".cmp-form__api-error").text(Object(d.J)(e)),Object(s.f)(null==o||null===(t=o.find(".cmp-form__api-error"))||void 0===t?void 0:t.text()),o.find(".cmp-form__error-summary-wrapper").hide()}))}},{key:"handleApiResponse",value:function(e,t,n){var r=this;u.a.post(e,t).then(function(){var e,t=(e=p().mark((function e(t){var n,o,i,a,c,u,s,v,m,h,b,g,y,w;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==t.status){e.next=21;break}return sessionStorage.setItem(l.Fi,JSON.stringify(t.data.data.mariner)),Object(d.Ub)(null===(n=t.data)||void 0===n||null===(o=n.data)||void 0===o||null===(i=o.mariner)||void 0===i||null===(a=i.address)||void 0===a?void 0:a.country),Object(d.sc)(),e.next=6,Object(f.f)();case 6:if(Object(f.g)(null==t||null===(c=t.data)||void 0===c||null===(u=c.data)||void 0===u||null===(s=u.mariner)||void 0===s?void 0:s.favorites),Object(d.a)(null===(v=t.data.data.mariner.address)||void 0===v?void 0:v.country),null===(m=t.data)||void 0===m||m.data.mariner.marinerId,null===(h=window)||void 0===h||null===(b=h.configs)||void 0===b||!b.isOwnIdEnabled||null===(g=window)||void 0===g||null===(y=g.configs)||void 0===y||!y.ownIdIdentifier){e.next=20;break}return e.prev=10,e.next=13,Object(d.lb)();case 13:w=e.sent,console.log("Passkey enrollment successful:",w),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(10),console.error("Failed to enroll passkey:",e.t0);case 20:r.loginCruiseDetail();case 21:case"end":return e.stop()}}),e,null,[[10,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,l,"next",e)}function l(e){b(i,r,o,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}()).catch((function(){var e;n.find(".cmp-form__api-error").show(),Object(s.f)(null==n||null===(e=n.find(".cmp-form__api-error"))||void 0===e?void 0:e.text()),n.find(".cmp-form__error-summary-wrapper").hide()}))}},{key:"loginAndLogout",value:function(){if(this.isUserLogin){var e=sessionStorage.getItem(l.Fi);if(e){var t=JSON.parse(e);o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container__login").hide(),o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container__logout").show(),o()(this.el).find("#login-cruise-detail-user-name").text(t.firstName);var n=o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container")[0].offsetHeight;o()(this.el).find(".close__btn--login").css("top",n/2+"px"),o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container").attr("tabindex",0),o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container__logout").focus(),o()(this.el).find(".cmp-login-cruise-detail-v2__login-container").attr("tabindex",-1)}}else{o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container__logout").hide(),o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container__login").show();var r=o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container")[0].offsetHeight;o()(this.el).find(".close__btn--login").css("top",r/2+"px"),o()(this.el).find(".cmp-login-cruise-detail-v2__alert-container").attr("tabindex",-1),o()(this.el).find(".cmp-login-cruise-detail-v2__login-container").attr("tabindex",0),sessionStorage.removeItem(l.Fi),Object(a.d)()}}}])&&g(t.prototype,n),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();o.a.validator.addMethod("inValidBooking",(function(e,t){return l.vj.test(e)}),o.a.validator.messages.inValidInput)},171:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(0),o=n.n(r),i=n(7),a=n.n(i),l=n(51),c=n(1),u=n(6),s=n(26);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),l=new I(r||[]);return o(a,"_invoke",{value:x(e,n,l)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var m="suspendedStart",h="executing",p="completed",b={};function g(){}function y(){}function w(){}var _={};u(_,a,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(A([])));L&&L!==n&&r.call(L,a)&&(_=L);var E=w.prototype=g.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,l){var c=v(e[o],e,i);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==d(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,n,r){var o=m;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=C(l,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var u=v(t,n,r);if("normal"===u.type){if(o=r.done?p:"suspendedYield",u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=p,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var i=v(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}function v(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function h(e,t){for(var n=0;n'),e.insertAdjacentHTML("beforeend",'
')),document.querySelector("body").addEventListener("focus",(function(e){e.preventDefault(),"last-dummy-element"===document.activeElement.classList.value&&n.focus(),"first-dummy-element"===document.activeElement.classList.value&&o.focus()}),!0)}})),_(y(t),"updateDimensions",(function(){var e,n,r,o;window.matchMedia("(max-width: ".concat(c.fd,"px)")).matches?(t.setState({isDesktopViewPort:!1}),(null===(e=t.findYourCruiseRef)||void 0===e||null===(n=e.current)||void 0===n?void 0:n.querySelector(".find-your-cruise__overlay > .first-dummy-element"))||t.modalTabFocus(null===(r=t.findYourCruiseRef)||void 0===r||null===(o=r.current)||void 0===o?void 0:o.querySelector(".find-your-cruise__overlay"))):t.setState({isDesktopViewPort:!0})})),_(y(t),"openFindCruiseOverlay",(function(){t.setState({showMobileOverlay:!t.state.showMobileOverlay}),setTimeout((function(){var e,n,r;null===(e=t.findYourCruiseRef)||void 0===e||null===(n=e.current)||void 0===n||null===(r=n.querySelector(".close-btn"))||void 0===r||r.focus()}),0)})),_(y(t),"closeFindCruiseOverlay",(function(){var e,n,r;t.setState({showMobileOverlay:!1,selectedDropDown:void 0}),null===(e=t.findYourCruiseRef)||void 0===e||null===(n=e.current)||void 0===n||null===(r=n.querySelector(".find-your-cruise__filter__btn"))||void 0===r||r.focus()})),t.state={filterConfigList:[],filterContent:[],selectedDropDown:void 0,searchResults:void 0,selectedSearchResults:{},totalResults:"",labelList:{},searchURL:"",isDesktopViewPort:!0,showMobileOverlay:!1,searchRedirectURL:"",selectedYearForMobile:"",currentPageName:"",cruiseUnAvailableMsg:{},calenderList:[],showLoader:!1},t.findYourCruiseRef=o.a.createRef(),t}return function(e,t,n){t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(w,[{key:"componentDidMount",value:(v=m(f().mark((function e(){var t,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.matchMedia("(max-width: ".concat(c.fd,"px)")).matches){e.next=3;break}return e.next=3,this.setState({isDesktopViewPort:!1});case 3:return e.next=5,this.getDropdownFilterList();case 5:window.addEventListener("resize",this.updateDimensions),this.attachEscapeHandler(),this.modalTabFocus(null===(t=this.findYourCruiseRef)||void 0===t||null===(n=t.current)||void 0===n?void 0:n.querySelector(".find-your-cruise__overlay")),document.body.addEventListener("click",this.clickOutside,!0);case 9:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"checkSelectedValue",value:function(e,t){var n,r;return-1!==(null===(n=this.state.selectedSearchResults)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.indexOf(t))}},{key:"clearSelection",value:(d=m(f().mark((function e(){var t,n,r=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L={},t={},this.state.filterConfigList.forEach((function(e){t[e.type]=[]})),e.next=5,this.setState({selectedSearchResults:t});case 5:return n={},this.state.filterConfigList.forEach((function(e){var t=r.updateSelectedValue(null==e?void 0:e.type,r.state.searchResults[null==e?void 0:e.type]);n[e.type]=t})),e.next=9,this.setState({searchResults:n});case 9:return history.pushState({},"",location.pathname),e.next=12,this.getFilterSearchResult();case 12:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"updateSelectedObjectByParam",value:function(e){var t=this,n={};return e.forEach((function(e){n[e.type]=[]})),decodeURI(window.location.href.split("?")[1]).split("&").forEach((function(e){var r;if(e.includes(c.Ej.destinations))null===(r=e.match(/\(([^()]+)\)/g))||void 0===r||r.forEach((function(e){var t,r,o,i=null===(t=e.replace(/OR/g,","))||void 0===t||null===(r=t.replace(/[(\)]/g,""))||void 0===r||null===(o=r.replaceAll(" ",""))||void 0===o?void 0:o.split(",");n.destinations=i}));else if(e.includes(c.Ej.departDate)){var o;null===(o=e.match(/\[([^()]+)\]/g))||void 0===o||o.forEach((function(e){var r=decodeURIComponent(e).replace("+1MONTH-1DAY","").replace("[","").replace("]","").split(" TO "),o=t.getDepartDate(r[0],r[1]);n.departDate=o}))}else if(e.includes(c.Ej.duration)){var i,a=[];null===(i=e.split(":")[1].split(","))||void 0===i||i.forEach((function(e){a.push(e.replace(/\s/g,"").replace("[","").replace("]",""))})),n.duration=a}else if(e.includes(c.Ej.departure)){var l;null===(l=e.match(/\(([^()]+)\)/g))||void 0===l||l.forEach((function(e){var t,r,o,i=null===(t=e.replace(/OR/g,","))||void 0===t||null===(r=t.replace(/[(\)]/g,""))||void 0===r||null===(o=r.replaceAll(" ",""))||void 0===o?void 0:o.split(",");n.departure=i}))}})),n}},{key:"getDepartDate",value:function(e,t){var n=[e];if(e!=t){var r,o,i=null===(r=this.state.calenderList)||void 0===r?void 0:r.indexOf(e),a=null===(o=this.state.calenderList)||void 0===o?void 0:o.indexOf(t);n=this.state.calenderList.splice(i,a-i+1)}return n}},{key:"getDropdownFilterList",value:(s=m(f().mark((function e(){var t,n,r,o,i,a,l,c,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(t=this.findYourCruiseRef.current)||void 0===t?void 0:t.closest(".cmp-find-your-cruise"),r=null==n?void 0:n.getAttribute("data-filter-list"),o=null==n?void 0:n.getAttribute("data-filter-label-list"),i=null==n?void 0:n.getAttribute("data-api-url"),a=null==n?void 0:n.getAttribute("data-searchRedirectUrl"),l=null==n?void 0:n.getAttribute("data-page-name"),c=r&&JSON.parse(r),u=this.updateSelectedObjectByParam(c),e.next=10,this.setState({filterConfigList:c,labelList:o&&JSON.parse(o),searchURL:i,selectedSearchResults:u,searchRedirectURL:a,currentPageName:l});case 10:return e.next=12,this.getFilterSearchResult();case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getFilterSearchResult",value:(i=m(f().mark((function e(){var t,n=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(l.a)(this.findYourCruiseRef),this.setState({showLoader:!0}),e.next=4,Object(l.b)(t,this.state,this.findYourCruiseRef).then(function(){var e=m(f().mark((function e(t){var r,o,i,a,l,s,d,v;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l={},t.filterContent.forEach((function(e){var t=n.updateSelectedValue(null==e?void 0:e.type,null==e?void 0:e.arr);l[e.type]=t})),s={},n.state.filterConfigList.forEach((function(e){s[e.type]=l[e.type]})),d=[],v=""==n.state.selectedYearForMobile?null===(r=l[c.Xc])||void 0===r||null===(o=r[0])||void 0===o||null===(i=o[0])||void 0===i?void 0:i.year:n.state.selectedYearForMobile,null===(a=l[c.Xc])||void 0===a||a.forEach((function(e){e.forEach((function(e){d.push(e.code)}))})),L&&Object.keys(L).length>0&&Object(u.h)(L,null==t?void 0:t.totalResults),e.next=10,n.setState({filterContent:t.filterContent,totalResults:t.totalResults,searchResults:s,selectedYearForMobile:v,calenderList:d,showLoader:!1});case 10:return e.abrupt("return");case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){n.setState({showLoader:!1})}));case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"updateSelectedValue",value:function(e,t){var n=this;return null==t||t.map((function(t){var r,o,i,a;switch(e){case c.Xc:return t.map((function(t){var r,o;return t.selected=-1!==(null===(r=n.state.selectedSearchResults)||void 0===r||null===(o=r[e])||void 0===o?void 0:o.indexOf(t.code))}));case c.ed:return t.selected=-1!==(null===(r=n.state.selectedSearchResults)||void 0===r||null===(o=r[e])||void 0===o?void 0:o.indexOf(t.label));default:return t.selected=-1!==(null===(i=n.state.selectedSearchResults)||void 0===i||null===(a=i[e])||void 0===a?void 0:a.indexOf(t.code))}})),t}},{key:"updateURLQuaryParam",value:function(){var e=this,t=[];this.state.filterConfigList.forEach((function(n){var r=e.state.selectedSearchResults[n.type];if((null==r?void 0:r.length)>0){var o="";switch(n.type){case c.Xc:var i=r[r.length-1];o="["+encodeURIComponent(r[0]+" TO "+i+"+1MONTH-1DAY")+"]";break;case c.ed:var a=[];r.forEach((function(e){var t=e.split("-");a.push(encodeURIComponent(t[0]+" - "+t[1]))})),o="["+a.join(",")+"]";break;default:o="("+encodeURIComponent(r.join(" OR "))+")"}t.push(c.Ej[n.type]+o)}}));var n=t.length>0?"?"+t.join("&"):location.pathname;history.pushState({},"",n)}},{key:"onSelectDropDown",value:function(e){this.setState({selectedDropDown:e==this.state.selectedDropDown?void 0:e})}},{key:"redirectToResultPage",value:function(){var e=this.state.searchRedirectURL,t=decodeURI(window.location.href.split("?")[1]);window.location.href="undefined"!==t?e+"?"+t:e}},{key:"loopInFilterItems",value:(r=m(f().mark((function e(t,n,r,o){var i,a,l,u,s,d,v,m,h,p,b;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.keyCode!=c.sj){e.next=4;break}null!==(i=o.findYourCruiseRef)&&void 0!==i&&null!==(a=i.current)&&void 0!==a&&a.querySelectorAll(".find-your-cruise__accordion__item.active")[0]?(0===(u=this.findYourCruiseRef.current.querySelectorAll('.find-your-cruise__accordion__content .find-your-cruise__accordion__content__item input[aria-disabled="false"]')).length&&(u=this.findYourCruiseRef.current.querySelectorAll('.find-your-cruise__accordion__content .find-your-cruise__accordion__content__item button[aria-disabled="false"]')),Array.from(u).some((function(e){e.classList.remove("focusedElement")})),document.activeElement.classList.contains("find-your-cruise__accordion__item")?(u[0].focus(),u[0].classList.add("focusedElement"),l=0):(document.activeElement.classList.add("focusedElement"),Array.from(u).some((function(e,t){e.classList.contains("focusedElement")&&(l=t,e.classList.remove("focusedElement"))})),u[l+1]?(u[l+1].focus(),u[l+1].classList.add("focusedElement")):(null===(s=u[0])||void 0===s||s.focus(),null===(d=u[0])||void 0===d||d.classList.add("focusedElement")))):document.activeElement.click(),e.next=18;break;case 4:if(t.keyCode!=c.Nk){e.next=8;break}o.findYourCruiseRef.current.querySelectorAll(".find-your-cruise__accordion__item.active")[0]?(0===(m=this.findYourCruiseRef.current.querySelectorAll('.find-your-cruise__accordion__content .find-your-cruise__accordion__content__item input[aria-disabled="false"]')).length&&(m=this.findYourCruiseRef.current.querySelectorAll('.find-your-cruise__accordion__content .find-your-cruise__accordion__content__item button[aria-disabled="false"]')),Array.from(m).some((function(e){e.classList.remove("focusedElement")})),document.activeElement.classList.contains("find-your-cruise__accordion__item")?(m[0].focus(),m[0].classList.add("focusedElement"),v=0):(document.activeElement.classList.add("focusedElement"),Array.from(m).some((function(e,t){e.classList.contains("focusedElement")&&(v=t,e.classList.remove("focusedElement"))})),m[v-1]?(m[v-1].focus(),m[v-1].classList.add("focusedElement")):(null===(h=m[m.length-1])||void 0===h||h.focus(),null===(p=m[m.length-1])||void 0===p||null===(b=p.classList)||void 0===b||b.add("focusedElement")))):document.activeElement.click(),e.next=18;break;case 8:if(t.keyCode!=c.ok){e.next=14;break}return e.next=11,this.setState({selectedDropDown:void 0});case 11:this.loopInHeaderItems(t,n,r),e.next=18;break;case 14:if(t.keyCode!=c.Mj){e.next=18;break}return e.next=17,this.setState({selectedDropDown:void 0});case 17:this.loopInHeaderItems(t,n,r);case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,n,o){return r.apply(this,arguments)})},{key:"loopInHeaderItems",value:(n=m(f().mark((function e(t,n,r){var o,i,a,l,u,s,d,v,m,h,p,b,g,y,w;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null===(o=this.state.filterConfigList)||void 0===o?void 0:o.length,a=r,!(t.keyCode==c.ok&&n input:not([disabled])"))||void 0===w||w.focus(),e.next=25;break;case 23:return e.next=25,this.setState({selectedDropDown:a});case 25:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"onSelectionItem",value:(t=m(f().mark((function e(t,n){var r,o,i,l,s,d,v,m,h,p,b=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.state.selectedSearchResults,l=i[t],n.selected=!(null!=n&&n.selected),e.t0=t,e.next=e.t0===c.Xc?6:e.t0===c.ed?14:22;break;case 6:return o=n.code,window.sessionStorage.setItem(c.qh,t),window.sessionStorage.setItem(c.oh,Object(u.k)(o)),s=null==l?void 0:l.indexOf(n.code),o=-1===(null==l?void 0:l.indexOf(n.code))?0==l.length?[n.code]:a()(n.code).isSameOrAfter(a()(l[0]))?this.getDepartDate(l[0],n.code):this.getDepartDate(n.code,l[l.length-1]):1==l.length||l[0]==n.code?[]:this.getDepartDate(l[0],l[s-1]),d=null===(r=o)||void 0===r?void 0:r.map((function(e){return Object(u.k)(e)})),L.departDate=d,e.abrupt("break",31);case 14:return window.sessionStorage.setItem(c.qh,t),window.sessionStorage.setItem(c.oh,n.label),-1===(v=null==l?void 0:l.indexOf(n.label))?l.push(n.label):l.splice(v,1),(o=l).sort((function(e,t){return(null==e?void 0:e.split("-")[0])-(null==t?void 0:t.split("-")[0])})),L.duration=o,e.abrupt("break",31);case 22:return window.sessionStorage.setItem(c.qh,t),window.sessionStorage.setItem(c.oh,n.name),m=null==l?void 0:l.indexOf(n.code),E[n.code]=n.name,-1===m?l.push(n.code):l.splice(m,1),h=(o=l).map((function(e){return E[e]})),"departure"==t?L.departure=h:"destinations"==t&&(L.destinations=h),e.abrupt("break",31);case 31:return i[t]=o,p={},this.state.filterConfigList.forEach((function(e){var t=b.updateSelectedValue(null==e?void 0:e.type,b.state.searchResults[null==e?void 0:e.type]);p[null==e?void 0:e.type]=t})),e.next=36,this.setState({selectedSearchResults:i,searchResults:p});case 36:return this.updateURLQuaryParam(),e.next=39,this.getFilterSearchResult();case 39:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"onSelectDate",value:function(e){this.state.selectedYearForMobile!==e&&this.setState({selectedYearForMobile:e})}},{key:"getUnAvailableWarningMsg",value:function(e){var t,n,r,i,a,l,u,s=!1,d=null===(t=this.state.searchResults)||void 0===t?void 0:t[e];switch(e){case c.Xc:var f=[];null==d||d.forEach((function(e){return f=f.concat(e)})),s=null===(n=f)||void 0===n?void 0:n.some((function(e){return 1==e.selected&&0==e.enabled}));break;default:s=null==d?void 0:d.some((function(e){return 1==e.selected&&0==e.enabled}))}return s?o.a.createElement("div",{className:"no-result-warning-msg"},o.a.createElement("div",{className:"no-result-warning-msg--icon"}),o.a.createElement("div",{className:"no-result-warning-msg--label"},null!==(r=this.state.labelList)&&void 0!==r&&null!==(i=r.unAvailableCruise)&&void 0!==i&&i[e]?null===(a=this.state.labelList)||void 0===a||null===(l=a.unAvailableCruise)||void 0===l?void 0:l[e]:null===(u=this.state.labelList)||void 0===u?void 0:u.noCruiseAvailable)):""}},{key:"getAccordionHeaderTitle",value:function(e){var t,n,r,i,l,u,s,d,f=null===(t=this.state.selectedSearchResults)||void 0===t?void 0:t[null==e?void 0:e.type];if(this.state.searchResults&&f&&0!=(null==f?void 0:f.length)){var v,m,h=f[0];switch(e.type){case c.Xc:if(f&&1==f.length){var p,b,g=null===(p=a()(f[0]))||void 0===p||null===(b=p.utc())||void 0===b?void 0:b.format("MMM YY");h=g}else{var y,w,_,S,L,E,k,O,x,C,j=(null===(y=a()(f[0]))||void 0===y||null===(w=y.utc())||void 0===w?void 0:w.format("YYYY"))==(null===(_=a()(f[f.length-1]))||void 0===_||null===(S=_.utc())||void 0===S?void 0:S.format("YYYY"))?null===(L=a()(f[0]))||void 0===L||null===(E=L.utc())||void 0===E?void 0:E.format("MMM"):null===(k=a()(f[0]))||void 0===k||null===(O=k.utc())||void 0===O?void 0:O.format("MMM ’YY"),N=null===(x=a()(f[f.length-1]))||void 0===x||null===(C=x.utc())||void 0===C?void 0:C.format("MMM ’YY");h=j+" - "+N}break;case c.ed:var I=null===(n=this.state.searchResults)||void 0===n||null===(r=n[e.type])||void 0===r?void 0:r.find((function(e){return e.label==h})),A=null===(i=this.state.searchResults)||void 0===i||null===(l=i[e.type])||void 0===l?void 0:l.find((function(e){return e.label==f[f.length-1]})),P="*"==A.end?(null===(u=this.state.labelList)||void 0===u?void 0:u.orLabel)+" "+(null===(s=this.state.labelList)||void 0===s?void 0:s.durationDayMoreLabel):" - "+A.end+" "+(null===(d=this.state.labelList)||void 0===d?void 0:d.durationDayLabel);h=(null==I?void 0:I.start)+" "+P;break;default:if(f&&1==f.length){var R,D,M=null===(R=this.state.searchResults)||void 0===R||null===(D=R[e.type])||void 0===D?void 0:D.find((function(e){return e.code==h}));h=null==M?void 0:M.name}else{var q;h=null===(q=this.state.labelList)||void 0===q?void 0:q.destinationsMultipleLabel}}return o.a.createElement("div",{className:"find-your-cruise__accordion__header--title-group"},o.a.createElement("div",{className:"find-your-cruise__accordion__header--title-sup"},e.name),o.a.createElement("div",{className:"find-your-cruise__accordion__header--title-sub",title:null===(v=h)||void 0===v?void 0:v.toLowerCase()},null===(m=h)||void 0===m?void 0:m.toLowerCase()))}return o.a.createElement("div",{className:"find-your-cruise__accordion__header--title"},e.name)}},{key:"getContentDetails",value:function(e,t,n){var r,i,l,u,s,d,f,v,m,h,p,b,g,y,w,_,S=this;switch(t.type){case c.Xc:return o.a.createElement(o.a.Fragment,{key:n},o.a.createElement("div",{className:"find-your-cruise__accordion__content__item",key:n},o.a.createElement("div",{className:"calender__group"},0==this.state.isDesktopViewPort&&o.a.createElement("button",{className:"mobile-header__year ".concat(this.state.selectedYearForMobile==(null==e||null===(r=e[0])||void 0===r?void 0:r.year)?"active":""),"data-automation-id":this.state.currentPageName+"-calender-month-"+n,onClick:function(){var t;return S.onSelectDate(null==e||null===(t=e[0])||void 0===t?void 0:t.year)}},null==e||null===(i=e[0])||void 0===i?void 0:i.year),1==this.state.isDesktopViewPort&&o.a.createElement("div",{className:"calender__year-label"},null==e||null===(l=e[0])||void 0===l?void 0:l.year),o.a.createElement("div",{className:"calender__month-list ".concat(this.state.selectedYearForMobile==(null==e||null===(u=e[0])||void 0===u?void 0:u.year)?"show":"")},e.map((function(e,n){var r,i,l,c,u,s,d;return o.a.createElement("button",{key:n,"data-automation-id":S.state.currentPageName+"-month-label"+n,"data-code":null===(r=a()(e.code).utc())||void 0===r?void 0:r.format("MMM YYYY"),disabled:!(null!=e&&e.enabled),"aria-disabled":!(null!=e&&e.enabled),onClick:function(){return S.onSelectionItem(t.type,e)},role:"checkbox","aria-checked":null!=e&&e.selected?"true":"false","aria-label":"".concat(null!=e&&e.selected?null===(i=a()(e.code))||void 0===i||null===(l=i.utc())||void 0===l?void 0:l.format("MMM YYYY"):(null===(c=a()(e.code))||void 0===c||null===(u=c.utc())||void 0===u?void 0:u.format("MMM YYYY"))+" "),className:"calender__month-item ".concat(null!=e&&e.selected?"active":"")},o.a.createElement("span",{className:"calender__month-label"},null===(s=a()(e.code))||void 0===s||null===(d=s.utc())||void 0===d?void 0:d.format("MMM")))}))))));case c.ed:return o.a.createElement("div",{"data-code":e.code,key:n,className:"find-your-cruise__accordion__content__item"},o.a.createElement("input",{type:"checkbox","data-automation-id":this.state.currentPageName+"-duration-"+n,id:"".concat(e.label,"-").concat(n),disabled:!(null!=e&&e.enabled),"aria-disabled":!(null!=e&&e.enabled),checked:e.selected,onChange:function(){return S.onSelectionItem(t.type,e)},"aria-label":"".concat(e.selected?"*"==e.end?e.start+" "+(null===(s=this.state.labelList)||void 0===s?void 0:s.orLabel)+" "+(null===(d=this.state.labelList)||void 0===d?void 0:d.durationDayMoreLabel)+'"':e.start+" "+(null===(f=this.state.labelList)||void 0===f?void 0:f.toLabel)+" "+e.end+" "+(null===(v=this.state.labelList)||void 0===v?void 0:v.durationDayLabel)+'"':"*"==e.end?e.start+" "+(null===(m=this.state.labelList)||void 0===m?void 0:m.orLabel)+" "+(null===(h=this.state.labelList)||void 0===h?void 0:h.durationDayMoreLabel):e.start+" "+(null===(p=this.state.labelList)||void 0===p?void 0:p.toLabel)+" "+e.end+" "+(null===(b=this.state.labelList)||void 0===b?void 0:b.durationDayLabel),"\n ")}),o.a.createElement("label",{htmlFor:"".concat(e.label,"-").concat(n)},"*"==e.end?o.a.createElement("span",{className:"destination-checkbox-label ".concat(e.selected?"active":"")}," ".concat(e.start," ").concat(null===(g=this.state.labelList)||void 0===g?void 0:g.orLabel," ").concat(null===(y=this.state.labelList)||void 0===y?void 0:y.durationDayMoreLabel)):o.a.createElement("span",{className:"destination-checkbox-label ".concat(e.selected?"active":"")},"".concat(e.start," - ").concat(e.end," ").concat(null===(w=this.state.labelList)||void 0===w?void 0:w.durationDayLabel))));default:return o.a.createElement("div",{"data-code":e.code,key:n,className:"find-your-cruise__accordion__content__item"},o.a.createElement("input",{type:"checkbox","data-automation-id":this.state.currentPageName+"-filter-item-"+n,id:"".concat(e.code,"-").concat(n),disabled:!(null!=e&&e.enabled),"aria-disabled":!(null!=e&&e.enabled),"aria-label":"".concat(e.selected?e.name:e.name+" "),checked:e.selected,onChange:function(){return S.onSelectionItem(t.type,e)}}),o.a.createElement("label",{htmlFor:"".concat(e.code,"-").concat(n)},o.a.createElement("span",{className:"destination-checkbox-label ".concat(e.selected?"active":"")},null===(_=e.name)||void 0===_?void 0:_.toLowerCase())))}}},{key:"render",value:function(){var e,t,n,r,i,a,l=this,u=this.state,s=u.labelList,d=u.searchResults,f=u.showLoader;return o.a.createElement("div",{className:"find-your-cruise ".concat(f?"showLoader":""),ref:this.findYourCruiseRef},o.a.createElement("div",{className:"find-your-cruise__api-error"}),o.a.createElement("div",{className:"find-your-cruise__custom-loader ".concat(f?"show":"")}),o.a.createElement("fieldset",null,o.a.createElement("legend",{className:"sr-only"},null===(e=this.state.labelList)||void 0===e?void 0:e.findCruiseLabel),o.a.createElement("div",{className:"find-your-cruise__template"},o.a.createElement("div",{className:"find-your-cruise__container"},0==this.state.isDesktopViewPort&&o.a.createElement("div",{className:"find-your-cruise__container-mobile"},o.a.createElement("button",{"data-automation-id":this.state.currentPageName+"-filter-btn-mobile",className:"find-your-cruise__filter__btn",onClick:function(e){return l.openFindCruiseOverlay(e)}},null==s?void 0:s.filterLabel),o.a.createElement("button",{className:"find-your-cruise__cta__btn cmp-btn ".concat((null===(t=window)||void 0===t||null===(n=t.configs)||void 0===n?void 0:n.brand.toLowerCase())==c.Zi?"marketing":"primary"),"data-automation-id":this.state.currentPageName+"-find-cruise-mobile","data-component":"button-component",onClick:function(){return l.redirectToResultPage()}},null==s?void 0:s.findYourCruiseLabel)),o.a.createElement("div",{className:"".concat(this.state.isDesktopViewPort?"":"find-your-cruise__overlay"," ").concat(this.state.showMobileOverlay?"active":"")},o.a.createElement("div",{className:"find-your-cruise__overlay__container","aria-label":(null==s?void 0:s.findYourCruiseLabel)+" "+(null==s?void 0:s.filterLabel),role:"menu"},0==this.state.isDesktopViewPort&&o.a.createElement("div",{className:"find-your-cruise__overlay-header"},o.a.createElement("button",{className:"clear-btn","data-automation-id":this.state.currentPageName+"-clear-mobile",onClick:function(){return l.clearSelection()}},null==s?void 0:s.clearFilterLabel),o.a.createElement("button",{"data-automation-id":this.state.currentPageName+"-close-overlay-mobile","aria-label":s.mobileOverlayCloseLabel,className:"close-btn",onClick:function(e){return l.closeFindCruiseOverlay(e)}})),o.a.createElement("div",{className:"find-your-cruise__accordion",role:"group"},this.state.filterConfigList.map((function(e,t){var n;return o.a.createElement(o.a.Fragment,{key:t},o.a.createElement("div",{className:"find-your-cruise__accordion__item ".concat(l.state.selectedDropDown==e.type?"active":""),"data-type":e.type},o.a.createElement("button",{type:"button",className:"find-your-cruise__accordion__header",role:"menuitem","aria-haspopup":"true","data-automation-id":"".concat(l.state.currentPageName,"-find-cruise-").concat(l.state.isDesktopViewPort?"desktop-":"mobile-").concat(e.type,"-").concat(t),"aria-expanded":l.state.selectedDropDown==e.type?"true":"false","aria-controls":"".concat(e.type,"-content"),id:"".concat(e.type,"-header"),onKeyDown:function(n){return l.loopInHeaderItems(n,t,e.type)},onClick:function(t){return l.onSelectDropDown(e.type,t)}},l.getAccordionHeaderTitle(e),o.a.createElement("div",{className:"find-your-cruise__accordion__header--char ".concat(l.state.selectedDropDown==e.type?"expand":"collapse")})),l.state.selectedDropDown==e.type&&o.a.createElement("div",{className:"find-your-cruise__accordion__content",id:"".concat(e.type,"-content"),role:"region","aria-labelledby":"".concat(e.type,"-header"),onKeyDown:function(n){return l.loopInFilterItems(n,t,e.type,l)}},l.getUnAvailableWarningMsg(e.type),o.a.createElement("div",{className:"find-your-cruise__accordion__content__list ".concat("duration"==e.type?"four-column":""),"data-content-id":null==e?void 0:e.type},d&&(null==d||null===(n=d[null==e?void 0:e.type])||void 0===n?void 0:n.map((function(t,n){return l.getContentDetails(t,e,n)})))),1==l.state.isDesktopViewPort&&o.a.createElement("div",{className:"find-your-cruise__accordion__content__footer"},o.a.createElement("div",{className:"footer__show-result"},o.a.createElement("button",{className:"show-result-btn",onClick:function(){return l.redirectToResultPage()},"data-automation-id":l.state.currentPageName+"-show-result"},"".concat(null==s?void 0:s.showLabel," ").concat(l.state.totalResults," ").concat(null==s?void 0:s.resultsLabel," "))),o.a.createElement("div",{className:"footer__clear"},o.a.createElement("button",{className:"clear-btn","data-automation-id":l.state.currentPageName+"-clear-fliter-desktop",onClick:function(){return l.clearSelection()}},null==s?void 0:s.clearFilterLabel))))))})),1==this.state.isDesktopViewPort&&o.a.createElement("button",{className:"find-your-cruise__cta__btn cmp-btn ".concat((null===(r=window)||void 0===r||null===(i=r.configs)||void 0===i?void 0:i.brand.toLowerCase())==c.Zi?"marketing":"primary"),onClick:function(){return l.redirectToResultPage()},"data-component":"button-component","data-automation-id":this.state.currentPageName+"-find-cruise-desktop"},null==s?void 0:s.findYourCruiseLabel)),0==this.state.isDesktopViewPort&&o.a.createElement("div",{className:"find-your-cruise__accordion__content__footer"},o.a.createElement("div",{className:"footer__show-result"},o.a.createElement("button",{className:"show-result-btn",onClick:function(){return l.redirectToResultPage()},"data-automation-id":this.state.currentPageName+"-show-result-mobile-view"},"".concat(null==s?void 0:s.showLabel," ").concat(this.state.totalResults," ").concat(null==s?void 0:s.resultsLabel," "))))),o.a.createElement("span",{"aria-live":"polite",className:"sr-only"},void 0!==this.state.selectedDropDown?null===(a=this.state.labelList)||void 0===a?void 0:a.findCruiseResultsLabel:""))))))}}]),w}(o.a.Component);Object(s.a)(k,".cmp-find-your-cruise")},172:function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(0),o=n.n(r),i=n(25),a=n.n(i),l=n(59),c=n(1),u=n(115),s=n(51),d=n(96),f=n(6);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n0?t+=","+o.querySelector("button").getAttribute("data-code"):t=o.querySelector("button").getAttribute("data-code"));r.push(o.querySelector("button").getAttribute("data-code")),n=o.querySelector("button").innerText}})),1===r.length)?(null===(l=this.cruiseRef.current.querySelector('li[data-id="'+e+'"]'))||void 0===l||null===(u=l.classList)||void 0===u||u.add("added"),this.cruiseRef.current.querySelector('li[data-id="'+e+'"] .cmp-list__item-description').innerText=n,this.cruiseRef.current.querySelector('li[data-id="'+e+'"]').setAttribute("aria-label",f+" "+n)):(null===(s=this.cruiseRef.current.querySelector('li[data-id="'+e+'"]'))||void 0===s||null===(d=s.classList)||void 0===d||d.remove("added"),this.cruiseRef.current.querySelector('li[data-id="'+e+'"] .cmp-list__item-description').innerText="",this.cruiseRef.current.querySelector('li[data-id="'+e+'"]').setAttribute("aria-label",e));switch(e){case"duration":var v;if(null===(v=a.match(/\[([^()]+)\]/g))||void 0===v||v.forEach((function(e){var t;a.includes(c.Ej.duration+e)&&(a=null===(t=a)||void 0===t?void 0:t.replace(e,""))})),""!=t){var m,h,p=t.match(/\d+/g);p.sort((function(e,t){return e-t}));var b;b=p[0]+(1===p.length?"":" - "+p[p.length-1])+" "+(t.includes("*")?" or "+this.state.labelList.durationDayMoreLabel:this.state.labelList.durationDayLabel),null===(m=this.cruiseRef.current.querySelector('li[data-id="'+e+'"]'))||void 0===m||null===(h=m.classList)||void 0===h||h.add("added"),this.cruiseRef.current.querySelector('li[data-id="'+e+'"] .cmp-list__item-description').innerText=b,this.cruiseRef.current.querySelector('li[data-id="'+e+'"]').setAttribute("aria-label",f+" "+b),a=c.Ej.duration+"["+t+"]"}else{var g;a=null===(g=a)||void 0===g?void 0:g.replace(c.Ej.duration+[],c.Ej.duration)}break;case"destinations":case"departure":case"ships":var y,w;if(r.length>1)null===(y=this.cruiseRef.current.querySelector('li[data-id="'+e+'"]'))||void 0===y||null===(w=y.classList)||void 0===w||w.add("added"),null!=this.cruiseRef.current.querySelector('li[data-id="'+e+'"] .cmp-list__item-description')&&(this.cruiseRef.current.querySelector('li[data-id="'+e+'"]').setAttribute("aria-label",f+" "+this.state.labelList[e+"MultipleLabel"]),this.cruiseRef.current.querySelector('li[data-id="'+e+'"] .cmp-list__item-description').innerText=this.state.labelList[e+"MultipleLabel"]);var _=encodeURIComponent(r.join(" OR "));a=c.Ej[e]+"("+_+")"}if(0===r.length){var S=-1;i.forEach((function(t,n){t.includes(c.Ej[e])&&(S=n)})),-1!==S&&i.splice(S,1),history.pushState({},"","?"+i.join("&"))}else{0===i.length&&i.push(a),i.some((function(t){return t.includes(c.Ej[e])}))?i.forEach((function(t,n){t.includes(c.Ej[e])&&(i[n]=a)})):i.push(a),history.pushState({},"","?"+i.join("&"))}0===i.length&&history.pushState({},"",location.pathname);var L=i.join("&");if(L.includes("duration")){var E=L.split("&").filter((function(e){return e.includes("duration")}))[0].split(":")[1],k=E.match(/\d+/g);k.sort((function(e,t){return e-t}));var O="["+k[0]+"%20TO%20"+(E.includes("*")?"*":k[k.length-1])+"]";L=L.replace(E,O)}this.getCruiseSearchFilterResult(),this.showCruiseNoAvailable(e),this.setState({setRecentSearch:!0})}},{key:"redirectTofindCruise",value:function(){var e=this.cruiseRef.current.closest(".cmp-find-cruise").getAttribute("data-searchRedirectUrl"),t=decodeURI(window.location.href.split("?")[1]);"undefined"!==t?(this.state.setRecentSearch&&(Object(f.d)(this.cruiseRef.current,this.state.filterList,this.props.recentSearchLabel,!0),this.recentSearchRef.current.setRecentSearch(this.cruiseRef.current,this.state.filterList,e+"?"+t),this.setState({setRecentSearch:!1})),window.location.href=e+"?"+t):(window.location.href=e,Object(f.d)(this.cruiseRef.current,this.state.filterList,this.props.recentSearchLabel))}},{key:"showMoreFilterResults",value:function(e){var t=!1;this.setState({showMore:!this.state.showMore}),document.querySelectorAll(".cmp-find-cruise__search-overlay--result.active .active .cmp-find-cruise--filter .button").forEach((function(e){"false"!=e.children[0].getAttribute("aria-disabled")||t||(e.children[0].focus(),t=!0)})),this.dropdownContent(e)}},{key:"dropdownContent",value:function(e){var t=this;switch(e){case"duration":return o.a.createElement("div",{className:" duration-list cmp-find-cruise-label","data-id":"duration"},this.state.filterContent.map((function(n,r){if(n.type===e){var i=n.arr.length>15&&t.state.showMore?15:n.arr.length;return o.a.createElement(o.a.Fragment,{key:r},o.a.createElement(l.a,{key:r,item:n,showMore:t.state.showMore,searchResult:t.state,type:e,filterlength:i,refName:t.cruiseRef,onFilterSelect:function(e){return t.onFilterSelect("duration")}}),n.arr.length>15?o.a.createElement("div",{className:"button cmp-button--secondary showmore"},o.a.createElement("button",{className:"cmp-button","aria-label":n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel,"aria-disabled":"false","data-component":"button-component","data-automation-id":t.state.currentPageName+"-DurationsShowMore",onClick:function(){return t.showMoreFilterResults(e)}},o.a.createElement("span",{className:"cmp-button__text"}," ",n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel))):"")}})));case"departDate":return o.a.createElement(o.a.Fragment,null,o.a.createElement(u.a,{filterContent:this.state.filterContent,searchResult:this.state,filterList:this.state.filterList,refName:this.cruiseRef,onfilterCalendarClick:function(e){return t.onfilterCalendarClick("departDate")}}));case"destinations":return o.a.createElement("div",{className:"region-list cmp-find-cruise-label","data-id":"destinations"},this.state.filterContent.map((function(n,r){if(n.type===e){n.arr.sort((function(e,t){return t.enabled-e.enabled}));var i=n.arr.length>15&&t.state.showMore?15:n.arr.length;return o.a.createElement(o.a.Fragment,{key:r},o.a.createElement(l.a,{key:r,showMore:t.state.showMore,searchResult:t.state,item:n,type:e,filterlength:i,refName:t.cruiseRef,onFilterSelect:function(e){return t.onFilterSelect("destinations")}}),n.arr.length>15?o.a.createElement("div",{className:"button cmp-button--secondary showmore"},o.a.createElement("button",{className:"cmp-button","aria-label":n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel,"aria-disabled":"false","data-automation-id":"findCruise-DestinationsShowMore","data-component":"button-component",onClick:function(){return t.showMoreFilterResults(e)}},o.a.createElement("span",{className:"cmp-button__text"}," ",n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel))):"")}})));case"departure":return o.a.createElement("div",{className:"port-list cmp-find-cruise-label","data-id":"departure"},this.state.filterContent.map((function(n,r){if(n.type===e){n.arr.sort((function(e,t){return t.enabled-e.enabled}));var i=n.arr.length>15&&t.state.showMore?15:n.arr.length;return o.a.createElement(o.a.Fragment,{key:r},o.a.createElement(l.a,{key:r,showMore:t.state.showMore,item:n,type:e,searchResult:t.state,filterlength:i,refName:t.cruiseRef,onFilterSelect:function(e){return t.onFilterSelect("departure")}}),n.arr.length>15?o.a.createElement("div",{className:"button cmp-button--secondary showmore"},o.a.createElement("button",{className:"cmp-button","aria-label":n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel,"aria-disabled":"false","data-automation-id":t.state.currentPageName+"-DeparturesShowMore","data-component":"button-component",onClick:function(){return t.showMoreFilterResults(e)}},o.a.createElement("span",{className:"cmp-button__text"}," ",n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel))):"")}})));case"ships":return o.a.createElement("div",{className:"port-list cmp-find-cruise-label","data-id":"ships"},this.state.filterContent.map((function(n,r){if(n.type===e){n.arr.sort((function(e,t){return t.enabled-e.enabled}));var i=n.arr.length>15&&t.state.showMore?15:n.arr.length;return o.a.createElement(o.a.Fragment,{key:r},o.a.createElement(l.a,{key:r,item:n,showMore:t.state.showMore,searchResult:t.state,type:e,filterlength:i,refName:t.cruiseRef,onFilterSelect:function(e){return t.onFilterSelect("ships")}}),n.arr.length>15?o.a.createElement("div",{className:"button cmp-button--secondary showmore"},o.a.createElement("button",{className:"cmp-button","aria-label":n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel,"aria-disabled":"false","data-automation-id":t.state.currentPageName+"-DeparturesShowMore","data-component":"button-component",onClick:function(){return t.showMoreFilterResults(e)}},o.a.createElement("span",{className:"cmp-button__text"}," ",n.arr.length>15&&t.state.showMore?t.state.labelList.showMoreLabel:t.state.labelList.showLessLabel))):"")}})))}}},{key:"dropdownShow",value:function(e,t){var n,r,o,i,a,l=this,c=0;(this.state.showMore||this.setState({showMore:!this.state.showMore}),e.cruiseRef.current.querySelectorAll(".cmp-list__item").forEach((function(e){e.classList.remove("active"),window.matchMedia("(min-width: 1024px)").matches?e.setAttribute("aria-expanded","false"):e.firstElementChild.setAttribute("aria-expanded","false"),l.setState({activeOverlay:!1})})),e.cruiseRef.current.querySelector(".cmp-list__item.search-form").removeAttribute("aria-expanded"),e.cruiseRef.current.querySelectorAll("div[data-id]").forEach((function(n){var r,o;n.getAttribute("data-id")===t.value&&n.classList.contains("active")&&(null===(r=e.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay--result"))||void 0===r||null===(o=r.classList)||void 0===o||o.remove("active"),c=1);n.classList.remove("active")})),0===c)&&(null===(n=e.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay--result"))||void 0===n||n.classList.add("active"),this.setState({activeOverlay:!0}),null===(r=e.cruiseRef.current.querySelector('div[data-id="'+t.value+'"]'))||void 0===r||r.classList.add("active"),null===(o=e.cruiseRef.current.querySelector('.cmp-list__item[data-id="'+t.value+'"]'))||void 0===o||o.classList.add("active"),window.matchMedia("(min-width: 1024px)").matches?null===(i=e.cruiseRef.current.querySelector('.cmp-list__item[data-id="'+t.value+'"]'))||void 0===i||i.setAttribute("aria-expanded","true"):null===(a=e.cruiseRef.current.querySelector('.cmp-list__item[data-id="'+t.value+'"]'))||void 0===a||a.firstElementChild.setAttribute("aria-expanded","true"));"cmp-list__item-link"===t.ele.target.className?t.ele.target.parentNode.append(e.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay--result")):t.ele.target.append(e.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay--result")),t.ele.stopPropagation(),this.showCruiseNoAvailable(t.value)}},{key:"showCruiseNoAvailable",value:function(e){this.setState({isCruiseAvailable:!document.querySelector(".cmp-find-cruise-label.active .cmp-button.active[aria-disabled='true']"),cruiseNotAvailableLabel:this.state.labelList[e+"NoCruiseAvailabeLabel"]})}},{key:"moveFilter",value:function(e,t,n){if(e.keyCode==c.sj)if(t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0]){var r,o=this.cruiseRef.current.querySelectorAll('.cmp-find-cruise__search-overlay--result.active .active button[aria-disabled="false"]');Array.from(o).some((function(e){e.classList.remove("focusedElement")})),document.activeElement.classList.contains("cmp-list__item")?(o[0].focus(),o[0].classList.add("focusedElement"),r=0):(document.activeElement.classList.add("focusedElement"),Array.from(o).some((function(e,t){e.classList.contains("focusedElement")&&(r=t,e.classList.remove("focusedElement"))})),o[r+1]?(o[r+1].focus(),o[r+1].classList.add("focusedElement")):(o[0].focus(),o[0].classList.add("focusedElement")))}else document.activeElement.click();if(e.keyCode==c.Nk)if(t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0]){var i,a=this.cruiseRef.current.querySelectorAll('.cmp-find-cruise__search-overlay--result.active .active button[aria-disabled="false"]');Array.from(a).some((function(e){e.classList.remove("focusedElement")})),document.activeElement.classList.contains("cmp-list__item")?(a[0].focus(),a[0].classList.add("focusedElement"),i=0):(document.activeElement.classList.add("focusedElement"),Array.from(a).some((function(e,t){e.classList.contains("focusedElement")&&(i=t,e.classList.remove("focusedElement"))})),a[i-1]?(a[i-1].focus(),a[i-1].classList.add("focusedElement")):(a[a.length-1].focus(),a[a.length-1].classList.add("focusedElement")))}else document.activeElement.click();var l,u,s,d,f,v,m,h;e.keyCode==c.ok&&(t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0]?(t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0].nextSibling.focus(),t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0].classList.remove("active"),null===(l=this.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay--result"))||void 0===l||null===(u=l.classList)||void 0===u||u.remove("active"),this.setState({activeOverlay:!1}),null===(s=this.cruiseRef.current.querySelector(".cmp-find-cruise-label"))||void 0===s||null===(d=s.classList)||void 0===d||d.remove("active")):document.activeElement.nextSibling.focus());e.keyCode==c.Mj&&(t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0]?(t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0].previousSibling.focus(),t.cruiseRef.current.querySelectorAll(".cmp-list__item.active")[0].classList.remove("active"),null===(f=this.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay--result"))||void 0===f||null===(v=f.classList)||void 0===v||v.remove("active"),this.setState({activeOverlay:!1}),null===(m=this.cruiseRef.current.querySelector(".cmp-find-cruise-label"))||void 0===m||null===(h=m.classList)||void 0===h||h.remove("active")):document.activeElement.previousSibling.focus())}},{key:"mobileShow",value:function(){var e,t;null===(e=this.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay"))||void 0===e||null===(t=e.classList)||void 0===t||t.add("active"),document.body.classList.add("overflowHidden")}},{key:"mobileHide",value:function(){var e,t,n,r;null===(e=this.cruiseRef.current.querySelector(".cmp-find-cruise__search-overlay"))||void 0===e||null===(t=e.classList)||void 0===t||t.remove("active"),null===(n=document.querySelector(".cmp-find-cruise__search-overlay--result"))||void 0===n||null===(r=n.classList)||void 0===r||r.remove("active"),document.querySelectorAll(".cmp-list__item").forEach((function(e){e.classList.remove("active")})),document.body.classList.remove("overflowHidden")}},{key:"updateRecentSearchCount",value:function(){return!1}},{key:"render",value:function(){var e,t,n,r=this,i=(null===(e=window)||void 0===e||null===(t=e.configs)||void 0===t?void 0:t.brand)===c.aj;return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"cmp-find-cruise__search-bar",ref:this.cruiseRef},o.a.createElement("div",{className:"container responsivegrid"},o.a.createElement("div",{className:"cmp-section-container"},o.a.createElement("div",{className:"find-the-cruise-error-msg"},"Authorable error message"),o.a.createElement("div",{className:"mobile-view"},o.a.createElement("div",{className:"button cmp-button--primary"},o.a.createElement("button",{className:"cmp-button search-engine-mobile","aria-label":this.state.labelList.dataSearchText,onClick:this.mobileShow.bind(this)},this.state.labelList.dataSearchText))),o.a.createElement("div",{className:"cmp-find-cruise__search-overlay"},o.a.createElement("div",{className:"mobile-view"},o.a.createElement("h2",null,this.state.labelList.filterOverlayTitleLabel),o.a.createElement("button",{tabIndex:"0",className:"close-btn",onClick:this.mobileHide.bind(this)},o.a.createElement("span",null,this.state.labelList.mobileOverlayCloseLabel))),o.a.createElement("fieldset",{className:"list cmp-list--horizontal"},o.a.createElement("legend",{className:"sr-only"},"Find Your Cruise"),i&&o.a.createElement("h1",{className:"sr-only"},"Find Your Cruise Vacation"),o.a.createElement("div",null,o.a.createElement("ul",{className:"cmp-list",role:"group"},this.state.filterList&&(null===(n=this.state.filterList)||void 0===n?void 0:n.map((function(e,t){return window.matchMedia("(min-width: 1024px)").matches?o.a.createElement("li",{className:"cmp-list__item",role:"menuitem","aria-label":e.name,"aria-expanded":"false","aria-haspopup":"true",key:t,"data-id":e.type,tabIndex:"0",onClick:function(t){return r.dropdownShow(r,{value:e.type,ele:t})},onKeyPress:function(t){t.charCode===c.yj&&r.dropdownShow(r,{value:e.type,ele:t})},onKeyDown:function(t){return r.moveFilter(t,r,{value:e.type,ele:t})},"data-automation-id":r.state.currentPageName+"-"+e.type},o.a.createElement("a",{className:"cmp-list__item-link",href:"#","aria-label":e.name,tabIndex:"-1"},o.a.createElement("span",{className:"cmp-list__item-title"},e.name),o.a.createElement("span",{className:"cmp-list__item-description"}))):o.a.createElement("li",{className:"cmp-list__item","aria-label":e.name,"aria-haspopup":"true",key:t,"data-id":e.type,tabIndex:"-1",onClick:function(t){return r.dropdownShow(r,{value:e.type,ele:t})},onKeyPress:function(t){t.charCode===c.yj&&r.dropdownShow(r,{value:e.type,ele:t})},onKeyDown:function(t){return r.moveFilter(t,r,{value:e.type,ele:t})},"data-automation-id":r.state.currentPageName+"-"+e.type},o.a.createElement("a",{className:"cmp-list__item-link",href:"#","aria-label":e.name,tabIndex:"0",role:"button","aria-expanded":"false"},o.a.createElement("span",{className:"cmp-list__item-title"},e.name),o.a.createElement("span",{className:"cmp-list__item-description"})))}))),o.a.createElement("span",{"aria-live":"polite",className:"sr-only"},this.state.activeOverlay?this.state.labelList.ariaLabelonDropdownActive:""),o.a.createElement("li",{className:"cmp-list__item search-form",role:"none"},o.a.createElement("div",{className:"button cmp-button--primary search-button-form"},o.a.createElement("button",{type:"button",className:"cmp-button","aria-label":this.state.labelList.dataSearchText,onClick:this.redirectTofindCruise.bind(this),"data-component":"button-component","data-automation-id":this.state.currentPageName+"-Search"},o.a.createElement("span",{className:"cmp-button__text"},this.state.labelList.dataSearchText))),o.a.createElement("span",{className:"cmp-list__item-description"}))))),o.a.createElement("div",{className:"cmp-find-cruise__search-overlay--result",onKeyDown:function(e){return r.moveFilter(e,r,{})}},this.state.isCruiseAvailable?"":o.a.createElement("div",{className:"cmp-find-cruise__no-cruise"},this.state.cruiseNotAvailableLabel," "),o.a.createElement("div",{className:" cmp-find-cruise__search-overlay--innerwrap ".concat(this.state.showMore?"":"show-more")},this.state.filterContent.map((function(e,t){return o.a.createElement(o.a.Fragment,{key:t},r.dropdownContent(e.type))})),o.a.createElement("div",{className:"search-button"},o.a.createElement("div",{className:"button cmp-button--primary"},o.a.createElement("button",{className:"cmp-button","data-automation-id":this.state.currentPageName+"-Result",onClick:this.redirectTofindCruise.bind(this)},this.state.totalResults+""+this.state.labelList.resultsLabel," ")))))),o.a.createElement(d.a,{ref:this.recentSearchRef,updateRecentSearchCount:this.updateRecentSearchCount,recentSearchLabel:this.state.recentSearchLabel,automationID:this.state.currentPageName})))))}}]),n}(o.a.Component)},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o=n(2),i=n.n(o),a=n(1),l=n(21),c=n(5),u=n.n(c),s=n(7),d=n.n(s),f=n(6),v=n(3);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n0&&(null===(l=c[0])||void 0===l||!l.directBooking)?n.indirectBookingError:n.directBookingError}return o})),b(this,"redirectSecondaryLogin",(function(e){if(sessionStorage.getItem(a.uf)){sessionStorage.setItem(a.wb,'"'.concat(e,'"'));var t=JSON.parse(sessionStorage.getItem(a.uf));null!=t&&(window.location.href=t.postLogin+window.location.search)}})),b(this,"getCruiseIdFromBookingNumber",(function(e){var t=JSON.parse(sessionStorage.getItem(a.yi));if(null!=t&&t.length&&e){var n,r,o=null==t?void 0:t.filter((function(t){return null==e?void 0:e.includes(t.bookingNumber)}));if(o.length)sessionStorage.setItem(a.wb,'"'.concat(null===(n=o[0])||void 0===n?void 0:n.voyageName,'"')),sessionStorage.setItem(a.Gg,JSON.stringify({cruiseCode:null===(r=o[0])||void 0===r?void 0:r.voyageName}))}})),b(this,"hideErrorMessage",(function(e){""!==e.target.value&&(i()(e.target).parents("form").find(".cmp-form__error-summary-wrapper").hide(),i()(e.target).removeClass("error"),i()(e.target).parent(".cmp-form-options").find("label").removeClass("label-error"))})),b(this,"loadUserInfo",(function(){i()(n.el).find(".cmp-login-booking__detail-row--value-name").text(n.userInformation.firstName),i()(n.el).find(".cmp-login-booking__detail-row--value-mariner").text(n.userInformation.marinerId),i()(n.el).find(".cmp-login-booking__detail-row--value-email").text(n.userInformation.emailAddress)})),b(this,"getBookingDetails",(function(e){var t={marinerId:n.userInformation.marinerId};u.a.post(n.apiUrl[0],t).then((function(t){if(null==t.data.data||0===t.data.data.length)i()(e).find(".cmp-form .cmp-form__text-container").css("display",window.matchMedia("(min-width: 768px)").matches?n.DISPLAY_FLEX:n.DISPLAY_BLOCK),i()(e).find(".cmp-login-booking__desc--select-booking").remove(),i()(e).find(".cmp-form .cmp-form__select-container").remove();else{i()(e).find(".cmp-login-booking__desc--no-booking").hide(),i()(e).find(".cmp-form .cmp-form__text-container").remove(),i()(e).find(".cmp-form .cmp-form__select-container").css("display",window.matchMedia("(min-width: 768px)").matches?n.DISPLAY_FLEX:n.DISPLAY_BLOCK);var r=i()(e).find(".cmp-form select"),o=i()(e).attr("data-page-name");sessionStorage.setItem(a.yi,JSON.stringify(t.data.data)),t.data.data.map((function(e){var t=e.bookingNumber+" - "+e.sailDate;r.append('"))}))}})).catch((function(t){var n;i()(e).find(".cmp-login-booking__api-error").show(),i()(e).find(".cmp-login-booking__api-error").text(Object(v.J)(t)),Object(f.f)(null===(n=i()(e).find(".cmp-login-booking__api-error"))||void 0===n?void 0:n.text())}))})),this.el=t,this.apiUrl=i()(t).attr("data-api-url").split(","),this.directBookingError=i()(t).attr("data-direct-error-label"),this.indirectBookingError=i()(t).attr("data-indirect-error-label");var r=this.apiUrl[2];i()(t).find(".cmp-form__select-container select").on("change",(function(e){return n.hideErrorMessage(e)})),this.DISPLAY_FLEX="flex",this.DISPLAY_BLOCK="block";var o=this.apiUrl[1];Object(v.Ob)(),null!==sessionStorage.getItem(a.Fi)&&(this.isLoggedIn=!0,this.userInformation=JSON.parse(sessionStorage.getItem(a.Fi)),this.loadUserInfo(),this.getBookingDetails(t)),i()(t).each((function(e,a){var c=i()(a).find(".cmp-form");c.submit((function(e){if(Object(v.j)(),c.find(".cmp-form__text-container").length>0)if(c.validate().valid()){e.preventDefault(),c.find(".cmp-form__text-container input").addClass("error"),c.find(".cmp-form__text-container label").addClass("label-error");var s=Object(l.a)(i()(a).find(".cmp-form").serializeArray());u.a.post(r,s).then((function(){i()(a).find(".form-success").show(),n.redirectSecondaryLogin(null==s?void 0:s.bookingNumber)})).catch((function(e){i()(t).find(".cmp-login-booking__desc--no-booking").hide(),i()(t).find(".cmp-login-booking__api-error").show(),i()(t).find(".cmp-login-booking__api-error").text(Object(v.J)(e))}))}else c.find("input.cmp-form-text__text.error")[0].focus();else if(c.validate().valid()){e.preventDefault();var d=Object(l.a)(i()(a).find(".cmp-form").serializeArray());d.booking=d.booking.split("-")[0].trim();var f=d.booking.split("-")[0].trim();n.getCruiseIdFromBookingNumber(f),u.a.post(o,d).then((function(){i()(a).find(".form-success").show(),n.redirectSecondaryLogin(f)})).catch((function(e){i()(t).find(".cmp-login-booking__desc--no-booking").hide(),i()(t).find(".cmp-login-booking__api-error").show(),i()(t).find(".cmp-login-booking__api-error").text(n.renderErrorMessage(f,e))}))}else c.find("input.cmp-form-text__text.error")[0].focus()}))}))}));null===(r=i.a.validator)||void 0===r||r.addMethod("inValidBookingNumber",(function(e,t){return""===e||a.Yi.test(e)}),i.a.validator.messages.inValidInput)},174:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n.n(r),i=(n(65),n(21)),a=n(113),l=n(5),c=n.n(l),u=n(6),s=n(3);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&(null==i?void 0:i.map((function(e,t){return o.a.createElement(p,{key:e.id||t,title:null==e?void 0:e.question,description:null==e?void 0:e.answer})})))))};b.propTypes={heading:c.a.string,subtext:c.a.string,faqs:c.a.arrayOf(c.a.shape({id:c.a.oneOfType([c.a.string,c.a.number]),question:c.a.string.isRequired,answer:c.a.string})),customClass:c.a.string};var g=o.a.memo(b);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&u.forEach((function(e){e.unusedAmount?d+=e.unusedAmount:d+=e.flatRate?e.flatRate:0})),t&&t.length>0&&t.forEach((function(e){e.unusedAmount?d+=e.unusedAmount:d+=e.flatRate?e.flatRate:0}));var f={cruiseCreditsData:u,cruiseDepositsData:t,onboardCreditsData:s,cruiseDepositsOBCData:n,balanceAvailable:d,allFccData:e||[]};sessionStorage.setItem(r.nf,JSON.stringify(f));var v=new CustomEvent(r.nf);return window.dispatchEvent(v),f},v=function(e,t){var n=e||[];return(null==n?void 0:n.length)>0?(Array.prototype.sum=function(e){for(var t=0,n=0,r=this.length;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,l,"next",e)}function l(e){h(i,r,o,a,l,"throw",e)}a(void 0)}))}}function b(e,t,n,r){var o,i,c,v,h,b,y,_,S,L=n.attr("data-me-api-url"),E=n.attr("data-target-page"),k=n.attr("data-fcc-api-url"),O=n.attr("data-api-primaryitem-url"),x=n.attr("data-upcoming-booking-api-url"),C=n.attr("data-target-secondary-login"),j=!1;window.location.href.includes(a.mf)&&!sessionStorage.getItem(a.uf)&&sessionStorage.setItem(a.uf,JSON.stringify(null===(_=window.configs)||void 0===_?void 0:_.redirectUrl[a.of]));window.location.href.includes(a.Uh)&&!sessionStorage.getItem(a.uf)&&sessionStorage.setItem(a.uf,JSON.stringify(null===(S=window.configs)||void 0===S?void 0:S.redirectUrl[a.Vh]));if(sessionStorage.getItem(a.uf)&&(y=JSON.parse(sessionStorage.getItem(a.uf)),E=null==y.booking||window.location.href.includes(a.mf)?y.postLogin:y.booking,C=y.postLogin),!y&&(null!==(o=window.location)&&void 0!==o&&null!==(i=o.href)&&void 0!==i&&i.includes(a.Dh)||null!==(c=window.location)&&void 0!==c&&null!==(v=c.href)&&void 0!==v&&v.includes(a.kh))){var N,I,A,P,R,D,M,q,T,F,U,B,Y,J,G;if(window.configs.brand===a.Zi||window.configs.brand===a.aj)if(null!==(A=window.location)&&void 0!==A&&null!==(P=A.href)&&void 0!==P&&P.includes(a.Bh)||null!==(R=window.location)&&void 0!==R&&null!==(D=R.href)&&void 0!==D&&D.includes(a.Ch))y=null===(M=window)||void 0===M||null===(q=M.configs)||void 0===q||null===(T=q.redirectUrl)||void 0===T?void 0:T[a.yb];else y=null===(F=window)||void 0===F||null===(U=F.configs)||void 0===U||null===(B=U.redirectUrl)||void 0===B?void 0:B[a.Xe];else y=null===(Y=window)||void 0===Y||null===(J=Y.configs)||void 0===J||null===(G=J.redirectUrl)||void 0===G?void 0:G[a.xb];sessionStorage.setItem(a.uf,JSON.stringify(y)),E=null===(N=y)||void 0===N?void 0:N.booking,C=null===(I=y)||void 0===I?void 0:I.postLogin}var H={email:t};u.a.post(L,H).then(function(){var t=p(m().mark((function t(n){var o,i,c,v,_,S,L,N,I,A,P,R,D,M,q;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(200!==n.status){t.next=9;break}return sessionStorage.setItem(a.Fi,JSON.stringify(null==n||null===(o=n.data)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.mariner)),Object(d.sc)(),t.next=5,Object(l.f)();case 5:Object(l.g)(null==n||null===(c=n.data)||void 0===c||null===(v=c.data)||void 0===v||null===(_=v.mariner)||void 0===_?void 0:_.favorites),Object(d.a)(null==n||null===(S=n.data)||void 0===S||null===(L=S.data)||void 0===L||null===(N=L.mariner)||void 0===N||null===(I=N.address)||void 0===I?void 0:I.country),h={marinerNumber:null==n||null===(A=n.data)||void 0===A||null===(P=A.data)||void 0===P||null===(R=P.mariner)||void 0===R?void 0:R.marinerId},u.a.post(x,{marinerId:null==n||null===(D=n.data)||void 0===D||null===(M=D.data)||void 0===M||null===(q=M.mariner)||void 0===q?void 0:q.marinerId}).then((function(t){if(200===t.status){var n,o,i,l,c,v,m,p,w,_,S,L,x,N,I,A,P,R,D,M,q,T,F,U;if(Object(s.e)(sessionStorage.getItem(a.Fi),null,null==t||null===(n=t.data)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.length),sessionStorage.setItem(a.zi,null==t||null===(i=t.data)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.length),1===(null==t||null===(c=t.data)||void 0===c||null===(v=c.data)||void 0===v?void 0:v.length))if(j=!0,b=null==t||null===(S=t.data)||void 0===S||null===(L=S.data[0])||void 0===L?void 0:L.bookingNumber,sessionStorage.setItem(a.wb,'"'.concat(b,'"')),sessionStorage.setItem(a.Gg,JSON.stringify({cruiseCode:null==t||null===(x=t.data)||void 0===x||null===(N=x.data[0])||void 0===N?void 0:N.voyageName})),null!=y&&null!==(I=y)&&void 0!==I&&null!==(A=I.preLogin)&&void 0!==A&&A.includes(a.mf))E=null!==(P=y)&&void 0!==P&&null!==(R=P.preLogin)&&void 0!==R&&R.includes(a.mf)?null===(D=y)||void 0===D?void 0:D.booking:null===(M=y)||void 0===M?void 0:M.postLogin;if((null==t||null===(m=t.data)||void 0===m||null===(p=m.data)||void 0===p?void 0:p.length)>1&&null!=y&&null!==(w=y)&&void 0!==w&&null!==(_=w.preLogin)&&void 0!==_&&_.includes(a.mf))E=null!==(q=y)&&void 0!==q&&null!==(T=q.preLogin)&&void 0!==T&&T.includes(a.mf)?null===(F=y)||void 0===F?void 0:F.booking:null===(U=y)||void 0===U?void 0:U.postLogin;var B=Object(d.O)(y);B&&(E=B),u.a.post(k,h).then((function(t){if(200===t.status){var n,o,i,a,l;if((null==t||null===(n=t.data)||void 0===n||null===(o=n.data)||void 0===o||null===(i=o.futureCruiseCredits)||void 0===i?void 0:i.length)>0)c=null==t||null===(a=t.data)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.futureCruiseCredits,Object(f.a)(c);g(e,j,b,C,E,O,r)}var c})).catch((function(t){g(e,j,b,C,E,O,r)}))}})).catch(p(m().mark((function e(){var t,n,o,i,a;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r&&null!==(t=window)&&void 0!==t&&null!==(n=t.configs)&&void 0!==n&&n.isOwnIdEnabled&&null!==(o=window)&&void 0!==o&&null!==(i=o.configs)&&void 0!==i&&i.ownIdIdentifier)){e.next=11;break}return e.prev=1,e.next=4,Object(d.lb)();case 4:a=e.sent,console.log("Passkey enrollment successful:",a),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("Failed to enroll passkey:",e.t0);case 11:window.location.href=w(E);case 12:case"end":return e.stop()}}),e,null,[[1,8]])}))));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){Object(s.e)(null,n.find(".cmp-form__api-error").text().trim()),n.find(".cmp-form__api-error").show(),n.find(".cmp-form__api-error").text(Object(d.J)(e)),n.find(".cmp-form__error-summary-wrapper").hide()}))}function g(e,t,n,r,o,i,a){return y.apply(this,arguments)}function y(){return(y=p(m().mark((function e(t,n,r,o,i,l,c){var s,f,v,h,b,g,y,_;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=window.configs.country,f=Object(d.C)(),v=s==f?i:Object(d.rc)(i),!n||window.location.href.includes(a.mf)){e.next=7;break}u.a.post(l,{booking:r}).then(function(){var e=p(m().mark((function e(t){var n,r,i,l,u,v;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==t.status){e.next=16;break}if(sessionStorage.removeItem(a.uf),sessionStorage.removeItem(a.vf),u=s==f?o:Object(d.rc)(o),!(c&&null!==(n=window)&&void 0!==n&&null!==(r=n.configs)&&void 0!==r&&r.isOwnIdEnabled&&null!==(i=window)&&void 0!==i&&null!==(l=i.configs)&&void 0!==l&&l.ownIdIdentifier)){e.next=15;break}return e.prev=5,e.next=8,Object(d.lb)();case 8:v=e.sent,console.log("Passkey enrollment successful:",v),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.error("Failed to enroll passkey:",e.t0);case 15:window.location.href=w(u);case 16:case"end":return e.stop()}}),e,null,[[5,12]])})));return function(t){return e.apply(this,arguments)}}()).catch(function(){var e=p(m().mark((function e(t){var n,r,o,i,a;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(c&&null!==(n=window)&&void 0!==n&&null!==(r=n.configs)&&void 0!==r&&r.isOwnIdEnabled&&null!==(o=window)&&void 0!==o&&null!==(i=o.configs)&&void 0!==i&&i.ownIdIdentifier)){e.next=11;break}return e.prev=1,e.next=4,Object(d.lb)();case 4:a=e.sent,console.log("Passkey enrollment successful:",a),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("Failed to enroll passkey:",e.t0);case 11:window.location.href=w(v);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()),e.next=19;break;case 7:if(!(c&&null!==(h=window)&&void 0!==h&&null!==(b=h.configs)&&void 0!==b&&b.isOwnIdEnabled&&null!==(g=window)&&void 0!==g&&null!==(y=g.configs)&&void 0!==y&&y.ownIdIdentifier)){e.next=18;break}return e.prev=8,e.next=11,Object(d.lb)();case 11:_=e.sent,console.log("Passkey enrollment successful:",_),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(8),console.error("Failed to enroll passkey:",e.t0);case 18:window.location.href=w(v);case 19:case"end":return e.stop()}}),e,null,[[8,15]])})))).apply(this,arguments)}function w(e){var t,n,r,o=window.location.href.split("?")[1];return o&&null!==(t=window)&&void 0!==t&&null!==(n=t.location)&&void 0!==n&&null!==(r=n.href)&&void 0!==r&&r.includes("login=sf")&&(e.includes("?")?e+="&"+o:e+="?"+o),e}var _,S=n(29);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */E=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),l=new I(r||[]);return o(a,"_invoke",{value:x(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f="suspendedStart",v="executing",m="completed",h={};function p(){}function b(){}function g(){}var y={};u(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(A([])));_&&_!==n&&r.call(_,a)&&(y=_);var S=g.prototype=p.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,l){var c=d(e[o],e,i);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==L(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,n,r){var o=f;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=C(l,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var u=d(t,n,r);if("normal"===u.type){if(o=r.done?m:"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function k(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,l,"next",e)}function l(e){k(i,r,o,a,l,"throw",e)}a(void 0)}))}}function x(e,t){for(var n=0;n0)!function(e,t,n){var r,o=t.attr("data-api-url"),i=t.attr("data-valiator-api-url"),l={};l={password:n.password},a.xj.test(n.emailAddress)?(l.username=n.emailAddress,r={email:n.emailAddress}):a.xj.test(n.emailAddress)?l.username=n.emailAddress:l.marinerNumber=n.emailAddress,u.a.post(o,l).then((function(o){200===o.status&&null==r&&u.a.post(i,{}).then((function(n){var r,o,i,a,l,c;200===n.status&&(null!=n&&null!==(r=n.data)&&void 0!==r&&null!==(o=r.profile)&&void 0!==o&&null!==(i=o.webUserInfo)&&void 0!==i&&i.username&&b(e,null==n||null===(a=n.data)||void 0===a||null===(l=a.profile)||void 0===l||null===(c=l.webUserInfo)||void 0===c?void 0:c.username,t,!0))})),200===o.status&&void 0!==r&&b(e,n.emailAddress,t,!0)})).catch((function(e){Object(s.e)(null,t.find(".cmp-form__api-error").text().trim()),t.find(".cmp-form__api-error").show(),t.find(".cmp-form__api-error").text(Object(d.J)(e)),t.find(".cmp-form__error-summary-wrapper").hide()}))}(p.el,v,o);else{var C,j,I,A,P,R,D={};if(v.parents(".cmp-login__account").length>0&&(D={password:o.password},a.xj.test(o.emailAddress)?(D.username=o.emailAddress,t={email:o.emailAddress}):a.xj.test(o.emailAddress)?D.username=o.emailAddress:D.marinerNumber=o.emailAddress),v.parents(".cmp-login__booking").length>0&&(D={bookingNumber:o.bookingNumber,firstName:o.firstName,lastName:o.lastName,options:[]},r=o.bookingNumber,D.options[0]={},D.options[0].optionId=o.selectCountry,"MONTH_YEAR_DEPARTURE"==o.selectCountry?D.options[0].value=o.monthOfDepartureOptions+"/"+o.yearOfDepartureOptions:"SHIP_CODE"==o.selectCountry?D.options[0].value=o.shipNameOptions:D.options[0].value=o.embarkationPortOptions),window.location.href.includes(a.mf)&&!sessionStorage.getItem(a.uf))sessionStorage.setItem(a.uf,JSON.stringify(null===(P=window.configs)||void 0===P?void 0:P.redirectUrl[a.of]));if(window.location.href.includes(a.Uh)&&!sessionStorage.getItem(a.uf))sessionStorage.setItem(a.uf,JSON.stringify(null===(R=window.configs)||void 0===R?void 0:R.redirectUrl[a.Vh]));if(sessionStorage.getItem(a.uf)&&(f=JSON.parse(sessionStorage.getItem(a.uf)),g=null==f.booking||window.location.href.includes(a.mf)?f.postLogin:f.booking,k=f.postLogin),!f&&(null!==(C=window.location)&&void 0!==C&&null!==(j=C.href)&&void 0!==j&&j.includes(a.Dh)||null!==(I=window.location)&&void 0!==I&&null!==(A=I.href)&&void 0!==A&&A.includes(a.kh))){var M,q,T,F,U,B,Y,J,G,H,V,K,z,W,Z;if(window.configs.brand===a.Zi||window.configs.brand===a.aj)if(null!==(T=window.location)&&void 0!==T&&null!==(F=T.href)&&void 0!==F&&F.includes(a.Bh)||null!==(U=window.location)&&void 0!==U&&null!==(B=U.href)&&void 0!==B&&B.includes(a.Ch))f=null===(Y=window)||void 0===Y||null===(J=Y.configs)||void 0===J||null===(G=J.redirectUrl)||void 0===G?void 0:G[a.yb];else f=null===(H=window)||void 0===H||null===(V=H.configs)||void 0===V||null===(K=V.redirectUrl)||void 0===K?void 0:K[a.Xe];else f=null===(z=window)||void 0===z||null===(W=z.configs)||void 0===W||null===(Z=W.redirectUrl)||void 0===Z?void 0:Z[a.xb];sessionStorage.setItem(a.uf,JSON.stringify(f)),g=null===(M=f)||void 0===M?void 0:M.booking,k=null===(q=f)||void 0===q?void 0:q.postLogin}Object(S.b)(),Object(S.c)(),u.a.post(m,D).then((function(e){if(200===e.status&&v.parents(".cmp-login__account").length>0&&null==t&&u.a.post(y,{}).then((function(e){var r,o;200===e.status&&(t={email:null===(r=e.data)||void 0===r||null===(o=r.profile)||void 0===o?void 0:o.webUserInfo.username},u.a.post(h,t).then(function(){var e=O(E().mark((function e(t){var r,o,i,v,m;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==t.status){e.next=9;break}return sessionStorage.setItem(a.Fi,JSON.stringify(t.data.data.mariner)),Object(d.sc)(),e.next=5,Object(l.f)();case 5:Object(l.g)(null==t||null===(r=t.data)||void 0===r||null===(o=r.data)||void 0===o||null===(i=o.mariner)||void 0===i?void 0:i.favorites),Object(d.a)(null===(v=t.data.data.mariner.address)||void 0===v?void 0:v.country),n={marinerNumber:t.data.data.mariner.marinerId},u.a.post(L,{marinerId:null===(m=t.data)||void 0===m?void 0:m.data.mariner.marinerId}).then((function(e){if(200===e.status){var t,r,o,i,l,v;if(Object(s.e)(sessionStorage.getItem(a.Fi),null,e.data.data.length),sessionStorage.setItem(a.yi,JSON.stringify(e.data.data)),sessionStorage.setItem(a.zi,e.data.data.length),1===e.data.data.length){var m,h,b,y,S,L,E,O,C,j,I,A,P;if(x=!0,c=e.data.data[0].bookingNumber,sessionStorage.setItem(a.wb,'"'.concat(c,'"')),sessionStorage.setItem(a.Gg,JSON.stringify({cruiseCode:null===(m=e.data.data[0])||void 0===m?void 0:m.voyageName})),null!=f&&null!==(h=f)&&void 0!==h&&null!==(b=h.preLogin)&&void 0!==b&&b.includes(a.mf))g=null!==(L=f)&&void 0!==L&&null!==(E=L.preLogin)&&void 0!==E&&E.includes(a.mf)?null===(O=f)||void 0===O?void 0:O.booking:null===(C=f)||void 0===C?void 0:C.postLogin;if(null!=f&&null!==(y=f)&&void 0!==y&&null!==(S=y.preLogin)&&void 0!==S&&S.includes(a.Uh))g=null!==(j=f)&&void 0!==j&&null!==(I=j.preLogin)&&void 0!==I&&I.includes(a.Uh)?null===(A=f)||void 0===A?void 0:A.booking:null===(P=f)||void 0===P?void 0:P.postLogin}if(e.data.data.length>1&&null!=f&&null!==(t=f)&&void 0!==t&&null!==(r=t.preLogin)&&void 0!==r&&r.includes(a.mf))g=null!==(o=f)&&void 0!==o&&null!==(i=o.preLogin)&&void 0!==i&&i.includes(a.mf)?null===(l=f)||void 0===l?void 0:l.booking:null===(v=f)||void 0===v?void 0:v.postLogin;var R=Object(d.O)(f);R&&(g=R),u.a.post(w,n).then((function(e){if(200===e.status){var t,n,r;if((null===(t=e.data.data)||void 0===t||null===(n=t.futureCruiseCredits)||void 0===n?void 0:n.length)>0)N(null===(r=e.data.data)||void 0===r?void 0:r.futureCruiseCredits);p.primaryItem(x,c,k,g,_)}})).catch((function(){p.primaryItem(x,c,k,g,_)}))}})).catch((function(){window.location.href=p.updateQueryParam(g)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){Object(s.e)(null,v.find(".cmp-form__api-error").text().trim()),v.find(".cmp-form__api-error").show(),v.find(".cmp-form__api-error").text(Object(d.J)(e)),v.find(".cmp-form__error-summary-wrapper").hide()})))})),200===e.status&&v.parents(".cmp-login__account").length>0&&void 0!==t&&u.a.post(h,t).then(function(){var e=O(E().mark((function e(t){var r,o,i,v,m,h;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(200!==t.status){e.next=9;break}return sessionStorage.setItem(a.Fi,JSON.stringify(t.data.data.mariner)),Object(d.sc)(),e.next=5,Object(l.f)();case 5:Object(l.g)(null==t||null===(r=t.data)||void 0===r||null===(o=r.data)||void 0===o||null===(i=o.mariner)||void 0===i?void 0:i.favorites),Object(d.a)(null===(v=t.data.data.mariner.address)||void 0===v?void 0:v.country),n={marinerNumber:null===(m=t.data)||void 0===m?void 0:m.data.mariner.marinerId},u.a.post(L,{marinerId:null===(h=t.data)||void 0===h?void 0:h.data.mariner.marinerId}).then((function(e){if(200===e.status){var t,r,o,i,l,d;if(Object(s.e)(sessionStorage.getItem(a.Fi),null,e.data.data.length),sessionStorage.setItem(a.zi,e.data.data.length),1===e.data.data.length){var v,m,h,b,y,S,L,E,O,C,j,I,A;if(x=!0,c=e.data.data[0].bookingNumber,sessionStorage.setItem(a.wb,'"'.concat(c,'"')),sessionStorage.setItem(a.Gg,JSON.stringify({cruiseCode:null===(v=e.data.data[0])||void 0===v?void 0:v.voyageName})),null!=f&&null!==(m=f)&&void 0!==m&&null!==(h=m.preLogin)&&void 0!==h&&h.includes(a.mf))g=null!==(S=f)&&void 0!==S&&null!==(L=S.preLogin)&&void 0!==L&&L.includes(a.mf)?null===(E=f)||void 0===E?void 0:E.booking:null===(O=f)||void 0===O?void 0:O.postLogin;if(null!=f&&null!==(b=f)&&void 0!==b&&null!==(y=b.preLogin)&&void 0!==y&&y.includes(a.Uh))g=null!==(C=f)&&void 0!==C&&null!==(j=C.preLogin)&&void 0!==j&&j.includes(a.Uh)?null===(I=f)||void 0===I?void 0:I.booking:null===(A=f)||void 0===A?void 0:A.postLogin}if(e.data.data.length>1&&null!=f&&null!==(t=f)&&void 0!==t&&null!==(r=t.preLogin)&&void 0!==r&&r.includes(a.mf))g=null!==(o=f)&&void 0!==o&&null!==(i=o.preLogin)&&void 0!==i&&i.includes(a.mf)?null===(l=f)||void 0===l?void 0:l.booking:null===(d=f)||void 0===d?void 0:d.postLogin;u.a.post(w,n).then((function(e){if(200===e.status){var t,n,r;if((null===(t=e.data.data)||void 0===t||null===(n=t.futureCruiseCredits)||void 0===n?void 0:n.length)>0)N(null===(r=e.data.data)||void 0===r?void 0:r.futureCruiseCredits);p.primaryItem(x,c,k,g,_)}})).catch((function(e){p.primaryItem(x,c,k,g,_)}))}})).catch((function(){window.location.href=p.updateQueryParam(g)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){Object(s.e)(null,v.find(".cmp-form__api-error").text().trim()),v.find(".cmp-form__api-error").show(),v.find(".cmp-form__api-error").text(Object(d.J)(e)),v.find(".cmp-form__error-summary-wrapper").hide()})),200===e.status&&v.parents(".cmp-login__booking").length>0){o.lastName;u.a.post("/api/sso/v1/validator",{}).then((function(e){if(200===e.status){var t,n,i,l,c,m=null==e||null===(t=e.data)||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.polarBookings,h=null==e||null===(i=e.data)||void 0===i||null===(l=i.profile)||void 0===l?void 0:l.siebelBookings,b=null!==m?m[0].bookingHeader:h[0],g="DIRECT"===(null==b?void 0:b.agencyId)||"DIRECT"===(null==b?void 0:b.bookingAgentId),y=null==b||null===(c=b.guests)||void 0===c?void 0:c.filter((function(e){var t,n;return(null==e||null===(t=e.firstName)||void 0===t?void 0:t.toLowerCase())===(null==o||null===(n=o.firstName)||void 0===n?void 0:n.toLowerCase())}));if(null!=b&&b.bookingNumber){var w,S,L={firstName:(null==b?void 0:b.firstName)||(null===(w=y[0])||void 0===w?void 0:w.firstName),lastName:(null==b?void 0:b.lastName)||(null===(S=y[0])||void 0===S?void 0:S.lastName),upcomingCruises:[{bookingNumber:null==b?void 0:b.bookingNumber,directBooking:g,voyageName:(null==b?void 0:b.voyage)||(null==b?void 0:b.voyageNumber)}]};sessionStorage.setItem(a.Ci,JSON.stringify(L));var E=null==b?void 0:b.bookingNumber;sessionStorage.setItem(a.wb,'"'.concat(E,'"')),sessionStorage.setItem(a.Gg,JSON.stringify({cruiseCode:(null==b?void 0:b.voyage)||(null==b?void 0:b.voyageNumber)}))}u.a.post(_,{booking:r}).then((function(e){if(200===e.status){var t=window.configs.country,n=Object(d.C)();if(null!=f){var r,o;null!==(r=f)&&void 0!==r&&null!==(o=r.postLogin)&&void 0!==o&&o.includes("olci")&&(f.postLogin=f.postLogin.replace("#","?token=".concat(sessionStorage.getItem(a.M),"#")));var i=t==n?f.postLogin:Object(d.rc)(f.postLogin);window.location.href=p.updateQueryParam(i)}else{var l=t==n?k:Object(d.rc)(k);window.location.href=p.updateQueryParam(l)}}})).catch((function(e){Object(s.e)(null,v.find(".cmp-form__api-error").text().trim()),v.find(".cmp-form__api-error").show(),v.find(".cmp-form__api-error").text(Object(d.J)(e)),v.find(".cmp-form__error-summary-wrapper").hide()}))}})).catch((function(e){Object(s.e)(null,v.find(".cmp-form__api-error").text().trim()),v.find(".cmp-form__api-error").show(),v.find(".cmp-form__api-error").text(Object(d.J)(e)),v.find(".cmp-form__error-summary-wrapper").hide()}))}})).catch((function(e){Object(s.e)(null,v.find(".cmp-form__api-error").text().trim()),v.find(".cmp-form__api-error").show(),v.find(".cmp-form__api-error").text(Object(d.J)(e)),v.find(".cmp-form__error-summary-wrapper").hide()}))}}else v.find(".cmp-form__error-summary-wrapper p").show(),Object(s.f)(v.find(".cmp-form__error-summary-wrapper p").text()),v.find("input.cmp-form-text__text.error")[0].focus()}))})),C(this,"primaryItem",(function(e,t,n,r,i){var l=window.configs.country,c=Object(d.C)();if(e&&!window.location.href.includes(a.mf))u.a.post(i,{booking:t}).then((function(e){if(200===e.status){sessionStorage.removeItem(a.uf),sessionStorage.removeItem(a.vf);var t=l==c?n:Object(d.rc)(n);window.location.href=p.updateQueryParam(t)}})).catch((function(){o()(p.el).find(".cmp-login-booking__api-error").show()})),Object(s.e)(null,o()(p.el).find(".cmp-login-booking__api-error").text().trim());else{var f=l==c?r:Object(d.rc)(r);window.location.href=p.updateQueryParam(f)}})),C(this,"showQuestion",(function(e){o()(p.el).find(".cmp-form__EMBARK_PORT_CODE").hide(),o()(p.el).find(".cmp-form__SHIP_CODE").hide(),o()(p.el).find(".cmp-form__MONTH_YEAR_DEPARTURE").hide();var t=o()(e.currentTarget).find(":selected").attr("data-target");o()(p.el).find("."+t).show(),o()(p.el).find("."+t+" select").attr("required","true"),o()(p.el).find("."+t+" select").each((function(e,t){o()(t).rules("add",{required:!0})}))})),C(this,"showInitalform",(function(e){window.matchMedia("(min-width: 481px)").matches?"myacc"===location.search.split("=")[1]?o()(e).addClass("cmp-login--myacc"):o()(e).addClass("cmp-login--sf"):o()(e).addClass("disp-mobile"),o()(e).removeClass("show-loader")})),C(this,"redirectUser",(function(e){var t,n,r,i,l,c,u,s,f,v,m,h=null===(t=o()(e).find(".cmp-login__account"))||void 0===t?void 0:t[0],b=o()(h).find(".cmp-form"),g=b.attr("data-target-page"),y=b.attr("data-target-secondary-login"),w=b.attr("data-api-primaryitem-url"),_=window.location.href;_.includes(a.Uh)&&!sessionStorage.getItem(a.uf)&&sessionStorage.setItem(a.uf,JSON.stringify(null===(l=window.configs)||void 0===l||null===(c=l.redirectUrl)||void 0===c?void 0:c[a.Vh]));_.includes(a.mf)&&!sessionStorage.getItem(a.uf)&&sessionStorage.setItem(a.uf,JSON.stringify(null===(u=window.configs)||void 0===u?void 0:u.redirectUrl[a.of]));if(sessionStorage.getItem(a.uf)&&(g=null==(i=JSON.parse(sessionStorage.getItem(a.uf))).booking||_.includes(a.mf)?i.postLogin:i.booking,y=i.postLogin),!i&&(null!=_&&_.includes(a.Dh)||null!=_&&_.includes(a.kh))){var S,L,E,k,O,x,C,j,N,I,A;if(window.configs.brand===a.Zi||window.configs.brand===a.aj)if(null!=_&&_.includes(a.Bh)||null!=_&&_.includes(a.Ch))i=null===(N=window)||void 0===N||null===(I=N.configs)||void 0===I||null===(A=I.redirectUrl)||void 0===A?void 0:A[a.yb];else i=null===(x=window)||void 0===x||null===(C=x.configs)||void 0===C||null===(j=C.redirectUrl)||void 0===j?void 0:j[a.Xe];else i=null===(S=window)||void 0===S||null===(L=S.configs)||void 0===L||null===(E=L.redirectUrl)||void 0===E?void 0:E[a.xb];sessionStorage.setItem(a.uf,JSON.stringify(i)),g=null===(k=i)||void 0===k?void 0:k.booking,y=null===(O=i)||void 0===O?void 0:O.postLogin}null!=i&&null!==(n=i)&&void 0!==n&&null!==(r=n.preLogin)&&void 0!==r&&r.includes(a.mf)&&(g=null!==(s=i)&&void 0!==s&&null!==(f=s.preLogin)&&void 0!==f&&f.includes(a.mf)?null===(v=i)||void 0===v?void 0:v.booking:null===(m=i)||void 0===m?void 0:m.postLogin);if(null!=i){var P,R,D=window.configs.country,M=Object(d.C)();null!==(P=i)&&void 0!==P&&null!==(R=P.postLogin)&&void 0!==R&&R.includes("olci")&&(i.postLogin=i.postLogin.replace("#","?token=".concat(sessionStorage.getItem(a.M),"#")));try{var q=D==M?i.postLogin:Object(d.rc)(i.postLogin);p.primaryItem(!1,void 0,q,g,w)}catch(e){}}else try{var T=window.configs.country==Object(d.C)()?y:Object(d.rc)(y);p.primaryItem(!1,void 0,T,g,w)}catch(e){}})),C(this,"redirectToSF",(function(){"type=".concat(Object(d.db)(a.Ah))&&(window.location.href=p.updateQueryParam(a.zh))})),C(this,"showLogin",(function(){o()(p.el).addClass("cmp-login--show"),o()(p.el).find(".cmp-login__account").show()})),C(this,"showAccount",(function(){o()(p.el).addClass("cmp-login--show"),"myacc"===location.search.split("=")[1]?o()(p.el).find(".cmp-login__register").show():o()(p.el).find(".cmp-login__booking").show()})),this.el=t;var g=null===(n=window)||void 0===n||null===(r=n.location)||void 0===r||null===(c=r.href)||void 0===c||null===(f=c.split("?"))||void 0===f?void 0:f[1],y=null===(v=window)||void 0===v||null===(m=v.location)||void 0===m||null===(h=m.href)||void 0===h?void 0:h.includes(a.Dh);if(Object(d.nb)()&&g&&y&&null!=g&&g.includes("type="))this.redirectToSF();else if(Object(d.vb)())this.redirectUser(t);else{var w,_,L,k;if(this.showInitalform(t),document.addEventListener("DOMContentLoaded",this.onDOMContentReady(t)),(null===(w=window)||void 0===w||null===(_=w.ownid)||void 0===_?void 0:_.length)>0&&null!==(L=window)&&void 0!==L&&null!==(k=L.configs)&&void 0!==k&&k.isOwnIdEnabled){var x;Object(d.Nb)(),this.ownIdLogin(t);var j=new MutationObserver((function(e){var n,r,i;(null===(n=o()("ownid-fingerprint-button-widget"))||void 0===n?void 0:n.width())>0&&(o()(t).find(".password--label").css("margin-left","".concat(Math.floor(null===(r=o()("ownid-fingerprint-button-widget"))||void 0===r?void 0:r.width())+10,"px")),o()(t).find(".password").children(".error").css("margin-left","".concat(Math.floor(null===(i=o()("ownid-fingerprint-button-widget"))||void 0===i?void 0:i.width())+10,"px")))})),I=null===(x=document.getElementsByClassName("password"))||void 0===x?void 0:x[0];j.observe(I,{childList:!0,subtree:!0,attributes:!0})}o()(t).find(".cmp-login__mobile-account a").on("click",(function(){return p.showAccount()})),o()(t).find(".cmp-login__mobile-login a").on("click",(function(e,t){return p.showLogin(e,t)})),o()(t).find(".cmp-login__back a").on("click",(function(e,t){return p.backToLogin(e,t)})),o()(t).find(".cmp-login__booking .cmp-form__question select").on("change",(function(e){return p.showQuestion(e)})),o()(t).find(".cmp-login__booking input").on("change",(function(e){e.currentTarget.value=e.currentTarget.value.trim()})),"myacc"===location.search.split("=")[1]?o()(t).find(".cmp-login__mobile-account").find("a").text(o()(t).find(".cmp-login__mobile-account").attr("data-register-text")):o()(t).find(".cmp-login__mobile-account").find("a").text(o()(t).find(".cmp-login__mobile-account").attr("data-login-text")),o()(t).find(".cmp-login__account").each((function(e,t){p.formSubmit(t)})),o()(t).find(".cmp-login__booking").each((function(e,t){p.formSubmit(t)}))}}var t,n,r;return t=e,(n=[{key:"onDOMContentReady",value:function(e){var t;null===(t=o()(e).find('.cmp-form-button[name="login"]'))||void 0===t||t.attr("disabled",!1)}},{key:"updateQueryParam",value:function(e){var t,n,r,o=window.location.href.split("?")[1];return o&&null!==(t=window)&&void 0!==t&&null!==(n=t.location)&&void 0!==n&&null!==(r=n.href)&&void 0!==r&&r.includes("login=sf")&&(e.includes("?")?e+="&"+o:e+="?"+o),e}},{key:"backToLogin",value:function(){o()(this.el).removeClass("cmp-login--show"),o()(this.el).find(".cmp-login__booking").hide(),o()(this.el).find(".cmp-login__register").hide(),o()(this.el).find(".cmp-login__account").hide()}},{key:"ownIdLogin",value:function(e){var t,n,r,i,a,l=Object(d.bb)(),c=null===(t=o()(e).find(".cmp-login__account"))||void 0===t?void 0:t[0],f=o()(c).find(".cmp-form");(null===(n=window)||void 0===n||null===(r=n.ownid)||void 0===r?void 0:r.length)>0&&null!==(i=window)&&void 0!==i&&null!==(a=i.configs)&&void 0!==a&&a.isOwnIdEnabled&&ownid("login",{loginIdField:document.getElementById("form-text-email"),passwordField:document.getElementById("form-text-password"),requireLoginIdInput:!0,onError:function(e){f.find(".cmp-form__api-error").show(),f.find(".cmp-form__api-error").text(e),f.find(".cmp-form__error-summary-wrapper").hide()},onLogin:function(t){var n;u.a.get(l,{headers:{id:null==t?void 0:t.jwtId,app:"ownId",token:null==t?void 0:t.token,brand:null===(n=Object(d.s)())||void 0===n?void 0:n.toUpperCase(),clientid:"WEB"}}).then((function(t){var n,r,o,i,a,l,c,u;null!=t&&null!==(n=t.data)&&void 0!==n&&null!==(r=n.data)&&void 0!==r&&null!==(o=r.profile)&&void 0!==o&&null!==(i=o.webUserInfo)&&void 0!==i&&i.username&&b(e,null==t||null===(a=t.data)||void 0===a||null===(l=a.data)||void 0===l||null===(c=l.profile)||void 0===c||null===(u=c.webUserInfo)||void 0===u?void 0:u.username,f,!1)})).catch((function(e){Object(s.e)(null,f.find(".cmp-form__api-error").text().trim()),f.find(".cmp-form__api-error").show(),f.find(".cmp-form__api-error").text(Object(d.J)(e)),f.find(".cmp-form__error-summary-wrapper").hide()}))},onLoginIdError:function(){return o()(e).find(".cmp-form-text__text").first().valid(),o()(e).find(".cmp-form-text__text").first().focus(),{hideTooltip:!0}}})}}])&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();null===(_=o.a.validator)||void 0===_||_.addMethod("inValidBooking",(function(e,t){return a.vj.test(e)}),o.a.validator.messages.inValidInput)},70:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(0);var r=n(5),o=n.n(r),i=n(3),a=n(17),l=n(60),c=n(1);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),l=new I(r||[]);return o(a,"_invoke",{value:x(e,n,l)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",h="executing",p="completed",b={};function g(){}function y(){}function w(){}var _={};d(_,a,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(A([])));L&&L!==n&&r.call(L,a)&&(_=L);var E=w.prototype=g.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,l){var c=v(e[o],e,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==u(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function x(t,n,r){var o=m;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=C(l,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var u=v(t,n,r);if("normal"===u.type){if(o=r.done?p:"suspendedYield",u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=p,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var i=v(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}var f=function(){var e,t=(e=s().mark((function e(t,n,r,u,d,f){var v,m,h,p,b,g,y,w,_,S,L,E,k,O,x,C,j,N,I,A,P,R,D,M,q,T;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=Object(i.bb)(),e.prev=1,e.next=4,o.a.get(v,{headers:{id:null==t?void 0:t.jwtId,app:"ownId",token:null==t?void 0:t.token,brand:null===(m=Object(i.s)())||void 0===m?void 0:m.toUpperCase(),clientid:"WEB"}});case 4:if(y=e.sent,w={email:null==y||null===(h=y.data)||void 0===h||null===(p=h.data)||void 0===p||null===(b=p.profile)||void 0===b||null===(g=b.webUserInfo)||void 0===g?void 0:g.username},c.xj.test(w.email)){e.next=12;break}return e.next=10,o.a.post(Object(i.x)(d),{});case 10:(_=e.sent)&&200===_.status&&(w.email=null===(S=_.data)||void 0===S||null===(L=S.profile)||void 0===L?void 0:L.webUserInfo.username);case 12:return e.next=14,o.a.post(Object(i.x)(u),w);case 14:if(!(E=e.sent)||200!==E.status){e.next=36;break}return sessionStorage.setItem(c.Fi,JSON.stringify(null==E||null===(k=E.data)||void 0===k||null===(O=k.data)||void 0===O?void 0:O.mariner)),Object(i.Ub)(null===(x=E.data)||void 0===x||null===(C=x.data)||void 0===C||null===(j=C.mariner)||void 0===j||null===(N=j.address)||void 0===N?void 0:N.country),Object(i.sc)(),e.next=21,Object(a.f)();case 21:if(sessionStorage.removeItem(c.h),Object(a.g)(null==E||null===(I=E.data)||void 0===I||null===(A=I.data)||void 0===A||null===(P=A.mariner)||void 0===P?void 0:P.favorites),Object(i.a)(null===(R=E.data.data.mariner.address)||void 0===R?void 0:R.country),!f){e.next=35;break}return e.prev=25,e.next=28,o.a.post(Object(i.x)(f),{marinerNumber:E.data.data.mariner.marinerId});case 28:(q=e.sent)&&200===q.status&&(null===(D=q.data.data)||void 0===D||null===(M=D.futureCruiseCredits)||void 0===M?void 0:M.length)>0&&Object(l.SetFccSession)(null===(T=q.data.data)||void 0===T?void 0:T.futureCruiseCredits),e.next=35;break;case 32:e.prev=32,e.t0=e.catch(25),console.error("FCC API failed:",e.t0);case 35:n();case 36:e.next=42;break;case 38:e.prev=38,e.t1=e.catch(1),console.error("Error during OwnID login:",e.t1),r&&r(e.t1);case 42:case"end":return e.stop()}}),e,null,[[1,38],[25,32]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))});return function(e,n,r,o,i,a){return t.apply(this,arguments)}}()},72:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=function(){return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"37",height:"4",viewBox:"0 0 37 4",fill:"none","aria-label":"mobile close icon"},o.a.createElement("path",{d:"M2.5 2H34.5",stroke:"#9A9FA5","stroke-width":"4","stroke-linecap":"round"}))},a=n(97),l=n(12),c=n(1);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&y(t)}},k=function(e){S(!1),p(0),g<5?y(0):n(e)};if(Object(r.useEffect)((function(){return document.body.style.overflow=t?"hidden":"unset",Object(l.a)(".custom-popup-container").then((function(){if(null!=f&&f.current){var e,t=null==f||null===(e=f.current)||void 0===e?void 0:e.querySelector(".popup-close");null==t||t.focus(),function(e){if(e){var t=e.querySelectorAll(v)[0],n=e.querySelectorAll(v),r=n[n.length-1];e.querySelector(".first-dummy-element")||(e.insertAdjacentHTML("afterbegin",'
'),e.insertAdjacentHTML("beforeend",'
')),document.querySelector("body").addEventListener("focus",(function(e){e.preventDefault(),"last-dummy-element"===document.activeElement.classList.value&&t.focus(),"first-dummy-element"===document.activeElement.classList.value&&r.focus()}),!0)}}(f.current)}})),S(!1),p(0),y(0),function(){document.body.style.overflow="unset"}}),[t]),!t)return null;return o.a.createElement("div",{className:"custom-popup-overlay",onClick:n,onKeyDown:function(e){return function(e){e.keyCode===c.Aj&&(e.preventDefault(),n())}(e)}},o.a.createElement("div",{className:"custom-popup-container",onClick:function(e){return e.stopPropagation()},ref:f,tabIndex:"-1",role:"dialog","aria-modal":"true","aria-labelledby":"dialog1_label","aria-label":(null==d?void 0:d.replace(/<\/?[^>]+(>|$)/g,""))||"custom popup"},o.a.createElement("div",{className:"popup-header"},o.a.createElement(a.a,{onClose:n}),o.a.createElement("div",{className:"popup-title",id:"dialog1_label"},o.a.createElement("span",{dangerouslySetInnerHTML:{__html:d}}))),o.a.createElement("div",{className:"popup-mobile-header"},o.a.createElement("div",{role:"button",tabIndex:"0",className:"popup-mobile-close",onClick:n,onKeyDown:function(e){e.keyCode!==c.yj&&e.keyCode!==c.Bk||(e.preventDefault(),n())},onMouseDown:L,onMouseMove:E,onMouseUp:k,onTouchStart:L,onTouchMove:E,onTouchEnd:k,"aria-label":"Close"},o.a.createElement(i,null)),o.a.createElement("div",{className:"popup-mobile-title"},o.a.createElement("span",{dangerouslySetInnerHTML:{__html:d}}))),o.a.createElement("div",{className:"custom-popup-body",id:"custom-popup-body"},s)))};t.a=o.a.memo(d)},73:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return"accordion-".concat(Math.random().toString(36).substr(2,9),"-").concat(Date.now())}},75:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(72),a=function(e){var t=e.label,n=e.amount;return o.a.createElement("div",{className:"breakdown-item"},o.a.createElement("span",{className:"breakdown-item-label"},t),o.a.createElement("span",{className:"breakdown-item-amount"},n))};t.a=function(e){var t,n,r,l,c,u,s=e.isModalOpen,d=e.handleModal,f=e.modelData,v=e.pricingData,m=e.isRcfe,h=f.modalTitle,p=void 0===h?"":h,b=f.modalDescription,g=void 0===b?"":b,y=f.cruiseFareLabel,w=void 0===y?"":y,_=f.taxesAndFeesLabel,S=void 0===_?"":_,L=f.totalFareLabel,E=void 0===L?"":L,k=f.rcfeLabel,O=void 0===k?"":k,x=f.transferLabel,C=void 0===x?"":x,j=(null===(t=window)||void 0===t||null===(n=t.configs)||void 0===n||null===(r=n.countriesWithCurrency)||void 0===r||null===(l=r[null===(c=window)||void 0===c||null===(u=c.configs)||void 0===u?void 0:u.country])||void 0===l?void 0:l.currencySymbol)||"$",N=v.cruiseFare,I=v.taxesAndFees,A=v.totalFare,P=v.rcfe,R=v.transfer;return o.a.createElement("div",{className:"all-taxes-and-fees-included-model-container"},o.a.createElement(i.a,{isOpen:s,onClose:d,title:p},o.a.createElement("section",{className:"modal-description"},o.a.createElement("span",{className:"modal-description-label",dangerouslySetInnerHTML:{__html:g}})),o.a.createElement("section",{className:"amount-breakdown"},o.a.createElement(a,{label:w,amount:"".concat(j).concat(null==N?void 0:N.toLocaleString())}),""!=C&&R?o.a.createElement(a,{label:C,amount:"".concat(j).concat(null==R?void 0:R.toLocaleString())}):null,m&&O&&P?o.a.createElement(a,{label:O,amount:"".concat(j).concat(null==P?void 0:P.toLocaleString())}):null,o.a.createElement(a,{label:S,amount:"".concat(j).concat(null==I?void 0:I.toLocaleString())}),o.a.createElement("div",{className:"divider"}),o.a.createElement(a,{label:E,amount:"".concat(j).concat(null==A?void 0:A.toLocaleString())}))))}},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),o=n.n(r),i=n(1);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0?((a=JSON.parse(c)).length>i.wg&&a.shift(),window.location.href!=a[a.length-1].searchUrl&&a.push({searchUrl:n,filterList:l})):a.push({searchUrl:n,filterList:l}),localStorage.setItem(i.vg,JSON.stringify(a)),sessionStorage.setItem(i.ph,JSON.stringify(l)),r.setState({isShowMore:!1})}})),v(d(r),"getRecentSearch",(function(){if(localStorage.getItem(i.vg)){var e=JSON.parse(localStorage.getItem(i.vg));e=e.reverse();var t="";t=window.matchMedia("(max-width: 1024px)").matches&&window.matchMedia("(min-width: 768px)").matches?e.slice(0,i.yg):e.slice(0,i.xg),r.setState({recentSearch:t,totalResult:e.length,totalRecentSearch:e})}})),v(d(r),"showRecentSearch",(function(){r.setState({isRecentSearchOpen:!r.state.isRecentSearchOpen})})),v(d(r),"getFilterist",(function(e){return Object.keys(e.filterList).map((function(t,n){switch(t){case"duration":var i,a;return o.a.createElement("div",{className:"cmp-recent-search__primary-filter",key:n},o.a.createElement("div",{className:"cmp-recent-search__primary-filter-key"},null===(i=r.props.recentSearchLabel)||void 0===i?void 0:i.duration," :"),o.a.createElement("div",{className:"cmp-recent-search__primary-filter-value"},e.filterList.duration&&e.filterList.duration.length>1?o.a.createElement("div",null,e.filterList.duration[0]," ",o.a.createElement("div",{className:"cmp-recent-search__more-label"}," + ",e.filterList.duration.length-1," "," "," ",null===(a=r.props.recentSearchLabel)||void 0===a?void 0:a.moreLabel," ")," "):e.filterList.duration[0]));case"departure":var l,c;return o.a.createElement("div",{className:"cmp-recent-search__primary-filter",key:n},o.a.createElement("div",{className:"cmp-recent-search__primary-filter-key"},null===(l=r.props.recentSearchLabel)||void 0===l?void 0:l.departure," :"),o.a.createElement("div",{className:"cmp-recent-search__primary-filter-value"},e.filterList.departure&&e.filterList.departure.length>1?o.a.createElement("div",null,e.filterList.departure[0]," ",o.a.createElement("div",{className:"cmp-recent-search__more-label"}," + ",e.filterList.departure.length-1," "," "," ",null===(c=r.props.recentSearchLabel)||void 0===c?void 0:c.moreLabel," ")," "):e.filterList.departure[0]));case"departDate":var u,s;return o.a.createElement("div",{className:"cmp-recent-search__primary-filter",key:n},o.a.createElement("div",{className:"cmp-recent-search__primary-filter-key"},null===(u=r.props.recentSearchLabel)||void 0===u?void 0:u.departDate," :"),o.a.createElement("div",{className:"cmp-recent-search__primary-filter-value"},e.filterList.departDate&&e.filterList.departDate.length>1?o.a.createElement("div",null,e.filterList.departDate[0]," ",o.a.createElement("div",{className:"cmp-recent-search__more-label"}," + ",e.filterList.departDate.length-1," "," "," ",null===(s=r.props.recentSearchLabel)||void 0===s?void 0:s.moreLabel," ")," "):e.filterList.departDate[0]));case"ships":var d,f;return o.a.createElement("div",{className:"cmp-recent-search__primary-filter",key:n},o.a.createElement("div",{className:"cmp-recent-search__primary-filter-key"},null===(d=r.props.recentSearchLabel)||void 0===d?void 0:d.ships," :"),o.a.createElement("div",{className:"cmp-recent-search__primary-filter-value"},e.filterList.ships&&e.filterList.ships.length>1?o.a.createElement("div",null,e.filterList.ships[0]," ",o.a.createElement("div",{className:"cmp-recent-search__more-label"}," + ",e.filterList.ships.length-1," "," "," ",null===(f=r.props.recentSearchLabel)||void 0===f?void 0:f.moreLabel," ")," "):e.filterList.ships[0]))}}))})),v(d(r),"clearRecentSearch",(function(){var e;localStorage.removeItem(i.vg),r.setState({recentSearch:[],totalResult:0,totalRecentSearch:[]}),null===(e=r.props)||void 0===e||e.updateRecentSearchCount()})),v(d(r),"getDestination",(function(e,t){var n,i="";if(null!=e&&null!==(n=e.filterList)&&void 0!==n&&n.hasOwnProperty("destinations")){var a,l,c;i=e.filterList.destinations.length>1?o.a.createElement("div",null,e.filterList.destinations[0]+" "," ",null===(a=r.props.recentSearchLabel)||void 0===a?void 0:a.cruisesLabel,o.a.createElement("div",{className:"cmp-recent-search__more-label"}," + ",e.filterList.destinations.length-1," "," "," ",null===(l=r.props.recentSearchLabel)||void 0===l?void 0:l.moreLabel," ")," "):o.a.createElement("div",null,e.filterList.destinations[0]," "," "," ",null===(c=r.props.recentSearchLabel)||void 0===c?void 0:c.cruisesLabel)}else{var u,s=t+1;i=(null===(u=r.props.recentSearchLabel)||void 0===u?void 0:u.destinations)+" "+s}return i})),v(d(r),"closeRecentSearch",(function(){r.setState({isRecentSearchOpen:!1})})),v(d(r),"showMoreRecentSearch",(function(){var e="";e=r.state.isShowMore?window.matchMedia("(max-width: 1024px)").matches&&window.matchMedia("(min-width: 768px)").matches?r.state.totalRecentSearch.slice(0,i.yg):r.state.totalRecentSearch.slice(0,i.xg):r.state.totalRecentSearch.slice(-9),r.setState({recentSearch:e,isShowMore:!r.state.isShowMore}),document.querySelector(".cmp-recent-search__card a").focus()})),v(d(r),"getCountWithLabel",(function(){var e,t,n,o,i,a,l,c;return window.matchMedia("(max-width: 1024px)").matches?null!==(o=r.props)&&void 0!==o&&null!==(i=o.recentSearchLabel)&&void 0!==i&&i.buttonLabel?null===(a=r.props)||void 0===a||null===(l=a.recentSearchLabel)||void 0===l||null===(c=l.buttonLabel)||void 0===c?void 0:c.replace("{count}",r.state.totalRecentSearch.length):void 0:null===(e=r.props)||void 0===e||null===(t=e.recentSearchLabel)||void 0===t||null===(n=t.recentSearchLabel)||void 0===n?void 0:n.replace("{count}",r.state.totalRecentSearch.length)})),v(d(r),"moveTabFocus",(function(e){e.keyCode===i.Gk&&(document.querySelector(".cmp-recent-search__container .first-dummy-element").setAttribute("tabIndex","0"),document.querySelector(".cmp-recent-search__container .first-dummy-element").focus(),document.querySelector(".cmp-recent-search__container .first-dummy-element").setAttribute("tabIndex","-1"))})),r.state={recentSearch:[],isRecentSearchOpen:!1,totalResult:0,totalRecentSearch:[],isShowMore:!1,viewCruiseAriaLabel:"",showMoreCount:0},document.addEventListener("click",r.closeDropDownClickOutside,!0),r}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.getRecentSearch(),window.matchMedia("(max-width: 1024px)").matches&&window.matchMedia("(min-width: 768px)").matches?this.setState({showMoreCount:i.yg}):this.setState({showMoreCount:i.xg})}},{key:"viewSearchRedirection",value:function(e){var t=[],n="";this.state.totalRecentSearch.map((function(r){r.searchUrl==e.target.getAttribute("href")?n=r:t.push(r)})),t.push(n),localStorage.setItem(i.vg,JSON.stringify(t))}},{key:"render",value:function(){var e,t,n,r,i,a,l,c,u=this;return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"cmp-recent-search ".concat(this.state.isRecentSearchOpen?"open":"")},o.a.createElement("div",{className:"cmp-recent-search__mobile-search"},this.getCountWithLabel()?o.a.createElement("button",{tabIndex:"0",className:"cmp-recent-search__mobile-accordion","data-automation-id":this.props.automationID+"-recentSearch",onClick:function(){return u.showRecentSearch()}},this.getCountWithLabel()):""),o.a.createElement("div",{className:"cmp-recent-search__container"},o.a.createElement("div",{className:"first-dummy-element",tabIndex:"-1"}),o.a.createElement("div",{className:"cmp-recent-search__header"},this.getCountWithLabel()?o.a.createElement("button",{tabIndex:"0",className:"cmp-recent-search__accordion","data-automation-id":this.props.automationID+"-recentSearch",onClick:function(){return u.showRecentSearch()},"aria-expanded":this.state.isRecentSearchOpen},this.getCountWithLabel()):"",this.state.recentSearch.length>0?o.a.createElement("button",{tabIndex:"0",className:"cmp-recent-search__clear","data-automation-id":this.props.automationID+"-clearRecentSearch",onClick:function(){return u.clearRecentSearch()}},null===(e=this.props.recentSearchLabel)||void 0===e?void 0:e.clearLabel):""),this.state.recentSearch.length>0?o.a.createElement("div",{className:"cmp-recent-search__mobile-clear"},o.a.createElement("button",{tabIndex:"0",className:"cmp-recent-search__clear","data-automation-id":this.props.automationID+"-clearRecentSearch",onClick:function(){return u.clearRecentSearch()}},null===(t=this.props.recentSearchLabel)||void 0===t?void 0:t.clearLabel)):"",o.a.createElement("div",{className:"cmp-recent-search__card-wrapper",role:"list"},this.state.recentSearch.length>0?this.state.recentSearch.map((function(e,t){var n,r,i,a;return o.a.createElement("div",{className:"cmp-recent-search__card",role:"listitem",key:t},o.a.createElement("div",{className:"cmp-recent-search__card-heading"},u.getDestination(e,t)),u.getFilterist(e),o.a.createElement("div",{className:"cmp-recent-search__view-cruise"},o.a.createElement("a",{href:e.searchUrl,onClick:function(e){return u.viewSearchRedirection(e)},"data-automation-id":u.props.automationID+"-viewCruise","aria-label":(e.filterList.hasOwnProperty("destinations")?e.filterList.destinations[0]+" "+(null===(n=u.props.recentSearchLabel)||void 0===n?void 0:n.cruisesLabel):(null===(r=u.props.recentSearchLabel)||void 0===r?void 0:r.destinations)+" "+(t+1))+" "+(null===(i=u.props.recentSearchLabel)||void 0===i?void 0:i.viewSearch)}," ",null===(a=u.props.recentSearchLabel)||void 0===a?void 0:a.viewSearch," ")))})):o.a.createElement("div",{className:"cmp-recent-search__no-search"},o.a.createElement("h4",{role:"heading"},null===(n=this.props.recentSearchLabel)||void 0===n?void 0:n.noSearchTitle),o.a.createElement("p",null,null===(r=this.props.recentSearchLabel)||void 0===r?void 0:r.noSearchText))),this.state.totalRecentSearch.length>this.state.showMoreCount?o.a.createElement("div",{className:"cmp-recent-search__show-more ".concat(this.state.isShowMore?"show-less":"")},o.a.createElement("button",{onClick:function(){return u.showMoreRecentSearch()},"data-automation-id":this.props.automationID+"-recentSearchView","aria-expanded":this.state.isShowMore},this.state.isShowMore?null===(a=this.props.recentSearchLabel)||void 0===a?void 0:a.showLess:null===(i=this.props.recentSearchLabel)||void 0===i?void 0:i.showMore)):"",o.a.createElement("button",{tabIndex:"0",className:"cmp-recent-search__close","aria-label":null===(l=this.props.recentSearchLabel)||void 0===l?void 0:l.closeAriaLabel,"data-automation-id":this.props.automationID+"-closeRecentSearch",onKeyDown:function(e){u.moveTabFocus(e)},onClick:function(){return u.closeRecentSearch()}}," ",null===(c=this.props.recentSearchLabel)||void 0===c?void 0:c.closeLabel))))}}]),n}(o.a.Component)},97:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=function(){return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-label":"close icon"},o.a.createElement("path",{d:"M26.9439 24.8649L22.0804 19.9999L26.9454 15.1349C27.0919 15.0001 27.2096 14.837 27.2914 14.6555C27.3733 14.474 27.4176 14.2779 27.4218 14.0788C27.4259 13.8797 27.3897 13.6819 27.3154 13.4972C27.2412 13.3125 27.1303 13.1447 26.9895 13.0039C26.8487 12.8631 26.6809 12.7522 26.4962 12.6779C26.3115 12.6036 26.1136 12.5675 25.9146 12.5716C25.7155 12.5757 25.5193 12.6201 25.3379 12.7019C25.1564 12.7838 24.9933 12.9015 24.8585 13.048L19.9935 17.913L15.1285 13.048C14.8481 12.7899 14.4787 12.6502 14.0977 12.6581C13.7167 12.666 13.3535 12.8209 13.084 13.0904C12.8145 13.3599 12.6596 13.7231 12.6517 14.1041C12.6438 14.4852 12.7835 14.8545 13.0416 15.1349L17.9066 19.9999L13.0416 24.8649C12.8984 24.9984 12.7843 25.1599 12.7062 25.3394C12.6282 25.5189 12.5879 25.7126 12.5879 25.9083C12.5879 26.1041 12.6282 26.2977 12.7062 26.4772C12.7843 26.6567 12.8984 26.8183 13.0416 26.9518C13.1779 27.0901 13.3404 27.1999 13.5195 27.2748C13.6986 27.3498 13.8909 27.3884 14.0851 27.3884C14.2792 27.3884 14.4715 27.3498 14.6506 27.2748C14.8297 27.1999 14.9922 27.0901 15.1285 26.9518L19.9935 22.0868L24.8585 26.9518C25.1354 27.2282 25.5106 27.3835 25.9019 27.3835C26.2932 27.3835 26.6685 27.2282 26.9454 26.9518C27.0836 26.8154 27.1933 26.6528 27.2681 26.4737C27.3429 26.2945 27.3814 26.1022 27.3813 25.908C27.3811 25.7138 27.3424 25.5216 27.2673 25.3425C27.1922 25.1635 27.0823 25.0011 26.9439 24.8649Z",fill:"#022658"}))},a=n(1),l=function(e){var t=e.onClose;return o.a.createElement("div",{role:"button",tabIndex:"0",className:"popup-close",onClick:t,onKeyDown:function(e){e.keyCode!==a.yj&&e.keyCode!==a.Bk||(e.preventDefault(),t())},"aria-label":"Close"},o.a.createElement(i,null))};t.a=o.a.memo(l)}},[[505,4,0]]]);