Viewing File: /usr/local/cpanel/base/frontend/jupiter/team-manager/main.f1cea35029cfe5c6.js
"use strict";(self.webpackChunkteam_manager=self.webpackChunkteam_manager||[]).push([[179],{3779:(T,L,d)=>{var y=d(1481),e=d(5062),K=d(529),m=d(4006),q=d(1620),ee=d(348),s=d(6389),te=d(6962),k=d(6737),A=d(3044),h=d(9877),_=d(269),M=d(2986),v=d(537),b=d(6020),u=d(7709),f=d(4850);const I=new e.OlP("userName"),ne=new e.OlP("base"),N=new e.OlP("emailTool"),Q=new e.OlP("ftpTool"),D=new e.OlP("webDiskTool"),B=new e.OlP("deprefix"),R=new e.OlP("maxTeamUsers"),S=new e.OlP("teamOwnerDomain");var P=d(755),E=d(3357);let Z=(()=>{class o{constructor(t){this.locale=t,this.pagination={pageSize:20,selectedPage:1,disabled:!1,totalRecords:0,recordsBeforeFilter:0},this._loading=!1,this.sorts=[]}set loading(t){this._loading=t}get loading(){return this._loading}changeSort(t){const n=this.sorts?.find(a=>a.column===t);n&&(n.direction=this.changeSortDirection(n.direction)),this.sorts=[new P.PE(t,n?.direction||P.Sr.Ascending)]}getTableMetadata(){return{pager:{page:this.pagination.selectedPage,pageSize:this.pagination.pageSize},filters:this.filters,sorts:this.sorts}}updateSearchFilter(t,n){this.filters=[new E.w(t,E.p.Contains,n)],this.pagination.selectedPage=1}getSortColumn(){return this.sorts[0]?.column}sortedInAscendingOrder(){return this.sorts[0]?.direction===P.Sr.Ascending}updatePageSize(t){this.pagination.pageSize=t}changePage(t){this.pagination.selectedPage=t}noResultsReason(t){return t?null:this.locale.maketext(this.pagination.recordsBeforeFilter?"No results available.":"No results match your query.")}changeSortDirection(t){return t===P.Sr.Ascending?P.Sr.Descending:P.Sr.Ascending}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(_.g))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const x="Team";let C=(()=>{class o{constructor(t,n,a){this.http=t,this.currentUser=n,this.tableService=a}getTeam(t=this.currentUser){const n=new b.j({namespace:x,method:"list_team_ui",arguments:[new u.h("username",t)]});return this.http.get(n).pipe((0,f.U)(a=>{if(1===a.status)return a;throw a.errors.pop()}))}createUser(t){const n=new b.j({namespace:x,method:"add_team_user",arguments:[new u.h("user",t.username),new u.h("email",t.contactEmail),new u.h("notes",t.notes),this.getArgumentBasedOnPasswordOption(t.passwordOptions,t.password),new u.h("roles",t.roles)]});return this.http.get(n).pipe((0,f.U)(a=>{if(1===a.status)return a;throw a.errors.pop()}))}editUser(t){let n=[];t.roles.length&&(n=[...t.roles.map((r,p)=>new u.h(`set_role-${p+1}`,r))]);const a=new b.j({namespace:x,method:"edit_team_user",arguments:[new u.h("user",t.username),new u.h("email",t.contactEmail),new u.h("notes",t.notes),new u.h("password",t.password),...n]});return this.http.get(a).pipe((0,f.U)(r=>{if(1===r.status)return r;throw r.errors.pop()}))}deleteUser(t){const n=new b.j({namespace:x,method:"remove_team_user",arguments:[new u.h("user",t)]});return this.http.get(n).pipe((0,f.U)(a=>{if(1===a.status)return a;throw a.errors.pop()}))}getAuditLog(t,n=this.currentUser){const a=new b.j({namespace:"AuditLog",method:"get_api_log",arguments:[new u.h("user",n)],...t});return this.http.get(a).pipe((0,f.U)(r=>{if(this.tableService.pagination.totalRecords=r.meta.totalRecords,this.tableService.pagination.recordsBeforeFilter=r.meta.recordsBeforeFilter,1===r.status)return r;throw r.errors.pop()}))}suspendUser(t){const n=new b.j({namespace:x,method:"suspend_team_user",arguments:[new u.h("user",t),new u.h("reason","")]});return this.http.get(n).pipe((0,f.U)(a=>{if(1===a.status)return a;throw a.errors.pop()}))}unsuspendUser(t){const n=new b.j({namespace:x,method:"unsuspend_team_user",arguments:[new u.h("user",t)]});return this.http.get(n).pipe((0,f.U)(a=>{if(1===a.status)return a;throw a.errors.pop()}))}listRoles(t=this.currentUser){const n=new b.j({namespace:"TeamRoles",method:"list_feature_descriptions",arguments:[new u.h("username",t)]});return this.http.get(n).pipe((0,f.U)(a=>{if(1===a.status)return a;throw a.errors.pop()}))}getArgumentBasedOnPasswordOption(t,n){return new u.h("set"===t?"password":"activation_email","set"!==t||n)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(q.Tr),e.LFG(I),e.LFG(Z))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var c=d(6895);function ae(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"ul",5)(1,"li",6)(2,"div")(3,"cp-page-size-selector",7),e.NdJ("optionSelected",function(a){return e.CHM(t),e.oxw().pageSizeChanged.emit(a)}),e.qZA()()(),e._UZ(4,"li",8),e.TgZ(5,"li",6)(6,"a",9),e.NdJ("click",function(){return e.CHM(t),e.oxw().refreshClicked.emit()}),e._UZ(7,"i",10),e._uU(8),e.qZA()()()}if(2&o){const t=e.oxw();e.xp6(3),e.Q6J("pageSizeOptions",t.pageSizes)("selectedPageSize",null==t.tableService?null:t.tableService.pagination.pageSize),e.xp6(5),e.hij(" ",t.locale.maketext("Refresh")," ")}}let ie=(()=>{class o{constructor(t,n){this.tableService=t,this.locale=n,this.pageSizes=[20,50,100,500],this.pageSizeChanged=new e.vpe,this.refreshClicked=new e.vpe}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(Z),e.Y36(_.g))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-page-size-selector-dropdown"]],inputs:{pageSizes:"pageSizes"},outputs:{pageSizeChanged:"pageSizeChanged",refreshClicked:"refreshClicked"},decls:5,vars:1,consts:[["dropdown","","auto-close","outsideClick",1,"btn-group"],["id","table-settings-dropdown","type","button","dropdownToggle","",1,"btn","btn-default","btn-sm","dropdown-toggle","button-bar"],[1,"fas","fa-cog"],[1,"caret"],["id","table-settings-menu","class","dropdown-menu dropdown-menu-right","role","menu","aria-labelledby","table-settings-dropdown",4,"dropdownMenu"],["id","table-settings-menu","role","menu","aria-labelledby","table-settings-dropdown",1,"dropdown-menu","dropdown-menu-right"],["role","menuitem"],["id","page-size-selector",3,"pageSizeOptions","selectedPageSize","optionSelected"],[1,"divider"],["id","page-size-selector__refresh",3,"click"],[1,"fas","fa-sync-alt"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"button",1),e._UZ(2,"i",2)(3,"span",3),e.qZA(),e.YNc(4,ae,9,3,"ul",4),e.qZA()),2&t&&(e.xp6(1),e.uIk("aria-label",n.locale.maketext("Table Settings")))},directives:[A.TO,A.Mq,A.Hz,s.k6],encapsulation:2}),o})();function re(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"cp-pagination",16),e.NdJ("pageChanged",function(a){return e.CHM(t),e.oxw().changePage(a)}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("totalItems",t.tableService.pagination.totalRecords)("pageSize",t.tableService.pagination.pageSize)("maxPagesVisible",5)("disabled",t.isFetchingAuditLog)}}function se(o,i){if(1&o&&e._UZ(0,"i",23),2&o){const t=e.oxw(2).$implicit,n=e.oxw();e.ekj("icon-arrow-up",n.tableService.sortedInAscendingOrder())("icon-arrow-down",!n.tableService.sortedInAscendingOrder()),e.uIk("title",t.label)}}function le(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("click",function(){e.CHM(t);const a=e.oxw().$implicit;return e.oxw().sort(a.key)}),e.TgZ(1,"span",21),e._uU(2),e.qZA(),e.YNc(3,se,1,5,"i",22),e.qZA()}if(2&o){const t=e.oxw(),n=t.index,a=t.$implicit,r=e.oxw();e.hYB("id","column-button__",n,"-",a.key,""),e.xp6(2),e.Oqu(a.label),e.xp6(1),e.Q6J("ngIf",a.key===r.tableService.getSortColumn())}}function ce(o,i){if(1&o&&(e.TgZ(0,"span",21),e._uU(1),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.label)}}const me=function(o){return{width:o}};function de(o,i){if(1&o&&(e.TgZ(0,"th",17),e.YNc(1,le,4,4,"button",18),e.YNc(2,ce,2,1,"span",19),e.qZA()),2&o){const t=i.$implicit,n=e.oxw();e.Q6J("ngStyle",e.VKq(4,me,100/n.columns.length+"%"))("ngClass",t.classes),e.xp6(1),e.Q6J("ngIf",t.sortable),e.xp6(1),e.Q6J("ngIf",!t.sortable)}}function pe(o,i){if(1&o&&(e.TgZ(0,"tr",24)(1,"td"),e._UZ(2,"span",25),e._uU(3," \xa0 "),e.TgZ(4,"span",26),e._uU(5),e.qZA()()()),2&o){const t=e.oxw();e.xp6(1),e.uIk("colspan",t.emptyRowColSpan),e.xp6(4),e.Oqu(t.locale.maketext("Loading \u2026"))}}function _e(o,i){if(1&o&&(e.TgZ(0,"tr",27)(1,"td"),e._uU(2),e.qZA()()),2&o){const t=e.oxw();e.xp6(1),e.uIk("colspan",t.emptyRowColSpan),e.xp6(1),e.Oqu(t.noResultsMessage)}}function ue(o,i){if(1&o&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&o){const t=i.$implicit,n=e.oxw(2),a=n.index,r=n.$implicit;e.Q6J("ngClass",t.classes),e.uIk("data-test","audit-log-data__"+t.key+"-"+a),e.xp6(1),e.hij(" ",r[t.key]||"-"," ")}}function ge(o,i){if(1&o&&(e.TgZ(0,"tr"),e.YNc(1,ue,2,3,"td",29),e.qZA()),2&o){const t=e.oxw().index,n=e.oxw();e.uIk("data-test","audit-log-row__"+t),e.xp6(1),e.Q6J("ngForOf",n.columns)("ngForTrackBy",n.trackByFn)}}function he(o,i){if(1&o&&(e.ynx(0),e.YNc(1,ge,2,3,"tr",28),e.BQk()),2&o){const t=i.$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngIf",n.columnKeyExists(t))}}let fe=(()=>{class o{constructor(t,n,a,r){this.teamManagerApiService=t,this.locale=n,this.tableService=a,this.alertService=r,this.isFetchingAuditLog=!0,this.columns=this.getListTeamTableHeaders()}ngOnInit(){this.fetchAuditLog(),this.emptyRowColSpan=this.columns.length+1}trackByFn(t){return t}searchAuditLog(t){this.tableService.updateSearchFilter("called_by",t),this.fetchAuditLog()}columnKeyExists(t){return this.columns.some(n=>Object.keys(t).includes(n.key))}fetchAuditLog(){this.rows=[],this.tableService.loading=!0,this.teamManagerApiService.getAuditLog(this.tableService.getTableMetadata()).pipe((0,M.q)(1),(0,v.x)(()=>{this.isFetchingAuditLog=!1,this.tableService.loading=!1,this.noResultsMessage=this.tableService.noResultsReason(this.rows.length)})).subscribe(t=>{this.rows=t.data},t=>{this.alertService.error(t.message)})}getListTeamTableHeaders(){return[{key:"date_timestamp",label:this.locale.maketext("Timestamp"),sortable:!0},{key:"called_by",label:this.locale.maketext("Called By"),sortable:!0},{key:"api_version",label:this.locale.maketext("API Version"),sortable:!0,classes:"hidden-xs hidden-sm hidden-md"},{key:"call",label:this.locale.maketext("Call"),sortable:!0},{key:"origin",label:this.locale.maketext("Origin"),sortable:!0,classes:"hidden-xs hidden-sm hidden-md"}]}sort(t){this.tableService.changeSort(t),this.fetchAuditLog()}pageSizeChanged(t){this.tableService.updatePageSize(t),this.fetchAuditLog()}changePage(t){t.page!==this.tableService.pagination.selectedPage&&(this.tableService.changePage(t.page),this.fetchAuditLog())}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(C),e.Y36(_.g),e.Y36(Z),e.Y36(s.c9))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-audit-log"]],decls:19,vars:12,consts:[[1,"row","audit-log__description"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"section"],[1,"row","search-page-container"],[1,"col-xs-12","col-md-6","pull-left","text-left"],["id","searchAccountsInput",3,"label","valueChange"],["searchAccountsInput",""],[1,"col-xs-12","col-md-6","pull-right","text-right"],["id","audit-log--pagination","name","auditLogPagination",3,"totalItems","pageSize","maxPagesVisible","disabled","pageChanged",4,"ngIf"],[1,"pull-right","flip","create-page-size-selector-wrapper"],["id","page-size-selector-dropdown",3,"pageSizeChanged","refreshClicked"],[1,"ui","table"],[3,"ngStyle","ngClass",4,"ngFor","ngForOf"],["class","info empty-row","id","loadingRow",4,"ngIf"],["class","info empty-row","id","emptySearchRow",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["id","audit-log--pagination","name","auditLogPagination",3,"totalItems","pageSize","maxPagesVisible","disabled","pageChanged"],[3,"ngStyle","ngClass"],["class","column-button btn btn-link p-0",3,"id","click",4,"ngIf"],["class","column-label separator",4,"ngIf"],[1,"column-button","btn","btn-link","p-0",3,"id","click"],[1,"column-label","separator"],["ngClass","column-icon",3,"icon-arrow-up","icon-arrow-down",4,"ngIf"],["ngClass","column-icon"],["id","loadingRow",1,"info","empty-row"],[1,"fas","fa-spinner","fa-spin"],[1,"loading-text"],["id","emptySearchRow",1,"info","empty-row"],[4,"ngIf"],["class","td",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"td",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"p",1),e.qZA(),e.TgZ(2,"div",2)(3,"div",3)(4,"div",4)(5,"cp-search",5,6),e.NdJ("valueChange",function(r){return n.searchAuditLog(r)}),e.qZA()(),e.TgZ(7,"div",7),e.YNc(8,re,1,4,"cp-pagination",8),e.qZA()()(),e.TgZ(9,"div",9)(10,"cp-team-manager-page-size-selector-dropdown",10),e.NdJ("pageSizeChanged",function(r){return n.pageSizeChanged(r)})("refreshClicked",function(){return n.fetchAuditLog()}),e.qZA()(),e.TgZ(11,"table",11)(12,"thead")(13,"tr"),e.YNc(14,de,3,6,"th",12),e.qZA()(),e.TgZ(15,"tbody"),e.YNc(16,pe,6,2,"tr",13),e.YNc(17,_e,3,2,"tr",14),e.YNc(18,he,2,1,"ng-container",15),e.qZA()()),2&t&&(e.xp6(1),e.Q6J("innerHTML",n.locale.maketext("View the Audit Log of your team."),e.oJD),e.xp6(4),e.s9C("label",n.locale.maketext("Search for an account by username or domain.")),e.xp6(3),e.Q6J("ngIf",0!==n.tableService.pagination.totalRecords),e.xp6(3),e.ekj("table-striped",!0)("unstackable",!0),e.xp6(3),e.Q6J("ngForOf",n.columns),e.xp6(2),e.Q6J("ngIf",n.tableService.loading),e.xp6(1),e.Q6J("ngIf",n.noResultsMessage),e.xp6(1),e.Q6J("ngForOf",n.rows)("ngForTrackBy",n.trackByFn))},directives:[s.gS,c.O5,s.Qt,ie,c.sg,c.PC,c.mk],styles:[".table[_ngcontent-%COMP%]{border-collapse:separate}.column-button[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none;padding:0}.column-button[_ngcontent-%COMP%]:hover > span[_ngcontent-%COMP%]{text-decoration:underline}.column-button[_ngcontent-%COMP%]:focus{outline:none}.column-label[_ngcontent-%COMP%]{display:inline-block}html[dir=ltr][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-2)}html[dir=rtl][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-2)}thead[_ngcontent-%COMP%]{position:sticky;top:0;background:var(--cp-table-header-background)}thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-2);background:var(--cp-table-header-background);background-clip:content-box}.create-page-size-selector-wrapper[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.search-page-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(1){margin-top:20px}"]}),o})();var g=d(2502),l=(()=>{return(o=l||(l={})).create="create",o.list="list",o.auditLog="auditlog",o.edit="edit",l;var o})(),Ce=d(5529);let Y=(()=>{class o{constructor(t,n,a,r,p,O,w){this.locale=t,this.formBuilder=n,this.router=a,this.renderer=r,this.apiService=p,this.alertService=O,this.teamOwnerDomain=w,this.showRoleFeatures=!1,this.formSubmit=new Ce.xQ,g.uZ.locale=this.locale,this.roleList=JSON.parse(localStorage.getItem("roleList")),this.roleInfoButtonText=this.getRoleInfoButtonText(!1)}ngAfterViewInit(){this.returnArrowDir=this.locale.isRtl?"fa-arrow-right":"fa-arrow-left"}ngOnDestroy(){localStorage.removeItem("teamData")}setShowFeaturesButtonPosition(t,n){this.renderer.appendChild(t.element,n.nativeElement),this.renderer.setStyle(n.nativeElement,this.locale.isRtl?"left":"right","0")}toggleAllInfoBlocks(t){const n=t.find(a=>!1===a.infoBlockStatus());for(const a of t)a.setInfoBlockStatus(Boolean(n))}toggleRoleFeatures(t,n){t.isOpen||t.open(),this.showRoleFeatures=!n,this.roleInfoButtonText=this.getRoleInfoButtonText(this.showRoleFeatures)}updateAcknowledgmentStatus(t,n=[]){JSON.stringify(n.sort())!==JSON.stringify(t.get("roles").value.sort())?t.get("acknowledgment").enable():t.get("acknowledgment").disable()}setNotesValidators(t){t.get("notes").setValidators([g.dt.maxLength(this.locale.maketext("The notes must be at most [numf,_1] characters.",100),100)])}setContactEmailValidators(t){t.get("contactEmail").setValidators([g.dt.required(this.locale.maketext("You [output,strong,must] enter a valid email.")),g.Tt.validateEmail()])}setPasswordOptionsValidators(t){t.get("passwordOptions").setValidators(g.dt.required(this.locale.maketext("You [output,strong,must] select one option.")))}setAcknowledgmentValidators(t){t.get("acknowledgment").setValidators(g.dt.requiredTrue(this.locale.maketext("You must acknowledge the warning to proceed.")))}getRoleInfoButtonText(t){return this.locale.maketext(t?"Hide Features":"Show Features")}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g),e.Y36(m.qu),e.Y36(h.F0),e.Y36(e.Qsj),e.Y36(C),e.Y36(s.c9),e.Y36(S))},o.\u0275cmp=e.Xpm({type:o,selectors:[["ng-component"]],decls:0,vars:0,template:function(t,n){},styles:[".base-team-user__section-title[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:var(--cp-spacer-3);margin-top:var(--cp-spacer-4)}.base-team-user__section-title[_ngcontent-%COMP%]:first-of-type{margin-top:unset}.base-team-user__set-password-fieldset[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--cp-spacer-2)}.fieldset-password__radio-label[_ngcontent-%COMP%]{font-weight:400}input[type=radio][_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{color:var(--cp-disabled-color)}html[dir=ltr][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.base-team-user__description[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.base-team-user__form-container[_ngcontent-%COMP%]{padding:0}.roles__features-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,180px);padding:var(--cp-spacer-2) 0}.role-feature[_ngcontent-%COMP%]{padding:var(--cp-spacer-1) 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roles__ng-select--custom[_ngcontent-%COMP%]{position:relative}.roles__show-info-button[_ngcontent-%COMP%]{position:absolute;top:-25px}html[dir=ltr][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%]{right:0}html[dir=rtl][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%]{left:0}.ng-select.roles__ng-select--custom[_ngcontent-%COMP%] .ng-dropdown-panel[_ngcontent-%COMP%] .ng-dropdown-panel-items[_ngcontent-%COMP%]{max-height:180px}.base-team-user__fieldset-legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}"]}),o})();var F=(()=>{return(o=F||(F={})).input="input",o.textarea="textarea",F;var o})();function Oe(o,i){if(1&o&&e._UZ(0,"input",7),2&o){const t=e.oxw();e.Q6J("id",t.id)("formControlName",t.controlName)("name",t.controlName)}}function Me(o,i){if(1&o&&(e.TgZ(0,"span",8),e._uU(1),e.qZA()),2&o){const t=e.oxw();e.Q6J("title",t.inputAddon),e.xp6(1),e.Oqu(t.inputAddon)}}function be(o,i){if(1&o&&(e.TgZ(0,"textarea",9),e._uU(1," "),e.qZA()),2&o){const t=e.oxw();e.Q6J("id",t.id)("formControlName",t.controlName)("name",t.controlName)}}const we=function(o){return{"input-group":o}};let H=(()=>{class o{constructor(){this.formFieldType=F}infoBlockStatus(){return this.formFieldComponent.infoBlockStatus()}setInfoBlockStatus(t){this.formFieldComponent.setInfoBlockStatus(t)}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-team-user-form-field"]],viewQuery:function(t,n){if(1&t&&e.Gf(s.hg,5),2&t){let a;e.iGM(a=e.CRH())&&(n.formFieldComponent=a.first)}},inputs:{id:"id",element:"element",control:"control",controlName:"controlName",formGroup:"formGroup",labelText:"labelText",infoBlockText:"infoBlockText",inputAddon:"inputAddon"},decls:8,vars:13,consts:[[1,"form-group",3,"formGroup"],["idPrefix","team-user",3,"control","showAllHelp","labelText","labelFor","showInfoToggle"],["field-label-help-text",""],["form-field-input-content","",3,"ngClass"],["type","text","cpValidationStrategy","","class","form-control",3,"id","formControlName","name",4,"ngIf"],["class","input-group-addon override-has-success",3,"title",4,"ngIf"],["form-field-input-content","","type","text","cpValidationStrategy","","class","form-control",3,"id","formControlName","name",4,"ngIf"],["type","text","cpValidationStrategy","",1,"form-control",3,"id","formControlName","name"],[1,"input-group-addon","override-has-success",3,"title"],["form-field-input-content","","type","text","cpValidationStrategy","",1,"form-control",3,"id","formControlName","name"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"cp-form-field",1)(2,"div",2),e._uU(3),e.qZA(),e.TgZ(4,"div",3),e.YNc(5,Oe,1,3,"input",4),e.YNc(6,Me,2,2,"span",5),e.qZA(),e.YNc(7,be,2,3,"textarea",6),e.qZA()()),2&t&&(e.Q6J("formGroup",n.formGroup),e.xp6(1),e.Q6J("control",n.control)("showAllHelp",!1)("labelText",n.labelText)("labelFor",n.controlName)("showInfoToggle",n.infoBlockText),e.xp6(2),e.Oqu(n.infoBlockText),e.xp6(1),e.Q6J("ngClass",e.VKq(11,we,n.inputAddon)),e.xp6(1),e.Q6J("ngIf",n.element===n.formFieldType.input),e.xp6(1),e.Q6J("ngIf",n.inputAddon),e.xp6(1),e.Q6J("ngIf",n.element===n.formFieldType.textarea))},directives:[m.JL,m.sg,s.hg,c.mk,c.O5,m.Fj,s.ln,m.JJ,m.u],styles:["textarea[_ngcontent-%COMP%]{resize:vertical;position:relative}.override-has-success[_ngcontent-%COMP%]{color:#555;background-color:#eee;border-color:#ccc}"]}),o})();function Pe(o,i){if(1&o&&(e.TgZ(0,"div",1)(1,"div",2)(2,"p",3)(3,"cp-callout",4),e._UZ(4,"span",5),e.qZA()()(),e._UZ(5,"input",6)(6,"label",7)(7,"cp-validation-container",8),e.qZA()),2&o){const t=e.oxw();e.Q6J("formGroup",t.form),e.xp6(4),e.Q6J("innerHtml",t.locale.maketext("[output,strong,Security Risk:] This role may grant access to account-level functionality. Only grant this role to users that you trust to access and modify your account."),e.oJD),e.xp6(2),e.Q6J("innerHtml"," "+t.locale.maketext("I have read and understood the security risk warning."),e.oJD),e.xp6(1),e.Q6J("control",t.form.get("acknowledgment"))}}let G=(()=>{class o{constructor(t){this.locale=t}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-acknowledgment-check"]],inputs:{form:"form"},decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-xs-12","acknowledgment-check__security-paragraph"],["id","acknowledgment-check__security-warning","calloutType","warning"],[3,"innerHtml"],["type","checkbox","id","acknowledgment-checkbox","formControlName","acknowledgment"],["for","acknowledgment-checkbox",3,"innerHtml"],["id","acknowledgment_validation-container",3,"control"]],template:function(t,n){1&t&&e.YNc(0,Pe,8,4,"div",0),2&t&&e.Q6J("ngIf",!n.form.get("acknowledgment").disabled)},directives:[c.O5,m.JL,m.sg,s.Oc,m.Wl,m.JJ,m.u,s.fm],styles:[".acknowledgment-check__security-paragraph[_ngcontent-%COMP%]{margin:0}"]}),o})(),z=(()=>{class o{constructor(t){this.locale=t}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-team-user-help-section"]],decls:9,vars:3,consts:[[1,"section"],[1,"widget"],[1,"widget-title"],["href","https://go.cpanel.net/manage-team","id","help-section__link","target","cpanel_documentation",3,"title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"section",1)(2,"h3",2),e._uU(3),e.qZA(),e.TgZ(4,"ul")(5,"li")(6,"a",3),e._UZ(7,"i",4),e._uU(8),e.qZA()()()()()),2&t&&(e.xp6(3),e.Oqu(n.locale.maketext("Need Help?")),e.xp6(3),e.s9C("title",n.locale.maketext("Need help? Click here to read more about this interface.")),e.xp6(2),e.hij(" ",n.locale.maketext("About This Interface")," "))},encapsulation:2}),o})();const xe=function(o){return[o]};function Te(o,i){if(1&o&&(e.TgZ(0,"li")(1,"a",6),e._UZ(2,"i",7),e._uU(3),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("href",e.VKq(4,xe,t.url),e.LSH)("id",t.id)("title",t.title),e.xp6(2),e.hij(" ",t.title," ")}}function ke(o,i){if(1&o&&(e.ynx(0),e.YNc(1,Te,4,6,"li",5),e.BQk()),2&o){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf",t.condition)}}function ve(o,i){if(1&o&&(e.TgZ(0,"div",1)(1,"section",2)(2,"h3",3),e._uU(3),e.qZA(),e.TgZ(4,"ul"),e.YNc(5,ke,2,1,"ng-container",4),e.qZA()()()),2&o){const t=e.oxw();e.xp6(3),e.hij(" ",t.locale.maketext("Related Interfaces")," "),e.xp6(2),e.Q6J("ngForOf",t.formattedFeatures)}}let V=(()=>{class o{constructor(t,n,a,r,p){this.locale=t,this.emailTool=n,this.ftpTool=a,this.webDiskTool=r,this.deprefix=p,this.hasAtLeastOneFeature=this.hasOneOfTheFeatures({email:Boolean(this.emailTool),ftp:Boolean(this.ftpTool),webdisk:Boolean(this.webDiskTool)}),this.formattedFeatures=[{id:"emailAccounts",url:this.deprefix+this.emailTool.url,title:this.locale.maketext("Email Accounts"),condition:n},{id:"ftpAccounts",url:this.deprefix+this.ftpTool.url,title:this.locale.maketext("FTP Accounts"),condition:a},{id:"webDisk",url:this.deprefix+this.webDiskTool.url,title:this.locale.maketext("Web Disk"),condition:r}]}hasOneOfTheFeatures(t){return t.email||t.ftp||t.webdisk}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g),e.Y36(N),e.Y36(Q),e.Y36(D),e.Y36(B))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-team-user-related-interfaces"]],decls:1,vars:1,consts:[["class","section",4,"ngIf"],[1,"section"],[1,"widget"],[1,"widget-title"],[4,"ngFor","ngForOf"],[4,"ngIf"],["target","_blank","rel","noopener noreferrer",3,"href","id","title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"]],template:function(t,n){1&t&&e.YNc(0,ve,6,2,"div",0),2&t&&e.Q6J("ngIf",n.hasAtLeastOneFeature)},directives:[c.O5,c.sg],encapsulation:2}),o})();const Se=["ngSelect"],Ue=["showRoleFeaturesButton"],ye=["infoBlockChild"];function Ae(o,i){1&o&&e.GkF(0)}function Ze(o,i){if(1&o&&e._UZ(0,"cp-validation-container",35),2&o){const t=e.oxw();e.Q6J("control",t.createTeamUserForm)}}function Fe(o,i){if(1&o&&e._UZ(0,"span",40),2&o){const t=i.$implicit;e.Q6J("title",t)("innerHtml",t,e.oJD)}}function Je(o,i){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,Fe,1,2,"span",39),e.qZA()),2&o){const t=e.oxw().item;e.xp6(1),e.Q6J("ngForOf",t.features)}}function Le(o,i){if(1&o&&(e._UZ(0,"input",36),e._uU(1),e.YNc(2,Je,2,1,"div",37)),2&o){const t=i.item,n=i.item$,a=e.oxw();e.MGl("id","item-",t.title,""),e.Q6J("checked",n.selected),e.xp6(1),e.hij(" ",t.title," "),e.xp6(1),e.Q6J("ngIf",a.showRoleFeatures)}}function qe(o,i){1&o&&e.GkF(0)}function Ie(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"div",41)(1,"div",42),e._uU(2),e.qZA(),e.TgZ(3,"div",43)(4,"button",44),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return a.toggleAllInfoBlocks(a.infoBlockElements)}),e._uU(5),e._UZ(6,"i",26),e.qZA()(),e._UZ(7,"div",45),e.qZA()}if(2&o){const t=e.oxw();e.xp6(2),e.hij(" ",t.locale.maketext("Create a Team User")," "),e.xp6(3),e.hij(" ",t.locale.maketext("Show/Hide Help")," ")}}function Ne(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"div",46)(1,"button",47),e.NdJ("click",function(){return e.CHM(t),e.oxw().submitCreateUser()}),e._UZ(2,"cp-icon",48),e._uU(3),e.qZA(),e.TgZ(4,"a",49),e._UZ(5,"i",50),e._uU(6),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(1),e.Q6J("title",t.locale.maketext("Create the new team user account.")),e.xp6(2),e.hij(" ",t.locale.maketext("Create")," "),e.xp6(1),e.Q6J("routerLink","/"),e.xp6(1),e.Q6J("ngClass",t.returnArrowDir),e.xp6(1),e.hij(" ",t.locale.maketext("Go Back")," ")}}let Qe=(()=>{class o extends Y{constructor(t,n,a,r,p,O,w){super(t,n,a,r,p,O,w),this.locale=t,this.formBuilder=n,this.router=a,this.renderer=r,this.apiService=p,this.alertService=O,this.teamOwnerDomain=w,this.passwordOptionSetToEmail=!0;const J={validators:g.HB.equalTo(this.locale.maketext("The username cannot be the same as the password."),"username","password"),updateOn:"blur"};this.createTeamUserForm=this.formBuilder.group({username:[""],notes:[""],passwordOptions:["email",{updateOn:"change"}],password:[""],contactEmail:[""],roles:[[],{updateOn:"change"}],acknowledgment:[!1,{updateOn:"change",disabled:!0}]},J),this.updateAcknowledgmentStatus(this.createTeamUserForm),this.setUsernameValidators(this.createTeamUserForm),this.setNotesValidators(this.createTeamUserForm),this.setContactEmailValidators(this.createTeamUserForm),this.setPasswordOptionsValidators(this.createTeamUserForm),this.setAcknowledgmentValidators(this.createTeamUserForm)}ngAfterViewInit(){this.setShowFeaturesButtonPosition(this.ngSelect,this.showRoleFeaturesButton)}passwordOptionsChange(){this.passwordOptionSetToEmail="email"===this.createTeamUserForm.get("passwordOptions").value}submitCreateUser(){this.formSubmit.next(!0),this.createTeamUserForm.valid?this.apiService.createUser(this.createTeamUserForm.value).pipe((0,M.q)(1)).subscribe(()=>{this.alertService.success(this.locale.maketext("New team user created.")),this.router.navigate([l.list])},t=>{this.alertService.error(t.message)}):this.createTeamUserForm.markAllAsTouched()}setUsernameValidators(t){t.get("username").setValidators([g.dt.required(this.locale.maketext("You [output,strong,must] enter a username.")),g.dt.containsSpaces(this.locale.maketext("A username cannot contain spaces.")),g.dt.minLength(this.locale.maketext("A username must have between [numf,_1] and [numf,_2] characters.",1,16),1),g.dt.maxLength(this.locale.maketext("A username must have between [numf,_1] and [numf,_2] characters.",1,16),16),g.dt.startsWithLetter(this.locale.maketext("A username must start with a letter.")),g.YZ.cpanelUsername()])}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g),e.Y36(m.qu),e.Y36(h.F0),e.Y36(e.Qsj),e.Y36(C),e.Y36(s.c9),e.Y36(S))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-create-team-user"]],viewQuery:function(t,n){if(1&t&&(e.Gf(Se,5),e.Gf(Ue,5),e.Gf(ye,5)),2&t){let a;e.iGM(a=e.CRH())&&(n.ngSelect=a.first),e.iGM(a=e.CRH())&&(n.showRoleFeaturesButton=a.first),e.iGM(a=e.CRH())&&(n.infoBlockElements=a)}},features:[e.qOj],decls:53,vars:40,consts:[[1,"row","base-team-user__description"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"col-xs-12","col-sm-8","col-md-6","base-team-user__form-container"],["autocomplete","off",1,"form-layout-medium",3,"formGroup"],[1,"panel","panel-default"],[4,"ngTemplateOutlet"],[1,"panel-body"],[1,"base-team-user__section-title"],["name","DummyUsername","type","text",2,"display","none"],["name","DummyPassword","type","password",2,"display","none"],["id","username","element","input","controlName","username",3,"control","labelText","formGroup","inputAddon"],["id","notes","element","textarea","controlName","notes",3,"control","infoBlockText","labelText","formGroup"],["infoBlockChild",""],[1,"form-group"],[1,"base-team-user__set-password-fieldset"],["id","fieldset-password",1,"base-team-user__fieldset-legend"],["type","radio","id","radio-password-email","formControlName","passwordOptions",3,"value","change"],["for","radio-password-email",1,"fieldset-password__radio-label"],["type","radio","id","radio-password-set","formControlName","passwordOptions",3,"value","change"],["for","radio-password-set",1,"fieldset-password__radio-label"],["formControlName","password",3,"hidden","id","passwordInputName","requiresStrengthValidation","requiredStrength","validateEmptyField","formSubmission"],["id","equality_validation-container",3,"control",4,"ngIf"],["id","email","element","input","controlName","contactEmail",3,"control","infoBlockText","labelText","formGroup"],["for","roles__ng-select",3,"innerHtml"],["id","roles__show-info-button",1,"btn","btn-link","btn-xs","roles__show-info-button",3,"click"],["showRoleFeaturesButton",""],[1,"far","fa-question-circle","form-info-sign"],["bindLabel","title","bindValue","id","labelForId","roles__ng-select","formControlName","roles",1,"roles__ng-select--custom",3,"items","closeOnSelect","multiple","clearAllText","change"],["ngSelect",""],["ng-option-tmp",""],["id","roles_validation-container",3,"control"],[3,"form"],[1,"col-xs-12","col-sm-4","col-md-3"],["panelHeading",""],["panelFooter",""],["id","equality_validation-container",3,"control"],["type","checkbox",3,"id","checked"],["class","roles__features-container",4,"ngIf"],[1,"roles__features-container"],["class","role-feature",3,"title","innerHtml",4,"ngFor","ngForOf"],[1,"role-feature",3,"title","innerHtml"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","link-show-hide-help",1,"btn","btn-default","btn-xs",3,"click"],[1,"clearfix"],[1,"panel-footer"],["id","create-user","type","submit",1,"btn","btn-sm","btn-primary",3,"title","click"],["name","add-fill","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"list-team__action-icon"],["id","go-back",1,"btn","btn-link","pull-right","flip",3,"routerLink"],["aria-hidden","true",1,"fas",3,"ngClass"]],template:function(t,n){if(1&t){const a=e.EpF();e.TgZ(0,"div",0),e._UZ(1,"p",1),e.qZA(),e.TgZ(2,"div",2)(3,"form",3)(4,"div",4),e.YNc(5,Ae,1,0,"ng-container",5),e.TgZ(6,"div",6)(7,"p",7),e._uU(8),e.qZA(),e._UZ(9,"input",8)(10,"input",9)(11,"cp-team-manager-team-user-form-field",10)(12,"cp-team-manager-team-user-form-field",11,12),e.TgZ(14,"p",7),e._uU(15),e.qZA(),e.TgZ(16,"div",13)(17,"fieldset",14)(18,"legend",15),e._uU(19),e.qZA(),e.TgZ(20,"div")(21,"input",16),e.NdJ("change",function(){return n.passwordOptionsChange()}),e.qZA(),e.TgZ(22,"label",17),e._uU(23),e.qZA()(),e.TgZ(24,"div")(25,"input",18),e.NdJ("change",function(){return n.passwordOptionsChange()}),e.qZA(),e.TgZ(26,"label",19),e._uU(27),e.qZA()()(),e._UZ(28,"cp-password",20),e.YNc(29,Ze,1,1,"cp-validation-container",21),e.qZA(),e._UZ(30,"cp-team-manager-team-user-form-field",22,12),e.TgZ(32,"p",7),e._uU(33),e.qZA(),e.TgZ(34,"div",13),e._UZ(35,"label",23),e.TgZ(36,"button",24,25),e.NdJ("click",function(){e.CHM(a);const p=e.MAs(41);return n.toggleRoleFeatures(p,n.showRoleFeatures)}),e._uU(38),e._UZ(39,"i",26),e.qZA(),e.TgZ(40,"ng-select",27,28),e.NdJ("change",function(){return n.updateAcknowledgmentStatus(n.createTeamUserForm)}),e.YNc(42,Le,3,4,"ng-template",29),e.qZA(),e._UZ(43,"cp-validation-container",30)(44,"cp-team-manager-acknowledgment-check",31),e.qZA()(),e.YNc(45,qe,1,0,"ng-container",5),e.qZA()()(),e.TgZ(46,"div",32),e._UZ(47,"cp-team-manager-team-user-help-section")(48,"cp-team-manager-team-user-related-interfaces"),e.qZA(),e.YNc(49,Ie,8,2,"ng-template",null,33,e.W1O),e.YNc(51,Ne,7,5,"ng-template",null,34,e.W1O)}if(2&t){const a=e.MAs(50),r=e.MAs(52);e.xp6(1),e.Q6J("innerHTML",n.locale.maketext("Create a new team user for your team."),e.oJD),e.xp6(2),e.Q6J("formGroup",n.createTeamUserForm),e.xp6(2),e.Q6J("ngTemplateOutlet",a),e.xp6(3),e.hij(" ",n.locale.maketext("Basic Information")," "),e.xp6(3),e.Q6J("control",n.createTeamUserForm.get("username"))("labelText",n.locale.maketext("Username"))("formGroup",n.createTeamUserForm)("inputAddon","@"+n.teamOwnerDomain),e.xp6(1),e.Q6J("control",n.createTeamUserForm.get("notes"))("infoBlockText",n.locale.maketext("Notes you would like to remember about the team user."))("labelText",n.locale.maketext("Notes (optional)"))("formGroup",n.createTeamUserForm),e.xp6(3),e.hij(" ",n.locale.maketext("Security Information")," "),e.xp6(4),e.hij(" ",n.locale.maketext("Password")," "),e.xp6(2),e.Q6J("value","email"),e.xp6(2),e.hij(" ",n.locale.maketext("The user will set the account password.")," "),e.xp6(2),e.Q6J("value","set"),e.xp6(2),e.hij(" ",n.locale.maketext("Set the user\u2019s password.")," "),e.xp6(1),e.Q6J("hidden",n.passwordOptionSetToEmail)("id","field-cp-password")("passwordInputName","field-cp-password")("requiresStrengthValidation",!0)("requiredStrength","10")("validateEmptyField",!n.passwordOptionSetToEmail)("formSubmission",n.formSubmit),e.xp6(1),e.Q6J("ngIf",n.createTeamUserForm.errors),e.xp6(1),e.Q6J("control",n.createTeamUserForm.get("contactEmail"))("infoBlockText",n.locale.maketext("The system sends account notifications and password reset confirmations to this email address."))("labelText",n.locale.maketext("Contact Email"))("formGroup",n.createTeamUserForm),e.xp6(3),e.hij(" ",n.locale.maketext("User Settings")," "),e.xp6(2),e.Q6J("innerHtml",n.locale.maketext("Roles (optional)"),e.oJD),e.xp6(3),e.hij(" ",n.roleInfoButtonText," "),e.xp6(2),e.Q6J("items",n.roleList)("closeOnSelect",!1)("multiple",!0)("clearAllText",n.locale.maketext("Clear")),e.xp6(3),e.Q6J("control",n.createTeamUserForm.get("roles")),e.xp6(1),e.Q6J("form",n.createTeamUserForm),e.xp6(1),e.Q6J("ngTemplateOutlet",r)}},directives:[m._Y,m.JL,m.sg,c.tP,H,m._,m.Fj,m.JJ,m.u,s.Im,c.O5,s.fm,k.w9,k.ir,c.sg,G,z,V,h.yS,c.mk],styles:[".base-team-user__section-title{font-size:1rem;margin-bottom:var(--cp-spacer-3);margin-top:var(--cp-spacer-4)}.base-team-user__section-title:first-of-type{margin-top:unset}.base-team-user__set-password-fieldset{display:flex;flex-direction:column;margin-bottom:var(--cp-spacer-2)}.fieldset-password__radio-label{font-weight:400}input[type=radio]:disabled+label{color:var(--cp-disabled-color)}html[dir=ltr] input[type=radio],[dir=ltr] input[type=radio],:host([dir=ltr]) input[type=radio],:host-context(html[dir=ltr]) input[type=radio],:host-context([dir=ltr]) input[type=radio]{margin-right:var(--cp-spacer-1)}html[dir=rtl] input[type=radio],[dir=rtl] input[type=radio],:host([dir=rtl]) input[type=radio],:host-context(html[dir=rtl]) input[type=radio],:host-context([dir=rtl]) input[type=radio]{margin-left:var(--cp-spacer-1)}.base-team-user__description{margin-bottom:var(--cp-spacer-3)}.base-team-user__form-container{padding:0}.roles__features-container{display:grid;grid-template-columns:repeat(auto-fill,180px);padding:var(--cp-spacer-2) 0}.role-feature{padding:var(--cp-spacer-1) 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roles__ng-select--custom{position:relative}.roles__show-info-button{position:absolute;top:-25px}html[dir=ltr] .roles__show-info-button,[dir=ltr] .roles__show-info-button,:host([dir=ltr]) .roles__show-info-button,:host-context(html[dir=ltr]) .roles__show-info-button,:host-context([dir=ltr]) .roles__show-info-button{right:0}html[dir=rtl] .roles__show-info-button,[dir=rtl] .roles__show-info-button,:host([dir=rtl]) .roles__show-info-button,:host-context(html[dir=rtl]) .roles__show-info-button,:host-context([dir=rtl]) .roles__show-info-button{left:0}.ng-select.roles__ng-select--custom .ng-dropdown-panel .ng-dropdown-panel-items{max-height:180px}.base-team-user__fieldset-legend{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}\n"],encapsulation:2}),o})();const De=["ngSelect"],Be=["showRoleFeaturesButton"],Re=["infoBlockChild"];function Ee(o,i){1&o&&e.GkF(0)}function Ye(o,i){if(1&o&&e._UZ(0,"cp-validation-container",29),2&o){const t=e.oxw();e.Q6J("control",t.editTeamUserForm)}}function He(o,i){if(1&o&&e._UZ(0,"span",34),2&o){const t=i.$implicit;e.Q6J("title",t)("innerHtml",t,e.oJD)}}function Ge(o,i){if(1&o&&(e.TgZ(0,"div",32),e.YNc(1,He,1,2,"span",33),e.qZA()),2&o){const t=e.oxw().item;e.xp6(1),e.Q6J("ngForOf",t.features)}}function ze(o,i){if(1&o&&(e._UZ(0,"input",30),e._uU(1),e.YNc(2,Ge,2,1,"div",31)),2&o){const t=i.item,n=i.item$,a=e.oxw();e.MGl("id","item-",t.title,""),e.Q6J("checked",n.selected),e.xp6(1),e.hij(" ",t.title," "),e.xp6(1),e.Q6J("ngIf",a.showRoleFeatures)}}function Ve(o,i){1&o&&e.GkF(0)}function $e(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"div",35)(1,"div",36),e._uU(2),e.qZA(),e.TgZ(3,"div",37)(4,"button",38),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return a.toggleAllInfoBlocks(a.infoBlockElements)}),e._uU(5),e._UZ(6,"i",20),e.qZA()(),e._UZ(7,"div",39),e.qZA()}if(2&o){const t=e.oxw();e.xp6(2),e.hij(" ",t.locale.maketext("Edit a Team User")," "),e.xp6(3),e.hij(" ",t.locale.maketext("Show/Hide Help")," ")}}function je(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"div",40)(1,"button",41),e.NdJ("click",function(){return e.CHM(t),e.oxw().submitEditUser()}),e._UZ(2,"cp-icon",42),e._uU(3),e.qZA(),e.TgZ(4,"a",43),e._UZ(5,"i",44),e._uU(6),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(1),e.Q6J("title",t.locale.maketext("Update the team user account.")),e.xp6(2),e.hij(" ",t.locale.maketext("Save")," "),e.xp6(1),e.Q6J("routerLink","/"),e.xp6(1),e.Q6J("ngClass",t.returnArrowDir),e.xp6(1),e.hij(" ",t.locale.maketext("Go Back")," ")}}let Xe=(()=>{class o extends Y{constructor(t,n,a,r,p,O,w,J){super(t,n,a,r,p,O,J),this.locale=t,this.formBuilder=n,this.router=a,this.renderer=r,this.apiService=p,this.alertService=O,this.activatedRoute=w,this.teamOwnerDomain=J,this.editUserInit(),this.setNotesValidators(this.editTeamUserForm),this.setContactEmailValidators(this.editTeamUserForm),this.setAcknowledgmentValidators(this.editTeamUserForm)}ngAfterViewInit(){this.setShowFeaturesButtonPosition(this.ngSelect,this.showRoleFeaturesButton)}getMappedRoles(){return this.teamUser.roles?this.teamUser.roles.split(", ").map(t=>this.roleList.find(n=>n.title===t).id):[]}submitEditUser(){this.formSubmit.next(!0),this.editTeamUserForm.valid?this.apiService.editUser(this.editTeamUserForm.getRawValue()).pipe((0,M.q)(1)).subscribe(()=>{this.alertService.success(this.locale.maketext("You have successfully edited the settings for team user \u201c[_1]\u201d.",this.username)),this.router.navigate([l.list])},t=>{this.alertService.error(t.message)}):this.editTeamUserForm.markAllAsTouched()}editUserInit(){const t=JSON.parse(localStorage.getItem("teamData"));this.username=this.activatedRoute.snapshot.paramMap.get("id"),this.teamUser=t.find(a=>a.username===this.username);const n={validators:g.HB.equalTo(this.locale.maketext("The username cannot be the same as the password."),"username","password"),updateOn:"blur"};this.editTeamUserForm=this.formBuilder.group({username:[{value:this.teamUser.username,disabled:!0}],notes:[this.teamUser.notes||""],password:[""],contactEmail:[this.teamUser.contactEmail],roles:[this.getMappedRoles(),{updateOn:"change"}],acknowledgment:[!1,{updateOn:"change",disabled:!0}]},n),this.initialRoles=this.editTeamUserForm.get("roles").value,this.updateAcknowledgmentStatus(this.editTeamUserForm,this.initialRoles)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g),e.Y36(m.qu),e.Y36(h.F0),e.Y36(e.Qsj),e.Y36(C),e.Y36(s.c9),e.Y36(h.gz),e.Y36(S))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-edit-team-user"]],viewQuery:function(t,n){if(1&t&&(e.Gf(De,5),e.Gf(Be,5),e.Gf(Re,5)),2&t){let a;e.iGM(a=e.CRH())&&(n.ngSelect=a.first),e.iGM(a=e.CRH())&&(n.showRoleFeaturesButton=a.first),e.iGM(a=e.CRH())&&(n.infoBlockElements=a)}},features:[e.qOj],decls:42,vars:36,consts:[[1,"row","base-team-user__description"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"col-xs-12","col-sm-8","col-md-6","base-team-user__form-container"],["autocomplete","off",1,"form-layout-medium",3,"formGroup"],[1,"panel","panel-default"],[4,"ngTemplateOutlet"],[1,"panel-body"],[1,"base-team-user__section-title"],["id","username","element","input","controlName","username",3,"control","labelText","formGroup","inputAddon"],["id","notes","element","textarea","controlName","notes",3,"control","infoBlockText","labelText","formGroup"],["infoBlockChild",""],[1,"form-group"],[1,"base-team-user__set-password-fieldset"],["id","fieldset-password",1,"base-team-user__fieldset-legend",3,"innerHtml"],["formControlName","password",3,"id","passwordInputName","requiresStrengthValidation","validateEmptyField","placeholder","requiredStrength","formSubmission"],["id","equality_validation-container",3,"control",4,"ngIf"],["id","email","element","input","controlName","contactEmail",3,"control","infoBlockText","labelText","formGroup"],["for","roles__ng-select",3,"innerHtml"],["id","roles__show-info-button",1,"btn","btn-link","btn-xs","roles__show-info-button",3,"click"],["showRoleFeaturesButton",""],[1,"far","fa-question-circle","form-info-sign"],["bindLabel","title","bindValue","id","labelForId","roles__ng-select","formControlName","roles",1,"roles__ng-select--custom",3,"items","closeOnSelect","multiple","clearAllText","change"],["ngSelect",""],["ng-option-tmp",""],["id","roles_validation-container",3,"control"],[3,"form"],[1,"col-xs-12","col-sm-4","col-md-3"],["panelHeading",""],["panelFooter",""],["id","equality_validation-container",3,"control"],["type","checkbox",3,"id","checked"],["class","roles__features-container",4,"ngIf"],[1,"roles__features-container"],["class","role-feature",3,"title","innerHtml",4,"ngFor","ngForOf"],[1,"role-feature",3,"title","innerHtml"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","link-show-hide-help",1,"btn","btn-default","btn-xs",3,"click"],[1,"clearfix"],[1,"panel-footer"],["id","edit-user","type","submit",1,"btn","btn-sm","btn-primary",3,"title","click"],["name","add-fill","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"list-team__action-icon"],["id","go-back",1,"btn","btn-link","pull-right","flip",3,"routerLink"],["aria-hidden","true",1,"fas",3,"ngClass"]],template:function(t,n){if(1&t){const a=e.EpF();e.TgZ(0,"div",0),e._UZ(1,"p",1),e.qZA(),e.TgZ(2,"div",2)(3,"form",3)(4,"div",4),e.YNc(5,Ee,1,0,"ng-container",5),e.TgZ(6,"div",6)(7,"p",7),e._uU(8),e.qZA(),e._UZ(9,"cp-team-manager-team-user-form-field",8)(10,"cp-team-manager-team-user-form-field",9,10),e.TgZ(12,"p",7),e._uU(13),e.qZA(),e.TgZ(14,"div",11)(15,"fieldset",12),e._UZ(16,"legend",13),e.qZA(),e._UZ(17,"cp-password",14),e.YNc(18,Ye,1,1,"cp-validation-container",15),e.qZA(),e._UZ(19,"cp-team-manager-team-user-form-field",16,10),e.TgZ(21,"p",7),e._uU(22),e.qZA(),e.TgZ(23,"div",11),e._UZ(24,"label",17),e.TgZ(25,"button",18,19),e.NdJ("click",function(){e.CHM(a);const p=e.MAs(30);return n.toggleRoleFeatures(p,n.showRoleFeatures)}),e._uU(27),e._UZ(28,"i",20),e.qZA(),e.TgZ(29,"ng-select",21,22),e.NdJ("change",function(){return n.updateAcknowledgmentStatus(n.editTeamUserForm,n.initialRoles)}),e.YNc(31,ze,3,4,"ng-template",23),e.qZA(),e._UZ(32,"cp-validation-container",24)(33,"cp-team-manager-acknowledgment-check",25),e.qZA()(),e.YNc(34,Ve,1,0,"ng-container",5),e.qZA()()(),e.TgZ(35,"div",26),e._UZ(36,"cp-team-manager-team-user-help-section")(37,"cp-team-manager-team-user-related-interfaces"),e.qZA(),e.YNc(38,$e,8,2,"ng-template",null,27,e.W1O),e.YNc(40,je,7,5,"ng-template",null,28,e.W1O)}if(2&t){const a=e.MAs(39),r=e.MAs(41);e.xp6(1),e.Q6J("innerHTML",n.locale.maketext("Edit user \u201c[_1]\u201d.",n.teamUser.username),e.oJD),e.xp6(2),e.Q6J("formGroup",n.editTeamUserForm),e.xp6(2),e.Q6J("ngTemplateOutlet",a),e.xp6(3),e.hij(" ",n.locale.maketext("Basic Information")," "),e.xp6(1),e.Q6J("control",n.username)("labelText",n.locale.maketext("Username"))("formGroup",n.editTeamUserForm)("inputAddon","@"+n.teamOwnerDomain),e.xp6(1),e.Q6J("control",n.editTeamUserForm.get("notes"))("infoBlockText",n.locale.maketext("Notes you would like to remember about the team user."))("labelText",n.locale.maketext("Notes (optional)"))("formGroup",n.editTeamUserForm),e.xp6(3),e.hij(" ",n.locale.maketext("Security Information")," "),e.xp6(3),e.Q6J("innerHtml",n.locale.maketext("New Password (optional)"),e.oJD),e.xp6(1),e.Q6J("id","field-cp-password")("passwordInputName","field-cp-password")("requiresStrengthValidation",!0)("validateEmptyField",!1)("placeholder",n.locale.maketext("Enter a new password"))("requiredStrength","10")("formSubmission",n.formSubmit),e.xp6(1),e.Q6J("ngIf",n.editTeamUserForm.errors),e.xp6(1),e.Q6J("control",n.editTeamUserForm.get("contactEmail"))("infoBlockText",n.locale.maketext("The system sends account notifications and password reset confirmations to this email address."))("labelText",n.locale.maketext("Contact Email"))("formGroup",n.editTeamUserForm),e.xp6(3),e.hij(" ",n.locale.maketext("User Settings")," "),e.xp6(2),e.Q6J("innerHtml",n.locale.maketext("Roles (optional)"),e.oJD),e.xp6(3),e.hij(" ",n.roleInfoButtonText," "),e.xp6(2),e.Q6J("items",n.roleList)("closeOnSelect",!1)("multiple",!0)("clearAllText",n.locale.maketext("Clear")),e.xp6(3),e.Q6J("control",n.editTeamUserForm.get("roles")),e.xp6(1),e.Q6J("form",n.editTeamUserForm),e.xp6(1),e.Q6J("ngTemplateOutlet",r)}},directives:[m._Y,m.JL,m.sg,c.tP,H,s.Im,m.JJ,m.u,c.O5,s.fm,k.w9,k.ir,c.sg,G,z,V,h.yS,c.mk],styles:[".base-team-user__section-title[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:var(--cp-spacer-3);margin-top:var(--cp-spacer-4)}.base-team-user__section-title[_ngcontent-%COMP%]:first-of-type{margin-top:unset}.base-team-user__set-password-fieldset[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--cp-spacer-2)}.fieldset-password__radio-label[_ngcontent-%COMP%]{font-weight:400}input[type=radio][_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{color:var(--cp-disabled-color)}html[dir=ltr][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.base-team-user__description[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.base-team-user__form-container[_ngcontent-%COMP%]{padding:0}.roles__features-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,180px);padding:var(--cp-spacer-2) 0}.role-feature[_ngcontent-%COMP%]{padding:var(--cp-spacer-1) 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roles__ng-select--custom[_ngcontent-%COMP%]{position:relative}.roles__show-info-button[_ngcontent-%COMP%]{position:absolute;top:-25px}html[dir=ltr][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%]{right:0}html[dir=rtl][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .roles__show-info-button[_ngcontent-%COMP%]{left:0}.ng-select.roles__ng-select--custom[_ngcontent-%COMP%] .ng-dropdown-panel[_ngcontent-%COMP%] .ng-dropdown-panel-items[_ngcontent-%COMP%]{max-height:180px}.base-team-user__fieldset-legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}"]}),o})(),$=(()=>{class o{constructor(t){this.locale=t}getListTeamTableHeaders(){return[{key:"username",label:this.locale.maketext("Username"),sortable:!0},{key:"roles",label:this.locale.maketext("Roles"),sortable:!0,classes:"hidden-xs"},{key:"lastLoginDate",label:this.locale.maketext("Last Login Date"),sortable:!0,classes:"hidden-xs hidden-sm hidden-md"},{key:"services",label:this.locale.maketext("Services"),sortable:!0,classes:"hidden-xs"},{key:"actions",label:this.locale.maketext("Actions"),sortable:!1}]}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(_.g))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})(),j=(()=>{class o{constructor(t,n){this.locale=t,this.teamOwnerDomain=n}processRoles(t){return t.filter(n=>"default"!==n.id).sort((n,a)=>n.title>a.title?1:-1)}mapTeamUserData(t){for(const r in t)t[r]&&(t["api__"+r]=t[r],delete t[r]);const n={contactEmail:t.api__contact_email,created:this.getLocaleTime(t.api__created),lastLoginDate:this.getLocaleTime(t.api__lastlogin),notes:t.api__notes,roles:t.api__roles?.join(", "),services:this.formatServices(t.api__services),suspendDate:this.getLocaleTime(t.api__suspend_date),suspendReason:t.api__suspend_reason,username:t.api__username},a={contactEmailDetails:`${this.locale.maketext("Contact Email")}: ${n.contactEmail}`,createdDetails:`${this.locale.maketext("Account Created")}: ${n.created}`,lastLoginDateDetails:`${this.locale.maketext("Last Login Date")}: ${n.lastLoginDate||"-"}`,notesDetails:`${this.locale.maketext("Notes")}: ${n.notes||"-"}`,rolesDetails:`${this.locale.maketext("Roles")}: ${n.roles||"-"}`,servicesDetails:`${this.locale.maketext("Services")}: ${n.services||"-"}`,suspendDateDetails:`${this.locale.maketext("Suspended Since")}: ${n.suspendDate}`,suspendReasonDetails:`${this.locale.maketext("Suspended Reason")}: ${n.suspendReason||"-"}`,loginDetails:`${this.locale.maketext("Login Username")}: ${n.username}@${this.teamOwnerDomain}`,suspended:n.suspendDate};return{...n,...a}}getLocaleTime(t){return t?this.locale.maketext("[local_datetime,_1,datetime_format_short][comment,this is needed to convert the date to a localized format]",Number(t)):null}formatServices(t){const n={email:this.locale.maketext("Email"),ftp:this.locale.maketext("FTP"),webdisk:this.locale.maketext("Web Disk")};let a="";for(const r in t)t[r]&&(a+=`${n[r]}, `);return a=a.length?a.slice(0,-2):"",a}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(_.g),e.LFG(S))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var U=(()=>((U||(U={})).warning="warning",U))();const We=function(o){return{warning:o}};let Ke=(()=>{class o{constructor(){this.badgeColor=U}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-badge"]],inputs:{color:"color",content:"content"},decls:2,vars:4,consts:[[1,"c-pill",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"span",0),e._uU(1),e.qZA()),2&t&&(e.Q6J("ngClass",e.VKq(2,We,n.color===n.badgeColor.warning)),e.xp6(1),e.Oqu(n.content))},directives:[c.mk],styles:[".c-pill[_ngcontent-%COMP%]{font-size:var(--cp-small-font-size);display:block;white-space:nowrap;width:auto;position:relative;border-radius:.25rem;overflow:hidden;padding:0px var(--cp-spacer-2);text-overflow:ellipsis;line-height:1.25rem;color:#fff;word-break:break-word}.warning[_ngcontent-%COMP%]{background:var(--cp-warning-border-color)}"]}),o})();function et(o,i){1&o&&e._UZ(0,"cp-icon",3)}function tt(o,i){if(1&o&&e._UZ(0,"cp-icon",4),2&o){const t=e.oxw();e.Q6J("name",t.teamUser.suspended?"lock-unlock-fill":"lock-fill")}}const nt=function(o,i){return{"btn btn-sm btn-outline-primary":!0,"hidden-xs hidden-sm":o,"hidden-md hidden-lg":i}};let ot=(()=>{class o{constructor(t,n,a){this.teamManagerApiService=t,this.alertService=n,this.locale=a,this.suspendStatusChangeSuccess=new e.vpe,this.suspendButtonState=s.FP.enabled,this.actionButtonState=s.FP}suspendUser(t){this.suspendButtonState=s.FP.loading,this.teamManagerApiService.suspendUser(t.username).pipe((0,M.q)(1),(0,v.x)(()=>{this.suspendButtonState=s.FP.enabled})).subscribe({next:()=>{this.alertService.success(this.locale.maketext("Team User \u201c[_1]\u201d is now suspended.",t.username)),this.suspendStatusChangeSuccess.emit()},error:n=>{this.alertService.error(n.message)}})}unsuspendUser(t){this.suspendButtonState=s.FP.loading,this.teamManagerApiService.unsuspendUser(t.username).pipe((0,M.q)(1),(0,v.x)(()=>{this.suspendButtonState=s.FP.enabled})).subscribe({next:()=>{this.alertService.success(this.locale.maketext("Team User \u201c[_1]\u201d is no longer suspended.",t.username)),this.suspendStatusChangeSuccess.emit()},error:n=>{this.alertService.error(n.message)}})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(C),e.Y36(s.c9),e.Y36(_.g))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-suspend-team-user"]],inputs:{teamUser:"teamUser",isDetailedView:"isDetailedView"},outputs:{suspendStatusChangeSuccess:"suspendStatusChangeSuccess"},decls:5,vars:8,consts:[[3,"id","ngClass","click"],["class","suspend-team-user__action-icon fa-spin","name","refresh-line","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",4,"ngIf"],["class","suspend-team-user__action-icon","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",3,"name",4,"ngIf"],["name","refresh-line","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"suspend-team-user__action-icon","fa-spin"],["size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"suspend-team-user__action-icon",3,"name"]],template:function(t,n){1&t&&(e.TgZ(0,"button",0),e.NdJ("click",function(){return n.teamUser.suspended?n.unsuspendUser(n.teamUser):n.suspendUser(n.teamUser)}),e.YNc(1,et,1,0,"cp-icon",1),e.YNc(2,tt,1,1,"cp-icon",2),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&t&&(e.MGl("id","suspend-team-user__button--",n.teamUser.username,""),e.Q6J("ngClass",e.WLB(5,nt,!n.isDetailedView,n.isDetailedView)),e.xp6(1),e.Q6J("ngIf",n.suspendButtonState===n.actionButtonState.loading),e.xp6(1),e.Q6J("ngIf",n.suspendButtonState!==n.actionButtonState.loading),e.xp6(2),e.Oqu(n.locale.maketext(n.teamUser.suspended?"Unsuspend":"Suspend")))},directives:[c.mk,c.O5],styles:[".suspend-team-user__action-icon[_ngcontent-%COMP%]{padding:0}html[dir=ltr][_ngcontent-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%]{margin:0 var(--cp-spacer-1) 0 0}html[dir=rtl][_ngcontent-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .suspend-team-user__action-icon[_ngcontent-%COMP%]{margin:0 0 0 var(--cp-spacer-1)}"]}),o})(),at=(()=>{class o{constructor(t,n,a){this.locale=t,this.alertService=n,this.teamManagerApiService=a,this.deleteSuccess=new e.vpe,this.deleteButtonState=s.FP.enabled}deleteUser(){this.deleteButtonState=s.FP.loading,this.teamManagerApiService.deleteUser(this.teamUser.username).pipe((0,M.q)(1),(0,v.x)(()=>{this.deleteButtonState=s.FP.enabled})).subscribe({next:()=>{this.teamUser.detailsVisible=!1,this.teamUser.showDeletePrompt=!1,this.alertService.success(this.locale.maketext("Team user account \u201c[_1]\u201d deleted.",this.teamUser.username)),this.deleteSuccess.emit()},error:t=>{this.alertService.error(t.message)}})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g),e.Y36(s.c9),e.Y36(C))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-delete-panel"]],inputs:{teamUser:"teamUser"},outputs:{deleteSuccess:"deleteSuccess"},decls:16,vars:10,consts:[[1,"list-panel"],[1,"delete-warning"],[1,"display-table"],[1,"display-table-cell"],[1,"delete-question-mark"],[1,"box"],[1,"delete-message","wordbreak",3,"innerHtml"],["id","delete-message-description",3,"innerHtml"],[3,"buttonState","buttonClass","id","title","click"],["aria-hidden","true",1,"fas","fa-trash"],["type","button",1,"btn","btn-link","btn-sm",3,"id","disabled","click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._uU(5,"?"),e.qZA()(),e.TgZ(6,"div",3)(7,"div",5),e._UZ(8,"span",6)(9,"p",7),e.qZA(),e.TgZ(10,"div",5)(11,"cp-action-button",8),e.NdJ("click",function(){return n.deleteUser()}),e._UZ(12,"i",9),e._uU(13),e.qZA(),e.TgZ(14,"button",10),e.NdJ("click",function(){return n.teamUser.showDeletePrompt=!1}),e._uU(15),e.qZA()()()()()()),2&t&&(e.xp6(8),e.Q6J("innerHtml",n.locale.maketext("Are you sure about deleting \u201c[_1]\u201d?",n.teamUser.username),e.oJD),e.xp6(1),e.Q6J("innerHtml",n.locale.maketext("When you delete a team user account, we permanently delete [output,strong,all] of the account\u2019s data."),e.oJD),e.xp6(2),e.MGl("id","delete-team-user__btn-confirm--",n.teamUser.username,""),e.s9C("title",n.locale.maketext("Delete")),e.Q6J("buttonState",n.deleteButtonState)("buttonClass","btn-primary btn-sm"),e.xp6(2),e.hij(" ",n.locale.maketext("Delete")," "),e.xp6(1),e.MGl("id","delete-team-user__btn-cancel--",n.teamUser.username,""),e.Q6J("disabled",n.teamUser.deleteInProcess),e.xp6(1),e.hij(" ",n.locale.maketext("Cancel")," "))},directives:[s.xV],styles:["html[dir=ltr][_ngcontent-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .list-panel[_ngcontent-%COMP%]{padding-left:0}html[dir=rtl][_ngcontent-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-panel[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .list-panel[_ngcontent-%COMP%]{padding-right:0}"]}),o})();function it(o,i){if(1&o&&e._UZ(0,"i",24),2&o){const t=e.oxw(2).$implicit,n=e.oxw();e.ekj("icon-arrow-up",n.tableService.sortedInAscendingOrder())("icon-arrow-down",!n.tableService.sortedInAscendingOrder()),e.uIk("title",t.label)}}const rt=function(o){return{"column-button btn btn-link p-0":!0,"list-team__username-header":o}};function st(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(t);const a=e.oxw().$implicit;return e.oxw().sort(a.key)}),e.TgZ(1,"span",22),e._uU(2),e.qZA(),e.YNc(3,it,1,5,"i",23),e.qZA()}if(2&o){const t=e.oxw().$implicit,n=e.oxw();e.MGl("id","column-button__",t.key,""),e.Q6J("ngClass",e.VKq(4,rt,"username"===t.key)),e.xp6(2),e.Oqu(t.label),e.xp6(1),e.Q6J("ngIf",t.key===n.tableService.getSortColumn())}}function lt(o,i){if(1&o&&(e.TgZ(0,"span",22),e._uU(1),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.label)}}const ct=function(o){return{width:o}};function mt(o,i){if(1&o&&(e.TgZ(0,"th",18),e.YNc(1,st,4,6,"button",19),e.YNc(2,lt,2,1,"span",20),e.qZA()),2&o){const t=i.$implicit,n=e.oxw();e.Q6J("ngStyle",e.VKq(4,ct,100/n.columns.length+"%"))("ngClass",t.classes),e.xp6(1),e.Q6J("ngIf",t.sortable),e.xp6(1),e.Q6J("ngIf",!t.sortable)}}function dt(o,i){if(1&o&&(e.TgZ(0,"tr",25)(1,"td"),e._UZ(2,"span",26),e._uU(3," \xa0 "),e.TgZ(4,"span",27),e._uU(5),e.qZA()()()),2&o){const t=e.oxw();e.xp6(1),e.uIk("colspan",t.emptyRowColSpan),e.xp6(4),e.Oqu(t.locale.maketext("Loading \u2026"))}}function pt(o,i){if(1&o&&(e.TgZ(0,"tr",28)(1,"td"),e._uU(2),e.qZA()()),2&o){const t=e.oxw();e.xp6(1),e.uIk("colspan",t.emptyRowColSpan),e.xp6(1),e.Oqu(t.noResultsMessage)}}function _t(o,i){if(1&o&&(e.TgZ(0,"span",46),e._uU(1),e.qZA()),2&o){const t=e.oxw(2).$implicit,n=e.oxw(2).$implicit;e.xp6(1),e.hij(" ",n[t.key]||""," ")}}function ut(o,i){if(1&o&&e._UZ(0,"cp-team-manager-badge",47),2&o){const t=e.oxw(5);e.Q6J("color",t.badgeColor.warning)("content",t.locale.maketext("Suspended"))}}const gt=function(o,i){return{"fa-chevron-down":o,"fa-chevron-right":i}};function ht(o,i){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",39)(2,"span",40)(3,"button",41),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(3).$implicit;return e.oxw().toggleTeamUserDetails(a)}),e.TgZ(4,"span",42),e._uU(5,"Expand row"),e.qZA(),e._UZ(6,"i",43),e.qZA()(),e.YNc(7,_t,2,1,"span",44),e.YNc(8,ut,1,2,"cp-team-manager-badge",45),e.qZA(),e.BQk()}if(2&o){const t=e.oxw().$implicit,n=e.oxw(2).$implicit;e.xp6(3),e.MGl("id","toggleRollDown_",n[t.key],""),e.xp6(3),e.Q6J("ngClass",e.WLB(4,gt,n.detailsVisible,!n.detailsVisible)),e.xp6(1),e.Q6J("ngIf","actions"!==(null==t?null:t.key)),e.xp6(1),e.Q6J("ngIf","username"===t.key&&n.suspended)}}function ft(o,i){if(1&o&&(e.ynx(0),e._uU(1),e.BQk()),2&o){const t=e.oxw().$implicit,n=e.oxw(2).$implicit;e.xp6(1),e.hij(" ",n[t.key]," ")}}const Ct=function(o){return{$implicit:o,isDetailedView:!1}};function Ot(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"div",48)(1,"a",49),e._UZ(2,"cp-icon",50),e._uU(3),e.qZA(),e.TgZ(4,"cp-team-manager-suspend-team-user",51),e.NdJ("suspendStatusChangeSuccess",function(){return e.CHM(t),e.oxw(4).suspendStatusChangeHandler()}),e.qZA(),e.GkF(5,52),e.qZA()}if(2&o){const t=e.oxw(3).$implicit,n=e.oxw(),a=e.MAs(23);e.xp6(1),e.Q6J("routerLink","/"+n.manageTeamRoutes.edit+"/"+t.username),e.xp6(2),e.hij(" ",n.locale.maketext("Edit User")," "),e.xp6(1),e.Q6J("isDetailedView",!1)("teamUser",t),e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(6,Ct,t))}}function Mt(o,i){if(1&o&&(e.ynx(0),e._uU(1),e.BQk()),2&o){const t=e.oxw().$implicit,n=e.oxw(2).$implicit;e.xp6(1),e.Oqu(n[t.key]||"")}}function bt(o,i){if(1&o&&(e.TgZ(0,"td",34),e.ynx(1,35),e.YNc(2,ht,9,7,"ng-container",36),e.YNc(3,ft,2,1,"ng-container",36),e.YNc(4,Ot,6,8,"div",37),e.YNc(5,Mt,2,1,"ng-container",38),e.BQk(),e.qZA()),2&o){const t=i.$implicit,n=e.oxw(2).$implicit;e.Q6J("ngClass",t.classes)("id","list-team__column-"+t.key+"--"+n.username),e.xp6(1),e.Q6J("ngSwitch",t.key),e.xp6(1),e.Q6J("ngSwitchCase","username"),e.xp6(1),e.Q6J("ngSwitchCase","roles"),e.xp6(1),e.Q6J("ngSwitchCase","actions")}}const wt=function(o){return{"warning--background":o}};function Pt(o,i){if(1&o&&(e.TgZ(0,"tr",32),e.YNc(1,bt,6,6,"td",33),e.qZA()),2&o){const t=e.oxw().$implicit,n=e.oxw();e.Q6J("id","main-row-"+t.username)("ngClass",e.VKq(4,wt,t.showDeletePrompt)),e.xp6(1),e.Q6J("ngForOf",n.columns)("ngForTrackBy",n.trackByFn)}}function xt(o,i){if(1&o&&(e.TgZ(0,"div",55)(1,"p",56),e._uU(2),e.qZA(),e.TgZ(3,"p"),e._uU(4),e.qZA(),e.TgZ(5,"p"),e._uU(6),e.qZA()()),2&o){const t=e.oxw(2).$implicit,n=e.oxw();e.xp6(2),e.hij(" ",n.locale.maketext("Suspension Information:")," "),e.xp6(2),e.Oqu(t.suspendDateDetails),e.xp6(2),e.Oqu(t.suspendReasonDetails)}}function Tt(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"cp-team-manager-delete-panel",58),e.NdJ("deleteSuccess",function(){e.CHM(t);const a=e.oxw(2).$implicit;return e.oxw().deleteSuccess(a)}),e.qZA()}if(2&o){const t=e.oxw(2).$implicit;e.Q6J("teamUser",t)}}const kt=function(o){return{$implicit:o,isDetailedView:!0}};function vt(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"td",53)(1,"div",0),e.YNc(2,xt,7,3,"div",54),e.TgZ(3,"div",55)(4,"p",56),e._uU(5),e.qZA(),e.TgZ(6,"p"),e._uU(7),e.qZA(),e.TgZ(8,"p"),e._uU(9),e.qZA(),e.TgZ(10,"p"),e._uU(11),e.qZA(),e.TgZ(12,"p"),e._uU(13),e.qZA()(),e.TgZ(14,"div",55)(15,"p",56),e._uU(16),e.qZA(),e.TgZ(17,"p"),e._uU(18),e.qZA(),e.TgZ(19,"p"),e._uU(20),e.qZA()(),e.TgZ(21,"div",55)(22,"p",56),e._uU(23),e.qZA(),e.TgZ(24,"p"),e._uU(25),e.qZA()()(),e.TgZ(26,"div")(27,"cp-team-manager-suspend-team-user",51),e.NdJ("suspendStatusChangeSuccess",function(){return e.CHM(t),e.oxw(2).suspendStatusChangeHandler()}),e.qZA(),e.GkF(28,52),e.qZA(),e.YNc(29,Tt,1,1,"cp-team-manager-delete-panel",57),e.qZA()}if(2&o){const t=e.oxw().$implicit,n=e.oxw(),a=e.MAs(23);e.Q6J("id","details-row-"+t.username),e.xp6(2),e.Q6J("ngIf",t.suspended),e.xp6(3),e.hij(" ",n.locale.maketext("Account Information"),": "),e.xp6(2),e.Oqu(t.loginDetails),e.xp6(2),e.Oqu(t.notesDetails),e.xp6(2),e.Oqu(t.lastLoginDateDetails),e.xp6(2),e.Oqu(t.createdDetails),e.xp6(3),e.hij(" ",n.locale.maketext("Team Information"),": "),e.xp6(2),e.Oqu(t.rolesDetails),e.xp6(2),e.Oqu(t.servicesDetails),e.xp6(3),e.hij(" ",n.locale.maketext("Security Information"),": "),e.xp6(2),e.Oqu(t.contactEmailDetails),e.xp6(2),e.Q6J("isDetailedView",!0)("teamUser",t),e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(17,kt,t)),e.xp6(1),e.Q6J("ngIf",t.showDeletePrompt)}}const St=function(o,i){return{"wordbreak list-team__details-row":!0,"list-team__details-row--no-border":o,"warning--background":i}};function Ut(o,i){if(1&o&&(e.ynx(0),e.YNc(1,Pt,2,6,"tr",29),e.TgZ(2,"tr",30),e.YNc(3,vt,30,19,"td",31),e.qZA(),e.BQk()),2&o){const t=i.$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngIf",n.columnKeyExists(t)),e.xp6(1),e.Q6J("ngClass",e.WLB(3,St,t.detailsVisible,t.showDeletePrompt)),e.xp6(1),e.Q6J("ngIf",t.detailsVisible)}}const yt=function(o,i){return{"btn btn-sm btn-outline-primary":!0,"hidden-xs hidden-sm":o,"hidden-md hidden-lg":i}};function At(o,i){if(1&o){const t=e.EpF();e.TgZ(0,"button",59),e.NdJ("click",function(){const r=e.CHM(t).$implicit;return e.oxw().deletePrompt(r)}),e._UZ(1,"cp-icon",60),e.TgZ(2,"span",61),e._uU(3),e.qZA()()}if(2&o){const t=i.$implicit,n=i.isDetailedView,a=e.oxw();e.Q6J("id","list-team__delete-user--"+t.username)("ngClass",e.WLB(4,yt,!n,n))("disabled",t.showDeletePrompt),e.xp6(3),e.Oqu(a.locale.maketext("Delete"))}}let X=(()=>{class o{constructor(t,n,a,r,p,O,w){this.tableService=t,this.locale=n,this.teamTableHeadersService=a,this.teamManagerApiService=r,this.alertService=p,this.mapApiService=O,this.maxTeamUsers=w,this.badgeColor=U,this.manageTeamRoutes=l}ngOnInit(){this.columns=this.teamTableHeadersService.getListTeamTableHeaders(),this.emptyRowColSpan=this.columns?.length+1,this.getListOfTeamUsers()}ngAfterViewInit(){this.teamManagerApiService.listRoles().pipe((0,M.q)(1)).subscribe(t=>{localStorage.setItem("roleList",JSON.stringify(this.mapApiService.processRoles(t.data[0])))},t=>{this.alertService.error(t.message)})}toggleTeamUserDetails(t){t.detailsVisible=!t.detailsVisible}columnKeyExists(t){return this.columns.some(n=>Object.keys(t).includes(n.key))}trackByFn(t){return t}sort(t){this.tableService.changeSort(t),this.rows.sort((n,a)=>this.compare(n[t],a[t],this.tableService.sorts[0].direction===P.Sr.Ascending))}deletePrompt(t){t.detailsVisible=!0,t.showDeletePrompt=!0}deleteSuccess(t){this.rows=this.rows.filter(n=>n.username!==t.username)}suspendStatusChangeHandler(){this.getListOfTeamUsers()}getListOfTeamUsers(){this.tableService.loading=!0,this.teamManagerApiService.getTeam().pipe((0,M.q)(1),(0,v.x)(()=>{this.tableService.loading=!1,this.noResultsMessage=this.noResultsReason()})).subscribe(t=>{this.rows=t.data.map(n=>this.mapApiService.mapTeamUserData(n)),localStorage.setItem("teamData",JSON.stringify(this.rows))},t=>{this.alertService.error(t.message)})}compare(t,n,a){return(t<n?-1:1)*(a?1:-1)}noResultsReason(){const n=this.rows?.length;return this.tableService.loading||n?null:this.noResultsMessage||this.locale.maketext("No results available.")}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(Z),e.Y36(_.g),e.Y36($),e.Y36(C),e.Y36(s.c9),e.Y36(j),e.Y36(R))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-list-team"]],decls:24,vars:14,consts:[[1,"row"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"col-xs-12","col-md-9"],["id","privilege-escalation-callout","calloutType","warning"],[3,"innerHtml"],[1,"col-sm-4","col-md-3","animate-stats"],["id","stats-basic","displayLimit","true",3,"usedValue","limitValue"],[1,"list-team__links"],["id","audit-log",1,"btn","btn-sm","list-team__link-with-icon",3,"routerLink"],["aria-hidden","true",1,"ri-file-text-line","ri-xl","list-team__icon"],["id","create-user","id","new-user",1,"btn","btn-sm","btn-primary",3,"routerLink"],["name","add-fill","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"list-team__action-icon"],[1,"table","table-striped"],[3,"ngStyle","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","info empty-row","id","loadingRow",4,"ngIf"],["class","info empty-row","id","emptySearchRow",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["deleteAction",""],[3,"ngStyle","ngClass"],[3,"id","ngClass","click",4,"ngIf"],["class","column-label separator",4,"ngIf"],[3,"id","ngClass","click"],[1,"column-label","separator"],["ngClass","column-icon","aria-hidden","true",3,"icon-arrow-up","icon-arrow-down",4,"ngIf"],["ngClass","column-icon","aria-hidden","true"],["id","loadingRow",1,"info","empty-row"],["aria-hidden","true",1,"fas","fa-spinner","fa-spin"],[1,"loading-text"],["id","emptySearchRow",1,"info","empty-row"],["class","list-team__main-row",3,"id","ngClass",4,"ngIf"],[3,"ngClass"],["colspan","7",3,"id",4,"ngIf"],[1,"list-team__main-row",3,"id","ngClass"],[3,"ngClass","id",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngClass","id"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","list-team__action-items",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"list-team__username-column"],[1,"row-expand-container"],[1,"btn","btn-sm","btn-link",3,"id","click"],[1,"sr-only"],["aria-hidden","true",1,"fas",3,"ngClass"],["class","list-team__td-username",4,"ngIf"],[3,"color","content",4,"ngIf"],[1,"list-team__td-username"],[3,"color","content"],[1,"list-team__action-items"],["id","edit-user",1,"btn","btn-sm","btn-outline-primary",3,"routerLink"],["name","pencil-fill","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"list-team__action-icon"],[3,"isDetailedView","teamUser","suspendStatusChangeSuccess"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["colspan","7",3,"id"],["class","list-team__details col-lg-3 col-md-6 col-sm-12 col-12",4,"ngIf"],[1,"list-team__details","col-lg-3","col-md-6","col-sm-12","col-12"],[1,"list-team__details-label"],[3,"teamUser","deleteSuccess",4,"ngIf"],[3,"teamUser","deleteSuccess"],[3,"id","ngClass","disabled","click"],["name","delete-bin-7-fill","size","{IconSize.lg}","mode","{IconMode.Centered}","aria-hidden","true",1,"list-team__action-icon"],[1,""]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"p",1),e.TgZ(2,"p",2)(3,"cp-callout",3),e._UZ(4,"span",4),e.qZA()(),e.TgZ(5,"div",5),e._UZ(6,"cp-stats",6),e.qZA()(),e.TgZ(7,"div",7)(8,"a",8),e._UZ(9,"i",9),e._uU(10),e.qZA(),e.TgZ(11,"a",10),e._UZ(12,"cp-icon",11),e._uU(13),e.qZA()(),e.TgZ(14,"table",12)(15,"thead")(16,"tr"),e.YNc(17,mt,3,6,"th",13),e.qZA()(),e.TgZ(18,"tbody"),e.YNc(19,dt,6,2,"tr",14),e.YNc(20,pt,3,2,"tr",15),e.YNc(21,Ut,4,6,"ng-container",16),e.qZA()(),e.YNc(22,At,4,7,"ng-template",null,17,e.W1O)),2&t&&(e.xp6(1),e.Q6J("innerHTML",n.locale.maketext("Manage Team User accounts and view the Audit Log. For more information, read the [output,url,_1,documentation,title,cPanel Documentation,target,_2,class,cp-external-link].","https://go.cpanel.net/cpanelhelp-documentation","cPanel docs"),e.oJD),e.xp6(3),e.Q6J("innerHtml",n.locale.maketext("[output,strong,Warning:] This feature grants access to account-level functionality. Only grant this permission to users that you trust to access and modify your account."),e.oJD),e.xp6(2),e.s9C("usedValue",(null==n.rows?null:n.rows.length)||"0"),e.Q6J("limitValue",n.maxTeamUsers),e.xp6(2),e.Q6J("routerLink","/"+n.manageTeamRoutes.auditLog),e.xp6(2),e.hij(" ",n.locale.maketext("View Audit Log")," "),e.xp6(1),e.Q6J("routerLink","/"+n.manageTeamRoutes.create),e.xp6(2),e.hij(" ",n.locale.maketext("Create Team User")," "),e.xp6(4),e.Q6J("ngForOf",n.columns)("ngForTrackBy",n.trackByFn),e.xp6(2),e.Q6J("ngIf",n.tableService.loading),e.xp6(1),e.Q6J("ngIf",n.noResultsMessage),e.xp6(1),e.Q6J("ngForOf",n.rows)("ngForTrackBy",n.trackByFn))},directives:[s.Oc,s._q,h.yS,c.sg,c.PC,c.mk,c.O5,c.RF,c.n9,Ke,ot,c.tP,c.ED,at],styles:[".table[_ngcontent-%COMP%]{border-collapse:separate}.column-button[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none;padding:0}.column-button[_ngcontent-%COMP%]:hover > span[_ngcontent-%COMP%]{text-decoration:underline}.column-button[_ngcontent-%COMP%]:focus{outline:none}.column-label[_ngcontent-%COMP%]{display:inline-block}html[dir=ltr][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-2)}html[dir=rtl][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .column-label[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .column-label[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-2)}.column-icon[_ngcontent-%COMP%]{top:var(--cp-spacer-2)}thead[_ngcontent-%COMP%]{position:sticky;top:0;background:var(--cp-table-header-background)}thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-2);background:var(--cp-table-header-background);background-clip:content-box}.list-team__links[_ngcontent-%COMP%]{margin-top:var(--cp-spacer-3);margin-bottom:var(--cp-spacer-2);display:flex;justify-content:flex-end;align-items:center}html[dir=ltr][_ngcontent-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr][_ngcontent-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr][_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=ltr][_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=ltr] [_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr][_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr] [_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child){margin-right:var(--cp-spacer-2)}html[dir=rtl][_ngcontent-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl][_ngcontent-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl][_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=rtl][_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=rtl] [_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl][_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl] [_nghost-%COMP%] .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child){margin-left:var(--cp-spacer-2)}.list-team__username-column[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center}html[dir=ltr][_ngcontent-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .list-team__td-username[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}html[dir=ltr][_ngcontent-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-5)}html[dir=rtl][_ngcontent-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .list-team__username-header[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-5)}.list-team__details[_ngcontent-%COMP%]{padding:var(--cp-spacer-2) var(--cp-spacer-3)}.list-team__action-icon[_ngcontent-%COMP%]{padding:0}html[dir=ltr][_ngcontent-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%]{margin:0 var(--cp-spacer-1) 0 0}html[dir=rtl][_ngcontent-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .list-team__action-icon[_ngcontent-%COMP%]{margin:0 0 0 var(--cp-spacer-1)}.list-team__action-button-with-icon[_ngcontent-%COMP%]{padding:.25rem;vertical-align:middle}.list-team__action-items[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.list-team__link-with-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}html[dir=ltr][_ngcontent-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .list-team__icon[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+1), .table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+2){background-color:#f1f1f1}.table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+3), .table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+4){background-color:#f8f8f8}.table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr.warning--background[_ngcontent-%COMP%]{background-color:var(--cp-warning-background-light)}.list-team__details-row--no-border[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:0;padding:0 var(--cp-spacer-3) var(--cp-spacer-3) var(--cp-spacer-3)}.list-team__details-label[_ngcontent-%COMP%]{font-weight:700}@media only screen and (max-width: 767px){.list-team__action-items[_ngcontent-%COMP%]{justify-content:flex-end}}"]}),o})();var Zt=d(567),Ft=d(1086),Jt=d(7221);let W=(()=>{class o{constructor(t,n,a,r){this.locale=t,this.alertService=n,this.mapApiService=a,this.teamManagerApiService=r}canActivate(t,n){const a=localStorage.getItem("roleList")&&localStorage.getItem("teamData");return!!a||(a?void 0:this.fetchTeamManagerData())}fetchTeamManagerData(){return(0,Zt.D)([this.teamManagerApiService.listRoles(),this.teamManagerApiService.getTeam()]).pipe((0,f.U)(([t,n])=>{const a=n.data.map(r=>this.mapApiService.mapTeamUserData(r));return localStorage.setItem("teamData",JSON.stringify(a)),localStorage.setItem("roleList",JSON.stringify(this.mapApiService.processRoles(t.data[0]))),!0}),(0,Jt.K)(()=>{const t=this.locale.maketext("Could not load all information required to access this page."),n=this.locale.maketext("If this condition persists, contact your system administrator.");return this.alertService.error(`${t} ${n}`),(0,Ft.of)(!1)}))}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(_.g),e.LFG(s.c9),e.LFG(j),e.LFG(C))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const Lt=[{path:l.create,component:Qe,canActivate:[W],data:{breadcrumb:{id:l.create}}},{path:`${l.edit}/:id`,component:Xe,canActivate:[W],data:{breadcrumb:{id:l.edit}}},{path:l.auditLog,component:fe,data:{breadcrumb:{id:l.auditLog}}},{path:l.list,component:X,data:{breadcrumb:{id:l.list}}},{path:"",redirectTo:`/${l.list}`,pathMatch:"full"},{path:"**",component:X,pathMatch:"full"}];let qt=(()=>{class o{constructor(t,n){this.locale=t,this.breadcrumbService=n;const a={[l.create]:{displayName:t.maketext("Create a Team User"),id:l.create,link:t.maketext("Go to the Create a Team User interface."),longName:t.maketext("Create a Team User"),path:`/${l.create}`,parentId:l.list},[l.edit]:{displayName:t.maketext("Edit a Team User"),id:l.edit,link:t.maketext("Go to the Edit a Team User interface."),longName:t.maketext("Edit a Team User"),path:`/${l.edit}`,parentId:l.list},[l.list]:{displayName:t.maketext("List Team"),id:l.list,link:t.maketext("Go to the List Team interface."),longName:t.maketext("List Team"),path:`/${l.list}`,parentId:""},[l.auditLog]:{displayName:t.maketext("Audit Log"),id:l.auditLog,link:t.maketext("Go to the Audit Log interface."),longName:t.maketext("Audit Log"),path:`/${l.auditLog}`,parentId:l.list}};this.breadcrumbService.initializeBreadcrumbs(),this.breadcrumbService.flattenedRoutesData=Object.values(a)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(_.g),e.LFG(s.pm))},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[[h.Bz.forRoot(Lt,{useHash:!0,relativeLinkResolution:"legacy"})],h.Bz]}),o})(),It=(()=>{class o{constructor(t){this.locale=t,this.title="team-manager"}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(_.g))},o.\u0275cmp=e.Xpm({type:o,selectors:[["cp-team-manager-root"]],decls:7,vars:1,consts:[[1,"row"],[1,"col-xs-12","col-md-9"],["id","experimental-callout"],[1,"body-content"],[1,"section","animate-view","ng-cloak"]],template:function(t,n){1&t&&(e._UZ(0,"cp-alert-list"),e.TgZ(1,"div",0)(2,"div",1)(3,"cp-callout",2),e._uU(4),e.qZA()()(),e.TgZ(5,"div",3),e._UZ(6,"router-outlet",4),e.qZA()),2&t&&(e.xp6(4),e.hij(" ",n.locale.maketext("The [_1] feature is experimental and is not recommended for production environments.","Team Manager")," "))},directives:[s.hF,s.Oc,h.lC],encapsulation:2}),o})(),Nt=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o,bootstrap:[It]}),o.\u0275inj=e.cJS({providers:[C,$,te.a,{provide:ne,useValue:window.PAGE.base},{provide:I,useValue:window.PAGE.userName},{provide:N,useValue:window.PAGE.emailTool},{provide:Q,useValue:window.PAGE.ftpTool},{provide:D,useValue:window.PAGE.webDiskTool},{provide:B,useValue:window.PAGE.deprefix},{provide:R,useValue:window.PAGE.maxTeamUsers},{provide:S,useValue:window.PAGE.teamOwnerDomain}],imports:[[y.b2,m.u5,m.UX,s.wH,A.mr.forRoot(),K.JF,qt,s.kM,q.au,s.t8,s.zr,s.CQ,s.wL,s.RV,s.u3,s.df,s.kx,k.A0,s.gz,s.vs,ee.m,s.RU]]}),o})();(0,e.G48)(),y.q6().bootstrapModule(Nt).catch(o=>console.error(o))}},T=>{T.O(0,[736],()=>T(T.s=3779)),T.O()}]);
Back to Directory
File Manager