import{m as v,n as A}from"./chunk-SM7EQ7ST.js";import{e as t,f as u,oi as s,pi as l}from"./chunk-BPZQKZKD.js";import{be as f,ta as h,xa as c}from"./chunk-WL5U2YIT.js";import{a as o,e as d}from"./chunk-ADEKKGI2.js";var P,S=d(()=>{u();l();f();A();P=(()=>{let n=class n{constructor(i){this.serverInformationService=i,this.subscribeToPublicServerInformationChange()}getMainAuthentication(){let i;return this.authenticationsDetails.forEach(e=>{if(e.type===t.Domain){let a=e.domains?.find(m=>m.isMain===!0);a&&(i=new s(o({},e)),i.domains=[a])}else e.isMain===!0&&(i=new s(e))}),i}subscribeToPublicServerInformationChange(){this.serverInformationService.publicServerInformationChange.subscribe(i=>this.initServerProperties(i))}initServerProperties(i){this.serverVersion=i?.version,this.authenticationsDetails=i?.authenticationsDetails??[],this.hasAuthenticationWithAD=!!i?.authenticationsDetails.find(e=>e.type===t.Domain),this.hasAuthenticationAzureAD=this.serverInformationService.isAuthenticationProviderEnabled(t.AzureAD),this.hasAuthenticationWithDvls=this.serverInformationService.isAuthenticationProviderEnabled(t.Builtin),this.hasAuthenticationWithDatabase=this.serverInformationService.isAuthenticationProviderEnabled(t.SqlServer),this.hasAuthenticationWithOkta=this.serverInformationService.isAuthenticationProviderEnabled(t.Okta),this.hasAuthenticationWithPingOne=this.serverInformationService.isAuthenticationProviderEnabled(t.PingOne),this.hasAuthenticationWithContractor=this.serverInformationService.isAuthenticationProviderEnabled(t.Contractor),this.hasEmergencyLogin=i?.enableEmergencyLogin||!1,this.hasServerInformationError=this.serverInformationService?.hasError,this.isSSOEnabled=i?.windowsAuthenticationEnabled??!1,this.hideDomainLoginWhenSSOEnabled=i?.hideDomainLoginWhenSSOEnabled??!1,this.serverCustomImage=i?.serverLogoLarge?`data:image/png;base64,${this.serverInformationService.publicServerInformation.serverLogoLarge}`:""}};n.\u0275fac=function(e){return new(e||n)(c(v))},n.\u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})()});export{P as a,S as b};
