!function(){"use strict";var e={159:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DespegarCookies=void 0,(n=t.DespegarCookies||(t.DespegarCookies={})).REDEMPTION_SWITCH="redemption_switch",n.DSS="dss",n.WL_SESSION="wl_session",n.LOYALTY_COARCHMARK="s_loyalty_coachmark"},421:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchEvents=void 0,(t.SwitchEvents||(t.SwitchEvents={})).LOYALTY_MODE_CHANGED="loyaltyModeChanged"},286:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchTrackingAction=void 0,(n=t.SwitchTrackingAction||(t.SwitchTrackingAction={})).PAGEVIEW="pageview",n.MODE_TOGGLE="mode-toggle",n.LANDING_LINK_CLICK="landing-link-click"},526:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LoyaltyMode=void 0,(n=t.LoyaltyMode||(t.LoyaltyMode={})).ACQUISITION="acquisition",n.ACCUMULATION="accumulation",n.REDEMPTION="redemption",n.COUNTRY_OFF="country_off"},140:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LoyaltySwitchDisplay=void 0,(n=t.LoyaltySwitchDisplay||(t.LoyaltySwitchDisplay={})).INVISIBLE="invisible",n.VISIBLE_ENABLED="visible_enabled",n.VISIBLE_DISABLED="visible_disabled"},604:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.deleteRedemptionCookie=t.createRedemptionCookie=t.getCookie=void 0;var o=n(159),i=n(526);t.getCookie=function(e){var t,n="; ".concat(document.cookie).split("; ".concat(e,"="));return 2===n.length?null===(t=n.pop())||void 0===t?void 0:t.split(";").shift():void 0},t.createRedemptionCookie=function(){document.cookie="".concat(o.DespegarCookies.REDEMPTION_SWITCH,"=").concat(i.LoyaltyMode.REDEMPTION,"; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/")},t.deleteRedemptionCookie=function(){document.cookie="".concat(o.DespegarCookies.REDEMPTION_SWITCH,"=").concat(i.LoyaltyMode.REDEMPTION,"; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/")}},755:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.setOnClickSwitchHandlerForAcquisition=t.setOnClickSwitchHandler=void 0;var o=n(421),i=n(286),a=n(526),c=n(604),r=n(513);t.setOnClickSwitchHandlerForAcquisition=function(e,t,n,o,c){e.addEventListener("click",(function(e){var s=location.href;(0,r.upaTrack)(n,o,a.LoyaltyMode.ACQUISITION,c,i.SwitchTrackingAction.LANDING_LINK_CLICK).then((function(){return location.href="".concat(t,"?redirect_to=").concat(encodeURIComponent(s))})).catch((function(){console.error("Track landing-link-click failed"),location.href="".concat(t,"?redirect_to=").concat(encodeURIComponent(s))}))}))},t.setOnClickSwitchHandler=function(e,t,n,s){e.addEventListener("click",(function(e){var l=e.target,u=l.checked?a.LoyaltyMode.REDEMPTION:a.LoyaltyMode.ACCUMULATION;u===a.LoyaltyMode.REDEMPTION?(0,c.createRedemptionCookie)():(0,c.deleteRedemptionCookie)(),(0,r.upaTrack)(t,n,u,s,i.SwitchTrackingAction.MODE_TOGGLE),function(e,t){var n=new CustomEvent(o.SwitchEvents.LOYALTY_MODE_CHANGED,{detail:{mode:t}});e.dispatchEvent(n)}(l,u)}))}},198:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.invalidInitializationParameters=void 0;var n=function(e){return"string"==typeof e};t.invalidInitializationParameters=function(e,t,o,i){return!(n(e)&&(a=t,"boolean"==typeof a)&&function(e){return n(e)&&function(e){return 2===e.split("-").length}(e.replace("_","-"))}(o)&&function(e){return e&&n(e.fl)&&n(e.pr)&&n(e.pageview_id)&&n(e.flow_type)}(i));var a}},513:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n\n \n
\n
\n ').concat(e.title,'\n
\n
\n ').concat(e.subtitle,'\n
\n
\n
\n \n \n \n
\n \n ')},s=function(e,t){return r(e,t,!1)},l=function(e,t){return r(e,t)},u=function(e,t){return r(e,t)},d=function(e,t){return function(e,t){var n=t?"-collapsed":"";return'\n
\n \n
\n
\n ').concat(e.title,'\n
\n
\n ').concat(e.subtitle,'\n \n
\n
\n
\n ')}(e,t)},y=function(e,t,n,o){var i=document.getElementById(t);i?i.innerHTML=e(n,o):console.error("The element with id=".concat(t," was not found"))},p=function(e,t,n,i,r,p){switch(e){case c.LoyaltyMode.ACQUISITION:y(d,n,t,i),function(e,t,n,o){var i=document.getElementById("redemption-switch-component");i&&(0,a.setOnClickSwitchHandlerForAcquisition)(i,e,t,n,o)}(t.signin_link,r,p,t.tracking);break;case c.LoyaltyMode.ACCUMULATION:t.display===o.LoyaltySwitchDisplay.VISIBLE_DISABLED?y(s,n,t,i):(y(l,n,t,i),function(e,t,n){var o=document.getElementById("switch-input");o&&(0,a.setOnClickSwitchHandler)(o,e,t,n)}(r,p,t.tracking));break;case c.LoyaltyMode.REDEMPTION:y(u,n,t,i),function(e,t,n){var o=document.getElementById("switch-input");o&&((0,a.setOnClickSwitchHandler)(o,e,t,n),o.checked=!0)}(r,p,t.tracking);break;default:console.error("The name of the switch status (".concat(e,") is invalid"))}};t.switchToCorrectRenderFunction=function(e,t,n,a,c,r){if(t.display===o.LoyaltySwitchDisplay.INVISIBLE)t.is_whitelabel&&(0,i.createRedemptionCookie)();else if(!t.is_whitelabel)if(t.use_client_placeholder)p(e,t,n,a,c,r);else{var s=window.shifuLoyaltySwitchPlaceholder;s?(p(e,t,s,a,c,r),window.showLoyaltyPointsIncentive&&window.showLoyaltyPointsIncentive()):window.addEventListener("shifuLoyaltyMenuLoaded",(function(n){p(e,t,n.detail.loyaltySwitchPlaceholder,a,c,r),window.showLoyaltyPointsIncentive&&window.showLoyaltyPointsIncentive()}),!1)}}},777:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLoyaltyServiceURL=t.getUPATrackServiceURL=void 0,t.getLoyaltyServiceURL=function(e){return"".concat("/commons-vr/loyalty","?").concat(e)},t.getUPATrackServiceURL=function(e){return"".concat("/commons-vr/loyalty","/track?").concat(e)}},461:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function c(e){try{s(o.next(e))}catch(e){a(e)}}function r(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,r)}s((o=o.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,o,i,a,c={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function r(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,r[0]&&(c=0)),c;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return c.label++,{value:r[1],done:!1};case 5:c.label++,o=r[1],r=[0];continue;case 7:r=c.ops.pop(),c.trys.pop();continue;default:if(!((i=(i=c.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){c=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]