import{d as _,ez as b,ey as w,H as g,b as n,et as D,u,c as d,ev as p,bf as k,v as P}from"./outputWidgets.7bdcec0a.js";import{D as I,m as x}from"./index.9ac09fcc.js";import{L as B}from"./CircularLoading.724accbb.js";import"./index.15e46fc6.js";import{r as R}from"./executeJs.4c06c20d.js";import{B as q}from"./BackButton.0ddbab75.js";import{a as l}from"./asyncComputed.cfb98789.js";import{D as C}from"./dashes.a2ed9201.js";import{W as E}from"./workspaces.be6d809d.js";import"./WidgetsFrame.63ba4d68.js";import"./icons.6934ad19.js";import"./geometryUtils.2ac81865.js";import"./runnerData.9bca67ea.js";import"./index.bf6ee632.js";import"./pubsub.c455bec9.js";import"./url.5caacc63.js";import"./PlayerNavbar.bfe2d6d4.js";import"./Steps.b1376ce3.js";import"./activeRecord.84d52553.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]="83ecb380-a5d2-4bbd-ae01-9b57c8ebf601",t._sentryDebugIdIdentifier="sentry-dbid-83ecb380-a5d2-4bbd-ae01-9b57c8ebf601")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=b(),s=w(),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=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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),D(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.55a62a65.js.map
