1import{B as FI,Pr as jx,f as Ax,h as Be,it as I,la as w,sr as cf,ti as ne,ua as x$1}from"./chunk-CD8SvDVS.js";import{r as H}from"./chunk-BJh-1DPK.js";import{i as T,r as M,s as w$1,t as E}from"./chunk-C-EMEdPi.js";import{n as Le}from"./chunk-Z2P3IulQ.js";var x=(()=>{class i{constructor(){this.http=I(Le),this.store=I(H),this.hasPiiScan$=this.store.select(M),this.hasPerimeterScan$=this.store.select(E),this.hasTraining$=this.store.select(T),this.hasSophos$=this.store.select(w$1)}isLoggedIn(){return this.http.get(`/smproxy/login_status`)}isEmployee(){return this.http.get(`/smauth/employee_status`)}employeePermissionsOptions(){return x$1(w({},this.employeeStatusOptions()),{placeholderData:{status:!1},select:t=>t.status?t.permissions:[]})}employeeStatusOptions(){return{queryKey:[`core`,`auth`,`employee-status`],queryFn:()=>Ax(this.http.get(`/smauth/employee_status`)),staleTime:300*1e3}}hasGdpr(t){return this.http.get(`/api/gdpr/gdpr/customer/${t}/gdpr_product_access`)}hasHipaa(t){return this.http.get(`/api/auth/hclient_access/${t}`)}hipaaExpired(t){return this.http.get(`/api/auth/hipaa_expired/${t}`)}hasAccessToHNet(t){return this.http.get(`/api/auth/hnet_access/${t}`)}hasGdprProduct(t){return this.http.get(`/api/purchase/customers/${t}/assets_and_packages`)}hasEmployeePermission(t,e={}){return this.isEmployee().pipe(FI(s=>s.status?this.hasPermission(t,`employee`,{foreign_id:s.id}):e?this.hasPermission(t,e.context,{foreign_id:e.foreign_id}):cf({status:!1})))}getBankPermissions(t){return this.http.get(`/api/mcc/partners/${t}/permissions`)}hasPermission(t,e,s){return this.http.post(`/smauth/isAuthorized`,{permission:t,context_kind:e,foreign_id:s.foreign_id||null,foreign_uuid:s.foreign_uuid||null})}hasPulse(){return this.getPermGroup(`pulse_org:read`,`pulse_org`).pipe(FI(t=>jx(()=>t.length,cf({status:!0}),this.getPermGroup(`pulse_location:read`,`pulse_location`).pipe(FI(e=>jx(()=>e.length,cf({status:!0}),this.hasEmployeePermission(`pulse_org:read`)))))))}isOrgAdmin(){return this.isEmployee().pipe(FI(t=>jx(()=>t.status,cf({status:!0}),this.getPermGroup(`pulse_org_users:read`,`pulse_org`).pipe(Be(e=>jx(()=>e.length,cf({status:!0}),cf({status:!1})))))))}getPermGroup(t,e){let s={permission:t,context_kind:e,foreign_id:null};return this.http.post(`/smauth/perm_group`,s)}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵprov=ne({token:i,factory:i.ɵfac,providedIn:`root`})}}return i})();export{x as t};
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.