PageSourceSearch

https://booking.jubbaairways.com/chunk-4JYS5FK5.js

js jubbaairways.com collected 2026-09-25 00:29:54 UTC 77,874 bytes, 2 lines download raw bytes

1import{e as Qn}from"./chunk-WOU5QES2.js";import{a as Gn}from"./chunk-GJM5OV4Y.js";import{$G as Ce,$e as Kt,$w as ri,AE as ue,AQ as ke,AT as cn,BE as Se,BH as Xi,BX as Bn,CH as Zi,CX as ct,Cl as zt,DE as fi,DG as ji,DX as Mn,DY as kn,Df as Ut,Dw as we,EG as Ei,ET as pn,EX as pt,Ew as Ve,F as Rt,FT as dn,Fd as Et,Fw as ii,GE as Si,GT as gn,Gw as Ke,HE as mi,IT as hn,IX as Pn,Iy as Be,JE as Ci,JO as rn,JT as yn,K as wt,Ke as Zn,Ld as Lt,Lg as _e,Md as Nt,Mf as qt,Mg as Ae,Nc as jt,Nd as se,O0 as Kn,PT as fn,Q0 as $n,QF as Fi,QG as Xe,QY as Hn,R0 as Un,RF as Ti,Rd as Vt,Rx as ai,SF as Di,SI as en,SV as _n,SZ as Ln,Sf as Yt,Sm as ei,TF as Oi,TG as Li,TZ as Nn,Tl as Xt,UF as _i,UW as An,Ub as De,Uz as Ue,VF as Ai,VG as Ni,VT as Sn,VW as Rn,VX as In,Vf as Oe,W0 as qn,WF as Ri,WG as Vi,WW as wn,Wi as ye,Ww as ni,XF as wi,XJ as tn,XX as dt,Xi as fe,Xj as Re,Xw as xe,YF as xi,YG as Ki,YJ as nn,YY as jn,Yi as Qt,Yw as Je,ZF as Ge,ZG as $i,ZW as ut,Zw as $e,Zx as li,_G as Ui,_I as ot,_v as Le,_w as oi,aH as Ze,aa as xt,ac as Ht,bH as et,bb as Pt,cG as Ji,cH as tt,ca as Jt,dH as qi,dU as mn,dx as si,eH as it,eU as Cn,fH as nt,fb as It,gG as Bi,gH as Yi,hF as bi,hH as Gi,ha as Bt,hw as R,iH as Qi,ia as Mt,iq as ti,iw as v,j as _t,jH as pe,jU as bn,jb as Xn,jf as $t,jw as le,kH as Me,kP as rt,kU as vn,lU as Fn,mU as Tn,n as At,nE as ui,nG as Mi,nU as Dn,nb as kt,nj as Ee,nw as Ne,oH as Wi,oP as st,pj as Wt,qF as qe,qG as Qe,qH as ae,qT as ln,qX as xn,qZ as gt,qh as Gt,rE as ci,rF as me,rG as We,rH as Pe,rT as un,rX as Jn,rZ as En,s1 as Yn,sF as Ye,sG as Pi,tG as Ii,tH as zi,tT as at,uE as pi,uG as ki,uT as lt,uU as On,um as Zt,vE as di,vF as vi,vG as ce,w0 as Vn,wE as gi,wG as ze,wM as on,xE as hi,yE as yi,yG as Hi,yQ as sn,zH as Ie,zQ as an}from"./chunk-XFRYEX7R.js";import{Ba as U,Bc as L,Cc as F,Dc as J,Ec as Z,G as X,Gb as je,Gd as _,H as $,Hd as A,Ia as St,Ib as Ct,Ja as mt,Ma as Fe,Mb as b,Mc as z,Na as Te,Qd as B,R as he,Ta as D,Ua as O,Uc as G,Wb as Y,Wc as S,a as ht,ac as bt,ba as ft,bc as vt,db as W,f as ve,ga as k,gb as ee,gd as ne,jd as Q,kd as oe,la as ie,ld as re,m as yt,pd as Ft,qd as Tt,rd as Dt,uc as H,wc as j,x as ge,yd as Ot}from"./chunk-LL4UPCF5.js";var be=ve(Xn());var n=ve(It());var te=ve(It()),zn=ve(Zn());var He=(()=>{class l{constructor(e,i,t){this.componentsConfigurationHelper=e,this.typeScriptHelper=i,this.configHelper=t,this.invalidPromoCodeMessage="The Promo Code is invalid for all travel.",this.passengerCountsByAgeCategory={},this.currencyCode="USD",this.currencyISOCode="USD",this.currencySymbolDisplay="symbol-narrow",this.siteFooterConfiguration=new pt,this.siteHeaderConfiguration=new rt,this.journeyTitle="{0} to {1}",this.promoCodeLabel="Promo Code:",this.promoCodePickerConfiguration=new xn,this.invalidReturnJourneyDepartureTimeMessage="Return journey departure time must be after arrival of outbound journey.",this.invalidCurrentJourneyDepartureTimeMessage="The current journey departure time must be after arrival of the previous journey.",this.outboundJourneySelectionConfiguration=new gt,this.returnJourneySelectionConfiguration=new gt,this.passengerTypeCodeEnabled=!1,this.backButtonText="Back",this.navigateButtonText="Back",this.continueButtonText="Continue",this.isBackButtonEnabled=!0,this.isNavigateButtonEnabled=!1,this.navigateButtonUrl="",this.onlyShowConfiguredFareTypesEnabled=!0,this.allowVoucherOnlyPayment=!1,this.noAvailablePaymentMethodsErrorText="We apologize for the inconvenience. Please contact customer service to complete this booking.",this.reservationChargesEnabled=!0,this.reservationChargesBreakdownConfiguration=new Mn(this.componentsConfigurationHelper,this.configHelper),this.preFlightSelectionMessage="",this.preFlightSelectionMessageDialogEnabled=!1,this.preFlightSelectionMessageDialogCloseLabel="Close",this.autoSelectPaymentMethodEnabled=!0,this.interJourneyConnectionTime="PT2H",this.pageHeaderMessageConfiguration=new ct,this.pageFooterMessageConfiguration=new ut,this.expandInterlineSearchConfiguration=new Pn,this.outboundConfiguredFareTypes=[],this.returnConfiguredFareTypes=[],this.siteHeaderSelectedPassConfiguration=new jn,this.bookingSessionTimer=new An,this.fareOptionsIncludeTax=!0,this.displayedChargeTypeCodes=[],this.configPrefix="",this.preferredCarriers=[],this.passengerCountsByAgeCategory[v[v.Adult]]={ageCategory:v.Adult,title:v[v.Adult],fareTitle:"Adult Fare",count:0,visible:!1},this.passengerCountsByAgeCategory[v[v.Child]]={ageCategory:v.Child,title:v[v.Child],fareTitle:"Child Fare",count:0,visible:!1},this.passengerCountsByAgeCategory[v[v.Infant]]={ageCategory:v.Infant,title:v[v.Infant],fareTitle:"Infant Fare",count:0,visible:!1}}loadConfigSettingsAndI18nMessages(e,i,t,r,s,u,C,T,M,N,w=[],V=[],K=[],o=null,a=[],p=[],g=!1,m=""){let c=new se(t,i,"i18n"),h=new se(t,e,"config"),x=this.configHelper.getCurrencyISOCode_new(h,r.code);this.currencyCode=r.code,this.currencyISOCode=x,c.setProperties(this,[["string","journeyTitle","journey.title"],["string","continueButtonText","flightSearchResult.continueButton.text"],["string","backButtonText","flightSearchResult.backButton.text"],["string","navigateButtonText","flightSearchResult.navigateButton.text"],["string","navigateButtonUrl","flightSearchResult.navigateButton.url"],["string","noAvailablePaymentMethodsErrorText","noAvailablePaymentMethodsError.text"],["string","preFlightSelectionMessage","preFlightSelection.message"],["string","preFlightSelectionMessageDialogCloseLabel","preFlightSelectionMessageDialogClose.label"],["string","promoCodeL
1abel","promoCode.promoCode.label"],["string","invalidPromoCodeMessage","invalidPromoCodeMessage"],["string","invalidReturnJourneyDepartureTimeMessage","flightSearchResult.invalidReturnJourneyDepartureTimeMessage.text"],["string","invalidCurrentJourneyDepartureTimeMessage","flightSearchResult.invalidCurrentJourneyDepartureTimeMessage.text"]]),this.promoCodePickerConfiguration.load(h,c,"flightSearchResults"),h.setProperties(this,[["boolean","isBackButtonEnabled","flightSearchResult.backButton.enabled"],["boolean","onlyShowConfiguredFareTypesEnabled","flightSearchResult.onlyShowConfiguredFareTypes.enabled"],["boolean","isNavigateButtonEnabled","flightSearchResult.navigateButton.enabled"],["boolean","allowVoucherOnlyPayment","allowVoucherOnlyPayment.enabled"],["boolean","preFlightSelectionMessageDialogEnabled","preFlightSelectionMessageDialog.enabled"],["boolean","autoSelectPaymentMethodEnabled","autoSelectPaymentMethod.enabled"],["boolean","passengerTypeCodeEnabled","passengerTypeCodes.enabled"],["string","interJourneyConnectionTime","flightSearch.interJourneyConnectionTime.time"],["boolean","fareOptionsIncludeTax","fareOptions.includeTax"],["string[]","displayedChargeTypeCodes","fareOptions.displayedChargeTypeCodes"],["string[]","preferredCarriers","flightSearchResult.filter.preferredCarriers"]]);let E=i["seatSale.text"];this.passengerCountsByAgeCategory=this.typeScriptHelper.deepCopy(ht({},u));let P=(f,q,de)=>{c.setProperties(this.passengerCountsByAgeCategory[f],[["string","title",`ageCategory.${q}.${de}`],["string","fareTitle",`fareOption.fare.${q}.label`]]),h.setBoolean(this.passengerCountsByAgeCategory[f],"isInfant",`flightSearch.passengersCount.${q}.isInfant`)};this.passengerTypeCodeEnabled?w.forEach(f=>{this.passengerCountsByAgeCategory[f.code].visible=this.passengerCountsByAgeCategory[f.code].count>=1,this.passengerCountsByAgeCategory[f.code].title=f.description,this.passengerCountsByAgeCategory[f.code].fareTitle=f.description,this.passengerCountsByAgeCategory[f.code].visible&&P(f.code,f.code,this.passengerCountsByAgeCategory[f.code].count===1?"singularLabel":"pluralLabel")}):[{category:v.Adult,substring:"adult"},{category:v.Child,substring:"child"},{category:v.Infant,substring:"infant"}].forEach(f=>{this.passengerCountsByAgeCategory[v[f.category]].visible=this.passengerCountsByAgeCategory[v[f.category]].count>=1,this.passengerCountsByAgeCategory[v[f.category]].title=f.substring,this.passengerCountsByAgeCategory[v[f.category]].fareTitle=f.substring,this.passengerCountsByAgeCategory[v[f.category]].visible&&P(v[f.category],f.substring,this.passengerCountsByAgeCategory[v[f.category]].count===1?"singularLabel":"pluralLabel")},this),h.setString(this,"currencySymbolDisplay","defaultCurrency.symbolDisplay"),this.siteFooterConfiguration=new pt,this.componentsConfigurationHelper.loadSiteFooterConfiguration(e,i,this.siteFooterConfiguration),this.siteHeaderConfiguration=new rt,this.siteHeaderConfiguration.loadSiteHeaderConfiguration(e,i,r,"flightSearchResult",t,N);let d=new Bn;this.componentsConfigurationHelper.loadJourneyFaresListConfiguration(h,c,d,r,this.currencyISOCode,this.currencySymbolDisplay,T,V,K,s,o,M,a,p,w,this.passengerCountsByAgeCategory,g,m);let y=new In;y.currencySymbolDisplay=this.currencySymbolDisplay,y.seatSaleText=E,y.currencyCode=r.code,y.currencyISOCode=x,y.languageCode=o?o.code:"en",c.setProperties(y,[["string","nextButtonAriaLabel","nextButton.ariaLabel"],["string","previousButtonAriaLabel","previousButton.ariaLabel"],["string","ngDateFormat","journeyDatesRibbon.ngDateFormat"]]),this.outboundJourneySelectionConfiguration.currencySymbolDisplay=this.currencySymbolDisplay,this.configPrefix=(0,te.isString)(m)&&m!==""?`${m}.`:"",h.setProperties(this.outboundJourneySelectionConfiguration,[["boolean","travelOptionsFilterEnabled",`${this.configPrefix}flightSearchResult.outboundJourneySelection.travelOptionsFilter.enabled`]]),c.setProperties(this.outboundJourneySelectionConfiguration,[["string","pendingBookingReleasedNoticeLabel","pendingBooking.releasedNotice.label"],["string","yourSelectedFlightsText","flightSearchResult.outboundJourneySelection.yourSelectedFlights.text"],["string","flightLabel","flightSearchResult.outboundJourneySelection.flight.label"],["string","filterNoFlightsText","flightSearchResult.outboundJourneySelection.filterNoFlights.text"],["string","resetFilterButtonLabel","flightSearchResult.outboundJourneySelection.resetFilterButton.label"],["string","filterNoFlightsHintText","flightSearchResult.outboundJourneySelection.filterNoFlightsHint.text"]]),C===R.MultiCity&&(0,te.isArrayLike)(M)&&(0,te.isObjectLike)(M[0])&&(this.outboundJourneySelectionConfiguration.yourSelectedFlightsText=zn.String.format(this.journeyTitle,M[0].flights[0].departure.airport.name,M[0].flights[M[0].flights.length-1].arrival.airport.name)),this.outboundJourneySelectionConfiguration.journeyDatesRibbonConfiguration=y,this.outboundJourneySelectionConfiguration.journeyFaresListConfiguration=d,this.returnJourneySelectionConfiguration.currencySymbolDisplay=this.currencySymbolDisplay,this.returnJourneySelectionConfiguration.journeyDatesRibbonConfiguration=y,this.returnJourneySelectionConfiguration.journeyFaresListConfiguration=d,h.setProperties(this.returnJourneySelectionConfiguration,[["boolean","travelOptionsFilterEnabled",`${this.configPrefix}flightSearchResult.returnJourneySelection.travelOptionsFilter.enabled`]]),c.setProperties(this.returnJourneySelectionConfiguration,[["string","pendingBookingReleasedNoticeLabel","pendingBooking.releasedNotice.label"],["string","yourSelectedFlightsText","flightSearchResult.returnJourneySelection.yourSelectedFlights.text"],["string","flightLabel","flightSearchResult.returnJourneySelection.flight.label"],["string","filterNoFlightsText","flightSearchResult.returnJourneySelection.filterNoFlights.text"],["string","resetFilterButtonLabel","flightSearchResult.returnJourneySelection.resetFilterButton.label"],["string","filterNoFlightsHintText","flightSearchResult.returnJourneySelection.filterNoFlightsHint.text"]]),this.reservationChargesEnabled=this.typeScriptHelper.toBoolean(e["flightSearchResult.reservationSummary.enabled"]),this.reservationChargesBreakdownConfiguration.passengerTypeCodeEnabled=this.typeScriptHelper.toBoolean(e["passengerTypeCodes.enabled"]),this.reservationChargesBreakdownConfiguration.loadConfigSettingsAndI18nMessages("flightSearchResult",e,i,r,V,K,p,t),this.reservationChargesBreakdownConfiguration.currencyCode=r.code,this.reservationChargesBreakdownConfiguration.currencyISOCode=x,this.reservationChargesBreakdownConfiguration=(0,te.cloneDeep)(this.reservationChargesBreakdownConfiguration),this.pageHeaderMessageConfiguration=new ct,this.pageFooterMessageConfiguration=new ut,this.pageHeaderMessageConfiguration.loadConfigSettingsAndI18nMessages("page.search-result",e,i,t),this.pageFooterMessageConfiguration.loadConfigSettingsAndI18nMessages("page.search-result",e,i,t),this.siteHeaderSelectedPassConfiguration.loadConfigSettingsAndI18nMessages(e,i,t),this.bookingSessionTimer.loadConfigSettingsAndI18nMessages(h,c),this.expandInterlineSearchConfiguration.loadConfigAndI18n("interline",h,c),this.outboundConfiguredFareTypes=this.outboundJourneySelectionConfiguration?.journeyFaresListConfiguration?.journeyFaresItemConfiguration?.journeyFareOptionsConfiguration?.orderedFareTypeIdentifiers,this.returnConfiguredFareTypes=this.returnJourneySelectionConfiguration?.journeyFaresListConfiguration?.journeyFaresItemConfiguration?.journeyFareOptionsConfiguration?.orderedFareTypeIdentifiers}static{this.\u0275fac=function(i){return new(i||l)(Fe($t),Fe(De),Fe(Lt))}}static{this.\u0275prov=St({token:l,factory:l.\u0275fac})}}return l})();function io(l,I){if(l&1){let e=z();F(0,"app-booking-session-timer",28),G("refreshSession",function(){D(e);let t=S();return O(t.refreshSession())}),J()}if(l&2){let e=S();L("expiryTime",I)("suppressSessionModals",e.pendingHoldDrivesTimer())("configuration",e.configuration.bookingSessionTimer)}}function no(l,I){if(l&1&&Z(0,"app-site-header-flight-summary-mobile",5),l&2){let e=S();L("configuration",e.configuration.siteHeaderConfiguration)("searchSummary",e.searchSummaryComputed())}}function oo(l,I){if(l&1){let e=z();F(0,"app-site-header-selected-pass",29),_(1,"async"),G("openPassSelectionModal",function(){D(e);let t=S();return O(t.onOpenPassSelectionModal())}),J()}if(l&2){let e=S();L("configuration",e.configuration.siteHeaderSelectedPassConfiguration)("selectedPassDef",A(1,2,e.selectedPassDef$))}}function ro(l,I){if(l&1){let e=z();F(0,"div",30),G("click",function(){D(e);let t=S();return O(t.closeDialog())}),F(1,"div",31),G("click",function(t){D(e);let r=S();return O(r.stopPropagation(t))}),F(2,"div",32)(3,"div",33),Q(4),J(),F(5,"div",34)(6,"button",35),G("click",function(){D(e);let t=S();return O(t.closeDialog())}),Q(7),J()()()()(),Z(8,"div",36)}if(l&2){let e=S();ne("d-block",e.displayPreFlightSelectionMessageDialog),b(4),oe(e.configuration.preFlightSelectionMessage),b(3),re(" ",e.configuration.preFlightSelectionMessageDialogCloseLabel," "),b(),ne("d-none",!e.displayPreFlightSelectionMessageDialog)}}function so(l,I){if(l&1){let e=z();F(0,"div",13),Z(1,"fa-icon",37),F(2,"span",38),Q(3),J(),F(4,"app-promo-code-picker",39),G("onChange",function(t){D(e);let r=S();return O(r.onPromoCodePickerChanged(t))}),J()()}if(l&2){let e=S();b(),L("icon",e.faInfoCircle),b(2),oe(e.configuration.promoCodePickerConfiguration.label),b(),L("configuration",e.configuration.promoCodePickerConfiguration)("value",e.promoCode())("showLabel",!1)}}function ao(l,I){if(l&1&&(Z(0,"div",43),_(1,"safeHtml")),l&2){let e=S(3);L("innerHTML",A(1,1,e.promoCodeDescription()),je)}}function lo(l,I){if(l&1&&(F(0,"div",40)(1,"div",42)(2,"div"),Q(3),F(4,"strong"),Q(5),J()(),H(6,ao,2,3,"div",43),J()()),l&2){let e=S(2);
1b(3),re(" ",e.configuration.promoCodeLabel," "),b(2),oe(e.promoCode()),b(),j(e.promoCodeDescription()?6:-1)}}function uo(l,I){if(l&1&&(F(0,"div",41)(1,"div",42)(2,"div"),Q(3),F(4,"strong"),Q(5),J()()()()),l&2){let e=S(2);b(3),re(" ",e.configuration.promoCodeLabel," "),b(2),oe(e.promoCode())}}function co(l,I){if(l&1&&H(0,lo,7,3,"div",40)(1,uo,6,2,"div",41),l&2){let e=S();j(e.isPromoCodeValid()?0:1)}}function po(l,I){if(l&1){let e=z();F(0,"app-journey-selection",44),_(1,"async"),_(2,"async"),_(3,"async"),_(4,"async"),_(5,"async"),_(6,"async"),_(7,"async"),G("expandInterlineBookingSearch",function(){D(e);let t=S();return O(t.switchToInterlineBooking())})("onFareSelected",function(t){D(e);let r=S();return O(r.outboundFareSelected(t))})("onFareSelectionCleared",function(){D(e);let t=S();return O(t.outboundFareSelectionCleared())})("onNavigateToFuture",function(){D(e);let t=S();return O(t.navigateFutureOutboundTravelOptions())})("onNavigateToPast",function(){D(e);let t=S();return O(t.navigatePastOutboundTravelOptions())})("onJourneyDateSelected",function(t){D(e);let r=S();return O(r.outboundJourneyDateSelected(t))})("onVisibleDatesChange",function(t){D(e);let r=S();return O(r.outboundJourneyVisibleDatesChanged(t))})("showFareOptions",function(t){D(e);let r=S();return O(r.onShowFareOptions(t,r.travelOptionsOnSelectedDateSignal()))})("resetFilter",function(){D(e);let t=S();return O(t.onResetTravelOptionsFilterAndSort())}),J()}if(l&2){let e=S();L("showPendingBookingReleasedNotice",e.showPendingBookingReleasedNotice)("configuration",e.configuration.outboundJourneySelectionConfiguration)("travelOptionsOnSelectedDate",e.travelOptionsOnSelectedDateSignal())("sortOrder",e.sortOrder)("selectedTravelOption",e.selectedTravelOptionSignal())("selectedFareOption",e.selectedFareOptionSignal())("selectedJourneyDate",e.selectedJourneyDateSignal())("journeyDateSummaries",e.visibleOutboundJourneyDateSummariesComputed())("disablePastJourneyDateNavigation",e.isOutboundJourneyPastNavigationDisabledComputed())("fareRuleTypeByKey",A(1,27,e.fareRuleTypeByKey$))("fareRuleTypeKeyByFareClassKey",A(2,29,e.fareRuleTypeKeyByFareClassKey$))("minSelectableDate",A(3,31,e.minSelectableDate$))("flightSearchModel",A(4,33,e.flightSearchModel$))("fareClassByKey",A(5,35,e.fareClassByKey$))("isRoundTrip",e.isRoundTrip())("currentJourneyIndex",e.journeyIndex)("travelOptionsLoading",A(6,37,e.travelOptionsLoading$))("totalJourneys",e.getTotalJourneys())("travelOptions",e.travelOptions())("isReturnTrip",!1)("partnerCarriers",e.partnerCarriers)("offerInterline",A(7,39,e.showInterlineBookingDialog$)&&e.configuration.expandInterlineSearchConfiguration.enabled)("filterAvailable",e.outboundFilterAvailable())("connectionFilterAvailable",e.outboundConnectionFilterAvailable())("durationFilterAvailable",e.outboundDurationFilterAvailable())("priceFilterAvailable",e.outboundPriceFilterAvailable())("dataTestPrefix","flight")}}function go(l,I){if(l&1){let e=z();F(0,"app-journey-selection",45),_(1,"async"),_(2,"async"),_(3,"async"),_(4,"async"),_(5,"async"),_(6,"async"),_(7,"async"),_(8,"async"),_(9,"async"),G("expandInterlineBookingSearch",function(){D(e);let t=S();return O(t.switchToInterlineBooking())})("onFareSelected",function(t){D(e);let r=S();return O(r.returnFareSelected(t))})("onFareSelectionCleared",function(){D(e);let t=S();return O(t.returnFareSelectionCleared())})("onNavigateToFuture",function(){D(e);let t=S();return O(t.navigateFutureReturnTravelOptions())})("onNavigateToPast",function(){D(e);let t=S();return O(t.navigatePastReturnTravelOptions())})("onJourneyDateSelected",function(t){D(e);let r=S();return O(r.returnJourneyDateSelected(t))})("showFareOptions",function(t){D(e);let r=S();return O(r.onShowFareOptions(t,r.returnJourneyTravelOptionsOnSelectedDateSignal()))})("onVisibleDatesChange",function(t){D(e);let r=S();return O(r.returnJourneyVisibleDatesChanged(t))})("resetFilter",function(){D(e);let t=S();return O(t.onResetTravelOptionsFilterAndSort())}),J()}if(l&2){let e=S();L("showPendingBookingReleasedNotice",e.showPendingBookingReleasedNotice)("configuration",e.configuration.returnJourneySelectionConfiguration)("travelOptionsOnSelectedDate",e.returnJourneyTravelOptionsOnSelectedDateSignal())("sortOrder",e.sortOrder)("selectedTravelOption",e.selectedReturnTravelOptionSignal())("selectedFareOption",e.selectedReturnFareOptionSignal())("selectedJourneyDate",e.selectedReturnJourneyDateSignal())("journeyDateSummaries",e.visibleReturnJourneyDateSummariesComputed())("disablePastJourneyDateNavigation",A(1,27,e.isReturnJourneyPastNavigationDisabled$))("fareRuleTypeByKey",A(2,29,e.fareRuleTypeByKey$))("fareRuleTypeKeyByFareClassKey",A(3,31,e.fareRuleTypeKeyByFareClassKey$))("minSelectableDate",A(4,33,e.minSelectableReturnDate$))("maxSelectableDate",A(5,35,e.maxSelectableReturnDate$))("flightSearchModel",A(6,37,e.flightSearchModel$))("travelOptionsLoading",A(7,39,e.travelOptionsLoading$))("fareClassByKey",A(8,41,e.fareClassByKey$))("partnerCarriers",e.partnerCarriers)("currentJourneyIndex",1)("totalJourneys",2)("travelOptions",e.travelOptions())("isReturnTrip",!0)("isRoundTrip",!0)("offerInterline",A(9,43,e.showInterlineBookingDialog$)&&e.configuration.expandInterlineSearchConfiguration.enabled)("filterAvailable",e.returnFilterAvailable())("connectionFilterAvailable",e.returnConnectionFilterAvailable())("durationFilterAvailable",e.returnDurationFilterAvailable())("priceFilterAvailable",e.returnPriceFilterAvailable())}}function ho(l,I){if(l&1&&(F(0,"div",17)(1,"span",46),Q(2),J()()),l&2){let e=S();b(2),oe(e.configuration.invalidReturnJourneyDepartureTimeMessage)}}function yo(l,I){if(l&1&&(F(0,"div",17)(1,"span",46),Q(2),J()()),l&2){let e=S();b(2),oe(e.configuration.invalidCurrentJourneyDepartureTimeMessage)}}function fo(l,I){if(l&1&&(F(0,"div",17),Z(1,"div",47),_(2,"safeHtml"),J()),l&2){let e=S();b(),L("innerHTML",A(2,1,e.configuration.noAvailablePaymentMethodsErrorText),je)}}function So(l,I){if(l&1){let e=z();F(0,"app-reservation-charges-breakdown",48,0),_(2,"async"),_(3,"async"),G("removePromoCode",function(){D(e);let t=S();return O(t.onRemovePromoCode())}),J()}if(l&2){let e=S();ne("d-sm-block",e.configuration==null||e.configuration.reservationChargesBreakdownConfiguration==null?null:e.configuration.reservationChargesBreakdownConfiguration.enabled),L("allAncillaryOptionsForAllJourneys",e.allAncillaryOptionsForAllJourneysSignal())("configuration",e.configuration.reservationChargesBreakdownConfiguration)("tripType",e.tripType)("reservation",e.reservationSignal())("quotation",e.quotationSignal())("journeysTravelOptions",e.getJourneysTravelOptions())("searchReturnFlightDate",e.flightSearchReturnDateSignal())("outboundFareOption",e.selectedFareOptionSignal())("returnJourneyFareOption",e.selectedReturnFareOptionSignal())("passengerCountsByAgeCategory",e.passengerCountsByAgeCategory)("promoCode",e.promoCode())("isPromoCodeValid",e.isPromoCodeValid())("promoCodeDescription",e.promoCodeDescription())("alwaysShowPromoCode",!1)("passengerTypeCodes",e.passengerTypeCodes)("selectedJourneys",e.selectedJourneysSignal())("searches",e.
1searches)("seatSelectionOptions",A(2,23,e.seatSelectionOptions$))("voucherPaymentIdentifier",A(3,25,e.voucherPaymentMethodIdentifier$))("selectedJourneyIndex",e.displayReturnTrip&&e.isRoundTrip()?1:e.journeyIndex)("showRemovePromoCode",!0)}}function mo(l,I){if(l&1){let e=z();F(0,"div",19)(1,"div",12)(2,"app-page-footer-message",49),Dt("ngModelChange",function(t){D(e);let r=S();return Tt(r.footerMessageAcknowledgment,t)||(r.footerMessageAcknowledgment=t),O(t)}),J()()()}if(l&2){let e=S();b(),ne("col-sm-12",!(!(e.configuration==null||e.configuration.reservationChargesBreakdownConfiguration==null)&&e.configuration.reservationChargesBreakdownConfiguration.enabled)||e.isAgentSite),b(),L("configuration",e.configuration.pageFooterMessageConfiguration),Ft("ngModel",e.footerMessageAcknowledgment)}}function Co(l,I){if(l&1){let e=z();F(0,"button",50),G("click",function(){D(e);let t=S();return O(t.previousStep())}),Q(1),J()}if(l&2){let e=S();b(),re(" ",e.configuration.backButtonText," ")}}function bo(l,I){if(l&1&&(F(0,"a",24),Q(1),J()),l&2){let e=S();L("href",e.configuration.navigateButtonUrl,Ct),b(),re(" ",e.configuration.navigateButtonText," ")}}function vo(l,I){if(l&1){let e=z();F(0,"button",51),G("click",function(){D(e);let t=S();return O(t.nextStep())}),Q(1),J()}if(l&2){let e=S();b(),re(" ",e.configuration.continueButtonText," ")}}var Br=(()=>{class l{hasConnectionVariability(e,i){if(e!==null&&!(0,n.isEmpty)(i)){let t=this.travelOptionsHelper.getTravelOptionsByDate(i,e),r=t?.[0]?.flights.length;return t?.some(s=>s.flights.length!==r)}return!1}constructor(e,i,t,r,s,u,C,T,M,N,w,V){this.configuration=e,this.store=i,this.travelOptionsHelper=t,this.dateAndTimeHelper=r,this.router=s,this.activatedRoute=u,this.jwtAuthenticationService=C,this.reservationsHelper=T,this.log=M,this.gtmHelper=N,this.navigationUrlHelper=w,this.bookingSessionTimerService=V,this.today=(0,be.default)().startOf("day"),this.faInfoCircle=Qn,this.isAgentSite=!1,this.tripType=null,this.sortOrder=null,this.selectedTravelOption=null,this.passengerTypeCodes=null,this.displayPreFlightSelectionMessageDialog=!0,this.journeyIndex=0,this.displayReturnTrip=!1,this.searches=null,this.footerMessageAcknowledgment=!1,this.selectedFareOption=new $e,this.firstDisplayedDate=null,this.lastDisplayedDate=null,this.selectedReturnFareOption=new $e,this.returnFirstDisplayedDate=null,this.returnLastDisplayedDate=null,this.alive=!0,this.dataRoute=null,this.paymentMethods=[],this.totalAmount=null,this.configSettings=null,this.currency=null,this.selectedAgencyCompany=null,this.acceptedInterlineOffer=!1,this.typeScriptHelper=Te(De),this.flightSignatureHelper=Te(qt),this.dataLoading$=ge([!1]),this.initialDataLoading$=ge([!1]),this.travelOptionsLoading$=ge([!1]),this.flightSearchModel$=this.store.select($i),this.fareClassByKey$=this.store.select(Oi),this.fareRuleTypeByKey$=this.store.select(Fi),this.fareRuleTypeKeyByFareClassKey$=this.store.select(Ti),this.bookingSessionExpiry=this.store.selectSignal(vn),this.pendingHoldDrivesTimer=this.store.selectSignal(Fn),this.seatSelectionOptions$=this.store.select(Wi),this.voucherPaymentMethodIdentifier$=this.store.select(vi),this.minSelectableDate$=ge([this.dateAndTimeHelper.fromMomentToDateStructYMD(this.today)]),this.isRoundTrip=B(()=>this.store.selectSignal(ce)()===R.Return),this.isMultiCityTrip=B(()=>this.store.selectSignal(ce)()===R.MultiCity),this.paymentMethodsLoading$=this.store.select(Ji),this.hasPendingUnpaidBooking=this.store.selectSignal(bn),this.showPendingBookingReleasedNotice=!1,this.bookingResetService=Te(Hn),this.quotationTotal$=this.store.select(Zi),this.interlineBookingSearchCriteria$=new yt(null),this.showInterlineBookingDialog$=$([this.interlineBookingSearchCriteria$,this.store.select(ce)]).pipe(X(([o,a])=>a===R.MultiCity||this.acceptedInterlineOffer||this.interlineBookingSearchEnabledSignal()?!1:(0,n.isObject)(o))),this.selectedPassDef$=this.store.select(ke),this.hasAvailablePASSes$=this.store.select(sn),this.hasValidQuotationToGoToNextPage=B(()=>{let o=this.store.selectSignal(Ie)(),a=this.isRoundTrip(),p=this.isMultiCityTrip(),g=this.store.selectSignal(Me)(),m=this.store.selectSignal(pe)(),c=this.store.selectSignal(ze)(),h=()=>!a&&!p,x=()=>a&&g,E=()=>p&&m===c.length-1;return h()||x()||E()?(0,n.isObject)(o):!0}),this.travelOptionsOnSelectedDateSignal=B(()=>{let o=this.travelOptions(),a=this.selectedDateComputed(),p=this.cityPairSearchesSignal(),g=this.travelOptionsSortSignal(),m=this.travelOptionsFilterSignal(),c=[];return a===null||(0,n.isEmpty)(o)?((!o||o.length===0||o.every(h=>this.travelOptionsHelper.isSoldOutTravelOption(h)))&&(0,n.isArray)(p)&&p.length>0&&this.interlineBookingSearchCriteria$.next(p[0]),[]):(c=this.travelOptionsHelper.getTravelOptionsByDate(o,a),c.length>1&&this.configuration.outboundJourneySelectionConfiguration.travelOptionsFilterEnabled&&((0,n.isObject)(g)||(0,n.isObject)(m))&&(c=this.getFilteredTravelOptions(c,g,m)),this.configuration.onlyShowConfiguredFareTypesEnabled&&(c=c.filter(h=>h.fareOptions.some(x=>this.configuration.outboundConfiguredFareTypes?.includes(x.fareType.identifier)))),c)}),this.returnJourneyTravelOptionsOnSelectedDateSignal=B(()=>{let o=this.returnJourneySelectedDateSignal(),a=this.returnTravelOptionsSignal(),p=this.travelOptionsSortSignal(),g=this.travelOptionsFilterSignal(),m=this.cityPairSearchesSignal(),c=[];return o===null||(0,n.isEmpty)(a)?((a.length===0||a.every(h=>this.travelOptionsHelper.isSoldOutTravelOption(h)))&&(0,n.isArray)(m)&&m.length>0&&this.interlineBookingSearchCriteria$.next(m[0]),[]):(c=this.travelOptionsHelper.getTravelOptionsByDate(a,o),c.length>1&&this.configuration.outboundJourneySelectionConfiguration.travelOptionsFilterEnabled&&((0,n.isObject)(p)||(0,n.isObject)(g))&&(c=this.getFilteredTravelOptions(c,p,g)),this.configuration.onlyShowConfiguredFareTypesEnabled&&(c=c.filter(h=>h.fareOptions.some(x=>this.configuration.outboundConfiguredFareTypes?.includes(x.fareType.identifier)))),c)}),this.selectedJourneyDateSignal=W(null),this.selectedReturnJourneyDateSignal=W(null),this.reservationSignal=W(null),this.quotationSignal=W(null),this.selectedFareOptionSignal=W(null),this.selectedTravelOptionSignal=W(null),this.selectedReturnFareOptionSignal=W(null),this.selectedReturnTravelOptionSignal=W(null),this.nonCombinableFareClassesEnabledSignal=W(!1),this.interJourneyConnectionTimeEnabledSignal=W(!1),this.promoCode=this.store.selectSignal(We),this.isPromoCodeValid=this.store.selectSignal(Cn),this.promoCodeDescription=this.store.selectSignal(mn),this.firstDisplayedDates=this.store.selectSignal(Ui),this.selectedDatesSignalFromStore=this.store.selectSignal(Ce),this.journeyIndexSignalFromStore=this.store.selectSignal(pe),this.flightSearchSignalFromStore=this.store.selectSignal(me),this.allAncillaryOptionsSignalFromStore=this.store.selectSignal(cn,{equal:(o,a)=>(0,n.isEqual)((0,n.sortBy)(o?.map(p=>p.key)),a?.map(p=>p.key))}),this.returnSelectedDateSignal=this.store.selectSignal(et),this.returnTravelOptionsSignal=B(()=>{let o=this.selectedFareOptionSignal(),a=this.selectedTravelOptionSignal(),p=this.nonCombinableFareClassesByKeySignal(),g=this.nonCombinableFareClassesEnabledSignal(),m=this.combinableBookingKeysByDepartureBookingKeySignal(),c=this.interJourneyConnectionTimeEnabledSignal(),h=this.returnJourneyTravelOptionsSignal(),x=this.travelOptionsHelper.filterNonCombinableFareClasses(h,[o],p,g,m);return c?this.travelOptionsHelper.filterTravelOptionsByConnectionTime(x,a,this.configuration.interJourneyConnectionTime):x}),this.returnJourneySelectedDateSignal=this.store.selectSignal(et),this.cityPairSearchesSignal=this.store.selectSignal(ze),this.interlineBookingSearchEnabledSignal=this.store.selectSignal(tt),this.selectedJourneysSignal=this.store.selectSignal(ae),this.nonCombinableFareClassesByKeySignal=this.store.selectSignal(wi),this.combinableBookingKeysByDepartureBookingKeySignal=this.store.selectSignal(fn),this.searchSummaryComputed=B(()=>{let o=this.store.selectSignal(Hi)();return(0,n.isArrayLike)(o)&&o.length>0?o[0]:null}),this.isOutboundJourneyPastNavigationDisabledComputed=B(()=>{let o=this.firstDisplayedDates(),a=this.dateAndTimeHelper.fromMomentToDateStructYMD((0,be.default)());return!(0,n.isEmpty)(o)&&this.dateAndTimeHelper.compareDateStructYMD(a,o[this.journeyIndexSignalFromStore()])>=0}),this.selectedDateComputed=B(()=>{let o=this.selectedDatesSignalFromStore(),a=this.journeyIndexSignalFromStore();return(0,n.isEmpty)(o)?null:o[a]}),this.flightSearchReturnDateSignal=B(()=>{let o=this.flightSearchSignalFromStore()?.searches?.[0]?.returnDate;return o?this.dateAndTimeHelper.fromDateStructYMDToDate(o):null}),this.allAncillaryOptionsForAllJourneysSignal=B(()=>this.allAncillaryOptionsSignalFromStore()),this.activeLanguageSignal=this.store.selectSignal(Xe),this.availableStepsSignal=this.store.selectSignal(Tn),this.furthestStepUrlSignal=this.store.selectSignal(Dn),this.configSettingsSignal=this.store.selectSignal(lt),this.i18nMessagesSignal=this.store.selectSignal(at),this.displayReturnTripSignal=this.store.selectSignal(Me),this.travelOptionsSortSignal=this.store.selectSignal(Ei),this.travelOptionsFilterSignal=this.store.selectSignal(ji),this.travelOptions=B(()=>{let o=this.journeyIndexSignalFromStore(),a=this.journeyTravelOptionsSignal()[o],p=this.selectedJourneysSignal(),g=this.nonCombinableFareClassesByKeySignal(),m=this.nonCombinableFareClassesEnabledSignal(),c=[];for(let h=0;h<o;h++){let x=p?.[h]?.fareOption;(0,n.isObject)(x)&&c.push(x)}return this.travelOptionsHelper.filterNonCombinableFareClasses(a,c,g,m,null)}),this.returnJourneyTravelOptionsSignal=B(()=>{let o=this.store.selectSignal(Yi)(),a=this.store.selectSignal(nt)(),p=this.store.selectSignal(ot)();return(0,n.isEmpty)(o)||!(0,n.isObject)(p?.[a])?[]:o?.flat()?.map(g=>p[a]?.data?.[g])?.filter(g=>(0,n.isObject)(g))}),this.journeyTravelOptionsSignal=B(()=>{let o=this.store.selectSignal(it)(),a=this.store.selectSignal(nt)(),p=this.store.selectSignal(ot)();return(0,n.isEmpty)(o)?[]:(0,n.isObject)(p?.[a])?o?.map(g=>(g??[]).map(m=>p[a]?.data?.[m])?.filter(m=>(0,n.isObject)(m))):o.map(()=>[])}),this.visibleOutboundJourneyDateSummariesComputed=B(()=>{let o=this.store.selectSignal(Ni)(),a=this.firstDisplayedDates(),p=this.store.selectSignal(Qi)(),g=this.journeyIndexSignalFromStore(),m=this.nonCombinableFareClassesEnabledSignal(),c=this.travelOptions();if((0,n.isEmpty)(a)||(0,n.isEmpty)(o)||!(0,n.isEmpty)(a)&&a[g]===null||!(0,n.isEmpty)(o)&&(o[g]===null||o[g].length===0)||p<1)return[];let h=this.dateAndTimeHelper.fromDateStructYMDToMoment(a[g]).add(p-1,"days"),x=this.dateAndTimeHelper.fromMomentToDateStructYMD(h),E=this.travelOptionsHelper.getVisibleJourneyDateSummariesByDates(o[g],a[g],x);if(this.configuration.onlyShowConfiguredFareTypesEnabled||m){let P=this.t
1ypeScriptHelper.deepCopy(c);this.configuration.onlyShowConfiguredFareTypesEnabled&&(P=P.filter(y=>y.fareOptions.some(f=>this.configuration.outboundConfiguredFareTypes.includes(f.fareType.identifier))));let d=this.typeScriptHelper.deepCopy(E);return d.forEach((y,f,q)=>{P.some(de=>this.dateAndTimeHelper.equalsDateStructYMD(y.date,this.dateAndTimeHelper.fromMomentToDateStructYMD((0,be.default)(de.departureDate))))||(q[f].seatsAvailable=!1,delete q[f].lowestAvailableFare,delete q[f].lowestFare)}),d}return E}),this.visibleReturnJourneyDateSummariesComputed=B(()=>{let o=this.store.selectSignal(Vi)(),a=this.returnTravelOptionsSignal(),p=this.store.selectSignal(Ze)(),g=this.configSettingsSignal(),m=this.store.selectSignal(qi)();if(p===null||(0,n.isEmpty)(o))return[];let c=this.dateAndTimeHelper.fromDateStructYMDToMoment(p).add(this.visibleJourneyDates,"days"),h=this.dateAndTimeHelper.fromMomentToDateStructYMD(c),x=this.travelOptionsHelper.getVisibleJourneyDateSummariesByDates(o,p,h),E=this.getConsideredPTCForLowestFare(g),P=this.t
1ypeScriptHelper.deepCopy(a);return this.configuration.onlyShowConfiguredFareTypesEnabled&&(P=P.filter(d=>d.fareOptions.some(y=>this.configuration.returnConfiguredFareTypes.includes(y.fareType.identifier)))),this.travelOptionsHelper.updateJourneyDateSummaries(x,P,p,h,E,this.configuration.fareOptionsIncludeTax,this.configuration.displayedChargeTypeCodes,m)}),this.outboundFilterAvailable=B(()=>{let o=this.selectedDatesSignalFromStore()?.[this.journeyIndexSignalFromStore()],a=this.travelOptions();return o!==null&&!(0,n.isEmpty)(a)&&this.travelOptionsHelper.getTravelOptionsByDate(a,o).length>1}),this.returnFilterAvailable=B(()=>this.returnSelectedDateSignal()!==null&&!(0,n.isEmpty)(this.returnTravelOptionsSignal())&&this.travelOptionsHelper.getTravelOptionsByDate(this.returnTravelOptionsSignal(),this.returnSelectedDateSignal()).length>1),this.outboundConnectionFilterAvailable=B(()=>this.hasConnectionVariability(this.selectedDatesSignalFromStore()?.[this.journeyIndexSignalFromStore()],this.travelOptions())),this.returnConnectionFilterAvailable=B(()=>this.hasConnectionVariability(this.returnSelectedDateSignal(),this.returnTravelOptionsSignal())),this.outboundDurationFilterAvailable=B(()=>this.hasDurationVariability(this.selectedDatesSignalFromStore()?.[this.journeyIndexSignalFromStore()],this.travelOptions())),this.outboundPriceFilterAvailable=B(()=>this.priceFilterAvailable(this.selectedDatesSignalFromStore()?.[this.journeyIndexSignalFromStore()],this.travelOptions())),this.returnPriceFilterAvailable=B(()=>this.priceFilterAvailable(this.returnSelectedDateSignal(),this.returnTravelOptionsSignal())),this.returnDurationFilterAvailable=B(()=>this.hasDurationVariability(this.returnSelectedDateSignal(),this.returnTravelOptionsSignal())),this.priceFilterAvailable=(o,a)=>{if(o!==null&&!(0,n.isEmpty)(a)){let g=this.travelOptionsHelper.getTravelOptionsByDate(a,o)?.map(h=>this.getLowestFare(h.fareOptions)),m=(0,n.min)(g)?.toFixed(0),c=(0,n.max)(g)?.toFixed(0);return m!==c}return!1},this.gtmHelper.enable();let K=(0,be.default)().startOf("day");ee(()=>{let o=this.travelOptions(),a=this.selectedDatesSignalFromStore(),p=this.journeyIndexSignalFromStore(),g=this.returnJourneySelectedDateSignal(),m=this.store.selectSignal(Li)(),c=this.displayReturnTripSignal();this.selectedJourneyDateSignal.set(a?a[p]:null),this.selectedReturnJourneyDateSignal.set(g??null),this.configuration.currencySymbolDisplay=m;let h=(0,n.isEmpty)(a)?null:a[p],x=this.configuration.outboundJourneySelectionConfiguration.travelOptionsFilterEnabled,E=[];a!==null&&!(0,n.isEmpty)(o)&&!c&&(E=this.travelOptionsHelper.getTravelOptionsByDate(o,h),x&&this.store.dispatch(new Ve(E)))}),ee(()=>{let o=this.flightSearchSignalFromStore(),a=this.journeyIndexSignalFromStore();if(this.searches=(0,n.cloneDeep)(o.searches),o?.searches!==null&&o.searches[this.journeyIndex]?.originAirport!==null&&o.searches[this.journeyIndex]?.destinationAirport!==null){this.store.dispatch(new xe(`${this.navigationUrlHelper.getPrefixRoute()}${this.isAgentSite?Oe:Ae}`));let p=o.tripType,g=this.dateAndTimeHelper.fromDateStructYMDToMoment(o.searches[a]?.departureDate),m=dt();if(this.firstDisplayedDate===null&&(this.firstDisplayedDate=this.dateAndTimeHelper.fromMomentToDateStructYMD(K)),this.lastDisplayedDate===null){let c=g.add(m*2+1,"days");this.lastDisplayedDate=this.dateAndTimeHelper.fromMomentToDateStructYMD(c)}if(p===R.Return){let c=this.dateAndTimeHelper.fromDateStructYMDToMoment(o.searches[0]?.returnDate);if(this.returnFirstDisplayedDate===null&&(this.returnFirstDisplayedDate=this.dateAndTimeHelper.fromMomentToDateStructYMD(K)),this.returnLastDisplayedDate===null){let h=c?.add(m*2+1,"days")??null;this.returnLastDisplayedDate=this.dateAndTimeHelper.fromMomentToDateStructYMD(h)}}this.log.debug(`[FlightSearchResultsComponent] this.selectedJourneyDate=${JSON.stringify(this.selectedJourneyDateSignal())}; this.firstDisplayedDate=${JSON.stringify(this.firstDisplayedDate)}; this.lastDisplayedDate=${JSON.stringify(this.lastDisplayedDate)}; 
2****`)}else this.isAgentSite||(this.store.dispatch(new Je),this.router.navigate([`/${_e}`]))}),ee(()=>{let o=this.configSettingsSignal(),a=this.i18nMessagesSignal();if(o!==null&&a!==null){let p=new se(this.log,o,"config");this.nonCombinableFareClassesEnabledSignal.set(p.getBoolean("fareClass.nonCombinable.enabled",!1)),this.interJourneyConnectionTimeEnabledSignal.set(p.getBoolean("flightSearch.interJourneyConnectionTime.enabled",!1));let m=new Gn(this.log).convertConfigSettingsAndI18nMessages(o,a,this.dataRoute?.configPrefix);this.store.dispatch(new ni(m))}}),ee(()=>{let o=this.returnJourneySelectedDateSignal(),a=this.returnTravelOptionsSignal(),p=this.displayReturnTripSignal();if(o===null||(0,n.isEmpty)(a)||!p)return[];this.travelOptionsHelper.getTravelOptionsByDate(a,o)?.length>0&&this.configuration.returnJourneySelectionConfiguration.travelOptionsFilterEnabled&&this.store.dispatch(new Ve(a))}),ee(()=>{let o=this.selectedFareOptionSignal(),a=this.nonCombinableFareClassesByKeySignal(),p=this.nonCombinableFareClassesEnabledSignal(),g=this.selectedJourneysSignal();if(!(!p||!(0,n.isObject)(o)||!(0,n.isObject)(a))){if(this.tripType===R.Return&&(0,n.isObject)(this.selectedReturnFareOption))(a[o?.fareClass?.ke
2y]?.map(c=>c.key)||[]).includes(this.selectedReturnFareOption?.fareClass?.key)&&this.returnFareSelectionCleared();else if(this.tripType===R.MultiCity){let m=-1;for(let c=this.journeyIndexSignalFromStore()+1;c<g?.length;c++)if(m===-1){let h=g[c]?.fareOption;(0,n.isObject)(h)&&(a[o?.fareClass?.key]?.map(E=>E.key)||[]).includes(h?.fareClass?.key)&&(m=c)}if(m>-1){let c=[];for(let h=m;h<g?.length;h++)c.push(h);this.removeOutboundFareSelectionOrMultiCityFareSelection(g,c)}}}}),ee(()=>{let o=this.selectedJourneysSignal(),a=this.journeyIndexSignalFromStore();this.selectedFareOptionSignal.set(null),this.selectedTravelOptionSignal.set(null),this.selectedReturnFareOptionSignal.set(null),this.selectedReturnTravelOptionSignal.set(null),(0,n.isArrayLike)(o)&&o.length>0&&(this.tripType===R.MultiCity?(0,n.isObjectLike)(o[a])&&(this.selectedFareOptionSignal.set((0,n.cloneDeep)(o[a].fareOption)),this.selectedTravelOptionSignal.set((0,n.cloneDeep)(o[a].travelOption))):((0,n.isObjectLike)(o[0])&&(this.selectedFareOptionSignal.set((0,n.cloneDeep)(o[0].fareOption)),this.selectedTravelOptionSignal.set((0,n.cloneDeep)(o[0].travelOption))),o.length>1&&(0,n.isObjectLike)(o[1])&&(this.selectedReturnFareOptionSignal.set((0,n.cloneDeep)(o[1].fareOption)),this.selectedReturnTravelOptionSignal.set((0,n.cloneDeep)(o[1].travelOption))),this.requestQuotation()))}),ee(()=>{let o=this.store.selectSignal(Pe)(),a=this.store.selectSignal(Ie)();this.reservationSignal.set(o),this.quotationSignal.set(a)}),ee(()=>{let o=this.store.selectSignal(zi)(),a=this.journeyIndexSignalFromStore();if(!(0,n.isArray)(o)||o.length===0)return;let p=o[a];if(!p)return;let g=this.reservationsHelper.getBookingKeysForPaymentMethods([p]);g.length>0&&(this.store.dispatch(new li(g)),this.requestQuotation())})}ngOnInit(){this.showPendingBookingReleasedNotice=this.bookingResetService.consumeReleasedNotice(),this.dataRoute=this.activatedRoute.snapshot.data||null,this.isAgentSite=this.navigationUrlHelper.isAuthenticatedAsAgent??!1,this.visibleJourneyDates=dt(null),this.setupIntitialDataLoading(),this.setupTravelOptionsLoading(),this.setupDataLoading(),this.setupAutoRequestTravelOptionsAfterRefreshingBrowser(),this.setupRetrievingConfigurationData(),this.setupCalculateQuotation(),this.minSelectableReturnDate(),this.fetchMaxSelectableReturnDate(),this.isReturnJourneyPastNavigationDisabled(),this.selectUpliftUnavailableOfferKeysState(),this.setBookingSession(),this.setupRetrievingSelectedAgencyCompany(),this.prepareDataForGoogleFlights()}prepareDataForGoogleFlights(){let e=this.store.selectSignal(tn)();if(!e)return;let{fareClassKey:i,flightSig:t,returnFareClassKey:r,returnFlightSig:s}=e;i&&t&&this.selectGoogleFlightBySignature(this.travelOptions(),t,i,this.outboundFareSelected.bind(this)),r&&s&&this.selectGoogleFlightBySignature(this.returnJourneyTravelOptionsSignal(),s,r,this.returnFareSelected.bind(this))}selectGoogleFlightBySignature(e,i,t,r){if(!e?.length)return;let s=this.flightSignatureHelper.findTravelOptionByFlightSignature(i,e);if(!s.matched||!s.travelOption){this.log.warn(`[FlightSearchResultsComponent] No travel option found for flight signature: ${i}`);return}let u=s.travelOption.fareOptions?.find(C=>C?.fareClass?.key===t);u?r({fareOption:u,travelOption:s.travelOption}):this.log.warn(`[FlightSearchResultsComponent] No fare option found with key ${t} for travel option ${s.travelOption.key}`)}hasDurationVariability(e,i){if(e!==null&&!(0,n.isEmpty)(i)){let t=this.travelOptionsHelper.getTravelOptionsByDate(i,e),r=t?.[0]?.enRouteHours;return t?.some(s=>s.enRouteHours!==r)}return!1}selectUpliftUnavailableOfferKeysState(){$([this.store.select(ae),this.store.select(On)]).pipe(U(()=>this.alive),X(([e,i])=>e?.some(t=>i.includes(t?.fareOption?.bookingKey)))).subscribe(e=>{this.store.dispatch(new bi(e))})}setupRetrievingSelectedAgencyCompany(){this.store.select(st).pipe(U(()=>this.alive)).subscribe(e=>{this.selectedAgencyCompany=e})}setupIntitialDataLoading(){this.initialDataLoading$=$([this.store.select(Ri),this.paymentMethodsLoading$,this.store.select(Xi),this.store.select(xi),this.store.select(an)]).pipe(U(()=>this.alive),X(e=>!e.every(i=>!i)))}setupDataLoading(){this.dataLoading$=$([this.store.select(Di),this.store.select(_i)]).pipe(U(()=>this.alive),X(e=>!e.every(i=>!i)))}setupTravelOptionsLoading(){this.travelOptionsLoading$=this.store.select(Gi).pipe(U(()=>this.alive),X(e=>!e.every(i=>!i)))}setupAutoRequestTravelOptionsAfterRefreshingBrowser(){$([this.store.select(it),this.store.select(dn),this.store.select(pe),this.store.select(Ki)]).pipe(ft(1),U(()=>this.alive)).subscribe(e=>{let[i,t,r,s]=e;
2!(0,n.isEmpty)(s)&&!(0,n.isEmpty)(i)&&t&&Object.values(s).forEach((C,T)=>{C.forEach(M=>{this.store.dispatch(new ui(M,T,null))})})})}setupRetrievingConfigurationData(){$([$([this.store.select(lt),this.store.select(at)]).pipe(U(()=>this.alive),he(e=>e[0]!==null&&e[1]!==null)),this.store.select(Bi).pipe(k()),this.store.select(ki).pipe(k()),this.store.select(Ai).pipe(k()),this.store.select(Qe).pipe(k()),this.store.select(ce).pipe(k()),this.store.select(We).pipe(k()),this.store.select(pn).pipe(k()),this.store.select(gn).pipe(k()),this.store.select(Ge).pipe(k()),this.store.select(Sn).pipe(k()),this.store.select(hn).pipe(k()),this.store.select(Ii).pipe(k()),this.store.select(Xe).pipe(k()),this.store.select(pe).pipe(k()),this.store.select(Me).pipe(k()),this.store.select(en).pipe(k()),this.store.select(tt).pipe(k()),this.store.select(Pe).pipe(k())]).pipe(U(()=>this.alive)).subscribe(e=>{let[[i,t],r,s,u,C,T,M,N,w,V,K,[o,a],p,g,m,c,h,x,E]=e,P=u;this.passengerCountsByAgeCategory=C,this.tripType=T,this.passengerTypeCodes=V,this.paymentMethods=K,this.journeyIndex=m!==null?m:0,this.displayReturnTrip=c!==null?c:!1,this.partnerCarriers=h;let d=(0,n.isArrayLike)(N)&&N.length>0?N[this.journeyIndexSignalFromStore()]:[],y=d!=null?d.concat(w):[],f=E?.ancillaryPurchases?.map(q=>q.ancillaryItem);if(i!==null&&t!==null)if(this.store.dispatch(new xe(`${this.navigationUrlHelper.getPrefixRoute()}${this.isAgentSite?Oe:Ae}`)),this.configSettings=i,this.currency=(0,n.cloneDeep)(s),s!==null&&P!==null&&this.passengerCountsByAgeCategory!==null&&this.tripType!==null){let q=this.travelOptionsHelper.getAvailableFareTypeIdentifiers(p,i,"[FlightSearchResultsComponent.ngOnInit]",this.dataRoute?.configPrefix);q.length>0&&(P=P.filter(de=>q.includes(de?.identifier))),this.store.dispatch(new mi(q)),this.log.debug("[FlightSearchResultsComponent.ngOnInit] Loading configuration: Begin"),this.configuration.loadConfigSettingsAndI18nMessages(i,t,this.log,s,P,this.passengerCountsByAgeCategory,this.tripType,M,y,r,this.passengerTypeCodes,o,a,g,h,f,x,this.dataRoute?.configPrefix),this.log.debug("[FlightSearchResultsComponent.ngOnInit] Loading configuration: End")}else this.isAgentSite||(this.store.dispatch(new Je),this.router.navigate([`/${_e}`]))})}setupCalculateQuotation(){$([this.store.select(yn),this.store.select(ae),this.store.select(Qe),this.store.select(ce),this.store.select(Ie),this.store.select(Ge),this.store.select(pe)]).pipe(U(()=>this.alive),he(([e,,i])=>e&&i!==null),X(([e,...i])=>i)).subscribe(e=>{let i=(0,n.cloneDeep)(e[0]),t=e[1],r=e[2];this.quotationSignal.set((0,n.cloneDeep)(e[3]));let s=e[4],u=e[5]!==null?e[5]:0,C=null,T=null,M=null,N=null;if((0,n.isArrayLike)(i)&&i.length>0&&(r===R.MultiCity?(0,n.isObjectLike)(i[u])&&(C=(0,n.cloneDeep)(i[u].fareOption),M=(0,n.cloneDeep)(i[u].childFareOption)):((0,n.isObjectLike)(i[0])&&(C=(0,n.cloneDeep)(i[0].fareOption),M=(0,n.cloneDeep)(i[0].childFareOption)),i.length>1&&(0,n.isObjectLike)(i[1])&&(T=(0,n.cloneDeep)(i[1].fareOption),N=(0,n.cloneDeep)(i[1].childFareOption)))),this.totalAmount=0,this.quotationSignal()!==null&&this.quotationSignal().charges!==null&&this.quotationSignal().charges.length>0&&this.configuration!==null){this.totalAmount=this.reservationsHelper.getSingleJourneyChargeCost(this.quotationSignal(),1,this.configuration.currencyCode),r===R.Return&&(this.totalAmount+=this.reservationsHelper.getSingleJourneyChargeCost(this.quotationSignal(),2,this.configuration.currencyCode));let w=this.reservationsHelper.getProcessingFee(this.quotationSignal(),1,1,this.configuration.currencyCode);w&&(this.totalAmount+=w.totalAmount)}else if(this.configuration.passengerTypeCodeEnabled)s.forEach(w=>{let V=0;C!==null&&C.fareCharges.filter(o=>o.applicablePassengerTypeCodes.filter(a=>a.code===w.code).length>0&&!o.bookingApplicability.optional).forEach(o=>{V+=o.currencyAmounts.filter(a=>a.currency.code===this.configuration.currencyCode).reduce((a,p)=>a+p.totalAmount,0)}),typeof t[w.code]<"u"&&t[w.code].count>0&&(this.totalAmount+=V*t[w.code].count)});else{let w=0;C!==null&&C.fareCharges.filter(d=>d.passengerApplicability.adult===!0&&!d.bookingApplicability.optional).forEach(d=>{w+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)});let V=t?.[v[v.Adult]];V?.count>0&&(this.totalAmount+=w*V.count);let K=0;M!==null?M.fareCharges.filter(d=>d.passengerApplicability.child===!0&&!d.bookingApplicability.optional).forEach(d=>{K+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)}):C!==null&&C.fareCharges.filter(d=>d.passengerApplicability.child===!0&&!d.bookingApplicability.optional).forEach(d=>{K+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)});let o=t?.[v[v.Child]];o?.count>0&&(this.totalAmount+=K*o.count);let a=0;C!==null&&C.fareCharges.filter(d=>d.passengerApplicability.infant===!0&&d.passengerApplicability.adult===!1&&d.passengerApplicability.child===!1&&!d.bookingApplicability.optional).forEach(d=>{a+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)});let p=t?.[v[v.Infant]];p?.count>0&&(this.totalAmount+=a*p.count);let g=0;T!==null&&T.fareCharges.filter(d=>d.passengerApplicability.adult===!0&&!d.bookingApplicability.optional).forEach(d=>{g+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)});let m=t?.[v[v.Adult]];m?.count>0&&(this.totalAmount+=g*m.count);let c=0;N!==null?N.fareCharges.filter(d=>d.passengerApplicability.child===!0&&!d.bookingApplicability.optional).forEach(d=>{c+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)}):T!==null&&T.fareCharges.filter(d=>d.passengerApplicability.child===!0&&!d.bookingApplicability.optional).forEach(d=>{c+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)});let h=t?.[v[v.Child]];h?.count>0&&(this.totalAmount+=c*h.count);let x=0;T!==null&&T.fareCharges.filter(d=>d.passengerApplicability.infant===!0&&d.passengerApplicability.adult===!1&&d.passengerApplicability.child===!1&&!d.bookingApplicability.optional).forEach(d=>{x+=d.currencyAmounts.filter(y=>y.currency.code===this.configuration.currencyCode).reduce((y,f)=>y+f.totalAmount,0)});let E=t?.[v[v.Infant]];E?.count>0&&(this.totalAmount+=x*E.count)}})}minSelectableReturnDate(){this.minSelectableReturnDate$=$([this.store.select(me),this.store.select(Ce),this.store.select(ke),this.store.select(Ye)]).pipe(U(()=>this.alive),he(([e,i])=>(0,n.isArray)(e?.searches)&&(0,n.isArray)(i)),X(e=>{let[i,t,r]=e,s=i?.searches?.[0]?.departureDate;if((0,n.isObject)(r)&&r.limitTripDuration&&(0,n.isObject)(s)){if((0,n.isObject)(t?.[0])){let u=this.dateAndTimeHelper.fromDateStructYMDToMoment(t[0]).add(r.minTripDuration,"days");s=this.dateAndTimeHelper.fromMomentToDateStructYMD(u)}else if((0,n.isObject)(s)){let u=this.dateAndTimeHelper.fromDateStructYMDToMoment(s).add(r.minTripDuration,"days");s=this.dateAndTimeHelper.fromMomentToDateStructYMD(u)}}return s}))}fetchMaxSelectableReturnDate(){this.maxSelectableReturnDate$=$([this.store.select(me),this.store.select(Ce),this.store.select(ke),this.store.select(Ye)]).pipe(U(()=>this.alive),he(([e,i])=>(0,n.isArray)(e?.searches)&&(0,n.isArray)(i)),X(e=>{let[i,t,r]=e,s=null;if((0,n.isObject)(r)&&r.limitTripDuration){if((0,n.isObject)(t?.[0])){let u=this.dateAndTimeHelper.fromDateStructYMDToMoment(t[0]).add(r.maxTripDuration,"days");s=this.dateAndTimeHelper.fromMomentToDateStructYMD(u)}else if((0,n.isObject)(i?.searches?.[0]?.departureDate)){let u=this.dateAndTimeHelper.fromDateStructYMDToMoment(i?.searches?.[0]?.departureDate).add(r.maxTripDuration,"days");s=this.dateAndTimeHelper.fromMomentToDateStructYMD(u)}}return s}))}isReturnJourneyPastNavigationDisabled(){this.isReturnJourneyPastNavigationDisabled$=$([this.store.select(Ze),this.store.select(Ce)]).pipe(X(e=>{let[i,t]=e,r=t?.[this.journeyIndexSignalFromStore()];return r?this.dateAndTimeHelper.compareDateStructYMD(r,i)>=0:!1}))}outboundJourneyDateSelected(e){this.log.trace("[FlightSearchResultsComponent.outboundJourneyDateSelected]",e),this.store.dispatch(new ci(e.next,this.journeyIndexSignalFromStore())),this.selectedJourneyDateSignal.set(e.next),this.configuration.outboundJourneySelectionConfiguration.travelOptionsFilterEnabled&&this.store.dispatch(new we(this.configuration.configPrefix))}navigateFutureOutboundTravelOptions(){this.store.dispatch(new di(this.visibleJourneyDates,this.journeyIndexSignalFromStore()))}navigatePastOutboundTravelOptions(){this.store.dispatch(new gi(this.visibleJourneyDates,this.journeyIndexSignalFromStore()))}outboundJourneyVisibleDatesChanged(e){this.store.dispatch(new pi(e.visibleDates,this.journeyIndexSignalFromStore())),this.visibleJourneyDates=e.visibleDates}outboundFareSelected(e){this.store.dispatch(new Xt),(0,n.isArrayLike)(this.selectedFareOption)&&this.outboundFareSelectionCleared(),this.store.select(ae).pipe(ie()).subscribe(i=>{let t=(0,n.cloneDeep)(i);(0,n.isArrayLike)(t)&&t.length>0?t[this.journeyIndexSignalFromStore()]=(0,n.cloneDeep)(e):(t=[],t.pu
2sh((0,n.cloneDeep)(e))),this.store.dispatch(new ye(t))}),this.setBookingSession(),this.log.debug("[FlightSearchResultsComponent.outboundFareSelected]",e)}outboundFareSelectionCleared(){if(this.tripType===R.Return)this.returnFareSelectionCleared();else if(this.tripType===R.MultiCity){let e=[];this.searches.forEach((i,t)=>{t>=this.journeyIndexSignalFromStore()&&e.push(t)}),this.removeOutboundFareSelectionOrMultiCityFareSelection(this.selectedJourneysSignal(),e)}else this.tripType===R.OneWay&&this.removeOutboundFareSelectionOrMultiCityFareSelection(this.selectedJourneysSignal(),[0]);this.invalidateNextStepInProgressBar(),this.log.debug("[FlightSearchResultsComponent.outboundFareSelectionCleared]"),this.store.dispatch(new zt)}setBookingSession(){}invalidateNextStepInProgressBar(){this.dispatchMultipleActions([new Je,new xe(`${this.navigationUrlHelper.getPrefixRoute()}${this.isAgentSite?Oe:Ae}`)])}removeOutboundFareSelectionOrMultiCityFareSelection(e,i){let t=(0,n.isArrayLike)(e)&&e.length>0?i.filter(s=>(0,n.isObjectLike)(e[s])):[],r=[];if((0,n.isArray)(t)&&t.length>0){let s=(0,n.cloneDeep)(e);(0,n.isArrayLike)(s)&&s.length>0?t.forEach(u=>{r.push(new Be({},s[u]?.fareOption?.bookingKey,!0)),s[u]=null}):s=null,r.push(new ye(s)),r.push(new Ee(null)),r.push(new Ue),r.push(new fe(i))}this.dispatchMultipleActions(r)}returnJourneyDateSelected(e){this.log.trace("[FlightSearchResultsComponent.returnJourneyDateSelected]",e),this.store.dispatch(new fi(e.next)),this.selectedReturnJourneyDateSignal.set(e.next),this.configuration.returnJourneySelectionConfiguration.travelOptionsFilterEnabled&&this.store.dispatch(new we(this.configuration.configPrefix))}navigateFutureReturnTravelOptions(){this.store.dispatch(new hi(this.visibleJourneyDates,this.journeyIndexSignalFromStore()))}navigatePastReturnTravelOptions(){this.store.dispatch(new yi(this.visibleJourneyDates,this.journeyIndexSignalFromStore()))}returnJourneyVisibleDatesChanged(e){this.visibleJourneyDates=e.visibleDates}returnFareSelected(e){this.store.select(ae).pipe(ie()).subscribe(i=>{let t=(0,n.cloneDeep)(i);(0,n.isArrayLike)(t)&&t.length>1?t[1]=(0,n.cloneDeep)(e):(0,n.isArrayLike)(t)&&t.length===1?t.push((0,n.cloneDeep)(e)):(t=[],t.push(null),t.push((0,n.cloneDeep)(e))),this.store.dispatch(new ye(t))}),this.setBookingSession(),this.log.debug("[FlightSearchResultsComponent.returnFareSelected]",e)}returnFareSelectionCleared(){$([this.store.select(ae),this.store.select(qe)]).pipe(ie()).subscribe(e=>{let i=(0,n.cloneDeep)(e[0]),t=null,r=null,s=[];(0,n.isArrayLike)(i)&&i.length>0&&((0,n.isObjectLike)(i[0])&&(t=i[0].fareOption),i.length>1&&(0,n.isObjectLike)(i[1])&&(r=i[1].fareOption));let u=(0,n.cloneDeep)(i);r!==null?(t===null?s.push(new Be({},r.bookingKey,!0)):t.bookingKey!==r.bookingKey&&s.push(new Be({},r.bookingKey,!0)),(0,n.isArrayLike)(u)&&(this.displayReturnTrip?(u[1]=null,s.push(new fe([1]))):(u=null,s.push(new fe([0,1]))))):(u[0]=null,s.push(new fe([0]))),s.push(new ye(u)),s.push(new Ee(null)),s.push(new Ue),this.dispatchMultipleActions(s)}),this.invalidateNextStepInProgressBar(),this.log.debug("[FlightSearchResultsComponent.returnFareSelectionCleared]")}isReturnJourneyDepartureTimeValid(e,i){if(e!==null&&i!==null){let t=e.flights.length,r=this.reservationsHelper.getAirportLocalScheduledTime(e.flights[t-1].arrival);if(this.reservationsHelper.getAirportLocalScheduledTime(i.flights[0].departure).isSameOrBefore(r))return!1}return!0}isCurrentJourneyDepartureTimeValid(e){if(e>0){let i=this.selectedJourneysSignal()?.[e-1],t=this.selectedJourneysSignal()?.[e];if((0,n.isObject)(i)&&(0,n.isObject)(t))return this.isReturnJourneyDepartureTimeValid(i.travelOption,t.travelOption)}return!0}nextStep(){return this.log.debug("[FlightSearchResultsComponent.nextStep]"),$([this.store.select(qe),this.store.select(me),this.store.select(st),this.store.select(Pi)]).pipe(ie()).subscribe(e=>{let i=null,t=null,r=null,s=null,u=!0;if(i=e[0],t=e[1],r=e[2],s=e[3],t.tripType===R.Return){if(!(0,n.isArrayLike)(i.selectedJourneys)||i.selectedJourneys.length<2||!(0,n.isObjectLike)(i.selectedJourneys[0])||!(0,n.isObjectLike)(i.selectedJourneys[1])?u=!1:u=this.isReturnJourneyDepartureTimeValid(i.selectedJourneys[0].travelOption,i.selectedJourneys[1].travelOption),u&&!this.displayReturnTrip){u=!1,this.store.dispatch(new Se(!0));return}}else t.tripType===R.OneWay?u=!!((0,n.isArrayLike)(i.selectedJourneys)&&i.selectedJourneys.length===1&&(0,n.isObjectLike)(i.selectedJourneys[0])):u=this.selectedJourneysSignal().every(C=>(0,n.isObject)(C))&&this.selectedJourneysSignal().length-1===this.journeyIndexSignalFromStore()?this.selectedJourneysSignal().every((C,T)=>this.isCurrentJourneyDepartureTimeValid(T)):!0;if(u&&this.tripType===R.MultiCity&&this.journeyIndexSignalFromStore()<t.searches.length-1){this.selectedFareOptionSignal.set(null),this.selectedTravelOptionSignal.set(null),this.store.dispatch(new ue(this.journeyIndexSignalFromStore()+1));return}if(u&&this.hasValidPaymentMethods){let C=(0,n.cloneDeep)(this.reservationSignal());if((!(0,n.isObjectLike)(C.paymentTransactions)||C.paymentTransactions.length===0)&&this.paymentMethods!==null&&this.paymentMethods.length===1&&!this.isPseudoPaymentMethod(this.paymentMethods[0])&&this.configuration.autoSelectPaymentMethodEnabled&&this.totalAmount>0){let T={current:null,next:(0,n.cloneDeep)(this.paymentMethods)};C.paymentTransactions=this.reservationsHelper.processPaymentMethodChange(T,C.paymentTransactions?C.paymentTransactions:[],this.currency,this.activeLanguageSignal(),this.configSettings,this.isAgentSite?r:null,this.isAgentSite?s:null),C.paymentTransactions.length===0&&(C.paymentTransactions=null),this.store.dispatch(new Qt(C)),this.requestQuotation()}try{this.quotationTotal$.pipe(ie(),U(()=>this.alive)).subscribe(T=>{let M={};
2Object.keys(this.passengerCountsByAgeCategory).forEach(w=>{M[w]=this.passengerCountsByAgeCategory[w].count});let N=this.selectedJourneysSignal().reduce((w,{travelOption:V,fareOption:K})=>w+this.sumAllFaresOfFareOption(V.fareOptions.filter(o=>o.fareType?.identifier===K.fareType?.identifier)),0);this.gtmHelper.pushLayer(new Et(N,T,M,this.currency.code,this.selectedJourneysSignal().map(w=>({travelOption:w.travelOption,fareOption:w.fareOption})),w=>this.sumAllFaresOfFareOption(w)))})}catch(T){this.log.error("[FlightSearchResultsComponent] nextStep",T)}this.router.navigateByUrl(`/${this.dataRoute?.nextPage??""}`)}else if(this.tripType===R.Return)(0,n.isArrayLike)(i.selectedJourneys)&&(0,n.isObjectLike)(i.selectedJourneys[0])&&(0,n.isObjectLike)(i.selectedJourneys[0].fareOption)&&(!(0,n.isObjectLike)(i.selectedJourneys[1])||!(0,n.isObjectLike)(i.selectedJourneys[1].fareOption))&&this.store.dispatch(new Se(!0));else if(this.tripType===R.MultiCity&&(0,n.isArrayLike)(i.selectedJourneys)&&(0,n.isObjectLike)(i.selectedJourneys[this.journeyIndexSignalFromStore()])&&(0,n.isObjectLike)(i.selectedJourneys[this.journeyIndexSignalFromStore()].fareOption)&&this.journeyIndexSignalFromStore()<t.searches.length&&(!(0,n.isObjectLike)(i.selectedJourneys[this.journeyIndexSignalFromStore()+1])||!(0,n.isObjectLike)(i.selectedJourneys[this.journeyIndexSignalFromStore()+1].fareOption)))if(!u&&t.searches.length-1===this.journeyIndexSignalFromStore()){this.selectedFareOption=null,this.selectedTravelOption=null;let C=this.selectedJourneysSignal().findIndex((T,M)=>!this.isCurrentJourneyDepartureTimeValid(M));C>=0&&this.store.dispatch(new ue(C))}else this.journeyIndexSignalFromStore()<t.searches.length-1&&(this.selectedFareOption=null,this.selectedTravelOption=null,this.store.dispatch(new ue(this.journeyIndexSignalFromStore()+1)))})}previousStep(){this.tripType===R.MultiCity?this.journeyIndexSignalFromStore()===0?this.goToHomePage():this.store.dispatch(new ue(this.journeyIndexSignalFromStore()-1)):this.tripType===R.Return?this.displayReturnTrip?this.store.dispatch(new Se(!1)):this.goToHomePage():this.goToHomePage()}goToHomePage(){this.store.dispatch(new ue(0)),this.store.dispatch(new Se(!1));let e=this.navigationUrlHelper.getPrefixRoute()?Yt:_e;this.router.navigateByUrl(`/${e}`)}uiLanguageChanged(e){this.store.dispatch(new Ci(e.next))}ngOnDestroy(){this.alive=!1}stopPropagation(e){e.preventDefault(),e.stopPropagation()}closeDialog(){this.displayPreFlightSelectionMessageDialog=!1}login(e){this.jwtAuthenticationService.isAuthenticated()&&this.jwtAuthenticationService.getValidAuthenticationUser().pipe(U(()=>this.alive)).subscribe(i=>{let t=i===null?"":i.username;t&&this.store.dispatch(new Zt("","","","","","","","","",t,!1,!0,!0))})}logout(e){this.store.dispatch(new ei)}pendingBookingGatesThisFlow(){if(!this.hasPendingUnpaidBooking())return!1;let e=this.navigationUrlHelper.isAgentBookingRoute()?"agentBooking":"booking";return this.configSettingsSignal()?.[kn[e]]==="true"}requestQuotation(){this.pendingBookingGatesThisFlow()||(this.tripType===R.OneWay&&this.selectedFareOptionSignal()!==null||this.tripType===R.Return&&this.selectedTravelOptionSignal()!==null&&this.selectedReturnTravelOptionSignal()!==null&&this.isReturnJourneyDepartureTimeValid(this.selectedTravelOptionSignal(),this.selectedReturnTravelOptionSignal())||this.tripType===R.MultiCity&&this.selectedJourneysSignal().filter((e,i)=>e!==null&&e.fareOption!==null).length===this.searches.length&&this.selectedJourneysSignal().every((e,i)=>this.isCurrentJourneyDepartureTimeValid(i)))&&this.store.select(Pe).pipe(ie()).subscribe(e=>{let i=(0,n.cloneDeep)(e);i!==null&&i.passengers!==null&&i.passengers.forEach(t=>{this.reservationsHelper.setDummyPassengerDataForQuotationCall(t)}),this.store.dispatch(new Wt(i,!0))})}onShowFareOptions(e,i){let{status:t,travelOptionKey:r}=e,s=i?.find(u=>u.key===r);if(t===!0&&(0,n.isObject)(s)){let u=[];s?.fareOptions.forEach(C=>{u.push(C?.fareClass?.key)}),(0,n.uniq)(u).length>0&&this.store.dispatch(new ai(u))}}getJourneysTravelOptions(){let e=[this.selectedTravelOptionSignal()];return this.tripType===R.Return&&e.push(this.selectedReturnTravelOptionSignal()),e}getTotalJourneys(){return this.tripType===R.OneWay?1:this.tripType===R.Return?2:(0,n.isArrayLike)(this.searches)?this.searches.length:0}get hasValidPaymentMethods(){return!new se(this.log,this.configSettings??{},"config").getBoolean("loyaltyLogin.acceptOnAccount.enabled",!1)&&this.paymentMethods?.length===1&&!(0,n.isObject)(this.selectedAgencyCompany)&&this.paymentMethods[0]?.type?.onAccount?!1:this.reservationsHelper.hasValidPaymentMethods(this.paymentMethods,this.configuration.allowVoucherOnlyPayment)}
2isPseudoPaymentMethod(e){return[ln,un].includes(e?.identifier)}onOpenPassSelectionModal(){this.store.dispatch(new ti)}sumAllFaresOfFareOption(e){if(this.configuration.passengerTypeCodeEnabled){let i=this.store.selectSignal(Mi(Ut))();return this.travelOptionsHelper.sumAllFareOfFareOptionByPtcCode(e,this.passengerTypeCodes,this.configuration.passengerCountsByAgeCategory,this.configuration.currencyCode,!1,i,this.configuration.fareOptionsIncludeTax,this.configuration.displayedChargeTypeCodes)}else return this.travelOptionsHelper.sumAllFareOfFareOptionByAgeCategory(e,this.configuration.currencyCode,this.configuration.passengerCountsByAgeCategory,!1,this.configuration.fareOptionsIncludeTax,this.configuration.displayedChargeTypeCodes)}switchToInterlineBooking(){this.acceptedInterlineOffer=!0,this.interlineBookingSearchCriteria$.next(null),this.returnFareSelectionCleared(),this.outboundFareSelectionCleared();let e=[new si,new Si(!0),new Re(void 0,void 0,this.navigationUrlHelper.isAuthenticatedAsAgent?null:`/${this.dataRoute?.nextPage??null}`)];this.dispatchMultipleActions(e)}
2dispatchMultipleActions(e){for(let i=0;i<e.length;i++){let t=e[i];i!==e.length-1&&(t[nn]=!1),this.store.dispatch(t)}}refreshSession(){this.bookingSessionTimerService.refreshSession()}onResetTravelOptionsFilterAndSort(){this.store.dispatch(new ii(!1)),this.store.dispatch(new we(this.configuration.configPrefix))}getConsideredPTCForLowestFare(e){let i=new se(this.log,e,"config"),t=i.getBoolean("passengerTypeCodes.enabled",!1),r=i.getStrings("passengerTypeCodes.availableCodes",[]);return t?i.getStrings("passengerTypeCodes.consideredForLowestFare",["ADT","SRC","YTH"]).filter(s=>r.includes(s)):[]}getFilteredTravelOptions(e,i,t){if((0,n.isObject)(t)&&(0,n.isObject)(t.connectionsFilter)&&(0,n.isObject)(t.priceFilter)&&(0,n.isObject)(t.durationFilter)){let{connectionsFilter:r,priceFilter:s,durationFilter:u}=t;if(r?.enabled){let{min:C,max:T}=r;e=e.filter(({flights:M})=>{let N=M.length-1;return N>=C&&N<=T})}s?.enabled&&(e=e.filter(C=>{let T=this.getLowestFare(C.fareOptions);return T>=s.min&&T<=s.max})),u?.enabled&&(e=e.filter(C=>C.enRouteHours>=u.min&&C.enRouteHours<=u.max))}if((0,n.isObject)(i)){let{sortBy:r,direction:s}=i;switch(r){case le.DepartureTime:{e=(0,n.orderBy)(e,[u=>u.flights[0]?.departure?.localScheduledTime||""],[s]);break}case le.ArrivalTime:{e=(0,n.orderBy)(e,[u=>u.flights?.[u?.flights.length-1]?.arrival?.localScheduledTime||""],[s]);break}case le.Connections:{e=(0,n.orderBy)(e,[u=>u.numberOfStops],[s]);break}case le.Price:{e=(0,n.orderBy)(e,[u=>this.getLowestFare(u.fareOptions)],[s]);break}case le.Duration:{e=(0,n.orderBy)(e,[u=>u.enRouteHours,u=>this.hasPreferredCarrier(u,this.configuration.preferredCarriers)],[s,"asc"]);break}}}return e}hasPreferredCarrier(e,i){return(e.flights||[]).map(s=>s.operatingPartnerCarrier?.code||s.airlineCode?.code).every(s=>i.includes(s))?0:1}getLowestFare(e){let i=this.getConsideredPTCForLowestFare(this.configSettings),t=new oi({seatsAvailable:!1,lowestAvailableFare:Number.MAX_VALUE,lowestFare:Number.MAX_VALUE,isSeatSale:!1,isAllFlightsSoldOut:!1});return this.travelOptionsHelper.getLowestTravelOptionFareAmount(e,t,i,this.configuration.fareOptionsIncludeTax,this.configuration.displayedChargeTypeCodes),t.lowestFare}onRemovePromoCode(){this.promoCode()&&(this.store.dispatch(new Ke(!1)),this.store.dispatch(new Ne(null)),this.store.dispatch(new Le),this.store.dispatch(new Re(null,null,null)))}onPromoCodePickerChanged(e){this.store.dispatch(new Ne(e)),this.store.dispatch(new Ke(!1)),this.store.dispatch(new Le),this.store.dispatch(new Re(null,null,null))}static{this.\u0275fac=function(i){return new(i||l)(Y(He),Y(Gt),Y(ri),Y(Nt),Y(Jt),Y(xt),Y(Ht),Y(jt),Y(Pt),Y(Vt),Y(_n),Y(Rn))}}static{this.\u0275cmp=bt({type:l,selectors:[["app-flight-search-results"]],standalone:!1,features:[Ot([He])],decls:39,vars:47,consts:[["reservationCharges",""],[3,"showSpinner"],["aria-label","header",1,"sticky-top","z-index-fixed","bg-white"],[3,"expiryTime","suppressSessionModals","configuration"],[1,"page-header","navbar","navbar-expand-sm","navbar-dark","bg-primary","px-4","justify-content-between",3,"onChange","onLogin","onLogout","configuration","activeLanguage","searchSummary","quotationTotal"],[3,"configuration","searchSummary"],[3,"configuration","selectedPassDef"],[3,"steps","furthestStepUrl"],[3,"configuration"],[1,"page-body","container-fluid","bg-light"],[1,"container-lg"],[1,"row"],[1,"col-sm-8"],[1,"alert","alert-info","d-flex","flex-column","flex-md-row","align-items-md-center","gap-2","mb-4"],[1,"row","outbound","journey","mb-4",3,"showPendingBookingReleasedNotice","configuration","travelOptionsOnSelectedDate","sortOrder","selectedTravelOption","selectedFareOption","selectedJourneyDate","journeyDateSummaries","disablePastJourneyDateNavigation","fareRuleTypeByKey","fareRuleTypeKeyByFareClassKey","minSelectableDate","flightSearchModel","fareClassByKey","isRoundTrip","currentJourneyIndex","travelOptionsLoading","totalJourneys","travelOptions","isReturnTrip","partnerCarriers","offerInterline","filterAvailable","connectionFilterAvailable","durationFilterAvailable","priceFilterAvailable","dataTestPrefix"],[1,"row","inbou
2nd","journey","mb-4",3,"showPendingBookingReleasedNotice","configuration","travelOptionsOnSelectedDate","sortOrder","selectedTravelOption","selectedFareOption","selectedJourneyDate","journeyDateSummaries","disablePastJourneyDateNavigation","fareRuleTypeByKey","fareRuleTypeKeyByFareClassKey","minSelectableDate","maxSelectableDate","flightSearchModel","travelOptionsLoading","fareClassByKey","partnerCarriers","currentJourneyIndex","totalJourneys","travelOptions","isReturnTrip","isRoundTrip","offerInterline","filterAvailable","connectionFilterAvailable","durationFilterAvailable","priceFilterAvailable"],["aria-label","errors"],[1,"row","error-container","alert","alert-danger"],["id","globalCartDropdown",1,"cart","col-sm-4","d-none","d-sm-block",3,"allAncillaryOptionsForAllJourneys","d-sm-block","configuration","tripType","reservation","quotation","journeysTravelOptions","searchReturnFlightDate","outboundFareOption","returnJourneyFareOption","passengerCountsByAgeCategory","promoCode","isPromoCodeValid","promoCodeDescription","alwaysShowPromoCode","passengerTypeCodes","selectedJourneys","searches","seatSelectionOptions","voucherPaymentIdentifier","selectedJourneyIndex","showRemovePromoCode"],[1,"row","mb-4"],[1,"page-controllers","container-fluid","bg-light"],[1,"container-lg","pb-5"],[1,"col-sm-8","d-flex","action-footer"],["type","button",1,"btn","btn-outline-primary","rounded-pill"],[1,"btn","btn-outline-primary","rounded-pill",3,"href"],["type","button","data-test-id","search-result-continue",1,"btn","btn-primary","rounded-pill"],["aria-label","footer",1,"site-footer"],[1,"page-footer","container-fluid",3,"configuration"],[3,"refreshSession","expiryTime","suppressSessionModals","configuration"],[3,"openPassSelectionModal","configuration","selectedPassDef"],["tabindex","-1","role","dialog",1,"modal","fade","show",3,"click"],["role","document",1,"modal-dialog","modal
2-lg","modal-dialog-centered",3,"click"],[1,"modal-content"],[1,"modal-body","mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-backdrop","fade","show"],["size","lg","aria-hidden","true",1,"me-2","fw-bold",3,"icon"],[1,"flex-grow-1","fw-bold"],[3,"onChange","configuration","value","showLabel"],[1,"card","valid-promo-code","mb-4","shadow-sm","d-lg-none","d-sm-none","d-md-none","card-border-start-bold","border-success"],[1,"card","in-valid-promo-code","mb-4","shadow-sm","d-lg-none","d-sm-none","d-md-none","card-border-start-bold","border-danger"],[1,"card-body"],[1,"mt-2",3,"innerHTML"],[1,"row","outbound","journey","mb-4",3,"expandInterlineBookingSearch","onFareSelected","onFareSelectionCleared","onNavigateToFuture","onNavigateToPast","onJourneyDateSelected","onVisibleDatesChange","showFareOptions","resetFilter","showPendingBookingReleasedNotice","configuration","travelOptionsOnSelectedDate","sortOrder","selectedTravelOption","selectedFareOption","selectedJourneyDate","journeyDateSummaries","disablePastJourneyDateNavigation","fareRuleTypeByKey","fareRuleTypeKeyByFareClassKey","minSelectableDate","flightSearchModel","fareClassByKey","isRoundTrip","currentJourneyIndex","travelOptionsLoading","totalJourneys","travelOptions","isReturnTrip","partnerCarriers","offerInterline","filterAvailable","connectionFilterAvailable","durationFilterAvailable","priceFilterAvailable","dataTestPrefix"],[1,"row","inbound","journey","mb-4",3,"expandInterlineBookingSearch","onFareSelected","onFareSelectionCleared","onNavigateToFuture","onNavigateToPast","onJourneyDateSelected","showFareOptions","onVisibleDatesChange","resetFilter","showPendingBookingReleasedNotice","configuration","travelOptionsOnSelectedDate","sortOrder","selectedTravelOption","selectedFareOption","selectedJourneyDate","journeyDateSummaries","disablePastJourneyDateNavigation","fareRuleTypeByKey","fareRuleTypeKeyByFareClassKey","minSelectableDate","maxSelectableDate","flightSearchModel","travelOptionsLoading","fareClassByKey","partnerCarriers","currentJourneyIndex","totalJourneys","travelOptions","isReturnTrip","isRoundTrip","offerInterline","filterAvailable","connectionFilterAvailable","durationFilterAvailable","priceFilterAvailable"],[1,"error"],[1,"error",3,"innerHTML"],["id","globalCartDropdown",1,"cart","col-sm-4","d-none","d-sm-block",3,"removePromoCode","allAncillaryOptionsForAllJourneys","configuration","tripType","reservation","quotation","journeysTravelOptions","searchReturnFlightDate","outboundFareOption","returnJourneyFareOption","passengerCountsByAgeCategory","promoCode","isPromoCodeValid","promoCodeDescription","alwaysShowPromoCode","passengerTypeCodes","selectedJourneys","searches","seatSelectionOptions","voucherPaymentIdentifier","selectedJourneyIndex","showRemovePromoCode"],[3,"ngModelChange","configuration","ngModel"],["type","button",1,"btn","btn-outline-primary","rounded-pill",3,"click"],["type","button","data-test-id","search-result-continue",1,"btn","btn-primary","rounded-pill",3,"click"]],template:function(i,t){if(i&1&&(Z(0,"app-loading-spinner",1),_(1,"async"),_(2,"async"),F(3,"section",2),H(4,io,1,3,"app-booking-session-timer",3),F(5,"app-site-header",4),_(6,"async"),G("onChange",function(s){return t.uiLanguageChanged(s)})("onLogin",function(s){return t.login(s)})("onLogout",function(s){return t.logout(s)}),J(),H(7,no,1,2,"app-site-header-flight-summary-mobile",5),H(8,oo,2,4,"app-site-header-selected-pass",6),_(9,"async"),Z(10,"app-progress-bar",7),J(),Z(11,"app-page-header-message",8),F(12,"div",9)(13,"div",10),H(14,ro,9,6),F(15,"div",11)(16,"div",12),H(17,so,5,5,"div",13),H(18,co,2,1),H(19,po,8,41,"app-journey-selection",14),H(20,go,10,45,"app-journey-selection",15),F(21,"section",16),H(22,ho,3,1,"div",17),H(23,yo,3,1,"div",17),H(24,fo,3,3,"div",17),_(25,"async"),J()(),H(26,So,4,27,"app-reservation-charges-breakdown",18),J(),H(27,mo,3,4,"div",19),J()(),F(28,"div",20)(29,"div",21)(30,"div",11)(31,"div",22),H(32,Co,2,1,"button",23),H(33,bo,2,2,"a",24),H(34,vo,2,1,"button",25),_(35,"async"),_(36,"async"),J()()()(),F(37,"section",26),Z(38,"app-site-footer",27),J()),i&2){let r;L("showSpinner",(A(1,33,t.initialDataLoading$)||A(2,35,t.travelOptionsLoading$))&&!t.isAgentSite),b(4),j((r=t.configuration.bookingSessionTimer.bookingSessionTimerEnabled&&t.bookingSessionExpiry())?4:-1,r),b(),L("configuration",t.configuration.siteHeaderConfiguration)("activeLanguage",t.activeLanguageSignal())("searchSummary",t.searchSummaryComputed())("quotationTotal",A(6,37,t.quotationTotal$)),b(2),j(t.configuration.siteHeaderConfiguration!=null&&t.configuration.siteHeaderConfiguration.flightSearchSummaryEnabled?7:-1),b(),j(t.configuration.siteHeaderSelectedPassConfiguration.enabled&&A(9,39,t.hasAvailablePASSes$)?8:-1),b(2),L("steps",t.availableStepsSignal())("furthestStepUrl",t.furthestStepUrlSignal()),b(),L("configuration",t.configuration.pageHeaderMessageConfiguration),b(3),j(t.configuration!==null&&t.configuration.preFlightSelectionMessageDialogEnabled?14:-1),b(2),ne("
2col-sm-12",!(!(t.configuration==null||t.configuration.reservationChargesBreakdownConfiguration==null)&&t.configuration.reservationChargesBreakdownConfiguration.enabled)||t.isAgentSite),b(),j(t.configuration.promoCodePickerConfiguration.enabled?17:-1),b(),j(t.promoCode()&&t.isPromoCodeValid()!==null?18:-1),b(),j(!t.displayReturnTrip||t.isMultiCityTrip()?19:-1),b(),j(t.displayReturnTrip&&t.isRoundTrip()?20:-1),b(2),j(t.isReturnJourneyDepartureTimeValid(t.selectedTravelOptionSignal(),t.selectedReturnTravelOptionSignal())?-1:22),b(),j(t.isMultiCityTrip()&&!t.isCurrentJourneyDepartureTimeValid(t.journeyIndex)?23:-1),b(),j(t.selectedTravelOptionSignal()!==null&&!A(25,41,t.paymentMethodsLoading$)&&!t.hasValidPaymentMethods?24:-1),b(2),j(t.isAgentSite?-1:26),b(),j(t.configuration.pageFooterMessageConfiguration.footerAcknowledgmentEnabled||t.configuration.pageFooterMessageConfiguration.footerMessageEnabled?27:-1),b(4),ne("col-sm-12",!(!(t.configuration==null||t.configuration.reservationChargesBreakdownConfiguration==null)&&t.configuration.reservationChargesBreakdownConfiguration.enabled)||t.isAgentSite)("justify-content-between",!t.isAgentSite)("justify-content-end",t.isAgentSite),b(),j(t.configuration.isBackButtonEnabled&&!t.isAgentSite?32:-1),b(),j(t.configuration.isNavigateButtonEnabled&&!t.isAgentSite?33:-1),b(),j(!A(35,43,t.initialDataLoading$)&&!A(36,45,t.travelOptionsLoading$)&&t.selectedFareOptionSignal()!=null&&(t.footerMessageAcknowledgment||!t.configuration.pageFooterMessageConfiguration.footerAcknowledgmentEnabled)&&t.hasValidQuotationToGoToNextPage()?34:-1),b(4),L("configuration",t.configuration.siteFooterConfiguration)}},dependencies:[Bt,Jn,Rt,wt,En,on,Vn,Kn,qn,rn,$n,Ln,Nn,Un,wn,_t,kt],encapsulation:2})}}return l})();var Lr=(()=>{class l{static{this.\u0275fac=function(i){return new(i||l)}}static{this.\u0275mod=vt({type:l})}static{this.\u0275inj=mt({imports:[At,Mt,Yn,Kt]})}}return l})();export{Br as a,Lr as b};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.