1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[2082,3706],{22082(b,h,r){r.d(h,{q:()=>T});var t=r(73664),i=r(98692),u=r(68018),C=r(96354),M=r(13817),v=r(4093),E=r(64972),P=r(89777),R=r(86332),g=r(9847);function F(n,e){if(1&n&&t.nrm(0,"ds-form",1),2&n){const f=t.XpG();t.Y8G("formId",f.FORM_PREFIX)("formModel",f.formModel)("formGroup",f.formGroup)("displaySubmit",!1)("displayCancel",!1)}}function O(n,e){if(1&n&&(t.j41(0,"div",2),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const f=t.XpG();t.R7$(),t.JRh(t.bMT(2,1,f.FORM_PREFIX+"error.matching-passwords"))}}function I(n,e){if(1&n&&(t.j41(0,"div",3),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const f=t.XpG();t.R7$(),t.JRh(t.bMT(2,1,f.FORM_PREFIX+"error.empty-password"))}}let T=(()=>{var n;class e{constructor(a,d,c,D){this.formService=a,this.translate=d,this.epersonService=c,this.notificationsService=D,this.isInvalid=new t.bkB,this.passwordValue=new t.bkB,this.currentPasswordValue=new t.bkB,this.formModel=[new i.rA_({id:"password",name:"password",inputType:"password",autoComplete:"new-password"}),new i.rA_({id:"passwordrepeat",name:"passwordrepeat",inputType:"password",autoComplete:"new-password"})],this.passwordCanBeEmpty=!0,this.subs=[]}ngOnInit(){"profile.security.form."===this.FORM_PREFIX&&this.formModel.unshift(new i.rA_({id:"current-password",name:"current-password",inputType:"password",required:!0,autoComplete:"current-password"})),this.formGroup=this.formService.createFormGroup(this.formModel,this.passwordCanBeEmpty?{validators:[this.checkPasswordsEqual]}:{validators:[this.checkPasswordsEqual,this.checkPasswordEmpty]}),this.updateFieldTranslations(),this.translate.onLangChange.subscribe(()=>{this.updateFieldTranslations()}),this.subs.push(this.formGroup.statusChanges.pipe((0,v.F3)(300),(0,C.T)(a=>"VALID"!==a)).subscribe(a=>this.isInvalid.emit(a))),this.subs.push(this.formGroup.valueChanges.pipe((0,v.F3)(300)).subscribe(a=>{this.passwordValue.emit(a.password),"profile.security.form."===this.FORM_PREFIX&&this.currentPasswordValue.emit(a["current-password"])}))}updateFieldTranslations(){this.formModel.forEach(a=>{a.label=this.translate.instant(this.FORM_PREFIX+"label."+a.id)})}checkPasswordsEqual(a){return a.get("password").value===a.get("passwordrepeat").value?null:{notSame:!0}}checkPasswordEmpty(a){const d=a.get("password").value;return(0,P.Im)(d)?{emptyPassword:!0}:null}ngOnDestroy(){this.subs.filter(a=>(0,P.a4)(a)).forEach(a=>a.unsubscribe())}static#e=n=()=>(this.\u0275fac=function(d){return new(d||e)(t.rXU(i.J9r),t.rXU(u.c$),t.rXU(M.EPersonDataService),t.rXU(g.I))},this.\u0275cmp=t.VBU({type:e,selectors:[["ds-profile-page-security-form"]],inputs:{passwordCanBeEmpty:"passwordCanBeEmpty",FORM_PREFIX:"FORM_PREFIX"},outputs:{isInvalid:"isInvalid",passwordValue:"passwordValue",currentPasswordValue:"currentPasswordValue"},decls:6,vars:7,consts:[[1,"mb-4",3,"type"],[3,"formId","formModel","formGroup","displaySubmit","displayCancel"],["id","notSame",1,"container-fluid","text-danger"],["id","emptyPassword",1,"container-fluid","text-danger"]],template:function(d,c){1&d&&(t.j41(0,"ds-alert",0),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.nVh(3,F,1,5,"ds-form",1),t.nVh(4,O,3,3,"div",2),t.nVh(5,I,3,3,"div",3)),2&d&&(t.Y8G("type","alert-info"),t.R7$(),t.JRh(t.bMT(2,5,c.FORM_PREFIX+"info")),t.R7$(2),t.vxM(c.formModel?3:-1),t.R7$(),t.vxM(c.formGroup.hasError("notSame")?4:-1),t.R7$(),t.vxM((c.formGroup.dirty||c.formGroup.touched)&&c.formGroup.hasError("emptyPassword")?5:-1))},dependencies:[E.C,R.s,u.h,u.D9],encapsulation:2}))}return n(),e})()},51325(b,h,r){r.r(h),r.d(h,{CreateProfileComponent:()=>N});var t=r(72200),i=r(89417),u=r(68018),C=r(96354),M=r(78544),v=r(45124),E=r(40220),P=r(13817),R=r(89253),g=r(4093),F=r(22082),O=r(79104),I=r(89777),T=r(9847),n=r(2615),e=r(73664),f=r(59640),a=r(91029);function d(l,m){1&l&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&l&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"register-page.create-profile.identification.first-name.error")," "))}function c(l,m){if(1&l&&(e.j41(0,"div",13),e.nVh(1,d,3,3,"span"),e.k0s()),2&l){const s=e.XpG(2);e.R7$(),e.vxM(s.firstName.errors&&s.firstName.errors.required?1:-1)}}function D(l,m){1&l&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&l&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"register-page.create-profile.identification.last-name.error")," "))}
1function y(l,m){if(1&l&&(e.j41(0,"div",13),e.nVh(1,D,3,3,"span"),e.k0s()),2&l){const s=e.XpG(2);e.R7$(),e.vxM(s.lastName.errors&&s.lastName.errors.required?1:-1)}}function w(l,m){if(1&l&&(e.j41(0,"option",20),e.EFF(1),e.k0s()),2&l){const s=m.$implicit;e.Y8G("value",s.code),e.R7$(),e.JRh(s.label)}}function B(l,m){if(1&l){const s=e.RV6();e.j41(0,"div",0)(1,"h3",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",2)(5,"div",3),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.j41(8,"div",4)(9,"div",5)(10,"div",6)(11,"label",7),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"span",8),e.EFF(15),e.nI1(16,"async"),e.k0s()()(),e.j41(17,"form",9),e.bIt("ngSubmit",function(){n.eBV(s);const _=e.XpG();return n.Njj(_.submitEperson())}),e.j41(18,"div",10)(19,"div",5)(20,"div",6)(21,"label",11),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.nrm(24,"input",12),e.nVh(25,c,2,1,"div",13),e.k0s()(),e.j41(26,"div",5)(27,"div",6)(28,"label",14),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.nrm(31,"input",15),e.nVh(32,y,2,1,"div",13),e.k0s()(),e.j41(33,"div",5)(34,"div",6)(35,"label",16),e.EFF(36),e.nI1(37,"translate"),e.k0s(),e.nrm(38,"input",17),e.k0s()(),e.j41(39,"div",5)(40,"div",6)(41,"label",18),e.EFF(42),e.nI1(43,"translate"),e.k0s(),e.j41(44,"select",19),e.nrm(45,"option",20),e.Z7z(46,w,2,2,"option",20,e.fX1),e.k0s()()()()()()(),e.j41(48,"div",2)(49,"div",3),e.EFF(50),e.nI1(51,"translate"),e.k0s(),e.j41(52,"div",4)(53,"ds-profile-page-security-form",21),e.bIt("isInvalid",function(_){n.eBV(s);const p=e.XpG();return n.Njj(p.setInValid(_))})("passwordValue",function(_){n.eBV(s);const p=e.XpG();return n.Njj(p.setPasswordValue(_))}),e.k0s()()(),e.j41(54,"div",5)(55,"div",6)(56,"button",22),e.bIt("click",function(){n.eBV(s);const _=e.XpG();return n.Njj(_.submitEperson())}),e.EFF(57),e.nI1(58,"translate"),e.k0s()()()()}if(2&l){const s=e.XpG();e.R7$(2),e.JRh(e.bMT(3,21,"register-page.create-profile.header")),e.R7$(4),e.JRh(e.bMT(7,23,"register-page.create-profile.identification.header")),e.R7$(6),e.JRh(e.bMT(13,25,"register-page.create-profile.identification.email")),e.R7$(3),e.JRh(e.bMT(16,27,s.registration$).email),e.R7$(2),e.HbH("ng-invalid"),e.Y8G("formGroup",s.userInfoForm),e.R7$(5),e.JRh(e.bMT(23,29,"register-page.create-profile.identification.first-name")),e.R7$(2),e.Y8G("className",s.firstName.invalid&&(s.firstName.dirty||s.firstName.touched)?"form-control is-invalid":"form-control"),e.R7$(),e.vxM(s.firstName.invalid&&(s.firstName.dirty||s.firstName.touched)?25:-1),e.R7$(4),e.JRh(e.bMT(30,31,"register-page.create-profile.identification.last-name")),e.R7$(2),e.Y8G("className",s.lastName.invalid&&(s.lastName.dirty||s.lastName.touched)?"form-control is-invalid":"form-control"),e.R7$(),e.vxM(s.lastName.invalid&&(s.lastName.dirty||s.lastName.touched)?32:-1),e.R7$(4),e.JRh(e.bMT(37,33,"register-page.create-profile.identification.contact")),e.R7$(6),e.JRh(e.bMT(43,35,"register-page.create-profile.identification.language")),e.R7$(3),e.Y8G("value",""),e.R7$(),e.Dyx(s.activeLangs),e.R7$(4),e.JRh(e.bMT(51,37,"register-page.create-profile.security.header")),e.R7$(3),e.Y8G("passwordCanBeEmpty",!1)("FORM_PREFIX","register-page.create-profile.security."),e.R7$(3),e.Y8G("dsBtnDisabled",s.isInValidPassword||s.userInfoForm.invalid),e.R7$(),e.JRh(e.bMT(58,39,"register-page.create-profile.submit"))}}let N=(()=>{var l;class m{constructor(o,_,p,U,A,S,X,V){this.translateService=o,this.ePersonDataService=_,this.store=p,this.router=U,this.route=A,this.formBuilder=S,this.notificationsService=X,this.endUserAgreementService=V,this.isInValidPassword=!0,this.NOTIFICATIONS_PREFIX="register-page.create-profile.submit."}ngOnInit(){this.registration$=this.route.data.pipe((0,C.T)(o=>o.registration),(0,g.ak)()),this.registration$.subscribe(o=>{this.email=o.email,this.token=o.token}),this.activeLangs=M.c.languages.filter(o=>!0===o.active),this.userInfoForm=this.formBuilder.group({firstName:new i.hs("",{validators:[i.k0.required]}),lastName:new i.hs("",{validators:[i.k0.required]}),contactPhone:new i.hs(""),language:new i.hs("")})}setInValid(o){this.isInValidPassword=o||(0,I.Im)(this.password)}setPasswordValue(o){this.password=o,this.isInValidPassword=this.isInValidPassword||(0,I.Im)(this.password)}get firstName(){return this.userInfoForm.get("firstName")}get lastName(){return this.userInfoForm.get("lastName")}get contactPhone(){return this.userInfoForm.get("contactPhone")}get language(){return this.userInfoForm.get("language")}
1submitEperson(){if(!this.userInfoForm.invalid&&!this.isInValidPassword){const o={metadata:{"eperson.firstname":[{value:this.firstName.value}],"eperson.lastname":[{value:this.lastName.value}],"eperson.phone":[{value:this.contactPhone.value}],"eperson.language":[{value:this.language.value}]},email:this.email,password:this.password,canLogIn:!0,requireCertificate:!1};this.endUserAgreementService.isCookieAccepted()&&(o.metadata[E.Mk]=[{value:String(!0)}],this.endUserAgreementService.removeCookieAccepted());const _=Object.assign(new R.f,o);this.ePersonDataService.createEPersonForToken(_,this.token).pipe((0,g.qD)()).subscribe(p=>{p.hasSucceeded?(this.notificationsService.success(this.translateService.get(this.NOTIFICATIONS_PREFIX+"success.head"),this.translateService.get(this.NOTIFICATIONS_PREFIX+"success.content")),this.store.dispatch(new v.Sn(this.email,this.password)),this.router.navigate(["/home"])):this.notificationsService.error(this.translateService.get(this.NOTIFICATIONS_PREFIX+"error.head"),p.errorMessage)})}}static#e=l=()=>(this.\u0275fac=function(_){return new(_||m)(e.rXU(u.c$),e.rXU(P.EPersonDataService),e.rXU(f.il),e.rXU(a.Ix),e.rXU(a.nX),e.rXU(i.ze),e.rXU(T.I),e.rXU(E.GH))},this.\u0275cmp=e.VBU({type:m,selectors:[["ds-base-create-profile"]],decls:2,vars:3,consts:[[1,"container"],[1,"mb-4"],[1,"card","mb-4"],[1,"card-header"],[1,"card-body"],[1,"row"],[1,"col-12"],["for","email",1,"fw-bold","form-label","me-4"],["id","email"],[3,"ngSubmit","formGroup"],[1,"mb-3"],["for","firstName",1,"form-label"],["type","text","id","firstName","formControlName","firstName",3,"className"],[1,"invalid-feedback","show-feedback"],["for","lastName",1,"form-label"],["id","lastName","formControlName","lastName",3,"className"],["for","contactPhone",1,"form-label"],["id","contactPhone","formControlName","contactPhone",1,"form-control"],["for","language",1,"form-label"],["id","language","formControlName","language",1,"form-select"],[3,"value"],[3,"isInvalid","passwordValue","passwordCanBeEmpty","FORM_PREFIX"],[1,"btn","btn-default","btn-primary",3,"click","dsBtnDisabled"]],template:function(_,p){1&_&&(e.nVh(0,B,59,41,"div",0),e.nI1(1,"async")),2&_&&e.vxM(e.bMT(1,1,p.registration$)?0:-1)},dependencies:[O.A,F.q,i.X1,i.qT,i.xH,i.y7,i.me,i.wz,i.BC,i.cb,i.j4,i.JD,u.h,t.Jj,u.D9],encapsulation:2}))}return l(),m})()}}]);
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.