import{e as _,ag as g,r as b,S as y,f as m,g as n,n as d,w as s,v as l,p as a,T as w,q as u,t as f,B as v,l as p,E as h,bb as k,aO as x}from"./jwt-decode.esm-D4VPbsXq.js";import{u as R}from"./organizationSwitcher-fnjPCzWx.js";import"./router-CV8sojYz.js";import"./ts.worker-CNbeM3u4.js";import"./organization-BjRmfFvL.js";import"./tables-BZ_dXKLf.js";import"./string-BKmvhOWC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="1ebf6b52-6676-4069-8ee8-5da3b0656ba2",e._sentryDebugIdIdentifier="sentry-dbid-1ebf6b52-6676-4069-8ee8-5da3b0656ba2")}catch{}})();const D={class:"loading-container"},I=_({__name:"RootRedirector",setup(e){const r=R(),i=g(),o=b(null);async function c(){o.value=null;try{const t=await r.selectDefaultOrganization();t.name==="onboarding"?window.location.href="/onboarding":i.replace(t)}catch(t){o.value=p.translate("i18n_projectsview_loading_error"),console.error("RootRedirector failed:",t)}}return y(c),(t,B)=>(n(),m("div",D,[o.value?(n(),d(a(h),{key:0,vertical:"",align:"center",gap:16},{default:s(()=>[l(a(w),{type:"danger"},{default:s(()=>[u(f(o.value),1)]),_:1}),l(a(v),{type:"primary",onClick:c},{default:s(()=>[u(f(a(p).translate("i18n_projectsview_retry")),1)]),_:1})]),_:1})):(n(),d(a(k),{key:1,size:"large"}))]))}}),N=x(I,[["__scopeId","data-v-c1eea334"]]);export{N as default};
//# sourceMappingURL=RootRedirector-D_GcR7R5.js.map
