import{d as _,eB as w,eA as g,G as D,b as n,eu as k,u,c as d,ew as p,b8 as P,t as I}from"./outputWidgets.562826ac.js";import{D as b,m as B}from"./index.ab1e9976.js";import{L as x}from"./CircularLoading.1d439fd2.js";import{r as R}from"./executeJs.db6ddd3b.js";import{B as q}from"./BackButton.92c61053.js";import{a as l}from"./asyncComputed.df2d9552.js";import{D as C}from"./dashes.b69dfa2c.js";import{W as E}from"./workspaces.5bce544b.js";import"./WidgetsFrame.0453e297.js";import"./icons.63405824.js";import"./geometryUtils.27c56739.js";import"./runnerData.52ec0396.js";import"./index.89e36de9.js";import"./pubsub.7185b91b.js";import"./url.5a1383d2.js";import"./PlayerNavbar.bf65d008.js";import"./Steps.cad82ea8.js";import"./activeRecord.6bb1bd7f.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]="c2a2dff6-23cc-4fa1-91c2-a36132e14dc2",t._sentryDebugIdIdentifier="sentry-dbid-c2a2dff6-23cc-4fa1-91c2-a36132e14dc2")}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}),h()):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:h}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>E.get()),c=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=B(a.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(P,null,[u(v)||!u(a)?(n(),d(x,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(b,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=I(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.fa0f53fb.js.map
