]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/dist/en-US/437.7720eaff4a1def1b.js
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / dist / en-US / 437.7720eaff4a1def1b.js
diff --git a/ceph/src/pybind/mgr/dashboard/frontend/dist/en-US/437.7720eaff4a1def1b.js b/ceph/src/pybind/mgr/dashboard/frontend/dist/en-US/437.7720eaff4a1def1b.js
deleted file mode 100644 (file)
index 0b670d1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkceph_dashboard=self.webpackChunkceph_dashboard||[]).push([[437],{34437:(ki,Ze,l)=>{l.r(Ze),l.d(Ze,{RgwModule:()=>u_,RoutedRgwModule:()=>wi});var M=l(11048),a=l(1659),H=l(55860),A=l(71334),we=l(37496),G=l(79512),$_=l(44466),U_=l(66265),I_=l(23815),R=l.n(I_),te=l(35758),Ne=l(95152),ke=l(33394),qe=l(64762),Be=l(19725),Fe=l(25917),He=l(19773),v_=l(96736),F_=l(5304),be=l(20523),h_=l(93523),e=l(89724);let D=class{constructor(o,_){this.http=o,this.rgwDaemonService=_,this.url="api/rgw/user"}list(){return this.enumerate().pipe((0,He.zg)(o=>o.length>0?(0,te.D)(o.map(_=>this.get(_))):(0,Fe.of)([])))}enumerate(){return this.rgwDaemonService.request(o=>this.http.get(this.url,{params:o}))}enumerateEmail(){return this.rgwDaemonService.request(o=>this.http.get(`${this.url}/get_emails`,{params:o}))}get(o){return this.rgwDaemonService.request(_=>this.http.get(`${this.url}/${o}`,{params:_}))}getQuota(o){return this.rgwDaemonService.request(_=>this.http.get(`${this.url}/${o}/quota`,{params:_}))}create(o){return this.rgwDaemonService.request(_=>(R().keys(o).forEach(n=>{_=_.append(n,o[n])}),this.http.post(this.url,null,{params:_})))}update(o,_){return this.rgwDaemonService.request(n=>(R().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.put(`${this.url}/${o}`,null,{params:n})))}updateQuota(o,_){return this.rgwDaemonService.request(n=>(R().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.put(`${this.url}/${o}/quota`,null,{params:n})))}delete(o){return this.rgwDaemonService.request(_=>this.http.delete(`${this.url}/${o}`,{params:_}))}createSubuser(o,_){return this.rgwDaemonService.request(n=>(R().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.post(`${this.url}/${o}/subuser`,null,{params:n})))}deleteSubuser(o,_){return this.rgwDaemonService.request(n=>this.http.delete(`${this.url}/${o}/subuser/${_}`,{params:n}))}addCapability(o,_,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",_)).append("perm",n),this.http.post(`${this.url}/${o}/capability`,null,{params:i})))}deleteCapability(o,_,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",_)).append("perm",n),this.http.delete(`${this.url}/${o}/capability`,{params:i})))}addS3Key(o,_){return this.rgwDaemonService.request(n=>(n=n.append("key_type","s3"),R().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.post(`${this.url}/${o}/key`,null,{params:n})))}deleteS3Key(o,_){return this.rgwDaemonService.request(n=>(n=(n=n.append("key_type","s3")).append("access_key",_),this.http.delete(`${this.url}/${o}/key`,{params:n})))}exists(o){return this.get(o).pipe((0,v_.h)(!0),(0,F_.K)(_=>(R().isFunction(_.preventDefault)&&_.preventDefault(),(0,Fe.of)(!1))))}emailExists(o){return o=decodeURIComponent(o),this.enumerateEmail().pipe((0,He.zg)(_=>{const n=R().indexOf(_,o);return(0,Fe.of)(-1!==n)}))}};D.\u0275fac=function(o){return new(o||D)(e.LFG(Be.eN),e.LFG(be.b))},D.\u0275prov=e.Yz7({token:D,factory:D.\u0275fac,providedIn:"root"}),D=(0,qe.gn)([h_.o,(0,qe.w6)("design:paramtypes",[Be.eN,be.b])],D);var w=l(65862),ne=l(18001),Xe=l(93614),p=l(90070),he=l(97161);class We{constructor(){this.kmsProviders=["vault"],this.authMethods=["token","agent"],this.secretEngines=["kv","transit"],this.sse_s3="AES256",this.sse_kms="aws:kms"}}var z=(()=>{return(t=z||(z={})).ENABLED="Enabled",t.DISABLED="Disabled",z;var t})(),Q=(()=>{return(t=Q||(Q={})).ENABLED="Enabled",t.SUSPENDED="Suspended",Q;var t})(),Y=l(62862),oe=l(60312),J=l(41582),X=l(56310),k=l(87925),K=l(94276),Ke=l(18372),V=l(30839);function L_(t,o){1&t&&(e.TgZ(0,"option",29),e.SDv(1,30),e.qZA()),2&t&&e.Q6J("ngValue",null)}function y_(t,o){if(1&t&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function D_(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,33),e.qZA())}function x_(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",22),e.SDv(3,23),e.qZA(),e.TgZ(4,"div",24)(5,"select",25),e.YNc(6,L_,2,1,"option",26),e.YNc(7,y_,2,2,"option",27),e.qZA(),e.YNc(8,D_,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(6),e.Q6J("ngIf",null!==_.kmsProviders),e.xp6(1),e.Q6J("ngForOf",_.kmsProviders),e.xp6(1),e.Q6J("ngIf",_.configForm.showError("kms_provider",n,"required"))}}function Z_(t,o){1&t&&(e.TgZ(0,"option",29),e.SDv(1,37),e.qZA()),2&t&&e.Q6J("ngValue",null)}function w_(t,o){if(1&t&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function k_(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,38),e.qZA())}function q_(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",34),e.SDv(3,35),e.qZA(),e.TgZ(4,"div",24)(5,"select",36),e.YNc(6,Z_,2,1,"option",26),e.YNc(7,w_,2,2,"option",27),e.qZA(),e.YNc(8,k_,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(6),e.Q6J("ngIf",null!==_.authMethods),e.xp6(1),e.Q6J("ngForOf",_.authMethods),e.xp6(1),e.Q6J("ngIf",_.configForm.showError("auth_method",n,"required"))}}function B_(t,o){1&t&&(e.TgZ(0,"option",29),e.SDv(1,42),e.qZA()),2&t&&e.Q6J("ngValue",null)}function H_(t,o){if(1&t&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function X_(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,43),e.qZA())}function K_(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",39),e.SDv(3,40),e.qZA(),e.TgZ(4,"div",24)(5,"select",41),e.YNc(6,B_,2,1,"option",26),e.YNc(7,H_,2,2,"option",27),e.qZA(),e.YNc(8,X_,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(6),e.Q6J("ngIf",null!==_.secretEngines),e.xp6(1),e.Q6J("ngForOf",_.secretEngines),e.xp6(1),e.Q6J("ngIf",_.configForm.showError("secret_engine",n,"required"))}}function z_(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,47),e.qZA())}function Q_(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",44),e.SDv(3,45),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",46),e.YNc(6,z_,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(6),e.Q6J("ngIf",_.configForm.showError("secret_path",n,"required"))}}function Y_(t,o){1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",48),e.SDv(3,49),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",50),e.qZA()()())}function J_(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,54),e.qZA())}function V_(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",51),e.SDv(3,52),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",53),e.YNc(6,J_,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(6),e.Q6J("ngIf",_.configForm.showError("address",n,"required"))}}function j_(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,58),e.qZA())}function et(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",7)(1,"label",55)(2,"span"),e.SDv(3,56),e.qZA()(),e.TgZ(4,"div",24)(5,"input",57),e.NdJ("change",function(i){return e.CHM(_),e.oxw().fileUpload(i.target.files,"token")}),e.qZA(),e.YNc(6,j_,2,0,"span",28),e.qZA()()}if(2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(6),e.Q6J("ngIf",_.configForm.showError("token",n,"required"))}}function _t(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,63),e.qZA())}function tt(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",59)(3,"span"),e.SDv(4,60),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,61),e.qZA()(),e.TgZ(7,"div",24)(8,"input",62),e.NdJ("change",function(i){return e.CHM(_),e.oxw().fileUpload(i.target.files,"ssl_cert")}),e.qZA(),e.YNc(9,_t,2,0,"span",28),e.qZA()()()}if(2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(9),e.Q6J("ngIf",_.configForm.showError("ssl_cert",n,"required"))}}function nt(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,68),e.qZA())}function ot(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",64)(3,"span"),e.SDv(4,65),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,66),e.qZA()(),e.TgZ(7,"div",24)(8,"input",67),e.NdJ("change",function(i){return e.CHM(_),e.oxw().fileUpload(i.target.files,"client_cert")}),e.qZA(),e.YNc(9,nt,2,0,"span",28),e.qZA()()()}if(2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(9),e.Q6J("ngIf",_.configForm.showError("client_cert",n,"required"))}}function it(t,o){1&t&&(e.TgZ(0,"span",32),e.SDv(1,73),e.qZA())}function st(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",69)(3,"span"),e.SDv(4,70),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,71),e.qZA()(),e.TgZ(7,"div",24)(8,"input",72),e.NdJ("change",function(i){return e.CHM(_),e.oxw().fileUpload(i.target.files,"client_key")}),e.qZA(),e.YNc(9,it,2,0,"span",28),e.qZA()()()}if(2&t){const _=e.oxw(),n=e.MAs(5);e.xp6(9),e.Q6J("ngIf",_.configForm.showError("client_key",n,"required"))}}let at=(()=>{class t{constructor(_,n,i,s,r,d,g){this.formBuilder=_,this.activeModal=n,this.router=i,this.actionLabels=s,this.rgwBucketService=r,this.rgwEncryptionModal=d,this.notificationService=g,this.vaultAddress=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{4}$/,this.submitAction=new e.vpe,this.createForm()}ngOnInit(){this.kmsProviders=this.rgwEncryptionModal.kmsProviders,this.authMethods=this.rgwEncryptionModal.authMethods,this.secretEngines=this.rgwEncryptionModal.secretEngines}createForm(){this.configForm=this.formBuilder.group({address:[null,[a.kI.required,p.h.custom("vaultPattern",_=>!R().isEmpty(_)&&!this.vaultAddress.test(_))]],kms_provider:["vault",a.kI.required],encryptionType:["aws:kms",a.kI.required],auth_method:[null,a.kI.required],secret_engine:[null,a.kI.required],secret_path:["/"],namespace:[null],token:[null,[p.h.requiredIf({auth_method:"token"})]],ssl_cert:[null,p.h.sslCert()],client_cert:[null,p.h.pemCert()],client_key:[null,p.h.sslPrivKey()],kmsEnabled:[{value:!1}],s3Enabled:[{value:!1}]})}fileUpload(_,n){const i=_[0];(new FileReader).addEventListener("load",()=>{const r=this.configForm.get(n);r.setValue(i),r.markAsDirty(),r.markAsTouched(),r.updateValueAndValidity()})}onSubmit(){const _=this.configForm.value;this.rgwBucketService.setEncryptionConfig(_.encryptionType,_.kms_provider,_.auth_method,_.secret_engine,_.secret_path,_.namespace,_.address,_.token,_.owner,_.ssl_cert,_.client_cert,_.client_key).subscribe({next:()=>{this.notificationService.show(ne.k.success,"Updated RGW Encryption Configuration values")},error:n=>{this.notificationService.show(ne.k.error,n),this.configForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate([this.router.url])}})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Y.O),e.Y36(A.Kz),e.Y36(H.F0),e.Y36(G.p4),e.Y36(Ne.o),e.Y36(We),e.Y36(he.g))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-config-modal"]],outputs:{submitAction:"submitAction"},features:[e._Bn([We])],decls:30,vars:14,consts:function(){let o,_,n,i,s,r,d,g,E,S,P,O,N,b,m,W,$,U,I,v,F,h,L,y,f,x,T,q,B;return o="Update RGW Encryption Configurations",_="Encryption Type",n="SSE-S3 Encryption",i="SSE-KMS Encryption",s="Key management service provider",r="-- Select a provider --",d="This field is required.",g="Authentication Method",E="-- Select a method --",S="This field is required.",P="Secret Engine",O="-- Select a method --",N="This field is required.",b="Secret Path ",m="This field is required.",W="Namespace ",$="Vault Address ",U="This field is required.",I="Token",v="This field is required.",F="CA Certificate",h="The SSL certificate in PEM format.",L="This field is required.",y="Client Certificate",f="The Client certificate in PEM format.",x="This field is required.",T="Client Private Key",q="The Client Private Key in PEM format.",B="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["name","configForm",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","encryptionType",1,"cd-col-form-label","required"],_,[1,"col-md-auto","custom-checkbox","form-check-inline","ms-3"],["formControlName","encryptionType","id","s3Enabled","type","radio","name","encryptionType","value","AES256",1,"form-check-input"],["for","s3Enabled",1,"custom-check-label"],n,[1,"col-md-auto","custom-checkbox","form-check-inline"],["formControlName","encryptionType","id","kmsEnabled","name","encryptionType","value","aws:kms","type","radio",1,"form-check-input"],["for","kmsEnabled",1,"custom-check-label"],i,[4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],["for","kms_provider",1,"cd-col-form-label","required"],s,[1,"cd-col-form-input"],["id","kms_provider","name","kms_provider","formControlName","kms_provider",1,"form-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[3,"ngValue"],r,[3,"value"],[1,"invalid-feedback"],d,["for","auth_method",1,"cd-col-form-label","required"],g,["id","auth_method","name","auth_method","formControlName","auth_method",1,"form-select"],E,S,["for","secret_engine",1,"cd-col-form-label","required"],P,["id","secret_engine","name","secret_engine","formControlName","secret_engine",1,"form-select"],O,N,["for","secret_path",1,"cd-col-form-label"],b,["id","secret_path","name","secret_path","type","text","formControlName","secret_path",1,"form-control"],m,["for","namespace",1,"cd-col-form-label"],W,["id","namespace","name","namespace","type","text","formControlName","namespace",1,"form-control"],["for","address",1,"cd-col-form-label","required"],$,["id","address","name","address","formControlName","address",1,"form-control"],U,["for","token",1,"cd-col-form-label","required"],I,["type","file","formControlName","token",3,"change"],v,["for","ssl_cert",1,"cd-col-form-label"],F,h,["type","file","formControlName","ssl_cert",3,"change"],L,["for","client_cert",1,"cd-col-form-label"],y,f,["type","file","formControlName","client_cert",3,"change"],x,["for","client_key",1,"cd-col-form-label"],T,q,["type","file",3,"change"],B]},template:function(_,n){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5)(6,"div",6)(7,"div",7)(8,"label",8),e.SDv(9,9),e.qZA(),e.TgZ(10,"div",10),e._UZ(11,"input",11),e.TgZ(12,"label",12),e.SDv(13,13),e.qZA()(),e.TgZ(14,"div",14),e._UZ(15,"input",15),e.TgZ(16,"label",16),e.SDv(17,17),e.qZA()()(),e.YNc(18,x_,9,3,"div",18),e.YNc(19,q_,9,3,"div",18),e.YNc(20,K_,9,3,"div",18),e.YNc(21,Q_,7,1,"div",18),e.YNc(22,Y_,6,0,"div",18),e.YNc(23,V_,7,1,"div",18),e.YNc(24,et,7,1,"div",19),e.YNc(25,tt,10,1,"div",18),e.YNc(26,ot,10,1,"div",18),e.YNc(27,st,10,1,"div",18),e.qZA(),e.TgZ(28,"div",20)(29,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.qZA()()(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",n.activeModal),e.xp6(4),e.Q6J("formGroup",n.configForm),e.xp6(14),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","token"===n.configForm.getValue("auth_method")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===n.configForm.getValue("encryptionType")||"AES256"===n.configForm.getValue("encryptionType")),e.xp6(2),e.Q6J("submitText",n.actionLabels.SUBMIT)("form",n.configForm))},directives:[oe.z,a._Y,a.JL,J.V,a.sg,X.P,k.o,a.Fj,a._,K.b,a.JJ,a.u,M.O5,a.EJ,a.YN,a.Kr,M.sg,Ke.S,V.p],styles:[""]}),t})();var ie=l(63285),ze=l(63622),se=l(82945),j=l(10545);function rt(t,o){1&t&&(e.TgZ(0,"div",9)(1,"label",41),e.SDv(2,42),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",43),e.qZA()())}function lt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,45),e.qZA())}function ct(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,46),e.qZA())}function dt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,47),e.qZA())}function ut(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,48),e.qZA())}function Rt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,49),e.qZA())}function Et(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,50),e.qZA())}function gt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,51),e.qZA())}function ft(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,52),e.qZA())}function St(t,o){1&t&&(e.TgZ(0,"option",53),e.SDv(1,54),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Tt(t,o){1&t&&(e.TgZ(0,"option",53),e.SDv(1,55),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Ct(t,o){if(1&t&&(e.TgZ(0,"option",56),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function Mt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,57),e.qZA())}function pt(t,o){1&t&&(e.TgZ(0,"option",53),e.SDv(1,59),e.qZA()),2&t&&e.Q6J("ngValue",null)}function mt(t,o){1&t&&(e.TgZ(0,"option",53),e.SDv(1,60),e.qZA()),2&t&&e.Q6J("ngValue",null)}function At(t,o){if(1&t&&(e.TgZ(0,"option",56),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_.name),e.xp6(1),e.Oqu(_.description)}}function Gt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,61),e.qZA())}function Pt(t,o){if(1&t&&(e.TgZ(0,"select",58),e.YNc(1,pt,2,1,"option",18),e.YNc(2,mt,2,1,"option",18),e.YNc(3,At,2,2,"option",19),e.qZA(),e.YNc(4,Gt,2,0,"span",14)),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(1),e.Q6J("ngIf",null===n.placementTargets),e.xp6(1),e.Q6J("ngIf",null!==n.placementTargets),e.xp6(1),e.Q6J("ngForOf",n.placementTargets),e.xp6(1),e.Q6J("ngIf",n.bucketForm.showError("placement-target",_,"required"))}}function Ot(t,o){1&t&&(e.ynx(0),e._UZ(1,"input",62),e.BQk())}function Nt(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend",25),e.SDv(2,63),e.qZA(),e.TgZ(3,"div",9)(4,"div",27)(5,"div",28)(6,"input",64),e.NdJ("change",function(){return e.CHM(_),e.oxw(2).setMfaDeleteValidators()}),e.qZA(),e.TgZ(7,"label",65),e.SDv(8,66),e.qZA(),e.TgZ(9,"cd-helper")(10,"span"),e.SDv(11,67),e.qZA()()()()()()}}function bt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,76),e.qZA())}function Wt(t,o){if(1&t&&(e.TgZ(0,"div",9)(1,"label",73),e.SDv(2,74),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",75),e.YNc(5,bt,2,0,"span",14),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.bucketForm.showError("mfa-token-serial",_,"required"))}}function $t(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,80),e.qZA())}function Ut(t,o){if(1&t&&(e.TgZ(0,"div",9)(1,"label",77),e.SDv(2,78),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",79),e.YNc(5,$t,2,0,"span",14),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.bucketForm.showError("mfa-token-pin",_,"required"))}}function It(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend",25),e.SDv(2,68),e.qZA(),e.TgZ(3,"div",9)(4,"div",27)(5,"div",28)(6,"input",69),e.NdJ("change",function(){return e.CHM(_),e.oxw(2).setMfaDeleteValidators()}),e.qZA(),e.TgZ(7,"label",70),e.SDv(8,71),e.qZA(),e.TgZ(9,"cd-helper")(10,"span"),e.SDv(11,72),e.qZA()()()()(),e.YNc(12,Wt,6,1,"div",8),e.YNc(13,Ut,6,1,"div",8),e.qZA()}if(2&t){const _=e.oxw(2);e.xp6(12),e.Q6J("ngIf",_.areMfaCredentialsRequired()),e.xp6(1),e.Q6J("ngIf",_.areMfaCredentialsRequired())}}function vt(t,o){1&t&&(e.TgZ(0,"div",9)(1,"label",81),e.SDv(2,82),e.qZA(),e.TgZ(3,"div",12)(4,"select",83)(5,"option",84),e.SDv(6,85),e.qZA(),e.TgZ(7,"option",86),e.SDv(8,87),e.qZA()()()())}function Ft(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,92),e.qZA())}function ht(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,93),e.qZA())}function Lt(t,o){if(1&t&&(e.TgZ(0,"div",9)(1,"label",88),e.ynx(2),e.SDv(3,89),e.BQk(),e.TgZ(4,"cd-helper"),e.SDv(5,90),e.qZA()(),e.TgZ(6,"div",12),e._UZ(7,"input",91),e.YNc(8,Ft,2,0,"span",14),e.YNc(9,ht,2,0,"span",14),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(8),e.Q6J("ngIf",n.bucketForm.showError("lock_retention_period_days",_,"pattern")),e.xp6(1),e.Q6J("ngIf",n.bucketForm.showError("lock_retention_period_days",_,"lockDays"))}}function yt(t,o){1&t&&(e.TgZ(0,"option",53),e.SDv(1,104),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Dt(t,o){if(1&t&&(e.TgZ(0,"option",56),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function xt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,105),e.qZA())}function Zt(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",9)(2,"label",101),e.SDv(3,102),e.qZA(),e.TgZ(4,"div",12)(5,"select",103),e.YNc(6,yt,2,1,"option",18),e.YNc(7,Dt,2,2,"option",19),e.qZA(),e.YNc(8,xt,2,0,"span",14),e.qZA()()()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("autofocus",n.editing),e.xp6(1),e.Q6J("ngIf",null!==n.kmsProviders),e.xp6(1),e.Q6J("ngForOf",n.kmsProviders),e.xp6(1),e.Q6J("ngIf",n.bucketForm.showError("kms_provider",_,"required"))}}function wt(t,o){1&t&&(e.TgZ(0,"span",44),e.SDv(1,109),e.qZA())}function kt(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",9)(2,"label",106),e.SDv(3,107),e.qZA(),e.TgZ(4,"div",12),e._UZ(5,"input",108),e.YNc(6,wt,2,0,"span",14),e.qZA()()()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(6),e.Q6J("ngIf",n.bucketForm.showError("keyId",_,"required"))}}function qt(t,o){if(1&t&&(e.TgZ(0,"div")(1,"div",9)(2,"div",27)(3,"div",94),e._UZ(4,"input",95),e.TgZ(5,"label",96),e.SDv(6,97),e.qZA()()()(),e.TgZ(7,"div",9)(8,"div",27)(9,"div",94),e._UZ(10,"input",98),e.TgZ(11,"label",99),e.SDv(12,100),e.qZA()()()(),e.YNc(13,Zt,9,4,"div",24),e.YNc(14,kt,7,1,"div",24),e.qZA()),2&t){const _=e.oxw(2);e.xp6(4),e.uIk("disabled",!_.s3VaultConfig||null),e.xp6(6),e.uIk("disabled",!_.kmsVaultConfig||null),e.xp6(3),e.Q6J("ngIf","aws:kms"===_.bucketForm.getValue("encryption_type")),e.xp6(1),e.Q6J("ngIf","aws:kms"===_.bucketForm.getValue("encryption_type"))}}const Qe=function(t){return{required:t}};function Bt(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",1)(1,"form",2,3)(3,"div",4)(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7),e.YNc(9,rt,5,0,"div",8),e.TgZ(10,"div",9)(11,"label",10),e.SDv(12,11),e.qZA(),e.TgZ(13,"div",12),e._UZ(14,"input",13),e.YNc(15,lt,2,0,"span",14),e.YNc(16,ct,2,0,"span",14),e.YNc(17,dt,2,0,"span",14),e.YNc(18,ut,2,0,"span",14),e.YNc(19,Rt,2,0,"span",14),e.YNc(20,Et,2,0,"span",14),e.YNc(21,gt,2,0,"span",14),e.YNc(22,ft,2,0,"span",14),e.qZA()(),e.TgZ(23,"div",9)(24,"label",15),e.SDv(25,16),e.qZA(),e.TgZ(26,"div",12)(27,"select",17),e.YNc(28,St,2,1,"option",18),e.YNc(29,Tt,2,1,"option",18),e.YNc(30,Ct,2,2,"option",19),e.qZA(),e.YNc(31,Mt,2,0,"span",14),e.qZA()(),e.TgZ(32,"div",9)(33,"label",20),e.SDv(34,21),e.qZA(),e.TgZ(35,"div",12),e.YNc(36,Pt,5,4,"ng-template",null,22,e.W1O),e.YNc(38,Ot,2,0,"ng-container",23),e.qZA()(),e.YNc(39,Nt,12,0,"fieldset",24),e.YNc(40,It,14,2,"fieldset",24),e.TgZ(41,"fieldset")(42,"legend",25),e.SDv(43,26),e.qZA(),e.TgZ(44,"div",9)(45,"div",27)(46,"div",28),e._UZ(47,"input",29),e.TgZ(48,"label",30),e.SDv(49,31),e.qZA(),e.TgZ(50,"cd-helper")(51,"span"),e.SDv(52,32),e.qZA()()()()(),e.YNc(53,vt,9,0,"div",8),e.YNc(54,Lt,10,2,"div",8),e.qZA(),e.TgZ(55,"fieldset")(56,"legend",25),e.SDv(57,33),e.qZA(),e.TgZ(58,"div",9)(59,"div",27)(60,"div",28),e._UZ(61,"input",34),e.TgZ(62,"label",35),e.SDv(63,36),e.qZA(),e.TgZ(64,"cd-helper")(65,"span"),e.tHW(66,37),e.TgZ(67,"a",38),e.NdJ("click",function(){return e.CHM(_),e.oxw().openConfigModal()}),e.qZA(),e.N_p(),e.qZA()()()()(),e.YNc(68,qt,15,4,"div",24),e.qZA()(),e.TgZ(69,"div",39)(70,"cd-form-button-panel",40),e.NdJ("submitActionEvent",function(){return e.CHM(_),e.oxw().submit()}),e.ALo(71,"titlecase"),e.ALo(72,"upperFirst"),e.qZA()()()()()}if(2&t){const _=e.MAs(2),n=e.MAs(37),i=e.oxw();e.xp6(1),e.Q6J("formGroup",i.bucketForm),e.xp6(6),e.pQV(e.lcZ(6,31,i.action))(e.lcZ(7,33,i.resource)),e.QtT(5),e.xp6(2),e.Q6J("ngIf",i.editing),e.xp6(2),e.Q6J("ngClass",e.VKq(39,Qe,!i.editing)),e.xp6(3),e.Q6J("readonly",i.editing)("autofocus",!i.editing),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"required")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"bucketNameInvalid")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"bucketNameNotAllowed")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"containsUpperCase")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"lowerCaseOrNumber")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"ipAddress")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"onlyLowerCaseAndNumbers")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"shouldBeInRange")),e.xp6(5),e.Q6J("autofocus",i.editing),e.xp6(1),e.Q6J("ngIf",null===i.owners),e.xp6(1),e.Q6J("ngIf",null!==i.owners),e.xp6(1),e.Q6J("ngForOf",i.owners),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("owner",_,"required")),e.xp6(2),e.Q6J("ngClass",e.VKq(41,Qe,!i.editing)),e.xp6(5),e.Q6J("ngIf",i.editing)("ngIfElse",n),e.xp6(1),e.Q6J("ngIf",i.editing),e.xp6(1),e.Q6J("ngIf",i.editing),e.xp6(13),e.Q6J("ngIf",i.bucketForm.getValue("lock_enabled")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.getValue("lock_enabled")),e.xp6(7),e.uIk("disabled",!i.kmsVaultConfig&&!i.s3VaultConfig||null),e.xp6(7),e.Q6J("ngIf",i.bucketForm.getValue("encryption_enabled")),e.xp6(2),e.Q6J("form",i.bucketForm)("submitText",e.lcZ(71,35,i.action)+" "+e.lcZ(72,37,i.resource))}}let Ye=(()=>{class t extends Xe.E{constructor(_,n,i,s,r,d,g,E,S,P,O){super(),this.route=_,this.router=n,this.formBuilder=i,this.rgwBucketService=s,this.rgwSiteService=r,this.modalService=d,this.rgwUserService=g,this.notificationService=E,this.rgwEncryptionModal=S,this.actionLabels=P,this.changeDetectorRef=O,this.editing=!1,this.owners=null,this.kmsProviders=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=w.P,this.kmsVaultConfig=!1,this.s3VaultConfig=!1,this.editing=this.router.url.startsWith(`/rgw/bucket/${G.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="bucket",this.createForm()}get isVersioningEnabled(){return this.bucketForm.getValue("versioning")}get isMfaDeleteEnabled(){return this.bucketForm.getValue("mfa-delete")}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}createForm(){const _=this,n=p.h.custom("lockDays",()=>{if(!_.bucketForm||!R().get(_.bucketForm.getRawValue(),"lock_enabled"))return!1;const i=Number(_.bucketForm.getValue("lock_retention_period_days"));return!Number.isInteger(i)||0===i});this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[a.kI.required],this.editing?[]:[p.h.bucketName(),p.h.bucketExistence(!1,this.rgwBucketService)]],owner:[null,[a.kI.required]],kms_provider:["vault"],"placement-target":[null,this.editing?[]:[a.kI.required]],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],encryption_enabled:[null],encryption_type:[null,[p.h.requiredIf({encryption_enabled:!0})]],keyId:[null,[p.h.requiredIf({encryption_type:"aws:kms",encryption_enabled:!0})]],lock_mode:["COMPLIANCE"],lock_retention_period_days:[0,[p.h.number(!1),n]]})}ngOnInit(){const _={owners:this.rgwUserService.enumerate()};this.kmsProviders=this.rgwEncryptionModal.kmsProviders,this.rgwBucketService.getEncryptionConfig().subscribe(n=>{this.kmsVaultConfig=n[0],this.s3VaultConfig=n[1],this.kmsVaultConfig&&this.s3VaultConfig?this.bucketForm.get("encryption_type").setValue(""):this.kmsVaultConfig?this.bucketForm.get("encryption_type").setValue("aws:kms"):this.s3VaultConfig?this.bucketForm.get("encryption_type").setValue("AES256"):this.bucketForm.get("encryption_type").setValue("")}),this.editing||(_.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(n=>{if(n.hasOwnProperty("bid")){const i=decodeURIComponent(n.bid);_.getBid=this.rgwBucketService.get(i)}(0,te.D)(_).subscribe(i=>{if(this.owners=i.owners.sort(),i.getPlacementTargets){const s=i.getPlacementTargets;this.zonegroup=s.zonegroup,R().forEach(s.placement_targets,r=>{r.description=`${r.name} (${"pool"}: ${r.data_pool})`,this.placementTargets.push(r)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(i.getBid){const s=i.getBid,r=R().clone(this.bucketForm.getRawValue());let d=R().pick(s,R().keys(r));d.lock_retention_period_days=this.rgwBucketService.getLockDays(s),d["placement-target"]=s.placement_rule,d.versioning=s.versioning===Q.ENABLED,d["mfa-delete"]=s.mfa_delete===z.ENABLED,d.encryption_enabled="Enabled"===s.encryption,d=R().merge(r,d),this.bucketForm.setValue(d),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators(),d.lock_enabled&&this.bucketForm.controls.versioning.disable())}this.loadingReady()})})}goToListView(){this.router.navigate(["/rgw/bucket"])}submit(){if(null==this.bucketForm.getValue("encryption_enabled")&&(this.bucketForm.get("encryption_enabled").setValue(!1),this.bucketForm.get("encryption_type").setValue(null)),this.bucketForm.pristine)return void this.goToListView();const _=this.bucketForm.value;if(this.editing){const n=this.getVersioningStatus(),i=this.getMfaDeleteStatus();this.rgwBucketService.update(_.bid,_.id,_.owner,n,_.encryption_enabled,_.encryption_type,_.keyId,i,_["mfa-token-serial"],_["mfa-token-pin"],_.lock_mode,_.lock_retention_period_days).subscribe(()=>{this.notificationService.show(ne.k.success,"Updated Object Gateway bucket '" + _.bid + "'."),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(_.bid,_.owner,this.zonegroup,_["placement-target"],_.lock_enabled,_.lock_mode,_.lock_retention_period_days,_.encryption_enabled,_.encryption_type,_.keyId).subscribe(()=>{this.notificationService.show(ne.k.success,"Created Object Gateway bucket '" + _.bid + "'"),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const _=this.bucketForm.get("mfa-token-serial"),n=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(_.setValidators(a.kI.required),n.setValidators(a.kI.required)):(_.setValidators(null),n.setValidators(null)),_.updateValueAndValidity(),n.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?Q.ENABLED:Q.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?z.ENABLED:z.DISABLED}fileUpload(_,n){const i=_[0];(new FileReader).addEventListener("load",()=>{const r=this.bucketForm.get(n);r.setValue(i),r.markAsDirty(),r.markAsTouched(),r.updateValueAndValidity()})}openConfigModal(){this.modalService.show(at,null,{size:"lg"}).componentInstance.configForm.get("encryptionType").setValue(this.bucketForm.getValue("encryption_type"))}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(H.gz),e.Y36(H.F0),e.Y36(Y.O),e.Y36(Ne.o),e.Y36(ke.I),e.Y36(ie.Z),e.Y36(D),e.Y36(he.g),e.Y36(We),e.Y36(G.p4),e.Y36(e.sBO))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-form"]],features:[e._Bn([We]),e.qOj],decls:1,vars:1,consts:function(){let o,_,n,i,s,r,d,g,E,S,P,O,N,b,m,W,$,U,I,v,F,h,L,y,f,x,T,q,B,C,ae,re,le,ce,de,ue,Re,Ee,ge,fe,Se,Te,Ce,Me,pe,me,Ae,Ge,Pe,Oe;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Name",n="Name...",i="Owner",s="Placement target",r="Locking",d="Enabled",g="Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",E="Security",S="Encryption",P="Enables encryption for the objects in the bucket. To enable encryption on a bucket you need to set the configuration values for SSE-S3 or SSE-KMS. To set the configuration values " + "\ufffd#67\ufffd" + "Click here" + "\ufffd/#67\ufffd" + "",O="Id",N="This field is required.",b="Bucket names can only contain lowercase letters, numbers, periods and hyphens.",m="The chosen name is already in use.",W="Bucket names must not contain uppercase characters or underscores.",$="Each label must start and end with a lowercase letter or a number.",U="Bucket names cannot be formatted as IP address.",I="Bucket labels cannot be empty and can only contain lowercase letters, numbers and hyphens.",v="Bucket names must be 3 to 63 characters long.",F="Loading...",h="-- Select a user --",L="This field is required.",y="Loading...",f="-- Select a placement target --",x="This field is required.",T="Versioning",q="Enabled",B="Enables versioning for the objects in the bucket.",C="Multi-Factor Authentication",ae="Delete enabled",re="Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",le="Token Serial Number",ce="This field is required.",de="Token PIN",ue="This field is required.",Re="Mode",Ee="Compliance",ge="Governance",fe="Days",Se="The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.",Te="The entered value must be a positive integer.",Ce="Retention Days must be a positive integer.",Me="SSE-S3 Encryption",pe="Connect to an external key management service",me="KMS Provider",Ae="-- Select a provider --",Ge="This field is required.",Pe="Key Id ",Oe="This field is required.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],o,[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","bid","name","bid","type","text","placeholder",n,"formControlName","bid",1,"form-control",3,"readonly","autofocus"],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],i,["id","owner","name","owner","formControlName","owner",1,"form-select",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["for","placement-target",1,"cd-col-form-label",3,"ngClass"],s,["placementTargetSelect",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"cd-header"],r,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","lock_enabled","formControlName","lock_enabled","type","checkbox",1,"custom-control-input"],["for","lock_enabled",1,"custom-control-label"],d,g,E,["id","encryption_enabled","name","encryption_enabled","formControlName","encryption_enabled","type","checkbox",1,"form-check-input"],["for","encryption_enabled",1,"form-check-label"],S,P,["href","#/rgw/bucket/create",3,"click"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","id",1,"cd-col-form-label"],O,["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],N,b,m,W,$,U,I,v,[3,"ngValue"],F,h,[3,"value"],L,["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-select"],y,f,x,["id","placement-target","name","placement-target","formControlName","placement-target","type","text","readonly","",1,"form-control"],T,["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],q,B,C,["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],ae,re,["for","mfa-token-serial",1,"cd-col-form-label"],le,["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],ce,["for","mfa-token-pin",1,"cd-col-form-label"],de,["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],ue,["for","lock_mode",1,"cd-col-form-label"],Re,["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-select"],["value","COMPLIANCE"],Ee,["value","GOVERNANCE"],ge,["for","lock_retention_period_days",1,"cd-col-form-label"],fe,Se,["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","0",1,"form-control"],Te,Ce,[1,"custom-control","custom-radio","custom-control-inline","ps-5"],["formControlName","encryption_type","id","sse_S3_enabled","type","radio","name","encryption_type","value","AES256",1,"form-check-input"],["for","sse_S3_enabled",1,"form-control-label"],Me,["formControlName","encryption_type","id","kms_enabled","name","encryption_type","value","aws:kms","type","radio",1,"form-check-input"],["for","kms_enabled",1,"form-control-label"],pe,["for","kms_provider",1,"cd-col-form-label","required"],me,["id","kms_provider","name","kms_provider","formControlName","kms_provider",1,"form-select",3,"autofocus"],Ae,Ge,["for","keyId",1,"cd-col-form-label","required"],Pe,["id","keyId","name","keyId","type","text","formControlName","keyId",1,"form-control"],Oe]},template:function(_,n){1&_&&e.YNc(0,Bt,73,43,"div",0),2&_&&e.Q6J("cdFormLoading",n.loading)},directives:[ze.y,a._Y,a.JL,J.V,a.sg,M.O5,X.P,k.o,a.Fj,K.b,a.JJ,a.u,M.mk,se.U,a.EJ,a.YN,a.Kr,M.sg,a.Wl,Ke.S,a.wV,a.qQ,a._,V.p],pipes:[M.rS,j.m],styles:[""]}),t})();var Je=l(70882),Le=l(68136),Ve=l(30982),ee=l(83697),ye=l(68774),je=l(47557),e_=l(66369),_e=l(51847),$e=l(47640),__=l(94928),Ht=l(96102),t_=l(68962);function Xt(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,25),e.qZA())}function Kt(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimless"),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.selection.bucket_quota.max_size)," ")}}function zt(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,26),e.qZA())}function Qt(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.hij(" ",_.selection.bucket_quota.max_objects," ")}}function Yt(t,o){if(1&t&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,21),e.qZA(),e.TgZ(3,"table",1)(4,"tbody")(5,"tr")(6,"td",2),e.SDv(7,22),e.qZA(),e.TgZ(8,"td",4),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",5),e.SDv(13,23),e.qZA(),e.YNc(14,Xt,2,0,"td",0),e.YNc(15,Kt,3,3,"td",0),e.qZA(),e.TgZ(16,"tr")(17,"td",5),e.SDv(18,24),e.qZA(),e.YNc(19,zt,2,0,"td",0),e.YNc(20,Qt,2,1,"td",0),e.qZA()()()()),2&t){const _=e.oxw(2);e.xp6(9),e.Oqu(e.lcZ(10,5,_.selection.bucket_quota.enabled)),e.xp6(5),e.Q6J("ngIf",_.selection.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",_.selection.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota.max_objects>-1)}}function Jt(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"tr")(2,"td",5),e.SDv(3,27),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA()(),e.TgZ(6,"tr")(7,"td",5),e.SDv(8,28),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()(),e.BQk()),2&t){const _=e.oxw(2);e.xp6(5),e.Oqu(_.selection.lock_mode),e.xp6(5),e.Oqu(_.selection.lock_retention_period_days)}}function Vt(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"table",1)(2,"tbody")(3,"tr")(4,"td",2),e.SDv(5,3),e.qZA(),e.TgZ(6,"td",4),e._uU(7),e.qZA()(),e.TgZ(8,"tr")(9,"td",5),e.SDv(10,6),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()(),e.TgZ(13,"tr")(14,"td",5),e.SDv(15,7),e.qZA(),e.TgZ(16,"td"),e._uU(17),e.qZA()(),e.TgZ(18,"tr")(19,"td",5),e.SDv(20,8),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.qZA()(),e.TgZ(23,"tr")(24,"td",5),e.SDv(25,9),e.qZA(),e.TgZ(26,"td"),e._uU(27),e.qZA()(),e.TgZ(28,"tr")(29,"td",5),e.SDv(30,10),e.qZA(),e.TgZ(31,"td"),e._uU(32),e.qZA()(),e.TgZ(33,"tr")(34,"td",5),e.SDv(35,11),e.qZA(),e.TgZ(36,"td"),e._uU(37),e.qZA()(),e.TgZ(38,"tr")(39,"td",5),e.SDv(40,12),e.qZA(),e.TgZ(41,"td"),e._uU(42),e.qZA()(),e.TgZ(43,"tr")(44,"td",5),e.SDv(45,13),e.qZA(),e.TgZ(46,"td"),e._uU(47),e.qZA()(),e.TgZ(48,"tr")(49,"td",5),e.SDv(50,14),e.qZA(),e.TgZ(51,"td"),e._uU(52),e.ALo(53,"cdDate"),e.qZA()(),e.TgZ(54,"tr")(55,"td",5),e.SDv(56,15),e.qZA(),e.TgZ(57,"td"),e._uU(58),e.qZA()(),e.TgZ(59,"tr")(60,"td",5),e.SDv(61,16),e.qZA(),e.TgZ(62,"td"),e._uU(63),e.qZA()(),e.TgZ(64,"tr")(65,"td",5),e.SDv(66,17),e.qZA(),e.TgZ(67,"td"),e._uU(68),e.qZA()(),e.TgZ(69,"tr")(70,"td",5),e.SDv(71,18),e.qZA(),e.TgZ(72,"td"),e._uU(73),e.qZA()()()(),e.YNc(74,Yt,21,7,"div",0),e.TgZ(75,"legend"),e.SDv(76,19),e.qZA(),e.TgZ(77,"table",1)(78,"tbody")(79,"tr")(80,"td",2),e.SDv(81,20),e.qZA(),e.TgZ(82,"td",4),e._uU(83),e.ALo(84,"booleanText"),e.qZA()(),e.YNc(85,Jt,11,2,"ng-container",0),e.qZA()(),e.BQk()),2&t){const _=e.oxw();e.xp6(7),e.Oqu(_.selection.bid),e.xp6(5),e.Oqu(_.selection.id),e.xp6(5),e.Oqu(_.selection.owner),e.xp6(5),e.Oqu(_.selection.index_type),e.xp6(5),e.Oqu(_.selection.placement_rule),e.xp6(5),e.Oqu(_.selection.marker),e.xp6(5),e.Oqu(_.selection.max_marker),e.xp6(5),e.Oqu(_.selection.ver),e.xp6(5),e.Oqu(_.selection.master_ver),e.xp6(5),e.Oqu(e.lcZ(53,17,_.selection.mtime)),e.xp6(6),e.Oqu(_.selection.zonegroup),e.xp6(5),e.Oqu(_.selection.versioning),e.xp6(5),e.Oqu(_.selection.encryption),e.xp6(5),e.Oqu(_.selection.mfa_delete),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota),e.xp6(9),e.Oqu(e.lcZ(84,19,_.selection.lock_enabled)),e.xp6(2),e.Q6J("ngIf",_.selection.lock_enabled)}}let jt=(()=>{class t{constructor(_){this.rgwBucketService=_}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(_=>{_.lock_retention_period_days=this.rgwBucketService.getLockDays(_),this.selection=_})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Ne.o))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let o,_,n,i,s,r,d,g,E,S,P,O,N,b,m,W,$,U,I,v,F,h,L,y;return o="Name",_="ID",n="Owner",i="Index type",s="Placement rule",r="Marker",d="Maximum marker",g="Version",E="Master version",S="Modification time",P="Zonegroup",O="Versioning",N="Encryption",b="MFA Delete",m="Locking",W="Enabled",$="Bucket quota",U="Enabled",I="Maximum size",v="Maximum objects",F="Unlimited",h="Unlimited",L="Mode",y="Days",[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],o,[1,"w-75"],[1,"bold"],_,n,i,s,r,d,g,E,S,P,O,N,b,m,W,$,U,I,v,F,h,L,y]},template:function(_,n){1&_&&e.YNc(0,Vt,86,21,"ng-container",0),2&_&&e.Q6J("ngIf",n.selection)},directives:[M.O5],pipes:[Ht.N,t_.T,e_.n],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),t})();var n_=l(60251);const en=["bucketSizeTpl"],_n=["bucketObjectTpl"];function tn(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",8),2&t){const _=e.oxw().row;e.Q6J("total",_.bucket_quota.max_size)("used",_.bucket_size)}}function nn(t,o){1&t&&e.SDv(0,9)}function on(t,o){if(1&t&&(e.YNc(0,tn,1,2,"cd-usage-bar",6),e.YNc(1,nn,1,0,"ng-template",null,7,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.bucket_quota.max_size>0&&_.bucket_quota.enabled)("ngIfElse",n)}}function sn(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",12),2&t){const _=e.oxw().row;e.Q6J("total",_.bucket_quota.max_objects)("used",_.num_objects)("isBinary",!1)}}function an(t,o){1&t&&e.SDv(0,13)}function rn(t,o){if(1&t&&(e.YNc(0,sn,1,3,"cd-usage-bar",10),e.YNc(1,an,1,0,"ng-template",null,11,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.bucket_quota.max_objects>0&&_.bucket_quota.enabled)("ngIfElse",n)}}let cn=(()=>{class t extends Le.o{constructor(_,n,i,s,r,d,g,E){super(E),this.authStorageService=_,this.dimlessBinaryPipe=n,this.dimlessPipe=i,this.rgwBucketService=s,this.modalService=r,this.urlBuilder=d,this.actionLabels=g,this.ngZone=E,this.columns=[],this.buckets=[],this.selection=new ye.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Name",prop:"bid",flexGrow:2},{name:"Owner",prop:"owner",flexGrow:2.5},{name:"Used Capacity",prop:"bucket_size",flexGrow:.6,pipe:this.dimlessBinaryPipe},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.bucketSizeTpl,flexGrow:.8},{name:"Objects",prop:"num_objects",flexGrow:.6,pipe:this.dimlessPipe},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.bucketObjectTpl,flexGrow:.8}];const _=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().bid)}`;this.tableActions=[{permission:"create",icon:w.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:r=>!r.hasSelection},{permission:"update",icon:w.P.edit,routerLink:()=>this.urlBuilder.getEdit(_()),name:this.actionLabels.EDIT},{permission:"delete",icon:w.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:r=>r.hasMultiSelection}],this.setTableRefreshTimeout()}transformBucketData(){R().forEach(this.buckets,_=>{const n=_.bucket_quota.max_size,i=_.bucket_quota.max_objects;_.bucket_size=0,_.num_objects=0,R().isEmpty(_.usage)||(_.bucket_size=_.usage["rgw.main"].size_actual,_.num_objects=_.usage["rgw.main"].num_objects),_.size_usage=n>0?_.bucket_size/n:void 0,_.object_usage=i>0?_.num_objects/i:void 0})}getBucketList(_){this.setTableRefreshTimeout(),this.rgwBucketService.list(!0).subscribe(n=>{this.buckets=n,this.transformBucketData()},()=>{_.error()})}updateSelection(_){this.selection=_}deleteAction(){this.modalService.show(Ve.M,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(_=>_.bid),submitActionObservable:()=>new Je.y(_=>{(0,te.D)(this.selection.selected.map(n=>this.rgwBucketService.delete(n.bid))).subscribe({error:n=>{_.error(n),this.table.refreshBtn()},complete:()=>{_.complete(),this.table.refreshBtn()}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36($e.j),e.Y36(je.$),e.Y36(e_.n),e.Y36(Ne.o),e.Y36(ie.Z),e.Y36(_e.F),e.Y36(G.p4),e.Y36(e.R0b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(_,n){if(1&_&&(e.Gf(ee.a,7),e.Gf(en,7),e.Gf(_n,7)),2&_){let i;e.iGM(i=e.CRH())&&(n.table=i.first),e.iGM(i=e.CRH())&&(n.bucketSizeTpl=i.first),e.iGM(i=e.CRH())&&(n.bucketObjectTpl=i.first)}},features:[e._Bn([{provide:_e.F,useValue:new _e.F("rgw/bucket")}]),e.qOj],decls:8,vars:9,consts:function(){let o,_;return o="No Limit",_="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","bid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["bucketSizeTpl",""],["bucketObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],o,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],_]},template:function(_,n){1&_&&(e.TgZ(0,"cd-table",0,1),e.NdJ("setExpandedRow",function(s){return n.setExpandedRow(s)})("updateSelection",function(s){return n.updateSelection(s)})("fetchData",function(s){return n.getBucketList(s)}),e._UZ(2,"cd-table-actions",2)(3,"cd-rgw-bucket-details",3),e.qZA(),e.YNc(4,on,3,2,"ng-template",null,4,e.W1O),e.YNc(6,rn,3,2,"ng-template",null,5,e.W1O)),2&_&&(e.Q6J("autoReload",!1)("data",n.buckets)("columns",n.columns)("hasDetails",!0)("status",n.tableStatus),e.xp6(2),e.Q6J("permission",n.permission)("selection",n.selection)("tableActions",n.tableActions),e.xp6(1),e.Q6J("selection",n.expandedRow))},directives:[ee.a,__.K,jt,M.O5,n_.O],styles:[""]}),t})();var dn=l(58111),o_=l(59376),un=l(61350),Rn=l(60351),i_=l(76317);function En(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table-key-value",11),e.NdJ("fetchData",function(){return e.CHM(_),e.oxw(2).getMetaData()}),e.qZA()}if(2&t){const _=e.oxw(2);e.Q6J("data",_.metadata)}}function gn(t,o){if(1&t&&e._UZ(0,"cd-table-performance-counter",12),2&t){const _=e.oxw(2);e.Q6J("serviceId",_.serviceMapId)}}function fn(t,o){if(1&t&&e._UZ(0,"cd-grafana",15),2&t){const _=e.oxw(3);e.Q6J("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+_.serviceId)("type","metrics")}}function Sn(t,o){1&t&&(e.ynx(0,13),e.TgZ(1,"a",4),e.SDv(2,14),e.qZA(),e.YNc(3,fn,1,2,"ng-template",6),e.BQk())}function Tn(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"nav",1,2),e.ynx(3,3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,En,1,1,"ng-template",6),e.BQk(),e.ynx(7,7),e.TgZ(8,"a",4),e.SDv(9,8),e.qZA(),e.YNc(10,gn,1,1,"ng-template",6),e.BQk(),e.YNc(11,Sn,4,0,"ng-container",9),e.qZA(),e._UZ(12,"div",10),e.BQk()),2&t){const _=e.MAs(2),n=e.oxw();e.xp6(11),e.Q6J("ngIf",n.grafanaPermission.read),e.xp6(1),e.Q6J("ngbNavOutlet",_)}}let Cn=(()=>{class t{constructor(_,n){this.rgwDaemonService=_,this.authStorageService=n,this.serviceId="",this.serviceMapId="",this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection&&(this.serviceId=this.selection.id,this.serviceMapId=this.selection.service_map_id)}getMetaData(){R().isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(_=>{this.metadata=_.rgw_metadata})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(be.b),e.Y36($e.j))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let o,_,n,i;return o="Details",_="Performance Counters",n="Performance Details",i="RGW instance details",[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],o,["ngbNavContent",""],["ngbNavItem","performance-counters"],_,["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],n,["title",i,"uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath","type"]]},template:function(_,n){1&_&&e.YNc(0,Tn,13,2,"ng-container",0),2&_&&e.Q6J("ngIf",n.selection)},directives:[M.O5,A.Pz,o_.m,A.nv,A.Vx,A.uN,un.b,Rn.p,i_.F,A.tO],styles:[""]}),t})();function Mn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table",8),e.NdJ("setExpandedRow",function(i){return e.CHM(_),e.oxw().setExpandedRow(i)})("fetchData",function(i){return e.CHM(_),e.oxw().getDaemonList(i)}),e._UZ(1,"cd-rgw-daemon-details",9),e.qZA()}if(2&t){const _=e.oxw();e.Q6J("data",_.daemons)("columns",_.columns)("hasDetails",!0),e.xp6(1),e.Q6J("selection",_.expandedRow)}}function pn(t,o){1&t&&e._UZ(0,"cd-grafana",11),2&t&&e.Q6J("grafanaPath","rgw-overview?")("type","metrics")}function mn(t,o){1&t&&(e.ynx(0,2),e.TgZ(1,"a",3),e.SDv(2,10),e.qZA(),e.YNc(3,pn,1,2,"ng-template",5),e.BQk())}function An(t,o){1&t&&e._UZ(0,"cd-grafana",13),2&t&&e.Q6J("grafanaPath","radosgw-sync-overview?")("type","metrics")}function Gn(t,o){1&t&&(e.ynx(0,2),e.TgZ(1,"a",3),e.SDv(2,12),e.qZA(),e.YNc(3,An,1,2,"ng-template",5),e.BQk())}let Pn=(()=>{class t extends Le.o{constructor(_,n,i,s){super(),this.rgwDaemonService=_,this.authStorageService=n,this.cephShortVersionPipe=i,this.rgwSiteService=s,this.columns=[],this.daemons=[],this.updateDaemons=r=>{this.daemons=r}}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",flexGrow:2},{name:"Zone",prop:"zone_name",flexGrow:2},{name:"Zone Group",prop:"zonegroup_name",flexGrow:2},{name:"Realm",prop:"realm_name",flexGrow:2},{name:"Version",prop:"version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.rgwSiteService.get("realms").subscribe(_=>this.isMultiSite=_.length>0)}getDaemonList(_){this.rgwDaemonService.list().subscribe(this.updateDaemons,()=>{_.error()})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(be.b),e.Y36($e.j),e.Y36(dn.F),e.Y36(ke.I))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-daemon-list"]],features:[e.qOj],decls:9,vars:3,consts:function(){let o,_,n,i,s;return o="Daemons List",_="Overall Performance",n="RGW overview",i="Sync Performance",s="Radosgw sync overview",[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],o,["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],_,["title",n,"uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath","type"],i,["title",s,"uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath","type"]]},template:function(_,n){if(1&_&&(e.TgZ(0,"nav",0,1),e.ynx(2,2),e.TgZ(3,"a",3),e.SDv(4,4),e.qZA(),e.YNc(5,Mn,2,4,"ng-template",5),e.BQk(),e.YNc(6,mn,4,0,"ng-container",6),e.YNc(7,Gn,4,0,"ng-container",6),e.qZA(),e._UZ(8,"div",7)),2&_){const i=e.MAs(1);e.xp6(6),e.Q6J("ngIf",n.grafanaPermission.read),e.xp6(1),e.Q6J("ngIf",n.grafanaPermission.read&&n.isMultiSite),e.xp6(1),e.Q6J("ngbNavOutlet",i)}},directives:[A.Pz,A.nv,A.Vx,A.uN,ee.a,Cn,M.O5,i_.F,A.tO],styles:[""]}),t})();var On=l(6481),De=l(28211),Ue=(()=>{return(t=Ue||(Ue={})).USERS="users",t.BUCKETS="buckets",t.METADATA="metadata",t.USAGE="usage",t.ZONE="zone",Ue;var t})();let s_=(()=>{class t{static getAll(){return Object.values(t.capabilities)}}return t.capabilities=Ue,t})();function Nn(t,o){1&t&&e._UZ(0,"input",22),2&t&&e.Q6J("readonly",!0)}function bn(t,o){1&t&&(e.TgZ(0,"option",17),e.SDv(1,25),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Wn(t,o){if(1&t&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function $n(t,o){if(1&t&&(e.TgZ(0,"select",23),e.YNc(1,bn,2,1,"option",24),e.YNc(2,Wn,2,2,"option",19),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==_.types),e.xp6(1),e.Q6J("ngForOf",_.types)}}function Un(t,o){1&t&&(e.TgZ(0,"span",27),e.SDv(1,28),e.qZA())}function In(t,o){if(1&t&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function vn(t,o){1&t&&(e.TgZ(0,"span",27),e.SDv(1,29),e.qZA())}const Fn=function(t){return{required:t}},hn=function(){return["read","write","*"]};let Ln=(()=>{class t{constructor(_,n,i){this.formBuilder=_,this.activeModal=n,this.actionLabels=i,this.submitAction=new e.vpe,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[a.kI.required]],perm:[null,[a.kI.required]]})}setEditing(_=!0){this.editing=_,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(_,n){this.formGroup.setValue({type:_,perm:n})}setCapabilities(_){const n=[];_.forEach(i=>{n.push(i.type)}),this.types=[],s_.getAll().forEach(i=>{-1===R().indexOf(n,i)&&this.types.push(i)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Y.O),e.Y36(A.Kz),e.Y36(G.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){let o,_,n,i,s,r,d;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Type",n="Permission",i="-- Select a permission --",s="-- Select a type --",r="This field is required.",d="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-select","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],n,["id","perm","formControlName","perm",1,"form-select"],[3,"ngValue"],i,[3,"value",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["id","type","type","text","formControlName","type",1,"form-control",3,"readonly"],["id","type","formControlName","type","autofocus","",1,"form-select"],[3,"ngValue",4,"ngIf"],s,[3,"value"],[1,"invalid-feedback"],r,d]},template:function(_,n){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,Nn,1,1,"input",11),e.YNc(14,$n,3,2,"select",12),e.YNc(15,Un,2,0,"span",13),e.qZA()(),e.TgZ(16,"div",7)(17,"label",14),e.SDv(18,15),e.qZA(),e.TgZ(19,"div",10)(20,"select",16)(21,"option",17),e.SDv(22,18),e.qZA(),e.YNc(23,In,2,2,"option",19),e.qZA(),e.YNc(24,vn,2,0,"span",13),e.qZA()()(),e.TgZ(25,"div",20)(26,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.ALo(27,"titlecase"),e.ALo(28,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",n.activeModal),e.xp6(4),e.pQV(e.lcZ(3,13,n.action))(e.lcZ(4,15,n.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",n.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(21,Fn,!n.editing)),e.xp6(3),e.Q6J("ngIf",n.editing),e.xp6(1),e.Q6J("ngIf",!n.editing),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("type",i,"required")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(23,hn)),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("perm",i,"required")),e.xp6(2),e.Q6J("form",n.formGroup)("submitText",e.lcZ(27,17,n.action)+" "+e.lcZ(28,19,n.resource))}},directives:[oe.z,a._Y,a.JL,J.V,a.sg,X.P,M.mk,M.O5,k.o,a.Fj,K.b,a.JJ,a.u,a.EJ,se.U,a.YN,a.Kr,M.sg,V.p],pipes:[M.rS,j.m],styles:[""]}),t})();var Ie=l(4416),ve=l(58039);function yn(t,o){1&t&&e._UZ(0,"input",17),2&t&&e.Q6J("readonly",!0)}function Dn(t,o){1&t&&(e.TgZ(0,"option",21),e.SDv(1,22),e.qZA()),2&t&&e.Q6J("ngValue",null)}function xn(t,o){if(1&t&&(e.TgZ(0,"option",23),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function Zn(t,o){if(1&t&&(e.TgZ(0,"select",18),e.YNc(1,Dn,2,1,"option",19),e.YNc(2,xn,2,2,"option",20),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==_.userCandidates),e.xp6(1),e.Q6J("ngForOf",_.userCandidates)}}function wn(t,o){1&t&&(e.TgZ(0,"span",24),e.SDv(1,25),e.qZA())}function kn(t,o){1&t&&(e.TgZ(0,"div",7)(1,"div",26)(2,"div",27),e._UZ(3,"input",28),e.TgZ(4,"label",29),e.SDv(5,30),e.qZA()()()())}function qn(t,o){1&t&&(e.TgZ(0,"span",24),e.SDv(1,37),e.qZA())}const xe=function(t){return{required:t}};function Bn(t,o){if(1&t&&(e.TgZ(0,"div",7)(1,"label",31),e.SDv(2,32),e.qZA(),e.TgZ(3,"div",10)(4,"div",33),e._UZ(5,"input",34)(6,"button",35)(7,"cd-copy-2-clipboard-button",36),e.qZA(),e.YNc(8,qn,2,0,"span",13),e.qZA()()),2&t){const _=e.oxw(),n=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,xe,!_.viewing)),e.xp6(4),e.Q6J("readonly",_.viewing),e.xp6(3),e.Q6J("ngIf",_.formGroup.showError("access_key",n,"required"))}}function Hn(t,o){1&t&&(e.TgZ(0,"span",24),e.SDv(1,43),e.qZA())}function Xn(t,o){if(1&t&&(e.TgZ(0,"div",7)(1,"label",38),e.SDv(2,39),e.qZA(),e.TgZ(3,"div",10)(4,"div",33),e._UZ(5,"input",40)(6,"button",41)(7,"cd-copy-2-clipboard-button",42),e.qZA(),e.YNc(8,Hn,2,0,"span",13),e.qZA()()),2&t){const _=e.oxw(),n=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,xe,!_.viewing)),e.xp6(4),e.Q6J("readonly",_.viewing),e.xp6(3),e.Q6J("ngIf",_.formGroup.showError("secret_key",n,"required"))}}let a_=(()=>{class t{constructor(_,n,i){this.formBuilder=_,this.activeModal=n,this.actionLabels=i,this.submitAction=new e.vpe,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[a.kI.required]],generate_key:[!0],access_key:[null,[p.h.requiredIf({generate_key:!1})]],secret_key:[null,[p.h.requiredIf({generate_key:!1})]]})}setViewing(_=!0){this.viewing=_,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(_,n,i){this.formGroup.setValue({user:_,generate_key:R().isEmpty(n),access_key:n,secret_key:i})}setUserCandidates(_){this.userCandidates=_}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Y.O),e.Y36(A.Kz),e.Y36(G.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){let o,_,n,i,s,r,d,g,E;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",n="-- Select a username --",i="This field is required.",s="Auto-generate key",r="Access key",d="This field is required.",g="Secret key",E="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control","formControlName","user","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],["id","user","type","text","formControlName","user",1,"form-control",3,"readonly"],["id","user","formControlName","user","autofocus","",1,"form-control"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],n,[3,"value"],[1,"invalid-feedback"],i,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],s,["for","access_key",1,"cd-col-form-label",3,"ngClass"],r,[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],d,["for","secret_key",1,"cd-col-form-label",3,"ngClass"],g,["id","secret_key","type","password","formControlName","secret_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],E]},template:function(_,n){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,yn,1,1,"input",11),e.YNc(14,Zn,3,2,"select",12),e.YNc(15,wn,2,0,"span",13),e.qZA()(),e.YNc(16,kn,6,0,"div",14),e.YNc(17,Bn,9,5,"div",14),e.YNc(18,Xn,9,5,"div",14),e.qZA(),e.TgZ(19,"div",15)(20,"cd-form-button-panel",16),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.ALo(21,"titlecase"),e.ALo(22,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",n.activeModal),e.xp6(4),e.pQV(e.lcZ(3,14,n.action))(e.lcZ(4,16,n.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",n.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(22,xe,!n.viewing)),e.xp6(3),e.Q6J("ngIf",n.viewing),e.xp6(1),e.Q6J("ngIf",!n.viewing),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("user",i,"required")),e.xp6(1),e.Q6J("ngIf",!n.viewing),e.xp6(1),e.Q6J("ngIf",!n.formGroup.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!n.formGroup.getValue("generate_key")),e.xp6(2),e.Q6J("form",n.formGroup)("submitText",e.lcZ(21,18,n.action)+" "+e.lcZ(22,20,n.resource))("showSubmit",!n.viewing)}},directives:[oe.z,a._Y,a.JL,J.V,a.sg,X.P,M.mk,M.O5,k.o,a.Fj,K.b,a.JJ,a.u,a.EJ,se.U,a.YN,a.Kr,M.sg,a.Wl,Ie.C,ve.s,V.p],pipes:[M.rS,j.m],styles:[""]}),t})();class Kn{}function zn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,30),e.qZA())}function Qn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,31),e.qZA())}function Yn(t,o){if(1&t&&(e.TgZ(0,"option",32),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function Jn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,33),e.qZA())}function Vn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,47),e.qZA())}function jn(t,o){if(1&t&&(e.TgZ(0,"div",7)(1,"label",41),e.SDv(2,42),e.qZA(),e.TgZ(3,"div",10)(4,"div",43),e._UZ(5,"input",44)(6,"button",45)(7,"cd-copy-2-clipboard-button",46),e.qZA(),e.YNc(8,Vn,2,0,"span",15),e.qZA()()),2&t){const _=e.oxw(2),n=e.MAs(7);e.xp6(8),e.Q6J("ngIf",_.formGroup.showError("secret_key",n,"required"))}}function eo(t,o){if(1&t&&(e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,34),e.qZA(),e.TgZ(3,"div",7)(4,"div",35)(5,"div",36),e._UZ(6,"input",37),e.TgZ(7,"label",38),e.SDv(8,39),e.qZA()()()(),e.YNc(9,jn,9,1,"div",40),e.qZA()),2&t){const _=e.oxw();e.xp6(9),e.Q6J("ngIf",!_.editing&&!_.formGroup.getValue("generate_secret"))}}const _o=function(t){return{required:t}},to=function(){return["read","write"]};let no=(()=>{class t{constructor(_,n,i){this.formBuilder=_,this.bsModalRef=n,this.actionLabels=i,this.submitAction=new e.vpe,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[a.kI.required,this.subuserValidator()]],perm:[null,[a.kI.required]],generate_secret:[!0],secret_key:[null,[p.h.requiredIf({generate_secret:!1})]]})}subuserValidator(){const _=this;return n=>_.editing||(0,p.P)(n.value)?null:_.subusers.some(s=>R().isEqual(_.getSubuserName(s.id),n.value))?{subuserIdExists:!0}:null}getSubuserName(_){if(R().isEmpty(_))return _;const n=_.match(/([^:]+)(:(.+))?/);return R().isUndefined(n[3])?n[1]:n[3]}setEditing(_=!0){this.editing=_,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(_,n="",i=""){this.formGroup.setValue({uid:_,subuid:this.getSubuserName(n),perm:i,generate_secret:!0,secret_key:null})}setSubusers(_){this.subusers=_}onSubmit(){const _=this.formGroup.value,n=new Kn;n.id=`${_.uid}:${_.subuid}`,n.permissions=_.perm,n.generate_secret=_.generate_secret,n.secret_key=_.secret_key,this.submitAction.emit(n),this.bsModalRef.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Y.O),e.Y36(A.Kz),e.Y36(G.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){let o,_,n,i,s,r,d,g,E,S,P,O,N,b;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",n="Subuser",i="Permission",s="-- Select a permission --",r="read, write",d="full",g="This field is required.",E="The chosen subuser ID is already in use.",S="This field is required.",P="Swift key",O="Auto-generate secret",N="Secret key",b="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","uid","type","text","formControlName","uid",1,"form-control",3,"readonly"],["for","subuid",1,"cd-col-form-label",3,"ngClass"],n,["id","subuid","type","text","formControlName","subuid","autofocus","",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],i,["id","perm","formControlName","perm",1,"form-select"],[3,"ngValue"],s,[3,"value",4,"ngFor","ngForOf"],["value","read-write"],r,["value","full-control"],d,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],g,E,[3,"value"],S,P,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_secret","type","checkbox","formControlName","generate_secret",1,"custom-control-input"],["for","generate_secret",1,"custom-control-label"],O,["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],N,[1,"input-group"],["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],b]},template:function(_,n){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.qZA()(),e.TgZ(14,"div",7)(15,"label",12),e.SDv(16,13),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"input",14),e.YNc(19,zn,2,0,"span",15),e.YNc(20,Qn,2,0,"span",15),e.qZA()(),e.TgZ(21,"div",7)(22,"label",16),e.SDv(23,17),e.qZA(),e.TgZ(24,"div",10)(25,"select",18)(26,"option",19),e.SDv(27,20),e.qZA(),e.YNc(28,Yn,2,2,"option",21),e.TgZ(29,"option",22),e.SDv(30,23),e.qZA(),e.TgZ(31,"option",24),e.SDv(32,25),e.qZA()(),e.YNc(33,Jn,2,0,"span",15),e.qZA()(),e.YNc(34,eo,10,1,"fieldset",26),e.qZA(),e.TgZ(35,"div",27)(36,"cd-form-button-panel",28),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.ALo(37,"titlecase"),e.ALo(38,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",n.bsModalRef),e.xp6(4),e.pQV(e.lcZ(3,15,n.action))(e.lcZ(4,17,n.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",n.formGroup),e.xp6(7),e.Q6J("readonly",!0),e.xp6(2),e.Q6J("ngClass",e.VKq(23,_o,!n.editing)),e.xp6(3),e.Q6J("readonly",n.editing),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("subuid",i,"required")),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("subuid",i,"subuserIdExists")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(25,to)),e.xp6(5),e.Q6J("ngIf",n.formGroup.showError("perm",i,"required")),e.xp6(1),e.Q6J("ngIf",!n.editing),e.xp6(2),e.Q6J("form",n.formGroup)("submitText",e.lcZ(37,19,n.action)+" "+e.lcZ(38,21,n.resource))}},directives:[oe.z,a._Y,a.JL,J.V,a.sg,X.P,k.o,a.Fj,K.b,a.JJ,a.u,M.mk,se.U,M.O5,a.EJ,a.YN,a.Kr,M.sg,a.Wl,Ie.C,ve.s,V.p],pipes:[M.rS,j.m],styles:[""]}),t})();var oo=l(13472);let r_=(()=>{class t{constructor(_,n){this.activeModal=_,this.actionLabels=n,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(_,n){this.user=_,this.secret_key=n}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(A.Kz),e.Y36(G.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-swift-key-modal"]],decls:23,vars:11,consts:function(){let o,_,n;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",n="Secret key",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","user","name","user","type","text",1,"form-control",3,"readonly","ngModel","ngModelChange"],["for","secret_key",1,"cd-col-form-label"],n,[1,"input-group"],["id","secret_key","name","secret_key","type","password",1,"form-control",3,"ngModel","readonly","ngModelChange"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],[1,"modal-footer"],[3,"backAction"]]},template:function(_,n){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"div",4)(7,"form",5)(8,"div",6)(9,"label",7),e.SDv(10,8),e.qZA(),e.TgZ(11,"div",9)(12,"input",10),e.NdJ("ngModelChange",function(s){return n.user=s}),e.qZA()()(),e.TgZ(13,"div",6)(14,"label",11),e.SDv(15,12),e.qZA(),e.TgZ(16,"div",9)(17,"div",13)(18,"input",14),e.NdJ("ngModelChange",function(s){return n.secret_key=s}),e.qZA(),e._UZ(19,"button",15)(20,"cd-copy-2-clipboard-button",16),e.qZA()()()()(),e.TgZ(21,"div",17)(22,"cd-back-button",18),e.NdJ("backAction",function(){return n.activeModal.close()}),e.qZA()(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",n.activeModal),e.xp6(4),e.pQV(e.lcZ(3,7,n.action))(e.lcZ(4,9,n.resource)),e.QtT(2),e.xp6(8),e.Q6J("readonly",!0)("ngModel",n.user),e.xp6(6),e.Q6J("ngModel",n.secret_key)("readonly",!0))},directives:[oe.z,a._Y,a.JL,a.F,X.P,k.o,a.Fj,K.b,a.JJ,a.On,Ie.C,ve.s,oo.W],pipes:[M.rS,j.m],styles:[""]}),t})();var io=l(17932);function so(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,50),e.qZA())}function ao(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,51),e.qZA())}function ro(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,52),e.qZA())}function lo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,56),e.qZA())}function co(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,57),e.qZA())}function uo(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",53),e.SDv(2,54),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",55),e.YNc(5,lo,2,0,"span",13),e.YNc(6,co,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(4),e.Q6J("readonly",n.editing),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("tenant",_,"pattern")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("tenant",_,"notUnique"))}}function Ro(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,58),e.qZA())}function Eo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,59),e.qZA())}function go(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,60),e.qZA())}function fo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,61),e.qZA())}function So(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,64),e.qZA())}function To(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,65),e.qZA())}function Co(t,o){if(1&t&&(e.TgZ(0,"div",8),e._UZ(1,"label",62),e.TgZ(2,"div",11),e._UZ(3,"input",63),e.YNc(4,So,2,0,"span",13),e.YNc(5,To,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(4),e.Q6J("ngIf",n.userForm.showError("max_buckets",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("max_buckets",_,"min"))}}function Mo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,76),e.qZA())}function po(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",70),e.SDv(2,71),e.qZA(),e.TgZ(3,"div",11)(4,"div",72),e._UZ(5,"input",73)(6,"button",74)(7,"cd-copy-2-clipboard-button",75),e.qZA(),e.YNc(8,Mo,2,0,"span",13),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(8),e.Q6J("ngIf",n.userForm.showError("access_key",_,"required"))}}function mo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,82),e.qZA())}function Ao(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",77),e.SDv(2,78),e.qZA(),e.TgZ(3,"div",11)(4,"div",72),e._UZ(5,"input",79)(6,"button",80)(7,"cd-copy-2-clipboard-button",81),e.qZA(),e.YNc(8,mo,2,0,"span",13),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(8),e.Q6J("ngIf",n.userForm.showError("secret_key",_,"required"))}}function Go(t,o){if(1&t&&(e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,66),e.qZA(),e.TgZ(3,"div",8)(4,"div",14)(5,"div",15),e._UZ(6,"input",67),e.TgZ(7,"label",68),e.SDv(8,69),e.qZA()()()(),e.YNc(9,po,9,1,"div",19),e.YNc(10,Ao,9,1,"div",19),e.qZA()),2&t){const _=e.oxw(2);e.xp6(9),e.Q6J("ngIf",!_.editing&&!_.userForm.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!_.editing&&!_.userForm.getValue("generate_key"))}}function Po(t,o){1&t&&(e.TgZ(0,"span",93)(1,"span",94),e.SDv(2,95),e.qZA()())}const Z=function(t){return[t]};function Oo(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",72)(2,"span",96),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",97),e.TgZ(5,"span",96),e._UZ(6,"i"),e.qZA(),e._UZ(7,"input",97),e.TgZ(8,"button",98),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showSubuserModal(s)}),e._UZ(9,"i",90),e.qZA(),e.TgZ(10,"button",99),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).deleteSubuser(s)}),e._UZ(11,"i",90),e.qZA()(),e._UZ(12,"span",94),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(3),e.Tol(n.icons.user),e.xp6(1),e.s9C("value",_.id),e.xp6(2),e.Tol(n.icons.share),e.xp6(1),e.s9C("value","full-control"===_.permissions?"full":_.permissions),e.xp6(2),e.Q6J("ngClass",e.VKq(10,Z,n.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(12,Z,n.icons.destroy))}}function No(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,83),e.qZA(),e.TgZ(3,"div",84)(4,"div",14),e.YNc(5,Po,3,0,"span",85),e.YNc(6,Oo,13,14,"span",86),e.TgZ(7,"div",87)(8,"div",88)(9,"button",89),e.NdJ("click",function(){return e.CHM(_),e.oxw(2).showSubuserModal()}),e._UZ(10,"i",90),e.ynx(11),e.SDv(12,91),e.ALo(13,"titlecase"),e.ALo(14,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(15,"span",92),e.qZA()()()}if(2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===_.subusers.length),e.xp6(1),e.Q6J("ngForOf",_.subusers),e.xp6(4),e.Q6J("ngClass",e.VKq(9,Z,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(13,5,_.actionLabels.CREATE))(e.lcZ(14,7,_.subuserLabel)),e.QtT(12)}}function bo(t,o){1&t&&(e.TgZ(0,"span",93)(1,"span",94),e.SDv(2,105),e.qZA()())}function Wo(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",72)(2,"div",96),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",97),e.TgZ(5,"button",106),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showS3KeyModal(s)}),e._UZ(6,"i",90),e.qZA(),e.TgZ(7,"button",107),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).deleteS3Key(s)}),e._UZ(8,"i",90),e.qZA()(),e._UZ(9,"span",94),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(3),e.Tol(n.icons.key),e.xp6(1),e.s9C("value",_.user),e.xp6(2),e.Q6J("ngClass",e.VKq(6,Z,n.icons.show)),e.xp6(2),e.Q6J("ngClass",e.VKq(8,Z,n.icons.destroy))}}function $o(t,o){1&t&&(e.TgZ(0,"span",93)(1,"span",94),e.SDv(2,108),e.qZA()())}function Uo(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",72)(2,"span",96),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",97),e.TgZ(5,"button",109),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showSwiftKeyModal(s)}),e._UZ(6,"i",90),e.qZA()(),e._UZ(7,"span",94),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(3),e.Tol(n.icons.key),e.xp6(1),e.s9C("value",_.user),e.xp6(2),e.Q6J("ngClass",e.VKq(5,Z,n.icons.show))}}function Io(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,100),e.qZA(),e.TgZ(3,"div",8)(4,"label",62),e.SDv(5,101),e.qZA(),e.TgZ(6,"div",11),e.YNc(7,bo,3,0,"span",85),e.YNc(8,Wo,10,10,"span",86),e.TgZ(9,"div",87)(10,"div",88)(11,"button",102),e.NdJ("click",function(){return e.CHM(_),e.oxw(2).showS3KeyModal()}),e._UZ(12,"i",90),e.ynx(13),e.SDv(14,103),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(17,"span",92),e.qZA(),e._UZ(18,"hr"),e.qZA(),e.TgZ(19,"div",8)(20,"label",62),e.SDv(21,104),e.qZA(),e.TgZ(22,"div",11),e.YNc(23,$o,3,0,"span",85),e.YNc(24,Uo,8,7,"span",86),e.qZA()()()}if(2&t){const _=e.oxw(2);e.xp6(7),e.Q6J("ngIf",0===_.s3Keys.length),e.xp6(1),e.Q6J("ngForOf",_.s3Keys),e.xp6(4),e.Q6J("ngClass",e.VKq(11,Z,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,7,_.actionLabels.CREATE))(e.lcZ(16,9,_.s3keyLabel)),e.QtT(14),e.xp6(7),e.Q6J("ngIf",0===_.swiftKeys.length),e.xp6(1),e.Q6J("ngForOf",_.swiftKeys)}}function vo(t,o){1&t&&(e.TgZ(0,"span",93)(1,"span",94),e.SDv(2,113),e.qZA()())}function Fo(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",72)(2,"div",96),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",97),e.TgZ(5,"button",114),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showCapabilityModal(s)}),e._UZ(6,"i",90),e.qZA(),e.TgZ(7,"button",115),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).deleteCapability(s)}),e._UZ(8,"i",90),e.qZA()(),e._UZ(9,"span",94),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(3),e.Tol(n.icons.share),e.xp6(1),e.hYB("value","",_.type,":",_.perm,""),e.xp6(2),e.Q6J("ngClass",e.VKq(7,Z,n.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(9,Z,n.icons.destroy))}}function ho(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,110),e.qZA(),e.TgZ(3,"div",8)(4,"div",14),e.YNc(5,vo,3,0,"span",85),e.YNc(6,Fo,10,11,"span",86),e.TgZ(7,"div",87)(8,"div",88)(9,"button",111),e.NdJ("click",function(){return e.CHM(_),e.oxw(2).showCapabilityModal()}),e.ALo(10,"pipeFunction"),e.ALo(11,"pipeFunction"),e._UZ(12,"i",90),e.ynx(13),e.SDv(14,112),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(17,"span",92),e.qZA()()()}if(2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===_.capabilities.length),e.xp6(1),e.Q6J("ngForOf",_.capabilities),e.xp6(3),e.Q6J("disabled",e.xi3(10,7,_.capabilities,_.hasAllCapabilities))("disableTooltip",!e.xi3(11,10,_.capabilities,_.hasAllCapabilities)),e.xp6(3),e.Q6J("ngClass",e.VKq(17,Z,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,13,_.actionLabels.ADD))(e.lcZ(16,15,_.capabilityLabel)),e.QtT(14)}}function Lo(t,o){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",116),e.TgZ(4,"label",117),e.SDv(5,118),e.qZA()()()())}function yo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,122),e.qZA())}function Do(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,123),e.qZA())}function xo(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",119),e.SDv(2,120),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",121),e.YNc(5,yo,2,0,"span",13),e.YNc(6,Do,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("user_quota_max_size",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_quota_max_size",_,"quotaMaxSize"))}}function Zo(t,o){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",124),e.TgZ(4,"label",125),e.SDv(5,126),e.qZA()()()())}function wo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,130),e.qZA())}function ko(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,131),e.qZA())}function qo(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",127),e.SDv(2,128),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",129),e.YNc(5,wo,2,0,"span",13),e.YNc(6,ko,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("user_quota_max_objects",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_quota_max_objects",_,"min"))}}function Bo(t,o){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",132),e.TgZ(4,"label",133),e.SDv(5,134),e.qZA()()()())}function Ho(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,138),e.qZA())}function Xo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,139),e.qZA())}function Ko(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",135),e.SDv(2,136),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",137),e.YNc(5,Ho,2,0,"span",13),e.YNc(6,Xo,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_size",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_size",_,"quotaMaxSize"))}}function zo(t,o){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",140),e.TgZ(4,"label",141),e.SDv(5,142),e.qZA()()()())}function Qo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,146),e.qZA())}function Yo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,147),e.qZA())}function Jo(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"label",143),e.SDv(2,144),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",145),e.YNc(5,Qo,2,0,"span",13),e.YNc(6,Yo,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_objects",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_objects",_,"min"))}}const l_=function(t){return{required:t}};function Vo(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",1)(1,"form",2,3)(3,"div",4)(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7)(9,"div",8)(10,"label",9),e.SDv(11,10),e.qZA(),e.TgZ(12,"div",11),e._UZ(13,"input",12),e.YNc(14,so,2,0,"span",13),e.YNc(15,ao,2,0,"span",13),e.YNc(16,ro,2,0,"span",13),e.qZA()(),e.TgZ(17,"div",8)(18,"div",14)(19,"div",15)(20,"input",16),e.NdJ("click",function(){return e.CHM(_),e.oxw().updateFieldsWhenTenanted()}),e.qZA(),e.TgZ(21,"label",17),e.SDv(22,18),e.qZA()()()(),e.YNc(23,uo,7,3,"div",19),e.TgZ(24,"div",8)(25,"label",20),e.SDv(26,21),e.qZA(),e.TgZ(27,"div",11),e._UZ(28,"input",22),e.YNc(29,Ro,2,0,"span",13),e.YNc(30,Eo,2,0,"span",13),e.qZA()(),e.TgZ(31,"div",8)(32,"label",23),e.SDv(33,24),e.qZA(),e.TgZ(34,"div",11),e._UZ(35,"input",25),e.YNc(36,go,2,0,"span",13),e.YNc(37,fo,2,0,"span",13),e.qZA()(),e.TgZ(38,"div",8)(39,"label",26),e.SDv(40,27),e.qZA(),e.TgZ(41,"div",11)(42,"select",28),e.NdJ("change",function(i){return e.CHM(_),e.oxw().onMaxBucketsModeChange(i.target.value)}),e.TgZ(43,"option",29),e.SDv(44,30),e.qZA(),e.TgZ(45,"option",31),e.SDv(46,32),e.qZA(),e.TgZ(47,"option",33),e.SDv(48,34),e.qZA()()()(),e.YNc(49,Co,6,2,"div",19),e.TgZ(50,"div",8)(51,"div",14)(52,"div",15),e._UZ(53,"input",35),e.TgZ(54,"label",36),e.SDv(55,37),e.qZA()()()(),e.YNc(56,Go,11,2,"fieldset",38),e.YNc(57,No,16,11,"fieldset",38),e.YNc(58,Io,25,13,"fieldset",38),e.YNc(59,ho,18,19,"fieldset",38),e.TgZ(60,"fieldset")(61,"legend"),e.SDv(62,39),e.qZA(),e.TgZ(63,"div",8)(64,"div",14)(65,"div",15),e._UZ(66,"input",40),e.TgZ(67,"label",41),e.SDv(68,42),e.qZA()()()(),e.YNc(69,Lo,6,0,"div",19),e.YNc(70,xo,7,2,"div",19),e.YNc(71,Zo,6,0,"div",19),e.YNc(72,qo,7,2,"div",19),e.qZA(),e.TgZ(73,"fieldset")(74,"legend"),e.SDv(75,43),e.qZA(),e.TgZ(76,"div",8)(77,"div",14)(78,"div",15),e._UZ(79,"input",44),e.TgZ(80,"label",45),e.SDv(81,46),e.qZA()()()(),e.YNc(82,Bo,6,0,"div",19),e.YNc(83,Ko,7,2,"div",19),e.YNc(84,zo,6,0,"div",19),e.YNc(85,Jo,7,2,"div",19),e.qZA()(),e.TgZ(86,"div",47)(87,"cd-form-button-panel",48),e.NdJ("submitActionEvent",function(){return e.CHM(_),e.oxw().onSubmit()}),e.ALo(88,"titlecase"),e.ALo(89,"upperFirst"),e.qZA()()()()()}if(2&t){const _=e.MAs(2),n=e.oxw();e.xp6(1),e.Q6J("formGroup",n.userForm),e.xp6(6),e.pQV(e.lcZ(6,30,n.action))(e.lcZ(7,32,n.resource)),e.QtT(5),e.xp6(3),e.Q6J("ngClass",e.VKq(38,l_,!n.editing)),e.xp6(3),e.Q6J("readonly",n.editing),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_id",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_id",_,"pattern")),e.xp6(1),e.Q6J("ngIf",!n.userForm.getValue("show_tenant")&&n.userForm.showError("user_id",_,"notUnique")),e.xp6(4),e.Q6J("readonly",!0),e.xp6(3),e.Q6J("ngIf",n.userForm.getValue("show_tenant")),e.xp6(2),e.Q6J("ngClass",e.VKq(40,l_,!n.editing)),e.xp6(4),e.Q6J("ngIf",n.userForm.showError("display_name",_,"pattern")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("display_name",_,"required")),e.xp6(6),e.Q6J("ngIf",n.userForm.showError("email",_,"email")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("email",_,"notUnique")),e.xp6(12),e.Q6J("ngIf",1==n.userForm.get("max_buckets_mode").value),e.xp6(7),e.Q6J("ngIf",!n.editing),e.xp6(1),e.Q6J("ngIf",n.editing),e.xp6(1),e.Q6J("ngIf",n.editing),e.xp6(1),e.Q6J("ngIf",n.editing),e.xp6(10),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value&&!n.userForm.getValue("user_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value&&!n.userForm.getValue("user_quota_max_objects_unlimited")),e.xp6(10),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value&&!n.userForm.getValue("bucket_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value&&!n.userForm.getValue("bucket_quota_max_objects_unlimited")),e.xp6(2),e.Q6J("form",n.userForm)("submitText",e.lcZ(88,34,n.action)+" "+e.lcZ(89,36,n.resource))}}let c_=(()=>{class t extends Xe.E{constructor(_,n,i,s,r,d,g){super(),this.formBuilder=_,this.route=n,this.router=i,this.rgwUserService=s,this.modalService=r,this.notificationService=d,this.actionLabels=g,this.editing=!1,this.submitObservables=[],this.icons=w.P,this.subusers=[],this.s3Keys=[],this.swiftKeys=[],this.capabilities=[],this.showTenant=!1,this.previousTenant=null,this.resource="user",this.subuserLabel="subuser",this.s3keyLabel="S3 Key",this.capabilityLabel="capability",this.editing=this.router.url.startsWith(`/rgw/user/${G.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[a.kI.required,a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[p.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[p.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[a.kI.required,a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_ -]+$/)]],email:[null,[p.h.email],[p.h.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[p.h.requiredIf({max_buckets_mode:"1"}),p.h.number(!1)]],suspended:[!1],generate_key:[!0],access_key:[null,[p.h.requiredIf({generate_key:!1})]],secret_key:[null,[p.h.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[p.h.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[a.kI.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[p.h.requiredIf({user_quota_enabled:!0,user_quota_max_objects_unlimited:!1})]],bucket_quota_enabled:[!1],bucket_quota_max_size_unlimited:[!0],bucket_quota_max_size:[null,[p.h.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[a.kI.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[p.h.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(_=>{if(!_.hasOwnProperty("uid"))return void this.loadingReady();const n=decodeURIComponent(_.uid),i=[];i.push(this.rgwUserService.get(n)),i.push(this.rgwUserService.getQuota(n)),(0,te.D)(i).subscribe(s=>{const r=R().clone(this.userForm.value);let d=R().pick(s[0],R().keys(this.userForm.value));switch(d.max_buckets){case-1:d.max_buckets_mode=-1,d.max_buckets="";break;case 0:d.max_buckets_mode=0,d.max_buckets="";break;default:d.max_buckets_mode=1}["user","bucket"].forEach(E=>{const S=s[1][E+"_quota"];d[E+"_quota_enabled"]=S.enabled,S.max_size<0?(d[E+"_quota_max_size_unlimited"]=!0,d[E+"_quota_max_size"]=null):(d[E+"_quota_max_size_unlimited"]=!1,d[E+"_quota_max_size"]=`${S.max_size} B`),S.max_objects<0?(d[E+"_quota_max_objects_unlimited"]=!0,d[E+"_quota_max_objects"]=null):(d[E+"_quota_max_objects_unlimited"]=!1,d[E+"_quota_max_objects"]=S.max_objects)}),d=R().merge(r,d),this.userForm.setValue(d),this.subusers=s[0].subusers,this.s3Keys=s[0].keys,this.swiftKeys=s[0].swift_keys;const g={"read, write":"*"};s[0].caps.forEach(E=>{E.perm in g&&(E.perm=g[E.perm])}),this.capabilities=s[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let _;if(this.userForm.pristine)return void this.goToListView();const n=this.getUID();if(this.editing){if(this._isGeneralDirty()){const i=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(n,i))}_="Updated Object Gateway user '" + n + "'"}else{const i=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(i)),_="Created Object Gateway user '" + n + "'"}if(this._isUserQuotaDirty()){const i=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(n,i))}if(this._isBucketQuotaDirty()){const i=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(n,i))}(0,On.z)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show(ne.k.success,_),this.goToListView()}})}updateFieldsWhenTenanted(){this.showTenant=this.userForm.getValue("show_tenant"),this.showTenant?(this.userForm.get("user_id").markAsTouched(),this.previousTenant=this.userForm.get("tenant").value,this.userForm.get("tenant").patchValue(null)):(this.userForm.get("user_id").markAsUntouched(),this.userForm.get("tenant").patchValue(this.previousTenant))}getUID(){var _;let n=this.userForm.getValue("user_id");const i=null===(_=this.userForm)||void 0===_?void 0:_.getValue("tenant");return i&&i.length>0&&(n=`${this.userForm.getValue("tenant")}$${n}`),n}quotaMaxSizeValidator(_){return(0,p.P)(_.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(_.value)||(new De.H).toBytes(_.value)<1024?{quotaMaxSize:!0}:null}setSubuser(_,n){const i={"full-control":"full","read-write":"readwrite"},s=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(s,{subuser:_.id,access:_.permissions in i?i[_.permissions]:_.permissions,key_type:"swift",secret_key:_.secret_key,generate_secret:_.generate_secret?"true":"false"})),R().isNumber(n)?this.subusers[n]=_:(this.subusers.push(_),this.swiftKeys.push({user:_.id,secret_key:_.generate_secret?"Apply your changes first...":_.secret_key})),this.userForm.markAsDirty()}deleteSubuser(_){const n=this.subusers[_];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),n.id)),this.s3Keys=this.s3Keys.filter(i=>i.user!==n.id),this.swiftKeys=this.swiftKeys.filter(i=>i.user!==n.id),this.subusers.splice(_,1),this.userForm.markAsDirty()}setCapability(_,n){const i=this.getUID();if(R().isNumber(n)){const s=this.capabilities[n];this.submitObservables.push(this.rgwUserService.deleteCapability(i,s.type,s.perm)),this.submitObservables.push(this.rgwUserService.addCapability(i,_.type,_.perm)),this.capabilities[n]=_}else this.submitObservables.push(this.rgwUserService.addCapability(i,_.type,_.perm)),this.capabilities=[...this.capabilities,_];this.userForm.markAsDirty()}deleteCapability(_){const n=this.capabilities[_];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),n.type,n.perm)),this.capabilities.splice(_,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(_){return!R().difference(s_.getAll(),R().map(_,"type")).length}setS3Key(_,n){if(!R().isNumber(n)){const i=_.user.match(/([^:]+)(:(.+))?/),s=i[1],r={subuser:i[2]?i[3]:"",generate_key:_.generate_key?"true":"false"};"false"===r.generate_key&&(R().isNil(_.access_key)||(r.access_key=_.access_key),R().isNil(_.secret_key)||(r.secret_key=_.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(s,r)),this.s3Keys.push({user:_.user,access_key:_.generate_key?"Apply your changes first...":_.access_key,secret_key:_.generate_key?"Apply your changes first...":_.secret_key})}this.userForm.markAsDirty()}deleteS3Key(_){const n=this.s3Keys[_];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),n.access_key)),this.s3Keys.splice(_,1),this.userForm.markAsDirty()}showSubuserModal(_){const n=this.getUID(),i=this.modalService.show(no);if(R().isNumber(_)){const s=this.subusers[_];i.componentInstance.setEditing(),i.componentInstance.setValues(n,s.id,s.permissions)}else i.componentInstance.setEditing(!1),i.componentInstance.setValues(n),i.componentInstance.setSubusers(this.subusers);i.componentInstance.submitAction.subscribe(s=>{this.setSubuser(s,_)})}showS3KeyModal(_){const n=this.modalService.show(a_);if(R().isNumber(_)){const i=this.s3Keys[_];n.componentInstance.setViewing(),n.componentInstance.setValues(i.user,i.access_key,i.secret_key)}else{const i=this._getS3KeyUserCandidates();n.componentInstance.setViewing(!1),n.componentInstance.setUserCandidates(i),n.componentInstance.submitAction.subscribe(s=>{this.setS3Key(s)})}}showSwiftKeyModal(_){const n=this.modalService.show(r_),i=this.swiftKeys[_];n.componentInstance.setValues(i.user,i.secret_key)}showCapabilityModal(_){const n=this.modalService.show(Ln);if(R().isNumber(_)){const i=this.capabilities[_];n.componentInstance.setEditing(),n.componentInstance.setValues(i.type,i.perm)}else n.componentInstance.setEditing(!1),n.componentInstance.setCapabilities(this.capabilities);n.componentInstance.submitAction.subscribe(i=>{this.setCapability(i,_)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","suspended"].some(_=>this.userForm.get(_).dirty)}_isUserQuotaDirty(){return["user_quota_enabled","user_quota_max_size_unlimited","user_quota_max_size","user_quota_max_objects_unlimited","user_quota_max_objects"].some(_=>this.userForm.get(_).dirty)}_isBucketQuotaDirty(){return["bucket_quota_enabled","bucket_quota_max_size_unlimited","bucket_quota_max_size","bucket_quota_max_objects_unlimited","bucket_quota_max_objects"].some(_=>this.userForm.get(_).dirty)}_getCreateArgs(){const _={uid:this.getUID(),display_name:this.userForm.getValue("display_name"),suspended:this.userForm.getValue("suspended"),email:"",max_buckets:this.userForm.getValue("max_buckets"),generate_key:this.userForm.getValue("generate_key"),access_key:"",secret_key:""},n=this.userForm.getValue("email");R().isString(n)&&n.length>0&&R().merge(_,{email:n}),this.userForm.getValue("generate_key")||R().merge(_,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const s=parseInt(this.userForm.getValue("max_buckets_mode"),10);return R().includes([-1,0],s)&&R().merge(_,{max_buckets:s}),_}_getUpdateArgs(){const _={},n=["display_name","email","max_buckets","suspended"];for(const s of n)_[s]=this.userForm.getValue(s);const i=parseInt(this.userForm.getValue("max_buckets_mode"),10);return R().includes([-1,0],i)&&(_.max_buckets=i),_}_getUserQuotaArgs(){const _={quota_type:"user",enabled:this.userForm.getValue("user_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("user_quota_max_size_unlimited")){const n=(new De.H).toBytes(this.userForm.getValue("user_quota_max_size"));_.max_size_kb=(n/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(_.max_objects=this.userForm.getValue("user_quota_max_objects")),_}_getBucketQuotaArgs(){const _={quota_type:"bucket",enabled:this.userForm.getValue("bucket_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("bucket_quota_max_size_unlimited")){const n=(new De.H).toBytes(this.userForm.getValue("bucket_quota_max_size"));_.max_size_kb=(n/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(_.max_objects=this.userForm.getValue("bucket_quota_max_objects")),_}_getS3KeyUserCandidates(){let _=[];const n=this.getUID();return R().isString(n)&&!R().isEmpty(n)&&_.push(n),this.subusers.forEach(i=>{_.push(i.id)}),this.s3Keys.forEach(i=>{_.push(i.user)}),_=R().uniq(_),_}onMaxBucketsModeChange(_){"1"===_&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Y.O),e.Y36(H.gz),e.Y36(H.F0),e.Y36(D),e.Y36(ie.Z),e.Y36(he.g),e.Y36(G.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-form"]],features:[e.qOj],decls:1,vars:1,consts:function(){let o,_,n,i,s,r,d,g,E,S,P,O,N,b,m,W,$,U,I,v,F,h,L,y,f,x,T,q,B,C,ae,re,le,ce,de,ue,Re,Ee,ge,fe,Se,Te,Ce,Me,pe,me,Ae,Ge,Pe,Oe,u,R_,E_,g_,f_,S_,T_,C_,M_,p_,m_,A_,G_,P_,O_,N_,b_,W_;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="User ID",n="Show Tenant",i="Full name",s="Email address",r="Max. buckets",d="Disabled",g="Unlimited",E="Custom",S="Suspended",P="User quota",O="Enabled",N="Bucket quota",b="Enabled",m="This field is required.",W="The value is not valid.",$="The chosen user ID is already in use.",U="Tenant",I="The value is not valid.",v="The chosen user ID exists in this tenant.",F="The value is not valid.",h="This field is required.",L="This is not a valid email address.",y="The chosen email address is already in use.",f="This field is required.",x="The entered value must be >= 1.",T="S3 key",q="Auto-generate key",B="Access key",C="This field is required.",ae="Secret key",re="This field is required.",le="Subusers",ce="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",de="There are no subusers.",ue="Edit",Re="Delete",Ee="Keys",ge="S3",fe="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",Se="Swift",Te="There are no keys.",Ce="Show",Me="Delete",pe="There are no keys.",me="Show",Ae="Capabilities",Ge="All capabilities are already added.",Pe="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",Oe="There are no capabilities.",u="Edit",R_="Delete",E_="Unlimited size",g_="Max. size",f_="This field is required.",S_="The value is not valid.",T_="Unlimited objects",C_="Max. objects",M_="This field is required.",p_="The entered value must be >= 0.",m_="Unlimited size",A_="Max. size",G_="This field is required.",P_="The value is not valid.",O_="Unlimited objects",N_="Max. objects",b_="This field is required.",W_="The entered value must be >= 0.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],o,[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","user_id","type","text","formControlName","user_id",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","show_tenant","type","checkbox","formControlName","show_tenant",1,"custom-control-input",3,"readonly","click"],["for","show_tenant",1,"custom-control-label"],n,["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],i,["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],s,["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],r,["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-select",3,"change"],["value","-1"],d,["value","0"],g,["value","1"],E,["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],S,[4,"ngIf"],P,["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],O,N,["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],b,[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],m,W,$,["for","tenant",1,"cd-col-form-label"],U,["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],I,v,F,h,L,y,[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],f,x,T,["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],q,["for","access_key",1,"cd-col-form-label","required"],B,[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],C,["for","secret_key",1,"cd-col-form-label","required"],ae,["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],re,le,[1,"row"],["class","no-border",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"row","my-2"],[1,"col-12"],["type","button",1,"btn","btn-light","float-end","tc_addSubuserButton",3,"click"],[3,"ngClass"],ce,[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],de,[1,"input-group-text"],["type","text","readonly","",1,"cd-form-control",3,"value"],["type","button","ngbTooltip",ue,1,"btn","btn-light","tc_showSubuserButton",3,"click"],["type","button","ngbTooltip",Re,1,"btn","btn-light","tc_deleteSubuserButton",3,"click"],Ee,ge,["type","button",1,"btn","btn-light","float-end","tc_addS3KeyButton",3,"click"],fe,Se,Te,["type","button","ngbTooltip",Ce,1,"btn","btn-light","tc_showS3KeyButton",3,"click"],["type","button","ngbTooltip",Me,1,"btn","btn-light","tc_deleteS3KeyButton",3,"click"],pe,["type","button","ngbTooltip",me,1,"btn","btn-light","tc_showSwiftKeyButton",3,"click"],Ae,["type","button","ngbTooltip",Ge,"triggers","pointerenter:pointerleave",1,"btn","btn-light","float-end","tc_addCapButton",3,"disabled","disableTooltip","click"],Pe,Oe,["type","button","ngbTooltip",u,1,"btn","btn-light","tc_editCapButton",3,"click"],["type","button","ngbTooltip",R_,1,"btn","btn-light","tc_deleteCapButton",3,"click"],["id","user_quota_max_size_unlimited","type","checkbox","formControlName","user_quota_max_size_unlimited",1,"custom-control-input"],["for","user_quota_max_size_unlimited",1,"custom-control-label"],E_,["for","user_quota_max_size",1,"cd-col-form-label","required"],g_,["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],f_,S_,["id","user_quota_max_objects_unlimited","type","checkbox","formControlName","user_quota_max_objects_unlimited",1,"custom-control-input"],["for","user_quota_max_objects_unlimited",1,"custom-control-label"],T_,["for","user_quota_max_objects",1,"cd-col-form-label","required"],C_,["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects","min","0",1,"form-control"],M_,p_,["id","bucket_quota_max_size_unlimited","type","checkbox","formControlName","bucket_quota_max_size_unlimited",1,"custom-control-input"],["for","bucket_quota_max_size_unlimited",1,"custom-control-label"],m_,["for","bucket_quota_max_size",1,"cd-col-form-label","required"],A_,["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],G_,P_,["id","bucket_quota_max_objects_unlimited","type","checkbox","formControlName","bucket_quota_max_objects_unlimited",1,"custom-control-input"],["for","bucket_quota_max_objects_unlimited",1,"custom-control-label"],O_,["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],N_,["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects","min","0",1,"form-control"],b_,W_]},template:function(_,n){1&_&&e.YNc(0,Vo,90,42,"div",0),2&_&&e.Q6J("cdFormLoading",n.loading)},directives:[ze.y,a._Y,a.JL,J.V,a.sg,X.P,M.mk,k.o,a.Fj,K.b,a.JJ,a.u,M.O5,a.Wl,se.U,a.EJ,a.YN,a.Kr,a.wV,a.qQ,Ie.C,ve.s,M.sg,A._L,io.Q,V.p],pipes:[M.rS,j.m,we.i],styles:[""]}),t})();var d_=l(99466),jo=l(78877),ei=l(86969);const _i=["accessKeyTpl"],ti=["secretKeyTpl"];function ni(t,o){if(1&t&&(e.TgZ(0,"tr")(1,"td",15),e.SDv(2,20),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA()()),2&t){const _=e.oxw(4);e.xp6(4),e.Oqu(_.user.email)}}function oi(t,o){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.xp6(1),e.AsE(" ",_.id," (",_.permissions,") ")}}function ii(t,o){if(1&t&&(e.TgZ(0,"tr")(1,"td",15),e.SDv(2,21),e.qZA(),e.TgZ(3,"td"),e.YNc(4,oi,2,2,"div",22),e.qZA()()),2&t){const _=e.oxw(4);e.xp6(4),e.Q6J("ngForOf",_.user.subusers)}}function si(t,o){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.xp6(1),e.AsE(" ",_.type," (",_.perm,") ")}}function ai(t,o){if(1&t&&(e.TgZ(0,"tr")(1,"td",15),e.SDv(2,23),e.qZA(),e.TgZ(3,"td"),e.YNc(4,si,2,2,"div",22),e.qZA()()),2&t){const _=e.oxw(4);e.xp6(4),e.Q6J("ngForOf",_.user.caps)}}function ri(t,o){if(1&t&&(e.TgZ(0,"tr")(1,"td",15),e.SDv(2,24),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"join"),e.qZA()()),2&t){const _=e.oxw(4);e.xp6(4),e.Oqu(e.lcZ(5,1,_.user.mfa_ids))}}function li(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function ci(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,29),e.qZA())}function di(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.user.user_quota.max_size)," ")}}function ui(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Ri(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,30),e.qZA())}function Ei(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",_.user.user_quota.max_objects," ")}}function gi(t,o){if(1&t&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,25),e.qZA(),e.TgZ(3,"table",9)(4,"tbody")(5,"tr")(6,"td",10),e.SDv(7,26),e.qZA(),e.TgZ(8,"td",12),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",15),e.SDv(13,27),e.qZA(),e.YNc(14,li,2,0,"td",0),e.YNc(15,ci,2,0,"td",0),e.YNc(16,di,3,3,"td",0),e.qZA(),e.TgZ(17,"tr")(18,"td",15),e.SDv(19,28),e.qZA(),e.YNc(20,ui,2,0,"td",0),e.YNc(21,Ri,2,0,"td",0),e.YNc(22,Ei,2,1,"td",0),e.qZA()()()()),2&t){const _=e.oxw(4);e.xp6(9),e.Oqu(e.lcZ(10,7,_.user.user_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!_.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!_.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_objects>-1)}}function fi(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Si(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,35),e.qZA())}function Ti(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.user.bucket_quota.max_size)," ")}}function Ci(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Mi(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,36),e.qZA())}function pi(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",_.user.bucket_quota.max_objects," ")}}function mi(t,o){if(1&t&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,31),e.qZA(),e.TgZ(3,"table",9)(4,"tbody")(5,"tr")(6,"td",10),e.SDv(7,32),e.qZA(),e.TgZ(8,"td",12),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",15),e.SDv(13,33),e.qZA(),e.YNc(14,fi,2,0,"td",0),e.YNc(15,Si,2,0,"td",0),e.YNc(16,Ti,3,3,"td",0),e.qZA(),e.TgZ(17,"tr")(18,"td",15),e.SDv(19,34),e.qZA(),e.YNc(20,Ci,2,0,"td",0),e.YNc(21,Mi,2,0,"td",0),e.YNc(22,pi,2,1,"td",0),e.qZA()()()()),2&t){const _=e.oxw(4);e.xp6(9),e.Oqu(e.lcZ(10,7,_.user.bucket_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!_.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!_.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_objects>-1)}}function Ai(t,o){if(1&t&&(e.TgZ(0,"div")(1,"table",9)(2,"tbody")(3,"tr")(4,"td",10),e.SDv(5,11),e.qZA(),e.TgZ(6,"td",12),e._uU(7),e.qZA()(),e.TgZ(8,"tr")(9,"td",10),e.SDv(10,13),e.qZA(),e.TgZ(11,"td",12),e._uU(12),e.qZA()(),e.TgZ(13,"tr")(14,"td",10),e.SDv(15,14),e.qZA(),e.TgZ(16,"td",12),e._uU(17),e.qZA()(),e.TgZ(18,"tr")(19,"td",15),e.SDv(20,16),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.qZA()(),e.YNc(23,ni,5,1,"tr",0),e.TgZ(24,"tr")(25,"td",15),e.SDv(26,17),e.qZA(),e.TgZ(27,"td"),e._uU(28),e.ALo(29,"booleanText"),e.qZA()(),e.TgZ(30,"tr")(31,"td",15),e.SDv(32,18),e.qZA(),e.TgZ(33,"td"),e._uU(34),e.ALo(35,"booleanText"),e.qZA()(),e.TgZ(36,"tr")(37,"td",15),e.SDv(38,19),e.qZA(),e.TgZ(39,"td"),e._uU(40),e.ALo(41,"map"),e.qZA()(),e.YNc(42,ii,5,1,"tr",0),e.YNc(43,ai,5,1,"tr",0),e.YNc(44,ri,6,3,"tr",0),e.qZA()(),e.YNc(45,gi,23,9,"div",0),e.YNc(46,mi,23,9,"div",0),e.qZA()),2&t){const _=e.oxw(3);e.xp6(7),e.Oqu(_.user.tenant),e.xp6(5),e.Oqu(_.user.user_id),e.xp6(5),e.Oqu(_.user.uid),e.xp6(5),e.Oqu(_.user.display_name),e.xp6(1),e.Q6J("ngIf",null==_.user.email?null:_.user.email.length),e.xp6(5),e.Oqu(e.lcZ(29,13,_.user.suspended)),e.xp6(6),e.Oqu(e.lcZ(35,15,"true"===_.user.system)),e.xp6(6),e.Oqu(e.xi3(41,17,_.user.max_buckets,_.maxBucketsMap)),e.xp6(2),e.Q6J("ngIf",_.user.subusers&&_.user.subusers.length),e.xp6(1),e.Q6J("ngIf",_.user.caps&&_.user.caps.length),e.xp6(1),e.Q6J("ngIf",null==_.user.mfa_ids?null:_.user.mfa_ids.length),e.xp6(1),e.Q6J("ngIf",_.user.user_quota),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota)}}function Gi(t,o){if(1&t&&e.YNc(0,Ai,47,20,"div",0),2&t){const _=e.oxw(2);e.Q6J("ngIf",_.user)}}const Pi=function(t){return[t]};function Oi(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table",39),e.NdJ("updateSelection",function(i){return e.CHM(_),e.oxw(3).updateKeysSelection(i)}),e.TgZ(1,"div",40)(2,"div",41)(3,"button",42),e.NdJ("click",function(){return e.CHM(_),e.oxw(3).showKeyModal()}),e._UZ(4,"i",43),e.ynx(5),e.SDv(6,44),e.BQk(),e.qZA()()()()}if(2&t){const _=e.oxw(3);e.Q6J("data",_.keys)("columns",_.keysColumns),e.xp6(3),e.Q6J("disabled",!_.keysSelection.hasSingleSelection),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Pi,_.icons.show))}}function Ni(t,o){1&t&&(e.ynx(0,37),e.TgZ(1,"a",4),e.SDv(2,38),e.qZA(),e.YNc(3,Oi,7,6,"ng-template",6),e.BQk())}function bi(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"nav",1,2),e.ynx(3,3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,Gi,1,1,"ng-template",6),e.BQk(),e.YNc(7,Ni,4,0,"ng-container",7),e.qZA(),e._UZ(8,"div",8),e.BQk()),2&t){const _=e.MAs(2),n=e.oxw();e.xp6(7),e.Q6J("ngIf",n.keys.length),e.xp6(1),e.Q6J("ngbNavOutlet",_)}}let Wi=(()=>{class t{constructor(_,n){this.rgwUserService=_,this.modalService=n,this.keys=[],this.keysColumns=[],this.keysSelection=new ye.r,this.icons=w.P}ngOnInit(){this.keysColumns=[{name:"Username",prop:"username",flexGrow:1},{name:"Type",prop:"type",flexGrow:1}],this.maxBucketsMap={"-1":"Disabled",0:"Unlimited"}}ngOnChanges(){this.selection&&(this.user=this.selection,this.user.subusers=R().sortBy(this.user.subusers,"id"),this.user.caps=R().sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(_=>{R().extend(this.user,_)}),this.keys=[],this.user.keys&&this.user.keys.forEach(_=>{this.keys.push({id:this.keys.length+1,type:"S3",username:_.user,ref:_})}),this.user.swift_keys&&this.user.swift_keys.forEach(_=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:_.user,ref:_})}),this.keys=R().sortBy(this.keys,"user"))}updateKeysSelection(_){this.keysSelection=_}showKeyModal(){const _=this.keysSelection.first(),n=this.modalService.show("S3"===_.type?a_:r_);switch(_.type){case"S3":n.componentInstance.setViewing(),n.componentInstance.setValues(_.ref.user,_.ref.access_key,_.ref.secret_key);break;case"Swift":n.componentInstance.setValues(_.ref.user,_.ref.secret_key)}}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(D),e.Y36(ie.Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-details"]],viewQuery:function(_,n){if(1&_&&(e.Gf(_i,5),e.Gf(ti,5)),2&_){let i;e.iGM(i=e.CRH())&&(n.accessKeyTpl=i.first),e.iGM(i=e.CRH())&&(n.secretKeyTpl=i.first)}},inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let o,_,n,i,s,r,d,g,E,S,P,O,N,b,m,W,$,U,I,v,F,h,L,y,f,x;return o="Details",_="Tenant",n="User ID",i="Username",s="Full name",r="Suspended",d="System",g="Maximum buckets",E="Email address",S="Subusers",P="Capabilities",O="MFAs(Id)",N="User quota",b="Enabled",m="Maximum size",W="Maximum objects",$="Unlimited",U="Unlimited",I="Bucket quota",v="Enabled",F="Maximum size",h="Maximum objects",L="Unlimited",y="Unlimited",f="Keys",x="Show",[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-user-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],o,["ngbNavContent",""],["ngbNavItem","keys",4,"ngIf"],[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],_,[1,"w-75"],n,i,[1,"bold"],s,r,d,g,E,S,[4,"ngFor","ngForOf"],P,O,N,b,m,W,$,U,I,v,F,h,L,y,["ngbNavItem","keys"],f,["columnMode","flex","selectionType","multi","forceIdentifier","true",3,"data","columns","updateSelection"],[1,"table-actions"],["dropdown","",1,"btn-group"],["type","button",1,"btn","btn-accent",3,"disabled","click"],[3,"ngClass"],x]},template:function(_,n){1&_&&e.YNc(0,bi,9,2,"ng-container",0),2&_&&e.Q6J("ngIf",n.selection)},directives:[M.O5,A.Pz,o_.m,A.nv,A.Vx,A.uN,M.sg,ee.a,k.o,M.mk,A.tO],pipes:[t_.T,jo.b,ei.A,je.$],styles:[""]}),t})();const $i=["userSizeTpl"],Ui=["userObjectTpl"];function Ii(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",8),2&t){const _=e.oxw().row;e.Q6J("total",_.user_quota.max_size)("used",_.stats.size_actual)}}function vi(t,o){1&t&&e.SDv(0,9)}function Fi(t,o){if(1&t&&(e.YNc(0,Ii,1,2,"cd-usage-bar",6),e.YNc(1,vi,1,0,"ng-template",null,7,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.user_quota.max_size>0&&_.user_quota.enabled)("ngIfElse",n)}}function hi(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",12),2&t){const _=e.oxw().row;e.Q6J("total",_.user_quota.max_objects)("used",_.stats.num_objects)("isBinary",!1)}}function Li(t,o){1&t&&e.SDv(0,13)}function yi(t,o){if(1&t&&(e.YNc(0,hi,1,3,"cd-usage-bar",10),e.YNc(1,Li,1,0,"ng-template",null,11,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.user_quota.max_objects>0&&_.user_quota.enabled)("ngIfElse",n)}}let xi=(()=>{class t extends Le.o{constructor(_,n,i,s,r,d){super(d),this.authStorageService=_,this.rgwUserService=n,this.modalService=i,this.urlBuilder=s,this.actionLabels=r,this.ngZone=d,this.columns=[],this.users=[],this.selection=new ye.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Username",prop:"uid",flexGrow:1},{name:"Tenant",prop:"tenant",flexGrow:1},{name:"Full name",prop:"display_name",flexGrow:1},{name:"Email address",prop:"email",flexGrow:1},{name:"Suspended",prop:"suspended",flexGrow:1,cellClass:"text-center",cellTransformation:d_.e.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:d_.e.map,customTemplateConfig:{"-1":"Disabled",0:"Unlimited"}},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.userSizeTpl,flexGrow:.8},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.userObjectTpl,flexGrow:.8}];const _=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().uid)}`;this.tableActions=[{permission:"create",icon:w.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:r=>!r.hasSelection},{permission:"update",icon:w.P.edit,routerLink:()=>this.urlBuilder.getEdit(_()),name:this.actionLabels.EDIT},{permission:"delete",icon:w.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:r=>r.hasMultiSelection}],this.setTableRefreshTimeout()}getUserList(_){this.setTableRefreshTimeout(),this.rgwUserService.list().subscribe(n=>{this.users=n},()=>{_.error()})}updateSelection(_){this.selection=_}deleteAction(){this.modalService.show(Ve.M,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(_=>_.uid),submitActionObservable:()=>new Je.y(_=>{(0,te.D)(this.selection.selected.map(n=>this.rgwUserService.delete(n.uid))).subscribe({error:n=>{_.error(n),this.table.refreshBtn()},complete:()=>{_.complete(),this.table.refreshBtn()}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36($e.j),e.Y36(D),e.Y36(ie.Z),e.Y36(_e.F),e.Y36(G.p4),e.Y36(e.R0b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-list"]],viewQuery:function(_,n){if(1&_&&(e.Gf(ee.a,7),e.Gf($i,7),e.Gf(Ui,7)),2&_){let i;e.iGM(i=e.CRH())&&(n.table=i.first),e.iGM(i=e.CRH())&&(n.userSizeTpl=i.first),e.iGM(i=e.CRH())&&(n.userObjectTpl=i.first)}},features:[e._Bn([{provide:_e.F,useValue:new _e.F("rgw/user")}]),e.qOj],decls:8,vars:9,consts:function(){let o,_;return o="No Limit",_="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","uid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["userSizeTpl",""],["userObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],o,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],_]},template:function(_,n){1&_&&(e.TgZ(0,"cd-table",0,1),e.NdJ("setExpandedRow",function(s){return n.setExpandedRow(s)})("updateSelection",function(s){return n.updateSelection(s)})("fetchData",function(s){return n.getUserList(s)}),e._UZ(2,"cd-table-actions",2)(3,"cd-rgw-user-details",3),e.qZA(),e.YNc(4,Fi,3,2,"ng-template",null,4,e.W1O),e.YNc(6,yi,3,2,"ng-template",null,5,e.W1O)),2&_&&(e.Q6J("autoReload",!1)("data",n.users)("columns",n.columns)("hasDetails",!0)("status",n.tableStatus),e.xp6(2),e.Q6J("permission",n.permission)("selection",n.selection)("tableActions",n.tableActions),e.xp6(1),e.Q6J("selection",n.expandedRow))},directives:[ee.a,__.K,Wi,M.O5,n_.O],styles:[""]}),t})(),u_=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[M.ez,$_.m,a.u5,a.UX,U_.B,A.Oz,H.Bz,A.HK,we.b]]}),t})();const Zi=[{path:""},{path:"daemon",component:Pn,data:{breadcrumbs:"Daemons"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:xi},{path:G.MQ.CREATE,component:c_,data:{breadcrumbs:G.Qn.CREATE}},{path:`${G.MQ.EDIT}/:uid`,component:c_,data:{breadcrumbs:G.Qn.EDIT}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:cn},{path:G.MQ.CREATE,component:Ye,data:{breadcrumbs:G.Qn.CREATE}},{path:`${G.MQ.EDIT}/:bid`,component:Ye,data:{breadcrumbs:G.Qn.EDIT}}]}];let wi=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[u_,H.Bz.forChild(Zi)]]}),t})()}}]);
\ No newline at end of file