1import{a as m}from"./chunk-JWSAKKVQ.js";import{a as l}from"./chunk-LT72JKOL.js";import"./chunk-AHQSOXDD.js";import{a as p}from"./chunk-XBBEU2YL.js";import{a as S}from"./chunk-M7VQHQXJ.js";import{c}from"./chunk-BAGWPQZV.js";import{a as v}from"./chunk-WZBVDNS6.js";import"./chunk-3KOQRKYT.js";import"./chunk-MTKRVMUJ.js";import{c as h}from"./chunk-SHTGYNA2.js";import"./chunk-4YERUHPX.js";import{Ya as t,ac as a,da as n,zb as o}from"./chunk-DQGQ5ICO.js";import"./chunk-4IDNTCH7.js";var d=class s{constructor(e,i,r,g,u,f){this.userService=e;this.settingService=i;this.authService=r;this.helperService=g;this.appService=u;this.sharedSignalsService=f}user={};enabledBulkLoad=null;night=!1;enableSite={};htmlRoutes={};headerTitle="";topBar;logoTopBar;gov;linkAccess;ngOnInit(){this.activate()}openMenu(){window.location.href="/menu"}activate(){this.userService.getCurrent().subscribe({next:e=>{this.setUser(e)},error:e=>{this.setError(e)}}),this.enableSite.value="True",this.settingService.getGovCo().subscribe({next:e=>{this.setGovCo(e)},error:e=>{console.log(e)}}),this.headerTitle=this.settingService.settings.resources["Header.Title"],this.sharedSignalsService.headerTitle.set(this.headerTitle),window.sessionStorage.getItem("night")&&(this.night=window.sessionStorage.getItem("night")==="true"),this.settingService.settings.funcionality&&this.settingService.settings.funcionality.enabledBulkLoad!==void 0&&(this.enabledBulkLoad=this.settingService.settings.funcionality.enabledBulkLoad),this.validateSession()}logOut(e){window.localStorage.removeItem("token"),window.sessionStorage.removeItem("isDesktop"),this.user={},e||(window.location.href="/")}validateSession(){setInterval(()=>{this.authService.isSessionDead()&&(this.logOut(!0),this.helperService.sessionEndedMessage())},3e3)}back(){window.history.length===1?location.pathname="/":window.history.back()}setUser(e){e.hasPermissions=i=>{if(i&&i.length){for(var r=0;r<i.length;r++)if(i.indexOf(i[r])>-1)return!0}else return!1;return!1},this.user=e,e.permissions&&e.permissions.indexOf("Administrator")!==-1&&(this.user.isAuthorize=!0),e.permissions&&e.permissions.indexOf("SuperAdmin")!==-1&&this.sharedSignalsService.isSuperAdmin.set(!0),this.user.firstsLetter=this.appService.getFirstsLetters(this.user.name),e.fbId&&this.helperService.loadFacebookScript(e.fbId),e.gId&&this.helperService.loadGoogleScript(e.gId),setTimeout(function(){},250)}hasPermission(e){return this.user.permissions.indexOf(e)!=-1}setGovCo(e){var i=e;this.topBar={"background-color":i.colorTopBar},this.logoTopBar=this.settingService.settings.general.globalApiUrl.concat(i.logoTopBar),this.linkAccess=i.linkAccess,this.gov={},this.gov.isActive=i.isActive==="true",this.sharedSignalsService.linkAccess.set(this.linkAccess),this.sharedSignalsService.logoTopBar.set(this.logoTopBar),this.sharedSignalsService.topBar.set(this.topBar),this.sharedSignalsService.gov.set(this.gov)}setError(e){this.helperService.handlerException(e)}static \u0275fac=function(i){return new(i||s)(t(l),t(h),t(m),t(v),t(p),t(S))};static \u0275cmp=n({type:s,selectors:[["app-admin-main"]],standalone:!0,features:[a],decls:1,vars:0,template:function(i,r){i&1&&o(0,"router-outlet")},dependencies:[c]})};export{d as AdminMainComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.