import{_ as b}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.1cd018cf.js";import{C as h}from"./ContentLayout.00d6b647.js";import{l as w}from"./fetch.06d85294.js";import{d as g,e3 as k,e4 as v,f as C,c,w as s,o as i,b as p,a as x,u as d,d2 as _,az as m,Q as I}from"./index.aa57db48.js";import{u as T,E as D}from"./editor.3cee853d.js";import{C as L}from"./Card.fb599d94.js";import"./Logo.05ec7ca5.js";import"./userStore.c793bb76.js";import"./workspaceStore.9f4bc146.js";import"./url.729c5aa1.js";import"./colorHelpers.9fb3a71f.js";import"./linters.a8a6640d.js";import"./asyncComputed.fcda3bbf.js";import"./TabPane.083ab0ea.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a05807c0-9e84-4686-926b-42fb11f88cca",e._sentryDebugIdIdentifier="sentry-dbid-a05807c0-9e84-4686-926b-42fb11f88cca")}catch{}})();const N={class:"card-content"},j=g({__name:"Welcome",setup(e){const t=k(),{query:n}=v(),a=T();a.loadLogin();const l=C(!0),f=async()=>{l.value=!1,setInterval(()=>{var o;return window.location.replace(((o=a==null?void 0:a.links)==null?void 0:o.project)||D.consoleUrl)},5e3)};return(async()=>{const o=n.token,r=n.redirect,u=await w("/_editor/api/web-editor/welcome",{method:"POST",body:JSON.stringify({token:o}),headers:{"Content-Type":"application/json"}});if(!u.ok)return f();const{ok:y}=await u.json();if(!y)return f();r?await t.push({path:r}):await t.push({name:"workspace"})})(),(o,r)=>(i(),c(h,null,{default:s(()=>[p(d(L),{bordered:!1,class:"card"},{default:s(()=>[x("div",N,[p(b,{style:{"margin-bottom":"10px"}}),l.value?(i(),c(d(_),{key:0},{default:s(()=>[m("Loading...")]),_:1})):(i(),c(d(_),{key:1},{default:s(()=>[m("Authentication failed. You are been redirected...")]),_:1}))])]),_:1})]),_:1}))}});const Y=I(j,[["__scopeId","data-v-0cfdf641"]]);export{Y as default};
//# sourceMappingURL=Welcome.ca12ca8e.js.map
