import{d as _,eA as w,ez as b,J as g,b as n,eu as D,u,c as p,ew as d,bg as k,x as P}from"./outputWidgets.df0b7764.js";import{D as I,m as x}from"./DashPlayer.44e6dbdb.js";import{L as B}from"./CircularLoading.43a277ec.js";import{r as R}from"./index.8131d28d.js";import{B as q}from"./BackButton.a8d9ecda.js";import{a as l}from"./asyncComputed.46396f29.js";import{D as C}from"./dashes.27a2359d.js";import{W as E}from"./workspaces.3593d617.js";import"./executeJs.ce7b3245.js";import"./icons.649962e7.js";import"./index.52f87cef.js";import"./pubsub.82647744.js";import"./PlayerNavbar.756a1cc1.js";import"./Steps.cb980244.js";import"./geometryUtils.a2726904.js";import"./WidgetsFrame.d2e169f5.js";import"./activeRecord.af31c98a.js";import"./url.b34e96a5.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]="3fbb04cb-bd65-4a58-a72e-61e720e4c36a",t._sentryDebugIdIdentifier="sentry-dbid-3fbb04cb-bd65-4a58-a72e-61e720e4c36a")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=b(),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=g(()=>{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:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),D(k,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):d("",!0),c.value?(n(),p(I,{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"])):d("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.cdae76da.js.map
