import{d as _,K as w,J as g,L as D,b as n,c as k,A as u,u as p,E as d,F as P,t as I}from"./registerWidgets.f8dfb33f.js";import{D as b,m as x}from"./DashPlayer.53ab9cfb.js";import{L as B}from"./CircularLoading.fb5be9eb.js";import{r as R}from"./index.d2b139a4.js";import{B as q}from"./BackButton.5e5329d6.js";import{a as l}from"./asyncComputed.a78c0f7f.js";import{D as C}from"./dashes.5b60cc03.js";import{W as E}from"./workspaces.9c133c0c.js";import"./executeJs.95fae432.js";import"./PlayerNavbar.76c6ee55.js";import"./icons.074088c2.js";import"./Steps.5db1e50f.js";import"./Modal.b37564e2.js";import"./passwordlessManager.e17ec9bd.js";import"./pubsub.4b58e722.js";import"./Passwordless.7e4ecc5c.js";import"./WidgetsFrame.cdf1adec.js";import"./lottie.c7ecbe32.js";import"./activeRecord.b9bfe1cb.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]="a0fc8701-5917-45aa-8ca5-77a1e3dee962",t._sentryDebugIdIdentifier="sentry-dbid-a0fc8701-5917-45aa-8ca5-77a1e3dee962")}catch{}})();const F=_({__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}),h()):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:h}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>E.get()),c=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:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(P,null,[u(v)||!u(r)?(n(),p(B,{key:0,class:"loading",justify:"center"})):d("",!0),c.value?(n(),p(b,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(r)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Y=I(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.711a0589.js.map
