import{d as _,eA as w,ez as b,J as g,b as n,et as D,u,c as d,ew as l,bw as k,x as P}from"./outputWidgets.d6897520.js";import{D as I,m as x}from"./DashPlayer.8f9c2517.js";import{L as B}from"./CircularLoading.74c5b113.js";import{r as R}from"./index.40bea6c2.js";import{B as q}from"./BackButton.7d607c57.js";import{a as c}from"./asyncComputed.2c363ccc.js";import{D as C}from"./dashes.dff0708d.js";import{W as E}from"./workspaces.fb65e732.js";import"./executeJs.8211d702.js";import"./icons.20b5fc8a.js";import"./index.3b692b6d.js";import"./pubsub.e0b33cd4.js";import"./PlayerNavbar.582e448c.js";import"./Steps.1d151ab5.js";import"./Modal.1a4e3f2f.js";import"./geometryUtils.bf113e76.js";import"./WidgetsFrame.b500b4a0.js";import"./activeRecord.e97440b4.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]="7bb28152-b58a-49db-891e-f1210382f989",t._sentryDebugIdIdentifier="sentry-dbid-7bb28152-b58a-49db-891e-f1210382f989")}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}=c(()=>C.get(r.params.dashPath)),{result:i}=c(()=>E.get()),p=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(),d(B,{key:0,class:"loading",justify:"center"})):l("",!0),p.value?(n(),d(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.bf31ceae.js.map
