import{e as _,ae as g,r as y,M as m,f as w,g as n,n as d,w as s,q as l,p as a,ai as b,R as f,S as u,B as v,l as p,b5 as R,bb as h,aM as k}from"./jwt-decode.esm-CMj0qxed.js";import{u as x}from"./organizationSwitcher-B8aspLB5.js";import"./router-C1hHJqQH.js";import"./ts.worker-CXGQk1hm.js";import"./organization-B4Ec1XDU.js";import"./tables-ChrXZ9vU.js";import"./string-CO_aYvwE.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]="ca3f28f1-9645-40a3-8681-d9c3320d893d",e._sentryDebugIdIdentifier="sentry-dbid-ca3f28f1-9645-40a3-8681-d9c3320d893d")}catch{}})();const D={class:"loading-container"},I=_({__name:"RootRedirector",setup(e){const r=x(),i=g(),o=y(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 m(c),(t,B)=>(n(),w("div",D,[o.value?(n(),d(a(R),{key:0,vertical:"",align:"center",gap:16},{default:s(()=>[l(a(b),{type:"danger"},{default:s(()=>[f(u(o.value),1)]),_:1}),l(a(v),{type:"primary",onClick:c},{default:s(()=>[f(u(a(p).translate("i18n_projectsview_retry")),1)]),_:1})]),_:1})):(n(),d(a(h),{key:1,size:"large"}))]))}}),O=k(I,[["__scopeId","data-v-c1eea334"]]);export{O as default};
//# sourceMappingURL=RootRedirector-CLl07-nM.js.map
