1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[9593],{39593:(V,E,s)=>{s.r(E),s.d(E,{AddressbookProfileModule:()=>Va});var a=s(52805),m=s(72922),C=s(64852),g=s(74831),M=s(36818),w=s(79341),v=s(15859),L=s(47559),c=s(64177),e=s(14026);let J=(()=>{class n{transform(t,o="0000"){return"string"==typeof t?o.slice(t.length)+t:t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=e.Yjl({name:"addPadding",type:n,pure:!0}),n})(),N=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[c.ez]}),n})();var P=s(30450),Z=s(26694),d=s(49363),p=s(79903),u=s(3053),f=s(34070),O=s(26998),_=s(80919),S=s(98992),j=s(3999);function Ze({width:n,height:i}){return{h:i,w:n}}var te=s(97482),ue=s(54074),fe=s(62899),we=s(16516),T=s(64683);const z="profilePictureEdit";let b=(()=>{class n{constructor(){this.height=90,this.modelChange=new e.vpe,this.query={category:"profile-pic"},this.width=90,this.cdr=(0,e.f3M)(e.sBO),this.tr=(0,e.f3M)(ue.D)}ngOnChanges(t){t.model&&(this.sources=this.regenerateSources())}onSrcClick(t){var o;((o=this.model).preferences??(o.preferences={})).profile_picture_src=t,this.sources=this.regenerateSources(),this.modelChange.emit(this.model),this.tgProfilePicture.forceRefresh(),this.cdr.markForCheck()}onUploaded(t){this.model.local_picture_url=function _e(n,i){const{fd_sizes:t,image_data:o}=n,l=o??{},r=t?Object.values(t).map(Ze):[];return r.push({h:l.height??i.height,root:!0,w:l.width??i.width}),{sizes:r,url:n.url}}(t,{fit:"Center",height:90,width:90}),this.onSrcClick("local")}regenerateSources(){const t=[];return this.model.local_picture_url&&t.push({label:this.tr.translate("local",z),ty:"local",url:`${this.model.local_picture_url.url}?max_width=90`}),this.model.linkedin_local_picture_url?t.push({label:"LinkedIn",ty:"linkedin",url:`${this.model.linkedin_local_picture_url.url}?max_width=90`}):this.model.linkedin_picture_url&&t.push({label:"LinkedIn",ty:"linkedin",url:this.model.linkedin_picture_url}),this.model.twitter_profile_image_url&&t.push({label:"X",ty:"twitter",url:this.model.twitter_profile_image_url}),t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-user-profile-picture-edit"]],viewQuery:function(t,o){if(1&t&&e.Gf(fe.Y,5),2&t){let l;e.iGM(l=e.CRH())&&(o.tgProfilePicture=l.first)}},inputs:{height:"height",model:"model",width:"width"},outputs:{modelChange:"modelChange"},standalone:!0,features:[e._Bn([],[{provide:te.z,useValue:z}]),e.TTD,e.jDz],decls:4,vars:11,consts:[[3,"height","width","query","pictureLabel","popoverTitle","sources","sourceClick","uploaded"],[1,"media-object","dyn-sized",3,"tg-profile-picture"]],template:function(t,o){1&t&&(e.TgZ(0,"tg-profile-picture-edit-shell",0),e.NdJ("sourceClick",function(r){return o.onSrcClick(r.ty)})("uploaded",function(r){return o.onUploaded(r)}),e.ALo(1,"tr"),e.ALo(2,"tr"),e._UZ(3,"img",1),e.qZA()),2&t&&(e.Q6J("height",o.height)("width",o.width)("query",o.query)("pictureLabel",e.lcZ(1,7,"addPhoto"))("popoverTitle",e.lcZ(2,9,"title"))("sources",o.sources),e.xp6(3),e.Q6J("tg-profile-picture",o.model))},dependencies:[v.GlobalModule,T.H,we._,fe.Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),n})();var Q=s(74449),h=s(59718),B=s(97076),H=s(33345),Ae=s(54855),ne=s(60611),It=s(95877),Ot=s(56195),Zt=s(676),wt=s(86458),At=s(80733),Fe=s(8239),Ke=s(4962),Te=s(50245),Pe=s(19807),Ue=s(45178),x=s(74174),G=s(17639),Re=s(43632),ee=s(47528),oe=s(81018),F=s(43075),Ce=s(64762),ie=s(662),bt=s(10174),be=s(5296),Et=s(9803),Ee=s(25336),Be=s(56625),me=s(50725),he=s(3811),ve=s(85597),Jt=s(48e3),Nt=s(69260),D=s(85868),q=s(4678),kt=s(12934),Qt=s(47740);function Lt(n,i){if(1&n&&e._UZ(0,"i",3),2&n){const t=e.oxw(2);e.Q6J("ngClass","fa-"+t.icon)}}function St(n,i){if(1&n&&(e.ynx(0),e.YNc(1,Lt,1,1,"i",2),e.TgZ(2,"span"),e._uU(3,"\xa0"),e.qZA(),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.icon)}}function Yt(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.heading)}}function Ft(n,i){if(1&n&&(e.TgZ(0,"tg-tag",9),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(4);e.Q6J("colour",o.labelColour),e.xp6(1),e.Oqu(t)}}function Kt(n,i){if(1&n&&e.YNc(0,Ft,2,2,"tg-tag",8),2&n){const t=e.oxw().index,o=e.oxw(2);e.Q6J("ngForOf",o.intersectedProps[t])}}function Rt(n,i){if(1&n&&(e.TgZ(0,"tg-user-profile",6),e.YNc(1,Kt,1,1,"ng-template",7),e.qZA()),2&n){const t=i.$implicit,o=i.index,l=e.oxw(2);e.Q6J("enableTags",!1)("user",t),e.xp6(1),e.Q6J("ngIf",l.intersectedProps[o])}}function Bt(n,i){if(1&n&&(e.TgZ(0,"div",4),e.YNc(1,Rt,2,3,"tg-user-profile",5),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.users)}}let Gt=(()=>{class n{constructor(){this.intersectedProps=[],this.labelColour="info"}ngOnInit(){if(this.intersectEachUserProp&&this.intersectWithUser&&this.intersectWithUserProp&&this.users.length){const t=this.intersectWithUser[this.intersectWithUserProp];for(let o=0;o<this.users.length;o++)this.intersectedProps[o]=(0,Nt.Z)(t,this.users[o][this.intersectEachUserProp]).slice(0,3)}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-horizontal-user-highlight"]],inputs:{heading:"heading",icon:"icon",intersectEachUserProp:"intersectEachUserProp",intersectWithUser:"intersectWithUser",intersectWithUserProp:"intersectWithUserProp",users:"users"},decls:6,vars:3,consts:[[4,"ngIf"],["class","row",4,"ngIf"],["class","fa",3,"ngClass",4,"ngIf"],[1,"fa",3,"ngClass"],[1,"row"],["class","col-md-4 col-xs-12",3,"enableTags","user",4,"ngFor","ngForOf"],[1,"col-md-4","col-xs-12",3,"enableTags","user"],[3,"ngIf"],[3,"colour",4,"ngFor","ngForOf"],[3,"colour"]],template:function(t,o){1&t&&(e.TgZ(0,"tg-panel")(1,"tg-panel-heading"),e.YNc(2,St,4,1,"ng-container",0),e.YNc(3,Yt,2,1,"span",0),e.qZA(),e.TgZ(4,"tg-panel-body"),e.YNc(5,Bt,2,1,"div",1),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",o.icon),e.xp6(1),e.Q6J("ngIf",o.heading),e.xp6(2),e.Q6J("ngIf",null==o.users?null:o.users.length))},dependencies:[c.mk,c.sg,c.O5,D.G,q.jl,q.Av,q.Nk,kt.s,Qt.B],styles:["tg-tag[_ngcontent-%COMP%]{display:inline-block}"],changeDetection:0}),n})();var Ge=s(40921),Wt=s(23055),jt=s(26454),We=s(94e3),Ht=s(69962),je=s(71050),$t=s(88079),He=s(92706),Vt=s(9004),le=s(89969),$e=s(14289),Je=s(83375);let W=(()=>{class n{constructor(t){this.showSvc=t}resolveLockText(t){switch(this.showSvc.parseUserOption(t)){case 0:return n.OWNER_TOOLTIP;case"site-admin":return n.ADMIN_TOOLTIP}}}return n.ADMIN_TOOLTIP="adminOnlyTT",n.OWNER_TOOLTIP="ownerOnlyTT",n.\u0275fac=function(t){return new(t||n)(e.LFG(oe.Z))},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac}),n})();var Ve=s(41958),ze=s(49120),zt=s(26599),X=s(10218),A=s(5830),$=s(50339),qe=s(92341),Xe=s(36635);function qt(n,i){if(1&n&&(e._UZ(0,"i",3),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Xt(n,i){if(1&n&&(e.ynx(0),e.YNc(1,qt,2,3,"i",1),e._UZ(2,"i",2),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"tr"),e.qZA(),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("ngClass",t.icon),e.xp6(2),e.hij(" ",e.xi3(5,3,t.label,"user"),"")}}const en=[[["","panel-head",""]],"*"],tn=["[panel-head]","*"];let De=(()=>{class n{constructor(){this.icon="fa-users"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-templated-panel"]],inputs:{icon:"icon",label:"label",lockText:"lockText"},ngContentSelectors:tn,decls:6,vars:1,consts:[[4,"ngIf"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa",3,"ngClass"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"]],template:function(t,o){1&t&&(e.F$t(en),e.TgZ(0,"tg-panel")(1,"tg-panel-heading"),e.YNc(2,Xt,6,6,"ng-container",0),e.Hsn(3),e.qZA(),e.TgZ(4,"tg-panel-body"),e.Hsn(5,1),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",o.label))},dependencies:[c.mk,c.O5,D.G,A.K,q.jl,q.Av,q.Nk,g.i9,T.H],encapsulation:2,changeDetection:0}),n})();
1function nn(n,i){if(1&n&&(e._UZ(0,"i",10),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function on(n,i){if(1&n&&e._UZ(0,"tg-wysiwyg-viewer",11)(1,"hr"),2&n){const t=e.oxw(2);e.Q6J("content",t.note.text)}}function ln(n,i){if(1&n&&e._UZ(0,"tg-wysiwyg-editor",14),2&n){const t=e.oxw(3);e.Q6J("formControl",t.ctrl)("cfg",t.wysiwygParams)}}function sn(n,i){1&n&&(e.TgZ(0,"p",15),e._UZ(1,"i",16)(2,"span",17),e.qZA(),e._UZ(3,"hr")),2&n&&(e.xp6(2),e.Q6J("translate","quickNotesDeletionWarning"))}function an(n,i){if(1&n&&(e.YNc(0,ln,1,2,"tg-wysiwyg-editor",12),e.YNc(1,sn,4,1,"ng-template",13)),2&n){const t=e.oxw(2);e.Q6J("ngIf",t.editing),e.xp6(1),e.Q6J("ngIf",t.shouldShowDeleteWarning())}}function rn(n,i){if(1&n&&(e.TgZ(0,"span",18),e._uU(1),e.ALo(2,"tr"),e.ALo(3,"date"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE("",e.lcZ(2,2,"lastUpdated")," ",e.xi3(3,4,t.note.updatedAt,"short"),"")}}function cn(n,i){if(1&n&&(e.TgZ(0,"tg-dup-templated-panel"),e.ynx(1,1),e.YNc(2,nn,2,3,"i",2),e._UZ(3,"i",3)(4,"span",4),e.BQk(),e.YNc(5,on,2,1,"ng-template",null,5,e.W1O),e.YNc(7,an,2,2,"ng-template",6),e.TgZ(8,"div",7),e._UZ(9,"a",8),e.YNc(10,rn,4,7,"span",9),e.qZA()()),2&n){const t=e.MAs(6),o=e.oxw();e.xp6(2),e.Q6J("ngIf",o.lockText),e.xp6(2),e.Q6J("translate","notes"),e.xp6(3),e.Q6J("ngIf",o.editing)("ngIfElse",t),e.xp6(2),e.Q6J("uiSref","management.user.notes")("uiParams",o.mgmtUiParams)("translate","quickNotesOther")("tr-placeholders",o.mgmtI18nPlaceholder),e.xp6(1),e.Q6J("ngIf",o.note)}}let et=(()=>{class n{constructor(t,o,l,r,U,I,Y){this.noteRes=t,this.profileSvc=l,this.profileCfg=r,this.user=U,this.loggedInUser=I,this.cdr=Y,this.ctrl=o.control(null)}get dirty(){return this.ctrl.dirty}ngOnChanges({editing:t}){!t||!this.editing||this.ctrl.reset(this.note?.text||null,{emitEvent:!1})}ngOnDestroy(){this._destroyed=!0,this._sub?.unsubscribe()}ngOnInit(){const{firstname:t,id:o,lastname:l}=this.user;this.wysiwygParams={toolbarSticky:!1},this.mgmtUiParams={userId:o},this.mgmtI18nPlaceholder={u:`${t} ${l}`};const{lock:r,field:U}=this.profileCfg.quick_notes;!1!==r&&(this.lockText=this.profileSvc.resolveLockText(U)),this.fetch()}save(){const t=this.ctrl.value;return this.isNewNote()?t?this.create(t):Ve.E:t?this.update(t):this.rm()}shouldShowDeleteWarning(){return this.editing&&Boolean(this.note)&&!this.ctrl.value&&this.dirty}create(t){return this.noteRes.create({admin:this.loggedInUser.id,text:t,type:"Quick Note",user:this.user.id}).pipe((0,le.b)(l=>{this.setNote(l),this.cdr.markForCheck()}))}fetch(){this._destroyed||(this._sub?.unsubscribe(),this._sub=this.noteRes.query({params:{limit:1,type:"Quick Note",user:this.user.id}}).pipe((0,me.U)(t=>t[0])).subscribe((0,ie.e)(t=>{this._sub=void 0,this.setNote(t),this.cdr.markForCheck()})))}isNewNote(){return!this.note}rm(){return(0,ze.P)(()=>this.noteRes.delete(this.note.id)).pipe((0,le.b)(()=>{this.fetch()}))}setNote(t){this.note=t,t?.text&&this.editing&&this.ctrl.reset(t.text,{emitEvent:!1})}update(t){return(0,ze.P)(()=>this.noteRes.update({id:this.note.id,text:t})).pipe((0,le.b)(o=>{this.setNote(o),this.cdr.markForCheck()}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(zt.u),e.Y36(a.QS),e.Y36(W),e.Y36(x.Hj),e.Y36(F.ADDRESSBOOK_PROFILE_USER),e.Y36(x.Ej),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-quick-notes"]],inputs:{editing:"editing"},features:[e.TTD],decls:1,vars:1,consts:[[4,"ngIf"],["panel-head",""],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","m","fa-sticky-note-o"],[1,"m",3,"translate"],["tplNotEditing",""],[3,"ngIf","ngIfElse"],[1,"footer"],[1,"pull-left",3,"uiSref","uiParams","translate","tr-placeholders"],["class","pull-right",4,"ngIf"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[3,"content"],[3,"formControl","cfg",4,"ngIf"],[3,"ngIf"],[3,"formControl","cfg"],[1,"text-info"],[1,"fa","fa-fw","fa-info-circle"],[3,"translate"],[1,"pull-right"]],template:function(t,o){1&t&&e.YNc(0,cn,11,9,"tg-dup-templated-panel",0),2&t&&e.Q6J("ngIf",o.note||o.editing)},dependencies:[c.O5,D.G,X.P,A.K,$.k,m.UISref,m.AnchorUISref,a.JJ,a.oH,qe.Z,Xe.n,g.i9,De,c.uU,T.H],styles:["hr[_ng
1content-%COMP%]{margin-bottom:5px}.text-info[_ngcontent-%COMP%], hr[_ngcontent-%COMP%]{margin-top:10px}.footer[_ngcontent-%COMP%]{padding:5px}"],changeDetection:0}),n})();var dn=s(75263),tt=s(22009),nt=s(92194);let Ne=(()=>{class n{constructor(){this.editing=!1}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=e.lG2({type:n,inputs:{editing:"editing"}}),n})();var pn=s(43061),ot=s(75143),gn=s(49037),_n=s(39473),y=s(3814),ye=s(62441),un=s(71883),fn=s(27527),mn=s(28905);function hn(n,i){1&n&&(e.TgZ(0,"a",5),e.ALo(1,"tr"),e._UZ(2,"i",6)(3,"span",7),e.qZA()),2&n&&(e.Q6J("tooltip",e.lcZ(1,2,"noLoginAsPublic")),e.xp6(3),e.Q6J("translate","logAs"))}function xn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.save$.emit())}),e._UZ(1,"i",9)(2,"span",10),e.qZA(),e.TgZ(3,"button",11),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.editingState$.emit(!1))}),e._UZ(4,"i",12)(5,"span",13),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("disabled",t.disabled),e.xp6(3),e.Q6J("disabled",t.disabled)}}const Tn=function(n){return[n]},Pn=function(n){return{ids:n}};function Un(n,i){if(1&n&&(e.TgZ(0,"li",27)(1,"a",32),e._UZ(2,"i",33)(3,"span",30),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(1),e.Q6J("uiSref","admin.emailcampaigns.create")("uiParams",e.VKq(5,Pn,e.VKq(3,Tn,t.user.id))),e.xp6(2),e.Q6J("translate","emailUser")}}function Cn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"li",27)(1,"a",28),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.invite())}),e._UZ(2,"i",34)(3,"span",35),e.qZA()(),e.TgZ(4,"li",27)(5,"a",28),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4),r=e.MAs(6);return e.KtG(l.loginToken(r))}),e._UZ(6,"i",36)(7,"span",37),e.qZA()()}}function vn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"li",27)(1,"a",28),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.extendMembership())}),e._UZ(2,"i",38)(3,"span",39),e.qZA()()}}function Dn(n,i){if(1&n&&(e.TgZ(0,"a",44),e._UZ(1,"i",45)(2,"span",30),e.qZA()),2&n){const t=e.oxw(5);e.Q6J("href",t.loginAsHref,e.LSH),e.xp6(2),e.Q6J("translate","logAs")}}function yn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"li",27),e.YNc(1,Dn,3,2,"a",40),e.qZA(),e.TgZ(2,"li",41),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.softDeleteUser())}),e.TgZ(3,"a",42),e._UZ(4,"i",43)(5,"span",30),e.qZA()()}if(2&n){const t=e.oxw(4),o=e.MAs(1);e.xp6(1),e.Q6J("ngIf",t.loginAsHref)("ngIfElse",o),e.xp6(4),e.Q6J("translate","softDelete")}}function Mn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"ul",25),e.YNc(1,Un,4,7,"li",26),e.TgZ(2,"li",27)(3,"a",28),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3),r=e.MAs(8);return e.KtG(l.generatePasswordRecoveryToken(r))}),e._UZ(4,"i",29)(5,"span",30),e.qZA()(),e.YNc(6,Cn,8,0,"ng-template",31),e.YNc(7,vn,4,0,"li",26),e.YNc(8,yn,6,3,"ng-template",31),e.qZA()}if(2&n){e.oxw();const t=e.MAs(1),o=e.MAs(3),l=e.oxw(2);e.Q6J("id",t),e.uIk("aria-labelledby",o),e.xp6(1),e.Q6J("ngIf",l.enableEmails),e.xp6(4),e.Q6J("translate","generatePasswordRecoveryToken"),e.xp6(1),e.Q6J("ngIf",!l.hasSignedUp),e.xp6(1),e.Q6J("ngIf",!l.editing&&l.enableManualMembershipExtend),e.xp6(1),e.Q6J("ngIf",!l.own)}}function In(n,i){if(1&n&&(e.TgZ(0,"div",19,20)(2,"button",21,22),e.ALo(4,"tr"),e._UZ(5,"i",23),e.qZA(),e.YNc(6,Mn,9,7,"ul",24),e.qZA()),2&n){const t=e.MAs(1);e.Q6J("autoId",!1),e.xp6(2),e.Q6J("autoId",!0)("tooltip",e.lcZ(4,4,"adminOps")),e.uIk("aria-controls",t)}}const On=function(n){return{userId:n}};function Zn(n,i){if(1&n){const t=e.EpF();e.YNc(0,In,7,6,"div",14),e.TgZ(1,"a",15),e.ALo(2,"tr"),e._UZ(3,"i",16),e.qZA(),e.TgZ(4,"button",17),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.editingState$.emit(!0))}),e.ALo(5,"tr"),e._UZ(6,"i",18),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngIf",t.adminMode&&(!t.hasSignedUp||!t.own)),e.xp6(1),e.Q6J("disabled",t.disabled||t.disableEditBtn)("tooltip",e.lcZ(2,6,"mgmtPanel"))("uiParams",e.VKq(10,On,t.user.id)),e.xp6(3),e.Q6J("disabled",t.disabled||t.disableEditBtn)("tooltip",e.lcZ(5,8,"edit"))}}function wn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-modal-header",46),e.NdJ("hide",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.loginTokenModalRef.hide())}),e._uU(1),e.ALo(2,"tr"),e.qZA(),e.TgZ(3,"div",47)(4,"div",48),e._UZ(5,"input",49,50),e.TgZ(7,"div",51),e._UZ(8,"button",52),e.qZA()()()}if(2&n){const t=e.MAs(6),o=e.oxw();
1e.xp6(1),e.Oqu(e.lcZ(2,3,"loginTokenModalHead")),e.xp6(4),e.Q6J("value",o.loginTokenUrl(o.user.login_token)),e.xp6(3),e.Q6J("ngxClipboard",t)}}function An(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-modal-header",46),e.NdJ("hide",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.generatePasswordRecoveryTokenModalRef.hide())}),e._uU(1),e.ALo(2,"tr"),e.qZA(),e.TgZ(3,"div",47)(4,"div",48),e._UZ(5,"input",49,53),e.TgZ(7,"div",51),e._UZ(8,"button",52),e.qZA()()()}if(2&n){const t=e.MAs(6),o=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,3,"generatePasswordRecoveryTokenModalHead")),e.xp6(4),e.Q6J("value",o.passwordRecoveryTokenURL),e.xp6(3),e.Q6J("ngxClipboard",t)}}const Me="user";let bn=(()=>{class n extends Ne{constructor(t,o,l,r,U,I,Y,de,pe,ge,Ye){super(),this.uRes=l,this.routing=U,this.alert=I,this.tgModal=Y,this.uSvc=de,this.mod=pe,this.manualExtendSvc=ge,this.cdr=Ye,this.enableEmails=r.emailUser.profile,this.enableManualMembershipExtend=t.enable&&o.users.showProfileManagementPage,this.editingState$=new e.vpe,this.save$=new e.vpe,this.userChange=new e.vpe,this._sbj=[this.editingState$,this.save$,this.userChange]}extendMembership(){this.manualExtendSvc.openUserModal(this.user).then(t=>{this.onMembershipExtended(t)}).catch(je.Z)}generatePasswordRecoveryToken(t){let o;o=this.passwordRecoveryToken?(0,Ee.of)(null):this.uRes.passwordRecoveryToken({userId:this.user.id}).pipe((0,le.b)(l=>{this.passwordRecoveryToken=l,this.passwordRecoveryTokenURL=this.generatePasswordRecoveryTokenURL(l.token),this.cdr.markForCheck()})),o.pipe((0,ve.R)(this.save$.pipe((0,Be.Z)(null,null)))).subscribe((0,ie.e)(()=>{this.generatePasswordRecoveryTokenModalRef=this.mod.show(t,{animated:!0})}))}generatePasswordRecoveryTokenURL(t){const o=location;return`${o.protocol}//${o.host}/passwordrecovery/change/${t}`}invite(){const t={u:this.user.fullName};this.tgModal.confirmTranslated("confirmInvite",Me,t).pipe((0,he.w)(()=>this.user.invite())).subscribe({error:()=>{this.alert.alertError({key:"userInviteFail",ns:Me,placeholders:t})},next:()=>{this.alert.alertSuccess({key:"userInvited",ns:Me,placeholders:t})}})}loginToken(t){this.loginTokenModalRef=this.mod.show(t,{animated:!0})}loginTokenUrl(t){const o=location;return`${o.protocol}//${o.host}/api/v1/auth/hash/${t}`}ngOnChanges(t){"user"in t&&(this.hasSignedUp=this.user.hasSignedUp,this.own||(this.loginAsHref=this.user.hasRoles("public")?void 0:`/api/v1/auth/logas/${this.user.id}`))}ngOnDestroy(){this._sbj&&(0,Je.completeAll)(...this._sbj)}softDeleteUser(){this.uSvc.softDeleteUser(this.user).pipe((0,he.w)(()=>this.routing.goHome())).subscribe(nt.V)}onMembershipExtended(t){const o=Object.keys(t).reduce((l,r)=>(r.startsWith("membership_")&&(l[r]=t[r]),l),{});this.userChange.emit(this.uRes.instantiate({...this.user.$value,...o})),this.cdr.markForCheck()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.q),e.Y36(x.w5),e.Y36(ee.q),e.Y36(x.zP),e.Y36(ne.Z),e.Y36(Pe.c),e.Y36(pn.U),e.Y36(ot.KD),e.Y36(gn.tT),e.Y36(_n.n),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dp-top-menu"]],inputs:{adminMode:"adminMode",disableEditBtn:"disableEditBtn",disabled:"disabled",own:"own",user:"user"},outputs:{editingState$:"editingStateChanged",save$:"save",userChange:"userChange"},features:[e._Bn([{provide:te.z,useValue:Me}]),e.qOj,e.TTD],decls:9,vars:2,consts:[["tplLogAsPublic",""],[3,"ngIf","ngIfElse"],["notEditing",""],["loginTokenModal",""],["generatePasswordRecoveryTokenModal",""],["href","#",1,"dropdown-item",3,"tooltip"],[1,"text-muted","fa","fa-fw","fa-sign-in"],[1,"text-muted",3,"translate"],["type","button",1,"btn","btn-primary","sp-right",3,"disabled","click"],[1,"fa","fa-floppy-o","fa-fw"],["translate","save"],["type","button",1,"btn","btn-default",3,"disabled","click"],[1,"fa","fa-fw","fa-undo"],["translate","discardChanges"],["class","btn-group sp-right","dropdown","",3,"autoId",4,"ngIf"],["type","button","uiSref","management.user.loginsecurity",1,"btn","btn-default","sp-right",3,"disabled","tooltip","uiParams"],[1,"fa","fa-fw","fa-cog"],["type","button",1,"btn","btn-default",3,"disabled","tooltip","click"],[1,"fa","fa-fw","fa-pencil"],["dropdown","",1,"btn-group","sp-right",3,"autoId"],["adminDropdownId","id"],["type","button","dropdownToggle","",1,"btn","btn-default",3,"autoId","tooltip"],["adminOpsBtnId","id"],[1,"fa","fa-fw","fa-wrench"],["class","dropdown-menu dropdown-menu-right","role","menu",3,"id",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right",3,"id"],["role","menuitem",4,"ngIf"],["role","menuitem"],["href","#",1,"dropdown-item",3,"click"],[1,"fa","fa-fw","fa-key"],[3,"translate"],[3,"ngIf"],[1,"dropdown-item",3,"uiSref","uiParams"],[1,"fa","fa-envelope-o","fa-fw"],[1,"fa","fa-fw","fa-paper-plane-o"],["translate","invite"],[1,"fa","fa-fw","fa-asterisk"],["translate","genToken"],[1,"fa","fa-fw","fa-id-card-o"],["translate","updateMembership"],["class","dropdown-item","target","_self",3,"href",4,"ngIf","ngIfElse"],["role","menuitem",3,"click"],["href","#",1,"dropdown-item"],[1,"fa","fa-fw","fa-tras
1h-o"],["target","_self",1,"dropdown-item",3,"href"],[1,"fa","fa-fw","fa-sign-in"],[3,"hide"],[1,"modal-body"],[1,"input-group"],["type","text","readonly","",1,"form-control",3,"value"],["loginTokenInp",""],[1,"input-group-btn"],["tgCopy","","tooltip","",1,"btn-default",3,"ngxClipboard"],["generatePasswordRecoveryTokenInp",""]],template:function(t,o){if(1&t&&(e.YNc(0,hn,4,4,"ng-template",null,0,e.W1O),e.YNc(2,xn,6,2,"ng-template",1),e.YNc(3,Zn,7,12,"ng-template",null,2,e.W1O),e.YNc(5,wn,9,5,"ng-template",null,3,e.W1O),e.YNc(7,An,9,5,"ng-template",null,4,e.W1O)),2&t){const l=e.MAs(4);e.xp6(2),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,D.G,X.P,A.K,y.u0,y.k6,ye.h,un.m,$.k,m.UISref,m.AnchorUISref,C.Hz,C.Mq,C.TO,fn.R,mn.ClipboardDirective,u.CopyButtonComponent,g.i9,T.H],styles:["[_nghost-%COMP%]{display:block;text-align:right}.sp-right[_ngcontent-%COMP%]{margin-right:3.33px}"],changeDetection:0}),n})(),it=(()=>{class n{constructor(){this.loggedInUser=(0,e.f3M)(x.Ej),this.iAmAdmin=Boolean(this.loggedInUser?.isSiteAdmin),this.profileCfg=(0,e.f3M)(x.Hj),this.articlesEnabled=(0,e.f3M)(x.pj).enable,this.own=Boolean(this.loggedInUser)&&(0,e.f3M)(F.ADDRESSBOOK_PROFILE_USER).id===this.loggedInUser.id}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=e.lG2({type:n,inputs:{editable:"editable",editing:"editing",model:"model",user:"user"}}),n})();function En(n,i){if(1&n&&e._UZ(0,"tg-dup-profile-picture",6),2&n){const t=e.oxw();e.Q6J("showProfilePicture",t.showProfilePicture)("model",t.model)("editing",t.editing)}}function Jn(n,i){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"i",7),e.ALo(2,"tr"),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"tr"),e.qZA(),e._UZ(6,"time",8),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("tooltip",e.lcZ(2,3,"adminOnlyTT")),e.xp6(3),e.hij("",e.lcZ(5,5,"lastLogin"),": "),e.xp6(2),e.Q6J("tgMomentAgo",t.model.last_login_at)}}function Nn(n,i){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"i",7),e.ALo(2,"tr"),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"tr"),e.ALo(6,"date"),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("tooltip",e.lcZ(2,3,"adminOnlyTT")),e.xp6(3),e.AsE("",e.lcZ(5,5,"invited"),": ",e.xi3(6,7,t.model.last_invite_at,"mediumDate"),"")}}function kn(n,i){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"i",7),e.ALo(2,"tr"),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"tr"),e.ALo(6,"date"),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("tooltip",e.lcZ(2,3,"adminOnlyTT")),e.xp6(3),e.AsE("",e.lcZ(5,5,"signedUp"),": ",e.xi3(6,7,t.model.signup_at,"mediumDate"),"")}}function Qn(n,i){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"i",9),e.TgZ(2,"span"),e._UZ(3,"a",10),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.Q6J("uiSref","article.list")("uiParams",t.articleUiParams)("translate",t.own?"myArticles":"userArticles")}}let lt=(()=>{class n extends it{constructor(){super();const{end:t,start:o}=this.profileCfg.year;this.yearEnabled=t||o}ngOnChanges(t){"user"in t&&(this.articleUiParams={user:this.user.id},this.hasPhoto=["local_picture_url","linkedin_local_picture_url","linkedin_picture_url","twitter_profile_image_url"].some(this.propTruthy,this)),("user"in t||"editing"in t||"editable"in t)&&(this.showProfilePicture=!this.editing&&(this.editable||this.hasPhoto)),"editing"in t&&(this.isAdminNonEditMode=this.iAmAdmin&&!this.editing)}propTruthy(t){return Boolean(this.model[t])}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-personal"]],features:[e.qOj,e.TTD],decls:9,vars:12,consts:[[1,"panel","panel-default","nmb"],[1,"panel-body"],[3,"showProfilePicture","model","editing",4,"ngIf"],[3,"own","editing","model"],[4,"ngIf"],["dpList","",3,"editable","editing","model","user"],[3,"showProfilePicture","model","editing"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[3,"tgMomentAgo"],[1,"fa","fa-newspaper-o"],[3,"uiSref","uiParams","translate"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,En,1,3,"tg-dup-profile-picture",2),e._UZ(3,"tg-dup-title-names",3),e.YNc(4,Jn,7,7,"div",4),e.YNc(5,Nn,7,10,"div",4),e.YNc(6,kn,7,10,"div",4),e.YNc(7,Qn,4,3,"div",4),e.qZA()(),e._UZ(8,"ul",5)),2&t&&(e.xp6(2),e.Q6J("ngIf",o.editing||o.yearEnabled||o.showProfilePicture),e.xp6(1),e.Q6J("own",o.own)("editing",o.editing)("model",o.model),e.xp6(1),e.Q6J("ngIf",o.isAdminNonEditMode&&o.model.last_login_at),e.xp6(1),e.Q6J("ngIf",o.isAdminNonEditMode&&o.model.last_invite_at),e.xp6(1),e.Q6J("ngIf",o.isAdminNonEditMode&&o.model.signup_at),e.xp6(1),e.Q6J("ngIf",!o.editing&&!0===o.profileCfg.my_articles&&o.articlesEnabled),e.xp6(1),e.Q6J("editable",o.editable)("editing",o.editing)("model",o.model)("user",o.user))},styles:["[_nghost-%COMP%]{display:block}tg-dup-title-names[_ngcontent-%COMP%]{display:block;margin-top:.5em;overflow-wrap:anywhere;word-break:normal}.nmb[_ngcontent-%COMP%]{border-bottom:none;margin-bottom:0}"],changeDetection:0}),n})();var st=s(92362),at=s(84773),rt=s(49731);let ke=(()=>{class n extends rt.TemplateContainer{}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275dir=e.lG2({type:n,selectors:[["","if-editing",""]],features:[e.qOj]}),n})(),Qe=(()=>{class n extends rt.TemplateContainer{}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275dir=e.lG2({type:n,selectors:[["","if-not-editing",""]],features:[e.qOj]}),n})();function Ln(n,i){1&n&&(e.TgZ(0,"div",6),e._uU(1,"*if-editing or *if-not-editing template missing."),e.qZA())}
1function Sn(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"tr"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",e.xi3(2,1,t.absentPublicKey,t.noDataPlaceholder),".")}}function Yn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"p"),e._uU(1),e.ALo(2,"tr"),e.qZA(),e.TgZ(3,"button",8),e.NdJ("click.passive",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.onEditingChange(!0))}),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.hij("",e.lcZ(2,2,t.absentUserKey),"\u2026"),e.xp6(2),e.Q6J("translate","add1Now")}}function Fn(n,i){if(1&n&&(e.TgZ(0,"div",7),e.YNc(1,Yn,4,4,"ng-template",5),e.qZA()),2&n){const t=e.oxw(),o=e.MAs(3);e.xp6(1),e.Q6J("ngIf",t.own)("ngIfElse",o)}}function Kn(n,i){if(1&n&&e.GkF(0,10),2&n){const t=e.oxw(3);e.Q6J("ngTemplateOutlet",t.ifNotEditingTpl.template)}}function Rn(n,i){if(1&n&&e.YNc(0,Kn,1,1,"ng-container",9),2&n){const t=e.oxw(2),o=e.MAs(1);e.Q6J("ngIf",t.ifNotEditingTpl)("ngIfElse",o)}}function Bn(n,i){if(1&n&&e.YNc(0,Rn,1,2,"ng-template",5),2&n){const t=e.oxw(),o=e.MAs(5);e.Q6J("ngIf",t.hasData)("ngIfElse",o)}}function Gn(n,i){if(1&n&&(e._UZ(0,"i",11),e.ALo(1,"tr")),2&n){const t=e.oxw();e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Wn(n,i){if(1&n&&e.GkF(0,10),2&n){const t=e.oxw(2);e.Q6J("ngTemplateOutlet",t.ifEditingTpl.template)}}function jn(n,i){if(1&n&&e.YNc(0,Wn,1,1,"ng-container",9),2&n){const t=e.oxw(),o=e.MAs(1);e.Q6J("ngIf",t.ifEditingTpl)("ngIfElse",o)}}let ct=(()=>{class n extends Ne{constructor(t,o,l){super(),this.profileSvc=t,this.profileUser=o,this.loggedInUser=l,this.editingChange=new e.vpe}ngOnChanges(t){if("profileField"in t){const{field:o,lock:l}=this.profileField;this.lockText=!1===l?void 0:this.profileSvc.resolveLockText(o)}}ngOnDestroy(){this.editingChange.complete()}ngOnInit(){this.noDataPlaceholder={u:this.profileUser.fullName},this.own=this.loggedInUser?.id===this.profileUser.id}onEditingChange(t){this.editing=t,this.editingChange.emit(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(W),e.Y36(F.ADDRESSBOOK_PROFILE_USER),e.Y36(x.Ej))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-info-section"]],contentQueries:function(t,o,l){if(1&t&&(e.Suo(l,ke,5),e.Suo(l,Qe,5)),2&t){let r;e.iGM(r=e.CRH())&&(o.ifEditingTpl=r.first),e.iGM(r=e.CRH())&&(o.ifNotEditingTpl=r.first)}},inputs:{absentPublicKey:"absentPublicKey",absentUserKey:"absentUserKey",hasData:"hasData",headingKey:"headingKey",lockText:"lockText",profileField:"profileField"},outputs:{editingChange:"editingChange"},features:[e.qOj,e.TTD],decls:16,vars:6,consts:[["tplMisconfigured",""],["tplNoDataPublic",""],["tplNoData",""],["tplNotEditing",""],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[3,"ngIf","ngIfElse"],[1,"alert","alert-error"],[1,"text-center"],["type","button",1,"btn","btn-primary",3,"translate","click.passive"],[3,"ngTemplateOutlet",4,"ngIf","ngIfElse"],[3,"ngTemplateOutlet"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"]],template:function(t,o){if(1&t&&(e.YNc(0,Ln,2,0,"ng-template",null,0,e.W1O),e.YNc(2,Sn,3,4,"ng-template",null,1,e.W1O),e.YNc(4,Fn,2,2,"ng-template",null,2,e.W1O),e.YNc(6,Bn,1,2,"ng-template",null,3,e.W1O),e.TgZ(8,"tg-panel")(9,"tg-panel-heading"),e.YNc(10,Gn,2,3,"i",4),e.TgZ(11,"span"),e._uU(12),e.ALo(13,"tr"),e.qZA()(),e.TgZ(14,"tg-panel-body"),e.YNc(15,jn,1,2,"ng-template",5),e.qZA()()),2&t){const l=e.MAs(7);e.xp6(10),e.Q6J("ngIf",o.lockText),e.xp6(2),e.Oqu(e.lcZ(13,4,o.headingKey)),e.xp6(3),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,c.tP,D.G,X.P,A.K,q.jl,q.Av,q.Nk,tt.a,g.i9,T.H],encapsulation:2,changeDetection:0}),n})();const Hn=function(){return{toolbarSticky:!1}};function $n(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-wysiwyg-editor",3),e.NdJ("touched",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.onTouch())})("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.onChange(l))}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngModel",t.value)("cfg",e.DdM(2,Hn))}}function Vn(n,i){if(1&n&&e._UZ(0,"tg-wysiwyg-viewer",4),2&n){const t=e.oxw();e.Q6J("content",t.value)}}let zn=(()=>{class n extends st.k{constructor(t){super(),this.editingChange=new e.vpe,this.field=t.biography}get hasData(){return Boolean(this.value)}ngOnDestroy(){this.editingChange.complete()}onEditingChange(t){this.editing=t,this.editingChange.emit(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Hj))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-bio"]],inputs:{editing:"editing"},outputs:{editingChange:"editingChange"},features:[e._Bn([{multi:!0,provide:a.JU,useExisting:(0,e.Gpc)(()=>n)}]),e.qOj],decls:3,vars:6,consts:[[3,"absentPublicKey","absentUserKey","headingKey","editing","profileField","hasData","editingChange"],[3,"ngModel","cfg","touched","ngModelChange",4,"if-editing"],[3,"content",4,"if-not-editing"],[3,"ngModel","cfg","touched","ngModelChange"],[3,"content"]],template:function(t,o){1&t&&(e.TgZ(0,"tg-dup-info-section",0),e.NdJ("editingChange",function(r){return o.onEditingChange(r)}),e.YNc(1,$n,1,3,"tg-wysiwyg-editor",1),e.YNc(2,Vn,1,1,"tg-wysiwyg-viewer",2),e.qZA()),2&t&&e.Q6J("absentPublicKey","noBioPublic")("absentUserKey","noBioUser")("headingKey","bio")("editing",o.editing)("profileField",o.field)("hasData",o.hasData)},dependencies:[at.s,a.JJ,a.On,qe.Z,Xe.n,ct,ke,Qe],encapsulation:2,changeDetection:0}),n})();var qn=s(26495),Xn=s(6875),eo=s(88613),to=s(39011),no=s(27745),oo=s(37559),io=s(42943);function lo(n,i){1&n&&e._UZ(0,"tg-array-select-dropdown")}
1function so(n,i){if(1&n&&e._UZ(0,"tg-array-select-typeahead",6),2&n){const t=e.oxw(2);e.Q6J("placeholder",t.placeholder)}}function ao(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-help-block-container")(1,"tg-array-select",3),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.onChange(l))})("touched",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.onTouch())}),e.YNc(2,lo,1,0,"tg-array-select-dropdown",4),e.YNc(3,so,1,1,"tg-array-select-typeahead",5),e._UZ(4,"tg-array-select-well"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("pullFromMetadata",t.metaToken)("ngModel",t.value)("ngModelOptions",t.MODEL_OPTS),e.xp6(1),e.Q6J("ngIf",t.showDropdown),e.xp6(1),e.Q6J("ngIf",t.showTypeahead)}}function ro(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-array-select-well",7),e.NdJ("itemClick",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.search(l))}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("disabled",!0)("selection",t.value)("linkable",t.linkable)}}let co=(()=>{class n extends st.k{constructor(t,o,l){super(),this.profileSvc=t,this.profileCfg=o,this.routing=l,this.editingChange=new e.vpe,this.linkable=!0,this.value=[],this.showDropdown=this.showTypeahead=!0}get hasData(){return this.value.length>0}ngOnChanges(t){const o="key"in t;o&&(this.keyI18n=this.keyMetadata=this.keyProfileCfg=this.key),(o||"keyI18n"in t)&&(this.absentPublicKey=`${this.keyI18n}_none_public`,this.absentUserKey=`${this.keyI18n}_none_user`),(o||"keyMetadata"in t)&&(this.metaToken={interests:F.ADDRESSBOOK_PROFILE_INTERESTS,skills:F.ADDRESSBOOK_PROFILE_SKILLS}[this.keyMetadata]||this.keyMetadata),(o||"keyProfileCfg"in t)&&(this.lockText=this.resolveLockText())}onEditingChange(t){this.editing=t,this.editingChange.emit(t)}search(t){!this.linkable||this.routing.go("addressbook.home.list",{[this.key]:t}).catch(console.error)}writeValue(t){const o=Array.isArray(t)?t:[];o!==this.value&&(this.value=o,this.cdr.detectChanges())}resolveLockText(){if(!this.keyProfileCfg)return;const t=this.profileCfg[this.keyProfileCfg];if(!t||!1===t.lock)return;const o=this.profileSvc.resolveLockText(t.select),l=this.profileSvc.resolveLockText(t.typeahead);return l||o?o===W.OWNER_TOOLTIP||l===W.OWNER_TOOLTIP?W.OWNER_TOOLTIP:W.ADMIN_TOOLTIP:void 0}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(W),e.Y36(x.Hj),e.Y36(ne.Z))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-tag-list"]],inputs:{editing:"editing",key:"key",keyI18n:"keyI18n",keyMetadata:"keyMetadata",keyProfileCfg:"keyProfileCfg",linkable:"linkable",placeholder:"placeholder",showDropdown:"showDropdown",showTypeahead:"showTypeahead"},outputs:{editingChange:"editingChange"},features:[e._Bn([{multi:!0,provide:a.JU,useExisting:(0,e.Gpc)(()=>n)}]),e.qOj,e.TTD],decls:3,vars:6,consts:[[3,"absentPublicKey","absentUserKey","headingKey","editing","lockText","hasData","editingChange"],[4,"if-editing"],[3,"disabled","selection","linkable","itemClick",4,"if-not-editing"],[3,"pullFromMetadata","ngModel","ngModelOptions","ngModelChange","touched"],[4,"ngIf"],[3,"placeholder",4,"ngIf"],[3,"placeholder"],[3,"disabled","selection","linkable","itemClick"]],template:function(t,o){1&t&&(e.TgZ(0,"tg-dup-info-section",0),e.NdJ("editingChange",function(r){return o.onEditingChange(r)}),e.YNc(1,ao,5,5,"tg-help-block-container",1),e.YNc(2,ro,1,3,"tg-array-select-well",2),e.qZA()),2&t&&e.Q6J("absentPublicKey",o.absentPublicKey)("absentUserKey",o.absentUserKey)("headingKey",o.key)("editing",o.editing)("lockText",o.lockText)("hasData",o.hasData)},dependencies:[c.O5,at.s,qn.f,Xn.w,eo.g,to.T,no.w,oo.E,io.Z,a.JJ,a.On,ct,ke,Qe],encapsulation:2,changeDetection:0}),n})();var po=s(49142),go=s(78275);function _o(n,i){if(1&n&&(e.TgZ(0,"h4"),e._uU(1),e.qZA(),e._UZ(2,"hr")),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t)}}function uo(n,i){if(1&n&&(e.TgZ(0,"span",11),e._UZ(1,"i",12),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw(5);e.xp6(3),e.hij(" ",t.adminTxt,"")}}const dt=function(n){return{groupId:n}};function fo(n,i){if(1&n&&(e.TgZ(0,"a",8)(1,"span",9),e._uU(2),e.qZA(),e.YNc(3,uo,4,1,"span",10),e.qZA()),2&n){const t=i.$implicit;e.Q6J("uiParams",e.VKq(4,dt,t.id))("uiSref","groups.group"),e.xp6(2),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.isAdmin)}}
1function mo(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,_o,3,1,"ng-template",5),e.TgZ(2,"div",6),e.YNc(3,fo,4,6,"a",7),e.qZA()()),2&n){const t=i.$implicit,o=e.oxw(3);e.xp6(1),e.Q6J("ngIf","undefined"!==t),e.xp6(2),e.Q6J("ngForOf",o.groupedOrgs[t])}}function ho(n,i){if(1&n&&e.YNc(0,mo,4,2,"div",4),2&n){const t=e.oxw(2);e.Q6J("ngForOf",t.groupTypes)}}function xo(n,i){if(1&n&&(e.TgZ(0,"tg-dup-templated-panel",2),e.YNc(1,ho,1,1,"ng-template",3),e.qZA()),2&n){const t=e.oxw(),o=e.MAs(2);e.Q6J("label","groups"),e.xp6(1),e.Q6J("ngIf",t.showGroupsByType)("ngIfElse",o)}}function To(n,i){if(1&n&&(e.TgZ(0,"span",11),e._UZ(1,"i",12),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(3),e.hij(" ",t.adminTxt,"")}}function Po(n,i){if(1&n&&(e.TgZ(0,"a",8)(1,"span",9),e._uU(2),e.qZA(),e.YNc(3,To,4,1,"span",10),e.qZA()),2&n){const t=i.$implicit;e.Q6J("uiParams",e.VKq(4,dt,t.id))("uiSref","groups.group"),e.xp6(2),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.isAdmin)}}function Uo(n,i){if(1&n&&(e.TgZ(0,"div",6),e.YNc(1,Po,4,6,"a",7),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.groups)}}const pt=Symbol("transl");let gt=(()=>{class n{constructor(t,o,l){this.cdr=o,this.profileCfg=l,this.groupedOrgs={},this.showGroupsByType=!1,this.showGroupsPanel=!1,this[pt]=t}ngOnInit(){this.adminTxt=this[pt].translate($e.V.MANAGER,"group-role"),this.profileCfg.groups.enable&&(this.showGroupsPanel=!0,this.profileCfg.groups.classified&&go.y.getAllTypes().length>1&&(this.showGroupsByType=!0,this.groupedOrgs=(0,po.Z)(this.groups,"type"),this.groupTypes=Object.keys(this.groupedOrgs)))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(ue.D),e.Y36(e.sBO),e.Y36(x.Hj))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-groups"]],inputs:{groups:"groups"},decls:3,vars:1,consts:[[3,"label",4,"ngIf"],["showGroups",""],[3,"label"],[3,"ngIf","ngIfElse"],[4,"ngFor","ngForOf"],[3,"ngIf"],[1,"list-group"],["class","list-group-item",3,"uiParams","uiSref",4,"ngFor","ngForOf"],[1,"list-group-item",3,"uiParams","uiSref"],[1,"group-name"],["class","group-manager text-primary",4,"ngIf"],[1,"group-manager","text-primary"],[1,"fa","fa-info-circle"]],template:function(t,o){1&t&&(e.YNc(0,xo,2,3,"tg-dup-templated-panel",0),e.YNc(1,Uo,2,1,"ng-template",null,1,e.W1O)),2&t&&e.Q6J("ngIf",o.showGroupsPanel)},dependencies:[c.sg,c.O5,D.G,$.k,m.UISref,m.AnchorUISref,De],styles:[".list-group-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.list-group-item[_ngcontent-%COMP%] .group-name[_ngcontent-%COMP%]{word-break:break-all}.list-group-item[_ngcontent-%COMP%] .group-manager[_ngcontent-%COMP%]{flex:0 0 auto}.list-group[_ngcontent-%COMP%]{margin-bottom:25px}tg-dup-templated-panel[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0}tg-dup-templated-panel[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{margin-bottom:10px;margin-top:10px}"],changeDetection:0}),n})();var Co=s(8713);let vo=(()=>{class n extends gt{constructor(){super(...arguments),this.groupsChange=new e.vpe,this.invitationsChange=new e.vpe}ngOnDestroy(){(0,Je.completeAll)(this.invitationsChange,this.groupsChange)}onGroupsChange(t){this.groupsChange.emit(this.groups=t)}onInvitationsChange(t){this.invitationsChange.emit(this.invitations=t),this.cdr.detectChanges()}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-group-invitations"]],inputs:{invitations:"invitations"},outputs:{groupsChange:"groupsChange",invitationsChange:"invitationsChange"},features:[e.qOj],decls:2,vars:3,consts:[[3,"label"],[3,"invitations","memberOfGroups","invitationsChange","memberOfGroupsChange"]],template:function(t,o){1&t&&(e.TgZ(0,"tg-dup-templated-panel",0)(1,"tg-my-pending-group-invitations",1),e.NdJ("invitationsChange",function(r){return o.onInvitationsChange(r)})("memberOfGroupsChange",function(r){return o.onGroupsChange(r)}),e.qZA()()),2&t&&(e.Q6J("label","grInvites"),e.xp6(1),e.Q6J("invitations",o.invitations)("memberOfGroups",o.groups))},dependencies:[Co.z,De],encapsulation:2,changeDetection:0}),n})(),Ie=(()=>{class n extends Ne{constructor(){super(),this.profileSvc=(0,e.f3M)(W),this.profileCfg=(0,e.f3M)(x.Hj)}ngOnChanges(t){this.shouldRefreshLockText(t)&&(this.lockText=this.resolveLockText())}ngOnInit(){this.lockText=this.resolveLockText()}resolveLockText(){const t=this.profileField;if(t&&!1!==t.lock)return this.profileSvc.resolveLockText(t.field)}shouldRefreshLockText(t){return!1===t.profileField?.firstChange}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=e.lG2({type:n,inputs:{model:"model",profileField:"profileField"},features:[e.qOj,e.TTD]}),n})();
1function Do(n,i){if(1&n&&(e._UZ(0,"i",7),e.ALo(1,"tr")),2&n){const t=e.oxw();e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function yo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"textarea",8),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model[r.prop]=l)}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngModel",t.model[t.prop])}}function Mo(n,i){if(1&n&&(e.TgZ(0,"p",9),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.model[t.prop])}}let Io=(()=>{class n extends Ie{ngOnChanges(t){"prop"in t&&(this.profileField=this.profileCfg[this.prop]),super.ngOnChanges(t)}shouldRefreshLockText(t){return!1===t.prop?.firstChange}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-dietary-special"]],inputs:{icon:"icon",label:"label",prop:"prop"},features:[e.qOj,e.TTD],decls:8,vars:6,consts:[[3,"lockText"],["panel-head",""],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa",3,"ngClass"],[3,"translate"],["class","form-control","rows","7",3,"ngModel","ngModelChange",4,"ngIf","ngIfElse"],["no",""],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],["rows","7",1,"form-control",3,"ngModel","ngModelChange"],[1,"read"]],template:function(t,o){if(1&t&&(e.TgZ(0,"tg-dup-templated-panel",0),e.ynx(1,1),e.YNc(2,Do,2,3,"i",2),e._UZ(3,"i",3)(4,"span",4),e.BQk(),e.YNc(5,yo,1,1,"textarea",5),e.YNc(6,Mo,2,1,"ng-template",null,6,e.W1O),e.qZA()),2&t){const l=e.MAs(7);e.Q6J("lockText",o.lockText),e.xp6(2),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("ngClass",o.icon),e.xp6(1),e.Q6J("translate",o.label),e.xp6(1),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.mk,c.O5,D.G,X.P,A.K,a.Fj,a.JJ,a.On,g.i9,De,T.H],styles:["[_nghost-%COMP%]{display:block}.read[_ngcontent-%COMP%]{overflow-wrap:break-word;white-space:pre-wrap}textarea.form-control[_ngcontent-%COMP%]{resize:vertical}"],changeDetection:0}),n})();function Oo(n,i){1&n&&(e.TgZ(0,"div",9),e._UZ(1,"div",10),e.qZA()),2&n&&(e.xp6(1),e.Q6J("translate","deletedUserAlert"))}function Zo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-dp-top-menu",11),e.NdJ("userChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model=l)})("editingStateChanged",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.editing=l)})("save",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.save())}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("editing",t.editing)("user",t.user)("own",t.own)("adminMode",t.iAmAdmin)("disableEditBtn",!t.editableAttributes)}}function wo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-dup-bio",12),e.NdJ("editingChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.editing=l)})("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.biography=l)}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("editing",t.editing)("ngModel",t.model.biography)("name","biography")}}function Ao(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-dup-tag-list",14),e.NdJ("editingChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.editing=l)})("ngModelChange",function(l){e.CHM(t);const r=e.oxw().$implicit,U=e.oxw();return e.KtG(U.model[r.model]=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw().$implicit,o=e.oxw();e.Q6J("key",t.model)("editing",o.editing)("name",t.model)("ngModel",o.model[t.model])("placeholder",e.lcZ(1,8,t.placeholder))("showDropdown",o.show[t.showDropdown])("showTypeahead",o.show[t.showTypeahead])("linkable",o.profileCfg[t.cfgKey].linkable)}}function bo(n,i){if(1&n&&e.YNc(0,Ao,2,10,"tg-dup-tag-list",13),2&n){const t=i.$implicit,o=e.oxw();e.Q6J("ngIf",o.show[t.showDropdown]||o.show[t.showTypeahead])}}function Eo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-dup-group-invitations",17),e.NdJ("groupsChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.groups=l)})("invitationsChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.invitations=l)}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("groups",t.groups)("invitations",t.invitations)}}function Jo(n,i){if(1&n&&e._UZ(0,"tg-dup-groups",18),2&n){const t=e.oxw(2);e.Q6J("groups",t.groups)}}function No(n,i){if(1&n&&(e.YNc(0,Eo,1,2,"tg-dup-group-invitations",15),e.YNc(1,Jo,1,1,"tg-dup-groups",16)),2&n){const t=e.oxw();e.Q6J("ngIf",t.own&&(null==t.invitations?null:t.invitations.length)),e.xp6(1),e.Q6J("ngIf",t.groups.length)}}
1function ko(n,i){if(1&n&&e._UZ(0,"tg-dup-dietary-special",20),2&n){const t=e.oxw(2);e.Q6J("icon","fa-cutlery")("label","dietary")("prop","dietary")("model",t.model)("editing",t.editing)}}function Qo(n,i){if(1&n&&e._UZ(0,"tg-dup-dietary-special",20),2&n){const t=e.oxw(2);e.Q6J("icon","fa-deaf")("label","specialNeeds")("prop","special_needs")("model",t.model)("editing",t.editing)}}function Lo(n,i){if(1&n&&(e.YNc(0,ko,1,5,"tg-dup-dietary-special",19),e.YNc(1,Qo,1,5,"tg-dup-dietary-special",19)),2&n){const t=e.oxw();e.Q6J("ngIf",t.show.dietary),e.xp6(1),e.Q6J("ngIf",t.show.special_needs)}}function So(n,i){if(1&n&&e._UZ(0,"tg-dup-quick-notes",21),2&n){const t=e.oxw();e.Q6J("editing",t.editing)}}const Le=Symbol("editing");class se{constructor(i,t,o,l,r,U,I,Y,de,pe,ge,Ye,za){this.profileCfg=i,this.groupCfg=t,this.iAmAdmin=o,this.grRes=l,this.uRes=r,this.loc=Y,this.routing=de,this.alert=pe,this.cdr=ge,this.showSvc=Ye,this.loggedInUser=za,this.userChange$=new e.vpe,this._destroyed$=new He.c,this.articlesEnabled=I.enable,this.eventsEnabled=U.enable}get editing(){return this[Le]}set editing(i){const t=Boolean(i);if(t===this.editing||(this.editModel=i?(0,Wt.Z)((0,jt.Z)(this.user.$value,this.editableAttributes)):null,this[Le]=t,this.model=t?this.editModel:this.user,this.refreshVisibility(),typeof location>"u"))return;const o=location.search.includes("edit=");o&&!t?this.loc.replaceState(location.pathname,""):t&&!o&&this.loc.replaceState(location.pathname,"?edit=true")}get showGroups(){if(!this.editable||!this.groupCfg.enable)return!1;const i=this.groupCfg.userProfile.showGroupsOnUserProfile;return!0===i||"admin"===i&&this.iAmAdmin}ngOnDestroy(){this._destroyed$.next(),(0,Je.completeAll)(this._destroyed$,this.userChange$)}ngOnInit(){this.tagLists=[{cfgKey:"skills",model:"skills",placeholder:"addNewSkill",showDropdown:"skills_select",showTypeahead:"skills_typeahead"},{cfgKey:"interests",model:"interests",placeholder:"addNewInterest",showDropdown:"interests_select",showTypeahead:"interests_typeahead"},{cfgKey:"abilities",model:"abilities",placeholder:"addNewAbility",showDropdown:"abilities_select",showTypeahead:"abilities_typeahead"},{cfgKey:"experiences",model:"experiences",placeholder:"addNewExperience",showDropdown:"experiences_select",showTypeahead:"experiences_typeahead"},{cfgKey:"labels",model:"labels",placeholder:"addNewLabel",showDropdown:"labels_select",showTypeahead:"labels_typeahead"},{cfgKey:"sectors",model:"sectors",placeholder:"addNewSector",showDropdown:"sectors_select",showTypeahead:"sectors_typeahead"}],this.model=this.user,this.initGroups(),this.initEditing(),void 0===this[Le]&&this.refreshVisibility()}save(){const i=this.calculateDiff(),t=[];(0,We.Z)(i)||t.push(this.uRes.update({...i,id:this.user.id}).pipe((0,le.b)(o=>{this.user=this.user.$clone(o.$value),this.userChange$.emit(this.user)}))),this.dupQuickNote?.dirty&&t.push(this.dupQuickNote.save()),t.length?(0,Vt.D)(t).pipe((0,be.H)("[DetailedUserProfile.save]")).subscribe({error:this.alert.negotiate,next:()=>{this.refreshVisibility(),this.onProfileUpdated()}}):this.onProfileUpdated()}calculateDiff(){const i={};if(this.editModel&&this.editableAttributes){const t=this.user.$value;for(const l of this.editableAttributes)l in this.editModel&&!(0,Ht.Z)(t[l],this.editModel[l])&&(""!==this.editModel[l]||null!=t[l])&&(i[l]=""===this.editModel[l]?null:this.editModel[l]);const o=this.editModel.password;o&&(i.password=o)}return i}initEditing(){this.editable&&(this.setEditableAttributes(this.profileCfg.memberSince?["member_since"]:[]),this.routing.params.edit&&(this.editing=!0))}initGroups(){!this.showGroups||(this.user.member_of_groups?.length?(this.groups=this.user.member_of_groups.map(i=>{const t=i.roles.includes($e.V.MANAGER),o=this.grRes.isResponse(i.group)?i.group.$clone():this.grRes.instantiate(i.group);return Object.defineProperty(o,"isAdmin",{configurable:!0,enumerable:!1,get:()=>t,set:je.Z}),o}),this.groups=(0,$t.Z)(this.groups,"name")):this.groups=[],this.grRes.myInvitations().pipe((0,ve.R)(this._destroyed$)).subscribe((0,ie.e)(i=>{i.length&&(this.invitations=i,this.cdr.markForCheck())})))}onProfileUpdated(){this.alert.alertSuccess({key:"profileUpdated",ns:"user"}),this.editing=!1,this.cdr.markForCheck()}refreshVisibility(){this.show={abilities_select:this.showSvc.shouldShow(this.profileCfg.abilities.select,this.loggedInUser,this.user),abilities_typeahead:this.showSvc.shouldShow(this.profileCfg.abilities.typeahead,this.loggedInUser,this.user),biography:this.showSvc.shouldShow(this.profileCfg.biography.field,this.loggedInUser,this.user),dietary:this.eventsEnabled&&this.showTruthy("dietary"),experiences_select:this.showSvc.shouldShow(this.profileCfg.experiences.select,this.loggedInUser,this.user),experiences_typeahead:this.showSvc.shouldShow(this.profileCfg.experiences.typeahead,this.loggedInUser,this.user),interests_select:this.showSvc.shouldShow(this.profileCfg.interests.select,this.loggedInUser,this.user),interests_typeahead:this.showSvc.shouldShow(this.profileCfg.interests.typeahead,this.loggedInUser,this.user),labels_select:this.showSvc.shouldShow(this.profileCfg.labels.select,this.loggedInUser,this.user),labels_typeahead:this.showSvc.shouldShow(this.profileCfg.labels.typeahead,this.loggedInUser,this.user),quick_notes:this.showSvc.shouldShow(this.profileCfg.quick_notes.field,this.loggedInUser,this.user),sectors_select:this.showSvc.shouldShow(this.profileCfg.sectors.select,this.loggedInUser,this.user),sectors_typeahead:this.showSvc.shouldShow(this.profileCfg.sectors.typeahead,this.loggedInUser,this.user),skills_select:this.showSvc.shouldShow(this.profileCfg.skills.select,this.loggedInUser,this.user),skills_typeahead:this.showSvc.shouldShow(this.profileCfg.skills.typeahead,this.loggedInUser,this.user),special_needs:this.eventsEnabled&&this.showTruthy("special_needs")}}setEditableAttributes(i=[]){const t=["abilities","address","biography","birthday","blog_name","company","current_location","custom","degree","email","experiences","secondary_email","facebook_id","firstname","gender","google_id","google_public_url","id","industry","interests","job_title","job_wanted","labels","languages","lastname","linkedin_id","linkedin_local_picture_url","linkedin_picture_url","linkedin_public_url","local_picture_url","maidenname","membership_expires","membership_id","membership_number","middlename","mobile_phone","nationality","next_of_kin","notes","phone","postnominals","preferences","pronouns","roles","sectors","signup_at","signup_status","skills","skypename","tags","title","twitter_id","twitter_profile_image_url","university","website","year","dietary","special_needs","preferred_address","organisation_address","last_login_at","vat","work_phone","linked_to"];t.push(...i),this.editableAttributes=t}showTruthy(i){return(Boolean(this.user[i])||this.editing)&&this.showSvc.shouldShow(this.profileCfg[i].field,this.loggedInUser,this.user)}}
1function Yo(n,i){if(1&n&&(e._UZ(0,"tg-horizontal-user-highlight",3),e.ALo(1,"tr")),2&n){const t=e.oxw();e.Q6J("heading",e.lcZ(1,6,t.interestsHeader))("icon","user")("intersectEachUserProp","interests")("intersectWithUserProp","interests")("intersectWithUser",t.user)("users",t.matchingInterests)}}function Fo(n,i){if(1&n&&(e._UZ(0,"tg-horizontal-user-highlight",3),e.ALo(1,"tr")),2&n){const t=e.oxw();e.Q6J("heading",e.lcZ(1,6,"withMatchingSkills"))("icon","user")("intersectEachUserProp","skills")("intersectWithUserProp","interests")("intersectWithUser",t.user)("users",t.matchingSkills)}}se.\u0275fac=function(i){return new(i||se)(e.Y36(x.Hj),e.Y36(x.$p),e.Y36(x.PQ),e.Y36(dn.m),e.Y36(ee.q),e.Y36(x.f1),e.Y36(x.pj),e.Y36(c.Ye),e.Y36(ne.Z),e.Y36(Pe.c),e.Y36(e.sBO),e.Y36(oe.Z),e.Y36(x.Ej))},se.\u0275cmp=e.Xpm({type:se,selectors:[["tg-detailed-user-profile"]],viewQuery:function(i,t){if(1&i&&e.Gf(et,5),2&i){let o;e.iGM(o=e.CRH())&&(t.dupQuickNote=o.first)}},hostVars:2,hostBindings:function(i,t){2&i&&e.ekj("container",!0)},inputs:{editable:"editable",own:"own",user:"user"},outputs:{userChange$:"userChange"},exportAs:["tgDetailedUserProfile"],features:[e._Bn([{provide:te.z,useValue:"user"},W])],decls:10,vars:11,consts:[[1,"row"],["class","col-xs-12",4,"ngIf"],["class","form-group col-xs-12",3,"editing","user","own","adminMode","disableEditBtn","userChange","editingStateChanged","save",4,"ngIf"],[1,"col-xs-12","col-sm-4",3,"editable","editing","model","user"],[1,"col-xs-12","col-sm-8"],[3,"editing","ngModel","name","editingChange","ngModelChange",4,"ngIf"],["ngFor","",3,"ngForOf"],[3,"ngIf"],[3,"editing",4,"ngIf"],[1,"col-xs-12"],[1,"alert","alert-danger",3,"translate"],[1,"form-group","col-xs-12",3,"editing","user","own","adminMode","disableEditBtn","userChange","editingStateChanged","save"],[3,"editing","ngModel","name","editingChange","ngModelChange"],[3,"key","editing","name","ngModel","placeholder","showDropdown","showTypeahead","linkable","editingChange","ngModelChange",4,"ngIf"],[3,"key","editing","name","ngModel","placeholder","showDropdown","showTypeahead","linkable","editingChange","ngModelChange"],[3,"groups","invitations","groupsChange","invitationsChange",4,"ngIf"],[3,"groups",4,"ngIf"],[3,"groups","invitations","groupsChange","invitationsChange"],[3,"groups"],[3,"icon","label","prop","model","editing",4,"ngIf"],[3,"icon","label","prop","model","editing"],[3,"editing"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0),e.YNc(1,Oo,2,1,"div",1),e.YNc(2,Zo,1,5,"tg-dp-top-menu",2),e._UZ(3,"tg-dup-personal",3),e.TgZ(4,"div",4),e.YNc(5,wo,1,3,"tg-dup-bio",5),e.YNc(6,bo,1,1,"ng-template",6),e.YNc(7,No,2,2,"ng-template",7),e.YNc(8,Lo,2,2,"ng-template",7),e.YNc(9,So,1,1,"tg-dup-quick-notes",8),e.qZA()()),2&i&&(e.xp6(1),e.Q6J("ngIf",t.iAmAdmin&&t.model.deleted),e.xp6(1),e.Q6J("ngIf",t.editable||t.iAmAdmin),e.xp6(1),e.Q6J("editable",t.editable)("editing",t.editing)("model",t.model)("user",t.user),e.xp6(2),e.Q6J("ngIf",t.show.biography),e.xp6(1),e.Q6J("ngForOf",t.tagLists),e.xp6(1),e.Q6J("ngIf",t.showGroups),e.xp6(1),e.Q6J("ngIf",t.eventsEnabled),e.xp6(1),e.Q6J("ngIf",t.show.quick_notes))},dependencies:[c.sg,c.O5,X.P,tt.a,a.JJ,a.On,bn,lt,zn,co,vo,gt,Io,et,T.H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),(0,Ce.gn)([(0,Ge.a)()],se.prototype,"showGroups",null);class ae{constructor(i,t,o,l,r,U,I){this.cdr=i,this.showSvc=t,this.loggedInUser=r,this.profileCfg=U,this.uRes=I,this.isOwnProfile=o.id===r?.id,this.interestsHeader=this.isOwnProfile?"interestsMatchYours":"withSimilarInterests",this._user$=new Et.X(o),this._destroyed$=this._user$.pipe((0,Be.Z)()),this.editable=this.isOwnProfile||l}ngOnDestroy(){this._user$.complete()}ngOnInit(){this.matchingInterests=this.matchingSkills=[],this.fetchByInterests("match_interests","randomise","interests").subscribe((0,ie.e)(i=>{this.matchingInterests=i,this.cdr.markForCheck()})),this.isOwnProfile&&this.fetchByInterests("match_skills","limit","skills").subscribe((0,ie.e)(i=>{this.matchingSkills=i,this.cdr.markForCheck()}))}fetchByInterests(i,t,o){return this._user$.pipe((0,me.U)(l=>this.showSvc.shouldShow(this.profileCfg[i].field,this.loggedInUser,l)?l[o]??[]:[]),(0,bt.p)(),(0,he.w)(l=>{if(l.length){const r=[this.user.id];return!this.isOwnProfile&&this.loggedInUser&&r.push(this.loggedInUser.id),this.uRes.query({params:{[o]:l,[t]:4,nids:r,signedupfilter:!0}})}return(0,Ee.of)([])}),(0,me.U)(l=>l.slice(0,3)),(0,be.H)(`[AddressbookProfileView.${i}]`),(0,ve.R)(this._destroyed$))}}function ut(n,i){return{deps:[Ue.E,x.Hj,oe.Z,x.Ej,Ke.Transition],resolveFn:(t,o,l,r,U)=>(0,Fe.Z)(function*(){const I=o[n].typeahead,Y=o[n].select,de=[I,r],pe=[Y,r];if("function"==typeof I||"function"==typeof Y||"owner"===Y||"owner"===I){const ge=yield U.injector().getAsync(F.ADDRESSBOOK_PROFILE_USER);de.push(ge),pe.push(ge)}return l.shouldShow(...de)||l.shouldShow(...pe)?yield(0,Te.n)(t[n]()):[]})(),token:i}}ae.\u0275fac=function(i){return new(i||ae)(e.Y36(e.sBO),e.Y36(oe.Z),e.Y36(F.ADDRESSBOOK_PROFILE_USER),e.Y36(x.PQ),e.Y36(x.Ej),e.Y36(x.Hj),e.Y36(ee.q))},ae.\u0275cmp=e.Xpm({type:ae,selectors:[["tg-addressbook-profile-view"]],features:[e._Bn([{provide:te.z,useValue:"addressbook"}])],decls:4,vars:5,consts:[[3,"user","editable","own","userChange"],[1,"container"],[3,"heading","icon","intersectEachUserProp","intersectWithUserProp","intersectWithUser","users",4,"ngIf"],[3,"heading","icon","intersectEachUserProp","intersectWithUserProp","intersectWithUser","users"]],template:function(i,t){1&i&&(e.TgZ(0,"tg-detailed-user-profile",0),e.NdJ("userChange",function(l){return t.user=l}),e.qZA(),e.TgZ(1,"div",1),e.YNc(2,Yo,2,8,"tg-horizontal-user-highlight",2),e.YNc(3,Fo,2,8,"tg-horizontal-user-highlight",2),e.qZA()),2&i&&(e.Q6J("user",t.user)("editable",t.editable)("own",t.isOwnProfile),e.xp6(2),e.Q6J("ngIf",t.matchingInterests.length),e.xp6(1),e.Q6J("ngIf",t.matchingSkills.length&&t.isOwnProfile))},dependencies:[c.O5,Gt,se,T.H],encapsulation:2,changeDetection:0}),(0,Ce.gn)([(0,Jt.Z)("_user$")],ae.prototype,"user",void 0);const Bo=[{component:ae,name:"addressbook.profile",resolve:[{deps:[Ke.Transition,ee.q,Pe.c,ne.Z],resolveFn:(n,i,t,o)=>(0,Fe.Z)(function*(){let l;try{l=yield(0,Te.n)(i.get(n.params().userId))}
1catch(I){if(t.negotiate(I),401!==I.status)return yield(0,Te.n)(o.goHome(n)).catch(console.error);throw I}const r={};let U=!1;for(const I of["skills","interests"])Array.isArray(l[I])||(r[I]=[],U=!0);return U?l.$clone(r):l})(),token:F.ADDRESSBOOK_PROFILE_USER},{deps:[Ue.E,x.Hj],resolveFn:(n,i)=>!1===i.title?[]:(0,Te.n)(n.titles()),token:F.ADDRESSBOOK_PROFILE_TITLES},Re.w,Re.p,G.resolveProfileConfig,G.resolveArticleConfig,G.resolveEventConfig,G.resolveGroupConfig,G.resolveMemberTagsConfig,G.resolveMembershipConfig,G.resolveManualMembershipConfig,G.resolveAddressbookConfig,G.resolveBlogConfig,G.resolveInvoicingConfig,G.resolveMessagingConfig,G.resolveSocialNetworksConfig,ut("skills",F.ADDRESSBOOK_PROFILE_SKILLS),ut("interests",F.ADDRESSBOOK_PROFILE_INTERESTS)],url:"/{userId:ObjectId}?{edit:AltBoolean}"}];var ft=s(79662),mt=s(76306);let k=(()=>{class n extends Ie{constructor(){super(...arguments),this._ligClassBinding=!0}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275dir=e.lG2({type:n,hostVars:2,hostBindings:function(t,o){2&t&&e.ekj("list-group-item",o._ligClassBinding)},features:[e.qOj]}),n})();var xe=s(99092),K=s(61958),ht=s(47946),xt=s(16838),Tt=s(4087),Pt=s(81117);const Go=["dupMemberSince",""];function Wo(n,i){if(1&n&&(e._UZ(0,"i",10),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function jo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.ALo(3,"tr"),e.YNc(4,Wo,2,3,"i",5),e._UZ(5,"i",6),e.qZA(),e.TgZ(6,"div",7)(7,"tg-clearable-input",8)(8,"tg-datepicker",9),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.member_since=l)}),e.ALo(9,"tr"),e.qZA()()()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id)("tooltip",e.lcZ(3,12,"memberSince")),e.xp6(2),e.Q6J("ngIf",o.lockText),e.xp6(4),e.Q6J("adaptivePosition",!1)("timezone","UTC")("view",o.INITIAL_VIEW)("ngModel",o.model.member_since)("controlId",t.id)("maxDate",o.currDate)("startDate",o.currDate)("placeholder",e.lcZ(9,14,"memberSince"))}}function Ho(n,i){if(1&n&&(e._UZ(0,"i",10),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function $o(n,i){if(1&n&&(e.YNc(0,Ho,2,3,"i",5),e._UZ(1,"i",6),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"tr"),e.qZA(),e.TgZ(5,"time"),e._uU(6),e.ALo(7,"date"),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(3),e.hij("",e.lcZ(4,4,"memberSince"),": "),e.xp6(2),e.uIk("datetime",t.model.member_since.toISOString()),e.xp6(1),e.Oqu(e.Dn7(7,6,t.model.member_since,"mediumDate","UTC"))}}let Vo=(()=>{class n extends k{constructor(){super(...arguments),this.currDate=new Date,this.INITIAL_VIEW=mt.c.YEAR}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupMemberSince",""]],features:[e.qOj],attrs:Go,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for","tooltip"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa-fw","fa","fa-calendar"],[1,"drop-select-container"],[2,"width","100%"],[3,"adaptivePosition","timezone","view","clearable-input-target","ngModel","controlId","maxDate","startDate","placeholder","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"]],template:function(t,o){if(1&t&&(e.YNc(0,jo,10,16,"div",0),e.YNc(1,$o,8,10,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,xe.X,D.G,A.K,y.u0,y.k6,K.y,ht.X,xt.s,a.JJ,a.On,Tt.W,Pt.e,g.i9,c.uU,T.H],styles:[".drop-select-container[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;justify-content:space-between;width:100%}.drop-select-container[_ngcontent-%COMP%] tg-datepicker[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] tg-search-place[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] > tg-dropdown-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();var Ut=s(42809),zo=s(39320),Oe=s(80499);const qo=["dupRoles",""];
1function Xo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-dropdown-select",5),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.roles=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=i.ngIf,o=e.oxw(2),l=e.MAs(6);e.Q6J("labelKey","name")("template",l)("multi",!0)("ngModel",o.model.roles)("items",t)("label",e.lcZ(1,6,"roles"))}}function ei(n,i){if(1&n&&(e.ynx(0),e.YNc(1,Xo,2,8,"tg-dropdown-select",4),e.ALo(2,"async"),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.roles$))}}function ti(n,i){if(1&n&&(e._UZ(0,"i",7),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function ni(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.roles)}}function oi(n,i){if(1&n&&(e.YNc(0,ti,2,3,"i",6),e.TgZ(1,"span"),e._uU(2),e.ALo(3,"tr"),e.qZA(),e.YNc(4,ni,2,1,"span",0)),2&n){const t=e.oxw(),o=e.MAs(4);e.Q6J("ngIf",t.lockText),e.xp6(2),e.hij("",e.lcZ(3,4,"roles"),": "),e.xp6(2),e.Q6J("ngIf",null==t.model.roles?null:t.model.roles.length)("ngIfElse",o)}}function ii(n,i){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"tr"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"none")))}function li(n,i){if(1&n&&(e.TgZ(0,"span",8),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t.name)}}let si=(()=>{class n extends k{constructor(t){super(),this.roles$=t.query().pipe((0,me.U)(o=>{const l=this.user.hasRoles("public")?[...o]:o.filter(r=>"public"!==r.name);return l.push({name:"administrator"}),l}),(0,Ut.d)(1))}ngOnChanges(t){"model"in t&&(this.roles=this.model.roles?.join(", ")??""),super.ngOnChanges(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(zo.q))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupRoles",""]],hostVars:2,hostBindings:function(t,o){2&t&&e.ekj("text-capitalize",!0)},inputs:{user:"user"},features:[e.qOj,e.TTD],attrs:qo,decls:7,vars:2,consts:[[4,"ngIf","ngIfElse"],["no",""],["noRoles",""],["ds",""],["valueKey","name",3,"labelKey","template","multi","ngModel","items","label","ngModelChange",4,"ngIf"],["valueKey","name",3,"labelKey","template","multi","ngModel","items","label","ngModelChange"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"text-capitalize"]],template:function(t,o){if(1&t&&(e.YNc(0,ei,3,3,"ng-container",0),e.YNc(1,oi,5,6,"ng-template",null,1,e.W1O),e.YNc(3,ii,3,3,"ng-template",null,2,e.W1O),e.YNc(5,li,2,1,"ng-template",null,3,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,D.G,A.K,Oe._,a.JJ,a.On,g.i9,c.Ov,T.H],encapsulation:2,changeDetection:0}),n})();var ai=s(88990),Ct=s(88886),ri=s(62361),ci=s(25989),di=s(31841);function gi(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockMembership))}}function _i(n,i){if(1&n&&(e.TgZ(0,"span",6),e._uU(1),e.ALo(2,"tr"),e.ALo(3,"date"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE("",e.lcZ(2,2,"until")," ",e.xi3(3,4,t.model.membership_expires,"mediumDate"),"")}}function ui(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1),e.ALo(2,"tr"),e.ALo(3,"date"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE("",e.lcZ(2,2,"expired")," ",e.xi3(3,4,t.model.membership_expires,"mediumDate"),"")}}function fi(n,i){if(1&n&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&n){const t=i.ngIf;e.xp6(1),e.Oqu(t)}}function mi(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,gi,2,3,"i",2),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"tr"),e.qZA(),e.YNc(5,_i,4,7,"span",3),e.YNc(6,ui,4,7,"ng-template",null,4,e.W1O),e.YNc(8,fi,2,1,"div",0),e.ALo(9,"async"),e.qZA()),2&n){const t=e.MAs(7),o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.lockMembership),e.xp6(2),e.hij("",e.lcZ(4,5,"membership"),": "),e.xp6(2),e.Q6J("ngIf",o.hasValidMembership)("ngIfElse",t),e.xp6(3),e.Q6J("ngIf",e.lcZ(9,7,o.membership$))}}function hi(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(4);e.Q6J("tooltip",e.lcZ(1,1,t.lockMembNumber))}}function xi(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,hi,2,3,"i",2),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"tr"),e.qZA(),e.TgZ(5,"strong"),e._uU(6),e.ALo(7,"addPadding"),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",t.lockMembNumber),e.xp6(2),e.hij("",e.lcZ(4,3,"membNumber"),": "),e.xp6(3),e.Oqu(e.l
1cZ(7,5,t.model.membership_number))}}function Ti(n,i){if(1&n&&e.YNc(0,xi,8,7,"div",0),2&n){const t=e.oxw(2);e.Q6J("ngIf",t.model.membership_number)}}function Pi(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(3);e.Q6J("tooltip",e.lcZ(1,1,t.lockMembNumber))}}function Ui(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",10,11)(2,"label",12),e.YNc(3,Pi,2,3,"i",2),e._UZ(4,"i",13),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"input",14),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.membership_number=l)}),e.ALo(7,"tr"),e.qZA()()}if(2&n){const t=e.MAs(1),o=e.oxw(2);e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockMembNumber),e.xp6(1),e.Q6J("tooltip",e.lcZ(5,7,"membNumber")),e.xp6(2),e.Q6J("ngModel",o.model.membership_number)("placeholder",e.lcZ(7,9,"membNumber"))("id",t.id)}}function Ci(n,i){if(1&n&&(e.YNc(0,Ti,1,1,"ng-template",8),e.YNc(1,Ui,8,11,"ng-template",null,9,e.W1O)),2&n){const t=e.MAs(2),o=e.oxw();e.Q6J("ngIf",!o.editing)("ngIfElse",t)}}class re extends k{constructor(i,t){super(),this.uRes=i,this.membRes=t,this.shouldRefreshLockText=ri.Z,this.membership$=this.NULL$=(0,Ee.of)(null)}ngOnChanges(i){if(super.ngOnChanges(i),"model"in i){if(this.membershipEnabled){const t=this.uRes.isResponse(this.model)?this.model:this.uRes.instantiate(this.model);this.hasValidMembership=t.hasValidMembership}this.membership$=this.membershipEnabled&&this.model.membership_id?this.fetchMemb(Ct.SP.extractId(this.model.membership_id)):this.NULL$,this.profileField=this.profileCfg.membership,this.lockMembership=this.resolveLockText(),this.profileField=this.profileCfg.membership_number,this.lockMembNumber=this.resolveLockText()}}fetchMemb(i){return this.membRes.get(i).pipe((0,me.U)(t=>t.title),(0,Ut.d)(1))}}re.\u0275fac=function(i){return new(i||re)(e.Y36(ee.q),e.Y36(di.k))},re.\u0275cmp=e.Xpm({type:re,selectors:[["li","dupMembership",""]],inputs:{membershipEnabled:"membershipEnabled",membershipNumberEnabled:"membershipNumberEnabled"},features:[e.qOj,e.TTD],attrs:["dupMembership",""],decls:2,vars:2,consts:[[4,"ngIf"],[3,"ngIf"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],["class","text-success",4,"ngIf","ngIfElse"],["invalidMemb",""],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"text-success"],[1,"text-danger"],[3,"ngIf","ngIfElse"],["membNoEditing",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],[1,"fa","fa-fw","fa-hashtag",3,"tooltip"],["type","text",1,"form-control",3,"ngModel","placeholder","id","ngModelChange"]],template:function(i,t){1&i&&(e.YNc(0,mi,10,9,"div",0),e.YNc(1,Ci,3,2,"ng-template",1)),2&i&&(e.Q6J("ngIf",t.membershipEnabled&&!t.editing),e.xp6(1),e.Q6J("ngIf",t.membershipNumberEnabled))},dependencies:[c.O5,D.G,A.K,y.u0,y.k6,K.y,a.Fj,a.JJ,a.On,g.i9,c.Ov,c.uU,T.H,J],encapsulation:2,changeDetection:0}),(0,Ce.gn)([(0,ai.qQ)(ci.Z)],re.prototype,"fetchMemb",null);var vt=s(7933),vi=s(24290);const Di=["dupEmail",""];function yi(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Mi(n,i){if(1&n&&(e.TgZ(0,"a",6),e._uU(1),e.qZA()),2&n){const t=i.ngIf,o=e.oxw(2);e.Q6J("href",o.href,e.LSH),e.xp6(1),e.Oqu(t)}}function Ii(n,i){if(1&n&&(e.YNc(0,yi,2,3,"i",2),e._UZ(1,"i",3),e.YNc(2,Mi,2,2,"a",4)),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(2),e.Q6J("ngIf",t.value)}}function Oi(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Zi(n,i){if(1&n&&e._UZ(0,"tg-help-block",14),2&n){e.oxw();const t=e.MAs(8);e.Q6J("errors",t.errors)}}function wi(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",7,8)(3,"label",9),e.YNc(4,Oi,2,3,"i",2),e._UZ(5,"i",10),e.ALo(6,"tr"),e.qZA(),e.TgZ(7,"input",11,12),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.value=l)}),e.ALo(9,"tr"),e.qZA(),e.YNc(10,Zi,1,1,"tg-help-block",13),e.qZA(),e.BQk()}if(2&n){const t=e.MAs(2),o=e.MAs(8),l=e.oxw();e.xp6(1),e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",l.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(6,12,l.tooltipText)),e.xp6(2),e.Q6J("required",l.required)("tgEmail",!0)("initialEmail",l.initial)("includePublicUsers",!0)("ngModel",l.value)("placeholder",e.lcZ(9,14,l.tooltipText))("id",t.id),e.xp6(3),e.Q6J("ngIf",o.errors&&o.touched)}}let Ai=(()=>{class n extends k{get value(){return this.model[this.prop]}set value(t){this.model[this.prop]=t}ngOnChanges(t){if("prop"in t&&(this.profileField=this.profileCfg[this.prop]),!this.editing&&("editing"in t||"model"in t||"prop"in t)){const o=this.model[this.prop];this.href=o?`mailto:${o}`:""}super.ngOnChanges(t)}ngOnInit(){this.initial=this.value,super.ngOnInit()}
1shouldRefreshLockText(t){return!1===t.prop?.firstChange}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupEmail",""]],inputs:{prop:"prop",required:"required",tooltipText:"tooltipText"},features:[e.qOj,e.TTD],attrs:Di,decls:3,vars:2,consts:[["no",""],[4,"ngIf","ngIfElse"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-envelope"],["target","_blank","rel","noopener nofollow","style","word-break: break-all;",3,"href",4,"ngIf"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],["target","_blank","rel","noopener nofollow",2,"word-break","break-all",3,"href"],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],[1,"fa","fa-fw","fa-envelope",3,"tooltip"],["type","email",1,"form-control",3,"required","tgEmail","initialEmail","tgValidateUserEmail","includePublicUsers","ngModel","placeholder","id","ngModelChange"],["ngm","ngModel"],[3,"errors",4,"ngIf"],[3,"errors"]],template:function(t,o){if(1&t&&(e.YNc(0,Ii,3,2,"ng-template",null,0,e.W1O),e.YNc(2,wi,11,16,"ng-container",1)),2&t){const l=e.MAs(1);e.xp6(2),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,D.G,vt._,A.K,y.u0,y.k6,vi.o,$.k,K.y,a.Fj,a.JJ,a.Q7,a.On,O.ValidateUserEmailDirective,g.i9,T.H],encapsulation:2,changeDetection:0}),n})();var bi=s(66370),Ei=s(51746);const Ji=["dupTags",""];let Ni=(()=>{class n extends k{constructor(){super(...arguments),this.TAG_LINK=bi.TagRestriction.USER,this.TOOLTIP=W.ADMIN_TOOLTIP}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupTags",""]],features:[e.qOj],attrs:Ji,decls:6,vars:9,consts:[[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[3,"user","disableEdit","link"]],template:function(t,o){1&t&&(e._UZ(0,"i",0),e.ALo(1,"tr"),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"tr"),e.qZA(),e._UZ(5,"tg-user-tags",1)),2&t&&(e.Q6J("tooltip",e.lcZ(1,5,o.TOOLTIP)),e.xp6(3),e.hij("",e.lcZ(4,7,"tags"),":"),e.xp6(2),e.Q6J("user",o.model)("disableEdit",!0)("link",o.TAG_LINK))},dependencies:[D.G,A.K,Ei.r,g.i9,T.H],encapsulation:2,changeDetection:0}),n})();const ki=["dupPhone",""];function Qi(n,i){if(1&n&&(e._UZ(0,"i",8),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Li(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.YNc(3,Qi,2,3,"i",5),e._UZ(4,"i",6),e.qZA(),e.TgZ(5,"input",7),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model[r.prop]=l)}),e.qZA()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("ngClass",o.icon)("tooltip",o.tooltipTranslated),e.xp6(1),e.Q6J("id",t.id)("ngModel",o.model[o.prop])("placeholder",o.tooltipTranslated)}}function Si(n,i){if(1&n&&(e._UZ(0,"i",8),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Yi(n,i){if(1&n&&(e.YNc(0,Si,2,3,"i",5),e._UZ(1,"i",9),e.TgZ(2,"a",10),e._uU(3),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("ngClass",t.icon),e.xp6(1),e.Q6J("href",t.href,e.LSH),e.xp6(1),e.Oqu(t.model[t.prop])}}let Fi=(()=>{class n extends k{constructor(t){super(),this.tr=t,this.tooltipTranslated=""}ngOnChanges(t){if("tooltipText"in t){const o=this.tooltipText;this.tooltipTranslated=o?this.tr.translate(o,"user"):""}if("prop"in t&&(this.profileField=this.profileCfg[this.prop]),"prop"in t||"model"in t){const o=this.model[this.prop];this.href=o?`tel:${o}`:""}super.ngOnChanges(t)}shouldRefreshLockText(t){return!1===t.prop?.firstChange}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(ue.D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupPhone",""]],inputs:{icon:"icon",prop:"prop",tooltipText:"tooltipText"},features:[e.qOj,e.TTD],attrs:ki,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw",3,"ngClass","tooltip"],["type","tel",1,"form-control",3,"id","ngModel","placeholder","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"fa","fa-fw",3,"ngClass"],["rel","noopener nofollow","target","_blank",2,"word-break","break-all",3,"href"]],template:function(t,o){if(1&t&&(e.YNc(0,Li,6,8,"div",0),e.YNc(1,Yi,4,4,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.mk,c.O5,D.G,A.K,y.u0,y.k6,$.k,K.y,a.Fj,a.JJ,a.On,g.i9,T.H],encapsulation:2,changeDetection:0}),n})();var Ki=s(6281),Ri=s(60407),Bi=s(30524);const Gi=["dupSocialNet",""];
1function Wi(n,i){if(1&n&&(e.TgZ(0,"li",12)(1,"a",13),e._UZ(2,"span",14),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"tr"),e.ALo(6,"tr"),e.qZA()()()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("href",t.authLink,e.LSH),e.xp6(1),e.Q6J("ngClass",t.prefix),e.xp6(2),e.AsE("",e.lcZ(5,4,"connect")," ",e.lcZ(6,6,t.prefix),"")}}function ji(n,i){1&n&&e._UZ(0,"hr",15)}function Hi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"li",12)(1,"a",16),e.NdJ("click",function(){const r=e.CHM(t).$implicit,U=e.oxw(3);return e.KtG(U.disconnect(r))}),e._UZ(2,"span",14),e.TgZ(3,"span",17),e._uU(4),e.ALo(5,"tr"),e.ALo(6,"tr"),e.qZA()()()}if(2&n){const t=i.$implicit;e.xp6(2),e.Q6J("ngClass",t.prefix),e.xp6(2),e.AsE("",e.lcZ(5,3,"disconnect")," ",e.lcZ(6,5,t.prefix),"")}}function $i(n,i){if(1&n&&(e.TgZ(0,"ul",9),e.YNc(1,Wi,7,8,"li",10),e.YNc(2,ji,1,0,"hr",11),e.YNc(3,Hi,7,7,"li",10),e.qZA()),2&n){e.oxw();const t=e.MAs(1),o=e.MAs(3),l=e.oxw();e.Q6J("id",t),e.uIk("aria-labelledby",o),e.xp6(1),e.Q6J("ngForOf",l.unassociatedNetworks),e.xp6(1),e.Q6J("ngIf",l.associatedNetworks.length&&l.unassociatedNetworks.length),e.xp6(1),e.Q6J("ngForOf",l.associatedNetworks)}}function Vi(n,i){if(1&n&&(e.TgZ(0,"div",3,4)(2,"button",5,6),e._UZ(4,"i",7),e.TgZ(5,"span"),e._uU(6),e.ALo(7,"tr"),e.qZA()(),e.YNc(8,$i,4,5,"ul",8),e.qZA()),2&n){const t=e.MAs(1);e.Q6J("autoId",!1)("placement","bottom"),e.xp6(2),e.Q6J("autoId",!0),e.uIk("aria-controls",t),e.xp6(4),e.hij("\xa0",e.xi3(7,5,"socialAcc","user"),"")}}const Se="socialNetworks";let zi=(()=>{class n extends k{constructor(t,o,l,r,U,I){super(),this.userSvc=t,this.cdr=o,this.alert=l,this.uRes=r,this.own=Boolean(U)&&U.id===I.id}disconnect(t){this.uRes.disconnectSocialNetwork({network:t.prefix}).pipe((0,le.b)({error:()=>{this.alert.alertError({key:"failedDisconnect",ns:Se})},next:()=>{this.alert.alertSuccess({key:"successDisconnect",ns:Se,placeholders:{network:t.name}})}}),(0,he.w)(()=>this.userSvc.refreshUser()),(0,he.w)(o=>(this.userRsp=o,this.updateNetworks())),(0,be.H)("[DUPSocialNetworks.logout]")).subscribe(()=>{this.cdr.detectChanges()})}ngOnInit(){this.userRsp=this.uRes.isResponse(this.model)?this.model:this.uRes.instantiate(this.model),this.updateNetworks().subscribe(nt.V),super.ngOnInit()}updateNetworks(){return(0,Ki.a)([this.userRsp.associatedNetworks(),this.userRsp.unassociatedNetworks()]).pipe((0,Ri.q)(1),(0,le.b)(([t,o])=>{this.associatedNetworks=t,this.unassociatedNetworks=o}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(ot.KD),e.Y36(e.sBO),e.Y36(Pe.c),e.Y36(ee.q),e.Y36(x.Ej),e.Y36(F.ADDRESSBOOK_PROFILE_USER))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupSocialNet",""]],features:[e._Bn([{provide:te.z,useValue:Se}]),e.qOj],attrs:Gi,decls:3,vars:2,consts:[[1,"socnet"],[1,"pull-left",3,"user"],["class","btn-group","dropdown","",3,"autoId","placement",4,"ngIf"],["dropdown","",1,"btn-group",3,"autoId","placement"],["ulId","id"],["type","button","dropdownToggle","",1,"btn","btn-xs","btn-warning","pull-right","dropdown-toggle",3,"autoId"],["btnId","id"],[1,"fa","fa-share-square"],["class","dropdown-menu dropdown-menu-right","role","menu",3,"id",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right",3,"id"],["role","menuitem",4,"ngFor","ngForOf"],["class","divider",4,"ngIf"],["role","menuitem"],["target","_self",1,"dropdown-item",3,"href"],[1,"tg-social-icon",3,"ngClass"],[1,"divider"],["target","_self","href","#",1,"dropdown-item",3,"click"],[1,"text-danger"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"tg-user-social-icons",1),e.YNc(2,Vi,9,8,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("user",o.userRsp),e.xp6(1),e.Q6J("ngIf",o.own))},dependencies:[c.mk,c.sg,c.O5,D.G,y.u0,y.k6,$.k,C.Hz,C.Mq,C.TO,Bi.d,T.H],styles:[".socnet[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;flex-direction:row;justify-content:space-between}.tg-social-icon[_ngcontent-%COMP%]{margin-right:.5em}"],changeDetection:0}),n})();var Dt=s(38674);const qi=["dupDegreeUni",""];function Xi(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function el(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.ALo(3,"tr"),e.YNc(4,Xi,2,3,"i",5),e._UZ(5,"i",6),e.qZA(),e.TgZ(6,"input",7),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.degree=l)}),e.ALo(7,"tr"),e.qZA(),e.TgZ(8,"input",8),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.university=l)}),e.ALo(9,"tr"),e.qZA()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id)("tooltip",e.lcZ(3,11,"education")),e.xp6(2),e.Q6J("ngIf",o.lockText),e.xp6(2),e.Q6J("autocomplete","none")("id",t.id)("ngModel",o.model.degree)("placeholder",e.lcZ(7,13,"whatSubj"))("typeahead",o.degrees),e.xp6(2),e.Q6J("ngModel",o.model.university)("placeholder",e.lcZ(9,15,"schoolCollegeUni"))}}function tl(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function nl(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.model.degree,", ")}}function ol(n,i){if(1&n&&(e.YNc(0,tl,2,3,"i",5),e._UZ(1,"i",6),e.YNc(2,nl,2,1,"span",10),e.TgZ(3,"span"),e._uU(4),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(2),e.Q6J("ngIf",t.model.degree),e.xp6(2),e.Oqu(t.model.university)}}let il=(()=>{class n extends k{constructor(t,o){super(),this.cdr=t,this.metaRes=o}ngOnDestroy(){this._sub?.unsubscribe()}ngOnInit(){this.degrees=[],super.ngOnInit(),this._sub=this.metaRes.degrees().subscribe((0,ie.e)(t=>{t.length&&(this.degrees=t,this.cdr.markForCheck()),this._sub=void 0}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.sBO),e.Y36(Ue.E
1))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupDegreeUni",""]],features:[e.qOj],attrs:qi,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["subj","id"],[1,"input-group-addon",3,"for","tooltip"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-graduation-cap"],[1,"form-control",3,"autocomplete","id","ngModel","placeholder","typeahead","ngModelChange"],[1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[4,"ngIf"]],template:function(t,o){if(1&t&&(e.YNc(0,el,10,17,"div",0),e.YNc(1,ol,5,3,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,Dt.r,D.G,A.K,y.u0,y.k6,K.y,a.Fj,a.JJ,a.On,g.i9,M.Bp,T.H],encapsulation:2,changeDetection:0}),n})();var yt=s(16936);const ll=["dupLang",""];function sl(n,i){1&n&&(e._UZ(0,"i",4),e.ALo(1,"tr")),2&n&&e.Q6J("tooltip",e.lcZ(1,1,"tooltip_languages"))}function al(n,i){if(1&n&&(e._UZ(0,"i",13),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function rl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",5)(1,"span",6),e.YNc(2,al,2,3,"i",7),e.GkF(3,8),e.qZA(),e.TgZ(4,"div",9)(5,"tg-dropdown-select",10,11),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.languages=l)}),e.ALo(7,"tr"),e.qZA(),e.TgZ(8,"button",12),e.NdJ("click.passive",function(){e.CHM(t);const l=e.MAs(6);return e.KtG(l.reset([]))}),e.qZA()()()}if(2&n){const t=e.oxw(),o=e.MAs(1);e.xp6(2),e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("ngTemplateOutlet",o),e.xp6(2),e.Q6J("tgMetadataSelect","languages")("ngModel",t.model.languages)("labelKey","name")("valueKey","code")("multi",!0)("label",e.lcZ(7,8,"languages"))}}function cl(n,i){if(1&n&&(e._UZ(0,"i",13),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function dl(n,i){1&n&&e._UZ(0,"span",17),2&n&&e.Q6J("translate",i.$implicit)("tr-namespace","language")}function pl(n,i){if(1&n&&(e.TgZ(0,"span",15),e.YNc(1,dl,1,2,"span",16),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.model.languages)}}function gl(n,i){if(1&n&&(e.YNc(0,cl,2,3,"i",7),e.GkF(1,8),e.YNc(2,pl,2,1,"span",14)),2&n){const t=e.oxw(),o=e.MAs(1),l=e.MAs(6);e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("ngTemplateOutlet",o),e.xp6(1),e.Q6J("ngIf",t.hasLanguages)("ngIfElse",l)}}function _l(n,i){1&n&&e._UZ(0,"span",18)}let ul=(()=>{class n extends k{ngOnChanges(t){!this.editing&&("model"in t||"editing"in t)&&(this.hasLanguages=Boolean(this.model.languages?.length)),super.ngOnChanges(t)}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupLang",""]],features:[e.qOj,e.TTD],attrs:ll,decls:7,vars:2,consts:[["icon",""],["class","input-group",4,"ngIf","ngIfElse"],["no",""],["noLangs",""],[1,"fa","fa-fw","fa-language",3,"tooltip"],[1,"input-group"],[1,"input-group-addon"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"drop-select-container"],[3,"tgMetadataSelect","ngModel","labelKey","valueKey","multi","label","ngModelChange"],["m","ngModel"],["tg-clear-button","",1,"btn-default",3,"click.passive"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],["class","langs",4,"ngIf","ngIfElse"],[1,"langs"],[3,"translate","tr-namespace",4,"ngFor","ngForOf"],[3,"translate","tr-namespace"],["translate","none"]],template:function(t,o){if(1&t&&(e.YNc(0,sl,2,3,"ng-template",null,0,e.W1O),e.YNc(2,rl,9,10,"div",1),e.YNc(3,gl,3,4,"ng-template",null,2,e.W1O),e.YNc(5,_l,1,0,"ng-template",null,3,e.W1O)),2&t){const l=e.MAs(4);e.xp6(2),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.sg,c.O5,c.tP,D.G,X.P,A.K,ye.h,Oe._,yt.T,a.JJ,a.On,d.m,g.i9,T.H],styles:[".drop-select-container[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;justify-content:space-between;width:100%}.drop-select-container[_ngcontent-%COMP%] tg-datepicker[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] tg-search-place[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] > tg-dropdown-select[_ngcontent-%COMP%]{width:100%}",'.langs[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(:first-child):before{content:", "}'],changeDetection:0}),n})();var fl=s(9352);const ml=["dupWebsite",""];function hl(n,i){if(1&n&&(e._UZ(0,"i",8),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function xl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.YNc(3,hl,2,3,"i",5),e._UZ(4,"i",6),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"tg-url-input",7),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model[r.prop]=l.url)}),e.ALo(7,"tr"),e.qZA()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("ngClass",o.icon)("tooltip",e.lcZ(5,11,o.tooltipText)),e.xp6(2),e.ekj("input-group",!0),e.Q6J("controlId",t.id)("ngModel",o.model[o.prop])("urlPlaceholder",e.lcZ(7,13,o.tooltipText))("small",!0)}}function Tl(n,i){if(1&n&&(e._UZ(0,"i",8),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Pl(n,i){if(1&n&&(e.YNc(0,Tl,2,3,"i",5),e._UZ(1,"i",9),e.TgZ(2,"a",10),e._uU(3),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("ngClass",t.icon),e.xp6(1),e.Q6J("href",t.href,e.LSH),e.xp6(1),e.Oqu(t.model[t.prop])}}let Ul=(()=>{class n extends k{ngOnChanges(t){if("prop"in t&&(this.profileField=this.profileCfg[this.prop]),"model"in t||"prop"in t){const o=this.model[this.prop];this.href=o?/^[a-z]+:\/\//i.test(o)?o:`http://${o}`:""}super.ngOnChanges(t)}shouldRefreshLockText(t){return!1!==t.prop?.firstChange}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupWebsite",""]],inputs:{icon:"icon",prop:"prop",tooltipText:"tooltipText"},features:[e.qOj,e.TTD],attrs:ml,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw",3,"ngClass","tooltip"],[1,"col-xs-12",3,"controlId","ngModel","urlPlaceholder","small","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"fa","fa-fw",3,"ngClass"],["rel","noopener nofollow","target","_blank",3,"href"]],template:function(t,o){if(1&t&&(e.YNc(0,xl,8,15,"div",0),e.YNc(1,Pl,4,4,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.mk,c.O5,xe.X,D.G,A.K,y.u0,y.k6,$.k,K.y,a.JJ,a.On,g.i9,fl.u,T.H],styles:["[_nghost-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"],changeDetection:0}),n})();
1var Cl=s(82668),vl=s(65224),Dl=s(87563);const yl=["dupCompany",""];function Ml(n,i){if(1&n&&(e._UZ(0,"i",7),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Il(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"input",8),e.NdJ("ngModelChange",function(l){const U=e.CHM(t).$implicit,I=e.oxw(2);return e.KtG(I.model[U.prop]=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw(2);e.Q6J("autocomplete","none")("ngModel",o.model[t.prop])("placeholder",e.lcZ(1,4,t.label))("typeahead",t.data)}}function Ol(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"span",3),e.YNc(2,Ml,2,3,"i",4),e._UZ(3,"i",5),e.ALo(4,"tr"),e.qZA(),e.YNc(5,Il,2,6,"input",6),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(4,4,"professional")),e.xp6(2),e.Q6J("ngForOf",t.edit)("ngForTrackBy",t.tracker)}}function Zl(n,i){if(1&n&&(e._UZ(0,"i",7),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function wl(n,i){if(1&n&&(e.TgZ(0,"span",12),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.model.job_title)}}function Al(n,i){if(1&n&&(e.TgZ(0,"span",12),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.model.company)}}function bl(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.ekj("show",t.view.job_title||t.view.company),e.xp6(1),e.Oqu(t.model.industry)}}function El(n,i){if(1&n&&(e.YNc(0,Zl,2,3,"i",4),e._UZ(1,"i",9),e.YNc(2,wl,2,1,"span",10),e.YNc(3,Al,2,1,"span",10),e.YNc(4,bl,2,3,"span",11)),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(2),e.Q6J("ngIf",t.view.job_title&&t.model.job_title),e.xp6(1),e.Q6J("ngIf",t.view.company&&t.model.company),e.xp6(1),e.Q6J("ngIf",t.view.industry&&t.model.industry)}}let Jl=(()=>{class n extends k{constructor(t,o,l,r,U){super(),this.cdr=t,this.showSvc=o,this.uRes=l,this.metaRes=r,this.loggedInUser=U}ngOnDestroy(){this._destroyed$&&(0,Cl.t)(this._destroyed$)}ngOnInit(){this._destroyed$=new He.c,this.tracker=(0,ft.createTrackFn)("prop"),this.edit=[];const t=this.getInstantiatedModel();this.view={company:!1,industry:!1,job_title:!1},this.showSvc.shouldShow(this.profileCfg.job_title.field,this.loggedInUser,t)&&(this.addInput("currJob","job_title",this.metaRes.jobtitles()),this.view.job_title=!0),this.showSvc.shouldShow(this.profileCfg.company.field,this.loggedInUser,t)&&(this.addInput("company","company",this.metaRes.companies().pipe((0,vl.V)(o=>o.name))),this.view.company=!0),this.showSvc.shouldShow(this.profileCfg.industry.field,this.loggedInUser,t)&&(this.addInput("industry","industry",this.metaRes.industries()),this.view.industry=!0),super.ngOnInit()}resolveLockText(){let t=!1;for(const o of["company","industry","job_title"])switch(this.showSvc.parseUserOption(this.profileCfg[o].field)){case"site-admin":t=!0;break;case 0:return W.OWNER_TOOLTIP}if(t)return W.ADMIN_TOOLTIP}addInput(t,o,l){this.edit.push({data:[],label:t,prop:o});const U=this.edit.length-1;l.pipe((0,Dl.K)(()=>Ve.E),(0,ve.R)(this._destroyed$)).subscribe((0,ie.e)(I=>{if(I.length){const Y=this.edit.slice();Y[U]={...Y[U],data:I},this.edit=Y,this.cdr.markForCheck()}}))}getInstantiatedModel(){if(this.model)return Ct.SP.isGenericResponse(this.model)?this.model:this.uRes.instantiate(this.model)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.sBO),e.Y36(oe.Z),e.Y36(ee.q),e.Y36(Ue.E
1),e.Y36(x.Ej))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupCompany",""]],features:[e.qOj],attrs:yl,decls:3,vars:2,consts:[["class","input-group",4,"ngIf","ngIfElse"],["no",""],[1,"input-group"],[1,"input-group-addon"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-briefcase",3,"tooltip"],["class","form-control",3,"autocomplete","ngModel","placeholder","typeahead","ngModelChange",4,"ngFor","ngForOf","ngForTrackBy"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"form-control",3,"autocomplete","ngModel","placeholder","typeahead","ngModelChange"],[1,"fa","fa-fw","fa-briefcase"],["class","comma-sep",4,"ngIf"],[3,"show",4,"ngIf"],[1,"comma-sep"]],template:function(t,o){if(1&t&&(e.YNc(0,Ol,6,6,"div",0),e.YNc(1,El,5,4,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.sg,c.O5,Dt.r,D.G,A.K,a.Fj,a.JJ,a.On,g.i9,M.Bp,T.H],styles:['.comma-sep[_ngcontent-%COMP%] + .comma-sep[_ngcontent-%COMP%]:before{content:", "}'],changeDetection:0}),n})();var Nl=s(85032);const kl=["dupCurrLocation",""];function Ql(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Ll(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.YNc(3,Ql,2,3,"i",5),e._UZ(4,"i",6),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"div",7)(7,"tg-search-place",8),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.current_location=l)}),e.ALo(8,"tr"),e.qZA()()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(5,9,o.placeholder)),e.xp6(3),e.Q6J("ngModel",o.model.current_location)("clearable",!0)("placeholder",e.lcZ(8,11,o.placeholder))("raw",!1)("controlId",t.id)}}function Sl(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Yl(n,i){if(1&n&&(e.YNc(0,Sl,2,3,"i",5),e._UZ(1,"i",6),e.ALo(2,"tr"),e.TgZ(3,"span"),e._uU(4),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(2,3,t.placeholder)),e.xp6(3),e.Oqu(null==t.model.current_location?null:t.model.current_location.formatted_address)}}let Fl=(()=>{class n extends k{ngOnInit(){this.placeholder="currLocation",super.ngOnInit()}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupCurrLocation",""]],features:[e.qOj],attrs:kl,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["idPlace","id"],[1,"input-group-addon",3,"for"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-map-marker",3,"tooltip"],[1,"drop-select-container"],[3,"ngModel","clearable","placeholder","raw","controlId","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"]],template:function(t,o){if(1&t&&(e.YNc(0,Ll,9,13,"div",0),e.YNc(1,Yl,5,5,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,xe.X,D.G,A.K,y.u0,y.k6,K.y,a.JJ,a.On,g.i9,Nl.U,T.H],styles:[".drop-select-container[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;justify-content:space-between;width:100%}.drop-select-container[_ngcontent-%COMP%] tg-datepicker[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] tg-search-place[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] > tg-dropdown-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();var Kl=s(33234),Rl=s(70578),Bl=s(89464);const Gl=["dupAddress",""];function Wl(n,i){if(1&n&&(e._UZ(0,"i",6),e.ALo(1,"tr")),2&n){const t=e.oxw();e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function jl(n,i){1&n&&(e._UZ(0,"i",7),e.ALo(1,"tr")),2&n&&e.Q6J("tooltip",e.lcZ(1,1,"prefAddressTooltip"))}function Hl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"label")(2,"input",13),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.preferred_address=l)}),e.qZA(),e._UZ(3,"span",3),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngModel",t.model.preferred_address)("checked",t.model.preferred_address===t.modelProp)("value",t.modelProp),e.xp6(1),e.Q6J("translate","prefAddressLabel")}}function $l(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.YNc(1,Hl,4,4,"div",8),e.TgZ(2,"tg-address-edit",9),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.proppedModel=l)}),e.TgZ(3,"span",10),e._UZ(4,"i",11),e.qZA()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.preferredAddress),e.xp6(1),e.Q6J("ngModel",t.proppedModel),e.xp6(2),e.Q6J("ngClass",t.icon)}}function Vl(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=i.ngIf;e.xp6(1),e.hij(", ",t,"")}}function zl(n,i){if(1&n&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.YNc(3,Vl,2,1,"span",16),e.qZA()),2&n){const t=i.ngIf,o=e.oxw(2);e.xp6(2),e.Oqu(t),e.xp6(1),e.Q6J("ngIf",o.proppedModel.line2)}}function ql(n,i){if(1&n&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&n){const t=i.ngIf;e.xp6(1),e.Oqu(t)}}function Xl(n,i){if(1&n&&(e.ynx(0),e.YNc(1,ql,2,1,"div",16),e.BQk()),2&n){const t=i.$implicit,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",o.proppedModel[t])}}
1function es(n,i){if(1&n&&(e.TgZ(0,"div",14)(1,"div")(2,"div"),e._UZ(3,"i",15),e.qZA(),e.TgZ(4,"div"),e.YNc(5,zl,4,2,"div",16),e.YNc(6,Xl,2,1,"ng-container",17),e.qZA()()()),2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngClass",t.icon),e.xp6(2),e.Q6J("ngIf",t.proppedModel.line1),e.xp6(1),e.Q6J("ngForOf",t.autoProps)}}let ts=(()=>{class n extends k{constructor(t,o){super(),this.profileUser=t,this.loggedInUser=o,this.autoProps=Object.freeze(["city","postcode","region","country"])}get proppedModel(){return this.model[this.modelProp]}set proppedModel(t){this.model[this.modelProp]=t}ngOnChanges(t){"modelProp"in t&&(this.icon="address"===this.modelProp?"fa-map":"fa-address-card-o",this.profileField=this.profileCfg[this.modelProp]),super.ngOnChanges(t)}ngOnInit(){this.showPrefAddress=Boolean(this.loggedInUser)&&(this.loggedInUser.id===this.profileUser.id||this.loggedInUser.isSiteAdmin),super.ngOnInit()}shouldRefreshLockText(t){return!1===t.modelProp?.firstChange}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.ADDRESSBOOK_PROFILE_USER),e.Y36(x.Ej))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupAddress",""]],inputs:{modelProp:"modelProp",preferredAddress:"preferredAddress"},features:[e.qOj,e.TTD],attrs:Gl,decls:7,vars:5,consts:[[1,"text-center","text-muted"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],["class","fa fa-check",3,"tooltip",4,"ngIf"],[3,"translate"],[4,"ngIf","ngIfElse"],["no",""],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"fa","fa-check",3,"tooltip"],["class","radio text-center",4,"ngIf"],[3,"ngModel","ngModelChange"],["tgAddressEditAddon",""],[1,"fa","fa-fw",3,"ngClass"],[1,"radio","text-center"],["type","radio",3,"ngModel","checked","value","ngModelChange"],[1,"t"],[1,"fa","fa-fw","m",3,"ngClass"],[4,"ngIf"],[4,"ngFor","ngForOf"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0),e.YNc(1,Wl,2,3,"i",1),e.YNc(2,jl,2,3,"i",2),e._UZ(3,"b",3),e.qZA(),e.YNc(4,$l,5,3,"ng-container",4),e.YNc(5,es,7,3,"ng-template",null,5,e.W1O)),2&t){const l=e.MAs(6);e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("ngIf",o.preferredAddress&&!o.editing&&o.model.preferred_address===o.modelProp&&o.showPrefAddress),e.xp6(1),e.Q6J("translate","prefAddress_"+o.modelProp),e.xp6(1),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.mk,c.sg,c.O5,D.G,X.P,A.K,K.y,a.Fj,a._,a.JJ,a.On,g.i9,Kl.a,Rl.b,Bl.P,T.H],styles:[".t[_ngcontent-%COMP%]{display:table}.t[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-row}.t[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-cell;vertical-align:top}.m[_ngcontent-%COMP%]{margin-right:3px}.radio[_ngcontent-%COMP%]{margin-top:0}"],changeDetection:0}),n})();var ns=s(87399);const os=["dupBirthday",""];function is(n,i){if(1&n&&(e._UZ(0,"i",10),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function ls(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.YNc(3,is,2,3,"i",5),e._UZ(4,"i",6),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"div",7)(7,"tg-clearable-input",8)(8,"tg-datepicker",9),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.birthday=l)}),e.ALo(9,"tr"),e.qZA()()()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(5,12,o.placeholder)),e.xp6(4),e.Q6J("adaptivePosition",!1)("timezone","UTC")("view",o.INITIAL_VIEW)("ngModel",o.model.birthday)("controlId",t.id)("maxDate",o.currDate)("startDate",o.startDate)("placeholder",e.lcZ(9,14,o.placeholder))}}function ss(n,i){if(1&n&&(e._UZ(0,"i",10),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function as(n,i){if(1&n&&(e.YNc(0,ss,2,3,"i",5),e._UZ(1,"i",11),e.TgZ(2,"time"),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(2),e.uIk("datetime",t.model.birthday.toISOString()),e.xp6(1),e.Oqu(e.Dn7(4,3,t.model.birthday,"mediumDate","UTC"))}}let rs=(()=>{class n extends k{constructor(){super(...arguments),this.INITIAL_VIEW=mt.c.YEAR,this.currDate=new Date,this.startDate=ns.utc([1980,0]).toDate()}ngOnInit(){this.placeholder="birthday",super.ngOnInit()}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupBirthday",""]],hostVars:2,hostBindings:function(t,o){2&t&&e.ekj("dup-birthday",!0)},features:[e.qOj],attrs:os,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-gift",3,"tooltip"],[1,"drop-select-container"],[2,"width","100%"],[3,"adaptivePosition","timezone","view","clearable-input-target","ngModel","controlId","maxDate","startDate","placeholder","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"fa","fa-fw","fa-gift"]],template:function(t,o){if(1&t&&(e.YNc(0,ls,10,16,"div",0),e.YNc(1,as,5,7,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,xe.X,D.G,A.K,y.u0,y.k6,K.y,ht.X,xt.s,a.JJ,a.On,Tt.W,Pt.e,g.i9,c.uU,T.H],styles:[".drop-select-container[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;justify-content:space-between;width:100%}.drop-select-container[_ngcontent-%COMP%] tg-datepicker[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] tg-search-place[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] > tg-dropdown-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();const cs=["dupNationality",""];
1function ds(n,i){if(1&n&&(e._UZ(0,"i",11),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function ps(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.YNc(3,ds,2,3,"i",5),e._UZ(4,"i",6),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"div",7)(7,"tg-dropdown-select",8,9),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.nationality=l)}),e.ALo(9,"tr"),e.qZA(),e.TgZ(10,"button",10),e.NdJ("click",function(){e.CHM(t);const l=e.MAs(8);return e.KtG(l.reset())}),e.qZA()()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(5,8,"nationality")),e.xp6(3),e.Q6J("tgMetadataSelect","nationalities")("controlId",t.id)("ngModel",o.model.nationality)("label",e.lcZ(9,10,"selectNationality"))}}function gs(n,i){if(1&n&&(e._UZ(0,"i",11),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function _s(n,i){if(1&n&&(e.YNc(0,gs,2,3,"i",5),e._UZ(1,"i",12),e.TgZ(2,"span"),e._uU(3),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(3),e.Oqu(t.model.nationality)}}let us=(()=>{class n extends k{}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupNationality",""]],features:[e.qOj],attrs:cs,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-flag",3,"tooltip"],[1,"drop-select-container"],[3,"tgMetadataSelect","controlId","ngModel","label","ngModelChange"],["m","ngModel"],["tg-clear-button","",1,"btn-default",3,"click"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"fa","fa-fw","fa-flag"]],template:function(t,o){if(1&t&&(e.YNc(0,ps,11,12,"div",0),e.YNc(1,_s,4,2,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,xe.X,D.G,A.K,y.u0,y.k6,ye.h,Oe._,yt.T,K.y,a.JJ,a.On,d.m,g.i9,T.H],styles:[".drop-select-container[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;justify-content:space-between;width:100%}.drop-select-container[_ngcontent-%COMP%] tg-datepicker[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] tg-search-place[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] > tg-dropdown-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();const fs=["dupVat",""];function ms(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function hs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.ALo(3,"tr"),e.YNc(4,ms,2,3,"i",5),e._UZ(5,"i",6),e.qZA(),e.TgZ(6,"input",7),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.vat.number=l)}),e.ALo(7,"tr"),e.qZA(),e.TgZ(8,"tg-country-input",8),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.vat.country=l)}),e.qZA()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id)("tooltip",e.lcZ(3,9,"vatFields")),e.xp6(2),e.Q6J("ngIf",o.lockText),e.xp6(2),e.Q6J("id",t.id)("ngModel",o.model.vat.number)("placeholder",e.lcZ(7,11,"vatNumber")),e.xp6(2),e.Q6J("name","country")("ngModel",o.model.vat.country)}}function xs(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(3);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Ts(n,i){if(1&n&&(e._UZ(0,"i",9),e.ALo(1,"tr")),2&n){const t=e.oxw(3);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Ps(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"p"),e.YNc(2,xs,2,3,"i",5),e.TgZ(3,"label"),e._uU(4),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"span"),e._uU(7),e.qZA()(),e.TgZ(8,"p"),e.YNc(9,Ts,2,3,"i",5),e.TgZ(10,"label"),e._uU(11),e.ALo(12,"tr"),e.qZA(),e.TgZ(13,"span"),e._uU(14),e.qZA()(),e.BQk()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngIf",t.lockText),e.xp6(2),e.AsE("",e.lcZ(5,10,"vatNumber"),"",":",""),e.xp6(3),e.AsE(""," ","",t.model.vat.number,""),e.xp6(2),e.Q6J("ngIf",t.lockText),e.xp6(2),e.AsE("",e.lcZ(12,12,"vatCountry"),"",":",""),e.xp6(3),e.AsE(""," ","",t.model.vat.country,"")}}
1function Us(n,i){if(1&n&&(e.TgZ(0,"div",10),e._UZ(1,"b",11),e.qZA(),e.YNc(2,Ps,15,14,"ng-container",12)),2&n){const t=e.oxw();e.xp6(1),e.Q6J("translate","vatFields"),e.xp6(1),e.Q6J("ngIf",t.model.vat.number)}}let Cs=(()=>{class n extends k{ngOnInit(){this.model.vat=this.model.vat||{},super.ngOnInit()}}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupVat",""]],features:[e.qOj],attrs:fs,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for","tooltip"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-percent"],["type","text",1,"form-control",3,"id","ngModel","placeholder","ngModelChange"],[3,"name","ngModel","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"text-center","text-muted"],[3,"translate"],[4,"ngIf"]],template:function(t,o){if(1&t&&(e.YNc(0,hs,9,13,"div",0),e.YNc(1,Us,3,2,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,D.G,X.P,A.K,y.u0,y.k6,K.y,a.Fj,a.JJ,a.On,g.i9,f.I,T.H],encapsulation:2,changeDetection:0}),n})();var vs=s(3973);const Ds=["dupSkypeName",""];function ys(n,i){if(1&n&&(e._UZ(0,"i",8),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Ms(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2,3)(2,"label",4),e.YNc(3,ys,2,3,"i",5),e._UZ(4,"i",6),e.ALo(5,"tr"),e.qZA(),e.TgZ(6,"input",7),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.skypename=l)}),e.ALo(7,"tr"),e.qZA()()}if(2&n){const t=e.MAs(1),o=e.oxw();e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(5,7,"skypename")),e.xp6(2),e.Q6J("id",t.id)("ngModel",o.model.skypename)("placeholder",e.lcZ(7,9,"skypename"))}}function Is(n,i){if(1&n&&(e._UZ(0,"i",8),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}
1function Os(n,i){if(1&n&&(e.YNc(0,Is,2,3,"i",5),e._UZ(1,"i",9),e.TgZ(2,"a",10),e._uU(3),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(2),e.Q6J("href",t.href,e.LSH),e.xp6(1),e.Oqu(t.model.skypename)}}let Zs=(()=>{class n extends k{constructor(t){super(),this.sanitizer=t}ngOnChanges(t){if("model"in t){const o=this.model.skypename;this.href=o?this.sanitizer.bypassSecurityTrustUrl(`skype:${o}?chat`):""}super.ngOnChanges(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(vs.H7))},n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupSkypeName",""]],features:[e.qOj,e.TTD],attrs:Ds,decls:3,vars:2,consts:[["class","input-group",3,"autoId",4,"ngIf","ngIfElse"],["no",""],[1,"input-group",3,"autoId"],["id","id"],[1,"input-group-addon",3,"for"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-skype",3,"tooltip"],["type","text",1,"form-control",3,"id","ngModel","placeholder","ngModelChange"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"fa","fa-fw","fa-skype"],["rel","noopener nofollow","target","_blank",3,"href"]],template:function(t,o){if(1&t&&(e.YNc(0,Ms,8,11,"div",0),e.YNc(1,Os,4,3,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,D.G,A.K,y.u0,y.k6,$.k,K.y,a.Fj,a.JJ,a.On,g.i9,T.H],encapsulation:2,changeDetection:0}),n})();const ws=["dupNextOfKin",""];function As(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function bs(n,i){if(1&n&&(e.YNc(0,As,2,3,"i",2),e._UZ(1,"i",3),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"tr"),e.qZA(),e.TgZ(5,"span",4),e._uU(6),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngIf",t.lockText),e.xp6(3),e.hij("",e.lcZ(4,3,"nextOfKin"),": "),e.xp6(3),e.Oqu(t.model.next_of_kin)}}function Es(n,i){if(1&n&&(e._UZ(0,"i",5),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("tooltip",e.lcZ(1,1,t.lockText))}}function Js(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",6,7)(3,"label",8),e.YNc(4,Es,2,3,"i",2),e._UZ(5,"i",9),e.ALo(6,"tr"),e.qZA(),e.TgZ(7,"input",10),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.next_of_kin=l)}),e.ALo(8,"tr"),e.qZA()(),e.BQk()}if(2&n){const t=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("autoId",!1),e.xp6(2),e.Q6J("for",t.id),e.xp6(1),e.Q6J("ngIf",o.lockText),e.xp6(1),e.Q6J("tooltip",e.lcZ(6,7,"nextOfKin")),e.xp6(2),e.Q6J("id",t.id)("ngModel",o.model.next_of_kin)("placeholder",e.lcZ(8,9,"nextOfKin"))}}let Ns=(()=>{class n extends k{}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupNextOfKin",""]],features:[e.qOj],attrs:ws,decls:3,vars:2,consts:[["no",""],[4,"ngIf","ngIfElse"],["class","fa fa-unlock-alt text-danger admin-lock",3,"tooltip",4,"ngIf"],[1,"fa","fa-fw","fa-ambulance"],[1,"word-break"],[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[1,"input-group",3,"autoId"],["fieldId","id"],[1,"input-group-addon",3,"for"],[1,"fa","fa-fw","fa-ambulance",3,"tooltip"],["type","text",1,"form-control",3,"id","ngModel","placeholder","ngModelChange"]],template:function(t,o){if(1&t&&(e.YNc(0,bs,7,5,"ng-template",null,0,e.W1O),e.YNc(2,Js,9,11,"ng-container",1)),2&t){const l=e.MAs(1);e.xp6(2),e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.O5,D.G,A.K,y.u0,y.k6,K.y,a.Fj,a.JJ,a.On,g.i9,T.H],styles:[".word-break[_ngcontent-%COMP%]{overflow-wrap:anywhere;word-break:normal}"],changeDetection:0}),n})();var ks=s(49043);const Qs=["dupLinkedTo",""];let Ls=(()=>{class n extends k{}return n.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(n)))(o||n)}}(),n.\u0275cmp=e.Xpm({type:n,selectors:[["li","dupLinkedTo",""]],features:[e.qOj],attrs:Qs,decls:6,vars:9,consts:[[1,"fa","fa-unlock-alt","text-danger","admin-lock",3,"tooltip"],[3,"ngModel","idsOnly","disabled","ngModelChange"]],template:function(t,o){1&t&&(e._UZ(0,"span",0),e.ALo(1,"tr"),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"tr"),e.qZA(),e.TgZ(5,"tg-user-select",1),e.NdJ("ngModelChange",function(r){return o.model.linked_to=r}),e.qZA()),2&t&&(e.Q6J("tooltip",e.lcZ(1,5,"adminOnlyTT")),e.xp6(3),e.hij("",e.lcZ(4,7,"linkedTo"),": "),e.xp6(2),e.Q6J("ngModel",o.model.linked_to)("idsOnly",!0)("disabled",!o.editing))},dependencies:[D.G,A.K,a.JJ,a.On,g.i9,ks.U,T.H],encapsulation:2,changeDetection:0}),n})();
1function Ys(n,i){if(1&n&&e._UZ(0,"li",20),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",!1)("profileField",t.profileCfg.tags)}}function Fs(n,i){if(1&n&&e._UZ(0,"li",21),2&n){const t=e.oxw();e.Q6J("editing",t.editing)("model",t.model)("profileField",t.profileCfg.memberSince)}}function Ks(n,i){if(1&n&&e._UZ(0,"li",22),2&n){const t=e.oxw();e.Q6J("editing",t.editing)("model",t.model)("user",t.user)("profileField",t.profileCfg.roles)}}function Rs(n,i){if(1&n&&e._UZ(0,"li",23),2&n){const t=e.oxw();e.Q6J("editing",t.editing&&t.iAmAdmin)("model",t.model)("membershipEnabled",t.show.membership)("membershipNumberEnabled",t.show.membership_number)}}function Bs(n,i){if(1&n&&e._UZ(0,"li",24),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)}}function Gs(n,i){if(1&n&&e._UZ(0,"li",25),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("prop","email")("tooltipText","email")("required",!0)}}function Ws(n,i){if(1&n&&e._UZ(0,"li",26),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("prop","secondary_email")("tooltipText","secondaryEmail")}}function js(n,i){if(1&n&&e._UZ(0,"li",27),2&n){const t=i.$implicit,o=e.oxw();e.Q6J("model",o.model)("editing",o.editing)("prop",t.prop)("tooltipText",t.tooltip)("icon",t.icon)}}function Hs(n,i){if(1&n&&e._UZ(0,"li",28),2&n){const t=e.oxw();e.Q6J("model",t.model)("prop","website")("editing",t.editing)("tooltipText","webAddress")("icon","fa-link")}}function $s(n,i){if(1&n&&e._UZ(0,"li",28),2&n){const t=e.oxw();e.Q6J("model",t.model)("prop","linkedin_public_url")("editing",t.editing)("tooltipText","linkedinUrl")("icon","fa-linkedin")}}function Vs(n,i){if(1&n&&e._UZ(0,"li",29),2&n){const t=e.oxw();e.Q6J("editing",t.editing)("model",t.model)("profileField",t.profileCfg.next_of_kin)}}function zs(n,i){if(1&n&&e._UZ(0,"li",30),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.skypename)}}function qs(n,i){if(1&n&&e._UZ(0,"li",31),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.vat_info)}}function Xs(n,i){if(1&n&&e._UZ(0,"li",32),2&n){const t=e.oxw();e.Q6J("model",t.model)}}function ea(n,i){if(1&n&&e._UZ(0,"li",33),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.languages)}}function ta(n,i){if(1&n&&e._UZ(0,"li",34),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.degree)}}function na(n,i){if(1&n&&e._UZ(0,"li",35),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)}}function oa(n,i){if(1&n&&e._UZ(0,"li",36),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.current_location)}}function ia(n,i){if(1&n&&e._UZ(0,"li",38),2&n){const t=e.oxw().$implicit,o=e.oxw();e.Q6J("modelProp",t)("preferredAddress",o.profileCfg.select_preferred_address)("model",o.model)("editing",o.editing)}}function la(n,i){if(1&n&&(e.ynx(0),e.YNc(1,ia,1,4,"li",37),e.BQk()),2&n){const t=i.$implicit,o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.show[t])}}function sa(n,i){if(1&n&&e._UZ(0,"li",39),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.birthday)}}function aa(n,i){if(1&n&&e._UZ(0,"li",40),2&n){const t=e.oxw();e.Q6J("model",t.model)("editing",t.editing)("profileField",t.profileCfg.nationality)}}class ce extends it{constructor(i,t,o,l,r){super(),this.socNetCfg=l,this.showSvc=r,this.hasSocialNetworks=!1,this.enableMemberTags=i.enableOnMembers,this.enableVat=t.enable,this.membershipEnabled=o.enable}get getPhoneFields(){const i=[{icon:"fa-phone",prop:"phone",tooltip:"phone"},{icon:"fa-mobile",prop:"mobile_phone",tooltip:"mobilePhone"},{icon:"fa-building",prop:"work_phone",tooltip:"workPhone"}],t=o=>this.showTruthyField(o.prop);return()=>i.filter(t)}ngOnChanges(i){const t="user"in i;t&&(this.hasSocialNetworks=this.user.hasSocialNetworkSync(this.socNetCfg.networks)),(t||"editing"in i)&&this.refreshVisibility()}ngOnInit(){this.trackPhoneFields=(0,ft.createTrackFn)("prop"),this.addressProps=["address","organisation_address"]}refreshVisibility(){const i=this.user.vat||{};this.show={address:this.showObjectField("address"),birthday:this.showTruthyField("birthday"),company:["company","industry","job_title"].some(t=>this.showTruthyField(t)),current_location:this.showTruthyField("current_location"),degree:this.showTruthyField("degree"),email:this.showTruthyField("email"),languages:this.showArrayField("languages"),linked_to:this.showTruthyField("linked_to"),linkedin_public_url:this.showTruthyField("linkedin_public_url"),membership:this.membershipEnabled&&this.showTruthyField("membership","membership_expires"),membership_number:this.membershipEnabled&&this.showTruthyField("membership_number"),memberSince:this.showTruthyField("memberSince","member_since"),nationality:this.showTruthyField("nationality"),next_of_kin:this.showTruthyField("next_of_kin"),organisation_address:this.showObjectField("organisation_address"),phone_fields:this.getPhoneFields(),roles:this.showArrayField("roles"),secondary_email:this.showTruthyField("secondary_email"),skypename:this.showTruthyField("skypename"),social_networks:this.socNetCfg.networks.length>0&&(this.own||this.hasSocialNetworks&&!this.editing),tags:this.iAmAdmin&&this.enableMemberTags&&!this.editing&&this.showArrayField("tags"),vat_info:this.enableVat&&(this.editing||Boolean(i.number||i.country))&&this.showSvc.shouldShow(this.profileCfg.vat_info.field,this.loggedInUser,this.user),website:this.showTruthyField("website")}}showArrayField(i){return(this.editing||Boolean(this.user[i]?.length))&&this.showViaSvc(i)}showObjectField(i){return(this.editing||!(0,We.Z)(this.user[i]))&&this.showViaSvc(i)}showTruthyField(i,t=i){return(this.editing||Boolean(this.user[t]))&&this.showViaSvc(i)}showViaSvc(i){return this.showSvc.shouldShow(this.profileCfg[i].field,this.loggedInUser,this.user)}}
1function ra(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-user-profile-picture-edit",5),e.NdJ("modelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model=l)}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("model",t.model)}}function ca(n,i){if(1&n&&(e._UZ(0,"img",6),e.ALo(1,"tr")),2&n){const t=e.oxw(2);e.Q6J("alt",e.lcZ(1,2,"profilePicture"))("tg-profile-picture",t.model)}}function da(n,i){if(1&n&&(e.TgZ(0,"div",2),e.YNc(1,ra,1,1,"tg-user-profile-picture-edit",3),e.YNc(2,ca,2,4,"img",4),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.editing),e.xp6(1),e.Q6J("ngIf",t.showProfilePicture)}}function pa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-year-input",11),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(3);return e.KtG(r.model.year.start=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngModel",t.model.year.start)("placeholder",e.lcZ(1,3,"startYear"))("clearable",!0)}}function ga(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-year-input",11),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(3);return e.KtG(r.model.year.end=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngModel",t.model.year.end)("placeholder",e.lcZ(1,3,"endYear"))("clearable",!0)}}function _a(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,pa,2,5,"tg-year-input",10),e.YNc(2,ga,2,5,"tg-year-input",10),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.start),e.xp6(1),e.Q6J("ngIf",t.end)}}function ua(n,i){1&n&&(e.TgZ(0,"span",14),e._uU(1,"\xa0\u2013\xa0"),e.qZA())}function fa(n,i){if(1&n&&(e.TgZ(0,"span",14),e._uU(1),e.ALo(2,"date"),e.qZA(),e.YNc(3,ua,2,0,"span",13)),2&n){const t=e.oxw(4);e.xp6(1),e.hij("\u2019",e.xi3(2,2,t.formatYear(t.model.year.start),"yy"),""),e.xp6(2),e.Q6J("ngIf",t.model.year.end)}}function ma(n,i){if(1&n&&(e.TgZ(0,"span",14),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij("\u2019",e.xi3(2,1,t.formatYear(t.model.year.end),"yy"),"")}}function ha(n,i){if(1&n&&(e.YNc(0,fa,4,5,"ng-template",12),e.YNc(1,ma,3,4,"span",13)),2&n){const t=e.oxw(3);e.Q6J("ngIf",t.model.year.start),e.xp6(1),e.Q6J("ngIf",t.model.year.end)}}function xa(n,i){if(1&n&&e.YNc(0,ha,2,2,"ng-template",12),2&n){const t=e.oxw(2);e.Q6J("ngIf",(null==t.model.year?null:t.model.year.start)||(null==t.model.year?null:t.model.year.end))}}function Ta(n,i){if(1&n&&(e.TgZ(0,"div",7),e.YNc(1,_a,3,2,"div",8),e.YNc(2,xa,1,1,"ng-template",null,9,e.W1O),e.qZA()),2&n){const t=e.MAs(3),o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.editing)("ngIfElse",t)}}ce.\u0275fac=function(i){return new(i||ce)(e.Y36(x.K7),e.Y36(x.s),e.Y36(x.q),e.Y36(x.gh),e.Y36(oe.Z))},ce.\u0275cmp=e.Xpm({type:ce,selectors:[["ul","dpList",""]],hostVars:2,hostBindings:function(i,t){2&i&&e.ekj("list-group",!0)},features:[e.qOj,e.TTD],attrs:["dpList",""],decls:21,vars:22,consts:[["dupTags","",3,"model","editing","profileField",4,"ngIf"],["dupMemberSince","",3,"editing","model","profileField",4,"ngIf"],["dupRoles","",3,"editing","model","user","profileField",4,"ngIf"],["dupMembership","",3,"editing","model","membershipEnabled","membershipNumberEnabled",4,"ngIf"],["dupLinkedTo","",3,"model","editing",4,"ngIf"],["dupEmail","",3,"model","editing","prop","tooltipText","required",4,"ngIf"],["dupEmail","",3,"model","editing","prop","tooltipText",4,"ngIf"],["dupPhone","",3,"model","editing","prop","tooltipText","icon",4,"ngFor","ngForOf","ngForTrackBy"],["dupWebsite","",3,"model","prop","editing","tooltipText","icon",4,"ngIf"],["dupNextOfKin","",3,"editing","model","profileField",4,"ngIf"],["dupSkypeName","",3,"model","editing","profileField",4,"ngIf"],["dupVat","",3,"model","editing","profileField",4,"ngIf"],["dupSocialNet","",3,"model",4,"ngIf"],["dupLang","",3,"model","editing","profileField",4,"ngIf"],["dupDegreeUni","",3,"model","editing","profileField",4,"ngIf"],["dupCompany","",3,"model","editing",4,"ngIf"],["dupCurrLocation","",3,"model","editing","profileField",4,"ngIf"],[4,"ngFor","ngForOf"],["dupBirthday","",3,"model","editing","profileField",4,"ngIf"],["dupNationality","",3,"model","editing","profileField",4,"ngIf"],["dupTags","",3,"model","editing","profileField"],["dupMemberSince","",3,"editing","model","profileField"],["dupRoles","",3,"editing","model","user","profileField"],["dupMembership","",3,"editing","model","membershipEnabled","membershipNumber
1Enabled"],["dupLinkedTo","",3,"model","editing"],["dupEmail","",3,"model","editing","prop","tooltipText","required"],["dupEmail","",3,"model","editing","prop","tooltipText"],["dupPhone","",3,"model","editing","prop","tooltipText","icon"],["dupWebsite","",3,"model","prop","editing","tooltipText","icon"],["dupNextOfKin","",3,"editing","model","profileField"],["dupSkypeName","",3,"model","editing","profileField"],["dupVat","",3,"model","editing","profileField"],["dupSocialNet","",3,"model"],["dupLang","",3,"model","editing","profileField"],["dupDegreeUni","",3,"model","editing","profileField"],["dupCompany","",3,"model","editing"],["dupCurrLocation","",3,"model","editing","profileField"],["dupAddress","",3,"modelProp","preferredAddress","model","editing",4,"ngIf"],["dupAddress","",3,"modelProp","preferredAddress","model","editing"],["dupBirthday","",3,"model","editing","profileField"],["dupNationality","",3,"model","editing","profileField"]],template:function(i,t){1&i&&(e.YNc(0,Ys,1,3,"li",0),e.YNc(1,Fs,1,3,"li",1),e.YNc(2,Ks,1,4,"li",2),e.YNc(3,Rs,1,4,"li",3),e.YNc(4,Bs,1,2,"li",4),e.YNc(5,Gs,1,5,"li",5),e.YNc(6,Ws,1,4,"li",6),e.YNc(7,js,1,5,"li",7),e.YNc(8,Hs,1,5,"li",8),e.YNc(9,$s,1,5,"li",8),e.YNc(10,Vs,1,3,"li",9),e.YNc(11,zs,1,3,"li",10),e.YNc(12,qs,1,3,"li",11),e.YNc(13,Xs,1,1,"li",12),e.YNc(14,ea,1,3,"li",13),e.YNc(15,ta,1,3,"li",14),e.YNc(16,na,1,2,"li",15),e.YNc(17,oa,1,3,"li",16),e.YNc(18,la,2,1,"ng-container",17),e.YNc(19,sa,1,3,"li",18),e.YNc(20,aa,1,3,"li",19)),2&i&&(e.Q6J("ngIf",t.show.tags),e.xp6(1),e.Q6J("ngIf",t.show.memberSince),e.xp6(1),e.Q6J("ngIf",t.show.roles),e.xp6(1),e.Q6J("ngIf",t.show.membership||t.show.membership_number),e.xp6(1),e.Q6J("ngIf",t.show.linked_to),e.xp6(1),e.Q6J("ngIf",t.show.email),e.xp6(1),e.Q6J("ngIf",t.show.secondary_email),e.xp6(1),e.Q6J("ngForOf",t.show.phone_fields)("ngForTrackBy",t.trackPhoneFields),e.xp6(1),e.Q6J("ngIf",t.show.website),e.xp6(1),e.Q6J("ngIf",t.show.linkedin_public_url),e.xp6(1),e.Q6J("ngIf",t.show.next_of_kin),e.xp6(1),e.Q6J("ngIf",t.show.skypename),e.xp6(1),e.Q6J("ngIf",t.show.vat_info),e.xp6(1),e.Q6J("ngIf",t.show.social_networks),e.xp6(1),e.Q6J("ngIf",t.show.languages),e.xp6(1),e.Q6J("ngIf",t.show.degree),e.xp6(1),e.Q6J("ngIf",t.show.company),e.xp6(1),e.Q6J("ngIf",t.show.current_location),e.xp6(1),e.Q6J("ngForOf",t.addressProps),e.xp6(1),e.Q6J("ngIf",t.show.birthday),e.xp6(1),e.Q6J("ngIf",t.show.nationality))},dependencies:[c.sg,c.O5,Vo,si,re,Ai,Ni,Fi,zi,il,ul,Ul,Jl,Fl,ts,rs,us,Cs,Zs,Ns,Ls],encapsulation:2,changeDetection:0}),(0,Ce.gn)([(0,Ge.a)()],ce.prototype,"getPhoneFields",null);let Pa=(()=>{class n extends Ie{constructor(t){super(),this.parent=t;const o=t.profileCfg.year;this.start=o.start,this.end=o.end}formatYear(t){const o=new Date;return o.setFullYear(t),o}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(se))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-profile-picture"]],hostVars:2,hostBindings:function(t,o){2&t&&e.ekj("media",!0)},inputs:{showProfilePicture:"showProfilePicture"},features:[e.qOj],decls:2,vars:2,consts:[["class","media-left",4,"ngIf"],["class","media-body",4,"ngIf"],[1,"media-left"],[3,"model","modelChange",4,"ngIf"],["class","profile-pic",3,"alt","tg-profile-picture",4,"ngIf"],[3,"model","modelChange"],[1,"profile-pic",3,"alt","tg-profile-picture"],[1,"media-body"],[4,"ngIf","ngIfElse"],["profileYearNotEditing",""],[3,"ngModel","placeholder","clearable","ngModelChange",4,"ngIf"],[3,"ngModel","placeholder","clearable","ngModelChange"],[3,"ngIf"],["class","profile-year",4,"ngIf"],[1,"profile-year"]],template:function(t,o){1&t&&(e.YNc(0,da,3,2,"div",0),e.YNc(1,Ta,4,2,"div",1)),2&t&&(e.Q6J("ngIf",o.editing||o.showProfilePicture),e.xp6(1),e.Q6J("ngIf",o.start||o.end))},dependencies:[c.O5,a.JJ,a.On,fe.Y,b,H.u,c.uU,T.H],styles:["[_nghost-%COMP%]{display:block}.profile-year[_ngcontent-%COMP%]{font-size:4em;font-weight:700;text-shadow:3px 3px #e3e3e3}.profile-pic[_ngcontent-%COMP%]{height:90px;width:90px}"],changeDetection:0}),n})();var Ua=s(62174),Ca=s(22787);function va(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",17)(1,"tg-dropdown-select",18,19),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(3);return e.KtG(r.model.title=l)}),e.ALo(3,"tr"),e.qZA(),e.TgZ(4,"button",20),e.NdJ("click",function(){e.CHM(t);const l=e.MAs(2);return e.KtG(l.reset())}),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("array",t.titles)("ngModel",t.model.title)("label",e.lcZ(3,3,"title"))}}
1function Da(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"input",21),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(3);return e.KtG(r.model.title=l)}),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngModel",t.model.title)}}function ya(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span",22)(1,"button",23),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.customTitle=!l.customTitle)}),e._UZ(2,"i",24),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(2),e.Q6J("ngClass",t.customTitle?"fa-list":"fa-pencil")}}function Ma(n,i){if(1&n&&(e.TgZ(0,"div",13),e.YNc(1,va,5,5,"ng-template",null,14,e.W1O),e.YNc(3,Da,1,1,"input",15),e.YNc(4,ya,3,1,"span",16),e.qZA()),2&n){const t=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngIf",o.customTitle)("ngIfElse",t),e.xp6(1),e.Q6J("ngIf",o.profileCfg.custom_title)}}function Ia(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"input",25),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.middlename=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngModel",t.model.middlename)("placeholder",e.lcZ(1,2,"middlename"))}}function Oa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"input",25),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.maidenname=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngModel",t.model.maidenname)("placeholder",e.lcZ(1,2,"maidenname"))}}function Za(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"input",25),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.postnominals=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngModel",t.model.postnominals)("placeholder",e.lcZ(1,2,"postnominals"))}}function wa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"tg-gender-edit",26),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.gender=l)}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngModel",t.model.gender)}}function Aa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"input",25),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw(2);return e.KtG(r.model.pronouns=l)}),e.ALo(1,"tr"),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngModel",t.model.pronouns)("placeholder",e.lcZ(1,2,"pronouns"))}}const Mt=function(n){return{required:n}};function ba(n,i){if(1&n&&(e._UZ(0,"tg-help-block",27),e.ALo(1,"tr")),2&n){e.oxw();const t=e.MAs(6);e.Q6J("errors",t.errors)("messages",e.VKq(4,Mt,e.lcZ(1,2,"firstnameRequired")))}}function Ea(n,i){if(1&n&&(e._UZ(0,"tg-help-block",27),e.ALo(1,"tr")),2&n){e.oxw();const t=e.MAs(10);e.Q6J("errors",t.errors)("messages",e.VKq(4,Mt,e.lcZ(1,2,"lastnameRequired")))}}function Ja(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2)(1,"div",3)(2,"div",4),e._UZ(3,"i",5),e.qZA(),e.YNc(4,Ma,5,3,"div",6),e.TgZ(5,"input",7,8),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.firstname=l)}),e.ALo(7,"tr"),e.qZA(),e.YNc(8,Ia,2,4,"input",9),e.TgZ(9,"input",7,10),e.NdJ("ngModelChange",function(l){e.CHM(t);const r=e.oxw();return e.KtG(r.model.lastname=l)}),e.ALo(11,"tr"),e.qZA(),e.YNc(12,Oa,2,4,"input",9),e.YNc(13,Za,2,4,"input",9),e.YNc(14,wa,1,1,"tg-gender-edit",11),e.YNc(15,Aa,2,4,"input",9),e.qZA(),e.YNc(16,ba,2,6,"tg-help-block",12),e.YNc(17,Ea,2,6,"tg-help-block",12),e.qZA()}if(2&n){const t=e.MAs(6),o=e.MAs(10),l=e.oxw();e.xp6(4),e.Q6J("ngIf",l.show.title),e.xp6(1),e.Q6J("ngModel",l.model.firstname)("placeholder",e.lcZ(7,12,"firstname")),e.xp6(3),e.Q6J("ngIf",l.show.middlename),e.xp6(1),e.Q6J("ngModel",l.model.lastname)("placeholder",e.lcZ(11,14,"lastname")),e.xp6(3),e.Q6J("ngIf",l.show.maidenname),e.xp6(1),e.Q6J("ngIf",l.show.postnominals),e.xp6(1),e.Q6J("ngIf",l.show.gender),e.xp6(1),e.Q6J("ngIf",l.show.pronouns),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.touched)&&t.invalid),e.xp6(1),e.Q6J("ngIf",(null==o?null:o.touched)&&o.invalid)}}function Na(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.model.title," ")}}function ka(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"tr"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE("",e.xi3(2,2,"fullNameWithMaidenName",t.fullNameWithMaidenNamePH),""," ","")}}function Qa(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij("",t.fullName," ")}}
1function La(n,i){if(1&n&&e.YNc(0,Qa,2,1,"span",28),2&n){const t=e.oxw(2);e.Q6J("ngIf",t.fullName)}}function Sa(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.model.postnominals," ")}}function Ya(n,i){if(1&n&&(e.TgZ(0,"a",35),e._UZ(1,"i",36),e.qZA()),2&n){const t=e.oxw(2);e.Q6J("uiParams",t.messagingSref)}}const Fa=function(n){return{blogName:n}};function Ka(n,i){if(1&n&&(e.TgZ(0,"span",37)(1,"a",38),e._uU(2),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("uiParams",e.VKq(2,Fa,t.model.blog_name)),e.xp6(1),e.Oqu(t.model.blog_name)}}function Ra(n,i){1&n&&e._UZ(0,"dot-separator")}function Ba(n,i){if(1&n&&(e.TgZ(0,"span",39),e._uU(1),e.ALo(2,"tr"),e.qZA(),e.YNc(3,Ra,1,0,"dot-separator",28)),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,2,t.model.gender)),e.xp6(2),e.Q6J("ngIf",t.show.pronouns&&t.model.pronouns)}}function Ga(n,i){if(1&n&&(e.TgZ(0,"span",39),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.model.pronouns)}}function Wa(n,i){if(1&n&&(e.TgZ(0,"h3"),e.YNc(1,Na,2,1,"span",28),e.YNc(2,ka,3,5,"span",29),e.YNc(3,La,1,1,"ng-template",null,30,e.W1O),e.YNc(5,Sa,2,1,"span",28),e.YNc(6,Ya,2,1,"a",31),e.YNc(7,Ka,3,4,"span",32),e.qZA(),e.YNc(8,Ba,4,4,"ng-template",33),e.YNc(9,Ga,2,1,"span",34)),2&n){const t=e.MAs(4),o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.show.title&&o.model.title),e.xp6(1),e.Q6J("ngIf",o.show.maidenname&&o.model.maidenname)("ngIfElse",t),e.xp6(3),e.Q6J("ngIf",o.show.postnominals),e.xp6(1),e.Q6J("ngIf",!o.own&&o.messagingEnabled),e.xp6(1),e.Q6J("ngIf",o.profileCfg.blog_name&&o.model.blog_name&&o.blogsEnabled),e.xp6(1),e.Q6J("ngIf",o.show.gender),e.xp6(1),e.Q6J("ngIf",o.show.pronouns&&o.model.pronouns)}}let ja=(()=>{class n extends Ie{constructor(t,o,l,r,U,I,Y){super(),this.cdr=t,this.uRes=o,this.titles=U,this.showSvc=I,this.loggedInUser=Y,this.customTitle=!1,this.blogsEnabled=l.enable,this.messagingEnabled=r.enable&&this.profileCfg.messaging_icon}get fullNameWithMaidenNamePH(){return{fullName:this.fullName,maidenName:this.model.maidenname||""}}ngOnChanges(t){"model"in t&&(this.fullName=this.uRes.instantiate(this.model).fullName,this.messagingEnabled&&this.model.id!==this.messagingSref?.participants[0]&&(this.messagingSref={participants:[this.model.id]}),this.profileCfg.custom_title&&(this.customTitle=Boolean(this.model.title)&&!this.titles.includes(this.model.title)),t.model.firstChange||this.refreshVisibility()),super.ngOnChanges(t)}ngOnInit(){this.refreshVisibility(),super.ngOnInit()}refreshVisibility(){const t=this.uRes.instantiate(this.model);this.show={gender:this.shouldShow("gender",t),maidenname:this.shouldShow("maidenname",t),middlename:this.shouldShow("middlename",t),postnominals:this.shouldShow("postnominals",t),pronouns:this.shouldShow("pronouns",t),title:this.shouldShow("title",t)},this.cdr.markForCheck()}shouldShow(t,o){return(this.editing||Boolean(this.model[t]))&&this.showSvc.shouldShow(this.profileCfg[t],this.loggedInUser,o)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.sBO),e.Y36(ee.q),e.Y36(x.Vz),e.Y36(x.p$),e.Y36(F.ADDRESSBOOK_PROFILE_TITLES),e.Y36(oe.Z),e.Y36(x.Ej))},n.\u0275cmp=e.Xpm({type:n,selectors:[["tg-dup-title-names"]],inputs:{own:"own"},features:[e.qOj,e.TTD],decls:3,vars:2,consts:[["class","form-group",4,"ngIf","ngIfElse"],["notEditing",""],[1,"form-group"],[1,"input-group"],[1,"input-group-addon"],[1,"fa-fw","fa","fa-user"],["class","input-group","style","width:100%",4,"ngIf"],["type","text","required","",1,"form-control",3,"ngModel","placeholder","ngModelChange"],["firstname","ngModel"],["class","form-control","type","text",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],["lastname","ngModel"],[3,"ngModel","ngModelChange",4,"ngIf"],[3,"errors","messages",4,"ngIf"],[1,"input-group",2,"width","100%"],["stdTitle",""],["class","form-control","type","text",3,"ngModel","ngModelChange",4,"ngIf","ngIfElse"],["class","input-group-btn",4,"ngIf"],[1,"drop-select-container"],[3,"array","ngModel","label","ngModelChange"],["stdTitleCtrl","ngModel"],["tg-clear-button","",1,"btn-default",3,"click"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],[1,"input-group-btn"],[1,"btn","btn-default",3,"click"],[1,"fa-fw","fa",3,"ngClass"],["type","text",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"errors","messages"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["tplFullName",""],["uiSref","messaging.create",3,"uiParams",4,"ngIf"],["class","small",4,"ngIf"],[3,"ngIf"],["class","text-muted",4,"ngIf"],["uiSref","messaging.create",3,"uiParams"],[1,"fa","fa-fw","fa-comment-o"],[1,"small"],["uiSref","blog.name",3,"uiParams"],[1,"text-muted"]],template:function(t,o){if(1&t&&(e.YNc(0,Ja,18,16,"div",0),e.YNc(1,Wa,10,8,"ng-template",null,1,e.W1O)),2&t){const l=e.MAs(2);e.Q6J("ngIf",o.editing)("ngIfElse",l)}},dependencies:[c.mk,c.O5,D.G,vt._,ye.h,Ua.j,$.k,m.UISref,m.AnchorUISref,Oe._,a.Fj,a.JJ,a.Q7,a.On,d.m,Ca.p,T.H],styles:[".drop-select-container[_ngcontent-%COMP%]{display:flex;flex:1 0 auto;justify-content:space-between;width:100%}.drop-select-container[_ngcontent-%COMP%] tg-datepicker[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] tg-search-place[_ngcontent-%COMP%], .drop-select-container[_ngcontent-%COMP%] > tg-dropdown-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();var Ha=s(17789),$a=s(11336);let Va=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[v.GlobalModule,h.f,Z.o,a.u5,C.mr,a.UX,Ae._,At.x,S.b,Q.W,j.b,b,Zt.B,wt.z,_.D,p.g,d.m,O.ValidateUserEmailModule,u.CopyButtonModule,f.I,B.UrlInputModule,M.H3,N,w.F,H.u,P.x,g.z8,L.b,Ot.L,m.UIRouterModule.forChild({config:ne.Z.config(Bo)}),It.Q]}),n})();e.B6R(lt,function(){return[c.O5,D.G,X.P,A.K,$.k,m.UISref,m.AnchorUISref,Ha.U,$a.N,g.i9,ja,ce,Pa]},function(){return[c.uU,T.H]})},88613:(V,E,s)=>{s.d(E,{g:()=>d});var a=s(64762),m=s(662),C=s(5296),g=s(14026),M=s(9803),w=s(25336),v=s(11083),L=s(75372),c=s(3811),e=s(87563),J=s(85597),R=s(56625),N=s(48e3),P=s(6875),Z=s(45178);class d{constructor(u,f,O){this.main=u,this.inj=f,this.metaRes=O,this.metaKey$=new M.X(void 0)}ngOnDestroy(){this.metaKey$.complete()}ngOnInit(){this.metaKey$.pipe((0,L.h)(Boolean),(0,c.w)(u=>{let f;if(u instanceof g.OlP)try{f=(0,w.of)(this.inj.get(u))}catch(O){f=(0,v._)(()=>O)}else f=this.tryFetch(u);return f.pipe((0,C.H)("[ArraySelectPullFromMetadataDirective.metaKey]"),(0,e.K
1)((O,_)=>_))}),(0,J.R)(this.metaKey$.pipe((0,R.Z)()))).subscribe((0,m.e)(u=>{this.main.items=u}))}tryFetch(u){return"function"!=typeof this.metaRes[u]?(0,v._)(()=>new Error(`metaKey ${u} not a key of MetadataResource`)):this.metaRes[u]()}}d.\u0275fac=function(u){return new(u||d)(g.Y36(P.w),g.Y36(g.zs3),g.Y36(Z.E))},d.\u0275dir=g.lG2({type:d,selectors:[["tg-array-select","pullFromMetadata","",3,"items",""]],inputs:{metaKey:["pullFromMetadata","metaKey"]}}),(0,a.gn)([(0,N.Z)("metaKey$")],d.prototype,"metaKey",void 0)},16936:(V,E,s)=>{s.d(E,{T:()=>p});var a=s(64762),m=s(82668),C=s(5296),g=s(14026),M=s(9803),w=s(92706),v=s(25336),L=s(3811),c=s(89969),e=s(85597),J=s(56625),R=s(83375),N=s(48e3),P=s(13460),Z=s(80499),d=s(45178);class p{constructor(f,O){this.inj=f,this.metaRes=O,this._key$=new M.X(void 0),this._ready$=new w.c,this.fieldsReady$=this._ready$.asObservable()}ngOnDestroy(){(0,R.completeAll)(this._key$,this._ready$)}ngOnInit(){const f=this.inj.get(Z._);this._key$.pipe((0,L.w)(O=>{if("string"!=typeof O)return(0,v.of)(null);if(!this.metaRes[O])throw new Error(`${O} is an invalid metadata`);return this.metaRes[O]().pipe((0,c.b)(_=>{_[0]instanceof Object?f.items=_:f.array=_}))}),(0,C.H)("[TgMetadataSelect.init]"),(0,e.R)(this._key$.pipe((0,J.Z)(null,null)))).subscribe(()=>{(0,m.t)(this._ready$)})}}p.\u0275fac=function(f){return new(f||p)(g.Y36(g.zs3),g.Y36(d.E))},p.\u0275dir=g.lG2({type:p,selectors:[["tg-dropdown-select","tgMetadataSelect",""]],inputs:{metadataKey:["tgMetadataSelect","metadataKey"]},features:[g._Bn([{provide:P.N,useExisting:(0,g.Gpc)(()=>p)}])]}),(0,a.gn)([(0,N.Z)("_key$")],p.prototype,"metadataKey",void 0)},16516:(V,E,s)=>{s.d(E,{_:()=>z});var a=s(14026),m=s(15791),C=s(74831),g=s(15859),M=s(97482),w=s(56788),v=s(83375),L=s(79662),c=s(72313),e=s(25275),J=s(90237),R=s(94953),N=s(95612),P=s(46477),Z=s(34998),d=s(41157),p=s(61322),u=s(78611),f=s(64177),O=s(85868),_=s(5830),S=s(64683);const j=function(b,Q){return[b,Q]};function _e(b,Q){if(1&b){const h=a.EpF();a.TgZ(0,"img",12,13),a.NdJ("click.passive",function(){const Ae=a.CHM(h).$implicit,ne=a.oxw(2);return a.KtG(ne.onSourceClick(Ae))}),a.qZA()}if(2&b){const h=Q.$implicit,B=a.MAs(1),H=a.oxw(2);a.ekj("d-none",B.busy||!B.src||B.src===H.anon),a.Q6J("placement","bottom")("container","body")("tooltip",h.label)("alt",h.label)("tgFallbackImage",a.WLB(7,j,h.url,H.anon))}}function Ze(b,Q){1&b&&(a.TgZ(0,"div",14),a._UZ(1,"i",10),a.qZA())}function te(b,Q){if(1&b&&(a.TgZ(0,"div",5),a.YNc(1,_e,2,10,"img",6),a.TgZ(2,"tg-upload-drop-outlet",7),a.ALo(3,"tr"),a.YNc(4,Ze,2,0,"div",8),a.TgZ(5,"div",9),a._UZ(6,"i",10),a.qZA()()(),a._UZ(7,"input",11)),2&b){const h=a.oxw();a.xp6(1),a.Q6J("ngForOf",h.sources)("ngForTrackBy",h.trackByTy),a.xp6(1),a.Q6J("tooltip",a.lcZ(3,5,"uploadNew"))("placement","bottom")("container","body")}}function ue(b,Q){if(1&b&&(a.TgZ(0,"div",15),a._UZ(1,"i",16),a.TgZ(2,"span"),a._uU(3),a.qZA()(),a.Hsn(4)),2&b){const h=a.oxw();a.xp6(3),a.Oqu(h.pictureLabel)}}function fe(b,Q){1&b&&a._UZ(0,"tg-loader-spinner",17)}const T={aspectRatio:1,backgroundColor:"white",enableRotation:!0,onlyScaleDown:!0,resizeToHeight:4096,resizeToWidth:4096};let z=(()=>{class b{constructor(){this.anon=(0,a.f3M)(c.sG),this.busy=!1,this.cropperConfig=T,this.sourceClick=new a.vpe,this.uploaded=new a.vpe,this.cdr=(0,a.f3M)(a.sBO),this.el=(0,a.f3M)(a.SBq).nativeElement}set cssHeight(h){this.el.style.setProperty("--tg-pp-height",`${h}px`)}set cssWidth(h){this.el.style.setProperty("--tg-pp-width",`${h}px`)}ngOnChanges(h){h.width&&(this.cssWidth=this.width),h.height&&(this.cssHeight=this.height),(h.cropperConfig||h.width||h.height)&&(this.cropperConfig={...T,as
1pectRatio:this.width/this.height,cropperMinHeight:this.height,cropperMinWidth:this.width,...this.cropperConfig})}ngOnDestroy(){(0,v.completeAll)(this.sourceClick,this.uploaded)}onEvent(h){switch(h.type){case"cancel":this.busy=!1,this.cdr.markForCheck();break;case"start":this.busy=!0,this.updatePopover.hide(),this.cdr.markForCheck();break;case"uploaded":this.busy=!1,this.uploaded.emit(h.file),this.cdr.markForCheck()}}onSourceClick(h){this.updatePopover.hide(),this.sourceClick.emit(h)}}return b.DEFAULT_CONFIG=T,b})();z.prototype.trackByTy=(0,L.createTrackFn)("ty"),z.\u0275fac=function(Q){return new(Q||z)},z.\u0275cmp=a.Xpm({type:z,selectors:[["tg-profile-picture-edit-shell"]],viewQuery:function(Q,h){if(1&Q&&a.Gf(m.k5,5),2&Q){let B;a.iGM(B=a.CRH())&&(h.updatePopover=B.first)}},inputs:{cropperConfig:"cropperConfig",height:"height",pictureLabel:"pictureLabel",popoverTitle:"popoverTitle",query:"query",sources:"sources",width:"width"},outputs:{sourceClick:"sourceClick",uploaded:"uploaded"},standalone:!0,features:[a._Bn([],[{provide:M.z,useValue:"profilePictureEdit"}]),a.TTD,a.jDz],ngContentSelectors:["*"],decls:7,vars:10,consts:[[1,"dyn-sized",3,"popover","popoverTitle","cropImage","cropperConfig","placement","container","query","multi","onCrop"],["up","tg-upload-outlet"],["tplPopover",""],["tplNotBusy",""],["class","dyn-sized",4,"ngIf","ngIfElse"],[1,"d-flex","flex-row","flex-wrap"],["class","p dyn-sized",3,"d-none","placement","container","tooltip","alt","tgFallbackImage","click.passive",4,"ngFor","ngForOf","ngForTrackBy"],[1,"d-inline-block","p","dyn-sized",3,"controlsUploadInput","tooltip","placement","container"],["class","text-success file-drop-inner text-center dyn-sized justify-content-center",4,"uploadDropHoverTemplate"],[1,"file-drop-inner","text-center","dyn-sized","justify-content-center"],[1,"fa","fa-upload","fa-3x"],["type","file","accept","image/*","ngFileSelect","",1,"d-none"],[1,"p","dyn-sized",3,"placement","container","tooltip","alt","tgFallbackImage","click.passive"],["img","tgFallbackImage"],[1,"text-success","file-drop-inner","text-center","dyn-sized","justify-content-center"],[1,"edit-image-overlay","dyn-sized","flex-column","justify-content-center","text-center","d-flex"],[1,"fa","fa-pencil","fa-4x"],[1,"dyn-sized"]],template:function(Q,h){if(1&Q&&(a.F$t(),a.TgZ(0,"tg-upload-outlet",0,1),a.NdJ("onCrop",function(H){return h.onEvent(H)}),a.YNc(2,te,8,7,"ng-template",null,2,a.W1O),a.YNc(4,ue,5,1,"ng-template",null,3,a.W1O),a.YNc(6,fe,1,0,"tg-loader-spinner",4),a.qZA()),2&Q){const B=a.MAs(3),H=a.MAs(5);a.Q6J("popover",B)("popoverTitle",h.popoverTitle)("cropImage",!0)("cropperConfig",h.cropperConfig)("placement","right")("container",void 0)("query",h.query)("multi",!1),a.xp6(6),a.Q6J("ngIf",h.busy)("ngIfElse",H)}},dependencies:[e.FallbackImageModule,R.Q,J.I,w.c,N.O,P.u,Z.h,d.i,p.U,u.qx,m.UU,m.k5,C.z8,C.i9,g.GlobalModule,f.sg,f.O5,O.G,_.K,S.H],styles:["[_nghost-%COMP%]{--tg-zindex:1000;cursor:pointer;display:block}[_nghost-%COMP%] >popover-container{z-index:var(--tg-zindex)}[_nghost-%COMP%] .dyn-sized{height:var(--tg-pp-height);width:var(--tg-pp-width)}.p[_ngcontent-%COMP%]{cursor:pointer;margin-bottom:var(--tg-space-1);margin-right:var(--tg-space-1)}.edit-image-overlay[_ngcontent-%COMP%]{--tg-opacity:.5;--tg-transition:all .35s ease;background-color:rgba(0,0,0,var(--tg-opacity));color:#fff;left:0;position:absolute;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000;top:0;transition:var(--tg-transition);z-index:var(--tg-zindex)}.edit-image-overlay[_ngcontent-%COMP%]:hover{--tg-opacity:.75;text-shadow:none}.file-drop-inner[_ngcontent-%COMP%]{align-items:center;background-color:#d3d3d3;border:1px dashed #000;display:flex;line-height:var(--tg-pp-height);vertical-align:middle}tg-upload-outlet[_ngcontent-%COMP%]{display:block;position:relative}"],changeDetection:0})},12934:(V,E,s)=>{s.d(E,{s:()=>R});var a=s(14026),m=s(8592),C=s(21705),M=s(64177),w=s(85868),v=s(5830),L=s(74831),c=s(64683);function e(N,P){if(1&N){const Z=a.EpF();a.TgZ(0,"div",1),a.NdJ("click",function(p){a.CHM(Z);const u=a.oxw();return a.KtG(u.removed.emit(p))}),a.ALo(1,"tr"),a.qZA()}2&N&&a.Q6J("tooltip",a.xi3(1,1,"rm","common"))}const J=["*"];(0,m.applyGlobalStyle)("taglabel",".taglabel{display:inline-block;margin-left:3px;margin-right:3px;white-space:inherit}.taglabel>a{color:#fff}.taglabel.removable{cursor:pointer;display:inline-block;margin-left:5px;opacity:.5}.taglabel.removable:hover{opacity:1}");let R=(()=>{class N extends C.Y{constructor(){super(),this.removed=new a.vpe,this._labelStyle="primary"}ngOnDestroy(){this.removed.complete()}}return N.\u0275fac=function(Z){return new(Z||N)},N.\u0275cmp=a.Xpm({type:N,selectors:[["tg-tag"]],hostVars:2,hostBindings:function(Z,d){2&Z&&a.ekj("taglabel",!0)},inputs:{_labelStyle:["colour","_labelStyle"],removable:"removable"},outputs:{removed:"removed"},features:[a.qOj],ngContentSelectors:J,decls:2,vars:1,consts:[["class","removable fa fa-times",3,"tooltip","click",4,"ngIf"],[1,"removable","fa","fa-times",3,"tooltip","click"]],template:function(Z,d){1&Z&&(a.F$t(),a.Hsn(0),a.YNc(1,e,2,4,"div",0)),2&Z&&(a.xp6(1),a.Q6J("ngIf",d.removable))},dependencies:[M.O5,w.G,v.K,L.i9,c.H],encapsulation:2,changeDetection:0}),N})()},74449:(V,E,s)=>{s.d(E,{W:()=>g});var a=s(74831),m=s(15859),C=s(14026);let g=(()=>{class M{}return M.\u0275fac=function(v){return new(v||M)},M.\u0275mod=C.oAB({type:M}),M.\u0275inj=C.cJS({imports:[m.GlobalModule,a.z8]}),M})()},9352:(V,E,s)=>{s.d(E,{u:()=>R});var a=s(14026),m=s(52805),C=s(26454),g=s(69962),M=s(92362),w=s(54074),v=s(64177),L=s(61225);function c(P,Z){if(1&P){const d=a.EpF();a.TgZ(0,"input",5),a.NdJ("ngModelChange",function(u){a.CHM(d);const f=a.oxw();return a.KtG(f.onBaseFieldChange("text",u))})("blur.passive",function(){a.CHM(d);const u=a.oxw();return a.KtG(u.onTouch())}),a.qZA()}if(2&P){const d=a.oxw();a.Q6J("ngModel",d.value.text)("placeholder",d.placeholders.text)("ngStyle",d.customStyle)("disabled",d.disabled)("ngModelOptions",d.MODEL_OPTS)}}function e(P,Z){if(1&P&&(a.TgZ(0,"option",6),a._uU(1),a.qZA()),2&P){const d=Z.$implicit;a.Q6J("ngValue",d),a.xp6(1),a.hij("",d,"://")}}const J=/^(https?):\/\//i;let R=(()=>{class P extends M.k{constructor(d){super(),this.tr=d,this.asString=!1,this.protocol="https",this.protocolOptions=["https","http"],this.small=this.text=this.valueEmitted=!1,this.value={text:"",url:""}}ngOnChanges({protocol:d,small:p,text:u,textPlaceholder:f,urlPlaceholder:O,asString:_}){p&&this.refreshCss(),d&&!this.protocolOptions.includes(this.protocol)&&(this.protocol="http"),(f||O)&&this.refreshPlaceholders(),(_||u)&&this.valueEmitted&&this.onChange()}ngOnInit(){this.divClasses||this.refreshCss(),this.placeholders||this.refreshPlaceholders()}onBaseFieldChange(d,p){this.value={...this.value,[d]:p},this.onChange()}onChange(){this.valueEmitted=!0,this._onChangeFn(this.computeOutput())}onProtocolChange(d){this.protocol=d,this.onChange()}writeValue(d){const p=this.state();if(d)if("string"==typeof d)this.protocol=function N(P){if(P)return P.match(J)?.[1]}(d)||this.protocol,this.value={text:"",url:d.replace(J,"")};else{const u=(0,C.Z)(d,["protocol","text","url"]);u.url&&(u.url=u.url.replace(J,"")),this.protocol=u.protocol&&this.protocolOptions.includes(u.protocol)?u.protocol:"http",this.value={text:u.text||"",url:u.url?.replace(J,"")||""}}else this.protocol="http",this.value={text:"",url:""};(0,g.Z)(p,this.state())||this.cdr.detectChanges()}computeOutput(){const d=this.value.url;if(this.asString)return this.formatUrl(d);const p={...this.value};return d&&(p.url=this.formatUrl(d)),this.text||(p.text=p.url),p}formatUrl(d){if(!d)return"";const p=d.match(J);return p&&(this.protocol=p[1]),`${this.protocol}://${d.replace(J,"")}`}refreshCss(){let d,p;this.small?(d="col-xs-8",p="col-xs-4"):(d="col-xs-10",p="col-xs-2"),this.divClasses={input:d,protocol:p}}refreshPlaceholders(){const d="urlInput";this.placeholders={text:this.textPlaceholder||this.tr.translate("label",d),url:this.urlPlaceholder||this.tr.translate("url",d)}}state(){return[this.protocol,this.value]}}return P.\u0275fac=function(d){return new(d||P)(a.Y36(w.D))},P.\u0275cmp=a.Xpm({type:P,selectors:[["tg-url-input"]],hostVars:2,hostBindings:function(d,p){2&d&&a.ekj("tg-input-error-boundary",!0)},inputs:{asString:"asString",customStyle:"customStyle",protocol:"protocol",small:"small",text:"text",textPlaceholder:"textPlaceholder",urlPlaceholder:"urlPlaceholder"},features:[a._Bn([{multi:!0,provide:m.JU,useExisting:(0,a.Gpc)(()=>P)}]),a.qOj,a.TTD],decls:6,vars:13,consts:[["class","form-control",3,"ngModel","placeholder","ngStyle","disabled","ngModelOptions","ngModelChange","blur.passive",4,"ngIf"],[1,"p0",3,"ngClass"],[1,"form-control",3,"ngModel","disabled","ngModelOptions","ngModelChange","blur.passive"],[3,"ngValue",4,"ngFor","ngForOf"],["type","url",1,"form-control",3,"tgConsumeControlId","ngModel","ngModelOptions","placeholder","ngStyle","disabled","ngModelChange","blur.passive"],[1,"form-control",3,"ngModel","placeholder","ngStyle","disabled","ngModelOptions","ngModelChange","blur.passive"],[3,"ngValue"]],template:function(d,p){1&d&&(a.YNc(0,c,1,5,"input",0),a.TgZ(1,"div",1)(2,"select",2),a.NdJ("ngModelChange",function(f){return p.onProtocolChange(f)})("blur.passive",function(){return p.onTouch()}),a.YNc(3,e,2,2,"option",3),a.qZA()(),a.TgZ(4,"div",1)(5,"input",4),a.NdJ("ngModelChange",function(f){return p.onBaseFieldChange("url",f)})("blur.passive",function(){return p.onTouch()}),a.qZA()()),2&d&&(a.Q6J("ngIf",p.text),a.xp6(1),a.Q6J("ngClass",p.divClasses.protocol),a.xp6(1),a.Q6J("ngModel",p.protocol)("disabled",p.disabled)("ngModelOptions",p.MODEL_OPTS),a.xp6(1),a.Q6J("ngForOf",p.protocolOptions),a.xp6(1),a.Q6J("ngClass",p.divClasses.input),a.xp6(1),a.Q6J("tgConsumeControlId","id")("ngModel",p.value.url)("ngModelOptions",p.MODEL_OPTS)("placeholder",p.placeholders.url)("ngStyle",p.customStyle)("disabled",p.disabled))},dependencies:[v.mk,v.sg,v.O5,v.PC,L.c,m.YN,m.Kr,m.Fj,m.EJ,m.JJ,m.On],styles:["[_nghost-%COMP%]{display:block}.p0[_ngcontent-%COMP%]{padding:0}"],changeDetection:0}),P})()},33345:(V,E,s)=>{s.d(E,{u:()=>u});var a=s(14026),m=s(52805),C=s(87399),M=s(6115),w=s(15859),v=s(92362),L=s(49363),c=s(59718),e=s(76306),J=s(64177),R=s(84773),N=s(62441),P=s(47946),Z=s(16838);function d(f,O){if(1&f){const _=a.EpF();a.TgZ(0,"div",2),a.GkF(1,3),a.TgZ(2,"div",4)(3,"button",5),a.NdJ("click.passive",function(){a.CHM(_);const j=a.oxw();return a.KtG(j.onYearChange(null))}),a.qZA()()()}if(2&f){const _=a.oxw(),S=a.MAs(2);a.xp6(1),a.Q6J("ngTemplateOutlet",S),a.xp6(2),a.Q6J("disabled",_.disabled)}}function p(f,O){if(1&f){const _=a.EpF();a.TgZ(0,"tg-datepicker",6),a.NdJ("touched",function(){a.CHM(_);const j=a.oxw();return a.KtG(j.onTouch())})("ngModelChange",function(j){a.CHM(_);const _e=a.oxw();return a.KtG(_e.onYearChange(j))}),a.qZA()}if(2&f){const _=a.oxw();a.ekj("clearable",_.clearable),a.Q6J("ngModel",_.controlDateValue)("ngModelOptions",_.MODEL_OPTS)("timezone","UTC")("maxDate",_.maxDate)("minDate",_.minDate)("placement",_.placement)("placeholder",_.placeholder)("lockIntoView",_.LOCK_INTO_VIEW)("startDate",_.startDate)("displayFormat","yyyy")("disabled",_.disabled)}}let u=(()=>{class f extends v.k{constructor(){super(...arguments),this.LOCK_INTO_VIEW=e.c.YEAR,this.clearable=!1,this.controlDateValue=null,this.placeholder="",this.startDate=C.utc([1980]).toDate()}normaliseWriteValue(_){switch(typeof _){case"number":return _;case"string":return M.ISO_DATE_REGEX.test(_)?this.normaliseWriteValue(new Date(_)):null;default:return _ instanceof Date?_.getUTCFullYear():null}}onValueWritten(_){this.controlDateValue="number"==typeof _?C.utc([_]).toDate():null}onYearChange(_){this.controlDateValue=_;const S=_?_.getUTCFullYear():null;S!==this.value&&this.onChange(S)}}return f.\u0275fac=function(){let O;return function(S){return(O||(O=a.n5z(f)))(S||f)}}(),f.\u0275cmp=a.Xpm({type:f,selectors:[["tg-year-input"]],hostVars:2,hostBindings:function(_,S){2&_&&a.ekj("tg-input-error-boundary",!0)},inputs:{clearable:"clearable",maxDate:"maxDate",minDate:"minDate",placeholder:"placeholder",placement:"placement",startDate:"startDate"},standalone:!0,features:[a._Bn([{multi:!0,provide:m.JU,useExisting:(0,a.Gpc)(()=>f)}]),a.qOj,a.jDz],decls:3,vars:2,consts:[["class","input-group",4,"ngIf","ngIfElse"],["tpl",""],[1,"input-group"],[3,"ngTemplateOutlet"],[1,"input-group-btn"],[1,"btn-default",3,"tg-clear-button","disabled","click.passive"],[3,"ngModel","ngModelOptions","timezone","maxDate","minDate","placement","placeholder","lockIntoView","startDate","displayFormat","disabled","touched","ngModelChange"]],template:function(_,S){if(1&_&&(a.YNc(0,d,4,2,"div",0),a.YNc(1,p,1,13,"ng-template",null,1,a.W1O)),2&_){const j=a.MAs(2);a.Q6J("ngIf",S.clearable)("ngIfElse",j)}},dependencies:[w.GlobalModule,J.O5,J.tP,R.s,N.h,m.u5,m.JJ,m.On,c.f,P.X,Z.s,L.m],styles:["[_nghost-%COMP%]{display:inline-block}tg-datepicker.clearable[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),f})()},676:(V,E,s)=>{s.d(E,{B:()=>M});var a=s(52805),m=s(15859),C=s(35365),g=s(14026);let M=(()=>{class w{}return w.\u0275fac=function(L){return new(L||w)},w.\u0275mod=g.oAB({type:w}),w.\u0275inj=g.cJS({imports:[m.GlobalModule,a.u5,a.UX,C.TagModule]}),w})()},86458:(V,E,s)=>{s.d(E,{z:()=>w});var a=s(52805),m=s(74831),C=s(15859),g=s(676),M=s(14026);let w=(()=>{class v{}return v.\u0275fac=function(c){return new(c||v)},v.\u0275mod=M.oAB({type:v}),v.\u0275inj=M.cJS({imports:[C.GlobalModule,g.B,a.UX,m.z8,g.B]}),v})()}}]);
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.