1"use strict";(self.webpackChunkmy_travel_portal_frontend=self.webpackChunkmy_travel_portal_frontend||[]).push([[8718],{71999:function(e,t,i){i.d(t,{A:function(){return I}});i(65043);var n=i(97508),r=i(91688),a=i(50805),o=i(60400),s=i(67978),l=i(4769),c=i(45205),d=i(86178),h=i.n(d),g=i(53536),u=i.n(g),p=i(60483),m=i(70579);const{Cart:{basketSummaryText:f,cartHeading:v,cartSubHeading:_,transferHeading:x,total:y,travelBasketText:O,beforeTrip:N,afterTrip:j,prepaidGratuities:b}}=o.Aq.getTranslations(),{Cart:{themeName:F}}=o.Aq.getConfigs();var I=(0,r.y)((0,n.Ng)((e=>({activeBooking:e.activeBooking,activeBookingDetails:e.activeBookingDetails,cart:e.cart})),(e=>({actions:(0,a.zH)(s,e),thunks:(0,a.zH)(l,e)})))((e=>{const{cart:t,activeBookingDetails:i={}}=e,{allPassengers:n=[]}=i;let r=0;t.forEach((e=>{const{amount:t,paxIds:i,price:n}=e.data;"hotel"===e.productType||"flights"===e.productType?r+=n:r+=t*i.length}));const a=o.Aq.getCurrencyCode(),s=t.filter((e=>"hotel"===e.productType));let l,d,g=0,I=0;return s.length>0&&s.forEach((e=>{"before"===e.subType&&(g+=e.data.price,l=e.data.hotelData),"after"===e.subType&&(I+=e.data.price,d=e.data.hotelData)})),(0,m.jsxs)(c.A,{themeName:F,componentName:"Cart",children:[(0,m.jsx)(c.A.Header,{children:f}),(0,m.jsxs)(c.A.Body,{children:[(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("p",{children:v}),(0,m.jsx)("p",{children:_})]}),t.filter((e=>"hotel"===e.productType)).length>0&&(0,m.jsx)("strong",{className:"IOFlightConfirmation__sectionHeading",children:"Extra Nights"}),g>0&&(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart",children:[(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart--desc",children:[(0,m.jsx)("strong",{children:N}),(0,m.jsx)("div",{children:`${l.city}, ${l.country} at ${l.name}`})]}),(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--price",children:`${a} ${g}`})]}),I>0&&(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart",children:[(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart--desc",children:[(0,m.jsx)("strong",{children:j}),(0,m.jsx)("div",{children:`${d.city}, ${d.country} at ${d.name}`})]}),(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--price",children:`${a} ${I}`})]}),t.filter((e=>"flights"===e.productType)).length>0&&(0,m.jsx)("strong",{className:"IOFlightConfirmation__sectionHeading",children:"Flights"}),t.filter((e=>"flights"===e.productType)).map((e=>{const t=e.flightData.itinerary,i=e.mode,r=t.filter((e=>"1"===e.requestedSegmentRef)),s=t.filter((e=>"2"===e.requestedSegmentRef)),l=u().groupBy(t,"requestedSegmentRef"),c=e.data.paxIds,d=[];return c.forEach((e=>{const t=n.find((t=>Number(t.id)===Number(e)));t&&d.push(`${t.title} ${t.firstName} ${t.lastName}`)})),(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart IOFlightConfirmation__flightSection",children:[(0,m.jsx)("div",{className:"IOFlightConfirmation__flightDetail",children:"round"===i?(0,m.jsxs)(m.Fragment,{children:[r.length>0&&(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart--desc",children:[(0,m.jsxs)("div",{className:"IOFlightConfirmation__flightInfo",children:[(0,m.jsx)("strong",{children:r[0].depart}),(0,m.jsx)("span",{className:"IOFlightConfirmation__seperator",children:"-"}),(0,m.jsx)("strong",{children:r[r.length-1].arrive})]}),(0,m.jsx)("div",{className:"IOFlightConfirmation__flightInfo",children:r[0].airline.name}),(0,m.jsx)("div",{className:"IOFlightConfirmation__flightInfo",children:h().parseZone(r[0].departDate).format("ddd DD MMM, YYYY")}),(0,m.jsxs)("div",{className:"IOFlightConfirmation__flightInfo IOFlightConfirmation__guestInfo",children:[(0,m.jsx)("strong",{children:"Guests: "}),n.length===d.length?"ALL":`${d.join(",")}`]})]}),s.length>0&&(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart--desc",children:[(0,m.jsxs)("div",{className:"IOFlightConfirmation__flightInfo",children:[(0,m.jsx)("strong",{children:s[0].depart}),(0,m.jsx)("span",{className:"IOFlightConfirmation__seperator",children:"-"}),(0,m.jsx)("strong",{children:s[s.length-1].arrive})]}),(0,m.jsx)("div",{className:"IOFlightConfirmation__flightInfo",children:s[0].airline.name}),(0,m.jsx)("div",{className:"IOFlightConfirmation__flightInfo",children:h().parseZone(s[0].departDate).format("ddd DD MMM, YYYY")}),(0,m.jsxs)("div",{className:"IOFlightConfirmation__flightInfo IOFlightConfirmation__guestInfo",children:[(0,m.jsx)("strong",{children:"Guests: "}),n.length===d.length?"ALL":`${d.join(",")}`]})]})]}):Object.keys(l).map((e=>(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart--desc",children:[(0,m.jsxs)("div",{className:"IOFlightConfirmation__flightInfo",children:[(0,m.jsx)("strong",{children:l[e][0].depart}),(0,m.jsx)("span",{className:"IOFlightConfirmation__seperator",children:"-"}),l[e][l[e].length-1]&&(0,m.jsx)("strong",{children:l[e][l[e].length-1].arrive})]}),(0,m.jsx)("div",{className:"IOFlightConfirmation__flightInfo",children:l[e][0].airline.name}),(0,m.jsx)("div",{className:"IOFlightConfirmation__flightInfo",children:h().parseZone(l[e][0].departDate).format("ddd DD MMM, YYYY")}),(0,m.jsxs)("div",{className:"IOFlightConfirmation__flightInfo IOFlightConfirmation__guestInfo",children:[(0,m.jsx)("strong",{children:"Guests: "}),`${d.join(",")}`]})]})))}),(0,m.jsx)("div",{className:"IOFlightConfirmation__cart--price",children:(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--price IOFlightConfirmation__cart--flightPrice",children:`${a} ${e.data.price.toFixed(2)}`})})]},o.Aq.getUID())})),t.filter((e=>"transfer"===e.productType)).length>0&&(0,m.jsx)("strong",{className:"IOFlightConfirmation__sectionHeading",children:x}),t.filter((e=>"transfer"===e.productType)).map((e=>(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart",children:[(0,m.jsx)("div",{className:"IOFlightConfirmation__cart--desc",children:e.data.description}),(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--price",children:`${a} ${e.data.amount*e.data.paxIds.length}`})]},o.Aq.getUID()))),t.filter((e=>"gratuities"===e.productType)).length>0&&(0,m.jsx)("strong",{children:b}),t.filter((e=>"gratuities"===e.productType)).map((e=>(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart",children:[(0,m.jsx)("div",{className:"IOFlightConfirmation__cart--desc",children:e.data.productName}),(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--price",children:`${a} ${e.data.amount*e.data.paxIds.length}`})]},o.Aq.getUID()))),(0,m.jsxs)("div",{className:"IOFlightConfirmation__cart",children:[(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--desc",children:y}),(0,m.jsx)("strong",{className:"IOFlightConfirmation__cart--price",children:`${a} ${Number(r).toFixed(2)}`})]}),(0,m.jsx)("div",{className:"text-center IOFlightConfirmation__totalHeading",children:(0,m.jsx)(p.A,{onClick:t=>{const{history:i}=e;i.push("/travelbasket"),t.preventDefault()},className:"primary medium-down-expanded IOFlightSuccess__text-case",disabled:0===t.length,children:O})})]})]})})))},7263:function(e,t,i){i.d(t,{A:function(){return v}});i(65043);var n=i(60400),r=i(45205),a=i(64097),o=i(62582),s=i(91688),l=(i(
151763),i(97508)),c=i(67978),d=i(50805),h=i(53536),g=i.n(h),u=i(54939),p=i(70579);const m=({activeBooking:e,activeBookingDetails:t,bookingDetailsForOverview:i,sellingCompanyShortName:r})=>{const{App:{routes:o,FTCSidebarNavigationRoutes:{clientDirectRoutes:s,travelAgentRoutes:l},showKnowBeforeYouGoPage:c,tppProductsIds:d}}=n.Aq.getConfigs(),{isFullyOrOverPaid:h,isSpecialOrGroupBookingType:u,travelExtraConfig:p={},paymentInstalmentPlanTileState:m,instalmentPlan:f,passengers:v}=t,{bookingNumber:_,isfutureTravelCredit:x,tripStarted:y,tripEnded:O}=e,{isLeadPassenger:N}=v.find((({isLoggedInPassenger:e})=>e))||{},{bookingType:j}=_;let b=g().cloneDeep(o);const F=sessionStorage.getItem("insecurelogin");F&&(b=b.filter((e=>!e.hideInInsecureMode)));const{bookingDetails:{tours:I=[]}={}}=i;let C=!1;I.filter((e=>e.tourType!==a.m.DAY_TOUR)).length>1&&r.indexOf("USAS")>=0&&I.forEach((e=>{e.travelProtectionPerPax&&e.travelProtectionPerPax.length>0&&(C=!0)}));let k=!1;r.indexOf("USAS")>=0&&I.forEach((e=>{e.travelProtectionPerPax&&e.travelProtectionPerPax.length>0&&e.travelProtectionPerPax.forEach((e=>{d.indexOf(e.data.productId)>=0&&(k=!0)}))}));const A=b.find((e=>"KnowBeforeYouGo"===e.name));if(A&&(A.hideFromNavigation=!c),x){(e=>{b.forEach((t=>{e.includes(t.path)||(t.hideFromNavigation=!0)}))})(j===a.m.BOOKING_TYPE_TRAVEL_AGENT?l:s)}const D=b.find((e=>"/payment"===e.path));D&&(h||j!==a.m.BOOKING_TYPE_CLIENT_DIRECT)&&(D.hideFromNavigation=!0);const w=b.find((e=>"/instalmentplan"===e.path)),T=sessionStorage.getItem("plancancelled");let S=f;T&&(S=!1),!w||p.showPaymentInstalment&&N&&"hide"!==m&&("edit"!==m||T)&&!S||(w.hideFromNavigation=!0);const E=b.find((e=>"/editinstalmentplan"===e.path));!E||p.showPaymentInstalment&&S||(E.hideFromNavigation=!0);const P=b.find((e=>"/travelextraslanding"===e.path));P&&(j!==a.m.BOOKING_TYPE_CLIENT_DIRECT||y||x||C||k||F)&&(P.hideFromNavigation=!0);const R=b.find((e=>"/documents"===e.path));return R&&(u||O)&&(R.hideFromNavigation=!0),b},f=e=>{const{location:{pathname:t},activeBooking:i,activeBookingDetails:a,bookingDetailsForOverview:s,sellingCompanyShortName:l}=e,{Navigation:{navigationList:c}}=n.Aq.getTranslations(),d=m({activeBooking:i,activeBookingDetails:a,bookingDetailsForOverview:s,sellingCompanyShortName:l});return(0,p.jsx)(r.A,{noPadding:!0,componentName:"Navigation",children:(0,p.jsx)(r.A.Body,{children:(0,p.jsx)("nav",{className:"Navigation__nav",children:d.filter((({path:e,hideFromNavigation:i})=>t.toLowerCase()!==e&&!i)).map((({name:e,path:t})=>(0,p.jsxs)(o.N_,{to:t,className:"Navigation__link",onClick:()=>(e=>{const t={action:"navigation_link",category:"navigation_list",label:e};n.j0.click(t),(0,u.l)({message:`User clicked on [${e}] on the Navigation Panel`,status:"info",userEmail:localStorage.getItem("USER_EMAIL"),loginSource:localStorage.getItem("LOGIN_SOURCE"),corrId:localStorage.getItem("CORRELATION_ID")})})(c[e]),children:[c[e],(0,p.jsx)("div",{className:"Navigation__arrow",role:"presentation"})]},e)))})})})};f.displayName="Navigation";var v=(0,s.y)((0,l.Ng)((e=>({activeBooking:e.activeBooking,activeBookingDetails:e.activeBookingDetails,bookingDetailsForOverview:e.bookingDetailsForOverview,sellingCompanyShortName:e.activeBooking.sellingCompany.sellingCompanyShortName})),(e=>({actions:(0,d.zH)(c,e)})))(f))},30218:function(e,t,i){i.d(t,{A:function(){return h}});var n=i(65043),r=i(79688),a=i(60400),o=i(53536),s=i.n(o),l=i(70579);const{TravelExtras:{allPassengersLableText:c}}=a.Aq.getTranslations(),d=e=>{const{className:t,showHeader:i=!1,passengers:a,handleSingleCheck:o,handleAllCheck:d,title:h,description:g,componentName:u=""}=e,p=a.reduce(((e,t)=>(e[t.id]=!0,e)),{}),[m,f]=(0,n.useState)(!0),[v,_]=(0,n.useState)(p),x=e=>{d(e.target.checked),f(e.target.checked),Object.entries(v).forEach((([t])=>{v[t]=e.target.checked}))},y=async e=>{await o({...v,[e.target.name]:e.target.checked}),await _({...v,[e.target.name]:e.target.checked})};return(0,n.useEffect)((()=>{!async function(){const e=await!s().values(v).some((e=>!1===e));f(e)}()}),[v]),(0,l.jsxs)("div",{children:[h&&i&&(0,l.jsx)("div",{className:"SelectPassengers__title",children:h}),g&&i&&a.length>1&&(0,l.jsx)("div",{className:"SelectPassengers__description",children:g}),(0,l.jsxs)("div",{className:`SelectPassengers ${t}`,children:[a.length>1&&(0,l.jsx)("div",{className:"grid-x grid-margin-x SelectPassengers__container",children:(0,l.jsx)("div",{className:"cell small-12 medium-4",children:(0,l.jsxs)("label",{htmlFor:`${u}checkall`,className:"SelectPassengers__labelContainer",onChange:x,children:[(0,l.jsx)(r.A,{name:"checkall",id:`${u}checkall`,checked:m,onChange:x}),c]})})}),(!m||1===a.length)&&(0,l.jsx)("div",{className:"grid-x grid-margin-x SelectPassengers__container",children:a.map((e=>(0,l.jsx)("div",{className:"cell small-12 medium-6 SelectPassengers__container",children:(0,l.jsxs)("label",{className:"SelectPassengers__labelContainer",htmlFor:`${u}${e.id}`,children:[(0,l.jsx)(r.A,{id:`${u}${e.id}`,name:e.id,checked:v[e.id],onChange:y}),`${e.firstName} ${e.lastName} ${"child"===e.type?`(${e.type})`:""}`]})},e.id)))})]})]})};d.displayName="SelectPassengers";var h=d},6967:function(e,t,i){var n=i(65043),r=i(47522),a=i(70579);const o=e=>
1{const{className:t,autoFocus:i,showClear:o,initialValue:s,placeholder:l,labelText:c,noResultText:d,items:h,onHover:g,customSuggestion:u,onSelect:p,onSearch:m,onClear:f,showIcon:v,isRequired:_,hasValue:x,isError:y,errorText:O,labelClassName:N,fuseOptions:j,id:b}=e,[F,I]=(0,n.useState)([]);return(0,a.jsx)("div",{className:t,children:(0,a.jsxs)("label",{htmlFor:b,children:[c&&(0,a.jsx)("span",{className:`Form__inputTitle ${N}`,children:_?`${c} *`:c}),(0,a.jsx)("div",{className:"Form__inputWrapper "+(x?"Form__inputWrapper--hasValue":""),id:b,children:(0,a.jsx)(r.ReactSearchAutocomplete,{items:F.map(((e,t)=>({...e,id:t}))),fuseOptions:j,autoFocus:i,showIcon:v,showClear:o,noResultText:d,formatResult:u||(e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[e.name," (",(0,a.jsx)("strong",{children:`${e.code}`}),")"]}),(0,a.jsx)("div",{children:(0,a.jsx)("strong",{children:`(${e.city}, ${e.country})`})})]})),inputSearchString:s,placeholder:l||c,onHover:g,onSelect:e=>{I([]),p(e)},onFocus:()=>{I(h)},onClear:()=>{I(h),f()},onSearch:e=>{I(h),m(e)}})}),y&&(0,a.jsx)("div",{className:"Form__inputError",children:(0,a.jsx)("span",{className:"TypeAhead__error",children:O})})]})})};o.displayName="Typeahead",o.defaultProps={onHover:()=>{},onSelect:()=>{},onClear:()=>{},onSearch:()=>{},customSuggestion:!1,className:"",autoFocus:!1,showClear:!0,showIcon:!1,placeholder:"",labelText:"",initialValue:"",isRequired:!1,noResultText:"No result found",isError:!1,errorText:""},t.A=o},28718:function(e,t,i){i.r(t),i.d(t,{default:function(){return oe}});var n=i(65043),r=i(97508),a=i(50805),o=i(67978),s=i(4769),l=i(32125),c=i(60400),d=i(7263),h=i(29286),g=i(71999),u=i(37182),p=i(905),m=i(31899),f=i.n(m),v=i(45205),_=i(60483),x=i(6967),y=i(47644),O=i(91688),N=i(92282),j=i(73807),b=i(30218),F=i(1813),I=i(98283);const C=(e,t)=>{document.querySelectorAll('#arrival [data-test="search-input"]').forEach(((i,n)=>{if(e[n]&&e[n].arrivalAirport){const r=t.find((t=>t.code===e[n].arrivalAirport));r&&(i.value=r.name,i.setAttribute("value",r.name))}else i.value=""})),document.querySelectorAll('#departure [data-test="search-input"]').forEach(((i,n)=>{if(e[n]&&e[n].departureAirport){const r=t.find((t=>t.code===e[n].departureAirport));r&&(i.value=r.name,i.setAttribute("value",r.name))}else i.value=""}))};var k=i(70579);const{AddFlight:{themeName:A},App:{brandCode:D,brandId:w}}=c.Aq.getConfigs(),{TravelExtras:{airlineErrorMessage:T,unsavedChanges:S,airportCodeErrorMessage:E,airlineMaxLengthMessage:P,airlineCodeMissing:R,airlineNumberNotEntered:B}}=c.Aq.getTranslations(),{TravelExtras:{addYourFlight:$,ioFlightPassengersHeadingText:H,ioFlightPaxDescriptionText:M,ioFlightSubHeadingText:U,addYourOwnFlightBtnText:q,backButtonText:L,removeBtnText:W,flightNumberInputTitle:Y,departureDateInputTitle:z,departureAirportInputTitle:G,arrivalAirportInputTitle:V,addAnotherFlightBtnText:Z,collapseBtnText:K,submitYourFlightsBtnText:X,ioFlightValidationErrorText:J,ioFlightDateOverlapErrorText:Q,ioFlightDateOverlapErrorTextContactUs:ee,ioFlightValidationErrorTextContactUs:te}}=c.Aq.getTranslations(),ie=e=>{const[t,i]=(0,n.useState)({width:void 0,height:void 0});(0,n.useEffect)((()=>{function e(){i({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]);const r=t.width<769,{activeBookingDetails:a,activeBooking:o,history:s,dispatchUpdateActiveBookingDetails:l,toggleWarningModal:d,tour:h}=e,{startDate:g,sellingCompany:u={},bookingNumber:m}=o,{sellingCompanyShortName:ie}=u,{allPassengers:ne,travelExtraConfig:re={}}=a;let ae=ne.filter((e=>!e.ioFlights));"false"===sessionStorage.getItem("travelextraconsent")&&(ae=ne.filter((e=>Number(e.id)===Number(o.bookingPassenger.clientID))));const oe=ae.reduce(((e,t)=>(e[t.id]=!0,e)),{}),se=[{flightNo:"",departureDate:"",departureAirport:"",arrivalAirport:""}],le={keys:["code","name","city","country"],threshold:.3},[ce,de]=(0,n.useState)(!0),[he,ge]=(0,n.useState)(se),[ue,pe]=(0,n.useState)(!0),[me,fe]=(0,n.useState)(oe),ve=()=>{de(!ce)},_e=(e,t)=>{const i=e[t],n={departureAirport:i.departureAirport,arrivalAirport:i.arrivalAirport,departureDate:i.departureDate?c.gX.getLocaleDate(i.departureDate):"",sellingCompanyCode:ie,marketingAirline:i.flightNo.substr(0,2),flightNo:i.flightNo.substr(2)};!i.isFlightNoError&&!i.isAirportCodeError&&n.departureAirport&&n.arrivalAirport&&n.departureDate&&i.flightNo&&j.A.validateFlight(n).then((t=>(t.validated?(i.validation="passed",i.segments={arrivalAirport:n.arrivalAirport,departureAirport:n.departureAirport,departureDate:t.flightDetail.departureDate,arrivalDate:t.flightDetail.arr
1ivalDate,flightNo:Number(n.flightNo),airlineCode:n.marketingAirline.toUpperCase()}):i.validation="failed",ge(e.concat())))).catch((e=>e))},xe=(e,t,i)=>{const n=[...he],r=n[e];if(n[e]=r,"departureAirport"!==t&&"arrivalAirport"!==t||!i?r[t]=i:(r[t]=i.code,r.departureAirport===r.arrivalAirport?n[e].isAirportCodeError=!0:n[e].isAirportCodeError=!1),"departureDate"===t){const t=c.gX.getLocaleDate(i);t<h.endDate&&t>h.startDate?n[e].isDateError=!0:n[e].isDateError=!1}"flightNo"===t&&i&&i.length>=2&&(n[e].airlineLogoUrl=`https://www.gstatic.com/flights/airline_logos/32px/${i.substr(0,2).toUpperCase()}.png`),ge(n),n[e].validation="","flightNo"!==t&&_e(n,e),d({enabled:!0,message:S})};return document.addEventListener("click",(()=>C(he,I.qC))),(0,n.useEffect)((()=>{setTimeout((()=>{C(he,I.qC)}),0)})),(0,k.jsxs)(v.A,{componentName:"IOFlights",themeName:A,children:[(0,k.jsx)(v.A.Header,{withHomeButton:!0,children:$}),(0,k.jsxs)(v.A.Body,{children:[!ce&&(0,k.jsx)("div",{className:"grid-x align-right IOFlights__button-container",children:(0,k.jsxs)("button",{type:"button",className:"IOFlights__button",onClick:ve,children:[(0,k.jsx)("span",{className:"IOFlights__textHighlight",children:q}),(0,k.jsx)("div",{className:"IOFlights__button--arrowDown",role:"presentation"})]})}),(0,k.jsxs)(p.Collapse,{isOpened:ce,children:[(0,k.jsx)(b.A,{className:"SelectPassengers",passengers:ae,allChecked:ue,activeBooking:o,isChecked:me,handleSingleCheck:e=>{fe(e)},handleAllCheck:e=>{pe(e),fe(ae.reduce(((t,i)=>(t[i.id]=e,t)),{}))},showHeader:!0,title:H,description:M}),he.map(((e,t)=>(0,k.jsxs)(y.A,{componentName:"IOFlights",renderAsDiv:!0,children:[(0,k.jsxs)("div",{className:"grid-x align-middle IOFlights__header--container",children:[(0,k.jsx)("div",{className:"cell small-4 medium-2",children:(0,k.jsx)(y.A.Header,{className:"IOFlights__registerTitle",title:`${U}${t+1}`})}),he.length>1&&(0,k.jsx)("div",{className:"cell align-centre small-6 medium-2",children:(0,k.jsxs)("button",{type:"button",className:"IOFlights__removebutton",onClick:()=>(e=>{const t=[...he];t.splice(e,1),ge(t.length>0?t:se)})(t),children:[(0,k.jsx)("i",{className:"IOFlights__icons IOFlights__removeIcon"}),W]})})]}),(0,k.jsx)("div",{className:"grid-y",children:(0,k.jsx)("div",{className:"cell IOFlights__nameSection",children:(0,k.jsxs)("div",{className:"grid-x IOFlights__fieldWrapper",children:[(0,k.jsxs)("div",{className:"cell small-12 medium-3 IOFlights__inputContainer IOFlights__airlinelogoinput",children:[e.airlineLogoUrl&&(0,k.jsx)("span",{className:"IOFlights__airlinelogo",children:(0,k.jsx)("img",{onError:()=>(e=>{const t=[...he];t[e].airlineLogoUrl="https://www.gstatic.com/flights/airline_logos/32px/NA.png",ge(t)})(t),alt:"airline logo",src:e.airlineLogoUrl})}),(0,k.jsx)(y.A.Input,{type:"text",id:"flightNumber",value:e.flightNo,onChange:e=>xe(t,"flightNo",e.replace(/ /g,"")),title:Y,placeholder:"eg:. BA1234",className:e.airlineLogoUrl?"airlinelogoinput":"",error:e.isFlightNoError,onBlur:e=>{"string"===typeof e&&((e,t)=>{var i;const n=[...he],r=n[e];n[e]=r,t?(null===(i=t.replace(/[^a-zA-Z]+/g,""))||void 0===i?void 0:i.toLowerCase()).length<1?(n[e].isFlightNoError=R,ge(n)):t.length>8?(n[e].isFlightNoError=P,ge(n)):/^[A-Za-z\d]{2}[A-Z]?\d{1,5}[A-Z]?$/.test(t)?(n[e].isFlightNoError="",ge(n),_e(n,e)):(n[e].isFlightNoError=T,ge(n)):(n[e].isFlightNoError=B,ge(n))})(t,e.replace(/ /g,""))},isRequired:!0,autocomplete:"off"})]}),(0,k.jsx)("div",{className:"cell small-12 medium-3 IOFlights__inputContainer",children:(0,k.jsxs)("label",{htmlFor:"departureDate",className:"Form__inputWrapper IOFlights__inputWrapper Form__inputWrapper--text IOFlights__inputWrapper--text Form__inputWrapper--required IOFlights__inputWrapper--required Form__inputWrapper--flightNumber IOFlights__inputWrapper--flightNumber grid-y "+(e.departureDate?"Form__inputWrapper--hasValue":""),children:[(0,k.jsx)("span",{className:"Form__inputTitle IOFlights__inputTitle Form__inputTitle--text IOFlights__inputTitle--text cell",children:z}),(0,k.jsx)(f(),{id:`departureDate${t}`,showMonthDropdown:!0,showYearDropdown:!0,dropdownMode:"select",autoComplete:"off",minDate:new Date,openToDate:new Date(h.startDate),selected:e.departureDate,onChange:e=>{xe(t,"departureDate",e)},withPortal:r,className:"IOFlights__calendar-input",dateFormat:"yyyy-MM-dd",placeholderText:"YYYY-MM-DD"})]})}),(0,k.jsx)("div",{className:"cell small-12 medium-3 IOFlights__inputContainer IOFlights__airport",children:(0,k.jsx)(x.A,{items:I.qC,labelText:G,placeholder:"Enter code or name",labelClassName:"IOFlights__inputTitle",onSelect:e=>xe(t,"departureAirport",e),onClear:e=>xe(t,"departureAirport",e),id:"departure",hasValue:!!e.departureAirport,fuseOptions:le,isError:e.isAirportCodeError,errorText:E,isRequired:!0})}),(0,k.jsx)("div",{className:"cell small-12 medium-3 IOFlights__inputContainer IOFlights__airport IOFlights__arrivalAirport",children:(0,k.jsx)(x.A,{items:I.qC,test:e.flightNo,labelText:V,placeholder:"Enter code or name",isError:e.isAirportCodeError,errorText:E,hasValue:!!e.arrivalAirport,onSelect:e=>xe(t,"arrivalAirport",e),onClear:e=>xe(t,"arrivalAirport",e),labelClassName:"IOFlights__inputTitle",id:"arrival",fuseOptions:le,isRequired:!0})}),"passed"===e.validation&&(0,k.jsx)("div",{className:"validateFlightSuccess"})]})})}),"failed"===e.validation&&(0,k.jsx)("div",{className:"grid-x align-middle IOFlights__header--container",children:(0,k.jsx)(F.A,{componentName:"TravelExtras__flightNotValid",type:"alert",header:re.flightInvalidateEmail?J.replace("{email}",re.flightInvalidateEmail):te})}),e.isDateError&&(0,k.jsx)("div",{className:"grid-x align-middle IOFlights__header--container",children:(0,k.jsx)(F.A,{componentName:"TravelExtras__flightNotValid",type:"alert",header:re.flightOverlapNumber?Q.replace("{phonenumber}",re.flightOverlapNumber):ee})})]}))),(0,k.jsx)("div",{className:"grid-x IOFlights__button-container align-left",children:(0,k.jsx)("div",{className:"cell small-12 medium-4 IOFlights__align-middle",children:(0,k.jsxs)("button",{type:"button",className:"IOFlights__button",onClick:()=>{ge([...he,se[0]])},children:[(0,k.jsx)("i",{className:"IOFlights__icons IOFlights__addIcon"}),(0,k.jsx)("span",{className:"IOFlights__textHighlight",children:Z})]})})}),(0,k.jsxs)("div",{className:"grid-x IOFlights__button-container align-right",children:[(0,k.jsx)("div",{className:"cell small-12 medium-2 IOFlights__button IOFlights__align-middle",children:(0,k.jsxs)("button",{type:"button",className:"IOFlights__button",onClick:ve,children:[(0,k.jsx)("span",{className:"IOFlights__textHighlight",children:K}),(0,k.jsx)("div",{className:"IOFlights__button--arrowUp",role:"presentation"})]})}),(0,k.jsxs)("div",{className:"cell small-12 medium-12 IOFlights__actionButton",children:[(0,k.jsx)(_.A,{onClick:()=>s.push("/travelextraslanding"),className:"secondary medium-down-expanded IOFlights__backButton",children:L}),(0,k.jsx)(_.A,{disabled:!(()=>{const e=[...he].filter((e=>e.arrivalAirport||e.departureAirport||e.departureDate||e.flightNo));if(0===e.length)return!1;let t=!1;return ae.forEach((e=>{me[e.id]&&(t=!0)})),e.find((e=>"passed"!==e.validation))&&(t=!1),t})(),onClick:()=>{d({enabled:!1,message:""});const e={segments:he.map((e=>
1e.segments)).filter(Boolean),passengerIds:ae.filter((e=>me[e.id])).map((e=>e.id)),sellingCompanyCode:ie,bookingRef:m.name};j.A.addFlight(e).then((()=>{c.j0.click({action:"add_io_flight_click",category:"add_io_flight",label:"IO flights added successfully"});return(e=>{const{id:t,number:i,bookingPassenger:{clientID:n}}=o,r={startDate:g,bookingUid:t,bookingId:i,bookingNumber:m.name,sellingCompanyShortName:ie,clientId:n,brandCode:D,brandId:w};N.A.getBookingDetails(r).then((t=>(l(c.kH.addProgressInfo(t,g)),s.push(`/ioflightconfirmation?id=${e.toString()}`)))).catch((e=>c.Aq.consoleErr(e)))})(e.passengerIds.map((e=>ne.find((t=>t.id===e)).passengerId)))})).catch((e=>c.Aq.consoleErr(e)))},className:"primary medium-down-expanded AddMyBooking__button",children:X})]})]})]})]}),(0,k.jsx)(O.XG,{when:!0,message:""})]})};ie.displayName="IOFlights";var ne=(0,O.y)(ie);const{TravelExtras:{headerText:re}}=c.Aq.getTranslations(),ae=e=>{const{activeBooking:t,activeBookingDetails:i,dispatchUpdateActiveBookingDetails:n}=e,{actions:{toggleWarningModal:r}}=e,{isfutureTravelCredit:a,startDate:o}=t,{allPassengers:s,tours:c=[]}=i;let u=s;"false"===sessionStorage.getItem("travelextraconsent")&&(u=s.filter((e=>Number(e.id)===Number(t.bookingPassenger.clientID))));let p=!0;u.forEach((e=>{e.ioFlights&&e.ioFlights.length>0||(p=!1)}));let m=c.find((e=>e.startDate===o));return m||(m=c[0]),(0,k.jsxs)("div",{className:"cell Flights",children:[(0,k.jsx)(l.A,{withCountdown:!a}),(0,k.jsx)("div",{className:"grid-container",children:(0,k.jsxs)("div",{className:"grid-x grid-margin-x",children:[(0,k.jsx)("div",{className:"cell large-8",children:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(F.A,{componentName:"TravelExtras__calloutCallAgent",type:"alert",header:re}),(0,k.jsx)(ne,{toggleWarningModal:r,dispatchUpdateActiveBookingDetails:n,activeBooking:t,activeBookingDetails:i,allPaxHaveIoFlights:p,tour:m})]})}),(0,k.jsxs)("div",{className:"cell large-4",children:[(0,k.jsx)(h.A,{activeBookingDetails:i,activeBooking:t}),(0,k.jsx)(g.A,{}),(0,k.jsx)(d.A,{})]})]})})]})};ae.displayName="Flights";var oe=(0,r.Ng)((e=>({activeBooking:e.activeBooking,activeBookingDetails:e.activeBookingDetails,bookingDetailsForOverview:e.bookingDetailsForOverview,cart:e.cart})),(e=>({actions:(0,a.zH)(o,e),thunks:(0,a.zH)(s,e),dispatchUpdateActiveBookingDetails:(0,a.zH)(u.pe,e)})))(ae)},13502:function(e,t,i){function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Collapse=void 0;var r,a=(r=i(65043))&&r.__esModule?r:{default:r};function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
1function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,r=d(e);if(t){var a=d(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}(this,i)}}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(d,e);var t,i,n,r=l(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),h(c(t=r.call(this,e)),"timeout",void 0),h(c(t),"container",void 0),h(c(t),"content",void 0),h(c(t),"onResize",(function(){if(clearTimeout(t.timeout),t.container&&t.content){var e=t.props,i=e.isOpened,n=e.checkTimeout,r=Math.floor(t.container.clientHeight),a=Math.floor(t.content.clientHeight),o=i&&Math.abs(a-r)<=1,s=!i&&Math.abs(r)<=1;o||s?t.onRest({isFullyOpened:o,isFullyClosed:s,isOpened:i,containerHeight:r,contentHeight:a}):(t.onWork({isFullyOpened:o,isFullyClosed:s,isOpened:i,containerHeight:r,contentHeight:a}),t.timeout=setTimeout((function(){return t.onResize()}),n))}})),h(c(t),"onRest",(function(e){var i=e.isFullyOpened,n=e.isFullyClosed,r=e.isOpened,a=e.containerHeight,o=e.contentHeight;if(t.container&&t.content){var s=r&&t.container.style.height==="".concat(o,"px"),l=!r&&"0px"===t.container.style.height;if(s||l){t.container.style.overflow=r?"initial":"hidden",t.container.style.height=r?"auto":"0px";var c=t.props.onRest;c&&c({isFullyOpened:i,isFullyClosed:n,isOpened:r,containerHeight:a,contentHeight:o})}}})),h(c(t),"onWork",(function(e){var i=e.isFullyOpened,n=e.isFullyClosed,r=e.isOpened,a=e.containerHeight,o=e.contentHeight;if(t.container&&t.content){var s=r&&t.container.style.height==="".concat(o,"px"),l=!r&&"0px"===t.container.style.height;if(!s&&!l){t.container.style.overflow="hidden",t.container.style.height=r?"".concat(o,"px"):"0px";var c=t.props.onWork;c&&c({isFullyOpened:i,isFullyClosed:n,isOpened:r,containerHeight:a,contentHeight:o})}}})),h(c(t),"onRefContainer",(function(e){t.container=e})),h(c(t),"onRefContent",(function(e){t.content=e})),e.initialStyle?t.initialStyle=e.initialStyle:t.initialStyle=e.isOpened?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"},t}return t=d,(i=[{key:"componentDidMount",value:function(){this.onResize()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props,i=t.theme,n=t.isOpened;return t.children!==e.children||n!==e.isOpened||Object.keys(i).some((function(t){return i[t]!==e.theme[t]}))}},{key:"getSnapshotBeforeUpdate",value:function(){if(!this.container||!this.content)return null;if("auto"===this.container.style.height){var e=this.content.clientHeight;this.container.style.height="".concat(e,"px")}return null}},{key:"componentDidUpdate",value:function(){this.onResize()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this.props,t=e.theme,i=e.children,n=e.isOpened;return a.default.createElement("div",{ref:this.onRefContainer,className:t.collapse,style:this.initialStyle,"aria-hidden":!n},a.default.createElement("div",{ref:this.onRefContent,className:t.content},i))}}
1])&&o(t.prototype,i),n&&o(t,n),d}(a.default.Component);t.Collapse=g,h(g,"defaultProps",{theme:{collapse:"ReactCollapse--collapse",content:"ReactCollapse--content"},initialStyle:void 0,onRest:void 0,onWork:void 0,checkTimeout:50})},78413:function(e,t,i){function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.UnmountClosed=void 0;var r,a=(r=i(65043))&&r.__esModule?r:{default:r},o=i(13502),s=["isOpened"],l=["isOpened"];function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(this,arguments)}function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){_(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function g(e,t){if(null==e)return{};var i,n,r=function(e,t){if(null==e)return{};var i,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function u(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,r=v(e);if(t){var a=v(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}(this,i)}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var x=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(d,e);var t,i,n,r=m(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),_(f(t=r.call(this,e)),"onWork",(function(e){var i=e.isOpened,n=g(e,s);t.setState({isResting:!1,isOpened:i});var r=t.props.onWork;r&&r(h({isOpened:i},n))})),_(f(t),"onRest",(function(e){var i=e.isOpened,n=g(e,l);t.setState({isResting:!0,isOpened:i,isInitialRender:!1});var r=t.props.onRest;r&&r(h({isOpened:i},n))})),_(f(t),"getInitialStyle",(function(){var e=t.state,i=e.isOpened;return e.isInitialRender&&i?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"}})),t.state={isResting:!0,isOpened:e.isOpened,isInitialRender:!0},t}return t=d,(i=[{key:"componentDidUpdate",value:function(e){var t=this.props.isOpened;e.isOpened!==t&&this.setState({isResting:!1,isOpened:t,isInitialRender:!1})}},{key:"render",value:function(){var e=this.state,t=e.isResting,i=e.isOpened;return t&&!i?null:a.default.createElement(o.Collapse,c({},this.props,{initialStyle:this.getInitialStyle(),onWork:this.onWork,onRest:this.onRest}))}}
1])&&u(t.prototype,i),n&&u(t,n),d}(a.default.PureComponent);t.UnmountClosed=x,_(x,"defaultProps",{onWork:void 0,onRest:void 0})},905:function(e,t,i){var n=i(13502).Collapse,r=i(78413).UnmountClosed;e.exports=r,r.Collapse=n,r.UnmountClosed=r}}]);
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.