import{d as _,eA as w,ez as g,J as D,b as n,et as k,u,c as d,ew as p,bg as b,x as P}from"./outputWidgets.17392370.js";import{D as I,m as x}from"./DashPlayer.c4d9aa5f.js";import{L as B}from"./CircularLoading.493040c9.js";import{r as R}from"./index.7c30bb7a.js";import{B as q}from"./BackButton.59d0de4d.js";import{a as l}from"./asyncComputed.76849272.js";import{D as C}from"./dashes.5976f8f5.js";import{W as E}from"./workspaces.9a283772.js";import"./executeJs.a0d1c16f.js";import"./icons.baa5f07a.js";import"./index.86e4aba0.js";import"./pubsub.fc739490.js";import"./PlayerNavbar.84056dff.js";import"./Steps.7da7efa5.js";import"./Modal.3c911f54.js";import"./geometryUtils.20f74f8c.js";import"./WidgetsFrame.36b12b34.js";import"./activeRecord.84b679f6.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="78d9a4a9-6af8-4075-9845-91c6a09dbc86",t._sentryDebugIdIdentifier="sentry-dbid-78d9a4a9-6af8-4075-9845-91c6a09dbc86")}catch{}})();const F=_({__name:"DashPreview",setup(t){const a=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):s.push({name:"formPreview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:v,result:r,refetch:h}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>E.get()),c=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=x(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(r)?(n(),d(B,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(I,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(r)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.1ecc76e0.js.map
