import{d as _,ey as w,ex as g,F as D,b as n,c as k,bu as u,u as p,eu as c,bw as b,t as P}from"./registerWidgets.eb5d1044.js";import{D as I,m as x}from"./DashPlayer.4aa6c919.js";import{L as B}from"./CircularLoading.255913e4.js";import{r as R}from"./index.9e50376a.js";import{B as q}from"./BackButton.8c4203dd.js";import{a as l}from"./asyncComputed.8007047f.js";import{D as C}from"./dashes.24e05caa.js";import{W as F}from"./workspaces.d3480546.js";import"./executeJs.7c9dcc57.js";import"./PlayerNavbar.8f28ca5d.js";import"./icons.f9be01a3.js";import"./Steps.a473820d.js";import"./Modal.b3432d4d.js";import"./passwordlessManager.5b579a25.js";import"./pubsub.8f4c78dc.js";import"./storage.0943951e.js";import"./Passwordless.648754ed.js";import"./WidgetsFrame.dfa61eb0.js";import"./lottie.083b517e.js";import"./activeRecord.e38b436c.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="dff37434-8bad-4a90-acd6-a692a4726f38",t._sentryDebugIdIdentifier="sentry-dbid-dff37434-8bad-4a90-acd6-a692a4726f38")}catch{}})();const E=_({__name:"DashPreview",setup(t){const a=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:a.query}),y()):s.push({name:"formPreview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:v,result:r,refetch:y}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>F.get()),d=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=x(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(r)?(n(),p(B,{key:0,class:"loading",justify:"center"})):c("",!0),d.value?(n(),p(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):c("",!0),u(r)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.62dd6a86.js.map
