import{d as _,K as g,b as i,c as w,z as t,t as p,D as m,F as D,J as k,H as b,q as I}from"./registerWidgets.358232d6.js";import{D as P,m as q}from"./DashPlayer.3416870d.js";import{L as x}from"./CircularLoading.66cf5ef8.js";import{r as B}from"./index.f504f95d.js";import{B as R}from"./BackButton.8dccce05.js";import{a as c}from"./asyncComputed.c8d50303.js";import{D as C}from"./dashes.e33409ab.js";import{W as F}from"./workspaces.445d6cdf.js";import"./runnerData.32f36cf2.js";import"./executeJs.ee77da09.js";import"./PlayerNavbar.d4b69fb4.js";import"./icons.c4e80053.js";import"./WidgetsFrame.578f4bff.js";import"./colors.58e6e833.js";import"./Modal.a3024ac1.js";import"./passwordlessManager.5093fac0.js";import"./pubsub.5d0401cb.js";import"./Passwordless.b773d311.js";import"./lottie.fbc237c8.js";import"./activeRecord.360f8d7f.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]="4853b26a-ea75-45d3-b507-d109095eaf98",s._sentryDebugIdIdentifier="sentry-dbid-4853b26a-ea75-45d3-b507-d109095eaf98")}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}=c(()=>C.get(r.params.dashPath)),{result:u}=c(()=>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(),p(x,{key:0,class:"loading",justify:"center"})):m("",!0),t(d)?(i(),p(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"])):m("",!0),t(a)?(i(),p(R,{key:2,onExitFullscreenPreview:f})):m("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.6878af01.js.map
