import{d as _,eA as w,ez as g,J as D,b as n,et as k,u,c as p,ew as d,bw as b,x as P}from"./outputWidgets.b13a87c2.js";import{D as I,m as x}from"./DashPlayer.8df1cc2e.js";import{L as B}from"./CircularLoading.9771b42b.js";import{r as R}from"./index.98e61e8e.js";import{B as q}from"./BackButton.e585b0ae.js";import{a as l}from"./asyncComputed.02afd50e.js";import{D as C}from"./dashes.4926394c.js";import{W as E}from"./workspaces.f986af40.js";import"./executeJs.7971ae06.js";import"./icons.76c1fe8b.js";import"./index.fa2d5075.js";import"./pubsub.dab46576.js";import"./PlayerNavbar.1c65f36f.js";import"./Steps.2eaacc3c.js";import"./Modal.66296973.js";import"./geometryUtils.6d566989.js";import"./WidgetsFrame.023caee0.js";import"./activeRecord.f5a2d19d.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]="f8bcc264-c608-4cc6-aea4-55d4f8840084",t._sentryDebugIdIdentifier="sentry-dbid-f8bcc264-c608-4cc6-aea4-55d4f8840084")}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=x(a.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(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.ed08d750.js.map
