import{b as c,c as h}from"/build/_shared/chunk-N2JHY5SZ.js";import{a as f}from"/build/_shared/chunk-VWINT4H3.js";import{a as u}from"/build/_shared/chunk-F5LCZG2W.js";import{d as n}from"/build/_shared/chunk-G5WX4PPA.js";var a=n(c(),1);var t=n(c(),1),o=class{configuration;constructor(i){this.configuration=i}analytics(){return new t.AnalyticsApi(this.configuration)}apiKey(){return new t.ApiKeyApi(this.configuration)}auth(){return new t.AuthApi(this.configuration)}environment(){return new t.EnvironmentApi(this.configuration)}log(){return new t.LogApi(this.configuration)}membership(){return new t.MembershipApi(this.configuration)}project(){return new t.ProjectApi(this.configuration)}team(){return new t.TeamApi(this.configuration)}};var p=n(h(),1);var s=n(f(),1),F=e=>async i=>{let r=await s.authenticator.isAuthenticated(i.request,{failureRedirect:u.auth.login}),A=new a.Configuration({basePath:p.env.SERVER_BASE_URL,accessToken:r.accessToken}),m=new o(A);return e({...i,api:m,user:r.user})};export{F as a};
