1"use strict";(self.webpackChunkmarketplace=self.webpackChunkmarketplace||[]).push([[726],{68726:(T,C,o)=>{o.r(C),o.d(C,{ProfileModule:()=>v});var b=o(36895),p=o(94778),y=o(83122),P=o(88996),l=o(39646),d=o(63900),t=o(94650);class i{constructor(e,r){this.bookingsDataService=e,this.router=r}canActivate(e){const r=e.queryParams.from;return r&&"login"===r?this.bookingsDataService.getBookingsList().pipe((0,d.w)(s=>s.count>0?(0,P.D)(this.router.navigate(["bookings-list"])):(0,l.of)(!0))):(0,l.of)(!0)}}i.\u0275fac=function(e){return new(e||i)(t.LFG(y.m),t.LFG(p.F0))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac});var n=o(24006),M=o(39841),x=o(39300),S=o(95698),k=o(54004),I=o(34782),E=o(68675),U=o(37887),g=o(93607),z=o(47713),B=o(80529);class m{constructor(e,r){this.baseUrl=e,this.httpService=r,this.setEndpoints()}setEndpoints(){this.saveEndpoint=`${this.baseUrl}/file/save`,this.saveThumbnailEndpoint=`${this.baseUrl}/file/saveThumbnail`}saveFile(e,r,s){const a=new FormData;return a.append("file",e,r),a.append("type",s),this.httpService.post(this.saveEndpoint,a)}saveThumbnail(e,r,s){const a=new FormData;return a.append("file",e,r),a.append("type",s),this.httpService.post(this.saveThumbnailEndpoint,a)}}m.\u0275fac=function(e){return new(e||m)(t.LFG(z._n),t.LFG(B.eN))},m.\u0275prov=t.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"});var D=o(73671),w=o(9944),A=o(90071),L=o(47417),F=o(32925);const R=["businessProfileSettings"],G=["physicalProfileSettings"];class f{constructor(e,r,s,a){this.authService=e,this.fileUploadService=r,this.profileInfoService=s,this.commonDialogService=a,this.userData$=this.authService.userData$,this.initialData$=(0,M.a)([this.profileInfoService.getProfiles(),this.authService.userData$.pipe((0,x.h)(h=>null!=h),(0,S.q)(1))]).pipe((0,k.U)(([h,O])=>({profiles:h,userData:O})),(0,I.d)(1)),this.profileInfoForm=new n.nJ({_id:new n.p4,personType:new n.p4("physical"),name:new n.p4(""),surname:new n.p4(""),entityCode:new n.p4(""),address:new n.p4(""),phoneNo:new n.p4(""),businessName:new n.p4(""),addressCorrespondence:new n.p4("")}),this.profileSettingsForm=new n.nJ({email:new n.p4("",[n.kI.required,n.kI.email]),currentPassword:new n.p4("",[n.kI.required]),passwords:new n.nJ({password:new n.p4("",[n.kI.required,g.Ez.passwordComplexityValidation]),passwordRepeat:new n.p4("",[n.kI.required,g.Ez.passwordComplexityValidation])},{validators:[g.Ez.samePassword,g.Ez.repeatPasswordValidation]})}),this.passwordError$=g.Ez.generateErrorStateMatcher(this.profileSettingsForm,"passwords.password"),this.passwordRepeatError$=g.Ez.generateErrorStateMatcher(this.profileSettingsForm,"passwords.passwordRepeat"),this.formError$=g.Ez.generateErrorStateMatcher(this.profileSettingsForm,""),this.passwordRepeatErrorMatcher=new g.Bm,this.currentProfileSettingsTemplate=null}get personTypeControl(){return this.profileInfoForm.get("personType")}get passwordGroup(){return this.profileSettingsForm.get("passwords")}ngOnInit(){(0,M.a)([this.profileInfoService.getProfiles(),this.authService.userData$.pipe((0,x.h)(e=>null!=e),(0,S.q)(1))]).subscribe(([e,r])=>{this.profileSettingsForm.get("email").setValue(null==r?void 0:r.email);const s=e.find(a=>!0===a.main);this.profileInfoForm.patchValue(s||{name:null==r?void 0:r.name,surname:null==r?void 0:r.surname})}),this.personTypeControl.valueChanges.pipe((0,E.O)(this.personTypeControl.value)).subscribe(e=>{this.setProfileSettingsTemplate(e)}),this.personType$=this.personTypeControl.valueChanges.pipe((0,E.O)(this.personTypeControl.value))}setPersonType(e){this.personTypeControl.setValue(e)}submitProfileInfo(){const e=this.profileInfoForm.get("_id").value;e?this.profileInfoService.editProfile(e,this.profileInfoForm.value).pipe((0,d.w)(()=>
1this.authService.updateNameAndSurname(this.profileInfoForm.value.name,this.profileInfoForm.value.surname))).subscribe(()=>{this.commonDialogService.openSuccess("dialogs.success")}):this.profileInfoService.saveProfile({...this.profileInfoForm.value,main:!0}).pipe((0,d.w)(()=>this.authService.updateNameAndSurname(this.profileInfoForm.value.name,this.profileInfoForm.value.surname))).subscribe(r=>{this.profileInfoForm.get("_id").setValue(r._id,{emitEvent:!1}),this.commonDialogService.openSuccess("dialogs.success")})}setProfileSettingsTemplate(e){"physical"===e&&(this.currentProfileSettingsTemplate=this.physicalProfileSettingsTemplate),"business"===e&&(this.currentProfileSettingsTemplate=this.businessProfileSettingsTemplate)}saveEntityInfo(e){if(e.preventDefault(),this.profileSettingsForm.invalid)return void this.profileSettingsForm.markAllAsTouched();const{currentPassword:r,passwords:{password:s}}=this.profileSettingsForm.value;this.authService.changePassword(r,s).subscribe(()=>{this.commonDialogService.openSuccess("dialogs.passwordChange"),this.commonDialogService.closed().subscribe(()=>{this.passwordGroup.get("password").reset(),this.passwordGroup.get("passwordRepeat").reset()})},a=>{var h;const O=null==a||null===(h=a.error)||void 0===h?void 0:h.errors;O&&(this.profileSettingsForm.markAllAsTouched(),O.forEach(K=>{this.profileSettingsForm.setErrors("Wrong password"!==K.message?{somethingWrong:!0}:{wrongPassword:!0})}))})}changeProfilePhoto(e){const s=Array.from(e.target.files);(0,P.D)(s[0].arrayBuffer()).pipe((0,k.U)(a=>new Blob([a],{type:s[0].type})),(0,d.w)(a=>this.fileUploadService.saveFile(a,s[0].name,"ServicePhoto")),(0,d.w)(a=>this.authService.updateProfilePhoto(a.fileUrl)),(0,d.w)(()=>this.authService.getCurrentUser())).subscribe()}}f.\u0275fac=function(e){return new(e||f)(t.Y36(U.Pr),t.Y36(m),t.Y36(D.C),t.Y36(w.CommonDialogService))},f.\u0275cmp=t.Xpm({type:f,selectors:[["marketplace-profile-settings"]],viewQuery:function(e,r){if(1&e&&(t.Gf(R,7),t.Gf(G,7)),2&e){let s;t.iGM(s=t.CRH())&&(r.businessProfileSettingsTemplate=s.first),t.iGM(s=t.CRH())&&(r.physicalProfileSettingsTemplate=s.first)}},decls:8,vars:4,consts:[[1,"bztt-flex","bztt-justify-center","bztt-mb-4","bztt-mt-8"],[1,"bztt-max-w-[1440px]","bztt-flex-grow","bztt-px-8"],[1,"bztt-font-[Montserrat]","bztt-text-[2rem]","md:bztt-text-5xl","bztt-text-[#414042]","bztt-font-semibold","bztt-mb-4"],[1,"bztt-flex","bztt-flex-col","bztt-gap-4","bztt-mt-10"],[1,"bztt-block"],[1,"bztt-block",3,"initialData"]],template:function(e,r){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h1",2),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",3),t._UZ(6,"jarvis-profile-profile-info",4)(7,"jarvis-profile-profile-auth",5),t.qZA()()()),2&e&&(t.xp6(3),t.Oqu(t.lcZ(4,2,"profile.profileSettings")),t.xp6(4),t.Q6J("initialData",r.initialData$))},dependencies:[A.w,L.K,F.X$],styles:['.mat-ripple[_ngcontent-%COMP%]{overflow:hidden;position:relative}.mat-ripple[_ngcontent-%COMP%]:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded[_ngcontent-%COMP%]{overflow:visible}.mat-ripple-element[_ngcontent-%COMP%]{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:none}.cdk-visually-hidden[_ngcontent-%COMP%]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl][_ngcontent-%COMP%] .cdk-visually-hidden[_ngcontent-%COMP%]{left:auto;right:0}.cdk-overlay-container[_ngcontent-%COMP%], .cdk-global-overlay-wrapper[_ngcontent-%COMP%]{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container[_ngcontent-%COMP%]{position:fixed;z-index:1000}.cdk-overlay-container[_ngcontent-%COMP%]:empty{display:none}.cdk-global-overlay-wrapper[_ngcontent-%COMP%]{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}
1.cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:1}.cdk-high-contrast-active[_ngcontent-%COMP%] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:.6}.cdk-overlay-dark-backdrop[_ngcontent-%COMP%]{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop[_ngcontent-%COMP%]{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation[_ngcontent-%COMP%]{transition:none}.cdk-overlay-connected-position-bounding-box[_ngcontent-%COMP%]{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock[_ngcontent-%COMP%]{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize[_ngcontent-%COMP%]{resize:none}textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-start{}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:-webkit-autofill{animation:_ngcontent-%COMP%_cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:not(:-webkit-autofill){animation:_ngcontent-%COMP%_cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-focus-indicator[_ngcontent-%COMP%]:before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator[_ngcontent-%COMP%]:focus:before{content:""}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:focus:before{content:""}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-mdc-focus-indicator-display: block}jarvis-ui-card-wrapper[_ngcontent-%COMP%]{height:100%;padding:0 2rem}a[_ngcontent-%COMP%]{border-bottom:none;text-decoration:underline}.selector-wrapper[_ngcontent-%COMP%]{background-color:#ddd;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin-bottom:36px;padding:2px;border-radius:8px}.selector-wrapper[_ngcontent-%COMP%] *[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:not(:last-child){margin-right:2px}.selector-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:none;border-radius:6px;background-color:unset;height:32px;color:#222;padding:0 16px;cursor:pointer;font-family:Montserrat;font-size:14px;font-weight:600}.selector-wrapper[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:#fff}.selector-wrapper[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{height:36px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.selector-wrapper[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{line-height:20px}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:1px solid #ddd;padding:36px 8%;border-radius:12px;margin-bottom:16px}.save-button-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center}.save-button-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:440px}.data-wrapper[_ngcontent-%COMP%]{display:flex}.data-wrapper[_ngcontent-%COMP%] .form-column[_ngcontent-%COMP%]{width:70%;display:flex;flex-direction:column}.data-wrapper[_ngcontent-%COMP%] .photo-column[_ngcontent-%COMP%]{width:30%;display:flex;flex-direction:column}.add-photo-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;cursor:pointer;margin-bottom:48px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.add-photo-wrapper[_ngcontent-%COMP%] .photo-disc[_ngcontent-%COMP%]{margin-bottom:10px;height:120px;width:120px;border-radius:50%;border:1px solid #777777;display:flex;justify-content:center;align-items:center;color:#222;overflow:hidden}.add-photo-wrapper[_ngcontent-%COMP%] .photo-disc[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:cover}.add-photo-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:Montserrat;font-weight:600;max-width:120px;color:#222}form[_ngcontent-%COMP%]{display:flex;flex-direction:column}.selectable[_ngcontent-%COMP%]{cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}mat-radio-group[_ngcontent-%COMP%]{font-size:14px;margin-bottom:15px}mat-radio-group[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:10px}.category-header[_ngcontent-%COMP%]{font-family:Maple-Regular;font-size:28px;color:#222}.form-errors[_ngcontent-%COMP%]{margin-bottom:12px}@media screen and (max-width: 768px){jarvis-ui-card-wrapper[_ngcontent-%COMP%]{padding:0 1rem}.data-wrapper[_ngcontent-%COMP%]{flex-direction:column;align-items:center}.data-wrapper[_ngcontent-%COMP%] .form-column[_ngcontent-%COMP%], .data-wrapper[_ngcontent-%COMP%] .photo-column[_ngcontent-%COMP%]{width:100%}.selector-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 6px}}']});const j=[{path:"",redirectTo:"settings",pathMatch:"full"},{path:"settings",component:f,canActivate:[i]}],N=[{path:"",redirectTo:"nustatymai",pathMatch:"full"},{path:"nustatymai",component:f,canActivate:[i]}];class u{}u.\u0275fac=function(e){return new(e||u)},u.\u0275mod=t.oAB({type:u}),u.\u0275inj=t.cJS({providers:[{provide:p.Z6,deps:[z.gn],useFactory:c=>"lt"===c?N:j}],imports:[p.Bz,p.Bz]});var $=o(18455),_=o(58256),V=o(90811),W=o(97392),J=o(29203),Z=o(56686);class v{}v.\u0275fac=function(e){return new(e||v)},v.\u0275mod=t.oAB({type:v}),v.\u0275inj=t.cJS({providers:[{provide:$.Qi,useValue:{appearance:"outline"}},i,y.m],imports:[b.ez,Z.C8,w.ButtonModule,w.JarvisCardWrapperModule,u,$.wp,W.Ps,J.x4,n.UX,_.Xo,V.vV,F.aw]})},83122:(T,C,o)=>{o.d(C,{m:()=>l});var b=o(80529),p=o(94650),y=o(72268),P=o(47713);class l{constructor(t,i,n){this.httpService=t,this.messagingService=i,this.baseUrl=n,this.servicesEndpoint=`${this.baseUrl}/marketplace`,this.domainCountry=(0,p.f3M)(P.gn),this.currentPage=1,this.pageSize=24}getBookingsList(t=1,i=500,n=null){const M=new b.LE({fromObject:Object.assign({page:t,size:i},n?{additionalParams:JSON.stringify(n)}:null)});return this.httpService.get(`${this.servicesEndpoint}/booking`,{params:M})}getDetail(t){return this.httpService.get(`${this.servicesEndpoint}/booking/${t}`)}getBookingByEmail(t,i={page:"1",size:"100"}){const n=new b.LE({fromObject:i});return this.httpService.get(`${this.servicesEndpoint}/booking/getBookingByEmail/${t}`,{params:n})}getServiceBase(t){return this.httpService.get(`${this.servicesEndpoint}/service/${t}`)}changeOptions(t){return this.httpService.patch(`${this.servicesEndpoint}/booking/editOptions/${t._id}`,{...t.options})}changeBookingAccordingFlowStep(t){return this.httpService.post(`${this.servicesEndpoint}/booking/editFlowStepData/${t._id}`,t)}
1changeUserNote(t,i){return this.httpService.patch(`${this.servicesEndpoint}/booking/editNotes/${t}`,{notes:i})}changeCustomerNeeds(t,i){return this.httpService.patch(`${this.servicesEndpoint}/booking/editCustomerNeeds/${t}`,{customerNeeds:i})}doPayment(t){return this.httpService.patch(`${this.servicesEndpoint}/booking/editPaid/${t._id}`,{paid:t.paid})}startChatRoom(t,i,n){return this.messagingService.startChatroomWithUser(t,i,null,n)}confirmPayment(t,i,n){return this.httpService.post(`${this.baseUrl}/stripe/confirmPayment`,{bookingId:t,paymentIntent:i,state:n})}kevinOneTimePayment(t,i){return this.httpService.post(`${this.baseUrl}/kevin/oneTimePayment`,{bookingId:t,amount:i})}kevinConfirmPayment(t,i,n){return this.httpService.post(`${this.baseUrl}/kevin/confirmPayment`,{bookingId:t,paymentId:i,state:n})}makeCommerceOneTimePayment(t,i){return this.httpService.post(`${this.baseUrl}/makeCommerce/oneTimePayment`,{bookingId:t,amount:i})}makeCommerceConfirmPayment(t,i,n){return this.httpService.post(`${this.baseUrl}/makeCommerce/confirmPayment`,{bookingId:t,paymentId:i,state:n})}bookingNotification(t,i){return this.httpService.post(`${this.servicesEndpoint}/booking/bookingNotification`,{bookingId:t,flow:i})}cancelBooking(t){return this.httpService.post(`${this.servicesEndpoint}/booking/cancelBooking/${t}`,{})}changeState(t){return this.httpService.patch(`${this.servicesEndpoint}/booking/${t._id}`,"string"==typeof t.serviceBaseId?t:{...t,serviceBaseId:t.serviceBaseId._id,serviceEventId:t.serviceEventId._id})}useInvite(t){return this.httpService.get(`${this.baseUrl}/invite/${t}`)}signContract(t,i){return this.httpService.post(`${this.baseUrl}/file/signPdfContract`,{booking:t._id,name:i,secondSign:!0,domainCountry:this.domainCountry})}getBooking(t){return this.httpService.get(`${this.baseUrl}/marketplace/booking/${t}`)}}l.\u0275fac=function(t){return new(t||l)(p.LFG(b.eN),p.LFG(y.og),p.LFG(P._n))},l.\u0275prov=p.Yz7({token:l,factory:l.\u0275fac})}}]);
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.