diff --git a/server/src/uds/static/admin/main.js b/server/src/uds/static/admin/main.js index a29713012..1a6f7906e 100644 --- a/server/src/uds/static/admin/main.js +++ b/server/src/uds/static/admin/main.js @@ -15,7 +15,7 @@ ${e.map((t,o)=>`${o+1}) ${t.toString()}`).join(` `),u(5),p("rest",r.servicePools)("customButtons",r.customButtons)("pageSize",6),u(4),p("rest",r.services)("itemId",r.service.id)("tableId","serviceInfo-d-log"+r.service.id)("pageSize",5))},dependencies:[Te,Qt,Xe,et,Je,Jt,en,rn,ae,Ie,Ri],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.mat-column-count[_ngcontent-%COMP%], .mat-column-image[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{max-width:7rem;justify-content:center}.navigation[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:flex-end;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}"]});let n=i;return n})();function WG(n,i){if(n&1&&(c(0,"div",3),M(1,"div",4)(2,"div",5),d()),n&2){let e=i.$implicit;u(),p("innerHTML",e.gui.label,qt),u(),p("innerHTML",e.value,qt)}}var ho=(()=>{let i=class i{constructor(t){this.api=t,this.gui=[]}ngOnInit(){this.processFields()}processFields(){if(!this.gui||!this.value)return;let t=this.gui.filter(o=>o.gui.type!==Xn.HIDDEN);for(let o of t){let r=this.value[o.name];switch(o.gui.type){case Xn.CHECKBOX:o.value=r?django.gettext("Yes"):django.gettext("No");break;case Xn.PASSWORD:o.value=django.gettext("(hidden)");break;case Xn.CHOICE:{let a=Pd.locateChoice(r,o);o.value=a.text;break}case Xn.MULTI_CHOICE:o.value=django.gettext("Selected items :")+r.length;break;case Xn.IMAGECHOICE:{let a=Pd.locateChoice(r,o);a.img&&(o.value=this.api.safeString(this.api.gui.icon(a.img)+" "+a.text));break}case Xn.INFO:continue;default:o.value=r}(o.value===""||o.value===void 0||o.value===null)&&(o.value="(empty)")}return t}};i.\u0275fac=function(o){return new(o||i)(C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-information"]],inputs:{value:"value",gui:"gui"},standalone:!1,decls:4,vars:1,consts:[[1,"card"],[1,"card-content"],["class","item",4,"ngFor","ngForOf"],[1,"item"],[1,"label",3,"innerHTML"],[1,"value",3,"innerHTML"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1),x(2,WG,3,2,"div",2),d(),M(3,"div"),d()),o&2&&(u(2),p("ngForOf",r.processFields()))},dependencies:[$e],styles:[".card-content[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column}.item[_ngcontent-%COMP%]{padding-bottom:.5rem;display:flex}.label[_ngcontent-%COMP%]{font-weight:700;width:32rem;overflow-x:hidden;text-overflow:ellipsis;text-align:end;margin-right:1rem;align-self:center}"]});let n=i;return n})();var GG=n=>["/services","providers",n];function $G(n,i){n&1&&(c(0,"uds-translate"),f(1,"Summary"),d())}function qG(n,i){if(n&1&&M(0,"uds-information",15),n&2){let e=_(2);p("value",e.provider)("gui",e.gui)}}function YG(n,i){n&1&&(c(0,"uds-translate"),f(1,"Services"),d())}function QG(n,i){n&1&&(c(0,"uds-translate"),f(1,"Usage"),d())}function KG(n,i){n&1&&(c(0,"uds-translate"),f(1,"Logs"),d())}function ZG(n,i){if(n&1){let e=k();c(0,"div",6)(1,"div",7)(2,"mat-tab-group",8),U("selectedIndexChange",function(o){y(e);let r=_();return W(r.selectedTab,o)||(r.selectedTab=o),w(o)}),c(3,"mat-tab"),x(4,$G,2,0,"ng-template",9),c(5,"div",10),x(6,qG,1,2,"uds-information",11),d()(),c(7,"mat-tab"),x(8,YG,2,0,"ng-template",9),c(9,"div",10)(10,"uds-table",12),b("newAction",function(o){y(e);let r=_();return w(r.onNewService(o))})("editAction",function(o){y(e);let r=_();return w(r.onEditService(o))})("deleteAction",function(o){y(e);let r=_();return w(r.onDeleteService(o))})("customButtonAction",function(o){y(e);let r=_();return w(r.onInformation(o))})("loaded",function(o){y(e);let r=_();return w(r.onLoad(o))}),d()()(),c(11,"mat-tab"),x(12,QG,2,0,"ng-template",9),c(13,"div",10)(14,"uds-table",13),b("deleteAction",function(o){y(e);let r=_();return w(r.onDeleteUsage(o))}),d()()(),c(15,"mat-tab"),x(16,KG,2,0,"ng-template",9),c(17,"div",10),M(18,"uds-logs-table",14),d()()()()()}if(n&2){let e=_();u(2),z("selectedIndex",e.selectedTab),p("@.disabled",!0),u(4),p("ngIf",e.provider&&e.gui),u(4),p("rest",e.services)("multiSelect",!0)("allowExport",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("tableId","providers-d-services"+e.provider.id),u(4),p("rest",e.usage)("multiSelect",!0)("allowExport",!0)("pageSize",e.api.config.admin.page_size)("tableId","providers-d-usage"+e.provider.id),u(4),p("rest",e.services.parentModel)("itemId",e.provider.id)("tableId","providers-d-log"+e.provider.id)}}var hw=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:ct.ONLY_MENU}],this.provider=null,this.gui=[],this.services={},this.usage={},this.selectedTab=1}ngOnInit(){let t=this.route.snapshot.paramMap.get("provider");t&&(this.services=this.rest.providers.detail(t,"services"),this.usage=this.rest.providers.detail(t,"usage"),this.services.parentModel.get(t).then(o=>{this.provider=o,this.services.parentModel.gui(o.type).then(r=>{this.gui=r})}))}onInformation(t){vA.launch(this.api,this.services,t.table.selection.selected[0])}onNewService(t){let o=django.gettext("New service")+": "+(t.param.name||"");this.api.gui.forms.typedNewForm(t,o,!1)}onEditService(t){let o=django.gettext("Edit service")+": "+(t.table.selection.selected[0].name||"");this.api.gui.forms.typedEditForm(t,o,!1)}onDeleteService(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service"))}onDeleteUsage(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user service"))}onLoad(t){if(t.param===!0){let o=this.route.snapshot.paramMap.get("service");if(o!==void 0){this.selectedTab=1;let r=t.table;r.dataSource.data.forEach(a=>{a.id===o&&r.selection.select(a)})}}}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-provider-detail"]],standalone:!1,decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","providers",3,"newAction","editAction","deleteAction","customButtonAction","loaded","rest","multiSelect","allowExport","customButtons","pageSize","tableId"],["icon","usage",3,"deleteAction","rest","multiSelect","allowExport","pageSize","tableId"],[3,"rest","itemId","tableId"],[3,"value","gui"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1)(2,"a",2)(3,"i",3),f(4,"arrow_back"),d()(),f(5," \xA0"),M(6,"img",4),f(7),d(),x(8,ZG,19,17,"div",5),d()),o&2&&(u(2),p("routerLink",Un(4,GG,r.services.parentId)),u(4),p("src",r.api.staticURL("admin/img/icons/services.png"),Se),u(),O(" \xA0",r.provider==null?null:r.provider.name," "),u(),p("ngIf",r.provider!==null))},dependencies:[ue,bn,Jt,en,rn,ae,Ie,Ri,ho],encapsulation:2});let n=i;return n})();var fw=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r}ngOnInit(){}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New server"),!0)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit server"),!0)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete server"))}onDetail(t){this.api.navigation.gotoServerDetail(t.param.id)}processElement(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("server"))}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-servers"]],standalone:!1,decls:1,vars:7,consts:[["tableId","server-groups-table","icon","servers",3,"newAction","editAction","deleteAction","detailAction","loaded","rest","onItem","multiSelect","allowExport","hasPermissions","newGrouped","pageSize"]],template:function(o,r){o&1&&(c(0,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("detailAction",function(s){return r.onDetail(s)})("loaded",function(s){return r.onLoad(s)}),d()),o&2&&p("rest",r.rest.serverGroups)("onItem",r.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("pageSize",r.api.config.admin.page_size)},dependencies:[Ie],encapsulation:2});let n=i;return n})();var bA=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.dialogRef=o,this.data=r,this.filename="",this.contains_header=!0,this.separator=",",this.result=[],this.title="Import CSV",this.help="Select a CSV file to import",r&&(this.title=r.title||this.title,this.help=r.help||this.help)}static launch(t,o){return H(this,null,function*(){let r=window.innerWidth<800?"60%":"40%",a=t.gui.dialog.open(i,{width:r,data:o,disableClose:!1});return new Promise((s,l)=>{a.afterClosed().subscribe(m=>{s({data:a.componentInstance.result})})})})}loadCSV(t){return H(this,null,function*(){let o=t.split(` `).map(a=>a.trim());if(o.length>=1024)return console.log("Too many lines, do not loaded (max is 1024)"),[];this.contains_header&&(o=o.slice(1));let r=[];for(let a of o){let s=a.split(this.separator);s.length===1&&s[0]===""||r.push(s)}return r})}onFileChange(t){return H(this,null,function*(){let o=t.target.files[0];if(!o)return;this.filename=o.name;let r=new FileReader,a=new Xt;r.onload=l=>{let m=r.result;a.resolve(m)},r.readAsText(o);let s=yield a;this.result=yield this.loadCSV(s)})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-cvsimport"]],standalone:!1,decls:57,vars:8,consts:[["fileUpload",""],["mat-dialog-title",""],[3,"innerHTML"],[1,"content"],[1,"options"],[1,"field"],[3,"valueChange","value"],[3,"value"],["value",","],["value",";"],["value","|"],["value","tab"],[1,"upload"],["type","file","accept",".csv",1,"file-input",3,"change"],["type","text","matInput","","readonly","readonly",3,"ngModelChange","click","ngModel","placeholder","matTooltip"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-raised-button","","mat-dialog-close","","color","warn",3,"click"]],template:function(o,r){if(o&1){let a=k();c(0,"h4",1)(1,"uds-translate"),f(2,"CVS Import options for"),d(),f(3,"\xA0"),M(4,"b",2),d(),c(5,"mat-dialog-content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"mat-form-field")(10,"mat-label")(11,"uds-translate"),f(12,"Header"),d()(),c(13,"mat-select",6),U("valueChange",function(l){return y(a),W(r.contains_header,l)||(r.contains_header=l),w(l)}),c(14,"mat-option",7)(15,"uds-translate"),f(16,"CSV contains header line"),d()(),c(17,"mat-option",7)(18,"uds-translate"),f(19,"CSV DOES NOT contains header line"),d()()()()(),c(20,"div",5)(21,"mat-form-field")(22,"mat-label")(23,"uds-translate"),f(24,"Separator"),d()(),c(25,"mat-select",6),U("valueChange",function(l){return y(a),W(r.separator,l)||(r.separator=l),w(l)}),c(26,"mat-option",8)(27,"uds-translate"),f(28,"Use comma"),d(),f(29," (,)"),d(),c(30,"mat-option",9)(31,"uds-translate"),f(32,"Use semicolon"),d(),f(33," (;)"),d(),c(34,"mat-option",10)(35,"uds-translate"),f(36,"Use pipe"),d(),f(37," (|)"),d(),c(38,"mat-option",11)(39,"uds-translate"),f(40,"Use tab"),d(),f(41," (tab)"),d()()()()()(),c(42,"div",12)(43,"mat-form-field")(44,"mat-label")(45,"uds-translate"),f(46,"File"),d()(),c(47,"input",13,0),b("change",function(l){return y(a),w(r.onFileChange(l))}),d(),c(49,"input",14),U("ngModelChange",function(l){return y(a),W(r.filename,l)||(r.filename=l),w(l)}),b("click",function(){y(a);let l=be(48);return w(l.click())}),d()()()(),c(50,"mat-dialog-actions")(51,"button",15)(52,"uds-translate"),f(53,"Ok"),d()(),c(54,"button",16),b("click",function(){return y(a),w(r.filename="")}),c(55,"uds-translate"),f(56,"Cancel"),d()()()}o&2&&(u(4),p("innerHTML",r.title,qt),u(9),z("value",r.contains_header),u(),p("value",!0),u(3),p("value",!1),u(8),z("value",r.separator),u(24),z("ngModel",r.filename),p("placeholder","Click here to select file to import.")("matTooltip",r.help))},dependencies:[lt,we,xe,Te,ar,Qt,Xe,et,Je,fe,ke,pt,vt,nt,ae],styles:[".content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap;width:100%}.options[_ngcontent-%COMP%]{width:100%}mat-form-field[_ngcontent-%COMP%]{width:100%!important}.mat-mdc-form-field[_ngcontent-%COMP%]{min-width:100%}.file-input[_ngcontent-%COMP%]{display:none}"]});let n=i;return n})();var XG=n=>["/services","servers",n];function JG(n,i){n&1&&(c(0,"uds-translate"),f(1,"Summary"),d())}function e$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Servers"),d())}function t$(n,i){if(n&1){let e=k();c(0,"div",6)(1,"div",7)(2,"mat-tab-group",8)(3,"mat-tab"),x(4,JG,2,0,"ng-template",9),c(5,"div",10),M(6,"uds-information",11),d()(),c(7,"mat-tab"),x(8,e$,2,0,"ng-template",9),c(9,"div",10)(10,"uds-table",12),b("newAction",function(o){y(e);let r=_();return w(r.onNew(o))})("editAction",function(o){y(e);let r=_();return w(r.onEdit(o))})("rowSelected",function(o){y(e);let r=_();return w(r.onRowSelect(o))})("deleteAction",function(o){y(e);let r=_();return w(r.onDelete(o))})("customButtonAction",function(o){y(e);let r=_();return w(r.customButtonAction(o))})("loaded",function(o){y(e);let r=_();return w(r.onLoad(o))}),d()()()()()()}if(n&2){let e=_();u(2),p("@.disabled",!0),u(4),p("value",e.server)("gui",e.gui),u(4),p("rest",e.servers)("multiSelect",!0)("allowExport",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("tableId","servers-d-servers"+e.server.id)}}var yA='pause'+django.gettext("Maintenance")+"",n$='pause'+django.gettext("Exit maintenance mode")+"",i$='pause'+django.gettext("Enter maintenance mode")+"",o$='import_export'+django.gettext("Import CSV")+"",wA=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.cButtons=[{id:"maintenance",html:yA,type:ct.SINGLE_SELECT}],this.server=null,this.gui=[],this.servers={}}get customButtons(){return this.api.user.isAdmin?this.cButtons:[]}ngOnInit(){return H(this,null,function*(){let t=this.route.snapshot.paramMap.get("server");t&&(this.servers=this.rest.serverGroups.detail(t,"servers"),this.server=yield this.servers.parentModel.get(t),this.gui=yield this.servers.parentModel.gui(this.server.type),this.server.type.startsWith("UNMANAGED")&&this.cButtons.push({id:"import-csv",html:o$,type:ct.ALWAYS}))})}onMaintenance(t){let o=t.table.selection.selected[0],r=o.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.questionDialog(django.gettext("Maintenance mode for")+" "+o.name,r).then(a=>{a&&this.servers.get(o.id+"/maintenance").then(()=>{t.table.overview()})})}onImportCSV(t){return H(this,null,function*(){let o=yield bA.launch(this.api,{title:django.gettext("Import Servers"),help:django.gettext('Format of file must be "hostname,ip,mac,...". All fields except hostname are optional. Separator can be configured.')});if(o.data.length==0)return;let r=yield this.servers.put({data:o.data},this.server.id+"/importcsv");r&&r.length>0&&this.api.gui.alert("Errors found importing data: ",r.slice(0,16).join(`
`)),t.table.overview()})}customButtonAction(t){return H(this,null,function*(){if(t.param.id=="maintenance")return yield this.onMaintenance(t);if(t.param.id=="import-csv")return yield this.onImportCSV(t)})}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New server"),!0)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit server"),!0)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove server from server group"),"hostname")}onRowSelect(t){let o=t.table;if(o.selection.selected.length>1||o.selection.selected.length===0){this.customButtons[0].html=yA;return}o.selection.selected[0].maintenance_mode?this.customButtons[0].html=n$:this.customButtons[0].html=i$}onLoad(t){if(t.param===!0){let o=this.route.snapshot.paramMap.get("server");if(o!==void 0){let r=t.table;r.dataSource.data.forEach(a=>{a.id===o&&r.selection.select(a)})}}}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-server-detail"]],standalone:!1,decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary","selectedIndex","1"],["mat-tab-label",""],[1,"content"],[3,"value","gui"],["icon","servers",3,"newAction","editAction","rowSelected","deleteAction","customButtonAction","loaded","rest","multiSelect","allowExport","customButtons","pageSize","tableId"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1)(2,"a",2)(3,"i",3),f(4,"arrow_back"),d()(),f(5," \xA0"),M(6,"img",4),f(7),d(),x(8,t$,11,9,"div",5),d()),o&2&&(u(2),p("routerLink",Un(4,XG,r.servers.parentId)),u(4),p("src",r.api.staticURL("admin/img/icons/servers.png"),Se),u(),O(" \xA0",r.server==null?null:r.server.name," "),u(),p("ngIf",r.server!==null))},dependencies:[ue,bn,Jt,en,rn,ae,Ie,ho],styles:[".row-maintenance-true>mat-cell{color:orange!important}"]});let n=i;return n})();var gw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){return H(this,null,function*(){let t=this.route.snapshot.paramMap.get("authenticator")})}onDetail(t){return H(this,null,function*(){this.api.navigation.gotoAuthenticatorDetail(t.param.id)})}onNew(t){return H(this,null,function*(){this.api.gui.forms.typedNewForm(t,django.gettext("New Authenticator"),!0)})}onEdit(t){return H(this,null,function*(){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Authenticator"),!0)})}onDelete(t){return H(this,null,function*(){this.api.gui.forms.deleteForm(t,django.gettext("Delete Authenticator"))})}onLoad(t){return H(this,null,function*(){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("authenticator"))})}processElement(t){t.visible=this.api.boolAsHumanString(t.visible)}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-authenticators"]],standalone:!1,decls:2,vars:6,consts:[["icon","authenticators",3,"newAction","editAction","deleteAction","detailAction","loaded","rest","multiSelect","allowExport","hasPermissions","onItem","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("detailAction",function(s){return r.onDetail(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.authenticators)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",r.processElement)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],encapsulation:2});let n=i;return n})();var _w=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("mfa")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New MFA"))}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit MFA"))}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete MFA"))}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("mfa"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-mfas"]],standalone:!1,decls:2,vars:5,consts:[["icon","mfas",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.mfas)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],encapsulation:2});let n=i;return n})();var r$=["panel"],a$=["*"];function s$(n,i){if(n&1){let e=k();c(0,"div",1,0),b("@panelAnimation.done",function(o){y(e);let r=_();return w(r._animationDone.next(o))}),re(2),d()}if(n&2){let e=i.id,t=_();Yt(t._classList),ne("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),p("id",t.id)("@panelAnimation",t.isOpen?"visible":"hidden"),ee("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var l$=mn("panelAnimation",[Ft("void, hidden",Me({opacity:0,transform:"scaleY(0.8)"})),xt(":enter, hidden => visible",[z1([It("0.03s linear",Me({opacity:1})),It("0.12s cubic-bezier(0, 0, 0.2, 1)",Me({transform:"scaleY(1)"}))])]),xt(":leave, visible => hidden",[It("0.075s linear",Me({opacity:0}))])]),vw=class{source;option;constructor(i,e){this.source=i,this.option=e}},CA=new R("mat-autocomplete-default-options",{providedIn:"root",factory:c$});function c$(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var Yl=(()=>{class n{_changeDetectorRef=h(Ee);_elementRef=h(Q);_defaults=h(CA);_activeOptionChanges=ge.EMPTY;_animationDone=new T;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new T;opened=new T;closed=new T;optionActivated=new T;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=h(ft).getId("mat-autocomplete-");inertGroups;constructor(){let e=h(rt);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new kl(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new vw(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=E({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(t,o,r){if(t&1&&(He(r,nt,5),He(r,kd,5)),t&2){let a;$(a=q())&&(o.options=a),$(a=q())&&(o.optionGroups=a)}},viewQuery:function(t,o){if(t&1&&(se(wt,7),se(r$,5)),t&2){let r;$(r=q())&&(o.template=r.first),$(r=q())&&(o.panel=r.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",G],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",G],requireSelection:[2,"requireSelection","requireSelection",G],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",G],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",G]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[ye([{provide:Td,useExisting:n}]),ce],ngContentSelectors:a$,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,o){t&1&&(We(),x(0,s$,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[l$]},changeDetection:0})}return n})();var d$={provide:bi,useExisting:ln(()=>bs),multi:!0};var xA=new R("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let n=h(Lt);return()=>n.scrollStrategies.reposition()}});function u$(n){return()=>n.scrollStrategies.reposition()}var m$={provide:xA,deps:[Lt],useFactory:u$},bs=(()=>{class n{_element=h(Q);_overlay=h(Lt);_viewContainerRef=h(kt);_zone=h(te);_changeDetectorRef=h(Ee);_dir=h(jt,{optional:!0});_formField=h(Ro,{optional:!0,host:!0});_document=h(de);_viewportRuler=h(Ii);_defaults=h(CA,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_scrollStrategy=h(xA);_keydownSubscription;_outsideClickSubscription;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=ge.EMPTY;_breakpointObserver=h(Il);_handsetLandscapeSubscription=ge.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new j;_windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;_initialized=new j;_injector=h(Ae);constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&_a(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return yt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(je(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(je(()=>this._overlayAttached)):ie()).pipe(le(e=>e instanceof Md?e:null))}optionSelections=Xi(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Et(e),Tt(()=>yt(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(Tt(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return yt(mi(this._document,"click"),mi(this._document,"auxclick"),mi(this._document,"touchend")).pipe(je(e=>{let t=gi(e),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,r=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&t!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(t))&&(!r||!r.contains(t))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(t)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e.keyCode,o=Ot(e);if(t===27&&!o&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,a=t===38||t===40;t===9||a&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):a&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(a||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,o=t.value;if(t.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let r=this.autocomplete.options?.find(a=>a.selected);if(r){let a=this._getDisplayValue(r.value);o!==a&&r.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===e.target){let r=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(r)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new Fe(o=>{nn(()=>{o.next()},{injector:this._injector})}),t=this.autocomplete.options.changes.pipe(Ht(()=>this._positionStrategy.reapplyLastPosition()),Yr(0));return yt(e,t).pipe(Tt(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Rt(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,o=e?e.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),t._emitSelectEvent(o),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),t._animationDone?t._animationDone.pipe(Rt(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(o=>{o!==e&&o.selected&&o.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;Ol(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){this.autocomplete;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new On(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(rh.HandsetLandscape).subscribe(r=>{r.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Ot(e)||e.keyCode===38&&Ot(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new ki({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],a;this.position==="above"?a=r:this.position==="below"?a=t:a=[...t,...r],e.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let o=0;o .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&_a(this._trackedModal,"aria-owns",t),Ol(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;_a(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||n)};static \u0275dir=N({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,o){t&1&&b("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(a){return o._handleInput(a)})("keydown",function(a){return o._handleKeydown(a)})("click",function(){return o._handleClick()}),t&2&&ee("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",G]},exportAs:["matAutocompleteTrigger"],features:[ye([d$]),ce,Ze]})}return n})(),DA=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=X({providers:[m$],imports:[ci,Ll,me,ro,Ll,me]})}return n})();function p$(n,i){if(n&1&&(c(0,"div")(1,"uds-translate"),f(2,"Edit user"),d(),f(3),d()),n&2){let e=_();u(3),O(" ",e.user.name," ")}}function h$(n,i){n&1&&(c(0,"uds-translate"),f(1,"New user"),d())}function f$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label"),f(2),d(),c(3,"input",19),U("ngModelChange",function(o){y(e);let r=_();return W(r.user.name,o)||(r.user.name=o),w(o)}),d()()}if(n&2){let e=_();u(2),O(" ",e.authenticator.type_info.label_username," "),u(),z("ngModel",e.user.name),p("disabled",e.user.id)}}function g$(n,i){if(n&1&&(c(0,"mat-option",21),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),Er(" ",e.id," (",e.name,") ")}}function _$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label"),f(2),d(),c(3,"input",20),U("ngModelChange",function(o){y(e);let r=_();return W(r.user.name,o)||(r.user.name=o),w(o)}),b("input",function(o){y(e);let r=_();return w(r.filterUser(o))}),d(),c(4,"mat-autocomplete",null,1),x(6,g$,2,3,"mat-option",16),d()()}if(n&2){let e=be(5),t=_();u(2),O(" ",t.authenticator.type_info.label_username," "),u(),z("ngModel",t.user.name),p("matAutocomplete",e),u(3),p("ngForOf",t.users)}}function v$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label"),f(2),d(),c(3,"input",22),U("ngModelChange",function(o){y(e);let r=_();return W(r.user.password,o)||(r.user.password=o),w(o)}),d()()}if(n&2){let e=_();u(2),O(" ",e.authenticator.type_info.label_password," "),u(),z("ngModel",e.user.password)}}function b$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label")(2,"uds-translate"),f(3,"MFA"),d()(),c(4,"input",23),U("ngModelChange",function(o){y(e);let r=_();return W(r.user.mfa_data,o)||(r.user.mfa_data=o),w(o)}),d()()}if(n&2){let e=_();u(4),z("ngModel",e.user.mfa_data)}}function y$(n,i){if(n&1&&(c(0,"mat-option",21),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}var yw=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.groups=[],this.onSave=new T(!0),this.users=[],this.authenticator=a.authenticator,this.user={id:void 0,name:"",real_name:"",comments:"",state:"A",is_admin:!1,staff_member:!1,password:"",role:"user",mfa:"",groups:[]},a.user!==void 0&&(this.user.id=a.user.id,this.user.name=a.user.name)}static launch(t,o,r){let a=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:o,user:r},disableClose:!1}).componentInstance.onSave}ngOnInit(){this.rest.authenticators.detail(this.authenticator.id,"groups").overview().then(t=>{this.groups=t}),this.user.id&&this.rest.authenticators.detail(this.authenticator.id,"users").get(this.user.id).then(t=>{this.user=t,this.user.role=t.is_admin?"admin":t.staff_member?"staff":"user"},t=>{this.dialogRef.close()})}roleChanged(t){this.user.is_admin=t==="admin",this.user.staff_member=t==="admin"||t==="staff"}filterUser(t){let o=t.target.value;this.rest.authenticators.search(this.authenticator.id,"user",o,100).then(r=>{this.users.length=0,r.forEach(a=>{this.users.push(a)})})}save(){this.rest.authenticators.detail(this.authenticator.id,"users").save(this.user).then(t=>{this.dialogRef.close(),this.onSave.emit(!0)})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-new-user"]],standalone:!1,decls:58,vars:12,consts:[["nousertitle",""],["auto","matAutocomplete"],["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[1,"content"],[4,"ngIf"],["type","text","matInput","","autocomplete","new-real_name",3,"ngModelChange","ngModel"],["type","text","matInput","","autocomplete","new-comments",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["value","A"],["value","I"],[3,"ngModelChange","valueChange","ngModel"],["value","admin"],["value","staff"],["value","user"],["multiple","",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["type","text","matInput","","autocomplete","new-username",3,"ngModelChange","ngModel","disabled"],["type","text","aria-label","Number","matInput","",3,"ngModelChange","input","ngModel","matAutocomplete"],[3,"value"],["type","password","matInput","","autocomplete","new-password",3,"ngModelChange","ngModel"],["type","text","matInput","",3,"ngModelChange","ngModel"]],template:function(o,r){if(o&1){let a=k();c(0,"h4",2),x(1,p$,4,1,"div",3)(2,h$,2,0,"ng-template",null,0,gn),d(),c(4,"mat-dialog-content")(5,"div",4),x(6,f$,4,3,"mat-form-field",5)(7,_$,7,4,"mat-form-field",5),c(8,"mat-form-field")(9,"mat-label")(10,"uds-translate"),f(11,"Real name"),d()(),c(12,"input",6),U("ngModelChange",function(l){return y(a),W(r.user.real_name,l)||(r.user.real_name=l),w(l)}),d()(),c(13,"mat-form-field")(14,"mat-label")(15,"uds-translate"),f(16,"Comments"),d()(),c(17,"input",7),U("ngModelChange",function(l){return y(a),W(r.user.comments,l)||(r.user.comments=l),w(l)}),d()(),c(18,"mat-form-field")(19,"mat-label")(20,"uds-translate"),f(21,"State"),d()(),c(22,"mat-select",8),U("ngModelChange",function(l){return y(a),W(r.user.state,l)||(r.user.state=l),w(l)}),c(23,"mat-option",9)(24,"uds-translate"),f(25,"Enabled"),d()(),c(26,"mat-option",10)(27,"uds-translate"),f(28,"Disabled"),d()()()(),c(29,"mat-form-field")(30,"mat-label")(31,"uds-translate"),f(32,"Role"),d()(),c(33,"mat-select",11),U("ngModelChange",function(l){return y(a),W(r.user.role,l)||(r.user.role=l),w(l)}),b("valueChange",function(l){return y(a),w(r.roleChanged(l))}),c(34,"mat-option",12)(35,"uds-translate"),f(36,"Admin"),d()(),c(37,"mat-option",13)(38,"uds-translate"),f(39,"Staff member"),d()(),c(40,"mat-option",14)(41,"uds-translate"),f(42,"User"),d()()()(),x(43,v$,4,2,"mat-form-field",5)(44,b$,5,1,"mat-form-field",5),c(45,"mat-form-field")(46,"mat-label")(47,"uds-translate"),f(48,"Groups"),d()(),c(49,"mat-select",15),U("ngModelChange",function(l){return y(a),W(r.user.groups,l)||(r.user.groups=l),w(l)}),x(50,y$,2,2,"mat-option",16),d()()()(),c(51,"mat-dialog-actions")(52,"button",17)(53,"uds-translate"),f(54,"Cancel"),d()(),c(55,"button",18),b("click",function(){return y(a),w(r.save())}),c(56,"uds-translate"),f(57,"Ok"),d()()()}if(o&2){let a=be(3);u(),p("ngIf",r.user.id)("ngIfElse",a),u(5),p("ngIf",r.authenticator.type_info.search_users_supported===!1||r.user.id),u(),p("ngIf",r.authenticator.type_info.search_users_supported===!0&&!r.user.id),u(5),z("ngModel",r.user.real_name),u(5),z("ngModel",r.user.comments),u(5),z("ngModel",r.user.state),u(11),z("ngModel",r.user.role),u(10),p("ngIf",r.authenticator.type_info.needs_password),u(),p("ngIf",!r.authenticator.type_info.is_external),u(5),z("ngModel",r.user.groups),u(),p("ngForOf",r.groups)}},dependencies:[$e,ue,lt,we,xe,Te,Qt,Xe,et,Je,fe,ke,pt,vt,nt,Yl,bs,ae],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();function w$(n,i){if(n&1&&(c(0,"div")(1,"uds-translate"),f(2,"Edit group"),d(),f(3),d()),n&2){let e=_();u(3),O(" ",e.group.name," ")}}function C$(n,i){n&1&&(c(0,"uds-translate"),f(1,"New group"),d())}function x$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label"),f(2),d(),c(3,"input",14),U("ngModelChange",function(o){y(e);let r=_(2);return W(r.group.name,o)||(r.group.name=o),w(o)}),d()()}if(n&2){let e=_(2);u(2),O(" ",e.authenticator.type_info.label_groupname," "),u(),z("ngModel",e.group.name),p("disabled",e.group.id)}}function D$(n,i){if(n&1&&(c(0,"mat-option",17),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),Er(" ",e.id," (",e.name,") ")}}function S$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label"),f(2),d(),c(3,"input",15),U("ngModelChange",function(o){y(e);let r=_(2);return W(r.group.name,o)||(r.group.name=o),w(o)}),b("input",function(o){y(e);let r=_(2);return w(r.filterGroup(o))}),d(),c(4,"mat-autocomplete",null,3),x(6,D$,2,3,"mat-option",16),d()()}if(n&2){let e=be(5),t=_(2);u(2),O(" ",t.authenticator.type_info.label_groupname," "),u(),z("ngModel",t.group.name),p("matAutocomplete",e),u(3),p("ngForOf",t.fltrGroup)}}function E$(n,i){if(n&1&&(ut(0),x(1,x$,4,3,"mat-form-field",13)(2,S$,7,4,"mat-form-field",13),mt()),n&2){let e=_();u(),p("ngIf",e.authenticator.type_info.search_groups_supported===!1||e.group.id),u(),p("ngIf",e.authenticator.type_info.search_groups_supported===!0&&!e.group.id)}}function M$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label")(2,"uds-translate"),f(3,"Meta group name"),d()(),c(4,"input",14),U("ngModelChange",function(o){y(e);let r=_();return W(r.group.name,o)||(r.group.name=o),w(o)}),d()()}if(n&2){let e=_();u(4),z("ngModel",e.group.name),p("disabled",e.group.id)}}function I$(n,i){if(n&1&&(c(0,"mat-option",17),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function T$(n,i){if(n&1){let e=k();ut(0),c(1,"mat-form-field")(2,"mat-label")(3,"uds-translate"),f(4,"Service Pools"),d()(),c(5,"mat-select",18),U("ngModelChange",function(o){y(e);let r=_();return W(r.group.pools,o)||(r.group.pools=o),w(o)}),x(6,I$,2,2,"mat-option",16),d()(),mt()}if(n&2){let e=_();u(5),z("ngModel",e.group.pools),u(),p("ngForOf",e.servicePools)}}function k$(n,i){if(n&1&&(c(0,"mat-option",17),f(1),d()),n&2){let e=_().$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function A$(n,i){if(n&1&&(ut(0),x(1,k$,2,2,"mat-option",20),mt()),n&2){let e=i.$implicit;u(),p("ngIf",e.type==="group")}}function R$(n,i){if(n&1){let e=k();c(0,"mat-form-field")(1,"mat-label")(2,"uds-translate"),f(3,"Match mode"),d()(),c(4,"mat-select",8),U("ngModelChange",function(o){y(e);let r=_();return W(r.group.meta_if_any,o)||(r.group.meta_if_any=o),w(o)}),c(5,"mat-option",17)(6,"uds-translate"),f(7,"Any group"),d()(),c(8,"mat-option",17)(9,"uds-translate"),f(10,"All groups"),d()()()(),c(11,"mat-form-field")(12,"mat-label")(13,"uds-translate"),f(14,"Selected Groups"),d()(),c(15,"mat-select",18),U("ngModelChange",function(o){y(e);let r=_();return W(r.group.groups,o)||(r.group.groups=o),w(o)}),x(16,A$,2,1,"ng-container",19),d()()}if(n&2){let e=_();u(4),z("ngModel",e.group.meta_if_any),u(),p("value",!0),u(3),p("value",!1),u(7),z("ngModel",e.group.groups),u(),p("ngForOf",e.groups)}}var ww=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.onSave=new T(!0),this.servicePools=[],this.groups=[],this.fltrGroup=[],this.authenticator=a.authenticator,this.group={id:void 0,type:a.groupType,name:"",comments:"",meta_if_any:!1,skip_mfa:"I",state:"A",groups:[],pools:[]},a.group!==void 0&&(this.group.id=a.group.id,this.group.type=a.group.type,this.group.name=a.group.name)}static launch(t,o,r,a){let s=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:s,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:o,groupType:r,group:a},disableClose:!0}).componentInstance.onSave}ngOnInit(){let t=this.rest.authenticators.detail(this.authenticator.id,"groups");this.group.id!==void 0&&t.get(this.group.id).then(o=>{this.group=o},o=>{this.dialogRef.close()}),this.group.type==="meta"?t.summary().then(o=>this.groups=o):this.rest.servicesPools.summary().then(o=>this.servicePools=o)}filterGroup(t){let o=t.target.value;this.rest.authenticators.search(this.authenticator.id,"group",o,100).then(r=>{this.fltrGroup.length=0,r.forEach(a=>{this.fltrGroup.push(a)})})}getMatchValue(){return django.gettext("Match mode")+this.group.meta_if_any?django.gettext("Any"):django.gettext("All")}save(){this.rest.authenticators.detail(this.authenticator.id,"groups").save(this.group).then(t=>{this.dialogRef.close(),this.onSave.emit(!0)})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-new-group"]],standalone:!1,decls:46,vars:9,consts:[["nousertitle",""],["metafirst",""],["metasecond",""],["auto","matAutocomplete"],["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[1,"content"],["type","text","matInput","",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["value","A"],["value","I"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[4,"ngIf"],["type","text","matInput","",3,"ngModelChange","ngModel","disabled"],["type","text","aria-label","Number","matInput","",3,"ngModelChange","input","ngModel","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["multiple","",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"]],template:function(o,r){if(o&1){let a=k();c(0,"h4",4),x(1,w$,4,1,"div",5)(2,C$,2,0,"ng-template",null,0,gn),d(),c(4,"mat-dialog-content")(5,"div",6),x(6,E$,3,2,"ng-container",5)(7,M$,5,2,"ng-template",null,1,gn),c(9,"mat-form-field")(10,"mat-label")(11,"uds-translate"),f(12,"Comments"),d()(),c(13,"input",7),U("ngModelChange",function(l){return y(a),W(r.group.comments,l)||(r.group.comments=l),w(l)}),d()(),c(14,"mat-form-field")(15,"mat-label")(16,"uds-translate"),f(17,"State"),d()(),c(18,"mat-select",8),U("ngModelChange",function(l){return y(a),W(r.group.state,l)||(r.group.state=l),w(l)}),c(19,"mat-option",9)(20,"uds-translate"),f(21,"Enabled"),d()(),c(22,"mat-option",10)(23,"uds-translate"),f(24,"Disabled"),d()()()(),c(25,"mat-form-field")(26,"mat-label")(27,"uds-translate"),f(28,"Skip MFA"),d()(),c(29,"mat-select",8),U("ngModelChange",function(l){return y(a),W(r.group.skip_mfa,l)||(r.group.skip_mfa=l),w(l)}),c(30,"mat-option",9)(31,"uds-translate"),f(32,"Enabled"),d()(),c(33,"mat-option",10)(34,"uds-translate"),f(35,"Disabled"),d()()()(),x(36,T$,7,2,"ng-container",5)(37,R$,17,5,"ng-template",null,2,gn),d()(),c(39,"mat-dialog-actions")(40,"button",11)(41,"uds-translate"),f(42,"Cancel"),d()(),c(43,"button",12),b("click",function(){return y(a),w(r.save())}),c(44,"uds-translate"),f(45,"Ok"),d()()()}if(o&2){let a=be(3),s=be(8),l=be(38);u(),p("ngIf",r.group.id)("ngIfElse",a),u(5),p("ngIf",r.group.type==="group")("ngIfElse",s),u(7),z("ngModel",r.group.comments),u(5),z("ngModel",r.group.state),u(11),z("ngModel",r.group.skip_mfa),u(7),p("ngIf",r.group.type==="group")("ngIfElse",l)}},dependencies:[$e,ue,lt,we,xe,Te,Qt,Xe,et,Je,fe,ke,pt,vt,nt,Yl,bs,ae],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}.label-match[_ngcontent-%COMP%]{color:#0009;display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0px 0px;white-space:nowrap}"]});let n=i;return n})();function O$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Groups"),d())}function P$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,O$,2,0,"ng-template",2),M(2,"uds-table",6),d()),n&2){let e=_();u(2),p("rest",e.group)("pageSize",6)}}function F$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Services Pools"),d())}function N$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,F$,2,0,"ng-template",2),M(2,"uds-table",6),d()),n&2){let e=_();u(2),p("rest",e.servicesPools)("pageSize",6)}}function L$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Assigned Services"),d())}function V$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,L$,2,0,"ng-template",2),M(2,"uds-table",6),d()),n&2){let e=_();u(2),p("rest",e.userServices)("pageSize",6)}}function B$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Logs"),d())}var j$=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],z$=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],U$=[{field:"unique_id",title:django.gettext("Unique ID")},{field:"friendly_name",title:django.gettext("Friendly Name")},{field:"in_use",title:django.gettext("In Use")},{field:"ip",title:django.gettext("IP")},{field:"pool",title:django.gettext("Services Pool")}],SA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.group={},this.servicesPools={},this.userServices={},this.users=a.users,this.user=a.user}static launch(t,o,r){let a=window.innerWidth<800?"80%":"60%",s=t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{users:o,user:r},disableClose:!1})}ngOnInit(){return H(this,null,function*(){let t=()=>H(this,null,function*(){let a=yield this.rest.authenticators.detail(this.users.parentId,"users").get(this.user.id);return(yield this.rest.authenticators.detail(this.users.parentId,"groups").overview()).filter(l=>a.groups.includes(l.id))}),o=()=>H(this,null,function*(){return this.users.invoke(this.user.id+"/servicesPools")}),r=()=>H(this,null,function*(){return(yield this.users.invoke(this.user.id+"/userServices")).map(s=>(s.in_use=this.api.boolAsHumanString(s.in_use),s))});this.group=new po(django.gettext("Groups"),t,j$,this.user.id+"infogrp"),this.servicesPools=new po(django.gettext("Services Pools"),o,z$,this.user.id+"infopool"),this.userServices=new po(django.gettext("Assigned services"),r,U$,this.user.id+"userservpool")})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-user-information"]],standalone:!1,decls:20,vars:14,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-tab-label",""],[1,"content"],[3,"rest","itemId","tableId","pageSize"],["mat-raised-button","","mat-dialog-close","","color","primary"],[3,"rest","pageSize"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Information for"),d(),f(3),d(),c(4,"mat-dialog-content")(5,"mat-tab-group"),x(6,P$,3,2,"mat-tab",1),gt(7,"notEmpty"),x(8,N$,3,2,"mat-tab",1),gt(9,"notEmpty"),x(10,V$,3,2,"mat-tab",1),gt(11,"notEmpty"),c(12,"mat-tab"),x(13,B$,2,0,"ng-template",2),c(14,"div",3),M(15,"uds-logs-table",4),d()()()(),c(16,"mat-dialog-actions")(17,"button",5)(18,"uds-translate"),f(19,"Ok"),d()()()),o&2&&(u(3),O(" ",r.user.name,` -`),u(3),p("ngIf",Ct(7,8,r.group)),u(2),p("ngIf",Ct(9,10,r.servicesPools)),u(2),p("ngIf",Ct(11,12,r.userServices)),u(5),p("rest",r.users)("itemId",r.user.id)("tableId","userInfo-d-log"+r.user.id)("pageSize",5))},dependencies:[ue,Te,Qt,Xe,et,Je,Jt,en,rn,ae,Ie,Ri,yn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]});let n=i;return n})();function H$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Services Pools"),d())}function W$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,H$,2,0,"ng-template",3),M(2,"uds-table",4),d()),n&2){let e=_();u(2),p("rest",e.servicesPools)("pageSize",6)}}function G$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Users"),d())}function $$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,G$,2,0,"ng-template",3),M(2,"uds-table",4),d()),n&2){let e=_();u(2),p("rest",e.users)("pageSize",6)}}function q$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Groups"),d())}function Y$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,q$,2,0,"ng-template",3),M(2,"uds-table",4),d()),n&2){let e=_();u(2),p("rest",e.groups)("pageSize",6)}}var Q$=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],K$=[{field:"name",title:django.gettext("Name")},{field:"real_name",title:django.gettext("Real Name")},{field:"state",title:django.gettext("state")},{field:"last_access",title:django.gettext("Last access"),type:_n.DATETIME}],Z$=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],EA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.data=a,this.users={},this.groups={},this.servicesPools={}}static launch(t,o,r){let a=window.innerWidth<800?"80%":"60%",s=t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{group:r,groups:o},disableClose:!1})}ngOnInit(){let t=this.rest.authenticators.detail(this.data.groups.parentId,"groups"),o=()=>t.invoke(this.data.group.id+"/servicesPools"),r=()=>t.invoke(this.data.group.id+"/users").then(a=>a.map(s=>(s.state=s.state==="A"?django.gettext("Enabled"):s.state==="I"?django.gettext("Disabled"):django.gettext("Blocked"),s)));if(this.servicesPools=new po(django.gettext("Service pools"),o,Q$,this.data.group.id+"infopls"),this.users=new po(django.gettext("Users"),r,K$,this.data.group.id+"infousr"),this.data.group.type==="meta"){let a=()=>t.overview().then(s=>s.filter(l=>this.data.group.groups.includes(l.id)));this.groups=new po(django.gettext("Groups"),a,Z$,this.data.group.id+"infogrps")}}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-group-information"]],standalone:!1,decls:15,vars:9,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],[3,"rest","pageSize"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Information for"),d()(),c(3,"mat-dialog-content")(4,"mat-tab-group"),x(5,W$,3,2,"mat-tab",1),gt(6,"notEmpty"),x(7,$$,3,2,"mat-tab",1),gt(8,"notEmpty"),x(9,Y$,3,2,"mat-tab",1),gt(10,"notEmpty"),d()(),c(11,"mat-dialog-actions")(12,"button",2)(13,"uds-translate"),f(14,"Ok"),d()()()),o&2&&(u(5),p("ngIf",Ct(6,3,r.servicesPools)),u(2),p("ngIf",Ct(8,5,r.users)),u(2),p("ngIf",Ct(10,7,r.groups)))},dependencies:[ue,Te,Qt,Xe,et,Je,Jt,en,rn,ae,Ie,yn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]});let n=i;return n})();var X$=n=>["/authenticators",n];function J$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Summary"),d())}function e7(n,i){if(n&1&&M(0,"uds-information",16),n&2){let e=_(2);p("value",e.authenticator)("gui",e.gui)}}function t7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Users"),d())}function n7(n,i){if(n&1){let e=k();c(0,"uds-table",17),b("loaded",function(o){y(e);let r=_(2);return w(r.onLoad(o))})("newAction",function(o){y(e);let r=_(2);return w(r.onNewUser(o))})("editAction",function(o){y(e);let r=_(2);return w(r.onEditUser(o))})("deleteAction",function(o){y(e);let r=_(2);return w(r.onDeleteUser(o))})("customButtonAction",function(o){y(e);let r=_(2);return w(r.onUserCustom(o))}),d()}if(n&2){let e=_(2);p("rest",e.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+e.authenticator.id)("customButtons",e.usersCustomButtons)("pageSize",e.api.config.admin.page_size)}}function i7(n,i){if(n&1){let e=k();c(0,"uds-table",18),b("loaded",function(o){y(e);let r=_(2);return w(r.onLoad(o))})("editAction",function(o){y(e);let r=_(2);return w(r.onEditUser(o))})("deleteAction",function(o){y(e);let r=_(2);return w(r.onDeleteUser(o))})("customButtonAction",function(o){y(e);let r=_(2);return w(r.onUserCustom(o))}),d()}if(n&2){let e=_(2);p("rest",e.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+e.authenticator.id)("customButtons",e.usersCustomButtons)("pageSize",e.api.config.admin.page_size)}}function o7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Groups"),d())}function r7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Logs"),d())}function a7(n,i){if(n&1){let e=k();c(0,"div",6)(1,"div",7)(2,"mat-tab-group",8),U("selectedIndexChange",function(o){y(e);let r=_();return W(r.selectedTab,o)||(r.selectedTab=o),w(o)}),c(3,"mat-tab"),x(4,J$,2,0,"ng-template",9),c(5,"div",10),x(6,e7,1,2,"uds-information",11),gt(7,"notEmpty"),d()(),c(8,"mat-tab"),x(9,t7,2,0,"ng-template",9),c(10,"div",10),x(11,n7,1,6,"uds-table",12)(12,i7,1,6,"uds-table",13),d()(),c(13,"mat-tab"),x(14,o7,2,0,"ng-template",9),c(15,"div",10)(16,"uds-table",14),b("loaded",function(o){y(e);let r=_();return w(r.onLoad(o))})("newAction",function(o){y(e);let r=_();return w(r.onNewGroup(o))})("editAction",function(o){y(e);let r=_();return w(r.onEditGroup(o))})("deleteAction",function(o){y(e);let r=_();return w(r.onDeleteGroup(o))})("customButtonAction",function(o){y(e);let r=_();return w(r.onGroupInformation(o))}),d()()(),c(17,"mat-tab"),x(18,r7,2,0,"ng-template",9),c(19,"div",10),M(20,"uds-logs-table",15),d()()()()()}if(n&2){let e=_();u(2),z("selectedIndex",e.selectedTab),p("@.disabled",!0),u(4),p("ngIf",Ct(7,14,e.gui)),u(5),p("ngIf",e.authenticator.type_info.create_users_supported),u(),p("ngIf",!e.authenticator.type_info.create_users_supported),u(4),p("rest",e.groups)("multiSelect",!0)("allowExport",!0)("customButtons",e.groupsCustomButtons)("tableId","authenticators-d-groups"+e.authenticator.id)("pageSize",e.api.config.admin.page_size),u(4),p("rest",e.rest.authenticators)("itemId",e.authenticator.id)("tableId","authenticators-d-log"+e.authenticator.id)}}var ag=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.groupsCustomButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:ct.ONLY_MENU}],this.usersCustomButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:ct.ONLY_MENU},{id:"clean-related",html:'clear_all '+django.gettext("Clean related (mfa,...)")+"",type:ct.ONLY_MENU},{id:"enable-client-logging",html:'assignment '+django.gettext("Enable client logging")+"",type:ct.ONLY_MENU}],this.authenticator=null,this.gui=[],this.users={},this.groups={},this.selectedTab=1,this.selectedTab=this.route.snapshot.paramMap.get("group")?2:1}ngOnInit(){let t=this.route.snapshot.paramMap.get("authenticator");t&&(this.users=this.rest.authenticators.detail(t,"users"),this.groups=this.rest.authenticators.detail(t,"groups"),this.rest.authenticators.get(t).then(o=>{this.authenticator=o,this.rest.authenticators.gui(o.type).then(r=>{this.gui=r})}))}onLoad(t){if(t.param===!0){let o=this.route.snapshot.paramMap.get("user"),r=this.route.snapshot.paramMap.get("group"),a=o||r;t.table.selectElement("id",a)}}processElement(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")}onNewUser(t){yw.launch(this.api,this.authenticator).subscribe(o=>t.table.overview())}onEditUser(t){yw.launch(this.api,this.authenticator,t.table.selection.selected[0]).subscribe(o=>t.table.overview())}onDeleteUser(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user"))}onNewGroup(t){ww.launch(this.api,this.authenticator,t.param.type).subscribe(o=>t.table.overview())}onEditGroup(t){ww.launch(this.api,this.authenticator,t.param.type,t.table.selection.selected[0]).subscribe(o=>t.table.overview())}onDeleteGroup(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete group"))}onUserCustom(t){return H(this,null,function*(){t.param.id==="info"?SA.launch(this.api,this.users,t.table.selection.selected[0]):t.param.id==="clean-related"?(yield this.api.gui.questionDialog(django.gettext("Clean data"),django.gettext("Clean related data (mfa, ...)?"),!0))&&(yield this.users.invoke(t.table.selection.selected[0].id+"/clean_related"),this.api.gui.snackbar.open(django.gettext("Related data cleaned"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()):t.param.id==="enable-client-logging"&&(yield this.api.gui.questionDialog(django.gettext("Client logging"),django.gettext("Enable client logging for user?"),!0))&&(yield this.users.invoke(t.table.selection.selected[0].id+"/enable_client_logging"),this.api.gui.snackbar.open(django.gettext("Client logging enabled"),django.gettext("dismiss"),{duration:2e3}),t.table.overview())})}onGroupInformation(t){EA.launch(this.api,this.groups,t.table.selection.selected[0])}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-authenticators-detail"]],standalone:!1,decls:10,vars:8,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","groups",3,"loaded","newAction","editAction","deleteAction","customButtonAction","rest","multiSelect","allowExport","customButtons","tableId","pageSize"],[3,"rest","itemId","tableId"],[3,"value","gui"],["icon","users",3,"loaded","newAction","editAction","deleteAction","customButtonAction","rest","multiSelect","allowExport","tableId","customButtons","pageSize"],["icon","users",3,"loaded","editAction","deleteAction","customButtonAction","rest","multiSelect","allowExport","tableId","customButtons","pageSize"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1)(2,"a",2)(3,"i",3),f(4,"arrow_back"),d()(),f(5," \xA0"),M(6,"img",4),f(7),d(),x(8,a7,21,16,"div",5),gt(9,"notEmpty"),d()),o&2&&(u(2),p("routerLink",Un(6,X$,r.authenticator?r.authenticator.id:"")),u(4),p("src",r.api.staticURL("admin/img/icons/services.png"),Se),u(),O(" \xA0",r.authenticator==null?null:r.authenticator.name," "),u(),p("ngIf",Ct(9,4,r.authenticator)))},dependencies:[ue,bn,Jt,en,rn,ae,Ie,Ri,ho,yn],encapsulation:2});let n=i;return n})();var Cw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("osmanager")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New OS Manager"),!1)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit OS Manager"),!1)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete OS Manager"))}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("osmanager"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-osmanagers"]],standalone:!1,decls:2,vars:5,consts:[["icon","osmanagers",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.osManagers)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],encapsulation:2});let n=i;return n})();var xw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("transport")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Transport"))}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Transport"))}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Transport"))}processElement(t){try{t.allowed_oss=t.allowed_oss.map(o=>o.id).join(", ")}catch{t.allowed_oss=""}}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("transport"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-transports"]],standalone:!1,decls:2,vars:7,consts:[["icon","transports",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","newGrouped","onItem","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.transports)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("onItem",r.processElement)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],styles:[".mat-column-priority{max-width:7rem;justify-content:center}"]});let n=i;return n})();var Dw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("network")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Network"),!1)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Network"),!1)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Network"))}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("network"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-networks"]],standalone:!1,decls:2,vars:5,consts:[["icon","networks",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.networks)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],encapsulation:2});let n=i;return n})();var Sw=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r}ngOnInit(){}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New tunnel"),!0)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit tunnel"),!0)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete tunnel"))}onDetail(t){this.api.navigation.gotoTunnelDetail(t.param.id)}processElement(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("tunnel"))}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-tunnels"]],standalone:!1,decls:1,vars:6,consts:[["tableId","tunnels-table","icon","providers",3,"newAction","editAction","deleteAction","detailAction","loaded","rest","onItem","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("detailAction",function(s){return r.onDetail(s)})("loaded",function(s){return r.onLoad(s)}),d()),o&2&&p("rest",r.rest.tunnels)("onItem",r.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size)},dependencies:[Ie],encapsulation:2});let n=i;return n})();function s7(n,i){if(n&1&&(c(0,"mat-option",7),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}var MA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.availTunnelServers=[],this.tunnelFilter="",this.serverId="",this.availTunnelServers=a.availableTunnelServers,this.tunnelId=a.tunnelId}static launch(t,o,r){return H(this,null,function*(){let a=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{tunnelId:o,availableTunnelServers:r},disableClose:!1}).componentInstance.done})}ngOnInit(){return H(this,null,function*(){})}filteredTunnels(){if(!this.tunnelFilter)return this.availTunnelServers;let t=new Array;for(let o of this.availTunnelServers)o.name.toLocaleLowerCase().includes(this.tunnelFilter.toLocaleLowerCase())&&t.push(o);return t}save(){return H(this,null,function*(){if(this.serverId===""){this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid server"));return}this.dialogRef.close(),this.done.resolve(!0),yield this.rest.tunnels.assign(this.tunnelId,this.serverId)})}cancel(){return H(this,null,function*(){this.dialogRef.close(),this.done.resolve(!1)})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-new-tunnel"]],standalone:!1,decls:19,vars:3,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModelChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[3,"value"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Assign new server to tunnel group"),d()(),c(3,"mat-dialog-content")(4,"div",1)(5,"mat-form-field")(6,"mat-label")(7,"uds-translate"),f(8,"Tunnel"),d()(),c(9,"mat-select",2),U("ngModelChange",function(s){return W(r.serverId,s)||(r.serverId=s),s}),c(10,"uds-cond-select-search",3),b("changed",function(s){return r.tunnelFilter=s}),d(),x(11,s7,2,2,"mat-option",4),d()()()(),c(12,"mat-dialog-actions")(13,"button",5),b("click",function(){return r.cancel()}),c(14,"uds-translate"),f(15,"Cancel"),d()(),c(16,"button",6),b("click",function(){return r.save()}),c(17,"uds-translate"),f(18,"Ok"),d()()()),o&2&&(u(9),z("ngModel",r.serverId),u(),p("options",r.availTunnelServers),u(),p("ngForOf",r.filteredTunnels()))},dependencies:[$e,we,xe,Te,Xe,et,Je,fe,ke,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();var l7=n=>["/connectivity","tunnels",n];function c7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Summary"),d())}function d7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Tunnel servers"),d())}function u7(n,i){if(n&1){let e=k();c(0,"div",6)(1,"div",7)(2,"mat-tab-group",8)(3,"mat-tab"),x(4,c7,2,0,"ng-template",9),c(5,"div",10),M(6,"uds-information",11),d()(),c(7,"mat-tab"),x(8,d7,2,0,"ng-template",9),c(9,"div",10)(10,"uds-table",12),b("newAction",function(o){y(e);let r=_();return w(r.onNew(o))})("rowSelected",function(o){y(e);let r=_();return w(r.onRowSelect(o))})("deleteAction",function(o){y(e);let r=_();return w(r.onDelete(o))})("customButtonAction",function(o){y(e);let r=_();return w(r.onMaintenance(o))})("loaded",function(o){y(e);let r=_();return w(r.onLoad(o))}),d()()()()()()}if(n&2){let e=_();u(2),p("@.disabled",!0),u(4),p("value",e.tunnel)("gui",e.gui),u(4),p("rest",e.servers)("multiSelect",!0)("allowExport",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("tableId","tunnels-d-servers"+e.tunnel.id)}}var IA='pause'+django.gettext("Maintenance")+"",m7='pause'+django.gettext("Exit maintenance mode")+"",p7='pause'+django.gettext("Enter maintenance mode")+"",TA=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.cButtons=[{id:"maintenance",html:IA,type:ct.SINGLE_SELECT}],this.tunnel=null,this.gui=[],this.servers={}}get customButtons(){return this.api.user.isAdmin?this.cButtons:[]}ngOnInit(){return H(this,null,function*(){let t=this.route.snapshot.paramMap.get("tunnel");t&&(this.servers=this.rest.tunnels.detail(t,"servers"),this.tunnel=yield this.servers.parentModel.get(t),this.gui=yield this.servers.parentModel.gui(),console.log(this.gui),console.log(this.tunnel))})}onMaintenance(t){let o=t.table.selection.selected[0],r=o.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.questionDialog(django.gettext("Maintenance mode for")+" "+o.name,r).then(a=>{a&&this.servers.get(o.id+"/maintenance").then(()=>{t.table.overview()})})}onNew(t){return H(this,null,function*(){let o=yield this.rest.tunnels.tunnels(this.tunnel.id);o.length==0?this.api.gui.alert(django.gettext("Error"),django.gettext("This tunnel already has all the tunnel servers available")):(yield MA.launch(this.api,this.tunnel.id,o))===!0&&t.table.overview()})}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove member from tunnel"))}onRowSelect(t){let o=t.table;if(o.selection.selected.length>1||o.selection.selected.length===0){this.customButtons[0].html=IA;return}o.selection.selected[0].maintenance_mode?this.customButtons[0].html=m7:this.customButtons[0].html=p7}onLoad(t){if(t.param===!0){let o=this.route.snapshot.paramMap.get("tunnel");if(o!==void 0){let r=t.table;r.dataSource.data.forEach(a=>{a.id===o&&r.selection.select(a)})}}}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-tunnels-detail"]],standalone:!1,decls:10,vars:8,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary","selectedIndex","1"],["mat-tab-label",""],[1,"content"],[3,"value","gui"],["icon","tunnels",3,"newAction","rowSelected","deleteAction","customButtonAction","loaded","rest","multiSelect","allowExport","customButtons","pageSize","tableId"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1)(2,"a",2)(3,"i",3),f(4,"arrow_back"),d()(),f(5," \xA0"),M(6,"img",4),f(7),d(),x(8,u7,11,9,"div",5),gt(9,"notEmpty"),d()),o&2&&(u(2),p("routerLink",Un(6,l7,r.servers.parentId)),u(4),p("src",r.api.staticURL("admin/img/icons/tunnels.png"),Se),u(),O(" \xA0",r.tunnel==null?null:r.tunnel.name," "),u(),p("ngIf",Ct(9,4,r.tunnel)))},dependencies:[ue,bn,Jt,en,rn,ae,Ie,ho,yn],styles:[".row-maintenance-true>mat-cell{color:orange!important}"]});let n=i;return n})();var Ew=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.customButtons=[Mn.getGotoButton(By,"provider_id"),Mn.getGotoButton(jy,"provider_id","service_id"),Mn.getGotoButton(Hy,"osmanager_id"),Mn.getGotoButton(Wy,"pool_group_id")],this.editing=!1}ngOnInit(){return H(this,null,function*(){})}onChange(t){return H(this,null,function*(){let o=["initial_srvs","cache_l1_srvs","max_srvs"];if(t.on===null||t.on.field.name==="service_id"){if(t.all.service_id.value===""){t.all.osmanager_id.gui.choices=[];for(let a of o)t.all[a].gui.readonly=!0;t.all.cache_l2_srvs.gui.readonly=!0;return}let r=yield this.rest.providers.service(t.all.service_id.value);if(t.all.allow_users_reset.gui.readonly=!r.info.can_reset,t.all.osmanager_id.gui.choices=[],this.editing||(t.all.osmanager_id.gui.readonly=!r.info.needs_osmanager),r.info.needs_osmanager===!0){let a=yield this.rest.osManagers.overview(),s=[];for(let l of a)for(let m of l.servicesTypes)r.info.services_type_provided==m&&s.push({id:l.id,text:l.name});s.length>0?t.all.osmanager_id.value=t.all.osmanager_id.value||s[0].id:t.all.osmanager_id.value="",t.all.osmanager_id.gui.choices=s}else t.all.osmanager_id.gui.choices=[{id:"",text:django.gettext("(This service does not requires an OS Manager)")}],t.all.osmanager_id.value="";for(let a of o)t.all[a].gui.readonly=!r.info.uses_cache;t.all.cache_l2_srvs.gui.readonly=r.info.uses_cache===!1||r.info.uses_cache_l2===!1,t.all.publish_on_save&&(t.all.publish_on_save.gui.readonly=!r.info.needs_publication)}})}onNew(t){return H(this,null,function*(){this.editing=!1,yield this.api.gui.forms.typedNewForm(t,django.gettext("New service Pool"),!1,[{name:"publish_on_save",value:!0,gui:{label:django.gettext("Publish on creation"),tooltip:django.gettext("If selected, will initiate the publication inmediatly after creation"),type:Xn.CHECKBOX,order:150,default:"true"}}],this.onChange.bind(this))})}onEdit(t){return H(this,null,function*(){return this.editing=!0,this.api.gui.forms.typedEditForm(t,django.gettext("Edit Service Pool"),!1,void 0,this.onChange.bind(this))})}onDelete(t){return H(this,null,function*(){return this.api.gui.forms.deleteForm(t,django.gettext("Delete service pool"))})}processElement(t){t.visible=this.api.boolAsHumanString(t.visible),t.show_transports=this.api.boolAsHumanString(t.show_transports),typeof t.name!="string"&&(t.name=""),t.name=t.name.replace(//g,">"),t.restrained?(t.name='warning '+this.api.gui.icon(t.info.icon)+t.name,t.state="T"):(t.name=this.api.gui.icon(t.info.icon)+t.name,t.meta_member.length>0&&(t.state="V")),t.name=this.api.safeString(t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)}onDetail(t){this.api.navigation.gotoServicePoolDetail(t.param.id)}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("pool"))}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools"]],standalone:!1,decls:1,vars:7,consts:[["icon","pools",3,"newAction","editAction","deleteAction","detailAction","loaded","rest","multiSelect","allowExport","hasPermissions","onItem","customButtons","pageSize"]],template:function(o,r){o&1&&(c(0,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("detailAction",function(s){return r.onDetail(s)})("loaded",function(s){return r.onLoad(s)}),d()),o&2&&p("rest",r.rest.servicesPools)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",r.processElement)("customButtons",r.customButtons)("pageSize",r.api.config.admin.page_size)},dependencies:[Ie],styles:[".mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible, .mat-column-state, .mat-column-usage{max-width:7rem;justify-content:center} .mat-column-show_transports{max-width:12rem;justify-content:center} .mat-column-pool_group_name{max-width:12rem} .row-state-T>.mat-mdc-cell{color:#d65014!important} .mat-column-user_services_count{max-width:10rem;justify-content:center} .mat-column-user_services_in_preparation{max-width:10rem;justify-content:center}"]});let n=i;return n})();function h7(n,i){if(n&1&&(c(0,"mat-option",8),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function f7(n,i){if(n&1&&(c(0,"mat-option",8),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}var sg=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.auths=[],this.users=[],this.userFilter="",this.authId="",this.userId="",this.userService=a.userService,this.userServices=a.userServices}static launch(t,o,r){let a=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:o,userServices:r},disableClose:!1}).componentInstance.done}ngOnInit(){return H(this,null,function*(){this.authId=this.userService.owner_info.auth_id||"",this.userId=this.userService.owner_info.user_id||"",this.auths=yield this.rest.authenticators.summary(),this.authChanged()})}changeAuth(t){this.userId="",this.authChanged()}filteredUsers(){if(!this.userFilter)return this.users;let t=new Array;return this.users.forEach(o=>{(this.userFilter===""||o.name.toLocaleLowerCase().includes(this.userFilter.toLocaleLowerCase()))&&t.push(o)}),t}save(){if(this.userId===""||this.authId===""){this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"));return}this.userServices.save({id:this.userService.id,auth_id:this.authId,user_id:this.userId}).then(()=>{this.dialogRef.close(),this.done.resolve(!0)})}cancel(){this.dialogRef.close(),this.done.resolve(!1)}authChanged(){return H(this,null,function*(){this.authId?this.users=yield this.rest.authenticators.detail(this.authId,"users").summary():this.users=[]})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-change-assigned-service-owner"]],standalone:!1,decls:25,vars:5,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModelChange","ngModel"],[3,"changed","options"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[3,"value"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Change owner of assigned service"),d()(),c(3,"mat-dialog-content")(4,"div",1)(5,"mat-form-field")(6,"mat-label")(7,"uds-translate"),f(8,"Authenticator"),d()(),c(9,"mat-select",2),U("ngModelChange",function(s){return W(r.authId,s)||(r.authId=s),s}),b("selectionChange",function(s){return r.changeAuth(s)}),x(10,h7,2,2,"mat-option",3),d()(),c(11,"mat-form-field")(12,"mat-label")(13,"uds-translate"),f(14,"User"),d()(),c(15,"mat-select",4),U("ngModelChange",function(s){return W(r.userId,s)||(r.userId=s),s}),c(16,"uds-cond-select-search",5),b("changed",function(s){return r.userFilter=s}),d(),x(17,f7,2,2,"mat-option",3),d()()()(),c(18,"mat-dialog-actions")(19,"button",6),b("click",function(){return r.cancel()}),c(20,"uds-translate"),f(21,"Cancel"),d()(),c(22,"button",7),b("click",function(){return r.save()}),c(23,"uds-translate"),f(24,"Ok"),d()()()),o&2&&(u(9),z("ngModel",r.authId),u(),p("ngForOf",r.auths),u(5),z("ngModel",r.userId),u(),p("options",r.users),u(),p("ngForOf",r.filteredUsers()))},dependencies:[$e,we,xe,Te,Xe,et,Je,fe,ke,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();function g7(n,i){n&1&&(c(0,"uds-translate"),f(1,"New access rule for"),d())}function _7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Edit access rule for"),d())}function v7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Default fallback access for"),d())}function b7(n,i){if(n&1&&(c(0,"mat-option",11),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function y7(n,i){if(n&1){let e=k();ut(0),c(1,"mat-form-field")(2,"mat-label")(3,"uds-translate"),f(4,"Priority"),d()(),c(5,"input",8),U("ngModelChange",function(o){y(e);let r=_();return W(r.accessRule.priority,o)||(r.accessRule.priority=o),w(o)}),d()(),c(6,"mat-form-field")(7,"mat-label")(8,"uds-translate"),f(9,"Calendar"),d()(),c(10,"mat-select",3),U("ngModelChange",function(o){y(e);let r=_();return W(r.accessRule.calendar_id,o)||(r.accessRule.calendar_id=o),w(o)}),c(11,"uds-cond-select-search",9),b("changed",function(o){y(e);let r=_();return w(r.calendarsFilter=o)}),d(),x(12,b7,2,2,"mat-option",10),d()(),mt()}if(n&2){let e=_();u(5),z("ngModel",e.accessRule.priority),u(5),z("ngModel",e.accessRule.calendar_id),u(),p("options",e.calendars),u(),p("ngForOf",e.filtered(e.calendars,e.calendarsFilter))}}var Ql=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.onSave=new T(!0),this.calendars=[],this.calendarsFilter="",this.pool=a.pool,this.model=a.model,this.accessRule={id:void 0,priority:0,access:"ALLOW",calendar_id:""},a.accessRule&&(this.accessRule.id=a.accessRule.id)}static launch(t,o,r,a){let s=window.innerWidth<800?"80%":"60%";return t.gui.dialog.open(i,{width:s,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:o,model:r,accessRule:a},disableClose:!1}).componentInstance.onSave}ngOnInit(){this.rest.calendars.summary().then(t=>{this.calendars=t}),this.accessRule.id!==void 0&&this.accessRule.id!==-1?this.model.get(this.accessRule.id).then(t=>{this.accessRule=t}):this.accessRule.id===-1&&this.model.parentModel.getFallbackAccess(this.pool.id).then(t=>this.accessRule.access=t)}filtered(t,o){return o?t.filter(r=>r.name.toLocaleLowerCase().includes(o.toLocaleLowerCase())):t}save(){let t=()=>{this.dialogRef.close(),this.onSave.emit(!0)};this.accessRule.id!==-1?this.model.save(this.accessRule).then(t):this.model.parentModel.setFallbackAccess(this.pool.id,this.accessRule.access).then(t)}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-access-calendars"]],standalone:!1,decls:24,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],[3,"ngModelChange","ngModel"],["value","ALLOW"],["value","DENY"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["matInput","","type","number",3,"ngModelChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(o,r){o&1&&(c(0,"h4",0),x(1,g7,2,0,"uds-translate",1)(2,_7,2,0,"uds-translate",1)(3,v7,2,0,"uds-translate",1),f(4),d(),c(5,"mat-dialog-content")(6,"div",2),x(7,y7,13,4,"ng-container",1),c(8,"mat-form-field")(9,"mat-label")(10,"uds-translate"),f(11,"Action"),d()(),c(12,"mat-select",3),U("ngModelChange",function(s){return W(r.accessRule.access,s)||(r.accessRule.access=s),s}),c(13,"mat-option",4),f(14," ALLOW "),d(),c(15,"mat-option",5),f(16," DENY "),d()()()()(),c(17,"mat-dialog-actions")(18,"button",6)(19,"uds-translate"),f(20,"Cancel"),d()(),c(21,"button",7),b("click",function(){return r.save()}),c(22,"uds-translate"),f(23,"Ok"),d()()()),o&2&&(u(),p("ngIf",r.accessRule.id===void 0),u(),p("ngIf",r.accessRule.id!==void 0&&r.accessRule.id!==-1),u(),p("ngIf",r.accessRule.id===-1),u(),O(" ",r.pool.name,` +`),u(3),p("ngIf",Ct(7,8,r.group)),u(2),p("ngIf",Ct(9,10,r.servicesPools)),u(2),p("ngIf",Ct(11,12,r.userServices)),u(5),p("rest",r.users)("itemId",r.user.id)("tableId","userInfo-d-log"+r.user.id)("pageSize",5))},dependencies:[ue,Te,Qt,Xe,et,Je,Jt,en,rn,ae,Ie,Ri,yn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]});let n=i;return n})();function H$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Services Pools"),d())}function W$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,H$,2,0,"ng-template",3),M(2,"uds-table",4),d()),n&2){let e=_();u(2),p("rest",e.servicesPools)("pageSize",6)}}function G$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Users"),d())}function $$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,G$,2,0,"ng-template",3),M(2,"uds-table",4),d()),n&2){let e=_();u(2),p("rest",e.users)("pageSize",6)}}function q$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Groups"),d())}function Y$(n,i){if(n&1&&(c(0,"mat-tab"),x(1,q$,2,0,"ng-template",3),M(2,"uds-table",4),d()),n&2){let e=_();u(2),p("rest",e.groups)("pageSize",6)}}var Q$=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],K$=[{field:"name",title:django.gettext("Name")},{field:"real_name",title:django.gettext("Real Name")},{field:"state",title:django.gettext("state")},{field:"last_access",title:django.gettext("Last access"),type:_n.DATETIME}],Z$=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],EA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.data=a,this.users={},this.groups={},this.servicesPools={}}static launch(t,o,r){let a=window.innerWidth<800?"80%":"60%",s=t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{group:r,groups:o},disableClose:!1})}ngOnInit(){let t=this.rest.authenticators.detail(this.data.groups.parentId,"groups"),o=()=>t.invoke(this.data.group.id+"/servicesPools"),r=()=>t.invoke(this.data.group.id+"/users").then(a=>a.map(s=>(s.state=s.state==="A"?django.gettext("Enabled"):s.state==="I"?django.gettext("Disabled"):django.gettext("Blocked"),s)));if(this.servicesPools=new po(django.gettext("Service pools"),o,Q$,this.data.group.id+"infopls"),this.users=new po(django.gettext("Users"),r,K$,this.data.group.id+"infousr"),this.data.group.type==="meta"){let a=()=>t.overview().then(s=>s.filter(l=>this.data.group.groups.includes(l.id)));this.groups=new po(django.gettext("Groups"),a,Z$,this.data.group.id+"infogrps")}}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-group-information"]],standalone:!1,decls:15,vars:9,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],[3,"rest","pageSize"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Information for"),d()(),c(3,"mat-dialog-content")(4,"mat-tab-group"),x(5,W$,3,2,"mat-tab",1),gt(6,"notEmpty"),x(7,$$,3,2,"mat-tab",1),gt(8,"notEmpty"),x(9,Y$,3,2,"mat-tab",1),gt(10,"notEmpty"),d()(),c(11,"mat-dialog-actions")(12,"button",2)(13,"uds-translate"),f(14,"Ok"),d()()()),o&2&&(u(5),p("ngIf",Ct(6,3,r.servicesPools)),u(2),p("ngIf",Ct(8,5,r.users)),u(2),p("ngIf",Ct(10,7,r.groups)))},dependencies:[ue,Te,Qt,Xe,et,Je,Jt,en,rn,ae,Ie,yn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]});let n=i;return n})();var X$=n=>["/authenticators",n];function J$(n,i){n&1&&(c(0,"uds-translate"),f(1,"Summary"),d())}function e7(n,i){if(n&1&&M(0,"uds-information",16),n&2){let e=_(2);p("value",e.authenticator)("gui",e.gui)}}function t7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Users"),d())}function n7(n,i){if(n&1){let e=k();c(0,"uds-table",17),b("loaded",function(o){y(e);let r=_(2);return w(r.onLoad(o))})("newAction",function(o){y(e);let r=_(2);return w(r.onNewUser(o))})("editAction",function(o){y(e);let r=_(2);return w(r.onEditUser(o))})("deleteAction",function(o){y(e);let r=_(2);return w(r.onDeleteUser(o))})("customButtonAction",function(o){y(e);let r=_(2);return w(r.onUserCustom(o))}),d()}if(n&2){let e=_(2);p("rest",e.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+e.authenticator.id)("customButtons",e.usersCustomButtons)("pageSize",e.api.config.admin.page_size)}}function i7(n,i){if(n&1){let e=k();c(0,"uds-table",18),b("loaded",function(o){y(e);let r=_(2);return w(r.onLoad(o))})("editAction",function(o){y(e);let r=_(2);return w(r.onEditUser(o))})("deleteAction",function(o){y(e);let r=_(2);return w(r.onDeleteUser(o))})("customButtonAction",function(o){y(e);let r=_(2);return w(r.onUserCustom(o))}),d()}if(n&2){let e=_(2);p("rest",e.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+e.authenticator.id)("customButtons",e.usersCustomButtons)("pageSize",e.api.config.admin.page_size)}}function o7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Groups"),d())}function r7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Logs"),d())}function a7(n,i){if(n&1){let e=k();c(0,"div",6)(1,"div",7)(2,"mat-tab-group",8),U("selectedIndexChange",function(o){y(e);let r=_();return W(r.selectedTab,o)||(r.selectedTab=o),w(o)}),c(3,"mat-tab"),x(4,J$,2,0,"ng-template",9),c(5,"div",10),x(6,e7,1,2,"uds-information",11),gt(7,"notEmpty"),d()(),c(8,"mat-tab"),x(9,t7,2,0,"ng-template",9),c(10,"div",10),x(11,n7,1,6,"uds-table",12)(12,i7,1,6,"uds-table",13),d()(),c(13,"mat-tab"),x(14,o7,2,0,"ng-template",9),c(15,"div",10)(16,"uds-table",14),b("loaded",function(o){y(e);let r=_();return w(r.onLoad(o))})("newAction",function(o){y(e);let r=_();return w(r.onNewGroup(o))})("editAction",function(o){y(e);let r=_();return w(r.onEditGroup(o))})("deleteAction",function(o){y(e);let r=_();return w(r.onDeleteGroup(o))})("customButtonAction",function(o){y(e);let r=_();return w(r.onGroupInformation(o))}),d()()(),c(17,"mat-tab"),x(18,r7,2,0,"ng-template",9),c(19,"div",10),M(20,"uds-logs-table",15),d()()()()()}if(n&2){let e=_();u(2),z("selectedIndex",e.selectedTab),p("@.disabled",!0),u(4),p("ngIf",Ct(7,14,e.gui)),u(5),p("ngIf",e.authenticator.type_info.create_users_supported),u(),p("ngIf",!e.authenticator.type_info.create_users_supported),u(4),p("rest",e.groups)("multiSelect",!0)("allowExport",!0)("customButtons",e.groupsCustomButtons)("tableId","authenticators-d-groups"+e.authenticator.id)("pageSize",e.api.config.admin.page_size),u(4),p("rest",e.rest.authenticators)("itemId",e.authenticator.id)("tableId","authenticators-d-log"+e.authenticator.id)}}var ag=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.groupsCustomButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:ct.ONLY_MENU}],this.usersCustomButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:ct.ONLY_MENU},{id:"clean-related",html:'clear_all '+django.gettext("Clean related (mfa,...)")+"",type:ct.ONLY_MENU},{id:"enable-client-logging",html:'assignment '+django.gettext("Enable client logging")+"",type:ct.ONLY_MENU}],this.authenticator=null,this.gui=[],this.users={},this.groups={},this.selectedTab=1,this.selectedTab=this.route.snapshot.paramMap.get("group")?2:1}ngOnInit(){let t=this.route.snapshot.paramMap.get("authenticator");t&&(this.users=this.rest.authenticators.detail(t,"users"),this.groups=this.rest.authenticators.detail(t,"groups"),this.rest.authenticators.get(t).then(o=>{this.authenticator=o,this.rest.authenticators.gui(o.type).then(r=>{this.gui=r})}))}onLoad(t){if(t.param===!0){let o=this.route.snapshot.paramMap.get("user"),r=this.route.snapshot.paramMap.get("group"),a=o||r;t.table.selectElement("id",a)}}processElement(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")}onNewUser(t){yw.launch(this.api,this.authenticator).subscribe(o=>t.table.overview())}onEditUser(t){yw.launch(this.api,this.authenticator,t.table.selection.selected[0]).subscribe(o=>t.table.overview())}onDeleteUser(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user"))}onNewGroup(t){ww.launch(this.api,this.authenticator,t.param.type).subscribe(o=>t.table.overview())}onEditGroup(t){ww.launch(this.api,this.authenticator,t.param.type,t.table.selection.selected[0]).subscribe(o=>t.table.overview())}onDeleteGroup(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete group"))}onUserCustom(t){return H(this,null,function*(){t.param.id==="info"?SA.launch(this.api,this.users,t.table.selection.selected[0]):t.param.id==="clean-related"?(yield this.api.gui.questionDialog(django.gettext("Clean data"),django.gettext("Clean related data (mfa, ...)?"),!0))&&(yield this.users.invoke(t.table.selection.selected[0].id+"/clean_related"),this.api.gui.snackbar.open(django.gettext("Related data cleaned"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()):t.param.id==="enable-client-logging"&&(yield this.api.gui.questionDialog(django.gettext("Client logging"),django.gettext("Enable client logging for user?"),!0))&&(yield this.users.invoke(t.table.selection.selected[0].id+"/enable_client_logging"),this.api.gui.snackbar.open(django.gettext("Client logging enabled"),django.gettext("dismiss"),{duration:2e3}),t.table.overview())})}onGroupInformation(t){EA.launch(this.api,this.groups,t.table.selection.selected[0])}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-authenticators-detail"]],standalone:!1,decls:10,vars:8,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","groups",3,"loaded","newAction","editAction","deleteAction","customButtonAction","rest","multiSelect","allowExport","customButtons","tableId","pageSize"],[3,"rest","itemId","tableId"],[3,"value","gui"],["icon","users",3,"loaded","newAction","editAction","deleteAction","customButtonAction","rest","multiSelect","allowExport","tableId","customButtons","pageSize"],["icon","users",3,"loaded","editAction","deleteAction","customButtonAction","rest","multiSelect","allowExport","tableId","customButtons","pageSize"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1)(2,"a",2)(3,"i",3),f(4,"arrow_back"),d()(),f(5," \xA0"),M(6,"img",4),f(7),d(),x(8,a7,21,16,"div",5),gt(9,"notEmpty"),d()),o&2&&(u(2),p("routerLink",Un(6,X$,r.authenticator?r.authenticator.id:"")),u(4),p("src",r.api.staticURL("admin/img/icons/services.png"),Se),u(),O(" \xA0",r.authenticator==null?null:r.authenticator.name," "),u(),p("ngIf",Ct(9,4,r.authenticator)))},dependencies:[ue,bn,Jt,en,rn,ae,Ie,Ri,ho,yn],encapsulation:2});let n=i;return n})();var Cw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("osmanager")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New OS Manager"),!1)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit OS Manager"),!1)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete OS Manager"))}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("osmanager"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-osmanagers"]],standalone:!1,decls:2,vars:5,consts:[["icon","osmanagers",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.osManagers)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],encapsulation:2});let n=i;return n})();var xw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("transport")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Transport"))}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Transport"))}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Transport"))}processElement(t){try{t.allowed_oss=t.allowed_oss.join(", ")}catch{t.allowed_oss=""}}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("transport"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-transports"]],standalone:!1,decls:2,vars:7,consts:[["icon","transports",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","newGrouped","onItem","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.transports)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("onItem",r.processElement)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],styles:[".mat-column-priority{max-width:7rem;justify-content:center}"]});let n=i;return n})();var Dw=(()=>{let i=class i{constructor(t,o,r){this.api=t,this.route=o,this.rest=r}ngOnInit(){let t=this.route.snapshot.paramMap.get("network")}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Network"),!1)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Network"),!1)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Network"))}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("network"))}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Re),C(Z))},i.\u0275cmp=E({type:i,selectors:[["uds-networks"]],standalone:!1,decls:2,vars:5,consts:[["icon","networks",3,"newAction","editAction","deleteAction","loaded","rest","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"div")(1,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("loaded",function(s){return r.onLoad(s)}),d()()),o&2&&(u(),p("rest",r.rest.networks)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size))},dependencies:[Ie],encapsulation:2});let n=i;return n})();var Sw=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r}ngOnInit(){}onNew(t){this.api.gui.forms.typedNewForm(t,django.gettext("New tunnel"),!0)}onEdit(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit tunnel"),!0)}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete tunnel"))}onDetail(t){this.api.navigation.gotoTunnelDetail(t.param.id)}processElement(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("tunnel"))}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-tunnels"]],standalone:!1,decls:1,vars:6,consts:[["tableId","tunnels-table","icon","providers",3,"newAction","editAction","deleteAction","detailAction","loaded","rest","onItem","multiSelect","allowExport","hasPermissions","pageSize"]],template:function(o,r){o&1&&(c(0,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("detailAction",function(s){return r.onDetail(s)})("loaded",function(s){return r.onLoad(s)}),d()),o&2&&p("rest",r.rest.tunnels)("onItem",r.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",r.api.config.admin.page_size)},dependencies:[Ie],encapsulation:2});let n=i;return n})();function s7(n,i){if(n&1&&(c(0,"mat-option",7),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}var MA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.availTunnelServers=[],this.tunnelFilter="",this.serverId="",this.availTunnelServers=a.availableTunnelServers,this.tunnelId=a.tunnelId}static launch(t,o,r){return H(this,null,function*(){let a=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{tunnelId:o,availableTunnelServers:r},disableClose:!1}).componentInstance.done})}ngOnInit(){return H(this,null,function*(){})}filteredTunnels(){if(!this.tunnelFilter)return this.availTunnelServers;let t=new Array;for(let o of this.availTunnelServers)o.name.toLocaleLowerCase().includes(this.tunnelFilter.toLocaleLowerCase())&&t.push(o);return t}save(){return H(this,null,function*(){if(this.serverId===""){this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid server"));return}this.dialogRef.close(),this.done.resolve(!0),yield this.rest.tunnels.assign(this.tunnelId,this.serverId)})}cancel(){return H(this,null,function*(){this.dialogRef.close(),this.done.resolve(!1)})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-new-tunnel"]],standalone:!1,decls:19,vars:3,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModelChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[3,"value"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Assign new server to tunnel group"),d()(),c(3,"mat-dialog-content")(4,"div",1)(5,"mat-form-field")(6,"mat-label")(7,"uds-translate"),f(8,"Tunnel"),d()(),c(9,"mat-select",2),U("ngModelChange",function(s){return W(r.serverId,s)||(r.serverId=s),s}),c(10,"uds-cond-select-search",3),b("changed",function(s){return r.tunnelFilter=s}),d(),x(11,s7,2,2,"mat-option",4),d()()()(),c(12,"mat-dialog-actions")(13,"button",5),b("click",function(){return r.cancel()}),c(14,"uds-translate"),f(15,"Cancel"),d()(),c(16,"button",6),b("click",function(){return r.save()}),c(17,"uds-translate"),f(18,"Ok"),d()()()),o&2&&(u(9),z("ngModel",r.serverId),u(),p("options",r.availTunnelServers),u(),p("ngForOf",r.filteredTunnels()))},dependencies:[$e,we,xe,Te,Xe,et,Je,fe,ke,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();var l7=n=>["/connectivity","tunnels",n];function c7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Summary"),d())}function d7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Tunnel servers"),d())}function u7(n,i){if(n&1){let e=k();c(0,"div",6)(1,"div",7)(2,"mat-tab-group",8)(3,"mat-tab"),x(4,c7,2,0,"ng-template",9),c(5,"div",10),M(6,"uds-information",11),d()(),c(7,"mat-tab"),x(8,d7,2,0,"ng-template",9),c(9,"div",10)(10,"uds-table",12),b("newAction",function(o){y(e);let r=_();return w(r.onNew(o))})("rowSelected",function(o){y(e);let r=_();return w(r.onRowSelect(o))})("deleteAction",function(o){y(e);let r=_();return w(r.onDelete(o))})("customButtonAction",function(o){y(e);let r=_();return w(r.onMaintenance(o))})("loaded",function(o){y(e);let r=_();return w(r.onLoad(o))}),d()()()()()()}if(n&2){let e=_();u(2),p("@.disabled",!0),u(4),p("value",e.tunnel)("gui",e.gui),u(4),p("rest",e.servers)("multiSelect",!0)("allowExport",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("tableId","tunnels-d-servers"+e.tunnel.id)}}var IA='pause'+django.gettext("Maintenance")+"",m7='pause'+django.gettext("Exit maintenance mode")+"",p7='pause'+django.gettext("Enter maintenance mode")+"",TA=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.cButtons=[{id:"maintenance",html:IA,type:ct.SINGLE_SELECT}],this.tunnel=null,this.gui=[],this.servers={}}get customButtons(){return this.api.user.isAdmin?this.cButtons:[]}ngOnInit(){return H(this,null,function*(){let t=this.route.snapshot.paramMap.get("tunnel");t&&(this.servers=this.rest.tunnels.detail(t,"servers"),this.tunnel=yield this.servers.parentModel.get(t),this.gui=yield this.servers.parentModel.gui(),console.log(this.gui),console.log(this.tunnel))})}onMaintenance(t){let o=t.table.selection.selected[0],r=o.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.questionDialog(django.gettext("Maintenance mode for")+" "+o.name,r).then(a=>{a&&this.servers.get(o.id+"/maintenance").then(()=>{t.table.overview()})})}onNew(t){return H(this,null,function*(){let o=yield this.rest.tunnels.tunnels(this.tunnel.id);o.length==0?this.api.gui.alert(django.gettext("Error"),django.gettext("This tunnel already has all the tunnel servers available")):(yield MA.launch(this.api,this.tunnel.id,o))===!0&&t.table.overview()})}onDelete(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove member from tunnel"))}onRowSelect(t){let o=t.table;if(o.selection.selected.length>1||o.selection.selected.length===0){this.customButtons[0].html=IA;return}o.selection.selected[0].maintenance_mode?this.customButtons[0].html=m7:this.customButtons[0].html=p7}onLoad(t){if(t.param===!0){let o=this.route.snapshot.paramMap.get("tunnel");if(o!==void 0){let r=t.table;r.dataSource.data.forEach(a=>{a.id===o&&r.selection.select(a)})}}}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-tunnels-detail"]],standalone:!1,decls:10,vars:8,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary","selectedIndex","1"],["mat-tab-label",""],[1,"content"],[3,"value","gui"],["icon","tunnels",3,"newAction","rowSelected","deleteAction","customButtonAction","loaded","rest","multiSelect","allowExport","customButtons","pageSize","tableId"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1)(2,"a",2)(3,"i",3),f(4,"arrow_back"),d()(),f(5," \xA0"),M(6,"img",4),f(7),d(),x(8,u7,11,9,"div",5),gt(9,"notEmpty"),d()),o&2&&(u(2),p("routerLink",Un(6,l7,r.servers.parentId)),u(4),p("src",r.api.staticURL("admin/img/icons/tunnels.png"),Se),u(),O(" \xA0",r.tunnel==null?null:r.tunnel.name," "),u(),p("ngIf",Ct(9,4,r.tunnel)))},dependencies:[ue,bn,Jt,en,rn,ae,Ie,ho,yn],styles:[".row-maintenance-true>mat-cell{color:orange!important}"]});let n=i;return n})();var Ew=(()=>{let i=class i{constructor(t,o,r){this.route=t,this.rest=o,this.api=r,this.customButtons=[Mn.getGotoButton(By,"provider_id"),Mn.getGotoButton(jy,"provider_id","service_id"),Mn.getGotoButton(Hy,"osmanager_id"),Mn.getGotoButton(Wy,"pool_group_id")],this.editing=!1}ngOnInit(){return H(this,null,function*(){})}onChange(t){return H(this,null,function*(){let o=["initial_srvs","cache_l1_srvs","max_srvs"];if(t.on===null||t.on.field.name==="service_id"){if(t.all.service_id.value===""){t.all.osmanager_id.gui.choices=[];for(let a of o)t.all[a].gui.readonly=!0;t.all.cache_l2_srvs.gui.readonly=!0;return}let r=yield this.rest.providers.service(t.all.service_id.value);if(t.all.allow_users_reset.gui.readonly=!r.info.can_reset,t.all.osmanager_id.gui.choices=[],this.editing||(t.all.osmanager_id.gui.readonly=!r.info.needs_osmanager),r.info.needs_osmanager===!0){let a=yield this.rest.osManagers.overview(),s=[];for(let l of a)for(let m of l.servicesTypes)r.info.services_type_provided==m&&s.push({id:l.id,text:l.name});s.length>0?t.all.osmanager_id.value=t.all.osmanager_id.value||s[0].id:t.all.osmanager_id.value="",t.all.osmanager_id.gui.choices=s}else t.all.osmanager_id.gui.choices=[{id:"",text:django.gettext("(This service does not requires an OS Manager)")}],t.all.osmanager_id.value="";for(let a of o)t.all[a].gui.readonly=!r.info.uses_cache;t.all.cache_l2_srvs.gui.readonly=r.info.uses_cache===!1||r.info.uses_cache_l2===!1,t.all.publish_on_save&&(t.all.publish_on_save.gui.readonly=!r.info.needs_publication)}})}onNew(t){return H(this,null,function*(){this.editing=!1,yield this.api.gui.forms.typedNewForm(t,django.gettext("New service Pool"),!1,[{name:"publish_on_save",value:!0,gui:{label:django.gettext("Publish on creation"),tooltip:django.gettext("If selected, will initiate the publication inmediatly after creation"),type:Xn.CHECKBOX,order:150,default:"true"}}],this.onChange.bind(this))})}onEdit(t){return H(this,null,function*(){return this.editing=!0,this.api.gui.forms.typedEditForm(t,django.gettext("Edit Service Pool"),!1,void 0,this.onChange.bind(this))})}onDelete(t){return H(this,null,function*(){return this.api.gui.forms.deleteForm(t,django.gettext("Delete service pool"))})}processElement(t){t.visible=this.api.boolAsHumanString(t.visible),t.show_transports=this.api.boolAsHumanString(t.show_transports),typeof t.name!="string"&&(t.name=""),t.name=t.name.replace(//g,">"),t.restrained?(t.name='warning '+this.api.gui.icon(t.info.icon)+t.name,t.state="T"):(t.name=this.api.gui.icon(t.info.icon)+t.name,t.meta_member.length>0&&(t.state="V")),t.name=this.api.safeString(t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)}onDetail(t){this.api.navigation.gotoServicePoolDetail(t.param.id)}onLoad(t){t.param===!0&&t.table.selectElement("id",this.route.snapshot.paramMap.get("pool"))}};i.\u0275fac=function(o){return new(o||i)(C(Re),C(Z),C(B))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools"]],standalone:!1,decls:1,vars:7,consts:[["icon","pools",3,"newAction","editAction","deleteAction","detailAction","loaded","rest","multiSelect","allowExport","hasPermissions","onItem","customButtons","pageSize"]],template:function(o,r){o&1&&(c(0,"uds-table",0),b("newAction",function(s){return r.onNew(s)})("editAction",function(s){return r.onEdit(s)})("deleteAction",function(s){return r.onDelete(s)})("detailAction",function(s){return r.onDetail(s)})("loaded",function(s){return r.onLoad(s)}),d()),o&2&&p("rest",r.rest.servicesPools)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",r.processElement)("customButtons",r.customButtons)("pageSize",r.api.config.admin.page_size)},dependencies:[Ie],styles:[".mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible, .mat-column-state, .mat-column-usage{max-width:7rem;justify-content:center} .mat-column-show_transports{max-width:12rem;justify-content:center} .mat-column-pool_group_name{max-width:12rem} .row-state-T>.mat-mdc-cell{color:#d65014!important} .mat-column-user_services_count{max-width:10rem;justify-content:center} .mat-column-user_services_in_preparation{max-width:10rem;justify-content:center}"]});let n=i;return n})();function h7(n,i){if(n&1&&(c(0,"mat-option",8),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function f7(n,i){if(n&1&&(c(0,"mat-option",8),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}var sg=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.auths=[],this.users=[],this.userFilter="",this.authId="",this.userId="",this.userService=a.userService,this.userServices=a.userServices}static launch(t,o,r){let a=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:o,userServices:r},disableClose:!1}).componentInstance.done}ngOnInit(){return H(this,null,function*(){this.authId=this.userService.owner_info.auth_id||"",this.userId=this.userService.owner_info.user_id||"",this.auths=yield this.rest.authenticators.summary(),this.authChanged()})}changeAuth(t){this.userId="",this.authChanged()}filteredUsers(){if(!this.userFilter)return this.users;let t=new Array;return this.users.forEach(o=>{(this.userFilter===""||o.name.toLocaleLowerCase().includes(this.userFilter.toLocaleLowerCase()))&&t.push(o)}),t}save(){if(this.userId===""||this.authId===""){this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"));return}this.userServices.save({id:this.userService.id,auth_id:this.authId,user_id:this.userId}).then(()=>{this.dialogRef.close(),this.done.resolve(!0)})}cancel(){this.dialogRef.close(),this.done.resolve(!1)}authChanged(){return H(this,null,function*(){this.authId?this.users=yield this.rest.authenticators.detail(this.authId,"users").summary():this.users=[]})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-change-assigned-service-owner"]],standalone:!1,decls:25,vars:5,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModelChange","ngModel"],[3,"changed","options"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[3,"value"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"Change owner of assigned service"),d()(),c(3,"mat-dialog-content")(4,"div",1)(5,"mat-form-field")(6,"mat-label")(7,"uds-translate"),f(8,"Authenticator"),d()(),c(9,"mat-select",2),U("ngModelChange",function(s){return W(r.authId,s)||(r.authId=s),s}),b("selectionChange",function(s){return r.changeAuth(s)}),x(10,h7,2,2,"mat-option",3),d()(),c(11,"mat-form-field")(12,"mat-label")(13,"uds-translate"),f(14,"User"),d()(),c(15,"mat-select",4),U("ngModelChange",function(s){return W(r.userId,s)||(r.userId=s),s}),c(16,"uds-cond-select-search",5),b("changed",function(s){return r.userFilter=s}),d(),x(17,f7,2,2,"mat-option",3),d()()()(),c(18,"mat-dialog-actions")(19,"button",6),b("click",function(){return r.cancel()}),c(20,"uds-translate"),f(21,"Cancel"),d()(),c(22,"button",7),b("click",function(){return r.save()}),c(23,"uds-translate"),f(24,"Ok"),d()()()),o&2&&(u(9),z("ngModel",r.authId),u(),p("ngForOf",r.auths),u(5),z("ngModel",r.userId),u(),p("options",r.users),u(),p("ngForOf",r.filteredUsers()))},dependencies:[$e,we,xe,Te,Xe,et,Je,fe,ke,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();function g7(n,i){n&1&&(c(0,"uds-translate"),f(1,"New access rule for"),d())}function _7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Edit access rule for"),d())}function v7(n,i){n&1&&(c(0,"uds-translate"),f(1,"Default fallback access for"),d())}function b7(n,i){if(n&1&&(c(0,"mat-option",11),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function y7(n,i){if(n&1){let e=k();ut(0),c(1,"mat-form-field")(2,"mat-label")(3,"uds-translate"),f(4,"Priority"),d()(),c(5,"input",8),U("ngModelChange",function(o){y(e);let r=_();return W(r.accessRule.priority,o)||(r.accessRule.priority=o),w(o)}),d()(),c(6,"mat-form-field")(7,"mat-label")(8,"uds-translate"),f(9,"Calendar"),d()(),c(10,"mat-select",3),U("ngModelChange",function(o){y(e);let r=_();return W(r.accessRule.calendar_id,o)||(r.accessRule.calendar_id=o),w(o)}),c(11,"uds-cond-select-search",9),b("changed",function(o){y(e);let r=_();return w(r.calendarsFilter=o)}),d(),x(12,b7,2,2,"mat-option",10),d()(),mt()}if(n&2){let e=_();u(5),z("ngModel",e.accessRule.priority),u(5),z("ngModel",e.accessRule.calendar_id),u(),p("options",e.calendars),u(),p("ngForOf",e.filtered(e.calendars,e.calendarsFilter))}}var Ql=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.onSave=new T(!0),this.calendars=[],this.calendarsFilter="",this.pool=a.pool,this.model=a.model,this.accessRule={id:void 0,priority:0,access:"ALLOW",calendar_id:""},a.accessRule&&(this.accessRule.id=a.accessRule.id)}static launch(t,o,r,a){let s=window.innerWidth<800?"80%":"60%";return t.gui.dialog.open(i,{width:s,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:o,model:r,accessRule:a},disableClose:!1}).componentInstance.onSave}ngOnInit(){this.rest.calendars.summary().then(t=>{this.calendars=t}),this.accessRule.id!==void 0&&this.accessRule.id!==-1?this.model.get(this.accessRule.id).then(t=>{this.accessRule=t}):this.accessRule.id===-1&&this.model.parentModel.getFallbackAccess(this.pool.id).then(t=>this.accessRule.access=t)}filtered(t,o){return o?t.filter(r=>r.name.toLocaleLowerCase().includes(o.toLocaleLowerCase())):t}save(){let t=()=>{this.dialogRef.close(),this.onSave.emit(!0)};this.accessRule.id!==-1?this.model.save(this.accessRule).then(t):this.model.parentModel.setFallbackAccess(this.pool.id,this.accessRule.access).then(t)}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-access-calendars"]],standalone:!1,decls:24,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],[3,"ngModelChange","ngModel"],["value","ALLOW"],["value","DENY"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["matInput","","type","number",3,"ngModelChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(o,r){o&1&&(c(0,"h4",0),x(1,g7,2,0,"uds-translate",1)(2,_7,2,0,"uds-translate",1)(3,v7,2,0,"uds-translate",1),f(4),d(),c(5,"mat-dialog-content")(6,"div",2),x(7,y7,13,4,"ng-container",1),c(8,"mat-form-field")(9,"mat-label")(10,"uds-translate"),f(11,"Action"),d()(),c(12,"mat-select",3),U("ngModelChange",function(s){return W(r.accessRule.access,s)||(r.accessRule.access=s),s}),c(13,"mat-option",4),f(14," ALLOW "),d(),c(15,"mat-option",5),f(16," DENY "),d()()()()(),c(17,"mat-dialog-actions")(18,"button",6)(19,"uds-translate"),f(20,"Cancel"),d()(),c(21,"button",7),b("click",function(){return r.save()}),c(22,"uds-translate"),f(23,"Ok"),d()()()),o&2&&(u(),p("ngIf",r.accessRule.id===void 0),u(),p("ngIf",r.accessRule.id!==void 0&&r.accessRule.id!==-1),u(),p("ngIf",r.accessRule.id===-1),u(),O(" ",r.pool.name,` `),u(3),p("ngIf",r.accessRule.id!==-1),u(5),z("ngModel",r.accessRule.access))},dependencies:[$e,ue,lt,Gi,we,xe,Te,Qt,Xe,et,Je,fe,ke,pt,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();function w7(n,i){if(n&1&&(c(0,"mat-option",8),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function C7(n,i){if(n&1&&(ut(0),f(1),mt()),n&2){let e=_().$implicit;u(),O(" (",e.comments,")")}}function x7(n,i){if(n&1&&(c(0,"mat-option",8),f(1),x(2,C7,2,1,"ng-container",9),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name,""),u(),p("ngIf",e.comments)}}var lg=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.model={},this.auths=[],this.authFilter="",this.groups=[],this.groupFilter="",this.authId="",this.groupId="",this.pool=a.pool,this.model=a.model}static launch(t,o,r){let a=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:o,model:r},disableClose:!1}).componentInstance.done}ngOnInit(){return H(this,null,function*(){this.auths=yield this.rest.authenticators.summary()})}changeAuth(t){return H(this,null,function*(){this.groupId="",this.authChanged()})}filteredGroups(){return!this.groupFilter||this.groupFilter.length<3?this.groups:this.groups.filter(t=>(t.name+t.comments).toLocaleLowerCase().includes(this.groupFilter.toLocaleLowerCase()))}filteredAuths(){return!this.authFilter||this.authFilter.length<3?this.auths:this.auths.filter(t=>t.name.toLocaleLowerCase().includes(this.authFilter.toLocaleLowerCase()))}save(){return H(this,null,function*(){if(this.groupId===""||this.authId===""){this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid group"));return}yield this.model.create({id:this.groupId}),this.dialogRef.close(),this.done.resolve(!0)})}cancel(){return H(this,null,function*(){this.dialogRef.close(),this.done.resolve(!1)})}authChanged(){return H(this,null,function*(){this.authId?this.groups=yield this.rest.authenticators.detail(this.authId,"groups").summary():this.groups=[]})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-add-group"]],standalone:!1,decls:27,vars:7,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModelChange","selectionChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModelChange","ngModel"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[4,"ngIf"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"New group for"),d(),f(3),d(),c(4,"mat-dialog-content")(5,"div",1)(6,"mat-form-field")(7,"mat-label")(8,"uds-translate"),f(9,"Authenticator"),d()(),c(10,"mat-select",2),U("ngModelChange",function(s){return W(r.authId,s)||(r.authId=s),s}),b("selectionChange",function(s){return r.changeAuth(s)}),c(11,"uds-cond-select-search",3),b("changed",function(s){return r.authFilter=s}),d(),x(12,w7,2,2,"mat-option",4),d()(),c(13,"mat-form-field")(14,"mat-label")(15,"uds-translate"),f(16,"Group"),d()(),c(17,"mat-select",5),U("ngModelChange",function(s){return W(r.groupId,s)||(r.groupId=s),s}),c(18,"uds-cond-select-search",3),b("changed",function(s){return r.groupFilter=s}),d(),x(19,x7,3,3,"mat-option",4),d()()()(),c(20,"mat-dialog-actions")(21,"button",6),b("click",function(){return r.cancel()}),c(22,"uds-translate"),f(23,"Cancel"),d()(),c(24,"button",7),b("click",function(){return r.save()}),c(25,"uds-translate"),f(26,"Ok"),d()()()),o&2&&(u(3),O(" ",r.pool.name,""),u(7),z("ngModel",r.authId),u(),p("options",r.auths),u(),p("ngForOf",r.filteredAuths()),u(5),z("ngModel",r.groupId),u(),p("options",r.groups),u(),p("ngForOf",r.filteredGroups()))},dependencies:[$e,ue,we,xe,Te,Xe,et,Je,fe,ke,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();function D7(n,i){if(n&1&&(ut(0),f(1),mt()),n&2){let e=_().$implicit;u(),O(" (",e.comments,")")}}function S7(n,i){if(n&1&&(c(0,"mat-option",7),f(1),x(2,D7,2,1,"ng-container",8),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name,""),u(),p("ngIf",e.comments)}}var kA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.transports=[],this.transportsFilter="",this.transportId="",this.servicePool=a.servicePool}static launch(t,o){let r=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:o},disableClose:!1}).componentInstance.done}ngOnInit(){return H(this,null,function*(){this.transports=(yield this.rest.transports.summary()).filter(t=>this.servicePool.info.allowed_protocols.includes(t.protocol))})}filteredTransports(){return this.transportsFilter?this.transports.filter(t=>t.name.toLocaleLowerCase().includes(this.transportsFilter.toLocaleLowerCase())):this.transports}save(){return H(this,null,function*(){if(this.transportId===""){this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid transport"));return}yield this.rest.servicesPools.detail(this.servicePool.id,"transports").create({id:this.transportId}),this.done.resolve(!0),this.dialogRef.close()})}cancel(){return H(this,null,function*(){this.done.resolve(!1),this.dialogRef.close()})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-add-transport"]],standalone:!1,decls:20,vars:4,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModelChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[4,"ngIf"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"New transport for"),d(),f(3),d(),c(4,"mat-dialog-content")(5,"div",1)(6,"mat-form-field")(7,"mat-label")(8,"uds-translate"),f(9,"Transport"),d()(),c(10,"mat-select",2),U("ngModelChange",function(s){return W(r.transportId,s)||(r.transportId=s),s}),c(11,"uds-cond-select-search",3),b("changed",function(s){return r.transportsFilter=s}),d(),x(12,S7,3,3,"mat-option",4),d()()()(),c(13,"mat-dialog-actions")(14,"button",5),b("click",function(){return r.cancel()}),c(15,"uds-translate"),f(16,"Cancel"),d()(),c(17,"button",6),b("click",function(){return r.save()}),c(18,"uds-translate"),f(19,"Ok"),d()()()),o&2&&(u(3),O(" ",r.servicePool.name,""),u(7),z("ngModel",r.transportId),u(),p("options",r.transports),u(),p("ngForOf",r.filteredTransports()))},dependencies:[$e,ue,we,xe,Te,Xe,et,Je,fe,ke,vt,nt,ae,pn],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();var AA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.done=new Xt,this.reason="",this.servicePool=a.servicePool}static launch(t,o){let r=window.innerWidth<800?"60%":"40%";return t.gui.dialog.open(i,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:o},disableClose:!1}).componentInstance.done}ngOnInit(){}save(){this.rest.servicesPools.detail(this.servicePool.id,"publications").invoke("publish","changelog="+encodeURIComponent(this.reason)).then(()=>{this.dialogRef.close(),this.done.resolve(!0)})}cancel(){this.dialogRef.close(),this.done.resolve(!1)}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-new-publication"]],standalone:!1,decls:18,vars:2,consts:[["mat-dialog-title",""],[1,"content"],["matInput","","type","text",3,"ngModelChange","ngModel"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(o,r){o&1&&(c(0,"h4",0)(1,"uds-translate"),f(2,"New publication for"),d(),f(3),d(),c(4,"mat-dialog-content")(5,"div",1)(6,"mat-form-field")(7,"mat-label")(8,"uds-translate"),f(9,"Comments"),d()(),c(10,"input",2),U("ngModelChange",function(s){return W(r.reason,s)||(r.reason=s),s}),d()()()(),c(11,"mat-dialog-actions")(12,"button",3),b("click",function(){return r.cancel()}),c(13,"uds-translate"),f(14,"Cancel"),d()(),c(15,"button",4),b("click",function(){return r.save()}),c(16,"uds-translate"),f(17,"Ok"),d()()()),o&2&&(u(3),O(" ",r.servicePool.name,` `),u(7),z("ngModel",r.reason))},dependencies:[lt,we,xe,Te,Xe,et,Je,fe,ke,pt,ae],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{width:100%;margin-top:.5rem;display:flex;flex-wrap:wrap}.mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"]});let n=i;return n})();var RA=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.onSave=new T(!0),this.changeLogPubs={},this.servicePool=a.servicePool}static launch(t,o){let r=window.innerWidth<800?"80%":"60%",a=t.gui.dialog.open(i,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:o},disableClose:!1})}ngOnInit(){this.changeLogPubs=this.rest.servicesPools.detail(this.servicePool.id,"changelog")}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-publications-changelog"]],standalone:!1,decls:11,vars:4,consts:[["changeLog",""],["mat-dialog-title",""],["icon","publications",3,"rest","allowExport","tableId"],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(o,r){o&1&&(c(0,"h4",1)(1,"uds-translate"),f(2,"Changelog of"),d(),f(3),d(),c(4,"mat-dialog-content"),M(5,"uds-table",2,0),d(),c(7,"mat-dialog-actions")(8,"button",3)(9,"uds-translate"),f(10,"Ok"),d()()()),o&2&&(u(3),O(" ",r.servicePool.name,` `),u(2),p("rest",r.changeLogPubs)("allowExport",!0)("tableId","servicePools-d-changelog"+r.servicePool.id))},dependencies:[Te,Qt,Xe,et,Je,ae,Ie],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]});let n=i;return n})();var E7=["switch"],M7=["*"];function I7(n,i){n&1&&(c(0,"span",10),fn(),c(1,"svg",12),M(2,"path",13),d(),c(3,"svg",14),M(4,"path",15),d()())}var T7=new R("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),k7={provide:bi,useExisting:ln(()=>sr),multi:!0},cg=class{source;checked;constructor(i,e){this.source=i,this.checked=e}},sr=(()=>{class n{_elementRef=h(Q);_focusMonitor=h(Pn);_changeDetectorRef=h(Ee);defaults=h(T7);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new cg(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations;_focused;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new T;toggleChange=new T;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){h(Mt).load(Dn);let e=h(new jn("tabindex"),{optional:!0}),t=this.defaults,o=h($t,{optional:!0});this.tabIndex=e==null?0:parseInt(e)||0,this.color=t.color||"accent",this._noopAnimations=o==="NoopAnimations",this.id=this._uniqueId=h(ft).getId("mat-mdc-slide-toggle-"),this.hideIcon=t.hideIcon??!1,this.disabledInteractive=t.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new cg(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=E({type:n,selectors:[["mat-slide-toggle"]],viewQuery:function(t,o){if(t&1&&se(E7,5),t&2){let r;$(r=q())&&(o._switchElement=r.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(t,o){t&2&&(En("id",o.id),ee("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Yt(o.color?"mat-"+o.color:""),ne("mat-mdc-slide-toggle-focused",o._focused)("mat-mdc-slide-toggle-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",G],color:"color",disabled:[2,"disabled","disabled",G],disableRipple:[2,"disableRipple","disableRipple",G],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:on(e)],checked:[2,"checked","checked",G],hideIcon:[2,"hideIcon","hideIcon",G],disabledInteractive:[2,"disabledInteractive","disabledInteractive",G]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[ye([k7,{provide:lo,useExisting:n,multi:!0}]),ce,Ze],ngContentSelectors:M7,decls:13,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(t,o){if(t&1){let r=k();We(),c(0,"div",1)(1,"button",2,0),b("click",function(){return y(r),w(o._handleClick())}),M(3,"span",3),c(4,"span",4)(5,"span",5)(6,"span",6),M(7,"span",7),d(),c(8,"span",8),M(9,"span",9),d(),x(10,I7,5,0,"span",10),d()()(),c(11,"label",11),b("click",function(s){return y(r),w(s.stopPropagation())}),re(12),d()()}if(t&2){let r=be(2);p("labelPosition",o.labelPosition),u(),ne("mdc-switch--selected",o.checked)("mdc-switch--unselected",!o.checked)("mdc-switch--checked",o.checked)("mdc-switch--disabled",o.disabled)("mat-mdc-slide-toggle-disabled-interactive",o.disabledInteractive),p("tabIndex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex)("disabled",o.disabled&&!o.disabledInteractive),ee("id",o.buttonId)("name",o.name)("aria-label",o.ariaLabel)("aria-labelledby",o._getAriaLabelledBy())("aria-describedby",o.ariaDescribedby)("aria-required",o.required||null)("aria-checked",o.checked)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),u(8),p("matRippleTrigger",r)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),u(),Ce(o.hideIcon?-1:10),u(),p("for",o.buttonId),ee("id",o._labelId)}},dependencies:[so,xh],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height, 32px);border-radius:var(--mdc-switch-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width, 2px);border-color:var(--mat-switch-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width, 2px);border-color:var(--mat-switch-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-switch-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity, 0);transition:var(--mat-switch-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity, 1);transition:var(--mat-switch-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity, 1);transition:var(--mat-switch-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity, 0);transition:var(--mat-switch-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size, 16px);height:var(--mat-switch-unselected-handle-size, 16px);margin:var(--mat-switch-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size, 24px);height:var(--mat-switch-selected-handle-size, 24px);margin:var(--mat-switch-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size, 24px);height:var(--mat-switch-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size, 28px);height:var(--mat-switch-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size, 40px);height:var(--mdc-switch-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 16px);height:var(--mdc-switch-unselected-icon-size, 16px);fill:var(--mdc-switch-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 16px);height:var(--mdc-switch-selected-icon-size, 16px);fill:var(--mdc-switch-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-switch-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-switch-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-switch-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-switch-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-switch-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0})}return n})();var OA=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=X({imports:[sr,me,me]})}return n})();var A7=()=>["transport","group","bool"];function R7(n,i){n&1&&(ut(0),c(1,"uds-translate"),f(2,"Edit action for"),d(),mt())}function O7(n,i){n&1&&(c(0,"uds-translate"),f(1,"New action for"),d())}function P7(n,i){if(n&1&&(c(0,"mat-option",13),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function F7(n,i){if(n&1&&(c(0,"mat-option",13),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.description," ")}}function N7(n,i){if(n&1&&(c(0,"mat-option",13),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function L7(n,i){if(n&1){let e=k();ut(0),c(1,"mat-form-field")(2,"mat-label")(3,"uds-translate"),f(4,"Transport"),d()(),c(5,"mat-select",4),U("ngModelChange",function(o){y(e);let r=_();return W(r.paramValue,o)||(r.paramValue=o),w(o)}),c(6,"uds-cond-select-search",5),b("changed",function(o){y(e);let r=_();return w(r.transportsFilter=o)}),d(),x(7,N7,2,2,"mat-option",6),d()(),mt()}if(n&2){let e=_();u(5),z("ngModel",e.paramValue),u(),p("options",e.transports),u(),p("ngForOf",e.filtered(e.transports,e.transportsFilter))}}function V7(n,i){if(n&1&&(c(0,"mat-option",13),f(1),d()),n&2){let e=i.$implicit;p("value",e.id),u(),O(" ",e.name," ")}}function B7(n,i){if(n&1&&(c(0,"mat-option",13),f(1),d()),n&2){let e=i.$implicit,t=_(2);p("value",t.authenticator+"@"+e.id),u(),O(" ",e.name," ")}}function j7(n,i){if(n&1){let e=k();ut(0),c(1,"mat-form-field")(2,"mat-label")(3,"uds-translate"),f(4,"Authenticator"),d()(),c(5,"mat-select",9),U("ngModelChange",function(o){y(e);let r=_();return W(r.authenticator,o)||(r.authenticator=o),w(o)}),b("valueChange",function(o){y(e);let r=_();return w(r.authenticatorChangedTo(o))}),x(6,V7,2,2,"mat-option",6),d()(),c(7,"mat-form-field")(8,"mat-label")(9,"uds-translate"),f(10,"Group"),d()(),c(11,"mat-select",4),U("ngModelChange",function(o){y(e);let r=_();return W(r.paramValue,o)||(r.paramValue=o),w(o)}),c(12,"uds-cond-select-search",5),b("changed",function(o){y(e);let r=_();return w(r.groupsFilter=o)}),d(),x(13,B7,2,2,"mat-option",6),d()(),mt()}if(n&2){let e=_();u(5),z("ngModel",e.authenticator),u(),p("ngForOf",e.authenticators),u(5),z("ngModel",e.paramValue),u(),p("options",e.groups),u(),p("ngForOf",e.filtered(e.groups,e.groupsFilter))}}function z7(n,i){if(n&1){let e=k();ut(0),c(1,"div",14)(2,"span",15),f(3),d(),f(4,"\xA0 "),c(5,"mat-slide-toggle",4),U("ngModelChange",function(o){y(e);let r=_();return W(r.paramValue,o)||(r.paramValue=o),w(o)}),d()(),mt()}if(n&2){let e=_();u(3),Ge(e.parameter.description),u(2),z("ngModel",e.paramValue)}}function U7(n,i){if(n&1){let e=k();ut(0),c(1,"mat-form-field")(2,"mat-label"),f(3),d(),c(4,"input",16),U("ngModelChange",function(o){y(e);let r=_();return W(r.paramValue,o)||(r.paramValue=o),w(o)}),d()(),mt()}if(n&2){let e=_();u(3),O(" ",e.parameter.description," "),u(),p("type",e.parameter.type),z("ngModel",e.paramValue)}}var Mw=(()=>{let i=class i{constructor(t,o,r,a){this.api=t,this.rest=o,this.dialogRef=r,this.onSave=new T(!0),this.calendars=[],this.actionList=[],this.authenticators=[],this.transports=[],this.groups=[],this.paramsDict={},this.calendarsFilter="",this.groupsFilter="",this.transportsFilter="",this.authenticator="",this.parameter={},this.paramValue="",this.servicePool=a.servicePool,this.scheduledAction={id:void 0,action:"",calendar:"",calendar_id:"",at_start:!0,events_offset:0,params:{}},a.scheduledAction!==void 0&&(this.scheduledAction.id=a.scheduledAction.id)}static launch(t,o,r){let a=window.innerWidth<800?"80%":"60%";return t.gui.dialog.open(i,{width:a,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:o,scheduledAction:r},disableClose:!1}).componentInstance.onSave}ngOnInit(){this.rest.authenticators.summary().then(t=>this.authenticators=t),this.rest.transports.summary().then(t=>this.transports=t),this.rest.calendars.summary().then(t=>this.calendars=t),this.rest.servicesPools.actionsList(this.servicePool.id).then(t=>{this.actionList=t,this.actionList.forEach(o=>{this.paramsDict[o.id]=o.params[0]}),this.scheduledAction.id!==void 0&&this.rest.servicesPools.detail(this.servicePool.id,"actions").get(this.scheduledAction.id).then(o=>{this.scheduledAction=o,this.actionChangedTo(this.scheduledAction.action)})})}filtered(t,o){return o?t.filter(r=>r.name.toLocaleLowerCase().includes(o.toLocaleLowerCase())):t}actionChangedTo(t){if(this.parameter=this.paramsDict[t],this.parameter!==void 0&&(this.paramValue=this.scheduledAction.params[this.parameter.name],this.paramValue===void 0&&(this.parameter.default!==!1?this.paramValue=this.parameter.default||"":this.paramValue=!1),this.parameter.type==="group")){let o=this.paramValue.split("@");o.length!==2&&(o=["",""]),this.authenticator=o[0],this.authenticatorChangedTo(this.authenticator)}}authenticatorChangedTo(t){return H(this,null,function*(){t&&(this.groups=yield this.rest.authenticators.detail(t,"groups").summary())})}save(){return H(this,null,function*(){this.scheduledAction.params={},this.parameter&&(this.scheduledAction.params[this.parameter.name]=this.paramValue),yield this.rest.servicesPools.detail(this.servicePool.id,"actions").save(this.scheduledAction),this.dialogRef.close(),this.onSave.emit(!0)})}};i.\u0275fac=function(o){return new(o||i)(C(B),C(Z),C(Ne),C(Ke))},i.\u0275cmp=E({type:i,selectors:[["uds-service-pools-scheduled-action"]],standalone:!1,decls:40,vars:15,consts:[["editTitle",""],["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[1,"content"],[3,"ngModelChange","ngModel"],[3,"changed","options"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number",3,"ngModelChange","ngModel"],[1,"toggle"],[3,"ngModelChange","valueChange","ngModel"],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[1,"mat-form-field-infix"],[1,"label"],["matInput","",3,"ngModelChange","type","ngModel"]],template:function(o,r){if(o&1){let a=k();c(0,"h4",1),x(1,R7,3,0,"ng-container",2)(2,O7,2,0,"ng-template",null,0,gn),f(4),d(),c(5,"mat-dialog-content")(6,"div",3)(7,"mat-form-field")(8,"mat-label")(9,"uds-translate"),f(10,"Calendar"),d()(),c(11,"mat-select",4),U("ngModelChange",function(l){return y(a),W(r.scheduledAction.calendar_id,l)||(r.scheduledAction.calendar_id=l),w(l)}),c(12,"uds-cond-select-search",5),b("changed",function(l){return y(a),w(r.calendarsFilter=l)}),d(),x(13,P7,2,2,"mat-option",6),d()(),c(14,"mat-form-field")(15,"mat-label")(16,"uds-translate"),f(17,"Events offset (minutes)"),d()(),c(18,"input",7),U("ngModelChange",function(l){return y(a),W(r.scheduledAction.events_offset,l)||(r.scheduledAction.events_offset=l),w(l)}),d()(),c(19,"div",8)(20,"mat-slide-toggle",4),U("ngModelChange",function(l){return y(a),W(r.scheduledAction.at_start,l)||(r.scheduledAction.at_start=l),w(l)}),c(21,"uds-translate"),f(22,"At the beginning of the interval?"),d()()(),c(23,"mat-form-field")(24,"mat-label")(25,"uds-translate"),f(26,"Action"),d()(),c(27,"mat-select",9),U("ngModelChange",function(l){return y(a),W(r.scheduledAction.action,l)||(r.scheduledAction.action=l),w(l)}),b("valueChange",function(l){return y(a),w(r.actionChangedTo(l))}),x(28,F7,2,2,"mat-option",6),d()(),x(29,L7,8,3,"ng-container",10)(30,j7,14,5,"ng-container",10)(31,z7,6,2,"ng-container",10)(32,U7,5,3,"ng-container",10),d()(),c(33,"mat-dialog-actions")(34,"button",11)(35,"uds-translate"),f(36,"Cancel"),d()(),c(37,"button",12),b("click",function(){return y(a),w(r.save())}),c(38,"uds-translate"),f(39,"Ok"),d()()()}if(o&2){let a=be(3);u(),p("ngIf",r.scheduledAction.id!==void 0)("ngIfElse",a),u(3),O(" ",r.servicePool.name,` diff --git a/server/src/uds/templates/uds/admin/index.html b/server/src/uds/templates/uds/admin/index.html index 98350e3e9..e3fda8cb1 100644 --- a/server/src/uds/templates/uds/admin/index.html +++ b/server/src/uds/templates/uds/admin/index.html @@ -102,6 +102,6 @@ - +