import{d as _,K as g,b as i,c as w,z as t,t as c,D as p,F as D,J as k,H as b,q as I}from"./registerWidgets.1f64062d.js";import{D as P,m as q}from"./DashPlayer.2705d049.js";import{L as x}from"./CircularLoading.48f8280b.js";import{r as B}from"./index.247b1b38.js";import{B as R}from"./BackButton.a1b57cb6.js";import{a as m}from"./asyncComputed.be96efa9.js";import{D as C}from"./dashes.47698501.js";import{W as F}from"./workspaces.5570ba2d.js";import"./runnerData.19896da7.js";import"./executeJs.9d3c1254.js";import"./PlayerNavbar.e608b902.js";import"./icons.888e0741.js";import"./WidgetsFrame.444835bd.js";import"./colors.d1d40ad8.js";import"./Modal.68e9439f.js";import"./passwordlessManager.f7bf4528.js";import"./pubsub.3afe3339.js";import"./Passwordless.88ee3445.js";import"./lottie.ec4238e0.js";import"./activeRecord.a4f84f22.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="7085d99f-18e9-4fe9-895c-27948d43cb07",s._sentryDebugIdIdentifier="sentry-dbid-7085d99f-18e9-4fe9-895c-27948d43cb07")}catch{}})();const E=_({__name:"DashPreview",setup(s){const r=k(),o=b(),l=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):o.push({name:"form-preview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:h,result:a,refetch:y}=m(()=>C.get(r.params.dashPath)),{result:u}=m(()=>F.get()),d=g(()=>{if(!a.value||!u.value||!a.value.makeRunnerData(u.value))return null;const e=q(a.value.makeRunnerData(u.value));return e.onRedirect(({url:n,queryParams:v})=>B(o,n,v)),e});return(e,n)=>(i(),w(D,null,[t(h)||!t(a)?(i(),c(x,{key:0,class:"loading",justify:"center"})):p("",!0),t(d)?(i(),c(P,{key:1,class:"player",dash:t(d).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(d),onNavigate:l},null,8,["dash","params","dash-player-service"])):p("",!0),t(a)?(i(),c(R,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.d5f90f61.js.map
