PageSourceSearch

https://almutahidah.com/chunk-SGNZOO7Z.js

js almutahidah.com collected 2026-09-27 07:10:07 UTC 49,282 bytes, 1 lines download raw bytes

1import{a as ee}from"./chunk-CB4WWLP4.js";import{a as te}from"./chunk-FSKBPWGY.js";import{a as Kt}from"./chunk-2TAWK5BM.js";import{a as zt,d as B,e as Wt}from"./chunk-WMW4IAL2.js";import{a as pt}from"./chunk-EMCE6EVZ.js";import{a as Yt,b as Qt,c as Jt,d as Xt}from"./chunk-DFG22IZU.js";import{a as Rt}from"./chunk-BRGXPDDG.js";import{a as Zt}from"./chunk-MUUT3CMA.js";import{g as Gt,h as Ut}from"./chunk-JEH3B2MD.js";import"./chunk-HL27X4PX.js";import"./chunk-QPVJBQNK.js";import{h as $t}from"./chunk-KRKLOAW6.js";import{b as Mt,c as Nt,e as P,g as ot,h as At,l as Vt,m as Bt,p as Ot,s as Ht,w as jt,x as Ft,y as qt}from"./chunk-2R4AZB5W.js";import"./chunk-BYXBJQAS.js";import"./chunk-NMGI7OHJ.js";import{b as Dt,c as G,d as R,e as A,h as Pt,i as V}from"./chunk-JCPUWVFC.js";import"./chunk-MCQML6YT.js";import{b as D}from"./chunk-XNXLFDZX.js";import{a as Lt,b as Et}from"./chunk-KELMSLCR.js";import{a as kt}from"./chunk-N6W3AF2G.js";import"./chunk-IENL4UJA.js";import{b as nt,d as q,e as N}from"./chunk-JLWCQ6UT.js";import{H as L,K as wt,V as E,W as Tt}from"./chunk-P4C42LQP.js";import"./chunk-RZZCZ2VH.js";import{m as F,w as M}from"./chunk-Z7IUSDSQ.js";import{$ as it,Ac as m,Cf as dt,Ee as H,Fa as ht,Fe as vt,He as yt,Ie as Ct,Je as r,Kd as y,Ke as a,Le as v,Me as xt,Ne as _t,Oc as gt,Pe as j,Ra as T,Vf as s,Wf as C,Xf as u,Yf as O,eg as St,f as Z,ff as w,fg as bt,gc as ft,gg as It,hf as f,ig as k,kb as b,lb as I,lg as $,ng as K,pe as p,re as z,vg as l,wg as c,z as et,zc as n}from"./chunk-SRTQBDBP.js";import{a as Y}from"./chunk-EJD3L6HM.js";import{g as W}from"./chunk-T7NDVU76.js";var ie=W(Y());var fe=()=>["/payment"],ge=(e,h)=>({contractId:e,type:h}),ve=()=>["/home"];function ye(e,h){if(e&1&&(r(0,"div",10),s(1),l(2,"translate"),a()),e&2){let t=f();n(),O(" ",c(2,2,"PaymentLandingPage.DearCustomer")," : ",t.contract==null?null:t.contract.ContactName," ")}}function Ce(e,h){if(e&1&&(r(0,"div",22)(1,"div",23)(2,"div",24)(3,"div",25),s(4),a()()()()),e&2){let t=f();n(4),u(" ",t.contract==null?null:t.contract.paymentNote," ")}}function xe(e,h){if(e&1&&(r(0,"div",26),v(1,"img",27),r(2,"div",28)(3,"span",28),s(4),l(5,"translate"),a(),r(6,"span",29),s(7),a(),r(8,"span",28),s(9),l(10,"translate"),a()()()),e&2){let t=f();n(4),C(c(5,3,"paymentCancelNote")),n(3),C(t.timerDisplay),n(2),C(c(10,5,t.timerUnit))}}var ne=(()=>{class e{constructor(t,o,i,d,g,x,_,S){this.route=t,this.router=o,this.hourlyContractService=i,this.navigator=d,this.sessionStorageService=g,this.sharedService=x,this.countdownTimerService=_,this.paymentTimerHandlerService=S,this.Type=pt,this.timerDisplay="00:00",this.timerUnit="minute",this.unsubscribe$=new Z}ngOnInit(){this.sharedService.setCurrentStep("ShopperResult"),this.route.queryParams.subscribe(t=>{if(t){if(this.stepId=t.stepId,!this.stepId){ie.default.fire({title:"Error, you will be redirect to home page",confirmButtonText:"Okay",icon:"error"}).then(()=>{this.router.navigate(["/"])});return}this.LoadData()}})}LoadData(){this.hourlyContractService.GetContractSuccess(this.stepId).subscribe(t=>{if(this.contract=t?.data,this.contract?.showCancellationTimeout){if(this.contract?.expiredDate)this.startCountdownTimer(this.contract.expiredDate);else if(this.contract?.totalSecondstimeoutAfter){let o=this.countdownTimerService.getCurrentRiyadhDateTime(),i=new Date(o.getTime()+this.contract.totalSecondstimeoutAfter*1e3),d=this.countdownTimerService.formatExpiredDate(i);this.startCountdownTimer(d)}}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.countdownTimerService.stopTimer()}startCountdownTimer(t){this.countdownTimerService.startTimer(t,{onUpdate:o=>{this.updateTimerDisplay(o)},onExpire:()=>{this.timerDisplay="00",this.timerUnit="second",this.handleTimerExpiration()}})}handleTimerExpiration(){this.paymentTimerHandlerService.handleTimerExpiration({contractId:this.contract?.id,type:pt.HourlyContract,destroy$:this.unsubscribe$})}updateTimerDisplay(t){t=Math.floor(t);let o=86400,i=3600,d=60,g=Math.floor(t/o),x=Math.floor(t%o/i),_=Math.floor(t%i/d),S=Math.floor(t%d);if(t>=o)this.timerDisplay=`${g}:${this.padZero(x)}:${this.padZero(_)}:${this.padZero(S)}`,this.timerUnit="day";else if(t>=i){let U=Math.floor(t/i);this.timerDisplay=`${this.padZero(U)}:${this.padZero(_)}:${this.padZero(S)}`,this.timerUnit="hour"}else t>=d?(this.timerDisplay=`${this.padZero(_)}:${this.padZero(S)}`,this.timerUnit="minute"):(this.timerDisplay=`${this.padZero(S)}`,this.timerUnit="second")}padZero(t){return t<10?`0${t}`:`${t}`}static{this.\u0275fac=function(o){return new(o||e)(m(L),m(E),m(B),m(A),m(D),m(V),m(zt),m(Wt))}}static{this.\u0275cmp=T({type:e,selectors:[["app-payment"]],standalone:!0,features:[
1k],decls:45,vars:37,consts:[["id","payment",1,"d-flex","justify-content-center","align-items-center"],[1,"container","pt-2"],[1,"fs-5","textSecondary","text-center","my-2"],[1,"fs-5","text-green","text-center","my-2"],[1,"text-center","my-3"],["src","assets/images/indiv/success-icon.svg"],[1,"row","align-items-center","justify-content-center"],[1,"order-lg-1","order-0","text-center","justify-content-center"],[1,"fs-20","f-w-regular","textSecondary","mb-3"],[1,"textMain"],[1,"fs-18","f-w-regular","mb-3","textMain"],["class","col-12 p-0 mt-2 mb-1",4,"ngIf"],["class","d-flex text-center align-items-center justify-content-center gap-2 mb-3",4,"ngIf"],[1,"d-flex","justify-content-center","mb-3"],[1,"w-100","w-md-35","w-sm-50","justify-content-center","gap-3"],[1,"d-flex","gap-3","justify-content-center"],["type","button","name","next","id","next-btn","role","button",1,"btn","main-button","fs-20","f-w-regular","m-auto","m-md-0",3,"routerLink","queryParams"],[1,"d-flex","flex-row","gap-2","align-items-center","justify-content-center","bg-tertiary"],["src","assets/images/payment/pay-now.svg",1,"me-2"],[1,"fs-16","fw-bold"],["type","button","name","next","id","next-btn","role","button",1,"btn","main-button","fs-20","f-w-regular","m-auto","m-md-0",3,"routerLink"],["src","assets/images/payment/home.svg",1,"me-2"],[1,"col-12","p-0","mt-2","mb-1"],["role","alert",1,"paymentNote","fs-footer","f-w-bold","m-auto"],[1,"d-flex","gap-1","justify-content-center","align-items-start","align-items-md-center"],[1,"error","fs-14","f-w-regular"],[1,"d-flex","text-center","align-items-center","justify-content-center","gap-2","mb-3"],["src","assets/images/core/info-circle-orange.svg","alt","info","width","20","height","20"],[1,"text-FF3B00","fs-16","f-w-regular"],[1,"text-FF3B00","fs-16","f-w-bold","mx-1"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),s(3),l(4,"translate"),a(),r(5,"div",3),s(6),l(7,"translate"),a(),r(8,"div",4),v(9,"img",5),a(),r(10,"div",6)(11,"div",7)(12,"div",8),s(13),l(14,"translate"),r(15,"span",9),s(16),a()(),r(17,"div",8),s(18),l(19,"translate"),r(20,"span",9),s(21),a(),s(22),l(23,"translate"),a(),y(24,ye,3,4,"div",10),r(25,"div",8),s(26),l(27,"translate"),a(),y(28,Ce,5,1,"div",11)(29,xe,11,7,"div",12),r(30,"div",13)(31,"div",14)(32,"div",15)(33,"button",16)(34,"div",17),v(35,"img",18),r(36,"span",19),s(37),l(38,"translate"),a()()(),r(39,"button",20)(40,"div",17),v(41,"img",21),r(42,"span",19),s(43),l(44,"translate"),a()()()()()()()()()()),o&2&&(n(3),u(" ",c(4,16,"dynamicSteps.thankYou")," "),n(3),u(" ",c(7,18,"dynamicSteps.successfullyCompleted")," "),n(7),u(" ",c(14,20,"PaymentLandingPage.RequestRegisterd")," : "),n(3),C(i.contract==null?null:i.contract.contractNo),n(2),u(" ",c(19,22,"PaymentLandingPage.DeservedAmount")," : "),n(3),C(i.contract==null?null:i.contract.finalPrice),n(),u(" ",c(23,24,"sar")," "),n(2),H(24,i.contract!=null&&i.contract.ContactName?24:-1),n(2),u(" ",c(27,26,"PaymentLandingPage.ChoosePaymentMethod")," "),n(2),p("ngIf",i.contract==null?null:i.contract.paymentNote),n(),p("ngIf",i.contract==null?null:i.contract.showCancellationTimeout),n(4),p("routerLink",$(32,fe))("queryParams",K(33,ge,i.contract==null?null:i.contract.id,i.Type.HourlyContract)),n(4),u("",c(38,28,"PaymentLandingPage.PayOnline")," "),n(2),p("routerLink",$(36,ve)),n(4),u("",c(44,30,"PaymentLandingPage.HomePage")," "))},dependencies:[N,q,M,F,Tt]})}}return e})();var oe=W(Y());function _e(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.city")," "),n(4),C(t.contract==null?null:t.contract.cityName)}}function Se(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.district")," "),n(4),C(t.contract==null?null:t.contract.districtName)}}function be(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.employeesNo")," "),n(4),C(t.contract==null?null:t.contract.numOfWorkers)}}function Ie(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.visitsNo")," "),n(4),C(t.contract==null?null:t.contract.numOfVisits)}}function we(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.duration")," "),n(4),C(t.contract==null?null:t.contract.contractDuration)}}function Te(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.daysNo")," "),n(4),C(t.contract==null?null:t.contract.daysCount)}}function ke(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.selectedDays")," "),n(4),C(t.contract==null?null:t.contract.selectedDays)}}function Le(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.firstVisitDate")," "),n(4),C(t.contract==null?null:t.contract.startDay)}}function Ee(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.nationality")," "),n(4),C(t.contract==null?null:t.contract.resourceGroupName)}}function De(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.hoursNo")," "),n(4),C(t.contract==null?null:t.contract.numOfHours)}}function Pe(e,h){if(e&1&&(r(0,"div",12),v(1,"img",24),r(2,"span"),s(3),l(4,"translate"),r(5,"span",25)(6,"span"),s(7),l(8,"translate"),a(),r(9,"span",26),s(10),a(),r(11,"span"),s(12),l(13,"translate"),a()()()()),e&2){let t=f();n(3),u(" ",c(4,4,"hourly.payment-type")," : "),n(4),C(c(8,6,"Cash on delivery")),n(3),u("(",t.contract.finalPrice.toFixed(2),""),n(2),u("",c(13,8,"AED"),")")}}function Me(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.packageName")," "),n(4),C(t.contract==null?null:t.contract.serviceName)}}function Ne(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),l(8,"translate"),a()()()),e&2){let t=f();n(3),u(" ",c(4,3,"HourlyContractConfirmation.ContractDetails.finalPrice")," "),n(4),O(" ",t.contract.totalPriceWithVat.toFixed(2)," ",c(8,5,"sar")," ")}}function Ae(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),l(8,"translate"),a()()()),e&2){let t=f();n(3),u(" ",c(4,3,"HourlyContractConfirmation.ContractDetails.packagePrice")," "),n(4),O(" ",t.contract==null?null:t.contract.totalPriceWithoutVat," ",c(8,5,"sar")," ")}}function Ve(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),a(),s(4," : "),r(5,"span",23),s(6),l(7,"translate"),a()()()),e&2){let t=h.$implicit;n(3),u(" ",t.name," "),n(3),O(" (",t.finalPrice.toFixed(2)," ",c(7,3,"SAR"),") ")}}function Be(e,h){e&1&&(r(0,"span",23),s(1),l(2,"translate"),a()),e&2&&(n(),u(" 0 ",c(2,1,"sar")," "))}function Oe(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),l(8,"translate"),a(),y(9,Be,3,3,"span",27),a()()),e&2){let t=f();n(3),u(" ",c(4,4,"HourlyContractConfirmation.ContractDetails.oneVisitPrice")," "),n(4),O(" ",t.contract==null?null:t.contract.oneVisitPrice," ",c(8,6,"sar")," "),n(2),p("ngIf",!(t.contract!=null&&t.contract.oneVisitPrice))}}function He(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),a()()()),e&2){let t=f();n(3),u(" ",c(4,2,"HourlyContractConfirmation.ContractDetails.vatRate")," "),n(4),C(t.contract==null?null:t.contract.vatRate)}}function je(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),l(8,"translate"),a()()()),e&2){let t=f();n(3),u(" ",c(4,3,"HourlyContractConfirmation.ContractDetails.vatAmou
1nt")," "),n(4),O(" ",t.contract==null?null:t.contract.vatAmount," ",c(8,5,"sar")," ")}}function Fe(e,h){if(e&1&&(r(0,"div",15)(1,"div",22)(2,"span",23),s(3),l(4,"translate"),a(),s(5," : "),r(6,"span",23),s(7),l(8,"translate"),a()()()),e&2){let t=f();n(3),u(" ",c(4,3,"HourlyContractConfirmation.ContractDetails.totalPrice")," "),n(4),O(" ",t.contract==null?null:t.contract.totalPriceWithVat," ",c(8,5,"sar")," ")}}var re=(()=>{class e{constructor(t,o,i,d,g,x,_,S){this.route=t,this.router=o,this.hourlyContractService=i,this.stepsService=d,this.navigator=g,this.sessionStorageService=x,this.translate=_,this.sharedService=S,this.unsubscribe$=new Z}ngOnInit(){this.sharedService.setCurrentStep("ContractDetails"),history.pushState(null,"",location.href),et(window,"popstate").pipe(it(this.unsubscribe$)).subscribe(()=>{history.pushState(null,"",location.href)}),this.route.queryParams.subscribe(t=>{if(t){if(this.stepId=t.stepId,this.getStepDetails(),!this.stepId){oe.default.fire({title:"Error, you will be redirect to home page",confirmButtonText:"Okay",icon:"error"}).then(()=>{this.router.navigate(["/"])});return}this.LoadData()}})}LoadData(){this.hourlyContractService.GetContractDetails(this.stepId).subscribe(t=>{this.contract=t?.data.data})}getStepDetails(){this.stepsService.getStepDetailsByActionName(Number(this.sessionStorageService.ServiceType),this.sessionStorageService.currentStep,this.stepId).subscribe(t=>{this.stepDetails=t})}resolveSelectedDaysAndDuration(){}next(){this.navigator.navigateToNext(this.sessionStorageService.currentStep,null,this.sessionStorageService.ServiceType,this.stepId)}back(){this.navigator.navigateToPrev(this.sessionStorageService.currentStep,this.stepId,!0,null)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(o){return new(o||e)(m(L),m(E),m(B),m(R),m(A),m(D),m(nt),m(V))}}static{this.\u0275cmp=T({type:e,selectors:[["app-contract-details"]],standalone:!0,features:[k],decls:60,vars:30,consts:[[1,""],[1,"row","row-cols-1","row-cols-lg-2","g-3"],[1,"col"],[1,"card-container","h-100"],[1,"card","border-0","h-100","main-card","no-bg-img"],[1,"overlay"],[1,"lead-header","shrink-pachage-name","d-flex","flex-column","gap-0","align-items-start","justify-content-between","position-relative"],[1,"header","w-100","p-3","pt-4","pb-4","d-flex","justify-content-between","align-items-center"],[1,"d-flex","gap-2","fs-5","textMain","text-center","mx-auto"],[1,"card-body","gap-4","d-flex","flex-column","justify-content-between","position-relative"],[1,"row","row-gap-3"],["class","details-list-item d-flex col-12 col-md-6",4,"ngIf"],[1,"info","fs-16","f-w-regular","mb-2","d-flex","align-content-center","align-items-center","gap-2"],[1,"card-container","col","h-auto"],[1,"card","border-0","h-100","main-card","no-bg-img","h-100"],[1,"details-list-item","d-flex","col-12","col-md-6"],[1,"mt-4"],["role","group",1,"d-flex","flex-column","flex-md-row","gap-2","justify-content-end","w-100","steps-btns"],["id","prev","type","button",1,"button","secondary-button","order-1","order-md-0",3,"click"],[1,"fs-20","fw-regular","d-flex","align-items-center","gap-2","justify-content-center"],["src","assets/images/hourly/right-arrow.svg","alt","arrow",1,"arrow-icon"],["id","next","type","button",1,"button","main-button","order-0","order-md-1","fs-20",3,"click"],[1,"d-flex","align-items-center","gap-1","w-100"],[1,"textSecondary","fs-16","f-w-regular"],["src","assets/images/core/icons/primary-alert.svg","alt","primary-alert"],[1,"fs-16","fw-bold"],[1,"mx-1"],["class","textSecondary fs-16 f-w-regular",4,"ngIf"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),v(5,"div",5),r(6,"section",6)(7,"div",7)(8,"span",8),s(9),l(10,"translate"),a()()(),r(11,"section",9)(12,"div",10),y(13,_e,8,4,"div",11)(14,Se,8,4,"div",11),a(),r(15,"div",10),y(16,be,8,4,"div",11)(17,Ie,8,4,"div",11),a(),r(18,"div",10),y(19,we,8,4,"div",11)(20,Te,8,4,"div",11),a(),r(21,"div",10),y(22,ke,8,4,"div",11)(23,Le,8,4,"div",11),a(),r(24,"div",10),y(25,Ee,8,4,"div",11)(26,De,8,4,"div",11)(27,Pe,14,10,"div",12),a()()()()(),r(28,"div",2)(29,"div",13)(30,"div",14),v(31,"div",5),r(32,"section",6)(33,"div",7)(34,"span",8),s(35),l(36,"translate"),a()()(),r(37,"section",9)(38,"div",10),y(39,Me,8,4,"div",11)(40,Ne,9,7,"div",11)(41,Ae,9,7,"div",11),yt(42,Ve,8,5,"div",15,vt),y(44,Oe,10,8,"div",11)(45,He,8,4,"div",11)(46,je,9,7,"div",11)(47,Fe,9,7,"div",11),a()()()()()(),r(48,"div",16)(49,"div",17)(50,"button",18),w("click",function(){return i.back()}),r(51,"span",19),v(52,"img",20),s(53),l(54,"translate"),a()(),r(55,"button",21),w("click",function(){return i.next()}),r(56,"span",19),s(57),l(58,"translate"),v(59,"img",20),a()()()()()),o&2&&(n(9),u(" ",c(10,22,"HourlyContractConfirmation.ContractDetails.mainContractInfo"),""),n(4),p("ngIf",i.contract==null?null:i.contract.cityName),n(),p("ngIf",i.contract==null?null:i.contract.districtName),n(2),p("ngIf",i.contract==null?null:i.contract.numOfWorkers),n(),p("ngIf",i.contract==null?null:i.contract.numOfVisits),n(2),p("ngIf",i.contract==null?null:i.contract.contractDuration),n(),p("ngIf",i.contract==null?null:i.contract.daysCount),n(2),p("ngIf",i.contract==null?null:i.contract.selectedDays),n(),p("ngIf",i.contract==null?null:i.contract.startDay),n(2),p("ngIf",i.contract==null?null:i.contract.resourceGroupName),n(),p("ngIf",i.contract==null?null:i.contract.numOfHours),n(),H(27,(i.contract==null?null:i.contract.isCashContract)==1?27:-1),n(8),u(" ",c(36,24,"HourlyContractConfirmation.ContractDetails.packageDetails"),""),n(4),p("ngIf",i.contract==null?null:i.contract.serviceName),n(),p("ngIf",i.contract==null?null:i.contract.totalPriceWithVat),n(),p("ngIf",i.contract==null?null:i.contract.totalPriceWithoutVat),n(),Ct(i.contract==null?null:i.contract.contractDetails),n(2),p("ngIf",i.contract==null?null:i.contract.oneVisitPrice),n(),p("ngIf",i.contract==null?null:i.contract.vatRate),n(),p("ngIf",i.contract==null?null:i.contract.vatAmount),n(),p("ngIf",i.contract==null?null:i.contract.totalPriceWithVat),n(6),u(" ",c(54,26,"Shared.Previous"),""),n(4),u("",c(58,28,"Shared.Next")," "))},dependencies:[N,q,M,F],styles:[".card-container[_ngcontent-%COMP%]{filter:none;border:1px solid #DEDEDE;border-radius:16px}.card-container[_ngcontent-%COMP%]   .main-card[_ngcontent-%COMP%]{background-color:#fff}.card-container[_ngcontent-%COMP%]   .main-card.no-bg-img[_ngcontent-%COMP%]{background-image:none}
1.card-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{border-radius:12px}.card-container[_ngcontent-%COMP%]   .check-worker[_ngcontent-%COMP%]{justify-self:flex-end}.no-worker-container[_ngcontent-%COMP%]{border-radius:16px}.cursor-default[_ngcontent-%COMP%]{cursor:default!important}.terms-checkbox[_ngcontent-%COMP%]{width:20px;top:5px;height:20px;appearance:none;border:2px solid var(--color-secondary);border-radius:50%;position:relative;cursor:pointer;transition:background-color .3s}.terms-checkbox[_ngcontent-%COMP%]:checked{background-image:url(/assets/images/payment/checked_colored.svg);background-position:center;background-repeat:no-repeat;border-color:var(--color-primary);box-shadow:none}.terms-checkbox[_ngcontent-%COMP%]:focus{box-shadow:none;background-color:transparent}.modal-width[_ngcontent-%COMP%]{width:clamp(414px,1024px,95%)}"]})}}return e})();var ct=W(Y());var ae=(e,h)=>({lat:e,lng:h}),Re=()=>({fullscreenControl:!0,mapTypeControl:!0,scaleControl:!0,panControl:!0}),$e=()=>({draggable:!0}),Ge=()=>({strokeColor:"red"});function Ue(e,h){if(e&1&&(r(0,"div")(1,"div"),s(2),a()()),e&2){let t=f(2);n(2),C(t.City.value.value)}}function Ze(e,h){if(e&1&&y(0,Ue,3,1,"div",20),e&2){let t=f();p("ngIf",t.City.valid)}}function ze(e,h){if(e&1&&(r(0,"div")(1,"div"),s(2),a()()),e&2){let t=h.$implicit;n(2),C(t.value)}}function We(e,h){e&1&&(r(0,"div",26),v(1,"i",27),s(2),l(3,"translate"),a()),e&2&&(n(2),u("",c(3,1,"Validation.required")," "))}function Ke(e,h){if(e&1&&(r(0,"div",16),s(1),a()),e&2){let t=f();n(),u(" ",t.cityNotAvailabileErrorMsg," ")}}function Ye(e,h){if(e&1&&(r(0,"div")(1,"div"),s(2),a()()),e&2){let t=f(2);n(2),C(t.District.value.value)}}function Qe(e,h){if(e&1&&y(0,Ye,3,1,"div",20),e&2){let t=f();p("ngIf",t.District.valid)}}function Je(e,h){if(e&1&&(r(0,"div")(1,"div"),s(2),a()()),e&2){let t=h.$implicit;n(2),C(t.value)}}function Xe(e,h){e&1&&(r(0,"div",28),v(1,"i",27),s(2),l(3,"translate"),a()),e&2&&(n(2),u("",c(3,1,"Validation.required")," "))}function ti(e,h){e&1&&(r(0,"div",42)(1,"div",43),v(2,"i",44),r(3,"span"),s(4),l(5,"translate"),a()()()),e&2&&(n(4),C(c(5,1,"Validation.required")))}function ei(e,h){if(e&1){let t=j();r(0,"map-marker",49),w("mapDragend",function(i){b(t);let d=f(3);return I(d.markerDragEnd(i))}),a()}if(e&2){let t=f(3);p("position",K(2,ae,t.latitude,t.longitude))("options",$(5,$e))}}function ii(e,h){if(e&1){let t=j();r(0,"map-polygon",50,3),w("polygonClick",function(i){b(t);let d=f(3);return I(d.onPolygonClick(i))}),a()}if(e&2){let t=f(3);p("paths",t.paths)("options",$(2,Ge))}}function ni(e,h){e&1&&(r(0,"div",42),v(1,"div",51),r(2,"div",52),v(3,"i",44),s(4),l(5,"translate"),a()()),e&2&&(n(4),u(" ",c(5,1,"IndividualContractReq.NewAddress.LocationError")," "))}function oi(e,h){if(e&1){let t=j();r(0,"div",32)(1,"div",42)(2,"div",40)(3,"google-map",45),w("mapInitialized",function(i){b(t);let d=f(2);return I(d.mapReadyHandler(i))})("mapClick",function(i){b(t);let d=f(2);return I(d.markerDragEnd(i))}),r(4,"button",46,2),w("click",function(){b(t);let i=f(2);return I(i.setCurrentLocation())}),s(6),l(7,"translate"),a(),y(8,ei,1,6,"map-marker",47)(9,ii,2,3,"map-polygon",48),a()()(),y(10,ni,6,3,"div",42),a()}if(e&2){let t=f(2);n(3),p("center",K(9,ae,t.latitude,t.longitude))("zoom",t.zoom)("options",$(12,Re)),n(3),u(" ",c(7,7,"IndividualContractReq.NewAddress.SetCurrentLocation")," "),n(2),p("ngIf",t.showMarker),n(),p("ngIf",t.paths&&t.paths.length>0),n(),H(10,t.locationOutsideTheNeighborhood?10:-1)}}function ri(e,h){e&1&&(r(0,"div",53),v(1,"i",44),r(2,"span"),s(3),l(4,"translate"),a()()),e&2&&(n(3),C(c(4,1,"Validation.required")))}function ai(e,h){e&1&&(r(0,"div",53),v(1,"i",44),r(2,"span"),s(3),l(4,"translate"),a()()),e&2&&(n(3),C(c(4,1,"Validation.required")))}function si(e,h){e&1&&(r(0,"div",54),v(1,"i",44),r(2,"span"),s(3),l(4,"translate"),a()()),e&2&&(n(3),C(c(4,1,"Validation.required")))}function li(e,h){if(e&1){let t=j();xt(0),r(1,"div",29)(2,"div",17)(3,"div",11)(4,"input",30,1),l(6,"translate"),w("keydown.enter",function(i){return b(t),I(i.preventDefault())}),a(),y(7,ti,6,3,"div",31),a()()(),y(8,oi,11,13,"div",32),r(9,"div",9)(10,"div",33)(11,"div",11),v(12,"p-dropdown",34),l(13,"translate"),y(14,ri,5,3,"div",35),a()()(),r(15,"div",9)(16,"div",33)(17,"div",11),v(18,"p-dropdown",36),l(19,"translate"),y(20,ai,5,3,"div",35),a()()(),r(21,"div",37)(22,"div",33)(23,"div",11),v(24,"input",38),l(25,"translate"),y(26,si,5,3,"div",39),a()()(),r(27,"div",40)(28,"div",33)(29,"div",11),v(30,"input",41),l(31,"translate"),a()()(),_t()}if(e&2){let t=f(),o=dt(2);n(4),p("placeholder",c(6,23,"address.full address"))("value",t.Address),n(3),p("ngIf",(t.Address==null?null:t.Address.hasError("required"))&&o.submitted),n(),H(8,t.geoCoder&&t.showMap?8:-1),n(4),z("input-error",t.HouseType.hasError("required")&&o.submitted),p("options",t.houseType)("filter",!0)("showClear",!1)("placeholder",c(13,25,"address.houseType")),n(2),p("ngIf",t.HouseType.hasError("required")&&o.submitted),n(4),z("input-error",t.FloorNumber.hasError("required")&&o.submitted),p("options",t.floors)("filter",!0)("showClear",!1)("placeholder",c(19,27,"address.floorNumber")),n(2),p("ngIf",t.FloorNumber.hasError("required")&&o.submitted),n(4),z("input-error",t.HouseNumber.hasError("required")&&o.submitted),p("placeholder",c(25,29,"address.houseNumber")),n(2),p("ngIf",t.HouseNumber.hasError("required")&&o.submitted),n(4),p("placeholder",c(31,31,"address.near by address"))}}var se=(()=>{class e{constructor(t,o,i,d,g,x,_,S,U,me,ue,he){this.route=t,this.router=o,this.hourlyContractService=i,this.navigator=d,this.stepsService=g,this.stepHttpService=x,this.sessionStorageService=_,this.addressService=S,this.fb=U,this.sharedService=me,this.swalService=ue,this.ngZone=he,this.cityNotAvailabileErrorMsg=null,this.subscriptions=[],this.paths=[],this.zoom=8,this.currentLocationOutOfBoundsEM=!1,this.showMap=!1,this.removeAddress=!0,this.showCityAndDistrictDropdowns=!1,this.readOnlyAddress=!1,this.langService=ht(kt),this.form=this.fb.group({city:[null,P.required],district:[null,P.required],houseType:[null,P.required],house
1Number:[null,P.required],floorNumber:[null,P.required],address:[null,P.required],addressNotes:[null]}),this.sessionStorageService.currentStep="ContractLocation"}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}ngOnInit(){this.sharedService.setCurrentStep("ContractLocation"),this.loadGoogleMaps(),this.route.queryParams.subscribe(t=>{if(t&&(this.stepId=t.stepId,this.getStepDetails(),!this.stepId)){ct.default.fire({title:"Error, you will be redirect to home page",confirmButtonText:"Okay",icon:"error"}).then(()=>{this.router.navigate(["/"])});return}})}loadGoogleMaps(){this.addressService.loadGoogleMapsAPI().then(()=>{this.geoCoder=new google.maps.Geocoder,this.showMap=!0,this.LoadData()}).catch(t=>{console.error("Error loading Google Maps API:",t)})}checkIfLocationIsInsidePolygon(t,o,i){if(this.map&&google.maps.geometry){let d=new google.maps.LatLng(t,o),g=!1;if(i?.length){let x=i.map(S=>new google.maps.LatLng(S.lat,S.lng)),_=new google.maps.Polygon({paths:x});g=google.maps.geometry.poly.containsLocation(d,_)}return g}return!1}preventInputEdit(){return!1}setCurrentLocation(t){"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(o=>{let i=o.coords.latitude,d=o.coords.longitude,g=new google.maps.LatLng(i,d),x=!1;if(t?.length){let _=t.map(U=>new google.maps.LatLng(U.lat,U.lng)),S=new google.maps.Polygon({paths:_});x=google.maps.geometry.poly.containsLocation(g,S)}if(x){this.latitude=i,this.longitude=d,this.zoom=14;let _={latLng:{lat:()=>this.latitude,lng:()=>this.longitude}};this.onMapClick(_)}})}setFullAddressValidity(t){this.getControl("address")?.setValidators(t),this.getControl("address")?.updateValueAndValidity()}setFullAddressValueAndValidators(t,o){this.getControl("address")?.setValue(t),this.setFullAddressValidity(o)}mapReadyHandler(t){this.map=t;let o=document.getElementById("ChangeLocation");o&&(o.addEventListener("click",()=>{this.ngZone.run(()=>this.setCurrentLocation())}),t.controls[google.maps.ControlPosition.TOP_CENTER].push(o)),t.addListener("click",i=>{if(this.locationOutsideTheNeighborhood=!1,this.showMarker=!0,this.setMapLatAndLong(i.latLng.lat(),i.latLng.lng()),this.paths&&this.paths.length>0){this.locationOutsideTheNeighborhood=!0,this.setFullAddressValueAndValidators(null,[P.required]);return}this.getAddress(this.latitude,this.longitude),this.getControl("address")?.setValidators([])})}getStepDetails(){let t=this.sessionStorageService.currentStep;t||(t="ContractLocation"),this.stepsService.getStepDetailsByActionName(this.sessionStorageService.ServiceType,t,this.stepId).subscribe(o=>{this.stepDetails=o})}
1setMapLatAndLong(t,o,i){if(i?.length&&this.map){let d=new google.maps.LatLngBounds;i.forEach(g=>{isFinite(g.lat)&&isFinite(g.lng)&&d.extend(new google.maps.LatLng(g.lat,g.lng))}),this.map.fitBounds(d),this.setCurrentLocation(i);return}if(!(!isFinite(t)||!isFinite(o))&&(this.latitude=t,this.longitude=o,this.map)){let d=new google.maps.LatLng(t,o);this.map.setCenter(d)}}onMapClick(t){this.removeAddress=!1,this.onPolygonClick(t)}getCityAndDistrictIds(){this.showCityAndDistrictDropdowns=!0,this.addressService.detectDistrict(this.latitude,this.longitude).subscribe({next:t=>{t.data?(this.selectedCity=this.cities?.find(o=>o.key===t.data.cityId),this.selectedDistrictId=t.data.districtId,this.selectedCity&&this.selectedDistrictId?(this.getControl("city")?.setValue(this.selectedCity),this.getCityDistricts(this.selectedCity.key),this.showPolygon=!1):(this.swalService.displaySwalError("This location is not available"),this.showPolygon=!0)):(this.selectedCity=null,this.selectedDistrictId=null,this.swalService.displaySwalError("This location is not available"),this.showPolygon=!0,this.getControl("city")?.setValue(null),this.getControl("district")?.setValue(null))},error:t=>{this.swalService.displaySwalError(t.error.message)}})}getControl(t){return this.form.get(t)}get AddressNotes(){return this.form.get("addressNotes")}get City(){return this.form.get("city")}get District(){return this.form.get("district")}get HouseType(){return this.form.get("houseType")}get HouseNumber(){return this.form.get("houseNumber")}get Address(){return this.form.get("address")}get FloorNumber(){return this.form.get("floorNumber")}LoadData(){this.hourlyContractService.GetContractLocation(this.stepId).subscribe(t=>{this.contractLocation=t?.data,this.contractLocation?.latitude&&this.contractLocation?.longitude&&(this.latitude=parseFloat(this.contractLocation.latitude),this.longitude=parseFloat(this.contractLocation.longitude)),this.readOnlyAddress=!0,this.zoom=13,this.getActiveCities(),this.getHousingTypes(),this.getHousingFloors(),(this.contractLocation?.houseNo||this.contractLocation?.houseNo===0)&&this.HouseNumber.setValue(this.contractLocation.houseNo),this.contractLocation?.addressNotes&&this.AddressNotes.setValue(this.contractLocation.addressNotes)})}getActiveCities(){this.addressService.getActiveCities().subscribe(t=>{this.cities=t.data,this.contractLocation?.cityId&&this.City.setValue(this.cities.find(o=>o.key==this.contractLocation?.cityId)),this.getCityDistricts(this.City.value.key)})}getHousingTypes(){this.addressService.getHousingTypes().subscribe(t=>{this.houseType=t.data,(this.contractLocation?.houseType||this.contractLocation?.houseType===0)&&this.HouseType.setValue(this.houseType.find(o=>o.key==this.contractLocation?.houseType))})}getHousingFloors(){this.addressService.getHousingFloors().subscribe(t=>{this.floors=t.data,(this.contractLocation?.floorNo||this.contractLocation?.floorNo===0)&&this.FloorNumber.setValue(this.floors.find(o=>o.key==this.contractLocation?.floorNo))})}setMarkerValueAndSetFullAddressValueAndValidators(t,o,i){this.showMarker=t,this.setFullAddressValueAndValidators(o,i)}navigateToLeadPageAccordingToResultAndHourlyServiceId(t){t.isConfirmed&&this.router.navigate(["/lead/create"])}displayErrorMessageAccordingToErrorStatus(t){t.status==300&&ct.default.fire({title:t.message,icon:"question",showCancelButton:!0,showConfirmButton:!0,cancelButtonText:this.langService.getCurrentLang()=="ar"?"\u062A\u063A\u064A\u0631 \u0627\u0644\u0645\u062F\u064A\u0646\u0629":"Change City",confirmButtonText:this.langService.getCurrentLang()=="ar"?"\u062A\u0642\u062F\u064A\u0645 \u0637\u0644\u0628":"Add Request"}).then(o=>{this.navigateToLeadPageAccordingToResultAndHourlyServiceId(o)})}checkCityAvailabilityForService(t){this.subscriptions.push(this.addressService.CheckCityAvailabilityForService(t).subscribe({next:o=>{},error:o=>{this.displayErrorMessageAccordingToErrorStatus(o.error),this.cityNotAvailabileErrorMsg=o.error.message}}))}onCitySelected(t){if(!t)return;let o=t.key;this.getControl("district")?.setValue(null),this.paths=[],this.readOnlyAddress||(this.setMarkerValueAndSetFullAddressValueAndValidators(!1,null,[P.required]),this.getCityDistricts(o)),this.readOnlyAddress=!1}getCityDistricts(t){this.addressService.getCityDistricts(t).subscribe(o=>{this.districts=o.data,this.contractLocation?.districtId&&this.District.setValue(this.districts.find(i=>i.key==this.contractLocation?.districtId))})}setDefaultMapAttributes(){this.paths=[]}setMapAttributes(t){t?(this.paths=t,this.latitude&&this.longitude?setTimeout(()=>{this.checkIfLocationIsInsidePolygon(this.latitude,this.longitude,t)?(this.getAddress(this.latitude,this.longitude),this.showMarker=!0,this.checkIfPolyginContainPath(this.latitude,this.longitude)):this.setMapLatAndLong(void 0,void 0,t)},100):this.setMapLatAndLong(void 0,void 0,t)):this.setDefaultMapAttributes(),this.zoom=13,this.showMap=!0}setMapAttributesByTriangleCoords(t){t?this.setMapAttributes(t):this.setMapAttributes(null)}getPolygonPathOnMap(t){this.subscriptions.push(this.addressService.getPolygonPath(t).subscribe({next:o=>{this.setMapAttributesByTriangleCoords(o)},error:o=>{}}))}onDistrictSelected(t){if(!t)return;this.selectedDistrict=t;let o=t.key;this.getPolygonPathOnMap(o)}setIfLocationOutsideTheNeighborhood(){let t=new google.maps.Polygon({paths:this.paths}),o=new google.maps.LatLng(this.latitude,this.longitude);this.locationOutsideTheNeighborhood=!google?.maps?.geometry?.poly?.containsLocation(o,t)}markerDragEnd(t){if(t.latLng){if(this.setMapLatAndLong(t.latLng.lat(),t.latLng.lng()),this.setIfLocationOutsideTheNeighborhood(),this.locationOutsideTheNeighborhood){this.setFullAddressValueAndValidators(null,[P.required]);return}this.getAddress(this.latitude,this.longitude),this.setFullAddressValidity([])}}setMarkerAndValidateIfItIsOutsidePolygon(t,o){if(!(t==null||o==null)){if(this.setMapLatAndLong(t,o),this.showMarker=!0,this.setIfLocationOutsideTheNeighborhood(),this.locationOutsideTheNeighborhood){this.setFullAddressValueAndValidators(null,[P.required]);return}this.getAddress(this.latitude,this.longitude),this.setFullAddressValidity([])}}checkIfPolyginContainPath(t,o){let i=new google.maps.Polygon({paths:this.paths}),d=new google.maps.LatLng(this.latitude,this.longitude);if(setTimeout(()=>{this.locationOutsideTheNeighborhood=!google.maps.geometry.poly.containsLocation(d,i)},1e3),this.locationOutsideTheNeighborhood){this.locationOutsideTheNeighborhood=!0,this.Address.setValidators([P.required]),this.Address.setValue(null),this.Address.updateV
1alueAndValidity(),this.currentLocationOutOfBoundsEM=!1;return}this.getAddress(this.latitude,this.longitude),this.showMarker=!0,this.Address.setValidators([]),this.Address.updateValueAndValidity()}onPolygonClick(t){this.locationOutsideTheNeighborhood=!1,this.currentLocationOutOfBoundsEM=!1,this.showMarker=!0,this.latitude=t.latLng.lat(),this.longitude=t.latLng.lng(),this.getAddress(this.latitude,this.longitude),this.Address.setValidators([]),this.Address.updateValueAndValidity()}getAddress(t,o){this.Address.setValue(""),this.addressService.getAddressByLatAndLong(t,o).subscribe(i=>{this.Address.setValue(i.formatted_address),this.Address.updateValueAndValidity()})}convertToNumber(t){return parseFloat(t)}next(t){if(this.locationOutsideTheNeighborhood||!this.form.valid)return;this.contractLocation.cityId=this.City.value.key,this.contractLocation.districtId=this.District.value.key,this.contractLocation.houseType=this.HouseType.value.key,this.contractLocation.floorNo=this.FloorNumber.value.key,this.contractLocation.houseNo=this.HouseNumber.value,this.contractLocation.latitude=this.latitude.toString(),this.contractLocation.longitude=this.longitude.toString();let o={httpMethod:this.stepDetails?.httpMethod,params:{stepId:this.stepId},httpRequestParemeter:{stepDetails:this.stepDetails},body:this.contractLocation,handleError:!0};this.stepHttpService.postRequestWithBody(o).subscribe({next:i=>{this.sessionStorageService.stepId=i.data.stepId,this.sharedService.openNextStep(i.data)},error:i=>{i?.status==302&&ct.default.fire({iconHtml:`<img src="${Lt}" alt="success"/>`,title:i.error?.data,confirmButtonText:this.sessionStorageService.lang=="ar"?"\u0645\u0648\u0627\u0641\u0642":"Ok"}).then(()=>{this.router.navigate(["/services"])})}})}back(){this.navigator.navigateToPrev(this.sessionStorageService.currentStep,this.stepId,!0)}static{this.\u0275fac=function(o){return new(o||e)(m(L),m(E),m(B),m(A),m(R),m(Pt),m(D),m(Kt),m(jt),m(V),m(Zt),m(gt))}}static{this.\u0275cmp=T({type:e,selectors:[["app-pick-location"]],standalone:!0,features:[k],decls:35,vars:24,consts:[["myform","ngForm"],["search",""],["ChangeLocation",""],["polygon",""],["id","add-address",1,"mx-4"],["autocomplete","off","ngForm","",3,"submit","formGroup"],[1,"border-0","card"],[1,"p-0","card-body"],[1,"row","row-gap-3","g-3"],[1,"col-12","col-lg-6","px-2","m-0"],[1,"d-flex","flex-column","flex-md-row","justify-content-between","align-items-center","inputContainer","row","row-gap-3"],[1,"col-12"],["readonly","true","id","city","formControlName","city","optionLabel","value","filterBy","value",3,"ngModelChange","options","filter","showClear","placeholder"],["pTemplate","selectedItem"],["pTemplate","item"],["class","py-2 error-msg d-block fs-12 rounded-0 col-9 offset-3","role","alert",4,"ngIf"],["role","alert",1,"p-1","error","fs-14","f-w-regualr","rounded-0","col-9","gap-2","d-flex","align-items-center","mt-1"],[1,"row","d-flex","flex-column","flex-md-row","justify-content-between","align-items-md-center","inputContainer"],["readonly","","id","districts","formControlName","district","optionLabel","value","filterBy","value",3,"keydown","paste","cut","drop","ngModelChange","options","filter","showClear","placeholder"],["class","py-2 error-msg d-block fs-12 rounded-0 col-12 offset-3","role","alert",4,"ngIf"],[4,"ngIf"],[1,"d-flex","flex-column","flex-md-row","gap-2","justify-content-end","mt-4","steps-btns"],["id","prev","type","button",1,"button","secondary-button","order-1","order-md-0",3,"click"],[1,"fs-20","fw-regular","d-flex","align-items-center","gap-2","justify-content-center"],["src","assets/images/hourly/right-arrow.svg","alt","arrow",1,"arrow-icon"],["id","next","type","submit",1,"button","main-button","order-0","order-md-1","fs-20",3,"disabled"],["role","alert",1,"py-2","error-msg","d-block","fs-12","rounded-0","col-9","offset-3"],[1,"fas","fa-times-circle","me-2"],["role","alert",1,"py-2","error-msg","d-block","fs-12","rounded-0","col-12","offset-3"],[1,"col-12","px-2","m-0"],["type","text","name","address","id","address","autocorrect","off","autocapitalize","off","spellcheck","off","type","text","formControlName","address","readonly","",1,"form-control","custom-form-control",3,"keydown.enter","placeholder","value"],["class","row",4,"ngIf"],[1,"container","mt-2"],[1,"d-flex","flex-column","flex-md-row","justify-content-between","align-items-md-center","inputContainer"],["id","houseType","formControlName","houseType","optionLabel","value","filterBy","value",3,"options","filter","showClear","placeholder"],["class","gap-2 mt-2 error d-flex align-items-center col-lg-9 col-md-12",4,"ngIf"],["id","floorNumber","formControlName","floorNumber","optionLabel","value","filterBy","value",3,"options","filter","showClear","placeholder"],[1,"col-md-12","col-lg-6","px-2","m-0"],["type","text","name","houseNumber","id","houseNumber","formControlName","houseNumber",1,"form-control","custom-form-control",3,"placeholder"],["class","gap-2 mt-2 error d-flex align-items-center col-lg-9 col-md-8",4,"ngIf"],[1,"col-12","m-0"],["type","text","name","nearByAddress","id","nearByAddress","formControlName","addressNotes",1,"form-control","custom-form-control",3,"placeholder"],[1,"row"],[1,"gap-2","mt-2","error","d-flex","align-items-center","col-lg","col-md-12"],[1,"fas","fa-times-circle"],[1,"w-100",3,"mapInitialized","mapClick","center","zoom","options"],["id","ChangeLocation","type","button",1,"btn","btn-light",3,"click"],[3,"position","options","mapDragend",4,"ngIf"],[3,"paths","options","polygonClick",4,"ngIf"],[3,"mapDragend","position","options"],[3,"polygonClick","paths","options"],[1,"col-md-1-5"],[1,"gap-2","mt-2","error","d-flex","align-items-center","col-lg","col-md-8"],[1,"gap-2","mt-2","error","d-flex","align-items-center","col-lg-9","col-md-12"],[1,"gap-2","mt-2","error","d-flex","align-items-center","col-lg-9","col-md-8"]],template:function(o,i){if(o&1){let d=j();r(0,"div",4)(1,"form",5,0),w("submit",function(){return b(d),I(i.next(i.form))}),r(3,"div",6)(4,"div",7)(5,"div",8)(6,"div",9)(7,"div",10)(8,"div",11)(9,"p-dropdown",12),l(10,"translate"),w("ngModelChange",function(x){return b(d),I(i.onCitySelected(x))}),y(11,Ze,1,1,"ng-template",13)(12,ze,3,1,"ng-template",14),a()(),y(13,We,4,3,"div",15)(14,Ke,2,1,"div",16),a()(),r(15,"div",9)(16,"div",17)(17,"div",11)(18,"p-dropdown",18),l(19,"translate"),w("keydown",function(){return b(d),I(i.preventInputEdit())})("paste",function(){return b(d),I(i.preventInputEdit())})("cut",function(){return b(d),I(i.preventInputEdit())})("drop",function(){return b(d),I(i.preventInputEdit())})("ngModelChange",function(x){return b(d),I(i.onDistrictSelected(x))}),y(20,Qe,1,1,"ng-template",13)(21,Je,3,1,"ng-template",14),a()(),y(22,Xe,4,3,"div",19),a()(),y(23,li,32,33,"ng-container",20),a()()(),r(24,"div",21)(25,"button",22),w("click",function(){return b(d),I(i.back())}
1),r(26,"span",23),v(27,"img",24),s(28),l(29,"translate"),a()(),r(30,"button",25)(31,"span",23),s(32),l(33,"translate"),v(34,"img",24),a()()()()()}if(o&2){let d=dt(2);n(),p("formGroup",i.form),n(8),p("options",i.cities)("filter",!0)("showClear",!1)("placeholder",c(10,16,"address.city")),n(4),p("ngIf",i.City.hasError("required")&&d.submitted),n(),H(14,i.cityNotAvailabileErrorMsg?14:-1),n(4),p("options",i.districts)("filter",!0)("showClear",!1)("placeholder",c(19,18,"address.district")),n(4),p("ngIf",i.District.hasError("required")&&d.submitted),n(),p("ngIf",i.showMap),n(5),u(" ",c(29,20,"Shared.Previous"),""),n(2),p("disabled",!i.form.valid||i.locationOutsideTheNeighborhood),n(2),u("",c(33,22,"Shared.Next")," ")}},dependencies:[N,q,M,F,Ut,Gt,$t,qt,Bt,Nt,ot,At,Ot,Ht,Xt,Yt,Qt,Jt],styles:[".map-container{height:329px!important;width:100%!important;border-radius:16px}"]})}}return e})();var le=W(Y());var ce=(()=>{class e{constructor(t,o,i,d,g,x){this.route=t,this.router=o,this.hourlyContractService=i,this.navigator=d,this.sessionStorageService=g,this.sharedService=x,this.approveTerms=!1}ngOnInit(){this.sharedService.setCurrentStep("ConfirmContract"),this.sessionStorageService.ServiceType=G.HourlyContractConfirmation,this.route.queryParams.subscribe(t=>{if(t){if(this.stepId=t.stepId,!this.stepId){le.default.fire({title:"Error, you will be redirect to home page",confirmButtonText:"Okay",icon:"error"}).then(()=>{});return}this.loadData()}})}loadData(){this.hourlyContractService.GetContractTerms(this.stepId).subscribe(t=>{this.terms=t.data.data.terms})}ngOnDestroy(){}next(){this.navigator.navigateToNext(this.sessionStorageService.currentStep,{queryParams:{stepId:this.stepId}},this.sessionStorageService.ServiceType,this.stepId)}static{this.\u0275fac=function(o){return new(o||e)(m(L),m(E),m(B),m(A),m(D),m(V))}}static{this.\u0275cmp=T({type:e,selectors:[["app-contract-terms"]],standalone:!0,features:[k],decls:20,vars:14,consts:[["id","terms-conditions"],[1,"terms-container"],[1,"terms-content",3,"innerHTML"],[1,"row","mt-4"],[1,"col-sm-6"],[1,"input-group-sm"],["id","conditions","type","checkbox",1,"terms-checkbox",3,"ngModelChange","ngModel"],["for","conditions",1,"textMain","cursor-p","fs-18","f-w-regular","text-decoration-none"],[1,"d-flex","flex-column","flex-md-row","gap-2","justify-content-end","mt-3","steps-btns"],["type","button",1,"button","main-button","order-0","order-md-1","fs-20",3,"click","disabled"],[1,"fs-20","fw-regular","d-flex","align-items-center","gap-2","justify-content-center"],["src","assets/images/hourly/right-arrow.svg","alt","arrow",1,"arrow-icon"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"div",1),v(2,"div",2),l(3,"keepHtml"),a(),r(4,"div",3)(5,"div",4)(6,"div",5)(7,"input",6),It("ngModelChange",function(g){return bt(i.approveTerms,g)||(i.approveTerms=g),g}),a(),r(8,"label",7)(9,"span"),s(10),l(11,"translate"),a(),s(12),l(13,"translate"),a()()()(),r(14,"div",8)(15,"button",9),w("click",function(){return i.next()}),r(16,"span",10),s(17),l(18,"translate"),v(19,"img",11),a()()()()),o&2&&(n(2),p("innerHTML",c(3,6,i.terms),ft),n(5),St("ngModel",i.approveTerms),n(3),u("",c(11,8,"hourly.accept")," "),n(2),u(" ",c(13,10,"hourly.termsAndConditions"),""),n(3),p("disabled",!i.approveTerms),n(2),u("",c(18,12,"Shared.Next")," "))},dependencies:[N,q,M,Ft,Mt,ot,Vt,Rt],styles:['.terms-container[_ngcontent-%COMP%]{height:300px;overflow-y:scroll;overflow-x:hidden;border:0;padding:16px}.terms-content[_ngcontent-%COMP%]{width:100%;word-wrap:break-word;overflow-wrap:break-word}.terms-checkbox[_ngcontent-%COMP%]{width:20px;top:5px;height:20px;appearance:none;border:2px solid var(--color-secondary);border-radius:50%;position:relative;cursor:pointer;transition:background-color .3s}.terms-checkbox[_ngcontent-%COMP%]:checked{background-image:url("./media/checkbox-checked-RGUZQ7UU.svg");background-position:center;background-repeat:no-repeat;border:none;box-shadow:none}.terms-checkbox[_ngcontent-%COMP%]:focus{box-shadow:none;background-color:transparent}']})}}return e})();var ut=W(Y());var de=(()=>{class e{constructor(t,o,i,d,g,x,_,S){this.route=t,this.router=o,this.hourlyContractService=i,this.stepsService=d,this.navigator=g,this.transService=x,this.sessionStorageService=_,this.sharedService=S,this.unsubscribe$=new Z}ngOnInit(){history.pushState(null,"",location.href),et(window,"popstate").pipe(it(this.unsubscribe$)).subscribe(()=>{history.pushState(null,"",location.href)}),this.route.queryParams.subscribe(t=>{t&&(this.contractId=t.contractId,this.contractId?this.CheckCompleteContractConfirmation():ut.default.fire({title:"ContractId can't be null",confirmButtonText:"Okay",icon:"error"}).then())})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}CheckCompleteContractConfirmation(){this.hourlyContractService.CheckCompleteContractConfirmation(this.contractId).subscribe(t=>{t.status==200&&this.goToFirstStep()},t=>{ut.default.fire({title:t.error.message,confirmButtonText:this.transService.instant("Shared.accept"),iconHtml:`<img src="${Et}" class="alert-icon">`}).then(()=>{this.router.navigate(["/"])})})}goToFirstStep(){this.sessionStorageService.ServiceType=G.HourlyContractConfirmation,this.stepsService.getFirstStep(G.HourlyContractConfirmation,this.contractId).subscribe(t=>{this.sessionStorageService.stepId=t.stepId,this.navigator.navigateToStep(t)})}static{this.\u0275fac=function(o){return new(o||e)(m(L),m(E),m(B),m(R),m(A),m(nt),m(D),m(V))}}static{this.\u0275cmp=T({type:e,selectors:[["app-complete"]],standalone:!0,features:[
1k],decls:0,vars:0,template:function(o,i){}})}}return e})();function ci(e,h){if(e&1){let t=j();r(0,"div",5)(1,"app-steps-header",6),w("currentStep",function(i){b(t);let d=f();return I(d.currentStep=i)}),a()()}if(e&2){let t=f();n(),z("d-none",!t.steps),p("data",t.steps)}}var pe=(()=>{class e{constructor(t,o,i,d){this.stepsService=t,this.sessionStorageService=o,this.router=i,this.activeRoute=d,this.steps=[],o.ServiceType=G.HourlyContractConfirmation,this.title$=this.activeRoute.data}ngOnInit(){this.getSteps()}getSteps(){this.stepsService.getSteps().subscribe(t=>{t.sort((o,i)=>o.stepOrder-i.stepOrder),t.forEach(o=>{o.stepKeyword&&o.stepType==Dt.PageUi&&this.steps.push(o.stepKeyword)}),this.steps=[...new Set(this.steps)],this.sessionStorageService.currentStep=this.steps[0]})}static{this.\u0275fac=function(o){return new(o||e)(m(R),m(D),m(E),m(L))}}static{this.\u0275cmp=T({type:e,selectors:[["app-hourly-contract"]],standalone:!0,features:[k],decls:7,vars:1,consts:[["id","hourly-wrapper"],["class","container mt-4",4,"ngIf"],[1,"container","py-5"],[1,"row"],[1,"col-12"],[1,"container","mt-4"],[3,"currentStep","data"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"header"),y(2,ci,2,3,"div",1),a(),r(3,"section",2)(4,"div",3)(5,"div",4),v(6,"router-outlet"),a()()()()),o&2&&(n(2),p("ngIf",!i.router.url.includes("complete")))},dependencies:[te,N,M,F,wt]})}}return e})();var ln=[{path:"",component:pe,resolve:{hourly:ee},children:[{path:"",redirectTo:"complete",pathMatch:"full"},{path:"complete",component:de,data:{isFromProfie:!1}},{path:"ConfirmContract",component:ce},{path:"ContractLocation",component:se},{path:"ContractDetails",component:re},{path:"ShopperResult",component:ne}]}];export{ln as routes};

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.