import{d as _,eA as w,ez as g,J as D,b as n,eu as b,u,c,ew as p,bg as k,x as P}from"./outputWidgets.800838e3.js";import{D as I,m as x}from"./DashPlayer.c200eebd.js";import{L as B}from"./CircularLoading.760eaaec.js";import{r as R}from"./index.cc2e9ddf.js";import{B as q}from"./BackButton.6fd783e9.js";import{a as l}from"./asyncComputed.982dc1f5.js";import{D as C}from"./dashes.b53773aa.js";import{W as E}from"./workspaces.d202f7b4.js";import"./executeJs.a7ef7cce.js";import"./icons.93f59c4e.js";import"./index.c55f977a.js";import"./pubsub.3b460539.js";import"./PlayerNavbar.3d115f65.js";import"./Steps.d86e1c08.js";import"./geometryUtils.ff83ce65.js";import"./WidgetsFrame.98102695.js";import"./activeRecord.9d8d542d.js";import"./url.e7bb6b8a.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]="d3e4aba1-d0a5-4d55-87ce-1c09b06146a4",t._sentryDebugIdIdentifier="sentry-dbid-d3e4aba1-d0a5-4d55-87ce-1c09b06146a4")}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()),d=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(),b(k,null,[u(v)||!u(r)?(n(),c(B,{key:0,class:"loading",justify:"center"})):p("",!0),d.value?(n(),c(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(r)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.0f4c1a4c.js.map
