import{d as _,ez as w,ey as g,H as D,b as n,et as b,u,c as d,ev as p,bf as k,v as P}from"./outputWidgets.17e2270d.js";import{D as I,m as x}from"./DashPlayer.828aa52d.js";import{L as B}from"./CircularLoading.1c3b33da.js";import"./index.4787064b.js";import{r as R}from"./executeJs.dcb0cac7.js";import{B as q}from"./BackButton.5eee5ad3.js";import{a as l}from"./asyncComputed.c8589796.js";import{D as C}from"./dashes.f7f3f911.js";import{W as E}from"./workspaces.1c8fc227.js";import"./geometryUtils.16dd0e1b.js";import"./runnerData.07784255.js";import"./index.678809b3.js";import"./pubsub.52f6192d.js";import"./WidgetsFrame.b5c97561.js";import"./icons.ae606380.js";import"./url.6c73df07.js";import"./PlayerNavbar.03251a7c.js";import"./Steps.6af066e9.js";import"./activeRecord.1230459a.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]="4162b462-2d59-41cc-93f1-9513fd1b3a20",t._sentryDebugIdIdentifier="sentry-dbid-4162b462-2d59-41cc-93f1-9513fd1b3a20")}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}=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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),b(k,null,[u(v)||!u(a)?(n(),d(B,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(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"])):p("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.3e3b2567.js.map
