import{C as b}from"./ContentLayout.9508ac8e.js";import{d as f,e as d,W as m,aq as h,r as v,o as l,X as w,c as _,Y as x,$ as I,ea as k,ag as C,w as u,b as r,aF as p,u as c,d9 as A,d7 as T,dd as M}from"./vue-router.e3ef87f0.js";import{l as S}from"./fetch.1531f1e4.js";import{L as W}from"./CircularLoading.046b2d5c.js";import"./gateway.e3730daa.js";import{P as z}from"./project.1af02886.js";import"./tables.8b5b16f2.js";import"./popupNotifcation.bf248d47.js";import"./record.9f354c97.js";import"./string.5524ff61.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]="4355d81c-5046-4660-b54f-84b3b492ad66",e._sentryDebugIdIdentifier="sentry-dbid-4355d81c-5046-4660-b54f-84b3b492ad66")}catch{}})();const B={class:"carousel"},D=f({__name:"TextCarousel",props:{texts:{type:Array,required:!0},period:{type:Number,required:!0},fontSize:{type:Number,default:18}},setup(e){const t=e,o=d(""),a=d(void 0);function s(){let n;do n=t.texts[Math.floor(Math.random()*t.texts.length)];while(n===o.value);o.value=n}function i(){a.value=window.setInterval(s,t.period*1e3)}return m(()=>{s(),i()}),h(()=>{a.value&&clearInterval(a.value)}),(n,y)=>{const g=v("Markdown");return l(),w("div",B,[(l(),_(g,{key:o.value,class:"text-item",source:o.value,style:x({fontSize:`${e.fontSize}px`})},null,8,["source","style"]))])}}});const E=I(D,[["__scopeId","data-v-1b2302ac"]]),G=f({__name:"WebEditor",setup(e){const t=["Did you know Abstra is open-source? You can star us on GitHub!","Python is the most popular language among non-developers",'You can use the "Fork" button to create a copy of a script run',"With our AI, you can create a full project in less than a minute!","Breaking your process into smaller steps can help debug it","Ask anything to Smart Console, our AI assistant","Check our documentation to learn more about Abstra","You can retry a failed step in the workflow using the Kanban","Customize your workspace by changing the theme in the settings"];return m(async()=>{const a=k().params.projectId,{redirect:s,ping:i}=await z.startWebEditor(a),n=setInterval(async()=>{(await S(i,{signal:AbortSignal.timeout(500)})).status===200&&window.location.replace(s)},2e3);C(()=>{clearInterval(n)})}),(o,a)=>(l(),_(b,null,{default:u(()=>[r(c(A),null,{default:u(()=>[p("Web Editor")]),_:1}),r(c(T),null,{default:u(()=>[p("We are getting things ready. This may take a few seconds.")]),_:1}),r(c(M),{gap:"large",align:"center",vertical:""},{default:u(()=>[r(E,{texts:t,period:5}),r(W)]),_:1})]),_:1}))}});export{G as default};
//# sourceMappingURL=WebEditor.32bdfc8b.js.map
