1"use strict";(self.webpackChunkPICOWeb=self.webpackChunkPICOWeb||[]).push([[397],{55337(_,d,r){r.d(d,{Q:()=>S});var t=r(35547);function p(i,v){if(1&i&&t.EFF(0),2&i){const n=t.XpG(2);t.Lme(" ",n.loaderHeading,"... ",n.loaderDescription," ")}}function g(i,v){if(1&i&&(t.j41(0,"section",0)(1,"div",1)(2,"div",2),t.nrm(3,"img",3),t.k0s(),t.j41(4,"h4"),t.EFF(5),t.k0s(),t.j41(6,"p"),t.EFF(7),t.k0s()(),t.j41(8,"div",4),t.nVh(9,p,1,2),t.k0s()()),2&i){const n=t.XpG();t.R7$(5),t.SpI("",n.loaderHeading,"..."),t.R7$(2),t.SpI(" ",n.loaderDescription," "),t.R7$(2),t.vxM(n.isLoaderActive||n.isPaymentAPICall?9:-1)}}let S=(()=>{class i{constructor(){this.loaderHeading="",this.loaderDescription="",this.isLoaderActive=!1,this.isPaymentAPICall=!1}static{this.\u0275fac=function(h){return new(h||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-enhanced-loader"]],inputs:{loaderHeading:"loaderHeading",loaderDescription:"loaderDescription",isLoaderActive:"isLoaderActive",isPaymentAPICall:"isPaymentAPICall"},standalone:!1,decls:1,vars:1,consts:[[1,"common-container","loader-center"],["aria-hidden","true",1,"loader-section"],[1,"loader-logo"],["src","assets/images/loader.gif","alt","",1,"search-loader-icon"],["aria-live","assertive","aria-atomic","true","role","alert",1,"sr-only"]],template:function(h,l){1&h&&t.nVh(0,g,10,3,"section",0),2&h&&t.vxM(l.isLoaderActive||l.isPaymentAPICall?0:-1)},styles:[".search-loader-icon[_ngcontent-%COMP%]{width:110px!important;object-fit:contain;display:block;margin:4rem auto 1rem;mix-blend-mode:multiply}.loader-center[_ngcontent-%COMP%]{margin:0 auto!important}.loader-section[_ngcontent-%COMP%]{text-align:center;width:90%;margin:0 auto}.loader-section[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1.25rem;margin-bottom:1rem;line-height:1.563rem;font-weight:600}.loader-section[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;color:var(--primary-coalescent)!important}@media(width<=1023px){.search-loader-icon[_ngcontent-%COMP%]{margin:2rem auto 1rem}.loader-section[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.375rem}.loader-section[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.375rem}}"]})}}return i})()},5397(_,d,r){r.r(d),r.d(d,{EnhancedValidateComponent:()=>O});var t=r(70631),p=r(54097),g=r(29751),S=r(30999),i=r(10017),v=r(59592),n=r(33869),h=r(95440),l=r(25808),C=r(9486),o=r(70307),m=r(45312),R=r(71480),c=r(35547),P=r(85802),E=r(34006),D=r(55337);let O=(()=>{class u{constructor(e,s){this.injector=e,this.dialog=s,this.isUpgradeChange=!1,this.voidPaymentErrorMessageFromApi="Error in completeOrder",this.voidPaymentErrorMessageToShow='Sorry we are unable to complete your purchase at this time. Please try again in 24 hours or for <a href="https://www.avantiwestcoast.co.uk/payment-error" target="_blank" class="text-spark-dark payment-sorry-popup-link">more information</a>.',this.isLoaderActive=!1,this.storageDataService=this.injector.get(C.h),this.sharedServices=this.injector.get(h.d),this.sharedServiceCache=this.injector.get(l.J),this.localStorageKeyEnum=this.injector.get(o.ZM),this.commonService=this.injector.get(i.e),this.appRouteEnum=this.injector.get(o.Gg),this.enhancedAppRouteEnum=this.injector.get(o.yH),this.completeOrderService=this.injector.get(v.F),this.router=this.injector.get(t.Ix),this.enhancedCompleteOrderService=this.injector.get(n.n),this.enhancedLocalOrSessionStorageKeyEnum=this.injector.get(o.ri),this.enhancedPaymentPageMessageEnum=this.injector.get(o._L),this.enhancedDynamicClassesNameEnum=this.injector.get(o.mB),this.enhancedLoaderTextEnum=this.injector.get(o.yr)}ngOnInit(){let e=JSON.parse(localStorage.getItem(this.localStorageKeyEnum.isChangeReplace)),s=JSON.parse(localStorage.getItem(this.enhancedLocalOrSessionStorageKeyEnum.isCOJChange));if(this.isUpgradeChange=this.storageDataService.getSessionStorageData(this.enhancedLocalOrSessionStorageKeyEnum.isUpgradeChange,!0),this.browserRefresh=p.oK,this.browserRefresh){let a=null;a=this.setSharedSiblingRefreshOnInit(),a&&(this.sharedServices.ReservationCache=a.ReservationCache,this.sharedServices.enhancedReviewBuyResponse=a.enhancedReviewBuyResponse,this.setReviewByCacheOfSharedService(a,s),this.sharedServices.searchRequest=a.searchRequest,this.sharedServices.fareBreakdownModelData=a.fareBreakdownModelData,this.sharedServices.totalPriceToPayReviewBuy=a.totalPriceToPayReviewBuy,this.sharedServices.journey=a.journey,this.sharedServices.CojSearchRequest=a.CojSearchRequest,this.sharedServices.COJjourneySummaryMo
1del=a.COJjourneySummaryModel,this.sharedServices.journeySummaryModel=a.journeySummaryModel,this.sharedServices.CojReviewBuyRequest=a.CojReviewBuyRequest,this.sharedServices.selectedJourneyDataForQuickBuyOrContiue=a?.selectedJourneyDataForQuickBuyOrContiue,this.sharedServices.reviewBuyResponse=a?.reviewBuyResponse,!0===this.isUpgradeChange&&(this.sharedServices.upgradeSearchRequest=a.upgradeSearchRequest,this.sharedServices.upgradeReviewBuyRequest=a.upgradeReviewBuyRequest),this.sharedServices.setSharedCache(),this.storageDataService.clearSessionStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling),this.storageDataService.setSessionStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling,this.sharedServiceCache,!0))}this.enhancedValidatePaymentRequest=new S.q,this.enhancedValidatePaymentRequest.CustomerKey=localStorage.getItem(this.localStorageKeyEnum.customerKey),this.enhancedValidatePaymentRequest.Email=localStorage.getItem(this.localStorageKeyEnum.email),this.enhancedValidatePaymentRequest.OrderId=Number(localStorage.getItem(this.localStorageKeyEnum.prepareOrderId)),this.setIsSeasonTrueForValidatePaymentRequest(),this.callCompleteOrderMethodBasedOnChangeReplace(e,s)}RefreshParent(){null!=window.opener&&!window.opener.closed&&window.opener.location.reload()}setSharedSiblingRefreshOnInit(){let e=null;return e=!0===this.isUpgradeChange?this.storageDataService.getSessionStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling,!0):this.storageDataService.getStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling,!0),e}setReviewByCacheOfSharedService(e,s){e?.enhancedReviewBuyResponse&&(s||this.isUpgradeChange||e?.enhancedReviewBuyResponse?.IsRenewSmartcard?this.sharedServices.postSaleReviewBuyCache=e?.enhancedReviewBuyResponse?.ReviewBuyCache:this.sharedServices.reviewBuyCache=e?.enhancedReviewBuyResponse?.ReviewBuyCache)}callCompleteOrderMethodBasedOnChangeReplace(e,s){e?this.getSmartcardCompleteOrder():(s&&(this.enhancedValidatePaymentRequest=this.commonService.setNrcotCojRequest(this.enhancedValidatePaymentRequest)),this.getCompleteOrder(s))}getCompleteOrder(e){this.commonService.loaderRequired=!0;let s=!!e,a=this.getPaymentUrl(e),f=s||!0===this.isUpgradeChange;this.isLoaderActive=!0,this.enhancedCompleteOrderService.enhancedCompleteOrderResponse(this.enhancedValidatePaymentRequest,f).subscribe(y=>{this.isLoaderActive=!1,this.sharedServices.isSearchResultPage=!1,localStorage.removeItem(this.localStorageKeyEnum.prepareOrderId),null!=y&&(this.responseData=y,"200"==this.responseData.ResponseCode?(this.enhancedValidatePaymentResponse=this.responseData.Data,this.enhancedValidatePaymentResponse.PaymentStatus==m.c.cancelPaymentStatus||this.enhancedValidatePaymentResponse.PaymentStatus==m.c.cardExistStatus?this.checkPaymentStatus(s,a):this.setCompleteOrderData(s)):"422"==this.responseData?.ResponseCode?this.commonService.openNrcotValidationPopup(this.responseData?.Data?.Message,!1):this.errorCompleteOrder(s,a))})}getPaymentUrl(e){return e?this.appRouteEnum.CojPayment:!0===this.isUpgradeChange?this.appRouteEnum.upgradePayment:this.appRouteEnum.Payment}setIsSeasonTrueForValidatePaymentRequest(){localStorage.getItem("IsSeason")&&(this.enhancedValidatePaymentRequest.IsSeason=!0)}getSmartcardCompleteOrder(){this.commonService.loaderRequired=!0,this.completeOrderService.getSmartCardCompleteOrderResponse(this.enhancedValidatePaymentRequest).subscribe(e=>{this.sharedServices.isSearchResultPage=!1,null!=e&&(this.responseData=e,"200"==this.responseData.ResponseCode?(this.smartCardValidateResponse=this.responseData.Data,this.smartCardValidateResponse.PaymentStatus==m.c.cancelPaymentStatus||this.smartCardValidateResponse.PaymentStatus==m.c.cardExistStatus?this.router.navigate(["./"+this.appRouteEnum.Payment]).then(()=>{this.dialog.open(g.k,{width:"500px",disableClose:!1,data:{Message:this.smartCardValidateResponse.StatusMessage}})}):(this.sharedServices.showSmartcardMessage=!0,localStorage.removeItem(this.localStorageKeyEnum.isChangeReplace),this.router.navigateByUrl("/"+this.appRouteEnum.PaymentsAndVouchers))):(this.commonService.loaderRequired=!0,this.router.navigate(["./"+this.appRouteEnum.Payment]).then(()=>{this.commonService.showEnhancedCommonErrorPopup()})))})}checkPaymentStatus(e,s){!1===e&&!0!==this.isUpgradeChange?(this.sharedServices.getBasketCount.emit(this.sharedServices?.enhancedReviewBuyResponse?.BasketCount),this.commonService.loaderRequired=!0):this.commonService.loaderRequired=!1,this.router.navigate(["./"+s]).then(()=>{!0===this.isUpgradeChange?(this.storageDataService.setSessionStorageData("isErrorComingFromUpgradeChange",!0,!0),this.paymentNotCompletedPopup()):this.paymentNotCompletedPopup()})}setCompleteOrderData(e){this.sharedServices.enhancedValidatePaymentResponse=this.enhancedValidatePaymentResponse,this.storageDataService.clearStorageData("isRedirectFromValidateDo"),this.storageDataService.setStorageData("isRedirectFromValidateDo",!0,!0),localStorage.setItem(this.localStorageKeyEnum?.validatePaymentResponseText,JSON.stringify(this.enhancedValidatePaymentResponse)),e?(this.commonService.loaderRequired=!0,this.sharedServices.reviewBuyCache="",this.sharedServices.reviewBuyResponse=null,this.sharedServices.setSharedCache(),this.storageDataService.clearStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling),this.storageDataService.setStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling,this.sharedServiceCache,!0),localStorage.setItem(this.localStorageKeyEnum.validatePaymentResponse,JSON.stringify(this.enhancedValidatePaymentResponse)),this.router.navigate(["./"+this.appRouteEnum.ViewBooking],{queryParams:{isCoj:!0}})):!0===this.isUpgradeChange?(this.commonService.loaderRequired=!0,this.sharedServices.reviewBuyCache="",this.sharedServices.reviewBuyResponse=null,localStorage.setItem(this.localStorageKeyEnum.validatePaymentResponse,JSON.stringify(this.enhancedValidatePaymentResponse)),this.storageDataService.setSessionStorageData(this.localStorageKeyEnum.validatePaymentResponse,this.enhancedValidatePaymentResponse,!0),this.sharedServices.setSharedCache(),this.storageDataService.clearSessionStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling),this.storageDataService.setSessionStorageData(this.enhancedLocalOrSessionStorageKeyEnum?.sharedSibling,this.sharedServiceCache,!0),this.router.navigate(["./"+this.appRouteEnum.ViewBooking],{queryParams:{isUpgrade:!0}}
1)):this.router.navigate(["./"+this.appRouteEnum.Confirmation])}errorCompleteOrder(e,s){!1===e&&!0!==this.isUpgradeChange?(this.sharedServices.getBasketCount.emit(this.sharedServices?.enhancedReviewBuyResponse?.BasketCount),this.commonService.loaderRequired=!0):this.commonService.loaderRequired=!1,this.router.navigate(["./"+s]).then(()=>{501===Number(this.responseData.ResponseCode)&&this.responseData.ResponseMessage&&this.responseData.ResponseMessage.toLowerCase()===this.voidPaymentErrorMessageFromApi.toLowerCase()?this.commonService.showEnhancedCommonErrorPopup(!0):this.commonService.showEnhancedCommonErrorPopup()})}paymentNotCompletedPopup(){this.dialog.open(R.m,{disableClose:!0,panelClass:[this.enhancedDynamicClassesNameEnum?.enhancedLogoutPopup,this.enhancedDynamicClassesNameEnum?.enhancedLogoutStylePopup],width:"22.688rem",autoFocus:!1,data:{Message:this.enhancedValidatePaymentResponse.StatusMessage,headerTitle:this.enhancedPaymentPageMessageEnum?.paymentErrorTitle}})}static{this.\u0275fac=function(s){return new(s||u)(c.rXU(P.zZn),c.rXU(E.bZ))}}static{this.\u0275cmp=c.VBU({type:u,selectors:[["app-enhanced-validate"]],standalone:!1,decls:1,vars:3,consts:[[3,"isLoaderActive","loaderHeading","loaderDescription"]],template:function(s,a){1&s&&c.nrm(0,"app-enhanced-loader",0),2&s&&c.Y8G("isLoaderActive",a.isLoaderActive)("loaderHeading",null==a.enhancedLoaderTextEnum?null:a.enhancedLoaderTextEnum.validateDoLoaderheading)("loaderDescription",null==a.enhancedLoaderTextEnum?null:a.enhancedLoaderTextEnum.validateDoLoaderDescription)},dependencies:[D.Q],styles:["[_nghost-%COMP%]{--empty: 0}"]})}}return u})()}}]);
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.