import{d as _,ez as w,ey as g,H as D,b as n,et as k,u,c as p,ev as l,b9 as b,v as P}from"./outputWidgets.d6334d0e.js";import{D as I,m as x}from"./index.cab89dc8.js";import{L as B}from"./CircularLoading.4cd70ea8.js";import"./index.85dd1fea.js";import{r as R}from"./executeJs.fc543c21.js";import{B as q}from"./BackButton.575a40cc.js";import{a as c}from"./asyncComputed.95fd0999.js";import{D as C}from"./dashes.0b98440a.js";import{W as E}from"./workspaces.27037c79.js";import"./WidgetsFrame.23428b77.js";import"./icons.09e1f108.js";import"./geometryUtils.28607d5d.js";import"./runnerData.f9a0f655.js";import"./index.39da7992.js";import"./pubsub.9d7d329e.js";import"./url.dce42ecb.js";import"./PlayerNavbar.b07eafb7.js";import"./Steps.ce57000c.js";import"./activeRecord.aa738a85.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="d6fe9d8a-1533-4870-a980-dd7ba610565e",t._sentryDebugIdIdentifier="sentry-dbid-d6fe9d8a-1533-4870-a980-dd7ba610565e")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):s.push({name:"formPreview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:v,result:a,refetch:y}=c(()=>C.get(r.params.dashPath)),{result:i}=c(()=>E.get()),d=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=x(a.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):l("",!0),d.value?(n(),p(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.d1835566.js.map
