1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6950],{6950:(E,g,a)=>{a.r(g),a.d(g,{EditProfilePageModule:()=>U});var f=a(6814),n=a(95),r=a(1024),p=a(209),e=a(6689),m=a(3859),h=a(7850),v=a(6133);function P(i,s){if(1&i){const l=e.EpF();e.TgZ(0,"div",22),e.NdJ("click",function(){e.CHM(l),e.oxw();const o=e.MAs(7);return e.KtG(o.click())}),e._UZ(1,"img",23),e.qZA()}}function _(i,s){if(1&i){const l=e.EpF();e.TgZ(0,"div")(1,"ion-avatar",22),e.NdJ("click",function(){e.CHM(l);const o=e.oxw();return e.KtG(o.removePhoto())}),e._UZ(2,"img",24),e.qZA()()}if(2&i){const l=e.oxw();e.xp6(2),e.Q6J("src",l.previewUrl,e.LSH)}}const x=[{path:"",component:(()=>{var i;class s{constructor(t,o,c,d,u){this.location=t,this.perfilService=o,this.fb=c,this.alert=d,this.router=u,this.wordLength=0,this.fileData=null,this.user=this.perfilService.getUser(),this.previewUrl=this.user.photo,this.form=this.fb.group({}),this.initForm(this.user)}initForm(t){this.form=this.fb.group({first_name:[t.first_name,n.kI.required],last_name:[t.last_name,n.kI.required],university:[t.university.id,n.kI.required],description:[t.description,n.kI.required]}),console.log("INIT FORM",this.form.value)}textCounter(t){this.wordLength=t.target.value.length}addPhoto(t){var o,c;if(this.fileData=(null==t||null===(o=t.target)||void 0===o?void 0:o.files[0])||null,((null===(c=this.fileData)||void 0===c?void 0:c.type)||"").match(/image\/*/)&&null!==this.fileData){if(this.fileData.size>6e6)return this.alert.errorAlert("The size of the image is bigger than 6Mb"),void(this.fileData=null);var u=new FileReader;u.readAsDataURL(this.fileData),u.onload=b=>{this.previewUrl=u.result}}}updateProfile(){this.form.valid?this.perfilService.updatePerfil(this.user.id,this.form.value,this.fileData).subscribe({next:t=>{this.alert.successAlert("Profile Updated"),this.router.navigate(["tabs","settings"],{queryParams:{reload:!0}})},error:t=>{this.alert.errorAlert("Error!")}}):this.alert.errorAlert("Invalid Form!")}removePhoto(){this.previewUrl=null}goBack(){return this.location.back()}}return(i=s).\u0275fac=function(t){return new(t||i)(e.Y36(f.Ye),e.Y36(m.F),e.Y36(n.qu),e.Y36(h.c),e.Y36(p.F0))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-edit-profile"]],decls:41,vars:14,consts:[[3,"title","leftIcon","leftTrigger"],["color","light",3,"fullscreen"],[1,"container"],[1,"main-content"],[3,"formGroup"],[1,"photo-position"],["type","file","accept","image/*",2,"visibility","hidden",3,"change"],["chosenFile",""],["class","img-box",3,"click",4,"ngIf"],[4,"ngIf"],[1,"avatar-section"],["mode","ios",3,"inset"],["position","stacked"],["formControlName","first_name","placeholder","E.g. John Smith","aria-label","Name"],["formControlName","last_name","placeholder","E.g. John Smith","aria-label","Last Name"],["formControlName","university","justify","space-between","interface","action-sheet","aria-label","University","placeholder","Select"],[3,"value"],[1,"text-box"],["aria-label","About you","formControlName","description","placeholder","Enter more details","maxlength","500",2,"height","120px",3,"ionInput"],[1,"counter-words"],[2,"width","100%"],["mode","ios","color","medium",1,"save-btn",3,"click"],[1,"img-box",3,"click"],["src","/assets/img/user.png",1,"profile-photo"],[3,"src"]],template:function(t,o){1&t&&(e._UZ(0,"app-navbar",0),e.TgZ(1,"ion-content",1)(2,"div",2)(3,"div",3)(4,"form",4)(5,"div",5)(6,"input",6,7),e.NdJ("change",function(d){return o.addPhoto(d)}),e.qZA(),e.YNc(8,P,2,0,"div",8),e.YNc(9,_,3,1,"div",9),e.TgZ(10,"p"),e._uU(11,"Tap to change profile photo"),e.qZA()(),e._UZ(12,"div",10),e.TgZ(13,"ion-list",11)(14,"ion-item")(15,"ion-label",12),e._uU(16,"Name"),e.qZA(),e._UZ(17,"ion-input",13),e.qZA()(),e.TgZ(18,"ion-list",11)(19,"ion-item")(20,"ion-label",12),e._uU(21,"Last Name"),e.qZA(),e._UZ(22,"ion-input",14),e.qZA()(),e.TgZ(23,"ion-list",11)(24,"ion-item")(25,"ion-select",15)(26,"ion-select-option",16),e._uU(27,"RHUL"),e.qZA(),e.TgZ(28,"ion-select-option",16),e._uU(29,"Simon Bolivar University"),e.qZA()()()(),e.TgZ(30,"ion-list",11)(31,"ion-item")(32,"div",17)(33,"ion-label"),e._uU(34,"About you"),e.qZA(),e.TgZ(35,"i
1on-textarea",18),e.NdJ("ionInput",function(d){return o.textCounter(d)}),e.qZA()()(),e.TgZ(36,"ion-label",19),e._uU(37),e.qZA()()()(),e.TgZ(38,"div",20)(39,"ion-button",21),e.NdJ("click",function(){return o.updateProfile()}),e._uU(40,"Save changes"),e.qZA()()()()),2&t&&(e.Q6J("title","Edit Profile")("leftIcon","arrow-back-outline")("leftTrigger",o.goBack),e.xp6(1),e.Q6J("fullscreen",!0),e.xp6(3),e.Q6J("formGroup",o.form),e.xp6(4),e.Q6J("ngIf",!o.previewUrl),e.xp6(1),e.Q6J("ngIf",o.previewUrl),e.xp6(4),e.Q6J("inset",!0),e.xp6(5),e.Q6J("inset",!0),e.xp6(5),e.Q6J("inset",!0),e.xp6(3),e.Q6J("value",2),e.xp6(2),e.Q6J("value",1),e.xp6(2),e.Q6J("inset",!0),e.xp6(7),e.hij("",o.wordLength,"/500"))},dependencies:[f.O5,n._Y,n.JJ,n.JL,n.nD,n.sg,n.u,r.BJ,r.YG,r.W2,r.pK,r.Ie,r.Q$,r.q_,r.t9,r.n0,r.g2,r.QI,r.j9,v.S],styles:[".container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-direction:column;align-items:center;height:100%;width:100%}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;width:100%;align-items:center;margin-top:2rem}.add-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.photo-position[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:.5rem}.img-box[_ngcontent-%COMP%]{height:120px;width:120px;display:flex;justify-content:center;align-items:center}ion-list[_ngcontent-%COMP%]{padding:1rem;width:90%}.counter-words[_ngcontent-%COMP%]{opacity:.5;display:flex;justify-content:flex-end}.save-btn[_ngcontent-%COMP%]{width:100%;padding:1rem}"]}),s})()}];let y=(()=>{var i;class s{}return(i=s).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[p.Bz.forChild(x),p.Bz]}),s})();var Z=a(2552);let U=(()=>{var i;class s{}return(i=s).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[f.ez,n.u5,n.UX,r.Pc,y,Z.m]}),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.