import{L as w}from"./CircularLoading-DSsC5jij.js";import{e as D,r as n,Q as k,ag as x,f as c,j as I,v as d,ba as C,g as i,aO as E}from"./jwt-decode.esm-BYfS37aG.js";import{W}from"./Watermark-BNe5HOS9.js";import{u as $}from"./userStore-ZzGDEfJ0.js";import{b as S}from"./consoleCapture-BPVon_ip.js";import{b as V}from"./workspaceStore-CMQaTfN3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d669bfe6-c306-4ede-908a-c6c580752eaf",e._sentryDebugIdIdentifier="sentry-dbid-d669bfe6-c306-4ede-908a-c6c580752eaf")}catch{}})();const j={class:"page-container"},L={key:0,class:"loading"},M={key:1,class:"error-container"},P=["srcdoc"],R=D({__name:"PageStageView",props:{uiData:{}},setup(e){const a=e,f=x(),p=n(!0),l=n(""),s=n(!1),g=n(null);return k(async()=>{const t=$();t.loadJWT();try{const u=a.uiData.path?`/_page/${a.uiData.path}`:"/_page-home",o=await V(u,{headers:t.authHeaders});if(o.status===401){t.removeJWT(),f.push({name:"playerLogin",query:{redirect:`/${a.uiData.path}`}});return}if(o.ok){const m=await o.text(),r=o.headers.get("X-Execution-Id"),_=o.headers.get("X-Abstra-Debug")==="true";if(m){const b=`<base href="${u}" target="_top">`,h=t.jwt?`<meta name="abstra-auth-token" content="${t.jwt}">`:"",v=r?`<meta name="abstra-execution-id" content="${r}">`:"",y=r&&_?S(r,a.uiData.id):"";l.value=b+h+v+y+m}else s.value=!0}else s.value=!0}catch{s.value=!0}p.value=!1}),(t,u)=>(i(),c("div",j,[p.value?(i(),c("div",L,[d(w)])):s.value?(i(),c("div",M,[d(C,{"error-message":null,"execution-id":null,locale:"en"})])):l.value?(i(),c("iframe",{key:2,ref_key:"iframeRef",ref:g,class:"page-iframe",srcdoc:l.value,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-top-navigation-by-user-activation"},null,8,P)):I("",!0),d(W,{"page-id":e.uiData.id,locale:"en"},null,8,["page-id"])]))}}),A=E(R,[["__scopeId","data-v-dcbf338d"]]);export{A as P};
//# sourceMappingURL=PageStageView-DAPtpvJZ.js.map
