1"use strict";(self.webpackChunkweb_booking=self.webpackChunkweb_booking||[]).push([[79],{87079:function(e,t,i){i.r(t),i.d(t,{YelowCabAddBookingModule:function(){return Oh}});var n=i(16274),o=i(29535),a=i(79730),r=i(93324),l=i(87135),s=i(77390),u=i(21499),d=i(64268),c=i(44454),h=i(43239),g=i(48135),p=i(75349),m=i(47461),_=i(41205),f=i(42741),v=i(54972),y=i(61921),b=i(27374),x=i(6006),k=i(37299),Z=i(55167),C=i(29343),F=i(35910),T=i(6050),A=i(16456),P=i(41078),w=i(8432),q=i(90464),D=i.n(q),O=i(60223),L=i(58361),M=i(56949),V=i(13370),S=i(82918),E=i(57919),U=i(1573),N=i(60213),I=i(91454),j=i(29481),R=i(87387),z=i(12598),J=i(49299),B=i(59012),Y=i(49688),Q=i(59917),H=i(88561),G=i(70642),K=i(86603),W=i(4921);const X=["otpOne"];function ee(e,t){if(1&e&&(f.TgZ(0,"p",24),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.login_information)}}function te(e,t){1&e&&(f.TgZ(0,"i",16),f._uU(1,"*"),f.qZA())}function ie(e,t){if(1&e&&(f.TgZ(0,"P",25),f._uU(1),f.qZA()),2&e){const e=t.item;f.s9C("title",null==e?null:e.code_name),f.xp6(1),f.hij(" ",e.code_name," ")}}function ne(e,t){1&e&&(f.TgZ(0,"small",26),f._uU(1,"Checking phone number..."),f.qZA())}function oe(e,t){if(1&e&&f._UZ(0,"span",27),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.dial_code,f.oJD)}}function ae(e,t){if(1&e&&f._UZ(0,"span",27),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.phone_number,f.oJD)}}function re(e,t){1&e&&(f.TgZ(0,"i",16),f._uU(1,"*"),f.qZA())}function le(e,t){1&e&&(f.TgZ(0,"small",26),f._uU(1,"Checking email..."),f.qZA())}function se(e,t){if(1&e&&f._UZ(0,"span",27),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.email,f.oJD)}}function ue(e,t){if(1&e&&f._UZ(0,"span",27),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.first_name,f.oJD)}}function de(e,t){if(1&e&&f._UZ(0,"span",27),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.last_name,f.oJD)}}function ce(e,t){if(1&e&&(f.TgZ(0,"div",28),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",e.formErrors.apierror," ")}}function he(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",29),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).backClick.emit()}),f._uU(1),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.back)||"Back"," ")}}function ge(e,t){1&e&&f._UZ(0,"i",30)}const pe=function(e){return{"has-error":e}},me=function(e,t){return{background:e,color:t}};function _e(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"form",2),f.NdJ("ngSubmit",function(){return f.CHM(e),f.oxw().submitLoginForm()}),f.TgZ(2,"div",3),f.YNc(3,ee,2,1,"p",4),f.TgZ(4,"div",5),f.TgZ(5,"label",6),f._uU(6),f.YNc(7,te,2,0,"i",7),f.qZA(),f.TgZ(8,"div",8),f.TgZ(9,"ng-select",9),f.NdJ("change",function(){return f.CHM(e),f.oxw().onDialCodeChanged()}),f.YNc(10,ie,2,2,"ng-template",10),f.qZA(),f.TgZ(11,"input",11),f.NdJ("input",function(){return f.CHM(e),f.oxw().onContactInputChanged()})("blur",function(){return f.CHM(e),f.oxw().onPhoneBlur()}),f.qZA(),f.qZA(),f.YNc(12,ne,2,0,"small",12),f.YNc(13,oe,1,1,"span",13),f.YNc(14,ae,1,1,"span",13),f.qZA(),f.TgZ(15,"div",14),f.TgZ(16,"label",6),f._uU(17),f.YNc(18,re,2,0,"i",7),f.qZA(),f.TgZ(19,"div",8),f.TgZ(20,"input",15),f.NdJ("input",function(){return f.CHM(e),f.oxw().onContactInputChanged()})("blur",function(){return f.CHM(e),f.oxw().onEmailBlur()}),f.qZA(),f.qZA(),f.YNc(21,le,2,0,"small",12),f.YNc(22,se,1,1,"span",13),f.qZA(),f.TgZ(23,"div",14),f.TgZ(24,"label",6),f._uU(25),f.TgZ(26,"i",16),f._uU(27,"*"),f.qZA(),f.qZA(),f.TgZ(28,"input",17),f.NdJ("input",function(){return f.CHM(e),f.oxw().generateErrors()}),f.qZA(),f.YNc(29,ue,1,1,"span",13),f.qZA(),f.TgZ(30,"div",14),f.TgZ(31,"label",6),f._uU(32),f.TgZ(33,"i",16),f._uU(34,"*"),f.qZA(),f.qZA(),f.TgZ(35,"input",18),f.NdJ("input",function(){return f.CHM(e),f.oxw().generateErrors()}),f.qZA(),f.YNc(36,de,1,1,"span",13),f.qZA(),f.YNc(37,ce,2,1,"div",19),f.qZA(),f.TgZ(38,"div",20),f.YNc(39,he,2,1,"button",21),f.TgZ(40,"button",22),f.YNc(41,ge,1,0,"i",23),f._uU(42),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("formGroup",e.loginForm),f.xp6(2),f.Q6J("ngIf",!e.showBackButton),f.xp6(1),f.Q6J("ngClass",f.VKq(52,pe,e.formErrors.phone_number||e.formErrors.dial_co
1de)),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.phone_number," "),f.xp6(1),f.Q6J("ngIf",e.isPhoneMandatory()),f.xp6(1),f.Q6J("ngClass",f.VKq(54,pe,e.formErrors.phone_number||e.formErrors.dial_code)),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.dial_code)("notFoundText",null==e.currentLanguage?null:e.currentLanguage.no_data_found)("formControl",e.loginForm.controls.dial_code)("items",e.dialCodeList),f.xp6(2),f.Q6J("formControl",e.loginForm.controls.phone_number)("placeholder",null==e.currentLanguage?null:e.currentLanguage.phone_number_placeholder),f.xp6(1),f.Q6J("ngIf",e.phoneCheckInProgress),f.xp6(1),f.Q6J("ngIf",e.formErrors.dial_code),f.xp6(1),f.Q6J("ngIf",e.formErrors.phone_number),f.xp6(1),f.Q6J("ngClass",f.VKq(56,pe,e.formErrors.email)),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.email," "),f.xp6(1),f.Q6J("ngIf",e.isEmailMandatory()),f.xp6(1),f.Q6J("ngClass",f.VKq(58,pe,e.formErrors.email)),f.xp6(1),f.Q6J("formControl",e.loginForm.controls.email)("placeholder",null==e.currentLanguage?null:e.currentLanguage.enter_email),f.xp6(1),f.Q6J("ngIf",e.emailCheckInProgress),f.xp6(1),f.Q6J("ngIf",e.formErrors.email),f.xp6(1),f.Q6J("ngClass",f.VKq(60,pe,e.formErrors.first_name)),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.enter_name," "),f.xp6(3),f.Q6J("ngClass",f.VKq(62,pe,e.formErrors.first_name))("formControl",e.loginForm.controls.first_name),f.xp6(1),f.Q6J("ngIf",e.formErrors.first_name),f.xp6(1),f.Q6J("ngClass",f.VKq(64,pe,e.formErrors.last_name)),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.enter_last_name," "),f.xp6(3),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.enter_last_name)("formControl",e.loginForm.controls.last_name),f.xp6(1),f.Q6J("ngIf",e.formErrors.last_name),f.xp6(1),f.Q6J("ngIf",null!=e.formErrors.apierror),f.xp6(1),f.ekj("yc-login-actions--with-back",e.showBackButton)("p-4",!e.showBackButton),f.xp6(1),f.Q6J("ngIf",e.showBackButton),f.xp6(1),f.Akn(f.WLB(66,me,null==e.themeCodeData?null:e.themeCodeData.user_primary_color,null==e.themeCodeData?null:e.themeCodeData.user_secondary_color)),f.ekj("btn",!e.showBackButton)("btn-primary",!e.showBackButton)("btn-block",!e.showBackButton)("btn-lg",!e.showBackButton),f.Q6J("disabled",e.showLoader||e.phoneCheckInProgress||e.emailCheckInProgress||e.showEmailConfirmModal||e.showUniqueFieldModal||e.uniqueFieldUpdateInProgress),f.xp6(1),f.Q6J("ngIf",e.showLoader),f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.submit," ")}}function fe(e,t){if(1&e&&(f.TgZ(0,"div",39),f.TgZ(1,"p",40),f.TgZ(2,"strong"),f._uU(3,"Name:"),f.qZA(),f._uU(4),f.qZA(),f.TgZ(5,"p",40),f.TgZ(6,"strong"),f._uU(7,"Email:"),f.qZA(),f._uU(8),f.qZA(),f.TgZ(9,"p",41),f.TgZ(10,"strong"),f._uU(11,"Phone:"),f.qZA(),f._uU(12),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(4),f.hij(" ",e.maskedUserPreview.name,""),f.xp6(4),f.hij(" ",e.maskedUserPreview.email,""),f.xp6(4),f.hij(" ",e.maskedUserPreview.phone,"")}}function ve(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",31),f.TgZ(1,"div",32),f.TgZ(2,"h5",33),f._uU(3,"Is this you?"),f.qZA(),f.TgZ(4,"p",34),f._uU(5,"We found an account matching this email."),f.qZA(),f.YNc(6,fe,13,3,"div",35),f.TgZ(7,"div",36),f.TgZ(8,"button",37),f.NdJ("click",function(){return f.CHM(e),f.oxw().rejectEmailUser()}),f._uU(9,"No"),f.qZA(),f.TgZ(10,"button",38),f.NdJ("click",function(){return f.CHM(e),f.oxw().confirmEmailUser()}),f._uU(11,"OK"),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(6),f.Q6J("ngIf",e.maskedUserPreview),f.xp6(4),f.Akn(f.WLB(3,me,(null==e.themeCodeData?null:e.themeCodeData.user_primary_color)+"!important",null==e.themeCodeData?null:e.themeCodeData.user_secondary_color))}}function ye(e,t){1&e&&f._UZ(0,"i",30)}const be=function(){return{standalone:!0}};function xe(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",31),f.TgZ(1,"div",32),f.TgZ(2,"h5",33),f._uU(3,"What would you like to do?"),f.qZA(),f.TgZ(4,"p",34),f._uU(5),f.qZA(),f.TgZ(6,"div",42),f.TgZ(7,"label",43),f.TgZ(8,"input",44),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().uniqueFieldAction=t}),f.qZA(),f.TgZ(9,"span"),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"label",45),f.TgZ(12,"input",46),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().uniqueFieldAction=t}),f.qZA(),f.TgZ(13,"span"),f._uU(14),f.qZA(),f.qZA(),f.qZA(),f.TgZ(15,"div",36),f.TgZ(16,"button",47),f.NdJ("click",function(){return f.CHM(e),f.oxw().cancelUniqueFieldModal()}),f._uU(17,"Cancel"),f.qZA(),f.TgZ(18,"button",48),f.NdJ("click",function(){return f.CHM(e),f.oxw().confirmUniqueFieldChoice()}),f.YNc(19,ye,1,0,"i",23),f._uU(20," Continue "),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(5),f.Oqu(e.uniqueFieldModalMessage),f.xp6(3),f.Q6J("ngModel",e.uniqueFieldAction)("ngModelOptions",f.DdM(12,be)),f.xp6(2),f.Oqu(e.uniqueFieldUpdateLabel),f.xp6(2),f.Q6J("ngModel",e.uniqueFieldAction)("ngModelOptions",f.DdM(13,be)),f.xp6(2),f.Oqu(e.uniqueFieldNewCustomerLabel),f.xp6(2),f.Q6J("disabled",e.uniqueFieldUpdateInProgress),f.xp6(2),f.Akn(f.WLB(14,me,(null==e.themeCodeData?null:e.themeCodeData.user_primary_color)+"!important",null==e.themeCodeData?null:e.themeCodeData.user_secondary_color)),f.Q6J("disabled",e.uniqueFieldUpdateInProgress),f.xp6(1),f.Q6J("ngIf",e.uniqueFieldUpdateInProgress)}}function ke(e,t){if(1&e&&(f.TgZ(0,"div",61),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" * ",null==e.currentLanguage?null:e.currentLanguage.enter_otp," ")}}function Ze(e,t){if(1&e&&(f.TgZ(0,"div",62),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",e.secondsLeft," ")}}function Ce(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",62),f.TgZ(1,"a",63),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).resendOtp()}),f._uU(2),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.resend_otp_text)}}function Fe(e,t){if(1&e&&(f.TgZ(0,"div",28),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",e.formErrors.apierror," ")}}function Te(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",29),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).backClick.emit()}),f._uU(1),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.back)||"Back"," ")}}function Ae(e,t){1&e&&f._UZ(0,"i",30)}function Pe(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"form",49),f.NdJ("ngSubmit",function(){return f.CHM(e),f.oxw().loginByOTP()}),f.TgZ(2,"div",3),f.TgZ(3,"div",50),f.TgZ(4,"h1",51),f.TgZ(5,"a",52),f.NdJ("click",function(){f.CHM(e);const t=f.oxw();return t.showLoginForm=!0,t.showOTPForm=!1}),f.TgZ(6,"i",53),f._uU(7,"\xa0"),f.qZA(),f.qZA(),f._uU(8),f.qZA(),f.qZA(),f.TgZ(9,"p",34),f._uU(10),f.qZA(),f.TgZ(11,"div",54),f.TgZ(12,"div",55),f.TgZ(13,"input",56),f.NdJ("keyup",function(t){return f.CHM(e),f.oxw().onDigitInput(t)})("paste",function(t){return f.CHM(e),f.oxw().paste(t)}),f.qZA(),f.TgZ(14,"input",57),f.NdJ("keyup",function(t){return f.CHM(e),f.oxw().onDigitInput(t)}),f.qZA(),f.TgZ(15,"input",57),f.NdJ("keyup",function(t){return f.CHM(e),f.oxw().onDigitInput(t)}),f.qZA(),f.TgZ(16,"input",57),f.NdJ("keyup",function(t){return f.CHM(e),f.oxw().onDigitInput(t,!0)}),f.qZA(),f.qZA(),f.TgZ(17,"small",58),f._uU(18),f.qZA(),f.YNc(19,ke,2,1,"div",59),f.qZA(),f.YNc(20,Ze,2,1,"div",60),f.YNc(21,Ce,3,1,"div",60),f.YNc(22,Fe,2,1,"div",19),f.qZA(),f.TgZ(23,"div",20),f.YNc(24,Te,2,1,"button",21),f.TgZ(25,"button",22),f.YNc(26,Ae,1,0,"i",23),f._uU(27),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("formGroup",e.OTPForm),f.xp6(7),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.otp_verification," "),f.xp6(2),f.Oqu(1==e.otpLoginType?(null==e.currentLanguage?null:e.currentLanguage.otp_message)+" "+e.loginForm.value.dial_code+" "+e.loginForm.value.phone_number:(null==e.currentLanguage?null:e.currentLanguage.otp_message_mail)+" "+e.loginForm.value.email),f.xp6(3),f.Q6J("formControl",e.OTPForm.controls.otp_d_1),f.xp6(1),f.Q6J("formControl",e.OTPForm.controls.otp_d_2),f.xp6(1),f.Q6J("formControl",e.OTPForm.controls.otp_d_3),f.xp6(1),f.Q6J("formControl",e.OTPForm.controls.otp_d_4),f.xp6(2),f.AsE("",null==e.currentLanguage?null:e.currentLanguage.tip," ",1==e.otpLoginType?null==e.currentLanguage?null:e.currentLanguage.phone_verify:null==e.currentLanguage?null:e.currentLanguage.email_verify," "),f.xp6(1),f.Q6J("ngIf",e.submitAttempt&&e.OTPForm.invali
1d),f.xp6(1),f.Q6J("ngIf","0:00:00"!=e.secondsLeft),f.xp6(1),f.Q6J("ngIf","0:00:00"==e.secondsLeft),f.xp6(1),f.Q6J("ngIf",null!=e.formErrors.apierror),f.xp6(1),f.ekj("yc-login-actions--with-back",e.showBackButton)("p-4",!e.showBackButton),f.xp6(1),f.Q6J("ngIf",e.showBackButton),f.xp6(1),f.Akn(f.WLB(31,me,null==e.themeCodeData?null:e.themeCodeData.user_primary_color,null==e.themeCodeData?null:e.themeCodeData.user_secondary_color)),f.ekj("btn",!e.showBackButton)("btn-primary",!e.showBackButton)("btn-block",!e.showBackButton)("btn-lg",!e.showBackButton),f.Q6J("disabled",e.showLoader||!e.enableOTPFormButton||e.optLoader),f.xp6(1),f.Q6J("ngIf",e.showLoader||e.optLoader),f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.validate," ")}}let we=(()=>{class e{constructor(e,t,i){this.auth=e,this.fb=t,this.toasterService=i,this.callBackObject=new f.vpe,this.backClick=new f.vpe,this.isOtpVerification=!1,this.showBackButton=!1,this.dialCodeList=F.si,this.themeCodeData="3db24b",this.showLoginForm=!0,this.showOTPForm=!1,this.isPhoneVarified=!1,this.isPasswordSet=!1,this.submitAttempt=!1,this.showLoader=!1,this.phoneCheckInProgress=!1,this.emailCheckInProgress=!1,this.showEmailConfirmModal=!1,this.showUniqueFieldModal=!1,this.modifiedFieldType="phone",this.uniqueFieldAction="update",this.uniqueFieldUpdateInProgress=!1,this.uniqueFieldModalMessage="",this.uniqueFieldUpdateLabel="",this.uniqueFieldNewCustomerLabel="Create booking for a new customer",this.identifiedCustomerSnapshot=null,this.maskedUserPreview=null,this.pendingUserDetails=null,this.identifiedByPhone=!1,this.lastCheckedPhoneKey="",this.lastCheckedEmail="",this.companyDetail=null,this.companyId=1,this.userId=null,this.token=null,this.userValidOTP=null,this.OTP_AUTH=1,this.PASSWORD_AUTH=2,this.COMPANY_AUTH_TYPE=1,this.formErrors={apierror:"",access_token:"",dial_code:"",phone_no:"",phone_number:"",email:null,first_name:"",last_name:""},this.currentUserDetail=null,this.companyPaymentGatewaySecretKey=null,this.userPassword="",this.userDataResponse=null,this.enableOTPFormButton=!0,this.secondsLeft="00:00:00",this.resend_hit=0,this.userAxisest=!1,this.otpLoginType=1,this.logInTypeArray=[],this.auth.themeCode.subscribe(e=>{this.themeCodeData=e}),this.loginForm=this.fb.group({dial_code:[null],phone_number:[null],email:[null,r.kI.compose([G.oH])],first_name:[null],last_name:[null]}),this.OTPForm=this.fb.group({otp_d_1:[null,r.kI.compose([r.kI.required])],otp_d_2:[null,r.kI.compose([r.kI.required])],otp_d_3:[null,r.kI.compose([r.kI.required])],otp_d_4:[null,r.kI.compose([r.kI.required])]}),this.auth.currentCompany.subscribe(e=>{Object.keys(e).length>0&&(this.companyDetail=e,this.companyId=this.companyDetail.company_id,this.auth.currentService.subscribe(e=>{e&&(this.currentService=e,this.checkLoginType())}))}),this.validationMessages={access_token:{required:"* Please enter access token",whiteSpace:"* White Space not allowed"},dial_code:{required:"* Please enter Dial Code"},phone_number:{required:"* Please enter Phone Number",minlength:"Please enter at least 5 digits",maxlength:"Please enter a valid mobile number containing up to 15 digits."},email:G.B1,first_name:{required:"Please enter your name",whiteSpace:"White Space not allowed"},last_name:{required:"Please enter your last name",whiteSpace:"White Space not allowed"}},this.patchValue()}get isEmbeddedLayout(){return!!this.showBackButton}ngOnInit(){this.auth.langaugeSubjectData.subscribe(e=>{var t,i;this.currentLanguage=null==e?void 0:e.labels,this.logInTypeArray=[{type_id:1,type_name:null===(t=this.currentLanguage)||void 0===t?void 0:t.phone_number},{type_id:2,type_name:null===(i=this.currentLanguage)||void 0===i?void 0:i.email}]}),this.dialCodeList.map(e=>e.code_name=`(${e.code}) ${e.name}`)}checkLoginType(){this.auth.checkmail.subscribe(e=>{var t;e.status&&(this.LoginType=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.s_key_value,this.updateAllValidators())})}isPhoneMandatory(){return 2==this.LoginType}isEmailMandatory(){return 2!=this.LoginType}hasPhoneValue(){var e;return!!(null===(e=this.loginForm.value.phone_number)||void 0===e?void 0:e.toString().trim())}hasEmailValue(){var e;return!!(null===(e=this.loginForm.value.email)||void 0===e?void 0:e.toString().trim())}
1isPhoneInputValid(){const e=this.loginForm.get("dial_code"),t=this.loginForm.get("phone_number");return(null==e?void 0:e.valid)&&(null==t?void 0:t.valid)&&this.hasPhoneValue()}isEmailInputValid(){const e=this.loginForm.get("email");return(null==e?void 0:e.valid)&&this.hasEmailValue()}getPhoneCheckKey(){return`${this.loginForm.value.dial_code||""}-${this.loginForm.value.phone_number||""}`}updateAllValidators(){const e=this.hasPhoneValue();this.isPhoneMandatory()?(this.loginForm.get("dial_code").setValidators([r.kI.required]),this.loginForm.get("phone_number").setValidators([r.kI.required,r.kI.minLength(5),r.kI.maxLength(15)]),this.loginForm.get("email").setValidators([G.oH])):(this.loginForm.get("email").setValidators([r.kI.required,G.oH]),e?(this.loginForm.get("dial_code").setValidators([r.kI.required]),this.loginForm.get("phone_number").setValidators([r.kI.required,r.kI.minLength(5),r.kI.maxLength(15)])):(this.loginForm.get("dial_code").setValidators([]),this.loginForm.get("phone_number").setValidators([]))),this.loginForm.get("first_name").setValidators([r.kI.required,b.Sl]),this.loginForm.get("last_name").setValidators([r.kI.required,b.Sl]),Object.keys(this.loginForm.controls).forEach(e=>{this.loginForm.get(e).updateValueAndValidity({emitEvent:!1})})}onContactInputChanged(){this.pendingUserDetails&&this.resetIdentification(!1),this.updateAllValidators(),this.generateErrors()}onDialCodeChanged(){this.onContactInputChanged(),this.userAxisest&&this.isPhoneModifiedFromSnapshot()&&!this.showUniqueFieldModal&&this.checkModifiedPhoneUnique()}resetIdentification(e=!0){this.userAxisest=!1,this.identifiedByPhone=!1,this.pendingUserDetails=null,this.maskedUserPreview=null,this.showEmailConfirmModal=!1,this.showUniqueFieldModal=!1,this.identifiedCustomerSnapshot=null,this.userDetails=null,this.userDataResponse=null,this.lastCheckedPhoneKey="",this.lastCheckedEmail="",e&&this.loginForm.patchValue({phone_number:null,email:null,first_name:null,last_name:null,dial_code:this.loginForm.value.dial_code})}onPhoneBlur(){var e=this;if(this.showEmailConfirmModal||this.phoneCheckInProgress||this.showUniqueFieldModal)return;if(this.userAxisest&&this.isPhoneModifiedFromSnapshot())return void this.checkModifiedPhoneUnique();if(this.userAxisest||this.identifiedByPhone||(this.updateAllValidators(),!this.isPhoneInputValid()))return;const t=this.getPhoneCheckKey();t!==this.lastCheckedPhoneKey&&(this.lastCheckedPhoneKey=t,this.phoneCheckInProgress=!0,this.formErrors.apierror="",this.auth.checkUserMobile({user_type:3,phone_number:this.loginForm.value.phone_number,dial_code:this.loginForm.value.dial_code}).subscribe(function(){var t=(0,y.Z)(function*(t){e.phoneCheckInProgress=!1,1005!=(null==t?void 0:t.error_code)?e.isCheckSuccess(t)&&(yield e.applyExistingCustomerFromPhoneCheck(t)):e.formErrors.apierror="* Your account is blocked, please contact administrator!"});return function(e){return t.apply(this,arguments)}}(),()=>{this.phoneCheckInProgress=!1}))}checkModifiedPhoneUnique(){var e=this;if(this.updateAllValidators(),!this.isPhoneInputValid())return;const t=this.getPhoneCheckKey();t!==this.lastCheckedPhoneKey&&(this.lastCheckedPhoneKey=t,this.phoneCheckInProgress=!0,this.formErrors.apierror="",this.auth.checkUserMobile({user_type:3,phone_number:this.loginForm.value.phone_number,dial_code:this.loginForm.value.dial_code}).subscribe(function(){var t=(0,y.Z)(function*(t){e.phoneCheckInProgress=!1,1005!=(null==t?void 0:t.error_code)?e.isCheckSuccess(t)?yield e.applyExistingCustomerFromPhoneCheck(t):1001==(null==t?void 0:t.error_code)&&e.openUniqueFieldModal("phone"):e.formErrors.apierror="* Your account is blocked, please contact administrator!"});return function(e){return t.apply(this,arguments)}}(),()=>{this.phoneCheckInProgress=!1}))}applyExistingCustomerFromPhoneCheck(e){var t=this;return(0,y.Z)(function*(){var i;const n=yield t.auth.getUserdata(e.data.id).toPromise();(null==n?void 0:n.status)&&(t.userDetails=n.data,t.userDataResponse=e,t.userPassword=null===(i=e.data)||void 0===i?void 0:i.password,t.userAxisest=!0,t.identifiedByPhone=!0,t.otpLoginType=1,t.applyUserDetails(t.userDetails))})()}onEmailBlur(){var e,t=this;if(this.showEmailConfirmModal||this.emailCheckInProgress||this.showUniqueFieldModal)return;if(this.userAxisest&&this.isEmailModifiedFromSnapshot())return void this.checkModifiedEmailUnique();if(this.userAxisest||this.identifiedByPhone||(this.updateAllValidators(),!this.isEmailInputValid()))return;const i=null===(e=this.loginForm.value.email)||void 0===e?void 0:e.trim();i!==this.lastCheckedEmail&&(this.lastCheckedEmail=i,this.emailCheckInProgress=!0,this.formErrors.apierror="",this.auth.checkUserEmail({user_type:3,email:i}).subscribe(function(){var e=(0,y.Z)(function*(e){t.emailCheckInProgress=!1,1005!=(null==e?void 0:e.error_code)?t.isCheckSuccess(e)&&(yield t.applyExistingCustomerFromEmailCheck(e)):t.formErrors.apierror="* Your account is blocked, please contact administrator!"});return function(t){return e.apply(this,arguments)}}(),()=>{this.emailCheckInProgress=!1}))}checkModifiedEmailUnique(){var e,t=this;if(this.updateAllValidators(),!this.isEmailInputValid())return;const i=null===(e=this.loginForm.value.email)||void 0===e?void 0:e.trim();i!==this.lastCheckedEmail&&(this.lastCheckedEmail=i,this.emailCheckInProgress=!0,this.formErrors.apierror="",this.auth.checkUserEmail({user_type:3,email:i}).subscribe(function(){var e=(0,y.Z)(function*(e){t.emailCheckInProgress=!1,1005!=(null==e?void 0:e.error_code)?t.isCheckSuccess(e)?yield t.applyExistingCustomerFromEmailCheck(e):1001==(null==e?void 0:e.error_code)&&t.openUniqueFieldModal("email"):t.formErrors.apierror="* Your account is blocked, please contact administrator!"});return function(t){return e.apply(this,arguments)}}(),()=>{this.emailCheckInProgress=!1}))}applyExistingCustomerFromEmailCheck(e){var t=this;return(0,y.Z)(function*(){var i;const n=yield t.auth.getUserdata(e.data.id).toPromise();(null==n?void 0:n.status)&&(t.pendingUserDetails=n.data,t.userDataResponse=e,t.userPassword=null===(i=e.data)||void 0===i?void 0:i.password,t.otpLoginType=2,t.maskedUserPreview=t.buildMaskedUserPreview(t.pendingUserDetails),t.showEmailConfirmModal=!0)})()}buildMaskedUserPreview(e){const t=(null==e?void 0:e.last_name)||"";return{name:`${this.maskName((null==e?void 0:e.first_name)||"")} ${this.maskName(t)}`.trim(),email:this.maskEmail(null==e?void 0:e.email),phone:this.maskPhone(null==e?void 0:e.dial_code,null==e?void 0:e.phone_number)}}maskEmail(e){if(!e)return"";const t=e.split("@");if(2!==t.length)return"***";const i=t[0];return`${i.length<=1?"*":`${i[0]}***`}@${t[1]}`}maskPhone(e,t){return t?`${e||""} ******${t.toString().slice(-4)}`:""}maskName(e){return e?e.length<=1?"*":`${e[0]}***`:""}confirmEmailUser(){this.pendingUserDetails?(this.userDetails=this.pendingUserDetails,this.userAxisest=!0,this.applyUserDetails(this.pendingUserDetails),this.pendingUserDetails=null,this.maskedUserPreview=null,this.showEmailConfirmModal=!1):this.showEmailConfirmModal=!1}rejectEmailUser(){this.showEmailConfirmModal=!1,this.pendingUserDetails=null,this.maskedUserPreview=null,this.lastCheckedEmail="",this.loginForm.patchValue({email:null,first_name:null,last_name:null}),this.userAxisest=!1,this.generateErrors()}applyUserDetails(e){this.loginForm.patchValue({email:(null==e?void 0:e.email)||this.loginForm.value.email,first_name:(null==e?void 0:e.first_name)||this.loginForm.value.first_name,last_name:(null==e?void 0:e.last_name)||this.loginForm.value.last_name,dial_code:(null==e?void 0:e.dial_code)||this.loginForm.value.dial_code,ph
1one_number:(null==e?void 0:e.phone_number)||this.loginForm.value.phone_number},{emitEvent:!1}),this.setIdentifiedCustomerSnapshot(e),this.updateAllValidators(),this.generateErrors()}setIdentifiedCustomerSnapshot(e){var t,i;this.identifiedCustomerSnapshot=e?{id:e.id,dial_code:e.dial_code||"",phone_number:(null===(t=e.phone_number)||void 0===t?void 0:t.toString())||"",email:(null===(i=e.email)||void 0===i?void 0:i.trim())||"",first_name:e.first_name||"",last_name:e.last_name||""}:null}isPhoneModifiedFromSnapshot(){var e;if(!this.identifiedCustomerSnapshot)return!1;const t=this.loginForm.value.dial_code||"",i=(null===(e=this.loginForm.value.phone_number)||void 0===e?void 0:e.toString())||"";return t!==this.identifiedCustomerSnapshot.dial_code||i!==this.identifiedCustomerSnapshot.phone_number}isEmailModifiedFromSnapshot(){var e;return!!this.identifiedCustomerSnapshot&&((null===(e=this.loginForm.value.email)||void 0===e?void 0:e.trim())||"")!==this.identifiedCustomerSnapshot.email}openUniqueFieldModal(e){this.showEmailConfirmModal||this.showUniqueFieldModal||(this.modifiedFieldType=e,this.uniqueFieldAction="update","phone"===e?(this.uniqueFieldModalMessage="You have modified the phone number of an existing customer. What would you like to do?",this.uniqueFieldUpdateLabel="Update existing customer's phone number"):(this.uniqueFieldModalMessage="You have modified the email of an existing customer. What would you like to do?",this.uniqueFieldUpdateLabel="Update existing customer's email"),this.showUniqueFieldModal=!0)}confirmUniqueFieldChoice(){"update"!==this.uniqueFieldAction?this.applyNewCustomer():this.applyUpdateExisting()}cancelUniqueFieldModal(){var e;this.identifiedCustomerSnapshot&&this.applyUserDetails(this.identifiedCustomerSnapshot),this.showUniqueFieldModal=!1,this.uniqueFieldAction="update",this.lastCheckedPhoneKey=this.getPhoneCheckKey(),this.lastCheckedEmail=(null===(e=this.loginForm.value.email)||void 0===e?void 0:e.trim())||""}applyUpdateExisting(){var e,t,i,n;if(!(null===(e=this.userDetails)||void 0===e?void 0:e.id))return void this.cancelUniqueFieldModal();const o={};"phone"===this.modifiedFieldType?(o.dial_code=null===(t=this.loginForm.value.dial_code)||void 0===t?void 0:t.toString(),o.phone_number=null===(i=this.loginForm.value.phone_number)||void 0===i?void 0:i.toString()):o.email=null===(n=this.loginForm.value.email)||void 0===n?void 0:n.trim(),this.uniqueFieldUpdateInProgress=!0,this.auth.updatePassenger(this.userDetails.id,o).subscribe(e=>{var t;if(this.uniqueFieldUpdateInProgress=!1,this.phoneCheckInProgress=!1,this.emailCheckInProgress=!1,1==(null==e?void 0:e.status)||(null==e?void 0:e.success)){const i=Object.assign(Object.assign(Object.assign({},this.userDetails),o),(null==e?void 0:e.data)||{});this.userDetails=i,this.showUniqueFieldModal=!1,this.applyUserDetails(i),this.lastCheckedPhoneKey=this.getPhoneCheckKey(),this.lastCheckedEmail=(null===(t=this.loginForm.value.email)||void 0===t?void 0:t.trim())||"",this.toasterService.success((null==e?void 0:e.message)||"Customer updated successfully")}else this.toasterService.error((null==e?void 0:e.message)||"Failed to update customer"),this.cancelUniqueFieldModal()},()=>{this.uniqueFieldUpdateInProgress=!1,this.phoneCheckInProgress=!1,this.emailCheckInProgress=!1,this.toasterService.error("Failed to update customer"),this.cancelUniqueFieldModal()})}applyNewCustomer(){var e;const t="phone"===this.modifiedFieldType,i=t?this.loginForm.value.dial_code:null,n=t?this.loginForm.value.phone_number:null,o="email"===this.modifiedFieldType?null===(e=this.loginForm.value.email)||void 0===e?void 0:e.trim():null;this.userAxisest=!1,this.identifiedByPhone=!1,this.userDetails=null,this.userDataResponse=null,this.identifiedCustomerSnapshot=null,this.lastCheckedPhoneKey="",this.lastCheckedEmail="",this.loginForm.patchValue({first_name:null,last_name:null,dial_code:i,phone_number:n,email:o},{emitEvent:!1}),this.showUniqueFieldModal=!1,this.uniqueFieldAction="update",this.updateAllValidators(),this.generateErrors()}generateErrors(){Z.op._generateErrors(this.loginForm,this.formErrors,this.validationMessages,this.submitAttempt)}onDigitInput(e,t=!1){let i;"Backspace"!==e.code&&(i=e.srcElement.nextElementSibling),"Backspace"===e.code&&(i=e.srcElement.previousElementSibling),e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105?(e.srcElement.value=e.key,t&&this.loginByOTP(),i&&i.focus()):"Backspace"===e.code&&i?i.focus():e.preventDefault()}submitLoginForm(){if(!this.showEmailConfirmModal&&!this.showUniqueFieldModal&&(this.submitAttempt=!0,this.updateAllValidators(),this.generateErrors(),this.loginForm.valid)){if(this.submitAttempt=!1,this.formErrors.apierror="",this.userAxisest)return this.showLoader=!0,void this.continueAfterUserFound();if(this.isOtpVerification)return this.showLoader=!0,this.otpLoginType=this.isPhoneMandatory()?1:2,void this.sendOtp(this.buildOtpPayload());this.registerNewUser()}}isCheckSuccess(e){return!(!(null==e?void 0:e.success)&&!(null==e?void 0:e.status))}handleCheckError(){this.submitAttempt=!1,this.showLoader=!1,this.formErrors.apierror="*Server Error"}continueAfterUserFound(){this.isOtpVerification?this.sendOtp(this.buildOtpPayload()):this.checkOutSignUp()}buildOtpPayload(){const e={user_type:3};return 2==this.otpLoginType?e.email=this.loginForm.value.email:(e.phone_number=this.loginForm.value.phone_number,e.dial_code=this.loginForm.value.dial_code),e}checkOutSignUp(){this.userAxisest&&(this.auth.updateUserData(this.userDetails),this.formErrors.apierror=null,this.showLoader=!0,this.showOTPForm=!1,this.goToSingup({button_id:null,bookRide:!0}))}registerNewUser(){var e,t,i,n,o,a,r;this.showLoader=!0;const l={email:this.loginForm.value.email,first_name:this.loginForm.value.first_name,last_name:this.loginForm.value.last_name,phone_number:null===(i=null===(t=null===(e=this.loginForm)||void 0===e?void 0:e.value)||void 0===t?void 0:t.phone_number)||void 0===i?void 0:i.toString(),dial_co
1de:null===(a=null===(o=null===(n=this.loginForm)||void 0===n?void 0:n.value)||void 0===o?void 0:o.dial_code)||void 0===a?void 0:a.toString(),company_id:null===(r=this.companyDetail)||void 0===r?void 0:r.company_id};this.auth.registerPassenger(l).subscribe(e=>{this.showLoader=!1,this.submitAttempt=!1,1==e.status?(this.auth.setAuth(e),this.auth.updateUserData(null==e?void 0:e.data),this.goToSingup({button_id:null,bookRide:!0})):this.toasterService.error(e.message)},()=>{this.showLoader=!1,this.submitAttempt=!1,this.formErrors.apierror="* Server Error"})}resendOtp(){this.formErrors.apierror=null,this.resend_hit++,this.sendOtp(this.buildOtpPayload()),this.toasterService.success("OTP resent successfully"),this.OTPForm.reset(),0!=this.max_attempt&&this.max_attempt--}sendOtp(e){this.auth.sendOTPMobile(e).subscribe(e=>{var t,i,n,o;this.showLoader=!1,this.submitAttempt=!1,1==e.status?(this.showLoginForm=!1,this.max_attempt=null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.otp_attempt)||void 0===i?void 0:i.max_attempt,this.resend_timeout=null===(o=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.otp_attempt)||void 0===o?void 0:o.resend_timeout,(0,Y.H)(0,1e3).pipe((0,Q.q)(this.resend_timeout+1),(0,H.U)(e=>this.resend_timeout-e)).subscribe(e=>{this.secondsLeft=(0,Z.nH)(e)}),this.OTPForm.enable(),this.enableOTPFormButton=!0,this.userValidOTP=e.data.otp,this.isPhoneVarified=!!e.data.is_phone_verified&&e.data.is_phone_verified,this.isPasswordSet=!!e.data.is_password_set&&e.data.is_password_set,this.showOTPForm=!0):(e.error&&e.error[0]?this.formErrors.apierror=`* ${e.error[0]}`:e.message&&(this.formErrors.apierror=`* ${e.message}`),this.OTPForm.disable(),this.enableOTPFormButton=!1)},e=>{this.showLoader=!1,this.submitAttempt=!1,this.formErrors.apierror="*Server Error"})}loginByOTP(){this.submitAttempt=!0;let e=!1;if(this.formErrors.apierror=null,this.OTPForm.valid){this.optLoader=!0;const t={otp:String(this.OTPForm.value.otp_d_1)+String(this.OTPForm.value.otp_d_2)+String(this.OTPForm.value.otp_d_3)+String(this.OTPForm.value.otp_d_4),user_type:3};2==this.otpLoginType?t.email=this.loginForm.value.email:(t.dial_code=this.loginForm.value.dial_code,t.phone_number=this.loginForm.value.phone_number),this.auth.verifyOtp(t).subscribe(t=>{this.optLoader=!1,1==(null==t?void 0:t.status)?this.userAxisest?(this.auth.setAuth(t),this.auth.updateUserData(this.userDetails),e=!0,this.formErrors.apierror=null,this.afterVerifyOtp(e,t)):(this.showOTPForm=!1,this.showLoginForm=!0,this.registerNewUser()):(e=!1,this.optLoader=!1,t.error&&t.error[0]?this.formErrors.apierror=`* ${t.error[0]}`:t.message&&(this.formErrors.apierror=`* ${t.message}`))},e=>{this.showLoader=!1,this.submitAttempt=!1,this.formErrors.apierror="*Server Error"})}else this.formErrors.apierror="*Please Enter OTP"}afterVerifyOtp(e,t){this.OTPForm.valid&&e&&(this.showLoader=!0,this.showOTPForm=!1,this.auth.setAuth(t),this.goToSingup({button_id:null,bookRide:!0}))}goToSingup(e){this.callBackObject.emit(e),this.showLoginForm=!0,this.showLoader=!1,this.showOTPForm=!1,this.OTPForm.reset()}paste(e){let t=e.clipboardData.getData("text");t=t.length>=4?t.slice(0,4):t;for(let i=0;i<t.length;i++)this.OTPForm.controls[`otp_d_${i+1}`].setValue(t[i]),this.OTPForm.controls[`otp_d_${i+1}`].updateValueAndValidity();if(4==t.length){this.loginByOTP();let e=document.getElementById("sign-up-submit");null==e||e.focus()}}patchValue(){fetch("https://ipapi.co/json/").then(e=>e.json()).then(e=>{e&&this.loginForm.patchValue({dial_code:null==e?void 0:e.country_calling_code})}).catch(e=>{console.error("Error fetching IP data:",e)})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e),f.Y36(r.qu),f.Y36(I._W))},e.\u0275cmp=f.Xpm({type:e,selectors:[["app-yelowcab-login"]],viewQuery:function(e,t){if(1&e&&f.Gf(X,5),2&e){let e;f.iGM(e=f.CRH())&&(t.otpOne=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&f.ekj("yc-login-embed",t.isEmbeddedLayout)},inputs:{isOtpVerification:"isOtpVerification",showBackButton:"showBackButton"},outputs:{callBackObject:"callBackObject",backClick:"backClick"},decls:4,vars:4,consts:[[4,"ngIf"],["class","user-confirm-modal-backdrop",4,"ngIf"],[1,"label-design",3,"formGroup","ngSubmit"],[1,"booking-form-body","p-4","m-0"],["class","text-muted mb-4",4,"ngIf"],[1,"form-group","mb-3",2,"height","auto",3,"ngClass"],[1,"form-label","control-label","fs-6"],["style","color: red",4,"ngIf"],[1,"input-group",3,"ngClass"],["appendTo","body","bindLabel","code_name","bindValue","code",1,"ng-select-auto","auto-grow","ng-select-lg",3,"placeholder","notFoundText","formControl","items","change"],["ng-option-tmp",""],["type","text","intO
1nly","",1,"form-control","form-control-lg",2,"padding",".469rem .75rem",3,"formControl","placeholder","input","blur"],["class","text-muted",4,"ngIf"],["class","help-block",3,"innerHTML",4,"ngIf"],[1,"form-group","mb-3",3,"ngClass"],["type","text",1,"form-control","form-control-lg",2,"padding",".469rem .75rem",3,"formControl","placeholder","input","blur"],[2,"color","red"],["type","text",1,"form-control","form-control-lg",2,"padding",".469rem .75rem",3,"ngClass","formControl","input"],["type","text",1,"form-control","form-control-lg",2,"padding",".469rem .75rem",3,"placeholder","formControl","input"],["style","color:crimson",4,"ngIf"],[1,"shadow-none","booking-form-action","border-top","bg-white","yc-login-actions"],["type","button","class","yc-login-btn yc-login-btn--ghost",3,"click",4,"ngIf"],["type","submit",1,"yc-login-btn","yc-login-btn--primary",3,"disabled"],["class","spinner-border spinner-border-sm text-light me-2",4,"ngIf"],[1,"text-muted","mb-4"],[1,"m-0",3,"title"],[1,"text-muted"],[1,"help-block",3,"innerHTML"],[2,"color","crimson"],["type","button",1,"yc-login-btn","yc-login-btn--ghost",3,"click"],[1,"spinner-border","spinner-border-sm","text-light","me-2"],[1,"user-confirm-modal-backdrop"],[1,"user-confirm-modal"],[1,"mb-3"],[1,"text-muted","mb-3"],["class","masked-user-details mb-4",4,"ngIf"],[1,"d-flex","gap-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[1,"masked-user-details","mb-4"],[1,"mb-1"],[1,"mb-0"],[1,"unique-field-options","mb-4"],[1,"unique-field-option","d-flex","align-items-start","gap-2","mb-2"],["type","radio","name","uniqueFieldAction","value","update",3,"ngModel","ngModelOptions","ngModelChange"],[1,"unique-field-option","d-flex","align-items-start","gap-2","mb-0"],["type","radio","name","uniqueFieldAction","value","new",3,"ngModel","ngModelOptions","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[3,"formGroup","ngSubmit"],[1,"booking-form-header","border-bottom","pb-3","px-0","pt-0","mb-3"],[1,"heading","h4","fw-normal","text-dark"],["href","javascript:;",3,"click"],[1,"fa","fa-angle-left"],[1,"form-group","m-0"],[1,"d-flex","otp-box-group","mb-2",2,"gap","10px"],["autofocus","","type","number","onwheel","event.preventDefault();","placeholder","-","maxlength","1","numberOnly","",1,"form-control","form-control-lg","otp-box","mx-2","text-center",3,"formControl","keyup","paste"],["type","number","onwheel","event.preventDefault();","placeholder","-","maxlength","1","numberOnly","",1,"form-control","form-control-lg","otp-box","mx-2","text-center",3,"formControl","keyup"],[1,"text-muted","mb-0",2,"color","#839bb3 !important"],["class","invalid-feedback",4,"ngIf"],["class","signup-link mt-4 text-right",4,"ngIf"],[1,"invalid-feedback"],[1,"signup-link","mt-4","text-right"],[1,"page-link",2,"pointer-events","stroke","color","blue","text-decoration","underline",3,"click"]],template:function(e,t){1&e&&(f.YNc(0,_e,43,69,"ng-container",0),f.YNc(1,ve,12,6,"div",1),f.YNc(2,xe,21,17,"div",1),f.YNc(3,Pe,28,34,"ng-container",0)),2&e&&(f.Q6J("ngIf",t.showLoginForm),f.xp6(1),f.Q6J("ngIf",t.showEmailConfirmModal),f.xp6(1),f.Q6J("ngIf",t.showUniqueFieldModal),f.xp6(1),f.Q6J("ngIf",t.showOTPForm))},directives:[n.O5,r._Y,r.JL,r.sg,n.mk,u.w9,r.JJ,r.oH,u.Z2,r.Fj,K.J,r._,r.On,r.wV,r.nD,W.Y],styles:[".user-confirm-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:1000001;padding:1rem}.user-confirm-modal[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem;width:100%;max-width:420px;box-shadow:0 10px 30px #0003}.masked-user-details[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:6px;padding:1rem}.unique-field-options[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:6px;padding:1rem}.unique-field-option[_ngcontent-%COMP%]{cursor:pointer;margin-bottom:0}.unique-field-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:.2rem;flex-shrink:0}.yc-login-actions[_ngcontent-%COMP%]{z-index:20;background:#fff}.yc-login-actions.yc-login-actions--with-back[_ngcontent-%COMP%]{display:flex;align-items:stretch;grid-gap:10px;gap:10px;padding:14px 16px;box-shadow:0 -8px 18px #15202b0f}.yc-login-embed[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.yc-login-embed[_nghost-%COMP%] form.label-design[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%;width:100%}.yc-login-embed[_nghost-%COMP%] .booking-form-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}.yc-login-embed[_nghost-%COMP%] .yc-login-actions[_ngcontent-%COMP%]{flex:0 0 auto;margin-top:auto;position:relative}.yc-login-btn[_ngcontent-%COMP%]{border:0;border-radius:12px;min-height:48px;height:48px;padding:0 16px;font-size:.95rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase;display:inline-flex;align-items:center;justify-content:center;transition:transform .15s ease,opacity .15s ease,background .15s ease;white-space:nowrap}.yc-login-btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.yc-login-btn--ghost[_ngcontent-%COMP%]{flex:0 0 34%;max-width:140px;background:#fff;color:#15202b;border:1px solid #cfd8e3}.yc-login-btn--ghost[_ngcontent-%COMP%]:hover:not(:disabled){background:#f4f7fa}.yc-login-btn--primary[_ngcontent-%COMP%]{flex:1 1 auto;width:100%;color:#fff;box-shadow:0 8px 18px #15202b29}.yc-login-btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){transform:translateY(-1px)}.yc-login-actions[_ngcontent-%COMP%]:not(.yc-login-actions--with-back) .yc-login-btn--primary[_ngcontent-%COMP%]{width:100%}",".form-control-lg.otp-box[_ngcontent-%COMP%] {\n padding: 10px !important;\n font-size: 1rem;\n }"]}),e})();var qe=i(81820),De=i(70527),Oe=i(39480);let Le=(()=>{class e{transform(e){var t,i;const n=null===(i=null===(t=null==e?void 0:e.pricing)||void 0===t?void 0:t.return_trip_pricing)||void 0===i?void 0:i.final_fare;return n?(Number(n.amount)||0)+(Number(n.tax_amount)||0)-(Number(n.return_trip_discount)||0):0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=f.Yjl({name:"returnTripFareTotal",type:e,pure:!0}),e})();function Me(e,t){1&e&&(f.TgZ(0,"div",82),f._UZ(1,"div",83),f.qZA())}const Ve=function(){return{standalone:!0}};function Se(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",97),f.TgZ(1,"ng-select",98),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw(2).changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(4,Ve))}}function Ee(e,t){if(1&e&&(f.TgZ(0,"ol",84),f.TgZ(1,"li",85),f.TgZ(2,"div",86),f.TgZ(3,"button",87),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",88),f._UZ(6,"div",89),f.qZA(),f.qZA(),f.TgZ(7,"li",90),f.TgZ(8,"div",86),f.TgZ(9,"button",91),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",88),f._UZ(12,"div",92),f.qZA(),f.qZA(),f.TgZ(13,"li",85),f.TgZ(14,"div",86),f.TgZ(15,"button",93),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",94),f._UZ(18,"div",92),f.qZA(),f.qZA(),f.TgZ(19,"li",90),f.TgZ(20,"div",86),f.TgZ(21,"button",91),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",88),f._UZ(24,"div",92),f.qZA(),f.qZA(),f.TgZ(25,"li",90),f.TgZ(26,"div",86),f.TgZ(27,"button",91),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",88),f._UZ(30,"div",92),f.qZA(),f.qZA(),f.TgZ(31,"li",95),f.TgZ(32,"div",86),f.TgZ(33,"button",91),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",88),f._UZ(36,"div",92),f.qZA(),f.qZA(),f.YNc(37,Se,2,5,"li",96),f.qZA()),2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(3),f.Q6J("ngIf",(null==e.languageList?null:e.languageList.length)>1)}}function Ue(e,t){if(1&e&&(f.TgZ(0,"div",99),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}function Ne(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",100),f.TgZ(1,"label",101),f._uU(2),f.qZA(),f.TgZ(3,"ng-select",102),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw();return i.changeBookingType(t),i.onInputChange(i.addForm.controls.booking_type_id)}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(2),f.hij("",null==e.currentLanguage?null:e.currentLanguage.choose_trn_mode," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_booking_type)("items",e.transactionCategory)("clearable",!1)("formControl",e.addForm.controls.booking_type_id)("searchable",!1)}}function Ie(e,t){if(1&e&&f._UZ(0,"span",103),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.pickup_location,f.oJD)}}function je(e,t){if(1&e&&(f.TgZ(0,"span",104),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function Re(e,t){if(1&e&&(f.TgZ(0,"span",113),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}const ze=function(e){return[e]};function Je(e,t){if(1&e){const e=f.EpF();
1f.ynx(0,105),f.TgZ(1,"div",106),f.TgZ(2,"div",107),f.TgZ(3,"app-search-box-google",108),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchCheckpoint(t)})("searchEvent",function(t){const i=f.CHM(e).index;return f.oxw().searchEventCheckpoint(t,i)}),f.qZA(),f._UZ(4,"i",109),f.YNc(5,Re,2,1,"span",110),f.TgZ(6,"a",111),f.NdJ("click",function(){const t=f.CHM(e).index;return f.oxw().removeRow(t)}),f._UZ(7,"i",112),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(3),f.Q6J("placeholder",null==n.currentLanguage?null:n.currentLanguage.search_way_loc)("responseData",n.responseDatacheckPoint)("isBooing",!0)("searchText",e.value.value),f.xp6(2),f.Q6J("ngIf",!n.checkpointValidity[i]&&(null==e.value||null==e.value.value?null:e.value.value.length)),f.xp6(2),f.Q6J("ngClass",f.VKq(7,ze,e.untouched?"text-secondary":e.invalid?"text-danger":"text-secondary"))}}function Be(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div"),f.TgZ(1,"a",114),f.NdJ("click",function(){return f.CHM(e),f.oxw().addNewRow()}),f._UZ(2,"i",115),f._uU(3),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.add_stop," ")}}function Ye(e,t){if(1&e&&f._UZ(0,"span",103),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.destination,f.oJD)}}function Qe(e,t){if(1&e&&(f.TgZ(0,"span",116),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function He(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",117),f.TgZ(2,"h5",118),f._uU(3),f.qZA(),f.TgZ(4,"div",119),f.TgZ(5,"input",120),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeSelectedTab(t.target.checked?2:1)}),f.qZA(),f._UZ(6,"label",121),f.TgZ(7,"label",122),f._uU(8),f.qZA(),f.TgZ(9,"label",123),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.req_time," "),f.xp6(2),f.Q6J("checked",2==e.selectedTab),f.xp6(3),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.now),f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.later)}}const $e=function(e){return{"has-error":e}};function Ge(e,t){if(1&e&&(f.TgZ(0,"div",124),f.TgZ(1,"div",125),f.TgZ(2,"div",126),f.TgZ(3,"span",127),f.O4$(),f.TgZ(4,"svg",128),f._UZ(5,"path",129),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"label",130),f._uU(7),f.qZA(),f._UZ(8,"ng2-flatpickr",131),f.qZA(),f.qZA(),f.TgZ(9,"div",125),f.TgZ(10,"div",132),f.TgZ(11,"span",133),f.O4$(),f.TgZ(12,"svg",134),f._UZ(13,"path",135),f.qZA(),f.qZA(),f.kcU(),f.TgZ(14,"label",130),f._uU(15),f.qZA(),f._UZ(16,"ng2-flatpickr",136),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.date," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.timeFormatConfig2)("ngClass",f.VKq(10,$e,e.formErrors.request_time))("formControl",e.addForm.controls.request_time)("setDate",e.request_time),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(1),f.Q6J("config",e.timeFormatConfig)("formControl",e.addForm.controls.trip_time)("setDate",e.trip_time)}}function Ke(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",142),f.TgZ(1,"input",143),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).changeGender(null==t?null:t.value)}),f.qZA(),f._uU(2),f._UZ(3,"div",144),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(2);f.xp6(1),f.Q6J("value",null==e?null:e.value)("formControl",i.addForm.controls.gender)("checked",i.genderTab==(null==e?null:e.value)),f.xp6(1),f.hij(" ",null==e?null:e.label," ")}}function We(e,t){if(1&e&&(f.TgZ(0,"div",137),f.TgZ(1,"h5",138),f._uU(2),f.qZA(),f.TgZ(3,"div",139),f.TgZ(4,"div",140),f.YNc(5,Ke,4,4,"label",141),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.gender),f.xp6(3),f.Q6J("ngForOf",e.gender)}}function Xe(e,t){if(1&e&&f._UZ(0,"span",103),2&e){const e=f.oxw(3);f.Q6J("innerHTML",e.formErrors.return_time,f.oJD)}}function et(e,t){if(1&e&&(f.TgZ(0,"div",150),f.TgZ(1,"div",125),f.TgZ(2,"div",126),f.TgZ(3,"span",127),f.O4$(),f.TgZ(4,"svg",128),f._UZ(5,"path",129),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"label",130),f._uU(7),f.qZA(),f._UZ(8,"ng2-flatpickr",131),f.qZA(),f.qZA(),f.TgZ(9,"div",125),f.TgZ(10,"div",132),f.TgZ(11,"span",133),f.O4$(),f.TgZ(12,"svg",134),f._UZ(13,"path",135),f.qZA(),f.qZA(),f.kcU(),f.TgZ(14,"label",130),f._uU(15),f.qZA(),f._UZ(16,"ng2-flatpickr",151),f.qZA(),f.qZA(),f.TgZ(17,"div",152),f.YNc(18,Xe,1,1,"span",11),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.Q6J("ngClass",f.VKq(13,$e,e.formErrors.return_time)),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.date," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.returnDateFormatConfig)("ngClass",f.VKq(15,$e,e.formErrors.return_time))("formControl",e.addForm.controls.return_date)("setDate",e.return_date),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(1),f.Q6J("config",e.returnTimeFormatConfig)("formControl",e.addForm.controls.return_trip_time)("setDate",e.return_trip_time)("ngClass",f.VKq(17,$e,e.formErrors.return_time)),f.xp6(2),f.Q6J("ngIf",e.formErrors.return_time)}}function tt(e,t){if(1&e&&(f.TgZ(0,"span",104),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);
1f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function it(e,t){if(1&e&&(f.TgZ(0,"span",104),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function nt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div"),f.TgZ(1,"div",9),f.TgZ(2,"app-search-box-google",10),f.NdJ("search",function(t){return f.CHM(e),f.oxw(2).OnSearchReturn(t)})("searchEvent",function(t){return f.CHM(e),f.oxw(2).returnsearchEvent(t)}),f.qZA(),f.YNc(3,tt,2,1,"span",12),f.qZA(),f.TgZ(4,"div",153),f.TgZ(5,"app-search-box-google",10),f.NdJ("search",function(t){return f.CHM(e),f.oxw(2).OnSearchReturnDestination(t)})("searchEvent",function(t){return f.CHM(e),f.oxw(2).returnsearchEventDestination(t)}),f.qZA(),f.YNc(6,it,2,1,"span",12),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_pick_location)||"Search Return Pickup Location")("isBooing",!0)("responseData",e.responseDataReturn)("searchText",e.returnsearchText)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returnpickupRegionFound),f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_des_loc)||"Search Return Destination Location")("isBooing",!0)("responseData",e.responseDataReturnDestination)("searchText",e.returnsearchTextDestionation)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returndropRegionFound)}}function ot(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",145),f.TgZ(2,"h5",146),f._uU(3),f.TgZ(4,"div",119),f.TgZ(5,"input",147),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeReturn(t)}),f.qZA(),f._UZ(6,"label",148),f.qZA(),f.qZA(),f.qZA(),f.YNc(7,et,19,19,"div",149),f.YNc(8,nt,7,12,"div",15),f.BQk()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.return," "),f.xp6(2),f.Q6J("checked",e.returnEnable),f.xp6(2),f.Q6J("ngIf",e.returnEnable),f.xp6(1),f.Q6J("ngIf",e.returnEnable)}}function at(e,t){if(1&e&&(f.TgZ(0,"div",156),f._UZ(1,"input",157),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("formControl",e.addForm.controls.flight_number)}}function rt(e,t){if(1&e&&(f.TgZ(0,"ng-option",163),f.TgZ(1,"span",164),f.TgZ(2,"div",165),f._UZ(3,"i",166),f.qZA(),f.TgZ(4,"span",167),f._uU(5),f.qZA(),f.qZA(),f.TgZ(6,"span"),f._uU(7),f.ALo(8,"datePipe"),f.ALo(9,"betterDate"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);f.Q6J("value",e),f.xp6(4),f.Q6J("title",null==e?null:e.flight_number),f.xp6(1),f.AsE(" ",null==e?null:e.flight_number," - ",null==e?null:e.airline_name," "),f.xp6(2),f.hij(" ",null!=e&&null!=e.raw&&null!=e.raw.departure&&e.raw.departure.estimated?f.xi3(8,5,f.lcZ(9,8,null==e||null==e.raw||null==e.raw.departure?null:e.raw.departure.estimated),i.formatTimeDate):"","")}}function lt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",158),f.TgZ(1,"div",159),f.TgZ(2,"ng-select",160,161),f.NdJ("keyup.enter",function(t){return f.CHM(e),f.oxw(2).searchPlace(t.target.value)})("change",function(t){return f.CHM(e),f.oxw(2).getFlight(t)})("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedFlightObj=t}),f.YNc(4,rt,10,10,"ng-option",162),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("clearable",!1)("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("ngModel",e.selectedFlightObj)("ngModelOptions",f.DdM(5,Ve)),f.xp6(2),f.Q6J("ngForOf",e.responseFlight)}}function st(e,t){if(1&e&&(f.TgZ(0,"div"),f.TgZ(1,"label",101),f._uU(2),f.qZA(),f.YNc(3,at,2,2,"div",154),f.YNc(4,lt,5,6,"div",155),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.flight_number_title," "),f.xp6(1),f.Q6J("ngIf",!e.checkFligth),f.xp6(1),f.Q6J("ngIf",e.checkFligth)}}function ut(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.AsE("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",null==e?null:e.charge_value,")")}}function dt(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit;f.xp6(1),f.hij("(",null==e?null:e.charge_value,"%)")}}function ct(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",null!=t.currentCompanyDetail&&t.currentCompanyDetail.distance_unit?"Per "+(null==t.currentCompanyDetail?null:t.currentCompanyDetail.distance_unit):"Per Km"," )")}}const ht=function(e){return{"pointer-events":e}};function gt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",174),f.TgZ(1,"div",169),f.TgZ(2,"div",175),f.TgZ(3,"div"),f.TgZ(4,"div",176),f.TgZ(5,"a",177),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("child_seat",t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",178),f.TgZ(8,"a",179),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("child_seat",t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(5),f.Q6J("ngStyle",f.VKq(3,ht,0==e.addForm.controls.child_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.child_seat),f.xp6(1),f.Q6J("ngStyle",f.VKq(5,ht,e.addForm.controls.booster_seat.value<0?"none":"auto"))}}function pt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",174),f.TgZ(1,"div",169),f.TgZ(2,"div",175),f.TgZ(3,"div"),f.TgZ(4,"div",176),f.TgZ(5,"a",177),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("booster_seat",t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",178),f.TgZ(8,"a",179),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("booster_seat",t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(5),f.Q6J("ngStyle",f.VKq(3,ht,0==e.addForm.controls.booster_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.booster_seat),f.xp6(1),f.Q6J("ngStyle",f.VKq(5,ht,e.addForm.controls.booster_seat.value<0?"none":"auto"))}}function mt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",174),f.TgZ(1,"div",169),f.TgZ(2,"div",175),f.TgZ(3,"div"),f.TgZ(4,"div",176),f.TgZ(5,"a",177),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementDynamicCharge(t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",180),f.TgZ(8,"a",181),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementDynamicCharge(t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2).$implicit;f.xp6(5),f.Q6J("ngStyle",f.VKq(2,ht,((null==e?null:e.currentValue)||0)<=1?"none":"auto")),f.xp6(2),f.Q6J("value",(null==e?null:e.currentValue)||0)}}function _t(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"label",172),f.TgZ(2,"input",173),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().$implicit;return f.oxw(2).checkOtherCharge(t,i)}),f.qZA(),f._uU(3),f.YNc(4,ut,2,2,"ng-container",15),f.YNc(5,dt,2,1,"ng-container",15),f.YNc(6,ct,2,3,"ng-container",15),f._UZ(7,"div",144),f.qZA(),f.YNc(8,gt,10,7,"div",39),f.YNc(9,pt,10,7,"div",39),f.YNc(10,mt,10,4,"div",39),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(2),f.MGl("id","customcheckbox-",null==e?null:e.other_charges_id,""),f.s9C("value",null==e?null:e.checked),f.Q6J("checked",null==e?null:e.checked)("disabled",!(null==e||!e.is_required)),f.xp6(1),f.hij(" ",null==e?null:e.title," "),f.xp6(1),f.Q6J("ngIf",2==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",3==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",t.displayChidSheet&&"child_seat"==(null==e?null:e.charges_key)&&
1(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.displayBoosterSheet&&"booster_seat"==(null==e?null:e.charges_key)&&(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.isDynamicCalculationCharge(e)&&(null==e?null:e.checked))}}function ft(e,t){if(1&e&&(f.ynx(0),f.YNc(1,_t,11,11,"ng-container",15),f.BQk()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",!(null!=e&&e.is_required))}}function vt(e,t){if(1&e&&(f.TgZ(0,"div",168),f.TgZ(1,"div",169),f.TgZ(2,"label",170),f._uU(3),f.qZA(),f.YNc(4,ft,2,1,"ng-container",171),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.other_charges," "),f.xp6(1),f.Q6J("ngForOf",e.otherChargesArray)}}function yt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ol",182),f.TgZ(1,"li",183),f.TgZ(2,"div",86),f.TgZ(3,"button",184),f.NdJ("click",function(){return f.CHM(e),f.oxw().displayFirstScreen(!0)}),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",88),f._UZ(6,"div",89),f.qZA(),f.qZA(),f.TgZ(7,"li",85),f.TgZ(8,"div",86),f.TgZ(9,"button",185),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",88),f._UZ(12,"div",89),f.qZA(),f.qZA(),f.TgZ(13,"li",85),f.TgZ(14,"div",86),f.TgZ(15,"button",93),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",94),f._UZ(18,"div",92),f.qZA(),f.qZA(),f.TgZ(19,"li",90),f.TgZ(20,"div",86),f.TgZ(21,"button",91),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",88),f._UZ(24,"div",92),f.qZA(),f.qZA(),f.TgZ(25,"li",90),f.TgZ(26,"div",86),f.TgZ(27,"button",91),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",88),f._UZ(30,"div",92),f.qZA(),f.qZA(),f.TgZ(31,"li",95),f.TgZ(32,"div",86),f.TgZ(33,"button",91),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",88),f._UZ(36,"div",92),f.qZA(),f.qZA(),f.TgZ(37,"li",97),f.TgZ(38,"ng-select",98),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(4),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(10,Ve))}}function bt(e,t){if(1&e&&(f.TgZ(0,"div",186),f.TgZ(1,"h4",187),f._uU(2),f.ALo(3,"datePipe"),f.ALo(4,"betterDate"),f.ALo(5,"datePipe"),f.ALo(6,"betterDate"),f.qZA(),f.TgZ(7,"p",188),f._uU(8),f.qZA(),f.TgZ(9,"ul",189),f.TgZ(10,"h5",190),f._uU(11),f.qZA(),f.TgZ(12,"li",191),f.TgZ(13,"label",192),f._uU(14),f.qZA(),f.TgZ(15,"span",193),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"li",191),f.TgZ(18,"label",192),f._uU(19),f.qZA(),f.TgZ(20,"span",193),f._uU(21),f.ALo(22,"date"),f.qZA(),f.qZA(),f.TgZ(23,"li",191),f.TgZ(24,"label",192),f._uU(25),f.qZA(),f.TgZ(26,"span",193),f._uU(27),f.qZA(),f.qZA(),f.TgZ(28,"li",191),f.TgZ(29,"label",192),f._uU(30),f.qZA(),f.TgZ(31,"span",193),f._uU(32),f.qZA(),f.qZA(),f.TgZ(33,"h5",190),f._uU(34),f.qZA(),f.TgZ(35,"li",191),f.TgZ(36,"label",192),f._uU(37),f.qZA(),f.TgZ(38,"span",193),f._uU(39),f.qZA(),f.qZA(),f.TgZ(40,"li",191),f.TgZ(41,"label",192),f._uU(42),f.qZA(),f.TgZ(43,"span",193),f._uU(44),f.ALo(45,"date"),f.qZA(),f.qZA(),f.TgZ(46,"li",191),f.TgZ(47,"label",192),f._uU(48),f.qZA(),f.TgZ(49,"span",193),f._uU(50),f.qZA(),f.qZA(),f.TgZ(51,"li",191),f.TgZ(52,"label",192),f._uU(53),f.qZA(),f.TgZ(54,"span",193),f._uU(55),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.AsE("",e.request_time?f.xi3(3,21,f.lcZ(4,24,e.request_time),"d/M/yyyy"):"-"," ",e.trip_time?f.xi3(5,26,f.lcZ(6,29,e.trip_time),"hh:mm a"):""," "),f.xp6(6),f.hij("",null==e.selectedFlightObj||null==e.selectedFlightObj.airline?null:e.selectedFlightObj.airline.name," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.departure," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.actual?f.xi3(22,31,null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.gate:"-"," "),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.arrival," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.actual?f.xi3(45,34,null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.gate:"-"," ")}}function xt(e,t){1&e&&f._UZ(0,"span",198)}
1function kt(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",3),f._UZ(2,"input",199),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(2,$e,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.enter_value)}}function Zt(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",197),f.TgZ(2,"div",200),f.TgZ(3,"ng2-flatpickr",201),f.NdJ("onChange",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw().onDateChange(t,i)}),f.qZA(),f.TgZ(4,"span",202),f._UZ(5,"i",203),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(2),f.Q6J("ngClass",f.VKq(2,$e,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("config",t.dateFormatConfig)}}function Ct(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",3),f._UZ(2,"ng-select",204),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(4,$e,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("items",e.value.options)("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("multiple",!0)}}function Ft(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",3),f._UZ(2,"ng-select",205),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(3,$e,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("items",e.value.options)}}function Tt(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",175),f.TgZ(2,"div",206),f.TgZ(3,"a",207),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw().decrement(t)}),f._uU(4,"-"),f.qZA(),f._UZ(5,"input",208),f.TgZ(6,"a",181),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw().increment(t)}),f._uU(7,"+"),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(2),f.Q6J("ngClass",f.VKq(1,$e,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid)))}}function At(e,t){1&e&&f._UZ(0,"i",221)}function Pt(e,t){1&e&&f._UZ(0,"i",222)}function wt(e,t){1&e&&(f.TgZ(0,"span"),f._uU(1,"Upload"),f.qZA())}function qt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",223),f.NdJ("click",function(){f.CHM(e),f.oxw();const t=f.MAs(11),i=f.oxw().index;return f.oxw().removeDocumentFile(i,t)}),f._UZ(1,"i",224),f.qZA()}}function Dt(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",209),f.TgZ(2,"div",210),f.TgZ(3,"div",211),f.YNc(4,At,1,0,"i",212),f.TgZ(5,"span",213),f._uU(6),f.qZA(),f.qZA(),f.TgZ(7,"label",214),f.YNc(8,Pt,1,0,"i",33),f.YNc(9,wt,2,0,"span",15),f.TgZ(10,"input",215,216),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw().documentFileChangeEvent(t,i)}),f.qZA(),f.qZA(),f.YNc(12,qt,2,0,"button",217),f.qZA(),f._UZ(13,"input",218),f._UZ(14,"input",219),f.TgZ(15,"p",220),f._uU(16,"* Max file size should be 21 MB"),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw(),t=e.$implicit,i=e.index,n=f.oxw();let o;f.xp6(1),f.Q6J("ngClass",f.VKq(14,$e,n.formSubmited&&t.value.is_mandatory&&(null==(o=t.get("value"))?null:o.invalid))),f.xp6(2),f.ekj("has-file",!!n.documentFileNames[i]),f.xp6(1),f.Q6J("ngIf",n.documentFileNames[i]),f.xp6(2),f.hij(" ",n.documentFileNames[i]||"No file chosen"," "),f.xp6(1),f.ekj("is-loading",n.documentUploadLoading[i])("is-disabled",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",!n.documentUploadLoading[i]),f.xp6(1),f.Q6J("id","documentUpload_wh_"+i)("disabled",n.documentUploadLoading[i]),f.xp6(2),f.Q6J("ngIf",n.documentFileNames[i]&&!n.documentUploadLoading[i])}}function Ot(e,t){if(1&e&&(f.ynx(0,105),f.TgZ(1,"div",194),f.TgZ(2,"label",195),f._uU(3),f.qZA(),f.YNc(4,xt,1,0,"span",196),f.TgZ(5,"div",197),f.YNc(6,kt,3,4,"ng-container",15),f.YNc(7,Zt,6,4,"ng-container",15),f.YNc(8,Ct,3,6,"ng-container",15),f.YNc(9,Ft,3,5,"ng-container",15),f.YNc(10,Tt,8,3,"ng-container",15),f.YNc(11,Dt,17,16,"ng-container",15),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(3),f.Oqu(e.value.label),f.xp6(1),f.Q6J("ngIf",e.value.is_mandatory),f.xp6(2),f.Q6J("ngIf",e.value.field_type==n.TEXT_BOX_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DATE_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.MULTI_SELECT_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DROPDOWN_FIELD),f.xp6(1),f.Q6J("ngIf",5==e.value.field_type),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DOCUMENT_FIELD)}}function Lt(e,t){1&e&&f._UZ(0,"i",222)}function Mt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ol",225),f.TgZ(1,"li",183),f.TgZ(2,"div",86),f.TgZ(3,"button",184),f.NdJ("click",function(){return f.CHM(e),f.oxw().displayFirstScreen()}),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",88),f._UZ(6,"div",89),f.qZA(),f.qZA(),f.TgZ(7,"li",183),f.TgZ(8,"div",86),f.TgZ(9,"button",226),f.NdJ("click",function(){return f.CHM(e),f.oxw().displaySecondScreen()}),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",88),f._UZ(12,"div",89),f.qZA(),f.qZA(),f.TgZ(13,"li",85),f.TgZ(14,"div",86),f.TgZ(15,"button",87),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",94),f._UZ(18,"div",89),f.qZA(),f.qZA(),f.TgZ(19,"li",90),f.TgZ(20,"div",86),f.TgZ(21,"button",91),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",88),f._UZ(24,"div",92),f.qZA(),f.qZA(),f.TgZ(25,"li",90),f.TgZ(26,"div",86),f.TgZ(27,"button",91),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",88),f._UZ(30,"div",92),f.qZA(),f.qZA(),f.TgZ(31,"li",95),f.TgZ(32,"div",86),f.TgZ(33,"button",91),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",88),f._UZ(36,"div",92),f.qZA(),f.qZA(),f.TgZ(37,"li",97),f.TgZ(38,"ng-select",98),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(5),f.Q6J("disabled",0==e.addForm.controls.properties.controls.length),f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(4),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(11,Ve))}}function Vt(e,t){1&e&&(f.TgZ(0,"div",82),f._UZ(1,"div",83),f.qZA())}function St(e,t){if(1&e&&(f.TgZ(0,"span",259),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.from,"")}}function Et(e,t){if(1&e&&(f.TgZ(0,"span",260),f._uU(1),f.ALo(2,"roundFraction"),f.ALo(3,"bookingTotalFare"),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(2,2,f.xi3(3,5,e,t.returnEnable),t.roundFormate),"")}}function Ut(e,t){if(1&e&&(f.TgZ(0,"span",260),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.meter,"")}}function Nt(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",261),f.TgZ(1,"div",262),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().$implicit;return f.oxw().toggleCollapse(t)}),f._UZ(2,"i",263),f.qZA(),f.qZA()}if(2&e){const e=f.oxw().$implicit;f.xp6(2),f.Q6J("ngClass",e.isCollapsed?"fa fa-angle-down":"fa fa-angle-up")}}function It(e,t){if(1&e&&(f.TgZ(0,"td",248),f._uU(1),f.TgZ(2,"span",249),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function jt(e,t){if(1&e&&(f.TgZ(0,"td",248),f._uU(1),f.TgZ(2,"span",249),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.zone_price,": "),f.xp6(2),f.hij(" ",null!=e&&e.zone_price?null==e?null:e.zone_price:"","")}}function Rt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.minimum_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate):"0","")}}function zt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.base_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.base_fare,t.roundFormate):"0","")}}function Jt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate),"")}}function Bt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate),"")}}function Yt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate),"")}}function Qt(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Rt,6,6,"div",256),f.YNc(2,zt,6,6,"div",256),f.YNc(3,Jt,6,6,"div",256),f.YNc(4,Bt,6,6,"div",256),f.YNc(5,Yt,6,6,"div",256),f.BQk()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.surge_fare)}}function Ht(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",264),f.TgZ(2,"span",254),f._uU(3),f.qZA(),f.TgZ(4,"span",31),f._uU(5),f.ALo(6,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(7,"div",264),f.TgZ(8,"span",254),f._uU(9),f.qZA(),f.TgZ(10,"span",31),f._uU(11),f.ALo(12,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(13,"div",264),f.TgZ(14,"span",254),f._uU(15),f.qZA(),f.TgZ(16,"span",31),f._uU(17),f.ALo(18,"roundFraction"),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw(2).$implicit,n=f.oxw();f.xp6(3),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.min_hours?null==n.currentLanguage?null:n.currentLanguage.min_hours:"Minimum Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",e.minHours?f.xi3(6,9,e.minHours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.no_of_hours?null==n.currentLanguage?null:n.currentLanguage.no_of_hours:"No. of Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",null!=i&&i.pricing.selected_hours?f.xi3(12,12,null==i?null:i.pricing.selected_hours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.hourly_rate?null==n.currentLanguage?null:n.currentLanguage.hourly_rate:"Hourly Rate",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(18,15,e.hourlyRate,n.roundFormate),"")}}function $t(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Ht,19,18,"ng-container",15),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.Q6J("ngIf",t.hourlyPackageCardDisplay(e))}}function Gt(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.out_of_service_area_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.out_of_service_area_charges,t.roundFormate),"")}}function Kt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.zone_extra_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges,t.roundFormate),"")}}function Wt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_passenger_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraPasse
1ngerCharge,e.roundFormate)," ")}}function Xt(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_luggage_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraLuggageCharge,e.roundFormate),"")}}function ei(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.previous_dues),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.walletBalance,e.roundFormate),"")}}function ti(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e?null:e.final_fare.tax_amount,t.roundFormate),"")}}function ii(e,t){if(1&e&&(f.TgZ(0,"div",265),f.TgZ(1,"span",31),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",266),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",31),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(2);f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function ni(e,t){if(1&e&&(f.TgZ(0,"div",267),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.other_charges,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.otherChargePrice,e.roundFormate),"")}}function oi(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,2,null==e?null:e.charges,t.roundFormate),"")}}function ai(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,3,null==e?null:e.charges,t.roundFormate)," (",(null==e?null:e.charge_value)+"%",")")}}function ri(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq(" (",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",t.distance_unit?(null==t.currentLanguage?null:t.currentLanguage.per)+" "+t.distance_unit:null==t.currentLanguage?null:t.currentLanguage.per_km,")")}}function li(e,t){if(1&e&&(f.TgZ(0,"div",269),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f.YNc(4,oi,3,5,"ng-container",15),f.YNc(5,ai,3,6,"ng-container",15),f._UZ(6,"div",144),f.YNc(7,ri,2,3,"ng-container",15),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(2),f.Oqu(t.getOtherChargeBreakdownLabel(e)),f.xp6(2),f.Q6J("ngIf",2==(null==e?null:e.charge_type)||3==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",3==(null==e?null:e.charge_type))}}function si(e,t){if(1&e&&(f.TgZ(0,"div"),f.YNc(1,li,8,4,"div",268),f.qZA()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",e&&(e.checked||e.is_required))}}function ui(e,t){if(1&e&&(f.TgZ(0,"td",248),f._uU(1),f.TgZ(2,"span",249),f._uU(3),f.ALo(4,"number"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(4,3,2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_distance:t.returnotherDetails.ride_distance,"1.1-1")," ",t.distance_unit," ")}}function di(e,t){if(1&e&&(f.TgZ(0,"td",248),f._uU(1),f.TgZ(2,"span",249),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_time:t.returnotherDetails.ride_time," ",null==t.currentLanguage?null:t.currentLanguage.min," ")}}function ci(e,t){if(1&e&&(f.TgZ(0,"td",248),f._uU(1),f.TgZ(2,"span",249),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(2);f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function hi(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate)," ")}}function gi(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.base_fare,t.roundFormate)," ")}}function pi(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate)," ")}}function mi(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate)," ")}}function _i(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function fi(e,t){if(1&e&&(f.ynx(0),f.YNc(1,hi,6,6,"div",256),f.YNc(2,gi,6,6,"div",256),f.YNc(3,pi,6,6,"div",256),f.YNc(4,mi,6,6,"div",256),f.YNc(5,_i,6,6,"div",256),f.BQk()),2&e){const e=f.oxw().ngIf;f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare)}}function vi(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.tax_amount,t.roundFormate)," ")}}function yi(e,t){if(1&e&&(f.TgZ(0,"div",265),f.TgZ(1,"span",31),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",266),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",31),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);
1f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function bi(e,t){if(1&e&&(f.TgZ(0,"div",264),f.TgZ(1,"span",254),f._uU(2),f.qZA(),f.TgZ(3,"span",31),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(2);f.xp6(2),f.hij("- ",(null==t.currentLanguage?null:t.currentLanguage.return_trip_discount)||"Return Trip Discount",""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.return_trip_discount,t.roundFormate)," ")}}const xi=function(){return["hourly","package"]};function ki(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",270),f.TgZ(2,"div",251),f.TgZ(3,"span",252),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"table",247),f.TgZ(6,"thead"),f.TgZ(7,"tr"),f.YNc(8,ui,5,6,"td",250),f.YNc(9,di,4,3,"td",250),f.qZA(),f.TgZ(10,"tr"),f.YNc(11,ci,5,5,"td",250),f.qZA(),f.qZA(),f.qZA(),f.TgZ(12,"div",251),f.TgZ(13,"span"),f._uU(14),f.qZA(),f.qZA(),f.TgZ(15,"div",251),f.TgZ(16,"span",252),f._uU(17),f.qZA(),f.TgZ(18,"span",252),f._uU(19),f.qZA(),f.qZA(),f.YNc(20,fi,6,5,"ng-container",15),f.TgZ(21,"div",253),f.TgZ(22,"span",254),f._uU(23),f.qZA(),f.TgZ(24,"span",31),f._uU(25),f.ALo(26,"roundFraction"),f.qZA(),f.qZA(),f.YNc(27,vi,6,6,"div",256),f.YNc(28,yi,9,6,"div",257),f.YNc(29,bi,6,6,"div",256),f.TgZ(30,"div",253),f.TgZ(31,"span",254),f._uU(32),f.qZA(),f.TgZ(33,"span",31),f._uU(34),f.ALo(35,"roundFraction"),f.ALo(36,"returnTripFareTotal"),f.qZA(),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw().$implicit,n=f.oxw();f.xp6(4),f.AsE(" ",(null==n.currentLanguage?null:n.currentLanguage.return)||"Return"," ",(null==n.currentLanguage?null:n.currentLanguage.trip)||"Trip"," "),f.xp6(4),f.Q6J("ngIf",n.returnotherDetails),f.xp6(1),f.Q6J("ngIf",n.returnotherDetails),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(3),f.hij("Note: ",null==n.currentLanguage?null:n.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.price_breakdown," "),f.xp6(2),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.rate," "),f.xp6(1),f.Q6J("ngIf",!f.DdM(26,xi).includes(n.bookingTypeKey)),f.xp6(3),f.hij("+ ",null==n.currentLanguage?null:n.currentLanguage.trip_fare,""),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(26,18,null==e.final_fare?null:e.final_fare.amount,n.roundFormate)," "),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.return_trip_discount),f.xp6(3),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.final_fare),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(35,21,f.lcZ(36,24,i),n.roundFormate)," ")}}const Zi=function(e){return{"list-focus":e}},Ci=function(e,t){return{collapse:e,show:t}},Fi=function(){return["hourly"]};function Ti(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ul",227),f.TgZ(1,"li",228),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw().changeVehicle(t)}),f.TgZ(2,"div",229),f.TgZ(3,"div"),f._UZ(4,"img",230),f.qZA(),f.TgZ(5,"div",231),f.TgZ(6,"p",232),f._uU(7),f.qZA(),f.TgZ(8,"p",233),f._uU(9),f.qZA(),f.TgZ(10,"div",117),f.TgZ(11,"p",234),f.O4$(),f.TgZ(12,"svg",235),f._UZ(13,"path",236),f.qZA(),f.kcU(),f.TgZ(14,"span",237),f.TgZ(15,"span"),f._uU(16),f.qZA(),f._uU(17," - "),f.TgZ(18,"span"),f._uU(19),f.qZA(),f.qZA(),f.qZA(),f.TgZ(20,"p",238),f.O4$(),f.TgZ(21,"svg",239),f._UZ(22,"path",240),f.qZA(),f.kcU(),f.TgZ(23,"span",237),f.TgZ(24,"span"),f._uU(25),f.qZA(),f._uU(26," - "),f.TgZ(27,"span"),f._uU(28),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(29,"div",241),f.TgZ(30,"span",242),f.YNc(31,St,2,1,"span",243),f.YNc(32,Et,4,8,"span",244),f.YNc(33,Ut,2,1,"span",244),f.qZA(),f.YNc(34,Nt,3,1,"div",245),f.qZA(),f.qZA(),f.TgZ(35,"div",246),f.TgZ(36,"table",247),f.TgZ(37,"thead"),f.TgZ(38,"tr"),f.TgZ(39,"td",248),f._uU(40),f.TgZ(41,"span",249),f._uU(42),f.ALo(43,"number"),f.qZA(),f.qZA(),f.TgZ(44,"td",248),f._uU(45),f.TgZ(46,"span",249),f._uU(47),f.qZA(),f.qZA(),f.qZA(),f.TgZ(48,"tr"),f.YNc(49,It,5,5,"td",250),f.YNc(50,jt,4,2,"td",250),f.qZA(),f.qZA(),f.qZA(),f.TgZ(51,"div",251),f.TgZ(52,"span"),f._uU(53),f.qZA(),f.qZA(),f.TgZ(54,"div",251),f.TgZ(55,"span",252),f._uU(56),f.qZA(),f.TgZ(57,"span",252),f._uU(58),f.qZA(),f.qZA(),f.YNc(59,Qt,6,5,"ng-container",15),f.YNc(60,$t,2,1,"ng-container",15),f.TgZ(61,"div",253),f.TgZ(62,"span",254),f._uU(63),f.qZA(),f.TgZ(64,"span",31),f._uU(65),f.ALo(66,"roundFraction"),f.qZA(),f.qZA(),f.YNc(67,Gt,6,6,"div",255),f.YNc(68,Kt,6,6,"div",256),f.YNc(69,Wt,6,6,"div",256),f.YNc(70,Xt,6,6,"div",256),f.YNc(71,ei,6,6,"div",256),f.YNc(72,ti,6,6,"div",256),f.YNc(73,ii,9,6,"div",257),f.YNc(74,ni,6,6,"div",258),f.YNc(75,si,2,1,"div",171),f.TgZ(76,"div",253),f.TgZ(77,"span",254),f._uU(78),f.qZA(),f.TgZ(79,"span",31),f._uU(80),f.ALo(81,"roundFraction"),f.qZA(),f.qZA(),f.YNc(82,ki,37,27,"ng-container",15),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(51,Zi,e.checked)),f.xp6(3),f.Q6J("src",null!=e&&e.vehicle_image?null==e?null:e.vehicle_image:"assets/img/car_image.png",f.LSH),f.xp6(3),f.hij(" ",e.title,""),f.xp6(2),f.Oqu((null==e?null:e.description)||""),f.xp6(7),f.Oqu(e.capacity),f.xp6(3),f.Oqu(e.max_capacity),f.xp6(6),f.Oqu(e.vehicle_luggage_c
1apacity),f.xp6(3),f.Oqu(e.max_luggage_capacity),f.xp6(3),f.Q6J("ngIf","Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2==(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2===(null==e.pricing?null:e.pricing.calculation_type)),f.xp6(1),f.Q6J("ngIf",3!==(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",3===(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",("Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2!=(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2!=(null==e||null==e.pricing?null:e.pricing.calculation_type))&&"Y"==i.fareAccebility),f.xp6(1),f.Q6J("ngClass",f.WLB(53,Ci,!e.isCollapsed,e.isCollapsed)),f.xp6(5),f.hij(" ",null==i.currentLanguage?null:i.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(43,42,2==(null==e?null:e.vehicle_type_category)?i.otherDetails.bike_ride_distance:i.otherDetails.ride_distance,"1.1-1")," ",i.distance_unit,""),f.xp6(3),f.hij(" ",null==i.currentLanguage?null:i.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?i.otherDetails.bike_ride_time:i.otherDetails.ride_time," ",null==i.currentLanguage?null:i.currentLanguage.min,""),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(1),f.Q6J("ngIf",null==e?null:e.zone_price),f.xp6(3),f.hij("Note: ",null==i.currentLanguage?null:i.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.Oqu(null==i.currentLanguage?null:i.currentLanguage.price_breakdown),f.xp6(2),f.Oqu(null==i.currentLanguage?null:i.currentLanguage.rate),f.xp6(1),f.Q6J("ngIf",!f.DdM(56,xi).includes(i.bookingTypeKey)),f.xp6(1),f.Q6J("ngIf",f.DdM(57,Fi).includes(i.bookingTypeKey)),f.xp6(3),f.hij("+ ",null==i.currentLanguage?null:i.currentLanguage.trip_fare,""),f.xp6(2),f.AsE("",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",f.xi3(66,45,null==e||null==e.final_fare?null:e.final_fare.amount,i.roundFormate),""),f.xp6(2),f.Q6J("ngIf",null==e?null:e.final_fare.out_of_service_area_charges),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges),f.xp6(1),f.Q6J("ngIf",i.totalExtraPassengerCharge),f.xp6(1),f.Q6J("ngIf",i.totalExtraLuggageCharge),f.xp6(1),f.Q6J("ngIf",i.walletBalance<0),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",i.otherChargePrice),f.xp6(1),f.Q6J("ngForOf",i.otherChargesArray),f.xp6(3),f.Oqu(null==i.currentLanguage?null:i.currentLanguage.final_fare),f.xp6(2),f.AsE("",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",f.xi3(81,48,i.finalFare,i.roundFormate),""),f.xp6(2),f.Q6J("ngIf",i.returnEnable&&(null==e||null==e.pricing?null:e.pricing.return_trip_pricing))}}function Ai(e,t){if(1&e&&(f.TgZ(0,"ng-option",163),f._uU(1),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(2);f.Q6J("value",null==e?null:e.id),f.xp6(1),f.xDo(" ",0==(null==e?null:e.slot_distance)?(null==i.currentLanguage?null:i.currentLanguage.unlimited)||"Unlimited":null==e?null:e.slot_distance," ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.distance_unit," | ",null==e?null:e.slot_hours," h | ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",null==e?null:e.slot_amount," ")}}function Pi(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",174),f.TgZ(1,"div",271),f.TgZ(2,"ng-select",272),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changePackages(),t.onInputChange(t.addForm.controls.packages)}),f.YNc(3,Ai,2,6,"ng-option",162),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(3,$e,e.formErrors.packages)),f.xp6(1),f.Q6J("formControl",e.addForm.controls.packages),f.xp6(1),f.Q6J("ngForOf",e.rentalPackages)}}function wi(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",174),f.TgZ(1,"div",271),f.TgZ(2,"ng-select",273),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changeHours(),t.onInputChange(t.addForm.controls.hour)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(4,$e,e.formErrors.hour)),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_hour)("items",e.hoursArray)("formControl",e.addForm.controls.hour)}}function qi(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",274),f.TgZ(1,"div",159),f.TgZ(2,"span",202),f._UZ(3,"i",275),f.qZA(),f.TgZ(4,"ng-select",276),f.NdJ("change",function(t){return f.CHM(e),f.oxw().onFilterChange(t,0)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Q6J("items",e.numberFilter)("formControl",e.addForm.controls.no_of_passenger)}}function Di(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",274),f.TgZ(1,"div",159),f.TgZ(2,"span",202),f._UZ(3,"i",277),f.qZA(),f.TgZ(4,"ng-select",276),f.NdJ("change",function(t){return f.CHM(e),f.oxw().onFilterChange(t,1)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Q6J("items",e.luggageArray)("formControl",e.addForm.controls.trip_luggage)}}function Oi(e,t){if(1&e&&f._uU(0),2&e){const e=t.item;f.hij(" ",null==e?null:e.charges_key," ")}}function Li(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",271),f.TgZ(1,"ng-select",278),f.NdJ("change",function(t){return f.CHM(e),f.oxw().setPaymentMode(t)}),f.YNc(2,Oi,1,1,"ng-template",279),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(6,$e,e.formErrors.paymentMode)),f.xp6(1),f.Q6J("items",e.paymentMode)("searchable",!1)("clearable",!1)("notFoundText",null==e.currentLanguage?null:e.currentLanguage.no_data_found)("formControl",e.addForm.controls.payment_mode_id
1)}}function Mi(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ol",280),f.TgZ(1,"li",183),f.TgZ(2,"div",86),f.TgZ(3,"button",184),f.NdJ("click",function(){return f.CHM(e),f.oxw().displayFirstScreen()}),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",88),f._UZ(6,"div",89),f.qZA(),f.qZA(),f.TgZ(7,"li",183),f.TgZ(8,"div",86),f.TgZ(9,"button",226),f.NdJ("click",function(){return f.CHM(e),f.oxw().displaySecondScreen()}),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",88),f._UZ(12,"div",89),f.qZA(),f.qZA(),f.TgZ(13,"li",183),f.TgZ(14,"div",86),f.TgZ(15,"button",184),f.NdJ("click",function(){return f.CHM(e),f.oxw().displayThirdScreen()}),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",94),f._UZ(18,"div",89),f.qZA(),f.qZA(),f.TgZ(19,"li",85),f.TgZ(20,"div",86),f.TgZ(21,"button",185),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",88),f._UZ(24,"div",89),f.qZA(),f.qZA(),f.TgZ(25,"li",90),f.TgZ(26,"div",86),f.TgZ(27,"button",91),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",88),f._UZ(30,"div",92),f.qZA(),f.qZA(),f.TgZ(31,"li",95),f.TgZ(32,"div",86),f.TgZ(33,"button",91),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",88),f._UZ(36,"div",92),f.qZA(),f.qZA(),f.TgZ(37,"li",97),f.TgZ(38,"ng-select",98),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(5),f.Q6J("disabled",0==e.addForm.controls.properties.controls.length),f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(4),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(11,Ve))}}function Vi(e,t){1&e&&(f.TgZ(0,"div",82),f._UZ(1,"div",83),f.qZA())}function Si(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ol",281),f.TgZ(1,"li",183),f.TgZ(2,"div",86),f.TgZ(3,"button",184),f.NdJ("click",function(){return f.CHM(e),f.oxw().displayFirstScreen()}),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",88),f._UZ(6,"div",89),f.qZA(),f.qZA(),f.TgZ(7,"li",183),f.TgZ(8,"div",86),f.TgZ(9,"button",226),f.NdJ("click",function(){return f.CHM(e),f.oxw().displaySecondScreen()}),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",88),f._UZ(12,"div",89),f.qZA(),f.qZA(),f.TgZ(13,"li",183),f.TgZ(14,"div",86),f.TgZ(15,"button",184),f.NdJ("click",function(){return f.CHM(e),f.oxw().displayThirdScreen()}),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",94),f._UZ(18,"div",89),f.qZA(),f.qZA(),f.TgZ(19,"li",183),f.TgZ(20,"div",86),f.TgZ(21,"button",185),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",88),f._UZ(24,"div",89),f.qZA(),f.qZA(),f.TgZ(25,"li",85),f.TgZ(26,"div",86),f.TgZ(27,"button",185),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",88),f._UZ(30,"div",89),f.qZA(),f.qZA(),f.TgZ(31,"li",95),f.TgZ(32,"div",86),f.TgZ(33,"button",91),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",88),f._UZ(36,"div",92),f.qZA(),f.qZA(),f.TgZ(37,"li",97),f.TgZ(38,"ng-select",98),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(5),f.Q6J("disabled",0==e.addForm.controls.properties.controls.length),f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(4),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(11,Ve))}}function Ei(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"app-payment-gatway-list",282),f.NdJ("paymentSucsessBook",function(t){return f.CHM(e),f.oxw().afterPaymentSucsess(t)})("closePaymentMethod",function(t){return f.CHM(e),f.oxw().openPaymentGateway(t)})("requestBooking",function(){return f.CHM(e),f.oxw().onStripeRequestBooking()}),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("pre_payment",e.pre_payment)("pre_payment_value",e.pre_payment_value)("tripPayload",e.tripPayload)("FinalFare",e.returnEnable?e.totalFInalFare:e.finalFare)("hideStyle",!0)("is_yelowCab",!0)("trip_id",e.tripId)("trip_num",e.trip_number)}}function Ui(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ol",281),f.TgZ(1,"li",183),f.TgZ(2,"div",86),f.TgZ(3,"button",87),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",88),f._UZ(6,"div",89),f.qZA(),f.qZA(),f.TgZ(7,"li",183),f.TgZ(8,"div",86),f.TgZ(9,"button",87),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",88),f._UZ(12,"div",89),f.qZA(),f.qZA(),f.TgZ(13,"li",183),f.TgZ(14,"div",86),f.TgZ(15,"button",87),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",94),f._UZ(18,"div",89),f.qZA(),f.qZA(),f.TgZ(19,"li",183),f.TgZ(20,"div",86),f.TgZ(21,"button",185),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",88),f._UZ(24,"div",89),f.qZA(),f.qZA(),f.TgZ(25,"li",183),f.TgZ(26,"div",86),f.TgZ(27,"button",185),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",88),f._UZ(30,"div",89),f.qZA(),f.qZA(),f.TgZ(31,"li",283),f.TgZ(32,"div",86),f.TgZ(33,"button",185),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",88),f._UZ(36,"div",89),f.qZA(),f.qZA(),f.TgZ(37,"li",97),f.TgZ(38,"ng-select",98),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(4),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(10,Ve))}}function Ni(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",289),f.TgZ(1,"input",290),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(3).changeQueuePickup(t)}),f.qZA(),f.TgZ(2,"div",291),f.TgZ(3,"div",292),f.TgZ(4,"div",293),f.TgZ(5,"h4",294),f._uU(6),f.qZA(),f.TgZ(7,"div",295),f.TgZ(8,"div",296
1),f.TgZ(9,"span",260),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.title),f.xp6(4),f.Oqu(e.address)}}function Ii(e,t){if(1&e&&(f.TgZ(0,"div",287),f.YNc(1,Ni,11,4,"label",288),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("ngForOf",e.queuePikupStandList)}}function ji(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",284),f.TgZ(1,"div",62),f.TgZ(2,"form",63),f.TgZ(3,"div",64),f.TgZ(4,"div",65),f.TgZ(5,"h4",66),f._uU(6,"Select Pickup Stand"),f.qZA(),f.TgZ(7,"button",285),f.TgZ(8,"span",68),f._uU(9,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(10,Ii,2,1,"div",69),f.TgZ(11,"div",70),f.TgZ(12,"button",286),f.NdJ("click",function(){return f.CHM(e),f.oxw().pickUpStandFormSubmit()}),f._uU(13," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(10),f.Q6J("ngIf",e.queuePikupStandList.length>0),f.xp6(2),f.Q6J("disabled",!e.pickUpStandForm.valid)}}function Ri(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",289),f.TgZ(1,"input",290),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).fixZone(t)}),f.qZA(),f.TgZ(2,"div",291),f.TgZ(3,"div",292),f.TgZ(4,"div",293),f.TgZ(5,"h4",294),f._uU(6),f.qZA(),f.TgZ(7,"div",295),f.TgZ(8,"div",296),f.TgZ(9,"span",260),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.from_zone_title),f.xp6(4),f.Oqu(e.dropoff_location)}}function zi(e,t){if(1&e&&(f.TgZ(0,"div",287),f.YNc(1,Ri,11,4,"label",288),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngForOf",e.zonePriceData)}}function Ji(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",297),f.TgZ(1,"h6",298),f._uU(2),f.qZA(),f.TgZ(3,"p",299),f._uU(4),f.qZA(),f.TgZ(5,"input",300),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserPickupLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",144),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;f.xp6(2),f.hij("",null==e?null:e.location_type_name," "),f.xp6(2),f.Oqu(null==e?null:e.address),f.xp6(1),f.MGl("id","p-",i,"")}}function Bi(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",297),f.TgZ(1,"h6",298),f._uU(2),f.qZA(),f.TgZ(3,"p",299),f._uU(4),f.qZA(),f.TgZ(5,"input",301),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserDropoffLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",144),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;f.xp6(2),f.Oqu(null==e?null:e.location_type_name),f.xp6(2),f.Oqu(e.address),f.xp6(1),f.MGl("id","d-",i,"")}}const Yi=function(e,t,i,n){return{"booking-form-w-booking":e,"booking-form":t,"hidden-width":i,"default-width":n}},Qi=function(e,t){return{"booking-form-center booking-form-center-w-booking":e,"overflow-auto":t}},Hi=function(e){return{"booking-form-inner booking-form-inner-w-booking":e}},$i=function(e,t){return{background:e,color:t}},Gi=function(e){return{"booking-form-center booking-form-center-w-booking":e}},Ki=function(e,t){return{"booking-form-inner-w-booking":e,"w-100":t}};let Wi=(()=>{class e{constructor(e,t,i,n,o,a,r,l,s,u,d,c){this.authService=e,this.cd=t,this.yelowCabService=i,this.fb=n,this.taxiBookingService=o,this.yelowBookingService=a,this.toasterService=r,this.googleService=l,this.route=s,this.jwtService=u,this.Router=d,this.zoneUtilityService=c,this.DriverKeyUp=new x.xQ,this.DriverKeyUp2=new x.xQ,this.DriverKeyUp1=new x.xQ,this.DriverKeyUpReturn=new x.xQ,this.DriverKeyUpReturnDest=new x.xQ,this.formErrors={pickup_location:"",destination:"",request_time:"",start_date:"",end_date:"",paymentMode:"",paymentStatus:"",driver:"",apierror:"",corporate:"",inActive:"Corporate is InActive please Activate it",recurring_time:"",recurring_on:"",first_name:"",last_name:"",email:"",phone_no:"",dial_code:"",notes:"",return_time:"",employee:"",booking_type_id:"",hour:"",packages:""},this.rentalPackages=[],this.isCollapsed=!0,this.passengerType="MYSELF",this.storeOldVehiclePrice=0,this.skipLogin=!1,this.isOtpVerification=!1,this.isBookingHold=!1,this.tripPropertiesIds=[],this.zoneIds=[],this.title="Template 5",this.hideBasicPage=!1,this.hideUserPage=!0,this.isFirstPart=!0,this.hidePayment=!0,this.hideSuccess=!0,this.channelPaymentType=null,this.channelPaymentTypeLabel=null,this.steps=[],this.currentStepIndex=0,this.no_of_passenger=1,this.trip_luggage=0,this.displayChidSheet=!1,this.displayBoosterSheet=!1,this.displayFlightNumber=!1,this.YELOWCAB_SERVICE_TYPE=14,this.otherChargArray=[],this.otherChargesArray=[],this.tripOtherCharges=[],this.loadingState=!1,this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.selectedOtherChargesArray=[],this.placeSearch=new x.xQ,this.responseFlight=[],this.key="e903329db5f17ff850162f4e8c872651",this.checkFligth=!1,this.transactionCategory=[],this.showCode=!1,this.booking_type_id=null,this.formSubmited=!1,this.submitFirstPart=!1,this.checkpointsArrayNew=[],this.getWayPoint=[],this.timeFormatConfig2={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.request_time=e;const t=new Date(e[0])||null;this.addForm.controls.request_time.setValue(t),this.setDateintime()}}},this.Customer_id=null,this.zoneData={from:null,to:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null,from_ids:null,to_ids:null},this.returnzoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.paymentMode=[],this.allPaymentModes=[],this.allRideTypes=[],this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.zoneCutOffMinutes=null,this.requestTimeMinDate=null,this.pickupRegionFound=!0,this.pickupZoneFound=!0,this.dropRegionFound=!0,this.dropZoneFound=!0,this.showNextButton=!0,this.sameZoneTripRestricted=!1,this.regionResponse=[],this.totalExtraPasse
1ngerCharge=0,this.totalExtraLuggageCharge=0,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.clearPickup=!1,this.searchText=null,this.selectedCheckpointsArray=[],this.vehicleArray=[],this.filterVehicleArray=[],this.origin=w.jQ,this.queuePikupList=[],this.queuePikupData=null,this.queuePikupStandList=[],this.queuePikupFound=!1,this.selectQueuePickup=!1,this.checkOnlyPickupConfig="N",this.selectedPickupPoint=null,this.selectedUserPickupLocation=null,this.selectedUserDropoffLocation=null,this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[],this.locationTypeList=[{type_id:1,title:"Home"},{type_id:2,title:"Work"},{type_id:3,title:"Other"}],this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.zoneResponse=[],this.driverArray=[],this.autoDispatch=!0,this.onlineDriver=1,this.genderValue="M",this.queueId=null,this.checkpointValidity={},this.checkOutofServiceArea=!1,this.lastCheckPointValid=!0,this.skip_destination=!1,this.clearDestination=!1,this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.rideType=w.xk,this.corporateBookingConfirmation="N",this.bookingAssetsList=[],this.driverType=[],this.selectedTab=1,this.schedule_trip=!1,this.schedule_tripArray=null,this.requestMode="N",this.is_date=!1,this.marker=[],this.timeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onChange:e=>{e&&(console.log("selectedDates",e),this.selectedRequestTime=e)}},this.luggageArray=[],this.numberFilter=[],this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.returnEnable=!1,this.checkReturnTimeConfig=!1,this.returnFinalFare=0,this.returnTripDiscount=0,this.store_ride_distance=0,this.store_bike_distance=0,this.store_distance=0,this.startingFrom=!1,this.otherChargePrice=0,this.tripOtherChargePrice=0,this.queryParam={},this.returnDateFormatConfig={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(null==e?void 0:e.length){const t=new Date(e[0]);this.return_date=t,this.addForm.controls.return_date.setValue(t),this.setReturnTimeFromDate()}}},this.returnTimeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onClose:e=>{if(null==e?void 0:e.length){const t=new Date(e[0]);this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t)}}},this.walletBalance=0,this.vehicleTypeArray=[],this.zonePropertiesIds=[],this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.TEXT_BOX_FIELD=1,this.DATE_FIELD=2,this.MULTI_SELECT_FIELD=3,this.DROPDOWN_FIELD=4,this.DOCUMENT_FIELD=6,this.documentUploadLoading={},this.documentFileNames={},this.isDocumentUploading=!1,this.DOCUMENT_MAX_FILE_SIZE=22020096,this.dateFormatConfig={dateFormat:"d/m/Y",time_24hr:!1,enableTime:!1},this.displayLoginForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.selectedButtonSingAUpLogin={button_id:1},this.currentUserDetail=null,this.content="",this.bookingTypeKey=null,this.hoursArray=[{name:"1 hrs",value:1},{name:"2 hrs",value:2},{name:"3 hrs",value:3},{name:"4 hrs",value:4},{name:"5 hrs",value:5},{name:"6 hrs",value:6},{name:"7 hrs",value:7},{name:"8 hrs",value:8},{name:"9 hrs",value:9},{name:"10 hrs",value:10},{name:"11 hrs",value:11},{name:"12 hrs",value:12},{name:"13 hrs",value:13},{name:"14 hrs",value:14},{name:"15 hrs",value:15},{name:"16 hrs",value:16},{name:"17 hrs",value:17},{name:"18 hrs",value:18},{name:"19 hrs",value:19},{name:"20 hrs",value:20},{name:"21 hrs",value:21},{name:"22 hrs",value:22},{name:"23 hrs",value:23},{name:"24 hrs",value:24}],this.trip_number=null,this.gender=O.y7,this.genderTab="M",this.is_full_screen=!0,this.hours_pricing=0,this.package_pricing=0,this.agentMinDistance=0,this.agentLogin=!1,this.disableBtn=!1,this.vehicleTypes=[{title:"Sedan"},{title:"SUV"},{title:"Luxury"},{title:"Van"}],this.allocation_type=null}getZonePricingParams(){return{}}getStepClass(e){return e===this.currentStepIndex?"active-web-booking":e<this.currentStepIndex?"completed-web-booking":"inactive-web-booking"}isStepCompleted(e){return e<this.currentStepIndex}ngOnDestroy(){this.sub&&this.sub.unsubscribe(),this.mapObs&&this.mapObs.unsubscribe()}ngAfterViewInit(){this.mapObs=this.authService.mapScriptLoad.subscribe(e=>{(null==e?void 0:e.is_load)&&this.patchDefaultUserLocation()})}patchDefaultUserLocation(){(null==navigator?void 0:navigator.geolocation)&&(null==navigator||navigator.geolocation.getCurrentPosition(e=>{e&&this.googleService.getAddressFromLatLng(e.coords.latitude,e.coords.longitude).then(e=>{var t,i,n,o,a,r,l,s;if(e){let u={full_text:null===(t=null==e?void 0:e.results[0])||void 0===t?void 0:t.formatted_address,place_id:null===(i=null==e?void 0:e.results[0])||void 0===i?void 0:i.place_id,latitude:null===(a=null===(o=null===(n=null==e?void 0:e.results[0])||void 0===n?void 0:n.geometry)||void 0===o?void 0:o.location)||void 0===a?void 0:a.lat(),longitude:null===(s=null===(l=null===(r=null==e?void 0:e.results[0])||void 0===r?void 0:r.geometry)||void 0===l?void 0:l.location)||void 0===s?void 0:s.lng()};this.searchEvent(u)}})}))}ngOnInit(){this.createForm(),this.route.queryParams.subscribe(e=>{console.log("Current queryParams >>>",e),e.agent_id&&(this.agent_id=e.agent_id,this.jwtService.saveAgentId(this.agent_id));const t=this.jwtService.getAgentId();this.agent_id=t,t&&e.agent_id!==t&&(this.agentLogin=!0,this.getCommisionDetail
1s(t),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:t},queryParamsHandling:"merge",replaceUrl:!0}))}),this.pickUpStandForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],pickup_latitude:[null],pickup_longitude:[null]}),this.validationMessages={first_name:{required:"Please enter First Name",whiteSpace:"* Space not allowed"},last_name:{required:"Please enter last name",whiteSpace:"* Space not allowed"},email:{required:"* Please enter email",validateEmail:"* Please enter valid email"},phone_no:{required:"Please enter phone number",minlength:"Please enter at least 6 digits",maxlength:"Please enter at most 11 digits"},dial_code:{required:"Please enter dial code",validateDialCode:"Please enter correct dial code"},pickup_location:{required:"Enter Your Pickup Location",whiteSpace:"* Space not allowed"},destination:{required:"Please enter destination",whiteSpace:"* Space not allowed"},ride_type:{required:"Please enter ride type"},request_time:{required:"Please enter request time "},return_time:{required:"Please select return date and time"},recurring:{required:"Extra charge per "},start_date:{required:"Extra charge start date"},end_date:{required:"Please select the end date"},days:{required:"Extra charge per luggage"},auto_dispatch:{required:"Please enter waiting time charge"},driver:{required:"Please select the driver"},paymentMode:{required:"Please provide the payment type"},paymentStatus:{required:"Please provide the payment type"},notes:{required:"Please enter notes"},corporate:{required:"Please enter Corporate"},recurring_time:{required:"Please select the time"},recurring_on:{required:"Please select the days"},employee:{required:"Please select Employee"},booking_type_id:{required:"Please select Booking type"},packages:{required:"Please select packages"},hour:{required:"Please select hour"}},this.initDefaultReturnDateTime(),this.authService.langaugeListSubject.subscribe(e=>{this.languageList=e,setTimeout(()=>{window.localStorage.getItem("query_language_code")&&(this.selectedLanguage=window.localStorage.getItem("query_language_code"),window.localStorage.removeItem("language_code"),this.changeLanguage())},500)}),this.sub=this.authService.langaugeSubjectData.subscribe(e=>{var t,i,n,o;this.currentLanguage=null==e?void 0:e.labels,this.selectedLanguage=null==e?void 0:e.language_code,this.steps=[{name:null===(t=this.currentLanguage)||void 0===t?void 0:t.quote_header,icon:"quote-icon",isActive:!1},{name:null===(i=this.currentLanguage)||void 0===i?void 0:i.transfer_header,icon:"transfer-icon",isActive:!0},{name:null===(n=this.currentLanguage)||void 0===n?void 0:n.payment_header,icon:"payment-icon",isActive:!1}],this.bookRideText=null===(o=this.currentLanguage)||void 0===o?void 0:o.book_ride}),this.authService.themeCode.subscribe(e=>{this.themeCodeData=e}),this.authService.currentUser.subscribe(e=>{Object.keys(e).length>0&&(this.currentUserDetail=e,this.getUserLocations(e.id),this.queryParam.user_id=e.id)}),this.authService.currentCompany.subscribe(e=>{var t,i;e&&(null==e?void 0:e.company_id)&&(this.currentCompanyDetail=e,this.formatTimeDate=this.currentCompanyDetail.company_date_format+" "+this.currentCompanyDetail.company_time_format,this.roundFormate=null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.round_format,this.distance_unit=null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.distance_unit,this.currentCompanyDetail.company_time_format.includes("a")||this.currentCompanyDetail.company_time_format.includes("A")||(this.timeFormatConfig.time_24hr=!0,this.timeFormatConfig.dateFormat="H:i",this.returnTimeFormatConfig.time_24hr=!0,this.returnTimeFormatConfig.dateFormat="H:i"),this.company_logo=e.company_logo,this.company_id=e.company_id,this.company_id&&(this.getPaymentConfig(),this.getVehicleType(this.company_id),this.getAllTripProperties(),this.getCustomeFields(),this.getRegionList(this.YELOWCAB_SERVICE_TYPE),this.ManagezoneData()),this.dialCode=e.country_dial_code,this.addForm.patchValue({dial_code:this.dialCode}))}),this.placeSearch.pipe((0,k.b)(300)).subscribe(e=>{this.searchFlight(e)}),this.checkModule(),this.DriverKeyUp.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName(e)}),this.DriverKeyUp2.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName2(e)}),this.DriverKeyUp1.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName1(e)}),this.DriverKeyUpReturn.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturn(e)}),this.DriverKeyUpReturnDest.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturnDest(e)})}
1getCommisionDetails(e){this.loadingState=!0,this.yelowBookingService.getCommisionById(e).subscribe(e=>{var t;this.loadingState=!1,console.log("response >>>>>>>>>. ",e),this.agentMinDistance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.trip_minimum_distance},e=>{})}searchDriverByName2(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i,n;(null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places)||void 0===i?void 0:i.length)>0&&(this.responseDatacheckPoint=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.places)})}searchDriverByName1(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataDestionation=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturn(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturn=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturnDest(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturnDestination=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}createForm(){this.addForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],destination:[null,r.kI.compose([b.Sl])],checkpoint:[null],ride_type:[1,r.kI.compose([r.kI.required])],request_time:[null],return_date:[null],return_trip_time:[null],return_time:[null],return_pickup_location:[null],return_pickup_latitude:[null],return_pickup_longitude:[null],return_destination:[null],return_dropoff_latitude:[null],return_dropoff_longitude:[null],recurring:[null],start_date:[null],auto_dispatch:[!1,r.kI.compose([r.kI.required])],driver:[null],notes:[null],checkpoints:this.fb.array([]),properties:this.fb.array([]),gender:["M"],end_date:[null],recurring_time:[null],recurring_on:[null],paymentMode:[1,r.kI.compose([r.kI.required])],payment_mode_id:[null,r.kI.compose([r.kI.required])],trip_luggage:[this.trip_luggage],no_of_passenger:[this.no_of_passenger],paymentStatus:["pending",r.kI.compose([r.kI.required])],customer:[null],first_name:[null],last_name:[null],email:[null],phone_no:[null],dial_code:[this.dialCode],booster_seat:[0],child_seat:[0],flight_number:[null],booking_type_id:[null,r.kI.compose([r.kI.required])],additional_discount_type:[1],extra_charge_type:[1],trip_time:[null],hour:[null],packages:[null]}),this.getCategories()}checkModule(){this.authService.CommonModule.subscribe(e=>{e&&(this.checkFligth="Y"==(null==e?void 0:e.dspm_019),this.checkReturnTimeConfig=!!(null==e?void 0:e.dspm_012),this.key=null==e?void 0:e.dspm_019_01)}),this.authService.serviceConfig.subscribe(e=>{var t,i;e&&(this.skipLogin="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_LOGIN],e.csc_064&&(this.isOtpVerification="Y"==e.csc_064),this.skip_destination=!!e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION]&&"Y"===e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION],this.updateDestiantionValidation(this.skip_destination),this.pre_payment_value=null!==(i=null!==(t=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PRE_PAYMENT])&&void 0!==t?t:e.dpsc_030)&&void 0!==i?i:e.tsc_030,this.pre_payment="1"==this.pre_payment_value||1==this.pre_payment_value,e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD]&&(this.paymentModeConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD],this.applyPaymentModeConfig()),e.csc_041&&(this.checkRegion=e.csc_041),this.checkGenderEnable=e[F.kh[this.YELOWCAB_SERVICE_TYPE].SHOW_GENDER_OPTIONS],"Y"==this.checkRegion&&e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]&&(this.checkOnlyPickupConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]),(e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE]||e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE])&&(this.requestMode=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE],this.requestModeSchedule=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE],this.getSeduleConfige(!0)),this.allocation_type=e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.autoDispatch=3!=this.allocation_type,this.showCode="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.displayLuggagePassenger="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].PassengerLuggage],e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]&&(this.fareAccebility=e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]),this.isBookingHold="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].HOLD_BOOKING])})}
1getMaxLuggagePassengerCapacity(){if(this.max_luggage_capacity_filter>0){this.luggageArray=[];for(let e=0;e<=this.max_luggage_capacity_filter;e++)this.luggageArray.push({id:e,name:`${e}`})}if(this.max_capacity_filter>=1){this.numberFilter=[];for(let e=1;e<=this.max_capacity_filter;e++)this.numberFilter.push({id:e,name:`${e}`})}}changeGender(e){this.genderValue=e,this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getCurrentStep(){return this.steps[this.currentStepIndex]}isCurrentStep(e){return e===this.currentStepIndex}getFormDetails(e){this.formData=e,this.no_of_passenger=null==e?void 0:e.no_of_passenger,this.trip_luggage=null==e?void 0:e.trip_luggage,this.isFirstPart=e.isFirstPart,this.firstPageData=e,e&&(this.hideBasicPage=!0,this.hideUserPage=!1),this.hidePayment=!0,this.currentStepIndex=1}editPage(e){this.currentStepIndex=0,this.isFirstPart=!0,this.hideUserPage=!0,this.hideBasicPage=!1,this.hidePayment=!0}goTripDetails(e){e&&(this.hidePayment=!0,this.hideUserPage=!1,this.currentStepIndex=1)}changeLanguage(){var e;localStorage.setItem("language_code",this.selectedLanguage);let t=this.languageList.find(e=>e.language_code==this.selectedLanguage);(null===(e=Object.keys(t))||void 0===e?void 0:e.length)>0&&this.authService.setlanguage([t])}displaySuccess(e){this.currentStepIndex=3,this.hidePayment=!0,this.hideSuccess=!1}displaySuccessresponse(e){var t;this.trip_id=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.booking_number}changeBookingType(e){this.booking_type_id=null,(null==e?void 0:e.id)&&(this.addForm.controls.booster_seat.setValue(0),this.addForm.controls.child_seat.setValue(0),this.addForm.controls.booster_seat.updateValueAndValidity(),this.addForm.controls.child_seat.updateValueAndValidity(),this.booking_type_id=null==e?void 0:e.id,this.bookingTypeKey=null==e?void 0:e.field_key,this.getotherCharges(null==e?void 0:e.id),this.getCustomeFields(),(this.pickup_latitude&&this.pickup_longitude||this.destination_latitude&&this.destination_longitude)&&(this.pickup_latitude&&this.pickup_longitude&&this.UpdateAndCheckPickUpLocation(this.pickup_latitude,this.pickup_longitude,!1),this.destination_latitude&&this.destination_longitude&&this.UpdateDestinationLocation(this.destination_latitude,this.destination_longitude,!1),this.bindMarkerPoints()),this.getFavoriteLocation(),this.selectedVehicleObj&&["hourly","package"].includes(null==e?void 0:e.field_key)&&this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj))}getCategories(){this.loadingState=!0,this.yelowCabService.getOtherCategoryList().subscribe(e=>{var t,i;if(this.loadingState=!1,e.status&&(this.transactionCategory=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list.filter(e=>e.is_active),this.transactionCategory.length>0)){let e=localStorage.getItem("booking_type_id");e?(this.booking_type_id=e,this.bookingTypeKey=null===(i=this.transactionCategory.find(t=>t.id==e))||void 0===i?void 0:i.field_key):(this.booking_type_id=this.transactionCategory[0].id,this.bookingTypeKey=this.transactionCategory[0].field_key),this.getFavoriteLocation(),this.getCustomeFields(),this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.getotherCharges(this.booking_type_id)}},e=>{this.loadingState=!1})}getCustomeFields(){let e={service_type:this.YELOWCAB_SERVICE_TYPE,category_id:this.booking_type_id,company_id:JSON.parse(this.company_id),user_type:"0,3"};this.yelowCabService.getExtraFields(e).subscribe(e=>{var t;e.status&&(this.displayChidSheet=!1,this.displayBoosterSheet=!1,null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>("child_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayChidSheet=!0),"booster_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayBoosterSheet=!0),e.checked=1==(null==e?void 0:e.is_required),Object.assign({},e))))})}getotherCharges(e){let t={service_type:this.YELOWCAB_SERVICE_TYPE,booking_type_id:e,is_active:1};this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.yelowCabService.getOtherChargesList(t).subscribe(e=>{var t,i;e.status&&(this.allOtherChargesArray=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list,this.otherChargesArray=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.list.map(e=>(e.charges=0,e.checked=!1,e.currentValue=0,this.otherChargArray[null==e?void 0:e.charges_key]=e,Object.assign({},e))).filter(e=>1==(null==e?void 0:e.charges_category)))}),this.cd.detectChanges()}checkOtherCharge(e,t){var i,n;this.otherChargesArray=null===(i=this.otherChargesArray)||void 0===i?void 0:i.map(e=>{var i,n;return(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_
1charges_id)&&(e.charges_key&&(null===(i=this.otherChargArray)||void 0===i?void 0:i[e.charges_key])&&(this.otherChargArray[e.charges_key].checked=!e.checked),e.checked=!e.checked,(0,S.Mf)(e)&&(e.currentValue=e.checked?Number(e.currentValue)>0?Number(e.currentValue):1:0,e.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[e.charges_key])&&(this.otherChargArray[e.charges_key].currentValue=e.currentValue))),Object.assign({},e)}),"booster_seat"==(null==t?void 0:t.charges_key)?(this.addForm.controls.booster_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.booster_seat.value):"child_seat"==(null==t?void 0:t.charges_key)&&(this.addForm.controls.child_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.child_seat.value);const o=null===(n=this.otherChargesArray)||void 0===n?void 0:n.find(e=>(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id));o&&(t.checked=o.checked,t.currentValue=o.currentValue),this.refreshOtherChargesFare()}checkTripOtherCharge(e,t){var i;this.tripOtherCharges=null===(i=this.tripOtherCharges)||void 0===i?void 0:i.map(e=>((null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&(e.checked=!e.checked),Object.assign({},e)))}getFlight(e){var t,i,n;e?(this.addForm.patchValue({flight_number:null===(t=e.flight)||void 0===t?void 0:t.iata}),this.flightNumbers=e,this.selectedFlightObj=this.flightNumbers,this.selectedFlightObjName=null===(n=null===(i=this.selectedFlightObj)||void 0===i?void 0:i.flight)||void 0===n?void 0:n.iata):(this.addForm.patchValue({flight_number:null}),this.selectedFlightObj=null)}searchPlace(e){""!==e.trim()&&this.placeSearch.next({search:e})}searchFlight(e){e&&(this.loadingState=!0,this.taxiBookingService.getFlightInfoByNumber(null==e?void 0:e.search).subscribe(e=>{e.status?this.responseFlight[0]=e.data:this.responseFlight=[],this.loadingState=!1},()=>{this.loadingState=!1}))}incrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;null===(n=this.addForm.get(e))||void 0===n||n.setValue(a+1),t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value}decrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;a>0&&(null===(n=this.addForm.get(e))||void 0===n||n.setValue(a-1)),t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value}increment(e){const t=this.properties.at(e).get("value");t.setValue(t.value?Number(t.value)+1:1)}get properties(){return this.addForm.get("properties")}decrement(e){const t=this.properties.at(e).get("value");t.value>0&&t.setValue(Number(t.value)-1)}onInputChange(e=null){e?this.generateErrors(e):Z.op._generateErrors(this.addForm,this.formErrors,this.validationMessages,this.formSubmited)}generateErrors(e){Z.op._generateErrors(e,this.formErrors,this.validationMessages,this.formSubmited)}getFavoriteLocation(){this.yelowCabService.getFavoriteLocationList(this.booking_type_id).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=e.data.location.map(e=>(e.latitude=parseFloat(e.latitude),e.longitude=parseFloat(e.longitude),e.full_text=e.address,delete e.address,e));t&&("airport_drop_off_transfer"!=this.bookingTypeKey?(this.responseData=t,this.responseDatacheckPoint=t):(this.responseData=[],this.responseDatacheckPoint=[]),this.responseDataDestionation="airport_pick_up_transfer"!=this.bookingTypeKey?t:[])}},e=>{})}searchDriverByName(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseData=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchEvent(e){e?(this.displayFlightNumber=!!e.full_text.toLowerCase().includes("airport")||!(!this.addForm.controls.destination.value||!this.addForm.controls.destination.value.toLowerCase().includes("airport")),this.onInputChange(this.addForm.controls.pickup_location),this.clearPickup=!1,this.submitFirstPart=!1,this.showNextButton=!1,this.addForm.controls.pickup_location.setValue(e.full_text),this.searchText=e.full_text,this.addForm.controls.pickup_location.updateV
1alueAndValidity(),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickup_latitude=e.latitude,this.pickup_longitude=e.longitude,this.UpdateAndCheckPickUpLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.pickup_latitude=e.data.latitude,this.pickup_longitude=e.data.longitude,this.UpdateAndCheckPickUpLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.pickup_location.setValue(null),this.addForm.controls.pickup_location.updateValueAndValidity(),this.pickup_latitude=null,this.pickup_longitude=null,this.bindMarkerPoints(),this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.vehicleArray=[],this.filterVehicleArray=[],this.finalFare=0,this.clearPickup=!0)}bindMarkerPoints(){let e=[{lat:this.pickup_latitude,lng:this.pickup_longitude},{lat:this.destination_latitude,lng:this.destination_longitude}];const t=this.addForm.get("checkpoints");this.getWayPoint=[],this.selectedCheckpointsArray=[],t.value.map(i=>{this.getWayPoint.push({latitude:i.lat,longitude:i.lng}),e.push({lat:i.lat,lng:i.lng}),this.selectedCheckpointsArray.push({id:t.value.length,latitude:i.lat,longitude:i.lng})})}addMarker(e){this.marker=[],null==e||e.forEach((e,t)=>{if((null==e?void 0:e.lat)&&(null==e?void 0:e.lng)){let t={lat:Number(e.lat),lng:Number(e.lng)};this.marker.push({position:t})}}),this.marker.forEach((e,t)=>{e.addListener("dragend",e=>{let i=e.latLng,n=i.lat(),o=i.lng();this.googleService.getAddressFromLatLng(n,o).then(e=>{e&&(this.draggedMarkerObj={updateIndex:t,address:e.results[0].formatted_address,lat:n,lng:o},this.updateMarker(this.draggedMarkerObj))})})})}updateMarker(e){0==e.updateIndex?(this.addForm.controls.pickup_location.setValue(e.address),this.searchText=e.address,this.addForm.controls.pickup_location.updateValueAndValidity(),this.UpdateAndCheckPickUpLocation(e.lat,e.lng,!1)):1==e.updateIndex?(this.addForm.controls.destination.setValue(e.address),this.searchTextDestionation=e.address,this.addForm.controls.destination.updateValueAndValidity(),this.UpdateDestinationLocation(e.lat,e.lng,!1)):(this.currenCheckpointInput=e.updateIndex-1,this.updateCheckPoint(e.lat,e.lng,e.address))}getRegionList(e){this.yelowBookingService.getCompanyRegionList(e).subscribe(e=>{var t;e&&(this.regionResponse=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list)||[])})}submitUserPickUpLocationForm(){if(this.selectedUserPickupLocation){let e=this.userPickipLocationsArray[this.selectedUserPickupLocation-1];e&&(this.pickup_latitude=parseFloat(e.latitude),this.pickup_longitude=parseFloat(e.longitude),this.searchText=e.address,this.searchEvent({latitude:this.pickup_latitude,longitude:this.pickup_longitude,full_text:e.address}))}this.closeUserPickupLocationForm()}closeUserPickupLocationForm(){$("#selectUserPickupLocation").modal("hide")}updateUserPickupLocation(e,t){this.selectedUserPickupLocation=e}updateUserDropoffLocation(e,t){this.selectedUserDropoffLocation=e}submitUserDropoffLocationForm(){if(this.selectedUserDropoffLocation){let e=this.userDropoffLocationsArray[this.selectedUserDropoffLocation-1];e&&(this.destination_latitude=parseFloat(e.latitude),this.destination_longitude=parseFloat(e.longitude),this.searchTextDestionation=e.address,this.searchEventDestination({latitude:this.destination_latitude,longitude:this.destination_longitude,full_text:e.address}))}this.closeUserDropoffLocationForm()}updateCheckPoint(e,t,i,n=!0){let o=!1;if("Y"==this.checkRegion){for(let i of this.regionResponse)o||(o=(0,Z.eD)(e.toFixed(5),t.toFixed(5),(0,C.U)(i.geofence)),this.selectedCheckPointRegionData=i);!0===o?(this.showNextButton=!0,this.updateDestiantionValidation(!1),this.checkPointsValidation(),this.updateRegionPointValiation()):"N"==this.checkOnlyPickupConfig?(this.showNextButton=!1,this.lastCheckPointValid=!1,this.checkOutofServiceArea=!1):(this.checkOutofServiceArea=!0,this.showNextButton=!0,this.lastCheckPointValid=!1)}else this.showNextButton=!0,this.lastCheckPointValid=!0;this.updateCheckPoints(i,e,t,this.currenCheckpointInput-1)}UpdateAndCheckPickUpLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){var i;n.pickup_latitude=e,n.pickup_longitude=t;let o=!1;
1if("Y"==n.checkRegion){for(let e of n.regionResponse)o||(o=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.selectedPickupRegionData=e);!0===o?(n.showNextButton=!0,n.pickupRegionFound=!0,n.checkDropUpLocation(n.origin.is_pickUp)):(n.pickupRegionFound=o,n.showNextButton=!1),n.updateRegionPointValiation()}else n.showNextButton=!0,n.pickupRegionFound=!0;if(n.fixZoneDisableDropoff=!1,n.zoneData.from=null,n.zoneData.from_title=null,n.zoneData.from_obj=null,n.zoneData.from_ids=null,n.pickupRegionFound?(yield n.zoneUtilityService.findPickupZone(n.pickup_latitude,n.pickup_longitude,n.zoneResponse,n.zoneData,()=>n.getZonePrice(),()=>{},n.getZonePricingParams()),(null===(i=n.zoneData)||void 0===i?void 0:i.from_ids)?n.loadZoneConfigurationForPickup(String(n.zoneData.from_ids)):n.resetZoneBookingOptions()):n.resetZoneBookingOptions(),n.addZoneOtherCharges(),n.queuePikupFound=!1,n.queuePikupList.length>0)for(let e of n.queuePikupList)n.queuePikupFound=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.queuePikupData=n.queuePikupFound?e:null;n.queuePikupData?n.getQueuePickupLatLong(n.queuePikupData.pickup_stand_id):n.queuePikupStandList=[],1===n.onlineDriver&&!n.autoDispatch&&n.getOnlineDriver(),n.updateSameZoneTripRestriction()})()}setAutoDispatch(e){this.autoDispatch=e,this.autoDispatch?(this.addForm.get("driver").setValidators([]),this.addForm.get("driver").setValue(null)):(this.getOnlineDriver(),this.addForm.get("driver").setValidators([r.kI.required])),this.addForm.get("driver").updateValueAndValidity()}setOnlineDriver(e){this.onlineDriver=e,this.addForm.controls.driver.reset(),this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getOnlineDriver(){if(this.onlineDriverArray=[],this.pickup_latitude&&this.pickup_longitude){let e={company_id:this.currentCompanyDetail.company_id,latitude:this.pickup_latitude,longitude:this.pickup_longitude,service_type:this.YELOWCAB_SERVICE_TYPE};"Y"==this.checkGenderEnable&&(e.gender=this.genderValue),this.taxiBookingService.getNearByOnlineDriverList(e).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=[],i=[];e.data.forEach(e=>{(null==e?void 0:e.driver_id)&&t.push(null==e?void 0:e.driver_id),(null==e?void 0:e.distance)&&(i[null==e?void 0:e.driver_id]=1===this.currentCompanyDetail.distanceUnit_s_key_value?(null==e?void 0:e.distance).toFixed(2):(.621371192*(null==e?void 0:e.distance)).toFixed(2))}),this.getUserDetails(t,i)}else this.onlineDriverArray=[]})}else this.toasterService.error("Enter Your Pickup Location")}getUserDetails(e,t){if((null==e?void 0:e.length)>0){const i=null==e?void 0:e.join(",");this.yelowBookingService.getUserDetails(i).subscribe(e=>{e.status&&(this.driverArray=null==e?void 0:e.data.map(e=>(e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} ${(null==e?void 0:e.dial_code)?"("+(null==e?void 0:e.dial_code):""} ${(null==e?void 0:e.phone_number)?(null==e?void 0:e.phone_number)+")":""} ) ${t[e.id]} ${this.currentCompanyDetail.distance_unit}`,e)))})}}getDriverList(e){if(2===this.onlineDriver||3==this.allocation_type){let t={company_id:this.currentCompanyDetail.company_id,is_active:1};e&&e.term?t.search=e.term:this.driverArray=[],"Y"==this.checkGenderEnable&&(t.gender=this.genderValue),this.yelowBookingService.getDriversList(t).subscribe(e=>{var t;this.loadingState=!1,e.success||e.status?(this.driverArray=null===(t=e.data)||void 0===t?void 0:t.list,this.driverArray.forEach(e=>{e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} (${null==e?void 0:e.dial_code} ${null==e?void 0:e.phone_number})`})):this.driverArray=[]})}}getZonePrice(){this.yelowCabService.getZoneprice({from_zone_id:this.zoneData.from,dropoff_type:2,is_active:1}).subscribe(e=>{e.status?(this.zonePriceData=e.data.list,this.fixZonePriceData=this.zonePriceData[0],this.zonePriceData.length>0?(this.fixZoneDisableDropoff=!0,$("#fixdestination").modal("show")):(this.fixZonePriceData=null,this.fixZoneDisableDropoff=!1)):(this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null)})}
1getQueuePickupLatLong(e){this.yelowBookingService.getPikupPointsById(e).subscribe(e=>{var t,i;if(1===e.status){if(this.queuePikupStandList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pickup_point,this.queuePikupStandList.length>0){let t=this.queuePikupStandList[0];this.pickUpStandForm.patchValue({pickup_location:t.address,pickup_latitude:t.latitude,pickup_longitude:t.longitude}),this.queueId=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.queue_id,this.pickup_longitude=t.longitude,this.pickup_latitude=t.latitude}}else this.queuePikupStandList=[]})}OnSearchCheckpoint(e){""!==e.trim()&&this.DriverKeyUp2.next(e)}removeRow(e){this.currenCheckpointInput=null;const t=this.addForm.get("checkpoints");this.selectedCheckpointsArray.pop({id:t.controls.length,latitude:null,longitude:null}),t.removeAt(e),this.checkPointsValidation(!0),this.updateCheckPointsRegion(),this.cd.detectChanges(),this.bindMarkerPoints(),this.selectedCheckpointsArray.length<1&&(this.updateDestiantionValidation(this.skip_destination),this.onInputChange(this.addForm.controls.destination))}updateDestiantionValidation(e){e?(this.addForm.controls.destination.setValidators(null),this.addForm.controls.destination.updateValueAndValidity()):(this.addForm.controls.destination.setValidators(r.kI.required),this.addForm.controls.destination.updateValueAndValidity())}addNewRow(){const e=this.addForm.get("checkpoints");"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?this.selectedPickupRegionData?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location"):this.pickup_latitude&&this.pickup_longitude?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location")}validateCheckPoint(e){e.valid&&(e.controls.length<=2?e.controls.length>0&&!e.at(e.controls.length-1).valid?this.toasterService.error("Your Previous checkpoints is invali
1d!"):(e.push(this.initRows()),this.cd.detectChanges(),this.selectedCheckpointsArray.push({id:e.controls.length,latitude:null,longitude:null})):this.toasterService.error("You can only add maximum three checkpoints!"))}initRows(){return new r.cw({value:new r.NI(null,r.kI.compose([r.kI.required])),lat:new r.NI(null),lng:new r.NI(null),pickupLacation:new r.NI(this.selectedPickupRegionData),dropofupLacation:new r.NI(this.selectedDropRegionData),zone_array:new r.NI(this.regionResponse),checkRegion:new r.NI(this.checkRegion),checkOnlyPickup:new r.NI(this.checkOnlyPickupConfig)},{validators:C.v.is_point})}OnSearchDestination(e){""!==e.trim()&&this.DriverKeyUp1.next(e)}updateCheckPoints(e,t,i,n){const o=this.addForm.get("checkpoints");for(var a=0;a<o.length;a++)a==n&&o.at(a).patchValue({value:e,lat:t,lng:i});this.updateCheckPointsRegion(),setTimeout(()=>{this.bindMarkerPoints()},200)}updateCheckPointsRegion(){let e=this.addForm.get("checkpoints").value.map(e=>({latitude:Number(e.lat),longitude:Number(e.lng)}));this.checkpointValidity={},e.forEach("Y"===this.checkRegion?(e,t)=>{let i=!1;for(let n of this.regionResponse){const t=(0,C.U)(n.geofence);if((0,Z.eD)(e.latitude,e.longitude,t)){i=!0;break}}this.checkpointValidity[t]=i}:(e,t)=>{this.checkpointValidity[t]=!0})}searchEventCheckpoint(e,t){this.submitFirstPart=!1,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?this.updateCheckPoints(e.full_text,e.latitude,e.longitude,t):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(i=>{i.status&&i.data.latitude&&i.data.longitude&&this.updateCheckPoints(e.full_text,i.data.latitude,i.data.longitude,t)})}openUserPickupLocationForm(){$("#selectUserPickupLocation").modal("show")}OnSearch(e){""!==e.trim()&&this.DriverKeyUp.next(e)}checkDropUpLocation(e){this.selectedPickupRegionData&&this.selectedDropRegionData&&(this.selectedDropRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id?(e===this.origin.is_drop&&(this.dropRegionFound="Y"==this.checkOnlyPickupConfig),e===this.origin.is_pickUp&&(this.pickupRegionFound="Y"==this.checkOnlyPickupConfig),this.showNextButton="Y"==this.checkOnlyPickupConfig):(e===this.origin.is_drop&&(this.dropRegionFound=!0),e===this.origin.is_pickUp&&(this.pickupRegionFound=!0),this.showNextButton=!0)),this.selectedCheckPointRegionData&&this.selectedDropRegionData&&this.selectedPickupRegionData&&this.checkPointsValidation()}checkPointsValidation(e=null){this.selectedPickupRegionData&&this.selectedCheckPointRegionData?this.selectedCheckPointRegionData&&this.selectedPickupRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):this.selectedCheckPointRegionData&&this.selectedDropRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedDropRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):(!this.selectedPickupRegionData||!this.selectedDropRegionData&&!1===this.skip_destination)&&(this.showNextButton=!1):this.showNextButton="Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig,e&&(this.showNextButton=this.selectedDropRegionData&&this.selectedPickupRegionData?this.selectedDropRegionData.company_region_id==this.selectedPickupRegionData.company_region_id:"Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig)}UpdateDestinationLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){n.destination_latitude=e,n.destination_longitude=t,Number(n.destination_latitude).toFixed(5),Number(n.destination_longitude).toFixed(5);let i=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)i||(i=(0,Z.eD)(n.destination_latitude.toFixed(5),n.destination_longitude.toFixed(5),(0,C.U)(e.geofence)),n.selectedDropRegionData=e);!0===i?(n.showNextButton=!0,n.checkDropUpLocation(n.origin.is_drop),n.updateRegionPointValiation()):"N"==n.checkOnlyPickupConfig?(n.dropRegionFound=!1,n.showNextButton=!1,n.checkOutofServiceArea=!1):(n.checkOutofServiceArea=!0,n.dropRegionFound=!0,n.showNextButton=!0)}else n.showNextButton=!0,n.dropRegionFound=!0;n.zoneData.to=null,n.zoneData.to_title=null,n.zoneData.to_obj=null,n.zoneData.to_ids=null,n.dropRegionFound&&(yield n.zoneUtilityService.findDropoffZone(n.destination_latitude,n.destination_longitude,n.zoneResponse,n.zoneData,()=>{},n.getZonePricingParams())),n.addZoneOtherCharges(),n.updateSameZoneTripRestriction()})()}updateRegionPointValiation(){const e=this.addForm.get("checkpoints");if(e.controls.length>
10)for(let t of e.controls)"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?(t.patchValue({pickupLacation:this.selectedPickupRegionData,dropofupLacation:this.selectedDropRegionData}),t.setValidators(C.v.is_point)):(t.setValidators([]),t.setValidators(null)),t.updateValueAndValidity()}addZoneOtherCharges(){let e=this.allOtherChargesArray.filter(e=>{var t,i;let n=null==e?void 0:e.zone_id;return null!==n&&(n===(null===(t=this.zoneData)||void 0===t?void 0:t.to)&&2==(null==e?void 0:e.zone_type)||n===(null===(i=this.zoneData)||void 0===i?void 0:i.from)&&1==(null==e?void 0:e.zone_type))});this.otherChargesArray=this.allOtherChargesArray.filter(e=>1==(null==e?void 0:e.charges_category)),this.otherChargesArray=[...this.otherChargesArray,...e],this.cd.detectChanges()}ManagezoneData(){this.yelowCabService.getZoneList().subscribe(e=>{e&&(this.zoneResponse=e.data.list)})}getUserLocations(e){this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[]}searchEventDestination(e){e?(this.clearDestination=!1,this.submitFirstPart=!1,this.onInputChange(this.addForm.controls.destination),this.showNextButton=!1,this.addForm.controls.destination.setValue(e.full_text),this.displayFlightNumber=!!e.full_text.toLowerCase().includes("airport")||!(!this.addForm.controls.pickup_location.value||!this.addForm.controls.pickup_location.value.toLowerCase().includes("airport")),this.addForm.controls.destination.updateValueAndValidity(),this.searchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.destination_latitude=e.latitude,this.destination_longitude=e.longitude,this.UpdateDestinationLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.destination_latitude=e.data.latitude,this.destination_longitude=e.data.longitude,this.UpdateDestinationLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.destination.setValue(null),this.addForm.controls.destination.updateValueAndValidity(),this.destination_latitude=null,this.destination_longitude=null,this.bindMarkerPoints(),this.clearDestination=!0,this.selectedVehicleObjName=null,this.selectedVehicleObj=null)}openUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("show")}closeUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("hide")}changeSelectedTab(e,t=!0){1==e?(this.driverType=[{type_id:1,type_name:"Online Driver"}],this.isSchedual_trip=0,this.resetRequestTimeToInitialNow()):(this.driverType=[{type_id:1,type_name:"Online Driver"},{type_id:2,type_name:"All Driver"}],this.isSchedual_trip=1),this.addForm.controls.ride_type.setValue(e),this.selectedTab=e,2===this.selectedTab&&(this.zoneConfigActive?this.applyRequestTimeMinDate():this.getSeduleConfige(!1)),this.updateRecurringValidations(e,this.addForm)}resetRequestTimeToInitialNow(){this.setMinTime();const e=new Date(this.trip_time);this.request_time=e,this.addForm.controls.request_time.setValue(e),this.addForm.controls.request_time.updateValueAndValidity(),this.addForm.controls.trip_time.setValue(e),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(e)),this.returnEnable&&this.initDefaultReturnDateTime()}updateRecurringValidations(e,t){if(3===e)t.get("recurring_time").setValidators([r.kI.required]),t.get("recurring_time").updateValueAndValidity(),t.get("end_date").setValidators([r.kI.required]),t.get("end_date").updateValueAndValidity();else{t.controls.recurring_time.clearValidators(),t.get("recurring_time").updateValueAndValidity(),t.controls.end_date.clearValidators(),t.get("end_date").updateValueAndValidity();try{t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}catch(i){t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}}}getSeduleConfige(e=!0){this.yelowBookingService.scheduleconFig({company_id:this.currentCompanyDetail.company_id},F.kh[this.YELOWCAB_SERVICE_TYPE].SCHEDULE_MODULE).subscribe(t=>
1{if(this.loadingState=!1,t.success||t.status){if(this.schedule_tripArray=t.data,this.schedule_tripArray.length>0){this.schedule_trip=!0;for(let e of this.schedule_tripArray)e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].TIMEOUT?this.addMinutes(Number(e.config_value),null):e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].MAX_TIME&&this.addMinutes(null,Number(e.config_value));e&&!this.zoneConfigActive&&("Y"==this.requestMode&&"Y"==this.requestModeSchedule?(this.rideType=[{type_id:1,type_name:"Now"},{type_id:2,type_name:"Later"}],this.setRideType(1)):"Y"==this.requestModeSchedule?(this.rideType=[{type_id:2,type_name:"Later"}],this.setRideType(2)):"Y"==this.requestMode&&(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1)))}else this.zoneConfigActive||(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1));this.zoneConfigActive||(this.allRideTypes=[...this.rideType]),(this.zoneCutOffMinutes||2===this.selectedTab)&&this.applyRequestTimeMinDate()}})}addMinutes(e=null,t=null){if(e&&(this.min_date=e,this.request_time=new Date,this.setMinTime(),this.timeFormatConfig.minDate=new Date(new Date(this.trip_time).setSeconds(0,0)),this.timeFormatConfig2.minDate=new Date(new Date(this.trip_time).setHours(0,0,0,0)),this.request_time=this.trip_time,this.addForm.controls.request_time.setValue(this.trip_time)),t){this.max_date=t;let e=new Date(L().add(this.max_date,"minutes").toString()).setHours(23,59,59,999);this.timeFormatConfig2.maxDate=new Date(e),this.timeFormatConfig.maxDate=new Date(e)}this.is_date=!0}setRideType(e){this.selectedTab=e,this.isSchedual_trip=1==e?0:1,this.addForm.controls.ride_type.setValue(e),this.addForm.controls.ride_type.updateValueAndValidity(),2===e&&this.applyRequestTimeMinDate()}onFilterChange(e,t){var i;0==t?this.no_of_passenger=e.id:this.trip_luggage=e.id;const n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.id;this.filterVehicleArray=this.vehicleArray.filter(e=>e.max_capacity>=this.no_of_passenger&&e.max_luggage_capacity>=this.trip_luggage);const o=this.filterVehicleArray.find(e=>(null==e?void 0:e.id)==n)||this.filterVehicleArray[0];if(!o)return this.selectedVehicleObj=null,void(this.selectedVehicleObjName=null);this.changeVehicle(o)}changeVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A;if(this.filterVehicleArray.forEach(t=>{t.id==e.id?(t.final_fare_amount=(null==t?void 0:t.capacity)<this.no_of_passenger?t.final_fare_amount-this.totalExtraPassengerCharge+t.pricing.extra_charge_per_passenger*(this.no_of_passenger-(null==t?void 0:t.capacity)):t.final_fare_amount-this.totalExtraPassengerCharge,t.final_fare_amount=(null==t?void 0:t.vehicle_luggage_capacity)<this.trip_luggage?t.final_fare_amount-this.totalExtraLuggageCharge+t.pricing.extra_charge_per_luggage*(this.trip_luggage-t.vehicle_luggage_capacity):t.final_fare_amount-this.totalExtraLuggageCharge,t.checked=!0):t.checked=!1}),this.selectedVehicleObjName=null,this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.zone_extra_charge=0,this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0,this.selectedVehicleObj=e,this.currentObject=e,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.selectedVehicleObj,this.zone_price_id=null===(n=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.zone_price_model)||void 0===n?void 0:n.zone_price_id,this.zoneData.zone_price_applied=null===(a=null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing)||void 0===a?void 0:a.zone_price_applied,this.startingFrom="Y"==(null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.zone_price_applied)?2==(null===(d=null===(u=null===(s=this.selectedVehicleObj)||void 0===s?void 0:s.pricing)||void 0===u?void 0:u.zone_price_model)||void 0===d?void 0:d.calculation_type):2===(null===(c=this.selectedVehicleObj.pricing)||void 0===c?void 0:c.calculation_type),this.finalFare=null===(h=this.selectedVehicleObj)||void 0===h?void 0:h.final_fare.amount,this.storeOldVehiclePrice=null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.final_fare.amount,this.taxAddition=null===(p=this.selectedVehicleObj)||void 0===p?void 0:p.final_fare.tax_amount,this.zone_extra_charge=(null===(_=null===(m=this.selectedVehicleObj)||void 0===m?void 0:m.final_fare)||void 0===_?void 0:_.zone_extra_charges)?null===(v=null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare)||void 0===v?void 0:v.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge,this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(this.bookingTypeKey)||(this.rentalPackages=null!==(x=null===(b=null===(y=this.selectedVehicleObj)||void 0===y?void 0:y.pricing)||void 0===b?void 0:b.slots)&&void 0!==x?x:[]),["package"].includes(this.bookingTypeKey)&&this.isPackageSlotAmountPricing(null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.pricing)){const e=null===(C=null===(Z=this.rentalPackages)||void 0===Z?void 0:Z.find(e=>{var t;return e.id==(null===(t=this.addForm.value)||void 0===t?void 0:t.packages)}))||void 0===C?void 0:C.slot_amount;if(e){let t=e-this.additionalDiscount;this.package_pricing=t,this.selectedVehicleObj.final_fare.amount=t,this.selectedVehicleObj.final_fare_amount=this.finalFare,this.finalFare=this.selectedVehicleObj.final_fare.amount+this.taxAddition+this.zone_extra_charge+this.calCulateOtherCharges(this.selectedVehicleObj)+this.totalExtraLuggageCharge+this.totalExtraPasse
1ngerCharge+this.extraCharge}}3!==(null===(T=null===(F=this.selectedVehicleObj)||void 0===F?void 0:F.pricing)||void 0===T?void 0:T.calculation_method)?(this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraPassengerCharge(null,!0),this.getExtraLuggageCharge(null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.vehicle_luggage_capacity,null,!0)):this.calculateReturnTrip(),this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?this.store_bike_distance:this.store_ride_distance,this.calCulateOtherCharges2()}calculateReturnTrip(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;this.returnEnable&&(this.returnTripObject=null===(t=null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.pricing)||void 0===t?void 0:t.return_trip_pricing,this.returnFinalFare=(null===(a=null===(o=null===(n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.pricing)||void 0===n?void 0:n.return_trip_pricing)||void 0===o?void 0:o.final_fare)||void 0===a?void 0:a.amount)+(null===(u=null===(s=null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.return_trip_pricing)||void 0===s?void 0:s.final_fare)||void 0===u?void 0:u.tax_amount),this.returnTripDiscount=null===(g=null===(h=null===(c=null===(d=this.selectedVehicleObj)||void 0===d?void 0:d.pricing)||void 0===c?void 0:c.return_trip_pricing)||void 0===h?void 0:h.final_fare)||void 0===g?void 0:g.return_trip_discount,this.totalFInalFare=this.finalFare+(this.returnFinalFare-this.returnTripDiscount)),this.totalFInalFare<0&&(this.totalFInalFare=0)}additionalDiscountChanged(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h;this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0;let g=0;e&&(g=this.totalExtraLuggageCharge+this.totalExtraPassengerCharge);const p=(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)+this.extraCharge+g;this.addForm.value.additional_discount?this.additionalDiscount!==this.addForm.value.additional_discount?(this.finalFare=0,this.finalFare=(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)+this.additionalDiscount,this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(s=null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.final_fare)||void 0===s?void 0:s.amount)-this.additionalDiscount+this.extraCharge+g):(this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(d=null===(u=this.selectedVehicleObj)||void 0===u?void 0:u.final_fare)||void 0===d?void 0:d.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.final_fare)||void 0===h?void 0:h.amount)-this.additionalDiscount+this.extraCharge+g):(this.finalFare=p,this.additionalDiscount=0),this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge+this.tripOtherChargePrice,this.finalFare<0&&(this.finalFare=0),this.calculateReturnTrip()}extraChargeChanged(e=!1){var t,i,n,o;this.finalFare=this.finalFare-this.extraCharge,this.addForm.value.extra_charge?this.extraCharge!==this.addForm.value.extra_charge?(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):this.extraCharge=0,this.finalFare=this.finalFare,e&&this.updateCharge()}updateCharge(){this.totalExtraLuggageCharge&&(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.finalFare=this.finalFare+this.totalExtraLuggageCharge),this.totalExtraPasse
1ngerCharge&&(this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.finalFare=this.finalFare+this.totalExtraPassengerCharge),this.otherChargePrice&&(this.finalFare=this.finalFare-this.otherChargePrice,this.finalFare=this.finalFare+this.otherChargePrice),this.tripOtherChargePrice&&(this.finalFare=this.finalFare-this.tripOtherChargePrice,this.finalFare=this.finalFare+this.tripOtherChargePrice)}getExtraPassengerCharge(e=null,t){var i,n,o,a,r,l;if((null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.capacity)<this.no_of_passenger&&e){this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;let e=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else if(e)this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;else if((null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.capacity)<this.no_of_passenger&&!e&&t){this.totalExtraPassengerCharge=0;let e=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else this.totalExtraPassengerCharge=0}getExtraLuggageCharge(e,t=null,i){e<this.trip_luggage&&t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0):e<this.trip_luggage&&!t&&i?(this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):this.totalExtraLuggageCharge=0}getWayPoints(){var e,t,i=[];const n=this.addForm.get("checkpoints").controls;for(var o=0;o<n.length;o++)n[o].get("value"),i.push({address:n[o].get("value").value,latitude:null===(e=this.selectedCheckpointsArray[o].latitude)||void 0===e?void 0:e.toFixed(6),longitude:null===(t=this.selectedCheckpointsArray[o].longitude)||void 0===t?void 0:t.toFixed(6)});return i}updateQueryParam(){var e,t,i,n,o,a,r,l,s,u,d,c,h=this.getWayPoints();this.queryParam.pickup_location=this.addForm.get("pickup_location").value,this.queryParam.service_type=this.YELOWCAB_SERVICE_TYPE;try{this.queryParam.pickup_latitude=null===(e=this.pickup_latitude)||void 0===e?void 0:e.toFixed(6)}catch(g){this.queryParam.pickup_latitude=this.pickup_latitude}try{this.queryParam.pickup_longitude=null===(t=this.pickup_longitude)||void 0===t?void 0:t.toFixed(6)}catch(g){this.queryParam.pickup_longitude=this.pickup_longitude}if(this.queryParam.dropoff_location=this.addForm.get("destination").value,this.queryParam.dropoff_latitude=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),this.queryParam.dropoff_longitude=null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),this.isSchedual_trip&&(this.queryParam.request_time=this.combinedTimestamp()),h.length>0&&(this.queryParam.way_points=JSON.stringify(h)),this.returnEnable){this.queryParam.is_return_trip=1,this.queryParam.return_request_time=new Date(this.addForm.value.return_time).getTime()/1e3,this.queryParam.return_pickup_location=null===(o=this.addForm.get("return_pickup_location"))||void 0===o?void 0:o.value;try{this.queryParam.return_pickup_latitude=null===(a=this.return_pickup_latitude)||void 0===a?void 0:a.toFixed(6)}catch(g){this.queryParam.return_pickup_latitude=this.return_pickup_latitude}try{this.queryParam.return_pickup_longitude=null===(r=this.return_pickup_longitude)||void 0===r?void 0:r.toFixed(6)}catch(g){this.queryParam.return_pickup_longitude=this.return_pickup_longitude}this.queryParam.return_dropoff_location=null===(l=this.addForm.get("return_destination"))||void 0===l?void 0:l.value,this.queryParam.return_dropoff_latitude=null===(s=this.return_destination_latitude)||void 0===s?void 0:s.toFixed(6),this.queryParam.return_dropoff_longitude=this.return_destination_longitude}else this.queryParam.is_return_trip=0,this.queryParam.return_from_zone_id=null,this.queryParam.return_to_zone_id=null;this.queryParam.no_of_passenger=this.no_of_passenger,this.queryParam.trip_luggage=this.trip_luggage,this.queryParam.from_zone_id=this.zoneData&&this.zoneData.from?this.zoneData.from:null,this.queryParam.to_zone_id=this.zoneData&&this.zoneData.to?this.zoneData.to:null,this.fixZoneDisableDropoff&&(this.queryParam.to_zone_id=-1),this.returnEnable&&(this.queryParam.return_from_zone_id=(null===(u=this.returnzoneData)||void 0===u?void 0:u.from)?this.returnzoneData.from:null,this.queryParam.return_to_zone_id=(null===(d=this.returnzoneData)||void 0===d?void 0:d.to)?this.returnzoneData.to:null),(null===(c=this.addForm.value)||void 0===c?void 0:c.booking_type_id)&&(this.queryParam.booking_type_id=this.addForm.value.booking_type_id)}changeReturn(e){var t=this;return(0,y.Z)(function*(){t.pickup_latitude&&t.pickup_longitude&&t.destination_latitude&&t.destination_longitude?(t.returnEnable=e.target.checked,e.target.checked?(t.initDefaultReturnDateTime(),t.addForm.get("return_time").setValidators([r.kI.required]),t.addForm.get("return_time").updateV
1alueAndValidity(),t.applyReturnLocationSwapToForm(),yield t.resolveReturnZonesAfterLocationSwap(),t.calculateReturnTrip(),t.refreshReturnVehiclePricing()):(t.addForm.get("return_date").setValue(null),t.addForm.get("return_trip_time").setValue(null),t.addForm.get("return_time").setValue(null),t.addForm.get("return_time").clearValidators(),t.addForm.get("return_time").updateValueAndValidity(),t.return_date=null,t.return_trip_time=null,t.return_time=null,t.selectedDate=null,t.clearReturnLocations(),t.calculateReturnTrip())):(t.toasterService.error("Please Select Pickup & Destination Location First!"),e.target.checked=!1)})()}applyReturnLocationSwapToForm(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;const p=this.searchTextDestionation||(null===(e=this.addForm.get("destination"))||void 0===e?void 0:e.value),m=this.searchText||(null===(t=this.addForm.get("pickup_location"))||void 0===t?void 0:t.value);this.addForm.controls.return_pickup_location.setValue(p),this.addForm.controls.return_pickup_latitude.setValue(null!==(o=null===(n=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed)||void 0===n?void 0:n.call(i,6))&&void 0!==o?o:this.destination_latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(l=null===(r=null===(a=this.destination_longitude)||void 0===a?void 0:a.toFixed)||void 0===r?void 0:r.call(a,6))&&void 0!==l?l:this.destination_longitude),this.addForm.controls.return_destination.setValue(m),this.addForm.controls.return_dropoff_latitude.setValue(null!==(d=null===(u=null===(s=this.pickup_latitude)||void 0===s?void 0:s.toFixed)||void 0===u?void 0:u.call(s,6))&&void 0!==d?d:this.pickup_latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(g=null===(h=null===(c=this.pickup_longitude)||void 0===c?void 0:c.toFixed)||void 0===h?void 0:h.call(c,6))&&void 0!==g?g:this.pickup_longitude),this.returnsearchText=p,this.returnsearchTextDestionation=m,this.return_pickup_latitude=this.destination_latitude,this.return_pickup_longitude=this.destination_longitude,this.return_destination_latitude=this.pickup_latitude,this.return_destination_longitude=this.pickup_longitude,this.returnpickupRegionFound=this.dropRegionFound,this.returndropRegionFound=this.pickupRegionFound}resolveReturnZonesAfterLocationSwap(){var e=this;return(0,y.Z)(function*(){e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.returndropRegionFound&&e.return_destination_latitude&&e.return_destination_longitude&&(yield e.updateReturnDestinationZone()),e.returnpickupRegionFound&&e.return_pickup_latitude&&e.return_pickup_longitude&&(yield e.updateReturnPickupZone())})()}clearReturnLocations(){this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.addForm.controls.return_pickup_location.setValue(null),this.addForm.controls.return_pickup_latitude.setValue(null),this.addForm.controls.return_pickup_longitude.setValue(null),this.addForm.controls.return_destination.setValue(null),this.addForm.controls.return_dropoff_latitude.setValue(null),this.addForm.controls.return_dropoff_longitude.setValue(null),this.returnotherDetails=null,this.return_trip_path=null,this.return_bike_path=null,this.returnzoneData.from=null,this.returnzoneData.to=null,this.returnzoneData.from_title=null,this.returnzoneData.to_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.to_obj=null,this.returnzoneData.from_ids=null,this.returnzoneData.to_ids=null}OnSearchReturn(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturn.next(e)}OnSearchReturnDestination(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturnDest.next(e)}returnsearchEvent(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_pickup_location.setValue(e.full_text),this.returnsearchText=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_pickup_latitude=e.latitude,this.return_pickup_longitude=e.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnPickupRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_pickup_latitude=e.data.latitude,this.return_pickup_longitude=e.data.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnPickupRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_pickup_location.setValue(null),this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.returnzoneData.from=null,this.returnzoneData.from_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.from_ids=null)}returnsearchEventDestination(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_destination.setValue(e.full_text),this.returnsearchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_destination_latitude=e.latitude,this.return_destination_longitude=e.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnDropoffRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_destination_latitude=e.data.latitude,this.return_destination_longitude=e.data.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnDropoffRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_destination.setValue(null),this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnzoneData.to=null,this.returnzoneData.to_title=null,this.returnzoneData.to_obj=null,this.returnzoneData.to_ids=null)}
1validateReturnPickupRegion(){if("Y"!==this.checkRegion)this.returnpickupRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_pickup_latitude,this.return_pickup_longitude,(0,C.U)(t.geofence)));this.returnpickupRegionFound=e}this.updateReturnPickupZone()}validateReturnDropoffRegion(){if("Y"!==this.checkRegion)this.returndropRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_destination_latitude,this.return_destination_longitude,(0,C.U)(t.geofence)));this.returndropRegionFound=e}this.updateReturnDestinationZone()}updateReturnPickupZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.return_pickup_latitude&&e.return_pickup_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returnpickupRegionFound||(yield e.zoneUtilityService.findPickupZone(e.return_pickup_latitude,e.return_pickup_longitude,e.zoneResponse,e.returnzoneData,()=>{},()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}updateReturnDestinationZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.return_destination_latitude&&e.return_destination_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returndropRegionFound||(yield e.zoneUtilityService.findDropoffZone(e.return_destination_latitude,e.return_destination_longitude,e.zoneResponse,e.returnzoneData,()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}refreshReturnVehiclePricing(){!this.returnEnable||!this.return_pickup_latitude||!this.return_destination_latitude||(this.updateQueryParam(),this.vehicleTypeApi())}buildReturnBookingObject(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;const _=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.return_trip_pricing,f=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.vehicle_type_category,v=this.returnotherDetails||this.otherDetails,y=2==f?null==v?void 0:v.bike_ride_distance:null==v?void 0:v.ride_distance,b=2==f?null==v?void 0:v.bike_ride_time:null==v?void 0:v.ride_time,x=Object.assign(Object.assign(Object.assign({},null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing),(null==_?void 0:_.pricing)||{}),{return_trip_pricing:_,final_fare:null==_?void 0:_.final_fare});(null===(a=null==_?void 0:_.surge_price)||void 0===a?void 0:a.surgeApplied)&&(x.surge_multiplier=_.surge_price.multiplier,x.surge_flat_amount=_.surge_price.flat_price),x.driver_earning=(this.returnFinalFare||0)-((null===(r=null==_?void 0:_.final_fare)||void 0===r?void 0:r.tax_amount)||0)-(this.walletBalance<0?Math.abs(this.walletBalance):0);const k={pickup_location:null===(l=this.addForm.get("return_pickup_location"))||void 0===l?void 0:l.value,pickup_latitude:Number(this.return_pickup_latitude),pickup_longitude:Number(this.return_pickup_longitude),dropoff_location:null===(s=this.addForm.get("return_destination"))||void 0===s?void 0:s.value,dropoff_latitude:Number(this.return_destination_latitude),dropoff_longitude:Number(this.return_destination_longitude),booking_distance:y,booking_duration:b,calculation_method:null!==(d=null===(u=null==_?void 0:_.pricing)||void 0===u?void 0:u.calculation_method)&&void 0!==d?d:null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.pricing)||void 0===h?void 0:h.calculation_method,fare_details:x,booking_properties:e.booking_properties,flight_info:e.flight_info,booking_amount:Number((this.returnFinalFare-this.returnTripDiscount).toFixed(2)),driver_earning:x.driver_earning,booking_request_time:Number(new Date(this.addForm.value.return_time).getTime()/1e3),is_return_booking:1,agent_id:this.agent_id||null,vehicle_type_id:null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.id,payment_mode:e.payment_mode,payment_mode_id:e.payment_mode_id,payment_status:e.payment_status,no_of_passenger:e.no_of_passenger,way_points:[],payment_type:e.payment_type,booking_type_id:e.booking_type_id,booster_seat:e.booster_seat,child_seat:e.child_seat,gender:e.gender,user_id:e.user_id,is_fixed_price:0};return(this.return_trip_path||this.return_bike_path)&&(k.dispatch_path=2==f?this.return_bike_path:this.return_trip_path),(null===(p=this.returnzoneData)||void 0===p?void 0:p.from)&&(k.return_pickup_zone_id=String(this.returnzoneData.from)),(null===(m=this.returnzoneData)||void 0===m?void 0:m.to)&&(k.return_dropoff_zone_id=String(this.returnzoneData.to)),k.fare_details.final_fare=null==_?void 0:_.final_fare,k}clearVehicleSelectionForSameZoneRestriction(){var e;const t=this;t.vehicleArray=[],t.filterVehicleArray=[],"vehicleTypeArray"in t&&(t.vehicleTypeArray=[]),t.selectedVehicleObj=null,"
1selectedVehicleObjName"in t&&(t.selectedVehicleObjName=null),"rentalPackages"in t&&(t.rentalPackages=[]),"trip_path"in t&&(t.trip_path=null),"bike_path"in t&&(t.bike_path=null),"return_trip_path"in t&&(t.return_trip_path=null),"return_bike_path"in t&&(t.return_bike_path=null),"otherDetails"in t&&(t.otherDetails=null),"returnotherDetails"in t&&(t.returnotherDetails=null),"finalFare"in t&&(t.finalFare=0),"returnFinalFare"in t&&(t.returnFinalFare=0),(null===(e=t.polyline)||void 0===e?void 0:e.setMap)&&(t.polyline.setMap(null),t.polyline=null)}updateSameZoneTripRestriction(){const e=(0,V.b)(this.zoneResponse,this.pickup_latitude,this.pickup_longitude,this.destination_latitude,this.destination_longitude),t=!!e,i=t&&!this.sameZoneTripRestricted;return this.sameZoneTripRestricted=t,t&&(this.clearVehicleSelectionForSameZoneRestriction(),i&&this.toasterService.error(`Trips within ${(null==e?void 0:e.title)||"this zone"} are not allowed`)),t}vehicleTypeApi(){this.updateSameZoneTripRestriction()?this.loadingState=!1:(this.loadingState=!0,this.taxAddition=0,this.zone_extra_charge=0,this.returnTripDiscount=0,this.finalFare=0,this.returnFinalFare=0,this.queryParam.out_of_service_area=this.checkOutofServiceArea?1:null,this.queryParam.vehicle_type_id=null,this.updateQueryParam(),this.disableBtn=!1,this.taxiBookingService.getVehicleList(this.queryParam).subscribe(e=>{var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w,q,D,O,L,M,V,S,E,U,N,I,j,R,z;this.loadingState=!1,e.success||e.status?(this.store_ride_distance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.ride_distance,this.store_bike_distance=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.bike_ride_distance,console.log(this.agentLogin,this.agentMinDistance,this.store_ride_distance),this.agentLogin&&this.agentMinDistance>this.store_ride_distance&&(this.disableBtn=!0,this.toasterService.error((null===(n=this.currentLanguage)||void 0===n?void 0:n.min_distance_error)+" "+this.agentMinDistance+" "+((null===(o=this.currentCompanyDetail)||void 0===o?void 0:o.distance_unit)?"Per "+(null===(a=this.currentCompanyDetail)||void 0===a?void 0:a.distance_unit):"Per Km"))),(null===(r=e.data)||void 0===r?void 0:r.cab_type_list.length)>0?(this.vehicleArray=null===(l=e.data)||void 0===l?void 0:l.cab_type_list.filter(e=>e.hasOwnProperty("pricing")),this.otherDetails={surge_price:e.data.surge_price,ride_time:e.data.ride_time,ride_distance:e.data.ride_distance,tax_list:e.data.tax_list,bike_ride_distance:null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.bike_ride_distance,bike_ride_time:null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.bike_ride_time},this.returnEnable&&(null===(d=e.data)||void 0===d?void 0:d.return_response_data)&&(this.returnotherDetails={surge_price:null===(c=e.data.return_response_data)||void 0===c?void 0:c.surge_price,ride_time:null===(h=e.data.return_response_data)||void 0===h?void 0:h.ride_time,ride_distance:null===(g=e.data.return_response_data)||void 0===g?void 0:g.ride_distance,tax_list:null===(p=e.data.return_response_data)||void 0===p?void 0:p.tax_list,bike_ride_distance:null===(m=e.data.return_response_data)||void 0===m?void 0:m.bike_ride_distance,bike_ride_time:null===(_=e.data.return_response_data)||void 0===_?void 0:_.bike_ride_time},this.return_trip_path=null===(f=e.data.return_response_data)||void 0===f?void 0:f.path,this.return_bike_path=null===(v=e.data.return_response_data)||void 0===v?void 0:v.bike_path),this.vehicleTypeArray.length>0?(this.max_luggage_capacity_filter=0,this.max_capacity_filter=0,this.vehicleArray=this.vehicleArray.map(e=>{e.isCollapsed=!1,this.max_capacity_filter<e.max_capacity&&(this.max_capacity_filter=e.max_capacity),this.max_luggage_capacity_filter<e.max_luggage_capacity&&(this.max_luggage_capacity_filter=e.max_luggage_capacity);const t=this.vehicleTypeArray.find(t=>t.vehicle_type_id==e.id);if(t)return Object.assign(Object.assign({},e),{title:t.vehicle_type_title,vehicle_image:t.vehicle_type_image,max_luggage_capacity:t.max_luggage_capacity,vehicle_type_priority:t.vehicle_type_priority})}
1),this.vehicleArray.forEach(e=>{var t,i,n,o;e&&(e.final_fare_amount=(null===(t=null==e?void 0:e.final_fare)||void 0===t?void 0:t.amount)+(null===(i=null==e?void 0:e.final_fare)||void 0===i?void 0:i.tax_amount)+this.calCulateOtherCharges(e)+((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.zone_extra_charges)?null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.zone_extra_charges:0))}),this.vehicleArray.sort((e,t)=>parseInt(e.vehicle_type_priority)-parseInt(t.vehicle_type_priority)),this.vehicleArray[0].checked=!0,this.selectedVehicleObj=this.vehicleArray[0],this.storeOldVehiclePrice=this.selectedVehicleObj.final_fare.amount,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.zone_price_id=null===(x=null===(b=null===(y=this.selectedVehicleObj)||void 0===y?void 0:y.pricing)||void 0===b?void 0:b.zone_price_model)||void 0===x?void 0:x.zone_price_id,this.zoneData.zone_price_applied=null===(Z=null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.pricing)||void 0===Z?void 0:Z.zone_price_applied,this.finalFare=null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.final_fare.amount,this.taxAddition=null===(F=this.selectedVehicleObj)||void 0===F?void 0:F.final_fare.tax_amount,this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?null===(T=null==e?void 0:e.data)||void 0===T?void 0:T.bike_ride_distance:null===(A=null==e?void 0:e.data)||void 0===A?void 0:A.ride_distance,this.calCulateOtherCharges2(),this.startingFrom="Y"==(null===(w=null===(P=this.vehicleArray[0])||void 0===P?void 0:P.pricing)||void 0===w?void 0:w.zone_price_applied)?2==(null===(O=null===(D=null===(q=this.vehicleArray[0])||void 0===q?void 0:q.pricing)||void 0===D?void 0:D.zone_price_model)||void 0===O?void 0:O.calculation_type):2===(null===(L=this.vehicleArray[0].pricing)||void 0===L?void 0:L.calculation_type),this.finalFare=null===(M=this.selectedVehicleObj)||void 0===M?void 0:M.final_fare.amount,this.taxAddition=null===(V=this.selectedVehicleObj)||void 0===V?void 0:V.final_fare.tax_amount):(this.selectedVehicleObj=null,this.selectedVehicleObjName=null),this.zone_extra_charge=(null===(E=null===(S=this.selectedVehicleObj)||void 0===S?void 0:S.final_fare)||void 0===E?void 0:E.zone_extra_charges)?null===(N=null===(U=this.selectedVehicleObj)||void 0===U?void 0:U.final_fare)||void 0===N?void 0:N.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge):this.vehicleArray=[],this.filterVehicleArray=this.vehicleArray,this.selectedVehicleObj&&(this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(this.bookingTypeKey)||(this.rentalPackages=null!==(R=null===(j=null===(I=this.selectedVehicleObj)||void 0===I?void 0:I.pricing)||void 0===j?void 0:j.slots)&&void 0!==R?R:[])),this.getMaxLuggagePassengerCapacity(),this.getExtraPassengerCharge(null,null),this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraLuggageCharge(null===(z=this.selectedVehicleObj)||void 0===z?void 0:z.vehicle_luggage_capacity,null,null),this.returnEnable&&this.calculateReturnTrip()):this.vehicleArray=[]}))}changeQueuePickup(e){this.pickUpStandForm.patchValue({pickup_location:e.address,pickup_latitude:e.latitude,pickup_longitude:e.longitude}),this.pickup_longitude=Number(e.longitude),this.pickup_latitude=Number(e.latitude),this.addForm.patchValue({pickup_location:e.address})}fixZone(e){this.fixZonePriceData=e}submitZonePricing(){this.zoneData.to=-1,this.searchTextDestionation=this.fixZonePriceData.dropoff_location,this.addForm.patchValue({destination:this.fixZonePriceData.dropoff_location}),this.UpdateDestinationLocation(this.fixZonePriceData.dropoff_latitude,this.fixZonePriceData.dropoff_longitude),$("#fixdestination").modal("hide")}getZoneDetail(e,t){this.yelowBookingService.getPriceZoneById(e).subscribe(e=>{var i;e.status&&(t.zone_price=null===(i=e.data)||void 0===i?void 0:i.title)})}closeFixDestinationPopup(){this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null,this.pickup_latitude=null,this.pickup_longitude=null,this.zoneData.to=null,this.addForm.patchValue({destination:null,pickup_location:null}),$("#ixdestination").modal("hide")}pickUpStandFormSubmit(){this.selectQueuePickup=!0,$("#QueuePikupstand").modal("hide")}submitFirstForm(e,t){var i,n,o,a,r,l,s,u,d,c,h;
1if(!this.updateSameZoneTripRestriction()){if(this.isBookingHold)return void swal.fire({text:(null===(i=this.currentLanguage)||void 0===i?void 0:i.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);if(this.returnEnable){this.syncReturnDateTime();const e=null===(n=this.addForm.get("request_time"))||void 0===n?void 0:n.value,t=null===(o=this.addForm.get("trip_time"))||void 0===o?void 0:o.value,i=new Date("string"==typeof e?e:(null===(a=null==e?void 0:e.toISOString)||void 0===a?void 0:a.call(e))||e),u=new Date("string"==typeof t?t:(null===(r=null==t?void 0:t.toISOString)||void 0===r?void 0:r.call(t))||t),d=new Date(i.getFullYear(),i.getMonth(),i.getDate(),u.getHours(),u.getMinutes(),u.getSeconds());if(new Date(null===(s=null===(l=this.addForm)||void 0===l?void 0:l.value)||void 0===s?void 0:s.return_time)<d)return void this.toasterService.error("Return time should be greater than request time")}if(this.queuePikupStandList.length>0&&!this.fixZoneDisableDropoff&&this.isFirstPart)this.selectQueuePickup=!1,$("#QueuePikupstand").modal("show");else if(this.isFirstPart&&(this.formSubmited=!0,this.submitFirstPart=!0,this.generateErrors(e),this.pickup_latitude&&this.pickup_longitude)){const t=null===(u=this.addForm.get("request_time"))||void 0===u?void 0:u.value,i=null===(d=this.addForm.get("trip_time"))||void 0===d?void 0:d.value,n=new Date("string"==typeof t?t:(null===(c=null==t?void 0:t.toISOString)||void 0===c?void 0:c.call(t))||t),o=new Date("string"==typeof i?i:(null===(h=null==i?void 0:i.toISOString)||void 0===h?void 0:h.call(i))||i),a=new Date(n.getFullYear(),n.getMonth(),n.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()),r=new Date;r.setHours(0,0,0,0);let l=new Date(r.getTime()+6e4*this.max_date);if(l.setHours(0,0,0,0),n.setHours(0,0,0,0),2==this.selectedTab){if(!this.validateRequestTimeCutOff(a))return;if(n<r)return void this.toasterService.error("Please select a minimum date: today");if(n>l)return void this.toasterService.error(`Trip date must be between today and the next ${this.max_date/1440} days.`);if(n.getTime()===r.getTime()&&a.getTime()<(new Date).getTime())return void this.toasterService.error("Trip time must be greater than current time.");e.valid&&(this.bindMarkerPoints(),this.getproperties(e))}else e.valid&&(this.bindMarkerPoints(),this.getproperties(e))}this.firstFormNextButtonClick=!0}}submitSecondForm(e){var t;this.isBookingHold?swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop):(this.formSubmited=!0,this.isDocumentUploading?this.toasterService.error("Please wait for document upload to complete"):(this.generateErrors(this.addForm),e.valid&&(this.displaySecondForm=!1,this.displayThirdForm=!0,this.vehicleTypeApi())))}getproperties(e){var t,i,n,o,a,r,l,s;if((null===(t=null==this?void 0:this.zoneData)||void 0===t?void 0:t.from_obj)&&this.zoneData.from_obj.property_list||(null===(i=this.zoneData)||void 0===i?void 0:i.to_obj)&&this.zoneData.to_obj.property_list||this.tripPropertiesIds){this.zoneIds=[],this.zonePropertiesIds=[],(null===(o=null===(n=this.zoneData)||void 0===n?void 0:n.from_obj)||void 0===o?void 0:o.property_list)&&(this.zonePropertiesIds=this.zonePropertiesIds.concat(this.zoneData.from_obj.property_list.split(","))),(null===(r=null===(a=this.zoneData)||void 0===a?void 0:a.to_obj)||void 0===r?void 0:r.property_list)&&this.zoneData.to_obj.property_list.split(",").forEach(e=>{var t,i;(null===(t=this.zoneData)||void 0===t?void 0:t.from)==(null===(i=this.zoneData)||void 0===i?void 0:i.to)?this.zonePropertiesIds.push(e):this.zonePropertiesIds.includes(e)?this.zoneIds.push(e):this.zonePropertiesIds.push(e)});let t=this.resetPropertyControl();if(2!=(null===(l=this.zoneData.from_obj)||void 0===l?void 0:l.zone_type)&&1!=(null===(s=this.zoneData.to_obj)||void 0===s?void 0:s.zone_type)||(this.zonePropertiesIds=[]),this.zonePropertiesIds.length>0||this.zoneIds.length>0||this.tripPropertiesIds.length){let i=[];this.zonePropertiesIds.length>0&&(i=i.concat(this.zonePropertiesIds)),this.zoneIds.length>0&&(i=i.concat(this.zoneIds)),this.tripPropertiesIds.length&&(i=i.concat(this.tripPropertiesIds)),this.getExtraFields(t,i.join(","),e)}else this.nevigateToDraw(e)}else this.bindMarkerPoints()}nevigateToDraw(e){this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThird
1Form=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1}getExtraFields(e,t,i){const n={company_id:this.company_id,property_type_list:t,is_active:1,user_type:"0,3"};this.loadingState=!0,this.yelowBookingService.getExtraFields(n).subscribe(t=>{if(t.status&&t.data.length){t.data.sort((e,t)=>t.is_mandatory-e.is_mandatory),t.data;const i=["booster_seat","child_seat","flight_number"];t.data.forEach(t=>{(this.booking_type_id==t.category_id||null==t.category_id)&&(i.includes(null==t?void 0:t.field_key)||e.push(this.propertyRow(t)))}),0==e.length?(this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,["hourly","package"].includes(this.bookingTypeKey)&&this.validationForRental()):(this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1),this.loadingState=!1}else this.nevigateToDraw(i)})}resetPropertyControl(){let e=this.addForm.get("properties"),t=e.length;for(let i=0;i<t;i++)e.removeAt(0);return this.documentFileNames={},this.documentUploadLoading={},this.isDocumentUploading=!1,e}getAllTripProperties(){this.yelowBookingService.getExtraFields({company_id:this.company_id,property_type:2,is_active:1,service_type:this.YELOWCAB_SERVICE_TYPE,user_type:"0,3"}).subscribe(e=>{var t;e.status&&(null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>{var t;e.company_extra_field_id&&(null===(t=this.tripPropertiesIds)||void 0===t||t.push(e.company_extra_field_id))}))})}propertyRow(e){var t;let i=[];return(null===(t=null==e?void 0:e.config_json)||void 0===t?void 0:t.length)>0&&(null==e||e.config_json.forEach(e=>{i.push({label:e.title,value:e.title})})),new r.cw({label:new r.NI(e.field_title),value:new r.NI(5==e.field_type?0:null,r.kI.compose(e.is_mandatory?[r.kI.required]:[])),is_mandatory:new r.NI(e.is_mandatory),field_type:new r.NI(e.field_type),options:new r.NI(i),field_description:new r.NI(e.field_description),id:new r.NI(e.company_extra_field_id),file_name:new r.NI(null)})}updateDocumentUploadingState(){this.isDocumentUploading=Object.values(this.documentUploadLoading).some(e=>e)}documentFileChangeEvent(e,t){var i,n,o;const a=null===(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.files)||void 0===n?void 0:n[0];if(!a)return;if(a.size>this.DOCUMENT_MAX_FILE_SIZE)return swal.fire("Invalid File Size!","Please upload a file less than 21MB","error"),void this.clearDocumentInput(e);const r=this.addForm.get("properties"),l=a.name;null===(o=r.at(t).get("file_name"))||void 0===o||o.setValue(l),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l}),this.documentUploadLoading[t]=!0,this.updateDocumentUploadingState();const s=new FormData;s.append("file",a),this.authService.uploadImageGetUrl(s).subscribe(i=>{var n,o,a,s,u,d,c;if(this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),(null==i?void 0:i.status)&&(null==i?void 0:i.data)){const e="string"==typeof i.data?i.data:(null===(n=i.data)||void 0===n?void 0:n.url)||(null===(o=i.data)||void 0===o?void 0:o.file_url)||(null===(a=i.data)||void 0===a?void 0:a.image)||i.data;null===(s=r.at(t).get("value"))||void 0===s||s.setValue(e),null===(u=r.at(t).get("file_name"))||void 0===u||u.setValue(l),null===(d=r.at(t).get("value"))||void 0===d||d.markAsDirty(),null===(c=r.at(t).get("value"))||void 0===c||c.updateValueAndValidity(),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l})}else this.toasterService.error((null==i?void 0:i.message)||"File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)},()=>{this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),this.toasterService.error("File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)})}removeDocumentFile(e,t){this.clearDocumentValue(e),t&&(t.value="")}clearDocumentValue(e){var t,i,n,o,a,r;const l=this.addForm.get("properties");null===(i=null===(t=l.at(e))||void 0===t?void 0:t.get("value"))||void 0===i||i.setValue(null),null===(o=null===(n=l.at(e))||void 0===n?void 0:n.get("file_name"))||void 0===o||o.setValue(null),null===(r=null===(a=l.at(e))||void 0===a?void 0:a.get("value"))||void 0===r||r.updateValueAndValidity();const s=Object.assign({},this.documentFileNames);delete s[e],this.documentFileNames=s}clearDocumentInput(e){(null==e?void 0:e.target)?e.target.value="":e&&(e.value="")}mapBookingProperty(e){const t={label:e.label,value:e.field_type===this.DATE_FIELD&&(null==e?void 0:e.value)?new Date(null==e?void 0:e.value[0]).getTime():e.value,field_type:e.field_type,id:e.id};return(null==e?void 0:e.field_type)===this.DOCUMENT_FIELD&&(t.file_name=e.file_name||""),t}toggleCollapse(e){var t,i,n,o;let a=this.filterVehicleArray.find(t=>(null==t?void 0:t.id)==e.id);a&&(a.isCollapsed=!a.isCollapsed),(null===(i=null===(t=null==a?void 0:a.pricing)||void 0===t?void 0:t.zone_price_model)||void 0===i?void 0:i.zone_price_id)&&this.getZoneDetail(null===(o=null===(n=null==a?void 0:a.pricing)||void 0===n?void 0:n.zone_price_model)||void 0===o?void 0:o.zone_price_id,a)}getVehicleType(e){this.taxiBookingService.getVehicleType(e).subscribe(e=>{var t;this.vehicleTypeArray=e.status?null===(t=e.data)||void 0===t?void 0:t.list:[]})}goToLoginScreen(){this.formSubmited=!0,this.generateErrors(this.addForm),this.addForm.valid&&(this.formSubmited=!1,this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.calCulateOtherCharges2
1(),this.displayLoginForm=!0,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1)}isDynamicCalculationCharge(e){return(0,S.Mf)(e)}getOtherChargeBreakdownLabel(e){return(0,S.$v)(e)}incrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=(Number(e.currentValue)||0)+1;e.currentValue=t,this.otherChargesArray=(this.otherChargesArray||[]).map(i=>{var n;return(null==i?void 0:i.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(i.currentValue=t,i.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[i.charges_key])&&(this.otherChargArray[i.charges_key].currentValue=t)),Object.assign({},i)}),this.refreshOtherChargesFare()}decrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=Number(e.currentValue)||0,i=t>1?t-1:1;e.currentValue=i,this.otherChargesArray=(this.otherChargesArray||[]).map(t=>{var n;return(null==t?void 0:t.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(t.currentValue=i,t.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[t.charges_key])&&(this.otherChargArray[t.charges_key].currentValue=i)),Object.assign({},t)}),this.refreshOtherChargesFare()}refreshOtherChargesFare(){!this.selectedVehicleObj||(this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.calCulateOtherCharges2())}calCulateOtherCharges(e){let t=0;return this.selectedOtherChargesArray=this.otherChargesArray.filter(i=>{var n,o,a;if((i.checked||i.is_required)&&"booster_seat"==i.charges_key){if(1==i.charge_type){const o=i.charge_value*this.addForm.controls.booster_seat.value/100*((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*this.addForm.controls.booster_seat.value,i.charges=i.charge_value*this.addForm.controls.booster_seat.value);return!0}if((i.checked||i.is_required)&&"child_seat"==i.charges_key){if(1==i.charge_type){const n=i.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.amount)||0);t+=n,i.charges=n}else 2==i.charge_type?(t+=i.charge_value*this.addForm.controls.child_seat.value,i.charges=i.charge_value*this.addForm.controls.child_seat.value):3==i.charge_type&&(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance));return!0}if(i.checked||i.is_required){const n=(0,S.MV)(i);if(1==i.charge_type){const o=i.charge_value*n/100*((null===(a=null==e?void 0:e.final_fare)||void 0===a?void 0:a.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*n,i.charges=i.charge_value*n);return!0}return!1}),t}calCulateOtherCharges2(){this.otherChargePrice=0,this.selectedOtherChargesArray=this.otherChargesArray.filter(e=>{var t,i,n,o,a,r;if((e.checked||e.is_required)&&"booster_seat"==e.charges_key){if(1==e.charge_type){const n=e.charge_value*this.addForm.controls.booster_seat.value/100*((null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)||0);this.otherChargePrice+=n,e.charges=n}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*this.addForm.controls.booster_seat.value,e.charges=e.charge_value*this.addForm.controls.booster_seat.value);return!0}if((e.checked||e.is_required)&&"child_seat"==e.charges_key){if(1==e.charge_type){const t=e.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)||0);this.otherChargePrice+=t,e.charges=t}else 2==e.charge_type?(this.otherChargePrice+=e.charge_value*this.addForm.controls.child_seat.value,e.charges=e.charge_value*this.addForm.controls.child_seat.value):3==e.charge_type&&(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance);return!0}if(e.checked||e.is_required){const t=(0,S.MV)(e);if(1==e.charge_type){const i=e.charge_value*t/100*((null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)||0);this.otherChargePrice+=i,e.charges=i}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*t,e.charges=e.charge_value*t);return!0}return!1}),this.finalFare=this.finalFare+this.otherChargePrice}onDateChange(e,t){var i;null===(i=this.addForm.get("properties").at(t).get("value"))||void 0===i||i.setValue(e[0])}showLoginSingUpPage(e){this.selectedButtonSingAUpLogin=e,1870!==Number(this.company_id)?(null==e?void 0:e.bookRide)&&1==this.addForm.controls.paymentMode.value||2==this.pre_payment_value?this.bookRide(!0):null==(null==e?void 0:e.button_id)&&1==(null==e?void 0:e.bookRide)&&2==this.addForm.controls.paymentMode.value&&this.openPaymentGateway(!0):this.openPaymentGateway(!0)}openPaymentGateway(e){const t=(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id);this.pre_payment&&!t&&(this.callApi=!1,this.bookRide(),this.loadingState=!1),this.showPaymetScreen=e,this.displayPaymentForm=!0,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.displayThankYouForm=!1}afterPaymentSucsess(e){this.pre_payment||(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id)?(this.loadingState=!1,this.displayThannkYouScreen()):e&&!this.pre_payment&&this.bookRide(!0)}onStripeRequestBooking(){this.bookRide()}bookRide(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T;if(this.isBookingHold)swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);else if(this.generateErrors(this.addForm),this.addForm.valid){$("#properties").modal("hide"),this.loadingState=!0;var P=this.getWayPoints(),w={pickup_location:this.addForm.get("pickup_location").value,vehicle_type_id:this.selectedVehicleObj.id,dropoff_latitude:null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),dropoff_longitude:null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),payment_mode:this.addForm.get("paymentMode").value,payment_mode_id:this.addForm.get("payment_mode_id").value,
1no_of_passenger:this.addForm.get("no_of_passenger").value,booking_distance:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_distance:this.otherDetails.ride_distance,booking_duration:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_time:this.otherDetails.ride_time,calculation_method:null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing.calculation_method,way_points:P,transaction_detail:void 0,luggage:this.addForm.get("trip_luggage").value,fare_details:this.selectedVehicleObj.pricing,payment_type:(0,A.bQ)(null!==(a=this.channelPaymentType)&&void 0!==a?a:this.pre_payment_value),payment_status:"pending"};const t=this.buildBookingAssetsPayload();t.length&&(w.booking_assets=t);let D={flight:{iata:this.addForm.get("flight_number").value}};w.flight_info=this.selectedFlightObj?this.selectedFlightObj:this.addForm.get("flight_number").value?D:null,this.isSchedual_trip?(w.booking_request_time=this.combinedTimestamp(),w.is_scheduled=1):w.is_scheduled=0,w.flight_number=null===(r=this.addForm.value)||void 0===r?void 0:r.flight_number,((null===(l=this.addForm.value)||void 0===l?void 0:l.booster_seat)||0==this.addForm.value.booster_seat)&&(w.booster_seat=null===(u=null===(s=this.addForm.value)||void 0===s?void 0:s.booster_seat)||void 0===u?void 0:u.toString()),((null===(d=this.addForm.value)||void 0===d?void 0:d.child_seat)||0==this.addForm.value.child_seat)&&(w.child_seat=null===(h=null===(c=this.addForm.value)||void 0===c?void 0:c.child_seat)||void 0===h?void 0:h.toString()),(null===(g=this.addForm.value)||void 0===g?void 0:g.booking_type_id)&&(w.booking_type_id=null===(p=this.addForm.value)||void 0===p?void 0:p.booking_type_id);let O=[];(null===(m=this.selectedOtherChargesArray)||void 0===m?void 0:m.length)&&(O=O.concat(this.selectedOtherChargesArray)),O.length&&(w.fare_details.addon=O),w.booking_properties=JSON.stringify(this.addForm.value.properties.map(e=>this.mapBookingProperty(e))),this.walletBalance<0&&this.finalFare?(w.booking_amount=Number(this.finalFare.toFixed(2)-this.walletBalance),w.wallet_id=null,w.fare_details=Object.assign(Object.assign({},this.selectedVehicleObj.pricing),{previous_dues:Math.abs(this.walletBalance),final_fare:null===(_=this.selectedVehicleObj)||void 0===_?void 0:_.final_fare})):w.booking_amount=Number(this.finalFare.toFixed(2)),w.fare_details.driver_earning=(this.finalFare.toFixed(2)||0)-((null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare.tax_amount)||0)-(this.walletBalance||0),(null===(v=this.addForm.value)||void 0===v?void 0:v.hour)&&(w.fare_details.no_of_hours=null===(y=this.addForm.value)||void 0===y?void 0:y.hour),(null===(b=this.addForm.value)||void 0===b?void 0:b.package)&&(w.fare_details.package_type_id=null===(x=this.addForm.value)||void 0===x?void 0:x.packages),("Y"===this.checkGenderEnable||"y"==this.checkGenderEnable)&&(w.gender=this.genderValue),this.selectedVehicleObj.surge_price.surgeApplied&&(w.fare_details.surge_multiplier=this.selectedVehicleObj.surge_price.multiplier,w.fare_details.surge_flat_amount=this.selectedVehicleObj.surge_price.flat_price),w.fare_details.final_fare=null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.final_fare,(null===(Z=this.currentUserDetail)||void 0===Z?void 0:Z.id)&&(w.user_id=null===(C=this.currentUserDetail)||void 0===C?void 0:C.id),this.queueId&&(w.queue_id=this.queueId),this.addForm.get("destination").value&&(w.dropoff_location=this.addForm.get("destination").value),this.zoneData&&this.zoneData.to&&(w.dropoff_zone_id=this.zoneData.to.toString()),this.zoneData&&this.zoneData.from&&(w.pickup_zone_id=this.zoneData.from);try{w.pickup_latitude=null===(F=this.pickup_latitude)||void 0===F?void 0:F.toFixed(6)}catch(q){w.pickup_latitude=this.pickup_latitude}try{w.pickup_longitude=null===(T=this.pickup_longitude)||void 0===T?void 0:T.toFixed(6)}catch(q){w.pickup_longitude=this.pickup_longitude}if(this.returnEnable&&(w.is_return_booking=1,w.return_booking=this.buildReturnBookingObject(w)),3===(null==w?void 0:w.payment_mode)&&(w.payment_mode=2),!this.autoDispatch&&this.addForm.get("driver").value&&(w.driver_id=this.addForm.get("driver").value),this.addForm.valid&&!this.Customer_id){let e={};e.first_name=this.addForm.get("first_name").value?this.addForm.get("first_name").value:"",e.last_name=this.addForm.get("last_name").value?this.addForm.get("last_name").value:"",e.phone_no=this.addForm.get("phone_no").value?this.addForm.get("phone_no").value.toString():"",e.dial_code=this.addForm.get("dial_co
1de").value?this.addForm.get("dial_code").value:this.dialCode,this.addForm.get("email").value&&(e.email=this.addForm.get("email").value),w.passenger_details=e}w.is_fixed_price=0,this.pre_payment&&"pending"==this.addForm.get("paymentStatus").value&&2==this.addForm.get("paymentMode").value&&(w.booking_status=16),this.agent_id&&(w.agent_id=this.agent_id),2!==this.selectedTab||2===this.selectedTab&&w.booking_request_time>(new Date).getTime()/1e3?3!==this.selectedTab?"N"===this.corporateBookingConfirmation?this.yelowCabService.bookRide(w).subscribe(t=>{this.loadingState=!1,t.success||t.status?(this.tripPayload=w,this.trip_number=t.data.booking_number,this.tripId=t.data.booking_id,this.content="Successfully Booked",e&&this.displayThannkYouScreen()):this.toasterService.error(null==t?void 0:t.message)}):this.yelowCabService.bookRide(w).subscribe(e=>{this.loadingState=!1,e.success||e.status?(this.tripPayload=w,this.trip_number=e.data.booking_number,this.tripId=e.data.booking_id,this.content="Wait for confirmation"):this.toasterService.error(null==e?void 0:e.message)}):this.bookRecuringRide(this.tripPayload):(this.loadingState=!1,this.toasterService.error("Please select valid scheduled time"))}}displayThannkYouScreen(){var e;(0,P.nb)(this.company_id||(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id),this.trip_number)||(this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!0,this.showPaymetScreen=!1)}combinedTimestamp(){return new Date(this.selectedRequestTime).getTime()/1e3}bookRecuringRide(e){e.recurring_type=this.addForm.controls.recurring_type.value,e.recurring_time=new Date(this.addForm.controls.recurring_time.value).getTime()/1e3,e.end_date=new Date(this.addForm.controls.end_date.value).getTime()/1e3,2==this.addForm.controls.recurring_type.value&&(e.recurring_on=this.addForm.controls.recurring_on.value),this.yelowBookingService.bookRicurringRide(e).subscribe(e=>{var t;if(this.loadingState=!1,e.success||e.status){if(this.trip_number=e.data.booking_number,(0,P.nb)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id),this.trip_number))return;this.yelowBookingService.tripNoSubject.next({trip_number:this.trip_number,content:"Successfully Booked"}),this.ViewUpdate("thankyou")}else this.toasterService.error(null==e?void 0:e.message)},e=>{this.loadingState=!1})}ViewUpdate(e=!1){location.reload(),e&&(this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1),this.addForm.get("properties").clear(),this.addForm.reset(),this.selectQueuePickup=!1,this.addForm.get("checkpoints").clear(),this.addForm.get("properties").clear(),this.trip_luggage=0,this.no_of_passenger=1,this.addForm.patchValue({no_of_passenger:this.no_of_passenger,trip_luggage:this.trip_luggage,ride_type:1,pickup_location:null,destination:null,request_time:null,auto_dispatch:!0,gender:"M"}),this.searchText=null,this.selectedPickupRegionData=null,this.searchTextDestionation=null,this.responseDataDestionation=null,this.responseDatacheckPoint=null,this.responseData=null,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.selectedTab=1,this.request_time=null,this.autoDispatch=!0,this.Customer_id=null,this.genderTab="M",this.genderValue="M",this.getWayPoint=[],this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.marker&&(this.marker=[]),this.isFirstPart=!0,this.finalFare=0,this.walletBalance=0,this.addForm.get("notes").clearValidators(),this.bookingAssetsList=[],this.corporateBookingConfirmation="N",this.booking_type_id=null,this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.selectedFlightObj=null,this.responseFlight=[],this.trip_time=null,this.selectedButtonSingAUpLogin={button_id:1}
1,this.createForm(),this.getSeduleConfige(),this.jwtService.destroyAgentId(),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:null},queryParamsHandling:"merge",replaceUrl:!0}),this.patchDefaultUserLocation(),this.cd.detectChanges()}applyPaymentModeConfig(){var e;(null===(e=this.allPaymentModes)||void 0===e?void 0:e.length)?this.zoneConfigActive||(this.paymentMode=this.allPaymentModes,this.paymentMode.length>0?this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)):this.company_id&&this.toasterService.error("Please setup payment Mode!")):this.paymentMode=[]}resolveDefaultPaymentMode(e){return 1870===Number(this.company_id)&&e.find(e=>2===Number(null==e?void 0:e.payment_mode_key))||e[0]}getPaymentConfig(){const e=(0,A.QZ)(this.company_id);this.yelowCabService.getPaymentConfigList(e).subscribe(e=>{var t,i;e.status&&(this.allPaymentModes=(0,A.w6)(null===(t=e.data)||void 0===t?void 0:t.list,this.company_id),console.warn(">>allPaymentModes",this.allPaymentModes),this.applyPaymentModeConfig(),(null===(i=this.pendingZoneConfigs)||void 0===i?void 0:i.length)&&(this.applyZoneBookingOptions(this.pendingZoneConfigs,this.activeZoneId),this.pendingZoneConfigs=null))})}loadZoneConfigurationForPickup(e){e?(e=e.split(",")[0],(this.activeZoneId!==e||!this.zoneConfigActive)&&(this.activeZoneId=e,this.yelowCabService.getZoneConfiguration({zone_id:e,page:0}).subscribe(t=>{const i=this.normalizeZoneConfigList(null==t?void 0:t.data);((null==t?void 0:t.status)||(null==t?void 0:t.success))&&i.length?this.allPaymentModes.length?(this.applyZoneBookingOptions(i,e),this.pendingZoneConfigs=null):this.pendingZoneConfigs=i:this.resetZoneBookingOptions()},()=>this.resetZoneBookingOptions()))):this.resetZoneBookingOptions()}normalizeZoneConfigList(e){return Array.isArray(e)?e:Array.isArray(null==e?void 0:e.list)?e.list:[]}applyZoneBookingOptions(e,t){const i=[],n=[];let o=null;if(e.forEach(e=>{if(!(null==e?void 0:e.config_key)||null==e.config_value||""===e.config_value)return;const t=String(e.config_value);switch(e.config_key){case"payment_mode":i.push(t);break;case"request_mode":n.push(t);break;case"cut_off_time":o=t}}),this.zoneConfigActive=!0,this.activeZoneId=t,this.lastAppliedZoneConfigs=e,i.length&&this.allPaymentModes.length){const e=this.allPaymentModes.filter(e=>i.includes(String(e.id)));e.length&&(this.paymentMode=e,this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)))}
1const a={1:{type_id:1,type_name:"Now"},2:{type_id:2,type_name:"Later"}};if(n.length){const e=n.map(e=>a[e]).filter(Boolean);e.length&&(this.rideType=e,this.setRideType(this.rideType[0].type_id))}if(o){const e=this.resolveCutOffMinutes(o);e>0&&this.applyZoneCutOffMinutes(e)}this.cd.detectChanges()}resolveCutOffMinutes(e){const t=Number(e);return!Number.isNaN(t)&&t>0?t:0}applyZoneCutOffMinutes(e){!e||Number.isNaN(e)||e<=0?this.zoneCutOffMinutes=null:(this.zoneCutOffMinutes=e,this.applyRequestTimeMinDate())}getEffectiveRequestMinDate(){const e=new Date;return e.setSeconds(0,0),this.zoneCutOffMinutes>0?new Date(e.getTime()+6e4*this.zoneCutOffMinutes):new Date(e)}applyRequestTimeMinDate(){var e,t,i,n;const o=this.getEffectiveRequestMinDate();this.requestTimeMinDate=o;const a=new Date(o);if(a.setHours(0,0,0,0),this.timeFormatConfig2.minDate=a,this.timeFormatConfig.minDate=o,this.is_date=!0,2===this.selectedTab){const a=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.controls.request_time)||void 0===t?void 0:t.value,r=null===(n=null===(i=this.addForm)||void 0===i?void 0:i.controls.trip_time)||void 0===n?void 0:n.value,l=a?new Date(a):null,s=r?new Date(r):null;let u=0;l&&s&&!Number.isNaN(l.getTime())&&!Number.isNaN(s.getTime())&&(u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()).getTime()),(!u||u<o.getTime())&&(this.request_time=new Date(o),this.trip_time=new Date(o),this.addForm.controls.request_time.setValue(this.request_time),this.addForm.controls.trip_time.setValue(this.trip_time))}}validateRequestTimeCutOff(e){if(2!==this.selectedTab)return!0;const t=this.getEffectiveRequestMinDate(),i=e||new Date(this.selectedRequestTime||this.addForm.value.request_time);if(Number.isNaN(i.getTime())||i.getTime()<t.getTime()){const e=this.zoneCutOffMinutes?`Trip must be scheduled at least ${this.zoneCutOffMinutes} minutes from now`:`Please schedule the trip after ${t.toLocaleString()}`;return this.toasterService.error(e),!1}return!0}clearZoneCutOffMinutes(){this.zoneCutOffMinutes=null,this.requestTimeMinDate=null}resetZoneBookingOptions(){var e;if(!this.zoneConfigActive)return this.activeZoneId=null,void(this.pendingZoneConfigs=null);this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.clearZoneCutOffMinutes(),this.allPaymentModes.length&&this.applyPaymentModeConfig(),this.allRideTypes.length?(this.rideType=[...this.allRideTypes],this.setRideType((null===(e=this.rideType[0])||void 0===e?void 0:e.type_id)||1)):this.getSeduleConfige(!1),this.cd.detectChanges()}setPaymentMode(e){const t=e&&"object"==typeof e?e:this.paymentMode.find(t=>(null==t?void 0:t.id)==e);this.addForm.controls.payment_mode_id.setValue(null==t?void 0:t.id),this.addForm.controls.payment_mode_id.updateValueAndValidity(),this.addForm.controls.paymentMode.setValue(null==t?void 0:t.payment_mode_key),this.addForm.controls.paymentMode.updateValueAndValidity(),this.applyPaymentTypeFromSelectedMode(t)}applyPaymentTypeFromSelectedMode(e){if(!(0,A.kB)(this.company_id)){if(null==e?void 0:e.payment_type){const t=(0,A.L3)(e.payment_type);this.pre_payment_value=t.prePaymentValue,this.pre_payment=t.prePayment,this.channelPaymentType=t.paymentType,this.channelPaymentTypeLabel=t.paymentTypeLabel}this.loadPaymentRulePolicy(null==e?void 0:e.id)}}loadPaymentRulePolicy(e){!e||(0,A.kB)(this.company_id)||this.yelowCabService.getPaymentRulePolicy({booking_channel:A.fj,payment_method:e}).subscribe(e=>{if(!(null==e?void 0:e.status)&&!(null==e?void 0:e.success)||!(null==e?void 0:e.data))return;const t=(0,A.$I)(e.data);if(!t)return;const i=(0,A.L3)(t);this.pre_payment_value=i.prePaymentValue,this.pre_payment=i.prePayment,this.channelPaymentType=i.paymentType,this.channelPaymentTypeLabel=i.paymentTypeLabel,this.cd.detectChanges()},()=>{})}displayFirstScreen(e=!1){e&&this.resetPropertyControl(),this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displaySecondScreen(){this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!0,this.displayThird
1Form=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displayThirdScreen(){this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayThankYouForm=!1,this.isFirstPart=!0}getResolvedHourlyPackagePricing(e){var t,i,n,o;if(!e)return{minHours:null,maxHours:null,hourlyRate:null,slots:null};const a="Y"===e.zone_price_applied?e.zone_price_model:null;if(a){const r=null!==(t=a.slots)&&void 0!==t?t:e.slots;return{minHours:this.coerceFiniteNumber(null!==(i=a.min_hours)&&void 0!==i?i:e.min_hours),maxHours:this.coerceFiniteNumber(null!==(n=a.max_hours)&&void 0!==n?n:e.max_hours),hourlyRate:this.coerceFiniteNumber(null!==(o=a.hourly_rate)&&void 0!==o?o:e.hourly_rate),slots:Array.isArray(r)?r:null}}const r=e.slots;return{minHours:this.coerceFiniteNumber(e.min_hours),maxHours:this.coerceFiniteNumber(e.max_hours),hourlyRate:this.coerceFiniteNumber(e.hourly_rate),slots:Array.isArray(r)?r:null}}getResolvedHourlyRate(e){var t;const i=null===(t=this.getResolvedHourlyPackagePricing(e))||void 0===t?void 0:t.hourlyRate;if(null!=i)return i;const n=Number(null==e?void 0:e.hourly_rate);return Number.isFinite(n)?n:0}getResolvedPriceType(e){var t;if(!e)return null;const i=e.zone_price_model,n=null==i||"object"!=typeof i||Array.isArray(i)||null===(t=i.price_type)||void 0===t?e.price_type:t,o=Number(n);return Number.isFinite(o)?o:null}isHourlyRateTimesHoursPricing(e){return 5===this.getResolvedPriceType(e)}isPackageSlotAmountPricing(e){return 4===this.getResolvedPriceType(e)}getSlotAmountForPackageSelection(e,t){var i;if(!this.isPackageSlotAmountPricing(e)||null==t)return null;const n=null===(i=this.getResolvedHourlyPackagePricing(e))||void 0===i?void 0:i.slots;if(!Array.isArray(n))return null;const o=n.find(e=>e.id==t);if(!o||null==o.slot_amount)return null;const a=Number(o.slot_amount);return Number.isFinite(a)?a:null}hourlyPackageCardDisplay(e){var t,i;const n=this.getResolvedHourlyPackagePricing(null==e?void 0:e.pricing);return{minHours:null!==(t=n.minHours)&&void 0!==t?t:0,hourlyRate:null!==(i=n.hourlyRate)&&void 0!==i?i:0}}coerceFiniteNumber(e){if(null==e||""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}syncRentalHourlyOptionsFromVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;if(!(null==e?void 0:e.pricing)||!["hourly","package"].includes(this.bookingTypeKey))return;const _=this.getResolvedHourlyPackagePricing(e.pricing);if("hourly"===this.bookingTypeKey){let e=null!==(t=_.minHours)&&void 0!==t?t:1,s=null!==(i=_.maxHours)&&void 0!==i?i:24;if(s<e){const t=e;e=s,s=t}s=Math.min(s,168),this.hoursArray=[];for(let t=e;t<=s;t++)this.hoursArray.push({name:`${t} hrs`,value:t});const u=null!==(n=_.minHours)&&void 0!==n?n:e,d=null===(a=null===(o=this.addForm)||void 0===o?void 0:o.value)||void 0===a?void 0:a.hour,c=null!=d&&d>=e&&d<=s?d:u;null===(r=this.addForm.controls.hour)||void 0===r||r.setValue(c,{emitEvent:!1}),null===(l=this.filterVehicleArray)||void 0===l||l.forEach(e=>{(null==e?void 0:e.pricing)&&(e.pricing.selected_hours=c)}),this.changeHours()}if(this.rentalPackages=null!=_.slots?_.slots:[],"package"===this.bookingTypeKey){const t=null===(u=null===(s=this.addForm)||void 0===s?void 0:s.value)||void 0===u?void 0:u.packages;if(null!=t&&!this.rentalPackages.some(e=>e.id==t)&&(null===(d=this.addForm.controls.packages)||void 0===d||d.setValue(null)),this.isPackageSlotAmountPricing(e.pricing)&&(null===(c=this.rentalPackages)||void 0===c?void 0:c.length)){const e=null===(g=null===(h=this.addForm)||void 0===h?void 0:h.value)||void 0===g?void 0:g.packages,t=null!=e&&this.rentalPackages.some(t=>t.id==e)?e:null===(p=this.rentalPackages[0])||void 0===p?void 0:p.id;null!=t&&(null===(m=this.addForm.controls.packages)||void 0===m||m.setValue(t,{emitEvent:!1}),this.changePackages())}}}validationForRental(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),"hourly"==this.bookingTypeKey?(this.addForm.controls.hour.setValidators([r.kI.required]),this.addForm.controls.packages.setValidators([])):"package"==this.bookingTypeKey?(this.addForm.controls.packages.setValidators([r.kI.required]),this.addForm.controls.hour.setValidators([])):(this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.setValidators([])),this.addForm.controls.packages.updateV
1alueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}shouldHideCharge(e){return"booster_seat"===(null==e?void 0:e.charges_key)||"child_seat"===(null==e?void 0:e.charges_key)||(null==e?void 0:e.is_required)}changeHours(){var e=this;return(0,y.Z)(function*(){var t,i,n,o,a,r;if(!e.selectedVehicleObj)return;const l=e.addForm.value.hour;if(l&&(e.filterVehicleArray.forEach(t=>{if(t.pricing.selected_hours=l,t.id===e.selectedVehicleObj.id||!e.isHourlyRateTimesHoursPricing(t.pricing))return;let i=e.getResolvedHourlyRate(null==t?void 0:t.pricing)*l-e.additionalDiscount;t.final_fare.amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge}),e.isHourlyRateTimesHoursPricing(null===(t=e.selectedVehicleObj)||void 0===t?void 0:t.pricing))){let t=e.getResolvedHourlyRate(null===(i=e.selectedVehicleObj)||void 0===i?void 0:i.pricing)*l-e.additionalDiscount;e.hours_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare,e.selectedVehicleObj.pricing.selected_hours=(null===(o=null===(n=e.addForm)||void 0===n?void 0:n.value)||void 0===o?void 0:o.hour)?null===(r=null===(a=e.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour:0})()}changePackages(){var e=this;return(0,y.Z)(function*(){var t;if(!e.selectedVehicleObj)return;const i=null===(t=e.addForm.value)||void 0===t?void 0:t.packages,n=e.getSlotAmountForPackageSelection(e.selectedVehicleObj.pricing,i);if(null!=n){e.filterVehicleArray.forEach(t=>{if(t.id===e.selectedVehicleObj.id)return;const n=e.getSlotAmountForPackageSelection(t.pricing,i);null!=n&&(t.final_fare.amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge)});let t=n-e.additionalDiscount;e.package_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare})()}removeValidation(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),this.addForm.controls.packages.setValidators([]),this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}setDateintime(){const e=new Date(this.addForm.value.request_time),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())this.setMinTime();else{let t=new Date(this.addForm.value.trip_time[0]||new Date);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.trip_time=t,this.addForm.controls.trip_time.setValue(t),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig.minDate=new Date(t)}}setMinTime(){const e=new Date;this.trip_time=new Date(e.getTime()+6e4*(this.min_date||0)),this.addForm.controls.trip_time.setValue(new Date(this.trip_time)),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(this.trip_time))}initDefaultReturnDateTime(){var e,t,i;let n=new Date((new Date).getTime()+36e5).getTime(),o=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),a=new Date(Math.max(n,o));this.returnDateFormatConfig.minDate=new Date,this.returnTimeFormatConfig.minDate=new Date(a),this.return_date=a,this.return_trip_time=a,this.return_time=a,this.addForm&&(null===(e=this.addForm.controls.return_date)||void 0===e||e.setValue(a),null===(t=this.addForm.controls.return_trip_time)||void 0===t||t.setValue(a),null===(i=this.addForm.controls.return_time)||void 0===i||i.setValue(a)),this.selectedDate=a,this.syncReturnDateTime()}syncReturnDateTime(){var e,t,i,n,o,a,r;const l=null!==(i=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("return_date"))||void 0===t?void 0:t.value)&&void 0!==i?i:this.return_date,s=null!==(a=null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("return_trip_time"))||void 0===o?void 0:o.value)&&void 0!==a?a:this.return_trip_time;if(!l||!s)return;const u=new Date(l),d=new Date(Array.isArray(s)?s[0]:s),c=new Date(u.getFullYear(),u.getMonth(),u.getDate(),d.getHours(),d.getMinutes(),d.getSeconds());null===(r=this.addForm.get("return_time"))||void 0===r||r.setValue(c),this.selectedDate=c,this.return_time=c}setReturnTimeFromDate(){const e=new Date(this.addForm.value.return_date),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()){let e=new Date((new Date).getTime()+36e5).getTime(),t=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),i=new Date(Math.max(e,t));this.return_trip_time=i,this.addForm.controls.return_trip_time.setValue(i),this.returnTimeFormatConfig.minDate=i}else{let t=new Date(this.addForm.value.return_trip_time||new Date);
1Array.isArray(t)&&(t=new Date(t[0])),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t),this.returnTimeFormatConfig.minDate=new Date(t)}}onBookingAssetsChange(e){this.bookingAssetsList=e||[]}buildBookingAssetsPayload(){return(this.bookingAssetsList||[]).filter(e=>e&&1!==e.is_delete&&!!e.asset_value).map(e=>{var t;const i=null===(t=M._B.find(t=>t.id===String(e.asset_type)))||void 0===t?void 0:t.kind;return Object.assign({asset_type:String(e.asset_type),user_type:e.user_type,asset_value:e.asset_value},"file"!==i&&"voice"!==i||!e.file_name?{}:{file_name:e.file_name})})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e),f.Y36(f.sBO),f.Y36(E.Z),f.Y36(r.qu),f.Y36(U.F),f.Y36(N.d),f.Y36(I._W),f.Y36(j.C),f.Y36(o.gz),f.Y36(R.T),f.Y36(o.F0),f.Y36(z.x))},e.\u0275cmp=f.Xpm({type:e,selectors:[["cab-booking"]],inputs:{is_full_screen:"is_full_screen"},decls:145,vars:176,consts:[["autocomplete","off","role","form",3,"formGroup"],[1,"custom","clearfix","booking-form-two-column",3,"hidden","ngClass"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info0",2,"max-height","632px",3,"ngClass"],[3,"ngClass"],["class","lorder-wrap",4,"ngIf"],["class","0order-header--steps d-flex p-3 m-0 border-bottom bg-light","style","position: sticky; top: 0; z-index: 1050;",4,"ngIf"],["class","booking-hold-banner",4,"ngIf"],[1,"flex-fill","p-4"],["class","form-group position-relative mb-2 pb-1 dropdown-select0",4,"ngIf"],[1,"form-group","position-relative","mb-1","icon","short"],[1,"location-search",3,"placeholder","isBooing","responseData","searchText","is_disable","search","searchEvent"],["class","help-block text-center",3,"innerHTML",4,"ngIf"],["class","form-text text-danger text-center",4,"ngIf"],["formArrayName","checkpoints",1,"form-group","mb-1"],[3,"formGroupName",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"form-group","position-relative","mb-2","pb-1","icon","short",3,"ngClass"],[1,"location-search",3,"is_disable","placeholder","responseData","isBooing","searchText","search","searchEvent"],["class","help-block text-danger text-center",4,"ngIf"],["class","row input-info",4,"ngIf"],["class","trip-type d-flex justify-content-between mb-1",4,"ngIf"],["class","form-row mb-0",4,"ngIf"],[1,"form-group","position-relative","mb-0"],["mode","local","modalId","bookingFormAssetsModal",3,"title","assets","compact","assetsChange"],[1,"p-4","border-top","bg-white",2,"position","sticky","bottom","0","z-index","100"],["type","button",1,"btn","btn-red-gradient","text-uppercase","btn-lg","fw-semibold","font-size-18","w-100",3,"disabled","click"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info",2,"max-height","632px",3,"ngClass"],[1,"booking-form-inner",3,"ngClass"],["class","0order-header--steps d-flex p-3 mb-0 border-bottom bg-light","style","position: sticky; top: 0; z-index: 100000;",4,"ngIf"],["class","bg-light p-3 mt-5 rounded-3 mb-5",4,"ngIf"],[1,"fw-semibold","mb-3","h4"],[1,"font-size-14"],["formArrayName","properties",1,"booking-form-body","border"],["class","fa fa-spinner fa-spin",4,"ngIf"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","short","booking-widget-flex-column0",2,"max-height","632px",3,"ngClass"],["class","0order-header--steps d-flex p-4 bg-light m-0","style","position: sticky; top: 0; z-index: 100000;",4,"ngIf"],[1,"vehicle-step-scroll","p-4"],["href","javascript:;",1,"text-decoration-none",2,"color","currentColor !important"],["class","list-unstyled border rounded-3 overflow-hidden custom-select-menu",4,"ngFor","ngForOf"],["class","form-row",4,"ngIf"],[1,"p-4","border-top","bg-white","booking-widget-footer-bar"],[1,"form-row","top-menu-selection"],["class","form-group col",4,"ngIf"],["class","form-group col",3,"ngClass",4,"ngIf"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","short",3,"ngClass"],["class","0order-header--steps d-flex p-3 mb-0 bg-light",4,"ngIf"],[3,"isOtpVerification","callBackObject"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","booking-form-center","booking-form-center-w-booking",3,"ngClass"],["class","0order-header--steps d-flex p-4 bg-light m-0",4,"ngIf"],[1,"flex-fill"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking",4,"ngIf"],[1,"flex-fill",2,"max-height","400px","overflow-y","scroll"],[1,"booking-form-center","d-flex","align-items-center"],[1,"booking-form-inner",2,"height","auto","width","100%"],[1,"booking-form-body","text-center","py-5"],[1,"icon","mb-4"],[1,"fa","fa-check-circle-o","fa-5x","text-success"],[1,"heading","h3","font-weight-700","text-dark"],[1,"font-size-18"],["type","button",1,"btn","btn-primary","btn-block","btn-lg","mt-3",3,"click"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","class","modal fade","aria-hidden","true",4,"ngIf"],["id","fixdestination","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],["class","modal-body flex",4,"ngIf"],[1,"modal-footer","bg-light"],["type","submit",1,"btn","btn-primary",3,"click"],["id","selectUserPickupLocation","role","dialog","aria-labelledby","selectUserPickupLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["autocomplete","off","role","form",3,"ngSubmit"],["id","selectUserPickupLocationLabel",1,"modal-title","flex"],[1,"modal-body","py-0"],[1,"radioStyle1","radioStyleCustom","largeChecked"],["class","control control-outline control-info control--radio d-block my-3 border rounded",4,"ngFor","ngForOf"],["data-dismiss","modal","type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],["id","selectUserDropoffLocation","role","dialog","aria-labelledby","selectUserDropoffLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["id","selectUserDropoffLocationLabel",1,"modal-title","flex"],[1,"lorder-wrap"],[1,"loader"],[1,"0order-header--steps","d-flex","p-3","m-0","border-bottom","bg-light",2,"position","sticky","top","0","z-index","1050"],[1,"step-book","border-solid"],[1,"btn-gray"],[1,"btn-text","btn-text-active"],[1,"step-main"],[1,"round-border","round-border-active"],[1,"step-book","_stepNotVisited_ojtdk_75","cursor-notallowed"],["disabled","",1,"btn-text","cursor-notallowed"],[1,"round-border"],[1,"btn-text"],[1,"_stepTitleActiveCircleSpace_ojtdk_137"],[1,"step-book","cursor-notallowed"],["class","step-book text-left",4,"ngIf"],[1,"step-book","text-left"],["bindLabel","language_code","bindValue","language_code",1,"nav-link","p-0","ps-2",2,"min-width","75px",3,"items","clearable","ngModel","ngModelOptions","ngModelChange","change"],[1,"booking-hold-banner"],[1,"form-group","position-relative","mb-2","pb-1","dropdown-select0"],[1,"control-label","fw-semibold","fs-6"],["bindLabel","title","bindValue","id",1,"ng-select",3,"placeholder","items","clearable","formControl","searchable","change"],[1,"help-block","text-center",3,"innerHTML"],[1,"form-text","text-danger","text-center"],[3,"formGroupName"],[1,"form-group","mb-3"],[1,"has-feedback","p-r-40"],[3,"placeholder","responseData","isBooing","searchText","search","searchEvent"],[1,"form-control-feedback","fa","fa-circle-o"],["class","form-text mt-2 text-danger pl-5 text-center",4,"ngIf"],["href","javascript:;",1,"remove-checkpoint","text-secondary",3,"click"],[1,"fa","fa-tras
1h","fa-fw",3,"ngClass"],[1,"form-text","mt-2","text-danger","pl-5","text-center"],[1,"add-checkpoint",3,"click"],[1,"fa","fa-plus-circle"],[1,"help-block","text-danger","text-center"],[1,"d-flex","align-items-center","mb-1"],[1,"fw-normal","m-0",2,"color","rgb(97, 113, 130)"],[1,"ml-auto","auto-fixed-switch","d-flex","align-items-center"],["id","RideType","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideType",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],[1,"mb-0","order-1","text-1"],[1,"mb-0","order-3","text-2"],[1,"row","input-info"],[1,"col-md-6",2,"width","50%"],[1,"form-group","mb-3","position-relative","icon","short","custom-date-picker"],[1,"input_trailingIconSpan__6le4A","input_iconSpan__7pewB"],["role","img","aria-label","Icon/calendar","width","20px","height","20px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","_default_rs803_65"],["d","M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zM4 9v10h16V9H4zm2 4h5v4H6v-4z"],[1,"control-label","fw-semibold","mt-1"],[1,"form-control",3,"placeholder","config","ngClass","formControl","setDate"],[1,"form-group","position-relative","mb-3","icon","short","custom-date-picker"],[1,"input_iconSpan__7pewB","input_trailingIconSpan__6le4A"],["role","img","aria-label","Icon/time","width","20px","height","20px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","_default_rs803_65"],["d","M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm1-10V7h-2v7h6v-2h-4z"],["appendTo","body","placeholder"," Select Start Time",1,"form-control","p-0","time-flatpicker",3,"config","formControl","setDate"],[1,"trip-type","d-flex","justify-content-between","mb-1"],[1,"m-0","fw-normal",2,"color","rgb(97, 113, 130)"],[1,"form-group","mb-0"],[1,"0radioStyle1","0small-height","d-flex","0justify-content-between"],["class","control control-outline control-primary control--radio ml-3 0flex-fill control-outline-small mb-0",4,"ngFor","ngForOf"],[1,"control","control-outline","control-primary","control--radio","ml-3","0flex-fill","control-outline-small","mb-0"],["name","GENDER","type","radio",1,"custom-control-input",3,"value","formControl","checked","click"],[1,"control__indicator"],[1,"row"],[1,"fw-normal","mb-2","pb-1","d-flex","align-items-center",2,"color","rgb(97, 113, 130)"],["id","RideReturn","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideReturn",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],["class","row input-info",3,"ngClass",4,"ngIf"],[1,"row","input-info",3,"ngClass"],["appendTo","body","placeholder"," Select Return Time",1,"form-control","p-0","time-flatpicker",3,"config","formControl","setDate","ngClass"],[1,"col-12"],[1,"form-group","position-relative","mb-2","pb-1","icon","short"],["class","form-group mb-2",4,"ngIf"],["class","form-group p-0 col",4,"ngIf"],[1,"form-group","mb-2"],["type","text",1,"form-control","shadow-none",3,"placeholder","formControl"],[1,"form-group","p-0","col"],[1,"input-group"],["notFoundText","No Records Found",1,"select-single-with-search","w-100",3,"clearable","placeholder","ngModel","ngModelOptions","keyup.enter","change","ngModelChange"],["flightSelect",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"d-flex"],[1,"icon","me-2",2,"vertical-align","-2px"],[1,"fa","fa-plane"],[1,"ml-2",3,"title"],[1,"form-row","mb-0"],[1,"col-md-6"],[1,"font-weight-600","mb-2","fw-medium",2,"color","rgb(97, 113, 130) !important"],[4,"ngFor","ngForOf"],[1,"control","control-outline","control-info","control--checkbox"],["type","checkbox","name","selectedtype",3,"id","value","checked","disabled","change"],[1,"form-row"],[1,"additional-seats--row"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"ngStyle","click"],["type","text","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px",3,"formControl"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"ngStyle","click"],["type","text",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px",3,"value"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"click"],[1,"0order-header--steps","d-flex","p-3","mb-0","border-bottom","bg-light",2,"position","sticky","top","0","z-index","100000"],[1,"step-book","border-solid","black-border-active"],[1,"btn-text","btn-text-active",3,"click"],["disabled","",1,"btn-text","btn-text-active"],[1,"bg-light","p-3","mt-5","rounded-3","mb-5"],[1,"font-size-16","fw-normal","text-black","mb-1"],[1,"font-size-16","mb-1"],[1,"list-unstyled","mb-0"],[1,"card-title","my-3","font-weight-300","font-size-16",2,"margin-left","15px","padding-bottom","2px"],[1,"mb-1","font-weight-600","pl-3"],[1,"text-muted","mb-1","nowrap"],[1,"float-right","nowrap"],[1,"borderrounded-3p-4","input-info","mb-0"],[1,"control-label","fs-6"],["class","astrsk",4,"ngIf"],[1,"form-group"],[1,"astr
1sk"],["type","text","formControlName","value",1,"form-control","pt-2",3,"placeholder"],[1,"input-group",3,"ngClass"],["placeholder","select date","formControlName","value",1,"form-control","p-0",3,"config","onChange"],[1,"input-group-addon"],[1,"fa","fa-calendar"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","label-badge","form-control0","select-single-with-search","remove-space",3,"items","notFoundText","multiple"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","form-control0","select-single-with-search",3,"notFoundText","items"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative","mb-0",3,"ngClass"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"click"],["type","text","formControlName","value","numberOnly","","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px"],[1,"document-field",3,"ngClass"],[1,"document-field-row"],[1,"document-field-name"],["class","fa fa-file-o",4,"ngIf"],[1,"document-field-name-text"],[1,"document-field-upload"],["type","file",3,"id","disabled","change"],["docFileInput",""],["type","button","class","document-field-remove","title","Remove",3,"click",4,"ngIf"],["type","hidden","formControlName","value"],["type","hidden","formControlName","file_name"],[1,"document-field-hint"],[1,"fa","fa-file-o"],[1,"fa","fa-spinner","fa-spin"],["type","button","title","Remove",1,"document-field-remove",3,"click"],[1,"fa","fa-trash"],[1,"0order-header--steps","d-flex","p-4","bg-light","m-0",2,"position","sticky","top","0","z-index","100000"],[1,"btn-text","btn-text-active",3,"disabled","click"],[1,"list-unstyled","border","rounded-3","overflow-hidden","custom-select-menu"],[1,"p-3",3,"ngClass","click"],[1,"d-flex","align-items-center"],["alt","Logo",2,"width","80px","height","64px","object-fit","contain","min-width","80px","text-align","center",3,"src"],[1,"ms-3"],[1,"font-size-16","text-black","fw-semibold","font-size-16","text-black","mb-0"],[1,"mb-1","text-muted","font-size-12"],[1,"mb-0","d-flex","align-items-center"],["role","img","aria-label","Icon/Guests","width","16px","height","16px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","SuggestedCarClasses_icon__AgHlS"],["d","M2 22a8 8 0 1 1 16 0H2zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm7.363 2.233A7.505 7.505 0 0 1 22.983 22H20c0-2.61-1-4.986-2.637-6.767zm-2.023-2.276A7.98 7.98 0 0 0 18 7a7.964 7.964 0 0 0-1.015-3.903A5 5 0 0 1 21 8a4.999 4.999 0 0 1-5.66 4.957z"],[1,"ms-1","font-size-16","text-black"],[1,"ms-3","mb-0","d-flex","align-items-center"],["role","img","aria-label","Icon/Luggages","width","16px","height","16px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","SuggestedCarClasses_icon__AgHlS"],["d","M15 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v13c0 .552-.448 1-1 1H3c-.552 0-1-.448-1-1V7c0-.552.448-1 1-1h5V4c0-.552.448-1 1-1h6zM8 8H6v11h2V8zm10 0h-2v11h2V8zm-4-3h-4v1h4V5z"],[1,"ms-auto","d-flex","align-self-start"],[1,"font-size-20","text-black","fw-semibold"],["class","text-muted font-size-12",4,"ngIf"],["class","price-section-dayprice",4,"ngIf"],["class","accordion ms-2",4,"ngIf"],["data-bs-parent","#accordionExample",1,"collapse","mt-4","border-top","pt-4",3,"ngClass"],[1,"table","remove-padding"],["colspan","2",1,"no-border"],[1,"font-weight-normal"],["colspan","2","class","no-border",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","pb-3"],[1,"text-black","fw-semibold","font-size-16"],[1,"d-flex","align-item-center","justify-content-between","text-black","py-2","fw-semibold"],[1,"font-size-14","dot"],["class","d-flex align-item-center justify-content-between pb-3",4,"ngIf"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],["class","d-flex align-item-center justify-content-between ps-3",4,"ngFor","ngForOf"],["class","d-flex align-item-center justify-content-between text-black fw-semibold",4,"ngIf"],[1,"text-muted","font-size-12"],[1,"price-section-dayprice"],[1,"accordion","ms-2"],["data-bs-toggle","collapse",1,"curs
1or-pointer",3,"click"],[1,"fa-lg","ml-auto","accordian-icon","text-black",3,"ngClass"],[1,"d-flex","align-item-center","justify-content-between"],[1,"d-flex","align-item-center","justify-content-between","ps-3"],[1,"fa","fa-dot-circle-o"],[1,"d-flex","align-item-center","justify-content-between","text-black","fw-semibold"],["class","d-flex align-item-center justify-content-between ps-4",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","ps-4"],[1,"border-top","mt-4","pt-4"],[1,"form-group","col",3,"ngClass"],["placeholder","Select Package",1,"form-control0","select-single-with-search",3,"formControl","change"],["bindLabel","name","bindValue","value",3,"placeholder","items","formControl","change"],[1,"form-group","col"],[1,"fa","fa-user"],["dropdownPosition","top","placeholder","--","bindLabel","name","bindValue","id",1,"flex-fill",3,"items","formControl","change"],[1,"fa","fa-suitcase"],["dropdownPosition","top","placeholder","Payment Mode","bindLabel","charges_key","bindValue","id",3,"items","searchable","clearable","notFoundText","formControl","change"],["ng-label-tmp",""],[1,"0order-header--steps","d-flex","p-3","mb-0","bg-light"],[1,"0order-header--steps","d-flex","p-4","bg-light","m-0"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking"],[1,"step-book","cursor-notallowed","black-border-active"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"modal-body","flex"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"price-section","align-self-start"],[1,"price-section__left"],[1,"control","control-outline","control-info","control--radio","d-block","my-3","border","rounded"],[1,"font-weight-600","mt-0","mb-2"],[1,"mb-0","text-muted"],["type","radio","name","p-options","autocomplete","off",3,"id","change"],["type","radio","name","d-options","autocomplete","off",3,"id","change"]],template:function(e,t){if(1&e&&(f.TgZ(0,"form",0),f.TgZ(1,"div",1),f.TgZ(2,"div",2),f.TgZ(3,"div",3),f.YNc(4,Me,2,0,"div",4),f.YNc(5,Ee,38,7,"ol",5),f.YNc(6,Ue,2,1,"div",6),f.TgZ(7,"div",7),f.YNc(8,Ne,4,6,"div",8),f.TgZ(9,"div",9),f.TgZ(10,"div",3),f.TgZ(11,"app-search-box-google",10),f.NdJ("search",function(e){return t.OnSearch(e)})("searchEvent",function(e){return t.searchEvent(e)}),f.qZA(),f.YNc(12,Ie,1,1,"span",11),f.YNc(13,je,2,1,"span",12),f.qZA(),f.qZA(),f.TgZ(14,"div",13),f.YNc(15,Je,8,9,"ng-container",14),f.YNc(16,Be,4,1,"div",15),f.qZA(),f.TgZ(17,"div",16),f.TgZ(18,"app-search-box-google",17),f.NdJ("search",function(e){return t.OnSearchDestination(e)})("searchEvent",function(e){return t.searchEventDestination(e)}),f.qZA(),f.YNc(19,Ye,1,1,"span",11),f.YNc(20,Qe,2,1,"span",18),f.qZA(),f.YNc(21,He,11,4,"ng-container",15),f.YNc(22,Ge,17,12,"div",19),f.YNc(23,We,6,2,"div",20),f.YNc(24,ot,9,4,"ng-container",15),f.YNc(25,st,5,3,"div",15),f.YNc(26,vt,5,2,"div",21),f.TgZ(27,"div",22),f.TgZ(28,"app-booking-assets",23),f.NdJ("assetsChange",function(e){return t.onBookingAssetsChange(e)}),f.qZA(),f.qZA(),f.qZA(),f.TgZ(29,"div",24),f.TgZ(30,"button",25),f.NdJ("click",function(){return t.submitFirstForm(t.addForm)}),f._uU(31),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(32,"div",1),f.TgZ(33,"div",26),f.TgZ(34,"div",27),f.YNc(35,yt,39,11,"ol",28),f.TgZ(36,"div",7),f.YNc(37,bt,56,37,"div",29),f.TgZ(38,"div"),f.TgZ(39,"h4",30),f._uU(40),f.qZA(),f.TgZ(41,"p",31),f._uU(42),f.qZA(),f.TgZ(43,"div",32),f.YNc(44,Ot,12,9,"ng-container",14),f.qZA(),f.qZA(),f.qZA(),f.TgZ(45,"div",24),f.TgZ(46,"button",25),f.NdJ("click",function(){return t.submitSecondForm(t.addForm)}),f.YNc(47,Lt,1,0,"i",33),f._uU(48),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(49,"div",1),f.TgZ(50,"div",34),f.TgZ(51,"div",27),f.YNc(52,Mt,39,12,"ol",35),f.YNc(53,Vt,2,0,"div",4),f.TgZ(54,"div",36),f.TgZ(55,"a",37),f.YNc(56,Ti,83,58,"ul",38),f.qZA(),f.YNc(57,Pi,4,5,"div",39),f.YNc(58,wi,3,6,"div",39),f.qZA(),f.TgZ(59,"div",40),f.TgZ(60,"div",41),f.YNc(61,qi,5,2,"div",42),f.YNc(62,Di,5,2,"div",42),f.YNc(63,Li,3,8,"div",43),f.qZA(),f.TgZ(64,"button",25),f.NdJ("click",function(){return t.goToLoginScreen()}),f._uU(65),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(66,"div",1),f.TgZ(67,"div",44),f.TgZ(68,"div",27),f.YNc(69,Mi,39,12,"ol",45),f.YNc(70,Vi,2,0,"div",4),f.TgZ(71,"app-yelowcab-login",46),f.NdJ("callBackObject",function(e){return t.showLoginSingUpPage(e)}
1),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(72,"div",1),f.TgZ(73,"div",47),f.TgZ(74,"div",27),f.YNc(75,Si,39,12,"ol",48),f.TgZ(76,"div",49),f.YNc(77,Ei,1,8,"app-payment-gatway-list",50),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(78,"div",1),f.TgZ(79,"div",47),f.TgZ(80,"div",27),f.YNc(81,Ui,39,11,"ol",48),f.TgZ(82,"div",51),f.TgZ(83,"div",52),f.TgZ(84,"div",53),f.TgZ(85,"div",54),f.TgZ(86,"div",55),f._UZ(87,"i",56),f.qZA(),f.TgZ(88,"h1",57),f._uU(89),f.qZA(),f.TgZ(90,"p",58),f._uU(91),f.qZA(),f.TgZ(92,"button",59),f.NdJ("click",function(){return t.ViewUpdate(!0)}),f._uU(93),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(94,ji,14,2,"div",60),f.TgZ(95,"div",61),f.TgZ(96,"div",62),f.TgZ(97,"form",63),f.TgZ(98,"div",64),f.TgZ(99,"div",65),f.TgZ(100,"h4",66),f._uU(101,"Select Destination"),f.qZA(),f.TgZ(102,"button",67),f.NdJ("click",function(){return t.closeFixDestinationPopup()}),f.TgZ(103,"span",68),f._uU(104,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(105,zi,2,1,"div",69),f.TgZ(106,"div",70),f.TgZ(107,"button",71),f.NdJ("click",function(){return t.submitZonePricing()}),f._uU(108," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(109,"div",72),f.TgZ(110,"div",62),f.TgZ(111,"form",73),f.NdJ("ngSubmit",function(){return t.submitUserPickUpLocationForm()}),f.TgZ(112,"div",64),f.TgZ(113,"div",65),f.TgZ(114,"h4",74),f._uU(115,"Pickup Saved Address"),f.qZA(),f.TgZ(116,"button",67),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f.TgZ(117,"span",68),f._uU(118,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(119,"div",75),f.TgZ(120,"div",76),f.YNc(121,Ji,7,3,"label",77),f.qZA(),f.qZA(),f.TgZ(122,"div",70),f.TgZ(123,"button",78),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f._uU(124,"Cancel"),f.qZA(),f.TgZ(125,"button",79),f._uU(126,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(127,"div",80),f.TgZ(128,"div",62),f.TgZ(129,"form",73),f.NdJ("ngSubmit",function(){return t.submitUserDropoffLocationForm()}),f.TgZ(130,"div",64),f.TgZ(131,"div",65),f.TgZ(132,"h4",81),f._uU(133,"Dropoff Saved Address"),f.qZA(),f.TgZ(134,"button",67),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f.TgZ(135,"span",68),f._uU(136,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(137,"div",75),f.TgZ(138,"div",76),f.YNc(139,Bi,7,3,"label",77),f.qZA(),f.qZA(),f.TgZ(140,"div",70),f.TgZ(141,"button",78),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f._uU(142,"Cancel"),f.qZA(),f.TgZ(143,"button",79),f._uU(144,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){let e;f.Q6J("formGroup",t.addForm),f.xp6(1),f.Q6J("hidden",!t.displayFirstForm)("ngClass",f.l5B(100,Yi,t.is_full_screen,!t.is_full_screen,!t.displayFirstForm,t.displayFirstForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(105,Qi,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(108,Hi,t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(1),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(1),f.Q6J("ngIf",t.isBookingHold),f.xp6(2),f.Q6J("ngIf",1!=t.transactionCategory.length),f.xp6(2),f.Q6J("ngClass",f.VKq(110,$e,t.formErrors.pickup_location)),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.search_pick_location)("isBooing",!0)("responseData",t.responseData)("searchText",t.searchText)("is_disable",!t.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",t.formErrors.pickup_location),f.xp6(1),f.Q6J("ngIf",!t.pickupRegionFound),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.checkpoints.controls),f.xp6(1),f.Q6J("ngIf",0==t.fixZoneDisableDropoff&&(null==(e=t.addForm.get("checkpoints"))||null==e.value?null:e.value.length)<=2),f.xp6(1),f.Q6J("ngClass",f.VKq(112,$e,t.formErrors.destination)),f.xp6(1),f.Q6J("is_disable",t.fixZoneDisableDropoff||!t.addForm.value.booking_type_id)("placeholder",null==t.currentLanguage?null:t.currentLanguage.search_des_loc)("responseData",t.responseDataDestionation)("isBooing",!0)("searchText",t.searchTextDestionation),f.xp6(1),f.Q6J("ngIf",t.formErrors.destination),f.xp6(1),f.Q6J("ngIf",!t.dropRegionFound),f.xp6(1),f.Q6J("ngIf",t.rideType.length>1),f.xp6(1),f.Q6J("ngIf",2==t.selectedTab),f.xp6(1),f.Q6J("ngIf","Y"==t.checkGenderEnable),f.xp6(1),f.Q6J("ngIf",t.checkReturnTimeConfig&&"hourly"!=t.bookingTypeKey&&"package"!=t.bookingTypeKey),f.xp6(1),f.Q6J("ngIf",t.displayFlightNumber),f.xp6(1),f.Q6J("ngIf",(null==t.otherChargesArray?null:t.otherChargesArray.length)>0),f.xp6(2),f.Q6J("title",(null==t.currentLanguage?null:t.currentLanguage.note_for_driver)||"Notes")("assets",t.bookingAssetsList)("compact",!0),f.xp6(2),f.Akn(f.WLB(114,$i,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.isBookingHold||t.addForm.controls.checkpoints.invalid||!t.showNextButton||!t.pickupRegionFound||!t.dropRegionFound||t.sameZoneTripRestricted),f.xp6(1),f.hij("",null==t.currentLanguage?null:t.currentLanguage.continue," "),f.xp6(1),f.Q6J("hidden",!t.displaySecondForm)("ngClass",f.l5B(117,Yi,t.is_full_screen,!t.is_full_screen,!t.displaySecondForm,t.displaySecondForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(122,Gi,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(124,Ki,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(2),f.Q6J("ngIf",t.selectedFlightObj),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details_screen_title),f.xp6(2),f.hij("",null==t.currentLanguage?null:t.currentLanguage.details_screen_sub_title,"."),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.properties.controls),f.xp6(2),f.Akn(f.WLB(127,$i,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.isBookingHold||t.isDocumentUploading),f.xp6(1),f.Q6J("ngIf",t.isBookingHold||t.isDocumentUploading),f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.continue," "),f.xp6(1),f.Q6J("hidden",!t.displayThird
1Form)("ngClass",f.l5B(130,Yi,t.is_full_screen,!t.is_full_screen,!t.displayThirdForm,t.displayThirdForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(135,Gi,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(137,Ki,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(3),f.Q6J("ngForOf",t.filterVehicleArray),f.xp6(1),f.Q6J("ngIf","package"==t.bookingTypeKey),f.xp6(1),f.Q6J("ngIf","hourly"==t.bookingTypeKey),f.xp6(3),f.Q6J("ngIf",t.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",t.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",t.paymentMode.length>1),f.xp6(1),f.Akn(f.WLB(140,$i,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.disableBtn||t.isBookingHold),f.xp6(1),f.hij("",null==t.currentLanguage?null:t.currentLanguage.continue," "),f.xp6(1),f.Q6J("hidden",!t.displayLoginForm)("ngClass",f.l5B(143,Yi,t.is_full_screen,!t.is_full_screen,!t.displayLoginForm,t.displayLoginForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(148,Gi,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(150,Ki,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(1),f.Q6J("isOtpVerification",t.isOtpVerification),f.xp6(1),f.Q6J("hidden",!t.displayPaymentForm)("ngClass",f.l5B(153,Yi,t.is_full_screen,!t.is_full_screen,!t.displayPaymentForm,t.displayPaymentForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(158,Gi,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(160,Ki,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(2),f.Q6J("ngIf",t.showPaymetScreen),f.xp6(1),f.Q6J("hidden",!t.displayThankYouForm)("ngClass",f.l5B(163,Yi,t.is_full_screen,!t.is_full_screen,!t.displayThankYouForm,t.displayThankYouForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(168,Gi,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(170,Ki,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(8),f.Oqu(t.content),f.xp6(2),f.AsE("",null==t.currentLanguage?null:t.currentLanguage.trip_id," #",t.trip_number," "),f.xp6(1),f.Akn(f.WLB(173,$i,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.book_another_ride," "),f.xp6(1),f.Q6J("ngIf",!t.fixZoneDisableDropoff),f.xp6(11),f.Q6J("ngIf",t.zonePriceData.length>0),f.xp6(16),f.Q6J("ngForOf",t.userPickipLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserPickupLocation),f.xp6(14),f.Q6J("ngForOf",t.userDropoffLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserDropoffLocation)}},directives:[r._Y,r.JL,r.sg,n.mk,n.O5,J.n,r.CE,n.sg,B.F,we,r.F,u.w9,r.JJ,r.On,r.oH,r.x0,d.DJ,r._,r.Fj,u.xv,n.PC,r.u,W.Y,u.bb,qe.X],pipes:[De.GP,De.ZQ,n.uU,n.JJ,De.SC,Oe.D,Le],styles:[".custom-number-input[_ngcontent-%COMP%]{display:flex;align-items:center}.booking-hold-banner[_ngcontent-%COMP%]{margin:16px;padding:12px 16px;border-radius:8px;background:color-mix(in srgb,var(--bs-primary-theme-color) 12%,#fff);border:1px solid color-mix(in srgb,var(--bs-primary-theme-color) 35%,#fff);color:#344054;font-size:14px;font-weight:500;text-align:center}.number-input[_ngcontent-%COMP%]{width:60px;text-align:center;-moz-appearance:textfield}.number-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .number-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.custom-arrow[_ngcontent-%COMP%]{cursor:pointer;padding:5px 10px;font-size:20px;background-color:#007bff;color:#fff;border:none;border-radius:5px;margin:0 5px}.custom-arrow[_ngcontent-%COMP%]:hover{background-color:#0056b3}.dongle.form-control[_ngcontent-%COMP%]{display:block;position:absolute;z-index:6;padding:13px 20px;top:-5px;width:48px;height:48px;border:none;transition:opacity .3s ease;cursor:pointer;opacity:.4}.hidden-width[_ngcontent-%COMP%]{display:none!important;width:550px!important}.default-width[_ngcontent-%COMP%]{width:550px!important}.list-focus[_ngcontent-%COMP%]{border-top-left-radius:.5rem;border-top-right-radius:.5rem;border:2px solid #000;background-color:#f0f2f7}.form-control-feedback-right[_ngcontent-%COMP%]{position:absolute;top:0;z-index:1001;display:block;text-align:center;pointer-events:none;line-height:38px;
1height:38px;width:38px;color:var(--c-a4b0c3);right:25px}.booking-form-w-booking[_ngcontent-%COMP%]{overflow-y:auto}.booking-widget-flex-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.booking-widget-inner-flex[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}.booking-widget-inner-flex[_ngcontent-%COMP%] > ol[_ngcontent-%COMP%]:first-of-type{flex-shrink:0}.vehicle-step-scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.booking-widget-footer-bar[_ngcontent-%COMP%]{flex-shrink:0;box-shadow:0 -4px 14px #0000000f}.document-field[_ngcontent-%COMP%]{width:100%;margin-bottom:0}.document-field-row[_ngcontent-%COMP%]{display:flex;align-items:stretch;width:100%;min-height:42px;border:1px solid #ced4da;border-radius:4px;background:#fff;overflow:hidden}.document-field.has-error[_ngcontent-%COMP%] .document-field-row[_ngcontent-%COMP%]{border-color:#dc3545}.document-field-name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;align-items:center;grid-gap:8px;gap:8px;padding:.5rem .75rem;color:#6c757d;font-size:14px;background:#fff}.document-field-name.has-file[_ngcontent-%COMP%]{color:#212529}.document-field-name[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{flex-shrink:0;color:#495057;color:var(--bs-primary-theme-color, #495057)}.document-field-name-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-field-upload[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:0 1rem;margin:0;border:none;border-left:1px solid #ced4da;background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;font-size:14px;font-weight:600;line-height:1.2;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;overflow:hidden}.document-field-upload[_ngcontent-%COMP%]:hover:not(.is-disabled){filter:brightness(.95)}.document-field-upload.is-disabled[_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%]{opacity:.75;cursor:not-allowed}.document-field-upload[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;font-size:0}.document-field-upload.is-disabled[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{pointer-events:none}.document-field-remove[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:0;margin:0;border:none;border-left:1px solid #ced4da;background:color-mix(in srgb,#343a40 12%,#fff);background:color-mix(in srgb,var(--bs-primary-theme-color, #343a40) 12%,#fff);color:#343a40;color:var(--bs-primary-theme-color, #343a40);font-size:16px;cursor:pointer}.document-field-remove[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{color:inherit}.document-field-remove[_ngcontent-%COMP%]:hover{background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;color:var(--bs-secondary-theme-color, #fff)}.document-field-hint[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12px;color:#6c757d;line-height:1.3}"]}),e})(),Xi=(()=>{class e{constructor(e){this.authService=e,e.currentCompany.subscribe(e=>{this.company_logo=e.company_logo})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e))},e.\u0275cmp=f.Xpm({type:e,selectors:[["cab-booking-header"]],decls:21,vars:2,consts:[[1,"navbar","0navbar-expand-lg","0navbar-light","bg-white","border-bottom","taxi-booking-new-layout"],[1,"container"],[2,"flex","1 1 auto"],["alt","Logo Image",2,"width","70px",3,"src"],[1,"order-header--steps","ms-auto"],["routerLink","/yelowcab/quotation",1,"order-header--step","order-header--step--current","text-decoration-none"],[1,"order-header--step-icon"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 18 18"],["fill","none","fill-rule","evenodd"],["cx","9","cy","9","r","9","fill","#3d7bf7"],["fill","#FFF","d","M6.332
113a4.82 4.82 0 0 1-.088-.847c0-2.904 3.399-3.421 3.399-4.554 0-.55-.44-.781-.847-.781-.748 0-1.166.836-1.166.836L6.2 6.697s.726-1.694 2.772-1.694c1.287 0 2.684.737 2.684 2.409 0 2.453-3.168 2.926-3.223 3.938h3.344V13H6.332z"],[1,"bg-white","py0-5","taxi-web-section"],[1,"container0"],[1,"hero_hero__T7iHb"],[1,"full-size-background_fullSizeImageContainer__3bZHx","hero_fullSizeBackgroundContainer__skxk0",2,"--desktop-aspect-ratio","3.5582089552238805"],["src","assets/bg-1.webp","alt","Logo Image",2,"height","100vh"],[3,"is_full_screen"]],template:function(e,t){1&e&&(f.TgZ(0,"nav",0),f.TgZ(1,"div",1),f.TgZ(2,"div",2),f._UZ(3,"img",3),f.qZA(),f.TgZ(4,"div",4),f.TgZ(5,"a",5),f.TgZ(6,"div",6),f.O4$(),f.TgZ(7,"svg",7),f.TgZ(8,"g",8),f._UZ(9,"circle",9),f._UZ(10,"path",10),f.qZA(),f.qZA(),f.qZA(),f.kcU(),f.TgZ(11,"span"),f._uU(12,"QUOTE"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(13,"div"),f.TgZ(14,"main"),f.TgZ(15,"section",11),f.TgZ(16,"div",12),f.TgZ(17,"div",13),f.TgZ(18,"div",14),f._UZ(19,"img",15),f.qZA(),f._UZ(20,"cab-booking",16),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e&&(f.xp6(3),f.Q6J("src",t.company_logo?t.company_logo:"assets/admin_console.png",f.LSH),f.xp6(17),f.Q6J("is_full_screen",!1))},directives:[o.yS,Wi],styles:[".custom-number-input[_ngcontent-%COMP%]{display:flex;align-items:center}.number-input[_ngcontent-%COMP%]{width:60px;text-align:center;-moz-appearance:textfield}.number-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .number-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.custom-arrow[_ngcontent-%COMP%]{cursor:pointer;padding:5px 10px;font-size:20px;background-color:#007bff;color:#fff;border:none;border-radius:5px;margin:0 5px}.custom-arrow[_ngcontent-%COMP%]:hover{background-color:#0056b3}.dongle.form-control[_ngcontent-%COMP%]{display:block;position:absolute;z-index:6;padding:13px 20px;top:-5px;width:48px;height:48px;border:none;transition:opacity .3s ease;cursor:pointer;opacity:.4}.hidden-width[_ngcontent-%COMP%]{display:none!important;width:550px!important}.default-width[_ngcontent-%COMP%]{width:550px!important}"]}),e})();function en(e,t){1&e&&(f.ynx(0),f.TgZ(1,"div",99),f.TgZ(2,"button",100),f._uU(3,"Taxi"),f.qZA(),f.TgZ(4,"button",101),f._uU(5,"Hourly"),f.qZA(),f.qZA(),f.BQk())}function tn(e,t){1&e&&(f.TgZ(0,"div",102),f._UZ(1,"div",103),f.qZA())}const nn=function(e){return{active:e}};function on(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",104),f.NdJ("click",function(){return f.CHM(e),f.oxw().changeBookingTypeList(1)}),f._uU(1,"Taxi"),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isTaxiActive))}}function an(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",104),f.NdJ("click",function(){return f.CHM(e),f.oxw().changeBookingTypeList(2)}),f._uU(1,"Hourly"),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isRentalActive))}}const rn=function(){return{standalone:!0}};function ln(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",44),f.TgZ(1,"ng-select",45),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw(2).changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(4,rn))}}function sn(e,t){if(1&e&&(f.TgZ(0,"ol",105),f.TgZ(1,"li",36),f.TgZ(2,"div",32),f.TgZ(3,"button",59),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"div",34),f._UZ(6,"div",35),f.qZA(),f.qZA(),f.TgZ(7,"li",41),f.TgZ(8,"div",32),f.TgZ(9,"button",42),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"div",34),f._UZ(12,"div",40),f.qZA(),f.qZA(),f.TgZ(13,"li",36),f.TgZ(14,"div",32),f.TgZ(15,"button",38),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"div",39),f._UZ(18,"div",40),f.qZA(),f.qZA(),f.TgZ(19,"li",41),f.TgZ(20,"div",32),f.TgZ(21,"button",42),f._uU(22),f.qZA(),f.qZA(),f.TgZ(23,"div",34),f._UZ(24,"div",40),f.qZA(),f.qZA(),f.TgZ(25,"li",41),f.TgZ(26,"div",32),f.TgZ(27,"button",42),f._uU(28),f.qZA(),f.qZA(),f.TgZ(29,"div",34),f._UZ(30,"div",40),f.qZA(),f.qZA(),f.TgZ(31,"li",43),f.TgZ(32,"div",32),f.TgZ(33,"button",42),f._uU(34),f.qZA(),f.qZA(),f.TgZ(35,"div",34),f._UZ(36,"div",40),f.qZA(),f.qZA(),f.YNc(37,ln,2,5,"li",69),f.qZA()),2&e){const e=f.oxw();f.xp6(4),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.pickup),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.details),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.service),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.payment),f.xp6(6),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.checkout),f.xp6(3),f.Q6J("ngIf",(null==e.languageList?null:e.languageList.length)>1)}}function un(e,t){if(1&e&&(f.TgZ(0,"div",106),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}function dn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",107),f.TgZ(1,"div",13),f._uU(2,"Choose Transport Mode"),f.qZA(),f.TgZ(3,"div",14),f.O4$(),f.TgZ(4,"svg",15),f._UZ(5,"path",108),f.qZA(),f.kcU(),f.TgZ(6,"ng-select",109),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw();return i.changeBookingType(t),i.onInputChange(i.addForm.controls.booking_type_id)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(6),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_booking_type)("items",e.transactionCategory)("clearable",!1)("formControl",e.addForm.controls.booking_type_id)("searchable",!1)}}function cn(e,t){if(1&e&&f._UZ(0,"span",110),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.pickup_location,f.oJD)}}function hn(e,t){if(1&e&&(f.TgZ(0,"span",111),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.ser_not_av)}}function gn(e,t){if(1&e&&(f.TgZ(0,"span",111),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.ser_not_av)}}function pn(e,t){if(1&e){const e=f.EpF();f.ynx(0,112),f.TgZ(1,"div",113),f.TgZ(2,"div",14),f.O4$(),f.TgZ(3,"svg",15),f._UZ(4,"path",16),f.qZA(),f.kcU(),f.TgZ(5,"app-search-box-google",114),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchCheckpoint(t)})("searchEvent",function(t){const i=f.CHM(e).index;return f.oxw().searchEventCheckpoint(t,i)}),f.qZA(),f.TgZ(6,"a",115),f.NdJ("click",function(){const t=f.CHM(e).index;return f.oxw().removeRow(t)}),f._UZ(7,"i",116),f.qZA(),f.qZA(),f.YNc(8,gn,2,1,"span",19),f.qZA(),f.BQk()}if(2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(5),f.Q6J("placeholder",null==n.currentLanguage?null:n.currentLanguage.search_way_loc)("responseData",n.responseDatacheckPoint)("isBooing",!0)("searchText",e.value.value),f.xp6(3),f.Q6J("ngIf",!n.checkpointValidity[i]&&(null==e.value||null==e.value.value?null:e.value.value.length))}}function mn(e,t){if(1&e&&f._UZ(0,"span",110),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.destination,f.oJD)}}function _n(e,t){if(1&e&&(f.TgZ(0,"span",119),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.ser_not_av)}}const fn=function(e){return{"has-error":e}};function vn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",12),f.TgZ(1,"div",13),f._uU(2),f.qZA(),f.TgZ(3,"div",14),f.O4$(),f.TgZ(4,"svg",15),f._UZ(5,"path",16),f.qZA(),f.kcU(),f.TgZ(6,"app-search-box-google",117),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchDestination(t)})("searchEvent",function(t){return f.CHM(e),f.oxw().searchEventDestination(t)}),f.qZA(),f.qZA(),f.YNc(7,mn,1,1,"span",18),f.YNc(8,_n,2,1,"span",118),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(9,fn,e.formErrors.destination)),f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.select_destination)||"To"),f.xp6(4),f.Q6J("is_disable",e.fixZoneDisableDropoff||!e.addForm.value.booking_type_id)("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_des_loc)||"Address, airport, hotel, ...")("responseData",e.responseDataDestionation)("isBooing",!0)("searchText",e.searchTextDestionation),f.xp6(1),f.Q6J("ngIf",e.formErrors.destination),f.xp6(1),f.Q6J("ngIf",!e.dropRegionFound)}}function yn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",120),f.TgZ(1,"button",121),f.NdJ("click",function(){return f.CHM(e),f.oxw().addNewRow()}),f._uU(2,"ADD STOP"),f.qZA(),f.qZA()}}function bn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",122),f.NdJ("click",function(){f.CHM(e);const t=f.oxw();return t.changeSelectedTab(1==t.selectedTab?2:1)}),f.TgZ(1,"span"),f._uU(2),f.qZA(),f.TgZ(3,"span",123),f.O4$(),f.TgZ(4,"svg",124),f._UZ(5,"path",125),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(2),f.Oqu(2==e.selectedTab?(null==e.currentLanguage?null:e.currentLanguage.later)||"Schedule Time":(null==e.currentLanguage?null:e.currentLanguage.req_time)||"Request Time")}}function xn(e,t){if(1&e&&(f.TgZ(0,"div",126),f.TgZ(1,"span"),f._uU(2),f.qZA(),f.TgZ(3,"span",123),f.O4$(),f.TgZ(4,"svg",124),f._UZ(5,"path",125),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.req_time)||"Request Time")}}function kn(e,t){if(1&e&&(f.TgZ(0,"div",127),f.TgZ(1,"div",128),f.TgZ(2,"div",107),f.TgZ(3,"div",13),f._uU(4),f.qZA(),f._UZ(5,"ng2-flatpickr",129),f.qZA(),f.qZA(),f.TgZ(6,"div",128),f.TgZ(7,"div",107),f.TgZ(8,"div",13),f._uU(9),f.qZA(),f._UZ(10,"ng2-flatpickr",130),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(4),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.date)||"Date"),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.timeFormatConfig2)("ngClass",f.VKq(10,fn,e.formErrors.request_time))("formControl",e.addForm.controls.request_time)("setDate",e.request_time),f.xp6(4),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.time)||"Time"),f.xp6(1),f.Q6J("config",e.timeFormatConfig)("formControl",e.addForm.controls.trip_time)("setDate",e.trip_time)}}function Zn(e,t){if(1&e&&(f.TgZ(0,"div",51),f.TgZ(1,"div",13),f._uU(2),f.qZA(),f.TgZ(3,"div",14),f.O4$(),f.TgZ(4,"svg",15),f._UZ(5,"path",132),f.qZA(),f.kcU(),f._UZ(6,"input",133),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.flight_number_title),f.xp6(4),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("formControl",e.addForm.controls.flight_number)}}function Cn(e,t){if(1&e&&(f.TgZ(0,"ng-option",136),f.TgZ(1,"span",137),f.TgZ(2,"div",138),f._UZ(3,"i",139),f.qZA(),f.TgZ(4,"span",140),f._uU(5),f.qZA(),f.qZA(),f.TgZ(6,"span"),f._uU(7),f.ALo(8,"datePipe"),f.ALo(9,"betterDate"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);f.Q6J("value",e),f.xp6(4),f.Q6J("title",null==e?null:e.flight_number),f.xp6(1),f.AsE(" ",null==e?null:e.flight_number," - ",null==e?null:e.airline_name," "),f.xp6(2),f.hij(" ",null!=e&&null!=e.raw&&null!=e.raw.departure&&e.raw.departure.estimated?f.xi3(8,5,f.l
1cZ(9,8,null==e||null==e.raw||null==e.raw.departure?null:e.raw.departure.estimated),i.formatTimeDate):"","")}}function Fn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",51),f.TgZ(1,"div",13),f._uU(2),f.qZA(),f.TgZ(3,"div",14),f.O4$(),f.TgZ(4,"svg",15),f._UZ(5,"path",132),f.qZA(),f.kcU(),f.TgZ(6,"ng-select",134),f.NdJ("input",function(t){return f.CHM(e),f.oxw(2).searchPlace(t.target.value,1)})("change",function(t){return f.CHM(e),f.oxw(2).getFlight(t)})("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedFlightObj=t}),f.YNc(7,Cn,10,10,"ng-option",135),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.flight_number_title),f.xp6(4),f.Q6J("clearable",!1)("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("ngModel",e.selectedFlightObj)("ngModelOptions",f.DdM(6,rn)),f.xp6(1),f.Q6J("ngForOf",e.responseFlight)}}function Tn(e,t){if(1&e&&(f.TgZ(0,"div"),f.YNc(1,Zn,7,3,"div",131),f.YNc(2,Fn,8,7,"div",131),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngIf",!e.checkFligth),f.xp6(1),f.Q6J("ngIf",e.checkFligth)}}function An(e,t){1&e&&(f.TgZ(0,"div",102),f._UZ(1,"div",103),f.qZA())}function Pn(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Taxi"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isTaxiActive))}}function wn(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Hourly"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isRentalActive))}}function qn(e,t){if(1&e&&(f.TgZ(0,"div",106),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}function Dn(e,t){if(1&e&&(f.TgZ(0,"div",142),f.TgZ(1,"h4",143),f._uU(2),f.ALo(3,"datePipe"),f.ALo(4,"betterDate"),f.ALo(5,"datePipe"),f.ALo(6,"betterDate"),f.qZA(),f.TgZ(7,"p",144),f._uU(8),f.qZA(),f.TgZ(9,"ul",145),f.TgZ(10,"h5",146),f._uU(11),f.qZA(),f.TgZ(12,"li",147),f.TgZ(13,"label",148),f._uU(14),f.qZA(),f.TgZ(15,"span",149),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"li",147),f.TgZ(18,"label",148),f._uU(19),f.qZA(),f.TgZ(20,"span",149),f._uU(21),f.ALo(22,"date"),f.qZA(),f.qZA(),f.TgZ(23,"li",147),f.TgZ(24,"label",148),f._uU(25),f.qZA(),f.TgZ(26,"span",149),f._uU(27),f.qZA(),f.qZA(),f.TgZ(28,"li",147),f.TgZ(29,"label",148),f._uU(30),f.qZA(),f.TgZ(31,"span",149),f._uU(32),f.qZA(),f.qZA(),f.TgZ(33,"h5",146),f._uU(34),f.qZA(),f.TgZ(35,"li",147),f.TgZ(36,"label",148),f._uU(37),f.qZA(),f.TgZ(38,"span",149),f._uU(39),f.qZA(),f.qZA(),f.TgZ(40,"li",147),f.TgZ(41,"label",148),f._uU(42),f.qZA(),f.TgZ(43,"span",149),f._uU(44),f.ALo(45,"date"),f.qZA(),f.qZA(),f.TgZ(46,"li",147),f.TgZ(47,"label",148),f._uU(48),f.qZA(),f.TgZ(49,"span",149),f._uU(50),f.qZA(),f.qZA(),f.TgZ(51,"li",147),f.TgZ(52,"label",148),f._uU(53),f.qZA(),f.TgZ(54,"span",149),f._uU(55),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.AsE("",e.request_time?f.xi3(3,21,f.lcZ(4,24,e.request_time),"d/M/yyyy"):"-"," ",e.trip_time?f.xi3(5,26,f.lcZ(6,29,e.trip_time),"hh:mm a"):""," "),f.xp6(6),f.hij("",null==e.selectedFlightObj?null:e.selectedFlightObj.airline_name," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.departure," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.actual?f.xi3(22,31,null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.gate:"-"," "),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.arrival," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.actual?f.xi3(45,34,null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.gate:"-"," ")}}function On(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"h5",150),f._uU(2),f.TgZ(3,"div",151),f.TgZ(4,"input",152),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeReturn(t)}),f.qZA(),f._UZ(5,"label",153),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw();f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.return," "),f.xp6(2),f.Q6J("checked",e.returnEnable)}}function Ln(e,t){if(1&e&&f._UZ(0,"span",157),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.return_time,f.oJD)}}function Mn(e,t){if(1&e&&(f.TgZ(0,"div",154),f.TgZ(1,"div",128),f.TgZ(2,"div",107),f.TgZ(3,"div",13),f._uU(4),f.qZA(),f._UZ(5,"ng2-flatpickr",129),f.qZA(),f.qZA(),f.TgZ(6,"div",128),f.TgZ(7,"div",107),f.TgZ(8,"div",13),f._uU(9),f.qZA(),f._UZ(10,"ng2-flatpickr",155),f.qZA(),f.qZA(),f.YNc(11,Ln,1,1,"span",156),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(13,fn,e.formErrors.return_time)),f.xp6(4),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.date)||"Date"),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.returnDateFormatConfig)("ngClass",f.VKq(15,fn,e.formErrors.return_time))("formControl",e.addForm.controls.return_date)("setDate",e.return_date),f.xp6(4),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.time)||"Time"),f.xp6(1),f.Q6J("config",e.returnTimeFormatConfig)("formControl",e.addForm.controls.return_trip_time)("setDate",e.return_trip_time)("ngClass",f.VKq(17,fn,e.formErrors.return_time)),f.xp6(1),f.Q6J("ngIf",e.formErrors.return_time)}}function Vn(e,t){if(1&e&&(f.TgZ(0,"span",111),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function Sn(e,t){if(1&e&&(f.TgZ(0,"span",111),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function En(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",158),f.TgZ(1,"div",107),f.TgZ(2,"div",13),f._uU(3),f.qZA(),f.TgZ(4,"div",14),f.O4$(),f.TgZ(5,"svg",15),f._UZ(6,"path",16),f.qZA(),f.kcU(),f.TgZ(7,"app-search-box-google",17),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchReturn(t)})("searchEvent",function(t){return f.CHM(e),f.oxw().returnsearchEvent(t)}),f.qZA(),f.qZA(),f.YNc(8,Vn,2,1,"span",19),f.qZA(),f.TgZ(9,"div",107),f.TgZ(10,"div",13),f._uU(11),f.qZA(),f.TgZ(12,"div",14),f.O4$(),f.TgZ(13,"svg",15),f._UZ(14,"path",159),f.qZA(),f.kcU(),f.TgZ(15,"app-search-box-google",17),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchReturnDestination(t)})("searchEvent",function(t){return f.CHM(e),f.oxw().returnsearchEventDestination(t)}),f.qZA(),f.qZA(),f.YNc(16,Sn,2,1,"span",19),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(3),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.pickup)||"Return Pickup"),f.xp6(4),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_pick_location)||"Search Return Pickup Location")("isBooing",!0)("responseData",e.responseDataReturn)("searchText",e.returnsearchText)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returnpickupRegionFound),f.xp6(3),f.hij("",(null==e.currentLanguage?null:e.currentLanguage.select_destination)||"Return Drop-off"," "),f.xp6(4),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_des_loc)||"Search Return Destination Location")("isBooing",!0)("responseData",e.responseDataReturnDestination)("searchText",e.returnsearchTextDestionation)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returndropRegionFound)}}function Un(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",165),f.TgZ(1,"input",166),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).changeGender(null==t?null:t.value)}),f.qZA(),f._uU(2),f._UZ(3,"div",167),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(2);f.xp6(1),f.Q6J("value",null==e?null:e.value)("formControl",i.addForm.controls.gender)("checked",i.genderTab==(null==e?null:e.value)),f.xp6(1),f.hij(" ",null==e?null:e.label," ")}}function Nn(e,t){if(1&e&&(f.TgZ(0,"div",160),f.TgZ(1,"h5",161),f._uU(2),f.qZA(),f.TgZ(3,"div",162),f.TgZ(4,"div",163),f.YNc(5,Un,4,4,"label",164),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gender,""),f.xp6(3),f.Q6J("ngForOf",e.gender)}}function In(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.AsE("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",null==e?null:e.charge_value,")")}}function jn(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit;f.xp6(1),f.hij("(",null==e?null:e.charge_value,"%)")}}function Rn(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",null!=t.currentCompanyDetail&&t.currentCompanyDetail.distance_unit?"Per "+(null==t.currentCompanyDetail?null:t.currentCompanyDetail.distance_unit):"Per Km"," )")}}const zn=function(e){return{"pointer-events":e}};function Jn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",173),f.TgZ(1,"div",174),f.TgZ(2,"a",175),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("child_seat",t)}),f._uU(3,"-"),f.qZA(),f._UZ(4,"input",176),f.TgZ(5,"a",177),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("child_seat",t)}),f._uU(6,"+"),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(2),f.Q6J("ngStyle",f.VKq(2,zn,0==e.addForm.controls.child_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.child_seat)}}function Bn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",173),f.TgZ(1,"div",174),f.TgZ(2,"a",175),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("booster_seat",t)}),f._uU(3,"-"),f.qZA(),f._UZ(4,"input",176),f.TgZ(5,"a",177),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("booster_seat",t)}),f._uU(6,"+"),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(2),f.Q6J("ngStyle",f.VKq(2,zn,0==e.addForm.controls.booster_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.booster_seat)}}function Yn(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",173),f.TgZ(1,"div",174),f.TgZ(2,"a",175),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementDynamicCharge(t)}),f._uU(3,"-"),f.qZA(),f._UZ(4,"input",178),f.TgZ(5,"a",177),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementDynamicCharge(t)}),f._uU(6,"+"),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2).$implicit;f.xp6(2),f.Q6J("ngStyle",f.VKq(2,zn,((null==e?null:e.currentValue)||0)<=1?"none":"auto")),f.xp6(2),f.Q6J("value",(null==e?null:e.currentValue)||0)}}function Qn(e,t){if(1&e){const e=f.EpF();
1f.ynx(0),f.TgZ(1,"label",170),f.TgZ(2,"input",171),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().$implicit;return f.oxw(2).checkOtherCharge(t,i)}),f.qZA(),f._uU(3),f.YNc(4,In,2,2,"ng-container",1),f.YNc(5,jn,2,1,"ng-container",1),f.YNc(6,Rn,2,3,"ng-container",1),f._UZ(7,"div",167),f.qZA(),f.YNc(8,Jn,7,4,"div",172),f.YNc(9,Bn,7,4,"div",172),f.YNc(10,Yn,7,4,"div",172),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(2),f.MGl("id","customcheckbox-",null==e?null:e.other_charges_id,""),f.s9C("value",null==e?null:e.checked),f.Q6J("checked",null==e?null:e.checked)("disabled",!(null==e||!e.is_required)),f.xp6(1),f.hij(" ",null==e?null:e.title," "),f.xp6(1),f.Q6J("ngIf",2==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",3==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",t.displayChidSheet&&"child_seat"==(null==e?null:e.charges_key)&&(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.displayBoosterSheet&&"booster_seat"==(null==e?null:e.charges_key)&&(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.isDynamicCalculationCharge(e)&&(null==e?null:e.checked))}}function Hn(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Qn,11,11,"ng-container",1),f.BQk()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",!(null!=e&&e.is_required))}}function $n(e,t){if(1&e&&(f.TgZ(0,"div",168),f.TgZ(1,"div",13),f._uU(2),f.qZA(),f.YNc(3,Hn,2,1,"ng-container",169),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.other_charges),f.xp6(1),f.Q6J("ngForOf",e.otherChargesArray)}}function Gn(e,t){1&e&&f._UZ(0,"span",184)}function Kn(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",185),f._UZ(2,"input",186),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);let i;f.xp6(1),f.Q6J("ngClass",f.VKq(2,fn,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.enter_value)}}function Wn(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",183),f.TgZ(2,"div",187),f.TgZ(3,"ng2-flatpickr",188),f.NdJ("onChange",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw(2).onDateChange(t,i)}),f.qZA(),f.TgZ(4,"span",189),f._UZ(5,"i",190),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(2);let i;f.xp6(2),f.Q6J("ngClass",f.VKq(2,fn,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("config",t.dateFormatConfig)}}function Xn(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",185),f._UZ(2,"ng-select",191),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);let i;f.xp6(1),f.Q6J("ngClass",f.VKq(4,fn,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("items",e.value.options)("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("multiple",!0)}}function eo(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",185),f._UZ(2,"ng-select",192),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);let i;f.xp6(1),f.Q6J("ngClass",f.VKq(3,fn,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("items",e.value.options)}}function to(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",193),f.TgZ(2,"div",194),f.TgZ(3,"a",195),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw(2).decrement(t)}),f._uU(4,"-"),f.qZA(),f._UZ(5,"input",196),f.TgZ(6,"a",197),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw(2).increment(t)}),f._uU(7,"+"),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(2);let i;f.xp6(2),f.Q6J("ngClass",f.VKq(1,fn,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid)))}}function io(e,t){1&e&&f._UZ(0,"i",210)}function no(e,t){1&e&&f._UZ(0,"i",211)}function oo(e,t){1&e&&(f.TgZ(0,"span"),f._uU(1,"Upload"),f.qZA())}function ao(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",212),f.NdJ("click",function(){f.CHM(e),f.oxw();const t=f.MAs(11),i=f.oxw().index;return f.oxw(2).removeDocumentFile(i,t)}),f._UZ(1,"i",116),f.qZA()}}function ro(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",198),f.TgZ(2,"div",199),f.TgZ(3,"div",200),f.YNc(4,io,1,0,"i",201),f.TgZ(5,"span",202),f._uU(6),f.qZA(),f.qZA(),f.TgZ(7,"label",203),f.YNc(8,no,1,0,"i",56),f.YNc(9,oo,2,0,"span",1),f.TgZ(10,"input",204,205),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw(2).documentFileChangeEvent(t,i)}),f.qZA(),f.qZA(),f.YNc(12,ao,2,0,"button",206),f.qZA(),f._UZ(13,"input",207),f._UZ(14,"input",208),f.TgZ(15,"p",209),f._uU(16,"* Max file size should be 21 MB"),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw(),t=e.$implicit,i=e.index,n=f.oxw(2);let o;f.xp6(1),f.Q6J("ngClass",f.VKq(14,fn,n.formSubmited&&t.value.is_mandatory&&(null==(o=t.get("value"))?null:o.invalid))),f.xp6(2),f.ekj("has-file",!!n.documentFileNames[i]),f.xp6(1),f.Q6J("ngIf",n.documentFileNames[i]),f.xp6(2),f.hij(" ",n.documentFileNames[i]||"No file chosen"," "),f.xp6(1),f.ekj("is-loading",n.documentUploadLoading[i])("is-disabled",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",!n.documentUploadLoading[i]),f.xp6(1),f.Q6J("id","documentUpload_"+i)("disabled",n.documentUploadLoading[i]),f.xp6(2),f.Q6J("ngIf",n.documentFileNames[i]&&!n.documentUploadLoading[i])}}function lo(e,t){if(1&e&&(f.ynx(0,112),f.TgZ(1,"div",180),f.TgZ(2,"label",181),f._uU(3),f.qZA(),f.YNc(4,Gn,1,0,"span",182),f.TgZ(5,"div",183),f.YNc(6,Kn,3,4,"ng-container",1),f.YNc(7,Wn,6,4,"ng-container",1),f.YNc(8,Xn,3,6,"ng-container",1),f.YNc(9,eo,3,5,"ng-container",1),f.YNc(10,to,8,3,"ng-container",1),f.YNc(11,ro,17,16,"ng-container",1),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.$implicit,i=t.index,n=f.oxw(2);f.Q6J("formGroupName",i),f.xp6(3),f.Oqu(e.value.label),f.xp6(1),f.Q6J("ngIf",e.value.is_mandatory),f.xp6(2),f.Q6J("ngIf",e.value.field_type==n.TEXT_BOX_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DATE_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.MULTI_SELECT_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DROPDOWN_FIELD),f.xp6(1),f.Q6J("ngIf",5==e.value.field_type),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DOCUMENT_FIELD)}}function so(e,t){if(1&e&&(f.TgZ(0,"div",179),f.YNc(1,lo,12,9,"ng-container",21),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngForOf",e.addForm.controls.properties.controls)}}function uo(e,t){1&e&&f._UZ(0,"i",211)}function co(e,t){1&e&&(f.TgZ(0,"div",102),f._UZ(1,"div",103),f.qZA())}function ho(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Taxi"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isTaxiActive))}}function go(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Hourly"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isRentalActive))}}function po(e,t){if(1&e&&(f.TgZ(0,"div",106),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}function mo(e,t){if(1&e&&(f.TgZ(0,"span",246),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij("Starting ",null==e.currentLanguage?null:e.currentLanguage.from,"")}}function _o(e,t){if(1&e&&(f.TgZ(0,"span",247),f._uU(1),f.ALo(2,"roundFraction"),f.ALo(3,"bookingTotalFare"),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(2,2,f.xi3(3,5,e,t.returnEnable),t.roundFormate),"")}}function fo(e,t){if(1&e&&(f.TgZ(0,"span",247),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij("Taxi ",null==e.currentLanguage?null:e.currentLanguage.meter,"")}}function vo(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",248),f.TgZ(1,"div",249),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().$implicit;return f.oxw().toggleCollapse(t)}),f._UZ(2,"i",250),f.qZA(),f.qZA()}if(2&e){const e=f.oxw().$implicit;f.xp6(2),f.Q6J("ngClass",e.isCollapsed?"fa fa-angle-down":"fa fa-angle-up")}}function yo(e,t){if(1&e&&(f.TgZ(0,"td",236),f._uU(1),f.TgZ(2,"span",235),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function bo(e,t){if(1&e&&(f.TgZ(0,"td",236),f._uU(1),f.TgZ(2,"span",235),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.zone_price,": "),f.xp6(2),f.hij(" ",null!=e&&e.zone_price?null==e?null:e.zone_price:"","")}}function xo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.minimum_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate):"0","")}}function ko(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.base_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.base_fare,t.roundFormate):"0","")}}function Zo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate),"")}}function Co(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate),"")}}function Fo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate),"")}}function To(e,t){if(1&e&&(f.ynx(0),f.YNc(1,xo,6,6,"div",243),f.YNc(2,ko,6,6,"div",243),f.YNc(3,Zo,6,6,"div",243),f.YNc(4,Co,6,6,"div",243),f.YNc(5,Fo,6,6,"div",243),f.BQk()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.surge_fare)}}function Ao(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",251),f.TgZ(2,"span",241),f._uU(3),f.qZA(),f.TgZ(4,"span",48),f._uU(5),f.ALo(6,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(7,"div",251),f.TgZ(8,"span",241),f._uU(9),f.qZA(),f.TgZ(10,"span",48),f._uU(11),f.ALo(12,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(13,"div",251),f.TgZ(14,"span",241),f._uU(15),f.qZA(),f.TgZ(16,"span",48),f._uU(17),f.ALo(18,"roundFraction"),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw(2).$implicit,n=f.oxw();f.xp6(3),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.min_hours?null==n.currentLanguage?null:n.currentLanguage.min_hours:"Minimum Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",e.minHours?f.xi3(6,9,e.minHours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.no_of_hours?null==n.currentLanguage?null:n.currentLanguage.no_of_hours:"No. of Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",null!=i&&i.pricing.selected_hours?f.xi3(12,12,null==i?null:i.pricing.selected_hours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.hourly_rate?null==n.currentLanguage?null:n.currentLanguage.hourly_rate:"Hourly Rate",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(18,15,e.hourlyRate,n.roundFormate),"")}}function Po(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Ao,19,18,"ng-container",1),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.Q6J("ngIf",t.hourlyPackageCardDisplay(e))}}function wo(e,t){if(1&e&&(f.TgZ(0,"div",238),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.out_of_service_area_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.out_of_service_area_charges,t.roundFormate),"")}}function qo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.zone_extra_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges,t.roundFormate),"")}}function Do(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_passenger_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraPasse
1ngerCharge,e.roundFormate)," ")}}function Oo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_luggage_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraLuggageCharge,e.roundFormate),"")}}function Lo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.previous_dues),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.walletBalance,e.roundFormate),"")}}function Mo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e?null:e.final_fare.tax_amount,t.roundFormate),"")}}function Vo(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",48),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",253),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",48),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(2);f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function So(e,t){if(1&e&&(f.TgZ(0,"div",254),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.other_charges,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.otherChargePrice,e.roundFormate),"")}}function Eo(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,2,null==e?null:e.charges,t.roundFormate),"")}}function Uo(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,3,null==e?null:e.charges,t.roundFormate)," (",(null==e?null:e.charge_value)+"%",")")}}function No(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq(" (",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",t.distance_unit?(null==t.currentLanguage?null:t.currentLanguage.per)+" "+t.distance_unit:null==t.currentLanguage?null:t.currentLanguage.per_km,")")}}function Io(e,t){if(1&e&&(f.TgZ(0,"div",256),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f.YNc(4,Eo,3,5,"ng-container",1),f.YNc(5,Uo,3,6,"ng-container",1),f._UZ(6,"div",167),f.YNc(7,No,2,3,"ng-container",1),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(2),f.Oqu(t.getOtherChargeBreakdownLabel(e)),f.xp6(2),f.Q6J("ngIf",2==(null==e?null:e.charge_type)||3==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",3==(null==e?null:e.charge_type))}}function jo(e,t){if(1&e&&(f.TgZ(0,"div"),f.YNc(1,Io,8,4,"div",255),f.qZA()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",e&&(e.checked||e.is_required))}}function Ro(e,t){if(1&e&&(f.TgZ(0,"td",236),f._uU(1),f.TgZ(2,"span",235),f._uU(3),f.ALo(4,"number"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(4,3,2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_distance:t.returnotherDetails.ride_distance,"1.1-1")," ",t.distance_unit," ")}}function zo(e,t){if(1&e&&(f.TgZ(0,"td",236),f._uU(1),f.TgZ(2,"span",235),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_time:t.returnotherDetails.ride_time," ",null==t.currentLanguage?null:t.currentLanguage.min," ")}}function Jo(e,t){if(1&e&&(f.TgZ(0,"td",236),f._uU(1),f.TgZ(2,"span",235),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(2);f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function Bo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate)," ")}}function Yo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.base_fare,t.roundFormate)," ")}}function Qo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate)," ")}}function Ho(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate)," ")}}function $o(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function Go(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Bo,6,6,"div",243),f.YNc(2,Yo,6,6,"div",243),f.YNc(3,Qo,6,6,"div",243),f.YNc(4,Ho,6,6,"div",243),f.YNc(5,$o,6,6,"div",243),f.BQk()),2&e){const e=f.oxw().ngIf;f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare)}}function Ko(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(2);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.tax_amount,t.roundFormate)," ")}}function Wo(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",48),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",253),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",48),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);
1f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function Xo(e,t){if(1&e&&(f.TgZ(0,"div",251),f.TgZ(1,"span",241),f._uU(2),f.qZA(),f.TgZ(3,"span",48),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(2);f.xp6(2),f.hij("- ",(null==t.currentLanguage?null:t.currentLanguage.return_trip_discount)||"Return Trip Discount",""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.return_trip_discount,t.roundFormate)," ")}}function ea(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",257),f.TgZ(2,"div",238),f.TgZ(3,"span",239),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"table",258),f.TgZ(6,"thead"),f.TgZ(7,"tr"),f.YNc(8,Ro,5,6,"td",237),f.YNc(9,zo,4,3,"td",237),f.qZA(),f.TgZ(10,"tr"),f.YNc(11,Jo,5,5,"td",237),f.qZA(),f.qZA(),f.qZA(),f.TgZ(12,"div",238),f.TgZ(13,"span"),f._uU(14),f.qZA(),f.qZA(),f.TgZ(15,"div",238),f.TgZ(16,"span",239),f._uU(17),f.qZA(),f.TgZ(18,"span",239),f._uU(19),f.qZA(),f.qZA(),f.YNc(20,Go,6,5,"ng-container",1),f.TgZ(21,"div",240),f.TgZ(22,"span",241),f._uU(23),f.qZA(),f.TgZ(24,"span",48),f._uU(25),f.ALo(26,"roundFraction"),f.qZA(),f.qZA(),f.YNc(27,Ko,6,6,"div",243),f.YNc(28,Wo,9,6,"div",244),f.YNc(29,Xo,6,6,"div",243),f.TgZ(30,"div",240),f.TgZ(31,"span",241),f._uU(32),f.qZA(),f.TgZ(33,"span",48),f._uU(34),f.ALo(35,"roundFraction"),f.ALo(36,"returnTripFareTotal"),f.qZA(),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw().$implicit,n=f.oxw();f.xp6(4),f.AsE(" ",(null==n.currentLanguage?null:n.currentLanguage.return)||"Return"," ",(null==n.currentLanguage?null:n.currentLanguage.trip)||"Trip"," "),f.xp6(4),f.Q6J("ngIf",n.returnotherDetails),f.xp6(1),f.Q6J("ngIf",n.returnotherDetails),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(3),f.hij("Note: ",null==n.currentLanguage?null:n.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.price_breakdown," "),f.xp6(2),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.rate," "),f.xp6(1),f.Q6J("ngIf","hourly"!=(null==n.selectedBookingTypeObj?null:n.selectedBookingTypeObj.field_key)&&"package"!=(null==n.selectedBookingTypeObj?null:n.selectedBookingTypeObj.field_key)),f.xp6(3),f.hij("+ ",null==n.currentLanguage?null:n.currentLanguage.trip_fare,""),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(26,18,null==e.final_fare?null:e.final_fare.amount,n.roundFormate)," "),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.return_trip_discount),f.xp6(3),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.final_fare),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(35,21,f.lcZ(36,24,i),n.roundFormate)," ")}}const ta=function(e){return{"list-focus":e}},ia=function(e,t){return{collapse:e,show:t}};function na(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",213),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw().changeVehicle(t)}),f.TgZ(1,"div",214),f.TgZ(2,"div"),f._UZ(3,"img",215),f.qZA(),f.TgZ(4,"div",216),f.TgZ(5,"p",217),f._uU(6),f.qZA(),f.TgZ(7,"p",218),f._uU(8),f.qZA(),f.TgZ(9,"div",219),f.TgZ(10,"p",220),f.O4$(),f.TgZ(11,"svg",221),f._UZ(12,"path",222),f.qZA(),f.kcU(),f.TgZ(13,"span",223),f.TgZ(14,"span"),f._uU(15),f.qZA(),f._uU(16," - "),f.TgZ(17,"span"),f._uU(18),f.qZA(),f.qZA(),f.qZA(),f.TgZ(19,"p",224),f.O4$(),f.TgZ(20,"svg",225),f._UZ(21,"path",226),f.qZA(),f.kcU(),f.TgZ(22,"span",223),f.TgZ(23,"span"),f._uU(24),f.qZA(),f._uU(25," - "),f.TgZ(26,"span"),f._uU(27),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(28,"div",227),f.TgZ(29,"span",228),f.YNc(30,mo,2,1,"span",229),f.YNc(31,_o,4,8,"span",230),f.YNc(32,fo,2,1,"span",230),f.qZA(),f.YNc(33,vo,3,1,"div",231),f.qZA(),f.qZA(),f.TgZ(34,"div",232),f.TgZ(35,"table",233),f.TgZ(36,"thead"),f.TgZ(37,"tr"),f.TgZ(38,"td",234),f._uU(39),f.TgZ(40,"span",235),f._uU(41),f.ALo(42,"number"),f.qZA(),f.qZA(),f.TgZ(43,"td",236),f._uU(44),f.TgZ(45,"span",235),f._uU(46),f.qZA(),f.qZA(),f.qZA(),f.TgZ(47,"tr"),f.YNc(48,yo,5,5,"td",237),f.YNc(49,bo,4,2,"td",237),f.qZA(),f.qZA(),f.qZA(),f.TgZ(50,"div",238),f.TgZ(51,"span"),f._uU(52),f.qZA(),f.qZA(),f.TgZ(53,"div",238),f.TgZ(54,"span",239),f._uU(55),f.qZA(),f.TgZ(56,"span",239),f._uU(57),f.qZA(),f.qZA(),f.YNc(58,To,6,5,"ng-container",1),f.YNc(59,Po,2,1,"ng-container",1),f.TgZ(60,"div",240),f.TgZ(61,"span",241),f._uU(62),f.qZA(),f.TgZ(63,"span",48),f._uU(64),f.ALo(65,"roundFraction"),f.qZA(),f.qZA(),f.YNc(66,wo,6,6,"div",242),f.YNc(67,qo,6,6,"div",243),f.YNc(68,Do,6,6,"div",243),f.YNc(69,Oo,6,6,"div",243),f.YNc(70,Lo,6,6,"div",243),f.YNc(71,Mo,6,6,"div",243),f.YNc(72,Vo,9,6,"div",244),f.YNc(73,So,6,6,"div",245),f.YNc(74,jo,2,1,"div",169),f.TgZ(75,"div",240),f.TgZ(76,"span",241),f._uU(77),f.qZA(),f.TgZ(78,"span",48),f._uU(79),f.ALo(80,"roundFraction"),f.qZA(),f.qZA(),f.YNc(81,ea,37,26,"ng-container",1),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.last,n=f.oxw();f.ekj("border-bottom",!i),f.Q6J("ngClass",f.VKq(53,ta,e.checked||(null==n.selectedVehicleObj?null:n.selectedVehicleObj.id)===(null==e?null:e.id))),f.xp6(3),f.Q6J("src",null!=e&&e.vehicle_image?null==e?null:e.vehicle_image:"assets/img/car_image.png",f.LSH),f.xp6(3),f.hij(" ",e.title,""),f.xp6(2),f.Oqu(e.description),f.xp6(7),f.Oqu(e.capacity),f.xp6(3),f.Oqu(e.max_capacity),f.xp6(6),f.Oqu(e.vehicle_luggage_c
1apacity),f.xp6(3),f.Oqu(e.max_luggage_capacity),f.xp6(3),f.Q6J("ngIf","Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2==(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2===(null==e.pricing?null:e.pricing.calculation_type)),f.xp6(1),f.Q6J("ngIf",3!==(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",3===(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",("Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2!=(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2!=(null==e||null==e.pricing?null:e.pricing.calculation_type))&&"Y"==n.fareAccebility),f.xp6(1),f.Q6J("ngClass",f.WLB(55,ia,!e.isCollapsed,e.isCollapsed)),f.xp6(5),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(42,44,2==(null==e?null:e.vehicle_type_category)?n.otherDetails.bike_ride_distance:n.otherDetails.ride_distance,"1.1-1")," ",n.distance_unit,""),f.xp6(3),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?n.otherDetails.bike_ride_time:n.otherDetails.ride_time," ",null==n.currentLanguage?null:n.currentLanguage.min,""),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(1),f.Q6J("ngIf",null==e?null:e.zone_price),f.xp6(3),f.hij("Note: ",null==n.currentLanguage?null:n.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.price_breakdown),f.xp6(2),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.rate),f.xp6(1),f.Q6J("ngIf","hourly"!=(null==n.selectedBookingTypeObj?null:n.selectedBookingTypeObj.field_key)&&"package"!=(null==n.selectedBookingTypeObj?null:n.selectedBookingTypeObj.field_key)),f.xp6(1),f.Q6J("ngIf","hourly"==(null==n.selectedBookingTypeObj?null:n.selectedBookingTypeObj.field_key)),f.xp6(3),f.hij("+ ",null==n.currentLanguage?null:n.currentLanguage.trip_fare,""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(65,47,null==e||null==e.final_fare?null:e.final_fare.amount,n.roundFormate),""),f.xp6(2),f.Q6J("ngIf",null==e?null:e.final_fare.out_of_service_area_charges),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges),f.xp6(1),f.Q6J("ngIf",n.totalExtraPassengerCharge),f.xp6(1),f.Q6J("ngIf",n.totalExtraLuggageCharge),f.xp6(1),f.Q6J("ngIf",n.walletBalance<0),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",n.otherChargePrice),f.xp6(1),f.Q6J("ngForOf",n.otherChargesArray),f.xp6(3),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.final_fare),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(80,50,n.finalFare,n.roundFormate),""),f.xp6(2),f.Q6J("ngIf",n.returnEnable&&(null==e||null==e.pricing?null:e.pricing.return_trip_pricing))}}function oa(e,t){if(1&e&&(f.TgZ(0,"ng-option",136),f._uU(1),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(2);f.Q6J("value",null==e?null:e.id),f.xp6(1),f.xDo(" ",0==(null==e?null:e.slot_distance)?(null==i.currentLanguage?null:i.currentLanguage.unlimited)||"Unlimited":null==e?null:e.slot_distance," ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.distance_unit," | ",null==e?null:e.slot_hours," h | ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",null==e?null:e.slot_amount," ")}}function aa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",259),f.TgZ(1,"div",260),f.TgZ(2,"ng-select",261),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changePackages(),t.onInputChange(t.addForm.controls.packages)}),f.YNc(3,oa,2,6,"ng-option",135),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(3,fn,e.formErrors.packages)),f.xp6(1),f.Q6J("formControl",e.addForm.controls.packages),f.xp6(1),f.Q6J("ngForOf",e.rentalPackages)}}function ra(e,t){if(1&e){const e=f.EpF();
1f.TgZ(0,"div",259),f.TgZ(1,"div",260),f.TgZ(2,"ng-select",262),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changeHours(),t.onInputChange(t.addForm.controls.hour)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(4,fn,e.formErrors.hour)),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_hour)("items",e.hoursArray)("formControl",e.addForm.controls.hour)}}function la(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",263),f.TgZ(1,"div",264),f.TgZ(2,"span",189),f._UZ(3,"i",265),f.qZA(),f.TgZ(4,"ng-select",266),f.NdJ("change",function(t){return f.CHM(e),f.oxw().onFilterChange(t,0)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Q6J("items",e.numberFilter)("formControl",e.addForm.controls.no_of_passenger)}}function sa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",263),f.TgZ(1,"div",264),f.TgZ(2,"span",189),f._UZ(3,"i",267),f.qZA(),f.TgZ(4,"ng-select",266),f.NdJ("change",function(t){return f.CHM(e),f.oxw().onFilterChange(t,1)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Q6J("items",e.luggageArray)("formControl",e.addForm.controls.trip_luggage)}}function ua(e,t){if(1&e&&f._uU(0),2&e){const e=t.item;f.hij(" ",null==e?null:e.charges_key," ")}}function da(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",268),f.TgZ(1,"ng-select",269),f.NdJ("change",function(t){return f.CHM(e),f.oxw().setPaymentMode(t)}),f.YNc(2,ua,1,1,"ng-template",270),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(6,fn,e.formErrors.paymentMode)),f.xp6(1),f.Q6J("items",e.paymentMode)("searchable",!1)("clearable",!1)("notFoundText",null==e.currentLanguage?null:e.currentLanguage.no_data_found)("formControl",e.addForm.controls.payment_mode_id)}}function ca(e,t){1&e&&(f.TgZ(0,"div",102),f._UZ(1,"div",103),f.qZA())}function ha(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Taxi"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isTaxiActive))}}function ga(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Hourly"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isRentalActive))}}function pa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",44),f.TgZ(1,"ng-select",45),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(4,rn))}}function ma(e,t){if(1&e&&(f.TgZ(0,"div",106),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}function _a(e,t){1&e&&(f.TgZ(0,"div",102),f._UZ(1,"div",103),f.qZA())}function fa(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Taxi "),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isTaxiActive))}}function va(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Hourly"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isRentalActive))}}function ya(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",44),f.TgZ(1,"ng-select",45),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(4,rn))}}function ba(e,t){if(1&e&&(f.TgZ(0,"div",106),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}function xa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"app-payment-gatway-list",271),f.NdJ("paymentSucsessBook",function(t){return f.CHM(e),f.oxw().afterPaymentSucsess(t)})("closePaymentMethod",function(t){return f.CHM(e),f.oxw().openPaymentGateway(t)})("requestBooking",function(){return f.CHM(e),f.oxw().onStripeRequestBooking()}),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("pre_payment",e.pre_payment)("pre_payment_value",e.pre_payment_value)("tripPayload",e.tripPayload)("FinalFare",e.returnEnable?e.totalFInalFare:e.finalFare)("hideStyle",!0)("is_yelowCab",!0)("trip_id",e.tripId)("trip_num",e.trip_number)}}function ka(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Taxi"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isTaxiActive))}}function Za(e,t){if(1&e&&(f.TgZ(0,"button",141),f._uU(1,"Hourly"),f.qZA()),2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(1,nn,e.isRentalActive))}}function Ca(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",44),f.TgZ(1,"ng-select",45),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw().changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(4,rn))}}function Fa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",277),f.TgZ(1,"input",278),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(3).changeQueuePickup(t)}),f.qZA(),f.TgZ(2,"div",279),f.TgZ(3,"div",280),f.TgZ(4,"div",281),f.TgZ(5,"h4",282),f._uU(6),f.qZA(),f.TgZ(7,"div",283),f.TgZ(8,"div",284),f.TgZ(9,"span",247),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.title),f.xp6(4),f.Oqu(e.address)}}function Ta(e,t){if(1&e&&(f.TgZ(0,"div",275),f.YNc(1,Fa,11,4,"label",276),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("ngForOf",e.queuePikupStandList)}}function Aa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",272),f.TgZ(1,"div",79),f.TgZ(2,"form",80),f.TgZ(3,"div",81),f.TgZ(4,"div",82),f.TgZ(5,"h4",83),f._uU(6,"Select Pickup Stand"),f.qZA(),f.TgZ(7,"button",273),f.TgZ(8,"span",85),f._uU(9,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(10,Ta,2,1,"div",86),f.TgZ(11,"div",87),f.TgZ(12,"button",274),f.NdJ("click",function(){return f.CHM(e),f.oxw().pickUpStandFormSubmit()}),f._uU(13," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(10),f.Q6J("ngIf",e.queuePikupStandList.length>0),f.xp6(2),f.Q6J("disabled",!e.pickUpStandForm.valid)}}function Pa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",277),f.TgZ(1,"input",278),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).fixZone(t)}),f.qZA(),f.TgZ(2,"div",279),f.TgZ(3,"div",280),f.TgZ(4,"div",281),f.TgZ(5,"h4",282),f._uU(6),f.qZA(),f.TgZ(7,"div",283),f.TgZ(8,"div",284),f.TgZ(9,"span",247),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.from_zone_title),f.xp6(4),f.Oqu(e.dropoff_location)}}function wa(e,t){if(1&e&&(f.TgZ(0,"div",275),f.YNc(1,Pa,11,4,"label",276),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngForOf",e.zonePriceData)}}function qa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",285),f.TgZ(1,"h6",286),f._uU(2),f.qZA(),f.TgZ(3,"p",287),f._uU(4),f.qZA(),f.TgZ(5,"input",288),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserPickupLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",167),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;
1f.xp6(2),f.hij("",null==e?null:e.location_type_name," "),f.xp6(2),f.Oqu(null==e?null:e.address),f.xp6(1),f.MGl("id","p-",i,"")}}function Da(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",285),f.TgZ(1,"h6",286),f._uU(2),f.qZA(),f.TgZ(3,"p",287),f._uU(4),f.qZA(),f.TgZ(5,"input",289),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserDropoffLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",167),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;f.xp6(2),f.Oqu(null==e?null:e.location_type_name),f.xp6(2),f.Oqu(e.address),f.xp6(1),f.MGl("id","d-",i,"")}}let Oa=(()=>{class e{constructor(e,t,i,n,o,a,r,l,s,u,d,c){this.authService=e,this.cd=t,this.yelowCabService=i,this.fb=n,this.taxiBookingService=o,this.yelowBookingService=a,this.toasterService=r,this.googleService=l,this.route=s,this.jwtService=u,this.Router=d,this.zoneUtilityService=c,this.DriverKeyUp=new x.xQ,this.DriverKeyUp2=new x.xQ,this.DriverKeyUp1=new x.xQ,this.DriverKeyUpReturn=new x.xQ,this.DriverKeyUpReturnDest=new x.xQ,this.formErrors={pickup_location:"",destination:"",request_time:"",start_date:"",end_date:"",paymentMode:"",paymentStatus:"",driver:"",apierror:"",corporate:"",inActive:"Corporate is InActive please Activate it",recurring_time:"",recurring_on:"",first_name:"",last_name:"",email:"",phone_no:"",dial_code:"",notes:"",return_time:"",employee:"",booking_type_id:"",hour:"",packages:""},this.rentalPackages=[],this.isCollapsed=!0,this.passengerType="MYSELF",this.storeOldVehiclePrice=0,this.check_time=!0,this.skipLogin=!1,this.isOtpVerification=!1,this.isBookingHold=!1,this.tripPropertiesIds=[],this.zoneIds=[],this.title="Template 5",this.hideBasicPage=!1,this.hideUserPage=!0,this.isFirstPart=!0,this.hidePayment=!0,this.hideSuccess=!0,this.channelPaymentType=null,this.channelPaymentTypeLabel=null,this.steps=[],this.currentStepIndex=0,this.no_of_passenger=1,this.trip_luggage=0,this.displayChidSheet=!1,this.displayBoosterSheet=!1,this.displayFlightNumber=!1,this.YELOWCAB_SERVICE_TYPE=14,this.otherChargArray=[],this.otherChargesArray=[],this.tripOtherCharges=[],this.loadingState=!1,this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.selectedOtherChargesArray=[],this.placeSearch=new x.xQ,this.responseFlight=[],this.key="e903329db5f17ff850162f4e8c872651",this.checkFligth=!1,this.transactionCategory=[],this.transactionCategoryList=[],this.showCode=!1,this.booking_type_id=null,this.formSubmited=!1,this.submitFirstPart=!1,this.checkpointsArrayNew=[],this.getWayPoint=[],this.timeFormatConfig2={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.request_time=e;const t=new Date(e[0])||null;this.addForm.controls.request_time.setValue(t),this.setDateintime()}}},this.Customer_id=null,this.zoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.returnzoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.paymentMode=[],this.allPaymentModes=[],this.allRideTypes=[],this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.zoneCutOffMinutes=null,this.requestTimeMinDate=null,this.pickupRegionFound=!0,this.pickupZoneFound=!0,this.dropRegionFound=!0,this.dropZoneFound=!0,this.showNextButton=!0,this.sameZoneTripRestricted=!1,this.regionResponse=[],this.totalExtraPassengerCharge=0,this.totalExtraLuggageCharge=0,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.clearPickup=!1,this.searchText=null,this.selectedCheckpointsArray=[],this.vehicleArray=[],this.filterVehicleArray=[],this.origin=w.jQ,this.queuePikupList=[],this.queuePikupData=null,this.queuePikupStandList=[],this.queuePikupFound=!1,this.selectQueuePickup=!1,this.checkOnlyPickupConfig="N",this.selectedPickupPoint=null,this.selectedUserPickupLocation=null,this.selectedUserDropoffLocation=null,this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[],this.locationTypeList=[{type_id:1,title:"Home"},{type_id:2,title:"Work"},{type_id:3,title:"Other"}],this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.zoneResponse=[],this.driverArray=[],this.autoDispatch=!0,this.onlineDriver=1,this.genderValue="M",this.queueId=null,this.checkpointValidity={},this.checkOutofServiceArea=!1,this.lastCheckPointValid=!0,this.skip_destination=!1,this.clearDestination=!1,this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.rideType=w.xk,this.corporateBookingConfirmation="N",this.bookingAssetsList=[],this.driverType=[],this.selectedTab=1,this.schedule_trip=!1,this.schedule_tripArray=null,this.requestMode="N",this.is_date=!1,this.marker=[],this.timeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onChange:e=>{e&&(console.log("selectedDates",e),this.selectedRequestTime=e)}},this.luggageArray=[],this.numberFilter=[],this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.returnEnable=!1,this.checkReturnTimeConfig=!1,this.returnFinalFare=0,this.returnTripDiscount=0,this.store_ride_distance=0,this.store_bike_distance=0,this.store_distance=0,this.startingFrom=!1,this.otherChargePrice=0,this.tripOtherChargePrice=0,this.queryParam={},this.returnDateFormatConfig={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.return_date=e;const t=new Date(e[0])||null;this.addForm.controls.return_date.setValue(t),this.setReturnTimeFromDate()}}},this.returnTimeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onClose:e=>{if(console.log("return_trip_time closed",e),null==e?void 0:e.length){const t=new Date(e[0]);this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t)}}},this.walletBalance=0,this.vehicleTypeArray=[],this.zonePropertiesIds=[],this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.TEXT_BOX_FIELD=1,this.DATE_FIELD=2,this.MULTI_SELECT_FIELD=3,this.DROPDOWN_FIELD=4,this.DOCUMENT_FIELD=6,this.documentUploadLoading={},this.documentFileNames={},this.isDocumentUploading=!1,this.DOCUMENT_MAX_FILE_SIZE=22020096,this.dateFormatConfig={dateFormat:"d/m/Y",time_24hr:!1,enableTime:!1},this.displayLoginForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.selectedButtonSingAUpLogin={button_id:1},this.currentUserDetail=null,this.content="",this.hoursArray=[{name:"1 hrs",value:1},{name:"2 hrs",value:2},{name:"3 hrs",value:3},{name:"4 hrs",value:4},{name:"5 hrs",value:5},{name:"6 hrs",value:6},{name:"7 hrs",value:7},{name:"8 hrs",value:8},{name:"9 hrs",value:9},{name:"10 hrs",value:10},{name:"11 hrs",value:11},{name:"12 hrs",value:12},{name:"13 hrs",value:13},{name:"14 hrs",value:14},{name:"15 hrs",value:15},{name:"16 hrs",value:16},{name:"17 hrs",value:17},{name:"18 hrs",value:18},{name:"19 hrs",value:19},{name:"20 hrs",value:20},{name:"21 hrs",value:21},{name:"22 hrs",value:22},{name:"23 hrs",value:23},{name:"24 hrs",value:24}],this.trip_number=null,this.gender=O.y7,this.genderTab="M",this.is_full_screen=!0,this.tabsOnly=!1,this.hours_pricing=0,this.package_pricing=0,this.agentMinDistance=0,this.agentLogin=!1,this.disableBtn=!1,this.vehicleTypes=[{title:"Sedan"},{title:"SUV"},{title:"Luxury"},{title:"Van"}],this.allocation_type=null}getZonePricingParams(){return{}}getStepClass(e){return e===this.currentStepIndex?"active-web-booking":e<this.currentStepIndex?"completed-web-booking":"inactive-web-booking"}isStepCompleted(e){return e<this.currentStepIndex}ngOnDestroy(){this.sub&&this.sub.unsubscribe(),this.mapObs&&this.mapObs.unsubscribe()}ngAfterViewInit(){this.mapObs=this.authService.mapScriptLoad.subscribe(e=>{(null==e?void 0:e.is_load)&&this.patchDefaultUserLocation()})}patchDefaultUserLocation(){(null==navigator?void 0:navigator.geolocation)&&(null==navigator||navigator.geolocation.getCurrentPosition(e=>{e&&this.googleService.getAddressFromLatLng(e.coords.latitude,e.coords.longitude).then(e=>{var t,i,n,o,a,r,l,s;if(e){let u={full_text:null===(t=null==e?void 0:e.results[0])||void 0===t?void 0:t.formatted_address,place_id:null===(i=null==e?void 0:e.results[0])||void 0===i?void 0:i.place_id,latitude:null===(a=null===(o=null===(n=null==e?void 0:e.results[0])||void 0===n?void 0:n.geometry)||void 0===o?void 0:o.location)||void 0===a?void 0:a.lat(),longitude:null===(s=null===(l=null===(r=null==e?void 0:e.results[0])||void 0===r?void 0:r.geometry)||void 0===l?void 0:l.location)||void 0===s?void 0:s.lng()};this.searchEvent(u)}})}))}ngOnInit(){!window.localStorage.getItem("query_language_code")&&!window.localStorage.getItem("language_code")&&window.localStorage.setItem("query_language_code","en"),this.createForm(),this.route.queryParams.subscribe(e=>{console.log("Current queryParams >>>",e),e.agent_id&&(this.agent_id=e.agent_id,this.jwtService.saveAgentId(this.agent_id));const t=this.jwtService.getAgentId();this.agent_id=t,t&&e.agent_id!==t&&(this.agentLogin=!0,this.getCommisionDetails(t),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:t},queryParamsHandling:"merge",replaceUrl:!0}))}),this.pickUpStandForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],pickup_latitude:[null],pickup_longitude:[null]}),this.validationMessages={first_name:{required:"Please enter First Name",whiteSpace:"* Space not allowed"},last_name:{required:"Please enter last name",whiteSpace:"* Space not allowed"},email:{required:"* Please enter email",validateEmail:"* Please enter valid email"},phone_no:{required:"Please enter phone number",minlength:"Please enter at least 6 digits",maxlength:"Please enter at most 11 digits"},dial_code:{required:"Please enter dial code",validateDialCode:"Please enter correct dial code"},pickup_location:{required:"Enter Your Pickup Location",whiteSpace:"* Space not allowed"},destination:{required:"Please enter destination",whiteSpace:"* Space not allowed"},ride_type:{required:"Please enter ride type"},request_time:{required:"Please enter request time "},return_time:{required:"Please select return date and time"},recurring:{required:"Extra charge per "},start_date:{required:"Extra charge start date"},end_date:{required:"Please select the end date"},days:{required:"Extra charge per luggage"},auto_dispatch:{required:"Please enter waiting time charge"},driver:{required:"Please select the driver"},paymentMode:{required:"Please provide the payment type"},paymentStatus:{required:"Please provide the payment type"},notes:{required:"Please enter notes"},corporate:{required:"Please enter Corporate"},recurring_time:{required:"Please select the time"},recurring_on:{required:"Please select the days"},employee:{required:"Please select Employee"},booking_type_id:{required:"Please select Booking type"},packages:{required:"Please select packages"},hour:{required:"Please select hour"}},this.initDefaultReturnDateTime(),this.authService.langaugeListSubject.subscribe(e=>{this.languageList=e,setTimeout(()=>{window.localStorage.getItem("query_language_code")&&(this.selectedLanguage=window.localStorage.getItem("query_language_code"),window.localStorage.removeItem("language_code"),this.changeLanguage())},500)}),this.sub=this.authService.langaugeSubjectData.subscribe(e=>{var t,i,n,o;this.currentLanguage=null==e?void 0:e.labels,this.selectedLanguage=null==e?void 0:e.language_code,this.steps=[{name:null===(t=this.currentLanguage)||void 0===t?void 0:t.quote_header,icon:"quote-icon",isActive:!1},{name:null===(i=this.currentLanguage)||void 0===i?void 0:i.transfer_header,icon:"transfer-icon",isActive:!0},{name:null===(n=this.currentLanguage)||void 0===n?void 0:n.payment_header,icon:"payment-icon",isActive:!1}],this.bookRideText=null===(o=this.currentLanguage)||void 0===o?void 0:o.book_ride}),this.authService.themeCode.subscribe(e=>{this.themeCodeData=e}),this.authService.currentUser.subscribe(e=>{Object.keys(e).length>0&&(this.currentUserDetail=e,this.getUserLocations(e.id),this.queryParam.user_id=e.id)}),this.authService.currentCompany.subscribe(e=>{var t,i;
1e&&(null==e?void 0:e.company_id)&&(this.currentCompanyDetail=e,this.formatTimeDate=this.currentCompanyDetail.company_date_format+" "+this.currentCompanyDetail.company_time_format,this.roundFormate=null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.round_format,this.distance_unit=null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.distance_unit,this.currentCompanyDetail.company_time_format.includes("a")||this.currentCompanyDetail.company_time_format.includes("A")||(this.timeFormatConfig.time_24hr=!0,this.timeFormatConfig.dateFormat="H:i",this.returnTimeFormatConfig.time_24hr=!0,this.returnTimeFormatConfig.dateFormat="H:i"),this.company_logo=e.company_logo,this.company_id=e.company_id,this.company_id&&(this.getPaymentConfig(),this.getVehicleType(this.company_id),this.getAllTripProperties(),this.getCustomeFields(),this.getRegionList(this.YELOWCAB_SERVICE_TYPE),this.ManagezoneData()),this.dialCode=e.country_dial_code,this.addForm.patchValue({dial_code:this.dialCode}))}),this.placeSearch.pipe((0,k.b)(300)).subscribe(e=>{this.searchFlight(e)}),this.checkModule(),this.DriverKeyUp.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName(e)}),this.DriverKeyUp2.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName2(e)}),this.DriverKeyUp1.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName1(e)}),this.DriverKeyUpReturn.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturn(e)}),this.DriverKeyUpReturnDest.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturnDest(e)})}getCommisionDetails(e){this.loadingState=!0,this.yelowBookingService.getCommisionById(e).subscribe(e=>{var t;this.loadingState=!1,this.agentMinDistance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.trip_minimum_distance},e=>{})}searchDriverByName2(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i,n;(null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places)||void 0===i?void 0:i.length)>0&&(this.responseDatacheckPoint=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.places)})}searchDriverByName1(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataDestionation=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturn(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturn=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturnDest(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturnDestination=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}createForm(){this.addForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],destination:[null,r.kI.compose([b.Sl])],checkpoint:[null],ride_type:[1,r.kI.compose([r.kI.required])],request_time:[null],return_date:[null],return_trip_time:[null],return_time:[null],return_pickup_location:[null],return_pickup_latitude:[null],return_pickup_longitude:[null],return_destination:[null],return_dropoff_latitude:[null],return_dropoff_longitude:[null],recurring:[null],start_date:[null],auto_dispatch:[!1,r.kI.compose([r.kI.required])],driver:[null],notes:[null],checkpoints:this.fb.array([]),properties:this.fb.array([]),gender:["M"],end_date:[null],recurring_time:[null],recurring_on:[null],paymentMode:[1,r.kI.compose([r.kI.required])],payment_mode_id:[null,r.kI.compose([r.kI.required])],trip_luggage:[this.trip_luggage],no_of_passenger:[this.no_of_passenger],paymentStatus:["pending",r.kI.compose([r.kI.required])],customer:[null],first_name:[null],last_name:[null],email:[null],phone_no:[null],dial_code:[this.dialCode],booster_seat:[0],child_seat:[0],flight_number:[null],booking_type_id:[null,r.kI.compose([r.kI.required])],additional_discount_type:[1],extra_charge_type:[1],trip_time:[null],hour:[null],packages:[null]}),this.getCategories()}checkModule(){this.authService.CommonModule.subscribe(e=>{e&&(this.checkFligth="Y"==(null==e?void 0:e.dspm_019),this.checkReturnTimeConfig=!!(null==e?void 0:e.dspm_012),this.key=null==e?void 0:e.dspm_019_01)}),this.authService.serviceConfig.subscribe(e=>{var t,i;e&&(this.skipLogin="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_LOGIN],e.csc_064&&(this.isOtpVerification="Y"==e.csc_064),this.skip_destination=!!e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION]&&"Y"===e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION],this.updateDestiantionValidation(this.skip_destination),this.pre_payment_value=null!==(i=null!==(t=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PRE_PAYMENT])&&void 0!==t?t:e.dpsc_030)&&void 0!==i?i:e.tsc_030,this.pre_payment="1"==this.pre_payment_value||1==this.pre_payment_value,e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD]&&(this.paymentModeConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD],this.applyPaymentModeConfig(1)),e.csc_041&&(this.checkReg
1ion=e.csc_041),this.checkGenderEnable=e[F.kh[this.YELOWCAB_SERVICE_TYPE].SHOW_GENDER_OPTIONS],"Y"==this.checkRegion&&e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]&&(this.checkOnlyPickupConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]),(e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE]||e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE])&&(this.requestMode=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE],this.requestModeSchedule=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE],this.getSeduleConfige(!0)),this.allocation_type=e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.autoDispatch=3!=this.allocation_type,this.showCode="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.displayLuggagePassenger="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].PassengerLuggage],e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]&&(this.fareAccebility=e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]),this.isBookingHold="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].HOLD_BOOKING])})}getMaxLuggagePassengerCapacity(){if(this.max_luggage_capacity_filter>0){this.luggageArray=[];for(let e=0;e<=this.max_luggage_capacity_filter;e++)this.luggageArray.push({id:e,name:`${e}`})}if(this.max_capacity_filter>=1){this.numberFilter=[];for(let e=1;e<=this.max_capacity_filter;e++)this.numberFilter.push({id:e,name:`${e}`})}}changeGender(e){this.genderValue=e,this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getCurrentStep(){return this.steps[this.currentStepIndex]}isCurrentStep(e){return e===this.currentStepIndex}getFormDetails(e){this.formData=e,this.no_of_passenger=null==e?void 0:e.no_of_passenger,this.trip_luggage=null==e?void 0:e.trip_luggage,this.isFirstPart=e.isFirstPart,this.firstPageData=e,e&&(this.hideBasicPage=!0,this.hideUserPage=!1),this.hidePayment=!0,this.currentStepIndex=1}editPage(e){this.currentStepIndex=0,this.isFirstPart=!0,this.hideUserPage=!0,this.hideBasicPage=!1,this.hidePayment=!0}goTripDetails(e){e&&(this.hidePayment=!0,this.hideUserPage=!1,this.currentStepIndex=1)}changeLanguage(){var e;localStorage.setItem("language_code",this.selectedLanguage);let t=this.languageList.find(e=>e.language_code==this.selectedLanguage);(null===(e=Object.keys(t))||void 0===e?void 0:e.length)>0&&this.authService.setlanguage([t])}displaySuccess(e){this.currentStepIndex=3,this.hidePayment=!0,this.hideSuccess=!1}displaySuccessresponse(e){var t;this.trip_id=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.booking_number}changeBookingType(e){this.booking_type_id=null,(null==e?void 0:e.id)&&(this.addForm.controls.booster_seat.setValue(0),this.addForm.controls.child_seat.setValue(0),this.addForm.controls.booster_seat.updateValueAndValidity(),this.addForm.controls.child_seat.updateValueAndValidity(),this.booking_type_id=null==e?void 0:e.id,this.selectedBookingTypeObj=e,["hourly","round"].includes(e.field_key)&&this.updateDestiantionValidation(!0),this.getotherCharges(null==e?void 0:e.id),this.getCustomeFields(),(this.pickup_latitude&&this.pickup_longitude||this.destination_latitude&&this.destination_longitude)&&(this.pickup_latitude&&this.pickup_longitude&&this.UpdateAndCheckPickUpLocation(this.pickup_latitude,this.pickup_longitude,!1),this.destination_latitude&&this.destination_longitude&&this.UpdateDestinationLocation(this.destination_latitude,this.destination_longitude,!1),this.bindMarkerPoints()),this.getFavoriteLocation(),this.selectedVehicleObj&&["hourly","package"].includes(null==e?void 0:e.field_key)&&this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj))}getCategories(){this.loadingState=!0,this.yelowCabService.getOtherCategoryList().subscribe(e=>{var t;if(this.loadingState=!1,e.status&&(this.transactionCategoryList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list.filter(e=>("hourly"==e.field_key||"package"==e.field_key?this.isRental=!0:("point_to_point"==e.field_key||"airport_drop_off_transfer"==e.field_key||"airport_pick_up_transfer"==e.field_key||"round"==e.field_key)&&(this.isTaxi=!0),e.is_active)),this.transactionCategoryList.length>0?(this.transactionCategory=this.transactionCategoryList,this.isTaxi?this.transactionCategory=this.transactionCategoryList.filter(e=>"point_to_point"==e.field_key||"airport_drop_off_transfer"==e.field_key||"airport_pick_up_transfer"==e.field_key||"round"==e.field_key):this.isRental&&(this.transactionCategory=this.transactionCategoryList.filter(e=>"hourly"==e.field_key||"package"==e.field_key))):this.transactionCategory=[],this.transactionCategory.length>0)){let e=localStorage.getItem("booking_type_id"),t={};t=e?this.transactionCategory.find(t=>
1t.id==e):this.transactionCategory[0],this.booking_type_id=null==t?void 0:t.id,this.isTaxiActive="point_to_point"==(null==t?void 0:t.field_key)||"airport_drop_off_transfer"==(null==t?void 0:t.field_key)||"airport_pick_up_transfer"==(null==t?void 0:t.field_key)||"round"==(null==t?void 0:t.field_key),this.isRentalActive="hourly"==(null==t?void 0:t.field_key)||"package"==(null==t?void 0:t.field_key),this.selectedBookingTypeObj=t,"round"==t.field_key&&this.updateDestiantionValidation(!0),this.getFavoriteLocation(),this.getCustomeFields(),this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.getotherCharges(this.booking_type_id)}},e=>{this.loadingState=!1})}getCustomeFields(){let e={service_type:this.YELOWCAB_SERVICE_TYPE,category_id:this.booking_type_id,company_id:JSON.parse(this.company_id),user_type:"0,3"};this.yelowCabService.getExtraFields(e).subscribe(e=>{var t;e.status&&(this.displayChidSheet=!1,this.displayBoosterSheet=!1,null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>("child_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayChidSheet=!0),"booster_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayBoosterSheet=!0),e.checked=1==(null==e?void 0:e.is_required),Object.assign({},e))))})}getotherCharges(e){let t={service_type:this.YELOWCAB_SERVICE_TYPE,booking_type_id:e,is_active:1};this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.yelowCabService.getOtherChargesList(t).subscribe(e=>{var t,i;e.status&&(this.allOtherChargesArray=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list,this.otherChargesArray=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.list.map(e=>(e.charges=0,e.checked=!1,e.currentValue=0,this.otherChargArray[null==e?void 0:e.charges_key]=e,Object.assign({},e))).filter(e=>1==(null==e?void 0:e.charges_category)))}),this.cd.detectChanges()}checkOtherCharge(e,t){var i,n;this.otherChargesArray=null===(i=this.otherChargesArray)||void 0===i?void 0:i.map(e=>{var i,n;return(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&(e.charges_key&&(null===(i=this.otherChargArray)||void 0===i?void 0:i[e.charges_key])&&(this.otherChargArray[e.charges_key].checked=!e.checked),e.checked=!e.checked,(0,S.Mf)(e)&&(e.currentValue=e.checked?Number(e.currentValue)>0?Number(e.currentValue):1:0,e.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[e.charges_key])&&(this.otherChargArray[e.charges_key].currentValue=e.currentValue))),Object.assign({},e)}),"booster_seat"==(null==t?void 0:t.charges_key)?(this.addForm.controls.booster_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.booster_seat.value):"child_seat"==(null==t?void 0:t.charges_key)&&(this.addForm.controls.child_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.child_seat.value);const o=null===(n=this.otherChargesArray)||void 0===n?void 0:n.find(e=>(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id));o&&(t.checked=o.checked,t.currentValue=o.currentValue),this.refreshOtherChargesFare()}checkTripOtherCharge(e,t){var i;this.tripOtherCharges=null===(i=this.tripOtherCharges)||void 0===i?void 0:i.map(e=>((null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&(e.checked=!e.checked),Object.assign({},e)))}getFlight(e){var t,i,n;e?(this.addForm.patchValue({flight_number:null===(t=e.flight)||void 0===t?void 0:t.iata}),this.flightNumbers=e,this.selectedFlightObj=this.flightNumbers,this.selectedFlightObjName=null===(n=null===(i=this.selectedFlightObj)||void 0===i?void 0:i.flight)||void 0===n?void 0:n.iata):(this.addForm.patchValue({flight_number:null}),this.selectedFlightObj=null)}searchPlace(e,t){""!==e.trim()&&this.placeSearch.next({search:e,type:t})}searchFlight(e){e&&(this.loadingState=!0,fetch(`https://api.aviationstack.com/v1/flights?access_key=${this.key}&flight_iata=${null==e?void 0:e.search}&type=departure`).then(e=>e.json()).then(e=>{e&&(this.responseFlight=e.data),this.loadingState=!1}
1).catch(e=>{this.loadingState=!1}))}incrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;null===(n=this.addForm.get(e))||void 0===n||n.setValue(a+1),t&&(t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value),this.selectedVehicleObj&&this.calCulateOtherCharges2()}decrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;a>0&&(null===(n=this.addForm.get(e))||void 0===n||n.setValue(a-1)),t&&(t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value),this.selectedVehicleObj&&this.calCulateOtherCharges2()}increment(e){const t=this.properties.at(e).get("value");t.setValue(t.value?Number(t.value)+1:1)}get properties(){return this.addForm.get("properties")}decrement(e){const t=this.properties.at(e).get("value");t.value>0&&t.setValue(Number(t.value)-1)}onInputChange(e=null){e?this.generateErrors(e):Z.op._generateErrors(this.addForm,this.formErrors,this.validationMessages,this.formSubmited)}generateErrors(e){Z.op._generateErrors(e,this.formErrors,this.validationMessages,this.formSubmited)}getFavoriteLocation(){this.yelowCabService.getFavoriteLocationList(this.booking_type_id).subscribe(e=>{var t,i;if(this.loadingState=!1,e.success||e.status){let n=e.data.location.map(e=>(e.latitude=parseFloat(e.latitude),e.longitude=parseFloat(e.longitude),e.full_text=e.address,delete e.address,e));n&&("airport_drop_off_transfer"!=(null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key)?(this.responseData=n,this.responseDatacheckPoint=n):(this.responseData=[],this.responseDatacheckPoint=[]),this.responseDataDestionation="airport_pick_up_transfer"!=(null===(i=this.selectedBookingTypeObj)||void 0===i?void 0:i.field_key)?n:[])}},e=>{})}searchDriverByName(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseData=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchEvent(e){var t,i,n,o;e?(this.onInputChange(this.addForm.controls.pickup_location),this.clearPickup=!1,this.submitFirstPart=!1,this.showNextButton=!1,this.addForm.controls.pickup_location.setValue(e.full_text),this.searchText=e.full_text,this.addForm.controls.pickup_location.updateValueAndValidity(),this.displayFlightNumber=!(!(null===(i=null===(t=this.addForm.controls.destination)||void 0===t?void 0:t.value)||void 0===i?void 0:i.toLowerCase().includes("airport"))&&!(null===(o=null===(n=this.addForm.controls.pickup_location)||void 0===n?void 0:n.value)||void 0===o?void 0:o.toLowerCase().includes("airport"))),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickup_latitude=e.latitude,this.pickup_longitude=e.longitude,this.UpdateAndCheckPickUpLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.pickup_latitude=e.data.latitude,this.pickup_longitude=e.data.longitude,this.UpdateAndCheckPickUpLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.pickup_location.setValue(null),this.addForm.controls.pickup_location.updateValueAndValidity(),this.pickup_latitude=null,this.pickup_longitude=null,this.bindMarkerPoints(),this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.vehicleArray=[],this.filterVehicleArray=[],this.finalFare=0,this.clearPickup=!0)}bindMarkerPoints(){let e=[{lat:this.pickup_latitude,lng:this.pickup_longitude},{lat:this.destination_latitude,lng:this.destination_longitude}];const t=this.addForm.get("checkpoints");this.getWayPoint=[],this.selectedCheckpointsArray=[],t.value.map(i=>{this.getWayPoint.push({latitude:i.lat,longitude:i.lng}),e.push({lat:i.lat,lng:i.lng}),this.selectedCheckpointsArray.push({id:t.value.length,latitude:i.lat,longitude:i.lng})})}addMarker(e){this.marker=[],null==e||e.forEach((e,t)=>{if((null==e?void 0:e.lat)&&(null==e?void 0:e.lng)){let t={lat:Number(e.lat),lng:Number(e.lng)};this.marker.push({position:t})}}),this.marker.forEach((e,t)=>{e.addListener("dragend",e=>
1{let i=e.latLng,n=i.lat(),o=i.lng();this.googleService.getAddressFromLatLng(n,o).then(e=>{e&&(this.draggedMarkerObj={updateIndex:t,address:e.results[0].formatted_address,lat:n,lng:o},this.updateMarker(this.draggedMarkerObj))})})})}updateMarker(e){0==e.updateIndex?(this.addForm.controls.pickup_location.setValue(e.address),this.searchText=e.address,this.addForm.controls.pickup_location.updateValueAndValidity(),this.UpdateAndCheckPickUpLocation(e.lat,e.lng,!1)):1==e.updateIndex?(this.addForm.controls.destination.setValue(e.address),this.searchTextDestionation=e.address,this.addForm.controls.destination.updateValueAndValidity(),this.UpdateDestinationLocation(e.lat,e.lng,!1)):(this.currenCheckpointInput=e.updateIndex-1,this.updateCheckPoint(e.lat,e.lng,e.address))}getRegionList(e){this.yelowBookingService.getCompanyRegionList(e).subscribe(e=>{var t;e&&(this.regionResponse=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list)||[])})}submitUserPickUpLocationForm(){if(this.selectedUserPickupLocation){let e=this.userPickipLocationsArray[this.selectedUserPickupLocation-1];e&&(this.pickup_latitude=parseFloat(e.latitude),this.pickup_longitude=parseFloat(e.longitude),this.searchText=e.address,this.searchEvent({latitude:this.pickup_latitude,longitude:this.pickup_longitude,full_text:e.address}))}this.closeUserPickupLocationForm()}closeUserPickupLocationForm(){$("#selectUserPickupLocation").modal("hide")}updateUserPickupLocation(e,t){this.selectedUserPickupLocation=e}updateUserDropoffLocation(e,t){this.selectedUserDropoffLocation=e}submitUserDropoffLocationForm(){if(this.selectedUserDropoffLocation){let e=this.userDropoffLocationsArray[this.selectedUserDropoffLocation-1];e&&(this.destination_latitude=parseFloat(e.latitude),this.destination_longitude=parseFloat(e.longitude),this.searchTextDestionation=e.address,this.searchEventDestination({latitude:this.destination_latitude,longitude:this.destination_longitude,full_text:e.address}))}this.closeUserDropoffLocationForm()}updateCheckPoint(e,t,i,n=!0){let o=!1;if("Y"==this.checkRegion){for(let i of this.regionResponse)o||(o=(0,Z.eD)(e.toFixed(5),t.toFixed(5),(0,C.U)(i.geofence)),this.selectedCheckPointRegionData=i);!0===o?(this.showNextButton=!0,this.updateDestiantionValidation(!1),this.checkPointsValidation(),this.updateRegionPointValiation()):"N"==this.checkOnlyPickupConfig?(this.showNextButton=!1,this.lastCheckPointValid=!1,this.checkOutofServiceArea=!1):(this.checkOutofServiceArea=!0,this.showNextButton=!0,this.lastCheckPointValid=!1)}else this.showNextButton=!0,this.lastCheckPointValid=!0;this.updateCheckPoints(i,e,t,this.currenCheckpointInput-1)}UpdateAndCheckPickUpLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){var i;n.pickup_latitude=e,n.pickup_longitude=t;let o=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)o||(o=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.selectedPickupRegionData=e);!0===o?(n.showNextButton=!0,n.pickupRegionFound=!0,n.checkDropUpLocation(n.origin.is_pickUp)):(n.pickupRegionFound=o,n.showNextButton=!1),n.updateRegionPointValiation()}else n.showNextButton=!0,n.pickupRegionFound=!0;if(n.fixZoneDisableDropoff=!1,n.zoneData.from=null,n.zoneData.from_title=null,n.zoneData.from_obj=null,n.zoneData.from_ids=null,n.pickupRegionFound?(yield n.zoneUtilityService.findPickupZone(n.pickup_latitude,n.pickup_longitude,n.zoneResponse,n.zoneData,()=>n.getZonePrice(),()=>{},n.getZonePricingParams()),(null===(i=n.zoneData)||void 0===i?void 0:i.from_ids)?n.loadZoneConfigurationForPickup(String(n.zoneData.from_ids)):n.resetZoneBookingOptions()):n.resetZoneBookingOptions(),n.addZoneOtherCharges(),n.queuePikupFound=!1,n.queuePikupList.length>0)for(let e of n.queuePikupList)n.queuePikupFound=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.queuePikupData=n.queuePikupFound?e:null;n.queuePikupData?n.getQueuePickupLatLong(n.queuePikupData.pickup_stand_id):n.queuePikupStandList=[],1===n.onlineDriver&&!n.autoDispatch&&n.getOnlineDriver(),n.updateSameZoneTripRestriction()})()}setAutoDispatch(e){this.autoDispatch=e,this.autoDispatch?(this.addForm.get("driver").setValidators([]),this.addForm.get("driver").setValue(null)):(this.getOnlineDriver(),this.addForm.get("driver").setValidators([r.kI.required])),this.addForm.get("driver").updateV
1alueAndValidity()}setOnlineDriver(e){this.onlineDriver=e,this.addForm.controls.driver.reset(),this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getOnlineDriver(){if(this.onlineDriverArray=[],this.pickup_latitude&&this.pickup_longitude){let e={company_id:this.currentCompanyDetail.company_id,latitude:this.pickup_latitude,longitude:this.pickup_longitude,service_type:this.YELOWCAB_SERVICE_TYPE};"Y"==this.checkGenderEnable&&(e.gender=this.genderValue),this.taxiBookingService.getNearByOnlineDriverList(e).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=[],i=[];e.data.forEach(e=>{(null==e?void 0:e.driver_id)&&t.push(null==e?void 0:e.driver_id),(null==e?void 0:e.distance)&&(i[null==e?void 0:e.driver_id]=1===this.currentCompanyDetail.distanceUnit_s_key_value?(null==e?void 0:e.distance).toFixed(2):(.621371192*(null==e?void 0:e.distance)).toFixed(2))}),this.getUserDetails(t,i)}else this.onlineDriverArray=[]})}else this.toasterService.error("Enter Your Pickup Location")}getUserDetails(e,t){if((null==e?void 0:e.length)>0){const i=null==e?void 0:e.join(",");this.yelowBookingService.getUserDetails(i).subscribe(e=>{e.status&&(this.driverArray=null==e?void 0:e.data.map(e=>(e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} ${(null==e?void 0:e.dial_code)?"("+(null==e?void 0:e.dial_code):""} ${(null==e?void 0:e.phone_number)?(null==e?void 0:e.phone_number)+")":""} ) ${t[e.id]} ${this.currentCompanyDetail.distance_unit}`,e)))})}}getDriverList(e){if(2===this.onlineDriver||3==this.allocation_type){let t={company_id:this.currentCompanyDetail.company_id,is_active:1};e&&e.term?t.search=e.term:this.driverArray=[],"Y"==this.checkGenderEnable&&(t.gender=this.genderValue),this.yelowBookingService.getDriversList(t).subscribe(e=>{var t;this.loadingState=!1,e.success||e.status?(this.driverArray=null===(t=e.data)||void 0===t?void 0:t.list,this.driverArray.forEach(e=>{e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} (${null==e?void 0:e.dial_code} ${null==e?void 0:e.phone_number})`})):this.driverArray=[]})}}getZonePrice(){this.yelowCabService.getZoneprice({from_zone_id:this.zoneData.from,dropoff_type:2,is_active:1}).subscribe(e=>{e.status?(this.zonePriceData=e.data.list,this.fixZonePriceData=this.zonePriceData[0],this.zonePriceData.length>0?(this.fixZoneDisableDropoff=!0,$("#fixdestination").modal("show")):(this.fixZonePriceData=null,this.fixZoneDisableDropoff=!1)):(this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null)})}getQueuePickupLatLong(e){this.yelowBookingService.getPikupPointsById(e).subscribe(e=>{var t,i;if(1===e.status){if(this.queuePikupStandList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pickup_point,this.queuePikupStandList.length>0){let t=this.queuePikupStandList[0];this.pickUpStandForm.patchValue({pickup_location:t.address,pickup_latitude:t.latitude,pickup_longitude:t.longitude}),this.queueId=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.queue_id,this.pickup_longitude=t.longitude,this.pickup_latitude=t.latitude}}else this.queuePikupStandList=[]})}OnSearchCheckpoint(e){""!==e.trim()&&this.DriverKeyUp2.next(e)}removeRow(e){this.currenCheckpointInput=null;const t=this.addForm.get("checkpoints");this.selectedCheckpointsArray.pop({id:t.controls.length,latitude:null,longitude:null}),t.removeAt(e),this.checkPointsValidation(!0),this.updateCheckPointsRegion(),this.cd.detectChanges(),this.bindMarkerPoints(),this.selectedCheckpointsArray.length<1&&(this.updateDestiantionValidation(this.skip_destination),this.onInputChange(this.addForm.controls.destination))}updateDestiantionValidation(e){e?(this.addForm.controls.destination.setValidators(null),this.addForm.controls.destination.updateValueAndValidity()):(this.addForm.controls.destination.setValidators(r.kI.required),this.addForm.controls.destination.updateValueAndValidity())}addNewRow(){const e=this.addForm.get("checkpoints");"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?this.selectedPickupRegionData?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location"):this.pickup_latitude&&this.pickup_longitude?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location")}validateCheckPoint(e){e.valid&&(e.controls.length<=2?e.controls.length>0&&!e.at(e.controls.length-1).valid?this.toasterService.error("Your Previous checkpoints is invali
1d!"):(e.push(this.initRows()),this.cd.detectChanges(),this.selectedCheckpointsArray.push({id:e.controls.length,latitude:null,longitude:null})):this.toasterService.error("You can only add maximum three checkpoints!"))}initRows(){return new r.cw({value:new r.NI(null,r.kI.compose([r.kI.required])),lat:new r.NI(null),lng:new r.NI(null),pickupLacation:new r.NI(this.selectedPickupRegionData),dropofupLacation:new r.NI(this.selectedDropRegionData),zone_array:new r.NI(this.regionResponse),checkRegion:new r.NI(this.checkRegion),checkOnlyPickup:new r.NI(this.checkOnlyPickupConfig)},{validators:C.v.is_point})}OnSearchDestination(e){""!==e.trim()&&this.DriverKeyUp1.next(e)}updateCheckPoints(e,t,i,n){const o=this.addForm.get("checkpoints");for(var a=0;a<o.length;a++)a==n&&o.at(a).patchValue({value:e,lat:t,lng:i});this.updateCheckPointsRegion(),setTimeout(()=>{this.bindMarkerPoints()},200)}updateCheckPointsRegion(){let e=this.addForm.get("checkpoints").value.map(e=>({latitude:Number(e.lat),longitude:Number(e.lng)}));this.checkpointValidity={},e.forEach("Y"===this.checkRegion?(e,t)=>{let i=!1;for(let n of this.regionResponse){const t=(0,C.U)(n.geofence);if((0,Z.eD)(e.latitude,e.longitude,t)){i=!0;break}}this.checkpointValidity[t]=i}:(e,t)=>{this.checkpointValidity[t]=!0})}searchEventCheckpoint(e,t){this.submitFirstPart=!1,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?this.updateCheckPoints(e.full_text,e.latitude,e.longitude,t):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(i=>{i.status&&i.data.latitude&&i.data.longitude&&this.updateCheckPoints(e.full_text,i.data.latitude,i.data.longitude,t)})}openUserPickupLocationForm(){$("#selectUserPickupLocation").modal("show")}OnSearch(e){""!==e.trim()&&this.DriverKeyUp.next(e)}checkDropUpLocation(e){this.selectedPickupRegionData&&this.selectedDropRegionData&&(this.selectedDropRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id?(e===this.origin.is_drop&&(this.dropRegionFound="Y"==this.checkOnlyPickupConfig),e===this.origin.is_pickUp&&(this.pickupRegionFound="Y"==this.checkOnlyPickupConfig),this.showNextButton="Y"==this.checkOnlyPickupConfig):(e===this.origin.is_drop&&(this.dropRegionFound=!0),e===this.origin.is_pickUp&&(this.pickupRegionFound=!0),this.showNextButton=!0)),this.selectedCheckPointRegionData&&this.selectedDropRegionData&&this.selectedPickupRegionData&&this.checkPointsValidation()}checkPointsValidation(e=null){this.selectedPickupRegionData&&this.selectedCheckPointRegionData?this.selectedCheckPointRegionData&&this.selectedPickupRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):this.selectedCheckPointRegionData&&this.selectedDropRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedDropRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):(!this.selectedPickupRegionData||!this.selectedDropRegionData&&!1===this.skip_destination)&&(this.showNextButton=!1):this.showNextButton="Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig,e&&(this.showNextButton=this.selectedDropRegionData&&this.selectedPickupRegionData?this.selectedDropRegionData.company_region_id==this.selectedPickupRegionData.company_region_id:"Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig)}UpdateDestinationLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){n.destination_latitude=e,n.destination_longitude=t,Number(n.destination_latitude).toFixed(5),Number(n.destination_longitude).toFixed(5);let i=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)i||(i=(0,Z.eD)(n.destination_latitude.toFixed(5),n.destination_longitude.toFixed(5),(0,C.U)(e.geofence)),n.selectedDropRegionData=e);!0===i?(n.showNextButton=!0,n.checkDropUpLocation(n.origin.is_drop),n.updateRegionPointValiation()):"N"==n.checkOnlyPickupConfig?(n.dropRegionFound=!1,n.showNextButton=!1,n.checkOutofServiceArea=!1):(n.checkOutofServiceArea=!0,n.dropRegionFound=!0,n.showNextButton=!0)}else n.showNextButton=!0,n.dropRegionFound=!0;n.zoneData.to=null,n.zoneData.to_title=null,n.zoneData.to_obj=null,n.zoneData.to_ids=null,n.dropRegionFound&&(yield n.zoneUtilityService.findDropoffZone(n.destination_latitude,n.destination_longitude,n.zoneResponse,n.zoneData,()=>{},n.getZonePricingParams())),n.addZoneOtherCharges(),n.updateSameZoneTripRestriction()})()}updateRegionPointValiation(){const e=this.addForm.get("checkpoints");if(e.controls.length>
10)for(let t of e.controls)"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?(t.patchValue({pickupLacation:this.selectedPickupRegionData,dropofupLacation:this.selectedDropRegionData}),t.setValidators(C.v.is_point)):(t.setValidators([]),t.setValidators(null)),t.updateValueAndValidity()}addZoneOtherCharges(){let e=this.allOtherChargesArray.filter(e=>{var t,i;let n=null==e?void 0:e.zone_id;return null!==n&&(n===(null===(t=this.zoneData)||void 0===t?void 0:t.to)&&2==(null==e?void 0:e.zone_type)||n===(null===(i=this.zoneData)||void 0===i?void 0:i.from)&&1==(null==e?void 0:e.zone_type))});this.otherChargesArray=this.allOtherChargesArray.filter(e=>1==(null==e?void 0:e.charges_category)),this.otherChargesArray=[...this.otherChargesArray,...e],this.cd.detectChanges()}ManagezoneData(){this.yelowCabService.getZoneList().subscribe(e=>{e&&(this.zoneResponse=e.data.list)})}getUserLocations(e){this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[]}searchEventDestination(e){var t,i,n,o;e?(this.clearDestination=!1,this.submitFirstPart=!1,this.onInputChange(this.addForm.controls.destination),this.showNextButton=!1,this.addForm.controls.destination.setValue(e.full_text),this.addForm.controls.destination.updateValueAndValidity(),this.searchTextDestionation=e.full_text,this.displayFlightNumber=!(!(null===(i=null===(t=this.addForm.controls.destination)||void 0===t?void 0:t.value)||void 0===i?void 0:i.toLowerCase().includes("airport"))&&!(null===(o=null===(n=this.addForm.controls.pickup_location)||void 0===n?void 0:n.value)||void 0===o?void 0:o.toLowerCase().includes("airport"))),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.destination_latitude=e.latitude,this.destination_longitude=e.longitude,this.UpdateDestinationLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.destination_latitude=e.data.latitude,this.destination_longitude=e.data.longitude,this.UpdateDestinationLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.destination.setValue(null),this.addForm.controls.destination.updateValueAndValidity(),this.destination_latitude=null,this.destination_longitude=null,this.bindMarkerPoints(),this.clearDestination=!0,this.selectedVehicleObjName=null,this.selectedVehicleObj=null)}openUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("show")}closeUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("hide")}changeSelectedTab(e,t=!0){1==e?(this.driverType=[{type_id:1,type_name:"Online Driver"}],this.isSchedual_trip=0,this.resetRequestTimeToInitialNow()):(this.driverType=[{type_id:1,type_name:"Online Driver"},{type_id:2,type_name:"All Driver"}],this.isSchedual_trip=1),this.addForm.controls.ride_type.setValue(e),this.selectedTab=e,2===this.selectedTab&&(this.zoneConfigActive?this.applyRequestTimeMinDate():this.getSeduleConfige(!1)),this.updateRecurringValidations(e,this.addForm)}resetRequestTimeToInitialNow(){this.setMinTime();const e=new Date(this.trip_time);this.request_time=e,this.addForm.controls.request_time.setValue(e),this.addForm.controls.request_time.updateValueAndValidity(),this.addForm.controls.trip_time.setValue(e),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(e)),this.returnEnable&&this.initDefaultReturnDateTime()}updateRecurringValidations(e,t){if(3===e)t.get("recurring_time").setValidators([r.kI.required]),t.get("recurring_time").updateValueAndValidity(),t.get("end_date").setValidators([r.kI.required]),t.get("end_date").updateValueAndValidity();else{t.controls.recurring_time.clearValidators(),t.get("recurring_time").updateValueAndValidity(),t.controls.end_date.clearValidators(),t.get("end_date").updateValueAndValidity();try{t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}catch(i){t.get("recurring_on").clearValidators(),t.get("recurring_on").updateV
1alueAndValidity()}}}getSeduleConfige(e=!0){this.yelowBookingService.scheduleconFig({company_id:this.currentCompanyDetail.company_id},F.kh[this.YELOWCAB_SERVICE_TYPE].SCHEDULE_MODULE).subscribe(t=>{if(this.loadingState=!1,t.success||t.status){if(this.schedule_tripArray=t.data,this.schedule_tripArray.length>0){this.schedule_trip=!0;for(let e of this.schedule_tripArray)e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].TIMEOUT?this.addMinutes(Number(e.config_value),null):e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].MAX_TIME&&this.addMinutes(null,Number(e.config_value));e&&!this.zoneConfigActive&&("Y"==this.requestMode&&"Y"==this.requestModeSchedule?(this.rideType=[{type_id:1,type_name:"Now"},{type_id:2,type_name:"Later"}],this.setRideType(1)):"Y"==this.requestModeSchedule?(this.rideType=[{type_id:2,type_name:"Later"}],this.setRideType(2)):"Y"==this.requestMode&&(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1)))}else this.zoneConfigActive||(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1));this.zoneConfigActive||(this.allRideTypes=[...this.rideType]),(this.zoneCutOffMinutes||2===this.selectedTab)&&this.applyRequestTimeMinDate()}})}addMinutes(e=null,t=null){if(e&&(this.min_date=e,this.request_time=new Date,this.setMinTime(),this.timeFormatConfig.minDate=new Date(new Date(this.trip_time).setSeconds(0,0)),this.timeFormatConfig2.minDate=new Date(new Date(this.trip_time).setHours(0,0,0,0)),this.request_time=this.trip_time,this.addForm.controls.request_time.setValue(this.trip_time)),t){this.max_date=t;let e=new Date(L().add(this.max_date,"minutes").toString()).setHours(23,59,59,999);this.timeFormatConfig2.maxDate=new Date(e),this.timeFormatConfig.maxDate=new Date(e)}this.is_date=!0}setRideType(e){this.selectedTab=e,this.isSchedual_trip=1==e?0:1,this.addForm.controls.ride_type.setValue(e),this.addForm.controls.ride_type.updateValueAndValidity(),2===e&&this.applyRequestTimeMinDate()}onFilterChange(e,t){var i;0==t?this.no_of_passenger=e.id:this.trip_luggage=e.id;const n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.id;this.filterVehicleArray=this.vehicleArray.filter(e=>e.max_capacity>=this.no_of_passenger&&e.max_luggage_capacity>=this.trip_luggage);const o=this.filterVehicleArray.find(e=>(null==e?void 0:e.id)==n)||this.filterVehicleArray[0];if(!o)return this.selectedVehicleObj=null,void(this.selectedVehicleObjName=null);this.changeVehicle(o)}changeVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w;if(this.filterVehicleArray.forEach(t=>{t.id==e.id?(t.final_fare_amount=(null==t?void 0:t.capacity)<this.no_of_passenger?t.final_fare_amount-this.totalExtraPassengerCharge+t.pricing.extra_charge_per_passenger*(this.no_of_passenger-(null==t?void 0:t.capacity)):t.final_fare_amount-this.totalExtraPassengerCharge,t.final_fare_amount=(null==t?void 0:t.vehicle_luggage_capacity)<this.trip_luggage?t.final_fare_amount-this.totalExtraLuggageCharge+t.pricing.extra_charge_per_luggage*(this.trip_luggage-t.vehicle_luggage_capacity):t.final_fare_amount-this.totalExtraLuggageCharge,t.checked=!0):t.checked=!1}),this.selectedVehicleObjName=null,this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.zone_extra_charge=0,this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0,this.selectedVehicleObj=e,this.currentObject=e,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.selectedVehicleObj,this.zone_price_id=null===(n=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.zone_price_model)||void 0===n?void 0:n.zone_price_id,this.zoneData.zone_price_applied=null===(a=null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing)||void 0===a?void 0:a.zone_price_applied,this.startingFrom="Y"==(null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.zone_price_applied)?2==(null===(d=null===(u=null===(s=this.selectedVehicleObj)||void 0===s?void 0:s.pricing)||void 0===u?void 0:u.zone_price_model)||void 0===d?void 0:d.calculation_type):2===(null===(c=this.selectedVehicleObj.pricing)||void 0===c?void 0:c.calculation_type),this.finalFare=null===(h=this.selectedVehicleObj)||void 0===h?void 0:h.final_fare.amount,this.storeOldVehiclePrice
1=null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.final_fare.amount,this.taxAddition=null===(p=this.selectedVehicleObj)||void 0===p?void 0:p.final_fare.tax_amount,this.zone_extra_charge=(null===(_=null===(m=this.selectedVehicleObj)||void 0===m?void 0:m.final_fare)||void 0===_?void 0:_.zone_extra_charges)?null===(v=null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare)||void 0===v?void 0:v.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge,this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(null===(y=this.selectedBookingTypeObj)||void 0===y?void 0:y.field_key)||(this.rentalPackages=null!==(k=null===(x=null===(b=this.selectedVehicleObj)||void 0===b?void 0:b.pricing)||void 0===x?void 0:x.slots)&&void 0!==k?k:[]),"package"==(null===(Z=this.selectedBookingTypeObj)||void 0===Z?void 0:Z.field_key)&&this.isPackageSlotAmountPricing(null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.pricing)){const e=null===(T=null===(F=this.rentalPackages)||void 0===F?void 0:F.find(e=>{var t;return e.id==(null===(t=this.addForm.value)||void 0===t?void 0:t.packages)}))||void 0===T?void 0:T.slot_amount;if(e){let t=e-this.additionalDiscount;this.package_pricing=t,this.selectedVehicleObj.final_fare.amount=t,this.selectedVehicleObj.final_fare_amount=this.finalFare,this.finalFare=this.selectedVehicleObj.final_fare.amount+this.taxAddition+this.zone_extra_charge+this.calCulateOtherCharges(this.selectedVehicleObj)+this.totalExtraLuggageCharge+this.totalExtraPassengerCharge+this.extraCharge}}3!==(null===(P=null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.pricing)||void 0===P?void 0:P.calculation_method)?(this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraPassengerCharge(null,!0),this.getExtraLuggageCharge(null===(w=this.selectedVehicleObj)||void 0===w?void 0:w.vehicle_luggage_capacity,null,!0)):this.calculateReturnTrip(),this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?this.store_bike_distance:this.store_ride_distance,this.calCulateOtherCharges2()}calculateReturnTrip(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;this.returnEnable&&(this.returnTripObject=null===(t=null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.pricing)||void 0===t?void 0:t.return_trip_pricing,this.returnFinalFare=(null===(a=null===(o=null===(n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.pricing)||void 0===n?void 0:n.return_trip_pricing)||void 0===o?void 0:o.final_fare)||void 0===a?void 0:a.amount)+(null===(u=null===(s=null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.return_trip_pricing)||void 0===s?void 0:s.final_fare)||void 0===u?void 0:u.tax_amount),this.returnTripDiscount=null===(g=null===(h=null===(c=null===(d=this.selectedVehicleObj)||void 0===d?void 0:d.pricing)||void 0===c?void 0:c.return_trip_pricing)||void 0===h?void 0:h.final_fare)||void 0===g?void 0:g.return_trip_discount,this.totalFInalFare=this.finalFare+(this.returnFinalFare-this.returnTripDiscount)),this.totalFInalFare<0&&(this.totalFInalFare=0)}additionalDiscountChanged(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h;this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0;let g=0;e&&(g=this.totalExtraLuggageCharge+this.totalExtraPassengerCharge);const p=(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)+this.extraCharge+g;this.addForm.value.additional_discount?this.additionalDiscount!==this.addForm.value.additional_discount?(this.finalFare=0,this.finalFare=(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)+this.additionalDiscount,this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(s=null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.final_fare)||void 0===s?void 0:s.amount)-this.additionalDiscount+this.extraCharge+g):(this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(d=null===(u=this.selectedVehicleObj)||void 0===u?void 0:u.final_fare)||void 0===d?void 0:d.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.final_fare)||void 0===h?void 0:h.amount)-this.additionalDiscount+this.extraCharge+g):(this.finalFare=p,this.additionalDiscount=0),this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge+this.tripOtherChargePrice,this.finalFare<0&&(this.finalFare=0),this.calculateReturnTrip()}extraChargeChanged(e=!1){var t,i,n,o;this.finalFare=this.finalFare-this.extraCharge,this.addForm.value.extra_charge?this.extraCharge!==this.addForm.value.extra_charge?(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):this.extraCharge=0,this.finalFare=this.finalFare,e&&this.updateCharge()}updateCharge(){this.totalExtraLuggageCharge&&(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.finalFare=this.finalFare+this.totalExtraLuggageCharge),this.totalExtraPasse
1ngerCharge&&(this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.finalFare=this.finalFare+this.totalExtraPassengerCharge),this.otherChargePrice&&(this.finalFare=this.finalFare-this.otherChargePrice,this.finalFare=this.finalFare+this.otherChargePrice),this.tripOtherChargePrice&&(this.finalFare=this.finalFare-this.tripOtherChargePrice,this.finalFare=this.finalFare+this.tripOtherChargePrice)}getExtraPassengerCharge(e=null,t){var i,n,o,a,r,l;if((null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.capacity)<this.no_of_passenger&&e){this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;let e=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else if(e)this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;else if((null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.capacity)<this.no_of_passenger&&!e&&t){this.totalExtraPassengerCharge=0;let e=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else this.totalExtraPassengerCharge=0}getExtraLuggageCharge(e,t=null,i){e<this.trip_luggage&&t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0):e<this.trip_luggage&&!t&&i?(this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):this.totalExtraLuggageCharge=0}getWayPoints(){var e,t,i=[];const n=this.addForm.get("checkpoints").controls;for(var o=0;o<n.length;o++)n[o].get("value"),i.push({address:n[o].get("value").value,latitude:null===(e=this.selectedCheckpointsArray[o].latitude)||void 0===e?void 0:e.toFixed(6),longitude:null===(t=this.selectedCheckpointsArray[o].longitude)||void 0===t?void 0:t.toFixed(6)});return i}updateQueryParam(){var e,t,i,n,o,a,r,l,s,u,d,c,h=this.getWayPoints();this.queryParam.pickup_location=this.addForm.get("pickup_location").value,this.queryParam.service_type=this.YELOWCAB_SERVICE_TYPE;try{this.queryParam.pickup_latitude=null===(e=this.pickup_latitude)||void 0===e?void 0:e.toFixed(6)}catch(g){this.queryParam.pickup_latitude=this.pickup_latitude}try{this.queryParam.pickup_longitude=null===(t=this.pickup_longitude)||void 0===t?void 0:t.toFixed(6)}catch(g){this.queryParam.pickup_longitude=this.pickup_longitude}if(this.queryParam.dropoff_location=this.addForm.get("destination").value,this.queryParam.dropoff_latitude=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),this.queryParam.dropoff_longitude=null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),this.isSchedual_trip&&(this.queryParam.request_time=this.combinedTimestamp()),h.length>0&&(this.queryParam.way_points=JSON.stringify(h)),this.returnEnable){this.queryParam.is_return_trip=1,this.queryParam.return_request_time=new Date(this.addForm.value.return_time).getTime()/1e3,this.queryParam.return_pickup_location=null===(o=this.addForm.get("return_pickup_location"))||void 0===o?void 0:o.value;try{this.queryParam.return_pickup_latitude=null===(a=this.return_pickup_latitude)||void 0===a?void 0:a.toFixed(6)}catch(g){this.queryParam.return_pickup_latitude=this.return_pickup_latitude}try{this.queryParam.return_pickup_longitude=null===(r=this.return_pickup_longitude)||void 0===r?void 0:r.toFixed(6)}catch(g){this.queryParam.return_pickup_longitude=this.return_pickup_longitude}this.queryParam.return_dropoff_location=null===(l=this.addForm.get("return_destination"))||void 0===l?void 0:l.value,this.queryParam.return_dropoff_latitude=null===(s=this.return_destination_latitude)||void 0===s?void 0:s.toFixed(6),this.queryParam.return_dropoff_longitude=this.return_destination_longitude}else this.queryParam.is_return_trip=0,this.queryParam.return_from_zone_id=null,this.queryParam.return_to_zone_id=null;this.queryParam.no_of_passenger=this.no_of_passenger,this.queryParam.trip_luggage=this.trip_luggage,this.queryParam.from_zone_id=this.zoneData&&this.zoneData.from?this.zoneData.from:null,this.queryParam.to_zone_id=this.zoneData&&this.zoneData.to?this.zoneData.to:null,this.fixZoneDisableDropoff&&(this.queryParam.to_zone_id=-1),this.returnEnable&&(this.queryParam.return_from_zone_id=(null===(u=this.returnzoneData)||void 0===u?void 0:u.from)?this.returnzoneData.from:null,this.queryParam.return_to_zone_id=(null===(d=this.returnzoneData)||void 0===d?void 0:d.to)?this.returnzoneData.to:null),(null===(c=this.addForm.value)||void 0===c?void 0:c.booking_type_id)&&(this.queryParam.booking_type_id=this.addForm.value.booking_type_id)}changeReturn(e){var t=this;return(0,y.Z)(function*(){t.pickup_latitude&&t.pickup_longitude&&t.destination_latitude&&t.destination_longitude?(t.returnEnable=e.target.checked,e.target.checked?(t.initDefaultReturnDateTime(),t.addForm.get("return_time").setValidators([r.kI.required]),t.addForm.get("return_time").updateV
1alueAndValidity(),t.applyReturnLocationSwapToForm(),yield t.resolveReturnZonesAfterLocationSwap(),t.calculateReturnTrip(),t.refreshReturnVehiclePricing()):(t.addForm.get("return_date").setValue(null),t.addForm.get("return_trip_time").setValue(null),t.addForm.get("return_time").setValue(null),t.addForm.get("return_time").setValidators(null),t.addForm.get("return_time").updateValueAndValidity(),t.return_date=null,t.return_trip_time=null,t.return_time=null,t.selectedDate=null,t.clearReturnLocations(),t.calculateReturnTrip())):(t.toasterService.error("Please Select Pickup & Destination Location First!"),e.target.checked=!1)})()}applyReturnLocationSwapToForm(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;const p=this.searchTextDestionation||(null===(e=this.addForm.get("destination"))||void 0===e?void 0:e.value),m=this.searchText||(null===(t=this.addForm.get("pickup_location"))||void 0===t?void 0:t.value);this.addForm.controls.return_pickup_location.setValue(p),this.addForm.controls.return_pickup_latitude.setValue(null!==(o=null===(n=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed)||void 0===n?void 0:n.call(i,6))&&void 0!==o?o:this.destination_latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(l=null===(r=null===(a=this.destination_longitude)||void 0===a?void 0:a.toFixed)||void 0===r?void 0:r.call(a,6))&&void 0!==l?l:this.destination_longitude),this.addForm.controls.return_destination.setValue(m),this.addForm.controls.return_dropoff_latitude.setValue(null!==(d=null===(u=null===(s=this.pickup_latitude)||void 0===s?void 0:s.toFixed)||void 0===u?void 0:u.call(s,6))&&void 0!==d?d:this.pickup_latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(g=null===(h=null===(c=this.pickup_longitude)||void 0===c?void 0:c.toFixed)||void 0===h?void 0:h.call(c,6))&&void 0!==g?g:this.pickup_longitude),this.returnsearchText=p,this.returnsearchTextDestionation=m,this.return_pickup_latitude=this.destination_latitude,this.return_pickup_longitude=this.destination_longitude,this.return_destination_latitude=this.pickup_latitude,this.return_destination_longitude=this.pickup_longitude,this.returnpickupRegionFound=this.dropRegionFound,this.returndropRegionFound=this.pickupRegionFound}resolveReturnZonesAfterLocationSwap(){var e=this;return(0,y.Z)(function*(){e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.returndropRegionFound&&e.return_destination_latitude&&e.return_destination_longitude&&(yield e.updateReturnDestinationZone()),e.returnpickupRegionFound&&e.return_pickup_latitude&&e.return_pickup_longitude&&(yield e.updateReturnPickupZone())})()}clearReturnLocations(){this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.addForm.controls.return_pickup_location.setValue(null),this.addForm.controls.return_pickup_latitude.setValue(null),this.addForm.controls.return_pickup_longitude.setValue(null),this.addForm.controls.return_destination.setValue(null),this.addForm.controls.return_dropoff_latitude.setValue(null),this.addForm.controls.return_dropoff_longitude.setValue(null),this.returnotherDetails=null,this.return_trip_path=null,this.return_bike_path=null,this.returnzoneData.from=null,this.returnzoneData.to=null,this.returnzoneData.from_title=null,this.returnzoneData.to_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.to_obj=null,this.returnzoneData.from_ids=null,this.returnzoneData.to_ids=null}OnSearchReturn(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturn.next(e)}OnSearchReturnDestination(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturnDest.next(e)}returnsearchEvent(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_pickup_location.setValue(e.full_text),this.returnsearchText=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_pickup_latitude=e.latitude,this.return_pickup_longitude=e.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnPickupRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_pickup_latitude=e.data.latitude,this.return_pickup_longitude=e.data.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnPickupRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_pickup_location.setValue(null),this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.returnzoneData.from=null,this.returnzoneData.from_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.from_ids=null)}returnsearchEventDestination(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_destination.setValue(e.full_text),this.returnsearchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_destination_latitude=e.latitude,this.return_destination_longitude=e.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnDropoffRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_destination_latitude=e.data.latitude,this.return_destination_longitude=e.data.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnDropoffRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_destination.setValue(null),this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnzoneData.to=null,this.returnzoneData.to_title=null,this.returnzoneData.to_obj=null,this.returnzoneData.to_ids=null)}
1validateReturnPickupRegion(){if("Y"!==this.checkRegion)this.returnpickupRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_pickup_latitude,this.return_pickup_longitude,(0,C.U)(t.geofence)));this.returnpickupRegionFound=e}this.updateReturnPickupZone()}validateReturnDropoffRegion(){if("Y"!==this.checkRegion)this.returndropRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_destination_latitude,this.return_destination_longitude,(0,C.U)(t.geofence)));this.returndropRegionFound=e}this.updateReturnDestinationZone()}updateReturnPickupZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.return_pickup_latitude&&e.return_pickup_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returnpickupRegionFound||(yield e.zoneUtilityService.findPickupZone(e.return_pickup_latitude,e.return_pickup_longitude,e.zoneResponse,e.returnzoneData,()=>{},()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}updateReturnDestinationZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.return_destination_latitude&&e.return_destination_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returndropRegionFound||(yield e.zoneUtilityService.findDropoffZone(e.return_destination_latitude,e.return_destination_longitude,e.zoneResponse,e.returnzoneData,()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}refreshReturnVehiclePricing(){!this.returnEnable||!this.return_pickup_latitude||!this.return_destination_latitude||(this.updateQueryParam(),this.vehicleTypeApi())}buildReturnBookingObject(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;const _=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.return_trip_pricing,f=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.vehicle_type_category,v=this.returnotherDetails||this.otherDetails,y=2==f?null==v?void 0:v.bike_ride_distance:null==v?void 0:v.ride_distance,b=2==f?null==v?void 0:v.bike_ride_time:null==v?void 0:v.ride_time,x=Object.assign(Object.assign(Object.assign({},null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing),(null==_?void 0:_.pricing)||{}),{return_trip_pricing:_,final_fare:null==_?void 0:_.final_fare});(null===(a=null==_?void 0:_.surge_price)||void 0===a?void 0:a.surgeApplied)&&(x.surge_multiplier=_.surge_price.multiplier,x.surge_flat_amount=_.surge_price.flat_price),x.driver_earning=(this.returnFinalFare||0)-((null===(r=null==_?void 0:_.final_fare)||void 0===r?void 0:r.tax_amount)||0)-(this.walletBalance<0?Math.abs(this.walletBalance):0);const k={pickup_location:null===(l=this.addForm.get("return_pickup_location"))||void 0===l?void 0:l.value,pickup_latitude:Number(this.return_pickup_latitude),pickup_longitude:Number(this.return_pickup_longitude),dropoff_location:null===(s=this.addForm.get("return_destination"))||void 0===s?void 0:s.value,dropoff_latitude:Number(this.return_destination_latitude),dropoff_longitude:Number(this.return_destination_longitude),booking_distance:y,booking_duration:b,calculation_method:null!==(d=null===(u=null==_?void 0:_.pricing)||void 0===u?void 0:u.calculation_method)&&void 0!==d?d:null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.pricing)||void 0===h?void 0:h.calculation_method,fare_details:x,booking_properties:e.booking_properties,flight_info:e.flight_info,booking_amount:Number((this.returnFinalFare-this.returnTripDiscount).toFixed(2)),driver_earning:x.driver_earning,booking_request_time:Number(new Date(this.addForm.value.return_time).getTime()/1e3),is_return_booking:1,agent_id:this.agent_id||null,vehicle_type_id:null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.id,payment_mode:e.payment_mode,payment_mode_id:e.payment_mode_id,payment_status:e.payment_status,no_of_passenger:e.no_of_passenger,way_points:[],payment_type:e.payment_type,booking_type_id:e.booking_type_id,booster_seat:e.booster_seat,child_seat:e.child_seat,gender:e.gender,user_id:e.user_id,is_fixed_price:0};return(this.return_trip_path||this.return_bike_path)&&(k.dispatch_path=2==f?this.return_bike_path:this.return_trip_path),(null===(p=this.returnzoneData)||void 0===p?void 0:p.from)&&(k.return_pickup_zone_id=String(this.returnzoneData.from)),(null===(m=this.returnzoneData)||void 0===m?void 0:m.to)&&(k.return_dropoff_zone_id=String(this.returnzoneData.to)),k.fare_details.final_fare=null==_?void 0:_.final_fare,k}clearVehicleSelectionForSameZoneRestriction(){var e;const t=this;t.vehicleArray=[],t.filterVehicleArray=[],"vehicleTypeArray"in t&&(t.vehicleTypeArray=[]),t.selectedVehicleObj=null,"
1selectedVehicleObjName"in t&&(t.selectedVehicleObjName=null),"rentalPackages"in t&&(t.rentalPackages=[]),"trip_path"in t&&(t.trip_path=null),"bike_path"in t&&(t.bike_path=null),"return_trip_path"in t&&(t.return_trip_path=null),"return_bike_path"in t&&(t.return_bike_path=null),"otherDetails"in t&&(t.otherDetails=null),"returnotherDetails"in t&&(t.returnotherDetails=null),"finalFare"in t&&(t.finalFare=0),"returnFinalFare"in t&&(t.returnFinalFare=0),(null===(e=t.polyline)||void 0===e?void 0:e.setMap)&&(t.polyline.setMap(null),t.polyline=null)}updateSameZoneTripRestriction(){const e=(0,V.b)(this.zoneResponse,this.pickup_latitude,this.pickup_longitude,this.destination_latitude,this.destination_longitude),t=!!e,i=t&&!this.sameZoneTripRestricted;return this.sameZoneTripRestricted=t,t&&(this.clearVehicleSelectionForSameZoneRestriction(),i&&this.toasterService.error(`Trips within ${(null==e?void 0:e.title)||"this zone"} are not allowed`)),t}vehicleTypeApi(){this.updateSameZoneTripRestriction()?this.loadingState=!1:(this.loadingState=!0,this.taxAddition=0,this.zone_extra_charge=0,this.returnTripDiscount=0,this.finalFare=0,this.returnFinalFare=0,this.queryParam.out_of_service_area=this.checkOutofServiceArea?1:null,this.queryParam.vehicle_type_id=null,this.updateQueryParam(),this.disableBtn=!1,this.taxiBookingService.getVehicleList(this.queryParam).subscribe(e=>{var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w,q,D,O,L,M,V,S,E,U,N,I,j,R,z,J;this.loadingState=!1,e.success||e.status?(this.store_ride_distance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.ride_distance,this.store_bike_distance=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.bike_ride_distance,console.log(this.agentLogin,this.agentMinDistance,this.store_ride_distance),this.agentLogin&&this.agentMinDistance>this.store_ride_distance&&(this.disableBtn=!0,this.toasterService.error((null===(n=this.currentLanguage)||void 0===n?void 0:n.min_distance_error)+" "+this.agentMinDistance+" "+((null===(o=this.currentCompanyDetail)||void 0===o?void 0:o.distance_unit)?"Per "+(null===(a=this.currentCompanyDetail)||void 0===a?void 0:a.distance_unit):"Per Km"))),(null===(r=e.data)||void 0===r?void 0:r.cab_type_list.length)>0?(this.vehicleArray=null===(l=e.data)||void 0===l?void 0:l.cab_type_list.filter(e=>e.hasOwnProperty("pricing")),this.otherDetails={surge_price:e.data.surge_price,ride_time:e.data.ride_time,ride_distance:e.data.ride_distance,tax_list:e.data.tax_list,bike_ride_distance:null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.bike_ride_distance,bike_ride_time:null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.bike_ride_time},this.returnEnable&&(null===(d=e.data)||void 0===d?void 0:d.return_response_data)&&(this.returnotherDetails={surge_price:null===(c=e.data.return_response_data)||void 0===c?void 0:c.surge_price,ride_time:null===(h=e.data.return_response_data)||void 0===h?void 0:h.ride_time,ride_distance:null===(g=e.data.return_response_data)||void 0===g?void 0:g.ride_distance,tax_list:null===(p=e.data.return_response_data)||void 0===p?void 0:p.tax_list,bike_ride_distance:null===(m=e.data.return_response_data)||void 0===m?void 0:m.bike_ride_distance,bike_ride_time:null===(_=e.data.return_response_data)||void 0===_?void 0:_.bike_ride_time},this.return_trip_path=null===(f=e.data.return_response_data)||void 0===f?void 0:f.path,this.return_bike_path=null===(v=e.data.return_response_data)||void 0===v?void 0:v.bike_path,this.calculateReturnTrip()),this.vehicleTypeArray.length>0?(this.max_luggage_capacity_filter=0,this.max_capacity_filter=0,this.vehicleArray=this.vehicleArray.map(e=>{e.isCollapsed=!1,this.max_capacity_filter<e.max_capacity&&(this.max_capacity_filter=e.max_capacity),this.max_luggage_capacity_filter<e.max_luggage_capacity&&(this.max_luggage_capacity_filter=e.max_luggage_capacity);const t=this.vehicleTypeArray.find(t=>t.vehicle_type_id==e.id);if(t)return Object.assign(Object.assign({},e),{title:t.vehicle_type_title,vehicle_image:t.vehicle_type_image,max_luggage_capacity:t.max_luggage_capacity,vehicle_type_priority:t.vehicle_type_priority})}
1),this.vehicleArray.forEach(e=>{var t,i,n,o;e&&(e.final_fare_amount=(null===(t=null==e?void 0:e.final_fare)||void 0===t?void 0:t.amount)+(null===(i=null==e?void 0:e.final_fare)||void 0===i?void 0:i.tax_amount)+this.calCulateOtherCharges(e)+((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.zone_extra_charges)?null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.zone_extra_charges:0))}),this.vehicleArray.sort((e,t)=>parseInt(e.vehicle_type_priority)-parseInt(t.vehicle_type_priority)),this.vehicleArray.forEach((e,t)=>{e&&(e.checked=0===t)}),this.selectedVehicleObj=this.vehicleArray[0],this.storeOldVehiclePrice=this.selectedVehicleObj.final_fare.amount,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.zone_price_id=null===(x=null===(b=null===(y=this.selectedVehicleObj)||void 0===y?void 0:y.pricing)||void 0===b?void 0:b.zone_price_model)||void 0===x?void 0:x.zone_price_id,this.zoneData.zone_price_applied=null===(Z=null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.pricing)||void 0===Z?void 0:Z.zone_price_applied,this.finalFare=null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.final_fare.amount,this.taxAddition=null===(F=this.selectedVehicleObj)||void 0===F?void 0:F.final_fare.tax_amount,this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?null===(T=null==e?void 0:e.data)||void 0===T?void 0:T.bike_ride_distance:null===(A=null==e?void 0:e.data)||void 0===A?void 0:A.ride_distance,this.calCulateOtherCharges2(),this.startingFrom="Y"==(null===(w=null===(P=this.vehicleArray[0])||void 0===P?void 0:P.pricing)||void 0===w?void 0:w.zone_price_applied)?2==(null===(O=null===(D=null===(q=this.vehicleArray[0])||void 0===q?void 0:q.pricing)||void 0===D?void 0:D.zone_price_model)||void 0===O?void 0:O.calculation_type):2===(null===(L=this.vehicleArray[0].pricing)||void 0===L?void 0:L.calculation_type),this.finalFare=null===(M=this.selectedVehicleObj)||void 0===M?void 0:M.final_fare.amount,this.taxAddition=null===(V=this.selectedVehicleObj)||void 0===V?void 0:V.final_fare.tax_amount):(this.selectedVehicleObj=null,this.selectedVehicleObjName=null),this.zone_extra_charge=(null===(E=null===(S=this.selectedVehicleObj)||void 0===S?void 0:S.final_fare)||void 0===E?void 0:E.zone_extra_charges)?null===(N=null===(U=this.selectedVehicleObj)||void 0===U?void 0:U.final_fare)||void 0===N?void 0:N.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge):this.vehicleArray=[],this.filterVehicleArray=this.vehicleArray,this.selectedVehicleObj&&(this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(null===(I=this.selectedBookingTypeObj)||void 0===I?void 0:I.field_key)||(this.rentalPackages=null!==(z=null===(R=null===(j=this.selectedVehicleObj)||void 0===j?void 0:j.pricing)||void 0===R?void 0:R.slots)&&void 0!==z?z:[])),this.getMaxLuggagePassengerCapacity(),this.getExtraPassengerCharge(null,null),this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraLuggageCharge(null===(J=this.selectedVehicleObj)||void 0===J?void 0:J.vehicle_luggage_capacity,null,null)):this.vehicleArray=[]}))}changeQueuePickup(e){this.pickUpStandForm.patchValue({pickup_location:e.address,pickup_latitude:e.latitude,pickup_longitude:e.longitude}),this.pickup_longitude=Number(e.longitude),this.pickup_latitude=Number(e.latitude),this.addForm.patchValue({pickup_location:e.address})}fixZone(e){this.fixZonePriceData=e}submitZonePricing(){this.zoneData.to=-1,this.searchTextDestionation=this.fixZonePriceData.dropoff_location,this.addForm.patchValue({destination:this.fixZonePriceData.dropoff_location}),this.UpdateDestinationLocation(this.fixZonePriceData.dropoff_latitude,this.fixZonePriceData.dropoff_longitude),$("#fixdestination").modal("hide")}getZoneDetail(e,t){this.yelowBookingService.getPriceZoneById(e).subscribe(e=>{var i;e.status&&(t.zone_price=null===(i=e.data)||void 0===i?void 0:i.title)})}closeFixDestinationPopup(){this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null,this.pickup_latitude=null,this.pickup_longitude=null,this.zoneData.to=null,this.addForm.patchValue({destination:null,pickup_location:null}),$("#ixdestination").modal("hide")}pickUpStandFormSubmit(){this.selectQueuePickup=!0,$("#QueuePikupstand").modal("hide")}submitFirstForm(e,t){var i,n,o,a,r;
1if(!this.updateSameZoneTripRestriction()){if(this.isBookingHold)return void swal.fire({text:(null===(i=this.currentLanguage)||void 0===i?void 0:i.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);if(console.log(e),this.queuePikupStandList.length>0&&!this.fixZoneDisableDropoff&&this.isFirstPart)this.selectQueuePickup=!1,$("#QueuePikupstand").modal("show");else if(this.isFirstPart&&(this.formSubmited=!0,this.submitFirstPart=!0,this.generateErrors(e),this.pickup_latitude&&this.pickup_longitude)){const t=null===(n=this.addForm.get("request_time"))||void 0===n?void 0:n.value,i=null===(o=this.addForm.get("trip_time"))||void 0===o?void 0:o.value,l=new Date("string"==typeof t?t:(null===(a=null==t?void 0:t.toISOString)||void 0===a?void 0:a.call(t))||t),s=new Date("string"==typeof i?i:(null===(r=null==i?void 0:i.toISOString)||void 0===r?void 0:r.call(i))||i),u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()),d=new Date;d.setHours(0,0,0,0);let c=new Date(d.getTime()+6e4*this.max_date);if(c.setHours(0,0,0,0),l.setHours(0,0,0,0),2==this.selectedTab){if(!this.validateRequestTimeCutOff(u))return;if(l<d)return void this.toasterService.error("Please select a minimum date: today");if(l>c)return void this.toasterService.error(`Trip date must be between today and the next ${this.max_date/1440} days.`);if(l.getTime()===d.getTime()&&u.getTime()<(new Date).getTime())return void this.toasterService.error("Trip time must be greater than current time.");e.valid&&this.check_time&&(this.bindMarkerPoints(),this.getproperties(e))}else e.valid&&this.check_time&&(this.bindMarkerPoints(),this.getproperties(e))}this.firstFormNextButtonClick=!0}}submitSecondForm(e){var t,i,n,o,a,r,l;if(this.isBookingHold)swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);else if(console.log(e),console.log(this.return_time),this.formSubmited=!0,this.isDocumentUploading)this.toasterService.error("Please wait for document upload to complete");else{if(this.returnEnable){this.syncReturnDateTime();const e=null===(i=this.addForm.get("request_time"))||void 0===i?void 0:i.value,t=null===(n=this.addForm.get("trip_time"))||void 0===n?void 0:n.value,s=new Date("string"==typeof e?e:(null===(o=null==e?void 0:e.toISOString)||void 0===o?void 0:o.call(e))||e),u=new Date("string"==typeof t?t:(null===(a=null==t?void 0:t.toISOString)||void 0===a?void 0:a.call(t))||t),d=new Date(s.getFullYear(),s.getMonth(),s.getDate(),u.getHours(),u.getMinutes(),u.getSeconds());if(new Date(null===(l=null===(r=this.addForm)||void 0===r?void 0:r.value)||void 0===l?void 0:l.return_time)<d)return void this.toasterService.error("Return time should be greater than request time")}this.generateErrors(this.addForm),e.valid&&(this.displaySecondForm=!1,this.displayThirdForm=!0,this.vehicleTypeApi())}}getproperties(e){var t,i,n,o,a,r,l,s;if((null===(t=null==this?void 0:this.zoneData)||void 0===t?void 0:t.from_obj)&&this.zoneData.from_obj.property_list||(null===(i=this.zoneData)||void 0===i?void 0:i.to_obj)&&this.zoneData.to_obj.property_list||this.tripPropertiesIds){this.zoneIds=[],this.zonePropertiesIds=[],(null===(o=null===(n=this.zoneData)||void 0===n?void 0:n.from_obj)||void 0===o?void 0:o.property_list)&&(this.zonePropertiesIds=this.zonePropertiesIds.concat(this.zoneData.from_obj.property_list.split(","))),(null===(r=null===(a=this.zoneData)||void 0===a?void 0:a.to_obj)||void 0===r?void 0:r.property_list)&&this.zoneData.to_obj.property_list.split(",").forEach(e=>{var t,i;(null===(t=this.zoneData)||void 0===t?void 0:t.from)==(null===(i=this.zoneData)||void 0===i?void 0:i.to)?this.zonePropertiesIds.push(e):this.zonePropertiesIds.includes(e)?this.zoneIds.push(e):this.zonePropertiesIds.push(e)});let t=this.resetPropertyControl();if(2!=(null===(l=this.zoneData.from_obj)||void 0===l?void 0:l.zone_type)&&1!=(null===(s=this.zoneData.to_obj)||void 0===s?void 0:s.zone_type)||(this.zonePropertiesIds=[]),this.zonePropertiesIds.length>0||this.zoneIds.length>0||this.tripPropertiesIds.length){let i=[];this.zonePropertiesIds.length>0&&(i=i.concat(this.zonePropertiesIds)),this.zoneIds.length>0&&(i=i.concat(this.zoneIds)),this.tripPropertiesIds.length&&(i=i.concat(this.tripPropertiesIds)),this.getExtraFields(t,i.join(","),e)}else this.nevigateToDraw(e)}else this.bindMarkerPoints()}nevigateToDraw(e){this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThird
1Form=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1}getExtraFields(e,t,i){const n={company_id:this.company_id,property_type_list:t,is_active:1,user_type:"0,3"};this.loadingState=!0,this.yelowBookingService.getExtraFields(n).subscribe(t=>{if(t.status&&t.data.length){t.data.sort((e,t)=>t.is_mandatory-e.is_mandatory),t.data;const i=["booster_seat","child_seat","flight_number"];t.data.forEach(t=>{(this.booking_type_id==t.category_id||null==t.category_id)&&(i.includes(null==t?void 0:t.field_key)||e.push(this.propertyRow(t)))}),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,this.loadingState=!1}else this.nevigateToDraw(i)})}resetPropertyControl(){let e=this.addForm.get("properties"),t=e.length;for(let i=0;i<t;i++)e.removeAt(0);return this.documentFileNames={},this.documentUploadLoading={},this.isDocumentUploading=!1,e}getAllTripProperties(){this.yelowBookingService.getExtraFields({company_id:this.company_id,property_type:2,is_active:1,service_type:this.YELOWCAB_SERVICE_TYPE,user_type:"0,3"}).subscribe(e=>{var t;e.status&&(null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>{var t;e.company_extra_field_id&&(null===(t=this.tripPropertiesIds)||void 0===t||t.push(e.company_extra_field_id))}))})}propertyRow(e){var t;let i=[];return(null===(t=null==e?void 0:e.config_json)||void 0===t?void 0:t.length)>0&&(null==e||e.config_json.forEach(e=>{i.push({label:e.title,value:e.title})})),new r.cw({label:new r.NI(e.field_title),value:new r.NI(5==e.field_type?0:null,r.kI.compose(e.is_mandatory?[r.kI.required]:[])),is_mandatory:new r.NI(e.is_mandatory),field_type:new r.NI(e.field_type),options:new r.NI(i),field_description:new r.NI(e.field_description),id:new r.NI(e.company_extra_field_id),file_name:new r.NI(null)})}updateDocumentUploadingState(){this.isDocumentUploading=Object.values(this.documentUploadLoading).some(e=>e)}documentFileChangeEvent(e,t){var i,n,o;const a=null===(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.files)||void 0===n?void 0:n[0];if(!a)return;if(a.size>this.DOCUMENT_MAX_FILE_SIZE)return swal.fire("Invalid File Size!","Please upload a file less than 21MB","error"),void this.clearDocumentInput(e);const r=this.addForm.get("properties"),l=a.name;null===(o=r.at(t).get("file_name"))||void 0===o||o.setValue(l),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l}),this.documentUploadLoading[t]=!0,this.updateDocumentUploadingState();const s=new FormData;s.append("file",a),this.authService.uploadImageGetUrl(s).subscribe(i=>{var n,o,a,s,u,d,c;if(this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),(null==i?void 0:i.status)&&(null==i?void 0:i.data)){const e="string"==typeof i.data?i.data:(null===(n=i.data)||void 0===n?void 0:n.url)||(null===(o=i.data)||void 0===o?void 0:o.file_url)||(null===(a=i.data)||void 0===a?void 0:a.image)||i.data;null===(s=r.at(t).get("value"))||void 0===s||s.setValue(e),null===(u=r.at(t).get("file_name"))||void 0===u||u.setValue(l),null===(d=r.at(t).get("value"))||void 0===d||d.markAsDirty(),null===(c=r.at(t).get("value"))||void 0===c||c.updateValueAndValidity(),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l})}else this.toasterService.error((null==i?void 0:i.message)||"File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)},()=>{this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),this.toasterService.error("File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)})}removeDocumentFile(e,t){this.clearDocumentValue(e),t&&(t.value="")}clearDocumentValue(e){var t,i,n,o,a,r;const l=this.addForm.get("properties");null===(i=null===(t=l.at(e))||void 0===t?void 0:t.get("value"))||void 0===i||i.setValue(null),null===(o=null===(n=l.at(e))||void 0===n?void 0:n.get("file_name"))||void 0===o||o.setValue(null),null===(r=null===(a=l.at(e))||void 0===a?void 0:a.get("value"))||void 0===r||r.updateValueAndValidity();const s=Object.assign({},this.documentFileNames);delete s[e],this.documentFileNames=s}clearDocumentInput(e){(null==e?void 0:e.target)?e.target.value="":e&&(e.value="")}mapBookingProperty(e){const t={label:e.label,value:e.field_type===this.DATE_FIELD&&(null==e?void 0:e.value)?new Date(null==e?void 0:e.value[0]).getTime():e.value,field_type:e.field_type,id:e.id};return(null==e?void 0:e.field_type)===this.DOCUMENT_FIELD&&(t.file_name=e.file_name||""),t}toggleCollapse(e){var t,i,n,o;let a=this.filterVehicleArray.find(t=>(null==t?void 0:t.id)==e.id);a&&(a.isCollapsed=!a.isCollapsed),(null===(i=null===(t=null==a?void 0:a.pricing)||void 0===t?void 0:t.zone_price_model)||void 0===i?void 0:i.zone_price_id)&&this.getZoneDetail(null===(o=null===(n=null==a?void 0:a.pricing)||void 0===n?void 0:n.zone_price_model)||void 0===o?void 0:o.zone_price_id,a)}getVehicleType(e){this.taxiBookingService.getVehicleType(e).subscribe(e=>{var t;this.vehicleTypeArray=e.status?null===(t=e.data)||void 0===t?void 0:t.list:[]})}goToLoginScreen(){this.formSubmited=!0,this.generateErrors(this.addForm),this.addForm.valid&&(this.formSubmited=!1,this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.calCulateOtherCharges2
1(),this.displayLoginForm=!0,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1)}isDynamicCalculationCharge(e){return(0,S.Mf)(e)}getOtherChargeBreakdownLabel(e){return(0,S.$v)(e)}incrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=(Number(e.currentValue)||0)+1;e.currentValue=t,this.otherChargesArray=(this.otherChargesArray||[]).map(i=>{var n;return(null==i?void 0:i.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(i.currentValue=t,i.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[i.charges_key])&&(this.otherChargArray[i.charges_key].currentValue=t)),Object.assign({},i)}),this.refreshOtherChargesFare()}decrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=Number(e.currentValue)||0,i=t>1?t-1:1;e.currentValue=i,this.otherChargesArray=(this.otherChargesArray||[]).map(t=>{var n;return(null==t?void 0:t.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(t.currentValue=i,t.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[t.charges_key])&&(this.otherChargArray[t.charges_key].currentValue=i)),Object.assign({},t)}),this.refreshOtherChargesFare()}refreshOtherChargesFare(){!this.selectedVehicleObj||(this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.calCulateOtherCharges2())}calCulateOtherCharges(e){let t=0;return this.selectedOtherChargesArray=this.otherChargesArray.filter(i=>{var n,o,a;if((i.checked||i.is_required)&&"booster_seat"==i.charges_key){if(1==i.charge_type){const o=i.charge_value*this.addForm.controls.booster_seat.value/100*((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*this.addForm.controls.booster_seat.value,i.charges=i.charge_value*this.addForm.controls.booster_seat.value);return!0}if((i.checked||i.is_required)&&"child_seat"==i.charges_key){if(1==i.charge_type){const n=i.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.amount)||0);t+=n,i.charges=n}else 2==i.charge_type?(t+=i.charge_value*this.addForm.controls.child_seat.value,i.charges=i.charge_value*this.addForm.controls.child_seat.value):3==i.charge_type&&(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance));return!0}if(i.checked||i.is_required){const n=(0,S.MV)(i);if(1==i.charge_type){const o=i.charge_value*n/100*((null===(a=null==e?void 0:e.final_fare)||void 0===a?void 0:a.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*n,i.charges=i.charge_value*n);return!0}return!1}),t}calCulateOtherCharges2(){this.otherChargePrice=0,this.selectedOtherChargesArray=this.otherChargesArray.filter(e=>{var t,i,n,o,a,r;if((e.checked||e.is_required)&&"booster_seat"==e.charges_key){if(1==e.charge_type){const n=e.charge_value*this.addForm.controls.booster_seat.value/100*((null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)||0);this.otherChargePrice+=n,e.charges=n}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*this.addForm.controls.booster_seat.value,e.charges=e.charge_value*this.addForm.controls.booster_seat.value);return!0}if((e.checked||e.is_required)&&"child_seat"==e.charges_key){if(1==e.charge_type){const t=e.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)||0);this.otherChargePrice+=t,e.charges=t}else 2==e.charge_type?(this.otherChargePrice+=e.charge_value*this.addForm.controls.child_seat.value,e.charges=e.charge_value*this.addForm.controls.child_seat.value):3==e.charge_type&&(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance);return!0}if(e.checked||e.is_required){const t=(0,S.MV)(e);if(1==e.charge_type){const i=e.charge_value*t/100*((null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)||0);this.otherChargePrice+=i,e.charges=i}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*t,e.charges=e.charge_value*t);return!0}return!1}),this.finalFare=this.finalFare+this.otherChargePrice}onDateChange(e,t){var i;null===(i=this.addForm.get("properties").at(t).get("value"))||void 0===i||i.setValue(e[0])}showLoginSingUpPage(e){this.loadingState=!1,this.selectedButtonSingAUpLogin=e,1870!==Number(this.company_id)?(null==e?void 0:e.bookRide)&&1==this.addForm.controls.paymentMode.value||2==this.pre_payment_value?this.bookRide(!0):null==(null==e?void 0:e.button_id)&&1==(null==e?void 0:e.bookRide)&&2==this.addForm.controls.paymentMode.value&&this.openPaymentGateway(!0):this.openPaymentGateway(!0)}openPaymentGateway(e){const t=(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id);this.pre_payment&&!t&&(this.callApi=!1,this.bookRide(),this.loadingState=!1),this.showPaymetScreen=e,this.displayPaymentForm=!0,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.displayThankYouForm=!1}afterPaymentSucsess(e){this.pre_payment||(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id)?(this.loadingState=!1,this.displayThannkYouScreen()):e&&!this.pre_payment&&this.bookRide(!0)}onStripeRequestBooking(){this.bookRide()}bookRide(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T;if(this.isBookingHold)swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);else if(this.generateErrors(this.addForm),this.addForm.valid){$("#properties").modal("hide"),this.loadingState=!0;var P=this.getWayPoints(),w={pickup_location:this.addForm.get("pickup_location").value,vehicle_type_id:this.selectedVehicleObj.id,dropoff_latitude:null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),dropoff_longitude:null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),payment_mode:this.addForm.get("paymentMode").value,payment_mode_id:this.addForm.get("payment_mode_id").value,
1no_of_passenger:this.addForm.get("no_of_passenger").value,booking_distance:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_distance:this.otherDetails.ride_distance,booking_duration:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_time:this.otherDetails.ride_time,calculation_method:null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing.calculation_method,way_points:P,transaction_detail:void 0,luggage:this.addForm.get("trip_luggage").value,fare_details:this.selectedVehicleObj.pricing,payment_type:(0,A.bQ)(null!==(a=this.channelPaymentType)&&void 0!==a?a:this.pre_payment_value),payment_status:"pending"};const t=this.buildBookingAssetsPayload();t.length&&(w.booking_assets=t);let D={flight:{iata:this.addForm.get("flight_number").value}};w.flight_info=this.selectedFlightObj?this.selectedFlightObj:this.addForm.get("flight_number").value?D:null,this.isSchedual_trip?(w.booking_request_time=this.combinedTimestamp(),w.is_scheduled=1):w.is_scheduled=0,w.flight_number=null===(r=this.addForm.value)||void 0===r?void 0:r.flight_number,((null===(l=this.addForm.value)||void 0===l?void 0:l.booster_seat)||0==this.addForm.value.booster_seat)&&(w.booster_seat=null===(u=null===(s=this.addForm.value)||void 0===s?void 0:s.booster_seat)||void 0===u?void 0:u.toString()),((null===(d=this.addForm.value)||void 0===d?void 0:d.child_seat)||0==this.addForm.value.child_seat)&&(w.child_seat=null===(h=null===(c=this.addForm.value)||void 0===c?void 0:c.child_seat)||void 0===h?void 0:h.toString()),(null===(g=this.addForm.value)||void 0===g?void 0:g.booking_type_id)&&(w.booking_type_id=null===(p=this.addForm.value)||void 0===p?void 0:p.booking_type_id);let O=[];(null===(m=this.selectedOtherChargesArray)||void 0===m?void 0:m.length)&&(O=O.concat(this.selectedOtherChargesArray)),O.length&&(w.fare_details.addon=O),w.booking_properties=JSON.stringify(this.addForm.value.properties.map(e=>this.mapBookingProperty(e))),this.walletBalance<0&&this.finalFare?(w.booking_amount=Number(this.finalFare.toFixed(2)-this.walletBalance),w.wallet_id=null,w.fare_details=Object.assign(Object.assign({},this.selectedVehicleObj.pricing),{previous_dues:Math.abs(this.walletBalance),final_fare:null===(_=this.selectedVehicleObj)||void 0===_?void 0:_.final_fare})):w.booking_amount=Number(this.finalFare.toFixed(2)),w.fare_details.driver_earning=(this.finalFare.toFixed(2)||0)-((null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare.tax_amount)||0)-(this.walletBalance||0),(null===(v=this.addForm.value)||void 0===v?void 0:v.hour)&&(w.fare_details.no_of_hours=null===(y=this.addForm.value)||void 0===y?void 0:y.hour),(null===(b=this.addForm.value)||void 0===b?void 0:b.package)&&(w.fare_details.package_type_id=null===(x=this.addForm.value)||void 0===x?void 0:x.packages),("Y"===this.checkGenderEnable||"y"==this.checkGenderEnable)&&(w.gender=this.genderValue),this.selectedVehicleObj.surge_price.surgeApplied&&(w.fare_details.surge_multiplier=this.selectedVehicleObj.surge_price.multiplier,w.fare_details.surge_flat_amount=this.selectedVehicleObj.surge_price.flat_price),w.fare_details.final_fare=null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.final_fare,(null===(Z=this.currentUserDetail)||void 0===Z?void 0:Z.id)&&(w.user_id=null===(C=this.currentUserDetail)||void 0===C?void 0:C.id),this.queueId&&(w.queue_id=this.queueId),this.addForm.get("destination").value&&(w.dropoff_location=this.addForm.get("destination").value),this.zoneData&&this.zoneData.to&&(w.dropoff_zone_id=this.zoneData.to.toString()),this.zoneData&&this.zoneData.from&&(w.pickup_zone_id=this.zoneData.from);try{w.pickup_latitude=null===(F=this.pickup_latitude)||void 0===F?void 0:F.toFixed(6)}catch(q){w.pickup_latitude=this.pickup_latitude}try{w.pickup_longitude=null===(T=this.pickup_longitude)||void 0===T?void 0:T.toFixed(6)}catch(q){w.pickup_longitude=this.pickup_longitude}if(this.returnEnable&&(w.is_return_booking=1,w.return_booking=this.buildReturnBookingObject(w)),3===(null==w?void 0:w.payment_mode)&&(w.payment_mode=2),!this.autoDispatch&&this.addForm.get("driver").value&&(w.driver_id=this.addForm.get("driver").value),this.addForm.valid&&!this.Customer_id){let e={};e.first_name=this.addForm.get("first_name").value?this.addForm.get("first_name").value:"",e.last_name=this.addForm.get("last_name").value?this.addForm.get("last_name").value:"",e.phone_no=this.addForm.get("phone_no").value?this.addForm.get("phone_no").value.toString():"",e.dial_code=this.addForm.get("dial_co
1de").value?this.addForm.get("dial_code").value:this.dialCode,this.addForm.get("email").value&&(e.email=this.addForm.get("email").value),w.passenger_details=e}w.is_fixed_price=0,this.pre_payment&&"pending"==this.addForm.get("paymentStatus").value&&2==this.addForm.get("paymentMode").value&&(w.booking_status=16),this.agent_id&&(w.agent_id=this.agent_id),2!==this.selectedTab||2===this.selectedTab&&w.booking_request_time>(new Date).getTime()/1e3?3!==this.selectedTab?"N"===this.corporateBookingConfirmation?this.yelowCabService.bookRide(w).subscribe(t=>{this.loadingState=!1,t.success||t.status?(this.tripPayload=w,this.trip_number=t.data.booking_number,this.tripId=t.data.booking_id,this.content="Successfully Booked",e&&this.displayThannkYouScreen()):this.toasterService.error(null==t?void 0:t.message)}):this.yelowCabService.bookRide(w).subscribe(e=>{this.loadingState=!1,e.success||e.status?(this.tripPayload=w,this.trip_number=e.data.booking_number,this.tripId=e.data.booking_id,this.content="Wait for confirmation"):this.toasterService.error(null==e?void 0:e.message)}):this.bookRecuringRide(this.tripPayload):(this.loadingState=!1,this.toasterService.error("Please select valid scheduled time"))}}displayThannkYouScreen(){var e;(0,P.nb)(this.company_id||(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id),this.trip_number)||(this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!0,this.showPaymetScreen=!1)}combinedTimestamp(){return new Date(this.selectedRequestTime).getTime()/1e3}bookRecuringRide(e){e.recurring_type=this.addForm.controls.recurring_type.value,e.recurring_time=new Date(this.addForm.controls.recurring_time.value).getTime()/1e3,e.end_date=new Date(this.addForm.controls.end_date.value).getTime()/1e3,2==this.addForm.controls.recurring_type.value&&(e.recurring_on=this.addForm.controls.recurring_on.value),this.yelowBookingService.bookRicurringRide(e).subscribe(e=>{var t;if(this.loadingState=!1,e.success||e.status){if(this.trip_number=e.data.booking_number,(0,P.nb)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id),this.trip_number))return;this.yelowBookingService.tripNoSubject.next({trip_number:this.trip_number,content:"Successfully Booked"}),this.ViewUpdate("thankyou")}else this.toasterService.error(null==e?void 0:e.message)},e=>{this.loadingState=!1})}ViewUpdate(e=!1){location.reload(),e&&(this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1),this.addForm.get("properties").clear(),this.addForm.reset(),this.selectQueuePickup=!1,this.addForm.get("checkpoints").clear(),this.addForm.get("properties").clear(),this.trip_luggage=0,this.no_of_passenger=1,this.addForm.patchValue({no_of_passenger:this.no_of_passenger,trip_luggage:this.trip_luggage,ride_type:1,pickup_location:null,destination:null,request_time:null,auto_dispatch:!0,gender:"M"}),this.searchText=null,this.selectedPickupRegionData=null,this.searchTextDestionation=null,this.responseDataDestionation=null,this.responseDatacheckPoint=null,this.responseData=null,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.selectedTab=1,this.request_time=null,this.autoDispatch=!0,this.Customer_id=null,this.genderTab="M",this.genderValue="M",this.getWayPoint=[],this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.marker&&(this.marker=[]),this.isFirstPart=!0,this.finalFare=0,this.walletBalance=0,this.addForm.get("notes").clearValidators(),this.bookingAssetsList=[],this.corporateBookingConfirmation="N",this.booking_type_id=null,this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.selectedFlightObj=null,this.responseFlight=[],this.trip_time=null,this.selectedButtonSingAUpLogin={button_id:1}
1,this.createForm(),this.getSeduleConfige(),this.jwtService.destroyAgentId(),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:null},queryParamsHandling:"merge",replaceUrl:!0}),this.patchDefaultUserLocation(),this.cd.detectChanges()}applyPaymentModeConfig(e){var t;console.log(e,"type"),(null===(t=this.allPaymentModes)||void 0===t?void 0:t.length)?this.zoneConfigActive||(this.paymentMode=this.allPaymentModes,this.paymentMode.length>0?this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)):this.company_id&&this.toasterService.error("Please setup payment Mode!")):this.paymentMode=[]}resolveDefaultPaymentMode(e){return 1870===Number(this.company_id)&&e.find(e=>2===Number(null==e?void 0:e.payment_mode_key))||e[0]}getPaymentConfig(){const e=(0,A.QZ)(this.company_id);this.yelowCabService.getPaymentConfigList(e).subscribe(e=>{var t,i;e.status&&(this.allPaymentModes=(0,A.w6)(null===(t=e.data)||void 0===t?void 0:t.list,this.company_id),this.applyPaymentModeConfig(3),(null===(i=this.pendingZoneConfigs)||void 0===i?void 0:i.length)&&(this.applyZoneBookingOptions(this.pendingZoneConfigs,this.activeZoneId),this.pendingZoneConfigs=null))})}loadZoneConfigurationForPickup(e){e?(e=e.split(",")[0],(this.activeZoneId!==e||!this.zoneConfigActive)&&(this.activeZoneId=e,this.yelowCabService.getZoneConfiguration({zone_id:e,page:0}).subscribe(t=>{const i=this.normalizeZoneConfigList(null==t?void 0:t.data);((null==t?void 0:t.status)||(null==t?void 0:t.success))&&i.length?this.allPaymentModes.length?(this.applyZoneBookingOptions(i,e),this.pendingZoneConfigs=null):this.pendingZoneConfigs=i:this.resetZoneBookingOptions()},()=>this.resetZoneBookingOptions()))):this.resetZoneBookingOptions()}normalizeZoneConfigList(e){return Array.isArray(e)?e:Array.isArray(null==e?void 0:e.list)?e.list:[]}applyZoneBookingOptions(e,t){const i=[],n=[];let o=null;if(e.forEach(e=>{if(!(null==e?void 0:e.config_key)||null==e.config_value||""===e.config_value)return;const t=String(e.config_value);switch(e.config_key){case"payment_mode":i.push(t);break;case"request_mode":n.push(t);break;case"cut_off_time":o=t}}),this.zoneConfigActive=!0,this.activeZoneId=t,this.lastAppliedZoneConfigs=e,i.length&&this.allPaymentModes.length){const e=this.allPaymentModes.filter(e=>i.includes(String(e.id)));e.length&&(this.paymentMode=e,this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)))}
1const a={1:{type_id:1,type_name:"Now"},2:{type_id:2,type_name:"Later"}};if(n.length){const e=n.map(e=>a[e]).filter(Boolean);e.length&&(this.rideType=e,this.setRideType(this.rideType[0].type_id))}if(o){const e=this.resolveCutOffMinutes(o);e>0&&this.applyZoneCutOffMinutes(e)}this.cd.detectChanges()}resolveCutOffMinutes(e){const t=Number(e);return!Number.isNaN(t)&&t>0?t:0}applyZoneCutOffMinutes(e){!e||Number.isNaN(e)||e<=0?this.zoneCutOffMinutes=null:(this.zoneCutOffMinutes=e,this.applyRequestTimeMinDate())}getEffectiveRequestMinDate(){const e=new Date;return e.setSeconds(0,0),this.zoneCutOffMinutes>0?new Date(e.getTime()+6e4*this.zoneCutOffMinutes):new Date(e)}applyRequestTimeMinDate(){var e,t,i,n;const o=this.getEffectiveRequestMinDate();this.requestTimeMinDate=o;const a=new Date(o);if(a.setHours(0,0,0,0),this.timeFormatConfig2.minDate=a,this.timeFormatConfig.minDate=o,this.is_date=!0,2===this.selectedTab){const a=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.controls.request_time)||void 0===t?void 0:t.value,r=null===(n=null===(i=this.addForm)||void 0===i?void 0:i.controls.trip_time)||void 0===n?void 0:n.value,l=a?new Date(a):null,s=r?new Date(r):null;let u=0;l&&s&&!Number.isNaN(l.getTime())&&!Number.isNaN(s.getTime())&&(u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()).getTime()),(!u||u<o.getTime())&&(this.request_time=new Date(o),this.trip_time=new Date(o),this.addForm.controls.request_time.setValue(this.request_time),this.addForm.controls.trip_time.setValue(this.trip_time))}}validateRequestTimeCutOff(e){if(2!==this.selectedTab)return!0;const t=this.getEffectiveRequestMinDate(),i=e||new Date(this.selectedRequestTime||this.addForm.value.request_time);if(Number.isNaN(i.getTime())||i.getTime()<t.getTime()){const e=this.zoneCutOffMinutes?`Trip must be scheduled at least ${this.zoneCutOffMinutes} minutes from now`:`Please schedule the trip after ${t.toLocaleString()}`;return this.toasterService.error(e),!1}return!0}clearZoneCutOffMinutes(){this.zoneCutOffMinutes=null,this.requestTimeMinDate=null}resetZoneBookingOptions(){var e;if(!this.zoneConfigActive)return this.activeZoneId=null,void(this.pendingZoneConfigs=null);this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.clearZoneCutOffMinutes(),this.allPaymentModes.length&&(console.log(this.allPaymentModes,"this.allPaymentModes"),this.applyPaymentModeConfig(2)),this.allRideTypes.length?(this.rideType=[...this.allRideTypes],this.setRideType((null===(e=this.rideType[0])||void 0===e?void 0:e.type_id)||1)):this.getSeduleConfige(!1),this.cd.detectChanges()}displayFirstScreen(e=!1){e&&this.resetPropertyControl(),this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displaySecondScreen(){this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!0,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displayThirdScreen(){this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayThankYouForm=!1,this.isFirstPart=!0}getResolvedHourlyPackagePricing(e){var t,i,n,o;if(!e)return{minHours:null,maxHours:null,hourlyRate:null,slots:null};const a="Y"===e.zone_price_applied?e.zone_price_model:null;if(a){const r=null!==(t=a.slots)&&void 0!==t?t:e.slots;return{minHours:this.coerceFiniteNumber(null!==(i=a.min_hours)&&void 0!==i?i:e.min_hours),maxHours:this.coerceFiniteNumber(null!==(n=a.max_hours)&&void 0!==n?n:e.max_hours),hourlyRate:this.coerceFiniteNumber(null!==(o=a.hourly_rate)&&void 0!==o?o:e.hourly_rate),slots:Array.isArray(r)?r:null}}const r=e.slots;return{minHours:this.coerceFiniteNumber(e.min_hours),maxHours:this.coerceFiniteNumber(e.max_hours),hourlyRate:this.coerceFiniteNumber(e.hourly_rate),slots:Array.isArray(r)?r:null}}getResolvedHourlyRate(e){var t;const i=null===(t=this.getResolvedHourlyPackagePricing(e))||void 0===t?void 0:t.hourlyRate;if(null!=i)return i;const n=Number(null==e?void 0:e.hourly_rate);return Number.isFinite(n)?n:0}getResolvedPriceType(e){var t;if(!e)return null;const i=e.zone_price_model,n=null==i||"object"!=typeof i||Array.isArray(i)||null===(t=i.price_type)||void 0===t?e.price_type:t,o=Number(n);return Number.isFinite(o)?o:null}isHourlyRateTimesHoursPricing(e){return 5===this.getResolvedPriceType(e)}isPackageSlotAmountPricing(e){return 4===this.getResolvedPriceType(e)}getSlotAmountForPackageSelection(e,t){var i;if(!this.isPackageSlotAmountPricing(e)||null==t)return null;const n=null===(i=this.getResolvedHourlyPackagePricing(e))||void 0===i?void 0:i.slots;if(!Array.isArray(n))return null;const o=n.find(e=>e.id==t);if(!o||null==o.slot_amount)return null;const a=Number(o.slot_amount);return Number.isFinite(a)?a:null}hourlyPackageCardDisplay(e){var t,i;const n=this.getResolvedHourlyPackagePricing(null==e?void 0:e.pricing);return{minHours:null!==(t=n.minHours)&&void 0!==t?t:0,hourlyRate:null!==(i=n.hourlyRate)&&void 0!==i?i:0}}coerceFiniteNumber(e){if(null==e||""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}syncRentalHourlyOptionsFromVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_;const f=null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key;if(!(null==e?void 0:e.pricing)||!["hourly","package"].includes(f))return;const v=this.getResolvedHourlyPackagePricing(e.pricing);if("hourly"===f){let e=null!==(i=v.minHours)&&void 0!==i?i:1,t=null!==(n=v.maxHours)&&void 0!==n?n:24;if(t<e){const i=e;e=t,t=i}t=Math.min(t,168),this.hoursArray=[];for(let i=e;i<=t;i++)this.hoursArray.push({name:`${i} hrs`,value:i});const u=null!==(o=v.minHours)&&void 0!==o?o:e,d=null===(r=null===(a=this.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour,c=null!=d&&d>=e&&d<=t?d:u;null===(l=this.addForm.controls.hour)||void 0===l||l.setValue(c,{emitEvent:!1}
1),null===(s=this.filterVehicleArray)||void 0===s||s.forEach(e=>{(null==e?void 0:e.pricing)&&(e.pricing.selected_hours=c)}),this.changeHours()}if(this.rentalPackages=null!=v.slots?v.slots:[],"package"===f){const t=null===(d=null===(u=this.addForm)||void 0===u?void 0:u.value)||void 0===d?void 0:d.packages;if(null!=t&&!this.rentalPackages.some(e=>e.id==t)&&(null===(c=this.addForm.controls.packages)||void 0===c||c.setValue(null)),this.isPackageSlotAmountPricing(e.pricing)&&(null===(h=this.rentalPackages)||void 0===h?void 0:h.length)){const e=null===(p=null===(g=this.addForm)||void 0===g?void 0:g.value)||void 0===p?void 0:p.packages,t=null!=e&&this.rentalPackages.some(t=>t.id==e)?e:null===(m=this.rentalPackages[0])||void 0===m?void 0:m.id;null!=t&&(null===(_=this.addForm.controls.packages)||void 0===_||_.setValue(t,{emitEvent:!1}),this.changePackages())}}}validationForRental(){var e,t;this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),"hourly"==(null===(e=this.selectedBookingTypeObj)||void 0===e?void 0:e.field_key)?(this.addForm.controls.hour.setValidators([r.kI.required]),this.addForm.controls.packages.setValidators([])):"package"==(null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key)?(this.addForm.controls.packages.setValidators([r.kI.required]),this.addForm.controls.hour.setValidators([])):(this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.setValidators([])),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}shouldHideCharge(e){return"booster_seat"===(null==e?void 0:e.charges_key)||"child_seat"===(null==e?void 0:e.charges_key)||(null==e?void 0:e.is_required)}changeHours(){var e=this;return(0,y.Z)(function*(){var t,i,n,o,a,r;if(!e.selectedVehicleObj)return;const l=e.addForm.value.hour;if(l&&(e.filterVehicleArray.forEach(t=>{if(t.pricing.selected_hours=l,t.id===e.selectedVehicleObj.id||!e.isHourlyRateTimesHoursPricing(t.pricing))return;let i=e.getResolvedHourlyRate(null==t?void 0:t.pricing)*l-e.additionalDiscount;t.final_fare.amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge}),e.isHourlyRateTimesHoursPricing(null===(t=e.selectedVehicleObj)||void 0===t?void 0:t.pricing))){let t=e.getResolvedHourlyRate(null===(i=e.selectedVehicleObj)||void 0===i?void 0:i.pricing)*l-e.additionalDiscount;e.hours_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare,e.selectedVehicleObj.pricing.selected_hours=(null===(o=null===(n=e.addForm)||void 0===n?void 0:n.value)||void 0===o?void 0:o.hour)?null===(r=null===(a=e.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour:0})()}changePackages(){var e=this;return(0,y.Z)(function*(){var t;if(!e.selectedVehicleObj)return;const i=null===(t=e.addForm.value)||void 0===t?void 0:t.packages,n=e.getSlotAmountForPackageSelection(e.selectedVehicleObj.pricing,i);if(null!=n){e.filterVehicleArray.forEach(t=>{if(t.id===e.selectedVehicleObj.id)return;const n=e.getSlotAmountForPackageSelection(t.pricing,i);null!=n&&(t.final_fare.amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge)});let t=n-e.additionalDiscount;e.package_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPasse
1ngerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare})()}removeValidation(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),this.addForm.controls.packages.setValidators([]),this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}setDateintime(){const e=new Date(this.addForm.value.request_time),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())this.setMinTime();else{let t=new Date(this.addForm.value.trip_time[0]||new Date);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.trip_time=t,this.addForm.controls.trip_time.setValue(t),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig.minDate=new Date(t)}}setMinTime(){const e=new Date;this.trip_time=new Date(e.getTime()+6e4*(this.min_date||0)),this.addForm.controls.trip_time.setValue(new Date(this.trip_time)),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(this.trip_time))}initDefaultReturnDateTime(){var e,t,i;let n=new Date((new Date).getTime()+36e5).getTime(),o=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),a=new Date(Math.max(n,o));this.returnDateFormatConfig.minDate=new Date,this.returnTimeFormatConfig.minDate=new Date(a),this.return_date=a,this.return_trip_time=a,this.return_time=a,this.addForm&&(null===(e=this.addForm.controls.return_date)||void 0===e||e.setValue(a),null===(t=this.addForm.controls.return_trip_time)||void 0===t||t.setValue(a),null===(i=this.addForm.controls.return_time)||void 0===i||i.setValue(a)),this.selectedDate=a,this.syncReturnDateTime()}syncReturnDateTime(){var e,t,i,n,o,a,r;const l=null!==(i=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("return_date"))||void 0===t?void 0:t.value)&&void 0!==i?i:this.return_date,s=null!==(a=null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("return_trip_time"))||void 0===o?void 0:o.value)&&void 0!==a?a:this.return_trip_time;if(!l||!s)return;const u=new Date(l),d=new Date(Array.isArray(s)?s[0]:s),c=new Date(u.getFullYear(),u.getMonth(),u.getDate(),d.getHours(),d.getMinutes(),d.getSeconds());null===(r=this.addForm.get("return_time"))||void 0===r||r.setValue(c),this.selectedDate=c,this.return_time=c}setReturnTimeFromDate(){const e=new Date(this.addForm.value.return_date),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()){let e=new Date((new Date).getTime()+36e5).getTime(),t=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),i=new Date(Math.max(e,t));this.return_trip_time=i,this.addForm.controls.return_trip_time.setValue(i),this.returnTimeFormatConfig.minDate=i}else{let t=new Date(this.addForm.value.return_trip_time||new Date);Array.isArray(t)&&(t=new Date(t[0])),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t),this.returnTimeFormatConfig.minDate=new Date(t)}}changeBookingTypeList(e){1==e?(this.isTaxiActive=!0,this.isRentalActive=!1,this.transactionCategory=this.transactionCategoryList.filter(e=>"point_to_point"==e.field_key||"airport_drop_off_transfer"==e.field_key||"airport_pick_up_transfer"==e.field_key||"round"==e.field_key)):2==e&&(this.isTaxiActive=!1,this.isRentalActive=!0,this.transactionCategory=this.transactionCategoryList.filter(e=>"hourly"==e.field_key||"package"==e.field_key));let t=this.transactionCategory[0];this.booking_type_id=null==t?void 0:t.id,this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.addForm.controls.booking_type_id.updateValueAndValidity(),this.changeBookingType(t)}setPaymentMode(e){const t=e&&"object"==typeof e?e:this.paymentMode.find(t=>(null==t?void 0:t.id)==e);this.addForm.controls.payment_mode_id.setValue(null==t?void 0:t.id),this.addForm.controls.paymentMode.setValue(null==t?void 0:t.payment_mode_key),this.addForm.controls.payment_mode_id.updateValueAndValidity(),this.addForm.controls.paymentMode.updateValueAndValidity(),this.applyPaymentTypeFromSelectedMode(t)}applyPaymentTypeFromSelectedMode(e){if(!(0,A.kB)(this.company_id)){if(null==e?void 0:e.payment_type){const t=(0,A.L3)(e.payment_type);this.pre_payment_value=t.prePaymentValue,this.pre_payment=t.prePayment,this.channelPaymentType=t.paymentType,this.channelPaymentTypeLabel=t.paymentTypeLabel}this.loadPaymentRulePolicy(null==e?void 0:e.id)}}loadPaymentRulePolicy(e){!e||(0,A.kB)(this.company_id)||this.yelowCabService.getPaymentRulePolicy({booking_channel:A.fj,payment_method:e}).subscribe(e=>{if(!(null==e?void 0:e.status)&&!(null==e?void 0:e.success)||!(null==e?void 0:e.data))return;const t=(0,A.$I)(e.data);if(!t)return;const i=(0,A.L3)(t);this.pre_payment_value=i.prePaymentValue,this.pre_payment=i.prePayment,this.channelPaymentType=i.paymentType,this.channelPaymentTypeLabel=i.paymentTypeLabel,this.cd.detectChanges()},()=>{})}onBookingAssetsChange(e){this.bookingAssetsList=e||[]}
1buildBookingAssetsPayload(){return(this.bookingAssetsList||[]).filter(e=>e&&1!==e.is_delete&&!!e.asset_value).map(e=>{var t;const i=null===(t=M._B.find(t=>t.id===String(e.asset_type)))||void 0===t?void 0:t.kind;return Object.assign({asset_type:String(e.asset_type),user_type:e.user_type,asset_value:e.asset_value},"file"!==i&&"voice"!==i||!e.file_name?{}:{file_name:e.file_name})})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e),f.Y36(f.sBO),f.Y36(E.Z),f.Y36(r.qu),f.Y36(U.F),f.Y36(N.d),f.Y36(I._W),f.Y36(j.C),f.Y36(o.gz),f.Y36(R.T),f.Y36(o.F0),f.Y36(z.x))},e.\u0275cmp=f.Xpm({type:e,selectors:[["yelowcab-booking-layout-three-form"]],inputs:{is_full_screen:"is_full_screen",tabsOnly:"tabsOnly"},decls:361,vars:133,consts:[["autocomplete","off","role","form",1,"default-width",3,"formGroup"],[4,"ngIf"],[3,"hidden"],[1,"booking-card"],["class","lorder-wrap",4,"ngIf"],[1,"booking-tabs"],["type","button","class","booking-tab",3,"ngClass","click",4,"ngIf"],[1,"booking-card-body"],["class","0order-header--steps d-flex p-3 m-0 border-bottom bg-light","style","position: sticky; top: 0; z-index: 1050;min-height: 65px;",4,"ngIf"],[1,"booking-card-body-scroll"],["class","booking-hold-banner",4,"ngIf"],["class","address-field",4,"ngIf"],[1,"address-field",3,"ngClass"],[1,"field-label"],[1,"field-input-row"],["width","18","height","18","fill","currentColor","viewBox","0 0 24 24"],["d","M18.364 17.364L12 23.728l-6.364-6.364a9 9 0 1 1 12.728 0zM12 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"],[1,"location-search","w-100",3,"placeholder","isBooing","responseData","searchText","is_disable","search","searchEvent"],["class","help-block text-danger",3,"innerHTML",4,"ngIf"],["class","form-text text-danger",4,"ngIf"],["formArrayName","checkpoints"],[3,"formGroupName",4,"ngFor","ngForOf"],["class","address-field",3,"ngClass",4,"ngIf"],["class","add-stop-row my-1",4,"ngIf"],["class","request-time-field",3,"click",4,"ngIf"],["class","request-time-field",4,"ngIf"],["class","schedule-row",4,"ngIf"],[1,"booking-card-footer"],["type","button",1,"book-ride-btn",3,"disabled","click"],["type","button","class","booking-tab",3,"ngClass",4,"ngIf"],[1,"0order-header--steps","d-flex","p-3","mb-0","border-bottom","bg-light",2,"position","sticky","top","0","z-index","100000","min-height","65px"],[1,"step-book","border-solid","black-border-active"],[1,"btn-gray"],[1,"btn-text","btn-text-active",3,"click"],[1,"step-main"],[1,"round-border","round-border-active"],[1,"step-book","border-solid"],["disabled","",1,"btn-text","btn-text-active"],[1,"btn-text"],[1,"_stepTitleActiveCircleSpace_ojtdk_137"],[1,"round-border"],[1,"step-book","_stepNotVisited_ojtdk_75","cursor-notallowed"],["disabled","",1,"btn-text","cursor-notallowed"],[1,"step-book","cursor-notallowed"],[1,"step-book","text-left"],["bindLabel","language_code","bindValue","language_code",1,"nav-link","p-0","ps-2",2,"min-width","75px",3,"items","clearable","ngModel","ngModelOptions","ngModelChange","change"],["class","bg-light p-3 mt-5 rounded-3 mb-5",4,"ngIf"],[1,"fw-semibold","mb-2","h5"],[1,"font-size-14"],["class","schedule-row",3,"ngClass",4,"ngIf"],["class","return-location-stack mb-3 mt-3",4,"ngIf"],[1,"field-box"],["mode","local","modalId","bookingFormAssetsModalThree",3,"title","assets","compact","assetsChange"],["class","trip-type d-flex justify-content-between mb-3 mt-3 ",4,"ngIf"],["class","field-box other-charges-section",4,"ngIf"],["class","booking-form-body border","formArrayName","properties",4,"ngIf"],["class","fa fa-spinner fa-spin",4,"ngIf"],[1,"0order-header--steps","d-flex","p-4","bg-light","m-0","border-bottom",2,"position","sticky","top","0","z-index","100000","min-height","65px"],[1,"btn-text","btn-text-active",3,"disabled","click"],[1,"btn-text","btn-text-active"],["href","javascript:;",1,"text-decoration-none",2,"color","currentColor !important"],[1,"list-unstyled","border","rounded-3","overflow-hidden","custom-select-menu","mb-0"],["class","p-3",3,"border-bottom","ngClass","click",4,"ngFor","ngForOf"],["class","form-row",4,"ngIf"],[1,"pt-4","border-top","bg-white"],[1,"form-row","top-menu-selection","gap-2"],["class","form-group col mb-0 top-custom-select",4,"ngIf"],["class","form-group col mb-0",3,"ngClass",4,"ngIf"],[1,"0order-header--steps","d-flex","p-3","mb-0","bg-light","border-bottom",2,"position","sticky","top","0","z-index","100000","min-height","65px"],["class","step-book text-left",4,"ngIf"],[3,"isOtpVerification","callBackObject"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking",4,"ngIf"],[1,"text-center","py-4"],[1,"fa","fa-check-circle","fa-4x",2,"color","var(--bs-brand-color)"],[1,"mt-3","fw-semibold",2,"color","#2d3b4e"],[2,"color","#617182"],["type","button",1,"book-ride
1-btn",3,"click"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","class","modal fade","aria-hidden","true",4,"ngIf"],["id","fixdestination","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],["class","modal-body flex",4,"ngIf"],[1,"modal-footer","bg-light"],["type","submit",1,"btn","btn-primary",3,"click"],["id","selectUserPickupLocation","role","dialog","aria-labelledby","selectUserPickupLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["autocomplete","off","role","form",3,"ngSubmit"],["id","selectUserPickupLocationLabel",1,"modal-title","flex"],[1,"modal-body","py-0"],[1,"radioStyle1","radioStyleCustom","largeChecked"],["class","control control-outline control-info control--radio d-block my-3 border rounded",4,"ngFor","ngForOf"],["data-dismiss","modal","type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],["id","selectUserDropoffLocation","role","dialog","aria-labelledby","selectUserDropoffLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["id","selectUserDropoffLocationLabel",1,"modal-title","flex"],[1,"header-tabs"],["type","button",1,"header-tab","active"],["type","button",1,"header-tab"],[1,"lorder-wrap"],[1,"loader"],["type","button",1,"booking-tab",3,"ngClass","click"],[1,"0order-header--steps","d-flex","p-3","m-0","border-bottom","bg-light",2,"position","sticky","top","0","z-index","1050","min-height","65px"],[1,"booking-hold-banner"],[1,"address-field"],["d","M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"],["bindLabel","title","bindValue","id",1,"ride-type-select","layout-three-dropdown",3,"placeholder","items","clearable","formControl","searchable","change"],[1,"help-block","text-danger",3,"innerHTML"],[1,"form-text","text-danger"],[3,"formGroupName"],[1,"address-field","checkpoint-field"],[1,"location-search","w-100",3,"placeholder","responseData","isBooing","searchText","search","searchEvent"],["href","javascript:;",1,"remove-field",3,"click"],[1,"fa","fa-trash"],[1,"location-search","w-100",3,"is_disable","placeholder","responseData","isBooing","searchText","search","searchEvent"],["class","help-block text-danger",4,"ngIf"],[1,"help-block","text-danger"],[1,"add-stop-row","my-1"],["type","button",1,"add-stop-btn",3,"click"],[1,"request-time-field",3,"click"],[1,"chevron"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-caret-down-fill"],["d","M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"],[1,"request-time-field"],[1,"schedule-row"],[1,"col-half"],[3,"placeholder","config","ngClass","formControl","setDate"],["appendTo","body","placeholder","Select Start Time",1,"p-0","time-flatpicker",3,"config","formControl","setDate"],["class","field-box",4,"ngIf"],["d","M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"],["type","text",1,"field-input",3,"placeholder","formControl"],["notFoundText","No Records Found",1,"field-select","layout-three-dropdown",3,"clearable","placeholder","ngModel","ngModelOptions","input","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"d-flex"],[1,"icon","me-2",2,"vertical-align","-2px"],[1,"fa","fa-plane"],[1,"ml-2",3,"title"],["type","button",1,"booking-tab",3,"ngClass"],[1,"bg-light","p-3","mt-5","rounded-3","mb-5"],[1,"font-size-16","fw-normal","text-black","mb-1"],[1,"font-size-16","mb-1"],[1,"list-unstyled","mb-0"],[1,"card-title","my-3","font-weight-300","font-size-16",2,"margin-left","15px","padding-bottom","2px"],[1,"mb-1","font-weight-600","pl-3"],[1,"text-muted","mb-1","nowrap"],[1,"float-right","nowrap"],[1,"fw-normal","mb-2","pb-1","d-flex","align-items-center",2,"color","rgb(97, 113, 130)"],[1,"ml-auto","auto-fixed-switch","d-flex","align-items-center"],["id","RideReturn","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideReturn",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],[1,"schedule-row",3,"ngClass"],["appendTo","body","placeholder","Select Return Time",1,"p-0","time-flatpicker",3,"config","formControl","setDate","ngClass"],["class","help-block text-center d-block w-100",3,"innerHTML",4,"ngIf"],[1,"help-block","text-center","d-block","w-100",3,"innerHTML"],[1,"return-location-stack","mb-3","mt-3"],["d","M4 4h16v16H4V4zm2 2v12h12V6H6zm2 2h8v8H8V8z"],[1,"trip-type","d-flex","justify-content-between","mb-3","mt-3"],[1,"m-0","fw-normal",2,"color","rgb(97, 113, 130)"],[1,"form-group","mb-0"],[1,"0radioStyle1","0small-height","d-flex","0justify-content-between"],["class","control control-outline control-primary control--radio ml-3 0flex-fill control-outline-small mb-0",4,"ngFor","ngForOf"],[1,"control","control-outline","control-primary","control--radio","ml-3","0flex-fill","control-outline-small","mb-0"],["name","GENDER","type","radio",1,"custom-control-input",3,"value","formControl","checked","click"],[1,"control__indicator"],[1,"field-box","other-charges-section"],[4,"ngFor","ngForOf"],[1,"control","control-outline","control-info","control--checkbox","other-charge-item","d-block","mb-2"],["type","checkbox","name","selectedtype",3,"id","value","checked","disabled","change"],["class","seats-counter-wrap",4,"ngIf"],[1,"seats-counter-wrap"],[1,"form-group","passengers-input","js-baby-seats","position-relative","mb-3"],["data-action","decrement",1,"minus","dongle","form-control",3,"ngStyle","click"],["type","text","value","0","readonly","",1,"form-control","new","text-center",3,"formControl"],["data-action","increment",1,"plus","dongle","form-control",3,"click"],["type","text","readonly","",1,"form-control","new","text-center",3,"value"],["formArrayName","properties",1,"booking-form-body","border"],[1,"input-info","mb-0"],[1,"control-label"],["class","astrsk",4,"ngIf"],[1,"form-group"],[1,"astr
1sk"],[3,"ngClass"],["type","text","formControlName","value",1,"form-control","pt-2",3,"placeholder"],[1,"input-group",3,"ngClass"],["placeholder","select date","formControlName","value",1,"form-control","p-0",3,"config","onChange"],[1,"input-group-addon"],[1,"fa","fa-calendar"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","label-badge","form-control0","select-single-with-search","remove-space",3,"items","notFoundText","multiple"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","form-control0","select-single-with-search",3,"notFoundText","items"],[1,"additional-seats--row"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative","mb-0",3,"ngClass"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"click"],["type","text","formControlName","value","numberOnly","","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"click"],[1,"document-field",3,"ngClass"],[1,"document-field-row"],[1,"document-field-name"],["class","fa fa-file-o",4,"ngIf"],[1,"document-field-name-text"],[1,"document-field-upload"],["type","file",3,"id","disabled","change"],["docFileInput",""],["type","button","class","document-field-remove","title","Remove",3,"click",4,"ngIf"],["type","hidden","formControlName","value"],["type","hidden","formControlName","file_name"],[1,"document-field-hint"],[1,"fa","fa-file-o"],[1,"fa","fa-spinner","fa-spin"],["type","button","title","Remove",1,"document-field-remove",3,"click"],[1,"p-3",3,"ngClass","click"],[1,"d-flex","align-items-center"],["alt","Logo",2,"width","80px","height","64px","object-fit","contain","min-width","80px","text-align","center",3,"src"],[1,"ms-3"],[1,"font-size-16","text-black","fw-semibold","font-size-16","text-black","mb-0"],[1,"mb-1","text-muted","font-size-12"],[1,"d-flex","align-items-center","mb-1"],[1,"mb-0","d-flex","align-items-center"],["role","img","aria-label","Icon/Guests","width","16px","height","16px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","SuggestedCarClasses_icon__AgHlS"],["d","M2 22a8 8 0 1 1 16 0H2zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm7.363 2.233A7.505 7.505 0 0 1 22.983 22H20c0-2.61-1-4.986-2.637-6.767zm-2.023-2.276A7.98 7.98 0 0 0 18 7a7.964 7.964 0 0 0-1.015-3.903A5 5 0 0 1 21 8a4.999 4.999 0 0 1-5.66 4.957z"],[1,"ms-1","font-size-16","text-black"],[1,"ms-3","mb-0","d-flex","align-items-center"],["role","img","aria-label","Icon/Luggages","width","16px","height","16px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","SuggestedCarClasses_icon__AgHlS"],["d","M15 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v13c0 .552-.448 1-1 1H3c-.552 0-1-.448-1-1V7c0-.552.448-1 1-1h5V4c0-.552.448-1 1-1h6zM8 8H6v11h2V8zm10 0h-2v11h2V8zm-4-3h-4v1h4V5z"],[1,"ms-auto","d-flex","align-self-start"],[1,"font-size-20","text-black","fw-semibold"],["class","text-muted font-size-12",4,"ngIf"],["class","price-section-dayprice",4,"ngIf"],["class","accordion ms-2",4,"ngIf"],["data-bs-parent","#accordionExample",1,"collapse","mt-3",3,"ngClass"],[1,"table","remove-padding","mb-2"],["colspan","2",1,"no-border","px-0"],[1,"font-weight-normal"],["colspan","2",1,"no-border"],["colspan","2","class","no-border",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","pb-3"],[1,"text-black","fw-semibold","font-size-16"],[1,"d-flex","align-item-center","justify-content-between","text-black","py-2","fw-semibold"],[1,"font-size-14","dot"],["class","d-flex align-item-center justify-content-between pb-3",4,"ngIf"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],["class","d-flex align-item-center justify-content-between ps-3",4,"ngFor","ngForOf"],["class","d-flex align-item-center justify-content-between text-black fw-semibold",4,"ngIf"],[1,"text-muted","font-size-12"],[1,"price-section-dayprice"],[1,"accordion","ms-2"],["data-bs-toggle","collapse",1,"curs
1or-pointer",3,"click"],[1,"fa-lg","ml-auto","accordian-icon","text-black",3,"ngClass"],[1,"d-flex","align-item-center","justify-content-between"],[1,"d-flex","align-item-center","justify-content-between","ps-3"],[1,"fa","fa-dot-circle-o"],[1,"d-flex","align-item-center","justify-content-between","text-black","fw-semibold"],["class","d-flex align-item-center justify-content-between ps-4",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","ps-4"],[1,"border-top","mt-4","pt-4"],[1,"table","remove-padding"],[1,"form-row"],[1,"form-group","col",3,"ngClass"],["placeholder","Select Package",1,"form-control0","select-single-with-search",3,"formControl","change"],["bindLabel","name","bindValue","value",3,"placeholder","items","formControl","change"],[1,"form-group","col","mb-0","top-custom-select"],[1,"input-group"],[1,"fa","fa-user"],["dropdownPosition","top","placeholder","--","bindLabel","name","bindValue","id",1,"flex-fill",3,"items","formControl","change"],[1,"fa","fa-suitcase"],[1,"form-group","col","mb-0",3,"ngClass"],["dropdownPosition","top","placeholder","Payment Mode","bindLabel","charges_key","bindValue","id",3,"items","searchable","clearable","notFoundText","formControl","change"],["ng-label-tmp",""],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"modal-body","flex"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"price-section","align-self-start"],[1,"price-section__left"],[1,"control","control-outline","control-info","control--radio","d-block","my-3","border","rounded"],[1,"font-weight-600","mt-0","mb-2"],[1,"mb-0","text-muted"],["type","radio","name","p-options","autocomplete","off",3,"id","change"],["type","radio","name","d-options","autocomplete","off",3,"id","change"]],template:function(e,t){if(1&e&&(f.TgZ(0,"form",0),f.YNc(1,en,6,0,"ng-container",1),f.TgZ(2,"div",2),f.TgZ(3,"div",3),f.YNc(4,tn,2,0,"div",4),f.TgZ(5,"div",5),f.YNc(6,on,2,3,"button",6),f.YNc(7,an,2,3,"button",6),f.qZA(),f.TgZ(8,"div",7),f.YNc(9,sn,38,7,"ol",8),f.TgZ(10,"div",9),f.YNc(11,un,2,1,"div",10),f.YNc(12,dn,7,5,"div",11),f.TgZ(13,"div",12),f.TgZ(14,"div",13),f._uU(15),f.qZA(),f.TgZ(16,"div",14),f.O4$(),f.TgZ(17,"svg",15),f._UZ(18,"path",16),f.qZA(),f.kcU(),f.TgZ(19,"app-search-box-google",17),f.NdJ("search",function(e){return t.OnSearch(e)})("searchEvent",function(e){return t.searchEvent(e)}),f.qZA(),f.qZA(),f.YNc(20,cn,1,1,"span",18),f.YNc(21,hn,2,1,"span",19),f.qZA(),f.TgZ(22,"div",20),f.YNc(23,pn,9,6,"ng-container",21),f.qZA(),f.YNc(24,vn,9,11,"div",22),f.YNc(25,yn,3,0,"div",23),f.YNc(26,bn,6,1,"div",24),f.YNc(27,xn,6,1,"div",25),f.YNc(28,kn,11,12,"div",26),f.YNc(29,Tn,3,2,"div",1),f.qZA(),f.TgZ(30,"div",27),f.TgZ(31,"button",28),f.NdJ("click",function(){return t.submitFirstForm(t.addForm)}),f._uU(32),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(33,"div",2),f.TgZ(34,"div",3),f.YNc(35,An,2,0,"div",4),f.TgZ(36,"div",5),f.YNc(37,Pn,2,3,"button",29),f.YNc(38,wn,2,3,"button",29),f.qZA(),f.TgZ(39,"div",7),f.TgZ(40,"ol",30),f.TgZ(41,"li",31),f.TgZ(42,"div",32),f.TgZ(43,"button",33),f.NdJ("click",function(){return t.displayFirstScreen(!0)}),f._uU(44),f.qZA(),f.qZA(),f.TgZ(45,"div",34),f._UZ(46,"div",35),f.qZA(),f.qZA(),f.TgZ(47,"li",36),f.TgZ(48,"div",32),f.TgZ(49,"button",37),f._uU(50),f.qZA(),f.qZA(),f.TgZ(51,"div",34),f._UZ(52,"div",35),f.qZA(),f.qZA(),f.TgZ(53,"li",36),f.TgZ(54,"div",32),f.TgZ(55,"button",38),f._uU(56),f.qZA(),f.qZA(),f.TgZ(57,"div",39),f._UZ(58,"div",40),f.qZA(),f.qZA(),f.TgZ(59,"li",41),f.TgZ(60,"div",32),f.TgZ(61,"button",42),f._uU(62),f.qZA(),f.qZA(),f.TgZ(63,"div",34),f._UZ(64,"div",40),f.qZA(),f.qZA(),f.TgZ(65,"li",41),f.TgZ(66,"div",32),f.TgZ(67,"button",42),f._uU(68),f.qZA(),f.qZA(),f.TgZ(69,"div",34),f._UZ(70,"div",40),f.qZA(),f.qZA(),f.TgZ(71,"li",43),f.TgZ(72,"div",32),f.TgZ(73,"button",42),f._uU(74),f.qZA(),f.qZA(),f.TgZ(75,"div",34),f._UZ(76,"div",40),f.qZA(),f.qZA(),f.TgZ(77,"li",44),f.TgZ(78,"ng-select",45),f.NdJ("ngModelChange",function(e){return t.selectedLanguage=e})("change",function(){return t.changeLanguage()}),f.qZA(),f.qZA(),f.qZA(),f.TgZ(79,"div",9),f.YNc(80,qn,2,1,"div",10),f.YNc(81,Dn,56,37,"div",46),f.TgZ(82,"div"),f.TgZ(83,"h4",47),f._uU(84),f.qZA(),f.TgZ(85,"p",48),f._uU(86),f.qZA(),f.YNc(87,On,6,2,"ng-container",1),f.YNc(88,Mn,12,19,"div",49),f.YNc(89,En,17,14,"div",50),f.TgZ(90,"div",51),f.TgZ(91,"app-booking-assets",52),f.NdJ("assetsChange",function(e){return t.onBookingAssetsChange(e)}
1),f.qZA(),f.qZA(),f.YNc(92,Nn,6,2,"div",53),f.YNc(93,$n,4,2,"div",54),f.YNc(94,so,2,1,"div",55),f.qZA(),f.qZA(),f.TgZ(95,"div",27),f.TgZ(96,"button",28),f.NdJ("click",function(){return t.submitSecondForm(t.addForm)}),f.YNc(97,uo,1,0,"i",56),f._uU(98),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(99,"div",2),f.TgZ(100,"div",3),f.YNc(101,co,2,0,"div",4),f.TgZ(102,"div",5),f.YNc(103,ho,2,3,"button",29),f.YNc(104,go,2,3,"button",29),f.qZA(),f.TgZ(105,"div",7),f.TgZ(106,"ol",57),f.TgZ(107,"li",31),f.TgZ(108,"div",32),f.TgZ(109,"button",33),f.NdJ("click",function(){return t.displayFirstScreen()}),f._uU(110),f.qZA(),f.qZA(),f.TgZ(111,"div",34),f._UZ(112,"div",35),f.qZA(),f.qZA(),f.TgZ(113,"li",31),f.TgZ(114,"div",32),f.TgZ(115,"button",58),f.NdJ("click",function(){return t.displaySecondScreen()}),f._uU(116),f.qZA(),f.qZA(),f.TgZ(117,"div",34),f._UZ(118,"div",35),f.qZA(),f.qZA(),f.TgZ(119,"li",36),f.TgZ(120,"div",32),f.TgZ(121,"button",59),f._uU(122),f.qZA(),f.qZA(),f.TgZ(123,"div",39),f._UZ(124,"div",35),f.qZA(),f.qZA(),f.TgZ(125,"li",41),f.TgZ(126,"div",32),f.TgZ(127,"button",42),f._uU(128),f.qZA(),f.qZA(),f.TgZ(129,"div",34),f._UZ(130,"div",40),f.qZA(),f.qZA(),f.TgZ(131,"li",41),f.TgZ(132,"div",32),f.TgZ(133,"button",42),f._uU(134),f.qZA(),f.qZA(),f.TgZ(135,"div",34),f._UZ(136,"div",40),f.qZA(),f.qZA(),f.TgZ(137,"li",43),f.TgZ(138,"div",32),f.TgZ(139,"button",42),f._uU(140),f.qZA(),f.qZA(),f.TgZ(141,"div",34),f._UZ(142,"div",40),f.qZA(),f.qZA(),f.TgZ(143,"li",44),f.TgZ(144,"ng-select",45),f.NdJ("ngModelChange",function(e){return t.selectedLanguage=e})("change",function(){return t.changeLanguage()}),f.qZA(),f.qZA(),f.qZA(),f.TgZ(145,"div",9),f.YNc(146,po,2,1,"div",10),f.TgZ(147,"a",60),f.TgZ(148,"ul",61),f.YNc(149,na,82,58,"li",62),f.qZA(),f.qZA(),f.YNc(150,aa,4,5,"div",63),f.YNc(151,ra,3,6,"div",63),f.TgZ(152,"div",64),f.TgZ(153,"div",65),f.YNc(154,la,5,2,"div",66),f.YNc(155,sa,5,2,"div",66),f.YNc(156,da,3,8,"div",67),f.qZA(),f.qZA(),f.qZA(),f.TgZ(157,"div",27),f.TgZ(158,"button",28),f.NdJ("click",function(){return t.goToLoginScreen()}),f._uU(159),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(160,"div",2),f.TgZ(161,"div",3),f.YNc(162,ca,2,0,"div",4),f.TgZ(163,"div",5),f.YNc(164,ha,2,3,"button",29),f.YNc(165,ga,2,3,"button",29),f.qZA(),f.TgZ(166,"div",7),f.TgZ(167,"ol",68),f.TgZ(168,"li",31),f.TgZ(169,"div",32),f.TgZ(170,"button",33),f.NdJ("click",function(){return t.displayFirstScreen()}),f._uU(171),f.qZA(),f.qZA(),f.TgZ(172,"div",34),f._UZ(173,"div",35),f.qZA(),f.qZA(),f.TgZ(174,"li",31),f.TgZ(175,"div",32),f.TgZ(176,"button",58),f.NdJ("click",function(){return t.displaySecondScreen()}),f._uU(177),f.qZA(),f.qZA(),f.TgZ(178,"div",34),f._UZ(179,"div",35),f.qZA(),f.qZA(),f.TgZ(180,"li",31),f.TgZ(181,"div",32),f.TgZ(182,"button",33),f.NdJ("click",function(){return t.displayThirdScreen()}),f._uU(183),f.qZA(),f.qZA(),f.TgZ(184,"div",39),f._UZ(185,"div",35),f.qZA(),f.qZA(),f.TgZ(186,"li",36),f.TgZ(187,"div",32),f.TgZ(188,"button",37),f._uU(189),f.qZA(),f.qZA(),f.TgZ(190,"div",34),f._UZ(191,"div",35),f.qZA(),f.qZA(),f.TgZ(192,"li",41),f.TgZ(193,"div",32),f.TgZ(194,"button",42),f._uU(195),f.qZA(),f.qZA(),f.TgZ(196,"div",34),f._UZ(197,"div",40),f.qZA(),f.qZA(),f.TgZ(198,"li",43),f.TgZ(199,"div",32),f.TgZ(200,"button",42),f._uU(201),f.qZA(),f.qZA(),f.TgZ(202,"div",34),f._UZ(203,"div",40),f.qZA(),f.qZA(),f.YNc(204,pa,2,5,"li",69),f.qZA(),f.TgZ(205,"div",9),f.YNc(206,ma,2,1,"div",10),f.TgZ(207,"app-yelowcab-login",70),f.NdJ("callBackObject",function(e){return t.showLoginSingUpPage(e)}),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(208,"div",2),f.TgZ(209,"div",3),f.YNc(210,_a,2,0,"div",4),f.TgZ(211,"div",5),f.YNc(212,fa,2,3,"button",29),f.YNc(213,va,2,3,"button",29),f.qZA(),f.TgZ(214,"div",7),f.TgZ(215,"ol",68),f.TgZ(216,"li",31),f.TgZ(217,"div",32),f.TgZ(218,"button",33),f.NdJ("click",function(){return t.displayFirstScreen()}),f._uU(219),f.qZA(),f.qZA(),f.TgZ(220,"div",34),f._UZ(221,"div",35),f.qZA(),f.qZA(),f.TgZ(222,"li",31),f.TgZ(223,"div",32),f.TgZ(224,"button",58),f.NdJ("click",function(){return t.displaySecondScreen()}),f._uU(225),f.qZA(),f.qZA(),f.TgZ(226,"div",34),f._UZ(227,"div",35),f.qZA(),f.qZA(),f.TgZ(228,"li",31),f.TgZ(229,"div",32),f.TgZ(230,"button",33),f.NdJ("click",function(){return t.displayThirdScreen()}),f._uU(231),f.qZA(),f.qZA(),f.TgZ(232,"div",39),f._UZ(233,"div",35),f.qZA(),f.qZA(),f.TgZ(234,"li",31),f.TgZ(235,"div",32),f.TgZ(236,"button",37),f._uU(237),f.qZA(),f.qZA(),f.TgZ(238,"div",34),f._UZ(239,"div",35),f.qZA(),f.qZA(),f.TgZ(240,"li",36),f.TgZ(241,"div",32),f.TgZ(242,"button",37),f._uU(243),f.qZA(),f.qZA(),f.TgZ(244,"div",34),f._UZ(245,"div",35),f.qZA(),f.qZA(),f.TgZ(246,"li",43),f.TgZ(247,"div",32),f.TgZ(248,"button",42),f._uU(249),f.qZA(),f.qZA(),f.TgZ(250,"div",34),f._UZ(251,"div",40),f.qZA(),f.qZA(),f.YNc(252,ya,2,5,"li",69),f.qZA(),f.TgZ(253,"div",9),f.YNc(254,ba,2,1,"div",10),f.YNc(255,xa,1,8,"app-payment-gatway-list",71),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(256,"div",2),f.TgZ(257,"div",3),f.TgZ(258,"div",5),f.YNc(259,ka,2,3,"button",29),f.YNc(260,Za,2,3,"button",29),f.qZA(),f.TgZ(261,"div",7),f.TgZ(262,"ol",68),f.TgZ(263,"li",31),f.TgZ(264,"div",32),f.TgZ(265,"button",59),f._uU(266),f.qZA(),f.qZA(),f.TgZ(267,"div",34),f._UZ(268,"div",35),f.qZA(),f.qZA(),f.TgZ(269,"li",31),f.TgZ(270,"div",32),f.TgZ(271,"button",59),f._uU(272),f.qZA(),f.qZA(),f.TgZ(273,"div",34),f._UZ(274,"div",35),f.qZA(),f.qZA(),f.TgZ(275,"li",31),f.TgZ(276,"div",32),f.TgZ(277,"button",59),f._uU(278),f.qZA(),f.qZA(),f.TgZ(279,"div",39),f._UZ(280,"div",35),f.qZA(),f.qZA(),f.TgZ(281,"li",31),f.TgZ(282,"div",32),f.TgZ(283,"button",37),f._uU(284),f.qZA(),f.qZA(),f.TgZ(285,"div",34),f._UZ(286,"div",35),f.qZA(),f.qZA(),f.TgZ(287,"li",31),f.TgZ(288,"div",32),f.TgZ(289,"button",37),f._uU(290),f.qZA(),f.qZA(),f.TgZ(291,"div",34),f._UZ(292,"div",35),f.qZA(),f.qZA(),f.TgZ(293,"li",31),f.TgZ(294,"div",32),f.TgZ(295,"button",37),f._uU(296),f.qZA(),f.qZA(),f.TgZ(297,"div",34),f._UZ(298,"div",35),f.qZA(),f.qZA(),f.YNc(299,Ca,2,5,"li",69),f.qZA(),f.TgZ(300,"div",9),f.TgZ(301,"div",72),f._UZ(302,"i",73),f.TgZ(303,"h3",74),f._uU(304),f.qZA(),f.TgZ(305,"p",75),f._uU(306),f.qZA(),f.qZA(),f.qZA(),f.TgZ(307,"div",27),f.TgZ(308,"button",76),f.NdJ("click",function(){return t.ViewUpdate(!0)}),f._uU(309),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(310,Aa,
114,2,"div",77),f.TgZ(311,"div",78),f.TgZ(312,"div",79),f.TgZ(313,"form",80),f.TgZ(314,"div",81),f.TgZ(315,"div",82),f.TgZ(316,"h4",83),f._uU(317,"Select Destination"),f.qZA(),f.TgZ(318,"button",84),f.NdJ("click",function(){return t.closeFixDestinationPopup()}),f.TgZ(319,"span",85),f._uU(320,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(321,wa,2,1,"div",86),f.TgZ(322,"div",87),f.TgZ(323,"button",88),f.NdJ("click",function(){return t.submitZonePricing()}),f._uU(324," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(325,"div",89),f.TgZ(326,"div",79),f.TgZ(327,"form",90),f.NdJ("ngSubmit",function(){return t.submitUserPickUpLocationForm()}),f.TgZ(328,"div",81),f.TgZ(329,"div",82),f.TgZ(330,"h4",91),f._uU(331,"Pickup Saved Address"),f.qZA(),f.TgZ(332,"button",84),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f.TgZ(333,"span",85),f._uU(334,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(335,"div",92),f.TgZ(336,"div",93),f.YNc(337,qa,7,3,"label",94),f.qZA(),f.qZA(),f.TgZ(338,"div",87),f.TgZ(339,"button",95),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f._uU(340,"Cancel"),f.qZA(),f.TgZ(341,"button",96),f._uU(342,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(343,"div",97),f.TgZ(344,"div",79),f.TgZ(345,"form",90),f.NdJ("ngSubmit",function(){return t.submitUserDropoffLocationForm()}),f.TgZ(346,"div",81),f.TgZ(347,"div",82),f.TgZ(348,"h4",98),f._uU(349,"Dropoff Saved Address"),f.qZA(),f.TgZ(350,"button",84),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f.TgZ(351,"span",85),f._uU(352,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(353,"div",92),f.TgZ(354,"div",93),f.YNc(355,Da,7,3,"label",94),f.qZA(),f.qZA(),f.TgZ(356,"div",87),f.TgZ(357,"button",95),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f._uU(358,"Cancel"),f.qZA(),f.TgZ(359,"button",96),f._uU(360,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){let e;f.Q6J("formGroup",t.addForm),f.xp6(1),f.Q6J("ngIf",t.tabsOnly),f.xp6(1),f.Q6J("hidden",!t.displayFirstForm||t.tabsOnly),f.xp6(2),f.Q6J("ngIf",t.loadingState),f.xp6(2),f.Q6J("ngIf",t.isTaxi),f.xp6(1),f.Q6J("ngIf",t.isRental),f.xp6(2),f.Q6J("ngIf",!!t.company_id&&1777!=t.company_id),f.xp6(2),f.Q6J("ngIf",t.isBookingHold),f.xp6(1),f.Q6J("ngIf",1!=t.transactionCategory.length),f.xp6(1),f.Q6J("ngClass",f.VKq(129,fn,t.formErrors.pickup_location)),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.pickup)||"From"),f.xp6(4),f.Q6J("placeholder",(null==t.currentLanguage?null:t.currentLanguage.search_pick_location)||"Address, airport, hotel, ...")("isBooing",!0)("responseData",t.responseData)("searchText",t.searchText)("is_disable",!t.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",t.formErrors.pickup_location),f.xp6(1),f.Q6J("ngIf",!t.pickupRegionFound),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.checkpoints.controls),f.xp6(1),f.Q6J("ngIf","round"!=(null==t.selectedBookingTypeObj?null:t.selectedBookingTypeObj.field_key)),f.xp6(1),f.Q6J("ngIf",0==t.fixZoneDisableDropoff&&(null==(e=t.addForm.get("checkpoints"))||null==e.value?null:e.value.length)<=2),f.xp6(1),f.Q6J("ngIf",t.rideType.length>1),f.xp6(1),f.Q6J("ngIf",t.rideType.length<=1),f.xp6(1),f.Q6J("ngIf",2==t.selectedTab),f.xp6(1),f.Q6J("ngIf",t.displayFlightNumber),f.xp6(2),f.Q6J("disabled",t.isBookingHold||t.addForm.controls.checkpoints.invalid||!t.showNextButton||!t.pickupRegionFound||!t.dropRegionFound||t.sameZoneTripRestricted),f.xp6(1),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.book_ride)||"BOOK RIDE"," "),f.xp6(1),f.Q6J("hidden",!t.displaySecondForm),f.xp6(2),f.Q6J("ngIf",t.loadingState),f.xp6(2),f.Q6J("ngIf",t.isTaxi),f.xp6(1),f.Q6J("ngIf",t.isRental),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.pickup),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.service),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.payment),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.checkout),f.xp6(4),f.Q6J("items",t.languageList)("clearable",!1)("ngModel",t.selectedLanguage)("ngModelOptions",f.DdM(131,rn)),f.xp6(2),f.Q6J("ngIf",t.isBookingHold),f.xp6(1),f.Q6J("ngIf",t.selectedFlightObj),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details_screen_title),f.xp6(2),f.hij("",null==t.currentLanguage?null:t.currentLanguage.details_screen_sub_title,"."),f.xp6(1),f.Q6J("ngIf",t.checkReturnTimeConfig&&"hourly"!=(null==t.selectedBookingTypeObj?null:t.selectedBookingTypeObj.field_key)&&"package"!=(null==t.selectedBookingTypeObj?null:t.selectedBookingTypeObj.field_key)),f.xp6(1),f.Q6J("ngIf",t.returnEnable),f.xp6(1),f.Q6J("ngIf",t.returnEnable),f.xp6(2),f.Q6J("title",(null==t.currentLanguage?null:t.currentLanguage.note_for_driver)||"Notes")("assets",t.bookingAssetsList)("compact",!0),f.xp6(1),f.Q6J("ngIf","Y"==t.checkGenderEnable),f.xp6(1),f.Q6J("ngIf",(null==t.otherChargesArray?null:t.otherChargesArray.length)>0),f.xp6(1),f.Q6J("ngIf",t.addForm.controls.properties.controls.length>0),f.xp6(2),f.Q6J("disabled",t.isBookingHold||t.isDocumentUploading),f.xp6(1),f.Q6J("ngIf",t.isBookingHold||t.isDocumentUploading),f.xp6(1),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.continue)||"Continue"," "),f.xp6(1),f.Q6J("hidden",!t.displayThird
1Form),f.xp6(2),f.Q6J("ngIf",t.loadingState),f.xp6(2),f.Q6J("ngIf",t.isTaxi),f.xp6(1),f.Q6J("ngIf",t.isRental),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.pickup),f.xp6(5),f.Q6J("disabled",0==t.addForm.controls.properties.controls.length),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.service),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.payment),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.checkout),f.xp6(4),f.Q6J("items",t.languageList)("clearable",!1)("ngModel",t.selectedLanguage)("ngModelOptions",f.DdM(132,rn)),f.xp6(2),f.Q6J("ngIf",t.isBookingHold),f.xp6(3),f.Q6J("ngForOf",t.filterVehicleArray),f.xp6(1),f.Q6J("ngIf","package"==(null==t.selectedBookingTypeObj?null:t.selectedBookingTypeObj.field_key)),f.xp6(1),f.Q6J("ngIf","hourly"==(null==t.selectedBookingTypeObj?null:t.selectedBookingTypeObj.field_key)),f.xp6(3),f.Q6J("ngIf",t.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",t.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",t.paymentMode.length>1),f.xp6(2),f.Q6J("disabled",t.disableBtn||t.isBookingHold),f.xp6(1),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.continue)||"Continue"," "),f.xp6(1),f.Q6J("hidden",!t.displayLoginForm),f.xp6(2),f.Q6J("ngIf",t.loadingState),f.xp6(2),f.Q6J("ngIf",t.isTaxi),f.xp6(1),f.Q6J("ngIf",t.isRental),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.pickup),f.xp6(5),f.Q6J("disabled",0==t.addForm.controls.properties.controls.length),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.service),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.payment),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.checkout),f.xp6(3),f.Q6J("ngIf",(null==t.languageList?null:t.languageList.length)>1),f.xp6(2),f.Q6J("ngIf",t.isBookingHold),f.xp6(1),f.Q6J("isOtpVerification",t.isOtpVerification),f.xp6(1),f.Q6J("hidden",!t.displayPaymentForm),f.xp6(2),f.Q6J("ngIf",t.loadingState),f.xp6(2),f.Q6J("ngIf",t.isTaxi),f.xp6(1),f.Q6J("ngIf",t.isRental),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.pickup),f.xp6(5),f.Q6J("disabled",0==t.addForm.controls.properties.controls.length),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.service),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.payment),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.checkout),f.xp6(3),f.Q6J("ngIf",(null==t.languageList?null:t.languageList.length)>1),f.xp6(2),f.Q6J("ngIf",t.isBookingHold),f.xp6(1),f.Q6J("ngIf",t.showPaymetScreen),f.xp6(1),f.Q6J("hidden",!t.displayThankYouForm),f.xp6(3),f.Q6J("ngIf",t.isTaxi),f.xp6(1),f.Q6J("ngIf",t.isRental),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.pickup),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.service),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.customer_information),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.payment),f.xp6(6),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.checkout),f.xp6(3),f.Q6J("ngIf",(null==t.languageList?null:t.languageList.length)>1),f.xp6(5),f.Oqu(t.content),f.xp6(2),f.AsE("",null==t.currentLanguage?null:t.currentLanguage.trip_id," #",t.trip_number,""),f.xp6(3),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.book_another_ride)||"Book Another Ride"," "),f.xp6(1),f.Q6J("ngIf",!t.fixZoneDisableDropoff),f.xp6(11),f.Q6J("ngIf",t.zonePriceData.length>0),f.xp6(16),f.Q6J("ngForOf",t.userPickipLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserPickupLocation),f.xp6(14),f.Q6J("ngForOf",t.userDropoffLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserDropoffLocation)}},directives:[r._Y,r.JL,r.sg,n.O5,n.mk,J.n,r.CE,n.sg,u.w9,r.JJ,r.On,B.F,we,r.F,r.o
1H,r.x0,d.DJ,r.Fj,u.xv,r._,n.PC,r.u,W.Y,u.bb,qe.X],pipes:[De.GP,De.ZQ,n.uU,n.JJ,De.SC,Oe.D,Le],styles:[".booking-card[_ngcontent-%COMP%]{width:100%}.booking-hold-banner[_ngcontent-%COMP%]{margin:16px 16px 0;padding:12px 16px;border-radius:8px;background:color-mix(in srgb,var(--bs-primary-theme-color) 12%,#fff);border:1px solid color-mix(in srgb,var(--bs-primary-theme-color) 35%,#fff);color:#344054;font-size:14px;font-weight:500;text-align:center}.booking-tabs[_ngcontent-%COMP%]{display:flex;border-radius:14px 14px 0 0;margin:0 16px -1px;overflow:hidden;flex-shrink:0}.booking-tab[_ngcontent-%COMP%]{flex:1;padding:10px 0;font-size:16px;font-weight:500;border:none;cursor:pointer;background:#fff;color:#667085;transition:background .2s,color .2s}.booking-tab.active[_ngcontent-%COMP%]{background:var(--bs-primary-theme-color);color:#fff}.custom-select-menu[_ngcontent-%COMP%] .list-focus[_ngcontent-%COMP%]{border:2px solid #000!important;background-color:#f0f2f7}.custom-select-menu[_ngcontent-%COMP%] > li.list-focus[_ngcontent-%COMP%]{border-radius:.5rem}.booking-card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;box-shadow:0 0 20px #00000040;position:relative;z-index:1;overflow:hidden;max-height:80vh}.booking-card-body-scroll[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:12px;gap:12px;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:20px 16px}.booking-card-footer[_ngcontent-%COMP%]{flex-shrink:0;padding:16px;background:#fff;border-top:1px solid #E4E7EC}.address-field[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%]{background:#F1F3F9;border-radius:6px;padding:14px 12px 8px}.address-field[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%]{font-size:14px;color:#5f6c85;margin-bottom:4px}.address-field[_ngcontent-%COMP%] .field-input-row[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%] .field-input-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.address-field[_ngcontent-%COMP%] .field-input-row[_ngcontent-%COMP%] svg[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%] .field-input-row[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{flex-shrink:0;color:#5f6c85}.return-location-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:8px;gap:8px}.return-location-stack[_ngcontent-%COMP%] .address-field[_ngcontent-%COMP%] + .address-field[_ngcontent-%COMP%]{margin-top:0}.return-location-stack[_ngcontent-%COMP%] .address-field[_ngcontent-%COMP%]:first-child .field-input-row[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:#22c55e}.return-location-stack[_ngcontent-%COMP%] .address-field[_ngcontent-%COMP%]:last-child .field-input-row[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:#22c55e}.field-box[_ngcontent-%COMP%] .field-input[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%] textarea.field-input[_ngcontent-%COMP%]{flex:1;background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important;padding:0!important;font-size:16px;font-weight:400;color:#000;width:100%}.field-box[_ngcontent-%COMP%] textarea.field-input[_ngcontent-%COMP%]{resize:none;line-height:1.5}.field-box[_ngcontent-%COMP%] ng2-flatpickr input, .field-box[_ngcontent-%COMP%] .flatpickr-input{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important;padding:0!important;font-size:16px;font-weight:400;color:#000;width:100%}.field-box[_ngcontent-%COMP%] .field-select{flex:1}.field-box[_ngcontent-%COMP%] .field-select .ng-select-container{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important;min-height:unset!important;font-size:16px;font-weight:400;color:#000}.field-box[_ngcontent-%COMP%] .field-select .ng-value-container{padding:0!important}.field-box[_ngcontent-%COMP%] .field-select .ng-value-container .ng-input{padding:0!important}.field-box[_ngcontent-%COMP%] .field-select .ng-arrow-wrapper{padding:0}.address-field[_ngcontent-%COMP%] .search-box-input, .address-field[_ngcontent-%COMP%] input{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important;font-size:16px;font-weight:400;color:#000;width:100%}.address-field[_ngcontent-%COMP%] input:focus{outline:none!important}.field-box[_ngcontent-%COMP%] .field-input[_ngcontent-%COMP%]::-moz-placeholder, .address-field[_ngcontent-%COMP%] input::-moz-placeholder, .field-box[_ngcontent-%COMP%] .flatpickr-input::-moz-placeholder{font-size:16px}.field-box[_ngcontent-%COMP%] .field-input[_ngcontent-%COMP%]::placeholder, .address-field[_ngcontent-%COMP%] input::placeholder, .field-box[_ngcontent-%COMP%] .flatpickr-input::placeholder{font-size:16px}[_nghost-%COMP%] app-yelowcab-login .form-control::-moz-placeholder, [_nghost-%COMP%] app-yelowcab-sing-up .form-control::-moz-placeholder{font-size:16px}[_nghost-%COMP%] app-yelowcab-login .form-control::placeholder, [_nghost-%COMP%] app-yelowcab-sing-up .form-control::placeholder{font-size:16px}.address-field[_ngcontent-%COMP%] .ride-type-select{flex:1}.address-field[_ngcontent-%COMP%] .ride-type-select .ng-select-container{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important;min-height:unset!important;font-size:16px;font-weight:400;color:#000}.address-field[_ngcontent-%COMP%] .ride-type-select .ng-value-container{padding:0!important}.address-field[_ngcontent-%COMP%] .ride-type-select .ng-value-container .ng-input{padding:0!important}.address-field[_ngcontent-%COMP%] .ride-type-select .ng-arrow-wrapper{padding:0}.add-stop-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.add-stop-btn[_ngcontent-%COMP%]{background:none;border:none;color:var(--bs-primary-theme-color);font-size:13px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;cursor:pointer;border-bottom:1.5px solid var(--bs-primary-theme-color);padding:0}.request-time-field[_ngcontent-%COMP%]{background:#F1F3F9;border-radius:6px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.request-time-field[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#23272f}.request-time-field[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:#617182;font-size:16px}.request-time-field[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{height:10px;width:10px}.pax-luggage-row[_ngcontent-%COMP%]{display:flex;grid-gap:12px;gap:12px;border-top:1px solid #E4E7EC;margin-top:4px;padding-top:16px}.pax-box[_ngcontent-%COMP%], .luggage-box[_ngcontent-%COMP%]{flex:1;background:#F1F3F9;border-radius:10px;padding:12px 14px}.pax-box[_ngcontent-%COMP%] .box-label[_ngcontent-%COMP%], .luggage-box[_ngcontent-%COMP%] .box-label[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:6px;gap:6px;font-size:14px;color:#5f6c85;margin-bottom:6px}.pax-box[_ngcontent-%COMP%] .box-value[_ngcontent-%COMP%], .luggage-box[_ngcontent-%COMP%] .box-value[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#000}
1.book-ride-btn[_ngcontent-%COMP%]{background:var(--bs-primary-theme-color);color:#fff;border:none;border-radius:6px;padding:16px;font-size:16px;font-weight:600;letter-spacing:1px;text-transform:uppercase;width:100%;cursor:pointer;transition:background .2s}.book-ride-btn[_ngcontent-%COMP%]:hover{filter:brightness(.92)}.book-ride-btn[_ngcontent-%COMP%]:disabled{opacity:.65;cursor:not-allowed;pointer-events:none}.document-field[_ngcontent-%COMP%]{width:100%;margin-bottom:0}.document-field-row[_ngcontent-%COMP%]{display:flex;align-items:stretch;width:100%;min-height:42px;border:1px solid #ced4da;border-radius:4px;background:#fff;overflow:hidden}.document-field.has-error[_ngcontent-%COMP%] .document-field-row[_ngcontent-%COMP%]{border-color:#dc3545}.document-field-name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;align-items:center;grid-gap:8px;gap:8px;padding:.5rem .75rem;color:#6c757d;font-size:14px;background:#fff}.document-field-name.has-file[_ngcontent-%COMP%]{color:#212529}.document-field-name[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{flex-shrink:0;color:#495057;color:var(--bs-primary-theme-color, #495057)}.document-field-name-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-field-upload[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:0 1rem;margin:0;border:none;border-left:1px solid #ced4da;background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;font-size:14px;font-weight:600;line-height:1.2;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;overflow:hidden}.document-field-upload[_ngcontent-%COMP%]:hover:not(.is-disabled){filter:brightness(.95)}.document-field-upload.is-disabled[_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%]{opacity:.75;cursor:not-allowed}.document-field-upload[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;font-size:0}.document-field-upload.is-disabled[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{pointer-events:none}.document-field-remove[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:0;margin:0;border:none;border-left:1px solid #ced4da;background:color-mix(in srgb,#343a40 12%,#fff);background:color-mix(in srgb,var(--bs-primary-theme-color, #343a40) 12%,#fff);color:#343a40;color:var(--bs-primary-theme-color, #343a40);font-size:16px;cursor:pointer}.document-field-remove[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{color:inherit}.document-field-remove[_ngcontent-%COMP%]:hover{background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;color:var(--bs-secondary-theme-color, #fff)}.document-field-hint[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12px;color:#6c757d;line-height:1.3}.hidden-width[_ngcontent-%COMP%]{display:none!important}.default-width[_ngcontent-%COMP%]{width:550px!important}.lorder-wrap[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:999;border-radius:16px}.loader[_ngcontent-%COMP%]{width:36px;height:36px;border:4px solid #e5e7eb;border-top-color:var(--bs-primary-theme-color);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.schedule-row[_ngcontent-%COMP%]{display:flex;grid-gap:12px;gap:12px}.schedule-row[_ngcontent-%COMP%] .col-half[_ngcontent-%COMP%]{flex:1}.checkpoint-field[_ngcontent-%COMP%]{position:relative;padding:10px 12px}.remove-field[_ngcontent-%COMP%]{margin-top:2px;margin-right:6px}.remove-field[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#dc3545}.booking-form-body[_ngcontent-%COMP%]{padding:16px;border-radius:.375rem}.counter-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px;margin-top:4px}.counter-btn[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;border:1.5px solid #d1d5db;background:#fff;font-size:16px;line-height:15px;cursor:pointer;color:#2d3b4e;display:flex;align-items:center;justify-content:center;transition:border-color .2s}.counter-btn[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#22c55e;color:#22c55e}.counter-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:default}.counter-val[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#2d3b4e;min-width:24px;text-align:center;flex:1 1 auto}.booking-card-body[_ngcontent-%COMP%] .step-book[_ngcontent-%COMP%]{margin-top:-10px}.booking-card-body[_ngcontent-%COMP%] ol.d-flex[_ngcontent-%COMP%]{align-items:center;justify-content:center;list-style:none}.booking-card-body[_ngcontent-%COMP%] ol.d-flex[_ngcontent-%COMP%] .step-book[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:0}.booking-card-body[_ngcontent-%COMP%] ol.d-flex[_ngcontent-%COMP%] .step-book[_ngcontent-%COMP%] .btn-gray[_ngcontent-%COMP%]{display:flex;justify-content:center}[_nghost-%COMP%] .booking-card-body .btn.btn-primary.btn-block.btn-lg{background:var(--bs-primary-theme-color)!important;border:none!important;border-radius:6px!important;padding:16px!important;font-size:16px!important;font-weight:600!important;letter-spacing:1px!important;text-transform:uppercase!important;width:100%!important;height:auto!important;cursor:pointer!important;transition:background .2s!important;color:#fff!important;line-height:normal}[_nghost-%COMP%] .booking-card-body .btn.btn-primary.btn-block.btn-lg:hover{filter:brightness(.85)!important}[_nghost-%COMP%] .booking-card-body .booking-form-action, [_nghost-%COMP%] .booking-card-body .shadow-none.booking-form-action{padding:12px 16px 0!important;border-top:1px solid #E4E7EC!important;background:#fff!important;position:sticky!important;bottom:0!important;z-index:1000000!important}[_nghost-%COMP%] .booking-card-body form>.p-4.border-top{padding:16px 0 0!important;border-top:1px solid #E4E7EC!important;background:#fff!important;position:sticky!important;bottom:0!important}[_nghost-%COMP%] app-yelowcab-login .form-control:focus, [_nghost-%COMP%] app-yelowcab-login .form-control-lg:focus, [_nghost-%COMP%] app-yelowcab-sing-up .form-control:focus, [_nghost-%COMP%] app-yelowcab-sing-up .form-control-lg:focus{border-color:var(--bs-primary-theme-color)!important;box-shadow:none!important;outline:none!important}[_nghost-%COMP%] app-yelowcab-login .ng-select.ng-select-focused .ng-select-container, [_nghost-%COMP%] app-yelowcab-sing-up .ng-select.ng-select-focused .ng-select-container{border-color:var(--bs-primary-theme-color)!important;box-shadow:none!important}[_nghost-%COMP%] app-yelowcab-login .form-control, [_nghost-%COMP%] app-yelowcab-login .form-control-lg, [_nghost-%COMP%] app-yelowcab-sing-up .form-control, [_nghost-%COMP%] app-yelowcab-sing-up .form-control-lg{background-color:#f1f3f9!important;border-color:#f1f3f9!important;box-shadow:none!important}[_nghost-%COMP%] app-yelowcab-login .ng-select .ng-select-container, [_nghost-%COMP%] app-yelowcab-sing-up .ng-select .ng-select-container{background-color:#f1f3f9!important;border-color:#f1f3f9!important;box-shadow:none!important}[_nghost-%COMP%] .booking-card-body .top-custom-select .ng-select .ng-select-container .ng-value-container .ng-input{padding:.25rem .5rem .25rem .75rem!important}[_nghost-%COMP%] app-yelowcab-login .form-group, [_nghost-%COMP%] app-yelowcab-sing-up .form-group{background:#F1F3F9;border-radius:6px;padding:10px 12px;margin-bottom:12px!important;position:relative}[_nghost-%COMP%] app-yelowcab-login .form-group label, [_nghost-%COMP%] app-yelowcab-sing-up .form-group label{font-size:14px;color:#5f6c85;margin-bottom:4px;display:block}[_nghost-%COMP%] app-yelowcab-login .form-group .form-control, [_nghost-%COMP%] app-yelowcab-login .form-group .form-control-lg, [_nghost-%COMP%] app-yelowcab-login .form-group .input-group, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .form-control, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .form-control-lg, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .input-group{background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;padding:0!important;font-size:16px!important;min-height:unset!important;height:auto!important}[_nghost-%COMP%] app-yelowcab-login .form-control-lg, [_nghost-%COMP%] app-yelowcab-sing-up .form-control-lg{font-size:16px!important;min-height:unset!important;height:28px!important;line-height:1.4!important}[_nghost-%COMP%] app-yelowcab-login .form-group .ng-select .ng-select-container, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .ng-select .ng-select-container{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important;min-height:unset!important;font-size:16px!important}[_nghost-%COMP%] app-yelowcab-login .form-group .ng-select .ng-value-container, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .ng-select .ng-value-container{padding:0!important}[_nghost-%COMP%] app-yelowcab-login .form-group .ng-select .ng-value-container .ng-input, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .ng-select .ng-value-container .ng-input{padding:0!important}[_nghost-%COMP%] app-yelowcab-login .form-group .input-group, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .input-group{dis
1play:flex!important;align-items:center!important;grid-gap:12px!important;gap:12px!important}[_nghost-%COMP%] app-yelowcab-login .form-group .input-group .ng-select, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .input-group .ng-select{flex-shrink:0!important;width:100px!important;min-width:100px!important;border-right:1px solid #d1d5db!important;padding-right:12px!important}[_nghost-%COMP%] app-yelowcab-login .form-group .input-group .form-control, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .input-group .form-control{flex:1!important;height:28px!important}[_nghost-%COMP%] app-yelowcab-login .form-group[style*=height]{height:auto!important}[_nghost-%COMP%] app-yelowcab-login .form-group .input-group:before, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .input-group:before{content:\"\";display:none}[_nghost-%COMP%] app-yelowcab-login .form-group:has(.select-dial-code):before, [_nghost-%COMP%] app-yelowcab-login .form-group:has([formcontrolname=\"phone_number\"]):before, [_nghost-%COMP%] app-yelowcab-sing-up .form-group:has([formcontrolname=\"phone_number\"]):before{content:\"\";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;background-color:#5f6c85;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}[_nghost-%COMP%] app-yelowcab-login .form-group:has([formcontrolname=\"email\"]):before, [_nghost-%COMP%] app-yelowcab-sing-up .form-group:has([formcontrolname=\"email\"]):before{content:\"\";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;background-color:#5f6c85;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}[_nghost-%COMP%] app-yelowcab-sing-up .form-group:has([formcontrolname=\"first_name\"]):before{content:\"\";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;background-color:#5f6c85;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}[_nghost-%COMP%] app-yelowcab-login .form-group .form-control:focus, [_nghost-%COMP%] app-yelowcab-sing-up .form-group .form-control:focus{border-color:var(--bs-primary-theme-color)!important;box-shadow:none!important;outline:none!important}@media (max-width: 767px){.default-width[_ngcontent-%COMP%]{width:100%!important}.booking-card-body[_ngcontent-%COMP%]{max-height:calc(100vh - 56px);border-radius:0!important;box-shadow:none!important}.booking-tabs[_ngcontent-%COMP%]{margin:0!important;border-radius:0!important}.booking-tab[_ngcontent-%COMP%]{font-size:15px!important;padding:10px 0!important}.booking-card-body-scroll[_ngcontent-%COMP%]{padding:12px!important;grid-gap:10px!important;gap:10px!important}.address-field[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%]{padding:10px 10px 8px!important}.address-field[_ngcontent-%COMP%] .field-input-row[_ngcontent-%COMP%], .field-box[_ngcontent-%COMP%] .field-input-row[_ngcontent-%COMP%]{grid-gap:6px!important;gap:6px!important}.address-field[_ngcontent-%COMP%] input, .field-box[_ngcontent-%COMP%] .field-input[_ngcontent-%COMP%]{font-size:15px!important}.request-time-field[_ngcontent-%COMP%]{padding:12px!important}.request-time-field[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:15px!important}.schedule-row[_ngcontent-%COMP%]{flex-direction:row!important;grid-gap:8px!important;gap:8px!important}.pax-luggage-row[_ngcontent-%COMP%]{grid-gap:8px!important;gap:8px!important}.pax-box[_ngcontent-%COMP%], .luggage-box[_ngcontent-%COMP%]{padding:10px!important}
1.book-ride-btn[_ngcontent-%COMP%]{font-size:15px!important;padding:14px!important}.booking-card-footer[_ngcontent-%COMP%]{padding:10px 12px!important}.booking-card-body[_ngcontent-%COMP%] ol.d-flex[_ngcontent-%COMP%]{padding:8px 6px!important;grid-gap:2px!important;gap:2px!important;flex-wrap:nowrap!important;overflow-x:auto!important}.booking-card-body[_ngcontent-%COMP%] ol.d-flex[_ngcontent-%COMP%] .btn-text[_ngcontent-%COMP%]{font-size:10px!important;white-space:nowrap!important}.counter-val[_ngcontent-%COMP%]{font-size:15px!important}[_nghost-%COMP%] app-yelowcab-login .form-group, [_nghost-%COMP%] app-yelowcab-sing-up .form-group{padding:10px 10px 10px 36px!important}[_nghost-%COMP%] app-yelowcab-login .form-control-lg, [_nghost-%COMP%] app-yelowcab-sing-up .form-control-lg{font-size:14px!important;height:26px!important}.custom-select-menu[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:60px!important;height:48px!important}}.other-charges-section[_ngcontent-%COMP%] .other-charge-item[_ngcontent-%COMP%]{position:relative;padding-left:2rem;line-height:1.5;color:#344054}.other-charges-section[_ngcontent-%COMP%] .other-charge-item[_ngcontent-%COMP%] .control__indicator[_ngcontent-%COMP%]{top:.15rem}.other-charges-section[_ngcontent-%COMP%] .seats-counter-wrap[_ngcontent-%COMP%]{max-width:220px;margin:0 0 .75rem 2rem}.other-charges-section[_ngcontent-%COMP%] .passengers-input[_ngcontent-%COMP%] .form-control.new[_ngcontent-%COMP%]{height:50px;pointer-events:none;padding:.75rem 3rem;font-size:16px;text-align:center;background:#fff}.other-charges-section[_ngcontent-%COMP%] .dongle.minus[_ngcontent-%COMP%]{left:0}.other-charges-section[_ngcontent-%COMP%] .dongle.plus[_ngcontent-%COMP%]{right:0}"]}),e})(),La=(()=>{class e{constructor(e){this.authService=e,e.currentCompany.subscribe(e=>{this.company_logo=e.company_logo})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e))},e.\u0275cmp=f.Xpm({type:e,selectors:[["yelowcab-booking-layout-three"]],decls:11,vars:2,consts:[[1,"navbar","0navbar-expand-lg","0navbar-light","bg-white","border-bottom","taxi-booking-new-layout"],[1,"container"],[2,"flex","1 1 auto"],["alt","Logo Image",2,"width","70px",3,"src"],[1,"bg-white","taxi-web-section",2,"background-image","url('assets/bg-1.webp')","background-size","cover","background-position","center","background-repeat","no-repeat"],[1,"hero_hero__T7iHb"],[1,"booking-card-overlay"],[3,"is_full_screen"]],template:function(e,t){1&e&&(f.TgZ(0,"nav",0),f.TgZ(1,"div",1),f.TgZ(2,"div",2),f._UZ(3,"img",3),f.qZA(),f.qZA(),f.qZA(),f.TgZ(4,"div"),f.TgZ(5,"main"),f.TgZ(6,"section",4),f.TgZ(7,"div",1),f.TgZ(8,"div",5),f.TgZ(9,"div",6),f._UZ(10,"yelowcab-booking-layout-three-form",7),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e&&(f.xp6(3),f.Q6J("src",t.company_logo?t.company_logo:"assets/admin_console.png",f.LSH),f.xp6(7),f.Q6J("is_full_screen",!1))},directives:[Oa],styles:[".layout-three-container[_ngcontent-%COMP%]{position:relative;width:100%}.hero_hero__T7iHb[_ngcontent-%COMP%]{position:relative;width:100%;min-height:100vh}.hero-bg-img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.booking-card-overlay[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:flex-end;margin-left:auto;z-index:10;width:100%;max-width:488px;padding:0 16px}.taxi-web-section[_ngcontent-%COMP%]{padding:70px 0}.taxi-web-section[_ngcontent-%COMP%] .custom-select-menu[_ngcontent-%COMP%] .list-focus[_ngcontent-%COMP%]{border:2px solid #343a40}@media (max-width: 767px){.taxi-web-section[_ngcontent-%COMP%]{padding:0!important;background-position:center!important}.hero_hero__T7iHb[_ngcontent-%COMP%]{min-height:100vh;align-items:flex-start}.booking-card-overlay[_ngcontent-%COMP%]{max-width:100%!important;padding:0!important;width:100%!important}}"]}),e})();const Ma=["gmap"];function Va(e,t){1&e&&(f.TgZ(0,"div",90),f._UZ(1,"div",91),f.qZA())}function Sa(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",92),f.TgZ(1,"label",93),f._uU(2),f.qZA(),f.TgZ(3,"ng-select",94),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw();return i.changeBookingType(t),i.onInputChange(i.addForm.controls.booking_type_id)}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(2),f.hij("",null==e.currentLanguage?null:e.currentLanguage.choose_trn_mode," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_booking_type)("items",e.transactionCategory)("clearable",!1)("formControl",e.addForm.controls.booking_type_id)("searchable",!1)}}function Ea(e,t){if(1&e&&f._UZ(0,"span",95),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.pickup_location,f.oJD)}}
1function Ua(e,t){if(1&e&&(f.TgZ(0,"span",96),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function Na(e,t){if(1&e&&(f.TgZ(0,"span",104),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}const Ia=function(e){return[e]};function ja(e,t){if(1&e){const e=f.EpF();f.ynx(0,97),f.TgZ(1,"div",98),f.TgZ(2,"div",99),f.TgZ(3,"app-search-box-google",100),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchCheckpoint(t)})("searchEvent",function(t){const i=f.CHM(e).index;return f.oxw().searchEventCheckpoint(t,i)}),f.qZA(),f.YNc(4,Na,2,1,"span",101),f.TgZ(5,"a",102),f.NdJ("click",function(){const t=f.CHM(e).index;return f.oxw().removeRow(t)}),f._UZ(6,"i",103),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(3),f.Q6J("placeholder",null==n.currentLanguage?null:n.currentLanguage.search_way_loc)("responseData",n.responseDatacheckPoint)("isBooing",!0)("searchText",e.value.value),f.xp6(1),f.Q6J("ngIf",!n.checkpointValidity[i]&&(null==e.value||null==e.value.value?null:e.value.value.length)),f.xp6(2),f.Q6J("ngClass",f.VKq(7,Ia,e.untouched?"text-secondary":e.invalid?"text-danger":"text-secondary"))}}function Ra(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div"),f.TgZ(1,"a",105),f.NdJ("click",function(){return f.CHM(e),f.oxw().addNewRow()}),f._UZ(2,"i",106),f._uU(3),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.add_stop," ")}}function za(e,t){if(1&e&&f._UZ(0,"span",95),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.destination,f.oJD)}}function Ja(e,t){if(1&e&&(f.TgZ(0,"span",107),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function Ba(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",108),f.TgZ(2,"h5",109),f._uU(3),f.qZA(),f.TgZ(4,"div",110),f.TgZ(5,"input",111),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeSelectedTab(t.target.checked?2:1)}),f.qZA(),f._UZ(6,"label",112),f.TgZ(7,"label",113),f._uU(8),f.qZA(),f.TgZ(9,"label",114),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.req_time," "),f.xp6(2),f.Q6J("checked",2==e.selectedTab),f.xp6(3),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.now),f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.later)}}const Ya=function(e){return{"has-error":e}};function Qa(e,t){if(1&e&&(f.TgZ(0,"div",115),f.TgZ(1,"div",116),f.TgZ(2,"div",117),f.TgZ(3,"span",118),f.O4$(),f.TgZ(4,"svg",119),f._UZ(5,"path",120),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"label",121),f._uU(7),f.qZA(),f._UZ(8,"ng2-flatpickr",122),f.qZA(),f.qZA(),f.TgZ(9,"div",116),f.TgZ(10,"div",123),f.TgZ(11,"span",124),f.O4$(),f.TgZ(12,"svg",125),f._UZ(13,"path",126),f.qZA(),f.qZA(),f.kcU(),f.TgZ(14,"label",121),f._uU(15),f.qZA(),f._UZ(16,"ng2-flatpickr",127),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.date," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.timeFormatConfig2)("ngClass",f.VKq(10,Ya,e.formErrors.request_time))("formControl",e.addForm.controls.request_time)("setDate",e.request_time),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(1),f.Q6J("config",e.timeFormatConfig)("formControl",e.addForm.controls.trip_time)("setDate",e.trip_time)}}function Ha(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",133),f.TgZ(1,"input",134),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).changeGender(null==t?null:t.value)}),f.qZA(),f._uU(2),f._UZ(3,"div",135),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(2);f.xp6(1),f.Q6J("value",null==e?null:e.value)("formControl",i.addForm.controls.gender)("checked",i.genderTab==(null==e?null:e.value)),f.xp6(1),f.hij(" ",null==e?null:e.label," ")}}function $a(e,t){if(1&e&&(f.TgZ(0,"div",128),f.TgZ(1,"h5",129),f._uU(2),f.qZA(),f.TgZ(3,"div",130),f.TgZ(4,"div",131),f.YNc(5,Ha,4,4,"label",132),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gender,""),f.xp6(3),f.Q6J("ngForOf",e.gender)}}function Ga(e,t){if(1&e&&f._UZ(0,"span",95),2&e){const e=f.oxw(3);f.Q6J("innerHTML",e.formErrors.return_time,f.oJD)}}function Ka(e,t){if(1&e&&(f.TgZ(0,"div",141),f.TgZ(1,"div",116),f.TgZ(2,"div",117),f.TgZ(3,"span",118),f.O4$(),f.TgZ(4,"svg",119),f._UZ(5,"path",120),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"label",121),f._uU(7),f.qZA(),f._UZ(8,"ng2-flatpickr",122),f.qZA(),f.qZA(),f.TgZ(9,"div",116),f.TgZ(10,"div",123),f.TgZ(11,"span",124),f.O4$(),f.TgZ(12,"svg",125),f._UZ(13,"path",126),f.qZA(),f.qZA(),f.kcU(),f.TgZ(14,"label",121),f._uU(15),f.qZA(),f._UZ(16,"ng2-flatpickr",142),f.qZA(),f.qZA(),f.TgZ(17,"div",143),f.YNc(18,Ga,1,1,"span",21),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.Q6J("ngClass",f.VKq(13,Ya,e.formErrors.return_time)),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.date," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.returnDateFormatConfig)("ngClass",f.VKq(15,Ya,e.formErrors.return_time))("formControl",e.addForm.controls.return_date)("setDate",e.return_date),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(1),f.Q6J("config",e.returnTimeFormatConfig)("formControl",e.addForm.controls.return_trip_time)("setDate",e.return_trip_time)("ngClass",f.VKq(17,Ya,e.formErrors.return_time)),f.xp6(2),f.Q6J("ngIf",e.formErrors.return_time)}}
1function Wa(e,t){if(1&e&&(f.TgZ(0,"span",96),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function Xa(e,t){if(1&e&&(f.TgZ(0,"span",96),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function er(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div"),f.TgZ(1,"div",18),f.TgZ(2,"app-search-box-google",20),f.NdJ("search",function(t){return f.CHM(e),f.oxw(2).OnSearchReturn(t)})("searchEvent",function(t){return f.CHM(e),f.oxw(2).returnsearchEvent(t)}),f.qZA(),f.YNc(3,Wa,2,1,"span",22),f.qZA(),f.TgZ(4,"div",144),f.TgZ(5,"app-search-box-google",20),f.NdJ("search",function(t){return f.CHM(e),f.oxw(2).OnSearchReturnDestination(t)})("searchEvent",function(t){return f.CHM(e),f.oxw(2).returnsearchEventDestination(t)}),f.qZA(),f.YNc(6,Xa,2,1,"span",22),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_pick_location)||"Search Return Pickup Location")("isBooing",!0)("responseData",e.responseDataReturn)("searchText",e.returnsearchText)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returnpickupRegionFound),f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_des_loc)||"Search Return Destination Location")("isBooing",!0)("responseData",e.responseDataReturnDestination)("searchText",e.returnsearchTextDestionation)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returndropRegionFound)}}function tr(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",136),f.TgZ(2,"h5",137),f._uU(3),f.TgZ(4,"div",110),f.TgZ(5,"input",138),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeReturn(t)}),f.qZA(),f._UZ(6,"label",139),f.qZA(),f.qZA(),f.qZA(),f.YNc(7,Ka,19,19,"div",140),f.YNc(8,er,7,12,"div",25),f.BQk()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.return," "),f.xp6(2),f.Q6J("checked",e.returnEnable),f.xp6(2),f.Q6J("ngIf",e.returnEnable),f.xp6(1),f.Q6J("ngIf",e.returnEnable)}}function ir(e,t){if(1&e&&(f.TgZ(0,"div",147),f._UZ(1,"input",148),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("formControl",e.addForm.controls.flight_number)}}function nr(e,t){if(1&e&&(f.TgZ(0,"ng-option",154),f.TgZ(1,"span",155),f.TgZ(2,"div",156),f._UZ(3,"i",157),f.qZA(),f.TgZ(4,"span",158),f._uU(5),f.qZA(),f.qZA(),f.TgZ(6,"span"),f._uU(7),f.ALo(8,"datePipe"),f.ALo(9,"betterDate"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);f.Q6J("value",e),f.xp6(4),f.Q6J("title",null==e?null:e.flight_number),f.xp6(1),f.AsE(" ",null==e?null:e.flight_number," - ",null==e?null:e.airline_name," "),f.xp6(2),f.hij(" ",null!=e&&null!=e.raw&&null!=e.raw.departure&&e.raw.departure.estimated?f.xi3(8,5,f.lcZ(9,8,null==e||null==e.raw||null==e.raw.departure?null:e.raw.departure.estimated),i.formatTimeDate):"","")}}const or=function(){return{standalone:!0}};function ar(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",149),f.TgZ(1,"div",150),f.TgZ(2,"ng-select",151,152),f.NdJ("keyup.enter",function(t){return f.CHM(e),f.oxw(2).searchPlace(t.target.value)})("change",function(t){return f.CHM(e),f.oxw(2).getFlight(t)})("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedFlightObj=t}),f.YNc(4,nr,10,10,"ng-option",153),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("clearable",!1)("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("ngModel",e.selectedFlightObj)("ngModelOptions",f.DdM(5,or)),f.xp6(2),f.Q6J("ngForOf",e.responseFlight)}}function rr(e,t){if(1&e&&(f.TgZ(0,"div"),f.TgZ(1,"label",93),f._uU(2),f.qZA(),f.YNc(3,ir,2,2,"div",145),f.YNc(4,ar,5,6,"div",146),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.flight_number_title," "),f.xp6(1),f.Q6J("ngIf",!e.checkFligth),f.xp6(1),f.Q6J("ngIf",e.checkFligth)}}function lr(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.AsE("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",null==e?null:e.charge_value,")")}}function sr(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit;f.xp6(1),f.hij("(",null==e?null:e.charge_value,"%)")}}function ur(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(2);f.xp6(1),f.lnq("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",null!=t.currentCompanyDetail&&t.currentCompanyDetail.distance_unit?"Per "+(null==t.currentCompanyDetail?null:t.currentCompanyDetail.distance_unit):"Per Km"," )")}}const dr=function(e){return{"pointer-events":e}};function cr(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",165),f.TgZ(1,"div",166),f.TgZ(2,"div",167),f.TgZ(3,"div"),f.TgZ(4,"div",168),f.TgZ(5,"a",169),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("child_seat",t)}
1),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",170),f.TgZ(8,"a",171),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("child_seat",t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(5),f.Q6J("ngStyle",f.VKq(3,dr,0==e.addForm.controls.child_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.child_seat),f.xp6(1),f.Q6J("ngStyle",f.VKq(5,dr,e.addForm.controls.booster_seat.value<0?"none":"auto"))}}function hr(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",165),f.TgZ(1,"div",166),f.TgZ(2,"div",167),f.TgZ(3,"div"),f.TgZ(4,"div",168),f.TgZ(5,"a",169),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("booster_seat",t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",170),f.TgZ(8,"a",171),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("booster_seat",t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(5),f.Q6J("ngStyle",f.VKq(3,dr,0==e.addForm.controls.booster_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.booster_seat),f.xp6(1),f.Q6J("ngStyle",f.VKq(5,dr,e.addForm.controls.booster_seat.value<0?"none":"auto"))}}function gr(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",165),f.TgZ(1,"div",166),f.TgZ(2,"div",167),f.TgZ(3,"div"),f.TgZ(4,"div",168),f.TgZ(5,"a",169),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementDynamicCharge(t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",172),f.TgZ(8,"a",173),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementDynamicCharge(t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2).$implicit;f.xp6(5),f.Q6J("ngStyle",f.VKq(2,dr,((null==e?null:e.currentValue)||0)<=1?"none":"auto")),f.xp6(2),f.Q6J("value",(null==e?null:e.currentValue)||0)}}function pr(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"label",163),f.TgZ(2,"input",164),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().$implicit;return f.oxw(2).checkOtherCharge(t,i)}),f.qZA(),f._uU(3),f.YNc(4,lr,2,2,"ng-container",25),f.YNc(5,sr,2,1,"ng-container",25),f.YNc(6,ur,2,3,"ng-container",25),f._UZ(7,"div",135),f.qZA(),f.YNc(8,cr,10,7,"div",48),f.YNc(9,hr,10,7,"div",48),f.YNc(10,gr,10,4,"div",48),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(2),f.MGl("id","customcheckbox-",null==e?null:e.other_charges_id,""),f.s9C("value",null==e?null:e.checked),f.Q6J("checked",null==e?null:e.checked)("disabled",!(null==e||!e.is_required)),f.xp6(1),f.hij(" ",null==e?null:e.title," "),f.xp6(1),f.Q6J("ngIf",2==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",3==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",t.displayChidSheet&&"child_seat"==(null==e?null:e.charges_key)&&(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.displayBoosterSheet&&"booster_seat"==(null==e?null:e.charges_key)&&(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.isDynamicCalculationCharge(e)&&(null==e?null:e.checked))}}function mr(e,t){if(1&e&&(f.ynx(0),f.YNc(1,pr,11,11,"ng-container",25),f.BQk()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",!(null!=e&&e.is_required))}}function _r(e,t){if(1&e&&(f.TgZ(0,"div",159),f.TgZ(1,"div",160),f.TgZ(2,"label",161),f._uU(3),f.qZA(),f.YNc(4,mr,2,1,"ng-container",162),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.other_charges," "),f.xp6(1),f.Q6J("ngForOf",e.otherChargesArray)}}function fr(e,t){if(1&e&&(f.TgZ(0,"div",174),f.TgZ(1,"h4",175),f._uU(2),f.ALo(3,"datePipe"),f.ALo(4,"betterDate"),f.ALo(5,"datePipe"),f.ALo(6,"betterDate"),f.qZA(),f.TgZ(7,"p",176),f._uU(8),f.qZA(),f.TgZ(9,"ul",177),f.TgZ(10,"h5",178),f._uU(11),f.qZA(),f.TgZ(12,"li",179),f.TgZ(13,"label",180),f._uU(14),f.qZA(),f.TgZ(15,"span",181),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"li",179),f.TgZ(18,"label",180),f._uU(19),f.qZA(),f.TgZ(20,"span",181),f._uU(21),f.ALo(22,"date"),f.qZA(),f.qZA(),f.TgZ(23,"li",179),f.TgZ(24,"label",180),f._uU(25),f.qZA(),f.TgZ(26,"span",181),f._uU(27),f.qZA(),f.qZA(),f.TgZ(28,"li",179),f.TgZ(29,"label",180),f._uU(30),f.qZA(),f.TgZ(31,"span",181),f._uU(32),f.qZA(),f.qZA(),f.TgZ(33,"h5",178),f._uU(34),f.qZA(),f.TgZ(35,"li",179),f.TgZ(36,"label",180),f._uU(37),f.qZA(),f.TgZ(38,"span",181),f._uU(39),f.qZA(),f.qZA(),f.TgZ(40,"li",179),f.TgZ(41,"label",180),f._uU(42),f.qZA(),f.TgZ(43,"span",181),f._uU(44),f.ALo(45,"date"),f.qZA(),f.qZA(),f.TgZ(46,"li",179),f.TgZ(47,"label",180),f._uU(48),f.qZA(),f.TgZ(49,"span",181),f._uU(50),f.qZA(),f.qZA(),f.TgZ(51,"li",179),f.TgZ(52,"label",180),f._uU(53),f.qZA(),f.TgZ(54,"span",181),f._uU(55),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.AsE("",e.request_time?f.xi3(3,21,f.lcZ(4,24,e.request_time),"d/M/yyyy"):"-"," ",e.trip_time?f.xi3(5,26,f.lcZ(6,29,e.trip_time),"hh:mm a"):""," "),f.xp6(6),f.hij("",null==e.selectedFlightObj||null==e.selectedFlightObj.airline?null:e.selectedFlightObj.airline.name," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.departure," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.actual?f.xi3(22,31,null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.gate:"-"," "),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.arrival," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.actual?f.xi3(45,34,null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.gate:"-"," ")}}function vr(e,t){1&e&&f._UZ(0,"span",186)}function yr(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",19),f._UZ(2,"input",187),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(2,Ya,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.enter_value)}}function br(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",185),f.TgZ(2,"div",188),f.TgZ(3,"ng2-flatpickr",189),f.NdJ("onChange",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw().onDateChange(t,i)}),f.qZA(),f.TgZ(4,"span",190),f._UZ(5,"i",191),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(2),f.Q6J("ngClass",f.VKq(2,Ya,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("config",t.dateFormatConfig)}}function xr(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",19),f._UZ(2,"ng-select",192),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(4,Ya,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("items",e.value.options)("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("multiple",!0)}}function kr(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",19),f._UZ(2,"ng-select",193),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(3,Ya,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("items",e.value.options)}}function Zr(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",194),f.TgZ(2,"div",195),f.TgZ(3,"a",196),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;
1return f.oxw().decrement(t)}),f._uU(4,"-"),f.qZA(),f._UZ(5,"input",197),f.TgZ(6,"a",173),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw().increment(t)}),f._uU(7,"+"),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(2),f.Q6J("ngClass",f.VKq(1,Ya,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid)))}}function Cr(e,t){1&e&&f._UZ(0,"i",210)}function Fr(e,t){1&e&&f._UZ(0,"i",211)}function Tr(e,t){1&e&&(f.TgZ(0,"span"),f._uU(1,"Upload"),f.qZA())}function Ar(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",212),f.NdJ("click",function(){f.CHM(e),f.oxw();const t=f.MAs(11),i=f.oxw().index;return f.oxw().removeDocumentFile(i,t)}),f._UZ(1,"i",213),f.qZA()}}function Pr(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",198),f.TgZ(2,"div",199),f.TgZ(3,"div",200),f.YNc(4,Cr,1,0,"i",201),f.TgZ(5,"span",202),f._uU(6),f.qZA(),f.qZA(),f.TgZ(7,"label",203),f.YNc(8,Fr,1,0,"i",43),f.YNc(9,Tr,2,0,"span",25),f.TgZ(10,"input",204,205),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw().documentFileChangeEvent(t,i)}),f.qZA(),f.qZA(),f.YNc(12,Ar,2,0,"button",206),f.qZA(),f._UZ(13,"input",207),f._UZ(14,"input",208),f.TgZ(15,"p",209),f._uU(16,"* Max file size should be 21 MB"),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw(),t=e.$implicit,i=e.index,n=f.oxw();let o;f.xp6(1),f.Q6J("ngClass",f.VKq(14,Ya,n.formSubmited&&t.value.is_mandatory&&(null==(o=t.get("value"))?null:o.invalid))),f.xp6(2),f.ekj("has-file",!!n.documentFileNames[i]),f.xp6(1),f.Q6J("ngIf",n.documentFileNames[i]),f.xp6(2),f.hij(" ",n.documentFileNames[i]||"No file chosen"," "),f.xp6(1),f.ekj("is-loading",n.documentUploadLoading[i])("is-disabled",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",!n.documentUploadLoading[i]),f.xp6(1),f.Q6J("id","documentUpload_map_"+i)("disabled",n.documentUploadLoading[i]),f.xp6(2),f.Q6J("ngIf",n.documentFileNames[i]&&!n.documentUploadLoading[i])}}function wr(e,t){if(1&e&&(f.ynx(0,97),f.TgZ(1,"div",182),f.TgZ(2,"label",183),f._uU(3),f.qZA(),f.YNc(4,vr,1,0,"span",184),f.TgZ(5,"div",185),f.YNc(6,yr,3,4,"ng-container",25),f.YNc(7,br,6,4,"ng-container",25),f.YNc(8,xr,3,6,"ng-container",25),f.YNc(9,kr,3,5,"ng-container",25),f.YNc(10,Zr,8,3,"ng-container",25),f.YNc(11,Pr,17,16,"ng-container",25),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(3),f.Oqu(e.value.label),f.xp6(1),f.Q6J("ngIf",e.value.is_mandatory),f.xp6(2),f.Q6J("ngIf",e.value.field_type==n.TEXT_BOX_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DATE_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.MULTI_SELECT_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DROPDOWN_FIELD),f.xp6(1),f.Q6J("ngIf",5==e.value.field_type),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DOCUMENT_FIELD)}}function qr(e,t){1&e&&f._UZ(0,"i",211)}function Dr(e,t){1&e&&(f.TgZ(0,"div",90),f._UZ(1,"div",91),f.qZA())}function Or(e,t){if(1&e&&(f.TgZ(0,"p",235),f._uU(1),f.qZA()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.Oqu(e.description)}}function Lr(e,t){if(1&e&&(f.TgZ(0,"span",236),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.from," ")}}function Mr(e,t){if(1&e&&(f.TgZ(0,"span",237),f._uU(1),f.ALo(2,"roundFraction"),f.ALo(3,"bookingTotalFare"),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(1),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,2,f.xi3(3,5,e,t.returnEnable),t.roundFormate)," ")}}function Vr(e,t){if(1&e&&(f.TgZ(0,"span",237),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.meter," ")}}function Sr(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",238),f.NdJ("click",function(t){f.CHM(e);const i=f.oxw().$implicit;return f.oxw().toggleCollapse(i,t)}),f._UZ(1,"i",19),f.qZA()}if(2&e){const e=f.oxw().$implicit;f.uIk("aria-expanded",!!e.isCollapsed),f.xp6(1),f.Q6J("ngClass",e.isCollapsed?"fa fa-angle-up":"fa fa-angle-down")}}function Er(e,t){if(1&e&&(f.TgZ(0,"td",241),f._uU(1),f.TgZ(2,"span",242),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function Ur(e,t){if(1&e&&(f.TgZ(0,"td",241),f._uU(1),f.TgZ(2,"span",242),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.zone_price,": "),f.xp6(2),f.hij(" ",null!=e&&e.zone_price?null==e?null:e.zone_price:"","")}}function Nr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.minimum_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate):"0","")}}function Ir(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.base_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.base_fare,t.roundFormate):"0","")}}function jr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate),"")}}function Rr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate),"")}}function zr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate),"")}}function Jr(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Nr,6,6,"div",249),f.YNc(2,Ir,6,6,"div",249),f.YNc(3,jr,6,6,"div",249),f.YNc(4,Rr,6,6,"div",249),f.YNc(5,zr,6,6,"div",249),f.BQk()),2&e){const e=f.oxw(2).$implicit;f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.surge_fare)}}function Br(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",252),f.TgZ(2,"span",247),f._uU(3),f.qZA(),f.TgZ(4,"span",40),f._uU(5),f.ALo(6,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(7,"div",252),f.TgZ(8,"span",247),f._uU(9),f.qZA(),f.TgZ(10,"span",40),f._uU(11),f.ALo(12,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(13,"div",252),f.TgZ(14,"span",247),f._uU(15),f.qZA(),f.TgZ(16,"span",40),f._uU(17),f.ALo(18,"roundFraction"),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw(3).$implicit,n=f.oxw();f.xp6(3),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.min_hours?null==n.currentLanguage?null:n.currentLanguage.min_hours:"Minimum Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",e.minHours?f.xi3(6,9,e.minHours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.no_of_hours?null==n.currentLanguage?null:n.currentLanguage.no_of_hours:"No. of Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",null!=i&&i.pricing.selected_hours?f.xi3(12,12,null==i?null:i.pricing.selected_hours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.hourly_rate?null==n.currentLanguage?null:n.currentLanguage.hourly_rate:"Hourly Rate",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(18,15,e.hourlyRate,n.roundFormate),"")}}function Yr(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Br,19,18,"ng-container",25),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.Q6J("ngIf",t.hourlyPackageCardDisplay(e))}}function Qr(e,t){if(1&e&&(f.TgZ(0,"div",244),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.out_of_service_area_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.out_of_service_area_charges,t.roundFormate),"")}}function Hr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.zone_extra_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges,t.roundFormate),"")}}function $r(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);
1f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_passenger_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraPassengerCharge,e.roundFormate)," ")}}function Gr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_luggage_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraLuggageCharge,e.roundFormate),"")}}function Kr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.previous_dues),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.walletBalance,e.roundFormate),"")}}function Wr(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e?null:e.final_fare.tax_amount,t.roundFormate),"")}}function Xr(e,t){if(1&e&&(f.TgZ(0,"div",253),f.TgZ(1,"span",40),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",254),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",40),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function el(e,t){if(1&e&&(f.TgZ(0,"div",255),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.other_charges,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.otherChargePrice,e.roundFormate),"")}}function tl(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(4);f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,2,null==e?null:e.charges,t.roundFormate),"")}}function il(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(4);f.xp6(1),f.lnq("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,3,null==e?null:e.charges,t.roundFormate)," (",(null==e?null:e.charge_value)+"%",")")}}function nl(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(4);f.xp6(1),f.lnq(" (",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",t.distance_unit?(null==t.currentLanguage?null:t.currentLanguage.per)+" "+t.distance_unit:null==t.currentLanguage?null:t.currentLanguage.per_km,")")}}function ol(e,t){if(1&e&&(f.TgZ(0,"div",257),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f.YNc(4,tl,3,5,"ng-container",25),f.YNc(5,il,3,6,"ng-container",25),f._UZ(6,"div",135),f.YNc(7,nl,2,3,"ng-container",25),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw(4);f.xp6(2),f.Oqu(t.getOtherChargeBreakdownLabel(e)),f.xp6(2),f.Q6J("ngIf",2==(null==e?null:e.charge_type)||3==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",3==(null==e?null:e.charge_type))}}function al(e,t){if(1&e&&(f.TgZ(0,"div"),f.YNc(1,ol,8,4,"div",256),f.qZA()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",e&&(e.checked||e.is_required))}}function rl(e,t){if(1&e&&(f.TgZ(0,"div"),f.YNc(1,al,2,1,"div",162),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.Q6J("ngForOf",e.otherChargesArray)}}function ll(e,t){if(1&e&&(f.TgZ(0,"td",241),f._uU(1),f.TgZ(2,"span",242),f._uU(3),f.ALo(4,"number"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(4,3,2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_distance:t.returnotherDetails.ride_distance,"1.1-1")," ",t.distance_unit," ")}}function sl(e,t){if(1&e&&(f.TgZ(0,"td",241),f._uU(1),f.TgZ(2,"span",242),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_time:t.returnotherDetails.ride_time," ",null==t.currentLanguage?null:t.currentLanguage.min," ")}}function ul(e,t){if(1&e&&(f.TgZ(0,"td",241),f._uU(1),f.TgZ(2,"span",242),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(3);
1f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function dl(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate)," ")}}function cl(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.base_fare,t.roundFormate)," ")}}function hl(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate)," ")}}function gl(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate)," ")}}function pl(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function ml(e,t){if(1&e&&(f.ynx(0),f.YNc(1,dl,6,6,"div",249),f.YNc(2,cl,6,6,"div",249),f.YNc(3,hl,6,6,"div",249),f.YNc(4,gl,6,6,"div",249),f.YNc(5,pl,6,6,"div",249),f.BQk()),2&e){const e=f.oxw().ngIf;f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare)}}function _l(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.tax_amount,t.roundFormate)," ")}}function fl(e,t){if(1&e&&(f.TgZ(0,"div",253),f.TgZ(1,"span",40),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",254),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",40),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(4);f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function vl(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",247),f._uU(2),f.qZA(),f.TgZ(3,"span",40),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(3);f.xp6(2),f.hij("- ",(null==t.currentLanguage?null:t.currentLanguage.return_trip_discount)||"Return Trip Discount",""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.return_trip_discount,t.roundFormate)," ")}}const yl=function(){return["hourly","package"]};function bl(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",258),f.TgZ(2,"div",244),f.TgZ(3,"span",245),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"table",240),f.TgZ(6,"thead"),f.TgZ(7,"tr"),f.YNc(8,ll,5,6,"td",243),f.YNc(9,sl,4,3,"td",243),f.qZA(),f.TgZ(10,"tr"),f.YNc(11,ul,5,5,"td",243),f.qZA(),f.qZA(),f.qZA(),f.TgZ(12,"div",244),f.TgZ(13,"span"),f._uU(14),f.qZA(),f.qZA(),f.TgZ(15,"div",244),f.TgZ(16,"span",245),f._uU(17),f.qZA(),f.TgZ(18,"span",245),f._uU(19),f.qZA(),f.qZA(),f.YNc(20,ml,6,5,"ng-container",25),f.TgZ(21,"div",246),f.TgZ(22,"span",247),f._uU(23),f.qZA(),f.TgZ(24,"span",40),f._uU(25),f.ALo(26,"roundFraction"),f.qZA(),f.qZA(),f.YNc(27,_l,6,6,"div",249),f.YNc(28,fl,9,6,"div",250),f.YNc(29,vl,6,6,"div",249),f.TgZ(30,"div",246),f.TgZ(31,"span",247),f._uU(32),f.qZA(),f.TgZ(33,"span",40),f._uU(34),f.ALo(35,"roundFraction"),f.ALo(36,"returnTripFareTotal"),f.qZA(),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw(2).$implicit,n=f.oxw();f.xp6(4),f.AsE(" ",(null==n.currentLanguage?null:n.currentLanguage.return)||"Return"," ",(null==n.currentLanguage?null:n.currentLanguage.trip)||"Trip"," "),f.xp6(4),f.Q6J("ngIf",n.returnotherDetails),f.xp6(1),f.Q6J("ngIf",n.returnotherDetails),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(3),f.hij("Note: ",null==n.currentLanguage?null:n.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.price_breakdown," "),f.xp6(2),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.rate," "),f.xp6(1),f.Q6J("ngIf",!f.DdM(26,yl).includes(n.bookingTypeKey)),f.xp6(3),f.hij("+ ",null==n.currentLanguage?null:n.currentLanguage.trip_fare,""),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(26,18,null==e.final_fare?null:e.final_fare.amount,n.roundFormate)," "),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.return_trip_discount),f.xp6(3),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.final_fare),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(35,21,f.lcZ(36,24,i),n.roundFormate)," ")}}const xl=function(){return["hourly"]};function kl(e,t){if(1&e&&(f.TgZ(0,"div",239),f.TgZ(1,"table",240),f.TgZ(2,"thead"),f.TgZ(3,"tr"),f.TgZ(4,"td",241),f._uU(5),f.TgZ(6,"span",242),f._uU(7),f.ALo(8,"number"),f.qZA(),f.qZA(),f.TgZ(9,"td",241),f._uU(10),f.TgZ(11,"span",242),f._uU(12),f.qZA(),f.qZA(),f.qZA(),f.TgZ(13,"tr"),f.YNc(14,Er,5,5,"td",243),f.YNc(15,Ur,4,2,"td",243),f.qZA(),f.qZA(),f.qZA(),f.TgZ(16,"div",244),f.TgZ(17,"span"),f._uU(18),f.qZA(),f.qZA(),f.TgZ(19,"div",244),f.TgZ(20,"span",245),f._uU(21),f.qZA(),f.TgZ(22,"span",245),f._uU(23),f.qZA(),f.qZA(),f.YNc(24,Jr,6,5,"ng-container",25),f.YNc(25,Yr,2,1,"ng-container",25),f.TgZ(26,"div",246),f.TgZ(27,"span",247),f._uU(28),f.qZA(),f.TgZ(29,"span",40),f._uU(30),f.ALo(31,"roundFraction"),f.qZA(),f.qZA(),f.YNc(32,Qr,6,6,"div",248),f.YNc(33,Hr,6,6,"div",249),f.YNc(34,$r,6,6,"div",249),f.YNc(35,Gr,6,6,"div",249),f.YNc(36,Kr,6,6,"div",249),f.YNc(37,Wr,6,6,"div",249),f.YNc(38,Xr,9,6,"div",250),f.YNc(39,el,6,6,"div",251),f.YNc(40,rl,2,1,"div",25),f.TgZ(41,"div",246),f.TgZ(42,"span",247),f._uU(43),f.qZA(),f.TgZ(44,"span",40),f._uU(45),f.ALo(46,"roundFraction"),f.ALo(47,"bookingTotalFare"),f.qZA(),f.qZA(),f.YNc(48,bl,37,27,"ng-container",25),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(5),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(8,29,2==(null==e?null:e.vehicle_type_category)?t.otherDetails.bike_ride_distance:t.otherDetails.ride_distance,"1.1-1")," ",t.distance_unit,""),f.xp6(3),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?t.otherDetails.bike_ride_time:t.otherDetails.ride_time," ",null==t.currentLanguage?null:t.currentLanguage.min,""),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(1),f.Q6J("ngIf",null==e?null:e.zone_price),f.xp6(3),f.hij("Note: ",null==t.currentLanguage?null:t.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.price_breakdown),f.xp6(2),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.rate),f.xp6(1),f.Q6J("ngIf",!f.DdM(41,yl).includes(t.bookingTypeKey)),f.xp6(1),f.Q6J("ngIf",f.DdM(42,xl).includes(t.bookingTypeKey)),f.xp6(3),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.trip_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(31,32,null==e||null==e.final_fare?null:e.final_fare.amount,t.roundFormate),""),f.xp6(2),f.Q6J("ngIf",null==e?null:e.final_fare.out_of_service_area_charges),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges),f.xp6(1),f.Q6J("ngIf",t.totalExtraPasse
1ngerCharge),f.xp6(1),f.Q6J("ngIf",t.totalExtraLuggageCharge),f.xp6(1),f.Q6J("ngIf",t.walletBalance<0),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",(null==t.selectedVehicleObj?null:t.selectedVehicleObj.id)===e.id&&t.otherChargePrice),f.xp6(1),f.Q6J("ngIf",(null==t.selectedVehicleObj?null:t.selectedVehicleObj.id)===e.id),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.final_fare),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(46,35,f.xi3(47,38,e,t.returnEnable),t.roundFormate),""),f.xp6(3),f.Q6J("ngIf",t.returnEnable&&(null==e||null==e.pricing?null:e.pricing.return_trip_pricing))}}function Zl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ul",214),f.TgZ(1,"li",215),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw().changeVehicle(t)}),f.TgZ(2,"div",216),f._UZ(3,"img",217),f.TgZ(4,"div",218),f.TgZ(5,"div",219),f.TgZ(6,"div",220),f.TgZ(7,"p",221),f._uU(8),f.qZA(),f.YNc(9,Or,2,1,"p",222),f.qZA(),f.TgZ(10,"div",223),f.YNc(11,Lr,2,1,"span",224),f.YNc(12,Mr,4,8,"span",225),f.YNc(13,Vr,2,1,"span",225),f.YNc(14,Sr,2,2,"button",226),f.qZA(),f.qZA(),f.TgZ(15,"div",227),f.TgZ(16,"span",228),f.O4$(),f.TgZ(17,"svg",229),f._UZ(18,"path",230),f.qZA(),f.kcU(),f.TgZ(19,"span",231),f._uU(20),f.qZA(),f.qZA(),f.TgZ(21,"span",232),f.O4$(),f.TgZ(22,"svg",229),f._UZ(23,"path",233),f.qZA(),f.kcU(),f.TgZ(24,"span",231),f._uU(25),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(26,kl,49,43,"div",234),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw();f.xp6(1),f.Udp("border-color",e.checked||(null==i.selectedVehicleObj?null:i.selectedVehicleObj.id)===e.id?(null==i.themeCodeData?null:i.themeCodeData.user_primary_color)||"#15202b":null),f.ekj("list-focus",e.checked||(null==i.selectedVehicleObj?null:i.selectedVehicleObj.id)===e.id),f.xp6(2),f.Q6J("src",null!=e&&e.vehicle_image?null==e?null:e.vehicle_image:"assets/img/car_image.png",f.LSH),f.xp6(5),f.Oqu(e.title),f.xp6(1),f.Q6J("ngIf",null==e?null:e.description),f.xp6(2),f.Q6J("ngIf","Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2==(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2===(null==e.pricing?null:e.pricing.calculation_type)),f.xp6(1),f.Q6J("ngIf",3!==(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",3===(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",("Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2!=(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2!=(null==e||null==e.pricing?null:e.pricing.calculation_type))&&"Y"==i.fareAccebility),f.xp6(6),f.AsE("",e.capacity,"\u2013",e.max_capacity,""),f.xp6(5),f.AsE("",e.vehicle_luggage_capacity,"\u2013",e.max_luggage_capacity,""),f.xp6(1),f.Q6J("ngIf",e.isCollapsed)}}function Cl(e,t){if(1&e&&(f.TgZ(0,"ng-option",154),f._uU(1),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(2);f.Q6J("value",null==e?null:e.id),f.xp6(1),f.xDo(" ",0==(null==e?null:e.slot_distance)?(null==i.currentLanguage?null:i.currentLanguage.unlimited)||"Unlimited":null==e?null:e.slot_distance," ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.distance_unit," | ",null==e?null:e.slot_hours," h | ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",null==e?null:e.slot_amount," ")}}function Fl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",165),f.TgZ(1,"div",259),f.TgZ(2,"ng-select",260),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changePackages(),t.onInputChange(t.addForm.controls.packages)}),f.YNc(3,Cl,2,6,"ng-option",153),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(3,Ya,e.formErrors.packages)),f.xp6(1),f.Q6J("formControl",e.addForm.controls.packages),f.xp6(1),f.Q6J("ngForOf",e.rentalPackages)}}function Tl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",165),f.TgZ(1,"div",259),f.TgZ(2,"ng-select",261),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changeHours(),t.onInputChange(t.addForm.controls.hour)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(4,Ya,e.formErrors.hour)),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_hour)("items",e.hoursArray)("formControl",e.addForm.controls.hour)}}function Al(e,t){if(1&e&&(f.TgZ(0,"ng-option",154),f._uU(1),f.qZA()),2&e){const e=t.$implicit;f.Q6J("value",e.id),f.xp6(1),f.hij(" ",e.name," ")}}function Pl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",265),f.TgZ(1,"span",266),f._UZ(2,"i",267),f.qZA(),f.TgZ(3,"ng-select",268),f.NdJ("change",function(t){return f.CHM(e),f.oxw(2).onFilterChange(t,0)}),f.YNc(4,Al,2,2,"ng-option",153),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(3),f.Q6J("searchable",!1)("clearable",!1)("virtualScroll",!1)("formControl",e.addForm.controls.no_of_passenger),f.xp6(1),f.Q6J("ngForOf",e.numberFilter)}}function wl(e,t){if(1&e&&(f.TgZ(0,"ng-option",154),f._uU(1),f.qZA()),2&e){const e=t.$implicit;f.Q6J("value",e.id),f.xp6(1),f.hij(" ",e.name," ")}}function ql(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",265),f.TgZ(1,"span",266),f._UZ(2,"i",269),f.qZA(),f.TgZ(3,"ng-select",268),f.NdJ("change",function(t){return f.CHM(e),f.oxw(2).onFilterChange(t,1)}),f.YNc(4,wl,2,2,"ng-option",153),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(3),f.Q6J("searchable",!1)("clearable",!1)("virtualScroll",!1)("formControl",e.addForm.controls.trip_luggage),f.xp6(1),f.Q6J("ngForOf",e.luggageArray)}}function Dl(e,t){if(1&e&&(f.TgZ(0,"ng-option",154),f._uU(1),f.qZA()),2&e){const e=t.$implicit;f.Q6J("value",e.id),f.xp6(1),f.hij(" ",e.charges_key," ")}}function Ol(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",270),f.TgZ(1,"ng-select",271),f.NdJ("change",function(t){return f.CHM(e),f.oxw(2).setPaymentMode(t)}),f.YNc(2,Dl,2,2,"ng-option",153),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.Q6J("ngClass",f.VKq(7,Ya,e.formErrors.paymentMode)),f.xp6(1),f.Q6J("searchable",!1)("clearable",!1)("virtualScroll",!1)("notFoundText",null==e.currentLanguage?null:e.currentLanguage.no_data_found)("formControl",e.addForm.controls.payment_mode_id
1),f.xp6(1),f.Q6J("ngForOf",e.paymentMode)}}function Ll(e,t){if(1&e&&(f.TgZ(0,"div",262),f.YNc(1,Pl,5,5,"div",263),f.YNc(2,ql,5,5,"div",263),f.YNc(3,Ol,3,9,"div",264),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngIf",e.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",e.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",e.paymentMode.length>1)}}function Ml(e,t){1&e&&(f.TgZ(0,"div",90),f._UZ(1,"div",91),f.qZA())}function Vl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"app-payment-gatway-list",272),f.NdJ("paymentSucsessBook",function(t){return f.CHM(e),f.oxw().afterPaymentSucsess(t)})("closePaymentMethod",function(t){return f.CHM(e),f.oxw().openPaymentGateway(t)})("requestBooking",function(){return f.CHM(e),f.oxw().onStripeRequestBooking()}),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("pre_payment",e.pre_payment)("pre_payment_value",e.pre_payment_value)("tripPayload",e.tripPayload)("FinalFare",e.returnEnable?e.totalFInalFare:e.finalFare)("hideStyle",!0)("is_yelowCab",!0)("trip_id",e.tripId)("trip_num",e.trip_number)}}function Sl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",278),f.TgZ(1,"input",279),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(3).changeQueuePickup(t)}),f.qZA(),f.TgZ(2,"div",280),f.TgZ(3,"div",281),f.TgZ(4,"div",282),f.TgZ(5,"h4",283),f._uU(6),f.qZA(),f.TgZ(7,"div",284),f.TgZ(8,"div",285),f.TgZ(9,"span",286),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.title),f.xp6(4),f.Oqu(e.address)}}function El(e,t){if(1&e&&(f.TgZ(0,"div",276),f.YNc(1,Sl,11,4,"label",277),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("ngForOf",e.queuePikupStandList)}}function Ul(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",273),f.TgZ(1,"div",70),f.TgZ(2,"form",71),f.TgZ(3,"div",72),f.TgZ(4,"div",73),f.TgZ(5,"h4",74),f._uU(6,"Select Pickup Stand"),f.qZA(),f.TgZ(7,"button",274),f.TgZ(8,"span",76),f._uU(9,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(10,El,2,1,"div",77),f.TgZ(11,"div",78),f.TgZ(12,"button",275),f.NdJ("click",function(){return f.CHM(e),f.oxw().pickUpStandFormSubmit()}),f._uU(13," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(10),f.Q6J("ngIf",e.queuePikupStandList.length>0),f.xp6(2),f.Q6J("disabled",!e.pickUpStandForm.valid)}}function Nl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",278),f.TgZ(1,"input",279),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).fixZone(t)}),f.qZA(),f.TgZ(2,"div",280),f.TgZ(3,"div",281),f.TgZ(4,"div",282),f.TgZ(5,"h4",283),f._uU(6),f.qZA(),f.TgZ(7,"div",284),f.TgZ(8,"div",285),f.TgZ(9,"span",286),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.from_zone_title),f.xp6(4),f.Oqu(e.dropoff_location)}}function Il(e,t){if(1&e&&(f.TgZ(0,"div",276),f.YNc(1,Nl,11,4,"label",277),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngForOf",e.zonePriceData)}}function jl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",287),f.TgZ(1,"h6",288),f._uU(2),f.qZA(),f.TgZ(3,"p",289),f._uU(4),f.qZA(),f.TgZ(5,"input",290),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserPickupLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",135),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;f.xp6(2),f.hij("",null==e?null:e.location_type_name," "),f.xp6(2),f.Oqu(null==e?null:e.address),f.xp6(1),f.MGl("id","p-",i,"")}}function Rl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",287),f.TgZ(1,"h6",288),f._uU(2),f.qZA(),f.TgZ(3,"p",289),f._uU(4),f.qZA(),f.TgZ(5,"input",291),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserDropoffLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",135),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;f.xp6(2),f.Oqu(null==e?null:e.location_type_name),f.xp6(2),f.Oqu(e.address),f.xp6(1),f.MGl("id","d-",i,"")}}const zl=function(e,t,i,n){return{"booking-form-w-booking":e,"booking-form":t,"hidden-width":i,"default-width":n}},Jl=function(e,t){return{background:e,color:t}},Bl=function(e){return{"booking-form-center booking-form-center-w-booking":e}}
1,Yl=function(e,t){return{"booking-form-inner-w-booking":e,"w-100":t}};let Ql=(()=>{class e{constructor(e,t,i,n,o,a,r,l,s,u,d,c){this.authService=e,this.cd=t,this.yelowCabService=i,this.fb=n,this.taxiBookingService=o,this.yelowBookingService=a,this.toasterService=r,this.googleService=l,this.route=s,this.jwtService=u,this.Router=d,this.zoneUtilityService=c,this.DriverKeyUp=new x.xQ,this.DriverKeyUp2=new x.xQ,this.DriverKeyUp1=new x.xQ,this.DriverKeyUpReturn=new x.xQ,this.DriverKeyUpReturnDest=new x.xQ,this.formErrors={pickup_location:"",destination:"",request_time:"",start_date:"",end_date:"",paymentMode:"",paymentStatus:"",driver:"",apierror:"",corporate:"",inActive:"Corporate is InActive please Activate it",recurring_time:"",recurring_on:"",first_name:"",last_name:"",email:"",phone_no:"",dial_code:"",notes:"",return_time:"",employee:"",booking_type_id:"",hour:"",packages:""},this.rentalPackages=[],this.isCollapsed=!0,this.passengerType="MYSELF",this.storeOldVehiclePrice=0,this.skipLogin=!1,this.isOtpVerification=!1,this.tripPropertiesIds=[],this.zoneIds=[],this.title="Template 5",this.hideBasicPage=!1,this.hideUserPage=!0,this.isFirstPart=!0,this.hidePayment=!0,this.hideSuccess=!0,this.channelPaymentType=null,this.channelPaymentTypeLabel=null,this.steps=[],this.currentStepIndex=0,this.no_of_passenger=1,this.trip_luggage=0,this.displayChidSheet=!1,this.displayBoosterSheet=!1,this.displayFlightNumber=!1,this.YELOWCAB_SERVICE_TYPE=14,this.otherChargArray=[],this.otherChargesArray=[],this.tripOtherCharges=[],this.loadingState=!1,this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.selectedOtherChargesArray=[],this.placeSearch=new x.xQ,this.responseFlight=[],this.key="e903329db5f17ff850162f4e8c872651",this.checkFligth=!1,this.transactionCategory=[],this.showCode=!1,this.booking_type_id=null,this.formSubmited=!1,this.submitFirstPart=!1,this.checkpointsArrayNew=[],this.getWayPoint=[],this.timeFormatConfig2={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.request_time=e;const t=new Date(e[0])||null;this.addForm.controls.request_time.setValue(t),this.setDateintime()}}},this.Customer_id=null,this.zoneData={from:null,to:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null,from_ids:null,to_ids:null},this.returnzoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.paymentMode=[],this.allPaymentModes=[],this.allRideTypes=[],this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.zoneCutOffMinutes=null,this.requestTimeMinDate=null,this.pickupRegionFound=!0,this.pickupZoneFound=!0,this.dropRegionFound=!0,this.dropZoneFound=!0,this.showNextButton=!0,this.sameZoneTripRestricted=!1,this.regionResponse=[],this.totalExtraPassengerCharge=0,this.totalExtraLuggageCharge=0,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.clearPickup=!1,this.searchText=null,this.selectedCheckpointsArray=[],this.vehicleArray=[],this.filterVehicleArray=[],this.origin=w.jQ,this.queuePikupList=[],this.queuePikupData=null,this.queuePikupStandList=[],this.queuePikupFound=!1,this.selectQueuePickup=!1,this.checkOnlyPickupConfig="N",this.selectedPickupPoint=null,this.selectedUserPickupLocation=null,this.selectedUserDropoffLocation=null,this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[],this.locationTypeList=[{type_id:1,title:"Home"},{type_id:2,title:"Work"},{type_id:3,title:"Other"}],this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.zoneResponse=[],this.driverArray=[],this.autoDispatch=!0,this.onlineDriver=1,this.genderValue="M",this.queueId=null,this.checkpointValidity={},this.checkOutofServiceArea=!1,this.lastCheckPointValid=!0,this.skip_destination=!1,this.clearDestination=!1,this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.rideType=w.xk,this.corporateBookingConfirmation="N",this.bookingAssetsList=[],this.driverType=[],this.selectedTab=1,this.schedule_trip=!1,this.schedule_tripArray=null,this.requestMode="N",this.is_date=!1,this.marker=[],this.lat=23.0225,this.lng=72.5714,this.zoom=12,this.generateNewMap=!0,this.isFixdestination=!1,this.mobileMapOpen=!0,this.timeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onChange:e=>{e&&(console.log("selectedDates",e),this.selectedRequestTime=e)}},this.luggageArray=[],this.numberFilter=[],this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.returnEnable=!1,this.checkReturnTimeConfig=!1,this.returnFinalFare=0,this.returnTripDiscount=0,this.store_ride_distance=0,this.store_bike_distance=0,this.store_distance=0,this.startingFrom=!1,this.otherChargePrice=0,this.tripOtherChargePrice=0,this.queryParam={},this.returnDateFormatConfig={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(null==e?void 0:e.length){const t=new Date(e[0]);this.return_date=t,this.addForm.controls.return_date.setValue(t),this.setReturnTimeFromDate()}}},this.returnTimeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onClose:e=>{if(null==e?void 0:e.length){const t=new Date(e[0]);this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t)}}},this.walletBalance=0,this.vehicleTypeArray=[],this.zonePropertiesIds=[],this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.TEXT_BOX_FIELD=1,this.DATE_FIELD=2,this.MULTI_SELECT_FIELD=3,this.DROPDOWN_FIELD=4,this.DOCUMENT_FIELD=6,this.documentUploadLoading={},this.documentFileNames={},this.isDocumentUploading=!1,this.DOCUMENT_MAX_FILE_SIZE=22020096,this.dateFormatConfig={dateFormat:"d/m/Y",time_24hr:!1,enableTime:!1},this.displayLoginForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.selectedButtonSingAUpLogin={button_id:1},this.currentUserDetail=null,this.content="",this.bookingTypeKey=null,this.hoursArray=[{name:"1 hrs",value:1},{name:"2 hrs",value:2},{name:"3 hrs",value:3},{name:"4 hrs",value:4},{name:"5 hrs",value:5},{name:"6 hrs",value:6},{name:"7 hrs",value:7},{name:"8 hrs",value:8},{name:"9 hrs",value:9},{name:"10 hrs",value:10},{name:"11 hrs",value:11},{name:"12 hrs",value:12},{name:"13 hrs",value:13},{name:"14 hrs",value:14},{name:"15 hrs",value:15},{name:"16 hrs",value:16},{name:"17 hrs",value:17},{name:"18 hrs",value:18},{name:"19 hrs",value:19},{name:"20 hrs",value:20},{name:"21 hrs",value:21},{name:"22 hrs",value:22},{name:"23 hrs",value:23},{name:"24 hrs",value:24}],this.trip_number=null,this.gender=O.y7,this.genderTab="M",this.is_full_screen=!0,this.hours_pricing=0,this.package_pricing=0,this.agentMinDistance=0,this.agentLogin=!1,this.disableBtn=!1,this.vehicleTypes=[{title:"Sedan"},{title:"SUV"},{title:"Luxury"},{title:"Van"}],this.allocation_type=null}getZonePricingParams(){return{}}getStepClass(e){return e===this.currentStepIndex?"active-web-booking":e<this.currentStepIndex?"completed-web-booking":"inactive-web-booking"}isStepCompleted(e){return e<this.currentStepIndex}ngOnDestroy(){this.sub&&this.sub.unsubscribe(),this.mapObs&&this.mapObs.unsubscribe()}ngAfterViewInit(){this.mapObs=this.authService.mapScriptLoad.subscribe(e=>{var t,i;(null==e?void 0:e.is_load)&&((null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?(this.lat=Number(e.latitude),this.lng=Number(e.longitude)):(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_latitude)&&(null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.company_longitude)&&(this.lat=Number(this.currentCompanyDetail.company_latitude),this.lng=Number(this.currentCompanyDetail.company_longitude)),this.initMap(),this.patchDefaultUserLocation())})}onWindowResize(){this.map&&"undefined"!=typeof google&&setTimeout(()=>google.maps.event.trigger(this.map,"resize"),150)}toggleMobileMap(){this.mobileMapOpen=!this.mobileMapOpen,this.refreshMapViewportForSheet()}refreshMapViewportForSheet(e=220){setTimeout(()=>{!this.map||"undefined"==typeof google||(google.maps.event.trigger(this.map,"resize"),this.selectedVehicleObj?this.drawPath(2==this.selectedVehicleObj.vehicle_type_category?this.bike_path:this.trip_path):this.bindMarkerPoints())},e)}initMap(){var e;!(null===(e=this.gmapElement)||void 0===e?void 0:e.nativeElement)||"undefined"==typeof google||(this.generateMap(),this.map&&(this.googleService.mapCenter(this.map,{lat:this.lat,lng:this.lng}),this.bindMarkerPoints()))}generateMap(){var e;!(null===(e=this.gmapElement)||void 0===e?void 0:e.nativeElement)||"undefined"==typeof google||(this.mapProp={zoom:this.zoom,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!0,disableDefaultUI:!0,center:new google.maps.LatLng(this.lat,this.lng),minZoom:4,styles:[{featureType:"poi",stylers:[{visibility:"off"}]}]},this.map=new google.maps.Map(this.gmapElement.nativeElement,this.mapProp))}patchDefaultUserLocation(){(null==navigator?void 0:navigator.geolocation)&&(null==navigator||navigator.geolocation.getCurrentPosition(e=>{e&&this.googleService.getAddressFromLatLng(e.coords.latitude,e.coords.longitude).then(e=>{var t,i,n,o,a,r,l,s;if(e){let u={full_text:null===(t=null==e?void 0:e.results[0])||void 0===t?void 0:t.formatted_address,place_id:null===(i=null==e?void 0:e.results[0])||void 0===i?void 0:i.place_id,latitude:null===(a=null===(o=null===(n=null==e?void 0:e.results[0])||void 0===n?void 0:n.geometry)||void 0===o?void 0:o.location)||void 0===a?void 0:a.lat(),longitude:null===(s=null===(l=null===(r=null==e?void 0:e.results[0])||void 0===r?void 0:r.geometry)||void 0===l?void 0:l.location)||void 0===s?void 0:s.lng()};this.searchEvent(u)}})}))}ngOnInit(){this.createForm(),this.route.queryParams.subscribe(e=>{console.log("Current queryParams >>>",e),e.agent_id&&(this.agent_id=e.agent_id,this.jwtService.saveAgentId(this.agent_id));const t=this.jwtService.getAgentId();this.agent_id=t,t&&e.agent_id!==t&&(this.agentLogin=!0,this.getCommisionDetail
1s(t),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:t},queryParamsHandling:"merge",replaceUrl:!0}))}),this.pickUpStandForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],pickup_latitude:[null],pickup_longitude:[null]}),this.validationMessages={first_name:{required:"Please enter First Name",whiteSpace:"* Space not allowed"},last_name:{required:"Please enter last name",whiteSpace:"* Space not allowed"},email:{required:"* Please enter email",validateEmail:"* Please enter valid email"},phone_no:{required:"Please enter phone number",minlength:"Please enter at least 6 digits",maxlength:"Please enter at most 11 digits"},dial_code:{required:"Please enter dial code",validateDialCode:"Please enter correct dial code"},pickup_location:{required:"Enter Your Pickup Location",whiteSpace:"* Space not allowed"},destination:{required:"Please enter destination",whiteSpace:"* Space not allowed"},ride_type:{required:"Please enter ride type"},request_time:{required:"Please enter request time "},return_time:{required:"Please select return date and time"},recurring:{required:"Extra charge per "},start_date:{required:"Extra charge start date"},end_date:{required:"Please select the end date"},days:{required:"Extra charge per luggage"},auto_dispatch:{required:"Please enter waiting time charge"},driver:{required:"Please select the driver"},paymentMode:{required:"Please provide the payment type"},paymentStatus:{required:"Please provide the payment type"},notes:{required:"Please enter notes"},corporate:{required:"Please enter Corporate"},recurring_time:{required:"Please select the time"},recurring_on:{required:"Please select the days"},employee:{required:"Please select Employee"},booking_type_id:{required:"Please select Booking type"},packages:{required:"Please select packages"},hour:{required:"Please select hour"}},this.initDefaultReturnDateTime(),this.authService.langaugeListSubject.subscribe(e=>{this.languageList=e,setTimeout(()=>{window.localStorage.getItem("query_language_code")&&(this.selectedLanguage=window.localStorage.getItem("query_language_code"),window.localStorage.removeItem("language_code"),this.changeLanguage())},500)}),this.sub=this.authService.langaugeSubjectData.subscribe(e=>{var t,i,n,o;this.currentLanguage=null==e?void 0:e.labels,this.selectedLanguage=null==e?void 0:e.language_code,this.steps=[{name:null===(t=this.currentLanguage)||void 0===t?void 0:t.quote_header,icon:"quote-icon",isActive:!1},{name:null===(i=this.currentLanguage)||void 0===i?void 0:i.transfer_header,icon:"transfer-icon",isActive:!0},{name:null===(n=this.currentLanguage)||void 0===n?void 0:n.payment_header,icon:"payment-icon",isActive:!1}],this.bookRideText=null===(o=this.currentLanguage)||void 0===o?void 0:o.book_ride}),this.authService.themeCode.subscribe(e=>{this.themeCodeData=e}),this.authService.currentUser.subscribe(e=>{Object.keys(e).length>0&&(this.currentUserDetail=e,this.getUserLocations(e.id),this.queryParam.user_id=e.id)}),this.authService.currentCompany.subscribe(e=>{var t,i;e&&(null==e?void 0:e.company_id)&&(this.currentCompanyDetail=e,this.formatTimeDate=this.currentCompanyDetail.company_date_format+" "+this.currentCompanyDetail.company_time_format,this.roundFormate=null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.round_format,this.distance_unit=null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.distance_unit,this.currentCompanyDetail.company_time_format.includes("a")||this.currentCompanyDetail.company_time_format.includes("A")||(this.timeFormatConfig.time_24hr=!0,this.timeFormatConfig.dateFormat="H:i",this.returnTimeFormatConfig.time_24hr=!0,this.returnTimeFormatConfig.dateFormat="H:i"),this.company_logo=e.company_logo,this.company_id=e.company_id,this.company_id&&(this.getPaymentConfig(),this.getVehicleType(this.company_id),this.getAllTripProperties(),this.getCustomeFields(),this.getRegionList(this.YELOWCAB_SERVICE_TYPE),this.ManagezoneData()),this.dialCode=e.country_dial_code,this.addForm.patchValue({dial_code:this.dialCode}))}),this.placeSearch.pipe((0,k.b)(300)).subscribe(e=>{this.searchFlight(e)}),this.checkModule(),this.DriverKeyUp.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName(e)}),this.DriverKeyUp2.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName2(e)}),this.DriverKeyUp1.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName1(e)}),this.DriverKeyUpReturn.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturn(e)}),this.DriverKeyUpReturnDest.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturnDest(e)})}
1getCommisionDetails(e){this.loadingState=!0,this.yelowBookingService.getCommisionById(e).subscribe(e=>{var t;this.loadingState=!1,console.log("response >>>>>>>>>. ",e),this.agentMinDistance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.trip_minimum_distance},e=>{})}searchDriverByName2(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i,n;(null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places)||void 0===i?void 0:i.length)>0&&(this.responseDatacheckPoint=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.places)})}searchDriverByName1(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataDestionation=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturn(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturn=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturnDest(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturnDestination=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}createForm(){this.addForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],destination:[null,r.kI.compose([b.Sl])],checkpoint:[null],ride_type:[1,r.kI.compose([r.kI.required])],request_time:[null],return_date:[null],return_trip_time:[null],return_time:[null],return_pickup_location:[null],return_pickup_latitude:[null],return_pickup_longitude:[null],return_destination:[null],return_dropoff_latitude:[null],return_dropoff_longitude:[null],recurring:[null],start_date:[null],auto_dispatch:[!1,r.kI.compose([r.kI.required])],driver:[null],notes:[null],checkpoints:this.fb.array([]),properties:this.fb.array([]),gender:["M"],end_date:[null],recurring_time:[null],recurring_on:[null],paymentMode:[1,r.kI.compose([r.kI.required])],payment_mode_id:[null,r.kI.compose([r.kI.required])],trip_luggage:[this.trip_luggage],no_of_passenger:[this.no_of_passenger],paymentStatus:["pending",r.kI.compose([r.kI.required])],customer:[null],first_name:[null],last_name:[null],email:[null],phone_no:[null],dial_code:[this.dialCode],booster_seat:[0],child_seat:[0],flight_number:[null],booking_type_id:[null,r.kI.compose([r.kI.required])],additional_discount_type:[1],extra_charge_type:[1],trip_time:[null],hour:[null],packages:[null]}),this.getCategories()}checkModule(){this.authService.CommonModule.subscribe(e=>{e&&(this.checkFligth="Y"==(null==e?void 0:e.dspm_019),this.checkReturnTimeConfig=!!(null==e?void 0:e.dspm_012),this.key=null==e?void 0:e.dspm_019_01)}),this.authService.serviceConfig.subscribe(e=>{var t,i;e&&(this.skipLogin="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_LOGIN],e.csc_064&&(this.isOtpVerification="Y"==e.csc_064),this.skip_destination=!!e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION]&&"Y"===e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION],this.updateDestiantionValidation(this.skip_destination),this.pre_payment_value=null!==(i=null!==(t=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PRE_PAYMENT])&&void 0!==t?t:e.dpsc_030)&&void 0!==i?i:e.tsc_030,this.pre_payment="1"==this.pre_payment_value||1==this.pre_payment_value,console.log("configKeys[CONFIG[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD] >>>>>>>>>. ",e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD]),e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD]&&(this.paymentModeConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD],this.applyPaymentModeConfig()),e.csc_041&&(this.checkRegion=e.csc_041),this.checkGenderEnable=e[F.kh[this.YELOWCAB_SERVICE_TYPE].SHOW_GENDER_OPTIONS],"Y"==this.checkRegion&&e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]&&(this.checkOnlyPickupConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]),(e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE]||e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE])&&(this.requestMode=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE],this.requestModeSchedule=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE],this.get
1SeduleConfige(!0)),this.allocation_type=e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.autoDispatch=3!=this.allocation_type,this.showCode="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.displayLuggagePassenger="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].PassengerLuggage],e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]&&(this.fareAccebility=e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]))})}getMaxLuggagePassengerCapacity(){if(this.max_luggage_capacity_filter>0||0===this.max_luggage_capacity_filter){this.luggageArray=[];for(let e=0;e<=this.max_luggage_capacity_filter;e++)this.luggageArray.push({id:e,name:`${e}`})}if(this.max_capacity_filter>=1){this.numberFilter=[];for(let e=1;e<=this.max_capacity_filter;e++)this.numberFilter.push({id:e,name:`${e}`})}}changeGender(e){this.genderValue=e,this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getCurrentStep(){return this.steps[this.currentStepIndex]}isCurrentStep(e){return e===this.currentStepIndex}getFormDetails(e){this.formData=e,this.no_of_passenger=null==e?void 0:e.no_of_passenger,this.trip_luggage=null==e?void 0:e.trip_luggage,this.isFirstPart=e.isFirstPart,this.firstPageData=e,e&&(this.hideBasicPage=!0,this.hideUserPage=!1),this.hidePayment=!0,this.currentStepIndex=1}editPage(e){this.currentStepIndex=0,this.isFirstPart=!0,this.hideUserPage=!0,this.hideBasicPage=!1,this.hidePayment=!0}goTripDetails(e){e&&(this.hidePayment=!0,this.hideUserPage=!1,this.currentStepIndex=1)}changeLanguage(){var e;localStorage.setItem("language_code",this.selectedLanguage);let t=this.languageList.find(e=>e.language_code==this.selectedLanguage);(null===(e=Object.keys(t))||void 0===e?void 0:e.length)>0&&this.authService.setlanguage([t])}displaySuccess(e){this.currentStepIndex=3,this.hidePayment=!0,this.hideSuccess=!1}displaySuccessresponse(e){var t;this.trip_id=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.booking_number}changeBookingType(e){this.booking_type_id=null,(null==e?void 0:e.id)&&(this.addForm.controls.booster_seat.setValue(0),this.addForm.controls.child_seat.setValue(0),this.addForm.controls.booster_seat.updateValueAndValidity(),this.addForm.controls.child_seat.updateValueAndValidity(),this.booking_type_id=null==e?void 0:e.id,this.bookingTypeKey=null==e?void 0:e.field_key,this.getotherCharges(null==e?void 0:e.id),this.getCustomeFields(),(this.pickup_latitude&&this.pickup_longitude||this.destination_latitude&&this.destination_longitude)&&(this.pickup_latitude&&this.pickup_longitude&&this.UpdateAndCheckPickUpLocation(this.pickup_latitude,this.pickup_longitude,!1),this.destination_latitude&&this.destination_longitude&&this.UpdateDestinationLocation(this.destination_latitude,this.destination_longitude,!1),this.bindMarkerPoints()),this.getFavoriteLocation(),this.selectedVehicleObj&&["hourly","package"].includes(null==e?void 0:e.field_key)&&this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj))}getCategories(){this.loadingState=!0,this.yelowCabService.getOtherCategoryList().subscribe(e=>{var t,i;if(this.loadingState=!1,e.status&&(this.transactionCategory=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list.filter(e=>e.is_active),this.transactionCategory.length>0)){let e=localStorage.getItem("booking_type_id");e?(this.booking_type_id=e,this.bookingTypeKey=null===(i=this.transactionCategory.find(t=>t.id==e))||void 0===i?void 0:i.field_key):(this.booking_type_id=this.transactionCategory[0].id,this.bookingTypeKey=this.transactionCategory[0].field_key),this.getFavoriteLocation(),this.getCustomeFields(),this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.getotherCharges(this.booking_type_id)}},e=>{this.loadingState=!1})}getCustomeFields(){let e={service_type:this.YELOWCAB_SERVICE_TYPE,category_id:this.booking_type_id,company_id:JSON.parse(this.company_id),user_type:"0,3"};this.yelowCabService.getExtraFields(e).subscribe(e=>{var t;e.status&&(this.displayChidSheet=!1,this.displayBoosterSheet=!1,null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>("child_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayChidSheet=!0),"booster_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayBoosterSheet=!0),e.checked=1==(null==e?void 0:e.is_required),Object.assign({},e))))})}getotherCharges(e){let t={service_type:this.YELOWCAB_SERVICE_TYPE,booking_type_id:e,is_active:1};this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.yelowCabService.getOtherChargesList(t).subscribe(e=>{var t,i;e.status&&(this.allOtherChargesArray=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list,this.otherChargesArray=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.list.map(e=>(e.charges=0,e.checked=!1,e.currentValue=0,this.otherChargArray[null==e?void 0:e.charges_key]=e,Object.assign({},e))).filter(e=>1==(null==e?void 0:e.charges_category)))}),this.cd.detectChanges()}checkOtherCharge(e,t){var i,n;this.otherChargesArray=null===(i=this.otherChargesArray)||void 0===i?void 0:i.map(e=>{var i,n;return(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_
1charges_id)&&(e.charges_key&&(null===(i=this.otherChargArray)||void 0===i?void 0:i[e.charges_key])&&(this.otherChargArray[e.charges_key].checked=!e.checked),e.checked=!e.checked,(0,S.Mf)(e)&&(e.currentValue=e.checked?Number(e.currentValue)>0?Number(e.currentValue):1:0,e.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[e.charges_key])&&(this.otherChargArray[e.charges_key].currentValue=e.currentValue))),Object.assign({},e)}),"booster_seat"==(null==t?void 0:t.charges_key)?(this.addForm.controls.booster_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.booster_seat.value):"child_seat"==(null==t?void 0:t.charges_key)&&(this.addForm.controls.child_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.child_seat.value);const o=null===(n=this.otherChargesArray)||void 0===n?void 0:n.find(e=>(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id));o&&(t.checked=o.checked,t.currentValue=o.currentValue),this.refreshOtherChargesFare()}checkTripOtherCharge(e,t){var i;this.tripOtherCharges=null===(i=this.tripOtherCharges)||void 0===i?void 0:i.map(e=>((null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&(e.checked=!e.checked),Object.assign({},e)))}getFlight(e){var t,i,n;e?(this.addForm.patchValue({flight_number:null===(t=e.flight)||void 0===t?void 0:t.iata}),this.flightNumbers=e,this.selectedFlightObj=this.flightNumbers,this.selectedFlightObjName=null===(n=null===(i=this.selectedFlightObj)||void 0===i?void 0:i.flight)||void 0===n?void 0:n.iata):(this.addForm.patchValue({flight_number:null}),this.selectedFlightObj=null)}searchPlace(e){""!==e.trim()&&this.placeSearch.next({search:e})}searchFlight(e){e&&(this.loadingState=!0,this.taxiBookingService.getFlightInfoByNumber(null==e?void 0:e.search).subscribe(e=>{e.status?this.responseFlight[0]=e.data:this.responseFlight=[],this.loadingState=!1},()=>{this.loadingState=!1}))}incrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;null===(n=this.addForm.get(e))||void 0===n||n.setValue(a+1),t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value}decrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;a>0&&(null===(n=this.addForm.get(e))||void 0===n||n.setValue(a-1)),t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value}increment(e){const t=this.properties.at(e).get("value");t.setValue(t.value?Number(t.value)+1:1)}get properties(){return this.addForm.get("properties")}decrement(e){const t=this.properties.at(e).get("value");t.value>0&&t.setValue(Number(t.value)-1)}onInputChange(e=null){e?this.generateErrors(e):Z.op._generateErrors(this.addForm,this.formErrors,this.validationMessages,this.formSubmited)}generateErrors(e){Z.op._generateErrors(e,this.formErrors,this.validationMessages,this.formSubmited)}getFavoriteLocation(){this.yelowCabService.getFavoriteLocationList(this.booking_type_id).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=e.data.location.map(e=>(e.latitude=parseFloat(e.latitude),e.longitude=parseFloat(e.longitude),e.full_text=e.address,delete e.address,e));t&&("airport_drop_off_transfer"!=this.bookingTypeKey?(this.responseData=t,this.responseDatacheckPoint=t):(this.responseData=[],this.responseDatacheckPoint=[]),this.responseDataDestionation="airport_pick_up_transfer"!=this.bookingTypeKey?t:[])}},e=>{})}searchDriverByName(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseData=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchEvent(e){e?(this.displayFlightNumber=!!e.full_text.toLowerCase().includes("airport")||!(!this.addForm.controls.destination.value||!this.addForm.controls.destination.value.toLowerCase().includes("airport")),this.onInputChange(this.addForm.controls.pickup_location),this.clearPickup=!1,this.submitFirstPart=!1,this.showNextButton=!1,this.addForm.controls.pickup_location.setValue(e.full_text),this.searchText=e.full_text,this.addForm.controls.pickup_location.updateV
1alueAndValidity(),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickup_latitude=e.latitude,this.pickup_longitude=e.longitude,this.UpdateAndCheckPickUpLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.pickup_latitude=e.data.latitude,this.pickup_longitude=e.data.longitude,this.UpdateAndCheckPickUpLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.pickup_location.setValue(null),this.addForm.controls.pickup_location.updateValueAndValidity(),this.pickup_latitude=null,this.pickup_longitude=null,this.bindMarkerPoints(),this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.vehicleArray=[],this.filterVehicleArray=[],this.finalFare=0,this.clearPickup=!0)}bindMarkerPoints(){if(!this.map)return;const e=[{lat:this.pickup_latitude,lng:this.pickup_longitude},{lat:this.destination_latitude,lng:this.destination_longitude}],t=this.addForm.get("checkpoints");this.getWayPoint=[],this.selectedCheckpointsArray=[],((null==t?void 0:t.value)||[]).map(i=>{this.getWayPoint.push({latitude:i.lat,longitude:i.lng}),e.push({lat:i.lat,lng:i.lng}),this.selectedCheckpointsArray.push({id:t.value.length,latitude:i.lat,longitude:i.lng})}),e.filter(e=>this.isValidMapPoint(e)).length&&this.addMarker(e)}addMarker(e){var t;if(!this.map||"undefined"==typeof google)return;(null===(t=this.marker)||void 0===t?void 0:t.length)&&this.marker.forEach(e=>{(null==e?void 0:e.setMap)&&e.setMap(null)}),this.marker=[];const i=new google.maps.LatLngBounds;null==e||e.forEach((e,t)=>{const n=0==t?Z.GB:1==t?Z.kJ:Z.yF;if(this.isValidMapPoint(e)){const o={lat:Number(e.lat),lng:Number(e.lng)},a=new google.maps.Marker({draggable:!(!this.displayFirstForm||1==t&&this.isFixdestination),position:o,map:this.map,icon:n});this.marker.push(a),i.extend(o)}}),this.marker.forEach((e,t)=>{e.addListener("dragend",e=>{if(!this.displayFirstForm)return;const i=e.latLng,n=i.lat(),o=i.lng();this.googleService.getAddressFromLatLng(n,o).then(e=>{e&&(this.draggedMarkerObj={updateIndex:t,address:e.results[0].formatted_address,lat:n,lng:o},this.updateMarker(this.draggedMarkerObj))})})}),this.updateMarkersDraggableState();const n=(e||[]).filter(e=>this.isValidMapPoint(e));n.length>=2?this.fitMapToBounds(i):1===n.length&&this.centerMapOnPoint({lat:Number(n[0].lat),lng:Number(n[0].lng)})}isValidMapPoint(e){if(null==(null==e?void 0:e.lat)||null==(null==e?void 0:e.lng))return!1;const t=Number(e.lat),i=Number(e.lng);return!(Number.isNaN(t)||Number.isNaN(i)||0===t&&0===i)}getMapFitPadding(){if("undefined"!=typeof window&&window.innerWidth>=992)return{top:48,bottom:48,right:580,left:40};const e="undefined"!=typeof document?document.querySelector(".yc-map-booking__form"):null,t=window.innerHeight||700,i=(null==e?void 0:e.offsetHeight)||Math.round(.72*t),n=Math.max(140,t-i);return{top:56,bottom:this.mobileMapOpen?Math.min(t-56-100,Math.max(i+24,t-n)):72,left:24,right:24}}fitMapToBounds(e){!this.map||!e||"undefined"==typeof google||(google.maps.event.trigger(this.map,"resize"),setTimeout(()=>{!this.map||this.map.fitBounds(e,this.getMapFitPadding())},80))}centerMapOnPoint(e){if(!this.map||!this.isValidMapPoint(e)||"undefined"==typeof google)return;const t=Number(e.lat),i=Number(e.lng),n=()=>{if(!this.map)return;if(google.maps.event.trigger(this.map,"resize"),window.innerWidth>=992||!this.mobileMapOpen)return this.map.setCenter({lat:t,lng:i}),void((this.map.getZoom()||0)<14&&this.map.setZoom(14));const e=new google.maps.LatLngBounds,n=.002;e.extend({lat:t+n,lng:i+n}),e.extend({lat:t-n,lng:i-n}),this.map.fitBounds(e,this.getMapFitPadding()),google.maps.event.addListenerOnce(this.map,"idle",()=>{if(!this.map)return;const e=this.map.getZoom();null!=e&&e>15&&this.map.setZoom(15),this.map.setCenter({lat:t,lng:i});const n=document.querySelector(".yc-map-booking__form"),o=(null==n?void 0:n.offsetHeight)||Math.round(.72*window.innerHeight);this.map.panBy(0,Math.round(.45*o))})};setTimeout(n,60),setTimeout(n,280)}drawPath(e){var t,i;if(!this.map||!e||"undefined"==typeof google)return;(null===(t=this.polyline)||void 0===t?void 0:t.setMap)&&(this.polyline.setMap(null),this.polyline=null);let n=[];if("string"==typeof e)try{n=google.maps.geometry.encoding.decodePath(e)}catch(a){try{const t=JSON.parse(e);n=this.normalizeRoutePath(t)}catch(r){return}}else{if(!Array.isArray(e))return;n=this.normalizeRoutePath(e)}if(!(null==n?void 0:n.length))return;this.polyline=new google.maps.Polyline({path:n,geodesic:!0,strokeColor:(null===(i=this.themeCodeData)||void 0===i?void 0:i.user_primary_color)||"#15202b",strokeOpacity:1,strokeWeight:4}),this.polyline.setMap(this.map);const o=new google.maps.LatLngBounds;
1n.forEach(e=>o.extend(e)),this.fitMapToBounds(o)}normalizeRoutePath(e){return(e||[]).map(e=>null!=(null==e?void 0:e.lat)&&null!=(null==e?void 0:e.lng)?{lat:Number(e.lat),lng:Number(e.lng)}:null!=(null==e?void 0:e.latitude)&&null!=(null==e?void 0:e.longitude)?{lat:Number(e.latitude),lng:Number(e.longitude)}:null).filter(e=>e&&e.lat&&e.lng)}clearRoutePath(){var e;(null===(e=this.polyline)||void 0===e?void 0:e.setMap)&&(this.polyline.setMap(null),this.polyline=null)}updateMarkersDraggableState(){var e;!(null===(e=this.marker)||void 0===e?void 0:e.length)||this.marker.forEach((e,t)=>{(null==e?void 0:e.setDraggable)&&e.setDraggable(!(!this.displayFirstForm||1===t&&this.isFixdestination))})}updateMarker(e){0==e.updateIndex?(this.addForm.controls.pickup_location.setValue(e.address),this.searchText=e.address,this.addForm.controls.pickup_location.updateValueAndValidity(),this.UpdateAndCheckPickUpLocation(e.lat,e.lng,!1)):1==e.updateIndex?(this.addForm.controls.destination.setValue(e.address),this.searchTextDestionation=e.address,this.addForm.controls.destination.updateValueAndValidity(),this.UpdateDestinationLocation(e.lat,e.lng,!1)):(this.currenCheckpointInput=e.updateIndex-1,this.updateCheckPoint(e.lat,e.lng,e.address))}getRegionList(e){this.yelowBookingService.getCompanyRegionList(e).subscribe(e=>{var t;e&&(this.regionResponse=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list)||[])})}submitUserPickUpLocationForm(){if(this.selectedUserPickupLocation){let e=this.userPickipLocationsArray[this.selectedUserPickupLocation-1];e&&(this.pickup_latitude=parseFloat(e.latitude),this.pickup_longitude=parseFloat(e.longitude),this.searchText=e.address,this.searchEvent({latitude:this.pickup_latitude,longitude:this.pickup_longitude,full_text:e.address}))}this.closeUserPickupLocationForm()}closeUserPickupLocationForm(){$("#selectUserPickupLocation").modal("hide")}updateUserPickupLocation(e,t){this.selectedUserPickupLocation=e}updateUserDropoffLocation(e,t){this.selectedUserDropoffLocation=e}submitUserDropoffLocationForm(){if(this.selectedUserDropoffLocation){let e=this.userDropoffLocationsArray[this.selectedUserDropoffLocation-1];e&&(this.destination_latitude=parseFloat(e.latitude),this.destination_longitude=parseFloat(e.longitude),this.searchTextDestionation=e.address,this.searchEventDestination({latitude:this.destination_latitude,longitude:this.destination_longitude,full_text:e.address}))}this.closeUserDropoffLocationForm()}updateCheckPoint(e,t,i,n=!0){let o=!1;if("Y"==this.checkRegion){for(let i of this.regionResponse)o||(o=(0,Z.eD)(e.toFixed(5),t.toFixed(5),(0,C.U)(i.geofence)),this.selectedCheckPointRegionData=i);!0===o?(this.showNextButton=!0,this.updateDestiantionValidation(!1),this.checkPointsValidation(),this.updateRegionPointValiation()):"N"==this.checkOnlyPickupConfig?(this.showNextButton=!1,this.lastCheckPointValid=!1,this.checkOutofServiceArea=!1):(this.checkOutofServiceArea=!0,this.showNextButton=!0,this.lastCheckPointValid=!1)}else this.showNextButton=!0,this.lastCheckPointValid=!0;this.updateCheckPoints(i,e,t,this.currenCheckpointInput-1)}UpdateAndCheckPickUpLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){var i;n.pickup_latitude=e,n.pickup_longitude=t;let o=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)o||(o=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.selectedPickupRegionData=e);!0===o?(n.showNextButton=!0,n.pickupRegionFound=!0,n.checkDropUpLocation(n.origin.is_pickUp)):(n.pickupRegionFound=o,n.showNextButton=!1),n.updateRegionPointValiation()}else n.showNextButton=!0,n.pickupRegionFound=!0;if(n.fixZoneDisableDropoff=!1,n.zoneData.from=null,n.zoneData.from_title=null,n.zoneData.from_obj=null,n.zoneData.from_ids=null,n.pickupRegionFound?(yield n.zoneUtilityService.findPickupZone(n.pickup_latitude,n.pickup_longitude,n.zoneResponse,n.zoneData,()=>n.getZonePrice(),()=>{},n.getZonePricingParams()),(null===(i=n.zoneData)||void 0===i?void 0:i.from_ids)?n.loadZoneConfigurationForPickup(String(n.zoneData.from_ids)):n.resetZoneBookingOptions()):n.resetZoneBookingOptions(),n.addZoneOtherCharges(),n.queuePikupFound=!1,n.queuePikupList.length>0)for(let e of n.queuePikupList)n.queuePikupFound=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.queuePikupData=n.queuePikupFound?e:null;n.queuePikupData?n.getQueuePickupLatLong(n.queuePikupData.pickup_stand_id):n.queuePikupStandList=[],1===n.onlineDriver&&!n.autoDispatch&&n.getOnlineDriver(),n.updateSameZoneTripRestriction()})()}setAutoDispatch(e){this.autoDispatch=e,this.autoDispatch?(this.addForm.get("driver").setValidators([]),this.addForm.get("driver").setValue(null)):(this.getOnlineDriver(),this.addForm.get("driver").setValidators([r.kI.required])),this.addForm.get("driver").updateV
1alueAndValidity()}setOnlineDriver(e){this.onlineDriver=e,this.addForm.controls.driver.reset(),this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getOnlineDriver(){if(this.onlineDriverArray=[],this.pickup_latitude&&this.pickup_longitude){let e={company_id:this.currentCompanyDetail.company_id,latitude:this.pickup_latitude,longitude:this.pickup_longitude,service_type:this.YELOWCAB_SERVICE_TYPE};"Y"==this.checkGenderEnable&&(e.gender=this.genderValue),this.taxiBookingService.getNearByOnlineDriverList(e).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=[],i=[];e.data.forEach(e=>{(null==e?void 0:e.driver_id)&&t.push(null==e?void 0:e.driver_id),(null==e?void 0:e.distance)&&(i[null==e?void 0:e.driver_id]=1===this.currentCompanyDetail.distanceUnit_s_key_value?(null==e?void 0:e.distance).toFixed(2):(.621371192*(null==e?void 0:e.distance)).toFixed(2))}),this.getUserDetails(t,i)}else this.onlineDriverArray=[]})}else this.toasterService.error("Enter Your Pickup Location")}getUserDetails(e,t){if((null==e?void 0:e.length)>0){const i=null==e?void 0:e.join(",");this.yelowBookingService.getUserDetails(i).subscribe(e=>{e.status&&(this.driverArray=null==e?void 0:e.data.map(e=>(e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} ${(null==e?void 0:e.dial_code)?"("+(null==e?void 0:e.dial_code):""} ${(null==e?void 0:e.phone_number)?(null==e?void 0:e.phone_number)+")":""} ) ${t[e.id]} ${this.currentCompanyDetail.distance_unit}`,e)))})}}getDriverList(e){if(2===this.onlineDriver||3==this.allocation_type){let t={company_id:this.currentCompanyDetail.company_id,is_active:1};e&&e.term?t.search=e.term:this.driverArray=[],"Y"==this.checkGenderEnable&&(t.gender=this.genderValue),this.yelowBookingService.getDriversList(t).subscribe(e=>{var t;this.loadingState=!1,e.success||e.status?(this.driverArray=null===(t=e.data)||void 0===t?void 0:t.list,this.driverArray.forEach(e=>{e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} (${null==e?void 0:e.dial_code} ${null==e?void 0:e.phone_number})`})):this.driverArray=[]})}}getZonePrice(){this.yelowCabService.getZoneprice({from_zone_id:this.zoneData.from,dropoff_type:2,is_active:1}).subscribe(e=>{e.status?(this.zonePriceData=e.data.list,this.fixZonePriceData=this.zonePriceData[0],this.zonePriceData.length>0?(this.fixZoneDisableDropoff=!0,$("#fixdestination").modal("show")):(this.fixZonePriceData=null,this.fixZoneDisableDropoff=!1)):(this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null)})}getQueuePickupLatLong(e){this.yelowBookingService.getPikupPointsById(e).subscribe(e=>{var t,i;if(1===e.status){if(this.queuePikupStandList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pickup_point,this.queuePikupStandList.length>0){let t=this.queuePikupStandList[0];this.pickUpStandForm.patchValue({pickup_location:t.address,pickup_latitude:t.latitude,pickup_longitude:t.longitude}),this.queueId=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.queue_id,this.pickup_longitude=t.longitude,this.pickup_latitude=t.latitude}}else this.queuePikupStandList=[]})}OnSearchCheckpoint(e){""!==e.trim()&&this.DriverKeyUp2.next(e)}removeRow(e){this.currenCheckpointInput=null;const t=this.addForm.get("checkpoints");this.selectedCheckpointsArray.pop({id:t.controls.length,latitude:null,longitude:null}),t.removeAt(e),this.checkPointsValidation(!0),this.updateCheckPointsRegion(),this.cd.detectChanges(),this.bindMarkerPoints(),this.selectedCheckpointsArray.length<1&&(this.updateDestiantionValidation(this.skip_destination),this.onInputChange(this.addForm.controls.destination))}updateDestiantionValidation(e){e?(this.addForm.controls.destination.setValidators(null),this.addForm.controls.destination.updateValueAndValidity()):(this.addForm.controls.destination.setValidators(r.kI.required),this.addForm.controls.destination.updateValueAndValidity())}addNewRow(){const e=this.addForm.get("checkpoints");"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?this.selectedPickupRegionData?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location"):this.pickup_latitude&&this.pickup_longitude?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location")}validateCheckPoint(e){e.valid&&(e.controls.length<=2?e.controls.length>0&&!e.at(e.controls.length-1).valid?this.toasterService.error("Your Previous checkpoints is invali
1d!"):(e.push(this.initRows()),this.cd.detectChanges(),this.selectedCheckpointsArray.push({id:e.controls.length,latitude:null,longitude:null})):this.toasterService.error("You can only add maximum three checkpoints!"))}initRows(){return new r.cw({value:new r.NI(null,r.kI.compose([r.kI.required])),lat:new r.NI(null),lng:new r.NI(null),pickupLacation:new r.NI(this.selectedPickupRegionData),dropofupLacation:new r.NI(this.selectedDropRegionData),zone_array:new r.NI(this.regionResponse),checkRegion:new r.NI(this.checkRegion),checkOnlyPickup:new r.NI(this.checkOnlyPickupConfig)},{validators:C.v.is_point})}OnSearchDestination(e){""!==e.trim()&&this.DriverKeyUp1.next(e)}updateCheckPoints(e,t,i,n){const o=this.addForm.get("checkpoints");for(var a=0;a<o.length;a++)a==n&&o.at(a).patchValue({value:e,lat:t,lng:i});this.updateCheckPointsRegion(),setTimeout(()=>{this.bindMarkerPoints()},200)}updateCheckPointsRegion(){let e=this.addForm.get("checkpoints").value.map(e=>({latitude:Number(e.lat),longitude:Number(e.lng)}));this.checkpointValidity={},e.forEach("Y"===this.checkRegion?(e,t)=>{let i=!1;for(let n of this.regionResponse){const t=(0,C.U)(n.geofence);if((0,Z.eD)(e.latitude,e.longitude,t)){i=!0;break}}this.checkpointValidity[t]=i}:(e,t)=>{this.checkpointValidity[t]=!0})}searchEventCheckpoint(e,t){this.submitFirstPart=!1,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?this.updateCheckPoints(e.full_text,e.latitude,e.longitude,t):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(i=>{i.status&&i.data.latitude&&i.data.longitude&&this.updateCheckPoints(e.full_text,i.data.latitude,i.data.longitude,t)})}openUserPickupLocationForm(){$("#selectUserPickupLocation").modal("show")}OnSearch(e){""!==e.trim()&&this.DriverKeyUp.next(e)}checkDropUpLocation(e){this.selectedPickupRegionData&&this.selectedDropRegionData&&(this.selectedDropRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id?(e===this.origin.is_drop&&(this.dropRegionFound="Y"==this.checkOnlyPickupConfig),e===this.origin.is_pickUp&&(this.pickupRegionFound="Y"==this.checkOnlyPickupConfig),this.showNextButton="Y"==this.checkOnlyPickupConfig):(e===this.origin.is_drop&&(this.dropRegionFound=!0),e===this.origin.is_pickUp&&(this.pickupRegionFound=!0),this.showNextButton=!0)),this.selectedCheckPointRegionData&&this.selectedDropRegionData&&this.selectedPickupRegionData&&this.checkPointsValidation()}checkPointsValidation(e=null){this.selectedPickupRegionData&&this.selectedCheckPointRegionData?this.selectedCheckPointRegionData&&this.selectedPickupRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):this.selectedCheckPointRegionData&&this.selectedDropRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedDropRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):(!this.selectedPickupRegionData||!this.selectedDropRegionData&&!1===this.skip_destination)&&(this.showNextButton=!1):this.showNextButton="Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig,e&&(this.showNextButton=this.selectedDropRegionData&&this.selectedPickupRegionData?this.selectedDropRegionData.company_region_id==this.selectedPickupRegionData.company_region_id:"Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig)}UpdateDestinationLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){n.destination_latitude=e,n.destination_longitude=t,Number(n.destination_latitude).toFixed(5),Number(n.destination_longitude).toFixed(5);let i=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)i||(i=(0,Z.eD)(n.destination_latitude.toFixed(5),n.destination_longitude.toFixed(5),(0,C.U)(e.geofence)),n.selectedDropRegionData=e);!0===i?(n.showNextButton=!0,n.checkDropUpLocation(n.origin.is_drop),n.updateRegionPointValiation()):"N"==n.checkOnlyPickupConfig?(n.dropRegionFound=!1,n.showNextButton=!1,n.checkOutofServiceArea=!1):(n.checkOutofServiceArea=!0,n.dropRegionFound=!0,n.showNextButton=!0)}else n.showNextButton=!0,n.dropRegionFound=!0;n.zoneData.to=null,n.zoneData.to_title=null,n.zoneData.to_obj=null,n.zoneData.to_ids=null,n.dropRegionFound&&(yield n.zoneUtilityService.findDropoffZone(n.destination_latitude,n.destination_longitude,n.zoneResponse,n.zoneData,()=>{},n.getZonePricingParams())),n.addZoneOtherCharges(),n.updateSameZoneTripRestriction()})()}updateRegionPointValiation(){const e=this.addForm.get("checkpoints");if(e.controls.length>
10)for(let t of e.controls)"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?(t.patchValue({pickupLacation:this.selectedPickupRegionData,dropofupLacation:this.selectedDropRegionData}),t.setValidators(C.v.is_point)):(t.setValidators([]),t.setValidators(null)),t.updateValueAndValidity()}addZoneOtherCharges(){let e=this.allOtherChargesArray.filter(e=>{var t,i;let n=null==e?void 0:e.zone_id;return null!==n&&(n===(null===(t=this.zoneData)||void 0===t?void 0:t.to)&&2==(null==e?void 0:e.zone_type)||n===(null===(i=this.zoneData)||void 0===i?void 0:i.from)&&1==(null==e?void 0:e.zone_type))});this.otherChargesArray=this.allOtherChargesArray.filter(e=>1==(null==e?void 0:e.charges_category)),this.otherChargesArray=[...this.otherChargesArray,...e],this.cd.detectChanges()}ManagezoneData(){this.yelowCabService.getZoneList().subscribe(e=>{e&&(this.zoneResponse=e.data.list)})}getUserLocations(e){this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[]}searchEventDestination(e){e?(this.clearDestination=!1,this.submitFirstPart=!1,this.onInputChange(this.addForm.controls.destination),this.showNextButton=!1,this.addForm.controls.destination.setValue(e.full_text),this.displayFlightNumber=!!e.full_text.toLowerCase().includes("airport")||!(!this.addForm.controls.pickup_location.value||!this.addForm.controls.pickup_location.value.toLowerCase().includes("airport")),this.addForm.controls.destination.updateValueAndValidity(),this.searchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.destination_latitude=e.latitude,this.destination_longitude=e.longitude,this.UpdateDestinationLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.destination_latitude=e.data.latitude,this.destination_longitude=e.data.longitude,this.UpdateDestinationLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.destination.setValue(null),this.addForm.controls.destination.updateValueAndValidity(),this.destination_latitude=null,this.destination_longitude=null,this.bindMarkerPoints(),this.clearDestination=!0,this.selectedVehicleObjName=null,this.selectedVehicleObj=null)}openUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("show")}closeUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("hide")}changeSelectedTab(e,t=!0){1==e?(this.driverType=[{type_id:1,type_name:"Online Driver"}],this.isSchedual_trip=0,this.resetRequestTimeToInitialNow()):(this.driverType=[{type_id:1,type_name:"Online Driver"},{type_id:2,type_name:"All Driver"}],this.isSchedual_trip=1),this.addForm.controls.ride_type.setValue(e),this.selectedTab=e,2===this.selectedTab&&(this.zoneConfigActive?this.applyRequestTimeMinDate():this.getSeduleConfige(!1)),this.updateRecurringValidations(e,this.addForm)}resetRequestTimeToInitialNow(){this.setMinTime();const e=new Date(this.trip_time);this.request_time=e,this.addForm.controls.request_time.setValue(e),this.addForm.controls.request_time.updateValueAndValidity(),this.addForm.controls.trip_time.setValue(e),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(e)),this.returnEnable&&this.initDefaultReturnDateTime()}updateRecurringValidations(e,t){if(3===e)t.get("recurring_time").setValidators([r.kI.required]),t.get("recurring_time").updateValueAndValidity(),t.get("end_date").setValidators([r.kI.required]),t.get("end_date").updateValueAndValidity();else{t.controls.recurring_time.clearValidators(),t.get("recurring_time").updateValueAndValidity(),t.controls.end_date.clearValidators(),t.get("end_date").updateValueAndValidity();try{t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}catch(i){t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}}}getSeduleConfige(e=!0){this.yelowBookingService.scheduleconFig({company_id:this.currentCompanyDetail.company_id},F.kh[this.YELOWCAB_SERVICE_TYPE].SCHEDULE_MODULE).subscribe(t=>
1{if(this.loadingState=!1,t.success||t.status){if(this.schedule_tripArray=t.data,this.schedule_tripArray.length>0){this.schedule_trip=!0;for(let e of this.schedule_tripArray)e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].TIMEOUT?this.addMinutes(Number(e.config_value),null):e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].MAX_TIME&&this.addMinutes(null,Number(e.config_value));e&&!this.zoneConfigActive&&("Y"==this.requestMode&&"Y"==this.requestModeSchedule?(this.rideType=[{type_id:1,type_name:"Now"},{type_id:2,type_name:"Later"}],this.setRideType(1)):"Y"==this.requestModeSchedule?(this.rideType=[{type_id:2,type_name:"Later"}],this.setRideType(2)):"Y"==this.requestMode&&(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1)))}else this.zoneConfigActive||(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1));this.zoneConfigActive||(this.allRideTypes=[...this.rideType]),(this.zoneCutOffMinutes||2===this.selectedTab)&&this.applyRequestTimeMinDate()}})}addMinutes(e=null,t=null){if(e&&(this.min_date=e,this.request_time=new Date,this.setMinTime(),this.timeFormatConfig.minDate=new Date(new Date(this.trip_time).setSeconds(0,0)),this.timeFormatConfig2.minDate=new Date(new Date(this.trip_time).setHours(0,0,0,0)),this.request_time=this.trip_time,this.addForm.controls.request_time.setValue(this.trip_time)),t){this.max_date=t;let e=new Date(L().add(this.max_date,"minutes").toString()).setHours(23,59,59,999);this.timeFormatConfig2.maxDate=new Date(e),this.timeFormatConfig.maxDate=new Date(e)}this.is_date=!0}setRideType(e){this.selectedTab=e,this.isSchedual_trip=1==e?0:1,this.addForm.controls.ride_type.setValue(e),this.addForm.controls.ride_type.updateValueAndValidity(),2===e&&this.applyRequestTimeMinDate()}onFilterChange(e,t){var i;const n=e&&"object"==typeof e?e.id:e;0==t?this.no_of_passenger=n:this.trip_luggage=n;const o=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.id;this.filterVehicleArray=this.vehicleArray.filter(e=>e.max_capacity>=this.no_of_passenger&&e.max_luggage_capacity>=this.trip_luggage);const a=this.filterVehicleArray.find(e=>(null==e?void 0:e.id)==o)||this.filterVehicleArray[0];if(!a)return this.selectedVehicleObj=null,void(this.selectedVehicleObjName=null);this.changeVehicle(a)}changeVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A;if(this.filterVehicleArray.forEach(t=>{t.id==e.id?(t.final_fare_amount=(null==t?void 0:t.capacity)<this.no_of_passenger?t.final_fare_amount-this.totalExtraPassengerCharge+t.pricing.extra_charge_per_passenger*(this.no_of_passenger-(null==t?void 0:t.capacity)):t.final_fare_amount-this.totalExtraPassengerCharge,t.final_fare_amount=(null==t?void 0:t.vehicle_luggage_capacity)<this.trip_luggage?t.final_fare_amount-this.totalExtraLuggageCharge+t.pricing.extra_charge_per_luggage*(this.trip_luggage-t.vehicle_luggage_capacity):t.final_fare_amount-this.totalExtraLuggageCharge,t.checked=!0):t.checked=!1}),this.selectedVehicleObjName=null,this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.zone_extra_charge=0,this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0,this.selectedVehicleObj=e,this.currentObject=e,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.selectedVehicleObj,this.zone_price_id=null===(n=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.zone_price_model)||void 0===n?void 0:n.zone_price_id,this.zoneData.zone_price_applied=null===(a=null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing)||void 0===a?void 0:a.zone_price_applied,this.startingFrom="Y"==(null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.zone_price_applied)?2==(null===(d=null===(u=null===(s=this.selectedVehicleObj)||void 0===s?void 0:s.pricing)||void 0===u?void 0:u.zone_price_model)||void 0===d?void 0:d.calculation_type):2===(null===(c=this.selectedVehicleObj.pricing)||void 0===c?void 0:c.calculation_type),this.finalFare=null===(h=this.selectedVehicleObj)||void 0===h?void 0:h.final_fare.amount,this.storeOldVehiclePrice=null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.final_fare.amount,this.taxAddition=null===(p=this.selectedVehicleObj)||void 0===p?void 0:p.final_fare.tax_amount,this.zone_extra_charge=(null===(_=null===(m=this.selectedVehicleObj)||void 0===m?void 0:m.final_fare)||void 0===_?void 0:_.zone_extra_charges)?null===(v=null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare)||void 0===v?void 0:v.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge,this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(this.bookingTypeKey)||(this.rentalPackages=null!==(x=null===(b=null===(y=this.selectedVehicleObj)||void 0===y?void 0:y.pricing)||void 0===b?void 0:b.slots)&&void 0!==x?x:[]),["package"].includes(this.bookingTypeKey)&&this.isPackageSlotAmountPricing(null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.pricing)){const e=null===(C=null===(Z=this.rentalPackages)||void 0===Z?void 0:Z.find(e=>{var t;return e.id==(null===(t=this.addForm.value)||void 0===t?void 0:t.packages)}))||void 0===C?void 0:C.slot_amount;if(e){let t=e-this.additionalDiscount;this.package_pricing=t,this.selectedVehicleObj.final_fare.amount=t,this.selectedVehicleObj.final_fare_amount=this.finalFare,this.finalFare=this.selectedVehicleObj.final_fare.amount+this.taxAddition+this.zone_extra_charge+this.calCulateOtherCharges(this.selectedVehicleObj)+this.totalExtraLuggageCharge+this.totalExtraPasse
1ngerCharge+this.extraCharge}}3!==(null===(T=null===(F=this.selectedVehicleObj)||void 0===F?void 0:F.pricing)||void 0===T?void 0:T.calculation_method)?(this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraPassengerCharge(null,!0),this.getExtraLuggageCharge(null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.vehicle_luggage_capacity,null,!0)):this.calculateReturnTrip(),this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?this.store_bike_distance:this.store_ride_distance,this.drawPath(2==this.selectedVehicleObj.vehicle_type_category?this.bike_path:this.trip_path),this.calCulateOtherCharges2()}calculateReturnTrip(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;this.returnEnable&&(this.returnTripObject=null===(t=null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.pricing)||void 0===t?void 0:t.return_trip_pricing,this.returnFinalFare=(null===(a=null===(o=null===(n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.pricing)||void 0===n?void 0:n.return_trip_pricing)||void 0===o?void 0:o.final_fare)||void 0===a?void 0:a.amount)+(null===(u=null===(s=null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.return_trip_pricing)||void 0===s?void 0:s.final_fare)||void 0===u?void 0:u.tax_amount),this.returnTripDiscount=null===(g=null===(h=null===(c=null===(d=this.selectedVehicleObj)||void 0===d?void 0:d.pricing)||void 0===c?void 0:c.return_trip_pricing)||void 0===h?void 0:h.final_fare)||void 0===g?void 0:g.return_trip_discount,this.totalFInalFare=this.finalFare+(this.returnFinalFare-this.returnTripDiscount)),this.totalFInalFare<0&&(this.totalFInalFare=0)}additionalDiscountChanged(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h;this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0;let g=0;e&&(g=this.totalExtraLuggageCharge+this.totalExtraPassengerCharge);const p=(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)+this.extraCharge+g;this.addForm.value.additional_discount?this.additionalDiscount!==this.addForm.value.additional_discount?(this.finalFare=0,this.finalFare=(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)+this.additionalDiscount,this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(s=null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.final_fare)||void 0===s?void 0:s.amount)-this.additionalDiscount+this.extraCharge+g):(this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(d=null===(u=this.selectedVehicleObj)||void 0===u?void 0:u.final_fare)||void 0===d?void 0:d.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.final_fare)||void 0===h?void 0:h.amount)-this.additionalDiscount+this.extraCharge+g):(this.finalFare=p,this.additionalDiscount=0),this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge+this.tripOtherChargePrice,this.finalFare<0&&(this.finalFare=0),this.calculateReturnTrip()}extraChargeChanged(e=!1){var t,i,n,o;this.finalFare=this.finalFare-this.extraCharge,this.addForm.value.extra_charge?this.extraCharge!==this.addForm.value.extra_charge?(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):this.extraCharge=0,this.finalFare=this.finalFare,e&&this.updateCharge()}updateCharge(){this.totalExtraLuggageCharge&&(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.finalFare=this.finalFare+this.totalExtraLuggageCharge),this.totalExtraPasse
1ngerCharge&&(this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.finalFare=this.finalFare+this.totalExtraPassengerCharge),this.otherChargePrice&&(this.finalFare=this.finalFare-this.otherChargePrice,this.finalFare=this.finalFare+this.otherChargePrice),this.tripOtherChargePrice&&(this.finalFare=this.finalFare-this.tripOtherChargePrice,this.finalFare=this.finalFare+this.tripOtherChargePrice)}getExtraPassengerCharge(e=null,t){var i,n,o,a,r,l;if((null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.capacity)<this.no_of_passenger&&e){this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;let e=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else if(e)this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;else if((null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.capacity)<this.no_of_passenger&&!e&&t){this.totalExtraPassengerCharge=0;let e=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else this.totalExtraPassengerCharge=0}getExtraLuggageCharge(e,t=null,i){e<this.trip_luggage&&t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0):e<this.trip_luggage&&!t&&i?(this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):this.totalExtraLuggageCharge=0}getWayPoints(){var e,t,i=[];const n=this.addForm.get("checkpoints").controls;for(var o=0;o<n.length;o++)n[o].get("value"),i.push({address:n[o].get("value").value,latitude:null===(e=this.selectedCheckpointsArray[o].latitude)||void 0===e?void 0:e.toFixed(6),longitude:null===(t=this.selectedCheckpointsArray[o].longitude)||void 0===t?void 0:t.toFixed(6)});return i}updateQueryParam(){var e,t,i,n,o,a,r,l,s,u,d,c,h=this.getWayPoints();this.queryParam.pickup_location=this.addForm.get("pickup_location").value,this.queryParam.service_type=this.YELOWCAB_SERVICE_TYPE;try{this.queryParam.pickup_latitude=null===(e=this.pickup_latitude)||void 0===e?void 0:e.toFixed(6)}catch(g){this.queryParam.pickup_latitude=this.pickup_latitude}try{this.queryParam.pickup_longitude=null===(t=this.pickup_longitude)||void 0===t?void 0:t.toFixed(6)}catch(g){this.queryParam.pickup_longitude=this.pickup_longitude}if(this.queryParam.dropoff_location=this.addForm.get("destination").value,this.queryParam.dropoff_latitude=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),this.queryParam.dropoff_longitude=null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),this.isSchedual_trip&&(this.queryParam.request_time=this.combinedTimestamp()),h.length>0&&(this.queryParam.way_points=JSON.stringify(h)),this.returnEnable){this.queryParam.is_return_trip=1,this.queryParam.return_request_time=new Date(this.addForm.value.return_time).getTime()/1e3,this.queryParam.return_pickup_location=null===(o=this.addForm.get("return_pickup_location"))||void 0===o?void 0:o.value;try{this.queryParam.return_pickup_latitude=null===(a=this.return_pickup_latitude)||void 0===a?void 0:a.toFixed(6)}catch(g){this.queryParam.return_pickup_latitude=this.return_pickup_latitude}try{this.queryParam.return_pickup_longitude=null===(r=this.return_pickup_longitude)||void 0===r?void 0:r.toFixed(6)}catch(g){this.queryParam.return_pickup_longitude=this.return_pickup_longitude}this.queryParam.return_dropoff_location=null===(l=this.addForm.get("return_destination"))||void 0===l?void 0:l.value,this.queryParam.return_dropoff_latitude=null===(s=this.return_destination_latitude)||void 0===s?void 0:s.toFixed(6),this.queryParam.return_dropoff_longitude=this.return_destination_longitude}else this.queryParam.is_return_trip=0,this.queryParam.return_from_zone_id=null,this.queryParam.return_to_zone_id=null;this.queryParam.no_of_passenger=this.no_of_passenger,this.queryParam.trip_luggage=this.trip_luggage,this.queryParam.from_zone_id=this.zoneData&&this.zoneData.from?this.zoneData.from:null,this.queryParam.to_zone_id=this.zoneData&&this.zoneData.to?this.zoneData.to:null,this.fixZoneDisableDropoff&&(this.queryParam.to_zone_id=-1),this.returnEnable&&(this.queryParam.return_from_zone_id=(null===(u=this.returnzoneData)||void 0===u?void 0:u.from)?this.returnzoneData.from:null,this.queryParam.return_to_zone_id=(null===(d=this.returnzoneData)||void 0===d?void 0:d.to)?this.returnzoneData.to:null),(null===(c=this.addForm.value)||void 0===c?void 0:c.booking_type_id)&&(this.queryParam.booking_type_id=this.addForm.value.booking_type_id)}changeReturn(e){var t=this;return(0,y.Z)(function*(){t.pickup_latitude&&t.pickup_longitude&&t.destination_latitude&&t.destination_longitude?(t.returnEnable=e.target.checked,e.target.checked?(t.initDefaultReturnDateTime(),t.addForm.get("return_time").setValidators([r.kI.required]),t.addForm.get("return_time").updateV
1alueAndValidity(),t.applyReturnLocationSwapToForm(),yield t.resolveReturnZonesAfterLocationSwap(),t.calculateReturnTrip(),t.refreshReturnVehiclePricing()):(t.addForm.get("return_date").setValue(null),t.addForm.get("return_trip_time").setValue(null),t.addForm.get("return_time").setValue(null),t.addForm.get("return_time").clearValidators(),t.addForm.get("return_time").updateValueAndValidity(),t.return_date=null,t.return_trip_time=null,t.return_time=null,t.selectedDate=null,t.clearReturnLocations(),t.calculateReturnTrip())):(t.toasterService.error("Please Select Pickup & Destination Location First!"),e.target.checked=!1)})()}applyReturnLocationSwapToForm(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;const p=this.searchTextDestionation||(null===(e=this.addForm.get("destination"))||void 0===e?void 0:e.value),m=this.searchText||(null===(t=this.addForm.get("pickup_location"))||void 0===t?void 0:t.value);this.addForm.controls.return_pickup_location.setValue(p),this.addForm.controls.return_pickup_latitude.setValue(null!==(o=null===(n=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed)||void 0===n?void 0:n.call(i,6))&&void 0!==o?o:this.destination_latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(l=null===(r=null===(a=this.destination_longitude)||void 0===a?void 0:a.toFixed)||void 0===r?void 0:r.call(a,6))&&void 0!==l?l:this.destination_longitude),this.addForm.controls.return_destination.setValue(m),this.addForm.controls.return_dropoff_latitude.setValue(null!==(d=null===(u=null===(s=this.pickup_latitude)||void 0===s?void 0:s.toFixed)||void 0===u?void 0:u.call(s,6))&&void 0!==d?d:this.pickup_latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(g=null===(h=null===(c=this.pickup_longitude)||void 0===c?void 0:c.toFixed)||void 0===h?void 0:h.call(c,6))&&void 0!==g?g:this.pickup_longitude),this.returnsearchText=p,this.returnsearchTextDestionation=m,this.return_pickup_latitude=this.destination_latitude,this.return_pickup_longitude=this.destination_longitude,this.return_destination_latitude=this.pickup_latitude,this.return_destination_longitude=this.pickup_longitude,this.returnpickupRegionFound=this.dropRegionFound,this.returndropRegionFound=this.pickupRegionFound}resolveReturnZonesAfterLocationSwap(){var e=this;return(0,y.Z)(function*(){e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.returndropRegionFound&&e.return_destination_latitude&&e.return_destination_longitude&&(yield e.updateReturnDestinationZone()),e.returnpickupRegionFound&&e.return_pickup_latitude&&e.return_pickup_longitude&&(yield e.updateReturnPickupZone())})()}clearReturnLocations(){this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.addForm.controls.return_pickup_location.setValue(null),this.addForm.controls.return_pickup_latitude.setValue(null),this.addForm.controls.return_pickup_longitude.setValue(null),this.addForm.controls.return_destination.setValue(null),this.addForm.controls.return_dropoff_latitude.setValue(null),this.addForm.controls.return_dropoff_longitude.setValue(null),this.returnotherDetails=null,this.return_trip_path=null,this.return_bike_path=null,this.returnzoneData.from=null,this.returnzoneData.to=null,this.returnzoneData.from_title=null,this.returnzoneData.to_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.to_obj=null,this.returnzoneData.from_ids=null,this.returnzoneData.to_ids=null}OnSearchReturn(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturn.next(e)}OnSearchReturnDestination(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturnDest.next(e)}returnsearchEvent(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_pickup_location.setValue(e.full_text),this.returnsearchText=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_pickup_latitude=e.latitude,this.return_pickup_longitude=e.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnPickupRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_pickup_latitude=e.data.latitude,this.return_pickup_longitude=e.data.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnPickupRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_pickup_location.setValue(null),this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.returnzoneData.from=null,this.returnzoneData.from_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.from_ids=null)}returnsearchEventDestination(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_destination.setValue(e.full_text),this.returnsearchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_destination_latitude=e.latitude,this.return_destination_longitude=e.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnDropoffRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_destination_latitude=e.data.latitude,this.return_destination_longitude=e.data.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnDropoffRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_destination.setValue(null),this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnzoneData.to=null,this.returnzoneData.to_title=null,this.returnzoneData.to_obj=null,this.returnzoneData.to_ids=null)}
1validateReturnPickupRegion(){if("Y"!==this.checkRegion)this.returnpickupRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_pickup_latitude,this.return_pickup_longitude,(0,C.U)(t.geofence)));this.returnpickupRegionFound=e}this.updateReturnPickupZone()}validateReturnDropoffRegion(){if("Y"!==this.checkRegion)this.returndropRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_destination_latitude,this.return_destination_longitude,(0,C.U)(t.geofence)));this.returndropRegionFound=e}this.updateReturnDestinationZone()}updateReturnPickupZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.return_pickup_latitude&&e.return_pickup_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returnpickupRegionFound||(yield e.zoneUtilityService.findPickupZone(e.return_pickup_latitude,e.return_pickup_longitude,e.zoneResponse,e.returnzoneData,()=>{},()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}updateReturnDestinationZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.return_destination_latitude&&e.return_destination_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returndropRegionFound||(yield e.zoneUtilityService.findDropoffZone(e.return_destination_latitude,e.return_destination_longitude,e.zoneResponse,e.returnzoneData,()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}refreshReturnVehiclePricing(){!this.returnEnable||!this.return_pickup_latitude||!this.return_destination_latitude||(this.updateQueryParam(),this.vehicleTypeApi())}buildReturnBookingObject(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;const _=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.return_trip_pricing,f=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.vehicle_type_category,v=this.returnotherDetails||this.otherDetails,y=2==f?null==v?void 0:v.bike_ride_distance:null==v?void 0:v.ride_distance,b=2==f?null==v?void 0:v.bike_ride_time:null==v?void 0:v.ride_time,x=Object.assign(Object.assign(Object.assign({},null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing),(null==_?void 0:_.pricing)||{}),{return_trip_pricing:_,final_fare:null==_?void 0:_.final_fare});(null===(a=null==_?void 0:_.surge_price)||void 0===a?void 0:a.surgeApplied)&&(x.surge_multiplier=_.surge_price.multiplier,x.surge_flat_amount=_.surge_price.flat_price),x.driver_earning=(this.returnFinalFare||0)-((null===(r=null==_?void 0:_.final_fare)||void 0===r?void 0:r.tax_amount)||0)-(this.walletBalance<0?Math.abs(this.walletBalance):0);const k={pickup_location:null===(l=this.addForm.get("return_pickup_location"))||void 0===l?void 0:l.value,pickup_latitude:Number(this.return_pickup_latitude),pickup_longitude:Number(this.return_pickup_longitude),dropoff_location:null===(s=this.addForm.get("return_destination"))||void 0===s?void 0:s.value,dropoff_latitude:Number(this.return_destination_latitude),dropoff_longitude:Number(this.return_destination_longitude),booking_distance:y,booking_duration:b,calculation_method:null!==(d=null===(u=null==_?void 0:_.pricing)||void 0===u?void 0:u.calculation_method)&&void 0!==d?d:null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.pricing)||void 0===h?void 0:h.calculation_method,fare_details:x,booking_properties:e.booking_properties,flight_info:e.flight_info,booking_amount:Number((this.returnFinalFare-this.returnTripDiscount).toFixed(2)),driver_earning:x.driver_earning,booking_request_time:Number(new Date(this.addForm.value.return_time).getTime()/1e3),is_return_booking:1,agent_id:this.agent_id||null,vehicle_type_id:null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.id,payment_mode:e.payment_mode,payment_mode_id:e.payment_mode_id,payment_status:e.payment_status,no_of_passenger:e.no_of_passenger,way_points:[],payment_type:e.payment_type,booking_type_id:e.booking_type_id,booster_seat:e.booster_seat,child_seat:e.child_seat,gender:e.gender,user_id:e.user_id,is_fixed_price:0};return(this.return_trip_path||this.return_bike_path)&&(k.dispatch_path=2==f?this.return_bike_path:this.return_trip_path),(null===(p=this.returnzoneData)||void 0===p?void 0:p.from)&&(k.return_pickup_zone_id=String(this.returnzoneData.from)),(null===(m=this.returnzoneData)||void 0===m?void 0:m.to)&&(k.return_dropoff_zone_id=String(this.returnzoneData.to)),k.fare_details.final_fare=null==_?void 0:_.final_fare,k}clearVehicleSelectionForSameZoneRestriction(){var e;const t=this;t.vehicleArray=[],t.filterVehicleArray=[],"vehicleTypeArray"in t&&(t.vehicleTypeArray=[]),t.selectedVehicleObj=null,"
1selectedVehicleObjName"in t&&(t.selectedVehicleObjName=null),"rentalPackages"in t&&(t.rentalPackages=[]),"trip_path"in t&&(t.trip_path=null),"bike_path"in t&&(t.bike_path=null),"return_trip_path"in t&&(t.return_trip_path=null),"return_bike_path"in t&&(t.return_bike_path=null),"otherDetails"in t&&(t.otherDetails=null),"returnotherDetails"in t&&(t.returnotherDetails=null),"finalFare"in t&&(t.finalFare=0),"returnFinalFare"in t&&(t.returnFinalFare=0),(null===(e=t.polyline)||void 0===e?void 0:e.setMap)&&(t.polyline.setMap(null),t.polyline=null)}updateSameZoneTripRestriction(){const e=(0,V.b)(this.zoneResponse,this.pickup_latitude,this.pickup_longitude,this.destination_latitude,this.destination_longitude),t=!!e,i=t&&!this.sameZoneTripRestricted;return this.sameZoneTripRestricted=t,t&&(this.clearVehicleSelectionForSameZoneRestriction(),i&&this.toasterService.error(`Trips within ${(null==e?void 0:e.title)||"this zone"} are not allowed`)),t}vehicleTypeApi(){this.updateSameZoneTripRestriction()?this.loadingState=!1:(this.loadingState=!0,this.taxAddition=0,this.zone_extra_charge=0,this.returnTripDiscount=0,this.finalFare=0,this.returnFinalFare=0,this.queryParam.out_of_service_area=this.checkOutofServiceArea?1:null,this.queryParam.vehicle_type_id=null,this.updateQueryParam(),this.disableBtn=!1,this.taxiBookingService.getVehicleList(this.queryParam).subscribe(e=>{var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w,q,D,O,L,M,V,S,E,U,N,I,j,R,z,J,B,Y;this.loadingState=!1,e.success||e.status?(this.store_ride_distance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.ride_distance,this.store_bike_distance=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.bike_ride_distance,console.log(this.agentLogin,this.agentMinDistance,this.store_ride_distance),this.agentLogin&&this.agentMinDistance>this.store_ride_distance&&(this.disableBtn=!0,this.toasterService.error((null===(n=this.currentLanguage)||void 0===n?void 0:n.min_distance_error)+" "+this.agentMinDistance+" "+((null===(o=this.currentCompanyDetail)||void 0===o?void 0:o.distance_unit)?"Per "+(null===(a=this.currentCompanyDetail)||void 0===a?void 0:a.distance_unit):"Per Km"))),(null===(r=e.data)||void 0===r?void 0:r.cab_type_list.length)>0?(this.vehicleArray=null===(l=e.data)||void 0===l?void 0:l.cab_type_list.filter(e=>e.hasOwnProperty("pricing")),this.trip_path=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.path,this.bike_path=null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.bike_path,this.otherDetails={surge_price:e.data.surge_price,ride_time:e.data.ride_time,ride_distance:e.data.ride_distance,tax_list:e.data.tax_list,bike_ride_distance:null===(d=null==e?void 0:e.data)||void 0===d?void 0:d.bike_ride_distance,bike_ride_time:null===(c=null==e?void 0:e.data)||void 0===c?void 0:c.bike_ride_time},this.returnEnable&&(null===(h=e.data)||void 0===h?void 0:h.return_response_data)&&(this.returnotherDetails={surge_price:null===(g=e.data.return_response_data)||void 0===g?void 0:g.surge_price,ride_time:null===(p=e.data.return_response_data)||void 0===p?void 0:p.ride_time,ride_distance:null===(m=e.data.return_response_data)||void 0===m?void 0:m.ride_distance,tax_list:null===(_=e.data.return_response_data)||void 0===_?void 0:_.tax_list,bike_ride_distance:null===(f=e.data.return_response_data)||void 0===f?void 0:f.bike_ride_distance,bike_ride_time:null===(v=e.data.return_response_data)||void 0===v?void 0:v.bike_ride_time},this.return_trip_path=null===(y=e.data.return_response_data)||void 0===y?void 0:y.path,this.return_bike_path=null===(b=e.data.return_response_data)||void 0===b?void 0:b.bike_path),this.vehicleTypeArray.length>0?(this.max_luggage_capacity_filter=0,this.max_capacity_filter=0,this.vehicleArray=this.vehicleArray.map(e=>{e.isCollapsed=!1,this.max_capacity_filter<e.max_capacity&&(this.max_capacity_filter=e.max_capacity),this.max_luggage_capacity_filter<e.max_luggage_capacity&&(this.max_luggage_capacity_filter=e.max_luggage_capacity);const t=this.vehicleTypeArray.find(t=>t.vehicle_type_id==e.id);if(t)return Object.assign(Object.assign({},e),{title:t.vehicle_type_title,vehicle_image:t.vehicle_type_image,max_luggage_c
1apacity:t.max_luggage_capacity,vehicle_type_priority:t.vehicle_type_priority})}),this.vehicleArray.forEach(e=>{var t,i,n,o;e&&(e.final_fare_amount=(null===(t=null==e?void 0:e.final_fare)||void 0===t?void 0:t.amount)+(null===(i=null==e?void 0:e.final_fare)||void 0===i?void 0:i.tax_amount)+this.calCulateOtherCharges(e)+((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.zone_extra_charges)?null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.zone_extra_charges:0))}),this.vehicleArray.sort((e,t)=>parseInt(e.vehicle_type_priority)-parseInt(t.vehicle_type_priority)),this.vehicleArray[0].checked=!0,this.selectedVehicleObj=this.vehicleArray[0],this.storeOldVehiclePrice=this.selectedVehicleObj.final_fare.amount,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.zone_price_id=null===(Z=null===(k=null===(x=this.selectedVehicleObj)||void 0===x?void 0:x.pricing)||void 0===k?void 0:k.zone_price_model)||void 0===Z?void 0:Z.zone_price_id,this.zoneData.zone_price_applied=null===(F=null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.pricing)||void 0===F?void 0:F.zone_price_applied,this.finalFare=null===(T=this.selectedVehicleObj)||void 0===T?void 0:T.final_fare.amount,this.taxAddition=null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.final_fare.tax_amount,this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?null===(P=null==e?void 0:e.data)||void 0===P?void 0:P.bike_ride_distance:null===(w=null==e?void 0:e.data)||void 0===w?void 0:w.ride_distance,this.calCulateOtherCharges2(),this.drawPath(2==this.selectedVehicleObj.vehicle_type_category?this.bike_path:this.trip_path),this.updateMarkersDraggableState(),this.startingFrom="Y"==(null===(D=null===(q=this.vehicleArray[0])||void 0===q?void 0:q.pricing)||void 0===D?void 0:D.zone_price_applied)?2==(null===(M=null===(L=null===(O=this.vehicleArray[0])||void 0===O?void 0:O.pricing)||void 0===L?void 0:L.zone_price_model)||void 0===M?void 0:M.calculation_type):2===(null===(V=this.vehicleArray[0].pricing)||void 0===V?void 0:V.calculation_type),this.finalFare=null===(S=this.selectedVehicleObj)||void 0===S?void 0:S.final_fare.amount,this.taxAddition=null===(E=this.selectedVehicleObj)||void 0===E?void 0:E.final_fare.tax_amount):(this.selectedVehicleObj=null,this.selectedVehicleObjName=null),this.zone_extra_charge=(null===(N=null===(U=this.selectedVehicleObj)||void 0===U?void 0:U.final_fare)||void 0===N?void 0:N.zone_extra_charges)?null===(j=null===(I=this.selectedVehicleObj)||void 0===I?void 0:I.final_fare)||void 0===j?void 0:j.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge):this.vehicleArray=[],this.filterVehicleArray=this.vehicleArray,(null===(R=this.filterVehicleArray)||void 0===R?void 0:R.length)&&this.changeVehicle(this.filterVehicleArray.find(e=>null==e?void 0:e.checked)||this.filterVehicleArray[0]),this.selectedVehicleObj&&(this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(this.bookingTypeKey)||(this.rentalPackages=null!==(B=null===(J=null===(z=this.selectedVehicleObj)||void 0===z?void 0:z.pricing)||void 0===J?void 0:J.slots)&&void 0!==B?B:[])),this.getMaxLuggagePassengerCapacity(),this.getExtraPassengerCharge(null,null),this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraLuggageCharge(null===(Y=this.selectedVehicleObj)||void 0===Y?void 0:Y.vehicle_luggage_capacity,null,null),this.returnEnable&&this.calculateReturnTrip(),this.displayThirdForm&&this.refreshMapViewportForSheet(280)):this.vehicleArray=[]}))}changeQueuePickup(e){this.pickUpStandForm.patchValue({pickup_location:e.address,pickup_latitude:e.latitude,pickup_longitude:e.longitude}),this.pickup_longitude=Number(e.longitude),this.pickup_latitude=Number(e.latitude),this.addForm.patchValue({pickup_location:e.address})}fixZone(e){this.fixZonePriceData=e}submitZonePricing(){this.zoneData.to=-1,this.searchTextDestionation=this.fixZonePriceData.dropoff_location,this.addForm.patchValue({destination:this.fixZonePriceData.dropoff_location}),this.UpdateDestinationLocation(this.fixZonePriceData.dropoff_latitude,this.fixZonePriceData.dropoff_longitude),$("#fixdestination").modal("hide")}
1getZoneDetail(e,t){this.yelowBookingService.getPriceZoneById(e).subscribe(e=>{var i;e.status&&(t.zone_price=null===(i=e.data)||void 0===i?void 0:i.title)})}closeFixDestinationPopup(){this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null,this.pickup_latitude=null,this.pickup_longitude=null,this.zoneData.to=null,this.addForm.patchValue({destination:null,pickup_location:null}),$("#ixdestination").modal("hide")}pickUpStandFormSubmit(){this.selectQueuePickup=!0,$("#QueuePikupstand").modal("hide")}submitFirstForm(e,t){var i,n,o,a,r,l,s,u,d,c;if(!this.updateSameZoneTripRestriction()){if(this.returnEnable){this.syncReturnDateTime();const e=null===(i=this.addForm.get("request_time"))||void 0===i?void 0:i.value,t=null===(n=this.addForm.get("trip_time"))||void 0===n?void 0:n.value,s=new Date("string"==typeof e?e:(null===(o=null==e?void 0:e.toISOString)||void 0===o?void 0:o.call(e))||e),u=new Date("string"==typeof t?t:(null===(a=null==t?void 0:t.toISOString)||void 0===a?void 0:a.call(t))||t),d=new Date(s.getFullYear(),s.getMonth(),s.getDate(),u.getHours(),u.getMinutes(),u.getSeconds());if(new Date(null===(l=null===(r=this.addForm)||void 0===r?void 0:r.value)||void 0===l?void 0:l.return_time)<d)return void this.toasterService.error("Return time should be greater than request time")}if(this.queuePikupStandList.length>0&&!this.fixZoneDisableDropoff&&this.isFirstPart)this.selectQueuePickup=!1,$("#QueuePikupstand").modal("show");else if(this.isFirstPart&&(this.formSubmited=!0,this.submitFirstPart=!0,this.generateErrors(e),this.pickup_latitude&&this.pickup_longitude)){const t=null===(s=this.addForm.get("request_time"))||void 0===s?void 0:s.value,i=null===(u=this.addForm.get("trip_time"))||void 0===u?void 0:u.value,n=new Date("string"==typeof t?t:(null===(d=null==t?void 0:t.toISOString)||void 0===d?void 0:d.call(t))||t),o=new Date("string"==typeof i?i:(null===(c=null==i?void 0:i.toISOString)||void 0===c?void 0:c.call(i))||i),a=new Date(n.getFullYear(),n.getMonth(),n.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()),r=new Date;r.setHours(0,0,0,0);let l=new Date(r.getTime()+6e4*this.max_date);if(l.setHours(0,0,0,0),n.setHours(0,0,0,0),2==this.selectedTab){if(!this.validateRequestTimeCutOff(a))return;if(n<r)return void this.toasterService.error("Please select a minimum date: today");if(n>l)return void this.toasterService.error(`Trip date must be between today and the next ${this.max_date/1440} days.`);if(n.getTime()===r.getTime()&&a.getTime()<(new Date).getTime())return void this.toasterService.error("Trip time must be greater than current time.");e.valid&&(this.bindMarkerPoints(),this.getproperties(e))}else e.valid&&(this.bindMarkerPoints(),this.getproperties(e))}this.firstFormNextButtonClick=!0}}submitSecondForm(e){this.formSubmited=!0,this.isDocumentUploading?this.toasterService.error("Please wait for document upload to complete"):(this.generateErrors(this.addForm),e.valid&&(this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayFirstForm=!1,this.updateMarkersDraggableState(),this.refreshMapViewportForSheet(),this.vehicleTypeApi()))}getproperties(e){var t,i,n,o,a,r,l,s;if((null===(t=null==this?void 0:this.zoneData)||void 0===t?void 0:t.from_obj)&&this.zoneData.from_obj.property_list||(null===(i=this.zoneData)||void 0===i?void 0:i.to_obj)&&this.zoneData.to_obj.property_list||this.tripPropertiesIds){this.zoneIds=[],this.zonePropertiesIds=[],(null===(o=null===(n=this.zoneData)||void 0===n?void 0:n.from_obj)||void 0===o?void 0:o.property_list)&&(this.zonePropertiesIds=this.zonePropertiesIds.concat(this.zoneData.from_obj.property_list.split(","))),(null===(r=null===(a=this.zoneData)||void 0===a?void 0:a.to_obj)||void 0===r?void 0:r.property_list)&&this.zoneData.to_obj.property_list.split(",").forEach(e=>{var t,i;(null===(t=this.zoneData)||void 0===t?void 0:t.from)==(null===(i=this.zoneData)||void 0===i?void 0:i.to)?this.zonePropertiesIds.push(e):this.zonePropertiesIds.includes(e)?this.zoneIds.push(e):this.zonePropertiesIds.push(e)});let t=this.resetPropertyControl();if(2!=(null===(l=this.zoneData.from_obj)||void 0===l?void 0:l.zone_type)&&1!=(null===(s=this.zoneData.to_obj)||void 0===s?void 0:s.zone_type)||(this.zonePropertiesIds=[]),this.zonePropertiesIds.length>0||this.zoneIds.length>0||this.tripPropertiesIds.length){let i=[];this.zonePropertiesIds.length>0&&(i=i.concat(this.zonePropertiesIds)),this.zoneIds.length>0&&(i=i.concat(this.zoneIds)),this.tripPropertiesIds.length&&(i=i.concat(this.tripPropertiesIds)),this.getExtraFields(t,i.join(","),e)}else this.nevigateToDraw(e)}else this.bindMarkerPoints()}nevigateToDraw(e){this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThird
1Form=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,this.updateMarkersDraggableState(),this.refreshMapViewportForSheet()}getExtraFields(e,t,i){const n={company_id:this.company_id,property_type_list:t,is_active:1,user_type:"0,3"};this.loadingState=!0,this.yelowBookingService.getExtraFields(n).subscribe(t=>{if(t.status&&t.data.length){t.data.sort((e,t)=>t.is_mandatory-e.is_mandatory),t.data;const i=["booster_seat","child_seat","flight_number"];t.data.forEach(t=>{(this.booking_type_id==t.category_id||null==t.category_id)&&(i.includes(null==t?void 0:t.field_key)||e.push(this.propertyRow(t)))}),0==e.length?(this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,this.refreshMapViewportForSheet(),["hourly","package"].includes(this.bookingTypeKey)&&this.validationForRental()):(this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1),this.loadingState=!1}else this.nevigateToDraw(i)})}resetPropertyControl(){let e=this.addForm.get("properties"),t=e.length;for(let i=0;i<t;i++)e.removeAt(0);return this.documentFileNames={},this.documentUploadLoading={},this.isDocumentUploading=!1,e}getAllTripProperties(){this.yelowBookingService.getExtraFields({company_id:this.company_id,property_type:2,is_active:1,service_type:this.YELOWCAB_SERVICE_TYPE,user_type:"0,3"}).subscribe(e=>{var t;e.status&&(null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>{var t;e.company_extra_field_id&&(null===(t=this.tripPropertiesIds)||void 0===t||t.push(e.company_extra_field_id))}))})}propertyRow(e){var t;let i=[];return(null===(t=null==e?void 0:e.config_json)||void 0===t?void 0:t.length)>0&&(null==e||e.config_json.forEach(e=>{i.push({label:e.title,value:e.title})})),new r.cw({label:new r.NI(e.field_title),value:new r.NI(5==e.field_type?0:null,r.kI.compose(e.is_mandatory?[r.kI.required]:[])),is_mandatory:new r.NI(e.is_mandatory),field_type:new r.NI(e.field_type),options:new r.NI(i),field_description:new r.NI(e.field_description),id:new r.NI(e.company_extra_field_id),file_name:new r.NI(null)})}updateDocumentUploadingState(){this.isDocumentUploading=Object.values(this.documentUploadLoading).some(e=>e)}documentFileChangeEvent(e,t){var i,n,o;const a=null===(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.files)||void 0===n?void 0:n[0];if(!a)return;if(a.size>this.DOCUMENT_MAX_FILE_SIZE)return swal.fire("Invalid File Size!","Please upload a file less than 21MB","error"),void this.clearDocumentInput(e);const r=this.addForm.get("properties"),l=a.name;null===(o=r.at(t).get("file_name"))||void 0===o||o.setValue(l),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l}),this.documentUploadLoading[t]=!0,this.updateDocumentUploadingState();const s=new FormData;s.append("file",a),this.authService.uploadImageGetUrl(s).subscribe(i=>{var n,o,a,s,u,d,c;if(this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),(null==i?void 0:i.status)&&(null==i?void 0:i.data)){const e="string"==typeof i.data?i.data:(null===(n=i.data)||void 0===n?void 0:n.url)||(null===(o=i.data)||void 0===o?void 0:o.file_url)||(null===(a=i.data)||void 0===a?void 0:a.image)||i.data;null===(s=r.at(t).get("value"))||void 0===s||s.setValue(e),null===(u=r.at(t).get("file_name"))||void 0===u||u.setValue(l),null===(d=r.at(t).get("value"))||void 0===d||d.markAsDirty(),null===(c=r.at(t).get("value"))||void 0===c||c.updateValueAndValidity(),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l})}else this.toasterService.error((null==i?void 0:i.message)||"File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)},()=>{this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),this.toasterService.error("File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)})}removeDocumentFile(e,t){this.clearDocumentValue(e),t&&(t.value="")}clearDocumentValue(e){var t,i,n,o,a,r;const l=this.addForm.get("properties");null===(i=null===(t=l.at(e))||void 0===t?void 0:t.get("value"))||void 0===i||i.setValue(null),null===(o=null===(n=l.at(e))||void 0===n?void 0:n.get("file_name"))||void 0===o||o.setValue(null),null===(r=null===(a=l.at(e))||void 0===a?void 0:a.get("value"))||void 0===r||r.updateValueAndValidity();const s=Object.assign({},this.documentFileNames);delete s[e],this.documentFileNames=s}clearDocumentInput(e){(null==e?void 0:e.target)?e.target.value="":e&&(e.value="")}mapBookingProperty(e){const t={label:e.label,value:e.field_type===this.DATE_FIELD&&(null==e?void 0:e.value)?new Date(null==e?void 0:e.value[0]).getTime():e.value,field_type:e.field_type,id:e.id};return(null==e?void 0:e.field_type)===this.DOCUMENT_FIELD&&(t.file_name=e.file_name||""),t}toggleCollapse(e,t){var i,n;t&&(t.preventDefault(),t.stopPropagation());const o=this.filterVehicleArray.find(t=>(null==t?void 0:t.id)==(null==e?void 0:e.id));if(!o)return;const a=!o.isCollapsed;
1(this.filterVehicleArray||[]).forEach(e=>{e&&(e.isCollapsed=!1)}),a&&(o.isCollapsed=!0,(null===(n=null===(i=null==o?void 0:o.pricing)||void 0===i?void 0:i.zone_price_model)||void 0===n?void 0:n.zone_price_id)&&this.getZoneDetail(o.pricing.zone_price_model.zone_price_id,o))}getVehicleType(e){this.taxiBookingService.getVehicleType(e).subscribe(e=>{var t;this.vehicleTypeArray=e.status?null===(t=e.data)||void 0===t?void 0:t.list:[]})}goToLoginScreen(){this.formSubmited=!0,this.generateErrors(this.addForm),this.addForm.valid&&(this.formSubmited=!1,this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.calCulateOtherCharges2(),this.displayLoginForm=!0,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.updateMarkersDraggableState())}isDynamicCalculationCharge(e){return(0,S.Mf)(e)}getOtherChargeBreakdownLabel(e){return(0,S.$v)(e)}incrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=(Number(e.currentValue)||0)+1;e.currentValue=t,this.otherChargesArray=(this.otherChargesArray||[]).map(i=>{var n;return(null==i?void 0:i.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(i.currentValue=t,i.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[i.charges_key])&&(this.otherChargArray[i.charges_key].currentValue=t)),Object.assign({},i)}),this.refreshOtherChargesFare()}decrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=Number(e.currentValue)||0,i=t>1?t-1:1;e.currentValue=i,this.otherChargesArray=(this.otherChargesArray||[]).map(t=>{var n;return(null==t?void 0:t.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(t.currentValue=i,t.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[t.charges_key])&&(this.otherChargArray[t.charges_key].currentValue=i)),Object.assign({},t)}),this.refreshOtherChargesFare()}refreshOtherChargesFare(){!this.selectedVehicleObj||(this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.calCulateOtherCharges2())}calCulateOtherCharges(e){let t=0;return this.selectedOtherChargesArray=this.otherChargesArray.filter(i=>{var n,o,a;if((i.checked||i.is_required)&&"booster_seat"==i.charges_key){if(1==i.charge_type){const o=i.charge_value*this.addForm.controls.booster_seat.value/100*((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*this.addForm.controls.booster_seat.value,i.charges=i.charge_value*this.addForm.controls.booster_seat.value);return!0}if((i.checked||i.is_required)&&"child_seat"==i.charges_key){if(1==i.charge_type){const n=i.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.amount)||0);t+=n,i.charges=n}else 2==i.charge_type?(t+=i.charge_value*this.addForm.controls.child_seat.value,i.charges=i.charge_value*this.addForm.controls.child_seat.value):3==i.charge_type&&(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance));return!0}if(i.checked||i.is_required){const n=(0,S.MV)(i);if(1==i.charge_type){const o=i.charge_value*n/100*((null===(a=null==e?void 0:e.final_fare)||void 0===a?void 0:a.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*n,i.charges=i.charge_value*n);return!0}return!1}),t}calCulateOtherCharges2(){this.otherChargePrice=0,this.selectedOtherChargesArray=this.otherChargesArray.filter(e=>{var t,i,n,o,a,r;if((e.checked||e.is_required)&&"booster_seat"==e.charges_key){if(1==e.charge_type){const n=e.charge_value*this.addForm.controls.booster_seat.value/100*((null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)||0);this.otherChargePrice+=n,e.charges=n}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*this.addForm.controls.booster_seat.value,e.charges=e.charge_value*this.addForm.controls.booster_seat.value);return!0}if((e.checked||e.is_required)&&"child_seat"==e.charges_key){if(1==e.charge_type){const t=e.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)||0);this.otherChargePrice+=t,e.charges=t}else 2==e.charge_type?(this.otherChargePrice+=e.charge_value*this.addForm.controls.child_seat.value,e.charges=e.charge_value*this.addForm.controls.child_seat.value):3==e.charge_type&&(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance);return!0}if(e.checked||e.is_required){const t=(0,S.MV)(e);if(1==e.charge_type){const i=e.charge_value*t/100*((null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)||0);this.otherChargePrice+=i,e.charges=i}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*t,e.charges=e.charge_value*t);return!0}return!1}),this.finalFare=this.finalFare+this.otherChargePrice}onDateChange(e,t){var i;null===(i=this.addForm.get("properties").at(t).get("value"))||void 0===i||i.setValue(e[0])}showLoginSingUpPage(e){var t;this.selectedButtonSingAUpLogin=e,1870!==Number(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id))?(null==e?void 0:e.bookRide)&&1==this.addForm.controls.paymentMode.value||2==this.pre_payment_value?this.bookRide(!0):null==(null==e?void 0:e.button_id)&&1==(null==e?void 0:e.bookRide)&&2==this.addForm.controls.paymentMode.value&&this.openPaymentGateway(!0):this.openPaymentGateway(!0)}openPaymentGateway(e){var t;const i=this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id),n=(0,T.Ps)(this.pre_payment_value,this.pre_payment,i);this.pre_payment&&!n&&(this.callApi=!1,this.bookRide(),this.loadingState=!1),this.showPaymetScreen=e,this.displayPaymentForm=!0,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.displayThankYouForm=!1}afterPaymentSucsess(e){var t;this.pre_payment||(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id))?(this.loadingState=!1,this.displayThannkYouScreen()):e&&!this.pre_payment&&this.bookRide(!0)}onStripeRequestBooking(){this.bookRide()}bookRide(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,P,w;if(this.generateErrors(this.addForm),this.addForm.valid){$("#properties").modal("hide"),this.loadingState=!0;var q=this.getWayPoints(),D={pickup_location:this.addForm.get("pickup_location").value,vehicle_type_id:this.selectedVehicleObj.id,dropoff_latitude:null===(t=this.destination_latitude)||void 0===t?void 0:t.toFixed(6),dropoff_longitude:null===(i=this.destination_longitude)||void 0===i?void 0:i.toFixed(6),payment_mode:this.addForm.get("paymentMode").value,payment_mode_id:this.addForm.get("payment_mode_id").value,no_of_passenger:this.addForm.get("no_of_passenger").value,booking_distance:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_distance:this.otherDetails.ride_distance,booking_duration:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_time:this.otherDetails.ride_time,calculation_method:null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.pricing.calculation_method,way_points:q,transaction_detail:void 0,luggage:this.addForm.get("trip_luggage").value,fare_details:this.selectedVehicleObj.pricing,payment_type:(0,A.bQ)(null!==(o=this.channelPaymentType)&&void 0!==o?o:this.pre_payment_value)};D.payment_status=(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id||(null===(a=this.currentCompanyDetail)||void 0===a?void 0:a.company_id))&&2===Number(null===(r=this.addForm.get("paymentMode"))||void 0===r?void 0:r.value)?"hold":"pending";const L=this.buildBookingAssetsPayload();L.length&&(D.booking_assets=L);let M={flight:{iata:this.addForm.get("flight_number").value}};D.flight_info=this.selectedFlightObj?this.selectedFlightObj:this.addForm.get("flight_number").value?M:null,this.isSchedual_trip?(D.booking_request_time=this.combinedTimestamp(),D.is_scheduled=1):D.is_scheduled=0,D.flight_number=null===(l=this.addForm.value)||void 0===l?void 0:l.flight_number,((null===(s=this.addForm.value)||void 0===s?void 0:s.booster_seat)||0==this.addForm.value.booster_seat)&&(D.booster_seat=null===(d=null===(u=this.addForm.value)||void 0===u?void 0:u.booster_seat)||void 0===d?void 0:d.toString()),((null===(c=this.addForm.value)||void 0===c?void 0:c.child_seat)||0==this.addForm.value.child_seat)&&(D.child_seat=null===(g=null===(h=this.addForm.value)||void 0===h?void 0:h.child_seat)||void 0===g?void 0:g.toString()),(null===(p=this.addForm.value)||void 0===p?void 0:p.booking_type_id)&&(D.booking_type_id=null===(m=this.addForm.value)||void 0===m?void 0:m.booking_type_id);let V=[];(null===(_=this.selectedOtherChargesArray)||void 0===_?void 0:_.length)&&(V=V.concat(this.selectedOtherChargesArray)),V.length&&(D.fare_details.addon=V),D.booking_properties=JSON.stringify(this.addForm.value.properties.map(e=>this.mapBookingProperty(e))),this.walletBalance<0&&this.finalFare?(D.booking_amount=Number(this.finalFare.toFixed(2)-this.walletBalance),D.wallet_id=null,D.fare_details=Object.assign(Object.assign({},this.selectedVehicleObj.pricing),{previous_dues:Math.abs(this.walletBalance),final_fare:null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare})):D.booking_amount=Number(this.finalFare.toFixed(2)),D.fare_details.driver_earning=(this.finalFare.toFixed(2)||0)-((null===(v=this.selectedVehicleObj)||void 0===v?void 0:v.final_fare.tax_amount)||0)-(this.walletBalance||0),(null===(y=this.addForm.value)||void 0===y?void 0:y.hour)&&(D.fare_details.no_of_hours=null===(b=this.addForm.value)||void 0===b?void 0:b.hour),(null===(x=this.addForm.value)||void 0===x?void 0:x.package)&&(D.fare_details.package_type_id=null===(k=this.addForm.value)||void 0===k?void 0:k.packages),("Y"===this.checkGenderEnable||"y"==this.checkGenderEnable)&&(D.gender=this.genderValue),this.selectedVehicleObj.surge_price.surgeApplied&&(D.fare_details.surge_multiplier=this.selectedVehicleObj.surge_price.multiplier,D.fare_details.surge_flat_amount=this.selectedVehicleObj.surge_price.flat_price),D.fare_details.final_fare=null===(Z=this.selectedVehicleObj)||void 0===Z?void 0:Z.final_fare,(null===(C=this.currentUserDetail)||void 0===C?void 0:C.id)&&(D.user_id=null===(F=this.currentUserDetail)||void 0===F?void 0:F.id),this.queueId&&(D.queue_id=this.queueId),this.addForm.get("destination").value&&(D.dropoff_location=this.addForm.get("destination").value),this.zoneData&&this.zoneData.to&&(D.dropoff_zone_id=this.zoneData.to.toString()),this.zoneData&&this.zoneData.from&&(D.pickup_zone_id=this.zoneData.from);try{D.pickup_latitude=null===(P=this.pickup_latitude)||void 0===P?void 0:P.toFixed(6)}catch(O){D.pickup_latitude=this.pickup_latitude}try{D.pickup_longitude=null===(w=this.pickup_longitude)||void 0===w?void 0:w.toFixed(6)}catch(O){D.pickup_longitude=this.pickup_longitude}if(this.returnEnable&&(D.is_return_booking=1,D.return_booking=this.buildReturnBookingObject(D)),3===(null==D?void 0:D.payment_mode)&&(D.payment_mode=2),!this.autoDispatch&&this.addForm.get("driver").value&&(D.driver_id=this.addForm.get("driver").value),this.addForm.valid&&!this.Customer_id){let e={};e.first_name=this.addForm.get("first_name").value?this.addForm.get("first_name").value:"",e.last_name=this.addForm.get("last_name").value?this.addForm.get("last_name").value:"",e.phone_no=this.addForm.get("phone_no").value?this.addForm.get("phone_no").value.toString():"",e.dial_code=this.addForm.get("dial_co
1de").value?this.addForm.get("dial_code").value:this.dialCode,this.addForm.get("email").value&&(e.email=this.addForm.get("email").value),D.passenger_details=e}D.is_fixed_price=0,this.pre_payment&&"pending"==this.addForm.get("paymentStatus").value&&2==this.addForm.get("paymentMode").value&&(D.booking_status=16),this.agent_id&&(D.agent_id=this.agent_id),2!==this.selectedTab||2===this.selectedTab&&D.booking_request_time>(new Date).getTime()/1e3?3!==this.selectedTab?"N"===this.corporateBookingConfirmation?this.yelowCabService.bookRide(D).subscribe(t=>{this.loadingState=!1,t.success||t.status?(this.tripPayload=D,this.trip_number=t.data.booking_number,this.tripId=t.data.booking_id,this.content="Successfully Booked",e&&this.displayThannkYouScreen()):this.toasterService.error(null==t?void 0:t.message)}):this.yelowCabService.bookRide(D).subscribe(e=>{this.loadingState=!1,e.success||e.status?(this.tripPayload=D,this.trip_number=e.data.booking_number,this.tripId=e.data.booking_id,this.content="Wait for confirmation"):this.toasterService.error(null==e?void 0:e.message)}):this.bookRecuringRide(this.tripPayload):(this.loadingState=!1,this.toasterService.error("Please select valid scheduled time"))}}displayThannkYouScreen(){var e;(0,P.nb)(this.company_id||(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id),this.trip_number)||(this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!0,this.showPaymetScreen=!1)}combinedTimestamp(){return new Date(this.selectedRequestTime).getTime()/1e3}bookRecuringRide(e){e.recurring_type=this.addForm.controls.recurring_type.value,e.recurring_time=new Date(this.addForm.controls.recurring_time.value).getTime()/1e3,e.end_date=new Date(this.addForm.controls.end_date.value).getTime()/1e3,2==this.addForm.controls.recurring_type.value&&(e.recurring_on=this.addForm.controls.recurring_on.value),this.yelowBookingService.bookRicurringRide(e).subscribe(e=>{var t;if(this.loadingState=!1,e.success||e.status){if(this.trip_number=e.data.booking_number,(0,P.nb)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id),this.trip_number))return;this.yelowBookingService.tripNoSubject.next({trip_number:this.trip_number,content:"Successfully Booked"}),this.ViewUpdate("thankyou")}else this.toasterService.error(null==e?void 0:e.message)},e=>{this.loadingState=!1})}ViewUpdate(e=!1){location.reload(),e&&(this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1),this.addForm.get("properties").clear(),this.addForm.reset(),this.selectQueuePickup=!1,this.addForm.get("checkpoints").clear(),this.addForm.get("properties").clear(),this.trip_luggage=0,this.no_of_passenger=1,this.addForm.patchValue({no_of_passenger:this.no_of_passenger,trip_luggage:this.trip_luggage,ride_type:1,pickup_location:null,destination:null,request_time:null,auto_dispatch:!0,gender:"M"}),this.searchText=null,this.selectedPickupRegionData=null,this.searchTextDestionation=null,this.responseDataDestionation=null,this.responseDatacheckPoint=null,this.responseData=null,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.selectedTab=1,this.request_time=null,this.autoDispatch=!0,this.Customer_id=null,this.genderTab="M",this.genderValue="M",this.getWayPoint=[],this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.marker&&(this.marker=[]),this.isFirstPart=!0,this.finalFare=0,this.walletBalance=0,this.addForm.get("notes").clearValidators(),this.bookingAssetsList=[],this.corporateBookingConfirmation="N",this.booking_type_id=null,this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.selectedFlightObj=null,this.responseFlight=[],this.trip_time=null,this.selectedButtonSingAUpLogin={button_id:1}
1,this.createForm(),this.getSeduleConfige(),this.jwtService.destroyAgentId(),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:null},queryParamsHandling:"merge",replaceUrl:!0}),this.patchDefaultUserLocation(),this.cd.detectChanges()}applyPaymentModeConfig(){var e;(null===(e=this.allPaymentModes)||void 0===e?void 0:e.length)?this.zoneConfigActive||(this.paymentMode=this.allPaymentModes,this.paymentMode.length>0?this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)):this.company_id&&this.toasterService.error("Please setup payment Mode!")):this.paymentMode=[]}resolveDefaultPaymentMode(e){return 1870===Number(this.company_id)&&e.find(e=>2===Number(null==e?void 0:e.payment_mode_key))||e[0]}getPaymentConfig(){const e=(0,A.QZ)(this.company_id);this.yelowCabService.getPaymentConfigList(e).subscribe(e=>{var t,i;e.status&&(this.allPaymentModes=(0,A.w6)(null===(t=e.data)||void 0===t?void 0:t.list,this.company_id),this.applyPaymentModeConfig(),(null===(i=this.pendingZoneConfigs)||void 0===i?void 0:i.length)&&(this.applyZoneBookingOptions(this.pendingZoneConfigs,this.activeZoneId),this.pendingZoneConfigs=null))})}loadZoneConfigurationForPickup(e){e?(e=e.split(",")[0],(this.activeZoneId!==e||!this.zoneConfigActive)&&(this.activeZoneId=e,this.yelowCabService.getZoneConfiguration({zone_id:e,page:0}).subscribe(t=>{const i=this.normalizeZoneConfigList(null==t?void 0:t.data);((null==t?void 0:t.status)||(null==t?void 0:t.success))&&i.length?this.allPaymentModes.length?(this.applyZoneBookingOptions(i,e),this.pendingZoneConfigs=null):this.pendingZoneConfigs=i:this.resetZoneBookingOptions()},()=>this.resetZoneBookingOptions()))):this.resetZoneBookingOptions()}normalizeZoneConfigList(e){return Array.isArray(e)?e:Array.isArray(null==e?void 0:e.list)?e.list:[]}applyZoneBookingOptions(e,t){const i=[],n=[];let o=null;if(e.forEach(e=>{if(!(null==e?void 0:e.config_key)||null==e.config_value||""===e.config_value)return;const t=String(e.config_value);switch(e.config_key){case"payment_mode":i.push(t);break;case"request_mode":n.push(t);break;case"cut_off_time":o=t}}),this.zoneConfigActive=!0,this.activeZoneId=t,this.lastAppliedZoneConfigs=e,i.length&&this.allPaymentModes.length){const e=this.allPaymentModes.filter(e=>i.includes(String(e.id)));e.length&&(this.paymentMode=e,this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)))}
1const a={1:{type_id:1,type_name:"Now"},2:{type_id:2,type_name:"Later"}};if(n.length){const e=n.map(e=>a[e]).filter(Boolean);e.length&&(this.rideType=e,this.setRideType(this.rideType[0].type_id))}if(o){const e=this.resolveCutOffMinutes(o);e>0&&this.applyZoneCutOffMinutes(e)}this.cd.detectChanges()}resolveCutOffMinutes(e){const t=Number(e);return!Number.isNaN(t)&&t>0?t:0}applyZoneCutOffMinutes(e){!e||Number.isNaN(e)||e<=0?this.zoneCutOffMinutes=null:(this.zoneCutOffMinutes=e,this.applyRequestTimeMinDate())}getEffectiveRequestMinDate(){const e=new Date;return e.setSeconds(0,0),this.zoneCutOffMinutes>0?new Date(e.getTime()+6e4*this.zoneCutOffMinutes):new Date(e)}applyRequestTimeMinDate(){var e,t,i,n;const o=this.getEffectiveRequestMinDate();this.requestTimeMinDate=o;const a=new Date(o);if(a.setHours(0,0,0,0),this.timeFormatConfig2.minDate=a,this.timeFormatConfig.minDate=o,this.is_date=!0,2===this.selectedTab){const a=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.controls.request_time)||void 0===t?void 0:t.value,r=null===(n=null===(i=this.addForm)||void 0===i?void 0:i.controls.trip_time)||void 0===n?void 0:n.value,l=a?new Date(a):null,s=r?new Date(r):null;let u=0;l&&s&&!Number.isNaN(l.getTime())&&!Number.isNaN(s.getTime())&&(u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()).getTime()),(!u||u<o.getTime())&&(this.request_time=new Date(o),this.trip_time=new Date(o),this.addForm.controls.request_time.setValue(this.request_time),this.addForm.controls.trip_time.setValue(this.trip_time))}}validateRequestTimeCutOff(e){if(2!==this.selectedTab)return!0;const t=this.getEffectiveRequestMinDate(),i=e||new Date(this.selectedRequestTime||this.addForm.value.request_time);if(Number.isNaN(i.getTime())||i.getTime()<t.getTime()){const e=this.zoneCutOffMinutes?`Trip must be scheduled at least ${this.zoneCutOffMinutes} minutes from now`:`Please schedule the trip after ${t.toLocaleString()}`;return this.toasterService.error(e),!1}return!0}clearZoneCutOffMinutes(){this.zoneCutOffMinutes=null,this.requestTimeMinDate=null}resetZoneBookingOptions(){var e;if(!this.zoneConfigActive)return this.activeZoneId=null,void(this.pendingZoneConfigs=null);this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.clearZoneCutOffMinutes(),this.allPaymentModes.length&&this.applyPaymentModeConfig(),this.allRideTypes.length?(this.rideType=[...this.allRideTypes],this.setRideType((null===(e=this.rideType[0])||void 0===e?void 0:e.type_id)||1)):this.getSeduleConfige(!1),this.cd.detectChanges()}setPaymentMode(e){const t=e&&"object"==typeof e?e:this.paymentMode.find(t=>(null==t?void 0:t.id)==e);this.addForm.controls.payment_mode_id.setValue(null==t?void 0:t.id),this.addForm.controls.payment_mode_id.updateValueAndValidity(),this.addForm.controls.paymentMode.setValue(null==t?void 0:t.payment_mode_key),this.addForm.controls.paymentMode.updateValueAndValidity(),this.applyPaymentTypeFromSelectedMode(t)}applyPaymentTypeFromSelectedMode(e){var t;if(!(0,A.kB)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id))){if(null==e?void 0:e.payment_type){const t=(0,A.L3)(e.payment_type);this.pre_payment_value=t.prePaymentValue,this.pre_payment=t.prePayment,this.channelPaymentType=t.paymentType,this.channelPaymentTypeLabel=t.paymentTypeLabel}this.loadPaymentRulePolicy(null==e?void 0:e.id)}}loadPaymentRulePolicy(e){var t;!e||(0,A.kB)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id))||this.yelowCabService.getPaymentRulePolicy({booking_channel:A.fj,payment_method:e}).subscribe(e=>{if(!(null==e?void 0:e.status)&&!(null==e?void 0:e.success)||!(null==e?void 0:e.data))return;const t=(0,A.$I)(e.data);if(!t)return;const i=(0,A.L3)(t);this.pre_payment_value=i.prePaymentValue,this.pre_payment=i.prePayment,this.channelPaymentType=i.paymentType,this.channelPaymentTypeLabel=i.paymentTypeLabel,this.cd.detectChanges()},()=>{})}displayFirstScreen(e=!1){e&&this.resetPropertyControl(),this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.displayThankYouForm=!1,this.isFirstPart=!0,this.clearRoutePath(),this.updateMarkersDraggableState()}displaySecondScreen(){this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!0,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0,this.updateMarkersDraggableState()}displayThirdScreen(){this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayThankYouForm=!1,this.isFirstPart=!0,this.updateMarkersDraggableState(),this.refreshMapViewportForSheet()}getResolvedHourlyPackagePricing(e){var t,i,n,o;if(!e)return{minHours:null,maxHours:null,hourlyRate:null,slots:null};const a="Y"===e.zone_price_applied?e.zone_price_model:null;if(a){const r=null!==(t=a.slots)&&void 0!==t?t:e.slots;return{minHours:this.coerceFiniteNumber(null!==(i=a.min_hours)&&void 0!==i?i:e.min_hours),maxHours:this.coerceFiniteNumber(null!==(n=a.max_hours)&&void 0!==n?n:e.max_hours),hourlyRate:this.coerceFiniteNumber(null!==(o=a.hourly_rate)&&void 0!==o?o:e.hourly_rate),slots:Array.isArray(r)?r:null}}const r=e.slots;return{minHours:this.coerceFiniteNumber(e.min_hours),maxHours:this.coerceFiniteNumber(e.max_hours),hourlyRate:this.coerceFiniteNumber(e.hourly_rate),slots:Array.isArray(r)?r:null}}getResolvedHourlyRate(e){var t;const i=null===(t=this.getResolvedHourlyPackagePricing(e))||void 0===t?void 0:t.hourlyRate;if(null!=i)return i;const n=Number(null==e?void 0:e.hourly_rate);return Number.isFinite(n)?n:0}getResolvedPriceType(e){var t;if(!e)return null;const i=e.zone_price_model,n=null==i||"object"!=typeof i||Array.isArray(i)||null===(t=i.price_type)||void 0===t?e.price_type:t,o=Number(n);return Number.isFinite(o)?o:null}isHourlyRateTimesHoursPricing(e){return 5===this.getResolvedPriceType(e)}isPackageSlotAmountPricing(e){return 4===this.getResolvedPriceType(e)}getSlotAmountForPackageSelection(e,t){var i;if(!this.isPackageSlotAmountPricing(e)||null==t)return null;const n=null===(i=this.getResolvedHourlyPackagePricing(e))||void 0===i?void 0:i.slots;if(!Array.isArray(n))return null;const o=n.find(e=>e.id==t);if(!o||null==o.slot_amount)return null;const a=Number(o.slot_amount);return Number.isFinite(a)?a:null}hourlyPackageCardDisplay(e){var t,i;const n=this.getResolvedHourlyPackagePricing(null==e?void 0:e.pricing);return{minHours:null!==(t=n.minHours)&&void 0!==t?t:0,hourlyRate:null!==(i=n.hourlyRate)&&void 0!==i?i:0}}coerceFiniteNumber(e){if(null==e||""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}syncRentalHourlyOptionsFromVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;if(!(null==e?void 0:e.pricing)||!["hourly","package"].includes(this.bookingTypeKey))return;const _=this.getResolvedHourlyPackagePricing(e.pricing);if("hourly"===this.bookingTypeKey){let e=null!==(t=_.minHours)&&void 0!==t?t:1,s=null!==(i=_.maxHours)&&void 0!==i?i:24;if(s<e){const t=e;e=s,s=t}s=Math.min(s,168),this.hoursArray=[];for(let t=e;t<=s;t++)this.hoursArray.push({name:`${t} hrs`,value:t});const u=null!==(n=_.minHours)&&void 0!==n?n:e,d=null===(a=null===(o=this.addForm)||void 0===o?void 0:o.value)||void 0===a?void 0:a.hour,c=null!=d&&d>=e&&d<=s?d:u;null===(r=this.addForm.controls.hour)||void 0===r||r.setValue(c,{emitEvent:!1}),null===(l=this.filterVehicleArray)||void 0===l||l.forEach(e=>{(null==e?void 0:e.pricing)&&(e.pricing.selected_hours=c)}),this.changeHours()}if(this.rentalPackages=null!=_.slots?_.slots:[],"package"===this.bookingTypeKey){const t=null===(u=null===(s=this.addForm)||void 0===s?void 0:s.value)||void 0===u?void 0:u.packages;if(null!=t&&!this.rentalPackages.some(e=>e.id==t)&&(null===(d=this.addForm.controls.packages)||void 0===d||d.setValue(null)),this.isPackageSlotAmountPricing(e.pricing)&&(null===(c=this.rentalPackages)||void 0===c?void 0:c.length)){const e=null===(g=null===(h=this.addForm)||void 0===h?void 0:h.value)||void 0===g?void 0:g.packages,t=null!=e&&this.rentalPackages.some(t=>t.id==e)?e:null===(p=this.rentalPackages[0])||void 0===p?void 0:p.id;null!=t&&(null===(m=this.addForm.controls.packages)||void 0===m||m.setValue(t,{emitEvent:!1}),this.changePackages())}}}validationForRental(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),"hourly"==this.bookingTypeKey?(this.addForm.controls.hour.setValidators([r.kI.required]),this.addForm.controls.packages.setValidators([])):"package"==this.bookingTypeKey?(this.addForm.controls.packages.setValidators([r.kI.required]),this.addForm.controls.hour.setValidators([])):(this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.setValidators([])),this.addForm.controls.packages.updateV
1alueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}shouldHideCharge(e){return"booster_seat"===(null==e?void 0:e.charges_key)||"child_seat"===(null==e?void 0:e.charges_key)||(null==e?void 0:e.is_required)}changeHours(){var e=this;return(0,y.Z)(function*(){var t,i,n,o,a,r;if(!e.selectedVehicleObj)return;const l=e.addForm.value.hour;if(l&&(e.filterVehicleArray.forEach(t=>{if(t.pricing.selected_hours=l,t.id===e.selectedVehicleObj.id||!e.isHourlyRateTimesHoursPricing(t.pricing))return;let i=e.getResolvedHourlyRate(null==t?void 0:t.pricing)*l-e.additionalDiscount;t.final_fare.amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge}),e.isHourlyRateTimesHoursPricing(null===(t=e.selectedVehicleObj)||void 0===t?void 0:t.pricing))){let t=e.getResolvedHourlyRate(null===(i=e.selectedVehicleObj)||void 0===i?void 0:i.pricing)*l-e.additionalDiscount;e.hours_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare,e.selectedVehicleObj.pricing.selected_hours=(null===(o=null===(n=e.addForm)||void 0===n?void 0:n.value)||void 0===o?void 0:o.hour)?null===(r=null===(a=e.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour:0})()}changePackages(){var e=this;return(0,y.Z)(function*(){var t;if(!e.selectedVehicleObj)return;const i=null===(t=e.addForm.value)||void 0===t?void 0:t.packages,n=e.getSlotAmountForPackageSelection(e.selectedVehicleObj.pricing,i);if(null!=n){e.filterVehicleArray.forEach(t=>{if(t.id===e.selectedVehicleObj.id)return;const n=e.getSlotAmountForPackageSelection(t.pricing,i);null!=n&&(t.final_fare.amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge)});let t=n-e.additionalDiscount;e.package_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare})()}removeValidation(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),this.addForm.controls.packages.setValidators([]),this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}setDateintime(){const e=new Date(this.addForm.value.request_time),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())this.setMinTime();else{let t=new Date(this.addForm.value.trip_time[0]||new Date);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.trip_time=t,this.addForm.controls.trip_time.setValue(t),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig.minDate=new Date(t)}}setMinTime(){const e=new Date;this.trip_time=new Date(e.getTime()+6e4*(this.min_date||0)),this.addForm.controls.trip_time.setValue(new Date(this.trip_time)),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(this.trip_time))}initDefaultReturnDateTime(){var e,t,i;let n=new Date((new Date).getTime()+36e5).getTime(),o=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),a=new Date(Math.max(n,o));this.returnDateFormatConfig.minDate=new Date,this.returnTimeFormatConfig.minDate=new Date(a),this.return_date=a,this.return_trip_time=a,this.return_time=a,this.addForm&&(null===(e=this.addForm.controls.return_date)||void 0===e||e.setValue(a),null===(t=this.addForm.controls.return_trip_time)||void 0===t||t.setValue(a),null===(i=this.addForm.controls.return_time)||void 0===i||i.setValue(a)),this.selectedDate=a,this.syncReturnDateTime()}syncReturnDateTime(){var e,t,i,n,o,a,r;const l=null!==(i=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("return_date"))||void 0===t?void 0:t.value)&&void 0!==i?i:this.return_date,s=null!==(a=null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("return_trip_time"))||void 0===o?void 0:o.value)&&void 0!==a?a:this.return_trip_time;if(!l||!s)return;const u=new Date(l),d=new Date(Array.isArray(s)?s[0]:s),c=new Date(u.getFullYear(),u.getMonth(),u.getDate(),d.getHours(),d.getMinutes(),d.getSeconds());null===(r=this.addForm.get("return_time"))||void 0===r||r.setValue(c),this.selectedDate=c,this.return_time=c}setReturnTimeFromDate(){const e=new Date(this.addForm.value.return_date),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()){let e=new Date((new Date).getTime()+36e5).getTime(),t=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),i=new Date(Math.max(e,t));this.return_trip_time=i,this.addForm.controls.return_trip_time.setValue(i),this.returnTimeFormatConfig.minDate=i}else{let t=new Date(this.addForm.value.return_trip_time||new Date);
1Array.isArray(t)&&(t=new Date(t[0])),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t),this.returnTimeFormatConfig.minDate=new Date(t)}}onBookingAssetsChange(e){this.bookingAssetsList=e||[]}buildBookingAssetsPayload(){return(this.bookingAssetsList||[]).filter(e=>e&&1!==e.is_delete&&!!e.asset_value).map(e=>{var t;const i=null===(t=M._B.find(t=>t.id===String(e.asset_type)))||void 0===t?void 0:t.kind;return Object.assign({asset_type:String(e.asset_type),user_type:e.user_type,asset_value:e.asset_value},"file"!==i&&"voice"!==i||!e.file_name?{}:{file_name:e.file_name})})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e),f.Y36(f.sBO),f.Y36(E.Z),f.Y36(r.qu),f.Y36(U.F),f.Y36(N.d),f.Y36(I._W),f.Y36(j.C),f.Y36(o.gz),f.Y36(R.T),f.Y36(o.F0),f.Y36(z.x))},e.\u0275cmp=f.Xpm({type:e,selectors:[["yelowcab-booking-map"]],viewQuery:function(e,t){if(1&e&&f.Gf(Ma,5),2&e){let e;f.iGM(e=f.CRH())&&(t.gmapElement=e.first)}},hostBindings:function(e,t){1&e&&f.NdJ("resize",function(){return t.onWindowResize()},!1,f.Jf7)},inputs:{is_full_screen:"is_full_screen"},decls:180,vars:153,consts:[[1,"yc-map-booking"],[1,"yc-map-booking__map"],[1,"g-map"],["id","gmap-map-booking"],["gmap",""],["type","button",1,"yc-map-booking__mobile-toggle","d-lg-none",3,"click"],[1,"fa",3,"ngClass"],[1,"yc-map-booking__form"],["autocomplete","off","role","form",3,"formGroup"],[1,"custom","clearfix","booking-form-two-column",3,"hidden","ngClass"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","booking-form-center","input-info0"],[1,"booking-form-inner","w-100"],["class","lorder-wrap",4,"ngIf"],[1,"yc-map-panel-head"],[1,"yc-map-panel-title"],[1,"yc-map-panel-sub"],[1,"flex-fill","yc-map-panel-body"],["class","form-group position-relative mb-2 pb-1 dropdown-select0",4,"ngIf"],[1,"form-group","position-relative","mb-1","icon","short"],[3,"ngClass"],[1,"location-search",3,"placeholder","isBooing","responseData","searchText","is_disable","search","searchEvent"],["class","help-block text-center",3,"innerHTML",4,"ngIf"],["class","form-text text-danger text-center",4,"ngIf"],["formArrayName","checkpoints",1,"form-group","mb-1"],[3,"formGroupName",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"form-group","position-relative","mb-2","pb-1","icon","short",3,"ngClass"],[1,"location-search",3,"is_disable","placeholder","responseData","isBooing","searchText","search","searchEvent"],["class","help-block text-danger text-center",4,"ngIf"],["class","row input-info",4,"ngIf"],["class","trip-type d-flex justify-content-between mb-1",4,"ngIf"],["class","form-row mb-0",4,"ngIf"],[1,"form-group","position-relative","mb-0"],["mode","local","modalId","mapBookingAssetsModal",3,"title","assets","compact","assetsChange"],[1,"yc-map-actions"],["type","button",1,"yc-btn","yc-btn--primary",3,"disabled","click"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info",3,"ngClass"],[1,"booking-form-inner",3,"ngClass"],["class","bg-light p-3 rounded-3 mb-4",4,"ngIf"],[1,"fw-semibold","mb-3","h4"],[1,"font-size-14"],["formArrayName","properties",1,"booking-form-body","border"],["type","button",1,"yc-btn","yc-btn--ghost",3,"click"],["class","fa fa-spinner fa-spin",4,"ngIf"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","short","booking-widget-flex-column0",3,"ngClass"],[1,"vehicle-step-scroll","yc-map-panel-body"],["href","javascript:;",1,"text-decoration-none",2,"color","currentColor !important"],["class","list-unstyled yc-vehicle-list",4,"ngFor","ngForOf"],["class","form-row",4,"ngIf"],[1,"yc-map-actions","yc-map-actions--stacked"],["class","yc-map-meta-row",4,"ngIf"],[1,"yc-map-actions__row"],[1,"custom","clearfix","booking-form-two-column","yc-map-step","yc-map-step--login",3,"hidden"],[1,"yc-map-panel-body","yc-map-panel-body--login"],[3,"isOtpVerification","showBackButton","callBackObject","backCl
1ick"],[1,"custom","clearfix","booking-form-two-column","yc-map-step",3,"hidden"],[1,"yc-map-panel-head","yc-map-panel-head--with-back"],["type","button",1,"yc-panel-back",3,"click"],[1,"fa","fa-arrow-left"],[1,"yc-map-panel-head__text"],[1,"yc-map-panel-body"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking",4,"ngIf"],[1,"yc-map-panel-body","text-center","py-4"],[1,"icon","mb-4"],[1,"fa","fa-check-circle-o","fa-5x","text-success"],[1,"heading","h3","font-weight-700","text-dark"],[1,"font-size-18"],["type","button",1,"yc-btn","yc-btn--primary","w-100","mt-3",3,"click"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","class","modal fade","aria-hidden","true",4,"ngIf"],["id","fixdestination","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],["class","modal-body flex",4,"ngIf"],[1,"modal-footer","bg-light"],["type","submit",1,"btn","btn-primary",3,"click"],["id","selectUserPickupLocation","role","dialog","aria-labelledby","selectUserPickupLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["autocomplete","off","role","form",3,"ngSubmit"],["id","selectUserPickupLocationLabel",1,"modal-title","flex"],[1,"modal-body","py-0"],[1,"radioStyle1","radioStyleCustom","largeChecked"],["class","control control-outline control-info control--radio d-block my-3 border rounded",4,"ngFor","ngForOf"],["data-dismiss","modal","type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],["id","selectUserDropoffLocation","role","dialog","aria-labelledby","selectUserDropoffLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["id","selectUserDropoffLocationLabel",1,"modal-title","flex"],[1,"lorder-wrap"],[1,"loader"],[1,"form-group","position-relative","mb-2","pb-1","dropdown-select0"],[1,"control-label","fw-semibold","fs-6"],["bindLabel","title","bindValue","id",1,"ng-select",3,"placeholder","items","clearable","formControl","searchable","change"],[1,"help-block","text-center",3,"innerHTML"],[1,"form-text","text-danger","text-center"],[3,"formGroupName"],[1,"form-group","mb-3"],[1,"has-feedback","p-r-40"],[3,"placeholder","responseData","isBooing","searchText","search","searchEvent"],["class","form-text mt-2 text-danger pl-5 text-center",4,"ngIf"],["href","javascript:;",1,"remove-checkpoint","text-secondary",3,"click"],[1,"fa","fa-trash","fa-fw",3,"ngClass"],[1,"form-text","mt-2","text-danger","pl-5","text-center"],[1,"add-checkpoint",3,"click"],[1,"fa","fa-plus-circle"],[1,"help-block","text-danger","text-center"],[1,"d-flex","align-items-center","mb-1"],[1,"fw-normal","m-0",2,"color","rgb(97, 113, 130)"],[1,"ml-auto","auto-fixed-switch","d-flex","align-items-center"],["id","RideType","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideType",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],[1,"mb-0","order-1","text-1"],[1,"mb-0","order-3","text-2"],[1,"row","input-info"],[1,"col-md-6",2,"width","50%"],[1,"form-group","mb-3","position-relative","icon","short","custom-date-picker"],[1,"input_trailingIconSpan__6le4A","input_iconSpan__7pewB"],["role","img","aria-label","Icon/calendar","width","20px","height","20px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","_default_rs803_65"],["d","M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zM4 9v10h16V9H4zm2 4h5v4H6v-4z"],[1,"control-label","fw-semibold","mt-1"],[1,"form-control",3,"placeholder","config","ngClass","formControl","setDate"],[1,"form-group","position-relative","mb-3","icon","short","custom-date-picker"],[1,"input_iconSpan__7pewB","input_trailingIconSpan__
16le4A"],["role","img","aria-label","Icon/time","width","20px","height","20px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","_default_rs803_65"],["d","M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm1-10V7h-2v7h6v-2h-4z"],["appendTo","body","placeholder"," Select Start Time",1,"form-control","p-0","time-flatpicker",3,"config","formControl","setDate"],[1,"trip-type","d-flex","justify-content-between","mb-1"],[1,"m-0","fw-normal",2,"color","rgb(97, 113, 130)"],[1,"form-group","mb-0"],[1,"0radioStyle1","0small-height","d-flex","0justify-content-between"],["class","control control-outline control-primary control--radio ml-3 0flex-fill control-outline-small mb-0",4,"ngFor","ngForOf"],[1,"control","control-outline","control-primary","control--radio","ml-3","0flex-fill","control-outline-small","mb-0"],["name","GENDER","type","radio",1,"custom-control-input",3,"value","formControl","checked","click"],[1,"control__indicator"],[1,"row"],[1,"fw-normal","mb-2","pb-1","d-flex","align-items-center",2,"color","rgb(97, 113, 130)"],["id","RideReturn","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideReturn",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],["class","row input-info",3,"ngClass",4,"ngIf"],[1,"row","input-info",3,"ngClass"],["appendTo","body","placeholder"," Select Return Time",1,"form-control","p-0","time-flatpicker",3,"config","formControl","setDate","ngClass"],[1,"col-12"],[1,"form-group","position-relative","mb-2","pb-1","icon","short"],["class","form-group mb-2",4,"ngIf"],["class","form-group p-0 col",4,"ngIf"],[1,"form-group","mb-2"],["type","text",1,"form-control","shadow-none",3,"placeholder","formControl"],[1,"form-group","p-0","col"],[1,"input-group"],["notFoundText","No Records Found",1,"select-single-with-search","w-100",3,"clearable","placeholder","ngModel","ngModelOptions","keyup.enter","change","ngModelChange"],["flightSelect",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"d-flex"],[1,"icon","me-2",2,"vertical-align","-2px"],[1,"fa","fa-plane"],[1,"ml-2",3,"title"],[1,"form-row","mb-0"],[1,"col-md-6"],[1,"font-weight-600","mb-2","fw-medium",2,"color","rgb(97, 113, 130) !important"],[4,"ngFor","ngForOf"],[1,"control","control-outline","control-info","control--checkbox"],["type","checkbox","name","selectedtype",3,"id","value","checked","disabled","change"],[1,"form-row"],[1,""],[1,"additional-seats--row"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"ngStyle","click"],["type","text","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px",3,"formControl"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"ngStyle","click"],["type","text",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px",3,"value"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"click"],[1,"bg-light","p-3","rounded-3","mb-4"],[1,"font-size-16","fw-normal","text-black","mb-1"],[1,"font-size-16","mb-1"],[1,"list-unstyled","mb-0"],[1,"card-title","my-3","font-weight-300","font-size-16",2,"margin-left","15px","padding-bottom","2px"],[1,"mb-1","font-weight-600","pl-3"],[1,"text-muted","mb-1","nowrap"],[1,"float-right","nowrap"],[1,"borderrounded-3p-4","input-info","mb-0"],[1,"control-label","fs-6"],["class","astrsk",4,"ngIf"],[1,"form-group"],[1,"astrsk"],["type","text","formControlName","value",1,"form-control","pt-2",3,"placeholder"],[1,"input-group",3,"ngClass"],["placeholder","select date","formControlName","value",1,"form-control","p-0",3,"config","onChange"],[1,"input-group-addon"],[1,"fa","fa-calendar"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","label-badge","form-control0","select-single-with-search","remove-space",3,"items","notFoundText","multiple"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","form-control0","select-single-with-search",3,"notFoundText","items"],[1,"additional-seats--row0"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative","mb-0",3,"ngClass"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"click"],["type","text","formControlName","value","numberOnly","","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px"],[1,"document-field",3,"ngClass"],[1,"document-field-row"],[1,"document-field-name"],["class","fa fa-file-o",4,"ngIf"],[1,"document-field-name-text"],[1,"document-field-upload"],["type","file",3,"id","disabled","change"],["docFileInput",""],["type","button","class","document-field-remove","title","Remove",3,"click",4,"ngIf"],["type","hidden","formControlName","value"],["type","hidden","formControlName","file_name"],[1,"document-field-hint"],[1,"fa","fa-file-o"],[1,"fa","fa-spinner","fa-spin"],["type","button","title","Remove",1,"document-field-remove",3,"click"],[1,"fa","fa-tras
1h"],[1,"list-unstyled","yc-vehicle-list"],[1,"yc-vehicle-item",3,"click"],[1,"yc-vehicle-card"],["alt","",1,"yc-vehicle-card__img",3,"src"],[1,"yc-vehicle-card__main"],[1,"yc-vehicle-card__top"],[1,"yc-vehicle-card__info"],[1,"yc-vehicle-card__title"],["class","yc-vehicle-card__desc",4,"ngIf"],[1,"yc-vehicle-card__price"],["class","yc-vehicle-card__from",4,"ngIf"],["class","yc-vehicle-card__fare",4,"ngIf"],["type","button","class","yc-vehicle-card__toggle",3,"click",4,"ngIf"],[1,"yc-vehicle-card__meta"],["title","Passengers",1,"yc-vehicle-meta"],["width","14","height","14","fill","currentColor","viewBox","0 0 24 24","aria-hidden","true"],["d","M2 22a8 8 0 1 1 16 0H2zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm7.363 2.233A7.505 7.505 0 0 1 22.983 22H20c0-2.61-1-4.986-2.637-6.767zm-2.023-2.276A7.98 7.98 0 0 0 18 7a7.964 7.964 0 0 0-1.015-3.903A5 5 0 0 1 21 8a4.999 4.999 0 0 1-5.66 4.957z"],[1,"yc-vehicle-meta__value"],["title","Luggage",1,"yc-vehicle-meta"],["d","M15 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v13c0 .552-.448 1-1 1H3c-.552 0-1-.448-1-1V7c0-.552.448-1 1-1h5V4c0-.552.448-1 1-1h6zM8 8H6v11h2V8zm10 0h-2v11h2V8zm-4-3h-4v1h4V5z"],["class","yc-vehicle-fare mt-3 border-top pt-3",4,"ngIf"],[1,"yc-vehicle-card__desc"],[1,"yc-vehicle-card__from"],[1,"yc-vehicle-card__fare"],["type","button",1,"yc-vehicle-card__toggle",3,"click"],[1,"yc-vehicle-fare","mt-3","border-top","pt-3"],[1,"table","remove-padding"],["colspan","2",1,"no-border"],[1,"font-weight-normal"],["colspan","2","class","no-border",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","pb-3"],[1,"text-black","fw-semibold","font-size-16"],[1,"d-flex","align-item-center","justify-content-between","text-black","py-2","fw-semibold"],[1,"font-size-14","dot"],["class","d-flex align-item-center justify-content-between pb-3",4,"ngIf"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],["class","d-flex align-item-center justify-content-between ps-3",4,"ngFor","ngForOf"],["class","d-flex align-item-center justify-content-between text-black fw-semibold",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between"],[1,"d-flex","align-item-center","justify-content-between","ps-3"],[1,"fa","fa-dot-circle-o"],[1,"d-flex","align-item-center","justify-content-between","text-black","fw-semibold"],["class","d-flex align-item-center justify-content-between ps-4",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","ps-4"],[1,"border-top","mt-4","pt-4"],[1,"form-group","col",3,"ngClass"],["placeholder","Select Package",1,"form-control0","select-single-with-search",3,"formControl","change"],["bindLabel","name","bindValue","value",3,"placeholder","items","formControl","change"],[1,"yc-map-meta-row"],["class","yc-map-meta-field",4,"ngIf"],["class","yc-map-meta-field",3,"ngClass",4,"ngIf"],[1,"yc-map-meta-field"],[1,"yc-map-meta-icon"],[1,"fa","fa-user"],["placeholder","--","dropdownPosition","top","appendTo","body",1,"yc-meta-select",3,"searchable","clearable","virtualScroll","formControl","change"],[1,"fa","fa-suitcase"],[1,"yc-map-meta-field",3,"ngClass"],["placeholder","Payment Mode","dropdownPosition","top","appendTo","body",1,"yc-meta-select","yc-meta-select--payment",3,"searchable","clearable","virtualScroll","notFoundText","formControl","change"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"modal-body","flex"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"price-section","align-self-start"],[1,"price-section__left"],[1,"price-section-dayprice"],[1,"control","control-outline","control-info","control--radio","d-block","my-3","border","rounded"],[1,"font-weight-600","mt-0","mb-2"],[1,"mb-0","text-muted"],["type","radio","name","p-options","autocomplete","off",3,"id","change"],["type","radio","name","d-options","autocomplete","off",3,"id","change"]],template:function(e,t){if(1&e&&(f.TgZ(0,"div",0),f.TgZ(1,"div",1),f.TgZ(2,"div",2),f._UZ(3,"div",3,4),f.qZA(),f.qZA(),f.TgZ(5,"button",5),f.NdJ("click",function(){return t.toggleMobileMap()}),f._UZ(6,"i",6),f.TgZ(7,"span"),f._uU(8),f.qZA(),f.qZA(),f.TgZ(9,"div",7),f.TgZ(10,"form",8),f.TgZ(11,"div",9),f.TgZ(12,"div",10),f.TgZ(13,"div",11),f.YNc(14,Va,2,0,"div",12),f.TgZ(15,"div",13),f.TgZ(16,"h2",14),f._uU(17),f.qZA(),f.TgZ(18,"p",15),f._uU(19),f.qZA(),f.qZA(),f.TgZ(20,"div",16),f.YNc(21,Sa,4,6,"div",17),f.TgZ(22,"div",18),f.TgZ(23,"div",19),f.TgZ(24,"a
1pp-search-box-google",20),f.NdJ("search",function(e){return t.OnSearch(e)})("searchEvent",function(e){return t.searchEvent(e)}),f.qZA(),f.YNc(25,Ea,1,1,"span",21),f.YNc(26,Ua,2,1,"span",22),f.qZA(),f.qZA(),f.TgZ(27,"div",23),f.YNc(28,ja,7,9,"ng-container",24),f.YNc(29,Ra,4,1,"div",25),f.qZA(),f.TgZ(30,"div",26),f.TgZ(31,"app-search-box-google",27),f.NdJ("search",function(e){return t.OnSearchDestination(e)})("searchEvent",function(e){return t.searchEventDestination(e)}),f.qZA(),f.YNc(32,za,1,1,"span",21),f.YNc(33,Ja,2,1,"span",28),f.qZA(),f.YNc(34,Ba,11,4,"ng-container",25),f.YNc(35,Qa,17,12,"div",29),f.YNc(36,$a,6,2,"div",30),f.YNc(37,tr,9,4,"ng-container",25),f.YNc(38,rr,5,3,"div",25),f.YNc(39,_r,5,2,"div",31),f.TgZ(40,"div",32),f.TgZ(41,"app-booking-assets",33),f.NdJ("assetsChange",function(e){return t.onBookingAssetsChange(e)}),f.qZA(),f.qZA(),f.qZA(),f.TgZ(42,"div",34),f.TgZ(43,"button",35),f.NdJ("click",function(){return t.submitFirstForm(t.addForm)}),f._uU(44),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(45,"div",9),f.TgZ(46,"div",36),f.TgZ(47,"div",37),f.TgZ(48,"div",13),f.TgZ(49,"h2",14),f._uU(50),f.qZA(),f.TgZ(51,"p",15),f._uU(52),f.qZA(),f.qZA(),f.TgZ(53,"div",16),f.YNc(54,fr,56,37,"div",38),f.TgZ(55,"div"),f.TgZ(56,"h4",39),f._uU(57),f.qZA(),f.TgZ(58,"p",40),f._uU(59),f.qZA(),f.TgZ(60,"div",41),f.YNc(61,wr,12,9,"ng-container",24),f.qZA(),f.qZA(),f.qZA(),f.TgZ(62,"div",34),f.TgZ(63,"button",42),f.NdJ("click",function(){return t.displayFirstScreen(!0)}),f._uU(64),f.qZA(),f.TgZ(65,"button",35),f.NdJ("click",function(){return t.submitSecondForm(t.addForm)}),f.YNc(66,qr,1,0,"i",43),f._uU(67),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(68,"div",9),f.TgZ(69,"div",44),f.TgZ(70,"div",37),f.YNc(71,Dr,2,0,"div",12),f.TgZ(72,"div",13),f.TgZ(73,"h2",14),f._uU(74),f.qZA(),f.TgZ(75,"p",15),f._uU(76),f.qZA(),f.qZA(),f.TgZ(77,"div",45),f.TgZ(78,"a",46),f.YNc(79,Zl,27,16,"ul",47),f.qZA(),f.YNc(80,Fl,4,5,"div",48),f.YNc(81,Tl,3,6,"div",48),f.qZA(),f.TgZ(82,"div",49),f.YNc(83,Ll,4,3,"div",50),f.TgZ(84,"div",51),f.TgZ(85,"button",42),f.NdJ("click",function(){return t.addForm.controls.properties.controls.length?t.displaySecondScreen():t.displayFirstScreen(!0)}),f._uU(86),f.qZA(),f.TgZ(87,"button",35),f.NdJ("click",function(){return t.goToLoginScreen()}),f._uU(88),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(89,"div",52),f.TgZ(90,"div",11),f.YNc(91,Ml,2,0,"div",12),f.TgZ(92,"div",13),f.TgZ(93,"h2",14),f._uU(94),f.qZA(),f.TgZ(95,"p",15),f._uU(96),f.qZA(),f.qZA(),f.TgZ(97,"div",53),f.TgZ(98,"app-yelowcab-login",54),f.NdJ("callBackObject",function(e){return t.showLoginSingUpPage(e)})("backClick",function(){return t.displayThirdScreen()}),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(99,"div",55),f.TgZ(100,"div",11),f.TgZ(101,"div",56),f.TgZ(102,"button",57),f.NdJ("click",function(){return t.displayThirdScreen()}),f._UZ(103,"i",58),f.TgZ(104,"span"),f._uU(105),f.qZA(),f.qZA(),f.TgZ(106,"div",59),f.TgZ(107,"h2",14),f._uU(108),f.qZA(),f.TgZ(109,"p",15),f._uU(110),f.qZA(),f.qZA(),f.qZA(),f.TgZ(111,"div",60),f.YNc(112,Vl,1,8,"app-payment-gatway-list",61),f.qZA(),f.qZA(),f.qZA(),f.TgZ(113,"div",55),f.TgZ(114,"div",11),f.TgZ(115,"div",13),f.TgZ(116,"h2",14),f._uU(117),f.qZA(),f.TgZ(118,"p",15),f._uU(119),f.qZA(),f.qZA(),f.TgZ(120,"div",62),f.TgZ(121,"div",63),f._UZ(122,"i",64),f.qZA(),f.TgZ(123,"h1",65),f._uU(124),f.qZA(),f.TgZ(125,"p",66),f._uU(126),f.qZA(),f.TgZ(127,"button",67),f.NdJ("click",function(){return t.ViewUpdate(!0)}),f._uU(128),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(129,Ul,14,2,"div",68),f.TgZ(130,"div",69),f.TgZ(131,"div",70),f.TgZ(132,"form",71),f.TgZ(133,"div",72),f.TgZ(134,"div",73),f.TgZ(135,"h4",74),f._uU(136,"Select Destination"),f.qZA(),f.TgZ(137,"button",75),f.NdJ("click",function(){return t.closeFixDestinationPopup()}),f.TgZ(138,"span",76),f._uU(139,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(140,Il,2,1,"div",77),f.TgZ(141,"div",78),f.TgZ(142,"button",79),f.NdJ("click",function(){return t.submitZonePricing()}),f._uU(143," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(144,"div",80),f.TgZ(145,"div",70),f.TgZ(14
16,"form",81),f.NdJ("ngSubmit",function(){return t.submitUserPickUpLocationForm()}),f.TgZ(147,"div",72),f.TgZ(148,"div",73),f.TgZ(149,"h4",82),f._uU(150,"Pickup Saved Address"),f.qZA(),f.TgZ(151,"button",75),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f.TgZ(152,"span",76),f._uU(153,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(154,"div",83),f.TgZ(155,"div",84),f.YNc(156,jl,7,3,"label",85),f.qZA(),f.qZA(),f.TgZ(157,"div",78),f.TgZ(158,"button",86),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f._uU(159,"Cancel"),f.qZA(),f.TgZ(160,"button",87),f._uU(161,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(162,"div",88),f.TgZ(163,"div",70),f.TgZ(164,"form",81),f.NdJ("ngSubmit",function(){return t.submitUserDropoffLocationForm()}),f.TgZ(165,"div",72),f.TgZ(166,"div",73),f.TgZ(167,"h4",89),f._uU(168,"Dropoff Saved Address"),f.qZA(),f.TgZ(169,"button",75),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f.TgZ(170,"span",76),f._uU(171,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(172,"div",83),f.TgZ(173,"div",84),f.YNc(174,Rl,7,3,"label",85),f.qZA(),f.qZA(),f.TgZ(175,"div",78),f.TgZ(176,"button",86),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f._uU(177,"Cancel"),f.qZA(),f.TgZ(178,"button",87),f._uU(179,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){let e;f.ekj("is-vehicle-step",t.displayThirdForm)("is-map-collapsed",!t.mobileMapOpen),f.xp6(1),f.ekj("is-collapsed",!t.mobileMapOpen),f.xp6(4),f.ekj("is-map-hidden",!t.mobileMapOpen),f.uIk("aria-expanded",t.mobileMapOpen),f.xp6(1),f.Q6J("ngClass",t.mobileMapOpen?"fa-chevron-down":"fa-map"),f.xp6(2),f.Oqu(t.mobileMapOpen?(null==t.currentLanguage?null:t.currentLanguage.hide_map)||"Hide map":(null==t.currentLanguage?null:t.currentLanguage.show_map)||"Show map"),f.xp6(1),f.ekj("is-map-collapsed",!t.mobileMapOpen)("is-vehicle-step",t.displayThirdForm),f.xp6(1),f.Q6J("formGroup",t.addForm),f.xp6(1),f.Q6J("hidden",!t.displayFirstForm)("ngClass",f.l5B(112,zl,t.is_full_screen,!t.is_full_screen,!t.displayFirstForm,t.displayFirstForm&&!t.is_full_screen)),f.xp6(3),f.Q6J("ngIf",t.loadingState),f.xp6(3),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.book_ride)||"Book your ride"),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.where_pickup)||"Set pickup and destination"),f.xp6(2),f.Q6J("ngIf",1!=t.transactionCategory.length),f.xp6(2),f.Q6J("ngClass",f.VKq(117,Ya,t.formErrors.pickup_location)),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.search_pick_location)("isBooing",!0)("responseData",t.responseData)("searchText",t.searchText)("is_disable",!t.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",t.formErrors.pickup_location),f.xp6(1),f.Q6J("ngIf",!t.pickupRegionFound),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.checkpoints.controls),f.xp6(1),f.Q6J("ngIf",0==t.fixZoneDisableDropoff&&(null==(e=t.addForm.get("checkpoints"))||null==e.value?null:e.value.length)<=2),f.xp6(1),f.Q6J("ngClass",f.VKq(119,Ya,t.formErrors.destination)),f.xp6(1),f.Q6J("is_disable",t.fixZoneDisableDropoff||!t.addForm.value.booking_type_id)("placeholder",null==t.currentLanguage?null:t.currentLanguage.search_des_loc)("responseData",t.responseDataDestionation)("isBooing",!0)("searchText",t.searchTextDestionation),f.xp6(1),f.Q6J("ngIf",t.formErrors.destination),f.xp6(1),f.Q6J("ngIf",!t.dropRegionFound),f.xp6(1),f.Q6J("ngIf",t.rideType.length>1),f.xp6(1),f.Q6J("ngIf",2==t.selectedTab),f.xp6(1),f.Q6J("ngIf","Y"==t.checkGenderEnable),f.xp6(1),f.Q6J("ngIf",t.checkReturnTimeConfig&&"hourly"!=t.bookingTypeKey&&"package"!=t.bookingTypeKey),f.xp6(1),f.Q6J("ngIf",t.displayFlightNumber),f.xp6(1),f.Q6J("ngIf",(null==t.otherChargesArray?null:t.otherChargesArray.length)>0),f.xp6(2),f.Q6J("title",(null==t.currentLanguage?null:t.currentLanguage.note_for_driver)||"Notes")("assets",t.bookingAssetsList)("compact",!0),f.xp6(2),f.Akn(f.WLB(121,Jl,null==t.themeCodeData?null:t.themeCodeData.user_primary_color,null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.addForm.controls.checkpoints.invalid||!t.showNextButton||!t.pickupRegionFound||!t.dropRegionFound||t.sameZoneTripRestricted),f.xp6(1),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.continue)||"Continue"," "),f.xp6(1),f.Q6J("hidden",!t.displaySecondForm)("ngClass",f.l5B(124,zl,t.is_full_screen,!t.is_full_screen,!t.displaySecondForm,t.displaySecondForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(129,Bl,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(131,Yl,t.is_full_screen,!t.is_full_screen)),f.xp6(3),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.details)||"Trip details"),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.complete_details)||"Review trip preferences"),f.xp6(2),f.Q6J("ngIf",t.selectedFlightObj),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details_screen_title),f.xp6(2),f.hij("",null==t.currentLanguage?null:t.currentLanguage.details_screen_sub_title,"."),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.properties.controls),f.xp6(3),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.back)||"Back"," "),f.xp6(1),f.Akn(f.WLB(134,Jl,null==t.themeCodeData?null:t.themeCodeData.user_primary_color,null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.isDocumentUploading),f.xp6(1),f.Q6J("ngIf",t.isDocumentUploading),f.xp6(1),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.continue)||"Continue"," "),f.xp6(1),f.Q6J("hidden",!t.displayThird
1Form)("ngClass",f.l5B(137,zl,t.is_full_screen,!t.is_full_screen,!t.displayThirdForm,t.displayThirdForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(142,Bl,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(144,Yl,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(3),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.service)||"Choose vehicle"),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.select_vehicle)||"Pick a service for your trip"),f.xp6(3),f.Q6J("ngForOf",t.filterVehicleArray),f.xp6(1),f.Q6J("ngIf","package"==t.bookingTypeKey),f.xp6(1),f.Q6J("ngIf","hourly"==t.bookingTypeKey),f.xp6(2),f.Q6J("ngIf",t.displayLuggagePassenger||t.paymentMode.length>1),f.xp6(3),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.back)||"Back"," "),f.xp6(1),f.Akn(f.WLB(147,Jl,null==t.themeCodeData?null:t.themeCodeData.user_primary_color,null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.disableBtn),f.xp6(1),f.hij(" ",(null==t.currentLanguage?null:t.currentLanguage.continue)||"Continue"," "),f.xp6(1),f.Q6J("hidden",!t.displayLoginForm),f.xp6(2),f.Q6J("ngIf",t.loadingState),f.xp6(3),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.login)||"Login"),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.login_information)||"Sign in to continue booking"),f.xp6(2),f.Q6J("isOtpVerification",t.isOtpVerification)("showBackButton",!0),f.xp6(1),f.Q6J("hidden",!t.displayPaymentForm),f.xp6(3),f.uIk("aria-label",(null==t.currentLanguage?null:t.currentLanguage.back)||"Back"),f.xp6(3),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.back)||"Back"),f.xp6(3),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.payment)||"Payment"),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.checkout)||"Complete your booking"),f.xp6(2),f.Q6J("ngIf",t.showPaymetScreen),f.xp6(1),f.Q6J("hidden",!t.displayThankYouForm),f.xp6(4),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.checkout)||"Checkout"),f.xp6(2),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.thank_you)||"Booking confirmed"),f.xp6(5),f.Oqu(t.content),f.xp6(2),f.AsE("",null==t.currentLanguage?null:t.currentLanguage.trip_id," #",t.trip_number,""),f.xp6(1),f.Akn(f.WLB(150,Jl,null==t.themeCodeData?null:t.themeCodeData.user_primary_color,null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.book_another_ride," "),f.xp6(1),f.Q6J("ngIf",!t.fixZoneDisableDropoff),f.xp6(11),f.Q6J("ngIf",t.zonePriceData.length>0),f.xp6(16),f.Q6J("ngForOf",t.userPickipLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserPickupLocation),f.xp6(14),f.Q6J("ngForOf",t.userDropoffLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserDropoffLocation)}},directives:[n.mk,r._Y,r.JL,r.sg,n.O5,J.n,r.CE,n.sg,B.F,we,r.F,u.w9,r.JJ,r.oH,r.x0,d.DJ,r._,r.Fj,r.On,u.xv,n.PC,r.u,W.Y,qe.X],pipes:[De.GP,De.ZQ,n.uU,De.SC,Oe.D,n.JJ,Le],styles:['[_nghost-%COMP%]{display:block;position:fixed;top:0;left:0;right:0;bottom:0;z-index:2;background:transparent;--yc-panel-bg: #ffffff;--yc-panel-ink: #15202b;--yc-panel-muted: #6b7a8a;--yc-panel-line: #e3e9f0;--yc-panel-soft: #f4f7fa;--yc-radius: 16px;--yc-brand: var(--bs-primary-theme-color, #1f2937);--yc-brand-ink: var(--bs-secondary-theme-color, #ffffff)}.yc-map-booking[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:hidden}.yc-map-booking__form[_ngcontent-%COMP%] .booking-form[hidden][_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .booking-form-w-booking[hidden][_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .booking-form-two-column[hidden][_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .custom[hidden][_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-step[hidden][_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .hidden-width[_ngcontent-%COMP%]{display:none!important}.yc-map-booking__map[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1;width:100%;height:100%!important;min-height:100%!important;max-height:none!important}.yc-map-booking__map[_ngcontent-%COMP%] .g-map[_ngcontent-%COMP%], .yc-map-booking__map[_ngcontent-%COMP%] #gmap-map-booking[_ngcontent-%COMP%]{width:100%;height:100%;border:0;outline:none}.yc-map-booking__mobile-toggle[_ngcontent-%COMP%]{position:absolute;
1left:50%;top:auto;bottom:12px;transform:translate(-50%);z-index:5;border:0;border-radius:999px;padding:8px 14px;background:#fff;box-shadow:0 6px 18px #15202b24;font-size:13px;font-weight:600;color:var(--yc-panel-ink);display:none;align-items:center;grid-gap:8px;gap:8px}.yc-map-booking__form[_ngcontent-%COMP%]{position:absolute;top:16px;right:16px;bottom:16px;z-index:3;width:min(540px,calc(100% - 32px));max-width:560px;display:flex;flex-direction:column;background:var(--yc-panel-bg);border-radius:var(--yc-radius);box-shadow:0 16px 40px #15202b2e;overflow:hidden;margin:0}.yc-map-booking__form[_ngcontent-%COMP%] > form[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%;overflow:hidden}.yc-map-booking__form[_ngcontent-%COMP%] .booking-form[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .booking-form-w-booking[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .booking-form-two-column[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .custom[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-step[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .default-width[_ngcontent-%COMP%]{position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;width:100%!important;max-width:100%!important;min-height:0!important;height:100%!important;margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;overflow:hidden!important}.yc-map-booking__form[_ngcontent-%COMP%] .booking-form-center[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .booking-form-center-w-booking[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .bookingWidget_bookingWidgetContainer___FTYH[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .rwt__tabs[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .input-info0[_ngcontent-%COMP%]{max-height:none!important;height:100%!important;min-height:0!important;overflow:hidden!important;width:100%!important;border:0!important;box-shadow:none!important;background:transparent!important;display:flex!important;flex-direction:column!important;flex:1 1 auto!important}.yc-map-booking__form[_ngcontent-%COMP%] .row.input-info[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;height:auto!important;min-height:0!important;overflow:visible!important;flex:0 0 auto!important;margin-left:-8px;margin-right:-8px}.yc-map-booking__form[_ngcontent-%COMP%] .row.input-info[_ngcontent-%COMP%] > [class*=col-][_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] > [class*=col-][_ngcontent-%COMP%]{height:auto!important;min-height:0!important;overflow:visible!important;flex:0 0 50%;max-width:50%;padding-left:8px;padding-right:8px;width:50%!important}.yc-map-booking__form[_ngcontent-%COMP%] .booking-form-inner[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .booking-form-inner-w-booking[_ngcontent-%COMP%]{background:transparent!important;border-radius:0!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;flex:1 1 auto!important}.yc-map-panel-head[_ngcontent-%COMP%]{flex:0 0 auto!important;padding:18px 18px 8px;background:#fff;z-index:2}.yc-map-panel-title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:700;color:var(--yc-panel-ink);letter-spacing:-.02em}.yc-map-panel-sub[_ngcontent-%COMP%]{margin:4px 0 0;font-size:.85rem;color:var(--yc-panel-muted)}.yc-map-panel-head--with-back[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px}.yc-map-panel-head--with-back[_ngcontent-%COMP%] .yc-map-panel-head__text[_ngcontent-%COMP%]{min-width:0;flex:1 1 auto}.yc-panel-back[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;grid-gap:6px;gap:6px;min-height:40px;padding:0 12px;border:1px solid #cfd8e3;border-radius:10px;background:#fff;color:var(--yc-panel-ink);font-size:.85rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase;cursor:pointer}.yc-panel-back[_ngcontent-%COMP%]:hover{background:var(--yc-panel-soft)}.yc-map-panel-body[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .flex-fill.yc-map-panel-body[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .vehicle-step-scroll.yc-map-panel-body[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .flex-fill.yc-map-panel-body[_ngcontent-%COMP%]{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;padding:8px 18px 12px!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-actions[_ngcontent-%COMP%] .flex-fill[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-meta-select[_ngcontent-%COMP%]{flex:1 1 auto!important;min-height:38px!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:0!important}.yc-map-actions[_ngcontent-%COMP%]{flex:0 0 auto!important;margin-top:auto!important;position:relative;z-index:5;display:flex!important;align-items:stretch;grid-gap:10px;gap:10px;width:100%;padding:12px 16px;background:#fff;border-top:1px solid var(--yc-panel-line);box-shadow:0 -8px 18px #15202b0f;overflow:visible!important}.yc-map-actions--stacked[_ngcontent-%COMP%]{flex-direction:column;overflow:visible!important}.yc-map-actions__row[_ngcontent-%COMP%]{display:flex;grid-gap:10px;gap:10px;width:100%}.yc-map-meta-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));grid-gap:8px;gap:8px;width:100%;overflow:visible!important;position:relative;z-index:20}.yc-map-meta-field[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:6px;gap:6px;background:var(--yc-panel-soft);border:1px solid var(--yc-panel-line);border-radius:12px;padding:4px 8px;overflow:visible!important;position:relative;min-width:0}.yc-map-meta-icon[_ngcontent-%COMP%]{color:var(--yc-panel-muted);flex:0 0 auto}.yc-map-booking__form[_ngcontent-%COMP%] .yc-meta-select.ng-select[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-meta-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{min-height:36px!important;border:0!important;background:transparent!important;box-shadow:none!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-meta-select[_ngcontent-%COMP%] .ng-dropdown-panel[_ngcontent-%COMP%]{min-width:140px;z-index:1050!important}.yc-btn[_ngcontent-%COMP%]{border:0;border-radius:12px;min-height:48px;height:48px;padding:0 16px;font-size:.95rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase;transition:transform .15s ease,opacity .15s ease,background .15s ease;white-space:nowrap}.yc-btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.yc-btn--ghost[_ngcontent-%COMP%]{flex:0 0 34%;max-width:140px;background:#fff;color:var(--yc-panel-ink);border:1px solid #cfd8e3}.yc-btn--ghost[_ngcontent-%COMP%]:not(:disabled):hover{background:var(--yc-panel-soft)}.yc-btn--primary[_ngcontent-%COMP%]{flex:1 1 auto;background:var(--yc-brand);color:var(--yc-brand-ink);box-shadow:0 8px 18px #15202b29}.yc-btn--primary[_ngcontent-%COMP%]:not(:disabled):hover{transform:translateY(-1px)}.yc-map-booking__form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] textarea.form-control[_ngcontent-%COMP%]{border-radius:12px!important;border-color:#d5dde7!important;min-height:44px;background:#fff!important}.yc-map-booking__form[_ngcontent-%COMP%] textarea.form-control[_ngcontent-%COMP%]{min-height:72px;max-height:90px;resize:none}.yc-map-booking__form[_ngcontent-%COMP%] .control-label[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] label.fw-semibold[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .font-weight-600[_ngcontent-%COMP%]{color:var(--yc-panel-ink)!important;font-size:.9rem}.yc-map-booking__form[_ngcontent-%COMP%] .add-checkpoint[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;margin:4px 0 12px;color:var(--yc-brand);font-weight:600;text-decoration:none}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-step--login[_ngcontent-%COMP%], .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-step--login[_ngcontent-%COMP%] .booking-form-inner[_ngcontent-%COMP%]{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;padding-bottom:0!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%] app-yelowcab-login, .yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%] .yc-login-embed{dis
1play:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%] .booking-form-body{padding:8px 0 12px!important;margin:0!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%] .yc-login-actions{margin:0 -18px;border-radius:0 0 16px 16px}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%] .yc-login-btn--ghost{border:1px solid #cfd8e3!important;background:#fff!important;color:#15202b!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-panel-body--login[_ngcontent-%COMP%] .yc-login-btn--primary{border:0!important}.yc-map-booking__form[_ngcontent-%COMP%] .yc-vehicle-list[_ngcontent-%COMP%]{margin:0 0 10px;padding:0;list-style:none}.yc-map-booking__form[_ngcontent-%COMP%] .yc-vehicle-item[_ngcontent-%COMP%]{margin-bottom:10px;padding:12px;border:1px solid var(--yc-panel-line);border-radius:12px;background:#fff;cursor:pointer;transition:background .15s ease,border-color .15s ease}.yc-map-booking__form[_ngcontent-%COMP%] .yc-vehicle-item.list-focus[_ngcontent-%COMP%]{border:2px solid #15202b!important;border:2px solid var(--yc-brand, #15202b)!important;background-color:#f0f2f7!important;background-color:var(--yc-panel-soft, #f0f2f7)!important}.yc-vehicle-card[_ngcontent-%COMP%]{display:flex;align-items:flex-start;grid-gap:10px;gap:10px;min-width:0}.yc-vehicle-card__img[_ngcontent-%COMP%]{width:64px;height:52px;min-width:64px;-o-object-fit:contain;object-fit:contain;flex:0 0 auto}.yc-vehicle-card__main[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.yc-vehicle-card__top[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;grid-gap:8px;gap:8px}.yc-vehicle-card__info[_ngcontent-%COMP%]{min-width:0;flex:1 1 auto}.yc-vehicle-card__title[_ngcontent-%COMP%]{margin:0;font-size:.95rem;font-weight:700;color:#15202b;line-height:1.25;word-break:break-word}.yc-vehicle-card__desc[_ngcontent-%COMP%]{margin:2px 0 0;font-size:.75rem;color:#6b7a8a;line-height:1.3}.yc-vehicle-card__price[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:4px;gap:4px;flex:0 0 auto;max-width:42%}.yc-vehicle-card__from[_ngcontent-%COMP%]{font-size:.7rem;color:#6b7a8a;white-space:nowrap}.yc-vehicle-card__fare[_ngcontent-%COMP%]{font-size:.95rem;font-weight:700;color:#15202b;white-space:nowrap;line-height:1.2}.yc-vehicle-card__toggle[_ngcontent-%COMP%]{border:0;background:transparent;padding:2px 4px;color:#15202b;line-height:1;cursor:pointer}.yc-vehicle-card__meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;grid-gap:8px 12px;gap:8px 12px;margin-top:8px}.yc-vehicle-meta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:4px;gap:4px;color:#15202b;font-size:.85rem;white-space:nowrap}.yc-vehicle-meta__value[_ngcontent-%COMP%]{white-space:nowrap;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.yc-map-booking__form[_ngcontent-%COMP%] .yc-map-actions[_ngcontent-%COMP%] .yc-btn--primary[_ngcontent-%COMP%]:only-child{flex:1 1 100%;max-width:none}@media (max-width: 991.98px){.yc-map-booking__map[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1}.yc-map-booking__map.is-collapsed[_ngcontent-%COMP%]{height:52px!important;min-height:52px!important;max-height:52px!important;bottom:auto}.yc-map-booking__map.is-collapsed[_ngcontent-%COMP%] .g-map[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.yc-map-booking__mobile-toggle[_ngcontent-%COMP%]{display:inline-flex;z-index:6;bottom:calc(min(72vh,100% - 64px) + 10px);top:auto}.yc-map-booking.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed) .yc-map-booking__mobile-toggle[_ngcontent-%COMP%]{bottom:calc(min(58vh,100% - 36vh) + 10px)}.yc-map-booking.is-map-collapsed[_ngcontent-%COMP%] .yc-map-booking__mobile-toggle[_ngcontent-%COMP%], .yc-map-booking__mobile-toggle.is-map-hidden[_ngcontent-%COMP%]{top:10px;bottom:auto}.yc-map-booking__form[_ngcontent-%COMP%]{top:auto;right:0;left:0;bottom:0;width:100%;max-width:none;height:min(72vh,calc(100% - 64px));border-radius:20px 20px 0 0;box-shadow:0 -12px 28px #15202b29;z-index:3;transition:height .2s ease,top .2s ease}.yc-map-booking__form.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed){height:min(58vh,calc(100% - 36vh));max-height:58vh}.yc-map-booking__form.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed) .yc-map-panel-head[_ngcontent-%COMP%]{padding:12px 16px 4px}.yc-map-booking__form.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed) .yc-map-panel-title[_ngcontent-%COMP%]{font-size:1.1rem}.yc-map-booking__form.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed) .yc-map-panel-sub[_ngcontent-%COMP%]{font-size:.8rem;margin-top:2px}.yc-map-booking__form.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed) .vehicle-step-scroll.yc-map-panel-body[_ngcontent-%COMP%]{flex:1 1 auto!important;min-height:104px!important;max-height:none!important;padding:4px 14px 8px!important}.yc-map-booking__form.is-vehicle-step[_ngcontent-%COMP%]:not(.is-map-collapsed) .yc-map-actions[_ngcontent-%COMP%]{padding-top:8px!important;padding-bottom:10px!important}.yc-map-booking__form.is-map-collapsed[_ngcontent-%COMP%]{top:52px;height:calc(100% - 52px);border-radius:20px 20px 0 0}.yc-btn--ghost[_ngcontent-%COMP%]{flex:0 0 32%}.yc-vehicle-card__img[_ngcontent-%COMP%]{width:52px;height:42px;min-width:52px}.yc-vehicle-card__title[_ngcontent-%COMP%]{font-size:.88rem}.yc-vehicle-card__fare[_ngcontent-%COMP%]{font-size:.88rem}.yc-vehicle-card__price[_ngcontent-%COMP%]{max-width:46%}.yc-map-booking__form[_ngcontent-%COMP%] .yc-vehicle-item[_ngcontent-%COMP%]{padding:10px}.yc-map-meta-row[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}.yc-map-meta-field[_ngcontent-%COMP%]:nth-child(3){grid-column:1 / -1}}.document-field[_ngcontent-%COMP%]{width:100%;margin-bottom:0}.document-field-row[_ngcontent-%COMP%]{display:flex;align-items:stretch;width:100%;min-height:42px;border:1px solid #ced4da;border-radius:4px;background:#fff;overflow:hidden}.document-field.has-error[_ngcontent-%COMP%] .document-field-row[_ngcontent-%COMP%]{border-color:#dc3545}
1.document-field-name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;align-items:center;grid-gap:8px;gap:8px;padding:.5rem .75rem;color:#6c757d;font-size:14px;background:#fff}.document-field-name.has-file[_ngcontent-%COMP%]{color:#212529}.document-field-name[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{flex-shrink:0;color:#495057;color:var(--bs-primary-theme-color, #495057)}.document-field-name-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-field-upload[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:0 1rem;margin:0;border:none;border-left:1px solid #ced4da;background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;font-size:14px;font-weight:600;line-height:1.2;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;overflow:hidden}.document-field-upload[_ngcontent-%COMP%]:hover:not(.is-disabled){filter:brightness(.95)}.document-field-upload.is-disabled[_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%]{opacity:.75;cursor:not-allowed}.document-field-upload[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;font-size:0}.document-field-upload.is-disabled[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{pointer-events:none}.document-field-remove[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:0;margin:0;border:none;border-left:1px solid #ced4da;background:color-mix(in srgb,#343a40 12%,#fff);background:color-mix(in srgb,var(--bs-primary-theme-color, #343a40) 12%,#fff);color:#343a40;color:var(--bs-primary-theme-color, #343a40);font-size:16px;cursor:pointer}.document-field-remove[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{color:inherit}.document-field-remove[_ngcontent-%COMP%]:hover{background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;color:var(--bs-secondary-theme-color, #fff)}.document-field-hint[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12px;color:#6c757d;line-height:1.3}']}),e})();const Hl=["gmap"];function $l(e,t){if(1&e&&(f.TgZ(0,"span",24),f._UZ(1,"i",25),f._uU(2),f.qZA()),2&e){const e=f.oxw(2);let t;f.xp6(2),f.hij("",null==e.addForm||null==(t=e.addForm.get("flight_number"))?null:t.value," ")}}function Gl(e,t){1&e&&(f.TgZ(0,"span",24),f._UZ(1,"i",25),f._uU(2,"Add flight ... "),f.qZA())}const Kl=function(){return{standalone:!0}};function Wl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",26),f.TgZ(1,"ng-select",27),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw(2).changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(5,Kl))("searchable",!1)}}function Xl(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",8),f.TgZ(1,"div",9),f._UZ(2,"img",10),f.qZA(),f.TgZ(3,"div",11),f.NdJ("click",function(t){return f.CHM(e),f.oxw().toggleEditTripBar(t)}),f.TgZ(4,"div",12),f.TgZ(5,"span",13),f._uU(6),f.qZA(),f.TgZ(7,"span",14),f._uU(8,"\u2192"),f.qZA(),f.TgZ(9,"span",13),f._uU(10),f.qZA(),f.qZA(),f._UZ(11,"div",15),f.TgZ(12,"div",16),f.TgZ(13,"span",17),f._uU(14),f.ALo(15,"date"),f.qZA(),f.YNc(16,$l,3,1,"span",18),f.YNc(17,Gl,3,0,"span",18),f.TgZ(18,"span",19),f._uU(19),f.qZA(),f.qZA(),f.qZA(),f.TgZ(20,"div",20),f.YNc(21,Wl,2,6,"div",21),f.TgZ(22,"button",22),f._UZ(23,"span",23),f._UZ(24,"span",23),f._UZ(25,"span",23),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();let t,i,n,o;f.xp6(2),f.Q6J("src",e.company_logo?e.company_logo:"assets/img/logo.svg",f.LSH),f.xp6(4),f.Oqu((null==e.addForm||null==(t=e.addForm.get("pickup_location"))?null:t.value)||"London City Airport (L..."),f.xp6(4),f.Oqu((null==e.addForm||null==(i=e.addForm.get("destination"))?null:i.value)||"Northolt Airport (NHT)"),f.xp6(4),f.Oqu(e.request_time?f.xi3(15,8,e.request_time,"EEE, MMMM d"):"Thu, October 1"),f.xp6(2),f.Q6J("ngIf",null==e.addForm||null==(n=e.addForm.get("flight_number"))?null:n.value),f.xp6(1),f.Q6J("ngIf",!(null!=e.addForm&&null!=(o=e.addForm.get("flight_number"))&&o.value)),f.xp6(2),f.Oqu(e.formattedPickupTime||"06:50 PM"),f.xp6(2),f.Q6J("ngIf",(null==e.languageList?null:e.languageList.length)>1)}}function es(e,t){if(1&e&&f._UZ(0,"span",58),2&e){const e=f.oxw(3);f.Q6J("innerHTML",e.formErrors.booking_type_id,f.oJD)}}function ts(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",55),f.TgZ(1,"label",34),f._uU(2),f.qZA(),f.TgZ(3,"div",56),f.NdJ("click",function(e){return e.stopPropagation()}),f.TgZ(4,"ng-select",57),f.NdJ("change",function(t){return f.CHM(e),f.oxw(2).onEditBarBookingTypeChange(t)}
1),f.qZA(),f.qZA(),f.YNc(5,es,1,1,"span",38),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.choose_trn_mode)||"Booking type"),f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.select_booking_type)||"Select booking type")("items",e.transactionCategory)("clearable",!1)("formControl",e.addForm.controls.booking_type_id)("searchable",!1),f.xp6(1),f.Q6J("ngIf",e.formErrors.booking_type_id)}}function is(e,t){if(1&e&&(f.TgZ(0,"div",55),f.TgZ(1,"label",34),f._uU(2),f.qZA(),f.TgZ(3,"div",49),f.TgZ(4,"span",59),f._uU(5),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.choose_trn_mode)||"Booking type"),f.xp6(3),f.Oqu((null==e.selectedBookingTypeObj?null:e.selectedBookingTypeObj.title)||(null==e.transactionCategory[0]?null:e.transactionCategory[0].title))}}function ns(e,t){1&e&&f._UZ(0,"div",41)}function os(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",60),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).clearField("pickup_location")}),f._uU(1,"\xd7"),f.qZA()}}function as(e,t){if(1&e&&f._UZ(0,"span",58),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.pickup_location,f.oJD)}}function rs(e,t){if(1&e&&(f.TgZ(0,"span",61),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.ser_not_av)}}function ls(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",60),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).clearField("destination")}),f._uU(1,"\xd7"),f.qZA()}}function ss(e,t){if(1&e&&f._UZ(0,"span",58),2&e){const e=f.oxw(2);f.Q6J("innerHTML",e.formErrors.destination,f.oJD)}}function us(e,t){if(1&e&&(f.TgZ(0,"span",61),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.ser_not_av)}}function ds(e,t){if(1&e&&(f.TgZ(0,"span",74),f._uU(1),f.qZA()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.Oqu(e.dayNumber)}}function cs(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",72),f.NdJ("click",function(t){const i=f.CHM(e).$implicit;return f.oxw(3).selectCalendarDay(i,t)}),f.YNc(1,ds,2,1,"span",73),f.qZA()}if(2&e){const e=t.$implicit;f.ekj("is-empty",!e.isCurrentMonth)("is-selected",e.isSelected),f.xp6(1),f.Q6J("ngIf",e.isCurrentMonth)}}function hs(e,t){if(1&e){const e=f.EpF();f.O4$(),f.kcU(),f.TgZ(0,"div",62),f.NdJ("click",function(e){return e.stopPropagation()}),f.TgZ(1,"div",63),f.TgZ(2,"button",64),f.NdJ("click",function(t){return f.CHM(e),f.oxw(2).prevMonth(t)}),f.O4$(),f.TgZ(3,"svg",65),f._UZ(4,"polyline",66),f.qZA(),f.qZA(),f.kcU(),f.TgZ(5,"span",67),f._uU(6),f.qZA(),f.TgZ(7,"button",64),f.NdJ("click",function(t){return f.CHM(e),f.oxw(2).nextMonth(t)}),f.O4$(),f.TgZ(8,"svg",65),f._UZ(9,"polyline",68),f.qZA(),f.qZA(),f.qZA(),f.kcU(),f.TgZ(10,"div",69),f.TgZ(11,"span"),f._uU(12,"Su"),f.qZA(),f.TgZ(13,"span"),f._uU(14,"Mo"),f.qZA(),f.TgZ(15,"span"),f._uU(16,"Tu"),f.qZA(),f.TgZ(17,"span"),f._uU(18,"We"),f.qZA(),f.TgZ(19,"span"),f._uU(20,"Th"),f.qZA(),f.TgZ(21,"span"),f._uU(22,"Fr"),f.qZA(),f.TgZ(23,"span"),f._uU(24,"Sa"),f.qZA(),f.qZA(),f.TgZ(25,"div",70),f.YNc(26,cs,2,5,"div",71),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(6),f.Oqu(e.calendarMonthYearTitle),f.xp6(20),f.Q6J("ngForOf",e.calendarDaysGrid)}}function gs(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",78),f.NdJ("click",function(t){const i=f.CHM(e).$implicit;return f.oxw(3).selectPickupTime(i,t)}),f._uU(1),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(3);f.ekj("is-selected",i.selectedPickupTimeStr===e),f.xp6(1),f.hij(" ",e," ")}}function ps(e,t){if(1&e&&(f.O4$(),f.kcU(),f.TgZ(0,"div",75),f.NdJ("click",function(e){return e.stopPropagation()}),f.TgZ(1,"div",76),f.YNc(2,gs,2,3,"div",77),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("ngForOf",e.timeSlotsList)}}function ms(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",79),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).closeEditTripBar()}),f.TgZ(1,"div",80),f.NdJ("click",function(e){return e.stopPropagation()}),f.TgZ(2,"div",81),f.TgZ(3,"div",82),f._UZ(4,"span",83),f._UZ(5,"span",83),f.qZA(),f.TgZ(6,"div",84),f.TgZ(7,"span",85),f._uU(8,"31"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(9,"h2",86),f._uU(10," Set the schedule or start booking."),f._UZ(11,"br"),f._uU(12,"We'll handle the rest. "),f.qZA(),f.qZA(),f.qZA()}}function _s(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",28),f.TgZ(1,"div",29),f.NdJ("click",function(e){return e.stopPropagation()}),f.TgZ(2,"div",30),f.YNc(3,ts,6,7,"div",31),f.YNc(4,is,6,2,"div",31),f.YNc(5,ns,1,0,"div",32),f.TgZ(6,"div",33),f.TgZ(7,"label",34),f._uU(8,"Pickup location"),f.qZA(),f.TgZ(9,"div",35),f.TgZ(10,"app-search-box-google",36),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearch(t)})("searchEvent",function(t){return f.CHM(e),f.oxw().searchEvent(t)})("dropdownOpenChange",function(t){return f.CHM(e),f.oxw().onLocationDropdownOpenChange(t)}
1),f.qZA(),f.YNc(11,os,2,0,"button",37),f.qZA(),f.YNc(12,as,1,1,"span",38),f.YNc(13,rs,2,1,"span",39),f.qZA(),f.TgZ(14,"div",33),f.TgZ(15,"label",34),f._uU(16,"Drop-off location"),f.qZA(),f.TgZ(17,"div",35),f.TgZ(18,"app-search-box-google",40),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchDestination(t)})("searchEvent",function(t){return f.CHM(e),f.oxw().searchEventDestination(t)})("dropdownOpenChange",function(t){return f.CHM(e),f.oxw().onLocationDropdownOpenChange(t)}),f.qZA(),f.YNc(19,ls,2,0,"button",37),f.qZA(),f.YNc(20,ss,1,1,"span",38),f.YNc(21,us,2,1,"span",39),f.qZA(),f._UZ(22,"div",41),f.TgZ(23,"div",42),f.NdJ("click",function(t){return f.CHM(e),f.oxw().toggleDatePicker(t)}),f.TgZ(24,"label",34),f._uU(25,"Date"),f.qZA(),f.TgZ(26,"div",43),f.TgZ(27,"span",44),f._uU(28),f.qZA(),f.O4$(),f.TgZ(29,"svg",45),f._UZ(30,"polyline",46),f.qZA(),f.qZA(),f.YNc(31,hs,27,2,"div",47),f.qZA(),f.kcU(),f.TgZ(32,"div",48),f.TgZ(33,"label",34),f._uU(34,"Flight number"),f.qZA(),f.TgZ(35,"div",49),f._UZ(36,"input",50),f.qZA(),f.qZA(),f.TgZ(37,"div",42),f.NdJ("click",function(t){return f.CHM(e),f.oxw().toggleTimePicker(t)}),f.TgZ(38,"label",34),f._uU(39,"Pickup time"),f.qZA(),f.TgZ(40,"div",43),f.TgZ(41,"span",44),f._uU(42),f.qZA(),f.O4$(),f.TgZ(43,"svg",45),f._UZ(44,"polyline",46),f.qZA(),f.qZA(),f.YNc(45,ps,3,1,"div",51),f.qZA(),f.kcU(),f.TgZ(46,"div",52),f.TgZ(47,"button",53),f.NdJ("click",function(){return f.CHM(e),f.oxw().applyEditTrip()}),f._uU(48," View options "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(49,ms,13,0,"div",54),f.qZA()}if(2&e){const e=f.oxw();let t,i;f.xp6(3),f.Q6J("ngIf",(null==e.transactionCategory?null:e.transactionCategory.length)>1),f.xp6(1),f.Q6J("ngIf",1===(null==e.transactionCategory?null:e.transactionCategory.length)),f.xp6(1),f.Q6J("ngIf",null==e.transactionCategory?null:e.transactionCategory.length),f.xp6(5),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.search_pick_location)("isBooing",!0)("responseData",e.responseData)("searchText",e.searchText)("is_disable",!e.addForm.value.booking_type_id)("appendTo",e.isEmbeddedInIframe?"body":null)("dropdownPosition",e.isEmbeddedInIframe?"bottom":"auto"),f.xp6(1),f.Q6J("ngIf",null==e.addForm||null==(t=e.addForm.get("pickup_location"))?null:t.value),f.xp6(1),f.Q6J("ngIf",e.formErrors.pickup_location),f.xp6(1),f.Q6J("ngIf",!e.pickupRegionFound),f.xp6(5),f.Q6J("is_disable",e.fixZoneDisableDropoff||!e.addForm.value.booking_type_id)("placeholder",null==e.currentLanguage?null:e.currentLanguage.search_des_loc)("responseData",e.responseDataDestionation)("isBooing",!0)("searchText",e.searchTextDestionation)("appendTo",e.isEmbeddedInIframe?"body":null)("dropdownPosition",e.isEmbeddedInIframe?"bottom":"auto"),f.xp6(1),f.Q6J("ngIf",null==e.addForm||null==(i=e.addForm.get("destination"))?null:i.value),f.xp6(1),f.Q6J("ngIf",e.formErrors.destination),f.xp6(1),f.Q6J("ngIf",!e.dropRegionFound),f.xp6(7),f.Oqu(e.formattedDateHeader),f.xp6(1),f.ekj("rotate-180",e.isDatePickerOpen),f.xp6(2),f.Q6J("ngIf",e.isDatePickerOpen),f.xp6(5),f.Q6J("formControl",e.addForm.controls.flight_number),f.xp6(6),f.Oqu(e.selectedPickupTimeStr),f.xp6(1),f.ekj("rotate-180",e.isTimePickerOpen),f.xp6(2),f.Q6J("ngIf",e.isTimePickerOpen),f.xp6(4),f.Q6J("ngIf",!e.isEmbeddedInIframe)}}function fs(e,t){1&e&&(f.TgZ(0,"div",92),f.TgZ(1,"div",93),f.TgZ(2,"span",94),f._uU(3,"Loading..."),f.qZA(),f.qZA(),f.qZA())}function vs(e,t){if(1&e&&(f.TgZ(0,"div",95),f._UZ(1,"i",96),f.TgZ(2,"div"),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(3),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.")}}function ys(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",97),f.TgZ(1,"div",98),f.TgZ(2,"h2",99),f._uU(3),f.qZA(),f.TgZ(4,"p",100),f._uU(5),f.qZA(),f.TgZ(6,"button",53),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).openTripSetup()}),f._uU(7),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(3),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.choose_your_experience)||"Choose your experience"),f.xp6(2),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.set_schedule_message)||"Set your pickup, drop-off, and time then view available vehicles."," "),f.xp6(2),f.hij(" ",e.isTripReady
1ForOptions()?(null==e.currentLanguage?null:e.currentLanguage.view_options)||"View options":(null==e.currentLanguage?null:e.currentLanguage.edit_trip)||"Edit trip"," ")}}function bs(e,t){if(1&e&&(f.TgZ(0,"div",116),f.TgZ(1,"p"),f._uU(2),f.qZA(),f.qZA()),2&e){const e=f.oxw(4);f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.no_data_found)||"No vehicle options available for this route.")}}function xs(e,t){if(1&e&&(f.TgZ(0,"span",141),f._uU(1),f.qZA()),2&e){const e=f.oxw(6);f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.from)||"From"," ")}}function ks(e,t){if(1&e&&(f.TgZ(0,"span"),f._uU(1),f.ALo(2,"roundFraction"),f.ALo(3,"bookingTotalFare"),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw(5);f.xp6(1),f.AsE(" ",(null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol)||"\xa3"," ",null!=e&&e.price?e.price:f.xi3(2,2,f.xi3(3,5,e,t.returnEnable),t.roundFormate)," ")}}function Zs(e,t){if(1&e&&(f.TgZ(0,"span"),f._uU(1),f.qZA()),2&e){const e=f.oxw(6);f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.meter)||"Meter"," ")}}function Cs(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",119),f.TgZ(1,"div",120),f.NdJ("click",function(){const t=f.CHM(e),i=t.$implicit,n=t.index;return f.oxw(5).selectExperienceVehicle(i,n)}),f.TgZ(2,"div",121),f._UZ(3,"img",122),f.qZA(),f.TgZ(4,"div",123),f.TgZ(5,"div",124),f.TgZ(6,"h3",125),f._uU(7),f.qZA(),f.TgZ(8,"div",126),f.YNc(9,xs,2,1,"span",127),f.YNc(10,ks,4,8,"span",128),f.YNc(11,Zs,2,1,"span",128),f.qZA(),f.qZA(),f.TgZ(12,"div",129),f.TgZ(13,"span",130),f.O4$(),f.TgZ(14,"svg",131),f._UZ(15,"path",132),f._UZ(16,"circle",133),f._UZ(17,"path",134),f._UZ(18,"path",135),f.qZA(),f.kcU(),f.TgZ(19,"span",136),f._uU(20),f.qZA(),f.qZA(),f.TgZ(21,"span",130),f.O4$(),f.TgZ(22,"svg",131),f._UZ(23,"rect",137),f._UZ(24,"path",138),f.qZA(),f.kcU(),f.TgZ(25,"span",136),f._uU(26),f.qZA(),f.qZA(),f.qZA(),f.TgZ(27,"div",139),f.TgZ(28,"a",140),f.NdJ("click",function(t){const i=f.CHM(e).$implicit;return f.oxw(5).openVehicleDetails(i,t)}),f._uU(29," View details "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.index,n=f.oxw(5);f.xp6(1),f.ekj("is-selected",n.isVehicleSelected(e,i)),f.xp6(2),f.s9C("alt",e.title),f.Q6J("src",n.getVehicleAssetImage(i,e),f.LSH),f.xp6(4),f.Oqu(e.title),f.xp6(2),f.Q6J("ngIf",n.startingFrom&&("Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2==(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2===(null==e.pricing?null:e.pricing.calculation_type))),f.xp6(1),f.Q6J("ngIf",3!==(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",3===(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(9),f.Oqu(e.capacity||(1===i?5:3)),f.xp6(6),f.Oqu(e.vehicle_luggage_capacity||(1===i?5:2))}}function Fs(e,t){if(1&e&&(f.TgZ(0,"div",117),f.YNc(1,Cs,30,10,"div",118),f.qZA()),2&e){const e=f.oxw(4);f.xp6(1),f.Q6J("ngForOf",e.displayExperienceVehicles)}}function Ts(e,t){if(1&e&&(f.TgZ(0,"div",112),f.TgZ(1,"h1",113),f._uU(2,"Choose your experience"),f.qZA(),f.YNc(3,bs,3,1,"div",114),f.YNc(4,Fs,2,1,"div",115),f.qZA()),2&e){const e=f.oxw(3);f.xp6(3),f.Q6J("ngIf",!e.loadingState&&0===e.displayExperienceVehicles.length),f.xp6(1),f.Q6J("ngIf",e.displayExperienceVehicles.length>0)}}function As(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",155),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(5).setPaymentMode(t)}),f._uU(1),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(5);f.ekj("is-active",i.addForm.controls.payment_mode_id.value===e.id),f.xp6(1),f.hij(" ",e.title||e.payment_mode_name||e.charges_key," ")}}function Ps(e,t){if(1&e&&(f.TgZ(0,"div",153),f.YNc(1,As,2,3,"button",154),f.qZA()),2&e){const e=f.oxw(4);f.xp6(1),f.Q6J("ngForOf",e.paymentMode)}}function ws(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",156),f.TgZ(1,"app-payment-gatway-list",157),f.NdJ("paymentSucsessBook",function(t){return f.CHM(e),f.oxw(4).afterPaymentSucsess(t)})("closePaymentMethod",function(t){return f.CHM(e),f.oxw(4).openPaymentGateway(t)})("requestBooking",function(){return f.CHM(e),f.oxw(4).onStripeRequestBooking()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(1),f.Q6J("pre_payment",e.pre_payment)("pre_payment_value",e.pre_payment_value)("tripPayload",e.tripPayload)("FinalFare",e.returnEnable?e.totalFInalFare:e.finalFare)("hideStyle",!0)("is_yelowCab",!0)("trip_id",e.tripId)("trip_num",e.trip_number)}}function qs(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",142),f.TgZ(1,"div",143),f.TgZ(2,"button",144),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).goBackToExperience()}),f.O4$(),f.TgZ(3,"svg",145),f._UZ(4,"line",146),f._UZ(5,"polyline",147),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"h1",148),f._uU(7,"Confirm your reservation"),f.qZA(),f.qZA(),f.TgZ(8,"div",149),f.TgZ(9,"h2",150),f._uU(10),f.qZA(),f.YNc(11,Ps,2,1,"div",151),f.YNc(12,ws,2,8,"div",152),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(3);
1f.xp6(10),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.payment)||"Payment"),f.xp6(1),f.Q6J("ngIf",(null==e.paymentMode?null:e.paymentMode.length)>0&&2!=e.addForm.controls.paymentMode.value),f.xp6(1),f.Q6J("ngIf",e.showPaymetScreen)}}function Ds(e,t){if(1&e&&(f.TgZ(0,"div",184),f._uU(1),f.qZA()),2&e){const e=f.oxw(4);f.xp6(1),f.AsE(" ",(null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol)||"\xa3"," ",e.currentSelectedPrice," ")}}function Os(e,t){if(1&e&&(f.TgZ(0,"p",185),f._uU(1),f.qZA()),2&e){const e=f.oxw(4);f.xp6(1),f.hij(" ",(null==e.currentSelectedVehicle?null:e.currentSelectedVehicle.description)||"Mercedes-Benz EQE or similar"," ")}}function Ls(e,t){if(1&e&&f._UZ(0,"span",186),2&e){const e=f.oxw(4);f.Q6J("innerHTML",e.formErrors.first_name,f.oJD)}}function Ms(e,t){if(1&e&&f._UZ(0,"span",186),2&e){const e=f.oxw(4);f.Q6J("innerHTML",e.formErrors.last_name,f.oJD)}}function Vs(e,t){if(1&e&&f._UZ(0,"span",186),2&e){const e=f.oxw(4);f.Q6J("innerHTML",e.formErrors.email,f.oJD)}}function Ss(e,t){1&e&&f._uU(0),2&e&&f.hij(" ",t.item.code," ")}function Es(e,t){if(1&e&&f._uU(0),2&e){const e=t.item;f.AsE(" ",e.code," ",e.name," ")}}function Us(e,t){if(1&e&&f._UZ(0,"span",186),2&e){const e=f.oxw(4);f.Q6J("innerHTML",e.formErrors.dial_code,f.oJD)}}function Ns(e,t){if(1&e&&f._UZ(0,"span",186),2&e){const e=f.oxw(4);f.Q6J("innerHTML",e.formErrors.phone_no,f.oJD)}}function Is(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",155),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(5).setPaymentMode(t)}),f._uU(1),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(5);f.ekj("is-active",i.addForm.controls.payment_mode_id.value===e.id),f.xp6(1),f.hij(" ",e.title||e.payment_mode_name||e.charges_key," ")}}function js(e,t){if(1&e&&(f.TgZ(0,"div",187),f.TgZ(1,"label",188),f._uU(2),f.qZA(),f.TgZ(3,"div",189),f.YNc(4,Is,2,3,"button",154),f.qZA(),f.qZA()),2&e){const e=f.oxw(4);f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.payment_mode)||"Payment mode"),f.xp6(2),f.Q6J("ngForOf",e.paymentMode)}}function Rs(e,t){if(1&e&&(f.TgZ(0,"p",198),f._uU(1),f.qZA()),2&e){const e=f.oxw(6);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.fare_breakdown_note," ")}}function zs(e,t){if(1&e&&(f.TgZ(0,"small"),f._uU(1),f.qZA()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.hij(" ",e.suffix,"")}}function Js(e,t){if(1&e&&(f.TgZ(0,"div",199),f.TgZ(1,"span",200),f._uU(2),f.YNc(3,zs,2,1,"small",128),f.qZA(),f._UZ(4,"span",201),f.TgZ(5,"span",202),f._uU(6),f.ALo(7,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(6);f.ekj("breakdown-indent",e.indent)("breakdown-total-row",e.isTotal)("breakdown-bold-row",e.isBold),f.xp6(2),f.hij(" ",e.label," "),f.xp6(1),f.Q6J("ngIf",e.suffix),f.xp6(3),f.AsE(" ",(null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol)||"\xa3"," ",f.xi3(7,10,e.amount,i.roundFormate)," ")}}function Bs(e,t){if(1&e&&(f.O4$(),f.kcU(),f.TgZ(0,"div",194),f.YNc(1,Rs,2,1,"p",195),f.TgZ(2,"div",196),f.YNc(3,Js,8,13,"div",197),f.qZA(),f.qZA()),2&e){const e=f.oxw(5);f.xp6(1),f.Q6J("ngIf",null==e.currentLanguage?null:e.currentLanguage.fare_breakdown_note),f.xp6(2),f.Q6J("ngForOf",e.getSidebarFareBreakdownRows())}}function Ys(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",190),f.TgZ(1,"button",191),f.NdJ("click",function(t){return f.CHM(e),f.oxw(4).toggleFareBreakdown(t)}),f.TgZ(2,"span"),f._uU(3),f.qZA(),f.O4$(),f.TgZ(4,"svg",192),f._UZ(5,"polyline",46),f.qZA(),f.qZA(),f.YNc(6,Bs,4,2,"div",193),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(1),f.uIk("aria-expanded",e.isFareBreakdownOpen),f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.price_breakdown)||"Fare breakdown"),f.xp6(1),f.ekj("is-open",e.isFareBreakdownOpen),f.xp6(2),f.Q6J("ngIf",e.isFareBreakdownOpen)}}function Qs(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",158),f.TgZ(1,"div",159),f.TgZ(2,"div",160),f.TgZ(3,"h2",161),f._uU(4),f.qZA(),f.YNc(5,Ds,2,2,"div",162),f.qZA(),f.YNc(6,Os,2,1,"p",163),f.qZA(),f.TgZ(7,"div",164),f.TgZ(8,"div",165),f.TgZ(9,"div",166),f.TgZ(10,"div",167),f.TgZ(11,"input",168),f.NdJ("input",function(){return f.CHM(e),f.oxw(3).onGuestFieldChange("first_name")}
1)("blur",function(){return f.CHM(e),f.oxw(3).onGuestFieldChange("first_name")}),f.qZA(),f.YNc(12,Ls,1,1,"span",169),f.qZA(),f.qZA(),f.TgZ(13,"div",166),f.TgZ(14,"div",167),f.TgZ(15,"input",170),f.NdJ("input",function(){return f.CHM(e),f.oxw(3).onGuestFieldChange("last_name")})("blur",function(){return f.CHM(e),f.oxw(3).onGuestFieldChange("last_name")}),f.qZA(),f.YNc(16,Ms,1,1,"span",169),f.qZA(),f.qZA(),f.TgZ(17,"div",171),f.TgZ(18,"div",167),f.TgZ(19,"input",172),f.NdJ("input",function(){f.CHM(e);const t=f.oxw(3);return t.onGuestContactInputChanged(),t.onGuestFieldChange("email")})("blur",function(){f.CHM(e);const t=f.oxw(3);return t.onGuestEmailBlur(),t.onGuestFieldChange("email")})("change",function(){return f.CHM(e),f.oxw(3).onGuestEmailBlur()}),f.qZA(),f.YNc(20,Vs,1,1,"span",169),f.qZA(),f.qZA(),f.TgZ(21,"div",171),f.TgZ(22,"div",167),f.TgZ(23,"div",173),f.TgZ(24,"ng-select",174),f.NdJ("change",function(){f.CHM(e);const t=f.oxw(3);return t.onGuestDialCodeChange(),t.onGuestFieldChange("dial_code")}),f.YNc(25,Ss,1,1,"ng-template",175),f.YNc(26,Es,1,2,"ng-template",176),f.qZA(),f.TgZ(27,"input",177),f.NdJ("input",function(){f.CHM(e);const t=f.oxw(3);return t.onGuestContactInputChanged(),t.onGuestFieldChange("phone_no")})("blur",function(){f.CHM(e);const t=f.oxw(3);return t.onGuestPhoneBlur(),t.onGuestFieldChange("phone_no")})("change",function(){return f.CHM(e),f.oxw(3).onGuestPhoneBlur()}),f.qZA(),f.qZA(),f.YNc(28,Us,1,1,"span",169),f.YNc(29,Ns,1,1,"span",169),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(30,js,5,2,"div",178),f.YNc(31,Ys,7,5,"div",179),f.TgZ(32,"div",180),f.TgZ(33,"span",181),f._uU(34,"All fees included"),f.qZA(),f.qZA(),f.TgZ(35,"div",182),f.TgZ(36,"button",183),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).proceedToCheckout()}),f._uU(37),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(3);f.xp6(4),f.hij(" ",(null==e.currentSelectedVehicle?null:e.currentSelectedVehicle.title)||(0===e.displayExperienceVehicles.length?(null==e.currentLanguage?null:e.currentLanguage.no_data_found)||"No vehicles available":"Business Class")," "),f.xp6(1),f.Q6J("ngIf",e.currentSelectedVehicle),f.xp6(1),f.Q6J("ngIf",e.currentSelectedVehicle),f.xp6(4),f.ekj("has-error",e.formErrors.first_name),f.xp6(1),f.Q6J("formControl",e.addForm.controls.first_name),f.xp6(1),f.Q6J("ngIf",e.formErrors.first_name),f.xp6(2),f.ekj("has-error",e.formErrors.last_name),f.xp6(1),f.Q6J("formControl",e.addForm.controls.last_name),f.xp6(1),f.Q6J("ngIf",e.formErrors.last_name),f.xp6(2),f.ekj("has-error",e.formErrors.email),f.xp6(1),f.MGl("placeholder","Guest Email",e.isPhoneLoginType()?"":" *",""),f.Q6J("formControl",e.addForm.controls.email),f.xp6(1),f.Q6J("ngIf",e.formErrors.email),f.xp6(2),f.ekj("has-error",e.formErrors.phone_no||e.formErrors.dial_code),f.xp6(2),f.Q6J("items",e.dialCodeList)("clearable",!1)("searchable",!0)("notFoundText",null==e.currentLanguage?null:e.currentLanguage.no_data_found)("formControl",e.addForm.controls.dial_code),f.xp6(3),f.MGl("placeholder","Guest Phone Number",e.isPhoneLoginType()?" *":"",""),f.Q6J("formControl",e.addForm.controls.phone_no),f.xp6(1),f.Q6J("ngIf",e.formErrors.dial_code),f.xp6(1),f.Q6J("ngIf",e.formErrors.phone_no),f.xp6(1),f.Q6J("ngIf",(null==e.paymentMode?null:e.paymentMode.length)>0),f.xp6(1),f.Q6J("ngIf",e.currentSelectedVehicle),f.xp6(5),f.Q6J("disabled",e.disableBtn||0===e.displayExperienceVehicles.length||e.isBookingHold||e.guestUserResolving||e.showGuestConfirmModal||e.showGuestUniqueFieldModal||e.guestUniqueFieldUpdateInProgress||e.sameZoneTripRestricted),f.xp6(1),f.hij(" Select ",(null==e.currentSelectedVehicle?null:e.currentSelectedVehicle.title)||(null==e.currentLanguage?null:e.currentLanguage.select_vehicle)||"vehicle"," ")}}function Hs(e,t){if(1&e&&(f.TgZ(0,"p",198),f._uU(1),f.qZA()),2&e){const e=f.oxw(4);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.fare_breakdown_note," ")}}function $s(e,t){if(1&e&&(f.TgZ(0,"small"),f._uU(1),f.qZA()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.hij(" ",e.suffix,"")}}function Gs(e,t){if(1&e&&(f.TgZ(0,"div",212),f.TgZ(1,"span"),f._uU(2),f.YNc(3,$s,2,1,"small",128),f.qZA(),f.TgZ(4,"span"),f._uU(5),f.ALo(6,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(4);f.ekj("indent-row",e.indent)("total-row",e.isTotal)("bold-row",e.isBold),f.xp6(1),f.ekj("checkout-total-label",e.isTotal)("checkout-bold-label",e.isBold&&!e.isTotal)("checkout-label",!e.isTotal&&!e.isBold),f.xp6(1),f.hij(" ",e.label," "),f.xp6(1),f.Q6J("ngIf",e.suffix),f.xp6(1),f.ekj("checkout-total-val",e.isTotal)("checkout-bold-val",e.isBold&&!e.isTotal)("checkout-val",!e.isTotal&&!e.isBold),f.xp6(1),f.AsE(" ",(null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol)||"\xa3"," ",f.xi3(6,22,e.amount,i.roundFormate)," ")}}function Ks(e,t){if(1&e&&(f.TgZ(0,"div",203),f.TgZ(1,"div",204),f.TgZ(2,"h3",205),f._uU(3),f.qZA(),f.TgZ(4,"p",206),f._uU(5),f.qZA(),f.qZA(),f.TgZ(6,"div",207),f.TgZ(7,"div",208),f.TgZ(8,"span"),f._uU(9),f.qZA(),f.TgZ(10,"span"),f._uU(11),f.qZA(),f.qZA(),f.YNc(12,Hs,2,1,"p",195),f.YNc(13,Gs,7,25,"div",209),f.qZA(),f.TgZ(14,"div",210),f.TgZ(15,"a",211),f._uU(16,"Terms & conditions apply"),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);
1f.xp6(3),f.Oqu((null==e.currentSelectedVehicle?null:e.currentSelectedVehicle.title)||"First Class"),f.xp6(2),f.Oqu(e.getVehicleSubtitle()),f.xp6(4),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.price_breakdown)||"Fare breakdown"),f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.rate)||"Rate"),f.xp6(1),f.Q6J("ngIf",null==e.currentLanguage?null:e.currentLanguage.fare_breakdown_note),f.xp6(1),f.Q6J("ngForOf",e.getSidebarFareBreakdownRows())}}function Ws(e,t){if(1&e&&(f.TgZ(0,"div",101),f.YNc(1,Ts,5,2,"div",102),f.YNc(2,qs,13,3,"div",103),f.TgZ(3,"aside",104),f.TgZ(4,"div",105),f.TgZ(5,"div",106),f.TgZ(6,"div",107),f._UZ(7,"div",108,109),f.qZA(),f.qZA(),f.YNc(9,Qs,38,31,"div",110),f.YNc(10,Ks,17,6,"div",111),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("ngIf",!e.isCheckoutStep),f.xp6(1),f.Q6J("ngIf",e.isCheckoutStep),f.xp6(7),f.Q6J("ngIf",!e.isCheckoutStep),f.xp6(1),f.Q6J("ngIf",e.isCheckoutStep)}}function Xs(e,t){if(1&e&&(f.TgZ(0,"main",87),f.YNc(1,fs,4,0,"div",88),f.YNc(2,vs,4,1,"div",89),f.YNc(3,ys,8,3,"div",90),f.YNc(4,Ws,11,4,"div",91),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngIf",e.loadingState),f.xp6(1),f.Q6J("ngIf",e.isBookingHold),f.xp6(1),f.Q6J("ngIf",!(e.isEmbeddedInIframe||e.hasViewedOptions||e.displayThankYouForm||e.loadingState)),f.xp6(1),f.Q6J("ngIf",e.hasViewedOptions&&!e.displayLoginForm&&!e.displayThankYouForm)}}function eu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",234),f.TgZ(1,"input",235),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().$implicit;return f.oxw(4).checkOtherCharge(t,i)}),f.qZA(),f.TgZ(2,"span"),f._uU(3),f.qZA(),f.qZA()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(4);f.xp6(1),f.Q6J("checked",null==e?null:e.checked),f.xp6(2),f.AsE("",null==e?null:e.title," ",t.getOtherChargeLabel(e),"")}}function tu(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"button",239),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(4).decrementValue(t.charges_key,t)}),f._uU(2,"-"),f.qZA(),f.TgZ(3,"span"),f._uU(4),f.qZA(),f.TgZ(5,"button",239),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(4).incrementValue(t.charges_key,t)}),f._uU(6,"+"),f.qZA(),f.BQk()}if(2&e){const e=f.oxw(2).$implicit,t=f.oxw(4);f.xp6(4),f.Oqu(t.addForm.controls[e.charges_key].value)}}function iu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",240),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(4).decrementDynamicCharge(t)}),f._uU(1,"-"),f.qZA(),f.TgZ(2,"span"),f._uU(3),f.qZA(),f.TgZ(4,"button",239),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(4).incrementDynamicCharge(t)}),f._uU(5,"+"),f.qZA()}if(2&e){const e=f.oxw(2).$implicit;f.Q6J("disabled",((null==e?null:e.currentValue)||0)<=1),f.xp6(3),f.Oqu((null==e?null:e.currentValue)||0)}}function nu(e,t){if(1&e&&(f.TgZ(0,"div",236),f.YNc(1,tu,7,1,"ng-container",237),f.YNc(2,iu,6,2,"ng-template",null,238,f.W1O),f.qZA()),2&e){const e=f.MAs(3),t=f.oxw().$implicit;f.xp6(1),f.Q6J("ngIf","child_seat"===(null==t?null:t.charges_key)||"booster_seat"===(null==t?null:t.charges_key))("ngIfElse",e)}}function ou(e,t){if(1&e&&(f.ynx(0),f.YNc(1,eu,4,3,"label",232),f.YNc(2,nu,4,2,"div",233),f.BQk()),2&e){const e=t.$implicit,i=f.oxw(4);f.xp6(1),f.Q6J("ngIf",!(null!=e&&e.is_required)),f.xp6(1),f.Q6J("ngIf",i.isCountableOtherCharge(e)&&(null==e?null:e.checked))}}function au(e,t){if(1&e&&(f.ynx(0),f.YNc(1,ou,3,2,"ng-container",231),f.BQk()),2&e){const e=f.oxw(3);f.xp6(1),f.Q6J("ngForOf",e.otherChargesArray)}}function ru(e,t){if(1&e&&(f.TgZ(0,"p",241),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.no_data_found)||"No additional charges."," ")}}function lu(e,t){if(1&e&&(f.TgZ(0,"div",229),f.YNc(1,au,2,1,"ng-container",128),f.YNc(2,ru,2,1,"p",230),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("ngIf",(null==e.otherChargesArray?null:e.otherChargesArray.length)>0),f.xp6(1),f.Q6J("ngIf",!(null!=e.otherChargesArray&&e.otherChargesArray.length))}}function su(e,t){1&e&&(f.TgZ(0,"span",249),f._uU(1,"*"),f.qZA())}function uu(e,t){if(1&e&&(f.ynx(0),f._UZ(1,"input",250),f.BQk()),2&e){const e=f.oxw(4);f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.enter_value)}}function du(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"ng2-flatpickr",251),f.NdJ("onChange",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw(3).onDateChange(t,i)}),f.qZA(),f.BQk()}if(2&e){const e=f.oxw(4);f.xp6(1),f.Q6J("config",e.dateFormatConfig)}}function cu(e,t){if(1&e&&(f.ynx(0),f._UZ(1,"ng-select",252),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw(3);
1f.xp6(1),f.Q6J("items",e.value.options)("multiple",!0)("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)}}function hu(e,t){if(1&e&&(f.ynx(0),f._UZ(1,"ng-select",253),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw(3);f.xp6(1),f.Q6J("items",e.value.options)("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)}}function gu(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",236),f.TgZ(2,"button",239),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw(3).decrement(t)}),f._uU(3,"-"),f.qZA(),f.TgZ(4,"span"),f._uU(5),f.qZA(),f.TgZ(6,"button",239),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw(3).increment(t)}),f._uU(7,"+"),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit;f.xp6(5),f.Oqu(e.value.value||0)}}function pu(e,t){if(1&e&&(f.ynx(0,245),f.TgZ(1,"div",246),f.TgZ(2,"label",247),f._uU(3),f.YNc(4,su,2,0,"span",248),f.qZA(),f.YNc(5,uu,2,1,"ng-container",128),f.YNc(6,du,2,1,"ng-container",128),f.YNc(7,cu,2,3,"ng-container",128),f.YNc(8,hu,2,2,"ng-container",128),f.YNc(9,gu,8,1,"ng-container",128),f.qZA(),f.BQk()),2&e){const e=t.$implicit,i=t.index,n=f.oxw(3);f.Q6J("formGroupName",i),f.xp6(3),f.Oqu(e.value.label),f.xp6(1),f.Q6J("ngIf",e.value.is_mandatory),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.TEXT_BOX_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DATE_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.MULTI_SELECT_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DROPDOWN_FIELD),f.xp6(1),f.Q6J("ngIf",5==e.value.field_type)}}function mu(e,t){if(1&e&&(f.TgZ(0,"p",241),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.no_data_found)||"No extra fields."," ")}}function _u(e,t){if(1&e&&(f.TgZ(0,"div",242),f.TgZ(1,"div",243),f.YNc(2,pu,10,8,"ng-container",244),f.qZA(),f.YNc(3,mu,2,1,"p",230),f.qZA()),2&e){const e=f.oxw(2);f.Q6J("formGroup",e.addForm),f.xp6(2),f.Q6J("ngForOf",e.addForm.controls.properties.controls),f.xp6(1),f.Q6J("ngIf",0===e.addForm.controls.properties.controls.length)}}function fu(e,t){if(1&e&&(f.TgZ(0,"strong"),f._uU(1),f.qZA()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.Oqu(e.label)}}function vu(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.Oqu(e.label)}}function yu(e,t){if(1&e&&(f.TgZ(0,"small"),f._uU(1),f.qZA()),2&e){const e=f.oxw().$implicit;f.xp6(1),f.hij(" ",e.suffix,"")}}function bu(e,t){if(1&e&&(f.TgZ(0,"strong"),f._uU(1),f.ALo(2,"roundFraction"),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(1),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(2,2,e.amount,t.roundFormate)," ")}}function xu(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(1),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(2,2,e.amount,t.roundFormate)," ")}}function ku(e,t){if(1&e&&(f.TgZ(0,"div",199),f.TgZ(1,"span",200),f.YNc(2,fu,2,1,"strong",128),f.YNc(3,vu,2,1,"ng-container",128),f.YNc(4,yu,2,1,"small",128),f.qZA(),f._UZ(5,"span",201),f.TgZ(6,"span",202),f.YNc(7,bu,3,5,"strong",128),f.YNc(8,xu,3,5,"ng-container",128),f.qZA(),f.qZA()),2&e){const e=t.$implicit;f.ekj("breakdown-indent",e.indent)("breakdown-total-row",e.isTotal)("breakdown-bold-row",e.isBold),f.xp6(2),f.Q6J("ngIf",e.isTotal||e.isBold),f.xp6(1),f.Q6J("ngIf",!e.isTotal&&!e.isBold),f.xp6(1),f.Q6J("ngIf",e.suffix),f.xp6(3),f.Q6J("ngIf",e.isTotal||e.isBold),f.xp6(1),f.Q6J("ngIf",!e.isTotal&&!e.isBold)}}function Zu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",213),f.NdJ("click",function(){return f.CHM(e),f.oxw().closeVehicleDetails()}),f.TgZ(1,"div",214),f.NdJ("click",function(e){return e.stopPropagation()}),f.TgZ(2,"div",215),f.TgZ(3,"div",216),f.TgZ(4,"h2",217),f._uU(5),f.qZA(),f.TgZ(6,"button",218),f.NdJ("click",function(){return f.CHM(e),f.oxw().closeVehicleDetails()}),f._UZ(7,"i",219),f.qZA(),f.qZA(),f.TgZ(8,"div",220),f.TgZ(9,"div",221),f.TgZ(10,"button",222),f.NdJ("click",function(){return f.CHM(e),f.oxw().setDetailModalTab("charges")}),f._uU(11),f.qZA(),f.TgZ(12,"button",222),f.NdJ("click",function(){return f.CHM(e),f.oxw().setDetailModalTab("extraFields")}),f._uU(13),f.qZA(),f.qZA(),f.YNc(14,lu,3,2,"div",223),f.YNc(15,_u,4,3,"div",224),f.TgZ(16,"h3",225),f._uU(17),f.qZA(),f.TgZ(18,"div",226),f.YNc(19,ku,9,11,"div",197),f.qZA(),f.qZA(),f.TgZ(20,"div",227),f.TgZ(21,"button",228),f.NdJ("click",function(){f.CHM(e);const t=f.oxw();return t.selectVehicleFromModal(t.detailModalVehicle)}),f._uU(22),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(5),f.Oqu((null==e.detailModalVehicle?null:e.detailModalVehicle.title)||"Business Class"),f.xp6(5),f.ekj("active","charges"===e.detailModalTab),f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.other_
1charges)||"Other Charges"," "),f.xp6(1),f.ekj("active","extraFields"===e.detailModalTab),f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.details)||"Details"," "),f.xp6(1),f.Q6J("ngIf","charges"===e.detailModalTab),f.xp6(1),f.Q6J("ngIf","extraFields"===e.detailModalTab),f.xp6(2),f.Oqu((null==e.currentLanguage?null:e.currentLanguage.price_breakdown)||"Price breakdown"),f.xp6(2),f.Q6J("ngForOf",e.getDetailModalFareBreakdownRows()),f.xp6(3),f.hij(" Select ",(null==e.detailModalVehicle?null:e.detailModalVehicle.title)||"Business Class"," ")}}function Cu(e,t){if(1&e&&(f.TgZ(0,"div",262),f.TgZ(1,"p",263),f.TgZ(2,"strong"),f._uU(3,"Name:"),f.qZA(),f._uU(4),f.qZA(),f.TgZ(5,"p",263),f.TgZ(6,"strong"),f._uU(7,"Email:"),f.qZA(),f._uU(8),f.qZA(),f.TgZ(9,"p",264),f.TgZ(10,"strong"),f._uU(11,"Phone:"),f.qZA(),f._uU(12),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.xp6(4),f.hij(" ",e.maskedUserPreview.name,""),f.xp6(4),f.hij(" ",e.maskedUserPreview.email,""),f.xp6(4),f.hij(" ",e.maskedUserPreview.phone,"")}}function Fu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",254),f.TgZ(1,"div",255),f.TgZ(2,"h5",256),f._uU(3,"Is this you?"),f.qZA(),f.TgZ(4,"p",257),f._uU(5),f.qZA(),f.YNc(6,Cu,13,3,"div",258),f.TgZ(7,"div",259),f.TgZ(8,"button",260),f.NdJ("click",function(){return f.CHM(e),f.oxw().rejectGuestUser()}),f._uU(9,"No"),f.qZA(),f.TgZ(10,"button",261),f.NdJ("click",function(){return f.CHM(e),f.oxw().confirmGuestUser()}),f._uU(11,"OK"),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(5),f.Oqu(e.guestConfirmModalMessage),f.xp6(1),f.Q6J("ngIf",e.maskedUserPreview)}}function Tu(e,t){1&e&&f._UZ(0,"i",273)}function Au(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",254),f.TgZ(1,"div",255),f.TgZ(2,"h5",256),f._uU(3,"What would you like to do?"),f.qZA(),f.TgZ(4,"p",257),f._uU(5),f.qZA(),f.TgZ(6,"div",265),f.TgZ(7,"label",266),f.TgZ(8,"input",267),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().guestUniqueFieldAction=t}),f.qZA(),f.TgZ(9,"span"),f._uU(10),f.qZA(),f.qZA(),f.TgZ(11,"label",268),f.TgZ(12,"input",269),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw().guestUniqueFieldAction=t}),f.qZA(),f.TgZ(13,"span"),f._uU(14),f.qZA(),f.qZA(),f.qZA(),f.TgZ(15,"div",259),f.TgZ(16,"button",270),f.NdJ("click",function(){return f.CHM(e),f.oxw().cancelGuestUniqueFieldModal()}),f._uU(17,"Cancel"),f.qZA(),f.TgZ(18,"button",271),f.NdJ("click",function(){return f.CHM(e),f.oxw().confirmGuestUniqueFieldChoice()}),f.YNc(19,Tu,1,0,"i",272),f._uU(20," Continue "),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(5),f.Oqu(e.guestUniqueFieldModalMessage),f.xp6(3),f.Q6J("ngModel",e.guestUniqueFieldAction)("ngModelOptions",f.DdM(10,Kl)),f.xp6(2),f.Oqu(e.guestUniqueFieldUpdateLabel),f.xp6(2),f.Q6J("ngModel",e.guestUniqueFieldAction)("ngModelOptions",f.DdM(11,Kl)),f.xp6(2),f.Oqu(e.guestUniqueFieldNewCustomerLabel),f.xp6(2),f.Q6J("disabled",e.guestUniqueFieldUpdateInProgress),f.xp6(2),f.Q6J("disabled",e.guestUniqueFieldUpdateInProgress),f.xp6(1),f.Q6J("ngIf",e.guestUniqueFieldUpdateInProgress)}}function Pu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",274),f.TgZ(1,"div",275),f._UZ(2,"i",276),f.TgZ(3,"h2",277),f._uU(4),f.qZA(),f.TgZ(5,"p",278),f._uU(6),f.qZA(),f.TgZ(7,"button",279),f.NdJ("click",function(){return f.CHM(e),f.oxw().ViewUpdate(!0)}),f._uU(8),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Oqu(e.content),f.xp6(2),f.AsE("",null==e.currentLanguage?null:e.currentLanguage.trip_id," #",e.trip_number,""),f.xp6(2),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.book_another_ride)||"Book another ride"," ")}}let wu=(()=>{class e{constructor(e,t,i,n,o,a,r,l,s,u,d,c,h){this.authService=e,this.cd=t,this.yelowCabService=i,this.fb=n,this.taxiBookingService=o,this.yelowBookingService=a,this.toasterService=r,this.googleService=l,this.route=s,this.jwtService=u,this.Router=d,this.zoneUtilityService=c,this.elementRef=h,this.DriverKeyUp=new x.xQ,this.DriverKeyUp2=new x.xQ,this.DriverKeyUp1=new x.xQ,this.DriverKeyUpReturn=new x.xQ,this.DriverKeyUpReturnDest=new x.xQ,this.formErrors={pickup_location:"",destination:"",request_time:"",start_date:"",end_date:"",paymentMode:"",paymentStatus:"",driver:"",apierror:"",corporate:"",inActive:"Corporate is InActive please Activate it",recurring_time:"",recurring_on:"",f
1irst_name:"",last_name:"",email:"",phone_no:"",dial_code:"",notes:"",return_time:"",employee:"",booking_type_id:"",hour:"",packages:""},this.rentalPackages=[],this.isCollapsed=!0,this.passengerType="GUEST",this.hasViewedOptions=!1,this.detailModalTab="charges",this.storeOldVehiclePrice=0,this.check_time=!0,this.skipLogin=!1,this.checkLoginTypes=2,this.isOtpVerification=!1,this.isBookingHold=!1,this.tripPropertiesIds=[],this.zoneIds=[],this.title="Template 5",this.hideBasicPage=!1,this.hideUserPage=!0,this.isFirstPart=!0,this.hidePayment=!0,this.hideSuccess=!0,this.channelPaymentType=null,this.channelPaymentTypeLabel=null,this.steps=[],this.currentStepIndex=0,this.no_of_passenger=1,this.trip_luggage=0,this.displayChidSheet=!1,this.displayBoosterSheet=!1,this.displayFlightNumber=!1,this.YELOWCAB_SERVICE_TYPE=14,this.otherChargArray=[],this.otherChargesArray=[],this.tripOtherCharges=[],this.loadingState=!1,this.dialCodeList=F.si,this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.selectedOtherChargesArray=[],this.placeSearch=new x.xQ,this.responseFlight=[],this.key="e903329db5f17ff850162f4e8c872651",this.checkFligth=!1,this.transactionCategory=[],this.transactionCategoryList=[],this.showCode=!1,this.booking_type_id=null,this.formSubmited=!1,this.submitFirstPart=!1,this.checkpointsArrayNew=[],this.getWayPoint=[],this.timeFormatConfig2={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.request_time=e;const t=new Date(e[0])||null;this.addForm.controls.request_time.setValue(t),this.setDateintime()}}},this.Customer_id=null,this.zoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.returnzoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.paymentMode=[],this.allPaymentModes=[],this.allRideTypes=[],this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.zoneCutOffMinutes=null,this.requestTimeMinDate=null,this.pickupRegionFound=!0,this.pickupZoneFound=!0,this.dropRegionFound=!0,this.dropZoneFound=!0,this.showNextButton=!0,this.sameZoneTripRestricted=!1,this.regionResponse=[],this.totalExtraPassengerCharge=0,this.totalExtraLuggageCharge=0,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.clearPickup=!1,this.searchText=null,this.selectedCheckpointsArray=[],this.vehicleArray=[],this.filterVehicleArray=[],this.origin=w.jQ,this.queuePikupList=[],this.queuePikupData=null,this.queuePikupStandList=[],this.queuePikupFound=!1,this.selectQueuePickup=!1,this.checkOnlyPickupConfig="N",this.selectedPickupPoint=null,this.selectedUserPickupLocation=null,this.selectedUserDropoffLocation=null,this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[],this.locationTypeList=[{type_id:1,title:"Home"},{type_id:2,title:"Work"},{type_id:3,title:"Other"}],this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.zoneResponse=[],this.driverArray=[],this.autoDispatch=!0,this.onlineDriver=1,this.genderValue="M",this.queueId=null,this.checkpointValidity={},this.checkOutofServiceArea=!1,this.lastCheckPointValid=!0,this.skip_destination=!1,this.clearDestination=!1,this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.rideType=w.xk,this.corporateBookingConfirmation="N",this.bookingAssetsList=[],this.driverType=[],this.selectedTab=1,this.schedule_trip=!1,this.schedule_tripArray=null,this.requestMode="N",this.is_date=!1,this.marker=[],this.markerLabelOverlays=[],this.mapLabelRefreshListeners=[],this.guestUserResolving=!1,this.showGuestConfirmModal=!1,this.guestConfirmModalMessage="We found an account matching this email.",this.maskedUserPreview=null,this.guestEmailCheckInProgress=!1,this.guestPhoneCheckInProgress=!1,this.guestUserIdentified=!1,this.identifiedGuestByPhone=!1,this.showGuestUniqueFieldModal=!1,this.guestUniqueFieldAction="update",this.guestUniqueFieldModalMessage="",this.guestUniqueFieldUpdateLabel="",this.guestUniqueFieldNewCustomerLabel="Create booking for a new customer",this.guestUniqueFieldUpdateInProgress=!1,this.identifiedGuestSnapshot=null,this.modifiedGuestFieldType="phone",this.pendingGuestUserDetails=null,this.pendingGuestRegistrationDetail
1s=null,this.pendingGuestResolve=null,this.lastCheckedGuestEmail="",this.lastCheckedGuestPhoneKey="",this.pendingVehicleReselectId=null,this.lat=23.0225,this.lng=72.5714,this.zoom=12,this.generateNewMap=!0,this.isFixdestination=!1,this.timeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onChange:e=>{e&&(console.log("selectedDates",e),this.selectedRequestTime=e)}},this.luggageArray=[],this.numberFilter=[],this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.returnEnable=!1,this.checkReturnTimeConfig=!1,this.returnFinalFare=0,this.returnTripDiscount=0,this.store_ride_distance=0,this.store_bike_distance=0,this.store_distance=0,this.startingFrom=!1,this.otherChargePrice=0,this.tripOtherChargePrice=0,this.queryParam={},this.returnDateFormatConfig={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.return_date=e;const t=new Date(e[0])||null;this.addForm.controls.return_date.setValue(t),this.setReturnTimeFromDate()}}},this.returnTimeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onClose:e=>{if(console.log("return_trip_time closed",e),null==e?void 0:e.length){const t=new Date(e[0]);this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t)}}},this.walletBalance=0,this.vehicleTypeArray=[],this.zonePropertiesIds=[],this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.TEXT_BOX_FIELD=1,this.DATE_FIELD=2,this.MULTI_SELECT_FIELD=3,this.DROPDOWN_FIELD=4,this.DOCUMENT_FIELD=6,this.documentUploadLoading={},this.documentFileNames={},this.isDocumentUploading=!1,this.DOCUMENT_MAX_FILE_SIZE=22020096,this.dateFormatConfig={dateFormat:"d/m/Y",time_24hr:!1,enableTime:!1},this.displayLoginForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.selectedButtonSingAUpLogin={button_id:1},this.currentUserDetail=null,this.content="",this.hoursArray=[{name:"1 hrs",value:1},{name:"2 hrs",value:2},{name:"3 hrs",value:3},{name:"4 hrs",value:4},{name:"5 hrs",value:5},{name:"6 hrs",value:6},{name:"7 hrs",value:7},{name:"8 hrs",value:8},{name:"9 hrs",value:9},{name:"10 hrs",value:10},{name:"11 hrs",value:11},{name:"12 hrs",value:12},{name:"13 hrs",value:13},{name:"14 hrs",value:14},{name:"15 hrs",value:15},{name:"16 hrs",value:16},{name:"17 hrs",value:17},{name:"18 hrs",value:18},{name:"19 hrs",value:19},{name:"20 hrs",value:20},{name:"21 hrs",value:21},{name:"22 hrs",value:22},{name:"23 hrs",value:23},{name:"24 hrs",value:24}],this.trip_number=null,this.gender=O.y7,this.genderTab="M",this.is_full_screen=!0,this.tabsOnly=!1,this.hours_pricing=0,this.package_pricing=0,this.agentMinDistance=0,this.agentLogin=!1,this.disableBtn=!1,this.isEmbeddedInIframe=!1,this.isLocationDropdownOpen=!1,this.embeddedDocClassesApplied=!1,this.vehicleTypes=[{title:"Sedan"},{title:"SUV"},{title:"Luxury"},{title:"Van"}],this.allocation_type=null,this.detailModalVehicle=null,this.isDetailModalOpen=!1,this.modalSlideIndex=0,this.activeCapacityTab="luggage",this.activeLuggageOption="carry-on",this.isGuestDropdownOpen=!1,this.selectedExperienceIndex=0,this.activeSeatingOption="baby-seat",this.modalSlides=[{image:"assets/img/mercedes-4.png",caption:"All-electric quiet and executive-level comfort"},{image:"assets/img/mercedes-5.png",caption:"Generous rear seating to settle in and stay focused."},{image:"assets/img/mercedes-6.png",caption:"Refined craftsmanship with acoustic privacy glass."},{image:"assets/img/mercedes-seat-baby.png",caption:"Baby and child seats available upon request."},{image:"assets/img/mercedes-7.png",caption:"Spacious trunk capacity for all your luggage requirements."}],this.isCheckoutStep=!1,this.isFareBreakdownOpen=!1,this.bookingRideType="oneway",this.isEditTripBarOpen=!0,this.isDatePickerOpen=!1,this.isTimePickerOpen=!1,this.currentCalendarDate=new Date,this.selectedBookingDate=new Date,this.selectedPickupTimeStr="",this.timeSlotsList=[]}get embeddedHostClass(){return this.isEmbeddedInIframe}onParentWindowMessage(e){!this.isEmbeddedInIframe||!(null==e?void 0:e.data)||"yelowcab-booking-request-height"===e.data.type&&this.scheduleIframeHeightNotify()}detectEmbeddedContext(){let e=!1;try{e=window.self!==window.top}catch(i){e=!0}
1const t=this.route.snapshot.queryParams.embed;this.isEmbeddedInIframe=e||"1"===t||"true"===t}applyEmbeddedDocumentClasses(){if(!this.isEmbeddedInIframe||this.embeddedDocClassesApplied)return;document.documentElement.classList.add("layout-four-iframe-doc"),document.body.classList.add("layout-four-iframe-doc");const e=document.querySelector("app-root");e&&e.classList.add("layout-four-iframe-root"),this.embeddedDocClassesApplied=!0}removeEmbeddedDocumentClasses(){if(!this.embeddedDocClassesApplied)return;document.documentElement.classList.remove("layout-four-iframe-doc"),document.body.classList.remove("layout-four-iframe-doc");const e=document.querySelector("app-root");e&&e.classList.remove("layout-four-iframe-root"),this.embeddedDocClassesApplied=!1}initEmbeddedIframeBehavior(){this.applyEmbeddedDocumentClasses(),this.scheduleIframeHeightNotify(),"undefined"!=typeof ResizeObserver&&(this.iframeResizeObserver=new ResizeObserver(()=>this.scheduleIframeHeightNotify()),this.iframeResizeObserver.observe(this.elementRef.nativeElement))}scheduleIframeHeightNotify(){!this.isEmbeddedInIframe||(this.iframeHeightNotifyTimer&&clearTimeout(this.iframeHeightNotifyTimer),this.iframeHeightNotifyTimer=setTimeout(()=>{var e,t;const i=Math.max(this.elementRef.nativeElement.scrollHeight||0,this.elementRef.nativeElement.offsetHeight||0);let n=Math.max(i,(null===(e=document.body)||void 0===e?void 0:e.scrollHeight)||0,(null===(t=document.documentElement)||void 0===t?void 0:t.scrollHeight)||0);n=this.isLocationDropdownOpen?Math.max(n,i+320):this.isDatePickerOpen||this.isTimePickerOpen?Math.max(n,i+340):Math.max(n,i+4),Array.from(document.querySelectorAll(".ng-dropdown-panel, .custom-datepicker-dropdown-card, .custom-timepicker-dropdown-card")).forEach(e=>{const t=e.getBoundingClientRect();(null==t?void 0:t.bottom)&&(n=Math.max(n,Math.ceil(t.bottom)+16))});try{window.parent.postMessage({type:"yelowcab-booking-height",height:n},"*")}catch(o){}},40))}onLocationDropdownOpenChange(e){if(this.isLocationDropdownOpen=!!e,e&&this.isEmbeddedInIframe){const e=Math.max(this.elementRef.nativeElement.scrollHeight||0,this.elementRef.nativeElement.offsetHeight||0,96);try{window.parent.postMessage({type:"yelowcab-booking-height",height:e+320},"*")}catch(t){}return setTimeout(()=>{try{window.dispatchEvent(new Event("resize"))}catch(t){}this.scheduleIframeHeightNotify()},60),void setTimeout(()=>{try{window.dispatchEvent(new Event("resize"))}catch(t){}this.scheduleIframeHeightNotify()},180)}this.scheduleIframeHeightNotify()}getZonePricingParams(){return{}}getStepClass(e){return e===this.currentStepIndex?"active-web-booking":e<this.currentStepIndex?"completed-web-booking":"inactive-web-booking"}isStepCompleted(e){return e<this.currentStepIndex}ngOnDestroy(){this.sub&&this.sub.unsubscribe(),this.mapObs&&this.mapObs.unsubscribe(),this.iframeResizeObserver&&this.iframeResizeObserver.disconnect(),this.iframeHeightNotifyTimer&&clearTimeout(this.iframeHeightNotifyTimer),this.removeEmbeddedDocumentClasses()}ngAfterViewInit(){this.isEmbeddedInIframe&&this.initEmbeddedIframeBehavior(),this.mapObs=this.authService.mapScriptLoad.subscribe(e=>{var t,i;(null==e?void 0:e.is_load)&&((null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?(this.lat=Number(e.latitude),this.lng=Number(e.longitude)):(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_latitude)&&(null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.company_longitude)&&(this.lat=Number(this.currentCompanyDetail.company_latitude),this.lng=Number(this.currentCompanyDetail.company_longitude)),this.hasViewedOptions&&this.initMap(),this.hasViewedOptions||this.patchDefaultUserLocation())})}onWindowResize(){this.map&&"undefined"!=typeof google&&setTimeout(()=>google.maps.event.trigger(this.map,"resize"),150)}initMap(){var e;!(null===(e=this.gmapElement)||void 0===e?void 0:e.nativeElement)||"undefined"==typeof google||(this.generateMap(),this.map&&(this.googleService.mapCenter(this.map,{lat:this.lat,lng:this.lng}),this.bindMarkerPoints()))}generateMap(){var e;!(null===(e=this.gmapElement)||void 0===e?void 0:e.nativeElement)||"undefined"==typeof google||(this.mapProp={zoom:this.zoom,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!0,disableDefaultUI:!0,center:new google.maps.LatLng(this.lat,this.lng),minZoom:4,styles:[{featureType:"poi",stylers:[{visibility:"off"}]}]},this.map=new google.maps.Map(this.gmapElement.nativeElement,this.mapProp),this.bindMapLabelRefreshListeners())}bindMapLabelRefreshListeners(){if(!this.map||"undefined"==typeof google)return;this.unbindMapLabelRefreshListeners();const e=()=>this.redrawMapLabels();this.mapLabelRefreshListeners=[google.maps.event.addListener(this.map,"zoom_changed",e),google.maps.event.addListener(this.map,"drag",e),google.maps.event.addListener(this.map,"idle",e)]}unbindMapLabelRefreshListeners(){"undefined"!=typeof google?(this.mapLabelRefreshListeners.forEac
1h(e=>{try{google.maps.event.removeListener(e)}catch(t){}}),this.mapLabelRefreshListeners=[]):this.mapLabelRefreshListeners=[]}redrawMapLabels(){this.markerLabelOverlays.forEach(e=>{var t;try{null===(t=null==e?void 0:e.draw)||void 0===t||t.call(e)}catch(i){}})}attachMarkerLabelsAfterMapReady(){var e;!(null===(e=this.marker)||void 0===e?void 0:e.length)||(this.clearMarkerLabelOverlays(),this.marker[0]&&this.attachMarkerLabelToMarker(this.marker[0],"pickup"),this.marker[1]&&this.attachMarkerLabelToMarker(this.marker[1],"dropoff"),window.requestAnimationFrame(()=>this.redrawMapLabels()))}isValidMapPoint(e){if(null==(null==e?void 0:e.lat)||null==(null==e?void 0:e.lng))return!1;const t=Number(e.lat),i=Number(e.lng);return!(Number.isNaN(t)||Number.isNaN(i)||0===t&&0===i)}getMapFitPadding(){return"undefined"!=typeof window&&window.innerWidth>=992?{top:72,bottom:56,right:48,left:48}:{top:80,bottom:72,left:32,right:32}}fitMapToBounds(e){!this.map||!e||"undefined"==typeof google||(google.maps.event.trigger(this.map,"resize"),setTimeout(()=>{!this.map||this.map.fitBounds(e,this.getMapFitPadding())},80))}centerMapOnPoint(e){if(!this.map||!this.isValidMapPoint(e)||"undefined"==typeof google)return;const t=Number(e.lat),i=Number(e.lng);google.maps.event.trigger(this.map,"resize"),this.map.setCenter({lat:t,lng:i}),this.map.setZoom(14)}drawPath(e){var t,i,n;if(!this.map||!e||"undefined"==typeof google)return;(null===(t=this.polyline)||void 0===t?void 0:t.setMap)&&(this.polyline.setMap(null),this.polyline=null);let o=[];if("string"==typeof e){if(null===(i=google.maps.geometry)||void 0===i?void 0:i.encoding)try{o=google.maps.geometry.encoding.decodePath(e)}catch(r){o=[]}if(!(null==o?void 0:o.length))try{const t=JSON.parse(e);o=this.normalizeRoutePath(Array.isArray(t)?t:[t])}catch(r){if(!(null==o?void 0:o.length))return}}else if(Array.isArray(e))o=this.normalizeRoutePath(e);else{if(null==(null==e?void 0:e.latitude)||null==(null==e?void 0:e.longitude))return;o=this.normalizeRoutePath([e])}if(!(null==o?void 0:o.length))return;this.polyline=new google.maps.Polyline({path:o,geodesic:!0,strokeColor:(null===(n=this.themeCodeData)||void 0===n?void 0:n.user_primary_color)||"#15202b",strokeOpacity:1,strokeWeight:4}),this.polyline.setMap(this.map);const a=new google.maps.LatLngBounds;o.forEach(e=>a.extend(e)),this.isValidMapPoint({lat:this.pickup_latitude,lng:this.pickup_longitude})&&a.extend({lat:Number(this.pickup_latitude),lng:Number(this.pickup_longitude)}),this.isValidMapPoint({lat:this.destination_latitude,lng:this.destination_longitude})&&a.extend({lat:Number(this.destination_latitude),lng:Number(this.destination_longitude)}),this.fitMapToBounds(a)}normalizeRoutePath(e){return(e||[]).map(e=>null!=(null==e?void 0:e.lat)&&null!=(null==e?void 0:e.lng)?{lat:Number(e.lat),lng:Number(e.lng)}:null!=(null==e?void 0:e.latitude)&&null!=(null==e?void 0:e.longitude)?{lat:Number(e.latitude),lng:Number(e.longitude)}:null).filter(e=>e&&e.lat&&e.lng)}clearRoutePath(){var e;(null===(e=this.polyline)||void 0===e?void 0:e.setMap)&&(this.polyline.setMap(null),this.polyline=null)}clearMarkerLabelOverlays(){this.markerLabelOverlays.forEach(e=>{try{(null==e?void 0:e.close)?e.close():(null==e?void 0:e.setMap)&&e.setMap(null)}catch(t){}}),this.markerLabelOverlays=[]}escapeMapLabelText(e){return String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}truncateMapLabelText(e,t=28){const i=String(e||"").trim();return i.length<=t?i:`${i.slice(0,t-1)}\u2026`}buildMapLabelHtml(e,t,i){const n="pickup"===e,o=String(i||"").trim().split(/\s+/),a=o[0]||"",r=o.slice(1).join(" "),l=n?"#2563eb":"#1f2937";return`\n <div class="map-marker-label-root" style="margin:0;padding:0;font-family:system-ui,-apple-system,sans-serif;line-height:1.15;">\n <div class="map-marker-label-card" style="position:relative;display:flex;align-items:stretch;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 4px 14px rgba(15,23,42,0.16);border:1px solid rgba(15,23,42,0.08);max-width:190px;min-width:120px;">\n <div style="padding:6px 10px;display:flex;flex-direction:column;justify-content:center;background:#fff;min-width:0;flex:1;">
1\n <span style="font-size:11px;font-weight:700;color:#111827;line-height:1.2;">${n?"Pick up":"Drop-off"}</span>\n <span style="font-size:10px;color:#6b7280;font-weight:500;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:118px;">${this.escapeMapLabelText(this.truncateMapLabelText(t,32))}</span>\n </div>\n <div style="padding:4px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:42px;background:${l};color:#fff;flex-shrink:0;">\n <span style="font-size:11px;font-weight:700;line-height:1.1;">${this.escapeMapLabelText(a)}</span>\n ${r?`<span style="font-size:9px;font-weight:600;opacity:0.95;line-height:1.1;">${this.escapeMapLabelText(r)}</span>`:""}\n </div>\n <div style="position:absolute;left:50%;bottom:-4px;width:8px;height:8px;background:#fff;transform:translateX(-50%) rotate(45deg);border-right:1px solid rgba(15,23,42,0.08);border-bottom:1px solid rgba(15,23,42,0.08);"></div>\n </div>\n </div>\n `}attachMarkerLabelToMarker(e,t){var i,n,o,a,r;const l=null===(i=null==e?void 0:e.getPosition)||void 0===i?void 0:i.call(e);if(!l||!this.map||"undefined"==typeof google)return;const s=new google.maps.LatLng(l.lat(),l.lng()),u="pickup"===t?null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("pickup_location"))||void 0===o?void 0:o.value:null===(r=null===(a=this.addForm)||void 0===a?void 0:a.get("destination"))||void 0===r?void 0:r.value,d=this.buildMapLabelHtml(t,u,"pickup"===t?this.formattedPickupTime:this.formattedDropTime),c="pickup"===t?-4:4,h=new class extends google.maps.OverlayView{constructor(){super(...arguments),this.div=null}onAdd(){var e;this.div=document.createElement("div"),this.div.className="map-marker-label-overlay",this.div.style.position="absolute",this.div.style.pointerEvents="none",this.div.style.zIndex="pickup"===t?"1000":"1001",this.div.style.transform="translate(0, 0)",this.div.innerHTML=d;const i=null===(e=this.getPanes())||void 0===e?void 0:e.overlayMouseTarget;i&&this.div&&i.appendChild(this.div),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>this.draw())})}draw(){if(!this.div)return;const e=this.getProjection();if(!e)return;const t=e.fromLatLngToDivPixel(s);if(!t)return;const i=this.div.offsetWidth,n=this.div.offsetHeight;if(!i||!n)return;let o=t.y-36-n-2;o<4&&(o=t.y+2),this.div.style.left=`${Math.round(t.x-i/2+c)}px`,this.div.style.top=`${Math.round(o)}px`}onRemove(){var e;(null===(e=this.div)||void 0===e?void 0:e.parentNode)&&this.div.parentNode.removeChild(this.div),this.div=null}};h.setMap(this.map),this.markerLabelOverlays.push(h)}getActiveRoutePathData(){return this.selectedVehicleObj&&2==this.selectedVehicleObj.vehicle_type_category?this.bike_path:this.trip_path}loadAndDrawRoutePath(){var e;if(!this.map)return;const t=this.getActiveRoutePathData();if(t)return void this.drawPath(t);if(!this.isValidMapPoint({lat:this.pickup_latitude,lng:this.pickup_longitude})||!this.isValidMapPoint({lat:this.destination_latitude,lng:this.destination_longitude}))return;const i={pickup_latitude:this.pickup_latitude,pickup_longitude:this.pickup_longitude,dropoff_latitude:this.destination_latitude,dropoff_longitude:this.destination_longitude,company_id:null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id,waypoints:JSON.stringify(this.getWayPoints())};this.yelowBookingService.getDirectionRouteV2(i).subscribe(e=>{var t,i;(null==e?void 0:e.status)&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.path)&&(2==(null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.vehicle_type_category)?this.bike_path=e.data.path:this.trip_path=e.data.path,this.drawPath(e.data.path))})}ensureMapReadyAndDrawRoute(e=0){var t;if(this.hasViewedOptions){if(this.cd.detectChanges(),!(null===(t=this.gmapElement)||void 0===t?void 0:t.nativeElement))return void(e<12&&setTimeout(()=>this.ensureMapReadyAndDrawRoute(e+1),100));if(!this.map&&"undefined"!=typeof google&&this.initMap(),!this.map)return void(e<12&&setTimeout(()=>this.ensureMapReadyAndDrawRoute(e+1),100));google.maps.event.trigger(this.map,"resize"),this.bindMarkerPoints(),this.loadAndDrawRoutePath()}}refreshMapAfterOptionsLoaded(){setTimeout(()=>this.ensureMapReadyAndDrawRoute(),0)}patchDefaultUserLocation(){(null==navigator?void 0:navigator.geolocation)&&(null==navigator||navigator.geolocation.getCurrentPosition(e=>{e&&this.googleService.getAddressFromLatLng(e.coords.latitude,e.coords.longitude).then(e=>{var t,i,n,o,a,r,l,s;if(e){let u={full_text:null===(t=null==e?void 0:e.results[0])||void 0===t?void 0:t.formatted_address,place_id:null===(i=null==e?void 0:e.results[0])||void 0===i?void 0:i.place_id,latitude:null===(a=null===(o=null===(n=null==e?void 0:e.results[0])||void 0===n?void 0:n.geometry)||void 0===o?void 0:o.location)||void 0===a?void 0:a.lat(),longitude:null===(s=null===(l=null===(r=null==e?void 0:e.results[0])||void 0===r?void 0:r.geometry)||void 0===l?void 0:l.location)||void 0===s?void 0:s.lng()};this.searchEvent(u)}})}))}ngOnInit(){this.detectEmbeddedContext();const e=new Date;this.currentCalendarDate=new Date(e),this.selectedBookingDate=new Date(e),this.request_time=new Date(e),this.dialCodeList=F.si.map(e=>Object.assign(Object.assign({},e),{code_name:`(${e.code}) ${e.name}`})),this.isGuestDropdownOpen=!0,this.isEditTripBarOpen=!0,this.generateTimeSlots(),this.selectedPickupTimeStr=L(e).format("hh:mm A"),!window.localStorage.getItem("query_language_code")&&!window.localStorage.getItem("language_code")&&window.localStorage.setItem("query_language_code","en"),this.createForm(),this.patchDialCodeFromIp(),this.route.queryParams.subscribe(e=>{console.log("Current queryParams >>>",e);const t=e.embed;("1"===t||"true"===t)&&(this.isEmbeddedInIframe=!0,this.iframeResizeObserver||setTimeout(()=>this.initEmbeddedIframeBehavior())),e.agent_id&&(this.agent_id=e.agent_id,this.jwtService.saveAgentId(this.agent_id));const i=this.jwtService.getAgentId();this.agent_id=i,i&&e.agent_id!==i&&(this.agentLogin=!0,this.getCommisionDetail
1s(i),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:i},queryParamsHandling:"merge",replaceUrl:!0}))}),this.pickUpStandForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],pickup_latitude:[null],pickup_longitude:[null]}),this.validationMessages={first_name:{required:"Please enter First Name",whiteSpace:"* Space not allowed"},last_name:{required:"Please enter last name",whiteSpace:"* Space not allowed"},email:{required:"* Please enter email",validateEmail:"* Please enter valid email"},phone_no:{required:"Please enter phone number",minlength:"Please enter at least 6 digits",maxlength:"Please enter at most 11 digits"},dial_code:{required:"Please enter dial code",validateDialCode:"Please enter correct dial code"},pickup_location:{required:"Enter Your Pickup Location",whiteSpace:"* Space not allowed"},destination:{required:"Please enter destination",whiteSpace:"* Space not allowed"},ride_type:{required:"Please enter ride type"},request_time:{required:"Please enter request time "},return_time:{required:"Please select return date and time"},recurring:{required:"Extra charge per "},start_date:{required:"Extra charge start date"},end_date:{required:"Please select the end date"},days:{required:"Extra charge per luggage"},auto_dispatch:{required:"Please enter waiting time charge"},driver:{required:"Please select the driver"},paymentMode:{required:"Please provide the payment type"},paymentStatus:{required:"Please provide the payment type"},notes:{required:"Please enter notes"},corporate:{required:"Please enter Corporate"},recurring_time:{required:"Please select the time"},recurring_on:{required:"Please select the days"},employee:{required:"Please select Employee"},booking_type_id:{required:"Please select Booking type"},packages:{required:"Please select packages"},hour:{required:"Please select hour"}},this.initDefaultReturnDateTime(),this.authService.langaugeListSubject.subscribe(e=>{this.languageList=e,setTimeout(()=>{window.localStorage.getItem("query_language_code")&&(this.selectedLanguage=window.localStorage.getItem("query_language_code"),window.localStorage.removeItem("language_code"),this.changeLanguage())},500)}),this.sub=this.authService.langaugeSubjectData.subscribe(e=>{var t,i,n,o;this.currentLanguage=null==e?void 0:e.labels,this.selectedLanguage=null==e?void 0:e.language_code,this.steps=[{name:null===(t=this.currentLanguage)||void 0===t?void 0:t.quote_header,icon:"quote-icon",isActive:!1},{name:null===(i=this.currentLanguage)||void 0===i?void 0:i.transfer_header,icon:"transfer-icon",isActive:!0},{name:null===(n=this.currentLanguage)||void 0===n?void 0:n.payment_header,icon:"payment-icon",isActive:!1}],this.bookRideText=null===(o=this.currentLanguage)||void 0===o?void 0:o.book_ride}),this.authService.themeCode.subscribe(e=>{this.themeCodeData=e}),this.authService.currentUser.subscribe(e=>{Object.keys(e).length>0&&(this.currentUserDetail=e,this.getUserLocations(e.id),this.queryParam.user_id=e.id)}),this.authService.currentCompany.subscribe(e=>{var t,i,n,o;e&&(null==e?void 0:e.company_id)&&(this.currentCompanyDetail=e,this.formatTimeDate=this.currentCompanyDetail.company_date_format+" "+this.currentCompanyDetail.company_time_format,this.roundFormate=null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.round_format,this.distance_unit=null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.distance_unit,this.currentCompanyDetail.company_time_format.includes("a")||this.currentCompanyDetail.company_time_format.includes("A")||(this.timeFormatConfig.time_24hr=!0,this.timeFormatConfig.dateFormat="H:i",this.returnTimeFormatConfig.time_24hr=!0,this.returnTimeFormatConfig.dateFormat="H:i"),this.company_logo=e.company_logo,this.company_id=e.company_id,this.company_id&&(this.getPaymentConfig(),this.getVehicleType(this.company_id),this.getAllTripProperties(),this.getCustomeFields(),this.getRegionList(this.YELOWCAB_SERVICE_TYPE),this.ManagezoneData()),this.dialCode=e.country_dial_code,(null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("dial_code"))||void 0===o?void 0:o.value)||this.patchDefaultDialCode(this.dialCode))}),this.placeSearch.pipe((0,k.b)(300)).subscribe(e=>{this.searchFlight(e)}),this.checkModule(),this.DriverKeyUp.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName(e)}),this.DriverKeyUp2.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName2(e)}),this.DriverKeyUp1.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName1(e)}),this.DriverKeyUpReturn.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturn(e)}),this.DriverKeyUpReturnDest.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturnDest(e)})}
1getCommisionDetails(e){this.loadingState=!0,this.yelowBookingService.getCommisionById(e).subscribe(e=>{var t;this.loadingState=!1,this.agentMinDistance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.trip_minimum_distance},e=>{})}searchDriverByName2(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i,n;(null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places)||void 0===i?void 0:i.length)>0&&(this.responseDatacheckPoint=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.places)})}searchDriverByName1(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i;this.responseDataDestionation=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places,this.isEmbeddedInIframe&&(null===(i=this.responseDataDestionation)||void 0===i?void 0:i.length)&&(this.isLocationDropdownOpen=!0,this.scheduleIframeHeightNotify())})}searchDriverByNameReturn(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturn=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturnDest(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturnDestination=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}createForm(){this.addForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],destination:[null,r.kI.compose([b.Sl])],checkpoint:[null],ride_type:[1,r.kI.compose([r.kI.required])],request_time:[null],return_date:[null],return_trip_time:[null],return_time:[null],return_pickup_location:[null],return_pickup_latitude:[null],return_pickup_longitude:[null],return_destination:[null],return_dropoff_latitude:[null],return_dropoff_longitude:[null],recurring:[null],start_date:[null],auto_dispatch:[!1,r.kI.compose([r.kI.required])],driver:[null],notes:[null],checkpoints:this.fb.array([]),properties:this.fb.array([]),gender:["M"],end_date:[null],recurring_time:[null],recurring_on:[null],paymentMode:[1,r.kI.compose([r.kI.required])],payment_mode_id:[null,r.kI.compose([r.kI.required])],trip_luggage:[this.trip_luggage],no_of_passenger:[this.no_of_passenger],paymentStatus:["pending",r.kI.compose([r.kI.required])],customer:[null],first_name:[null],last_name:[null],email:[null],phone_no:[null],dial_code:[this.dialCode],booster_seat:[0],child_seat:[0],flight_number:[null],booking_type_id:[null,r.kI.compose([r.kI.required])],additional_discount_type:[1],extra_charge_type:[1],trip_time:[null],hour:[null],packages:[null]}),this.getCategories()}checkModule(){this.authService.CommonModule.subscribe(e=>{e&&(this.checkFligth="Y"==(null==e?void 0:e.dspm_019),this.checkReturnTimeConfig=!!(null==e?void 0:e.dspm_012),this.key=null==e?void 0:e.dspm_019_01)}),this.authService.serviceConfig.subscribe(e=>{var t,i;e&&(this.skipLogin="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_LOGIN],e.csc_064&&(this.isOtpVerification="Y"==e.csc_064),e.csc_057&&(this.checkLoginTypes=e.csc_057),this.applyGuestFieldValidators(),this.skip_destination=!!e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION]&&"Y"===e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION],this.updateDestiantionValidation(this.skip_destination),this.pre_payment_value=null!==(i=null!==(t=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PRE_PAYMENT])&&void 0!==t?t:e.dpsc_030)&&void 0!==i?i:e.tsc_030,this.pre_payment="1"==this.pre_payment_value||1==this.pre_payment_value,e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD]&&(this.paymentModeConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD],this.applyPaymentModeConfig(1)),e.csc_041&&(this.checkRegion=e.csc_041),this.checkGenderEnable=e[F.kh[this.YELOWCAB_SERVICE_TYPE].SHOW_GENDER_OPTIONS],"Y"==this.checkRegion&&e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]&&(this.checkOnlyPickupConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]),(e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE]||e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE])&&(this.requestMode=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE],this.requestModeSchedule=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE],this.get
1SeduleConfige(!0)),this.allocation_type=e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.autoDispatch=3!=this.allocation_type,this.showCode="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.displayLuggagePassenger="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].PassengerLuggage],e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]&&(this.fareAccebility=e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]),this.isBookingHold="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].HOLD_BOOKING])})}getMaxLuggagePassengerCapacity(){if(this.max_luggage_capacity_filter>0){this.luggageArray=[];for(let e=0;e<=this.max_luggage_capacity_filter;e++)this.luggageArray.push({id:e,name:`${e}`})}if(this.max_capacity_filter>=1){this.numberFilter=[];for(let e=1;e<=this.max_capacity_filter;e++)this.numberFilter.push({id:e,name:`${e}`})}}changeGender(e){this.genderValue=e,this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getCurrentStep(){return this.steps[this.currentStepIndex]}isCurrentStep(e){return e===this.currentStepIndex}getFormDetails(e){this.formData=e,this.no_of_passenger=null==e?void 0:e.no_of_passenger,this.trip_luggage=null==e?void 0:e.trip_luggage,this.isFirstPart=e.isFirstPart,this.firstPageData=e,e&&(this.hideBasicPage=!0,this.hideUserPage=!1),this.hidePayment=!0,this.currentStepIndex=1}editPage(e){this.currentStepIndex=0,this.isFirstPart=!0,this.hideUserPage=!0,this.hideBasicPage=!1,this.hidePayment=!0}goTripDetails(e){e&&(this.hidePayment=!0,this.hideUserPage=!1,this.currentStepIndex=1)}changeLanguage(){var e;localStorage.setItem("language_code",this.selectedLanguage);let t=this.languageList.find(e=>e.language_code==this.selectedLanguage);(null===(e=Object.keys(t))||void 0===e?void 0:e.length)>0&&this.authService.setlanguage([t])}displaySuccess(e){this.currentStepIndex=3,this.hidePayment=!0,this.hideSuccess=!1}displaySuccessresponse(e){var t;this.trip_id=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.booking_number}changeBookingType(e){var t,i;if(e&&!(null==e?void 0:e.id)){const n=e;e=(null===(t=this.transactionCategory)||void 0===t?void 0:t.find(e=>(null==e?void 0:e.id)==n))||(null===(i=this.transactionCategoryList)||void 0===i?void 0:i.find(e=>(null==e?void 0:e.id)==n))}const n=this.booking_type_id;this.booking_type_id=null,(null==e?void 0:e.id)&&(n&&n!==e.id&&this.resetVehicleOptionsForBookingTypeChange(),this.addForm.controls.booster_seat.setValue(0),this.addForm.controls.child_seat.setValue(0),this.addForm.controls.booster_seat.updateValueAndValidity(),this.addForm.controls.child_seat.updateValueAndValidity(),this.booking_type_id=null==e?void 0:e.id,this.selectedBookingTypeObj=e,["hourly","round"].includes(e.field_key)&&this.updateDestiantionValidation(!0),this.getotherCharges(null==e?void 0:e.id),this.getCustomeFields(),(this.pickup_latitude&&this.pickup_longitude||this.destination_latitude&&this.destination_longitude)&&(this.pickup_latitude&&this.pickup_longitude&&this.UpdateAndCheckPickUpLocation(this.pickup_latitude,this.pickup_longitude,!1),this.destination_latitude&&this.destination_longitude&&this.UpdateDestinationLocation(this.destination_latitude,this.destination_longitude,!1),this.bindMarkerPoints()),this.getFavoriteLocation(),this.selectedVehicleObj&&["hourly","package"].includes(null==e?void 0:e.field_key)&&this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj))}getCategories(){this.loadingState=!0,this.yelowCabService.getOtherCategoryList().subscribe(e=>{var t;if(this.loadingState=!1,e.status&&(this.transactionCategoryList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list.filter(e=>("hourly"==e.field_key||"package"==e.field_key?this.isRental=!0:("point_to_point"==e.field_key||"airport_drop_off_transfer"==e.field_key||"airport_pick_up_transfer"==e.field_key||"round"==e.field_key)&&(this.isTaxi=!0),e.is_active)),this.transactionCategoryList.length>0?(this.transactionCategory=this.transactionCategoryList,this.isTaxi?this.transactionCategory=this.transactionCategoryList.filter(e=>"point_to_point"==e.field_key||"airport_drop_off_transfer"==e.field_key||"airport_pick_up_transfer"==e.field_key||"round"==e.field_key):this.isRental&&(this.transactionCategory=this.transactionCategoryList.filter(e=>"hourly"==e.field_key||"package"==e.field_key))):this.transactionCategory=[],this.transactionCategory.length>0)){let e=localStorage.getItem("booking_type_id"),t={};t=e?this.transactionCategory.find(t=>
1t.id==e):this.transactionCategory[0],this.booking_type_id=null==t?void 0:t.id,this.isTaxiActive="point_to_point"==(null==t?void 0:t.field_key)||"airport_drop_off_transfer"==(null==t?void 0:t.field_key)||"airport_pick_up_transfer"==(null==t?void 0:t.field_key)||"round"==(null==t?void 0:t.field_key),this.isRentalActive="hourly"==(null==t?void 0:t.field_key)||"package"==(null==t?void 0:t.field_key),this.selectedBookingTypeObj=t,"round"==t.field_key&&this.updateDestiantionValidation(!0),this.getFavoriteLocation(),this.getCustomeFields(),this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.getotherCharges(this.booking_type_id)}},e=>{this.loadingState=!1})}getCustomeFields(){let e={service_type:this.YELOWCAB_SERVICE_TYPE,category_id:this.booking_type_id,company_id:JSON.parse(this.company_id),user_type:"0,3"};this.yelowCabService.getExtraFields(e).subscribe(e=>{var t;e.status&&(this.displayChidSheet=!1,this.displayBoosterSheet=!1,null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>("child_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayChidSheet=!0),"booster_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayBoosterSheet=!0),e.checked=1==(null==e?void 0:e.is_required),Object.assign({},e))))})}getotherCharges(e){let t={service_type:this.YELOWCAB_SERVICE_TYPE,booking_type_id:e,is_active:1};this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.yelowCabService.getOtherChargesList(t).subscribe(e=>{var t,i;e.status&&(this.allOtherChargesArray=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list,this.otherChargesArray=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.list.map(e=>(e.charges=0,e.charge_price=0,e.return_charges=0,e.checked=!1,e.currentValue=0,this.otherChargArray[null==e?void 0:e.charges_key]=e,Object.assign({},e))).filter(e=>1==(null==e?void 0:e.charges_category)))}),this.cd.detectChanges()}checkOtherCharge(e,t){var i;this.otherChargesArray=null===(i=this.otherChargesArray)||void 0===i?void 0:i.map(e=>{var i;return(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&((null===(i=this.otherChargArray)||void 0===i?void 0:i[e.charges_key])&&(this.otherChargArray[e.charges_key].checked=!e.checked),e.checked=!e.checked,"booster_seat"!=e.charges_key&&"child_seat"!=e.charges_key&&(e.currentValue=e.checked?e.currentValue>0?e.currentValue:1:0)),Object.assign({},e)}),"booster_seat"==(null==t?void 0:t.charges_key)?(this.addForm.controls.booster_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.booster_seat.value):"child_seat"==(null==t?void 0:t.charges_key)&&(this.addForm.controls.child_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.child_seat.value),this.selectedVehicleObj&&(this.calCulateOtherCharges2(),this.refreshDetailModalVehicleFare())}checkTripOtherCharge(e,t){var i;this.tripOtherCharges=null===(i=this.tripOtherCharges)||void 0===i?void 0:i.map(e=>((null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&(e.checked=!e.checked),Object.assign({},e)))}getFlight(e){var t,i,n;e?(this.addForm.patchValue({flight_number:null===(t=e.flight)||void 0===t?void 0:t.iata}),this.flightNumbers=e,this.selectedFlightObj=this.flightNumbers,this.selectedFlightObjName=null===(n=null===(i=this.selectedFlightObj)||void 0===i?void 0:i.flight)||void 0===n?void 0:n.iata):(this.addForm.patchValue({flight_number:null}),this.selectedFlightObj=null)}searchPlace(e,t){""!==e.trim()&&this.placeSearch.next({search:e,type:t})}searchFlight(e){e&&(this.loadingState=!0,fetch(`https://api.aviationstack.com/v1/flights?access_key=${this.key}&flight_iata=${null==e?void 0:e.search}&type=departure`).then(e=>e.json()).then(e=>{e&&(this.responseFlight=e.data),this.loadingState=!1}).catch(e=>{this.loadingState=!1}))}incrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;null===(n=this.addForm.get(e))||void 0===n||n.setValue(a+1),t&&(t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value),this.selectedVehicleObj&&(this.calCulateOtherCharges2
1(),this.refreshDetailModalVehicleFare())}decrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;a>0&&(null===(n=this.addForm.get(e))||void 0===n||n.setValue(a-1)),t&&(t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value),this.selectedVehicleObj&&(this.calCulateOtherCharges2(),this.refreshDetailModalVehicleFare())}increment(e){const t=this.properties.at(e).get("value");t.setValue(t.value?Number(t.value)+1:1)}get properties(){return this.addForm.get("properties")}decrement(e){const t=this.properties.at(e).get("value");t.value>0&&t.setValue(Number(t.value)-1)}onInputChange(e=null){e?this.generateErrors(e):Z.op._generateErrors(this.addForm,this.formErrors,this.validationMessages,this.formSubmited)}generateErrors(e){Z.op._generateErrors(e,this.formErrors,this.validationMessages,this.formSubmited)}getFavoriteLocation(){this.yelowCabService.getFavoriteLocationList(this.booking_type_id).subscribe(e=>{var t,i;if(this.loadingState=!1,e.success||e.status){let n=e.data.location.map(e=>(e.latitude=parseFloat(e.latitude),e.longitude=parseFloat(e.longitude),e.full_text=e.address,delete e.address,e));n&&("airport_drop_off_transfer"!=(null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key)?(this.responseData=n,this.responseDatacheckPoint=n):(this.responseData=[],this.responseDatacheckPoint=[]),this.responseDataDestionation="airport_pick_up_transfer"!=(null===(i=this.selectedBookingTypeObj)||void 0===i?void 0:i.field_key)?n:[])}},e=>{})}searchDriverByName(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i;this.responseData=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places,this.isEmbeddedInIframe&&(null===(i=this.responseData)||void 0===i?void 0:i.length)&&(this.isLocationDropdownOpen=!0,this.scheduleIframeHeightNotify())})}searchEvent(e){var t,i,n,o;this.isEmbeddedInIframe&&(this.isLocationDropdownOpen=!1,this.scheduleIframeHeightNotify()),e?(this.onInputChange(this.addForm.controls.pickup_location),this.clearPickup=!1,this.submitFirstPart=!1,this.showNextButton=!1,this.addForm.controls.pickup_location.setValue(e.full_text),this.searchText=e.full_text,this.addForm.controls.pickup_location.updateValueAndValidity(),this.displayFlightNumber=!(!(null===(i=null===(t=this.addForm.controls.destination)||void 0===t?void 0:t.value)||void 0===i?void 0:i.toLowerCase().includes("airport"))&&!(null===(o=null===(n=this.addForm.controls.pickup_location)||void 0===n?void 0:n.value)||void 0===o?void 0:o.toLowerCase().includes("airport"))),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickup_latitude=e.latitude,this.pickup_longitude=e.longitude,this.UpdateAndCheckPickUpLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.pickup_latitude=e.data.latitude,this.pickup_longitude=e.data.longitude,this.UpdateAndCheckPickUpLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.pickup_location.setValue(null),this.addForm.controls.pickup_location.updateValueAndValidity(),this.pickup_latitude=null,this.pickup_longitude=null,this.bindMarkerPoints(),this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.vehicleArray=[],this.filterVehicleArray=[],this.finalFare=0,this.clearPickup=!0)}bindMarkerPoints(){let e=[{lat:this.pickup_latitude,lng:this.pickup_longitude},{lat:this.destination_latitude,lng:this.destination_longitude}];const t=this.addForm.get("checkpoints");this.getWayPoint=[],this.selectedCheckpointsArray=[],t.value.map(i=>{this.getWayPoint.push({latitude:i.lat,longitude:i.lng}),e.push({lat:i.lat,lng:i.lng}),this.selectedCheckpointsArray.push({id:t.value.length,latitude:i.lat,longitude:i.lng})}),e.filter(e=>this.isValidMapPoint(e)).length&&this.addMarker(e)}addMarker(e){var t;if(!this.map||"undefined"==typeof google)return;(null===(t=this.marker)||void 0===t?void 0:t.length)&&this.marker.forEach(e
1=>{(null==e?void 0:e.setMap)&&e.setMap(null)}),this.clearMarkerLabelOverlays(),this.marker=[];const i=new google.maps.LatLngBounds;null==e||e.forEach((e,t)=>{const n=0==t?Z.GB:1==t?Z.kJ:Z.yF;if(this.isValidMapPoint(e)){const t={lat:Number(e.lat),lng:Number(e.lng)},o=new google.maps.Marker({draggable:!1,position:t,map:this.map,icon:{url:n,scaledSize:new google.maps.Size(36,36),anchor:new google.maps.Point(18,36)},optimized:!1});this.marker.push(o),i.extend(t)}}),this.marker.forEach((e,t)=>{e.addListener("dragend",e=>{const i=e.latLng,n=i.lat(),o=i.lng();this.googleService.getAddressFromLatLng(n,o).then(e=>{e&&(this.draggedMarkerObj={updateIndex:t,address:e.results[0].formatted_address,lat:n,lng:o},this.updateMarker(this.draggedMarkerObj))})})});const n=(e||[]).filter(e=>this.isValidMapPoint(e));n.length>=2?this.fitMapToBounds(i):1===n.length&&this.centerMapOnPoint({lat:Number(n[0].lat),lng:Number(n[0].lng)}),google.maps.event.addListenerOnce(this.map,"idle",()=>{this.attachMarkerLabelsAfterMapReady()})}updateMarker(e){0==e.updateIndex?(this.addForm.controls.pickup_location.setValue(e.address),this.searchText=e.address,this.addForm.controls.pickup_location.updateValueAndValidity(),this.UpdateAndCheckPickUpLocation(e.lat,e.lng,!1)):1==e.updateIndex?(this.addForm.controls.destination.setValue(e.address),this.searchTextDestionation=e.address,this.addForm.controls.destination.updateValueAndValidity(),this.UpdateDestinationLocation(e.lat,e.lng,!1)):(this.currenCheckpointInput=e.updateIndex-1,this.updateCheckPoint(e.lat,e.lng,e.address))}getRegionList(e){this.yelowBookingService.getCompanyRegionList(e).subscribe(e=>{var t;e&&(this.regionResponse=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list)||[])})}submitUserPickUpLocationForm(){if(this.selectedUserPickupLocation){let e=this.userPickipLocationsArray[this.selectedUserPickupLocation-1];e&&(this.pickup_latitude=parseFloat(e.latitude),this.pickup_longitude=parseFloat(e.longitude),this.searchText=e.address,this.searchEvent({latitude:this.pickup_latitude,longitude:this.pickup_longitude,full_text:e.address}))}this.closeUserPickupLocationForm()}closeUserPickupLocationForm(){$("#selectUserPickupLocation").modal("hide")}updateUserPickupLocation(e,t){this.selectedUserPickupLocation=e}updateUserDropoffLocation(e,t){this.selectedUserDropoffLocation=e}submitUserDropoffLocationForm(){if(this.selectedUserDropoffLocation){let e=this.userDropoffLocationsArray[this.selectedUserDropoffLocation-1];e&&(this.destination_latitude=parseFloat(e.latitude),this.destination_longitude=parseFloat(e.longitude),this.searchTextDestionation=e.address,this.searchEventDestination({latitude:this.destination_latitude,longitude:this.destination_longitude,full_text:e.address}))}this.closeUserDropoffLocationForm()}updateCheckPoint(e,t,i,n=!0){let o=!1;if("Y"==this.checkRegion){for(let i of this.regionResponse)o||(o=(0,Z.eD)(e.toFixed(5),t.toFixed(5),(0,C.U)(i.geofence)),this.selectedCheckPointRegionData=i);!0===o?(this.showNextButton=!0,this.updateDestiantionValidation(!1),this.checkPointsValidation(),this.updateRegionPointValiation()):"N"==this.checkOnlyPickupConfig?(this.showNextButton=!1,this.lastCheckPointValid=!1,this.checkOutofServiceArea=!1):(this.checkOutofServiceArea=!0,this.showNextButton=!0,this.lastCheckPointValid=!1)}else this.showNextButton=!0,this.lastCheckPointValid=!0;this.updateCheckPoints(i,e,t,this.currenCheckpointInput-1)}UpdateAndCheckPickUpLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){var i;n.pickup_latitude=e,n.pickup_longitude=t;let o=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)o||(o=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.selectedPickupRegionData=e);!0===o?(n.showNextButton=!0,n.pickupRegionFound=!0,n.checkDropUpLocation(n.origin.is_pickUp)):(n.pickupRegionFound=o,n.showNextButton=!1),n.updateRegionPointValiation()}else n.showNextButton=!0,n.pickupRegionFound=!0;if(n.fixZoneDisableDropoff=!1,n.zoneData.from=null,n.zoneData.from_title=null,n.zoneData.from_obj=null,n.zoneData.from_ids=null,n.pickupRegionFound?(yield n.zoneUtilityService.findPickupZone(n.pickup_latitude,n.pickup_longitude,n.zoneResponse,n.zoneData,()=>n.getZonePrice(),()=>{},n.getZonePricingParams()),(null===(i=n.zoneData)||void 0===i?void 0:i.from_ids)?n.loadZoneConfigurationForPickup(String(n.zoneData.from_ids)):n.resetZoneBookingOptions()):n.resetZoneBookingOptions(),n.addZoneOtherCharges(),n.queuePikupFound=!1,n.queuePikupList.length>0)for(let e of n.queuePikupList)n.queuePikupFound=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.queuePikupData=n.queuePikupFound?e:null;n.queuePikupData?n.getQueuePickupLatLong(n.queuePikupData.pickup_stand_id):n.queuePikupStandList=[],1===n.onlineDriver&&!n.autoDispatch&&n.getOnlineDriver(),n.updateSameZoneTripRestriction(),n.refreshVehicleEstimatesIfReady()})()}setAutoDispatch(e){this.autoDispatch=e,this.autoDispatch?(this.addForm.get("driver").setValidators([]),this.addForm.get("driver").setValue(null)):(this.getOnlineDriver(),this.addForm.get("driver").setValidators([r.kI.required])),this.addForm.get("driver").updateV
1alueAndValidity()}setOnlineDriver(e){this.onlineDriver=e,this.addForm.controls.driver.reset(),this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getOnlineDriver(){if(this.onlineDriverArray=[],this.pickup_latitude&&this.pickup_longitude){let e={company_id:this.currentCompanyDetail.company_id,latitude:this.pickup_latitude,longitude:this.pickup_longitude,service_type:this.YELOWCAB_SERVICE_TYPE};"Y"==this.checkGenderEnable&&(e.gender=this.genderValue),this.taxiBookingService.getNearByOnlineDriverList(e).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=[],i=[];e.data.forEach(e=>{(null==e?void 0:e.driver_id)&&t.push(null==e?void 0:e.driver_id),(null==e?void 0:e.distance)&&(i[null==e?void 0:e.driver_id]=1===this.currentCompanyDetail.distanceUnit_s_key_value?(null==e?void 0:e.distance).toFixed(2):(.621371192*(null==e?void 0:e.distance)).toFixed(2))}),this.getUserDetails(t,i)}else this.onlineDriverArray=[]})}else this.toasterService.error("Enter Your Pickup Location")}getUserDetails(e,t){if((null==e?void 0:e.length)>0){const i=null==e?void 0:e.join(",");this.yelowBookingService.getUserDetails(i).subscribe(e=>{e.status&&(this.driverArray=null==e?void 0:e.data.map(e=>(e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} ${(null==e?void 0:e.dial_code)?"("+(null==e?void 0:e.dial_code):""} ${(null==e?void 0:e.phone_number)?(null==e?void 0:e.phone_number)+")":""} ) ${t[e.id]} ${this.currentCompanyDetail.distance_unit}`,e)))})}}getDriverList(e){if(2===this.onlineDriver||3==this.allocation_type){let t={company_id:this.currentCompanyDetail.company_id,is_active:1};e&&e.term?t.search=e.term:this.driverArray=[],"Y"==this.checkGenderEnable&&(t.gender=this.genderValue),this.yelowBookingService.getDriversList(t).subscribe(e=>{var t;this.loadingState=!1,e.success||e.status?(this.driverArray=null===(t=e.data)||void 0===t?void 0:t.list,this.driverArray.forEach(e=>{e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} (${null==e?void 0:e.dial_code} ${null==e?void 0:e.phone_number})`})):this.driverArray=[]})}}getZonePrice(){this.yelowCabService.getZoneprice({from_zone_id:this.zoneData.from,dropoff_type:2,is_active:1}).subscribe(e=>{e.status?(this.zonePriceData=e.data.list,this.fixZonePriceData=this.zonePriceData[0],this.zonePriceData.length>0?(this.fixZoneDisableDropoff=!0,$("#fixdestination").modal("show")):(this.fixZonePriceData=null,this.fixZoneDisableDropoff=!1)):(this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null)})}getQueuePickupLatLong(e){this.yelowBookingService.getPikupPointsById(e).subscribe(e=>{var t,i;if(1===e.status){if(this.queuePikupStandList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pickup_point,this.queuePikupStandList.length>0){let t=this.queuePikupStandList[0];this.pickUpStandForm.patchValue({pickup_location:t.address,pickup_latitude:t.latitude,pickup_longitude:t.longitude}),this.queueId=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.queue_id,this.pickup_longitude=t.longitude,this.pickup_latitude=t.latitude}}else this.queuePikupStandList=[]})}OnSearchCheckpoint(e){""!==e.trim()&&this.DriverKeyUp2.next(e)}removeRow(e){this.currenCheckpointInput=null;const t=this.addForm.get("checkpoints");this.selectedCheckpointsArray.pop({id:t.controls.length,latitude:null,longitude:null}),t.removeAt(e),this.checkPointsValidation(!0),this.updateCheckPointsRegion(),this.cd.detectChanges(),this.bindMarkerPoints(),this.refreshVehicleEstimatesIfReady(),this.selectedCheckpointsArray.length<1&&(this.updateDestiantionValidation(this.skip_destination),this.onInputChange(this.addForm.controls.destination))}updateDestiantionValidation(e){e?(this.addForm.controls.destination.setValidators(null),this.addForm.controls.destination.updateValueAndValidity()):(this.addForm.controls.destination.setValidators(r.kI.required),this.addForm.controls.destination.updateValueAndValidity())}addNewRow(){const e=this.addForm.get("checkpoints");"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?this.selectedPickupRegionData?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location"):this.pickup_latitude&&this.pickup_longitude?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location")}validateCheckPoint(e){e.valid&&(e.controls.length<=2?e.controls.length>0&&!e.at(e.controls.length-1).valid?this.toasterService.error("Your Previous checkpoints is invali
1d!"):(e.push(this.initRows()),this.cd.detectChanges(),this.selectedCheckpointsArray.push({id:e.controls.length,latitude:null,longitude:null})):this.toasterService.error("You can only add maximum three checkpoints!"))}initRows(){return new r.cw({value:new r.NI(null,r.kI.compose([r.kI.required])),lat:new r.NI(null),lng:new r.NI(null),pickupLacation:new r.NI(this.selectedPickupRegionData),dropofupLacation:new r.NI(this.selectedDropRegionData),zone_array:new r.NI(this.regionResponse),checkRegion:new r.NI(this.checkRegion),checkOnlyPickup:new r.NI(this.checkOnlyPickupConfig)},{validators:C.v.is_point})}OnSearchDestination(e){""!==e.trim()&&this.DriverKeyUp1.next(e)}updateCheckPoints(e,t,i,n){const o=this.addForm.get("checkpoints");for(var a=0;a<o.length;a++)a==n&&o.at(a).patchValue({value:e,lat:t,lng:i});this.updateCheckPointsRegion(),setTimeout(()=>{this.bindMarkerPoints()},200)}updateCheckPointsRegion(){let e=this.addForm.get("checkpoints").value.map(e=>({latitude:Number(e.lat),longitude:Number(e.lng)}));this.checkpointValidity={},e.forEach("Y"===this.checkRegion?(e,t)=>{let i=!1;for(let n of this.regionResponse){const t=(0,C.U)(n.geofence);if((0,Z.eD)(e.latitude,e.longitude,t)){i=!0;break}}this.checkpointValidity[t]=i}:(e,t)=>{this.checkpointValidity[t]=!0})}searchEventCheckpoint(e,t){this.submitFirstPart=!1,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?this.updateCheckPoints(e.full_text,e.latitude,e.longitude,t):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(i=>{i.status&&i.data.latitude&&i.data.longitude&&this.updateCheckPoints(e.full_text,i.data.latitude,i.data.longitude,t)})}openUserPickupLocationForm(){$("#selectUserPickupLocation").modal("show")}OnSearch(e){""!==e.trim()&&this.DriverKeyUp.next(e)}checkDropUpLocation(e){this.selectedPickupRegionData&&this.selectedDropRegionData&&(this.selectedDropRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id?(e===this.origin.is_drop&&(this.dropRegionFound="Y"==this.checkOnlyPickupConfig),e===this.origin.is_pickUp&&(this.pickupRegionFound="Y"==this.checkOnlyPickupConfig),this.showNextButton="Y"==this.checkOnlyPickupConfig):(e===this.origin.is_drop&&(this.dropRegionFound=!0),e===this.origin.is_pickUp&&(this.pickupRegionFound=!0),this.showNextButton=!0)),this.selectedCheckPointRegionData&&this.selectedDropRegionData&&this.selectedPickupRegionData&&this.checkPointsValidation()}checkPointsValidation(e=null){this.selectedPickupRegionData&&this.selectedCheckPointRegionData?this.selectedCheckPointRegionData&&this.selectedPickupRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):this.selectedCheckPointRegionData&&this.selectedDropRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedDropRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):(!this.selectedPickupRegionData||!this.selectedDropRegionData&&!1===this.skip_destination)&&(this.showNextButton=!1):this.showNextButton="Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig,e&&(this.showNextButton=this.selectedDropRegionData&&this.selectedPickupRegionData?this.selectedDropRegionData.company_region_id==this.selectedPickupRegionData.company_region_id:"Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig)}UpdateDestinationLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){n.destination_latitude=e,n.destination_longitude=t,Number(n.destination_latitude).toFixed(5),Number(n.destination_longitude).toFixed(5);let i=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)i||(i=(0,Z.eD)(n.destination_latitude.toFixed(5),n.destination_longitude.toFixed(5),(0,C.U)(e.geofence)),n.selectedDropRegionData=e);!0===i?(n.showNextButton=!0,n.checkDropUpLocation(n.origin.is_drop),n.updateRegionPointValiation()):"N"==n.checkOnlyPickupConfig?(n.dropRegionFound=!1,n.showNextButton=!1,n.checkOutofServiceArea=!1):(n.checkOutofServiceArea=!0,n.dropRegionFound=!0,n.showNextButton=!0)}else n.showNextButton=!0,n.dropRegionFound=!0;n.zoneData.to=null,n.zoneData.to_title=null,n.zoneData.to_obj=null,n.zoneData.to_ids=null,n.dropRegionFound&&(yield n.zoneUtilityService.findDropoffZone(n.destination_latitude,n.destination_longitude,n.zoneResponse,n.zoneData,()=>{},n.getZonePricingParams())),n.addZoneOtherCharges(),n.updateSameZoneTripRestriction(),n.refreshVehicleEstimatesIfReady()})()}updateRegionPointValiation(){const e=this.addForm.get("checkpoints");if(e.controls.length>
10)for(let t of e.controls)"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?(t.patchValue({pickupLacation:this.selectedPickupRegionData,dropofupLacation:this.selectedDropRegionData}),t.setValidators(C.v.is_point)):(t.setValidators([]),t.setValidators(null)),t.updateValueAndValidity()}addZoneOtherCharges(){let e=this.allOtherChargesArray.filter(e=>{var t,i;let n=null==e?void 0:e.zone_id;return null!==n&&(n===(null===(t=this.zoneData)||void 0===t?void 0:t.to)&&2==(null==e?void 0:e.zone_type)||n===(null===(i=this.zoneData)||void 0===i?void 0:i.from)&&1==(null==e?void 0:e.zone_type))});this.otherChargesArray=this.allOtherChargesArray.filter(e=>1==(null==e?void 0:e.charges_category)),this.otherChargesArray=[...this.otherChargesArray,...e],this.cd.detectChanges()}ManagezoneData(){this.yelowCabService.getZoneList().subscribe(e=>{e&&(this.zoneResponse=e.data.list)})}getUserLocations(e){this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[]}searchEventDestination(e){var t,i,n,o;this.isEmbeddedInIframe&&(this.isLocationDropdownOpen=!1,this.scheduleIframeHeightNotify()),e?(this.clearDestination=!1,this.submitFirstPart=!1,this.onInputChange(this.addForm.controls.destination),this.showNextButton=!1,this.addForm.controls.destination.setValue(e.full_text),this.addForm.controls.destination.updateValueAndValidity(),this.searchTextDestionation=e.full_text,this.displayFlightNumber=!(!(null===(i=null===(t=this.addForm.controls.destination)||void 0===t?void 0:t.value)||void 0===i?void 0:i.toLowerCase().includes("airport"))&&!(null===(o=null===(n=this.addForm.controls.pickup_location)||void 0===n?void 0:n.value)||void 0===o?void 0:o.toLowerCase().includes("airport"))),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.destination_latitude=e.latitude,this.destination_longitude=e.longitude,this.UpdateDestinationLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.destination_latitude=e.data.latitude,this.destination_longitude=e.data.longitude,this.UpdateDestinationLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.destination.setValue(null),this.addForm.controls.destination.updateValueAndValidity(),this.destination_latitude=null,this.destination_longitude=null,this.bindMarkerPoints(),this.clearDestination=!0,this.selectedVehicleObjName=null,this.selectedVehicleObj=null)}openUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("show")}closeUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("hide")}changeSelectedTab(e,t=!0){1==e?(this.driverType=[{type_id:1,type_name:"Online Driver"}],this.isSchedual_trip=0,this.resetRequestTimeToInitialNow()):(this.driverType=[{type_id:1,type_name:"Online Driver"},{type_id:2,type_name:"All Driver"}],this.isSchedual_trip=1),this.addForm.controls.ride_type.setValue(e),this.selectedTab=e,2===this.selectedTab&&(this.zoneConfigActive?this.applyRequestTimeMinDate():this.getSeduleConfige(!1)),this.updateRecurringValidations(e,this.addForm)}resetRequestTimeToInitialNow(){this.setMinTime();const e=new Date(this.trip_time);this.request_time=e,this.addForm.controls.request_time.setValue(e),this.addForm.controls.request_time.updateValueAndValidity(),this.addForm.controls.trip_time.setValue(e),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(e)),this.returnEnable&&this.initDefaultReturnDateTime()}updateRecurringValidations(e,t){if(3===e)t.get("recurring_time").setValidators([r.kI.required]),t.get("recurring_time").updateValueAndValidity(),t.get("end_date").setValidators([r.kI.required]),t.get("end_date").updateValueAndValidity();else{t.controls.recurring_time.clearValidators(),t.get("recurring_time").updateValueAndValidity(),t.controls.end_date.clearValidators(),t.get("end_date").updateValueAndValidity();try{t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}catch(i){t.get("recurring_on").clearValidators(),t.get("recurring_on").updateV
1alueAndValidity()}}}getSeduleConfige(e=!0){this.yelowBookingService.scheduleconFig({company_id:this.currentCompanyDetail.company_id},F.kh[this.YELOWCAB_SERVICE_TYPE].SCHEDULE_MODULE).subscribe(t=>{if(this.loadingState=!1,t.success||t.status){if(this.schedule_tripArray=t.data,this.schedule_tripArray.length>0){this.schedule_trip=!0;for(let e of this.schedule_tripArray)e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].TIMEOUT?this.addMinutes(Number(e.config_value),null):e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].MAX_TIME&&this.addMinutes(null,Number(e.config_value));e&&!this.zoneConfigActive&&("Y"==this.requestMode&&"Y"==this.requestModeSchedule?(this.rideType=[{type_id:1,type_name:"Now"},{type_id:2,type_name:"Later"}],this.setRideType(1)):"Y"==this.requestModeSchedule?(this.rideType=[{type_id:2,type_name:"Later"}],this.setRideType(2)):"Y"==this.requestMode&&(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1)))}else this.zoneConfigActive||(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1));this.zoneConfigActive||(this.allRideTypes=[...this.rideType]),(this.zoneCutOffMinutes||2===this.selectedTab)&&this.applyRequestTimeMinDate()}})}addMinutes(e=null,t=null){if(e&&(this.min_date=e,this.request_time=new Date,this.setMinTime(),this.timeFormatConfig.minDate=new Date(new Date(this.trip_time).setSeconds(0,0)),this.timeFormatConfig2.minDate=new Date(new Date(this.trip_time).setHours(0,0,0,0)),this.request_time=this.trip_time,this.addForm.controls.request_time.setValue(this.trip_time)),t){this.max_date=t;let e=new Date(L().add(this.max_date,"minutes").toString()).setHours(23,59,59,999);this.timeFormatConfig2.maxDate=new Date(e),this.timeFormatConfig.maxDate=new Date(e)}this.is_date=!0}setRideType(e){this.selectedTab=e,this.isSchedual_trip=1==e?0:1,this.addForm.controls.ride_type.setValue(e),this.addForm.controls.ride_type.updateValueAndValidity(),2===e&&this.applyRequestTimeMinDate()}onFilterChange(e,t){var i;0==t?this.no_of_passenger=e.id:this.trip_luggage=e.id;const n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.id;this.filterVehicleArray=this.vehicleArray.filter(e=>e.max_capacity>=this.no_of_passenger&&e.max_luggage_capacity>=this.trip_luggage);const o=this.filterVehicleArray.find(e=>(null==e?void 0:e.id)==n)||this.filterVehicleArray[0];if(!o)return this.selectedVehicleObj=null,void(this.selectedVehicleObjName=null);this.changeVehicle(o)}changeVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w;if(this.filterVehicleArray.forEach(t=>{t.id==e.id?(t.final_fare_amount=(null==t?void 0:t.capacity)<this.no_of_passenger?t.final_fare_amount-this.totalExtraPassengerCharge+t.pricing.extra_charge_per_passenger*(this.no_of_passenger-(null==t?void 0:t.capacity)):t.final_fare_amount-this.totalExtraPassengerCharge,t.final_fare_amount=(null==t?void 0:t.vehicle_luggage_capacity)<this.trip_luggage?t.final_fare_amount-this.totalExtraLuggageCharge+t.pricing.extra_charge_per_luggage*(this.trip_luggage-t.vehicle_luggage_capacity):t.final_fare_amount-this.totalExtraLuggageCharge,t.checked=!0):t.checked=!1}),this.selectedVehicleObjName=null,this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.zone_extra_charge=0,this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0,this.selectedVehicleObj=e,this.currentObject=e,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.selectedVehicleObj,this.zone_price_id=null===(n=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.zone_price_model)||void 0===n?void 0:n.zone_price_id,this.zoneData.zone_price_applied=null===(a=null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing)||void 0===a?void 0:a.zone_price_applied,this.startingFrom="Y"==(null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.zone_price_applied)?2==(null===(d=null===(u=null===(s=this.selectedVehicleObj)||void 0===s?void 0:s.pricing)||void 0===u?void 0:u.zone_price_model)||void 0===d?void 0:d.calculation_type):2===(null===(c=this.selectedVehicleObj.pricing)||void 0===c?void 0:c.calculation_type),this.finalFare=null===(h=this.selectedVehicleObj)||void 0===h?void 0:h.final_fare.amount,this.storeOldVehiclePrice
1=null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.final_fare.amount,this.taxAddition=null===(p=this.selectedVehicleObj)||void 0===p?void 0:p.final_fare.tax_amount,this.zone_extra_charge=(null===(_=null===(m=this.selectedVehicleObj)||void 0===m?void 0:m.final_fare)||void 0===_?void 0:_.zone_extra_charges)?null===(v=null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare)||void 0===v?void 0:v.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge,this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(null===(y=this.selectedBookingTypeObj)||void 0===y?void 0:y.field_key)||(this.rentalPackages=null!==(k=null===(x=null===(b=this.selectedVehicleObj)||void 0===b?void 0:b.pricing)||void 0===x?void 0:x.slots)&&void 0!==k?k:[]),"package"==(null===(Z=this.selectedBookingTypeObj)||void 0===Z?void 0:Z.field_key)&&this.isPackageSlotAmountPricing(null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.pricing)){const e=null===(T=null===(F=this.rentalPackages)||void 0===F?void 0:F.find(e=>{var t;return e.id==(null===(t=this.addForm.value)||void 0===t?void 0:t.packages)}))||void 0===T?void 0:T.slot_amount;if(e){let t=e-this.additionalDiscount;this.package_pricing=t,this.selectedVehicleObj.final_fare.amount=t,this.selectedVehicleObj.final_fare_amount=this.finalFare,this.finalFare=this.selectedVehicleObj.final_fare.amount+this.taxAddition+this.zone_extra_charge+this.calCulateOtherCharges(this.selectedVehicleObj)+this.totalExtraLuggageCharge+this.totalExtraPassengerCharge+this.extraCharge}}3!==(null===(P=null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.pricing)||void 0===P?void 0:P.calculation_method)?(this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraPassengerCharge(null,!0),this.getExtraLuggageCharge(null===(w=this.selectedVehicleObj)||void 0===w?void 0:w.vehicle_luggage_capacity,null,!0)):this.calculateReturnTrip(),this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?this.store_bike_distance:this.store_ride_distance,this.calCulateOtherCharges2(),this.map&&this.selectedVehicleObj&&this.loadAndDrawRoutePath()}calculateReturnTrip(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;this.returnEnable&&(this.returnTripObject=null===(t=null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.pricing)||void 0===t?void 0:t.return_trip_pricing,this.returnFinalFare=(null===(a=null===(o=null===(n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.pricing)||void 0===n?void 0:n.return_trip_pricing)||void 0===o?void 0:o.final_fare)||void 0===a?void 0:a.amount)+(null===(u=null===(s=null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.return_trip_pricing)||void 0===s?void 0:s.final_fare)||void 0===u?void 0:u.tax_amount),this.returnTripDiscount=null===(g=null===(h=null===(c=null===(d=this.selectedVehicleObj)||void 0===d?void 0:d.pricing)||void 0===c?void 0:c.return_trip_pricing)||void 0===h?void 0:h.final_fare)||void 0===g?void 0:g.return_trip_discount,this.totalFInalFare=this.finalFare+(this.returnFinalFare-this.returnTripDiscount)),this.totalFInalFare<0&&(this.totalFInalFare=0)}additionalDiscountChanged(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h;this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0;let g=0;e&&(g=this.totalExtraLuggageCharge+this.totalExtraPassengerCharge);const p=(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)+this.extraCharge+g;this.addForm.value.additional_discount?this.additionalDiscount!==this.addForm.value.additional_discount?(this.finalFare=0,this.finalFare=(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)+this.additionalDiscount,this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(s=null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.final_fare)||void 0===s?void 0:s.amount)-this.additionalDiscount+this.extraCharge+g):(this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(d=null===(u=this.selectedVehicleObj)||void 0===u?void 0:u.final_fare)||void 0===d?void 0:d.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.final_fare)||void 0===h?void 0:h.amount)-this.additionalDiscount+this.extraCharge+g):(this.finalFare=p,this.additionalDiscount=0),this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge+this.tripOtherChargePrice,this.finalFare<0&&(this.finalFare=0),this.calculateReturnTrip()}extraChargeChanged(e=!1){var t,i,n,o;this.finalFare=this.finalFare-this.extraCharge,this.addForm.value.extra_charge?this.extraCharge!==this.addForm.value.extra_charge?(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):this.extraCharge=0,this.finalFare=this.finalFare,e&&this.updateCharge()}updateCharge(){this.totalExtraLuggageCharge&&(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.finalFare=this.finalFare+this.totalExtraLuggageCharge),this.totalExtraPasse
1ngerCharge&&(this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.finalFare=this.finalFare+this.totalExtraPassengerCharge),this.otherChargePrice&&(this.finalFare=this.finalFare-this.otherChargePrice,this.finalFare=this.finalFare+this.otherChargePrice),this.tripOtherChargePrice&&(this.finalFare=this.finalFare-this.tripOtherChargePrice,this.finalFare=this.finalFare+this.tripOtherChargePrice)}getExtraPassengerCharge(e=null,t){var i,n,o,a,r,l;if((null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.capacity)<this.no_of_passenger&&e){this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;let e=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else if(e)this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;else if((null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.capacity)<this.no_of_passenger&&!e&&t){this.totalExtraPassengerCharge=0;let e=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else this.totalExtraPassengerCharge=0}getExtraLuggageCharge(e,t=null,i){e<this.trip_luggage&&t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0):e<this.trip_luggage&&!t&&i?(this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):this.totalExtraLuggageCharge=0}getWayPoints(){var e,t,i=[];const n=this.addForm.get("checkpoints").controls;for(var o=0;o<n.length;o++)n[o].get("value"),i.push({address:n[o].get("value").value,latitude:null===(e=this.selectedCheckpointsArray[o].latitude)||void 0===e?void 0:e.toFixed(6),longitude:null===(t=this.selectedCheckpointsArray[o].longitude)||void 0===t?void 0:t.toFixed(6)});return i}updateQueryParam(){var e,t,i,n,o,a,r,l,s,u,d,c,h=this.getWayPoints();this.queryParam.pickup_location=this.addForm.get("pickup_location").value,this.queryParam.service_type=this.YELOWCAB_SERVICE_TYPE;try{this.queryParam.pickup_latitude=null===(e=this.pickup_latitude)||void 0===e?void 0:e.toFixed(6)}catch(g){this.queryParam.pickup_latitude=this.pickup_latitude}try{this.queryParam.pickup_longitude=null===(t=this.pickup_longitude)||void 0===t?void 0:t.toFixed(6)}catch(g){this.queryParam.pickup_longitude=this.pickup_longitude}if(this.queryParam.dropoff_location=this.addForm.get("destination").value,this.queryParam.dropoff_latitude=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),this.queryParam.dropoff_longitude=null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),this.isSchedual_trip&&(this.queryParam.request_time=this.combinedTimestamp()),h.length>0&&(this.queryParam.way_points=JSON.stringify(h)),this.returnEnable){this.queryParam.is_return_trip=1,this.queryParam.return_request_time=new Date(this.addForm.value.return_time).getTime()/1e3,this.queryParam.return_pickup_location=null===(o=this.addForm.get("return_pickup_location"))||void 0===o?void 0:o.value;try{this.queryParam.return_pickup_latitude=null===(a=this.return_pickup_latitude)||void 0===a?void 0:a.toFixed(6)}catch(g){this.queryParam.return_pickup_latitude=this.return_pickup_latitude}try{this.queryParam.return_pickup_longitude=null===(r=this.return_pickup_longitude)||void 0===r?void 0:r.toFixed(6)}catch(g){this.queryParam.return_pickup_longitude=this.return_pickup_longitude}this.queryParam.return_dropoff_location=null===(l=this.addForm.get("return_destination"))||void 0===l?void 0:l.value,this.queryParam.return_dropoff_latitude=null===(s=this.return_destination_latitude)||void 0===s?void 0:s.toFixed(6),this.queryParam.return_dropoff_longitude=this.return_destination_longitude}else this.queryParam.is_return_trip=0,this.queryParam.return_from_zone_id=null,this.queryParam.return_to_zone_id=null;this.queryParam.no_of_passenger=this.no_of_passenger,this.queryParam.trip_luggage=this.trip_luggage,this.queryParam.from_zone_id=this.zoneData&&this.zoneData.from?this.zoneData.from:null,this.queryParam.to_zone_id=this.zoneData&&this.zoneData.to?this.zoneData.to:null,this.fixZoneDisableDropoff&&(this.queryParam.to_zone_id=-1),this.returnEnable&&(this.queryParam.return_from_zone_id=(null===(u=this.returnzoneData)||void 0===u?void 0:u.from)?this.returnzoneData.from:null,this.queryParam.return_to_zone_id=(null===(d=this.returnzoneData)||void 0===d?void 0:d.to)?this.returnzoneData.to:null),(null===(c=this.addForm.value)||void 0===c?void 0:c.booking_type_id)&&(this.queryParam.booking_type_id=this.addForm.value.booking_type_id)}changeReturn(e){var t=this;return(0,y.Z)(function*(){t.pickup_latitude&&t.pickup_longitude&&t.destination_latitude&&t.destination_longitude?(t.returnEnable=e.target.checked,e.target.checked?(t.initDefaultReturnDateTime(),t.addForm.get("return_time").setValidators([r.kI.required]),t.addForm.get("return_time").updateV
1alueAndValidity(),t.applyReturnLocationSwapToForm(),yield t.resolveReturnZonesAfterLocationSwap(),t.calculateReturnTrip(),t.refreshReturnVehiclePricing()):(t.addForm.get("return_date").setValue(null),t.addForm.get("return_trip_time").setValue(null),t.addForm.get("return_time").setValue(null),t.addForm.get("return_time").setValidators(null),t.addForm.get("return_time").updateValueAndValidity(),t.return_date=null,t.return_trip_time=null,t.return_time=null,t.selectedDate=null,t.clearReturnLocations(),t.calculateReturnTrip())):(t.toasterService.error("Please Select Pickup & Destination Location First!"),e.target.checked=!1)})()}applyReturnLocationSwapToForm(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;const p=this.searchTextDestionation||(null===(e=this.addForm.get("destination"))||void 0===e?void 0:e.value),m=this.searchText||(null===(t=this.addForm.get("pickup_location"))||void 0===t?void 0:t.value);this.addForm.controls.return_pickup_location.setValue(p),this.addForm.controls.return_pickup_latitude.setValue(null!==(o=null===(n=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed)||void 0===n?void 0:n.call(i,6))&&void 0!==o?o:this.destination_latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(l=null===(r=null===(a=this.destination_longitude)||void 0===a?void 0:a.toFixed)||void 0===r?void 0:r.call(a,6))&&void 0!==l?l:this.destination_longitude),this.addForm.controls.return_destination.setValue(m),this.addForm.controls.return_dropoff_latitude.setValue(null!==(d=null===(u=null===(s=this.pickup_latitude)||void 0===s?void 0:s.toFixed)||void 0===u?void 0:u.call(s,6))&&void 0!==d?d:this.pickup_latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(g=null===(h=null===(c=this.pickup_longitude)||void 0===c?void 0:c.toFixed)||void 0===h?void 0:h.call(c,6))&&void 0!==g?g:this.pickup_longitude),this.returnsearchText=p,this.returnsearchTextDestionation=m,this.return_pickup_latitude=this.destination_latitude,this.return_pickup_longitude=this.destination_longitude,this.return_destination_latitude=this.pickup_latitude,this.return_destination_longitude=this.pickup_longitude,this.returnpickupRegionFound=this.dropRegionFound,this.returndropRegionFound=this.pickupRegionFound}resolveReturnZonesAfterLocationSwap(){var e=this;return(0,y.Z)(function*(){e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.returndropRegionFound&&e.return_destination_latitude&&e.return_destination_longitude&&(yield e.updateReturnDestinationZone()),e.returnpickupRegionFound&&e.return_pickup_latitude&&e.return_pickup_longitude&&(yield e.updateReturnPickupZone())})()}clearReturnLocations(){this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.addForm.controls.return_pickup_location.setValue(null),this.addForm.controls.return_pickup_latitude.setValue(null),this.addForm.controls.return_pickup_longitude.setValue(null),this.addForm.controls.return_destination.setValue(null),this.addForm.controls.return_dropoff_latitude.setValue(null),this.addForm.controls.return_dropoff_longitude.setValue(null),this.returnotherDetails=null,this.return_trip_path=null,this.return_bike_path=null,this.returnzoneData.from=null,this.returnzoneData.to=null,this.returnzoneData.from_title=null,this.returnzoneData.to_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.to_obj=null,this.returnzoneData.from_ids=null,this.returnzoneData.to_ids=null}OnSearchReturn(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturn.next(e)}OnSearchReturnDestination(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturnDest.next(e)}returnsearchEvent(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_pickup_location.setValue(e.full_text),this.returnsearchText=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_pickup_latitude=e.latitude,this.return_pickup_longitude=e.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnPickupRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_pickup_latitude=e.data.latitude,this.return_pickup_longitude=e.data.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnPickupRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_pickup_location.setValue(null),this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.returnzoneData.from=null,this.returnzoneData.from_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.from_ids=null)}returnsearchEventDestination(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_destination.setValue(e.full_text),this.returnsearchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_destination_latitude=e.latitude,this.return_destination_longitude=e.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnDropoffRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_destination_latitude=e.data.latitude,this.return_destination_longitude=e.data.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnDropoffRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_destination.setValue(null),this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnzoneData.to=null,this.returnzoneData.to_title=null,this.returnzoneData.to_obj=null,this.returnzoneData.to_ids=null)}
1validateReturnPickupRegion(){if("Y"!==this.checkRegion)this.returnpickupRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_pickup_latitude,this.return_pickup_longitude,(0,C.U)(t.geofence)));this.returnpickupRegionFound=e}this.updateReturnPickupZone()}validateReturnDropoffRegion(){if("Y"!==this.checkRegion)this.returndropRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_destination_latitude,this.return_destination_longitude,(0,C.U)(t.geofence)));this.returndropRegionFound=e}this.updateReturnDestinationZone()}updateReturnPickupZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.return_pickup_latitude&&e.return_pickup_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returnpickupRegionFound||(yield e.zoneUtilityService.findPickupZone(e.return_pickup_latitude,e.return_pickup_longitude,e.zoneResponse,e.returnzoneData,()=>{},()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}updateReturnDestinationZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.return_destination_latitude&&e.return_destination_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returndropRegionFound||(yield e.zoneUtilityService.findDropoffZone(e.return_destination_latitude,e.return_destination_longitude,e.zoneResponse,e.returnzoneData,()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}refreshReturnVehiclePricing(){!this.returnEnable||!this.return_pickup_latitude||!this.return_destination_latitude||(this.updateQueryParam(),this.vehicleTypeApi())}buildReturnBookingObject(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;const _=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.return_trip_pricing,f=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.vehicle_type_category,v=this.returnotherDetails||this.otherDetails,y=2==f?null==v?void 0:v.bike_ride_distance:null==v?void 0:v.ride_distance,b=2==f?null==v?void 0:v.bike_ride_time:null==v?void 0:v.ride_time,x=Object.assign(Object.assign(Object.assign({},null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing),(null==_?void 0:_.pricing)||{}),{return_trip_pricing:_,final_fare:null==_?void 0:_.final_fare});(null===(a=null==_?void 0:_.surge_price)||void 0===a?void 0:a.surgeApplied)&&(x.surge_multiplier=_.surge_price.multiplier,x.surge_flat_amount=_.surge_price.flat_price),x.driver_earning=(this.returnFinalFare||0)-((null===(r=null==_?void 0:_.final_fare)||void 0===r?void 0:r.tax_amount)||0)-(this.walletBalance<0?Math.abs(this.walletBalance):0);const k={pickup_location:null===(l=this.addForm.get("return_pickup_location"))||void 0===l?void 0:l.value,pickup_latitude:Number(this.return_pickup_latitude),pickup_longitude:Number(this.return_pickup_longitude),dropoff_location:null===(s=this.addForm.get("return_destination"))||void 0===s?void 0:s.value,dropoff_latitude:Number(this.return_destination_latitude),dropoff_longitude:Number(this.return_destination_longitude),booking_distance:y,booking_duration:b,calculation_method:null!==(d=null===(u=null==_?void 0:_.pricing)||void 0===u?void 0:u.calculation_method)&&void 0!==d?d:null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.pricing)||void 0===h?void 0:h.calculation_method,fare_details:x,booking_properties:e.booking_properties,flight_info:e.flight_info,booking_amount:Number((this.returnFinalFare-this.returnTripDiscount).toFixed(2)),driver_earning:x.driver_earning,booking_request_time:Number(new Date(this.addForm.value.return_time).getTime()/1e3),is_return_booking:1,agent_id:this.agent_id||null,vehicle_type_id:null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.id,payment_mode:e.payment_mode,payment_mode_id:e.payment_mode_id,payment_status:e.payment_status,no_of_passenger:e.no_of_passenger,way_points:[],payment_type:e.payment_type,booking_type_id:e.booking_type_id,booster_seat:e.booster_seat,child_seat:e.child_seat,gender:e.gender,user_id:e.user_id,is_fixed_price:0};return(this.return_trip_path||this.return_bike_path)&&(k.dispatch_path=2==f?this.return_bike_path:this.return_trip_path),(null===(p=this.returnzoneData)||void 0===p?void 0:p.from)&&(k.return_pickup_zone_id=String(this.returnzoneData.from)),(null===(m=this.returnzoneData)||void 0===m?void 0:m.to)&&(k.return_dropoff_zone_id=String(this.returnzoneData.to)),k.fare_details.final_fare=null==_?void 0:_.final_fare,k}
1isTripReadyForEstimate(){var e,t;return!(!this.booking_type_id&&!(null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("booking_type_id"))||void 0===t?void 0:t.value)||!this.isValidMapPoint({lat:this.pickup_latitude,lng:this.pickup_longitude})||!this.skip_destination&&!this.isValidMapPoint({lat:this.destination_latitude,lng:this.destination_longitude}))}clearVehicleSelectionState(e=!0){this.selectedVehicleObj=null,this.selectedVehicleObjName=null,this.selectedExperienceIndex=0,this.pendingVehicleReselectId=null,this.finalFare=0,this.taxAddition=0,this.zone_extra_charge=0,this.returnFinalFare=0,this.returnTripDiscount=0,this.storeOldVehiclePrice=0,this.startingFrom=!1,[this.filterVehicleArray,this.vehicleArray].forEach(e=>{(null==e?void 0:e.length)&&e.forEach(e=>{e&&(e.checked=!1)})}),e&&(this.disableBtn=!0)}isSelectedVehicleInCurrentList(){var e,t;return!!(null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.id)&&(((null===(t=this.filterVehicleArray)||void 0===t?void 0:t.length)?this.filterVehicleArray:this.vehicleArray)||[]).some(e=>{var t;return(null==e?void 0:e.id)===(null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.id)})}resetVehicleOptionsForBookingTypeChange(){this.clearVehicleSelectionState(!0),this.vehicleArray=[],this.filterVehicleArray=[],this.isCheckoutStep=!1,this.showPaymetScreen=!1,this.displayPaymentForm=!1}syncVehicleSelectionWithList(){this.filterVehicleArray=(this.vehicleArray||[]).filter(e=>e),this.filterVehicleArray.length?this.isSelectedVehicleInCurrentList()||this.selectExperienceVehicle(this.filterVehicleArray[0],0):this.clearVehicleSelectionState(!0)}refreshVehicleEstimatesIfReady(){var e,t;if(!this.updateSameZoneTripRestriction()&&this.hasViewedOptions){if(!this.isTripReady
1ForEstimate())return this.vehicleArray=[],this.filterVehicleArray=[],this.clearVehicleSelectionState(!0),void this.clearRoutePath();this.loadingState||(this.pendingVehicleReselectId=null!==(t=null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.id)&&void 0!==t?t:null,this.updateQueryParam(),this.vehicleTypeApi())}}clearVehicleSelectionForSameZoneRestriction(){var e;const t=this;t.vehicleArray=[],t.filterVehicleArray=[],"vehicleTypeArray"in t&&(t.vehicleTypeArray=[]),t.selectedVehicleObj=null,"selectedVehicleObjName"in t&&(t.selectedVehicleObjName=null),"rentalPackages"in t&&(t.rentalPackages=[]),"trip_path"in t&&(t.trip_path=null),"bike_path"in t&&(t.bike_path=null),"return_trip_path"in t&&(t.return_trip_path=null),"return_bike_path"in t&&(t.return_bike_path=null),"otherDetails"in t&&(t.otherDetails=null),"returnotherDetails"in t&&(t.returnotherDetails=null),"finalFare"in t&&(t.finalFare=0),"returnFinalFare"in t&&(t.returnFinalFare=0),(null===(e=t.polyline)||void 0===e?void 0:e.setMap)&&(t.polyline.setMap(null),t.polyline=null)}updateSameZoneTripRestriction(){const e=(0,V.b)(this.zoneResponse,this.pickup_latitude,this.pickup_longitude,this.destination_latitude,this.destination_longitude),t=!!e,i=t&&!this.sameZoneTripRestricted;return this.sameZoneTripRestricted=t,t&&(this.clearVehicleSelectionForSameZoneRestriction(),i&&this.toasterService.error(`Trips within ${(null==e?void 0:e.title)||"this zone"} are not allowed`)),t}vehicleTypeApi(){this.updateSameZoneTripRestriction()?this.loadingState=!1:(this.loadingState=!0,this.taxAddition=0,this.zone_extra_charge=0,this.returnTripDiscount=0,this.finalFare=0,this.returnFinalFare=0,this.queryParam.out_of_service_area=this.checkOutofServiceArea?1:null,this.queryParam.vehicle_type_id=null,this.updateQueryParam(),this.disableBtn=!1,this.taxiBookingService.getVehicleList(this.queryParam).subscribe(e=>{var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w,q,D,O,L,M,V,S,E,U,N,I,j,R,z,J,B,Y,Q;if(this.loadingState=!1,e.success||e.status){if(this.store_ride_distance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.ride_distance,this.store_bike_distance=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.bike_ride_distance,console.log(this.agentLogin,this.agentMinDistance,this.store_ride_distance),this.agentLogin&&this.agentMinDistance>this.store_ride_distance&&(this.disableBtn=!0,this.toasterService.error((null===(n=this.currentLanguage)||void 0===n?void 0:n.min_distance_error)+" "+this.agentMinDistance+" "+((null===(o=this.currentCompanyDetail)||void 0===o?void 0:o.distance_unit)?"Per "+(null===(a=this.currentCompanyDetail)||void 0===a?void 0:a.distance_unit):"Per Km"))),(null===(r=e.data)||void 0===r?void 0:r.cab_type_list.length)>0){if(this.vehicleArray=null===(l=e.data)||void 0===l?void 0:l.cab_type_list.filter(e=>e.hasOwnProperty("pricing")),this.trip_path=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.path,this.bike_path=null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.bike_path,this.otherDetails={surge_price:e.data.surge_price,ride_time:e.data.ride_time,ride_distance:e.data.ride_distance,tax_list:e.data.tax_list,bike_ride_distance:null===(d=null==e?void 0:e.data)||void 0===d?void 0:d.bike_ride_distance,bike_ride_time:null===(c=null==e?void 0:e.data)||void 0===c?void 0:c.bike_ride_time},this.returnEnable&&(null===(h=e.data)||void 0===h?void 0:h.return_response_data)&&(this.returnotherDetails={surge_price:null===(g=e.data.return_response_data)||void 0===g?void 0:g.surge_price,ride_time:null===(p=e.data.return_response_data)||void 0===p?void 0:p.ride_time,ride_distance:null===(m=e.data.return_response_data)||void 0===m?void 0:m.ride_distance,tax_list:null===(_=e.data.return_response_data)||void 0===_?void 0:_.tax_list,bike_ride_distance:null===(f=e.data.return_response_data)||void 0===f?void 0:f.bike_ride_distance,bike_ride_time:null===(v=e.data.return_response_data)||void 0===v?void 0:v.bike_ride_time},this.return_trip_path=null===(y=e.data.return_response_data)||void 0===y?void 0:y.path,this.return_bike_path=null===(b=e.data.return_response_data)||void 0===b?void 0:b.bike_path,this.calculateReturnTrip()),this.vehicleTypeArray.length>
10){this.max_luggage_capacity_filter=0,this.max_capacity_filter=0,this.vehicleArray=this.vehicleArray.map(e=>{e.isCollapsed=!1,this.max_capacity_filter<e.max_capacity&&(this.max_capacity_filter=e.max_capacity),this.max_luggage_capacity_filter<e.max_luggage_capacity&&(this.max_luggage_capacity_filter=e.max_luggage_capacity);const t=this.vehicleTypeArray.find(t=>t.vehicle_type_id==e.id);if(t)return Object.assign(Object.assign({},e),{title:t.vehicle_type_title,vehicle_image:t.vehicle_type_image,max_luggage_capacity:t.max_luggage_capacity,vehicle_type_priority:t.vehicle_type_priority})}),this.vehicleArray.forEach(e=>{var t,i,n,o;e&&(e.final_fare_amount=(null===(t=null==e?void 0:e.final_fare)||void 0===t?void 0:t.amount)+(null===(i=null==e?void 0:e.final_fare)||void 0===i?void 0:i.tax_amount)+this.calCulateOtherCharges(e)+((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.zone_extra_charges)?null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.zone_extra_charges:0))}),this.vehicleArray.sort((e,t)=>parseInt(e.vehicle_type_priority)-parseInt(t.vehicle_type_priority));const t=this.pendingVehicleReselectId;let i=this.vehicleArray[0];if(t){const e=this.vehicleArray.find(e=>(null==e?void 0:e.id)===t);e&&(i=e)}this.pendingVehicleReselectId=null,this.vehicleArray.forEach(e=>{e&&(e.checked=e.id===(null==i?void 0:i.id))}),this.selectedVehicleObj=i,this.storeOldVehiclePrice=this.selectedVehicleObj.final_fare.amount,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.zone_price_id=null===(Z=null===(k=null===(x=this.selectedVehicleObj)||void 0===x?void 0:x.pricing)||void 0===k?void 0:k.zone_price_model)||void 0===Z?void 0:Z.zone_price_id,this.zoneData.zone_price_applied=null===(F=null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.pricing)||void 0===F?void 0:F.zone_price_applied,this.finalFare=null===(T=this.selectedVehicleObj)||void 0===T?void 0:T.final_fare.amount,this.taxAddition=null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.final_fare.tax_amount,this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?null===(P=null==e?void 0:e.data)||void 0===P?void 0:P.bike_ride_distance:null===(w=null==e?void 0:e.data)||void 0===w?void 0:w.ride_distance,this.calCulateOtherCharges2(),this.refreshMapAfterOptionsLoaded(),this.startingFrom="Y"==(null===(D=null===(q=this.selectedVehicleObj)||void 0===q?void 0:q.pricing)||void 0===D?void 0:D.zone_price_applied)?2==(null===(M=null===(L=null===(O=this.selectedVehicleObj)||void 0===O?void 0:O.pricing)||void 0===L?void 0:L.zone_price_model)||void 0===M?void 0:M.calculation_type):2===(null===(S=null===(V=this.selectedVehicleObj)||void 0===V?void 0:V.pricing)||void 0===S?void 0:S.calculation_type),this.finalFare=null===(E=this.selectedVehicleObj)||void 0===E?void 0:E.final_fare.amount,this.taxAddition=null===(U=this.selectedVehicleObj)||void 0===U?void 0:U.final_fare.tax_amount}else this.selectedVehicleObj=null,this.selectedVehicleObjName=null;this.zone_extra_charge=(null===(I=null===(N=this.selectedVehicleObj)||void 0===N?void 0:N.final_fare)||void 0===I?void 0:I.zone_extra_charges)?null===(R=null===(j=this.selectedVehicleObj)||void 0===j?void 0:j.final_fare)||void 0===R?void 0:R.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge}else this.vehicleArray=[],this.refreshMapAfterOptionsLoaded();this.syncVehicleSelectionWithList(),this.selectedVehicleObj&&(this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(null===(z=this.selectedBookingTypeObj)||void 0===z?void 0:z.field_key)||(this.rentalPackages=null!==(Y=null===(B=null===(J=this.selectedVehicleObj)||void 0===J?void 0:J.pricing)||void 0===B?void 0:B.slots)&&void 0!==Y?Y:[])),this.getMaxLuggagePassengerCapacity(),this.getExtraPassengerCharge(null,null),this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraLuggageCharge(null===(Q=this.selectedVehicleObj)||void 0===Q?void 0:Q.vehicle_luggage_capacity,null,null)}else this.vehicleArray=[],this.filterVehicleArray=[],this.clearVehicleSelectionState(!0),this.refreshMapAfterOptionsLoaded();this.scheduleIframeHeightNotify()},()=>{this.loadingState=!1,this.vehicleArray=[],this.filterVehicleArray=[],this.clearVehicleSelectionState(!0),this.refreshMapAfterOptionsLoaded(),this.scheduleIframeHeightNotify()}))}changeQueuePickup(e){this.pickUpStandForm.patchValue({pickup_location:e.address,pickup_latitude:e.latitude,pickup_longitude:e.longitude}),this.pickup_longitude=Number(e.longitude),this.pickup_latitude=Number(e.latitude),this.addForm.patchValue({pickup_location:e.address})}fixZone(e){this.fixZonePriceData=e}submitZonePricing(){this.zoneData.to=-1,this.searchTextDestionation=this.fixZonePriceData.dropoff_location,this.addForm.patchValue({destination:this.fixZonePriceData.dropoff_location}),this.UpdateDestinationLocation(this.fixZonePriceData.dropoff_latitude,this.fixZonePriceData.dropoff_longitude),$("#fixdestination").modal("hide")}
1getZoneDetail(e,t){this.yelowBookingService.getPriceZoneById(e).subscribe(e=>{var i;e.status&&(t.zone_price=null===(i=e.data)||void 0===i?void 0:i.title)})}closeFixDestinationPopup(){this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null,this.pickup_latitude=null,this.pickup_longitude=null,this.zoneData.to=null,this.addForm.patchValue({destination:null,pickup_location:null}),$("#ixdestination").modal("hide")}pickUpStandFormSubmit(){this.selectQueuePickup=!0,$("#QueuePikupstand").modal("hide")}submitFirstForm(e,t){var i,n,o,a,r;if(!this.updateSameZoneTripRestriction()){if(this.isBookingHold)return void swal.fire({text:(null===(i=this.currentLanguage)||void 0===i?void 0:i.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);if(this.queuePikupStandList.length>0&&!this.fixZoneDisableDropoff&&this.isFirstPart)this.selectQueuePickup=!1,$("#QueuePikupstand").modal("show");else if(this.isFirstPart){if(this.formSubmited=!0,this.submitFirstPart=!0,this.syncTripTimeFromPicker(),!this.validateEditTripBarFields())return;const t=null===(n=this.addForm.get("request_time"))||void 0===n?void 0:n.value,i=null===(o=this.addForm.get("trip_time"))||void 0===o?void 0:o.value,l=new Date("string"==typeof t?t:(null===(a=null==t?void 0:t.toISOString)||void 0===a?void 0:a.call(t))||t),s=new Date("string"==typeof i?i:(null===(r=null==i?void 0:i.toISOString)||void 0===r?void 0:r.call(i))||i),u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()),d=new Date;d.setHours(0,0,0,0);let c=new Date(d.getTime()+6e4*this.max_date);if(c.setHours(0,0,0,0),l.setHours(0,0,0,0),2==this.selectedTab){if(!this.validateRequestTimeCutOff(u))return;if(l<d)return void this.toasterService.error("Please select a minimum date: today");if(l>c)return void this.toasterService.error(`Trip date must be between today and the next ${this.max_date/1440} days.`);if(l.getTime()===d.getTime()&&u.getTime()<(new Date).getTime())return void this.toasterService.error("Trip time must be greater than current time.")}this.bindMarkerPoints(),this.getproperties(e)}this.firstFormNextButtonClick=!0}}submitSecondForm(e){var t,i,n,o,a,r,l;if(this.isBookingHold)swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);else if(console.log(e),console.log(this.return_time),this.formSubmited=!0,this.isDocumentUploading)this.toasterService.error("Please wait for document upload to complete");else{if(this.returnEnable){this.syncReturnDateTime();const e=null===(i=this.addForm.get("request_time"))||void 0===i?void 0:i.value,t=null===(n=this.addForm.get("trip_time"))||void 0===n?void 0:n.value,s=new Date("string"==typeof e?e:(null===(o=null==e?void 0:e.toISOString)||void 0===o?void 0:o.call(e))||e),u=new Date("string"==typeof t?t:(null===(a=null==t?void 0:t.toISOString)||void 0===a?void 0:a.call(t))||t),d=new Date(s.getFullYear(),s.getMonth(),s.getDate(),u.getHours(),u.getMinutes(),u.getSeconds());if(new Date(null===(l=null===(r=this.addForm)||void 0===r?void 0:r.value)||void 0===l?void 0:l.return_time)<d)return void this.toasterService.error("Return time should be greater than request time")}this.generateErrors(this.addForm),e.valid&&(this.displaySecondForm=!1,this.displayThirdForm=!0,this.vehicleTypeApi())}}getproperties(e){var t,i,n,o,a,r,l,s;if((null===(t=null==this?void 0:this.zoneData)||void 0===t?void 0:t.from_obj)&&this.zoneData.from_obj.property_list||(null===(i=this.zoneData)||void 0===i?void 0:i.to_obj)&&this.zoneData.to_obj.property_list||this.tripPropertiesIds){this.zoneIds=[],this.zonePropertiesIds=[],(null===(o=null===(n=this.zoneData)||void 0===n?void 0:n.from_obj)||void 0===o?void 0:o.property_list)&&(this.zonePropertiesIds=this.zonePropertiesIds.concat(this.zoneData.from_obj.property_list.split(","))),(null===(r=null===(a=this.zoneData)||void 0===a?void 0:a.to_obj)||void 0===r?void 0:r.property_list)&&this.zoneData.to_obj.property_list.split(",").forEach(e
1=>{var t,i;(null===(t=this.zoneData)||void 0===t?void 0:t.from)==(null===(i=this.zoneData)||void 0===i?void 0:i.to)?this.zonePropertiesIds.push(e):this.zonePropertiesIds.includes(e)?this.zoneIds.push(e):this.zonePropertiesIds.push(e)});let t=this.resetPropertyControl();if(2!=(null===(l=this.zoneData.from_obj)||void 0===l?void 0:l.zone_type)&&1!=(null===(s=this.zoneData.to_obj)||void 0===s?void 0:s.zone_type)||(this.zonePropertiesIds=[]),this.zonePropertiesIds.length>0||this.zoneIds.length>0||this.tripPropertiesIds.length){let i=[];this.zonePropertiesIds.length>0&&(i=i.concat(this.zonePropertiesIds)),this.zoneIds.length>0&&(i=i.concat(this.zoneIds)),this.tripPropertiesIds.length&&(i=i.concat(this.tripPropertiesIds)),this.getExtraFields(t,i.join(","),e)}else this.nevigateToDraw(e)}else this.nevigateToDraw(e)}nevigateToDraw(e){this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,this.isEditTripBarOpen=!1}getExtraFields(e,t,i){const n={company_id:this.company_id,property_type_list:t,is_active:1,user_type:"0,3"};this.loadingState=!0,this.yelowBookingService.getExtraFields(n).subscribe(t=>{if(t.status&&t.data.length){t.data.sort((e,t)=>t.is_mandatory-e.is_mandatory),t.data;const n=["booster_seat","child_seat","flight_number"];t.data.forEach(t=>{(this.booking_type_id==t.category_id||null==t.category_id)&&(n.includes(null==t?void 0:t.field_key)||e.push(this.propertyRow(t)))}),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,this.loadingState=!1,this.nevigateToDraw(i)}else this.loadingState=!1,this.nevigateToDraw(i)})}resetPropertyControl(){let e=this.addForm.get("properties"),t=e.length;for(let i=0;i<t;i++)e.removeAt(0);return this.documentFileNames={},this.documentUploadLoading={},this.isDocumentUploading=!1,e}getAllTripProperties(){this.yelowBookingService.getExtraFields({company_id:this.company_id,property_type:2,is_active:1,service_type:this.YELOWCAB_SERVICE_TYPE,user_type:"0,3"}).subscribe(e=>{var t;e.status&&(null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>{var t;e.company_extra_field_id&&(null===(t=this.tripPropertiesIds)||void 0===t||t.push(e.company_extra_field_id))}))})}propertyRow(e){var t;let i=[];return(null===(t=null==e?void 0:e.config_json)||void 0===t?void 0:t.length)>0&&(null==e||e.config_json.forEach(e=>{i.push({label:e.title,value:e.title})})),new r.cw({label:new r.NI(e.field_title),value:new r.NI(5==e.field_type?0:null,r.kI.compose(e.is_mandatory?[r.kI.required]:[])),is_mandatory:new r.NI(e.is_mandatory),field_type:new r.NI(e.field_type),options:new r.NI(i),field_description:new r.NI(e.field_description),id:new r.NI(e.company_extra_field_id),file_name:new r.NI(null)})}updateDocumentUploadingState(){this.isDocumentUploading=Object.values(this.documentUploadLoading).some(e=>e)}documentFileChangeEvent(e,t){var i,n,o;const a=null===(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.files)||void 0===n?void 0:n[0];if(!a)return;if(a.size>this.DOCUMENT_MAX_FILE_SIZE)return swal.fire("Invalid File Size!","Please upload a file less than 21MB","error"),void this.clearDocumentInput(e);const r=this.addForm.get("properties"),l=a.name;null===(o=r.at(t).get("file_name"))||void 0===o||o.setValue(l),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l}),this.documentUploadLoading[t]=!0,this.updateDocumentUploadingState();const s=new FormData;s.append("file",a),this.authService.uploadImageGetUrl(s).subscribe(i=>{var n,o,a,s,u,d,c;if(this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),(null==i?void 0:i.status)&&(null==i?void 0:i.data)){const e="string"==typeof i.data?i.data:(null===(n=i.data)||void 0===n?void 0:n.url)||(null===(o=i.data)||void 0===o?void 0:o.file_url)||(null===(a=i.data)||void 0===a?void 0:a.image)||i.data;null===(s=r.at(t).get("value"))||void 0===s||s.setValue(e),null===(u=r.at(t).get("file_name"))||void 0===u||u.setValue(l),null===(d=r.at(t).get("value"))||void 0===d||d.markAsDirty(),null===(c=r.at(t).get("value"))||void 0===c||c.updateV
1alueAndValidity(),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l})}else this.toasterService.error((null==i?void 0:i.message)||"File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)},()=>{this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),this.toasterService.error("File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)})}removeDocumentFile(e,t){this.clearDocumentValue(e),t&&(t.value="")}clearDocumentValue(e){var t,i,n,o,a,r;const l=this.addForm.get("properties");null===(i=null===(t=l.at(e))||void 0===t?void 0:t.get("value"))||void 0===i||i.setValue(null),null===(o=null===(n=l.at(e))||void 0===n?void 0:n.get("file_name"))||void 0===o||o.setValue(null),null===(r=null===(a=l.at(e))||void 0===a?void 0:a.get("value"))||void 0===r||r.updateValueAndValidity();const s=Object.assign({},this.documentFileNames);delete s[e],this.documentFileNames=s}clearDocumentInput(e){(null==e?void 0:e.target)?e.target.value="":e&&(e.value="")}mapBookingProperty(e){const t={label:e.label,value:e.field_type===this.DATE_FIELD&&(null==e?void 0:e.value)?new Date(null==e?void 0:e.value[0]).getTime():e.value,field_type:e.field_type,id:e.id};return(null==e?void 0:e.field_type)===this.DOCUMENT_FIELD&&(t.file_name=e.file_name||""),t}toggleCollapse(e){var t,i,n,o;let a=this.filterVehicleArray.find(t=>(null==t?void 0:t.id)==e.id);a&&(a.isCollapsed=!a.isCollapsed),(null===(i=null===(t=null==a?void 0:a.pricing)||void 0===t?void 0:t.zone_price_model)||void 0===i?void 0:i.zone_price_id)&&this.getZoneDetail(null===(o=null===(n=null==a?void 0:a.pricing)||void 0===n?void 0:n.zone_price_model)||void 0===o?void 0:o.zone_price_id,a)}getVehicleType(e){this.taxiBookingService.getVehicleType(e).subscribe(e=>{var t;this.vehicleTypeArray=e.status?null===(t=e.data)||void 0===t?void 0:t.list:[]})}isPhoneLoginType(){return 2==this.checkLoginTypes||"2"===this.checkLoginTypes}applyGuestFieldValidators(){var e,t,i,n,o,a,l,s;!this.addForm||(null===(e=this.addForm.get("first_name"))||void 0===e||e.setValidators([r.kI.required,b.Sl]),null===(t=this.addForm.get("last_name"))||void 0===t||t.setValidators([r.kI.required,b.Sl]),this.isPhoneLoginType()?(null===(i=this.addForm.get("email"))||void 0===i||i.setValidators([G.oH]),null===(n=this.addForm.get("dial_code"))||void 0===n||n.setValidators([r.kI.required,G.GY]),null===(o=this.addForm.get("phone_no"))||void 0===o||o.setValidators([r.kI.required,r.kI.minLength(5),r.kI.maxLength(15)])):(null===(a=this.addForm.get("email"))||void 0===a||a.setValidators([r.kI.required,G.oH]),null===(l=this.addForm.get("dial_code"))||void 0===l||l.setValidators([G.GY]),null===(s=this.addForm.get("phone_no"))||void 0===s||s.setValidators([r.kI.minLength(5),r.kI.maxLength(15)])),["first_name","last_name","email","phone_no","dial_code"].forEach(e=>{var t;null===(t=this.addForm.get(e))||void 0===t||t.updateValueAndValidity({emitEvent:!1})}))}onGuestFieldChange(e){var t;this.applyGuestFieldValidators(),e?null===(t=this.addForm.get(e))||void 0===t||t.markAsTouched({onlySelf:!0}):["first_name","last_name","email","phone_no","dial_code"].forEach(e=>{const t=this.addForm.get(e);(null==t?void 0:t.dirty)&&t.markAsTouched({onlySelf:!0})}),this.generateGuestFieldErrors()}generateGuestFieldErrors(e=!1){["first_name","last_name","email","phone_no","dial_code"].forEach(t=>{const i=this.addForm.get(t);this.formErrors[t]="",i&&(e||i.touched||i.dirty||this.formSubmited)&&Z.op._setErrMsgs(i,this.formErrors,t,this.validationMessages)})}validateGuestFormFields(e=!0){var t,i,n,o,a,r,l,s;this.applyGuestFieldValidators(),["first_name","last_name","email","phone_no","dial_code"].forEach(e=>{var t;null===(t=this.addForm.get(e))||void 0===t||t.markAsTouched()}),this.generateGuestFieldErrors(!0);const u=null===(t=this.addForm.get("first_name"))||void 0===t?void 0:t.invalid,d=null===(i=this.addForm.get("last_name"))||void 0===i?void 0:i.invalid,c=this.isPhoneLoginType()&&((null===(n=this.addForm.get("phone_no"))||void 0===n?void 0:n.invalid)||(null===(o=this.addForm.get("dial_code"))||void 0===o?void 0:o.invalid)),h=!this.isPhoneLoginType()&&(null===(a=this.addForm.get("email"))||void 0===a?void 0:a.invalid);return!(u||d||c||h)||(e&&(u||d?this.toasterService.error((null===(r=this.currentLanguage)||void 0===r?void 0:r.please_enter_details)||"Please enter first and last name"):c?this.toasterService.error((null===(l=this.currentLanguage)||void 0===l?void 0:l.please_enter_phone)||"Please enter a valid phone number"):h&&this.toasterService.error((null===(s=this.currentLanguage)||void 0===s?void 0:s.please_enter_email)||"Please enter a valid email")),!1)}validateGuestDetails(){return this.validateGuestFormFields(!0)}registerGuestPassenger(e,t){var i,n;const o={email:null!==(i=e.email)&&void 0!==i?i:null,first_name:e.first_name,last_name:e.last_name,phone_number:e.phone_number,dial_code:e.dial_code,company_id:null===(n=this.currentCompanyDetail)||void 0===n?void 0:n.company_id};this.authService.registerPassenger(o).subscribe(e=>{var i;if(this.guestUserResolving=!1,1005==(null==e?void 0:e.error_code))return this.toasterService.error("Your account is blocked, please contact administrator!"),void t(null);if(1==(null==e?void 0:e.status)&&(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.id)){const i=e.data.id;this.Customer_id=i,this.currentUserDetail=e.data,this.authService.setAuth(e),this.authService.updateUserData(e.data),t(i)}else this.toasterService.error((null==e?void 0:e.message)||"Unable to create guest account"),t(null)},()=>{this.guestUserResolving=!1,this.toasterService.error("Server Error"),t(null)})}patchDialCodeFromIp(){fetch("https://ipapi.co/json/").then(e=>e.json()).then(e=>{(null==e?void 0:e.country_calling_code)&&this.patchDefaultDialCode(e.country_calling_code)}).catch(e=>{var t,i;console.error("Error fetching IP data:",e),(null===(i=null===(t=this.addForm)||void 0===t?void 0:t.get("dial_co
1de"))||void 0===i?void 0:i.value)||this.patchDefaultDialCode()})}patchDefaultDialCode(e){var t,i;const n=e||this.dialCode||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.country_dial_code);if(!n)return;let o=String(n).trim();o.startsWith("+")||(o=`+${o.replace(/^\+/,"")}`);const a=o.replace(/\s/g,""),r=F.si.find(e=>e.code===o||e.code.replace(/\s/g,"")===a),l=(null==r?void 0:r.code)||o;this.dialCode=l,(null===(i=this.addForm)||void 0===i?void 0:i.get("dial_code"))&&this.addForm.patchValue({dial_code:l})}syncVehicleFareAmount(e,t){var i;!(null==e?void 0:e.final_fare)||(e.final_fare_amount=this.computeVehicleTotalAmount(e,t),(null==e?void 0:e.id)===(null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.id)&&(this.finalFare=e.final_fare_amount))}computeVehicleTotalAmount(e,t){if(!(null==e?void 0:e.final_fare))return Number(this.finalFare||0);const i=Number(null!=t?t||0:this.otherChargePrice||this.computeOtherChargesForVehicle(e,!1));return Number(e.final_fare.amount||0)+Number(e.final_fare.tax_amount||0)+Number(e.final_fare.zone_extra_charges||0)+i+Number(this.totalExtraPassengerCharge||0)+Number(this.totalExtraLuggageCharge||0)+Number(this.extraCharge||0)+Number(this.tripOtherChargePrice||0)}getBookingAmount(){var e,t;const i=this.selectedVehicleObj;let n=i?this.computeVehicleTotalAmount(i):Number(this.finalFare||0);if(this.returnEnable&&i){const o=null===(t=null===(e=null==i?void 0:i.pricing)||void 0===e?void 0:e.return_trip_pricing)||void 0===t?void 0:t.final_fare;o&&(n+=(Number(o.amount)||0)+(Number(o.tax_amount)||0)-(Number(o.return_trip_discount)||0))}return this.walletBalance<0&&(n-=this.walletBalance),Number(Number(n).toFixed(2))}getDriverEarning(e){var t,i;const n=Number((null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.tax_amount)||0),o=Number(this.walletBalance||0);return Number((e-n-o).toFixed(2))}resolveGuestUser(){var e;if((null===(e=this.currentUserDetail)||void 0===e?void 0:e.id)&&!this.isGuestContactModifiedFromSnapshot())return this.Customer_id=this.currentUserDetail.id,Promise.resolve(this.currentUserDetail.id);if(this.Customer_id&&!this.isGuestContactModifiedFromSnapshot())return Promise.resolve(this.Customer_id);if(this.showGuestUniqueFieldModal||this.showGuestConfirmModal||!this.validateGuestDetails())return Promise.resolve(null);if(this.guestUserIdentified&&this.isGuestPhoneModifiedFromSnapshot())return new Promise(e=>{this.checkModifiedGuestPhoneUnique(e)});if(this.guestUserIdentified&&this.isGuestEmailModifiedFromSnapshot())return new Promise(e=>{this.checkModifiedGuestEmailUnique(e)});const t=this.buildGuestRegistrationDetails();return this.guestUserResolving=!0,new Promise(e=>{this.lookupGuestUserWithFallback(t,e)})}onGuestContactInputChanged(){this.pendingGuestUserDetails&&this.resetGuestIdentification(!1),this.generateErrors(this.addForm)}onGuestDialCodeChange(){this.onGuestContactInputChanged(),this.guestUserIdentified&&this.isGuestPhoneModifiedFromSnapshot()&&!this.showGuestUniqueFieldModal&&this.checkModifiedGuestPhoneUnique()}onGuestEmailBlur(){var e;if(this.showGuestConfirmModal||this.guestEmailCheckInProgress||this.showGuestUniqueFieldModal)return;if(this.guestUserIdentified&&this.isGuestEmailModifiedFromSnapshot())return void this.checkModifiedGuestEmailUnique();if(this.guestUserIdentified||this.identifiedGuestByPhone)return;const t=String((null===(e=this.addForm.get("email"))||void 0===e?void 0:e.value)||"").trim();!t||t===this.lastCheckedGuestEmail||!this.isGuestEmailInputValid()||(this.lastCheckedGuestEmail=t,this.guestEmailCheckInProgress=!0,this.lookupGuestUserByEmail(this.buildGuestRegistrationDetails(),null))}onGuestPhoneBlur(){if(this.showGuestConfirmModal||this.guestPhoneCheckInProgress||this.showGuestUniqueFieldModal)return;if(this.guestUserIdentified&&this.isGuestPhoneModifiedFromSnapshot())return void this.checkModifiedGuestPhoneUnique();if(this.guestUserIdentified||this.identifiedGuestByPhone)return;const e=this.getGuestPhoneCheckKey();!e||e===this.lastCheckedGuestPhoneKey||!this.isGuestPhoneInputValid()||(this.lastCheckedGuestPhoneKey=e,this.guestPhoneCheckInProgress=!0,this.lookupGuestUserByPhone(this.buildGuestRegistrationDetail
1s(),null))}confirmGuestUniqueFieldChoice(){"update"!==this.guestUniqueFieldAction?this.applyNewGuestCustomer():this.applyUpdateExistingGuest()}cancelGuestUniqueFieldModal(){var e;this.identifiedGuestSnapshot&&this.patchGuestFormFromUser(this.identifiedGuestSnapshot),this.showGuestUniqueFieldModal=!1,this.guestUniqueFieldAction="update",this.lastCheckedGuestPhoneKey=this.getGuestPhoneCheckKey(),this.lastCheckedGuestEmail=String((null===(e=this.addForm.get("email"))||void 0===e?void 0:e.value)||"").trim();const t=this.pendingGuestResolve;this.pendingGuestResolve=null,this.guestUserResolving=!1,null==t||t(null)}confirmGuestUser(){var e;if(!(null===(e=this.pendingGuestUserDetails)||void 0===e?void 0:e.id))return void this.closeGuestConfirmModal();const t=this.pendingGuestUserDetails,i=this.pendingGuestResolve;this.applyExistingGuestUser(t),i&&i(t.id),this.closeGuestConfirmModal()}rejectGuestUser(){const e=this.pendingGuestResolve,t=this.pendingGuestRegistrationDetails||this.buildGuestRegistrationDetails();if(this.closeGuestConfirmModal(),e)return this.guestUserResolving=!0,void this.registerGuestPassenger(t,e);this.addForm.patchValue({email:null,first_name:null,last_name:null}),this.lastCheckedGuestEmail="",this.lastCheckedGuestPhoneKey="",this.guestUserIdentified=!1,this.identifiedGuestByPhone=!1,this.identifiedGuestSnapshot=null,this.Customer_id=null,this.currentUserDetail=null,this.generateErrors(this.addForm)}buildGuestRegistrationDetails(){var e,t,i,n,o;const a=(null===(e=this.addForm.get("dial_code"))||void 0===e?void 0:e.value)||this.dialCode,r=String((null===(t=this.addForm.get("phone_no"))||void 0===t?void 0:t.value)||"").trim(),l=String((null===(i=this.addForm.get("first_name"))||void 0===i?void 0:i.value)||"").trim(),s=String((null===(n=this.addForm.get("last_name"))||void 0===n?void 0:n.value)||"").trim(),u=null===(o=this.addForm.get("email"))||void 0===o?void 0:o.value;return{email:u?String(u).trim():null,first_name:l,last_name:s,phone_number:r,dial_code:a}}getGuestPhoneCheckKey(){var e,t;return`${(null===(e=this.addForm.get("dial_code"))||void 0===e?void 0:e.value)||""}|${String((null===(t=this.addForm.get("phone_no"))||void 0===t?void 0:t.value)||"").trim()}`}isGuestCheckSuccess(e){var t;return!(!(null==e?void 0:e.success)&&1!=(null==e?void 0:e.status)&&!0!==(null==e?void 0:e.status))&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}isGuestUserApiSuccess(e){return!(!(null==e?void 0:e.success)&&1!=(null==e?void 0:e.status)&&!0!==(null==e?void 0:e.status))&&(null==e?void 0:e.data)}lookupGuestUserWithFallback(e,t){const i=()=>{e.phone_number?this.lookupGuestUserByPhone(e,t):this.registerGuestPassenger(e,t)};e.email?this.authService.checkUserEmail({user_type:3,email:e.email}).subscribe(n=>{if(1005==(null==n?void 0:n.error_code))return this.guestUserResolving=!1,this.toasterService.error("Your account is blocked, please contact administrator!"),void t(null);this.isGuestCheckSuccess(n)?this.loadGuestUserAndConfirmModal(n.data.id,e,t,"email",i):i()},()=>i()):i()}loadGuestUserAndConfirmModal(e,t,i,n,o){this.authService.getUserdata(e).subscribe(e=>{if(this.isGuestUserApiSuccess(e))return this.guestConfirmModalMessage="email"===n?"We found an account matching this email.":"We found an account matching this phone number.",void this.openGuestUserConfirmModal(e.data,t,i);i?null==o||o():(this.guestEmailCheckInProgress=!1,this.guestPhoneCheckInProgress=!1,this.guestUserResolving=!1)},()=>{i?null==o||o():(this.guestEmailCheckInProgress=!1,this.guestPhoneCheckInProgress=!1,this.guestUserResolving=!1)})}lookupGuestUserByEmail(e,t){const i=e.email;if(!i)return this.guestEmailCheckInProgress=!1,void(t&&this.lookupGuestUserWithFallback(e,t));this.authService.checkUserEmail({user_type:3,email:i}).subscribe(i=>{if(this.guestEmailCheckInProgress=!1,1005==(null==i?void 0:i.error_code))return this.guestUserResolving=!1,this.toasterService.error("Your account is blocked, please contact administrator!"),void(null==t||t(null));this.isGuestCheckSuccess(i)?this.loadGuestUserAndConfirmModal(i.data.id,e,t,"email"):this.finishGuestLookupAsNew(e,t)},()=>{this.guestEmailCheckInProgress=!1,this.finishGuestLookupAsNew(e,t)})}lookupGuestUserByPhone(e,t){if(!e.phone_number)return this.guestPhoneCheckInProgress=!1,void(t&&this.registerGuestPassenger(e,t));this.authService.checkUserMobile({user_type:3,phone_number:e.phone_number,dial_code:e.dial_code}).subscribe(i=>(this.guestPhoneCheckInProgress=!1,1005==(null==i?void 0:i.error_code)?(this.guestUserResolving=!1,this.toasterService.error("Your account is blocked, please contact administrator!"),void(null==t||t(null))):this.isGuestCheckSuccess(i)?void this.applyExistingGuestUserFromPhoneCheck(i.data.id,t):1001==(null==i?void 0:i.error_code)&&this.guestUserIdentified?(t&&(this.pendingGuestResolve=t,this.guestUserResolving=!1),void this.openGuestUniqueFieldModal("phone")):void this.finishGuestLookupAsNew(e,t)),()=>{this.guestPhoneCheckInProgress=!1,this.finishGuestLookupAsNew(e,t)})}finishGuestLookupAsNew(e,t){t?this.registerGuestPassenger(e,t):this.guestUserResolving=!1}openGuestUserConfirmModal(e,t,i){this.pendingGuestUserDetails=e,this.pendingGuestRegistrationDetail
1s=t,this.pendingGuestResolve=i,this.maskedUserPreview=this.buildMaskedGuestPreview(e),(null==t?void 0:t.email)&&(this.lastCheckedGuestEmail=String(t.email).trim()),(null==t?void 0:t.phone_number)&&(this.lastCheckedGuestPhoneKey=`${t.dial_code}|${t.phone_number}`),this.showGuestConfirmModal=!0,this.guestUserResolving=!1,this.guestEmailCheckInProgress=!1,this.guestPhoneCheckInProgress=!1,this.cd.detectChanges()}closeGuestConfirmModal(){this.showGuestConfirmModal=!1,this.pendingGuestUserDetails=null,this.pendingGuestRegistrationDetails=null,this.pendingGuestResolve=null,this.maskedUserPreview=null}applyExistingGuestUser(e){!(null==e?void 0:e.id)||(this.Customer_id=e.id,this.currentUserDetail=e,this.guestUserIdentified=!0,this.guestUserResolving=!1,this.patchGuestFormFromUser(e),this.setIdentifiedGuestSnapshot(e),this.authService.updateUserData(e))}applyExistingGuestUserFromPhoneCheck(e,t){this.authService.getUserdata(e).subscribe(e=>{if(this.guestPhoneCheckInProgress=!1,this.isGuestUserApiSuccess(e))return this.applyExistingGuestUser(e.data),this.identifiedGuestByPhone=!0,void(t&&(t(e.data.id),this.guestUserResolving=!1));if(t){const e=this.buildGuestRegistrationDetails();this.finishGuestLookupAsNew(e,t)}},()=>{if(this.guestPhoneCheckInProgress=!1,t){const e=this.buildGuestRegistrationDetails();this.finishGuestLookupAsNew(e,t)}})}checkModifiedGuestPhoneUnique(e){if(!this.isGuestPhoneInputValid())return void(null==e||e(null));const t=this.getGuestPhoneCheckKey();if(t===this.lastCheckedGuestPhoneKey)return void(e&&this.Customer_id&&e(this.Customer_id));this.lastCheckedGuestPhoneKey=t,this.guestPhoneCheckInProgress=!0;const i=this.buildGuestRegistrationDetails();this.authService.checkUserMobile({user_type:3,phone_number:i.phone_number,dial_code:i.dial_code}).subscribe(t=>(this.guestPhoneCheckInProgress=!1,1005==(null==t?void 0:t.error_code)?(this.guestUserResolving=!1,this.toasterService.error("Your account is blocked, please contact administrator!"),void(null==e||e(null))):this.isGuestCheckSuccess(t)?void this.applyExistingGuestUserFromPhoneCheck(t.data.id,e):1001==(null==t?void 0:t.error_code)?(e&&(this.pendingGuestResolve=e,this.guestUserResolving=!1),void this.openGuestUniqueFieldModal("phone")):void(null==e||e(null))),()=>{this.guestPhoneCheckInProgress=!1,this.guestUserResolving=!1,null==e||e(null)})}checkModifiedGuestEmailUnique(e){var t;if(!this.isGuestEmailInputValid())return void(null==e||e(null));const i=String((null===(t=this.addForm.get("email"))||void 0===t?void 0:t.value)||"").trim();if(i===this.lastCheckedGuestEmail)return void(e&&this.Customer_id&&e(this.Customer_id));this.lastCheckedGuestEmail=i,this.guestEmailCheckInProgress=!0;const n=this.buildGuestRegistrationDetails();this.authService.checkUserEmail({user_type:3,email:i}).subscribe(t=>(this.guestEmailCheckInProgress=!1,1005==(null==t?void 0:t.error_code)?(this.guestUserResolving=!1,this.toasterService.error("Your account is blocked, please contact administrator!"),void(null==e||e(null))):this.isGuestCheckSuccess(t)?void this.loadGuestUserAndConfirmModal(t.data.id,n,e,"email"):1001==(null==t?void 0:t.error_code)?(e&&(this.pendingGuestResolve=e,this.guestUserResolving=!1),void this.openGuestUniqueFieldModal("email")):void(null==e||e(null))),()=>{this.guestEmailCheckInProgress=!1,this.guestUserResolving=!1,null==e||e(null)})}openGuestUniqueFieldModal(e){this.showGuestConfirmModal||this.showGuestUniqueFieldModal||(this.modifiedGuestFieldType=e,this.guestUniqueFieldAction="update","phone"===e?(this.guestUniqueFieldModalMessage="You have modified the phone number of an existing customer. What would you like to do?",this.guestUniqueFieldUpdateLabel="Update existing customer's phone number"):(this.guestUniqueFieldModalMessage="You have modified the email of an existing customer. What would you like to do?",this.guestUniqueFieldUpdateLabel="Update existing customer's email"),this.showGuestUniqueFieldModal=!0,this.cd.detectChanges())}applyUpdateExistingGuest(){var e,t,i,n,o;const a=(null===(e=this.currentUserDetail)||void 0===e?void 0:e.id)||(null===(t=this.identifiedGuestSnapshot)||void 0===t?void 0:t.id);if(!a)return void this.cancelGuestUniqueFieldModal();const r={};"phone"===this.modifiedGuestFieldType?(r.dial_code=String((null===(i=this.addForm.get("dial_co
1de"))||void 0===i?void 0:i.value)||""),r.phone_number=String((null===(n=this.addForm.get("phone_no"))||void 0===n?void 0:n.value)||"")):r.email=String((null===(o=this.addForm.get("email"))||void 0===o?void 0:o.value)||"").trim(),this.guestUniqueFieldUpdateInProgress=!0,this.authService.updatePassenger(a,r).subscribe(e=>{var t;if(this.guestUniqueFieldUpdateInProgress=!1,this.guestPhoneCheckInProgress=!1,this.guestEmailCheckInProgress=!1,1==(null==e?void 0:e.status)||(null==e?void 0:e.success)){const i=Object.assign(Object.assign(Object.assign({},this.currentUserDetail),r),(null==e?void 0:e.data)||{});this.applyExistingGuestUser(i),this.showGuestUniqueFieldModal=!1,this.guestUniqueFieldAction="update",this.lastCheckedGuestPhoneKey=this.getGuestPhoneCheckKey(),this.lastCheckedGuestEmail=String((null===(t=this.addForm.get("email"))||void 0===t?void 0:t.value)||"").trim(),this.toasterService.success((null==e?void 0:e.message)||"Customer updated successfully");const n=this.pendingGuestResolve;this.pendingGuestResolve=null,n&&n(i.id)}else this.toasterService.error((null==e?void 0:e.message)||"Failed to update customer"),this.cancelGuestUniqueFieldModal()},()=>{this.guestUniqueFieldUpdateInProgress=!1,this.guestPhoneCheckInProgress=!1,this.guestEmailCheckInProgress=!1,this.toasterService.error("Failed to update customer"),this.cancelGuestUniqueFieldModal()})}applyNewGuestCustomer(){var e,t,i;const n="phone"===this.modifiedGuestFieldType,o="email"===this.modifiedGuestFieldType,a=n?null===(e=this.addForm.get("dial_code"))||void 0===e?void 0:e.value:null,r=n?null===(t=this.addForm.get("phone_no"))||void 0===t?void 0:t.value:null,l=o?String((null===(i=this.addForm.get("email"))||void 0===i?void 0:i.value)||"").trim():null;this.guestUserIdentified=!1,this.identifiedGuestByPhone=!1,this.identifiedGuestSnapshot=null,this.pendingGuestUserDetails=null,this.maskedUserPreview=null,this.showGuestConfirmModal=!1,this.showGuestUniqueFieldModal=!1,this.guestUniqueFieldAction="update",this.Customer_id=null,this.currentUserDetail=null,this.lastCheckedGuestPhoneKey="",this.lastCheckedGuestEmail="",this.addForm.patchValue({first_name:null,last_name:null,dial_code:a,phone_no:r,email:l},{emitEvent:!1});const s=this.pendingGuestResolve;if(this.pendingGuestResolve=null,s)return this.guestUserResolving=!0,void this.registerGuestPassenger(this.buildGuestRegistrationDetails(),s);this.generateErrors(this.addForm),this.cd.detectChanges()}resetGuestIdentification(e=!0){var t;if(this.guestUserIdentified=!1,this.identifiedGuestByPhone=!1,this.identifiedGuestSnapshot=null,this.pendingGuestUserDetails=null,this.maskedUserPreview=null,this.showGuestConfirmModal=!1,this.showGuestUniqueFieldModal=!1,this.Customer_id=null,this.currentUserDetail=null,this.lastCheckedGuestPhoneKey="",this.lastCheckedGuestEmail="",e){const e=null===(t=this.addForm.get("dial_code"))||void 0===t?void 0:t.value;this.addForm.patchValue({phone_no:null,email:null,first_name:null,last_name:null,dial_code:e})}}setIdentifiedGuestSnapshot(e){var t,i;this.identifiedGuestSnapshot=e?{id:e.id,dial_code:e.dial_code||"",phone_number:(null===(t=e.phone_number)||void 0===t?void 0:t.toString())||"",email:(null===(i=e.email)||void 0===i?void 0:i.trim())||"",first_name:e.first_name||"",last_name:e.last_name||""}:null}isGuestPhoneModifiedFromSnapshot(){var e,t;if(!this.identifiedGuestSnapshot)return!1;const i=String((null===(e=this.addForm.get("dial_code"))||void 0===e?void 0:e.value)||""),n=String((null===(t=this.addForm.get("phone_no"))||void 0===t?void 0:t.value)||"");return i!==this.identifiedGuestSnapshot.dial_code||n!==this.identifiedGuestSnapshot.phone_number}isGuestEmailModifiedFromSnapshot(){var e;return!!this.identifiedGuestSnapshot&&String((null===(e=this.addForm.get("email"))||void 0===e?void 0:e.value)||"").trim()!==this.identifiedGuestSnapshot.email}isGuestContactModifiedFromSnapshot(){return this.isGuestPhoneModifiedFromSnapshot()||this.isGuestEmailModifiedFromSnapshot()}isGuestPhoneInputValid(){const e=this.addForm.get("phone_no"),t=this.addForm.get("dial_code");return null==e||e.markAsTouched(),null==t||t.markAsTouched(),!(null==e?void 0:e.invalid)&&!(null==t?void 0:t.invali
1d)&&!!String((null==e?void 0:e.value)||"").trim()}isGuestEmailInputValid(){const e=this.addForm.get("email");return null==e||e.markAsTouched(),!(null==e?void 0:e.invalid)&&!!String((null==e?void 0:e.value)||"").trim()}patchGuestFormFromUser(e){var t,i,n,o,a,r;this.addForm.patchValue({first_name:(null==e?void 0:e.first_name)||(null===(t=this.addForm.get("first_name"))||void 0===t?void 0:t.value),last_name:(null==e?void 0:e.last_name)||(null===(i=this.addForm.get("last_name"))||void 0===i?void 0:i.value),email:(null==e?void 0:e.email)||(null===(n=this.addForm.get("email"))||void 0===n?void 0:n.value),phone_no:(null==e?void 0:e.phone_number)||(null===(o=this.addForm.get("phone_no"))||void 0===o?void 0:o.value),dial_code:(null==e?void 0:e.dial_code)||(null===(a=this.addForm.get("dial_code"))||void 0===a?void 0:a.value)},{emitEvent:!1}),this.lastCheckedGuestEmail=String((null===(r=this.addForm.get("email"))||void 0===r?void 0:r.value)||"").trim(),this.lastCheckedGuestPhoneKey=this.getGuestPhoneCheckKey()}buildMaskedGuestPreview(e){const t=(null==e?void 0:e.last_name)||"";return{name:`${this.maskGuestName((null==e?void 0:e.first_name)||"")} ${this.maskGuestName(t)}`.trim(),email:this.maskGuestEmail(null==e?void 0:e.email),phone:this.maskGuestPhone(null==e?void 0:e.dial_code,null==e?void 0:e.phone_number)}}maskGuestEmail(e){if(!e)return"";const t=e.split("@");if(2!==t.length)return"***";const i=t[0];return`${i.length<=1?"*":`${i[0]}***`}@${t[1]}`}maskGuestPhone(e,t){return t?`${e||""} ******${t.toString().slice(-4)}`:""}maskGuestName(e){return e?e.length<=1?"*":`${e[0]}***`:""}goToLoginScreen(){this.formSubmited=!0,this.validateGuestFormFields(!1)?(this.formSubmited=!1,this.calCulateOtherCharges2(),this.resolveGuestUser().then(e=>{e&&this.proceedToBookingPayment()})):this.formSubmited=!1}proceedToBookingPayment(){var e,t;if(this.formSubmited=!0,this.generateErrors(this.addForm),console.log(">>>addForm",this.addForm),!this.addForm.valid||!this.selectedVehicleObj||!this.isSelectedVehicleInCurrentList())return void this.toasterService.error((null===(e=this.currentLanguage)||void 0===e?void 0:e.please_select_vehicle)||"Please complete all required fields");this.formSubmited=!1,this.calCulateOtherCharges2();const i=()=>{const e=this.addForm.controls.paymentMode.value;1==e?this.bookRide(!0):2==e?(this.isCheckoutStep=!0,this.openPaymentGateway(!0)):this.bookRide(!0)};this.Customer_id||(null===(t=this.currentUserDetail)||void 0===t?void 0:t.id)?i():this.resolveGuestUser().then(e=>{e&&i()})}calCulateOtherCharges(e){const t=this.computeOtherChargesForVehicle(e,!0);return this.selectedOtherChargesArray=this.otherChargesArray.filter(e=>e.checked||e.is_required),t}computeOtherChargesForVehicle(e,t=!1){var i,n;if(!e||!(null===(i=this.otherChargesArray)||void 0===i?void 0:i.length))return 0;let o=0;const a=2==e.vehicle_type_category?this.store_bike_distance||this.store_ride_distance||this.store_distance||0:this.store_ride_distance||this.store_distance||0,r=(null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.amount)||0;return this.otherChargesArray.forEach(e=>{var i,n,l,s;if(!e.checked&&!e.is_required)return void(t&&(e.charges=0,e.charge_price=0,e.return_charges=null!==(i=e.return_charges)&&void 0!==i?i:0));let u=0,d=1;if("booster_seat"==e.charges_key){if(d=Number(this.addForm.controls.booster_seat.value)||0,!d&&!e.is_required)return void(t&&(e.charges=0,e.charge_price=0,e.currentValue=0,e.return_charges=null!==(n=e.return_charges)&&void 0!==n?n:0));!d&&e.is_required&&(d=1),u=1==e.charge_type?e.charge_value*d/100*r:3==e.charge_type?e.charge_value*a:e.charge_value*d}else if("child_seat"==e.charges_key){if(d=Number(this.addForm.controls.child_seat.value)||0,!d&&!e.is_required)return void(t&&(e.charges=0,e.charge_price=0,e.currentValue=0,e.return_charges=null!==(l=e.return_charges)&&void 0!==l?l:0));!d&&e.is_required&&(d=1),u=1==e.charge_type?e.charge_value*d/100*r:2==e.charge_type?e.charge_value*d:3==e.charge_type?e.charge_value*a:e.charge_value*d}else d=(0,S.MV)(e),u=1==e.charge_type?e.charge_value*d/100*r:3==e.charge_type?e.charge_value*a:e.charge_value*d;t&&(e.charges=u,e.charge_price=u,e.return_charges=null!==(s=e.return_charges)&&void 0!==s?s:0,e.currentValue="booster_seat"==e.charges_key||"child_seat"==e.charges_key||(0,S.Mf)(e)?d:e.currentValue>0?e.currentValue:1,e.checked=!0),o+=u}),o}buildAddonPayload(){return this.selectedOtherChargesArray=(this.otherChargesArray||[]).filter(e=>e&&(e.checked||e.is_required)),this.selectedOtherChargesArray.map(e=>{var t,i,n,o;const a="booster_seat"==(null==e?void 0:e.charges_key)?Number(this.addForm.controls.booster_seat.value)||Number(null==e?void 0:e.currentValue)||1:"child_seat"==(null==e?void 0:e.charges_key)?Number(this.addForm.controls.child_seat.value)||Number(null==e?void 0:e.currentValue)||1:Number(null==e?void 0:e.currentValue)>0?Number(e.currentValue):1,r=Number(null!=(null==e?void 0:e.charges)?e.charges:null==e?void 0:e.charge_price)||0;return Object.assign(Object.assign({},e),{company_id:null!==(t=null==e?void 0:e.company_id)&&void 0!==t?t:null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.company_id,is_active:null!==(n=null==e?void 0:e.is_active)&&void 0!==n?n:1,is_deleted:null!==(o=null==e?void 0:e.is_deleted)&&void 0!==o?o:0,charges:r,charge_price:null!=(null==e?void 0:e.charge_price)?Number(e.charge_price):r,return_charges:null!=(null==e?void 0:e.return_charges)?Number(e.return_charges):0,currentValue:a,checked:!0,applicable_on:"NaN"===(null==e?void 0:e.applicable_on)||null==(null==e?void 0:e.applicable_on)?null:e.applicable_on})})}refreshDetailModalVehicleFare(){var e;if(!this.detailModalVehicle||!this.isDetailModalOpen)return;const t=this.getDetailModalOtherCharges();
1this.syncVehicleFareAmount(this.detailModalVehicle,t);const i=null===(e=this.filterVehicleArray)||void 0===e?void 0:e.find(e=>{var t;return(null==e?void 0:e.id)===(null===(t=this.detailModalVehicle)||void 0===t?void 0:t.id)});i&&(i.final_fare_amount=this.detailModalVehicle.final_fare_amount)}getDetailModalOtherCharges(){return this.computeOtherChargesForVehicle(this.detailModalVehicle,!1)}getDetailModalTotal(){return this.computeVehicleTotalAmount(this.detailModalVehicle,this.getDetailModalOtherCharges())}getOtherChargeLabel(e){var t,i;const n=(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.currency_symbol)||"";if(1==(null==e?void 0:e.charge_type))return`(${e.charge_value}%)`;if(3==(null==e?void 0:e.charge_type)){const t=(null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.distance_unit)||"Km";return`(${n}${e.charge_value} Per ${t})`}return`(${n}${e.charge_value})`}isCountableOtherCharge(e){return"child_seat"===(null==e?void 0:e.charges_key)||"booster_seat"===(null==e?void 0:e.charges_key)||(0,S.Mf)(e)}isDynamicCalculationCharge(e){return(0,S.Mf)(e)}getOtherChargeBreakdownLabel(e){return(0,S.$v)(e)}incrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=(Number(e.currentValue)||0)+1;e.currentValue=t,this.otherChargesArray=(this.otherChargesArray||[]).map(i=>{var n;return(null==i?void 0:i.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(i.currentValue=t,i.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[i.charges_key])&&(this.otherChargArray[i.charges_key].currentValue=t)),Object.assign({},i)}),this.selectedVehicleObj&&(this.calCulateOtherCharges2(),this.refreshDetailModalVehicleFare())}decrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=Number(e.currentValue)||0,i=t>1?t-1:1;e.currentValue=i,this.otherChargesArray=(this.otherChargesArray||[]).map(t=>{var n;return(null==t?void 0:t.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(t.currentValue=i,t.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[t.charges_key])&&(this.otherChargArray[t.charges_key].currentValue=i)),Object.assign({},t)}),this.selectedVehicleObj&&(this.calCulateOtherCharges2(),this.refreshDetailModalVehicleFare())}calCulateOtherCharges2(){var e;this.otherChargePrice&&(this.finalFare=(this.finalFare||0)-this.otherChargePrice),this.otherChargePrice=this.computeOtherChargesForVehicle(this.selectedVehicleObj,!0),this.selectedOtherChargesArray=this.otherChargesArray.filter(e=>e.checked||e.is_required),this.finalFare=(this.finalFare||0)+this.otherChargePrice,this.syncVehicleFareAmount(this.selectedVehicleObj,this.otherChargePrice),(null===(e=this.filterVehicleArray)||void 0===e?void 0:e.length)&&this.selectedVehicleObj&&this.filterVehicleArray.forEach(e=>{var t;(null==e?void 0:e.id)===(null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.id)&&(e.final_fare_amount=this.selectedVehicleObj.final_fare_amount)}),this.refreshDetailModalVehicleFare()}onDateChange(e,t){var i;null===(i=this.addForm.get("properties").at(t).get("value"))||void 0===i||i.setValue(e[0])}showLoginSingUpPage(e){this.loadingState=!1,this.selectedButtonSingAUpLogin=e,1870!==Number(this.company_id)?(null==e?void 0:e.bookRide)&&1==this.addForm.controls.paymentMode.value||2==this.pre_payment_value?this.bookRide(!0):null==(null==e?void 0:e.button_id)&&1==(null==e?void 0:e.bookRide)&&2==this.addForm.controls.paymentMode.value&&this.openPaymentGateway(!0):this.openPaymentGateway(!0)}openPaymentGateway(e){const t=(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id);this.pre_payment&&!t&&(this.callApi=!1,this.bookRide(),this.loadingState=!1),this.showPaymetScreen=e,this.displayPaymentForm=!0,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1}afterPaymentSucsess(e){this.pre_payment||this.isStripePreAuthMode()?(this.loadingState=!1,this.displayThannkYouScreen()):e&&!this.pre_payment&&this.bookRide(!0)}onStripeRequestBooking(){this.bookRide()}bookRide(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,P;if(this.isBookingHold)swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);else if(this.generateErrors(this.addForm),this.addForm.valid){$("#properties").modal("hide"),this.loadingState=!0,this.calCulateOtherCharges2
1();const t=this.getBookingAmount();var w=this.getWayPoints(),q={pickup_location:this.addForm.get("pickup_location").value,vehicle_type_id:this.selectedVehicleObj.id,dropoff_latitude:null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),dropoff_longitude:null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),payment_mode:this.addForm.get("paymentMode").value,payment_mode_id:this.addForm.get("payment_mode_id").value,no_of_passenger:this.addForm.get("no_of_passenger").value,booking_distance:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_distance:this.otherDetails.ride_distance,booking_duration:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_time:this.otherDetails.ride_time,calculation_method:null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing.calculation_method,way_points:w,transaction_detail:void 0,luggage:this.addForm.get("trip_luggage").value,fare_details:this.selectedVehicleObj.pricing,payment_type:(0,A.bQ)(null!==(a=this.channelPaymentType)&&void 0!==a?a:this.pre_payment_value)};const O=Number(null===(r=this.addForm.get("paymentMode"))||void 0===r?void 0:r.value),L=this.isStripePreAuthMode()&&2===O;q.payment_status=L?"hold":"pending",L&&(null===(l=this.addForm.get("paymentStatus"))||void 0===l||l.setValue("hold",{emitEvent:!1}));const M=this.buildBookingAssetsPayload();M.length&&(q.booking_assets=M);let V={flight:{iata:this.addForm.get("flight_number").value}};q.flight_info=this.selectedFlightObj?this.selectedFlightObj:this.addForm.get("flight_number").value?V:null,this.isSchedual_trip?(q.booking_request_time=this.combinedTimestamp(),q.is_scheduled=1):q.is_scheduled=0,q.flight_number=null===(s=this.addForm.value)||void 0===s?void 0:s.flight_number,((null===(u=this.addForm.value)||void 0===u?void 0:u.booster_seat)||0==this.addForm.value.booster_seat)&&(q.booster_seat=null===(c=null===(d=this.addForm.value)||void 0===d?void 0:d.booster_seat)||void 0===c?void 0:c.toString()),((null===(h=this.addForm.value)||void 0===h?void 0:h.child_seat)||0==this.addForm.value.child_seat)&&(q.child_seat=null===(p=null===(g=this.addForm.value)||void 0===g?void 0:g.child_seat)||void 0===p?void 0:p.toString()),(null===(m=this.addForm.value)||void 0===m?void 0:m.booking_type_id)&&(q.booking_type_id=null===(_=this.addForm.value)||void 0===_?void 0:_.booking_type_id);let S=this.buildAddonPayload();S.length&&(q.fare_details=Object.assign(Object.assign({},q.fare_details||{}),{addon:S})),q.booking_properties=JSON.stringify(this.addForm.value.properties.map(e=>this.mapBookingProperty(e))),this.walletBalance<0&&t?(q.booking_amount=t,q.wallet_id=null,q.fare_details=Object.assign(Object.assign(Object.assign({},this.selectedVehicleObj.pricing),{previous_dues:Math.abs(this.walletBalance),final_fare:null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare}),S.length?{addon:S}:{})):q.booking_amount=t,q.fare_details.driver_earning=this.getDriverEarning(t),(null===(v=this.addForm.value)||void 0===v?void 0:v.hour)&&(q.fare_details.no_of_hours=null===(y=this.addForm.value)||void 0===y?void 0:y.hour),(null===(b=this.addForm.value)||void 0===b?void 0:b.package)&&(q.fare_details.package_type_id=null===(x=this.addForm.value)||void 0===x?void 0:x.packages),("Y"===this.checkGenderEnable||"y"==this.checkGenderEnable)&&(q.gender=this.genderValue),this.selectedVehicleObj.surge_price.surgeApplied&&(q.fare_details.surge_multiplier=this.selectedVehicleObj.surge_price.multiplier,q.fare_details.surge_flat_amount=this.selectedVehicleObj.surge_price.flat_price),q.fare_details.final_fare=null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.final_fare,this.Customer_id?q.user_id=this.Customer_id:(null===(Z=this.currentUserDetail)||void 0===Z?void 0:Z.id)&&(q.user_id=null===(C=this.currentUserDetail)||void 0===C?void 0:C.id),this.queueId&&(q.queue_id=this.queueId),this.addForm.get("destination").value&&(q.dropoff_location=this.addForm.get("destination").value),this.zoneData&&this.zoneData.to&&(q.dropoff_zone_id=this.zoneData.to.toString()),this.zoneData&&this.zoneData.from&&(q.pickup_zone_id=this.zoneData.from);try{q.pickup_latitude=null===(F=this.pickup_latitude)||void 0===F?void 0:F.toFixed(6)}catch(D){q.pickup_latitude=this.pickup_latitude}try{q.pickup_longitude=null===(T=this.pickup_longitude)||void 0===T?void 0:T.toFixed(6)}catch(D){q.pickup_longitude=this.pickup_longitude}if(this.returnEnable&&(q.is_return_booking=1,q.return_booking=this.buildReturnBookingObject(q)),3===(null==q?void 0:q.payment_mode)&&(q.payment_mode=2),!this.autoDispatch&&this.addForm.get("driver").value&&(q.driver_id=this.addForm.get("driver").value),this.addForm.valid&&!this.Customer_id){let e={};e.first_name=this.addForm.get("first_name").value?this.addForm.get("first_name").value:"",e.last_name=this.addForm.get("last_name").value?this.addForm.get("last_name").value:"",e.phone_no=this.addForm.get("phone_no").value?this.addForm.get("phone_no").value.toString():"",e.dial_code=this.addForm.get("dial_co
1de").value?this.addForm.get("dial_code").value:this.dialCode,this.addForm.get("email").value&&(e.email=this.addForm.get("email").value),q.passenger_details=e}q.is_fixed_price=0,(this.pre_payment||this.isStripePreAuthMode())&&2===Number(null===(P=this.addForm.get("paymentMode"))||void 0===P?void 0:P.value)&&(q.booking_status=16),this.agent_id&&(q.agent_id=this.agent_id),2!==this.selectedTab||2===this.selectedTab&&q.booking_request_time>(new Date).getTime()/1e3?3!==this.selectedTab?"N"===this.corporateBookingConfirmation?this.yelowCabService.bookRide(q).subscribe(t=>{this.loadingState=!1,t.success||t.status?(this.tripPayload=q,this.trip_number=t.data.booking_number,this.tripId=t.data.booking_id,this.content="Successfully Booked",e&&this.displayThannkYouScreen()):this.toasterService.error(null==t?void 0:t.message)}):this.yelowCabService.bookRide(q).subscribe(e=>{this.loadingState=!1,e.success||e.status?(this.tripPayload=q,this.trip_number=e.data.booking_number,this.tripId=e.data.booking_id,this.content="Wait for confirmation"):this.toasterService.error(null==e?void 0:e.message)}):this.bookRecuringRide(this.tripPayload):(this.loadingState=!1,this.toasterService.error("Please select valid scheduled time"))}}displayThannkYouScreen(){var e;(0,P.nb)(this.company_id||(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id),this.trip_number)||(this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!0,this.showPaymetScreen=!1,this.isCheckoutStep=!1,this.hasViewedOptions=!1)}combinedTimestamp(){return new Date(this.selectedRequestTime).getTime()/1e3}bookRecuringRide(e){e.recurring_type=this.addForm.controls.recurring_type.value,e.recurring_time=new Date(this.addForm.controls.recurring_time.value).getTime()/1e3,e.end_date=new Date(this.addForm.controls.end_date.value).getTime()/1e3,2==this.addForm.controls.recurring_type.value&&(e.recurring_on=this.addForm.controls.recurring_on.value),this.yelowBookingService.bookRicurringRide(e).subscribe(e=>{var t;if(this.loadingState=!1,e.success||e.status){if(this.trip_number=e.data.booking_number,(0,P.nb)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id),this.trip_number))return;this.yelowBookingService.tripNoSubject.next({trip_number:this.trip_number,content:"Successfully Booked"}),this.ViewUpdate("thankyou")}else this.toasterService.error(null==e?void 0:e.message)},e=>{this.loadingState=!1})}ViewUpdate(e=!1){location.reload(),e&&(this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1),this.addForm.get("properties").clear(),this.addForm.reset(),this.selectQueuePickup=!1,this.addForm.get("checkpoints").clear(),this.addForm.get("properties").clear(),this.trip_luggage=0,this.no_of_passenger=1,this.addForm.patchValue({no_of_passenger:this.no_of_passenger,trip_luggage:this.trip_luggage,ride_type:1,pickup_location:null,destination:null,request_time:null,auto_dispatch:!0,gender:"M"}),this.searchText=null,this.selectedPickupRegionData=null,this.searchTextDestionation=null,this.responseDataDestionation=null,this.responseDatacheckPoint=null,this.responseData=null,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.selectedTab=1,this.request_time=null,this.autoDispatch=!0,this.Customer_id=null,this.genderTab="M",this.genderValue="M",this.getWayPoint=[],this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.marker&&(this.marker=[]),this.isFirstPart=!0,this.finalFare=0,this.walletBalance=0,this.addForm.get("notes").clearValidators(),this.bookingAssetsList=[],this.corporateBookingConfirmation="N",this.booking_type_id=null,this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.selectedFlightObj=null,this.responseFlight=[],this.trip_time=null,this.selectedButtonSingAUpLogin={button_id:1}
1,this.createForm(),this.patchDialCodeFromIp(),this.getSeduleConfige(),this.jwtService.destroyAgentId(),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:null},queryParamsHandling:"merge",replaceUrl:!0}),this.patchDefaultUserLocation(),this.cd.detectChanges()}applyPaymentModeConfig(e){var t;console.log(e,"type"),(null===(t=this.allPaymentModes)||void 0===t?void 0:t.length)?this.zoneConfigActive||(this.paymentMode=this.allPaymentModes,this.paymentMode.length>0?this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)):this.company_id&&this.toasterService.error("Please setup payment Mode!")):this.paymentMode=[]}resolveDefaultPaymentMode(e){return 1870===Number(this.company_id)&&e.find(e=>2===Number(null==e?void 0:e.payment_mode_key))||e[0]}getPaymentConfig(){const e=(0,A.QZ)(this.company_id);this.yelowCabService.getPaymentConfigList(e).subscribe(e=>{var t,i;e.status&&(this.allPaymentModes=(0,A.w6)(null===(t=e.data)||void 0===t?void 0:t.list,this.company_id),this.applyPaymentModeConfig(3),(null===(i=this.pendingZoneConfigs)||void 0===i?void 0:i.length)&&(this.applyZoneBookingOptions(this.pendingZoneConfigs,this.activeZoneId),this.pendingZoneConfigs=null))})}loadZoneConfigurationForPickup(e){e?(e=e.split(",")[0],(this.activeZoneId!==e||!this.zoneConfigActive)&&(this.activeZoneId=e,this.yelowCabService.getZoneConfiguration({zone_id:e,page:0}).subscribe(t=>{const i=this.normalizeZoneConfigList(null==t?void 0:t.data);((null==t?void 0:t.status)||(null==t?void 0:t.success))&&i.length?this.allPaymentModes.length?(this.applyZoneBookingOptions(i,e),this.pendingZoneConfigs=null):this.pendingZoneConfigs=i:this.resetZoneBookingOptions()},()=>this.resetZoneBookingOptions()))):this.resetZoneBookingOptions()}normalizeZoneConfigList(e){return Array.isArray(e)?e:Array.isArray(null==e?void 0:e.list)?e.list:[]}applyZoneBookingOptions(e,t){const i=[],n=[];let o=null;if(e.forEach(e=>{if(!(null==e?void 0:e.config_key)||null==e.config_value||""===e.config_value)return;const t=String(e.config_value);switch(e.config_key){case"payment_mode":i.push(t);break;case"request_mode":n.push(t);break;case"cut_off_time":o=t}}),this.zoneConfigActive=!0,this.activeZoneId=t,this.lastAppliedZoneConfigs=e,i.length&&this.allPaymentModes.length){const e=this.allPaymentModes.filter(e=>i.includes(String(e.id)));e.length&&(this.paymentMode=e,this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)))}
1const a={1:{type_id:1,type_name:"Now"},2:{type_id:2,type_name:"Later"}};if(n.length){const e=n.map(e=>a[e]).filter(Boolean);e.length&&(this.rideType=e,this.setRideType(this.rideType[0].type_id))}if(o){const e=this.resolveCutOffMinutes(o);e>0&&this.applyZoneCutOffMinutes(e)}this.cd.detectChanges()}resolveCutOffMinutes(e){const t=Number(e);return!Number.isNaN(t)&&t>0?t:0}applyZoneCutOffMinutes(e){!e||Number.isNaN(e)||e<=0?this.zoneCutOffMinutes=null:(this.zoneCutOffMinutes=e,this.applyRequestTimeMinDate())}getEffectiveRequestMinDate(){const e=new Date;return e.setSeconds(0,0),this.zoneCutOffMinutes>0?new Date(e.getTime()+6e4*this.zoneCutOffMinutes):new Date(e)}applyRequestTimeMinDate(){var e,t,i,n;const o=this.getEffectiveRequestMinDate();this.requestTimeMinDate=o;const a=new Date(o);if(a.setHours(0,0,0,0),this.timeFormatConfig2.minDate=a,this.timeFormatConfig.minDate=o,this.is_date=!0,2===this.selectedTab){const a=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.controls.request_time)||void 0===t?void 0:t.value,r=null===(n=null===(i=this.addForm)||void 0===i?void 0:i.controls.trip_time)||void 0===n?void 0:n.value,l=a?new Date(a):null,s=r?new Date(r):null;let u=0;l&&s&&!Number.isNaN(l.getTime())&&!Number.isNaN(s.getTime())&&(u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()).getTime()),(!u||u<o.getTime())&&(this.request_time=new Date(o),this.trip_time=new Date(o),this.addForm.controls.request_time.setValue(this.request_time),this.addForm.controls.trip_time.setValue(this.trip_time))}}validateRequestTimeCutOff(e){if(2!==this.selectedTab)return!0;const t=this.getEffectiveRequestMinDate(),i=e||new Date(this.selectedRequestTime||this.addForm.value.request_time);if(Number.isNaN(i.getTime())||i.getTime()<t.getTime()){const e=this.zoneCutOffMinutes?`Trip must be scheduled at least ${this.zoneCutOffMinutes} minutes from now`:`Please schedule the trip after ${t.toLocaleString()}`;return this.toasterService.error(e),!1}return!0}clearZoneCutOffMinutes(){this.zoneCutOffMinutes=null,this.requestTimeMinDate=null}resetZoneBookingOptions(){var e;if(!this.zoneConfigActive)return this.activeZoneId=null,void(this.pendingZoneConfigs=null);this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.clearZoneCutOffMinutes(),this.allPaymentModes.length&&(console.log(this.allPaymentModes,"this.allPaymentModes"),this.applyPaymentModeConfig(2)),this.allRideTypes.length?(this.rideType=[...this.allRideTypes],this.setRideType((null===(e=this.rideType[0])||void 0===e?void 0:e.type_id)||1)):this.getSeduleConfige(!1),this.cd.detectChanges()}displayFirstScreen(e=!1){e&&this.resetPropertyControl(),this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displaySecondScreen(){this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!0,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displayThirdScreen(){this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayThankYouForm=!1,this.isCheckoutStep=!1,this.isFirstPart=!0}getResolvedHourlyPackagePricing(e){var t,i,n,o;if(!e)return{minHours:null,maxHours:null,hourlyRate:null,slots:null};const a="Y"===e.zone_price_applied?e.zone_price_model:null;if(a){const r=null!==(t=a.slots)&&void 0!==t?t:e.slots;return{minHours:this.coerceFiniteNumber(null!==(i=a.min_hours)&&void 0!==i?i:e.min_hours),maxHours:this.coerceFiniteNumber(null!==(n=a.max_hours)&&void 0!==n?n:e.max_hours),hourlyRate:this.coerceFiniteNumber(null!==(o=a.hourly_rate)&&void 0!==o?o:e.hourly_rate),slots:Array.isArray(r)?r:null}}const r=e.slots;return{minHours:this.coerceFiniteNumber(e.min_hours),maxHours:this.coerceFiniteNumber(e.max_hours),hourlyRate:this.coerceFiniteNumber(e.hourly_rate),slots:Array.isArray(r)?r:null}}getResolvedHourlyRate(e){var t;const i=null===(t=this.getResolvedHourlyPackagePricing(e))||void 0===t?void 0:t.hourlyRate;if(null!=i)return i;const n=Number(null==e?void 0:e.hourly_rate);return Number.isFinite(n)?n:0}getResolvedPriceType(e){var t;if(!e)return null;const i=e.zone_price_model,n=null==i||"object"!=typeof i||Array.isArray(i)||null===(t=i.price_type)||void 0===t?e.price_type:t,o=Number(n);return Number.isFinite(o)?o:null}isHourlyRateTimesHoursPricing(e){return 5===this.getResolvedPriceType(e)}isPackageSlotAmountPricing(e){return 4===this.getResolvedPriceType(e)}getSlotAmountForPackageSelection(e,t){var i;if(!this.isPackageSlotAmountPricing(e)||null==t)return null;const n=null===(i=this.getResolvedHourlyPackagePricing(e))||void 0===i?void 0:i.slots;if(!Array.isArray(n))return null;const o=n.find(e=>e.id==t);if(!o||null==o.slot_amount)return null;const a=Number(o.slot_amount);return Number.isFinite(a)?a:null}hourlyPackageCardDisplay(e){var t,i;const n=this.getResolvedHourlyPackagePricing(null==e?void 0:e.pricing);return{minHours:null!==(t=n.minHours)&&void 0!==t?t:0,hourlyRate:null!==(i=n.hourlyRate)&&void 0!==i?i:0}}coerceFiniteNumber(e){if(null==e||""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}syncRentalHourlyOptionsFromVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_;const f=null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key;if(!(null==e?void 0:e.pricing)||!["hourly","package"].includes(f))return;const v=this.getResolvedHourlyPackagePricing(e.pricing);if("hourly"===f){let e=null!==(i=v.minHours)&&void 0!==i?i:1,t=null!==(n=v.maxHours)&&void 0!==n?n:24;if(t<e){const i=e;e=t,t=i}t=Math.min(t,168),this.hoursArray=[];for(let i=e;i<=t;i++)this.hoursArray.push({name:`${i} hrs`,value:i});const u=null!==(o=v.minHours)&&void 0!==o?o:e,d=null===(r=null===(a=this.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour,c=null!=d&&d>=e&&d<=t?d:u;null===(l=this.addForm.controls.hour)||void 0===l||l.setValue(c,{emitEvent:!1}
1),null===(s=this.filterVehicleArray)||void 0===s||s.forEach(e=>{(null==e?void 0:e.pricing)&&(e.pricing.selected_hours=c)}),this.changeHours()}if(this.rentalPackages=null!=v.slots?v.slots:[],"package"===f){const t=null===(d=null===(u=this.addForm)||void 0===u?void 0:u.value)||void 0===d?void 0:d.packages;if(null!=t&&!this.rentalPackages.some(e=>e.id==t)&&(null===(c=this.addForm.controls.packages)||void 0===c||c.setValue(null)),this.isPackageSlotAmountPricing(e.pricing)&&(null===(h=this.rentalPackages)||void 0===h?void 0:h.length)){const e=null===(p=null===(g=this.addForm)||void 0===g?void 0:g.value)||void 0===p?void 0:p.packages,t=null!=e&&this.rentalPackages.some(t=>t.id==e)?e:null===(m=this.rentalPackages[0])||void 0===m?void 0:m.id;null!=t&&(null===(_=this.addForm.controls.packages)||void 0===_||_.setValue(t,{emitEvent:!1}),this.changePackages())}}}validationForRental(){var e,t;this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),"hourly"==(null===(e=this.selectedBookingTypeObj)||void 0===e?void 0:e.field_key)?(this.addForm.controls.hour.setValidators([r.kI.required]),this.addForm.controls.packages.setValidators([])):"package"==(null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key)?(this.addForm.controls.packages.setValidators([r.kI.required]),this.addForm.controls.hour.setValidators([])):(this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.setValidators([])),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}shouldHideCharge(e){return"booster_seat"===(null==e?void 0:e.charges_key)||"child_seat"===(null==e?void 0:e.charges_key)||(null==e?void 0:e.is_required)}changeHours(){var e=this;return(0,y.Z)(function*(){var t,i,n,o,a,r;if(!e.selectedVehicleObj)return;const l=e.addForm.value.hour;if(l&&(e.filterVehicleArray.forEach(t=>{if(t.pricing.selected_hours=l,t.id===e.selectedVehicleObj.id||!e.isHourlyRateTimesHoursPricing(t.pricing))return;let i=e.getResolvedHourlyRate(null==t?void 0:t.pricing)*l-e.additionalDiscount;t.final_fare.amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge}),e.isHourlyRateTimesHoursPricing(null===(t=e.selectedVehicleObj)||void 0===t?void 0:t.pricing))){let t=e.getResolvedHourlyRate(null===(i=e.selectedVehicleObj)||void 0===i?void 0:i.pricing)*l-e.additionalDiscount;e.hours_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare,e.selectedVehicleObj.pricing.selected_hours=(null===(o=null===(n=e.addForm)||void 0===n?void 0:n.value)||void 0===o?void 0:o.hour)?null===(r=null===(a=e.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour:0})()}changePackages(){var e=this;return(0,y.Z)(function*(){var t;if(!e.selectedVehicleObj)return;const i=null===(t=e.addForm.value)||void 0===t?void 0:t.packages,n=e.getSlotAmountForPackageSelection(e.selectedVehicleObj.pricing,i);if(null!=n){e.filterVehicleArray.forEach(t=>{if(t.id===e.selectedVehicleObj.id)return;const n=e.getSlotAmountForPackageSelection(t.pricing,i);null!=n&&(t.final_fare.amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge)});let t=n-e.additionalDiscount;e.package_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPasse
1ngerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare})()}removeValidation(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),this.addForm.controls.packages.setValidators([]),this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}setDateintime(){const e=new Date(this.addForm.value.request_time),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())this.setMinTime();else{let t=new Date(this.addForm.value.trip_time[0]||new Date);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.trip_time=t,this.addForm.controls.trip_time.setValue(t),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig.minDate=new Date(t)}}setMinTime(){const e=new Date;this.trip_time=new Date(e.getTime()+6e4*(this.min_date||0)),this.addForm.controls.trip_time.setValue(new Date(this.trip_time)),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(this.trip_time))}initDefaultReturnDateTime(){var e,t,i;let n=new Date((new Date).getTime()+36e5).getTime(),o=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),a=new Date(Math.max(n,o));this.returnDateFormatConfig.minDate=new Date,this.returnTimeFormatConfig.minDate=new Date(a),this.return_date=a,this.return_trip_time=a,this.return_time=a,this.addForm&&(null===(e=this.addForm.controls.return_date)||void 0===e||e.setValue(a),null===(t=this.addForm.controls.return_trip_time)||void 0===t||t.setValue(a),null===(i=this.addForm.controls.return_time)||void 0===i||i.setValue(a)),this.selectedDate=a,this.syncReturnDateTime()}syncReturnDateTime(){var e,t,i,n,o,a,r;const l=null!==(i=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("return_date"))||void 0===t?void 0:t.value)&&void 0!==i?i:this.return_date,s=null!==(a=null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("return_trip_time"))||void 0===o?void 0:o.value)&&void 0!==a?a:this.return_trip_time;if(!l||!s)return;const u=new Date(l),d=new Date(Array.isArray(s)?s[0]:s),c=new Date(u.getFullYear(),u.getMonth(),u.getDate(),d.getHours(),d.getMinutes(),d.getSeconds());null===(r=this.addForm.get("return_time"))||void 0===r||r.setValue(c),this.selectedDate=c,this.return_time=c}setReturnTimeFromDate(){const e=new Date(this.addForm.value.return_date),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()){let e=new Date((new Date).getTime()+36e5).getTime(),t=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),i=new Date(Math.max(e,t));this.return_trip_time=i,this.addForm.controls.return_trip_time.setValue(i),this.returnTimeFormatConfig.minDate=i}else{let t=new Date(this.addForm.value.return_trip_time||new Date);Array.isArray(t)&&(t=new Date(t[0])),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t),this.returnTimeFormatConfig.minDate=new Date(t)}}changeBookingTypeList(e){1==e?(this.isTaxiActive=!0,this.isRentalActive=!1,this.transactionCategory=this.transactionCategoryList.filter(e=>"point_to_point"==e.field_key||"airport_drop_off_transfer"==e.field_key||"airport_pick_up_transfer"==e.field_key||"round"==e.field_key)):2==e&&(this.isTaxiActive=!1,this.isRentalActive=!0,this.transactionCategory=this.transactionCategoryList.filter(e=>"hourly"==e.field_key||"package"==e.field_key));let t=this.transactionCategory[0];this.booking_type_id=null==t?void 0:t.id,this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.addForm.controls.booking_type_id.updateValueAndValidity(),this.changeBookingType(t)}setPaymentMode(e){this.addForm.controls.payment_mode_id.setValue(null==e?void 0:e.id),this.addForm.controls.paymentMode.setValue(null==e?void 0:e.payment_mode_key),this.addForm.controls.payment_mode_id.updateValueAndValidity(),this.addForm.controls.paymentMode.updateValueAndValidity(),this.applyPaymentTypeFromSelectedMode(e);const t=this.isStripePreAuthMode()&&2===Number(null==e?void 0:e.payment_mode_key);this.addForm.controls.paymentStatus.setValue(t?"hold":"pending"),this.addForm.controls.paymentStatus.updateV
1alueAndValidity()}applyPaymentTypeFromSelectedMode(e){var t;if(!(0,A.kB)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id))){if(null==e?void 0:e.payment_type){const t=(0,A.L3)(e.payment_type);this.pre_payment_value=t.prePaymentValue,this.pre_payment=t.prePayment,this.channelPaymentType=t.paymentType,this.channelPaymentTypeLabel=t.paymentTypeLabel}this.loadPaymentRulePolicy(null==e?void 0:e.id,e)}}loadPaymentRulePolicy(e,t){var i;!e||(0,A.kB)(this.company_id||(null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.company_id))||this.yelowCabService.getPaymentRulePolicy({booking_channel:A.fj,payment_method:e}).subscribe(e=>{var i,n,o,a;if(!(null==e?void 0:e.status)&&!(null==e?void 0:e.success)||!(null==e?void 0:e.data))return;const r=(0,A.$I)(e.data);if(!r)return;const l=(0,A.L3)(r);this.pre_payment_value=l.prePaymentValue,this.pre_payment=l.prePayment,this.channelPaymentType=l.paymentType,this.channelPaymentTypeLabel=l.paymentTypeLabel;const s=this.isStripePreAuthMode()&&2===Number(null!==(i=null==t?void 0:t.payment_mode_key)&&void 0!==i?i:null===(n=this.addForm.controls.paymentMode)||void 0===n?void 0:n.value);null===(o=this.addForm.controls.paymentStatus)||void 0===o||o.setValue(s?"hold":"pending"),null===(a=this.addForm.controls.paymentStatus)||void 0===a||a.updateValueAndValidity(),this.cd.detectChanges()},()=>{})}isStripePreAuthMode(){var e;return(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id||(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id))}onBookingAssetsChange(e){this.bookingAssetsList=e||[]}buildBookingAssetsPayload(){return(this.bookingAssetsList||[]).filter(e=>e&&1!==e.is_delete&&!!e.asset_value).map(e=>{var t;const i=null===(t=M._B.find(t=>t.id===String(e.asset_type)))||void 0===t?void 0:t.kind;return Object.assign({asset_type:String(e.asset_type),user_type:e.user_type,asset_value:e.asset_value},"file"!==i&&"voice"!==i||!e.file_name?{}:{file_name:e.file_name})})}get displayExperienceVehicles(){return this.filterVehicleArray&&this.filterVehicleArray.length>0?this.filterVehicleArray:[]}selectExperienceVehicle(e,t){this.selectedExperienceIndex=t,this.selectedVehicleObj=e,this.selectedVehicleObjName=null==e?void 0:e.title,this.filterVehicleArray&&this.filterVehicleArray.length>0&&(this.filterVehicleArray.forEach((i,n)=>{i.checked=n===t||i.id===e.id}),this.changeVehicle(e))}isVehicleSelected(e,t){return null!=this.selectedExperienceIndex?this.selectedExperienceIndex===t:this.selectedVehicleObj?this.selectedVehicleObj.id===e.id:0===t}get currentSelectedVehicle(){var e;return(null===(e=this.displayExperienceVehicles)||void 0===e?void 0:e.length)?this.selectedVehicleObj&&this.isSelectedVehicleInCurrentList()?this.selectedVehicleObj:this.displayExperienceVehicles[this.selectedExperienceIndex||0]||null:null}get currentSelectedPrice(){var e;const t=this.currentSelectedVehicle;return(null==t?void 0:t.final_fare)?String(this.computeVehicleTotalAmount(t)):(null==t?void 0:t.final_fare_amount)?String(t.final_fare_amount):(null===(e=null==t?void 0:t.final_fare)||void 0===e?void 0:e.amount)?String(t.final_fare.amount+(t.final_fare.tax_amount||0)):"0"}getVehicleAssetImage(e,t){const i=["assets/img/mercedes-1.png","assets/img/mercedes-2.png","assets/img/mercedes-3.png"];return(null==t?void 0:t.vehicle_image)&&(t.vehicle_image.startsWith("http")||t.vehicle_image.startsWith("assets/img/mercedes-"))?t.vehicle_image:i[e%i.length]}toggleReturn(e){this.changeReturn(e)}resetForm(){this.ViewUpdate(!0)}setCapacityTab(e){this.activeCapacityTab=e}setLuggageOption(e){this.activeLuggageOption=e}setSeatingOption(e){this.activeSeatingOption=e}getLuggageImage(){return"carry-on"===this.activeLuggageOption?"assets/img/mercedes-12-carry.png":"standard"===this.activeLuggageOption?"assets/img/mercedes-8-carry.png":"xl"===this.activeLuggageOption?"assets/img/mercedes-6-carry.png":"assets/img/mercedes-12-carry.png"}getSeatingImage(){return"baby-seat"===this.activeSeatingOption?"assets/img/mercedes-seat-baby.png":"child-seat"===this.activeSeatingOption?"assets/img/mercedes-seat-child.png":"two"===this.activeSeatingOption?"assets/img/mercedes-2-passanger.png":"three"===this.activeSeatingOption||"five"===this.activeSeatingOption?"assets/img/mercedes-5-passanger.png":"assets/img/mercedes-seat-baby.png"}openVehicleDetails(e,t){t&&(t.stopPropagation(),t.preventDefault()),this.detailModalVehicle=e||this.selectedVehicleObj||this.displayExperienceVehicles[0],this.isDetailModalOpen=!0,this.modalSlideIndex=0,this.detailModalTab="charges",this.refreshDetailModalVehicleFare()}closeVehicleDetails(){this.isDetailModalOpen=!1,this.detailModalVehicle=null}selectVehicleFromModal(e){if(e){const t=this.displayExperienceVehicles.findIndex(t=>(null==t?void 0:t.id)===(null==e?void 0:e.id));this.selectExperienceVehicle(e,t>=0?t:0)}this.closeVehicleDetails()}setDetailModalTab(e){this.detailModalTab=e}getModalSlides(e){var t,i;const n=(null===(t=null==e?void 0:e.title)||void 0===t?void 0:t.toLowerCase().includes("first"))||"first-class"===(null==e?void 0:e.id),o=(null===(i=null==e?void 0:e.title)||void 0===i?void 0:i.toLowerCase().includes("van"))||"business-van"===(null==e?void 0:e.id);let a="assets/img/mercedes-4.png",r="All-electric quiet and executive-level comfort";return n?(a="assets/img/mercedes-3.png",r="A quiet expression of luxury for standout journeys."):o&&(a="assets/img/mercedes-2.png",r="Spacious and sophisticated travel for groups."),[{image:a,caption:r},{image:"assets/img/mercedes-5.png",caption:"Generous rear seating to settle in and stay focused."},{image:"assets/img/mercedes-6.png",caption:"Refined craftsmanship with acoustic privacy glass."},{image:"assets/img/mercedes-seat-baby.png",caption:"Baby and child seats available upon request."},{image:"assets/img/mercedes-7.png",caption:"Spacious trunk capacity for all your luggage requirements."}]}nextModalSlide(e){var t;e&&(e.stopPropagation(),e.preventDefault());const i=(null===(t=this.modalSlides)||void 0===t?void 0:t.length)||1;this.modalSlideIndex=(this.modalSlideIndex+1)%i}prevModalSlide(e){var t;e&&(e.stopPropagation(),e.preventDefault());const i=(null===(t=this.modalSlides)||void 0===t?void 0:t.length)||1;this.modalSlideIndex=(this.modalSlideIndex-1+i)%i}setModalSlide(e,t){t&&(t.stopPropagation(),t.preventDefault()),this.modalSlideIndex=e}selectPassengerType(e){this.passengerType=e,this.isGuestDropdownOpen="GUEST"===e}toggleGuestDropdown(e){e&&e.stopPropagation(),this.passengerType="GUEST",this.isGuestDropdownOpen=!this.isGuestDropdownOpen}getVehicleGradient(e){const t=["linear-gradient(180deg, #b9d8ca 0%, #d8eade 40%, #edf5f0 75%, #f7faf8 100%)","linear-gradient(180deg, #f5cfb5 0%, #fae2d2 40%, #fbf1e9 75%, #fdf8f4 100%)","linear-gradient(180deg, #adcde8 0%, #cbe0f2 40%, #e4eff8 75%, #f3f7fc 100%)","linear-gradient(180deg, #e4deeb 0%, #f5f2f9 55%, #ffffff 100%)","linear-gradient(180deg, #e
16e8ec 0%, #f4f5f7 55%, #ffffff 100%)"];return t[e%t.length]}get formattedPickupTime(){var e,t;const i=(null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("request_time"))||void 0===t?void 0:t.value)||this.request_time;if(!i)return"06:50 PM";try{const e=new Date(Array.isArray(i)?i[0]:i);return isNaN(e.getTime())?"06:50 PM":L(e).format("hh:mm A")}catch(n){return"06:50 PM"}}get formattedDropTime(){var e,t,i;const n=(null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("request_time"))||void 0===t?void 0:t.value)||this.request_time,o=(null===(i=this.otherDetails)||void 0===i?void 0:i.ride_time)||67;try{const e=new Date(Array.isArray(n)?n[0]:n||new Date),t=new Date(e.getTime()+6e4*o);return isNaN(t.getTime())?"7:57 pm":L(t).format("h:mm a")}catch(a){return"7:57 pm"}}proceedToCheckout(){var e,t;if(this.updateSameZoneTripRestriction())return;if(this.formSubmited=!0,this.applyGuestFieldValidators(),this.generateGuestFieldErrors(!0),!this.selectedVehicleObj||!this.isSelectedVehicleInCurrentList())return this.toasterService.error((null===(e=this.currentLanguage)||void 0===e?void 0:e.please_select_vehicle)||"Please select a vehicle"),void(this.formSubmited=!1);if(!this.validateGuestFormFields(!1))return void(this.formSubmited=!1);this.formSubmited=!1,this.calCulateOtherCharges2();const i=this.addForm.controls.paymentMode.value,n=()=>{if(1!=i){this.isCheckoutStep=!0,this.openPaymentGateway(!0);try{window.scrollTo({top:0,behavior:"smooth"})}catch(e){}}else this.proceedToBookingPayment()};this.Customer_id||(null===(t=this.currentUserDetail)||void 0===t?void 0:t.id)?n():this.resolveGuestUser().then(e=>{e&&n()})}goBackToExperience(){this.isCheckoutStep=!1,this.showPaymetScreen=!1,this.displayPaymentForm=!1;try{window.scrollTo({top:0,behavior:"smooth"})}catch(e){}}submitBookingPayment(){this.proceedToBookingPayment()}getCurrentVehicleTotal(){const e=this.currentSelectedVehicle||this.selectedVehicleObj;if(null==e?void 0:e.final_fare)return this.computeVehicleTotalAmount(e);if(null==e?void 0:e.final_fare_amount){const t=parseFloat(String(e.final_fare_amount));if(!isNaN(t)&&t>0)return t}return Number(this.finalFare||0)}toggleFareBreakdown(e){e&&(e.preventDefault(),e.stopPropagation()),this.isFareBreakdownOpen=!this.isFareBreakdownOpen,this.scheduleIframeHeightNotify()}getFareBreakdownRows(e){var t,i;const n=e||this.currentSelectedVehicle||this.selectedVehicleObj;if(!(null==n?void 0:n.final_fare))return[];const o=[],a=this.currentLanguage||{},r=null===(t=this.selectedBookingTypeObj)||void 0===t?void 0:t.field_key,l=["hourly","package"].includes(r),s=n.final_fare,u=n.pricing||{};l||(u.minimum_fare&&o.push({label:a.min_fare||"Minimum fare",amount:Number(u.minimum_fare)}),(u.base_fare||s.base_fare)&&o.push({label:a.base_fare||"Base fare",amount:Number(s.base_fare||u.base_fare)}),s.distance_fare&&o.push({label:a.distance_fare||"Distance fare",amount:Number(s.distance_fare)}),s.time_fare&&o.push({label:a.time_fare||"Time fare",amount:Number(s.time_fare)}),s.surge_fare&&o.push({label:a.surge_fare||"Surge fare",amount:Number(s.surge_fare)})),null!=s.amount&&o.push({label:a.trip_fare||"Trip fare",amount:Number(s.amount),isBold:!0}),s.out_of_service_area_charges&&o.push({label:a.out_of_service_area_charge||"Out of service area",amount:Number(s.out_of_service_area_charges)}),s.zone_extra_charges&&o.push({label:a.zone_extra_charge||"Zone extra charge",amount:Number(s.zone_extra_charges)}),this.totalExtraPassengerCharge&&o.push({label:a.extra_passenger_charge||"Extra passenger",amount:Number(this.totalExtraPassengerCharge)}),this.totalExtraLuggageCharge&&o.push({label:a.extra_luggage_charge||"Extra luggage",amount:Number(this.totalExtraLuggageCharge)}),this.extraCharge&&o.push({label:a.extra_charge||"Extra charge",amount:Number(this.extraCharge)}),this.walletBalance<0&&o.push({label:a.previous_dues||"Previous dues",amount:Math.abs(Number(this.walletBalance))}),s.tax_amount&&o.push({label:a.tax_title||"Estimated tax",amount:Number(s.tax_amount)}),(n.tax_list||(null===(i=this.otherDetails)||void 0===i?void 0:i.tax_list)||[]||[]).forEach(e=>{(null==e?void 0:e.value)&&o.push({label:e.tax_name||e.title||"Tax",amount:Number(e.value),indent:!0})});const d=(this.otherChargesArray||[]).filter(e=>e&&(e.checked||e.is_required));if(d.length){const t=e?this.computeOtherChargesForVehicle(n,!1):Number(this.otherChargePrice||this.computeOtherChargesForVehicle(n,!1));t>0&&o.push({label:a.other_charges||"Other charges",amount:t,isBold:!0}
1),d.forEach(e=>{var t,i;const n=Number(e.charges||e.charge_price||0);if(!n)return;let a="";if(1==e.charge_type)a=`(${e.charge_value}%)`;else if(3==e.charge_type){const n=this.distance_unit||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.distance_unit)||"Km";a=`(${(null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.currency_symbol)||""}${e.charge_value}/${n})`}o.push({label:this.getOtherChargeBreakdownLabel(e)||e.title||"Addon",amount:n,indent:!0,suffix:a})})}return o.push({label:a.final_fare||"Total",amount:this.computeVehicleTotalAmount(n),isTotal:!0}),o}getSidebarFareBreakdownRows(){return this.getFareBreakdownRows(this.currentSelectedVehicle||this.selectedVehicleObj)}getDetailModalFareBreakdownRows(){return this.getFareBreakdownRows(this.detailModalVehicle)}getFareExcludingTax(){var e;const t=this.currentSelectedVehicle||this.selectedVehicleObj,i=(null===(e=null==t?void 0:t.final_fare)||void 0===e?void 0:e.tax_amount)||this.taxAddition||0;return(this.getCurrentVehicleTotal()-i).toFixed(2)}getEstimatedTax(){var e;const t=this.currentSelectedVehicle||this.selectedVehicleObj,i=(null===(e=null==t?void 0:t.final_fare)||void 0===e?void 0:e.tax_amount)||this.taxAddition||0;return Number(i).toFixed(2)}getVehicleSubtitle(){const e=this.currentSelectedVehicle||this.selectedVehicleObj;return(null==e?void 0:e.description)?e.description:(null==e?void 0:e.title)?e.title+" or similar":""}setBookingRideType(e,t){t&&t.stopPropagation(),this.bookingRideType=e}generateTimeSlots(){const e=[];for(let t=0;t<24;t++)for(let i=0;i<60;i+=10){const n=t%12==0?12:t%12;e.push(`${n<10?"0"+n:""+n}:${i<10?"0"+i:""+i} ${t<12?"AM":"PM"}`)}this.timeSlotsList=e}toggleEditTripBar(e){e&&e.stopPropagation(),this.isEditTripBarOpen=!!this.isEmbeddedInIframe||!this.isEditTripBarOpen,this.isDatePickerOpen=!1,this.isTimePickerOpen=!1,0===this.timeSlotsList.length&&this.generateTimeSlots()}closeEditTripBar(){this.isEmbeddedInIframe||(this.isEditTripBarOpen=!1,this.isDatePickerOpen=!1,this.isTimePickerOpen=!1)}toggleDatePicker(e){e&&e.stopPropagation(),this.isDatePickerOpen=!this.isDatePickerOpen,this.isTimePickerOpen=!1,this.scheduleIframeHeightNotify()}toggleTimePicker(e){e&&e.stopPropagation(),this.isTimePickerOpen=!this.isTimePickerOpen,this.isDatePickerOpen=!1,0===this.timeSlotsList.length&&this.generateTimeSlots(),this.scheduleIframeHeightNotify()}prevMonth(e){e&&e.stopPropagation();const t=new Date(this.currentCalendarDate);t.setMonth(t.getMonth()-1),this.currentCalendarDate=t}nextMonth(e){e&&e.stopPropagation();const t=new Date(this.currentCalendarDate);t.setMonth(t.getMonth()+1),this.currentCalendarDate=t}get calendarMonthYearTitle(){return L(this.currentCalendarDate).format("MMMM YYYY")}get calendarDaysGrid(){const e=this.currentCalendarDate.getFullYear(),t=this.currentCalendarDate.getMonth(),i=new Date(e,t,1).getDay(),n=new Date(e,t+1,0).getDate(),o=[];for(let a=0;a<i;a++)o.push({dayNumber:0,dateObj:null,isCurrentMonth:!1,isSelected:!1});for(let a=1;a<=n;a++){const i=new Date(e,t,a),n=this.selectedBookingDate&&this.selectedBookingDate.getDate()===a&&this.selectedBookingDate.getMonth()===t&&this.selectedBookingDate.getFullYear()===e;o.push({dayNumber:a,dateObj:i,isCurrentMonth:!0,isSelected:n})}return o}selectCalendarDay(e,t){t&&t.stopPropagation(),e&&e.isCurrentMonth&&(this.selectedBookingDate=e.dateObj,this.request_time=e.dateObj,this.addForm&&this.addForm.controls.request_time&&(this.addForm.controls.request_time.setValue(e.dateObj),this.addForm.controls.request_time.updateValueAndValidity()),this.syncTripTimeFromPicker(),this.isDatePickerOpen=!1,this.scheduleIframeHeightNotify())}selectPickupTime(e,t){t&&t.stopPropagation(),this.selectedPickupTimeStr=e,this.syncTripTimeFromPicker(e),this.isTimePickerOpen=!1,this.scheduleIframeHeightNotify()}syncTripTimeFromPicker(e){var t,i;const n=e||this.selectedPickupTimeStr;if(!n)return;const o=n.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);if(!o)return;let a=parseInt(o[1],10);const r=parseInt(o[2],10),l=o[3].toUpperCase();"PM"===l&&a<12&&(a+=12),"AM"===l&&12===a&&(a=0);const s=this.selectedBookingDate||this.request_time||new Date,u=new Date(s);if(u.setHours(a,r,0,0),this.trip_time=u,this.selectedRequestTime=u,(null===(t=this.addForm)||void 0===t?void 0:t.controls.trip_time)&&(this.addForm.controls.trip_time.setValue(u),this.addForm.controls.trip_time.updateValueAndValidity()),null===(i=this.addForm)||void 0===i?void 0:i.controls.request_time){const e=new Date(s);e.setHours(0,0,0,0),this.addForm.controls.request_time.setValue(e),this.addForm.controls.request_time.updateValueAndValidity(),this.request_time=e}}get formattedDateHeader(){const e=this.selectedBookingDate||this.request_time||new Date;try{return L(e).format("ddd, MMM D")}catch(t){return L().format("ddd, MMM D")}}clearField(e){this.addForm&&this.addForm.controls[e]&&(this.addForm.controls[e].setValue(""),this.addForm.controls[e].updateV
1alueAndValidity()),"pickup_location"===e&&(this.pickup_latitude=null,this.pickup_longitude=null,this.searchText="",this.clearRoutePath(),this.bindMarkerPoints(),this.refreshVehicleEstimatesIfReady()),"destination"===e&&(this.destination_latitude=null,this.destination_longitude=null,this.searchTextDestionation="",this.clearRoutePath(),this.bindMarkerPoints(),this.refreshVehicleEstimatesIfReady())}applyEditTrip(){this.syncTripTimeFromPicker(),this.validateEditTripBarFields()&&(this.hasViewedOptions=!0,this.isEditTripBarOpen=!!this.isEmbeddedInIframe,this.isDatePickerOpen=!1,this.isTimePickerOpen=!1,this.submitFirstForm(this.addForm),this.scheduleIframeHeightNotify())}validateEditTripBarFields(e=!0){var t,i,n,o,a,r,l,s,u,d,c,h,g;this.formSubmited=!0,this.formErrors.booking_type_id="",this.formErrors.pickup_location="",this.formErrors.destination="",this.formErrors.request_time="";let p=!0,m="";const _=this.addForm.get("booking_type_id");null==_||_.markAsTouched(),(!this.booking_type_id||!(null==_?void 0:_.value))&&(this.formErrors.booking_type_id=(null===(i=null===(t=this.validationMessages)||void 0===t?void 0:t.booking_type_id)||void 0===i?void 0:i.required)||"Please select booking type",p=!1,m=m||this.formErrors.booking_type_id);const f=this.addForm.get("pickup_location");if(null==f||f.markAsTouched(),(!String((null==f?void 0:f.value)||"").trim()||!this.isValidMapPoint({lat:this.pickup_latitude,lng:this.pickup_longitude}))&&(this.formErrors.pickup_location=(null===(o=null===(n=this.validationMessages)||void 0===n?void 0:n.pickup_location)||void 0===o?void 0:o.required)||"Enter your pickup location",p=!1,m=m||(null===(a=this.currentLanguage)||void 0===a?void 0:a.enter_pickup)||"Please select a valid pickup location"),!this.skip_destination){const e=this.addForm.get("destination");null==e||e.markAsTouched(),(!String((null==e?void 0:e.value)||"").trim()||!this.isValidMapPoint({lat:this.destination_latitude,lng:this.destination_longitude}))&&(this.formErrors.destination=(null===(l=null===(r=this.validationMessages)||void 0===r?void 0:r.destination)||void 0===l?void 0:l.required)||"Please enter destination",p=!1,m=m||(null===(s=this.currentLanguage)||void 0===s?void 0:s.enter_destination)||"Please select a valid drop-off location")}return!(!this.selectedBookingDate&&!(null===(u=this.addForm.get("request_time"))||void 0===u?void 0:u.value))||(this.formErrors.request_time=(null===(c=null===(d=this.validationMessages)||void 0===d?void 0:d.request_time)||void 0===c?void 0:c.required)||"Please select date",p=!1,m=m||"Please select a date"),this.selectedPickupTimeStr||(p=!1,m=m||(null===(h=this.currentLanguage)||void 0===h?void 0:h.please_enter_request_time)||"Please select pickup time"),this.check_time||(p=!1,m=m||(null===(g=this.currentLanguage)||void 0===g?void 0:g.please_enter_request_time)||"Please select a valid pickup time"),!p&&e&&m&&this.toasterService.error(m),p}isTripReadyForOptions(){var e,t;return!(!this.booking_type_id||!this.isValidMapPoint({lat:this.pickup_latitude,lng:this.pickup_longitude})||!this.skip_destination&&!this.isValidMapPoint({lat:this.destination_latitude,lng:this.destination_longitude})||!this.selectedBookingDate&&!(null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("request_time"))||void 0===t?void 0:t.value))&&!!this.selectedPickupTimeStr&&this.check_time}
1openTripSetup(){this.isTripReadyForOptions()?this.applyEditTrip():(this.isEditTripBarOpen=!0,this.isDatePickerOpen=!1,this.isTimePickerOpen=!1,0===this.timeSlotsList.length&&this.generateTimeSlots())}onEditBarBookingTypeChange(e){this.changeBookingType(e),this.onInputChange(this.addForm.controls.booking_type_id)}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e),f.Y36(f.sBO),f.Y36(E.Z),f.Y36(r.qu),f.Y36(U.F),f.Y36(N.d),f.Y36(I._W),f.Y36(j.C),f.Y36(o.gz),f.Y36(R.T),f.Y36(o.F0),f.Y36(z.x),f.Y36(f.SBq))},e.\u0275cmp=f.Xpm({type:e,selectors:[["yelowcab-booking-layout-four"]],viewQuery:function(e,t){if(1&e&&f.Gf(Hl,5),2&e){let e;f.iGM(e=f.CRH())&&(t.gmapElement=e.first)}},hostVars:2,hostBindings:function(e,t){1&e&&f.NdJ("message",function(e){return t.onParentWindowMessage(e)},!1,f.Jf7)("resize",function(){return t.onWindowResize()},!1,f.Jf7),2&e&&f.ekj("layout-four-embedded",t.embeddedHostClass)},inputs:{is_full_screen:"is_full_screen",tabsOnly:"tabsOnly"},decls:9,vars:10,consts:[[1,"luxury-experience-page",3,"formGroup"],[1,"luxury-navbar"],["class","container-fluid px-4 d-flex align-items-center justify-content-between position-relative",4,"ngIf"],["class","edit-trip-overlay-container",4,"ngIf"],["class","luxury-main-content container-fluid px-4 py-4",4,"ngIf"],["class","modal fade show d-block luxury-modal-backdrop","tabindex","-1",3,"click",4,"ngIf"],["class","user-confirm-modal-backdrop",4,"ngIf"],["class","luxury-overlay-screen",4,"ngIf"],[1,"container-fluid","px-4","d-flex","align-items-center","justify-content-between","position-relative"],[1,"navbar-brand-wrap"],["alt","Blacklane","onerror","this.src='assets/img/logo.svg'",1,"brand-logo-img",3,"src"],["role","button","tabindex","0",1,"trip-summary-pill-group","d-none","d-lg-flex","align-items-center",3,"click"],[1,"pill-segment","route-segment"],[1,"route-loc","text-truncate"],[1,"route-arrow"],[1,"pill-divider"],[1,"pill-segment","time-segment"],[1,"date-text"],["class","flight-tag",4,"ngIf"],[1,"time-text"],[1,"navbar-right-controls","d-flex","align-items-center","gap-3"],["class","lang-selector-wrap",4,"ngIf"],["type","button","aria-label","Menu",1,"btn-hamburger-menu"],[1,"menu-bar"],[1,"flight-tag"],[1,"fa","fa-plane","me-1"],[1,"lang-selector-wrap"],["bindLabel","language_code","bindValue","language_code",1,"header-lang-select",3,"items","clearable","ngModel","ngModelOptions","searchable","ngModelChange","change"],[1,"edit-trip-overlay-container"],[1,"edit-trip-top-bar",3,"click"],[1,"edit-trip-bar-inner"],["class","edit-field-cell edit-booking-type-cell",4,"ngIf"],["class","edit-field-divider",4,"ngIf"],[1,"edit-field-cell","edit-location-cell"],[1,"edit-field-label"],[1,"edit-input-wrap","edit-search-wrap"],[1,"location-search","edit-location-search",3,"placeholder","isBooing","responseData","searchText","is_disable","appendTo","dropdownPosition","search","searchEvent","dropdownOpenChange"],["type","button","class","btn-clear-field",3,"click",4,"ngIf"],["class","edit-field-error",3,"innerHTML",4,"ngIf"],["class","edit-field-error",4,"ngIf"],[1,"location-search","edit-location-search",3,"is_disable","placeholder","responseData","isBooing","searchText","appendTo","dropdownPosition","search","searchEvent","dropdownOpenChange"],[1,"edit-field-divider"],[1,"edit-field-cell","edit-select-cell","position-relative",3,"click"],[1,"edit-input-wrap","d-flex","align-items-center","justify-content-between"],[1,"edit-select-val"],["width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","#6b7280","stroke-width","2.5"],["points","6 9 12 15 18 9"],["class","custom-datepicker-dropdown-card shadow-lg",3,"click",4,"ngIf"],[1,"edit-field-cell"],[1,"edit-input-wrap"],["type","text","placeholder","e.g. LH202, BA249",1,"edit-clean-input",3,"formControl"],["class","custom-timepicker-dropdown-card shadow-lg",3,"click",4,"ngIf"],[1,"edit-action-cell"],["type","button",1,"btn-view-options-pill",3,"click"],["class","edit-trip-frosted-backdrop",3,"click",4,"ngIf"],[1,"edit-field-cell","edit-booking-type-cell"],[1,"edit-input-wrap","edit-booking-type-wrap",3,"click"],["bindLabel","title","bindValue","id",1,"edit-booking-type-select",3,"placeholder","items","clearable","formControl","searchable","change"],[1,"edit-field-error",3,"innerHTML"],[1,"edit-select-val","text-truncate"],["type","button",1,"btn-clear-field",3,"click"],[1,"edit-field-error"],[1,"custom-datepicker-dropdown-card","shadow-lg",3,"click"],[1,"dp-header-row"],["type","button",1,"dp-nav-arrow",3,"click"],["width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2"],["points","15 18 9 12 15 6"],[1,"dp-month-title"],["points","9 18 15 12 9 6"],[1,"dp-weekdays-row"],[1,"dp-days-grid"],["class","dp-day-cell",3,"is-empty","is-selected","click",4,"ngFor","ngForOf"],[1,"dp-day-cell",3,"click"],["class","day-number",4,"ngIf"],[1,"day-number"],[1,"custom-timepicker-dropdown-card","shadow-lg",3,"click"],[1,"time-slots-scroll-list"],["class","time-slot-item",3,"is-selected","click",4,"ngFor","ngForOf"],[1,"time-slot-item",3,"click"],[1,"edit-trip-frosted-backdrop",3,"click"],[1,"frosted-backdrop-content",3,"click"],[1,"calendar-badge-icon"],[1,"cal
1-top-hooks"],[1,"cal-hook"],[1,"cal-body"],[1,"cal-number"],[1,"frosted-message-title"],[1,"luxury-main-content","container-fluid","px-4","py-4"],["class","luxury-loader",4,"ngIf"],["class","alert alert-warning d-flex align-items-center mb-4 rounded-3",4,"ngIf"],["class","experience-setup-prompt",4,"ngIf"],["class","experience-layout-grid",4,"ngIf"],[1,"luxury-loader"],["role","status",1,"spinner-border","text-primary"],[1,"visually-hidden"],[1,"alert","alert-warning","d-flex","align-items-center","mb-4","rounded-3"],[1,"fa","fa-exclamation-triangle","me-2"],[1,"experience-setup-prompt"],[1,"experience-setup-card"],[1,"experience-setup-title"],[1,"experience-setup-text"],[1,"experience-layout-grid"],["class","experience-left-col",4,"ngIf"],["class","checkout-left-col",4,"ngIf"],[1,"experience-right-col"],[1,"sidebar-sticky-box"],[1,"sidebar-card","map-preview-card"],[1,"map-container"],["id","gmap-layout-four-map",1,"map-live-container"],["gmap",""],["class","sidebar-card booking-summary-card",4,"ngIf"],["class","sidebar-card checkout-summary-card",4,"ngIf"],[1,"experience-left-col"],[1,"page-title"],["class","experience-empty-state",4,"ngIf"],["class","experience-cards-row",4,"ngIf"],[1,"experience-empty-state"],[1,"experience-cards-row"],["class","experience-card-wrap",4,"ngFor","ngForOf"],[1,"experience-card-wrap"],[1,"experience-card",3,"click"],[1,"card-image-box"],[1,"car-artwork-img",3,"src","alt"],[1,"card-info-box"],[1,"card-title-price-row"],[1,"vehicle-name"],[1,"vehicle-price"],["class","price-from",4,"ngIf"],[4,"ngIf"],[1,"card-capacity-row"],[1,"capacity-item"],["width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.8"],["d","M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"],["cx","9","cy","7","r","4"],["d","M23 21v-2a4 4 0 0 0-3-3.87"],["d","M16 3.13a4 4 0 0 1 0 7.75"],[1,"capacity-count"],["x","2","y","7","width","20","height","14","rx","2","ry","2"],["d","M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"],[1,"card-action-row"],["href","javascript:;",1,"view-details-link",3,"click"],[1,"price-from"],[1,"checkout-left-col"],[1,"checkout-header-row"],["type","button","aria-label","Go back",1,"btn-checkout-back",3,"click"],["width","20","height","20","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2"],["x1","19","y1","12","x2","5","y2","12"],["points","12 19 5 12 12 5"],[1,"checkout-page-title"],[1,"checkout-card","payment-preferences-card"],[1,"card-section-title"],["class","payment-mode-stack",4,"ngIf"],["class","payment-gateway-wrap",4,"ngIf"],[1,"payment-mode-stack"],["type","button","class","payment-mode-pill",3,"is-active","click",4,"ngFor","ngForOf"],["type","button",1,"payment-mode-pill",3,"click"],[1,"payment-gateway-wrap"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking"],[1,"sidebar-card","booking-summary-card"],[1,"summary-header"],[1,"summary-title-price-row"],[1,"selected-class-name"],["class","selected-class-price",4,"ngIf"],["class","selected-class-sub",4,"ngIf"],[1,"guest-details-form"],[1,"row","g-2"],[1,"col-6"],[1,"guest-field-wrap"],["type","text","placeholder","First Name *",1,"form-control","form-control-sm",3,"formControl","input","blur"],["class","guest-field-error",3,"innerHTML",4,"ngIf"],["type","text","placeholder","Last Name *",1,"form-control","form-control-sm",3,"formControl","input","blur"],[1,"col-12"],["type","email",1,"form-control","form-control-sm",3,"placeholder","formControl","input","blur","change"],[1,"guest-phone-row"],["bindLabel","code_name","bindValue","code","appendTo","body",1,"guest-dial-select",3,"items","clearable","searchable","notFoundText","formControl","change"],["ng-label-tmp",""],["ng-option-tmp",""],["type","tel",1,"form-control","form-control-sm","guest-phone-input",3,"placeholder","formControl","input","blur","change"],["class","payment-mode-sidebar",4,"ngIf"],["class","sidebar-fare-breakdown",4,"ngIf"],[1,"offer-row"],[1,"all-fees-tag"],[1,"cta-action-wrap"],["type","button",1,"btn-select-experience",3,"disabled","click"],[1,"selected-class-price"],[1,"selected-class-sub"],[1,"guest-field-error",3,"innerHTML"],[1,"payment-mode-sidebar"],[1,"payment-mode-label"],[1,"payment-mode-pills-row"],[1,"sidebar-fare-breakdown"],["type","button",1,"fare-breakdown-toggle",3,"click"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5"],["class","fare-breakdown-panel",4,"ngIf"],[1,"fare-breakdown-panel"],["class","fare-breakdown-note",4,"ngIf"],[1,"price-breakdown-table","sidebar-breakdown-table"],["class","breakdown-row",3,"breakdown-indent","breakdown-total-row","breakdown-bold-row",4,"ngFor","ngForOf"],[1,"fare-breakdown-note"],[1,"breakdown-row"],[1,"breakdown-label"],[1,"breakdown-dots"],[1,"breakdown-amount"],[1,"sidebar-card","checkout-summary-card"],[1,"summary-vehicle-header"],[1,"checkout-class-title"],[1,"checkout-class-subtitle"],[1,"checkout-price-table"],[1,"checkout-breakdown-header"],["class","checkout-price-row",3,"indent-row","total-row","bold-row",4,"ngFor","ngForOf"],[1,"checkout-offer-row"],["href","javascript:;",1,"terms-conditions-link"],[1,"checkout-price-row"],["tabindex","-1",1,"modal","fade","show","d-block","luxury-modal-backdrop",3,"click"],[1,"modal-dialog","modal
1-dialog-centered","modal-lg","modal-details-custom-dialog",3,"click"],[1,"modal-content","luxury-modal-content"],[1,"modal-header","luxury-modal-header"],[1,"modal-title","luxury-modal-title"],["type","button","aria-label","Close",1,"btn-modal-close-round",3,"click"],[1,"fa","fa-times","text-danger"],[1,"modal-body","luxury-modal-body","luxury-modal-body-simple"],[1,"detail-modal-tabs-nav"],["type","button",1,"detail-modal-tab",3,"click"],["class","detail-modal-tab-panel",4,"ngIf"],["class","detail-modal-tab-panel",3,"formGroup",4,"ngIf"],[1,"modal-section-title","detail-price-title"],[1,"price-breakdown-table"],[1,"modal-footer","luxury-modal-footer"],["type","button",1,"btn-modal-select-pill",3,"click"],[1,"detail-modal-tab-panel"],["class","modal-empty-hint",4,"ngIf"],[4,"ngFor","ngForOf"],["class","modal-charge-item",4,"ngIf"],["class","modal-seat-counter",4,"ngIf"],[1,"modal-charge-item"],["type","checkbox",3,"checked","change"],[1,"modal-seat-counter"],[4,"ngIf","ngIfElse"],["dynamicQty",""],["type","button",3,"click"],["type","button",3,"disabled","click"],[1,"modal-empty-hint"],[1,"detail-modal-tab-panel",3,"formGroup"],["formArrayName","properties"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"modal-extra-field"],[1,"modal-extra-label"],["class","text-danger",4,"ngIf"],[1,"text-danger"],["type","text","formControlName","value",1,"form-control",3,"placeholder"],["formControlName","value",1,"form-control","p-0",3,"config","onChange"],["bindLabel","label","bindValue","value","formControlName","value",3,"items","multiple","notFoundText"],["bindLabel","label","bindValue","value","formControlName","value",3,"items","notFoundText"],[1,"user-confirm-modal-backdrop"],[1,"user-confirm-modal"],[1,"mb-3"],[1,"text-muted","mb-3"],["class","masked-user-details mb-4",4,"ngIf"],[1,"d-flex","gap-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary","guest-confirm-ok-btn",3,"click"],[1,"masked-user-details","mb-4"],[1,"mb-1"],[1,"mb-0"],[1,"unique-field-options","mb-4"],[1,"unique-field-option","d-flex","align-items-start","gap-2","mb-2"],["type","radio","name","guestUniqueFieldAction","value","update",3,"ngModel","ngModelOptions","ngModelChange"],[1,"unique-field-option","d-flex","align-items-start","gap-2","mb-0"],["type","radio","name","guestUniqueFieldAction","value","new",3,"ngModel","ngModelOptions","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["type","button",1,"btn","btn-primary","guest-confirm-ok-btn",3,"disabled","click"],["class","spinner-border spinner-border-sm text-light me-2",4,"ngIf"],[1,"spinner-border","spinner-border-sm","text-light","me-2"],[1,"luxury-overlay-screen"],[1,"luxury-overlay-card","text-center"],[1,"fa","fa-check-circle-o","fa-4x","text-success","mb-3"],[1,"luxury-overlay-title"],[1,"luxury-overlay-sub"],["type","button",1,"btn-select-experience","mt-3",3,"click"]],template:function(e,t){1&e&&(f.TgZ(0,"div",0),f.TgZ(1,"header",1),f.YNc(2,Xl,26,11,"div",2),f.YNc(3,_s,50,33,"div",3),f.qZA(),f.YNc(4,Xs,5,4,"main",4),f.YNc(5,Zu,23,12,"div",5),f.YNc(6,Fu,12,2,"div",6),f.YNc(7,Au,21,12,"div",6),f.YNc(8,Pu,9,4,"div",7),f.qZA()),2&e&&(f.Q6J("formGroup",t.addForm),f.xp6(1),f.ekj("navbar-embed-only",t.isEmbeddedInIframe),f.xp6(1),f.Q6J("ngIf",!t.isEmbeddedInIframe),f.xp6(1),f.Q6J("ngIf",t.isEditTripBarOpen),f.xp6(1),f.Q6J("ngIf",!t.isEmbeddedInIframe||t.hasViewedOptions||t.displayThankYouForm||t.displayLoginForm||t.loadingState||t.isBookingHold),f.xp6(1),f.Q6J("ngIf",t.isDetailModalOpen),f.xp6(1),f.Q6J("ngIf",t.showGuestConfirmModal),f.xp6(1),f.Q6J("ngIf",t.showGuestUniqueFieldModal),f.xp6(1),f.Q6J("ngIf",t.displayThankYouForm))},directives:[r.JL,r.sg,n.O5,u.w9,r.JJ,r.On,J.n,r.Fj,r.oH,n.sg,qe.X,u.bb,u.Z2,r.CE,r.x0,r.u,d.DJ,r._],pipes:[n.uU,De.SC,Oe.D],styles:['@import"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap";[_nghost-%COMP%]{display:block;font-family:"Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
1color:#1a1a1a;background-color:#faf9f5;min-height:100vh}.luxury-experience-page[_ngcontent-%COMP%]{min-height:100vh;background-color:#faf9f5}.luxury-navbar[_ngcontent-%COMP%]{background:#ffffff;border-bottom:1px solid #eae8e3;padding:12px 0;position:sticky;top:0;z-index:100}.brand-logo-img[_ngcontent-%COMP%]{height:32px;max-width:140px;-o-object-fit:contain;object-fit:contain}.trip-summary-pill-group[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #e0dfdc;border-radius:100px;padding:8px 24px;grid-gap:16px;gap:16px;box-shadow:0 1px 3px #00000008}.pill-segment[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;font-size:13px;color:#1a1a1a;font-weight:500}.route-loc[_ngcontent-%COMP%]{max-width:160px}.route-arrow[_ngcontent-%COMP%]{color:#9ca3af}.pill-divider[_ngcontent-%COMP%]{width:1px;height:16px;background:#e0dfdc}.time-segment[_ngcontent-%COMP%] .date-text[_ngcontent-%COMP%], .time-segment[_ngcontent-%COMP%] .time-text[_ngcontent-%COMP%]{font-weight:600;color:#1a1a1a}.flight-tag[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}.btn-hamburger-menu[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:50%;border:1px solid #e0dfdc;background:#ffffff;display:flex;flex-direction:column;align-items:center;justify-content:center;grid-gap:4px;gap:4px;cursor:pointer;transition:all .2s ease}.btn-hamburger-menu[_ngcontent-%COMP%]:hover{background:#f4f4f2}.menu-bar[_ngcontent-%COMP%]{width:18px;height:2px;background:#1f2937;border-radius:2px}.experience-setup-prompt[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-height:360px;padding:32px 16px}.experience-setup-card[_ngcontent-%COMP%]{max-width:480px;text-align:center;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:40px 32px;box-shadow:0 8px 24px #0000000f}.experience-setup-title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#111827;margin-bottom:12px}.experience-setup-text[_ngcontent-%COMP%]{font-size:15px;color:#6b7280;margin-bottom:24px;line-height:1.5}.luxury-main-content[_ngcontent-%COMP%]{max-width:1440px;margin:0 auto}.experience-layout-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 390px;grid-gap:32px;gap:32px;align-items:start}.page-title[_ngcontent-%COMP%]{font-family:"Playfair Display",Georgia,serif;font-size:32px;font-weight:600;color:#1a1a1a;margin-bottom:24px;letter-spacing:-.01em}.experience-cards-row[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;grid-gap:20px;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px;-webkit-overflow-scrolling:touch}.experience-cards-row[_ngcontent-%COMP%]::-webkit-scrollbar{height:6px}.experience-cards-row[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:4px}.experience-card-wrap[_ngcontent-%COMP%]{flex:0 0 300px;max-width:320px;scroll-snap-align:start}.experience-empty-state[_ngcontent-%COMP%]{padding:48px 24px;text-align:center;color:#6b7280;background:#f9fafb;border-radius:16px;margin-bottom:24px}.experience-card[_ngcontent-%COMP%]{background:#ffffff;border:2.5px solid transparent;border-radius:22px;padding:14px;box-shadow:0 4px 18px #0000000a;transition:all .25s cubic-bezier(.16,1,.3,1);cursor:pointer;display:flex;flex-direction:column;height:100%}.experience-card[_ngcontent-%COMP%]:hover{transform:translateY(-4px);box-shadow:0 10px 28px #00000014}.experience-card.is-selected[_ngcontent-%COMP%]{border-color:#0066f5!important;box-shadow:0 6px 26px #0066f529!important}.card-image-box[_ngcontent-%COMP%]{height:390px;border-radius:16px;overflow:hidden;margin-bottom:16px;background:#f4f3ef;position:relative}.car-artwork-img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block;border-radius:16px;transition:transform .3s ease}.experience-card[_ngcontent-%COMP%]:hover .car-artwork-img[_ngcontent-%COMP%]{transform:scale(1.02)}.card-info-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;justify-content:space-between}.card-title-price-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;grid-gap:8px;gap:8px;margin-bottom:8px}
1.vehicle-name[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1a1a1a;margin:0;letter-spacing:-.01em}.vehicle-price[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1a1a1a;white-space:nowrap}.price-from[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;font-weight:400;margin-right:2px}.card-capacity-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:16px;gap:16px;margin-bottom:12px;font-size:13px;color:#4b5563}.capacity-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px}.capacity-count[_ngcontent-%COMP%]{font-weight:600;color:#1a1a1a;font-size:14px}.card-action-row[_ngcontent-%COMP%]{margin-top:4px}.view-details-link[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#0066f5;text-decoration:none;display:inline-block;transition:color .15s}.view-details-link[_ngcontent-%COMP%]:hover{text-decoration:underline!important;color:#0052cc}.experience-right-col[_ngcontent-%COMP%]{position:sticky;top:80px}.sidebar-sticky-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:18px;gap:18px}.sidebar-card[_ngcontent-%COMP%]{background:#ffffff;border-radius:20px;border:1px solid #eae8e3;box-shadow:0 4px 18px #0000000a}.map-preview-card[_ngcontent-%COMP%]{overflow:visible}.map-container[_ngcontent-%COMP%]{height:280px;position:relative;overflow:visible;background:#eae9e5}.map-bg-image[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;background-size:cover;background-position:center 25%;opacity:.95}.route-line-svg[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}.map-badge-group[_ngcontent-%COMP%]{position:absolute;z-index:5;display:flex;flex-direction:column}.badge-dropoff-pos[_ngcontent-%COMP%]{top:14px;left:14px;align-items:flex-start}.badge-pickup-pos[_ngcontent-%COMP%]{bottom:24px;right:14px;align-items:flex-end}.map-floating-box[_ngcontent-%COMP%]{display:flex;align-items:stretch;background:#ffffff;border-radius:8px;overflow:hidden;box-shadow:0 4px 14px #00000026;border:1px solid rgba(0,0,0,.06)}.badge-content-side[_ngcontent-%COMP%]{padding:6px 12px;display:flex;flex-direction:column;justify-content:center;background:#ffffff;max-width:135px}.badge-label-tag[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827;line-height:1.2}.badge-name-tag[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;font-weight:500;margin-top:1px;max-width:130px}.badge-time-box[_ngcontent-%COMP%]{padding:4px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:42px;line-height:1.1}.time-box-dark[_ngcontent-%COMP%]{background:#0f172a;color:#fff}.time-box-blue[_ngcontent-%COMP%]{background:#0066f5;color:#fff}.t-val[_ngcontent-%COMP%]{font-size:13px;font-weight:700}.t-ampm[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:lowercase;opacity:.9}.map-circle-marker[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.marker-ring[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%;background:#ffffff;border:3.5px solid #0066f5;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px #0000004d}.marker-dot[_ngcontent-%COMP%]{width:5px;height:5px;border-radius:50%;background:#0066f5}.marker-dropoff[_ngcontent-%COMP%]{margin-top:5px;margin-left:26px}.marker-pickup[_ngcontent-%COMP%]{margin-bottom:5px;margin-right:32px}.google-watermark-row[_ngcontent-%COMP%]{position:absolute;bottom:4px;left:10px;right:10px;display:flex;align-items:baseline;justify-content:space-between;pointer-events:none;z-index:3}.google-logo-text[_ngcontent-%COMP%]{font-family:Roboto,Arial,sans-serif;font-size:13px;font-weight:700;color:#4b5563;letter-spacing:-.5px;opacity:.85}.map-copyright-text[_ngcontent-%COMP%]{font-size:9px;color:#4b5563;opacity:.85}.booking-summary-card[_ngcontent-%COMP%]{padding:24px;display:flex;flex-direction:column;grid-gap:18px;gap:18px}.summary-header[_ngcontent-%COMP%]{padding-bottom:14px;border-bottom:1px solid #f0eee9}.summary-title-price-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;grid-gap:12px;gap:12px}
1.selected-class-name[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#111827;margin:0}.selected-class-price[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#111827}.selected-class-sub[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;margin:4px 0 0}.passenger-selector-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:10px;gap:10px}.passenger-card-option[_ngcontent-%COMP%]{border:1.5px solid #e5e7eb;border-radius:14px;padding:12px 14px;display:flex;align-items:center;grid-gap:12px;gap:12px;cursor:pointer;transition:all .2s ease;background:#ffffff}.passenger-card-option[_ngcontent-%COMP%]:hover{border-color:#d1d5db}.passenger-card-option.is-active[_ngcontent-%COMP%]{border-color:#0066f5!important;border-width:2px!important;background:#ffffff}.option-avatar[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.avatar-blue[_ngcontent-%COMP%]{background:#5c9df5;color:#fff}.avatar-gray[_ngcontent-%COMP%]{background:#f3f4f6;color:#6b7280}.option-text-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1}.option-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:#111827}.option-subtitle[_ngcontent-%COMP%]{font-size:12px;color:#6b7280}.chevron-icon[_ngcontent-%COMP%]{font-size:12px;color:#9ca3af;transition:transform .2s ease}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.guest-details-form[_ngcontent-%COMP%]{margin-top:12px}.guest-field-wrap[_ngcontent-%COMP%]{margin-bottom:2px}.guest-field-wrap.has-error[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%], .guest-field-wrap.has-error[_ngcontent-%COMP%] .guest-dial-select.ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{border-color:#dc2626}.guest-field-error[_ngcontent-%COMP%]{display:block;font-size:11px;color:#dc2626;margin-top:4px;line-height:1.3}.guest-phone-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.guest-dial-select[_ngcontent-%COMP%]{flex:0 0 108px;min-width:108px}.guest-dial-select.ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{min-height:31px;height:31px;font-size:13px;border-radius:6px}.guest-phone-input[_ngcontent-%COMP%]{flex:1;min-width:0}.guest-inputs-dropdown[_ngcontent-%COMP%]{background:#faf9f7;border:1px solid #e5e7eb;border-radius:10px;padding:12px;margin-top:4px}.offer-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font-size:13px;padding-top:2px}.btn-apply-offer[_ngcontent-%COMP%]{background:#f4f4f2;border:none;border-radius:100px;padding:8px 16px;font-size:13px;font-weight:600;color:#374151;cursor:pointer;display:inline-flex;align-items:center;transition:background .15s}.btn-apply-offer[_ngcontent-%COMP%]:hover{background:#e5e5e2}.all-fees-tag[_ngcontent-%COMP%]{font-size:12px;color:#6b7280}.btn-select-experience[_ngcontent-%COMP%]{background:#0066f5;color:#fff;border:none;width:100%;height:52px;border-radius:100px;font-size:16px;font-weight:700;cursor:pointer;transition:all .2s ease;box-shadow:0 4px 16px #0066f540}.btn-select-experience[_ngcontent-%COMP%]:hover:not(:disabled){background:#0052cc;transform:translateY(-1px);box-shadow:0 6px 20px #0066f559}.btn-select-experience[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.luxury-modal-backdrop[_ngcontent-%COMP%]{background:rgba(17,24,39,.65);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:2050}.modal-details-custom-dialog[_ngcontent-%COMP%]{width:100%;margin:1.75rem auto}.luxury-modal-content[_ngcontent-%COMP%]{border-radius:24px;border:none;box-shadow:0 24px 64px #0003;overflow:hidden;background:#ffffff}.luxury-modal-header[_ngcontent-%COMP%]{padding:24px 28px 12px;border-bottom:none;display:flex;align-items:center;justify-content:space-between}.luxury-modal-title[_ngcontent-%COMP%]{font-family:"Playfair Display",Georgia,serif;font-size:28px;font-weight:500;color:#1a1a1a;margin:0}.btn-modal-close-round[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;background:#f3f4f6;border:none;color:#4b5563;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px;transition:all .15s}
1.btn-modal-close-round[_ngcontent-%COMP%]:hover{background:#e5e7eb;color:#111827}.luxury-modal-body[_ngcontent-%COMP%]{padding:16px 28px 20px;max-height:74vh;overflow-y:auto;display:flex;flex-direction:column;grid-gap:32px;gap:32px}.modal-carousel-box[_ngcontent-%COMP%]{height:310px;border-radius:16px;position:relative;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#99c2db 0%,#cbe1ed 40%,#eef5f9 70%,#ffffff 100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.carousel-slide-item[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.carousel-slide-item.slide-exterior[_ngcontent-%COMP%]{background:linear-gradient(180deg,#99c2db 0%,#cbe1ed 40%,#eef5f9 70%,#ffffff 100%);padding-bottom:50px}.carousel-car-img[_ngcontent-%COMP%]{display:block}.carousel-car-img.img-cover[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.carousel-car-img.img-contain[_ngcontent-%COMP%]{max-width:90%;max-height:220px;-o-object-fit:contain;object-fit:contain;filter:drop-shadow(0 12px 20px rgba(0,0,0,.18))}.carousel-caption-overlay[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;background:rgba(120,120,120,.68);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:12px 20px;color:#fff;display:flex;flex-direction:column;grid-gap:6px;gap:6px;border-radius:0 0 16px 16px;z-index:10}.carousel-caption-text[_ngcontent-%COMP%]{font-size:14px;margin:0;font-weight:500;color:#fff;line-height:1.3}.carousel-dots-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;margin-top:2px}.carousel-dot-pill[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:all .2s;display:inline-block}.carousel-dot-pill.active[_ngcontent-%COMP%]{background:#0066f5;box-shadow:0 0 0 1px #ffffffe6}.carousel-nav-arrow[_ngcontent-%COMP%]{position:absolute;top:45%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.88);border:none;color:#1a1a1a;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px #0003;transition:all .2s ease;z-index:30;padding:0}.carousel-nav-arrow[_ngcontent-%COMP%]:hover{background:#ffffff;transform:translateY(-50%) scale(1.1);box-shadow:0 4px 12px #00000040}.arrow-prev[_ngcontent-%COMP%]{left:14px}.arrow-next[_ngcontent-%COMP%]{right:14px}.modal-lead-text[_ngcontent-%COMP%]{font-size:18px;line-height:1.5;color:#4b5563;font-weight:600;margin:0;text-align:center;padding:4px 16px}.modal-section-box[_ngcontent-%COMP%]{display:flex;flex-direction:column}.modal-section-title[_ngcontent-%COMP%]{font-family:"Playfair Display",Georgia,serif;font-size:22px;font-weight:600;color:#1a1a1a;margin-bottom:20px}.amenities-grid-3[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:24px 16px;gap:24px 16px}.amenity-grid-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:8px;gap:8px}.amenity-icon[_ngcontent-%COMP%]{color:#0066f5}.amenity-cell-text[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:#374151;line-height:1.35}.capacity-tabs-nav[_ngcontent-%COMP%]{display:flex;grid-gap:24px;gap:24px;border-bottom:1px solid #eae8e3;margin-bottom:14px}.capacity-nav-tab[_ngcontent-%COMP%]{background:transparent;border:none;font-size:15px;font-weight:500;color:#6b7280;padding:8px 2px;cursor:pointer;position:relative}.capacity-nav-tab.active[_ngcontent-%COMP%]{color:#1a1a1a;font-weight:600}.capacity-nav-tab.active[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#0066f5}.capacity-disclaimer[_ngcontent-%COMP%]{font-size:13px;color:#4b5563;line-height:1.45;margin-bottom:16px}.capacity-pill-bar[_ngcontent-%COMP%]{display:flex;background:#f3f4f6;border-radius:100px;padding:4px 6px;grid-gap:6px;gap:6px;margin-bottom:18px;align-items:center}.capacity-pill-btn[_ngcontent-%COMP%]{flex:1;border:1px solid transparent;background:transparent;border-radius:100px;padding:7px 14px;font-size:13px;font-weight:600;color:#374151;cursor:pointer;transition:all .2s;white-space:nowrap;text-align:center}.capacity-pill-btn.is-selected[_ngcontent-%COMP%]{background:#0066f5;color:#fff;box-shadow:0 2px 6px #0066f540}.capacity-image-container[_ngcontent-%COMP%]{border-radius:16px;overflow:hidden;height:280px;background:#f4f3ef}.capacity-display-img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.price-breakdown-table[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:14px;gap:14px;margin-bottom:24px}.breakdown-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;font-size:14px;color:#374151}.breakdown-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.breakdown-dots[_ngcontent-%COMP%]{flex:1;border-bottom:1px dashed #d1d5db;margin:0 10px}
1.breakdown-amount[_ngcontent-%COMP%]{font-weight:600;color:#1a1a1a;white-space:nowrap}.please-note-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:10px;gap:10px;margin-top:12px}.please-note-title[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#1a1a1a;margin-bottom:4px}.note-item[_ngcontent-%COMP%]{display:flex;grid-gap:8px;gap:8px;font-size:12px;color:#6b7280;line-height:1.45}.note-icon[_ngcontent-%COMP%]{color:#9ca3af;font-size:13px;margin-top:2px;flex-shrink:0}.note-text[_ngcontent-%COMP%]{margin:0}.luxury-modal-footer[_ngcontent-%COMP%]{padding:16px 28px 24px;border-top:none;background:#ffffff;display:flex;justify-content:center}.btn-modal-select-pill[_ngcontent-%COMP%]{background:#0066f5;color:#fff;border:none;width:240px;height:48px;border-radius:100px;font-size:15px;font-weight:700;cursor:pointer;transition:all .2s;box-shadow:0 4px 16px #0066f540}.btn-modal-select-pill[_ngcontent-%COMP%]:hover{background:#0052cc;transform:translateY(-1px)}.luxury-loader[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(255,255,255,.75);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:2000;display:flex;align-items:center;justify-content:center}.checkout-left-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:20px;gap:20px}.checkout-header-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:16px;gap:16px;margin-bottom:8px}.btn-checkout-back[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:#ffffff;border:1px solid #e5e7eb;color:#111827;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 6px #0000000a;transition:all .2s ease;padding:0}.btn-checkout-back[_ngcontent-%COMP%]:hover{background:#f3f4f6;border-color:#d1d5db;transform:translate(-2px)}.checkout-page-title[_ngcontent-%COMP%]{font-family:"Playfair Display",Georgia,serif;font-size:28px;font-weight:600;color:#111827;margin:0}.checkout-card[_ngcontent-%COMP%]{background:#ffffff;border-radius:20px;padding:32px 36px;box-shadow:0 4px 20px #0000000a;border:1px solid #f0eee9}.card-section-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#111827;margin:0 0 28px}.payment-form-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:22px;gap:22px}.blacklane-form-group[_ngcontent-%COMP%]{position:relative;width:100%}.blacklane-clean-input[_ngcontent-%COMP%]{width:100%;border:none;border-bottom:1.5px solid #d1d5db;padding:10px 0;font-size:15px;color:#111827;background:transparent;outline:none;transition:border-color .2s ease;border-radius:0}.blacklane-clean-input[_ngcontent-%COMP%]:focus{border-bottom-color:#0066f5}.blacklane-clean-input[_ngcontent-%COMP%]::-moz-placeholder{color:#9ca3af;font-size:14.5px}.blacklane-clean-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af;font-size:14.5px}.input-with-icon[_ngcontent-%COMP%]{position:relative}.input-with-icon[_ngcontent-%COMP%] .blacklane-clean-input[_ngcontent-%COMP%]{padding-right:36px}.field-right-icon[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;pointer-events:none}.form-row-two-col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:24px;gap:24px}.add-card-btn-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:4px}.btn-add-card-blue[_ngcontent-%COMP%]{background:#0066f5;color:#fff;border:none;border-radius:100px;padding:9px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 8px #0066f540}.btn-add-card-blue[_ngcontent-%COMP%]:hover{background:#0052cc;transform:translateY(-1px);box-shadow:0 4px 12px #0066f559}.billing-toggle-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:14px;gap:14px;margin:10px 0 6px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.custom-switch-label[_ngcontent-%COMP%]{position:relative;display:inline-block;width:44px;height:24px;margin:0;cursor:pointer}.custom-switch-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch-slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#d1d5db;transition:.3s;border-radius:24px}.switch-slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;transition:.3s;border-radius:50%;box-shadow:0 1px 3px #0003}.custom-switch-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .switch-slider[_ngcontent-%COMP%]{background-color:#0066f5}.custom-switch-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .switch-slider[_ngcontent-%COMP%]:before{transform:translate(20px)}.billing-toggle-text[_ngcontent-%COMP%]{font-size:15px;font-weight:500;color:#1f2937}.billing-expanded-fields[_ngcontent-%COMP%]{background:#f9fafb;border-radius:12px;padding:18px;display:flex;flex-direction:column;grid-gap:16px;gap:16px;border:1px solid #e5e7eb}.reference-field-wrap[_ngcontent-%COMP%]{margin-top:10px;display:flex;flex-direction:column;grid-gap:4px;gap:4px}.reference-input-label[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:#374151;margin:0}.reference-helper-text[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;margin-top:4px}.security-badges-stack[_ngcontent-%COMP%]{margin-top:24px;padding-top:20px;border-top:1px solid #f3f4f6;display:flex;flex-direction:column;grid-gap:12px;gap:12px}.sec-badge-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;grid-gap:10px;gap:10px}.sec-badge-icon[_ngcontent-%COMP%]{flex-shrink:0;margin-top:2px}.sec-badge-text[_ngcontent-%COMP%]{font-size:13px;color:#4b5563;line-height:1.4}.checkout-summary-card[_ngcontent-%COMP%]{padding:24px;display:flex;flex-direction:column;grid-gap:18px;gap:18px;background:#ffffff;border-radius:20px;border:1px solid #f0eee9;box-shadow:0 4px 20px #0000000a}.summary-vehicle-header[_ngcontent-%COMP%]{padding-bottom:14px;border-bottom:1px solid #f0eee9}.checkout-class-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#111827;margin:0}.checkout-class-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;margin:4px 0 0}.checkout-price-table[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:10px;gap:10px}.checkout-breakdown-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font-size:15px;font-weight:700;color:#111827;margin-bottom:4px}.fare-breakdown-note[_ngcontent-%COMP%]{margin:0 0 6px;font-size:12px;color:#6b7280;line-height:1.4}.checkout-price-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:12px;gap:12px;font-size:14px;color:#374151}.checkout-price-row.indent-row[_ngcontent-%COMP%]{padding-left:14px;font-size:13px;color:#6b7280}.checkout-price-row.total-row[_ngcontent-%COMP%]{margin-top:8px;padding-top:12px;border-top:1px dashed #e5e7eb}.checkout-total-label[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:#111827}.checkout-total-val[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#111827}.checkout-offer-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:12px;gap:12px}
1.btn-checkout-offer[_ngcontent-%COMP%]{background:#f4f4f2;border:none;border-radius:100px;padding:8px 16px;font-size:13px;font-weight:600;color:#374151;cursor:pointer;display:inline-flex;align-items:center;transition:background .15s}.btn-checkout-offer[_ngcontent-%COMP%]:hover{background:#e5e5e2}.terms-conditions-link[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;text-decoration:none;transition:color .15s}.terms-conditions-link[_ngcontent-%COMP%]:hover{color:#111827;text-decoration:underline}.btn-checkout-book-now[_ngcontent-%COMP%]{background:#9ca3af;color:#fff;border:none;width:100%;height:52px;border-radius:100px;font-size:16px;font-weight:700;cursor:pointer;transition:all .2s ease}.btn-checkout-book-now[_ngcontent-%COMP%]:hover{background:#0066f5;box-shadow:0 4px 16px #0066f54d;transform:translateY(-1px)}@media (max-width: 1200px){.experience-layout-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.experience-right-col[_ngcontent-%COMP%]{position:static}}@media (max-width: 768px){.experience-cards-row[_ngcontent-%COMP%]{grid-template-columns:1fr}.card-image-box[_ngcontent-%COMP%]{height:320px}.amenities-grid-3[_ngcontent-%COMP%]{grid-template-columns:1fr}.form-row-two-col[_ngcontent-%COMP%]{grid-template-columns:1fr;grid-gap:16px;gap:16px}.checkout-card[_ngcontent-%COMP%]{padding:24px 20px}}.trip-summary-pill-group[_ngcontent-%COMP%]{cursor:pointer;transition:all .2s ease}.trip-summary-pill-group[_ngcontent-%COMP%]:hover{border-color:#0066f5;background:#f8fafc;transform:translateY(-1px)}.edit-trip-overlay-container[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:3000;display:flex;flex-direction:column}.edit-trip-top-bar[_ngcontent-%COMP%]{background:#ffffff;padding:16px 36px 18px;border-bottom:1px solid #e5e7eb;box-shadow:0 10px 30px #00000014;z-index:3002;position:relative}.edit-trip-bar-inner[_ngcontent-%COMP%]{display:flex;align-items:flex-end;grid-gap:20px;gap:20px;max-width:1400px;margin:0 auto;width:100%}.edit-field-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:4px;gap:4px;flex:1;min-width:130px}.edit-field-label[_ngcontent-%COMP%]{font-size:11.5px;font-weight:600;color:#4b5563;margin:0}.edit-input-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;border-bottom:1.5px solid #111827;padding-bottom:4px;position:relative;min-height:28px}.edit-clean-input[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;font-size:14.5px;font-weight:500;color:#111827;outline:none;padding:0}.edit-clean-input[_ngcontent-%COMP%]::-moz-placeholder{color:#9ca3af;font-size:14px;font-weight:400}.edit-clean-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af;font-size:14px;font-weight:400}.btn-clear-field[_ngcontent-%COMP%]{background:none;border:none;font-size:18px;color:#6b7280;cursor:pointer;padding:0 4px;line-height:1;display:flex;align-items:center;justify-content:center;transition:color .15s}.btn-clear-field[_ngcontent-%COMP%]:hover{color:#111827}.edit-field-divider[_ngcontent-%COMP%]{width:1px;height:30px;background:#e5e7eb;margin:0 2px 4px;flex-shrink:0}.edit-select-cell[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edit-select-val[_ngcontent-%COMP%]{font-size:14.5px;font-weight:500;color:#111827}.edit-action-cell[_ngcontent-%COMP%]{margin-left:8px;flex-shrink:0}.btn-view-options-pill[_ngcontent-%COMP%]{background:#0066f5;color:#fff;border:none;border-radius:100px;padding:11px 26px;font-size:14.5px;font-weight:700;cursor:pointer;white-space:nowrap;transition:all .2s ease;box-shadow:0 4px 14px #0066f547}.btn-view-options-pill[_ngcontent-%COMP%]:hover{background:#0052cc;transform:translateY(-1px);box-shadow:0 6px 18px #0066f561}.edit-trip-frosted-backdrop[_ngcontent-%COMP%]{flex:1;width:100%;background:rgba(255,255,255,.55);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);display:flex;align-items:center;justify-content:center;z-index:3001;cursor:pointer}.frosted-backdrop-content[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;align-items:center;grid-gap:24px;gap:24px;cursor:default;padding:40px 24px}.calendar-badge-icon[_ngcontent-%COMP%]{width:52px;height:56px;background:#5497d6;border-radius:12px;display:flex;flex-direction:column;align-items:center;box-shadow:0 8px 24px #5497d659;position:relative;border-top:10px solid #4182bd}.cal-top-hooks[_ngcontent-%COMP%]{display:flex;grid-gap:18px;gap:18px;position:absolute;top:-16px}.cal-hook[_ngcontent-%COMP%]{width:4px;height:8px;background:#1e4b75;border-radius:2px}.cal-body[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;width:100%}
1.cal-number[_ngcontent-%COMP%]{color:#fff;font-size:24px;font-weight:700;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;letter-spacing:-.5px}.frosted-message-title[_ngcontent-%COMP%]{font-family:"Playfair Display",Georgia,serif;font-size:30px;font-weight:500;color:#111827;line-height:1.35;margin:0;letter-spacing:-.2px}@media (max-width: 992px){.edit-trip-bar-inner[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;grid-gap:14px;gap:14px}.edit-field-divider[_ngcontent-%COMP%]{display:none}.edit-location-cell[_ngcontent-%COMP%]{max-width:none}.edit-action-cell[_ngcontent-%COMP%]{margin-left:0;margin-top:8px}.btn-view-options-pill[_ngcontent-%COMP%]{width:100%}.frosted-message-title[_ngcontent-%COMP%]{font-size:22px}}.header-ride-type-toggle[_ngcontent-%COMP%]{background:#f4f4f2;border-radius:100px;padding:4px;display:flex;align-items:center;grid-gap:4px;gap:4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ride-type-pill-btn[_ngcontent-%COMP%]{border:none;background:transparent;padding:7px 18px;border-radius:100px;font-size:13.5px;font-weight:600;color:#4b5563;cursor:pointer;transition:all .2s ease}.ride-type-pill-btn[_ngcontent-%COMP%]:hover:not(.active){color:#111827}.ride-type-pill-btn.active[_ngcontent-%COMP%]{background:#0066f5;color:#fff;box-shadow:0 2px 8px #0066f54d}.custom-datepicker-dropdown-card[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 14px);left:50%;transform:translate(-50%);width:320px;background:#ffffff;border-radius:18px;padding:18px 20px;box-shadow:0 16px 48px #00000029;z-index:3010;border:1px solid #f0eee9;cursor:default}.dp-header-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.dp-month-title[_ngcontent-%COMP%]{font-size:15px;font-weight:700;color:#111827}.dp-nav-arrow[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;border:none;background:#f3f4f6;color:#374151;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;padding:0}.dp-nav-arrow[_ngcontent-%COMP%]:hover{background:#e5e7eb;color:#111827}.dp-weekdays-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:12px;font-weight:600;color:#9ca3af;margin-bottom:10px}.dp-days-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);grid-gap:4px;gap:4px;grid-row-gap:6px;row-gap:6px}.dp-day-cell[_ngcontent-%COMP%]{height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:13.5px;font-weight:500;color:#1f2937;cursor:pointer;transition:all .15s ease}.dp-day-cell[_ngcontent-%COMP%]:hover:not(.is-empty):not(.is-selected){background:#f3f4f6;color:#111827}.dp-day-cell.is-selected[_ngcontent-%COMP%]{background:#0066f5!important;color:#fff!important;font-weight:700;box-shadow:0 4px 10px #0066f559}.dp-day-cell.is-empty[_ngcontent-%COMP%]{cursor:default;pointer-events:none}.custom-timepicker-dropdown-card[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 14px);left:50%;transform:translate(-50%);width:210px;background:#ffffff;border-radius:18px;padding:10px 8px;box-shadow:0 16px 48px #00000029;z-index:3010;border:1px solid #f0eee9;cursor:default}.time-slots-scroll-list[_ngcontent-%COMP%]{max-height:270px;overflow-y:auto;display:flex;flex-direction:column;grid-gap:3px;gap:3px;padding-right:4px}.time-slots-scroll-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.time-slots-scroll-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:10px}.time-slot-item[_ngcontent-%COMP%]{padding:9px 16px;font-size:14.5px;font-weight:500;color:#1f2937;border-radius:10px;cursor:pointer;transition:all .15s ease;text-align:left}.time-slot-item[_ngcontent-%COMP%]:hover:not(.is-selected){background:#f3f4f6}.time-slot-item.is-selected[_ngcontent-%COMP%]{background:#dbeafe;color:#1e40af;font-weight:700}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg);transition:transform .2s ease}.map-live-container[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;z-index:1;overflow:visible}#gmap-layout-four-map[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] #gmap-layout-four-map .map-marker-label-overlay{pointer-events:none}.edit-booking-type-cell[_ngcontent-%COMP%]{min-width:150px;
1max-width:200px;flex:0 1 180px}.edit-booking-type-wrap[_ngcontent-%COMP%]{min-height:28px;border-bottom:none;padding-bottom:0}.edit-booking-type-select[_ngcontent-%COMP%]{width:100%}.edit-booking-type-select.ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{border:none!important;border-bottom:1.5px solid #111827!important;border-radius:0!important;box-shadow:none!important;min-height:28px;background:transparent;padding-left:0;padding-right:0}.edit-booking-type-select.ng-select[_ngcontent-%COMP%] .ng-value-container[_ngcontent-%COMP%]{padding-left:0}.edit-booking-type-select.ng-select[_ngcontent-%COMP%] .ng-input[_ngcontent-%COMP%]{padding-left:0}.edit-booking-type-select.ng-select[_ngcontent-%COMP%] .ng-placeholder[_ngcontent-%COMP%]{color:#9ca3af;font-size:14px;font-weight:400}.edit-booking-type-select.ng-select[_ngcontent-%COMP%] .ng-value[_ngcontent-%COMP%]{font-size:14.5px;font-weight:500;color:#111827}.edit-booking-type-select.ng-select[_ngcontent-%COMP%] .ng-arrow-wrapper[_ngcontent-%COMP%]{padding-right:0}.edit-location-cell[_ngcontent-%COMP%]{flex:1.4 1 0;min-width:160px;max-width:280px}.edit-search-wrap[_ngcontent-%COMP%]{min-height:28px;border-bottom:none;padding-bottom:0;grid-gap:2px;gap:2px;align-items:center;min-width:0}.edit-search-wrap[_ngcontent-%COMP%] .btn-clear-field[_ngcontent-%COMP%]{flex-shrink:0;margin-bottom:2px}.edit-location-search[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select{width:100%}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-select-container{border:none!important;border-bottom:1.5px solid #111827!important;border-radius:0!important;box-shadow:none!important;min-height:28px!important;height:28px!important;background:transparent!important;padding:0!important;font-weight:500!important}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-value-container{padding-left:0!important;overflow:hidden}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-value{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:14.5px;font-weight:500;color:#111827}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-input{padding-left:0!important}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-input>input{line-height:26px!important;height:26px!important;font-size:14.5px!important;font-weight:500!important}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-placeholder{color:#9ca3af;font-size:14px;font-weight:400}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-value-label{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-arrow-wrapper{padding-right:0;width:18px}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-arrow-wrapper .ng-arrow{border-color:#6b7280 transparent transparent}[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-dropdown-panel{z-index:3010;min-width:100%}.edit-field-error[_ngcontent-%COMP%]{display:block;font-size:11px;color:#dc2626;margin-top:4px}.payment-mode-pills-row[_ngcontent-%COMP%], .payment-mode-stack[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;grid-gap:8px;gap:8px;margin-bottom:16px}.payment-mode-pill[_ngcontent-%COMP%]{border:1.5px solid #e5e7eb;background:#fff;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:600;color:#374151;cursor:pointer}.payment-mode-pill.is-active[_ngcontent-%COMP%]{border-color:#0066f5;background:#eff6ff;color:#0066f5}.payment-mode-sidebar[_ngcontent-%COMP%]{margin-top:16px}.payment-mode-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#374151;margin-bottom:8px;display:block}.luxury-modal-body-simple[_ngcontent-%COMP%]{padding:20px 24px 8px}.detail-price-title[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:12px;font-size:18px;font-weight:700;color:#111827}.breakdown-total-row[_ngcontent-%COMP%]{margin-top:4px;padding-top:8px}.breakdown-bold-row[_ngcontent-%COMP%] .breakdown-label[_ngcontent-%COMP%], .breakdown-bold-row[_ngcontent-%COMP%] .breakdown-amount[_ng
1content-%COMP%]{font-weight:700;color:#111827}.checkout-bold-label[_ngcontent-%COMP%], .checkout-bold-val[_ngcontent-%COMP%]{font-weight:700;color:#111827}.breakdown-indent[_ngcontent-%COMP%] .breakdown-label[_ngcontent-%COMP%]{padding-left:12px;color:#6b7280;font-size:12.5px}.breakdown-indent[_ngcontent-%COMP%] .breakdown-amount[_ngcontent-%COMP%]{color:#6b7280;font-size:12.5px}.sidebar-fare-breakdown[_ngcontent-%COMP%]{margin:4px 0 12px;border:1px solid #e8e6e1;border-radius:12px;background:#fafaf8;overflow:hidden}.fare-breakdown-toggle[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;grid-gap:8px;gap:8px;padding:10px 12px;border:none;background:transparent;font-size:13px;font-weight:700;color:#111827;cursor:pointer}.fare-breakdown-toggle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{transition:transform .2s ease;color:#6b7280}.fare-breakdown-toggle[_ngcontent-%COMP%] svg.is-open[_ngcontent-%COMP%]{transform:rotate(180deg)}.fare-breakdown-panel[_ngcontent-%COMP%]{padding:0 12px 12px}.sidebar-breakdown-table[_ngcontent-%COMP%]{margin-top:4px}.sidebar-breakdown-table[_ngcontent-%COMP%] .breakdown-row[_ngcontent-%COMP%]{font-size:13px}.detail-modal-tab-panel[_ngcontent-%COMP%]{padding-bottom:4px}.modal-charge-item[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:16px;height:16px;accent-color:#0066f5}.detail-modal-tabs-nav[_ngcontent-%COMP%]{display:flex;grid-gap:8px;gap:8px;margin-bottom:16px;border-bottom:1px solid #e5e7eb}.detail-modal-tab[_ngcontent-%COMP%]{background:none;border:none;padding:10px 12px;font-size:14px;font-weight:600;color:#6b7280;border-bottom:2px solid transparent;cursor:pointer}.detail-modal-tab.active[_ngcontent-%COMP%]{color:#0066f5;border-bottom-color:#0066f5}.modal-charge-item[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;margin-bottom:10px;font-size:14px}.modal-seat-counter[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;margin:8px 0 12px}.modal-seat-counter[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;border:1px solid #d1d5db;background:#fff;font-size:18px;line-height:1}.modal-extra-field[_ngcontent-%COMP%]{margin-bottom:14px}.modal-extra-label[_ngcontent-%COMP%]{display:block;font-size:13px;font-weight:600;margin-bottom:6px}.modal-empty-hint[_ngcontent-%COMP%]{color:#6b7280;font-size:14px}.luxury-overlay-screen[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(255,255,255,.98);z-index:4000;display:flex;align-items:center;justify-content:center;padding:24px}.luxury-overlay-card[_ngcontent-%COMP%]{width:100%;max-width:480px;background:#fff;border-radius:20px;padding:32px;box-shadow:0 20px 60px #0000001f}.luxury-overlay-title[_ngcontent-%COMP%]{font-size:24px;font-weight:600;margin-bottom:8px}.luxury-overlay-sub[_ngcontent-%COMP%]{color:#6b7280;margin-bottom:16px}@media (max-width: 768px){.experience-card-wrap[_ngcontent-%COMP%]{flex:0 0 85vw;max-width:85vw}}.user-confirm-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:1000001;padding:1rem}.user-confirm-modal[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem;width:100%;max-width:420px;box-shadow:0 10px 30px #0003}.masked-user-details[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:6px;padding:1rem}.guest-confirm-ok-btn[_ngcontent-%COMP%]{background:#374151;border-color:#374151}.guest-confirm-ok-btn[_ngcontent-%COMP%]:hover, .guest-confirm-ok-btn[_ngcontent-%COMP%]:focus{background:#1f2937;border-color:#1f2937}.unique-field-options[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:6px;padding:1rem}.unique-field-option[_ngcontent-%COMP%]{cursor:pointer;font-size:.95rem}.unique-field-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:.2rem}.layout-four-embedded[_nghost-%COMP%]{display:block;min-height:0;height:auto;background:transparent!important}.layout-four-embedded[_nghost-%COMP%] .luxury-experience-page[_ngcontent-%COMP%]{min-height:0;background:transparent!important}.layout-four-embedded[_nghost-%COMP%] .luxury-navbar[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .luxury-navbar.navbar-embed-only[_ngcontent-%COMP%]{padding:0;background:transparent!important;border-bottom:none;position:relative;z-index:20}.layout-four-embedded[_nghost-%COMP%] .edit-trip-overlay-container[_ngcontent-%COMP%]{position:relative;inset:auto;z-index:20;display:block}.layout-four-embedded[_nghost-%COMP%] .edit-trip-frosted-backdrop[_ngcontent-%COMP%]{display:none!important}
1.layout-four-embedded[_nghost-%COMP%] .edit-trip-top-bar[_ngcontent-%COMP%]{background:rgba(255,255,255,.97);border:1px solid rgba(226,232,240,.9);border-radius:0 0 14px 14px;padding:8px 12px 10px;box-shadow:0 8px 20px #0f172a24;margin:0;overflow:visible!important}.layout-four-embedded[_nghost-%COMP%] .edit-trip-bar-inner[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .edit-field-cell[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .edit-input-wrap[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .edit-search-wrap[_ngcontent-%COMP%]{overflow:visible!important}.layout-four-embedded[_nghost-%COMP%] .edit-trip-bar-inner[_ngcontent-%COMP%]{grid-gap:10px;gap:10px;max-width:none;align-items:flex-end;flex-wrap:nowrap}.layout-four-embedded[_nghost-%COMP%] .edit-field-cell[_ngcontent-%COMP%]{min-width:0;flex:1 1 0;grid-gap:3px;gap:3px}.layout-four-embedded[_nghost-%COMP%] .edit-field-label[_ngcontent-%COMP%]{font-size:10px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#64748b}.layout-four-embedded[_nghost-%COMP%] .edit-input-wrap[_ngcontent-%COMP%]{border-bottom:1.5px solid #cbd5e1;min-height:26px;padding-bottom:3px}.layout-four-embedded[_nghost-%COMP%] .edit-input-wrap[_ngcontent-%COMP%]:focus-within{border-bottom-color:#0066f5}.layout-four-embedded[_nghost-%COMP%] .edit-select-val[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .edit-clean-input[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#0f172a}.layout-four-embedded[_nghost-%COMP%] .edit-clean-input[_ngcontent-%COMP%]::-moz-placeholder{color:#94a3b8;font-weight:500}.layout-four-embedded[_nghost-%COMP%] .edit-clean-input[_ngcontent-%COMP%]::placeholder{color:#94a3b8;font-weight:500}.layout-four-embedded[_nghost-%COMP%] .edit-booking-type-wrap[_ngcontent-%COMP%]{border:1px solid #e2e8f0;border-radius:8px;border-bottom:1px solid #e2e8f0;padding:2px 6px;min-height:30px;background:#f8fafc}.layout-four-embedded[_nghost-%COMP%] .edit-booking-type-wrap[_ngcontent-%COMP%]:focus-within{border-color:#0066f5;background:#fff}.layout-four-embedded[_nghost-%COMP%] .edit-field-divider[_ngcontent-%COMP%]{height:28px;background:#e2e8f0;margin-bottom:4px}.layout-four-embedded[_nghost-%COMP%] .btn-view-options-pill[_ngcontent-%COMP%]{padding:9px 18px;font-size:13px;box-shadow:0 4px 12px #0066f54d}.layout-four-embedded[_nghost-%COMP%] .edit-action-cell[_ngcontent-%COMP%]{margin-left:4px;align-self:flex-end}.layout-four-embedded[_nghost-%COMP%] .custom-datepicker-dropdown-card[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .custom-timepicker-dropdown-card[_ngcontent-%COMP%]{z-index:4000}.layout-four-embedded[_nghost-%COMP%] .ng-dropdown-panel{z-index:5000!important;min-width:280px!important;max-height:280px!important;overflow-y:auto!important;box-shadow:0 12px 28px #0f172a38!important;border:1px solid #e2e8f0!important;border-radius:10px!important}.layout-four-embedded[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-select-container{min-height:26px!important;height:26px!important;border-bottom-width:1.5px!important}.layout-four-embedded[_nghost-%COMP%] .edit-search-wrap app-search-box-google.location-search .ng-select .ng-input>input{line-height:24px!important;height:24px!important;font-size:13px!important}.layout-four-embedded[_nghost-%COMP%] .edit-booking-type-select.ng-select .ng-select-container{min-height:28px!important}.layout-four-embedded[_nghost-%COMP%] .luxury-main-content[_ngcontent-%COMP%]{padding:10px 8px 8px!important;background:transparent}.layout-four-embedded[_nghost-%COMP%] .page-title[_ngcontent-%COMP%]{font-size:24px;margin-bottom:16px}.layout-four-embedded[_nghost-%COMP%] .experience-layout-grid[_ngcontent-%COMP%]{grid-gap:16px;gap:16px;grid-template-columns:minmax(0,1fr) 340px}.layout-four-embedded[_nghost-%COMP%] .experience-right-col[_ngcontent-%COMP%]{top:12px}.layout-four-embedded[_nghost-%COMP%] .card-image-box[_ngcontent-%COMP%]{height:220px}.layout-four-embedded[_nghost-%COMP%] .experience-card-wrap[_ngcontent-%COMP%]{flex:0 0 240px;max-width:260px}.layout-four-embedded[_nghost-%COMP%] .map-container[_ngcontent-%COMP%]{height:200px}.layout-four-embedded[_nghost-%COMP%] .sidebar-sticky-box[_ngcontent-%COMP%]{grid-gap:12px;gap:12px}.layout-four-embedded[_nghost-%COMP%] .booking-summary-card[_ngcontent-%COMP%], .layout-four-embedded[_nghost-%COMP%] .checkout-summary-card[_ngcontent-%COMP%]{padding:16px}.layout-four-embedded[_nghost-%COMP%] .summary-header[_ngcontent-%COMP%]{margin-bottom:12px}.layout-four-embedded[_nghost-%COMP%] .guest-details-form[_ngcontent-%COMP%]{margin-bottom:12px}.layout-four-embedded[_nghost-%COMP%] .btn-select-experience[_ngcontent-%COMP%]{height:46px;font-size:15px}.layout-four-embedded[_nghost-%COMP%] .experience-setup-prompt[_ngcontent-%COMP%]{display:none!important}@media (max-width: 1100px){.layout-four-embedded[_nghost-%COMP%] .experience-layout-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.layout-four-embedded[_nghost-%COMP%] .experience-right-col[_ngcontent-%COMP%]{position:static;top:auto}.layout-four-embedded[_nghost-%COMP%] .edit-trip-bar-inner[_ngcontent-%COMP%]{flex-wrap:wrap}.layout-four-embedded[_nghost-%COMP%] .edit-field-cell[_ngcontent-%COMP%]{flex:1 1 140px}}@media (max-width: 768px){.layout-four-embedded[_nghost-%COMP%] .card-image-box[_ngcontent-%COMP%]{height:180px}
1.layout-four-embedded[_nghost-%COMP%] .edit-trip-top-bar[_ngcontent-%COMP%]{padding:12px;border-radius:12px}}']}),e})();function qu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",100),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(3);return t.customerStepCompleted?t.displayCustomerScreen():null}),f._uU(1),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.Q6J("disabled",!t.customerStepCompleted&&"customer"!==e),f.xp6(1),f.Oqu((null==t.currentLanguage?null:t.currentLanguage.info)||"Info")}}function Du(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"i",101),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(3);return t.customerStepCompleted?t.displayCustomerScreen():null}),f.qZA()}if(2&e){const e=f.oxw(3);f.ekj("step-step-icon--done",e.customerStepCompleted)}}const Ou=function(){return["pickup","details","service","payment","checkout"]};function Lu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",100),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).displayFirstScreen(!0)}),f._uU(1),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.Q6J("disabled",!t.isStepActiveOrDone(e,f.DdM(2,Ou))),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.pickup)}}function Mu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"i",102),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).displayFirstScreen(!0)}),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.ekj("step-step-icon--done",t.isStepActiveOrDone(e,f.DdM(2,Ou)))}}const Vu=function(){return["details","service","payment","checkout"]};function Su(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",100),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).displaySecondScreen()}),f._uU(1),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.Q6J("disabled",0==t.addForm.controls.properties.controls.length||!t.isStepActiveOrDone(e,f.DdM(2,Vu))),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details)}}function Eu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"i",103),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).displaySecondScreen()}),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.ekj("step-step-icon--done",t.isStepActiveOrDone(e,f.DdM(2,Vu)))}}const Uu=function(){return["service","payment","checkout"]};function Nu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",100),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).displayThirdScreen()}),f._uU(1),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.Q6J("disabled",!t.isStepActiveOrDone(e,f.DdM(2,Uu))),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.service)}}function Iu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"i",104),f.NdJ("click",function(){return f.CHM(e),f.oxw(3).displayThirdScreen()}),f.qZA()}if(2&e){const e=f.oxw(2).active,t=f.oxw();f.ekj("step-step-icon--done",t.isStepActiveOrDone(e,f.DdM(2,Uu)))}}const ju=function(){return["payment","checkout"]};function Ru(e,t){if(1&e&&(f.TgZ(0,"button",106),f._uU(1),f.qZA()),2&e){const e=f.oxw(3).active,t=f.oxw();f.Q6J("disabled",!t.isStepActiveOrDone(e,f.DdM(2,ju))),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.payment)}}function zu(e,t){if(1&e&&f._UZ(0,"i",107),2&e){const e=f.oxw(3).active,t=f.oxw();f.ekj("step-step-icon--done",t.isStepActiveOrDone(e,f.DdM(2,ju)))}}const Ju=function(e,t,i){return{"border-solid black-border-active":e,"_stepNotVisited_ojtdk_75 cursor-notallowed":t,"step-book--active":i}},Bu=function(e){return{"round-border-active":e}};function Yu(e,t){if(1&e&&(f.TgZ(0,"li",84),f.TgZ(1,"div",85),f.YNc(2,Ru,2,3,"button",96),f.YNc(3,zu,1,3,"i",105),f.qZA(),f.TgZ(4,"div",88),f.TgZ(5,"button",98),f._UZ(6,"div",90),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).active,t=f.oxw();f.Q6J("ngClass",f.kEZ(8,Ju,t.isStepActiveOrDone(e,f.DdM(6,ju)),!t.isStepActiveOrDone(e,f.DdM(7,ju)),"payment"===e)),f.xp6(2),f.Q6J("ngIf","payment"===e),f.xp6(1),f.Q6J("ngIf","payment"!==e),f.xp6(2),f.Q6J("disabled",!t.isStepActiveOrDone(e,f.DdM(12,ju))),f.uIk("aria-label",null==t.currentLanguage?null:t.currentLanguage.payment),f.xp6(1),f.Q6J("ngClass",f.VKq(14,Bu,t.isStepActiveOrDone(e,f.DdM(13,ju))))}}function Qu(e,t){if(1&e&&(f.TgZ(0,"button",106),f._uU(1),f.qZA()),2&e){const e=f.oxw(2).active,t=f.oxw();f.Q6J("disabled","checkout"!==e),f.xp6(1),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.checkout)}}function Hu(e,t){1&e&&f._UZ(0,"i",108)}const $u=function(){return{standalone:!0}};function Gu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"li",109),f.TgZ(1,"ng-select",110),f.NdJ("ngModelChange",function(t){return f.CHM(e),f.oxw(3).selectedLanguage=t})("change",function(){return f.CHM(e),f.oxw(3).changeLanguage()}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(3);
1f.xp6(1),f.Q6J("items",e.languageList)("clearable",!1)("ngModel",e.selectedLanguage)("ngModelOptions",f.DdM(4,$u))}}const Ku=function(e,t,i){return{"border-solid black-border-active":e,"cursor-notallowed":t,"step-book--active":i}};function Wu(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ol",83),f.TgZ(1,"li",84),f.TgZ(2,"div",85),f.YNc(3,qu,2,2,"button",86),f.YNc(4,Du,1,2,"i",87),f.qZA(),f.TgZ(5,"div",88),f.TgZ(6,"button",89),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2);return t.customerStepCompleted?t.displayCustomerScreen():null}),f._UZ(7,"div",90),f.qZA(),f.qZA(),f.qZA(),f.TgZ(8,"li",84),f.TgZ(9,"div",85),f.YNc(10,Lu,2,3,"button",86),f.YNc(11,Mu,1,3,"i",91),f.qZA(),f.TgZ(12,"div",88),f.TgZ(13,"button",89),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).displayFirstScreen(!0)}),f._UZ(14,"div",90),f.qZA(),f.qZA(),f.qZA(),f.TgZ(15,"li",84),f.TgZ(16,"div",85),f.YNc(17,Su,2,3,"button",86),f.YNc(18,Eu,1,3,"i",92),f.qZA(),f.TgZ(19,"div",88),f.TgZ(20,"button",89),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).displaySecondScreen()}),f._UZ(21,"div",90),f.qZA(),f.qZA(),f.qZA(),f.TgZ(22,"li",84),f.TgZ(23,"div",85),f.YNc(24,Nu,2,3,"button",86),f.YNc(25,Iu,1,3,"i",93),f.qZA(),f.TgZ(26,"div",94),f.TgZ(27,"button",89),f.NdJ("click",function(){return f.CHM(e),f.oxw(2).displayThirdScreen()}),f._UZ(28,"div",90),f.qZA(),f.qZA(),f.qZA(),f.YNc(29,Yu,7,16,"li",95),f.TgZ(30,"li",84),f.TgZ(31,"div",85),f.YNc(32,Qu,2,2,"button",96),f.YNc(33,Hu,1,0,"i",97),f.qZA(),f.TgZ(34,"div",88),f.TgZ(35,"button",98),f._UZ(36,"div",90),f.qZA(),f.qZA(),f.qZA(),f.YNc(37,Gu,2,5,"li",99),f.qZA()}if(2&e){const e=f.oxw().active,t=f.oxw();f.xp6(1),f.Q6J("ngClass",f.kEZ(32,Ju,"customer"===e||t.customerStepCompleted,"customer"!==e&&!t.customerStepCompleted,"customer"===e)),f.xp6(2),f.Q6J("ngIf","customer"===e),f.xp6(1),f.Q6J("ngIf","customer"!==e),f.xp6(2),f.Q6J("disabled",!t.customerStepCompleted&&"customer"!==e),f.uIk("aria-label",(null==t.currentLanguage?null:t.currentLanguage.info)||"Info"),f.xp6(1),f.Q6J("ngClass",f.VKq(36,Bu,"customer"===e||t.customerStepCompleted)),f.xp6(1),f.Q6J("ngClass",f.kEZ(40,Ju,t.isStepActiveOrDone(e,f.DdM(38,Ou)),!t.isStepActiveOrDone(e,f.DdM(39,Ou)),"pickup"===e)),f.xp6(2),f.Q6J("ngIf","pickup"===e),f.xp6(1),f.Q6J("ngIf","pickup"!==e),f.xp6(2),f.Q6J("disabled",!t.isStepActiveOrDone(e,f.DdM(44,Ou))),f.uIk("aria-label",null==t.currentLanguage?null:t.currentLanguage.pickup),f.xp6(1),f.Q6J("ngClass",f.VKq(46,Bu,t.isStepActiveOrDone(e,f.DdM(45,Ou)))),f.xp6(1),f.Q6J("ngClass",f.kEZ(50,Ju,t.isStepActiveOrDone(e,f.DdM(48,Vu)),!t.isStepActiveOrDone(e,f.DdM(49,Vu)),"details"===e)),f.xp6(2),f.Q6J("ngIf","details"===e),f.xp6(1),f.Q6J("ngIf","details"!==e),f.xp6(2),f.Q6J("disabled",0==t.addForm.controls.properties.controls.length||!t.isStepActiveOrDone(e,f.DdM(54,Vu))),f.uIk("aria-label",null==t.currentLanguage?null:t.currentLanguage.details),f.xp6(1),f.Q6J("ngClass",f.VKq(56,Bu,t.isStepActiveOrDone(e,f.DdM(55,Vu)))),f.xp6(1),f.Q6J("ngClass",f.kEZ(60,Ju,t.isStepActiveOrDone(e,f.DdM(58,Uu)),!t.isStepActiveOrDone(e,f.DdM(59,Uu)),"service"===e)),f.xp6(2),f.Q6J("ngIf","service"===e),f.xp6(1),f.Q6J("ngIf","service"!==e),f.xp6(2),f.Q6J("disabled",!t.isStepActiveOrDone(e,f.DdM(64,Uu))),f.uIk("aria-label",null==t.currentLanguage?null:t.currentLanguage.service),f.xp6(1),f.Q6J("ngClass",f.VKq(66,Bu,t.isStepActiveOrDone(e,f.DdM(65,Uu)))),f.xp6(1),f.Q6J("ngIf",t.showPaymentStep),f.xp6(1),f.Q6J("ngClass",f.kEZ(68,Ku,"checkout"===e,"checkout"!==e,"checkout"===e)),f.xp6(2),f.Q6J("ngIf","checkout"===e),f.xp6(1),f.Q6J("ngIf","checkout"!==e),f.xp6(2),f.Q6J("disabled","checkout"!==e),f.uIk("aria-label",null==t.currentLanguage?null:t.currentLanguage.checkout),f.xp6(1),f.Q6J("ngClass",f.VKq(72,Bu,"checkout"===e)),f.xp6(1),f.Q6J("ngIf",(null==t.languageList?null:t.languageList.length)>1)}}function Xu(e,t){if(1&e&&f.YNc(0,Wu,38,74,"ol",82),2&e){const e=f.oxw();f.Q6J("ngIf",!!e.company_id&&1777!=e.company_id)}}function ed(e,t){1&e&&(f.TgZ(0,"div",111),f._UZ(1,"div",112),f.qZA())}function td(e,t){1&e&&f.GkF(0)}function id(e,t){if(1&e&&(f.TgZ(0,"div",113),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.booking_hold_message)||"Booking is temporarily unavailable. Please try again later."," ")}}
1function nd(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",114),f.TgZ(1,"label",115),f._uU(2),f.qZA(),f.TgZ(3,"ng-select",116),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw();return i.changeBookingType(t),i.onInputChange(i.addForm.controls.booking_type_id)}),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(2),f.hij("",null==e.currentLanguage?null:e.currentLanguage.choose_trn_mode," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_booking_type)("items",e.transactionCategory)("clearable",!1)("formControl",e.addForm.controls.booking_type_id)("searchable",!1)}}function od(e,t){if(1&e&&f._UZ(0,"span",117),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.pickup_location,f.oJD)}}function ad(e,t){if(1&e&&(f.TgZ(0,"span",118),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function rd(e,t){if(1&e&&(f.TgZ(0,"span",127),f._uU(1),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}const ld=function(e){return[e]};function sd(e,t){if(1&e){const e=f.EpF();f.ynx(0,119),f.TgZ(1,"div",120),f.TgZ(2,"div",121),f.TgZ(3,"app-search-box-google",122),f.NdJ("search",function(t){return f.CHM(e),f.oxw().OnSearchCheckpoint(t)})("searchEvent",function(t){const i=f.CHM(e).index;return f.oxw().searchEventCheckpoint(t,i)}),f.qZA(),f._UZ(4,"i",123),f.YNc(5,rd,2,1,"span",124),f.TgZ(6,"a",125),f.NdJ("click",function(){const t=f.CHM(e).index;return f.oxw().removeRow(t)}),f._UZ(7,"i",126),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(3),f.Q6J("placeholder",null==n.currentLanguage?null:n.currentLanguage.search_way_loc)("responseData",n.responseDatacheckPoint)("isBooing",!0)("searchText",e.value.value),f.xp6(2),f.Q6J("ngIf",!n.checkpointValidity[i]&&(null==e.value||null==e.value.value?null:e.value.value.length)),f.xp6(2),f.Q6J("ngClass",f.VKq(7,ld,e.untouched?"text-secondary":e.invalid?"text-danger":"text-secondary"))}}function ud(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div"),f.TgZ(1,"a",128),f.NdJ("click",function(){return f.CHM(e),f.oxw().addNewRow()}),f._UZ(2,"i",129),f._uU(3),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.add_stop," ")}}function dd(e,t){if(1&e&&f._UZ(0,"span",117),2&e){const e=f.oxw();f.Q6J("innerHTML",e.formErrors.destination,f.oJD)}}function cd(e,t){if(1&e&&(f.TgZ(0,"span",130),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function hd(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",131),f.TgZ(2,"h5",132),f._uU(3),f.qZA(),f.TgZ(4,"div",133),f.TgZ(5,"input",134),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeSelectedTab(t.target.checked?2:1)}),f.qZA(),f._UZ(6,"label",135),f.TgZ(7,"label",136),f._uU(8),f.qZA(),f.TgZ(9,"label",137),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.req_time," "),f.xp6(2),f.Q6J("checked",2==e.selectedTab),f.xp6(3),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.now),f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.later)}}function gd(e,t){if(1&e&&(f.TgZ(0,"div",131),f.TgZ(1,"h5",132),f._uU(2),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.AsE(" ",null==e.currentLanguage?null:e.currentLanguage.req_time,": ",null==e.currentLanguage?null:e.currentLanguage.later," ")}}const pd=function(e){return{"has-error":e}};function md(e,t){if(1&e&&(f.TgZ(0,"div",138),f.TgZ(1,"div",139),f.TgZ(2,"div",140),f.TgZ(3,"span",141),f.O4$(),f.TgZ(4,"svg",142),f._UZ(5,"path",143),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"label",144),f._uU(7),f.qZA(),f._UZ(8,"ng2-flatpickr",145),f.qZA(),f.qZA(),f.TgZ(9,"div",139),f.TgZ(10,"div",146),f.TgZ(11,"span",147),f.O4$(),f.TgZ(12,"svg",148),f._UZ(13,"path",149),f.qZA(),f.qZA(),f.kcU(),f.TgZ(14,"label",144),f._uU(15),f.qZA(),f._UZ(16,"ng2-flatpickr",150),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.date," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.timeFormatConfig2)("ngClass",f.VKq(10,pd,e.formErrors.request_time))("formControl",e.addForm.controls.request_time)("setDate",e.request_time),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(1),f.Q6J("config",e.timeFormatConfig)("formControl",e.addForm.controls.trip_time)("setDate",e.trip_time)}}function _d(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",156),f.TgZ(1,"input",157),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).changeGender(null==t?null:t.value)}),f.qZA(),f._uU(2),f._UZ(3,"div",158),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw(2);f.xp6(1),f.Q6J("value",null==e?null:e.value)("formControl",i.addForm.controls.gender)("checked",i.genderTab==(null==e?null:e.value)),f.xp6(1),f.hij(" ",null==e?null:e.label," ")}}function fd(e,t){if(1&e&&(f.TgZ(0,"div",151),f.TgZ(1,"h5",152),f._uU(2),f.qZA(),f.TgZ(3,"div",153),f.TgZ(4,"div",154),f.YNc(5,_d,4,4,"label",155),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.gender),f.xp6(3),f.Q6J("ngForOf",e.gender)}}function vd(e,t){if(1&e&&f._UZ(0,"span",117),2&e){const e=f.oxw(3);f.Q6J("innerHTML",e.formErrors.return_time,f.oJD)}}function yd(e,t){if(1&e&&(f.TgZ(0,"div",164),f.TgZ(1,"div",139),f.TgZ(2,"div",140),f.TgZ(3,"span",141),f.O4$(),f.TgZ(4,"svg",142),f._UZ(5,"path",143),f.qZA(),f.qZA(),f.kcU(),f.TgZ(6,"label",144),f._uU(7),f.qZA(),f._UZ(8,"ng2-flatpickr",145),f.qZA(),f.qZA(),f.TgZ(9,"div",139),f.TgZ(10,"div",146),f.TgZ(11,"span",147),f.O4$(),f.TgZ(12,"svg",148),f._UZ(13,"path",149),f.qZA(),f.qZA(),f.kcU(),f.TgZ(14,"label",144),f._uU(15),f.qZA(),f._UZ(16,"ng2-flatpickr",165),f.qZA(),f.qZA(),f.TgZ(17,"div",166),f.YNc(18,vd,1,1,"span",12),f.qZA(),f.qZA()),2&e){const e=f.oxw(2);f.Q6J("ngClass",f.VKq(13,pd,e.formErrors.return_time)),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.date," "),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_request_time)("config",e.returnDateFormatConfig)("ngClass",f.VKq(15,pd,e.formErrors.return_time))("formControl",e.addForm.controls.return_date)("setDate",e.return_date),f.xp6(7),f.hij("",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(1),f.Q6J("config",e.returnTimeFormatConfig)("formControl",e.addForm.controls.return_trip_time)("setDate",e.return_trip_time)("ngClass",f.VKq(17,pd,e.formErrors.return_time)),f.xp6(2),f.Q6J("ngIf",e.formErrors.return_time)}}function bd(e,t){if(1&e&&(f.TgZ(0,"span",118),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);
1f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function xd(e,t){if(1&e&&(f.TgZ(0,"span",118),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.ser_not_av," ")}}function kd(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div"),f.TgZ(1,"div",10),f.TgZ(2,"app-search-box-google",11),f.NdJ("search",function(t){return f.CHM(e),f.oxw(2).OnSearchReturn(t)})("searchEvent",function(t){return f.CHM(e),f.oxw(2).returnsearchEvent(t)}),f.qZA(),f.YNc(3,bd,2,1,"span",13),f.qZA(),f.TgZ(4,"div",167),f.TgZ(5,"app-search-box-google",11),f.NdJ("search",function(t){return f.CHM(e),f.oxw(2).OnSearchReturnDestination(t)})("searchEvent",function(t){return f.CHM(e),f.oxw(2).returnsearchEventDestination(t)}),f.qZA(),f.YNc(6,xd,2,1,"span",13),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_pick_location)||"Search Return Pickup Location")("isBooing",!0)("responseData",e.responseDataReturn)("searchText",e.returnsearchText)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returnpickupRegionFound),f.xp6(2),f.Q6J("placeholder",(null==e.currentLanguage?null:e.currentLanguage.search_des_loc)||"Search Return Destination Location")("isBooing",!0)("responseData",e.responseDataReturnDestination)("searchText",e.returnsearchTextDestionation)("is_disable",!e.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",!e.returndropRegionFound)}}function Zd(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",159),f.TgZ(2,"h5",160),f._uU(3),f.TgZ(4,"div",133),f.TgZ(5,"input",161),f.NdJ("click",function(t){return f.CHM(e),f.oxw().changeReturn(t)}),f.qZA(),f._UZ(6,"label",162),f.qZA(),f.qZA(),f.qZA(),f.YNc(7,yd,19,19,"div",163),f.YNc(8,kd,7,12,"div",16),f.BQk()}if(2&e){const e=f.oxw();f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.return," "),f.xp6(2),f.Q6J("checked",e.returnEnable),f.xp6(2),f.Q6J("ngIf",e.returnEnable),f.xp6(1),f.Q6J("ngIf",e.returnEnable)}}function Cd(e,t){if(1&e&&(f.TgZ(0,"div",170),f._UZ(1,"input",171),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("formControl",e.addForm.controls.flight_number)}}function Fd(e,t){if(1&e&&(f.TgZ(0,"ng-option",177),f.TgZ(1,"span",178),f.TgZ(2,"div",179),f._UZ(3,"i",180),f.qZA(),f.TgZ(4,"span",181),f._uU(5),f.qZA(),f.qZA(),f.TgZ(6,"span"),f._uU(7),f.ALo(8,"datePipe"),f.ALo(9,"betterDate"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);f.Q6J("value",e),f.xp6(4),f.Q6J("title",null==e?null:e.flight_number),f.xp6(1),f.AsE(" ",null==e?null:e.flight_number," - ",null==e?null:e.airline_name," "),f.xp6(2),f.hij(" ",null!=e&&null!=e.raw&&null!=e.raw.departure&&e.raw.departure.estimated?f.xi3(8,5,f.lcZ(9,8,null==e||null==e.raw||null==e.raw.departure?null:e.raw.departure.estimated),i.formatTimeDate):"","")}}function Td(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",172),f.TgZ(1,"div",173),f.TgZ(2,"ng-select",174,175),f.NdJ("keyup.enter",function(t){return f.CHM(e),f.oxw(2).searchPlace(t.target.value)})("change",function(t){return f.CHM(e),f.oxw(2).getFlight(t)})("ngModelChange",function(t){return f.CHM(e),f.oxw(2).selectedFlightObj=t}),f.YNc(4,Fd,10,10,"ng-option",176),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2);f.xp6(2),f.Q6J("clearable",!1)("placeholder",null==e.currentLanguage?null:e.currentLanguage.fligth_placeholder)("ngModel",e.selectedFlightObj)("ngModelOptions",f.DdM(5,$u)),f.xp6(2),f.Q6J("ngForOf",e.responseFlight)}}function Ad(e,t){if(1&e&&(f.TgZ(0,"div"),f.TgZ(1,"label",115),f._uU(2),f.qZA(),f.YNc(3,Cd,2,2,"div",168),f.YNc(4,Td,5,6,"div",169),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.flight_number_title," "),f.xp6(1),f.Q6J("ngIf",!e.checkFligth),f.xp6(1),f.Q6J("ngIf",e.checkFligth)}}function Pd(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(3).$implicit,t=f.oxw(2);f.xp6(1),f.AsE("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",null==e?null:e.charge_value,")")}}function wd(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(3).$implicit;f.xp6(1),f.hij("(",null==e?null:e.charge_value,"%)")}}function qd(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(3).$implicit,t=f.oxw(2);f.xp6(1),f.lnq("(",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",null!=t.currentCompanyDetail&&t.currentCompanyDetail.distance_unit?"Per "+(null==t.currentCompanyDetail?null:t.currentCompanyDetail.distance_unit):"Per Km"," )")}}function Dd(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Pd,2,2,"ng-container",16),f.YNc(2,wd,2,1,"ng-container",16),f.YNc(3,qd,2,3,"ng-container",16),f.BQk()),2&e){const e=f.oxw(2).$implicit;f.xp6(1),f.Q6J("ngIf",2==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",3==(null==e?null:e.charge_type))}}const Od=function(e){return{"pointer-events":e}};function Ld(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",188),f.TgZ(1,"div",183),f.TgZ(2,"div",189),f.TgZ(3,"div"),f.TgZ(4,"div",190),f.TgZ(5,"a",191),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("child_seat",t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",192),f.TgZ(8,"a",193),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("child_seat",t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(5),f.Q6J("ngStyle",f.VKq(3,Od,0==e.addForm.controls.child_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.child_seat),f.xp6(1),f.Q6J("ngStyle",f.VKq(5,Od,e.addForm.controls.booster_seat.value<0?"none":"auto"))}}function Md(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",188),f.TgZ(1,"div",183),f.TgZ(2,"div",189),f.TgZ(3,"div"),f.TgZ(4,"div",190),f.TgZ(5,"a",191),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementValue("booster_seat",t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",192),f.TgZ(8,"a",193),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementValue("booster_seat",t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(4);f.xp6(5),f.Q6J("ngStyle",f.VKq(3,Od,0==e.addForm.controls.booster_seat.value?"none":"auto")),f.xp6(2),f.Q6J("formControl",e.addForm.controls.booster_seat),f.xp6(1),f.Q6J("ngStyle",f.VKq(5,Od,e.addForm.controls.booster_seat.value<0?"none":"auto"))}}function Vd(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",188),f.TgZ(1,"div",183),f.TgZ(2,"div",189),f.TgZ(3,"div"),f.TgZ(4,"div",190),f.TgZ(5,"a",191),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).decrementDynamicCharge(t)}),f._uU(6,"-"),f.qZA(),f._UZ(7,"input",194),f.TgZ(8,"a",195),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw(2).incrementDynamicCharge(t)}),f._uU(9,"+"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2).$implicit;f.xp6(5),f.Q6J("ngStyle",f.VKq(2,Od,((null==e?null:e.currentValue)||0)<=1?"none":"auto")),f.xp6(2),f.Q6J("value",(null==e?null:e.currentValue)||0)}}function Sd(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"label",186),f.TgZ(2,"input",187),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().$implicit;return f.oxw(2).checkOtherCharge(t,i)}),f.qZA(),f._uU(3),f.YNc(4,Dd,4,3,"ng-container",16),f._UZ(5,"div",158),f.qZA(),f.YNc(6,Ld,10,7,"div",40),f.YNc(7,Md,10,7,"div",40),f.YNc(8,Vd,10,4,"div",40),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw(2);f.xp6(2),f.MGl("id","customcheckbox-",null==e?null:e.other_charges_id,""),f.s9C("value",null==e?null:e.checked),f.Q6J("checked",null==e?null:e.checked)("disabled",!(null==e||!e.is_required)),f.xp6(1),f.hij(" ",null==e?null:e.title," "),f.xp6(1),f.Q6J("ngIf",t.showTripPrice),f.xp6(2),f.Q6J("ngIf",t.displayChidSheet&&"child_seat"==(null==e?null:e.charges_key)&&
1(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.displayBoosterSheet&&"booster_seat"==(null==e?null:e.charges_key)&&(null==e?null:e.checked)),f.xp6(1),f.Q6J("ngIf",t.isDynamicCalculationCharge(e)&&(null==e?null:e.checked))}}function Ed(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Sd,9,9,"ng-container",16),f.BQk()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",!(null!=e&&e.is_required))}}function Ud(e,t){if(1&e&&(f.TgZ(0,"div",182),f.TgZ(1,"div",183),f.TgZ(2,"label",184),f._uU(3),f.qZA(),f.YNc(4,Ed,2,1,"ng-container",185),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.other_charges," "),f.xp6(1),f.Q6J("ngForOf",e.otherChargesArray)}}function Nd(e,t){if(1&e&&(f.TgZ(0,"span",196),f._uU(1),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.please_add_note," ")}}function Id(e,t){1&e&&f.GkF(0)}function jd(e,t){if(1&e&&(f.TgZ(0,"div",197),f.TgZ(1,"h4",198),f._uU(2),f.ALo(3,"datePipe"),f.ALo(4,"betterDate"),f.ALo(5,"datePipe"),f.ALo(6,"betterDate"),f.qZA(),f.TgZ(7,"p",199),f._uU(8),f.qZA(),f.TgZ(9,"ul",200),f.TgZ(10,"h5",201),f._uU(11),f.qZA(),f.TgZ(12,"li",202),f.TgZ(13,"label",203),f._uU(14),f.qZA(),f.TgZ(15,"span",204),f._uU(16),f.qZA(),f.qZA(),f.TgZ(17,"li",202),f.TgZ(18,"label",203),f._uU(19),f.qZA(),f.TgZ(20,"span",204),f._uU(21),f.ALo(22,"date"),f.qZA(),f.qZA(),f.TgZ(23,"li",202),f.TgZ(24,"label",203),f._uU(25),f.qZA(),f.TgZ(26,"span",204),f._uU(27),f.qZA(),f.qZA(),f.TgZ(28,"li",202),f.TgZ(29,"label",203),f._uU(30),f.qZA(),f.TgZ(31,"span",204),f._uU(32),f.qZA(),f.qZA(),f.TgZ(33,"h5",201),f._uU(34),f.qZA(),f.TgZ(35,"li",202),f.TgZ(36,"label",203),f._uU(37),f.qZA(),f.TgZ(38,"span",204),f._uU(39),f.qZA(),f.qZA(),f.TgZ(40,"li",202),f.TgZ(41,"label",203),f._uU(42),f.qZA(),f.TgZ(43,"span",204),f._uU(44),f.ALo(45,"date"),f.qZA(),f.qZA(),f.TgZ(46,"li",202),f.TgZ(47,"label",203),f._uU(48),f.qZA(),f.TgZ(49,"span",204),f._uU(50),f.qZA(),f.qZA(),f.TgZ(51,"li",202),f.TgZ(52,"label",203),f._uU(53),f.qZA(),f.TgZ(54,"span",204),f._uU(55),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.oxw();f.xp6(2),f.AsE("",e.request_time?f.xi3(3,21,f.lcZ(4,24,e.request_time),"d/M/yyyy"):"-"," ",e.trip_time?f.xi3(5,26,f.lcZ(6,29,e.trip_time),"hh:mm a"):""," "),f.xp6(6),f.hij("",null==e.selectedFlightObj||null==e.selectedFlightObj.airline?null:e.selectedFlightObj.airline.name," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.departure," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.actual?f.xi3(22,31,null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.departure&&e.selectedFlightObj.departure.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.departure?null:e.selectedFlightObj.departure.gate:"-"," "),f.xp6(2),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.arrival," "),f.xp6(3),f.hij("",null==e.currentLanguage?null:e.currentLanguage.location," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.iata?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.iata:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.time," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.actual?f.xi3(45,34,null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.actual,"dd/MM/yyyy hh:mm:ss a"):"-"," "),f.xp6(4),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.terminal," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.terminal?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.terminal:"-"," "),f.xp6(3),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.gate," "),f.xp6(2),f.hij(" ",null!=e.selectedFlightObj&&null!=e.selectedFlightObj.arrival&&e.selectedFlightObj.arrival.gate?null==e.selectedFlightObj||null==e.selectedFlightObj.arrival?null:e.selectedFlightObj.arrival.gate:"-"," ")}}function Rd(e,t){1&e&&f._UZ(0,"span",209)}function zd(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",4),f._UZ(2,"input",210),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(2,pd,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.enter_value)}}function Jd(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",208),f.TgZ(2,"div",211),f.TgZ(3,"ng2-flatpickr",212),f.NdJ("onChange",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw().onDateChange(t,i)}),f.qZA(),f.TgZ(4,"span",213),f._UZ(5,"i",214),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(2),f.Q6J("ngClass",f.VKq(2,pd,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("config",t.dateFormatConfig)}}function Bd(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",4),f._UZ(2,"ng-select",215),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(4,pd,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("items",e.value.options)("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("multiple",!0)}}function Yd(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",4),f._UZ(2,"ng-select",216),f.qZA(),f.BQk()),2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(1),f.Q6J("ngClass",f.VKq(3,pd,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid))),f.xp6(1),f.Q6J("notFoundText",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("items",e.value.options)}}function Qd(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",189),f.TgZ(2,"div",217),f.TgZ(3,"a",218),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;
1return f.oxw().decrement(t)}),f._uU(4,"-"),f.qZA(),f._UZ(5,"input",219),f.TgZ(6,"a",195),f.NdJ("click",function(){f.CHM(e);const t=f.oxw().index;return f.oxw().increment(t)}),f._uU(7,"+"),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw().$implicit,t=f.oxw();let i;f.xp6(2),f.Q6J("ngClass",f.VKq(1,pd,t.formSubmited&&e.value.is_mandatory&&(null==(i=e.get("value"))?null:i.invalid)))}}function Hd(e,t){1&e&&f._UZ(0,"i",232)}function $d(e,t){1&e&&f._UZ(0,"i",233)}function Gd(e,t){1&e&&(f.TgZ(0,"span"),f._uU(1,"Upload"),f.qZA())}function Kd(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"button",234),f.NdJ("click",function(){f.CHM(e),f.oxw();const t=f.MAs(11),i=f.oxw().index;return f.oxw().removeDocumentFile(i,t)}),f._UZ(1,"i",235),f.qZA()}}function Wd(e,t){if(1&e){const e=f.EpF();f.ynx(0),f.TgZ(1,"div",220),f.TgZ(2,"div",221),f.TgZ(3,"div",222),f.YNc(4,Hd,1,0,"i",223),f.TgZ(5,"span",224),f._uU(6),f.qZA(),f.qZA(),f.TgZ(7,"label",225),f.YNc(8,$d,1,0,"i",35),f.YNc(9,Gd,2,0,"span",16),f.TgZ(10,"input",226,227),f.NdJ("change",function(t){f.CHM(e);const i=f.oxw().index;return f.oxw().documentFileChangeEvent(t,i)}),f.qZA(),f.qZA(),f.YNc(12,Kd,2,0,"button",228),f.qZA(),f._UZ(13,"input",229),f._UZ(14,"input",230),f.TgZ(15,"p",231),f._uU(16,"* Max file size should be 21 MB"),f.qZA(),f.qZA(),f.BQk()}if(2&e){const e=f.oxw(),t=e.$implicit,i=e.index,n=f.oxw();let o;f.xp6(1),f.Q6J("ngClass",f.VKq(14,pd,n.formSubmited&&t.value.is_mandatory&&(null==(o=t.get("value"))?null:o.invalid))),f.xp6(2),f.ekj("has-file",!!n.documentFileNames[i]),f.xp6(1),f.Q6J("ngIf",n.documentFileNames[i]),f.xp6(2),f.hij(" ",n.documentFileNames[i]||"No file chosen"," "),f.xp6(1),f.ekj("is-loading",n.documentUploadLoading[i])("is-disabled",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",n.documentUploadLoading[i]),f.xp6(1),f.Q6J("ngIf",!n.documentUploadLoading[i]),f.xp6(1),f.Q6J("id","documentUpload_wh_"+i)("disabled",n.documentUploadLoading[i]),f.xp6(2),f.Q6J("ngIf",n.documentFileNames[i]&&!n.documentUploadLoading[i])}}function Xd(e,t){if(1&e&&(f.ynx(0,119),f.TgZ(1,"div",205),f.TgZ(2,"label",206),f._uU(3),f.qZA(),f.YNc(4,Rd,1,0,"span",207),f.TgZ(5,"div",208),f.YNc(6,zd,3,4,"ng-container",16),f.YNc(7,Jd,6,4,"ng-container",16),f.YNc(8,Bd,3,6,"ng-container",16),f.YNc(9,Yd,3,5,"ng-container",16),f.YNc(10,Qd,8,3,"ng-container",16),f.YNc(11,Wd,17,16,"ng-container",16),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.$implicit,i=t.index,n=f.oxw();f.Q6J("formGroupName",i),f.xp6(3),f.Oqu(e.value.label),f.xp6(1),f.Q6J("ngIf",e.value.is_mandatory),f.xp6(2),f.Q6J("ngIf",e.value.field_type==n.TEXT_BOX_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DATE_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.MULTI_SELECT_FIELD),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DROPDOWN_FIELD),f.xp6(1),f.Q6J("ngIf",5==e.value.field_type),f.xp6(1),f.Q6J("ngIf",e.value.field_type==n.DOCUMENT_FIELD)}}function ec(e,t){1&e&&f._UZ(0,"i",233)}function tc(e,t){1&e&&f.GkF(0)}function ic(e,t){1&e&&(f.TgZ(0,"div",111),f._UZ(1,"div",112),f.qZA())}function nc(e,t){if(1&e&&(f.TgZ(0,"span",257),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.from,"")}}function oc(e,t){if(1&e&&(f.TgZ(0,"span",258),f._uU(1),f.ALo(2,"roundFraction"),f.ALo(3,"bookingTotalFare"),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(2,2,f.xi3(3,5,e,t.returnEnable),t.roundFormate),"")}}function ac(e,t){if(1&e&&(f.TgZ(0,"span",258),f._uU(1),f.qZA()),2&e){const e=f.oxw(3);f.xp6(1),f.hij(" ",null==e.currentLanguage?null:e.currentLanguage.meter,"")}}function rc(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",259),f.TgZ(1,"div",260),f.NdJ("click",function(){f.CHM(e);const t=f.oxw(2).$implicit;return f.oxw().toggleCollapse(t)}),f._UZ(2,"i",261),f.qZA(),f.qZA()}if(2&e){const e=f.oxw(2).$implicit;f.xp6(2),f.Q6J("ngClass",e.isCollapsed?"fa fa-angle-down":"fa fa-angle-up")}}function lc(e,t){if(1&e&&(f.TgZ(0,"div",252),f.TgZ(1,"span",253),f.YNc(2,nc,2,1,"span",254),f.YNc(3,oc,4,8,"span",255),f.YNc(4,ac,2,1,"span",255),f.qZA(),f.YNc(5,rc,3,1,"div",256),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.xp6(2),f.Q6J("ngIf","Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2==(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2===(null==e.pricing?null:e.pricing.calculation_type)),f.xp6(1),f.Q6J("ngIf",3!==(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",3===(null==e.pricing?null:e.pricing.calculation_method)),f.xp6(1),f.Q6J("ngIf",("Y"==(null==e||null==e.pricing?null:e.pricing.zone_price_applied)?2!=(null==e||null==e.pricing||null==e.pricing.zone_price_model?null:e.pricing.zone_price_model.calculation_type):2!=(null==e||null==e.pricing?null:e.pricing.calculation_type))&&"Y"==t.fareAccebility)}}function sc(e,t){if(1&e&&(f.TgZ(0,"td",264),f._uU(1),f.TgZ(2,"span",265),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function uc(e,t){if(1&e&&(f.TgZ(0,"td",264),f._uU(1),f.TgZ(2,"span",265),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.zone_price,": "),f.xp6(2),f.hij(" ",null!=e&&e.zone_price?null==e?null:e.zone_price:"","")}}function dc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.minimum_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate):"0","")}}function cc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null!=e&&null!=e.pricing&&e.pricing.base_fare?f.xi3(5,3,null==e||null==e.pricing?null:e.pricing.base_fare,t.roundFormate):"0","")}}function hc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate),"")}}function gc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate),"")}}function pc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate),"")}}function mc(e,t){if(1&e&&(f.ynx(0),f.YNc(1,dc,6,6,"div",272),f.YNc(2,cc,6,6,"div",272),f.YNc(3,hc,6,6,"div",272),f.YNc(4,gc,6,6,"div",272),f.YNc(5,pc,6,6,"div",272),f.BQk()),2&e){const e=f.oxw(2).$implicit;f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.surge_fare)}}function _c(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",275),f.TgZ(2,"span",270),f._uU(3),f.qZA(),f.TgZ(4,"span",33),f._uU(5),f.ALo(6,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(7,"div",275),f.TgZ(8,"span",270),f._uU(9),f.qZA(),f.TgZ(10,"span",33),f._uU(11),f.ALo(12,"roundFraction"),f.qZA(),f.qZA(),f.TgZ(13,"div",275),f.TgZ(14,"span",270),f._uU(15),f.qZA(),f.TgZ(16,"span",33),f._uU(17),f.ALo(18,"roundFraction"),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw(3).$implicit,n=f.oxw();f.xp6(3),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.min_hours?null==n.currentLanguage?null:n.currentLanguage.min_hours:"Minimum Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",e.minHours?f.xi3(6,9,e.minHours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.no_of_hours?null==n.currentLanguage?null:n.currentLanguage.no_of_hours:"No. of Hours",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",null!=i&&i.pricing.selected_hours?f.xi3(12,12,null==i?null:i.pricing.selected_hours,n.roundFormate):0,""),f.xp6(4),f.hij("+ ",null!=n.currentLanguage&&n.currentLanguage.hourly_rate?null==n.currentLanguage?null:n.currentLanguage.hourly_rate:"Hourly Rate",""),f.xp6(2),f.AsE("",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(18,15,e.hourlyRate,n.roundFormate),"")}}function fc(e,t){if(1&e&&(f.ynx(0),f.YNc(1,_c,19,18,"ng-container",16),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(1),f.Q6J("ngIf",t.hourlyPackageCardDisplay(e))}}function vc(e,t){if(1&e&&(f.TgZ(0,"div",267),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.out_of_service_area_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.out_of_service_area_charges,t.roundFormate),"")}}function yc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.zone_extra_charge,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges,t.roundFormate),"")}}function bc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);
1f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_passenger_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraPassengerCharge,e.roundFormate)," ")}}function xc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.extra_luggage_charge,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.totalExtraLuggageCharge,e.roundFormate),"")}}function kc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.previous_dues),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.walletBalance,e.roundFormate),"")}}function Zc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).$implicit,t=f.oxw();f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e?null:e.final_fare.tax_amount,t.roundFormate),"")}}function Cc(e,t){if(1&e&&(f.TgZ(0,"div",276),f.TgZ(1,"span",33),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",277),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",33),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(3);f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function Fc(e,t){if(1&e&&(f.TgZ(0,"div",278),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3);f.xp6(2),f.hij("+ ",null==e.currentLanguage?null:e.currentLanguage.other_charges,""),f.xp6(2),f.AsE("",null==e.currentCompanyDetail?null:e.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,e.otherChargePrice,e.roundFormate),"")}}function Tc(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(3);f.xp6(1),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,2,null==e?null:e.charges,t.roundFormate),"")}}function Ac(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.ALo(2,"roundFraction"),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(3);f.xp6(1),f.lnq("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol,"",f.xi3(2,3,null==e?null:e.charges,t.roundFormate)," (",(null==e?null:e.charge_value)+"%",")")}}function Pc(e,t){if(1&e&&(f.ynx(0),f._uU(1),f.BQk()),2&e){const e=f.oxw(2).$implicit,t=f.oxw(3);f.xp6(1),f.lnq(" (",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",null==e?null:e.charge_value," ",t.distance_unit?(null==t.currentLanguage?null:t.currentLanguage.per)+" "+t.distance_unit:null==t.currentLanguage?null:t.currentLanguage.per_km,")")}}function wc(e,t){if(1&e&&(f.TgZ(0,"div",280),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f.YNc(4,Tc,3,5,"ng-container",16),f.YNc(5,Ac,3,6,"ng-container",16),f._UZ(6,"div",158),f.YNc(7,Pc,2,3,"ng-container",16),f.qZA(),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw(3);f.xp6(2),f.Oqu(t.getOtherChargeBreakdownLabel(e)),f.xp6(2),f.Q6J("ngIf",2==(null==e?null:e.charge_type)||3==(null==e?null:e.charge_type)),f.xp6(1),f.Q6J("ngIf",1==(null==e?null:e.charge_type)),f.xp6(2),f.Q6J("ngIf",3==(null==e?null:e.charge_type))}}function qc(e,t){if(1&e&&(f.TgZ(0,"div"),f.YNc(1,wc,8,4,"div",279),f.qZA()),2&e){const e=t.$implicit;f.xp6(1),f.Q6J("ngIf",e&&(e.checked||e.is_required))}}function Dc(e,t){if(1&e&&(f.TgZ(0,"td",264),f._uU(1),f.TgZ(2,"span",265),f._uU(3),f.ALo(4,"number"),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(4,3,2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_distance:t.returnotherDetails.ride_distance,"1.1-1")," ",t.distance_unit," ")}}function Oc(e,t){if(1&e&&(f.TgZ(0,"td",264),f._uU(1),f.TgZ(2,"span",265),f._uU(3),f.qZA(),f.qZA()),2&e){const e=f.oxw(3).$implicit,t=f.oxw();f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?t.returnotherDetails.bike_ride_time:t.returnotherDetails.ride_time," ",null==t.currentLanguage?null:t.currentLanguage.min," ")}}function Lc(e,t){if(1&e&&(f.TgZ(0,"td",264),f._uU(1),f.TgZ(2,"span",265),f._uU(3),f.ALo(4,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(3);
1f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.surge_price," : "),f.xp6(2),f.hij(" ",f.xi3(4,2,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function Mc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.min_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.minimum_fare,t.roundFormate)," ")}}function Vc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.base_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.pricing?null:e.pricing.base_fare,t.roundFormate)," ")}}function Sc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.distance_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.distance_fare,t.roundFormate)," ")}}function Ec(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.time_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.time_fare,t.roundFormate)," ")}}function Uc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw(2).ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.surge_fare,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.surge_fare,t.roundFormate)," ")}}function Nc(e,t){if(1&e&&(f.ynx(0),f.YNc(1,Mc,6,6,"div",272),f.YNc(2,Vc,6,6,"div",272),f.YNc(3,Sc,6,6,"div",272),f.YNc(4,Ec,6,6,"div",272),f.YNc(5,Uc,6,6,"div",272),f.BQk()),2&e){const e=f.oxw().ngIf;f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.minimum_fare),f.xp6(1),f.Q6J("ngIf",null==e.pricing?null:e.pricing.base_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.distance_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.time_fare),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare)}}function Ic(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(3);f.xp6(2),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.tax_title,""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.tax_amount,t.roundFormate)," ")}}function jc(e,t){if(1&e&&(f.TgZ(0,"div",276),f.TgZ(1,"span",33),f._uU(2," \xa0\xa0 "),f.TgZ(3,"i",277),f._uU(4,"\xa0"),f.qZA(),f._uU(5),f.qZA(),f.TgZ(6,"span",33),f._uU(7),f.ALo(8,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(4);f.xp6(5),f.hij(" ",null==e?null:e.tax_name," "),f.xp6(2),f.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol,"",f.xi3(8,3,null==e?null:e.value,i.roundFormate)," ")}}function Rc(e,t){if(1&e&&(f.TgZ(0,"div",275),f.TgZ(1,"span",270),f._uU(2),f.qZA(),f.TgZ(3,"span",33),f._uU(4),f.ALo(5,"roundFraction"),f.qZA(),f.qZA()),2&e){const e=f.oxw().ngIf,t=f.oxw(3);f.xp6(2),f.hij("- ",(null==t.currentLanguage?null:t.currentLanguage.return_trip_discount)||"Return Trip Discount",""),f.xp6(2),f.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(5,3,null==e.final_fare?null:e.final_fare.return_trip_discount,t.roundFormate)," ")}}const zc=function(){return["hourly","package"]};
1function Jc(e,t){if(1&e&&(f.ynx(0),f.TgZ(1,"div",281),f.TgZ(2,"div",267),f.TgZ(3,"span",268),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"table",263),f.TgZ(6,"thead"),f.TgZ(7,"tr"),f.YNc(8,Dc,5,6,"td",266),f.YNc(9,Oc,4,3,"td",266),f.qZA(),f.TgZ(10,"tr"),f.YNc(11,Lc,5,5,"td",266),f.qZA(),f.qZA(),f.qZA(),f.TgZ(12,"div",267),f.TgZ(13,"span"),f._uU(14),f.qZA(),f.qZA(),f.TgZ(15,"div",267),f.TgZ(16,"span",268),f._uU(17),f.qZA(),f.TgZ(18,"span",268),f._uU(19),f.qZA(),f.qZA(),f.YNc(20,Nc,6,5,"ng-container",16),f.TgZ(21,"div",269),f.TgZ(22,"span",270),f._uU(23),f.qZA(),f.TgZ(24,"span",33),f._uU(25),f.ALo(26,"roundFraction"),f.qZA(),f.qZA(),f.YNc(27,Ic,6,6,"div",272),f.YNc(28,jc,9,6,"div",273),f.YNc(29,Rc,6,6,"div",272),f.TgZ(30,"div",269),f.TgZ(31,"span",270),f._uU(32),f.qZA(),f.TgZ(33,"span",33),f._uU(34),f.ALo(35,"roundFraction"),f.ALo(36,"returnTripFareTotal"),f.qZA(),f.qZA(),f.qZA(),f.BQk()),2&e){const e=t.ngIf,i=f.oxw(2).$implicit,n=f.oxw();f.xp6(4),f.AsE(" ",(null==n.currentLanguage?null:n.currentLanguage.return)||"Return"," ",(null==n.currentLanguage?null:n.currentLanguage.trip)||"Trip"," "),f.xp6(4),f.Q6J("ngIf",n.returnotherDetails),f.xp6(1),f.Q6J("ngIf",n.returnotherDetails),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(3),f.hij("Note: ",null==n.currentLanguage?null:n.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.price_breakdown," "),f.xp6(2),f.hij(" ",null==n.currentLanguage?null:n.currentLanguage.rate," "),f.xp6(1),f.Q6J("ngIf",!f.DdM(26,zc).includes(n.bookingTypeKey)),f.xp6(3),f.hij("+ ",null==n.currentLanguage?null:n.currentLanguage.trip_fare,""),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(26,18,null==e.final_fare?null:e.final_fare.amount,n.roundFormate)," "),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.return_trip_discount),f.xp6(3),f.Oqu(null==n.currentLanguage?null:n.currentLanguage.final_fare),f.xp6(2),f.AsE(" ",null==n.currentCompanyDetail?null:n.currentCompanyDetail.currency_symbol," ",f.xi3(35,21,f.lcZ(36,24,i),n.roundFormate)," ")}}const Bc=function(e,t){return{collapse:e,show:t}},Yc=function(){return["hourly"]};function Qc(e,t){if(1&e&&(f.TgZ(0,"div",262),f.TgZ(1,"table",263),f.TgZ(2,"thead"),f.TgZ(3,"tr"),f.TgZ(4,"td",264),f._uU(5),f.TgZ(6,"span",265),f._uU(7),f.ALo(8,"number"),f.qZA(),f.qZA(),f.TgZ(9,"td",264),f._uU(10),f.TgZ(11,"span",265),f._uU(12),f.qZA(),f.qZA(),f.qZA(),f.TgZ(13,"tr"),f.YNc(14,sc,5,5,"td",266),f.YNc(15,uc,4,2,"td",266),f.qZA(),f.qZA(),f.qZA(),f.TgZ(16,"div",267),f.TgZ(17,"span"),f._uU(18),f.qZA(),f.qZA(),f.TgZ(19,"div",267),f.TgZ(20,"span",268),f._uU(21),f.qZA(),f.TgZ(22,"span",268),f._uU(23),f.qZA(),f.qZA(),f.YNc(24,mc,6,5,"ng-container",16),f.YNc(25,fc,2,1,"ng-container",16),f.TgZ(26,"div",269),f.TgZ(27,"span",270),f._uU(28),f.qZA(),f.TgZ(29,"span",33),f._uU(30),f.ALo(31,"roundFraction"),f.qZA(),f.qZA(),f.YNc(32,vc,6,6,"div",271),f.YNc(33,yc,6,6,"div",272),f.YNc(34,bc,6,6,"div",272),f.YNc(35,xc,6,6,"div",272),f.YNc(36,kc,6,6,"div",272),f.YNc(37,Zc,6,6,"div",272),f.YNc(38,Cc,9,6,"div",273),f.YNc(39,Fc,6,6,"div",274),f.YNc(40,qc,2,1,"div",185),f.TgZ(41,"div",269),f.TgZ(42,"span",270),f._uU(43),f.qZA(),f.TgZ(44,"span",33),f._uU(45),f.ALo(46,"roundFraction"),f.qZA(),f.qZA(),f.YNc(47,Jc,37,27,"ng-container",16),f.qZA()),2&e){const e=f.oxw().$implicit,t=f.oxw();f.Q6J("ngClass",f.WLB(39,Bc,!e.isCollapsed,e.isCollapsed)),f.xp6(5),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.distance," : "),f.xp6(2),f.AsE(" ",f.xi3(8,30,2==(null==e?null:e.vehicle_type_category)?t.otherDetails.bike_ride_distance:t.otherDetails.ride_distance,"1.1-1")," ",t.distance_unit,""),f.xp6(3),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.time," : "),f.xp6(2),f.AsE(" ",2==(null==e?null:e.vehicle_type_category)?t.otherDetails.bike_ride_time:t.otherDetails.ride_time," ",null==t.currentLanguage?null:t.currentLanguage.min,""),f.xp6(2),f.Q6J("ngIf",null==e.final_fare?null:e.final_fare.surge_fare),f.xp6(1),f.Q6J("ngIf",null==e?null:e.zone_price),f.xp6(3),f.hij("Note: ",null==t.currentLanguage?null:t.currentLanguage.fare_breakdown_note,""),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.price_breakdown),f.xp6(2),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.rate),f.xp6(1),f.Q6J("ngIf",!f.DdM(42,zc).includes(t.bookingTypeKey)),f.xp6(1),f.Q6J("ngIf",f.DdM(43,Yc).includes(t.bookingTypeKey)),f.xp6(3),f.hij("+ ",null==t.currentLanguage?null:t.currentLanguage.trip_fare,""),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(31,33,null==e||null==e.final_fare?null:e.final_fare.amount,t.roundFormate),""),f.xp6(2),f.Q6J("ngIf",null==e?null:e.final_fare.out_of_service_area_charges),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.zone_extra_charges),f.xp6(1),f.Q6J("ngIf",t.totalExtraPasse
1ngerCharge),f.xp6(1),f.Q6J("ngIf",t.totalExtraLuggageCharge),f.xp6(1),f.Q6J("ngIf",t.walletBalance<0),f.xp6(1),f.Q6J("ngIf",null==e||null==e.final_fare?null:e.final_fare.tax_amount),f.xp6(1),f.Q6J("ngForOf",null==e?null:e.tax_list),f.xp6(1),f.Q6J("ngIf",t.otherChargePrice),f.xp6(1),f.Q6J("ngForOf",t.otherChargesArray),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.final_fare),f.xp6(2),f.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.currency_symbol," ",f.xi3(46,36,t.finalFare,t.roundFormate),""),f.xp6(2),f.Q6J("ngIf",t.returnEnable&&(null==e||null==e.pricing?null:e.pricing.return_trip_pricing))}}const Hc=function(e){return{"list-focus":e}};function $c(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"ul",236),f.TgZ(1,"li",237),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw().changeVehicle(t)}),f.TgZ(2,"div",238),f.TgZ(3,"div"),f._UZ(4,"img",239),f.qZA(),f.TgZ(5,"div",240),f.TgZ(6,"p",241),f._uU(7),f.qZA(),f.TgZ(8,"p",242),f._uU(9),f.qZA(),f.TgZ(10,"div",131),f.TgZ(11,"p",243),f.O4$(),f.TgZ(12,"svg",244),f._UZ(13,"path",245),f.qZA(),f.kcU(),f.TgZ(14,"span",246),f.TgZ(15,"span"),f._uU(16),f.qZA(),f._uU(17," - "),f.TgZ(18,"span"),f._uU(19),f.qZA(),f.qZA(),f.qZA(),f.TgZ(20,"p",247),f.O4$(),f.TgZ(21,"svg",248),f._UZ(22,"path",249),f.qZA(),f.kcU(),f.TgZ(23,"span",246),f.TgZ(24,"span"),f._uU(25),f.qZA(),f._uU(26," - "),f.TgZ(27,"span"),f._uU(28),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(29,lc,6,4,"div",250),f.qZA(),f.YNc(30,Qc,48,44,"div",251),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(10,Hc,e.checked)),f.xp6(3),f.Q6J("src",null!=e&&e.vehicle_image?null==e?null:e.vehicle_image:"assets/img/car_image.png",f.LSH),f.xp6(3),f.hij(" ",e.title,""),f.xp6(2),f.Oqu((null==e?null:e.description)||""),f.xp6(7),f.Oqu(e.capacity),f.xp6(3),f.Oqu(e.max_capacity),f.xp6(6),f.Oqu(e.vehicle_luggage_capacity),f.xp6(3),f.Oqu(e.max_luggage_capacity),f.xp6(1),f.Q6J("ngIf",i.showTripPrice),f.xp6(1),f.Q6J("ngIf",i.showTripPrice)}}function Gc(e,t){if(1&e&&(f.TgZ(0,"ng-option",177),f._uU(1),f.qZA()),2&e){const e=t.$implicit,i=f.oxw(2);f.Q6J("value",null==e?null:e.id),f.xp6(1),f.xDo(" ",0==(null==e?null:e.slot_distance)?(null==i.currentLanguage?null:i.currentLanguage.unlimited)||"Unlimited":null==e?null:e.slot_distance," ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.distance_unit," | ",null==e?null:e.slot_hours," h | ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",null==e?null:e.slot_amount," ")}}function Kc(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",188),f.TgZ(1,"div",282),f.TgZ(2,"ng-select",283),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changePackages(),t.onInputChange(t.addForm.controls.packages)}),f.YNc(3,Gc,2,6,"ng-option",176),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(3,pd,e.formErrors.packages)),f.xp6(1),f.Q6J("formControl",e.addForm.controls.packages),f.xp6(1),f.Q6J("ngForOf",e.rentalPackages)}}function Wc(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",188),f.TgZ(1,"div",282),f.TgZ(2,"ng-select",284),f.NdJ("change",function(){f.CHM(e);const t=f.oxw();return t.changeHours(),t.onInputChange(t.addForm.controls.hour)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngClass",f.VKq(4,pd,e.formErrors.hour)),f.xp6(1),f.Q6J("placeholder",null==e.currentLanguage?null:e.currentLanguage.select_hour)("items",e.hoursArray)("formControl",e.addForm.controls.hour)}}function Xc(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",285),f.TgZ(1,"div",173),f.TgZ(2,"span",213),f._UZ(3,"i",286),f.qZA(),f.TgZ(4,"ng-select",287),f.NdJ("change",function(t){return f.CHM(e),f.oxw().onFilterChange(t,0)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Q6J("items",e.numberFilter)("formControl",e.addForm.controls.no_of_passenger)}}function eh(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",285),f.TgZ(1,"div",173),f.TgZ(2,"span",213),f._UZ(3,"i",288),f.qZA(),f.TgZ(4,"ng-select",287),f.NdJ("change",function(t){return f.CHM(e),f.oxw().onFilterChange(t,1)}),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(4),f.Q6J("items",e.luggageArray)("formControl",e.addForm.controls.trip_luggage)}}function th(e,t){if(1&e&&f._uU(0),2&e){const e=t.item;f.hij(" ",null==e?null:e.charges_key," ")}}function ih(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",282),f.TgZ(1,"ng-select",289),f.NdJ("change",function(t){return f.CHM(e),f.oxw().setPaymentMode(t)}),f.YNc(2,th,1,1,"ng-template",290),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("ngClass",f.VKq(6,pd,e.formErrors.paymentMode)),f.xp6(1),f.Q6J("items",e.paymentMode)("searchable",!1)("clearable",!1)("notFoundText",null==e.currentLanguage?null:e.currentLanguage.no_data_found)("formControl",e.addForm.controls.payment_mode_id
1)}}function nh(e,t){1&e&&f.GkF(0)}function oh(e,t){1&e&&(f.TgZ(0,"div",111),f._UZ(1,"div",112),f.qZA())}function ah(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"app-yelowcab-login",291),f.NdJ("callBackObject",function(t){return f.CHM(e),f.oxw().showLoginSingUpPage(t)}),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("isOtpVerification",e.isOtpVerification)}}const rh=function(e,t){return{background:e,color:t}};function lh(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",8),f.TgZ(1,"label",292),f._uU(2),f.qZA(),f.TgZ(3,"div",293),f.TgZ(4,"div",294),f.TgZ(5,"input",295),f.NdJ("change",function(){return f.CHM(e),f.oxw().onTripTypeChange("normal")}),f.qZA(),f.TgZ(6,"label",296),f._uU(7),f.qZA(),f.qZA(),f.TgZ(8,"div",297),f.TgZ(9,"input",298),f.NdJ("change",function(){return f.CHM(e),f.oxw().onTripTypeChange("business")}),f.qZA(),f.TgZ(10,"label",299),f._uU(11),f.qZA(),f.qZA(),f.qZA(),f.TgZ(12,"div",300),f.TgZ(13,"button",301),f.NdJ("click",function(){return f.CHM(e),f.oxw().backToCustomerInfo()}),f._uU(14),f.qZA(),f.TgZ(15,"button",302),f.NdJ("click",function(){return f.CHM(e),f.oxw().continueFromCustomerStep()}),f._uU(16),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.select_trip_type),f.xp6(3),f.Q6J("checked","normal"===e.tripType),f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.normal_trip),f.xp6(2),f.Q6J("checked","business"===e.tripType),f.xp6(2),f.Oqu(null==e.currentLanguage?null:e.currentLanguage.business_trip),f.xp6(3),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.back)||"Back"," "),f.xp6(1),f.Akn(f.WLB(9,rh,(null==e.themeCodeData?null:e.themeCodeData.user_primary_color)+"!important",null==e.themeCodeData?null:e.themeCodeData.user_secondary_color)),f.xp6(1),f.hij(" ",(null==e.currentLanguage?null:e.currentLanguage.continue)||(null==e.currentLanguage?null:e.currentLanguage.continue_booking)," ")}}function sh(e,t){1&e&&f.GkF(0)}function uh(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"app-payment-gatway-list",303),f.NdJ("paymentSucsessBook",function(t){return f.CHM(e),f.oxw().afterPaymentSucsess(t)})("closePaymentMethod",function(t){return f.CHM(e),f.oxw().openPaymentGateway(t)})("requestBooking",function(){return f.CHM(e),f.oxw().onStripeRequestBooking()}),f.qZA()}if(2&e){const e=f.oxw();f.Q6J("pre_payment",e.pre_payment)("pre_payment_value",e.pre_payment_value)("tripPayload",e.tripPayload)("FinalFare",e.returnEnable?e.totalFInalFare:e.finalFare)("hideStyle",!0)("is_yelowCab",!0)("trip_id",e.tripId)("trip_num",e.trip_number)}}function dh(e,t){1&e&&f.GkF(0)}function ch(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",309),f.TgZ(1,"input",310),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(3).changeQueuePickup(t)}),f.qZA(),f.TgZ(2,"div",311),f.TgZ(3,"div",312),f.TgZ(4,"div",313),f.TgZ(5,"h4",314),f._uU(6),f.qZA(),f.TgZ(7,"div",315),f.TgZ(8,"div",316),f.TgZ(9,"span",258),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.title),f.xp6(4),f.Oqu(e.address)}}function hh(e,t){if(1&e&&(f.TgZ(0,"div",307),f.YNc(1,ch,11,4,"label",308),f.qZA()),2&e){const e=f.oxw(2);f.xp6(1),f.Q6J("ngForOf",e.queuePikupStandList)}}function gh(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"div",304),f.TgZ(1,"div",62),f.TgZ(2,"form",63),f.TgZ(3,"div",64),f.TgZ(4,"div",65),f.TgZ(5,"h4",66),f._uU(6,"Select Pickup Stand"),f.qZA(),f.TgZ(7,"button",305),f.TgZ(8,"span",68),f._uU(9,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(10,hh,2,1,"div",69),f.TgZ(11,"div",70),f.TgZ(12,"button",306),f.NdJ("click",function(){return f.CHM(e),f.oxw().pickUpStandFormSubmit()}),f._uU(13," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=f.oxw();f.xp6(10),f.Q6J("ngIf",e.queuePikupStandList.length>0),f.xp6(2),f.Q6J("disabled",!e.pickUpStandForm.valid)}}function ph(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",309),f.TgZ(1,"input",310),f.NdJ("click",function(){const t=f.CHM(e).$implicit;return f.oxw(2).fixZone(t)}),f.qZA(),f.TgZ(2,"div",311),f.TgZ(3,"div",312),f.TgZ(4,"div",313),f.TgZ(5,"h4",314),f._uU(6),f.qZA(),f.TgZ(7,"div",315),f.TgZ(8,"div",316),f.TgZ(9,"span",258),f._uU(10),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&e){const e=t.$implicit,i=t.first;f.xp6(1),f.Q6J("checked",i)("value",e),f.xp6(5),f.Oqu(e.from_zone_title),f.xp6(4),f.Oqu(e.dropoff_location)}}function mh(e,t){if(1&e&&(f.TgZ(0,"div",307),f.YNc(1,ph,11,4,"label",308),f.qZA()),2&e){const e=f.oxw();f.xp6(1),f.Q6J("ngForOf",e.zonePriceData)}}function _h(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",317),f.TgZ(1,"h6",318),f._uU(2),f.qZA(),f.TgZ(3,"p",319),f._uU(4),f.qZA(),f.TgZ(5,"input",320),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserPickupLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",158),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;
1f.xp6(2),f.hij("",null==e?null:e.location_type_name," "),f.xp6(2),f.Oqu(null==e?null:e.address),f.xp6(1),f.MGl("id","p-",i,"")}}function fh(e,t){if(1&e){const e=f.EpF();f.TgZ(0,"label",317),f.TgZ(1,"h6",318),f._uU(2),f.qZA(),f.TgZ(3,"p",319),f._uU(4),f.qZA(),f.TgZ(5,"input",321),f.NdJ("change",function(){const t=f.CHM(e),i=t.index,n=t.$implicit;return f.oxw().updateUserDropoffLocation(i+1,n)}),f.qZA(),f._UZ(6,"div",158),f.qZA()}if(2&e){const e=t.$implicit,i=t.index;f.xp6(2),f.Oqu(null==e?null:e.location_type_name),f.xp6(2),f.Oqu(e.address),f.xp6(1),f.MGl("id","d-",i,"")}}const vh=function(e,t,i,n){return{"booking-form-w-booking":e,"booking-form":t,"hidden-width":i,"default-width":n}},yh=function(e,t){return{"booking-form-center booking-form-center-w-booking":e,"overflow-auto":t}},bh=function(e){return{"booking-form-inner booking-form-inner-w-booking":e}},xh=function(){return{active:"pickup"}},kh=function(e){return{"booking-form-center booking-form-center-w-booking":e}},Zh=function(e,t){return{"booking-form-inner-w-booking":e,"w-100":t}},Ch=function(){return{active:"details"}},Fh=function(){return{active:"service"}},Th=function(){return{active:"customer"}},Ah=function(){return{active:"payment"}},Ph=function(){return{active:"checkout"}},wh=[{path:"ride/add",component:Xi,canActivate:[_.a]},{path:"ride/booking",component:Wi,canActivate:[_.a]},{path:"ride/corporate",component:(()=>{class e{constructor(e,t,i,n,o,a,r,l,s,u,d,c){this.authService=e,this.cd=t,this.yelowCabService=i,this.fb=n,this.taxiBookingService=o,this.yelowBookingService=a,this.toasterService=r,this.googleService=l,this.route=s,this.jwtService=u,this.Router=d,this.zoneUtilityService=c,this.DriverKeyUp=new x.xQ,this.DriverKeyUp2=new x.xQ,this.DriverKeyUp1=new x.xQ,this.DriverKeyUpReturn=new x.xQ,this.DriverKeyUpReturnDest=new x.xQ,this.formErrors={pickup_location:"",destination:"",request_time:"",start_date:"",end_date:"",paymentMode:"",paymentStatus:"",driver:"",apierror:"",corporate:"",inActive:"Corporate is InActive please Activate it",recurring_time:"",recurring_on:"",first_name:"",last_name:"",email:"",phone_no:"",dial_code:"",notes:"",return_time:"",employee:"",booking_type_id:"",hour:"",packages:""},this.rentalPackages=[],this.isCollapsed=!0,this.passengerType="MYSELF",this.storeOldVehiclePrice=0,this.skipLogin=!1,this.isOtpVerification=!1,this.isBookingHold=!1,this.tripPropertiesIds=[],this.zoneIds=[],this.title="Template 5",this.hideBasicPage=!1,this.hideUserPage=!0,this.isFirstPart=!0,this.hidePayment=!0,this.hideSuccess=!0,this.channelPaymentType=null,this.channelPaymentTypeLabel=null,this.steps=[],this.currentStepIndex=0,this.no_of_passenger=1,this.trip_luggage=0,this.displayChidSheet=!1,this.displayBoosterSheet=!1,this.displayFlightNumber=!1,this.YELOWCAB_SERVICE_TYPE=14,this.otherChargArray=[],this.otherChargesArray=[],this.tripOtherCharges=[],this.loadingState=!1,this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.selectedOtherChargesArray=[],this.placeSearch=new x.xQ,this.responseFlight=[],this.key="e903329db5f17ff850162f4e8c872651",this.checkFligth=!1,this.transactionCategory=[],this.showCode=!1,this.booking_type_id=null,this.formSubmited=!1,this.submitFirstPart=!1,this.checkpointsArrayNew=[],this.getWayPoint=[],this.timeFormatConfig2={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(e){this.request_time=e;const t=new Date(e[0])||null;this.addForm.controls.request_time.setValue(t),this.setDateintime()}}},this.Customer_id=null,this.zoneData={from:null,to:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null,from_ids:null,to_ids:null},this.returnzoneData={from:null,to:null,from_ids:null,to_ids:null,from_title:null,to_title:null,zone_price:null,zone_price_applied:null},this.paymentMode=[],this.allPaymentModes=[],this.allRideTypes=[],this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.zoneCutOffMinutes=null,this.requestTimeMinDate=null,this.pickupRegionFound=!0,this.pickupZoneFound=!0,this.dropRegionFound=!0,this.dropZoneFound=!0,this.showNextButton=!0,this.sameZoneTripRestricted=!1,this.regionResponse=[],this.totalExtraPasse
1ngerCharge=0,this.totalExtraLuggageCharge=0,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.clearPickup=!1,this.searchText=null,this.selectedCheckpointsArray=[],this.vehicleArray=[],this.filterVehicleArray=[],this.origin=w.jQ,this.queuePikupList=[],this.queuePikupData=null,this.queuePikupStandList=[],this.queuePikupFound=!1,this.selectQueuePickup=!1,this.checkOnlyPickupConfig="N",this.selectedPickupPoint=null,this.selectedUserPickupLocation=null,this.selectedUserDropoffLocation=null,this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[],this.locationTypeList=[{type_id:1,title:"Home"},{type_id:2,title:"Work"},{type_id:3,title:"Other"}],this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.zoneResponse=[],this.driverArray=[],this.autoDispatch=!0,this.onlineDriver=1,this.genderValue="M",this.queueId=null,this.checkpointValidity={},this.checkOutofServiceArea=!1,this.lastCheckPointValid=!0,this.skip_destination=!1,this.clearDestination=!1,this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.rideType=w.xk,this.corporateBookingConfirmation="N",this.bookingAssetsList=[],this.driverType=[],this.selectedTab=1,this.isCorporateModuleActive=!1,this.showTripTypeSelection=!1,this.tripType="normal",this.corporate_id=null,this.budget_visible=!1,this.budget_type=null,this.isPriceVisibleToEmployee=!0,this.isNotesRequired=!1,this.customerStepCompleted=!1,this.corporatePropeties=null,this.companyNowLaterAllowed=!0,this.savedRequestMode=null,this.savedRequestModeSchedule=null,this.schedule_trip=!1,this.schedule_tripArray=null,this.requestMode="N",this.is_date=!1,this.marker=[],this.timeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onChange:e=>{e&&(console.log("selectedDates",e),this.selectedRequestTime=e)}},this.luggageArray=[],this.numberFilter=[],this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.returnEnable=!1,this.checkReturnTimeConfig=!1,this.returnFinalFare=0,this.returnTripDiscount=0,this.store_ride_distance=0,this.store_bike_distance=0,this.store_distance=0,this.startingFrom=!1,this.otherChargePrice=0,this.tripOtherChargePrice=0,this.queryParam={},this.returnDateFormatConfig={enableTime:!1,time_24hr:!1,dateFormat:"d/m/Y",minDate:"today",minuteIncrement:1,position:"auto",static:!0,disableMobile:!0,plugins:[D()({confirmIcon:"<i class='fa fa-check'></i>",confirmText:"OK",showAlways:!1,theme:"light"})],onClose:e=>{if(null==e?void 0:e.length){const t=new Date(e[0]);this.return_date=t,this.addForm.controls.return_date.setValue(t),this.setReturnTimeFromDate()}}},this.returnTimeFormatConfig={time_24hr:!1,dateFormat:"h:i K",enableTime:!0,noCalendar:!0,appendTo:document.body,position:"below left",disableMobile:!0,onClose:e=>{if(null==e?void 0:e.length){const t=new Date(e[0]);this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t)}}},this.walletBalance=0,this.vehicleTypeArray=[],this.zonePropertiesIds=[],this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.TEXT_BOX_FIELD=1,this.DATE_FIELD=2,this.MULTI_SELECT_FIELD=3,this.DROPDOWN_FIELD=4,this.DOCUMENT_FIELD=6,this.documentUploadLoading={},this.documentFileNames={},this.isDocumentUploading=!1,this.DOCUMENT_MAX_FILE_SIZE=22020096,this.dateFormatConfig={dateFormat:"d/m/Y",time_24hr:!1,enableTime:!1},this.displayLoginForm=!0,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.selectedButtonSingAUpLogin={button_id:1},this.currentUserDetail=null,this.content="",this.bookingTypeKey=null,this.hoursArray=[{name:"1 hrs",value:1},{name:"2 hrs",value:2},{name:"3 hrs",value:3},{name:"4 hrs",value:4},{name:"5 hrs",value:5},{name:"6 hrs",value:6},{name:"7 hrs",value:7},{name:"8 hrs",value:8},{name:"9 hrs",value:9},{name:"10 hrs",value:10},{name:"11 hrs",value:11},{name:"12 hrs",value:12},{name:"13 hrs",value:13},{name:"14 hrs",value:14},{name:"15 hrs",value:15},{name:"16 hrs",value:16},{name:"17 hrs",value:17},{name:"18 hrs",value:18},{name:"19 hrs",value:19},{name:"20 hrs",value:20},{name:"21 hrs",value:21},{name:"22 hrs",value:22},{name:"23 hrs",value:23},{name:"24 hrs",value:24}],this.trip_number=null,this.gender=O.y7,this.genderTab="M",this.is_full_screen=!0,this.hours_pricing=0,this.package_pricing=0,this.agentMinDistance=0,this.agentLogin=!1,this.disableBtn=!1,this.vehicleTypes=[{title:"Sedan"},{title:"SUV"},{title:"Luxury"},{title:"Van"}],this.allocation_type=null}getZonePricingParams(){return this.isBusinessTrip&&this.corporate_id?{corporate_id:this.corporate_id}:{}}get isBusinessTrip(){return"business"===this.tripType&&!!this.corporate_id&&this.isCorporateModuleActive}get showPaymentStep(){return!this.isBusinessTrip}get showTripPrice(){return!this.isBusinessTrip||this.isPriceVisibleToEmployee}getStepClass(e){return e===this.currentStepIndex?"active-web-booking":e<this.currentStepIndex?"completed-web-booking":"inactive-web-booking"}isStepCompleted(e){return e<this.currentStepIndex}ngOnDestroy(){this.sub&&this.sub.unsubscribe(),this.mapObs&&this.mapObs.unsubscribe()}ngAfterViewInit(){this.mapObs=this.authService.mapScriptLoad.subscribe(e=>{(null==e?void 0:e.is_load)&&this.patchDefaultUserLocation()})}patchDefaultUserLocation(){(null==navigator?void 0:navigator.geolocation)&&(null==navigator||navigator.geolocation.getCurrentPosition(e=>{e&&this.googleService.getAddressFromLatLng(e.coords.latitude,e.coords.longitude).then(e=>{var t,i,n,o,a,r,l,s;if(e){let u={full_text:null===(t=null==e?void 0:e.results[0])||void 0===t?void 0:t.formatted_address,place_id:null===(i=null==e?void 0:e.results[0])||void 0===i?void 0:i.place_id,latitude:null===(a=null===(o=null===(n=null==e?void 0:e.results[0])||void 0===n?void 0:n.geometry)||void 0===o?void 0:o.location)||void 0===a?void 0:a.lat(),longitude:null===(s=null===(l=null===(r=null==e?void 0:e.results[0])||void 0===r?void 0:r.geometry)||void 0===l?void 0:l.location)||void 0===s?void 0:s.lng()};this.searchEvent(u)}})}))}ngOnInit(){this.createForm(),this.route.queryParams.subscribe(e=>{console.log("Current queryParams >>>",e),e.agent_id&&(this.agent_id=e.agent_id,this.jwtService.saveAgentId(this.agent_id));const t=this.jwtService.getAgentId();this.agent_id=t,t&&e.agent_id!==t&&(this.agentLogin=!0,this.getCommisionDetail
1s(t),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:t},queryParamsHandling:"merge",replaceUrl:!0}))}),this.pickUpStandForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],pickup_latitude:[null],pickup_longitude:[null]}),this.validationMessages={first_name:{required:"Please enter First Name",whiteSpace:"* Space not allowed"},last_name:{required:"Please enter last name",whiteSpace:"* Space not allowed"},email:{required:"* Please enter email",validateEmail:"* Please enter valid email"},phone_no:{required:"Please enter phone number",minlength:"Please enter at least 6 digits",maxlength:"Please enter at most 11 digits"},dial_code:{required:"Please enter dial code",validateDialCode:"Please enter correct dial code"},pickup_location:{required:"Enter Your Pickup Location",whiteSpace:"* Space not allowed"},destination:{required:"Please enter destination",whiteSpace:"* Space not allowed"},ride_type:{required:"Please enter ride type"},request_time:{required:"Please enter request time "},return_time:{required:"Please select return date and time"},recurring:{required:"Extra charge per "},start_date:{required:"Extra charge start date"},end_date:{required:"Please select the end date"},days:{required:"Extra charge per luggage"},auto_dispatch:{required:"Please enter waiting time charge"},driver:{required:"Please select the driver"},paymentMode:{required:"Please provide the payment type"},paymentStatus:{required:"Please provide the payment type"},notes:{required:"Please enter notes"},corporate:{required:"Please enter Corporate"},recurring_time:{required:"Please select the time"},recurring_on:{required:"Please select the days"},employee:{required:"Please select Employee"},booking_type_id:{required:"Please select Booking type"},packages:{required:"Please select packages"},hour:{required:"Please select hour"}},this.initDefaultReturnDateTime(),this.authService.langaugeListSubject.subscribe(e=>{this.languageList=e,setTimeout(()=>{window.localStorage.getItem("query_language_code")&&(this.selectedLanguage=window.localStorage.getItem("query_language_code"),window.localStorage.removeItem("language_code"),this.changeLanguage())},500)}),this.sub=this.authService.langaugeSubjectData.subscribe(e=>{var t,i,n,o;this.currentLanguage=null==e?void 0:e.labels,this.selectedLanguage=null==e?void 0:e.language_code,this.steps=[{name:null===(t=this.currentLanguage)||void 0===t?void 0:t.quote_header,icon:"quote-icon",isActive:!1},{name:null===(i=this.currentLanguage)||void 0===i?void 0:i.transfer_header,icon:"transfer-icon",isActive:!0},{name:null===(n=this.currentLanguage)||void 0===n?void 0:n.payment_header,icon:"payment-icon",isActive:!1}],this.bookRideText=null===(o=this.currentLanguage)||void 0===o?void 0:o.book_ride}),this.authService.themeCode.subscribe(e=>{this.themeCodeData=e}),this.authService.currentUser.subscribe(e=>{e&&Object.keys(e).length>0&&(this.currentUserDetail=e,this.getUserLocations(e.id),this.queryParam.user_id=e.id,this.corporate_id=e.corporate_id||null,this.evaluateCorporateTripOptions())}),this.authService.currentCompany.subscribe(e=>{var t,i;e&&(null==e?void 0:e.company_id)&&(this.currentCompanyDetail=e,this.formatTimeDate=this.currentCompanyDetail.company_date_format+" "+this.currentCompanyDetail.company_time_format,this.roundFormate=null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.round_format,this.distance_unit=null===(i=this.currentCompanyDetail)||void 0===i?void 0:i.distance_unit,this.currentCompanyDetail.company_time_format.includes("a")||this.currentCompanyDetail.company_time_format.includes("A")||(this.timeFormatConfig.time_24hr=!0,this.timeFormatConfig.dateFormat="H:i",this.returnTimeFormatConfig.time_24hr=!0,this.returnTimeFormatConfig.dateFormat="H:i"),this.company_logo=e.company_logo,this.company_id=e.company_id,this.company_id&&(this.getPaymentConfig(),this.getVehicleType(this.company_id),this.getAllTripProperties(),this.getCustomeFields(),this.getRegionList(this.YELOWCAB_SERVICE_TYPE),this.ManagezoneData()),this.dialCode=e.country_dial_code,this.addForm.patchValue({dial_code:this.dialCode}))}),this.placeSearch.pipe((0,k.b)(300)).subscribe(e=>{this.searchFlight(e)}),this.checkModule(),this.DriverKeyUp.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName(e)}),this.DriverKeyUp2.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName2(e)}),this.DriverKeyUp1.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByName1(e)}),this.DriverKeyUpReturn.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturn(e)}),this.DriverKeyUpReturnDest.pipe((0,k.b)(300)).subscribe(e=>{this.searchDriverByNameReturnDest(e)})}
1getCommisionDetails(e){this.loadingState=!0,this.yelowBookingService.getCommisionById(e).subscribe(e=>{var t;this.loadingState=!1,console.log("response >>>>>>>>>. ",e),this.agentMinDistance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.trip_minimum_distance},e=>{})}searchDriverByName2(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t,i,n;(null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places)||void 0===i?void 0:i.length)>0&&(this.responseDatacheckPoint=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.places)})}searchDriverByName1(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataDestionation=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturn(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturn=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchDriverByNameReturnDest(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseDataReturnDestination=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}createForm(){this.addForm=this.fb.group({pickup_location:[null,r.kI.compose([r.kI.required])],destination:[null,r.kI.compose([b.Sl])],checkpoint:[null],ride_type:[1,r.kI.compose([r.kI.required])],request_time:[null],return_date:[null],return_trip_time:[null],return_time:[null],return_pickup_location:[null],return_pickup_latitude:[null],return_pickup_longitude:[null],return_destination:[null],return_dropoff_latitude:[null],return_dropoff_longitude:[null],recurring:[null],start_date:[null],auto_dispatch:[!1,r.kI.compose([r.kI.required])],driver:[null],notes:[null],checkpoints:this.fb.array([]),properties:this.fb.array([]),gender:["M"],end_date:[null],recurring_time:[null],recurring_on:[null],paymentMode:[1,r.kI.compose([r.kI.required])],payment_mode_id:[null,r.kI.compose([r.kI.required])],trip_luggage:[this.trip_luggage],no_of_passenger:[this.no_of_passenger],paymentStatus:["pending",r.kI.compose([r.kI.required])],customer:[null],first_name:[null],last_name:[null],email:[null],phone_no:[null],dial_code:[this.dialCode],booster_seat:[0],child_seat:[0],flight_number:[null],booking_type_id:[null,r.kI.compose([r.kI.required])],additional_discount:[null],additional_discount_type:[1],extra_charge_type:[1],trip_time:[null],hour:[null],packages:[null]}),this.getCategories()}checkModule(){this.authService.CommonModule.subscribe(e=>{e&&(this.checkFligth="Y"==(null==e?void 0:e.dspm_019),this.checkReturnTimeConfig=!!(null==e?void 0:e.dspm_012),this.key=null==e?void 0:e.dspm_019_01,this.isCorporateModuleActive="Y"==(null==e?void 0:e.cm_026),this.evaluateCorporateTripOptions())}),this.authService.serviceConfig.subscribe(e=>{var t,i;e&&(this.skipLogin="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_LOGIN],e.csc_064&&(this.isOtpVerification="Y"==e.csc_064),this.skip_destination=!!e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION]&&"Y"===e[F.kh[this.YELOWCAB_SERVICE_TYPE].SKIP_DESTINATION],this.updateDestiantionValidation(this.skip_destination),this.pre_payment_value=null!==(i=null!==(t=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PRE_PAYMENT])&&void 0!==t?t:e.dpsc_030)&&void 0!==i?i:e.tsc_030,this.pre_payment="1"==this.pre_payment_value||1==this.pre_payment_value,e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD]&&(this.paymentModeConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].PAYMENT_METHOD],this.applyPaymentModeConfig()),e.csc_041&&(this.checkRegion=e.csc_041),this.checkGenderEnable=e[F.kh[this.YELOWCAB_SERVICE_TYPE].SHOW_GENDER_OPTIONS],"Y"==this.checkRegion&&e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]&&(this.checkOnlyPickupConfig=e[F.kh[this.YELOWCAB_SERVICE_TYPE].CHECK_OUTSIDE_REQUEST]),(e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE]||e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE])&&(this.requestMode=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE],this.requestModeSchedule=e[F.kh[this.YELOWCAB_SERVICE_TYPE].REQUEST_MODE_SCHEDULE],this.savedRequestMode=this.requestMode,this.savedRequestModeSchedule=this.requestModeSchedule,this.companyNowLaterAllowed="Y"==this.requestMode||"Y"==this.requestModeSchedule,this.get
1SeduleConfige(!0)),this.allocation_type=e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.autoDispatch=3!=this.allocation_type,this.showCode="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].ALLOCATION_TYPE],this.displayLuggagePassenger="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].PassengerLuggage],e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]&&(this.fareAccebility=e[F.kh[this.YELOWCAB_SERVICE_TYPE].fareAccebility]),this.isBookingHold="Y"==e[F.kh[this.YELOWCAB_SERVICE_TYPE].HOLD_BOOKING])})}getMaxLuggagePassengerCapacity(){if(this.max_luggage_capacity_filter>0){this.luggageArray=[];for(let e=0;e<=this.max_luggage_capacity_filter;e++)this.luggageArray.push({id:e,name:`${e}`})}if(this.max_capacity_filter>=1){this.numberFilter=[];for(let e=1;e<=this.max_capacity_filter;e++)this.numberFilter.push({id:e,name:`${e}`})}}changeGender(e){this.genderValue=e,this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getCurrentStep(){return this.steps[this.currentStepIndex]}isCurrentStep(e){return e===this.currentStepIndex}getFormDetails(e){this.formData=e,this.no_of_passenger=null==e?void 0:e.no_of_passenger,this.trip_luggage=null==e?void 0:e.trip_luggage,this.isFirstPart=e.isFirstPart,this.firstPageData=e,e&&(this.hideBasicPage=!0,this.hideUserPage=!1),this.hidePayment=!0,this.currentStepIndex=1}editPage(e){this.currentStepIndex=0,this.isFirstPart=!0,this.hideUserPage=!0,this.hideBasicPage=!1,this.hidePayment=!0}goTripDetails(e){e&&(this.hidePayment=!0,this.hideUserPage=!1,this.currentStepIndex=1)}changeLanguage(){var e;localStorage.setItem("language_code",this.selectedLanguage);let t=this.languageList.find(e=>e.language_code==this.selectedLanguage);(null===(e=Object.keys(t))||void 0===e?void 0:e.length)>0&&this.authService.setlanguage([t])}displaySuccess(e){this.currentStepIndex=3,this.hidePayment=!0,this.hideSuccess=!1}displaySuccessresponse(e){var t;this.trip_id=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.booking_number}changeBookingType(e){this.booking_type_id=null,(null==e?void 0:e.id)&&(this.addForm.controls.booster_seat.setValue(0),this.addForm.controls.child_seat.setValue(0),this.addForm.controls.booster_seat.updateValueAndValidity(),this.addForm.controls.child_seat.updateValueAndValidity(),this.booking_type_id=null==e?void 0:e.id,this.bookingTypeKey=null==e?void 0:e.field_key,this.getotherCharges(null==e?void 0:e.id),this.getCustomeFields(),(this.pickup_latitude&&this.pickup_longitude||this.destination_latitude&&this.destination_longitude)&&(this.pickup_latitude&&this.pickup_longitude&&this.UpdateAndCheckPickUpLocation(this.pickup_latitude,this.pickup_longitude,!1),this.destination_latitude&&this.destination_longitude&&this.UpdateDestinationLocation(this.destination_latitude,this.destination_longitude,!1),this.bindMarkerPoints()),this.getFavoriteLocation(),this.selectedVehicleObj&&["hourly","package"].includes(null==e?void 0:e.field_key)&&this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj))}getCategories(){this.loadingState=!0,this.yelowCabService.getOtherCategoryList().subscribe(e=>{var t,i;if(this.loadingState=!1,e.status&&(this.transactionCategory=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list.filter(e=>e.is_active),this.transactionCategory.length>0)){let e=localStorage.getItem("booking_type_id");e?(this.booking_type_id=e,this.bookingTypeKey=null===(i=this.transactionCategory.find(t=>t.id==e))||void 0===i?void 0:i.field_key):(this.booking_type_id=this.transactionCategory[0].id,this.bookingTypeKey=this.transactionCategory[0].field_key),this.getFavoriteLocation(),this.getCustomeFields(),this.addForm.controls.booking_type_id.patchValue(this.booking_type_id),this.getotherCharges(this.booking_type_id)}},e=>{this.loadingState=!1})}getCustomeFields(){let e={service_type:this.YELOWCAB_SERVICE_TYPE,category_id:this.booking_type_id,company_id:JSON.parse(this.company_id),user_type:"0,3"};this.yelowCabService.getExtraFields(e).subscribe(e=>{var t;e.status&&(this.displayChidSheet=!1,this.displayBoosterSheet=!1,null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>("child_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayChidSheet=!0),"booster_seat"==(null==e?void 0:e.field_key)&&(null==e?void 0:e.is_active)&&(this.displayBoosterSheet=!0),e.checked=1==(null==e?void 0:e.is_required),Object.assign({},e))))})}getotherCharges(e){let t={service_type:this.YELOWCAB_SERVICE_TYPE,booking_type_id:e,is_active:1};this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.yelowCabService.getOtherChargesList(t).subscribe(e=>{var t,i;e.status&&(this.allOtherChargesArray=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list,this.otherChargesArray=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.list.map(e=>(e.charges=0,e.checked=!1,e.currentValue=0,this.otherChargArray[null==e?void 0:e.charges_key]=e,Object.assign({},e))).filter(e=>1==(null==e?void 0:e.charges_category)))}),this.cd.detectChanges()}checkOtherCharge(e,t){var i,n;this.otherChargesArray=null===(i=this.otherChargesArray)||void 0===i?void 0:i.map(e=>{var i,n;return(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_
1charges_id)&&(e.charges_key&&(null===(i=this.otherChargArray)||void 0===i?void 0:i[e.charges_key])&&(this.otherChargArray[e.charges_key].checked=!e.checked),e.checked=!e.checked,(0,S.Mf)(e)&&(e.currentValue=e.checked?Number(e.currentValue)>0?Number(e.currentValue):1:0,e.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[e.charges_key])&&(this.otherChargArray[e.charges_key].currentValue=e.currentValue))),Object.assign({},e)}),"booster_seat"==(null==t?void 0:t.charges_key)?(this.addForm.controls.booster_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.booster_seat.value):"child_seat"==(null==t?void 0:t.charges_key)&&(this.addForm.controls.child_seat.setValue((null==t?void 0:t.checked)?1:0),t.currentValue=this.addForm.controls.child_seat.value);const o=null===(n=this.otherChargesArray)||void 0===n?void 0:n.find(e=>(null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id));o&&(t.checked=o.checked,t.currentValue=o.currentValue),this.refreshOtherChargesFare()}checkTripOtherCharge(e,t){var i;this.tripOtherCharges=null===(i=this.tripOtherCharges)||void 0===i?void 0:i.map(e=>((null==e?void 0:e.other_charges_id)==(null==t?void 0:t.other_charges_id)&&(e.checked=!e.checked),Object.assign({},e)))}getFlight(e){var t,i,n;e?(this.addForm.patchValue({flight_number:null===(t=e.flight)||void 0===t?void 0:t.iata}),this.flightNumbers=e,this.selectedFlightObj=this.flightNumbers,this.selectedFlightObjName=null===(n=null===(i=this.selectedFlightObj)||void 0===i?void 0:i.flight)||void 0===n?void 0:n.iata):(this.addForm.patchValue({flight_number:null}),this.selectedFlightObj=null)}searchPlace(e){""!==e.trim()&&this.placeSearch.next({search:e})}searchFlight(e){e&&(this.loadingState=!0,this.taxiBookingService.getFlightInfoByNumber(null==e?void 0:e.search).subscribe(e=>{e.status?this.responseFlight[0]=e.data:this.responseFlight=[],this.loadingState=!1},()=>{this.loadingState=!1}))}incrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;null===(n=this.addForm.get(e))||void 0===n||n.setValue(a+1),t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value}decrementValue(e,t){var i,n,o;let a=(null===(i=this.addForm.get(e))||void 0===i?void 0:i.value)||0;a>0&&(null===(n=this.addForm.get(e))||void 0===n||n.setValue(a-1)),t.currentValue=null===(o=this.addForm.get(e))||void 0===o?void 0:o.value}increment(e){const t=this.properties.at(e).get("value");t.setValue(t.value?Number(t.value)+1:1)}get properties(){return this.addForm.get("properties")}decrement(e){const t=this.properties.at(e).get("value");t.value>0&&t.setValue(Number(t.value)-1)}onInputChange(e=null){e?this.generateErrors(e):Z.op._generateErrors(this.addForm,this.formErrors,this.validationMessages,this.formSubmited)}generateErrors(e){Z.op._generateErrors(e,this.formErrors,this.validationMessages,this.formSubmited)}getFavoriteLocation(){this.yelowCabService.getFavoriteLocationList(this.booking_type_id).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=e.data.location.map(e=>(e.latitude=parseFloat(e.latitude),e.longitude=parseFloat(e.longitude),e.full_text=e.address,delete e.address,e));t&&("airport_drop_off_transfer"!=this.bookingTypeKey?(this.responseData=t,this.responseDatacheckPoint=t):(this.responseData=[],this.responseDatacheckPoint=[]),this.responseDataDestionation="airport_pick_up_transfer"!=this.bookingTypeKey?t:[])}},e=>{})}searchDriverByName(e){this.taxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(e=>{var t;this.responseData=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.places})}searchEvent(e){e?(this.displayFlightNumber=!!e.full_text.toLowerCase().includes("airport")||!(!this.addForm.controls.destination.value||!this.addForm.controls.destination.value.toLowerCase().includes("airport")),this.onInputChange(this.addForm.controls.pickup_location),this.clearPickup=!1,this.submitFirstPart=!1,this.showNextButton=!1,this.addForm.controls.pickup_location.setValue(e.full_text),this.searchText=e.full_text,this.addForm.controls.pickup_location.updateV
1alueAndValidity(),e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickup_latitude=e.latitude,this.pickup_longitude=e.longitude,this.UpdateAndCheckPickUpLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.pickup_latitude=e.data.latitude,this.pickup_longitude=e.data.longitude,this.UpdateAndCheckPickUpLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.pickup_location.setValue(null),this.addForm.controls.pickup_location.updateValueAndValidity(),this.pickup_latitude=null,this.pickup_longitude=null,this.bindMarkerPoints(),this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.vehicleArray=[],this.filterVehicleArray=[],this.finalFare=0,this.clearPickup=!0)}bindMarkerPoints(){let e=[{lat:this.pickup_latitude,lng:this.pickup_longitude},{lat:this.destination_latitude,lng:this.destination_longitude}];const t=this.addForm.get("checkpoints");this.getWayPoint=[],this.selectedCheckpointsArray=[],t.value.map(i=>{this.getWayPoint.push({latitude:i.lat,longitude:i.lng}),e.push({lat:i.lat,lng:i.lng}),this.selectedCheckpointsArray.push({id:t.value.length,latitude:i.lat,longitude:i.lng})})}addMarker(e){this.marker=[],null==e||e.forEach((e,t)=>{if((null==e?void 0:e.lat)&&(null==e?void 0:e.lng)){let t={lat:Number(e.lat),lng:Number(e.lng)};this.marker.push({position:t})}}),this.marker.forEach((e,t)=>{e.addListener("dragend",e=>{let i=e.latLng,n=i.lat(),o=i.lng();this.googleService.getAddressFromLatLng(n,o).then(e=>{e&&(this.draggedMarkerObj={updateIndex:t,address:e.results[0].formatted_address,lat:n,lng:o},this.updateMarker(this.draggedMarkerObj))})})})}updateMarker(e){0==e.updateIndex?(this.addForm.controls.pickup_location.setValue(e.address),this.searchText=e.address,this.addForm.controls.pickup_location.updateValueAndValidity(),this.UpdateAndCheckPickUpLocation(e.lat,e.lng,!1)):1==e.updateIndex?(this.addForm.controls.destination.setValue(e.address),this.searchTextDestionation=e.address,this.addForm.controls.destination.updateValueAndValidity(),this.UpdateDestinationLocation(e.lat,e.lng,!1)):(this.currenCheckpointInput=e.updateIndex-1,this.updateCheckPoint(e.lat,e.lng,e.address))}getRegionList(e){this.yelowBookingService.getCompanyRegionList(e).subscribe(e=>{var t;e&&(this.regionResponse=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.list)||[])})}submitUserPickUpLocationForm(){if(this.selectedUserPickupLocation){let e=this.userPickipLocationsArray[this.selectedUserPickupLocation-1];e&&(this.pickup_latitude=parseFloat(e.latitude),this.pickup_longitude=parseFloat(e.longitude),this.searchText=e.address,this.searchEvent({latitude:this.pickup_latitude,longitude:this.pickup_longitude,full_text:e.address}))}this.closeUserPickupLocationForm()}closeUserPickupLocationForm(){$("#selectUserPickupLocation").modal("hide")}updateUserPickupLocation(e,t){this.selectedUserPickupLocation=e}updateUserDropoffLocation(e,t){this.selectedUserDropoffLocation=e}submitUserDropoffLocationForm(){if(this.selectedUserDropoffLocation){let e=this.userDropoffLocationsArray[this.selectedUserDropoffLocation-1];e&&(this.destination_latitude=parseFloat(e.latitude),this.destination_longitude=parseFloat(e.longitude),this.searchTextDestionation=e.address,this.searchEventDestination({latitude:this.destination_latitude,longitude:this.destination_longitude,full_text:e.address}))}this.closeUserDropoffLocationForm()}updateCheckPoint(e,t,i,n=!0){let o=!1;if("Y"==this.checkRegion){for(let i of this.regionResponse)o||(o=(0,Z.eD)(e.toFixed(5),t.toFixed(5),(0,C.U)(i.geofence)),this.selectedCheckPointRegionData=i);!0===o?(this.showNextButton=!0,this.updateDestiantionValidation(!1),this.checkPointsValidation(),this.updateRegionPointValiation()):"N"==this.checkOnlyPickupConfig?(this.showNextButton=!1,this.lastCheckPointValid=!1,this.checkOutofServiceArea=!1):(this.checkOutofServiceArea=!0,this.showNextButton=!0,this.lastCheckPointValid=!1)}else this.showNextButton=!0,this.lastCheckPointValid=!0;this.updateCheckPoints(i,e,t,this.currenCheckpointInput-1)}UpdateAndCheckPickUpLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){var i;n.pickup_latitude=e,n.pickup_longitude=t;let o=!1;
1if("Y"==n.checkRegion){for(let e of n.regionResponse)o||(o=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.selectedPickupRegionData=e);!0===o?(n.showNextButton=!0,n.pickupRegionFound=!0,n.checkDropUpLocation(n.origin.is_pickUp)):(n.pickupRegionFound=o,n.showNextButton=!1),n.updateRegionPointValiation()}else n.showNextButton=!0,n.pickupRegionFound=!0;if(n.fixZoneDisableDropoff=!1,n.zoneData.from=null,n.zoneData.from_title=null,n.zoneData.from_obj=null,n.zoneData.from_ids=null,n.pickupRegionFound?(yield n.zoneUtilityService.findPickupZone(n.pickup_latitude,n.pickup_longitude,n.zoneResponse,n.zoneData,()=>n.getZonePrice(),()=>{},n.getZonePricingParams()),(null===(i=n.zoneData)||void 0===i?void 0:i.from_ids)?n.loadZoneConfigurationForPickup(String(n.zoneData.from_ids)):n.resetZoneBookingOptions()):n.resetZoneBookingOptions(),n.addZoneOtherCharges(),n.queuePikupFound=!1,n.queuePikupList.length>0)for(let e of n.queuePikupList)n.queuePikupFound=(0,Z.eD)(n.pickup_latitude,n.pickup_longitude,(0,C.U)(e.geofence)),n.queuePikupData=n.queuePikupFound?e:null;n.queuePikupData?n.getQueuePickupLatLong(n.queuePikupData.pickup_stand_id):n.queuePikupStandList=[],1===n.onlineDriver&&!n.autoDispatch&&n.getOnlineDriver(),n.updateSameZoneTripRestriction()})()}setAutoDispatch(e){this.autoDispatch=e,this.autoDispatch?(this.addForm.get("driver").setValidators([]),this.addForm.get("driver").setValue(null)):(this.getOnlineDriver(),this.addForm.get("driver").setValidators([r.kI.required])),this.addForm.get("driver").updateValueAndValidity()}setOnlineDriver(e){this.onlineDriver=e,this.addForm.controls.driver.reset(),this.driverArray=[],1==this.onlineDriver?this.getOnlineDriver():this.getDriverList(null)}getOnlineDriver(){if(this.onlineDriverArray=[],this.pickup_latitude&&this.pickup_longitude){let e={company_id:this.currentCompanyDetail.company_id,latitude:this.pickup_latitude,longitude:this.pickup_longitude,service_type:this.YELOWCAB_SERVICE_TYPE};"Y"==this.checkGenderEnable&&(e.gender=this.genderValue),this.taxiBookingService.getNearByOnlineDriverList(e).subscribe(e=>{if(this.loadingState=!1,e.success||e.status){let t=[],i=[];e.data.forEach(e=>{(null==e?void 0:e.driver_id)&&t.push(null==e?void 0:e.driver_id),(null==e?void 0:e.distance)&&(i[null==e?void 0:e.driver_id]=1===this.currentCompanyDetail.distanceUnit_s_key_value?(null==e?void 0:e.distance).toFixed(2):(.621371192*(null==e?void 0:e.distance)).toFixed(2))}),this.getUserDetails(t,i)}else this.onlineDriverArray=[]})}else this.toasterService.error("Enter Your Pickup Location")}getUserDetails(e,t){if((null==e?void 0:e.length)>0){const i=null==e?void 0:e.join(",");this.yelowBookingService.getUserDetails(i).subscribe(e=>{e.status&&(this.driverArray=null==e?void 0:e.data.map(e=>(e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} ${(null==e?void 0:e.dial_code)?"("+(null==e?void 0:e.dial_code):""} ${(null==e?void 0:e.phone_number)?(null==e?void 0:e.phone_number)+")":""} ) ${t[e.id]} ${this.currentCompanyDetail.distance_unit}`,e)))})}}getDriverList(e){if(2===this.onlineDriver||3==this.allocation_type){let t={company_id:this.currentCompanyDetail.company_id,is_active:1};e&&e.term?t.search=e.term:this.driverArray=[],"Y"==this.checkGenderEnable&&(t.gender=this.genderValue),this.yelowBookingService.getDriversList(t).subscribe(e=>{var t;this.loadingState=!1,e.success||e.status?(this.driverArray=null===(t=e.data)||void 0===t?void 0:t.list,this.driverArray.forEach(e=>{e.label=`${null==e?void 0:e.first_name} ${null==e?void 0:e.last_name} (${null==e?void 0:e.dial_code} ${null==e?void 0:e.phone_number})`})):this.driverArray=[]})}}getZonePrice(){this.yelowCabService.getZoneprice({from_zone_id:this.zoneData.from,dropoff_type:2,is_active:1}).subscribe(e=>{e.status?(this.zonePriceData=e.data.list,this.fixZonePriceData=this.zonePriceData[0],this.zonePriceData.length>0?(this.fixZoneDisableDropoff=!0,$("#fixdestination").modal("show")):(this.fixZonePriceData=null,this.fixZoneDisableDropoff=!1)):(this.zonePriceData=[],this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null)})}
1getQueuePickupLatLong(e){this.yelowBookingService.getPikupPointsById(e).subscribe(e=>{var t,i;if(1===e.status){if(this.queuePikupStandList=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pickup_point,this.queuePikupStandList.length>0){let t=this.queuePikupStandList[0];this.pickUpStandForm.patchValue({pickup_location:t.address,pickup_latitude:t.latitude,pickup_longitude:t.longitude}),this.queueId=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.queue_id,this.pickup_longitude=t.longitude,this.pickup_latitude=t.latitude}}else this.queuePikupStandList=[]})}OnSearchCheckpoint(e){""!==e.trim()&&this.DriverKeyUp2.next(e)}removeRow(e){this.currenCheckpointInput=null;const t=this.addForm.get("checkpoints");this.selectedCheckpointsArray.pop({id:t.controls.length,latitude:null,longitude:null}),t.removeAt(e),this.checkPointsValidation(!0),this.updateCheckPointsRegion(),this.cd.detectChanges(),this.bindMarkerPoints(),this.selectedCheckpointsArray.length<1&&(this.updateDestiantionValidation(this.skip_destination),this.onInputChange(this.addForm.controls.destination))}updateDestiantionValidation(e){e?(this.addForm.controls.destination.setValidators(null),this.addForm.controls.destination.updateValueAndValidity()):(this.addForm.controls.destination.setValidators(r.kI.required),this.addForm.controls.destination.updateValueAndValidity())}addNewRow(){const e=this.addForm.get("checkpoints");"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?this.selectedPickupRegionData?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location"):this.pickup_latitude&&this.pickup_longitude?this.validateCheckPoint(e):this.toasterService.error("Enter Your Pickup Location")}validateCheckPoint(e){e.valid&&(e.controls.length<=2?e.controls.length>0&&!e.at(e.controls.length-1).valid?this.toasterService.error("Your Previous checkpoints is invali
1d!"):(e.push(this.initRows()),this.cd.detectChanges(),this.selectedCheckpointsArray.push({id:e.controls.length,latitude:null,longitude:null})):this.toasterService.error("You can only add maximum three checkpoints!"))}initRows(){return new r.cw({value:new r.NI(null,r.kI.compose([r.kI.required])),lat:new r.NI(null),lng:new r.NI(null),pickupLacation:new r.NI(this.selectedPickupRegionData),dropofupLacation:new r.NI(this.selectedDropRegionData),zone_array:new r.NI(this.regionResponse),checkRegion:new r.NI(this.checkRegion),checkOnlyPickup:new r.NI(this.checkOnlyPickupConfig)},{validators:C.v.is_point})}OnSearchDestination(e){""!==e.trim()&&this.DriverKeyUp1.next(e)}updateCheckPoints(e,t,i,n){const o=this.addForm.get("checkpoints");for(var a=0;a<o.length;a++)a==n&&o.at(a).patchValue({value:e,lat:t,lng:i});this.updateCheckPointsRegion(),setTimeout(()=>{this.bindMarkerPoints()},200)}updateCheckPointsRegion(){let e=this.addForm.get("checkpoints").value.map(e=>({latitude:Number(e.lat),longitude:Number(e.lng)}));this.checkpointValidity={},e.forEach("Y"===this.checkRegion?(e,t)=>{let i=!1;for(let n of this.regionResponse){const t=(0,C.U)(n.geofence);if((0,Z.eD)(e.latitude,e.longitude,t)){i=!0;break}}this.checkpointValidity[t]=i}:(e,t)=>{this.checkpointValidity[t]=!0})}searchEventCheckpoint(e,t){this.submitFirstPart=!1,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?this.updateCheckPoints(e.full_text,e.latitude,e.longitude,t):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(i=>{i.status&&i.data.latitude&&i.data.longitude&&this.updateCheckPoints(e.full_text,i.data.latitude,i.data.longitude,t)})}openUserPickupLocationForm(){$("#selectUserPickupLocation").modal("show")}OnSearch(e){""!==e.trim()&&this.DriverKeyUp.next(e)}checkDropUpLocation(e){this.selectedPickupRegionData&&this.selectedDropRegionData&&(this.selectedDropRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id?(e===this.origin.is_drop&&(this.dropRegionFound="Y"==this.checkOnlyPickupConfig),e===this.origin.is_pickUp&&(this.pickupRegionFound="Y"==this.checkOnlyPickupConfig),this.showNextButton="Y"==this.checkOnlyPickupConfig):(e===this.origin.is_drop&&(this.dropRegionFound=!0),e===this.origin.is_pickUp&&(this.pickupRegionFound=!0),this.showNextButton=!0)),this.selectedCheckPointRegionData&&this.selectedDropRegionData&&this.selectedPickupRegionData&&this.checkPointsValidation()}checkPointsValidation(e=null){this.selectedPickupRegionData&&this.selectedCheckPointRegionData?this.selectedCheckPointRegionData&&this.selectedPickupRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):this.selectedCheckPointRegionData&&this.selectedDropRegionData?this.selectedCheckPointRegionData.company_region_id!=this.selectedDropRegionData.company_region_id&&(this.showNextButton=!1,this.lastCheckPointValid=!1):(!this.selectedPickupRegionData||!this.selectedDropRegionData&&!1===this.skip_destination)&&(this.showNextButton=!1):this.showNextButton="Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig,e&&(this.showNextButton=this.selectedDropRegionData&&this.selectedPickupRegionData?this.selectedDropRegionData.company_region_id==this.selectedPickupRegionData.company_region_id:"Y"!=this.checkRegion||"N"!=this.checkOnlyPickupConfig)}UpdateDestinationLocation(e,t,i=!0){var n=this;return(0,y.Z)(function*(){n.destination_latitude=e,n.destination_longitude=t,Number(n.destination_latitude).toFixed(5),Number(n.destination_longitude).toFixed(5);let i=!1;if("Y"==n.checkRegion){for(let e of n.regionResponse)i||(i=(0,Z.eD)(n.destination_latitude.toFixed(5),n.destination_longitude.toFixed(5),(0,C.U)(e.geofence)),n.selectedDropRegionData=e);!0===i?(n.showNextButton=!0,n.checkDropUpLocation(n.origin.is_drop),n.updateRegionPointValiation()):"N"==n.checkOnlyPickupConfig?(n.dropRegionFound=!1,n.showNextButton=!1,n.checkOutofServiceArea=!1):(n.checkOutofServiceArea=!0,n.dropRegionFound=!0,n.showNextButton=!0)}else n.showNextButton=!0,n.dropRegionFound=!0;n.zoneData.to=null,n.zoneData.to_title=null,n.zoneData.to_obj=null,n.zoneData.to_ids=null,n.dropRegionFound&&(yield n.zoneUtilityService.findDropoffZone(n.destination_latitude,n.destination_longitude,n.zoneResponse,n.zoneData,()=>{},n.getZonePricingParams())),n.addZoneOtherCharges(),n.updateSameZoneTripRestriction()})()}updateRegionPointValiation(){const e=this.addForm.get("checkpoints");if(e.controls.length>
10)for(let t of e.controls)"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?(t.patchValue({pickupLacation:this.selectedPickupRegionData,dropofupLacation:this.selectedDropRegionData}),t.setValidators(C.v.is_point)):(t.setValidators([]),t.setValidators(null)),t.updateValueAndValidity()}addZoneOtherCharges(){let e=this.allOtherChargesArray.filter(e=>{var t,i;let n=null==e?void 0:e.zone_id;return null!==n&&(n===(null===(t=this.zoneData)||void 0===t?void 0:t.to)&&2==(null==e?void 0:e.zone_type)||n===(null===(i=this.zoneData)||void 0===i?void 0:i.from)&&1==(null==e?void 0:e.zone_type))});this.otherChargesArray=this.allOtherChargesArray.filter(e=>1==(null==e?void 0:e.charges_category)),this.otherChargesArray=[...this.otherChargesArray,...e],this.cd.detectChanges()}ManagezoneData(){this.yelowCabService.getZoneList().subscribe(e=>{e&&(this.zoneResponse=e.data.list)})}getUserLocations(e){this.userPickipLocationsArray=[],this.userDropoffLocationsArray=[]}searchEventDestination(e){e?(this.clearDestination=!1,this.submitFirstPart=!1,this.onInputChange(this.addForm.controls.destination),this.showNextButton=!1,this.addForm.controls.destination.setValue(e.full_text),this.displayFlightNumber=!!e.full_text.toLowerCase().includes("airport")||!(!this.addForm.controls.pickup_location.value||!this.addForm.controls.pickup_location.value.toLowerCase().includes("airport")),this.addForm.controls.destination.updateValueAndValidity(),this.searchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.destination_latitude=e.latitude,this.destination_longitude=e.longitude,this.UpdateDestinationLocation(e.latitude,e.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{e.status&&(this.destination_latitude=e.data.latitude,this.destination_longitude=e.data.longitude,this.UpdateDestinationLocation(e.data.latitude,e.data.longitude,!1),this.bindMarkerPoints(),this.showNextButton=!0)})):(this.addForm.controls.destination.setValue(null),this.addForm.controls.destination.updateValueAndValidity(),this.destination_latitude=null,this.destination_longitude=null,this.bindMarkerPoints(),this.clearDestination=!0,this.selectedVehicleObjName=null,this.selectedVehicleObj=null)}openUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("show")}closeUserDropoffLocationForm(){$("#selectUserDropoffLocation").modal("hide")}changeSelectedTab(e,t=!0){this.isBusinessTrip&&"Y"==this.corporateBookingConfirmation&&1==e||(1==e?(this.driverType=[{type_id:1,type_name:"Online Driver"}],this.isSchedual_trip=0,this.resetRequestTimeToInitialNow()):(this.driverType=[{type_id:1,type_name:"Online Driver"},{type_id:2,type_name:"All Driver"}],this.isSchedual_trip=1),this.addForm.controls.ride_type.setValue(e),this.selectedTab=e,2===this.selectedTab&&(this.zoneConfigActive?this.applyRequestTimeMinDate():this.getSeduleConfige(!1)),this.updateRecurringValidations(e,this.addForm))}resetRequestTimeToInitialNow(){this.setMinTime();const e=new Date(this.trip_time);this.request_time=e,this.addForm.controls.request_time.setValue(e),this.addForm.controls.request_time.updateValueAndValidity(),this.addForm.controls.trip_time.setValue(e),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(e)),this.returnEnable&&this.initDefaultReturnDateTime()}updateRecurringValidations(e,t){if(3===e)t.get("recurring_time").setValidators([r.kI.required]),t.get("recurring_time").updateValueAndValidity(),t.get("end_date").setValidators([r.kI.required]),t.get("end_date").updateValueAndValidity();else{t.controls.recurring_time.clearValidators(),t.get("recurring_time").updateValueAndValidity(),t.controls.end_date.clearValidators(),t.get("end_date").updateValueAndValidity();try{t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}catch(i){t.get("recurring_on").clearValidators(),t.get("recurring_on").updateValueAndValidity()}}}
1getSeduleConfige(e=!0){this.yelowBookingService.scheduleconFig({company_id:this.currentCompanyDetail.company_id},F.kh[this.YELOWCAB_SERVICE_TYPE].SCHEDULE_MODULE).subscribe(t=>{if(this.loadingState=!1,t.success||t.status){if(this.schedule_tripArray=t.data,this.schedule_tripArray.length>0){this.schedule_trip=!0;for(let e of this.schedule_tripArray)e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].TIMEOUT?this.addMinutes(Number(e.config_value),null):e.config_key==F.kh[this.YELOWCAB_SERVICE_TYPE].MAX_TIME&&this.addMinutes(null,Number(e.config_value));e&&!this.zoneConfigActive&&("Y"==this.requestMode&&"Y"==this.requestModeSchedule?(this.rideType=[{type_id:1,type_name:"Now"},{type_id:2,type_name:"Later"}],this.setRideType(1)):"Y"==this.requestModeSchedule?(this.rideType=[{type_id:2,type_name:"Later"}],this.setRideType(2)):"Y"==this.requestMode&&(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1)))}else this.zoneConfigActive||(this.rideType=[{type_id:1,type_name:"Now"}],this.setRideType(1));this.zoneConfigActive||(this.allRideTypes=[...this.rideType]),(this.zoneCutOffMinutes||2===this.selectedTab)&&this.applyRequestTimeMinDate()}})}addMinutes(e=null,t=null){if(e&&(this.min_date=e,this.request_time=new Date,this.setMinTime(),this.timeFormatConfig.minDate=new Date(new Date(this.trip_time).setSeconds(0,0)),this.timeFormatConfig2.minDate=new Date(new Date(this.trip_time).setHours(0,0,0,0)),this.request_time=this.trip_time,this.addForm.controls.request_time.setValue(this.trip_time)),t){this.max_date=t;let e=new Date(L().add(this.max_date,"minutes").toString()).setHours(23,59,59,999);this.timeFormatConfig2.maxDate=new Date(e),this.timeFormatConfig.maxDate=new Date(e)}this.is_date=!0}setRideType(e){this.selectedTab=e,this.isSchedual_trip=1==e?0:1,this.addForm.controls.ride_type.setValue(e),this.addForm.controls.ride_type.updateValueAndValidity(),2===e&&this.applyRequestTimeMinDate()}onFilterChange(e,t){var i;0==t?this.no_of_passenger=e.id:this.trip_luggage=e.id;const n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.id;this.filterVehicleArray=this.vehicleArray.filter(e=>e.max_capacity>=this.no_of_passenger&&e.max_luggage_capacity>=this.trip_luggage);const o=this.filterVehicleArray.find(e=>(null==e?void 0:e.id)==n)||this.filterVehicleArray[0];if(!o)return this.selectedVehicleObj=null,void(this.selectedVehicleObjName=null);this.changeVehicle(o)}changeVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A;if(this.filterVehicleArray.forEach(t=>{t.id==e.id?(t.final_fare_amount=(null==t?void 0:t.capacity)<this.no_of_passenger?t.final_fare_amount-this.totalExtraPassengerCharge+t.pricing.extra_charge_per_passenger*(this.no_of_passenger-(null==t?void 0:t.capacity)):t.final_fare_amount-this.totalExtraPassengerCharge,t.final_fare_amount=(null==t?void 0:t.vehicle_luggage_capacity)<this.trip_luggage?t.final_fare_amount-this.totalExtraLuggageCharge+t.pricing.extra_charge_per_luggage*(this.trip_luggage-t.vehicle_luggage_capacity):t.final_fare_amount-this.totalExtraLuggageCharge,t.checked=!0):t.checked=!1}),this.selectedVehicleObjName=null,this.additionalDiscount=0,this.extraCharge=0,this.taxAddition=0,this.zone_extra_charge=0,this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0,this.selectedVehicleObj=e,this.currentObject=e,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.selectedVehicleObj,this.zone_price_id=null===(n=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.zone_price_model)||void 0===n?void 0:n.zone_price_id,this.zoneData.zone_price_applied=null===(a=null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing)||void 0===a?void 0:a.zone_price_applied,this.startingFrom="Y"==(null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.zone_price_applied)?2==(null===(d=null===(u=null===(s=this.selectedVehicleObj)||void 0===s?void 0:s.pricing)||void 0===u?void 0:u.zone_price_model)||void 0===d?void 0:d.calculation_type):2===(null===(c=this.selectedVehicleObj.pricing)||void 0===c?void 0:c.calculation_type),this.finalFare=null===(h=this.selectedVehicleObj)||void 0===h?void 0:h.final_fare.amount,this.storeOldVehiclePrice
1=null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.final_fare.amount,this.taxAddition=null===(p=this.selectedVehicleObj)||void 0===p?void 0:p.final_fare.tax_amount,this.zone_extra_charge=(null===(_=null===(m=this.selectedVehicleObj)||void 0===m?void 0:m.final_fare)||void 0===_?void 0:_.zone_extra_charges)?null===(v=null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare)||void 0===v?void 0:v.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge,this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(this.bookingTypeKey)||(this.rentalPackages=null!==(x=null===(b=null===(y=this.selectedVehicleObj)||void 0===y?void 0:y.pricing)||void 0===b?void 0:b.slots)&&void 0!==x?x:[]),["package"].includes(this.bookingTypeKey)&&this.isPackageSlotAmountPricing(null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.pricing)){const e=null===(C=null===(Z=this.rentalPackages)||void 0===Z?void 0:Z.find(e=>{var t;return e.id==(null===(t=this.addForm.value)||void 0===t?void 0:t.packages)}))||void 0===C?void 0:C.slot_amount;if(e){let t=e-this.additionalDiscount;this.package_pricing=t,this.selectedVehicleObj.final_fare.amount=t,this.selectedVehicleObj.final_fare_amount=this.finalFare,this.finalFare=this.selectedVehicleObj.final_fare.amount+this.taxAddition+this.zone_extra_charge+this.calCulateOtherCharges(this.selectedVehicleObj)+this.totalExtraLuggageCharge+this.totalExtraPassengerCharge+this.extraCharge}}3!==(null===(T=null===(F=this.selectedVehicleObj)||void 0===F?void 0:F.pricing)||void 0===T?void 0:T.calculation_method)?(this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraPassengerCharge(null,!0),this.getExtraLuggageCharge(null===(A=this.selectedVehicleObj)||void 0===A?void 0:A.vehicle_luggage_capacity,null,!0)):this.calculateReturnTrip(),this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?this.store_bike_distance:this.store_ride_distance,this.calCulateOtherCharges2()}calculateReturnTrip(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;this.returnEnable&&(this.returnTripObject=null===(t=null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.pricing)||void 0===t?void 0:t.return_trip_pricing,this.returnFinalFare=(null===(a=null===(o=null===(n=null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.pricing)||void 0===n?void 0:n.return_trip_pricing)||void 0===o?void 0:o.final_fare)||void 0===a?void 0:a.amount)+(null===(u=null===(s=null===(l=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing)||void 0===l?void 0:l.return_trip_pricing)||void 0===s?void 0:s.final_fare)||void 0===u?void 0:u.tax_amount),this.returnTripDiscount=null===(g=null===(h=null===(c=null===(d=this.selectedVehicleObj)||void 0===d?void 0:d.pricing)||void 0===c?void 0:c.return_trip_pricing)||void 0===h?void 0:h.final_fare)||void 0===g?void 0:g.return_trip_discount,this.totalFInalFare=this.finalFare+(this.returnFinalFare-this.returnTripDiscount)),this.totalFInalFare<0&&(this.totalFInalFare=0)}additionalDiscountChanged(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h;this.finalFare=0,this.returnFinalFare=0,this.returnTripDiscount=0;let g=0;e&&(g=this.totalExtraLuggageCharge+this.totalExtraPassengerCharge);const p=(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)+this.extraCharge+g;this.addForm.value.additional_discount?this.additionalDiscount!==this.addForm.value.additional_discount?(this.finalFare=0,this.finalFare=(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)+this.additionalDiscount,this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(s=null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.final_fare)||void 0===s?void 0:s.amount)-this.additionalDiscount+this.extraCharge+g):(this.additionalDiscount=1==this.addForm.value.additional_discount_type?this.addForm.value.additional_discount*(null===(d=null===(u=this.selectedVehicleObj)||void 0===u?void 0:u.final_fare)||void 0===d?void 0:d.amount)/100:this.addForm.value.additional_discount,this.finalFare=(null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.final_fare)||void 0===h?void 0:h.amount)-this.additionalDiscount+this.extraCharge+g):(this.finalFare=p,this.additionalDiscount=0),this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge+(this.otherChargePrice||0)+(this.tripOtherChargePrice||0),this.finalFare<0&&(this.finalFare=0),this.calculateReturnTrip()}extraChargeChanged(e=!1){var t,i,n,o;this.finalFare=this.finalFare-this.extraCharge,this.addForm.value.extra_charge?this.extraCharge!==this.addForm.value.extra_charge?(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):(this.extraCharge=1==this.addForm.value.extra_charge_type?this.addForm.value.extra_charge*(null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)/100:this.addForm.value.extra_charge,this.finalFare=this.finalFare+this.extraCharge):this.extraCharge=0,this.finalFare=this.finalFare,e&&this.updateCharge()}updateCharge(){this.totalExtraLuggageCharge&&(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.finalFare=this.finalFare+this.totalExtraLuggageCharge),this.totalExtraPasse
1ngerCharge&&(this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.finalFare=this.finalFare+this.totalExtraPassengerCharge),this.otherChargePrice&&(this.finalFare=this.finalFare-this.otherChargePrice,this.finalFare=this.finalFare+this.otherChargePrice),this.tripOtherChargePrice&&(this.finalFare=this.finalFare-this.tripOtherChargePrice,this.finalFare=this.finalFare+this.tripOtherChargePrice)}getExtraPassengerCharge(e=null,t){var i,n,o,a,r,l;if((null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.capacity)<this.no_of_passenger&&e){this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;let e=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else if(e)this.finalFare=this.finalFare-this.totalExtraPassengerCharge,this.totalExtraPassengerCharge=0;else if((null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.capacity)<this.no_of_passenger&&!e&&t){this.totalExtraPassengerCharge=0;let e=null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.pricing.extra_charge_per_passenger;this.totalExtraPassengerCharge=e*(this.no_of_passenger-(null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.capacity)),this.finalFare=this.totalExtraPassengerCharge+this.finalFare}else this.totalExtraPassengerCharge=0}getExtraLuggageCharge(e,t=null,i){e<this.trip_luggage&&t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):t?(this.finalFare=this.finalFare-this.totalExtraLuggageCharge,this.totalExtraLuggageCharge=0):e<this.trip_luggage&&!t&&i?(this.totalExtraLuggageCharge=0,this.totalExtraLuggageCharge=this.selectedVehicleObj.pricing.extra_charge_per_luggage*(this.trip_luggage-e),this.finalFare=this.totalExtraLuggageCharge+this.finalFare):this.totalExtraLuggageCharge=0}getWayPoints(){var e,t,i=[];const n=this.addForm.get("checkpoints").controls;for(var o=0;o<n.length;o++)n[o].get("value"),i.push({address:n[o].get("value").value,latitude:null===(e=this.selectedCheckpointsArray[o].latitude)||void 0===e?void 0:e.toFixed(6),longitude:null===(t=this.selectedCheckpointsArray[o].longitude)||void 0===t?void 0:t.toFixed(6)});return i}updateQueryParam(){var e,t,i,n,o,a,r,l,s,u,d,c,h=this.getWayPoints();this.queryParam.corporate_id=this.isBusinessTrip&&this.corporate_id?this.corporate_id:null,this.queryParam.pickup_location=this.addForm.get("pickup_location").value,this.queryParam.service_type=this.YELOWCAB_SERVICE_TYPE;try{this.queryParam.pickup_latitude=null===(e=this.pickup_latitude)||void 0===e?void 0:e.toFixed(6)}catch(g){this.queryParam.pickup_latitude=this.pickup_latitude}try{this.queryParam.pickup_longitude=null===(t=this.pickup_longitude)||void 0===t?void 0:t.toFixed(6)}catch(g){this.queryParam.pickup_longitude=this.pickup_longitude}if(this.queryParam.dropoff_location=this.addForm.get("destination").value,this.queryParam.dropoff_latitude=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),this.queryParam.dropoff_longitude=null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),this.isSchedual_trip&&(this.queryParam.request_time=this.combinedTimestamp()),h.length>0&&(this.queryParam.way_points=JSON.stringify(h)),this.returnEnable){this.queryParam.is_return_trip=1,this.queryParam.return_request_time=new Date(this.addForm.value.return_time).getTime()/1e3,this.queryParam.return_pickup_location=null===(o=this.addForm.get("return_pickup_location"))||void 0===o?void 0:o.value;try{this.queryParam.return_pickup_latitude=null===(a=this.return_pickup_latitude)||void 0===a?void 0:a.toFixed(6)}catch(g){this.queryParam.return_pickup_latitude=this.return_pickup_latitude}try{this.queryParam.return_pickup_longitude=null===(r=this.return_pickup_longitude)||void 0===r?void 0:r.toFixed(6)}catch(g){this.queryParam.return_pickup_longitude=this.return_pickup_longitude}this.queryParam.return_dropoff_location=null===(l=this.addForm.get("return_destination"))||void 0===l?void 0:l.value,this.queryParam.return_dropoff_latitude=null===(s=this.return_destination_latitude)||void 0===s?void 0:s.toFixed(6),this.queryParam.return_dropoff_longitude=this.return_destination_longitude}else this.queryParam.is_return_trip=0,this.queryParam.return_from_zone_id=null,this.queryParam.return_to_zone_id=null;this.queryParam.no_of_passenger=this.no_of_passenger,this.queryParam.trip_luggage=this.trip_luggage,this.queryParam.from_zone_id=this.zoneData&&this.zoneData.from?this.zoneData.from:null,this.queryParam.to_zone_id=this.zoneData&&this.zoneData.to?this.zoneData.to:null,this.fixZoneDisableDropoff&&(this.queryParam.to_zone_id=-1),this.returnEnable&&(this.queryParam.return_from_zone_id=(null===(u=this.returnzoneData)||void 0===u?void 0:u.from)?this.returnzoneData.from:null,this.queryParam.return_to_zone_id=(null===(d=this.returnzoneData)||void 0===d?void 0:d.to)?this.returnzoneData.to:null),(null===(c=this.addForm.value)||void 0===c?void 0:c.booking_type_id)&&(this.queryParam.booking_type_id=this.addForm.value.booking_type_id)}changeReturn(e){var t=this;return(0,y.Z)(function*(){t.pickup_latitude&&t.pickup_longitude&&t.destination_latitude&&t.destination_longitude?(t.returnEnable=e.target.checked,e.target.checked?(t.initDefaultReturnDateTime(),t.addForm.get("return_time").setValidators([r.kI.required]),t.addForm.get("return_time").updateV
1alueAndValidity(),t.applyReturnLocationSwapToForm(),yield t.resolveReturnZonesAfterLocationSwap(),t.calculateReturnTrip(),t.refreshReturnVehiclePricing()):(t.addForm.get("return_date").setValue(null),t.addForm.get("return_trip_time").setValue(null),t.addForm.get("return_time").setValue(null),t.addForm.get("return_time").clearValidators(),t.addForm.get("return_time").updateValueAndValidity(),t.return_date=null,t.return_trip_time=null,t.return_time=null,t.selectedDate=null,t.clearReturnLocations(),t.calculateReturnTrip())):(t.toasterService.error("Please Select Pickup & Destination Location First!"),e.target.checked=!1)})()}applyReturnLocationSwapToForm(){var e,t,i,n,o,a,r,l,s,u,d,c,h,g;const p=this.searchTextDestionation||(null===(e=this.addForm.get("destination"))||void 0===e?void 0:e.value),m=this.searchText||(null===(t=this.addForm.get("pickup_location"))||void 0===t?void 0:t.value);this.addForm.controls.return_pickup_location.setValue(p),this.addForm.controls.return_pickup_latitude.setValue(null!==(o=null===(n=null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed)||void 0===n?void 0:n.call(i,6))&&void 0!==o?o:this.destination_latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(l=null===(r=null===(a=this.destination_longitude)||void 0===a?void 0:a.toFixed)||void 0===r?void 0:r.call(a,6))&&void 0!==l?l:this.destination_longitude),this.addForm.controls.return_destination.setValue(m),this.addForm.controls.return_dropoff_latitude.setValue(null!==(d=null===(u=null===(s=this.pickup_latitude)||void 0===s?void 0:s.toFixed)||void 0===u?void 0:u.call(s,6))&&void 0!==d?d:this.pickup_latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(g=null===(h=null===(c=this.pickup_longitude)||void 0===c?void 0:c.toFixed)||void 0===h?void 0:h.call(c,6))&&void 0!==g?g:this.pickup_longitude),this.returnsearchText=p,this.returnsearchTextDestionation=m,this.return_pickup_latitude=this.destination_latitude,this.return_pickup_longitude=this.destination_longitude,this.return_destination_latitude=this.pickup_latitude,this.return_destination_longitude=this.pickup_longitude,this.returnpickupRegionFound=this.dropRegionFound,this.returndropRegionFound=this.pickupRegionFound}resolveReturnZonesAfterLocationSwap(){var e=this;return(0,y.Z)(function*(){e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.returndropRegionFound&&e.return_destination_latitude&&e.return_destination_longitude&&(yield e.updateReturnDestinationZone()),e.returnpickupRegionFound&&e.return_pickup_latitude&&e.return_pickup_longitude&&(yield e.updateReturnPickupZone())})()}clearReturnLocations(){this.returnsearchText=null,this.returnsearchTextDestionation=null,this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnpickupRegionFound=!0,this.returndropRegionFound=!0,this.addForm.controls.return_pickup_location.setValue(null),this.addForm.controls.return_pickup_latitude.setValue(null),this.addForm.controls.return_pickup_longitude.setValue(null),this.addForm.controls.return_destination.setValue(null),this.addForm.controls.return_dropoff_latitude.setValue(null),this.addForm.controls.return_dropoff_longitude.setValue(null),this.returnotherDetails=null,this.return_trip_path=null,this.return_bike_path=null,this.returnzoneData.from=null,this.returnzoneData.to=null,this.returnzoneData.from_title=null,this.returnzoneData.to_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.to_obj=null,this.returnzoneData.from_ids=null,this.returnzoneData.to_ids=null}OnSearchReturn(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturn.next(e)}OnSearchReturnDestination(e){var t;""!==(null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e))&&this.DriverKeyUpReturnDest.next(e)}returnsearchEvent(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_pickup_location.setValue(e.full_text),this.returnsearchText=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_pickup_latitude=e.latitude,this.return_pickup_longitude=e.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnPickupRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_pickup_latitude=e.data.latitude,this.return_pickup_longitude=e.data.longitude,this.addForm.controls.return_pickup_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_pickup_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnPickupRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_pickup_location.setValue(null),this.return_pickup_latitude=null,this.return_pickup_longitude=null,this.returnzoneData.from=null,this.returnzoneData.from_title=null,this.returnzoneData.from_obj=null,this.returnzoneData.from_ids=null)}returnsearchEventDestination(e){var t,i,n,o,a,r;e?(this.addForm.controls.return_destination.setValue(e.full_text),this.returnsearchTextDestionation=e.full_text,e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.return_destination_latitude=e.latitude,this.return_destination_longitude=e.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.longitude),this.validateReturnDropoffRegion()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(e=>{var t,i,n,o,a,r;e.status&&(this.return_destination_latitude=e.data.latitude,this.return_destination_longitude=e.data.longitude,this.addForm.controls.return_dropoff_latitude.setValue(null!==(n=null===(i=null===(t=e.data.latitude)||void 0===t?void 0:t.toFixed)||void 0===i?void 0:i.call(t,6))&&void 0!==n?n:e.data.latitude),this.addForm.controls.return_dropoff_longitude.setValue(null!==(r=null===(a=null===(o=e.data.longitude)||void 0===o?void 0:o.toFixed)||void 0===a?void 0:a.call(o,6))&&void 0!==r?r:e.data.longitude),this.validateReturnDropoffRegion(),this.refreshReturnVehiclePricing())}),this.refreshReturnVehiclePricing()):(this.addForm.controls.return_destination.setValue(null),this.return_destination_latitude=null,this.return_destination_longitude=null,this.returnzoneData.to=null,this.returnzoneData.to_title=null,this.returnzoneData.to_obj=null,this.returnzoneData.to_ids=null)}
1validateReturnPickupRegion(){if("Y"!==this.checkRegion)this.returnpickupRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_pickup_latitude,this.return_pickup_longitude,(0,C.U)(t.geofence)));this.returnpickupRegionFound=e}this.updateReturnPickupZone()}validateReturnDropoffRegion(){if("Y"!==this.checkRegion)this.returndropRegionFound=!0;else{let e=!1;for(const t of this.regionResponse)e||(e=(0,Z.eD)(this.return_destination_latitude,this.return_destination_longitude,(0,C.U)(t.geofence)));this.returndropRegionFound=e}this.updateReturnDestinationZone()}updateReturnPickupZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.from=null,e.returnzoneData.from_title=null,e.returnzoneData.from_obj=null,e.returnzoneData.from_ids=null,e.return_pickup_latitude&&e.return_pickup_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returnpickupRegionFound||(yield e.zoneUtilityService.findPickupZone(e.return_pickup_latitude,e.return_pickup_longitude,e.zoneResponse,e.returnzoneData,()=>{},()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}updateReturnDestinationZone(){var e=this;return(0,y.Z)(function*(){var t;e.returnzoneData.to=null,e.returnzoneData.to_title=null,e.returnzoneData.to_obj=null,e.returnzoneData.to_ids=null,e.return_destination_latitude&&e.return_destination_longitude&&(null===(t=e.zoneResponse)||void 0===t?void 0:t.length)&&("Y"===e.checkRegion&&!e.returndropRegionFound||(yield e.zoneUtilityService.findDropoffZone(e.return_destination_latitude,e.return_destination_longitude,e.zoneResponse,e.returnzoneData,()=>{},e.getZonePricingParams()),e.refreshReturnVehiclePricing()))})()}refreshReturnVehiclePricing(){!this.returnEnable||!this.return_pickup_latitude||!this.return_destination_latitude||(this.updateQueryParam(),this.vehicleTypeApi())}buildReturnBookingObject(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;const _=null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.return_trip_pricing,f=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.vehicle_type_category,v=this.returnotherDetails||this.otherDetails,y=2==f?null==v?void 0:v.bike_ride_distance:null==v?void 0:v.ride_distance,b=2==f?null==v?void 0:v.bike_ride_time:null==v?void 0:v.ride_time,x=Object.assign(Object.assign(Object.assign({},null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing),(null==_?void 0:_.pricing)||{}),{return_trip_pricing:_,final_fare:null==_?void 0:_.final_fare});(null===(a=null==_?void 0:_.surge_price)||void 0===a?void 0:a.surgeApplied)&&(x.surge_multiplier=_.surge_price.multiplier,x.surge_flat_amount=_.surge_price.flat_price),x.driver_earning=(this.returnFinalFare||0)-((null===(r=null==_?void 0:_.final_fare)||void 0===r?void 0:r.tax_amount)||0)-(this.walletBalance<0?Math.abs(this.walletBalance):0);const k={pickup_location:null===(l=this.addForm.get("return_pickup_location"))||void 0===l?void 0:l.value,pickup_latitude:Number(this.return_pickup_latitude),pickup_longitude:Number(this.return_pickup_longitude),dropoff_location:null===(s=this.addForm.get("return_destination"))||void 0===s?void 0:s.value,dropoff_latitude:Number(this.return_destination_latitude),dropoff_longitude:Number(this.return_destination_longitude),booking_distance:y,booking_duration:b,calculation_method:null!==(d=null===(u=null==_?void 0:_.pricing)||void 0===u?void 0:u.calculation_method)&&void 0!==d?d:null===(h=null===(c=this.selectedVehicleObj)||void 0===c?void 0:c.pricing)||void 0===h?void 0:h.calculation_method,fare_details:x,booking_properties:e.booking_properties,flight_info:e.flight_info,booking_amount:Number((this.returnFinalFare-this.returnTripDiscount).toFixed(2)),driver_earning:x.driver_earning,booking_request_time:Number(new Date(this.addForm.value.return_time).getTime()/1e3),is_return_booking:1,agent_id:this.agent_id||null,vehicle_type_id:null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.id,payment_mode:e.payment_mode,payment_mode_id:e.payment_mode_id,payment_status:e.payment_status,no_of_passenger:e.no_of_passenger,way_points:[],payment_type:e.payment_type,booking_type_id:e.booking_type_id,booster_seat:e.booster_seat,child_seat:e.child_seat,gender:e.gender,user_id:e.user_id,is_fixed_price:0};return(this.return_trip_path||this.return_bike_path)&&(k.dispatch_path=2==f?this.return_bike_path:this.return_trip_path),(null===(p=this.returnzoneData)||void 0===p?void 0:p.from)&&(k.return_pickup_zone_id=String(this.returnzoneData.from)),(null===(m=this.returnzoneData)||void 0===m?void 0:m.to)&&(k.return_dropoff_zone_id=String(this.returnzoneData.to)),k.fare_details.final_fare=null==_?void 0:_.final_fare,k}clearVehicleSelectionForSameZoneRestriction(){var e;const t=this;t.vehicleArray=[],t.filterVehicleArray=[],"vehicleTypeArray"in t&&(t.vehicleTypeArray=[]),t.selectedVehicleObj=null,"
1selectedVehicleObjName"in t&&(t.selectedVehicleObjName=null),"rentalPackages"in t&&(t.rentalPackages=[]),"trip_path"in t&&(t.trip_path=null),"bike_path"in t&&(t.bike_path=null),"return_trip_path"in t&&(t.return_trip_path=null),"return_bike_path"in t&&(t.return_bike_path=null),"otherDetails"in t&&(t.otherDetails=null),"returnotherDetails"in t&&(t.returnotherDetails=null),"finalFare"in t&&(t.finalFare=0),"returnFinalFare"in t&&(t.returnFinalFare=0),(null===(e=t.polyline)||void 0===e?void 0:e.setMap)&&(t.polyline.setMap(null),t.polyline=null)}updateSameZoneTripRestriction(){const e=(0,V.b)(this.zoneResponse,this.pickup_latitude,this.pickup_longitude,this.destination_latitude,this.destination_longitude),t=!!e,i=t&&!this.sameZoneTripRestricted;return this.sameZoneTripRestricted=t,t&&(this.clearVehicleSelectionForSameZoneRestriction(),i&&this.toasterService.error(`Trips within ${(null==e?void 0:e.title)||"this zone"} are not allowed`)),t}vehicleTypeApi(){this.updateSameZoneTripRestriction()?this.loadingState=!1:(this.loadingState=!0,this.taxAddition=0,this.zone_extra_charge=0,this.returnTripDiscount=0,this.finalFare=0,this.returnFinalFare=0,this.queryParam.out_of_service_area=this.checkOutofServiceArea?1:null,this.queryParam.vehicle_type_id=null,this.updateQueryParam(),this.disableBtn=!1,this.taxiBookingService.getVehicleList(this.queryParam).subscribe(e=>{var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,A,P,w,q,D,O,L,M,V,S,E,U,N,I,j,R,z;this.loadingState=!1,e.success||e.status?(this.store_ride_distance=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.ride_distance,this.store_bike_distance=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.bike_ride_distance,console.log(this.agentLogin,this.agentMinDistance,this.store_ride_distance),this.agentLogin&&this.agentMinDistance>this.store_ride_distance&&(this.disableBtn=!0,this.toasterService.error((null===(n=this.currentLanguage)||void 0===n?void 0:n.min_distance_error)+" "+this.agentMinDistance+" "+((null===(o=this.currentCompanyDetail)||void 0===o?void 0:o.distance_unit)?"Per "+(null===(a=this.currentCompanyDetail)||void 0===a?void 0:a.distance_unit):"Per Km"))),(null===(r=e.data)||void 0===r?void 0:r.cab_type_list.length)>0?(this.vehicleArray=null===(l=e.data)||void 0===l?void 0:l.cab_type_list.filter(e=>e.hasOwnProperty("pricing")),this.otherDetails={surge_price:e.data.surge_price,ride_time:e.data.ride_time,ride_distance:e.data.ride_distance,tax_list:e.data.tax_list,bike_ride_distance:null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.bike_ride_distance,bike_ride_time:null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.bike_ride_time},this.returnEnable&&(null===(d=e.data)||void 0===d?void 0:d.return_response_data)&&(this.returnotherDetails={surge_price:null===(c=e.data.return_response_data)||void 0===c?void 0:c.surge_price,ride_time:null===(h=e.data.return_response_data)||void 0===h?void 0:h.ride_time,ride_distance:null===(g=e.data.return_response_data)||void 0===g?void 0:g.ride_distance,tax_list:null===(p=e.data.return_response_data)||void 0===p?void 0:p.tax_list,bike_ride_distance:null===(m=e.data.return_response_data)||void 0===m?void 0:m.bike_ride_distance,bike_ride_time:null===(_=e.data.return_response_data)||void 0===_?void 0:_.bike_ride_time},this.return_trip_path=null===(f=e.data.return_response_data)||void 0===f?void 0:f.path,this.return_bike_path=null===(v=e.data.return_response_data)||void 0===v?void 0:v.bike_path),this.vehicleTypeArray.length>0?(this.max_luggage_capacity_filter=0,this.max_capacity_filter=0,this.vehicleArray=this.vehicleArray.map(e=>{e.isCollapsed=!1,this.max_capacity_filter<e.max_capacity&&(this.max_capacity_filter=e.max_capacity),this.max_luggage_capacity_filter<e.max_luggage_capacity&&(this.max_luggage_capacity_filter=e.max_luggage_capacity);const t=this.vehicleTypeArray.find(t=>t.vehicle_type_id==e.id);if(t)return Object.assign(Object.assign({},e),{title:t.vehicle_type_title,vehicle_image:t.vehicle_type_image,max_luggage_capacity:t.max_luggage_capacity,vehicle_type_priority:t.vehicle_type_priority})}
1),this.vehicleArray.forEach(e=>{var t,i,n,o;e&&(e.final_fare_amount=(null===(t=null==e?void 0:e.final_fare)||void 0===t?void 0:t.amount)+(null===(i=null==e?void 0:e.final_fare)||void 0===i?void 0:i.tax_amount)+this.calCulateOtherCharges(e)+((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.zone_extra_charges)?null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.zone_extra_charges:0))}),this.vehicleArray.sort((e,t)=>parseInt(e.vehicle_type_priority)-parseInt(t.vehicle_type_priority)),this.vehicleArray[0].checked=!0,this.selectedVehicleObj=this.vehicleArray[0],this.storeOldVehiclePrice=this.selectedVehicleObj.final_fare.amount,this.selectedVehicleObjName=this.selectedVehicleObj.title,this.zone_price_id=null===(x=null===(b=null===(y=this.selectedVehicleObj)||void 0===y?void 0:y.pricing)||void 0===b?void 0:b.zone_price_model)||void 0===x?void 0:x.zone_price_id,this.zoneData.zone_price_applied=null===(Z=null===(k=this.selectedVehicleObj)||void 0===k?void 0:k.pricing)||void 0===Z?void 0:Z.zone_price_applied,this.finalFare=null===(C=this.selectedVehicleObj)||void 0===C?void 0:C.final_fare.amount,this.taxAddition=null===(F=this.selectedVehicleObj)||void 0===F?void 0:F.final_fare.tax_amount,this.store_distance=2==this.selectedVehicleObj.vehicle_type_category?null===(T=null==e?void 0:e.data)||void 0===T?void 0:T.bike_ride_distance:null===(A=null==e?void 0:e.data)||void 0===A?void 0:A.ride_distance,this.otherChargePrice=0,this.startingFrom="Y"==(null===(w=null===(P=this.vehicleArray[0])||void 0===P?void 0:P.pricing)||void 0===w?void 0:w.zone_price_applied)?2==(null===(O=null===(D=null===(q=this.vehicleArray[0])||void 0===q?void 0:q.pricing)||void 0===D?void 0:D.zone_price_model)||void 0===O?void 0:O.calculation_type):2===(null===(L=this.vehicleArray[0].pricing)||void 0===L?void 0:L.calculation_type),this.finalFare=null===(M=this.selectedVehicleObj)||void 0===M?void 0:M.final_fare.amount,this.taxAddition=null===(V=this.selectedVehicleObj)||void 0===V?void 0:V.final_fare.tax_amount):(this.selectedVehicleObj=null,this.selectedVehicleObjName=null),this.zone_extra_charge=(null===(E=null===(S=this.selectedVehicleObj)||void 0===S?void 0:S.final_fare)||void 0===E?void 0:E.zone_extra_charges)?null===(N=null===(U=this.selectedVehicleObj)||void 0===U?void 0:U.final_fare)||void 0===N?void 0:N.zone_extra_charges:0,this.finalFare=this.finalFare+this.taxAddition+this.zone_extra_charge):this.vehicleArray=[],this.filterVehicleArray=this.vehicleArray,this.selectedVehicleObj&&(this.syncRentalHourlyOptionsFromVehicle(this.selectedVehicleObj),["hourly","package"].includes(this.bookingTypeKey)||(this.rentalPackages=null!==(R=null===(j=null===(I=this.selectedVehicleObj)||void 0===I?void 0:I.pricing)||void 0===j?void 0:j.slots)&&void 0!==R?R:[])),this.getMaxLuggagePassengerCapacity(),this.extraChargeChanged(),this.additionalDiscountChanged(),this.getExtraPassengerCharge(null,!0),this.getExtraLuggageCharge(null===(z=this.selectedVehicleObj)||void 0===z?void 0:z.vehicle_luggage_capacity,null,!0),this.calCulateOtherCharges2(),this.returnEnable&&this.calculateReturnTrip()):this.vehicleArray=[]}))}changeQueuePickup(e){this.pickUpStandForm.patchValue({pickup_location:e.address,pickup_latitude:e.latitude,pickup_longitude:e.longitude}),this.pickup_longitude=Number(e.longitude),this.pickup_latitude=Number(e.latitude),this.addForm.patchValue({pickup_location:e.address})}fixZone(e){this.fixZonePriceData=e}submitZonePricing(){this.zoneData.to=-1,this.searchTextDestionation=this.fixZonePriceData.dropoff_location,this.addForm.patchValue({destination:this.fixZonePriceData.dropoff_location}),this.UpdateDestinationLocation(this.fixZonePriceData.dropoff_latitude,this.fixZonePriceData.dropoff_longitude),$("#fixdestination").modal("hide")}getZoneDetail(e,t){this.yelowBookingService.getPriceZoneById(e).subscribe(e=>{var i;e.status&&(t.zone_price=null===(i=e.data)||void 0===i?void 0:i.title)})}closeFixDestinationPopup(){this.fixZoneDisableDropoff=!1,this.destination_latitude=null,this.destination_longitude=null,this.pickup_latitude=null,this.pickup_longitude=null,this.zoneData.to=null,this.addForm.patchValue({destination:null,pickup_location:null}),$("#ixdestination").modal("hide")}pickUpStandFormSubmit(){this.selectQueuePickup=!0,$("#QueuePikupstand").modal("hide")}submitFirstForm(e,t){var i,n,o,a,r,l,s,u,d,c,h,g;
1if(!this.updateSameZoneTripRestriction()){if(this.isNotesRequired&&!this.hasRequiredBookingNotes())return void this.toasterService.warning((null===(i=this.currentLanguage)||void 0===i?void 0:i.please_add_note)||"Please add at least one note");if(this.isBookingHold)return void swal.fire({text:(null===(n=this.currentLanguage)||void 0===n?void 0:n.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);if(this.returnEnable){this.syncReturnDateTime();const e=null===(o=this.addForm.get("request_time"))||void 0===o?void 0:o.value,t=null===(a=this.addForm.get("trip_time"))||void 0===a?void 0:a.value,i=new Date("string"==typeof e?e:(null===(r=null==e?void 0:e.toISOString)||void 0===r?void 0:r.call(e))||e),n=new Date("string"==typeof t?t:(null===(l=null==t?void 0:t.toISOString)||void 0===l?void 0:l.call(t))||t),d=new Date(i.getFullYear(),i.getMonth(),i.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());if(new Date(null===(u=null===(s=this.addForm)||void 0===s?void 0:s.value)||void 0===u?void 0:u.return_time)<d)return void this.toasterService.error("Return time should be greater than request time")}if(this.queuePikupStandList.length>0&&!this.fixZoneDisableDropoff&&this.isFirstPart)this.selectQueuePickup=!1,$("#QueuePikupstand").modal("show");else if(this.isFirstPart&&(this.resetPropertyControl(),this.removeValidation(),this.formSubmited=!0,this.submitFirstPart=!0,this.generateErrors(e),this.pickup_latitude&&this.pickup_longitude)){const t=null===(d=this.addForm.get("request_time"))||void 0===d?void 0:d.value,i=null===(c=this.addForm.get("trip_time"))||void 0===c?void 0:c.value,n=new Date("string"==typeof t?t:(null===(h=null==t?void 0:t.toISOString)||void 0===h?void 0:h.call(t))||t),o=new Date("string"==typeof i?i:(null===(g=null==i?void 0:i.toISOString)||void 0===g?void 0:g.call(i))||i),a=new Date(n.getFullYear(),n.getMonth(),n.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()),r=new Date;r.setHours(0,0,0,0);let l=new Date(r.getTime()+6e4*this.max_date);if(l.setHours(0,0,0,0),n.setHours(0,0,0,0),2==this.selectedTab){if(!this.validateRequestTimeCutOff(a))return;if(n<r)return void this.toasterService.error("Please select a minimum date: today");if(n>l)return void this.toasterService.error(`Trip date must be between today and the next ${this.max_date/1440} days.`);if(n.getTime()===r.getTime()&&a.getTime()<(new Date).getTime())return void this.toasterService.error("Trip time must be greater than current time.");e.valid&&(this.bindMarkerPoints(),this.getproperties(e))}else e.valid&&(this.bindMarkerPoints(),this.getproperties(e))}this.firstFormNextButtonClick=!0}}submitSecondForm(e){var t;this.isBookingHold?swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop):(this.formSubmited=!0,this.isDocumentUploading?this.toasterService.error("Please wait for document upload to complete"):(this.generateErrors(this.addForm),e.valid&&(this.displaySecondForm=!1,this.displayThirdForm=!0,this.vehicleTypeApi())))}getproperties(e){var t,i,n,o,a,r,l,s,u,d,c,h;if((null===(t=null==this?void 0:this.zoneData)||void 0===t?void 0:t.from_obj)&&this.zoneData.from_obj.property_list||(null===(i=this.zoneData)||void 0===i?void 0:i.to_obj)&&this.zoneData.to_obj.property_list||this.corporatePropeties||this.tripPropertiesIds){this.zoneIds=[],this.zonePropertiesIds=[],(null===(o=null===(n=this.zoneData)||void 0===n?void 0:n.from_obj)||void 0===o?void 0:o.property_list)&&(this.zonePropertiesIds=this.zonePropertiesIds.concat(this.zoneData.from_obj.property_list.split(","))),(null===(r=null===(a=this.zoneData)||void 0===a?void 0:a.to_obj)||void 0===r?void 0:r.property_list)&&this.zoneData.to_obj.property_list.split(",").forEach(e=>{var t,i;(null===(t=this.zoneData)||void 0===t?void 0:t.from)==(null===(i=this.zoneData)||void 0===i?void 0:i.to)?this.zonePropertiesIds.push(e):this.zonePropertiesIds.includes(e)?this.zoneIds.push(e):this.zonePropertiesIds.push(e)});let t=this.resetPropertyControl();if(2!=(null===(s=null===(l=this.zoneData)||void 0===l?void 0:l.from_obj)||void 0===s?void 0:s.zone_type)&&1!=(null===(d=null===(u=this.zoneData)||void 0===u?void 0:u.to_obj)||void 0===d?void 0:d.zone_type)||((null===(c=this.zoneData)||void 0===c?void 0:c.from_obj)||(null===(h=this.zoneData)||void 0===h?void 0:h.to_obj))&&(this.zonePropertiesIds=[]),this.zonePropertiesIds.length>0||this.zoneIds.length>0||this.corporatePropeties||this.tripPropertiesIds.length){let i=[];this.zonePropertiesIds.length>0&&(i=i.concat(this.zonePropertiesIds)),this.zoneIds.length>0&&(i=i.concat(this.zoneIds)),this.corporatePropeties&&(i=i.concat(String(this.corporatePropeties).split(","))),this.tripPropertiesIds.length&&(i=i.concat(this.tripPropertiesIds)),this.getExtraFields(t,i.join(","),e)}else this.nevigateToDraw(e)}else this.bindMarkerPoints()}nevigateToDraw(e){this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThird
1Form=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1}getExtraFields(e,t,i){const n={company_id:this.company_id,property_type_list:t,is_active:1,user_type:"0,3"};this.loadingState=!0,this.yelowBookingService.getExtraFields(n).subscribe(t=>{if(t.status&&t.data.length){t.data.sort((e,t)=>t.is_mandatory-e.is_mandatory),t.data;const i=["booster_seat","child_seat","flight_number"];t.data.forEach(t=>{(this.booking_type_id==t.category_id||null==t.category_id)&&(i.includes(null==t?void 0:t.field_key)||e.push(this.propertyRow(t)))}),0==e.length?(this.vehicleTypeApi(),this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1,["hourly","package"].includes(this.bookingTypeKey)&&this.validationForRental()):(this.isFirstPart=!1,this.formSubmited=!1,this.displaySecondForm=!0,this.displayFirstForm=!1,this.displayThankYouForm=!1,this.displayLoginForm=!1),this.loadingState=!1}else this.nevigateToDraw(i)})}resetPropertyControl(){let e=this.addForm.get("properties"),t=e.length;for(let i=0;i<t;i++)e.removeAt(0);return this.documentFileNames={},this.documentUploadLoading={},this.isDocumentUploading=!1,e}getAllTripProperties(){this.yelowBookingService.getExtraFields({company_id:this.company_id,property_type:2,is_active:1,service_type:this.YELOWCAB_SERVICE_TYPE,user_type:"0,3"}).subscribe(e=>{var t;e.status&&(null===(t=null==e?void 0:e.data)||void 0===t||t.map(e=>{var t;e.company_extra_field_id&&(null===(t=this.tripPropertiesIds)||void 0===t||t.push(e.company_extra_field_id))}))})}propertyRow(e){var t;let i=[];return(null===(t=null==e?void 0:e.config_json)||void 0===t?void 0:t.length)>0&&(null==e||e.config_json.forEach(e=>{i.push({label:e.title,value:e.title})})),new r.cw({label:new r.NI(e.field_title),value:new r.NI(5==e.field_type?0:null,r.kI.compose(e.is_mandatory?[r.kI.required]:[])),is_mandatory:new r.NI(e.is_mandatory),field_type:new r.NI(e.field_type),options:new r.NI(i),field_description:new r.NI(e.field_description),id:new r.NI(e.company_extra_field_id),file_name:new r.NI(null)})}updateDocumentUploadingState(){this.isDocumentUploading=Object.values(this.documentUploadLoading).some(e=>e)}documentFileChangeEvent(e,t){var i,n,o;const a=null===(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.files)||void 0===n?void 0:n[0];if(!a)return;if(a.size>this.DOCUMENT_MAX_FILE_SIZE)return swal.fire("Invalid File Size!","Please upload a file less than 21MB","error"),void this.clearDocumentInput(e);const r=this.addForm.get("properties"),l=a.name;null===(o=r.at(t).get("file_name"))||void 0===o||o.setValue(l),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l}),this.documentUploadLoading[t]=!0,this.updateDocumentUploadingState();const s=new FormData;s.append("file",a),this.authService.uploadImageGetUrl(s).subscribe(i=>{var n,o,a,s,u,d,c;if(this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),(null==i?void 0:i.status)&&(null==i?void 0:i.data)){const e="string"==typeof i.data?i.data:(null===(n=i.data)||void 0===n?void 0:n.url)||(null===(o=i.data)||void 0===o?void 0:o.file_url)||(null===(a=i.data)||void 0===a?void 0:a.image)||i.data;null===(s=r.at(t).get("value"))||void 0===s||s.setValue(e),null===(u=r.at(t).get("file_name"))||void 0===u||u.setValue(l),null===(d=r.at(t).get("value"))||void 0===d||d.markAsDirty(),null===(c=r.at(t).get("value"))||void 0===c||c.updateValueAndValidity(),this.documentFileNames=Object.assign(Object.assign({},this.documentFileNames),{[t]:l})}else this.toasterService.error((null==i?void 0:i.message)||"File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)},()=>{this.documentUploadLoading[t]=!1,this.updateDocumentUploadingState(),this.toasterService.error("File upload failed"),this.clearDocumentValue(t),this.clearDocumentInput(e)})}removeDocumentFile(e,t){this.clearDocumentValue(e),t&&(t.value="")}clearDocumentValue(e){var t,i,n,o,a,r;const l=this.addForm.get("properties");null===(i=null===(t=l.at(e))||void 0===t?void 0:t.get("value"))||void 0===i||i.setValue(null),null===(o=null===(n=l.at(e))||void 0===n?void 0:n.get("file_name"))||void 0===o||o.setValue(null),null===(r=null===(a=l.at(e))||void 0===a?void 0:a.get("value"))||void 0===r||r.updateValueAndValidity();const s=Object.assign({},this.documentFileNames);delete s[e],this.documentFileNames=s}clearDocumentInput(e){(null==e?void 0:e.target)?e.target.value="":e&&(e.value="")}mapBookingProperty(e){const t={label:e.label,value:e.field_type===this.DATE_FIELD&&(null==e?void 0:e.value)?new Date(null==e?void 0:e.value[0]).getTime():e.value,field_type:e.field_type,id:e.id};return(null==e?void 0:e.field_type)===this.DOCUMENT_FIELD&&(t.file_name=e.file_name||""),t}toggleCollapse(e){var t,i,n,o;let a=this.filterVehicleArray.find(t=>(null==t?void 0:t.id)==e.id);a&&(a.isCollapsed=!a.isCollapsed),(null===(i=null===(t=null==a?void 0:a.pricing)||void 0===t?void 0:t.zone_price_model)||void 0===i?void 0:i.zone_price_id)&&this.getZoneDetail(null===(o=null===(n=null==a?void 0:a.pricing)||void 0===n?void 0:n.zone_price_model)||void 0===o?void 0:o.zone_price_id,a)}getVehicleType(e){this.taxiBookingService.getVehicleType(e).subscribe(e=>{var t;this.vehicleTypeArray=e.status?null===(t=e.data)||void 0===t?void 0:t.list:[]})}goToLoginScreen(){var e;if(this.formSubmited=!0,this.generateErrors(this.addForm),this.addForm.valid){if(this.formSubmited=!1,this.additionalDiscountChanged(!0),this.calCulateOtherCharges2
1(),this.isNotesRequired&&!this.hasRequiredBookingNotes())return void this.toasterService.warning((null===(e=this.currentLanguage)||void 0===e?void 0:e.please_add_note)||"Please add at least one note");if(this.isBusinessTrip)return this.applyBusinessOnlinePayment(),void(this.budget_visible?this.checkBudgetAndBook(!0):this.bookRide(!0));if(1870===Number(this.company_id))return void this.openPaymentGateway(!0);1==this.addForm.controls.paymentMode.value||2==this.pre_payment_value?this.bookRide(!0):2==this.addForm.controls.paymentMode.value?this.openPaymentGateway(!0):this.bookRide(!0)}}isDynamicCalculationCharge(e){return(0,S.Mf)(e)}getOtherChargeBreakdownLabel(e){return(0,S.$v)(e)}incrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=(Number(e.currentValue)||0)+1;e.currentValue=t,this.otherChargesArray=(this.otherChargesArray||[]).map(i=>{var n;return(null==i?void 0:i.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(i.currentValue=t,i.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[i.charges_key])&&(this.otherChargArray[i.charges_key].currentValue=t)),Object.assign({},i)}),this.refreshOtherChargesFare()}decrementDynamicCharge(e){if(!(0,S.Mf)(e))return;const t=Number(e.currentValue)||0,i=t>1?t-1:1;e.currentValue=i,this.otherChargesArray=(this.otherChargesArray||[]).map(t=>{var n;return(null==t?void 0:t.other_charges_id)==(null==e?void 0:e.other_charges_id)&&(t.currentValue=i,t.charges_key&&(null===(n=this.otherChargArray)||void 0===n?void 0:n[t.charges_key])&&(this.otherChargArray[t.charges_key].currentValue=i)),Object.assign({},t)}),this.refreshOtherChargesFare()}refreshOtherChargesFare(){!this.selectedVehicleObj||this.calCulateOtherCharges2()}calCulateOtherCharges(e){let t=0;return this.selectedOtherChargesArray=this.otherChargesArray.filter(i=>{var n,o,a;if((i.checked||i.is_required)&&"booster_seat"==i.charges_key){if(1==i.charge_type){const o=i.charge_value*this.addForm.controls.booster_seat.value/100*((null===(n=null==e?void 0:e.final_fare)||void 0===n?void 0:n.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*this.addForm.controls.booster_seat.value,i.charges=i.charge_value*this.addForm.controls.booster_seat.value);return!0}if((i.checked||i.is_required)&&"child_seat"==i.charges_key){if(1==i.charge_type){const n=i.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null==e?void 0:e.final_fare)||void 0===o?void 0:o.amount)||0);t+=n,i.charges=n}else 2==i.charge_type?(t+=i.charge_value*this.addForm.controls.child_seat.value,i.charges=i.charge_value*this.addForm.controls.child_seat.value):3==i.charge_type&&(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance));return!0}if(i.checked||i.is_required){const n=(0,S.MV)(i);if(1==i.charge_type){const o=i.charge_value*n/100*((null===(a=null==e?void 0:e.final_fare)||void 0===a?void 0:a.amount)||0);t+=o,i.charges=o}else 3==i.charge_type?(t+=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance),i.charges=i.charge_value*(2==(null==e?void 0:e.vehicle_type_category)?this.store_bike_distance:this.store_ride_distance)):(t+=i.charge_value*n,i.charges=i.charge_value*n);return!0}return!1}),t}calCulateOtherCharges2(){this.finalFare=(this.finalFare||0)-(this.otherChargePrice||0),this.otherChargePrice=0,this.selectedOtherChargesArray=this.otherChargesArray.filter(e=>{var t,i,n,o,a,r;if((e.checked||e.is_required)&&"booster_seat"==e.charges_key){if(1==e.charge_type){const n=e.charge_value*this.addForm.controls.booster_seat.value/100*((null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare)||void 0===i?void 0:i.amount)||0);this.otherChargePrice+=n,e.charges=n}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*this.addForm.controls.booster_seat.value,e.charges=e.charge_value*this.addForm.controls.booster_seat.value);return!0}if((e.checked||e.is_required)&&"child_seat"==e.charges_key){if(1==e.charge_type){const t=e.charge_value*this.addForm.controls.child_seat.value/100*((null===(o=null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.final_fare)||void 0===o?void 0:o.amount)||0);this.otherChargePrice+=t,e.charges=t}else 2==e.charge_type?(this.otherChargePrice+=e.charge_value*this.addForm.controls.child_seat.value,e.charges=e.charge_value*this.addForm.controls.child_seat.value):3==e.charge_type&&(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance);return!0}if(e.checked||e.is_required){const t=(0,S.MV)(e);if(1==e.charge_type){const i=e.charge_value*t/100*((null===(r=null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare)||void 0===r?void 0:r.amount)||0);this.otherChargePrice+=i,e.charges=i}else 3==e.charge_type?(this.otherChargePrice+=e.charge_value*this.store_distance,e.charges=e.charge_value*this.store_distance):(this.otherChargePrice+=e.charge_value*t,e.charges=e.charge_value*t);return!0}return!1}),this.finalFare=this.finalFare+this.otherChargePrice}onDateChange(e,t){var i;null===(i=this.addForm.get("properties").at(t).get("value"))||void 0===i||i.setValue(e[0])}showLoginSingUpPage(e){var t;this.selectedButtonSingAUpLogin=e,this.customerStepCompleted=!0,this.corporate_id=(null===(t=this.currentUserDetail)||void 0===t?void 0:t.corporate_id)||this.corporate_id||null,this.evaluateCorporateTripOptions(),!this.showTripTypeSelection&&this.goToPickupAfterCustomer()}evaluateCorporateTripOptions(){var e,t;const i=!(!this.corporate_id&&!(null===(e=this.currentUserDetail)||void 0===e?void 0:e.corporate_id));i&&!this.corporate_id&&(this.corporate_id=null===(t=this.currentUserDetail)||void 0===t?void 0:t.corporate_id),this.showTripTypeSelection=!!(i&&this.isCorporateModuleActive&&this.customerStepCompleted),!this.showTripTypeSelection&&"business"===this.tripType&&this.onTripTypeChange("normal")}onTripTypeChange(e){this.tripType=e,"business"===e&&this.corporate_id?this.getCorporateData(this.corporate_id):this.clearBusinessTripConfig()}continueFromCustomerStep(){this.showTripTypeSelection&&"business"===this.tripType&&this.corporate_id?this.getCorporateData(this.corporate_id,()=>this.goToPickupAfterCustomer()):this.goToPickupAfterCustomer()}backToCustomerInfo(){this.showTripTypeSelection=!1,this.customerStepCompleted=!1,this.tripType="normal",this.clearBusinessTripConfig(),this.resetPropertyControl(),this.removeValidation(),this.displayLoginForm=!0,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThird
1Form=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0,this.formSubmited=!1,this.submitFirstPart=!1}goToPickupAfterCustomer(){this.resetPropertyControl(),this.removeValidation(),this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0,this.formSubmited=!1,this.submitFirstPart=!1}getCorporateData(e,t){e?(this.loadingState=!0,this.authService.getCorporateDetail(e).subscribe(e=>{var i,n,o,a,r,l,s;this.loadingState=!1;const u=(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.corporate_config)||[];this.budget_type=null===(o=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.corporate_detail)||void 0===o?void 0:o.budget_type;const d=u.find(e=>"budget"==e.corporate_configuration_key_code);this.budget_visible="Y"==(null==d?void 0:d.corporate_configuration_value);const c=u.find(e=>"booking_confirmation"==e.corporate_configuration_key_code);this.corporateBookingConfirmation=(null==c?void 0:c.corporate_configuration_value)||"N";const h=u.find(e=>"is_price_visible"==e.corporate_configuration_key_code);this.isPriceVisibleToEmployee="N"!=(null==h?void 0:h.corporate_configuration_value);const g=u.find(e=>"reason_required_for_booking"==e.corporate_configuration_key_code);this.applyCorporateNotesRequirement("Y"==(null==g?void 0:g.corporate_configuration_value),(null===(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.corporate_detail)||void 0===r?void 0:r.corporate_notes)||null),this.corporatePropeties=(null===(s=null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.corporate_detail)||void 0===s?void 0:s.property_list)||null,this.applyCorporateDiscountFromConfig(u),"Y"==this.corporateBookingConfirmation&&(this.selectedTab=2,this.isSchedual_trip=1,this.changeSelectedTab(2,!1)),this.applyBusinessOnlinePayment(),t&&t()},()=>{this.loadingState=!1,t&&t()})):t&&t()}applyCorporateDiscountFromConfig(e){const t=null==e?void 0:e.find(e=>"discount"==(null==e?void 0:e.corporate_configuration_key_code)),i=null==e?void 0:e.find(e=>"discount_type"==(null==e?void 0:e.corporate_configuration_key_code)),n=null==t?void 0:t.corporate_configuration_value;if(null==n||""===n||0===Number(n))return void this.clearCorporateDiscount();const o=2===Number(null==i?void 0:i.corporate_configuration_value)?2:1;this.addForm.patchValue({additional_discount:Number(n),additional_discount_type:o}),this.recalculateCorporateDiscountFares()}clearCorporateDiscount(){!this.addForm||(this.addForm.patchValue({additional_discount:null,additional_discount_type:1}),this.additionalDiscount=0,this.recalculateCorporateDiscountFares())}recalculateCorporateDiscountFares(){var e;!(null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.final_fare)||(this.additionalDiscountChanged(!0),this.calCulateOtherCharges2())}clearBusinessTripConfig(){this.budget_visible=!1,this.budget_type=null,this.corporateBookingConfirmation="N",this.isPriceVisibleToEmployee=!0,this.isNotesRequired=!1,this.corporatePropeties=null,this.clearCorporateNotesRequirement(),this.clearCorporateDiscount(),this.requestMode=this.savedRequestMode,this.requestModeSchedule=this.savedRequestModeSchedule,this.companyNowLaterAllowed&&"Y"==this.requestMode&&this.changeSelectedTab(1,!1)}applyCorporateNotesRequirement(e,t){this.isNotesRequired=!!e,e&&t&&!(this.bookingAssetsList||[]).length&&(this.bookingAssetsList=[{asset_type:"1",user_type:"3",asset_value:t,is_delete:0}])}clearCorporateNotesRequirement(){this.isNotesRequired=!1}hasRequiredBookingNotes(){return(this.bookingAssetsList||[]).some(e=>e&&1!==e.is_delete&&"1"===String(e.asset_type)&&!!e.asset_value)}applyBusinessOnlinePayment(){var e;const t=(this.paymentMode||[]).find(e=>2==e.payment_mode_key||2==e.charges_key);t?(this.addForm.controls.paymentMode.setValue(null!==(e=t.payment_mode_key)&&void 0!==e?e:2),this.addForm.controls.payment_mode_id.setValue(t.id)):this.addForm.controls.paymentMode.setValue(2),this.addForm.controls.paymentStatus.setValue("pending")}checkBudgetAndBook(e=!1){var t,i;let n=0;n=this.walletBalance<0&&this.finalFare?this.finalFare-this.walletBalance:this.finalFare;const o={trip_amount:n};o.corporate_id=this.corporate_id,2==this.budget_type&&(o.employee_id=(null===(t=this.currentUserDetail)||void 0===t?void 0:t.id)||(null===(i=this.queryParam)||void 0===i?void 0:i.user_id
1)),this.loadingState=!0,this.authService.checkBudget(o).subscribe(t=>{var i,n;t.status||t.success?1==(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.allow_trip)?this.bookRide(e):(this.loadingState=!1,this.toasterService.warning((null===(n=this.currentLanguage)||void 0===n?void 0:n.budget_limit_exceeded)||"Budget Limit Exceeded")):(this.loadingState=!1,this.toasterService.error((null==t?void 0:t.message)||"Budget check failed"))},()=>{this.loadingState=!1})}openPaymentGateway(e){const t=(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id);this.pre_payment&&!t&&(this.callApi=!1,this.bookRide(),this.loadingState=!1),this.showPaymetScreen=e,this.displayPaymentForm=!0,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1}afterPaymentSucsess(e){this.pre_payment||(0,T.Ps)(this.pre_payment_value,this.pre_payment,this.company_id)?(this.loadingState=!1,this.displayThannkYouScreen()):e&&!this.pre_payment&&this.bookRide(!0)}onStripeRequestBooking(){this.bookRide()}bookRide(e=!1){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m,_,f,v,y,b,x,k,Z,C,F,T,P,w;if(this.isBookingHold)swal.fire({text:(null===(t=this.currentLanguage)||void 0===t?void 0:t.booking_hold_message)||"Booking is temporarily unavailable. Please try again later.",icon:"warning",confirmButtonText:"OK"}).catch(swal.noop);else if(this.generateErrors(this.addForm),this.addForm.valid){$("#properties").modal("hide"),this.loadingState=!0;var q=this.getWayPoints(),D={pickup_location:this.addForm.get("pickup_location").value,vehicle_type_id:this.selectedVehicleObj.id,dropoff_latitude:null===(i=this.destination_latitude)||void 0===i?void 0:i.toFixed(6),dropoff_longitude:null===(n=this.destination_longitude)||void 0===n?void 0:n.toFixed(6),payment_mode:this.addForm.get("paymentMode").value,payment_mode_id:this.addForm.get("payment_mode_id").value,
1no_of_passenger:this.addForm.get("no_of_passenger").value,booking_distance:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_distance:this.otherDetails.ride_distance,booking_duration:2==this.selectedVehicleObj.vehicle_type_category?this.otherDetails.bike_ride_time:this.otherDetails.ride_time,calculation_method:null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing.calculation_method,way_points:q,transaction_detail:void 0,luggage:this.addForm.get("trip_luggage").value,fare_details:this.selectedVehicleObj.pricing,payment_type:(0,A.bQ)(null!==(a=this.channelPaymentType)&&void 0!==a?a:this.pre_payment_value),payment_status:"pending"};const t=this.buildBookingAssetsPayload();t.length&&(D.booking_assets=t);let L={flight:{iata:this.addForm.get("flight_number").value}};D.flight_info=this.selectedFlightObj?this.selectedFlightObj:this.addForm.get("flight_number").value?L:null,this.isSchedual_trip?(D.booking_request_time=this.combinedTimestamp(),D.is_scheduled=1):D.is_scheduled=0,D.flight_number=null===(r=this.addForm.value)||void 0===r?void 0:r.flight_number,((null===(l=this.addForm.value)||void 0===l?void 0:l.booster_seat)||0==this.addForm.value.booster_seat)&&(D.booster_seat=null===(u=null===(s=this.addForm.value)||void 0===s?void 0:s.booster_seat)||void 0===u?void 0:u.toString()),((null===(d=this.addForm.value)||void 0===d?void 0:d.child_seat)||0==this.addForm.value.child_seat)&&(D.child_seat=null===(h=null===(c=this.addForm.value)||void 0===c?void 0:c.child_seat)||void 0===h?void 0:h.toString()),(null===(g=this.addForm.value)||void 0===g?void 0:g.booking_type_id)&&(D.booking_type_id=null===(p=this.addForm.value)||void 0===p?void 0:p.booking_type_id);let M=[];(null===(m=this.selectedOtherChargesArray)||void 0===m?void 0:m.length)&&(M=M.concat(this.selectedOtherChargesArray)),M.length&&(D.fare_details.addon=M),D.booking_properties=JSON.stringify(this.addForm.value.properties.map(e=>this.mapBookingProperty(e))),this.walletBalance<0&&this.finalFare?(D.booking_amount=Number(this.finalFare.toFixed(2)-this.walletBalance),D.wallet_id=null,D.fare_details=Object.assign(Object.assign({},this.selectedVehicleObj.pricing),{previous_dues:Math.abs(this.walletBalance),final_fare:null===(_=this.selectedVehicleObj)||void 0===_?void 0:_.final_fare})):D.booking_amount=Number(this.finalFare.toFixed(2)),(null===(f=this.addForm.get("additional_discount"))||void 0===f?void 0:f.value)&&(D.fare_details.addition_discount_value=this.addForm.get("additional_discount").value,D.fare_details.additional_discount_type=this.addForm.get("additional_discount_type").value),D.fare_details.driver_earning=(this.finalFare.toFixed(2)||0)-((null===(v=this.selectedVehicleObj)||void 0===v?void 0:v.final_fare.tax_amount)||0)-(this.walletBalance||0),(null===(y=this.addForm.value)||void 0===y?void 0:y.hour)&&(D.fare_details.no_of_hours=null===(b=this.addForm.value)||void 0===b?void 0:b.hour),(null===(x=this.addForm.value)||void 0===x?void 0:x.package)&&(D.fare_details.package_type_id=null===(k=this.addForm.value)||void 0===k?void 0:k.packages),("Y"===this.checkGenderEnable||"y"==this.checkGenderEnable)&&(D.gender=this.genderValue),this.selectedVehicleObj.surge_price.surgeApplied&&(D.fare_details.surge_multiplier=this.selectedVehicleObj.surge_price.multiplier,D.fare_details.surge_flat_amount=this.selectedVehicleObj.surge_price.flat_price),D.fare_details.final_fare=null===(Z=this.selectedVehicleObj)||void 0===Z?void 0:Z.final_fare,(null===(C=this.currentUserDetail)||void 0===C?void 0:C.id)&&(D.user_id=null===(F=this.currentUserDetail)||void 0===F?void 0:F.id),this.isBusinessTrip&&this.corporate_id&&(D.corporate_id=this.corporate_id,D.user_id=null===(T=this.currentUserDetail)||void 0===T?void 0:T.id,this.applyBusinessOnlinePayment(),D.payment_mode=this.addForm.get("paymentMode").value||2,D.payment_mode_id=this.addForm.get("payment_mode_id").value,D.payment_status=this.addForm.get("paymentStatus").value||"pending",D.booking_status=16),this.queueId&&(D.queue_id=this.queueId),this.addForm.get("destination").value&&(D.dropoff_location=this.addForm.get("destination").value),this.zoneData&&this.zoneData.to&&(D.dropoff_zone_id=this.zoneData.to.toString()),this.zoneData&&this.zoneData.from&&(D.pickup_zone_id=this.zoneData.from);try{D.pickup_latitude=null===(P=this.pickup_latitude)||void 0===P?void 0:P.toFixed(6)}catch(O){D.pickup_latitude=this.pickup_latitude}try{D.pickup_longitude=null===(w=this.pickup_longitude)||void 0===w?void 0:w.toFixed(6)}catch(O){D.pickup_longitude=this.pickup_longitude}if(this.returnEnable&&(D.is_return_booking=1,D.return_booking=this.buildReturnBookingObject(D)),3===(null==D?void 0:D.payment_mode)&&(D.payment_mode=2),!this.autoDispatch&&this.addForm.get("driver").value&&(D.driver_id=this.addForm.get("driver").value),this.addForm.valid&&!this.Customer_id){let e={};e.first_name=this.addForm.get("first_name").value?this.addForm.get("first_name").value:"",e.last_name=this.addForm.get("last_name").value?this.addForm.get("last_name").value:"",e.phone_no=this.addForm.get("phone_no").value?this.addForm.get("phone_no").value.toString():"",e.dial_code=this.addForm.get("dial_co
1de").value?this.addForm.get("dial_code").value:this.dialCode,this.addForm.get("email").value&&(e.email=this.addForm.get("email").value),D.passenger_details=e}if(D.is_fixed_price=0,this.pre_payment&&"pending"==this.addForm.get("paymentStatus").value&&2==this.addForm.get("paymentMode").value&&(D.booking_status=16),"Y"===this.corporateBookingConfirmation&&(D.booking_status=16,D.payment_status=D.payment_status||"pending"),this.agent_id&&(D.agent_id=this.agent_id),2!==this.selectedTab||2===this.selectedTab&&D.booking_request_time>(new Date).getTime()/1e3)if(3!==this.selectedTab){let t;t=this.isBusinessTrip&&this.corporate_id?this.yelowCabService.bookCorporateRide(D):this.yelowCabService.bookRide(D),t.subscribe(t=>{this.loadingState=!1,t.success||t.status?(this.tripPayload=D,this.trip_number=t.data.booking_number,this.tripId=t.data.booking_id,this.content="Y"===this.corporateBookingConfirmation&&this.isBusinessTrip?"Wait for confirmation":"Successfully Booked",(e||this.isBusinessTrip)&&this.displayThannkYouScreen()):this.toasterService.error(null==t?void 0:t.message)})}else this.bookRecuringRide(this.tripPayload);else this.loadingState=!1,this.toasterService.error("Please select valid scheduled time")}}displayThannkYouScreen(){var e;(0,P.nb)(this.company_id||(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id),this.trip_number)||(this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayPaymentForm=!1,this.displayThankYouForm=!0,this.showPaymetScreen=!1)}combinedTimestamp(){return new Date(this.selectedRequestTime).getTime()/1e3}bookRecuringRide(e){e.recurring_type=this.addForm.controls.recurring_type.value,e.recurring_time=new Date(this.addForm.controls.recurring_time.value).getTime()/1e3,e.end_date=new Date(this.addForm.controls.end_date.value).getTime()/1e3,2==this.addForm.controls.recurring_type.value&&(e.recurring_on=this.addForm.controls.recurring_on.value),this.yelowBookingService.bookRicurringRide(e).subscribe(e=>{var t;if(this.loadingState=!1,e.success||e.status){if(this.trip_number=e.data.booking_number,(0,P.nb)(this.company_id||(null===(t=this.currentCompanyDetail)||void 0===t?void 0:t.company_id),this.trip_number))return;this.yelowBookingService.tripNoSubject.next({trip_number:this.trip_number,content:"Successfully Booked"}),this.ViewUpdate("thankyou")}else this.toasterService.error(null==e?void 0:e.message)},e=>{this.loadingState=!1})}ViewUpdate(e=!1){location.reload(),e&&(this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1),this.addForm.get("properties").clear(),this.addForm.reset(),this.selectQueuePickup=!1,this.addForm.get("checkpoints").clear(),this.addForm.get("properties").clear(),this.trip_luggage=0,this.no_of_passenger=1,this.addForm.patchValue({no_of_passenger:this.no_of_passenger,trip_luggage:this.trip_luggage,ride_type:1,pickup_location:null,destination:null,request_time:null,auto_dispatch:!0,gender:"M"}),this.searchText=null,this.selectedPickupRegionData=null,this.searchTextDestionation=null,this.responseDataDestionation=null,this.responseDatacheckPoint=null,this.responseData=null,this.pickup_latitude=null,this.pickup_longitude=null,this.destination_latitude=null,this.destination_longitude=null,this.selectedTab=1,this.request_time=null,this.autoDispatch=!0,this.Customer_id=null,this.genderTab="M",this.genderValue="M",this.getWayPoint=[],this.selectedVehicleObjName=null,this.selectedVehicleObj=null,this.marker&&(this.marker=[]),this.isFirstPart=!0,this.finalFare=0,this.walletBalance=0,this.addForm.get("notes").clearValidators(),this.bookingAssetsList=[],this.corporateBookingConfirmation="N",this.tripType="normal",this.showTripTypeSelection=!1,this.customerStepCompleted=!1,this.budget_visible=!1,this.isNotesRequired=!1,this.isPriceVisibleToEmployee=!0,this.corporatePropeties=null,this.booking_type_id=null,this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.otherChargesArray=[],this.selectedOtherChargesArray=[],this.allOtherChargesArray=[],this.tripOtherCharges=[],this.selectedTripOtherChargesArray=[],this.selectedFlightObj=null,this.responseFlight=[],this.trip_time=null,this.selectedButtonSingAUpLogin={button_id:1}
1,this.createForm(),this.getSeduleConfige(),this.jwtService.destroyAgentId(),this.Router.navigate([],{relativeTo:this.route,queryParams:{agent_id:null},queryParamsHandling:"merge",replaceUrl:!0}),this.patchDefaultUserLocation(),this.cd.detectChanges()}applyPaymentModeConfig(){var e;(null===(e=this.allPaymentModes)||void 0===e?void 0:e.length)?this.zoneConfigActive||(this.paymentMode=this.allPaymentModes,this.paymentMode.length>0?this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)):this.company_id&&this.toasterService.error("Please setup payment Mode!")):this.paymentMode=[]}resolveDefaultPaymentMode(e){return 1870===Number(this.company_id)&&e.find(e=>2===Number(null==e?void 0:e.payment_mode_key))||e[0]}getPaymentConfig(){const e=(0,A.QZ)(this.company_id);this.yelowCabService.getPaymentConfigList(e).subscribe(e=>{var t,i;e.status&&(this.allPaymentModes=(0,A.w6)(null===(t=e.data)||void 0===t?void 0:t.list,this.company_id),console.warn(">>allPaymentModes",this.allPaymentModes),this.applyPaymentModeConfig(),(null===(i=this.pendingZoneConfigs)||void 0===i?void 0:i.length)&&(this.applyZoneBookingOptions(this.pendingZoneConfigs,this.activeZoneId),this.pendingZoneConfigs=null))})}loadZoneConfigurationForPickup(e){e?(e=e.split(",")[0],(this.activeZoneId!==e||!this.zoneConfigActive)&&(this.activeZoneId=e,this.yelowCabService.getZoneConfiguration({zone_id:e,page:0}).subscribe(t=>{const i=this.normalizeZoneConfigList(null==t?void 0:t.data);((null==t?void 0:t.status)||(null==t?void 0:t.success))&&i.length?this.allPaymentModes.length?(this.applyZoneBookingOptions(i,e),this.pendingZoneConfigs=null):this.pendingZoneConfigs=i:this.resetZoneBookingOptions()},()=>this.resetZoneBookingOptions()))):this.resetZoneBookingOptions()}normalizeZoneConfigList(e){return Array.isArray(e)?e:Array.isArray(null==e?void 0:e.list)?e.list:[]}applyZoneBookingOptions(e,t){const i=[],n=[];let o=null;if(e.forEach(e=>{if(!(null==e?void 0:e.config_key)||null==e.config_value||""===e.config_value)return;const t=String(e.config_value);switch(e.config_key){case"payment_mode":i.push(t);break;case"request_mode":n.push(t);break;case"cut_off_time":o=t}}),this.zoneConfigActive=!0,this.activeZoneId=t,this.lastAppliedZoneConfigs=e,i.length&&this.allPaymentModes.length){const e=this.allPaymentModes.filter(e=>i.includes(String(e.id)));e.length&&(this.paymentMode=e,this.setPaymentMode(this.resolveDefaultPaymentMode(this.paymentMode)))}
1const a={1:{type_id:1,type_name:"Now"},2:{type_id:2,type_name:"Later"}};if(n.length){const e=n.map(e=>a[e]).filter(Boolean);e.length&&(this.rideType=e,this.setRideType(this.rideType[0].type_id))}if(o){const e=this.resolveCutOffMinutes(o);e>0&&this.applyZoneCutOffMinutes(e)}this.cd.detectChanges()}resolveCutOffMinutes(e){const t=Number(e);return!Number.isNaN(t)&&t>0?t:0}applyZoneCutOffMinutes(e){!e||Number.isNaN(e)||e<=0?this.zoneCutOffMinutes=null:(this.zoneCutOffMinutes=e,this.applyRequestTimeMinDate())}getEffectiveRequestMinDate(){const e=new Date;return e.setSeconds(0,0),this.zoneCutOffMinutes>0?new Date(e.getTime()+6e4*this.zoneCutOffMinutes):new Date(e)}applyRequestTimeMinDate(){var e,t,i,n;const o=this.getEffectiveRequestMinDate();this.requestTimeMinDate=o;const a=new Date(o);if(a.setHours(0,0,0,0),this.timeFormatConfig2.minDate=a,this.timeFormatConfig.minDate=o,this.is_date=!0,2===this.selectedTab){const a=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.controls.request_time)||void 0===t?void 0:t.value,r=null===(n=null===(i=this.addForm)||void 0===i?void 0:i.controls.trip_time)||void 0===n?void 0:n.value,l=a?new Date(a):null,s=r?new Date(r):null;let u=0;l&&s&&!Number.isNaN(l.getTime())&&!Number.isNaN(s.getTime())&&(u=new Date(l.getFullYear(),l.getMonth(),l.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()).getTime()),(!u||u<o.getTime())&&(this.request_time=new Date(o),this.trip_time=new Date(o),this.addForm.controls.request_time.setValue(this.request_time),this.addForm.controls.trip_time.setValue(this.trip_time))}}validateRequestTimeCutOff(e){if(2!==this.selectedTab)return!0;const t=this.getEffectiveRequestMinDate(),i=e||new Date(this.selectedRequestTime||this.addForm.value.request_time);if(Number.isNaN(i.getTime())||i.getTime()<t.getTime()){const e=this.zoneCutOffMinutes?`Trip must be scheduled at least ${this.zoneCutOffMinutes} minutes from now`:`Please schedule the trip after ${t.toLocaleString()}`;return this.toasterService.error(e),!1}return!0}clearZoneCutOffMinutes(){this.zoneCutOffMinutes=null,this.requestTimeMinDate=null}resetZoneBookingOptions(){var e;if(!this.zoneConfigActive)return this.activeZoneId=null,void(this.pendingZoneConfigs=null);this.zoneConfigActive=!1,this.activeZoneId=null,this.pendingZoneConfigs=null,this.lastAppliedZoneConfigs=null,this.clearZoneCutOffMinutes(),this.allPaymentModes.length&&this.applyPaymentModeConfig(),this.allRideTypes.length?(this.rideType=[...this.allRideTypes],this.setRideType((null===(e=this.rideType[0])||void 0===e?void 0:e.type_id)||1)):this.getSeduleConfige(!1),this.cd.detectChanges()}setPaymentMode(e){const t=e&&"object"==typeof e?e:this.paymentMode.find(t=>(null==t?void 0:t.id)==e);this.addForm.controls.payment_mode_id.setValue(null==t?void 0:t.id),this.addForm.controls.payment_mode_id.updateValueAndValidity(),this.addForm.controls.paymentMode.setValue(null==t?void 0:t.payment_mode_key),this.addForm.controls.paymentMode.updateValueAndValidity(),this.applyPaymentTypeFromSelectedMode(t)}applyPaymentTypeFromSelectedMode(e){if(!(0,A.kB)(this.company_id)){if(null==e?void 0:e.payment_type){const t=(0,A.L3)(e.payment_type);this.pre_payment_value=t.prePaymentValue,this.pre_payment=t.prePayment,this.channelPaymentType=t.paymentType,this.channelPaymentTypeLabel=t.paymentTypeLabel}this.loadPaymentRulePolicy(null==e?void 0:e.id)}}loadPaymentRulePolicy(e){!e||(0,A.kB)(this.company_id)||this.yelowCabService.getPaymentRulePolicy({booking_channel:A.fj,payment_method:e}).subscribe(e=>{if(!(null==e?void 0:e.status)&&!(null==e?void 0:e.success)||!(null==e?void 0:e.data))return;const t=(0,A.$I)(e.data);if(!t)return;const i=(0,A.L3)(t);this.pre_payment_value=i.prePaymentValue,this.pre_payment=i.prePayment,this.channelPaymentType=i.paymentType,this.channelPaymentTypeLabel=i.paymentTypeLabel,this.cd.detectChanges()},()=>{})}displayFirstScreen(e=!1){this.resetPropertyControl(),this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!0,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0,this.formSubmited=!1,this.submitFirstPart=!1}
1displayCustomerScreen(){this.resetPropertyControl(),this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!0,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0,this.formSubmited=!1,this.submitFirstPart=!1}isStepActiveOrDone(e,t){return-1!==t.indexOf(e)}displaySecondScreen(){this.removeValidation(),this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!0,this.displayThirdForm=!1,this.displayThankYouForm=!1,this.isFirstPart=!0}displayThirdScreen(){this.showPaymetScreen=!1,this.displayPaymentForm=!1,this.displayLoginForm=!1,this.displayFirstForm=!1,this.displaySecondForm=!1,this.displayThirdForm=!0,this.displayThankYouForm=!1,this.isFirstPart=!0}getResolvedHourlyPackagePricing(e){var t,i,n,o;if(!e)return{minHours:null,maxHours:null,hourlyRate:null,slots:null};const a="Y"===e.zone_price_applied?e.zone_price_model:null;if(a){const r=null!==(t=a.slots)&&void 0!==t?t:e.slots;return{minHours:this.coerceFiniteNumber(null!==(i=a.min_hours)&&void 0!==i?i:e.min_hours),maxHours:this.coerceFiniteNumber(null!==(n=a.max_hours)&&void 0!==n?n:e.max_hours),hourlyRate:this.coerceFiniteNumber(null!==(o=a.hourly_rate)&&void 0!==o?o:e.hourly_rate),slots:Array.isArray(r)?r:null}}const r=e.slots;return{minHours:this.coerceFiniteNumber(e.min_hours),maxHours:this.coerceFiniteNumber(e.max_hours),hourlyRate:this.coerceFiniteNumber(e.hourly_rate),slots:Array.isArray(r)?r:null}}getResolvedHourlyRate(e){var t;const i=null===(t=this.getResolvedHourlyPackagePricing(e))||void 0===t?void 0:t.hourlyRate;if(null!=i)return i;const n=Number(null==e?void 0:e.hourly_rate);return Number.isFinite(n)?n:0}getResolvedPriceType(e){var t;if(!e)return null;const i=e.zone_price_model,n=null==i||"object"!=typeof i||Array.isArray(i)||null===(t=i.price_type)||void 0===t?e.price_type:t,o=Number(n);return Number.isFinite(o)?o:null}isHourlyRateTimesHoursPricing(e){return 5===this.getResolvedPriceType(e)}isPackageSlotAmountPricing(e){return 4===this.getResolvedPriceType(e)}getSlotAmountForPackageSelection(e,t){var i;if(!this.isPackageSlotAmountPricing(e)||null==t)return null;const n=null===(i=this.getResolvedHourlyPackagePricing(e))||void 0===i?void 0:i.slots;if(!Array.isArray(n))return null;const o=n.find(e=>e.id==t);if(!o||null==o.slot_amount)return null;const a=Number(o.slot_amount);return Number.isFinite(a)?a:null}hourlyPackageCardDisplay(e){var t,i;const n=this.getResolvedHourlyPackagePricing(null==e?void 0:e.pricing);return{minHours:null!==(t=n.minHours)&&void 0!==t?t:0,hourlyRate:null!==(i=n.hourlyRate)&&void 0!==i?i:0}}coerceFiniteNumber(e){if(null==e||""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}syncRentalHourlyOptionsFromVehicle(e){var t,i,n,o,a,r,l,s,u,d,c,h,g,p,m;if(!(null==e?void 0:e.pricing)||!["hourly","package"].includes(this.bookingTypeKey))return;const _=this.getResolvedHourlyPackagePricing(e.pricing);if("hourly"===this.bookingTypeKey){let e=null!==(t=_.minHours)&&void 0!==t?t:1,s=null!==(i=_.maxHours)&&void 0!==i?i:24;if(s<e){const t=e;e=s,s=t}s=Math.min(s,168),this.hoursArray=[];for(let t=e;t<=s;t++)this.hoursArray.push({name:`${t} hrs`,value:t});const u=null!==(n=_.minHours)&&void 0!==n?n:e,d=null===(a=null===(o=this.addForm)||void 0===o?void 0:o.value)||void 0===a?void 0:a.hour,c=null!=d&&d>=e&&d<=s?d:u;null===(r=this.addForm.controls.hour)||void 0===r||r.setValue(c,{emitEvent:!1}),null===(l=this.filterVehicleArray)||void 0===l||l.forEach(e=>{(null==e?void 0:e.pricing)&&(e.pricing.selected_hours=c)}),this.changeHours()}if(this.rentalPackages=null!=_.slots?_.slots:[],"package"===this.bookingTypeKey){const t=null===(u=null===(s=this.addForm)||void 0===s?void 0:s.value)||void 0===u?void 0:u.packages;if(null!=t&&!this.rentalPackages.some(e=>e.id==t)&&(null===(d=this.addForm.controls.packages)||void 0===d||d.setValue(null)),this.isPackageSlotAmountPricing(e.pricing)&&(null===(c=this.rentalPackages)||void 0===c?void 0:c.length)){const e=null===(g=null===(h=this.addForm)||void 0===h?void 0:h.value)||void 0===g?void 0:g.packages,t=null!=e&&this.rentalPackages.some(t=>t.id==e)?e:null===(p=this.rentalPackages[0])||void 0===p?void 0:p.id;null!=t&&(null===(m=this.addForm.controls.packages)||void 0===m||m.setValue(t,{emitEvent:!1}),this.changePackages())}}}validationForRental(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),"hourly"==this.bookingTypeKey?(this.addForm.controls.hour.setValidators([r.kI.required]),this.addForm.controls.packages.setValidators([])):"package"==this.bookingTypeKey?(this.addForm.controls.packages.setValidators([r.kI.required]),this.addForm.controls.hour.setValidators([])):(this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.setValidators([])),this.addForm.controls.packages.updateV
1alueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}shouldHideCharge(e){return"booster_seat"===(null==e?void 0:e.charges_key)||"child_seat"===(null==e?void 0:e.charges_key)||(null==e?void 0:e.is_required)}changeHours(){var e=this;return(0,y.Z)(function*(){var t,i,n,o,a,r;if(!e.selectedVehicleObj)return;const l=e.addForm.value.hour;if(l&&(e.filterVehicleArray.forEach(t=>{if(t.pricing.selected_hours=l,t.id===e.selectedVehicleObj.id||!e.isHourlyRateTimesHoursPricing(t.pricing))return;let i=e.getResolvedHourlyRate(null==t?void 0:t.pricing)*l-e.additionalDiscount;t.final_fare.amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=i+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(t)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge}),e.isHourlyRateTimesHoursPricing(null===(t=e.selectedVehicleObj)||void 0===t?void 0:t.pricing))){let t=e.getResolvedHourlyRate(null===(i=e.selectedVehicleObj)||void 0===i?void 0:i.pricing)*l-e.additionalDiscount;e.hours_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare,e.selectedVehicleObj.pricing.selected_hours=(null===(o=null===(n=e.addForm)||void 0===n?void 0:n.value)||void 0===o?void 0:o.hour)?null===(r=null===(a=e.addForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.hour:0})()}changePackages(){var e=this;return(0,y.Z)(function*(){var t;if(!e.selectedVehicleObj)return;const i=null===(t=e.addForm.value)||void 0===t?void 0:t.packages,n=e.getSlotAmountForPackageSelection(e.selectedVehicleObj.pricing,i);if(null!=n){e.filterVehicleArray.forEach(t=>{if(t.id===e.selectedVehicleObj.id)return;const n=e.getSlotAmountForPackageSelection(t.pricing,i);null!=n&&(t.final_fare.amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,t.final_fare_amount=n+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge)});let t=n-e.additionalDiscount;e.package_pricing=t,e.selectedVehicleObj.final_fare.amount=t,e.storeOldVehiclePrice=e.selectedVehicleObj.final_fare.amount}e.finalFare=e.selectedVehicleObj.final_fare.amount+e.taxAddition+e.zone_extra_charge+e.calCulateOtherCharges(e.selectedVehicleObj)+e.totalExtraLuggageCharge+e.totalExtraPassengerCharge+e.extraCharge,e.selectedVehicleObj.final_fare_amount=e.finalFare})()}removeValidation(){this.addForm.controls.hour.setValue(null),this.addForm.controls.packages.setValue(null),this.addForm.controls.packages.setValidators([]),this.addForm.controls.hour.setValidators([]),this.addForm.controls.packages.updateValueAndValidity(),this.addForm.controls.hour.updateValueAndValidity()}setDateintime(){const e=new Date(this.addForm.value.request_time),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())this.setMinTime();else{let t=new Date(this.addForm.value.trip_time[0]||new Date);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.trip_time=t,this.addForm.controls.trip_time.setValue(t),this.addForm.controls.trip_time.updateValueAndValidity(),this.timeFormatConfig.minDate=new Date(t)}}setMinTime(){const e=new Date;this.trip_time=new Date(e.getTime()+6e4*(this.min_date||0)),this.addForm.controls.trip_time.setValue(new Date(this.trip_time)),this.timeFormatConfig&&(this.timeFormatConfig.minDate=new Date(this.trip_time))}initDefaultReturnDateTime(){var e,t,i;let n=new Date((new Date).getTime()+36e5).getTime(),o=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),a=new Date(Math.max(n,o));this.returnDateFormatConfig.minDate=new Date,this.returnTimeFormatConfig.minDate=new Date(a),this.return_date=a,this.return_trip_time=a,this.return_time=a,this.addForm&&(null===(e=this.addForm.controls.return_date)||void 0===e||e.setValue(a),null===(t=this.addForm.controls.return_trip_time)||void 0===t||t.setValue(a),null===(i=this.addForm.controls.return_time)||void 0===i||i.setValue(a)),this.selectedDate=a,this.syncReturnDateTime()}syncReturnDateTime(){var e,t,i,n,o,a,r;const l=null!==(i=null===(t=null===(e=this.addForm)||void 0===e?void 0:e.get("return_date"))||void 0===t?void 0:t.value)&&void 0!==i?i:this.return_date,s=null!==(a=null===(o=null===(n=this.addForm)||void 0===n?void 0:n.get("return_trip_time"))||void 0===o?void 0:o.value)&&void 0!==a?a:this.return_trip_time;if(!l||!s)return;const u=new Date(l),d=new Date(Array.isArray(s)?s[0]:s),c=new Date(u.getFullYear(),u.getMonth(),u.getDate(),d.getHours(),d.getMinutes(),d.getSeconds());null===(r=this.addForm.get("return_time"))||void 0===r||r.setValue(c),this.selectedDate=c,this.return_time=c}setReturnTimeFromDate(){const e=new Date(this.addForm.value.return_date),t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()){let e=new Date((new Date).getTime()+36e5).getTime(),t=new Date(new Date(this.addForm.value.request_time).getTime()+36e5).getTime(),i=new Date(Math.max(e,t));this.return_trip_time=i,this.addForm.controls.return_trip_time.setValue(i),this.returnTimeFormatConfig.minDate=i}else{let t=new Date(this.addForm.value.return_trip_time||new Date);
1Array.isArray(t)&&(t=new Date(t[0])),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.return_trip_time=t,this.addForm.controls.return_trip_time.setValue(t),this.returnTimeFormatConfig.minDate=new Date(t)}}onBookingAssetsChange(e){this.bookingAssetsList=e||[]}buildBookingAssetsPayload(){return(this.bookingAssetsList||[]).filter(e=>e&&1!==e.is_delete&&!!e.asset_value).map(e=>{var t;const i=null===(t=M._B.find(t=>t.id===String(e.asset_type)))||void 0===t?void 0:t.kind;return Object.assign({asset_type:String(e.asset_type),user_type:e.user_type,asset_value:e.asset_value},"file"!==i&&"voice"!==i||!e.file_name?{}:{file_name:e.file_name})})}}return e.\u0275fac=function(t){return new(t||e)(f.Y36(v.e),f.Y36(f.sBO),f.Y36(E.Z),f.Y36(r.qu),f.Y36(U.F),f.Y36(N.d),f.Y36(I._W),f.Y36(j.C),f.Y36(o.gz),f.Y36(R.T),f.Y36(o.F0),f.Y36(z.x))},e.\u0275cmp=f.Xpm({type:e,selectors:[["cab-booking-corporate"]],inputs:{is_full_screen:"is_full_screen"},decls:150,vars:191,consts:[["autocomplete","off","role","form",3,"formGroup"],["bookingSteps",""],[1,"custom","clearfix","booking-form-two-column",3,"hidden","ngClass"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info0",2,"max-height","632px",3,"ngClass"],[3,"ngClass"],["class","lorder-wrap",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","booking-hold-banner",4,"ngIf"],[1,"flex-fill","p-4"],["class","form-group position-relative mb-2 pb-1 dropdown-select0",4,"ngIf"],[1,"form-group","position-relative","mb-1","icon","short"],[1,"location-search",3,"placeholder","isBooing","responseData","searchText","is_disable","search","searchEvent"],["class","help-block text-center",3,"innerHTML",4,"ngIf"],["class","form-text text-danger text-center",4,"ngIf"],["formArrayName","checkpoints",1,"form-group","mb-1"],[3,"formGroupName",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"form-group","position-relative","mb-2","pb-1","icon","short",3,"ngClass"],[1,"location-search",3,"is_disable","placeholder","responseData","isBooing","searchText","search","searchEvent"],["class","help-block text-danger text-center",4,"ngIf"],["class","d-flex align-items-center mb-1",4,"ngIf"],["class","row input-info",4,"ngIf"],["class","trip-type d-flex justify-content-between mb-1",4,"ngIf"],["class","form-row mb-0",4,"ngIf"],[1,"form-group","position-relative","mb-0"],["mode","local","modalId","bookingFormAssetsModal",3,"title","assets","compact","assetsChange"],["class","form-text text-danger",4,"ngIf"],[1,"p-4","border-top","bg-white",2,"position","sticky","bottom","0","z-index","100"],["type","button",1,"btn","btn-red-gradient","text-uppercase","btn-lg","fw-semibold","font-size-18","w-100",3,"disabled","click"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info",2,"max-height","632px",3,"ngClass"],[1,"booking-form-inner",3,"ngClass"],["class","bg-light p-3 mt-5 rounded-3 mb-5",4,"ngIf"],[1,"fw-semibold","mb-3","h4"],[1,"font-size-14"],["formArrayName","properties",1,"booking-form-body","border"],["class","fa fa-spinner fa-spin",4,"ngIf"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","short","booking-widget-flex-column0",2,"max-height","632px",3,"ngClass"],[1,"vehicle-step-scroll","p-4"],["href","javascript:;",1,"text-decoration-none",2,"color","currentColor !important"],["class","list-unstyled border rounded-3 overflow-hidden custom-select-menu",4,"ngFor","ngForOf"],["class","form-row",4,"ngIf"],[1,"p-4","border-top","bg-white","booking-widget-footer-bar"],[1,"form-row","top-menu-selection"],["class","form-group col",4,"ngIf"],["class","form-group col",3,"ngClass",4,"ngIf"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","short",3,"ngClass"],[3,"isOtpVerification","callBackObject",4,"ngIf"],["class","flex-fill p-4",4,"ngIf"],["id","bookingWidget","data-testid","booking-widget","data-rwt-vertical","false",1,"rwt__tabs","bookingWidget_bookingWidgetContainer___FTYH","input-info","booking-form-center","booking-form-center-w-booking",3,"ngClass"],[1,"flex-fill"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking",4,"ngIf"],[1,"flex-fill",2,"max-height","400px","overflow-y","scroll"],[1,"booking-form-center","d-flex","align-items-center"],[1,"booking-form-inner",2,"height","auto","width","100%"],[1,"booking-form-body","text-center","py-5"],[1,"icon","mb-4"],[1,"fa","fa-check-circle-o","fa-5x","text-success"],[1,"heading","h3","font-weight-700","text-dark"],[1,"font-size-18"],["type","button",1,"btn","btn-primary","btn-block","btn-lg","mt-3",3,"click"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","class","modal fade","aria-hidden","true",4,"ngIf"],["id","fixdestination","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],["class","modal-body flex",4,"ngIf"],[1,"modal-footer","bg-light"],["type","submit",1,"btn","btn-primary",3,"click"],["id","selectUserPickupLocation","role","dialog","aria-labelledby","selectUserPickupLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["autocomplete","off","role","form",3,"ngSubmit"],["id","selectUserPickupLocationLabel",1,"modal-title","flex"],[1,"modal-body","py-0"],[1,"radioStyle1","radioStyleCustom","largeChecked"],["class","control control-outline control-info control--radio d-block my-3 border rounded",4,"ngFor","ngForOf"],["data-dismiss","modal","type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],["id","selectUserDropoffLocation","role","dialog","aria-labelledby","selectUserDropoffLocationLabel",1,"modal","fade",2,"background-color","rgb(0 0 0 / 60%)"],["id","selectUserDropoffLocationLabel",1,"modal-title","flex"],["class","0order-header--steps d-flex p-3 m-0 border-bottom bg-light align-items-end","style","position: sticky; top: 0; z-index: 1050;",4,"ngIf"],[1,"0order-header--steps","d-flex","p-3","m-0","border-bottom","bg-light","align-items-end",2,"position","sticky","top","0","z-index","1050"],[1,"step-book",3,"ngClass"],[1,"step-top"],["type","button","class","btn-text btn-text-active",3,"disabled","click",4,"ngIf"],["class","fa fa-user step-step-icon","aria-hidden","true",3,"step-step-icon--done","click",4,"ngIf"],[1,"step-main"],["type","button",1,"step-dot-btn",3,"disabled","click"],[1,"round-border",3,"ngClass"],["class","fa fa-map-marker step-step-icon","aria-hidden","true",3,"step-step-icon--done","click",4,"ngIf"],["class","fa fa-list-alt step-step-icon","aria-hidden","true",3,"step-step-icon--done","click",4,"ngIf"],["class","fa fa-car step-step-icon","aria-hidden","true",3,"step-step-icon--done","click",4,"ngIf"],[1,"_stepTitleActiveCircleSpace_ojtdk_137","step-main"],["class","step-book",3,"ngClass",4,"ngIf"],["type","button","class","btn-text btn-text-active",3,"disabled",4,"ngIf"],["class","fa fa-check-circle step-step-icon","aria-hidden","true",4,"ngIf"],["type","button",1,"step-dot-btn",3,"disabled"],["class","step-book text-left",4,"ngIf"],["type","button",1,"btn-text","btn-text-active",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-user","step-step-icon",3,"click"],["aria-hidden","true",1,"fa","fa-map-marker","step-step-icon",3,"click"],["aria-hidden","true",1,"fa","fa-list-alt","step-step-icon",3,"click"],["aria-hidden","true",1,"fa","fa-car","step-step-icon",3,"click"],["class","fa fa-credit-card step-step-icon","aria-hidden","true",3,"step-step-icon--done",4,"ngIf"],["type","button",1,"btn-text","btn-text-active",3,"disabled"],["aria-hidden","true",1,"fa","fa-credit-card","step-step-icon"],["aria-hidden","true",1,"fa","fa-check-circle","step-step-icon"],[1,"step-book","text-left"],["bindLabel","language_code","bindValue","language_code",1,"nav-link","p-0","ps-2",2,"min-width","75px",3,"items","clearable","ngModel","ngModelOptions","ngModelChange","change"],[1,"lorder-wrap"],[1,"loader"],[1,"booking-hold-banner"],[1,"form-group","position-relative","mb-2","pb-1","dropdown-select0"],[1,"control-label","fw-semibold","fs-6"],["bindLabel","title","bindValue","id",1,"ng-select",3,"placeholder","items","clearable","formControl","searchable","change"],[1,"help-block","text-center",3,"innerHTML"],[1,"form-text","text-danger","text-center"],[3,"formGroupName"],[1,"form-group","mb-3"],[1,"has-feedback","p-r-40"],[3,"placeholder","responseData","isBooing","searchText","search","searchEvent"],[1,"form-control-feedback","fa","fa-circle-o"],["class","form-text mt-2 text-danger pl-5 text-center",4,"ngIf"],["href","javascript:;",1,"remove-checkpoint","text-secondary",3,"click"],[1,"fa","fa-tras
1h","fa-fw",3,"ngClass"],[1,"form-text","mt-2","text-danger","pl-5","text-center"],[1,"add-checkpoint",3,"click"],[1,"fa","fa-plus-circle"],[1,"help-block","text-danger","text-center"],[1,"d-flex","align-items-center","mb-1"],[1,"fw-normal","m-0",2,"color","rgb(97, 113, 130)"],[1,"ml-auto","auto-fixed-switch","d-flex","align-items-center"],["id","RideType","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideType",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],[1,"mb-0","order-1","text-1"],[1,"mb-0","order-3","text-2"],[1,"row","input-info"],[1,"col-md-6",2,"width","50%"],[1,"form-group","mb-3","position-relative","icon","short","custom-date-picker"],[1,"input_trailingIconSpan__6le4A","input_iconSpan__7pewB"],["role","img","aria-label","Icon/calendar","width","20px","height","20px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","_default_rs803_65"],["d","M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zM4 9v10h16V9H4zm2 4h5v4H6v-4z"],[1,"control-label","fw-semibold","mt-1"],[1,"form-control",3,"placeholder","config","ngClass","formControl","setDate"],[1,"form-group","position-relative","mb-3","icon","short","custom-date-picker"],[1,"input_iconSpan__7pewB","input_trailingIconSpan__6le4A"],["role","img","aria-label","Icon/time","width","20px","height","20px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","_default_rs803_65"],["d","M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm1-10V7h-2v7h6v-2h-4z"],["appendTo","body","placeholder"," Select Start Time",1,"form-control","p-0","time-flatpicker",3,"config","formControl","setDate"],[1,"trip-type","d-flex","justify-content-between","mb-1"],[1,"m-0","fw-normal",2,"color","rgb(97, 113, 130)"],[1,"form-group","mb-0"],[1,"0radioStyle1","0small-height","d-flex","0justify-content-between"],["class","control control-outline control-primary control--radio ml-3 0flex-fill control-outline-small mb-0",4,"ngFor","ngForOf"],[1,"control","control-outline","control-primary","control--radio","ml-3","0flex-fill","control-outline-small","mb-0"],["name","GENDER","type","radio",1,"custom-control-input",3,"value","formControl","checked","click"],[1,"control__indicator"],[1,"row"],[1,"fw-normal","mb-2","pb-1","d-flex","align-items-center",2,"color","rgb(97, 113, 130)"],["id","RideReturn","type","checkbox",1,"tgl","tgl-light","tgl-primary",3,"checked","click"],["for","RideReturn",1,"tgl-btn","my-0","mx-2","order-2",2,"width","2em","height","1em"],["class","row input-info",3,"ngClass",4,"ngIf"],[1,"row","input-info",3,"ngClass"],["appendTo","body","placeholder"," Select Return Time",1,"form-control","p-0","time-flatpicker",3,"config","formControl","setDate","ngClass"],[1,"col-12"],[1,"form-group","position-relative","mb-2","pb-1","icon","short"],["class","form-group mb-2",4,"ngIf"],["class","form-group p-0 col",4,"ngIf"],[1,"form-group","mb-2"],["type","text",1,"form-control","shadow-none",3,"placeholder","formControl"],[1,"form-group","p-0","col"],[1,"input-group"],["notFoundText","No Records Found",1,"select-single-with-search","w-100",3,"clearable","placeholder","ngModel","ngModelOptions","keyup.enter","change","ngModelChange"],["flightSelect",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"d-flex"],[1,"icon","me-2",2,"vertical-align","-2px"],[1,"fa","fa-plane"],[1,"ml-2",3,"title"],[1,"form-row","mb-0"],[1,"col-md-6"],[1,"font-weight-600","mb-2","fw-medium",2,"color","rgb(97, 113, 130) !important"],[4,"ngFor","ngForOf"],[1,"control","control-outline","control-info","control--checkbox"],["type","checkbox","name","selectedtype",3,"id","value","checked","disabled","change"],[1,"form-row"],[1,"additional-seats--row"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"ngStyle","click"],["type","text","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px",3,"formControl"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"ngStyle","click"],["type","text",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px",3,"value"],["data-action","increment",1,"plus",2,"font-size","1.875rem","position","absolute","top","5px","right","1.25rem","cursor","pointer","line-height","normal",3,"click"],[1,"form-text","text-danger"],[1,"bg-light","p-3","mt-5","rounded-3","mb-5"],[1,"font-size-16","fw-normal","text-black","mb-1"],[1,"font-size-16","mb-1"],[1,"list-unstyled","mb-0"],[1,"card-title","my-3","font-weight-300","font-size-16",2,"margin-left","15px","padding-bottom","2px"],[1,"mb-1","font-weight-600","pl-3"],[1,"text-muted","mb-1","nowrap"],[1,"float-right","nowrap"],[1,"borderrounded-3p-4","input-info","mb-0"],[1,"control-label","fs-6"],["class","astrsk",4,"ngIf"],[1,"form-group"],[1,"astr
1sk"],["type","text","formControlName","value",1,"form-control","pt-2",3,"placeholder"],[1,"input-group",3,"ngClass"],["placeholder","select date","formControlName","value",1,"form-control","p-0",3,"config","onChange"],[1,"input-group-addon"],[1,"fa","fa-calendar"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","label-badge","form-control0","select-single-with-search","remove-space",3,"items","notFoundText","multiple"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","form-control0","select-single-with-search",3,"notFoundText","items"],[1,"d-flex","align-items-center","form-group","passengers-input","js-baby-seats","inited","position-relative","mb-0",3,"ngClass"],["data-action","decrement",1,"minus",2,"font-size","1.875rem","position","absolute","top","5px","left","1.25rem","cursor","pointer","line-height","normal",3,"click"],["type","text","formControlName","value","numberOnly","","value","0","ng-reflect-name","value",1,"form-control","new","text-center",2,"pointer-events","none","padding","0.75rem 1rem","font-size","16px"],[1,"document-field",3,"ngClass"],[1,"document-field-row"],[1,"document-field-name"],["class","fa fa-file-o",4,"ngIf"],[1,"document-field-name-text"],[1,"document-field-upload"],["type","file",3,"id","disabled","change"],["docFileInput",""],["type","button","class","document-field-remove","title","Remove",3,"click",4,"ngIf"],["type","hidden","formControlName","value"],["type","hidden","formControlName","file_name"],[1,"document-field-hint"],[1,"fa","fa-file-o"],[1,"fa","fa-spinner","fa-spin"],["type","button","title","Remove",1,"document-field-remove",3,"click"],[1,"fa","fa-trash"],[1,"list-unstyled","border","rounded-3","overflow-hidden","custom-select-menu"],[1,"p-3",3,"ngClass","click"],[1,"d-flex","align-items-center"],["alt","Logo",2,"width","80px","height","64px","object-fit","contain","min-width","80px","text-align","center",3,"src"],[1,"ms-3"],[1,"font-size-16","text-black","fw-semibold","font-size-16","text-black","mb-0"],[1,"mb-1","text-muted","font-size-12"],[1,"mb-0","d-flex","align-items-center"],["role","img","aria-label","Icon/Guests","width","16px","height","16px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","SuggestedCarClasses_icon__AgHlS"],["d","M2 22a8 8 0 1 1 16 0H2zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm7.363 2.233A7.505 7.505 0 0 1 22.983 22H20c0-2.61-1-4.986-2.637-6.767zm-2.023-2.276A7.98 7.98 0 0 0 18 7a7.964 7.964 0 0 0-1.015-3.903A5 5 0 0 1 21 8a4.999 4.999 0 0 1-5.66 4.957z"],[1,"ms-1","font-size-16","text-black"],[1,"ms-3","mb-0","d-flex","align-items-center"],["role","img","aria-label","Icon/Luggages","width","16px","height","16px","fill","currentColor","viewBox","0 0 24 24",1,"remixicon-icon","SuggestedCarClasses_icon__AgHlS"],["d","M15 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v13c0 .552-.448 1-1 1H3c-.552 0-1-.448-1-1V7c0-.552.448-1 1-1h5V4c0-.552.448-1 1-1h6zM8 8H6v11h2V8zm10 0h-2v11h2V8zm-4-3h-4v1h4V5z"],["class","ms-auto d-flex align-self-start",4,"ngIf"],["class","collapse mt-4 border-top pt-4","data-bs-parent","#accordionExample",3,"ngClass",4,"ngIf"],[1,"ms-auto","d-flex","align-self-start"],[1,"font-size-20","text-black","fw-semibold"],["class","text-muted font-size-12",4,"ngIf"],["class","price-section-dayprice",4,"ngIf"],["class","accordion ms-2",4,"ngIf"],[1,"text-muted","font-size-12"],[1,"price-section-dayprice"],[1,"accordion","ms-2"],["data-bs-toggle","collapse",1,"cursor-pointer",3,"click"],[1,"fa-lg","ml-auto","accordian-icon","text-black",3,"ngClass"],["data-bs-parent","#accordionExample",1,"collapse","mt-4","border-top","pt-4",3,"ngClass"],[1,"table","remove-padding"],["colspan","2",1,"no-border"],[1,"font-weight-normal"],["colspan","2","class","no-border",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","pb-3"],[1,"text-black","fw-semibold","font-size-16"],[1,"d-flex","align-item-center","justify-content-between","text-black","py-2","fw-semibold"],[1,"font-size-14","dot"],["class","d-flex align-item-center justify-content-between pb-3",4,"ngIf"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],["class","d-flex align-item-center justify-content-between ps-3",4,"ngFor","ngForOf"],["class","d-flex align-item-center justify-content-between text-black fw-semibold",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between"],[1,"d-flex","align-item-center","justify-content-between","ps-3"],[1,"fa","fa-dot-circle-o"],[1,"d-flex","align-item-center","justify-content-between","text-black","fw-semibold"],["class","d-flex align-item-center justify-content-between ps-4",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between","ps-4"],[1,"border-top","mt-4","pt-4"],[1,"form-group","col",3,"ngClass"],["placeholder","Select Package",1,"form-control0","select-single-with-search",3,"formControl","change"],["bindLabel","name","bindValue","value",3,"placeholder","items","formControl","change"],[1,"form-group","col"],[1,"fa","fa-user"],["dropdownPosition","top","placeholder","--","bindLabel","name","bindValue","id",1,"flex-fill",3,"items","formControl","change"],[1,"fa","fa-suitcase"],["dropdownPosition","top","placeholder","Payment Mode","bindLabel","charges_key","bindValue","id",3,"items","searchable","clearable","notFoundText","formControl","change"],["ng-label-tmp",""],[3,"isOtpVerification","callBackObject"],[1,"control-label","fw-semibold","fs-6","mb-3"],[1,"d-flex","gap-3","mb-4"],[1,"form-check","me-3"],["type","radio","name","tripType","id","normalTrip",1,"form-check-input",3,"checked","change"],["for","normalTrip",1,"form-check-label"],[1,"form-check"],["type","radio","name","tripType","id","businessTrip",1,"form-check-input",3,"checked","change"],["for","businessTrip",1,"form-check-label"],[1,"d-flex","gap-2"],["type","button",1,"btn","btn-secondary","text-uppercase","btn-lg","fw-semibold","font-size-18","flex-fill",3,"click"],["type","button",1,"btn","btn-red-gradient","text-uppercase","btn-lg","fw-semibold","font-size-18","flex-fill",3,"click"],[3,"pre_payment","pre_payment_value","tripPayload","FinalFare","hideStyle","is_yelowCab","trip_id","trip_num","paymentSucsessBook","closePaymentMethod","requestBooking"],["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"modal-body","flex"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"price-section","align-self-start"],[1,"price-section__left"],[1,"control","control-outline","control-info","control--radio","d-block","my-3","border","rounded"],[1,"font-weight-600","mt-0","mb-2"],[1,"mb-0","text-muted"],["type","radio","name","p-options","autocomplete","off",3,"id","change"],["type","radio","name","d-options","autocomplete","off",3,"id","change"]],template:function(e,t){if(1&e&&(f.TgZ(0,"form",0),f.YNc(1,Xu,1,1,"ng-template",null,1,f.W1O),f.TgZ(3,"div",2),f.TgZ(4,"div",3),f.TgZ(5,"div",4),f.YNc(6,ed,2,0,"div",5),f.YNc(7,td,1,0,"ng-container",6),f.YNc(8,id,2,1,"div",7),f.TgZ(9,"div",8),f.YNc(10,nd,4,6,"div",9),f.TgZ(11,"div",10),f.TgZ(12,"div",4),f.TgZ(13,"a
1pp-search-box-google",11),f.NdJ("search",function(e){return t.OnSearch(e)})("searchEvent",function(e){return t.searchEvent(e)}),f.qZA(),f.YNc(14,od,1,1,"span",12),f.YNc(15,ad,2,1,"span",13),f.qZA(),f.qZA(),f.TgZ(16,"div",14),f.YNc(17,sd,8,9,"ng-container",15),f.YNc(18,ud,4,1,"div",16),f.qZA(),f.TgZ(19,"div",17),f.TgZ(20,"app-search-box-google",18),f.NdJ("search",function(e){return t.OnSearchDestination(e)})("searchEvent",function(e){return t.searchEventDestination(e)}),f.qZA(),f.YNc(21,dd,1,1,"span",12),f.YNc(22,cd,2,1,"span",19),f.qZA(),f.YNc(23,hd,11,4,"ng-container",16),f.YNc(24,gd,3,2,"div",20),f.YNc(25,md,17,12,"div",21),f.YNc(26,fd,6,2,"div",22),f.YNc(27,Zd,9,4,"ng-container",16),f.YNc(28,Ad,5,3,"div",16),f.YNc(29,Ud,5,2,"div",23),f.TgZ(30,"div",24),f.TgZ(31,"app-booking-assets",25),f.NdJ("assetsChange",function(e){return t.onBookingAssetsChange(e)}),f.qZA(),f.YNc(32,Nd,2,1,"span",26),f.qZA(),f.qZA(),f.TgZ(33,"div",27),f.TgZ(34,"button",28),f.NdJ("click",function(){return t.submitFirstForm(t.addForm)}),f._uU(35),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(36,"div",2),f.TgZ(37,"div",29),f.TgZ(38,"div",30),f.YNc(39,Id,1,0,"ng-container",6),f.TgZ(40,"div",8),f.YNc(41,jd,56,37,"div",31),f.TgZ(42,"div"),f.TgZ(43,"h4",32),f._uU(44),f.qZA(),f.TgZ(45,"p",33),f._uU(46),f.qZA(),f.TgZ(47,"div",34),f.YNc(48,Xd,12,9,"ng-container",15),f.qZA(),f.qZA(),f.qZA(),f.TgZ(49,"div",27),f.TgZ(50,"button",28),f.NdJ("click",function(){return t.submitSecondForm(t.addForm)}),f.YNc(51,ec,1,0,"i",35),f._uU(52),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(53,"div",2),f.TgZ(54,"div",36),f.TgZ(55,"div",30),f.YNc(56,tc,1,0,"ng-container",6),f.YNc(57,ic,2,0,"div",5),f.TgZ(58,"div",37),f.TgZ(59,"a",38),f.YNc(60,$c,31,12,"ul",39),f.qZA(),f.YNc(61,Kc,4,5,"div",40),f.YNc(62,Wc,3,6,"div",40),f.qZA(),f.TgZ(63,"div",41),f.TgZ(64,"div",42),f.YNc(65,Xc,5,2,"div",43),f.YNc(66,eh,5,2,"div",43),f.YNc(67,ih,3,8,"div",44),f.qZA(),f.TgZ(68,"button",28),f.NdJ("click",function(){return t.goToLoginScreen()}),f._uU(69),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(70,"div",2),f.TgZ(71,"div",45),f.TgZ(72,"div",30),f.YNc(73,nh,1,0,"ng-container",6),f.YNc(74,oh,2,0,"div",5),f.YNc(75,ah,1,1,"app-yelowcab-login",46),f.YNc(76,lh,17,12,"div",47),f.qZA(),f.qZA(),f.qZA(),f.TgZ(77,"div",2),f.TgZ(78,"div",48),f.TgZ(79,"div",30),f.YNc(80,sh,1,0,"ng-container",6),f.TgZ(81,"div",49),f.YNc(82,uh,1,8,"app-payment-gatway-list",50),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(83,"div",2),f.TgZ(84,"div",48),f.TgZ(85,"div",30),f.YNc(86,dh,1,0,"ng-container",6),f.TgZ(87,"div",51),f.TgZ(88,"div",52),f.TgZ(89,"div",53),f.TgZ(90,"div",54),f.TgZ(91,"div",55),f._UZ(92,"i",56),f.qZA(),f.TgZ(93,"h1",57),f._uU(94),f.qZA(),f.TgZ(95,"p",58),f._uU(96),f.qZA(),f.TgZ(97,"button",59),f.NdJ("click",function(){return t.ViewUpdate(!0)}),f._uU(98),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.YNc(99,gh,14,2,"div",60),f.TgZ(100,"div",61),f.TgZ(101,"div",62),f.TgZ(102,"form",63),f.TgZ(103,"div",64),f.TgZ(104,"div",65),f.TgZ(105,"h4",66),f._uU(106,"Select Destination"),f.qZA(),f.TgZ(107,"button",67),f.NdJ("click",function(){return t.closeFixDestinationPopup()}),f.TgZ(108,"span",68),f._uU(109,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.YNc(110,mh,2,1,"div",69),f.TgZ(111,"div",70),f.TgZ(112,"button",71),f.NdJ("click",function(){return t.submitZonePricing()}),f._uU(113," Submit "),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(114,"div",72),f.TgZ(115,"div",62),f.TgZ(116,"form",73),f.NdJ("ngSubmit",function(){return t.submitUserPickUpLocationForm()}),f.TgZ(117,"div",64),f.TgZ(118,"div",65),f.TgZ(119,"h4",74),f._uU(120,"Pickup Saved Address"),f.qZA(),f.TgZ(121,"button",67),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f.TgZ(122,"span",68),f._uU(123,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(124,"div",75),f.TgZ(125,"div",76),f.YNc(126,_h,7,3,"label",77),f.qZA(),f.qZA(),f.TgZ(127,"div",70),f.TgZ(128,"button",78),f.NdJ("click",function(){return t.closeUserPickupLocationForm()}),f._uU(129,"Cancel"),f.qZA(),f.TgZ(130,"button",79),f._uU(131,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(132,"div",80),f.TgZ(133,"div",62),f.TgZ(134,"form",73),f.NdJ("ngSubmit",function(){return t.submitUserDropoffLocationForm()}),f.TgZ(135,"div",64),f.TgZ(136,"div",65),f.TgZ(137,"h4",81),f._uU(138,"Dropoff Saved Address"),f.qZA(),f.TgZ(139,"button",67),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f.TgZ(140,"span",68),f._uU(141,"\xd7"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(142,"div",75),f.TgZ(143,"div",76),f.YNc(144,fh,7,3,"label",77),f.qZA(),f.qZA(),f.TgZ(145,"div",70),f.TgZ(14
16,"button",78),f.NdJ("click",function(){return t.closeUserDropoffLocationForm()}),f._uU(147,"Cancel"),f.qZA(),f.TgZ(148,"button",79),f._uU(149,"Submit"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.qZA()),2&e){const e=f.MAs(2);let i;f.Q6J("formGroup",t.addForm),f.xp6(3),f.Q6J("hidden",!t.displayFirstForm)("ngClass",f.l5B(109,vh,t.is_full_screen,!t.is_full_screen,!t.displayFirstForm,t.displayFirstForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(114,yh,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(117,bh,t.is_full_screen)),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(1),f.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",f.DdM(119,xh)),f.xp6(1),f.Q6J("ngIf",t.isBookingHold),f.xp6(2),f.Q6J("ngIf",1!=t.transactionCategory.length),f.xp6(2),f.Q6J("ngClass",f.VKq(120,pd,t.formErrors.pickup_location)),f.xp6(1),f.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.search_pick_location)("isBooing",!0)("responseData",t.responseData)("searchText",t.searchText)("is_disable",!t.addForm.value.booking_type_id),f.xp6(1),f.Q6J("ngIf",t.formErrors.pickup_location),f.xp6(1),f.Q6J("ngIf",!t.pickupRegionFound),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.checkpoints.controls),f.xp6(1),f.Q6J("ngIf",0==t.fixZoneDisableDropoff&&(null==(i=t.addForm.get("checkpoints"))||null==i.value?null:i.value.length)<=2),f.xp6(1),f.Q6J("ngClass",f.VKq(122,pd,t.formErrors.destination)),f.xp6(1),f.Q6J("is_disable",t.fixZoneDisableDropoff||!t.addForm.value.booking_type_id)("placeholder",null==t.currentLanguage?null:t.currentLanguage.search_des_loc)("responseData",t.responseDataDestionation)("isBooing",!0)("searchText",t.searchTextDestionation),f.xp6(1),f.Q6J("ngIf",t.formErrors.destination),f.xp6(1),f.Q6J("ngIf",!t.dropRegionFound),f.xp6(1),f.Q6J("ngIf",t.rideType.length>1&&!(t.isBusinessTrip&&"Y"==t.corporateBookingConfirmation)),f.xp6(1),f.Q6J("ngIf",t.isBusinessTrip&&"Y"==t.corporateBookingConfirmation),f.xp6(1),f.Q6J("ngIf",2==t.selectedTab),f.xp6(1),f.Q6J("ngIf","Y"==t.checkGenderEnable),f.xp6(1),f.Q6J("ngIf",t.checkReturnTimeConfig&&"hourly"!=t.bookingTypeKey&&"package"!=t.bookingTypeKey),f.xp6(1),f.Q6J("ngIf",t.displayFlightNumber),f.xp6(1),f.Q6J("ngIf",(null==t.otherChargesArray?null:t.otherChargesArray.length)>0),f.xp6(2),f.Q6J("title",((null==t.currentLanguage?null:t.currentLanguage.note_for_driver)||"Notes")+(t.isNotesRequired?" *":""))("assets",t.bookingAssetsList)("compact",!0),f.xp6(1),f.Q6J("ngIf",t.isNotesRequired&&!t.hasRequiredBookingNotes()),f.xp6(2),f.Akn(f.WLB(124,rh,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.isBookingHold||t.addForm.controls.checkpoints.invalid||!t.showNextButton||!t.pickupRegionFound||!t.dropRegionFound||t.sameZoneTripRestricted),f.xp6(1),f.hij("",null==t.currentLanguage?null:t.currentLanguage.continue," "),f.xp6(1),f.Q6J("hidden",!t.displaySecondForm)("ngClass",f.l5B(127,vh,t.is_full_screen,!t.is_full_screen,!t.displaySecondForm,t.displaySecondForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(132,kh,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(134,Zh,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",f.DdM(137,Ch)),f.xp6(2),f.Q6J("ngIf",t.selectedFlightObj),f.xp6(3),f.Oqu(null==t.currentLanguage?null:t.currentLanguage.details_screen_title),f.xp6(2),f.hij("",null==t.currentLanguage?null:t.currentLanguage.details_screen_sub_title,"."),f.xp6(2),f.Q6J("ngForOf",t.addForm.controls.properties.controls),f.xp6(2),f.Akn(f.WLB(138,rh,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.isBookingHold||t.isDocumentUploading),f.xp6(1),f.Q6J("ngIf",t.isBookingHold||t.isDocumentUploading),f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.continue," "),f.xp6(1),f.Q6J("hidden",!t.displayThirdForm)("ngClass",f.l5B(141,vh,t.is_full_screen,!t.is_full_screen,!t.displayThirdForm,t.displayThirdForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(146,kh,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(148,Zh,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",f.DdM(151,Fh)),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(3),f.Q6J("ngForOf",t.filterVehicleArray),f.xp6(1),f.Q6J("ngIf","package"==t.bookingTypeKey),f.xp6(1),f.Q6J("ngIf","hourly"==t.bookingTypeKey),f.xp6(3),f.Q6J("ngIf",t.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",t.displayLuggagePassenger),f.xp6(1),f.Q6J("ngIf",t.paymentMode.length>1&&!t.isBusinessTrip),f.xp6(1),f.Akn(f.WLB(152,rh,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.Q6J("disabled",t.disableBtn||t.isBookingHold),f.xp6(1),f.hij("",null==t.currentLanguage?null:t.currentLanguage.continue," "),f.xp6(1),f.Q6J("hidden",!t.displayLoginForm)("ngClass",f.l5B(155,vh,t.is_full_screen,!t.is_full_screen,!t.displayLoginForm,t.displayLoginForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(160,kh,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(162,Zh,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",f.DdM(165,Th)),f.xp6(1),f.Q6J("ngIf",t.loadingState),f.xp6(1),f.Q6J("ngIf",!t.showTripTypeSelection),f.xp6(1),f.Q6J("ngIf",t.showTripTypeSelection),f.xp6(1),f.Q6J("hidden",!t.displayPaymentForm||!t.showPaymentStep)("ngClass",f.l5B(166,vh,t.is_full_screen,!t.is_full_screen,!t.displayPaymentForm,t.displayPaymentForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(171,kh,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(173,Zh,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",f.DdM(176,Ah)),f.xp6(2),f.Q6J("ngIf",t.showPaymetScreen),f.xp6(1),f.Q6J("hidden",!t.displayThankYouForm)("ngClass",f.l5B(177,vh,t.is_full_screen,!t.is_full_screen,!t.displayThankYouForm,t.displayThankYouForm&&!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.VKq(182,kh,!t.is_full_screen)),f.xp6(1),f.Q6J("ngClass",f.WLB(184,Zh,t.is_full_screen,!t.is_full_screen)),f.xp6(1),f.Q6J("ngTemplateOutlet",e)("ngTemplateOutletContext",f.DdM(187,Ph)),f.xp6(8),f.Oqu(t.content),f.xp6(2),f.AsE("",null==t.currentLanguage?null:t.currentLanguage.trip_id," #",t.trip_number," "),f.xp6(1),f.Akn(f.WLB(188,rh,(null==t.themeCodeData?null:t.themeCodeData.user_primary_color)+"!important",null==t.themeCodeData?null:t.themeCodeData.user_secondary_color)),f.xp6(1),f.hij(" ",null==t.currentLanguage?null:t.currentLanguage.book_another_ride," "),f.xp6(1),f.Q6J("ngIf",!t.fixZoneDisableDropoff),f.xp6(11),f.Q6J("ngIf",t.zonePriceData.length>0),f.xp6(16),f.Q6J("ngForOf",t.userPickipLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserPickupLocation),f.xp6(14),f.Q6J("ngForOf",t.userDropoffLocationsArray),f.xp6(4),f.Q6J("disabled",!t.selectedUserDropoffLocation)}},directives:[r._Y,r.JL,r.sg,n.mk,n.O5,n.tP,J.n,r.CE,n.sg,B.F,r.F,u.w9,r.JJ,r.On,r.oH,r.x0,d.DJ,r._,r.Fj,u.xv,n.PC,r.u,W.Y,u.bb,we,qe.X],pipes:[De.GP,De.ZQ,n.uU,De.SC,Oe.D,n.JJ,Le],styles:[".custom-number-input[_ngcontent-%COMP%]{display:flex;align-items:center}.booking-hold-banner[_ngcontent-%COMP%]{margin:16px;padding:12px 16px;border-radius:8px;background:color-mix(in srgb,var(--bs-primary-theme-color) 12%,#fff);border:1px solid color-mix(in srgb,var(--bs-primary-theme-color) 35%,#fff);color:#344054;font-size:14px;font-weight:500;text-align:center}.number-input[_ngcontent-%COMP%]{width:60px;text-align:center;-moz-appearance:textfield}.number-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .number-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.custom-arrow[_ngcontent-%COMP%]{cursor:pointer;padding:5px 10px;font-size:20px;background-color:#007bff;color:#fff;border:none;border-radius:5px;margin:0 5px}.custom-arrow[_ngcontent-%COMP%]:hover{background-color:#0056b3}.dongle.form-control[_ngcontent-%COMP%]{display:block;position:absolute;z-index:6;padding:13px 20px;top:-5px;width:48px;height:48px;border:none;transition:opacity .3s ease;cursor:pointer;opacity:.4}.hidden-width[_ngcontent-%COMP%]{display:none!important;width:550px!important}.default-width[_ngcontent-%COMP%]{width:550px!important}.list-focus[_ngcontent-%COMP%]{border-top-left-radius:.5rem;border-top-right-radius:.5rem;border:2px solid #000;background-color:#f0f2f7}.form-control-feedback-right[_ngcontent-%COMP%]{position:absolute;top:0;z-index:1001;display:block;text-align:center;pointer-events:none;line-height:38px;
1height:38px;width:38px;color:var(--c-a4b0c3);right:25px}.booking-form-w-booking[_ngcontent-%COMP%]{overflow-y:auto}.booking-widget-flex-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.booking-widget-inner-flex[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}.booking-widget-inner-flex[_ngcontent-%COMP%] > ol[_ngcontent-%COMP%]:first-of-type{flex-shrink:0}.vehicle-step-scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.booking-widget-footer-bar[_ngcontent-%COMP%]{flex-shrink:0;box-shadow:0 -4px 14px #0000000f}.document-field[_ngcontent-%COMP%]{width:100%;margin-bottom:0}.document-field-row[_ngcontent-%COMP%]{display:flex;align-items:stretch;width:100%;min-height:42px;border:1px solid #ced4da;border-radius:4px;background:#fff;overflow:hidden}.document-field.has-error[_ngcontent-%COMP%] .document-field-row[_ngcontent-%COMP%]{border-color:#dc3545}.document-field-name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;align-items:center;grid-gap:8px;gap:8px;padding:.5rem .75rem;color:#6c757d;font-size:14px;background:#fff}.document-field-name.has-file[_ngcontent-%COMP%]{color:#212529}.document-field-name[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{flex-shrink:0;color:#495057;color:var(--bs-primary-theme-color, #495057)}.document-field-name-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-field-upload[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:0 1rem;margin:0;border:none;border-left:1px solid #ced4da;background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;font-size:14px;font-weight:600;line-height:1.2;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;overflow:hidden}.document-field-upload[_ngcontent-%COMP%]:hover:not(.is-disabled){filter:brightness(.95)}.document-field-upload.is-disabled[_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%]{opacity:.75;cursor:not-allowed}.document-field-upload[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;font-size:0}.document-field-upload.is-disabled[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%], .document-field-upload.is-loading[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{pointer-events:none}.document-field-remove[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:0;margin:0;border:none;border-left:1px solid #ced4da;background:color-mix(in srgb,#343a40 12%,#fff);background:color-mix(in srgb,var(--bs-primary-theme-color, #343a40) 12%,#fff);color:#343a40;color:var(--bs-primary-theme-color, #343a40);font-size:16px;cursor:pointer}.document-field-remove[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{color:inherit}.document-field-remove[_ngcontent-%COMP%]:hover{background:#343a40;background:var(--bs-primary-theme-color, #343a40);color:#fff;color:var(--bs-secondary-theme-color, #fff)}.document-field-hint[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12px;color:#6c757d;line-height:1.3}[_nghost-%COMP%] ol[class*=order-header--steps] .step-book{flex:1 1 0;min-width:0;text-align:center}[_nghost-%COMP%] ol[class*=order-header--steps] .step-top{min-height:28px;display:flex;justify-content:center;align-items:flex-end;margin-bottom:4px}[_nghost-%COMP%] .step-step-icon{font-size:14px;line-height:1;color:#98a2b3}[_nghost-%COMP%] .step-step-icon--done{color:#344054}[_nghost-%COMP%] .step-dot-btn{display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;line-height:1}[_nghost-%COMP%] .step-dot-btn:disabled{cursor:not-allowed;opacity:1}[_nghost-%COMP%] .step-book--active .btn-text{font-weight:600}"]}),e})(),canActivate:[_.a]},{path:"ride/booking-layout-two",component:La,canActivate:[_.a]},{path:"ride/book",component:Oa,canActivate:[_.a]},{path:"ride/map",component:Ql},{path:"ride/web",component:wu,canActivate:[_.a]}];let qh=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=f.oAB({type:e}),e.\u0275inj=f.cJS({imports:[[o.Bz.forChild(wh)],o.Bz]}),e})();var Dh=i(48806);let Oh=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=f.oAB({type:e}),e.\u0275inj=f.cJS({imports:[[n.ez,o.Bz,qh,u.A0,d.Me,r.u5,r.UX,p.m,a.U5,s.T5,l.Is,c.zk,g.t,h.p,m.C,Dh.W]]}),e})()}}]);
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.