1"use strict";(self.webpackChunksynqr=self.webpackChunksynqr||[]).push([[504],{9504:(M,c,s)=>{s.r(c),s.d(c,{ProfileModule:()=>S});var i=s(4006),p=s(6895),a=s(3444),e=s(4650);let f=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["ng-component"]],decls:3,vars:0,consts:[[1,"p-4"],[1,"container"]],template:function(o,n){1&o&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"router-outlet"),e.qZA()())},dependencies:[a.lC],encapsulation:2}),t})();var m=s(1544);let v=(()=>{class t{constructor(o){this.accountService=o,this.account=this.accountService.accountValue}}return t.\u0275fac=function(o){return new(o||t)(e.Y36(m.B))},t.\u0275cmp=e.Xpm({type:t,selectors:[["ng-component"]],decls:13,vars:3,consts:[["routerLink","update"]],template:function(o,n){1&o&&(e.TgZ(0,"h1"),e._uU(1,"My Profile"),e.qZA(),e.TgZ(2,"p")(3,"strong"),e._uU(4,"Name: "),e.qZA(),e._uU(5),e._UZ(6,"br"),e.TgZ(7,"strong"),e._uU(8,"Email: "),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"p")(11,"a",0),e._uU(12,"Update Profile"),e.qZA()()),2&o&&(e.xp6(5),e.AsE(" ",n.account.developerName," from ",n.account.companyName,""),e.xp6(4),e.hij(" ",n.account.email,"\n"))},dependencies:[a.yS],encapsulation:2}),t})();var l=s(590),g=s(6879),_=s(5970);function Z(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"First Name is required"),e.qZA())}function U(t,r){if(1&t&&(e.TgZ(0,"div",16),e.YNc(1,Z,2,0,"div",17),e.qZA()),2&t){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.f.developerName.errors.required)}}function h(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Last Name is required"),e.qZA())}function C(t,r){if(1&t&&(e.TgZ(0,"div",16),e.YNc(1,h,2,0,"div",17),e.qZA()),2&t){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.f.companyName.errors.required)}}function T(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Email is required"),e.qZA())}function q(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Email must be a valid email address"),e.qZA())}function b(t,r){if(1&t&&(e.TgZ(0,"div",16),e.YNc(1,T,2,0,"div",17),e.YNc(2,q,2,0,"div",17),e.qZA()),2&t){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.f.email.errors.required),e.xp6(1),e.Q6J("ngIf",o.f.email.errors.email)}}function A(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Password is required"),e.qZA())}function N(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Password must be at least 6 characters"),e.qZA())}function y(t,r){if(1&t&&(e.TgZ(0,"div",16),e.YNc(1,A,2,0,"div",17),e.YNc(2,N,2,0,"div",17),e.qZA()),2&t){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.f.password.errors.required),e.xp6(1),e.Q6J("ngIf",o.f.password.errors.minlength)}}function J(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Confirm Password is required"),e.qZA())}function w(t,r){1&t&&(e.TgZ(0,"div"),e._uU(1,"Passwords must match"),e.qZA())}function x(t,r){if(1&t&&(e.TgZ(0,"div",16),e.YNc(1,J,2,0,"div",17),e.YNc(2,w,2,0,"div",17),e.qZA()),2&t){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.f.confirmPassword.errors.required),e.xp6(1),e.Q6J("ngIf",o.f.confirmPassword.errors.mustMatch)}}function P(t,r){1&t&&e._UZ(0,"span",18)}function I(t,r){1&t&&e._UZ(0,"span",18)}const d=function(t){return{"is-invalid":t}},Q=[{path:"",component:f,children:[{path:"",component:v},{path:"update",component:(()=>{class t{constructor(o,n,u,k,L){this.formBuilder=o,this.route=n,this.router=u,this.accountService=k,this.alertService=L,this.account=this.accountService.accountValue,this.loading=!1,this.submitted=!1,this.deleting=!1}ngOnInit(){this.form=this.formBuilder.group({developerName:[this.account.developerName,i.kI.required],companyName:[this.account.companyName,i.kI.required],email:[this.account.email,[i.kI.required,i.kI.email]],key:[this.account.key,i.kI.required],password:["",[i.kI.minLength(6)]],confirmPassword:[""]},{validator:(0,g.Yf)("password","confirmPassword")})}get f(){return this.form.controls}onSubmit(){this.submitted=!0,this.alertService.clear(),!this.form.invalid&&(this.loading=!0,this.accountService.update(this.account.id,this.form.value).pipe((0,l.P)()).subscribe({next:()=>{this.alertService.success("Update successful",{keepAfterRouteChange:!0}),this.router.navigate(["../"],{relativeTo:this.route})},error:o=>{this.alertService.error(o),this.loading=!1}}))}onDelete(){confirm("Are you sure?")&&(this.deleting=!0,this.accountService.delete(this.account.id).pipe((0,l.P)()).subscribe(()=>{this.alertService.success("Account deleted successfully",{keepAfterRouteChange:!0})}
1))}}return t.\u0275fac=function(o){return new(o||t)(e.Y36(i.qu),e.Y36(a.gz),e.Y36(a.F0),e.Y36(m.B),e.Y36(_.c9))},t.\u0275cmp=e.Xpm({type:t,selectors:[["ng-component"]],decls:43,vars:25,consts:[[3,"formGroup","ngSubmit"],[1,"form-row"],[1,"form-group","col-5"],["type","text","formControlName","developerName",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],["type","text","formControlName","companyName",1,"form-control",3,"ngClass"],[1,"form-group"],["type","text","formControlName","email",1,"form-control",3,"ngClass"],[1,"pt-3"],[1,"form-group","col"],["type","password","formControlName","password",1,"form-control",3,"ngClass"],["type","password","formControlName","confirmPassword",1,"form-control",3,"ngClass"],["type","submit",1,"btn","btn-primary","mr-2",3,"disabled"],["class","spinner-border spinner-border-sm mr-1",4,"ngIf"],["type","button",1,"btn","btn-danger",3,"disabled","click"],["routerLink","../","href","",1,"btn","btn-link"],[1,"invalid-feedback"],[4,"ngIf"],[1,"spinner-border","spinner-border-sm","mr-1"]],template:function(o,n){1&o&&(e.TgZ(0,"h1"),e._uU(1,"Update Profile"),e.qZA(),e.TgZ(2,"form",0),e.NdJ("ngSubmit",function(){return n.onSubmit()}),e.TgZ(3,"div",1)(4,"div",2)(5,"label"),e._uU(6,"Developer Name"),e.qZA(),e._UZ(7,"input",3),e.YNc(8,U,2,1,"div",4),e.qZA(),e.TgZ(9,"div",2)(10,"label"),e._uU(11,"Company Name"),e.qZA(),e._UZ(12,"input",5),e.YNc(13,C,2,1,"div",4),e.qZA()(),e.TgZ(14,"div",6)(15,"label"),e._uU(16,"Email"),e.qZA(),e._UZ(17,"input",7),e.YNc(18,b,3,2,"div",4),e.qZA(),e.TgZ(19,"h3",8),e._uU(20,"Change Password"),e.qZA(),e.TgZ(21,"p"),e._uU(22,"Leave blank to keep the same password"),e.qZA(),e.TgZ(23,"div",1)(24,"div",9)(25,"label"),e._uU(26,"Password"),e.qZA(),e._UZ(27,"input",10),e.YNc(28,y,3,2,"div",4),e.qZA(),e.TgZ(29,"div",9)(30,"label"),e._uU(31,"Confirm Password"),e.qZA(),e._UZ(32,"input",11),e.YNc(33,x,3,2,"div",4),e.qZA()(),e.TgZ(34,"div",6)(35,"button",12),e.YNc(36,P,1,0,"span",13),e._uU(37," Update "),e.qZA(),e.TgZ(38,"button",14),e.NdJ("click",function(){return n.onDelete()}),e.YNc(39,I,1,0,"span",13),e._uU(40," Delete "),e.qZA(),e.TgZ(41,"a",15),e._uU(42,"Cancel"),e.qZA()()()),2&o&&(e.xp6(2),e.Q6J("formGroup",n.form),e.xp6(5),e.Q6J("ngClass",e.VKq(15,d,n.submitted&&n.f.developerName.errors)),e.xp6(1),e.Q6J("ngIf",n.submitted&&n.f.developerName.errors),e.xp6(4),e.Q6J("ngClass",e.VKq(17,d,n.submitted&&n.f.companyName.errors)),e.xp6(1),e.Q6J("ngIf",n.submitted&&n.f.companyName.errors),e.xp6(4),e.Q6J("ngClass",e.VKq(19,d,n.submitted&&n.f.email.errors)),e.xp6(1),e.Q6J("ngIf",n.submitted&&n.f.email.errors),e.xp6(9),e.Q6J("ngClass",e.VKq(21,d,n.submitted&&n.f.password.errors)),e.xp6(1),e.Q6J("ngIf",n.submitted&&n.f.password.errors),e.xp6(4),e.Q6J("ngClass",e.VKq(23,d,n.submitted&&n.f.confirmPassword.errors)),e.xp6(1),e.Q6J("ngIf",n.submitted&&n.f.confirmPassword.errors),e.xp6(2),e.Q6J("disabled",n.loading),e.xp6(1),e.Q6J("ngIf",n.loading),e.xp6(2),e.Q6J("disabled",n.deleting),e.xp6(1),e.Q6J("ngIf",n.deleting))},dependencies:[p.mk,p.O5,i._Y,i.Fj,i.JJ,i.JL,i.sg,i.u,a.yS],encapsulation:2}),t})()}]}];let Y=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[a.Bz.forChild(Q),a.Bz]}),t})(),S=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[p.ez,i.UX,Y]}),t})()}}]);
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.