import{d as v,K as D,b as u,c as g,z as t,t as p,D as l,F as w,J as k,H as b,q as I}from"./registerWidgets.8e2e133d.js";import{D as P,n as q}from"./DashPlayer.81cb9013.js";import{L as x}from"./CircularLoading.b144822c.js";import{r as B}from"./index.a245f875.js";import{B as R}from"./BackButton.db9c9ccb.js";import{a as m}from"./asyncComputed.a6090ca2.js";import{D as C}from"./dashes.8897f88a.js";import{W as F}from"./workspaces.12eb8423.js";import"./passwordlessManager.cb9f88a0.js";import"./runnerData.d93bd000.js";import"./executeJs.0d999a1c.js";import"./PlayerNavbar.cf04b8e0.js";import"./icons.35c960d1.js";import"./WidgetsFrame.c12866fb.js";import"./colors.351121a9.js";import"./Modal.2a0bcd16.js";import"./log.ab29b85c.js";import"./Passwordless.399a4808.js";import"./lottie.7a1c6d39.js";import"./activeRecord.eba5e90d.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]="5323e1fe-3c6b-42ee-a400-41f94d38dae7",s._sentryDebugIdIdentifier="sentry-dbid-5323e1fe-3c6b-42ee-a400-41f94d38dae7")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=k(),o=b(),c=({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}=m(()=>C.get(a.params.dashPath)),{result:d}=m(()=>F.get()),i=D(()=>{if(!r.value||!d.value||!r.value.makeRunnerData(d.value))return null;const e=q.create(r.value.makeRunnerData(d.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"})):l("",!0),t(i)?(u(),p(P,{key:1,class:"player",dash:t(i).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(i),onNavigate:c},null,8,["dash","params","dash-player-state"])):l("",!0),t(r)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.6101bf43.js.map
