import{d as _,ez as w,ey as g,H as b,b as n,et as D,u,c as p,ev as l,bf as k,v as P}from"./outputWidgets.1cf78234.js";import{D as I,m as x}from"./DashPlayer.785419eb.js";import{L as B}from"./CircularLoading.84ea6d91.js";import"./index.748edabf.js";import{r as R}from"./executeJs.78eb4358.js";import{B as q}from"./BackButton.395c8e8f.js";import{a as c}from"./asyncComputed.513601fc.js";import{D as C}from"./dashes.e131628f.js";import{W as E}from"./workspaces.8e5d684c.js";import"./geometryUtils.737b6911.js";import"./runnerData.c735532a.js";import"./index.55541b89.js";import"./pubsub.a66a61fd.js";import"./WidgetsFrame.d504dd89.js";import"./icons.ba4d43de.js";import"./url.18ee0e18.js";import"./PlayerNavbar.5a3b8865.js";import"./Steps.f87bd50d.js";import"./activeRecord.1ee4e98a.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]="975f6def-de47-4bee-9e2f-46b4a482d2b5",t._sentryDebugIdIdentifier="sentry-dbid-975f6def-de47-4bee-9e2f-46b4a482d2b5")}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}),y()):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:y}=c(()=>C.get(r.params.dashPath)),{result:i}=c(()=>E.get()),d=b(()=>{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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),D(k,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):l("",!0),d.value?(n(),p(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.9d25b5ad.js.map
