import{d as _,ey as w,ex as g,H as b,b as n,d2 as D,u,c as p,eu as d,bu as k,v as P}from"./registerWidgets.d6e66474.js";import{D as I,m as x}from"./DashPlayer.f7dd7935.js";import{L as B}from"./CircularLoading.2744e4b0.js";import{r as R}from"./index.977cda87.js";import{B as q}from"./BackButton.30a4dc47.js";import{a as m}from"./asyncComputed.5c362931.js";import{D as C}from"./dashes.811e4dd5.js";import{W as E}from"./workspaces.5e4a741d.js";import"./executeJs.45861195.js";import"./PlayerNavbar.6876b287.js";import"./icons.4be6cb33.js";import"./Steps.28b1fe2b.js";import"./Modal.87772a38.js";import"./geometryUtils.8b61511d.js";import"./passwordlessManager.a2051844.js";import"./pubsub.9e806cff.js";import"./storage.d7eb729a.js";import"./Passwordless.83f13a8c.js";import"./WidgetsFrame.b0e7227e.js";import"./lottie.b059da2e.js";import"./activeRecord.1009e596.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]="40c61bf4-2bc5-4773-a6c3-6d3b742cff98",t._sentryDebugIdIdentifier="sentry-dbid-40c61bf4-2bc5-4773-a6c3-6d3b742cff98")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),l=({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}=m(()=>C.get(r.params.dashPath)),{result:i}=m(()=>E.get()),c=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"})):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:l},null,8,["dash","params","dash-player-service"])):d("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const ee=P(F,[["__scopeId","data-v-1172cf43"]]);export{ee as default};
//# sourceMappingURL=DashPreview.16c59e2a.js.map
