import{d as _,J as g,H as w,K as D,b as n,c as b,z as u,t as p,D as d,F as k,q as I}from"./registerWidgets.cecc7add.js";import{D as P,m as q}from"./DashPlayer.a348af79.js";import{L as x}from"./CircularLoading.45f7b299.js";import{r as B}from"./index.a0dcefc8.js";import{B as R}from"./BackButton.5be26fba.js";import{a as l}from"./asyncComputed.08fdcc30.js";import{D as C}from"./dashes.fe46ea3e.js";import{W as F}from"./workspaces.9e1715c9.js";import"./executeJs.5aff51e5.js";import"./PlayerNavbar.208ad882.js";import"./icons.a47594f6.js";import"./Steps.5d7ea3ec.js";import"./Modal.4485a18b.js";import"./runnerData.fab8bd8b.js";import"./passwordlessManager.8b0c672e.js";import"./pubsub.a43e35aa.js";import"./Passwordless.0943eeec.js";import"./WidgetsFrame.bbded71d.js";import"./lottie.79ce2fdf.js";import"./activeRecord.2a9ab687.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]="ef9aea78-b757-4ec5-88ec-c17fe4b78eeb",t._sentryDebugIdIdentifier="sentry-dbid-ef9aea78-b757-4ec5-88ec-c17fe4b78eeb")}catch{}})();const E=_({__name:"DashPreview",setup(t){const r=g(),s=w(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:r.query}),h()):s.push({name:"form-preview",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:h}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>F.get()),c=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=q(a.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>B(s,o,y)),e});return(e,o)=>(n(),b(k,null,[u(v)||!u(a)?(n(),p(x,{key:0,class:"loading",justify:"center"})):d("",!0),c.value?(n(),p(P,{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"])):d("",!0),u(a)?(n(),p(R,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.f623b186.js.map
