import {J as J$1,c as tS,i as S,U as RN,H as ul,L as w,ab as LN,N as Sr,f as QT,ic as _ne,ie as Gz,id as Uz,u as R$1,cE as py,d8 as CM,bv as Vy,bw as y_,bx as v_,a6 as pi,bP as he,ad as ce,bp as QC,a0 as ks,a2 as Uu,bz as f_,br as ZC,A as Iw,a4 as Sy,v as W_,z as vM,C as Qu,F as EM,c2 as iv,ce as zy}from'./main-WUGO6e7n.js';var R,$=J$1(()=>{pi();tS();R=(()=>{class e{constructor(){this.showDialogSource=new he,this.showDialogObservable=this.showDialogSource.asObservable();}show(t,i,a){this.showDialogSource.next({certificates:t,acceptFunction:i,noteKey:a});}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275prov=ce({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();});function P(e,n){e&1&&(ks(0,"div",1),W_(1),vM(2,"translate"),Uu()),e&2&&(Iw(),Qu(" ",EM(2,1,"SomeDomainControllerCertificatesAreNotTrusted")," "));}function q(e,n){e&1&&(ks(0,"div",1),W_(1),vM(2,"translate"),Uu()),e&2&&(Iw(),Qu(" ",EM(2,1,"SomeDomainControllersCouldNotBeReached")," "));}function L(e,n){e&1&&(ks(0,"div",1),W_(1),vM(2,"translate"),Uu()),e&2&&(Iw(),Qu(" ",EM(2,1,"AllDomainControllerCertificatesAreTrusted")," "));}function W(e,n){if(e&1&&(ks(0,"div",2),W_(1),vM(2,"translate"),Uu()),e&2){let t=f_(2);Iw(),Qu(" ",EM(2,1,t.noteKey)," ");}}function z(e,n){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=n.$implicit;Qu(" ",EM(1,1,t.header)," ");}}function G(e,n){if(e&1&&(ks(0,"span",7),W_(1),Uu()),e&2){let t=n.$implicit;Sy("title",t.thumbprint),Iw(),iv(t.thumbprint);}}function J(e,n){if(e&1&&(ks(0,"span",8),W_(1),Uu()),e&2){let t=f_().$implicit;Iw(),iv(t.status);}}function X(e,n){if(e&1&&(ks(0,"span"),W_(1),Uu()),e&2){let t=f_().$implicit;zy("text-danger",!t.isTrusted),Iw(),iv(t.status);}}function Y(e,n){if(e&1&&QC(0,J,2,1,"span",8)(1,X,2,3,"span",9),e&2){let t=n.$implicit;ZC(t.hasError?0:1);}}function Z(e,n){if(e&1&&(QC(0,P,3,3,"div",1)(1,q,3,3,"div",1)(2,L,3,3,"div",1),QC(3,W,3,3,"div",2),ks(4,"dvl-table",3),py(5,z,2,3,"ng-template",4)(6,G,2,2,"ng-template",5)(7,Y,2,1,"ng-template",6),Uu()),e&2){let t=f_();ZC(t.hasUntrustedCertificates?0:t.hasUnreachableHosts?1:2),Iw(3),ZC(t.noteKey?3:-1),Iw(),Sy("value",t.rows)("columns",t.columns);}}var M,mt,tt=J$1(()=>{tS();$();S();RN();ul();tS();M=["certificatesContent"];mt=(()=>{class e{constructor(){this.certificateCheckService=w(R),this.dvlConfirmationService=w(LN),this.translatorService=w(Sr),this.columns=[{field:"host",header:"lblHost"},{field:"issuedTo",header:"lblIssuedTo"},{field:"issuedBy",header:"lblIssuedBy"},{field:"thumbprint",header:"lblThumbprint",width:"160px",maxWidth:"160px"},{field:"status",header:"lblStatus"}],this.rows=[],this.hasUntrustedCertificates=!1,this.hasUnreachableHosts=!1;}ngOnInit(){this.certificateCheckService.showDialogObservable.subscribe(t=>{let i=t.certificates.filter(a=>!a.isTrusted&&a.certificate);this.hasUntrustedCertificates=i.length>0,this.hasUnreachableHosts=t.certificates.some(a=>!a.certificate),this.rows=t.certificates.map(a=>this.toRow(a)),this.noteKey=this.hasUntrustedCertificates?t.noteKey:null,this.dvlConfirmationService.confirm({intent:this.hasUntrustedCertificates?"warning":"default",title:this.translatorService.translate("lblCertificates"),message:"",width:"1040px",contentTemplate:this.certificatesContent,acceptLabel:this.translatorService.translate(this.hasUntrustedCertificates?"lblTrustCertificates":"lblOk"),rejectVisible:!1,cancelVisible:this.hasUntrustedCertificates,accept:()=>{this.hasUntrustedCertificates&&t.acceptFunction(i);}});});}toRow(t){return {host:t.host,issuedTo:t.certificate?.issuedToCN,issuedBy:t.certificate?.issuedByCN,thumbprint:t.certificate?.sha256Thumbprint,status:this.resolveStatus(t),isTrusted:t.isTrusted,hasError:!t.certificate}}resolveStatus(t){return t.certificate?this.translatorService.translate(t.isTrusted?"lblTrusted":"lblNotTrusted"):t.error}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275cmp=QT({type:e,selectors:[["dvls-certificate-check-dialog"]],viewQuery:function(i,a){if(i&1&&Vy(M,7),i&2){let x;y_(x=v_())&&(a.certificatesContent=x.first);}},decls:2,vars:0,consts:[["certificatesContent",""],[1,"pb-3"],[1,"pb-3","text-400"],["layout","content",3,"value","columns"],["dvlTableHeader",""],["dvlTableCell","thumbprint"],["dvlTableCell","status"],[1,"text-xs","truncate","block",3,"title"],[1,"text-danger"],[3,"text-danger"]],template:function(i,a){i&1&&py(0,Z,8,4,"ng-template",null,0,CM);},dependencies:[_ne,Gz,Uz,R$1],encapsulation:2,changeDetection:1});}}return e})();});export{$,R,mt as m,tt as t};