text: (window.webpackJsonp=window.webpackJsonp||[]).push([[10],{UUSl:function(r,o,t){"use strict";t.r(o),t.d(o,"SignupModule",(function(){return P}));var e=t("ofXK"),n=t("NFeN"),i=t("qFsG"),a=t("d3UM"),s=t("bTqV"),c=t("/t3+"),m=t("kmnG"),b=t("mrSG"),p=t("3Pt+"),u=t("fXoL"),f=t("9ZKQ"),l=t("tyNb"),d=t("IRyT"),g=t("dWDE"),w=t("Xa2L");function h(r,o){if(1&r&&(u.Ub(0,"mat-error"),u.xc(1),u.Tb()),2&r){const r=u.gc();u.Cb(1),u.zc(" ",r.errors.email," ")}}function y(r,o){if(1&r&&(u.Ub(0,"mat-error"),u.xc(1),u.Tb()),2&r){const r=u.gc();u.Cb(1),u.zc(" ",r.errors.password," ")}}function v(r,o){if(1&r&&(u.Ub(0,"mat-error"),u.xc(1),u.Tb()),2&r){const r=u.gc();u.Cb(1),u.Ac(" ",r.errors.confirm," ",r.errors.confirm&&r.form.value.password!=r.form.value.confirm?" & ":""," ",r.form.value.password!=r.form.value.confirm?"Passwords do not match":""," ")}}function x(r,o){1&r&&u.Pb(0,"mat-progress-spinner",14)}const C=[{path:"",component:(()=>{class r{constructor(r,o,t,e){this.toast=r,this.router=o,this.service=t,this.formerror=e,this.form=new p.d({email:new p.b("",[p.p.email,p.p.required]),confirm:new p.b("",[p.p.required]),password:new p.b("",[p.p.required])}),this.errors={email:"",confirm:"",password:""},this.subscriptions={}}submit(){return Object(b.a)(this,void 0,void 0,(function*(){this.loading=!0,this.form.disable();const r=yield this.service.register({email:this.form.value.email,password:this.form.value.password});this.form.enable(),this.loading=!1,r.ok?this.router.navigate(["/verify"],{replaceUrl:!0}):this.toast.error(r.error.message)}))}ngOnInit(){this.subscriptions.form=this.form.valueChanges.subscribe(r=>{this.errors=this.formerror.validateForm(this.form,this.errors,!0)})}ngOnDestroy(){this.subscriptions.form.unsubscribe()}}return r.\u0275fac=function(o){return new(o||r)(u.Ob(f.a),u.Ob(l.b),u.Ob(d.a),u.Ob(g.a))},r.\u0275cmp=u.Ib({type:r,selectors:[["app-signup"]],decls:32,vars:6,consts:[[3,"formGroup","ngSubmit"],["src","./assets/icons/icon-512x512.png","alt","Auth Icon"],["appearance","outline"],["text-uppercase",""],["matInput","","type","email","name","email","placeholder","email","formControlName","email","required",""],[4,"ngIf"],["matInput","","type","password","name","password","placeholder","password","formControlName","password","required",""],["matInput","","type","password","name","confirm","placeholder","confirm password","formControlName","confirm","required",""],["type","submit","mat-flat-button","","color","primary"],["class","mat-spinner-negative","mode","indeterminate","diameter","30",4,"ngIf"],["routerLink","/terms-and-conditions"],["routerLink","/privacy-policy"],["type","button","mat-stroked-button","","color","primary","routerLink","/verify-account"],["type","button","mat-stroked-button","","color","primary","routerLink","/signin"],["mode","indeterminate","diameter","30",1,"mat-spinner-negative"]],template:function(r,o){1&r&&(u.Ub(0,"form",0),u.cc("ngSubmit",(function(){return!o.form.invalid&&!o.loading&&o.form.value.password==o.form.value.confirm&&o.submit()})),u.Pb(1,"img",1),u.Ub(2,"mat-form-field",2),u.Ub(3,"mat-label",3),u.xc(4," Email "),u.Tb(),u.Pb(5,"input",4),u.wc(6,h,2,1,"mat-error",5),u.Tb(),u.Ub(7,"mat-form-field",2),u.Ub(8,"mat-label",3),u.xc(9," Password "),u.Tb(),u.Pb(10,"input",6),u.wc(11,y,2,1,"mat-error",5),u.Tb(),u.Ub(12,"mat-form-field",2),u.Ub(13,"mat-label",3),u.xc(14," Confirm Password "),u.Tb(),u.Pb(15,"input",7),u.wc(16,v,2,3,"mat-error",5),u.Tb(),u.Ub(17,"button",8),u.xc(18),u.wc(19,x,1,0,"mat-progress-spinner",9),u.Tb(),u.Ub(20,"p"),u.xc(21," By clicking \u201cSIGN UP\u201d, you agree to our "),u.Ub(22,"a",10),u.xc(23,"Terms & Conditions"),u.Tb(),u.xc(24," and "),u.Ub(25,"a",11),u.xc(26,"Privacy Policy"),u.Tb(),u.xc(27,". We\u2019ll occasionally send you account related emails. "),u.Tb(),u.Ub(28,"button",12),u.xc(29," verify account "),u.Tb(),u.Ub(30,"button",13),u.xc(31," back to sign in "),u.Tb(),u.Tb()),2&r&&(u.mc("formGroup",o.form),u.Cb(6),u.mc("ngIf",o.errors.email),u.Cb(5),u.mc("ngIf",o.errors.password),u.Cb(5),u.mc("ngIf",o.errors.confirm||o.form.value.password!=o.form.value.confirm),u.Cb(2),u.zc(" ",o.loading?"":"sign up"," "),u.Cb(1),u.mc("ngIf",o.loading))},directives:[p.q,p.j,p.e,m.c,m.g,i.a,p.a,p.i,p.c,p.o,e.k,s.a,l.e,l.c,m.b,w.a],styles:["img[_ngcontent-%COMP%]{width:100px;display:block;margin:25px auto}form[_ngcontent-%COMP%]{width:400px;margin:auto}form[_ngcontent-%COMP%]   [mat-stroked-button][_ngcontent-%COMP%]{margin-top:20px}p[_ngcontent-%COMP%]{font-size:12px;margin-top:15px;text-align:justify;line-height:15px}p[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#2196f3}@media screen and (max-width:420px){form[_ngcontent-%COMP%]{width:calc(100% - 20px)}}"]}),r})()}];let U=(()=>{class r{}return r.\u0275mod=u.Mb({type:r}),r.\u0275inj=u.Lb({factory:function(o){return new(o||r)},imports:[[l.f.forChild(C)],l.f]}),r})(),P=(()=>{class r{}return r.\u0275mod=u.Mb({type:r}),r.\u0275inj=u.Lb({factory:function(o){return new(o||r)},imports:[[p.f,e.c,n.b,i.b,s.b,a.a,c.b,m.e,p.n,U,w.b]]}),r})()}}]);