1"use strict";(self.webpackChunkLettsArtFirebase=self.webpackChunkLettsArtFirebase||[]).push([[8222],{8222:(D,v,i)=>{i.r(v),i.d(v,{VerifyEmailModule:()=>Z});var E=i(9808),y=i(8654),c=i(9378),I=i(2846),g=i(655),h=i(4987),u=i(5620),F=i(1492),p=i(8088),R=i(7410),A=i(1309),S=i(2340),V=i(5226),T=i.n(V),L=i(7774),t=i(5e3),d=i(2666),O=i(1273),M=i(5440),C=i(2313),Y=i(520),b=i(3229),m=i(8653);function x(s,e){if(1&s){const r=t.EpF();t.TgZ(0,"nb-card-footer")(1,"button",2),t.NdJ("click",function(){return t.CHM(r),t.oxw().sendEmail()}),t._uU(2),t.ALo(3,"transloco"),t.qZA()()}2&s&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"PROFILE.VERIFY_EMAIL_BUTTON")))}let a=class{constructor(e,r,o,l,f,B,G,U,z){this.store=e,this.translocoService=r,this.logger=o,this.artistService=l,this.router=f,this.titleService=B,this.http=G,this.analyticsService=U,this.route=z,this.isArtist=!1,this.resendEmail=!0,this.confirmAttempted=!1,this.msg=this.translocoService.translate("PROFILE.VERIFY_EMAIL_DEFAULT_MSG"),this.store.pipe((0,u.Ys)(F.sF),(0,h.t)(this)).subscribe(n=>{this.artist=n,this.titleService.setTitle((null==n?void 0:n.galleryName)?`Verify Email - ${n.galleryName}`:"Verify Email"),this.tryConfirmFromToken()}),this.store.pipe((0,u.Ys)(R.e7),(0,h.t)(this)).subscribe(n=>this.isArtist=n),this.store.pipe((0,u.Ys)(L.d),(0,h.t)(this)).subscribe(n=>{this.user=n,this.tryConfirmFromToken()})}ngOnInit(){this.route.queryParams.subscribe(e=>{sessionStorage.getItem("emailValidateToken")?(this.token=sessionStorage.getItem("emailValidateToken"),sessionStorage.removeItem("emailValidateToken")):this.token=e.token,this.tryConfirmFromToken()})}tryConfirmFromToken(){var e,r;if(!this.confirmAttempted&&this.token&&(null===(e=this.artist)||void 0===e?void 0:e.uid)&&void 0!==this.user){if(!(null===(r=this.user)||void 0===r?void 0:r.uid))return sessionStorage.setItem("emailValidateToken",this.token),this.confirmAttempted=!0,void this.router.navigate(["/auth/login"]);if(this.user.uid!=this.artist.user_id)return this.confirmAttempted=!0,void(this.msg=this.translocoService.translate("PROFILE.VERIFY_EMAIL_ERROR_MSG"));this.confirmAttempted=!0,this.artistService.confirmEmail(this.artist.uid,{token:this.token}).subscribe({next:()=>{const o=Object.assign(new p.xh,this.artist);o.emailVerified=!0,o.verifyEmailDate=null,o.verifyEmailToken=null,o.verifyCode=null,this.resendEmail=!1,this.user&&this.user.email&&this.store.dispatch(new A.O$(o)),this.msg=this.translocoService.translate("PROFILE.VERIFY_EMAIL_SUCCESS_MSG")},error:o=>{var l;this.logger.error(o);const f="Verification link expired"===(null===(l=null==o?void 0:o.error)||void 0===l?void 0:l.message);this.msg=this.translocoService.translate(f?"PROFILE.VERIFY_EMAIL_EXPIRED_MSG":"PROFILE.VERIFY_EMAIL_ERROR_MSG")}})}}sendEmail(){var e;this.http.get(`${S.N.firebaseFunction}/artists/${null===(e=this.artist)||void 0===e?void 0:e.uid}/verify-email`).subscribe(r=>{this.msg=this.translocoService.translate("PROFILE.VERIFY_EMAIL_SENT_MSG"),this.resendEmail=!1,T().fire({title:this.translocoService.translate("PROFILE.CONFIRM-VERIFICATION-DIALOG-TITLE"),text:this.translocoService.translate("PROFILE.CONFIRM-VERIFICATION-DIALOG-TEXT"),icon:"success",customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1})})}};a.\u0275fac=function(e){return new(e||a)(t.Y36(u.yh),t.Y36(d.Vn),t.Y36(O.m),t.Y36(M.J),t.Y36(c.F0),t.Y36(C.Dx),t.Y36(Y.eN),t.Y36(b.B),t.Y36(c.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-verify-email"]],decls:8,vars:5,consts:[[2,"padding-top","20px"],[4,"ngIf"],[1,"btn","btn-primary",3,"click"]],template:function(e,r){1&e&&(t.TgZ(0,"nb-card",0)(1,"nb-card-header")(2,"H2"),t._uU(3),t.ALo(4,"transloco"),t.qZA()(),t.TgZ(5,"nb-card-body"),t._uU(6),t.qZA(),t.YNc(7,x,4,3,"nb-card-footer",1),t.qZA()),2&e&&(t.xp6(3),t.Oqu(t.lcZ(4,3,"PROFILE.VERIFY-EMAIL-TITLE")),t.xp6(3),t.hij(" ",r.msg," "),t.xp6(1),t.Q6J("ngIf",r.resendEmail))},directives:[m.Asz,m.ndF,m.yKW,E.O5,m.XWE],pipes:[d.Ot],styles:[""]}),a=(0,g.gn)([(0,h.c)()],a);const N=[{path:"",canActivate:[I.a],component:a}];let P=(()=>{class s{}return s.\u0275fac=function(r){return new(r||s)},s.\u0275mod=t.oAB({type:s}),s.\u0275inj=t.cJS({imports:[[c.Bz.forChild(N)],c.Bz]}),s})(),Z=(()=>{class s{}return s.\u0275fac=function(r){return new(r||s)},s.\u0275mod=t.oAB({type:s}),s.\u0275inj=t.cJS({imports:[[E.ez,P,y.T,d.y4,m.zyh]]}),s})()}}]);
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.