import{d as v,K as D,b as u,c as g,z as t,t as p,D as l,F as b,J as w,H as k,q as I}from"./registerWidgets.5bbfbb1a.js";import{D as P,n as q}from"./DashPlayer.22f3dcf1.js";import{L as x}from"./CircularLoading.fd9aaeaa.js";import{r as B}from"./index.f78b9837.js";import{B as R}from"./BackButton.18c3f370.js";import{a as m}from"./asyncComputed.0fa43cb9.js";import{D as C}from"./dashes.e0c05409.js";import{W as F}from"./workspaces.b6d72d50.js";import"./passwordlessManager.d271c8e1.js";import"./runnerData.1e218cda.js";import"./executeJs.9e1e42e3.js";import"./PlayerNavbar.07fb1819.js";import"./icons.96408396.js";import"./WidgetsFrame.744aec31.js";import"./colors.71cbc60b.js";import"./Modal.34b86d8f.js";import"./log.81cc6b79.js";import"./Passwordless.6b80be80.js";import"./lottie.5c7f29e3.js";import"./activeRecord.0bf8afc8.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]="af1b9093-0102-425d-b0e4-fb1aaaaf925c",s._sentryDebugIdIdentifier="sentry-dbid-af1b9093-0102-425d-b0e4-fb1aaaaf925c")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=w(),o=k(),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:i}=m(()=>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(b,null,[t(y)||!t(r)?(u(),p(x,{key:0,class:"loading",justify:"center"})):l("",!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: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.1aa703e0.js.map
