(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{AgA5:function(t,e){},Gj65:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("mrSG"),o=function(){function t(t){var e=this;this.transactionState=t,this.cancellationReq={},this.flightMyCancellationSort=function(t,n){e.CancellationsResponse.Bookings.sort((function(e,r){return n?e[t]r[t]?1:0:e[t]r[t]?-1:0}))},this.flightMyCancellationSortWithCancellationDate=function(t,n){e.CancellationsResponse.Bookings.sort((function(e,r){return n?e.Itineraries[0][t]r.Itineraries[0][t]?1:0:e.Itineraries[0][t]r.Itineraries[0][t]?-1:0}))}}return Object.defineProperty(t.prototype,"CancellationsResponse",{get:function(){return this.transactionState.CancellationsResponse},enumerable:!0,configurable:!0}),t.prototype.getServiceDetails=function(){return this.services=[],this.service={},this.service.service="Flight",this.service.type="FLT",this.services.push(this.service),this.service={},this.service.service="Hotel",this.service.type="HTL",this.services.push(this.service),this.service={},this.service.service="BUS",this.service.type="BUS",this.services.push(this.service),this.services},t.prototype.cancellationsort=function(t,e){this.CancellationsResponse&&("CancelledOn"==t?this.flightMyCancellationSortWithCancellationDate(t,e):this.flightMyCancellationSort(t,e))},t.prototype.processCanBookings=function(){this.CancellationsResponse.Bookings.forEach((function(t){t.Itineraries.length>0&&(t.CancellationDate=t.Itineraries[0].CancelledOn)})),this.setTransStatus()},t.prototype.setTransStatus=function(){var t,e;try{var n=!1;this.cancellationReq=this.transactionState.CancellationsRequest,this.cancellationReq&&(""==this.cancellationReq.BookingFromDate&&""==this.cancellationReq.BookingToDate&&""==this.cancellationReq.PNR&&""==this.cancellationReq.Service&&""==this.cancellationReq.CancellationID&&""==this.cancellationReq.TransactionID&&""==this.cancellationReq.TravelFromDate&&""==this.cancellationReq.TravelToDate||(n=!0));try{for(var o=r.__values(this.CancellationsResponse.Bookings),a=o.next();!a.done;a=o.next()){var i=a.value;i.DisplayStatus="BUS"==i.Service?this.getBusStatus(i.BookingStatus):this.getStatus(i.BookingStatus),i.TravelDate=this.getTravelDate(i),i.TripCompletionDate=this.getTripCompletionDate(i),i.Sector=this.getSector(i),i.Filterflag=!n||this.applyFilter(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return this.transactionState.CancellationsResponse}catch(c){}},t.prototype.applyFilter=function(t){var e=!0;return this.cancellationReq=this.transactionState.CancellationsRequest,e&&""!=this.cancellationReq.Service&&""!=t.Service&&this.cancellationReq.Service!=t.Service&&(e=!1),e&&null!=this.cancellationReq.TransactionID&&""!=this.cancellationReq.TransactionID&&""!=t.TransactionID.toString()&&this.cancellationReq.TransactionID!=t.TransactionID.toString()&&(e=!1),e&&""!=this.cancellationReq.CancellationID&&""!=t.CancellationID.toString()&&null!=this.cancellationReq.CancellationID&&this.cancellationReq.CancellationID!=t.CancellationID.toString()&&(e=!1),e&&"DM"==t.TripType&&"C"==t.Ordinal&&this.cancellationReq.TransactionID==t.TransactionID.toString()&&(e=!0),""!=this.cancellationReq.BookingFromDate&&""!=this.cancellationReq.BookingToDate&&""!=t.BookingDate&&(e=!!(e&&new Date(t.BookingDate)>=new Date(this.cancellationReq.BookingFromDate)&&new Date(t.BookingDate.split("T")[0])<=new Date(this.cancellationReq.BookingToDate))),""!=this.cancellationReq.TravelFromDate&&""!=this.cancellationReq.TravelToDate&&""!=t.BookingDate&&(e=!!(e&&new Date(t.TravelDate.split("T")[0])>=new Date(this.cancellationReq.TravelFromDate)&&new Date(t.TripCompletionDate.split("T")[0])<=new Date(this.cancellationReq.TravelToDate))),e},t.prototype.getTravelDate=function(t){if(t.Itineraries.length>0)return t.Itineraries[0].FromDate},t.prototype.getTripCompletionDate=function(t){return t.Itineraries[t.Itineraries.length-1].ToDate},t.prototype.getSector=function(t){return t.Itineraries[0].FromSector.split("|")[1]+"-"+t.Itineraries[0].ToSector.split("|")[1]},t.prototype.getTripType=function(t){return t.Itineraries.map((function(t){return t.Triptype})).indexOf("R")>-1?"R":t.TripType},t.prototype.getStatus=function(t){var e,n;try{var o=t.split(",");try{for(var a=r.__values(o),i=a.next();!i.done;i=a.next())switch(i.value){case"I8":case"S8":case"U8":return"Failed";case"BO0":return o.length>1?this.getMultiStatus(o[1]):"In Process";case"BO1":return"Failed";case"B0":return"Confirmed";case"B1":return"Failed";case"TO0":return o.length>1?this.getMultiStatus(o[1]):"Confirmed";case"TO1":return"In Process";case"CO0":return"Cancelled";case"PO0":return"Part Cancelled";case"CF":return"Refunded";case"CP":return"Part Cancelled";case"CR":return"Can Requested";case"CJ":return"Can Rejected";case"CV":return"Can Verified";case"CD":case"CT":return"Cancelled";case"CA":return"Can Approved";default:return"Failed"}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}catch(c){}},t.prototype.getMultiStatus=function(t){return"BR0"==t?"In Process":"BR1"==t?"Failed":"TR0"==t?"Confirmed":"TR1"==t?"In Process":void 0},t.prototype.getBusStatus=function(t){var e,n;try{var o=t.split(",");try{for(var a=r.__values(o),i=a.next();!i.done;i=a.next())switch(i.value){case"BO0":return"Confirmed";case"BO1":return"Failed";case"IP":return"In Process";default:return"Failed"}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}catch(c){}},t}()},RZln:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(t){var e=this;this.transactionState=t,this.flightMyBookingSort=function(t,n){e.BookingResponse.Bookings.sort((function(e,r){return n?e[t]r[t]?1:0:e[t]r[t]?-1:0}))}}return Object.defineProperty(t.prototype,"BookingResponse",{get:function(){return this.transactionState.BookingResponse},enumerable:!0,configurable:!0}),t.prototype.getServiceDetails=function(){return this.services=[],this.service={},this.service.service="Flight",this.service.type="FLT",this.services.push(this.service),this.service={},this.service.service="Hotel",this.service.type="HTL",this.services.push(this.service),this.service={},this.service.service="BUS",this.service.type="BUS",this.services.push(this.service),this.services},t.prototype.mybookingsort=function(t,e){this.BookingResponse&&this.BookingResponse.Bookings&&this.BookingResponse.Bookings.length>0&&this.flightMyBookingSort(t,e)},t}()},"dzA+":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("o3x0"),o=function(){function t(t){this.generalState=t}return t.prototype.setSSRDialogData=function(t,e){var n=new r.g;return n.height="600px",n.width="800px",n.data={data:t,pax:e},n},t.prototype.createItineraryCancelRequest=function(t,e,n){void 0===e&&(e="");var r={};return r.TUI=this.generalState.GetRetrieveBookingResponse.TUI,r.ClientID=this.generalState.ClientID,r.ClientIP="",r.Remarks=e,r.TransactionID=t,r.Trips=[],n.forEach((function(t){var e={Journey:[]};e.Journey[0]={},e.Journey[0].Segments=[];var n=0,o={Pax:[]},a="";t.Journey[0].Segments.forEach((function(t){a=a+","+t.Flight.FUID})),a=a.substr(1,a.length-1),t.Journey[0].Segments[0].Flight.TicketInfo.forEach((function(e){var r={};e.cancelStatus&&(o.CRSPNR=t.Journey[0].Segments[0].Flight.CRSPNR,o.ID=a,r.ID=e.PaxID,r.Ticket=e.TicketNo,o.Pax.push(r),n++)})),n>0&&(e.Journey[0].Segments.push(o),r.Trips.push(e))})),r},t}()},"hR/J":function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n("mrSG"),o=n("CcnG"),a=n("Wf4p"),i=n("wd/R"),s=n.n(i).a||i;function c(t,e){for(var n=Array(t),r=0;r11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var r=this._createMoment({year:t,month:e,date:n}).locale(this.locale);if(!r.isValid())throw Error('Invalid date "'+n+'" for month with index "'+e+'".');return r},e.prototype.today=function(){return this._createMoment().locale(this.locale)},e.prototype.parse=function(t,e){return t&&"string"==typeof t?this._createMoment(t,e,this.locale):t?this._createMoment(t).locale(this.locale):null},e.prototype.format=function(t,e){if(t=this.clone(t),!this.isValid(t))throw Error("MomentDateAdapter: Cannot format invalid date.");return t.format(e)},e.prototype.addCalendarYears=function(t,e){return this.clone(t).add({years:e})},e.prototype.addCalendarMonths=function(t,e){return this.clone(t).add({months:e})},e.prototype.addCalendarDays=function(t,e){return this.clone(t).add({days:e})},e.prototype.toIso8601=function(t){return this.clone(t).format()},e.prototype.deserialize=function(e){var n;if(e instanceof Date)n=this._createMoment(e).locale(this.locale);else if(this.isDateInstance(e))return this.clone(e);if("string"==typeof e){if(!e)return null;n=this._createMoment(e,s.ISO_8601).locale(this.locale)}return n&&this.isValid(n)?this._createMoment(n).locale(this.locale):t.prototype.deserialize.call(this,e)},e.prototype.isDateInstance=function(t){return s.isMoment(t)},e.prototype.isValid=function(t){return this.clone(t).isValid()},e.prototype.invalid=function(){return s.invalid()},e.prototype._createMoment=function(){for(var t=[],e=0;e0?(e.Bookings=[],this.myTranState.CancellationsResponse.Bookings.forEach((function(n){t.controls.Searchtext.valid?t.controls.Searchtext.value!==n.TransactionID.toString()&&t.controls.Searchtext.value!==n.CancellationID.toString()||e.Bookings.push(n):t.controls.Service.valid||t.controls.FromDate.valid&&t.controls.ToDate.valid?n.Itineraries.forEach((function(r){var a=o(r.CancelledOn).isBetween(o(t.controls.FromDate.value),o(t.controls.ToDate.value));a&&t.controls.Service.value==n.Service&&e.Bookings.push(n),a&&!t.controls.Service.valid&&e.Bookings.push(n),t.controls.FromDate.valid&&t.controls.ToDate.valid||t.controls.Service.value!=n.Service||e.Bookings.push(n)})):e.Bookings=[]}))):e.Bookings=[]),e},t.prototype.createCancellationSearchItineraryFormGroup=function(){return this.fb.group({FromDate:"",ToDate:["",[r.B.required]],Service:["",[r.B.required]],Searchtext:["",[r.B.required]],Criteria:"",FinYear:0})},t.prototype.createSearchGetCancelltionRequest=function(t){var e={};return e.TUI=this.generalState.TUI,e.ClientID=this.generalState.ClientID,"Cancelrefid"==t.controls.Criteria.value?e.CancellationID=t.controls.Searchtext.value:"Refid"==t.controls.Criteria.value?e.TransactionID=t.controls.Searchtext.value:(e.CancellationID="",e.TransactionID=""),e.TravelFromDate="",e.TravelToDate="",e.TransactionType="C",e.Service=t.controls.Service.value,e.BookingFromDate=t.controls.FromDate.value,e.BookingToDate=t.controls.ToDate.value,e.FinYear=t.controls.FinYear.value?t.controls.FinYear.value:0,e},t}()}}]);