import{d as v,K as D,b as u,c as g,z as t,t as p,D as c,F as w,J as b,H as k,q as I}from"./registerWidgets.ad696c68.js";import{D as P,n as q}from"./DashPlayer.f08ddbe4.js";import{L as x}from"./CircularLoading.1b0ceab6.js";import{r as B}from"./index.5e96dbf3.js";import{B as R}from"./BackButton.9130c98a.js";import{a as l}from"./asyncComputed.40a67fe8.js";import{D as C}from"./dashes.55442710.js";import{W as F}from"./workspaces.d73a0523.js";import"./passwordlessManager.86ad8b48.js";import"./runnerData.50606928.js";import"./executeJs.5aebf107.js";import"./PlayerNavbar.049fd037.js";import"./icons.1c1f9d53.js";import"./WidgetsFrame.afffe632.js";import"./colors.698f0f3f.js";import"./Modal.d606972f.js";import"./log.812f9d15.js";import"./Passwordless.896adb7f.js";import"./lottie.d1a83079.js";import"./activeRecord.da3a3625.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="8903a776-92c2-40e0-82db-3ac87b9aa17e",s._sentryDebugIdIdentifier="sentry-dbid-8903a776-92c2-40e0-82db-3ac87b9aa17e")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=b(),o=k(),m=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):o.push({name:"form-preview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:y,result:r,refetch:h}=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=q.create(r.value.makeRunnerData(i.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(u(),g(w,null,[t(y)||!t(r)?(u(),p(x,{key:0,class:"loading",justify:"center"})):c("",!0),t(d)?(u(),p(P,{key:1,class:"player",dash:t(d).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(d),onNavigate:m},null,8,["dash","params","dash-player-state"])):c("",!0),t(r)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.6b8a149d.js.map
