import{a as o,b as f}from"./chunk-WZMPEGTK.js";import{P as c,Q as l}from"./chunk-FYLDFXYJ.js";import{j as a,o as v}from"./chunk-HO2J6YLX.js";import{Gd as p,sa as n,xa as i}from"./chunk-JSJB5BKT.js";import{e as d}from"./chunk-SZAW6ZBW.js";var j,A=d(()=>{f();p();v();l();j=(()=>{class r{constructor(e,t){this.router=e,this.currentUserService=t}canActivate(e,t){let u=e.data.permissions,h=e.data.isRepositoryDependant,m=this.currentUserService.accessSnapshot.ownedVaults.length>1,s=this.currentUserService.isAdministrator||h&&m||this.hasAtLeastOneOfTheRequiredPermission(u);return s||this.router.navigate([o.location+"dashboard"]),s}hasAtLeastOneOfTheRequiredPermission(e){return e?.some(t=>this.currentUserService.isAllowed(t))}static{this.\u0275fac=function(t){return new(t||r)(i(a),i(c))}}static{this.\u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});export{j as a,A as b};
